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