@@ -476,21 +492,89 @@
;
(function(){
var __hfCompId = "background";
+ var __hfTimelineCompId = "background";
var __hfErrorLabel = "[Compiler] Composition script failed";
+ var __hfAuthoredRootId = null;
+ var __hfAuthoredRootAttr = "data-hf-authored-id";
var __hfEscapeAttr = function(value) {
return (value + "").replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
};
- var __hfRootSelector = __hfCompId
+ var __hfRootSelector = "[data-composition-id=\"background\"]" || (__hfCompId
? '[data-composition-id="' + __hfEscapeAttr(__hfCompId) + '"]'
- : "";
+ : "");
var __hfRoot = null;
var __hfRootSelectorPattern = "\\[\\s*data-composition-id\\s*=\\s*(?:\"background\"|'background')\\s*\\]";
var __hfTimingSelectorPattern = "\\s*\\[\\s*data-(?:start|duration)\\s*=\\s*(?:\"[^\"]*\"|'[^']*')\\s*\\]";
+ var __hfAuthoredRootIdForms = [];
+ var __hfAuthoredRootSelector = __hfAuthoredRootId
+ ? "[" + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(__hfAuthoredRootId) + '"]'
+ : "";
+ var __hfIsSelectorNameChar = function(char) {
+ return !!char && /[\w-]/.test(char);
+ };
+ var __hfReplaceAuthoredRootIdSelectors = function(selector) {
+ if (!__hfAuthoredRootSelector || !__hfAuthoredRootIdForms.length || typeof selector !== "string") {
+ return selector;
+ }
+ var result = "";
+ var bracketDepth = 0;
+ var quote = null;
+ for (var index = 0; index < selector.length; index += 1) {
+ var char = selector[index];
+ var previousChar = index > 0 ? selector[index - 1] : "";
+ if (quote) {
+ result += char;
+ if (char === quote && previousChar !== "\\") {
+ quote = null;
+ }
+ continue;
+ }
+ if (char === '"' || char === "'") {
+ quote = char;
+ result += char;
+ continue;
+ }
+ if (char === "[") {
+ bracketDepth += 1;
+ result += char;
+ continue;
+ }
+ if (char === "]") {
+ bracketDepth = Math.max(0, bracketDepth - 1);
+ result += char;
+ continue;
+ }
+ if (char === "#" && bracketDepth === 0) {
+ var matchedForm = null;
+ for (var formIndex = 0; formIndex < __hfAuthoredRootIdForms.length; formIndex += 1) {
+ var form = __hfAuthoredRootIdForms[formIndex];
+ if (selector.slice(index + 1, index + 1 + form.length) === form) {
+ matchedForm = form;
+ break;
+ }
+ }
+ if (matchedForm) {
+ var nextChar = selector[index + 1 + matchedForm.length];
+ if (!__hfIsSelectorNameChar(nextChar)) {
+ result += __hfAuthoredRootSelector;
+ index += matchedForm.length;
+ continue;
+ }
+ }
+ }
+ result += char;
+ }
+ return result;
+ };
var __hfNormalizeSelector = function(selector) {
if (!__hfCompId || typeof selector !== "string") return selector;
- return selector
+ var normalized = selector
.replace(new RegExp(__hfRootSelectorPattern + '(?:' + __hfTimingSelectorPattern + ')+', 'g'), __hfRootSelector)
.replace(new RegExp('(?:' + __hfTimingSelectorPattern + ')+' + __hfRootSelectorPattern, 'g'), __hfRootSelector);
+ if (__hfAuthoredRootSelector) {
+ normalized = __hfReplaceAuthoredRootIdSelectors(normalized);
+ }
+ return normalized;
};
var __hfFindRoot = function() {
if (!__hfRoot && __hfRootSelector) {
@@ -515,22 +599,77 @@
var matches = __hfQueryAll(selector);
return matches[0] || null;
};
+ var __hfGetElementById = function(id) {
+ var found = window.document.getElementById(id);
+ if (found && __hfContains(found)) return found;
+ var root = __hfFindRoot();
+ if (!root) return found || null;
+ var idValue = id + "";
+ if (__hfAuthoredRootId && __hfAuthoredRootId === idValue && root.getAttribute && root.getAttribute(__hfAuthoredRootAttr) === idValue) {
+ return root;
+ }
+ if (root.id === idValue) return root;
+ if (typeof root.querySelector !== "function") return null;
+ try {
+ var authoredRootMatch = root.querySelector('[' + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(idValue) + '"]');
+ if (authoredRootMatch) return authoredRootMatch;
+ } catch {}
+ if (typeof CSS !== "undefined" && CSS && typeof CSS.escape === "function") {
+ try {
+ return root.querySelector("#" + CSS.escape(idValue)) || null;
+ } catch {}
+ }
+ try {
+ return root.querySelector('[id="' + __hfEscapeAttr(idValue) + '"]') || null;
+ } catch {}
+ return null;
+ };
var __hfScopedDocument = typeof Proxy === "function"
? new Proxy(window.document, {
get: function(target, prop, receiver) {
if (prop === "querySelector") return __hfQueryOne;
if (prop === "querySelectorAll") return __hfQueryAll;
- if (prop === "getElementById") {
- return function(id) {
- var found = target.getElementById(id);
- return found && __hfContains(found) ? found : null;
- };
- }
- var value = Reflect.get(target, prop, receiver);
+ if (prop === "getElementById") return __hfGetElementById;
+ var value = Reflect.get(target, prop, target);
return typeof value === "function" ? value.bind(target) : value;
},
})
: window.document;
+ var __hfTimelineRegistryProxy = null;
+ var __hfGetTimelineRegistry = function() {
+ window.__timelines = window.__timelines || {};
+ if (!__hfCompId || __hfCompId === __hfTimelineCompId || typeof Proxy !== "function") {
+ return window.__timelines;
+ }
+ if (!__hfTimelineRegistryProxy) {
+ __hfTimelineRegistryProxy = new Proxy(window.__timelines, {
+ get: function(target, prop, receiver) {
+ return Reflect.get(target, prop === __hfCompId ? __hfTimelineCompId : prop, target);
+ },
+ set: function(target, prop, value, receiver) {
+ return Reflect.set(target, prop === __hfCompId ? __hfTimelineCompId : prop, value, target);
+ },
+ });
+ }
+ return __hfTimelineRegistryProxy;
+ };
+ var __hfScopedWindow = typeof Proxy === "function"
+ ? new Proxy(window, {
+ get: function(target, prop, receiver) {
+ if (prop === "__timelines") return __hfGetTimelineRegistry();
+ var value = Reflect.get(target, prop, target);
+ return typeof value === "function" ? value.bind(target) : value;
+ },
+ set: function(target, prop, value, receiver) {
+ if (prop === "__timelines") {
+ target.__timelines = value || {};
+ __hfTimelineRegistryProxy = null;
+ return true;
+ }
+ return Reflect.set(target, prop, value, target);
+ },
+ })
+ : window;
var __hfResolveGsapTarget = function(target) {
if (typeof target !== "string") return target;
return __hfQueryAll(target);
@@ -551,7 +690,11 @@
value: __hfFindRoot(),
configurable: true,
});
- } catch (_err) {}
+ } catch {
+ // Best-effort: timelines coming from user code may have a frozen target
+ // or a non-extensible defineProperty path. Swallow — the scoped root
+ // is an enrichment, not a correctness invariant for playback.
+ }
return timeline;
};
var __hfBaseGsap = typeof gsap === "undefined" ? window.gsap : gsap;
@@ -587,23 +730,39 @@
var root = baseEl || __hfFindRoot();
return function(selector) {
if (!root || typeof selector !== "string") return [];
- return Array.prototype.slice.call(root.querySelectorAll(selector));
+ return Array.prototype.filter.call(
+ window.document.querySelectorAll(__hfNormalizeSelector(selector)),
+ function(node) {
+ return node === root || (typeof root.contains === "function" && root.contains(node));
+ },
+ );
};
};
}
- var value = Reflect.get(utilsTarget, utilsProp, utilsReceiver);
+ var value = Reflect.get(utilsTarget, utilsProp, utilsTarget);
return typeof value === "function" ? value.bind(utilsTarget) : value;
},
});
}
- var value = Reflect.get(target, prop, receiver);
+ var value = Reflect.get(target, prop, target);
return typeof value === "function" ? value.bind(target) : value;
},
});
+ var __hfBaseHyperframes = window.__hyperframes;
+ var __hfScopedHyperframes = !__hfBaseHyperframes
+ ? __hfBaseHyperframes
+ : Object.assign({}, __hfBaseHyperframes, {
+ getVariables: function() {
+ var byComp = window.__hfVariablesByComp;
+ var scoped = byComp && __hfTimelineCompId ? byComp[__hfTimelineCompId] : null;
+ return scoped ? Object.assign({}, scoped) : {};
+ },
+ });
var __hfRun = function() {
try {
- (function(document, gsap) {
-(function () {
+ (function(document, gsap, window, __hyperframes) {
+
+ (function () {
const tl = gsap.timeline({ paused: true });
const duration = 16;
@@ -721,32 +880,101 @@
// Register the timeline
window.__timelines["background"] = tl;
})();
- }).call(window, __hfScopedDocument, __hfScopedGsap);
+
+ }).call(window, __hfScopedDocument, __hfScopedGsap, __hfScopedWindow, __hfScopedHyperframes);
} catch (_err) {
console.error(__hfErrorLabel, __hfCompId, _err);
}
};
__hfFindRoot();
__hfRun();
-})()
+})();
;
(function(){
var __hfCompId = "overlays";
+ var __hfTimelineCompId = "overlays";
var __hfErrorLabel = "[Compiler] Composition script failed";
+ var __hfAuthoredRootId = null;
+ var __hfAuthoredRootAttr = "data-hf-authored-id";
var __hfEscapeAttr = function(value) {
return (value + "").replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
};
- var __hfRootSelector = __hfCompId
+ var __hfRootSelector = "[data-composition-id=\"overlays\"]" || (__hfCompId
? '[data-composition-id="' + __hfEscapeAttr(__hfCompId) + '"]'
- : "";
+ : "");
var __hfRoot = null;
var __hfRootSelectorPattern = "\\[\\s*data-composition-id\\s*=\\s*(?:\"overlays\"|'overlays')\\s*\\]";
var __hfTimingSelectorPattern = "\\s*\\[\\s*data-(?:start|duration)\\s*=\\s*(?:\"[^\"]*\"|'[^']*')\\s*\\]";
+ var __hfAuthoredRootIdForms = [];
+ var __hfAuthoredRootSelector = __hfAuthoredRootId
+ ? "[" + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(__hfAuthoredRootId) + '"]'
+ : "";
+ var __hfIsSelectorNameChar = function(char) {
+ return !!char && /[\w-]/.test(char);
+ };
+ var __hfReplaceAuthoredRootIdSelectors = function(selector) {
+ if (!__hfAuthoredRootSelector || !__hfAuthoredRootIdForms.length || typeof selector !== "string") {
+ return selector;
+ }
+ var result = "";
+ var bracketDepth = 0;
+ var quote = null;
+ for (var index = 0; index < selector.length; index += 1) {
+ var char = selector[index];
+ var previousChar = index > 0 ? selector[index - 1] : "";
+ if (quote) {
+ result += char;
+ if (char === quote && previousChar !== "\\") {
+ quote = null;
+ }
+ continue;
+ }
+ if (char === '"' || char === "'") {
+ quote = char;
+ result += char;
+ continue;
+ }
+ if (char === "[") {
+ bracketDepth += 1;
+ result += char;
+ continue;
+ }
+ if (char === "]") {
+ bracketDepth = Math.max(0, bracketDepth - 1);
+ result += char;
+ continue;
+ }
+ if (char === "#" && bracketDepth === 0) {
+ var matchedForm = null;
+ for (var formIndex = 0; formIndex < __hfAuthoredRootIdForms.length; formIndex += 1) {
+ var form = __hfAuthoredRootIdForms[formIndex];
+ if (selector.slice(index + 1, index + 1 + form.length) === form) {
+ matchedForm = form;
+ break;
+ }
+ }
+ if (matchedForm) {
+ var nextChar = selector[index + 1 + matchedForm.length];
+ if (!__hfIsSelectorNameChar(nextChar)) {
+ result += __hfAuthoredRootSelector;
+ index += matchedForm.length;
+ continue;
+ }
+ }
+ }
+ result += char;
+ }
+ return result;
+ };
var __hfNormalizeSelector = function(selector) {
if (!__hfCompId || typeof selector !== "string") return selector;
- return selector
+ var normalized = selector
.replace(new RegExp(__hfRootSelectorPattern + '(?:' + __hfTimingSelectorPattern + ')+', 'g'), __hfRootSelector)
.replace(new RegExp('(?:' + __hfTimingSelectorPattern + ')+' + __hfRootSelectorPattern, 'g'), __hfRootSelector);
+ if (__hfAuthoredRootSelector) {
+ normalized = __hfReplaceAuthoredRootIdSelectors(normalized);
+ }
+ return normalized;
};
var __hfFindRoot = function() {
if (!__hfRoot && __hfRootSelector) {
@@ -771,22 +999,77 @@
var matches = __hfQueryAll(selector);
return matches[0] || null;
};
+ var __hfGetElementById = function(id) {
+ var found = window.document.getElementById(id);
+ if (found && __hfContains(found)) return found;
+ var root = __hfFindRoot();
+ if (!root) return found || null;
+ var idValue = id + "";
+ if (__hfAuthoredRootId && __hfAuthoredRootId === idValue && root.getAttribute && root.getAttribute(__hfAuthoredRootAttr) === idValue) {
+ return root;
+ }
+ if (root.id === idValue) return root;
+ if (typeof root.querySelector !== "function") return null;
+ try {
+ var authoredRootMatch = root.querySelector('[' + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(idValue) + '"]');
+ if (authoredRootMatch) return authoredRootMatch;
+ } catch {}
+ if (typeof CSS !== "undefined" && CSS && typeof CSS.escape === "function") {
+ try {
+ return root.querySelector("#" + CSS.escape(idValue)) || null;
+ } catch {}
+ }
+ try {
+ return root.querySelector('[id="' + __hfEscapeAttr(idValue) + '"]') || null;
+ } catch {}
+ return null;
+ };
var __hfScopedDocument = typeof Proxy === "function"
? new Proxy(window.document, {
get: function(target, prop, receiver) {
if (prop === "querySelector") return __hfQueryOne;
if (prop === "querySelectorAll") return __hfQueryAll;
- if (prop === "getElementById") {
- return function(id) {
- var found = target.getElementById(id);
- return found && __hfContains(found) ? found : null;
- };
- }
- var value = Reflect.get(target, prop, receiver);
+ if (prop === "getElementById") return __hfGetElementById;
+ var value = Reflect.get(target, prop, target);
return typeof value === "function" ? value.bind(target) : value;
},
})
: window.document;
+ var __hfTimelineRegistryProxy = null;
+ var __hfGetTimelineRegistry = function() {
+ window.__timelines = window.__timelines || {};
+ if (!__hfCompId || __hfCompId === __hfTimelineCompId || typeof Proxy !== "function") {
+ return window.__timelines;
+ }
+ if (!__hfTimelineRegistryProxy) {
+ __hfTimelineRegistryProxy = new Proxy(window.__timelines, {
+ get: function(target, prop, receiver) {
+ return Reflect.get(target, prop === __hfCompId ? __hfTimelineCompId : prop, target);
+ },
+ set: function(target, prop, value, receiver) {
+ return Reflect.set(target, prop === __hfCompId ? __hfTimelineCompId : prop, value, target);
+ },
+ });
+ }
+ return __hfTimelineRegistryProxy;
+ };
+ var __hfScopedWindow = typeof Proxy === "function"
+ ? new Proxy(window, {
+ get: function(target, prop, receiver) {
+ if (prop === "__timelines") return __hfGetTimelineRegistry();
+ var value = Reflect.get(target, prop, target);
+ return typeof value === "function" ? value.bind(target) : value;
+ },
+ set: function(target, prop, value, receiver) {
+ if (prop === "__timelines") {
+ target.__timelines = value || {};
+ __hfTimelineRegistryProxy = null;
+ return true;
+ }
+ return Reflect.set(target, prop, value, target);
+ },
+ })
+ : window;
var __hfResolveGsapTarget = function(target) {
if (typeof target !== "string") return target;
return __hfQueryAll(target);
@@ -807,7 +1090,11 @@
value: __hfFindRoot(),
configurable: true,
});
- } catch (_err) {}
+ } catch {
+ // Best-effort: timelines coming from user code may have a frozen target
+ // or a non-extensible defineProperty path. Swallow — the scoped root
+ // is an enrichment, not a correctness invariant for playback.
+ }
return timeline;
};
var __hfBaseGsap = typeof gsap === "undefined" ? window.gsap : gsap;
@@ -843,23 +1130,39 @@
var root = baseEl || __hfFindRoot();
return function(selector) {
if (!root || typeof selector !== "string") return [];
- return Array.prototype.slice.call(root.querySelectorAll(selector));
+ return Array.prototype.filter.call(
+ window.document.querySelectorAll(__hfNormalizeSelector(selector)),
+ function(node) {
+ return node === root || (typeof root.contains === "function" && root.contains(node));
+ },
+ );
};
};
}
- var value = Reflect.get(utilsTarget, utilsProp, utilsReceiver);
+ var value = Reflect.get(utilsTarget, utilsProp, utilsTarget);
return typeof value === "function" ? value.bind(utilsTarget) : value;
},
});
}
- var value = Reflect.get(target, prop, receiver);
+ var value = Reflect.get(target, prop, target);
return typeof value === "function" ? value.bind(target) : value;
},
});
+ var __hfBaseHyperframes = window.__hyperframes;
+ var __hfScopedHyperframes = !__hfBaseHyperframes
+ ? __hfBaseHyperframes
+ : Object.assign({}, __hfBaseHyperframes, {
+ getVariables: function() {
+ var byComp = window.__hfVariablesByComp;
+ var scoped = byComp && __hfTimelineCompId ? byComp[__hfTimelineCompId] : null;
+ return scoped ? Object.assign({}, scoped) : {};
+ },
+ });
var __hfRun = function() {
try {
- (function(document, gsap) {
-(function () {
+ (function(document, gsap, window, __hyperframes) {
+
+ (function () {
const TRANSCRIPT = [
{ text: "We", start: 0.14, end: 0.239 },
{ text: "asked", start: 0.28, end: 0.459 },
@@ -1067,32 +1370,101 @@
window.__timelines["overlays"] = tl;
})();
- }).call(window, __hfScopedDocument, __hfScopedGsap);
+
+ }).call(window, __hfScopedDocument, __hfScopedGsap, __hfScopedWindow, __hfScopedHyperframes);
} catch (_err) {
console.error(__hfErrorLabel, __hfCompId, _err);
}
};
__hfFindRoot();
__hfRun();
-})()
+})();
;
(function(){
var __hfCompId = "captions";
+ var __hfTimelineCompId = "captions";
var __hfErrorLabel = "[Compiler] Composition script failed";
+ var __hfAuthoredRootId = null;
+ var __hfAuthoredRootAttr = "data-hf-authored-id";
var __hfEscapeAttr = function(value) {
return (value + "").replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
};
- var __hfRootSelector = __hfCompId
+ var __hfRootSelector = "[data-composition-id=\"captions\"]" || (__hfCompId
? '[data-composition-id="' + __hfEscapeAttr(__hfCompId) + '"]'
- : "";
+ : "");
var __hfRoot = null;
var __hfRootSelectorPattern = "\\[\\s*data-composition-id\\s*=\\s*(?:\"captions\"|'captions')\\s*\\]";
var __hfTimingSelectorPattern = "\\s*\\[\\s*data-(?:start|duration)\\s*=\\s*(?:\"[^\"]*\"|'[^']*')\\s*\\]";
+ var __hfAuthoredRootIdForms = [];
+ var __hfAuthoredRootSelector = __hfAuthoredRootId
+ ? "[" + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(__hfAuthoredRootId) + '"]'
+ : "";
+ var __hfIsSelectorNameChar = function(char) {
+ return !!char && /[\w-]/.test(char);
+ };
+ var __hfReplaceAuthoredRootIdSelectors = function(selector) {
+ if (!__hfAuthoredRootSelector || !__hfAuthoredRootIdForms.length || typeof selector !== "string") {
+ return selector;
+ }
+ var result = "";
+ var bracketDepth = 0;
+ var quote = null;
+ for (var index = 0; index < selector.length; index += 1) {
+ var char = selector[index];
+ var previousChar = index > 0 ? selector[index - 1] : "";
+ if (quote) {
+ result += char;
+ if (char === quote && previousChar !== "\\") {
+ quote = null;
+ }
+ continue;
+ }
+ if (char === '"' || char === "'") {
+ quote = char;
+ result += char;
+ continue;
+ }
+ if (char === "[") {
+ bracketDepth += 1;
+ result += char;
+ continue;
+ }
+ if (char === "]") {
+ bracketDepth = Math.max(0, bracketDepth - 1);
+ result += char;
+ continue;
+ }
+ if (char === "#" && bracketDepth === 0) {
+ var matchedForm = null;
+ for (var formIndex = 0; formIndex < __hfAuthoredRootIdForms.length; formIndex += 1) {
+ var form = __hfAuthoredRootIdForms[formIndex];
+ if (selector.slice(index + 1, index + 1 + form.length) === form) {
+ matchedForm = form;
+ break;
+ }
+ }
+ if (matchedForm) {
+ var nextChar = selector[index + 1 + matchedForm.length];
+ if (!__hfIsSelectorNameChar(nextChar)) {
+ result += __hfAuthoredRootSelector;
+ index += matchedForm.length;
+ continue;
+ }
+ }
+ }
+ result += char;
+ }
+ return result;
+ };
var __hfNormalizeSelector = function(selector) {
if (!__hfCompId || typeof selector !== "string") return selector;
- return selector
+ var normalized = selector
.replace(new RegExp(__hfRootSelectorPattern + '(?:' + __hfTimingSelectorPattern + ')+', 'g'), __hfRootSelector)
.replace(new RegExp('(?:' + __hfTimingSelectorPattern + ')+' + __hfRootSelectorPattern, 'g'), __hfRootSelector);
+ if (__hfAuthoredRootSelector) {
+ normalized = __hfReplaceAuthoredRootIdSelectors(normalized);
+ }
+ return normalized;
};
var __hfFindRoot = function() {
if (!__hfRoot && __hfRootSelector) {
@@ -1117,22 +1489,77 @@
var matches = __hfQueryAll(selector);
return matches[0] || null;
};
+ var __hfGetElementById = function(id) {
+ var found = window.document.getElementById(id);
+ if (found && __hfContains(found)) return found;
+ var root = __hfFindRoot();
+ if (!root) return found || null;
+ var idValue = id + "";
+ if (__hfAuthoredRootId && __hfAuthoredRootId === idValue && root.getAttribute && root.getAttribute(__hfAuthoredRootAttr) === idValue) {
+ return root;
+ }
+ if (root.id === idValue) return root;
+ if (typeof root.querySelector !== "function") return null;
+ try {
+ var authoredRootMatch = root.querySelector('[' + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(idValue) + '"]');
+ if (authoredRootMatch) return authoredRootMatch;
+ } catch {}
+ if (typeof CSS !== "undefined" && CSS && typeof CSS.escape === "function") {
+ try {
+ return root.querySelector("#" + CSS.escape(idValue)) || null;
+ } catch {}
+ }
+ try {
+ return root.querySelector('[id="' + __hfEscapeAttr(idValue) + '"]') || null;
+ } catch {}
+ return null;
+ };
var __hfScopedDocument = typeof Proxy === "function"
? new Proxy(window.document, {
get: function(target, prop, receiver) {
if (prop === "querySelector") return __hfQueryOne;
if (prop === "querySelectorAll") return __hfQueryAll;
- if (prop === "getElementById") {
- return function(id) {
- var found = target.getElementById(id);
- return found && __hfContains(found) ? found : null;
- };
- }
- var value = Reflect.get(target, prop, receiver);
+ if (prop === "getElementById") return __hfGetElementById;
+ var value = Reflect.get(target, prop, target);
return typeof value === "function" ? value.bind(target) : value;
},
})
: window.document;
+ var __hfTimelineRegistryProxy = null;
+ var __hfGetTimelineRegistry = function() {
+ window.__timelines = window.__timelines || {};
+ if (!__hfCompId || __hfCompId === __hfTimelineCompId || typeof Proxy !== "function") {
+ return window.__timelines;
+ }
+ if (!__hfTimelineRegistryProxy) {
+ __hfTimelineRegistryProxy = new Proxy(window.__timelines, {
+ get: function(target, prop, receiver) {
+ return Reflect.get(target, prop === __hfCompId ? __hfTimelineCompId : prop, target);
+ },
+ set: function(target, prop, value, receiver) {
+ return Reflect.set(target, prop === __hfCompId ? __hfTimelineCompId : prop, value, target);
+ },
+ });
+ }
+ return __hfTimelineRegistryProxy;
+ };
+ var __hfScopedWindow = typeof Proxy === "function"
+ ? new Proxy(window, {
+ get: function(target, prop, receiver) {
+ if (prop === "__timelines") return __hfGetTimelineRegistry();
+ var value = Reflect.get(target, prop, target);
+ return typeof value === "function" ? value.bind(target) : value;
+ },
+ set: function(target, prop, value, receiver) {
+ if (prop === "__timelines") {
+ target.__timelines = value || {};
+ __hfTimelineRegistryProxy = null;
+ return true;
+ }
+ return Reflect.set(target, prop, value, target);
+ },
+ })
+ : window;
var __hfResolveGsapTarget = function(target) {
if (typeof target !== "string") return target;
return __hfQueryAll(target);
@@ -1153,7 +1580,11 @@
value: __hfFindRoot(),
configurable: true,
});
- } catch (_err) {}
+ } catch {
+ // Best-effort: timelines coming from user code may have a frozen target
+ // or a non-extensible defineProperty path. Swallow — the scoped root
+ // is an enrichment, not a correctness invariant for playback.
+ }
return timeline;
};
var __hfBaseGsap = typeof gsap === "undefined" ? window.gsap : gsap;
@@ -1189,23 +1620,39 @@
var root = baseEl || __hfFindRoot();
return function(selector) {
if (!root || typeof selector !== "string") return [];
- return Array.prototype.slice.call(root.querySelectorAll(selector));
+ return Array.prototype.filter.call(
+ window.document.querySelectorAll(__hfNormalizeSelector(selector)),
+ function(node) {
+ return node === root || (typeof root.contains === "function" && root.contains(node));
+ },
+ );
};
};
}
- var value = Reflect.get(utilsTarget, utilsProp, utilsReceiver);
+ var value = Reflect.get(utilsTarget, utilsProp, utilsTarget);
return typeof value === "function" ? value.bind(utilsTarget) : value;
},
});
}
- var value = Reflect.get(target, prop, receiver);
+ var value = Reflect.get(target, prop, target);
return typeof value === "function" ? value.bind(target) : value;
},
});
+ var __hfBaseHyperframes = window.__hyperframes;
+ var __hfScopedHyperframes = !__hfBaseHyperframes
+ ? __hfBaseHyperframes
+ : Object.assign({}, __hfBaseHyperframes, {
+ getVariables: function() {
+ var byComp = window.__hfVariablesByComp;
+ var scoped = byComp && __hfTimelineCompId ? byComp[__hfTimelineCompId] : null;
+ return scoped ? Object.assign({}, scoped) : {};
+ },
+ });
var __hfRun = function() {
try {
- (function(document, gsap) {
-(function () {
+ (function(document, gsap, window, __hyperframes) {
+
+ (function () {
const TRANSCRIPT = [
{ text: "We", start: 0.14, end: 0.239 },
{ text: "asked", start: 0.28, end: 0.459 },
@@ -1375,32 +1822,101 @@
window.__timelines["captions"] = tl;
})();
- }).call(window, __hfScopedDocument, __hfScopedGsap);
+
+ }).call(window, __hfScopedDocument, __hfScopedGsap, __hfScopedWindow, __hfScopedHyperframes);
} catch (_err) {
console.error(__hfErrorLabel, __hfCompId, _err);
}
};
__hfFindRoot();
__hfRun();
-})()
+})();
;
(function(){
var __hfCompId = "transitions";
+ var __hfTimelineCompId = "transitions";
var __hfErrorLabel = "[Compiler] Composition script failed";
+ var __hfAuthoredRootId = null;
+ var __hfAuthoredRootAttr = "data-hf-authored-id";
var __hfEscapeAttr = function(value) {
return (value + "").replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
};
- var __hfRootSelector = __hfCompId
+ var __hfRootSelector = "[data-composition-id=\"transitions\"]" || (__hfCompId
? '[data-composition-id="' + __hfEscapeAttr(__hfCompId) + '"]'
- : "";
+ : "");
var __hfRoot = null;
var __hfRootSelectorPattern = "\\[\\s*data-composition-id\\s*=\\s*(?:\"transitions\"|'transitions')\\s*\\]";
var __hfTimingSelectorPattern = "\\s*\\[\\s*data-(?:start|duration)\\s*=\\s*(?:\"[^\"]*\"|'[^']*')\\s*\\]";
+ var __hfAuthoredRootIdForms = [];
+ var __hfAuthoredRootSelector = __hfAuthoredRootId
+ ? "[" + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(__hfAuthoredRootId) + '"]'
+ : "";
+ var __hfIsSelectorNameChar = function(char) {
+ return !!char && /[\w-]/.test(char);
+ };
+ var __hfReplaceAuthoredRootIdSelectors = function(selector) {
+ if (!__hfAuthoredRootSelector || !__hfAuthoredRootIdForms.length || typeof selector !== "string") {
+ return selector;
+ }
+ var result = "";
+ var bracketDepth = 0;
+ var quote = null;
+ for (var index = 0; index < selector.length; index += 1) {
+ var char = selector[index];
+ var previousChar = index > 0 ? selector[index - 1] : "";
+ if (quote) {
+ result += char;
+ if (char === quote && previousChar !== "\\") {
+ quote = null;
+ }
+ continue;
+ }
+ if (char === '"' || char === "'") {
+ quote = char;
+ result += char;
+ continue;
+ }
+ if (char === "[") {
+ bracketDepth += 1;
+ result += char;
+ continue;
+ }
+ if (char === "]") {
+ bracketDepth = Math.max(0, bracketDepth - 1);
+ result += char;
+ continue;
+ }
+ if (char === "#" && bracketDepth === 0) {
+ var matchedForm = null;
+ for (var formIndex = 0; formIndex < __hfAuthoredRootIdForms.length; formIndex += 1) {
+ var form = __hfAuthoredRootIdForms[formIndex];
+ if (selector.slice(index + 1, index + 1 + form.length) === form) {
+ matchedForm = form;
+ break;
+ }
+ }
+ if (matchedForm) {
+ var nextChar = selector[index + 1 + matchedForm.length];
+ if (!__hfIsSelectorNameChar(nextChar)) {
+ result += __hfAuthoredRootSelector;
+ index += matchedForm.length;
+ continue;
+ }
+ }
+ }
+ result += char;
+ }
+ return result;
+ };
var __hfNormalizeSelector = function(selector) {
if (!__hfCompId || typeof selector !== "string") return selector;
- return selector
+ var normalized = selector
.replace(new RegExp(__hfRootSelectorPattern + '(?:' + __hfTimingSelectorPattern + ')+', 'g'), __hfRootSelector)
.replace(new RegExp('(?:' + __hfTimingSelectorPattern + ')+' + __hfRootSelectorPattern, 'g'), __hfRootSelector);
+ if (__hfAuthoredRootSelector) {
+ normalized = __hfReplaceAuthoredRootIdSelectors(normalized);
+ }
+ return normalized;
};
var __hfFindRoot = function() {
if (!__hfRoot && __hfRootSelector) {
@@ -1425,22 +1941,77 @@
var matches = __hfQueryAll(selector);
return matches[0] || null;
};
+ var __hfGetElementById = function(id) {
+ var found = window.document.getElementById(id);
+ if (found && __hfContains(found)) return found;
+ var root = __hfFindRoot();
+ if (!root) return found || null;
+ var idValue = id + "";
+ if (__hfAuthoredRootId && __hfAuthoredRootId === idValue && root.getAttribute && root.getAttribute(__hfAuthoredRootAttr) === idValue) {
+ return root;
+ }
+ if (root.id === idValue) return root;
+ if (typeof root.querySelector !== "function") return null;
+ try {
+ var authoredRootMatch = root.querySelector('[' + __hfAuthoredRootAttr + '="' + __hfEscapeAttr(idValue) + '"]');
+ if (authoredRootMatch) return authoredRootMatch;
+ } catch {}
+ if (typeof CSS !== "undefined" && CSS && typeof CSS.escape === "function") {
+ try {
+ return root.querySelector("#" + CSS.escape(idValue)) || null;
+ } catch {}
+ }
+ try {
+ return root.querySelector('[id="' + __hfEscapeAttr(idValue) + '"]') || null;
+ } catch {}
+ return null;
+ };
var __hfScopedDocument = typeof Proxy === "function"
? new Proxy(window.document, {
get: function(target, prop, receiver) {
if (prop === "querySelector") return __hfQueryOne;
if (prop === "querySelectorAll") return __hfQueryAll;
- if (prop === "getElementById") {
- return function(id) {
- var found = target.getElementById(id);
- return found && __hfContains(found) ? found : null;
- };
- }
- var value = Reflect.get(target, prop, receiver);
+ if (prop === "getElementById") return __hfGetElementById;
+ var value = Reflect.get(target, prop, target);
return typeof value === "function" ? value.bind(target) : value;
},
})
: window.document;
+ var __hfTimelineRegistryProxy = null;
+ var __hfGetTimelineRegistry = function() {
+ window.__timelines = window.__timelines || {};
+ if (!__hfCompId || __hfCompId === __hfTimelineCompId || typeof Proxy !== "function") {
+ return window.__timelines;
+ }
+ if (!__hfTimelineRegistryProxy) {
+ __hfTimelineRegistryProxy = new Proxy(window.__timelines, {
+ get: function(target, prop, receiver) {
+ return Reflect.get(target, prop === __hfCompId ? __hfTimelineCompId : prop, target);
+ },
+ set: function(target, prop, value, receiver) {
+ return Reflect.set(target, prop === __hfCompId ? __hfTimelineCompId : prop, value, target);
+ },
+ });
+ }
+ return __hfTimelineRegistryProxy;
+ };
+ var __hfScopedWindow = typeof Proxy === "function"
+ ? new Proxy(window, {
+ get: function(target, prop, receiver) {
+ if (prop === "__timelines") return __hfGetTimelineRegistry();
+ var value = Reflect.get(target, prop, target);
+ return typeof value === "function" ? value.bind(target) : value;
+ },
+ set: function(target, prop, value, receiver) {
+ if (prop === "__timelines") {
+ target.__timelines = value || {};
+ __hfTimelineRegistryProxy = null;
+ return true;
+ }
+ return Reflect.set(target, prop, value, target);
+ },
+ })
+ : window;
var __hfResolveGsapTarget = function(target) {
if (typeof target !== "string") return target;
return __hfQueryAll(target);
@@ -1461,7 +2032,11 @@
value: __hfFindRoot(),
configurable: true,
});
- } catch (_err) {}
+ } catch {
+ // Best-effort: timelines coming from user code may have a frozen target
+ // or a non-extensible defineProperty path. Swallow — the scoped root
+ // is an enrichment, not a correctness invariant for playback.
+ }
return timeline;
};
var __hfBaseGsap = typeof gsap === "undefined" ? window.gsap : gsap;
@@ -1497,23 +2072,39 @@
var root = baseEl || __hfFindRoot();
return function(selector) {
if (!root || typeof selector !== "string") return [];
- return Array.prototype.slice.call(root.querySelectorAll(selector));
+ return Array.prototype.filter.call(
+ window.document.querySelectorAll(__hfNormalizeSelector(selector)),
+ function(node) {
+ return node === root || (typeof root.contains === "function" && root.contains(node));
+ },
+ );
};
};
}
- var value = Reflect.get(utilsTarget, utilsProp, utilsReceiver);
+ var value = Reflect.get(utilsTarget, utilsProp, utilsTarget);
return typeof value === "function" ? value.bind(utilsTarget) : value;
},
});
}
- var value = Reflect.get(target, prop, receiver);
+ var value = Reflect.get(target, prop, target);
return typeof value === "function" ? value.bind(target) : value;
},
});
+ var __hfBaseHyperframes = window.__hyperframes;
+ var __hfScopedHyperframes = !__hfBaseHyperframes
+ ? __hfBaseHyperframes
+ : Object.assign({}, __hfBaseHyperframes, {
+ getVariables: function() {
+ var byComp = window.__hfVariablesByComp;
+ var scoped = byComp && __hfTimelineCompId ? byComp[__hfTimelineCompId] : null;
+ return scoped ? Object.assign({}, scoped) : {};
+ },
+ });
var __hfRun = function() {
try {
- (function(document, gsap) {
-(function () {
+ (function(document, gsap, window, __hyperframes) {
+
+ (function () {
const tl = gsap.timeline({ paused: true });
// Sweep 1: At 7.3s (when A-roll exits)
@@ -1546,12 +2137,13 @@
window.__timelines["transitions"] = tl;
})();
- }).call(window, __hfScopedDocument, __hfScopedGsap);
+
+ }).call(window, __hfScopedDocument, __hfScopedGsap, __hfScopedWindow, __hfScopedHyperframes);
} catch (_err) {
console.error(__hfErrorLabel, __hfCompId, _err);
}
};
__hfFindRoot();
__hfRun();
-})()
+})();