hyperframes 0.7.67 → 0.7.68
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/dist/cli.js +33 -74
- package/dist/hyperframe-runtime.js +14 -14
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +14 -14
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/studio/assets/{hyperframes-player-DqhzqBZU.js → hyperframes-player-Dn21qc4t.js} +1 -1
- package/dist/studio/assets/{index-DszkK5mi.js → index-B4t_Wz7b.js} +3 -3
- package/dist/studio/assets/{index-DGS1KaUl.js → index-DyYdLOLn.js} +1 -1
- package/dist/studio/assets/{index-BJ0VzN-B.js → index-SIliDuoE.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -50,7 +50,7 @@ var VERSION;
|
|
|
50
50
|
var init_version = __esm({
|
|
51
51
|
"src/version.ts"() {
|
|
52
52
|
"use strict";
|
|
53
|
-
VERSION = true ? "0.7.
|
|
53
|
+
VERSION = true ? "0.7.68" : "0.0.0-dev";
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
@@ -54945,9 +54945,6 @@ function toFps(input2) {
|
|
|
54945
54945
|
function fpsToNumber(fps) {
|
|
54946
54946
|
return fps.num / fps.den;
|
|
54947
54947
|
}
|
|
54948
|
-
function outputFrameToTimelineSeconds(frameIndex, fps, renderStretch = 1) {
|
|
54949
|
-
return frameIndex * fps.den / fps.num * renderStretch;
|
|
54950
|
-
}
|
|
54951
54948
|
function fpsToFfmpegArg(fps) {
|
|
54952
54949
|
return fps.den === 1 ? String(fps.num) : `${fps.num}/${fps.den}`;
|
|
54953
54950
|
}
|
|
@@ -57195,7 +57192,7 @@ var RUNTIME_IIFE;
|
|
|
57195
57192
|
var init_runtime_inline = __esm({
|
|
57196
57193
|
"../core/dist/generated/runtime-inline.js"() {
|
|
57197
57194
|
"use strict";
|
|
57198
|
-
RUNTIME_IIFE = '"use strict";(()=>{var yu=Object.create;var hi=Object.defineProperty;var Su=Object.getOwnPropertyDescriptor;var Eu=Object.getOwnPropertyNames;var Au=Object.getPrototypeOf,wu=Object.prototype.hasOwnProperty;var Cu=(e,t,n)=>t in e?hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var _u=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Eu(t))!wu.call(e,r)&&r!==n&&hi(e,r,{get:()=>t[r],enumerable:!(i=Su(t,r))||i.enumerable});return e};var Fu=(e,t,n)=>(n=e!=null?yu(Au(e)):{},_u(t||!e||!e.__esModule?hi(n,"default",{value:e,enumerable:!0}):n,e));var me=(e,t,n)=>Cu(e,typeof t!="symbol"?t+"":t,n);var ps=Z((R0,Vi)=>{var J=String,ms=function(){return{isColorSupported:!1,reset:J,bold:J,dim:J,italic:J,underline:J,inverse:J,hidden:J,strikethrough:J,black:J,red:J,green:J,yellow:J,blue:J,magenta:J,cyan:J,white:J,gray:J,bgBlack:J,bgRed:J,bgGreen:J,bgYellow:J,bgBlue:J,bgMagenta:J,bgCyan:J,bgWhite:J,blackBright:J,redBright:J,greenBright:J,yellowBright:J,blueBright:J,magentaBright:J,cyanBright:J,whiteBright:J,bgBlackBright:J,bgRedBright:J,bgGreenBright:J,bgYellowBright:J,bgBlueBright:J,bgMagentaBright:J,bgCyanBright:J,bgWhiteBright:J}};Vi.exports=ms();Vi.exports.createColors=ms});var zi=Z(()=>{});var Nn=Z((D0,xs)=>{"use strict";var hs=ps(),gs=zi(),jt=class e extends Error{constructor(t,n,i,r,o,a){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),r&&(this.source=r),a&&(this.plugin=a),typeof n<"u"&&typeof i<"u"&&(typeof n=="number"?(this.line=n,this.column=i):(this.line=n.line,this.column=n.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=hs.isColorSupported);let i=f=>f,r=f=>f,o=f=>f;if(t){let{bold:f,gray:p,red:d}=hs.createColors(!0);r=x=>f(d(x)),i=x=>p(x),gs&&(o=x=>gs(x))}let a=n.split(/\\r?\\n/),c=Math.max(this.line-3,0),s=Math.min(this.line+2,a.length),l=String(s).length;return a.slice(c,s).map((f,p)=>{let d=c+1+p,x=" "+(" "+d).slice(-l)+" | ";if(d===this.line){if(f.length>160){let y=20,b=Math.max(0,this.column-y),A=Math.max(this.column+y,this.endColumn+y),_=f.slice(b,A),M=i(x.replace(/\\d/g," "))+f.slice(0,Math.min(this.column-1,y-1)).replace(/[^\\t]/g," ");return r(">")+i(x)+o(_)+`\n `+M+r("^")}let S=i(x.replace(/\\d/g," "))+f.slice(0,this.column-1).replace(/[^\\t]/g," ");return r(">")+i(x)+o(f)+`\n `+S+r("^")}return" "+i(x)+o(f)}).join(`\n`)}toString(){let t=this.showSourceCode();return t&&(t=`\n\n`+t+`\n`),this.name+": "+this.message+t}};xs.exports=jt;jt.default=jt});var ji=Z((I0,ys)=>{"use strict";var $c=/(<)(\\/?style\\b)/gi,qc=/(<)(!--)/g;function Xe(e){return typeof e!="string"||!e.includes("<")?e:e.replace($c,"\\\\3c $2").replace(qc,"\\\\3c $2")}var bs={after:`\n`,beforeClose:`\n`,beforeComment:`\n`,beforeDecl:`\n`,beforeOpen:" ",beforeRule:`\n`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Kc(e){return e[0].toUpperCase()+e.slice(1)}var $t=class{constructor(t){this.builder=t}atrule(t,n){let i=t.raws,r="@"+t.name,o=t.params?this.rawValue(t,"params"):"";if(typeof i.afterName<"u"?r+=i.afterName:o&&(r+=" "),t.nodes)this.block(t,r+o);else{let a=(i.between||"")+(n?";":"");this.builder(Xe(r+o+a),t)}}beforeAfter(t,n){let i;t.type==="decl"?i=this.raw(t,null,"beforeDecl"):t.type==="comment"?i=this.raw(t,null,"beforeComment"):n==="before"?i=this.raw(t,null,"beforeRule"):i=this.raw(t,null,"beforeClose");let r=t.parent,o=0;for(;r&&r.type!=="root";)o+=1,r=r.parent;if(i.includes(`\n`)){let a=this.raw(t,null,"indent");if(a.length)for(let c=0;c<o;c++)i+=a}return i}block(t,n){let i=this.raw(t,"between","beforeOpen");this.builder(Xe(n+i)+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(Xe(r)),this.builder("}",t,"end")}body(t){let n=t.nodes,i=n.length-1;for(;i>0&&n[i].type==="comment";)i-=1;let r=this.raw(t,"semicolon"),o=t.type==="document";for(let a=0;a<n.length;a++){let c=n[a],s=this.raw(c,"before");s&&this.builder(o?s:Xe(s)),this.stringify(c,i!==a||r)}}comment(t){let n=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(Xe("/*"+n+t.text+i+"*/"),t)}decl(t,n){let i=t.raws,r=this.raw(t,"between","colon"),o=t.prop+r+this.rawValue(t,"value");t.important&&(o+=i.important||" !important"),n&&(o+=";"),this.builder(Xe(o),t)}document(t){this.body(t)}raw(t,n,i){let r;if(i||(i=n),n&&(r=t.raws[n],typeof r<"u"))return r;let o=t.parent;if(i==="before"&&(!o||o.type==="root"&&o.first===t||o&&o.type==="document"))return"";if(!o)return bs[i];let a=t.root(),c=a.rawCache||(a.rawCache={});if(typeof c[i]<"u")return c[i];if(i==="before"||i==="after")return this.beforeAfter(t,i);{let s="raw"+Kc(i);this[s]?r=this[s](a,t):a.walk(l=>{if(r=l.raws[n],typeof r<"u")return!1})}return typeof r>"u"&&(r=bs[i]),c[i]=r,r}rawBeforeClose(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return n=i.raws.after,n.includes(`\n`)&&(n=n.replace(/[^\\n]+$/,"")),!1}),n&&(n=n.replace(/\\S/g,"")),n}rawBeforeComment(t,n){let i;return t.walkComments(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`\n`)&&(i=i.replace(/[^\\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeDecl"):i&&(i=i.replace(/\\S/g,"")),i}rawBeforeDecl(t,n){let i;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`\n`)&&(i=i.replace(/[^\\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeRule"):i&&(i=i.replace(/\\S/g,"")),i}rawBeforeOpen(t){let n;return t.walk(i=>{if(i.type!=="decl"&&(n=i.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&typeof i.raws.before<"u")return n=i.raws.before,n.includes(`\n`)&&(n=n.replace(/[^\\n]+$/,"")),!1}),n&&(n=n.replace(/\\S/g,"")),n}rawColon(t){let n;return t.walkDecls(i=>{if(typeof i.raws.between<"u")return n=i.raws.between.replace(/[^\\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length===0&&(n=i.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(i=>{let r=i.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof i.raws.before<"u"){let o=i.raws.before.split(`\n`);return n=o[o.length-1],n=n.replace(/\\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(n=i.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let i=t[n],r=t.raws[n];return r&&r.value===i?r.raw:i}root(t){if(this.body(t),t.raws.after){let n=t.raws.after,i=t.parent&&t.parent.type==="document";this.builder(i?n:Xe(n))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(Xe(t.raws.ownSemicolon),t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};ys.exports=$t;$t.default=$t});var qt=Z((P0,Ss)=>{"use strict";var Jc=ji();function $i(e,t){new Jc(t).stringify(e)}Ss.exports=$i;$i.default=$i});var Rn=Z((O0,qi)=>{"use strict";qi.exports.isClean=Symbol("isClean");qi.exports.my=Symbol("my")});var Yt=Z((B0,Es)=>{"use strict";var Yc=Nn(),Xc=ji(),Qc=qt(),{isClean:Kt,my:Zc}=Rn();function Ki(e,t){let n=new e.constructor;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i)||i==="proxyCache")continue;let r=e[i],o=typeof r;i==="parent"&&o==="object"?t&&(n[i]=t):i==="source"?n[i]=r:Array.isArray(r)?n[i]=r.map(a=>Ki(a,n)):(o==="object"&&r!==null&&(r=Ki(r)),n[i]=r)}return n}function je(e,t){if(t&&typeof t.offset<"u")return t.offset;let n=1,i=1,r=0;for(let o=0;o<e.length;o++){if(i===t.line&&n===t.column){r=o;break}e[o]===`\n`?(n=1,i+=1):n+=1}return r}var Jt=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Kt]=!1,this[Zc]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let i of t[n])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\\n\\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\\n\\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=Ki(this);for(let i in t)n[i]=t[i];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:i,start:r}=this.rangeBy(n);return this.source.input.error(t,{column:r.column,line:r.line},{column:i.column,line:i.line},n)}return new Yc(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,i){return t[n]===i||(t[n]=i,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markClean(){this[Kt]=!0}markDirty(){if(this[Kt]){this[Kt]=!1;let t=this;for(;t=t.parent;)t[Kt]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let n=this.source.start;if(t.index)n=this.positionInside(t.index);else if(t.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,o=i.slice(je(i,this.source.start),je(i,this.source.end)).indexOf(t.word);o!==-1&&(n=this.positionInside(o))}return n}positionInside(t){let n=this.source.start.column,i=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,o=je(r,this.source.start),a=o+t;for(let c=o;c<a;c++)r[c]===`\n`?(n=1,i+=1):n+=1;return{column:n,line:i,offset:a}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:je(n,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:je(n,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(t.word){let a=n.slice(je(n,this.source.start),je(n,this.source.end)).indexOf(t.word);a!==-1&&(i=this.positionInside(a),r=this.positionInside(a+t.word.length))}else t.start?i={column:t.start.column,line:t.start.line,offset:je(n,t.start)}:t.index&&(i=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line,offset:je(n,t.end)}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<i.line||r.line===i.line&&r.column<=i.column)&&(r={column:i.column+1,line:i.line,offset:i.offset+1}),{end:r,start:i}}raw(t,n){return new Xc().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,i=!1;for(let r of t)r===this?i=!0:i?(this.parent.insertAfter(n,r),n=r):this.parent.insertBefore(n,r);i||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let i={},r=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let c=this[a];if(Array.isArray(c))i[a]=c.map(s=>typeof s=="object"&&s.toJSON?s.toJSON(null,n):s);else if(typeof c=="object"&&c.toJSON)i[a]=c.toJSON(null,n);else if(a==="source"){if(c==null)continue;let s=n.get(c.input);s==null&&(s=o,n.set(c.input,o),o++),i[a]={end:c.end,inputId:s,start:c.start}}else i[a]=c}return r&&(i.inputs=[...n.keys()].map(a=>a.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Qc){t.stringify&&(t=t.stringify);let n="";return t(this,i=>{n+=i}),n}warn(t,n,i={}){let r={node:this};for(let o in i)r[o]=i[o];return t.warn(n,r)}};Es.exports=Jt;Jt.default=Jt});var Qt=Z((H0,As)=>{"use strict";var ed=Yt(),Xt=class extends ed{constructor(t){super(t),this.type="comment"}};As.exports=Xt;Xt.default=Xt});var en=Z((G0,ws)=>{"use strict";var td=Yt(),Zt=class extends td{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};ws.exports=Zt;Zt.default=Zt});var Qe=Z((U0,Ls)=>{"use strict";var Cs=Qt(),_s=en(),nd=Yt(),{isClean:Fs,my:Ts}=Rn(),Ji,vs,Ms,Yi;function Ns(e){return e.map(t=>(t.nodes&&(t.nodes=Ns(t.nodes)),delete t.source,t))}function Rs(e){if(e[Fs]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Rs(t)}var ke=class e extends nd{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let n of t){let i=this.normalize(n,this.last);for(let r of i)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),i,r;for(;this.indexes[n]<this.proxyOf.nodes.length&&(i=this.indexes[n],r=t(this.proxyOf.nodes[i],i),r!==!1);)this.indexes[n]+=1;return delete this.indexes[n],r}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...i)=>t[n](...i.map(r=>typeof r=="function"?(o,a)=>r(o.toProxy(),a):r)):n==="every"||n==="some"?i=>t[n]((r,...o)=>i(r.toProxy(),...o)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(i=>i.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,i){return t[n]===i||(t[n]=i,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let i=this.index(t),r=this.normalize(n,this.proxyOf.nodes[i]).reverse();i=this.index(t);for(let a of r)this.proxyOf.nodes.splice(i+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],i<o&&(this.indexes[a]=o+r.length);return this.markDirty(),this}insertBefore(t,n){let i=this.index(t),r=i===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[i],r).reverse();i=this.index(t);for(let c of o)this.proxyOf.nodes.splice(i,0,c);let a;for(let c in this.indexes)a=this.indexes[c],i<=a&&(this.indexes[c]=a+o.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=Ns(vs(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new _s(t)]}else if(t.selector||t.selectors)t=[new Yi(t)];else if(t.name)t=[new Ji(t)];else if(t.text)t=[new Cs(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[Ts]||e.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Fs]&&Rs(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let n of t){let i=this.normalize(n,this.first,"prepend").reverse();for(let r of i)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let i in this.indexes)n=this.indexes[i],n>=t&&(this.indexes[i]=n-1);return this.markDirty(),this}replaceValues(t,n,i){return i||(i=n,n={}),this.walkDecls(r=>{n.props&&!n.props.includes(r.prop)||n.fast&&!r.value.includes(n.fast)||(r.value=r.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,i)=>{let r;try{r=t(n,i)}catch(o){throw n.addToError(o)}return r!==!1&&n.walk&&(r=n.walk(t)),r})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="atrule"&&t.test(i.name))return n(i,r)}):this.walk((i,r)=>{if(i.type==="atrule"&&i.name===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="atrule")return n(i,r)}))}walkComments(t){return this.walk((n,i)=>{if(n.type==="comment")return t(n,i)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="decl"&&t.test(i.prop))return n(i,r)}):this.walk((i,r)=>{if(i.type==="decl"&&i.prop===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="decl")return n(i,r)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="rule"&&t.test(i.selector))return n(i,r)}):this.walk((i,r)=>{if(i.type==="rule"&&i.selector===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="rule")return n(i,r)}))}};ke.registerParse=e=>{vs=e};ke.registerRule=e=>{Yi=e};ke.registerAtRule=e=>{Ji=e};ke.registerRoot=e=>{Ms=e};Ls.exports=ke;ke.default=ke;ke.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Ji.prototype):e.type==="rule"?Object.setPrototypeOf(e,Yi.prototype):e.type==="decl"?Object.setPrototypeOf(e,_s.prototype):e.type==="comment"?Object.setPrototypeOf(e,Cs.prototype):e.type==="root"&&Object.setPrototypeOf(e,Ms.prototype),e[Ts]=!0,e.nodes&&e.nodes.forEach(t=>{ke.rebuild(t)})}});var Ln=Z((W0,Ds)=>{"use strict";var ks=Qe(),yt=class extends ks{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};Ds.exports=yt;yt.default=yt;ks.registerAtRule(yt)});var kn=Z((V0,Os)=>{"use strict";var id=Qe(),Is,Ps,ct=class extends id{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Is(new Ps,this,t).stringify()}};ct.registerLazyResult=e=>{Is=e};ct.registerProcessor=e=>{Ps=e};Os.exports=ct;ct.default=ct});var Hs=Z((z0,Bs)=>{var rd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",od=(e,t=21)=>(n=t)=>{let i="",r=n|0;for(;r--;)i+=e[Math.random()*e.length|0];return i},sd=(e=21)=>{let t="",n=e|0;for(;n--;)t+=rd[Math.random()*64|0];return t};Bs.exports={nanoid:sd,customAlphabet:od}});var Dn=Z(()=>{});var In=Z(()=>{});var Xi=Z(()=>{});var Gs=Z(()=>{});var Zi=Z((Z0,Vs)=>{"use strict";var{existsSync:ad,readFileSync:ld}=Gs(),{dirname:Qi,join:ud}=Dn(),{SourceMapConsumer:Us,SourceMapGenerator:Ws}=In();function cd(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var tn=class{constructor(t,n){if(n.map===!1)return;n.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=n.map?n.map.prev:void 0,r=this.loadMap(n.from,i);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Qi(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Us(this.json||this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\\/json;charset=utf-?8;base64,/,i=/^data:application\\/json;base64,/,r=/^data:application\\/json;charset=utf-?8,/,o=/^data:application\\/json,/,a=t.match(r)||t.match(o);if(a)return decodeURIComponent(t.substr(a[0].length));let c=t.match(n)||t.match(i);if(c)return cd(t.substr(c[0].length));let s=t.slice(22);throw s=s.slice(0,s.indexOf(",")),new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\\/\\*\\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\\/\\*\\s*# sourceMappingURL=/g);if(!n)return;let i=t.lastIndexOf(n.pop()),r=t.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,r)))}loadFile(t,n,i){if(!(!i&&!this.unsafeMap&&!/\\.map$/i.test(t))&&(this.root=Qi(t),ad(t)))return this.mapFile=t,ld(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let i=n(t);if(i){let r=this.loadFile(i,t,!0);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(n instanceof Us)return Ws.fromSourceMap(n).toString();if(n instanceof Ws)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;t&&(i=ud(Qi(t),i));let r=this.loadFile(i,t,!1);if(r)try{this.json=JSON.parse(r.replace(/^\\)]}\'[^\\n]*\\n/,""))}catch{return}return r}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};Vs.exports=tn;tn.default=tn});var nn=Z((eg,Ks)=>{"use strict";var{nanoid:dd}=Hs(),{isAbsolute:nr,resolve:ir}=Dn(),{SourceMapConsumer:fd,SourceMapGenerator:md}=In(),{fileURLToPath:zs,pathToFileURL:Pn}=Xi(),js=Nn(),pd=Zi(),er=zi(),tr=Symbol("lineToIndexCache"),hd=!!(fd&&md),$s=!!(ir&&nr);function qs(e){if(e[tr])return e[tr];let t=e.css.split(`\n`),n=new Array(t.length),i=0;for(let r=0,o=t.length;r<o;r++)n[r]=i,i+=t[r].length+1;return e[tr]=n,n}var St=class{get from(){return this.file||this.id}constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\\uFEFF"||this.css[0]==="\\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(!$s||/^\\w+:\\/\\//.test(n.from)||nr(n.from)?this.file=n.from:this.file=ir(n.from)),$s&&hd){let i=new pd(this.css,n);if(i.text){this.map=i;let r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+dd(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,i,r={}){let o,a,c,s,l;if(n&&typeof n=="object"){let p=n,d=i;if(typeof p.offset=="number"){s=p.offset;let x=this.fromOffset(s);n=x.line,i=x.col}else n=p.line,i=p.column,s=this.fromLineAndColumn(n,i);if(typeof d.offset=="number"){c=d.offset;let x=this.fromOffset(c);a=x.line,o=x.col}else a=d.line,o=d.column,c=this.fromLineAndColumn(d.line,d.column)}else if(i)s=this.fromLineAndColumn(n,i);else{s=n;let p=this.fromOffset(s);n=p.line,i=p.col}let f=this.origin(n,i,a,o);return f?l=new js(t,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,r.plugin):l=new js(t,a===void 0?n:{column:i,line:n},a===void 0?i:{column:o,line:a},this.css,this.file,r.plugin),l.input={column:i,endColumn:o,endLine:a,endOffset:c,line:n,offset:s,source:this.css},this.file&&(Pn&&(l.input.url=Pn(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,n){return qs(this)[t-1]+n-1}fromOffset(t){let n=qs(this),i=n[n.length-1],r=0;if(t>=i)r=n.length-1;else{let o=n.length-2,a;for(;r<o;)if(a=r+(o-r>>1),t<n[a])o=a-1;else if(t>=n[a+1])r=a+1;else{r=a;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\\w+:\\/\\//.test(t)?t:ir(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,i,r){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:t});if(!a.source)return!1;let c;typeof i=="number"&&(c=o.originalPositionFor({column:r,line:i}));let s;nr(a.source)?s=Pn(a.source):s=new URL(a.source,this.map.consumer().sourceRoot||Pn(this.map.mapFile));let l={column:a.column,endColumn:c&&c.column,endLine:c&&c.line,line:a.line,url:s.toString()};if(s.protocol==="file:")if(zs)l.file=zs(s);else throw new Error("file: protocol is not available in this PostCSS build");let f=o.sourceContentFor(a.source);return f&&(l.source=f),l}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};Ks.exports=St;St.default=St;er&&er.registerInput&&er.registerInput(St)});var Et=Z((tg,Qs)=>{"use strict";var Js=Qe(),Ys,Xs,Ze=class extends Js{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,i){let r=super.normalize(t);if(n){if(i==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of r)o.raws.before=n.raws.before}return r}removeChild(t,n){let i=this.index(t);return!n&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new Ys(new Xs,this,t).stringify()}};Ze.registerLazyResult=e=>{Ys=e};Ze.registerProcessor=e=>{Xs=e};Qs.exports=Ze;Ze.default=Ze;Js.registerRoot(Ze)});var rr=Z((ng,Zs)=>{"use strict";var rn={comma(e){return rn.split(e,[","],!0)},space(e){let t=[" ",`\n`," "];return rn.split(e,t)},split(e,t,n){let i=[],r="",o=!1,a=0,c=!1,s="",l=!1;for(let f of e)l?l=!1:f==="\\\\"?l=!0:c?f===s&&(c=!1):f===\'"\'||f==="\'"?(c=!0,s=f):f==="("?a+=1:f===")"?a>0&&(a-=1):a===0&&t.includes(f)&&(o=!0),o?(r!==""&&i.push(r.trim()),r="",o=!1):r+=f;return(n||r!=="")&&i.push(r.trim()),i}};Zs.exports=rn;rn.default=rn});var On=Z((ig,ta)=>{"use strict";var ea=Qe(),gd=rr(),At=class extends ea{get selectors(){return gd.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\\s*/):null,i=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};ta.exports=At;At.default=At;ea.registerRule(At)});var ia=Z((rg,na)=>{"use strict";var xd=Ln(),bd=Qt(),yd=en(),Sd=nn(),Ed=Zi(),Ad=Et(),wd=On();function on(e,t){if(Array.isArray(e))return e.map(r=>on(r));let{inputs:n,...i}=e;if(n){t=[];for(let r of n){let o={...r,__proto__:Sd.prototype};o.map&&(o.map={...o.map,__proto__:Ed.prototype}),t.push(o)}}if(i.nodes&&(i.nodes=e.nodes.map(r=>on(r,t))),i.source){let{inputId:r,...o}=i.source;i.source=o,r!=null&&(i.source.input=t[r])}if(i.type==="root")return new Ad(i);if(i.type==="decl")return new yd(i);if(i.type==="rule")return new wd(i);if(i.type==="comment")return new bd(i);if(i.type==="atrule")return new xd(i);throw new Error("Unknown node type: "+e.type)}na.exports=on;on.default=on});var sr=Z((og,ua)=>{"use strict";var{dirname:Bn,relative:oa,resolve:sa,sep:aa}=Dn(),{SourceMapConsumer:la,SourceMapGenerator:Hn}=In(),{pathToFileURL:ra}=Xi(),Cd=nn(),_d=!!(la&&Hn),Fd=!!(Bn&&sa&&oa&&aa),or=class{constructor(t,n,i,r){this.stringify=t,this.mapOpts=i.map||{},this.root=n,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`\n`;this.css.includes(`\\r\n`)&&(n=`\\r\n`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),i=t.root||Bn(t.file),r;this.mapOpts.sourcesContent===!1?(r=new la(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else if(this.css){let t;for(;(t=this.css.lastIndexOf("/*#"))!==-1;){let n=this.css.indexOf("*/",t+3);if(n===-1)break;for(;t>0&&this.css[t-1]===`\n`;)t--;this.css=this.css.slice(0,t)+this.css.slice(n+2)}}}}generate(){if(this.clearAnnotation(),Fd&&_d&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Hn.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Hn({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Hn({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,i="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(c,s,l)=>{if(this.css+=c,s&&l!=="end"&&(r.generated.line=t,r.generated.column=n-1,s.source&&s.source.start?(r.source=this.sourcePath(s),r.original.line=s.source.start.line,r.original.column=s.source.start.column-1,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,this.map.addMapping(r))),a=c.match(/\\n/g),a?(t+=a.length,o=c.lastIndexOf(`\n`),n=c.length-o):n+=c.length,s&&l!=="start"){let f=s.parent||{raws:{}};(!(s.type==="decl"||s.type==="atrule"&&!s.nodes)||s!==f.last||f.raws.semicolon)&&(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=t,r.generated.column=n-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\\w+:\\/\\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let i=this.opts.to?Bn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=Bn(sa(i,this.mapOpts.annotation)));let r=oa(i,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new Cd(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let i=n.source.input.from;if(i&&!t[i]){t[i]=!0;let r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(ra){let i=ra(t).toString();return this.memoizedFileURLs.set(t,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;aa==="\\\\"&&(t=t.replace(/\\\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}};ua.exports=or});var fa=Z((sg,da)=>{"use strict";var Gn=/[\\t\\n\\f\\r "#\'()/;[\\\\\\]{}]/g,Un=/[\\t\\n\\f\\r !"#\'():;@[\\\\\\]{}]|\\/(?=\\*)/g,Td=/.[\\r\\n"\'(/\\\\]/,ca=/[\\da-f]/i;da.exports=function(t,n={}){let i=t.css.valueOf(),r=n.ignoreErrors,o,a,c,s,l,f,p,d,x,S,y=i.length,b=0,A=[],_=[],M=-1;function G(){return b}function D(F){throw t.error("Unclosed "+F,b)}function v(){return _.length===0&&b>=y}function w(F){if(_.length)return _.pop();if(b>=y)return;let R=F?F.ignoreUnclosed:!1;switch(o=i.charCodeAt(b),o){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,o=i.charCodeAt(s);while(o===32||o===10||o===9||o===13||o===12);f=["space",i.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let L=String.fromCharCode(o);f=[L,L,b];break}case 40:{if(S=A.length?A.pop()[1]:"",x=i.charCodeAt(b+1),S==="url"&&x!==39&&x!==34&&x!==32&&x!==10&&x!==9&&x!==12&&x!==13){s=b;do{if(p=!1,s=i.indexOf(")",s+1),s===-1)if(r||R){s=b;break}else D("bracket");for(d=s;i.charCodeAt(d-1)===92;)d-=1,p=!p}while(p);f=["brackets",i.slice(b,s+1),b,s],b=s}else b<=M?f=["(","(",b]:(s=i.indexOf(")",b+1),a=i.slice(b,s+1),s===-1||Td.test(a)?(M=s===-1?y:s,f=["(","(",b]):(f=["brackets",a,b,s],b=s));break}case 39:case 34:{l=o===39?"\'":\'"\',s=b;do{if(p=!1,s=i.indexOf(l,s+1),s===-1)if(r||R){s=b+1;break}else D("string");for(d=s;i.charCodeAt(d-1)===92;)d-=1,p=!p}while(p);f=["string",i.slice(b,s+1),b,s],b=s;break}case 64:{Gn.lastIndex=b+1,Gn.test(i),Gn.lastIndex===0?s=i.length-1:s=Gn.lastIndex-2,f=["at-word",i.slice(b,s+1),b,s],b=s;break}case 92:{for(s=b,c=!0;i.charCodeAt(s+1)===92;)s+=1,c=!c;if(o=i.charCodeAt(s+1),c&&o!==47&&o!==32&&o!==10&&o!==9&&o!==13&&o!==12&&(s+=1,ca.test(i.charAt(s)))){for(;ca.test(i.charAt(s+1));)s+=1;i.charCodeAt(s+1)===32&&(s+=1)}f=["word",i.slice(b,s+1),b,s],b=s;break}default:{o===47&&i.charCodeAt(b+1)===42?(s=i.indexOf("*/",b+2)+1,s===0&&(r||R?s=i.length:D("comment")),f=["comment",i.slice(b,s+1),b,s],b=s):(Un.lastIndex=b+1,Un.test(i),Un.lastIndex===0?s=i.length-1:s=Un.lastIndex-2,f=["word",i.slice(b,s+1),b,s],A.push(f),b=s);break}}return b++,f}function C(F){_.push(F)}return{back:C,endOfFile:v,nextToken:w,position:G}}});var ga=Z((ag,ha)=>{"use strict";var vd=Ln(),Md=Qt(),Nd=en(),Rd=Et(),ma=On(),Ld=fa(),pa={empty:!0,space:!0};function kd(e){for(let t=e.length-1;t>=0;t--){let n=e[t],i=n[3]||n[2];if(i)return i}}var ar=class{constructor(t){this.input=t,this.root=new Rd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new vd;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let i,r,o,a=!1,c=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),i=t[0],i==="("||i==="["?l.push(i==="("?")":"]"):i==="{"&&l.length>0?l.push("}"):i===l[l.length-1]&&l.pop(),l.length===0)if(i===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){c=!0;break}else if(i==="}"){if(s.length>0){for(o=s.length-1,r=s[o];r&&r[0]==="space";)r=s[--o];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(t);break}else s.push(t);else s.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(n.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(n,"params",s),a&&(t=s[s.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),c&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let i=0,r;for(let o=n-1;o>=0&&(r=t[o],!(r[0]!=="space"&&(i+=1,i===2)));o--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let n=0,i,r,o;for(let[a,c]of t.entries()){if(r=c,o=r[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return a}i=r}return!1}comment(t){let n=new Md;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let i=t[1].slice(2,-2);if(!i.trim())n.text="",n.raws.left=i,n.raws.right="";else{let r=i.match(/^(\\s*)([^]*\\S)(\\s*)$/);n.text=r[2],n.raws.left=r[1],n.raws.right=r[3]}}createTokenizer(){this.tokenizer=Ld(this.input)}decl(t,n){let i=new Nd;this.init(i,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(r[3]||r[2]||kd(t)),i.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){let l=t[0][0];if(l===":"||l==="space"||l==="comment")break;i.prop+=t.shift()[1]}i.raws.between="";let o;for(;t.length;)if(o=t.shift(),o[0]===":"){i.raws.between+=o[1];break}else o[0]==="word"&&/\\w/.test(o[1])&&this.unknownWord([o]),i.raws.between+=o[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let a=[],c;for(;t.length&&(c=t[0][0],!(c!=="space"&&c!=="comment"));)a.push(t.shift());this.precheckMissedSemicolon(t);for(let l=t.length-1;l>=0;l--){if(o=t[l],o[1].toLowerCase()==="!important"){i.important=!0;let f=this.stringFrom(t,l);f=this.spacesFromEnd(t)+f,f!==" !important"&&(i.raws.important=f);break}else if(o[1].toLowerCase()==="important"){let f=t.slice(0),p="";for(let d=l;d>0;d--){let x=f[d][0];if(p.trim().startsWith("!")&&x!=="space")break;p=f.pop()[1]+p}p.trim().startsWith("!")&&(i.important=!0,i.raws.important=p,t=f)}if(o[0]!=="space"&&o[0]!=="comment")break}t.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(i.raws.between+=a.map(l=>l[1]).join(""),a=[]),this.raw(i,"value",a.concat(t),n),i.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new ma;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(t[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,i=null,r=!1,o=null,a=[],c=t[1].startsWith("--"),s=[],l=t;for(;l;){if(i=l[0],s.push(l),i==="("||i==="[")o||(o=l),a.push(i==="("?")":"]");else if(c&&r&&i==="{")o||(o=l),a.push("}");else if(a.length===0)if(i===";")if(r){this.decl(s,c);return}else break;else if(i==="{"){this.rule(s);return}else if(i==="}"){this.tokenizer.back(s.pop()),n=!0;break}else i===":"&&(r=!0);else i===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&r){if(!c)for(;s.length&&(l=s[s.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(s.pop());this.decl(s,c)}else this.unknownWord(s)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,i,r){let o,a,c=i.length,s="",l=!0,f,p;for(let d=0;d<c;d+=1)o=i[d],a=o[0],a==="space"&&d===c-1&&!r?l=!1:a==="comment"?(p=i[d-1]?i[d-1][0]:"empty",f=i[d+1]?i[d+1][0]:"empty",!pa[p]&&!pa[f]?s.slice(-1)===","?l=!1:s+=o[1]:l=!1):s+=o[1];if(!l){let d=i.reduce((x,S)=>x+S[1],"");t.raws[n]={raw:d,value:s}}t[n]=s}rule(t){t.pop();let n=new ma;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,i="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let n,i="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)i+=t.shift()[1];return i}spacesFromEnd(t){let n,i="";for(;t.length&&(n=t[t.length-1][0],n==="space");)i=t.pop()[1]+i;return i}stringFrom(t,n){let i="";for(let r=n;r<t.length;r++)i+=t[r][1];return t.splice(n,t.length-n),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};ha.exports=ar});var Vn=Z((lg,xa)=>{"use strict";var Dd=Qe(),Id=nn(),Pd=ga();function Wn(e,t){let n=new Id(e,t),i=new Pd(n);try{i.parse()}catch(r){throw r}return i.root}xa.exports=Wn;Wn.default=Wn;Dd.registerParse(Wn)});var lr=Z((ug,ba)=>{"use strict";var sn=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};ba.exports=sn;sn.default=sn});var zn=Z((cg,ya)=>{"use strict";var Od=lr(),an=class{get content(){return this.css}constructor(t,n,i){this.processor=t,this.messages=[],this.root=n,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let i=new Od(t,n);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>t.type==="warning")}};ya.exports=an;an.default=an});var ur=Z((dg,Ea)=>{"use strict";var Sa={};Ea.exports=function(t){Sa[t]||(Sa[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var fr=Z((mg,_a)=>{"use strict";var Bd=Qe(),Hd=kn(),Gd=sr(),Ud=Vn(),Aa=zn(),Wd=Et(),Vd=qt(),{isClean:He,my:zd}=Rn(),fg=ur(),jd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},$d={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},qd={Once:!0,postcssPlugin:!0,prepare:!0},wt=0;function ln(e){return typeof e=="object"&&typeof e.then=="function"}function Ca(e){let t=!1,n=jd[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,wt,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,wt,n+"Exit"]:[n,n+"Exit"]}function wa(e){let t;return e.type==="document"?t=["Document",wt,"DocumentExit"]:e.type==="root"?t=["Root",wt,"RootExit"]:t=Ca(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function cr(e){return e[He]=!1,e.nodes&&e.nodes.forEach(t=>cr(t)),e}var dr={},et=class e{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(t,n,i){this.stringified=!1,this.processed=!1;let r;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))r=cr(n);else if(n instanceof e||n instanceof Aa)r=cr(n.root),n.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=n.map);else{let o=Ud;i.syntax&&(o=i.syntax.parse),i.parser&&(o=i.parser),o.parse&&(o=o.parse);try{r=o(n,i)}catch(a){this.processed=!0,this.error=a}r&&!r[zd]&&Bd.rebuild(r)}this.result=new Aa(t,r,i),this.helpers={...dr,postcss:dr,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let i=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=i.postcssPlugin,t.setMessage()):i.postcssVersion}catch(r){console&&console.error&&console.error(r)}return t}prepareVisitors(){this.listeners={};let t=(n,i,r)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([n,r])};for(let n of this.plugins)if(typeof n=="object")for(let i in n){if(!$d[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qd[i])if(typeof n[i]=="object")for(let r in n[i])r==="*"?t(n,i,n[i][r]):t(n,i+"-"+r.toLowerCase(),n[i][r]);else typeof n[i]=="function"&&t(n,i,n[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],i=this.runOnRoot(n);if(ln(i))try{await i}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[He];){t[He]=!0;let n=[wa(t)];for(;n.length>0;){let i=this.visitTick(n);if(ln(i))try{await i}catch(r){let o=n[n.length-1].node;throw this.handleError(r,o)}}}if(this.listeners.OnceExit)for(let[n,i]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let r=t.nodes.map(o=>i(o,this.helpers));await Promise.all(r)}else await i(t,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(i=>t.Once(i,this.helpers));return ln(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=Vd;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let i=this.result.root.source;if(t.map===void 0&&!(i&&i.input&&i.input.map)){let a="";return n(this.result.root,c=>{a+=c}),this.result.css=a,this.result}let o=new Gd(n,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(ln(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[He];)t[He]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[i,r]of t){this.result.lastPlugin=i;let o;try{o=r(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ln(o))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:i,visitors:r}=n;if(i.type!=="root"&&i.type!=="document"&&!i.parent){t.pop();return}if(r.length>0&&n.visitorIndex<r.length){let[a,c]=r[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===r.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return c(i.toProxy(),this.helpers)}catch(s){throw this.handleError(s,i)}}if(n.iterator!==0){let a=n.iterator,c;for(;c=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!c[He]){c[He]=!0,t.push(wa(c));return}n.iterator=0,delete i.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===wt){i.nodes&&i.nodes.length&&(i[He]=!0,n.iterator=i.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[He]=!0;let n=Ca(t);for(let i of n)if(i===wt)t.nodes&&t.each(r=>{r[He]||this.walkSync(r)});else{let r=this.listeners[i];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}};et.registerPostcss=e=>{dr=e};_a.exports=et;et.default=et;Wd.registerLazyResult(et);Hd.registerLazyResult(et)});var Ta=Z((hg,Fa)=>{"use strict";var Kd=sr(),Jd=Vn(),Yd=zn(),Xd=qt(),pg=ur(),un=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=Jd;try{t=n(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,i){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=i,this._map=void 0;let r=Xd;this.result=new Yd(this._processor,void 0,this._opts),this.result.css=n;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Kd(r,void 0,this._opts,n);if(a.isMap()){let[c,s]=a.generate();c&&(this.result.css=c),s&&(this.result.map=s)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}};Fa.exports=un;un.default=un});var Ma=Z((gg,va)=>{"use strict";var Qd=kn(),Zd=fr(),ef=Ta(),tf=Et(),dt=class{constructor(t=[]){this.version="8.5.14",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let i of t)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)n.push(i);else if(typeof i=="function")n.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new ef(this,t,n):new Zd(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};va.exports=dt;dt.default=dt;tf.registerProcessor(dt);Qd.registerProcessor(dt)});var Oa=Z((xg,Pa)=>{"use strict";var Na=Ln(),Ra=Qt(),nf=Qe(),rf=Nn(),La=en(),ka=kn(),of=ia(),sf=nn(),af=fr(),lf=rr(),uf=Yt(),cf=Vn(),mr=Ma(),df=zn(),Da=Et(),Ia=On(),ff=qt(),mf=lr();function se(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new mr(e)}se.plugin=function(t,n){let i=!1;function r(...a){console&&console.warn&&!i&&(i=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \\u91CC\\u9762 postcss.plugin \\u88AB\\u5F03\\u7528. \\u8FC1\\u79FB\\u6307\\u5357:\nhttps://www.w3ctech.com/topic/2226`));let c=n(...a);return c.postcssPlugin=t,c.postcssVersion=new mr().version,c}let o;return Object.defineProperty(r,"postcss",{get(){return o||(o=r()),o}}),r.process=function(a,c,s){return se([r(s)]).process(a,c)},r};se.stringify=ff;se.parse=cf;se.fromJSON=of;se.list=lf;se.comment=e=>new Ra(e);se.atRule=e=>new Na(e);se.decl=e=>new La(e);se.rule=e=>new Ia(e);se.root=e=>new Da(e);se.document=e=>new ka(e);se.CssSyntaxError=rf;se.Declaration=La;se.Container=nf;se.Processor=mr;se.Document=ka;se.Comment=Ra;se.Warning=mf;se.AtRule=Na;se.Result=df;se.Input=sf;se.Rule=Ia;se.Root=Da;se.Node=uf;af.registerPostcss(se);Pa.exports=se;se.default=se});function yn(){return globalThis}function T(e,t){if(typeof window>"u")return;let n=yn(),i=n.__hf?.onSwallowed;if(i)try{i({label:e,error:t})}catch(r){}(n.__hfDebug||n.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${e} swallowed:`,t)}var Tu=["seconds-time","rational-fps","seek-keep-playing","composition-manifest-v1"];function vu(e,t){let n=Math.abs(e),i=Math.abs(t);for(;i!==0;){let r=n%i;n=i,i=r}return n||1}function Mu(e){let t=Number.isFinite(e)&&e>0?e:30,n=Number.isInteger(t)?1:1e6,i=Math.round(t*n),r=vu(i,n);return{numerator:i/r,denominator:n/r}}function gi(e){if(typeof e!="object"||e===null)return null;let t=e;return!Number.isFinite(t.numerator)||!Number.isFinite(t.denominator)||(t.numerator??0)<=0||(t.denominator??0)<=0?null:Number(t.numerator)/Number(t.denominator)}function Sn(e){return{protocolVersion:1,capabilities:Tu,fps:Mu(e)}}function Nu(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function lo(e,t=30){if(typeof e!="object"||e===null)return{status:"legacy",fps:t};let n=e;if(n.protocolVersion===void 0)return{status:"legacy",fps:t};if(n.protocolVersion!==1)return{status:"unsupported",code:"unsupported_protocol_version",receivedVersion:n.protocolVersion};let i=gi(n.fps);return i===null||!Nu(n.capabilities)?{status:"unsupported",code:"invalid_protocol_metadata",receivedVersion:n.protocolVersion}:{status:"supported",fps:i,metadata:n}}var uo=30;function co(e){uo=Number.isFinite(e)&&e>0?e:30}function he(e){try{window.parent.postMessage({...e,...Sn(uo)},"*")}catch(t){T("bridge.postMessage",t)}}var Ru={play:(e,t)=>t.onPlay(),pause:(e,t)=>t.onPause(),"stop-media":(e,t)=>t.onStopMedia(),seek:(e,t)=>t.onSeek(Lu(e,t),e.seekMode??"commit"),tick:(e,t)=>t.onTick(),"set-muted":(e,t)=>t.onSetMuted(!!e.muted),"set-volume":(e,t)=>t.onSetVolume(Math.max(0,Math.min(1,Number(e.volume??1)))),"set-media-output-muted":(e,t)=>t.onSetMediaOutputMuted(!!e.muted),"set-native-media-sync-disabled":(e,t)=>t.onSetNativeMediaSyncDisabled(!!e.disabled),"set-web-audio-media-disabled":(e,t)=>t.onSetWebAudioMediaDisabled(!!e.disabled),"set-playback-rate":(e,t)=>t.onSetPlaybackRate(Number(e.playbackRate??1)),"set-root-duration":(e,t)=>t.onSetRootDuration(Number(e.durationSeconds??0)),"set-color-grading":(e,t)=>t.onSetColorGrading(e.target??null,e.grading??null),"set-color-grading-compare":(e,t)=>t.onSetColorGradingCompare(e.target??null,e.compare??null),"enable-pick-mode":(e,t)=>t.onEnablePickMode(),"disable-pick-mode":(e,t)=>t.onDisablePickMode(),"flash-elements":e=>Du(e)};function Lu(e,t){let n=Number(e.timeSeconds);if(Number.isFinite(n))return Math.max(0,n);let r=gi(e.fps)??t.getCanonicalFps();return Math.max(0,Number(e.frame??0))/r}function ku(e){let t=lo(e);return t.status!=="unsupported"?!1:(he({source:"hf-preview",type:"diagnostic",code:`runtime.protocol.${t.code}`,details:{receivedVersion:typeof t.receivedVersion=="string"||typeof t.receivedVersion=="number"?t.receivedVersion:null}}),!0)}function Du(e){let t=e.selectors,n=e.duration||800;t&&Iu(t,n)}function fo(e){let t=n=>{let i=n.data;if(!i||i.source!=="hf-parent"||i.type!=="control"||ku(i))return;let r=i.action;if(typeof r!="string")return;let o=Ru[r];o&&o(i,e)};return window.addEventListener("message",t),he({source:"hf-preview",type:"ready"}),t}function Iu(e,t){if(!document.getElementById("__hf-flash-styles")){let n=document.createElement("style");n.id="__hf-flash-styles",n.textContent=`\n .__hf-flash {\n outline: 2px solid rgba(59, 130, 246, 0.6) !important;\n outline-offset: 2px !important;\n animation: __hf-flash-pulse ${t}ms ease-out forwards !important;\n }\n @keyframes __hf-flash-pulse {\n 0% { outline-color: rgba(59, 130, 246, 0.8); }\n 100% { outline-color: transparent; }\n }\n `,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(r=>{r.classList.add("__hf-flash"),setTimeout(()=>r.classList.remove("__hf-flash"),t)})}catch(i){T("bridge.flashElements.querySelector",i)}}var xi=null;function mo(e){xi=e}function Je(e,t){if(xi)try{xi({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch(n){T("runtime.analytics.site1",n)}}function Pu(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-"),n=0,i=t.length;for(;n<i&&t[n]==="-";)n++;for(;i>n&&t[i-1]==="-";)i--;let r=t.slice(n,i);return r.length>0?r:"node"}function pt(e){return`--${Pu(e)}`}function po(e){let t=new Map;for(let n of e){let i=pt(n),r=t.get(i);r?r.includes(n)||r.push(n):t.set(i,[n])}return[...t.values()].filter(n=>n.length>1)}function ho(){if(typeof document>"u")return{};let e=new Set;document.documentElement?.hasAttribute("data-composition-variables")&&e.add(document.documentElement);for(let i of Array.from(document.querySelectorAll("[data-composition-variables]")))e.add(i);let t={};for(let i of e)Object.assign(t,It(i));let n=An();return{...t,...n}}function It(e){if(!e)return{};let t=e.getAttribute("data-composition-variables");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}if(!Array.isArray(n))return{};let i={};for(let r of n){if(!r||typeof r!="object")continue;let o=r;typeof o.id!="string"||!("default"in o)||(i[o.id]=o.default)}return i}var bi="data-hf-css-vars";function En(e){return"style"in e&&typeof e.style?.setProperty=="function"}function yi(e,t){if(!En(e))return;let n=[];for(let[i,r]of Object.entries(t))if(typeof r=="string"&&r!==""||typeof r=="number"){let o=pt(i);e.style.setProperty(o,String(r)),n.push(o)}n.length>0&&e.setAttribute(bi,n.join(" "))}function go(e,t,n){let i={};for(let[r,o]of Object.entries(t)){let a=pt(r);((En(e)?e.style.getPropertyValue(a):"")||(n?n.getComputedStyle(e).getPropertyValue(a):"")).trim()===""&&(i[r]=o)}return i}function xo(e){if(!En(e))return;let t=e.getAttribute(bi);if(t){for(let n of t.split(" "))n.startsWith("--")&&e.style.removeProperty(n);e.removeAttribute(bi)}}function bo(e){let t=new Set;e.documentElement?.hasAttribute("data-composition-variables")&&t.add(e.documentElement);for(let r of Array.from(e.querySelectorAll("[data-composition-variables]")))t.add(r);let n=An(),i=[];for(let r of t)i.push(...Ou(r,n,e.defaultView));for(let r of po(i))console.warn(`composition variables ${r.join(", ")} collapse to the same CSS property ${pt(r[0]??"")} \\u2014 rename one to avoid cross-talk`)}function Ou(e,t,n){if(!En(e))return[];let i=It(e),r={};for(let[o,a]of Object.entries(i)){if(o in t)continue;let c=pt(o);(e.style.getPropertyValue(c)||(n?n.getComputedStyle(e).getPropertyValue(c):"")).trim()===""&&(r[o]=a)}for(let[o,a]of Object.entries(t))o in i&&(r[o]=a);return yi(e,r),Object.keys(i)}function yo(e){let t=e.getAttribute("data-variable-values");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}return!n||typeof n!="object"||Array.isArray(n)?{}:n}function An(){if(typeof window>"u")return{};let e=window.__hfVariables;return!e||typeof e!="object"||Array.isArray(e)?{}:e}function So(e){let t=[],n=l=>{if(typeof l.getAnimations!="function")return[];try{return l.getAnimations()}catch{return[]}},i=l=>e?.resolveStartSeconds?e.resolveStartSeconds(l):Number.parseFloat(l.getAttribute("data-start")??"0")||0,r=(l,f)=>{let p=null;try{p=l.effect?.getComputedTiming?.()??null}catch(x){T("runtime.adapters.css.site5",x)}if(!p)return{};let d=Number(p.endTime);return Number.isFinite(d)?{endSeconds:f+d/1e3}:{unbounded:!0}},o=(l,f)=>{for(let p of l){try{p.currentTime=f}catch(d){T("runtime.adapters.css.site1",d)}try{p.pause()}catch(d){T("runtime.adapters.css.site2",d)}}},a=l=>{for(let f of l)try{f.play()}catch(p){T("runtime.adapters.css.site3",p)}},c=l=>{for(let f of l)try{f.pause()}catch(p){T("runtime.adapters.css.site4",p)}},s=l=>{l.baseDelay?l.el.style.animationDelay=l.baseDelay:l.el.style.removeProperty("animation-delay"),l.basePlayState?l.el.style.animationPlayState=l.basePlayState:l.el.style.removeProperty("animation-play-state")};return{name:"css",discover:()=>{t=[];let l=document.querySelectorAll("*");for(let f of l){if(!(f instanceof HTMLElement))continue;let p=window.getComputedStyle(f);!p.animationName||p.animationName==="none"||t.push({el:f,baseDelay:f.style.animationDelay||"",basePlayState:f.style.animationPlayState||"",animations:n(f)})}},getInferredDurationSeconds:()=>{let l=0;for(let f of t){if(!f.el.isConnected)continue;let p=i(f.el);for(let d of n(f.el)){let x=r(d,p);x.endSeconds!=null&&(l=Math.max(l,x.endSeconds))}}return l>0?l:null},seek:l=>{let f=Number(l.time)||0;for(let p of t){if(!p.el.isConnected)continue;let d=i(p.el),x=Math.max(0,f-d)*1e3,S=p.animations;if(S.length>0){o(S,x);continue}p.el.style.animationPlayState="paused",p.el.style.animationDelay=`-${(x/1e3).toFixed(3)}s`}},pause:()=>{for(let l of t){if(!l.el.isConnected)continue;let f=l.animations;f.length>0&&c(f),s(l)}},play:()=>{for(let l of t)l.el.isConnected&&(s(l),a(l.animations))},revert:()=>{t=[]}}}function Eo(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let i=Math.max(0,Number(t.time)||0),r=t.suppressEvents===!0;typeof n.totalTime=="function"?(n.totalTime(i+.001,!0),n.totalTime(i,r)):n.seek(i,r)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function Ao(){return{name:"animejs",discover:()=>{try{let e=window.anime;if(!e||typeof e.running>"u")return;let t=e.running;if(!Array.isArray(t)||t.length===0)return;let n=window.__hfAnime??[],i=new Set(n);for(let r of t)i.has(r)||n.push(r);window.__hfAnime=n}catch(e){T("runtime.adapters.animejs.site1",e)}},seek:e=>{let t=Math.max(0,(Number(e.time)||0)*1e3),n=window.__hfAnime;if(!(!n||n.length===0))for(let i of n)try{typeof i.seek=="function"&&i.seek(t)}catch(r){T("runtime.adapters.animejs.site2",r)}},pause:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.pause=="function"&&t.pause()}catch(n){T("runtime.adapters.animejs.site3",n)}},play:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.play=="function"&&t.play()}catch(n){T("runtime.adapters.animejs.site4",n)}},revert:()=>{}}}function Co(){return{name:"lottie",discover:()=>{try{let e=window.lottie;if(e&&typeof e.getRegisteredAnimations=="function"){let t=e.getRegisteredAnimations();if(Array.isArray(t)&&t.length>0){let n=window.__hfLottie??[],i=new Set(n);for(let r of t)i.has(r)||n.push(r);window.__hfLottie=n}}}catch(e){T("runtime.adapters.lottie.site1",e)}},seek:e=>{let t=Math.max(0,Number(e.time)||0),n=window.__hfLottie;if(!(!n||n.length===0))for(let i of n)try{if(Si(i))i.goToAndStop(t*1e3,!1);else if(Ei(i)){if(typeof i.setCurrentRawFrameValue=="function"){let r=i.totalFrames??0,o=i.frameRate??30,a=t*o;r>0&&i.setCurrentRawFrameValue(Math.min(a,r-1))}else if(typeof i.seek=="function"){let r=i.duration??1,o=Math.min(100,t/r*100);i.seek(o)}}}catch(r){T("runtime.adapters.lottie.site2",r)}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(Si(t)||Ei(t))&&t.pause()}catch(n){T("runtime.adapters.lottie.site3",n)}},revert:()=>{},getInferredDurationSeconds:()=>{let e=window.__hfLottie;if(!e||e.length===0)return null;let t=0,n=!1;for(let i of e){let r=null;try{r=Bu(i)}catch(o){T("runtime.adapters.lottie.site4",o)}r!=null&&(n=!0,t=Math.max(t,r))}return n?t:null}}}function wo(e,t){return!Number.isFinite(e)||!e||e<=0||!Number.isFinite(t)||!t||t<=0?null:e/t}function Bu(e){return Si(e)?wo(e.totalFrames,e.frameRate):Ei(e)?Number.isFinite(e.duration)&&(e.duration??0)>0?e.duration??null:wo(e.totalFrames,e.frameRate):null}function Si(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function Ei(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}var Ai=-1;function wn(e){if(e!==Ai){Ai=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch(t){T("runtime.adapters.seek-dispatch.site1",t)}}}function _o(e){Ai=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch(t){T("runtime.adapters.seek-dispatch.force",t)}}function Fo(){let e=null,t=0,n=null,i=null,r=null,o=null,a=()=>{if(typeof window>"u")return null;let f=window.THREE?.DefaultLoadingManager;return!f||typeof f!="object"||typeof f.itemsLoaded!="number"||typeof f.itemsTotal!="number"?null:f},c=l=>{o||l.itemsTotal<=l.itemsLoaded||(o=new Promise(f=>{l.onLoad=function(){try{r?.call(this)}finally{o=null,l.onLoad=r??null,f()}}}))},s=l=>{n!==l&&(n=l,i=l.onStart??null,r=l.onLoad??null,l.onStart=function(f,p,d){try{i?.call(this,f,p,d)}finally{c(l)}})};return{name:"three",discover:()=>{let l=a();l&&(s(l),c(l))},seek:l=>{e=Math.max(0,Number(l.time)||0),t=e,window.__hfThreeTime=e,wn(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0},getReadyPromise:()=>{let l=a();return!l||l.itemsTotal<=l.itemsLoaded?null:(o||c(l),o)}}}function Oe(e){let t=null,n=new WeakSet;return{name:e.name,discover:()=>{},seek:()=>{},pause:()=>{},play:()=>{},revert:()=>{},getReadyPromise:()=>{let i=e.getInstances();if(i.length===0)return null;let r=i.filter(o=>!n.has(o));return r.length===0?null:t||(t=Promise.allSettled(r.map(o=>e.waitFor(o).then(()=>{n.add(o)}))).then(()=>{t=null}),t)}}}function To(){return Oe({name:"mapbox",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMapbox;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function vo(){return Oe({name:"leaflet",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfLeaflet;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>e.whenReady(t))})}function Mo(){return Oe({name:"google-maps",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfGoogleMaps;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{let n=e.addListener("tilesloaded",()=>{n.remove(),t()})})})}function No(){return Oe({name:"maplibre",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMaplibre;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function Ro(){return Oe({name:"d3",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfD3;return Array.isArray(e)?e:[]},waitFor:e=>e.end()})}function Lo(){let e=null,t=0;return{name:"typegpu",discover:()=>{},seek:n=>{e=Math.max(0,Number(n.time)||0),t=e,window.__hfTypegpuTime=e,wn(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0}}}function ko(e){let t=e.nextElementSibling;if(t instanceof HTMLImageElement&&t.classList.contains("__render_frame__")&&t.complete&&t.naturalWidth>0)return t;if(e.id){let n=document.getElementById(`__render_frame_${e.id}__`);if(n instanceof HTMLImageElement&&n.complete&&n.naturalWidth>0)return n}return null}function Do(){let e=globalThis.GPUQueue;if(!e?.prototype?.copyExternalImageToTexture)return;let t=e.prototype.copyExternalImageToTexture;e.prototype.copyExternalImageToTexture=function(n,i,r){if(n?.source instanceof HTMLVideoElement){let o=ko(n.source);if(o)return t.call(this,{...n,source:o},i,r)}return t.call(this,n,i,r)}}function Io(){let e=[globalThis.WebGL2RenderingContext,globalThis.WebGLRenderingContext],t=["texImage2D","texSubImage2D"];for(let n of e){let i=n?.prototype;if(i)for(let r of t){let o=i[r];if(typeof o!="function"||o.__hfVideoPatched)continue;let a=function(...c){let s=c.length-1,l=c[s];if(l instanceof HTMLVideoElement){let f=ko(l);f&&(c[s]=f)}return o.apply(this,c)};a.__hfVideoPatched=!0,i[r]=a}}}function Po(){let e=!1,t=0,n=!1,i,r,o,a=new Set,c=new WeakMap,s=()=>{if(!document.getAnimations)return[];try{return document.getAnimations()}catch{return[]}},l=b=>{let A=Number(b.currentTime);return Number.isFinite(A)&&A>0?A:0},f=(b,A)=>A<=0?b:b>=A?Math.max(0,b-A):b,p=(b,A)=>{let _=c.get(b);if(_)return _;let M={compositionTimeMs:A,animationTimeMs:e?f(l(b),A):l(b)};return c.set(b,M),M},d=(b,A)=>{if(!a.has(b)){a.add(b);let _=()=>{a.delete(b)};try{b.addEventListener("finish",_,{once:!0}),b.addEventListener("cancel",_,{once:!0})}catch(M){T("runtime.adapters.waapi.site4",M)}}p(b,A)},x=(b,A)=>{for(let _ of b)d(_,A)},S=()=>{if(n||typeof Element>"u")return;let b=Element.prototype;if(typeof b.animate!="function"||b.__hfOriginalAnimate)return;let A=b.animate;try{Object.defineProperty(b,"__hfOriginalAnimate",{value:A,configurable:!0});let _=function(...M){let G=A.apply(this,M);return d(G,t),G};b.animate=_,i=b,r=A,o=_,n=!0}catch{}},y=b=>{let A=null;try{A=b.effect?.getComputedTiming?.()??null}catch(G){T("runtime.adapters.waapi.site4",G)}if(!A)return{};let _=Number(A.endTime);return Number.isFinite(_)?{endSeconds:(c.get(b)?.compositionTimeMs??0)/1e3+_/1e3}:{unbounded:!0}};return{name:"waapi",discover:()=>{e=!0,S(),x(s(),t)},seek:b=>{let A=Math.max(0,(Number(b.time)||0)*1e3);t=A,(!e||a.size>0)&&x(s(),e?A:0);for(let _ of a){let M=e?p(_,A):p(_,0),G=M.animationTimeMs+Math.max(0,A-M.compositionTimeMs);try{_.currentTime=G}catch(D){T("runtime.adapters.waapi.site1",D)}try{_.pause()}catch(D){T("runtime.adapters.waapi.site2",D)}}},pause:()=>{e||x(s(),t);for(let b of a)try{b.pause()}catch(A){T("runtime.adapters.waapi.site3",A)}},revert:()=>{if(a.clear(),c=new WeakMap,e=!1,t=0,i&&r&&o&&i.animate===o)try{i.animate=r,i.__hfOriginalAnimate===r&&delete i.__hfOriginalAnimate}catch(b){T("runtime.adapters.waapi.site5",b)}i=void 0,r=void 0,o=void 0,n=!1},getInferredDurationSeconds:()=>{let b=0;for(let A of s()){let _=y(A);_.endSeconds!=null&&(b=Math.max(b,_.endSeconds))}return b>0?b:null}}}function Oo(e,t){if(e.length===0)return 1;let n=0;for(;n<e.length-2&&t>=e[n+1].time;)n+=1;let i=e[n],r=e[n+1]??i,o=r.time-i.time,a=o<=0?0:Math.min(1,Math.max(0,(t-i.time)/o));return i.volume+(r.volume-i.volume)*a}function Hu(e,t,n,i){let r=Number.parseFloat(e.dataset.start??"0")||0,o=Number.parseFloat(e.dataset.end??""),a=Number.parseFloat(e.dataset.duration??""),c=Number.isFinite(o)&&o>r?o:Number.isFinite(a)&&a>0?r+a:n,s=Number.parseFloat(e.dataset.volume??""),l=Number.isFinite(s)?Math.max(0,Math.min(1,s)):1;e.volume=l;let f=1/Math.min(60,Math.max(1,i)),p=Math.max(0,r),d=Math.min(n,c),x=[];for(let y=p;y<=d+1e-6;y+=f){let b=Math.min(d,y);t(b);let A=Number(e.volume);if(!Number.isFinite(A))continue;let _=Math.max(0,Math.min(1,A)),M=x.at(-1);if((!M||Math.abs(M.volume-_)>1e-4||b===d)&&x.push({time:Number(b.toFixed(6)),volume:Number(_.toFixed(6))}),b===d)break}return x.some(y=>Math.abs(y.volume-l)>1e-4)?x:null}function Bo(e,t,n,i){if(!t||!(e instanceof HTMLAudioElement)&&!(e instanceof HTMLVideoElement)||n<=0)return;let r=c=>{try{typeof t.totalTime=="function"?t.totalTime(c,!0):typeof t.seek=="function"&&t.seek(c,!0)}catch{}},o=typeof t.totalTime=="function"?Number(t.totalTime()):typeof t.seek=="function"?Number(t.seek()):0,a=Hu(e,r,n,60);Number.isFinite(o)&&r(o),a&&i.set(e,a)}function Ho(e){return Number.isFinite(e)&&e>0?Math.max(.1,Math.min(5,e)):1}function Be(e){let t=Number.parseFloat(e.getAttribute("data-playback-rate")??""),n=Number.isFinite(t)&&t>0?t:e instanceof HTMLMediaElement?e.defaultPlaybackRate:1;return Ho(n)}function gt(e){let t=Number.parseFloat(e.getAttribute("data-playback-start")??e.getAttribute("data-media-start")??"");return Number.isFinite(t)&&t>=0?t:0}function Go(e){let t=e.isVideo?e.explicitDuration??e.sourceDuration:e.sourceDuration,n=(e.isVideo?[t,e.hostRemaining]:[t,e.hostRemaining,e.explicitDuration]).filter(i=>i!=null&&Number.isFinite(i)&&i>0);return n.length>0?Math.min(...n):null}function Uo(e){let t=Array.from(document.querySelectorAll("video, audio")),n=e?.shouldIncludeElement?t.filter(a=>e.shouldIncludeElement?.(a)):t.filter(a=>a.hasAttribute("data-start")),i=[],r=[],o=0;for(let a of n){let c=e?.resolveStartSeconds?e.resolveStartSeconds(a):Number.parseFloat(a.dataset.start??"0");if(!Number.isFinite(c))continue;let s=Number.parseFloat(a.dataset.playbackStart??a.dataset.mediaStart??"0")||0,l=Be(a),f=a.loop,p=Number.isFinite(a.duration)&&a.duration>0?a.duration:null,d=e?.resolveDurationSeconds?.(a)??Number.parseFloat(a.dataset.duration??"");(!Number.isFinite(d)||d<=0)&&p!=null&&(d=Math.max(0,(p-s)/l));let x=Number.isFinite(d)&&d>0?c+d:Number.POSITIVE_INFINITY,S=Number.parseFloat(a.dataset.volume??""),y={el:a,start:c,mediaStart:s,duration:Number.isFinite(d)&&d>0?d:Number.POSITIVE_INFINITY,end:x,volume:Number.isFinite(S)?S:null,playbackRate:l,loop:f,sourceDuration:p};i.push(y),a.tagName==="VIDEO"&&r.push(y),Number.isFinite(x)&&(o=Math.max(o,x))}return{timedMediaEls:n,mediaClips:i,videoClips:r,maxMediaEnd:o}}var wi=new WeakMap,Ot=new WeakMap,Ci=new WeakSet,ht=new WeakSet;function Gu(e){if(ht.has(e))return;ht.add(e);let t=()=>ht.delete(e);e.addEventListener("playing",t,{once:!0}),e.addEventListener("pause",t,{once:!0}),e.addEventListener("error",t,{once:!0})}var Uu=3;function Wu(e){return e.error!=null||e.networkState===Uu}var _i=new WeakMap;function Pt(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):1}function Fi(e){wi.delete(e),Ot.delete(e),Ci.delete(e),_i.delete(e)}function Wo(e){let t=!!(e.outputMuted||e.userMuted);for(let n of e.clips){let{el:i}=n;if(!i.isConnected)continue;let r=(e.timeSeconds-n.start)*n.playbackRate+n.mediaStart,o=i.tagName==="VIDEO"&&!n.loop,a=o&&n.sourceDuration!=null&&r>=n.sourceDuration&&e.timeSeconds>=n.start&&e.timeSeconds<n.end;a&&n.sourceDuration!=null&&(r=n.sourceDuration);let c=o&&n.sourceDuration!=null&&r>=n.mediaStart&&r<n.sourceDuration;if(e.timeSeconds>=n.start&&e.timeSeconds<n.end&&r>=0&&(!i.ended||n.loop||a||c)){if(n.loop&&n.sourceDuration!=null&&n.sourceDuration>0){let P=n.sourceDuration-n.mediaStart;P>0&&r>=n.sourceDuration&&(r=n.mediaStart+(r-n.mediaStart)%P)}let l=Pt(e.userVolume??1),f=Pt(n.volume??1),p=_i.get(i),d=Pt(i.volume),x;n.volumeKeyframes&&n.volumeKeyframes.length>0?x=Pt(Oo(n.volumeKeyframes,r)):p===void 0||Math.abs(d-p)>1e-4?x=d:x=f;let S=Pt(x*l);i.volume=S,_i.set(i,S),e.onElementVolume?.(i,S),(t||e.isWebAudioOwned?.(i))&&(i.muted=!0),i.preload!=="auto"&&(i.preload="auto");try{i.playbackRate=n.playbackRate*e.playbackRate}catch(P){T("runtime.media.site1",P)}let y=.04,b=2,A=i.currentTime||0,_=Math.abs(A-r),M=r-A,G=wi.get(i);wi.set(i,M);let D=G===void 0,v=!D&&Math.abs(M-G)>.5,w=_>3,C=a&&_>.001||i.ended&&c&&_>.001||_>.5&&(D||v||w),F=i.tagName==="VIDEO"&&!i.paused,R=G!==void 0&&Math.abs(M-G)<.004,L=!1;if(!F&&!C&&!D&&R&&_>y){let P=(Ot.get(i)??0)+1;Ot.set(i,P),P>=b&&(L=!0,Ot.set(i,0))}else _<=y&&Ot.set(i,0);let z=!F&&e.forceSync&&_>.02;if(C||L||z){if(!(i.tagName==="VIDEO"&&i.id&&!!document.getElementById(`__render_frame_${i.id}__`))){try{i.currentTime=r}catch(X){T("runtime.media.site2",X)}if(Math.abs(i.currentTime-r)>.5&&!Ci.has(i)){Ci.add(i),i.load();try{i.currentTime=r}catch(X){T("runtime.media.site3",X)}}}ht.delete(i)}a?i.paused||i.pause():e.playing&&i.paused&&!ht.has(i)&&!Wu(i)?(Gu(i),i.play().catch(P=>{ht.delete(i),(P&&typeof P=="object"&&"name"in P?String(P.name??""):"")==="NotAllowedError"&&e.onAutoplayBlocked?.()})):!e.playing&&!i.paused&&i.pause();continue}Fi(i),i.paused||i.pause()}}var Vu="hf-proxy",Vo="runtime_media_proxy_fallback",zo="runtime_media_proxy_unavailable",Bt=new WeakSet,jo=new WeakSet;function Cn(e){return e.currentSrc||e.src}function Ti(e){return window.__HF_EXPORT_RENDER_SEEK_CONFIG?!0:e instanceof HTMLVideoElement&&!!e.id&&!!document.getElementById(`__render_frame_${e.id}__`)}function vi(e){let t=Cn(e);if(!t)return null;let n;try{n=new URL(t,document.baseURI)}catch{return null}if(n.origin!==window.location.origin)return null;try{return decodeURIComponent(n.pathname)}catch{return n.pathname}}function zu(e,t){let n=null;for(let i of Object.keys(t))e.endsWith(i)&&(n===null||i.length>n.length)&&(n=i);return n?t[n]??null:null}function ju(e,t){let n=e.normalize("NFC").toLowerCase(),i=-1,r=null,o=!1;for(let[a,c]of Object.entries(t)){let s=a.normalize("NFC").toLowerCase();n.endsWith(s)&&(s.length>i?(i=s.length,r=c,o=!1):s.length===i&&(o=!0))}return o?null:r}function Mi(e,t){return t[e]??zu(e,t)??ju(e,t)}function $u(e,t){let n=new URL(e,document.baseURI);return n.searchParams.set(Vu,t?t.hasAlpha?"vp8":"h264":"auto"),n.href}var qu={cross_origin:"video reports zero decodable width but its source is cross-origin; no local proxy can be served for it",proxy_playback_failed:"the authoring proxy itself failed to decode; render output is unaffected",browser_safe_codec:"the file errored but its codec is browser-decodable; a proxy cannot help (the file itself is likely corrupt)",invalid_source_url:"the media source URL is malformed and cannot be proxied"};function lt(e,t,n){if(jo.has(e))return;jo.add(e);let i=qu[t];he({source:"hf-preview",type:"diagnostic",code:zo,details:{asset:n,codecName:null,reason:t,note:i}}),console.info(`[hyperframes] ${zo}: "${n}" (${t}): ${i}`)}function Ni(e,t=null,n="reactive"){if(Bt.has(e))return;let i=Cn(e),r;try{r=$u(i,t)}catch(c){T("runtime.mediaProxy.swap",c),lt(e,"invalid_source_url",i);return}Bt.add(e),Fi(e),e.src=r,e.load();let o=t?.codecName??null;he({source:"hf-preview",type:"diagnostic",code:Vo,details:{asset:i,codecName:o,trigger:n,note:"render output is unaffected; only this preview element was swapped to an authoring proxy"}}),console.info(`[hyperframes] ${Vo}: "${i}" uses a codec (${o??"unknown"}) this browser can\'t decode; auto-swapped to an authoring proxy for this preview only. Render output is unaffected.`)}function $o(e){if(Ti(e)||!(e instanceof HTMLVideoElement)||Bt.has(e))return;let t=window.__HF_MEDIA_CODEC_MAP__;if(!t)return;let n=vi(e);if(n===null)return;let i=Mi(n,t);if(!i||!i.browserHostile)return;let r=i.representativeMime?e.canPlayType(i.representativeMime):"";r==="probably"||r==="maybe"||Ni(e,i,"proactive")}function qo(e){if(Ti(e)||!(e instanceof HTMLVideoElement)||e.videoWidth!==0)return;let t=Cn(e);if(Bt.has(e)){lt(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let i=vi(e);if(i===null){lt(e,"cross_origin",t);return}let r=Mi(i,n);if(r&&!r.browserHostile){lt(e,"browser_safe_codec",t);return}Ni(e,r,"reactive")}function Ko(e){if(Ti(e)||!(e instanceof HTMLVideoElement))return;let t=Cn(e);if(Bt.has(e)){lt(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let i=vi(e);if(i===null){lt(e,"cross_origin",t);return}let r=Mi(i,n);if(r&&!r.browserHostile){lt(e,"browser_safe_codec",t);return}Ni(e,r,"tertiary")}var Ve="data-color-grading",Ht="data-hf-color-grading-source-hidden",vn="data-hf-authored-opacity",Jo="__hf_color_grading_",Ku="rec709",_n={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},Fn={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},Tn={blur:0,pixelate:0},Yo=Object.keys(_n),Ju=Object.keys(Fn),Xo=Object.keys(Tn);function be(e,t,n={},i={}){return{id:e,label:t,adjust:{..._n,...n},details:{...Fn,...i},effects:{...Tn}}}var Yu=[be("neutral","Neutral"),be("natural-lift","Natural Lift",{exposure:.04,contrast:.06,highlights:-.06,shadows:.08,saturation:.05}),be("fresh-pop","Fresh Pop",{exposure:.08,contrast:.12,whites:.06,shadows:.04,temperature:-.02,vibrance:.08,saturation:.16}),be("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),be("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),be("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),be("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),be("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),be("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),be("vintage-wash","Vintage Wash",{exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},{vignette:.18}),be("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),be("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),be("warm-clean","Warm Clean",{exposure:.05,contrast:.08,highlights:-.08,shadows:.08,temperature:.16,vibrance:.04,saturation:.06}),be("cool-clean","Cool Clean",{contrast:.06,highlights:-.06,shadows:.06,temperature:-.12,tint:.04,saturation:.04}),be("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),be("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),be("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06})],Xu=new Map(Yu.map(e=>[e.id,e])),Qu=/^\\$(?:\\{([A-Za-z0-9_.:-]+)\\}|([A-Za-z0-9_.:-]+))$/,Zu={exposure:{min:-2,max:2},contrast:{min:-1,max:1},highlights:{min:-1,max:1},shadows:{min:-1,max:1},whites:{min:-1,max:1},blacks:{min:-1,max:1},temperature:{min:-1,max:1},tint:{min:-1,max:1},vibrance:{min:-1,max:1},saturation:{min:-1,max:1}},ec={vignette:{min:0,max:1},vignetteMidpoint:{min:0,max:1},vignetteRoundness:{min:-1,max:1},vignetteFeather:{min:0,max:1},grain:{min:0,max:1},grainSize:{min:0,max:1},grainRoughness:{min:0,max:1}},tc={blur:{min:0,max:1},pixelate:{min:0,max:1}};function ut(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function nc(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):0}function Qo(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function Ri(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?nc(n,t.min,t.max):0}function ic(e){if(e==null)return null;let t=String(e).trim();return t||null}function rc(e){if(e==null)return null;if(typeof e=="string"){let n=e.trim();return n?{src:n,intensity:1}:null}if(!ut(e))return null;let t=e.src;return typeof t!="string"||t.trim()===""?null:{src:t.trim(),intensity:Qo(e.intensity,1)}}function oc(e){if(typeof e=="string"){let t=e.trim();if(!t)return null;if(t.startsWith("{"))try{let n=JSON.parse(t);return ut(n)?n:null}catch{return null}return{preset:t,intensity:1}}return ut(e)?e:null}function sc(e,t){let n=e.trim().match(Qu);if(!n)return e;let i=n[1]??n[2]??"";return i&&Object.hasOwn(t,i)?t[i]:e}function Li(e,t){if(typeof e=="string"){let i=sc(e,t);if(i!==e)return i;let r=e.trim();if(!r.startsWith("{"))return e;try{return Li(JSON.parse(r),t)}catch{return e}}if(!ut(e))return e;let n={};for(let[i,r]of Object.entries(e))n[i]=Li(r,t);return n}function ac(e){return e?Xu.get(e)??null:null}function ki(e){let t=oc(e);if(!t||t.enabled===!1)return null;let n=ic(t.preset),i=ac(n),r=i?.adjust??_n,o=i?.details??Fn,a=i?.effects??Tn,c=ut(t.adjust)?t.adjust:{},s=ut(t.details)?t.details:{},l=ut(t.effects)?t.effects:{},f=Yo.reduce((x,S)=>(x[S]=Ri(c[S]??r[S],Zu[S]),x),{..._n}),p=Ju.reduce((x,S)=>(x[S]=Ri(s[S]??o[S],ec[S]),x),{...Fn}),d=Xo.reduce((x,S)=>(x[S]=Ri(l[S]??a[S],tc[S]),x),{...Tn});return{enabled:!0,preset:n,intensity:Qo(t.intensity,1),adjust:f,details:p,effects:d,lut:rc(t.lut),colorSpace:typeof t.colorSpace=="string"&&t.colorSpace.trim()?t.colorSpace.trim():Ku}}function Zo(e,t){return ki(Li(e,t))}function Gt(e){return!e?.enabled||e.intensity===0?!1:e.lut&&e.lut.intensity!==0?!0:Yo.some(t=>Math.abs(e.adjust[t])>1e-4)||Math.abs(e.details.vignette)>1e-4||Math.abs(e.details.grain)>1e-4||Xo.some(t=>Math.abs(e.effects[t])>1e-4)}var lc=["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-no-inspect]","[data-no-pick]","[data-hyper-shader-loading]"].join(","),uc=["[data-hyperframes-picker-block]","[data-hyper-shader-loading]"].join(",");function es(e){let t=!1,n=null,i=null,r=null,o=null;function a(w,C){try{window.dispatchEvent(new CustomEvent(w,{detail:C}))}catch(F){T("runtime.picker.site1",F)}}function c(w){r=w,a("hyperframe:picker:hovered",{elementInfo:r,isPickMode:t,timestamp:Date.now()})}function s(w){o=w,a("hyperframe:picker:selected",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function l(w){let C=w.ownerDocument.defaultView;if(!C)return!1;let F=w;for(;F&&F!==document.body&&F!==document.documentElement;){let R=C.getComputedStyle(F);if(R.display==="none"||R.visibility==="hidden"||R.pointerEvents==="none")return!0;let L=Number.parseFloat(R.opacity);if(Number.isFinite(L)&&L<=.01&&!F.hasAttribute(Ht))return!0;F=F.parentElement}return!1}function f(w){if(!w||w===document.body||w===document.documentElement)return!1;let C=w.tagName.toLowerCase();return!(C==="script"||C==="style"||C==="link"||C==="meta"||w.classList.contains("__hf-pick-highlight")||w.closest(lc)||l(w))}function p(w){return!!w?.closest(uc)}function d(w){let C=w;if(C.id)return`#${CSS.escape(C.id)}`;let F=w.getAttribute("data-composition-id");if(F)return`[data-composition-id="${CSS.escape(F)}"]`;let R=w.getAttribute("data-composition-src");if(R)return`[data-composition-src="${CSS.escape(R)}"]`;let L=w.getAttribute("data-track-index");if(L)return`[data-track-index="${CSS.escape(L)}"]`;let z=w.tagName.toLowerCase(),P=w.parentElement;if(!P)return z;let X=P.querySelectorAll(`:scope > ${z}`);if(X.length===1)return z;for(let I=0;I<X.length;I+=1)if(X[I]===w)return`${z}:nth-of-type(${I+1})`;return z}function x(w){let C=w.tagName.toLowerCase(),F=(w.textContent??"").trim().replace(/\\s+/g," "),R=(L,z)=>L.length>z?`${L.slice(0,z-1)}\\u2026`:L;return C==="h1"||C==="h2"||C==="h3"?"Heading":C==="p"||C==="span"||C==="div"?F.length>0?R(F,56):"Text":C==="img"?"Image":C==="video"?"Video":C==="audio"?"Audio":C==="svg"?"Shape":w.getAttribute("data-composition-src")?"Composition":C==="section"?"Section":`${C.charAt(0).toUpperCase()}${C.slice(1)}`}function S(w,C,F){let R=typeof F=="number"&&F>0?F:8,L=[];if(document.elementsFromPoint)L=document.elementsFromPoint(w,C);else if(document.elementFromPoint){let X=document.elementFromPoint(w,C);L=X?[X]:[]}if(p(L[0]??null))return[];let z={},P=[];for(let[X,I]of L.entries()){if(!f(I))continue;let ie=`${I.tagName}::${I.id||""}::${X}`;if(!z[ie]&&(z[ie]=!0,P.push(I),P.length>=R))break}return P}function y(w){let C=w.getBoundingClientRect(),F={};for(let L of Array.from(w.attributes))L.name.startsWith("data-")&&(F[L.name]=L.value);return{id:w.id||null,tagName:w.tagName.toLowerCase(),selector:d(w),label:x(w),boundingBox:{x:C.left,y:C.top,width:C.width,height:C.height},textContent:w.textContent?w.textContent.trim().slice(0,200):null,src:w.getAttribute("src")||w.getAttribute("data-composition-src")||null,dataAttributes:F}}function b(w,C,F){return S(w,C,F).map(y)}function A(w){if(!t)return;let F=S(w.clientX,w.clientY,1)[0]??(w.target instanceof Element?w.target:null);if(!f(F)||n===F)return;n&&n.classList.remove("__hf-pick-highlight"),n=F,F.classList.add("__hf-pick-highlight");let R=y(F);c(R),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:R})}function _(w){if(!t)return;w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation();let C=b(w.clientX,w.clientY,8);C.length!==0&&(c(C[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:C,selectedIndex:0,point:{x:w.clientX,y:w.clientY}}))}function M(w){w.key==="Escape"&&(D(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function G(){t||(t=!0,i=document.createElement("style"),i.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`\n`),document.head.appendChild(i),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",A,!0),document.addEventListener("click",_,!0),document.addEventListener("keydown",M,!0),a("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function D(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),i&&(i.remove(),i=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",A,!0),document.removeEventListener("click",_,!0),document.removeEventListener("keydown",M,!0),a("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function v(){window.__HF_PICKER_API={enable:G,disable:D,isActive:()=>t,getHovered:()=>r,getSelected:()=>o,getCandidatesAtPoint:(w,C,F)=>Number.isFinite(w)&&Number.isFinite(C)?b(w,C,F):[],pickAtPoint:(w,C,F)=>{if(!Number.isFinite(w)||!Number.isFinite(C))return null;let R=b(w,C,8);if(!R.length)return null;let L=Math.max(0,Math.min(R.length-1,Number(F??0))),z=R[L]??null;return z?(s(z),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:z}),D(),z):null},pickManyAtPoint:(w,C,F)=>{if(!Number.isFinite(w)||!Number.isFinite(C))return[];let R=b(w,C,8);if(!R.length)return[];let L=[],z=Array.isArray(F)?F:[0];for(let P of z){let X=Math.max(0,Math.min(R.length-1,Math.floor(Number(P)))),I=R[X];if(!I)continue;L.some(Fe=>Fe.selector===I.selector&&Fe.tagName===I.tagName)||L.push(I)}return L.length?(s(L[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:L}),D(),L):[]}},a("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:G,disablePickMode:D,installPickerApi:v}}var cc=["width","height","top","left","right","bottom","inset","object-fit","object-position","z-index","opacity","visibility","filter","mix-blend-mode","backdrop-filter","border-radius","overflow","clip-path","mask","mask-image","mask-size","mask-position","mask-repeat","transform","transform-origin","translate","rotate","scale","box-sizing"];function xt(e,t){let n=Number.isFinite(t)&&t>0?t:30,i=Number.isFinite(e)&&e>0?e:0;return Math.floor(i*n+1e-9)/n}function ts(e,t,n=cc){for(let i of n){let r=t.getPropertyValue(i);r&&e.setProperty(i,r)}}function Ut(e,t,n){let i=e?.[t];return typeof i=="function"?Number(i.call(e))||n:typeof i=="number"&&Number.isFinite(i)?i:(i!=null&&T("runtime.player.nonConformantNum",{prop:t,actual:typeof i}),n)}function Le(e,t){let n=e?.[t];if(typeof n=="function"){n.call(e);return}n!==void 0&&T("runtime.player.nonConformantVoid",{method:t,actual:typeof n})}function Wt(e,t,n){if(e){for(let i of Object.values(e))if(!(!i||i===t))try{n(i)}catch(r){T("runtime.player.site1",r)}}}function ns(e,t,n,i){let r=xt(t,n),o=i?.suppressEvents===!0;return Le(e,"pause"),typeof e.totalTime=="function"?e.totalTime(r,o):typeof e.seek=="function"&&e.seek(r,o),r}function dc(e,t,n,i,r){let o=[];Wt(e,t,a=>{Le(a,"play"),o.push(a)});try{return ns(t,n,i,r)}finally{for(let a of o)try{Le(a,"pause")}catch(c){T("runtime.player.site2",c)}}}function fc(e,t){Wt(e,t,n=>{Le(n,"play")})}function is(e){let t=e.transport;return t?{_timeline:null,play:()=>t.play(),pause:()=>t.pause(),seek:(n,i)=>t.seek(n,i),renderSeek:(n,i)=>t.renderSeek(n,i),getTime:()=>t.getTime(),getDuration:()=>t.getDuration(),isPlaying:()=>t.isPlaying(),setPlaybackRate:n=>t.setPlaybackRate(n),getPlaybackRate:()=>t.getPlaybackRate()}:{_timeline:null,play:()=>{let n=e.getTimeline();if(!n||e.getIsPlaying())return;let i=Math.max(0,Number(e.getSafeDuration?.()??Ut(n,"duration",0))||0);i>0&&Math.max(0,Ut(n,"time",0))>=i&&(Le(n,"pause"),typeof n.seek=="function"&&n.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof n.timeScale=="function"&&n.timeScale(e.getPlaybackRate()),Le(n,"play"),Wt(e.getTimelineRegistry?.(),n,r=>{typeof r.timeScale=="function"&&r.timeScale(e.getPlaybackRate()),Le(r,"play")}),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let n=e.getTimeline();if(!n)return;Le(n,"pause"),Wt(e.getTimelineRegistry?.(),n,r=>{Le(r,"pause")});let i=Math.max(0,Ut(n,"time",0));e.onDeterministicSeek(i),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(i,!1),e.onRenderFrameSeek(i),e.onStatePost(!0)},seek:(n,i)=>{let r=e.getTimeline();if(!r)return;let o=Math.max(0,Number(n)||0),a=e.getIsPlaying(),c=dc(e.getTimelineRegistry?.(),r,o,e.getCanonicalFps());e.onDeterministicSeek(c),i?.keepPlaying&&a?(typeof r.timeScale=="function"&&r.timeScale(e.getPlaybackRate()),Le(r,"play"),Wt(e.getTimelineRegistry?.(),r,s=>{typeof s.timeScale=="function"&&s.timeScale(e.getPlaybackRate()),Le(s,"play")}),e.onDeterministicPlay(),e.onShowNativeVideos(),e.onSyncMedia(c,!0)):(e.setIsPlaying(!1),e.onSyncMedia(c,!1)),e.onRenderFrameSeek(c),e.onStatePost(!0)},renderSeek:(n,i)=>{let r=e.getTimeline(),o=e.getCanonicalFps(),a=r?(fc(e.getTimelineRegistry?.(),r),ns(r,n,o,i)):xt(Math.max(0,Number(n)||0),o);e.onDeterministicSeek(a,i),e.setIsPlaying(!1),e.onSyncMedia(a,!1),e.onRenderFrameSeek(a),e.onStatePost(!0)},getTime:()=>Ut(e.getTimeline(),"time",0),getDuration:()=>Ut(e.getTimeline(),"duration",0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:n=>e.setPlaybackRate(n),getPlaybackRate:()=>e.getPlaybackRate()}}function rs(){return{capturedTimeline:null,isPlaying:!1,currentTime:0,deterministicAdapters:[],canonicalFps:30,bridgeMuted:!1,bridgeVolume:1,mediaOutputMuted:!1,nativeMediaSyncDisabled:!1,webAudioMediaDisabled:!1,mediaAutoplayBlockedPosted:!1,mediaForceSyncNextTick:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,controlBridgeHandler:null,beforeUnloadHandler:null,injectedCompStyles:[],injectedCompScripts:[],injectedCompLinks:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,transportClock:null,transportRafId:null}}var mc=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function Ii(e){return e.id||e.getAttribute("data-hf-id")||null}function Di(e){if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}function pc(e,t){let n=e.getAttribute("data-composition-id");if(!n)return null;let i=Number(t[n]?.duration?.());return Number.isFinite(i)&&i>0?i:null}function hc(e){if(!(e instanceof HTMLMediaElement)||!Number.isFinite(e.duration))return null;let t=Di(e.getAttribute("data-playback-start"))??Di(e.getAttribute("data-media-start"))??0;return e.duration>t?e.duration-t:null}function gc(e,t,n,i){let r=Di(e.getAttribute("data-duration"));return r!=null&&r>0?r:pc(e,t)??hc(e)??Math.max(0,n-i)}function xc(e){for(let[t,n]of e){let i=t.parentElement;for(;i;){let r=e.get(i);if(r){n.parentId=r.id,r.children.push(n);break}i=i.parentElement}}}function os(e){let{startResolver:t,timelineRegistry:n,rootDuration:i}=e,r=new Map,o=document.querySelector("[data-composition-id]"),a=0;for(let c of document.querySelectorAll("[data-start]")){if(c===o||mc.has(c.tagName))continue;let s=t.resolveStartForElement(c,0);if(gc(c,n,i,s)<=0)continue;let l={id:Ii(c)??`__clip-${a++}`,element:c,parentId:null,children:[]};r.set(c,l)}return xc(r),{roots:Array.from(r.values()).filter(c=>c.parentId===null)}}var Pi="css:root",ss=["backdrop-filter","clip-path","filter","mask","mask-border-source","mask-image","perspective","rotate","scale","transform","translate","-webkit-mask-image"],bc=new Set([...ss,"contain","isolation","mask-border","mix-blend-mode","opacity"]),yc=new Set(["absolute","relative"]),Sc=new Set(["flex","inline-flex","grid","inline-grid"]),Ec=new Set(["layout","paint","strict","content"]),Ac=new Set(["size","inline-size"]);function wc(e){return e.position==="fixed"||e.position==="sticky"}function Cc(e,t){if(t.zIndex==="auto"||t.zIndex==="")return!1;if(yc.has(t.position))return!0;let n=e.parentElement?e.ownerDocument.defaultView?.getComputedStyle(e.parentElement).display:null;return n!=null&&Sc.has(n)}function _c(e){let t=Number.parseFloat(e.opacity);if(Number.isFinite(t)&&t<1||e.getPropertyValue("isolation")==="isolate")return!0;let n=e.getPropertyValue("mix-blend-mode");return n&&n!=="normal"?!0:ss.some(i=>{let r=e.getPropertyValue(i);return r!==""&&r!=="none"})}function Fc(e){return e.getPropertyValue("contain").split(/\\s+/).some(n=>Ec.has(n))?!0:Ac.has(e.getPropertyValue("container-type"))}function Tc(e){return e.getPropertyValue("will-change").split(",").map(t=>t.trim()).some(t=>bc.has(t))}function vc(e,t){return wc(t)||Cc(e,t)||_c(t)||Fc(t)?!0:Tc(t)}function Mc(e){let t=[],n=e;for(;n?.parentElement;)t.push(Array.prototype.indexOf.call(n.parentElement.children,n)),n=n.parentElement;return`css:${t.reverse().join(".")}`}function Mn(e){let t=e.ownerDocument.defaultView;if(!t)return Pi;let n=e.parentElement;for(;n&&n!==e.ownerDocument.documentElement;){try{if(vc(n,t.getComputedStyle(n)))return Mc(n)}catch{return Pi}n=n.parentElement}return Pi}var bt=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),n0=Object.freeze([bt.start,bt.duration,bt.trackIndex]),i0=Object.freeze([bt.derivedEnd]),r0=Object.freeze([bt.derivedEnd,bt.legacyTrack]);function ze(e){if(e==null||e.trim()==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}var ls=/^[A-Za-z0-9_.:-]+$/;function us(e,t){let n=e.charCodeAt(t);return n>=48&&n<=57}function as(e,t){let n=t;for(;n>=0&&us(e,n);)n--;return n}function Nc(e,t){let n=t;for(;n>=0&&(e[n]??"").trim()==="";)n--;return n}function Rc(e){let t=e.length-1;if(!us(e,t))return null;let n=as(e,t);return e[n]==="."&&(n=as(e,n-1)),n+1}function Lc(e){let t=Rc(e);if(t==null)return null;let n=Nc(e,t-1),i=e[n];if(i!=="+"&&i!=="-")return null;let r=e.slice(0,n).trim();if(!ls.test(r))return null;let o=Number(e.slice(t));return Number.isFinite(o)?{refId:r,operator:i,magnitude:o}:null}function Oi(e){let t=(e??"").trim();if(!t)return null;let n=ze(t);if(n!=null)return{kind:"absolute",value:n};if(ls.test(t))return{kind:"reference",refId:t,offset:0};let i=Lc(t);return i?{kind:"reference",refId:i.refId,offset:i.operator==="-"?-i.magnitude:i.magnitude}:null}var kc="data-hf-authored-duration",Dc="data-hf-authored-end";function Ic(e){return ze(e.getAttribute("data-duration"))}function Pc(e){return ze(e.getAttribute("data-end"))}function Oc(e){return ze(e.getAttribute(kc))}function Bc(e){return ze(e.getAttribute(Dc))}function Ye(e){let t=e.timelineRegistry??{},n=e.includeAuthoredTimingAttrs??!1,i=e.documentRef??document,r=new WeakMap,o=new WeakMap,a=new Set,c=d=>{let x=i.getElementById(d);return x||(i.querySelector(`[data-composition-id="${CSS.escape(d)}"]`)??null)},s=d=>{let x=d.ownerDocument.defaultView?.HTMLMediaElement;return x?d instanceof x:typeof HTMLMediaElement<"u"&&d instanceof HTMLMediaElement},l=d=>{let x=o.get(d);if(x!==void 0)return x;let S=null,y=Ic(d)??(n?Oc(d):null);if(y!=null&&y>0&&(S=y),S==null||S<=0){let b=Pc(d)??(n?Bc(d):null);if(b!=null){let A=p(d,0),_=b-A;Number.isFinite(_)&&_>0&&(S=_)}}if((S==null||S<=0)&&s(d)){let b=ze(d.getAttribute("data-playback-start"))??ze(d.getAttribute("data-media-start"))??0;Number.isFinite(d.duration)&&d.duration>b&&(S=(d.duration-b)/Be(d))}if(S==null||S<=0){let b=d.getAttribute("data-composition-id");if(b){let A=t[b]??null;if(A&&typeof A.duration=="function")try{let _=Number(A.duration());Number.isFinite(_)&&_>0&&(S=_)}catch(_){T("runtime.startResolver.site1",_)}}}return S!=null&&Number.isFinite(S)&&S>0?(o.set(d,S),S):(o.set(d,null),null)},f=(d,x)=>{if(d.hasAttribute("data-composition-id")){let y=d.parentElement?.closest("[data-composition-id]");return y?p(y,x):0}let S=d.closest("[data-composition-id]");return S?p(S,x):0},p=(d,x)=>{let S=r.get(d);if(S!==void 0)return S??x;if(a.has(d))return x;a.add(d);try{let y=Oi(d.getAttribute("data-start"));if(!y){if(d.hasAttribute("data-composition-id")){let G=d.parentElement;if(G&&(G.hasAttribute("data-composition-src")||G.hasAttribute("data-composition-id")||G.hasAttribute("data-composition-file"))){let D=p(G,x);return r.set(d,D),D}}return r.set(d,x),x}if(y.kind==="absolute"){let G=Math.max(0,y.value),D=Math.max(0,f(d,x)+G);return r.set(d,D),D}let b=c(y.refId);if(!b)return r.set(d,x),x;let A=p(b,0),_=l(b);if(_==null||_<=0){let G=Math.max(0,A+y.offset);return r.set(d,G),G}let M=Math.max(0,A+_+y.offset);return r.set(d,M),M}finally{a.delete(d)}};return{resolveStartForElement:(d,x=0)=>p(d,Math.max(0,x)),resolveDurationForElement:d=>l(d)}}function Bi(e){let t=e.trim().toLowerCase();return!(!t||t==="main"||t.includes("caption")||t.includes("ambient"))}var Gc="data-hf-authored-duration",Uc="data-hf-authored-end";function Ee(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function Hi(e){return Ee(e.getAttribute("data-duration"))??Ee(e.getAttribute(Gc))}function cs(e){return Ee(e.getAttribute("data-end"))??Ee(e.getAttribute(Uc))}function Gi(e){try{let t=e.style?.zIndex;if(t&&t!=="auto"){let n=parseInt(t,10);if(Number.isFinite(n))return n}return 0}catch{return 0}}function Ui(...e){let t=e.filter(n=>Number.isFinite(n??null));return t.length===0?null:Math.max(...t)}function Wi(e,t){let n=e.getAttribute("data-track-index")??e.getAttribute("data-track");if(n==null)return t;let i=Number.parseInt(n,10);return Number.isFinite(i)?i:t}function zt(e){let t=String(e??"").trim();if(!t)return null;let n=t.toLowerCase();if(n.startsWith("data:")||n.startsWith("javascript:"))return null;try{return new URL(t,document.baseURI).toString()}catch{return t}}function ds(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return zt(t);let n=e.getAttribute("data-composition-src");if(n)return zt(n);let i=e.querySelector("img[src], video[src], audio[src], source[src]");return i?zt(i.getAttribute("src")):null}function Wc(e){let t=e.className;return typeof t!="string"?null:t.split(/\\s+/).map(n=>n.trim()).find(n=>n&&n!=="clip"&&!n.startsWith("__hf-"))??null}function Vc(e){if(!e)return null;try{return new URL(e,document.baseURI).pathname.split("/").filter(Boolean).at(-1)??null}catch{return e.split(/[\\\\/]/).filter(Boolean).at(-1)??null}}function zc(e){let t=e.textContent?.replace(/\\s+/g," ").trim();return t?t.length>32?`${t.slice(0,31)}...`:t:null}function Vt(e){let t=e.replace(/\\.[^.]+$/i,"").replace(/[-_]+/g," ").replace(/\\s+/g," ").trim();return t?t.replace(/\\b\\w/g,n=>n.toUpperCase()):e}function jc(e,t,n){let i=e.getAttribute("data-timeline-label")??e.getAttribute("data-label")??e.getAttribute("aria-label")??null;if(i?.trim())return i.trim();let r=e.getAttribute("data-composition-id");if(r)return Vt(r);let o=e.id;if(o)return Vt(o);let a=Wc(e);if(a)return Vt(a);let c=Vc(ds(e));if(c)return Vt(c);let s=zc(e);return s||`${Vt(t)} ${n+1}`}function fs(e){let n=window.__timelines??{},i=Ye({timelineRegistry:n,includeAuthoredTimingAttrs:!0}),r=U=>{if(!U)return null;let k=n[U]??null;if(!k||typeof k.duration!="function")return null;try{let H=Number(k.duration());return Number.isFinite(H)&&H>0?H:null}catch{return null}},o=U=>{let k=Ee(U.getAttribute("data-duration"));if(k!=null&&k>0)return k;let H=Ee(U.getAttribute("data-playback-start"))??Ee(U.getAttribute("data-media-start"))??0;return Number.isFinite(U.duration)&&U.duration>H?Math.max(0,(U.duration-H)/Be(U)):null},a=()=>{let U=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(U.length===0)return null;let k=0;for(let H of U){let ae=H.hasAttribute("data-hf-auto-start")?i.resolveStartForElement(H,0):Math.max(0,Number(H.getAttribute("data-start")??0)||0);if(!Number.isFinite(ae))continue;let oe=o(H);oe==null||oe<=0||(k=Math.max(k,Math.max(0,ae)+oe))}return k>0?k:null},c=(U,k)=>{let H=[],ae=null,oe=null,W=null,q=U.parentElement;for(;q;){let $=q.getAttribute("data-composition-id");$&&(H.push($),!W&&q!==k&&(W=$),ae==null&&(ae=i.resolveStartForElement(q,0)),oe==null&&(oe=Ee(q.getAttribute("data-duration"))??r($)??null)),q=q.parentElement}return{parentCompositionId:W,compositionAncestors:H.reverse(),inheritedStart:ae,inheritedDuration:oe}},s=document.querySelector("[data-composition-id]"),l=Array.from(document.querySelectorAll("[data-composition-id]")),f=s?.getAttribute("data-composition-id")??null,p=s?i.resolveStartForElement(s,0):0,d=a(),x=d!=null?Math.max(0,d-Math.max(0,p)):null,S=r(f),y=Hi(s??document.body),b=Ui(...l.filter(U=>U!==s).map(U=>{let k=i.resolveStartForElement(U,0),H=i.resolveDurationForElement(U)??r(U.getAttribute("data-composition-id"))??null;return!Number.isFinite(k)||H==null||H<=0?null:Math.max(0,k)+H})),A=b!=null?Math.max(0,b-Math.max(0,p)):null,_=typeof S=="number"&&Number.isFinite(S)&&S>0?S:null,M=typeof y=="number"&&Number.isFinite(y)&&y>0?y:null,G=typeof x=="number"&&Number.isFinite(x)&&x>0?x:null,D=typeof A=="number"&&Number.isFinite(A)&&A>0?A:null,v=Ui(G,D),w=_!=null&&v!=null&&_>v+1,F=M??(w?v:Ui(_,G,D))??null,L=(F!=null?p+F:null)??(typeof d=="number"&&Number.isFinite(d)&&d>0?d:null),z=(U,k)=>!Number.isFinite(k)||k<=0?0:L==null||!Number.isFinite(L)?k:!Number.isFinite(U)||U>=L?0:Math.max(0,Math.min(k,L-U)),P=[],X=[],I=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),ie=0;for(let[U,k]of I.entries()){if(k===s||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(k.tagName))continue;let H=c(k,s),ae=i.resolveStartForElement(k,H.inheritedStart??0),oe=k.getAttribute("data-composition-id"),W=Hi(k);if((W==null||W<=0)&&oe&&oe!==f&&(W=r(oe)),(W==null||W<=0)&&k instanceof HTMLMediaElement){let Ce=Ee(k.getAttribute("data-playback-start"))??Ee(k.getAttribute("data-media-start"))??0;Number.isFinite(k.duration)&&k.duration>0&&(W=Math.max(0,k.duration-Ce))}if(W==null||W<=0){let Ce=H.inheritedDuration;if(Ce!=null&&Ce>0){let Ue=(H.inheritedStart??0)+Ce;W=Math.max(0,Ue-ae)}}if(W==null||W<=0||(W=z(ae,W),W<=0))continue;let q=ae+W;ie=Math.max(ie,q);let $=k.tagName.toLowerCase(),we=oe&&oe!==f?"composition":$==="video"?"video":$==="audio"?"audio":$==="img"?"image":"element";P.push({id:Ii(k)??oe??null,label:jc(k,we,P.length),start:ae,duration:W,track:Wi(k,U),zIndex:Gi(k),stackingContextId:Mn(k),kind:we,tagName:$,compositionId:k.getAttribute("data-composition-id"),compositionAncestors:H.compositionAncestors,parentCompositionId:H.parentCompositionId,nodePath:null,compositionSrc:zt(k.getAttribute("data-composition-src")),playbackStart:gt(k),playbackRate:Be(k),assetUrl:ds(k),timelineRole:k.getAttribute("data-timeline-role"),timelineLabel:k.getAttribute("data-timeline-label"),timelineGroup:k.getAttribute("data-timeline-group"),timelinePriority:Ee(k.getAttribute("data-timeline-priority"))})}let Fe=new Set(P.map(U=>U.id)),j=s?.getAttribute("data-composition-id")??null,Y=j?n[j]??null:null;if(Y&&s){let U=Y;if(typeof U.getChildren=="function")try{let k=U.getChildren(!0,!0,!1)??[],H=new Map;for(let W of s.children){let q=W;if(!q.id)continue;let $=q.tagName.toLowerCase();$==="script"||$==="style"||$==="link"||H.set(q,{id:q.id,start:1/0,end:-1/0})}let ae=W=>{let q=W;for(;q;){if(H.has(q))return q;if(q===s)return null;q=q.parentElement}return null};for(let W of k){if(typeof W.targets!="function"||typeof W.startTime!="function"||typeof W.duration!="function")continue;let q=W.startTime(),$=W.parent;for(;$&&$!==Y&&typeof $.startTime=="function";)q+=$.startTime(),$=$.parent;let we=q+W.duration();if(!(!Number.isFinite(q)||!Number.isFinite(we)))for(let Ce of W.targets()){if(!(Ce instanceof Element))continue;let vt=ae(Ce);if(!vt)continue;let Ue=H.get(vt);Ue&&(Ue.start=Math.min(Ue.start,q),Ue.end=Math.max(Ue.end,we))}}let oe=P.length>0?Math.max(...P.map(W=>W.track))+1:0;for(let[W,q]of H){if(q.start===1/0||q.end===-1/0)continue;let $=W;if(Fe.has($.id))continue;let we=Math.max(0,q.end-q.start);if(we<=0)continue;let Ce=z(q.start,we);Ce<=0||(ie=Math.max(ie,q.start+Ce),P.push({id:$.id,label:$.getAttribute("data-timeline-label")??$.getAttribute("data-label")??$.getAttribute("aria-label")??$.id,start:q.start,duration:Ce,track:Wi($,oe),zIndex:Gi($),stackingContextId:Mn($),kind:"element",tagName:$.tagName.toLowerCase(),compositionId:$.getAttribute("data-composition-id"),compositionAncestors:j?[j]:[],parentCompositionId:j,nodePath:null,compositionSrc:null,playbackStart:gt($),playbackRate:Be($),assetUrl:null,timelineRole:$.getAttribute("data-timeline-role"),timelineLabel:$.getAttribute("data-timeline-label"),timelineGroup:$.getAttribute("data-timeline-group"),timelinePriority:Ee($.getAttribute("data-timeline-priority"))}),Fe.add($.id))}}catch(k){T("runtime.timeline.site1",k)}}if(s&&F!=null&&F>0){let U=P.length>0?Math.max(...P.map(k=>k.track))+1:0;for(let k of s.children){let H=k;if(!H.id||Fe.has(H.id))continue;let ae=H.getAttribute("data-timeline-role");if(ae!=="overlay"&&ae!=="persistent-overlay")continue;let oe=H.tagName.toLowerCase();if(oe==="script"||oe==="style"||oe==="link"||oe==="meta"||window.getComputedStyle(H).display==="none")continue;let q=z(0,F);q<=0||(ie=Math.max(ie,q),P.push({id:H.id,label:H.getAttribute("data-timeline-label")??H.getAttribute("data-label")??H.getAttribute("aria-label")??H.id,start:0,duration:q,track:Wi(H,U),zIndex:Gi(H),stackingContextId:Mn(H),kind:"element",tagName:oe,compositionId:H.getAttribute("data-composition-id"),compositionAncestors:j?[j]:[],parentCompositionId:j,nodePath:null,compositionSrc:null,playbackStart:gt(H),playbackRate:Be(H),assetUrl:null,timelineRole:ae,timelineLabel:H.getAttribute("data-timeline-label"),timelineGroup:H.getAttribute("data-timeline-group"),timelinePriority:Ee(H.getAttribute("data-timeline-priority"))}),Fe.add(H.id))}}for(let U of l){if(U===s)continue;let k=U.getAttribute("data-composition-id");if(!k||!Bi(k))continue;let H=i.resolveStartForElement(U,0),ae=Hi(U);if((ae==null||ae<=0)&&cs(U)!=null){let $=cs(U);ae=Math.max(0,$-H)}let oe=r(k),W=ae&&ae>0?ae:oe;if(W==null||W<=0)continue;let q=z(H,W);q<=0||X.push({id:k,label:U.getAttribute("data-label")??k,start:H,duration:q,thumbnailUrl:zt(U.getAttribute("data-thumbnail-url")),avatarName:null})}let B=Math.max(1,ie||1,F??0),V=w&&M==null,Ae=V?Number.POSITIVE_INFINITY:Math.max(1,Math.ceil(B*Math.max(1,e.canonicalFps)));return{...Sn(e.canonicalFps),source:"hf-preview",type:"timeline",compositionContractVersion:1,durationSeconds:V?Number.POSITIVE_INFINITY:B,durationInFrames:Ae,clips:P,scenes:X,compositionWidth:Ee(s?.getAttribute("data-width"))??1920,compositionHeight:Ee(s?.getAttribute("data-height"))??1080}}var ue=Fu(Oa(),1),Ba=ue.default,bg=ue.default.stringify,yg=ue.default.fromJSON,Sg=ue.default.plugin,Eg=ue.default.parse,Ag=ue.default.list,wg=ue.default.document,Cg=ue.default.comment,_g=ue.default.atRule,Fg=ue.default.rule,Tg=ue.default.decl,vg=ue.default.root,Mg=ue.default.CssSyntaxError,Ng=ue.default.Declaration,Rg=ue.default.Container,Lg=ue.default.Processor,kg=ue.default.Document,Dg=ue.default.Comment,Ig=ue.default.Warning,Pg=ue.default.AtRule,Og=ue.default.Result,Bg=ue.default.Input,Hg=ue.default.Rule,Gg=ue.default.Root,Ug=ue.default.Node;var pr="data-hf-authored-id",Ha="data-hf-inner-root";function hr(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function gr(e){return e.replace(/\\\\/g,"\\\\\\\\").replace(/"/g,\'\\\\"\')}function pf(e){return e&&e.replace(/[^a-zA-Z0-9_-]/g,n=>`\\\\${n}`).replace(/^-?\\d/,n=>`\\\\${n}`)}function Ua(e){let t=e.trim();return t?Array.from(new Set([t,pf(t)])).filter(Boolean):[]}function hf(e){return!!e&&/[\\w-]/.test(e)}function gf(e,t,n){let i=Ua(t).sort((c,s)=>s.length-c.length);if(i.length===0)return e;let r="",o=0,a=null;for(let c=0;c<e.length;c+=1){let s=e[c],l=c>0?e[c-1]:"";if(a){r+=s,s===a&&l!=="\\\\"&&(a=null);continue}if(s===\'"\'||s==="\'"){a=s,r+=s;continue}if(s==="["){o+=1,r+=s;continue}if(s==="]"){o=Math.max(0,o-1),r+=s;continue}if(s==="#"&&o===0){let f=i.find(p=>e.startsWith(p,c+1));if(f){let p=e[c+1+f.length];if(!hf(p)){r+=n,c+=f.length;continue}}}r+=s}return r}function xf(e,t){let n=t?.trim();return n?gf(e,n,`[${pr}="${gr(n)}"]`):e}function Ga(e){return`${e}:not(:has([${Ha}])), ${e} > [${Ha}]`}function bf(e,t,n,i,r,o){let a=xf(e,i),c=yf(a,t,n),s=c.trim();if(!s||s==="*")return e;if(/^(html|body|:root)$/i.test(s))return o?Ga(t):e;let l=new RegExp(`\\\\[\\\\s*data-composition-id\\\\s*=\\\\s*(["\'])${hr(n)}\\\\1\\\\s*\\\\]`,"g");if(l.test(s))return s.replace(l,"").trim()===""?Ga(t):c.replace(l,t);let f=c.match(/^\\s*/)?.[0]??"",p=c.match(/\\s*$/)?.[0]??"";if(r){let d=i?`[${pr}="${gr(i)}"]`:null;if(d&&s.startsWith(d)){let x=s.slice(d.length);return`${f}${t}${d}${x}${p}`}}return`${f}${t} ${s}${p}`}function yf(e,t,n){let i=hr(n),r=String.raw`\\[\\s*data-composition-id\\s*=\\s*(?:"${i}"|\'${i}\')\\s*\\]`,o=String.raw`\\s*\\[\\s*data-(?:start|duration)\\s*=\\s*(?:"[^"]*"|\'[^\']*\')\\s*\\]`;return e.replace(new RegExp(`${r}(?:${o})+`,"g"),t).replace(new RegExp(`(?:${o})+${r}`,"g"),t)}var Sf=new Set(["keyframes","-webkit-keyframes","font-face"]);function Ef(e){return e?.type==="atrule"}function Af(e){let t=e.parent;for(;t;){if(Ef(t)&&Sf.has(t.name.toLowerCase()))return!0;t=t.parent}return!1}function Wa(e,t,n,i,r){let o=t.trim();if(!e||!o)return e;let a=n||`[data-composition-id="${gr(o)}"]`,c=Ba.parse(e);return c.walkRules(s=>{Af(s)||(s.selectors=s.selectors.map(l=>bf(l,a,o,i,r?.compoundAuthoredRoot,r?.scopeRootSelectors)))}),c.toResult({map:!1}).css}function Va(e,t,n="[HyperFrames] composition script error:",i,r=t,o){let a=JSON.stringify(t),c=JSON.stringify(r),s=JSON.stringify(n),l=hr(t),f=JSON.stringify(o?.trim()||null),p=JSON.stringify(i??null),d=JSON.stringify(String.raw`\\[\\s*data-composition-id\\s*=\\s*(?:"${l}"|\'${l}\')\\s*\\]`),x=JSON.stringify(String.raw`\\s*\\[\\s*data-(?:start|duration)\\s*=\\s*(?:"[^"]*"|\'[^\']*\')\\s*\\]`),S=JSON.stringify(Ua(o?.trim()||""));return`(function(){\n var __hfCompId = ${a};\n var __hfTimelineCompId = ${c};\n var __hfErrorLabel = ${s};\n var __hfAuthoredRootId = ${f};\n var __hfAuthoredRootAttr = ${JSON.stringify(pr)};\n var __hfEscapeAttr = function(value) {\n return (value + "").replace(/\\\\\\\\/g, "\\\\\\\\\\\\\\\\").replace(/"/g, "\\\\\\\\\\\\"");\n };\n var __hfRootSelector = ${p} || (__hfCompId\n ? \'[data-composition-id="\' + __hfEscapeAttr(__hfCompId) + \'"]\'\n : "");\n var __hfRoot = null;\n var __hfRootSelectorPattern = ${d};\n var __hfTimingSelectorPattern = ${x};\n var __hfAuthoredRootIdForms = ${S};\n var __hfAuthoredRootSelector = __hfAuthoredRootId\n ? "[" + __hfAuthoredRootAttr + \'="\' + __hfEscapeAttr(__hfAuthoredRootId) + \'"]\'\n : "";\n var __hfIsSelectorNameChar = function(char) {\n return !!char && /[\\\\w-]/.test(char);\n };\n var __hfReplaceAuthoredRootIdSelectors = function(selector) {\n if (!__hfAuthoredRootSelector || !__hfAuthoredRootIdForms.length || typeof selector !== "string") {\n return selector;\n }\n var result = "";\n var bracketDepth = 0;\n var quote = null;\n for (var index = 0; index < selector.length; index += 1) {\n var char = selector[index];\n var previousChar = index > 0 ? selector[index - 1] : "";\n if (quote) {\n result += char;\n if (char === quote && previousChar !== "\\\\\\\\") {\n quote = null;\n }\n continue;\n }\n if (char === \'"\' || char === "\'") {\n quote = char;\n result += char;\n continue;\n }\n if (char === "[") {\n bracketDepth += 1;\n result += char;\n continue;\n }\n if (char === "]") {\n bracketDepth = Math.max(0, bracketDepth - 1);\n result += char;\n continue;\n }\n if (char === "#" && bracketDepth === 0) {\n var matchedForm = null;\n for (var formIndex = 0; formIndex < __hfAuthoredRootIdForms.length; formIndex += 1) {\n var form = __hfAuthoredRootIdForms[formIndex];\n if (selector.slice(index + 1, index + 1 + form.length) === form) {\n matchedForm = form;\n break;\n }\n }\n if (matchedForm) {\n var nextChar = selector[index + 1 + matchedForm.length];\n if (!__hfIsSelectorNameChar(nextChar)) {\n result += __hfAuthoredRootSelector;\n index += matchedForm.length;\n continue;\n }\n }\n }\n result += char;\n }\n return result;\n };\n var __hfNormalizeSelector = function(selector) {\n if (!__hfCompId || typeof selector !== "string") return selector;\n var normalized = selector\n .replace(new RegExp(__hfRootSelectorPattern + \'(?:\' + __hfTimingSelectorPattern + \')+\', \'g\'), __hfRootSelector)\n .replace(new RegExp(\'(?:\' + __hfTimingSelectorPattern + \')+\' + __hfRootSelectorPattern, \'g\'), __hfRootSelector);\n if (__hfAuthoredRootSelector) {\n normalized = __hfReplaceAuthoredRootIdSelectors(normalized);\n }\n return normalized;\n };\n var __hfFindRoot = function() {\n if (!__hfRoot && __hfRootSelector) {\n __hfRoot = window.document.querySelector(__hfRootSelector);\n }\n return __hfRoot;\n };\n var __hfContains = function(node) {\n var root = __hfFindRoot();\n return !root || node === root || root.contains(node);\n };\n var __hfQueryAll = function(selector) {\n var root = __hfFindRoot();\n if (!root || typeof selector !== "string") {\n return window.document.querySelectorAll(selector);\n }\n return Array.prototype.filter.call(window.document.querySelectorAll(__hfNormalizeSelector(selector)), function(node) {\n return __hfContains(node);\n });\n };\n var __hfQueryOne = function(selector) {\n var matches = __hfQueryAll(selector);\n return matches[0] || null;\n };\n var __hfGetElementById = function(id) {\n var found = window.document.getElementById(id);\n if (found && __hfContains(found)) return found;\n var root = __hfFindRoot();\n if (!root) return found || null;\n var idValue = id + "";\n if (__hfAuthoredRootId && __hfAuthoredRootId === idValue && root.getAttribute && root.getAttribute(__hfAuthoredRootAttr) === idValue) {\n return root;\n }\n if (root.id === idValue) return root;\n if (typeof root.querySelector !== "function") return null;\n try {\n var authoredRootMatch = root.querySelector(\'[\' + __hfAuthoredRootAttr + \'="\' + __hfEscapeAttr(idValue) + \'"]\');\n if (authoredRootMatch) return authoredRootMatch;\n } catch {}\n if (typeof CSS !== "undefined" && CSS && typeof CSS.escape === "function") {\n try {\n return root.querySelector("#" + CSS.escape(idValue)) || null;\n } catch {}\n }\n try {\n return root.querySelector(\'[id="\' + __hfEscapeAttr(idValue) + \'"]\') || null;\n } catch {}\n return null;\n };\n var __hfScopedDocument = typeof Proxy === "function"\n ? new Proxy(window.document, {\n get: function(target, prop, receiver) {\n if (prop === "querySelector") return __hfQueryOne;\n if (prop === "querySelectorAll") return __hfQueryAll;\n if (prop === "getElementById") return __hfGetElementById;\n var value = Reflect.get(target, prop, target);\n return typeof value === "function" ? value.bind(target) : value;\n },\n })\n : window.document;\n var __hfTimelineRegistryProxy = null;\n var __hfGetTimelineRegistry = function() {\n window.__timelines = window.__timelines || {};\n if (!__hfCompId || __hfCompId === __hfTimelineCompId || typeof Proxy !== "function") {\n return window.__timelines;\n }\n if (!__hfTimelineRegistryProxy) {\n __hfTimelineRegistryProxy = new Proxy(window.__timelines, {\n get: function(target, prop, receiver) {\n if (prop !== __hfCompId) {\n return Reflect.get(target, prop, target);\n }\n var authoredValue = Reflect.get(target, prop, target);\n return authoredValue === undefined\n ? Reflect.get(target, __hfTimelineCompId, target)\n : authoredValue;\n },\n set: function(target, prop, value, receiver) {\n if (prop !== __hfCompId) {\n return Reflect.set(target, prop, value, target);\n }\n // The authored node remains in the compiled DOM when its local id\n // differs from the runtime mount id, so readiness legitimately sees\n // both compositions. Publish the same timeline under both identities\n // instead of replacing one with the other.\n var authoredSet = Reflect.set(target, __hfCompId, value, target);\n var runtimeSet = Reflect.set(target, __hfTimelineCompId, value, target);\n return authoredSet && runtimeSet;\n },\n });\n }\n return __hfTimelineRegistryProxy;\n };\n var __hfScopedWindow = typeof Proxy === "function"\n ? new Proxy(window, {\n get: function(target, prop, receiver) {\n if (prop === "__timelines") return __hfGetTimelineRegistry();\n // Inside a sub-composition, __hyperframes is passed as a bare script\n // param bound to the SCOPED variant (per-comp getVariables). But\n // authors routinely write the documented window.__hyperframes.\n // getVariables() form, which would otherwise fall through to the host\n // page\'s base __hyperframes and return the WRONG (or empty) variables\n // for this instance. Route it to the scoped variant too so both\n // spellings resolve to this composition\'s own variables.\n // (__hfScopedHyperframes is a hoisted var assigned below, before any\n // sub-comp script -- the only code that reads this -- runs.)\n if (prop === "__hyperframes") return __hfScopedHyperframes;\n return Reflect.get(target, prop, target);\n },\n set: function(target, prop, value, receiver) {\n if (prop === "__timelines") {\n // Common authoring boilerplate assigns the registry back to\n // itself (window.__timelines = window.__timelines || {}). The\n // getter above returns our proxy; do not replace the canonical\n // registry with that proxy or later wrappers will stack proxies.\n if (value === __hfTimelineRegistryProxy) return true;\n target.__timelines = value || {};\n __hfTimelineRegistryProxy = null;\n return true;\n }\n return Reflect.set(target, prop, value, target);\n },\n })\n : window;\n var __hfResolveGsapTarget = function(target) {\n if (typeof target !== "string") return target;\n return __hfQueryAll(target);\n };\n var __hfScopeTimeline = function(timeline) {\n if (!timeline || timeline.__hfScopedCompositionRoot === __hfFindRoot()) return timeline;\n ["to", "from", "fromTo", "set"].forEach(function(method) {\n var original = timeline[method];\n if (typeof original !== "function") return;\n timeline[method] = function(target) {\n var args = Array.prototype.slice.call(arguments);\n args[0] = __hfResolveGsapTarget(target);\n return original.apply(timeline, args);\n };\n });\n try {\n Object.defineProperty(timeline, "__hfScopedCompositionRoot", {\n value: __hfFindRoot(),\n configurable: true,\n });\n } catch {\n // Best-effort: timelines coming from user code may have a frozen target\n // or a non-extensible defineProperty path. Swallow \\u2014 the scoped root\n // is an enrichment, not a correctness invariant for playback.\n }\n return timeline;\n };\n var __hfBaseGsap = typeof gsap === "undefined" ? window.gsap : gsap;\n var __hfScopedGsap = !__hfBaseGsap || typeof Proxy !== "function"\n ? __hfBaseGsap\n : new Proxy(__hfBaseGsap, {\n get: function(target, prop, receiver) {\n if (prop === "timeline") {\n return function() {\n return __hfScopeTimeline(target.timeline.apply(target, arguments));\n };\n }\n if (prop === "to" || prop === "from" || prop === "fromTo" || prop === "set") {\n return function(firstArg) {\n var args = Array.prototype.slice.call(arguments);\n args[0] = __hfResolveGsapTarget(firstArg);\n return target[prop].apply(target, args);\n };\n }\n if (prop === "utils" && target.utils && typeof Proxy === "function") {\n return new Proxy(target.utils, {\n get: function(utilsTarget, utilsProp, utilsReceiver) {\n if (utilsProp === "toArray") {\n return function(firstArg) {\n var args = Array.prototype.slice.call(arguments);\n args[0] = __hfResolveGsapTarget(firstArg);\n return utilsTarget.toArray.apply(utilsTarget, args);\n };\n }\n if (utilsProp === "selector") {\n return function(base) {\n var baseEl = typeof base === "string" ? __hfQueryOne(base) : base;\n var root = baseEl || __hfFindRoot();\n return function(selector) {\n if (!root || typeof selector !== "string") return [];\n return Array.prototype.filter.call(\n window.document.querySelectorAll(__hfNormalizeSelector(selector)),\n function(node) {\n return node === root || (typeof root.contains === "function" && root.contains(node));\n },\n );\n };\n };\n }\n var value = Reflect.get(utilsTarget, utilsProp, utilsTarget);\n return typeof value === "function" ? value.bind(utilsTarget) : value;\n },\n });\n }\n var value = Reflect.get(target, prop, target);\n return typeof value === "function" ? value.bind(target) : value;\n },\n });\n var __hfBaseHyperframes = window.__hyperframes;\n var __hfScopedHyperframes = !__hfBaseHyperframes\n ? __hfBaseHyperframes\n : Object.assign({}, __hfBaseHyperframes, {\n getVariables: function() {\n var byComp = window.__hfVariablesByComp;\n var scoped = byComp && __hfTimelineCompId ? byComp[__hfTimelineCompId] : null;\n return scoped ? Object.assign({}, scoped) : {};\n },\n });\n var __hfRun = function() {\n try {\n (function(document, gsap, window, __hyperframes) {\n${e.replace(/<\\/(script)/gi,"<\\\\/$1")}\n }).call(window, __hfScopedDocument, __hfScopedGsap, __hfScopedWindow, __hfScopedHyperframes);\n } catch (_err) {\n console.error(__hfErrorLabel, __hfCompId, _err);\n }\n };\n __hfFindRoot();\n __hfRun();\n})();`}var wf=["data-composition-id","data-composition-file","data-start","data-duration","data-end","data-track-index","data-track","data-composition-src","data-hf-authored-duration","data-hf-authored-end"];function za(e){let t=e.getAttribute("id")?.trim();for(let n of wf)e.removeAttribute(n);t&&(e.removeAttribute("id"),e.setAttribute("data-hf-authored-id",t)),e.setAttribute("data-hf-inner-root","true")}var Cf=8e3,_f=/^(?![a-zA-Z][a-zA-Z\\d+\\-.]*:)(?!\\/\\/)(?!\\/)(?!\\.\\.?\\/).+/,Ff=/\\burl\\(\\s*(["\']?)([^)"\']+)\\1\\s*\\)/g,Tf=["src","href"];function vf(e){return!e||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/")}function $a(e,t){if(!t)return e;let n=e.trim();if(vf(n)||!n.startsWith("../")&&n!=="..")return e;try{return new URL(n,t).href}catch{return e}}function qa(e,t){return!t||!e?e:e.replace(Ff,(n,i,r)=>{let o=$a(r||"",t);return o===r?n:`url(${i||""}${o}${i||""})`})}function Mf(e,t){for(let n of Array.from(e.querySelectorAll("[src], [href]")))for(let i of Tf){let r=n.getAttribute(i);if(r==null)continue;let o=$a(r,t);o!==r&&n.setAttribute(i,o)}}function Nf(e,t){for(let n of Array.from(e.querySelectorAll("[style]"))){let i=n.getAttribute("style");if(i==null)continue;let r=qa(i,t);r!==i&&n.setAttribute("style",r)}}function Rf(e,t){for(let n of Array.from(e.querySelectorAll("style"))){let i=n.textContent||"",r=qa(i,t);r!==i&&(n.textContent=r)}}function Ka(e,t){if(t){Mf(e,t),Nf(e,t),Rf(e,t);for(let n of Array.from(e.querySelectorAll("template")))Ka(n.content,t)}}function Lf(e,t){return`${e}__hf${t}`}var kf=e=>new Promise(t=>{let n=!1,i=Date.now(),r=null,o=a=>{n||(n=!0,r!=null&&window.clearTimeout(r),t({status:a,elapsedMs:Math.max(0,Date.now()-i)}))};e.addEventListener("load",()=>o("load"),{once:!0}),e.addEventListener("error",()=>o("error"),{once:!0}),r=window.setTimeout(()=>o("timeout"),Cf)});function br(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function Df(e){let t=document.importNode(e,!0);za(t);let n=t.getAttribute("data-width"),i=t.getAttribute("data-height");return t.style.width=n?`${n}px`:"100%",t.style.height=i?`${i}px`:"100%",t}function ja(e,t){let n=e.trim();if(!n)return e;try{return _f.test(n)&&!n.startsWith("#")&&!n.startsWith("?")?new URL(n,document.baseURI).toString():t?new URL(n,t).toString():new URL(n,document.baseURI).toString()}catch{return e}}function xr(e,t){try{let n=new URL(e),i=new URL(t);return n.search="",n.hash="",i.search="",i.hash="",n.href===i.href}catch{return!1}}function jn(e){let t=(e.getAttribute("data-composition-id")||"").trim()||null;return{authoredCompositionId:(e.getAttribute("data-hf-original-composition-id")||t||"").trim()||null,runtimeCompositionId:t}}function If(e){let t=new Map;for(let n of e){let i=jn(n).authoredCompositionId||"";i&&t.set(i,(t.get(i)||0)+1)}return t}function Ja(e){let t=jn(e).authoredCompositionId;return t?!!document.querySelector(`template#${CSS.escape(t)}-template`):!1}function Pf(e){return!!e.querySelector(\'[data-hf-inner-root="true"]\')}function Of(e){return e.hasAttribute("data-composition-src")?!0:Ja(e)?e.children.length===0||e.hasAttribute("data-hf-original-composition-id")?!0:Pf(e):!1}function Sr(){return Array.from(document.querySelectorAll("[data-composition-src], [data-composition-id]")).filter(t=>t.hasAttribute("data-composition-src")?!0:Ja(t))}function Ya(){let e=window.__hfVariablesByComp;if(!e)return;let t=new Set(Sr().map(n=>jn(n).runtimeCompositionId).filter(n=>!!n));for(let n of Object.keys(e))t.has(n)||delete e[n]}function Xa(e,t=If(e)){let n=new Map,i=new Map;for(let r of e){let{authoredCompositionId:o,runtimeCompositionId:a}=jn(r),c=Of(r);if(!o){i.set(r,{authoredCompositionId:null,runtimeCompositionId:a});continue}let s=(t.get(o)||0)>1,l=a||o;if(c){let f=s?(n.get(o)||0)+1:0;s&&n.set(o,f),l=s?Lf(o,f):o,s?r.setAttribute("data-hf-original-composition-id",o):r.removeAttribute("data-hf-original-composition-id"),r.setAttribute("data-composition-id",l),a&&a!==l&&window.__hfVariablesByComp&&delete window.__hfVariablesByComp[a]}i.set(r,{authoredCompositionId:o,runtimeCompositionId:l})}return i}async function yr(e){let t=null;e.authoredCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(x=>x instanceof HTMLElement&&x.getAttribute("data-composition-id")===e.authoredCompositionId)??null);let n=t??e.sourceNode,i=t?.getAttribute("data-composition-id")?.trim()||e.authoredCompositionId||null,r=e.runtimeCompositionId||i||null,o=t?.getAttribute("id")?.trim()||null,a=r?`[data-composition-id="${CSS.escape(r)}"]`:void 0;if(e.headLinks)for(let d of e.headLinks){let x=(d.getAttribute("href")||"").trim();if(!x)continue;let S=e.compositionUrl?new URL(x,e.compositionUrl).href:x;if(e.compositionUrl&&xr(S,e.compositionUrl)||document.head.querySelector(`link[href="${CSS.escape(S)}"]`))continue;let y=d.cloneNode(!0);y.href=S,document.head.appendChild(y),e.injectedLinks.push(y)}let c=d=>{for(let x of d){let S=x.cloneNode(!0);S instanceof HTMLStyleElement&&(i&&(S.textContent=Wa(S.textContent||"",i,a,o,{scopeRootSelectors:!0})),document.head.appendChild(S),e.injectedStyles.push(S))}};e.headStyles&&c(e.headStyles),c(Array.from(n.querySelectorAll("style")));let s=[];if(e.headScripts)for(let d of e.headScripts){let x=d.getAttribute("type")?.trim()??"",S=d.getAttribute("src")?.trim()??"";if(S){let y=ja(S,e.compositionUrl);if(e.compositionUrl&&xr(y,e.compositionUrl))continue;s.push({kind:"external",src:y,type:x})}else{let y=d.textContent?.trim()??"";y&&s.push({kind:"inline",content:y,type:x,scopeCompositionId:i})}}let l=Array.from(n.querySelectorAll("script")),f=[...s];for(let d of l){let x=d.getAttribute("type")?.trim()??"",S=d.getAttribute("src")?.trim()??"";if(S){let y=ja(S,e.compositionUrl);if(e.compositionUrl&&xr(y,e.compositionUrl)){d.parentNode?.removeChild(d);continue}f.push({kind:"external",src:y,type:x})}else{let y=d.textContent?.trim()??"";y&&f.push({kind:"inline",content:y,type:x,scopeCompositionId:i})}d.parentNode?.removeChild(d)}let p=Array.from(n.querySelectorAll("style"));for(let d of p)d.parentNode?.removeChild(d);if(t){let d=t.getAttribute("data-width"),x=t.getAttribute("data-height"),S=e.parseDimensionPx(d),y=e.parseDimensionPx(x);d&&e.host.setAttribute("data-width",d),x&&e.host.setAttribute("data-height",x),S&&e.host instanceof HTMLElement&&(e.host.style.width=S),y&&e.host instanceof HTMLElement&&(e.host.style.height=y),t.hasAttribute("data-timeline-locked")&&e.host.setAttribute("data-timeline-locked",""),e.host.appendChild(Df(t))}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;r&&Bf(e,n,r);for(let d of f){let x=document.createElement("script");if(d.type&&(x.type=d.type),x.async=!1,d.kind==="external"?x.src=d.src:d.type.toLowerCase()==="module"?x.textContent=d.content:d.scopeCompositionId?x.textContent=Va(d.content,d.scopeCompositionId,"[HyperFrames] composition script error:",a,r||d.scopeCompositionId,o):x.textContent=`(function(){${d.content}})();`,document.body.appendChild(x),e.injectedScripts.push(x),d.kind==="external"){let S=await kf(x);S.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.authoredCompositionId,runtimeCompositionId:e.runtimeCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:d.src,loadStatus:S.status,elapsedMs:S.elapsedMs}})}}}async function Qa(e){let t=Sr();if(Ya(),t.length===0)return;let n=Xa(t),i=t.filter(r=>{if(r.hasAttribute("data-composition-src")||r.children.length>0)return!1;let o=n.get(r)?.authoredCompositionId;return o?!!document.querySelector(`template#${CSS.escape(o)}-template`):!1});if(i.length!==0)for(let r of i){let o=n.get(r),a=o?.authoredCompositionId;if(!a)continue;let c=document.querySelector(`template#${CSS.escape(a)}-template`);br(r),await yr({host:r,authoredCompositionId:a,runtimeCompositionId:o?.runtimeCompositionId||a,hostCompositionSrc:`template#${a}-template`,sourceNode:c.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic})}}async function Za(e){let t=Sr();if(Ya(),t.length===0)return;let n=Xa(t),i=t.filter(r=>r.hasAttribute("data-composition-src"));i.length!==0&&await Promise.all(i.map(async r=>{let o=r.getAttribute("data-composition-src");if(!o)return;let a=n.get(r),c=a?.authoredCompositionId||null,s=a?.runtimeCompositionId||c||null,l=null;try{l=new URL(o,document.baseURI)}catch{l=null}br(r);try{let f=c!=null?document.querySelector(`template#${CSS.escape(c)}-template`):null;if(f){await yr({host:r,authoredCompositionId:c,runtimeCompositionId:s,hostCompositionSrc:o,sourceNode:f.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:l,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let p=await fetch(o);if(!p.ok)throw new Error(`HTTP ${p.status}`);let d=await p.text(),S=new DOMParser().parseFromString(d,"text/html");Ka(S,l);let y=(c?S.querySelector(`template#${CSS.escape(c)}-template`):null)??S.querySelector("template"),b=y?y.content:S.body,A=y?void 0:Array.from(S.head.querySelectorAll("style")),_=y?void 0:Array.from(S.head.querySelectorAll("script")),M=Array.from(S.head.querySelectorAll(\'link[rel="stylesheet"], link[rel="preconnect"]\'));await yr({host:r,authoredCompositionId:c,runtimeCompositionId:s,hostCompositionSrc:o,sourceNode:b,hasTemplate:!!y,fallbackBodyInnerHtml:S.body.innerHTML,compositionUrl:l,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,headStyles:A,headScripts:_,headLinks:M,declaredVariableDefaults:It(S.documentElement),onDiagnostic:e.onDiagnostic})}catch(f){e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:c,runtimeCompositionId:s,hostCompositionSrc:o,errorMessage:f instanceof Error?f.message:"unknown_error"}}),br(r)}}))}function Bf(e,t,n){let r={...e.declaredVariableDefaults??(t instanceof Element?It(t):{}),...yo(e.host)};xo(e.host),Object.keys(r).length>0?(window.__hfVariablesByComp||(window.__hfVariablesByComp={}),window.__hfVariablesByComp[n]=r,yi(e.host,{...go(e.host,r,window),...An()})):window.__hfVariablesByComp&&delete window.__hfVariablesByComp[n]}function Hf(e){return e instanceof HTMLElement?e.dataset.captionWrapper!=="true"?e:e.querySelector(":scope > span")??null:null}function Gf(){let e=[],t=document.querySelectorAll(".caption-group");for(let n of t)for(let i of n.children){if(!(i instanceof HTMLElement))continue;let r=i.dataset.captionWrapper==="true"?i.querySelector(":scope > span"):i.tagName==="SPAN"?i:null;r&&e.push(r)}return e}function Uf(e){let t=e.parentElement;if(t?.dataset.captionWrapper==="true")return t;let n=document.createElement("span");return n.style.display="inline-block",n.dataset.captionWrapper="true",e.parentNode?.insertBefore(n,e),n.appendChild(e),n}function Er(){let e=window.gsap;e&&document.querySelectorAll(".caption-group").length!==0&&fetch("caption-overrides.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!Array.isArray(t)||t.length===0)return;let n=Gf();for(let i of t){let r=null;if(i.wordId&&(r=Hf(document.getElementById(i.wordId))),!r&&i.wordIndex!==void 0&&(r=n[i.wordIndex]??null),!r)continue;let o={},a={};if(i.x!==void 0&&(o.x=i.x),i.y!==void 0&&(o.y=i.y),i.scale!==void 0&&(o.scale=i.scale),i.rotation!==void 0&&(o.rotation=i.rotation),i.opacity!==void 0&&(a.opacity=i.opacity),i.fontSize!==void 0&&(a.fontSize=`${i.fontSize}px`),i.fontWeight!==void 0&&(a.fontWeight=i.fontWeight),i.fontFamily!==void 0&&(a.fontFamily=i.fontFamily),i.activeColor||i.dimColor){let s=e.getTweensOf(r).filter(f=>f.vars.color!==void 0).sort((f,p)=>f.startTime()-p.startTime()),l=s[0]?String(s[0].vars.color):"";for(let f of s)String(f.vars.color)===l?i.dimColor&&(f.vars.color=i.dimColor):i.activeColor&&(f.vars.color=i.activeColor);i.dimColor&&e.set(r,{color:i.dimColor})}if(Object.keys(a).length>0&&e.set(r,a),Object.keys(o).length>0){let c=Uf(r);e.set(c,o)}}}).catch(()=>{})}var wr="data-hf-edit-base-x",Cr="data-hf-edit-base-y",Ct="data-hf-edit-original-translate",$n=e=>{let t=parseFloat(e??"");return Number.isFinite(t)?t:0},Wf=e=>{let t=[],n=0,i="";for(let r of e.trim())r==="("&&(n+=1),r===")"&&(n=Math.max(0,n-1)),/\\s/.test(r)&&n===0?(i&&t.push(i),i=""):i+=r;return i&&t.push(i),t},el=/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)px$/,Ar=(e,t)=>el.test(e)&&el.test(t)?`${parseFloat(e)+parseFloat(t)}px`:`calc(${e} + ${t})`,Vf=(e,t,n)=>{if(!e||e==="none")return`${t} ${n}`;let[i,r,o]=Wf(e);if(i===void 0)return`${t} ${n}`;if(r===void 0)return`${Ar(i,t)} ${n}`;let a=o===void 0?"":` ${o}`;return`${Ar(i,t)} ${Ar(r,n)}${a}`},zf=e=>{try{e.ownerDocument.defaultView?.gsap?.getProperty?.(e,"x")}catch{}},jf=e=>{let t=e.style.getPropertyValue("translate").trim();if(t)return t==="none"?"":t;try{let n=e.ownerDocument.defaultView,i=n?n.getComputedStyle(e).getPropertyValue("translate").trim():"";return i==="none"?"":i}catch{return""}},_r=new WeakMap;function $f(e,t){let n=_r.get(e);if(!t?.force&&n!==void 0&&e.style.getPropertyValue("translate")!==n){Je("position_edit_fold_skipped",{hfId:e.getAttribute("data-hf-id")});return}let i=$n(e.getAttribute("data-x"))-$n(e.getAttribute(wr)),r=$n(e.getAttribute("data-y"))-$n(e.getAttribute(Cr));e.hasAttribute(Ct)||e.setAttribute(Ct,jf(e)),n===void 0&&zf(e);let o=e.getAttribute(Ct)??"",a=Vf(o,`${i}px`,`${r}px`);e.style.setProperty("translate",a),_r.set(e,e.style.getPropertyValue("translate"))}function qn(e,t){let n=e.defaultView?.HTMLElement,i=e.defaultView?.SVGElement,r=s=>n||i?n!==void 0&&s instanceof n||i!==void 0&&s instanceof i:typeof s.style?.setProperty=="function",o=e.querySelectorAll(`[${Ct}]:not([${wr}]):not([${Cr}])`);for(let s=0;s<o.length;s++){let l=o[s];if(l===void 0||!r(l))continue;let f=l.getAttribute(Ct)??"";f===""?l.style.removeProperty("translate"):l.style.setProperty("translate",f),l.removeAttribute(Ct),_r.delete(l)}let a=e.querySelectorAll(`[${wr}], [${Cr}]`),c=0;for(let s=0;s<a.length;s++){let l=a[s];l===void 0||!r(l)||($f(l,t),c+=1)}return c}var tl="__hfPositionEditsSeekReapplyWrapped",nl=new WeakSet,il=new WeakMap,rl=new WeakMap;function ol(e){let t=e,n=()=>{try{qn(t.document)}catch{}},i=p=>typeof p=="function"&&(nl.has(p)||!!p[tl]),r=p=>{nl.add(p);try{Object.defineProperty(p,tl,{value:!0})}catch{}},o=p=>{if(typeof p!="function"||i(p))return p;let d=function(...x){let S=p.apply(this,x);return n(),S};return r(d),d},a=(p,d)=>{let x=il.get(p);if(x?.has(d))return!0;let S=Object.getOwnPropertyDescriptor(p,d);if(S?.configurable===!1){let A=p[d];return typeof A=="function"&&(p[d]=o(A),n()),!1}let y=p[d],b=S?.set;return Object.defineProperty(p,d,{configurable:!0,enumerable:S?.enumerable??!0,get:()=>y,set:A=>{y=o(A),b?.call(p,A)}}),y=o(y),x??(x=new Set),x.add(d),il.set(p,x),n(),!0},c=(p,d)=>{let x=rl.get(t),S=Object.getOwnPropertyDescriptor(t,p);if(!x?.has(p)){if(S?.configurable===!1){let A=t[p];return A?a(A,d):!1}let b=t[p];Object.defineProperty(t,p,{configurable:!0,enumerable:S?.enumerable??!0,get:()=>b,set:A=>{b=A,b&&a(b,d)}}),x??(x=new Set),x.add(p),rl.set(t,x)}let y=t[p];return y?a(y,d):!1},s=()=>{let p=c("__hf","seek"),d=c("__player","renderSeek");return p&&d};if(s())return;let l=120,f=t.setInterval(()=>{if(s()){t.clearInterval(f);return}l-=1,l<=0&&t.clearInterval(f)},50)}function Kn(e){let t=window,i=e.closest("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()??"",r=i?t.__hfVariablesByComp?.[i]:void 0;if(r)return r;let o=t.__hyperframes?.getVariables?.();return o&&typeof o=="object"?o:t.__hfVariables??{}}function Jn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var sl=new Set(["img","video","audio","source"]);function qf(e){if(typeof e=="string"&&e.length>0)return e;if(e!==null&&typeof e=="object"){let t=e.url;if(typeof t=="string"&&t.length>0)return t}return null}function Kf(e){let t=e.replace(/[\\u0000-\\u0020]/g,""),n=/^([a-z][a-z0-9+.-]*):/i.exec(t);if(!n)return!0;let i=n[1]?.toLowerCase();return i?i==="https"||i==="http"||i==="blob"?!0:i==="data"?/^data:image\\//i.test(t):!1:!1}function Jf(e){return e.replace(/[;{}<>\\r\\n]/g,"")}function Yf(e){if(Jn(e))return String(e);if(e!==null&&typeof e=="object"){let t=e.name;if(typeof t=="string"&&t.length>0)return t}return null}function Fr(e,t){let n=e.closest("[data-composition-id]"),i=t.get(n);if(i)return i;let r=Kn(e);return t.set(n,r),r}function Xf(e,t){if(e.childElementCount===0){e.textContent=t;return}let n=!1;for(let i of Array.from(e.childNodes))i.nodeType===Node.TEXT_NODE&&(i.nodeValue=n?"":t,n=!0);n||e.insertBefore(e.ownerDocument.createTextNode(t),e.firstChild)}function Qf(e){return e.querySelector("[data-hf-root]")??e.getElementById("stage")??e.body?.firstElementChild??e.body}function Zf(e,t){let n=new Set,i=Qf(e);i&&n.add(i);for(let r of Array.from(e.querySelectorAll("[data-composition-id]")))n.add(r);for(let r of n){let o=Fr(r,t);for(let[a,c]of Object.entries(o)){let s=Yf(c);s!==null&&r instanceof HTMLElement&&r.style.setProperty(`--${a}`,Jf(s))}}}function Tr(e){let t=new Map;Zf(e,t);for(let n of Array.from(e.querySelectorAll("[data-var-src]"))){let i=n.getAttribute("data-var-src")?.trim();if(!i)continue;if(!sl.has(n.tagName.toLowerCase())){console.warn(`[hyperframes] Ignoring data-var-src on <${n.tagName.toLowerCase()}>: variable-bound src is only allowed on ${Array.from(sl).join("/")}.`);continue}let r=qf(Fr(n,t)[i]);if(r!==null){if(!Kf(r)){console.warn(`[hyperframes] Ignoring data-var-src="${i}": unsafe URL protocol.`);continue}n.setAttribute("src",r)}}for(let n of Array.from(e.querySelectorAll("[data-var-text]"))){let i=n.getAttribute("data-var-text")?.trim();if(!i)continue;let r=Fr(n,t)[i];Jn(r)&&Xf(n,String(r))}}var xe=class extends Error{constructor(n,i=null){super(i==null?n:`${n} at line ${i}`);me(this,"lineNumber");this.name="CubeLutParseError",this.lineNumber=i}},em=[0,0,0],tm=[1,1,1],Mr=64;function nm(e){let t=!1;for(let n=0;n<e.length;n++){let i=e[n];if(i===\'"\'&&(t=!t),i==="#"&&!t)return e.slice(0,n)}return e}function tt(e,t){let n=Number(e);if(!Number.isFinite(n))throw new xe(`Invalid number "${e}"`,t);return n}function al(e,t,n){if(e.length!==3)throw new xe(`${t} expects three numbers`,n);return[tt(e[0],n),tt(e[1],n),tt(e[2],n)]}function ll(e,t,n){if(!e)throw new xe(`${t} expects a size`,n);let i=Number(e);if(!Number.isInteger(i)||i<2)throw new xe(`${t} must be an integer greater than 1`,n);return i}function im(e,t){if(t[0]<=e[0]||t[1]<=e[1]||t[2]<=e[2])throw new xe("DOMAIN_MAX values must be greater than DOMAIN_MIN values")}function rm(e){let t=/^TITLE\\s+"([^"]*)"\\s*$/i.exec(e);if(t)return t[1]??null;let n=/^TITLE\\s+(.+)\\s*$/i.exec(e);return n&&(n[1]??"").trim()||null}function om(e){return/^[+-]?(?:\\d|\\.\\d)/.test(e)}function ul(e,t={}){let n=t.maxSize??Mr,i=null,r=em,o=tm,a=null,c=null,s=[],l=e.replace(/^\\uFEFF/,"").split(/\\r?\\n/);for(let p=0;p<l.length;p++){let d=p+1,x=nm(l[p]??"").trim();if(!x)continue;let S=x.split(/\\s+/),y=(S[0]??"").toUpperCase(),b=S.slice(1);if(y==="TITLE"){i=rm(x);continue}if(y==="DOMAIN_MIN"){r=al(b,y,d);continue}if(y==="DOMAIN_MAX"){o=al(b,y,d);continue}if(y==="LUT_3D_INPUT_RANGE"){if(b.length!==2)throw new xe(`${y} expects two numbers`,d);let A=tt(b[0],d),_=tt(b[1],d);if(_<=A)throw new xe("LUT_3D_INPUT_RANGE max must exceed min",d);r=[A,A,A],o=[_,_,_];continue}if(y==="LUT_1D_SIZE"){a=ll(b[0],y,d);continue}if(y==="LUT_3D_SIZE"){if(c=ll(b[0],y,d),c>n)throw new xe(`LUT_3D_SIZE ${c} exceeds max ${n}`,d);continue}if(!om(y)){if(y.startsWith("LUT_"))throw new xe(`Unsupported cube keyword ${y}`,d);continue}if(!c)throw a?new xe("1D cube LUTs are not supported yet",d):new xe("LUT data appears before LUT_3D_SIZE",d);if(S.length!==3)throw new xe("LUT data rows must contain three numbers",d);s.push(tt(S[0],d),tt(S[1],d),tt(S[2],d))}if(a&&c)throw new xe("Mixed 1D and 3D cube LUTs are not supported yet");if(!c)throw a?new xe("1D cube LUTs are not supported yet"):new xe("Missing LUT_3D_SIZE");im(r,o);let f=c*c*c;if(s.length!==f*3)throw new xe(`Expected ${f} LUT rows for size ${c}, found ${s.length/3}`);return{title:i,size:c,domainMin:r,domainMax:o,data:new Float32Array(s)}}function sm(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function vr(e){return Math.round(sm(e)*255)}function cl(e){let t=e.size,n=t*t,i=t,r=new Uint8Array(n*i*4);for(let o=0;o<t;o++)for(let a=0;a<t;a++)for(let c=0;c<t;c++){let s=((o*t+a)*t+c)*3,l=(a*n+o*t+c)*4;r[l]=vr(e.data[s]??0),r[l+1]=vr(e.data[s+1]??0),r[l+2]=vr(e.data[s+2]??0),r[l+3]=255}return{width:n,height:i,data:r}}var $e=new Map,am="data-hf-color-grading-canvas",lm="__hf_color_grading_canvas__";function xl(){if(typeof MutationObserver>"u"||typeof document>"u")return;let e=document.documentElement;if(!e)return;let t=i=>{i instanceof HTMLElement&&(i.hasAttribute(vn)||i.setAttribute(vn,i.style.opacity))},n=i=>{if(i instanceof Element){i.hasAttribute(Ve)&&t(i);for(let r of i.querySelectorAll(`[${Ve}]`))t(r)}};n(e),new MutationObserver(i=>{for(let r of i){for(let o of r.addedNodes)n(o);r.type==="attributes"&&r.target instanceof Element&&r.target.hasAttribute(Ve)&&t(r.target)}}).observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[Ve]})}var um=16,cn={enabled:!1,position:.5,softness:0,lineWidth:2};function Nr(e){let t=e.getAttribute(Ve);return t==null?null:Zo(t,Kn(e))}var cm=["attribute vec2 a_pos;","varying vec2 v_uv;","void main(){"," v_uv = a_pos * 0.5 + 0.5;"," gl_Position = vec4(a_pos, 0.0, 1.0);","}"].join(`\n`),dm=["#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","varying vec2 v_uv;","uniform sampler2D u_source;","uniform sampler2D u_blurSource;","uniform sampler2D u_lut;","uniform vec2 u_resolution;","uniform vec2 u_uvScale;","uniform vec2 u_uvOffset;","uniform float u_blurReady;","uniform float u_lutEnabled;","uniform float u_lutSize;","uniform vec2 u_lutTextureSize;","uniform vec3 u_lutDomainMin;","uniform vec3 u_lutDomainMax;","uniform float u_lutIntensity;","uniform float u_exposure;","uniform float u_contrast;","uniform float u_highlights;","uniform float u_shadows;","uniform float u_whites;","uniform float u_blacks;","uniform float u_temperature;","uniform float u_tint;","uniform float u_vibrance;","uniform float u_saturation;","uniform float u_vignette;","uniform float u_vignetteMidpoint;","uniform float u_vignetteRoundness;","uniform float u_vignetteFeather;","uniform float u_grain;","uniform float u_grainSize;","uniform float u_grainRoughness;","uniform float u_grainSeed;","uniform float u_blur;","uniform float u_pixelate;","uniform float u_intensity;","uniform float u_compareEnabled;","uniform float u_comparePosition;","uniform float u_compareSoftness;","uniform float u_compareLineWidth;","float lumaOf(vec3 c){ return dot(c, vec3(0.2126, 0.7152, 0.0722)); }","float grainHash(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123); }","float colorSaturation(vec3 c){ return max(max(c.r, c.g), c.b) - min(min(c.r, c.g), c.b); }","vec2 clampUv(vec2 uv){ return clamp(uv, vec2(0.0), vec2(1.0)); }","vec4 sampleSource(vec2 uv){ return texture2D(u_source, clampUv(uv)); }","vec4 sampleBlur(vec2 uv){ return texture2D(u_blurSource, clampUv(uv)); }","vec4 sampleMedia(vec2 uv){"," float pixel = clamp(u_pixelate, 0.0, 1.0);"," vec2 sampleUv = uv;"," if (pixel > 0.0) {"," float blockSize = mix(1.0, 48.0, pixel);"," vec2 cells = max(u_resolution / blockSize, vec2(1.0));"," sampleUv = (floor(clamp(uv, vec2(0.0), vec2(0.999999)) * cells) + 0.5) / cells;"," }"," vec4 base = sampleSource(sampleUv);"," float blur = clamp(u_blur, 0.0, 1.0);"," if (blur > 0.0 && u_blurReady > 0.5) {"," base = mix(base, sampleBlur(sampleUv), blur);"," }"," return base;","}","vec3 sampleLut(float r, float g, float b){"," float size = max(u_lutSize, 2.0);"," float x = (r + b * size + 0.5) / max(u_lutTextureSize.x, 1.0);"," float y = (g + 0.5) / max(u_lutTextureSize.y, 1.0);"," return texture2D(u_lut, vec2(x, y)).rgb;","}","vec3 applyLut(vec3 color){"," if (u_lutEnabled < 0.5) return color;"," float size = max(u_lutSize, 2.0);"," vec3 span = max(u_lutDomainMax - u_lutDomainMin, vec3(0.00001));"," vec3 scaled = clamp((color - u_lutDomainMin) / span, 0.0, 1.0) * (size - 1.0);"," vec3 lo = floor(scaled);"," vec3 hi = min(lo + 1.0, vec3(size - 1.0));"," vec3 f = scaled - lo;"," vec3 c000 = sampleLut(lo.r, lo.g, lo.b);"," vec3 c100 = sampleLut(hi.r, lo.g, lo.b);"," vec3 c010 = sampleLut(lo.r, hi.g, lo.b);"," vec3 c110 = sampleLut(hi.r, hi.g, lo.b);"," vec3 c001 = sampleLut(lo.r, lo.g, hi.b);"," vec3 c101 = sampleLut(hi.r, lo.g, hi.b);"," vec3 c011 = sampleLut(lo.r, hi.g, hi.b);"," vec3 c111 = sampleLut(hi.r, hi.g, hi.b);"," vec3 c00 = mix(c000, c100, f.r);"," vec3 c10 = mix(c010, c110, f.r);"," vec3 c01 = mix(c001, c101, f.r);"," vec3 c11 = mix(c011, c111, f.r);"," vec3 c0 = mix(c00, c10, f.g);"," vec3 c1 = mix(c01, c11, f.g);"," vec3 lutColor = mix(c0, c1, f.b);"," return mix(color, lutColor, clamp(u_lutIntensity, 0.0, 1.0));","}","void main(){"," vec2 uv = (v_uv - u_uvOffset) / u_uvScale;"," if (uv.x < 0.0 || uv.y < 0.0 || uv.x > 1.0 || uv.y > 1.0) {"," gl_FragColor = vec4(0.0);"," return;"," }"," vec4 originalSample = sampleSource(uv);"," vec4 sampleColor = sampleMedia(uv);"," vec3 original = originalSample.rgb;"," vec3 color = sampleColor.rgb * pow(2.0, u_exposure);"," float y = lumaOf(color);"," float shadowMask = 1.0 - smoothstep(0.0, 0.65, y);"," float highlightMask = smoothstep(0.35, 1.0, y);"," color += u_shadows * 0.35 * shadowMask;"," color += u_highlights * 0.35 * highlightMask;"," float blackPoint = clamp(u_blacks * 0.18, -0.18, 0.18);"," float whitePoint = clamp(1.0 - u_whites * 0.18, 0.82, 1.18);"," color = (color - blackPoint) / max(whitePoint - blackPoint, 0.2);"," color.r += u_temperature * 0.08 + u_tint * 0.04;"," color.b -= u_temperature * 0.08 - u_tint * 0.04;"," color.g -= u_tint * 0.08;"," color = (color - 0.5) * max(0.0, 1.0 + u_contrast) + 0.5;"," float satLuma = lumaOf(color);"," float currentSat = clamp(colorSaturation(color), 0.0, 1.0);"," float skinLike = smoothstep(0.02, 0.18, color.r - color.g) * smoothstep(0.0, 0.16, color.g - color.b) * smoothstep(0.18, 0.82, satLuma);"," float vibranceWeight = (1.0 - currentSat * 0.72) * mix(1.0, 0.55, skinLike);"," color = mix(vec3(satLuma), color, max(0.0, 1.0 + u_vibrance * vibranceWeight));"," color = mix(vec3(satLuma), color, max(0.0, 1.0 + u_saturation));"," color = clamp(color, 0.0, 1.0);"," color = clamp(applyLut(color), 0.0, 1.0);"," vec2 vignetteAspect = u_resolution.x > u_resolution.y"," ? vec2(u_resolution.x / max(u_resolution.y, 1.0), 1.0)"," : vec2(1.0, u_resolution.y / max(u_resolution.x, 1.0));"," vec2 vignetteUv = abs((v_uv - vec2(0.5)) * 2.0) * vignetteAspect;"," float vignettePower = mix(8.0, 1.8, clamp(u_vignetteRoundness * 0.5 + 0.5, 0.0, 1.0));"," float vignetteDistance = pow(pow(vignetteUv.x, vignettePower) + pow(vignetteUv.y, vignettePower), 1.0 / vignettePower);"," float vignetteMidpoint = mix(0.22, 1.08, clamp(u_vignetteMidpoint, 0.0, 1.0));"," float vignetteFeather = mix(0.08, 0.72, clamp(u_vignetteFeather, 0.0, 1.0));"," float vignetteMask = smoothstep(vignetteMidpoint, vignetteMidpoint + vignetteFeather, vignetteDistance);"," color *= 1.0 - vignetteMask * clamp(u_vignette, 0.0, 1.0) * 0.75;"," float grainAmount = clamp(u_grain, 0.0, 1.0);"," if (grainAmount > 0.0) {"," float grainPixelSize = mix(1.0, 6.0, clamp(u_grainSize, 0.0, 1.0));"," vec2 grainCoord = floor(gl_FragCoord.xy / grainPixelSize) + vec2(u_grainSeed, u_grainSeed * 1.37);"," float grainBase = grainHash(grainCoord) - grainHash(grainCoord + vec2(19.19, 73.31));"," float grainFine = grainHash(gl_FragCoord.xy + vec2(u_grainSeed * 2.11, u_grainSeed * 0.71)) - 0.5;"," float grain = mix(grainBase * 0.7, grainBase + grainFine * 0.35, clamp(u_grainRoughness, 0.0, 1.0));"," float grainLuma = lumaOf(color);"," float grainMask = smoothstep(0.02, 0.55, grainLuma) * (1.0 - smoothstep(0.88, 1.0, grainLuma));"," color += grain * grainAmount * mix(0.025, 0.08, grainMask);"," }"," color = clamp(color, 0.0, 1.0);"," vec3 graded = mix(original, color, u_intensity);"," if (u_compareEnabled > 0.5) {"," float pos = clamp(u_comparePosition, 0.0, 1.0);"," float softness = max(u_compareSoftness, 0.00001);"," float afterMask = smoothstep(pos - softness, pos + softness, v_uv.x);"," vec3 splitColor = mix(original, graded, afterMask);"," float lineMask = 0.0;"," if (u_compareLineWidth > 0.0) {"," float lineWidth = max(u_compareLineWidth / max(u_resolution.x, 1.0), 0.00001);"," lineMask = 1.0 - smoothstep(lineWidth, lineWidth * 1.8, abs(v_uv.x - pos));"," }"," gl_FragColor = vec4(mix(splitColor, vec3(1.0), lineMask * 0.82), sampleColor.a);"," return;"," }"," gl_FragColor = vec4(graded, sampleColor.a);","}"].join(`\n`),fm=["#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","varying vec2 v_uv;","uniform sampler2D u_source;","uniform vec2 u_resolution;","uniform vec2 u_direction;","uniform float u_radius;","vec4 readSource(vec2 uv){"," vec4 color = texture2D(u_source, clamp(uv, vec2(0.0), vec2(1.0)));"," color.rgb *= color.a;"," return color;","}","void main(){"," vec2 stepUv = u_direction * max(u_radius, 0.0) / max(u_resolution, vec2(1.0)) / 12.0;"," vec4 color = readSource(v_uv) * 0.08077993;"," color += readSource(v_uv + stepUv * 1.0) * 0.07918038;"," color += readSource(v_uv - stepUv * 1.0) * 0.07918038;"," color += readSource(v_uv + stepUv * 2.0) * 0.07456928;"," color += readSource(v_uv - stepUv * 2.0) * 0.07456928;"," color += readSource(v_uv + stepUv * 3.0) * 0.06747307;"," color += readSource(v_uv - stepUv * 3.0) * 0.06747307;"," color += readSource(v_uv + stepUv * 4.0) * 0.05865827;"," color += readSource(v_uv - stepUv * 4.0) * 0.05865827;"," color += readSource(v_uv + stepUv * 5.0) * 0.04899551;"," color += readSource(v_uv - stepUv * 5.0) * 0.04899551;"," color += readSource(v_uv + stepUv * 6.0) * 0.03931982;"," color += readSource(v_uv - stepUv * 6.0) * 0.03931982;"," color += readSource(v_uv + stepUv * 7.0) * 0.03031761;"," color += readSource(v_uv - stepUv * 7.0) * 0.03031761;"," color += readSource(v_uv + stepUv * 8.0) * 0.02245983;"," color += readSource(v_uv - stepUv * 8.0) * 0.02245983;"," color += readSource(v_uv + stepUv * 9.0) * 0.01598624;"," color += readSource(v_uv - stepUv * 9.0) * 0.01598624;"," color += readSource(v_uv + stepUv * 10.0) * 0.01093238;"," color += readSource(v_uv - stepUv * 10.0) * 0.01093238;"," color += readSource(v_uv + stepUv * 11.0) * 0.00718308;"," color += readSource(v_uv - stepUv * 11.0) * 0.00718308;"," color += readSource(v_uv + stepUv * 12.0) * 0.00453456;"," color += readSource(v_uv - stepUv * 12.0) * 0.00453456;"," if (color.a > 0.0001) color.rgb /= color.a;"," gl_FragColor = color;","}"].join(`\n`);function ft(e){return e instanceof HTMLVideoElement||e instanceof HTMLImageElement}function dl(e,t,n){let i=e.createShader(n);return i?(e.shaderSource(i,t),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(T("runtime.colorGrading.compileShader",e.getShaderInfoLog(i)),e.deleteShader(i),null)):null}function bl(e,t=dm){let n=dl(e,cm,e.VERTEX_SHADER),i=dl(e,t,e.FRAGMENT_SHADER);if(!n||!i)return n&&e.deleteShader(n),i&&e.deleteShader(i),null;let r=e.createProgram();return r?(e.attachShader(r,n),e.attachShader(r,i),e.linkProgram(r),e.deleteShader(n),e.deleteShader(i),e.getProgramParameter(r,e.LINK_STATUS)?r:(T("runtime.colorGrading.linkProgram",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function Lr(e,t=e.LINEAR){let n=e.createTexture();return n?(e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null),n):null}function mm(e,t){let n=bl(e,fm);return n?{program:n,quad:t,position:e.getAttribLocation(n,"a_pos"),source:e.getUniformLocation(n,"u_source"),resolution:e.getUniformLocation(n,"u_resolution"),direction:e.getUniformLocation(n,"u_direction"),radius:e.getUniformLocation(n,"u_radius")}:null}function fl(e){let t=Lr(e),n=e.createFramebuffer();if(!t||!n)return t&&e.deleteTexture(t),n&&e.deleteFramebuffer(n),null;e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0);let i=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),i!==e.FRAMEBUFFER_COMPLETE?(e.deleteTexture(t),e.deleteFramebuffer(n),null):{texture:t,framebuffer:n,width:1,height:1}}function ml(e,t,n,i){t.width===n&&t.height===i||(t.width=n,t.height=i,e.bindTexture(e.TEXTURE_2D,t.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n,i,0,e.RGBA,e.UNSIGNED_BYTE,null))}function yl(e){let t=e.getContext("webgl",{alpha:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!0});if(!t)return null;let n=bl(t),i=Lr(t),r=Lr(t,t.NEAREST);if(!n||!i||!r)return n&&t.deleteProgram(n),i&&t.deleteTexture(i),r&&t.deleteTexture(r),null;let o=t.createBuffer();return o?(t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),t.STATIC_DRAW),{gl:t,program:{program:n,texture:i,lutTexture:r,quad:o,position:t.getAttribLocation(n,"a_pos"),source:t.getUniformLocation(n,"u_source"),blurSource:t.getUniformLocation(n,"u_blurSource"),lut:t.getUniformLocation(n,"u_lut"),resolution:t.getUniformLocation(n,"u_resolution"),uvScale:t.getUniformLocation(n,"u_uvScale"),uvOffset:t.getUniformLocation(n,"u_uvOffset"),blurReady:t.getUniformLocation(n,"u_blurReady"),lutEnabled:t.getUniformLocation(n,"u_lutEnabled"),lutSize:t.getUniformLocation(n,"u_lutSize"),lutTextureSize:t.getUniformLocation(n,"u_lutTextureSize"),lutDomainMin:t.getUniformLocation(n,"u_lutDomainMin"),lutDomainMax:t.getUniformLocation(n,"u_lutDomainMax"),lutIntensity:t.getUniformLocation(n,"u_lutIntensity"),exposure:t.getUniformLocation(n,"u_exposure"),contrast:t.getUniformLocation(n,"u_contrast"),highlights:t.getUniformLocation(n,"u_highlights"),shadows:t.getUniformLocation(n,"u_shadows"),whites:t.getUniformLocation(n,"u_whites"),blacks:t.getUniformLocation(n,"u_blacks"),temperature:t.getUniformLocation(n,"u_temperature"),tint:t.getUniformLocation(n,"u_tint"),vibrance:t.getUniformLocation(n,"u_vibrance"),saturation:t.getUniformLocation(n,"u_saturation"),vignette:t.getUniformLocation(n,"u_vignette"),vignetteMidpoint:t.getUniformLocation(n,"u_vignetteMidpoint"),vignetteRoundness:t.getUniformLocation(n,"u_vignetteRoundness"),vignetteFeather:t.getUniformLocation(n,"u_vignetteFeather"),grain:t.getUniformLocation(n,"u_grain"),grainSize:t.getUniformLocation(n,"u_grainSize"),grainRoughness:t.getUniformLocation(n,"u_grainRoughness"),grainSeed:t.getUniformLocation(n,"u_grainSeed"),blur:t.getUniformLocation(n,"u_blur"),pixelate:t.getUniformLocation(n,"u_pixelate"),intensity:t.getUniformLocation(n,"u_intensity"),compareEnabled:t.getUniformLocation(n,"u_compareEnabled"),comparePosition:t.getUniformLocation(n,"u_comparePosition"),compareSoftness:t.getUniformLocation(n,"u_compareSoftness"),compareLineWidth:t.getUniformLocation(n,"u_compareLineWidth")}}):(t.deleteProgram(n),t.deleteTexture(i),t.deleteTexture(r),null)}function pm(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function hm(e){if(!pm(e))return{...cn};let t=(n,i,r,o)=>{let a=typeof n=="number"?n:Number(n);return Math.min(o,Math.max(r,Number.isFinite(a)?a:i))};return{enabled:e.enabled===!0,position:t(e.position,cn.position,0,1),softness:t(e.softness,cn.softness,0,.25),lineWidth:t(e.lineWidth,cn.lineWidth,0,12)}}function Sl(e){try{let t=new URL(e,document.baseURI);return t.protocol==="data:"?{href:t.href}:t.protocol!=="http:"&&t.protocol!=="https:"?{error:"LUT must be project-local or a data URL"}:t.origin!==window.location.origin?{error:"Remote LUT URLs are not supported"}:{href:t.href}}catch{return{error:"Invalid LUT URL"}}}function Dr(e){return e instanceof Error?e.message:"LUT failed to load"}function gm(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0)%1e4}function xm(e){let t=e.id||e.currentSrc||e.getAttribute("src")||`${e.tagName}:${Array.prototype.indexOf.call(e.parentNode?.children??[],e)}`;return gm(t)}function bm(e){let t=Sl(e);if("error"in t)return{state:"error",message:t.error};let n=$e.get(t.href);if(n)return n;let i=fetch(t.href,{credentials:"same-origin"}).then(o=>{if(!o.ok)throw new Error(`Failed to load LUT (${o.status})`);return o.text()}).then(o=>ul(o,{maxSize:Mr})),r={state:"pending",promise:i};for(;$e.size>=um;){let o=$e.keys().next().value;if(!o)break;$e.delete(o)}return $e.set(t.href,r),i.then(o=>{$e.get(t.href)===r&&$e.set(t.href,{state:"ready",lut:o})},o=>{$e.get(t.href)===r&&$e.set(t.href,{state:"error",message:Dr(o)})}),r}function pl(e,t,n){if(e.lut?.src===t)return e.lut;let i=cl(n),{gl:r,program:o}=e;try{return r.activeTexture(r.TEXTURE2),r.bindTexture(r.TEXTURE_2D,o.lutTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,i.width,i.height,0,r.RGBA,r.UNSIGNED_BYTE,i.data),e.lut={src:t,size:n.size,domainMin:n.domainMin,domainMax:n.domainMax,textureWidth:i.width,textureHeight:i.height},e.lutError=null,e.lutLoadingSrc=null,e.lut}catch(a){return e.lut=null,e.lutError=Dr(a),e.lutLoadingSrc=null,T("runtime.colorGrading.uploadLut",a),null}}function Yn(e,t){e.deleteTexture(t.texture),e.deleteFramebuffer(t.framebuffer)}function El(e){let t=e.effectTargets;t&&(e.gl.deleteProgram(t.blurProgram.program),Yn(e.gl,t.scratch),Yn(e.gl,t.blur),e.effectTargets=null)}function Al(e){El(e),e.gl.deleteTexture(e.program.texture),e.gl.deleteTexture(e.program.lutTexture),e.gl.deleteBuffer(e.program.quad),e.gl.deleteProgram(e.program.program)}function ym(e){let t=yl(e.canvas);return t?(Al(e),e.gl=t.gl,e.program=t.program,e.lut=null,e.lutLoadingSrc=null,e.lutError=null,e.effectError=null,!0):!1}function kr(e){if(!e.sourceHidden)return;e.element.removeAttribute(Ht);let t=e.element.style.getPropertyValue("opacity"),n=e.element.style.getPropertyPriority("opacity");t==="0"&&n==="important"&&(e.sourceInlineOpacity===null?e.element.style.removeProperty("opacity"):e.element.style.setProperty("opacity",e.sourceInlineOpacity,e.sourceInlineOpacityPriority)),e.sourceHidden=!1}function Sm(e){if(e.effectTargets)return e.effectTargets;let{gl:t}=e,n=mm(t,e.program.quad),i=fl(t),r=fl(t);return!n||!i||!r?(n&&t.deleteProgram(n.program),i&&Yn(t,i),r&&Yn(t,r),e.effectError="Framebuffer effects unavailable",null):(e.effectError=null,e.effectTargets={blurProgram:n,scratch:i,blur:r},e.effectTargets)}function Em(e,t,n,i,r){let o=Math.max(1,Math.ceil(i)),a=Math.max(1,Math.ceil(r));return ml(e,t,o,a),ml(e,n,o,a),{width:o,height:a}}function hl(e,t,n,i,r,o,a){e.bindFramebuffer(e.FRAMEBUFFER,i.framebuffer),e.viewport(0,0,r.width,r.height),e.useProgram(t.program),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,n),e.uniform1i(t.source,0),e.uniform2f(t.resolution,r.width,r.height),e.uniform2f(t.direction,o.x,o.y),e.uniform1f(t.radius,a),e.bindBuffer(e.ARRAY_BUFFER,t.quad),e.enableVertexAttribArray(t.position),e.vertexAttribPointer(t.position,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLE_STRIP,0,4)}function Am(e,t,n,i,r,o,a){let c=n;for(let s=0;s<Math.max(1,Math.floor(a));s++)hl(e,t.blurProgram,c,t.scratch,r,{x:1,y:0},o),hl(e,t.blurProgram,t.scratch.texture,i,r,{x:0,y:1},o),c=i.texture}function wm(e){let t=e.grading.lut?.src.trim()??"",n=e.grading.lut?.intensity??1;if(!t||n<=0)return e.lut=null,e.lutLoadingSrc=null,e.lutError=null,null;let i=Sl(t);if("error"in i)return e.lut=null,e.lutLoadingSrc=null,e.lutError=i.error,null;if(e.lut?.src===i.href)return e.lut;e.lut=null;let r=bm(t);return r.state==="ready"?pl(e,i.href,r.lut):r.state==="error"?(e.lutError=r.message,e.lutLoadingSrc=null,null):(e.lutLoadingSrc!==i.href&&(e.lutLoadingSrc=i.href,e.lutError=null,r.promise.then(o=>{e.destroyed||e.grading.lut?.src.trim()!==t||(pl(e,i.href,o),De(e))},o=>{e.destroyed||e.grading.lut?.src.trim()!==t||(e.lut=null,e.lutError=Dr(o),e.lutLoadingSrc=null,De(e))})),null)}function Rr(e){if(!e)return null;if(typeof e=="string"){let t=e.trim();if(!t)return null;let n=document.getElementById(t.replace(/^#/,""));if(n&&ft(n))return n;try{let i=document.querySelector(t);return i&&ft(i)?i:null}catch{return null}}if(e.hfId){let t=document.querySelector(`[data-hf-id="${CSS.escape(e.hfId)}"]`);if(t&&ft(t))return t}if(e.id){let t=document.getElementById(e.id);if(t&&ft(t))return t}if(!e.selector)return null;try{let t=Array.from(document.querySelectorAll(e.selector)),n=Math.max(0,Math.floor(Number(e.selectorIndex??0)||0)),i=t[n]??null;return i&&ft(i)?i:null}catch{return null}}function Cm(e){return e instanceof HTMLVideoElement?e.videoWidth>0&&e.videoHeight>0?{width:e.videoWidth,height:e.videoHeight}:null:e instanceof HTMLImageElement&&e.naturalWidth>0&&e.naturalHeight>0?{width:e.naturalWidth,height:e.naturalHeight}:null}function wl(e){return e instanceof HTMLVideoElement?e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&e.videoWidth>0&&e.videoHeight>0:e instanceof HTMLImageElement?e.complete&&e.naturalWidth>0&&e.naturalHeight>0:!1}function _m(e){if(!e.id)return null;let t=document.getElementById(`__render_frame_${e.id}__`);return t instanceof HTMLImageElement&&wl(t)?t:null}function Fm(e){return e instanceof HTMLImageElement&&e.classList.contains("__render_frame__")}function Tm(e,t){t.parentNode&&t.nextSibling!==e.canvas&&t.parentNode.insertBefore(e.canvas,t.nextSibling)}function vm(e){if(e instanceof HTMLVideoElement){let t=_m(e);if(t)return t}return wl(e)?e:null}function gl(e,t){let n=e.toLowerCase();if(n==="center")return .5;if(t==="x"){if(n==="left")return 0;if(n==="right")return 1}else{if(n==="top")return 0;if(n==="bottom")return 1}if(n.endsWith("%")){let i=Number.parseFloat(n);return Number.isFinite(i)?i/100:null}return null}function Mm(e){let t=e.trim().split(/\\s+/).filter(Boolean),n=.5,i=.5;for(let r=0;r<t.length;r++){let o=t[r]??"",a=gl(o,"x"),c=gl(o,"y");if(a!==null&&(o==="left"||o==="right"||o.endsWith("%")&&r===0)){n=a;continue}if(c!==null&&(o==="top"||o==="bottom"||o.endsWith("%")&&r>0)){i=c;continue}}return{x:n,y:i}}function Nm(e,t,n,i,r,o){if(e<=0||t<=0||n<=0||i<=0)return{scaleX:1,scaleY:1,offsetX:0,offsetY:0};let a=r||"fill",c=e,s=t;if(a==="contain"||a==="cover"||a==="scale-down"){let d=a==="cover"?Math.max(e/n,t/i):Math.min(e/n,t/i);c=n*d,s=i*d,a==="scale-down"&&c>n&&s>i&&(c=n,s=i)}else a==="none"&&(c=n,s=i);let l=Mm(o||"center"),f=(e-c)*l.x/e,p=(t-s)*l.y/t;return{scaleX:c/e,scaleY:s/t,offsetX:f,offsetY:p}}function Rm(e,t){window.getComputedStyle(t).position==="static"&&(e.touchedParent||(e.touchedParent=t,e.parentInlinePosition=t.style.position||null),t.style.position="relative")}function Lm(e,t){let{element:n,canvas:i}=e,r=n.parentElement;r&&Rm(e,r);let o=window.getComputedStyle(t);ts(i.style,o),i.style.pointerEvents="none",i.style.position="absolute",i.style.inset="auto",i.style.left=`${n.offsetLeft}px`,i.style.top=`${n.offsetTop}px`,i.style.right="auto",i.style.bottom="auto",i.style.width=`${n.offsetWidth}px`,i.style.height=`${n.offsetHeight}px`,i.style.display="block",i.style.opacity=e.sourceOpacityForCanvas,i.style.visibility=e.sourceVisibleForCanvas?"visible":"hidden";let a=n.getBoundingClientRect(),c=Math.max(0,Math.round(n.offsetWidth||a.width)),s=Math.max(0,Math.round(n.offsetHeight||a.height));return c<=0||s<=0?(i.style.display="none",null):(i.width!==c&&(i.width=c),i.height!==s&&(i.height=s),{width:c,height:s})}function km(e,t,n,i,r,o,a,c,s){e.uniform1i(t.source,0),e.uniform1i(t.blurSource,1),e.uniform1i(t.lut,2),e.uniform2f(t.resolution,a.width,a.height),e.uniform2f(t.uvScale,c.scaleX,c.scaleY),e.uniform2f(t.uvOffset,c.offsetX,c.offsetY),e.uniform1f(t.blurReady,r?1:0),e.uniform1f(t.lutEnabled,i?1:0),e.uniform1f(t.lutSize,i?.size??2),e.uniform2f(t.lutTextureSize,i?.textureWidth??1,i?.textureHeight??1),e.uniform3f(t.lutDomainMin,i?.domainMin[0]??0,i?.domainMin[1]??0,i?.domainMin[2]??0),e.uniform3f(t.lutDomainMax,i?.domainMax[0]??1,i?.domainMax[1]??1,i?.domainMax[2]??1),e.uniform1f(t.lutIntensity,n.lut?.intensity??0),e.uniform1f(t.exposure,n.adjust.exposure),e.uniform1f(t.contrast,n.adjust.contrast),e.uniform1f(t.highlights,n.adjust.highlights),e.uniform1f(t.shadows,n.adjust.shadows),e.uniform1f(t.whites,n.adjust.whites),e.uniform1f(t.blacks,n.adjust.blacks),e.uniform1f(t.temperature,n.adjust.temperature),e.uniform1f(t.tint,n.adjust.tint),e.uniform1f(t.vibrance,n.adjust.vibrance),e.uniform1f(t.saturation,n.adjust.saturation),e.uniform1f(t.vignette,n.details.vignette),e.uniform1f(t.vignetteMidpoint,n.details.vignetteMidpoint),e.uniform1f(t.vignetteRoundness,n.details.vignetteRoundness),e.uniform1f(t.vignetteFeather,n.details.vignetteFeather),e.uniform1f(t.grain,n.details.grain),e.uniform1f(t.grainSize,n.details.grainSize),e.uniform1f(t.grainRoughness,n.details.grainRoughness),e.uniform1f(t.grainSeed,s),e.uniform1f(t.blur,n.effects.blur),e.uniform1f(t.pixelate,n.effects.pixelate),e.uniform1f(t.intensity,n.intensity),e.uniform1f(t.compareEnabled,o.enabled?1:0),e.uniform1f(t.comparePosition,o.position),e.uniform1f(t.compareSoftness,o.softness),e.uniform1f(t.compareLineWidth,o.lineWidth)}function Dm(e){if(!e.sourceHidden){let t=e.element.getAttribute(vn);t!==null?(e.sourceInlineOpacity=t===""?null:t,e.sourceInlineOpacityPriority=""):(e.sourceInlineOpacity=e.element.style.getPropertyValue("opacity")||null,e.sourceInlineOpacityPriority=e.element.style.getPropertyPriority("opacity"))}e.element.setAttribute(Ht,"true"),e.element.style.setProperty("opacity","0","important"),e.sourceHidden=!0}function De(e){if(e.destroyed||e.contextLost)return!1;let t=vm(e.element);if(!t)return e.hasDrawn||(e.canvas.style.display="none"),!1;let n=Cm(t);if(!n)return!1;let i=t instanceof HTMLElement?t:e.element,r=e.element.style.getPropertyValue("opacity"),o=e.element.style.getPropertyPriority("opacity"),a=e.sourceHidden&&r==="0"&&o==="important",c=e.element.style.getPropertyValue("visibility"),s=Fm(t);if(s&&Tm(e,t),s||!a){let S=window.getComputedStyle(s?t:e.element);e.sourceOpacityForCanvas=S.opacity||"1",e.sourceVisibleForCanvas=(s||c!=="hidden")&&S.visibility!=="hidden"}let l=Lm(e,i);if(!l)return!1;let f=window.getComputedStyle(i),p=Nm(l.width,l.height,n.width,n.height,f.objectFit,f.objectPosition),{gl:d,program:x}=e;try{let S=wm(e);d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,x.texture),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!0),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,t);let y=!1,b=Math.min(1,Math.max(0,e.grading.effects.blur));if(b>0){let _=Sm(e);if(_){let M=Em(d,_.scratch,_.blur,l.width,l.height);Am(d,_,x.texture,_.blur,M,.75+Math.pow(b,1.35)*32,b>.55?3:2),y=!0}}else e.effectError=null,e.effectTargets&&El(e);d.bindFramebuffer(d.FRAMEBUFFER,null),d.viewport(0,0,l.width,l.height),d.useProgram(x.program),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,x.texture),d.activeTexture(d.TEXTURE1),d.bindTexture(d.TEXTURE_2D,e.effectTargets?.blur.texture??x.texture),d.activeTexture(d.TEXTURE2),d.bindTexture(d.TEXTURE_2D,x.lutTexture);let A=e.grainSeed+(e.element instanceof HTMLVideoElement?Math.floor(e.element.currentTime*60):0);return km(d,x,e.grading,S,y,e.compare,l,p,A),d.bindBuffer(d.ARRAY_BUFFER,x.quad),d.enableVertexAttribArray(x.position),d.vertexAttribPointer(x.position,2,d.FLOAT,!1,0,0),d.drawArrays(d.TRIANGLE_STRIP,0,4),Dm(e),e.hasDrawn=!0,e.drawError=null,!0}catch(S){return e.drawError=S instanceof Error?S.message:"Shader draw failed",T("runtime.colorGrading.drawEntry",S),!1}}function Ge(e,t,n,i){t.addEventListener(n,i),e.cleanup.push(()=>t.removeEventListener(n,i))}function Im(e){e.animationFrame!==null&&(window.cancelAnimationFrame(e.animationFrame),e.animationFrame=null),e.videoFrameHandle!==null&&e.element instanceof HTMLVideoElement&&(e.element.cancelVideoFrameCallback?.(e.videoFrameHandle),e.videoFrameHandle=null)}function dn(e){if(e.destroyed||!(e.element instanceof HTMLVideoElement)||e.videoFrameHandle!==null||e.animationFrame!==null)return;let t=e.element,n=t;if(typeof n.requestVideoFrameCallback=="function"){e.videoFrameHandle=n.requestVideoFrameCallback(()=>{e.videoFrameHandle=null,De(e),!e.destroyed&&!t.paused&&!t.ended&&dn(e)});return}e.animationFrame=window.requestAnimationFrame(()=>{e.animationFrame=null,De(e),!e.destroyed&&!t.paused&&!t.ended&&dn(e)})}function Pm(e){let t=()=>{De(e)};if(Ge(e,e.element,"load",t),Ge(e,e.element,"loadedmetadata",t),Ge(e,e.element,"loadeddata",t),Ge(e,e.element,"seeked",t),Ge(e,e.element,"timeupdate",t),Ge(e,window,"resize",t),e.element instanceof HTMLVideoElement&&(Ge(e,e.element,"play",()=>dn(e)),Ge(e,e.element,"pause",t)),Ge(e,e.canvas,"webglcontextlost",n=>{n.preventDefault(),e.contextLost=!0,e.drawError="WebGL context lost",e.canvas.style.display="none",kr(e)}),Ge(e,e.canvas,"webglcontextrestored",()=>{if(e.contextLost=!1,!ym(e)){e.contextLost=!0,e.drawError="WebGL context restore failed",kr(e);return}e.drawError=null,De(e)}),typeof ResizeObserver<"u"&&(e.resizeObserver=new ResizeObserver(t),e.resizeObserver.observe(e.element)),typeof MutationObserver<"u"){let n=()=>{let a=e.element.style;return`${a.transform}|${a.translate}|${a.rotate}|${a.scale}|${a.left}|${a.top}|${a.width}|${a.height}`},i=n(),r=!1,o=new MutationObserver(()=>{r||n()!==i&&(r=!0,requestAnimationFrame(()=>{r=!1,i=n(),De(e)}))});o.observe(e.element,{attributes:!0,attributeFilter:["style"]}),e.cleanup.push(()=>o.disconnect())}}function Om(e){if(!e.destroyed){e.destroyed=!0,Im(e),e.resizeObserver?.disconnect();for(let t of e.cleanup)t();e.cleanup.length=0,e.canvas.remove(),Al(e),kr(e),e.touchedParent&&(e.parentInlinePosition===null?e.touchedParent.style.removeProperty("position"):e.touchedParent.style.position=e.parentInlinePosition)}}function Bm(e){let t=document.createElement("canvas");return e.id&&(t.id=`${Jo}${e.id}`),t.className=lm,t.setAttribute(am,"true"),t.setAttribute("data-hyperframes-ignore",""),t.setAttribute("data-hyperframes-picker-ignore",""),t.setAttribute("data-hf-ignore",""),t.setAttribute("aria-hidden","true"),t.style.pointerEvents="none",t.style.display="none",e.parentNode?.insertBefore(t,e.nextSibling),t}function Cl(){let e=new WeakMap,t=new Set,n=null,i=!1,r=(y,b,A)=>{let _=e.get(y);if(_)return _.grading=b,_.source=A,De(_),y instanceof HTMLVideoElement&&!y.paused&&dn(_),!0;let M=Bm(y),G=yl(M);if(!G)return M.remove(),!1;let D={element:y,canvas:M,gl:G.gl,program:G.program,grading:b,compare:{...cn},lut:null,lutLoadingSrc:null,lutError:null,drawError:null,effectTargets:null,effectError:null,source:A,animationFrame:null,videoFrameHandle:null,resizeObserver:null,cleanup:[],touchedParent:null,parentInlinePosition:null,sourceHidden:!1,sourceInlineOpacity:null,sourceInlineOpacityPriority:"",sourceOpacityForCanvas:window.getComputedStyle(y).opacity||"1",sourceVisibleForCanvas:window.getComputedStyle(y).visibility!=="hidden",hasDrawn:!1,contextLost:!1,grainSeed:xm(y),destroyed:!1};return e.set(y,D),t.add(y),Pm(D),De(D),y instanceof HTMLVideoElement&&!y.paused&&dn(D),!0},o=(y,b)=>{if(i)return!1;let A=Rr(y);if(!A)return!1;let _=e.get(A);if(!_){let M=Nr(A);if(!Gt(M)||!r(A,M,"attribute"))return!1;_=e.get(A)}return _?(_.compare=hm(b),De(_),!0):!1},a=y=>{let b=e.get(y);b&&(Om(b),e.delete(y),t.delete(y))},c=()=>{if(i)return 0;let y=new Set;document.querySelectorAll(`video[${Ve}], img[${Ve}]`).forEach(A=>{if(!ft(A))return;y.add(A);let _=Nr(A);Gt(_)?r(A,_,"attribute"):a(A)});for(let A of Array.from(t)){let _=e.get(A);_&&(!A.isConnected||_.source==="attribute"&&!y.has(A))&&a(A)}return t.size},s=()=>{if(i)return 0;let y=0;for(let b of Array.from(t,A=>e.get(A)))b&&De(b)&&(y+=1);return y},l=(y,b)=>{if(i)return!1;let A=Rr(y);if(!A)return!1;let _=ki(b);return Gt(_)?r(A,_,"live"):(a(A),!0)},f=(y,b)=>{if(!ft(y))return!1;let A=e.get(y);return A?(A.sourceVisibleForCanvas=b,!0):!1},p=y=>{let b=Rr(y);if(!b)return{state:"missing",message:"Media not found"};let A=e.get(b);if(A)return A.effectError?{state:"unavailable",message:A.effectError}:A.drawError?{state:"unavailable",message:A.drawError}:A.lutError?{state:"unavailable",message:`LUT error: ${A.lutError}`}:A.grading.lut&&A.lutLoadingSrc?{state:"pending",message:"Loading LUT"}:A.canvas.style.display==="none"?{state:"pending",message:"Waiting for media frame"}:{state:"active",message:A.lut?"Shader + LUT active":"Shader active"};let _=Nr(b);return Gt(_)?{state:"unavailable",message:"WebGL unavailable"}:{state:"inactive",message:"No grading applied"}},d=()=>{if(!i){i=!0,n?.disconnect(),n=null;for(let y of Array.from(t))a(y)}};document.body&&(n=new MutationObserver(()=>c()),n.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[Ve]}));let x={refresh:c,redraw:s,setGrading:l,setCompare:o,setSourceVisibility:f,getStatus:p,destroy:d},S=window;return S.__hf=S.__hf||{},S.__hf.colorGrading=x,c(),x}var Xn=class{constructor(t){me(this,"_baseTime",0);me(this,"_playStartMs",null);me(this,"_rate",1);me(this,"_duration",1/0);me(this,"_nowMs");me(this,"_audioSource",null);this._baseTime=t?.initialTime??0,this._rate=t?.rate??1,this._duration=t?.duration??1/0,this._nowMs=t?.nowMs??(()=>performance.now())}now(){if(this._playStartMs===null)return this._baseTime;if(this._audioSource){let i=null;if("currentTimeSeconds"in this._audioSource)i=this._audioSource.currentTimeSeconds;else{let{el:r,compositionStart:o,mediaStart:a}=this._audioSource;!r.paused&&Number.isFinite(r.currentTime)&&(i=(r.currentTime-a)/(r.playbackRate>0?r.playbackRate:1)*this._rate+o)}if(i!==null)return Number.isFinite(this._duration)&&i>=this._duration?this._duration:Math.max(0,i)}let t=(this._nowMs()-this._playStartMs)/1e3,n=this._baseTime+t*this._rate;return Number.isFinite(this._duration)&&n>=this._duration?this._duration:Math.max(0,n)}play(){return this._playStartMs!==null||Number.isFinite(this._duration)&&this._baseTime>=this._duration?!1:(this._playStartMs=this._nowMs(),!0)}pause(){return this._playStartMs===null?!1:(this._baseTime=this.now(),this._playStartMs=null,!0)}seek(t){let n=Number.isFinite(this._duration)?Math.max(0,Math.min(t,this._duration)):Math.max(0,t);this._baseTime=n,this._playStartMs!==null&&(this._playStartMs=this._nowMs())}isPlaying(){return this._playStartMs!==null}setRate(t){let n=Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1;this._playStartMs!==null&&(this._baseTime=this.now(),this._playStartMs=this._nowMs()),this._rate=n}getRate(){return this._rate}setDuration(t){this._duration=Number.isFinite(t)&&t>0?t:1/0,this._baseTime>this._duration&&(this._baseTime=this._duration)}getDuration(){return this._duration}attachAudioSource(t){this._audioSource=t}detachAudioSource(){this._audioSource&&this._playStartMs!==null&&(this._baseTime=this.now(),this._playStartMs=this._nowMs()),this._audioSource=null}hasAudioSource(){return this._audioSource!==null}getSource(){if(this._audioSource&&this._playStartMs!==null){if("currentTimeSeconds"in this._audioSource)return"audio";let{el:t}=this._audioSource;if(!t.paused&&Number.isFinite(t.currentTime))return"audio"}return"monotonic"}snapshot(){return{time:this.now(),playing:this.isPlaying(),rate:this._rate,duration:this._duration,source:this.getSource()}}reachedEnd(){return Number.isFinite(this._duration)&&this.now()>=this._duration}};function _l(e){return!Number.isFinite(e)||e<=0?1:e}function Hm(e,t){t||e.paused||!yn().__hfDebug||console.debug("[hyperframes] webAudioTransport claimed fallback-playing element:",e.currentSrc||e.getAttribute("src")||"")}function Gm(e,t){let{elapsed:n,mediaStart:i,scheduledAt:r,safeRate:o,clipDuration:a}=t,c=Number.isFinite(a)&&a>0,s=a*o;if(n>=0){let f=s-n;return c&&f<=0?!1:(c?e.start(0,n+i,f):e.start(0,n+i),!0)}let l=-n/o;return c?e.start(r+l,i,s):e.start(r+l,i),!0}var Qn=class{constructor(){me(this,"_ctx",null);me(this,"_bufferCache",new Map);me(this,"_failedSrcs",new Set);me(this,"_activeSources",[]);me(this,"_masterGain",null);me(this,"_rateAnchorCtx",0);me(this,"_rateAnchorComp",0);me(this,"_rate",1);me(this,"_paused",!0);me(this,"_playGeneration",0)}async init(){try{return this._ctx=new AudioContext,this._masterGain=this._ctx.createGain(),this._masterGain.connect(this._ctx.destination),!0}catch{return!1}}get context(){return this._ctx}getTime(){return!this._ctx||this._paused?-1:this._rateAnchorComp+(this._ctx.currentTime-this._rateAnchorCtx)*this._rate}async decodeAudioElement(t){let n=t.currentSrc||t.getAttribute("src");if(!n)return null;if(this._bufferCache.has(n))return this._bufferCache.get(n);if(this._failedSrcs.has(n)||!this._ctx)return null;let i;try{let r=await fetch(n,{cache:"no-store"});if(!r.ok)return T("webAudioTransport.fetch",new Error(`${r.status} ${n}`)),null;i=await r.arrayBuffer()}catch(r){return T("webAudioTransport.fetch",r),null}try{let r=await this._ctx.decodeAudioData(i);return this._bufferCache.set(n,r),r}catch(r){return this._failedSrcs.add(n),T("webAudioTransport.decode",r),null}}startGeneration(){return this._playGeneration+=1,this._playGeneration}currentGeneration(){return this._playGeneration}async schedulePlayback(t,n,i,r,o,a,c,s=1,l=Number.POSITIVE_INFINITY){if(!this._ctx||!this._masterGain||c!==this._playGeneration)return null;try{if(this._ctx.state==="suspended"&&await this._ctx.resume(),c!==this._playGeneration)return null;let f=_l(s),p=this._ctx.createBufferSource();p.buffer=n,p.playbackRate.value=f;let d=this._ctx.createGain();d.gain.value=a,p.connect(d),d.connect(this._masterGain);let x=o-i,S=this._ctx.currentTime;if(this._rate=f,this._rateAnchorCtx=S,this._rateAnchorComp=o,!Gm(p,{elapsed:x,mediaStart:r,scheduledAt:S,safeRate:f,clipDuration:l}))return p.disconnect(),d.disconnect(),null;let y=t.muted;t.muted=!0,Hm(t,y);let b={el:t,sourceNode:p,gainNode:d,compositionStart:i,mediaStart:r,scheduledAt:S,priorMuted:y,bounded:Number.isFinite(l)&&l>0};return this._activeSources.push(b),this._paused=!1,p.addEventListener("ended",()=>{let A=this._activeSources.indexOf(b);A!==-1&&(this._activeSources.splice(A,1),t.muted=y,this._activeSources.length===0&&(this._paused=!0))}),b}catch(f){return T("webAudioTransport.schedule",f),null}}setRate(t){let n=_l(t);if(n===this._rate)return!1;this._ctx&&!this._paused&&(this._rateAnchorComp=this.getTime(),this._rateAnchorCtx=this._ctx.currentTime),this._rate=n;for(let i of this._activeSources)try{i.sourceNode.playbackRate.value=n}catch(r){T("webAudioTransport.setRate",r)}return!0}hasBoundedActiveSources(){return this._activeSources.some(t=>t.bounded)}stopAll(){for(let t of this._activeSources){try{t.sourceNode.stop(),t.sourceNode.disconnect(),t.gainNode.disconnect()}catch{}t.el.muted=t.priorMuted}this._activeSources=[],this._paused=!0}setVolume(t){this._masterGain&&(this._masterGain.gain.value=Math.max(0,Math.min(1,t)))}setElementVolume(t,n){let i=Math.max(0,Math.min(1,n));for(let r of this._activeSources)if(r.el===t)try{r.gainNode.gain.value=i}catch(o){T("webAudioTransport.setElementVolume",o)}}setMuted(t){this._masterGain&&(this._masterGain.gain.value=t?0:1)}isActive(){return this._activeSources.length>0&&!this._paused}ownsElement(t){return!this._paused&&this._activeSources.some(n=>n.el===t)}destroy(){if(this.stopAll(),this._bufferCache.clear(),this._failedSrcs.clear(),this._ctx)try{this._ctx.close()}catch{}this._ctx=null,this._masterGain=null}};var Fl="data-hf-studio-manual-edit-gesture";function Tl(e){return!Number.isInteger(e.tick)||e.tick<=0||e.tick%60!==0?!1:!(e.isPlaying&&e.hasCapturedTimeline&&e.currentTimeSeconds<2)}var Ir="data-hf-authored-duration",Pr="data-hf-authored-end",vl=!1;function qe(e){if(e){if(typeof e.pause!="function"){vl||(vl=!0,Je("timeline_missing_pause",{}));return}try{e.pause()}catch(t){T("runtime.timeline.pause",t)}}}function Um(){let e=window.__HF_EXPORT_RENDER_SEEK_CONFIG,t=e?.fps,n=e?.fpsSource,i=Number(t);return!e||t==null?{fps:null,source:"default",rawFpsSource:n,rawFps:t,fallbackReason:"missing"}:!Number.isFinite(i)||i<=0?{fps:null,source:"default",rawFpsSource:n,rawFps:t,fallbackReason:"invalid"}:{fps:i,source:n==="render-options"||n==="default"?n:"unknown",rawFpsSource:n,rawFps:t,fallbackReason:e.fpsFallbackReason}}function Ml(){let e=rs();qn(document),Tr(document);let t=Um();e.canonicalFps=t.fps??e.canonicalFps,co(e.canonicalFps),window.__HF_EXPORT_RENDER_SEEK_CONFIG&&console.info("[hyperframes] render runtime fps",{canonicalFps:e.canonicalFps,source:t.source,rawFpsSource:t.rawFpsSource,rawFps:t.rawFps,fallbackReason:t.fallbackReason});let n=null,i=null,r=null,o=[],a=new Set,c=null;if(typeof window.__hfRuntimeTeardown=="function")try{window.__hfRuntimeTeardown()}catch(u){T("runtime.init.site1",u)}let s=new Xn;e.transportClock=s;let l=new Qn,f=!1;l.init().then(u=>{f=u}),(()=>{let u=window.gsap,m=window;if(!(!u?.registerPlugin||m.__hfAutoNoopRegistered))try{u.registerPlugin({name:"_auto",init:()=>!1}),m.__hfAutoNoopRegistered=!0}catch{}})(),document.documentElement&&(document.documentElement.style.margin="0",document.documentElement.style.padding="0",document.documentElement.style.overflow="hidden"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden");try{bo(document)}catch(u){T("runtime.init.cssVariables",u)}window.__timelines=window.__timelines||{};let d=()=>{let u=document.querySelector(\'[data-composition-id][data-root="true"]\');if(u instanceof HTMLElement)return u;let m=Array.from(document.querySelectorAll("[data-composition-id]"));return m.find(g=>!g.parentElement?.closest("[data-composition-id]"))??m[0]??null};if(Array.isArray(window.__timelines)){let u=window.__timelines,m=d()?.getAttribute("data-composition-id")??"root",g={};if(u.length===1)g[m]=u[0];else for(let h=0;h<u.length;h++)g[`tl-${h}`]=u[h];window.__timelines=g}let x=d();x&&!x.hasAttribute("data-start")&&x.setAttribute("data-start","0");let S=u=>{o.push(u)},y=(u,m,g)=>{let h=g??`${u}:${JSON.stringify(m)}`;a.has(h)||(a.add(h),he({source:"hf-preview",type:"diagnostic",code:u,details:m}))},b=u=>{let m={scale:1,focusX:960,focusY:540},g=[],h=[],E={time:u.getTime(),duration:u.getDuration(),isPlaying:u.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:u.play,pause:u.pause,seek:u.seek,getTime:u.getTime,getDuration:u.getDuration,isPlaying:u.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>m,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>g,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:u.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>h,getRenderState:()=>({...E,time:u.getTime(),duration:u.getDuration(),isPlaying:u.isPlaying()})}},A=1/60,_=.75,M=.05,G=100,D=240,v=u=>{if(u instanceof Error)return u.message||String(u);if(typeof u=="string")return u;try{return JSON.stringify(u)}catch{return String(u??"")}},w=u=>{let m=u.toLowerCase();return m.includes("cannot read properties of null")||m.includes("cannot set properties of null")?{code:"runtime_null_dom_access",category:"dom-null-access"}:m.includes("failed to execute \'queryselector\'")?{code:"runtime_invalid_selector",category:"selector-invalid"}:m.includes("is not defined")?{code:"runtime_reference_missing",category:"reference-missing"}:{code:"runtime_script_error",category:"script-error"}},C=u=>{if(u==null||u.trim()==="")return null;let m=Number.parseFloat(u);return!Number.isFinite(m)||m<=0?null:`${m}px`},F=()=>d(),R=()=>{let u=F();if(!u)return;let m=C(u.getAttribute("data-width")),g=C(u.getAttribute("data-height"));m&&(u.style.width=m),g&&(u.style.height=g),m&&u.style.setProperty("--comp-width",m),g&&u.style.setProperty("--comp-height",g)},L=()=>{let u=F(),m=Array.from(document.querySelectorAll("[data-composition-id]")).filter(g=>g.hasAttribute("data-duration")||g.hasAttribute("data-end"));for(let g of m){if(u&&g===u)continue;let h=g.getAttribute("data-duration"),E=g.getAttribute("data-end");h!=null&&!g.hasAttribute(Ir)&&g.setAttribute(Ir,h),E!=null&&!g.hasAttribute(Pr)&&g.setAttribute(Pr,E),g.removeAttribute("data-duration"),g.removeAttribute("data-end")}},z=()=>{let u=F();if(!u)return;u.style.position||(u.style.position="relative"),u.style.overflow="hidden";let m=C(u.getAttribute("data-width")),g=C(u.getAttribute("data-height"));m&&(u.style.width=m),g&&(u.style.height=g);let h=Array.from(u.children);for(let E of h){let N=E.tagName.toLowerCase();if(N==="script"||N==="style"||N==="link"||N==="meta"||!E.hasAttribute("data-start")||E.hasAttribute("data-hf-autostamped"))continue;let O=(E.style.top==="0px"||E.style.top==="0")&&(E.style.left==="0px"||E.style.left==="0")&&E.style.width==="100%"&&E.style.height==="100%",ee=/translate\\(\\s*-50%\\s*,\\s*-50%\\s*\\)/.test(E.style.transform);if(O&&ee&&!E.hasAttribute("data-width")&&!E.hasAttribute("data-height")){let ye=E.style.top,kt=E.style.left,Se=E.style.width,Dt=E.style.height;E.style.top="",E.style.left="",E.style.width="",E.style.height="";let ne=window.getComputedStyle(E);ne.top!=="auto"||ne.bottom!=="auto"||ne.left!=="auto"||ne.right!=="auto"||ne.width!=="0px"||ne.height!=="0px"||(E.style.top=ye,E.style.left=kt,E.style.width=Se,E.style.height=Dt)}let K=window.getComputedStyle(E),de=K.position;if(de!=="absolute"&&de!=="fixed"&&(E.style.position="absolute"),!!E.style.top||!!E.style.bottom||K.top!=="auto"||K.bottom!=="auto"||(E.style.top="0"),!!E.style.left||!!E.style.right||K.left!=="auto"||K.right!=="auto"||(E.style.left="0"),N!=="audio"){let ye=C(E.getAttribute("data-width")),kt=C(E.getAttribute("data-height")),Se=K.width!=="0px"&&K.width!=="auto",Dt=K.height!=="0px"&&K.height!=="auto";ye?!E.style.width&&!Se&&(E.style.width=ye):!E.style.width&&K.width==="0px"&&(E.style.width="100%"),kt?!E.style.height&&!Dt&&(E.style.height=kt):!E.style.height&&K.height==="0px"&&(E.style.height="100%")}}},P=(u,m=0,g)=>Ye({timelineRegistry:window.__timelines??{},includeAuthoredTimingAttrs:g?.includeAuthoredTimingAttrs??!0}).resolveStartForElement(u,m),X=(u,m)=>Ye({timelineRegistry:window.__timelines??{},includeAuthoredTimingAttrs:m?.includeAuthoredTimingAttrs??!0}).resolveDurationForElement(u),I=(u,m=0)=>!u.hasAttribute("data-hf-auto-start")&&u.hasAttribute("data-start")?Math.max(0,Number(u.getAttribute("data-start")??0)||0)+m:P(u,m),ie=(u,m)=>{let g=u.tagName.toLowerCase();if(g==="script"||g==="style"||g==="link"||g==="meta")return!1;let h=g==="video"||g==="audio"?I(u,0):P(u,0),E=X(u),N=u.getAttribute("data-composition-id");if(N){let ee=(window.__timelines??{})[N],K=null;if(ee&&typeof ee.duration=="function"){let ge=Number(ee.duration());Number.isFinite(ge)&&ge>0&&(K=ge)}!(u.hasAttribute("data-duration")||u.hasAttribute("data-end")||u.hasAttribute(Ir)||u.hasAttribute(Pr))&&(E==null||E<=0)&&K!=null&&(E=K)}let O=E!=null&&E>0?h+E:Number.POSITIVE_INFINITY;return m>=h&&(Number.isFinite(O)?m<O:!0)},Fe=!!document.querySelector("[data-composition-src]"),j=!1;{let u=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let m of u){let g=m.getAttribute("data-composition-id");if(g&&m.children.length===0&&document.querySelector(`template#${CSS.escape(g)}-template`)){j=!0;break}}}let Y=!Fe&&!j,B=u=>{if(!u||typeof u.duration!="function")return null;try{let m=Number(u.duration());return Number.isFinite(m)?Math.max(0,m):null}catch{return null}},V=u=>typeof u=="number"&&Number.isFinite(u)&&u>A,Ae=u=>{let m=Number(u.getAttribute("data-duration"));if(Number.isFinite(m)&&m>0)return m;let g=Number(u.getAttribute("data-playback-start")??u.getAttribute("data-media-start")??"0"),h=Number.isFinite(g)?Math.max(0,g):0;return Number.isFinite(u.duration)&&u.duration>h?Math.max(0,u.duration-h):null},U=()=>{let u=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(u.length===0)return null;let m=0;for(let g of u){let h=I(g,0);if(!Number.isFinite(h))continue;let E=Ae(g);E==null||E<=A||(m=Math.max(m,Math.max(0,h)+E))}return m>A?m:null},k=()=>{let u=F();if(!u)return null;let m=window.__timelines??{},g=Ye({timelineRegistry:m,includeAuthoredTimingAttrs:!0}),h=0,E=Number.parseFloat(u.getAttribute("data-duration")??"");Number.isFinite(E)&&E>0&&(h=E);let N=Array.from(u.querySelectorAll("[data-composition-id][data-start]"));for(let O of N){if(!(O instanceof Element)||O.parentElement?.closest("[data-composition-id]")!==u)continue;let K=g.resolveStartForElement(O,0),de=g.resolveDurationForElement(O);!Number.isFinite(K)||de==null||de<=0||(h=Math.max(h,Math.max(0,K)+de))}return h>A?h:null},H=()=>{let u=U();return typeof u!="number"||!Number.isFinite(u)||u<=A?null:u},ae=u=>V(u)?Math.max(A,u*_):A,oe=()=>{let u=0;for(let m of e.deterministicAdapters){let g=m.getInferredDurationSeconds;if(typeof g!="function")continue;let h=null;try{h=g()}catch(E){T("runtime.init.adapterDuration",E)}typeof h=="number"&&Number.isFinite(h)&&h>0&&(u=Math.max(u,h))}return u>A?u:null},W=(u,m=0)=>{let g=B(u),h=H(),E=k(),N=oe(),O=Math.max(h??0,E??0,N??0),ee=Number.isFinite(m)&&m>A?m:0,K=0;return V(g)?K=Math.max(g,O,ee):V(O)?K=Math.max(O,ee):K=ee,K>0?Math.max(0,K):0},q=()=>{let u=window.__timelines??{},m=ne=>{let Q=Object.entries(u).filter(re=>!!re[1]&&typeof re[1].play=="function"&&typeof re[1].pause=="function");if(Q.length!==1)return{timeline:null};let ce=Q[0];if(!ce)return{timeline:null};let[fe,pe]=ce;return{timeline:pe,selectedTimelineIds:[fe],selectedDurationSeconds:B(pe),diagnostics:{code:"root_timeline_sole_registered_fallback",details:{reason:ne,soleTimelineId:fe}}}},g=Ye({timelineRegistry:u,includeAuthoredTimingAttrs:!0}),h=H(),E=k(),N=Math.max(h??0,E??0)||null,O=ae(N),ee=ne=>{let Q=document.querySelector(`[data-composition-id="${CSS.escape(ne)}"]`);return Q?g.resolveStartForElement(Q,0):0},K=ne=>{let Q=window.gsap;if(!Q||typeof Q.timeline!="function")return null;let ce=Q.timeline({paused:!0});for(let fe of ne)ce.add(fe.timeline,ee(fe.compositionId));return ce},de=(ne,Q)=>{if(!V(ne))return null;let ce=window.gsap;if(!ce||typeof ce.timeline!="function")return null;let fe=ce.timeline({paused:!0});if(Q)try{fe.add(Q,0)}catch(re){T("runtime.init.site2",re)}let pe=fe;if(typeof pe.to=="function")try{pe.to({},{duration:ne})}catch(re){T("runtime.init.site3",re)}return fe},ge=(ne,Q)=>{let ce=ne;if(typeof ce.getChildren!="function")return[];try{let fe=ce.getChildren(!0,!0,!0)??[];if(!Array.isArray(fe))return[];let pe=[];for(let re of Q)if(!fe.some(Re=>Re===re.timeline))try{let Re=ee(re.compositionId);ne.add(re.timeline,Re),pe.push(re.compositionId)}catch(Re){T("runtime.init.site4",Re)}return pe}catch{return[]}},le=F(),te=le?.getAttribute("data-composition-id")??null;if(!te)return m("root_missing_composition_id");let ye=u[te]??null,Se=(()=>{if(!le)return[];let ne=new Set,Q=Array.from(le.querySelectorAll("[data-composition-id]")),ce=[];for(let fe of Q){let pe=fe.getAttribute("data-composition-id");if(!pe||pe===te||ne.has(pe))continue;ne.add(pe);let re=u[pe]??null;if(!re||typeof re.play!="function"||typeof re.pause!="function")continue;let _e=B(re);ce.push({compositionId:pe,timeline:re,durationSeconds:_e??0})}return ce})(),Dt=ne=>{for(let Q of ne){let ce=Q.timeline;if(typeof ce.paused=="function")try{ce.paused(!1)}catch(fe){T("runtime.init.site5",fe)}}};if(Se.length>0&&Dt(Se),ye){let ne=Se.length>0?ge(ye,Se):[];if((Se.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id=\'"+te+"\'])"))&&($=!0),ne.length>0)try{let re=ye.time();ye.seek(re,!1)}catch{}let Q=B(ye);if(!V(Q)&&Se.length>0){let re=Se.map(bu=>bu.compositionId),_e=K(Se),Re=B(_e);if(_e&&V(Re))return{timeline:_e,selectedTimelineIds:re,selectedDurationSeconds:Re,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:te,rootDurationSeconds:Q,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:O,selectedDurationSeconds:Re,mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:E,selectedTimelineIds:re,autoNestedChildren:ne}}};let mi=de(N??0,ye),pi=B(mi);if(mi&&V(pi))return{timeline:mi,selectedTimelineIds:[te],selectedDurationSeconds:pi,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:te,rootDurationSeconds:Q,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:E,selectedDurationSeconds:pi,selectedTimelineIds:[te],autoNestedChildren:ne}}}}if(!V(Q)&&Se.length===0){let re=de(N??0,ye),_e=B(re);if(re&&V(_e))return{timeline:re,selectedTimelineIds:[te],selectedDurationSeconds:_e,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:te,rootDurationSeconds:Q,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:E,selectedDurationSeconds:_e,selectedTimelineIds:[te]}}}}let ce=le?.getAttribute("data-duration"),fe=ce?parseFloat(ce):null,pe=Math.max(V(fe)?fe:0,E??0);if(pe>0&&V(pe)&&V(Q)&&pe>=Q+.5){let re=ye;if(typeof re.to=="function")try{re.to({},{duration:0},pe)}catch(Re){T("runtime.init.site6",Re)}let _e=B(ye);if(V(_e))return{timeline:ye,selectedTimelineIds:[te],selectedDurationSeconds:_e,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:te,rootDurationSeconds:Q,rootDeclaredDur:fe,authoredCompositionDurationFloorSeconds:E,newDur:_e}}}}return{timeline:ye,selectedTimelineIds:[te],selectedDurationSeconds:Q,mediaDurationFloorSeconds:h,diagnostics:ne.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:te,selectedDurationSeconds:Q,autoNestedChildren:ne}}:void 0}}if(Se.length>0){let ne=Se.map(fe=>fe.compositionId),Q=K(Se),ce=B(Q);if(Q)return{timeline:Q,selectedTimelineIds:ne,selectedDurationSeconds:ce,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:te,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:O,selectedDurationSeconds:ce,mediaDurationFloorSeconds:h,selectedTimelineIds:ne}}}}return m("root_composition_id_unmatched_in_registry")},$=!1,we=()=>{if(!Y)return!1;let u=e.capturedTimeline,m=B(u),g=V(m);if(u&&g&&$)return!1;let h=q();if(!h.timeline)return!1;if(u&&u===h.timeline)return typeof u.timeScale=="function"&&u.timeScale(e.playbackRate),!1;e.capturedTimeline=h.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let E=W(e.capturedTimeline,0);if(E<=0&&typeof e.capturedTimeline.progress=="function"&&(e.capturedTimeline.progress(1,!0),e.capturedTimeline.progress(0,!1),qe(e.capturedTimeline)),E>0){try{s.setDuration(E)}catch{}if(typeof e.capturedTimeline.totalTime=="function"){typeof e.capturedTimeline.progress=="function"&&e.capturedTimeline.progress(1e-4,!0);let O=Math.max(0,e.currentTime||0);e.capturedTimeline.totalTime(O,!1),qe(e.capturedTimeline)}let N=window.__hfStudioManualEditsApply;typeof N=="function"&&N(),qn(document)}if(h.diagnostics&&he({source:"hf-preview",type:"diagnostic",code:h.diagnostics.code,details:h.diagnostics.details}),he({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:h.selectedTimelineIds??[],selectedDurationSeconds:h.selectedDurationSeconds??null,mediaDurationFloorSeconds:h.mediaDurationFloorSeconds??null}}),window.parent!==window){let N=F(),O=E>0?E:0,ee=String(O>0?O:1),K=new Set,de=new Set(document.querySelectorAll("[data-start]")),ge=le=>{let te=le.parentElement;for(;te&&te!==N;){if(de.has(te))return!0;te=te.parentElement}return!1};if(e.capturedTimeline.getChildren)try{for(let le of e.capturedTimeline.getChildren(!0))if(typeof le.targets=="function")for(let te of le.targets())te instanceof HTMLElement&&te!==N&&(te.hasAttribute("data-start")||ge(te)||K.has(te)||(K.add(te),te.setAttribute("data-start","0"),te.setAttribute("data-duration",ee),te.setAttribute("data-hf-autostamped","1")))}catch{}if(N instanceof HTMLElement)for(let le of N.querySelectorAll("[id]"))le instanceof HTMLElement&&le!==N&&(le.hasAttribute("data-start")||ge(le)||K.has(le)||le.tagName==="SCRIPT"||le.tagName==="STYLE"||le.tagName==="LINK"||(K.add(le),le.setAttribute("data-start","0"),le.setAttribute("data-duration",ee),le.setAttribute("data-hf-autostamped","1")))}for(let N of Mt)pn.delete(N),Jr(N);return!0};window.__hfForceTimelineRebind=()=>{$=!1,we(),Xr(e.currentTime)};let Ce=()=>{let u=F();if(!(u instanceof HTMLElement))return;let m=u.getBoundingClientRect(),g=Number(u.getAttribute("data-width")),h=Number(u.getAttribute("data-height")),E=window.getComputedStyle(u),N=Number.isFinite(g)&&g>0&&Number.isFinite(h)&&h>0,O=m.width<=0||m.height<=0||u.clientWidth<=0||u.clientHeight<=0;!N||!O||y("root_stage_layout_zero",{compositionId:u.getAttribute("data-composition-id")??null,declaredWidth:g,declaredHeight:h,rectWidth:Math.round(m.width),rectHeight:Math.round(m.height),clientWidth:u.clientWidth,clientHeight:u.clientHeight,display:E.display,visibility:E.visibility,overflow:E.overflow},`root-stage-layout-zero:${u.getAttribute("data-composition-id")??"unknown"}`)},vt=()=>{e.tornDown||(c!=null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{c=null,Ce()}))},Ue=()=>{i=u=>{let m=v(u.error??u.message).slice(0,D);if(!m)return;let g=w(m);he({source:"hf-preview",type:"diagnostic",code:g.code,details:{category:g.category,message:m,filename:u.filename||null,line:Number.isFinite(u.lineno)?u.lineno:null,column:Number.isFinite(u.colno)?u.colno:null}})},r=u=>{let m=v(u.reason).slice(0,D);if(!m)return;let g=w(m);he({source:"hf-preview",type:"diagnostic",code:`${g.code}_unhandled_rejection`,details:{category:`${g.category}-unhandled-rejection`,message:m}})},window.addEventListener("error",i),window.addEventListener("unhandledrejection",r)},nu=()=>{let u=Array.from(document.querySelectorAll("img, video, audio, source, link[rel=\'stylesheet\']"));for(let g of u){let h=()=>{if(!(g instanceof Element))return;let E=g.tagName.toLowerCase(),N=g.getAttribute("src")??g.getAttribute("href")??g.getAttribute("poster")??null,O=E==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";y(O,{tagName:E,assetUrl:N,currentSrc:(g instanceof HTMLImageElement||g instanceof HTMLMediaElement)&&g.currentSrc||null,readyState:g instanceof HTMLMediaElement?g.readyState:null,networkState:g instanceof HTMLMediaElement?g.networkState:null},`${O}:${E}:${N??"unknown"}`)};g.addEventListener("error",h),S(()=>{g.removeEventListener("error",h)})}let m=document.fonts;m&&m.ready.then(()=>{if(e.tornDown)return;let g=Array.from(m).filter(h=>h.status==="error").map(h=>h.family).filter(h=>!!h).slice(0,10);g.length!==0&&y("runtime_font_load_issue",{failedFamilies:g,totalFaces:Array.from(m).length},`runtime-font-load-issue:${g.join("|")}`)}).catch(()=>{})},iu=(u,m)=>{if(!u.timeline)return!1;let g=e.capturedTimeline;if(g&&g===u.timeline)return!1;let h=Math.max(0,e.currentTime||0),E=e.isPlaying;e.capturedTimeline=u.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{qe(e.capturedTimeline),typeof e.capturedTimeline.seek=="function"&&e.capturedTimeline.seek(h,!1),E&&typeof e.capturedTimeline.play=="function"&&e.capturedTimeline.play()}catch(N){T("runtime.init.site7",N)}return he({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:m,previousTime:h,selectedTimelineIds:u.selectedTimelineIds??[],selectedDurationSeconds:u.selectedDurationSeconds??null,mediaDurationFloorSeconds:u.mediaDurationFloorSeconds??null}}),!0},rt=null,jr=!1,$r=!1,Mt=new Set,pn=new WeakMap,hn=()=>{e.tornDown||(rt!=null&&window.clearTimeout(rt),rt=window.setTimeout(()=>{if(e.tornDown||(rt=null,$r&&window.__HF_EXPORT_RENDER_SEEK_CONFIG))return;let u=q();if(!u.timeline||!V(u.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){we()&&(ot(),Te(!0));return}if(jr)return;let g=B(e.capturedTimeline),h=u.selectedDurationSeconds??B(u.timeline);V(h)&&(!V(g)||h>=g+M)&&iu(u,"manual")&&(jr=!0,he({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:g??null,selectedDurationSeconds:h??null,selectedTimelineIds:u.selectedTimelineIds??[],mediaDurationFloorSeconds:u.mediaDurationFloorSeconds??null}}),ot(),Te(!0))},G))},qr=u=>{u.currentTarget instanceof HTMLMediaElement&&qo(u.currentTarget)},Kr=u=>{u.currentTarget instanceof HTMLMediaElement&&Ko(u.currentTarget)},ru=()=>{for(let u of Mt)u.removeEventListener("loadedmetadata",hn),u.removeEventListener("durationchange",hn),u.removeEventListener("loadedmetadata",qr),u.removeEventListener("error",Kr);Mt.clear()},ri=()=>{if(e.tornDown)return;let u=Array.from(document.querySelectorAll("video, audio"));for(let m of u){if(Mt.has(m))continue;Mt.add(m);let g=Number.parseFloat(m.dataset.volume??"");Number.isFinite(g)&&(m.volume=Math.max(0,Math.min(1,g))),m.addEventListener("loadedmetadata",hn),m.addEventListener("durationchange",hn),m.addEventListener("loadedmetadata",qr),m.addEventListener("error",Kr),$o(m),m.preload!=="auto"&&(m.preload="auto"),m.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&m.load(),Jr(m)}},Jr=u=>{pn.has(u)||Bo(u,e.capturedTimeline,W(e.capturedTimeline,0),pn)},oi=new WeakMap,Yr=u=>{let m=oi.get(u);if(m!==void 0)return m;let g=window.getComputedStyle(u).position,h=g==="static"||g==="relative"||g==="sticky";return oi.set(u,h),h},si=new WeakMap,ou=u=>{let m=si.get(u);if(m!==void 0)return m;let g=u.querySelector("[data-start]")===null;return si.set(u,g),g},su=()=>{oi=new WeakMap,si=new WeakMap},ai=new WeakMap,gn=new WeakSet,Xr=u=>{let m=Array.from(document.querySelectorAll("[data-start]")),g=F();for(let h of m){if(!(h instanceof HTMLElement))continue;if(h.hasAttribute("data-hidden")){gn.has(h)||(ai.set(h,h.style.getPropertyValue("display")),gn.add(h)),h.style.display="none",(h instanceof HTMLVideoElement||h instanceof HTMLImageElement)&&n?.setSourceVisibility(h,!1);continue}if(gn.has(h)){let N=ai.get(h);N?h.style.display=N:h.style.removeProperty("display"),ai.delete(h),gn.delete(h)}let E=ie(h,u);if(E){let N=h.parentElement;for(;N&&N!==g;){if(N instanceof HTMLElement&&N.hasAttribute("data-start")&&!ie(N,u)){E=!1;break}N=N.parentElement}}h.style.visibility=E?"visible":"hidden",(h instanceof HTMLVideoElement||h instanceof HTMLImageElement)&&n?.setSourceVisibility(h,E),E?Yr(h)&&h.style.removeProperty("display"):Yr(h)&&ou(h)&&(h.style.display="none")}},Me=()=>{let u=h=>{let E=h.closest("[data-composition-id]"),N=E?P(E,0):null,O=E?X(E,{includeAuthoredTimingAttrs:!0}):null;return{compositionRoot:E,inheritedStart:N,inheritedDuration:O}},m=Uo({shouldIncludeElement:h=>h.hasAttribute("data-start")||!!u(h).compositionRoot,resolveStartSeconds:h=>{let E=u(h);return I(h,E.inheritedStart??0)},resolveDurationSeconds:h=>{let E=u(h),N=I(h,E.inheritedStart??0),O=Number.parseFloat(h.dataset.playbackStart??h.dataset.mediaStart??"0")||0,ee=E.inheritedStart!=null&&E.inheritedDuration!=null&&E.inheritedDuration>0?Math.max(0,E.inheritedStart+E.inheritedDuration-N):null,K=Number.isFinite(h.duration)&&h.duration>O?Math.max(0,h.duration-O):null,de=Number.parseFloat(h.dataset.duration??""),ge=Number.isFinite(de)&&de>0?de:null;return Go({isVideo:h.tagName==="VIDEO",sourceDuration:K,hostRemaining:ee,explicitDuration:ge})}});for(let h of m.mediaClips){let E=pn.get(h.el);E&&(h.volumeKeyframes=E)}let g=e.mediaForceSyncNextTick;g&&(e.mediaForceSyncNextTick=!1),e.nativeMediaSyncDisabled||Wo({clips:m.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate,outputMuted:e.mediaOutputMuted||!e.webAudioMediaDisabled&&!e.nativeMediaSyncDisabled&&l.isActive(),userMuted:e.bridgeMuted,userVolume:e.bridgeVolume,forceSync:g,onElementVolume:(h,E)=>l.setElementVolume(h,E),isWebAudioOwned:h=>l.ownsElement(h),onAutoplayBlocked:()=>{e.mediaAutoplayBlockedPosted||(e.mediaAutoplayBlockedPosted=!0,he({source:"hf-preview",type:"media-autoplay-blocked"}))}}),Xr(e.currentTime)},Te=u=>{let m=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),g=Date.now();(u||m!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||g-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=m,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=g,he({source:"hf-preview",type:"state",frame:m,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},li="",Qr=0,au=()=>{let u="";for(let m of document.querySelectorAll("[data-start]"))u+=`${m.id}:${m.tagName}|`;return u},ot=()=>{L(),R(),z();let u=F();if(u){let h=C(u.getAttribute("data-width")),E=C(u.getAttribute("data-height")),N=h?parseInt(h,10):0,O=E?parseInt(E,10):0;N>0&&O>0&&he({source:"hf-preview",type:"stage-size",width:N,height:O})}we();let m=fs({canonicalFps:e.canonicalFps});window.__clipManifest=m;let g=au();if(li!==g&&su(),!window.__clipTree||li!==g){let h=window;window.__clipTree=os({startResolver:Ye({timelineRegistry:h.__timelines??{},includeAuthoredTimingAttrs:!0}),timelineRegistry:h.__timelines??{},rootDuration:m.durationInFrames/e.canonicalFps}),li=g}he(m),vt()},ui=u=>Number.isFinite(u)&&u>0?u:0,lu=u=>{let m=ui(Number(u));if(m<=0)return;let g=F(),h=ui(Number.parseFloat(g?.getAttribute("data-duration")??"")),E=Math.max(Qr,ui(s.getDuration()),h);m<=E||(Qr=m,g?.setAttribute("data-duration",String(m)),s.setDuration(m),ot(),Te(!0))},Pe=(u,m=0)=>{for(let g of e.deterministicAdapters){try{u==="discover"&&g.discover(),u==="pause"&&g.pause(),u==="play"&&g.play&&g.play()}catch(h){T("runtime.init.site8",h)}if(u==="discover")try{g.seek({time:m,suppressEvents:!0})}catch(h){T("runtime.init.site9",h)}}},st=()=>{window.__renderReady=!1},Nt=null,Rt=!0,uu=()=>{let u=[];for(let m of e.deterministicAdapters){let g=m.getReadyPromise;if(typeof g=="function")try{let h=g();h&&u.push(h)}catch(h){T("runtime.init.adapterReady",h)}}return u},cu=()=>{let u=uu();if(u.length===0)return Nt=null,Rt=!0,!0;let m=u[0];if(!m)return!0;let g=u.length===1?m:Promise.all(u);return g!==Nt&&(Nt=g,Rt=!1,Promise.resolve(g).then(()=>{Nt===g&&(Rt=!0,st())},h=>{Nt===g&&(Rt=!0,T("runtime.init.adapterReady",h),st())})),Rt};if(Y)Er();else{let u={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,injectedLinks:e.injectedCompLinks,parseDimensionPx:C,onDiagnostic:({code:m,details:g})=>{he({source:"hf-preview",type:"diagnostic",code:m,details:g})}};Za(u).then(()=>Qa(u)).finally(()=>{Y=!0,ri(),nu(),Er(),Tr(document),st()})}let xn=es({postMessage:u=>he(u)});xn.installPickerApi();let We=Cl();n=We,S(()=>{We.destroy(),n=null});let ci=u=>{let m=Number(u);!Number.isFinite(m)||m<=0?e.playbackRate=1:e.playbackRate=Math.max(.1,Math.min(5,m)),e.mediaForceSyncNextTick=!0,e.capturedTimeline&&typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let g=document.querySelectorAll("video, audio");for(let h of g)if(h instanceof HTMLMediaElement)try{h.playbackRate=e.playbackRate}catch(E){T("runtime.init.site10",E)}},Zr={play:()=>{let u=e.capturedTimeline;if(s.isPlaying())return;let m=W(u,0);if(m>0)s.setDuration(m),s.reachedEnd()&&(s.seek(0),e.currentTime=0,at(0));else{let g=F(),h=Number(g?.getAttribute("data-duration")??0);h>0&&s.setDuration(h)}qe(u),s.play()&&(e.isPlaying=!0,e.mediaForceSyncNextTick=!0,oo(s.now()),f&&!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&so(),Pe("play"),Me(),We.redraw(),Te(!0))},pause:()=>{if(!s.isPlaying())return;l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1,e.currentTime=s.now(),e.mediaForceSyncNextTick=!0,oo(e.currentTime);let u=e.capturedTimeline;qe(u),Pe("pause"),Me(),We.redraw(),Te(!0)},seek:(u,m)=>{let g=xt(Math.max(0,Number(u)||0),e.canonicalFps);l.stopAll(),s.detachAudioSource();let h=s.isPlaying();h&&s.pause(),s.seek(g),e.currentTime=s.now(),e.isPlaying=!1,e.mediaForceSyncNextTick=!0;let E=e.capturedTimeline;if(qe(E),at(e.currentTime),Pe("pause"),m?.keepPlaying&&h){Zr.play();return}Me(),We.redraw(),Te(!0)},renderSeek:(u,m)=>{$r=!0;let g=xt(Math.max(0,Number(u)||0),e.canonicalFps);l.stopAll(),s.detachAudioSource(),s.isPlaying()&&s.pause(),s.seek(g),e.currentTime=s.now(),e.isPlaying=!1,e.mediaForceSyncNextTick=!0,at(e.currentTime,{activateChildren:!0,suppressEvents:m?.suppressEvents}),Me(),We.redraw(),Te(!0)},getTime:()=>s.now(),getDuration:()=>{let u=s.getDuration();return Number.isFinite(u)?u:0},isPlaying:()=>s.isPlaying(),setPlaybackRate:u=>{ci(u),s.setRate(e.playbackRate),ao()},getPlaybackRate:()=>e.playbackRate},eo=W(e.capturedTimeline,0);eo>0&&s.setDuration(eo);let Ne=is({getTimeline:()=>e.capturedTimeline,setTimeline:u=>{e.capturedTimeline=u},getTimelineRegistry:()=>window.__timelines??{},getIsPlaying:()=>e.isPlaying,setIsPlaying:u=>{e.isPlaying!==u&&(e.mediaForceSyncNextTick=!0),e.isPlaying=u},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:ci,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(u,m)=>{e.currentTime=Math.max(0,Number(u)||0),e.isPlaying!==m&&(e.mediaForceSyncNextTick=!0),e.isPlaying=m,Me()},onStatePost:Te,onDeterministicSeek:(u,m)=>{for(let g of e.deterministicAdapters)if(!(g.name==="gsap"&&e.capturedTimeline))try{g.seek({time:Number(u)||0,suppressEvents:m?.suppressEvents})}catch(h){T("runtime.init.site11",h)}},onDeterministicPause:()=>Pe("pause"),onDeterministicPlay:()=>Pe("play"),onRenderFrameSeek:()=>{We.redraw()},onShowNativeVideos:()=>{},getSafeDuration:()=>W(e.capturedTimeline,0),transport:Zr});window.__player=b(Ne),window.__playerReady=!0,mo(he),Je("composition_loaded",{duration:Ne.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.deterministicAdapters=[Po(),So({resolveStartSeconds:u=>P(u,0)}),Ao(),Co(),Fo(),To(),vo(),Mo(),No(),Ro(),Lo(),Eo({getTimeline:()=>e.capturedTimeline})],Do(),Io(),window.__hfReseekGpu=u=>{let m=Math.max(0,Number(u)||0);window.__hfThreeTime=m,window.__hfTypegpuTime=m,_o(m)},Ue(),ri(),Pe("discover");let du=()=>{let u=e.capturedTimeline,m=we();e.capturedTimeline&&(m||e.capturedTimeline!==u||!Ne._timeline)&&(Ne._timeline=e.capturedTimeline);let g=W(e.capturedTimeline,0);if(g>0&&s.setDuration(g),Pe("discover",e.currentTime),!e.capturedTimeline){let h=window.__timelines??{},E=Object.keys(h).filter(N=>h[N]);if(E.length>0){let O=F()?.getAttribute("data-composition-id")??null;y("root_timeline_unbound_registry_present",{reason:O?"root data-composition-id has no matching key in window.__timelines":"root composition element has no data-composition-id attribute",rootCompositionId:O,registeredTimelineKeys:E},"root_timeline_unbound_registry_present"),console.warn("[hyperframes] Root timeline not bound \\u2014 render will freeze at t=0. "+(O?`Root data-composition-id is "${O}" but window.__timelines has no such key. `:"Root composition element has no data-composition-id. ")+`Registered timeline keys: [${E.join(", ")}]. Register the root timeline under its data-composition-id (window.__timelines["${O??"<root-id>"}"] = tl).`)}}window.__renderReady=!0,ot(),Te(!0)},mt=null,fu=()=>{if(mt)return;let u=()=>{window.removeEventListener("hf-timelines-built",u),mt=null,st()};mt=u,window.addEventListener("hf-timelines-built",u)};S(()=>{mt&&(window.removeEventListener("hf-timelines-built",mt),mt=null)}),st=()=>{if(!Y){window.__renderReady=!1;return}if(window.__hfTimelinesBuilding){window.__renderReady=!1,fu();return}if(Pe("discover",e.currentTime),!cu()){window.__renderReady=!1;return}du()},st(),Y&&setTimeout(()=>{st()},0);let bn=0,di=!1,mu=(u,m,g,h)=>{try{let E=h?.suppressEvents===!0;qe(u),typeof u.totalTime=="function"?u.totalTime(m,E):u.seek(m,E)}catch(E){T(g,E)}},pu=(u,m)=>{let g=window.__timelines??{},h=F()?.getAttribute("data-composition-id")??null;for(let[E,N]of Object.entries(g)){if(!N||E===h)continue;let O=document.querySelector(`[data-composition-id="${CSS.escape(E)}"]`);if(!O)continue;let ee=P(O,0);if(!Number.isFinite(ee))continue;let K=B(N),de=gt(O)+Math.max(0,u-ee)*Be(O),ge=Math.max(0,K!=null&&K>0?Math.min(K,de):de);mu(N,ge,"runtime.init.transport.childTimeline",m)}},to=u=>{let m=window.__timelines??{};for(let g of Object.values(m))if(!(!g||g===u))try{g.play()}catch(h){T("runtime.init.activateSiblings",h)}},no=u=>typeof u=="object"&&u!==null,Lt=new WeakMap,hu=["onStart","onUpdate","onComplete","onReverseComplete","onRepeat"],io=(u,m)=>{let g=u[m];if(typeof g!="function")return null;try{let h=Number(g.call(u));return Number.isFinite(h)?h:null}catch(h){return T("runtime.init.gsapCallbackDuration",h),null}},gu=u=>{let m=Lt.get(u);if(m!=null)return m;if(!("getChildren"in u)||typeof u.getChildren!="function")return!1;let g;try{g=u.getChildren(!0,!0,!0)}catch(h){return T("runtime.init.gsapCallbackChildren",h),Lt.set(u,!1),!1}if(!Array.isArray(g))return Lt.set(u,!1),!1;for(let h of g){if(!no(h))continue;let E=h.vars;if(!no(E)||!hu.some(K=>typeof E[K]=="function"))continue;let ee=io(h,"totalDuration")??io(h,"duration");if(ee!=null&&ee<=1e-6)return Lt.set(u,!0),!0}return Lt.set(u,!1),!1};function at(u,m){let g=e.capturedTimeline,h=m?.suppressEvents===!0;if(g){m?.activateChildren&&to(g);let E=g,N=u;if(typeof E.totalDuration=="function")try{let O=Number(E.totalDuration());Number.isFinite(O)&&O>0&&u>O&&(N=O)}catch(O){T("runtime.init.transport.clampDuration",O)}try{typeof g.totalTime=="function"?(g.totalTime(N,h),!h&&!gu(g)&&(g.totalTime(N+.001,!0),g.totalTime(N,!0))):g.seek(N,h)}catch(O){T("runtime.init.transport.seek",O)}}pu(u,m),g&&m?.activateChildren&&to(g);for(let E of e.deterministicAdapters)if(!(E.name==="gsap"&&g))try{E.seek({time:u,suppressEvents:h})}catch(N){T("runtime.init.transport.adapter",N)}}let xu=()=>{try{return document.querySelector(`[${Fl}]`)!=null}catch{return!1}},ro=()=>{if(!(e.tornDown||di)){di=!0;try{if(e.transportRafId=window.requestAnimationFrame(ro),bn+=1,Tl({tick:bn,isPlaying:s.isPlaying(),hasCapturedTimeline:e.capturedTimeline!=null,currentTimeSeconds:s.now()})){let m=e.capturedTimeline;if(we()){e.capturedTimeline&&!Ne._timeline&&(Ne._timeline=e.capturedTimeline),e.capturedTimeline&&e.capturedTimeline!==m&&qe(e.capturedTimeline);let g=W(e.capturedTimeline,0);g>0&&s.setDuration(g),ot()}}if(bn%20===0&&ot(),bn%30===0&&ri(),e.capturedTimeline){let m=W(e.capturedTimeline,0);m>0&&(!s.isPlaying()||m>=s.getDuration())&&s.setDuration(m)}if(s.isPlaying()&&!e.mediaOutputMuted)if(!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&l.isActive()&&l.context){let m=l.getTime();m>=0&&s.attachAudioSource({currentTimeSeconds:m})}else{let m=document.querySelectorAll("audio[data-start]"),g=!1;for(let h of m){if(!(h instanceof HTMLMediaElement)||!h.isConnected)continue;let E=Number.parseFloat(h.dataset.start??""),N=Number.parseFloat(h.dataset.duration??""),O=Number.isFinite(N)&&N>0?E+N:1/0,ee=Number.parseFloat(h.dataset.playbackStart??h.dataset.mediaStart??"0")||0;if(Number.isFinite(E)&&e.currentTime>=E&&e.currentTime<O){h.paused?!h.error&&h.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&(s.attachAudioSource({currentTimeSeconds:e.currentTime}),g=!0):(s.attachAudioSource({el:h,compositionStart:E,mediaStart:ee}),g=!0);break}}!g&&s.hasAudioSource()&&s.detachAudioSource()}else s.hasAudioSource()&&s.detachAudioSource();let u=s.now();if(e.currentTime=u,(s.isPlaying()||!xu())&&at(u),s.isPlaying()&&s.reachedEnd()){l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1;let m=s.getDuration();Number.isFinite(m)&&(s.seek(m),e.currentTime=m,at(m)),Pe("pause"),Me(),Te(!0);return}s.isPlaying()&&Me(),Te(!1)}finally{di=!1}}},oo=u=>{let m=document.querySelectorAll("video, audio");for(let g of m){if(!(g instanceof HTMLMediaElement)||!g.isConnected)continue;let h=Number.parseFloat(g.dataset.start??"");if(!Number.isFinite(h))continue;let E=Number.parseFloat(g.dataset.duration??""),N=Number.isFinite(E)&&E>0?h+E:1/0;if(u<h||u>=N)continue;let O=Number.parseFloat(g.dataset.playbackStart??g.dataset.mediaStart??"0")||0,ee=u-h+O;if(ee>=0)try{g.currentTime=ee}catch{}}},so=()=>{if(e.nativeMediaSyncDisabled||e.webAudioMediaDisabled)return;let u=l.startGeneration(),m=document.querySelectorAll("audio[data-start]");for(let g of m){if(!(g instanceof HTMLMediaElement)||!g.isConnected)continue;let h=Number.parseFloat(g.dataset.start??"");if(!Number.isFinite(h))continue;let E=Number.parseFloat(g.dataset.playbackStart??g.dataset.mediaStart??"0")||0,N=Number.parseFloat(g.dataset.volume??""),O=Number.isFinite(N)?N:1,ee=Number.parseFloat(g.dataset.duration??""),K=Number.isFinite(ee)&&ee>0?ee:Number.POSITIVE_INFINITY,de=g.closest("[data-composition-id]");if(de){let ge=P(de,0),le=X(de,{includeAuthoredTimingAttrs:!0});le!=null&&le>0&&(K=Math.min(K,Math.max(0,ge+le-h)))}l.decodeAudioElement(g).then(ge=>{!ge||!s.isPlaying()||l.schedulePlayback(g,ge,h,E,s.now(),O*e.bridgeVolume,u,e.playbackRate,K)})}};function ao(){l.setRate(e.playbackRate)&&!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&f&&s.isPlaying()&&l.hasBoundedActiveSources()&&(l.stopAll(),so())}if(e.capturedTimeline){let u=W(e.capturedTimeline,0);u>0&&s.setDuration(u),qe(e.capturedTimeline)}ol(window),e.transportRafId=window.requestAnimationFrame(ro),ot(),Te(!0),e.controlBridgeHandler=fo({onPlay:()=>{Ne.play(),Je("composition_played",{time:Ne.getTime()})},onPause:()=>{Ne.pause(),Je("composition_paused",{time:Ne.getTime()})},onStopMedia:()=>{l.stopAll();let u=document.querySelectorAll("video, audio");for(let m of u)m instanceof HTMLMediaElement&&!m.paused&&m.pause()},onSeek:(u,m)=>{Ne.seek(u),Je("composition_seeked",{time:u})},onSetMuted:u=>{e.bridgeMuted=u;let m=u||e.mediaOutputMuted;l.setMuted(m);let g=document.querySelectorAll("video, audio");for(let h of g)h instanceof HTMLMediaElement&&(h.muted=m||h.defaultMuted)},onSetVolume:u=>{e.bridgeVolume=u,l.setVolume(u);let m=document.querySelectorAll("video, audio");for(let g of m){if(!(g instanceof HTMLMediaElement))continue;let h=parseFloat(g.dataset.volume??""),E=Number.isFinite(h)?h:1;g.volume=E*u}},onSetMediaOutputMuted:u=>{e.mediaOutputMuted=u;let m=u||e.bridgeMuted;l.setMuted(m);let g=document.querySelectorAll("video, audio");for(let h of g)h instanceof HTMLMediaElement&&(h.muted=m||h.defaultMuted)},onSetNativeMediaSyncDisabled:u=>{e.nativeMediaSyncDisabled!==u&&(e.nativeMediaSyncDisabled=u,e.mediaForceSyncNextTick=!0,u?(l.stopAll(),s.detachAudioSource()):Me())},onSetWebAudioMediaDisabled:u=>{e.webAudioMediaDisabled!==u&&(e.webAudioMediaDisabled=u,e.mediaForceSyncNextTick=!0,u&&(l.stopAll(),s.detachAudioSource()),Me())},onSetPlaybackRate:u=>{ci(u),e.transportClock&&e.transportClock.setRate(e.playbackRate),ao()},onSetRootDuration:lu,onSetColorGrading:(u,m)=>{We.setGrading(u,m)},onSetColorGradingCompare:(u,m)=>{We.setCompare(u,m)},onTick:()=>{if(e.tornDown||!s.isPlaying())return;let u=s.now();if(e.currentTime=u,at(u),s.reachedEnd()){l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1;let m=s.getDuration();Number.isFinite(m)&&(s.seek(m),e.currentTime=m,at(m)),Pe("pause"),Me(),Te(!0)}},onEnablePickMode:()=>xn.enablePickMode(),onDisablePickMode:()=>xn.disablePickMode(),getCanonicalFps:()=>e.canonicalFps});let fi=()=>{if(!e.tornDown){e.tornDown=!0,e.transportRafId!=null&&(window.cancelAnimationFrame(e.transportRafId),e.transportRafId=null),e.transportClock=null,l.destroy(),rt!=null&&(window.clearTimeout(rt),rt=null),c!=null&&(window.cancelAnimationFrame(c),c=null),ru(),e.controlBridgeHandler&&(window.removeEventListener("message",e.controlBridgeHandler),e.controlBridgeHandler=null),i&&(window.removeEventListener("error",i),i=null),r&&(window.removeEventListener("unhandledrejection",r),r=null),e.beforeUnloadHandler&&(window.removeEventListener("beforeunload",e.beforeUnloadHandler),e.beforeUnloadHandler=null),xn.disablePickMode();for(let u of e.deterministicAdapters)if(!(!u||typeof u.revert!="function"))try{u.revert()}catch(m){T("runtime.init.site12",m)}e.deterministicAdapters=[];for(let u of o.splice(0))try{u()}catch(m){T("runtime.init.site13",m)}for(let u of e.injectedCompStyles)try{u.remove()}catch(m){T("runtime.init.site14",m)}e.injectedCompStyles=[];for(let u of e.injectedCompLinks)try{u.remove()}catch(m){T("runtime.init.site15",m)}e.injectedCompLinks=[];for(let u of e.injectedCompScripts)try{u.remove()}catch(m){T("runtime.init.site16",m)}e.injectedCompScripts=[],e.capturedTimeline=null,window.__hfRuntimeTeardown===fi&&(window.__hfRuntimeTeardown=null)}};window.__hfRuntimeTeardown=fi,e.beforeUnloadHandler=fi,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var Nl=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],Or=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Wm(e){if(e<=255)return Nl[e];let t=0,n=Or.length-1;for(;t<=n;){let i=t+n>>1,r=Or[i];if(e<r[0]){n=i-1;continue}if(e>r[1]){t=i+1;continue}return r[2]}return"L"}function Vm(e){let t=e.length;if(t===0)return null;let n=new Array(t),i=!1;for(let l=0;l<t;){let f=e.charCodeAt(l),p=f,d=1;if(f>=55296&&f<=56319&&l+1<t){let S=e.charCodeAt(l+1);S>=56320&&S<=57343&&(p=(f-55296<<10)+(S-56320)+65536,d=2)}let x=Wm(p);(x==="R"||x==="AL"||x==="AN")&&(i=!0);for(let S=0;S<d;S++)n[l+S]=x;l+=d}if(!i)return null;let r=0;for(let l=0;l<t;l++){let f=n[l];if(f==="L"){r=0;break}if(f==="R"||f==="AL"){r=1;break}}let o=new Int8Array(t);for(let l=0;l<t;l++)o[l]=r;let a=r&1?"R":"L",c=a,s=c;for(let l=0;l<t;l++)n[l]==="NSM"?n[l]=s:s=n[l];s=c;for(let l=0;l<t;l++){let f=n[l];f==="EN"?n[l]=s==="AL"?"AN":"EN":(f==="R"||f==="L"||f==="AL")&&(s=f)}for(let l=0;l<t;l++)n[l]==="AL"&&(n[l]="R");for(let l=1;l<t-1;l++)n[l]==="ES"&&n[l-1]==="EN"&&n[l+1]==="EN"&&(n[l]="EN"),n[l]==="CS"&&(n[l-1]==="EN"||n[l-1]==="AN")&&n[l+1]===n[l-1]&&(n[l]=n[l-1]);for(let l=0;l<t;l++){if(n[l]!=="EN")continue;let f;for(f=l-1;f>=0&&n[f]==="ET";f--)n[f]="EN";for(f=l+1;f<t&&n[f]==="ET";f++)n[f]="EN"}for(let l=0;l<t;l++){let f=n[l];(f==="WS"||f==="ES"||f==="ET"||f==="CS")&&(n[l]="ON")}s=c;for(let l=0;l<t;l++){let f=n[l];f==="EN"?n[l]=s==="L"?"L":"EN":(f==="R"||f==="L")&&(s=f)}for(let l=0;l<t;l++){if(n[l]!=="ON")continue;let f=l+1;for(;f<t&&n[f]==="ON";)f++;let p=l>0?n[l-1]:c,d=f<t?n[f]:c,x=p!=="L"?"R":"L";if(x===(d!=="L"?"R":"L"))for(let y=l;y<f;y++)n[y]=x;l=f-1}for(let l=0;l<t;l++)n[l]==="ON"&&(n[l]=a);for(let l=0;l<t;l++){let f=n[l];(o[l]&1)===0?f==="R"?o[l]++:(f==="AN"||f==="EN")&&(o[l]+=2):(f==="L"||f==="AN"||f==="EN")&&o[l]++}return o}function Rl(e,t){let n=Vm(e);if(n===null)return null;let i=new Int8Array(t.length);for(let r=0;r<t.length;r++)i[r]=n[t[r]];return i}var zm=/[ \\t\\n\\r\\f]+/g,jm=/[\\t\\n\\r\\f]| {2,}|^ | $/;function $m(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function qm(e){if(!jm.test(e))return e;let t=e.replace(zm," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Km(e){return/[\\r\\f]/.test(e)?e.replace(/\\r\\n/g,`\n`).replace(/[\\r\\f]/g,`\n`):e.replace(/\\r\\n/g,`\n`)}var Br=null,Jm;function Ym(){return Br===null&&(Br=new Intl.Segmenter(Jm,{granularity:"word"})),Br}var Xm=/\\p{Script=Arabic}/u,Zn=/\\p{M}/u,Hl=/\\p{Nd}/u;function Ll(e){return Xm.test(e)}function kl(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=44032&&e<=55215||e>=65280&&e<=65519}function Ie(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){let r=(n-55296<<10)+(i-56320)+65536;if(kl(r))return!0;t++;continue}}if(kl(n))return!0}}return!1}function Qm(e){let t=ni(e);return t!==null&&(ti.has(t)||nt.has(t))}var Zm=new Set(["\\xA0","\\u202F","\\u2060","\\uFEFF"]);function ep(e){return Ie(e)}function tp(e){let t=ni(e);return t!==null&&Zm.has(t)}function ei(e){return!Qm(e)&&!tp(e)}var ti=new Set(["\\uFF0C","\\uFF0E","\\uFF01","\\uFF1A","\\uFF1B","\\uFF1F","\\u3001","\\u3002","\\u30FB","\\uFF09","\\u3015","\\u3009","\\u300B","\\u300D","\\u300F","\\u3011","\\u3017","\\u3019","\\u301B","\\u30FC","\\u3005","\\u303B","\\u309D","\\u309E","\\u30FD","\\u30FE"]),mn=new Set([\'"\',"(","[","{","\\u201C","\\u2018","\\xAB","\\u2039","\\uFF08","\\u3014","\\u3008","\\u300A","\\u300C","\\u300E","\\u3010","\\u3016","\\u3018","\\u301A"]),Gr=new Set(["\'","\\u2019"]),nt=new Set([".",",","!","?",":",";","\\u060C","\\u061B","\\u061F","\\u0964","\\u0965","\\u104A","\\u104B","\\u104C","\\u104D","\\u104F",")","]","}","%",\'"\',"\\u201D","\\u2019","\\xBB","\\u203A","\\u2026"]),np=new Set([":",".","\\u060C","\\u061B"]),ip=new Set(["\\u104F"]),rp=new Set(["\\u201D","\\u2019","\\xBB","\\u203A","\\u300D","\\u300F","\\u3011","\\u300B","\\u3009","\\u3015","\\uFF09"]);function op(e){if(Ur(e))return!0;let t=!1;for(let n of e){if(nt.has(n)){t=!0;continue}if(!(t&&Zn.test(n)))return!1}return t}function sp(e){for(let t of e)if(!ti.has(t)&&!nt.has(t))return!1;return e.length>0}function ap(e){if(Ur(e))return!0;for(let t of e)if(!mn.has(t)&&!Gr.has(t)&&!Zn.test(t))return!1;return e.length>0}function Ur(e){let t=!1;for(let n of e)if(!(n==="\\\\"||Zn.test(n))){if(mn.has(n)||nt.has(n)||Gr.has(n)){t=!0;continue}return!1}return t}function Gl(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let i=e.charCodeAt(n);if(i<56320||i>57343)return n;let r=n-1;if(r<0)return n;let o=e.charCodeAt(r);return o>=55296&&o<=56319?r:n}function ni(e){if(e.length===0)return null;let t=Gl(e,e.length);return e.slice(t)}function lp(e){let t=Array.from(e),n=t.length;for(;n>0;){let i=t[n-1];if(Zn.test(i)){n--;continue}if(mn.has(i)||Gr.has(i)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function up(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="\\u2014"?e:null}function Dl(e,t,n,i){let r=t[i],o=e[i];if(r==null)return o;let a=n[i];if(o.length===a)return o;let c=r.repeat(a);return e[i]=c,c}function Il(e,t){return e&&t!==null&&np.has(t)}function cp(e){let t=ni(e);return t!==null&&ip.has(t)}function dp(e){if(e.length<2||e[0]!==" ")return null;let t=e.slice(1);return/^\\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function ii(e){let t=e.length;for(;t>0;){let n=Gl(e,t),i=e.slice(n,t);if(rp.has(i))return!0;if(!nt.has(i))return!1;t=n}return!1}function fp(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===`\n`)return"hard-break"}return e===" "?"space":e==="\\xA0"||e==="\\u202F"||e==="\\u2060"||e==="\\uFEFF"?"glue":e==="\\u200B"?"zero-width-break":e==="\\xAD"?"soft-hyphen":"text"}var mp=/[\\x20\\t\\n\\xA0\\xAD\\u200B\\u202F\\u2060\\uFEFF]/;function ve(e){return e.length===1?e[0]:e.join("")}function pp(e,t){let n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),ve(n)}function hp(e,t,n,i){if(!mp.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];let r=[],o=null,a=[],c=n,s=!1,l=0;for(let f of e){let p=fp(f,i),d=p==="text"&&t;if(o!==null&&p===o&&d===s){a.push(f),l+=f.length;continue}o!==null&&r.push({text:ve(a),isWordLike:s,kind:o,start:c}),o=p,a=[f],c=n+l,s=d,l+=f.length}return o!==null&&r.push({text:ve(a),isWordLike:s,kind:o,start:c}),r}function Hr(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var gp=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function xp(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:gp.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function bp(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function yp(e){let t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),r=e.starts.slice();for(let a=0;a<e.len;a++){if(i[a]!=="text"||!xp(e,a))continue;let c=[t[a]],s=a+1;for(;s<e.len&&!Hr(i[s]);){c.push(t[s]),n[a]=!0;let l=t[s].includes("?");if(i[s]="text",t[s]="",s++,l)break}t[a]=ve(c)}let o=0;for(let a=0;a<t.length;a++){let c=t[a];c.length!==0&&(o!==a&&(t[o]=c,n[o]=n[a],i[o]=i[a],r[o]=r[a]),o++)}return t.length=o,n.length=o,i.length=o,r.length=o,{len:o,texts:t,isWordLike:n,kinds:i,starts:r}}function Sp(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o];if(t.push(a),n.push(e.isWordLike[o]),i.push(e.kinds[o]),r.push(e.starts[o]),!bp(a))continue;let c=o+1;if(c>=e.len||Hr(e.kinds[c]))continue;let s=[],l=e.starts[c],f=c;for(;f<e.len&&!Hr(e.kinds[f]);)s.push(e.texts[f]),f++;s.length>0&&(t.push(ve(s)),n.push(!0),i.push("text"),r.push(l),o=f-1)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}var Ep=new Set([":","-","/","\\xD7",",",".","+","\\u2013","\\u2014"]),Pl=/^[A-Za-z0-9_]+[,:;]*$/,Ol=/[,:;]+$/;function Ul(e){for(let t of e)if(Hl.test(t))return!0;return!1}function fn(e){if(e.length===0)return!1;for(let t of e)if(!(Hl.test(t)||Ep.has(t)))return!1;return!0}function Ap(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o],c=e.kinds[o];if(c==="text"&&fn(a)&&Ul(a)){let s=[a],l=o+1;for(;l<e.len&&e.kinds[l]==="text"&&fn(e.texts[l]);)s.push(e.texts[l]),l++;t.push(ve(s)),n.push(!0),i.push("text"),r.push(e.starts[o]),o=l-1;continue}t.push(a),n.push(e.isWordLike[o]),i.push(c),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function wp(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o],c=e.kinds[o],s=e.isWordLike[o];if(c==="text"&&s&&Pl.test(a)){let l=[a],f=Ol.test(a),p=o+1;for(;f&&p<e.len&&e.kinds[p]==="text"&&e.isWordLike[p]&&Pl.test(e.texts[p]);){let d=e.texts[p];l.push(d),f=Ol.test(d),p++}t.push(ve(l)),n.push(!0),i.push("text"),r.push(e.starts[o]),o=p-1;continue}t.push(a),n.push(s),i.push(c),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Cp(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o];if(e.kinds[o]==="text"&&a.includes("-")){let c=a.split("-"),s=c.length>1;for(let l=0;l<c.length;l++){let f=c[l];if(!s)break;(f.length===0||!Ul(f)||!fn(f))&&(s=!1)}if(s){let l=0;for(let f=0;f<c.length;f++){let p=c[f],d=f<c.length-1?`${p}-`:p;t.push(d),n.push(!0),i.push("text"),r.push(e.starts[o]+l),l+=d.length}continue}}t.push(a),n.push(e.isWordLike[o]),i.push(e.kinds[o]),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function _p(e){let t=[],n=[],i=[],r=[],o=0;for(;o<e.len;){let a=[e.texts[o]],c=e.isWordLike[o],s=e.kinds[o],l=e.starts[o];if(s==="glue"){let f=[a[0]],p=l;for(o++;o<e.len&&e.kinds[o]==="glue";)f.push(e.texts[o]),o++;let d=ve(f);if(o<e.len&&e.kinds[o]==="text")a[0]=d,a.push(e.texts[o]),c=e.isWordLike[o],s="text",l=p,o++;else{t.push(d),n.push(!1),i.push("glue"),r.push(p);continue}}else o++;if(s==="text")for(;o<e.len&&e.kinds[o]==="glue";){let f=[];for(;o<e.len&&e.kinds[o]==="glue";)f.push(e.texts[o]),o++;let p=ve(f);if(o<e.len&&e.kinds[o]==="text"){a.push(p,e.texts[o]),c=c||e.isWordLike[o],o++;continue}a.push(p)}t.push(ve(a)),n.push(c),i.push(s),r.push(l)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Fp(e){let t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),r=e.starts.slice();for(let o=0;o<t.length-1;o++){if(i[o]!=="text"||i[o+1]!=="text"||!Ie(t[o])||!Ie(t[o+1]))continue;let a=lp(t[o]);a!==null&&(t[o]=a.head,t[o+1]=a.tail+t[o+1],r[o+1]=r[o]+a.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Bl(e,t,n){let i=Ym(),r=0,o=[],a=[],c=[],s=[],l=[],f=[],p=[],d=[],x=[],S=[],y=[],b=[];for(let v of i.segment(e))for(let w of hp(v.segment,v.isWordLike??!1,v.index,n)){let ie=function(){f[I]!==null&&(a[I]=[Dl(o,f,p,I)],f[I]=null),a[I].push(w.text),c[I]=c[I]||w.isWordLike,d[I]=d[I]||R,x[I]=x[I]||L,S[I]=P,y[I]=X,b[I]=Il(x[I],z)},C=w.kind==="text",F=up(w.text,w.isWordLike,w.kind),R=Ie(w.text),L=Ll(w.text),z=ni(w.text),P=ii(w.text),X=cp(w.text),I=r-1;t.carryCJKAfterClosingQuote&&C&&r>0&&s[I]==="text"&&R&&d[I]&&S[I]||C&&r>0&&s[I]==="text"&&sp(w.text)&&d[I]||C&&r>0&&s[I]==="text"&&y[I]?ie():C&&r>0&&s[I]==="text"&&w.isWordLike&&L&&b[I]?(ie(),c[I]=!0):F!==null&&r>0&&s[I]==="text"&&f[I]===F?p[I]=(p[I]??1)+1:C&&!w.isWordLike&&r>0&&s[I]==="text"&&(op(w.text)||w.text==="-"&&c[I])?ie():(o[r]=w.text,a[r]=[w.text],c[r]=w.isWordLike,s[r]=w.kind,l[r]=w.start,f[r]=F,p[r]=F===null?0:1,d[r]=R,x[r]=L,S[r]=P,y[r]=X,b[r]=Il(L,z),r++)}for(let v=0;v<r;v++){if(f[v]!==null){o[v]=Dl(o,f,p,v);continue}o[v]=ve(a[v])}for(let v=1;v<r;v++)s[v]==="text"&&!c[v]&&Ur(o[v])&&s[v-1]==="text"&&(o[v-1]+=o[v],c[v-1]=c[v-1]||c[v],o[v]="");let A=Array.from({length:r},()=>null),_=-1;for(let v=r-1;v>=0;v--){let w=o[v];if(w.length!==0){if(s[v]==="text"&&!c[v]&&ap(w)&&_>=0&&s[_]==="text"){let C=A[_]??[];C.push(w),A[_]=C,l[_]=l[v],o[v]="";continue}_=v}}for(let v=0;v<r;v++){let w=A[v];w!=null&&(o[v]=pp(w,o[v]))}let M=0;for(let v=0;v<r;v++){let w=o[v];w.length!==0&&(M!==v&&(o[M]=w,c[M]=c[v],s[M]=s[v],l[M]=l[v]),M++)}o.length=M,c.length=M,s.length=M,l.length=M;let G=_p({len:M,texts:o,isWordLike:c,kinds:s,starts:l}),D=Fp(wp(Cp(Ap(Sp(yp(G))))));for(let v=0;v<D.len-1;v++){let w=dp(D.texts[v]);w!==null&&(D.kinds[v]!=="space"&&D.kinds[v]!=="preserved-space"||D.kinds[v+1]!=="text"||!Ll(D.texts[v+1])||(D.texts[v]=w.space,D.isWordLike[v]=!1,D.kinds[v]=D.kinds[v]==="preserved-space"?"preserved-space":"space",D.texts[v+1]=w.marks+D.texts[v+1],D.starts[v+1]=D.starts[v]+w.space.length))}return D}function Tp(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],i=0;for(let r=0;r<e.len;r++)e.kinds[r]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:r,consumedEndSegmentIndex:r+1}),i=r+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function vp(e){if(e.len<=1)return e;let t=[],n=[],i=[],r=[],o=null,a=!1,c=0,s=!1,l=!1;function f(){o!==null&&(t.push(ve(o)),n.push(a),i.push("text"),r.push(c),o=null)}for(let p=0;p<e.len;p++){let d=e.texts[p],x=e.kinds[p],S=e.isWordLike[p],y=e.starts[p];if(x==="text"){let b=ep(d),A=ei(d);if(o!==null&&s&&l){o.push(d),a=a||S,s=s||b,l=A;continue}f(),o=[d],a=S,c=y,s=b,l=A;continue}f(),t.push(d),n.push(S),i.push(x),r.push(y)}return f(),{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Wl(e,t,n="normal",i="normal"){let r=$m(n),o=r.mode==="pre-wrap"?Km(e):qm(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let a=i==="keep-all"?vp(Bl(o,t,r)):Bl(o,t,r);return{normalized:o,chunks:Tp(a,r),...a}}var _t=null,Vl=new Map,Ft=null,Mp=96,Np=/\\p{Emoji_Presentation}/u,Rp=/[\\p{Emoji_Presentation}\\p{Extended_Pictographic}\\p{Regional_Indicator}\\uFE0F\\u20E3]/u,Wr=null,zl=new Map;function Vr(){if(_t!==null)return _t;if(typeof OffscreenCanvas<"u")return _t=new OffscreenCanvas(1,1).getContext("2d"),_t;if(typeof document<"u")return _t=document.createElement("canvas").getContext("2d"),_t;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Lp(e){let t=Vl.get(e);return t||(t=new Map,Vl.set(e,t)),t}function Ke(e,t){let n=t.get(e);return n===void 0&&(n={width:Vr().measureText(e).width,containsCJK:Ie(e)},t.set(e,n)),n}function Tt(){if(Ft!==null)return Ft;if(typeof navigator>"u")return Ft={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Ft;let e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),i=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Ft={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:i,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Ft}function kp(e){let t=e.match(/(\\d+(?:\\.\\d+)?)\\s*px/);return t?parseFloat(t[1]):16}function jl(){return Wr===null&&(Wr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Wr}function Dp(e){return Np.test(e)||e.includes("\\uFE0F")}function $l(e){return Rp.test(e)}function Ip(e,t){let n=zl.get(e);if(n!==void 0)return n;let i=Vr();i.font=e;let r=i.measureText("\\u{1F600}").width;if(n=0,r>t+.5&&typeof document<"u"&&document.body!==null){let o=document.createElement("span");o.style.font=e,o.style.display="inline-block",o.style.visibility="hidden",o.style.position="absolute",o.textContent="\\u{1F600}",document.body.appendChild(o);let a=o.getBoundingClientRect().width;document.body.removeChild(o),r-a>.5&&(n=r-a)}return zl.set(e,n),n}function Pp(e){let t=0,n=jl();for(let i of n.segment(e))Dp(i.segment)&&t++;return t}function Op(e,t){return t.emojiCount===void 0&&(t.emojiCount=Pp(e)),t.emojiCount}function it(e,t,n){return n===0?t.width:t.width-Op(e,t)*n}function ql(e,t,n,i,r){if(t.breakableFitAdvances!==void 0)return t.breakableFitAdvances;let o=jl(),a=[];for(let f of o.segment(e))a.push(f.segment);if(a.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(r==="sum-graphemes"){let f=[];for(let p of a){let d=Ke(p,n);f.push(it(p,d,i))}return t.breakableFitAdvances=f,t.breakableFitAdvances}if(r==="pair-context"||a.length>Mp){let f=[],p=null,d=0;for(let x of a){let S=Ke(x,n),y=it(x,S,i);if(p===null)f.push(y);else{let b=p+x,A=Ke(b,n);f.push(it(b,A,i)-d)}p=x,d=y}return t.breakableFitAdvances=f,t.breakableFitAdvances}let c=[],s="",l=0;for(let f of a){s+=f;let p=Ke(s,n),d=it(s,p,i);c.push(d-l),l=d}return t.breakableFitAdvances=c,t.breakableFitAdvances}function Kl(e,t){let n=Vr();n.font=e;let i=Lp(e),r=kp(e),o=t?Ip(e,r):0;return{cache:i,fontSize:r,emojiCorrection:o}}function Bp(e,t){for(;t<e.widths.length;){let n=e.kinds[t];if(n!=="space"&&n!=="zero-width-break"&&n!=="soft-hyphen")break;t++}return t}function Hp(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function Gp(e,t,n,i,r){let o=0,a=t;for(;o<e.length;){let c=a+e[o];if((o+1<e.length?c+r:c)>n+i)break;a=c,o++}return{fitCount:o,fittedWidth:a}}function Jl(e,t){return e.simpleLineWalkFastPath?Yl(e,t):Xl(e,t)}function Yl(e,t,n){let{widths:i,kinds:r,breakableFitAdvances:o}=e;if(i.length===0)return 0;let c=Tt().lineFitEpsilon,s=t+c,l=0,f=0,p=!1,d=0,x=0,S=0,y=0,b=-1,A=0;function _(){b=-1,A=0}function M(F=S,R=y,L=f){l++,n?.({startSegmentIndex:d,startGraphemeIndex:x,endSegmentIndex:F,endGraphemeIndex:R,width:L}),f=0,p=!1,_()}function G(F,R){p=!0,d=F,x=0,S=F+1,y=0,f=R}function D(F,R,L){p=!0,d=F,x=R,S=F,y=R+1,f=L}function v(F,R){if(!p){G(F,R);return}f+=R,S=F+1,y=0}function w(F,R){let L=o[F];for(let z=R;z<L.length;z++){let P=L[z];p?f+P>s?(M(),D(F,z,P)):(f+=P,S=F,y=z+1):D(F,z,P)}p&&S===F&&y===L.length&&(S=F+1,y=0)}let C=0;for(;C<i.length&&!(!p&&(C=Bp(e,C),C>=i.length));){let F=i[C],R=r[C],L=R==="space"||R==="preserved-space"||R==="tab"||R==="zero-width-break"||R==="soft-hyphen";if(!p){F>t&&o[C]!==null?w(C,0):G(C,F),L&&(b=C+1,A=f-F),C++;continue}if(f+F>s){if(L){v(C,F),M(C+1,0,f-F),C++;continue}if(b>=0){if(S>b||S===b&&y>0){M();continue}M(b,0,A);continue}if(F>t&&o[C]!==null){M(),w(C,0),C++;continue}M();continue}v(C,F),L&&(b=C+1,A=f-F),C++}return p&&M(),l}function Xl(e,t,n){if(e.simpleLineWalkFastPath)return Yl(e,t,n);let{widths:i,lineEndFitAdvances:r,lineEndPaintAdvances:o,kinds:a,breakableFitAdvances:c,discretionaryHyphenWidth:s,tabStopAdvance:l,chunks:f}=e;if(i.length===0||f.length===0)return 0;let p=Tt(),d=p.lineFitEpsilon,x=t+d,S=0,y=0,b=!1,A=0,_=0,M=0,G=0,D=-1,v=0,w=0,C=null;function F(){D=-1,v=0,w=0,C=null}function R(j=M,Y=G,B=y){S++,n?.({startSegmentIndex:A,startGraphemeIndex:_,endSegmentIndex:j,endGraphemeIndex:Y,width:B}),y=0,b=!1,F()}function L(j,Y){b=!0,A=j,_=0,M=j+1,G=0,y=Y}function z(j,Y,B){b=!0,A=j,_=Y,M=j,G=Y+1,y=B}function P(j,Y){if(!b){L(j,Y);return}y+=Y,M=j+1,G=0}function X(j,Y,B,V){if(!Y)return;let Ae=j==="tab"?0:r[B],U=j==="tab"?V:o[B];D=B+1,v=y-V+Ae,w=y-V+U,C=j}function I(j,Y){let B=c[j];for(let V=Y;V<B.length;V++){let Ae=B[V];b?y+Ae>x?(R(),z(j,V,Ae)):(y+=Ae,M=j,G=V+1):z(j,V,Ae)}b&&M===j&&G===B.length&&(M=j+1,G=0)}function ie(j){if(C!=="soft-hyphen")return!1;let Y=c[j];if(Y==null)return!1;let{fitCount:B,fittedWidth:V}=Gp(Y,y,t,d,s);return B===0?!1:(y=V,M=j,G=B,F(),B===Y.length?(M=j+1,G=0,!0):(R(j,B,V+s),I(j,B),!0))}function Fe(j){S++,n?.({startSegmentIndex:j.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:j.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),F()}for(let j=0;j<f.length;j++){let Y=f[j];if(Y.startSegmentIndex===Y.endSegmentIndex){Fe(Y);continue}b=!1,y=0,A=Y.startSegmentIndex,_=0,M=Y.startSegmentIndex,G=0,F();let B=Y.startSegmentIndex;for(;B<Y.endSegmentIndex;){let V=a[B],Ae=V==="space"||V==="preserved-space"||V==="tab"||V==="zero-width-break"||V==="soft-hyphen",U=V==="tab"?Hp(y,l):i[B];if(V==="soft-hyphen"){b&&(M=B+1,G=0,D=B+1,v=y+s,w=y+s,C=V),B++;continue}if(!b){U>t&&c[B]!==null?I(B,0):L(B,U),X(V,Ae,B,U),B++;continue}if(y+U>x){let H=y+(V==="tab"?0:r[B]),ae=y+(V==="tab"?U:o[B]);if(C==="soft-hyphen"&&p.preferEarlySoftHyphenBreak&&v<=x){R(D,0,w);continue}if(C==="soft-hyphen"&&ie(B)){B++;continue}if(Ae&&H<=x){P(B,U),R(B+1,0,ae),B++;continue}if(D>=0&&v<=x){if(M>D||M===D&&G>0){R();continue}let oe=D;R(oe,0,w),B=oe;continue}if(U>t&&c[B]!==null){R(),I(B,0),B++;continue}R();continue}P(B,U),X(V,Ae,B,U),B++}if(b){let V=D===Y.consumedEndSegmentIndex?w:y;R(Y.consumedEndSegmentIndex,0,V)}}return S}var zr=null;function Up(){return zr===null&&(zr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),zr}function Wp(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function Vp(e,t){let n=[],i=[],r=0,o=!1,a=!1,c=!1;function s(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:r}),i=[],o=!1,a=!1,c=!1)}function l(p,d,x){i=[p],r=d,o=x,a=ii(p),c=mn.has(p)}function f(p,d){i.push(p),o=o||d;let x=ii(p);p.length===1&&nt.has(p)?a=a||x:a=x,c=!1}for(let p of Up().segment(e)){let d=p.segment,x=Ie(d);if(i.length===0){l(d,p.index,x);continue}if(c||ti.has(d)||nt.has(d)||t.carryCJKAfterClosingQuote&&x&&a){f(d,x);continue}if(!o&&!x){f(d,x);continue}s(),l(d,p.index,x)}return s(),n}function zp(e){if(e.length<=1)return e;let t=[],n=[e[0].text],i=e[0].start,r=Ie(e[0].text),o=ei(e[0].text);function a(){t.push({text:n.length===1?n[0]:n.join(""),start:i})}for(let c=1;c<e.length;c++){let s=e[c],l=Ie(s.text),f=ei(s.text);if(r&&o){n.push(s.text),r=r||l,o=f;continue}a(),n=[s.text],i=s.start,r=l,o=f}return a(),t}function jp(e,t,n,i){let r=Tt(),{cache:o,emojiCorrection:a}=Kl(t,$l(e.normalized)),c=it("-",Ke("-",o),a),l=it(" ",Ke(" ",o),a)*8;if(e.len===0)return Wp(n);let f=[],p=[],d=[],x=[],S=e.chunks.length<=1,y=n?[]:null,b=[],A=n?[]:null,_=Array.from({length:e.len});function M(w,C,F,R,L,z,P){L!=="text"&&L!=="space"&&L!=="zero-width-break"&&(S=!1),f.push(C),p.push(F),d.push(R),x.push(L),y?.push(z),b.push(P),A!==null&&A.push(w)}function G(w,C,F,R,L){let z=Ke(w,o),P=it(w,z,a),X=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:P,I=C==="space"||C==="zero-width-break"?0:P;if(L&&R&&w.length>1){let ie="sum-graphemes";fn(w)?ie="pair-context":r.preferPrefixWidthsForBreakableRuns&&(ie="segment-prefixes");let Fe=ql(w,z,o,a,ie);M(w,P,X,I,C,F,Fe);return}M(w,P,X,I,C,F,null)}for(let w=0;w<e.len;w++){_[w]=f.length;let C=e.texts[w],F=e.isWordLike[w],R=e.kinds[w],L=e.starts[w];if(R==="soft-hyphen"){M(C,0,c,c,R,L,null);continue}if(R==="hard-break"){M(C,0,0,0,R,L,null);continue}if(R==="tab"){M(C,0,0,0,R,L,null);continue}let z=Ke(C,o);if(R==="text"&&z.containsCJK){let P=Vp(C,r),X=i==="keep-all"?zp(P):P;for(let I=0;I<X.length;I++){let ie=X[I];G(ie.text,"text",L+ie.start,F,i==="keep-all"||!Ie(ie.text))}continue}G(C,R,L,F,!0)}let D=$p(e.chunks,_,f.length),v=y===null?null:Rl(e.normalized,y);return A!==null?{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:d,kinds:x,simpleLineWalkFastPath:S,segLevels:v,breakableFitAdvances:b,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:D,segments:A}:{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:d,kinds:x,simpleLineWalkFastPath:S,segLevels:v,breakableFitAdvances:b,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:D}}function $p(e,t,n){let i=[];for(let r=0;r<e.length;r++){let o=e[r],a=o.startSegmentIndex<t.length?t[o.startSegmentIndex]:n,c=o.endSegmentIndex<t.length?t[o.endSegmentIndex]:n,s=o.consumedEndSegmentIndex<t.length?t[o.consumedEndSegmentIndex]:n;i.push({startSegmentIndex:a,endSegmentIndex:c,consumedEndSegmentIndex:s})}return i}function qp(e,t,n,i){let r=i?.wordBreak??"normal",o=Wl(e,Tt(),i?.whiteSpace,r);return jp(o,t,n,r)}function Ql(e,t,n){return qp(e,t,!1,n)}function Zl(e,t,n){let i=Jl(e,t);return{lineCount:i,height:i*n}}var Kp={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function eu(e,t){let n={...Kp,...t},i=1.2;for(let r=n.baseFontSize;r>=n.minFontSize;r-=n.step){let o=`${n.fontWeight} ${r}px ${n.fontFamily}`,a=Ql(e,o),{lineCount:c}=Zl(a,n.maxWidth,r*i);if(c<=1)return{fontSize:r,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};xl();window.__hyperframes={fitTextFontSize:eu,getVariables:ho};function tu(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,Ml())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",tu,{once:!0}):tu();})();\n';
|
|
57195
|
+
RUNTIME_IIFE = '"use strict";(()=>{var yu=Object.create;var hi=Object.defineProperty;var Su=Object.getOwnPropertyDescriptor;var Eu=Object.getOwnPropertyNames;var Au=Object.getPrototypeOf,wu=Object.prototype.hasOwnProperty;var Cu=(e,t,n)=>t in e?hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var _u=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Eu(t))!wu.call(e,r)&&r!==n&&hi(e,r,{get:()=>t[r],enumerable:!(i=Su(t,r))||i.enumerable});return e};var Fu=(e,t,n)=>(n=e!=null?yu(Au(e)):{},_u(t||!e||!e.__esModule?hi(n,"default",{value:e,enumerable:!0}):n,e));var me=(e,t,n)=>Cu(e,typeof t!="symbol"?t+"":t,n);var ps=Z((L0,Vi)=>{var J=String,ms=function(){return{isColorSupported:!1,reset:J,bold:J,dim:J,italic:J,underline:J,inverse:J,hidden:J,strikethrough:J,black:J,red:J,green:J,yellow:J,blue:J,magenta:J,cyan:J,white:J,gray:J,bgBlack:J,bgRed:J,bgGreen:J,bgYellow:J,bgBlue:J,bgMagenta:J,bgCyan:J,bgWhite:J,blackBright:J,redBright:J,greenBright:J,yellowBright:J,blueBright:J,magentaBright:J,cyanBright:J,whiteBright:J,bgBlackBright:J,bgRedBright:J,bgGreenBright:J,bgYellowBright:J,bgBlueBright:J,bgMagentaBright:J,bgCyanBright:J,bgWhiteBright:J}};Vi.exports=ms();Vi.exports.createColors=ms});var zi=Z(()=>{});var Nn=Z((I0,xs)=>{"use strict";var hs=ps(),gs=zi(),jt=class e extends Error{constructor(t,n,i,r,o,a){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),r&&(this.source=r),a&&(this.plugin=a),typeof n<"u"&&typeof i<"u"&&(typeof n=="number"?(this.line=n,this.column=i):(this.line=n.line,this.column=n.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=hs.isColorSupported);let i=f=>f,r=f=>f,o=f=>f;if(t){let{bold:f,gray:p,red:d}=hs.createColors(!0);r=x=>f(d(x)),i=x=>p(x),gs&&(o=x=>gs(x))}let a=n.split(/\\r?\\n/),c=Math.max(this.line-3,0),s=Math.min(this.line+2,a.length),l=String(s).length;return a.slice(c,s).map((f,p)=>{let d=c+1+p,x=" "+(" "+d).slice(-l)+" | ";if(d===this.line){if(f.length>160){let y=20,b=Math.max(0,this.column-y),A=Math.max(this.column+y,this.endColumn+y),_=f.slice(b,A),M=i(x.replace(/\\d/g," "))+f.slice(0,Math.min(this.column-1,y-1)).replace(/[^\\t]/g," ");return r(">")+i(x)+o(_)+`\n `+M+r("^")}let S=i(x.replace(/\\d/g," "))+f.slice(0,this.column-1).replace(/[^\\t]/g," ");return r(">")+i(x)+o(f)+`\n `+S+r("^")}return" "+i(x)+o(f)}).join(`\n`)}toString(){let t=this.showSourceCode();return t&&(t=`\n\n`+t+`\n`),this.name+": "+this.message+t}};xs.exports=jt;jt.default=jt});var ji=Z((P0,ys)=>{"use strict";var $c=/(<)(\\/?style\\b)/gi,qc=/(<)(!--)/g;function Xe(e){return typeof e!="string"||!e.includes("<")?e:e.replace($c,"\\\\3c $2").replace(qc,"\\\\3c $2")}var bs={after:`\n`,beforeClose:`\n`,beforeComment:`\n`,beforeDecl:`\n`,beforeOpen:" ",beforeRule:`\n`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Kc(e){return e[0].toUpperCase()+e.slice(1)}var $t=class{constructor(t){this.builder=t}atrule(t,n){let i=t.raws,r="@"+t.name,o=t.params?this.rawValue(t,"params"):"";if(typeof i.afterName<"u"?r+=i.afterName:o&&(r+=" "),t.nodes)this.block(t,r+o);else{let a=(i.between||"")+(n?";":"");this.builder(Xe(r+o+a),t)}}beforeAfter(t,n){let i;t.type==="decl"?i=this.raw(t,null,"beforeDecl"):t.type==="comment"?i=this.raw(t,null,"beforeComment"):n==="before"?i=this.raw(t,null,"beforeRule"):i=this.raw(t,null,"beforeClose");let r=t.parent,o=0;for(;r&&r.type!=="root";)o+=1,r=r.parent;if(i.includes(`\n`)){let a=this.raw(t,null,"indent");if(a.length)for(let c=0;c<o;c++)i+=a}return i}block(t,n){let i=this.raw(t,"between","beforeOpen");this.builder(Xe(n+i)+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(Xe(r)),this.builder("}",t,"end")}body(t){let n=t.nodes,i=n.length-1;for(;i>0&&n[i].type==="comment";)i-=1;let r=this.raw(t,"semicolon"),o=t.type==="document";for(let a=0;a<n.length;a++){let c=n[a],s=this.raw(c,"before");s&&this.builder(o?s:Xe(s)),this.stringify(c,i!==a||r)}}comment(t){let n=this.raw(t,"left","commentLeft"),i=this.raw(t,"right","commentRight");this.builder(Xe("/*"+n+t.text+i+"*/"),t)}decl(t,n){let i=t.raws,r=this.raw(t,"between","colon"),o=t.prop+r+this.rawValue(t,"value");t.important&&(o+=i.important||" !important"),n&&(o+=";"),this.builder(Xe(o),t)}document(t){this.body(t)}raw(t,n,i){let r;if(i||(i=n),n&&(r=t.raws[n],typeof r<"u"))return r;let o=t.parent;if(i==="before"&&(!o||o.type==="root"&&o.first===t||o&&o.type==="document"))return"";if(!o)return bs[i];let a=t.root(),c=a.rawCache||(a.rawCache={});if(typeof c[i]<"u")return c[i];if(i==="before"||i==="after")return this.beforeAfter(t,i);{let s="raw"+Kc(i);this[s]?r=this[s](a,t):a.walk(l=>{if(r=l.raws[n],typeof r<"u")return!1})}return typeof r>"u"&&(r=bs[i]),c[i]=r,r}rawBeforeClose(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return n=i.raws.after,n.includes(`\n`)&&(n=n.replace(/[^\\n]+$/,"")),!1}),n&&(n=n.replace(/\\S/g,"")),n}rawBeforeComment(t,n){let i;return t.walkComments(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`\n`)&&(i=i.replace(/[^\\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeDecl"):i&&(i=i.replace(/\\S/g,"")),i}rawBeforeDecl(t,n){let i;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`\n`)&&(i=i.replace(/[^\\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeRule"):i&&(i=i.replace(/\\S/g,"")),i}rawBeforeOpen(t){let n;return t.walk(i=>{if(i.type!=="decl"&&(n=i.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(i=>{if(i.nodes&&(i.parent!==t||t.first!==i)&&typeof i.raws.before<"u")return n=i.raws.before,n.includes(`\n`)&&(n=n.replace(/[^\\n]+$/,"")),!1}),n&&(n=n.replace(/\\S/g,"")),n}rawColon(t){let n;return t.walkDecls(i=>{if(typeof i.raws.between<"u")return n=i.raws.between.replace(/[^\\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length===0&&(n=i.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(i=>{let r=i.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof i.raws.before<"u"){let o=i.raws.before.split(`\n`);return n=o[o.length-1],n=n.replace(/\\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(n=i.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let i=t[n],r=t.raws[n];return r&&r.value===i?r.raw:i}root(t){if(this.body(t),t.raws.after){let n=t.raws.after,i=t.parent&&t.parent.type==="document";this.builder(i?n:Xe(n))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(Xe(t.raws.ownSemicolon),t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};ys.exports=$t;$t.default=$t});var qt=Z((O0,Ss)=>{"use strict";var Jc=ji();function $i(e,t){new Jc(t).stringify(e)}Ss.exports=$i;$i.default=$i});var Rn=Z((B0,qi)=>{"use strict";qi.exports.isClean=Symbol("isClean");qi.exports.my=Symbol("my")});var Yt=Z((H0,Es)=>{"use strict";var Yc=Nn(),Xc=ji(),Qc=qt(),{isClean:Kt,my:Zc}=Rn();function Ki(e,t){let n=new e.constructor;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i)||i==="proxyCache")continue;let r=e[i],o=typeof r;i==="parent"&&o==="object"?t&&(n[i]=t):i==="source"?n[i]=r:Array.isArray(r)?n[i]=r.map(a=>Ki(a,n)):(o==="object"&&r!==null&&(r=Ki(r)),n[i]=r)}return n}function je(e,t){if(t&&typeof t.offset<"u")return t.offset;let n=1,i=1,r=0;for(let o=0;o<e.length;o++){if(i===t.line&&n===t.column){r=o;break}e[o]===`\n`?(n=1,i+=1):n+=1}return r}var Jt=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Kt]=!1,this[Zc]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let i of t[n])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\\n\\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\\n\\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=Ki(this);for(let i in t)n[i]=t[i];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:i,start:r}=this.rangeBy(n);return this.source.input.error(t,{column:r.column,line:r.line},{column:i.column,line:i.line},n)}return new Yc(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,i){return t[n]===i||(t[n]=i,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markClean(){this[Kt]=!0}markDirty(){if(this[Kt]){this[Kt]=!1;let t=this;for(;t=t.parent;)t[Kt]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let n=this.source.start;if(t.index)n=this.positionInside(t.index);else if(t.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,o=i.slice(je(i,this.source.start),je(i,this.source.end)).indexOf(t.word);o!==-1&&(n=this.positionInside(o))}return n}positionInside(t){let n=this.source.start.column,i=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,o=je(r,this.source.start),a=o+t;for(let c=o;c<a;c++)r[c]===`\n`?(n=1,i+=1):n+=1;return{column:n,line:i,offset:a}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:je(n,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:je(n,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(t.word){let a=n.slice(je(n,this.source.start),je(n,this.source.end)).indexOf(t.word);a!==-1&&(i=this.positionInside(a),r=this.positionInside(a+t.word.length))}else t.start?i={column:t.start.column,line:t.start.line,offset:je(n,t.start)}:t.index&&(i=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line,offset:je(n,t.end)}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<i.line||r.line===i.line&&r.column<=i.column)&&(r={column:i.column+1,line:i.line,offset:i.offset+1}),{end:r,start:i}}raw(t,n){return new Xc().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,i=!1;for(let r of t)r===this?i=!0:i?(this.parent.insertAfter(n,r),n=r):this.parent.insertBefore(n,r);i||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let i={},r=n==null;n=n||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let c=this[a];if(Array.isArray(c))i[a]=c.map(s=>typeof s=="object"&&s.toJSON?s.toJSON(null,n):s);else if(typeof c=="object"&&c.toJSON)i[a]=c.toJSON(null,n);else if(a==="source"){if(c==null)continue;let s=n.get(c.input);s==null&&(s=o,n.set(c.input,o),o++),i[a]={end:c.end,inputId:s,start:c.start}}else i[a]=c}return r&&(i.inputs=[...n.keys()].map(a=>a.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Qc){t.stringify&&(t=t.stringify);let n="";return t(this,i=>{n+=i}),n}warn(t,n,i={}){let r={node:this};for(let o in i)r[o]=i[o];return t.warn(n,r)}};Es.exports=Jt;Jt.default=Jt});var Qt=Z((G0,As)=>{"use strict";var ed=Yt(),Xt=class extends ed{constructor(t){super(t),this.type="comment"}};As.exports=Xt;Xt.default=Xt});var en=Z((U0,ws)=>{"use strict";var td=Yt(),Zt=class extends td{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};ws.exports=Zt;Zt.default=Zt});var Qe=Z((W0,Ls)=>{"use strict";var Cs=Qt(),_s=en(),nd=Yt(),{isClean:Fs,my:Ts}=Rn(),Ji,vs,Ms,Yi;function Ns(e){return e.map(t=>(t.nodes&&(t.nodes=Ns(t.nodes)),delete t.source,t))}function Rs(e){if(e[Fs]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Rs(t)}var ke=class e extends nd{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let n of t){let i=this.normalize(n,this.last);for(let r of i)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),i,r;for(;this.indexes[n]<this.proxyOf.nodes.length&&(i=this.indexes[n],r=t(this.proxyOf.nodes[i],i),r!==!1);)this.indexes[n]+=1;return delete this.indexes[n],r}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...i)=>t[n](...i.map(r=>typeof r=="function"?(o,a)=>r(o.toProxy(),a):r)):n==="every"||n==="some"?i=>t[n]((r,...o)=>i(r.toProxy(),...o)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(i=>i.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,i){return t[n]===i||(t[n]=i,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let i=this.index(t),r=this.normalize(n,this.proxyOf.nodes[i]).reverse();i=this.index(t);for(let a of r)this.proxyOf.nodes.splice(i+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],i<o&&(this.indexes[a]=o+r.length);return this.markDirty(),this}insertBefore(t,n){let i=this.index(t),r=i===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[i],r).reverse();i=this.index(t);for(let c of o)this.proxyOf.nodes.splice(i,0,c);let a;for(let c in this.indexes)a=this.indexes[c],i<=a&&(this.indexes[c]=a+o.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=Ns(vs(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new _s(t)]}else if(t.selector||t.selectors)t=[new Yi(t)];else if(t.name)t=[new Ji(t)];else if(t.text)t=[new Cs(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[Ts]||e.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Fs]&&Rs(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let n of t){let i=this.normalize(n,this.first,"prepend").reverse();for(let r of i)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let i in this.indexes)n=this.indexes[i],n>=t&&(this.indexes[i]=n-1);return this.markDirty(),this}replaceValues(t,n,i){return i||(i=n,n={}),this.walkDecls(r=>{n.props&&!n.props.includes(r.prop)||n.fast&&!r.value.includes(n.fast)||(r.value=r.value.replace(t,i))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,i)=>{let r;try{r=t(n,i)}catch(o){throw n.addToError(o)}return r!==!1&&n.walk&&(r=n.walk(t)),r})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="atrule"&&t.test(i.name))return n(i,r)}):this.walk((i,r)=>{if(i.type==="atrule"&&i.name===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="atrule")return n(i,r)}))}walkComments(t){return this.walk((n,i)=>{if(n.type==="comment")return t(n,i)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="decl"&&t.test(i.prop))return n(i,r)}):this.walk((i,r)=>{if(i.type==="decl"&&i.prop===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="decl")return n(i,r)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((i,r)=>{if(i.type==="rule"&&t.test(i.selector))return n(i,r)}):this.walk((i,r)=>{if(i.type==="rule"&&i.selector===t)return n(i,r)}):(n=t,this.walk((i,r)=>{if(i.type==="rule")return n(i,r)}))}};ke.registerParse=e=>{vs=e};ke.registerRule=e=>{Yi=e};ke.registerAtRule=e=>{Ji=e};ke.registerRoot=e=>{Ms=e};Ls.exports=ke;ke.default=ke;ke.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Ji.prototype):e.type==="rule"?Object.setPrototypeOf(e,Yi.prototype):e.type==="decl"?Object.setPrototypeOf(e,_s.prototype):e.type==="comment"?Object.setPrototypeOf(e,Cs.prototype):e.type==="root"&&Object.setPrototypeOf(e,Ms.prototype),e[Ts]=!0,e.nodes&&e.nodes.forEach(t=>{ke.rebuild(t)})}});var Ln=Z((V0,Ds)=>{"use strict";var ks=Qe(),yt=class extends ks{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};Ds.exports=yt;yt.default=yt;ks.registerAtRule(yt)});var kn=Z((z0,Os)=>{"use strict";var id=Qe(),Is,Ps,ct=class extends id{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Is(new Ps,this,t).stringify()}};ct.registerLazyResult=e=>{Is=e};ct.registerProcessor=e=>{Ps=e};Os.exports=ct;ct.default=ct});var Hs=Z((j0,Bs)=>{var rd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",od=(e,t=21)=>(n=t)=>{let i="",r=n|0;for(;r--;)i+=e[Math.random()*e.length|0];return i},sd=(e=21)=>{let t="",n=e|0;for(;n--;)t+=rd[Math.random()*64|0];return t};Bs.exports={nanoid:sd,customAlphabet:od}});var Dn=Z(()=>{});var In=Z(()=>{});var Xi=Z(()=>{});var Gs=Z(()=>{});var Zi=Z((eg,Vs)=>{"use strict";var{existsSync:ad,readFileSync:ld}=Gs(),{dirname:Qi,join:ud}=Dn(),{SourceMapConsumer:Us,SourceMapGenerator:Ws}=In();function cd(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var tn=class{constructor(t,n){if(n.map===!1)return;n.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let i=n.map?n.map.prev:void 0,r=this.loadMap(n.from,i);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Qi(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Us(this.json||this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\\/json;charset=utf-?8;base64,/,i=/^data:application\\/json;base64,/,r=/^data:application\\/json;charset=utf-?8,/,o=/^data:application\\/json,/,a=t.match(r)||t.match(o);if(a)return decodeURIComponent(t.substr(a[0].length));let c=t.match(n)||t.match(i);if(c)return cd(t.substr(c[0].length));let s=t.slice(22);throw s=s.slice(0,s.indexOf(",")),new Error("Unsupported source map encoding "+s)}getAnnotationURL(t){return t.replace(/^\\/\\*\\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\\/\\*\\s*# sourceMappingURL=/g);if(!n)return;let i=t.lastIndexOf(n.pop()),r=t.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(i,r)))}loadFile(t,n,i){if(!(!i&&!this.unsafeMap&&!/\\.map$/i.test(t))&&(this.root=Qi(t),ad(t)))return this.mapFile=t,ld(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let i=n(t);if(i){let r=this.loadFile(i,t,!0);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(n instanceof Us)return Ws.fromSourceMap(n).toString();if(n instanceof Ws)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;t&&(i=ud(Qi(t),i));let r=this.loadFile(i,t,!1);if(r)try{this.json=JSON.parse(r.replace(/^\\)]}\'[^\\n]*\\n/,""))}catch{return}return r}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};Vs.exports=tn;tn.default=tn});var nn=Z((tg,Ks)=>{"use strict";var{nanoid:dd}=Hs(),{isAbsolute:nr,resolve:ir}=Dn(),{SourceMapConsumer:fd,SourceMapGenerator:md}=In(),{fileURLToPath:zs,pathToFileURL:Pn}=Xi(),js=Nn(),pd=Zi(),er=zi(),tr=Symbol("lineToIndexCache"),hd=!!(fd&&md),$s=!!(ir&&nr);function qs(e){if(e[tr])return e[tr];let t=e.css.split(`\n`),n=new Array(t.length),i=0;for(let r=0,o=t.length;r<o;r++)n[r]=i,i+=t[r].length+1;return e[tr]=n,n}var St=class{get from(){return this.file||this.id}constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\\uFEFF"||this.css[0]==="\\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(!$s||/^\\w+:\\/\\//.test(n.from)||nr(n.from)?this.file=n.from:this.file=ir(n.from)),$s&&hd){let i=new pd(this.css,n);if(i.text){this.map=i;let r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+dd(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,i,r={}){let o,a,c,s,l;if(n&&typeof n=="object"){let p=n,d=i;if(typeof p.offset=="number"){s=p.offset;let x=this.fromOffset(s);n=x.line,i=x.col}else n=p.line,i=p.column,s=this.fromLineAndColumn(n,i);if(typeof d.offset=="number"){c=d.offset;let x=this.fromOffset(c);a=x.line,o=x.col}else a=d.line,o=d.column,c=this.fromLineAndColumn(d.line,d.column)}else if(i)s=this.fromLineAndColumn(n,i);else{s=n;let p=this.fromOffset(s);n=p.line,i=p.col}let f=this.origin(n,i,a,o);return f?l=new js(t,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,r.plugin):l=new js(t,a===void 0?n:{column:i,line:n},a===void 0?i:{column:o,line:a},this.css,this.file,r.plugin),l.input={column:i,endColumn:o,endLine:a,endOffset:c,line:n,offset:s,source:this.css},this.file&&(Pn&&(l.input.url=Pn(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,n){return qs(this)[t-1]+n-1}fromOffset(t){let n=qs(this),i=n[n.length-1],r=0;if(t>=i)r=n.length-1;else{let o=n.length-2,a;for(;r<o;)if(a=r+(o-r>>1),t<n[a])o=a-1;else if(t>=n[a+1])r=a+1;else{r=a;break}}return{col:t-n[r]+1,line:r+1}}mapResolve(t){return/^\\w+:\\/\\//.test(t)?t:ir(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,i,r){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n,line:t});if(!a.source)return!1;let c;typeof i=="number"&&(c=o.originalPositionFor({column:r,line:i}));let s;nr(a.source)?s=Pn(a.source):s=new URL(a.source,this.map.consumer().sourceRoot||Pn(this.map.mapFile));let l={column:a.column,endColumn:c&&c.column,endLine:c&&c.line,line:a.line,url:s.toString()};if(s.protocol==="file:")if(zs)l.file=zs(s);else throw new Error("file: protocol is not available in this PostCSS build");let f=o.sourceContentFor(a.source);return f&&(l.source=f),l}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};Ks.exports=St;St.default=St;er&&er.registerInput&&er.registerInput(St)});var Et=Z((ng,Qs)=>{"use strict";var Js=Qe(),Ys,Xs,Ze=class extends Js{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,i){let r=super.normalize(t);if(n){if(i==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let o of r)o.raws.before=n.raws.before}return r}removeChild(t,n){let i=this.index(t);return!n&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(t)}toResult(t={}){return new Ys(new Xs,this,t).stringify()}};Ze.registerLazyResult=e=>{Ys=e};Ze.registerProcessor=e=>{Xs=e};Qs.exports=Ze;Ze.default=Ze;Js.registerRoot(Ze)});var rr=Z((ig,Zs)=>{"use strict";var rn={comma(e){return rn.split(e,[","],!0)},space(e){let t=[" ",`\n`," "];return rn.split(e,t)},split(e,t,n){let i=[],r="",o=!1,a=0,c=!1,s="",l=!1;for(let f of e)l?l=!1:f==="\\\\"?l=!0:c?f===s&&(c=!1):f===\'"\'||f==="\'"?(c=!0,s=f):f==="("?a+=1:f===")"?a>0&&(a-=1):a===0&&t.includes(f)&&(o=!0),o?(r!==""&&i.push(r.trim()),r="",o=!1):r+=f;return(n||r!=="")&&i.push(r.trim()),i}};Zs.exports=rn;rn.default=rn});var On=Z((rg,ta)=>{"use strict";var ea=Qe(),gd=rr(),At=class extends ea{get selectors(){return gd.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\\s*/):null,i=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(i)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};ta.exports=At;At.default=At;ea.registerRule(At)});var ia=Z((og,na)=>{"use strict";var xd=Ln(),bd=Qt(),yd=en(),Sd=nn(),Ed=Zi(),Ad=Et(),wd=On();function on(e,t){if(Array.isArray(e))return e.map(r=>on(r));let{inputs:n,...i}=e;if(n){t=[];for(let r of n){let o={...r,__proto__:Sd.prototype};o.map&&(o.map={...o.map,__proto__:Ed.prototype}),t.push(o)}}if(i.nodes&&(i.nodes=e.nodes.map(r=>on(r,t))),i.source){let{inputId:r,...o}=i.source;i.source=o,r!=null&&(i.source.input=t[r])}if(i.type==="root")return new Ad(i);if(i.type==="decl")return new yd(i);if(i.type==="rule")return new wd(i);if(i.type==="comment")return new bd(i);if(i.type==="atrule")return new xd(i);throw new Error("Unknown node type: "+e.type)}na.exports=on;on.default=on});var sr=Z((sg,ua)=>{"use strict";var{dirname:Bn,relative:oa,resolve:sa,sep:aa}=Dn(),{SourceMapConsumer:la,SourceMapGenerator:Hn}=In(),{pathToFileURL:ra}=Xi(),Cd=nn(),_d=!!(la&&Hn),Fd=!!(Bn&&sa&&oa&&aa),or=class{constructor(t,n,i,r){this.stringify=t,this.mapOpts=i.map||{},this.root=n,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`\n`;this.css.includes(`\\r\n`)&&(n=`\\r\n`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),i=t.root||Bn(t.file),r;this.mapOpts.sourcesContent===!1?(r=new la(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else if(this.css){let t;for(;(t=this.css.lastIndexOf("/*#"))!==-1;){let n=this.css.indexOf("*/",t+3);if(n===-1)break;for(;t>0&&this.css[t-1]===`\n`;)t--;this.css=this.css.slice(0,t)+this.css.slice(n+2)}}}}generate(){if(this.clearAnnotation(),Fd&&_d&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Hn.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Hn({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Hn({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,i="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(c,s,l)=>{if(this.css+=c,s&&l!=="end"&&(r.generated.line=t,r.generated.column=n-1,s.source&&s.source.start?(r.source=this.sourcePath(s),r.original.line=s.source.start.line,r.original.column=s.source.start.column-1,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,this.map.addMapping(r))),a=c.match(/\\n/g),a?(t+=a.length,o=c.lastIndexOf(`\n`),n=c.length-o):n+=c.length,s&&l!=="start"){let f=s.parent||{raws:{}};(!(s.type==="decl"||s.type==="atrule"&&!s.nodes)||s!==f.last||f.raws.semicolon)&&(s.source&&s.source.end?(r.source=this.sourcePath(s),r.original.line=s.source.end.line,r.original.column=s.source.end.column-1,r.generated.line=t,r.generated.column=n-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\\w+:\\/\\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let i=this.opts.to?Bn(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=Bn(sa(i,this.mapOpts.annotation)));let r=oa(i,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new Cd(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let i=n.source.input.from;if(i&&!t[i]){t[i]=!0;let r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(ra){let i=ra(t).toString();return this.memoizedFileURLs.set(t,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;aa==="\\\\"&&(t=t.replace(/\\\\/g,"/"));let i=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,i),i}};ua.exports=or});var fa=Z((ag,da)=>{"use strict";var Gn=/[\\t\\n\\f\\r "#\'()/;[\\\\\\]{}]/g,Un=/[\\t\\n\\f\\r !"#\'():;@[\\\\\\]{}]|\\/(?=\\*)/g,Td=/.[\\r\\n"\'(/\\\\]/,ca=/[\\da-f]/i;da.exports=function(t,n={}){let i=t.css.valueOf(),r=n.ignoreErrors,o,a,c,s,l,f,p,d,x,S,y=i.length,b=0,A=[],_=[],M=-1;function G(){return b}function D(F){throw t.error("Unclosed "+F,b)}function v(){return _.length===0&&b>=y}function w(F){if(_.length)return _.pop();if(b>=y)return;let R=F?F.ignoreUnclosed:!1;switch(o=i.charCodeAt(b),o){case 10:case 32:case 9:case 13:case 12:{s=b;do s+=1,o=i.charCodeAt(s);while(o===32||o===10||o===9||o===13||o===12);f=["space",i.slice(b,s)],b=s-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let L=String.fromCharCode(o);f=[L,L,b];break}case 40:{if(S=A.length?A.pop()[1]:"",x=i.charCodeAt(b+1),S==="url"&&x!==39&&x!==34&&x!==32&&x!==10&&x!==9&&x!==12&&x!==13){s=b;do{if(p=!1,s=i.indexOf(")",s+1),s===-1)if(r||R){s=b;break}else D("bracket");for(d=s;i.charCodeAt(d-1)===92;)d-=1,p=!p}while(p);f=["brackets",i.slice(b,s+1),b,s],b=s}else b<=M?f=["(","(",b]:(s=i.indexOf(")",b+1),a=i.slice(b,s+1),s===-1||Td.test(a)?(M=s===-1?y:s,f=["(","(",b]):(f=["brackets",a,b,s],b=s));break}case 39:case 34:{l=o===39?"\'":\'"\',s=b;do{if(p=!1,s=i.indexOf(l,s+1),s===-1)if(r||R){s=b+1;break}else D("string");for(d=s;i.charCodeAt(d-1)===92;)d-=1,p=!p}while(p);f=["string",i.slice(b,s+1),b,s],b=s;break}case 64:{Gn.lastIndex=b+1,Gn.test(i),Gn.lastIndex===0?s=i.length-1:s=Gn.lastIndex-2,f=["at-word",i.slice(b,s+1),b,s],b=s;break}case 92:{for(s=b,c=!0;i.charCodeAt(s+1)===92;)s+=1,c=!c;if(o=i.charCodeAt(s+1),c&&o!==47&&o!==32&&o!==10&&o!==9&&o!==13&&o!==12&&(s+=1,ca.test(i.charAt(s)))){for(;ca.test(i.charAt(s+1));)s+=1;i.charCodeAt(s+1)===32&&(s+=1)}f=["word",i.slice(b,s+1),b,s],b=s;break}default:{o===47&&i.charCodeAt(b+1)===42?(s=i.indexOf("*/",b+2)+1,s===0&&(r||R?s=i.length:D("comment")),f=["comment",i.slice(b,s+1),b,s],b=s):(Un.lastIndex=b+1,Un.test(i),Un.lastIndex===0?s=i.length-1:s=Un.lastIndex-2,f=["word",i.slice(b,s+1),b,s],A.push(f),b=s);break}}return b++,f}function C(F){_.push(F)}return{back:C,endOfFile:v,nextToken:w,position:G}}});var ga=Z((lg,ha)=>{"use strict";var vd=Ln(),Md=Qt(),Nd=en(),Rd=Et(),ma=On(),Ld=fa(),pa={empty:!0,space:!0};function kd(e){for(let t=e.length-1;t>=0;t--){let n=e[t],i=n[3]||n[2];if(i)return i}}var ar=class{constructor(t){this.input=t,this.root=new Rd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new vd;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let i,r,o,a=!1,c=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),i=t[0],i==="("||i==="["?l.push(i==="("?")":"]"):i==="{"&&l.length>0?l.push("}"):i===l[l.length-1]&&l.pop(),l.length===0)if(i===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){c=!0;break}else if(i==="}"){if(s.length>0){for(o=s.length-1,r=s[o];r&&r[0]==="space";)r=s[--o];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(t);break}else s.push(t);else s.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(n.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(n,"params",s),a&&(t=s[s.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),c&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let i=0,r;for(let o=n-1;o>=0&&(r=t[o],!(r[0]!=="space"&&(i+=1,i===2)));o--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let n=0,i,r,o;for(let[a,c]of t.entries()){if(r=c,o=r[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return a}i=r}return!1}comment(t){let n=new Md;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let i=t[1].slice(2,-2);if(!i.trim())n.text="",n.raws.left=i,n.raws.right="";else{let r=i.match(/^(\\s*)([^]*\\S)(\\s*)$/);n.text=r[2],n.raws.left=r[1],n.raws.right=r[3]}}createTokenizer(){this.tokenizer=Ld(this.input)}decl(t,n){let i=new Nd;this.init(i,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(r[3]||r[2]||kd(t)),i.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){let l=t[0][0];if(l===":"||l==="space"||l==="comment")break;i.prop+=t.shift()[1]}i.raws.between="";let o;for(;t.length;)if(o=t.shift(),o[0]===":"){i.raws.between+=o[1];break}else o[0]==="word"&&/\\w/.test(o[1])&&this.unknownWord([o]),i.raws.between+=o[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let a=[],c;for(;t.length&&(c=t[0][0],!(c!=="space"&&c!=="comment"));)a.push(t.shift());this.precheckMissedSemicolon(t);for(let l=t.length-1;l>=0;l--){if(o=t[l],o[1].toLowerCase()==="!important"){i.important=!0;let f=this.stringFrom(t,l);f=this.spacesFromEnd(t)+f,f!==" !important"&&(i.raws.important=f);break}else if(o[1].toLowerCase()==="important"){let f=t.slice(0),p="";for(let d=l;d>0;d--){let x=f[d][0];if(p.trim().startsWith("!")&&x!=="space")break;p=f.pop()[1]+p}p.trim().startsWith("!")&&(i.important=!0,i.raws.important=p,t=f)}if(o[0]!=="space"&&o[0]!=="comment")break}t.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(i.raws.between+=a.map(l=>l[1]).join(""),a=[]),this.raw(i,"value",a.concat(t),n),i.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new ma;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(t[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,i=null,r=!1,o=null,a=[],c=t[1].startsWith("--"),s=[],l=t;for(;l;){if(i=l[0],s.push(l),i==="("||i==="[")o||(o=l),a.push(i==="("?")":"]");else if(c&&r&&i==="{")o||(o=l),a.push("}");else if(a.length===0)if(i===";")if(r){this.decl(s,c);return}else break;else if(i==="{"){this.rule(s);return}else if(i==="}"){this.tokenizer.back(s.pop()),n=!0;break}else i===":"&&(r=!0);else i===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&r){if(!c)for(;s.length&&(l=s[s.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(s.pop());this.decl(s,c)}else this.unknownWord(s)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,i,r){let o,a,c=i.length,s="",l=!0,f,p;for(let d=0;d<c;d+=1)o=i[d],a=o[0],a==="space"&&d===c-1&&!r?l=!1:a==="comment"?(p=i[d-1]?i[d-1][0]:"empty",f=i[d+1]?i[d+1][0]:"empty",!pa[p]&&!pa[f]?s.slice(-1)===","?l=!1:s+=o[1]:l=!1):s+=o[1];if(!l){let d=i.reduce((x,S)=>x+S[1],"");t.raws[n]={raw:d,value:s}}t[n]=s}rule(t){t.pop();let n=new ma;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,i="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)i=t.pop()[1]+i;return i}spacesAndCommentsFromStart(t){let n,i="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)i+=t.shift()[1];return i}spacesFromEnd(t){let n,i="";for(;t.length&&(n=t[t.length-1][0],n==="space");)i=t.pop()[1]+i;return i}stringFrom(t,n){let i="";for(let r=n;r<t.length;r++)i+=t[r][1];return t.splice(n,t.length-n),i}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};ha.exports=ar});var Vn=Z((ug,xa)=>{"use strict";var Dd=Qe(),Id=nn(),Pd=ga();function Wn(e,t){let n=new Id(e,t),i=new Pd(n);try{i.parse()}catch(r){throw r}return i.root}xa.exports=Wn;Wn.default=Wn;Dd.registerParse(Wn)});var lr=Z((cg,ba)=>{"use strict";var sn=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};ba.exports=sn;sn.default=sn});var zn=Z((dg,ya)=>{"use strict";var Od=lr(),an=class{get content(){return this.css}constructor(t,n,i){this.processor=t,this.messages=[],this.root=n,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let i=new Od(t,n);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>t.type==="warning")}};ya.exports=an;an.default=an});var ur=Z((fg,Ea)=>{"use strict";var Sa={};Ea.exports=function(t){Sa[t]||(Sa[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var fr=Z((pg,_a)=>{"use strict";var Bd=Qe(),Hd=kn(),Gd=sr(),Ud=Vn(),Aa=zn(),Wd=Et(),Vd=qt(),{isClean:He,my:zd}=Rn(),mg=ur(),jd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},$d={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},qd={Once:!0,postcssPlugin:!0,prepare:!0},wt=0;function ln(e){return typeof e=="object"&&typeof e.then=="function"}function Ca(e){let t=!1,n=jd[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,wt,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,wt,n+"Exit"]:[n,n+"Exit"]}function wa(e){let t;return e.type==="document"?t=["Document",wt,"DocumentExit"]:e.type==="root"?t=["Root",wt,"RootExit"]:t=Ca(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function cr(e){return e[He]=!1,e.nodes&&e.nodes.forEach(t=>cr(t)),e}var dr={},et=class e{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(t,n,i){this.stringified=!1,this.processed=!1;let r;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))r=cr(n);else if(n instanceof e||n instanceof Aa)r=cr(n.root),n.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=n.map);else{let o=Ud;i.syntax&&(o=i.syntax.parse),i.parser&&(o=i.parser),o.parse&&(o=o.parse);try{r=o(n,i)}catch(a){this.processed=!0,this.error=a}r&&!r[zd]&&Bd.rebuild(r)}this.result=new Aa(t,r,i),this.helpers={...dr,postcss:dr,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let i=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=i.postcssPlugin,t.setMessage()):i.postcssVersion}catch(r){console&&console.error&&console.error(r)}return t}prepareVisitors(){this.listeners={};let t=(n,i,r)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([n,r])};for(let n of this.plugins)if(typeof n=="object")for(let i in n){if(!$d[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qd[i])if(typeof n[i]=="object")for(let r in n[i])r==="*"?t(n,i,n[i][r]):t(n,i+"-"+r.toLowerCase(),n[i][r]);else typeof n[i]=="function"&&t(n,i,n[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],i=this.runOnRoot(n);if(ln(i))try{await i}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[He];){t[He]=!0;let n=[wa(t)];for(;n.length>0;){let i=this.visitTick(n);if(ln(i))try{await i}catch(r){let o=n[n.length-1].node;throw this.handleError(r,o)}}}if(this.listeners.OnceExit)for(let[n,i]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let r=t.nodes.map(o=>i(o,this.helpers));await Promise.all(r)}else await i(t,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(i=>t.Once(i,this.helpers));return ln(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=Vd;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let i=this.result.root.source;if(t.map===void 0&&!(i&&i.input&&i.input.map)){let a="";return n(this.result.root,c=>{a+=c}),this.result.css=a,this.result}let o=new Gd(n,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(ln(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[He];)t[He]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[i,r]of t){this.result.lastPlugin=i;let o;try{o=r(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(ln(o))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:i,visitors:r}=n;if(i.type!=="root"&&i.type!=="document"&&!i.parent){t.pop();return}if(r.length>0&&n.visitorIndex<r.length){let[a,c]=r[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===r.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return c(i.toProxy(),this.helpers)}catch(s){throw this.handleError(s,i)}}if(n.iterator!==0){let a=n.iterator,c;for(;c=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!c[He]){c[He]=!0,t.push(wa(c));return}n.iterator=0,delete i.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===wt){i.nodes&&i.nodes.length&&(i[He]=!0,n.iterator=i.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[He]=!0;let n=Ca(t);for(let i of n)if(i===wt)t.nodes&&t.each(r=>{r[He]||this.walkSync(r)});else{let r=this.listeners[i];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}};et.registerPostcss=e=>{dr=e};_a.exports=et;et.default=et;Wd.registerLazyResult(et);Hd.registerLazyResult(et)});var Ta=Z((gg,Fa)=>{"use strict";var Kd=sr(),Jd=Vn(),Yd=zn(),Xd=qt(),hg=ur(),un=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=Jd;try{t=n(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,i){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=i,this._map=void 0;let r=Xd;this.result=new Yd(this._processor,void 0,this._opts),this.result.css=n;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Kd(r,void 0,this._opts,n);if(a.isMap()){let[c,s]=a.generate();c&&(this.result.css=c),s&&(this.result.map=s)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}};Fa.exports=un;un.default=un});var Ma=Z((xg,va)=>{"use strict";var Qd=kn(),Zd=fr(),ef=Ta(),tf=Et(),dt=class{constructor(t=[]){this.version="8.5.14",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let i of t)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)n.push(i);else if(typeof i=="function")n.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new ef(this,t,n):new Zd(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};va.exports=dt;dt.default=dt;tf.registerProcessor(dt);Qd.registerProcessor(dt)});var Oa=Z((bg,Pa)=>{"use strict";var Na=Ln(),Ra=Qt(),nf=Qe(),rf=Nn(),La=en(),ka=kn(),of=ia(),sf=nn(),af=fr(),lf=rr(),uf=Yt(),cf=Vn(),mr=Ma(),df=zn(),Da=Et(),Ia=On(),ff=qt(),mf=lr();function se(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new mr(e)}se.plugin=function(t,n){let i=!1;function r(...a){console&&console.warn&&!i&&(i=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \\u91CC\\u9762 postcss.plugin \\u88AB\\u5F03\\u7528. \\u8FC1\\u79FB\\u6307\\u5357:\nhttps://www.w3ctech.com/topic/2226`));let c=n(...a);return c.postcssPlugin=t,c.postcssVersion=new mr().version,c}let o;return Object.defineProperty(r,"postcss",{get(){return o||(o=r()),o}}),r.process=function(a,c,s){return se([r(s)]).process(a,c)},r};se.stringify=ff;se.parse=cf;se.fromJSON=of;se.list=lf;se.comment=e=>new Ra(e);se.atRule=e=>new Na(e);se.decl=e=>new La(e);se.rule=e=>new Ia(e);se.root=e=>new Da(e);se.document=e=>new ka(e);se.CssSyntaxError=rf;se.Declaration=La;se.Container=nf;se.Processor=mr;se.Document=ka;se.Comment=Ra;se.Warning=mf;se.AtRule=Na;se.Result=df;se.Input=sf;se.Rule=Ia;se.Root=Da;se.Node=uf;af.registerPostcss(se);Pa.exports=se;se.default=se});function yn(){return globalThis}function T(e,t){if(typeof window>"u")return;let n=yn(),i=n.__hf?.onSwallowed;if(i)try{i({label:e,error:t})}catch(r){}(n.__hfDebug||n.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${e} swallowed:`,t)}var Tu=["seconds-time","rational-fps","seek-keep-playing","composition-manifest-v1"];function vu(e,t){let n=Math.abs(e),i=Math.abs(t);for(;i!==0;){let r=n%i;n=i,i=r}return n||1}function Mu(e){let t=Number.isFinite(e)&&e>0?e:30,n=Number.isInteger(t)?1:1e6,i=Math.round(t*n),r=vu(i,n);return{numerator:i/r,denominator:n/r}}function gi(e){if(typeof e!="object"||e===null)return null;let t=e;return!Number.isFinite(t.numerator)||!Number.isFinite(t.denominator)||(t.numerator??0)<=0||(t.denominator??0)<=0?null:Number(t.numerator)/Number(t.denominator)}function Sn(e){return{protocolVersion:1,capabilities:Tu,fps:Mu(e)}}function Nu(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function lo(e,t=30){if(typeof e!="object"||e===null)return{status:"legacy",fps:t};let n=e;if(n.protocolVersion===void 0)return{status:"legacy",fps:t};if(n.protocolVersion!==1)return{status:"unsupported",code:"unsupported_protocol_version",receivedVersion:n.protocolVersion};let i=gi(n.fps);return i===null||!Nu(n.capabilities)?{status:"unsupported",code:"invalid_protocol_metadata",receivedVersion:n.protocolVersion}:{status:"supported",fps:i,metadata:n}}var uo=30;function co(e){uo=Number.isFinite(e)&&e>0?e:30}function he(e){try{window.parent.postMessage({...e,...Sn(uo)},"*")}catch(t){T("bridge.postMessage",t)}}var Ru={play:(e,t)=>t.onPlay(),pause:(e,t)=>t.onPause(),"stop-media":(e,t)=>t.onStopMedia(),seek:(e,t)=>t.onSeek(Lu(e,t),e.seekMode??"commit"),tick:(e,t)=>t.onTick(),"set-muted":(e,t)=>t.onSetMuted(!!e.muted),"set-volume":(e,t)=>t.onSetVolume(Math.max(0,Math.min(1,Number(e.volume??1)))),"set-media-output-muted":(e,t)=>t.onSetMediaOutputMuted(!!e.muted),"set-native-media-sync-disabled":(e,t)=>t.onSetNativeMediaSyncDisabled(!!e.disabled),"set-web-audio-media-disabled":(e,t)=>t.onSetWebAudioMediaDisabled(!!e.disabled),"set-playback-rate":(e,t)=>t.onSetPlaybackRate(Number(e.playbackRate??1)),"set-root-duration":(e,t)=>t.onSetRootDuration(Number(e.durationSeconds??0)),"set-color-grading":(e,t)=>t.onSetColorGrading(e.target??null,e.grading??null),"set-color-grading-compare":(e,t)=>t.onSetColorGradingCompare(e.target??null,e.compare??null),"enable-pick-mode":(e,t)=>t.onEnablePickMode(),"disable-pick-mode":(e,t)=>t.onDisablePickMode(),"flash-elements":e=>Du(e)};function Lu(e,t){let n=Number(e.timeSeconds);if(Number.isFinite(n))return Math.max(0,n);let r=gi(e.fps)??t.getCanonicalFps();return Math.max(0,Number(e.frame??0))/r}function ku(e){let t=lo(e);return t.status!=="unsupported"?!1:(he({source:"hf-preview",type:"diagnostic",code:`runtime.protocol.${t.code}`,details:{receivedVersion:typeof t.receivedVersion=="string"||typeof t.receivedVersion=="number"?t.receivedVersion:null}}),!0)}function Du(e){let t=e.selectors,n=e.duration||800;t&&Iu(t,n)}function fo(e){let t=n=>{let i=n.data;if(!i||i.source!=="hf-parent"||i.type!=="control"||ku(i))return;let r=i.action;if(typeof r!="string")return;let o=Ru[r];o&&o(i,e)};return window.addEventListener("message",t),he({source:"hf-preview",type:"ready"}),t}function Iu(e,t){if(!document.getElementById("__hf-flash-styles")){let n=document.createElement("style");n.id="__hf-flash-styles",n.textContent=`\n .__hf-flash {\n outline: 2px solid rgba(59, 130, 246, 0.6) !important;\n outline-offset: 2px !important;\n animation: __hf-flash-pulse ${t}ms ease-out forwards !important;\n }\n @keyframes __hf-flash-pulse {\n 0% { outline-color: rgba(59, 130, 246, 0.8); }\n 100% { outline-color: transparent; }\n }\n `,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(r=>{r.classList.add("__hf-flash"),setTimeout(()=>r.classList.remove("__hf-flash"),t)})}catch(i){T("bridge.flashElements.querySelector",i)}}var xi=null;function mo(e){xi=e}function Je(e,t){if(xi)try{xi({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch(n){T("runtime.analytics.site1",n)}}function Pu(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-"),n=0,i=t.length;for(;n<i&&t[n]==="-";)n++;for(;i>n&&t[i-1]==="-";)i--;let r=t.slice(n,i);return r.length>0?r:"node"}function pt(e){return`--${Pu(e)}`}function po(e){let t=new Map;for(let n of e){let i=pt(n),r=t.get(i);r?r.includes(n)||r.push(n):t.set(i,[n])}return[...t.values()].filter(n=>n.length>1)}function ho(){if(typeof document>"u")return{};let e=new Set;document.documentElement?.hasAttribute("data-composition-variables")&&e.add(document.documentElement);for(let i of Array.from(document.querySelectorAll("[data-composition-variables]")))e.add(i);let t={};for(let i of e)Object.assign(t,It(i));let n=An();return{...t,...n}}function It(e){if(!e)return{};let t=e.getAttribute("data-composition-variables");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}if(!Array.isArray(n))return{};let i={};for(let r of n){if(!r||typeof r!="object")continue;let o=r;typeof o.id!="string"||!("default"in o)||(i[o.id]=o.default)}return i}var bi="data-hf-css-vars";function En(e){return"style"in e&&typeof e.style?.setProperty=="function"}function yi(e,t){if(!En(e))return;let n=[];for(let[i,r]of Object.entries(t))if(typeof r=="string"&&r!==""||typeof r=="number"){let o=pt(i);e.style.setProperty(o,String(r)),n.push(o)}n.length>0&&e.setAttribute(bi,n.join(" "))}function go(e,t,n){let i={};for(let[r,o]of Object.entries(t)){let a=pt(r);((En(e)?e.style.getPropertyValue(a):"")||(n?n.getComputedStyle(e).getPropertyValue(a):"")).trim()===""&&(i[r]=o)}return i}function xo(e){if(!En(e))return;let t=e.getAttribute(bi);if(t){for(let n of t.split(" "))n.startsWith("--")&&e.style.removeProperty(n);e.removeAttribute(bi)}}function bo(e){let t=new Set;e.documentElement?.hasAttribute("data-composition-variables")&&t.add(e.documentElement);for(let r of Array.from(e.querySelectorAll("[data-composition-variables]")))t.add(r);let n=An(),i=[];for(let r of t)i.push(...Ou(r,n,e.defaultView));for(let r of po(i))console.warn(`composition variables ${r.join(", ")} collapse to the same CSS property ${pt(r[0]??"")} \\u2014 rename one to avoid cross-talk`)}function Ou(e,t,n){if(!En(e))return[];let i=It(e),r={};for(let[o,a]of Object.entries(i)){if(o in t)continue;let c=pt(o);(e.style.getPropertyValue(c)||(n?n.getComputedStyle(e).getPropertyValue(c):"")).trim()===""&&(r[o]=a)}for(let[o,a]of Object.entries(t))o in i&&(r[o]=a);return yi(e,r),Object.keys(i)}function yo(e){let t=e.getAttribute("data-variable-values");if(!t)return{};let n;try{n=JSON.parse(t)}catch{return{}}return!n||typeof n!="object"||Array.isArray(n)?{}:n}function An(){if(typeof window>"u")return{};let e=window.__hfVariables;return!e||typeof e!="object"||Array.isArray(e)?{}:e}function So(e){let t=[],n=l=>{if(typeof l.getAnimations!="function")return[];try{return l.getAnimations()}catch{return[]}},i=l=>e?.resolveStartSeconds?e.resolveStartSeconds(l):Number.parseFloat(l.getAttribute("data-start")??"0")||0,r=(l,f)=>{let p=null;try{p=l.effect?.getComputedTiming?.()??null}catch(x){T("runtime.adapters.css.site5",x)}if(!p)return{};let d=Number(p.endTime);return Number.isFinite(d)?{endSeconds:f+d/1e3}:{unbounded:!0}},o=(l,f)=>{for(let p of l){try{p.currentTime=f}catch(d){T("runtime.adapters.css.site1",d)}try{p.pause()}catch(d){T("runtime.adapters.css.site2",d)}}},a=l=>{for(let f of l)try{f.play()}catch(p){T("runtime.adapters.css.site3",p)}},c=l=>{for(let f of l)try{f.pause()}catch(p){T("runtime.adapters.css.site4",p)}},s=l=>{l.baseDelay?l.el.style.animationDelay=l.baseDelay:l.el.style.removeProperty("animation-delay"),l.basePlayState?l.el.style.animationPlayState=l.basePlayState:l.el.style.removeProperty("animation-play-state")};return{name:"css",discover:()=>{t=[];let l=document.querySelectorAll("*");for(let f of l){if(!(f instanceof HTMLElement))continue;let p=window.getComputedStyle(f);!p.animationName||p.animationName==="none"||t.push({el:f,baseDelay:f.style.animationDelay||"",basePlayState:f.style.animationPlayState||"",animations:n(f)})}},getInferredDurationSeconds:()=>{let l=0;for(let f of t){if(!f.el.isConnected)continue;let p=i(f.el);for(let d of n(f.el)){let x=r(d,p);x.endSeconds!=null&&(l=Math.max(l,x.endSeconds))}}return l>0?l:null},seek:l=>{let f=Number(l.time)||0;for(let p of t){if(!p.el.isConnected)continue;let d=i(p.el),x=Math.max(0,f-d)*1e3,S=p.animations;if(S.length>0){o(S,x);continue}p.el.style.animationPlayState="paused",p.el.style.animationDelay=`-${(x/1e3).toFixed(3)}s`}},pause:()=>{for(let l of t){if(!l.el.isConnected)continue;let f=l.animations;f.length>0&&c(f),s(l)}},play:()=>{for(let l of t)l.el.isConnected&&(s(l),a(l.animations))},revert:()=>{t=[]}}}function Eo(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let i=Math.max(0,Number(t.time)||0),r=t.suppressEvents===!0;typeof n.totalTime=="function"?(n.totalTime(i+.001,!0),n.totalTime(i,r)):n.seek(i,r)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function Ao(){return{name:"animejs",discover:()=>{try{let e=window.anime;if(!e||typeof e.running>"u")return;let t=e.running;if(!Array.isArray(t)||t.length===0)return;let n=window.__hfAnime??[],i=new Set(n);for(let r of t)i.has(r)||n.push(r);window.__hfAnime=n}catch(e){T("runtime.adapters.animejs.site1",e)}},seek:e=>{let t=Math.max(0,(Number(e.time)||0)*1e3),n=window.__hfAnime;if(!(!n||n.length===0))for(let i of n)try{typeof i.seek=="function"&&i.seek(t)}catch(r){T("runtime.adapters.animejs.site2",r)}},pause:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.pause=="function"&&t.pause()}catch(n){T("runtime.adapters.animejs.site3",n)}},play:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.play=="function"&&t.play()}catch(n){T("runtime.adapters.animejs.site4",n)}},revert:()=>{}}}function Co(){return{name:"lottie",discover:()=>{try{let e=window.lottie;if(e&&typeof e.getRegisteredAnimations=="function"){let t=e.getRegisteredAnimations();if(Array.isArray(t)&&t.length>0){let n=window.__hfLottie??[],i=new Set(n);for(let r of t)i.has(r)||n.push(r);window.__hfLottie=n}}}catch(e){T("runtime.adapters.lottie.site1",e)}},seek:e=>{let t=Math.max(0,Number(e.time)||0),n=window.__hfLottie;if(!(!n||n.length===0))for(let i of n)try{if(Si(i))i.goToAndStop(t*1e3,!1);else if(Ei(i)){if(typeof i.setCurrentRawFrameValue=="function"){let r=i.totalFrames??0,o=i.frameRate??30,a=t*o;r>0&&i.setCurrentRawFrameValue(Math.min(a,r-1))}else if(typeof i.seek=="function"){let r=i.duration??1,o=Math.min(100,t/r*100);i.seek(o)}}}catch(r){T("runtime.adapters.lottie.site2",r)}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(Si(t)||Ei(t))&&t.pause()}catch(n){T("runtime.adapters.lottie.site3",n)}},revert:()=>{},getInferredDurationSeconds:()=>{let e=window.__hfLottie;if(!e||e.length===0)return null;let t=0,n=!1;for(let i of e){let r=null;try{r=Bu(i)}catch(o){T("runtime.adapters.lottie.site4",o)}r!=null&&(n=!0,t=Math.max(t,r))}return n?t:null}}}function wo(e,t){return!Number.isFinite(e)||!e||e<=0||!Number.isFinite(t)||!t||t<=0?null:e/t}function Bu(e){return Si(e)?wo(e.totalFrames,e.frameRate):Ei(e)?Number.isFinite(e.duration)&&(e.duration??0)>0?e.duration??null:wo(e.totalFrames,e.frameRate):null}function Si(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function Ei(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}var Ai=-1;function wn(e){if(e!==Ai){Ai=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch(t){T("runtime.adapters.seek-dispatch.site1",t)}}}function _o(e){Ai=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch(t){T("runtime.adapters.seek-dispatch.force",t)}}function Fo(){let e=null,t=0,n=null,i=null,r=null,o=null,a=()=>{if(typeof window>"u")return null;let f=window.THREE?.DefaultLoadingManager;return!f||typeof f!="object"||typeof f.itemsLoaded!="number"||typeof f.itemsTotal!="number"?null:f},c=l=>{o||l.itemsTotal<=l.itemsLoaded||(o=new Promise(f=>{l.onLoad=function(){try{r?.call(this)}finally{o=null,l.onLoad=r??null,f()}}}))},s=l=>{n!==l&&(n=l,i=l.onStart??null,r=l.onLoad??null,l.onStart=function(f,p,d){try{i?.call(this,f,p,d)}finally{c(l)}})};return{name:"three",discover:()=>{let l=a();l&&(s(l),c(l))},seek:l=>{e=Math.max(0,Number(l.time)||0),t=e,window.__hfThreeTime=e,wn(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0},getReadyPromise:()=>{let l=a();return!l||l.itemsTotal<=l.itemsLoaded?null:(o||c(l),o)}}}function Oe(e){let t=null,n=new WeakSet;return{name:e.name,discover:()=>{},seek:()=>{},pause:()=>{},play:()=>{},revert:()=>{},getReadyPromise:()=>{let i=e.getInstances();if(i.length===0)return null;let r=i.filter(o=>!n.has(o));return r.length===0?null:t||(t=Promise.allSettled(r.map(o=>e.waitFor(o).then(()=>{n.add(o)}))).then(()=>{t=null}),t)}}}function To(){return Oe({name:"mapbox",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMapbox;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function vo(){return Oe({name:"leaflet",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfLeaflet;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>e.whenReady(t))})}function Mo(){return Oe({name:"google-maps",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfGoogleMaps;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{let n=e.addListener("tilesloaded",()=>{n.remove(),t()})})})}function No(){return Oe({name:"maplibre",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfMaplibre;return Array.isArray(e)?e:[]},waitFor:e=>new Promise(t=>{if(e.loaded()){t();return}e.on("load",t)})})}function Ro(){return Oe({name:"d3",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfD3;return Array.isArray(e)?e:[]},waitFor:e=>e.end()})}function Lo(){let e=null,t=0;return{name:"typegpu",discover:()=>{},seek:n=>{e=Math.max(0,Number(n.time)||0),t=e,window.__hfTypegpuTime=e,wn(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0}}}function ko(e){let t=e.nextElementSibling;if(t instanceof HTMLImageElement&&t.classList.contains("__render_frame__")&&t.complete&&t.naturalWidth>0)return t;if(e.id){let n=document.getElementById(`__render_frame_${e.id}__`);if(n instanceof HTMLImageElement&&n.complete&&n.naturalWidth>0)return n}return null}function Do(){let e=globalThis.GPUQueue;if(!e?.prototype?.copyExternalImageToTexture)return;let t=e.prototype.copyExternalImageToTexture;e.prototype.copyExternalImageToTexture=function(n,i,r){if(n?.source instanceof HTMLVideoElement){let o=ko(n.source);if(o)return t.call(this,{...n,source:o},i,r)}return t.call(this,n,i,r)}}function Io(){let e=[globalThis.WebGL2RenderingContext,globalThis.WebGLRenderingContext],t=["texImage2D","texSubImage2D"];for(let n of e){let i=n?.prototype;if(i)for(let r of t){let o=i[r];if(typeof o!="function"||o.__hfVideoPatched)continue;let a=function(...c){let s=c.length-1,l=c[s];if(l instanceof HTMLVideoElement){let f=ko(l);f&&(c[s]=f)}return o.apply(this,c)};a.__hfVideoPatched=!0,i[r]=a}}}function Po(){let e=!1,t=0,n=!1,i,r,o,a=new Set,c=new WeakMap,s=()=>{if(!document.getAnimations)return[];try{return document.getAnimations()}catch{return[]}},l=b=>{let A=Number(b.currentTime);return Number.isFinite(A)&&A>0?A:0},f=(b,A)=>A<=0?b:b>=A?Math.max(0,b-A):b,p=(b,A)=>{let _=c.get(b);if(_)return _;let M={compositionTimeMs:A,animationTimeMs:e?f(l(b),A):l(b)};return c.set(b,M),M},d=(b,A)=>{if(!a.has(b)){a.add(b);let _=()=>{a.delete(b)};try{b.addEventListener("finish",_,{once:!0}),b.addEventListener("cancel",_,{once:!0})}catch(M){T("runtime.adapters.waapi.site4",M)}}p(b,A)},x=(b,A)=>{for(let _ of b)d(_,A)},S=()=>{if(n||typeof Element>"u")return;let b=Element.prototype;if(typeof b.animate!="function"||b.__hfOriginalAnimate)return;let A=b.animate;try{Object.defineProperty(b,"__hfOriginalAnimate",{value:A,configurable:!0});let _=function(...M){let G=A.apply(this,M);return d(G,t),G};b.animate=_,i=b,r=A,o=_,n=!0}catch{}},y=b=>{let A=null;try{A=b.effect?.getComputedTiming?.()??null}catch(G){T("runtime.adapters.waapi.site4",G)}if(!A)return{};let _=Number(A.endTime);return Number.isFinite(_)?{endSeconds:(c.get(b)?.compositionTimeMs??0)/1e3+_/1e3}:{unbounded:!0}};return{name:"waapi",discover:()=>{e=!0,S(),x(s(),t)},seek:b=>{let A=Math.max(0,(Number(b.time)||0)*1e3);t=A,(!e||a.size>0)&&x(s(),e?A:0);for(let _ of a){let M=e?p(_,A):p(_,0),G=M.animationTimeMs+Math.max(0,A-M.compositionTimeMs);try{_.currentTime=G}catch(D){T("runtime.adapters.waapi.site1",D)}try{_.pause()}catch(D){T("runtime.adapters.waapi.site2",D)}}},pause:()=>{e||x(s(),t);for(let b of a)try{b.pause()}catch(A){T("runtime.adapters.waapi.site3",A)}},revert:()=>{if(a.clear(),c=new WeakMap,e=!1,t=0,i&&r&&o&&i.animate===o)try{i.animate=r,i.__hfOriginalAnimate===r&&delete i.__hfOriginalAnimate}catch(b){T("runtime.adapters.waapi.site5",b)}i=void 0,r=void 0,o=void 0,n=!1},getInferredDurationSeconds:()=>{let b=0;for(let A of s()){let _=y(A);_.endSeconds!=null&&(b=Math.max(b,_.endSeconds))}return b>0?b:null}}}function Oo(e,t){if(e.length===0)return 1;let n=0;for(;n<e.length-2&&t>=e[n+1].time;)n+=1;let i=e[n],r=e[n+1]??i,o=r.time-i.time,a=o<=0?0:Math.min(1,Math.max(0,(t-i.time)/o));return i.volume+(r.volume-i.volume)*a}function Hu(e,t,n,i){let r=Number.parseFloat(e.dataset.start??"0")||0,o=Number.parseFloat(e.dataset.end??""),a=Number.parseFloat(e.dataset.duration??""),c=Number.isFinite(o)&&o>r?o:Number.isFinite(a)&&a>0?r+a:n,s=Number.parseFloat(e.dataset.volume??""),l=Number.isFinite(s)?Math.max(0,Math.min(1,s)):1;e.volume=l;let f=1/Math.min(60,Math.max(1,i)),p=Math.max(0,r),d=Math.min(n,c),x=[];for(let y=p;y<=d+1e-6;y+=f){let b=Math.min(d,y);t(b);let A=Number(e.volume);if(!Number.isFinite(A))continue;let _=Math.max(0,Math.min(1,A)),M=x.at(-1);if((!M||Math.abs(M.volume-_)>1e-4||b===d)&&x.push({time:Number(b.toFixed(6)),volume:Number(_.toFixed(6))}),b===d)break}return x.some(y=>Math.abs(y.volume-l)>1e-4)?x:null}function Bo(e,t,n,i){if(!t||!(e instanceof HTMLAudioElement)&&!(e instanceof HTMLVideoElement)||n<=0)return;let r=c=>{try{typeof t.totalTime=="function"?t.totalTime(c,!0):typeof t.seek=="function"&&t.seek(c,!0)}catch{}},o=typeof t.totalTime=="function"?Number(t.totalTime()):typeof t.seek=="function"?Number(t.seek()):0,a=Hu(e,r,n,60);Number.isFinite(o)&&r(o),a&&i.set(e,a)}function Ho(e){return Number.isFinite(e)&&e>0?Math.max(.1,Math.min(5,e)):1}function Be(e){let t=Number.parseFloat(e.getAttribute("data-playback-rate")??""),n=Number.isFinite(t)&&t>0?t:e instanceof HTMLMediaElement?e.defaultPlaybackRate:1;return Ho(n)}function gt(e){let t=Number.parseFloat(e.getAttribute("data-playback-start")??e.getAttribute("data-media-start")??"");return Number.isFinite(t)&&t>=0?t:0}function Go(e){let t=e.isVideo?e.explicitDuration??e.sourceDuration:e.sourceDuration,n=(e.isVideo?[t,e.hostRemaining]:[t,e.hostRemaining,e.explicitDuration]).filter(i=>i!=null&&Number.isFinite(i)&&i>0);return n.length>0?Math.min(...n):null}function Uo(e){let t=Array.from(document.querySelectorAll("video, audio")),n=e?.shouldIncludeElement?t.filter(a=>e.shouldIncludeElement?.(a)):t.filter(a=>a.hasAttribute("data-start")),i=[],r=[],o=0;for(let a of n){let c=e?.resolveStartSeconds?e.resolveStartSeconds(a):Number.parseFloat(a.dataset.start??"0");if(!Number.isFinite(c))continue;let s=Number.parseFloat(a.dataset.playbackStart??a.dataset.mediaStart??"0")||0,l=Be(a),f=a.loop,p=Number.isFinite(a.duration)&&a.duration>0?a.duration:null,d=e?.resolveDurationSeconds?.(a)??Number.parseFloat(a.dataset.duration??"");(!Number.isFinite(d)||d<=0)&&p!=null&&(d=Math.max(0,(p-s)/l));let x=Number.isFinite(d)&&d>0?c+d:Number.POSITIVE_INFINITY,S=Number.parseFloat(a.dataset.volume??""),y={el:a,start:c,mediaStart:s,duration:Number.isFinite(d)&&d>0?d:Number.POSITIVE_INFINITY,end:x,volume:Number.isFinite(S)?S:null,playbackRate:l,loop:f,sourceDuration:p};i.push(y),a.tagName==="VIDEO"&&r.push(y),Number.isFinite(x)&&(o=Math.max(o,x))}return{timedMediaEls:n,mediaClips:i,videoClips:r,maxMediaEnd:o}}var wi=new WeakMap,Ot=new WeakMap,Ci=new WeakSet,ht=new WeakSet;function Gu(e){if(ht.has(e))return;ht.add(e);let t=()=>ht.delete(e);e.addEventListener("playing",t,{once:!0}),e.addEventListener("pause",t,{once:!0}),e.addEventListener("error",t,{once:!0})}var Uu=3;function Wu(e){return e.error!=null||e.networkState===Uu}var _i=new WeakMap;function Pt(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):1}function Fi(e){wi.delete(e),Ot.delete(e),Ci.delete(e),_i.delete(e)}function Wo(e){let t=!!(e.outputMuted||e.userMuted);for(let n of e.clips){let{el:i}=n;if(!i.isConnected)continue;let r=(e.timeSeconds-n.start)*n.playbackRate+n.mediaStart,o=i.tagName==="VIDEO"&&!n.loop,a=o&&n.sourceDuration!=null&&r>=n.sourceDuration&&e.timeSeconds>=n.start&&e.timeSeconds<n.end;a&&n.sourceDuration!=null&&(r=n.sourceDuration);let c=o&&n.sourceDuration!=null&&r>=n.mediaStart&&r<n.sourceDuration;if(e.timeSeconds>=n.start&&e.timeSeconds<n.end&&r>=0&&(!i.ended||n.loop||a||c)){if(n.loop&&n.sourceDuration!=null&&n.sourceDuration>0){let P=n.sourceDuration-n.mediaStart;P>0&&r>=n.sourceDuration&&(r=n.mediaStart+(r-n.mediaStart)%P)}let l=Pt(e.userVolume??1),f=Pt(n.volume??1),p=_i.get(i),d=Pt(i.volume),x;n.volumeKeyframes&&n.volumeKeyframes.length>0?x=Pt(Oo(n.volumeKeyframes,r)):p===void 0||Math.abs(d-p)>1e-4?x=d:x=f;let S=Pt(x*l);i.volume=S,_i.set(i,S),e.onElementVolume?.(i,S),(t||e.isWebAudioOwned?.(i))&&(i.muted=!0),i.preload!=="auto"&&(i.preload="auto");try{i.playbackRate=n.playbackRate*e.playbackRate}catch(P){T("runtime.media.site1",P)}let y=.04,b=2,A=i.currentTime||0,_=Math.abs(A-r),M=r-A,G=wi.get(i);wi.set(i,M);let D=G===void 0,v=!D&&Math.abs(M-G)>.5,w=_>3,C=a&&_>.001||i.ended&&c&&_>.001||_>.5&&(D||v||w),F=i.tagName==="VIDEO"&&!i.paused,R=G!==void 0&&Math.abs(M-G)<.004,L=!1;if(!F&&!C&&!D&&R&&_>y){let P=(Ot.get(i)??0)+1;Ot.set(i,P),P>=b&&(L=!0,Ot.set(i,0))}else _<=y&&Ot.set(i,0);let z=!F&&e.forceSync&&_>.02;if(C||L||z){if(!(i.tagName==="VIDEO"&&i.id&&!!document.getElementById(`__render_frame_${i.id}__`))){try{i.currentTime=r}catch(X){T("runtime.media.site2",X)}if(Math.abs(i.currentTime-r)>.5&&!Ci.has(i)){Ci.add(i),i.load();try{i.currentTime=r}catch(X){T("runtime.media.site3",X)}}}ht.delete(i)}a?i.paused||i.pause():e.playing&&i.paused&&!ht.has(i)&&!Wu(i)?(Gu(i),i.play().catch(P=>{ht.delete(i),(P&&typeof P=="object"&&"name"in P?String(P.name??""):"")==="NotAllowedError"&&e.onAutoplayBlocked?.()})):!e.playing&&!i.paused&&i.pause();continue}Fi(i),i.paused||i.pause()}}var Vu="hf-proxy",Vo="runtime_media_proxy_fallback",zo="runtime_media_proxy_unavailable",Bt=new WeakSet,jo=new WeakSet;function Cn(e){return e.currentSrc||e.src}function Ti(e){return window.__HF_EXPORT_RENDER_SEEK_CONFIG?!0:e instanceof HTMLVideoElement&&!!e.id&&!!document.getElementById(`__render_frame_${e.id}__`)}function vi(e){let t=Cn(e);if(!t)return null;let n;try{n=new URL(t,document.baseURI)}catch{return null}if(n.origin!==window.location.origin)return null;try{return decodeURIComponent(n.pathname)}catch{return n.pathname}}function zu(e,t){let n=null;for(let i of Object.keys(t))e.endsWith(i)&&(n===null||i.length>n.length)&&(n=i);return n?t[n]??null:null}function ju(e,t){let n=e.normalize("NFC").toLowerCase(),i=-1,r=null,o=!1;for(let[a,c]of Object.entries(t)){let s=a.normalize("NFC").toLowerCase();n.endsWith(s)&&(s.length>i?(i=s.length,r=c,o=!1):s.length===i&&(o=!0))}return o?null:r}function Mi(e,t){return t[e]??zu(e,t)??ju(e,t)}function $u(e,t){let n=new URL(e,document.baseURI);return n.searchParams.set(Vu,t?t.hasAlpha?"vp8":"h264":"auto"),n.href}var qu={cross_origin:"video reports zero decodable width but its source is cross-origin; no local proxy can be served for it",proxy_playback_failed:"the authoring proxy itself failed to decode; render output is unaffected",browser_safe_codec:"the file errored but its codec is browser-decodable; a proxy cannot help (the file itself is likely corrupt)",invalid_source_url:"the media source URL is malformed and cannot be proxied"};function lt(e,t,n){if(jo.has(e))return;jo.add(e);let i=qu[t];he({source:"hf-preview",type:"diagnostic",code:zo,details:{asset:n,codecName:null,reason:t,note:i}}),console.info(`[hyperframes] ${zo}: "${n}" (${t}): ${i}`)}function Ni(e,t=null,n="reactive"){if(Bt.has(e))return;let i=Cn(e),r;try{r=$u(i,t)}catch(c){T("runtime.mediaProxy.swap",c),lt(e,"invalid_source_url",i);return}Bt.add(e),Fi(e),e.src=r,e.load();let o=t?.codecName??null;he({source:"hf-preview",type:"diagnostic",code:Vo,details:{asset:i,codecName:o,trigger:n,note:"render output is unaffected; only this preview element was swapped to an authoring proxy"}}),console.info(`[hyperframes] ${Vo}: "${i}" uses a codec (${o??"unknown"}) this browser can\'t decode; auto-swapped to an authoring proxy for this preview only. Render output is unaffected.`)}function $o(e){if(Ti(e)||!(e instanceof HTMLVideoElement)||Bt.has(e))return;let t=window.__HF_MEDIA_CODEC_MAP__;if(!t)return;let n=vi(e);if(n===null)return;let i=Mi(n,t);if(!i||!i.browserHostile)return;let r=i.representativeMime?e.canPlayType(i.representativeMime):"";r==="probably"||r==="maybe"||Ni(e,i,"proactive")}function qo(e){if(Ti(e)||!(e instanceof HTMLVideoElement)||e.videoWidth!==0)return;let t=Cn(e);if(Bt.has(e)){lt(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let i=vi(e);if(i===null){lt(e,"cross_origin",t);return}let r=Mi(i,n);if(r&&!r.browserHostile){lt(e,"browser_safe_codec",t);return}Ni(e,r,"reactive")}function Ko(e){if(Ti(e)||!(e instanceof HTMLVideoElement))return;let t=Cn(e);if(Bt.has(e)){lt(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let i=vi(e);if(i===null){lt(e,"cross_origin",t);return}let r=Mi(i,n);if(r&&!r.browserHostile){lt(e,"browser_safe_codec",t);return}Ni(e,r,"tertiary")}var Ve="data-color-grading",Ht="data-hf-color-grading-source-hidden",vn="data-hf-authored-opacity",Jo="__hf_color_grading_",Ku="rec709",_n={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},Fn={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},Tn={blur:0,pixelate:0},Yo=Object.keys(_n),Ju=Object.keys(Fn),Xo=Object.keys(Tn);function be(e,t,n={},i={}){return{id:e,label:t,adjust:{..._n,...n},details:{...Fn,...i},effects:{...Tn}}}var Yu=[be("neutral","Neutral"),be("natural-lift","Natural Lift",{exposure:.04,contrast:.06,highlights:-.06,shadows:.08,saturation:.05}),be("fresh-pop","Fresh Pop",{exposure:.08,contrast:.12,whites:.06,shadows:.04,temperature:-.02,vibrance:.08,saturation:.16}),be("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),be("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),be("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),be("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),be("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),be("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),be("vintage-wash","Vintage Wash",{exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},{vignette:.18}),be("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),be("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),be("warm-clean","Warm Clean",{exposure:.05,contrast:.08,highlights:-.08,shadows:.08,temperature:.16,vibrance:.04,saturation:.06}),be("cool-clean","Cool Clean",{contrast:.06,highlights:-.06,shadows:.06,temperature:-.12,tint:.04,saturation:.04}),be("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),be("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),be("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06})],Xu=new Map(Yu.map(e=>[e.id,e])),Qu=/^\\$(?:\\{([A-Za-z0-9_.:-]+)\\}|([A-Za-z0-9_.:-]+))$/,Zu={exposure:{min:-2,max:2},contrast:{min:-1,max:1},highlights:{min:-1,max:1},shadows:{min:-1,max:1},whites:{min:-1,max:1},blacks:{min:-1,max:1},temperature:{min:-1,max:1},tint:{min:-1,max:1},vibrance:{min:-1,max:1},saturation:{min:-1,max:1}},ec={vignette:{min:0,max:1},vignetteMidpoint:{min:0,max:1},vignetteRoundness:{min:-1,max:1},vignetteFeather:{min:0,max:1},grain:{min:0,max:1},grainSize:{min:0,max:1},grainRoughness:{min:0,max:1}},tc={blur:{min:0,max:1},pixelate:{min:0,max:1}};function ut(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function nc(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):0}function Qo(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function Ri(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?nc(n,t.min,t.max):0}function ic(e){if(e==null)return null;let t=String(e).trim();return t||null}function rc(e){if(e==null)return null;if(typeof e=="string"){let n=e.trim();return n?{src:n,intensity:1}:null}if(!ut(e))return null;let t=e.src;return typeof t!="string"||t.trim()===""?null:{src:t.trim(),intensity:Qo(e.intensity,1)}}function oc(e){if(typeof e=="string"){let t=e.trim();if(!t)return null;if(t.startsWith("{"))try{let n=JSON.parse(t);return ut(n)?n:null}catch{return null}return{preset:t,intensity:1}}return ut(e)?e:null}function sc(e,t){let n=e.trim().match(Qu);if(!n)return e;let i=n[1]??n[2]??"";return i&&Object.hasOwn(t,i)?t[i]:e}function Li(e,t){if(typeof e=="string"){let i=sc(e,t);if(i!==e)return i;let r=e.trim();if(!r.startsWith("{"))return e;try{return Li(JSON.parse(r),t)}catch{return e}}if(!ut(e))return e;let n={};for(let[i,r]of Object.entries(e))n[i]=Li(r,t);return n}function ac(e){return e?Xu.get(e)??null:null}function ki(e){let t=oc(e);if(!t||t.enabled===!1)return null;let n=ic(t.preset),i=ac(n),r=i?.adjust??_n,o=i?.details??Fn,a=i?.effects??Tn,c=ut(t.adjust)?t.adjust:{},s=ut(t.details)?t.details:{},l=ut(t.effects)?t.effects:{},f=Yo.reduce((x,S)=>(x[S]=Ri(c[S]??r[S],Zu[S]),x),{..._n}),p=Ju.reduce((x,S)=>(x[S]=Ri(s[S]??o[S],ec[S]),x),{...Fn}),d=Xo.reduce((x,S)=>(x[S]=Ri(l[S]??a[S],tc[S]),x),{...Tn});return{enabled:!0,preset:n,intensity:Qo(t.intensity,1),adjust:f,details:p,effects:d,lut:rc(t.lut),colorSpace:typeof t.colorSpace=="string"&&t.colorSpace.trim()?t.colorSpace.trim():Ku}}function Zo(e,t){return ki(Li(e,t))}function Gt(e){return!e?.enabled||e.intensity===0?!1:e.lut&&e.lut.intensity!==0?!0:Yo.some(t=>Math.abs(e.adjust[t])>1e-4)||Math.abs(e.details.vignette)>1e-4||Math.abs(e.details.grain)>1e-4||Xo.some(t=>Math.abs(e.effects[t])>1e-4)}var lc=["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-no-inspect]","[data-no-pick]","[data-hyper-shader-loading]"].join(","),uc=["[data-hyperframes-picker-block]","[data-hyper-shader-loading]"].join(",");function es(e){let t=!1,n=null,i=null,r=null,o=null;function a(w,C){try{window.dispatchEvent(new CustomEvent(w,{detail:C}))}catch(F){T("runtime.picker.site1",F)}}function c(w){r=w,a("hyperframe:picker:hovered",{elementInfo:r,isPickMode:t,timestamp:Date.now()})}function s(w){o=w,a("hyperframe:picker:selected",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function l(w){let C=w.ownerDocument.defaultView;if(!C)return!1;let F=w;for(;F&&F!==document.body&&F!==document.documentElement;){let R=C.getComputedStyle(F);if(R.display==="none"||R.visibility==="hidden"||R.pointerEvents==="none")return!0;let L=Number.parseFloat(R.opacity);if(Number.isFinite(L)&&L<=.01&&!F.hasAttribute(Ht))return!0;F=F.parentElement}return!1}function f(w){if(!w||w===document.body||w===document.documentElement)return!1;let C=w.tagName.toLowerCase();return!(C==="script"||C==="style"||C==="link"||C==="meta"||w.classList.contains("__hf-pick-highlight")||w.closest(lc)||l(w))}function p(w){return!!w?.closest(uc)}function d(w){let C=w;if(C.id)return`#${CSS.escape(C.id)}`;let F=w.getAttribute("data-composition-id");if(F)return`[data-composition-id="${CSS.escape(F)}"]`;let R=w.getAttribute("data-composition-src");if(R)return`[data-composition-src="${CSS.escape(R)}"]`;let L=w.getAttribute("data-track-index");if(L)return`[data-track-index="${CSS.escape(L)}"]`;let z=w.tagName.toLowerCase(),P=w.parentElement;if(!P)return z;let X=P.querySelectorAll(`:scope > ${z}`);if(X.length===1)return z;for(let I=0;I<X.length;I+=1)if(X[I]===w)return`${z}:nth-of-type(${I+1})`;return z}function x(w){let C=w.tagName.toLowerCase(),F=(w.textContent??"").trim().replace(/\\s+/g," "),R=(L,z)=>L.length>z?`${L.slice(0,z-1)}\\u2026`:L;return C==="h1"||C==="h2"||C==="h3"?"Heading":C==="p"||C==="span"||C==="div"?F.length>0?R(F,56):"Text":C==="img"?"Image":C==="video"?"Video":C==="audio"?"Audio":C==="svg"?"Shape":w.getAttribute("data-composition-src")?"Composition":C==="section"?"Section":`${C.charAt(0).toUpperCase()}${C.slice(1)}`}function S(w,C,F){let R=typeof F=="number"&&F>0?F:8,L=[];if(document.elementsFromPoint)L=document.elementsFromPoint(w,C);else if(document.elementFromPoint){let X=document.elementFromPoint(w,C);L=X?[X]:[]}if(p(L[0]??null))return[];let z={},P=[];for(let[X,I]of L.entries()){if(!f(I))continue;let ie=`${I.tagName}::${I.id||""}::${X}`;if(!z[ie]&&(z[ie]=!0,P.push(I),P.length>=R))break}return P}function y(w){let C=w.getBoundingClientRect(),F={};for(let L of Array.from(w.attributes))L.name.startsWith("data-")&&(F[L.name]=L.value);return{id:w.id||null,tagName:w.tagName.toLowerCase(),selector:d(w),label:x(w),boundingBox:{x:C.left,y:C.top,width:C.width,height:C.height},textContent:w.textContent?w.textContent.trim().slice(0,200):null,src:w.getAttribute("src")||w.getAttribute("data-composition-src")||null,dataAttributes:F}}function b(w,C,F){return S(w,C,F).map(y)}function A(w){if(!t)return;let F=S(w.clientX,w.clientY,1)[0]??(w.target instanceof Element?w.target:null);if(!f(F)||n===F)return;n&&n.classList.remove("__hf-pick-highlight"),n=F,F.classList.add("__hf-pick-highlight");let R=y(F);c(R),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:R})}function _(w){if(!t)return;w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation();let C=b(w.clientX,w.clientY,8);C.length!==0&&(c(C[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:C,selectedIndex:0,point:{x:w.clientX,y:w.clientY}}))}function M(w){w.key==="Escape"&&(D(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function G(){t||(t=!0,i=document.createElement("style"),i.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`\n`),document.head.appendChild(i),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",A,!0),document.addEventListener("click",_,!0),document.addEventListener("keydown",M,!0),a("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function D(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),i&&(i.remove(),i=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",A,!0),document.removeEventListener("click",_,!0),document.removeEventListener("keydown",M,!0),a("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function v(){window.__HF_PICKER_API={enable:G,disable:D,isActive:()=>t,getHovered:()=>r,getSelected:()=>o,getCandidatesAtPoint:(w,C,F)=>Number.isFinite(w)&&Number.isFinite(C)?b(w,C,F):[],pickAtPoint:(w,C,F)=>{if(!Number.isFinite(w)||!Number.isFinite(C))return null;let R=b(w,C,8);if(!R.length)return null;let L=Math.max(0,Math.min(R.length-1,Number(F??0))),z=R[L]??null;return z?(s(z),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:z}),D(),z):null},pickManyAtPoint:(w,C,F)=>{if(!Number.isFinite(w)||!Number.isFinite(C))return[];let R=b(w,C,8);if(!R.length)return[];let L=[],z=Array.isArray(F)?F:[0];for(let P of z){let X=Math.max(0,Math.min(R.length-1,Math.floor(Number(P)))),I=R[X];if(!I)continue;L.some(Fe=>Fe.selector===I.selector&&Fe.tagName===I.tagName)||L.push(I)}return L.length?(s(L[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:L}),D(),L):[]}},a("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:G,disablePickMode:D,installPickerApi:v}}var cc=["width","height","top","left","right","bottom","inset","object-fit","object-position","z-index","opacity","visibility","filter","mix-blend-mode","backdrop-filter","border-radius","overflow","clip-path","mask","mask-image","mask-size","mask-position","mask-repeat","transform","transform-origin","translate","rotate","scale","box-sizing"];function xt(e,t){let n=Number.isFinite(t)&&t>0?t:30,i=Number.isFinite(e)&&e>0?e:0;return Math.floor(i*n+1e-9)/n}function ts(e,t,n=cc){for(let i of n){let r=t.getPropertyValue(i);r&&e.setProperty(i,r)}}function Ut(e,t,n){let i=e?.[t];return typeof i=="function"?Number(i.call(e))||n:typeof i=="number"&&Number.isFinite(i)?i:(i!=null&&T("runtime.player.nonConformantNum",{prop:t,actual:typeof i}),n)}function Le(e,t){let n=e?.[t];if(typeof n=="function"){n.call(e);return}n!==void 0&&T("runtime.player.nonConformantVoid",{method:t,actual:typeof n})}function Wt(e,t,n){if(e){for(let i of Object.values(e))if(!(!i||i===t))try{n(i)}catch(r){T("runtime.player.site1",r)}}}function ns(e,t,n,i){let r=xt(t,n),o=i?.suppressEvents===!0;return Le(e,"pause"),typeof e.totalTime=="function"?e.totalTime(r,o):typeof e.seek=="function"&&e.seek(r,o),r}function dc(e,t,n,i,r){let o=[];Wt(e,t,a=>{Le(a,"play"),o.push(a)});try{return ns(t,n,i,r)}finally{for(let a of o)try{Le(a,"pause")}catch(c){T("runtime.player.site2",c)}}}function fc(e,t){Wt(e,t,n=>{Le(n,"play")})}function is(e){let t=e.transport;return t?{_timeline:null,play:()=>t.play(),pause:()=>t.pause(),seek:(n,i)=>t.seek(n,i),renderSeek:(n,i)=>t.renderSeek(n,i),getTime:()=>t.getTime(),getDuration:()=>t.getDuration(),isPlaying:()=>t.isPlaying(),setPlaybackRate:n=>t.setPlaybackRate(n),getPlaybackRate:()=>t.getPlaybackRate()}:{_timeline:null,play:()=>{let n=e.getTimeline();if(!n||e.getIsPlaying())return;let i=Math.max(0,Number(e.getSafeDuration?.()??Ut(n,"duration",0))||0);i>0&&Math.max(0,Ut(n,"time",0))>=i&&(Le(n,"pause"),typeof n.seek=="function"&&n.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof n.timeScale=="function"&&n.timeScale(e.getPlaybackRate()),Le(n,"play"),Wt(e.getTimelineRegistry?.(),n,r=>{typeof r.timeScale=="function"&&r.timeScale(e.getPlaybackRate()),Le(r,"play")}),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let n=e.getTimeline();if(!n)return;Le(n,"pause"),Wt(e.getTimelineRegistry?.(),n,r=>{Le(r,"pause")});let i=Math.max(0,Ut(n,"time",0));e.onDeterministicSeek(i),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(i,!1),e.onRenderFrameSeek(i),e.onStatePost(!0)},seek:(n,i)=>{let r=e.getTimeline();if(!r)return;let o=Math.max(0,Number(n)||0),a=e.getIsPlaying(),c=dc(e.getTimelineRegistry?.(),r,o,e.getCanonicalFps());e.onDeterministicSeek(c),i?.keepPlaying&&a?(typeof r.timeScale=="function"&&r.timeScale(e.getPlaybackRate()),Le(r,"play"),Wt(e.getTimelineRegistry?.(),r,s=>{typeof s.timeScale=="function"&&s.timeScale(e.getPlaybackRate()),Le(s,"play")}),e.onDeterministicPlay(),e.onShowNativeVideos(),e.onSyncMedia(c,!0)):(e.setIsPlaying(!1),e.onSyncMedia(c,!1)),e.onRenderFrameSeek(c),e.onStatePost(!0)},renderSeek:(n,i)=>{let r=e.getTimeline(),o=e.getCanonicalFps(),a=r?(fc(e.getTimelineRegistry?.(),r),ns(r,n,o,i)):xt(Math.max(0,Number(n)||0),o);e.onDeterministicSeek(a,i),e.setIsPlaying(!1),e.onSyncMedia(a,!1),e.onRenderFrameSeek(a),e.onStatePost(!0)},getTime:()=>Ut(e.getTimeline(),"time",0),getDuration:()=>Ut(e.getTimeline(),"duration",0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:n=>e.setPlaybackRate(n),getPlaybackRate:()=>e.getPlaybackRate()}}function rs(){return{capturedTimeline:null,isPlaying:!1,currentTime:0,deterministicAdapters:[],canonicalFps:30,bridgeMuted:!1,bridgeVolume:1,mediaOutputMuted:!1,nativeMediaSyncDisabled:!1,webAudioMediaDisabled:!1,mediaAutoplayBlockedPosted:!1,mediaForceSyncNextTick:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,controlBridgeHandler:null,beforeUnloadHandler:null,injectedCompStyles:[],injectedCompScripts:[],injectedCompLinks:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,transportClock:null,transportRafId:null}}var mc=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function Ii(e){return e.id||e.getAttribute("data-hf-id")||null}function Di(e){if(e==null)return null;let t=Number(e);return Number.isFinite(t)?t:null}function pc(e,t){let n=e.getAttribute("data-composition-id");if(!n)return null;let i=Number(t[n]?.duration?.());return Number.isFinite(i)&&i>0?i:null}function hc(e){if(!(e instanceof HTMLMediaElement)||!Number.isFinite(e.duration))return null;let t=Di(e.getAttribute("data-playback-start"))??Di(e.getAttribute("data-media-start"))??0;return e.duration>t?e.duration-t:null}function gc(e,t,n,i){let r=Di(e.getAttribute("data-duration"));return r!=null&&r>0?r:pc(e,t)??hc(e)??Math.max(0,n-i)}function xc(e){for(let[t,n]of e){let i=t.parentElement;for(;i;){let r=e.get(i);if(r){n.parentId=r.id,r.children.push(n);break}i=i.parentElement}}}function os(e){let{startResolver:t,timelineRegistry:n,rootDuration:i}=e,r=new Map,o=document.querySelector("[data-composition-id]"),a=0;for(let c of document.querySelectorAll("[data-start]")){if(c===o||mc.has(c.tagName))continue;let s=t.resolveStartForElement(c,0);if(gc(c,n,i,s)<=0)continue;let l={id:Ii(c)??`__clip-${a++}`,element:c,parentId:null,children:[]};r.set(c,l)}return xc(r),{roots:Array.from(r.values()).filter(c=>c.parentId===null)}}var Pi="css:root",ss=["backdrop-filter","clip-path","filter","mask","mask-border-source","mask-image","perspective","rotate","scale","transform","translate","-webkit-mask-image"],bc=new Set([...ss,"contain","isolation","mask-border","mix-blend-mode","opacity"]),yc=new Set(["absolute","relative"]),Sc=new Set(["flex","inline-flex","grid","inline-grid"]),Ec=new Set(["layout","paint","strict","content"]),Ac=new Set(["size","inline-size"]);function wc(e){return e.position==="fixed"||e.position==="sticky"}function Cc(e,t){if(t.zIndex==="auto"||t.zIndex==="")return!1;if(yc.has(t.position))return!0;let n=e.parentElement?e.ownerDocument.defaultView?.getComputedStyle(e.parentElement).display:null;return n!=null&&Sc.has(n)}function _c(e){let t=Number.parseFloat(e.opacity);if(Number.isFinite(t)&&t<1||e.getPropertyValue("isolation")==="isolate")return!0;let n=e.getPropertyValue("mix-blend-mode");return n&&n!=="normal"?!0:ss.some(i=>{let r=e.getPropertyValue(i);return r!==""&&r!=="none"})}function Fc(e){return e.getPropertyValue("contain").split(/\\s+/).some(n=>Ec.has(n))?!0:Ac.has(e.getPropertyValue("container-type"))}function Tc(e){return e.getPropertyValue("will-change").split(",").map(t=>t.trim()).some(t=>bc.has(t))}function vc(e,t){return wc(t)||Cc(e,t)||_c(t)||Fc(t)?!0:Tc(t)}function Mc(e){let t=[],n=e;for(;n?.parentElement;)t.push(Array.prototype.indexOf.call(n.parentElement.children,n)),n=n.parentElement;return`css:${t.reverse().join(".")}`}function Mn(e){let t=e.ownerDocument.defaultView;if(!t)return Pi;let n=e.parentElement;for(;n&&n!==e.ownerDocument.documentElement;){try{if(vc(n,t.getComputedStyle(n)))return Mc(n)}catch{return Pi}n=n.parentElement}return Pi}var bt=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),i0=Object.freeze([bt.start,bt.duration,bt.trackIndex]),r0=Object.freeze([bt.derivedEnd]),o0=Object.freeze([bt.derivedEnd,bt.legacyTrack]);function ze(e){if(e==null||e.trim()==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}var ls=/^[A-Za-z0-9_.:-]+$/;function us(e,t){let n=e.charCodeAt(t);return n>=48&&n<=57}function as(e,t){let n=t;for(;n>=0&&us(e,n);)n--;return n}function Nc(e,t){let n=t;for(;n>=0&&(e[n]??"").trim()==="";)n--;return n}function Rc(e){let t=e.length-1;if(!us(e,t))return null;let n=as(e,t);return e[n]==="."&&(n=as(e,n-1)),n+1}function Lc(e){let t=Rc(e);if(t==null)return null;let n=Nc(e,t-1),i=e[n];if(i!=="+"&&i!=="-")return null;let r=e.slice(0,n).trim();if(!ls.test(r))return null;let o=Number(e.slice(t));return Number.isFinite(o)?{refId:r,operator:i,magnitude:o}:null}function Oi(e){let t=(e??"").trim();if(!t)return null;let n=ze(t);if(n!=null)return{kind:"absolute",value:n};if(ls.test(t))return{kind:"reference",refId:t,offset:0};let i=Lc(t);return i?{kind:"reference",refId:i.refId,offset:i.operator==="-"?-i.magnitude:i.magnitude}:null}var kc="data-hf-authored-duration",Dc="data-hf-authored-end";function Ic(e){return ze(e.getAttribute("data-duration"))}function Pc(e){return ze(e.getAttribute("data-end"))}function Oc(e){return ze(e.getAttribute(kc))}function Bc(e){return ze(e.getAttribute(Dc))}function Ye(e){let t=e.timelineRegistry??{},n=e.includeAuthoredTimingAttrs??!1,i=e.documentRef??document,r=new WeakMap,o=new WeakMap,a=new Set,c=d=>{let x=i.getElementById(d);return x||(i.querySelector(`[data-composition-id="${CSS.escape(d)}"]`)??null)},s=d=>{let x=d.ownerDocument.defaultView?.HTMLMediaElement;return x?d instanceof x:typeof HTMLMediaElement<"u"&&d instanceof HTMLMediaElement},l=d=>{let x=o.get(d);if(x!==void 0)return x;let S=null,y=Ic(d)??(n?Oc(d):null);if(y!=null&&y>0&&(S=y),S==null||S<=0){let b=Pc(d)??(n?Bc(d):null);if(b!=null){let A=p(d,0),_=b-A;Number.isFinite(_)&&_>0&&(S=_)}}if((S==null||S<=0)&&s(d)){let b=ze(d.getAttribute("data-playback-start"))??ze(d.getAttribute("data-media-start"))??0;Number.isFinite(d.duration)&&d.duration>b&&(S=(d.duration-b)/Be(d))}if(S==null||S<=0){let b=d.getAttribute("data-composition-id");if(b){let A=t[b]??null;if(A&&typeof A.duration=="function")try{let _=Number(A.duration());Number.isFinite(_)&&_>0&&(S=_)}catch(_){T("runtime.startResolver.site1",_)}}}return S!=null&&Number.isFinite(S)&&S>0?(o.set(d,S),S):(o.set(d,null),null)},f=(d,x)=>{if(d.hasAttribute("data-composition-id")){let y=d.parentElement?.closest("[data-composition-id]");return y?p(y,x):0}let S=d.closest("[data-composition-id]");return S?p(S,x):0},p=(d,x)=>{let S=r.get(d);if(S!==void 0)return S??x;if(a.has(d))return x;a.add(d);try{let y=Oi(d.getAttribute("data-start"));if(!y){if(d.hasAttribute("data-composition-id")){let G=d.parentElement;if(G&&(G.hasAttribute("data-composition-src")||G.hasAttribute("data-composition-id")||G.hasAttribute("data-composition-file"))){let D=p(G,x);return r.set(d,D),D}}return r.set(d,x),x}if(y.kind==="absolute"){let G=Math.max(0,y.value),D=Math.max(0,f(d,x)+G);return r.set(d,D),D}let b=c(y.refId);if(!b)return r.set(d,x),x;let A=p(b,0),_=l(b);if(_==null||_<=0){let G=Math.max(0,A+y.offset);return r.set(d,G),G}let M=Math.max(0,A+_+y.offset);return r.set(d,M),M}finally{a.delete(d)}};return{resolveStartForElement:(d,x=0)=>p(d,Math.max(0,x)),resolveDurationForElement:d=>l(d)}}function Bi(e){let t=e.trim().toLowerCase();return!(!t||t==="main"||t.includes("caption")||t.includes("ambient"))}var Gc="data-hf-authored-duration",Uc="data-hf-authored-end";function Ee(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function Hi(e){return Ee(e.getAttribute("data-duration"))??Ee(e.getAttribute(Gc))}function cs(e){return Ee(e.getAttribute("data-end"))??Ee(e.getAttribute(Uc))}function Gi(e){try{let t=e.style?.zIndex;if(t&&t!=="auto"){let n=parseInt(t,10);if(Number.isFinite(n))return n}return 0}catch{return 0}}function Ui(...e){let t=e.filter(n=>Number.isFinite(n??null));return t.length===0?null:Math.max(...t)}function Wi(e,t){let n=e.getAttribute("data-track-index")??e.getAttribute("data-track");if(n==null)return t;let i=Number.parseInt(n,10);return Number.isFinite(i)?i:t}function zt(e){let t=String(e??"").trim();if(!t)return null;let n=t.toLowerCase();if(n.startsWith("data:")||n.startsWith("javascript:"))return null;try{return new URL(t,document.baseURI).toString()}catch{return t}}function ds(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return zt(t);let n=e.getAttribute("data-composition-src");if(n)return zt(n);let i=e.querySelector("img[src], video[src], audio[src], source[src]");return i?zt(i.getAttribute("src")):null}function Wc(e){let t=e.className;return typeof t!="string"?null:t.split(/\\s+/).map(n=>n.trim()).find(n=>n&&n!=="clip"&&!n.startsWith("__hf-"))??null}function Vc(e){if(!e)return null;try{return new URL(e,document.baseURI).pathname.split("/").filter(Boolean).at(-1)??null}catch{return e.split(/[\\\\/]/).filter(Boolean).at(-1)??null}}function zc(e){let t=e.textContent?.replace(/\\s+/g," ").trim();return t?t.length>32?`${t.slice(0,31)}...`:t:null}function Vt(e){let t=e.replace(/\\.[^.]+$/i,"").replace(/[-_]+/g," ").replace(/\\s+/g," ").trim();return t?t.replace(/\\b\\w/g,n=>n.toUpperCase()):e}function jc(e,t,n){let i=e.getAttribute("data-timeline-label")??e.getAttribute("data-label")??e.getAttribute("aria-label")??null;if(i?.trim())return i.trim();let r=e.getAttribute("data-composition-id");if(r)return Vt(r);let o=e.id;if(o)return Vt(o);let a=Wc(e);if(a)return Vt(a);let c=Vc(ds(e));if(c)return Vt(c);let s=zc(e);return s||`${Vt(t)} ${n+1}`}function fs(e){let n=window.__timelines??{},i=Ye({timelineRegistry:n,includeAuthoredTimingAttrs:!0}),r=U=>{if(!U)return null;let k=n[U]??null;if(!k||typeof k.duration!="function")return null;try{let H=Number(k.duration());return Number.isFinite(H)&&H>0?H:null}catch{return null}},o=U=>{let k=Ee(U.getAttribute("data-duration"));if(k!=null&&k>0)return k;let H=Ee(U.getAttribute("data-playback-start"))??Ee(U.getAttribute("data-media-start"))??0;return Number.isFinite(U.duration)&&U.duration>H?Math.max(0,(U.duration-H)/Be(U)):null},a=()=>{let U=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(U.length===0)return null;let k=0;for(let H of U){let ae=H.hasAttribute("data-hf-auto-start")?i.resolveStartForElement(H,0):Math.max(0,Number(H.getAttribute("data-start")??0)||0);if(!Number.isFinite(ae))continue;let oe=o(H);oe==null||oe<=0||(k=Math.max(k,Math.max(0,ae)+oe))}return k>0?k:null},c=(U,k)=>{let H=[],ae=null,oe=null,W=null,q=U.parentElement;for(;q;){let $=q.getAttribute("data-composition-id");$&&(H.push($),!W&&q!==k&&(W=$),ae==null&&(ae=i.resolveStartForElement(q,0)),oe==null&&(oe=Ee(q.getAttribute("data-duration"))??r($)??null)),q=q.parentElement}return{parentCompositionId:W,compositionAncestors:H.reverse(),inheritedStart:ae,inheritedDuration:oe}},s=document.querySelector("[data-composition-id]"),l=Array.from(document.querySelectorAll("[data-composition-id]")),f=s?.getAttribute("data-composition-id")??null,p=s?i.resolveStartForElement(s,0):0,d=a(),x=d!=null?Math.max(0,d-Math.max(0,p)):null,S=r(f),y=Hi(s??document.body),b=Ui(...l.filter(U=>U!==s).map(U=>{let k=i.resolveStartForElement(U,0),H=i.resolveDurationForElement(U)??r(U.getAttribute("data-composition-id"))??null;return!Number.isFinite(k)||H==null||H<=0?null:Math.max(0,k)+H})),A=b!=null?Math.max(0,b-Math.max(0,p)):null,_=typeof S=="number"&&Number.isFinite(S)&&S>0?S:null,M=typeof y=="number"&&Number.isFinite(y)&&y>0?y:null,G=typeof x=="number"&&Number.isFinite(x)&&x>0?x:null,D=typeof A=="number"&&Number.isFinite(A)&&A>0?A:null,v=Ui(G,D),w=_!=null&&v!=null&&_>v+1,F=M??(w?v:Ui(_,G,D))??null,L=(F!=null?p+F:null)??(typeof d=="number"&&Number.isFinite(d)&&d>0?d:null),z=(U,k)=>!Number.isFinite(k)||k<=0?0:L==null||!Number.isFinite(L)?k:!Number.isFinite(U)||U>=L?0:Math.max(0,Math.min(k,L-U)),P=[],X=[],I=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),ie=0;for(let[U,k]of I.entries()){if(k===s||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(k.tagName))continue;let H=c(k,s),ae=i.resolveStartForElement(k,H.inheritedStart??0),oe=k.getAttribute("data-composition-id"),W=Hi(k);if((W==null||W<=0)&&oe&&oe!==f&&(W=r(oe)),(W==null||W<=0)&&k instanceof HTMLMediaElement){let Ce=Ee(k.getAttribute("data-playback-start"))??Ee(k.getAttribute("data-media-start"))??0;Number.isFinite(k.duration)&&k.duration>0&&(W=Math.max(0,k.duration-Ce))}if(W==null||W<=0){let Ce=H.inheritedDuration;if(Ce!=null&&Ce>0){let Ue=(H.inheritedStart??0)+Ce;W=Math.max(0,Ue-ae)}}if(W==null||W<=0||(W=z(ae,W),W<=0))continue;let q=ae+W;ie=Math.max(ie,q);let $=k.tagName.toLowerCase(),we=oe&&oe!==f?"composition":$==="video"?"video":$==="audio"?"audio":$==="img"?"image":"element";P.push({id:Ii(k)??oe??null,label:jc(k,we,P.length),start:ae,duration:W,track:Wi(k,U),zIndex:Gi(k),stackingContextId:Mn(k),kind:we,tagName:$,compositionId:k.getAttribute("data-composition-id"),compositionAncestors:H.compositionAncestors,parentCompositionId:H.parentCompositionId,nodePath:null,compositionSrc:zt(k.getAttribute("data-composition-src")),playbackStart:gt(k),playbackRate:Be(k),assetUrl:ds(k),timelineRole:k.getAttribute("data-timeline-role"),timelineLabel:k.getAttribute("data-timeline-label"),timelineGroup:k.getAttribute("data-timeline-group"),timelinePriority:Ee(k.getAttribute("data-timeline-priority"))})}let Fe=new Set(P.map(U=>U.id)),j=s?.getAttribute("data-composition-id")??null,Y=j?n[j]??null:null;if(Y&&s){let U=Y;if(typeof U.getChildren=="function")try{let k=U.getChildren(!0,!0,!1)??[],H=new Map;for(let W of s.children){let q=W;if(!q.id)continue;let $=q.tagName.toLowerCase();$==="script"||$==="style"||$==="link"||H.set(q,{id:q.id,start:1/0,end:-1/0})}let ae=W=>{let q=W;for(;q;){if(H.has(q))return q;if(q===s)return null;q=q.parentElement}return null};for(let W of k){if(typeof W.targets!="function"||typeof W.startTime!="function"||typeof W.duration!="function")continue;let q=W.startTime(),$=W.parent;for(;$&&$!==Y&&typeof $.startTime=="function";)q+=$.startTime(),$=$.parent;let we=q+W.duration();if(!(!Number.isFinite(q)||!Number.isFinite(we)))for(let Ce of W.targets()){if(!(Ce instanceof Element))continue;let vt=ae(Ce);if(!vt)continue;let Ue=H.get(vt);Ue&&(Ue.start=Math.min(Ue.start,q),Ue.end=Math.max(Ue.end,we))}}let oe=P.length>0?Math.max(...P.map(W=>W.track))+1:0;for(let[W,q]of H){if(q.start===1/0||q.end===-1/0)continue;let $=W;if(Fe.has($.id))continue;let we=Math.max(0,q.end-q.start);if(we<=0)continue;let Ce=z(q.start,we);Ce<=0||(ie=Math.max(ie,q.start+Ce),P.push({id:$.id,label:$.getAttribute("data-timeline-label")??$.getAttribute("data-label")??$.getAttribute("aria-label")??$.id,start:q.start,duration:Ce,track:Wi($,oe),zIndex:Gi($),stackingContextId:Mn($),kind:"element",tagName:$.tagName.toLowerCase(),compositionId:$.getAttribute("data-composition-id"),compositionAncestors:j?[j]:[],parentCompositionId:j,nodePath:null,compositionSrc:null,playbackStart:gt($),playbackRate:Be($),assetUrl:null,timelineRole:$.getAttribute("data-timeline-role"),timelineLabel:$.getAttribute("data-timeline-label"),timelineGroup:$.getAttribute("data-timeline-group"),timelinePriority:Ee($.getAttribute("data-timeline-priority"))}),Fe.add($.id))}}catch(k){T("runtime.timeline.site1",k)}}if(s&&F!=null&&F>0){let U=P.length>0?Math.max(...P.map(k=>k.track))+1:0;for(let k of s.children){let H=k;if(!H.id||Fe.has(H.id))continue;let ae=H.getAttribute("data-timeline-role");if(ae!=="overlay"&&ae!=="persistent-overlay")continue;let oe=H.tagName.toLowerCase();if(oe==="script"||oe==="style"||oe==="link"||oe==="meta"||window.getComputedStyle(H).display==="none")continue;let q=z(0,F);q<=0||(ie=Math.max(ie,q),P.push({id:H.id,label:H.getAttribute("data-timeline-label")??H.getAttribute("data-label")??H.getAttribute("aria-label")??H.id,start:0,duration:q,track:Wi(H,U),zIndex:Gi(H),stackingContextId:Mn(H),kind:"element",tagName:oe,compositionId:H.getAttribute("data-composition-id"),compositionAncestors:j?[j]:[],parentCompositionId:j,nodePath:null,compositionSrc:null,playbackStart:gt(H),playbackRate:Be(H),assetUrl:null,timelineRole:ae,timelineLabel:H.getAttribute("data-timeline-label"),timelineGroup:H.getAttribute("data-timeline-group"),timelinePriority:Ee(H.getAttribute("data-timeline-priority"))}),Fe.add(H.id))}}for(let U of l){if(U===s)continue;let k=U.getAttribute("data-composition-id");if(!k||!Bi(k))continue;let H=i.resolveStartForElement(U,0),ae=Hi(U);if((ae==null||ae<=0)&&cs(U)!=null){let $=cs(U);ae=Math.max(0,$-H)}let oe=r(k),W=ae&&ae>0?ae:oe;if(W==null||W<=0)continue;let q=z(H,W);q<=0||X.push({id:k,label:U.getAttribute("data-label")??k,start:H,duration:q,thumbnailUrl:zt(U.getAttribute("data-thumbnail-url")),avatarName:null})}let B=Math.max(1,ie||1,F??0),V=w&&M==null,Ae=V?Number.POSITIVE_INFINITY:Math.max(1,Math.ceil(B*Math.max(1,e.canonicalFps)));return{...Sn(e.canonicalFps),source:"hf-preview",type:"timeline",compositionContractVersion:1,durationSeconds:V?Number.POSITIVE_INFINITY:B,durationInFrames:Ae,clips:P,scenes:X,compositionWidth:Ee(s?.getAttribute("data-width"))??1920,compositionHeight:Ee(s?.getAttribute("data-height"))??1080}}var ue=Fu(Oa(),1),Ba=ue.default,yg=ue.default.stringify,Sg=ue.default.fromJSON,Eg=ue.default.plugin,Ag=ue.default.parse,wg=ue.default.list,Cg=ue.default.document,_g=ue.default.comment,Fg=ue.default.atRule,Tg=ue.default.rule,vg=ue.default.decl,Mg=ue.default.root,Ng=ue.default.CssSyntaxError,Rg=ue.default.Declaration,Lg=ue.default.Container,kg=ue.default.Processor,Dg=ue.default.Document,Ig=ue.default.Comment,Pg=ue.default.Warning,Og=ue.default.AtRule,Bg=ue.default.Result,Hg=ue.default.Input,Gg=ue.default.Rule,Ug=ue.default.Root,Wg=ue.default.Node;var pr="data-hf-authored-id",Ha="data-hf-inner-root";function hr(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function gr(e){return e.replace(/\\\\/g,"\\\\\\\\").replace(/"/g,\'\\\\"\')}function pf(e){return e&&e.replace(/[^a-zA-Z0-9_-]/g,n=>`\\\\${n}`).replace(/^-?\\d/,n=>`\\\\${n}`)}function Ua(e){let t=e.trim();return t?Array.from(new Set([t,pf(t)])).filter(Boolean):[]}function hf(e){return!!e&&/[\\w-]/.test(e)}function gf(e,t,n){let i=Ua(t).sort((c,s)=>s.length-c.length);if(i.length===0)return e;let r="",o=0,a=null;for(let c=0;c<e.length;c+=1){let s=e[c],l=c>0?e[c-1]:"";if(a){r+=s,s===a&&l!=="\\\\"&&(a=null);continue}if(s===\'"\'||s==="\'"){a=s,r+=s;continue}if(s==="["){o+=1,r+=s;continue}if(s==="]"){o=Math.max(0,o-1),r+=s;continue}if(s==="#"&&o===0){let f=i.find(p=>e.startsWith(p,c+1));if(f){let p=e[c+1+f.length];if(!hf(p)){r+=n,c+=f.length;continue}}}r+=s}return r}function xf(e,t){let n=t?.trim();return n?gf(e,n,`[${pr}="${gr(n)}"]`):e}function Ga(e){return`${e}:not(:has([${Ha}])), ${e} > [${Ha}]`}function bf(e,t,n,i,r,o){let a=xf(e,i),c=yf(a,t,n),s=c.trim();if(!s||s==="*")return e;if(/^(html|body|:root)$/i.test(s))return o?Ga(t):e;let l=new RegExp(`\\\\[\\\\s*data-composition-id\\\\s*=\\\\s*(["\'])${hr(n)}\\\\1\\\\s*\\\\]`,"g");if(l.test(s))return s.replace(l,"").trim()===""?Ga(t):c.replace(l,t);let f=c.match(/^\\s*/)?.[0]??"",p=c.match(/\\s*$/)?.[0]??"";if(r){let d=i?`[${pr}="${gr(i)}"]`:null;if(d&&s.startsWith(d)){let x=s.slice(d.length);return`${f}${t}${d}${x}${p}`}}return`${f}${t} ${s}${p}`}function yf(e,t,n){let i=hr(n),r=String.raw`\\[\\s*data-composition-id\\s*=\\s*(?:"${i}"|\'${i}\')\\s*\\]`,o=String.raw`\\s*\\[\\s*data-(?:start|duration)\\s*=\\s*(?:"[^"]*"|\'[^\']*\')\\s*\\]`;return e.replace(new RegExp(`${r}(?:${o})+`,"g"),t).replace(new RegExp(`(?:${o})+${r}`,"g"),t)}var Sf=new Set(["keyframes","-webkit-keyframes","font-face"]);function Ef(e){return e?.type==="atrule"}function Af(e){let t=e.parent;for(;t;){if(Ef(t)&&Sf.has(t.name.toLowerCase()))return!0;t=t.parent}return!1}function wf(e){let t=e.parent;for(;t;){if(t.type==="rule")return!0;t=t.parent}return!1}function Wa(e,t,n,i,r){let o=t.trim();if(!e||!o)return e;let a=n||`[data-composition-id="${gr(o)}"]`,c=Ba.parse(e);return c.walkRules(s=>{Af(s)||wf(s)||(s.selectors=s.selectors.map(l=>bf(l,a,o,i,r?.compoundAuthoredRoot,r?.scopeRootSelectors)))}),c.toResult({map:!1}).css}function Va(e,t,n="[HyperFrames] composition script error:",i,r=t,o){let a=JSON.stringify(t),c=JSON.stringify(r),s=JSON.stringify(n),l=hr(t),f=JSON.stringify(o?.trim()||null),p=JSON.stringify(i??null),d=JSON.stringify(String.raw`\\[\\s*data-composition-id\\s*=\\s*(?:"${l}"|\'${l}\')\\s*\\]`),x=JSON.stringify(String.raw`\\s*\\[\\s*data-(?:start|duration)\\s*=\\s*(?:"[^"]*"|\'[^\']*\')\\s*\\]`),S=JSON.stringify(Ua(o?.trim()||""));return`(function(){\n var __hfCompId = ${a};\n var __hfTimelineCompId = ${c};\n var __hfErrorLabel = ${s};\n var __hfAuthoredRootId = ${f};\n var __hfAuthoredRootAttr = ${JSON.stringify(pr)};\n var __hfEscapeAttr = function(value) {\n return (value + "").replace(/\\\\\\\\/g, "\\\\\\\\\\\\\\\\").replace(/"/g, "\\\\\\\\\\\\"");\n };\n var __hfRootSelector = ${p} || (__hfCompId\n ? \'[data-composition-id="\' + __hfEscapeAttr(__hfCompId) + \'"]\'\n : "");\n var __hfRoot = null;\n var __hfRootSelectorPattern = ${d};\n var __hfTimingSelectorPattern = ${x};\n var __hfAuthoredRootIdForms = ${S};\n var __hfAuthoredRootSelector = __hfAuthoredRootId\n ? "[" + __hfAuthoredRootAttr + \'="\' + __hfEscapeAttr(__hfAuthoredRootId) + \'"]\'\n : "";\n var __hfIsSelectorNameChar = function(char) {\n return !!char && /[\\\\w-]/.test(char);\n };\n var __hfReplaceAuthoredRootIdSelectors = function(selector) {\n if (!__hfAuthoredRootSelector || !__hfAuthoredRootIdForms.length || typeof selector !== "string") {\n return selector;\n }\n var result = "";\n var bracketDepth = 0;\n var quote = null;\n for (var index = 0; index < selector.length; index += 1) {\n var char = selector[index];\n var previousChar = index > 0 ? selector[index - 1] : "";\n if (quote) {\n result += char;\n if (char === quote && previousChar !== "\\\\\\\\") {\n quote = null;\n }\n continue;\n }\n if (char === \'"\' || char === "\'") {\n quote = char;\n result += char;\n continue;\n }\n if (char === "[") {\n bracketDepth += 1;\n result += char;\n continue;\n }\n if (char === "]") {\n bracketDepth = Math.max(0, bracketDepth - 1);\n result += char;\n continue;\n }\n if (char === "#" && bracketDepth === 0) {\n var matchedForm = null;\n for (var formIndex = 0; formIndex < __hfAuthoredRootIdForms.length; formIndex += 1) {\n var form = __hfAuthoredRootIdForms[formIndex];\n if (selector.slice(index + 1, index + 1 + form.length) === form) {\n matchedForm = form;\n break;\n }\n }\n if (matchedForm) {\n var nextChar = selector[index + 1 + matchedForm.length];\n if (!__hfIsSelectorNameChar(nextChar)) {\n result += __hfAuthoredRootSelector;\n index += matchedForm.length;\n continue;\n }\n }\n }\n result += char;\n }\n return result;\n };\n var __hfNormalizeSelector = function(selector) {\n if (!__hfCompId || typeof selector !== "string") return selector;\n var normalized = selector\n .replace(new RegExp(__hfRootSelectorPattern + \'(?:\' + __hfTimingSelectorPattern + \')+\', \'g\'), __hfRootSelector)\n .replace(new RegExp(\'(?:\' + __hfTimingSelectorPattern + \')+\' + __hfRootSelectorPattern, \'g\'), __hfRootSelector);\n if (__hfAuthoredRootSelector) {\n normalized = __hfReplaceAuthoredRootIdSelectors(normalized);\n }\n return normalized;\n };\n var __hfFindRoot = function() {\n if (!__hfRoot && __hfRootSelector) {\n __hfRoot = window.document.querySelector(__hfRootSelector);\n }\n return __hfRoot;\n };\n var __hfContains = function(node) {\n var root = __hfFindRoot();\n return !root || node === root || root.contains(node);\n };\n var __hfQueryAll = function(selector) {\n var root = __hfFindRoot();\n if (!root || typeof selector !== "string") {\n return window.document.querySelectorAll(selector);\n }\n return Array.prototype.filter.call(window.document.querySelectorAll(__hfNormalizeSelector(selector)), function(node) {\n return __hfContains(node);\n });\n };\n var __hfQueryOne = function(selector) {\n var matches = __hfQueryAll(selector);\n return matches[0] || null;\n };\n var __hfGetElementById = function(id) {\n var found = window.document.getElementById(id);\n if (found && __hfContains(found)) return found;\n var root = __hfFindRoot();\n if (!root) return found || null;\n var idValue = id + "";\n if (__hfAuthoredRootId && __hfAuthoredRootId === idValue && root.getAttribute && root.getAttribute(__hfAuthoredRootAttr) === idValue) {\n return root;\n }\n if (root.id === idValue) return root;\n if (typeof root.querySelector !== "function") return null;\n try {\n var authoredRootMatch = root.querySelector(\'[\' + __hfAuthoredRootAttr + \'="\' + __hfEscapeAttr(idValue) + \'"]\');\n if (authoredRootMatch) return authoredRootMatch;\n } catch {}\n if (typeof CSS !== "undefined" && CSS && typeof CSS.escape === "function") {\n try {\n return root.querySelector("#" + CSS.escape(idValue)) || null;\n } catch {}\n }\n try {\n return root.querySelector(\'[id="\' + __hfEscapeAttr(idValue) + \'"]\') || null;\n } catch {}\n return null;\n };\n var __hfScopedDocument = typeof Proxy === "function"\n ? new Proxy(window.document, {\n get: function(target, prop, receiver) {\n if (prop === "querySelector") return __hfQueryOne;\n if (prop === "querySelectorAll") return __hfQueryAll;\n if (prop === "getElementById") return __hfGetElementById;\n var value = Reflect.get(target, prop, target);\n return typeof value === "function" ? value.bind(target) : value;\n },\n })\n : window.document;\n var __hfTimelineRegistryProxy = null;\n var __hfGetTimelineRegistry = function() {\n window.__timelines = window.__timelines || {};\n if (!__hfCompId || __hfCompId === __hfTimelineCompId || typeof Proxy !== "function") {\n return window.__timelines;\n }\n if (!__hfTimelineRegistryProxy) {\n __hfTimelineRegistryProxy = new Proxy(window.__timelines, {\n get: function(target, prop, receiver) {\n if (prop !== __hfCompId) {\n return Reflect.get(target, prop, target);\n }\n var authoredValue = Reflect.get(target, prop, target);\n return authoredValue === undefined\n ? Reflect.get(target, __hfTimelineCompId, target)\n : authoredValue;\n },\n set: function(target, prop, value, receiver) {\n if (prop !== __hfCompId) {\n return Reflect.set(target, prop, value, target);\n }\n // The authored node remains in the compiled DOM when its local id\n // differs from the runtime mount id, so readiness legitimately sees\n // both compositions. Publish the same timeline under both identities\n // instead of replacing one with the other.\n var authoredSet = Reflect.set(target, __hfCompId, value, target);\n var runtimeSet = Reflect.set(target, __hfTimelineCompId, value, target);\n return authoredSet && runtimeSet;\n },\n });\n }\n return __hfTimelineRegistryProxy;\n };\n var __hfScopedWindow = typeof Proxy === "function"\n ? new Proxy(window, {\n get: function(target, prop, receiver) {\n if (prop === "__timelines") return __hfGetTimelineRegistry();\n // Inside a sub-composition, __hyperframes is passed as a bare script\n // param bound to the SCOPED variant (per-comp getVariables). But\n // authors routinely write the documented window.__hyperframes.\n // getVariables() form, which would otherwise fall through to the host\n // page\'s base __hyperframes and return the WRONG (or empty) variables\n // for this instance. Route it to the scoped variant too so both\n // spellings resolve to this composition\'s own variables.\n // (__hfScopedHyperframes is a hoisted var assigned below, before any\n // sub-comp script -- the only code that reads this -- runs.)\n if (prop === "__hyperframes") return __hfScopedHyperframes;\n return Reflect.get(target, prop, target);\n },\n set: function(target, prop, value, receiver) {\n if (prop === "__timelines") {\n // Common authoring boilerplate assigns the registry back to\n // itself (window.__timelines = window.__timelines || {}). The\n // getter above returns our proxy; do not replace the canonical\n // registry with that proxy or later wrappers will stack proxies.\n if (value === __hfTimelineRegistryProxy) return true;\n target.__timelines = value || {};\n __hfTimelineRegistryProxy = null;\n return true;\n }\n return Reflect.set(target, prop, value, target);\n },\n })\n : window;\n var __hfResolveGsapTarget = function(target) {\n if (typeof target !== "string") return target;\n return __hfQueryAll(target);\n };\n var __hfScopeTimeline = function(timeline) {\n if (!timeline || timeline.__hfScopedCompositionRoot === __hfFindRoot()) return timeline;\n ["to", "from", "fromTo", "set"].forEach(function(method) {\n var original = timeline[method];\n if (typeof original !== "function") return;\n timeline[method] = function(target) {\n var args = Array.prototype.slice.call(arguments);\n args[0] = __hfResolveGsapTarget(target);\n return original.apply(timeline, args);\n };\n });\n try {\n Object.defineProperty(timeline, "__hfScopedCompositionRoot", {\n value: __hfFindRoot(),\n configurable: true,\n });\n } catch {\n // Best-effort: timelines coming from user code may have a frozen target\n // or a non-extensible defineProperty path. Swallow \\u2014 the scoped root\n // is an enrichment, not a correctness invariant for playback.\n }\n return timeline;\n };\n var __hfBaseGsap = typeof gsap === "undefined" ? window.gsap : gsap;\n var __hfScopedGsap = !__hfBaseGsap || typeof Proxy !== "function"\n ? __hfBaseGsap\n : new Proxy(__hfBaseGsap, {\n get: function(target, prop, receiver) {\n if (prop === "timeline") {\n return function() {\n return __hfScopeTimeline(target.timeline.apply(target, arguments));\n };\n }\n if (prop === "to" || prop === "from" || prop === "fromTo" || prop === "set") {\n return function(firstArg) {\n var args = Array.prototype.slice.call(arguments);\n args[0] = __hfResolveGsapTarget(firstArg);\n return target[prop].apply(target, args);\n };\n }\n if (prop === "utils" && target.utils && typeof Proxy === "function") {\n return new Proxy(target.utils, {\n get: function(utilsTarget, utilsProp, utilsReceiver) {\n if (utilsProp === "toArray") {\n return function(firstArg) {\n var args = Array.prototype.slice.call(arguments);\n args[0] = __hfResolveGsapTarget(firstArg);\n return utilsTarget.toArray.apply(utilsTarget, args);\n };\n }\n if (utilsProp === "selector") {\n return function(base) {\n var baseEl = typeof base === "string" ? __hfQueryOne(base) : base;\n var root = baseEl || __hfFindRoot();\n return function(selector) {\n if (!root || typeof selector !== "string") return [];\n return Array.prototype.filter.call(\n window.document.querySelectorAll(__hfNormalizeSelector(selector)),\n function(node) {\n return node === root || (typeof root.contains === "function" && root.contains(node));\n },\n );\n };\n };\n }\n var value = Reflect.get(utilsTarget, utilsProp, utilsTarget);\n return typeof value === "function" ? value.bind(utilsTarget) : value;\n },\n });\n }\n var value = Reflect.get(target, prop, target);\n return typeof value === "function" ? value.bind(target) : value;\n },\n });\n var __hfBaseHyperframes = window.__hyperframes;\n var __hfScopedHyperframes = !__hfBaseHyperframes\n ? __hfBaseHyperframes\n : Object.assign({}, __hfBaseHyperframes, {\n getVariables: function() {\n var byComp = window.__hfVariablesByComp;\n var scoped = byComp && __hfTimelineCompId ? byComp[__hfTimelineCompId] : null;\n return scoped ? Object.assign({}, scoped) : {};\n },\n });\n var __hfRun = function() {\n try {\n (function(document, gsap, window, __hyperframes) {\n${e.replace(/<\\/(script)/gi,"<\\\\/$1")}\n }).call(window, __hfScopedDocument, __hfScopedGsap, __hfScopedWindow, __hfScopedHyperframes);\n } catch (_err) {\n console.error(__hfErrorLabel, __hfCompId, _err);\n }\n };\n __hfFindRoot();\n __hfRun();\n})();`}var Cf=["data-composition-id","data-composition-file","data-start","data-duration","data-end","data-track-index","data-track","data-composition-src","data-hf-authored-duration","data-hf-authored-end"];function za(e){let t=e.getAttribute("id")?.trim();for(let n of Cf)e.removeAttribute(n);t&&(e.removeAttribute("id"),e.setAttribute("data-hf-authored-id",t)),e.setAttribute("data-hf-inner-root","true")}var _f=8e3,Ff=/^(?![a-zA-Z][a-zA-Z\\d+\\-.]*:)(?!\\/\\/)(?!\\/)(?!\\.\\.?\\/).+/,Tf=/\\burl\\(\\s*(["\']?)([^)"\']+)\\1\\s*\\)/g,vf=["src","href"];function Mf(e){return!e||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/")}function $a(e,t){if(!t)return e;let n=e.trim();if(Mf(n)||!n.startsWith("../")&&n!=="..")return e;try{return new URL(n,t).href}catch{return e}}function qa(e,t){return!t||!e?e:e.replace(Tf,(n,i,r)=>{let o=$a(r||"",t);return o===r?n:`url(${i||""}${o}${i||""})`})}function Nf(e,t){for(let n of Array.from(e.querySelectorAll("[src], [href]")))for(let i of vf){let r=n.getAttribute(i);if(r==null)continue;let o=$a(r,t);o!==r&&n.setAttribute(i,o)}}function Rf(e,t){for(let n of Array.from(e.querySelectorAll("[style]"))){let i=n.getAttribute("style");if(i==null)continue;let r=qa(i,t);r!==i&&n.setAttribute("style",r)}}function Lf(e,t){for(let n of Array.from(e.querySelectorAll("style"))){let i=n.textContent||"",r=qa(i,t);r!==i&&(n.textContent=r)}}function Ka(e,t){if(t){Nf(e,t),Rf(e,t),Lf(e,t);for(let n of Array.from(e.querySelectorAll("template")))Ka(n.content,t)}}function kf(e,t){return`${e}__hf${t}`}var Df=e=>new Promise(t=>{let n=!1,i=Date.now(),r=null,o=a=>{n||(n=!0,r!=null&&window.clearTimeout(r),t({status:a,elapsedMs:Math.max(0,Date.now()-i)}))};e.addEventListener("load",()=>o("load"),{once:!0}),e.addEventListener("error",()=>o("error"),{once:!0}),r=window.setTimeout(()=>o("timeout"),_f)});function br(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function If(e){let t=document.importNode(e,!0);za(t);let n=t.getAttribute("data-width"),i=t.getAttribute("data-height");return t.style.width=n?`${n}px`:"100%",t.style.height=i?`${i}px`:"100%",t}function ja(e,t){let n=e.trim();if(!n)return e;try{return Ff.test(n)&&!n.startsWith("#")&&!n.startsWith("?")?new URL(n,document.baseURI).toString():t?new URL(n,t).toString():new URL(n,document.baseURI).toString()}catch{return e}}function xr(e,t){try{let n=new URL(e),i=new URL(t);return n.search="",n.hash="",i.search="",i.hash="",n.href===i.href}catch{return!1}}function jn(e){let t=(e.getAttribute("data-composition-id")||"").trim()||null;return{authoredCompositionId:(e.getAttribute("data-hf-original-composition-id")||t||"").trim()||null,runtimeCompositionId:t}}function Pf(e){let t=new Map;for(let n of e){let i=jn(n).authoredCompositionId||"";i&&t.set(i,(t.get(i)||0)+1)}return t}function Ja(e){let t=jn(e).authoredCompositionId;return t?!!document.querySelector(`template#${CSS.escape(t)}-template`):!1}function Of(e){return!!e.querySelector(\'[data-hf-inner-root="true"]\')}function Bf(e){return e.hasAttribute("data-composition-src")?!0:Ja(e)?e.children.length===0||e.hasAttribute("data-hf-original-composition-id")?!0:Of(e):!1}function Sr(){return Array.from(document.querySelectorAll("[data-composition-src], [data-composition-id]")).filter(t=>t.hasAttribute("data-composition-src")?!0:Ja(t))}function Ya(){let e=window.__hfVariablesByComp;if(!e)return;let t=new Set(Sr().map(n=>jn(n).runtimeCompositionId).filter(n=>!!n));for(let n of Object.keys(e))t.has(n)||delete e[n]}function Xa(e,t=Pf(e)){let n=new Map,i=new Map;for(let r of e){let{authoredCompositionId:o,runtimeCompositionId:a}=jn(r),c=Bf(r);if(!o){i.set(r,{authoredCompositionId:null,runtimeCompositionId:a});continue}let s=(t.get(o)||0)>1,l=a||o;if(c){let f=s?(n.get(o)||0)+1:0;s&&n.set(o,f),l=s?kf(o,f):o,s?r.setAttribute("data-hf-original-composition-id",o):r.removeAttribute("data-hf-original-composition-id"),r.setAttribute("data-composition-id",l),a&&a!==l&&window.__hfVariablesByComp&&delete window.__hfVariablesByComp[a]}i.set(r,{authoredCompositionId:o,runtimeCompositionId:l})}return i}async function yr(e){let t=null;e.authoredCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(x=>x instanceof HTMLElement&&x.getAttribute("data-composition-id")===e.authoredCompositionId)??null);let n=t??e.sourceNode,i=t?.getAttribute("data-composition-id")?.trim()||e.authoredCompositionId||null,r=e.runtimeCompositionId||i||null,o=t?.getAttribute("id")?.trim()||null,a=r?`[data-composition-id="${CSS.escape(r)}"]`:void 0;if(e.headLinks)for(let d of e.headLinks){let x=(d.getAttribute("href")||"").trim();if(!x)continue;let S=e.compositionUrl?new URL(x,e.compositionUrl).href:x;if(e.compositionUrl&&xr(S,e.compositionUrl)||document.head.querySelector(`link[href="${CSS.escape(S)}"]`))continue;let y=d.cloneNode(!0);y.href=S,document.head.appendChild(y),e.injectedLinks.push(y)}let c=d=>{for(let x of d){let S=x.cloneNode(!0);S instanceof HTMLStyleElement&&(i&&(S.textContent=Wa(S.textContent||"",i,a,o,{scopeRootSelectors:!0})),document.head.appendChild(S),e.injectedStyles.push(S))}};e.headStyles&&c(e.headStyles),c(Array.from(n.querySelectorAll("style")));let s=[];if(e.headScripts)for(let d of e.headScripts){let x=d.getAttribute("type")?.trim()??"",S=d.getAttribute("src")?.trim()??"";if(S){let y=ja(S,e.compositionUrl);if(e.compositionUrl&&xr(y,e.compositionUrl))continue;s.push({kind:"external",src:y,type:x})}else{let y=d.textContent?.trim()??"";y&&s.push({kind:"inline",content:y,type:x,scopeCompositionId:i})}}let l=Array.from(n.querySelectorAll("script")),f=[...s];for(let d of l){let x=d.getAttribute("type")?.trim()??"",S=d.getAttribute("src")?.trim()??"";if(S){let y=ja(S,e.compositionUrl);if(e.compositionUrl&&xr(y,e.compositionUrl)){d.parentNode?.removeChild(d);continue}f.push({kind:"external",src:y,type:x})}else{let y=d.textContent?.trim()??"";y&&f.push({kind:"inline",content:y,type:x,scopeCompositionId:i})}d.parentNode?.removeChild(d)}let p=Array.from(n.querySelectorAll("style"));for(let d of p)d.parentNode?.removeChild(d);if(t){let d=t.getAttribute("data-width"),x=t.getAttribute("data-height"),S=e.parseDimensionPx(d),y=e.parseDimensionPx(x);d&&e.host.setAttribute("data-width",d),x&&e.host.setAttribute("data-height",x),S&&e.host instanceof HTMLElement&&(e.host.style.width=S),y&&e.host instanceof HTMLElement&&(e.host.style.height=y),t.hasAttribute("data-timeline-locked")&&e.host.setAttribute("data-timeline-locked",""),e.host.appendChild(If(t))}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;r&&Hf(e,n,r);for(let d of f){let x=document.createElement("script");if(d.type&&(x.type=d.type),x.async=!1,d.kind==="external"?x.src=d.src:d.type.toLowerCase()==="module"?x.textContent=d.content:d.scopeCompositionId?x.textContent=Va(d.content,d.scopeCompositionId,"[HyperFrames] composition script error:",a,r||d.scopeCompositionId,o):x.textContent=`(function(){${d.content}})();`,document.body.appendChild(x),e.injectedScripts.push(x),d.kind==="external"){let S=await Df(x);S.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.authoredCompositionId,runtimeCompositionId:e.runtimeCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:d.src,loadStatus:S.status,elapsedMs:S.elapsedMs}})}}}async function Qa(e){let t=Sr();if(Ya(),t.length===0)return;let n=Xa(t),i=t.filter(r=>{if(r.hasAttribute("data-composition-src")||r.children.length>0)return!1;let o=n.get(r)?.authoredCompositionId;return o?!!document.querySelector(`template#${CSS.escape(o)}-template`):!1});if(i.length!==0)for(let r of i){let o=n.get(r),a=o?.authoredCompositionId;if(!a)continue;let c=document.querySelector(`template#${CSS.escape(a)}-template`);br(r),await yr({host:r,authoredCompositionId:a,runtimeCompositionId:o?.runtimeCompositionId||a,hostCompositionSrc:`template#${a}-template`,sourceNode:c.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic})}}async function Za(e){let t=Sr();if(Ya(),t.length===0)return;let n=Xa(t),i=t.filter(r=>r.hasAttribute("data-composition-src"));i.length!==0&&await Promise.all(i.map(async r=>{let o=r.getAttribute("data-composition-src");if(!o)return;let a=n.get(r),c=a?.authoredCompositionId||null,s=a?.runtimeCompositionId||c||null,l=null;try{l=new URL(o,document.baseURI)}catch{l=null}br(r);try{let f=c!=null?document.querySelector(`template#${CSS.escape(c)}-template`):null;if(f){await yr({host:r,authoredCompositionId:c,runtimeCompositionId:s,hostCompositionSrc:o,sourceNode:f.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:l,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let p=await fetch(o);if(!p.ok)throw new Error(`HTTP ${p.status}`);let d=await p.text(),S=new DOMParser().parseFromString(d,"text/html");Ka(S,l);let y=(c?S.querySelector(`template#${CSS.escape(c)}-template`):null)??S.querySelector("template"),b=y?y.content:S.body,A=y?void 0:Array.from(S.head.querySelectorAll("style")),_=y?void 0:Array.from(S.head.querySelectorAll("script")),M=Array.from(S.head.querySelectorAll(\'link[rel="stylesheet"], link[rel="preconnect"]\'));await yr({host:r,authoredCompositionId:c,runtimeCompositionId:s,hostCompositionSrc:o,sourceNode:b,hasTemplate:!!y,fallbackBodyInnerHtml:S.body.innerHTML,compositionUrl:l,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,headStyles:A,headScripts:_,headLinks:M,declaredVariableDefaults:It(S.documentElement),onDiagnostic:e.onDiagnostic})}catch(f){e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:c,runtimeCompositionId:s,hostCompositionSrc:o,errorMessage:f instanceof Error?f.message:"unknown_error"}}),br(r)}}))}function Hf(e,t,n){let r={...e.declaredVariableDefaults??(t instanceof Element?It(t):{}),...yo(e.host)};xo(e.host),Object.keys(r).length>0?(window.__hfVariablesByComp||(window.__hfVariablesByComp={}),window.__hfVariablesByComp[n]=r,yi(e.host,{...go(e.host,r,window),...An()})):window.__hfVariablesByComp&&delete window.__hfVariablesByComp[n]}function Gf(e){return e instanceof HTMLElement?e.dataset.captionWrapper!=="true"?e:e.querySelector(":scope > span")??null:null}function Uf(){let e=[],t=document.querySelectorAll(".caption-group");for(let n of t)for(let i of n.children){if(!(i instanceof HTMLElement))continue;let r=i.dataset.captionWrapper==="true"?i.querySelector(":scope > span"):i.tagName==="SPAN"?i:null;r&&e.push(r)}return e}function Wf(e){let t=e.parentElement;if(t?.dataset.captionWrapper==="true")return t;let n=document.createElement("span");return n.style.display="inline-block",n.dataset.captionWrapper="true",e.parentNode?.insertBefore(n,e),n.appendChild(e),n}function Er(){let e=window.gsap;e&&document.querySelectorAll(".caption-group").length!==0&&fetch("caption-overrides.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!Array.isArray(t)||t.length===0)return;let n=Uf();for(let i of t){let r=null;if(i.wordId&&(r=Gf(document.getElementById(i.wordId))),!r&&i.wordIndex!==void 0&&(r=n[i.wordIndex]??null),!r)continue;let o={},a={};if(i.x!==void 0&&(o.x=i.x),i.y!==void 0&&(o.y=i.y),i.scale!==void 0&&(o.scale=i.scale),i.rotation!==void 0&&(o.rotation=i.rotation),i.opacity!==void 0&&(a.opacity=i.opacity),i.fontSize!==void 0&&(a.fontSize=`${i.fontSize}px`),i.fontWeight!==void 0&&(a.fontWeight=i.fontWeight),i.fontFamily!==void 0&&(a.fontFamily=i.fontFamily),i.activeColor||i.dimColor){let s=e.getTweensOf(r).filter(f=>f.vars.color!==void 0).sort((f,p)=>f.startTime()-p.startTime()),l=s[0]?String(s[0].vars.color):"";for(let f of s)String(f.vars.color)===l?i.dimColor&&(f.vars.color=i.dimColor):i.activeColor&&(f.vars.color=i.activeColor);i.dimColor&&e.set(r,{color:i.dimColor})}if(Object.keys(a).length>0&&e.set(r,a),Object.keys(o).length>0){let c=Wf(r);e.set(c,o)}}}).catch(()=>{})}var wr="data-hf-edit-base-x",Cr="data-hf-edit-base-y",Ct="data-hf-edit-original-translate",$n=e=>{let t=parseFloat(e??"");return Number.isFinite(t)?t:0},Vf=e=>{let t=[],n=0,i="";for(let r of e.trim())r==="("&&(n+=1),r===")"&&(n=Math.max(0,n-1)),/\\s/.test(r)&&n===0?(i&&t.push(i),i=""):i+=r;return i&&t.push(i),t},el=/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)px$/,Ar=(e,t)=>el.test(e)&&el.test(t)?`${parseFloat(e)+parseFloat(t)}px`:`calc(${e} + ${t})`,zf=(e,t,n)=>{if(!e||e==="none")return`${t} ${n}`;let[i,r,o]=Vf(e);if(i===void 0)return`${t} ${n}`;if(r===void 0)return`${Ar(i,t)} ${n}`;let a=o===void 0?"":` ${o}`;return`${Ar(i,t)} ${Ar(r,n)}${a}`},jf=e=>{try{e.ownerDocument.defaultView?.gsap?.getProperty?.(e,"x")}catch{}},$f=e=>{let t=e.style.getPropertyValue("translate").trim();if(t)return t==="none"?"":t;try{let n=e.ownerDocument.defaultView,i=n?n.getComputedStyle(e).getPropertyValue("translate").trim():"";return i==="none"?"":i}catch{return""}},_r=new WeakMap;function qf(e,t){let n=_r.get(e);if(!t?.force&&n!==void 0&&e.style.getPropertyValue("translate")!==n){Je("position_edit_fold_skipped",{hfId:e.getAttribute("data-hf-id")});return}let i=$n(e.getAttribute("data-x"))-$n(e.getAttribute(wr)),r=$n(e.getAttribute("data-y"))-$n(e.getAttribute(Cr));e.hasAttribute(Ct)||e.setAttribute(Ct,$f(e)),n===void 0&&jf(e);let o=e.getAttribute(Ct)??"",a=zf(o,`${i}px`,`${r}px`);e.style.setProperty("translate",a),_r.set(e,e.style.getPropertyValue("translate"))}function qn(e,t){let n=e.defaultView?.HTMLElement,i=e.defaultView?.SVGElement,r=s=>n||i?n!==void 0&&s instanceof n||i!==void 0&&s instanceof i:typeof s.style?.setProperty=="function",o=e.querySelectorAll(`[${Ct}]:not([${wr}]):not([${Cr}])`);for(let s=0;s<o.length;s++){let l=o[s];if(l===void 0||!r(l))continue;let f=l.getAttribute(Ct)??"";f===""?l.style.removeProperty("translate"):l.style.setProperty("translate",f),l.removeAttribute(Ct),_r.delete(l)}let a=e.querySelectorAll(`[${wr}], [${Cr}]`),c=0;for(let s=0;s<a.length;s++){let l=a[s];l===void 0||!r(l)||(qf(l,t),c+=1)}return c}var tl="__hfPositionEditsSeekReapplyWrapped",nl=new WeakSet,il=new WeakMap,rl=new WeakMap;function ol(e){let t=e,n=()=>{try{qn(t.document)}catch{}},i=p=>typeof p=="function"&&(nl.has(p)||!!p[tl]),r=p=>{nl.add(p);try{Object.defineProperty(p,tl,{value:!0})}catch{}},o=p=>{if(typeof p!="function"||i(p))return p;let d=function(...x){let S=p.apply(this,x);return n(),S};return r(d),d},a=(p,d)=>{let x=il.get(p);if(x?.has(d))return!0;let S=Object.getOwnPropertyDescriptor(p,d);if(S?.configurable===!1){let A=p[d];return typeof A=="function"&&(p[d]=o(A),n()),!1}let y=p[d],b=S?.set;return Object.defineProperty(p,d,{configurable:!0,enumerable:S?.enumerable??!0,get:()=>y,set:A=>{y=o(A),b?.call(p,A)}}),y=o(y),x??(x=new Set),x.add(d),il.set(p,x),n(),!0},c=(p,d)=>{let x=rl.get(t),S=Object.getOwnPropertyDescriptor(t,p);if(!x?.has(p)){if(S?.configurable===!1){let A=t[p];return A?a(A,d):!1}let b=t[p];Object.defineProperty(t,p,{configurable:!0,enumerable:S?.enumerable??!0,get:()=>b,set:A=>{b=A,b&&a(b,d)}}),x??(x=new Set),x.add(p),rl.set(t,x)}let y=t[p];return y?a(y,d):!1},s=()=>{let p=c("__hf","seek"),d=c("__player","renderSeek");return p&&d};if(s())return;let l=120,f=t.setInterval(()=>{if(s()){t.clearInterval(f);return}l-=1,l<=0&&t.clearInterval(f)},50)}function Kn(e){let t=window,i=e.closest("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()??"",r=i?t.__hfVariablesByComp?.[i]:void 0;if(r)return r;let o=t.__hyperframes?.getVariables?.();return o&&typeof o=="object"?o:t.__hfVariables??{}}function Jn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var sl=new Set(["img","video","audio","source"]);function Kf(e){if(typeof e=="string"&&e.length>0)return e;if(e!==null&&typeof e=="object"){let t=e.url;if(typeof t=="string"&&t.length>0)return t}return null}function Jf(e){let t=e.replace(/[\\u0000-\\u0020]/g,""),n=/^([a-z][a-z0-9+.-]*):/i.exec(t);if(!n)return!0;let i=n[1]?.toLowerCase();return i?i==="https"||i==="http"||i==="blob"?!0:i==="data"?/^data:image\\//i.test(t):!1:!1}function Yf(e){return e.replace(/[;{}<>\\r\\n]/g,"")}function Xf(e){if(Jn(e))return String(e);if(e!==null&&typeof e=="object"){let t=e.name;if(typeof t=="string"&&t.length>0)return t}return null}function Fr(e,t){let n=e.closest("[data-composition-id]"),i=t.get(n);if(i)return i;let r=Kn(e);return t.set(n,r),r}function Qf(e,t){if(e.childElementCount===0){e.textContent=t;return}let n=!1;for(let i of Array.from(e.childNodes))i.nodeType===Node.TEXT_NODE&&(i.nodeValue=n?"":t,n=!0);n||e.insertBefore(e.ownerDocument.createTextNode(t),e.firstChild)}function Zf(e){return e.querySelector("[data-hf-root]")??e.getElementById("stage")??e.body?.firstElementChild??e.body}function em(e,t){let n=new Set,i=Zf(e);i&&n.add(i);for(let r of Array.from(e.querySelectorAll("[data-composition-id]")))n.add(r);for(let r of n){let o=Fr(r,t);for(let[a,c]of Object.entries(o)){let s=Xf(c);s!==null&&r instanceof HTMLElement&&r.style.setProperty(`--${a}`,Yf(s))}}}function Tr(e){let t=new Map;em(e,t);for(let n of Array.from(e.querySelectorAll("[data-var-src]"))){let i=n.getAttribute("data-var-src")?.trim();if(!i)continue;if(!sl.has(n.tagName.toLowerCase())){console.warn(`[hyperframes] Ignoring data-var-src on <${n.tagName.toLowerCase()}>: variable-bound src is only allowed on ${Array.from(sl).join("/")}.`);continue}let r=Kf(Fr(n,t)[i]);if(r!==null){if(!Jf(r)){console.warn(`[hyperframes] Ignoring data-var-src="${i}": unsafe URL protocol.`);continue}n.setAttribute("src",r)}}for(let n of Array.from(e.querySelectorAll("[data-var-text]"))){let i=n.getAttribute("data-var-text")?.trim();if(!i)continue;let r=Fr(n,t)[i];Jn(r)&&Qf(n,String(r))}}var xe=class extends Error{constructor(n,i=null){super(i==null?n:`${n} at line ${i}`);me(this,"lineNumber");this.name="CubeLutParseError",this.lineNumber=i}},tm=[0,0,0],nm=[1,1,1],Mr=64;function im(e){let t=!1;for(let n=0;n<e.length;n++){let i=e[n];if(i===\'"\'&&(t=!t),i==="#"&&!t)return e.slice(0,n)}return e}function tt(e,t){let n=Number(e);if(!Number.isFinite(n))throw new xe(`Invalid number "${e}"`,t);return n}function al(e,t,n){if(e.length!==3)throw new xe(`${t} expects three numbers`,n);return[tt(e[0],n),tt(e[1],n),tt(e[2],n)]}function ll(e,t,n){if(!e)throw new xe(`${t} expects a size`,n);let i=Number(e);if(!Number.isInteger(i)||i<2)throw new xe(`${t} must be an integer greater than 1`,n);return i}function rm(e,t){if(t[0]<=e[0]||t[1]<=e[1]||t[2]<=e[2])throw new xe("DOMAIN_MAX values must be greater than DOMAIN_MIN values")}function om(e){let t=/^TITLE\\s+"([^"]*)"\\s*$/i.exec(e);if(t)return t[1]??null;let n=/^TITLE\\s+(.+)\\s*$/i.exec(e);return n&&(n[1]??"").trim()||null}function sm(e){return/^[+-]?(?:\\d|\\.\\d)/.test(e)}function ul(e,t={}){let n=t.maxSize??Mr,i=null,r=tm,o=nm,a=null,c=null,s=[],l=e.replace(/^\\uFEFF/,"").split(/\\r?\\n/);for(let p=0;p<l.length;p++){let d=p+1,x=im(l[p]??"").trim();if(!x)continue;let S=x.split(/\\s+/),y=(S[0]??"").toUpperCase(),b=S.slice(1);if(y==="TITLE"){i=om(x);continue}if(y==="DOMAIN_MIN"){r=al(b,y,d);continue}if(y==="DOMAIN_MAX"){o=al(b,y,d);continue}if(y==="LUT_3D_INPUT_RANGE"){if(b.length!==2)throw new xe(`${y} expects two numbers`,d);let A=tt(b[0],d),_=tt(b[1],d);if(_<=A)throw new xe("LUT_3D_INPUT_RANGE max must exceed min",d);r=[A,A,A],o=[_,_,_];continue}if(y==="LUT_1D_SIZE"){a=ll(b[0],y,d);continue}if(y==="LUT_3D_SIZE"){if(c=ll(b[0],y,d),c>n)throw new xe(`LUT_3D_SIZE ${c} exceeds max ${n}`,d);continue}if(!sm(y)){if(y.startsWith("LUT_"))throw new xe(`Unsupported cube keyword ${y}`,d);continue}if(!c)throw a?new xe("1D cube LUTs are not supported yet",d):new xe("LUT data appears before LUT_3D_SIZE",d);if(S.length!==3)throw new xe("LUT data rows must contain three numbers",d);s.push(tt(S[0],d),tt(S[1],d),tt(S[2],d))}if(a&&c)throw new xe("Mixed 1D and 3D cube LUTs are not supported yet");if(!c)throw a?new xe("1D cube LUTs are not supported yet"):new xe("Missing LUT_3D_SIZE");rm(r,o);let f=c*c*c;if(s.length!==f*3)throw new xe(`Expected ${f} LUT rows for size ${c}, found ${s.length/3}`);return{title:i,size:c,domainMin:r,domainMax:o,data:new Float32Array(s)}}function am(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function vr(e){return Math.round(am(e)*255)}function cl(e){let t=e.size,n=t*t,i=t,r=new Uint8Array(n*i*4);for(let o=0;o<t;o++)for(let a=0;a<t;a++)for(let c=0;c<t;c++){let s=((o*t+a)*t+c)*3,l=(a*n+o*t+c)*4;r[l]=vr(e.data[s]??0),r[l+1]=vr(e.data[s+1]??0),r[l+2]=vr(e.data[s+2]??0),r[l+3]=255}return{width:n,height:i,data:r}}var $e=new Map,lm="data-hf-color-grading-canvas",um="__hf_color_grading_canvas__";function xl(){if(typeof MutationObserver>"u"||typeof document>"u")return;let e=document.documentElement;if(!e)return;let t=i=>{i instanceof HTMLElement&&(i.hasAttribute(vn)||i.setAttribute(vn,i.style.opacity))},n=i=>{if(i instanceof Element){i.hasAttribute(Ve)&&t(i);for(let r of i.querySelectorAll(`[${Ve}]`))t(r)}};n(e),new MutationObserver(i=>{for(let r of i){for(let o of r.addedNodes)n(o);r.type==="attributes"&&r.target instanceof Element&&r.target.hasAttribute(Ve)&&t(r.target)}}).observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[Ve]})}var cm=16,cn={enabled:!1,position:.5,softness:0,lineWidth:2};function Nr(e){let t=e.getAttribute(Ve);return t==null?null:Zo(t,Kn(e))}var dm=["attribute vec2 a_pos;","varying vec2 v_uv;","void main(){"," v_uv = a_pos * 0.5 + 0.5;"," gl_Position = vec4(a_pos, 0.0, 1.0);","}"].join(`\n`),fm=["#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","varying vec2 v_uv;","uniform sampler2D u_source;","uniform sampler2D u_blurSource;","uniform sampler2D u_lut;","uniform vec2 u_resolution;","uniform vec2 u_uvScale;","uniform vec2 u_uvOffset;","uniform float u_blurReady;","uniform float u_lutEnabled;","uniform float u_lutSize;","uniform vec2 u_lutTextureSize;","uniform vec3 u_lutDomainMin;","uniform vec3 u_lutDomainMax;","uniform float u_lutIntensity;","uniform float u_exposure;","uniform float u_contrast;","uniform float u_highlights;","uniform float u_shadows;","uniform float u_whites;","uniform float u_blacks;","uniform float u_temperature;","uniform float u_tint;","uniform float u_vibrance;","uniform float u_saturation;","uniform float u_vignette;","uniform float u_vignetteMidpoint;","uniform float u_vignetteRoundness;","uniform float u_vignetteFeather;","uniform float u_grain;","uniform float u_grainSize;","uniform float u_grainRoughness;","uniform float u_grainSeed;","uniform float u_blur;","uniform float u_pixelate;","uniform float u_intensity;","uniform float u_compareEnabled;","uniform float u_comparePosition;","uniform float u_compareSoftness;","uniform float u_compareLineWidth;","float lumaOf(vec3 c){ return dot(c, vec3(0.2126, 0.7152, 0.0722)); }","float grainHash(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123); }","float colorSaturation(vec3 c){ return max(max(c.r, c.g), c.b) - min(min(c.r, c.g), c.b); }","vec2 clampUv(vec2 uv){ return clamp(uv, vec2(0.0), vec2(1.0)); }","vec4 sampleSource(vec2 uv){ return texture2D(u_source, clampUv(uv)); }","vec4 sampleBlur(vec2 uv){ return texture2D(u_blurSource, clampUv(uv)); }","vec4 sampleMedia(vec2 uv){"," float pixel = clamp(u_pixelate, 0.0, 1.0);"," vec2 sampleUv = uv;"," if (pixel > 0.0) {"," float blockSize = mix(1.0, 48.0, pixel);"," vec2 cells = max(u_resolution / blockSize, vec2(1.0));"," sampleUv = (floor(clamp(uv, vec2(0.0), vec2(0.999999)) * cells) + 0.5) / cells;"," }"," vec4 base = sampleSource(sampleUv);"," float blur = clamp(u_blur, 0.0, 1.0);"," if (blur > 0.0 && u_blurReady > 0.5) {"," base = mix(base, sampleBlur(sampleUv), blur);"," }"," return base;","}","vec3 sampleLut(float r, float g, float b){"," float size = max(u_lutSize, 2.0);"," float x = (r + b * size + 0.5) / max(u_lutTextureSize.x, 1.0);"," float y = (g + 0.5) / max(u_lutTextureSize.y, 1.0);"," return texture2D(u_lut, vec2(x, y)).rgb;","}","vec3 applyLut(vec3 color){"," if (u_lutEnabled < 0.5) return color;"," float size = max(u_lutSize, 2.0);"," vec3 span = max(u_lutDomainMax - u_lutDomainMin, vec3(0.00001));"," vec3 scaled = clamp((color - u_lutDomainMin) / span, 0.0, 1.0) * (size - 1.0);"," vec3 lo = floor(scaled);"," vec3 hi = min(lo + 1.0, vec3(size - 1.0));"," vec3 f = scaled - lo;"," vec3 c000 = sampleLut(lo.r, lo.g, lo.b);"," vec3 c100 = sampleLut(hi.r, lo.g, lo.b);"," vec3 c010 = sampleLut(lo.r, hi.g, lo.b);"," vec3 c110 = sampleLut(hi.r, hi.g, lo.b);"," vec3 c001 = sampleLut(lo.r, lo.g, hi.b);"," vec3 c101 = sampleLut(hi.r, lo.g, hi.b);"," vec3 c011 = sampleLut(lo.r, hi.g, hi.b);"," vec3 c111 = sampleLut(hi.r, hi.g, hi.b);"," vec3 c00 = mix(c000, c100, f.r);"," vec3 c10 = mix(c010, c110, f.r);"," vec3 c01 = mix(c001, c101, f.r);"," vec3 c11 = mix(c011, c111, f.r);"," vec3 c0 = mix(c00, c10, f.g);"," vec3 c1 = mix(c01, c11, f.g);"," vec3 lutColor = mix(c0, c1, f.b);"," return mix(color, lutColor, clamp(u_lutIntensity, 0.0, 1.0));","}","void main(){"," vec2 uv = (v_uv - u_uvOffset) / u_uvScale;"," if (uv.x < 0.0 || uv.y < 0.0 || uv.x > 1.0 || uv.y > 1.0) {"," gl_FragColor = vec4(0.0);"," return;"," }"," vec4 originalSample = sampleSource(uv);"," vec4 sampleColor = sampleMedia(uv);"," vec3 original = originalSample.rgb;"," vec3 color = sampleColor.rgb * pow(2.0, u_exposure);"," float y = lumaOf(color);"," float shadowMask = 1.0 - smoothstep(0.0, 0.65, y);"," float highlightMask = smoothstep(0.35, 1.0, y);"," color += u_shadows * 0.35 * shadowMask;"," color += u_highlights * 0.35 * highlightMask;"," float blackPoint = clamp(u_blacks * 0.18, -0.18, 0.18);"," float whitePoint = clamp(1.0 - u_whites * 0.18, 0.82, 1.18);"," color = (color - blackPoint) / max(whitePoint - blackPoint, 0.2);"," color.r += u_temperature * 0.08 + u_tint * 0.04;"," color.b -= u_temperature * 0.08 - u_tint * 0.04;"," color.g -= u_tint * 0.08;"," color = (color - 0.5) * max(0.0, 1.0 + u_contrast) + 0.5;"," float satLuma = lumaOf(color);"," float currentSat = clamp(colorSaturation(color), 0.0, 1.0);"," float skinLike = smoothstep(0.02, 0.18, color.r - color.g) * smoothstep(0.0, 0.16, color.g - color.b) * smoothstep(0.18, 0.82, satLuma);"," float vibranceWeight = (1.0 - currentSat * 0.72) * mix(1.0, 0.55, skinLike);"," color = mix(vec3(satLuma), color, max(0.0, 1.0 + u_vibrance * vibranceWeight));"," color = mix(vec3(satLuma), color, max(0.0, 1.0 + u_saturation));"," color = clamp(color, 0.0, 1.0);"," color = clamp(applyLut(color), 0.0, 1.0);"," vec2 vignetteAspect = u_resolution.x > u_resolution.y"," ? vec2(u_resolution.x / max(u_resolution.y, 1.0), 1.0)"," : vec2(1.0, u_resolution.y / max(u_resolution.x, 1.0));"," vec2 vignetteUv = abs((v_uv - vec2(0.5)) * 2.0) * vignetteAspect;"," float vignettePower = mix(8.0, 1.8, clamp(u_vignetteRoundness * 0.5 + 0.5, 0.0, 1.0));"," float vignetteDistance = pow(pow(vignetteUv.x, vignettePower) + pow(vignetteUv.y, vignettePower), 1.0 / vignettePower);"," float vignetteMidpoint = mix(0.22, 1.08, clamp(u_vignetteMidpoint, 0.0, 1.0));"," float vignetteFeather = mix(0.08, 0.72, clamp(u_vignetteFeather, 0.0, 1.0));"," float vignetteMask = smoothstep(vignetteMidpoint, vignetteMidpoint + vignetteFeather, vignetteDistance);"," color *= 1.0 - vignetteMask * clamp(u_vignette, 0.0, 1.0) * 0.75;"," float grainAmount = clamp(u_grain, 0.0, 1.0);"," if (grainAmount > 0.0) {"," float grainPixelSize = mix(1.0, 6.0, clamp(u_grainSize, 0.0, 1.0));"," vec2 grainCoord = floor(gl_FragCoord.xy / grainPixelSize) + vec2(u_grainSeed, u_grainSeed * 1.37);"," float grainBase = grainHash(grainCoord) - grainHash(grainCoord + vec2(19.19, 73.31));"," float grainFine = grainHash(gl_FragCoord.xy + vec2(u_grainSeed * 2.11, u_grainSeed * 0.71)) - 0.5;"," float grain = mix(grainBase * 0.7, grainBase + grainFine * 0.35, clamp(u_grainRoughness, 0.0, 1.0));"," float grainLuma = lumaOf(color);"," float grainMask = smoothstep(0.02, 0.55, grainLuma) * (1.0 - smoothstep(0.88, 1.0, grainLuma));"," color += grain * grainAmount * mix(0.025, 0.08, grainMask);"," }"," color = clamp(color, 0.0, 1.0);"," vec3 graded = mix(original, color, u_intensity);"," if (u_compareEnabled > 0.5) {"," float pos = clamp(u_comparePosition, 0.0, 1.0);"," float softness = max(u_compareSoftness, 0.00001);"," float afterMask = smoothstep(pos - softness, pos + softness, v_uv.x);"," vec3 splitColor = mix(original, graded, afterMask);"," float lineMask = 0.0;"," if (u_compareLineWidth > 0.0) {"," float lineWidth = max(u_compareLineWidth / max(u_resolution.x, 1.0), 0.00001);"," lineMask = 1.0 - smoothstep(lineWidth, lineWidth * 1.8, abs(v_uv.x - pos));"," }"," gl_FragColor = vec4(mix(splitColor, vec3(1.0), lineMask * 0.82), sampleColor.a);"," return;"," }"," gl_FragColor = vec4(graded, sampleColor.a);","}"].join(`\n`),mm=["#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","varying vec2 v_uv;","uniform sampler2D u_source;","uniform vec2 u_resolution;","uniform vec2 u_direction;","uniform float u_radius;","vec4 readSource(vec2 uv){"," vec4 color = texture2D(u_source, clamp(uv, vec2(0.0), vec2(1.0)));"," color.rgb *= color.a;"," return color;","}","void main(){"," vec2 stepUv = u_direction * max(u_radius, 0.0) / max(u_resolution, vec2(1.0)) / 12.0;"," vec4 color = readSource(v_uv) * 0.08077993;"," color += readSource(v_uv + stepUv * 1.0) * 0.07918038;"," color += readSource(v_uv - stepUv * 1.0) * 0.07918038;"," color += readSource(v_uv + stepUv * 2.0) * 0.07456928;"," color += readSource(v_uv - stepUv * 2.0) * 0.07456928;"," color += readSource(v_uv + stepUv * 3.0) * 0.06747307;"," color += readSource(v_uv - stepUv * 3.0) * 0.06747307;"," color += readSource(v_uv + stepUv * 4.0) * 0.05865827;"," color += readSource(v_uv - stepUv * 4.0) * 0.05865827;"," color += readSource(v_uv + stepUv * 5.0) * 0.04899551;"," color += readSource(v_uv - stepUv * 5.0) * 0.04899551;"," color += readSource(v_uv + stepUv * 6.0) * 0.03931982;"," color += readSource(v_uv - stepUv * 6.0) * 0.03931982;"," color += readSource(v_uv + stepUv * 7.0) * 0.03031761;"," color += readSource(v_uv - stepUv * 7.0) * 0.03031761;"," color += readSource(v_uv + stepUv * 8.0) * 0.02245983;"," color += readSource(v_uv - stepUv * 8.0) * 0.02245983;"," color += readSource(v_uv + stepUv * 9.0) * 0.01598624;"," color += readSource(v_uv - stepUv * 9.0) * 0.01598624;"," color += readSource(v_uv + stepUv * 10.0) * 0.01093238;"," color += readSource(v_uv - stepUv * 10.0) * 0.01093238;"," color += readSource(v_uv + stepUv * 11.0) * 0.00718308;"," color += readSource(v_uv - stepUv * 11.0) * 0.00718308;"," color += readSource(v_uv + stepUv * 12.0) * 0.00453456;"," color += readSource(v_uv - stepUv * 12.0) * 0.00453456;"," if (color.a > 0.0001) color.rgb /= color.a;"," gl_FragColor = color;","}"].join(`\n`);function ft(e){return e instanceof HTMLVideoElement||e instanceof HTMLImageElement}function dl(e,t,n){let i=e.createShader(n);return i?(e.shaderSource(i,t),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(T("runtime.colorGrading.compileShader",e.getShaderInfoLog(i)),e.deleteShader(i),null)):null}function bl(e,t=fm){let n=dl(e,dm,e.VERTEX_SHADER),i=dl(e,t,e.FRAGMENT_SHADER);if(!n||!i)return n&&e.deleteShader(n),i&&e.deleteShader(i),null;let r=e.createProgram();return r?(e.attachShader(r,n),e.attachShader(r,i),e.linkProgram(r),e.deleteShader(n),e.deleteShader(i),e.getProgramParameter(r,e.LINK_STATUS)?r:(T("runtime.colorGrading.linkProgram",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function Lr(e,t=e.LINEAR){let n=e.createTexture();return n?(e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null),n):null}function pm(e,t){let n=bl(e,mm);return n?{program:n,quad:t,position:e.getAttribLocation(n,"a_pos"),source:e.getUniformLocation(n,"u_source"),resolution:e.getUniformLocation(n,"u_resolution"),direction:e.getUniformLocation(n,"u_direction"),radius:e.getUniformLocation(n,"u_radius")}:null}function fl(e){let t=Lr(e),n=e.createFramebuffer();if(!t||!n)return t&&e.deleteTexture(t),n&&e.deleteFramebuffer(n),null;e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0);let i=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),i!==e.FRAMEBUFFER_COMPLETE?(e.deleteTexture(t),e.deleteFramebuffer(n),null):{texture:t,framebuffer:n,width:1,height:1}}function ml(e,t,n,i){t.width===n&&t.height===i||(t.width=n,t.height=i,e.bindTexture(e.TEXTURE_2D,t.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n,i,0,e.RGBA,e.UNSIGNED_BYTE,null))}function yl(e){let t=e.getContext("webgl",{alpha:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!0});if(!t)return null;let n=bl(t),i=Lr(t),r=Lr(t,t.NEAREST);if(!n||!i||!r)return n&&t.deleteProgram(n),i&&t.deleteTexture(i),r&&t.deleteTexture(r),null;let o=t.createBuffer();return o?(t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),t.STATIC_DRAW),{gl:t,program:{program:n,texture:i,lutTexture:r,quad:o,position:t.getAttribLocation(n,"a_pos"),source:t.getUniformLocation(n,"u_source"),blurSource:t.getUniformLocation(n,"u_blurSource"),lut:t.getUniformLocation(n,"u_lut"),resolution:t.getUniformLocation(n,"u_resolution"),uvScale:t.getUniformLocation(n,"u_uvScale"),uvOffset:t.getUniformLocation(n,"u_uvOffset"),blurReady:t.getUniformLocation(n,"u_blurReady"),lutEnabled:t.getUniformLocation(n,"u_lutEnabled"),lutSize:t.getUniformLocation(n,"u_lutSize"),lutTextureSize:t.getUniformLocation(n,"u_lutTextureSize"),lutDomainMin:t.getUniformLocation(n,"u_lutDomainMin"),lutDomainMax:t.getUniformLocation(n,"u_lutDomainMax"),lutIntensity:t.getUniformLocation(n,"u_lutIntensity"),exposure:t.getUniformLocation(n,"u_exposure"),contrast:t.getUniformLocation(n,"u_contrast"),highlights:t.getUniformLocation(n,"u_highlights"),shadows:t.getUniformLocation(n,"u_shadows"),whites:t.getUniformLocation(n,"u_whites"),blacks:t.getUniformLocation(n,"u_blacks"),temperature:t.getUniformLocation(n,"u_temperature"),tint:t.getUniformLocation(n,"u_tint"),vibrance:t.getUniformLocation(n,"u_vibrance"),saturation:t.getUniformLocation(n,"u_saturation"),vignette:t.getUniformLocation(n,"u_vignette"),vignetteMidpoint:t.getUniformLocation(n,"u_vignetteMidpoint"),vignetteRoundness:t.getUniformLocation(n,"u_vignetteRoundness"),vignetteFeather:t.getUniformLocation(n,"u_vignetteFeather"),grain:t.getUniformLocation(n,"u_grain"),grainSize:t.getUniformLocation(n,"u_grainSize"),grainRoughness:t.getUniformLocation(n,"u_grainRoughness"),grainSeed:t.getUniformLocation(n,"u_grainSeed"),blur:t.getUniformLocation(n,"u_blur"),pixelate:t.getUniformLocation(n,"u_pixelate"),intensity:t.getUniformLocation(n,"u_intensity"),compareEnabled:t.getUniformLocation(n,"u_compareEnabled"),comparePosition:t.getUniformLocation(n,"u_comparePosition"),compareSoftness:t.getUniformLocation(n,"u_compareSoftness"),compareLineWidth:t.getUniformLocation(n,"u_compareLineWidth")}}):(t.deleteProgram(n),t.deleteTexture(i),t.deleteTexture(r),null)}function hm(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function gm(e){if(!hm(e))return{...cn};let t=(n,i,r,o)=>{let a=typeof n=="number"?n:Number(n);return Math.min(o,Math.max(r,Number.isFinite(a)?a:i))};return{enabled:e.enabled===!0,position:t(e.position,cn.position,0,1),softness:t(e.softness,cn.softness,0,.25),lineWidth:t(e.lineWidth,cn.lineWidth,0,12)}}function Sl(e){try{let t=new URL(e,document.baseURI);return t.protocol==="data:"?{href:t.href}:t.protocol!=="http:"&&t.protocol!=="https:"?{error:"LUT must be project-local or a data URL"}:t.origin!==window.location.origin?{error:"Remote LUT URLs are not supported"}:{href:t.href}}catch{return{error:"Invalid LUT URL"}}}function Dr(e){return e instanceof Error?e.message:"LUT failed to load"}function xm(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0)%1e4}function bm(e){let t=e.id||e.currentSrc||e.getAttribute("src")||`${e.tagName}:${Array.prototype.indexOf.call(e.parentNode?.children??[],e)}`;return xm(t)}function ym(e){let t=Sl(e);if("error"in t)return{state:"error",message:t.error};let n=$e.get(t.href);if(n)return n;let i=fetch(t.href,{credentials:"same-origin"}).then(o=>{if(!o.ok)throw new Error(`Failed to load LUT (${o.status})`);return o.text()}).then(o=>ul(o,{maxSize:Mr})),r={state:"pending",promise:i};for(;$e.size>=cm;){let o=$e.keys().next().value;if(!o)break;$e.delete(o)}return $e.set(t.href,r),i.then(o=>{$e.get(t.href)===r&&$e.set(t.href,{state:"ready",lut:o})},o=>{$e.get(t.href)===r&&$e.set(t.href,{state:"error",message:Dr(o)})}),r}function pl(e,t,n){if(e.lut?.src===t)return e.lut;let i=cl(n),{gl:r,program:o}=e;try{return r.activeTexture(r.TEXTURE2),r.bindTexture(r.TEXTURE_2D,o.lutTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,i.width,i.height,0,r.RGBA,r.UNSIGNED_BYTE,i.data),e.lut={src:t,size:n.size,domainMin:n.domainMin,domainMax:n.domainMax,textureWidth:i.width,textureHeight:i.height},e.lutError=null,e.lutLoadingSrc=null,e.lut}catch(a){return e.lut=null,e.lutError=Dr(a),e.lutLoadingSrc=null,T("runtime.colorGrading.uploadLut",a),null}}function Yn(e,t){e.deleteTexture(t.texture),e.deleteFramebuffer(t.framebuffer)}function El(e){let t=e.effectTargets;t&&(e.gl.deleteProgram(t.blurProgram.program),Yn(e.gl,t.scratch),Yn(e.gl,t.blur),e.effectTargets=null)}function Al(e){El(e),e.gl.deleteTexture(e.program.texture),e.gl.deleteTexture(e.program.lutTexture),e.gl.deleteBuffer(e.program.quad),e.gl.deleteProgram(e.program.program)}function Sm(e){let t=yl(e.canvas);return t?(Al(e),e.gl=t.gl,e.program=t.program,e.lut=null,e.lutLoadingSrc=null,e.lutError=null,e.effectError=null,!0):!1}function kr(e){if(!e.sourceHidden)return;e.element.removeAttribute(Ht);let t=e.element.style.getPropertyValue("opacity"),n=e.element.style.getPropertyPriority("opacity");t==="0"&&n==="important"&&(e.sourceInlineOpacity===null?e.element.style.removeProperty("opacity"):e.element.style.setProperty("opacity",e.sourceInlineOpacity,e.sourceInlineOpacityPriority)),e.sourceHidden=!1}function Em(e){if(e.effectTargets)return e.effectTargets;let{gl:t}=e,n=pm(t,e.program.quad),i=fl(t),r=fl(t);return!n||!i||!r?(n&&t.deleteProgram(n.program),i&&Yn(t,i),r&&Yn(t,r),e.effectError="Framebuffer effects unavailable",null):(e.effectError=null,e.effectTargets={blurProgram:n,scratch:i,blur:r},e.effectTargets)}function Am(e,t,n,i,r){let o=Math.max(1,Math.ceil(i)),a=Math.max(1,Math.ceil(r));return ml(e,t,o,a),ml(e,n,o,a),{width:o,height:a}}function hl(e,t,n,i,r,o,a){e.bindFramebuffer(e.FRAMEBUFFER,i.framebuffer),e.viewport(0,0,r.width,r.height),e.useProgram(t.program),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,n),e.uniform1i(t.source,0),e.uniform2f(t.resolution,r.width,r.height),e.uniform2f(t.direction,o.x,o.y),e.uniform1f(t.radius,a),e.bindBuffer(e.ARRAY_BUFFER,t.quad),e.enableVertexAttribArray(t.position),e.vertexAttribPointer(t.position,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLE_STRIP,0,4)}function wm(e,t,n,i,r,o,a){let c=n;for(let s=0;s<Math.max(1,Math.floor(a));s++)hl(e,t.blurProgram,c,t.scratch,r,{x:1,y:0},o),hl(e,t.blurProgram,t.scratch.texture,i,r,{x:0,y:1},o),c=i.texture}function Cm(e){let t=e.grading.lut?.src.trim()??"",n=e.grading.lut?.intensity??1;if(!t||n<=0)return e.lut=null,e.lutLoadingSrc=null,e.lutError=null,null;let i=Sl(t);if("error"in i)return e.lut=null,e.lutLoadingSrc=null,e.lutError=i.error,null;if(e.lut?.src===i.href)return e.lut;e.lut=null;let r=ym(t);return r.state==="ready"?pl(e,i.href,r.lut):r.state==="error"?(e.lutError=r.message,e.lutLoadingSrc=null,null):(e.lutLoadingSrc!==i.href&&(e.lutLoadingSrc=i.href,e.lutError=null,r.promise.then(o=>{e.destroyed||e.grading.lut?.src.trim()!==t||(pl(e,i.href,o),De(e))},o=>{e.destroyed||e.grading.lut?.src.trim()!==t||(e.lut=null,e.lutError=Dr(o),e.lutLoadingSrc=null,De(e))})),null)}function Rr(e){if(!e)return null;if(typeof e=="string"){let t=e.trim();if(!t)return null;let n=document.getElementById(t.replace(/^#/,""));if(n&&ft(n))return n;try{let i=document.querySelector(t);return i&&ft(i)?i:null}catch{return null}}if(e.hfId){let t=document.querySelector(`[data-hf-id="${CSS.escape(e.hfId)}"]`);if(t&&ft(t))return t}if(e.id){let t=document.getElementById(e.id);if(t&&ft(t))return t}if(!e.selector)return null;try{let t=Array.from(document.querySelectorAll(e.selector)),n=Math.max(0,Math.floor(Number(e.selectorIndex??0)||0)),i=t[n]??null;return i&&ft(i)?i:null}catch{return null}}function _m(e){return e instanceof HTMLVideoElement?e.videoWidth>0&&e.videoHeight>0?{width:e.videoWidth,height:e.videoHeight}:null:e instanceof HTMLImageElement&&e.naturalWidth>0&&e.naturalHeight>0?{width:e.naturalWidth,height:e.naturalHeight}:null}function wl(e){return e instanceof HTMLVideoElement?e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&e.videoWidth>0&&e.videoHeight>0:e instanceof HTMLImageElement?e.complete&&e.naturalWidth>0&&e.naturalHeight>0:!1}function Fm(e){if(!e.id)return null;let t=document.getElementById(`__render_frame_${e.id}__`);return t instanceof HTMLImageElement&&wl(t)?t:null}function Tm(e){return e instanceof HTMLImageElement&&e.classList.contains("__render_frame__")}function vm(e,t){t.parentNode&&t.nextSibling!==e.canvas&&t.parentNode.insertBefore(e.canvas,t.nextSibling)}function Mm(e){if(e instanceof HTMLVideoElement){let t=Fm(e);if(t)return t}return wl(e)?e:null}function gl(e,t){let n=e.toLowerCase();if(n==="center")return .5;if(t==="x"){if(n==="left")return 0;if(n==="right")return 1}else{if(n==="top")return 0;if(n==="bottom")return 1}if(n.endsWith("%")){let i=Number.parseFloat(n);return Number.isFinite(i)?i/100:null}return null}function Nm(e){let t=e.trim().split(/\\s+/).filter(Boolean),n=.5,i=.5;for(let r=0;r<t.length;r++){let o=t[r]??"",a=gl(o,"x"),c=gl(o,"y");if(a!==null&&(o==="left"||o==="right"||o.endsWith("%")&&r===0)){n=a;continue}if(c!==null&&(o==="top"||o==="bottom"||o.endsWith("%")&&r>0)){i=c;continue}}return{x:n,y:i}}function Rm(e,t,n,i,r,o){if(e<=0||t<=0||n<=0||i<=0)return{scaleX:1,scaleY:1,offsetX:0,offsetY:0};let a=r||"fill",c=e,s=t;if(a==="contain"||a==="cover"||a==="scale-down"){let d=a==="cover"?Math.max(e/n,t/i):Math.min(e/n,t/i);c=n*d,s=i*d,a==="scale-down"&&c>n&&s>i&&(c=n,s=i)}else a==="none"&&(c=n,s=i);let l=Nm(o||"center"),f=(e-c)*l.x/e,p=(t-s)*l.y/t;return{scaleX:c/e,scaleY:s/t,offsetX:f,offsetY:p}}function Lm(e,t){window.getComputedStyle(t).position==="static"&&(e.touchedParent||(e.touchedParent=t,e.parentInlinePosition=t.style.position||null),t.style.position="relative")}function km(e,t){let{element:n,canvas:i}=e,r=n.parentElement;r&&Lm(e,r);let o=window.getComputedStyle(t);ts(i.style,o),i.style.pointerEvents="none",i.style.position="absolute",i.style.inset="auto",i.style.left=`${n.offsetLeft}px`,i.style.top=`${n.offsetTop}px`,i.style.right="auto",i.style.bottom="auto",i.style.width=`${n.offsetWidth}px`,i.style.height=`${n.offsetHeight}px`,i.style.display="block",i.style.opacity=e.sourceOpacityForCanvas,i.style.visibility=e.sourceVisibleForCanvas?"visible":"hidden";let a=n.getBoundingClientRect(),c=Math.max(0,Math.round(n.offsetWidth||a.width)),s=Math.max(0,Math.round(n.offsetHeight||a.height));return c<=0||s<=0?(i.style.display="none",null):(i.width!==c&&(i.width=c),i.height!==s&&(i.height=s),{width:c,height:s})}function Dm(e,t,n,i,r,o,a,c,s){e.uniform1i(t.source,0),e.uniform1i(t.blurSource,1),e.uniform1i(t.lut,2),e.uniform2f(t.resolution,a.width,a.height),e.uniform2f(t.uvScale,c.scaleX,c.scaleY),e.uniform2f(t.uvOffset,c.offsetX,c.offsetY),e.uniform1f(t.blurReady,r?1:0),e.uniform1f(t.lutEnabled,i?1:0),e.uniform1f(t.lutSize,i?.size??2),e.uniform2f(t.lutTextureSize,i?.textureWidth??1,i?.textureHeight??1),e.uniform3f(t.lutDomainMin,i?.domainMin[0]??0,i?.domainMin[1]??0,i?.domainMin[2]??0),e.uniform3f(t.lutDomainMax,i?.domainMax[0]??1,i?.domainMax[1]??1,i?.domainMax[2]??1),e.uniform1f(t.lutIntensity,n.lut?.intensity??0),e.uniform1f(t.exposure,n.adjust.exposure),e.uniform1f(t.contrast,n.adjust.contrast),e.uniform1f(t.highlights,n.adjust.highlights),e.uniform1f(t.shadows,n.adjust.shadows),e.uniform1f(t.whites,n.adjust.whites),e.uniform1f(t.blacks,n.adjust.blacks),e.uniform1f(t.temperature,n.adjust.temperature),e.uniform1f(t.tint,n.adjust.tint),e.uniform1f(t.vibrance,n.adjust.vibrance),e.uniform1f(t.saturation,n.adjust.saturation),e.uniform1f(t.vignette,n.details.vignette),e.uniform1f(t.vignetteMidpoint,n.details.vignetteMidpoint),e.uniform1f(t.vignetteRoundness,n.details.vignetteRoundness),e.uniform1f(t.vignetteFeather,n.details.vignetteFeather),e.uniform1f(t.grain,n.details.grain),e.uniform1f(t.grainSize,n.details.grainSize),e.uniform1f(t.grainRoughness,n.details.grainRoughness),e.uniform1f(t.grainSeed,s),e.uniform1f(t.blur,n.effects.blur),e.uniform1f(t.pixelate,n.effects.pixelate),e.uniform1f(t.intensity,n.intensity),e.uniform1f(t.compareEnabled,o.enabled?1:0),e.uniform1f(t.comparePosition,o.position),e.uniform1f(t.compareSoftness,o.softness),e.uniform1f(t.compareLineWidth,o.lineWidth)}function Im(e){if(!e.sourceHidden){let t=e.element.getAttribute(vn);t!==null?(e.sourceInlineOpacity=t===""?null:t,e.sourceInlineOpacityPriority=""):(e.sourceInlineOpacity=e.element.style.getPropertyValue("opacity")||null,e.sourceInlineOpacityPriority=e.element.style.getPropertyPriority("opacity"))}e.element.setAttribute(Ht,"true"),e.element.style.setProperty("opacity","0","important"),e.sourceHidden=!0}function De(e){if(e.destroyed||e.contextLost)return!1;let t=Mm(e.element);if(!t)return e.hasDrawn||(e.canvas.style.display="none"),!1;let n=_m(t);if(!n)return!1;let i=t instanceof HTMLElement?t:e.element,r=e.element.style.getPropertyValue("opacity"),o=e.element.style.getPropertyPriority("opacity"),a=e.sourceHidden&&r==="0"&&o==="important",c=e.element.style.getPropertyValue("visibility"),s=Tm(t);if(s&&vm(e,t),s||!a){let S=window.getComputedStyle(s?t:e.element);e.sourceOpacityForCanvas=S.opacity||"1",e.sourceVisibleForCanvas=(s||c!=="hidden")&&S.visibility!=="hidden"}let l=km(e,i);if(!l)return!1;let f=window.getComputedStyle(i),p=Rm(l.width,l.height,n.width,n.height,f.objectFit,f.objectPosition),{gl:d,program:x}=e;try{let S=Cm(e);d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,x.texture),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!0),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,t);let y=!1,b=Math.min(1,Math.max(0,e.grading.effects.blur));if(b>0){let _=Em(e);if(_){let M=Am(d,_.scratch,_.blur,l.width,l.height);wm(d,_,x.texture,_.blur,M,.75+Math.pow(b,1.35)*32,b>.55?3:2),y=!0}}else e.effectError=null,e.effectTargets&&El(e);d.bindFramebuffer(d.FRAMEBUFFER,null),d.viewport(0,0,l.width,l.height),d.useProgram(x.program),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,x.texture),d.activeTexture(d.TEXTURE1),d.bindTexture(d.TEXTURE_2D,e.effectTargets?.blur.texture??x.texture),d.activeTexture(d.TEXTURE2),d.bindTexture(d.TEXTURE_2D,x.lutTexture);let A=e.grainSeed+(e.element instanceof HTMLVideoElement?Math.floor(e.element.currentTime*60):0);return Dm(d,x,e.grading,S,y,e.compare,l,p,A),d.bindBuffer(d.ARRAY_BUFFER,x.quad),d.enableVertexAttribArray(x.position),d.vertexAttribPointer(x.position,2,d.FLOAT,!1,0,0),d.drawArrays(d.TRIANGLE_STRIP,0,4),Im(e),e.hasDrawn=!0,e.drawError=null,!0}catch(S){return e.drawError=S instanceof Error?S.message:"Shader draw failed",T("runtime.colorGrading.drawEntry",S),!1}}function Ge(e,t,n,i){t.addEventListener(n,i),e.cleanup.push(()=>t.removeEventListener(n,i))}function Pm(e){e.animationFrame!==null&&(window.cancelAnimationFrame(e.animationFrame),e.animationFrame=null),e.videoFrameHandle!==null&&e.element instanceof HTMLVideoElement&&(e.element.cancelVideoFrameCallback?.(e.videoFrameHandle),e.videoFrameHandle=null)}function dn(e){if(e.destroyed||!(e.element instanceof HTMLVideoElement)||e.videoFrameHandle!==null||e.animationFrame!==null)return;let t=e.element,n=t;if(typeof n.requestVideoFrameCallback=="function"){e.videoFrameHandle=n.requestVideoFrameCallback(()=>{e.videoFrameHandle=null,De(e),!e.destroyed&&!t.paused&&!t.ended&&dn(e)});return}e.animationFrame=window.requestAnimationFrame(()=>{e.animationFrame=null,De(e),!e.destroyed&&!t.paused&&!t.ended&&dn(e)})}function Om(e){let t=()=>{De(e)};if(Ge(e,e.element,"load",t),Ge(e,e.element,"loadedmetadata",t),Ge(e,e.element,"loadeddata",t),Ge(e,e.element,"seeked",t),Ge(e,e.element,"timeupdate",t),Ge(e,window,"resize",t),e.element instanceof HTMLVideoElement&&(Ge(e,e.element,"play",()=>dn(e)),Ge(e,e.element,"pause",t)),Ge(e,e.canvas,"webglcontextlost",n=>{n.preventDefault(),e.contextLost=!0,e.drawError="WebGL context lost",e.canvas.style.display="none",kr(e)}),Ge(e,e.canvas,"webglcontextrestored",()=>{if(e.contextLost=!1,!Sm(e)){e.contextLost=!0,e.drawError="WebGL context restore failed",kr(e);return}e.drawError=null,De(e)}),typeof ResizeObserver<"u"&&(e.resizeObserver=new ResizeObserver(t),e.resizeObserver.observe(e.element)),typeof MutationObserver<"u"){let n=()=>{let a=e.element.style;return`${a.transform}|${a.translate}|${a.rotate}|${a.scale}|${a.left}|${a.top}|${a.width}|${a.height}`},i=n(),r=!1,o=new MutationObserver(()=>{r||n()!==i&&(r=!0,requestAnimationFrame(()=>{r=!1,i=n(),De(e)}))});o.observe(e.element,{attributes:!0,attributeFilter:["style"]}),e.cleanup.push(()=>o.disconnect())}}function Bm(e){if(!e.destroyed){e.destroyed=!0,Pm(e),e.resizeObserver?.disconnect();for(let t of e.cleanup)t();e.cleanup.length=0,e.canvas.remove(),Al(e),kr(e),e.touchedParent&&(e.parentInlinePosition===null?e.touchedParent.style.removeProperty("position"):e.touchedParent.style.position=e.parentInlinePosition)}}function Hm(e){let t=document.createElement("canvas");return e.id&&(t.id=`${Jo}${e.id}`),t.className=um,t.setAttribute(lm,"true"),t.setAttribute("data-hyperframes-ignore",""),t.setAttribute("data-hyperframes-picker-ignore",""),t.setAttribute("data-hf-ignore",""),t.setAttribute("aria-hidden","true"),t.style.pointerEvents="none",t.style.display="none",e.parentNode?.insertBefore(t,e.nextSibling),t}function Cl(){let e=new WeakMap,t=new Set,n=null,i=!1,r=(y,b,A)=>{let _=e.get(y);if(_)return _.grading=b,_.source=A,De(_),y instanceof HTMLVideoElement&&!y.paused&&dn(_),!0;let M=Hm(y),G=yl(M);if(!G)return M.remove(),!1;let D={element:y,canvas:M,gl:G.gl,program:G.program,grading:b,compare:{...cn},lut:null,lutLoadingSrc:null,lutError:null,drawError:null,effectTargets:null,effectError:null,source:A,animationFrame:null,videoFrameHandle:null,resizeObserver:null,cleanup:[],touchedParent:null,parentInlinePosition:null,sourceHidden:!1,sourceInlineOpacity:null,sourceInlineOpacityPriority:"",sourceOpacityForCanvas:window.getComputedStyle(y).opacity||"1",sourceVisibleForCanvas:window.getComputedStyle(y).visibility!=="hidden",hasDrawn:!1,contextLost:!1,grainSeed:bm(y),destroyed:!1};return e.set(y,D),t.add(y),Om(D),De(D),y instanceof HTMLVideoElement&&!y.paused&&dn(D),!0},o=(y,b)=>{if(i)return!1;let A=Rr(y);if(!A)return!1;let _=e.get(A);if(!_){let M=Nr(A);if(!Gt(M)||!r(A,M,"attribute"))return!1;_=e.get(A)}return _?(_.compare=gm(b),De(_),!0):!1},a=y=>{let b=e.get(y);b&&(Bm(b),e.delete(y),t.delete(y))},c=()=>{if(i)return 0;let y=new Set;document.querySelectorAll(`video[${Ve}], img[${Ve}]`).forEach(A=>{if(!ft(A))return;y.add(A);let _=Nr(A);Gt(_)?r(A,_,"attribute"):a(A)});for(let A of Array.from(t)){let _=e.get(A);_&&(!A.isConnected||_.source==="attribute"&&!y.has(A))&&a(A)}return t.size},s=()=>{if(i)return 0;let y=0;for(let b of Array.from(t,A=>e.get(A)))b&&De(b)&&(y+=1);return y},l=(y,b)=>{if(i)return!1;let A=Rr(y);if(!A)return!1;let _=ki(b);return Gt(_)?r(A,_,"live"):(a(A),!0)},f=(y,b)=>{if(!ft(y))return!1;let A=e.get(y);return A?(A.sourceVisibleForCanvas=b,!0):!1},p=y=>{let b=Rr(y);if(!b)return{state:"missing",message:"Media not found"};let A=e.get(b);if(A)return A.effectError?{state:"unavailable",message:A.effectError}:A.drawError?{state:"unavailable",message:A.drawError}:A.lutError?{state:"unavailable",message:`LUT error: ${A.lutError}`}:A.grading.lut&&A.lutLoadingSrc?{state:"pending",message:"Loading LUT"}:A.canvas.style.display==="none"?{state:"pending",message:"Waiting for media frame"}:{state:"active",message:A.lut?"Shader + LUT active":"Shader active"};let _=Nr(b);return Gt(_)?{state:"unavailable",message:"WebGL unavailable"}:{state:"inactive",message:"No grading applied"}},d=()=>{if(!i){i=!0,n?.disconnect(),n=null;for(let y of Array.from(t))a(y)}};document.body&&(n=new MutationObserver(()=>c()),n.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[Ve]}));let x={refresh:c,redraw:s,setGrading:l,setCompare:o,setSourceVisibility:f,getStatus:p,destroy:d},S=window;return S.__hf=S.__hf||{},S.__hf.colorGrading=x,c(),x}var Xn=class{constructor(t){me(this,"_baseTime",0);me(this,"_playStartMs",null);me(this,"_rate",1);me(this,"_duration",1/0);me(this,"_nowMs");me(this,"_audioSource",null);this._baseTime=t?.initialTime??0,this._rate=t?.rate??1,this._duration=t?.duration??1/0,this._nowMs=t?.nowMs??(()=>performance.now())}now(){if(this._playStartMs===null)return this._baseTime;if(this._audioSource){let i=null;if("currentTimeSeconds"in this._audioSource)i=this._audioSource.currentTimeSeconds;else{let{el:r,compositionStart:o,mediaStart:a}=this._audioSource;!r.paused&&Number.isFinite(r.currentTime)&&(i=(r.currentTime-a)/(r.playbackRate>0?r.playbackRate:1)*this._rate+o)}if(i!==null)return Number.isFinite(this._duration)&&i>=this._duration?this._duration:Math.max(0,i)}let t=(this._nowMs()-this._playStartMs)/1e3,n=this._baseTime+t*this._rate;return Number.isFinite(this._duration)&&n>=this._duration?this._duration:Math.max(0,n)}play(){return this._playStartMs!==null||Number.isFinite(this._duration)&&this._baseTime>=this._duration?!1:(this._playStartMs=this._nowMs(),!0)}pause(){return this._playStartMs===null?!1:(this._baseTime=this.now(),this._playStartMs=null,!0)}seek(t){let n=Number.isFinite(this._duration)?Math.max(0,Math.min(t,this._duration)):Math.max(0,t);this._baseTime=n,this._playStartMs!==null&&(this._playStartMs=this._nowMs())}isPlaying(){return this._playStartMs!==null}setRate(t){let n=Number.isFinite(t)&&t>0?Math.max(.1,Math.min(5,t)):1;this._playStartMs!==null&&(this._baseTime=this.now(),this._playStartMs=this._nowMs()),this._rate=n}getRate(){return this._rate}setDuration(t){this._duration=Number.isFinite(t)&&t>0?t:1/0,this._baseTime>this._duration&&(this._baseTime=this._duration)}getDuration(){return this._duration}attachAudioSource(t){this._audioSource=t}detachAudioSource(){this._audioSource&&this._playStartMs!==null&&(this._baseTime=this.now(),this._playStartMs=this._nowMs()),this._audioSource=null}hasAudioSource(){return this._audioSource!==null}getSource(){if(this._audioSource&&this._playStartMs!==null){if("currentTimeSeconds"in this._audioSource)return"audio";let{el:t}=this._audioSource;if(!t.paused&&Number.isFinite(t.currentTime))return"audio"}return"monotonic"}snapshot(){return{time:this.now(),playing:this.isPlaying(),rate:this._rate,duration:this._duration,source:this.getSource()}}reachedEnd(){return Number.isFinite(this._duration)&&this.now()>=this._duration}};function _l(e){return!Number.isFinite(e)||e<=0?1:e}function Gm(e,t){t||e.paused||!yn().__hfDebug||console.debug("[hyperframes] webAudioTransport claimed fallback-playing element:",e.currentSrc||e.getAttribute("src")||"")}function Um(e,t){let{elapsed:n,mediaStart:i,scheduledAt:r,safeRate:o,clipDuration:a}=t,c=Number.isFinite(a)&&a>0,s=a*o;if(n>=0){let f=s-n;return c&&f<=0?!1:(c?e.start(0,n+i,f):e.start(0,n+i),!0)}let l=-n/o;return c?e.start(r+l,i,s):e.start(r+l,i),!0}var Qn=class{constructor(){me(this,"_ctx",null);me(this,"_bufferCache",new Map);me(this,"_failedSrcs",new Set);me(this,"_activeSources",[]);me(this,"_masterGain",null);me(this,"_rateAnchorCtx",0);me(this,"_rateAnchorComp",0);me(this,"_rate",1);me(this,"_paused",!0);me(this,"_playGeneration",0)}async init(){try{return this._ctx=new AudioContext,this._masterGain=this._ctx.createGain(),this._masterGain.connect(this._ctx.destination),!0}catch{return!1}}get context(){return this._ctx}getTime(){return!this._ctx||this._paused?-1:this._rateAnchorComp+(this._ctx.currentTime-this._rateAnchorCtx)*this._rate}async decodeAudioElement(t){let n=t.currentSrc||t.getAttribute("src");if(!n)return null;if(this._bufferCache.has(n))return this._bufferCache.get(n);if(this._failedSrcs.has(n)||!this._ctx)return null;let i;try{let r=await fetch(n,{cache:"no-store"});if(!r.ok)return T("webAudioTransport.fetch",new Error(`${r.status} ${n}`)),null;i=await r.arrayBuffer()}catch(r){return T("webAudioTransport.fetch",r),null}try{let r=await this._ctx.decodeAudioData(i);return this._bufferCache.set(n,r),r}catch(r){return this._failedSrcs.add(n),T("webAudioTransport.decode",r),null}}startGeneration(){return this._playGeneration+=1,this._playGeneration}currentGeneration(){return this._playGeneration}async schedulePlayback(t,n,i,r,o,a,c,s=1,l=Number.POSITIVE_INFINITY){if(!this._ctx||!this._masterGain||c!==this._playGeneration)return null;try{if(this._ctx.state==="suspended"&&await this._ctx.resume(),c!==this._playGeneration)return null;let f=_l(s),p=this._ctx.createBufferSource();p.buffer=n,p.playbackRate.value=f;let d=this._ctx.createGain();d.gain.value=a,p.connect(d),d.connect(this._masterGain);let x=o-i,S=this._ctx.currentTime;if(this._rate=f,this._rateAnchorCtx=S,this._rateAnchorComp=o,!Um(p,{elapsed:x,mediaStart:r,scheduledAt:S,safeRate:f,clipDuration:l}))return p.disconnect(),d.disconnect(),null;let y=t.muted;t.muted=!0,Gm(t,y);let b={el:t,sourceNode:p,gainNode:d,compositionStart:i,mediaStart:r,scheduledAt:S,priorMuted:y,bounded:Number.isFinite(l)&&l>0};return this._activeSources.push(b),this._paused=!1,p.addEventListener("ended",()=>{let A=this._activeSources.indexOf(b);A!==-1&&(this._activeSources.splice(A,1),t.muted=y,this._activeSources.length===0&&(this._paused=!0))}),b}catch(f){return T("webAudioTransport.schedule",f),null}}setRate(t){let n=_l(t);if(n===this._rate)return!1;this._ctx&&!this._paused&&(this._rateAnchorComp=this.getTime(),this._rateAnchorCtx=this._ctx.currentTime),this._rate=n;for(let i of this._activeSources)try{i.sourceNode.playbackRate.value=n}catch(r){T("webAudioTransport.setRate",r)}return!0}hasBoundedActiveSources(){return this._activeSources.some(t=>t.bounded)}stopAll(){for(let t of this._activeSources){try{t.sourceNode.stop(),t.sourceNode.disconnect(),t.gainNode.disconnect()}catch{}t.el.muted=t.priorMuted}this._activeSources=[],this._paused=!0}setVolume(t){this._masterGain&&(this._masterGain.gain.value=Math.max(0,Math.min(1,t)))}setElementVolume(t,n){let i=Math.max(0,Math.min(1,n));for(let r of this._activeSources)if(r.el===t)try{r.gainNode.gain.value=i}catch(o){T("webAudioTransport.setElementVolume",o)}}setMuted(t){this._masterGain&&(this._masterGain.gain.value=t?0:1)}isActive(){return this._activeSources.length>0&&!this._paused}ownsElement(t){return!this._paused&&this._activeSources.some(n=>n.el===t)}destroy(){if(this.stopAll(),this._bufferCache.clear(),this._failedSrcs.clear(),this._ctx)try{this._ctx.close()}catch{}this._ctx=null,this._masterGain=null}};var Fl="data-hf-studio-manual-edit-gesture";function Tl(e){return!Number.isInteger(e.tick)||e.tick<=0||e.tick%60!==0?!1:!(e.isPlaying&&e.hasCapturedTimeline&&e.currentTimeSeconds<2)}var Ir="data-hf-authored-duration",Pr="data-hf-authored-end",vl=!1;function qe(e){if(e){if(typeof e.pause!="function"){vl||(vl=!0,Je("timeline_missing_pause",{}));return}try{e.pause()}catch(t){T("runtime.timeline.pause",t)}}}function Wm(){let e=window.__HF_EXPORT_RENDER_SEEK_CONFIG,t=e?.fps,n=e?.fpsSource,i=Number(t);return!e||t==null?{fps:null,source:"default",rawFpsSource:n,rawFps:t,fallbackReason:"missing"}:!Number.isFinite(i)||i<=0?{fps:null,source:"default",rawFpsSource:n,rawFps:t,fallbackReason:"invalid"}:{fps:i,source:n==="render-options"||n==="default"?n:"unknown",rawFpsSource:n,rawFps:t,fallbackReason:e.fpsFallbackReason}}function Ml(){let e=rs();qn(document),Tr(document);let t=Wm();e.canonicalFps=t.fps??e.canonicalFps,co(e.canonicalFps),window.__HF_EXPORT_RENDER_SEEK_CONFIG&&console.info("[hyperframes] render runtime fps",{canonicalFps:e.canonicalFps,source:t.source,rawFpsSource:t.rawFpsSource,rawFps:t.rawFps,fallbackReason:t.fallbackReason});let n=null,i=null,r=null,o=[],a=new Set,c=null;if(typeof window.__hfRuntimeTeardown=="function")try{window.__hfRuntimeTeardown()}catch(u){T("runtime.init.site1",u)}let s=new Xn;e.transportClock=s;let l=new Qn,f=!1;l.init().then(u=>{f=u}),(()=>{let u=window.gsap,m=window;if(!(!u?.registerPlugin||m.__hfAutoNoopRegistered))try{u.registerPlugin({name:"_auto",init:()=>!1}),m.__hfAutoNoopRegistered=!0}catch{}})(),document.documentElement&&(document.documentElement.style.margin="0",document.documentElement.style.padding="0",document.documentElement.style.overflow="hidden"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden");try{bo(document)}catch(u){T("runtime.init.cssVariables",u)}window.__timelines=window.__timelines||{};let d=()=>{let u=document.querySelector(\'[data-composition-id][data-root="true"]\');if(u instanceof HTMLElement)return u;let m=Array.from(document.querySelectorAll("[data-composition-id]"));return m.find(g=>!g.parentElement?.closest("[data-composition-id]"))??m[0]??null};if(Array.isArray(window.__timelines)){let u=window.__timelines,m=d()?.getAttribute("data-composition-id")??"root",g={};if(u.length===1)g[m]=u[0];else for(let h=0;h<u.length;h++)g[`tl-${h}`]=u[h];window.__timelines=g}let x=d();x&&!x.hasAttribute("data-start")&&x.setAttribute("data-start","0");let S=u=>{o.push(u)},y=(u,m,g)=>{let h=g??`${u}:${JSON.stringify(m)}`;a.has(h)||(a.add(h),he({source:"hf-preview",type:"diagnostic",code:u,details:m}))},b=u=>{let m={scale:1,focusX:960,focusY:540},g=[],h=[],E={time:u.getTime(),duration:u.getDuration(),isPlaying:u.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:u.play,pause:u.pause,seek:u.seek,getTime:u.getTime,getDuration:u.getDuration,isPlaying:u.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>m,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>g,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:u.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>h,getRenderState:()=>({...E,time:u.getTime(),duration:u.getDuration(),isPlaying:u.isPlaying()})}},A=1/60,_=.75,M=.05,G=100,D=240,v=u=>{if(u instanceof Error)return u.message||String(u);if(typeof u=="string")return u;try{return JSON.stringify(u)}catch{return String(u??"")}},w=u=>{let m=u.toLowerCase();return m.includes("cannot read properties of null")||m.includes("cannot set properties of null")?{code:"runtime_null_dom_access",category:"dom-null-access"}:m.includes("failed to execute \'queryselector\'")?{code:"runtime_invalid_selector",category:"selector-invalid"}:m.includes("is not defined")?{code:"runtime_reference_missing",category:"reference-missing"}:{code:"runtime_script_error",category:"script-error"}},C=u=>{if(u==null||u.trim()==="")return null;let m=Number.parseFloat(u);return!Number.isFinite(m)||m<=0?null:`${m}px`},F=()=>d(),R=()=>{let u=F();if(!u)return;let m=C(u.getAttribute("data-width")),g=C(u.getAttribute("data-height"));m&&(u.style.width=m),g&&(u.style.height=g),m&&u.style.setProperty("--comp-width",m),g&&u.style.setProperty("--comp-height",g)},L=()=>{let u=F(),m=Array.from(document.querySelectorAll("[data-composition-id]")).filter(g=>g.hasAttribute("data-duration")||g.hasAttribute("data-end"));for(let g of m){if(u&&g===u)continue;let h=g.getAttribute("data-duration"),E=g.getAttribute("data-end");h!=null&&!g.hasAttribute(Ir)&&g.setAttribute(Ir,h),E!=null&&!g.hasAttribute(Pr)&&g.setAttribute(Pr,E),g.removeAttribute("data-duration"),g.removeAttribute("data-end")}},z=()=>{let u=F();if(!u)return;u.style.position||(u.style.position="relative"),u.style.overflow="hidden";let m=C(u.getAttribute("data-width")),g=C(u.getAttribute("data-height"));m&&(u.style.width=m),g&&(u.style.height=g);let h=Array.from(u.children);for(let E of h){let N=E.tagName.toLowerCase();if(N==="script"||N==="style"||N==="link"||N==="meta"||!E.hasAttribute("data-start")||E.hasAttribute("data-hf-autostamped"))continue;let O=(E.style.top==="0px"||E.style.top==="0")&&(E.style.left==="0px"||E.style.left==="0")&&E.style.width==="100%"&&E.style.height==="100%",ee=/translate\\(\\s*-50%\\s*,\\s*-50%\\s*\\)/.test(E.style.transform);if(O&&ee&&!E.hasAttribute("data-width")&&!E.hasAttribute("data-height")){let ye=E.style.top,kt=E.style.left,Se=E.style.width,Dt=E.style.height;E.style.top="",E.style.left="",E.style.width="",E.style.height="";let ne=window.getComputedStyle(E);ne.top!=="auto"||ne.bottom!=="auto"||ne.left!=="auto"||ne.right!=="auto"||ne.width!=="0px"||ne.height!=="0px"||(E.style.top=ye,E.style.left=kt,E.style.width=Se,E.style.height=Dt)}let K=window.getComputedStyle(E),de=K.position;if(de!=="absolute"&&de!=="fixed"&&(E.style.position="absolute"),!!E.style.top||!!E.style.bottom||K.top!=="auto"||K.bottom!=="auto"||(E.style.top="0"),!!E.style.left||!!E.style.right||K.left!=="auto"||K.right!=="auto"||(E.style.left="0"),N!=="audio"){let ye=C(E.getAttribute("data-width")),kt=C(E.getAttribute("data-height")),Se=K.width!=="0px"&&K.width!=="auto",Dt=K.height!=="0px"&&K.height!=="auto";ye?!E.style.width&&!Se&&(E.style.width=ye):!E.style.width&&K.width==="0px"&&(E.style.width="100%"),kt?!E.style.height&&!Dt&&(E.style.height=kt):!E.style.height&&K.height==="0px"&&(E.style.height="100%")}}},P=(u,m=0,g)=>Ye({timelineRegistry:window.__timelines??{},includeAuthoredTimingAttrs:g?.includeAuthoredTimingAttrs??!0}).resolveStartForElement(u,m),X=(u,m)=>Ye({timelineRegistry:window.__timelines??{},includeAuthoredTimingAttrs:m?.includeAuthoredTimingAttrs??!0}).resolveDurationForElement(u),I=(u,m=0)=>!u.hasAttribute("data-hf-auto-start")&&u.hasAttribute("data-start")?Math.max(0,Number(u.getAttribute("data-start")??0)||0)+m:P(u,m),ie=(u,m)=>{let g=u.tagName.toLowerCase();if(g==="script"||g==="style"||g==="link"||g==="meta")return!1;let h=g==="video"||g==="audio"?I(u,0):P(u,0),E=X(u),N=u.getAttribute("data-composition-id");if(N){let ee=(window.__timelines??{})[N],K=null;if(ee&&typeof ee.duration=="function"){let ge=Number(ee.duration());Number.isFinite(ge)&&ge>0&&(K=ge)}!(u.hasAttribute("data-duration")||u.hasAttribute("data-end")||u.hasAttribute(Ir)||u.hasAttribute(Pr))&&(E==null||E<=0)&&K!=null&&(E=K)}let O=E!=null&&E>0?h+E:Number.POSITIVE_INFINITY;return m>=h&&(Number.isFinite(O)?m<O:!0)},Fe=!!document.querySelector("[data-composition-src]"),j=!1;{let u=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let m of u){let g=m.getAttribute("data-composition-id");if(g&&m.children.length===0&&document.querySelector(`template#${CSS.escape(g)}-template`)){j=!0;break}}}let Y=!Fe&&!j,B=u=>{if(!u||typeof u.duration!="function")return null;try{let m=Number(u.duration());return Number.isFinite(m)?Math.max(0,m):null}catch{return null}},V=u=>typeof u=="number"&&Number.isFinite(u)&&u>A,Ae=u=>{let m=Number(u.getAttribute("data-duration"));if(Number.isFinite(m)&&m>0)return m;let g=Number(u.getAttribute("data-playback-start")??u.getAttribute("data-media-start")??"0"),h=Number.isFinite(g)?Math.max(0,g):0;return Number.isFinite(u.duration)&&u.duration>h?Math.max(0,u.duration-h):null},U=()=>{let u=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(u.length===0)return null;let m=0;for(let g of u){let h=I(g,0);if(!Number.isFinite(h))continue;let E=Ae(g);E==null||E<=A||(m=Math.max(m,Math.max(0,h)+E))}return m>A?m:null},k=()=>{let u=F();if(!u)return null;let m=window.__timelines??{},g=Ye({timelineRegistry:m,includeAuthoredTimingAttrs:!0}),h=0,E=Number.parseFloat(u.getAttribute("data-duration")??"");Number.isFinite(E)&&E>0&&(h=E);let N=Array.from(u.querySelectorAll("[data-composition-id][data-start]"));for(let O of N){if(!(O instanceof Element)||O.parentElement?.closest("[data-composition-id]")!==u)continue;let K=g.resolveStartForElement(O,0),de=g.resolveDurationForElement(O);!Number.isFinite(K)||de==null||de<=0||(h=Math.max(h,Math.max(0,K)+de))}return h>A?h:null},H=()=>{let u=U();return typeof u!="number"||!Number.isFinite(u)||u<=A?null:u},ae=u=>V(u)?Math.max(A,u*_):A,oe=()=>{let u=0;for(let m of e.deterministicAdapters){let g=m.getInferredDurationSeconds;if(typeof g!="function")continue;let h=null;try{h=g()}catch(E){T("runtime.init.adapterDuration",E)}typeof h=="number"&&Number.isFinite(h)&&h>0&&(u=Math.max(u,h))}return u>A?u:null},W=(u,m=0)=>{let g=B(u),h=H(),E=k(),N=oe(),O=Math.max(h??0,E??0,N??0),ee=Number.isFinite(m)&&m>A?m:0,K=0;return V(g)?K=Math.max(g,O,ee):V(O)?K=Math.max(O,ee):K=ee,K>0?Math.max(0,K):0},q=()=>{let u=window.__timelines??{},m=ne=>{let Q=Object.entries(u).filter(re=>!!re[1]&&typeof re[1].play=="function"&&typeof re[1].pause=="function");if(Q.length!==1)return{timeline:null};let ce=Q[0];if(!ce)return{timeline:null};let[fe,pe]=ce;return{timeline:pe,selectedTimelineIds:[fe],selectedDurationSeconds:B(pe),diagnostics:{code:"root_timeline_sole_registered_fallback",details:{reason:ne,soleTimelineId:fe}}}},g=Ye({timelineRegistry:u,includeAuthoredTimingAttrs:!0}),h=H(),E=k(),N=Math.max(h??0,E??0)||null,O=ae(N),ee=ne=>{let Q=document.querySelector(`[data-composition-id="${CSS.escape(ne)}"]`);return Q?g.resolveStartForElement(Q,0):0},K=ne=>{let Q=window.gsap;if(!Q||typeof Q.timeline!="function")return null;let ce=Q.timeline({paused:!0});for(let fe of ne)ce.add(fe.timeline,ee(fe.compositionId));return ce},de=(ne,Q)=>{if(!V(ne))return null;let ce=window.gsap;if(!ce||typeof ce.timeline!="function")return null;let fe=ce.timeline({paused:!0});if(Q)try{fe.add(Q,0)}catch(re){T("runtime.init.site2",re)}let pe=fe;if(typeof pe.to=="function")try{pe.to({},{duration:ne})}catch(re){T("runtime.init.site3",re)}return fe},ge=(ne,Q)=>{let ce=ne;if(typeof ce.getChildren!="function")return[];try{let fe=ce.getChildren(!0,!0,!0)??[];if(!Array.isArray(fe))return[];let pe=[];for(let re of Q)if(!fe.some(Re=>Re===re.timeline))try{let Re=ee(re.compositionId);ne.add(re.timeline,Re),pe.push(re.compositionId)}catch(Re){T("runtime.init.site4",Re)}return pe}catch{return[]}},le=F(),te=le?.getAttribute("data-composition-id")??null;if(!te)return m("root_missing_composition_id");let ye=u[te]??null,Se=(()=>{if(!le)return[];let ne=new Set,Q=Array.from(le.querySelectorAll("[data-composition-id]")),ce=[];for(let fe of Q){let pe=fe.getAttribute("data-composition-id");if(!pe||pe===te||ne.has(pe))continue;ne.add(pe);let re=u[pe]??null;if(!re||typeof re.play!="function"||typeof re.pause!="function")continue;let _e=B(re);ce.push({compositionId:pe,timeline:re,durationSeconds:_e??0})}return ce})(),Dt=ne=>{for(let Q of ne){let ce=Q.timeline;if(typeof ce.paused=="function")try{ce.paused(!1)}catch(fe){T("runtime.init.site5",fe)}}};if(Se.length>0&&Dt(Se),ye){let ne=Se.length>0?ge(ye,Se):[];if((Se.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id=\'"+te+"\'])"))&&($=!0),ne.length>0)try{let re=ye.time();ye.seek(re,!1)}catch{}let Q=B(ye);if(!V(Q)&&Se.length>0){let re=Se.map(bu=>bu.compositionId),_e=K(Se),Re=B(_e);if(_e&&V(Re))return{timeline:_e,selectedTimelineIds:re,selectedDurationSeconds:Re,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:te,rootDurationSeconds:Q,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:O,selectedDurationSeconds:Re,mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:E,selectedTimelineIds:re,autoNestedChildren:ne}}};let mi=de(N??0,ye),pi=B(mi);if(mi&&V(pi))return{timeline:mi,selectedTimelineIds:[te],selectedDurationSeconds:pi,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:te,rootDurationSeconds:Q,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:E,selectedDurationSeconds:pi,selectedTimelineIds:[te],autoNestedChildren:ne}}}}if(!V(Q)&&Se.length===0){let re=de(N??0,ye),_e=B(re);if(re&&V(_e))return{timeline:re,selectedTimelineIds:[te],selectedDurationSeconds:_e,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:te,rootDurationSeconds:Q,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:h,authoredCompositionDurationFloorSeconds:E,selectedDurationSeconds:_e,selectedTimelineIds:[te]}}}}let ce=le?.getAttribute("data-duration"),fe=ce?parseFloat(ce):null,pe=Math.max(V(fe)?fe:0,E??0);if(pe>0&&V(pe)&&V(Q)&&pe>=Q+.5){let re=ye;if(typeof re.to=="function")try{re.to({},{duration:0},pe)}catch(Re){T("runtime.init.site6",Re)}let _e=B(ye);if(V(_e))return{timeline:ye,selectedTimelineIds:[te],selectedDurationSeconds:_e,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:te,rootDurationSeconds:Q,rootDeclaredDur:fe,authoredCompositionDurationFloorSeconds:E,newDur:_e}}}}return{timeline:ye,selectedTimelineIds:[te],selectedDurationSeconds:Q,mediaDurationFloorSeconds:h,diagnostics:ne.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:te,selectedDurationSeconds:Q,autoNestedChildren:ne}}:void 0}}if(Se.length>0){let ne=Se.map(fe=>fe.compositionId),Q=K(Se),ce=B(Q);if(Q)return{timeline:Q,selectedTimelineIds:ne,selectedDurationSeconds:ce,mediaDurationFloorSeconds:h,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:te,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:O,selectedDurationSeconds:ce,mediaDurationFloorSeconds:h,selectedTimelineIds:ne}}}}return m("root_composition_id_unmatched_in_registry")},$=!1,we=()=>{if(!Y)return!1;let u=e.capturedTimeline,m=B(u),g=V(m);if(u&&g&&$)return!1;let h=q();if(!h.timeline)return!1;if(u&&u===h.timeline)return typeof u.timeScale=="function"&&u.timeScale(e.playbackRate),!1;e.capturedTimeline=h.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let E=W(e.capturedTimeline,0);if(E<=0&&typeof e.capturedTimeline.progress=="function"&&(e.capturedTimeline.progress(1,!0),e.capturedTimeline.progress(0,!1),qe(e.capturedTimeline)),E>0){try{s.setDuration(E)}catch{}if(typeof e.capturedTimeline.totalTime=="function"){typeof e.capturedTimeline.progress=="function"&&e.capturedTimeline.progress(1e-4,!0);let O=Math.max(0,e.currentTime||0);e.capturedTimeline.totalTime(O,!1),qe(e.capturedTimeline)}let N=window.__hfStudioManualEditsApply;typeof N=="function"&&N(),qn(document)}if(h.diagnostics&&he({source:"hf-preview",type:"diagnostic",code:h.diagnostics.code,details:h.diagnostics.details}),he({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:h.selectedTimelineIds??[],selectedDurationSeconds:h.selectedDurationSeconds??null,mediaDurationFloorSeconds:h.mediaDurationFloorSeconds??null}}),window.parent!==window){let N=F(),O=E>0?E:0,ee=String(O>0?O:1),K=new Set,de=new Set(document.querySelectorAll("[data-start]")),ge=le=>{let te=le.parentElement;for(;te&&te!==N;){if(de.has(te))return!0;te=te.parentElement}return!1};if(e.capturedTimeline.getChildren)try{for(let le of e.capturedTimeline.getChildren(!0))if(typeof le.targets=="function")for(let te of le.targets())te instanceof HTMLElement&&te!==N&&(te.hasAttribute("data-start")||ge(te)||K.has(te)||(K.add(te),te.setAttribute("data-start","0"),te.setAttribute("data-duration",ee),te.setAttribute("data-hf-autostamped","1")))}catch{}if(N instanceof HTMLElement)for(let le of N.querySelectorAll("[id]"))le instanceof HTMLElement&&le!==N&&(le.hasAttribute("data-start")||ge(le)||K.has(le)||le.tagName==="SCRIPT"||le.tagName==="STYLE"||le.tagName==="LINK"||(K.add(le),le.setAttribute("data-start","0"),le.setAttribute("data-duration",ee),le.setAttribute("data-hf-autostamped","1")))}for(let N of Mt)pn.delete(N),Jr(N);return!0};window.__hfForceTimelineRebind=()=>{$=!1,we(),Xr(e.currentTime)};let Ce=()=>{let u=F();if(!(u instanceof HTMLElement))return;let m=u.getBoundingClientRect(),g=Number(u.getAttribute("data-width")),h=Number(u.getAttribute("data-height")),E=window.getComputedStyle(u),N=Number.isFinite(g)&&g>0&&Number.isFinite(h)&&h>0,O=m.width<=0||m.height<=0||u.clientWidth<=0||u.clientHeight<=0;!N||!O||y("root_stage_layout_zero",{compositionId:u.getAttribute("data-composition-id")??null,declaredWidth:g,declaredHeight:h,rectWidth:Math.round(m.width),rectHeight:Math.round(m.height),clientWidth:u.clientWidth,clientHeight:u.clientHeight,display:E.display,visibility:E.visibility,overflow:E.overflow},`root-stage-layout-zero:${u.getAttribute("data-composition-id")??"unknown"}`)},vt=()=>{e.tornDown||(c!=null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{c=null,Ce()}))},Ue=()=>{i=u=>{let m=v(u.error??u.message).slice(0,D);if(!m)return;let g=w(m);he({source:"hf-preview",type:"diagnostic",code:g.code,details:{category:g.category,message:m,filename:u.filename||null,line:Number.isFinite(u.lineno)?u.lineno:null,column:Number.isFinite(u.colno)?u.colno:null}})},r=u=>{let m=v(u.reason).slice(0,D);if(!m)return;let g=w(m);he({source:"hf-preview",type:"diagnostic",code:`${g.code}_unhandled_rejection`,details:{category:`${g.category}-unhandled-rejection`,message:m}})},window.addEventListener("error",i),window.addEventListener("unhandledrejection",r)},nu=()=>{let u=Array.from(document.querySelectorAll("img, video, audio, source, link[rel=\'stylesheet\']"));for(let g of u){let h=()=>{if(!(g instanceof Element))return;let E=g.tagName.toLowerCase(),N=g.getAttribute("src")??g.getAttribute("href")??g.getAttribute("poster")??null,O=E==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";y(O,{tagName:E,assetUrl:N,currentSrc:(g instanceof HTMLImageElement||g instanceof HTMLMediaElement)&&g.currentSrc||null,readyState:g instanceof HTMLMediaElement?g.readyState:null,networkState:g instanceof HTMLMediaElement?g.networkState:null},`${O}:${E}:${N??"unknown"}`)};g.addEventListener("error",h),S(()=>{g.removeEventListener("error",h)})}let m=document.fonts;m&&m.ready.then(()=>{if(e.tornDown)return;let g=Array.from(m).filter(h=>h.status==="error").map(h=>h.family).filter(h=>!!h).slice(0,10);g.length!==0&&y("runtime_font_load_issue",{failedFamilies:g,totalFaces:Array.from(m).length},`runtime-font-load-issue:${g.join("|")}`)}).catch(()=>{})},iu=(u,m)=>{if(!u.timeline)return!1;let g=e.capturedTimeline;if(g&&g===u.timeline)return!1;let h=Math.max(0,e.currentTime||0),E=e.isPlaying;e.capturedTimeline=u.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{qe(e.capturedTimeline),typeof e.capturedTimeline.seek=="function"&&e.capturedTimeline.seek(h,!1),E&&typeof e.capturedTimeline.play=="function"&&e.capturedTimeline.play()}catch(N){T("runtime.init.site7",N)}return he({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:m,previousTime:h,selectedTimelineIds:u.selectedTimelineIds??[],selectedDurationSeconds:u.selectedDurationSeconds??null,mediaDurationFloorSeconds:u.mediaDurationFloorSeconds??null}}),!0},rt=null,jr=!1,$r=!1,Mt=new Set,pn=new WeakMap,hn=()=>{e.tornDown||(rt!=null&&window.clearTimeout(rt),rt=window.setTimeout(()=>{if(e.tornDown||(rt=null,$r&&window.__HF_EXPORT_RENDER_SEEK_CONFIG))return;let u=q();if(!u.timeline||!V(u.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){we()&&(ot(),Te(!0));return}if(jr)return;let g=B(e.capturedTimeline),h=u.selectedDurationSeconds??B(u.timeline);V(h)&&(!V(g)||h>=g+M)&&iu(u,"manual")&&(jr=!0,he({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:g??null,selectedDurationSeconds:h??null,selectedTimelineIds:u.selectedTimelineIds??[],mediaDurationFloorSeconds:u.mediaDurationFloorSeconds??null}}),ot(),Te(!0))},G))},qr=u=>{u.currentTarget instanceof HTMLMediaElement&&qo(u.currentTarget)},Kr=u=>{u.currentTarget instanceof HTMLMediaElement&&Ko(u.currentTarget)},ru=()=>{for(let u of Mt)u.removeEventListener("loadedmetadata",hn),u.removeEventListener("durationchange",hn),u.removeEventListener("loadedmetadata",qr),u.removeEventListener("error",Kr);Mt.clear()},ri=()=>{if(e.tornDown)return;let u=Array.from(document.querySelectorAll("video, audio"));for(let m of u){if(Mt.has(m))continue;Mt.add(m);let g=Number.parseFloat(m.dataset.volume??"");Number.isFinite(g)&&(m.volume=Math.max(0,Math.min(1,g))),m.addEventListener("loadedmetadata",hn),m.addEventListener("durationchange",hn),m.addEventListener("loadedmetadata",qr),m.addEventListener("error",Kr),$o(m),m.preload!=="auto"&&(m.preload="auto"),m.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&m.load(),Jr(m)}},Jr=u=>{pn.has(u)||Bo(u,e.capturedTimeline,W(e.capturedTimeline,0),pn)},oi=new WeakMap,Yr=u=>{let m=oi.get(u);if(m!==void 0)return m;let g=window.getComputedStyle(u).position,h=g==="static"||g==="relative"||g==="sticky";return oi.set(u,h),h},si=new WeakMap,ou=u=>{let m=si.get(u);if(m!==void 0)return m;let g=u.querySelector("[data-start]")===null;return si.set(u,g),g},su=()=>{oi=new WeakMap,si=new WeakMap},ai=new WeakMap,gn=new WeakSet,Xr=u=>{let m=Array.from(document.querySelectorAll("[data-start]")),g=F();for(let h of m){if(!(h instanceof HTMLElement))continue;if(h.hasAttribute("data-hidden")){gn.has(h)||(ai.set(h,h.style.getPropertyValue("display")),gn.add(h)),h.style.display="none",(h instanceof HTMLVideoElement||h instanceof HTMLImageElement)&&n?.setSourceVisibility(h,!1);continue}if(gn.has(h)){let N=ai.get(h);N?h.style.display=N:h.style.removeProperty("display"),ai.delete(h),gn.delete(h)}let E=ie(h,u);if(E){let N=h.parentElement;for(;N&&N!==g;){if(N instanceof HTMLElement&&N.hasAttribute("data-start")&&!ie(N,u)){E=!1;break}N=N.parentElement}}h.style.visibility=E?"visible":"hidden",(h instanceof HTMLVideoElement||h instanceof HTMLImageElement)&&n?.setSourceVisibility(h,E),E?Yr(h)&&h.style.removeProperty("display"):Yr(h)&&ou(h)&&(h.style.display="none")}},Me=()=>{let u=h=>{let E=h.closest("[data-composition-id]"),N=E?P(E,0):null,O=E?X(E,{includeAuthoredTimingAttrs:!0}):null;return{compositionRoot:E,inheritedStart:N,inheritedDuration:O}},m=Uo({shouldIncludeElement:h=>h.hasAttribute("data-start")||!!u(h).compositionRoot,resolveStartSeconds:h=>{let E=u(h);return I(h,E.inheritedStart??0)},resolveDurationSeconds:h=>{let E=u(h),N=I(h,E.inheritedStart??0),O=Number.parseFloat(h.dataset.playbackStart??h.dataset.mediaStart??"0")||0,ee=E.inheritedStart!=null&&E.inheritedDuration!=null&&E.inheritedDuration>0?Math.max(0,E.inheritedStart+E.inheritedDuration-N):null,K=Number.isFinite(h.duration)&&h.duration>O?Math.max(0,h.duration-O):null,de=Number.parseFloat(h.dataset.duration??""),ge=Number.isFinite(de)&&de>0?de:null;return Go({isVideo:h.tagName==="VIDEO",sourceDuration:K,hostRemaining:ee,explicitDuration:ge})}});for(let h of m.mediaClips){let E=pn.get(h.el);E&&(h.volumeKeyframes=E)}let g=e.mediaForceSyncNextTick;g&&(e.mediaForceSyncNextTick=!1),e.nativeMediaSyncDisabled||Wo({clips:m.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate,outputMuted:e.mediaOutputMuted||!e.webAudioMediaDisabled&&!e.nativeMediaSyncDisabled&&l.isActive(),userMuted:e.bridgeMuted,userVolume:e.bridgeVolume,forceSync:g,onElementVolume:(h,E)=>l.setElementVolume(h,E),isWebAudioOwned:h=>l.ownsElement(h),onAutoplayBlocked:()=>{e.mediaAutoplayBlockedPosted||(e.mediaAutoplayBlockedPosted=!0,he({source:"hf-preview",type:"media-autoplay-blocked"}))}}),Xr(e.currentTime)},Te=u=>{let m=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),g=Date.now();(u||m!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||g-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=m,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=g,he({source:"hf-preview",type:"state",frame:m,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},li="",Qr=0,au=()=>{let u="";for(let m of document.querySelectorAll("[data-start]"))u+=`${m.id}:${m.tagName}|`;return u},ot=()=>{L(),R(),z();let u=F();if(u){let h=C(u.getAttribute("data-width")),E=C(u.getAttribute("data-height")),N=h?parseInt(h,10):0,O=E?parseInt(E,10):0;N>0&&O>0&&he({source:"hf-preview",type:"stage-size",width:N,height:O})}we();let m=fs({canonicalFps:e.canonicalFps});window.__clipManifest=m;let g=au();if(li!==g&&su(),!window.__clipTree||li!==g){let h=window;window.__clipTree=os({startResolver:Ye({timelineRegistry:h.__timelines??{},includeAuthoredTimingAttrs:!0}),timelineRegistry:h.__timelines??{},rootDuration:m.durationInFrames/e.canonicalFps}),li=g}he(m),vt()},ui=u=>Number.isFinite(u)&&u>0?u:0,lu=u=>{let m=ui(Number(u));if(m<=0)return;let g=F(),h=ui(Number.parseFloat(g?.getAttribute("data-duration")??"")),E=Math.max(Qr,ui(s.getDuration()),h);m<=E||(Qr=m,g?.setAttribute("data-duration",String(m)),s.setDuration(m),ot(),Te(!0))},Pe=(u,m=0)=>{for(let g of e.deterministicAdapters){try{u==="discover"&&g.discover(),u==="pause"&&g.pause(),u==="play"&&g.play&&g.play()}catch(h){T("runtime.init.site8",h)}if(u==="discover")try{g.seek({time:m,suppressEvents:!0})}catch(h){T("runtime.init.site9",h)}}},st=()=>{window.__renderReady=!1},Nt=null,Rt=!0,uu=()=>{let u=[];for(let m of e.deterministicAdapters){let g=m.getReadyPromise;if(typeof g=="function")try{let h=g();h&&u.push(h)}catch(h){T("runtime.init.adapterReady",h)}}return u},cu=()=>{let u=uu();if(u.length===0)return Nt=null,Rt=!0,!0;let m=u[0];if(!m)return!0;let g=u.length===1?m:Promise.all(u);return g!==Nt&&(Nt=g,Rt=!1,Promise.resolve(g).then(()=>{Nt===g&&(Rt=!0,st())},h=>{Nt===g&&(Rt=!0,T("runtime.init.adapterReady",h),st())})),Rt};if(Y)Er();else{let u={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,injectedLinks:e.injectedCompLinks,parseDimensionPx:C,onDiagnostic:({code:m,details:g})=>{he({source:"hf-preview",type:"diagnostic",code:m,details:g})}};Za(u).then(()=>Qa(u)).finally(()=>{Y=!0,ri(),nu(),Er(),Tr(document),st()})}let xn=es({postMessage:u=>he(u)});xn.installPickerApi();let We=Cl();n=We,S(()=>{We.destroy(),n=null});let ci=u=>{let m=Number(u);!Number.isFinite(m)||m<=0?e.playbackRate=1:e.playbackRate=Math.max(.1,Math.min(5,m)),e.mediaForceSyncNextTick=!0,e.capturedTimeline&&typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let g=document.querySelectorAll("video, audio");for(let h of g)if(h instanceof HTMLMediaElement)try{h.playbackRate=e.playbackRate}catch(E){T("runtime.init.site10",E)}},Zr={play:()=>{let u=e.capturedTimeline;if(s.isPlaying())return;let m=W(u,0);if(m>0)s.setDuration(m),s.reachedEnd()&&(s.seek(0),e.currentTime=0,at(0));else{let g=F(),h=Number(g?.getAttribute("data-duration")??0);h>0&&s.setDuration(h)}qe(u),s.play()&&(e.isPlaying=!0,e.mediaForceSyncNextTick=!0,oo(s.now()),f&&!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&so(),Pe("play"),Me(),We.redraw(),Te(!0))},pause:()=>{if(!s.isPlaying())return;l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1,e.currentTime=s.now(),e.mediaForceSyncNextTick=!0,oo(e.currentTime);let u=e.capturedTimeline;qe(u),Pe("pause"),Me(),We.redraw(),Te(!0)},seek:(u,m)=>{let g=xt(Math.max(0,Number(u)||0),e.canonicalFps);l.stopAll(),s.detachAudioSource();let h=s.isPlaying();h&&s.pause(),s.seek(g),e.currentTime=s.now(),e.isPlaying=!1,e.mediaForceSyncNextTick=!0;let E=e.capturedTimeline;if(qe(E),at(e.currentTime),Pe("pause"),m?.keepPlaying&&h){Zr.play();return}Me(),We.redraw(),Te(!0)},renderSeek:(u,m)=>{$r=!0;let g=xt(Math.max(0,Number(u)||0),e.canonicalFps);l.stopAll(),s.detachAudioSource(),s.isPlaying()&&s.pause(),s.seek(g),e.currentTime=s.now(),e.isPlaying=!1,e.mediaForceSyncNextTick=!0,at(e.currentTime,{activateChildren:!0,suppressEvents:m?.suppressEvents}),Me(),We.redraw(),Te(!0)},getTime:()=>s.now(),getDuration:()=>{let u=s.getDuration();return Number.isFinite(u)?u:0},isPlaying:()=>s.isPlaying(),setPlaybackRate:u=>{ci(u),s.setRate(e.playbackRate),ao()},getPlaybackRate:()=>e.playbackRate},eo=W(e.capturedTimeline,0);eo>0&&s.setDuration(eo);let Ne=is({getTimeline:()=>e.capturedTimeline,setTimeline:u=>{e.capturedTimeline=u},getTimelineRegistry:()=>window.__timelines??{},getIsPlaying:()=>e.isPlaying,setIsPlaying:u=>{e.isPlaying!==u&&(e.mediaForceSyncNextTick=!0),e.isPlaying=u},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:ci,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(u,m)=>{e.currentTime=Math.max(0,Number(u)||0),e.isPlaying!==m&&(e.mediaForceSyncNextTick=!0),e.isPlaying=m,Me()},onStatePost:Te,onDeterministicSeek:(u,m)=>{for(let g of e.deterministicAdapters)if(!(g.name==="gsap"&&e.capturedTimeline))try{g.seek({time:Number(u)||0,suppressEvents:m?.suppressEvents})}catch(h){T("runtime.init.site11",h)}},onDeterministicPause:()=>Pe("pause"),onDeterministicPlay:()=>Pe("play"),onRenderFrameSeek:()=>{We.redraw()},onShowNativeVideos:()=>{},getSafeDuration:()=>W(e.capturedTimeline,0),transport:Zr});window.__player=b(Ne),window.__playerReady=!0,mo(he),Je("composition_loaded",{duration:Ne.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.deterministicAdapters=[Po(),So({resolveStartSeconds:u=>P(u,0)}),Ao(),Co(),Fo(),To(),vo(),Mo(),No(),Ro(),Lo(),Eo({getTimeline:()=>e.capturedTimeline})],Do(),Io(),window.__hfReseekGpu=u=>{let m=Math.max(0,Number(u)||0);window.__hfThreeTime=m,window.__hfTypegpuTime=m,_o(m)},Ue(),ri(),Pe("discover");let du=()=>{let u=e.capturedTimeline,m=we();e.capturedTimeline&&(m||e.capturedTimeline!==u||!Ne._timeline)&&(Ne._timeline=e.capturedTimeline);let g=W(e.capturedTimeline,0);if(g>0&&s.setDuration(g),Pe("discover",e.currentTime),!e.capturedTimeline){let h=window.__timelines??{},E=Object.keys(h).filter(N=>h[N]);if(E.length>0){let O=F()?.getAttribute("data-composition-id")??null;y("root_timeline_unbound_registry_present",{reason:O?"root data-composition-id has no matching key in window.__timelines":"root composition element has no data-composition-id attribute",rootCompositionId:O,registeredTimelineKeys:E},"root_timeline_unbound_registry_present"),console.warn("[hyperframes] Root timeline not bound \\u2014 render will freeze at t=0. "+(O?`Root data-composition-id is "${O}" but window.__timelines has no such key. `:"Root composition element has no data-composition-id. ")+`Registered timeline keys: [${E.join(", ")}]. Register the root timeline under its data-composition-id (window.__timelines["${O??"<root-id>"}"] = tl).`)}}window.__renderReady=!0,ot(),Te(!0)},mt=null,fu=()=>{if(mt)return;let u=()=>{window.removeEventListener("hf-timelines-built",u),mt=null,st()};mt=u,window.addEventListener("hf-timelines-built",u)};S(()=>{mt&&(window.removeEventListener("hf-timelines-built",mt),mt=null)}),st=()=>{if(!Y){window.__renderReady=!1;return}if(window.__hfTimelinesBuilding){window.__renderReady=!1,fu();return}if(Pe("discover",e.currentTime),!cu()){window.__renderReady=!1;return}du()},st(),Y&&setTimeout(()=>{st()},0);let bn=0,di=!1,mu=(u,m,g,h)=>{try{let E=h?.suppressEvents===!0;qe(u),typeof u.totalTime=="function"?u.totalTime(m,E):u.seek(m,E)}catch(E){T(g,E)}},pu=(u,m)=>{let g=window.__timelines??{},h=F()?.getAttribute("data-composition-id")??null;for(let[E,N]of Object.entries(g)){if(!N||E===h)continue;let O=document.querySelector(`[data-composition-id="${CSS.escape(E)}"]`);if(!O)continue;let ee=P(O,0);if(!Number.isFinite(ee))continue;let K=B(N),de=gt(O)+Math.max(0,u-ee)*Be(O),ge=Math.max(0,K!=null&&K>0?Math.min(K,de):de);mu(N,ge,"runtime.init.transport.childTimeline",m)}},to=u=>{let m=window.__timelines??{};for(let g of Object.values(m))if(!(!g||g===u))try{g.play()}catch(h){T("runtime.init.activateSiblings",h)}},no=u=>typeof u=="object"&&u!==null,Lt=new WeakMap,hu=["onStart","onUpdate","onComplete","onReverseComplete","onRepeat"],io=(u,m)=>{let g=u[m];if(typeof g!="function")return null;try{let h=Number(g.call(u));return Number.isFinite(h)?h:null}catch(h){return T("runtime.init.gsapCallbackDuration",h),null}},gu=u=>{let m=Lt.get(u);if(m!=null)return m;if(!("getChildren"in u)||typeof u.getChildren!="function")return!1;let g;try{g=u.getChildren(!0,!0,!0)}catch(h){return T("runtime.init.gsapCallbackChildren",h),Lt.set(u,!1),!1}if(!Array.isArray(g))return Lt.set(u,!1),!1;for(let h of g){if(!no(h))continue;let E=h.vars;if(!no(E)||!hu.some(K=>typeof E[K]=="function"))continue;let ee=io(h,"totalDuration")??io(h,"duration");if(ee!=null&&ee<=1e-6)return Lt.set(u,!0),!0}return Lt.set(u,!1),!1};function at(u,m){let g=e.capturedTimeline,h=m?.suppressEvents===!0;if(g){m?.activateChildren&&to(g);let E=g,N=u;if(typeof E.totalDuration=="function")try{let O=Number(E.totalDuration());Number.isFinite(O)&&O>0&&u>O&&(N=O)}catch(O){T("runtime.init.transport.clampDuration",O)}try{typeof g.totalTime=="function"?(g.totalTime(N,h),!h&&!gu(g)&&(g.totalTime(N+.001,!0),g.totalTime(N,!0))):g.seek(N,h)}catch(O){T("runtime.init.transport.seek",O)}}pu(u,m),g&&m?.activateChildren&&to(g);for(let E of e.deterministicAdapters)if(!(E.name==="gsap"&&g))try{E.seek({time:u,suppressEvents:h})}catch(N){T("runtime.init.transport.adapter",N)}}let xu=()=>{try{return document.querySelector(`[${Fl}]`)!=null}catch{return!1}},ro=()=>{if(!(e.tornDown||di)){di=!0;try{if(e.transportRafId=window.requestAnimationFrame(ro),bn+=1,Tl({tick:bn,isPlaying:s.isPlaying(),hasCapturedTimeline:e.capturedTimeline!=null,currentTimeSeconds:s.now()})){let m=e.capturedTimeline;if(we()){e.capturedTimeline&&!Ne._timeline&&(Ne._timeline=e.capturedTimeline),e.capturedTimeline&&e.capturedTimeline!==m&&qe(e.capturedTimeline);let g=W(e.capturedTimeline,0);g>0&&s.setDuration(g),ot()}}if(bn%20===0&&ot(),bn%30===0&&ri(),e.capturedTimeline){let m=W(e.capturedTimeline,0);m>0&&(!s.isPlaying()||m>=s.getDuration())&&s.setDuration(m)}if(s.isPlaying()&&!e.mediaOutputMuted)if(!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&l.isActive()&&l.context){let m=l.getTime();m>=0&&s.attachAudioSource({currentTimeSeconds:m})}else{let m=document.querySelectorAll("audio[data-start]"),g=!1;for(let h of m){if(!(h instanceof HTMLMediaElement)||!h.isConnected)continue;let E=Number.parseFloat(h.dataset.start??""),N=Number.parseFloat(h.dataset.duration??""),O=Number.isFinite(N)&&N>0?E+N:1/0,ee=Number.parseFloat(h.dataset.playbackStart??h.dataset.mediaStart??"0")||0;if(Number.isFinite(E)&&e.currentTime>=E&&e.currentTime<O){h.paused?!h.error&&h.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&(s.attachAudioSource({currentTimeSeconds:e.currentTime}),g=!0):(s.attachAudioSource({el:h,compositionStart:E,mediaStart:ee}),g=!0);break}}!g&&s.hasAudioSource()&&s.detachAudioSource()}else s.hasAudioSource()&&s.detachAudioSource();let u=s.now();if(e.currentTime=u,(s.isPlaying()||!xu())&&at(u),s.isPlaying()&&s.reachedEnd()){l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1;let m=s.getDuration();Number.isFinite(m)&&(s.seek(m),e.currentTime=m,at(m)),Pe("pause"),Me(),Te(!0);return}s.isPlaying()&&Me(),Te(!1)}finally{di=!1}}},oo=u=>{let m=document.querySelectorAll("video, audio");for(let g of m){if(!(g instanceof HTMLMediaElement)||!g.isConnected)continue;let h=Number.parseFloat(g.dataset.start??"");if(!Number.isFinite(h))continue;let E=Number.parseFloat(g.dataset.duration??""),N=Number.isFinite(E)&&E>0?h+E:1/0;if(u<h||u>=N)continue;let O=Number.parseFloat(g.dataset.playbackStart??g.dataset.mediaStart??"0")||0,ee=u-h+O;if(ee>=0)try{g.currentTime=ee}catch{}}},so=()=>{if(e.nativeMediaSyncDisabled||e.webAudioMediaDisabled)return;let u=l.startGeneration(),m=document.querySelectorAll("audio[data-start]");for(let g of m){if(!(g instanceof HTMLMediaElement)||!g.isConnected)continue;let h=Number.parseFloat(g.dataset.start??"");if(!Number.isFinite(h))continue;let E=Number.parseFloat(g.dataset.playbackStart??g.dataset.mediaStart??"0")||0,N=Number.parseFloat(g.dataset.volume??""),O=Number.isFinite(N)?N:1,ee=Number.parseFloat(g.dataset.duration??""),K=Number.isFinite(ee)&&ee>0?ee:Number.POSITIVE_INFINITY,de=g.closest("[data-composition-id]");if(de){let ge=P(de,0),le=X(de,{includeAuthoredTimingAttrs:!0});le!=null&&le>0&&(K=Math.min(K,Math.max(0,ge+le-h)))}l.decodeAudioElement(g).then(ge=>{!ge||!s.isPlaying()||l.schedulePlayback(g,ge,h,E,s.now(),O*e.bridgeVolume,u,e.playbackRate,K)})}};function ao(){l.setRate(e.playbackRate)&&!e.nativeMediaSyncDisabled&&!e.webAudioMediaDisabled&&f&&s.isPlaying()&&l.hasBoundedActiveSources()&&(l.stopAll(),so())}if(e.capturedTimeline){let u=W(e.capturedTimeline,0);u>0&&s.setDuration(u),qe(e.capturedTimeline)}ol(window),e.transportRafId=window.requestAnimationFrame(ro),ot(),Te(!0),e.controlBridgeHandler=fo({onPlay:()=>{Ne.play(),Je("composition_played",{time:Ne.getTime()})},onPause:()=>{Ne.pause(),Je("composition_paused",{time:Ne.getTime()})},onStopMedia:()=>{l.stopAll();let u=document.querySelectorAll("video, audio");for(let m of u)m instanceof HTMLMediaElement&&!m.paused&&m.pause()},onSeek:(u,m)=>{Ne.seek(u),Je("composition_seeked",{time:u})},onSetMuted:u=>{e.bridgeMuted=u;let m=u||e.mediaOutputMuted;l.setMuted(m);let g=document.querySelectorAll("video, audio");for(let h of g)h instanceof HTMLMediaElement&&(h.muted=m||h.defaultMuted)},onSetVolume:u=>{e.bridgeVolume=u,l.setVolume(u);let m=document.querySelectorAll("video, audio");for(let g of m){if(!(g instanceof HTMLMediaElement))continue;let h=parseFloat(g.dataset.volume??""),E=Number.isFinite(h)?h:1;g.volume=E*u}},onSetMediaOutputMuted:u=>{e.mediaOutputMuted=u;let m=u||e.bridgeMuted;l.setMuted(m);let g=document.querySelectorAll("video, audio");for(let h of g)h instanceof HTMLMediaElement&&(h.muted=m||h.defaultMuted)},onSetNativeMediaSyncDisabled:u=>{e.nativeMediaSyncDisabled!==u&&(e.nativeMediaSyncDisabled=u,e.mediaForceSyncNextTick=!0,u?(l.stopAll(),s.detachAudioSource()):Me())},onSetWebAudioMediaDisabled:u=>{e.webAudioMediaDisabled!==u&&(e.webAudioMediaDisabled=u,e.mediaForceSyncNextTick=!0,u&&(l.stopAll(),s.detachAudioSource()),Me())},onSetPlaybackRate:u=>{ci(u),e.transportClock&&e.transportClock.setRate(e.playbackRate),ao()},onSetRootDuration:lu,onSetColorGrading:(u,m)=>{We.setGrading(u,m)},onSetColorGradingCompare:(u,m)=>{We.setCompare(u,m)},onTick:()=>{if(e.tornDown||!s.isPlaying())return;let u=s.now();if(e.currentTime=u,at(u),s.reachedEnd()){l.stopAll(),s.detachAudioSource(),s.pause(),e.isPlaying=!1;let m=s.getDuration();Number.isFinite(m)&&(s.seek(m),e.currentTime=m,at(m)),Pe("pause"),Me(),Te(!0)}},onEnablePickMode:()=>xn.enablePickMode(),onDisablePickMode:()=>xn.disablePickMode(),getCanonicalFps:()=>e.canonicalFps});let fi=()=>{if(!e.tornDown){e.tornDown=!0,e.transportRafId!=null&&(window.cancelAnimationFrame(e.transportRafId),e.transportRafId=null),e.transportClock=null,l.destroy(),rt!=null&&(window.clearTimeout(rt),rt=null),c!=null&&(window.cancelAnimationFrame(c),c=null),ru(),e.controlBridgeHandler&&(window.removeEventListener("message",e.controlBridgeHandler),e.controlBridgeHandler=null),i&&(window.removeEventListener("error",i),i=null),r&&(window.removeEventListener("unhandledrejection",r),r=null),e.beforeUnloadHandler&&(window.removeEventListener("beforeunload",e.beforeUnloadHandler),e.beforeUnloadHandler=null),xn.disablePickMode();for(let u of e.deterministicAdapters)if(!(!u||typeof u.revert!="function"))try{u.revert()}catch(m){T("runtime.init.site12",m)}e.deterministicAdapters=[];for(let u of o.splice(0))try{u()}catch(m){T("runtime.init.site13",m)}for(let u of e.injectedCompStyles)try{u.remove()}catch(m){T("runtime.init.site14",m)}e.injectedCompStyles=[];for(let u of e.injectedCompLinks)try{u.remove()}catch(m){T("runtime.init.site15",m)}e.injectedCompLinks=[];for(let u of e.injectedCompScripts)try{u.remove()}catch(m){T("runtime.init.site16",m)}e.injectedCompScripts=[],e.capturedTimeline=null,window.__hfRuntimeTeardown===fi&&(window.__hfRuntimeTeardown=null)}};window.__hfRuntimeTeardown=fi,e.beforeUnloadHandler=fi,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var Nl=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],Or=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Vm(e){if(e<=255)return Nl[e];let t=0,n=Or.length-1;for(;t<=n;){let i=t+n>>1,r=Or[i];if(e<r[0]){n=i-1;continue}if(e>r[1]){t=i+1;continue}return r[2]}return"L"}function zm(e){let t=e.length;if(t===0)return null;let n=new Array(t),i=!1;for(let l=0;l<t;){let f=e.charCodeAt(l),p=f,d=1;if(f>=55296&&f<=56319&&l+1<t){let S=e.charCodeAt(l+1);S>=56320&&S<=57343&&(p=(f-55296<<10)+(S-56320)+65536,d=2)}let x=Vm(p);(x==="R"||x==="AL"||x==="AN")&&(i=!0);for(let S=0;S<d;S++)n[l+S]=x;l+=d}if(!i)return null;let r=0;for(let l=0;l<t;l++){let f=n[l];if(f==="L"){r=0;break}if(f==="R"||f==="AL"){r=1;break}}let o=new Int8Array(t);for(let l=0;l<t;l++)o[l]=r;let a=r&1?"R":"L",c=a,s=c;for(let l=0;l<t;l++)n[l]==="NSM"?n[l]=s:s=n[l];s=c;for(let l=0;l<t;l++){let f=n[l];f==="EN"?n[l]=s==="AL"?"AN":"EN":(f==="R"||f==="L"||f==="AL")&&(s=f)}for(let l=0;l<t;l++)n[l]==="AL"&&(n[l]="R");for(let l=1;l<t-1;l++)n[l]==="ES"&&n[l-1]==="EN"&&n[l+1]==="EN"&&(n[l]="EN"),n[l]==="CS"&&(n[l-1]==="EN"||n[l-1]==="AN")&&n[l+1]===n[l-1]&&(n[l]=n[l-1]);for(let l=0;l<t;l++){if(n[l]!=="EN")continue;let f;for(f=l-1;f>=0&&n[f]==="ET";f--)n[f]="EN";for(f=l+1;f<t&&n[f]==="ET";f++)n[f]="EN"}for(let l=0;l<t;l++){let f=n[l];(f==="WS"||f==="ES"||f==="ET"||f==="CS")&&(n[l]="ON")}s=c;for(let l=0;l<t;l++){let f=n[l];f==="EN"?n[l]=s==="L"?"L":"EN":(f==="R"||f==="L")&&(s=f)}for(let l=0;l<t;l++){if(n[l]!=="ON")continue;let f=l+1;for(;f<t&&n[f]==="ON";)f++;let p=l>0?n[l-1]:c,d=f<t?n[f]:c,x=p!=="L"?"R":"L";if(x===(d!=="L"?"R":"L"))for(let y=l;y<f;y++)n[y]=x;l=f-1}for(let l=0;l<t;l++)n[l]==="ON"&&(n[l]=a);for(let l=0;l<t;l++){let f=n[l];(o[l]&1)===0?f==="R"?o[l]++:(f==="AN"||f==="EN")&&(o[l]+=2):(f==="L"||f==="AN"||f==="EN")&&o[l]++}return o}function Rl(e,t){let n=zm(e);if(n===null)return null;let i=new Int8Array(t.length);for(let r=0;r<t.length;r++)i[r]=n[t[r]];return i}var jm=/[ \\t\\n\\r\\f]+/g,$m=/[\\t\\n\\r\\f]| {2,}|^ | $/;function qm(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Km(e){if(!$m.test(e))return e;let t=e.replace(jm," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Jm(e){return/[\\r\\f]/.test(e)?e.replace(/\\r\\n/g,`\n`).replace(/[\\r\\f]/g,`\n`):e.replace(/\\r\\n/g,`\n`)}var Br=null,Ym;function Xm(){return Br===null&&(Br=new Intl.Segmenter(Ym,{granularity:"word"})),Br}var Qm=/\\p{Script=Arabic}/u,Zn=/\\p{M}/u,Hl=/\\p{Nd}/u;function Ll(e){return Qm.test(e)}function kl(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=44032&&e<=55215||e>=65280&&e<=65519}function Ie(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){let r=(n-55296<<10)+(i-56320)+65536;if(kl(r))return!0;t++;continue}}if(kl(n))return!0}}return!1}function Zm(e){let t=ni(e);return t!==null&&(ti.has(t)||nt.has(t))}var ep=new Set(["\\xA0","\\u202F","\\u2060","\\uFEFF"]);function tp(e){return Ie(e)}function np(e){let t=ni(e);return t!==null&&ep.has(t)}function ei(e){return!Zm(e)&&!np(e)}var ti=new Set(["\\uFF0C","\\uFF0E","\\uFF01","\\uFF1A","\\uFF1B","\\uFF1F","\\u3001","\\u3002","\\u30FB","\\uFF09","\\u3015","\\u3009","\\u300B","\\u300D","\\u300F","\\u3011","\\u3017","\\u3019","\\u301B","\\u30FC","\\u3005","\\u303B","\\u309D","\\u309E","\\u30FD","\\u30FE"]),mn=new Set([\'"\',"(","[","{","\\u201C","\\u2018","\\xAB","\\u2039","\\uFF08","\\u3014","\\u3008","\\u300A","\\u300C","\\u300E","\\u3010","\\u3016","\\u3018","\\u301A"]),Gr=new Set(["\'","\\u2019"]),nt=new Set([".",",","!","?",":",";","\\u060C","\\u061B","\\u061F","\\u0964","\\u0965","\\u104A","\\u104B","\\u104C","\\u104D","\\u104F",")","]","}","%",\'"\',"\\u201D","\\u2019","\\xBB","\\u203A","\\u2026"]),ip=new Set([":",".","\\u060C","\\u061B"]),rp=new Set(["\\u104F"]),op=new Set(["\\u201D","\\u2019","\\xBB","\\u203A","\\u300D","\\u300F","\\u3011","\\u300B","\\u3009","\\u3015","\\uFF09"]);function sp(e){if(Ur(e))return!0;let t=!1;for(let n of e){if(nt.has(n)){t=!0;continue}if(!(t&&Zn.test(n)))return!1}return t}function ap(e){for(let t of e)if(!ti.has(t)&&!nt.has(t))return!1;return e.length>0}function lp(e){if(Ur(e))return!0;for(let t of e)if(!mn.has(t)&&!Gr.has(t)&&!Zn.test(t))return!1;return e.length>0}function Ur(e){let t=!1;for(let n of e)if(!(n==="\\\\"||Zn.test(n))){if(mn.has(n)||nt.has(n)||Gr.has(n)){t=!0;continue}return!1}return t}function Gl(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let i=e.charCodeAt(n);if(i<56320||i>57343)return n;let r=n-1;if(r<0)return n;let o=e.charCodeAt(r);return o>=55296&&o<=56319?r:n}function ni(e){if(e.length===0)return null;let t=Gl(e,e.length);return e.slice(t)}function up(e){let t=Array.from(e),n=t.length;for(;n>0;){let i=t[n-1];if(Zn.test(i)){n--;continue}if(mn.has(i)||Gr.has(i)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function cp(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="\\u2014"?e:null}function Dl(e,t,n,i){let r=t[i],o=e[i];if(r==null)return o;let a=n[i];if(o.length===a)return o;let c=r.repeat(a);return e[i]=c,c}function Il(e,t){return e&&t!==null&&ip.has(t)}function dp(e){let t=ni(e);return t!==null&&rp.has(t)}function fp(e){if(e.length<2||e[0]!==" ")return null;let t=e.slice(1);return/^\\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function ii(e){let t=e.length;for(;t>0;){let n=Gl(e,t),i=e.slice(n,t);if(op.has(i))return!0;if(!nt.has(i))return!1;t=n}return!1}function mp(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===`\n`)return"hard-break"}return e===" "?"space":e==="\\xA0"||e==="\\u202F"||e==="\\u2060"||e==="\\uFEFF"?"glue":e==="\\u200B"?"zero-width-break":e==="\\xAD"?"soft-hyphen":"text"}var pp=/[\\x20\\t\\n\\xA0\\xAD\\u200B\\u202F\\u2060\\uFEFF]/;function ve(e){return e.length===1?e[0]:e.join("")}function hp(e,t){let n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),ve(n)}function gp(e,t,n,i){if(!pp.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];let r=[],o=null,a=[],c=n,s=!1,l=0;for(let f of e){let p=mp(f,i),d=p==="text"&&t;if(o!==null&&p===o&&d===s){a.push(f),l+=f.length;continue}o!==null&&r.push({text:ve(a),isWordLike:s,kind:o,start:c}),o=p,a=[f],c=n+l,s=d,l+=f.length}return o!==null&&r.push({text:ve(a),isWordLike:s,kind:o,start:c}),r}function Hr(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var xp=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function bp(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:xp.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function yp(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function Sp(e){let t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),r=e.starts.slice();for(let a=0;a<e.len;a++){if(i[a]!=="text"||!bp(e,a))continue;let c=[t[a]],s=a+1;for(;s<e.len&&!Hr(i[s]);){c.push(t[s]),n[a]=!0;let l=t[s].includes("?");if(i[s]="text",t[s]="",s++,l)break}t[a]=ve(c)}let o=0;for(let a=0;a<t.length;a++){let c=t[a];c.length!==0&&(o!==a&&(t[o]=c,n[o]=n[a],i[o]=i[a],r[o]=r[a]),o++)}return t.length=o,n.length=o,i.length=o,r.length=o,{len:o,texts:t,isWordLike:n,kinds:i,starts:r}}function Ep(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o];if(t.push(a),n.push(e.isWordLike[o]),i.push(e.kinds[o]),r.push(e.starts[o]),!yp(a))continue;let c=o+1;if(c>=e.len||Hr(e.kinds[c]))continue;let s=[],l=e.starts[c],f=c;for(;f<e.len&&!Hr(e.kinds[f]);)s.push(e.texts[f]),f++;s.length>0&&(t.push(ve(s)),n.push(!0),i.push("text"),r.push(l),o=f-1)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}var Ap=new Set([":","-","/","\\xD7",",",".","+","\\u2013","\\u2014"]),Pl=/^[A-Za-z0-9_]+[,:;]*$/,Ol=/[,:;]+$/;function Ul(e){for(let t of e)if(Hl.test(t))return!0;return!1}function fn(e){if(e.length===0)return!1;for(let t of e)if(!(Hl.test(t)||Ap.has(t)))return!1;return!0}function wp(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o],c=e.kinds[o];if(c==="text"&&fn(a)&&Ul(a)){let s=[a],l=o+1;for(;l<e.len&&e.kinds[l]==="text"&&fn(e.texts[l]);)s.push(e.texts[l]),l++;t.push(ve(s)),n.push(!0),i.push("text"),r.push(e.starts[o]),o=l-1;continue}t.push(a),n.push(e.isWordLike[o]),i.push(c),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Cp(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o],c=e.kinds[o],s=e.isWordLike[o];if(c==="text"&&s&&Pl.test(a)){let l=[a],f=Ol.test(a),p=o+1;for(;f&&p<e.len&&e.kinds[p]==="text"&&e.isWordLike[p]&&Pl.test(e.texts[p]);){let d=e.texts[p];l.push(d),f=Ol.test(d),p++}t.push(ve(l)),n.push(!0),i.push("text"),r.push(e.starts[o]),o=p-1;continue}t.push(a),n.push(s),i.push(c),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function _p(e){let t=[],n=[],i=[],r=[];for(let o=0;o<e.len;o++){let a=e.texts[o];if(e.kinds[o]==="text"&&a.includes("-")){let c=a.split("-"),s=c.length>1;for(let l=0;l<c.length;l++){let f=c[l];if(!s)break;(f.length===0||!Ul(f)||!fn(f))&&(s=!1)}if(s){let l=0;for(let f=0;f<c.length;f++){let p=c[f],d=f<c.length-1?`${p}-`:p;t.push(d),n.push(!0),i.push("text"),r.push(e.starts[o]+l),l+=d.length}continue}}t.push(a),n.push(e.isWordLike[o]),i.push(e.kinds[o]),r.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Fp(e){let t=[],n=[],i=[],r=[],o=0;for(;o<e.len;){let a=[e.texts[o]],c=e.isWordLike[o],s=e.kinds[o],l=e.starts[o];if(s==="glue"){let f=[a[0]],p=l;for(o++;o<e.len&&e.kinds[o]==="glue";)f.push(e.texts[o]),o++;let d=ve(f);if(o<e.len&&e.kinds[o]==="text")a[0]=d,a.push(e.texts[o]),c=e.isWordLike[o],s="text",l=p,o++;else{t.push(d),n.push(!1),i.push("glue"),r.push(p);continue}}else o++;if(s==="text")for(;o<e.len&&e.kinds[o]==="glue";){let f=[];for(;o<e.len&&e.kinds[o]==="glue";)f.push(e.texts[o]),o++;let p=ve(f);if(o<e.len&&e.kinds[o]==="text"){a.push(p,e.texts[o]),c=c||e.isWordLike[o],o++;continue}a.push(p)}t.push(ve(a)),n.push(c),i.push(s),r.push(l)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Tp(e){let t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),r=e.starts.slice();for(let o=0;o<t.length-1;o++){if(i[o]!=="text"||i[o+1]!=="text"||!Ie(t[o])||!Ie(t[o+1]))continue;let a=up(t[o]);a!==null&&(t[o]=a.head,t[o+1]=a.tail+t[o+1],r[o+1]=r[o]+a.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Bl(e,t,n){let i=Xm(),r=0,o=[],a=[],c=[],s=[],l=[],f=[],p=[],d=[],x=[],S=[],y=[],b=[];for(let v of i.segment(e))for(let w of gp(v.segment,v.isWordLike??!1,v.index,n)){let ie=function(){f[I]!==null&&(a[I]=[Dl(o,f,p,I)],f[I]=null),a[I].push(w.text),c[I]=c[I]||w.isWordLike,d[I]=d[I]||R,x[I]=x[I]||L,S[I]=P,y[I]=X,b[I]=Il(x[I],z)},C=w.kind==="text",F=cp(w.text,w.isWordLike,w.kind),R=Ie(w.text),L=Ll(w.text),z=ni(w.text),P=ii(w.text),X=dp(w.text),I=r-1;t.carryCJKAfterClosingQuote&&C&&r>0&&s[I]==="text"&&R&&d[I]&&S[I]||C&&r>0&&s[I]==="text"&&ap(w.text)&&d[I]||C&&r>0&&s[I]==="text"&&y[I]?ie():C&&r>0&&s[I]==="text"&&w.isWordLike&&L&&b[I]?(ie(),c[I]=!0):F!==null&&r>0&&s[I]==="text"&&f[I]===F?p[I]=(p[I]??1)+1:C&&!w.isWordLike&&r>0&&s[I]==="text"&&(sp(w.text)||w.text==="-"&&c[I])?ie():(o[r]=w.text,a[r]=[w.text],c[r]=w.isWordLike,s[r]=w.kind,l[r]=w.start,f[r]=F,p[r]=F===null?0:1,d[r]=R,x[r]=L,S[r]=P,y[r]=X,b[r]=Il(L,z),r++)}for(let v=0;v<r;v++){if(f[v]!==null){o[v]=Dl(o,f,p,v);continue}o[v]=ve(a[v])}for(let v=1;v<r;v++)s[v]==="text"&&!c[v]&&Ur(o[v])&&s[v-1]==="text"&&(o[v-1]+=o[v],c[v-1]=c[v-1]||c[v],o[v]="");let A=Array.from({length:r},()=>null),_=-1;for(let v=r-1;v>=0;v--){let w=o[v];if(w.length!==0){if(s[v]==="text"&&!c[v]&&lp(w)&&_>=0&&s[_]==="text"){let C=A[_]??[];C.push(w),A[_]=C,l[_]=l[v],o[v]="";continue}_=v}}for(let v=0;v<r;v++){let w=A[v];w!=null&&(o[v]=hp(w,o[v]))}let M=0;for(let v=0;v<r;v++){let w=o[v];w.length!==0&&(M!==v&&(o[M]=w,c[M]=c[v],s[M]=s[v],l[M]=l[v]),M++)}o.length=M,c.length=M,s.length=M,l.length=M;let G=Fp({len:M,texts:o,isWordLike:c,kinds:s,starts:l}),D=Tp(Cp(_p(wp(Ep(Sp(G))))));for(let v=0;v<D.len-1;v++){let w=fp(D.texts[v]);w!==null&&(D.kinds[v]!=="space"&&D.kinds[v]!=="preserved-space"||D.kinds[v+1]!=="text"||!Ll(D.texts[v+1])||(D.texts[v]=w.space,D.isWordLike[v]=!1,D.kinds[v]=D.kinds[v]==="preserved-space"?"preserved-space":"space",D.texts[v+1]=w.marks+D.texts[v+1],D.starts[v+1]=D.starts[v]+w.space.length))}return D}function vp(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],i=0;for(let r=0;r<e.len;r++)e.kinds[r]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:r,consumedEndSegmentIndex:r+1}),i=r+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function Mp(e){if(e.len<=1)return e;let t=[],n=[],i=[],r=[],o=null,a=!1,c=0,s=!1,l=!1;function f(){o!==null&&(t.push(ve(o)),n.push(a),i.push("text"),r.push(c),o=null)}for(let p=0;p<e.len;p++){let d=e.texts[p],x=e.kinds[p],S=e.isWordLike[p],y=e.starts[p];if(x==="text"){let b=tp(d),A=ei(d);if(o!==null&&s&&l){o.push(d),a=a||S,s=s||b,l=A;continue}f(),o=[d],a=S,c=y,s=b,l=A;continue}f(),t.push(d),n.push(S),i.push(x),r.push(y)}return f(),{len:t.length,texts:t,isWordLike:n,kinds:i,starts:r}}function Wl(e,t,n="normal",i="normal"){let r=qm(n),o=r.mode==="pre-wrap"?Jm(e):Km(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let a=i==="keep-all"?Mp(Bl(o,t,r)):Bl(o,t,r);return{normalized:o,chunks:vp(a,r),...a}}var _t=null,Vl=new Map,Ft=null,Np=96,Rp=/\\p{Emoji_Presentation}/u,Lp=/[\\p{Emoji_Presentation}\\p{Extended_Pictographic}\\p{Regional_Indicator}\\uFE0F\\u20E3]/u,Wr=null,zl=new Map;function Vr(){if(_t!==null)return _t;if(typeof OffscreenCanvas<"u")return _t=new OffscreenCanvas(1,1).getContext("2d"),_t;if(typeof document<"u")return _t=document.createElement("canvas").getContext("2d"),_t;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function kp(e){let t=Vl.get(e);return t||(t=new Map,Vl.set(e,t)),t}function Ke(e,t){let n=t.get(e);return n===void 0&&(n={width:Vr().measureText(e).width,containsCJK:Ie(e)},t.set(e,n)),n}function Tt(){if(Ft!==null)return Ft;if(typeof navigator>"u")return Ft={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Ft;let e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),i=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Ft={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:i,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Ft}function Dp(e){let t=e.match(/(\\d+(?:\\.\\d+)?)\\s*px/);return t?parseFloat(t[1]):16}function jl(){return Wr===null&&(Wr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Wr}function Ip(e){return Rp.test(e)||e.includes("\\uFE0F")}function $l(e){return Lp.test(e)}function Pp(e,t){let n=zl.get(e);if(n!==void 0)return n;let i=Vr();i.font=e;let r=i.measureText("\\u{1F600}").width;if(n=0,r>t+.5&&typeof document<"u"&&document.body!==null){let o=document.createElement("span");o.style.font=e,o.style.display="inline-block",o.style.visibility="hidden",o.style.position="absolute",o.textContent="\\u{1F600}",document.body.appendChild(o);let a=o.getBoundingClientRect().width;document.body.removeChild(o),r-a>.5&&(n=r-a)}return zl.set(e,n),n}function Op(e){let t=0,n=jl();for(let i of n.segment(e))Ip(i.segment)&&t++;return t}function Bp(e,t){return t.emojiCount===void 0&&(t.emojiCount=Op(e)),t.emojiCount}function it(e,t,n){return n===0?t.width:t.width-Bp(e,t)*n}function ql(e,t,n,i,r){if(t.breakableFitAdvances!==void 0)return t.breakableFitAdvances;let o=jl(),a=[];for(let f of o.segment(e))a.push(f.segment);if(a.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(r==="sum-graphemes"){let f=[];for(let p of a){let d=Ke(p,n);f.push(it(p,d,i))}return t.breakableFitAdvances=f,t.breakableFitAdvances}if(r==="pair-context"||a.length>Np){let f=[],p=null,d=0;for(let x of a){let S=Ke(x,n),y=it(x,S,i);if(p===null)f.push(y);else{let b=p+x,A=Ke(b,n);f.push(it(b,A,i)-d)}p=x,d=y}return t.breakableFitAdvances=f,t.breakableFitAdvances}let c=[],s="",l=0;for(let f of a){s+=f;let p=Ke(s,n),d=it(s,p,i);c.push(d-l),l=d}return t.breakableFitAdvances=c,t.breakableFitAdvances}function Kl(e,t){let n=Vr();n.font=e;let i=kp(e),r=Dp(e),o=t?Pp(e,r):0;return{cache:i,fontSize:r,emojiCorrection:o}}function Hp(e,t){for(;t<e.widths.length;){let n=e.kinds[t];if(n!=="space"&&n!=="zero-width-break"&&n!=="soft-hyphen")break;t++}return t}function Gp(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function Up(e,t,n,i,r){let o=0,a=t;for(;o<e.length;){let c=a+e[o];if((o+1<e.length?c+r:c)>n+i)break;a=c,o++}return{fitCount:o,fittedWidth:a}}function Jl(e,t){return e.simpleLineWalkFastPath?Yl(e,t):Xl(e,t)}function Yl(e,t,n){let{widths:i,kinds:r,breakableFitAdvances:o}=e;if(i.length===0)return 0;let c=Tt().lineFitEpsilon,s=t+c,l=0,f=0,p=!1,d=0,x=0,S=0,y=0,b=-1,A=0;function _(){b=-1,A=0}function M(F=S,R=y,L=f){l++,n?.({startSegmentIndex:d,startGraphemeIndex:x,endSegmentIndex:F,endGraphemeIndex:R,width:L}),f=0,p=!1,_()}function G(F,R){p=!0,d=F,x=0,S=F+1,y=0,f=R}function D(F,R,L){p=!0,d=F,x=R,S=F,y=R+1,f=L}function v(F,R){if(!p){G(F,R);return}f+=R,S=F+1,y=0}function w(F,R){let L=o[F];for(let z=R;z<L.length;z++){let P=L[z];p?f+P>s?(M(),D(F,z,P)):(f+=P,S=F,y=z+1):D(F,z,P)}p&&S===F&&y===L.length&&(S=F+1,y=0)}let C=0;for(;C<i.length&&!(!p&&(C=Hp(e,C),C>=i.length));){let F=i[C],R=r[C],L=R==="space"||R==="preserved-space"||R==="tab"||R==="zero-width-break"||R==="soft-hyphen";if(!p){F>t&&o[C]!==null?w(C,0):G(C,F),L&&(b=C+1,A=f-F),C++;continue}if(f+F>s){if(L){v(C,F),M(C+1,0,f-F),C++;continue}if(b>=0){if(S>b||S===b&&y>0){M();continue}M(b,0,A);continue}if(F>t&&o[C]!==null){M(),w(C,0),C++;continue}M();continue}v(C,F),L&&(b=C+1,A=f-F),C++}return p&&M(),l}function Xl(e,t,n){if(e.simpleLineWalkFastPath)return Yl(e,t,n);let{widths:i,lineEndFitAdvances:r,lineEndPaintAdvances:o,kinds:a,breakableFitAdvances:c,discretionaryHyphenWidth:s,tabStopAdvance:l,chunks:f}=e;if(i.length===0||f.length===0)return 0;let p=Tt(),d=p.lineFitEpsilon,x=t+d,S=0,y=0,b=!1,A=0,_=0,M=0,G=0,D=-1,v=0,w=0,C=null;function F(){D=-1,v=0,w=0,C=null}function R(j=M,Y=G,B=y){S++,n?.({startSegmentIndex:A,startGraphemeIndex:_,endSegmentIndex:j,endGraphemeIndex:Y,width:B}),y=0,b=!1,F()}function L(j,Y){b=!0,A=j,_=0,M=j+1,G=0,y=Y}function z(j,Y,B){b=!0,A=j,_=Y,M=j,G=Y+1,y=B}function P(j,Y){if(!b){L(j,Y);return}y+=Y,M=j+1,G=0}function X(j,Y,B,V){if(!Y)return;let Ae=j==="tab"?0:r[B],U=j==="tab"?V:o[B];D=B+1,v=y-V+Ae,w=y-V+U,C=j}function I(j,Y){let B=c[j];for(let V=Y;V<B.length;V++){let Ae=B[V];b?y+Ae>x?(R(),z(j,V,Ae)):(y+=Ae,M=j,G=V+1):z(j,V,Ae)}b&&M===j&&G===B.length&&(M=j+1,G=0)}function ie(j){if(C!=="soft-hyphen")return!1;let Y=c[j];if(Y==null)return!1;let{fitCount:B,fittedWidth:V}=Up(Y,y,t,d,s);return B===0?!1:(y=V,M=j,G=B,F(),B===Y.length?(M=j+1,G=0,!0):(R(j,B,V+s),I(j,B),!0))}function Fe(j){S++,n?.({startSegmentIndex:j.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:j.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),F()}for(let j=0;j<f.length;j++){let Y=f[j];if(Y.startSegmentIndex===Y.endSegmentIndex){Fe(Y);continue}b=!1,y=0,A=Y.startSegmentIndex,_=0,M=Y.startSegmentIndex,G=0,F();let B=Y.startSegmentIndex;for(;B<Y.endSegmentIndex;){let V=a[B],Ae=V==="space"||V==="preserved-space"||V==="tab"||V==="zero-width-break"||V==="soft-hyphen",U=V==="tab"?Gp(y,l):i[B];if(V==="soft-hyphen"){b&&(M=B+1,G=0,D=B+1,v=y+s,w=y+s,C=V),B++;continue}if(!b){U>t&&c[B]!==null?I(B,0):L(B,U),X(V,Ae,B,U),B++;continue}if(y+U>x){let H=y+(V==="tab"?0:r[B]),ae=y+(V==="tab"?U:o[B]);if(C==="soft-hyphen"&&p.preferEarlySoftHyphenBreak&&v<=x){R(D,0,w);continue}if(C==="soft-hyphen"&&ie(B)){B++;continue}if(Ae&&H<=x){P(B,U),R(B+1,0,ae),B++;continue}if(D>=0&&v<=x){if(M>D||M===D&&G>0){R();continue}let oe=D;R(oe,0,w),B=oe;continue}if(U>t&&c[B]!==null){R(),I(B,0),B++;continue}R();continue}P(B,U),X(V,Ae,B,U),B++}if(b){let V=D===Y.consumedEndSegmentIndex?w:y;R(Y.consumedEndSegmentIndex,0,V)}}return S}var zr=null;function Wp(){return zr===null&&(zr=new Intl.Segmenter(void 0,{granularity:"grapheme"})),zr}function Vp(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function zp(e,t){let n=[],i=[],r=0,o=!1,a=!1,c=!1;function s(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:r}),i=[],o=!1,a=!1,c=!1)}function l(p,d,x){i=[p],r=d,o=x,a=ii(p),c=mn.has(p)}function f(p,d){i.push(p),o=o||d;let x=ii(p);p.length===1&&nt.has(p)?a=a||x:a=x,c=!1}for(let p of Wp().segment(e)){let d=p.segment,x=Ie(d);if(i.length===0){l(d,p.index,x);continue}if(c||ti.has(d)||nt.has(d)||t.carryCJKAfterClosingQuote&&x&&a){f(d,x);continue}if(!o&&!x){f(d,x);continue}s(),l(d,p.index,x)}return s(),n}function jp(e){if(e.length<=1)return e;let t=[],n=[e[0].text],i=e[0].start,r=Ie(e[0].text),o=ei(e[0].text);function a(){t.push({text:n.length===1?n[0]:n.join(""),start:i})}for(let c=1;c<e.length;c++){let s=e[c],l=Ie(s.text),f=ei(s.text);if(r&&o){n.push(s.text),r=r||l,o=f;continue}a(),n=[s.text],i=s.start,r=l,o=f}return a(),t}function $p(e,t,n,i){let r=Tt(),{cache:o,emojiCorrection:a}=Kl(t,$l(e.normalized)),c=it("-",Ke("-",o),a),l=it(" ",Ke(" ",o),a)*8;if(e.len===0)return Vp(n);let f=[],p=[],d=[],x=[],S=e.chunks.length<=1,y=n?[]:null,b=[],A=n?[]:null,_=Array.from({length:e.len});function M(w,C,F,R,L,z,P){L!=="text"&&L!=="space"&&L!=="zero-width-break"&&(S=!1),f.push(C),p.push(F),d.push(R),x.push(L),y?.push(z),b.push(P),A!==null&&A.push(w)}function G(w,C,F,R,L){let z=Ke(w,o),P=it(w,z,a),X=C==="space"||C==="preserved-space"||C==="zero-width-break"?0:P,I=C==="space"||C==="zero-width-break"?0:P;if(L&&R&&w.length>1){let ie="sum-graphemes";fn(w)?ie="pair-context":r.preferPrefixWidthsForBreakableRuns&&(ie="segment-prefixes");let Fe=ql(w,z,o,a,ie);M(w,P,X,I,C,F,Fe);return}M(w,P,X,I,C,F,null)}for(let w=0;w<e.len;w++){_[w]=f.length;let C=e.texts[w],F=e.isWordLike[w],R=e.kinds[w],L=e.starts[w];if(R==="soft-hyphen"){M(C,0,c,c,R,L,null);continue}if(R==="hard-break"){M(C,0,0,0,R,L,null);continue}if(R==="tab"){M(C,0,0,0,R,L,null);continue}let z=Ke(C,o);if(R==="text"&&z.containsCJK){let P=zp(C,r),X=i==="keep-all"?jp(P):P;for(let I=0;I<X.length;I++){let ie=X[I];G(ie.text,"text",L+ie.start,F,i==="keep-all"||!Ie(ie.text))}continue}G(C,R,L,F,!0)}let D=qp(e.chunks,_,f.length),v=y===null?null:Rl(e.normalized,y);return A!==null?{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:d,kinds:x,simpleLineWalkFastPath:S,segLevels:v,breakableFitAdvances:b,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:D,segments:A}:{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:d,kinds:x,simpleLineWalkFastPath:S,segLevels:v,breakableFitAdvances:b,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:D}}function qp(e,t,n){let i=[];for(let r=0;r<e.length;r++){let o=e[r],a=o.startSegmentIndex<t.length?t[o.startSegmentIndex]:n,c=o.endSegmentIndex<t.length?t[o.endSegmentIndex]:n,s=o.consumedEndSegmentIndex<t.length?t[o.consumedEndSegmentIndex]:n;i.push({startSegmentIndex:a,endSegmentIndex:c,consumedEndSegmentIndex:s})}return i}function Kp(e,t,n,i){let r=i?.wordBreak??"normal",o=Wl(e,Tt(),i?.whiteSpace,r);return $p(o,t,n,r)}function Ql(e,t,n){return Kp(e,t,!1,n)}function Zl(e,t,n){let i=Jl(e,t);return{lineCount:i,height:i*n}}var Jp={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function eu(e,t){let n={...Jp,...t},i=1.2;for(let r=n.baseFontSize;r>=n.minFontSize;r-=n.step){let o=`${n.fontWeight} ${r}px ${n.fontFamily}`,a=Ql(e,o),{lineCount:c}=Zl(a,n.maxWidth,r*i);if(c<=1)return{fontSize:r,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};xl();window.__hyperframes={fitTextFontSize:eu,getVariables:ho};function tu(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,Ml())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",tu,{once:!0}):tu();})();\n';
|
|
57199
57196
|
}
|
|
57200
57197
|
});
|
|
57201
57198
|
|
|
@@ -61011,7 +61008,6 @@ __export(dist_exports, {
|
|
|
61011
61008
|
normalizeHfColorGrading: () => normalizeHfColorGrading,
|
|
61012
61009
|
normalizeHfColorGradingWithVariables: () => normalizeHfColorGradingWithVariables,
|
|
61013
61010
|
normalizeResolutionFlag: () => normalizeResolutionFlag,
|
|
61014
|
-
outputFrameToTimelineSeconds: () => outputFrameToTimelineSeconds,
|
|
61015
61011
|
parseAnimatedGifMetadata: () => parseAnimatedGifMetadata,
|
|
61016
61012
|
parseCubeLut: () => parseCubeLut,
|
|
61017
61013
|
parseFps: () => parseFps,
|
|
@@ -65955,9 +65951,8 @@ async function verifyStaticFramesSafe(session, page, staticFrames, fps, sampleCo
|
|
|
65955
65951
|
if (last && f3 === last.b + 1) last.b = f3;
|
|
65956
65952
|
else runs.push({ a: f3, b: f3 });
|
|
65957
65953
|
}
|
|
65958
|
-
const renderStretch = session.options.renderStretch ?? 1;
|
|
65959
65954
|
const seekToFrame = async (frameIdx) => {
|
|
65960
|
-
const t2 = quantizeTimeToFrame(frameIdx / fps
|
|
65955
|
+
const t2 = quantizeTimeToFrame(frameIdx / fps, fps);
|
|
65961
65956
|
await page.evaluate((tt3) => {
|
|
65962
65957
|
const hf = window.__hf;
|
|
65963
65958
|
if (hf && typeof hf.seek === "function") hf.seek(tt3, { suppressEvents: true });
|
|
@@ -66459,10 +66454,9 @@ async function captureDeVerificationFrames(session, page, logInitPhase) {
|
|
|
66459
66454
|
if (k2 === 0 || process.env.HF_FORCE_DRAWELEMENT === "1") return;
|
|
66460
66455
|
if (session.options.format === "png") return;
|
|
66461
66456
|
const fps = fpsToNumber(session.options.fps);
|
|
66462
|
-
const renderStretch = session.options.renderStretch ?? 1;
|
|
66463
66457
|
const duration = session.options.compositionDurationSeconds ?? await page.evaluate(
|
|
66464
66458
|
() => window.__hf?.duration ?? 0
|
|
66465
|
-
)
|
|
66459
|
+
);
|
|
66466
66460
|
const totalFrames = Math.floor(duration * fps);
|
|
66467
66461
|
if (totalFrames < 10) return;
|
|
66468
66462
|
if (duration > 3600) {
|
|
@@ -66493,7 +66487,7 @@ async function captureDeVerificationFrames(session, page, logInitPhase) {
|
|
|
66493
66487
|
while (boundary.has(idx) && guard++ < 6) idx = Math.min(totalFrames - 1, idx + 2);
|
|
66494
66488
|
if (boundary.has(idx)) continue;
|
|
66495
66489
|
if (frames.has(idx)) continue;
|
|
66496
|
-
const t2 = quantizeTimeToFrame(idx / fps
|
|
66490
|
+
const t2 = quantizeTimeToFrame(idx / fps, fps);
|
|
66497
66491
|
await seekTo(t2);
|
|
66498
66492
|
if (session.onBeforeCapture) await session.onBeforeCapture(page, t2);
|
|
66499
66493
|
await pageScreenshotCapture(page, session.options);
|
|
@@ -68798,6 +68792,15 @@ function isInsideGlobalAtRule(rule) {
|
|
|
68798
68792
|
}
|
|
68799
68793
|
return false;
|
|
68800
68794
|
}
|
|
68795
|
+
function isNestedInsideAnotherRule(rule) {
|
|
68796
|
+
let current2 = rule.parent;
|
|
68797
|
+
while (current2) {
|
|
68798
|
+
if (current2.type === "rule")
|
|
68799
|
+
return true;
|
|
68800
|
+
current2 = current2.parent;
|
|
68801
|
+
}
|
|
68802
|
+
return false;
|
|
68803
|
+
}
|
|
68801
68804
|
function scopeCssToComposition(css, compositionId, scopeSelectorOverride, authoredRootId, options) {
|
|
68802
68805
|
const trimmedCompositionId = compositionId.trim();
|
|
68803
68806
|
if (!css || !trimmedCompositionId)
|
|
@@ -68807,6 +68810,8 @@ function scopeCssToComposition(css, compositionId, scopeSelectorOverride, author
|
|
|
68807
68810
|
root.walkRules((rule) => {
|
|
68808
68811
|
if (isInsideGlobalAtRule(rule))
|
|
68809
68812
|
return;
|
|
68813
|
+
if (isNestedInsideAnotherRule(rule))
|
|
68814
|
+
return;
|
|
68810
68815
|
rule.selectors = rule.selectors.map((selector) => scopeSelector(selector, scope, trimmedCompositionId, authoredRootId, options?.compoundAuthoredRoot, options?.scopeRootSelectors));
|
|
68811
68816
|
});
|
|
68812
68817
|
return root.toResult({ map: false }).css;
|
|
@@ -79954,8 +79959,6 @@ async function captureFrameRange(session, task, captureOptions, signal, onFrameC
|
|
|
79954
79959
|
let framesCaptured = 0;
|
|
79955
79960
|
const outputOffset = task.outputFrameOffset ?? 0;
|
|
79956
79961
|
const stride = task.frameStride ?? 1;
|
|
79957
|
-
const renderStretch = captureOptions.renderStretch ?? 1;
|
|
79958
|
-
const seekTime = (i2) => outputFrameToTimelineSeconds(i2, captureOptions.fps, renderStretch);
|
|
79959
79962
|
if (onFrameBuffer && session.workerEncodeEnabled) {
|
|
79960
79963
|
const dbg = process.env.HF_DE_PAR_DEBUG === "1";
|
|
79961
79964
|
const dbgT0 = Date.now();
|
|
@@ -79963,7 +79966,7 @@ async function captureFrameRange(session, task, captureOptions, signal, onFrameC
|
|
|
79963
79966
|
let prev = null;
|
|
79964
79967
|
for (let i2 = task.startFrame; i2 < task.endFrame; i2 += stride) {
|
|
79965
79968
|
if (signal?.aborted) throw new Error("Parallel worker cancelled");
|
|
79966
|
-
const time =
|
|
79969
|
+
const time = i2 * captureOptions.fps.den / captureOptions.fps.num;
|
|
79967
79970
|
if (dbg && i2 < task.startFrame + dbgWin) {
|
|
79968
79971
|
console.log(`[par:w${task.workerId}] +${Date.now() - dbgT0}ms produce ${i2} start`);
|
|
79969
79972
|
}
|
|
@@ -80003,7 +80006,7 @@ async function captureFrameRange(session, task, captureOptions, signal, onFrameC
|
|
|
80003
80006
|
}
|
|
80004
80007
|
for (let i2 = task.startFrame; i2 < task.endFrame; i2 += stride) {
|
|
80005
80008
|
if (signal?.aborted) throw new Error("Parallel worker cancelled");
|
|
80006
|
-
const time =
|
|
80009
|
+
const time = i2 * captureOptions.fps.den / captureOptions.fps.num;
|
|
80007
80010
|
const fileFrameIdx = i2 - outputOffset;
|
|
80008
80011
|
if (onFrameBuffer) {
|
|
80009
80012
|
const { buffer } = await captureFrameToBuffer(session, fileFrameIdx, time);
|
|
@@ -80205,7 +80208,6 @@ var init_parallelCoordinator = __esm({
|
|
|
80205
80208
|
"../engine/src/services/parallelCoordinator.ts"() {
|
|
80206
80209
|
"use strict";
|
|
80207
80210
|
init_frameCapture();
|
|
80208
|
-
init_dist3();
|
|
80209
80211
|
init_config2();
|
|
80210
80212
|
init_assertSwiftShader();
|
|
80211
80213
|
init_readWebGlVendorInfoFromCanvas();
|
|
@@ -108211,8 +108213,8 @@ function computeVideoFrameCoverage(videos, extracted, fps) {
|
|
|
108211
108213
|
const slotFrames = expectedFramesForClip(video.start, video.end, fps);
|
|
108212
108214
|
const sourceDuration = entry ? entry.metadata.durationSeconds - video.mediaStart : NaN;
|
|
108213
108215
|
const hasUsableSourceDuration = Number.isFinite(sourceDuration) && sourceDuration > 0;
|
|
108214
|
-
const sourceFrames = entry &&
|
|
108215
|
-
const expectedFrames = entry
|
|
108216
|
+
const sourceFrames = entry && hasUsableSourceDuration ? expectedFramesForClip(0, sourceDuration, fps) : slotFrames;
|
|
108217
|
+
const expectedFrames = entry ? Math.min(slotFrames, sourceFrames) : slotFrames;
|
|
108216
108218
|
const capturedFrames = entry ? entry.framePaths.size : 0;
|
|
108217
108219
|
const ratio = expectedFrames === 0 ? 1 : capturedFrames / expectedFrames;
|
|
108218
108220
|
reports.push({
|
|
@@ -114433,9 +114435,7 @@ async function runProbeStage(input2) {
|
|
|
114433
114435
|
}
|
|
114434
114436
|
const browserProbeMs = Date.now() - probeStart;
|
|
114435
114437
|
const duration = composition.duration;
|
|
114436
|
-
const
|
|
114437
|
-
const outputDuration = duration / renderStretch;
|
|
114438
|
-
const totalFrames = durationToFrameCount(outputDuration, fpsToNumber(job.config.fps));
|
|
114438
|
+
const totalFrames = durationToFrameCount(duration, fpsToNumber(job.config.fps));
|
|
114439
114439
|
if (duration <= 0) {
|
|
114440
114440
|
const diagnostics = [];
|
|
114441
114441
|
try {
|
|
@@ -114489,7 +114489,7 @@ async function runProbeStage(input2) {
|
|
|
114489
114489
|
fileServer,
|
|
114490
114490
|
probeSession,
|
|
114491
114491
|
lastBrowserConsole,
|
|
114492
|
-
duration
|
|
114492
|
+
duration,
|
|
114493
114493
|
totalFrames,
|
|
114494
114494
|
browserProbeMs,
|
|
114495
114495
|
beginFrameStalled
|
|
@@ -114896,11 +114896,7 @@ async function runCaptureStage(input2) {
|
|
|
114896
114896
|
for (let i2 = 0; i2 < rangeFrames; i2++) {
|
|
114897
114897
|
assertNotAborted();
|
|
114898
114898
|
const absoluteIdx = rangeStart + i2;
|
|
114899
|
-
const time =
|
|
114900
|
-
absoluteIdx,
|
|
114901
|
-
job.config.fps,
|
|
114902
|
-
job.config.renderStretch ?? 1
|
|
114903
|
-
);
|
|
114899
|
+
const time = absoluteIdx * job.config.fps.den / job.config.fps.num;
|
|
114904
114900
|
const { encodeResult } = await captureFrameToBufferPipelined(session, i2, time);
|
|
114905
114901
|
await drainPrev();
|
|
114906
114902
|
prev = { fileIndex: i2, encodeResult };
|
|
@@ -114910,11 +114906,7 @@ async function runCaptureStage(input2) {
|
|
|
114910
114906
|
for (let i2 = 0; i2 < rangeFrames; i2++) {
|
|
114911
114907
|
assertNotAborted();
|
|
114912
114908
|
const absoluteIdx = rangeStart + i2;
|
|
114913
|
-
const time =
|
|
114914
|
-
absoluteIdx,
|
|
114915
|
-
job.config.fps,
|
|
114916
|
-
job.config.renderStretch ?? 1
|
|
114917
|
-
);
|
|
114909
|
+
const time = absoluteIdx * job.config.fps.den / job.config.fps.num;
|
|
114918
114910
|
await captureFrame(session, i2, time);
|
|
114919
114911
|
reportFrame(i2);
|
|
114920
114912
|
}
|
|
@@ -114934,7 +114926,6 @@ var init_captureStage = __esm({
|
|
|
114934
114926
|
"../producer/src/services/render/stages/captureStage.ts"() {
|
|
114935
114927
|
"use strict";
|
|
114936
114928
|
init_src();
|
|
114937
|
-
init_dist3();
|
|
114938
114929
|
init_renderOrchestrator();
|
|
114939
114930
|
init_captureStageError();
|
|
114940
114931
|
init_shared();
|
|
@@ -115788,7 +115779,7 @@ function createDrainFrameGuard(args) {
|
|
|
115788
115779
|
}
|
|
115789
115780
|
async function runWorkerEncodePipelineLoop(session, totalFrames, job, currentEncoder, reorderBuffer, assertNotAborted, onProgress, log2, stats, abortSignal) {
|
|
115790
115781
|
let prev = null;
|
|
115791
|
-
const frameTime = (i2) =>
|
|
115782
|
+
const frameTime = (i2) => i2 * job.config.fps.den / job.config.fps.num;
|
|
115792
115783
|
const guard = createDrainFrameGuard({ log: log2, stats, frameTime });
|
|
115793
115784
|
const guardFrame = (idx, buf) => guard(session, idx, buf);
|
|
115794
115785
|
const stallTimeoutMs = resolveDeStallTimeoutMs();
|
|
@@ -115949,7 +115940,7 @@ async function runCaptureStreamingStage(input2) {
|
|
|
115949
115940
|
const parallelGuard = createDrainFrameGuard({
|
|
115950
115941
|
log: log2,
|
|
115951
115942
|
stats: parallelStats,
|
|
115952
|
-
frameTime: (i2) =>
|
|
115943
|
+
frameTime: (i2) => i2 * job.config.fps.den / job.config.fps.num
|
|
115953
115944
|
});
|
|
115954
115945
|
let parallelGuardRan = false;
|
|
115955
115946
|
let parallelDrainError = null;
|
|
@@ -116098,11 +116089,7 @@ async function runCaptureStreamingStage(input2) {
|
|
|
116098
116089
|
let lastProgressAt = Date.now();
|
|
116099
116090
|
for (let i2 = 0; i2 < totalFrames; i2++) {
|
|
116100
116091
|
assertNotAborted();
|
|
116101
|
-
const time =
|
|
116102
|
-
i2,
|
|
116103
|
-
job.config.fps,
|
|
116104
|
-
job.config.renderStretch ?? 1
|
|
116105
|
-
);
|
|
116092
|
+
const time = i2 * job.config.fps.den / job.config.fps.num;
|
|
116106
116093
|
const { buffer } = await raceAgainstStall(
|
|
116107
116094
|
captureFrameToBuffer(session, i2, time),
|
|
116108
116095
|
stallTimeoutMs - (Date.now() - lastProgressAt),
|
|
@@ -116166,7 +116153,6 @@ var init_captureStreamingStage = __esm({
|
|
|
116166
116153
|
"../producer/src/services/render/stages/captureStreamingStage.ts"() {
|
|
116167
116154
|
"use strict";
|
|
116168
116155
|
init_src();
|
|
116169
|
-
init_dist3();
|
|
116170
116156
|
init_captureStageError();
|
|
116171
116157
|
init_perfSummary();
|
|
116172
116158
|
init_captureHdrFrameShared();
|
|
@@ -116538,7 +116524,7 @@ async function runSequentialLayeredFrameLoop(input2) {
|
|
|
116538
116524
|
const normalCanvas = Buffer.alloc(bufSize);
|
|
116539
116525
|
for (let i2 = 0; i2 < totalFrames; i2++) {
|
|
116540
116526
|
assertNotAborted();
|
|
116541
|
-
const time =
|
|
116527
|
+
const time = i2 * job.config.fps.den / job.config.fps.num;
|
|
116542
116528
|
if (hdrPerf) hdrPerf.frames += 1;
|
|
116543
116529
|
const stackingInfo = await seekInjectAndQueryStacking(
|
|
116544
116530
|
domSession.page,
|
|
@@ -116658,7 +116644,6 @@ var init_captureHdrSequentialLoop = __esm({
|
|
|
116658
116644
|
"../producer/src/services/render/stages/captureHdrSequentialLoop.ts"() {
|
|
116659
116645
|
"use strict";
|
|
116660
116646
|
init_src();
|
|
116661
|
-
init_dist3();
|
|
116662
116647
|
init_hdrCompositor();
|
|
116663
116648
|
init_hdrPerf();
|
|
116664
116649
|
init_shared();
|
|
@@ -116979,7 +116964,7 @@ async function runHybridLayeredFrameLoop(input2) {
|
|
|
116979
116964
|
let nextRingIdx = 0;
|
|
116980
116965
|
for (let i2 = range.start; i2 < range.end; i2++) {
|
|
116981
116966
|
assertNotAborted();
|
|
116982
|
-
const time =
|
|
116967
|
+
const time = i2 * job.config.fps.den / job.config.fps.num;
|
|
116983
116968
|
const activeTransition = transitionFramesSet.has(i2) ? transitionRanges.find((t2) => i2 >= t2.startFrame && i2 <= t2.endFrame) : void 0;
|
|
116984
116969
|
if (activeTransition && ring) {
|
|
116985
116970
|
const slot = nextRingIdx;
|
|
@@ -117096,7 +117081,6 @@ var init_captureHdrHybridLoop = __esm({
|
|
|
117096
117081
|
"../producer/src/services/render/stages/captureHdrHybridLoop.ts"() {
|
|
117097
117082
|
"use strict";
|
|
117098
117083
|
init_src();
|
|
117099
|
-
init_dist3();
|
|
117100
117084
|
init_hdrCompositor();
|
|
117101
117085
|
init_hdrPerf();
|
|
117102
117086
|
init_shared();
|
|
@@ -118956,7 +118940,6 @@ async function executeRenderPipeline(input2) {
|
|
|
118956
118940
|
width,
|
|
118957
118941
|
height,
|
|
118958
118942
|
fps: job.config.fps,
|
|
118959
|
-
renderStretch: job.config.renderStretch ?? 1,
|
|
118960
118943
|
format: needsAlpha ? "png" : "jpeg",
|
|
118961
118944
|
quality: needsAlpha ? void 0 : job.config.quality === "draft" ? 80 : 95,
|
|
118962
118945
|
variables: job.config.variables,
|
|
@@ -119977,12 +119960,6 @@ function validateDistributedRenderConfig(config) {
|
|
|
119977
119960
|
);
|
|
119978
119961
|
}
|
|
119979
119962
|
}
|
|
119980
|
-
if (config.renderStretch !== void 0 && (typeof config.renderStretch !== "number" || !Number.isFinite(config.renderStretch) || config.renderStretch <= 0)) {
|
|
119981
|
-
throw new InvalidConfigError(
|
|
119982
|
-
"config.renderStretch",
|
|
119983
|
-
`must be a positive number; got ${String(config.renderStretch)}`
|
|
119984
|
-
);
|
|
119985
|
-
}
|
|
119986
119963
|
if (config.runtimeCap !== void 0 && !ALLOWED_RUNTIME_CAPS.includes(config.runtimeCap)) {
|
|
119987
119964
|
throw new InvalidConfigError(
|
|
119988
119965
|
"config.runtimeCap",
|
|
@@ -120146,12 +120123,6 @@ function assertOptionalInteger(options, field, min = 0) {
|
|
|
120146
120123
|
throw new Error(`Render request ${field} must be an integer >= ${min}`);
|
|
120147
120124
|
}
|
|
120148
120125
|
}
|
|
120149
|
-
function assertOptionalPositiveNumber(options, field) {
|
|
120150
|
-
const value = options[field];
|
|
120151
|
-
if (value !== void 0 && (typeof value !== "number" || !Number.isFinite(value) || value <= 0)) {
|
|
120152
|
-
throw new Error(`Render request ${field} must be a positive number`);
|
|
120153
|
-
}
|
|
120154
|
-
}
|
|
120155
120126
|
function assertOptionalString(options, field) {
|
|
120156
120127
|
if (options[field] !== void 0 && typeof options[field] !== "string") {
|
|
120157
120128
|
throw new Error(`Render request ${field} must be a string`);
|
|
@@ -120197,7 +120168,6 @@ function assertRequestOptionScalars(options) {
|
|
|
120197
120168
|
assertOptionalInteger(options, "gifLoop");
|
|
120198
120169
|
assertOptionalInteger(options, "workers", 1);
|
|
120199
120170
|
assertOptionalInteger(options, "crf");
|
|
120200
|
-
assertOptionalPositiveNumber(options, "renderStretch");
|
|
120201
120171
|
for (const field of ["useGpu", "debug", "outputResolutionAspectAgnostic"]) {
|
|
120202
120172
|
assertOptionalBoolean(options, field);
|
|
120203
120173
|
}
|
|
@@ -120303,7 +120273,6 @@ function distributedConfigFromRequest(request, runtime = {}) {
|
|
|
120303
120273
|
videoFrameFormat: options.videoFrameFormat,
|
|
120304
120274
|
outputResolution: options.outputResolution,
|
|
120305
120275
|
outputResolutionAspectAgnostic: options.outputResolutionAspectAgnostic,
|
|
120306
|
-
renderStretch: options.renderStretch,
|
|
120307
120276
|
chunkSize: distributed.chunkSize,
|
|
120308
120277
|
maxParallelChunks: distributed.maxParallelChunks,
|
|
120309
120278
|
targetChunkFrames: distributed.targetChunkFrames,
|
|
@@ -120350,7 +120319,6 @@ function renderRequestFromDistributedConfig(input2) {
|
|
|
120350
120319
|
...optionalProperty("videoFrameFormat", config.videoFrameFormat),
|
|
120351
120320
|
...optionalProperty("outputResolution", config.outputResolution),
|
|
120352
120321
|
...optionalProperty("outputResolutionAspectAgnostic", config.outputResolutionAspectAgnostic),
|
|
120353
|
-
...optionalProperty("renderStretch", config.renderStretch),
|
|
120354
120322
|
...optionalProperty("hdrMode", config.hdrMode),
|
|
120355
120323
|
...optionalProperty("strictness", config.strictness),
|
|
120356
120324
|
...optionalProperty("entryFile", config.entryFile),
|
|
@@ -120667,7 +120635,6 @@ function parseRenderOptions(body) {
|
|
|
120667
120635
|
const format = parseServerFormat(body.format);
|
|
120668
120636
|
const videoFrameFormat = isVideoFrameFormat(body.videoFrameFormat) ? body.videoFrameFormat : void 0;
|
|
120669
120637
|
const { variables, outputResolution, outputResolutionAspectAgnostic } = parseRenderOverrides(body);
|
|
120670
|
-
const renderStretch = typeof body.renderStretch === "number" && body.renderStretch > 0 ? body.renderStretch : void 0;
|
|
120671
120638
|
return {
|
|
120672
120639
|
outputPath,
|
|
120673
120640
|
fps,
|
|
@@ -120681,8 +120648,7 @@ function parseRenderOptions(body) {
|
|
|
120681
120648
|
variables,
|
|
120682
120649
|
outputResolution,
|
|
120683
120650
|
outputResolutionAspectAgnostic,
|
|
120684
|
-
videoFrameFormat
|
|
120685
|
-
renderStretch
|
|
120651
|
+
videoFrameFormat
|
|
120686
120652
|
};
|
|
120687
120653
|
}
|
|
120688
120654
|
function isPlainObject4(value) {
|
|
@@ -120711,8 +120677,7 @@ function buildRenderJobConfig(input2, outputPath, log2) {
|
|
|
120711
120677
|
variables: input2.variables,
|
|
120712
120678
|
outputResolution: input2.outputResolution,
|
|
120713
120679
|
outputResolutionAspectAgnostic: input2.outputResolutionAspectAgnostic,
|
|
120714
|
-
videoFrameFormat: input2.videoFrameFormat
|
|
120715
|
-
renderStretch: input2.renderStretch
|
|
120680
|
+
videoFrameFormat: input2.videoFrameFormat
|
|
120716
120681
|
}
|
|
120717
120682
|
});
|
|
120718
120683
|
return renderConfigFromRequest(request, { logger: log2 });
|
|
@@ -121261,8 +121226,7 @@ function computePlanHash(input2) {
|
|
|
121261
121226
|
hash2.update(input2.ffmpegVersion, "utf8");
|
|
121262
121227
|
hash2.update(FIELD_DELIMITER);
|
|
121263
121228
|
const d2 = input2.dimensions;
|
|
121264
|
-
|
|
121265
|
-
hash2.update(`${d2.fpsNum}/${d2.fpsDen}x${d2.width}x${d2.height}x${d2.format}${stretchSuffix}`, "utf8");
|
|
121229
|
+
hash2.update(`${d2.fpsNum}/${d2.fpsDen}x${d2.width}x${d2.height}x${d2.format}`, "utf8");
|
|
121266
121230
|
return hash2.digest("hex");
|
|
121267
121231
|
}
|
|
121268
121232
|
function canonicalJsonStringify(value) {
|
|
@@ -121516,7 +121480,6 @@ function buildSyntheticRenderJob(input2) {
|
|
|
121516
121480
|
videoFrameFormat: input2.videoFrameFormat,
|
|
121517
121481
|
outputResolution: input2.outputResolution,
|
|
121518
121482
|
outputResolutionAspectAgnostic: input2.outputResolutionAspectAgnostic,
|
|
121519
|
-
renderStretch: input2.renderStretch,
|
|
121520
121483
|
// Distributed mode hard-pins to software GPU. The plan-time validator
|
|
121521
121484
|
// refuses to fan out otherwise.
|
|
121522
121485
|
useGpu: false,
|
|
@@ -121776,7 +121739,6 @@ async function plan(projectDir, config, planDir) {
|
|
|
121776
121739
|
videoFrameFormat: config.videoFrameFormat,
|
|
121777
121740
|
outputResolution: config.outputResolution,
|
|
121778
121741
|
outputResolutionAspectAgnostic: config.outputResolutionAspectAgnostic,
|
|
121779
|
-
renderStretch: config.renderStretch,
|
|
121780
121742
|
// HDR is banned in distributed mode. force-sdr keeps the
|
|
121781
121743
|
// extract / encoder paths off the HDR branches entirely.
|
|
121782
121744
|
hdrMode: config.hdrMode ?? "force-sdr",
|
|
@@ -121958,8 +121920,7 @@ async function plan(projectDir, config, planDir) {
|
|
|
121958
121920
|
fpsDen: 1,
|
|
121959
121921
|
width,
|
|
121960
121922
|
height,
|
|
121961
|
-
format: config.format
|
|
121962
|
-
renderStretch: config.renderStretch
|
|
121923
|
+
format: config.format
|
|
121963
121924
|
};
|
|
121964
121925
|
try {
|
|
121965
121926
|
rmSync17(workDir, { recursive: true, force: true });
|
|
@@ -122246,8 +122207,6 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath) {
|
|
|
122246
122207
|
width: plan2.dimensions.width,
|
|
122247
122208
|
height: plan2.dimensions.height,
|
|
122248
122209
|
fps: { num: plan2.dimensions.fpsNum, den: plan2.dimensions.fpsDen },
|
|
122249
|
-
// Per-frame seek ×renderStretch maps output frames across [0, intrinsic] (1 = no-op).
|
|
122250
|
-
renderStretch: plan2.dimensions.renderStretch ?? 1,
|
|
122251
122210
|
format: plan2.dimensions.format === "mp4" ? "jpeg" : "png",
|
|
122252
122211
|
quality: plan2.dimensions.format === "mp4" ? 80 : void 0,
|
|
122253
122212
|
deviceScaleFactor: encoder.deviceScaleFactor,
|