@deneb-ui/cli 2.0.54 → 2.0.56

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.
@@ -1,4 +1,4 @@
1
1
  'use strict';
2
2
 
3
3
  // Generated from visual editor bridge (v46).
4
- module.exports = "var __name=typeof __name==\"function\"?__name:((it,I)=>typeof Object.defineProperty==\"function\"?Object.defineProperty(it,\"name\",{value:I,configurable:!0}):it);(function(I,O,_,C,H){const s=`${[\"MARKET\",\"PLACE\"].join(\"\")}_PREVIEW_`,c=__name(t=>`${s}${t}`,\"previousPreviewMessage\"),h=__name(t=>`__${s}${t}__`,\"previousPreviewStorageKey\"),k=\"FIVORA_PREVIEW_FOCUS_PAGE\",$=c(\"FOCUS_PAGE\"),R=\"FIVORA_PREVIEW_FOCUS_RESULT\",T=c(\"FOCUS_RESULT\"),N=\"FIVORA_PREVIEW_READY\",X=c(\"READY\"),G=\"data-fivora-preview-active-field\",F=\"data-fivora-resolved-field-path\",P=\"data-fivora-empty-editable\",V=\"data-fivora-empty-collection\",B=\"data-preview-list-path\",D=\"data-preview-item-path\",U=\"data-preview-static\",ot=\"__FIVORA_UNIVERSAL_PREVIEW_FOCUS__\",Y=\"__FIVORA_VISUAL_EDITOR_TARGETS__\",u=\"__FIVORA_PREVIEW_PARENT_ORIGIN__\",E=h(\"PARENT_ORIGIN\"),S=\"__FIVORA_PREVIEW_SITE_DATA_CACHE__\",z=h(\"SITE_DATA_CACHE\"),d=\"__FIVORA_PREVIEW_SITE_DATA__\",m=h(\"SITE_DATA\"),y=\"FIVORA_PREVIEW_SITE_DATA\",M=c(\"SITE_DATA\"),Z=\"FIVORA_PREVIEW_SITE_DATA_APPLIED\",at=c(\"SITE_DATA_APPLIED\"),En=\"FIVORA_PREVIEW_CONTENT_PATCH\",xn=c(\"CONTENT_PATCH\"),Cn=\"FIVORA_PREVIEW_STYLE_PATCH\",ve=\"fivora-template-color-replacements\",Tn=[200],Pn=2500,vn=1600,In=12e3,_n=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small\";let Jt=[];const Ie=new Map;let _e=0,Xt=!1,Tt=null,Zt,Qt=[],st=null,v=null,Re=\"\",$e=\"\",Oe=\"\";function gt(){try{window.sessionStorage.removeItem(ot)}catch{}}__name(gt,\"clearPendingFocus\");function te(){try{return window.sessionStorage.getItem(u)||window.sessionStorage.getItem(E)}catch{return null}}__name(te,\"readRememberedParentOrigin\");function ee(t){if(t)try{window.sessionStorage.setItem(u,t)}catch{}}__name(ee,\"rememberParentOrigin\");function Me(){for(const t of Qt)window.clearTimeout(t);Qt=[]}__name(Me,\"clearSiteDataRelayTimers\");function Le(){const t=new Set;dt&&t.add(dt),t.add(window.location.origin);const e=te();e&&t.add(e);try{if(document.referrer){const n=new URL(document.referrer).origin;n&&n!==\"null\"&&t.add(n)}}catch{}try{const n=window.location.ancestorOrigins?.item(0);n&&t.add(n)}catch{}return Array.from(t)}__name(Le,\"collectSiteDataRelayOrigins\");function Pt(t,e){const n=Le(),r=e?.fanOut?n:n.slice(0,1);for(const o of r)for(const i of[y,M])try{window.dispatchEvent(new MessageEvent(\"message\",{data:{type:i,siteData:t,__fivoraBridgeRelay:!0},origin:o,source:window.parent}))}catch{}}__name(Pt,\"relaySiteDataToTemplateRuntime\");function vt(t,e){v=t;try{window[d]=t,window[m]=t}catch{}const n=__name(()=>{st=null;try{const r=JSON.stringify(v);window.sessionStorage.setItem(S,r),window.sessionStorage.setItem(z,r)}catch{}},\"writeSessionCache\");if(e?.immediate){st!==null&&(window.clearTimeout(st),st=null),n();return}st!==null&&window.clearTimeout(st),st=window.setTimeout(n,Pn)}__name(vt,\"persistSiteData\");function ke(t){const e=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,n=e?.requirements&&typeof e.requirements==\"object\"&&!Array.isArray(e.requirements)?e.requirements:null,r=e?.template&&typeof e.template==\"object\"&&!Array.isArray(e.template)?e.template:null,o=r?.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:null;try{return JSON.stringify({requiredPages:n?.requiredPages??null,pages:o?.pages??null,pageDefinitions:r?.pageDefinitions??o?.pageDefinitions??null})}catch{return String(Date.now())}}__name(ke,\"pagesSignature\");let ct=null,lt=null;function Fe(t){const e=[];for(const n of t.matchAll(/([^.[\\]]+)|\\[(\\d+)\\]/g))n[2]!==void 0?e.push(Number(n[2])):n[1]&&e.push(n[1]);return e}__name(Fe,\"parseFieldPath\");function De(t,e,n){if(e.length===0)return t;const r=__name((o,i)=>{const a=e[i],l=i===e.length-1,f=l?void 0:e[i+1];if(typeof a==\"number\"){const w=(Array.isArray(o)?o:[]).slice();if(l)return w[a]=n,w;const L=w[a];return w[a]=L==null||typeof L!=\"object\"?r(typeof f==\"number\"?[]:{},i+1):r(L,i+1),w}const g={...o&&typeof o==\"object\"&&!Array.isArray(o)?o:{}};if(l)return g[a]=n,g;const A=g[a];return g[a]=A==null||typeof A!=\"object\"?r(typeof f==\"number\"?[]:{},i+1):r(A,i+1),g},\"setAt\");return r(t,0)}__name(De,\"setValueAtPath\");function Ne(){return(v&&typeof v==\"object\"&&!Array.isArray(v)?v:{}).content??{}}__name(Ne,\"readPublishedContent\");function ne(t){const n={...v&&typeof v==\"object\"&&!Array.isArray(v)?v:{},content:t};v=n;try{window[d]=n,window[m]=n}catch{}return n}__name(ne,\"writePublishedContent\");function re(){ct!==null&&window.clearTimeout(ct),ct=window.setTimeout(()=>{ct=null,v!=null&&Pt(v,{fanOut:!1})},vn)}__name(re,\"scheduleContentOnlyRelay\");function It(){lt!==null&&window.clearTimeout(lt),lt=window.setTimeout(()=>{if(lt=null,v==null)return;const t=window;if(typeof t.requestIdleCallback==\"function\"){t.requestIdleCallback(()=>{v!=null&&vt(v,{immediate:!0})},{timeout:4e3});return}vt(v,{immediate:!0})},In)}__name(It,\"scheduleContentOnlyPersist\");function ie(t,e){const n=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [${F}=\"${CSS.escape(t)}\"]`));for(const r of n){if(J?.target===r)continue;if(r.tagName===\"IMG\"){typeof e==\"string\"&&e.trim()&&r.setAttribute(\"src\",e);continue}if(typeof e!=\"string\"&&typeof e!=\"number\"&&typeof e!=\"boolean\")continue;if(r.hasAttribute(\"data-fivora-rating-container\")||r.querySelector(\"[data-fivora-stars-row]\")||r.querySelector(\"[data-fivora-rating-text]\")||t.endsWith(\".rating\")){const i=Math.min(Math.max(Math.round(Number(e)||0),0),5),a=r.querySelector(\"[data-fivora-rating-text]\");a?a.textContent=String(i):r.hasAttribute(\"data-fivora-rating-text\")&&(r.textContent=String(i));const l=r.hasAttribute(\"data-fivora-rating-container\")?r:r.closest(\"[data-fivora-rating-container]\")||r.parentElement;l&&(Array.from(l.querySelectorAll(\"svg\")).forEach((p,g)=>{const b=g<i?\"#fa7014\":\"#dadce0\";p.style.fill=b,p.style.color=b;const w=p.querySelector(\"path\");w&&(w.style.fill=b)}),l.setAttribute(\"data-rating-value\",String(i)));continue}const o=(r.getAttribute(\"data-fivora-value-prefix\")??\"\")+String(e)+(r.getAttribute(\"data-fivora-value-suffix\")??\"\");if(r.childElementCount===0)r.textContent=o;else{const i=Array.from(r.childNodes).find(a=>a.nodeType===Node.TEXT_NODE&&a.textContent?.trim());i?i.textContent=o:r.textContent=o}j&&(o.trim().length===0?r.setAttribute(P,\"true\"):r.removeAttribute(P))}}__name(ie,\"applyDomFieldValue\");function He(t){if(!Array.isArray(t)||t.length===0)return;let e=Ne();for(const n of t){if(!n||typeof n.path!=\"string\"||!n.path.trim())continue;const r=Fe(n.path);r.length!==0&&(e=De(e,r,n.value),ie(n.path,n.value))}ne(e),re(),It()}__name(He,\"publishContentPatches\");function Ve(t){ne(t),re(),It()}__name(Ve,\"publishContentOnly\");function qe(t,e){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(t)||!e||typeof e!=\"object\"||Array.isArray(e))return;const n=v&&typeof v==\"object\"&&!Array.isArray(v)?v:{},r=n.template&&typeof n.template==\"object\"&&!Array.isArray(n.template)?n.template:{},o=r.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:{},i=(o.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:r.theme&&typeof r.theme==\"object\"&&!Array.isArray(r.theme)?r.theme:{})||{},a=i.elementStyles&&typeof i.elementStyles==\"object\"&&!Array.isArray(i.elementStyles)?i.elementStyles:{},l={...i,designCustomizationVersion:1,elementStyles:{...a,[t]:e}},f={...r,theme:l,structure:{...o,theme:l}},p={...n,template:f};v=p,wt(p),Ge(t,e),It()}__name(qe,\"publishElementStylePatch\");function Ge(t,e){if(!t||!e||typeof e!=\"object\"||Array.isArray(e))return;const n=e;let r=[];if(t.includes(\":\")){const[i,a]=t.split(\":\");a===\"card\"?r=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(i)}\"] [data-preview-item-path], [data-preview-list-path=\"${CSS.escape(i)}\"] .card, [data-preview-list-path=\"${CSS.escape(i)}\"] article`)):a&&(r=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(i)}\"] [data-preview-field-path$=\".${CSS.escape(a)}\"], [data-preview-list-path=\"${CSS.escape(i)}\"] [data-field-path$=\".${CSS.escape(a)}\"]`)))}else r=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [data-preview-item-path=\"${CSS.escape(t)}\"], [data-preview-style-target=\"${CSS.escape(t)}\"], [data-field-path=\"${CSS.escape(t)}\"], [data-content-path=\"${CSS.escape(t)}\"]`));const o=__name(i=>i==null||i===\"\"?\"\":typeof i==\"number\"?`${i}px`:String(i),\"toCssVal\");for(const i of r){if(n.color&&(i.style.setProperty(\"color\",String(n.color),\"important\"),i.style.setProperty(\"--deneb-color\",String(n.color))),n.textAlign&&(i.style.setProperty(\"text-align\",String(n.textAlign),\"important\"),i.style.setProperty(\"--deneb-text-align\",String(n.textAlign))),n.fontSize){const a=o(n.fontSize);i.style.setProperty(\"font-size\",a,\"important\"),i.style.setProperty(\"--deneb-font-size\",a)}if(n.fontFamily&&(i.style.setProperty(\"font-family\",String(n.fontFamily),\"important\"),i.style.setProperty(\"--deneb-font-family\",String(n.fontFamily))),n.lineHeight&&(i.style.setProperty(\"line-height\",String(n.lineHeight),\"important\"),i.style.setProperty(\"--deneb-line-height\",String(n.lineHeight))),n.fontWeight&&(i.style.setProperty(\"font-weight\",String(n.fontWeight),\"important\"),i.style.setProperty(\"--deneb-font-weight\",String(n.fontWeight))),n.backgroundColor&&(i.style.setProperty(\"background-color\",String(n.backgroundColor),\"important\"),i.style.setProperty(\"background\",String(n.backgroundColor),\"important\"),i.style.setProperty(\"--deneb-card-bg\",String(n.backgroundColor))),n.borderRadius){const a=o(n.borderRadius);i.style.setProperty(\"border-radius\",a,\"important\"),i.style.setProperty(\"--deneb-card-radius\",a)}if(n.padding){const a=o(n.padding);i.style.setProperty(\"padding\",a,\"important\"),i.style.setProperty(\"--deneb-card-pt\",a)}if(n.boxShadow&&(i.style.setProperty(\"box-shadow\",String(n.boxShadow),\"important\"),i.style.setProperty(\"--deneb-card-shadow\",String(n.boxShadow))),n.borderColor&&(i.style.setProperty(\"border-color\",String(n.borderColor),\"important\"),i.style.setProperty(\"--deneb-card-border-c\",String(n.borderColor))),n.borderWidth){const a=o(n.borderWidth);i.style.setProperty(\"border-width\",a,\"important\"),i.style.setProperty(\"border-style\",\"solid\",\"important\"),i.style.setProperty(\"--deneb-card-border-w\",a)}n.marginTop&&i.style.setProperty(\"margin-top\",o(n.marginTop),\"important\"),n.marginBottom&&i.style.setProperty(\"margin-bottom\",o(n.marginBottom),\"important\"),n.marginLeft&&i.style.setProperty(\"margin-left\",o(n.marginLeft),\"important\"),n.marginRight&&i.style.setProperty(\"margin-right\",o(n.marginRight),\"important\")}}__name(Ge,\"applyElementStyleDirectly\");function _t(t,e){if(e?.contentOnly){const n=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null;Ve(n?.content??t);return}if(ct!==null&&(window.clearTimeout(ct),ct=null),lt!==null&&(window.clearTimeout(lt),lt=null),Xt){Tt=t,Zt=e;return}Xt=!0;try{if(vt(t,{immediate:e?.persistImmediate}),oe(t),wt(t,{colorReplacements:e?.colorReplacements===!0}),Pt(t,{fanOut:e?.fanOut===!0}),e?.scheduleRelays!==!1){Me();for(const n of Tn)Qt.push(window.setTimeout(()=>{v!=null&&Pt(v,{fanOut:!0})},n))}}finally{if(Xt=!1,Tt!=null){const n=Tt,r=Zt;Tt=null,Zt=void 0,window.setTimeout(()=>{_t(n,r)},0)}}}__name(_t,\"publishSiteData\");function Be(t){const e=t?.full!==!1,n=\"ontouchstart\"in window||navigator.maxTouchPoints>0||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4;window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{try{W({type:Z,full:e}),W({type:at,full:e})}catch{}const r=v;if(r==null)return;const o=__name(()=>wt(r,{colorReplacements:!0}),\"run\");if(!n){window.setTimeout(o,0);return}const i=window.requestIdleCallback;typeof i==\"function\"?i(o,{timeout:4e3}):window.setTimeout(o,1200)})})}__name(Be,\"acknowledgeSiteDataApplied\");const Rn=(()=>{try{return window.location.ancestorOrigins?.item(0)??null}catch{return null}})(),$n=(()=>{try{return window.parent!==window?window.parent.location.origin:null}catch{return null}})();let dt=I({currentOrigin:window.location.origin,referrer:document.referrer,rememberedOrigin:te(),ancestorOrigin:Rn,accessibleParentOrigin:$n});ee(dt);function We(t){if(t.source!==window.parent)return!1;if(dt)return t.origin===dt;try{const e=new URL(t.origin).origin;return e===\"null\"?!1:(dt=e,ee(e),!0)}catch{return!1}}__name(We,\"isTrustedParentMessage\");function W(t){window.parent.postMessage(t,dt??\"*\")}__name(W,\"postToParent\");function mt(t,e,n=0){t.requestId&&(W({type:R,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}),W({type:T,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}))}__name(mt,\"postFocusResult\");function bt(){try{W({type:N,pathname:window.location.pathname}),W({type:X,pathname:window.location.pathname})}catch{}}__name(bt,\"announceReady\");async function je(t){const e=++_e,r=(t&&typeof t==\"object\"&&!Array.isArray(t)?t:null)?.colorReplacements,o=document.getElementById(ve);if(!r||typeof r!=\"object\"||Array.isArray(r)||Object.keys(r).length===0){o?.remove();return}const i=Array.from(document.querySelectorAll('link[rel=\"stylesheet\"][href]')),a=await Promise.all(i.map(async p=>{const g=p.href;let A=Ie.get(g);if(A===void 0){const w=await fetch(g,{credentials:\"same-origin\"});if(!w.ok)return\"\";A=await w.text(),Ie.set(g,A)}const b=_(A,r);return b===A?\"\":b}));if(e!==_e)return;const l=a.filter(Boolean).join(`\n`);if(!l){o?.remove();return}const f=o instanceof HTMLStyleElement?o:document.createElement(\"style\");f.id=ve,f.textContent=l,f.isConnected||document.head.appendChild(f)}__name(je,\"applyTemplateColorReplacements\");function wt(t,e){const n=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,r=n?.template&&typeof n.template==\"object\"&&!Array.isArray(n.template)?n.template:null,o=r?.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:null,i=o?.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:r?.theme&&typeof r.theme==\"object\"&&!Array.isArray(r.theme)?r.theme:null,a=(()=>{try{return JSON.stringify(i??null)}catch{return String(Date.now())}})();if(a!==Re){Re=a;const f=O(i),p=document.getElementById(C);if(!f)p?.remove();else{const g=p instanceof HTMLStyleElement?p:document.createElement(\"style\");g.id=C,g.textContent=f,g.isConnected||document.head.appendChild(g)}}if(e?.colorReplacements){if(a===$e)return;$e=a,je(i).catch(()=>{})}}__name(wt,\"applyUniversalTheme\");function oe(t){const e=ke(t);e!==Oe&&(Oe=e,H(t,document),window.setTimeout(()=>H(t,document),300))}__name(oe,\"applySelectedPages\");function x(t){return String(t??\"\").trim().replace(/\\s+/g,\" \").toLowerCase()}__name(x,\"normalizeText\");function Rt(t){const e=String(t??\"\").trim();if(!e)return[];const n=e.split(/[,;|\\n\\r]+/).map(r=>x(r)).filter(r=>r.length>=3);return Array.from(new Set([x(e),...n])).filter(r=>r.length>=2)}__name(Rt,\"valueFragments\");function $t(t,e){const n=x(e),r=x(t);return/image|photo|logo|banner|thumbnail|cover/.test(n)||/^(https?:|data:|blob:|\\/)/.test(r)}__name($t,\"isImageValue\");function Ue(t){const e=new Set,n=t.getAttribute(\"src\")||\"\";n&&e.add(n),\"src\"in t&&t.src&&e.add(t.src),\"currentSrc\"in t&&t.currentSrc&&e.add(t.currentSrc);const r=t.getAttribute(\"srcset\");r&&r.split(\",\").forEach(o=>{const i=o.trim().split(/\\s+/)[0];i&&e.add(i)});for(const o of[\"data-src\",\"data-original\",\"data-fallback\",\"data-nimg\",\"data-image\",\"data-url\"]){const i=t.getAttribute(o);i&&i!==\"1\"&&e.add(i)}if(t.style.backgroundImage){const o=t.style.backgroundImage.match(/url\\([\"']?([^\"']+)[\"']?\\)/i);o?.[1]&&e.add(o[1])}for(const o of Array.from(e))try{const a=new URL(o,window.location.href).searchParams.get(\"url\");if(a){e.add(a);try{e.add(decodeURIComponent(a))}catch{}}}catch{}return Array.from(e).filter(Boolean)}__name(Ue,\"extractImageCandidates\");function ae(t,e){const n=String(e??\"\").trim();if(!n)return!1;const r=Ue(t);if(r.length===0)return!1;const i=n.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();for(const a of r){if(a===n)return!0;try{if(new URL(a,window.location.href).href===new URL(n,window.location.href).href)return!0}catch{}if(a.includes(n)||n.includes(a))return!0;try{const p=decodeURIComponent(a);if(p.includes(n)||n.includes(p))return!0}catch{}const f=a.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();if(f&&i&&f.length>=3&&f===i)return!0}return!1}__name(ae,\"imageMatchesValue\");function se(t,e){return Array.from(t.querySelectorAll(\"img\")).filter(n=>ae(n,e))}__name(se,\"findImageMatches\");function Ot(t,e){const n=String(e??\"\").trim();return n?[t.getAttribute(\"href\"),t.getAttribute(\"src\"),t.getAttribute(\"poster\"),t.getAttribute(\"srcset\"),t.style.backgroundImage].filter(o=>!!o).some(o=>{if(o===n||o.includes(n))return!0;try{return new URL(o,window.location.href).href===new URL(n,window.location.href).href}catch{return!1}}):!1}__name(Ot,\"attributeMatchesValue\");function Mt(t,e){return Array.from(t.querySelectorAll('a[href], img[src], source[src], video[poster], [style*=\"background-image\"]')).filter(n=>Ot(n,e))}__name(Mt,\"findAttributeMatches\");function ze(t,e){const n=Rt(e);if(n.length===0)return[];const r=Array.from(t.querySelectorAll(_n)),o=r.filter(i=>{const a=x(i.textContent);return n.some(l=>a===l)});return o.length>0?o:r.filter(i=>{const a=x(i.textContent);return n.some(l=>a.includes(l)||l.includes(a))})}__name(ze,\"findTextMatches\");function Lt(t,e,n){if($t(e,n)){const r=se(t,e);if(r.length>0)return r}return ze(t,e)}__name(Lt,\"findValueMatches\");function Ke(t,e,n){if($t(e,n)&&se(t,e).length>0)return!0;const r=x(t.textContent);return Rt(e).some(o=>r.includes(o))}__name(Ke,\"subtreeContainsValue\");function Ye(t,e){const n=t[0];if(!n)return null;let r=n;for(;r;){if(t.every(o=>r?.contains(o)))return r;if(r===e)break;r=r.parentElement}return e??n}__name(Ye,\"lowestCommonAncestor\");function ut(t){const e=String(t??\"\").trim();if(!e)return[];const n=e.replace(/\\[(\\d+)\\]/g,\".$1\"),r=n.replace(/\\.(\\d+)(?=\\.|$)/g,\"[$1]\");return Array.from(new Set([e,n,r]))}__name(ut,\"pathVariants\");function ce(t){return Array.from(new Set([t.fieldPath,...t.fieldPaths??[]].filter(e=>!!(e&&e.trim())).flatMap(e=>ut(e))))}__name(ce,\"focusPathCandidates\");function At(t){if(t.closest(\"[hidden]\"))return!1;let e=t;for(;e&&e!==document.documentElement;){const r=window.getComputedStyle(e);if(r.display===\"none\"||r.visibility===\"hidden\"||Number(r.opacity)===0||r.maxHeight===\"0px\"||r.maxHeight===\"0\")return!1;const o=e.getBoundingClientRect();if((r.overflow===\"hidden\"||r.overflow===\"clip\")&&(o.width<2||o.height<2))return!1;e=e.parentElement}const n=t.getBoundingClientRect();return n.width>=2&&n.height>=2}__name(At,\"isVisuallyHighlightable\");function le(t){let e=0;At(t)&&(e+=100);const n=x(t.textContent);n.length>=2&&(e+=40),t.tagName===\"IMG\"&&(e+=35),t.closest(\"main, footer, header, [data-preview-page-key]\")&&(e+=20),t.closest('.fixed, [class*=\"fixed\"]')&&n.length<2&&t.tagName!==\"IMG\"&&(e-=25);const r=t.getBoundingClientRect();return e+=Math.min(15,Math.floor(r.width*r.height/400)),e}__name(le,\"highlightTargetScore\");function de(t){return[...t].sort((e,n)=>le(n)-le(e))}__name(de,\"rankHighlightTargets\");function Je(t,e){const n=[],r=Array.from(new Set([t,...e??[]].filter(a=>!!a).flatMap(a=>ut(a))));for(const a of r){const l=CSS.escape(a);document.querySelectorAll('[data-preview-field-path=\"'+l+'\"], [data-preview-list-path=\"'+l+'\"], [data-content-path=\"'+l+'\"]').forEach(f=>{n.includes(f)||n.push(f)})}const o=de(n.filter(a=>At(a))),i=o.filter(a=>!o.some(l=>l!==a&&a.contains(l)));return i.length>0?i:o}__name(Je,\"findExplicitTargets\");function ue(t){const e=(t?.itemValues??[]).filter(i=>x(i.value).length>=2&&i.key!==\"id\");if(e.length===0)return null;const n=[];for(const i of e)for(const a of Lt(document,i.value,i.key).slice(0,8))n.includes(a)||n.push(a);let r=null;for(const i of n){let a=i,l=0;for(;a&&a!==document.body&&l<12;){const f=e.reduce((A,b)=>A+(Ke(a,b.value,b.key)?1:0),0),p=a.getBoundingClientRect(),g=Math.max(1,p.width*p.height);(!r||f>r.score||f===r.score&&g<r.area)&&(r={target:a,score:f,area:g}),a=a.parentElement,l+=1}}const o=Math.min(2,e.length);return r&&r.score>=o?r.target:null}__name(ue,\"findItemContainer\");function kt(t,e,n){const r=Lt(t,e,n);if(r.length===0)return null;const o=Rt(e);if(o.length>1&&!$t(e,n)){const i=r.filter(a=>{const l=x(a.textContent);return o.slice(1).some(f=>l===f)});if(i.length>1)return Ye(i,t instanceof HTMLElement?t:null)}return r.sort((i,a)=>x(i.textContent).length-x(a.textContent).length)[0]}__name(kt,\"findFieldTarget\");function Ft(t,e){const n=String(t??e??\"\").trim().toLowerCase().replace(/\\s+/g,\"_\");return!n||n===\"common\"?\"home\":n===\"about\"?\"about_us\":n}__name(Ft,\"normalizePageKey\");function Xe(t){const e=t.replace(/_us$/,\"\"),n=['[data-preview-page-key=\"'+CSS.escape(t)+'\"]','[data-preview-page-key=\"'+CSS.escape(e)+'\"]',\"#\"+CSS.escape(t)+\"_view\",\"#\"+CSS.escape(e)+\"_view\",\"#\"+CSS.escape(t),\"#\"+CSS.escape(e),\"main\",\"body\"];for(const r of n){const o=document.querySelector(r);if(o instanceof HTMLElement)return o}return null}__name(Xe,\"findPageTarget\");function fe(t,e){const n=window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/),r=String(e??\"\").trim(),o=r?\"/\"+r.replace(/^\\/+|\\/+$/g,\"\"):null,i=o!==null?o===\"/\"?\"\":o:t===\"home\"?\"\":\"/\"+t.replace(/^\\/+/,\"\");return n?n[1]+i:i||\"/\"}__name(fe,\"resolvePath\");function pe(){for(const t of Jt)t.target.style.outline=t.outline,t.target.style.outlineOffset=t.outlineOffset,t.target.style.boxShadow=t.boxShadow,t.target.style.transition=t.transition,t.target.style.scrollMarginTop=t.scrollMarginTop,t.target.style.borderRadius=t.borderRadius,t.target.removeAttribute(G);Jt=[]}__name(pe,\"clearHighlight\");function Dt(t,e){pe(),Jt=t.map(n=>({target:n,outline:n.style.outline,outlineOffset:n.style.outlineOffset,boxShadow:n.style.boxShadow,transition:n.style.transition,scrollMarginTop:n.style.scrollMarginTop,borderRadius:n.style.borderRadius}));for(const n of t)n.setAttribute(G,\"true\"),n.style.scrollMarginTop=\"72px\",n.style.transition=\"outline-color 0.2s ease, box-shadow 0.2s ease\",n.style.outline=\"2px solid rgba(34, 197, 94, 0.98)\",n.style.outlineOffset=\"4px\",n.style.boxShadow=\"0 0 0 7px rgba(34, 197, 94, 0.2)\",n.style.borderRadius||(n.style.borderRadius=\"4px\");t[0]?.scrollIntoView({behavior:\"smooth\",block:e?\"start\":\"center\",inline:\"nearest\"})}__name(Dt,\"highlightTargets\");function Ze(t,e){Dt([t],e)}__name(Ze,\"highlight\");function Nt(t){return Array.from(new Set([t.fieldValue,...t.fieldMatchValues??[]].filter(e=>typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"&&e.trim().length>0).map(e=>String(e))))}__name(Nt,\"focusMatchValues\");function Qe(t){const e=ce(t);if(e.length===0)return null;try{const n=JSON.parse(window.sessionStorage.getItem(Y)??\"{}\");for(const r of e){const o=n[`${window.location.pathname}|${r}`];if(!o)continue;const i=document.querySelector(o);if(!i)continue;const a=Nt(t).map(x),l=x(i.textContent);if(!(a.length>0&&l&&!a.some(f=>l===f||l.includes(f)||Ot(i,f))))return i}return null}catch{return null}}__name(Qe,\"findRememberedFocusTarget\");function St(t){if(!t)return null;if(At(t))return t;let e=t.parentElement;for(;e&&e!==document.body;){if(At(e))return e;e=e.parentElement}return null}__name(St,\"pickVisibleHeuristicTarget\");function ge(t){const e=ce(t),n=Je(t.fieldPath,e.filter(a=>a!==t.fieldPath));if(n.length>0)return{targets:n,result:\"exact\"};const r=St(Qe(t));if(r)return{targets:[r],result:\"heuristic\"};const o=ue(t.fieldContext),i=t.fieldContext?.fieldKey;if(o){for(const l of Nt(t)){const f=St(Mt(o,l)[0]??kt(o,l,i));if(f)return{targets:[f],result:\"heuristic\"}}const a=St(o);if(a)return{targets:[a],result:\"heuristic\"}}for(const a of Nt(t)){const l=Mt(document,a),f=kt(document,a,i),p=f?[...l,f]:l,g=de(p.map(A=>St(A)).filter(A=>!!A));if(g.length>0)return{targets:[g[0]],result:\"heuristic\"}}return null}__name(ge,\"resolveFieldTarget\");function me(){document.documentElement.dataset.fivoraPreview=\"true\",document.querySelectorAll(\".reveal-on-scroll:not(.reveal-active)\").forEach(t=>t.classList.add(\"reveal-active\"))}__name(me,\"activateRevealNodes\");function ft(t,e=0){me();const n=!!t.fieldPath;if(t.focusOnly&&n){const a=ge(t);if(a){Dt(a.targets,!1),mt(t,a.result,a.targets.length);return}if(e<12){window.setTimeout(()=>ft(t,e+1),120);return}mt(t,\"missing\");return}const r=Ft(t.pageKey,t.pageLabel),o=Xe(r);if(!o){e<12?window.setTimeout(()=>ft(t,e+1),120):mt(t,\"missing\");return}const i=n?ge(t):null;if(n&&!i&&e<12){window.setTimeout(()=>ft(t,e+1),120);return}i?(Dt(i.targets,!1),mt(t,i.result,i.targets.length)):(Ze(o,!0),mt(t,\"page\",1))}__name(ft,\"applyFocus\");function tn(t){if(t.focusOnly){gt(),window.setTimeout(()=>ft(t),80);return}const e=Ft(t.pageKey,t.pageLabel),n=fe(e,t.pageRoute);if((window.location.pathname.replace(/\\/+$/,\"\")||\"/\")!==n){try{window.sessionStorage.setItem(ot,JSON.stringify({...t,awaitingNavigation:!0}))}catch{}window.location.assign(n);return}gt(),window.setTimeout(()=>ft(t),80)}__name(tn,\"handleFocus\");function he(t){return x(t).replace(/\\.html$/i,\"\").replace(/[^a-z0-9]+/g,\"-\")}__name(he,\"normalizeRouteToken\");function en(){const t=window.location.pathname.split(\"/\").map(i=>decodeURIComponent(i).trim()).filter(Boolean);if(t.length<2||q.length===0)return;const e=q.filter(i=>{const a=i.context;if(!a?.collectionPath||!a.fieldKey)return!1;const l=a.collectionPath.split(\".\").at(-1)??\"\",f=t.lastIndexOf(l);if(f<0||f>=t.length-1)return!1;const p=he(t.at(-1)??\"\");return a.itemValues.some(({key:g,value:A})=>{const b=x(g).replace(/[^a-z0-9]/g,\"\");return b!==\"id\"&&!b.endsWith(\"id\")&&b!==\"slug\"&&b!==\"name\"&&b!==\"title\"?!1:he(A)===p})});if(e.length===0)return;const n=Array.from(document.querySelectorAll(`[${U}]`)),r=[];for(const i of e){const a=i.context,l=a.fieldKey,f=x(l).replace(/[^a-z0-9]/g,\"\");if(f===\"slug\"||f===\"identifier\"||f.endsWith(\"id\"))continue;const p=a.collectionPath.split(\".\").at(-1)??\"\",g=x(p).replace(/s$/,\"\"),A=l.replace(/([a-z0-9])([A-Z])/g,\"$1 $2\").split(/[^a-z0-9]+/i).map(x).filter(w=>w&&![\"url\",\"text\",\"value\"].includes(w)),b=x(i.value);for(const w of n){const L=x(w.getAttribute(U));if(!L||!L.includes(g))continue;let K=0;const Wt=A.filter(et=>L.includes(et));Wt.length>0&&(K+=40+Wt.length*5);const jt=w.tagName===\"IMG\"?x(w.getAttribute(\"src\")??w.getAttribute(\"alt\")):x(w.textContent);b&&jt===b?K+=120:b.length>=3&&jt.includes(b)&&(K+=80),/image|photo|logo|banner|thumbnail|cover/i.test(l)&&w.tagName===\"IMG\"&&L.includes(\"image\")&&(K+=120),K>=40&&r.push({element:w,field:i,score:K})}}r.sort((i,a)=>a.score-i.score);const o=new Set;for(const{element:i,field:a}of r)if(!o.has(i)){if(o.add(i),i.tagName!==\"IMG\"){const l=i.textContent??\"\",f=String(a.value??\"\"),p=l.toLowerCase().indexOf(f.toLowerCase());f&&p>=0&&l!==f&&(i.setAttribute(\"data-fivora-value-prefix\",l.slice(0,p)),i.setAttribute(\"data-fivora-value-suffix\",l.slice(p+f.length)))}i.removeAttribute(U),i.setAttribute(\"data-preview-field-path\",a.path),ie(a.path,a.value)}}__name(en,\"promoteActiveRouteDetailFields\");const On=\"FIVORA_PREVIEW_ELEMENT_CLICKED\",Mn=c(\"ELEMENT_CLICKED\"),Ln=\"FIVORA_PREVIEW_FIELD_CHANGED\",kn=c(\"FIELD_CHANGED\"),Fn=\"FIVORA_PREVIEW_EDIT_MODE\",Dn=c(\"EDIT_MODE\"),Nn=\"FIVORA_PREVIEW_FLUSH_EDIT\",Hn=c(\"FLUSH_EDIT\"),Vn=\"FIVORA_PREVIEW_EDIT_FLUSHED\",qn=c(\"EDIT_FLUSHED\"),Gn=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small, img\",Ht=\"ontouchstart\"in window||navigator.maxTouchPoints>0||window.matchMedia&&window.matchMedia(\"(pointer: coarse)\").matches,Jn=(()=>{const t=navigator.userAgent||\"\",e=navigator.vendor||\"\";if(/iP(ad|hone|od)/i.test(t)||/Safari/i.test(t)&&/Apple Computer/i.test(e)&&!/Chrom(e|ium)/i.test(t))return!0;try{return!!window.safari}catch{return!1}})(),Bn=(()=>{try{const t=document.createElement(\"div\");return t.setAttribute(\"contenteditable\",\"plaintext-only\"),t.contentEditable===\"plaintext-only\"}catch{return!1}})(),Wn=Ht||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4||typeof navigator.deviceMemory==\"number\"&&(navigator.deviceMemory??8)<=4,jn=!0;let q=[];window.addEventListener(\"message\",t=>{if(!We(t)||t.data&&typeof t.data==\"object\"&&t.data.__fivoraBridgeRelay===!0)return;if(t.data?.type===k||t.data?.type===$){t.stopImmediatePropagation(),tn(t.data);return}if((t.data?.type===y||t.data?.type===M)&&t.data.siteData){const a=t.data.full!==!1;if(t.data.contentOnly===!0){_t(t.data.siteData,{contentOnly:!0});return}_t(t.data.siteData,{fanOut:!1,colorReplacements:!1}),Be({full:a});return}if(t.data?.type===En||t.data?.type===xn){const a=t.data.patches;Array.isArray(a)&&He(a);return}if(t.data?.type===Cn||t.data?.type===\"DENEB_PREVIEW_STYLE_PATCH\"){const a=t.data,l=typeof a.fieldPath==\"string\"?a.fieldPath:typeof a.targetPath==\"string\"?a.targetPath:\"\",f=a.styles??a.properties;l&&f&&qe(l,f);return}if(t.data?.type===Fn||t.data?.type===Dn){q=Array.isArray(t.data.fields)?t.data.fields:[],en(),t.data.editMode?(yn(),window.setTimeout(()=>we(),50)):bn();return}(t.data?.type===Nn||t.data?.type===Hn)&&(pt(!0),W({type:Vn,requestId:t.data.requestId}),W({type:qn,requestId:t.data.requestId}))},!0);try{const t=JSON.parse(window.sessionStorage.getItem(ot)??\"null\");if(t?.awaitingNavigation){const e=Ft(t.pageKey,t.pageLabel),n=fe(e,t.pageRoute),r=window.location.pathname.replace(/\\/+$/,\"\")||\"/\";gt(),r===n&&window.setTimeout(()=>ft(t),220)}else t&&gt()}catch{gt()}try{const t=JSON.parse(window.sessionStorage.getItem(S)??window.sessionStorage.getItem(z)??\"null\");if(t){v=t;try{window[d]=t,window[m]=t}catch{}Wn||(oe(t),wt(t,{colorReplacements:!1}))}}catch{}let j=!1,Q=null,nt=null,Vt=null,J=null,Et=[],rt=null;function ye(){if(document.querySelector(\"[data-fivora-empty-editable-styles]\"))return;const t=document.createElement(\"style\");t.setAttribute(\"data-fivora-empty-editable-styles\",\"true\"),t.textContent=`\n [${P}=\"true\"] {\n min-width: 7rem !important;\n min-height: 1.25em !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n span[${P}=\"true\"],\n a[${P}=\"true\"],\n strong[${P}=\"true\"],\n em[${P}=\"true\"],\n small[${P}=\"true\"],\n label[${P}=\"true\"] {\n display: inline-block !important;\n }\n [${P}=\"true\"]:empty::before {\n content: \"\";\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${P}=\"true\"]:empty:hover::before {\n content: \"Click to add text\";\n }\n [${V}=\"true\"] {\n min-width: 10rem !important;\n min-height: 3.5rem !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n [${V}=\"true\"]:empty::before {\n content: \"\";\n display: inline-flex;\n align-items: center;\n min-height: 3.5rem;\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${V}=\"true\"]:empty:hover::before {\n content: \"Click to add the first item\";\n }\n `,document.head.appendChild(t)}__name(ye,\"ensureEmptyEditableStyles\");function nn(t){if(t.id)return\"#\"+CSS.escape(t.id);const e=[];let n=t;for(;n&&n!==document.body;){const r=n.tagName.toLowerCase(),o=n.parentElement?Array.from(n.parentElement.children).filter(a=>a.tagName===n?.tagName):[],i=o.indexOf(n)+1;e.unshift(o.length>1?`${r}:nth-of-type(${i})`:r),n=n.parentElement}return e.length>0?`body > ${e.join(\" > \")}`:\"\"}__name(nn,\"buildStructuralSelector\");function qt(){try{const t=JSON.parse(window.sessionStorage.getItem(Y)??\"{}\");return t&&typeof t==\"object\"?t:{}}catch{return{}}}__name(qt,\"readResolvedTargetSelectors\");function rn(t,e){const n=nn(t);if(!n)return;const r=qt();r[`${window.location.pathname}|${e}`]=n;try{window.sessionStorage.setItem(Y,JSON.stringify(r))}catch{}}__name(rn,\"rememberResolvedTarget\");function Un(){const t=qt(),e=`${window.location.pathname}|`;let n=!1;for(const r of Object.keys(t))r.startsWith(e)&&(delete t[r],n=!0);if(n)try{window.sessionStorage.setItem(Y,JSON.stringify(t))}catch{}}__name(Un,\"forgetResolvedTargetsForCurrentPage\");function be(){document.querySelectorAll(`[${F}]`).forEach(t=>{J?.target!==t&&(t.removeAttribute(F),t.removeAttribute(P),t.removeAttribute(V))})}__name(be,\"clearResolvedEditableTargets\");function ht(t,e,n=!0){const r=t.getAttribute(F),o=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(B)??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\");if(r&&r!==e.path&&o!==e.path)return!1;t.setAttribute(F,e.path);const i=String(e.value??\"\").trim().length===0&&x(t.textContent).length===0;j&&i&&t.tagName!==\"IMG\"?t.setAttribute(P,\"true\"):t.removeAttribute(P);const a=e.kind===\"collection\"||e.type===\"list\",l=e.collection?.length;return j&&a&&(l===0||t.childElementCount===0)?(t.setAttribute(V,\"true\"),t.removeAttribute(P)):t.removeAttribute(V),n&&!a&&rn(t,e.path),!0}__name(ht,\"annotateEditableTarget\");function tt(t){const e=[t.value,...t.matchValues??[]].filter(n=>typeof n==\"number\"||typeof n==\"string\"&&n.trim().length>0);return Array.from(new Set(e.map(n=>String(n))))}__name(tt,\"editableFieldMatchValues\");function on(t){for(const e of ut(t)){const n=CSS.escape(e),r=document.querySelector(`[data-preview-field-path=\"${n}\"], [${B}=\"${n}\"], [data-content-path=\"${n}\"], [data-field-path=\"${n}\"], [${F}=\"${n}\"]`);if(r)return r}return null}__name(on,\"findExplicitEditableTarget\");function an(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const n=qt()[`${window.location.pathname}|${t.path}`];if(!n)return null;try{const r=document.querySelector(n);if(!r)return null;const o=tt(t).map(x),i=x(r.textContent);return o.length>0&&i&&!o.includes(i)?null:(ht(r,t,!1),r)}catch{return null}}__name(an,\"restoreRememberedTarget\");function sn(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const n=(t.context?ue({collectionPath:t.context.collectionPath,itemIndex:t.context.itemIndex,fieldKey:t.context.fieldKey,itemValues:t.context.itemValues}):null)??document;for(const r of tt(t)){const o=kt(n,r,t.context?.fieldKey),i=[...Mt(n,r),...o?[o]:[],...Lt(n,r,t.context?.fieldKey)];for(const a of i){if(a.closest(`[${U}]`))continue;const l=a.getAttribute(F);if(!l||l===t.path)return a}}return null}__name(sn,\"inferEditableTarget\");function cn(t){if(j){ye(),me();for(const e of q){const n=on(e.path)??an(e)??(t?.explicitOnly?null:sn(e));n&&ht(n,e)}}}__name(cn,\"indexEditableTargets\");let Gt=!1;function we(){for(const e of Et)window.clearTimeout(e);if(Et=[],rt!==null){const e=window.cancelIdleCallback;typeof e==\"function\"?e(rt):window.clearTimeout(rt),rt=null}if(Gt)return;Gt=!0;const t=__name((e,n)=>{n&&(Gt=!1),e&&be(),cn({explicitOnly:e})},\"runPass\");Et=[window.setTimeout(()=>{t(!0,!0)},0)]}__name(we,\"scheduleEditableTargetIndex\");function ln(){const t=document.createElement(\"div\");return t.setAttribute(\"data-fivora-edit-badge\",\"true\"),t.innerHTML=\"\\u270F\\uFE0F\",Object.assign(t.style,{position:\"fixed\",zIndex:\"2147483647\",width:\"28px\",height:\"28px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"14px\",borderRadius:\"8px\",background:\"rgba(37, 99, 235, 0.92)\",color:\"#fff\",cursor:\"pointer\",pointerEvents:\"auto\",boxShadow:\"0 2px 8px rgba(0,0,0,0.18)\",opacity:\"0\",transition:\"opacity 0.15s ease\",userSelect:\"none\"}),t.setAttribute(\"title\",\"Edit this content\"),t.setAttribute(\"aria-label\",\"Edit this content\"),document.body.appendChild(t),t}__name(ln,\"createHoverBadge\");function dn(t){if(!Q)return;const e=t.getBoundingClientRect();Q.style.top=`${Math.max(4,e.top-4)}px`,Q.style.left=`${Math.min(window.innerWidth-36,e.right-32)}px`,Q.style.opacity=\"1\"}__name(dn,\"positionBadge\");function xt(){Vt&&(Vt(),Vt=null),Q&&(Q.style.opacity=\"0\"),nt=null}__name(xt,\"clearHoverOverlay\");function un(t){if(t===nt)return;xt(),nt=t;const e=t.style.outline,n=t.style.outlineOffset,r=t.style.cursor;t.style.outline=\"2px dashed rgba(37, 99, 235, 0.6)\",t.style.outlineOffset=\"2px\",t.style.cursor=\"pointer\",Vt=__name(()=>{t.style.outline=e,t.style.outlineOffset=n,t.style.cursor=r},\"hoverOutlineCleanup\"),dn(t)}__name(un,\"applyHoverOverlay\");function Ae(t){let e=t instanceof Element?t:null;for(;e&&!(e instanceof HTMLElement);)e=e.parentElement;let n=e;for(;n&&n!==document.body;){if(n.hasAttribute(U)){n=n.parentElement;continue}if(n.hasAttribute(\"data-preview-field-path\")||n.hasAttribute(B)||n.hasAttribute(D)||n.hasAttribute(\"data-content-path\")||n.hasAttribute(\"data-field-path\")||n.hasAttribute(F)||n.matches(Gn)){const o=Bt(n);if(o)return{element:n,field:o}}n=n.parentElement}return null}__name(Ae,\"findEditableTarget\");function Bt(t){if(t.closest(`[${U}]`))return null;const e=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\")??t.getAttribute(F);if(e)return q.find(g=>ut(g.path).includes(e))??{path:e,label:e.split(\".\").pop()??\"Content\",type:t.tagName===\"IMG\"?\"image\":\"text\",value:t.tagName===\"IMG\"?t.src:t.textContent?.trim()??\"\"};const n=t.getAttribute(D);if(n){const p=n.match(/^(.+)\\[(\\d+)\\]$/);if(p){const g=p[1],A=Number(p[2]),b=q.find(w=>(w.kind===\"collection\"||w.type===\"list\")&&ut(w.path).includes(g));if(b)return{...b,collection:{listPath:g,itemIndex:A,length:b.collection?.length??0,minItems:b.collection?.minItems,maxItems:b.collection?.maxItems,itemLabel:b.collection?.itemLabel}}}}const r=t.getAttribute(B);if(r)return q.find(g=>(g.kind===\"collection\"||g.type===\"list\")&&ut(g.path).includes(r))??{kind:\"collection\",path:r,label:r.split(\".\").pop()??\"Collection\",type:\"list\",value:0,collection:{listPath:r,length:t.children.length}};const o=t.tagName===\"IMG\"?t:t.querySelector(\"img\");if(o){const p=q.find(b=>b.type===\"image\"&&tt(b).some(w=>ae(o,w)));if(p)return p;const g=Se(o);if(g.collectionPath&&typeof g.itemIndex==\"number\"){const b=q.find(w=>w.type===\"image\"&&w.context?.collectionPath===g.collectionPath&&w.context?.itemIndex===g.itemIndex);if(b)return b}const A=o.closest('section, article, [data-preview-page-key], main, header, footer, .card, [class*=\"section\"]');if(A){const b=A.getAttribute(\"data-preview-field-path\")||A.getAttribute(\"data-content-path\")||A.getAttribute(\"data-field-path\")||A.getAttribute(F);if(b){const w=b.split(\".\")[0],L=q.find(K=>K.type===\"image\"&&(K.path.startsWith(`${w}.`)||K.path.startsWith(`${b}.`)));if(L)return L}}if(t.tagName===\"IMG\"){const b=q.filter(L=>L.type===\"image\");if(b.length===1)return b[0];const w=o.getAttribute(\"src\")||o.src||\"\";return{path:e||\"image\",label:(e||\"\").split(\".\").pop()||\"Image\",type:\"image\",value:w}}}const i=q.filter(p=>tt(p).some(g=>Ot(t,g)));if(i.length===1)return i[0];const a=x(t.textContent);if(!a)return null;const l=q.filter(p=>typeof p.value!=\"boolean\"&&tt(p).some(g=>x(g)===a));if(l.length===1)return l[0];const f=q.filter(p=>typeof p.value==\"boolean\"?!1:tt(p).some(g=>{const A=x(g);return A.length>=3&&a.includes(A)})).sort((p,g)=>Math.max(...tt(g).map(A=>x(A).length),0)-Math.max(...tt(p).map(A=>x(A).length),0));return f.length===1?f[0]:null}__name(Bt,\"resolveEditableField\");function fn(t,e){return t.tagName!==\"IMG\"&&t.childElementCount===0&&![\"INPUT\",\"TEXTAREA\",\"SELECT\",\"OPTION\",\"VIDEO\",\"AUDIO\",\"IFRAME\"].includes(t.tagName)&&!e.context&&![\"image\",\"color\",\"boolean\",\"select\",\"list\"].includes(e.type??\"text\")}__name(fn,\"canEditInline\");function pn(t){let e=t;for(;e&&e!==document.body;){const n=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(B)??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(F);if(n)return n;e=e.parentElement}return null}__name(pn,\"extractFieldPath\");function Se(t){let e=t;for(;e&&e!==document.body;){const n=e.getAttribute(D);if(n){const i=n.match(/^(.+)\\[(\\d+)\\]$/);if(i)return{collectionPath:i[1],itemIndex:Number(i[2])}}const r=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(F);if(r){const i=r.match(/^(.+)\\[(\\d+)\\]/);if(i)return{collectionPath:i[1],itemIndex:Number(i[2])}}const o=e.getAttribute(B);if(o)return{collectionPath:o,itemIndex:null};e=e.parentElement}return{collectionPath:null,itemIndex:null}}__name(Se,\"extractCollectionContext\");function Ee(t,e){const n=[],r=new Set(e?.path?[e.path]:[]);let o=t,i=0;for(;o&&o!==document.body&&i<3&&!(o.hasAttribute(U)||i>0&&(o.hasAttribute(D)||o.hasAttribute(B)||o.tagName===\"SECTION\"));){if(o.hasAttribute(\"data-preview-field-path\")||o.hasAttribute(\"data-content-path\")||o.hasAttribute(\"data-field-path\")||o.hasAttribute(F)){const a=Bt(o);a?.path&&a.kind!==\"collection\"&&a.type!==\"list\"&&!r.has(a.path)&&(r.add(a.path),n.push({path:a.path,label:a.label??a.path.split(\".\").pop()??\"Content\",type:a.type??\"text\"}))}o=o.parentElement,i+=1}return n}__name(Ee,\"findRelatedAncestorFields\");function gn(t,e,n=Ee(t,e)){const r=t.getBoundingClientRect(),o=window.getComputedStyle(t),i=t.tagName===\"IMG\",a=e?.path??pn(t),l=i?t.src:t.textContent?.trim()??\"\",f=Se(t);let p=e?.collection?.listPath??e?.collection?.path??e?.context?.collectionPath??f.collectionPath,g=e?.collection?.itemIndex??e?.context?.itemIndex??f.itemIndex;p&&a&&e?.kind!==\"collection\"&&!a.startsWith(`${p}[`)&&!a.startsWith(`${p}.`)&&a!==p&&(p=null,g=null);const A=e?.context?.itemPath??(p&&typeof g==\"number\"?`${p}[${g}]`:null),b=__name(Ct=>String(Ct??\"\").trim().replace(/[^a-zA-Z0-9_.-]+/g,\"-\").replace(/^-+|-+$/g,\"\").slice(0,64),\"safeScopePart\"),w=[],L=__name((Ct,zt,Kt)=>{!zt||w.some(Yt=>Yt.key===zt)||w.push({kind:Ct,key:zt,label:Kt})},\"pushStyleScope\");L(\"element\",a,\"This element\");const K=t.closest(`[${D}]`);L(\"card\",K?.getAttribute(D)??A,\"This card\");const Wt=t.closest(`[${B}]`);L(\"grid\",Wt?.getAttribute(B)??p,\"Entire grid\");const jt=t.closest(\"[data-preview-page-key]\"),Ut=b(jt?.getAttribute(\"data-preview-page-key\")),et=t.closest(\"section,[data-design-section],[data-section-id]\");if(et){const Ct=b(et.getAttribute(\"data-design-section\")??et.getAttribute(\"data-section-id\")??et.id),Kt=(et.parentElement?Array.from(et.parentElement.children).filter(Yn=>Yn.tagName===\"SECTION\"):[]).indexOf(et)+1,Yt=Ct||(Kt>0?`nth-${Kt}`:\"\");L(\"section\",Yt?`section:${Ut||\"all\"}:${Yt}`:null,\"This section\")}L(\"page\",Ut?`page:${Ut}`:null,\"Current page\"),L(\"site\",\"site:all\",\"Whole website\");const Sn={type:On,fieldPath:a,descriptorKind:e?.kind??\"field\",fieldValue:l,elementTag:t.tagName.toLowerCase(),isImage:i,boundingRect:{top:r.top,left:r.left,width:r.width,height:r.height},computedStyle:{fontFamily:o.fontFamily,fontSize:o.fontSize,lineHeight:o.lineHeight,fontWeight:o.fontWeight,letterSpacing:o.letterSpacing,color:o.color,backgroundColor:o.backgroundColor,textAlign:o.textAlign,width:o.width,height:o.height,minWidth:o.minWidth,minHeight:o.minHeight,maxWidth:o.maxWidth,maxHeight:o.maxHeight,marginTop:o.marginTop,marginRight:o.marginRight,marginBottom:o.marginBottom,marginLeft:o.marginLeft,paddingTop:o.paddingTop,paddingRight:o.paddingRight,paddingBottom:o.paddingBottom,paddingLeft:o.paddingLeft,borderRadius:o.borderRadius},listPath:p,itemPath:A,collectionPath:p,itemIndex:g,relatedFields:n,styleScopes:w};W(Sn),W({...Sn,type:Mn})}__name(gn,\"emitClickEvent\");function mn(t,e){W({type:Ln,fieldPath:t,value:e}),W({type:kn,fieldPath:t,value:e})}__name(mn,\"emitFieldChange\");function pt(t){const e=J;if(!e)return;J=null,e.target.removeEventListener(\"keydown\",e.keydown),e.target.removeEventListener(\"blur\",e.blur);const n=t?(e.target.innerText??e.target.textContent??\"\").replace(/\\u00a0/g,\" \").trim():\"\";e.contentEditable===null?e.target.removeAttribute(\"contenteditable\"):e.target.setAttribute(\"contenteditable\",e.contentEditable),e.spellcheck===null?e.target.removeAttribute(\"spellcheck\"):e.target.setAttribute(\"spellcheck\",e.spellcheck),e.target.style.outline=e.outline,e.target.style.outlineOffset=e.outlineOffset,e.target.style.cursor=e.cursor,e.target.style.userSelect=e.userSelect,e.target.style.textTransform=e.textTransform,e.target.innerHTML=e.originalHtml,t&&(n!==e.originalText.trim()?(e.field.value=n,ht(e.target,e.field),mn(e.field.path,n)):n||ht(e.target,e.field))}__name(pt,\"finishInlineEdit\");function hn(t,e,n){if(J?.target===t)return;pt(!0),xt(),ht(t,e),t.removeAttribute(P);const r=typeof e.value==\"string\"||typeof e.value==\"number\"?String(e.value):t.textContent??\"\",o=t.innerHTML,i=__name(l=>{if(l.key===\"Escape\"){l.preventDefault(),pt(!1);return}l.key===\"Enter\"&&e.type!==\"textarea\"&&!l.shiftKey&&(l.preventDefault(),pt(!0))},\"keydown\"),a=__name(()=>pt(!0),\"blur\");if(J={target:t,field:e,originalText:r,originalHtml:o,contentEditable:t.getAttribute(\"contenteditable\"),spellcheck:t.getAttribute(\"spellcheck\"),outline:t.style.outline,outlineOffset:t.style.outlineOffset,cursor:t.style.cursor,userSelect:t.style.userSelect,textTransform:t.style.textTransform,keydown:i,blur:a},t.setAttribute(\"contenteditable\",Bn?\"plaintext-only\":\"true\"),t.setAttribute(\"spellcheck\",\"true\"),t.textContent=r,t.style.outline=\"2px solid rgba(37, 99, 235, 0.95)\",t.style.outlineOffset=\"3px\",t.style.cursor=\"text\",t.style.userSelect=\"text\",t.style.textTransform=\"none\",t.addEventListener(\"keydown\",i),t.addEventListener(\"blur\",a),t.focus(),n){const l=document,f=l.caretPositionFromPoint?.(n.x,n.y),p=f?(()=>{const g=document.createRange();return g.setStart(f.offsetNode,f.offset),g.collapse(!0),g})():l.caretRangeFromPoint?.(n.x,n.y);if(p){const g=window.getSelection();g?.removeAllRanges(),g?.addRange(p)}}else{const l=document.createRange();l.selectNodeContents(t);const f=window.getSelection();f?.removeAllRanges(),f?.addRange(l)}}__name(hn,\"beginInlineEdit\");let yt=null;function xe(t){if(!j||J||Ht||yt!==null)return;const e=t.target;yt=requestAnimationFrame(()=>{if(yt=null,!j||J)return;const n=Ae(e);n&&!n.element.hasAttribute(\"data-fivora-edit-badge\")&&un(n.element)})}__name(xe,\"onEditMouseOver\");function Ce(t){if(!j)return;const e=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null;e&&(e===Q||e===nt||nt?.contains(e))||xt()}__name(Ce,\"onEditMouseOut\");function Te(t){if(!j||J&&t.target instanceof Node&&J.target.contains(t.target))return;const e=t.target instanceof HTMLElement&&t.target.hasAttribute(\"data-fivora-edit-badge\")?t.target:null,n=e?nt?{element:nt,field:Bt(nt)}:null:Ae(t.target),r=n?.element,o=n?.field;if(!r||!o)return;t.preventDefault(),t.stopPropagation();const i=Ee(r,o);!jn&&fn(r,o)&&i.length===0?hn(r,o,e?void 0:{x:t.clientX,y:t.clientY}):gn(r,o,i)}__name(Te,\"onEditClick\");function yn(){j||(j=!0,pe(),ye(),!Ht&&!Q&&(Q=ln()),Ht||(document.addEventListener(\"mouseover\",xe,!0),document.addEventListener(\"mouseout\",Ce,!0)),document.addEventListener(\"click\",Te,!0),document.addEventListener(\"submit\",Pe,!0),we())}__name(yn,\"enterEditMode\");function Pe(t){j&&(t.preventDefault(),t.stopPropagation())}__name(Pe,\"preventEditModeSubmit\");function bn(){if(j){j=!1,Gt=!1,pt(!0),xt(),yt!==null&&(cancelAnimationFrame(yt),yt=null);for(const t of Et)window.clearTimeout(t);if(Et=[],rt!==null){const t=window.cancelIdleCallback;typeof t==\"function\"?t(rt):window.clearTimeout(rt),rt=null}be(),document.querySelectorAll(`[${P}], [${V}]`).forEach(t=>{t.removeAttribute(P),t.removeAttribute(V)}),document.removeEventListener(\"mouseover\",xe,!0),document.removeEventListener(\"mouseout\",Ce,!0),document.removeEventListener(\"click\",Te,!0),document.removeEventListener(\"submit\",Pe,!0)}}__name(bn,\"exitEditMode\");const zn=window.history.pushState.bind(window.history),Kn=window.history.replaceState.bind(window.history);window.history.pushState=(...t)=>{zn(...t),window.setTimeout(bt,0)},window.history.replaceState=(...t)=>{Kn(...t),window.setTimeout(bt,0)},window.addEventListener(\"popstate\",bt);function wn(){return window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|[^/]+)\\/[^/]+)/)?.[1]??\"\"}__name(wn,\"resolvePreviewRootPrefix\");function An(t){if(t.target&&t.target!==\"_self\"||t.hasAttribute(\"download\"))return!1;const e=t.getAttribute(\"href\");if(!e||e.startsWith(\"#\")||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(e))return!1;let n;try{n=new URL(e,window.location.href)}catch{return!1}if(n.origin!==window.location.origin)return!1;const r=wn();if(r&&!n.pathname.startsWith(r))return!1;const o=window.location.pathname.replace(/\\/+$/,\"\")||\"/\",i=n.pathname.replace(/\\/+$/,\"\")||\"/\";return o!==i||n.search!==window.location.search}__name(An,\"isInternalPreviewNavigation\"),document.addEventListener(\"click\",t=>{if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const e=t.target?.closest?.(\"a[href]\");!e||!An(e)||(t.preventDefault(),t.stopPropagation(),window.location.assign(e.href))},!0),bt()})(function(I){const O=__name((h,k)=>{if(!h||h.trim()===\"null\")return null;try{const $=new URL(h,k??void 0).origin;return $===\"null\"?null:$}catch{return null}},\"normalizeOrigin\"),_=O(I.currentOrigin),C=O(I.ancestorOrigin,_),H=O(I.accessibleParentOrigin,_),s=O(I.referrer,_),c=O(I.rememberedOrigin);return C??H??(s&&s!==_?s:null)??c??s},function(I){const O=__name(u=>!!u&&typeof u==\"object\"&&!Array.isArray(u),\"isRecord\"),_=O(I)&&(I.designCustomizationVersion===1||!!I.elementStyles||!!I.sections);if(!O(I)||!_)return\"\";const C=I,H=__name(u=>{if(typeof u==\"number\")return`${u}px`;if(typeof u!=\"string\")return\"\";const E=u.trim();return!E||E.length>160||/[;{}<>\\r\\n]/.test(E)||/(?:url\\s*\\(|expression\\s*\\(|@import|javascript:)/i.test(E)?\"\":E},\"safeValue\"),s=__name(u=>H(C[u]),\"read\"),c=__name((u,E)=>E?`${u}:${E} !important;`:\"\",\"declaration\"),h=__name((u,E)=>{const S=E.filter(Boolean).join(\"\");return S?`${u}{${S}}`:\"\"},\"rule\"),k=__name(u=>u?[c(\"background\",u),c(\"background-color\",u),\"background-image:none !important;\"]:[],\"backgroundDeclarations\"),$=__name(u=>u===\"start\"?\"flex-start\":u===\"end\"?\"flex-end\":u===\"center\"||u===\"stretch\"?u:\"\",\"alignItems\"),R=__name(u=>{const E=Number(u);return Number.isInteger(E)&&E>=1&&E<=6?`repeat(${E},minmax(0,1fr))`:\"\"},\"gridColumns\"),T=(()=>{const u=Number(s(\"headingScale\"));return Number.isFinite(u)&&u>=.75&&u<=2?String(u):\"\"})(),N=__name(u=>({none:\"none\",subtle:\"0 4px 14px rgba(15,23,42,.08)\",medium:\"0 12px 30px rgba(15,23,42,.14)\",strong:\"0 22px 55px rgba(15,23,42,.22)\"})[u]??\"\",\"shadow\"),X=[[\"--brand-color\",s(\"primaryColor\")],[\"--brand-primary\",s(\"primaryColor\")],[\"--primary-color\",s(\"primaryColor\")],[\"--color-primary\",s(\"primaryColor\")],[\"--brand-secondary\",s(\"secondaryColor\")],[\"--secondary-color\",s(\"secondaryColor\")],[\"--brand-accent\",s(\"accentColor\")],[\"--accent-color\",s(\"accentColor\")],[\"--page-background\",s(\"backgroundColor\")],[\"--page-text\",s(\"textColor\")],[\"--bg-primary\",s(\"canvasColor\")],[\"--bg-secondary\",s(\"surfaceColor\")],[\"--surface\",s(\"surfaceColor\")],[\"--card-bg\",s(\"surfaceColor\")],[\"--background\",s(\"canvasColor\")],[\"--brand-primary\",s(\"brandPrimary\")],[\"--brand-secondary\",s(\"brandSecondary\")],[\"--brand-accent\",s(\"brandAccent\")],[\"--primary\",s(\"brandPrimary\")],[\"--secondary\",s(\"brandSecondary\")],[\"--accent\",s(\"brandAccent\")],[\"--text-primary\",s(\"textPrimary\")],[\"--text-secondary\",s(\"textSecondary\")],[\"--text-muted\",s(\"textMuted\")],[\"--muted\",s(\"textMuted\")],[\"--border-primary\",s(\"borderColor\")],[\"--border-secondary\",s(\"borderColor\")],[\"--border\",s(\"borderColor\")],[\"--card-radius\",s(\"cardRadius\")],[\"--button-radius\",s(\"buttonRadius\")],[\"--image-radius\",s(\"imageRadius\")]],G=new Set([\"sans-serif\",\"serif\",\"monospace\",\"inherit\",\"initial\",\"system-ui\",\"system sans\",\"editorial serif\"]),F=new Set,P=__name(u=>{if(typeof u==\"string\"&&u.trim()){const E=u.split(\",\")[0].replace(/['\"]/g,\"\").trim();E&&!G.has(E.toLowerCase())&&!E.toLowerCase().includes(\"system\")&&F.add(E)}},\"addFont\");P(C.headingFont),P(C.bodyFont);const V=O(C.elementStyles)?C.elementStyles:{};for(const u of Object.values(V))O(u)&&P(u.fontFamily);const D=[...Array.from(F).map(u=>`@import url('https://fonts.googleapis.com/css2?family=${encodeURIComponent(u).replace(/%20/g,\"+\")}:wght@300;400;500;600;700;800&display=swap');`),h(\":root,body\",X.map(([u,E])=>c(u,E))),h(\"html\",[c(\"font-size\",s(\"baseSize\"))]),h(\"body\",[c(\"font-family\",s(\"bodyFont\")?`${s(\"bodyFont\")},sans-serif`:\"\"),c(\"font-weight\",s(\"bodyWeight\")),c(\"line-height\",s(\"bodyLineHeight\")),c(\"letter-spacing\",s(\"letterSpacing\")),...k(s(\"backgroundColor\")),c(\"color\",s(\"textColor\"))]),h(\"body :where(h1,h2,h3,h4,h5,h6)\",[c(\"font-family\",s(\"headingFont\")?`${s(\"headingFont\")},sans-serif`:\"\"),c(\"font-weight\",s(\"headingWeight\")),c(\"line-height\",s(\"headingLineHeight\")),c(\"color\",s(\"headingColor\"))]),h('body :where(p,small,.muted,[class*=\"muted\"])',[c(\"color\",s(\"mutedTextColor\"))]),T?`body h1{font-size:calc(2.5rem * ${T}) !important}body h2{font-size:calc(2rem * ${T}) !important}body h3{font-size:calc(1.5rem * ${T}) !important}body h4{font-size:calc(1.25rem * ${T}) !important}`:\"\",h(\"body header\",[...k(s(\"headerBackgroundColor\")),c(\"min-height\",s(\"headerHeight\"))]),h(\"body footer\",[...k(s(\"footerBackgroundColor\"))]),h(\"body main\",[...k(s(\"backgroundColor\")),c(\"color\",s(\"textColor\"))]),h(\"body main > section,body main [data-preview-page-key] > section\",[c(\"padding-block\",s(\"sectionPadding\")),c(\"text-align\",s(\"textAlign\"))]),h(\"body main :where(section,[data-design-section]) :where(h1,h2,h3,h4,h5,h6,p,[data-design-text])\",[c(\"text-align\",s(\"textAlign\"))]),h(\"body main > section + section,body main [data-preview-page-key] > section + section\",[c(\"margin-top\",s(\"sectionGap\"))]),h('body main :where([class*=\"flex\"],[class*=\"grid\"],[data-design-stack])',[c(\"gap\",s(\"elementGap\"))]),h(\"body main > section:nth-of-type(even),body main [data-preview-page-key] > section:nth-of-type(even)\",k(s(\"surfaceAltColor\"))),h(\"body main > section:nth-of-type(odd),body main [data-preview-page-key] > section:nth-of-type(odd)\",k(s(\"surfaceColor\"))),h(\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",[c(\"min-height\",s(\"heroMinHeight\")),c(\"text-align\",s(\"heroTextAlign\"))]),h('body main > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text]),body main [data-preview-page-key] > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text])',[c(\"text-align\",s(\"heroTextAlign\"))]),h('body main :where([class*=\"container\"],[class~=\"container\"],[data-design-container])',[c(\"max-width\",s(\"contentMaxWidth\")),c(\"padding-inline\",s(\"containerPadding\")),s(\"contentMaxWidth\")?\"margin-inline:auto !important;\":\"\"]),h('body main :where(section,[data-design-section]) > :where([class*=\"flex\"],[data-design-content])',[c(\"align-items\",$(s(\"contentAlign\"))),c(\"justify-items\",s(\"contentAlign\"))]),h(\"body main :where([data-preview-list-path],[data-design-grid])\",[R(s(\"gridColumns\"))?\"display:grid !important;\":\"\",c(\"grid-template-columns\",R(s(\"gridColumns\"))),c(\"gap\",s(\"gridGap\"))]),h('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])',[c(\"width\",s(\"cardWidth\")),s(\"cardWidth\")?\"max-width:100% !important;\":\"\",c(\"min-height\",s(\"cardMinHeight\")),c(\"padding\",s(\"cardPadding\")),c(\"border-radius\",s(\"cardRadius\")),c(\"border-width\",s(\"cardBorderWidth\")),s(\"cardBorderWidth\")?\"border-style:solid !important;\":\"\",c(\"border-color\",s(\"borderColor\")),...k(s(\"cardBackgroundColor\")),c(\"box-shadow\",N(s(\"cardShadow\"))),c(\"text-align\",s(\"cardTextAlign\"))]),h('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"]) :where(h1,h2,h3,h4,h5,h6,p,span,[data-design-text])',[c(\"text-align\",s(\"cardTextAlign\"))]),h('body main :where(button,a[class*=\"btn\"],a[class*=\"button\"],[data-design-button])',[c(\"padding\",s(\"buttonPadding\")),c(\"border-radius\",s(\"buttonRadius\")),...k(s(\"buttonBackgroundColor\")),c(\"color\",s(\"buttonTextColor\")),c(\"box-shadow\",N(s(\"buttonShadow\")))]),h(\"body main img\",[c(\"border-radius\",s(\"imageRadius\"))])],U=O(C.sections)?C.sections:{};for(const[u,E]of Object.entries(U)){if(!/^[a-zA-Z0-9_-]{1,64}$/.test(u)||!O(E))continue;const S=__name(M=>H(E[M]),\"sectionRead\"),z=S(\"backgroundColor\"),d=['[class*=\"absolute\"][class*=\"inset-0\"]','[class*=\"fixed\"][class*=\"inset-0\"]','[class*=\"absolute\"][class*=\"inset-x-0\"][class*=\"inset-y-0\"]','[class*=\"absolute\"][class*=\"top-0\"][class*=\"right-0\"][class*=\"bottom-0\"][class*=\"left-0\"]'].join(\",\"),y={all:\"body main section\",hero:\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",header:\"body header\",footer:\"body footer\",cards:'body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])'}[u]??`body :where([data-preview-page-key=\"${u}\"] > section,[data-design-section=\"${u}\"],[data-section-id=\"${u}\"],section#${u},section.${u})`;D.push(h(y,[E.visible===!1?\"display:none !important;\":\"\",...k(z),c(\"color\",S(\"textColor\")),c(\"min-height\",S(\"minHeight\")),c(\"padding-block\",S(\"padding\")),c(\"max-width\",S(\"contentMaxWidth\")),c(\"gap\",S(\"gap\")),c(\"text-align\",S(\"textAlign\")),c(\"align-items\",$(S(\"contentAlign\")))]),h(`${y} :where(h1,h2,h3,h4,h5,h6)`,[c(\"color\",S(\"headingColor\")),c(\"text-align\",S(\"textAlign\"))]),h(`${y} :where(p,span,[data-design-text])`,[c(\"text-align\",S(\"textAlign\"))]),h(`${y} :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`,[...k(S(\"cardBackgroundColor\")),c(\"width\",S(\"cardWidth\")),S(\"cardWidth\")?\"max-width:100% !important;\":\"\",c(\"min-height\",S(\"cardMinHeight\")),c(\"border-radius\",S(\"cardRadius\"))]),h(`${y} :where([data-preview-list-path],[data-design-grid])`,[R(S(\"gridColumns\"))?\"display:grid !important;\":\"\",c(\"grid-template-columns\",R(S(\"gridColumns\")))]),h(`${y}::before,${y}::after`,z?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),h(`${y} > :where(${d})`,z?[\"background:none !important;\",\"background-image:none !important;\",\"box-shadow:none !important;\",\"mask-image:none !important;\",\"-webkit-mask-image:none !important;\"]:[]),h(`${y} > :where(${d})::before,${y} > :where(${d})::after`,z?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),h(`${y} > :where(${d}) :where(img,video,canvas,picture)`,z?[\"opacity:0.2 !important;\"]:[]))}const ot=O(C.elementStyles)?C.elementStyles:{},Y=[[\"fontFamily\",\"font-family\"],[\"fontSize\",\"font-size\"],[\"lineHeight\",\"line-height\"],[\"fontWeight\",\"font-weight\"],[\"letterSpacing\",\"letter-spacing\"],[\"color\",\"color\"],[\"backgroundColor\",\"background-color\"],[\"textAlign\",\"text-align\"],[\"width\",\"width\"],[\"height\",\"height\"],[\"minWidth\",\"min-width\"],[\"minHeight\",\"min-height\"],[\"maxWidth\",\"max-width\"],[\"maxHeight\",\"max-height\"],[\"marginTop\",\"margin-top\"],[\"marginRight\",\"margin-right\"],[\"marginBottom\",\"margin-bottom\"],[\"marginLeft\",\"margin-left\"],[\"paddingTop\",\"padding-top\"],[\"paddingRight\",\"padding-right\"],[\"paddingBottom\",\"padding-bottom\"],[\"paddingLeft\",\"padding-left\"],[\"padding\",\"padding\"],[\"borderRadius\",\"border-radius\"],[\"borderWidth\",\"border-width\"],[\"borderColor\",\"border-color\"],[\"borderStyle\",\"border-style\"],[\"boxShadow\",\"box-shadow\"]];for(const[u,E]of Object.entries(ot).slice(0,256)){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(u)||!O(E))continue;const S=u.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"'),z=(()=>{if(u===\"site:all\")return\"body\";if(u.startsWith(\"page:\"))return`body :where([data-preview-page-key=\"${S.slice(5)}\"])`;if(u.startsWith(\"section:\")){const[,d=\"all\",m=\"\"]=S.split(\":\"),y=d===\"all\"?\"body main\":`body :where([data-preview-page-key=\"${d}\"])`,M=m.match(/^nth-(\\d+)$/)?.[1];return M?`${y} > section:nth-of-type(${M})`:`${y} :where([data-design-section=\"${m}\"],[data-section-id=\"${m}\"],section#${m})`}if(u.includes(\":\")){const[d,m]=S.split(\":\");if(m===\"card\")return`body [data-preview-list-path=\"${d}\"] :is([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`;if(m)return`body [data-preview-list-path=\"${d}\"] :is([data-preview-field-path$=\".${m}\"],[data-field-path$=\".${m}\"],[data-content-path$=\".${m}\"])`}return`body :is([data-preview-field-path=\"${S}\"],[data-content-path=\"${S}\"],[data-field-path=\"${S}\"],[data-fivora-resolved-field-path=\"${S}\"],[data-preview-list-path=\"${S}\"],[data-preview-item-path=\"${S}\"])`})();D.push(h(z,Y.map(([d,m])=>c(m,H(E[d])))))}return D.filter(Boolean).join(`\n`)},function(I,O){if(!O||typeof O!=\"object\"||Array.isArray(O))return I;const _=__name($=>{const R=$.trim().toLowerCase(),T=R.match(/^#([0-9a-f]{3})$/);return T?`#${[...T[1]].map(N=>N.repeat(2)).join(\"\")}`:/^#[0-9a-f]{6}$/.test(R)?R:null},\"normalize\"),C=new Map,H=new Map;for(const[$,R]of Object.entries(O).slice(0,64)){if(typeof R!=\"string\")continue;const T=_($),N=_(R);if(!T||!N||T===N)continue;C.set(T,N);const X=__name(G=>[Number.parseInt(G.slice(1,3),16),Number.parseInt(G.slice(3,5),16),Number.parseInt(G.slice(5,7),16)],\"channels\");H.set(X(T).join(\",\"),X(N)),T[1]===T[2]&&T[3]===T[4]&&T[5]===T[6]&&C.set(`#${T[1]}${T[3]}${T[5]}`,N)}if(C.size===0)return I;const s=[...C.keys()].sort(($,R)=>R.length-$.length).map($=>$.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")),c=new RegExp(`(?<!\\\\\\\\)(?:${s.join(\"|\")})(?![0-9a-f])`,\"gi\"),h=I.replace(c,$=>{const R=_($);return R?C.get(R)??$:$}),k=/(rgba?\\(\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})/gi;return h.replace(k,($,R,T,N,X,G,F)=>{const P=H.get(`${T},${X},${F}`);return P?`${R}${P[0]}${N}${P[1]}${G}${P[2]}`:$})},\"fivora-universal-design-overrides\",function(I,O){const _=O??document,C=I&&typeof I==\"object\"&&!Array.isArray(I)?I:null,H=C?.requirements&&typeof C.requirements==\"object\"&&!Array.isArray(C.requirements)?C.requirements:null,s=C?.template&&typeof C.template==\"object\"&&!Array.isArray(C.template)?C.template:null,c=s?.structure&&typeof s.structure==\"object\"&&!Array.isArray(s.structure)?s.structure:null,h=Array.isArray(H?.requiredPages),k=Array.isArray(c?.pages);if(!h&&!k)return;const $=h?H?.requiredPages:c?.pages,R=new Set($.filter(d=>typeof d==\"string\").map(d=>d.trim()).filter(Boolean)),T=Array.isArray(s?.pageDefinitions)?s.pageDefinitions:[],N=Array.isArray(c?.pageDefinitions)?c.pageDefinitions:[],G=(T.length>0?T:N).flatMap(d=>{if(!d||typeof d!=\"object\"||Array.isArray(d))return[];const m=d;if(typeof m.id!=\"string\"||!m.id.trim())return[];const y=m.id.trim(),M=typeof m.label==\"string\"&&m.label.trim()?m.label.trim():y.replace(/_/g,\" \"),Z=typeof m.route==\"string\"?m.route.trim():\"\",at=Z===\"/\"?\"/\":`/${(Z||y).replace(/^\\/+|\\/+$/g,\"\")}`;return[{id:y,label:M,route:at}]}),P=(k?c?.pages:$).filter(d=>typeof d==\"string\").map(d=>d.trim()).filter(Boolean).map((d,m)=>({id:d,label:d.replace(/_/g,\" \"),route:m===0?\"/\":`/${d}`})),V=G.length>0?G:P;if(V.length===0)return;const B=V.filter(d=>!R.has(d.id));if(B.length===0){_.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(d=>d.removeAttribute(\"data-fivora-page-disabled\"));return}let D=_.getElementById(\"fivora-page-selection-style\");(!D||D.tagName!==\"STYLE\")&&(D=_.createElement(\"style\"),D.id=\"fivora-page-selection-style\",D.textContent='[data-fivora-page-disabled=\"true\"]{display:none!important}',_.head.appendChild(D)),_.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(d=>d.removeAttribute(\"data-fivora-page-disabled\"));const U=__name(d=>{let m=d;try{const Z=new URL(d,_.baseURI);if(Z.origin!==_.location?.origin)return\"\";m=Z.pathname}catch{return\"\"}const y=m.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];y&&m.startsWith(y)&&(m=m.slice(y.length)||\"/\"),m=m.replace(/\\/index\\.html$/i,\"/\").replace(/\\.html$/i,\"\");const M=m.replace(/\\/+$/g,\"\")||\"/\";return M.startsWith(\"/\")?M:`/${M}`},\"normalizePath\"),ot=__name(d=>V.find(m=>{const y=U(m.route);return y?y===\"/\"?d===\"/\":d===y||d.startsWith(`${y}/`):!1}),\"pageForPath\"),Y=__name(d=>{for(const m of[\"href\",\"formaction\",\"data-href\",\"data-route\",\"data-url\"]){const y=d.getAttribute(m);if(!y)continue;const M=ot(U(y));if(M)return M}},\"pageForControl\"),u=__name(d=>{d&&d.setAttribute(\"data-fivora-page-disabled\",\"true\")},\"disable\");for(const d of B)for(const m of[\"data-page-key\",\"data-required-page\",\"data-target-page\"])_.querySelectorAll(`[${m}]`).forEach(y=>{y.getAttribute(m)===d.id&&u(y)});const E=Array.from(_.querySelectorAll(\"a[href]\"));for(const d of E){const m=Y(d);if(!m||R.has(m.id))continue;if(d.classList.contains(\"absolute\")&&(d.classList.contains(\"inset-0\")||d.classList.contains(\"inset-x-0\")&&d.classList.contains(\"inset-y-0\")))u(d.closest(\"[data-preview-item-path],[data-design-card],article,li\"));else{const M=d.closest(\"li\");u(M&&M.querySelectorAll(\"a[href]\").length===1?M:d)}}const S=Array.from(_.querySelectorAll('button,[role=\"button\"],[data-href],[data-route],[data-url]')).filter(d=>d.tagName!==\"A\");for(const d of S){const m=Y(d);if(!m||R.has(m.id))continue;const y=d.closest(\"li\");u(y&&y.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]').length===1?y:d)}const z=_.querySelector(\"main section\");for(const d of _.querySelectorAll(\"main section\")){const m=Array.from(d.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]')),y=m.map(Y).filter(at=>!!at),M=d.hasAttribute(\"data-preview-page-key\"),Z=d===z||d.hasAttribute(\"data-design-hero\")||/(?:^|\\s)(?:hero|banner|masthead)(?:\\s|$)/i.test(d.className)||!!d.querySelector(\"h1\");!M&&!Z&&y.length>0&&y.length===m.length&&y.every(at=>!R.has(at.id))&&u(d)}});";
4
+ module.exports = "var __name=typeof __name==\"function\"?__name:((it,I)=>typeof Object.defineProperty==\"function\"?Object.defineProperty(it,\"name\",{value:I,configurable:!0}):it);(function(I,O,_,C,H){const s=`${[\"MARKET\",\"PLACE\"].join(\"\")}_PREVIEW_`,l=__name(t=>`${s}${t}`,\"previousPreviewMessage\"),y=__name(t=>`__${s}${t}__`,\"previousPreviewStorageKey\"),k=\"FIVORA_PREVIEW_FOCUS_PAGE\",$=l(\"FOCUS_PAGE\"),R=\"FIVORA_PREVIEW_FOCUS_RESULT\",T=l(\"FOCUS_RESULT\"),N=\"FIVORA_PREVIEW_READY\",X=l(\"READY\"),G=\"data-fivora-preview-active-field\",F=\"data-fivora-resolved-field-path\",v=\"data-fivora-empty-editable\",V=\"data-fivora-empty-collection\",B=\"data-preview-list-path\",D=\"data-preview-item-path\",U=\"data-preview-static\",ot=\"__FIVORA_UNIVERSAL_PREVIEW_FOCUS__\",Y=\"__FIVORA_VISUAL_EDITOR_TARGETS__\",f=\"__FIVORA_PREVIEW_PARENT_ORIGIN__\",E=y(\"PARENT_ORIGIN\"),S=\"__FIVORA_PREVIEW_SITE_DATA_CACHE__\",z=y(\"SITE_DATA_CACHE\"),d=\"__FIVORA_PREVIEW_SITE_DATA__\",m=y(\"SITE_DATA\"),b=\"FIVORA_PREVIEW_SITE_DATA\",M=l(\"SITE_DATA\"),Z=\"FIVORA_PREVIEW_SITE_DATA_APPLIED\",at=l(\"SITE_DATA_APPLIED\"),En=\"FIVORA_PREVIEW_CONTENT_PATCH\",xn=l(\"CONTENT_PATCH\"),Cn=\"FIVORA_PREVIEW_STYLE_PATCH\",Pe=\"fivora-template-color-replacements\",Tn=[200],vn=2500,Pn=1600,In=12e3,_n=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small\";let Jt=[];const Ie=new Map;let _e=0,Xt=!1,Tt=null,Zt,Qt=[],st=null,P=null,Re=\"\",$e=\"\",Oe=\"\";function gt(){try{window.sessionStorage.removeItem(ot)}catch{}}__name(gt,\"clearPendingFocus\");function te(){try{return window.sessionStorage.getItem(f)||window.sessionStorage.getItem(E)}catch{return null}}__name(te,\"readRememberedParentOrigin\");function ee(t){if(t)try{window.sessionStorage.setItem(f,t)}catch{}}__name(ee,\"rememberParentOrigin\");function Me(){for(const t of Qt)window.clearTimeout(t);Qt=[]}__name(Me,\"clearSiteDataRelayTimers\");function Le(){const t=new Set;dt&&t.add(dt),t.add(window.location.origin);const e=te();e&&t.add(e);try{if(document.referrer){const n=new URL(document.referrer).origin;n&&n!==\"null\"&&t.add(n)}}catch{}try{const n=window.location.ancestorOrigins?.item(0);n&&t.add(n)}catch{}return Array.from(t)}__name(Le,\"collectSiteDataRelayOrigins\");function vt(t,e){const n=Le(),r=e?.fanOut?n:n.slice(0,1);for(const o of r)for(const i of[b,M])try{window.dispatchEvent(new MessageEvent(\"message\",{data:{type:i,siteData:t,__fivoraBridgeRelay:!0},origin:o,source:window.parent}))}catch{}}__name(vt,\"relaySiteDataToTemplateRuntime\");function Pt(t,e){P=t;try{window[d]=t,window[m]=t}catch{}const n=__name(()=>{st=null;try{const r=JSON.stringify(P);window.sessionStorage.setItem(S,r),window.sessionStorage.setItem(z,r)}catch{}},\"writeSessionCache\");if(e?.immediate){st!==null&&(window.clearTimeout(st),st=null),n();return}st!==null&&window.clearTimeout(st),st=window.setTimeout(n,vn)}__name(Pt,\"persistSiteData\");function ke(t){const e=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,n=e?.requirements&&typeof e.requirements==\"object\"&&!Array.isArray(e.requirements)?e.requirements:null,r=e?.template&&typeof e.template==\"object\"&&!Array.isArray(e.template)?e.template:null,o=r?.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:null;try{return JSON.stringify({requiredPages:n?.requiredPages??null,pages:o?.pages??null,pageDefinitions:r?.pageDefinitions??o?.pageDefinitions??null})}catch{return String(Date.now())}}__name(ke,\"pagesSignature\");let ct=null,lt=null;function Fe(t){const e=[];for(const n of t.matchAll(/([^.[\\]]+)|\\[(\\d+)\\]/g))n[2]!==void 0?e.push(Number(n[2])):n[1]&&e.push(n[1]);return e}__name(Fe,\"parseFieldPath\");function De(t,e,n){if(e.length===0)return t;const r=__name((o,i)=>{const a=e[i],c=i===e.length-1,u=c?void 0:e[i+1];if(typeof a==\"number\"){const A=(Array.isArray(o)?o:[]).slice();if(c)return A[a]=n,A;const L=A[a];return A[a]=L==null||typeof L!=\"object\"?r(typeof u==\"number\"?[]:{},i+1):r(L,i+1),A}const g={...o&&typeof o==\"object\"&&!Array.isArray(o)?o:{}};if(c)return g[a]=n,g;const w=g[a];return g[a]=w==null||typeof w!=\"object\"?r(typeof u==\"number\"?[]:{},i+1):r(w,i+1),g},\"setAt\");return r(t,0)}__name(De,\"setValueAtPath\");function Ne(){return(P&&typeof P==\"object\"&&!Array.isArray(P)?P:{}).content??{}}__name(Ne,\"readPublishedContent\");function ne(t){const n={...P&&typeof P==\"object\"&&!Array.isArray(P)?P:{},content:t};P=n;try{window[d]=n,window[m]=n}catch{}return n}__name(ne,\"writePublishedContent\");function re(){ct!==null&&window.clearTimeout(ct),ct=window.setTimeout(()=>{ct=null,P!=null&&vt(P,{fanOut:!1})},Pn)}__name(re,\"scheduleContentOnlyRelay\");function It(){lt!==null&&window.clearTimeout(lt),lt=window.setTimeout(()=>{if(lt=null,P==null)return;const t=window;if(typeof t.requestIdleCallback==\"function\"){t.requestIdleCallback(()=>{P!=null&&Pt(P,{immediate:!0})},{timeout:4e3});return}Pt(P,{immediate:!0})},In)}__name(It,\"scheduleContentOnlyPersist\");function ie(t,e){const n=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [${F}=\"${CSS.escape(t)}\"]`));for(const r of n){if(J?.target===r)continue;if(r.tagName===\"IMG\"){typeof e==\"string\"&&e.trim()&&r.setAttribute(\"src\",e);continue}if(typeof e!=\"string\"&&typeof e!=\"number\"&&typeof e!=\"boolean\")continue;if(r.hasAttribute(\"data-fivora-rating-container\")||r.querySelector(\"[data-fivora-stars-row]\")||r.querySelector(\"[data-fivora-rating-text]\")||t.endsWith(\".rating\")){const i=Math.min(Math.max(Math.round(Number(e)||0),0),5),a=r.querySelector(\"[data-fivora-rating-text]\");a?a.textContent=String(i):r.hasAttribute(\"data-fivora-rating-text\")&&(r.textContent=String(i));const c=r.hasAttribute(\"data-fivora-rating-container\")?r:r.closest(\"[data-fivora-rating-container]\")||r.parentElement;c&&(Array.from(c.querySelectorAll(\"svg\")).forEach((p,g)=>{const h=g<i?\"#fa7014\":\"#dadce0\";p.style.fill=h,p.style.color=h;const A=p.querySelector(\"path\");A&&(A.style.fill=h)}),c.setAttribute(\"data-rating-value\",String(i)));continue}const o=(r.getAttribute(\"data-fivora-value-prefix\")??\"\")+String(e)+(r.getAttribute(\"data-fivora-value-suffix\")??\"\");if(r.childElementCount===0)r.textContent=o;else{const i=Array.from(r.childNodes).find(a=>a.nodeType===Node.TEXT_NODE&&a.textContent?.trim());i?i.textContent=o:r.textContent=o}j&&(o.trim().length===0?r.setAttribute(v,\"true\"):r.removeAttribute(v))}}__name(ie,\"applyDomFieldValue\");function He(t){if(!Array.isArray(t)||t.length===0)return;let e=Ne();for(const n of t){if(!n||typeof n.path!=\"string\"||!n.path.trim())continue;const r=Fe(n.path);r.length!==0&&(e=De(e,r,n.value),ie(n.path,n.value))}ne(e),re(),It()}__name(He,\"publishContentPatches\");function Ve(t){ne(t),re(),It()}__name(Ve,\"publishContentOnly\");function qe(t,e){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(t)||!e||typeof e!=\"object\"||Array.isArray(e))return;const n=P&&typeof P==\"object\"&&!Array.isArray(P)?P:{},r=n.template&&typeof n.template==\"object\"&&!Array.isArray(n.template)?n.template:{},o=r.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:{},i=(o.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:r.theme&&typeof r.theme==\"object\"&&!Array.isArray(r.theme)?r.theme:{})||{},a=i.elementStyles&&typeof i.elementStyles==\"object\"&&!Array.isArray(i.elementStyles)?i.elementStyles:{},c={...i,designCustomizationVersion:1,elementStyles:{...a,[t]:e}},u={...r,theme:c,structure:{...o,theme:c}},p={...n,template:u};P=p,wt(p),Ge(t,e),It()}__name(qe,\"publishElementStylePatch\");function Ge(t,e){if(!t||!e||typeof e!=\"object\"||Array.isArray(e))return;const n=e;let r=[];if(t.includes(\":\")){const[i,a]=t.split(\":\");a===\"card\"?r=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(i)}\"] [data-preview-item-path], [data-preview-list-path=\"${CSS.escape(i)}\"] .card, [data-preview-list-path=\"${CSS.escape(i)}\"] article`)):a&&(r=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(i)}\"] [data-preview-field-path$=\".${CSS.escape(a)}\"], [data-preview-list-path=\"${CSS.escape(i)}\"] [data-field-path$=\".${CSS.escape(a)}\"]`)))}else r=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [data-preview-item-path=\"${CSS.escape(t)}\"], [data-preview-style-target=\"${CSS.escape(t)}\"], [data-field-path=\"${CSS.escape(t)}\"], [data-content-path=\"${CSS.escape(t)}\"]`));const o=__name(i=>i==null||i===\"\"?\"\":typeof i==\"number\"?`${i}px`:String(i),\"toCssVal\");for(const i of r){if(n.color&&(i.style.setProperty(\"color\",String(n.color),\"important\"),i.style.setProperty(\"--deneb-color\",String(n.color))),n.textAlign&&(i.style.setProperty(\"text-align\",String(n.textAlign),\"important\"),i.style.setProperty(\"--deneb-text-align\",String(n.textAlign))),n.fontSize){const a=o(n.fontSize);i.style.setProperty(\"font-size\",a,\"important\"),i.style.setProperty(\"--deneb-font-size\",a)}if(n.fontFamily&&(i.style.setProperty(\"font-family\",String(n.fontFamily),\"important\"),i.style.setProperty(\"--deneb-font-family\",String(n.fontFamily))),n.lineHeight&&(i.style.setProperty(\"line-height\",String(n.lineHeight),\"important\"),i.style.setProperty(\"--deneb-line-height\",String(n.lineHeight))),n.fontWeight&&(i.style.setProperty(\"font-weight\",String(n.fontWeight),\"important\"),i.style.setProperty(\"--deneb-font-weight\",String(n.fontWeight))),n.backgroundColor&&(i.style.setProperty(\"background-color\",String(n.backgroundColor),\"important\"),i.style.setProperty(\"background\",String(n.backgroundColor),\"important\"),i.style.setProperty(\"--deneb-card-bg\",String(n.backgroundColor))),n.borderRadius){const a=o(n.borderRadius);i.style.setProperty(\"border-radius\",a,\"important\"),i.style.setProperty(\"--deneb-card-radius\",a)}if(n.padding){const a=o(n.padding);i.style.setProperty(\"padding\",a,\"important\"),i.style.setProperty(\"--deneb-card-pt\",a)}if(n.boxShadow&&(i.style.setProperty(\"box-shadow\",String(n.boxShadow),\"important\"),i.style.setProperty(\"--deneb-card-shadow\",String(n.boxShadow))),n.borderColor&&(i.style.setProperty(\"border-color\",String(n.borderColor),\"important\"),i.style.setProperty(\"--deneb-card-border-c\",String(n.borderColor))),n.borderWidth){const a=o(n.borderWidth);i.style.setProperty(\"border-width\",a,\"important\"),i.style.setProperty(\"border-style\",\"solid\",\"important\"),i.style.setProperty(\"--deneb-card-border-w\",a)}n.marginTop&&i.style.setProperty(\"margin-top\",o(n.marginTop),\"important\"),n.marginBottom&&i.style.setProperty(\"margin-bottom\",o(n.marginBottom),\"important\"),n.marginLeft&&i.style.setProperty(\"margin-left\",o(n.marginLeft),\"important\"),n.marginRight&&i.style.setProperty(\"margin-right\",o(n.marginRight),\"important\")}}__name(Ge,\"applyElementStyleDirectly\");function _t(t,e){if(e?.contentOnly){const n=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null;Ve(n?.content??t);return}if(ct!==null&&(window.clearTimeout(ct),ct=null),lt!==null&&(window.clearTimeout(lt),lt=null),Xt){Tt=t,Zt=e;return}Xt=!0;try{if(Pt(t,{immediate:e?.persistImmediate}),oe(t),wt(t,{colorReplacements:e?.colorReplacements===!0}),vt(t,{fanOut:e?.fanOut===!0}),e?.scheduleRelays!==!1){Me();for(const n of Tn)Qt.push(window.setTimeout(()=>{P!=null&&vt(P,{fanOut:!0})},n))}}finally{if(Xt=!1,Tt!=null){const n=Tt,r=Zt;Tt=null,Zt=void 0,window.setTimeout(()=>{_t(n,r)},0)}}}__name(_t,\"publishSiteData\");function Be(t){const e=t?.full!==!1,n=\"ontouchstart\"in window||navigator.maxTouchPoints>0||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4;window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{try{W({type:Z,full:e}),W({type:at,full:e})}catch{}const r=P;if(r==null)return;const o=__name(()=>wt(r,{colorReplacements:!0}),\"run\");if(!n){window.setTimeout(o,0);return}const i=window.requestIdleCallback;typeof i==\"function\"?i(o,{timeout:4e3}):window.setTimeout(o,1200)})})}__name(Be,\"acknowledgeSiteDataApplied\");const Rn=(()=>{try{return window.location.ancestorOrigins?.item(0)??null}catch{return null}})(),$n=(()=>{try{return window.parent!==window?window.parent.location.origin:null}catch{return null}})();let dt=I({currentOrigin:window.location.origin,referrer:document.referrer,rememberedOrigin:te(),ancestorOrigin:Rn,accessibleParentOrigin:$n});ee(dt);function We(t){if(t.source!==window.parent)return!1;if(dt)return t.origin===dt;try{const e=new URL(t.origin).origin;return e===\"null\"?!1:(dt=e,ee(e),!0)}catch{return!1}}__name(We,\"isTrustedParentMessage\");function W(t){window.parent.postMessage(t,dt??\"*\")}__name(W,\"postToParent\");function mt(t,e,n=0){t.requestId&&(W({type:R,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}),W({type:T,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}))}__name(mt,\"postFocusResult\");function bt(){try{W({type:N,pathname:window.location.pathname}),W({type:X,pathname:window.location.pathname})}catch{}}__name(bt,\"announceReady\");async function je(t){const e=++_e,r=(t&&typeof t==\"object\"&&!Array.isArray(t)?t:null)?.colorReplacements,o=document.getElementById(Pe);if(!r||typeof r!=\"object\"||Array.isArray(r)||Object.keys(r).length===0){o?.remove();return}const i=Array.from(document.querySelectorAll('link[rel=\"stylesheet\"][href]')),a=await Promise.all(i.map(async p=>{const g=p.href;let w=Ie.get(g);if(w===void 0){const A=await fetch(g,{credentials:\"same-origin\"});if(!A.ok)return\"\";w=await A.text(),Ie.set(g,w)}const h=_(w,r);return h===w?\"\":h}));if(e!==_e)return;const c=a.filter(Boolean).join(`\n`);if(!c){o?.remove();return}const u=o instanceof HTMLStyleElement?o:document.createElement(\"style\");u.id=Pe,u.textContent=c,u.isConnected||document.head.appendChild(u)}__name(je,\"applyTemplateColorReplacements\");function wt(t,e){const n=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,r=n?.template&&typeof n.template==\"object\"&&!Array.isArray(n.template)?n.template:null,o=r?.structure&&typeof r.structure==\"object\"&&!Array.isArray(r.structure)?r.structure:null,i=o?.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:r?.theme&&typeof r.theme==\"object\"&&!Array.isArray(r.theme)?r.theme:null,a=(()=>{try{return JSON.stringify(i??null)}catch{return String(Date.now())}})();if(a!==Re){Re=a;const u=O(i),p=document.getElementById(C);if(!u)p?.remove();else{const g=p instanceof HTMLStyleElement?p:document.createElement(\"style\");g.id=C,g.textContent=u,g.isConnected||document.head.appendChild(g)}}if(e?.colorReplacements){if(a===$e)return;$e=a,je(i).catch(()=>{})}}__name(wt,\"applyUniversalTheme\");function oe(t){const e=ke(t);e!==Oe&&(Oe=e,H(t,document),window.setTimeout(()=>H(t,document),300))}__name(oe,\"applySelectedPages\");function x(t){return String(t??\"\").trim().replace(/\\s+/g,\" \").toLowerCase()}__name(x,\"normalizeText\");function Rt(t){const e=String(t??\"\").trim();if(!e)return[];const n=e.split(/[,;|\\n\\r]+/).map(r=>x(r)).filter(r=>r.length>=3);return Array.from(new Set([x(e),...n])).filter(r=>r.length>=2)}__name(Rt,\"valueFragments\");function $t(t,e){const n=x(e),r=x(t);return/image|photo|logo|banner|thumbnail|cover/.test(n)||/^(https?:|data:|blob:|\\/)/.test(r)}__name($t,\"isImageValue\");function Ue(t){const e=new Set,n=t.getAttribute(\"src\")||\"\";n&&e.add(n),\"src\"in t&&t.src&&e.add(t.src),\"currentSrc\"in t&&t.currentSrc&&e.add(t.currentSrc);const r=t.getAttribute(\"srcset\");r&&r.split(\",\").forEach(o=>{const i=o.trim().split(/\\s+/)[0];i&&e.add(i)});for(const o of[\"data-src\",\"data-original\",\"data-fallback\",\"data-nimg\",\"data-image\",\"data-url\"]){const i=t.getAttribute(o);i&&i!==\"1\"&&e.add(i)}if(t.style.backgroundImage){const o=t.style.backgroundImage.match(/url\\([\"']?([^\"']+)[\"']?\\)/i);o?.[1]&&e.add(o[1])}for(const o of Array.from(e))try{const a=new URL(o,window.location.href).searchParams.get(\"url\");if(a){e.add(a);try{e.add(decodeURIComponent(a))}catch{}}}catch{}return Array.from(e).filter(Boolean)}__name(Ue,\"extractImageCandidates\");function ae(t,e){const n=String(e??\"\").trim();if(!n)return!1;const r=Ue(t);if(r.length===0)return!1;const i=n.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();for(const a of r){if(a===n)return!0;try{if(new URL(a,window.location.href).href===new URL(n,window.location.href).href)return!0}catch{}if(a.includes(n)||n.includes(a))return!0;try{const p=decodeURIComponent(a);if(p.includes(n)||n.includes(p))return!0}catch{}const u=a.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();if(u&&i&&u.length>=3&&u===i)return!0}return!1}__name(ae,\"imageMatchesValue\");function se(t,e){return Array.from(t.querySelectorAll(\"img\")).filter(n=>ae(n,e))}__name(se,\"findImageMatches\");function Ot(t,e){const n=String(e??\"\").trim();return n?[t.getAttribute(\"href\"),t.getAttribute(\"src\"),t.getAttribute(\"poster\"),t.getAttribute(\"srcset\"),t.style.backgroundImage].filter(o=>!!o).some(o=>{if(o===n||o.includes(n))return!0;try{return new URL(o,window.location.href).href===new URL(n,window.location.href).href}catch{return!1}}):!1}__name(Ot,\"attributeMatchesValue\");function Mt(t,e){return Array.from(t.querySelectorAll('a[href], img[src], source[src], video[poster], [style*=\"background-image\"]')).filter(n=>Ot(n,e))}__name(Mt,\"findAttributeMatches\");function ze(t,e){const n=Rt(e);if(n.length===0)return[];const r=Array.from(t.querySelectorAll(_n)),o=r.filter(i=>{const a=x(i.textContent);return n.some(c=>a===c)});return o.length>0?o:r.filter(i=>{const a=x(i.textContent);return n.some(c=>a.includes(c)||c.includes(a))})}__name(ze,\"findTextMatches\");function Lt(t,e,n){if($t(e,n)){const r=se(t,e);if(r.length>0)return r}return ze(t,e)}__name(Lt,\"findValueMatches\");function Ke(t,e,n){if($t(e,n)&&se(t,e).length>0)return!0;const r=x(t.textContent);return Rt(e).some(o=>r.includes(o))}__name(Ke,\"subtreeContainsValue\");function Ye(t,e){const n=t[0];if(!n)return null;let r=n;for(;r;){if(t.every(o=>r?.contains(o)))return r;if(r===e)break;r=r.parentElement}return e??n}__name(Ye,\"lowestCommonAncestor\");function ut(t){const e=String(t??\"\").trim();if(!e)return[];const n=e.replace(/\\[(\\d+)\\]/g,\".$1\"),r=n.replace(/\\.(\\d+)(?=\\.|$)/g,\"[$1]\");return Array.from(new Set([e,n,r]))}__name(ut,\"pathVariants\");function ce(t){return Array.from(new Set([t.fieldPath,...t.fieldPaths??[]].filter(e=>!!(e&&e.trim())).flatMap(e=>ut(e))))}__name(ce,\"focusPathCandidates\");function At(t){if(t.closest(\"[hidden]\"))return!1;let e=t;for(;e&&e!==document.documentElement;){const r=window.getComputedStyle(e);if(r.display===\"none\"||r.visibility===\"hidden\"||Number(r.opacity)===0||r.maxHeight===\"0px\"||r.maxHeight===\"0\")return!1;const o=e.getBoundingClientRect();if((r.overflow===\"hidden\"||r.overflow===\"clip\")&&(o.width<2||o.height<2))return!1;e=e.parentElement}const n=t.getBoundingClientRect();return n.width>=2&&n.height>=2}__name(At,\"isVisuallyHighlightable\");function le(t){let e=0;At(t)&&(e+=100);const n=x(t.textContent);n.length>=2&&(e+=40),t.tagName===\"IMG\"&&(e+=35),t.closest(\"main, footer, header, [data-preview-page-key]\")&&(e+=20),t.closest('.fixed, [class*=\"fixed\"]')&&n.length<2&&t.tagName!==\"IMG\"&&(e-=25);const r=t.getBoundingClientRect();return e+=Math.min(15,Math.floor(r.width*r.height/400)),e}__name(le,\"highlightTargetScore\");function de(t){return[...t].sort((e,n)=>le(n)-le(e))}__name(de,\"rankHighlightTargets\");function Je(t,e){const n=[],r=Array.from(new Set([t,...e??[]].filter(a=>!!a).flatMap(a=>ut(a))));for(const a of r){const c=CSS.escape(a);document.querySelectorAll('[data-preview-field-path=\"'+c+'\"], [data-preview-list-path=\"'+c+'\"], [data-content-path=\"'+c+'\"]').forEach(u=>{n.includes(u)||n.push(u)})}const o=de(n.filter(a=>At(a))),i=o.filter(a=>!o.some(c=>c!==a&&a.contains(c)));return i.length>0?i:o}__name(Je,\"findExplicitTargets\");function ue(t){const e=(t?.itemValues??[]).filter(i=>x(i.value).length>=2&&i.key!==\"id\");if(e.length===0)return null;const n=[];for(const i of e)for(const a of Lt(document,i.value,i.key).slice(0,8))n.includes(a)||n.push(a);let r=null;for(const i of n){let a=i,c=0;for(;a&&a!==document.body&&c<12;){const u=e.reduce((w,h)=>w+(Ke(a,h.value,h.key)?1:0),0),p=a.getBoundingClientRect(),g=Math.max(1,p.width*p.height);(!r||u>r.score||u===r.score&&g<r.area)&&(r={target:a,score:u,area:g}),a=a.parentElement,c+=1}}const o=Math.min(2,e.length);return r&&r.score>=o?r.target:null}__name(ue,\"findItemContainer\");function kt(t,e,n){const r=Lt(t,e,n);if(r.length===0)return null;const o=Rt(e);if(o.length>1&&!$t(e,n)){const i=r.filter(a=>{const c=x(a.textContent);return o.slice(1).some(u=>c===u)});if(i.length>1)return Ye(i,t instanceof HTMLElement?t:null)}return r.sort((i,a)=>x(i.textContent).length-x(a.textContent).length)[0]}__name(kt,\"findFieldTarget\");function Ft(t,e){const n=String(t??e??\"\").trim().toLowerCase().replace(/\\s+/g,\"_\");return!n||n===\"common\"?\"home\":n===\"about\"?\"about_us\":n}__name(Ft,\"normalizePageKey\");function Xe(t){const e=t.replace(/_us$/,\"\"),n=['[data-preview-page-key=\"'+CSS.escape(t)+'\"]','[data-preview-page-key=\"'+CSS.escape(e)+'\"]',\"#\"+CSS.escape(t)+\"_view\",\"#\"+CSS.escape(e)+\"_view\",\"#\"+CSS.escape(t),\"#\"+CSS.escape(e),\"main\",\"body\"];for(const r of n){const o=document.querySelector(r);if(o instanceof HTMLElement)return o}return null}__name(Xe,\"findPageTarget\");function fe(t,e){const n=window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/),r=String(e??\"\").trim(),o=r?\"/\"+r.replace(/^\\/+|\\/+$/g,\"\"):null,i=o!==null?o===\"/\"?\"\":o:t===\"home\"?\"\":\"/\"+t.replace(/^\\/+/,\"\");return n?n[1]+i:i||\"/\"}__name(fe,\"resolvePath\");function pe(){for(const t of Jt)t.target.style.outline=t.outline,t.target.style.outlineOffset=t.outlineOffset,t.target.style.boxShadow=t.boxShadow,t.target.style.transition=t.transition,t.target.style.scrollMarginTop=t.scrollMarginTop,t.target.style.borderRadius=t.borderRadius,t.target.removeAttribute(G);Jt=[]}__name(pe,\"clearHighlight\");function Dt(t,e){pe(),Jt=t.map(n=>({target:n,outline:n.style.outline,outlineOffset:n.style.outlineOffset,boxShadow:n.style.boxShadow,transition:n.style.transition,scrollMarginTop:n.style.scrollMarginTop,borderRadius:n.style.borderRadius}));for(const n of t)n.setAttribute(G,\"true\"),n.style.scrollMarginTop=\"72px\",n.style.transition=\"outline-color 0.2s ease, box-shadow 0.2s ease\",n.style.outline=\"2px solid rgba(34, 197, 94, 0.98)\",n.style.outlineOffset=\"4px\",n.style.boxShadow=\"0 0 0 7px rgba(34, 197, 94, 0.2)\",n.style.borderRadius||(n.style.borderRadius=\"4px\");t[0]?.scrollIntoView({behavior:\"smooth\",block:e?\"start\":\"center\",inline:\"nearest\"})}__name(Dt,\"highlightTargets\");function Ze(t,e){Dt([t],e)}__name(Ze,\"highlight\");function Nt(t){return Array.from(new Set([t.fieldValue,...t.fieldMatchValues??[]].filter(e=>typeof e==\"boolean\"||typeof e==\"number\"||typeof e==\"string\"&&e.trim().length>0).map(e=>String(e))))}__name(Nt,\"focusMatchValues\");function Qe(t){const e=ce(t);if(e.length===0)return null;try{const n=JSON.parse(window.sessionStorage.getItem(Y)??\"{}\");for(const r of e){const o=n[`${window.location.pathname}|${r}`];if(!o)continue;const i=document.querySelector(o);if(!i)continue;const a=Nt(t).map(x),c=x(i.textContent);if(!(a.length>0&&c&&!a.some(u=>c===u||c.includes(u)||Ot(i,u))))return i}return null}catch{return null}}__name(Qe,\"findRememberedFocusTarget\");function St(t){if(!t)return null;if(At(t))return t;let e=t.parentElement;for(;e&&e!==document.body;){if(At(e))return e;e=e.parentElement}return null}__name(St,\"pickVisibleHeuristicTarget\");function ge(t){const e=ce(t),n=Je(t.fieldPath,e.filter(a=>a!==t.fieldPath));if(n.length>0)return{targets:n,result:\"exact\"};const r=St(Qe(t));if(r)return{targets:[r],result:\"heuristic\"};const o=ue(t.fieldContext),i=t.fieldContext?.fieldKey;if(o){for(const c of Nt(t)){const u=St(Mt(o,c)[0]??kt(o,c,i));if(u)return{targets:[u],result:\"heuristic\"}}const a=St(o);if(a)return{targets:[a],result:\"heuristic\"}}for(const a of Nt(t)){const c=Mt(document,a),u=kt(document,a,i),p=u?[...c,u]:c,g=de(p.map(w=>St(w)).filter(w=>!!w));if(g.length>0)return{targets:[g[0]],result:\"heuristic\"}}return null}__name(ge,\"resolveFieldTarget\");function me(){document.documentElement.dataset.fivoraPreview=\"true\",document.querySelectorAll(\".reveal-on-scroll:not(.reveal-active)\").forEach(t=>t.classList.add(\"reveal-active\"))}__name(me,\"activateRevealNodes\");function ft(t,e=0){me();const n=!!t.fieldPath;if(t.focusOnly&&n){const a=ge(t);if(a){Dt(a.targets,!1),mt(t,a.result,a.targets.length);return}if(e<12){window.setTimeout(()=>ft(t,e+1),120);return}mt(t,\"missing\");return}const r=Ft(t.pageKey,t.pageLabel),o=Xe(r);if(!o){e<12?window.setTimeout(()=>ft(t,e+1),120):mt(t,\"missing\");return}const i=n?ge(t):null;if(n&&!i&&e<12){window.setTimeout(()=>ft(t,e+1),120);return}i?(Dt(i.targets,!1),mt(t,i.result,i.targets.length)):(Ze(o,!0),mt(t,\"page\",1))}__name(ft,\"applyFocus\");function tn(t){if(t.focusOnly){gt(),window.setTimeout(()=>ft(t),80);return}const e=Ft(t.pageKey,t.pageLabel),n=fe(e,t.pageRoute);if((window.location.pathname.replace(/\\/+$/,\"\")||\"/\")!==n){try{window.sessionStorage.setItem(ot,JSON.stringify({...t,awaitingNavigation:!0}))}catch{}window.location.assign(n);return}gt(),window.setTimeout(()=>ft(t),80)}__name(tn,\"handleFocus\");function he(t){return x(t).replace(/\\.html$/i,\"\").replace(/[^a-z0-9]+/g,\"-\")}__name(he,\"normalizeRouteToken\");function en(){const t=window.location.pathname.split(\"/\").map(i=>decodeURIComponent(i).trim()).filter(Boolean);if(t.length<2||q.length===0)return;const e=q.filter(i=>{const a=i.context;if(!a?.collectionPath||!a.fieldKey)return!1;const c=a.collectionPath.split(\".\").at(-1)??\"\",u=t.lastIndexOf(c);if(u<0||u>=t.length-1)return!1;const p=he(t.at(-1)??\"\");return a.itemValues.some(({key:g,value:w})=>{const h=x(g).replace(/[^a-z0-9]/g,\"\");return h!==\"id\"&&!h.endsWith(\"id\")&&h!==\"slug\"&&h!==\"name\"&&h!==\"title\"?!1:he(w)===p})});if(e.length===0)return;const n=Array.from(document.querySelectorAll(`[${U}]`)),r=[];for(const i of e){const a=i.context,c=a.fieldKey,u=x(c).replace(/[^a-z0-9]/g,\"\");if(u===\"slug\"||u===\"identifier\"||u.endsWith(\"id\"))continue;const p=a.collectionPath.split(\".\").at(-1)??\"\",g=x(p).replace(/s$/,\"\"),w=c.replace(/([a-z0-9])([A-Z])/g,\"$1 $2\").split(/[^a-z0-9]+/i).map(x).filter(A=>A&&![\"url\",\"text\",\"value\"].includes(A)),h=x(i.value);for(const A of n){const L=x(A.getAttribute(U));if(!L||!L.includes(g))continue;let K=0;const Wt=w.filter(et=>L.includes(et));Wt.length>0&&(K+=40+Wt.length*5);const jt=A.tagName===\"IMG\"?x(A.getAttribute(\"src\")??A.getAttribute(\"alt\")):x(A.textContent);h&&jt===h?K+=120:h.length>=3&&jt.includes(h)&&(K+=80),/image|photo|logo|banner|thumbnail|cover/i.test(c)&&A.tagName===\"IMG\"&&L.includes(\"image\")&&(K+=120),K>=40&&r.push({element:A,field:i,score:K})}}r.sort((i,a)=>a.score-i.score);const o=new Set;for(const{element:i,field:a}of r)if(!o.has(i)){if(o.add(i),i.tagName!==\"IMG\"){const c=i.textContent??\"\",u=String(a.value??\"\"),p=c.toLowerCase().indexOf(u.toLowerCase());u&&p>=0&&c!==u&&(i.setAttribute(\"data-fivora-value-prefix\",c.slice(0,p)),i.setAttribute(\"data-fivora-value-suffix\",c.slice(p+u.length)))}i.removeAttribute(U),i.setAttribute(\"data-preview-field-path\",a.path),ie(a.path,a.value)}}__name(en,\"promoteActiveRouteDetailFields\");const On=\"FIVORA_PREVIEW_ELEMENT_CLICKED\",Mn=l(\"ELEMENT_CLICKED\"),Ln=\"FIVORA_PREVIEW_FIELD_CHANGED\",kn=l(\"FIELD_CHANGED\"),Fn=\"FIVORA_PREVIEW_EDIT_MODE\",Dn=l(\"EDIT_MODE\"),Nn=\"FIVORA_PREVIEW_FLUSH_EDIT\",Hn=l(\"FLUSH_EDIT\"),Vn=\"FIVORA_PREVIEW_EDIT_FLUSHED\",qn=l(\"EDIT_FLUSHED\"),Gn=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small, img\",Ht=\"ontouchstart\"in window||navigator.maxTouchPoints>0||window.matchMedia&&window.matchMedia(\"(pointer: coarse)\").matches,Xn=(()=>{const t=navigator.userAgent||\"\",e=navigator.vendor||\"\";if(/iP(ad|hone|od)/i.test(t)||/Safari/i.test(t)&&/Apple Computer/i.test(e)&&!/Chrom(e|ium)/i.test(t))return!0;try{return!!window.safari}catch{return!1}})(),Bn=(()=>{try{const t=document.createElement(\"div\");return t.setAttribute(\"contenteditable\",\"plaintext-only\"),t.contentEditable===\"plaintext-only\"}catch{return!1}})(),Wn=Ht||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4||typeof navigator.deviceMemory==\"number\"&&(navigator.deviceMemory??8)<=4,jn=!0;let q=[];window.addEventListener(\"message\",t=>{if(!We(t)||t.data&&typeof t.data==\"object\"&&t.data.__fivoraBridgeRelay===!0)return;if(t.data?.type===k||t.data?.type===$){t.stopImmediatePropagation(),tn(t.data);return}if((t.data?.type===b||t.data?.type===M)&&t.data.siteData){const a=t.data.full!==!1;if(t.data.contentOnly===!0){_t(t.data.siteData,{contentOnly:!0});return}_t(t.data.siteData,{fanOut:!1,colorReplacements:!1}),Be({full:a});return}if(t.data?.type===En||t.data?.type===xn){const a=t.data.patches;Array.isArray(a)&&He(a);return}if(t.data?.type===Cn||t.data?.type===\"DENEB_PREVIEW_STYLE_PATCH\"){const a=t.data,c=typeof a.fieldPath==\"string\"?a.fieldPath:typeof a.targetPath==\"string\"?a.targetPath:\"\",u=a.styles??a.properties;c&&u&&qe(c,u);return}if(t.data?.type===Fn||t.data?.type===Dn){q=Array.isArray(t.data.fields)?t.data.fields:[],en(),t.data.editMode?(yn(),window.setTimeout(()=>we(),50)):bn();return}(t.data?.type===Nn||t.data?.type===Hn)&&(pt(!0),W({type:Vn,requestId:t.data.requestId}),W({type:qn,requestId:t.data.requestId}))},!0);try{const t=JSON.parse(window.sessionStorage.getItem(ot)??\"null\");if(t?.awaitingNavigation){const e=Ft(t.pageKey,t.pageLabel),n=fe(e,t.pageRoute),r=window.location.pathname.replace(/\\/+$/,\"\")||\"/\";gt(),r===n&&window.setTimeout(()=>ft(t),220)}else t&&gt()}catch{gt()}try{const t=JSON.parse(window.sessionStorage.getItem(S)??window.sessionStorage.getItem(z)??\"null\");if(t){P=t;try{window[d]=t,window[m]=t}catch{}Wn||(oe(t),wt(t,{colorReplacements:!1}))}}catch{}let j=!1,Q=null,nt=null,Vt=null,J=null,Et=[],rt=null;function ye(){if(document.querySelector(\"[data-fivora-empty-editable-styles]\"))return;const t=document.createElement(\"style\");t.setAttribute(\"data-fivora-empty-editable-styles\",\"true\"),t.textContent=`\n [${v}=\"true\"] {\n min-width: 7rem !important;\n min-height: 1.25em !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n span[${v}=\"true\"],\n a[${v}=\"true\"],\n strong[${v}=\"true\"],\n em[${v}=\"true\"],\n small[${v}=\"true\"],\n label[${v}=\"true\"] {\n display: inline-block !important;\n }\n [${v}=\"true\"]:empty::before {\n content: \"\";\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${v}=\"true\"]:empty:hover::before {\n content: \"Click to add text\";\n }\n [${V}=\"true\"] {\n min-width: 10rem !important;\n min-height: 3.5rem !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n [${V}=\"true\"]:empty::before {\n content: \"\";\n display: inline-flex;\n align-items: center;\n min-height: 3.5rem;\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n [${V}=\"true\"]:empty:hover::before {\n content: \"Click to add the first item\";\n }\n `,document.head.appendChild(t)}__name(ye,\"ensureEmptyEditableStyles\");function nn(t){if(t.id)return\"#\"+CSS.escape(t.id);const e=[];let n=t;for(;n&&n!==document.body;){const r=n.tagName.toLowerCase(),o=n.parentElement?Array.from(n.parentElement.children).filter(a=>a.tagName===n?.tagName):[],i=o.indexOf(n)+1;e.unshift(o.length>1?`${r}:nth-of-type(${i})`:r),n=n.parentElement}return e.length>0?`body > ${e.join(\" > \")}`:\"\"}__name(nn,\"buildStructuralSelector\");function qt(){try{const t=JSON.parse(window.sessionStorage.getItem(Y)??\"{}\");return t&&typeof t==\"object\"?t:{}}catch{return{}}}__name(qt,\"readResolvedTargetSelectors\");function rn(t,e){const n=nn(t);if(!n)return;const r=qt();r[`${window.location.pathname}|${e}`]=n;try{window.sessionStorage.setItem(Y,JSON.stringify(r))}catch{}}__name(rn,\"rememberResolvedTarget\");function Un(){const t=qt(),e=`${window.location.pathname}|`;let n=!1;for(const r of Object.keys(t))r.startsWith(e)&&(delete t[r],n=!0);if(n)try{window.sessionStorage.setItem(Y,JSON.stringify(t))}catch{}}__name(Un,\"forgetResolvedTargetsForCurrentPage\");function zn(t,e){let n=document.getElementById(\"fivora-dynamic-empty-styles\");n||(n=document.createElement(\"style\"),n.id=\"fivora-dynamic-empty-styles\",document.head.appendChild(n));const r=[];targetRegistry.getDynamicTargets().forEach((c,u)=>{const p=\"fivora-target-\"+u;c.hasAttribute(\"data-fivora-id\")||c.setAttribute(\"data-fivora-id\",p)});const o=__name(c=>{const u=[];for(const p of c){const g=CSS.escape(p);u.push(`[data-preview-field-path=\"${g}\"]`),u.push(`[data-preview-list-path=\"${g}\"]`),targetRegistry.findTargets(p).forEach(w=>{const h=w.getAttribute(\"data-fivora-id\");h&&u.push(`[data-fivora-id=\"${CSS.escape(h)}\"]`)})}return u.length>0?u.join(\", \"):null},\"buildSelectors\"),i=o(t);i&&r.push(`\n ${i} {\n min-width: 7rem !important;\n min-height: 1.25em !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n ${i.replace(/,/g,\":empty::before,\")} :empty::before {\n content: \"\";\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n ${i.replace(/,/g,\":empty:hover::before,\")} :empty:hover::before {\n content: \"Click to add text\";\n }\n `);const a=o(e);a&&r.push(`\n ${a} {\n min-width: 10rem !important;\n min-height: 3.5rem !important;\n outline: 1px dashed rgba(37, 99, 235, 0.28) !important;\n outline-offset: 3px !important;\n }\n ${a.replace(/,/g,\":empty::before,\")} :empty::before {\n content: \"\";\n display: inline-flex;\n align-items: center;\n min-height: 3.5rem;\n color: rgba(37, 99, 235, 0.78);\n font: 500 12px/1.4 system-ui, sans-serif;\n letter-spacing: normal;\n text-transform: none;\n white-space: nowrap;\n }\n ${a.replace(/,/g,\":empty:hover::before,\")} :empty:hover::before {\n content: \"Click to add the first item\";\n }\n `),n.textContent=r.join(`\n`)}__name(zn,\"updateDynamicStyles\");function be(){document.querySelectorAll(`[${F}]`).forEach(t=>{J?.target!==t&&(t.removeAttribute(F),t.removeAttribute(v),t.removeAttribute(V))})}__name(be,\"clearResolvedEditableTargets\");function ht(t,e,n=!0){const r=targetRegistry.getPath(t),o=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(B)??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\");if(r&&r!==e.path&&o!==e.path)return!1;t.setAttribute(F,e.path);const i=String(e.value??\"\").trim().length===0&&x(t.textContent).length===0;j&&i&&t.tagName!==\"IMG\"?t.setAttribute(v,\"true\"):t.removeAttribute(v);const a=e.kind===\"collection\"||e.type===\"list\",c=e.collection?.length;return j&&a&&(c===0||t.childElementCount===0)?(t.setAttribute(V,\"true\"),t.removeAttribute(v)):t.removeAttribute(V),n&&!a&&rn(t,e.path),!0}__name(ht,\"annotateEditableTarget\");function tt(t){const e=[t.value,...t.matchValues??[]].filter(n=>typeof n==\"number\"||typeof n==\"string\"&&n.trim().length>0);return Array.from(new Set(e.map(n=>String(n))))}__name(tt,\"editableFieldMatchValues\");function on(t){for(const e of ut(t)){const n=CSS.escape(e),r=document.querySelector(`[data-preview-field-path=\"${n}\"], [${B}=\"${n}\"], [data-content-path=\"${n}\"], [data-field-path=\"${n}\"], [${F}=\"${n}\"]`);if(r)return r}return null}__name(on,\"findExplicitEditableTarget\");function an(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const n=qt()[`${window.location.pathname}|${t.path}`];if(!n)return null;try{const r=document.querySelector(n);if(!r)return null;const o=tt(t).map(x),i=x(r.textContent);return o.length>0&&i&&!o.includes(i)?null:(ht(r,t,!1),r)}catch{return null}}__name(an,\"restoreRememberedTarget\");function sn(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const n=(t.context?ue({collectionPath:t.context.collectionPath,itemIndex:t.context.itemIndex,fieldKey:t.context.fieldKey,itemValues:t.context.itemValues}):null)??document;for(const r of tt(t)){const o=kt(n,r,t.context?.fieldKey),i=[...Mt(n,r),...o?[o]:[],...Lt(n,r,t.context?.fieldKey)];for(const a of i){if(a.closest(`[${U}]`))continue;const c=a.getAttribute(F);if(!c||c===t.path)return a}}return null}__name(sn,\"inferEditableTarget\");function cn(t){if(j){ye(),me();for(const e of q){const n=on(e.path)??an(e)??(t?.explicitOnly?null:sn(e));n&&ht(n,e)}}}__name(cn,\"indexEditableTargets\");let Gt=!1;function we(){for(const e of Et)window.clearTimeout(e);if(Et=[],rt!==null){const e=window.cancelIdleCallback;typeof e==\"function\"?e(rt):window.clearTimeout(rt),rt=null}if(Gt)return;Gt=!0;const t=__name((e,n)=>{n&&(Gt=!1),e&&be(),cn({explicitOnly:e})},\"runPass\");Et=[window.setTimeout(()=>{t(!0,!0)},0)]}__name(we,\"scheduleEditableTargetIndex\");function ln(){const t=document.createElement(\"div\");return t.setAttribute(\"data-fivora-edit-badge\",\"true\"),t.innerHTML=\"\\u270F\\uFE0F\",Object.assign(t.style,{position:\"fixed\",zIndex:\"2147483647\",width:\"28px\",height:\"28px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"14px\",borderRadius:\"8px\",background:\"rgba(37, 99, 235, 0.92)\",color:\"#fff\",cursor:\"pointer\",pointerEvents:\"auto\",boxShadow:\"0 2px 8px rgba(0,0,0,0.18)\",opacity:\"0\",transition:\"opacity 0.15s ease\",userSelect:\"none\"}),t.setAttribute(\"title\",\"Edit this content\"),t.setAttribute(\"aria-label\",\"Edit this content\"),document.body.appendChild(t),t}__name(ln,\"createHoverBadge\");function dn(t){if(!Q)return;const e=t.getBoundingClientRect();Q.style.top=`${Math.max(4,e.top-4)}px`,Q.style.left=`${Math.min(window.innerWidth-36,e.right-32)}px`,Q.style.opacity=\"1\"}__name(dn,\"positionBadge\");function xt(){Vt&&(Vt(),Vt=null),Q&&(Q.style.opacity=\"0\"),nt=null}__name(xt,\"clearHoverOverlay\");function un(t){if(t===nt)return;xt(),nt=t;const e=t.style.outline,n=t.style.outlineOffset,r=t.style.cursor;t.style.outline=\"2px dashed rgba(37, 99, 235, 0.6)\",t.style.outlineOffset=\"2px\",t.style.cursor=\"pointer\",Vt=__name(()=>{t.style.outline=e,t.style.outlineOffset=n,t.style.cursor=r},\"hoverOutlineCleanup\"),dn(t)}__name(un,\"applyHoverOverlay\");function Ae(t){let e=t instanceof Element?t:null;for(;e&&!(e instanceof HTMLElement);)e=e.parentElement;let n=e;for(;n&&n!==document.body;){if(n.hasAttribute(U)){n=n.parentElement;continue}if(n.hasAttribute(\"data-preview-field-path\")||n.hasAttribute(B)||n.hasAttribute(D)||n.hasAttribute(\"data-content-path\")||n.hasAttribute(\"data-field-path\")||n.hasAttribute(F)||n.matches(Gn)){const o=Bt(n);if(o)return{element:n,field:o}}n=n.parentElement}return null}__name(Ae,\"findEditableTarget\");function Bt(t){if(t.closest(`[${U}]`))return null;const e=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\")??targetRegistry.getPath(t);if(e)return q.find(g=>ut(g.path).includes(e))??{path:e,label:e.split(\".\").pop()??\"Content\",type:t.tagName===\"IMG\"?\"image\":\"text\",value:t.tagName===\"IMG\"?t.src:t.textContent?.trim()??\"\"};const n=t.getAttribute(D);if(n){const p=n.match(/^(.+)\\[(\\d+)\\]$/);if(p){const g=p[1],w=Number(p[2]),h=q.find(A=>(A.kind===\"collection\"||A.type===\"list\")&&ut(A.path).includes(g));if(h)return{...h,collection:{listPath:g,itemIndex:w,length:h.collection?.length??0,minItems:h.collection?.minItems,maxItems:h.collection?.maxItems,itemLabel:h.collection?.itemLabel}}}}const r=t.getAttribute(B);if(r)return q.find(g=>(g.kind===\"collection\"||g.type===\"list\")&&ut(g.path).includes(r))??{kind:\"collection\",path:r,label:r.split(\".\").pop()??\"Collection\",type:\"list\",value:0,collection:{listPath:r,length:t.children.length}};const o=t.tagName===\"IMG\"?t:t.querySelector(\"img\");if(o){const p=q.find(h=>h.type===\"image\"&&tt(h).some(A=>ae(o,A)));if(p)return p;const g=Se(o);if(g.collectionPath&&typeof g.itemIndex==\"number\"){const h=q.find(A=>A.type===\"image\"&&A.context?.collectionPath===g.collectionPath&&A.context?.itemIndex===g.itemIndex);if(h)return h}const w=o.closest('section, article, [data-preview-page-key], main, header, footer, .card, [class*=\"section\"]');if(w){const h=w.getAttribute(\"data-preview-field-path\")||w.getAttribute(\"data-content-path\")||w.getAttribute(\"data-field-path\")||w.getAttribute(F);if(h){const A=h.split(\".\")[0],L=q.find(K=>K.type===\"image\"&&(K.path.startsWith(`${A}.`)||K.path.startsWith(`${h}.`)));if(L)return L}}if(t.tagName===\"IMG\"){const h=q.filter(L=>L.type===\"image\");if(h.length===1)return h[0];const A=o.getAttribute(\"src\")||o.src||\"\";return{path:e||\"image\",label:(e||\"\").split(\".\").pop()||\"Image\",type:\"image\",value:A}}}const i=q.filter(p=>tt(p).some(g=>Ot(t,g)));if(i.length===1)return i[0];const a=x(t.textContent);if(!a)return null;const c=q.filter(p=>typeof p.value!=\"boolean\"&&tt(p).some(g=>x(g)===a));if(c.length===1)return c[0];const u=q.filter(p=>typeof p.value==\"boolean\"?!1:tt(p).some(g=>{const w=x(g);return w.length>=3&&a.includes(w)})).sort((p,g)=>Math.max(...tt(g).map(w=>x(w).length),0)-Math.max(...tt(p).map(w=>x(w).length),0));return u.length===1?u[0]:null}__name(Bt,\"resolveEditableField\");function fn(t,e){return t.tagName!==\"IMG\"&&t.childElementCount===0&&![\"INPUT\",\"TEXTAREA\",\"SELECT\",\"OPTION\",\"VIDEO\",\"AUDIO\",\"IFRAME\"].includes(t.tagName)&&!e.context&&![\"image\",\"color\",\"boolean\",\"select\",\"list\"].includes(e.type??\"text\")}__name(fn,\"canEditInline\");function pn(t){let e=t;for(;e&&e!==document.body;){const n=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(B)??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(F);if(n)return n;e=e.parentElement}return null}__name(pn,\"extractFieldPath\");function Se(t){let e=t;for(;e&&e!==document.body;){const n=e.getAttribute(D);if(n){const i=n.match(/^(.+)\\[(\\d+)\\]$/);if(i)return{collectionPath:i[1],itemIndex:Number(i[2])}}const r=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(F);if(r){const i=r.match(/^(.+)\\[(\\d+)\\]/);if(i)return{collectionPath:i[1],itemIndex:Number(i[2])}}const o=e.getAttribute(B);if(o)return{collectionPath:o,itemIndex:null};e=e.parentElement}return{collectionPath:null,itemIndex:null}}__name(Se,\"extractCollectionContext\");function Ee(t,e){const n=[],r=new Set(e?.path?[e.path]:[]);let o=t,i=0;for(;o&&o!==document.body&&i<3&&!(o.hasAttribute(U)||i>0&&(o.hasAttribute(D)||o.hasAttribute(B)||o.tagName===\"SECTION\"));){if(o.hasAttribute(\"data-preview-field-path\")||o.hasAttribute(\"data-content-path\")||o.hasAttribute(\"data-field-path\")||o.hasAttribute(F)){const a=Bt(o);a?.path&&a.kind!==\"collection\"&&a.type!==\"list\"&&!r.has(a.path)&&(r.add(a.path),n.push({path:a.path,label:a.label??a.path.split(\".\").pop()??\"Content\",type:a.type??\"text\"}))}o=o.parentElement,i+=1}return n}__name(Ee,\"findRelatedAncestorFields\");function gn(t,e,n=Ee(t,e)){const r=t.getBoundingClientRect(),o=window.getComputedStyle(t),i=t.tagName===\"IMG\",a=e?.path??pn(t),c=i?t.src:t.textContent?.trim()??\"\",u=Se(t);let p=e?.collection?.listPath??e?.collection?.path??e?.context?.collectionPath??u.collectionPath,g=e?.collection?.itemIndex??e?.context?.itemIndex??u.itemIndex;p&&a&&e?.kind!==\"collection\"&&!a.startsWith(`${p}[`)&&!a.startsWith(`${p}.`)&&a!==p&&(p=null,g=null);const w=e?.context?.itemPath??(p&&typeof g==\"number\"?`${p}[${g}]`:null),h=__name(Ct=>String(Ct??\"\").trim().replace(/[^a-zA-Z0-9_.-]+/g,\"-\").replace(/^-+|-+$/g,\"\").slice(0,64),\"safeScopePart\"),A=[],L=__name((Ct,zt,Kt)=>{!zt||A.some(Yt=>Yt.key===zt)||A.push({kind:Ct,key:zt,label:Kt})},\"pushStyleScope\");L(\"element\",a,\"This element\");const K=t.closest(`[${D}]`);L(\"card\",K?.getAttribute(D)??w,\"This card\");const Wt=t.closest(`[${B}]`);L(\"grid\",Wt?.getAttribute(B)??p,\"Entire grid\");const jt=t.closest(\"[data-preview-page-key]\"),Ut=h(jt?.getAttribute(\"data-preview-page-key\")),et=t.closest(\"section,[data-design-section],[data-section-id]\");if(et){const Ct=h(et.getAttribute(\"data-design-section\")??et.getAttribute(\"data-section-id\")??et.id),Kt=(et.parentElement?Array.from(et.parentElement.children).filter(Jn=>Jn.tagName===\"SECTION\"):[]).indexOf(et)+1,Yt=Ct||(Kt>0?`nth-${Kt}`:\"\");L(\"section\",Yt?`section:${Ut||\"all\"}:${Yt}`:null,\"This section\")}L(\"page\",Ut?`page:${Ut}`:null,\"Current page\"),L(\"site\",\"site:all\",\"Whole website\");const Sn={type:On,fieldPath:a,descriptorKind:e?.kind??\"field\",fieldValue:c,elementTag:t.tagName.toLowerCase(),isImage:i,boundingRect:{top:r.top,left:r.left,width:r.width,height:r.height},computedStyle:{fontFamily:o.fontFamily,fontSize:o.fontSize,lineHeight:o.lineHeight,fontWeight:o.fontWeight,letterSpacing:o.letterSpacing,color:o.color,backgroundColor:o.backgroundColor,textAlign:o.textAlign,width:o.width,height:o.height,minWidth:o.minWidth,minHeight:o.minHeight,maxWidth:o.maxWidth,maxHeight:o.maxHeight,marginTop:o.marginTop,marginRight:o.marginRight,marginBottom:o.marginBottom,marginLeft:o.marginLeft,paddingTop:o.paddingTop,paddingRight:o.paddingRight,paddingBottom:o.paddingBottom,paddingLeft:o.paddingLeft,borderRadius:o.borderRadius},listPath:p,itemPath:w,collectionPath:p,itemIndex:g,relatedFields:n,styleScopes:A};W(Sn),W({...Sn,type:Mn})}__name(gn,\"emitClickEvent\");function mn(t,e){W({type:Ln,fieldPath:t,value:e}),W({type:kn,fieldPath:t,value:e})}__name(mn,\"emitFieldChange\");function pt(t){const e=J;if(!e)return;J=null,e.target.removeEventListener(\"keydown\",e.keydown),e.target.removeEventListener(\"blur\",e.blur);const n=t?(e.target.innerText??e.target.textContent??\"\").replace(/\\u00a0/g,\" \").trim():\"\";e.contentEditable===null?e.target.removeAttribute(\"contenteditable\"):e.target.setAttribute(\"contenteditable\",e.contentEditable),e.spellcheck===null?e.target.removeAttribute(\"spellcheck\"):e.target.setAttribute(\"spellcheck\",e.spellcheck),e.target.style.outline=e.outline,e.target.style.outlineOffset=e.outlineOffset,e.target.style.cursor=e.cursor,e.target.style.userSelect=e.userSelect,e.target.style.textTransform=e.textTransform,e.target.innerHTML=e.originalHtml,t&&(n!==e.originalText.trim()?(e.field.value=n,ht(e.target,e.field),mn(e.field.path,n)):n||ht(e.target,e.field))}__name(pt,\"finishInlineEdit\");function hn(t,e,n){if(J?.target===t)return;pt(!0),xt(),ht(t,e),t.removeAttribute(v);const r=typeof e.value==\"string\"||typeof e.value==\"number\"?String(e.value):t.textContent??\"\",o=t.innerHTML,i=__name(c=>{if(c.key===\"Escape\"){c.preventDefault(),pt(!1);return}c.key===\"Enter\"&&e.type!==\"textarea\"&&!c.shiftKey&&(c.preventDefault(),pt(!0))},\"keydown\"),a=__name(()=>pt(!0),\"blur\");if(J={target:t,field:e,originalText:r,originalHtml:o,contentEditable:t.getAttribute(\"contenteditable\"),spellcheck:t.getAttribute(\"spellcheck\"),outline:t.style.outline,outlineOffset:t.style.outlineOffset,cursor:t.style.cursor,userSelect:t.style.userSelect,textTransform:t.style.textTransform,keydown:i,blur:a},t.setAttribute(\"contenteditable\",Bn?\"plaintext-only\":\"true\"),t.setAttribute(\"spellcheck\",\"true\"),t.textContent=r,t.style.outline=\"2px solid rgba(37, 99, 235, 0.95)\",t.style.outlineOffset=\"3px\",t.style.cursor=\"text\",t.style.userSelect=\"text\",t.style.textTransform=\"none\",t.addEventListener(\"keydown\",i),t.addEventListener(\"blur\",a),t.focus(),n){const c=document,u=c.caretPositionFromPoint?.(n.x,n.y),p=u?(()=>{const g=document.createRange();return g.setStart(u.offsetNode,u.offset),g.collapse(!0),g})():c.caretRangeFromPoint?.(n.x,n.y);if(p){const g=window.getSelection();g?.removeAllRanges(),g?.addRange(p)}}else{const c=document.createRange();c.selectNodeContents(t);const u=window.getSelection();u?.removeAllRanges(),u?.addRange(c)}}__name(hn,\"beginInlineEdit\");let yt=null;function xe(t){if(!j||J||Ht||yt!==null)return;const e=t.target;yt=requestAnimationFrame(()=>{if(yt=null,!j||J)return;const n=Ae(e);n&&!n.element.hasAttribute(\"data-fivora-edit-badge\")&&un(n.element)})}__name(xe,\"onEditMouseOver\");function Ce(t){if(!j)return;const e=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null;e&&(e===Q||e===nt||nt?.contains(e))||xt()}__name(Ce,\"onEditMouseOut\");function Te(t){if(!j||J&&t.target instanceof Node&&J.target.contains(t.target))return;const e=t.target instanceof HTMLElement&&t.target.hasAttribute(\"data-fivora-edit-badge\")?t.target:null,n=e?nt?{element:nt,field:Bt(nt)}:null:Ae(t.target),r=n?.element,o=n?.field;if(!r||!o)return;t.preventDefault(),t.stopPropagation();const i=Ee(r,o);!jn&&fn(r,o)&&i.length===0?hn(r,o,e?void 0:{x:t.clientX,y:t.clientY}):gn(r,o,i)}__name(Te,\"onEditClick\");function yn(){j||(j=!0,pe(),ye(),!Ht&&!Q&&(Q=ln()),Ht||(document.addEventListener(\"mouseover\",xe,!0),document.addEventListener(\"mouseout\",Ce,!0)),document.addEventListener(\"click\",Te,!0),document.addEventListener(\"submit\",ve,!0),we())}__name(yn,\"enterEditMode\");function ve(t){j&&(t.preventDefault(),t.stopPropagation())}__name(ve,\"preventEditModeSubmit\");function bn(){if(j){j=!1,Gt=!1,pt(!0),xt(),yt!==null&&(cancelAnimationFrame(yt),yt=null);for(const t of Et)window.clearTimeout(t);if(Et=[],rt!==null){const t=window.cancelIdleCallback;typeof t==\"function\"?t(rt):window.clearTimeout(rt),rt=null}be(),document.querySelectorAll(`[${v}], [${V}]`).forEach(t=>{t.removeAttribute(v),t.removeAttribute(V)}),document.removeEventListener(\"mouseover\",xe,!0),document.removeEventListener(\"mouseout\",Ce,!0),document.removeEventListener(\"click\",Te,!0),document.removeEventListener(\"submit\",ve,!0)}}__name(bn,\"exitEditMode\");const Kn=window.history.pushState.bind(window.history),Yn=window.history.replaceState.bind(window.history);window.history.pushState=(...t)=>{Kn(...t),window.setTimeout(bt,0)},window.history.replaceState=(...t)=>{Yn(...t),window.setTimeout(bt,0)},window.addEventListener(\"popstate\",bt);function wn(){return window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|[^/]+)\\/[^/]+)/)?.[1]??\"\"}__name(wn,\"resolvePreviewRootPrefix\");function An(t){if(t.target&&t.target!==\"_self\"||t.hasAttribute(\"download\"))return!1;const e=t.getAttribute(\"href\");if(!e||e.startsWith(\"#\")||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(e))return!1;let n;try{n=new URL(e,window.location.href)}catch{return!1}if(n.origin!==window.location.origin)return!1;const r=wn();if(r&&!n.pathname.startsWith(r))return!1;const o=window.location.pathname.replace(/\\/+$/,\"\")||\"/\",i=n.pathname.replace(/\\/+$/,\"\")||\"/\";return o!==i||n.search!==window.location.search}__name(An,\"isInternalPreviewNavigation\"),document.addEventListener(\"click\",t=>{if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const e=t.target?.closest?.(\"a[href]\");!e||!An(e)||(t.preventDefault(),t.stopPropagation(),window.location.assign(e.href))},!0),bt()})(function(I){const O=__name((y,k)=>{if(!y||y.trim()===\"null\")return null;try{const $=new URL(y,k??void 0).origin;return $===\"null\"?null:$}catch{return null}},\"normalizeOrigin\"),_=O(I.currentOrigin),C=O(I.ancestorOrigin,_),H=O(I.accessibleParentOrigin,_),s=O(I.referrer,_),l=O(I.rememberedOrigin);return C??H??(s&&s!==_?s:null)??l??s},function(I){const O=__name(f=>!!f&&typeof f==\"object\"&&!Array.isArray(f),\"isRecord\"),_=O(I)&&(I.designCustomizationVersion===1||!!I.elementStyles||!!I.sections);if(!O(I)||!_)return\"\";const C=I,H=__name(f=>{if(typeof f==\"number\")return`${f}px`;if(typeof f!=\"string\")return\"\";const E=f.trim();return!E||E.length>160||/[;{}<>\\r\\n]/.test(E)||/(?:url\\s*\\(|expression\\s*\\(|@import|javascript:)/i.test(E)?\"\":E},\"safeValue\"),s=__name(f=>H(C[f]),\"read\"),l=__name((f,E)=>E?`${f}:${E} !important;`:\"\",\"declaration\"),y=__name((f,E)=>{const S=E.filter(Boolean).join(\"\");return S?`${f}{${S}}`:\"\"},\"rule\"),k=__name(f=>f?[l(\"background\",f),l(\"background-color\",f),\"background-image:none !important;\"]:[],\"backgroundDeclarations\"),$=__name(f=>f===\"start\"?\"flex-start\":f===\"end\"?\"flex-end\":f===\"center\"||f===\"stretch\"?f:\"\",\"alignItems\"),R=__name(f=>{const E=Number(f);return Number.isInteger(E)&&E>=1&&E<=6?`repeat(${E},minmax(0,1fr))`:\"\"},\"gridColumns\"),T=(()=>{const f=Number(s(\"headingScale\"));return Number.isFinite(f)&&f>=.75&&f<=2?String(f):\"\"})(),N=__name(f=>({none:\"none\",subtle:\"0 4px 14px rgba(15,23,42,.08)\",medium:\"0 12px 30px rgba(15,23,42,.14)\",strong:\"0 22px 55px rgba(15,23,42,.22)\"})[f]??\"\",\"shadow\"),X=[[\"--brand-color\",s(\"primaryColor\")],[\"--brand-primary\",s(\"primaryColor\")],[\"--primary-color\",s(\"primaryColor\")],[\"--color-primary\",s(\"primaryColor\")],[\"--brand-secondary\",s(\"secondaryColor\")],[\"--secondary-color\",s(\"secondaryColor\")],[\"--brand-accent\",s(\"accentColor\")],[\"--accent-color\",s(\"accentColor\")],[\"--page-background\",s(\"backgroundColor\")],[\"--page-text\",s(\"textColor\")],[\"--bg-primary\",s(\"canvasColor\")],[\"--bg-secondary\",s(\"surfaceColor\")],[\"--surface\",s(\"surfaceColor\")],[\"--card-bg\",s(\"surfaceColor\")],[\"--background\",s(\"canvasColor\")],[\"--brand-primary\",s(\"brandPrimary\")],[\"--brand-secondary\",s(\"brandSecondary\")],[\"--brand-accent\",s(\"brandAccent\")],[\"--primary\",s(\"brandPrimary\")],[\"--secondary\",s(\"brandSecondary\")],[\"--accent\",s(\"brandAccent\")],[\"--text-primary\",s(\"textPrimary\")],[\"--text-secondary\",s(\"textSecondary\")],[\"--text-muted\",s(\"textMuted\")],[\"--muted\",s(\"textMuted\")],[\"--border-primary\",s(\"borderColor\")],[\"--border-secondary\",s(\"borderColor\")],[\"--border\",s(\"borderColor\")],[\"--card-radius\",s(\"cardRadius\")],[\"--button-radius\",s(\"buttonRadius\")],[\"--image-radius\",s(\"imageRadius\")]],G=new Set([\"sans-serif\",\"serif\",\"monospace\",\"inherit\",\"initial\",\"system-ui\",\"system sans\",\"editorial serif\"]),F=new Set,v=__name(f=>{if(typeof f==\"string\"&&f.trim()){const E=f.split(\",\")[0].replace(/['\"]/g,\"\").trim();E&&!G.has(E.toLowerCase())&&!E.toLowerCase().includes(\"system\")&&F.add(E)}},\"addFont\");v(C.headingFont),v(C.bodyFont);const V=O(C.elementStyles)?C.elementStyles:{};for(const f of Object.values(V))O(f)&&v(f.fontFamily);const D=[...Array.from(F).map(f=>`@import url('https://fonts.googleapis.com/css2?family=${encodeURIComponent(f).replace(/%20/g,\"+\")}:wght@300;400;500;600;700;800&display=swap');`),y(\":root,body\",X.map(([f,E])=>l(f,E))),y(\"html\",[l(\"font-size\",s(\"baseSize\"))]),y(\"body\",[l(\"font-family\",s(\"bodyFont\")?`${s(\"bodyFont\")},sans-serif`:\"\"),l(\"font-weight\",s(\"bodyWeight\")),l(\"line-height\",s(\"bodyLineHeight\")),l(\"letter-spacing\",s(\"letterSpacing\")),...k(s(\"backgroundColor\")),l(\"color\",s(\"textColor\"))]),y(\"body :where(h1,h2,h3,h4,h5,h6)\",[l(\"font-family\",s(\"headingFont\")?`${s(\"headingFont\")},sans-serif`:\"\"),l(\"font-weight\",s(\"headingWeight\")),l(\"line-height\",s(\"headingLineHeight\")),l(\"color\",s(\"headingColor\"))]),y('body :where(p,small,.muted,[class*=\"muted\"])',[l(\"color\",s(\"mutedTextColor\"))]),T?`body h1{font-size:calc(2.5rem * ${T}) !important}body h2{font-size:calc(2rem * ${T}) !important}body h3{font-size:calc(1.5rem * ${T}) !important}body h4{font-size:calc(1.25rem * ${T}) !important}`:\"\",y(\"body header\",[...k(s(\"headerBackgroundColor\")),l(\"min-height\",s(\"headerHeight\"))]),y(\"body footer\",[...k(s(\"footerBackgroundColor\"))]),y(\"body main\",[...k(s(\"backgroundColor\")),l(\"color\",s(\"textColor\"))]),y(\"body main > section,body main [data-preview-page-key] > section\",[l(\"padding-block\",s(\"sectionPadding\")),l(\"text-align\",s(\"textAlign\"))]),y(\"body main :where(section,[data-design-section]) :where(h1,h2,h3,h4,h5,h6,p,[data-design-text])\",[l(\"text-align\",s(\"textAlign\"))]),y(\"body main > section + section,body main [data-preview-page-key] > section + section\",[l(\"margin-top\",s(\"sectionGap\"))]),y('body main :where([class*=\"flex\"],[class*=\"grid\"],[data-design-stack])',[l(\"gap\",s(\"elementGap\"))]),y(\"body main > section:nth-of-type(even),body main [data-preview-page-key] > section:nth-of-type(even)\",k(s(\"surfaceAltColor\"))),y(\"body main > section:nth-of-type(odd),body main [data-preview-page-key] > section:nth-of-type(odd)\",k(s(\"surfaceColor\"))),y(\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",[l(\"min-height\",s(\"heroMinHeight\")),l(\"text-align\",s(\"heroTextAlign\"))]),y('body main > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text]),body main [data-preview-page-key] > section:first-of-type :where(h1,h2,h3,h4,h5,h6,p,[class*=\"container\"],[data-design-text])',[l(\"text-align\",s(\"heroTextAlign\"))]),y('body main :where([class*=\"container\"],[class~=\"container\"],[data-design-container])',[l(\"max-width\",s(\"contentMaxWidth\")),l(\"padding-inline\",s(\"containerPadding\")),s(\"contentMaxWidth\")?\"margin-inline:auto !important;\":\"\"]),y('body main :where(section,[data-design-section]) > :where([class*=\"flex\"],[data-design-content])',[l(\"align-items\",$(s(\"contentAlign\"))),l(\"justify-items\",s(\"contentAlign\"))]),y(\"body main :where([data-preview-list-path],[data-design-grid])\",[R(s(\"gridColumns\"))?\"display:grid !important;\":\"\",l(\"grid-template-columns\",R(s(\"gridColumns\"))),l(\"gap\",s(\"gridGap\"))]),y('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])',[l(\"width\",s(\"cardWidth\")),s(\"cardWidth\")?\"max-width:100% !important;\":\"\",l(\"min-height\",s(\"cardMinHeight\")),l(\"padding\",s(\"cardPadding\")),l(\"border-radius\",s(\"cardRadius\")),l(\"border-width\",s(\"cardBorderWidth\")),s(\"cardBorderWidth\")?\"border-style:solid !important;\":\"\",l(\"border-color\",s(\"borderColor\")),...k(s(\"cardBackgroundColor\")),l(\"box-shadow\",N(s(\"cardShadow\"))),l(\"text-align\",s(\"cardTextAlign\"))]),y('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"]) :where(h1,h2,h3,h4,h5,h6,p,span,[data-design-text])',[l(\"text-align\",s(\"cardTextAlign\"))]),y('body main :where(button,a[class*=\"btn\"],a[class*=\"button\"],[data-design-button])',[l(\"padding\",s(\"buttonPadding\")),l(\"border-radius\",s(\"buttonRadius\")),...k(s(\"buttonBackgroundColor\")),l(\"color\",s(\"buttonTextColor\")),l(\"box-shadow\",N(s(\"buttonShadow\")))]),y(\"body main img\",[l(\"border-radius\",s(\"imageRadius\"))])],U=O(C.sections)?C.sections:{};for(const[f,E]of Object.entries(U)){if(!/^[a-zA-Z0-9_-]{1,64}$/.test(f)||!O(E))continue;const S=__name(M=>H(E[M]),\"sectionRead\"),z=S(\"backgroundColor\"),d=['[class*=\"absolute\"][class*=\"inset-0\"]','[class*=\"fixed\"][class*=\"inset-0\"]','[class*=\"absolute\"][class*=\"inset-x-0\"][class*=\"inset-y-0\"]','[class*=\"absolute\"][class*=\"top-0\"][class*=\"right-0\"][class*=\"bottom-0\"][class*=\"left-0\"]'].join(\",\"),b={all:\"body main section\",hero:\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",header:\"body header\",footer:\"body footer\",cards:'body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])'}[f]??`body :where([data-preview-page-key=\"${f}\"] > section,[data-design-section=\"${f}\"],[data-section-id=\"${f}\"],section#${f},section.${f})`;D.push(y(b,[E.visible===!1?\"display:none !important;\":\"\",...k(z),l(\"color\",S(\"textColor\")),l(\"min-height\",S(\"minHeight\")),l(\"padding-block\",S(\"padding\")),l(\"max-width\",S(\"contentMaxWidth\")),l(\"gap\",S(\"gap\")),l(\"text-align\",S(\"textAlign\")),l(\"align-items\",$(S(\"contentAlign\")))]),y(`${b} :where(h1,h2,h3,h4,h5,h6)`,[l(\"color\",S(\"headingColor\")),l(\"text-align\",S(\"textAlign\"))]),y(`${b} :where(p,span,[data-design-text])`,[l(\"text-align\",S(\"textAlign\"))]),y(`${b} :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`,[...k(S(\"cardBackgroundColor\")),l(\"width\",S(\"cardWidth\")),S(\"cardWidth\")?\"max-width:100% !important;\":\"\",l(\"min-height\",S(\"cardMinHeight\")),l(\"border-radius\",S(\"cardRadius\"))]),y(`${b} :where([data-preview-list-path],[data-design-grid])`,[R(S(\"gridColumns\"))?\"display:grid !important;\":\"\",l(\"grid-template-columns\",R(S(\"gridColumns\")))]),y(`${b}::before,${b}::after`,z?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),y(`${b} > :where(${d})`,z?[\"background:none !important;\",\"background-image:none !important;\",\"box-shadow:none !important;\",\"mask-image:none !important;\",\"-webkit-mask-image:none !important;\"]:[]),y(`${b} > :where(${d})::before,${b} > :where(${d})::after`,z?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),y(`${b} > :where(${d}) :where(img,video,canvas,picture)`,z?[\"opacity:0.2 !important;\"]:[]))}const ot=O(C.elementStyles)?C.elementStyles:{},Y=[[\"fontFamily\",\"font-family\"],[\"fontSize\",\"font-size\"],[\"lineHeight\",\"line-height\"],[\"fontWeight\",\"font-weight\"],[\"letterSpacing\",\"letter-spacing\"],[\"color\",\"color\"],[\"backgroundColor\",\"background-color\"],[\"textAlign\",\"text-align\"],[\"width\",\"width\"],[\"height\",\"height\"],[\"minWidth\",\"min-width\"],[\"minHeight\",\"min-height\"],[\"maxWidth\",\"max-width\"],[\"maxHeight\",\"max-height\"],[\"marginTop\",\"margin-top\"],[\"marginRight\",\"margin-right\"],[\"marginBottom\",\"margin-bottom\"],[\"marginLeft\",\"margin-left\"],[\"paddingTop\",\"padding-top\"],[\"paddingRight\",\"padding-right\"],[\"paddingBottom\",\"padding-bottom\"],[\"paddingLeft\",\"padding-left\"],[\"padding\",\"padding\"],[\"borderRadius\",\"border-radius\"],[\"borderWidth\",\"border-width\"],[\"borderColor\",\"border-color\"],[\"borderStyle\",\"border-style\"],[\"boxShadow\",\"box-shadow\"]];for(const[f,E]of Object.entries(ot).slice(0,256)){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(f)||!O(E))continue;const S=f.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"'),z=(()=>{if(f===\"site:all\")return\"body\";if(f.startsWith(\"page:\"))return`body :where([data-preview-page-key=\"${S.slice(5)}\"])`;if(f.startsWith(\"section:\")){const[,d=\"all\",m=\"\"]=S.split(\":\"),b=d===\"all\"?\"body main\":`body :where([data-preview-page-key=\"${d}\"])`,M=m.match(/^nth-(\\d+)$/)?.[1];return M?`${b} > section:nth-of-type(${M})`:`${b} :where([data-design-section=\"${m}\"],[data-section-id=\"${m}\"],section#${m})`}if(f.includes(\":\")){const[d,m]=S.split(\":\");if(m===\"card\")return`body [data-preview-list-path=\"${d}\"] :is([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`;if(m)return`body [data-preview-list-path=\"${d}\"] :is([data-preview-field-path$=\".${m}\"],[data-field-path$=\".${m}\"],[data-content-path$=\".${m}\"])`}return`body :is([data-preview-field-path=\"${S}\"],[data-content-path=\"${S}\"],[data-field-path=\"${S}\"],[data-fivora-resolved-field-path=\"${S}\"],[data-preview-list-path=\"${S}\"],[data-preview-item-path=\"${S}\"])`})();D.push(y(z,Y.map(([d,m])=>l(m,H(E[d])))))}return D.filter(Boolean).join(`\n`)},function(I,O){if(!O||typeof O!=\"object\"||Array.isArray(O))return I;const _=__name($=>{const R=$.trim().toLowerCase(),T=R.match(/^#([0-9a-f]{3})$/);return T?`#${[...T[1]].map(N=>N.repeat(2)).join(\"\")}`:/^#[0-9a-f]{6}$/.test(R)?R:null},\"normalize\"),C=new Map,H=new Map;for(const[$,R]of Object.entries(O).slice(0,64)){if(typeof R!=\"string\")continue;const T=_($),N=_(R);if(!T||!N||T===N)continue;C.set(T,N);const X=__name(G=>[Number.parseInt(G.slice(1,3),16),Number.parseInt(G.slice(3,5),16),Number.parseInt(G.slice(5,7),16)],\"channels\");H.set(X(T).join(\",\"),X(N)),T[1]===T[2]&&T[3]===T[4]&&T[5]===T[6]&&C.set(`#${T[1]}${T[3]}${T[5]}`,N)}if(C.size===0)return I;const s=[...C.keys()].sort(($,R)=>R.length-$.length).map($=>$.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")),l=new RegExp(`(?<!\\\\\\\\)(?:${s.join(\"|\")})(?![0-9a-f])`,\"gi\"),y=I.replace(l,$=>{const R=_($);return R?C.get(R)??$:$}),k=/(rgba?\\(\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})/gi;return y.replace(k,($,R,T,N,X,G,F)=>{const v=H.get(`${T},${X},${F}`);return v?`${R}${v[0]}${N}${v[1]}${G}${v[2]}`:$})},\"fivora-universal-design-overrides\",function(I,O){const _=O??document,C=I&&typeof I==\"object\"&&!Array.isArray(I)?I:null,H=C?.requirements&&typeof C.requirements==\"object\"&&!Array.isArray(C.requirements)?C.requirements:null,s=C?.template&&typeof C.template==\"object\"&&!Array.isArray(C.template)?C.template:null,l=s?.structure&&typeof s.structure==\"object\"&&!Array.isArray(s.structure)?s.structure:null,y=Array.isArray(H?.requiredPages),k=Array.isArray(l?.pages);if(!y&&!k)return;const $=y?H?.requiredPages:l?.pages,R=new Set($.filter(d=>typeof d==\"string\").map(d=>d.trim()).filter(Boolean)),T=Array.isArray(s?.pageDefinitions)?s.pageDefinitions:[],N=Array.isArray(l?.pageDefinitions)?l.pageDefinitions:[],G=(T.length>0?T:N).flatMap(d=>{if(!d||typeof d!=\"object\"||Array.isArray(d))return[];const m=d;if(typeof m.id!=\"string\"||!m.id.trim())return[];const b=m.id.trim(),M=typeof m.label==\"string\"&&m.label.trim()?m.label.trim():b.replace(/_/g,\" \"),Z=typeof m.route==\"string\"?m.route.trim():\"\",at=Z===\"/\"?\"/\":`/${(Z||b).replace(/^\\/+|\\/+$/g,\"\")}`;return[{id:b,label:M,route:at}]}),v=(k?l?.pages:$).filter(d=>typeof d==\"string\").map(d=>d.trim()).filter(Boolean).map((d,m)=>({id:d,label:d.replace(/_/g,\" \"),route:m===0?\"/\":`/${d}`})),V=G.length>0?G:v;if(V.length===0)return;const B=V.filter(d=>!R.has(d.id));if(B.length===0){_.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(d=>d.removeAttribute(\"data-fivora-page-disabled\"));return}let D=_.getElementById(\"fivora-page-selection-style\");(!D||D.tagName!==\"STYLE\")&&(D=_.createElement(\"style\"),D.id=\"fivora-page-selection-style\",D.textContent='[data-fivora-page-disabled=\"true\"]{display:none!important}',_.head.appendChild(D)),_.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(d=>d.removeAttribute(\"data-fivora-page-disabled\"));const U=__name(d=>{let m=d;try{const Z=new URL(d,_.baseURI);if(Z.origin!==_.location?.origin)return\"\";m=Z.pathname}catch{return\"\"}const b=m.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];b&&m.startsWith(b)&&(m=m.slice(b.length)||\"/\"),m=m.replace(/\\/index\\.html$/i,\"/\").replace(/\\.html$/i,\"\");const M=m.replace(/\\/+$/g,\"\")||\"/\";return M.startsWith(\"/\")?M:`/${M}`},\"normalizePath\"),ot=__name(d=>V.find(m=>{const b=U(m.route);return b?b===\"/\"?d===\"/\":d===b||d.startsWith(`${b}/`):!1}),\"pageForPath\"),Y=__name(d=>{for(const m of[\"href\",\"formaction\",\"data-href\",\"data-route\",\"data-url\"]){const b=d.getAttribute(m);if(!b)continue;const M=ot(U(b));if(M)return M}},\"pageForControl\"),f=__name(d=>{d&&d.setAttribute(\"data-fivora-page-disabled\",\"true\")},\"disable\");for(const d of B)for(const m of[\"data-page-key\",\"data-required-page\",\"data-target-page\"])_.querySelectorAll(`[${m}]`).forEach(b=>{b.getAttribute(m)===d.id&&f(b)});const E=Array.from(_.querySelectorAll(\"a[href]\"));for(const d of E){const m=Y(d);if(!m||R.has(m.id))continue;if(d.classList.contains(\"absolute\")&&(d.classList.contains(\"inset-0\")||d.classList.contains(\"inset-x-0\")&&d.classList.contains(\"inset-y-0\")))f(d.closest(\"[data-preview-item-path],[data-design-card],article,li\"));else{const M=d.closest(\"li\");f(M&&M.querySelectorAll(\"a[href]\").length===1?M:d)}}const S=Array.from(_.querySelectorAll('button,[role=\"button\"],[data-href],[data-route],[data-url]')).filter(d=>d.tagName!==\"A\");for(const d of S){const m=Y(d);if(!m||R.has(m.id))continue;const b=d.closest(\"li\");f(b&&b.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]').length===1?b:d)}const z=_.querySelector(\"main section\");for(const d of _.querySelectorAll(\"main section\")){const m=Array.from(d.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]')),b=m.map(Y).filter(at=>!!at),M=d.hasAttribute(\"data-preview-page-key\"),Z=d===z||d.hasAttribute(\"data-design-hero\")||/(?:^|\\s)(?:hero|banner|masthead)(?:\\s|$)/i.test(d.className)||!!d.querySelector(\"h1\");!M&&!Z&&b.length>0&&b.length===m.length&&b.every(at=>!R.has(at.id))&&f(d)}});";