@deneb-ui/cli 2.0.112 → 2.0.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +46 -1
- package/package.json +2 -2
- package/src/arc/__tests__/arc.test.cjs +112 -5
- package/src/arc/adapters.cjs +33 -0
- package/src/arc/auto-editability-fixer.cjs +903 -0
- package/src/arc/component-registry.cjs +12 -0
- package/src/arc/field-paths.cjs +4 -1
- package/src/arc/fivora-schema-authority.cjs +9 -1
- package/src/arc/index.cjs +24 -0
- package/src/arc/planner.cjs +13 -0
- package/src/arc/residual.cjs +4 -2
- package/src/arc/semantic.cjs +200 -1
- package/src/arc/transforms/element-transform.cjs +35 -0
- package/src/arc/transforms/index.cjs +1 -0
- package/src/arc/universal-icon-patcher.cjs +55 -0
- package/src/sites/universal-page-selection.ts +24 -2
- package/src/tools/deneb-template-validator.cjs +15 -15
- package/src/tools/template-converter.cjs +76 -24
- package/src/tools/template-preview-focus-bridge.cjs +2 -2
|
@@ -270,6 +270,59 @@ function transformFileContent(filePath, pageKey, extractedData, backupDir, proje
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
+
// 0. Brand Logo & Monogram Guardian (Auto-binds logo icons and images on deneb init)
|
|
274
|
+
const isHeaderOrLogoFile = /logo|header|navbar|nav/i.test(filePath);
|
|
275
|
+
if (isHeaderOrLogoFile) {
|
|
276
|
+
// 0a. Image logos
|
|
277
|
+
code = code.replace(/<(img|Image)(\s+[^>]*?src=["{][^>]*?)>/gi, (match, tag, rest) => {
|
|
278
|
+
if (rest.includes('data-preview-field-path') || /avatar|hero|banner|photo|car|product/i.test(rest)) return match;
|
|
279
|
+
fileModified = true;
|
|
280
|
+
return `<${tag}${rest} data-preview-field-path="common.logoUrl" data-preview-style-target="common.logoUrl" data-preview-style-type="image">`;
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
// 0b. Monogram / SVG Logo fallback wrappers
|
|
284
|
+
code = code.replace(/<span(\s+[^>]*?class(?:Name)?="[^"]*(?:place-items-center|rounded|bg-primary|logo|monogram)[^"]*"[^>]*?)>(\s*<svg[\s\S]*?<\/svg>\s*)<\/span>/gi, (match, attrs, svg) => {
|
|
285
|
+
if (attrs.includes('data-preview-field-path')) return match;
|
|
286
|
+
const cleanAttrs = attrs.replace(/\s*aria-hidden(?:="[^"]*")?/g, '');
|
|
287
|
+
const cleanSvg = svg.replace(/\s*data-preview-static="[^"]*"/g, '');
|
|
288
|
+
fileModified = true;
|
|
289
|
+
return `<span${cleanAttrs} data-preview-field-path="common.logoUrl" data-preview-style-target="common.logoUrl" data-preview-style-type="image" title="Click to edit logo">${cleanSvg}</span>`;
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// 1b. Eyebrow Badges & Section Eyebrows (e.g. <p className="eyebrow">...</p> or eyebrow="..." props)
|
|
294
|
+
const eyebrowTagRegex = /<(p|span)(\s+[^>]*?class(?:Name)?="[^"]*\beyebrow\b[^"]*"[^>]*)>([^<>{}]+)<\/\1>/gi;
|
|
295
|
+
code = code.replace(eyebrowTagRegex, (match, tag, attrs = '', text) => {
|
|
296
|
+
const trimmed = text.trim().replace(/\s+/g, ' ');
|
|
297
|
+
if (!trimmed || trimmed.length < 2 || attrs.includes('data-preview-field-path')) {
|
|
298
|
+
return match;
|
|
299
|
+
}
|
|
300
|
+
const rawKey = toFieldKey(trimmed, 'eyebrow', elementCount + 1);
|
|
301
|
+
const fieldKey = getUniqueKey(rawKey);
|
|
302
|
+
|
|
303
|
+
extractedData[fieldKey] = trimmed;
|
|
304
|
+
elementCount++;
|
|
305
|
+
fileModified = true;
|
|
306
|
+
|
|
307
|
+
return `<${tag} data-preview-field-path="${pageKey}.${fieldKey}" data-preview-style-target="${pageKey}.${fieldKey}" data-preview-style-type="text"${attrs}>{${ `siteData?.content?.${pageKey}?.${fieldKey} || ${JSON.stringify(trimmed)}` }}</${tag}>`;
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
const sectionHeadingEyebrowRegex = /<(SectionHeading|PageHeader)(\s+[^>]*?)eyebrow="([^"]+)"([^>]*?)\/?>/gi;
|
|
311
|
+
code = code.replace(sectionHeadingEyebrowRegex, (match, tag, pre = '', eyebrowText, post = '') => {
|
|
312
|
+
if (pre.includes('eyebrowPath=') || post.includes('eyebrowPath=')) {
|
|
313
|
+
return match;
|
|
314
|
+
}
|
|
315
|
+
const trimmed = eyebrowText.trim();
|
|
316
|
+
const rawKey = toFieldKey(trimmed, 'eyebrow', elementCount + 1);
|
|
317
|
+
const fieldKey = getUniqueKey(rawKey);
|
|
318
|
+
|
|
319
|
+
extractedData[fieldKey] = trimmed;
|
|
320
|
+
elementCount++;
|
|
321
|
+
fileModified = true;
|
|
322
|
+
|
|
323
|
+
return `<${tag}${pre}eyebrow={${ `siteData?.content?.${pageKey}?.${fieldKey} ?? ${JSON.stringify(trimmed)}` }} eyebrowPath="${pageKey}.${fieldKey}"${post}/>`;
|
|
324
|
+
});
|
|
325
|
+
|
|
273
326
|
// 2. Headings: <h1> to <h6>
|
|
274
327
|
const headingRegex = /<(h[1-6])(\s+[^>]*)?>([^<>{}]+)<\/\1>/g;
|
|
275
328
|
code = code.replace(headingRegex, (match, tag, attrs = '', text) => {
|
|
@@ -459,9 +512,9 @@ function transformFileContent(filePath, pageKey, extractedData, backupDir, proje
|
|
|
459
512
|
return `<a${preHref}href={siteData?.content?.common?.footer?.${fieldKey} || siteData?.content?.${pageKey}?.${fieldKey} || ${JSON.stringify(href)}} data-preview-field-path="common.footer.${fieldKey}"${postHref}>${innerContent}</a>`;
|
|
460
513
|
});
|
|
461
514
|
|
|
462
|
-
// 9c. Button / CTA Action Links with Text (Split URL on <a> and Label on <span>)
|
|
463
|
-
const btnLinkRegex = /<a(\s+[^>]*?class(?:Name)?="[^"]*(?:btn|button|cta|action|rounded|bg-)[^"]*"[^>]*?)href="([^"]+)"([^>]*)>([\s\S]*?)
|
|
464
|
-
code = code.replace(btnLinkRegex, (match, preHref = '', href, postHref = '', innerContent) => {
|
|
515
|
+
// 9c. Button / CTA Action Links with Text (Split URL on <a>/<Link> and Label on <span>)
|
|
516
|
+
const btnLinkRegex = /<(a|Link|GatedLink)(\s+[^>]*?class(?:Name)?="[^"]*(?:btn|button|cta|action|rounded|bg-)[^"]*"[^>]*?)href="([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi;
|
|
517
|
+
code = code.replace(btnLinkRegex, (match, tag, preHref = '', href, postHref = '', innerContent) => {
|
|
465
518
|
if (preHref.includes('data-preview-field-path') || postHref.includes('data-preview-field-path') || href.startsWith('#') || href.includes('javascript:')) {
|
|
466
519
|
return match;
|
|
467
520
|
}
|
|
@@ -481,21 +534,21 @@ function transformFileContent(filePath, pageKey, extractedData, backupDir, proje
|
|
|
481
534
|
if (/<span(\s+[^>]*)?>([^<>{}]+)<\/span>/i.test(innerContent)) {
|
|
482
535
|
updatedInner = innerContent.replace(
|
|
483
536
|
/<span(\s+[^>]*)?>([^<>{}]+)<\/span>/i,
|
|
484
|
-
`<span data-preview-field-path="${pageKey}.${labelKey}"$1>{siteData?.content?.${pageKey}?.${labelKey} || ${JSON.stringify(textOnly)}}</span>`
|
|
537
|
+
`<span data-preview-field-path="${pageKey}.${labelKey}" data-preview-style-target="${pageKey}.${labelKey}" data-preview-style-type="text"$1>{siteData?.content?.${pageKey}?.${labelKey} || ${JSON.stringify(textOnly)}}</span>`
|
|
485
538
|
);
|
|
486
539
|
} else {
|
|
487
540
|
updatedInner = innerContent.replace(
|
|
488
541
|
textOnly,
|
|
489
|
-
`<span data-preview-field-path="${pageKey}.${labelKey}">{siteData?.content?.${pageKey}?.${labelKey} || ${JSON.stringify(textOnly)}}</span>`
|
|
542
|
+
`<span data-preview-field-path="${pageKey}.${labelKey}" data-preview-style-target="${pageKey}.${labelKey}" data-preview-style-type="text">{siteData?.content?.${pageKey}?.${labelKey} || ${JSON.stringify(textOnly)}}</span>`
|
|
490
543
|
);
|
|
491
544
|
}
|
|
492
545
|
|
|
493
|
-
return
|
|
546
|
+
return `<${tag}${preHref}href={siteData?.content?.${pageKey}?.${urlKey} || ${JSON.stringify(href)}} data-preview-field-path="${pageKey}.${urlKey}"${postHref}>${updatedInner}</${tag}>`;
|
|
494
547
|
});
|
|
495
548
|
|
|
496
|
-
// 9d. Standard
|
|
497
|
-
const linkRegex = /<a(\s+[^>]*)?>([^<>{}]+)
|
|
498
|
-
code = code.replace(linkRegex, (match, attrs = '', text) => {
|
|
549
|
+
// 9d. Standard Links with Plain Text (<a>, <Link>, <GatedLink> with inner span)
|
|
550
|
+
const linkRegex = /<(a|Link|GatedLink)(\s+[^>]*)?>([^<>{}]+)<\/\1>/g;
|
|
551
|
+
code = code.replace(linkRegex, (match, tag, attrs = '', text) => {
|
|
499
552
|
const trimmed = text.trim().replace(/\s+/g, ' ');
|
|
500
553
|
if (!trimmed || trimmed.length < 2 || attrs.includes('data-preview-field-path')) {
|
|
501
554
|
return match;
|
|
@@ -507,7 +560,18 @@ function transformFileContent(filePath, pageKey, extractedData, backupDir, proje
|
|
|
507
560
|
elementCount++;
|
|
508
561
|
fileModified = true;
|
|
509
562
|
|
|
510
|
-
return
|
|
563
|
+
return `<${tag}${attrs}><span data-preview-field-path="${pageKey}.${fieldKey}" data-preview-style-target="${pageKey}.${fieldKey}" data-preview-style-type="text">{siteData?.content?.${pageKey}?.${fieldKey} || ${JSON.stringify(trimmed)}}</span></${tag}>`;
|
|
564
|
+
});
|
|
565
|
+
|
|
566
|
+
// 9e. Dynamic Link Expressions (e.g. <Link href={...}>{item.label}</Link>)
|
|
567
|
+
const dynamicLinkRegex = /<(a|Link|GatedLink)(\s+[^>]*)?>\s*\{([a-zA-Z0-9_$.]+(?:\.(?:label|name|title|text|displayName|countLabel)))\s*\}\s*<\/\1>/g;
|
|
568
|
+
code = code.replace(dynamicLinkRegex, (match, tag, attrs = '', expr) => {
|
|
569
|
+
if (attrs.includes('data-preview-field-path') || match.includes('data-preview-field-path')) {
|
|
570
|
+
return match;
|
|
571
|
+
}
|
|
572
|
+
const varPrefix = expr.split('.')[0];
|
|
573
|
+
fileModified = true;
|
|
574
|
+
return `<${tag}${attrs}><span data-preview-field-path={\`common.navLabels.\${ ${varPrefix}.id || ${varPrefix}.key || ${varPrefix}.slug || 'item'} \`} data-preview-style-target={\`common.navLabels.\${ ${varPrefix}.id || ${varPrefix}.key || ${varPrefix}.slug || 'item'} \`} data-preview-style-type="text">{${expr}}</span></${tag}>`;
|
|
511
575
|
});
|
|
512
576
|
|
|
513
577
|
// 10. List items: <li>
|
|
@@ -578,20 +642,8 @@ function transformFileContent(filePath, pageKey, extractedData, backupDir, proje
|
|
|
578
642
|
return `<div data-preview-field-path="${pageKey}.${fieldKey}"${attrs}>{siteData?.content?.${pageKey}?.${fieldKey} || ${JSON.stringify(trimmed)}}</div>`;
|
|
579
643
|
});
|
|
580
644
|
|
|
581
|
-
// 14. Sensitive Element Guardian:
|
|
582
|
-
//
|
|
583
|
-
// This completely eliminates "markers cannot be on or inside data-preview-static" errors across cards and links.
|
|
584
|
-
code = code.replace(/<a(\s+[^>]*?href="[^"]*"[^>]*?)>([\s\S]*?)<\/a>/gi, (match, attrs, inner) => {
|
|
585
|
-
if (attrs.includes('data-preview-field-path') || attrs.includes('data-preview-static')) {
|
|
586
|
-
return match;
|
|
587
|
-
}
|
|
588
|
-
// If the inner content has editable field markers or is a card wrapper, NEVER mark the anchor static!
|
|
589
|
-
if (inner.includes('data-preview-field-path') || inner.includes('data-preview-item-path') || /card|product|shoe|item/i.test(attrs)) {
|
|
590
|
-
return match;
|
|
591
|
-
}
|
|
592
|
-
fileModified = true;
|
|
593
|
-
return `<a${attrs} data-preview-static="navigation-link">${inner}</a>`;
|
|
594
|
-
});
|
|
645
|
+
// 14. Sensitive Element Guardian: Navigation links and anchors are NEVER marked static so they remain editable.
|
|
646
|
+
// Only non-bound decorative <img> tags receive static markers if not already bound.
|
|
595
647
|
|
|
596
648
|
code = code.replace(/<img(\s+[^>]*?src="[^"]*"[^>]*?)>/gi, (match, attrs) => {
|
|
597
649
|
if (attrs.includes('data-preview-field-path') || attrs.includes('data-preview-static')) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
// Generated from visual editor bridge (
|
|
4
|
-
module.exports = "var __name=typeof __name==\"function\"?__name:((nt,_)=>typeof Object.defineProperty==\"function\"?Object.defineProperty(nt,\"name\",{value:_,configurable:!0}):nt);(function(_,O,R,I,H,s){const u=`${[\"MARKET\",\"PLACE\"].join(\"\")}_PREVIEW_`,c=__name(t=>`${u}${t}`,\"previousPreviewMessage\"),w=__name(t=>`__${u}${t}__`,\"previousPreviewStorageKey\"),A=\"FIVORA_PREVIEW_FOCUS_PAGE\",x=c(\"FOCUS_PAGE\"),C=\"FIVORA_PREVIEW_FOCUS_RESULT\",F=c(\"FOCUS_RESULT\"),W=\"FIVORA_PREVIEW_READY\",V=c(\"READY\"),rt=\"data-fivora-preview-active-field\",L=\"data-fivora-resolved-field-path\",M=\"data-fivora-empty-editable\",j=\"data-fivora-empty-collection\",N=\"data-preview-list-path\",z=\"data-preview-item-path\",Y=\"data-preview-static\",X=\"__FIVORA_UNIVERSAL_PREVIEW_FOCUS__\",p=\"__FIVORA_VISUAL_EDITOR_TARGETS__\",T=\"__FIVORA_PREVIEW_PARENT_ORIGIN__\",v=w(\"PARENT_ORIGIN\"),U=\"__FIVORA_PREVIEW_SITE_DATA_CACHE__\",d=w(\"SITE_DATA_CACHE\"),h=\"__FIVORA_PREVIEW_SITE_DATA__\",b=w(\"SITE_DATA\"),k=\"FIVORA_PREVIEW_SITE_DATA\",J=c(\"SITE_DATA\"),at=\"FIVORA_PREVIEW_SITE_DATA_APPLIED\",En=c(\"SITE_DATA_APPLIED\"),xn=\"FIVORA_PREVIEW_CONTENT_PATCH\",Cn=c(\"CONTENT_PATCH\"),Tn=\"FIVORA_PREVIEW_STYLE_PATCH\",Pe=\"fivora-template-color-replacements\",vn=[200],Pn=2500,In=1600,_n=12e3,Rn=\"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,Zt=!1,Tt=null,Xt,Qt=[],st=null,$=null,Re=\"\",$e=\"\",Oe=\"\";function gt(){try{window.sessionStorage.removeItem(X)}catch{}}__name(gt,\"clearPendingFocus\");function te(){try{return window.sessionStorage.getItem(T)||window.sessionStorage.getItem(v)}catch{return null}}__name(te,\"readRememberedParentOrigin\");function ee(t){if(t)try{window.sessionStorage.setItem(T,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[k,J])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){$=t;try{window[h]=t,window[b]=t}catch{}const n=__name(()=>{st=null;try{const r=JSON.stringify($);window.sessionStorage.setItem(U,r),window.sessionStorage.setItem(d,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(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],l=i===e.length-1,f=l?void 0:e[i+1];if(typeof a==\"number\"){const E=(Array.isArray(o)?o:[]).slice();if(l)return E[a]=n,E;const D=E[a];return E[a]=D==null||typeof D!=\"object\"?r(typeof f==\"number\"?[]:{},i+1):r(D,i+1),E}const m={...o&&typeof o==\"object\"&&!Array.isArray(o)?o:{}};if(l)return m[a]=n,m;const S=m[a];return m[a]=S==null||typeof S!=\"object\"?r(typeof f==\"number\"?[]:{},i+1):r(S,i+1),m},\"setAt\");return r(t,0)}__name(De,\"setValueAtPath\");function Ne(){return($&&typeof $==\"object\"&&!Array.isArray($)?$:{}).content??{}}__name(Ne,\"readPublishedContent\");function ne(t){const n={...$&&typeof $==\"object\"&&!Array.isArray($)?$:{},content:t};$=n;try{window[h]=n,window[b]=n}catch{}return n}__name(ne,\"writePublishedContent\");function re(){ct!==null&&window.clearTimeout(ct),ct=window.setTimeout(()=>{ct=null,$!=null&&vt($,{fanOut:!1})},In)}__name(re,\"scheduleContentOnlyRelay\");function It(){lt!==null&&window.clearTimeout(lt),lt=window.setTimeout(()=>{if(lt=null,$==null)return;const t=window;if(typeof t.requestIdleCallback==\"function\"){t.requestIdleCallback(()=>{$!=null&&Pt($,{immediate:!0})},{timeout:4e3});return}Pt($,{immediate:!0})},_n)}__name(It,\"scheduleContentOnlyPersist\");function ie(t,e){const n=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [${L}=\"${CSS.escape(t)}\"]`));for(const r of n){if(Z?.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((g,m)=>{const y=m<i?\"#fa7014\":\"#dadce0\";g.style.fill=y,g.style.color=y;const E=g.querySelector(\"path\");E&&(E.style.fill=y)}),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}B&&(o.trim().length===0?r.setAttribute(M,\"true\"):r.removeAttribute(M))}}__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=$&&typeof $==\"object\"&&!Array.isArray($)?$:{},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}},g={...n,template:f};$=g,wt(g),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),Zt){Tt=t,Xt=e;return}Zt=!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 vn)Qt.push(window.setTimeout(()=>{$!=null&&vt($,{fanOut:!0})},n))}}finally{if(Zt=!1,Tt!=null){const n=Tt,r=Xt;Tt=null,Xt=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{G({type:at,full:e}),G({type:En,full:e})}catch{}const r=$;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 $n=(()=>{try{return window.location.ancestorOrigins?.item(0)??null}catch{return null}})(),On=(()=>{try{return window.parent!==window?window.parent.location.origin:null}catch{return null}})();let dt=_({currentOrigin:window.location.origin,referrer:document.referrer,rememberedOrigin:te(),ancestorOrigin:$n,accessibleParentOrigin:On});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 G(t){window.parent.postMessage(t,dt??\"*\")}__name(G,\"postToParent\");function mt(t,e,n=0){t.requestId&&(G({type:C,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}),G({type:F,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:n}))}__name(mt,\"postFocusResult\");function bt(){try{G({type:W,pathname:window.location.pathname}),G({type:V,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 g=>{const m=g.href;let S=Ie.get(m);if(S===void 0){const E=await fetch(m,{credentials:\"same-origin\"});if(!E.ok)return\"\";S=await E.text(),Ie.set(m,S)}const y=R(S,r);return y===S?\"\":y}));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=Pe,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),g=document.getElementById(I);if(!f)g?.remove();else{const m=g instanceof HTMLStyleElement?g:document.createElement(\"style\");m.id=I,m.textContent=f,m.isConnected||document.head.appendChild(m)}}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 P(t){return String(t??\"\").trim().replace(/\\s+/g,\" \").toLowerCase()}__name(P,\"normalizeText\");function Rt(t){const e=String(t??\"\").trim();if(!e)return[];const n=e.split(/[,;|\\n\\r]+/).map(r=>P(r)).filter(r=>r.length>=3);return Array.from(new Set([P(e),...n])).filter(r=>r.length>=2)}__name(Rt,\"valueFragments\");function $t(t,e){const n=P(e),r=P(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 g=decodeURIComponent(a);if(g.includes(n)||n.includes(g))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 Ke(t,e){const n=Rt(e);if(n.length===0)return[];const r=Array.from(t.querySelectorAll(Rn)),o=r.filter(i=>{const a=P(i.textContent);return n.some(l=>a===l)});return o.length>0?o:r.filter(i=>{const a=P(i.textContent);return n.some(l=>a.includes(l)||l.includes(a))})}__name(Ke,\"findTextMatches\");function Lt(t,e,n){if($t(e,n)){const r=se(t,e);if(r.length>0)return r}return Ke(t,e)}__name(Lt,\"findValueMatches\");function ze(t,e,n){if($t(e,n)&&se(t,e).length>0)return!0;const r=P(t.textContent);return Rt(e).some(o=>r.includes(o))}__name(ze,\"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=P(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=>P(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((S,y)=>S+(ze(a,y.value,y.key)?1:0),0),g=a.getBoundingClientRect(),m=Math.max(1,g.width*g.height);(!r||f>r.score||f===r.score&&m<r.area)&&(r={target:a,score:f,area:m}),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=P(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)=>P(i.textContent).length-P(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 Ze(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(Ze,\"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(rt);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(rt,\"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 Xe(t,e){Dt([t],e)}__name(Xe,\"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(p)??\"{}\");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(P),l=P(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),g=f?[...l,f]:l,m=de(g.map(S=>St(S)).filter(S=>!!S));if(m.length>0)return{targets:[m[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=Ze(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)):(Xe(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(X,JSON.stringify({...t,awaitingNavigation:!0}))}catch{}window.location.assign(n);return}gt(),window.setTimeout(()=>ft(t),80)}__name(tn,\"handleFocus\");function he(t){return P(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 g=he(t.at(-1)??\"\");return a.itemValues.some(({key:m,value:S})=>{const y=P(m).replace(/[^a-z0-9]/g,\"\");return y!==\"id\"&&!y.endsWith(\"id\")&&y!==\"slug\"&&y!==\"name\"&&y!==\"title\"?!1:he(S)===g})});if(e.length===0)return;const n=Array.from(document.querySelectorAll(`[${Y}]`)),r=[];for(const i of e){const a=i.context,l=a.fieldKey,f=P(l).replace(/[^a-z0-9]/g,\"\");if(f===\"slug\"||f===\"identifier\"||f.endsWith(\"id\"))continue;const g=a.collectionPath.split(\".\").at(-1)??\"\",m=P(g).replace(/s$/,\"\"),S=l.replace(/([a-z0-9])([A-Z])/g,\"$1 $2\").split(/[^a-z0-9]+/i).map(P).filter(E=>E&&![\"url\",\"text\",\"value\"].includes(E)),y=P(i.value);for(const E of n){const D=P(E.getAttribute(Y));if(!D||!D.includes(m))continue;let K=0;const Wt=S.filter(et=>D.includes(et));Wt.length>0&&(K+=40+Wt.length*5);const jt=E.tagName===\"IMG\"?P(E.getAttribute(\"src\")??E.getAttribute(\"alt\")):P(E.textContent);y&&jt===y?K+=120:y.length>=3&&jt.includes(y)&&(K+=80),/image|photo|logo|banner|thumbnail|cover/i.test(l)&&E.tagName===\"IMG\"&&D.includes(\"image\")&&(K+=120),K>=40&&r.push({element:E,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??\"\"),g=l.toLowerCase().indexOf(f.toLowerCase());f&&g>=0&&l!==f&&(i.setAttribute(\"data-fivora-value-prefix\",l.slice(0,g)),i.setAttribute(\"data-fivora-value-suffix\",l.slice(g+f.length)))}i.removeAttribute(Y),i.setAttribute(\"data-preview-field-path\",a.path),ie(a.path,a.value)}}__name(en,\"promoteActiveRouteDetailFields\");const Mn=\"FIVORA_PREVIEW_ELEMENT_CLICKED\",Ln=c(\"ELEMENT_CLICKED\"),kn=\"FIVORA_PREVIEW_FIELD_CHANGED\",Fn=c(\"FIELD_CHANGED\"),Dn=\"FIVORA_PREVIEW_EDIT_MODE\",Nn=c(\"EDIT_MODE\"),Hn=\"FIVORA_PREVIEW_FLUSH_EDIT\",Vn=c(\"FLUSH_EDIT\"),qn=\"FIVORA_PREVIEW_EDIT_FLUSHED\",Gn=c(\"EDIT_FLUSHED\"),Bn=\"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}})(),Wn=(()=>{try{const t=document.createElement(\"div\");return t.setAttribute(\"contenteditable\",\"plaintext-only\"),t.contentEditable===\"plaintext-only\"}catch{return!1}})(),jn=Ht||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4||typeof navigator.deviceMemory==\"number\"&&(navigator.deviceMemory??8)<=4,Un=!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===A||t.data?.type===x){t.stopImmediatePropagation(),tn(t.data);return}if((t.data?.type===k||t.data?.type===J)&&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===xn||t.data?.type===Cn){const a=t.data.patches;Array.isArray(a)&&He(a);return}if(t.data?.type===Tn||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===Dn||t.data?.type===Nn){q=Array.isArray(t.data.fields)?t.data.fields:[],en(),t.data.editMode?(yn(),window.setTimeout(()=>we(),50)):bn();return}(t.data?.type===Hn||t.data?.type===Vn)&&(pt(!0),G({type:qn,requestId:t.data.requestId}),G({type:Gn,requestId:t.data.requestId}))},!0);try{const t=JSON.parse(window.sessionStorage.getItem(X)??\"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&>()}catch{gt()}try{const t=JSON.parse(window.sessionStorage.getItem(U)??window.sessionStorage.getItem(d)??\"null\");if(t){$=t;try{window[h]=t,window[b]=t}catch{}jn||(oe(t),wt(t,{colorReplacements:!1}))}}catch{}let B=!1,Q=null,it=null,Vt=null,Z=null,Et=[],ot=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 [${M}=\"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[${M}=\"true\"],\n a[${M}=\"true\"],\n strong[${M}=\"true\"],\n em[${M}=\"true\"],\n small[${M}=\"true\"],\n label[${M}=\"true\"] {\n display: inline-block !important;\n }\n [${M}=\"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 [${M}=\"true\"]:empty:hover::before {\n content: \"Click to add text\";\n }\n [${j}=\"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 [${j}=\"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 [${j}=\"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(p)??\"{}\");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(p,JSON.stringify(r))}catch{}}__name(rn,\"rememberResolvedTarget\");function Kn(){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(p,JSON.stringify(t))}catch{}}__name(Kn,\"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((l,f)=>{const g=\"fivora-target-\"+f;l.hasAttribute(\"data-fivora-id\")||l.setAttribute(\"data-fivora-id\",g)});const o=__name(l=>{const f=[];for(const g of l){const m=CSS.escape(g);f.push(`[data-preview-field-path=\"${m}\"]`),f.push(`[data-preview-list-path=\"${m}\"]`),targetRegistry.findTargets(g).forEach(S=>{const y=S.getAttribute(\"data-fivora-id\");y&&f.push(`[data-fivora-id=\"${CSS.escape(y)}\"]`)})}return f.length>0?f.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(`[${L}]`).forEach(t=>{Z?.target!==t&&(t.removeAttribute(L),t.removeAttribute(M),t.removeAttribute(j))})}__name(be,\"clearResolvedEditableTargets\");function ht(t,e,n=!0){const r=targetRegistry.getPath(t),o=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(N)??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\");if(r&&r!==e.path&&o!==e.path)return!1;t.setAttribute(L,e.path);const i=String(e.value??\"\").trim().length===0&&P(t.textContent).length===0;B&&i&&t.tagName!==\"IMG\"?t.setAttribute(M,\"true\"):t.removeAttribute(M);const a=e.kind===\"collection\"||e.type===\"list\",l=e.collection?.length;return B&&a&&(l===0||t.childElementCount===0)?(t.setAttribute(j,\"true\"),t.removeAttribute(M)):t.removeAttribute(j),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}\"], [${N}=\"${n}\"], [data-content-path=\"${n}\"], [data-field-path=\"${n}\"], [${L}=\"${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(P),i=P(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(`[${Y}]`))continue;const l=a.getAttribute(L);if(!l||l===t.path)return a}}return null}__name(sn,\"inferEditableTarget\");function cn(t){if(B){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=[],ot!==null){const e=window.cancelIdleCallback;typeof e==\"function\"?e(ot):window.clearTimeout(ot),ot=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\"),it=null}__name(xt,\"clearHoverOverlay\");function un(t){if(t===it)return;xt(),it=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(Y)){n=n.parentElement;continue}if(n.hasAttribute(\"data-preview-field-path\")||n.hasAttribute(N)||n.hasAttribute(z)||n.hasAttribute(\"data-content-path\")||n.hasAttribute(\"data-field-path\")||n.hasAttribute(L)||n.matches(Bn)){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(`[${Y}]`))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(m=>ut(m.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(z);if(n){const g=n.match(/^(.+)\\[(\\d+)\\]$/);if(g){const m=g[1],S=Number(g[2]),y=q.find(E=>(E.kind===\"collection\"||E.type===\"list\")&&ut(E.path).includes(m));if(y)return{...y,collection:{listPath:m,itemIndex:S,length:y.collection?.length??0,minItems:y.collection?.minItems,maxItems:y.collection?.maxItems,itemLabel:y.collection?.itemLabel}}}}const r=t.getAttribute(N);if(r)return q.find(m=>(m.kind===\"collection\"||m.type===\"list\")&&ut(m.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 g=q.find(y=>y.type===\"image\"&&tt(y).some(E=>ae(o,E)));if(g)return g;const m=Se(o);if(m.collectionPath&&typeof m.itemIndex==\"number\"){const y=q.find(E=>E.type===\"image\"&&E.context?.collectionPath===m.collectionPath&&E.context?.itemIndex===m.itemIndex);if(y)return y}const S=o.closest('section, article, [data-preview-page-key], main, header, footer, .card, [class*=\"section\"]');if(S){const y=S.getAttribute(\"data-preview-field-path\")||S.getAttribute(\"data-content-path\")||S.getAttribute(\"data-field-path\")||S.getAttribute(L);if(y){const E=y.split(\".\")[0],D=q.find(K=>K.type===\"image\"&&(K.path.startsWith(`${E}.`)||K.path.startsWith(`${y}.`)));if(D)return D}}if(t.tagName===\"IMG\"){const y=q.filter(D=>D.type===\"image\");if(y.length===1)return y[0];const E=o.getAttribute(\"src\")||o.src||\"\";return{path:e||\"image\",label:(e||\"\").split(\".\").pop()||\"Image\",type:\"image\",value:E}}}const i=q.filter(g=>tt(g).some(m=>Ot(t,m)));if(i.length===1)return i[0];const a=P(t.textContent);if(!a)return null;const l=q.filter(g=>typeof g.value!=\"boolean\"&&tt(g).some(m=>P(m)===a));if(l.length===1)return l[0];const f=q.filter(g=>typeof g.value==\"boolean\"?!1:tt(g).some(m=>{const S=P(m);return S.length>=3&&a.includes(S)})).sort((g,m)=>Math.max(...tt(m).map(S=>P(S).length),0)-Math.max(...tt(g).map(S=>P(S).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(N)??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(L);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(z);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(L);if(r){const i=r.match(/^(.+)\\[(\\d+)\\]/);if(i)return{collectionPath:i[1],itemIndex:Number(i[2])}}const o=e.getAttribute(N);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(Y)||i>0&&(o.hasAttribute(z)||o.hasAttribute(N)||o.tagName===\"SECTION\"));){if(o.hasAttribute(\"data-preview-field-path\")||o.hasAttribute(\"data-content-path\")||o.hasAttribute(\"data-field-path\")||o.hasAttribute(L)){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 g=e?.collection?.listPath??e?.collection?.path??e?.context?.collectionPath??f.collectionPath,m=e?.collection?.itemIndex??e?.context?.itemIndex??f.itemIndex;g&&a&&e?.kind!==\"collection\"&&!a.startsWith(`${g}[`)&&!a.startsWith(`${g}.`)&&a!==g&&(g=null,m=null);const S=e?.context?.itemPath??(g&&typeof m==\"number\"?`${g}[${m}]`:null),y=__name(Ct=>String(Ct??\"\").trim().replace(/[^a-zA-Z0-9_.-]+/g,\"-\").replace(/^-+|-+$/g,\"\").slice(0,64),\"safeScopePart\"),E=[],D=__name((Ct,Kt,zt)=>{!Kt||E.some(Yt=>Yt.key===Kt)||E.push({kind:Ct,key:Kt,label:zt})},\"pushStyleScope\");D(\"element\",a,\"This element\");const K=t.closest(`[${z}]`);D(\"card\",K?.getAttribute(z)??S,\"This card\");const Wt=t.closest(`[${N}]`);D(\"grid\",Wt?.getAttribute(N)??g,\"Entire grid\");const jt=t.closest(\"[data-preview-page-key]\"),Ut=y(jt?.getAttribute(\"data-preview-page-key\")),et=t.closest(\"section,[data-design-section],[data-section-id]\");if(et){const Ct=y(et.getAttribute(\"data-design-section\")??et.getAttribute(\"data-section-id\")??et.id),zt=(et.parentElement?Array.from(et.parentElement.children).filter(Zn=>Zn.tagName===\"SECTION\"):[]).indexOf(et)+1,Yt=Ct||(zt>0?`nth-${zt}`:\"\");D(\"section\",Yt?`section:${Ut||\"all\"}:${Yt}`:null,\"This section\")}D(\"page\",Ut?`page:${Ut}`:null,\"Current page\"),D(\"site\",\"site:all\",\"Whole website\");const Sn={type:Mn,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:g,itemPath:S,collectionPath:g,itemIndex:m,relatedFields:n,styleScopes:E};G(Sn),G({...Sn,type:Ln})}__name(gn,\"emitClickEvent\");function mn(t,e){G({type:kn,fieldPath:t,value:e}),G({type:Fn,fieldPath:t,value:e})}__name(mn,\"emitFieldChange\");function pt(t){const e=Z;if(!e)return;Z=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(Z?.target===t)return;pt(!0),xt(),ht(t,e),t.removeAttribute(M);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(Z={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\",Wn?\"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),g=f?(()=>{const m=document.createRange();return m.setStart(f.offsetNode,f.offset),m.collapse(!0),m})():l.caretRangeFromPoint?.(n.x,n.y);if(g){const m=window.getSelection();m?.removeAllRanges(),m?.addRange(g)}}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(!B||Z||Ht||yt!==null)return;const e=t.target;yt=requestAnimationFrame(()=>{if(yt=null,!B||Z)return;const n=Ae(e);n&&!n.element.hasAttribute(\"data-fivora-edit-badge\")&&un(n.element)})}__name(xe,\"onEditMouseOver\");function Ce(t){if(!B)return;const e=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null;e&&(e===Q||e===it||it?.contains(e))||xt()}__name(Ce,\"onEditMouseOut\");function Te(t){if(!B||Z&&t.target instanceof Node&&Z.target.contains(t.target))return;const e=t.target instanceof HTMLElement&&t.target.hasAttribute(\"data-fivora-edit-badge\")?t.target:null,n=e?it?{element:it,field:Bt(it)}:null:Ae(t.target),r=n?.element,o=n?.field;if(!r||!o)return;t.preventDefault(),t.stopPropagation();const i=Ee(r,o);!Un&&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(){B||(B=!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){B&&(t.preventDefault(),t.stopPropagation())}__name(ve,\"preventEditModeSubmit\");function bn(){if(B){B=!1,Gt=!1,pt(!0),xt(),yt!==null&&(cancelAnimationFrame(yt),yt=null);for(const t of Et)window.clearTimeout(t);if(Et=[],ot!==null){const t=window.cancelIdleCallback;typeof t==\"function\"?t(ot):window.clearTimeout(ot),ot=null}be(),document.querySelectorAll(`[${M}], [${j}]`).forEach(t=>{t.removeAttribute(M),t.removeAttribute(j)}),document.removeEventListener(\"mouseover\",xe,!0),document.removeEventListener(\"mouseout\",Ce,!0),document.removeEventListener(\"click\",Te,!0),document.removeEventListener(\"submit\",ve,!0)}}__name(bn,\"exitEditMode\");const Yn=window.history.pushState.bind(window.history),Jn=window.history.replaceState.bind(window.history);window.history.pushState=(...t)=>{Yn(...t),window.setTimeout(bt,0)},window.history.replaceState=(...t)=>{Jn(...t),window.setTimeout(bt,0)},window.addEventListener(\"popstate\",bt),s();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(_){const O=__name((c,w)=>{if(!c||c.trim()===\"null\")return null;try{const A=new URL(c,w??void 0).origin;return A===\"null\"?null:A}catch{return null}},\"normalizeOrigin\"),R=O(_.currentOrigin),I=O(_.ancestorOrigin,R),H=O(_.accessibleParentOrigin,R),s=O(_.referrer,R),u=O(_.rememberedOrigin);return I??H??(s&&s!==R?s:null)??u??s},function(_){const O=__name(p=>!!p&&typeof p==\"object\"&&!Array.isArray(p),\"isRecord\"),R=O(_)&&(_.designCustomizationVersion===1||!!_.elementStyles||!!_.sections);if(!O(_)||!R)return\"\";const I=_,H=__name(p=>{if(typeof p==\"number\")return`${p}px`;if(typeof p!=\"string\")return\"\";const T=p.trim();return!T||T.length>160||/[;{}<>\\r\\n]/.test(T)||/(?:url\\s*\\(|expression\\s*\\(|@import|javascript:)/i.test(T)?\"\":T},\"safeValue\"),s=__name(p=>H(I[p]),\"read\"),u=__name((p,T)=>T?`${p}:${T} !important;`:\"\",\"declaration\"),c=__name((p,T)=>{const v=T.filter(Boolean).join(\"\");return v?`${p}{${v}}`:\"\"},\"rule\"),w=__name(p=>p?[u(\"background\",p),u(\"background-color\",p),\"background-image:none !important;\"]:[],\"backgroundDeclarations\"),A=__name(p=>p===\"start\"?\"flex-start\":p===\"end\"?\"flex-end\":p===\"center\"||p===\"stretch\"?p:\"\",\"alignItems\"),x=__name(p=>{const T=Number(p);return Number.isInteger(T)&&T>=1&&T<=6?`repeat(${T},minmax(0,1fr))`:\"\"},\"gridColumns\"),C=(()=>{const p=Number(s(\"headingScale\"));return Number.isFinite(p)&&p>=.75&&p<=2?String(p):\"\"})(),F=__name(p=>({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)\"})[p]??\"\",\"shadow\"),W=[[\"--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\")]],V=new Set([\"sans-serif\",\"serif\",\"monospace\",\"inherit\",\"initial\",\"system-ui\",\"system sans\",\"editorial serif\"]),rt=new Set,L=__name(p=>{if(typeof p==\"string\"&&p.trim()){const T=p.split(\",\")[0].replace(/['\"]/g,\"\").trim();T&&!V.has(T.toLowerCase())&&!T.toLowerCase().includes(\"system\")&&rt.add(T)}},\"addFont\");L(I.headingFont),L(I.bodyFont);const M=O(I.elementStyles)?I.elementStyles:{};for(const p of Object.values(M))O(p)&&L(p.fontFamily);const N=[...Array.from(rt).map(p=>`@import url('https://fonts.googleapis.com/css2?family=${encodeURIComponent(p).replace(/%20/g,\"+\")}:wght@300;400;500;600;700;800&display=swap');`),c(\":root,body\",W.map(([p,T])=>u(p,T))),c(\"html\",[u(\"font-size\",s(\"baseSize\"))]),c(\"body\",[u(\"font-family\",s(\"bodyFont\")?`${s(\"bodyFont\")},sans-serif`:\"\"),u(\"font-weight\",s(\"bodyWeight\")),u(\"line-height\",s(\"bodyLineHeight\")),u(\"letter-spacing\",s(\"letterSpacing\")),...w(s(\"backgroundColor\")),u(\"color\",s(\"textColor\"))]),c(\"body :where(h1,h2,h3,h4,h5,h6)\",[u(\"font-family\",s(\"headingFont\")?`${s(\"headingFont\")},sans-serif`:\"\"),u(\"font-weight\",s(\"headingWeight\")),u(\"line-height\",s(\"headingLineHeight\")),u(\"color\",s(\"headingColor\"))]),c('body :where(p,small,.muted,[class*=\"muted\"])',[u(\"color\",s(\"mutedTextColor\"))]),C?`body h1{font-size:calc(2.5rem * ${C}) !important}body h2{font-size:calc(2rem * ${C}) !important}body h3{font-size:calc(1.5rem * ${C}) !important}body h4{font-size:calc(1.25rem * ${C}) !important}`:\"\",c(\"body header\",[...w(s(\"headerBackgroundColor\")),u(\"min-height\",s(\"headerHeight\"))]),c(\"body footer\",[...w(s(\"footerBackgroundColor\"))]),c(\"body main\",[...w(s(\"backgroundColor\")),u(\"color\",s(\"textColor\"))]),c(\"body main > section,body main [data-preview-page-key] > section\",[u(\"padding-block\",s(\"sectionPadding\")),u(\"text-align\",s(\"textAlign\"))]),c(\"body main :where(section,[data-design-section]) :where(h1,h2,h3,h4,h5,h6,p,[data-design-text])\",[u(\"text-align\",s(\"textAlign\"))]),c(\"body main > section + section,body main [data-preview-page-key] > section + section\",[u(\"margin-top\",s(\"sectionGap\"))]),c('body main :where([class*=\"flex\"],[class*=\"grid\"],[data-design-stack])',[u(\"gap\",s(\"elementGap\"))]),c(\"body main > section:nth-of-type(even),body main [data-preview-page-key] > section:nth-of-type(even)\",w(s(\"surfaceAltColor\"))),c(\"body main > section:nth-of-type(odd),body main [data-preview-page-key] > section:nth-of-type(odd)\",w(s(\"surfaceColor\"))),c(\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",[u(\"min-height\",s(\"heroMinHeight\")),u(\"text-align\",s(\"heroTextAlign\"))]),c('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])',[u(\"text-align\",s(\"heroTextAlign\"))]),c('body main :where([class*=\"container\"],[class~=\"container\"],[data-design-container])',[u(\"max-width\",s(\"contentMaxWidth\")),u(\"padding-inline\",s(\"containerPadding\")),s(\"contentMaxWidth\")?\"margin-inline:auto !important;\":\"\"]),c('body main :where(section,[data-design-section]) > :where([class*=\"flex\"],[data-design-content])',[u(\"align-items\",A(s(\"contentAlign\"))),u(\"justify-items\",s(\"contentAlign\"))]),c(\"body main :where([data-preview-list-path],[data-design-grid])\",[x(s(\"gridColumns\"))?\"display:grid !important;\":\"\",u(\"grid-template-columns\",x(s(\"gridColumns\"))),u(\"gap\",s(\"gridGap\"))]),c('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])',[u(\"width\",s(\"cardWidth\")),s(\"cardWidth\")?\"max-width:100% !important;\":\"\",u(\"min-height\",s(\"cardMinHeight\")),u(\"padding\",s(\"cardPadding\")),u(\"border-radius\",s(\"cardRadius\")),u(\"border-width\",s(\"cardBorderWidth\")),s(\"cardBorderWidth\")?\"border-style:solid !important;\":\"\",u(\"border-color\",s(\"borderColor\")),...w(s(\"cardBackgroundColor\")),u(\"box-shadow\",F(s(\"cardShadow\"))),u(\"text-align\",s(\"cardTextAlign\"))]),c('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])',[u(\"text-align\",s(\"cardTextAlign\"))]),c('body main :where(button,a[class*=\"btn\"],a[class*=\"button\"],[data-design-button])',[u(\"padding\",s(\"buttonPadding\")),u(\"border-radius\",s(\"buttonRadius\")),...w(s(\"buttonBackgroundColor\")),u(\"color\",s(\"buttonTextColor\")),u(\"box-shadow\",F(s(\"buttonShadow\")))]),c(\"body main img\",[u(\"border-radius\",s(\"imageRadius\"))])],z=O(I.sections)?I.sections:{};for(const[p,T]of Object.entries(z)){if(!/^[a-zA-Z0-9_-]{1,64}$/.test(p)||!O(T))continue;const v=__name(k=>H(T[k]),\"sectionRead\"),U=v(\"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-\"])'}[p]??`body :where([data-preview-page-key=\"${p}\"] > section,[data-design-section=\"${p}\"],[data-section-id=\"${p}\"],section#${p},section.${p})`;N.push(c(b,[T.visible===!1?\"display:none !important;\":\"\",...w(U),u(\"color\",v(\"textColor\")),u(\"min-height\",v(\"minHeight\")),u(\"padding-block\",v(\"padding\")),u(\"max-width\",v(\"contentMaxWidth\")),u(\"gap\",v(\"gap\")),u(\"text-align\",v(\"textAlign\")),u(\"align-items\",A(v(\"contentAlign\")))]),c(`${b} :where(h1,h2,h3,h4,h5,h6)`,[u(\"color\",v(\"headingColor\")),u(\"text-align\",v(\"textAlign\"))]),c(`${b} :where(p,span,[data-design-text])`,[u(\"text-align\",v(\"textAlign\"))]),c(`${b} :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`,[...w(v(\"cardBackgroundColor\")),u(\"width\",v(\"cardWidth\")),v(\"cardWidth\")?\"max-width:100% !important;\":\"\",u(\"min-height\",v(\"cardMinHeight\")),u(\"border-radius\",v(\"cardRadius\"))]),c(`${b} :where([data-preview-list-path],[data-design-grid])`,[x(v(\"gridColumns\"))?\"display:grid !important;\":\"\",u(\"grid-template-columns\",x(v(\"gridColumns\")))]),c(`${b}::before,${b}::after`,U?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),c(`${b} > :where(${d})`,U?[\"background:none !important;\",\"background-image:none !important;\",\"box-shadow:none !important;\",\"mask-image:none !important;\",\"-webkit-mask-image:none !important;\"]:[]),c(`${b} > :where(${d})::before,${b} > :where(${d})::after`,U?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),c(`${b} > :where(${d}) :where(img,video,canvas,picture)`,U?[\"opacity:0.2 !important;\"]:[]))}const Y=O(I.elementStyles)?I.elementStyles:{},X=[[\"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[p,T]of Object.entries(Y).slice(0,256)){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(p)||!O(T))continue;const v=p.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"'),U=(()=>{if(p===\"site:all\")return\"body\";if(p.startsWith(\"page:\"))return`body :where([data-preview-page-key=\"${v.slice(5)}\"])`;if(p.startsWith(\"section:\")){const[,d=\"all\",h=\"\"]=v.split(\":\"),b=d===\"all\"?\"body main\":`body :where([data-preview-page-key=\"${d}\"])`,k=h.match(/^nth-(\\d+)$/)?.[1];return k?`${b} > section:nth-of-type(${k})`:`${b} :where([data-design-section=\"${h}\"],[data-section-id=\"${h}\"],section#${h})`}if(p.includes(\":\")){const[d,h]=v.split(\":\");if(h===\"card\")return`body [data-preview-list-path=\"${d}\"] :is([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`;if(h)return`body [data-preview-list-path=\"${d}\"] :is([data-preview-field-path$=\".${h}\"],[data-field-path$=\".${h}\"],[data-content-path$=\".${h}\"])`}return`body :is([data-preview-field-path=\"${v}\"],[data-content-path=\"${v}\"],[data-field-path=\"${v}\"],[data-fivora-resolved-field-path=\"${v}\"],[data-preview-list-path=\"${v}\"],[data-preview-item-path=\"${v}\"])`})();N.push(c(U,X.map(([d,h])=>u(h,H(T[d])))))}return N.filter(Boolean).join(`\n`)},function(_,O){if(!O||typeof O!=\"object\"||Array.isArray(O))return _;const R=__name(A=>{const x=A.trim().toLowerCase(),C=x.match(/^#([0-9a-f]{3})$/);return C?`#${[...C[1]].map(F=>F.repeat(2)).join(\"\")}`:/^#[0-9a-f]{6}$/.test(x)?x:null},\"normalize\"),I=new Map,H=new Map;for(const[A,x]of Object.entries(O).slice(0,64)){if(typeof x!=\"string\")continue;const C=R(A),F=R(x);if(!C||!F||C===F)continue;I.set(C,F);const W=__name(V=>[Number.parseInt(V.slice(1,3),16),Number.parseInt(V.slice(3,5),16),Number.parseInt(V.slice(5,7),16)],\"channels\");H.set(W(C).join(\",\"),W(F)),C[1]===C[2]&&C[3]===C[4]&&C[5]===C[6]&&I.set(`#${C[1]}${C[3]}${C[5]}`,F)}if(I.size===0)return _;const s=[...I.keys()].sort((A,x)=>x.length-A.length).map(A=>A.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")),u=new RegExp(`(?<!\\\\\\\\)(?:${s.join(\"|\")})(?![0-9a-f])`,\"gi\"),c=_.replace(u,A=>{const x=R(A);return x?I.get(x)??A:A}),w=/(rgba?\\(\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})/gi;return c.replace(w,(A,x,C,F,W,V,rt)=>{const L=H.get(`${C},${W},${rt}`);return L?`${x}${L[0]}${F}${L[1]}${V}${L[2]}`:A})},\"fivora-universal-design-overrides\",function(_,O){const R=O??document,I=_&&typeof _==\"object\"&&!Array.isArray(_)?_:null,H=I?.requirements&&typeof I.requirements==\"object\"&&!Array.isArray(I.requirements)?I.requirements:null,s=I?.template&&typeof I.template==\"object\"&&!Array.isArray(I.template)?I.template:null,u=s?.structure&&typeof s.structure==\"object\"&&!Array.isArray(s.structure)?s.structure:null,c=Array.isArray(H?.requiredPages),w=Array.isArray(u?.pages);if(!c&&!w)return;const A=c?H?.requiredPages:u?.pages,x=new Set(A.filter(d=>typeof d==\"string\").map(d=>d.trim()).filter(Boolean)),C=Array.isArray(s?.pageDefinitions)?s.pageDefinitions:[],F=Array.isArray(u?.pageDefinitions)?u.pageDefinitions:[],V=(C.length>0?C:F).flatMap(d=>{if(!d||typeof d!=\"object\"||Array.isArray(d))return[];const h=d;if(typeof h.id!=\"string\"||!h.id.trim())return[];const b=h.id.trim(),k=typeof h.label==\"string\"&&h.label.trim()?h.label.trim():b.replace(/_/g,\" \"),J=typeof h.route==\"string\"?h.route.trim():\"\",at=J===\"/\"?\"/\":`/${(J||b).replace(/^\\/+|\\/+$/g,\"\")}`;return[{id:b,label:k,route:at}]}),L=(w?u?.pages:A).filter(d=>typeof d==\"string\").map(d=>d.trim()).filter(Boolean).map((d,h)=>({id:d,label:d.replace(/_/g,\" \"),route:h===0?\"/\":`/${d}`})),M=V.length>0?V:L;if(M.length===0)return;const j=M.filter(d=>!x.has(d.id));if(j.length===0){R.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(d=>d.removeAttribute(\"data-fivora-page-disabled\"));return}let N=R.getElementById(\"fivora-page-selection-style\");(!N||N.tagName!==\"STYLE\")&&(N=R.createElement(\"style\"),N.id=\"fivora-page-selection-style\",N.textContent='[data-fivora-page-disabled=\"true\"]{display:none!important}',R.head.appendChild(N)),R.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(d=>d.removeAttribute(\"data-fivora-page-disabled\"));const z=__name(d=>{let h=d;try{const J=new URL(d,R.baseURI);if(J.origin!==R.location?.origin)return\"\";h=J.pathname}catch{return\"\"}const b=h.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];b&&h.startsWith(b)&&(h=h.slice(b.length)||\"/\"),h=h.replace(/\\/index\\.html$/i,\"/\").replace(/\\.html$/i,\"\");const k=h.replace(/\\/+$/g,\"\")||\"/\";return k.startsWith(\"/\")?k:`/${k}`},\"normalizePath\"),Y=__name(d=>M.find(h=>{const b=z(h.route);return b?b===\"/\"?d===\"/\":d===b||d.startsWith(`${b}/`):!1}),\"pageForPath\"),X=__name(d=>{for(const h of[\"href\",\"formaction\",\"data-href\",\"data-route\",\"data-url\"]){const b=d.getAttribute(h);if(!b)continue;const k=Y(z(b));if(k)return k}},\"pageForControl\"),p=__name(d=>{d&&d.setAttribute(\"data-fivora-page-disabled\",\"true\")},\"disable\");for(const d of j)for(const h of[\"data-page-key\",\"data-required-page\",\"data-target-page\"])R.querySelectorAll(`[${h}]`).forEach(b=>{b.getAttribute(h)===d.id&&p(b)});const T=Array.from(R.querySelectorAll(\"a[href]\"));for(const d of T){const h=X(d);if(!h||x.has(h.id))continue;if(d.classList.contains(\"absolute\")&&(d.classList.contains(\"inset-0\")||d.classList.contains(\"inset-x-0\")&&d.classList.contains(\"inset-y-0\")))p(d.closest(\"[data-preview-item-path],[data-design-card],article,li\"));else{const k=d.closest(\"li\");p(k&&k.querySelectorAll(\"a[href]\").length===1?k:d)}}const v=Array.from(R.querySelectorAll('button,[role=\"button\"],[data-href],[data-route],[data-url]')).filter(d=>d.tagName!==\"A\");for(const d of v){const h=X(d);if(!h||x.has(h.id))continue;const b=d.closest(\"li\");p(b&&b.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]').length===1?b:d)}const U=R.querySelector(\"main section\");for(const d of R.querySelectorAll(\"main section\")){const h=Array.from(d.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]')),b=h.map(X).filter(at=>!!at),k=d.hasAttribute(\"data-preview-page-key\"),J=d===U||d.hasAttribute(\"data-design-hero\")||/(?:^|\\s)(?:hero|banner|masthead)(?:\\s|$)/i.test(d.className)||!!d.querySelector(\"h1\");!k&&!J&&b.length>0&&b.length===h.length&&b.every(at=>!x.has(at.id))&&p(d)}},function(){const _=window;if(_.__fivoraSectionNavigationInstalled)return;_.__fivoraSectionNavigationInstalled=!0;const O=__name(c=>typeof CSS<\"u\"&&typeof CSS.escape==\"function\"?CSS.escape(c):c.replace(/[^a-zA-Z0-9_-]/g,w=>`\\\\${w.codePointAt(0)?.toString(16)??\"\"} `),\"escapeSelector\"),R=__name(()=>window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live|candidate)\\/[^/]+)/)?.[1]??\"\",\"previewRoot\"),I=__name(c=>{const w=R(),x=(w&&c.pathname.startsWith(w)?c.pathname.slice(w.length):c.pathname).replace(/\\/(?:index\\.html?)?$/i,\"\").split(\"/\").filter(Boolean);return(x[x.length-1]??\"home\").replace(/\\.html?$/i,\"\")},\"routeSectionKey\"),H=__name(c=>{const w=c.getAttribute(\"href\")?.trim();if(!w||c.hasAttribute(\"download\")||c.target&&c.target!==\"_self\"||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(w))return null;let A;try{A=new URL(w,window.location.href)}catch{return null}if(A.origin!==window.location.origin)return null;const x=A.hash?decodeURIComponent(A.hash.slice(1)).trim():\"\",C=x||I(A);if(!C)return null;if(x){const V=document.getElementById(x);if(V)return{target:V,key:C}}const F=O(C),W=document.querySelector(`section#${F},section[data-fivora-section=\"${F}\"],section[data-section-id=\"${F}\"],[data-preview-page-key=\"${F}\"]`);return W?{target:W,key:C}:null},\"findTarget\"),s=__name(()=>{let c=0;for(const w of document.querySelectorAll(\"header,nav,[data-fivora-sticky-header]\")){const A=window.getComputedStyle(w);if(A.position!==\"fixed\"&&A.position!==\"sticky\")continue;const x=w.getBoundingClientRect();x.height>0&&x.top<=4&&x.bottom>0&&(c=Math.max(c,x.bottom))}return c},\"fixedHeaderOffset\"),u=__name((c,w,A)=>{const x=Math.max(0,window.scrollY+c.getBoundingClientRect().top-s()-8),C=window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;window.scrollTo({top:x,behavior:C?\"auto\":\"smooth\"}),A&&window.location.hash!==`#${w}`&&window.history.pushState(null,\"\",`${window.location.pathname}${window.location.search}#${encodeURIComponent(w)}`)},\"scrollToTarget\");document.addEventListener(\"click\",c=>{if(c.defaultPrevented||c.button!==0||c.metaKey||c.ctrlKey||c.shiftKey||c.altKey)return;const w=c.target?.closest?.(\"a[href]\");if(!w)return;const A=H(w);!A||A.target===w||(c.preventDefault(),c.stopImmediatePropagation(),u(A.target,A.key,!0))},!0),window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>{if(!window.location.hash)return;const c=document.createElement(\"a\");c.href=window.location.hash;const w=H(c);w&&u(w.target,w.key,!1)}))});";
|
|
3
|
+
// Generated from visual editor bridge (v51).
|
|
4
|
+
module.exports = "var on=Object.defineProperty;var an=(j,C,T)=>C in j?on(j,C,{enumerable:!0,configurable:!0,writable:!0,value:T}):j[C]=T;var te=(j,C,T)=>an(j,typeof C!=\"symbol\"?C+\"\":C,T);var __name=typeof __name==\"function\"?__name:((j,C)=>typeof Object.defineProperty==\"function\"?Object.defineProperty(j,\"name\",{value:C,configurable:!0}):j);(function(C,T,I,P,q,a,d){try{if(typeof Node<\"u\"&&Node.prototype){const t=Node.prototype.removeChild;Node.prototype.removeChild=function(r){return r&&r.parentNode!==this?(typeof console<\"u\"&&typeof console.warn==\"function\"&&console.warn(\"PreviewBridge: removeChild on non-child node prevented from crashing React\",r),r):t.apply(this,arguments)};const e=Node.prototype.insertBefore;Node.prototype.insertBefore=function(r,o){return o&&o.parentNode!==this?(typeof console<\"u\"&&typeof console.warn==\"function\"&&console.warn(\"PreviewBridge: insertBefore on non-child reference node prevented from crashing React\",o),r):e.apply(this,arguments)}}typeof document<\"u\"&&document.documentElement&&(document.documentElement.setAttribute(\"data-gramm\",\"false\"),document.documentElement.setAttribute(\"data-gramm_editor\",\"false\"),document.documentElement.setAttribute(\"data-enable-grammarly\",\"false\"),document.documentElement.setAttribute(\"translate\",\"no\"))}catch{}const c=`${[\"MARKET\",\"PLACE\"].join(\"\")}_PREVIEW_`,y=__name(t=>`${c}${t}`,\"previousPreviewMessage\"),E=__name(t=>`__${c}${t}__`,\"previousPreviewStorageKey\"),x=\"FIVORA_PREVIEW_FOCUS_PAGE\",v=y(\"FOCUS_PAGE\"),N=\"FIVORA_PREVIEW_FOCUS_RESULT\",G=y(\"FOCUS_RESULT\"),R=\"FIVORA_PREVIEW_READY\",et=y(\"READY\"),O=\"data-fivora-preview-active-field\",_=\"data-fivora-resolved-field-path\",M=\"data-fivora-empty-editable\",V=\"data-fivora-empty-collection\",U=\"data-preview-list-path\",X=\"data-preview-item-path\",K=\"data-preview-static\",Z=\"__FIVORA_UNIVERSAL_PREVIEW_FOCUS__\",Q=\"__FIVORA_VISUAL_EDITOR_TARGETS__\",gt=\"__FIVORA_PREVIEW_PARENT_ORIGIN__\",Et=E(\"PARENT_ORIGIN\"),g=\"__FIVORA_PREVIEW_SITE_DATA_CACHE__\",l=E(\"SITE_DATA_CACHE\"),f=\"__FIVORA_PREVIEW_SITE_DATA__\",h=E(\"SITE_DATA\"),D=\"FIVORA_PREVIEW_SITE_DATA\",L=y(\"SITE_DATA\"),H=\"FIVORA_PREVIEW_SITE_DATA_APPLIED\",W=y(\"SITE_DATA_APPLIED\"),mt=\"FIVORA_PREVIEW_CONTENT_PATCH\",_r=y(\"CONTENT_PATCH\"),kr=\"FIVORA_PREVIEW_STYLE_PATCH\",Me=\"fivora-template-color-replacements\",Or=[200],Lr=2500,Mr=1600,Fr=12e3,Le=class Le{constructor(){te(this,\"elementToPath\",new WeakMap);te(this,\"pathToElements\",new Map);te(this,\"dynamicTargets\",new Set)}getPath(e){return this.elementToPath.get(e)}findTargets(e){return Array.from(this.pathToElements.get(e)??[])}getDynamicTargets(){return Array.from(this.dynamicTargets)}register(e,r){this.elementToPath.set(e,r),this.pathToElements.has(r)||this.pathToElements.set(r,new Set),this.pathToElements.get(r).add(e),this.dynamicTargets.add(e)}clear(){this.pathToElements.clear(),this.dynamicTargets.clear()}};__name(Le,\"TargetRegistry\");let ee=Le;const Fe=new ee,Nr=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small\";let re=[];const Ne=new Map;let De=0,ne=!1,kt=null,oe,ie=[],at=null,k=null,Be=\"\",He=\"\",Ve=\"\";function ht(){try{window.sessionStorage.removeItem(Z)}catch{}}__name(ht,\"clearPendingFocus\");function ae(){try{return window.sessionStorage.getItem(gt)||window.sessionStorage.getItem(Et)}catch{return null}}__name(ae,\"readRememberedParentOrigin\");function se(t){if(t)try{window.sessionStorage.setItem(gt,t)}catch{}}__name(se,\"rememberParentOrigin\");function qe(){for(const t of ie)window.clearTimeout(t);ie=[]}__name(qe,\"clearSiteDataRelayTimers\");function Ge(){const t=new Set;ct&&t.add(ct),t.add(window.location.origin);const e=ae();e&&t.add(e);try{if(document.referrer){const r=new URL(document.referrer).origin;r&&r!==\"null\"&&t.add(r)}}catch{}try{const r=window.location.ancestorOrigins?.item(0);r&&t.add(r)}catch{}return Array.from(t)}__name(Ge,\"collectSiteDataRelayOrigins\");function Ot(t,e){const r=Ge(),o=e?.fanOut?r:r.slice(0,1);for(const i of o)for(const n of[D,L])try{window.dispatchEvent(new MessageEvent(\"message\",{data:{type:n,siteData:t,__fivoraBridgeRelay:!0},origin:i,source:window.parent}))}catch{}}__name(Ot,\"relaySiteDataToTemplateRuntime\");function Lt(t,e){k=t;try{window[f]=t,window[h]=t}catch{}const r=__name(()=>{at=null;try{const o=JSON.stringify(k);window.sessionStorage.setItem(g,o),window.sessionStorage.setItem(l,o)}catch{}},\"writeSessionCache\");if(e?.immediate){at!==null&&(window.clearTimeout(at),at=null),r();return}at!==null&&window.clearTimeout(at),at=window.setTimeout(r,Lr)}__name(Lt,\"persistSiteData\");function We(t){const e=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,r=e?.requirements&&typeof e.requirements==\"object\"&&!Array.isArray(e.requirements)?e.requirements:null,o=e?.template&&typeof e.template==\"object\"&&!Array.isArray(e.template)?e.template:null,i=o?.structure&&typeof o.structure==\"object\"&&!Array.isArray(o.structure)?o.structure:null;try{return JSON.stringify({requiredPages:r?.requiredPages??null,pages:i?.pages??null,pageDefinitions:o?.pageDefinitions??i?.pageDefinitions??null})}catch{return String(Date.now())}}__name(We,\"pagesSignature\");let st=null,lt=null;function je(t){const e=[];for(const r of t.matchAll(/([^.[\\]]+)|\\[(\\d+)\\]/g))r[2]!==void 0?e.push(Number(r[2])):r[1]&&e.push(r[1]);return e}__name(je,\"parseFieldPath\");function Ue(t,e,r){if(e.length===0)return t;const o=__name((i,n)=>{const s=e[n],u=n===e.length-1,p=u?void 0:e[n+1];if(typeof s==\"number\"){const w=(Array.isArray(i)?i:[]).slice();if(u)return w[s]=r,w;const F=w[s];return w[s]=F==null||typeof F!=\"object\"?o(typeof p==\"number\"?[]:{},n+1):o(F,n+1),w}const m={...i&&typeof i==\"object\"&&!Array.isArray(i)?i:{}};if(u)return m[s]=r,m;const S=m[s];return m[s]=S==null||typeof S!=\"object\"?o(typeof p==\"number\"?[]:{},n+1):o(S,n+1),m},\"setAt\");return o(t,0)}__name(Ue,\"setValueAtPath\");function ze(){return(k&&typeof k==\"object\"&&!Array.isArray(k)?k:{}).content??{}}__name(ze,\"readPublishedContent\");function le(t){const r={...k&&typeof k==\"object\"&&!Array.isArray(k)?k:{},content:t};k=r;try{window[f]=r,window[h]=r}catch{}return r}__name(le,\"writePublishedContent\");function ce(){st!==null&&window.clearTimeout(st),st=window.setTimeout(()=>{st=null,k!=null&&Ot(k,{fanOut:!1})},Mr)}__name(ce,\"scheduleContentOnlyRelay\");function Mt(){lt!==null&&window.clearTimeout(lt),lt=window.setTimeout(()=>{if(lt=null,k==null)return;const t=window;if(typeof t.requestIdleCallback==\"function\"){t.requestIdleCallback(()=>{k!=null&&Lt(k,{immediate:!0})},{timeout:4e3});return}Lt(k,{immediate:!0})},Fr)}__name(Mt,\"scheduleContentOnlyPersist\");function de(t,e){const r=Array.from(document.querySelectorAll(`[data-preview-field-path=\"${CSS.escape(t)}\"], [${_}=\"${CSS.escape(t)}\"]`));for(const o of r){if(tt?.target===o)continue;if(o.tagName===\"IMG\"){typeof e==\"string\"&&e.trim()&&o.setAttribute(\"src\",e);continue}if(typeof e!=\"string\"&&typeof e!=\"number\"&&typeof e!=\"boolean\")continue;const i=(o.getAttribute(\"data-fivora-value-prefix\")??\"\")+String(e)+(o.getAttribute(\"data-fivora-value-suffix\")??\"\");if(o.childElementCount===0)o.textContent=i;else{const n=Array.from(o.childNodes).find(s=>s.nodeType===Node.TEXT_NODE&&s.textContent?.trim());n?n.textContent=i:o.textContent=i}J&&(i.trim().length===0?o.setAttribute(M,\"true\"):o.removeAttribute(M))}}__name(de,\"applyDomFieldValue\");function Ke(t){if(!Array.isArray(t)||t.length===0)return;let e=ze();for(const r of t){if(!r||typeof r.path!=\"string\"||!r.path.trim())continue;const o=je(r.path);o.length!==0&&(e=Ue(e,o,r.value),de(r.path,r.value))}le(e),ce(),Mt()}__name(Ke,\"publishContentPatches\");function Ye(t){le(t),ce(),Mt()}__name(Ye,\"publishContentOnly\");function Je(t,e){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(t)||!e||typeof e!=\"object\"||Array.isArray(e))return;const r=k&&typeof k==\"object\"&&!Array.isArray(k)?k:{},o=r.template&&typeof r.template==\"object\"&&!Array.isArray(r.template)?r.template:{},i=o.structure&&typeof o.structure==\"object\"&&!Array.isArray(o.structure)?o.structure:{},n=(i.theme&&typeof i.theme==\"object\"&&!Array.isArray(i.theme)?i.theme:o.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:{})||{},s=n.elementStyles&&typeof n.elementStyles==\"object\"&&!Array.isArray(n.elementStyles)?n.elementStyles:{},u=e&&typeof e==\"object\"&&Object.values(e).some(A=>A!=null&&A!==\"\"),p={...s};u?p[t]=e:delete p[t];const b={...n,designCustomizationVersion:1,elementStyles:p},m={...o,theme:b,structure:{...i,theme:b}},S={...r,template:m};k=S,xt(S),Xe(t,e),Mt()}__name(Je,\"publishElementStylePatch\");function Xe(t,e){if(!t||!e||typeof e!=\"object\"||Array.isArray(e))return;const r=e;let o=[];if(t.includes(\":\")){const[n,s]=t.split(\":\");s===\"card\"?o=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(n)}\"] [data-preview-item-path], [data-preview-list-path=\"${CSS.escape(n)}\"] .card, [data-preview-list-path=\"${CSS.escape(n)}\"] article`)):s&&(o=Array.from(document.querySelectorAll(`[data-preview-list-path=\"${CSS.escape(n)}\"] [data-preview-field-path$=\".${CSS.escape(s)}\"], [data-preview-list-path=\"${CSS.escape(n)}\"] [data-field-path$=\".${CSS.escape(s)}\"]`)))}else o=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 i=__name(n=>n==null||n===\"\"?\"\":typeof n==\"number\"?`${n}px`:String(n),\"toCssVal\");for(const n of o){if(r.color?(n.style.setProperty(\"color\",String(r.color),\"important\"),n.style.setProperty(\"--deneb-color\",String(r.color))):(n.style.removeProperty(\"color\"),n.style.removeProperty(\"--deneb-color\")),r.textAlign?(n.style.setProperty(\"text-align\",String(r.textAlign),\"important\"),n.style.setProperty(\"--deneb-text-align\",String(r.textAlign))):(n.style.removeProperty(\"text-align\"),n.style.removeProperty(\"--deneb-text-align\")),r.fontSize){const s=i(r.fontSize);n.style.setProperty(\"font-size\",s,\"important\"),n.style.setProperty(\"--deneb-font-size\",s)}else n.style.removeProperty(\"font-size\"),n.style.removeProperty(\"--deneb-font-size\");if(r.fontFamily?(n.style.setProperty(\"font-family\",String(r.fontFamily),\"important\"),n.style.setProperty(\"--deneb-font-family\",String(r.fontFamily))):(n.style.removeProperty(\"font-family\"),n.style.removeProperty(\"--deneb-font-family\")),r.lineHeight?(n.style.setProperty(\"line-height\",String(r.lineHeight),\"important\"),n.style.setProperty(\"--deneb-line-height\",String(r.lineHeight))):(n.style.removeProperty(\"line-height\"),n.style.removeProperty(\"--deneb-line-height\")),r.fontWeight?(n.style.setProperty(\"font-weight\",String(r.fontWeight),\"important\"),n.style.setProperty(\"--deneb-font-weight\",String(r.fontWeight))):(n.style.removeProperty(\"font-weight\"),n.style.removeProperty(\"--deneb-font-weight\")),r.letterSpacing?(n.style.setProperty(\"letter-spacing\",i(r.letterSpacing),\"important\"),n.style.setProperty(\"--deneb-letter-spacing\",i(r.letterSpacing))):(n.style.removeProperty(\"letter-spacing\"),n.style.removeProperty(\"--deneb-letter-spacing\")),r.textTransform?(n.style.setProperty(\"text-transform\",String(r.textTransform),\"important\"),n.style.setProperty(\"--deneb-text-transform\",String(r.textTransform))):(n.style.removeProperty(\"text-transform\"),n.style.removeProperty(\"--deneb-text-transform\")),r.backgroundColor?(n.style.setProperty(\"background-color\",String(r.backgroundColor),\"important\"),n.style.setProperty(\"background\",String(r.backgroundColor),\"important\"),n.style.setProperty(\"--deneb-card-bg\",String(r.backgroundColor))):(n.style.removeProperty(\"background-color\"),n.style.removeProperty(\"background\"),n.style.removeProperty(\"--deneb-card-bg\")),r.borderRadius){const s=i(r.borderRadius);n.style.setProperty(\"border-radius\",s,\"important\"),n.style.setProperty(\"--deneb-card-radius\",s)}else n.style.removeProperty(\"border-radius\"),n.style.removeProperty(\"--deneb-card-radius\");if(r.padding){const s=i(r.padding);n.style.setProperty(\"padding\",s,\"important\"),n.style.setProperty(\"--deneb-card-pt\",s)}else n.style.removeProperty(\"padding\"),n.style.removeProperty(\"--deneb-card-pt\");if(r.paddingTop?n.style.setProperty(\"padding-top\",i(r.paddingTop),\"important\"):n.style.removeProperty(\"padding-top\"),r.paddingBottom?n.style.setProperty(\"padding-bottom\",i(r.paddingBottom),\"important\"):n.style.removeProperty(\"padding-bottom\"),r.paddingLeft?n.style.setProperty(\"padding-left\",i(r.paddingLeft),\"important\"):n.style.removeProperty(\"padding-left\"),r.paddingRight?n.style.setProperty(\"padding-right\",i(r.paddingRight),\"important\"):n.style.removeProperty(\"padding-right\"),r.boxShadow?(n.style.setProperty(\"box-shadow\",String(r.boxShadow),\"important\"),n.style.setProperty(\"--deneb-card-shadow\",String(r.boxShadow))):(n.style.removeProperty(\"box-shadow\"),n.style.removeProperty(\"--deneb-card-shadow\")),r.borderColor?(n.style.setProperty(\"border-color\",String(r.borderColor),\"important\"),n.style.setProperty(\"--deneb-card-border-c\",String(r.borderColor))):(n.style.removeProperty(\"border-color\"),n.style.removeProperty(\"--deneb-card-border-c\")),r.borderWidth){const s=i(r.borderWidth);n.style.setProperty(\"border-width\",s,\"important\"),n.style.setProperty(\"border-style\",\"solid\",\"important\"),n.style.setProperty(\"--deneb-card-border-w\",s)}else n.style.removeProperty(\"border-width\"),n.style.removeProperty(\"border-style\"),n.style.removeProperty(\"--deneb-card-border-w\");r.marginTop?n.style.setProperty(\"margin-top\",i(r.marginTop),\"important\"):n.style.removeProperty(\"margin-top\"),r.marginBottom?n.style.setProperty(\"margin-bottom\",i(r.marginBottom),\"important\"):n.style.removeProperty(\"margin-bottom\"),r.marginLeft?n.style.setProperty(\"margin-left\",i(r.marginLeft),\"important\"):n.style.removeProperty(\"margin-left\"),r.marginRight?n.style.setProperty(\"margin-right\",i(r.marginRight),\"important\"):n.style.removeProperty(\"margin-right\"),r.display?n.style.setProperty(\"display\",String(r.display),\"important\"):n.style.removeProperty(\"display\"),r.order!==void 0&&r.order!==null&&r.order!==\"\"?n.style.setProperty(\"order\",String(r.order),\"important\"):n.style.removeProperty(\"order\")}}__name(Xe,\"applyElementStyleDirectly\");function Ft(t,e){if(e?.contentOnly){const r=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null;Ye(r?.content??t);return}if(st!==null&&(window.clearTimeout(st),st=null),lt!==null&&(window.clearTimeout(lt),lt=null),ne){kt=t,oe=e;return}ne=!0;try{if(Lt(t,{immediate:e?.persistImmediate}),ue(t),xt(t,{colorReplacements:e?.colorReplacements===!0}),Ot(t,{fanOut:e?.fanOut===!0}),e?.scheduleRelays!==!1){qe();for(const r of Or)ie.push(window.setTimeout(()=>{k!=null&&Ot(k,{fanOut:!0})},r))}}finally{if(ne=!1,kt!=null){const r=kt,o=oe;kt=null,oe=void 0,window.setTimeout(()=>{Ft(r,o)},0)}}}__name(Ft,\"publishSiteData\");function Ze(t){const e=t?.full!==!1,r=\"ontouchstart\"in window||navigator.maxTouchPoints>0||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4;window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{try{Y({type:H,full:e}),Y({type:W,full:e})}catch{}const o=k;if(o==null)return;const i=__name(()=>xt(o,{colorReplacements:!0}),\"run\");if(!r){window.setTimeout(i,0);return}const n=window.requestIdleCallback;typeof n==\"function\"?n(i,{timeout:4e3}):window.setTimeout(i,1200)})})}__name(Ze,\"acknowledgeSiteDataApplied\");const Dr=(()=>{try{return window.location.ancestorOrigins?.item(0)??null}catch{return null}})(),Br=(()=>{try{return window.parent!==window?window.parent.location.origin:null}catch{return null}})();let ct=C({currentOrigin:window.location.origin,referrer:document.referrer,rememberedOrigin:ae(),ancestorOrigin:Dr,accessibleParentOrigin:Br});se(ct);function Qe(t){if(t.source!==window.parent)return!1;if(ct)return t.origin===ct;try{const e=new URL(t.origin).origin;return e===\"null\"?!1:(ct=e,se(e),!0)}catch{return!1}}__name(Qe,\"isTrustedParentMessage\");function Y(t){window.parent.postMessage(t,ct??\"*\")}__name(Y,\"postToParent\");function yt(t,e,r=0){t.requestId&&(Y({type:N,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:r}),Y({type:G,requestId:t.requestId,result:e,fieldPath:t.fieldPath??null,pageRoute:t.pageRoute??null,occurrences:r}))}__name(yt,\"postFocusResult\");function Ct(){try{Y({type:R,pathname:window.location.pathname}),Y({type:et,pathname:window.location.pathname})}catch{}}__name(Ct,\"announceReady\");async function tr(t){const e=++De,o=(t&&typeof t==\"object\"&&!Array.isArray(t)?t:null)?.colorReplacements,i=document.getElementById(Me);if(!o||typeof o!=\"object\"||Array.isArray(o)||Object.keys(o).length===0){i?.remove();return}const n=Array.from(document.querySelectorAll('link[rel=\"stylesheet\"][href]')),s=await Promise.all(n.map(async b=>{const m=b.href;let S=Ne.get(m);if(S===void 0){const w=await fetch(m,{credentials:\"same-origin\"});if(!w.ok)return\"\";S=await w.text(),Ne.set(m,S)}const A=I(S,o);return A===S?\"\":A}));if(e!==De)return;const u=s.filter(Boolean).join(`\n`);if(!u){i?.remove();return}const p=i instanceof HTMLStyleElement?i:document.createElement(\"style\");p.id=Me,p.textContent=u,p.isConnected||document.head.appendChild(p)}__name(tr,\"applyTemplateColorReplacements\");function xt(t,e){const r=t&&typeof t==\"object\"&&!Array.isArray(t)?t:null,o=r?.template&&typeof r.template==\"object\"&&!Array.isArray(r.template)?r.template:null,i=o?.structure&&typeof o.structure==\"object\"&&!Array.isArray(o.structure)?o.structure:null,n=i?.theme&&typeof i.theme==\"object\"&&!Array.isArray(i.theme)?i.theme:o?.theme&&typeof o.theme==\"object\"&&!Array.isArray(o.theme)?o.theme:null,s=(()=>{try{return JSON.stringify(n??null)}catch{return String(Date.now())}})();if(s!==Be){Be=s;const p=n&&typeof n==\"object\"&&!Array.isArray(n)?n:null,b=typeof p?.backgroundColor==\"string\"?p.backgroundColor:typeof p?.background==\"string\"?p.background:\"\";(b&&/^#[0-9a-f]{3,6}$/i.test(b.trim())?(()=>{const w=b.trim().toLowerCase(),F=w.length===4?`#${w[1]}${w[1]}${w[2]}${w[2]}${w[3]}${w[3]}`:w,B=Number.parseInt(F.slice(1,3),16),At=Number.parseInt(F.slice(3,5),16),St=Number.parseInt(F.slice(5,7),16);return(B*299+At*587+St*114)/1e3<130})():!1)?(document.documentElement.classList.add(\"dark\"),document.documentElement.setAttribute(\"data-theme\",\"dark\"),document.body&&(document.body.classList.add(\"dark\"),document.body.setAttribute(\"data-theme\",\"dark\"))):b&&(document.documentElement.classList.remove(\"dark\"),document.documentElement.setAttribute(\"data-theme\",\"light\"),document.body&&(document.body.classList.remove(\"dark\"),document.body.setAttribute(\"data-theme\",\"light\")));const S=T(n),A=document.getElementById(P);if(!S)A?.remove();else{const w=A instanceof HTMLStyleElement?A:document.createElement(\"style\");w.id=P,w.textContent=S,w.isConnected||document.head.appendChild(w)}}if(e?.colorReplacements){if(s===He)return;He=s,tr(n).catch(()=>{})}}__name(xt,\"applyUniversalTheme\");function ue(t){const e=We(t);e!==Ve&&(Ve=e,q(t,document),window.setTimeout(()=>q(t,document),300))}__name(ue,\"applySelectedPages\");function $(t){return String(t??\"\").trim().replace(/\\s+/g,\" \").toLowerCase()}__name($,\"normalizeText\");function Nt(t){const e=String(t??\"\").trim();if(!e)return[];const r=e.split(/[,;|\\n\\r]+/).map(o=>$(o)).filter(o=>o.length>=3);return Array.from(new Set([$(e),...r])).filter(o=>o.length>=2)}__name(Nt,\"valueFragments\");function Dt(t,e){const r=$(e),o=$(t);return/image|photo|logo|banner|thumbnail|cover/.test(r)||/^(https?:|data:|blob:|\\/)/.test(o)}__name(Dt,\"isImageValue\");function er(t){const e=new Set,r=t.getAttribute(\"src\")||\"\";r&&e.add(r),\"src\"in t&&t.src&&e.add(t.src),\"currentSrc\"in t&&t.currentSrc&&e.add(t.currentSrc);const o=t.getAttribute(\"srcset\");o&&o.split(\",\").forEach(i=>{const n=i.trim().split(/\\s+/)[0];n&&e.add(n)});for(const i of[\"data-src\",\"data-original\",\"data-fallback\",\"data-nimg\",\"data-image\",\"data-url\"]){const n=t.getAttribute(i);n&&n!==\"1\"&&e.add(n)}if(t.style.backgroundImage){const i=t.style.backgroundImage.match(/url\\([\"']?([^\"']+)[\"']?\\)/i);i?.[1]&&e.add(i[1])}for(const i of Array.from(e))try{const s=new URL(i,window.location.href).searchParams.get(\"url\");if(s){e.add(s);try{e.add(decodeURIComponent(s))}catch{}}}catch{}return Array.from(e).filter(Boolean)}__name(er,\"extractImageCandidates\");function fe(t,e){const r=String(e??\"\").trim();if(!r)return!1;const o=er(t);if(o.length===0)return!1;const n=r.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();for(const s of o){if(s===r)return!0;try{if(new URL(s,window.location.href).href===new URL(r,window.location.href).href)return!0}catch{}if(s.includes(r)||r.includes(s))return!0;try{const b=decodeURIComponent(s);if(b.includes(r)||r.includes(b))return!0}catch{}const p=s.split(\"?\")[0].replace(/\\\\/g,\"/\").split(\"/\").pop()?.toLowerCase();if(p&&n&&p.length>=3&&p===n)return!0}return!1}__name(fe,\"imageMatchesValue\");function pe(t,e){return Array.from(t.querySelectorAll(\"img\")).filter(r=>fe(r,e))}__name(pe,\"findImageMatches\");function Bt(t,e){const r=String(e??\"\").trim();return r?[t.getAttribute(\"href\"),t.getAttribute(\"src\"),t.getAttribute(\"poster\"),t.getAttribute(\"srcset\"),t.style.backgroundImage].filter(i=>!!i).some(i=>{if(i===r||i.includes(r))return!0;try{return new URL(i,window.location.href).href===new URL(r,window.location.href).href}catch{return!1}}):!1}__name(Bt,\"attributeMatchesValue\");function Ht(t,e){return Array.from(t.querySelectorAll('a[href], img[src], source[src], video[poster], [style*=\"background-image\"]')).filter(r=>Bt(r,e))}__name(Ht,\"findAttributeMatches\");function rr(t,e){const r=Nt(e);if(r.length===0)return[];const o=Array.from(t.querySelectorAll(Nr)),i=o.filter(n=>{const s=$(n.textContent);return r.some(u=>s===u)});return i.length>0?i:o.filter(n=>{const s=$(n.textContent);return r.some(u=>s.includes(u)||u.includes(s))})}__name(rr,\"findTextMatches\");function Vt(t,e,r){if(Dt(e,r)){const o=pe(t,e);if(o.length>0)return o}return rr(t,e)}__name(Vt,\"findValueMatches\");function nr(t,e,r){if(Dt(e,r)&&pe(t,e).length>0)return!0;const o=$(t.textContent);return Nt(e).some(i=>o.includes(i))}__name(nr,\"subtreeContainsValue\");function or(t,e){const r=t[0];if(!r)return null;let o=r;for(;o;){if(t.every(i=>o?.contains(i)))return o;if(o===e)break;o=o.parentElement}return e??r}__name(or,\"lowestCommonAncestor\");function dt(t){const e=String(t??\"\").trim();if(!e)return[];const r=e.replace(/\\[(\\d+)\\]/g,\".$1\"),o=r.replace(/\\.(\\d+)(?=\\.|$)/g,\"[$1]\");return Array.from(new Set([e,r,o]))}__name(dt,\"pathVariants\");function ge(t){return Array.from(new Set([t.fieldPath,...t.fieldPaths??[]].filter(e=>!!(e&&e.trim())).flatMap(e=>dt(e))))}__name(ge,\"focusPathCandidates\");function vt(t){if(t.closest(\"[hidden]\"))return!1;let e=t;for(;e&&e!==document.documentElement;){const o=window.getComputedStyle(e);if(o.display===\"none\"||o.visibility===\"hidden\"||Number(o.opacity)===0||o.maxHeight===\"0px\"||o.maxHeight===\"0\")return!1;const i=e.getBoundingClientRect();if((o.overflow===\"hidden\"||o.overflow===\"clip\")&&(i.width<2||i.height<2))return!1;e=e.parentElement}const r=t.getBoundingClientRect();return r.width>=2&&r.height>=2}__name(vt,\"isVisuallyHighlightable\");function me(t){let e=0;vt(t)&&(e+=100);const r=$(t.textContent);r.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\"]')&&r.length<2&&t.tagName!==\"IMG\"&&(e-=25);const o=t.getBoundingClientRect();return e+=Math.min(15,Math.floor(o.width*o.height/400)),e}__name(me,\"highlightTargetScore\");function he(t){return[...t].sort((e,r)=>me(r)-me(e))}__name(he,\"rankHighlightTargets\");function ir(t,e){const r=[],o=Array.from(new Set([t,...e??[]].filter(s=>!!s).flatMap(s=>dt(s))));for(const s of o){const u=CSS.escape(s);document.querySelectorAll('[data-preview-field-path=\"'+u+'\"], [data-preview-list-path=\"'+u+'\"], [data-content-path=\"'+u+'\"]').forEach(p=>{r.includes(p)||r.push(p)})}const i=he(r.filter(s=>vt(s))),n=i.filter(s=>!i.some(u=>u!==s&&s.contains(u)));return n.length>0?n:i}__name(ir,\"findExplicitTargets\");function ye(t){const e=(t?.itemValues??[]).filter(n=>$(n.value).length>=2&&n.key!==\"id\");if(e.length===0)return null;const r=[];for(const n of e)for(const s of Vt(document,n.value,n.key).slice(0,8))r.includes(s)||r.push(s);let o=null;for(const n of r){let s=n,u=0;for(;s&&s!==document.body&&u<12;){const p=e.reduce((S,A)=>S+(nr(s,A.value,A.key)?1:0),0),b=s.getBoundingClientRect(),m=Math.max(1,b.width*b.height);(!o||p>o.score||p===o.score&&m<o.area)&&(o={target:s,score:p,area:m}),s=s.parentElement,u+=1}}const i=Math.min(2,e.length);return o&&o.score>=i?o.target:null}__name(ye,\"findItemContainer\");function qt(t,e,r){const o=Vt(t,e,r);if(o.length===0)return null;const i=Nt(e);if(i.length>1&&!Dt(e,r)){const n=o.filter(s=>{const u=$(s.textContent);return i.slice(1).some(p=>u===p)});if(n.length>1)return or(n,t instanceof HTMLElement?t:null)}return o.sort((n,s)=>$(n.textContent).length-$(s.textContent).length)[0]}__name(qt,\"findFieldTarget\");function Gt(t,e){const r=String(t??e??\"\").trim().toLowerCase().replace(/\\s+/g,\"_\");return!r||r===\"common\"?\"home\":r===\"about\"?\"about_us\":r}__name(Gt,\"normalizePageKey\");function ar(t){const e=t.replace(/_us$/,\"\"),r=['[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 o of r){const i=document.querySelector(o);if(i instanceof HTMLElement)return i}return null}__name(ar,\"findPageTarget\");function be(t,e){const r=window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/),o=String(e??\"\").trim(),i=o?\"/\"+o.replace(/^\\/+|\\/+$/g,\"\"):null,n=i!==null?i===\"/\"?\"\":i:t===\"home\"?\"\":\"/\"+t.replace(/^\\/+/,\"\");return r?r[1]+n:n||\"/\"}__name(be,\"resolvePath\");function we(){for(const t of re)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(O);re=[]}__name(we,\"clearHighlight\");function Wt(t,e){we(),re=t.map(r=>({target:r,outline:r.style.outline,outlineOffset:r.style.outlineOffset,boxShadow:r.style.boxShadow,transition:r.style.transition,scrollMarginTop:r.style.scrollMarginTop,borderRadius:r.style.borderRadius}));for(const r of t)r.setAttribute(O,\"true\"),r.style.scrollMarginTop=\"72px\",r.style.transition=\"outline-color 0.2s ease, box-shadow 0.2s ease\",r.style.outline=\"2px solid rgba(34, 197, 94, 0.98)\",r.style.outlineOffset=\"4px\",r.style.boxShadow=\"0 0 0 7px rgba(34, 197, 94, 0.2)\",r.style.borderRadius||(r.style.borderRadius=\"4px\");t[0]?.scrollIntoView({behavior:\"smooth\",block:e?\"start\":\"center\",inline:\"nearest\"})}__name(Wt,\"highlightTargets\");function sr(t,e){Wt([t],e)}__name(sr,\"highlight\");function jt(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(jt,\"focusMatchValues\");function lr(t){const e=ge(t);if(e.length===0)return null;try{const r=JSON.parse(window.sessionStorage.getItem(Q)??\"{}\");for(const o of e){const i=r[`${window.location.pathname}|${o}`];if(!i)continue;const n=document.querySelector(i);if(!n)continue;const s=jt(t).map($),u=$(n.textContent);if(!(s.length>0&&u&&!s.some(p=>u===p||u.includes(p)||Bt(n,p))))return n}return null}catch{return null}}__name(lr,\"findRememberedFocusTarget\");function Tt(t){if(!t)return null;if(vt(t))return t;let e=t.parentElement;for(;e&&e!==document.body;){if(vt(e))return e;e=e.parentElement}return null}__name(Tt,\"pickVisibleHeuristicTarget\");function Ae(t){const e=ge(t),r=ir(t.fieldPath,e.filter(s=>s!==t.fieldPath));if(r.length>0)return{targets:r,result:\"exact\"};const o=Tt(lr(t));if(o)return{targets:[o],result:\"heuristic\"};const i=ye(t.fieldContext),n=t.fieldContext?.fieldKey;if(i){for(const u of jt(t)){const p=Tt(Ht(i,u)[0]??qt(i,u,n));if(p)return{targets:[p],result:\"heuristic\"}}const s=Tt(i);if(s)return{targets:[s],result:\"heuristic\"}}for(const s of jt(t)){const u=Ht(document,s),p=qt(document,s,n),b=p?[...u,p]:u,m=he(b.map(S=>Tt(S)).filter(S=>!!S));if(m.length>0)return{targets:[m[0]],result:\"heuristic\"}}return null}__name(Ae,\"resolveFieldTarget\");function Se(){document.documentElement.dataset.fivoraPreview=\"true\",document.querySelectorAll(\".reveal-on-scroll:not(.reveal-active)\").forEach(t=>t.classList.add(\"reveal-active\"))}__name(Se,\"activateRevealNodes\");function ut(t,e=0){Se();const r=!!t.fieldPath;if(t.focusOnly&&r){const s=Ae(t);if(s){Wt(s.targets,!1),yt(t,s.result,s.targets.length);return}if(e<12){window.setTimeout(()=>ut(t,e+1),120);return}yt(t,\"missing\");return}const o=Gt(t.pageKey,t.pageLabel),i=ar(o);if(!i){e<12?window.setTimeout(()=>ut(t,e+1),120):yt(t,\"missing\");return}const n=r?Ae(t):null;if(r&&!n&&e<12){window.setTimeout(()=>ut(t,e+1),120);return}n?(Wt(n.targets,!1),yt(t,n.result,n.targets.length)):(sr(i,!0),yt(t,\"page\",1))}__name(ut,\"applyFocus\");function cr(t){if(t.focusOnly){ht(),window.setTimeout(()=>ut(t),80);return}const e=Gt(t.pageKey,t.pageLabel),r=be(e,t.pageRoute);if((window.location.pathname.replace(/\\/+$/,\"\")||\"/\")!==r){try{window.sessionStorage.setItem(Z,JSON.stringify({...t,awaitingNavigation:!0}))}catch{}window.location.assign(r);return}ht(),window.setTimeout(()=>ut(t),80)}__name(cr,\"handleFocus\");function Ee(t){return $(t).replace(/\\.html$/i,\"\").replace(/[^a-z0-9]+/g,\"-\")}__name(Ee,\"normalizeRouteToken\");function dr(){const t=window.location.pathname.split(\"/\").map(n=>decodeURIComponent(n).trim()).filter(Boolean);if(t.length<2||z.length===0)return;const e=z.filter(n=>{const s=n.context;if(!s?.collectionPath||!s.fieldKey)return!1;const u=s.collectionPath.split(\".\").at(-1)??\"\",p=t.lastIndexOf(u);if(p<0||p>=t.length-1)return!1;const b=Ee(t.at(-1)??\"\");return s.itemValues.some(({key:m,value:S})=>{const A=$(m).replace(/[^a-z0-9]/g,\"\");return A!==\"id\"&&!A.endsWith(\"id\")&&A!==\"slug\"&&A!==\"name\"&&A!==\"title\"?!1:Ee(S)===b})});if(e.length===0)return;const r=Array.from(document.querySelectorAll(`[${K}]`)),o=[];for(const n of e){const s=n.context,u=s.fieldKey,p=$(u).replace(/[^a-z0-9]/g,\"\");if(p===\"slug\"||p===\"identifier\"||p.endsWith(\"id\"))continue;const b=s.collectionPath.split(\".\").at(-1)??\"\",m=$(b).replace(/s$/,\"\"),S=u.replace(/([a-z0-9])([A-Z])/g,\"$1 $2\").split(/[^a-z0-9]+/i).map($).filter(w=>w&&![\"url\",\"text\",\"value\"].includes(w)),A=$(n.value);for(const w of r){const F=$(w.getAttribute(K));if(!F||!F.includes(m))continue;let B=0;const At=S.filter(Rt=>F.includes(Rt));At.length>0&&(B+=40+At.length*5);const St=w.tagName===\"IMG\"?$(w.getAttribute(\"src\")??w.getAttribute(\"alt\")):$(w.textContent);A&&St===A?B+=120:A.length>=3&&St.includes(A)&&(B+=80),/image|photo|logo|banner|thumbnail|cover/i.test(u)&&w.tagName===\"IMG\"&&F.includes(\"image\")&&(B+=120),B>=40&&o.push({element:w,field:n,score:B})}}o.sort((n,s)=>s.score-n.score);const i=new Set;for(const{element:n,field:s}of o)if(!i.has(n)){if(i.add(n),n.tagName!==\"IMG\"){const u=n.textContent??\"\",p=String(s.value??\"\"),b=u.toLowerCase().indexOf(p.toLowerCase());p&&b>=0&&u!==p&&(n.setAttribute(\"data-fivora-value-prefix\",u.slice(0,b)),n.setAttribute(\"data-fivora-value-suffix\",u.slice(b+p.length)))}n.removeAttribute(K),n.setAttribute(\"data-preview-field-path\",s.path),de(s.path,s.value)}}__name(dr,\"promoteActiveRouteDetailFields\");const Hr=\"FIVORA_PREVIEW_ELEMENT_CLICKED\",Vr=y(\"ELEMENT_CLICKED\"),qr=\"FIVORA_PREVIEW_FIELD_CHANGED\",Gr=y(\"FIELD_CHANGED\"),Wr=\"FIVORA_PREVIEW_EDIT_MODE\",jr=y(\"EDIT_MODE\"),Ur=\"FIVORA_PREVIEW_FLUSH_EDIT\",zr=y(\"FLUSH_EDIT\"),Kr=\"FIVORA_PREVIEW_EDIT_FLUSHED\",Yr=y(\"EDIT_FLUSHED\"),Jr=\"h1, h2, h3, h4, h5, h6, p, span, a, button, address, li, dt, dd, label, strong, em, small, img\",Ut=\"ontouchstart\"in window||navigator.maxTouchPoints>0||window.matchMedia&&window.matchMedia(\"(pointer: coarse)\").matches,sn=(()=>{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}})(),Xr=(()=>{try{const t=document.createElement(\"div\");return t.setAttribute(\"contenteditable\",\"plaintext-only\"),t.contentEditable===\"plaintext-only\"}catch{return!1}})(),Zr=Ut||navigator.hardwareConcurrency!=null&&navigator.hardwareConcurrency<=4||typeof navigator.deviceMemory==\"number\"&&(navigator.deviceMemory??8)<=4,Qr=!0;let z=[];window.addEventListener(\"message\",t=>{if(!Qe(t)||t.data&&typeof t.data==\"object\"&&t.data.__fivoraBridgeRelay===!0)return;if(t.data?.type===x||t.data?.type===v){t.stopImmediatePropagation(),cr(t.data);return}if((t.data?.type===D||t.data?.type===L)&&t.data.siteData){const s=t.data.full!==!1;if(t.data.contentOnly===!0){Ft(t.data.siteData,{contentOnly:!0});return}Ft(t.data.siteData,{fanOut:!1,colorReplacements:!1}),Ze({full:s});return}if(t.data?.type===mt||t.data?.type===_r){const s=t.data.patches;Array.isArray(s)&&Ke(s);return}if(t.data?.type===kr||t.data?.type===\"DENEB_PREVIEW_STYLE_PATCH\"){const s=t.data,u=typeof s.fieldPath==\"string\"?s.fieldPath:typeof s.targetPath==\"string\"?s.targetPath:\"\",p=s.styles??s.properties;u&&p&&Je(u,p);return}if(t.data?.type===Wr||t.data?.type===jr){z=Array.isArray(t.data.fields)?t.data.fields:[],dr(),t.data.editMode?(vr(),window.setTimeout(()=>ve(),50)):Tr();return}(t.data?.type===Ur||t.data?.type===zr)&&(ft(!0),Y({type:Kr,requestId:t.data.requestId}),Y({type:Yr,requestId:t.data.requestId}))},!0);try{const t=JSON.parse(window.sessionStorage.getItem(Z)??\"null\");if(t?.awaitingNavigation){const e=Gt(t.pageKey,t.pageLabel),r=be(e,t.pageRoute),o=window.location.pathname.replace(/\\/+$/,\"\")||\"/\";ht(),o===r&&window.setTimeout(()=>ut(t),220)}else t&&ht()}catch{ht()}try{const t=JSON.parse(window.sessionStorage.getItem(g)??window.sessionStorage.getItem(l)??\"null\");if(t){k=t;try{window[f]=t,window[h]=t}catch{}Zr||(ue(t),xt(t,{colorReplacements:!1}))}}catch{}let J=!1,rt=null,ot=null,zt=null,tt=null,Pt=[],it=null;function Ce(){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 [${M}=\"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[${M}=\"true\"],\n a[${M}=\"true\"],\n strong[${M}=\"true\"],\n em[${M}=\"true\"],\n small[${M}=\"true\"],\n label[${M}=\"true\"] {\n display: inline-block !important;\n }\n [${M}=\"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 [${M}=\"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(Ce,\"ensureEmptyEditableStyles\");function ur(t){if(t.id)return\"#\"+CSS.escape(t.id);const e=[];let r=t;for(;r&&r!==document.body;){const o=r.tagName.toLowerCase(),i=r.parentElement?Array.from(r.parentElement.children).filter(s=>s.tagName===r?.tagName):[],n=i.indexOf(r)+1;e.unshift(i.length>1?`${o}:nth-of-type(${n})`:o),r=r.parentElement}return e.length>0?`body > ${e.join(\" > \")}`:\"\"}__name(ur,\"buildStructuralSelector\");function Kt(){try{const t=JSON.parse(window.sessionStorage.getItem(Q)??\"{}\");return t&&typeof t==\"object\"?t:{}}catch{return{}}}__name(Kt,\"readResolvedTargetSelectors\");function fr(t,e){const r=ur(t);if(!r)return;const o=Kt();o[`${window.location.pathname}|${e}`]=r;try{window.sessionStorage.setItem(Q,JSON.stringify(o))}catch{}}__name(fr,\"rememberResolvedTarget\");function tn(){const t=Kt(),e=`${window.location.pathname}|`;let r=!1;for(const o of Object.keys(t))o.startsWith(e)&&(delete t[o],r=!0);if(r)try{window.sessionStorage.setItem(Q,JSON.stringify(t))}catch{}}__name(tn,\"forgetResolvedTargetsForCurrentPage\");function xe(){document.querySelectorAll(`[${_}]`).forEach(t=>{tt?.target!==t&&(t.removeAttribute(_),t.removeAttribute(M),t.removeAttribute(V))})}__name(xe,\"clearResolvedEditableTargets\");function bt(t,e,r=!0){const o=t.getAttribute(_),i=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(U)??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\");if(o&&o!==e.path&&i!==e.path)return!1;t.setAttribute(_,e.path),Fe.register(t,e.path);const n=String(e.value??\"\").trim().length===0&&$(t.textContent).length===0;J&&n&&t.tagName!==\"IMG\"?t.setAttribute(M,\"true\"):t.removeAttribute(M);const s=e.kind===\"collection\"||e.type===\"list\",u=e.collection?.length;return J&&s&&(u===0||t.childElementCount===0)?(t.setAttribute(V,\"true\"),t.removeAttribute(M)):t.removeAttribute(V),r&&!s&&fr(t,e.path),!0}__name(bt,\"annotateEditableTarget\");function nt(t){const e=[t.value,...t.matchValues??[]].filter(r=>typeof r==\"number\"||typeof r==\"string\"&&r.trim().length>0);return Array.from(new Set(e.map(r=>String(r))))}__name(nt,\"editableFieldMatchValues\");function pr(t){for(const e of dt(t)){const r=CSS.escape(e),o=document.querySelector(`[data-preview-field-path=\"${r}\"], [${U}=\"${r}\"], [data-content-path=\"${r}\"], [data-field-path=\"${r}\"], [${_}=\"${r}\"]`);if(o)return o}return null}__name(pr,\"findExplicitEditableTarget\");function gr(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const r=Kt()[`${window.location.pathname}|${t.path}`];if(!r)return null;try{const o=document.querySelector(r);if(!o)return null;const i=nt(t).map($),n=$(o.textContent);return i.length>0&&n&&!i.includes(n)?null:(bt(o,t,!1),o)}catch{return null}}__name(gr,\"restoreRememberedTarget\");function mr(t){if(t.kind===\"collection\"||t.type===\"list\")return null;const r=(t.context?ye({collectionPath:t.context.collectionPath,itemIndex:t.context.itemIndex,fieldKey:t.context.fieldKey,itemValues:t.context.itemValues}):null)??document;for(const o of nt(t)){const i=qt(r,o,t.context?.fieldKey),n=[...Ht(r,o),...i?[i]:[],...Vt(r,o,t.context?.fieldKey)];for(const s of n){if(s.closest(`[${K}]`))continue;const u=s.getAttribute(_);if(!u||u===t.path)return s}}return null}__name(mr,\"inferEditableTarget\");function hr(t){if(J){Ce(),Se();for(const e of z){const r=pr(e.path)??gr(e)??(t?.explicitOnly?null:mr(e));r&&bt(r,e)}}}__name(hr,\"indexEditableTargets\");let Yt=!1;function ve(){for(const e of Pt)window.clearTimeout(e);if(Pt=[],it!==null){const e=window.cancelIdleCallback;typeof e==\"function\"?e(it):window.clearTimeout(it),it=null}if(Yt)return;Yt=!0;const t=__name((e,r)=>{r&&(Yt=!1),e&&xe(),hr({explicitOnly:e})},\"runPass\");Pt=[window.setTimeout(()=>{t(!0,!0)},0)]}__name(ve,\"scheduleEditableTargetIndex\");function yr(){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(yr,\"createHoverBadge\");function br(t){if(!rt)return;const e=t.getBoundingClientRect();rt.style.top=`${Math.max(4,e.top-4)}px`,rt.style.left=`${Math.min(window.innerWidth-36,e.right-32)}px`,rt.style.opacity=\"1\"}__name(br,\"positionBadge\");function It(){zt&&(zt(),zt=null),rt&&(rt.style.opacity=\"0\"),ot=null}__name(It,\"clearHoverOverlay\");function wr(t){if(t===ot)return;It(),ot=t;const e=t,r=e.style?.outline??\"\",o=e.style?.outlineOffset??\"\",i=e.style?.cursor??\"\";e.style&&(e.style.outline=\"2px dashed rgba(37, 99, 235, 0.6)\",e.style.outlineOffset=\"2px\",e.style.cursor=\"pointer\"),zt=__name(()=>{e.style&&(e.style.outline=r,e.style.outlineOffset=o,e.style.cursor=i)},\"hoverOutlineCleanup\"),br(t)}__name(wr,\"applyHoverOverlay\");function Te(t){let e=t instanceof Element?t:null;for(;e&&e!==document.body;){if(e.hasAttribute(K)){e=e.parentElement;continue}if(e.hasAttribute(\"data-preview-field-path\")||e.hasAttribute(U)||e.hasAttribute(X)||e.hasAttribute(\"data-content-path\")||e.hasAttribute(\"data-field-path\")||e.hasAttribute(_)||!!Fe.getPath(e)||e instanceof HTMLElement&&e.matches(Jr)){const o=Jt(e);if(o)return{element:e,field:o}}e=e.parentElement}return null}__name(Te,\"findEditableTarget\");function Jt(t){if(t.closest(`[${K}]`))return null;const e=t.getAttribute(\"data-preview-field-path\")??t.getAttribute(\"data-content-path\")??t.getAttribute(\"data-field-path\")??t.getAttribute(_);if(e)return z.find(m=>dt(m.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 r=t.getAttribute(X);if(r){const b=r.match(/^(.+)\\[(\\d+)\\]$/);if(b){const m=b[1],S=Number(b[2]),A=z.find(w=>(w.kind===\"collection\"||w.type===\"list\")&&dt(w.path).includes(m));if(A)return{...A,collection:{listPath:m,itemIndex:S,length:A.collection?.length??0,minItems:A.collection?.minItems,maxItems:A.collection?.maxItems,itemLabel:A.collection?.itemLabel}}}}const o=t.getAttribute(U);if(o)return z.find(m=>(m.kind===\"collection\"||m.type===\"list\")&&dt(m.path).includes(o))??{kind:\"collection\",path:o,label:o.split(\".\").pop()??\"Collection\",type:\"list\",value:0,collection:{listPath:o,length:t.children.length}};const i=t.tagName===\"IMG\"?t:t.querySelector(\"img\");if(i){const b=z.find(A=>A.type===\"image\"&&nt(A).some(w=>fe(i,w)));if(b)return b;const m=Pe(i);if(m.collectionPath&&typeof m.itemIndex==\"number\"){const A=z.find(w=>w.type===\"image\"&&w.context?.collectionPath===m.collectionPath&&w.context?.itemIndex===m.itemIndex);if(A)return A}const S=i.closest('section, article, [data-preview-page-key], main, header, footer, .card, [class*=\"section\"]');if(S){const A=S.getAttribute(\"data-preview-field-path\")||S.getAttribute(\"data-content-path\")||S.getAttribute(\"data-field-path\")||S.getAttribute(_);if(A){const w=A.split(\".\")[0],F=z.find(B=>B.type===\"image\"&&(B.path.startsWith(`${w}.`)||B.path.startsWith(`${A}.`)));if(F)return F}}if(t.tagName===\"IMG\"){const A=z.filter(F=>F.type===\"image\");if(A.length===1)return A[0];const w=i.getAttribute(\"src\")||i.src||\"\";return{path:e||\"image\",label:(e||\"\").split(\".\").pop()||\"Image\",type:\"image\",value:w}}}const n=z.filter(b=>nt(b).some(m=>Bt(t,m)));if(n.length===1)return n[0];const s=$(t.textContent);if(!s)return null;const u=z.filter(b=>typeof b.value!=\"boolean\"&&nt(b).some(m=>$(m)===s));if(u.length===1)return u[0];const p=z.filter(b=>typeof b.value==\"boolean\"?!1:nt(b).some(m=>{const S=$(m);return S.length>=3&&s.includes(S)})).sort((b,m)=>Math.max(...nt(m).map(S=>$(S).length),0)-Math.max(...nt(b).map(S=>$(S).length),0));return p.length===1?p[0]:null}__name(Jt,\"resolveEditableField\");function Ar(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(Ar,\"canEditInline\");function Sr(t){let e=t;for(;e&&e!==document.body;){const r=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(U)??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(_);if(r)return r;e=e.parentElement}return null}__name(Sr,\"extractFieldPath\");function Pe(t){let e=t;for(;e&&e!==document.body;){const r=e.getAttribute(X);if(r){const n=r.match(/^(.+)\\[(\\d+)\\]$/);if(n)return{collectionPath:n[1],itemIndex:Number(n[2])}}const o=e.getAttribute(\"data-preview-field-path\")??e.getAttribute(\"data-content-path\")??e.getAttribute(\"data-field-path\")??e.getAttribute(_);if(o){const n=o.match(/^(.+)\\[(\\d+)\\]/);if(n)return{collectionPath:n[1],itemIndex:Number(n[2])}}const i=e.getAttribute(U);if(i)return{collectionPath:i,itemIndex:null};e=e.parentElement}return{collectionPath:null,itemIndex:null}}__name(Pe,\"extractCollectionContext\");function Ie(t,e){const r=[],o=new Set(e?.path?[e.path]:[]);let i=t,n=0;for(;i&&i!==document.body&&n<3&&!(i.hasAttribute(K)||n>0&&(i.hasAttribute(X)||i.hasAttribute(U)||i.tagName===\"SECTION\"));){if(i.hasAttribute(\"data-preview-field-path\")||i.hasAttribute(\"data-content-path\")||i.hasAttribute(\"data-field-path\")||i.hasAttribute(_)){const s=Jt(i);s?.path&&s.kind!==\"collection\"&&s.type!==\"list\"&&!o.has(s.path)&&(o.add(s.path),r.push({path:s.path,label:s.label??s.path.split(\".\").pop()??\"Content\",type:s.type??\"text\"}))}i=i.parentElement,n+=1}return r}__name(Ie,\"findRelatedAncestorFields\");function Er(t,e,r=Ie(t,e)){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),n=t.tagName===\"IMG\",s=t.tagName===\"INPUT\"||t.tagName===\"TEXTAREA\",u=e?.path??Sr(t),p=n?t.src:s?t.placeholder||t.value||\"\":t.textContent?.trim()??\"\",b=Pe(t);let m=e?.collection?.listPath??e?.collection?.path??e?.context?.collectionPath??b.collectionPath,S=e?.collection?.itemIndex??e?.context?.itemIndex??b.itemIndex;m&&u&&e?.kind!==\"collection\"&&!u.startsWith(`${m}[`)&&!u.startsWith(`${m}.`)&&u!==m&&(m=null,S=null);const A=e?.context?.itemPath??(m&&typeof S==\"number\"?`${m}[${S}]`:null),w=__name(_t=>String(_t??\"\").trim().replace(/[^a-zA-Z0-9_.-]+/g,\"-\").replace(/^-+|-+$/g,\"\").slice(0,64),\"safeScopePart\"),F=[],B=__name((_t,Xt,Zt)=>{!Xt||F.some(Qt=>Qt.key===Xt)||F.push({kind:_t,key:Xt,label:Zt})},\"pushStyleScope\");B(\"element\",u,\"This element\");const At=t.closest(`[${X}]`);B(\"card\",At?.getAttribute(X)??A,\"This card\");const St=t.closest(`[${U}]`);B(\"grid\",St?.getAttribute(U)??m,\"Entire grid\");const $r=t.closest(\"[data-preview-page-key]\"),Rt=w($r?.getAttribute(\"data-preview-page-key\")),pt=t.closest(\"section,[data-design-section],[data-section-id]\");if(pt){const _t=w(pt.getAttribute(\"data-design-section\")??pt.getAttribute(\"data-section-id\")??pt.id),Zt=(pt.parentElement?Array.from(pt.parentElement.children).filter(nn=>nn.tagName===\"SECTION\"):[]).indexOf(pt)+1,Qt=_t||(Zt>0?`nth-${Zt}`:\"\");B(\"section\",Qt?`section:${Rt||\"all\"}:${Qt}`:null,\"This section\")}B(\"page\",Rt?`page:${Rt}`:null,\"Current page\"),B(\"site\",\"site:all\",\"Whole website\");const Rr={type:Hr,fieldPath:u,descriptorKind:e?.kind??\"field\",fieldValue:p,elementTag:t.tagName.toLowerCase(),isImage:n,boundingRect:{top:o.top,left:o.left,width:o.width,height:o.height},computedStyle:{fontFamily:i.fontFamily,fontSize:i.fontSize,lineHeight:i.lineHeight,fontWeight:i.fontWeight,letterSpacing:i.letterSpacing,color:i.color,backgroundColor:i.backgroundColor,textAlign:i.textAlign,width:i.width,height:i.height,minWidth:i.minWidth,minHeight:i.minHeight,maxWidth:i.maxWidth,maxHeight:i.maxHeight,marginTop:i.marginTop,marginRight:i.marginRight,marginBottom:i.marginBottom,marginLeft:i.marginLeft,paddingTop:i.paddingTop,paddingRight:i.paddingRight,paddingBottom:i.paddingBottom,paddingLeft:i.paddingLeft,borderRadius:i.borderRadius},listPath:m,itemPath:A,collectionPath:m,itemIndex:S,relatedFields:r,styleScopes:F};Y(Rr),Y({...Rr,type:Vr})}__name(Er,\"emitClickEvent\");function Cr(t,e){Y({type:qr,fieldPath:t,value:e}),Y({type:Gr,fieldPath:t,value:e})}__name(Cr,\"emitFieldChange\");function ft(t){const e=tt;if(!e)return;tt=null,e.target.removeEventListener(\"keydown\",e.keydown),e.target.removeEventListener(\"blur\",e.blur);const r=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&&(r!==e.originalText.trim()?(e.field.value=r,bt(e.target,e.field),Cr(e.field.path,r)):r||bt(e.target,e.field))}__name(ft,\"finishInlineEdit\");function xr(t,e,r){if(tt?.target===t)return;ft(!0),It(),bt(t,e),t.removeAttribute(M);const o=typeof e.value==\"string\"||typeof e.value==\"number\"?String(e.value):t.textContent??\"\",i=t.innerHTML,n=__name(u=>{if(u.key===\"Escape\"){u.preventDefault(),ft(!1);return}u.key===\"Enter\"&&e.type!==\"textarea\"&&!u.shiftKey&&(u.preventDefault(),ft(!0))},\"keydown\"),s=__name(()=>ft(!0),\"blur\");if(tt={target:t,field:e,originalText:o,originalHtml:i,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:n,blur:s},t.setAttribute(\"contenteditable\",Xr?\"plaintext-only\":\"true\"),t.setAttribute(\"spellcheck\",\"true\"),t.textContent=o,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\",n),t.addEventListener(\"blur\",s),t.focus(),r){const u=document,p=u.caretPositionFromPoint?.(r.x,r.y),b=p?(()=>{const m=document.createRange();return m.setStart(p.offsetNode,p.offset),m.collapse(!0),m})():u.caretRangeFromPoint?.(r.x,r.y);if(b){const m=window.getSelection();m?.removeAllRanges(),m?.addRange(b)}}else{const u=document.createRange();u.selectNodeContents(t);const p=window.getSelection();p?.removeAllRanges(),p?.addRange(u)}}__name(xr,\"beginInlineEdit\");let wt=null;function $e(t){if(!J||tt||Ut||wt!==null)return;const e=t.target;wt=requestAnimationFrame(()=>{if(wt=null,!J||tt)return;const r=Te(e);r&&!r.element.hasAttribute(\"data-fivora-edit-badge\")&&wr(r.element)})}__name($e,\"onEditMouseOver\");function Re(t){if(!J)return;const e=t.relatedTarget instanceof HTMLElement?t.relatedTarget:null;e&&(e===rt||e===ot||ot?.contains(e))||It()}__name(Re,\"onEditMouseOut\");function _e(t){if(!J||tt&&t.target instanceof Node&&tt.target.contains(t.target))return;const e=t.target instanceof HTMLElement&&t.target.hasAttribute(\"data-fivora-edit-badge\")?t.target:null,r=e?ot?{element:ot,field:Jt(ot)}:null:Te(t.target),o=r?.element,i=r?.field;if(!o||!i)return;t.preventDefault(),t.stopPropagation();const n=Ie(o,i);!Qr&&Ar(o,i)&&n.length===0?xr(o,i,e?void 0:{x:t.clientX,y:t.clientY}):Er(o,i,n)}__name(_e,\"onEditClick\");function vr(){J||(J=!0,we(),Ce(),!Ut&&!rt&&(rt=yr()),Ut||(document.addEventListener(\"mouseover\",$e,!0),document.addEventListener(\"mouseout\",Re,!0)),document.addEventListener(\"click\",_e,!0),document.addEventListener(\"submit\",ke,!0),ve())}__name(vr,\"enterEditMode\");function ke(t){J&&(t.preventDefault(),t.stopPropagation())}__name(ke,\"preventEditModeSubmit\");function Tr(){if(J){J=!1,Yt=!1,ft(!0),It(),wt!==null&&(cancelAnimationFrame(wt),wt=null);for(const t of Pt)window.clearTimeout(t);if(Pt=[],it!==null){const t=window.cancelIdleCallback;typeof t==\"function\"?t(it):window.clearTimeout(it),it=null}xe(),document.querySelectorAll(`[${M}], [${V}]`).forEach(t=>{t.removeAttribute(M),t.removeAttribute(V)}),document.removeEventListener(\"mouseover\",$e,!0),document.removeEventListener(\"mouseout\",Re,!0),document.removeEventListener(\"click\",_e,!0),document.removeEventListener(\"submit\",ke,!0)}}__name(Tr,\"exitEditMode\");function Oe(t){if(t==null)return t;try{const e=new URL(String(t),window.location.href);if(e.origin!==window.location.origin)return t;const r=a(e.pathname);return r===e.pathname?t:`${r}${e.search}${e.hash}`}catch{return t}}__name(Oe,\"normalizePreviewHistoryUrl\");const en=window.history.pushState.bind(window.history),rn=window.history.replaceState.bind(window.history);window.history.pushState=(t,e,r)=>{en(t,e,Oe(r)),window.setTimeout(Ct,0)},window.history.replaceState=(t,e,r)=>{rn(t,e,Oe(r)),window.setTimeout(Ct,0)},window.addEventListener(\"popstate\",Ct);const $t=window.fetch.bind(window);window.fetch=(t,e)=>{const r=typeof t==\"string\"?t:t instanceof URL?t.href:null;if(!r)return $t(t,e);try{const o=new URL(r,window.location.href);if(o.origin!==window.location.origin)return $t(t,e);const i=a(o.pathname);return i===o.pathname?$t(t,e):(o.pathname=i,$t(o.href,e))}catch{return $t(t,e)}},/^\\/uploads\\/generated-sites\\/(?:template-preview|preview)\\//.test(window.location.pathname)&&window.addEventListener(\"submit\",t=>{t.preventDefault(),t.stopImmediatePropagation();const e=t.target;if(!(e instanceof HTMLFormElement))return;let r=e.parentElement?.querySelector(\"[data-fivora-preview-action-status]\");r||(r=document.createElement(\"p\"),r.setAttribute(\"data-fivora-preview-action-status\",\"true\"),r.setAttribute(\"role\",\"status\"),r.style.marginTop=\"0.75rem\",e.insertAdjacentElement(\"afterend\",r)),r.textContent=\"Preview only \\u2014 this form was not submitted. It becomes active on the published website.\"},!0),d();function Pr(){return window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|[^/]+)\\/[^/]+)/)?.[1]??\"\"}__name(Pr,\"resolvePreviewRootPrefix\");function Ir(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;const r=Pr(),o=e.startsWith(\"uploads/generated-sites/\")?`/${e}`:r&&e.startsWith(r.slice(1))?`/${e}`:e;let i;try{i=new URL(o,window.location.href)}catch{return!1}if(i.origin!==window.location.origin||r&&!i.pathname.startsWith(r))return!1;const n=window.location.pathname.replace(/\\/+$/,\"\")||\"/\",s=i.pathname.replace(/\\/+$/,\"\")||\"/\";return n!==s||i.search!==window.location.search?i:!1}__name(Ir,\"resolveInternalPreviewNavigation\"),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]\");if(!e)return;const r=Ir(e);r&&(t.preventDefault(),t.stopPropagation(),window.location.assign(r.href))},!0),Ct()})(function(C){const T=__name((c,y)=>{if(!c||c.trim()===\"null\")return null;try{const E=new URL(c,y??void 0).origin;return E===\"null\"?null:E}catch{return null}},\"normalizeOrigin\"),I=T(C.currentOrigin),P=T(C.ancestorOrigin,I),q=T(C.accessibleParentOrigin,I),a=T(C.referrer,I),d=T(C.rememberedOrigin);return P??q??(a&&a!==I?a:null)??d??a},function(C){const T=__name(l=>!!l&&typeof l==\"object\"&&!Array.isArray(l),\"isRecord\"),I=T(C)&&(C.designCustomizationVersion===1||!!C.elementStyles||!!C.sections);if(!T(C)||!I)return\"\";const P=C,q=__name(l=>{if(typeof l==\"number\")return`${l}px`;if(typeof l!=\"string\")return\"\";const f=l.trim();return!f||f.length>160||/[;{}<>\\r\\n]/.test(f)||/(?:url\\s*\\(|expression\\s*\\(|@import|javascript:)/i.test(f)?\"\":f},\"safeValue\"),a=__name(l=>q(P[l]),\"read\"),d=__name((l,f)=>f?`${l}:${f} !important;`:\"\",\"declaration\"),c=__name((l,f)=>{const h=f.filter(Boolean).join(\"\");return h?`${l}{${h}}`:\"\"},\"rule\"),y=__name(l=>l?[d(\"background\",l),d(\"background-color\",l),\"background-image:none !important;\"]:[],\"backgroundDeclarations\"),E=__name(l=>l===\"start\"?\"flex-start\":l===\"end\"?\"flex-end\":l===\"center\"||l===\"stretch\"?l:\"\",\"alignItems\"),x=__name(l=>{const f=Number(l);return Number.isInteger(f)&&f>=1&&f<=6?`repeat(${f},minmax(0,1fr))`:\"\"},\"gridColumns\"),v=(()=>{const l=Number(a(\"headingScale\"));return Number.isFinite(l)&&l>=.75&&l<=2?String(l):\"\"})(),N=__name(l=>({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)\"})[l]??\"\",\"shadow\"),G=__name(l=>{if(!l)return!1;const f=l.trim().toLowerCase();if(!/^#[0-9a-f]{3,6}$/.test(f))return!1;const h=f.length===4?`#${f[1]}${f[1]}${f[2]}${f[2]}${f[3]}${f[3]}`:f,D=Number.parseInt(h.slice(1,3),16),L=Number.parseInt(h.slice(3,5),16),H=Number.parseInt(h.slice(5,7),16);return(D*299+L*587+H*114)/1e3<130},\"isDarkColor\"),R=G(a(\"backgroundColor\")),et=a(\"headingColor\")||a(\"textColor\"),O=a(\"textColor\"),_=a(\"mutedTextColor\")||(O?`color-mix(in srgb, ${O} 72%, transparent)`:\"\"),M=[[\"--brand-color\",a(\"primaryColor\")],[\"--brand-primary\",a(\"primaryColor\")],[\"--primary-color\",a(\"primaryColor\")],[\"--color-primary\",a(\"primaryColor\")],[\"--brand-secondary\",a(\"secondaryColor\")],[\"--secondary-color\",a(\"secondaryColor\")],[\"--brand-accent\",a(\"accentColor\")],[\"--accent-color\",a(\"accentColor\")],[\"--page-background\",a(\"backgroundColor\")],[\"--page-bg\",a(\"backgroundColor\")||a(\"canvasColor\")],[\"--page-text\",a(\"textColor\")],[\"--heading-color\",et],[\"--color-heading\",et],[\"--text-color\",a(\"textColor\")],[\"--text\",a(\"textColor\")],[\"--foreground\",a(\"textColor\")],[\"--color-foreground\",a(\"textColor\")],[\"--bg-primary\",a(\"backgroundColor\")||a(\"canvasColor\")],[\"--bg-secondary\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--surface\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--surface-color\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--card-bg\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--card-background\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")],[\"--background\",a(\"backgroundColor\")||a(\"canvasColor\")],[\"--brand-primary\",a(\"primaryColor\")||a(\"brandPrimary\")],[\"--brand-secondary\",a(\"secondaryColor\")||a(\"brandSecondary\")],[\"--brand-accent\",a(\"accentColor\")||a(\"brandAccent\")],[\"--primary\",a(\"primaryColor\")||a(\"brandPrimary\")],[\"--secondary\",a(\"secondaryColor\")||a(\"brandSecondary\")],[\"--accent\",a(\"accentColor\")||a(\"brandAccent\")],[\"--text-primary\",a(\"textColor\")||a(\"textPrimary\")],[\"--text-secondary\",a(\"mutedTextColor\")||a(\"textSecondary\")||a(\"textColor\")],[\"--text-muted\",_],[\"--muted\",_],[\"--muted-color\",_],[\"--muted-text\",_],[\"--border-primary\",a(\"borderColor\")],[\"--border-secondary\",a(\"borderColor\")],[\"--border\",a(\"borderColor\")],[\"--color-border\",R?\"rgba(255, 255, 255, 0.1)\":a(\"borderColor\")||\"#e2e8f0\"],[\"--card-border\",R?\"rgba(255, 255, 255, 0.09)\":a(\"borderColor\")||\"#e2e8f0\"],[\"--color-text\",O],[\"--color-text-muted\",_],[\"--header-bg\",a(\"headerBackgroundColor\")||(R?`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 85%, transparent)`:\"rgba(255, 255, 255, 0.85)\")],[\"--input-bg\",R?`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 60%, ${a(\"cardBackgroundColor\")||\"#131b2e\"})`:\"#ffffff\"],[\"--input-color\",O],[\"--input-border\",R?\"rgba(255, 255, 255, 0.15)\":\"#cbd5e1\"],[\"--button-bg\",a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\"],[\"--button-text\",a(\"buttonTextColor\")||(G(a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\")?\"#ffffff\":\"#0f172a\")],[\"--button-primary-bg\",a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\"],[\"--button-primary-text\",a(\"buttonTextColor\")||(G(a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\")?\"#ffffff\":\"#0f172a\")],[\"--button-secondary-bg\",R?\"rgba(255, 255, 255, 0.08)\":a(\"secondaryColor\")&&!G(a(\"secondaryColor\"))?a(\"secondaryColor\"):\"#f1f5f9\"],[\"--button-secondary-text\",R?\"#f8fafc\":\"#0f172a\"],[\"--button-outline-border\",R?\"rgba(255, 255, 255, 0.22)\":\"currentColor\"],[\"--button-outline-text\",O||(R?\"#f8fafc\":\"#0f172a\")],[\"--button-ghost-text\",O||(R?\"#f8fafc\":\"#0f172a\")],[\"--product-card-bg\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||(R?\"#111a2e\":\"#ffffff\")],[\"--product-card-border\",R?\"rgba(255, 255, 255, 0.09)\":a(\"borderColor\")||\"#e2e8f0\"],[\"--tag-bg\",R?\"rgba(255, 255, 255, 0.08)\":\"rgba(241, 245, 249, 0.9)\"],[\"--tag-color\",_||(R?\"#94a3b8\":\"#64748b\")],[\"--card-shadow\",R?\"0 10px 25px -5px rgba(0, 0, 0, 0.4)\":\"0 10px 25px -5px rgba(0, 0, 0, 0.05)\"],[\"--card-radius\",a(\"cardRadius\")],[\"--button-radius\",a(\"buttonRadius\")],[\"--image-radius\",a(\"imageRadius\")]],V=new Set([\"sans-serif\",\"serif\",\"monospace\",\"inherit\",\"initial\",\"system-ui\",\"system sans\",\"editorial serif\"]),U=new Set,X=__name(l=>{if(typeof l==\"string\"&&l.trim()){const f=l.split(\",\")[0].replace(/['\"]/g,\"\").trim();f&&!V.has(f.toLowerCase())&&!f.toLowerCase().includes(\"system\")&&U.add(f)}},\"addFont\");X(P.headingFont),X(P.bodyFont);const K=T(P.elementStyles)?P.elementStyles:{};for(const l of Object.values(K))T(l)&&X(l.fontFamily);const Q=[...Array.from(U).map(l=>`@import url('https://fonts.googleapis.com/css2?family=${encodeURIComponent(l).replace(/%20/g,\"+\")}:wght@300;400;500;600;700;800&display=swap');`),c(\":root,html,body\",[d(\"color-scheme\",R?\"dark\":\"light\"),...M.map(([l,f])=>d(l,f))]),c(\"html\",[d(\"font-size\",a(\"baseSize\"))]),c(\"body\",[d(\"font-family\",a(\"bodyFont\")?`${a(\"bodyFont\")},sans-serif`:\"\"),d(\"font-weight\",a(\"bodyWeight\")),d(\"line-height\",a(\"bodyLineHeight\")),d(\"letter-spacing\",a(\"letterSpacing\")),...y(a(\"backgroundColor\")),d(\"color\",O)]),c('body :where(h1,h2,h3,h4,h5,h6),[data-preview-field-path*=\"title\"],[data-preview-field-path*=\"heading\"],[data-field-path*=\"title\"],[data-field-path*=\"heading\"]',[d(\"font-family\",a(\"headingFont\")?`${a(\"headingFont\")},sans-serif`:\"\"),d(\"font-weight\",a(\"headingWeight\")),d(\"line-height\",a(\"headingLineHeight\")),d(\"color\",et)]),c('body :where(p,li,label,address,[data-preview-field-path*=\"description\"],[data-preview-field-path*=\"subtitle\"])',[d(\"color\",O)]),c('body :where(small,.muted,[class*=\"muted\"])',[d(\"color\",_)]),v?`body h1{font-size:calc(2.5rem * ${v}) !important}body h2{font-size:calc(2rem * ${v}) !important}body h3{font-size:calc(1.5rem * ${v}) !important}body h4{font-size:calc(1.25rem * ${v}) !important}`:\"\",c(\"body header\",[...y(a(\"headerBackgroundColor\")),d(\"min-height\",a(\"headerHeight\"))]),c(\"body footer\",[...y(a(\"footerBackgroundColor\"))]),c(\"body main,body [data-preview-page-key]\",[...y(a(\"backgroundColor\")),d(\"color\",O),d(\"display\",\"flex\"),d(\"flex-direction\",\"column\")]),c(\"body main > section,body main [data-preview-page-key] > section\",[d(\"padding-block\",a(\"sectionPadding\")),d(\"text-align\",a(\"textAlign\"))]),c(\"body main :where(section,[data-design-section]) :where(h1,h2,h3,h4,h5,h6,p,[data-design-text])\",[d(\"text-align\",a(\"textAlign\"))]),c(\"body main > section + section,body main [data-preview-page-key] > section + section\",[d(\"margin-top\",a(\"sectionGap\"))]),c('body main :where([class*=\"flex\"],[class*=\"grid\"],[data-design-stack])',[d(\"gap\",a(\"elementGap\"))]),c(\"body main > section:first-of-type,body main [data-preview-page-key] > section:first-of-type\",[d(\"min-height\",a(\"heroMinHeight\")),d(\"text-align\",a(\"heroTextAlign\"))]),c('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])',[d(\"text-align\",a(\"heroTextAlign\"))]),c('body main :where([class*=\"container\"],[class~=\"container\"],[data-design-container])',[d(\"max-width\",a(\"contentMaxWidth\")),d(\"padding-inline\",a(\"containerPadding\")),a(\"contentMaxWidth\")?\"margin-inline:auto !important;\":\"\"]),c('body main :where(section,[data-design-section]) > :where([class*=\"flex\"],[data-design-content])',[d(\"align-items\",E(a(\"contentAlign\"))),d(\"justify-items\",a(\"contentAlign\"))]),c(\"body main :where([data-preview-list-path],[data-design-grid])\",[x(a(\"gridColumns\"))?\"display:grid !important;\":\"\",d(\"grid-template-columns\",x(a(\"gridColumns\"))),d(\"gap\",a(\"gridGap\"))]),c('body main :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])',[d(\"width\",a(\"cardWidth\")),a(\"cardWidth\")?\"max-width:100% !important;\":\"\",d(\"min-height\",a(\"cardMinHeight\")),d(\"padding\",a(\"cardPadding\")),d(\"border-radius\",a(\"cardRadius\")),d(\"border-width\",a(\"cardBorderWidth\")),a(\"cardBorderWidth\")?\"border-style:solid !important;\":\"\",d(\"border-color\",a(\"borderColor\")),...y(a(\"cardBackgroundColor\")||a(\"surfaceColor\")),d(\"box-shadow\",N(a(\"cardShadow\"))),d(\"text-align\",a(\"cardTextAlign\"))]),c('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])',[d(\"text-align\",a(\"cardTextAlign\"))]),c('body main :where(button,a[class*=\"btn\"],a[class*=\"button\"],[data-design-button])',[d(\"padding\",a(\"buttonPadding\")),d(\"border-radius\",a(\"buttonRadius\")),...y(a(\"buttonBackgroundColor\")),d(\"color\",a(\"buttonTextColor\")),d(\"box-shadow\",N(a(\"buttonShadow\")))]),c(\"body main img\",[d(\"border-radius\",a(\"imageRadius\"))]),...R?[c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card,.editable-service-card)',[d(\"background\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||\"#111a2e\"),d(\"background-color\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||\"#111a2e\"),\"border:1px solid rgba(255, 255, 255, 0.09) !important;\",\"box-shadow:0 10px 30px -10px rgba(0,0,0,0.5), 0 1px 3px 0 rgba(255,255,255,0.02) !important;\",d(\"color\",O)]),c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card) :where(h1,h2,h3,h4,h5,h6,strong,b)',[d(\"color\",et)]),c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card) :where(p,li,span:not([class*=\"badge\"]):not([class*=\"tag\"]):not([class*=\"pill\"]))',[d(\"color\",_||`color-mix(in srgb, ${O} 75%, transparent)`)]),c('body header, body .deneb-navbar, body [class*=\"navbar\"]',[d(\"background-color\",a(\"headerBackgroundColor\")||`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 85%, transparent)`),\"backdrop-filter:blur(16px) !important;\",\"-webkit-backdrop-filter:blur(16px) !important;\",\"border-bottom:1px solid rgba(255, 255, 255, 0.08) !important;\"]),c(\"body .deneb-nav-item, body nav a, body nav button\",[`color:color-mix(in srgb, ${O} 75%, transparent) !important;`]),c(\"body .deneb-nav-item:hover, body nav a:hover, body nav button:hover\",[\"color:#ffffff !important;\",\"background-color:rgba(255, 255, 255, 0.08) !important;\"]),c(\"body .deneb-nav-item.active, body nav a.active\",[\"color:#ffffff !important;\",\"background-color:rgba(255, 255, 255, 0.12) !important;\"]),c('body input:not([type=\"button\"]):not([type=\"submit\"]):not([type=\"color\"]):not([type=\"checkbox\"]):not([type=\"radio\"]), body textarea, body select',[d(\"background-color\",`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 60%, ${a(\"cardBackgroundColor\")||\"#131b2e\"})`),\"border:1px solid rgba(255, 255, 255, 0.14) !important;\",d(\"color\",O)]),c(\"body footer, body .site-footer\",[d(\"background-color\",a(\"footerBackgroundColor\")||`color-mix(in srgb, ${a(\"backgroundColor\")||\"#090d16\"} 80%, #000000)`),\"border-top:1px solid rgba(255, 255, 255, 0.08) !important;\",d(\"color\",O)]),c('body .hero, body [class*=\"hero\"]:not(button):not(a):not(span)',[`background:radial-gradient(ellipse at 50% 0%, color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 14%, transparent), transparent 70%), ${a(\"backgroundColor\")||\"#090d16\"} !important;`]),c(\"body .deneb-mobile-drawer, body .deneb-dialog-content\",[d(\"background-color\",a(\"cardBackgroundColor\")||a(\"surfaceColor\")||\"#111a2e\"),\"border-color:rgba(255, 255, 255, 0.1) !important;\",d(\"color\",O)]),c('body :where(.eyebrow,[class*=\"badge\"],[class*=\"pill\"]:not(button))',[`background-color:color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 15%, transparent) !important;`,`color:${a(\"accentColor\")||a(\"primaryColor\")||\"#38bdf8\"} !important;`,`border-color:color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 28%, transparent) !important;`]),c('body :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"],.editable-product-card,.editable-pricing-card,.editable-testimonial-card):hover',[\"border-color:rgba(255, 255, 255, 0.18) !important;\",\"box-shadow:0 16px 40px -10px rgba(0,0,0,0.65), 0 1px 3px 0 rgba(255,255,255,0.04) !important;\"]),c('body :where(hr,[class*=\"divider\"],[class*=\"separator\"])',[\"border-color:rgba(255, 255, 255, 0.08) !important;\"]),c(\"body :where(.page-section.alt,section.alt)\",[`background:color-mix(in srgb, ${a(\"primaryColor\")||\"#38bdf8\"} 3%, ${a(\"backgroundColor\")||\"#090d16\"}) !important;`]),c('body :where(.btn-secondary,[class*=\"btn-secondary\"],[class*=\"button-secondary\"],[data-variant=\"secondary\"],.editable-btn-secondary)',[\"background-color:rgba(255, 255, 255, 0.08) !important;\",\"color:#f8fafc !important;\",\"border:1px solid rgba(255, 255, 255, 0.14) !important;\"]),c('body :where(.btn-outline,[class*=\"btn-outline\"],[class*=\"button-outline\"],[data-variant=\"outline\"])',[\"background-color:transparent !important;\",\"color:#f8fafc !important;\",\"border-color:rgba(255, 255, 255, 0.22) !important;\"]),c('body :where(.btn-ghost,[class*=\"btn-ghost\"],[class*=\"button-ghost\"],[data-variant=\"ghost\"])',[\"background-color:transparent !important;\",\"color:#f8fafc !important;\"]),c('body :where(.btn-primary,[class*=\"btn-primary\"],[class*=\"button-primary\"],[data-variant=\"primary\"],.editable-btn-primary)',[`background-color:${a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\"} !important;`,`color:${a(\"buttonTextColor\")||(G(a(\"buttonBackgroundColor\")||a(\"primaryColor\")||\"#2563eb\")?\"#ffffff\":\"#0f172a\")} !important;`])]:[]],gt=T(P.sections)?P.sections:{};for(const[l,f]of Object.entries(gt)){if(!/^[a-zA-Z0-9_-]{1,64}$/.test(l)||!T(f))continue;const h=__name(mt=>q(f[mt]),\"sectionRead\"),D=h(\"backgroundColor\"),L=['[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(\",\"),W={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-\"])'}[l]??`body :where([data-preview-page-key=\"${l}\"] > section,[data-design-section=\"${l}\"],[data-section-id=\"${l}\"],section#${l},section.${l})`;Q.push(c(W,[f.visible===!1?\"display:none !important;\":\"\",...y(D),d(\"color\",h(\"textColor\")),d(\"min-height\",h(\"minHeight\")),d(\"padding-block\",h(\"padding\")),d(\"max-width\",h(\"contentMaxWidth\")),d(\"gap\",h(\"gap\")),d(\"text-align\",h(\"textAlign\")),d(\"align-items\",E(h(\"contentAlign\")))]),c(`${W} :where(h1,h2,h3,h4,h5,h6)`,[d(\"color\",h(\"headingColor\")),d(\"text-align\",h(\"textAlign\"))]),c(`${W} :where(p,span,[data-design-text])`,[d(\"text-align\",h(\"textAlign\"))]),c(`${W} :where([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`,[...y(h(\"cardBackgroundColor\")),d(\"width\",h(\"cardWidth\")),h(\"cardWidth\")?\"max-width:100% !important;\":\"\",d(\"min-height\",h(\"cardMinHeight\")),d(\"border-radius\",h(\"cardRadius\"))]),c(`${W} :where([data-preview-list-path],[data-design-grid])`,[x(h(\"gridColumns\"))?\"display:grid !important;\":\"\",d(\"grid-template-columns\",x(h(\"gridColumns\")))]),c(`${W}::before,${W}::after`,D?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),c(`${W} > :where(${L})`,D?[\"background:none !important;\",\"background-image:none !important;\",\"box-shadow:none !important;\",\"mask-image:none !important;\",\"-webkit-mask-image:none !important;\"]:[]),c(`${W} > :where(${L})::before,${W} > :where(${L})::after`,D?[\"background:none !important;\",\"background-image:none !important;\",\"opacity:0 !important;\"]:[]),c(`${W} > :where(${L}) :where(img,video,canvas,picture)`,D?[\"opacity:0.2 !important;\"]:[]))}const Et=T(P.elementStyles)?P.elementStyles:{},g=[[\"display\",\"display\"],[\"order\",\"order\"],[\"fontFamily\",\"font-family\"],[\"fontSize\",\"font-size\"],[\"lineHeight\",\"line-height\"],[\"fontWeight\",\"font-weight\"],[\"letterSpacing\",\"letter-spacing\"],[\"color\",\"color\"],[\"backgroundColor\",\"background-color\"],[\"textAlign\",\"text-align\"],[\"justifyContent\",\"justify-content\"],[\"alignItems\",\"align-items\"],[\"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[l,f]of Object.entries(Et).slice(0,256)){if(!/^[a-zA-Z0-9_.:\\[\\]-]{1,180}$/.test(l)||!T(f))continue;const h=l.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"'),D=(()=>{if(l===\"site:all\")return\"body\";if(l.startsWith(\"page:\"))return`body :where([data-preview-page-key=\"${h.slice(5)}\"])`;if(l.startsWith(\"section:\")){const[,L=\"all\",H=\"\"]=h.split(\":\"),W=L===\"all\"?\"body\":`body :where([data-preview-page-key=\"${L}\"])`,mt=H.match(/^nth-(\\d+)$/)?.[1];return mt?`${W} > section:nth-of-type(${mt})`:`${W} :where([data-design-section=\"${H}\"],[data-section-id=\"${H}\"],section#${H},section.${H})`}if(l.includes(\":\")){const[L,H]=h.split(\":\");if(H===\"card\")return`body [data-preview-list-path=\"${L}\"] :is([data-preview-item-path],[data-design-card],.card,[class*=\"card-\"])`;if(H)return`body [data-preview-list-path=\"${L}\"] :is([data-preview-field-path$=\".${H}\"],[data-field-path$=\".${H}\"],[data-content-path$=\".${H}\"])`}return`body :is([data-preview-field-path=\"${h}\"],[data-content-path=\"${h}\"],[data-field-path=\"${h}\"],[data-fivora-resolved-field-path=\"${h}\"],[data-preview-list-path=\"${h}\"],[data-preview-item-path=\"${h}\"])`})();Q.push(c(D,g.map(([L,H])=>d(H,q(f[L])))))}return Q.filter(Boolean).join(`\n`)},function(C,T){if(!T||typeof T!=\"object\"||Array.isArray(T))return C;const I=__name(E=>{const x=E.trim().toLowerCase(),v=x.match(/^#([0-9a-f]{3})$/);return v?`#${[...v[1]].map(N=>N.repeat(2)).join(\"\")}`:/^#[0-9a-f]{6}$/.test(x)?x:null},\"normalize\"),P=new Map,q=new Map;for(const[E,x]of Object.entries(T).slice(0,64)){if(typeof x!=\"string\")continue;const v=I(E),N=I(x);if(!v||!N||v===N)continue;P.set(v,N);const G=__name(R=>[Number.parseInt(R.slice(1,3),16),Number.parseInt(R.slice(3,5),16),Number.parseInt(R.slice(5,7),16)],\"channels\");q.set(G(v).join(\",\"),G(N)),v[1]===v[2]&&v[3]===v[4]&&v[5]===v[6]&&P.set(`#${v[1]}${v[3]}${v[5]}`,N)}if(P.size===0)return C;const a=[...P.keys()].sort((E,x)=>x.length-E.length).map(E=>E.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")),d=new RegExp(`(?<!\\\\\\\\)(?:${a.join(\"|\")})(?![0-9a-f])`,\"gi\"),c=C.replace(d,E=>{const x=I(E);return x?P.get(x)??E:E}),y=/(rgba?\\(\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})(\\s+|,\\s*)(\\d{1,3})/gi;return c.replace(y,(E,x,v,N,G,R,et)=>{const O=q.get(`${v},${G},${et}`);return O?`${x}${O[0]}${N}${O[1]}${R}${O[2]}`:E})},\"fivora-universal-design-overrides\",function(C,T){const I=T??document,P=C&&typeof C==\"object\"&&!Array.isArray(C)?C:null,q=P?.requirements&&typeof P.requirements==\"object\"&&!Array.isArray(P.requirements)?P.requirements:null,a=P?.template&&typeof P.template==\"object\"&&!Array.isArray(P.template)?P.template:null,d=a?.structure&&typeof a.structure==\"object\"&&!Array.isArray(a.structure)?a.structure:null,c=Array.isArray(q?.requiredPages),y=Array.isArray(d?.pages);if(!c&&!y)return;const E=c?q?.requiredPages:d?.pages,x=new Set(E.filter(g=>typeof g==\"string\").map(g=>g.trim()).filter(Boolean)),v=Array.isArray(a?.pageDefinitions)?a.pageDefinitions:[],N=Array.isArray(d?.pageDefinitions)?d.pageDefinitions:[],R=(v.length>0?v:N).flatMap(g=>{if(!g||typeof g!=\"object\"||Array.isArray(g))return[];const l=g;if(typeof l.id!=\"string\"||!l.id.trim())return[];const f=l.id.trim(),h=typeof l.label==\"string\"&&l.label.trim()?l.label.trim():f.replace(/_/g,\" \"),D=typeof l.route==\"string\"?l.route.trim():\"\",L=D===\"/\"?\"/\":`/${(D||f).replace(/^\\/+|\\/+$/g,\"\")}`;return[{id:f,label:h,route:L}]}),O=(y?d?.pages:E).filter(g=>typeof g==\"string\").map(g=>g.trim()).filter(Boolean).map((g,l)=>({id:g,label:g.replace(/_/g,\" \"),route:l===0?\"/\":`/${g}`})),_=R.length>0?R:O;if(_.length===0)return;const M=_.filter(g=>!x.has(g.id));if(M.length===0){I.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(g=>g.removeAttribute(\"data-fivora-page-disabled\"));return}let V=I.getElementById(\"fivora-page-selection-style\");(!V||V.tagName!==\"STYLE\")&&(V=I.createElement(\"style\"),V.id=\"fivora-page-selection-style\",V.textContent='[data-fivora-page-disabled=\"true\"]{display:none!important}',I.head.appendChild(V)),I.querySelectorAll(\"[data-fivora-page-disabled]\").forEach(g=>g.removeAttribute(\"data-fivora-page-disabled\"));const U=__name(g=>{let l=g;try{const D=new URL(g,I.baseURI);if(D.origin!==I.location?.origin)return\"\";l=D.pathname}catch{return\"\"}const f=l.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];f&&l.startsWith(f)&&(l=l.slice(f.length)||\"/\"),l=l.replace(/\\/index\\.html$/i,\"/\").replace(/\\.html$/i,\"\");const h=l.replace(/\\/+$/g,\"\")||\"/\";return h.startsWith(\"/\")?h:`/${h}`},\"normalizePath\"),X=__name(g=>_.find(l=>{const f=U(l.route);return f?f===\"/\"?g===\"/\":g===f||g.startsWith(`${f}/`):!1}),\"pageForPath\"),K=__name(g=>{for(const l of[\"href\",\"formaction\",\"data-href\",\"data-route\",\"data-url\"]){const f=g.getAttribute(l);if(!f)continue;const h=X(U(f));if(h)return h}},\"pageForControl\"),Z=__name(g=>{g&&g.setAttribute(\"data-fivora-page-disabled\",\"true\")},\"disable\");for(const g of M)for(const l of[\"data-page-key\",\"data-required-page\",\"data-target-page\"])I.querySelectorAll(`[${l}]`).forEach(f=>{f.getAttribute(l)===g.id&&Z(f)});const Q=Array.from(I.querySelectorAll(\"a[href]\"));for(const g of Q){const l=K(g);if(!l||x.has(l.id))continue;if(g.classList.contains(\"absolute\")&&(g.classList.contains(\"inset-0\")||g.classList.contains(\"inset-x-0\")&&g.classList.contains(\"inset-y-0\")))Z(g.closest(\"[data-preview-item-path],[data-design-card],article,li\"));else{const h=g.closest(\"li\");Z(h&&h.querySelectorAll(\"a[href]\").length===1?h:g)}}const gt=Array.from(I.querySelectorAll('button,[role=\"button\"],[data-href],[data-route],[data-url]')).filter(g=>g.tagName!==\"A\");for(const g of gt){const l=K(g);if(!l||x.has(l.id))continue;const f=g.closest(\"li\");Z(f&&f.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]').length===1?f:g)}const Et=I.querySelector(\"main section\");for(const g of I.querySelectorAll(\"main section\")){const l=Array.from(g.querySelectorAll('a[href],button,[role=\"button\"],[data-href],[data-route],[data-url]')),f=l.map(K).filter(L=>!!L),h=g.hasAttribute(\"data-preview-page-key\"),D=g===Et||g.hasAttribute(\"data-design-hero\")||/(?:^|\\s)(?:hero|banner|masthead)(?:\\s|$)/i.test(g.className)||!!g.querySelector(\"h1\");!h&&!D&&f.length>0&&f.length===l.length&&f.every(L=>!x.has(L.id))&&Z(g)}},function(C){const T=C.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live)\\/[^/]+)/)?.[1];if(!T)return C;let I=C;const P=`${T}${T}`;for(;I.startsWith(P);)I=`${T}${I.slice(P.length)}`;return I},function(){if(window.__fivoraSectionNavigationInstalled)return;window.__fivoraSectionNavigationInstalled=!0;const C=__name(c=>typeof CSS<\"u\"&&typeof CSS.escape==\"function\"?CSS.escape(c):c.replace(/[^a-zA-Z0-9_-]/g,y=>`\\\\${y.codePointAt(0)?.toString(16)??\"\"} `),\"escapeSelector\"),T=__name(()=>window.location.pathname.match(/^(\\/uploads\\/generated-sites\\/(?:template-preview|preview|live|candidate)\\/[^/]+)/)?.[1]??\"\",\"previewRoot\"),I=__name(c=>{const y=T(),x=(y&&c.pathname.startsWith(y)?c.pathname.slice(y.length):c.pathname).replace(/\\/(?:index\\.html?)?$/i,\"\").split(\"/\").filter(Boolean);return(x[x.length-1]??\"home\").replace(/\\.html?$/i,\"\")},\"routeSectionKey\"),P=__name(c=>{const y=c.getAttribute(\"href\")?.trim();if(!y||c.hasAttribute(\"download\")||c.target&&c.target!==\"_self\"||/^(mailto:|tel:|sms:|whatsapp:|javascript:)/i.test(y))return null;let E;try{E=new URL(y,window.location.href)}catch{return null}if(E.origin!==window.location.origin)return null;const x=E.hash?decodeURIComponent(E.hash.slice(1)).trim():\"\",v=x||I(E);if(!v)return null;if(x){const R=document.getElementById(x);if(R)return{target:R,key:v}}const N=C(v),G=document.querySelector(`section#${N},section[data-fivora-section=\"${N}\"],section[data-section-id=\"${N}\"],[data-preview-page-key=\"${N}\"]`);return G?{target:G,key:v}:null},\"findTarget\"),q=__name(()=>{let c=0;for(const y of document.querySelectorAll(\"header,nav,[data-fivora-sticky-header]\")){const E=window.getComputedStyle(y);if(E.position!==\"fixed\"&&E.position!==\"sticky\")continue;const x=y.getBoundingClientRect();x.height<=0||x.top>4||x.bottom<=0||(c=Math.max(c,x.bottom))}return c},\"fixedHeaderOffset\"),a=__name((c,y,E)=>{const x=Math.max(0,window.scrollY+c.getBoundingClientRect().top-q()-8),v=window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;window.scrollTo({top:x,behavior:v?\"auto\":\"smooth\"}),E&&window.location.hash!==`#${y}`&&window.history.pushState(null,\"\",`${window.location.pathname}${window.location.search}#${encodeURIComponent(y)}`),window.dispatchEvent(new CustomEvent(\"fivora:section-navigation\",{detail:{key:y,target:c}}))},\"scrollToTarget\");document.addEventListener(\"click\",c=>{if(c.defaultPrevented||c.button!==0||c.metaKey||c.ctrlKey||c.shiftKey||c.altKey)return;const y=c.target?.closest?.(\"a[href]\");if(!y)return;const E=P(y);!E||E.target===y||(c.preventDefault(),c.stopImmediatePropagation(),a(E.target,E.key,!0))},!0);const d=__name(()=>{if(!window.location.hash)return;const c=document.createElement(\"a\");c.href=window.location.hash;const y=P(c);y&&a(y.target,y.key,!1)},\"revealInitialHash\");window.requestAnimationFrame(()=>window.requestAnimationFrame(d))});";
|