hyperframes 0.8.172 → 0.8.173
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/{add-TJNZWO7P.js → add-V7VBTFNG.js} +12 -12
- package/dist/{animatedGifPrep-K4WFG6KK.js → animatedGifPrep-62S72ZY6.js} +7 -7
- package/dist/api.js +13 -13
- package/dist/{asset-QN5J2P7H.js → asset-Z4JI2F6V.js} +2 -2
- package/dist/{assetCataloger-RLFDI5YD.js → assetCataloger-Q7LE7BCC.js} +7 -7
- package/dist/{audio-QJ4C3NMN.js → audio-HIHNLQJ7.js} +13 -13
- package/dist/{auth-K7EHUGWE.js → auth-4K6DSZCD.js} +1 -1
- package/dist/{autoUpdate-76QXHQRT.js → autoUpdate-DXZDD5VT.js} +2 -2
- package/dist/{backgroundChecks-NMYRM5LV.js → backgroundChecks-ODMKKJ4S.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-RENYERF5.js → batchRender-I4BFJGPA.js} +4 -4
- package/dist/{beats-ZOR2HBAR.js → beats-7QCA6GDR.js} +4 -4
- package/dist/{benchmark-CY2VFIKL.js → benchmark-IT4WTSMZ.js} +9 -9
- package/dist/{browser-NPCKLUT7.js → browser-5VHM72PM.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-FKH55KKW.js → bundleWithLocalizedFonts-MKTQCB2Y.js} +2 -2
- package/dist/{capture-IC2QJMMQ.js → capture-B5Y45EWD.js} +10 -10
- package/dist/{capture-TMSBTUYU.js → capture-CMNNIMIL.js} +2 -2
- package/dist/{catalog-N7OCMRPT.js → catalog-AKPJ65GY.js} +12 -12
- package/dist/{catch-up-2MGK5I2D.js → catch-up-2SVYRMD3.js} +4 -4
- package/dist/{check-NU4GL2WC.js → check-Q7AX6K7O.js} +33 -33
- package/dist/{checkBrowser-HRXAL4QD.js → checkBrowser-CPXD5BZY.js} +30 -30
- package/dist/{chunk-VQSSP7XG.js → chunk-2BL7BJ22.js} +1 -1
- package/dist/{chunk-2VR7HIPZ.js → chunk-2DWYRHJS.js} +2 -2
- package/dist/{chunk-257IUNPQ.js → chunk-2QJDC4NT.js} +1 -1
- package/dist/{chunk-G47TXPYN.js → chunk-2TNPXPI5.js} +1 -1
- package/dist/{chunk-AG2O2USE.js → chunk-2YTOJ447.js} +3 -3
- package/dist/{chunk-5B57KZJX.js → chunk-3O45NOL7.js} +1 -1
- package/dist/{chunk-4UR2EQSR.js → chunk-45IAFBUP.js} +15 -17
- package/dist/{chunk-FYR6GKFN.js → chunk-4D2T6Y5Y.js} +3 -3
- package/dist/{chunk-YHECAUDC.js → chunk-4RDDUBOC.js} +6 -6
- package/dist/{chunk-NYXHZOPD.js → chunk-5E43335V.js} +1 -1
- package/dist/{chunk-MEEETF7G.js → chunk-5JTRGGTX.js} +1 -1
- package/dist/{chunk-HN5WVJZB.js → chunk-6HKO6VWS.js} +1 -1
- package/dist/{chunk-DQRZWV3B.js → chunk-6JQDH4O6.js} +1 -1
- package/dist/{chunk-HZWXDKYB.js → chunk-6RIH2NDU.js} +8 -12
- package/dist/chunk-7JDEZNBY.js +3805 -0
- package/dist/{chunk-EDUBJPGL.js → chunk-BCPJSBCS.js} +28 -6
- package/dist/{chunk-UIDRXHUY.js → chunk-BTPZ74Z3.js} +1 -1
- package/dist/{chunk-TV2N4UIJ.js → chunk-BYRHCRU3.js} +1 -1
- package/dist/{chunk-UFAKRR5G.js → chunk-BYVBP3U5.js} +12 -12
- package/dist/{chunk-QVVANKN2.js → chunk-C4QGOXO2.js} +9 -9
- package/dist/{chunk-7DVH2IQQ.js → chunk-CBOYQOLY.js} +1 -1
- package/dist/{chunk-MFWQEG2W.js → chunk-CHALU2TF.js} +1 -1
- package/dist/{chunk-K6SBDWUV.js → chunk-ETPPGNJB.js} +1 -1
- package/dist/{chunk-FQP7TLRF.js → chunk-FDWTZVA6.js} +1 -1
- package/dist/{chunk-KRMOJUVL.js → chunk-H5C375DW.js} +5 -5
- package/dist/{chunk-NLEDKGZT.js → chunk-HCOL75LA.js} +2 -2
- package/dist/{chunk-C2F37AXS.js → chunk-KR5ZHRF2.js} +2 -2
- package/dist/{chunk-EKKROA7V.js → chunk-KRWEUM4R.js} +1 -1
- package/dist/{chunk-DOV2QOFY.js → chunk-L3RCYYON.js} +2 -2
- package/dist/{chunk-CDXC2UQ7.js → chunk-L4SFGSSQ.js} +1 -1
- package/dist/{chunk-ZY43P2M7.js → chunk-LN4SZS7W.js} +1 -1
- package/dist/{chunk-V5IZAL3H.js → chunk-MWNSVO4P.js} +4 -4
- package/dist/{chunk-KRTCHLBA.js → chunk-N7RTLKMM.js} +2 -2
- package/dist/{chunk-Z6L3W5KZ.js → chunk-NOMPG5HQ.js} +2 -2
- package/dist/{chunk-NZ5HOUJH.js → chunk-O433SZAJ.js} +35 -20
- package/dist/{chunk-R73GAMUQ.js → chunk-ODR7V2JL.js} +1 -1
- package/dist/{chunk-M235XUHL.js → chunk-OFFNB2SU.js} +3 -3
- package/dist/{chunk-CUDHVUIF.js → chunk-PBVUVNWP.js} +1 -1
- package/dist/{chunk-R2P2SANE.js → chunk-PCLYCYBK.js} +3 -3
- package/dist/{chunk-UNALPZL6.js → chunk-QURKHVV5.js} +1 -1
- package/dist/{chunk-3RM2ETQT.js → chunk-QVPOR7WE.js} +6 -1
- package/dist/{chunk-KOMXCNZX.js → chunk-ROQBQHBK.js} +1 -1
- package/dist/{chunk-BQYQV6JP.js → chunk-SOAXQ7Q7.js} +2 -2
- package/dist/{chunk-6K2N6WPO.js → chunk-TNHRCZT3.js} +1 -1
- package/dist/{chunk-4N2YVSXH.js → chunk-TWZRU64W.js} +7 -7
- package/dist/{chunk-PDFMNU6D.js → chunk-U7EGMXQR.js} +2 -2
- package/dist/{chunk-Z5ENX63S.js → chunk-V2D4QZBC.js} +13 -7
- package/dist/{chunk-S6JCFZVB.js → chunk-WIAO42MD.js} +2 -2
- package/dist/{chunk-XEJUMBIC.js → chunk-X2ALZSKK.js} +3 -3
- package/dist/{chunk-FXHGO3NH.js → chunk-XDPXSQJO.js} +1 -1
- package/dist/{chunk-QQI7R2QL.js → chunk-XZNKIYIG.js} +1 -1
- package/dist/{chunk-YAA3AOBA.js → chunk-YOOW26KG.js} +2 -2
- package/dist/{clean-JDODBRVL.js → clean-SBFI3ZKR.js} +13 -13
- package/dist/cli.js +53 -53
- package/dist/{cloud-YHJZ72XP.js → cloud-IRE4HLEK.js} +4 -4
- package/dist/{cloudrun-E5EOHYTG.js → cloudrun-GIHWEBGM.js} +5 -5
- package/dist/{compare-VQQXHSE3.js → compare-S6NM2FSV.js} +25 -25
- package/dist/{compiler-I4GWSEK3.js → compiler-WCWRB2LZ.js} +4 -4
- package/dist/{component-WOSMKPL7.js → component-WDFZQ2HN.js} +3 -3
- package/dist/{compositions-WLJE5752.js → compositions-RMUBDPD4.js} +11 -11
- package/dist/{delete-PILRKH5C.js → delete-SDNARGJ4.js} +2 -2
- package/dist/{dist-SDXOTECD.js → dist-65ELHZOF.js} +3 -3
- package/dist/{dist-7TYQROOE.js → dist-FAN2FFAV.js} +2 -2
- package/dist/{doctor-FNICQNSA.js → doctor-YPCZILXV.js} +9 -9
- package/dist/{events-5WNYSVPY.js → events-INXDJ44V.js} +2 -2
- package/dist/{events-YXPWFV5S.js → events-Q2K7SNEZ.js} +3 -3
- package/dist/{feedback-KLA5RSSN.js → feedback-FRGRCTIX.js} +7 -7
- package/dist/{figma-PQIZI67M.js → figma-C262EFOC.js} +3 -3
- package/dist/fontLocalizeCli.js +9 -9
- package/dist/{get-OBOWSUA7.js → get-ZIUUGSVI.js} +2 -2
- package/dist/{gpuPolicy-HWH4OW6H.js → gpuPolicy-FRLW63IY.js} +7 -7
- package/dist/{grade-compare-5IOHWZX6.js → grade-compare-DN342HJC.js} +25 -25
- package/dist/{help-K4IK2N36.js → help-XQPBPSBP.js} +1 -1
- package/dist/{history-AC5ZUFOX.js → history-PF5FUC6M.js} +6 -6
- package/dist/hyperframe-runtime.js +10 -10
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +10 -10
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-BD6555FQ.js → info-PC7IKGVB.js} +8 -8
- package/dist/{init-KTNJH3QB.js → init-ORZX3PSQ.js} +22 -22
- package/dist/{inspect-PF2DWLRP.js → inspect-L5GRL6SP.js} +26 -26
- package/dist/{installer-72NGZ5BM.js → installer-KXS557O7.js} +5 -5
- package/dist/{keyframes-P3GRO3LL.js → keyframes-EIZDSXUH.js} +6 -6
- package/dist/{lambda-XRNX7HLH.js → lambda-U3N7MRD7.js} +6 -6
- package/dist/{layout-KN7SX3WH.js → layout-WHAVE2H5.js} +26 -26
- package/dist/{lint-TXBEZUA5.js → lint-I7PYIW56.js} +8 -8
- package/dist/{lintProject-65YGC4UB.js → lintProject-7IEOAXJY.js} +2 -2
- package/dist/{list-4YL3BA2G.js → list-XXQM3WDO.js} +2 -2
- package/dist/{login-JUI7PHHJ.js → login-64NUUDYU.js} +4 -4
- package/dist/{media-treatment-6DDWZLLE.js → media-treatment-5XIM4A3F.js} +17 -14
- package/dist/{models-CLSFYHTD.js → models-WRB3S67Z.js} +10 -10
- package/dist/{motionShot-WMJSRE67.js → motionShot-BOFBL73C.js} +16 -16
- package/dist/{normalize-audio-YZTHI75G.js → normalize-audio-PP4BSZSU.js} +4 -4
- package/dist/{open-VSJ3TPAB.js → open-F4CUWMZF.js} +29 -5
- package/dist/{parakeetRunner-YCZT3DG2.js → parakeetRunner-O7QYJ7V7.js} +10 -10
- package/dist/{pipeline-RV64A4MZ.js → pipeline-BCHSFFT3.js} +7 -7
- package/dist/{play-CF6TJIQL.js → play-PPBR2GJK.js} +18 -18
- package/dist/{present-5XKI26BN.js → present-Y7VTCZRZ.js} +14 -14
- package/dist/{preview-RORZIRSN.js → preview-53AD4OME.js} +18 -18
- package/dist/{producer-K2H3YFX5.js → producer-WBJDNLBF.js} +1 -1
- package/dist/{projectConfig-Q2ECBQUG.js → projectConfig-4KUGQ4P6.js} +7 -7
- package/dist/{publication-2V3WX4HW.js → publication-OFDIFS4R.js} +3 -3
- package/dist/{publish-7COI3FRD.js → publish-RWWTY743.js} +9 -9
- package/dist/{remove-background-QSOESZXW.js → remove-background-G7VK3VKP.js} +8 -8
- package/dist/{render-3ZLZDN64.js → render-52W63I3Y.js} +9 -9
- package/dist/{render-KHDJ2P4J.js → render-6CXZNXXZ.js} +4 -4
- package/dist/{render-ACRKADG6.js → render-7PPMS4P6.js} +25 -25
- package/dist/{render-batch-OG3JHMDF.js → render-batch-2EJVUVVN.js} +4 -4
- package/dist/renderSetupWorker.js +2 -2
- package/dist/{resolver-ALLVWDQE.js → resolver-FF5GV6IA.js} +5 -5
- package/dist/{sherpa-QY3NGRLC.js → sherpa-QJPI6B5S.js} +9 -9
- package/dist/{skills-YIZYEARC.js → skills-H6ZJNOLH.js} +5 -5
- package/dist/{skillsUpdateCheck-EXZOQQRS.js → skillsUpdateCheck-4EBGMO2A.js} +3 -3
- package/dist/{snapshot-3XMGHMRD.js → snapshot-DZRUBWRH.js} +28 -28
- package/dist/{src-RY4V2ZZT.js → src-WD5GOYON.js} +8 -6
- package/dist/{src-CGIRN4KP.js → src-ZL7ACIZ3.js} +8 -8
- package/dist/{staticProjectServer-4E3ODA5P.js → staticProjectServer-72JF5PPO.js} +14 -14
- package/dist/studio/assets/{hyperframes-player-BDj9J28W.js → hyperframes-player-B-wEZiX3.js} +1 -1
- package/dist/studio/assets/{index-CVxB8lqm.js → index-Bvkb0Zxy.js} +128 -128
- package/dist/studio/assets/{index-DkQKsFxx.css → index-CESvLzz0.css} +1 -1
- package/dist/studio/assets/{index--HWjGqrU.js → index-DPugLDRK.js} +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/{studio-api-LTHBT45F.js → studio-api-BL6CLOA6.js} +8 -8
- package/dist/{studioServer-NDRRYB5V.js → studioServer-TRWCZZXP.js} +55 -46
- package/dist/{telemetry-QBHPMHPC.js → telemetry-FDSW3ZOZ.js} +3 -3
- package/dist/{timeline-J22LXNAI.js → timeline-ZRN336EA.js} +16 -16
- package/dist/{tokens-EAPT2GUT.js → tokens-RMLNQHIB.js} +2 -2
- package/dist/{transcribe-6LCZK44H.js → transcribe-AEHHCYAL.js} +14 -14
- package/dist/{transcribe-L5GHBNR6.js → transcribe-SOODKU6H.js} +8 -8
- package/dist/{updateCheck-B3U7O3QS.js → updateCheck-OSPEYRBY.js} +2 -2
- package/dist/{upgrade-UMJEDSYD.js → upgrade-AK4S7DMX.js} +2 -2
- package/dist/{urlDownloader-SRL6J4NU.js → urlDownloader-FSCMLFG7.js} +6 -6
- package/dist/{validate-I3KHH5Z4.js → validate-JJTCKZIV.js} +20 -22
- package/dist/{video-HWLZYFUC.js → video-ZDM5CFI2.js} +7 -7
- package/package.json +1 -1
- package/dist/chunk-Q2E3DQII.js +0 -3803
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";(()=>{var Pv=Object.create;var Ks=Object.defineProperty;var Ov=Object.getOwnPropertyDescriptor;var Hv=Object.getOwnPropertyNames;var Gv=Object.getPrototypeOf,Bv=Object.prototype.hasOwnProperty;var Uv=(e,t,n)=>t in e?Ks(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wv=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hv(t))!Bv.call(e,i)&&i!==n&&Ks(e,i,{get:()=>t[i],enumerable:!(r=Ov(t,i))||r.enumerable});return e};var Vv=(e,t,n)=>(n=e!=null?Pv(Gv(e)):{},Wv(t||!e||!e.__esModule?Ks(n,"default",{value:e,enumerable:!0}):n,e));var ce=(e,t,n)=>Uv(e,typeof t!="symbol"?t+"":t,n);var gg=me((
|
|
1
|
+
"use strict";(()=>{var Pv=Object.create;var Ks=Object.defineProperty;var Ov=Object.getOwnPropertyDescriptor;var Hv=Object.getOwnPropertyNames;var Gv=Object.getPrototypeOf,Bv=Object.prototype.hasOwnProperty;var Uv=(e,t,n)=>t in e?Ks(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wv=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hv(t))!Bv.call(e,i)&&i!==n&&Ks(e,i,{get:()=>t[i],enumerable:!(r=Ov(t,i))||r.enumerable});return e};var Vv=(e,t,n)=>(n=e!=null?Pv(Gv(e)):{},Wv(t||!e||!e.__esModule?Ks(n,"default",{value:e,enumerable:!0}):n,e));var ce=(e,t,n)=>Uv(e,typeof t!="symbol"?t+"":t,n);var gg=me((eO,Cu)=>{var ue=String,hg=function(){return{isColorSupported:!1,reset:ue,bold:ue,dim:ue,italic:ue,underline:ue,inverse:ue,hidden:ue,strikethrough:ue,black:ue,red:ue,green:ue,yellow:ue,blue:ue,magenta:ue,cyan:ue,white:ue,gray:ue,bgBlack:ue,bgRed:ue,bgGreen:ue,bgYellow:ue,bgBlue:ue,bgMagenta:ue,bgCyan:ue,bgWhite:ue,blackBright:ue,redBright:ue,greenBright:ue,yellowBright:ue,blueBright:ue,magentaBright:ue,cyanBright:ue,whiteBright:ue,bgBlackBright:ue,bgRedBright:ue,bgGreenBright:ue,bgYellowBright:ue,bgBlueBright:ue,bgMagentaBright:ue,bgCyanBright:ue,bgWhiteBright:ue}};Cu.exports=hg();Cu.exports.createColors=hg});var Tu=me(()=>{});var Ta=me((rO,yg)=>{"use strict";var bg=gg(),xg=Tu(),Mi=class e extends Error{constructor(t,n,r,i,o,a){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.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=bg.isColorSupported);let r=d=>d,i=d=>d,o=d=>d;if(t){let{bold:d,gray:m,red:f}=bg.createColors(!0);i=p=>d(f(p)),r=p=>m(p),xg&&(o=p=>xg(p))}let a=n.split(/\r?\n/),s=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;return a.slice(s,l).map((d,m)=>{let f=s+1+m,p=" "+(" "+f).slice(-c)+" | ";if(f===this.line){if(d.length>160){let x=20,y=Math.max(0,this.column-x),v=Math.max(this.column+x,this.endColumn+x),A=d.slice(y,v),C=r(p.replace(/\d/g," "))+d.slice(0,Math.min(this.column-1,x-1)).replace(/[^\t]/g," ");return i(">")+r(p)+o(A)+`
|
|
2
2
|
`+C+i("^")}let b=r(p.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(p)+o(d)+`
|
|
3
3
|
`+b+i("^")}return" "+r(p)+o(d)}).join(`
|
|
4
4
|
`)}toString(){let t=this.showSourceCode();return t&&(t=`
|
|
5
5
|
|
|
6
6
|
`+t+`
|
|
7
|
-
`),this.name+": "+this.message+t}};yg.exports=Mi;Mi.default=Mi});var Ru=me((
|
|
7
|
+
`),this.name+": "+this.message+t}};yg.exports=Mi;Mi.default=Mi});var Ru=me((iO,wg)=>{"use strict";var C_=/(<)(\/?style\b)/gi,T_=/(<)(!--)/g,R_=/[\t\n\f\r "#'()/;[\\\]{}]/;function xt(e){return typeof e!="string"||!e.includes("<")?e:e.replace(C_,"\\3c $2").replace(T_,"\\3c $2")}var Sg={after:`
|
|
8
8
|
`,beforeClose:`
|
|
9
9
|
`,beforeComment:`
|
|
10
10
|
`,beforeDecl:`
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,n){let r;return t.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
16
16
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let n;return t.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
17
17
|
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(r=>{let i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
|
|
18
|
-
`);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],i=t.raws[n];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\uFEFF",t,"start"),this.body(t),t.raws.after){let n=t.raws.after,r=t.parent&&t.parent.type==="document";this.builder(r?n:xt(n))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(xt(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)}};wg.exports=Ni;Ni.default=Ni});var Li=me((
|
|
18
|
+
`);return n=o[o.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],i=t.raws[n];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\uFEFF",t,"start"),this.body(t),t.raws.after){let n=t.raws.after,r=t.parent&&t.parent.type==="document";this.builder(r?n:xt(n))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(xt(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)}};wg.exports=Ni;Ni.default=Ni});var Li=me((oO,_g)=>{"use strict";var N_=Ru();function ku(e,t){new N_(t).stringify(e)}_g.exports=ku;ku.default=ku});var Fi=me((aO,Mu)=>{"use strict";Mu.exports.isClean=Symbol("isClean");Mu.exports.my=Symbol("my")});var Pi=me((sO,Cg)=>{"use strict";var L_=Ta(),F_=Ru(),I_=Li(),{isClean:Ii,my:D_}=Fi();function P_(e,t){let n=new e.constructor,r=[[e,n,t]];for(;r.length>0;){let[i,o,a]=r.pop();for(let s in i){if(!Object.prototype.hasOwnProperty.call(i,s)||s==="proxyCache")continue;let l=i[s],c=typeof l;if(s==="parent"&&c==="object")a&&(o[s]=a);else if(s==="source")o[s]=l;else if(Array.isArray(l)){let d=[];o[s]=d;for(let m of l){let f=new m.constructor;d.push(f),r.push([m,f,o])}}else{if(c==="object"&&l!==null){let d=new l.constructor;r.push([l,d,void 0]),l=d}o[s]=l}}}return n}function Mt(e,t){if(t&&typeof t.offset<"u")return t.offset;let n=1,r=1,i=0;for(let o=0;o<e.length;o++){if(r===t.line&&n===t.column){i=o;break}e[o]===`
|
|
19
19
|
`?(n=1,r+=1):n+=1}return i}var Di=class e{get proxyOf(){return this}constructor(t={}){this.raws={},this[Ii]=!1,this[D_]=!0;for(let n of Object.keys(t))if(n!=="__proto__")if(n==="nodes"){this.nodes=[];for(let r of t[n])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}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=P_(this);for(let r in t)n[r]=t[r];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:r,start:i}=this.rangeBy(n);return this.source.input.error(t,{column:i.column,line:i.line},{column:r.column,line:r.line},n)}return new L_(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markClean(){this[Ii]=!0}markDirty(){if(this[Ii]){this[Ii]=!1;let t=this;for(;t=t.parent;)t[Ii]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Mt(n,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){let o=n.slice(Mt(n,this.source.start),Mt(n,this.source.end)).indexOf(t.word);o!==-1&&(r=this.positionInside(o))}return r}positionInside(t){let n=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,o=Mt(i,this.source.start),a=o+t;for(let s=o;s<a;s++)i[s]===`
|
|
20
|
-
`?(n=1,r+=1):n+=1;return{column:n,line:r,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,r={column:this.source.start.column,line:this.source.start.line,offset:Mt(n,this.source.start)},i=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:Mt(n,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){let a=n.slice(Mt(n,this.source.start),Mt(n,this.source.end)).indexOf(t.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:Mt(n,t.start)}:typeof t.index=="number"&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:Mt(n,t.end)}:typeof t.endIndex=="number"?i=this.positionInside(t.endIndex):typeof t.index=="number"&&(i=this.positionInside(t.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,n){return new F_().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,r=!1;for(let i of t)i===this?r=!0:r?(this.parent.insertAfter(n,i),n=i):this.parent.insertBefore(n,i);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let r=n==null;n=n||new Map;let i=[],o=[[this,i,0]];for(let s=0;s<o.length;s++){let[l,c,d]=o[s],m={};c[d]=m;for(let f in l){if(!Object.prototype.hasOwnProperty.call(l,f)||f==="parent"||f==="proxyCache")continue;let p=l[f];if(Array.isArray(p)){let b=[];m[f]=b;for(let x=0;x<p.length;x++){let y=p[x];typeof y=="object"&&y.toJSON?y.toJSON===e.prototype.toJSON?o.push([y,b,x]):b[x]=y.toJSON(null,n):b[x]=y}}else if(typeof p=="object"&&p.toJSON)p.toJSON===e.prototype.toJSON?o.push([p,m,f]):m[f]=p.toJSON(null,n);else if(f==="source"){if(p==null)continue;let b=n.get(p.input);b==null&&(b=n.size,n.set(p.input,b)),m[f]={end:p.end,inputId:b,start:p.start}}else m[f]=p}}let a=i[0];return r&&(a.inputs=[...n.keys()].map(s=>s.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=I_){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r={}){let i={node:this};for(let o in r)i[o]=r[o];return t.warn(n,i)}};Cg.exports=Di;Di.default=Di});var Hi=me((sO,Tg)=>{"use strict";var O_=Pi(),Oi=class extends O_{constructor(t){super(t),this.type="comment"}};Tg.exports=Oi;Oi.default=Oi});var Bi=me((lO,Rg)=>{"use strict";var H_=Pi(),Gi=class extends H_{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"}};Rg.exports=Gi;Gi.default=Gi});var qt=me((uO,Pg)=>{"use strict";var Mg=Hi(),Ng=Bi(),kg=Pi(),{isClean:Lg,my:Fg}=Fi(),Nu,Ig,Dg,Lu;function G_(e){let t=e.slice();for(;t.length>0;){let n=t.pop();if(delete n.source,n.nodes){n.nodes=n.nodes.slice();for(let r of n.nodes)t.push(r)}}return e.slice()}function B_(e){let t=[e];for(;t.length>0;){let n=t.pop();if(n[Lg]=!1,n.proxyOf.nodes)for(let r of n.proxyOf.nodes)t.push(r)}}var Nt=class e extends kg{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 r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){let n=[this];for(;n.length>0;){let r=n.pop();if(r!==this&&r.cleanRaws!==e.prototype.cleanRaws){r.cleanRaws(t);continue}if(kg.prototype.cleanRaws.call(r,t),r.nodes)for(let i of r.nodes)n.push(i)}}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=t(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}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")?(...r)=>t[n](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):n==="every"||n==="some"?r=>t[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(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 r=this.index(t),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(t,n){let r=this.index(t),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let s of o)this.proxyOf.nodes.splice(r,0,s);let a;for(let s in this.indexes)a=this.indexes[s],r<=a&&(this.indexes[s]=a+o.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=G_(Ig(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"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 Ng(t)]}else if(t.selector||t.selectors)t=[new Lu(t)];else if(t.name)t=[new Nu(t)];else if(t.text)t=[new Mg(t)];else throw new Error("Unknown node type in node creation");return t.map(i=>(i[Fg]||e.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Lg]&&B_(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(i.raws.before=n.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.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 r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(!this.proxyOf.nodes)return;let n=[{iterator:this.getIterator(),node:this.proxyOf}];for(;n.length>0;){let{iterator:r,node:i}=n[n.length-1],o=i.indexes[r];if(o>=i.proxyOf.nodes.length){delete i.indexes[r],n.pop();let l=n[n.length-1];l&&(l.node.indexes[l.iterator]+=1);continue}let a=i.proxyOf.nodes[o],s;try{s=t(a,o)}catch(l){throw a.addToError(l)}if(s===!1){for(let l of n)delete l.node.indexes[l.iterator];return!1}a.walk&&a.proxyOf.nodes?n.push({iterator:a.getIterator(),node:a}):i.indexes[r]+=1}}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Nt.registerParse=e=>{Ig=e};Nt.registerRule=e=>{Lu=e};Nt.registerAtRule=e=>{Nu=e};Nt.registerRoot=e=>{Dg=e};Pg.exports=Nt;Nt.default=Nt;Nt.rebuild=e=>{let t=[e];for(;t.length>0;){let n=t.pop();if(n.type==="atrule"?Object.setPrototypeOf(n,Nu.prototype):n.type==="rule"?Object.setPrototypeOf(n,Lu.prototype):n.type==="decl"?Object.setPrototypeOf(n,Ng.prototype):n.type==="comment"?Object.setPrototypeOf(n,Mg.prototype):n.type==="root"&&Object.setPrototypeOf(n,Dg.prototype),n[Fg]=!0,n.nodes)for(let r of n.nodes)t.push(r)}}});var Ra=me((cO,Hg)=>{"use strict";var Og=qt(),Er=class extends Og{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)}};Hg.exports=Er;Er.default=Er;Og.registerAtRule(Er)});var ka=me((dO,Ug)=>{"use strict";var U_=qt(),Gg,Bg,Gn=class extends U_{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Gg(new Bg,this,t).stringify()}};Gn.registerLazyResult=e=>{Gg=e};Gn.registerProcessor=e=>{Bg=e};Ug.exports=Gn;Gn.default=Gn});var Vg=me((fO,Wg)=>{var W_="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",V_=(e,t=21)=>(n=t)=>{let r="",i=n|0;for(;i-- >0;)r+=e[Math.random()*e.length|0];return r},$_=(e=21)=>{let t="",n=e|0;for(;n-- >0;)t+=W_[Math.random()*64|0];return t};Wg.exports={nanoid:$_,customAlphabet:V_}});var Ma=me(()=>{});var Na=me(()=>{});var Fu=me(()=>{});var $g=me(()=>{});var Iu=me((vO,Kg)=>{"use strict";var{existsSync:q_,readFileSync:z_,realpathSync:j_}=$g(),{dirname:La,isAbsolute:K_,join:Y_,relative:X_,sep:J_}=Ma(),{SourceMapConsumer:qg,SourceMapGenerator:zg}=Na();function jg(e){try{return j_(e)}catch{return e}}function Q_(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Ui=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 r=n.map?n.map.prev:void 0,i=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=La(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new qg(this.json||this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/,a=t.match(i)||t.match(o);if(a)return decodeURIComponent(t.substr(a[0].length));let s=t.match(n)||t.match(r);if(s)return Q_(t.substr(s[0].length));let l=t.slice(22);throw l=l.slice(0,l.indexOf(",")),new Error("Unsupported source map encoding "+l)}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 r=t.lastIndexOf(n.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}loadFile(t,n,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(t)||!n)return;let i=X_(jg(La(n)),jg(t));if(i===".."||i.startsWith(".."+J_)||K_(i))return}if(this.root=La(t),q_(t))return this.mapFile=t,z_(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 r=n(t);if(r){let i=this.loadFile(r,t,!0);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(n instanceof qg)return zg.fromSourceMap(n).toString();if(n instanceof zg)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 r=this.annotation;t&&(r=Y_(La(t),r));let i=this.loadFile(r,t,!1);if(i)try{this.json=JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return i}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};Kg.exports=Ui;Ui.default=Ui});var Wi=me((EO,Zg)=>{"use strict";var{nanoid:Z_}=Vg(),{isAbsolute:Ou,resolve:Hu}=Ma(),{SourceMapConsumer:eC,SourceMapGenerator:tC}=Na(),{fileURLToPath:Yg,pathToFileURL:Fa}=Fu(),Xg=Ta(),nC=Iu(),Du=Tu(),Pu=Symbol("lineToIndexCache"),rC=!!(eC&&tC),Jg=!!(Hu&&Ou);function Qg(e){if(e[Pu])return e[Pu];let t=e.css.split(`
|
|
21
|
-
`),n=new Array(t.length),r=0;for(let i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;return e[Pu]=n,n}var Ar=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&&(!Jg||/^\w+:\/\//.test(n.from)||Ou(n.from)?this.file=n.from:this.file=Hu(n.from)),Jg&&rC){let r=new nC(this.css,n);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Z_(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,i={}){let o,a,s,l,c;if(n&&typeof n=="object"){let m=n,f=r;if(typeof m.offset=="number"){l=m.offset;let p=this.fromOffset(l);n=p.line,r=p.col}else n=m.line,r=m.column,l=this.fromLineAndColumn(n,r);if(typeof f.offset=="number"){s=f.offset;let p=this.fromOffset(s);a=p.line,o=p.col}else a=f.line,o=f.column,s=this.fromLineAndColumn(f.line,f.column)}else if(r)l=this.fromLineAndColumn(n,r);else{l=n;let m=this.fromOffset(l);n=m.line,r=m.col}let d=this.origin(n,r,a,o);return d?c=new Xg(t,d.endLine===void 0?d.line:{column:d.column,line:d.line},d.endLine===void 0?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,i.plugin):c=new Xg(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:o,line:a},this.css,this.file,i.plugin),c.input={column:r,endColumn:o,endLine:a,endOffset:s,line:n,offset:l,source:this.css},this.file&&(Fa&&(c.input.url=Fa(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(t,n){return Qg(this)[t-1]+n-1}fromOffset(t){let n=Qg(this),r=n[n.length-1],i=0;if(t>=r)i=n.length-1;else{let o=n.length-2,a;for(;i<o;)if(a=i+(o-i>>1),t<n[a])o=a-1;else if(t>=n[a+1])i=a+1;else{i=a;break}}return{col:t-n[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Hu(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,i){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n-1,line:t});if(!a.source)return!1;let s;if(typeof r=="number"){let m=o.originalPositionFor({column:i-1,line:r});m.source&&(s=m)}let l;Ou(a.source)?l=Fa(a.source):l=new URL(a.source,this.map.consumer().sourceRoot||Fa(this.map.mapFile));let c={column:a.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:a.line,url:l.toString()};if(l.protocol==="file:")if(Yg)c.file=Yg(l);else throw new Error("file: protocol is not available in this PostCSS build");let d=o.sourceContentFor(a.source);return d&&(c.source=d),c}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}};Zg.exports=Ar;Ar.default=Ar;Du&&Du.registerInput&&Du.registerInput(Ar)});var wr=me((
|
|
22
|
-
`," "];return Vi.split(e,t)},split(e,t,n){if(typeof e!="string")return[];let r=[],i="",o=!1,a=0,s=!1,l="",c=!1;for(let m of e)if(c?c=!1:m==="\\"?c=!0:s?m===l&&(s=!1):m==='"'||m==="'"?(s=!0,l=m):m==="("?a+=1:m===")"?a>0&&(a-=1):a===0&&t.includes(m)&&(o=!0),o){let f=i.trim();(n||f!=="")&&r.push(f),i="",o=!1}else i+=m;let d=i.trim();return(n||d!=="")&&r.push(d),r}};i0.exports=Vi;Vi.default=Vi});var Ia=me((
|
|
20
|
+
`?(n=1,r+=1):n+=1;return{column:n,line:r,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,r={column:this.source.start.column,line:this.source.start.line,offset:Mt(n,this.source.start)},i=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:Mt(n,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){let a=n.slice(Mt(n,this.source.start),Mt(n,this.source.end)).indexOf(t.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:Mt(n,t.start)}:typeof t.index=="number"&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:Mt(n,t.end)}:typeof t.endIndex=="number"?i=this.positionInside(t.endIndex):typeof t.index=="number"&&(i=this.positionInside(t.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,n){return new F_().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,r=!1;for(let i of t)i===this?r=!0:r?(this.parent.insertAfter(n,i),n=i):this.parent.insertBefore(n,i);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let r=n==null;n=n||new Map;let i=[],o=[[this,i,0]];for(let s=0;s<o.length;s++){let[l,c,d]=o[s],m={};c[d]=m;for(let f in l){if(!Object.prototype.hasOwnProperty.call(l,f)||f==="parent"||f==="proxyCache")continue;let p=l[f];if(Array.isArray(p)){let b=[];m[f]=b;for(let x=0;x<p.length;x++){let y=p[x];typeof y=="object"&&y.toJSON?y.toJSON===e.prototype.toJSON?o.push([y,b,x]):b[x]=y.toJSON(null,n):b[x]=y}}else if(typeof p=="object"&&p.toJSON)p.toJSON===e.prototype.toJSON?o.push([p,m,f]):m[f]=p.toJSON(null,n);else if(f==="source"){if(p==null)continue;let b=n.get(p.input);b==null&&(b=n.size,n.set(p.input,b)),m[f]={end:p.end,inputId:b,start:p.start}}else m[f]=p}}let a=i[0];return r&&(a.inputs=[...n.keys()].map(s=>s.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=I_){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r={}){let i={node:this};for(let o in r)i[o]=r[o];return t.warn(n,i)}};Cg.exports=Di;Di.default=Di});var Hi=me((lO,Tg)=>{"use strict";var O_=Pi(),Oi=class extends O_{constructor(t){super(t),this.type="comment"}};Tg.exports=Oi;Oi.default=Oi});var Bi=me((uO,Rg)=>{"use strict";var H_=Pi(),Gi=class extends H_{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"}};Rg.exports=Gi;Gi.default=Gi});var qt=me((cO,Pg)=>{"use strict";var Mg=Hi(),Ng=Bi(),kg=Pi(),{isClean:Lg,my:Fg}=Fi(),Nu,Ig,Dg,Lu;function G_(e){let t=e.slice();for(;t.length>0;){let n=t.pop();if(delete n.source,n.nodes){n.nodes=n.nodes.slice();for(let r of n.nodes)t.push(r)}}return e.slice()}function B_(e){let t=[e];for(;t.length>0;){let n=t.pop();if(n[Lg]=!1,n.proxyOf.nodes)for(let r of n.proxyOf.nodes)t.push(r)}}var Nt=class e extends kg{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 r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){let n=[this];for(;n.length>0;){let r=n.pop();if(r!==this&&r.cleanRaws!==e.prototype.cleanRaws){r.cleanRaws(t);continue}if(kg.prototype.cleanRaws.call(r,t),r.nodes)for(let i of r.nodes)n.push(i)}}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=t(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}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")?(...r)=>t[n](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):n==="every"||n==="some"?r=>t[n]((i,...o)=>r(i.toProxy(),...o)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(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 r=this.index(t),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(t,n){let r=this.index(t),i=r===0?"prepend":!1,o=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let s of o)this.proxyOf.nodes.splice(r,0,s);let a;for(let s in this.indexes)a=this.indexes[s],r<=a&&(this.indexes[s]=a+o.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=G_(Ig(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"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 Ng(t)]}else if(t.selector||t.selectors)t=[new Lu(t)];else if(t.name)t=[new Nu(t)];else if(t.text)t=[new Mg(t)];else throw new Error("Unknown node type in node creation");return t.map(i=>(i[Fg]||e.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Lg]&&B_(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(i.raws.before=n.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.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 r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(!this.proxyOf.nodes)return;let n=[{iterator:this.getIterator(),node:this.proxyOf}];for(;n.length>0;){let{iterator:r,node:i}=n[n.length-1],o=i.indexes[r];if(o>=i.proxyOf.nodes.length){delete i.indexes[r],n.pop();let l=n[n.length-1];l&&(l.node.indexes[l.iterator]+=1);continue}let a=i.proxyOf.nodes[o],s;try{s=t(a,o)}catch(l){throw a.addToError(l)}if(s===!1){for(let l of n)delete l.node.indexes[l.iterator];return!1}a.walk&&a.proxyOf.nodes?n.push({iterator:a.getIterator(),node:a}):i.indexes[r]+=1}}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Nt.registerParse=e=>{Ig=e};Nt.registerRule=e=>{Lu=e};Nt.registerAtRule=e=>{Nu=e};Nt.registerRoot=e=>{Dg=e};Pg.exports=Nt;Nt.default=Nt;Nt.rebuild=e=>{let t=[e];for(;t.length>0;){let n=t.pop();if(n.type==="atrule"?Object.setPrototypeOf(n,Nu.prototype):n.type==="rule"?Object.setPrototypeOf(n,Lu.prototype):n.type==="decl"?Object.setPrototypeOf(n,Ng.prototype):n.type==="comment"?Object.setPrototypeOf(n,Mg.prototype):n.type==="root"&&Object.setPrototypeOf(n,Dg.prototype),n[Fg]=!0,n.nodes)for(let r of n.nodes)t.push(r)}}});var Ra=me((dO,Hg)=>{"use strict";var Og=qt(),Er=class extends Og{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)}};Hg.exports=Er;Er.default=Er;Og.registerAtRule(Er)});var ka=me((fO,Ug)=>{"use strict";var U_=qt(),Gg,Bg,Gn=class extends U_{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Gg(new Bg,this,t).stringify()}};Gn.registerLazyResult=e=>{Gg=e};Gn.registerProcessor=e=>{Bg=e};Ug.exports=Gn;Gn.default=Gn});var Vg=me((mO,Wg)=>{var W_="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",V_=(e,t=21)=>(n=t)=>{let r="",i=n|0;for(;i-- >0;)r+=e[Math.random()*e.length|0];return r},$_=(e=21)=>{let t="",n=e|0;for(;n-- >0;)t+=W_[Math.random()*64|0];return t};Wg.exports={nanoid:$_,customAlphabet:V_}});var Ma=me(()=>{});var Na=me(()=>{});var Fu=me(()=>{});var $g=me(()=>{});var Iu=me((EO,Kg)=>{"use strict";var{existsSync:q_,readFileSync:z_,realpathSync:j_}=$g(),{dirname:La,isAbsolute:K_,join:Y_,relative:X_,sep:J_}=Ma(),{SourceMapConsumer:qg,SourceMapGenerator:zg}=Na();function jg(e){try{return j_(e)}catch{return e}}function Q_(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Ui=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 r=n.map?n.map.prev:void 0,i=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=La(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new qg(this.json||this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/,a=t.match(i)||t.match(o);if(a)return decodeURIComponent(t.substr(a[0].length));let s=t.match(n)||t.match(r);if(s)return Q_(t.substr(s[0].length));let l=t.slice(22);throw l=l.slice(0,l.indexOf(",")),new Error("Unsupported source map encoding "+l)}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 r=t.lastIndexOf(n.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}loadFile(t,n,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(t)||!n)return;let i=X_(jg(La(n)),jg(t));if(i===".."||i.startsWith(".."+J_)||K_(i))return}if(this.root=La(t),q_(t))return this.mapFile=t,z_(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 r=n(t);if(r){let i=this.loadFile(r,t,!0);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(n instanceof qg)return zg.fromSourceMap(n).toString();if(n instanceof zg)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 r=this.annotation;t&&(r=Y_(La(t),r));let i=this.loadFile(r,t,!1);if(i)try{this.json=JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return i}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};Kg.exports=Ui;Ui.default=Ui});var Wi=me((AO,Zg)=>{"use strict";var{nanoid:Z_}=Vg(),{isAbsolute:Ou,resolve:Hu}=Ma(),{SourceMapConsumer:eC,SourceMapGenerator:tC}=Na(),{fileURLToPath:Yg,pathToFileURL:Fa}=Fu(),Xg=Ta(),nC=Iu(),Du=Tu(),Pu=Symbol("lineToIndexCache"),rC=!!(eC&&tC),Jg=!!(Hu&&Ou);function Qg(e){if(e[Pu])return e[Pu];let t=e.css.split(`
|
|
21
|
+
`),n=new Array(t.length),r=0;for(let i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;return e[Pu]=n,n}var Ar=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&&(!Jg||/^\w+:\/\//.test(n.from)||Ou(n.from)?this.file=n.from:this.file=Hu(n.from)),Jg&&rC){let r=new nC(this.css,n);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Z_(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,i={}){let o,a,s,l,c;if(n&&typeof n=="object"){let m=n,f=r;if(typeof m.offset=="number"){l=m.offset;let p=this.fromOffset(l);n=p.line,r=p.col}else n=m.line,r=m.column,l=this.fromLineAndColumn(n,r);if(typeof f.offset=="number"){s=f.offset;let p=this.fromOffset(s);a=p.line,o=p.col}else a=f.line,o=f.column,s=this.fromLineAndColumn(f.line,f.column)}else if(r)l=this.fromLineAndColumn(n,r);else{l=n;let m=this.fromOffset(l);n=m.line,r=m.col}let d=this.origin(n,r,a,o);return d?c=new Xg(t,d.endLine===void 0?d.line:{column:d.column,line:d.line},d.endLine===void 0?d.column:{column:d.endColumn,line:d.endLine},d.source,d.file,i.plugin):c=new Xg(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:o,line:a},this.css,this.file,i.plugin),c.input={column:r,endColumn:o,endLine:a,endOffset:s,line:n,offset:l,source:this.css},this.file&&(Fa&&(c.input.url=Fa(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(t,n){return Qg(this)[t-1]+n-1}fromOffset(t){let n=Qg(this),r=n[n.length-1],i=0;if(t>=r)i=n.length-1;else{let o=n.length-2,a;for(;i<o;)if(a=i+(o-i>>1),t<n[a])o=a-1;else if(t>=n[a+1])i=a+1;else{i=a;break}}return{col:t-n[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Hu(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,i){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:n-1,line:t});if(!a.source)return!1;let s;if(typeof r=="number"){let m=o.originalPositionFor({column:i-1,line:r});m.source&&(s=m)}let l;Ou(a.source)?l=Fa(a.source):l=new URL(a.source,this.map.consumer().sourceRoot||Fa(this.map.mapFile));let c={column:a.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:a.line,url:l.toString()};if(l.protocol==="file:")if(Yg)c.file=Yg(l);else throw new Error("file: protocol is not available in this PostCSS build");let d=o.sourceContentFor(a.source);return d&&(c.source=d),c}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}};Zg.exports=Ar;Ar.default=Ar;Du&&Du.registerInput&&Du.registerInput(Ar)});var wr=me((wO,r0)=>{"use strict";var e0=qt(),t0,n0,fn=class extends e0{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let i=new Set;for(let a of Array.isArray(t)?t:[t])a&&typeof a=="object"&&!a.parent&&a.raws&&typeof a.raws.before<"u"&&i.add(a.raws);let o=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let a of o)i.has(a.raws)||(a.raws.before=n.raws.before)}return o}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new t0(new n0,this,t).stringify()}};fn.registerLazyResult=e=>{t0=e};fn.registerProcessor=e=>{n0=e};r0.exports=fn;fn.default=fn;e0.registerRoot(fn)});var Gu=me((_O,i0)=>{"use strict";var Vi={comma(e){return Vi.split(e,[","],!0)},space(e){let t=[" ",`
|
|
22
|
+
`," "];return Vi.split(e,t)},split(e,t,n){if(typeof e!="string")return[];let r=[],i="",o=!1,a=0,s=!1,l="",c=!1;for(let m of e)if(c?c=!1:m==="\\"?c=!0:s?m===l&&(s=!1):m==='"'||m==="'"?(s=!0,l=m):m==="("?a+=1:m===")"?a>0&&(a-=1):a===0&&t.includes(m)&&(o=!0),o){let f=i.trim();(n||f!=="")&&r.push(f),i="",o=!1}else i+=m;let d=i.trim();return(n||d!=="")&&r.push(d),r}};i0.exports=Vi;Vi.default=Vi});var Ia=me((CO,a0)=>{"use strict";var o0=qt(),iC=Gu(),_r=class extends o0{get selectors(){return iC.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};a0.exports=_r;_r.default=_r;o0.registerRule(_r)});var u0=me((TO,l0)=>{"use strict";var oC=Ra(),aC=Hi(),sC=Bi(),lC=Wi(),uC=Iu(),cC=wr(),dC=Ia();function s0(e,t){return e.inputs?e.inputs.map(n=>{let r={...n,__proto__:lC.prototype};return r.map&&(r.map={...r.map,__proto__:uC.prototype}),r}):t}function fC(e,t,n){let r={...e};if(delete r.inputs,delete r.nodes,r.source){let{inputId:o,...a}=r.source;r.source=a,o!=null&&(r.source.input=t[o])}let i;if(r.type==="root")i=new cC(r);else if(r.type==="decl")i=new sC(r);else if(r.type==="rule")i=new dC(r);else if(r.type==="comment")i=new aC(r);else if(r.type==="atrule")i=new oC(r);else throw new Error("Unknown node type: "+e.type);if(n){i.nodes=n;for(let o of n)o.parent=i}return i}function Da(e,t){if(Array.isArray(e))return e.map(i=>Da(i));let n,r=[{childIndex:0,children:[],inputs:s0(e,t),json:e}];for(;r.length>0;){let i=r[r.length-1],o=i.json.nodes;if(o&&i.childIndex<o.length){let s=o[i.childIndex];i.childIndex+=1,r.push({childIndex:0,children:[],inputs:s0(s,i.inputs),json:s});continue}r.pop();let a=fC(i.json,i.inputs,o?i.children:void 0);r.length>0?r[r.length-1].children.push(a):n=a}return n}l0.exports=Da;Da.default=Da});var Uu=me((RO,h0)=>{"use strict";var{dirname:Pa,relative:d0,resolve:f0,sep:m0}=Ma(),{SourceMapConsumer:p0,SourceMapGenerator:Oa}=Na(),{pathToFileURL:c0}=Fu(),mC=Wi(),pC=!!(p0&&Oa),hC=!!(Pa&&f0&&d0&&m0),Bu=class{constructor(t,n,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=i,this.originalCSS=i,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=`
|
|
23
23
|
`;this.css.includes(`\r
|
|
24
24
|
`)&&(n=`\r
|
|
25
25
|
`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||Pa(t.file),i;this.mapOpts.sourcesContent===!1?(i=new p0(t.text),i.sourcesContent&&(i.sourcesContent=null)):i=t.consumer(),this.map.applySourceMap(i,n,this.toUrl(this.path(r)))}}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="/*# sourceMappingURL=",n;for(;(n=this.css.lastIndexOf(t))!==-1;){let r=this.css.indexOf("*/",n+t.length);if(r===-1)break;for(;n>0&&this.css[n-1]===`
|
|
26
26
|
`;)n--;this.css=this.css.slice(0,n)+this.css.slice(r+2)}}}}generate(){if(this.clearAnnotation(),hC&&pC&&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=Oa.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Oa({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 Oa({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(s,l,c)=>{if(this.css+=s,l&&c!=="end"&&(i.generated.line=t,i.generated.column=n-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=s.match(/\n/g),a?(t+=a.length,o=s.lastIndexOf(`
|
|
27
|
-
`),n=s.length-o):n+=s.length,l&&c!=="start"){let d=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=t,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=n-1,this.map.addMapping(i)))}})}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 r=this.opts.to?Pa(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Pa(f0(r,this.mapOpts.annotation)));let i=d0(r,t);return this.memoizedPaths.set(t,i),i}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 mC(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 r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,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(c0){let r=c0(t).toString();return this.memoizedFileURLs.set(t,r),r}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;m0==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};h0.exports=Bu});var x0=me((RO,b0)=>{"use strict";var Ha=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ga=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,gC=/.[\r\n"'(/\\]/,g0=/[\da-f]/i;b0.exports=function(t,n={}){let r=t.css.valueOf(),i=n.ignoreErrors,o,a,s,l,c,d,m,f,p,b,x=r.length,y=0,v=[],A=[],C=-1;function L(){return y}function H(U){throw t.error("Unclosed "+U,y)}function M(){return A.length===0&&y>=x}function _(U){if(A.length)return A.pop();if(y>=x)return;let Y=U?U.ignoreUnclosed:!1;switch(o=r.charCodeAt(y),o){case 10:case 32:case 9:case 13:case 12:{l=y;do l+=1,o=r.charCodeAt(l);while(o===32||o===10||o===9||o===13||o===12);d=["space",r.slice(y,l)],y=l-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let Z=String.fromCharCode(o);d=[Z,Z,y];break}case 40:{if(b=v.length?v.pop()[1]:"",p=r.charCodeAt(y+1),b==="url"&&p!==39&&p!==34&&p!==32&&p!==10&&p!==9&&p!==12&&p!==13){l=y;do{if(m=!1,l=r.indexOf(")",l+1),l===-1)if(i||Y){l=y;break}else H("bracket");for(f=l;r.charCodeAt(f-1)===92;)f-=1,m=!m}while(m);d=["brackets",r.slice(y,l+1),y,l],y=l}else y<=C?d=["(","(",y]:(l=r.indexOf(")",y+1),a=r.slice(y,l+1),l===-1||gC.test(a)?(C=l===-1?x:l,d=["(","(",y]):(d=["brackets",a,y,l],y=l));break}case 39:case 34:{c=o===39?"'":'"',l=y;do{if(m=!1,l=r.indexOf(c,l+1),l===-1)if(i||Y){l=y+1;break}else H("string");for(f=l;r.charCodeAt(f-1)===92;)f-=1,m=!m}while(m);d=["string",r.slice(y,l+1),y,l],y=l;break}case 64:{Ha.lastIndex=y+1,Ha.test(r),Ha.lastIndex===0?l=r.length-1:l=Ha.lastIndex-2,d=["at-word",r.slice(y,l+1),y,l],y=l;break}case 92:{for(l=y,s=!0;r.charCodeAt(l+1)===92;)l+=1,s=!s;if(o=r.charCodeAt(l+1),s&&o!==47&&o!==32&&o!==10&&o!==9&&o!==13&&o!==12&&(l+=1,g0.test(r.charAt(l)))){for(;g0.test(r.charAt(l+1));)l+=1;r.charCodeAt(l+1)===32&&(l+=1)}d=["word",r.slice(y,l+1),y,l],y=l;break}default:{o===47&&r.charCodeAt(y+1)===42?(l=r.indexOf("*/",y+2)+1,l===0&&(i||Y?l=r.length:H("comment")),d=["comment",r.slice(y,l+1),y,l],y=l):(Ga.lastIndex=y+1,Ga.test(r),Ga.lastIndex===0?l=r.length-1:l=Ga.lastIndex-2,d=["word",r.slice(y,l+1),y,l],v.push(d),y=l);break}}return y++,d}function N(U){A.push(U)}return{back:N,endOfFile:M,nextToken:_,position:L}}});var E0=me((kO,v0)=>{"use strict";var bC=Ra(),xC=Hi(),yC=Bi(),SC=wr(),y0=Ia(),vC=x0(),S0={empty:!0,space:!0};function EC(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}function Wu(e,t,n){let r="";for(let i=t;i<n;i++)r+=e[i][1];return r}var Vu=class{constructor(t){this.input=t,this.root=new SC,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 bC;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,i,o,a=!1,s=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){s=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(n.source.end=this.getPosition(i[3]||i[2]),n.source.end.offset++)}this.end(t);break}else l.push(t);else l.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(n.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(n,"params",l),a&&(t=l[l.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=""),s&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,i;for(let o=n-1;o>=0&&(i=t[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(t){let n=0,r,i,o;for(let[a,s]of t.entries()){if(i=s,o=i[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(t){let n=new xC;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(!r.trim())n.text="",n.raws.left=r,n.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=i[2],n.raws.left=i[1],n.raws.right=i[3]}}createTokenizer(){this.tokenizer=vC(this.input)}decl(t,n){let r=new yC;this.init(r,t[0][2]);let i=t[t.length-1];i[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||EC(t)),r.source.end.offset++;let o=0;for(;t[o][0]!=="word";)o===t.length-1&&this.unknownWord([t[o]]),o++;r.raws.before+=Wu(t,0,o),r.source.start=this.getPosition(t[o][2]);let a=o;for(;o<t.length;){let f=t[o][0];if(f===":"||f==="space"||f==="comment")break;o++}r.prop=Wu(t,a,o);let s=o,l;for(;o<t.length&&(l=t[o],o++,l[0]!==":");)l[0]==="word"&&/\w/.test(l[1])&&this.unknownWord([l]);r.raws.between=Wu(t,s,o),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let c=o;for(;o<t.length;){let f=t[o][0];if(f!=="space"&&f!=="comment")break;o++}let d=t.slice(c,o);t=t.slice(o),this.precheckMissedSemicolon(t);for(let f=t.length-1;f>=0;f--){if(l=t[f],l[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(t,f);p=this.spacesFromEnd(t)+p,p!==" !important"&&(r.raws.important=p);break}else if(l[1].toLowerCase()==="important"){let p=t.slice(0),b="";for(let x=f;x>0;x--){let y=p[x][0];if(b.trim().startsWith("!")&&y!=="space")break;b=p.pop()[1]+b}b.trim().startsWith("!")&&(r.important=!0,r.raws.important=b,t=p)}if(l[0]!=="space"&&l[0]!=="comment")break}t.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=d.map(f=>f[1]).join(""),d=[]),this.raw(r,"value",d.concat(t),n),r.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 y0;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++)}}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,r=null,i=!1,o=null,a=[],s=t[1].startsWith("--"),l=[],c=t;for(;c;){if(r=c[0],l.push(c),r==="("||r==="[")o||(o=c),a.push(r==="("?")":"]");else if(s&&i&&r==="{")o||(o=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(l,s);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),n=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&i){if(!s)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,s)}else this.unknownWord(l)}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,r,i){let o,a,s=r.length,l="",c=!0,d,m;for(let f=0;f<s;f+=1)o=r[f],a=o[0],a==="space"&&f===s-1&&!i?c=!1:a==="comment"?(m=r[f-1]?r[f-1][0]:"empty",d=r[f+1]?r[f+1][0]:"empty",!S0[m]&&!S0[d]?l.slice(-1)===","?c=!1:l+=o[1]:c=!1):l+=o[1];if(!c){let f=r.reduce((p,b)=>p+b[1],"");t.raws[n]={raw:f,value:l}}t[n]=l}rule(t){t.pop();let n=new y0;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let i=n;i<t.length;i++)r+=t[i][1];return t.splice(n,t.length-n),r}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})}};v0.exports=Vu});var Ua=me((MO,A0)=>{"use strict";var AC=qt(),wC=Wi(),_C=E0();function Ba(e,t){let n=new wC(e,t),r=new _C(n);try{r.parse()}catch(i){throw i}return r.root}A0.exports=Ba;Ba.default=Ba;AC.registerParse(Ba)});var $u=me((NO,w0)=>{"use strict";var CC=qt(),{my:TC}=Fi(),$i=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){n.node[TC]||CC.rebuild(n.node);let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}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}};w0.exports=$i;$i.default=$i});var Wa=me((LO,_0)=>{"use strict";var RC=$u(),qi=class{get content(){return this.css}constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,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 r=new RC(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}};_0.exports=qi;qi.default=qi});var qu=me((FO,T0)=>{"use strict";var C0={};T0.exports=function(t){C0[t]||(C0[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var Ku=me((DO,N0)=>{"use strict";var kC=qt(),MC=ka(),NC=Uu(),LC=Ua(),R0=Wa(),FC=wr(),IC=Li(),{isClean:yt,my:DC}=Fi(),IO=qu(),PC={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},OC={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},HC={Once:!0,postcssPlugin:!0,prepare:!0},Cr=0;function zi(e){return typeof e=="object"&&typeof e.then=="function"}function zu(e){let t=!1,n=PC[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,Cr,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,Cr,n+"Exit"]:[n,n+"Exit"]}function k0(e){let t;return e.type==="document"?t=["Document",Cr,"DocumentExit"]:e.type==="root"?t=["Root",Cr,"RootExit"]:t=zu(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function M0(e){let t=[e];for(;t.length>0;){let n=t.pop();if(n[yt]=!1,n.nodes)for(let r of n.nodes)t.push(r)}return e}var ju={},mn=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,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=M0(n);else if(n instanceof e||n instanceof R0)i=M0(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=LC;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(a){this.processed=!0,this.error=a}i&&!i[DC]&&kC.rebuild(i)}this.result=new R0(t,i,r),this.helpers={...ju,postcss:ju,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 r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return t}prepareVisitors(){this.listeners={};let t=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!OC[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!HC[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?t(n,r,n[r][i]):t(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&t(n,r,n[r])}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],r=this.runOnRoot(n);if(zi(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[yt];){t[yt]=!0;let n=[k0(t)];for(;n.length>0;){let r=this.visitTick(n);if(zi(r))try{await r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let i=t.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(t,this.helpers)}catch(i){throw this.handleError(i)}}}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(r=>t.Once(r,this.helpers));return zi(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=IC;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let r=this.result.root.source;if(t.map===void 0&&!(r&&r.input&&r.input.map)){let a="";return n(this.result.root,s=>{a+=s}),this.result.css=a,this.result}let o=new NC(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(zi(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[yt];)t[yt]=!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[r,i]of t){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(zi(o))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[a,s]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return s(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(n.iterator!==0){let a=n.iterator;n.descending&&(n.descending=!1,r.indexes[a]+=1);let s;for(;s=r.nodes[r.indexes[a]];){if(!s[yt]){s[yt]=!0,n.descending=!0,t.push(k0(s));return}r.indexes[a]+=1}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===Cr){r.nodes&&r.nodes.length&&(r[yt]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[yt]=!0;let n=[{eventIndex:0,events:zu(t),iterator:0,node:t}];for(;n.length>0;){let r=n[n.length-1],i=r.node;if(r.iterator!==0){let o=r.iterator;r.descending&&(r.descending=!1,i.indexes[o]+=1);let a,s=!1;for(;a=i.nodes[i.indexes[o]];){if(!a[yt]){a[yt]=!0,r.descending=!0,n.push({eventIndex:0,events:zu(a),iterator:0,node:a}),s=!0;break}i.indexes[o]+=1}if(s)continue;r.iterator=0,delete i.indexes[o]}if(r.eventIndex<r.events.length){let o=r.events[r.eventIndex];if(r.eventIndex+=1,o===Cr)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{let a=this.listeners[o];a&&this.visitSync(a,i.toProxy())&&n.pop()}continue}n.pop()}}warnings(){return this.sync().warnings()}};mn.registerPostcss=e=>{ju=e};N0.exports=mn;mn.default=mn;FC.registerLazyResult(mn);MC.registerLazyResult(mn)});var F0=me((OO,L0)=>{"use strict";var GC=Uu(),BC=Ua(),UC=Wa(),WC=Li(),PO=qu(),ji=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=BC;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let i=WC;this.result=new UC(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 GC(i,void 0,this._opts,n);if(a.isMap()){let[s,l]=a.generate();s&&(this.result.css=s),l&&(this.result.map=l)}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[]}};L0.exports=ji;ji.default=ji});var D0=me((HO,I0)=>{"use strict";var VC=ka(),$C=Ku(),qC=F0(),zC=wr(),Bn=class{constructor(t=[]){this.version="8.5.28",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new qC(this,t,n):new $C(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};I0.exports=Bn;Bn.default=Bn;zC.registerProcessor(Bn);VC.registerProcessor(Bn)});var V0=me((GO,W0)=>{"use strict";var P0=Ra(),O0=Hi(),jC=qt(),KC=Ta(),H0=Bi(),G0=ka(),YC=u0(),XC=Wi(),JC=Ku(),QC=Gu(),ZC=Pi(),e1=Ua(),Yu=D0(),t1=Wa(),B0=wr(),U0=Ia(),n1=Li(),r1=$u();function ve(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Yu(e)}ve.plugin=function(t,n){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
27
|
+
`),n=s.length-o):n+=s.length,l&&c!=="start"){let d=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==d.last||d.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=t,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=n-1,this.map.addMapping(i)))}})}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 r=this.opts.to?Pa(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Pa(f0(r,this.mapOpts.annotation)));let i=d0(r,t);return this.memoizedPaths.set(t,i),i}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 mC(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 r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,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(c0){let r=c0(t).toString();return this.memoizedFileURLs.set(t,r),r}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;m0==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};h0.exports=Bu});var x0=me((kO,b0)=>{"use strict";var Ha=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ga=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,gC=/.[\r\n"'(/\\]/,g0=/[\da-f]/i;b0.exports=function(t,n={}){let r=t.css.valueOf(),i=n.ignoreErrors,o,a,s,l,c,d,m,f,p,b,x=r.length,y=0,v=[],A=[],C=-1;function L(){return y}function H(U){throw t.error("Unclosed "+U,y)}function M(){return A.length===0&&y>=x}function _(U){if(A.length)return A.pop();if(y>=x)return;let Y=U?U.ignoreUnclosed:!1;switch(o=r.charCodeAt(y),o){case 10:case 32:case 9:case 13:case 12:{l=y;do l+=1,o=r.charCodeAt(l);while(o===32||o===10||o===9||o===13||o===12);d=["space",r.slice(y,l)],y=l-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let Z=String.fromCharCode(o);d=[Z,Z,y];break}case 40:{if(b=v.length?v.pop()[1]:"",p=r.charCodeAt(y+1),b==="url"&&p!==39&&p!==34&&p!==32&&p!==10&&p!==9&&p!==12&&p!==13){l=y;do{if(m=!1,l=r.indexOf(")",l+1),l===-1)if(i||Y){l=y;break}else H("bracket");for(f=l;r.charCodeAt(f-1)===92;)f-=1,m=!m}while(m);d=["brackets",r.slice(y,l+1),y,l],y=l}else y<=C?d=["(","(",y]:(l=r.indexOf(")",y+1),a=r.slice(y,l+1),l===-1||gC.test(a)?(C=l===-1?x:l,d=["(","(",y]):(d=["brackets",a,y,l],y=l));break}case 39:case 34:{c=o===39?"'":'"',l=y;do{if(m=!1,l=r.indexOf(c,l+1),l===-1)if(i||Y){l=y+1;break}else H("string");for(f=l;r.charCodeAt(f-1)===92;)f-=1,m=!m}while(m);d=["string",r.slice(y,l+1),y,l],y=l;break}case 64:{Ha.lastIndex=y+1,Ha.test(r),Ha.lastIndex===0?l=r.length-1:l=Ha.lastIndex-2,d=["at-word",r.slice(y,l+1),y,l],y=l;break}case 92:{for(l=y,s=!0;r.charCodeAt(l+1)===92;)l+=1,s=!s;if(o=r.charCodeAt(l+1),s&&o!==47&&o!==32&&o!==10&&o!==9&&o!==13&&o!==12&&(l+=1,g0.test(r.charAt(l)))){for(;g0.test(r.charAt(l+1));)l+=1;r.charCodeAt(l+1)===32&&(l+=1)}d=["word",r.slice(y,l+1),y,l],y=l;break}default:{o===47&&r.charCodeAt(y+1)===42?(l=r.indexOf("*/",y+2)+1,l===0&&(i||Y?l=r.length:H("comment")),d=["comment",r.slice(y,l+1),y,l],y=l):(Ga.lastIndex=y+1,Ga.test(r),Ga.lastIndex===0?l=r.length-1:l=Ga.lastIndex-2,d=["word",r.slice(y,l+1),y,l],v.push(d),y=l);break}}return y++,d}function N(U){A.push(U)}return{back:N,endOfFile:M,nextToken:_,position:L}}});var E0=me((MO,v0)=>{"use strict";var bC=Ra(),xC=Hi(),yC=Bi(),SC=wr(),y0=Ia(),vC=x0(),S0={empty:!0,space:!0};function EC(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}function Wu(e,t,n){let r="";for(let i=t;i<n;i++)r+=e[i][1];return r}var Vu=class{constructor(t){this.input=t,this.root=new SC,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 bC;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,i,o,a=!1,s=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){s=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(n.source.end=this.getPosition(i[3]||i[2]),n.source.end.offset++)}this.end(t);break}else l.push(t);else l.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(n.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(n,"params",l),a&&(t=l[l.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=""),s&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,i;for(let o=n-1;o>=0&&(i=t[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(t){let n=0,r,i,o;for(let[a,s]of t.entries()){if(i=s,o=i[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(t){let n=new xC;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(!r.trim())n.text="",n.raws.left=r,n.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=i[2],n.raws.left=i[1],n.raws.right=i[3]}}createTokenizer(){this.tokenizer=vC(this.input)}decl(t,n){let r=new yC;this.init(r,t[0][2]);let i=t[t.length-1];i[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||EC(t)),r.source.end.offset++;let o=0;for(;t[o][0]!=="word";)o===t.length-1&&this.unknownWord([t[o]]),o++;r.raws.before+=Wu(t,0,o),r.source.start=this.getPosition(t[o][2]);let a=o;for(;o<t.length;){let f=t[o][0];if(f===":"||f==="space"||f==="comment")break;o++}r.prop=Wu(t,a,o);let s=o,l;for(;o<t.length&&(l=t[o],o++,l[0]!==":");)l[0]==="word"&&/\w/.test(l[1])&&this.unknownWord([l]);r.raws.between=Wu(t,s,o),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let c=o;for(;o<t.length;){let f=t[o][0];if(f!=="space"&&f!=="comment")break;o++}let d=t.slice(c,o);t=t.slice(o),this.precheckMissedSemicolon(t);for(let f=t.length-1;f>=0;f--){if(l=t[f],l[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(t,f);p=this.spacesFromEnd(t)+p,p!==" !important"&&(r.raws.important=p);break}else if(l[1].toLowerCase()==="important"){let p=t.slice(0),b="";for(let x=f;x>0;x--){let y=p[x][0];if(b.trim().startsWith("!")&&y!=="space")break;b=p.pop()[1]+b}b.trim().startsWith("!")&&(r.important=!0,r.raws.important=b,t=p)}if(l[0]!=="space"&&l[0]!=="comment")break}t.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=d.map(f=>f[1]).join(""),d=[]),this.raw(r,"value",d.concat(t),n),r.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 y0;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++)}}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,r=null,i=!1,o=null,a=[],s=t[1].startsWith("--"),l=[],c=t;for(;c;){if(r=c[0],l.push(c),r==="("||r==="[")o||(o=c),a.push(r==="("?")":"]");else if(s&&i&&r==="{")o||(o=c),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(l,s);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),n=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(o),n&&i){if(!s)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,s)}else this.unknownWord(l)}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,r,i){let o,a,s=r.length,l="",c=!0,d,m;for(let f=0;f<s;f+=1)o=r[f],a=o[0],a==="space"&&f===s-1&&!i?c=!1:a==="comment"?(m=r[f-1]?r[f-1][0]:"empty",d=r[f+1]?r[f+1][0]:"empty",!S0[m]&&!S0[d]?l.slice(-1)===","?c=!1:l+=o[1]:c=!1):l+=o[1];if(!c){let f=r.reduce((p,b)=>p+b[1],"");t.raws[n]={raw:f,value:l}}t[n]=l}rule(t){t.pop();let n=new y0;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let i=n;i<t.length;i++)r+=t[i][1];return t.splice(n,t.length-n),r}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})}};v0.exports=Vu});var Ua=me((NO,A0)=>{"use strict";var AC=qt(),wC=Wi(),_C=E0();function Ba(e,t){let n=new wC(e,t),r=new _C(n);try{r.parse()}catch(i){throw i}return r.root}A0.exports=Ba;Ba.default=Ba;AC.registerParse(Ba)});var $u=me((LO,w0)=>{"use strict";var CC=qt(),{my:TC}=Fi(),$i=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){n.node[TC]||CC.rebuild(n.node);let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}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}};w0.exports=$i;$i.default=$i});var Wa=me((FO,_0)=>{"use strict";var RC=$u(),qi=class{get content(){return this.css}constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,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 r=new RC(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}};_0.exports=qi;qi.default=qi});var qu=me((IO,T0)=>{"use strict";var C0={};T0.exports=function(t){C0[t]||(C0[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var Ku=me((PO,N0)=>{"use strict";var kC=qt(),MC=ka(),NC=Uu(),LC=Ua(),R0=Wa(),FC=wr(),IC=Li(),{isClean:yt,my:DC}=Fi(),DO=qu(),PC={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},OC={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},HC={Once:!0,postcssPlugin:!0,prepare:!0},Cr=0;function zi(e){return typeof e=="object"&&typeof e.then=="function"}function zu(e){let t=!1,n=PC[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,Cr,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,Cr,n+"Exit"]:[n,n+"Exit"]}function k0(e){let t;return e.type==="document"?t=["Document",Cr,"DocumentExit"]:e.type==="root"?t=["Root",Cr,"RootExit"]:t=zu(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function M0(e){let t=[e];for(;t.length>0;){let n=t.pop();if(n[yt]=!1,n.nodes)for(let r of n.nodes)t.push(r)}return e}var ju={},mn=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,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=M0(n);else if(n instanceof e||n instanceof R0)i=M0(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let o=LC;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(n,r)}catch(a){this.processed=!0,this.error=a}i&&!i[DC]&&kC.rebuild(i)}this.result=new R0(t,i,r),this.helpers={...ju,postcss:ju,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 r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return t}prepareVisitors(){this.listeners={};let t=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!OC[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!HC[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?t(n,r,n[r][i]):t(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&t(n,r,n[r])}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],r=this.runOnRoot(n);if(zi(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[yt];){t[yt]=!0;let n=[k0(t)];for(;n.length>0;){let r=this.visitTick(n);if(zi(r))try{await r}catch(i){let o=n[n.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let i=t.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(t,this.helpers)}catch(i){throw this.handleError(i)}}}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(r=>t.Once(r,this.helpers));return zi(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=IC;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let r=this.result.root.source;if(t.map===void 0&&!(r&&r.input&&r.input.map)){let a="";return n(this.result.root,s=>{a+=s}),this.result.css=a,this.result}let o=new NC(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(zi(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[yt];)t[yt]=!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[r,i]of t){this.result.lastPlugin=r;let o;try{o=i(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(zi(o))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[a,s]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return s(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(n.iterator!==0){let a=n.iterator;n.descending&&(n.descending=!1,r.indexes[a]+=1);let s;for(;s=r.nodes[r.indexes[a]];){if(!s[yt]){s[yt]=!0,n.descending=!0,t.push(k0(s));return}r.indexes[a]+=1}n.iterator=0,delete r.indexes[a]}let o=n.events;for(;n.eventIndex<o.length;){let a=o[n.eventIndex];if(n.eventIndex+=1,a===Cr){r.nodes&&r.nodes.length&&(r[yt]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[yt]=!0;let n=[{eventIndex:0,events:zu(t),iterator:0,node:t}];for(;n.length>0;){let r=n[n.length-1],i=r.node;if(r.iterator!==0){let o=r.iterator;r.descending&&(r.descending=!1,i.indexes[o]+=1);let a,s=!1;for(;a=i.nodes[i.indexes[o]];){if(!a[yt]){a[yt]=!0,r.descending=!0,n.push({eventIndex:0,events:zu(a),iterator:0,node:a}),s=!0;break}i.indexes[o]+=1}if(s)continue;r.iterator=0,delete i.indexes[o]}if(r.eventIndex<r.events.length){let o=r.events[r.eventIndex];if(r.eventIndex+=1,o===Cr)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{let a=this.listeners[o];a&&this.visitSync(a,i.toProxy())&&n.pop()}continue}n.pop()}}warnings(){return this.sync().warnings()}};mn.registerPostcss=e=>{ju=e};N0.exports=mn;mn.default=mn;FC.registerLazyResult(mn);MC.registerLazyResult(mn)});var F0=me((HO,L0)=>{"use strict";var GC=Uu(),BC=Ua(),UC=Wa(),WC=Li(),OO=qu(),ji=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=BC;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let i=WC;this.result=new UC(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 GC(i,void 0,this._opts,n);if(a.isMap()){let[s,l]=a.generate();s&&(this.result.css=s),l&&(this.result.map=l)}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[]}};L0.exports=ji;ji.default=ji});var D0=me((GO,I0)=>{"use strict";var VC=ka(),$C=Ku(),qC=F0(),zC=wr(),Bn=class{constructor(t=[]){this.version="8.5.28",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new qC(this,t,n):new $C(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};I0.exports=Bn;Bn.default=Bn;zC.registerProcessor(Bn);VC.registerProcessor(Bn)});var V0=me((BO,W0)=>{"use strict";var P0=Ra(),O0=Hi(),jC=qt(),KC=Ta(),H0=Bi(),G0=ka(),YC=u0(),XC=Wi(),JC=Ku(),QC=Gu(),ZC=Pi(),e1=Ua(),Yu=D0(),t1=Wa(),B0=wr(),U0=Ia(),n1=Li(),r1=$u();function ve(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Yu(e)}ve.plugin=function(t,n){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
28
28
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("zh")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
29
29
|
https://www.w3ctech.com/topic/2226`));let s=n(...a);return s.postcssPlugin=t,s.postcssVersion=new Yu().version,s}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(a,s,l){return ve([i(l)]).process(a,s)},i};ve.stringify=n1;ve.parse=e1;ve.fromJSON=YC;ve.list=QC;ve.comment=e=>new O0(e);ve.atRule=e=>new P0(e);ve.decl=e=>new H0(e);ve.rule=e=>new U0(e);ve.root=e=>new B0(e);ve.document=e=>new G0(e);ve.CssSyntaxError=KC;ve.Declaration=H0;ve.Container=jC;ve.Processor=Yu;ve.Document=G0;ve.Comment=O0;ve.Warning=r1;ve.AtRule=P0;ve.Result=t1;ve.Input=XC;ve.Rule=U0;ve.Root=B0;ve.Node=ZC;JC.registerPostcss(ve);W0.exports=ve;ve.default=ve});function Df(e){return e?/[\w-]/.test(e)||e.charCodeAt(0)>=128:!1}function Pf(e){return e===" "||e===" "||e===`
|
|
30
30
|
`||e==="\r"||e==="\f"}var $v=/^[0-9a-fA-F]{1,6}/;function qv(e){let t=e>=55296&&e<=57343;return e===0||e>1114111||t?65533:e}function Of(e,t){return e[t]==="\r"&&e[t+1]===`
|
|
@@ -38,8 +38,8 @@ https://www.w3ctech.com/topic/2226`));let s=n(...a);return s.postcssPlugin=t,s.p
|
|
|
38
38
|
0% { outline-color: rgba(59, 130, 246, 0.8); }
|
|
39
39
|
100% { outline-color: transparent; }
|
|
40
40
|
}
|
|
41
|
-
`,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(i=>{i.classList.add("__hf-flash"),setTimeout(()=>i.classList.remove("__hf-flash"),t)})}catch(r){G("bridge.flashElements.querySelector",r)}}var Qo=e=>4*Number.EPSILON*Math.max(1,Math.abs(e));function di(e,t){return!Number.isFinite(e)||!Number.isFinite(t)?e===t:Math.abs(e-t)<=Qo(Math.max(Math.abs(e),Math.abs(t)))}var Wm=(e,t)=>e>=t||di(e,t),on=(e,t,n)=>Wm(e,t)&&e<n&&!di(e,n),rA=1e-6,lr=(e,t,n,r)=>on(e,t,n)||Wm(e,t)&&r>0&&n>=r-rA;var gl=null;function Vm(e){gl=e}function at(e,t){if(gl)try{gl({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch(n){G("runtime.analytics.site1",n)}}function iA(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-"),n=0,r=t.length;for(;n<r&&t[n]==="-";)n++;for(;r>n&&t[r-1]==="-";)r--;let i=t.slice(n,r);return i.length>0?i:"node"}function ur(e){return`--${iA(e)}`}function $m(e){let t=new Map;for(let n of e){let r=ur(n),i=t.get(r);i?i.includes(n)||i.push(n):t.set(r,[n])}return[...t.values()].filter(n=>n.length>1)}function zm(){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,fi(i));let n=ea(),r={...t,...n};for(let i of e)xl(i,r);return r}var qm=new Set;function jm(e){let t=e?.getAttribute("data-composition-variables");if(!t)return[];let n;try{n=JSON.parse(t)}catch{return[]}return Array.isArray(n)?n.filter(r=>!!r&&typeof r=="object"):[]}function oA(e,t){return t?.trim()||e.getAttribute("data-composition-id")?.trim()||e.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()||"composition"}function aA(e){return Array.isArray(e.options)?e.options.map(t=>t&&typeof t=="object"?t.value:t).filter(t=>typeof t=="string"||typeof t=="number"):[]}function sA(e,t){if(typeof e.id!="string")return null;let n=t[e.id];if(n==null||"default"in e&&String(n)===String(e.default))return null;let r=aA(e);return r.length===0||r.some(i=>String(i)===String(n))?null:{id:e.id,value:n,allowed:r}}function xl(e,t,n){if(!e)return;let r=jm(e);if(r.length===0)return;let i=oA(e,n);for(let o of r){let a=sA(o,t);if(!a)continue;let s=`${i}|${a.id}|${String(a.value)}`;if(qm.has(s))continue;qm.add(s);let l="default"in o?JSON.stringify(o.default):"the composition default";console.warn(`[hyperframes] runtime_unknown_enum_value: ${i} variable "${a.id}" got ${JSON.stringify(a.value)}, which is not a declared option (${a.allowed.join(", ")}). Rendering ${l} instead.`)}}function fi(e){let t={};for(let n of jm(e))typeof n.id!="string"||!("default"in n)||(t[n.id]=n.default);return t}var bl="data-hf-css-vars";function Zo(e){return"style"in e&&typeof e.style?.setProperty=="function"}function yl(e,t){if(!Zo(e))return;let n=[];for(let[r,i]of Object.entries(t))if(typeof i=="string"&&i!==""||typeof i=="number"){let o=ur(r);e.style.setProperty(o,String(i)),n.push(o)}n.length>0&&e.setAttribute(bl,n.join(" "))}function Km(e,t,n){let r={};for(let[i,o]of Object.entries(t)){let a=ur(i);((Zo(e)?e.style.getPropertyValue(a):"")||(n?n.getComputedStyle(e).getPropertyValue(a):"")).trim()===""&&(r[i]=o)}return r}function Ym(e){if(!Zo(e))return;let t=e.getAttribute(bl);if(t){for(let n of t.split(" "))n.startsWith("--")&&e.style.removeProperty(n);e.removeAttribute(bl)}}function Xm(e){let t=new Set;e.documentElement?.hasAttribute("data-composition-variables")&&t.add(e.documentElement);for(let i of Array.from(e.querySelectorAll("[data-composition-variables]")))t.add(i);let n=ea(),r=[];for(let i of t)r.push(...lA(i,n,e.defaultView));for(let i of $m(r))console.warn(`composition variables ${i.join(", ")} collapse to the same CSS property ${ur(i[0]??"")}. Rename one to avoid cross-talk`)}function lA(e,t,n){if(!Zo(e))return[];let r=fi(e),i={};for(let[o,a]of Object.entries(r)){if(o in t)continue;let s=ur(o);(e.style.getPropertyValue(s)||(n?n.getComputedStyle(e).getPropertyValue(s):"")).trim()===""&&(i[o]=a)}for(let[o,a]of Object.entries(t))o in r&&(i[o]=a);return yl(e,i),Object.keys(r)}function Jm(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 ea(){if(typeof window>"u")return{};let e=window.__hfVariables;return!e||typeof e!="object"||Array.isArray(e)?{}:e}function ta(e,t,n,r){let i=!1;try{e.pause()}catch(o){i=!0,G(r,o)}try{e.currentTime=t}catch(o){G(n,o)}if(i)try{e.pause()}catch(o){G(r,o)}}function Qm(e){let t=[],n=(f,p=()=>f.getAnimations())=>{if(typeof f.getAnimations!="function")return[];try{return p()}catch{return[]}},r=f=>{let p=new Map;if(t.length===0)return p;let b=typeof CSSAnimation<"u";for(let x of n(document,f)){if(b&&!(x instanceof CSSAnimation))continue;let y=x.effect;if(!y?.target||y.pseudoElement)continue;let v=p.get(y.target);v?v.push(x):p.set(y.target,[x])}return p},i=(f=[],p=[])=>[...p,...f.filter(b=>!p.includes(b)&&b.playState!=="idle")],o=f=>{let p=f.closest("[data-start]")??f;return e?.resolveStartSeconds?e.resolveStartSeconds(p):Number.parseFloat(p.getAttribute("data-start")??"0")||0},a=f=>{let p=A=>(A||"").split(",").map(C=>Number.parseFloat(C)/(C.trim().endsWith("ms")?1e3:1)),b=p(f.animationDuration),x=p(f.animationDelay),y=f.animationName.split(","),v=0;return y.forEach((A,C)=>{if(A.trim()==="none")return;let L=x[C%x.length]+b[C%b.length];L>v&&(v=L)}),{cycleSeconds:v,delays:y.map((A,C)=>x[C%x.length]||0)}},s=(f,p)=>{let b=null;try{b=f.effect?.getComputedTiming?.()??null}catch(y){G("runtime.adapters.css.site5",y)}if(!b)return{};let x=Number(b.endTime);return Number.isFinite(x)?{endSeconds:p+x/1e3}:{unbounded:!0}},l=(f,p)=>{for(let b of f)ta(b,p,"runtime.adapters.css.site1","runtime.adapters.css.site2")},c=f=>{for(let p of f)try{p.play()}catch(b){G("runtime.adapters.css.site3",b)}},d=f=>{for(let p of f)try{p.pause()}catch(b){G("runtime.adapters.css.site4",b)}},m=f=>{f.baseDelay?f.el.style.animationDelay=f.baseDelay:f.el.style.removeProperty("animation-delay"),f.basePlayState?f.el.style.animationPlayState=f.basePlayState:f.el.style.removeProperty("animation-play-state")};return{name:"css",discover:()=>{for(let b of t)m(b);let f=new Map(t.map(b=>[b.el,b.handles]));t=[];let p=document.querySelectorAll("*");for(let b of p){if(!_e(b))continue;let x=window.getComputedStyle(b);!x.animationName||x.animationName==="none"||t.push({el:b,baseDelay:b.style.animationDelay||"",basePlayState:b.style.animationPlayState||"",...a(x),handles:f.get(b)})}},getAnimationCycleEndSeconds:()=>{let f=0;for(let p of t)!p.el.isConnected||p.cycleSeconds<=0||(f=Math.max(f,o(p.el)+p.cycleSeconds));return f>0?f:null},getInferredDurationSeconds:()=>{let f=0;for(let p of t){if(!p.el.isConnected)continue;let b=o(p.el);for(let x of n(p.el)){let y=s(x,b);y.endSeconds!=null&&(f=Math.max(f,y.endSeconds))}}return f>0?f:null},seek:f=>{let p=Number(f.time)||0,b=r(f.pageAnimations);for(let x of t)x.handles=i(x.handles,b.get(x.el));for(let x of t){if(!x.el.isConnected)continue;let y=o(x.el),v=Math.max(0,p-y)*1e3;if(x.handles?.length){x.el.style.animationDelay!==x.baseDelay&&m(x),l(x.handles,v);continue}x.el.style.animationPlayState="paused",x.el.style.animationDelay=x.delays.map(A=>`${Number((A-v/1e3).toFixed(3))}s`).join(", ")}},pause:f=>{let p=r(f?.pageAnimations);for(let b of t){if(!b.el.isConnected)continue;let x=p.get(b.el);x&&(d(x),m(b))}},play:()=>{let f=r();for(let p of t)p.el.isConnected&&(m(p),c(f.get(p.el)??[]))},revert:()=>{t=[]}}}function ia(e,t,n){e.totalDuration?.();let r=e.getChildren?.(!1,!0,!0)??[],i=pA(e,n,t).map(l=>[l,l.ratio,l._zTime,l._act]),o=np(r,t).map(l=>[l,l._ts]),a=new Set;for(let[l]of o)for(let c=l.parent;c&&!a.has(c);c=c.parent)a.add(c);let s=[...a].map(l=>[l,l._dur,l._tDur,l._end,l._dirty]);for(let[l]of o)l._ts=0;try{uA(e,r,t,n)}finally{for(let[l,c]of o)l._ts=c;for(let[l,c,d,m,f]of s)Object.assign(l,{_dur:c,_tDur:d,_end:m,_dirty:f})}for(let[l,c,d,m]of i)l.ratio=c,l._zTime=d,l._act=m}function uA(e,t,n,r){let i=n>=na;e.totalTime(i?n-na:n+na,!0),ap(t,n,i?na:0),e.totalTime(n,!0),!i&&r&&tp(e,r,n)}function tp(e,t,n){for(let r of mA(e,t,n)){let{ratio:i,_zTime:o,_act:a}=r;r.render(0,!0,!0),Object.assign(r,{ratio:i,_zTime:o,_act:a})}}function cA(e){let t=e,[n]="_first"in t?t._first?[t._first]:[]:e.getChildren?.(!1,!0,!0)??[],r=n?.parent;return r!==void 0&&!r._initted}function mi(e,t,n,r){if(typeof e.totalTime!="function")return e.seek(t,n),!1;let i=Number(e.totalTime());return e.totalTime(t,n),t<i&&r&&tp(e,r,t),i!==t||!cA(e)?!1:(ia({totalTime:e.totalTime.bind(e),totalDuration:e.totalDuration?.bind(e),getChildren:e.getChildren?.bind(e)},t,r),!0)}var Sl=1e-6;function np(e,t,n=[]){for(let r of e)r.startTime()>t+Sl?n.push(r):r.getChildren&&r.endTime()>=t&&np(r.getChildren(!1,!0,!0),r.time(),n);return n}function rp(e){return(e.getChildren?.(!0,!0,!0)??[]).filter(t=>{let n=t;return typeof n.getChildren=="function"||n.totalDuration?.()===0})}var Zm=new WeakMap,ep=.05;function dA(e,t){let n=Number(e._start);for(let r=e.parent;r&&r!==t;r=r.parent){if(r._repeat||!r._ts)return null;n=Number(r._start)+n/r._ts}return Number.isFinite(n)?n:null}function fA(e,t){let n={version:t.version,always:[],points:[]};for(let r of rp(e)){let i=r,o=typeof i.getChildren=="function"?null:dA(i,t.owner);o===null?n.always.push(r):n.points.push({at:o,mark:r})}return n.points.sort((r,i)=>r.at-i.at),n}function ip(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1;e[i].at<t?n=i+1:r=i}return n}function op(e,t){let n=Zm.get(t.owner);return n?.version!==t.version&&(n=fA(e,t),Zm.set(t.owner,n)),n}function mA(e,t,n){let{points:r}=op(e,t),i=[];for(let o=ip(r,n-Sl);o<r.length&&!(r[o].at>n+Sl);o++)i.push(r[o].mark);return i}function pA(e,t,n){if(!t)return rp(e);let r=op(e,t),{points:i}=r,o=[...r.always],a=n+ep;for(let s=ip(i,n-ep);s<i.length&&!(i[s].at>a);s++)o.push(i[s].mark);return o}var ra=2e-8,na=.001,hA=e=>{let t=e;return typeof t?.render=="function"&&typeof t.startTime=="function"&&typeof t.paused=="function"&&typeof t.timeScale=="function"&&t.timeScale()>0&&!t.paused()};function gA(e){return e.vars?.keyframes&&(e.render(ra,!0),e.render(-ra,!0)),e._startAt&&e._startAt.render(ra,!0,!0),!!(e.vars?.keyframes||e._startAt)}function ap(e,t,n){for(let r of e.filter(hA)){let i=(t-r.startTime())*r.timeScale();Math.abs(i)<1e-9&&gA(r)||i>0&&bA(r,i,n*r.timeScale())}}function bA(e,t,n){t<n&&e._startAt&&e._startAt.render(ra,!0,!0);let r=e.getChildren?e:e.timeline;r?.getChildren&&t<=e.totalDuration()&&ap(r.getChildren(!1,!0,!0),t,n)}function sp(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let r=Math.max(0,Number(t.time)||0),i=t.suppressEvents===!0;typeof n.totalTime=="function"?(n.totalTime(r,i),ia({totalTime:n.totalTime.bind(n),totalDuration:n.totalDuration?.bind(n),getChildren:n.getChildren?.bind(n)},r)):n.seek(r,i)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function lp(){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??[],r=new Set(n);for(let i of t)r.has(i)||n.push(i);window.__hfAnime=n}catch(e){G("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 r of n)try{typeof r.seek=="function"&&r.seek(t)}catch(i){G("runtime.adapters.animejs.site2",i)}},pause:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.pause=="function"&&t.pause()}catch(n){G("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){G("runtime.adapters.animejs.site4",n)}},revert:()=>{}}}function fp(e){let t=r=>{let i=cp(r),o=i&&typeof i.closest=="function"?i.closest("[data-composition-id]"):null;return o&&e?.resolveStartSeconds?e.resolveStartSeconds(o):0},n=(r,i)=>Math.max(0,i-t(r));return{name:"lottie",discover:()=>{try{let r=window.lottie;if(r&&typeof r.getRegisteredAnimations=="function"){let i=r.getRegisteredAnimations();if(Array.isArray(i)&&i.length>0){let o=window.__hfLottie??[],a=new Set(o);for(let s of i)a.has(s)||o.push(s);window.__hfLottie=o}}}catch(r){G("runtime.adapters.lottie.site1",r)}},seek:r=>{let i=Math.max(0,Number(r.time)||0),o=window.__hfLottie;if(!(!o||o.length===0))for(let a of o)try{let s=n(a,i),l=a.loop===!0;if(oa(a)){let c=s*a.frameRate;a.totalFrames>0&&l?a.goToAndStop(vl(c,a.totalFrames),!0):a.totalFrames>0&&c>=a.totalFrames?a.goToAndStop(a.totalFrames-1,!0):a.goToAndStop(s*1e3,!1)}else if(El(a)){if(typeof a.setFrame=="function"){let c=a.totalFrames??0,d=a.duration??0;if(!Number.isFinite(c)||c<=0||!Number.isFinite(d)||d<=0)continue;let m=s*c/d;a.setFrame(Math.min(l?vl(m,c):m,c-1))}else if(typeof a.setCurrentRawFrameValue=="function"){let c=a.totalFrames??0,d=a.frameRate??30,m=l&&c>0?vl(s*d,c):s*d;c>0&&a.setCurrentRawFrameValue(Math.min(m,c-1))}else if(typeof a.seek=="function"){let c=a.duration??0;if(Number.isFinite(c)&&c>0){let d=Math.min(100,(l?s%c:s)/c*100);a.seek(d)}}}}catch(s){G("runtime.adapters.lottie.site2",s)}},pause:()=>{let r=window.__hfLottie;if(!(!r||r.length===0))for(let i of r)try{(oa(i)||El(i))&&i.pause()}catch(o){G("runtime.adapters.lottie.site3",o)}},revert:()=>{},getInferredDurationSeconds:()=>up((r,i)=>i),getAnimationCycleEndSeconds:()=>up((r,i)=>cp(r)?.isConnected===!1?null:t(r)+i)}}function up(e){let t=window.__hfLottie;if(!t||t.length===0)return null;let n=0,r=!1;for(let i of t){let o=null;try{let a=xA(i);o=a==null?null:e(i,a)}catch(a){G("runtime.adapters.lottie.site4",a)}o!=null&&(r=!0,n=Math.max(n,o))}return r?n:null}function cp(e){return oa(e)?e.wrapper:e.canvas}function vl(e,t){let n=e%t;return t-n<1e-6?0:n}function dp(e,t){return!Number.isFinite(e)||!e||e<=0||!Number.isFinite(t)||!t||t<=0?null:e/t}function xA(e){return oa(e)?dp(e.totalFrames,e.frameRate):El(e)?Number.isFinite(e.duration)&&(e.duration??0)>0?e.duration??null:dp(e.totalFrames,e.frameRate):null}function oa(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function El(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}var Al=-1,wl=new Set,mp=new WeakSet,cr,_l=0;function pp(e){let t=[],n=!0,r={time:e,waitUntil:i=>{if(!n)throw new Error("hf-seek waitUntil() must be called synchronously from the event listener");t.push(i)}};try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:r}))}catch(i){G("runtime.adapters.seek-dispatch.site1",i)}finally{n=!1}t.length!==0&&st(Promise.all(t))}function st(e,t){let n=e.then(()=>({status:"fulfilled"})).catch(r=>({status:"rejected",reason:r}));wl.add(n),t==="video-frame"&&mp.add(n),n.then(r=>{wl.delete(n)&&r.status==="rejected"&&cr===void 0&&(cr={reason:r.reason})})}function aa(e){e!==Al&&(Al=e,pp(e))}function sa(e){Al=e,pp(e)}function hp(){return _l>0}async function Cl(e){let t=()=>[...wl].filter(r=>e?.videoFrames!==!1||!mp.has(r));_l+=1;let n=cr;try{await Promise.resolve();for(let i=t();i.length>0;i=t()){let a=(await Promise.all(i)).find(s=>s.status==="rejected");n===void 0&&a?.status==="rejected"&&(n={reason:a.reason})}let r=cr;if(n===void 0&&(n=r),cr===r&&(cr=void 0),n)throw n.reason}finally{_l-=1}}function gp(){let e=null,t=0,n=null,r=null,i=null,o=null,a=()=>{if(typeof window>"u")return null;let d=window.THREE?.DefaultLoadingManager;return!d||typeof d!="object"||typeof d.itemsLoaded!="number"||typeof d.itemsTotal!="number"?null:d},s=c=>{o||c.itemsTotal<=c.itemsLoaded||(o=new Promise(d=>{c.onLoad=function(){try{i?.call(this)}finally{o=null,c.onLoad=i??null,d()}}}))},l=c=>{n!==c&&(n=c,r=c.onStart??null,i=c.onLoad??null,c.onStart=function(d,m,f){try{r?.call(this,d,m,f)}finally{s(c)}})};return{name:"three",discover:()=>{let c=a();c&&(l(c),s(c))},seek:c=>{e=Math.max(0,Number(c.time)||0),t=e,window.__hfThreeTime=e,aa(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0},getReadyPromise:()=>{let c=a();return!c||c.itemsTotal<=c.itemsLoaded?null:(o||s(c),o)}}}function Tt(e){let t=null,n=new WeakSet;return{name:e.name,discover:()=>{},seek:()=>{},pause:()=>{},play:()=>{},revert:()=>{},getReadyPromise:()=>{let r=e.getInstances();if(r.length===0)return null;let i=r.filter(o=>!n.has(o));return i.length===0?null:t||(t=Promise.allSettled(i.map(o=>e.waitFor(o).then(()=>{n.add(o)}))).then(()=>{t=null}),t)}}}function bp(){return Tt({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 xp(){return Tt({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 yp(){return Tt({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 Sp(){return Tt({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 vp(){return Tt({name:"d3",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfD3;return Array.isArray(e)?e:[]},waitFor:e=>e.end()})}var yA=250;function Ep(){let e=null,t=0,n=null,r=()=>{n!==null&&(window.clearInterval(n),n=null)},i=()=>{n===null&&document.querySelector("[data-composition-id][data-requires-webgpu]")&&(n=window.setInterval(()=>{e!==null&&(hp()||(window.__hfTypegpuTime=e,sa(e)))},yA))};return{name:"typegpu",discover:()=>{},seek:o=>{e=Math.max(0,Number(o.time)||0),t=e,window.__hfTypegpuTime=e,aa(e)},pause:()=>{e==null&&(e=Math.max(0,t)),i()},play:()=>{r(),e=null},revert:()=>{r(),e=null,t=0}}}var SA=["width","height","top","left","right","bottom","inset","object-fit","object-position","z-index","opacity","visibility","filter","mix-blend-mode","backdrop-filter","border-width","border-style","border-color","border-radius","overflow","clip-path","mask","mask-image","mask-size","mask-position","mask-repeat","transform","transform-origin","translate","rotate","scale","box-sizing"];function Tl(e){return Number.isFinite(e)&&e>0?e:30}function Rl(e){return Number.isFinite(e)&&e>0?e:0}function kl(e,t){let n=Tl(t);return Math.floor(Rl(e)*n+1e-9)/n}function wp(e,t,n){let r=Number.isInteger(n)?n:1;if(r<=1)return kl(e,t);let i=Tl(t)*r;return Math.round(Rl(e)*i)/i}function Ap(e,t){let n=Tl(t),r=Rl(e),i=r*n,o=Math.round(i);return Math.abs(i-o)<=.001?o/n:r}function la(e,t,n){return{start:Ap(e,n),end:Number.isFinite(t)?Ap(t,n):t}}function _p(e,t,n=SA){for(let r of n){let i=t.getPropertyValue(r);i&&e.setProperty(r,i)}}var dr=new Map,Cp=()=>dr.size>0;function Tp(e){if(dr.has(e.element))throw new Error("This element already has a frame source");let t=e.sourceRange;if(t&&(!Number.isFinite(t.start)||t.start<0||!Number.isFinite(t.duration)||t.duration<=0||!Number.isFinite(t.fps)||t.fps<=0))throw new Error("Frame source ranges require a nonnegative start, positive duration and FPS");let n=new AbortController,r=new Promise(c=>{n.signal.addEventListener("abort",()=>c(),{once:!0})}),i=Promise.race([Promise.resolve(e.ready),r]);i.catch(()=>{});let o=null,a=null,s=async()=>{let c;try{for(await i;!n.signal.aborted&&o!==null;){let d=o;o=null;try{await Promise.race([e.render(d,n.signal),r])}catch(m){c??(c={reason:m})}}if(c)throw c.reason}finally{o=null,a=null}},l={element:e.element,ready:i,seek(c){return o=t?t.start+Math.min(Math.max(0,c),Math.max(0,t.duration-1/t.fps)):c,a??(a=s()),a},dispose(){n.signal.aborted||(n.abort(),o=null,dr.delete(e.element),e.dispose?.())}};return dr.set(e.element,l),l.dispose}function Rp(e){let t=new Set,n=[],r=null,i=()=>{for(let s of t)dr.get(s.element)!==s&&t.delete(s);let a=[];for(let[s,l]of dr){if(!s.isConnected){l.dispose();continue}t.has(l)||(t.add(l),st(l.ready)),a.push([s,l])}return a},o=new MutationObserver(()=>{i()});return o.observe(document,{childList:!0,subtree:!0}),{name:"frame-source",discover:()=>{i()},pause:()=>{},seek:({time:a})=>{for(let[s,l]of i()){let c=e.start(s),d=e.duration(s),m=c+(d??1/0),f=e.exportRenderSeek()?la(c,m,e.canonicalFps()):{start:c,end:m};if(!lr(a,f.start,f.end,e.compositionDuration()))continue;let p=Math.max(0,a-c),b=nr(s)+Fn(_t(s),p);st(l.seek(b))}},getReadyPromise:()=>{let a=i().map(([,s])=>s);return a.length===0?null:((a.length!==n.length||a.some((s,l)=>s!==n[l]))&&(n=a,r=Promise.all(a.map(s=>s.ready))),r)},revert:()=>{o.disconnect();for(let a of t)a.dispose();t.clear()}}}var kp=':not([muted]):is(:not([data-has-audio]),[data-has-audio="true"])',FI=`audio[data-start], video[data-start]${kp}`;function ua(e){if(e.tagName.toLowerCase()!=="video"||e.hasAttribute("muted"))return!1;let t=e.getAttribute("data-has-audio");return t===null||t==="true"}function Mp(e){return(e.volume??1)>1||!!(e.fxChain||e.automation||e.audioGroup||e.masterChain)}var pi="data-hf-render-id",Np="data-hf-group-render-id";function vA(e){return e.getAttribute(pi)||e.id||null}var EA="__render_frame_",AA="__";function wA(e){return`${EA}${e}${AA}`}function _A(e){let t=vA(e);return t?wA(t):null}function ht(e){let t=_A(e),n=t?document.getElementById(t):null;if(!n)return null;let r=e.nextElementSibling;for(;r&&r.id!==t;)r=r.nextElementSibling;return r??(r=n),We(r)?r:null}function Lp(e){let t=e.nextElementSibling;if(We(t)&&t.classList.contains("__render_frame__")&&t.complete&&t.naturalWidth>0)return t;let n=ht(e);return n&&n.complete&&n.naturalWidth>0?n:null}function Fp(){let e=globalThis.GPUQueue;if(!e?.prototype?.copyExternalImageToTexture)return;let t=e.prototype.copyExternalImageToTexture;e.prototype.copyExternalImageToTexture=function(n,r,i){if(Se(n?.source)){let o=Lp(n.source);if(o)return t.call(this,{...n,source:o},r,i)}return t.call(this,n,r,i)}}function Ip(){let e=[globalThis.WebGL2RenderingContext,globalThis.WebGLRenderingContext],t=["texImage2D","texSubImage2D"];for(let n of e){let r=n?.prototype;if(r)for(let i of t){let o=r[i];if(typeof o!="function"||o.__hfVideoPatched)continue;let a=function(...s){let l=s.length-1,c=s[l];if(Se(c)){let d=Lp(c);d&&(s[l]=d)}return o.apply(this,s)};a.__hfVideoPatched=!0,r[i]=a}}}function Dp(){let e=!1,t=0,n=!1,r,i,o,a=new Set,s=new WeakMap,l=(y=()=>document.getAnimations())=>{if(!document.getAnimations)return[];try{return y()}catch{return[]}},c=y=>{let v=Number(y.currentTime);return Number.isFinite(v)&&v>0?v:0},d=(y,v)=>v<=0?y:y>=v?Math.max(0,y-v):y,m=(y,v)=>{let A=s.get(y);if(A)return A;let C={compositionTimeMs:v,animationTimeMs:e?d(c(y),v):c(y)};return s.set(y,C),C},f=(y,v)=>{if(!a.has(y)){a.add(y);let A=()=>{a.delete(y)};try{y.addEventListener("finish",A,{once:!0}),y.addEventListener("cancel",A,{once:!0})}catch(C){G("runtime.adapters.waapi.site4",C)}}m(y,v)},p=(y,v)=>{for(let A of y)f(A,v)},b=()=>{if(n||typeof Element>"u")return;let y=Element.prototype;if(typeof y.animate!="function"||y.__hfOriginalAnimate)return;let v=y.animate;try{Object.defineProperty(y,"__hfOriginalAnimate",{value:v,configurable:!0});let A=function(...C){let L=v.apply(this,C);return f(L,t),L};y.animate=A,r=y,i=v,o=A,n=!0}catch{}},x=y=>{let v=null;try{v=y.effect?.getComputedTiming?.()??null}catch(L){G("runtime.adapters.waapi.site4",L)}if(!v)return{};let A=Number(v.endTime);return Number.isFinite(A)?{endSeconds:(s.get(y)?.compositionTimeMs??0)/1e3+A/1e3}:{unbounded:!0}};return{name:"waapi",discover:()=>{e=!0,b(),p(l(),t)},seek:y=>{let v=Math.max(0,(Number(y.time)||0)*1e3);t=v,(!e||a.size>0)&&p(l(y.pageAnimations),e?v:0);for(let A of a){let C=e?m(A,v):m(A,0),L=C.animationTimeMs+Math.max(0,v-C.compositionTimeMs);ta(A,L,"runtime.adapters.waapi.site1","runtime.adapters.waapi.site2")}},pause:y=>{e||p(l(y?.pageAnimations),t);for(let v of a)try{v.pause()}catch(A){G("runtime.adapters.waapi.site3",A)}},revert:()=>{if(a.clear(),s=new WeakMap,e=!1,t=0,r&&i&&o&&r.animate===o)try{r.animate=i,r.__hfOriginalAnimate===i&&delete r.__hfOriginalAnimate}catch(y){G("runtime.adapters.waapi.site5",y)}r=void 0,i=void 0,o=void 0,n=!1},getInferredDurationSeconds:()=>{let y=0;for(let v of l()){let A=x(v);A.endSeconds!=null&&(y=Math.max(y,A.endSeconds))}return y>0?y:null}}}function CA(e,t,n){let r=e.filter(o=>Number.isFinite(o.time)&&Number.isFinite(o.volume)).map(o=>({time:Math.max(0,o.time-t),volume:ot(o.volume)})).sort((o,a)=>o.time-a.time),i=[];for(let o of r){let a=i.at(-1);a&&Math.abs(a.time-o.time)<1e-9?a.volume=o.volume:i.push(o)}return i.length===0||i[0].time>0&&i.unshift({time:0,volume:ot(n)}),i}function Pp(e,t){if(e.length===0)return 1;let n=0;for(;n<e.length-2&&t>=e[n+1].time;)n+=1;let r=e[n],i=e[n+1]??r,o=i.time-r.time,a=o<=0?0:Math.min(1,Math.max(0,(t-r.time)/o));return r.volume+(i.volume-r.volume)*a}function TA(e,t,n,r){let i=e.at(-1);!i||Math.abs(i.volume-n.volume)>1e-4?(i&&t&&t.time>i.time&&e.push(t),e.push(n)):r&&n.time>i.time&&e.push(n)}function RA(e){let t=Number.parseFloat(e??"");return Number.isFinite(t)?t:void 0}function kA(e,t){let n=Ye({timelineRegistry:window.__timelines,includeAuthoredTimingAttrs:!0}).resolveMediaStartForElement(e),r=Le(e.dataset.end)??void 0,i=Le(e.dataset.duration)??void 0,o=t;i!==void 0&&i>0?o=n+i:r!==void 0&&r>n&&(o=r);let a=RA(e.dataset.volume)??1;return{start:n,end:o,staticVolume:ot(a)}}function MA(e,t,n,r,{start:i,end:o,staticVolume:a}){let s=1/Math.min(60,Math.max(1,r)),l=Math.max(0,i),c=Math.min(n,o),d=fm(e,()=>{e.volume=a;let f=[],p;for(let b=l;b<=c+1e-6;b=Math.min(c,b+s)){t(b);let x=Number(e.volume);if(Number.isFinite(x)){let y={time:Number(b.toFixed(6)),volume:Number(ot(x).toFixed(6))};TA(f,p,y,b===c),p=y}if(b===c)break}return f});return d.some(f=>Math.abs(f.volume-a)>1e-4)?d:null}function ca(e,t,n=0){return n>3||e===null||typeof e!="object"?!1:Array.isArray(e)?e.some(r=>ca(r,t,n+1)):Object.getPrototypeOf(e)!==Object.prototype?!1:Object.entries(e).some(([r,i])=>t(r)||ca(i,t,n+1))}var NA=e=>typeof e?.nodeType=="number";function LA(e,t){for(let n=Object(e);n;n=Object.getPrototypeOf(n)){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return typeof r.set=="function"}return!1}function Ml(e){let t={elements:new Set,anySetter:!1,unknown:!0};if(typeof e.getChildren!="function")return t;try{let n={elements:new Set,anySetter:!1,unknown:!1};for(let r of e.getChildren(!0,!0,!1)){let i=r.targets?.()??[];for(let o of i)NA(o)?ca(r.vars,a=>a==="volume")&&n.elements.add(o):!n.anySetter&&ca(r.vars,a=>LA(o,a))&&(n.anySetter=!0)}return n}catch{return t}}var FA=(e,t)=>e.unknown||e.anySetter||e.elements.has(t);function Op(e,t,n,r,i={}){if(i.allowLiveTimelineSeek===!1||!t||!pe(e)||n<=0||!FA(i.movers?.()??Ml(t),e))return;let o=c=>{try{typeof t.totalTime=="function"?t.totalTime(c,!0):typeof t.seek=="function"&&t.seek(c,!0)}catch{}},a=typeof t.totalTime=="function"?Number(t.totalTime()):typeof t.seek=="function"?Number(t.seek()):0,s=kA(e,n),l=MA(e,o,n,60,s);if(Number.isFinite(a)&&o(a),l){let c=CA(l,s.start,s.staticVolume);c.length>0&&r.set(e,c)}}var Bp="data-fade-in",Up="data-fade-out",JI=Bp.slice(5),QI=Up.slice(5),Wp=Object.freeze({fadeIn:0,fadeOut:0});function Nl(e){return Number.isFinite(e)&&e>0?e:0}function Hp(e){return e==null||e===""?0:Nl(Number.parseFloat(e))}function Vp(e){return{fadeIn:Hp(e.getAttribute(Bp)),fadeOut:Hp(e.getAttribute(Up))}}function IA(e,t){let n=Nl(e.fadeIn),r=Nl(e.fadeOut);if(!Number.isFinite(t)||t<=0)return{fadeIn:n,fadeOut:r};let i=n+r;if(i<=t)return{fadeIn:n,fadeOut:r};let o=t/i;return{fadeIn:n*o,fadeOut:r*o}}function $p(e,t,n){if(!Number.isFinite(e))return 1;let{fadeIn:r,fadeOut:i}=IA(n,t),o=1;return r>0&&(o*=Gp(e/r)),i>0&&Number.isFinite(t)&&(o*=Gp((t-e)/i)),o}function Gp(e){return!Number.isFinite(e)||e<0?0:e>1?1:e}var fr="hf-audio-group",da="data-audio-group";function Ll(e){let t=e?.getAttribute("data-volume"),n=t?parseFloat(t):1;return Number.isFinite(n)?n:1}function Fl(e,t){let n=Array.from(e?.querySelectorAll?.(`${fr}[${pi}]`)??[]).find(i=>i.getAttribute(pi)===t);if(n)return n;let r=e?.getElementById(t)??null;return r&&r.tagName?.toLowerCase()===fr?r:null}function fa(e,t){let n=t?.getAttribute?.(Np)??t?.getAttribute?.(da);return n?Fl(e,n)?.hasAttribute("data-hidden")??!1:!1}function Il(e){let t=e.querySelector("[data-composition-id]");return t&&!t.parentElement?.closest("[data-composition-id]")?t:null}function qp(e){return Il(e)?.getAttribute(Gt)||void 0}function ma(e){return typeof e.tagName!="string"||typeof e.getAttribute!="function"||!DA(e)?null:e.getAttribute(da)||null}function DA(e){return e.tagName.toLowerCase()==="audio"?!0:typeof e.hasAttribute=="function"&&ua(e)}function zp(e){let t="__hf-audio-group-inert";if(!e?.head||e.getElementById(t))return;let n=e.createElement("style");n.id=t,n.textContent=`${fr}{display:none!important}`,e.head.appendChild(n)}function Rt(e){return nr(e)}var jp=["seeked","loadeddata","error","emptied","abort"],Bl=5e3,pa=new WeakMap;function Kp(e){let t=e.readyState<e.HAVE_CURRENT_DATA&&e.networkState===e.NETWORK_LOADING&&!window.__HF_EXPORT_RENDER_SEEK_CONFIG;e.tagName!=="VIDEO"||!(e.seeking||t)||ht(e)||(pa.get(e)?.(),st(new Promise(n=>{let r=o=>{if(!(o?.type==="loadeddata"&&e.seeking)){clearTimeout(i);for(let a of jp)e.removeEventListener(a,r,!0);pa.get(e)===r&&pa.delete(e),n()}},i=setTimeout(r,Bl);for(let o of jp)e.addEventListener(o,r,!0);pa.set(e,r)}),"video-frame"))}function Xp(e){let t=e.isVideo?e.explicitDuration??e.sourceDuration:e.sourceDuration,n=(e.isVideo?[t,e.hostRemaining]:[t,e.hostRemaining,e.explicitDuration]).filter(r=>r!=null&&Number.isFinite(r)&&r>=0);return n.length>0?Math.min(...n):null}function Jp(e){let t=e?.elements??Array.from(document.querySelectorAll("video, audio")),n=e?.shouldIncludeElement?t.filter(a=>e.shouldIncludeElement?.(a)):t.filter(a=>a.hasAttribute("data-start")),r=[],i=[],o=0;for(let a of n){let s=e?.resolveStartSeconds?e.resolveStartSeconds(a):Number.parseFloat(a.dataset.start??"0");if(!Number.isFinite(s))continue;let l=Rt(a),c=Qe(a),d=_t(a),m=a.loop,f=Number.isFinite(a.duration)&&a.duration>0?a.duration:null,p=e?.resolveDurationSeconds?.(a)??Number.parseFloat(a.dataset.duration??"");(!Number.isFinite(p)||p<0)&&f!=null&&(p=Math.max(0,In(d,f-l)));let x=Number.isFinite(p)&&p>=0?s+p:Number.POSITIVE_INFINITY,y=s,v=Dn({start:s,end:x},e?.resolveHostSlots?.(a)??[]);(v.start!==s||v.end!==x)&&({start:s,end:x}=v,p=x-s);let A=Number.parseFloat(a.dataset.volume??""),C={el:a,start:s,origin:y,mediaStart:l,duration:Number.isFinite(x)?p:Number.POSITIVE_INFINITY,end:x,volume:Number.isFinite(A)?A:null,playbackRate:c,rate:d,loop:m,sourceDuration:f,fades:Vp(a)};r.push(C),a.tagName==="VIDEO"&&i.push(C),Number.isFinite(x)&&(o=Math.max(o,x))}return{timedMediaEls:n,mediaClips:r,videoClips:i,maxMediaEnd:o}}var Ol=new WeakMap,ha=new WeakMap,hi=new WeakMap,Hl=new WeakSet,mr=new WeakSet,Dl=new WeakSet;function PA(e){if(mr.has(e))return;mr.add(e);let t=()=>mr.delete(e);e.addEventListener("playing",t,{once:!0}),e.addEventListener("pause",t,{once:!0}),e.addEventListener("error",t,{once:!0})}var OA=3;function Ul(e){return e.error!=null||e.networkState===OA}var Gl=new WeakMap;function Pl(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):1}function Wl(e){Ol.delete(e),ha.delete(e),hi.delete(e),Hl.delete(e),Gl.delete(e),gi.delete(e)}var Vl=.5,$l=1.5;function HA(e,t,n,r){let{el:i}=e,o=e.start-t;if(!n||i.tagName!=="VIDEO"||o<=0||o>$l*r||!i.paused||i.seeking||i.readyState<i.HAVE_METADATA||ht(i)||"__HF_EXPORT_RENDER_SEEK_CONFIG"in window&&window.__HF_EXPORT_RENDER_SEEK_CONFIG)return;let a=e.mediaStart+Fn(e.rate??e.playbackRate,e.start-(e.origin??e.start));if(e.sourceDuration!=null){let s=e.sourceDuration-e.mediaStart;e.loop&&s>0&&a>=e.sourceDuration?a=e.mediaStart+(a-e.mediaStart)%s:e.loop||(a=Math.min(a,e.sourceDuration))}if(!(!Number.isFinite(a)||a<0||Math.abs(i.currentTime-a)<=.001))try{i.currentTime=a}catch(s){G("runtime.media.preseek",s)}}var an=.04,Yp=1/16,GA=.03,BA=.01,gi=new WeakMap;function UA(e,t,n){let r=Math.sign(t),i=gi.get(e);if(Math.abs(t)>an)gi.set(e,r);else if(i!==r||Math.abs(t)<=BA)return gi.delete(e),n;return n*(1+r*GA)}function Qp(e){let t=!!(e.outputMuted||e.userMuted);for(let n of e.clips){let{el:r}=n;if(!r.isConnected)continue;let i=n.rate??n.playbackRate,o=n.origin??n.start,a=r.tagName==="VIDEO"&&!n.loop,s=on(e.timeSeconds,n.start,n.end),l=n.start-e.timeSeconds,c=r.tagName==="AUDIO"&&!s&&l>0&&l*Math.max(1,fl(i,n.start-o))<=Math.max(e.cueAheadSeconds??0,Dl.has(r)?an:0);c?Dl.add(r):Dl.delete(r);let d=a&&!s&&(e.timeSeconds>=n.end||di(e.timeSeconds,n.end))&&lr(e.timeSeconds,n.start,n.end,e.getCompositionDuration()),m=Fn(i,Math.max(0,Math.min(e.timeSeconds,n.end)-o))+n.mediaStart,f=d||a&&n.sourceDuration!=null&&m>=n.sourceDuration&&s;f&&n.sourceDuration!=null&&(m=Math.min(m,n.sourceDuration));let p=ha.get(r),b=r.tagName==="AUDIO"&&(p===void 0||m<p-.04),x=!n.loop&&n.sourceDuration!=null&&m>=n.mediaStart&&m<n.sourceDuration&&(a||b);if((s||d||c)&&m>=0&&(!r.ended||n.loop||f||x)){if(ha.set(r,m),n.loop&&n.sourceDuration!=null&&n.sourceDuration>0){let J=n.sourceDuration-n.mediaStart;J>0&&m>=n.sourceDuration&&(m=n.mediaStart+(m-n.mediaStart)%J)}let A=Pl(e.userVolume??1),C=ot(n.volume??1),L=Gl.get(r),H=Pl(r.volume),M,_=ym(r,e.timeSeconds-o);if(_!==null)M=ot(_);else if(n.volumeKeyframes&&n.volumeKeyframes.length>0){let J=e.timeSeconds-o;M=ot(Pp(n.volumeKeyframes,J))}else e.isWebAudioRouted?.(r)?M=C:L===void 0?M=C>1?C:H:Math.abs(H-L)>1e-4?M=H:M=C;let N=n.fades??Wp;(N.fadeIn>0||N.fadeOut>0)&&(M*=$p(e.timeSeconds-o,n.duration+n.start-o,N));let Y=r.closest("[data-hidden]")!==null||fa(r.ownerDocument,r)?0:Pl(M*A);r.volume=Y,Gl.set(r,Y),e.onElementVolume?.(r,Y,M),(t||e.isWebAudioOwned?.(r))&&(r.muted=!0),r.preload!=="auto"&&(r.preload="auto");let Z=fl(i,e.timeSeconds-o)*e.playbackRate,O=e.playing&&Z>=Yp,I=2,D=r.currentTime||0,R=Math.abs(D-m),V=m-D,se=Ol.get(r);Ol.set(r,V);let j=se===void 0,ne=!j&&Math.abs(V-se)>.5,w=R>3,k=r.tagName==="AUDIO"&&j&&D-m>an,K=f&&R>.001||r.ended&&x&&R>.001||k||R>Vl&&(j||ne||w),$=r.tagName==="VIDEO"&&!r.paused&&O,z=e.playing&&!O||se!==void 0&&Math.abs(V-se)<.004,re=!1;if(!$&&!K&&!j&&z&&R>an){let J=(hi.get(r)??0)+1;hi.set(r,J),J>=I&&(re=!0,hi.set(r,0))}else R<=an&&hi.set(r,0);let ie=!$&&e.forceSync&&R>.02;try{(!$||K)&&gi.delete(r);let J=Math.max(Yp,$&&!K?UA(r,V,Z):Z);Math.abs(r.playbackRate-J)>1e-6&&(r.playbackRate=J)}catch(J){G("runtime.media.site1",J)}if(K||re||ie){if(!(r.tagName==="VIDEO"&&!!ht(r))){try{r.currentTime=m}catch(ee){G("runtime.media.site2",ee)}if(Math.abs(r.currentTime-m)>.5&&!Hl.has(r)){Hl.add(r),r.load();try{r.currentTime=m}catch(ee){G("runtime.media.site3",ee)}}Kp(r)}mr.delete(r)}else O||Kp(r);f?r.paused||r.pause():O&&r.paused&&!mr.has(r)&&!Ul(r)?(PA(r),r.play().catch(J=>{mr.delete(r),(J&&typeof J=="object"&&"name"in J?String(J.name??""):"")==="NotAllowedError"&&e.onAutoplayBlocked?.()})):!O&&!r.paused&&r.pause();continue}let v=on(e.timeSeconds,n.start,n.end);Wl(r),v&&ha.set(r,m),r.paused||r.pause(),HA(n,e.timeSeconds,e.playing,e.playbackRate)}}var sn=new WeakMap;function bi(e){return sn.has(e)?sn.get(e)??null:e.getAttribute("src")}async function ql(e,t){let n=0;for(;t();){let r=await fetch(e,{headers:{Range:"bytes=0-0"},cache:"no-store"}).catch(()=>null);r?.body?.cancel().catch(()=>{});let i=r?.status===202||r?.status===503;if(!i&&r?.ok)return!0;if(!i&&++n>3)return!1;let o=Math.min(Number(r?.headers.get("Retry-After"))||2,30);await new Promise(a=>setTimeout(a,o*1e3))}return!1}var eh="hf-proxy-box",WA=[256,362,512,724,1024,1448,2048,2896,4096,5792,8192];function Zp(e){return e>0?WA.find(t=>t>=e)??null:null}function th(e,t){let n=Zp(e),r=Zp(t);return n&&r?{width:n,height:r}:null}function nh(e){return`${e.width}x${e.height}`}var VA="hf-proxy",rh="runtime_media_proxy_fallback",ih="runtime_media_proxy_unavailable",oh=new WeakSet,xi=new WeakMap;function ga(e){return e.currentSrc||e.src}var pr=window.parent===window?1:null,ah=()=>{},$A=new Promise(e=>ah=e),qA=1e3,Si=new Map,yi=new WeakMap;function zA(){return pr!==null?Promise.resolve(pr):Promise.race([$A.then(()=>pr),new Promise(e=>setTimeout(()=>e(null),qA))])}function sh(e,t){if(getComputedStyle(e).objectFit==="none")return null;let n=e.getBoundingClientRect(),r=document.documentElement,i=t*(window.devicePixelRatio||1);return th(Math.max(n.width,r.clientWidth)*i,Math.max(n.height,r.clientHeight)*i)}function lh(e){if(!(!(e>0)||!Number.isFinite(e))){pr=e,ah();for(let t of Si.keys())uh(t,e)}}function uh(e,t){let n=Si.get(e);if(!n)return;if(!e.isConnected||e.getAttribute("src")!==n.href){Si.delete(e);return}let r=sh(e,t);if(r&&r.width<=n.box.width&&r.height<=n.box.height)return;let i=r&&{width:Math.max(r.width,n.box.width),height:Math.max(r.height,n.box.height)},o=dh(n.originalSrc,n.variant,i);if(yi.get(e)===o)return;yi.set(e,o);let a=()=>yi.get(e)===o&&e.isConnected&&e.getAttribute("src")===n.href;ql(o,a).then(s=>{s&&a()&&ch(e,o,n.originalSrc,n.variant,i),yi.get(e)===o&&yi.delete(e)})}function ch(e,t,n,r,i){i?Si.set(e,{originalSrc:n,variant:r,href:t,box:i}):Si.delete(e),Wl(e),e.src=t,e.load()}function zl(e){return window.__HF_EXPORT_RENDER_SEEK_CONFIG?!0:Se(e)&&!!ht(e)}function jl(e){let t=ga(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 jA(e,t){let n=null;for(let r of Object.keys(t))e.endsWith(r)&&(n===null||r.length>n.length)&&(n=r);return n?t[n]??null:null}function KA(e,t){let n=e.normalize("NFC").toLowerCase(),r=-1,i=null,o=!1;for(let[a,s]of Object.entries(t)){let l=a.normalize("NFC").toLowerCase();n.endsWith(l)&&(l.length>r?(r=l.length,i=s,o=!1):l.length===r&&(o=!0))}return o?null:i}function Kl(e,t){return t[e]??jA(e,t)??KA(e,t)}function dh(e,t,n){let r=new URL(e,document.baseURI);return r.searchParams.set(VA,t),n&&r.searchParams.set(eh,nh(n)),r.href}var YA={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 ln(e,t,n){if(oh.has(e))return;oh.add(e);let r=YA[t];Ae({source:"hf-preview",type:"diagnostic",code:ih,details:{asset:n,codecName:null,reason:t,note:r}}),console.info(`[hyperframes] ${ih}: "${n}" (${t}): ${r}`)}function Yl(e,t=null,n="reactive"){if(sn.has(e)||xi.has(e)&&xi.get(e)===e.getAttribute("src"))return;let r=ga(e),i=t?t.hasAlpha?"vp8":"h264":"auto";try{new URL(r,document.baseURI)}catch(d){G("runtime.mediaProxy.swap",d),ln(e,"invalid_source_url",r);return}let o=e.getAttribute("src");xi.set(e,o);let a=()=>e.isConnected&&e.getAttribute("src")===o,s=zA().then(async d=>{let m=d===null?null:sh(e,d),f=dh(r,i,m),p=await ql(f,a);if(!a()){xi.get(e)===o&&xi.delete(e);return}if(!p){ln(e,"proxy_playback_failed",r);return}return sn.set(e,o),ch(e,f,r,i,m),pr!==null&&uh(e,pr),new Promise(b=>{e.addEventListener("loadeddata",b,{once:!0}),e.addEventListener("error",b,{once:!0})})});st(Promise.race([s,new Promise(d=>setTimeout(d,Bl))]),"video-frame");let l=t?.codecName??null;Ae({source:"hf-preview",type:"diagnostic",code:rh,details:{asset:r,codecName:l,trigger:n,note:"render output is unaffected; only this preview element was swapped to an authoring proxy"}}),console.info(`[hyperframes] ${rh}: "${r}" uses a codec (${l??"unknown"}) this browser can't decode; auto-swapped to an authoring proxy for this preview only. Render output is unaffected.`)}function fh(e){if(zl(e)||!Se(e)||sn.has(e))return;let t=window.__HF_MEDIA_CODEC_MAP__;if(!t)return;let n=jl(e);if(n===null)return;let r=Kl(n,t);if(!r||!r.browserHostile)return;let i=r.representativeMime?e.canPlayType(r.representativeMime):"";i==="probably"||i==="maybe"||Yl(e,r,"proactive")}function mh(e){if(zl(e)||!Se(e)||e.videoWidth!==0)return;let t=ga(e);if(sn.has(e)){ln(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let r=jl(e);if(r===null){ln(e,"cross_origin",t);return}let i=Kl(r,n);if(i&&!i.browserHostile){ln(e,"browser_safe_codec",t);return}Yl(e,i,"reactive")}function ph(e){if(zl(e)||!Se(e))return;let t=ga(e);if(sn.has(e)){ln(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let r=jl(e);if(r===null){ln(e,"cross_origin",t);return}let i=Kl(r,n);if(i&&!i.browserHostile){ln(e,"browser_safe_codec",t);return}Yl(e,i,"tertiary")}var Ge=class extends Error{constructor(n,r=null){super(r==null?n:`${n} at line ${r}`);ce(this,"lineNumber");this.name="CubeLutParseError",this.lineNumber=r}},XA=[0,0,0],JA=[1,1,1],ba=64;function QA(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r==='"'&&(t=!t),r==="#"&&!t)return e.slice(0,n)}return e}function un(e,t){let n=Number(e);if(!Number.isFinite(n))throw new Ge(`Invalid number "${e}"`,t);return n}function hh(e,t,n){if(e.length!==3)throw new Ge(`${t} expects three numbers`,n);return[un(e[0],n),un(e[1],n),un(e[2],n)]}function gh(e,t,n){if(!e)throw new Ge(`${t} expects a size`,n);let r=Number(e);if(!Number.isInteger(r)||r<2)throw new Ge(`${t} must be an integer greater than 1`,n);return r}function ZA(e,t){if(t[0]<=e[0]||t[1]<=e[1]||t[2]<=e[2])throw new Ge("DOMAIN_MAX values must be greater than DOMAIN_MIN values")}function ew(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 tw(e){return/^[+-]?(?:\d|\.\d)/.test(e)}function bh(e,t={}){let n=t.maxSize??ba,r=null,i=XA,o=JA,a=null,s=null,l=[],c=e.replace(/^\uFEFF/,"").split(/\r?\n/);for(let m=0;m<c.length;m++){let f=m+1,p=QA(c[m]??"").trim();if(!p)continue;let b=p.split(/\s+/),x=(b[0]??"").toUpperCase(),y=b.slice(1);if(x==="TITLE"){r=ew(p);continue}if(x==="DOMAIN_MIN"){i=hh(y,x,f);continue}if(x==="DOMAIN_MAX"){o=hh(y,x,f);continue}if(x==="LUT_3D_INPUT_RANGE"){if(y.length!==2)throw new Ge(`${x} expects two numbers`,f);let v=un(y[0],f),A=un(y[1],f);if(A<=v)throw new Ge("LUT_3D_INPUT_RANGE max must exceed min",f);i=[v,v,v],o=[A,A,A];continue}if(x==="LUT_1D_SIZE"){a=gh(y[0],x,f);continue}if(x==="LUT_3D_SIZE"){if(s=gh(y[0],x,f),s>n)throw new Ge(`LUT_3D_SIZE ${s} exceeds max ${n}`,f);continue}if(!tw(x)){if(x.startsWith("LUT_"))throw new Ge(`Unsupported cube keyword ${x}`,f);continue}if(!s)throw a?new Ge("1D cube LUTs are not supported yet",f):new Ge("LUT data appears before LUT_3D_SIZE",f);if(b.length!==3)throw new Ge("LUT data rows must contain three numbers",f);l.push(un(b[0],f),un(b[1],f),un(b[2],f))}if(a&&s)throw new Ge("Mixed 1D and 3D cube LUTs are not supported yet");if(!s)throw a?new Ge("1D cube LUTs are not supported yet"):new Ge("Missing LUT_3D_SIZE");ZA(i,o);let d=s*s*s;if(l.length!==d*3)throw new Ge(`Expected ${d} LUT rows for size ${s}, found ${l.length/3}`);return{title:r,size:s,domainMin:i,domainMax:o,data:new Float32Array(l)}}function nw(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function vi(e){return Math.round(nw(e)*255)}function Xl(e){let t=e.size,n=t*t,r=t,i=new Uint8Array(n*r*4);for(let o=0;o<t;o++)for(let a=0;a<t;a++)for(let s=0;s<t;s++){let l=((o*t+a)*t+s)*3,c=(a*n+o*t+s)*4;i[c]=vi(e.data[l]??0),i[c+1]=vi(e.data[l+1]??0),i[c+2]=vi(e.data[l+2]??0),i[c+3]=255}return{width:n,height:r,data:i}}var xh="rec709";var Ce={hueDegrees:{min:0,max:360,inclusiveMax:!1},unit:{min:0,max:1},signedUnit:{min:-1,max:1},secondaryHueRange:{min:0,max:180},secondaryHueSoftness:{min:0,max:180},secondaryHueCombinedMax:180,secondarySoftRangeSoftness:{min:0,max:.5},secondaryHueShift:{min:-180,max:180},effects:{asciiStyle:{min:0,max:7},bloom:{min:0,max:3},bloomRadius:{min:1,max:100},monoScreenShape:{min:0,max:4}}};var yh=["exposure","contrast","highlights","shadows","whites","blacks","temperature","tint","vibrance","saturation"],Sh=["shadows","midtones","highlights"],vh=["master","red","green","blue"],Eh=["hueVsHue","hueVsSaturation","hueVsLuma"];var Ah=["vignette","vignetteMidpoint","vignetteRoundness","vignetteFeather","grain","grainSize","grainRoughness"],wh=["blur","pixelate","chromaBleed","tapeDamage","tapeTracking","tapeNoise","tapeSpeed","filmArtifacts","halftone","halftoneSize","twoInkPrint","twoInkPrintSize","ascii","asciiSize","asciiInvert","asciiStyle","asciiColor","asciiRotation","dither","ditherSize","bloom","bloomRadius","monoScreen","monoScreenSize","monoScreenAngle","monoScreenSpread","monoScreenShape","monoScreenInvert","scanlines","scanlineCount","scanlineSoftness","chromaticAberration","chromaticAngle","crtCurvature","digitalGlitch","digitalGlitchColorSplit","digitalGlitchLineTear","digitalGlitchPixelate","digitalGlitchBlockAmount","digitalGlitchBlockDisplacement","digitalGlitchBlockOpacity","digitalGlitchSpeed","engraving","engravingSpacing","engravingMinThickness","engravingMaxThickness","engravingAngle","engravingContrast","engravingSharpness","engravingWave","engravingWaveFrequency","crosshatch","crosshatchSpacing","crosshatchThickness","crosshatchAngle","crosshatchContrast","crosshatchEdges","crosshatchLineWeight","crosshatchWave","crosshatchWaveFrequency","kuwahara","kuwaharaRadius","kuwaharaSharpness","kuwaharaSaturation"];var DD=Ce.unit,PD=Ce.signedUnit,OD=Ce.effects;var kt=1024,Ei=16;function _h(e,t,n,r){let i=((2*e+t)*n-e*r)/(e+t);return Math.sign(i)!==Math.sign(n)?0:Math.sign(n)!==Math.sign(r)&&Math.abs(i)>3*Math.abs(n)?3*n:i}function Be(e,t){let n=e[t];if(n===void 0)throw new RangeError("Color curve points must be contiguous");return n}function rw(e){let t=[],n=[],r=Be(e,0);for(let a of e.slice(1)){let s=a[0]-r[0];t.push(s),n.push((a[1]-r[1])/s),r=a}let i=Be(n,0);if(e.length===2)return[i,i];let o=new Array(e.length);o[0]=_h(Be(t,0),Be(t,1),i,Be(n,1)),o[o.length-1]=_h(Be(t,t.length-1),Be(t,t.length-2),Be(n,n.length-1),Be(n,n.length-2));for(let a=1;a<e.length-1;a+=1){let s=Be(n,a-1),l=Be(n,a);if(s===0||l===0||Math.sign(s)!==Math.sign(l)){o[a]=0;continue}let c=Be(t,a-1),d=Be(t,a),m=2*d+c,f=d+2*c;o[a]=(m+f)/(m/s+f/l)}return o}function Ch(e,t){if(e.length<2)throw new RangeError("A color curve requires at least two points");if(!Number.isInteger(t)||t<2)throw new RangeError("Curve LUT size must be at least 2");let n=Number.NEGATIVE_INFINITY;for(let[r,i]of e){if(!Number.isFinite(r)||!Number.isFinite(i))throw new TypeError("Color curve points must be finite");if(r<=n)throw new RangeError("Color curve inputs must be strictly increasing");n=r}}function iw(e,t,n){if(!Number.isFinite(t)||!Number.isFinite(n)||t>=n)throw new RangeError("Curve output bounds must be finite and increasing");if(e.some(([,r])=>r<t||r>n))throw new RangeError(`Curve outputs must be between ${t} and ${n}`)}function ow(e,t,n,r,i){let o=n[0]-t[0],a=Math.min(1,Math.max(0,(e-t[0])/o)),s=a*a,l=s*a;return(2*l-3*s+1)*t[1]+(l-2*s+a)*o*r+(-2*l+3*s)*n[1]+(l-s)*o*i}function Th(e,t,n,r,i){iw(e,r,i);let o=rw(e),a=new Float32Array(t),s=0;for(let l=0;l<t;l+=1){let c=n(l);for(;s<e.length-2&&c>Be(e,s+1)[0];)s+=1;let d=Be(e,s),m=Be(e,s+1),f=ow(c,d,m,Be(o,s),Be(o,s+1));a[l]=Math.min(i,Math.max(r,f))}return a}function hr(e,t=kt){if(Ch(e,t),e.length>Ei)throw new RangeError(`A color curve supports at most ${Ei} points`);if(e.some(([n])=>n<0||n>1))throw new RangeError("Color curve inputs must be between 0 and 1");if(e[0]?.[0]!==0||e[e.length-1]?.[0]!==1)throw new RangeError("Color curves must include input endpoints 0 and 1");return Th(e,t,n=>n/(t-1),0,1)}function Ql(e,t,n,r=kt){if(e.length<3)throw new RangeError("A hue curve requires at least three points");if(e.length>Ei)throw new RangeError(`A hue curve supports at most ${Ei} points`);let i=[...e].sort((l,c)=>l[0]-c[0]);for(let l=0;l<i.length;l+=1){let c=i[l];if(!c||c[0]<0||c[0]>=360)throw new RangeError("Hue curve inputs must be from 0 up to 360 degrees");if(l>0&&c[0]===i[l-1]?.[0])throw new RangeError("Hue curve inputs must be unique")}let o=i.slice(-2).map(([l,c])=>[l-360,c]),a=i.slice(0,2).map(([l,c])=>[l+360,c]),s=[...o,...i,...a];return Ch(s,r),Th(s,r,l=>l/r*360,t,n)}var Ai="data-color-grading",Pn="data-hf-color-grading-source-hidden",On="data-hf-authored-opacity",Lh="__hf_color_grading_",sw=xh,tu={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},nu={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},ru={blur:0,pixelate:0,chromaBleed:0,tapeDamage:0,tapeTracking:0,tapeNoise:1,tapeSpeed:.5,filmArtifacts:0,halftone:0,halftoneSize:0,twoInkPrint:0,twoInkPrintSize:0,ascii:0,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0,dither:0,ditherSize:0,bloom:0,bloomRadius:8,monoScreen:0,monoScreenSize:0,monoScreenAngle:0,monoScreenSpread:0,monoScreenShape:0,monoScreenInvert:0,scanlines:0,scanlineCount:0,scanlineSoftness:0,chromaticAberration:0,chromaticAngle:0,crtCurvature:0,digitalGlitch:0,digitalGlitchColorSplit:0,digitalGlitchLineTear:0,digitalGlitchPixelate:0,digitalGlitchBlockAmount:0,digitalGlitchBlockDisplacement:0,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:0,engraving:0,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9,crosshatch:0,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9,kuwahara:0,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5};var Sa=yh,Fh=Sh,Ih=vh,Dh=Eh,ou=Ah,au=wh,Rh={exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},kh={vignette:.18};function Ue(e,t,n={},r={},i={},o=1){return{id:e,label:t,intensity:o,adjust:{...tu,...n},details:{...nu,...r},effects:{...ru,...i}}}var su=[Ue("neutral","Neutral"),Ue("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),Ue("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),Ue("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),Ue("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),Ue("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),Ue("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),Ue("vintage-wash","Vintage Wash",Rh,kh),Ue("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),Ue("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),Ue("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),Ue("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),Ue("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06}),Ue("creator-camcorder","Creator Camcorder",{contrast:.08,highlights:-.05,shadows:.02,whites:.03,blacks:-.04,temperature:-.03,tint:-.015,vibrance:-.03,saturation:-.06},{vignette:.06,grain:.08,grainSize:.18,grainRoughness:.58},{chromaBleed:.55},.72),Ue("vhs-playback","VHS Playback",{contrast:-.04,saturation:-.08},{grain:.16,grainSize:.12,grainRoughness:.72},{tapeDamage:.82,tapeTracking:.85,tapeNoise:.3,tapeSpeed:.5,chromaBleed:.5,chromaticAberration:.18,scanlines:.35,scanlineCount:.17,scanlineSoftness:1,digitalGlitch:.32,digitalGlitchLineTear:.08,digitalGlitchSpeed:.5}),Ue("home-movie-8mm","8mm Home Movie",Rh,{...kh,vignette:.28,vignetteMidpoint:.54,vignetteFeather:.72,grain:.34,grainSize:.18,grainRoughness:.72},{filmArtifacts:.62},.72),Ue("editorial-halftone","Editorial Halftone",{contrast:.04,saturation:.04},{},{halftone:.94,halftoneSize:.36}),Ue("two-ink-print","Two-Ink Print",{contrast:.08,highlights:-.06,shadows:.04},{},{twoInkPrint:1,twoInkPrintSize:.42})],lw=new Map(su.map(e=>[e.id,e])),uw=/^\$(?:\{([A-Za-z0-9_.:-]+)\}|([A-Za-z0-9_.:-]+))$/,cw={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}},gr={hue:0,amount:0,level:0},Mh={amount:Ce.unit,level:Ce.signedUnit},cn=[[0,0],[1,1]],br=[],dw={hueVsHue:Ce.secondaryHueShift,hueVsSaturation:Ce.signedUnit,hueVsLuma:Ce.signedUnit},Zl={center:0,range:180,softness:0},eu={min:0,max:1,softness:.05},fw={vignette:Ce.unit,vignetteMidpoint:Ce.unit,vignetteRoundness:Ce.signedUnit,vignetteFeather:Ce.unit,grain:Ce.unit,grainSize:Ce.unit,grainRoughness:Ce.unit},iu=Ce.unit,mw=Ce.effects,Ph=["blur","pixelate","chromaBleed","tapeDamage","filmArtifacts","halftone","twoInkPrint","ascii","dither","bloom","monoScreen","scanlines","chromaticAberration","crtCurvature","digitalGlitch","engraving","crosshatch","kuwahara"];var pw=su.filter(e=>Ph.some(t=>e.effects[t]>1e-4)),qD=su.filter(e=>!pw.includes(e)),zD={blur:{blur:.45},pixelate:{pixelate:.55},bloom:{bloom:.55,bloomRadius:8},chromaBleed:{chromaBleed:.55},tapeDamage:{tapeDamage:.65,tapeTracking:.55,tapeNoise:.25,tapeSpeed:.5},filmArtifacts:{filmArtifacts:.55},scanlines:{scanlines:.35,scanlineCount:.17,scanlineSoftness:1},chromaticAberration:{chromaticAberration:.15,chromaticAngle:0},crtCurvature:{crtCurvature:.2},digitalGlitch:{digitalGlitch:.55,digitalGlitchColorSplit:.25,digitalGlitchLineTear:.25,digitalGlitchPixelate:.15,digitalGlitchBlockAmount:.5,digitalGlitchBlockDisplacement:.25,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:.5},halftone:{halftone:.94,halftoneSize:.36},twoInkPrint:{twoInkPrint:1,twoInkPrintSize:.42},ascii:{ascii:1,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0},dither:{dither:1,ditherSize:.5},monoScreen:{monoScreen:1,monoScreenSize:.35,monoScreenAngle:.25,monoScreenSpread:.3,monoScreenShape:0,monoScreenInvert:0},engraving:{engraving:1,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9},crosshatch:{crosshatch:1,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9},kuwahara:{kuwahara:1,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5}},Oh=[{path:"intensity",name:"--hf-color-grading-intensity",min:0,max:1},{path:"lut.intensity",name:"--hf-color-grading-lut-intensity",min:0,max:1},{path:"adjust.exposure",name:"--hf-color-grading-exposure",min:-2,max:2},{path:"effects.blur",name:"--hf-color-grading-blur",min:0,max:1},{path:"effects.bloom",name:"--hf-color-grading-bloom",min:0,max:3},{path:"effects.kuwahara",name:"--hf-color-grading-kuwahara",min:0,max:1},{path:"effects.pixelate",name:"--hf-color-grading-pixelate",min:0,max:1},{path:"effects.ascii",name:"--hf-color-grading-ascii",min:0,max:1},{path:"effects.dither",name:"--hf-color-grading-dither",min:0,max:1}];var hw=/^#[0-9a-f]{6}$/i;function gw(e){return!Array.isArray(e)||e.length<2||e.length>6||!e.every(t=>typeof t=="string"&&hw.test(t))?null:e.map(t=>t.toLowerCase())}function Ve(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ya(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):0}function Hh(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function Xe(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?ya(n,t.min,t.max):0}function lu(e,t=0){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?(n%360+360)%360:t}function bw(e){let t=Ve(e)?e:{};return Fh.reduce((n,r)=>{let i=Ve(t[r])?t[r]:{};return n[r]={hue:lu(i.hue,gr.hue),amount:Xe(i.amount??gr.amount,Mh.amount),level:Xe(i.level??gr.level,Mh.level)},n},{shadows:{...gr},midtones:{...gr},highlights:{...gr}})}function xw(e){if(!Array.isArray(e)||e.length!==2)return null;let t=Number(e[0]),n=Number(e[1]);return Number.isFinite(t)&&Number.isFinite(n)?[ya(t,0,1),ya(n,0,1)]:null}function Gh(e){return e.some((t,n)=>n>0&&t[0]===e[n-1]?.[0])}function yw(e){(e[0]?.[0]??0)>0&&e.unshift([0,0]),(e.at(-1)?.[0]??1)<1&&e.push([1,1])}function Sw(e){if(!Array.isArray(e)||e.length<2)return cn;let t=[];for(let n of e){let r=xw(n);if(!r)return cn;t.push(r)}return t.sort((n,r)=>n[0]-r[0]),Gh(t)||(yw(t),t.length>16)?cn:t}function vw(e){let t=Ve(e)?e:{};return Ih.reduce((n,r)=>(n[r]=Sw(t[r]),n),{master:cn,red:cn,green:cn,blue:cn})}function Ew(e,t){if(!Array.isArray(e)||e.length!==2)return null;let n=Number(e[0]),r=Number(e[1]);return Number.isFinite(n)&&Number.isFinite(r)?[lu(n),ya(r,t.min,t.max)]:null}function Aw(e,t){if(!Array.isArray(e)||e.length<3||e.length>16)return br;let n=[];for(let r of e){let i=Ew(r,t);if(!i)return br;n.push(i)}return n.sort((r,i)=>r[0]-i[0]),Gh(n)?br:n}function ww(e){let t=Ve(e)?e:{};return Dh.reduce((n,r)=>(n[r]=Aw(t[r],dw[r]),n),{hueVsHue:br,hueVsSaturation:br,hueVsLuma:br})}function Nh(e){let t=Ve(e)?e:{},n=Xe(t.min??eu.min,iu),r=Xe(t.max??eu.max,iu);return{min:Math.min(n,r),max:Math.max(n,r),softness:Xe(t.softness??eu.softness,Ce.secondarySoftRangeSoftness)}}function _w(e){let t=Ve(e)?e:{},n=Xe(t.range??Zl.range,Ce.secondaryHueRange);return{center:lu(t.center,Zl.center),range:n,softness:Xe(t.softness??Zl.softness,{min:Ce.secondaryHueSoftness.min,max:Ce.secondaryHueCombinedMax-n})}}function Cw(e){return{hueShift:Xe(e.hueShift??0,Ce.secondaryHueShift),saturation:Xe(e.saturation??0,Ce.signedUnit),luma:Xe(e.luma??0,Ce.signedUnit),temperature:Xe(e.temperature??0,Ce.signedUnit),tint:Xe(e.tint??0,Ce.signedUnit)}}function Tw(e){return!Ve(e)||!Ve(e.key)||!Ve(e.correction)?null:{enabled:e.enabled!==!1,key:{hue:_w(e.key.hue),saturation:Nh(e.key.saturation),luma:Nh(e.key.luma)},correction:Cw(e.correction)}}function Rw(e){if(!Array.isArray(e))return[];let t=[];for(let n of e.slice(0,4)){let r=Tw(n);r&&t.push(r)}return t}function kw(e){if(e==null)return null;let t=String(e).trim();return t||null}function Mw(e){if(e==null)return null;if(typeof e=="string"){let n=e.trim();return n?{src:n,intensity:1}:null}if(!Ve(e))return null;let t=e.src;return typeof t!="string"||t.trim()===""?null:{src:t.trim(),intensity:Hh(e.intensity,1)}}function Nw(e){if(typeof e=="string"){let t=e.trim();if(!t)return null;if(t.startsWith("{"))try{let n=JSON.parse(t);return Ve(n)?n:null}catch{return null}return{preset:t}}return Ve(e)?e:null}function Lw(e,t){let n=e.trim().match(uw);if(!n)return e;let r=n[1]??n[2]??"";return r&&Object.hasOwn(t,r)?t[r]:e}function xa(e,t){if(typeof e=="string"){let r=Lw(e,t);if(r!==e)return r;let i=e.trim();if(!i.startsWith("{"))return e;try{return xa(JSON.parse(i),t)}catch{return e}}if(Array.isArray(e))return e.map(r=>xa(r,t));if(!Ve(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=xa(i,t);return n}function Fw(e){return e?lw.get(e)??null:null}function va(e){let t=Nw(e);if(!t||t.enabled===!1)return null;let n=kw(t.preset),r=Fw(n),i=r?.adjust??tu,o=r?.details??nu,a=r?.effects??ru,s=Ve(t.adjust)?t.adjust:{},l=Ve(t.details)?t.details:{},c=Ve(t.effects)?t.effects:{},d=Sa.reduce((p,b)=>(p[b]=Xe(s[b]??i[b],cw[b]),p),{...tu}),m=ou.reduce((p,b)=>(p[b]=Xe(l[b]??o[b],fw[b]),p),{...nu}),f=au.reduce((p,b)=>(p[b]=Xe(c[b]??a[b],mw[b]??iu),p),{...ru});return{enabled:!0,preset:n,intensity:Hh(t.intensity,r?.intensity??1),adjust:d,wheels:bw(t.wheels),curves:vw(t.curves),hueCurves:ww(t.hueCurves),secondaries:Rw(t.secondaries),details:m,effects:f,palette:gw(t.palette),lut:Mw(t.lut),colorSpace:typeof t.colorSpace=="string"&&t.colorSpace.trim()?t.colorSpace.trim():sw}}function Bh(e,t){return va(xa(e,t))}function Iw(e){return Fh.some(t=>Math.abs(e[t].amount)>1e-4||Math.abs(e[t].level)>1e-4)}function uu(e){return Ih.some(t=>e[t].some(([n,r])=>Math.abs(n-r)>1e-4))}function cu(e){return Dh.some(t=>e[t].some(([,n])=>Math.abs(n)>1e-4))}function du(e){return e.some(t=>t.enabled&&Object.values(t.correction).some(n=>Math.abs(n)>1e-4))}function Uh(e){return e?.enabled?Math.abs(e.details.vignette)>1e-4||Math.abs(e.details.grain)>1e-4||Ph.some(n=>Math.abs(e.effects[n])>1e-4)?!0:e.intensity===0?!1:e.lut&&e.lut.intensity!==0?!0:Sa.some(n=>Math.abs(e.adjust[n])>1e-4)||(e.wheels?Iw(e.wheels):!1)||(e.curves?uu(e.curves):!1)||(e.hueCurves?cu(e.hueCurves):!1)||(e.secondaries?du(e.secondaries):!1):!1}var Ea=/^(|transparent|rgba\(.*,\s*0\)|.*\/\s*0%?\s*\))$/,Dw=new Set(["IMG","VIDEO","IFRAME","EMBED","OBJECT","CANVAS"]),Wh="http://www.w3.org/2000/svg",Pw=new Set(["svg","g","foreignObject"]),Ow=["Top","Right","Bottom","Left"],Hw={left:-1/0,right:1/0,top:-1/0,bottom:1/0},Vh=e=>!!e.backgroundImage&&e.backgroundImage!=="none"||!Ea.test(e.backgroundColor),Gw=e=>{let t=e.getPropertyValue("-webkit-text-fill-color")||e.color,n=Number.parseFloat(e.getPropertyValue("-webkit-text-stroke-width"))||0,r=e.getPropertyValue("-webkit-text-stroke-color")||e.color;return!Ea.test(t)||n>0&&!Ea.test(r)},$h=e=>Ow.map(t=>e[`border${t}Style`]!=="none"&&!Ea.test(e[`border${t}Color`])&&Number.parseFloat(e[`border${t}Width`])||0),Aa=e=>e.bottom-e.top,fu=(e,t,n)=>t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom,qh=(e,t)=>({left:Math.min(e.left,t.left),right:Math.max(e.right,t.right),top:Math.min(e.top,t.top),bottom:Math.max(e.bottom,t.bottom)}),Bw=(e,t)=>t.display==="none"||t.position==="absolute"||t.position==="fixed"||Number.parseFloat(t.opacity)<=.01&&!e.hasAttribute(Pn);function Uw(e,t,n){if(e.width<=0&&e.height<=0)return!1;let r=3*(Number.parseFloat(t.fontSize)||16),i=Math.max(r,Math.min(2*e.height,20*r/3));return n<e.top-i||n>e.bottom+i}function Ww(e,t,n,r){let[i,o,a,s]=$h(t);if(!(i||o||a||s))return!1;let l=e.getBoundingClientRect(),{offsetWidth:c,offsetHeight:d}=e,m=c>0?l.width/c:1,f=d>0?l.height/d:1,p={left:l.left+s*m,right:l.right-o*m,top:l.top+i*f,bottom:l.bottom-a*f};return!fu(p,n,r)}function Vw(e){let t=[];for(let n of[...e].sort((r,i)=>r.left-i.left)){let r=t.findIndex(i=>n.top<i.bottom&&n.bottom>i.top&&n.left-i.right<=2*Math.max(Aa(i),Aa(n)));r<0?t.push(n):t[r]=qh(t[r],n)}return t}function $w(e){let t=[...e].sort((n,r)=>n.top-r.top);return t.flatMap((n,r)=>t.slice(r+1).flatMap(i=>{let o=i.left<n.right&&i.right>n.left,a=i.top-n.bottom<=2*Math.min(Aa(n),Aa(i));return o&&a&&i.top>n.bottom?[qh(n,i)]:[]}))}function zh(e,t,n){let r=e.defaultView,i=typeof e.createRange().getClientRects=="function",o=e.createRange(),a=new Map,s=new Map,l=new Map,c=y=>{let v=s.get(y);if(v===void 0){let A=r.getComputedStyle(y);v=Bw(y,A)||i&&Uw(y.getBoundingClientRect(),A,n),s.set(y,v)}return v},d=y=>{let v=l.get(y);if(v===void 0){let A=y.parentElement,C=A&&y.nodeValue?.trim()?r.getComputedStyle(A):null;v=!!C&&C.visibility!=="hidden"&&Gw(C),l.set(y,v)}return v},m=y=>{if(!i)return[Hw];let v=[];o.selectNodeContents(y);for(let A of o.getClientRects()){let C=A.bottom-A.top;A.width>0&&C>0&&n>=A.top-2*C&&n<=A.bottom+2*C&&v.push(A)}return v},f=y=>{let v=a.get(y);if(v)return v;v=[];for(let A of y.childNodes)A.nodeType===3?d(A)&&v.push(...m(A)):A.nodeType===1&&A.hasChildNodes()&&!c(A)&&v.push(...f(A));return a.set(y,v),v};function p(y){let v=Vw(f(y));return v.some(A=>fu(A,t,n))||$w(v).some(A=>fu(A,t,n))}function b(y,v){let A=r.getComputedStyle(y,v);return!A.content||A.content==="none"||A.content==="normal"||A.display==="none"?!1:A.content!=='""'||Vh(A)||$h(A).some(C=>C>0)}let x=(y,v)=>/inset/.test(v.boxShadow)||Ww(y,v,t,n)||b(y,"::before")||b(y,"::after");return y=>{if(Dw.has(y.tagName)||!(y.namespaceURI!==Wh||Pw.has(y.localName))||!r)return!0;let A=r.getComputedStyle(y);return Vh(A)||x(y,A)||y.namespaceURI!==Wh&&p(y)}}var qw=["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-no-inspect]","[data-no-pick]","[data-hyper-shader-loading]"].join(","),zw=["[data-hyperframes-picker-block]","[data-hyper-shader-loading]"].join(","),jh="[data-hf-inner-root],[data-composition-id]:not([data-composition-id] *)",Kh=`${jh}{pointer-events:auto!important}`,jw=`@layer hf-picker{${Kh}}`;function Yh(e){let t=!1,n=null,r=null,i=null,o=null,a,s=new Set;function l(w,k){try{window.dispatchEvent(new CustomEvent(w,{detail:k}))}catch(K){G("runtime.picker.site1",K)}}function c(w){i=w,l("hyperframe:picker:hovered",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function d(w){o=w,l("hyperframe:picker:selected",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function m(w){if(s=new Set(Array.from(document.querySelectorAll(jh)).filter($=>getComputedStyle($).pointerEvents==="none")),s.size===0)return w();let k=f(),K=k?p(k):b();try{return w()}finally{K(),s=new Set}}function f(){if(a!==void 0)return a;if(a=null,!Array.isArray(document.adoptedStyleSheets)||typeof CSSStyleSheet>"u")return null;try{let w=new CSSStyleSheet;w.replaceSync(jw),a=w}catch(w){G("runtime.picker.site2",w)}return a}function p(w){return document.adoptedStyleSheets=[...document.adoptedStyleSheets,w],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(k=>k!==w)}}function b(){let w=document.createElement("style");return w.textContent=Kh,(document.head??document.documentElement).appendChild(w),()=>w.remove()}function x(w,k){let K=k.getComputedStyle(w),$=Number.parseFloat(K.opacity||"1");if(Number.isFinite($)&&$<.2&&!(w.textContent??"").trim()){let z=K.backgroundImage;if(z&&z!=="none")return!0}return L(w,k)}function y(w){if(w.namespaceURI!=="http://www.w3.org/2000/svg")return!1;let k=w.tagName.toLowerCase();return k==="filter"||k==="defs"||k.startsWith("fe")}function v(w){if(w.namespaceURI!=="http://www.w3.org/2000/svg"||w.tagName.toLowerCase()!=="rect")return!1;let k=(w.getAttribute("filter")??"").trim();return k&&k!=="none"?!0:(w.ownerDocument.defaultView?.getComputedStyle(w).filter??"none").startsWith("url(")}function A(w){if((w.textContent??"").trim())return!1;if(y(w)||v(w))return!0;let k=[...w.children];return k.length>0&&k.every(K=>A(K))}function C(w,k){let K=Number.parseFloat(k.getComputedStyle(w).opacity||"1");return Number.isFinite(K)&&K<.2}function L(w,k){if(!A(w))return!1;for(let K=w;K&&K!==document.body&&K!==document.documentElement;K=K.parentElement)if(C(K,k)&&A(K))return!0;return!1}function H(w){let k=w.ownerDocument.defaultView;if(!k)return!1;let K=w;if(k.getComputedStyle(w).visibility==="hidden"||x(w,k))return!0;for(;K&&K!==document.body&&K!==document.documentElement;){let $=k.getComputedStyle(K);if($.display==="none"||$.pointerEvents==="none")return!0;let B=Number.parseFloat($.opacity);if(Number.isFinite(B)&&B<=.01&&!K.hasAttribute(Pn))return!0;K=K.parentElement}return!1}function M(w){if(!w||w===document.body||w===document.documentElement)return!1;let k=w.tagName.toLowerCase();return!(k==="script"||k==="style"||k==="link"||k==="meta"||s.has(w)||w.closest(qw)||H(w))}function _(w){return!!w?.closest(zw)}function N(w){let k=w.parentElement?.getAttribute("data-composition-id");return!w.hasAttribute("data-hf-inner-root")||!k?null:`[data-composition-id="${CSS.escape(k)}"] > [data-hf-inner-root]`}function U(w){let k=N(w);if(k)return k;let K=w;if(K.id)return`#${CSS.escape(K.id)}`;let $=w.getAttribute("data-composition-id");if($)return`[data-composition-id="${CSS.escape($)}"]`;let B=w.getAttribute("data-composition-src");if(B)return`[data-composition-src="${CSS.escape(B)}"]`;let z=w.getAttribute("data-track-index");if(z)return`[data-track-index="${CSS.escape(z)}"]`;let re=w.tagName.toLowerCase(),ie=w.parentElement;if(!ie)return re;let J=ie.querySelectorAll(`:scope > ${re}`);if(J.length===1)return re;for(let ee=0;ee<J.length;ee+=1)if(J[ee]===w)return`${re}:nth-of-type(${ee+1})`;return re}function Y(w){let k=w.tagName.toLowerCase(),K=(w.textContent??"").trim().replace(/\s+/g," "),$=(z,re)=>{let ie=Array.from(z);return ie.length>re?`${ie.slice(0,re-1).join("")}\u2026`:z},B=/^h[1-6]$/.test(k);return B||k==="p"||k==="span"||k==="div"?K.length>0?$(K,56):B?"Heading":"Text":k==="img"?"Image":k==="video"?"Video":k==="audio"?"Audio":k==="svg"?"Shape":w.getAttribute("data-composition-src")?"Composition":k==="section"?"Section":`${k.charAt(0).toUpperCase()}${k.slice(1)}`}function Z(w,k,K){let $=typeof K=="number"&&K>0?K:8,B=[];if(document.elementsFromPoint)B=document.elementsFromPoint(w,k);else if(document.elementFromPoint){let ee=document.elementFromPoint(w,k);B=ee?[ee]:[]}if(_(B[0]??null))return[];let z={},re=[],ie=[],J=zh(document,w,k);for(let[ee,X]of B.entries()){if(!M(X))continue;let Me=`${X.tagName}::${X.id||""}::${ee}`;if(!z[Me]&&(z[Me]=!0,re.push(X),(ie.some(et=>X.contains(et))||J(X))&&(ie.push(X),ie.length>=$)))break}return ie.length>0?ie:re.slice(0,$)}function O(w){let k=w.getBoundingClientRect(),K={};for(let B of Array.from(w.attributes))B.name.startsWith("data-")&&(K[B.name]=B.value);return{id:w.id||null,tagName:w.tagName.toLowerCase(),selector:U(w),label:Y(w),boundingBox:{x:k.left,y:k.top,width:k.width,height:k.height},textContent:w.textContent?w.textContent.trim().slice(0,200):null,src:w.getAttribute("src")||w.getAttribute("data-composition-src")||null,dataAttributes:K}}function I(w,k,K){return m(()=>Z(w,k,K)).map(O)}function D(w){if(!t)return;let k=m(()=>{let $=Z(w.clientX,w.clientY,1)[0]??(Re(w.target)?w.target:null);return M($)?$:null});if(!k||n===k)return;n&&n.classList.remove("__hf-pick-highlight"),n=k,k.classList.add("__hf-pick-highlight");let K=O(k);c(K),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:K})}function R(w){if(!t)return;w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation();let k=I(w.clientX,w.clientY,8);k.length!==0&&(c(k[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:k,selectedIndex:0,point:{x:w.clientX,y:w.clientY}}))}function V(w){w.key==="Escape"&&(j(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function se(){t||(t=!0,r=document.createElement("style"),r.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`
|
|
42
|
-
`),document.head.appendChild(r),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",D,!0),document.addEventListener("click",R,!0),document.addEventListener("keydown",V,!0),l("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function j(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),r&&(r.remove(),r=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",D,!0),document.removeEventListener("click",R,!0),document.removeEventListener("keydown",V,!0),l("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function ne(){window.__HF_PICKER_API={enable:se,disable:j,isActive:()=>t,getHovered:()=>i,getSelected:()=>o,getCandidatesAtPoint:(w,k,K)=>Number.isFinite(w)&&Number.isFinite(k)?I(w,k,K):[],pickAtPoint:(w,k,K)=>{if(!Number.isFinite(w)||!Number.isFinite(k))return null;let $=I(w,k,8);if(!$.length)return null;let B=Math.max(0,Math.min($.length-1,Number(K??0))),z=$[B]??null;return z?(d(z),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:z}),j(),z):null},describe:w=>Re(w)?O(w):null,pickManyAtPoint:(w,k,K)=>{if(!Number.isFinite(w)||!Number.isFinite(k))return[];let $=I(w,k,8);if(!$.length)return[];let B=[],z=Array.isArray(K)?K:[0];for(let re of z){let ie=Math.max(0,Math.min($.length-1,Math.floor(Number(re)))),J=$[ie];if(!J)continue;B.some(X=>X.selector===J.selector&&X.tagName===J.tagName)||B.push(J)}return B.length?(d(B[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:B}),j(),B):[]}},l("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:se,disablePickMode:j,installPickerApi:ne}}function wi(e,t,n){let r=e?.[t];return typeof r=="function"?Number(r.call(e))||n:typeof r=="number"&&Number.isFinite(r)?r:(r!=null&&G("runtime.player.nonConformantNum",{prop:t,actual:typeof r}),n)}function gt(e,t){let n=e?.[t];if(typeof n=="function"){n.call(e);return}n!==void 0&&G("runtime.player.nonConformantVoid",{method:t,actual:typeof n})}function _i(e,t,n){if(e){for(let r of Object.values(e))if(!(!r||r===t))try{n(r)}catch(i){G("runtime.player.site1",i)}}}function wa(e,t,n){return n?.exact===!0?Number.isFinite(e)&&e>0?e:0:wp(e,t,n?.subFrameDivisions)}function Xh(e,t,n,r){let i=wa(t,n,r),o=r?.suppressEvents===!0;return gt(e,"pause"),typeof e.totalTime=="function"?e.totalTime(i,o):typeof e.seek=="function"&&e.seek(i,o),i}function Kw(e,t,n,r,i){let o=[];_i(e,t,a=>{gt(a,"play"),o.push(a)});try{return Xh(t,n,r,i)}finally{for(let a of o)try{gt(a,"pause")}catch(s){G("runtime.player.site2",s)}}}function Yw(e,t){_i(e,t,n=>{gt(n,"play")})}function Jh(e){let t=e.transport;return t?{_timeline:null,play:()=>t.play(),pause:()=>t.pause(),seek:(n,r)=>t.seek(n,r),renderSeek:(n,r)=>t.renderSeek(n,r),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 r=Math.max(0,Number(e.getSafeDuration?.()??wi(n,"duration",0))||0);r>0&&Math.max(0,wi(n,"time",0))>=r&&(gt(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()),gt(n,"play"),_i(e.getTimelineRegistry?.(),n,i=>{typeof i.timeScale=="function"&&i.timeScale(e.getPlaybackRate()),gt(i,"play")}),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let n=e.getTimeline();if(!n)return;gt(n,"pause"),_i(e.getTimelineRegistry?.(),n,i=>{gt(i,"pause")});let r=Math.max(0,wi(n,"time",0));e.onDeterministicSeek(r),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(r,!1),e.onRenderFrameSeek(r),e.onStatePost(!0)},seek:(n,r)=>{let i=e.getTimeline();if(!i)return;let o=Math.max(0,Number(n)||0),a=e.getIsPlaying(),s=Kw(e.getTimelineRegistry?.(),i,o,e.getCanonicalFps());e.onDeterministicSeek(s),r?.keepPlaying&&a?(typeof i.timeScale=="function"&&i.timeScale(e.getPlaybackRate()),gt(i,"play"),_i(e.getTimelineRegistry?.(),i,l=>{typeof l.timeScale=="function"&&l.timeScale(e.getPlaybackRate()),gt(l,"play")}),e.onDeterministicPlay(),e.onShowNativeVideos(),e.onSyncMedia(s,!0)):(e.setIsPlaying(!1),e.onSyncMedia(s,!1)),e.onRenderFrameSeek(s),e.onStatePost(!0)},renderSeek:(n,r)=>{let i=e.getTimeline(),o=e.getCanonicalFps(),a=i?(Yw(e.getTimelineRegistry?.(),i),Xh(i,n,o,r)):wa(Math.max(0,Number(n)||0),o,r);e.onDeterministicSeek(a,r),e.setIsPlaying(!1),e.onSyncMedia(a,!1),e.onRenderFrameSeek(a),e.onStatePost(!0)},getTime:()=>wi(e.getTimeline(),"time",0),getDuration:()=>wi(e.getTimeline(),"duration",0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:n=>e.setPlaybackRate(n),getPlaybackRate:()=>e.getPlaybackRate()}}function mu(){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}}function Hn(e){if(e==null||e.trim()==="")return null;let t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function xr(e){if(e==null||e.trim()==="")return null;let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:null}function bt(e=document){let t=e.querySelector('[data-composition-id][data-root="true"]');return _e(t)?t:e.querySelector("[data-composition-id]")}var Xw=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function pu(e){return e.id||e.getAttribute("data-hf-id")||null}function Jw(e){return Le(e)}function Qw(e,t){let n=e.getAttribute("data-composition-id");if(!n)return null;let r=Vt(t[n]);return r!=null&&r>0?r:null}function Zw(e){return pe(e)?Number.isFinite(e.duration)?Ct(e,e.duration):null:ir(e)}function e_(e,t,n,r){let i=Jw(e.getAttribute("data-duration"));return i!=null&&i>0?i:Qw(e,t)??Zw(e)??Math.max(0,n-r)}function t_(e){for(let[t,n]of e){let r=t.parentElement;for(;r;){let i=e.get(r);if(i){n.parentId=i.id,i.children.push(n);break}r=r.parentElement}}}function Qh(e){let{startResolver:t,timelineRegistry:n,rootDuration:r}=e,i=new Map,o=bt(),a=0;for(let s of document.querySelectorAll("[data-start]")){if(s===o||Xw.has(s.tagName))continue;let l=t.resolveStartForElement(s,0);if(e_(s,n,r,l)<=0)continue;let c={id:pu(s)??`__clip-${a++}`,element:s,parentId:null,children:[]};i.set(s,c)}return t_(i),{roots:Array.from(i.values()).filter(s=>s.parentId===null)}}var hu="css:root",Zh=["backdrop-filter","clip-path","filter","mask","mask-border-source","mask-image","perspective","rotate","scale","transform","translate","-webkit-mask-image"],n_=new Set([...Zh,"contain","isolation","mask-border","mix-blend-mode","opacity"]),r_=new Set(["absolute","relative"]),i_=new Set(["flex","inline-flex","grid","inline-grid"]),o_=new Set(["layout","paint","strict","content"]),a_=new Set(["size","inline-size"]);function s_(e){return e.position==="fixed"||e.position==="sticky"}function l_(e,t){if(t.zIndex==="auto"||t.zIndex==="")return!1;if(r_.has(t.position))return!0;let n=e.parentElement?e.ownerDocument.defaultView?.getComputedStyle(e.parentElement).display:null;return n!=null&&i_.has(n)}function u_(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:Zh.some(r=>{let i=e.getPropertyValue(r);return i!==""&&i!=="none"})}function c_(e){return e.getPropertyValue("contain").split(/\s+/).some(n=>o_.has(n))?!0:a_.has(e.getPropertyValue("container-type"))}function d_(e){return e.getPropertyValue("will-change").split(",").map(t=>t.trim()).some(t=>n_.has(t))}function f_(e,t){return e.hasAttribute(Ke)||s_(t)||l_(e,t)||u_(t)||c_(t)?!0:d_(t)}function m_(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 _a(e,t){let n=t?.get(e.parentElement);if(n!==void 0)return n;let r=p_(e);return t?.set(e.parentElement,r),r}function p_(e){let t=e.ownerDocument.defaultView;if(!t)return hu;let n=e.parentElement;for(;n&&n!==e.ownerDocument.documentElement;){try{if(f_(n,t.getComputedStyle(n)))return m_(n)}catch{return hu}n=n.parentElement}return hu}function gu(e){let t=e.trim().toLowerCase();return!(!t||t==="main"||t.includes("caption")||t.includes("ambient"))}var eg=e=>e!==null&&Number.isFinite(e)&&e>0;function yr(e){let t=e.clipEndsSeconds.filter(r=>r===null).length;if(eg(e.authoredDurationSeconds))return{seconds:e.authoredDurationSeconds,source:"authored",pendingClips:t};let n=e.clipEndsSeconds.filter(eg);return n.length>0?{seconds:Math.max(...n),source:"derived",pendingClips:t}:{seconds:null,source:"unresolved",pendingClips:t,reason:t>0?"every clip's length is still pending":"no authored duration and no clip with a length"}}var Sr=7200,$t=1/60,Ci=e=>e!==null&&e>$t?e:null;function tg(e){return{width:xr(e.getAttribute("data-width")),height:xr(e.getAttribute("data-height"))}}function ng(e,t){let n=[];for(let r of e.querySelectorAll("video[data-start], audio[data-start]")){let i=t.mediaStart(r);if(!Number.isFinite(i))continue;let o=t.mediaDuration(r);o==null||o<=$t||n.push(Math.max(0,i)+o)}return Ci(yr({authoredDurationSeconds:null,clipEndsSeconds:n}).seconds)}function rg(e,t){let n=[];for(let i of e.querySelectorAll("[data-composition-id][data-start]")){if(i.parentElement?.closest("[data-composition-id]")!==e)continue;let o=t.resolveStartForElement(i,0),a=t.resolveDurationForElement(i);!Number.isFinite(o)||a==null||a<=0||n.push(Math.max(0,o)+a)}let r=Le(e.getAttribute("data-duration"));return Ci(yr({authoredDurationSeconds:null,clipEndsSeconds:[r,...n]}).seconds)}var h_=e=>e.hasAttribute("data-composition-id")||e.hasAttribute("data-composition-src");function ig(e,t,{unregisteredLottie:n}){let r=[];for(let o of e.querySelectorAll("[data-start]")){let a=t.resolveStartForElement(o,0);if(!Number.isFinite(a))continue;let s=t.resolveDurationForElement(o);s!=null?r.push(Math.max(0,a)+s):(pe(o)||h_(o))&&r.push(null)}(n||e.querySelector("[data-lottie-src]"))&&r.push(null);let i=yr({authoredDurationSeconds:null,clipEndsSeconds:r});return i.pendingClips>0?{...i,seconds:null,source:"unresolved",reason:"a clip's length is pending"}:i}function og(e){if(e.declared!==null&&Number.isFinite(e.declared)&&e.declared>0)return e.declared;let t=Ci(e.timeline()),n=Math.max(0,...e.floors().map(l=>l??0)),r=Number.isFinite(e.fallback)&&e.fallback>$t?e.fallback:0,i=Math.max(n,r),a=t!==null&&t>=Sr&&Ci(i)!==null?null:t,s;return a!==null?s=Math.max(a,i):Ci(n)!==null?s=i:r>0?s=r:s=e.derived(),s>0?s:0}function Ca(e,t){let n=e.tagName.toLowerCase();if(n==="script"||n==="style"||n==="link"||n==="meta")return!1;let i=n==="video"||n==="audio"?t.resolver.resolveMediaStartForElement(e):t.resolver.resolveStartForElement(e,0),o=t.resolver.resolveDurationForElement(e),a=e.getAttribute("data-composition-id");if(a){let c=t.timelineRegistry[a],d=Vt(c);!(e.hasAttribute("data-duration")||e.hasAttribute("data-end")||e.hasAttribute(or)||e.hasAttribute(ar))&&(o==null||o<=0)&&d!=null&&d>0&&(o=d)}let s=o!=null&&o>0?i+o:Number.POSITIVE_INFINITY,l=t.exportRenderSeek?la(i,s,t.canonicalFps):{start:i,end:s};return lr(t.currentTime,l.start,l.end,t.compositionDuration)}function Ri(e){return Le(e)}function bu(e){let t=e.getAttribute("data-duration"),n=e.getAttribute(or),r=sr({start:0,duration:t,authoredDuration:n})?.duration;return r??([t,n].map(Ri).some(o=>o!=null&&o<=0)?0:null)}function ag(e){return sr({start:0,end:e.getAttribute("data-end"),authoredEnd:e.getAttribute(ar)})?.end??null}function xu(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 yu(...e){let t=e.filter(n=>Number.isFinite(n??null));return t.length===0?null:Math.max(...t)}function vr(e,t){let n=e.getAttribute("data-track-index")??e.getAttribute("data-track");if(n==null)return t;let r=Number.parseInt(n,10);return Number.isFinite(r)?r:t}function ki(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 sg(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return ki(t);let n=e.getAttribute("data-composition-src");if(n)return ki(n);let r=e.querySelector("img[src], video[src], audio[src], source[src]");return r?ki(r.getAttribute("src")):null}function b_(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 x_(e){if(!e)return null;let t;try{t=new URL(e,document.baseURI).pathname.split("/").filter(Boolean).at(-1)}catch{t=e.replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).at(-1)}if(!t)return null;try{return decodeURIComponent(t)}catch{return t}}function y_(e){let t=e.textContent?.replace(/\s+/g," ").trim();return t?t.length>32?`${t.slice(0,31)}...`:t:null}function Ti(e){let t=e.replace(/\.[^.]+$/i,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return t?t.replace(/\b\w/g,n=>n.toUpperCase()):e}function lg(e){return e.getAttribute("data-hf-original-composition-id")??e.getAttribute("data-composition-id")}function S_(e,t,n){let r=e.getAttribute("data-timeline-label")??e.getAttribute("data-label")??e.getAttribute("aria-label")??null;if(r?.trim())return r.trim();let i=lg(e);if(i)return Ti(i);let o=e.id;if(o)return Ti(o);let a=b_(e);if(a)return Ti(a);let s=x_(sg(e));if(s)return Ti(s);let l=y_(e);return l||`${Ti(t)} ${n+1}`}function Su(e){let t=new Map,r=window.__timelines??{},i=Ye({timelineRegistry:r,includeAuthoredTimingAttrs:!0}),o=$=>{if(!$)return null;let B=Vt(r[$]);return B!=null&&B>0?B:null},a=()=>{let $=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if($.length===0)return null;let B=0;for(let z of $){let re=i.resolveMediaStartForElement(z);if(!Number.isFinite(re))continue;let ie=rr(z);ie==null||ie<=0||(B=Math.max(B,Math.max(0,re)+ie))}return B>0?B:null},s=($,B)=>{let z=[],re=null,ie=null,J=null,ee=$.parentElement;for(;ee;){let X=ee.getAttribute("data-composition-id");X&&(z.push(X),!J&&ee!==B&&(J=X),re==null&&(re=i.resolveStartForElement(ee,0)),ie==null&&(ie=Ri(ee.getAttribute("data-duration"))??o(X)??null)),ee=ee.parentElement}return{parentCompositionId:J,compositionAncestors:z.reverse(),inheritedStart:re,inheritedDuration:ie}},l=bt(),c=Array.from(document.querySelectorAll("[data-composition-id]")),d=l?.getAttribute("data-composition-id")??null,m=l?i.resolveStartForElement(l,0):0,f=a(),p=f!=null?Math.max(0,f-Math.max(0,m)):null,b=o(d),x=bu(l??document.body),y=yu(...c.filter($=>$!==l).map($=>{let B=i.resolveStartForElement($,0),z=i.resolveDurationForElement($)??o($.getAttribute("data-composition-id"))??null;return!Number.isFinite(B)||z==null||z<=0?null:Math.max(0,B)+z})),v=y!=null?Math.max(0,y-Math.max(0,m)):null,A=typeof b=="number"&&Number.isFinite(b)&&b>0?b:null,C=typeof x=="number"&&Number.isFinite(x)&&x>0?x:null,L=typeof p=="number"&&Number.isFinite(p)&&p>0?p:null,H=typeof v=="number"&&Number.isFinite(v)&&v>0?v:null,M=yu(L,H),_=A!=null&&M!=null&&A>=Sr,U=C??(_?M:yu(A,L,H))??null,Z=(U!=null?m+U:null)??(typeof f=="number"&&Number.isFinite(f)&&f>0?f:null),O=($,B)=>!Number.isFinite(B)||B<=0?0:Z==null||!Number.isFinite(Z)?B:!Number.isFinite($)||$>=Z?0:Math.max(0,Math.min(B,Z-$)),I=[],D=[],R=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),V=0;for(let[$,B]of R.entries()){if(B===l||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(B.tagName))continue;let z=s(B,l),re=B.tagName.toLowerCase(),ie=re==="video"||re==="audio"?i.resolveMediaStartForElement(B):i.resolveStartForElement(B,z.inheritedStart??0),J=B.getAttribute("data-composition-id"),ee=!!J&&J!==d,X=bu(B);if(X==null&&ee&&(X=o(J)),X==null&&pe(B)&&Number.isFinite(B.duration)&&(X=Ct(B,B.duration)),X==null&&(X=ir(B,ie)),X==null){let Fe=z.inheritedDuration;if(Fe!=null&&Fe>0){let Oe=(z.inheritedStart??0)+Fe;X=Math.max(0,Oe-ie)}}if(X==null||X<=0||(X=O(ie,X),X<=0))continue;let Me=i.resolveHostSlotsForElement(B);if(Me.length>0){let Fe=Dn({start:ie,end:ie+X},Me),De=ee;if(Fe.end<=Fe.start&&!De)continue;ie=Fe.start,X=Fe.end-Fe.start}let et=ie+X;V=Math.max(V,et);let Xt=J&&J!==d?"composition":re==="video"?"video":re==="audio"?"audio":re==="img"?"image":"element";I.push({id:pu(B)??J??null,label:S_(B,Xt,I.length),start:ie,duration:X,track:vr(B,$),zIndex:xu(B),stackingContextId:_a(B,t),kind:Xt,tagName:re,compositionId:B.getAttribute("data-composition-id"),compositionAncestors:z.compositionAncestors,parentCompositionId:z.parentCompositionId,nodePath:null,compositionSrc:ki(B.getAttribute("data-composition-src")),playbackStart:Rt(B),playbackRate:Qe(B),assetUrl:sg(B),timelineRole:B.getAttribute("data-timeline-role"),timelineLabel:B.getAttribute("data-timeline-label"),timelineGroup:B.getAttribute("data-timeline-group"),timelinePriority:Ri(B.getAttribute("data-timeline-priority"))})}let se=new Set(I.map($=>$.id)),j=l?.getAttribute("data-composition-id")??null,ne=j?r[j]??null:null;if(ne&&l){let $=ne;if(typeof $.getChildren=="function")try{let B=$.getChildren(!0,!0,!1)??[],z=new Map;for(let J of l.children){let ee=J;if(!ee.id)continue;let X=ee.tagName.toLowerCase();X==="script"||X==="style"||X==="link"||z.set(ee,{id:ee.id,start:1/0,end:-1/0})}let re=J=>{let ee=J;for(;ee;){if(z.has(ee))return ee;if(ee===l)return null;ee=ee.parentElement}return null};for(let J of B){if(typeof J.targets!="function"||typeof J.startTime!="function"||typeof J.duration!="function")continue;let ee=J.startTime(),X=J.parent;for(;X&&X!==ne&&typeof X.startTime=="function";)ee+=X.startTime(),X=X.parent;let Me=ee+J.duration();if(!(!Number.isFinite(ee)||!Number.isFinite(Me)))for(let et of J.targets()){if(!Re(et))continue;let Xt=re(et);if(!Xt)continue;let Fe=z.get(Xt);Fe&&(Fe.start=Math.min(Fe.start,ee),Fe.end=Math.max(Fe.end,Me))}}let ie=I.length>0?Math.max(...I.map(J=>J.track))+1:0;for(let[J,ee]of z){if(ee.start===1/0||ee.end===-1/0)continue;let X=J;if(se.has(X.id))continue;let Me=Math.max(0,ee.end-ee.start);if(Me<=0)continue;let et=O(ee.start,Me);et<=0||(V=Math.max(V,ee.start+et),I.push({id:X.id,label:X.getAttribute("data-timeline-label")??X.getAttribute("data-label")??X.getAttribute("aria-label")??X.id,start:ee.start,duration:et,track:vr(X,ie),zIndex:xu(X),stackingContextId:_a(X,t),kind:"element",tagName:X.tagName.toLowerCase(),compositionId:X.getAttribute("data-composition-id"),compositionAncestors:j?[j]:[],parentCompositionId:j,nodePath:null,compositionSrc:null,playbackStart:Rt(X),playbackRate:Qe(X),assetUrl:null,timelineRole:X.getAttribute("data-timeline-role"),timelineLabel:X.getAttribute("data-timeline-label"),timelineGroup:X.getAttribute("data-timeline-group"),timelinePriority:Ri(X.getAttribute("data-timeline-priority"))}),se.add(X.id))}}catch(B){G("runtime.timeline.site1",B)}}if(l&&U!=null&&U>0){let $=I.length>0?Math.max(...I.map(B=>B.track))+1:0;for(let B of l.children){let z=B;if(!z.id||se.has(z.id))continue;let re=z.getAttribute("data-timeline-role");if(re!=="overlay"&&re!=="persistent-overlay")continue;let ie=z.tagName.toLowerCase();if(ie==="script"||ie==="style"||ie==="link"||ie==="meta"||window.getComputedStyle(z).display==="none")continue;let ee=O(0,U);ee<=0||(V=Math.max(V,ee),I.push({id:z.id,label:z.getAttribute("data-timeline-label")??z.getAttribute("data-label")??z.getAttribute("aria-label")??z.id,start:0,duration:ee,track:vr(z,$),zIndex:xu(z),stackingContextId:_a(z,t),kind:"element",tagName:ie,compositionId:z.getAttribute("data-composition-id"),compositionAncestors:j?[j]:[],parentCompositionId:j,nodePath:null,compositionSrc:null,playbackStart:Rt(z),playbackRate:Qe(z),assetUrl:null,timelineRole:re,timelineLabel:z.getAttribute("data-timeline-label"),timelineGroup:z.getAttribute("data-timeline-group"),timelinePriority:Ri(z.getAttribute("data-timeline-priority"))}),se.add(z.id))}}for(let $ of c){if($===l)continue;let B=$.getAttribute("data-composition-id");if(!B||!gu(B))continue;let z=i.resolveStartForElement($,0),re=bu($);if((re==null||re<=0)&&ag($)!=null){let X=ag($);re=Math.max(0,X-z)}let ie=o(B),J=re&&re>0?re:ie;if(J==null||J<=0)continue;let ee=O(z,J);ee<=0||D.push({id:B,label:$.getAttribute("data-label")??lg($)??B,start:z,duration:ee,thumbnailUrl:ki($.getAttribute("data-thumbnail-url")),avatarName:null})}let w=Math.max(V||0,U??0),k=w>0?w:1,K=Math.max(1,Math.ceil(k*Math.max(1,e.canonicalFps)));return{...Ho(e.canonicalFps),source:"hf-preview",type:"timeline",compositionContractVersion:1,durationSeconds:k,durationInFrames:K,clips:I,scenes:D,compositionWidth:xr(l?.getAttribute("data-width"))??1920,compositionHeight:xr(l?.getAttribute("data-height"))??1080}}var Eu="data-composition-id",v_="data-composition-src",E_=`[${Eu}]`,XP=`[${v_}]`,Au="style",ug="script",wu='link[rel="stylesheet"], link[rel="preconnect"]',A_=new Set(["","application/ecmascript","application/javascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript"]),w_=e=>(e.getAttribute("type")||"").trim().toLowerCase();function cg(e){let t=w_(e);return t==="module"||t==="importmap"?!0:A_.has(t)&&e.getAttribute("nomodule")===null}function vu(e){return dn(e?.querySelectorAll(ug)).filter(t=>!cg(t))}function _u(e){return dn(e?.querySelectorAll(ug)).filter(cg)}function dg(e){return[...dn(e.querySelectorAll(`${Au}, ${wu}`)),..._u(e)]}function dn(e){return e?Array.from(e):[]}function fg(e){let{contentNode:t,head:n,documentElement:r,hasTemplate:i,compositionId:o}=e,a=dn(t.querySelectorAll(E_)),s=o?a.find(m=>m.getAttribute(Eu)===o)??null:a[0]??null,l=(s??a[0])?.getAttribute(Eu)?.trim()||"",c=i?null:n??null,d=s?vu(s):[];return{innerRoot:s,authoredCompositionId:o||l||null,scriptCompositionId:l||o||null,authoredRootId:s?.getAttribute("id")?.trim()||null,styleSources:[...dn(c?.querySelectorAll(Au)),...dn(t.querySelectorAll(Au))],scriptSources:[..._u(c),..._u(t)],linkSources:[...dn(n?.querySelectorAll(wu)),...dn(t.querySelectorAll(wu))],inertScriptsOutsideRoot:[...vu(c),...s?vu(t).filter(m=>!d.includes(m)):[]],variableDefaultCarriers:[r,s].filter(m=>m!=null)}}function mg(e,t){let n=t[0]?.ownerDocument.querySelector("[data-composition-id]"),r=n&&!t.includes(n)?n.getAttribute("data-composition-id"):null,i=r?e.get(r):void 0;r&&i&&e.set(r,i+1)}var __='"use strict";(()=>{function I(e){return e?/[\\w-]/.test(e)||e.charCodeAt(0)>=128:!1}function _(e){return e===" "||e===" "||e===`\n`||e==="\\r"||e==="\\f"}var j=/^[0-9a-fA-F]{1,6}/;function G(e){let n=e>=55296&&e<=57343;return e===0||e>1114111||n?65533:e}function $(e,n){return e[n]==="\\r"&&e[n+1]===`\n`?n+2:_(e[n])?n+1:n}function R(e,n){let t=e[n+1];if(t===void 0||/[\\n\\r\\f]/.test(t))return null;let i=j.exec(e.slice(n+1,n+7));if(!i)return{value:t,end:n+2};let o=G(Number.parseInt(i[0],16));return{value:String.fromCodePoint(o),end:$(e,n+1+i[0].length)}}function H(e,n){let t=o=>I(o)&&!/[0-9-]/.test(o),i=o=>e[o]==="\\\\"&&R(e,o)!==null;return e[n]==="-"?e[n+1]==="-"||t(e[n+1])||i(n+1):t(e[n])||i(n)}function y(e,n){let t=n;for(;e.startsWith("/*",t);){let i=e.indexOf("*/",t+2);t=i<0?e.length:i+2}return t}function A(e,n){let t=y(e,n);for(;_(e[t]);)t=y(e,t+1);return t}function h(e,n){if(!H(e,n))return null;let t=n,i="";for(;t<e.length;){let o=e[t];if(o==="\\\\"){let a=R(e,t);if(!a)break;i+=a.value,t=a.end;continue}if(!I(o))break;i+=o,t+=1}return t===n?null:{value:i,end:t}}var C=45;function T(e){return e>=48&&e<=57}function z(e){return e>=128||e===C||e===95||T(e)||e>=65&&e<=90||e>=97&&e<=122}function J(e,n){let t=e.charCodeAt(n);return t>=1&&t<=31||t===127?!0:T(t)?n===0||n===1&&e.charCodeAt(0)===C:!1}function k(e){let n="";for(let t=0;t<e.length;t+=1){let i=e.charCodeAt(t),o=e[t];i===0?n+="\\uFFFD":J(e,t)?n+=`\\\\${i.toString(16)} `:t===0&&e.length===1&&i===C?n+=`\\\\${o}`:z(i)?n+=o:n+=`\\\\${o}`}return n}var W=/\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\\\\(?:[0-9a-fA-F]{1,6}(?:\\r\\n|[ \\t\\r\\n\\f])?|[\\s\\S])|"(?:[^"\\\\]|\\\\[\\s\\S])*"|\'(?:[^\'\\\\]|\\\\[\\s\\S])*\'|\\[(?:\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\\\\[\\s\\S]|"(?:[^"\\\\]|\\\\[\\s\\S])*"|\'(?:[^\'\\\\]|\\\\[\\s\\S])*\'|[^\\]"\'\\\\/]|\\/(?!\\*))*\\]/g;function Q(e){let n=new Array(e.length).fill(!0);for(let t of e.matchAll(W)){let i=t.index;n.fill(!1,i,i+t[0].length)}return n}function q(e,n,t){if(n.length===0||!e.includes("#"))return e;let i=new Set(n),o=Q(e),a="",u=0;for(;u<e.length;){let d=o[u]&&e[u]==="#"?h(e,u+1):null;d&&i.has(d.value)?(a+=t(d.value),u=d.end):(a+=e[u],u+=1)}return a}function X(e){let n="";for(let t=0;t<e.length;t+=1){if(e[t]==="\\\\"){let i=e[t+1];if(i!==void 0&&/[\\n\\r\\f]/.test(i)){t=$(e,t+1)-1;continue}let o=R(e,t);if(o){n+=o.value,t=o.end-1;continue}}n+=e[t]}return n}function N(e){return Array.from(e,n=>{let t=n.charCodeAt(0);return t===0?"\\uFFFD":t<32||t===127?`\\\\${t.toString(16)} `:n===\'"\'||n==="\\\\"?`\\\\${n}`:n}).join("")}function Y(e,n){return e?{kind:"any"}:n===void 0?{kind:"none"}:{kind:"named",prefix:n}}function Z(e,n){return e[n]==="|"&&e[n+1]!=="="}function B(e,n){let t=e[n]==="*",i=t?{value:"*",end:n+1}:h(e,n),o=y(e,i?.end??n);if(!Z(e,o))return t?null:i?{token:i,namespace:{kind:"none"}}:null;let a=h(e,y(e,o+1));return a?{token:a,namespace:Y(t,i?.value)}:null}function K(e){if(e[0]!=="[")return null;let n=A(e,1),t=B(e,n);if(!t)return null;let{token:i,namespace:o}=t;return{name:i.value,rawName:e.slice(n,i.end),namespace:o,end:i.end}}function ee(e,n){let t=/^(?:"((?:\\\\[\\s\\S]|[^"\\\\])*)"|\'((?:\\\\[\\s\\S]|[^\'\\\\])*)\')/.exec(e.slice(n));return t?{value:X(t[1]??t[2]),end:n+t[0].length}:h(e,n)}function ne(e,n){let t=A(e,n),i=h(e,t);if(i){if(!/^[is]$/i.test(i.value))return null;t=A(e,i.end)}return e[t]!=="]"||t!==e.length-1?null:{flag:i?.value}}function F(e){let n=K(e);if(!n)return null;let t=A(e,n.end),o=["=","~=","|=","^=","$=","*="].find(d=>e.startsWith(d,t));if(!o)return null;let a=ee(e,A(e,t+o.length));if(!a)return null;let u=ne(e,a.end);return u?{name:n.name,rawName:n.rawName,namespace:n.namespace,operator:o,value:a.value,flag:u.flag}:null}function E(e,n){return e.replace(W,t=>t.startsWith("[")?n(t):t)}var re="data-hf-svg-reference-aliases";function O(e,n,t,i){let o={"=":(s,r)=>s===r,"~=":(s,r)=>s.split(/[ \\t\\r\\n\\f]+/).includes(r),"|=":(s,r)=>s===r||s.startsWith(r+"-"),"^=":(s,r)=>s.startsWith(r),"$=":(s,r)=>s.endsWith(r),"*=":(s,r)=>s.includes(r)},a=(s,r,l)=>!r&&l!=="="&&l!=="|="?!1:o[l](s,r),u=s=>s.replace(/[A-Z]/g,r=>r.toLowerCase()),d=s=>{let r=F(s);if(!r)return s;let{name:l,rawName:g,namespace:m,operator:b,value:D,flag:w}=r;if(m.kind==="named"!=(i!==void 0))return s;let x=w?.toLowerCase()==="i"?u:S=>S,L=u(l),P=t.filter(S=>{let V=m.kind==="none"?S.name:S.localName,U=m.kind==="named"?i.get(m.prefix):null;return(m.kind==="any"||S.namespaceURI===U)&&u(V)===L}),v=new Set([s]);for(let S of P)a(x(S.before),x(D),b)&&v.add(`[${g}="${N(S.after)}"${w?` ${w}`:""}]`);return v.size===1?s:`:is(${[...v].join(", ")})`};if(i)return E(e,d);let p=new Map(n.map(({id:s,replacement:r})=>[s,r])),f=new Map;for(let s of t){if(s.name!=="id"||s.before===s.after||p.has(s.before))continue;let r=f.get(s.before);r||(r=new Set([`#${k(s.before)}`]),f.set(s.before,r)),r.add(`#${k(s.after)}`)}for(let[s,r]of f)p.set(s,`:is(${[...r].join(", ")})`);let c=q(e,[...p.keys()],s=>p.get(s));return E(c,d)}function se(e,n,t=!0){let i=[],a=(t?[...e.querySelectorAll(`[${n}]`)]:[]).map(d=>d.getAttribute(n)),u=e.getAttribute?.(n);u&&a.unshift(u);for(let d of a){let p;try{p=JSON.parse(d)}catch{continue}if(!Array.isArray(p))continue;let f=p;for(let c of f){if(!ie(c))continue;let{name:s,localName:r,namespaceURI:l,before:g,after:m}=c;i.push({name:s,localName:r,namespaceURI:l,before:g,after:m})}}return i}function ie(e){if(!e||typeof e!="object")return!1;let{name:n,localName:t,namespaceURI:i,before:o,after:a}=e;return typeof n=="string"&&typeof t=="string"&&(i===null||typeof i=="string")&&typeof o=="string"&&typeof a=="string"}function oe(e){let n=[],t=[],i=!1,o,a=new WeakMap,u=(f,c)=>{for(let s of f){if("selectorText"in s){let r=s,l=a.get(r),g=r.selectorText,m=l?.applied===g?l.authored:g,b=O(m,[],t,c);b!==g&&(r.selectorText=b),b===m?a.delete(r):a.set(r,{authored:m,applied:r.selectorText})}"cssRules"in s&&u(s.cssRules,c)}},d=()=>{if(t.length)for(let f of e.document.styleSheets){let c;try{c=f.cssRules}catch{continue}let s=new Map;for(let r of c){if(!("namespaceURI"in r))continue;let{prefix:l,namespaceURI:g}=r;l&&s.set(l,g||null)}s.size&&u(c,s)}},p={rewrite:(f,c=[])=>{if(typeof f!="string"||!f.includes("#")&&!f.includes("["))return f;let s=O(f,c.length?[...c,...n]:n,t);if(s!==f){if(!o){let r=e.document.createElement("div");o=r.matches.bind(r)}o(f)}return s},refresh(){t=se(e.document,re).filter(r=>r.before!==r.after);let f=new Set(t.filter(r=>r.name==="id").map(r=>r.before)),c=new Set;n=[];for(let r of e.document.querySelectorAll("[data-hf-authored-id][id]")){let l=r.getAttribute("data-hf-authored-id");if(!l||l===r.id||c.has(l)||f.has(l))continue;c.add(l);let g=N(l);n.push({id:l,replacement:`:is(#${k(l)}, [data-hf-authored-id="${g}"])`})}if(d(),i||!n.length&&!t.length)return;let s=e.Element.prototype;s.querySelector=new Proxy(s.querySelector,{apply(r,l,g){return Reflect.apply(r,l,[p.rewrite(g[0])])}}),s.querySelectorAll=new Proxy(s.querySelectorAll,{apply(r,l,g){return Reflect.apply(r,l,[p.rewrite(g[0])])}}),i=!0}};e.__hfSvgSelectorAliases=p,p.refresh()}function M(){let e=window;e.__hfSvgSelectorAliases||oe(e)}M();})();\n';function pg(){return __}var Te=Vv(V0(),1),Va=Te.default,BO=Te.default.stringify,UO=Te.default.fromJSON,WO=Te.default.plugin,VO=Te.default.parse,$O=Te.default.list,qO=Te.default.document,zO=Te.default.comment,jO=Te.default.atRule,KO=Te.default.rule,YO=Te.default.decl,XO=Te.default.root,JO=Te.default.CssSyntaxError,QO=Te.default.Declaration,ZO=Te.default.Container,eH=Te.default.Processor,tH=Te.default.Document,nH=Te.default.Comment,rH=Te.default.Warning,iH=Te.default.AtRule,oH=Te.default.Result,aH=Te.default.Input,sH=Te.default.Rule,lH=Te.default.Root,uH=Te.default.Node;var Xu="data-hf-scene",Ki="hf-scene-parts",Ju="data-hf-scene-fonts",Qu=e=>e.match(/@font-face\s*\{[^}]*\}/gi)??[],Zu="data-hf-scene-no-swap";var ec="data-hf-authored-id",$0="data-hf-inner-root";function tc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nc(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function i1(e){let t=e.trim();return t?Array.from(new Set([t,Ot(t)])).filter(Boolean):[]}function o1(e,t,n){let r=i1(t);return No(e,r,()=>n)}function a1(e,t){let n=t?.trim();return n?o1(e,n,`[${ec}="${nc(n)}"]`):e}function q0(e){return`${e}:not(:has([${$0}])), ${e} > [${$0}]`}function s1(e,t,n,r,i,o){let a=a1(e,r),s=l1(a,t,n),l=s.trim();if(!l||l==="*")return e;if(/^(html|body|:root)$/i.test(l))return o?q0(t):e;let c=new RegExp(`\\[\\s*data-composition-id\\s*[\\^\\*\\$]?=\\s*(["'])${tc(n)}\\1\\s*\\]`,"g");if(c.test(l))return l.replace(c,"").trim()===""?q0(t):s.replace(c,t);let d=s.match(/^\s*/)?.[0]??"",m=s.match(/\s*$/)?.[0]??"";if(i){let f=r?`[${ec}="${nc(r)}"]`:null;if(f&&l.startsWith(f)){let p=l.slice(f.length);return`${d}${t}${f}${p}${m}`}}return`${d}${t} ${l}${m}`}function l1(e,t,n){let r=tc(n),i=String.raw`\[\s*data-composition-id\s*=\s*(?:"${r}"|'${r}')\s*\]`,o=String.raw`\s*\[\s*data-(?:start|duration)\s*=\s*(?:"[^"]*"|'[^']*')\s*\]`;return e.replace(new RegExp(`${i}(?:${o})+`,"g"),t).replace(new RegExp(`(?:${o})+${i}`,"g"),t)}var u1=new Set(["keyframes","-webkit-keyframes","font-face"]);function c1(e){return e?.type==="atrule"}function d1(e){let t=e.parent;for(;t;){if(c1(t)&&u1.has(t.name.toLowerCase()))return!0;t=t.parent}return!1}function f1(e){let t=e.parent;for(;t;){if(t.type==="rule")return!0;t=t.parent}return!1}function z0(e,t,n,r,i){let o=t.trim();if(!e||!o)return e;let a=n||`[data-composition-id="${nc(o)}"]`,s;try{s=Va.parse(e)}catch{return""}return s.walkRules(l=>{d1(l)||f1(l)||(l.selectors=l.selectors.map(c=>s1(c,a,o,r,i?.compoundAuthoredRoot,i?.scopeRootSelectors)))}),s.toResult({map:!1}).css}function lt(e){return JSON.stringify(e).replace(/</g,"\\u003c")}var j0=`!__hfBaseHyperframes
|
|
41
|
+
`,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(i=>{i.classList.add("__hf-flash"),setTimeout(()=>i.classList.remove("__hf-flash"),t)})}catch(r){G("bridge.flashElements.querySelector",r)}}var Qo=e=>4*Number.EPSILON*Math.max(1,Math.abs(e));function di(e,t){return!Number.isFinite(e)||!Number.isFinite(t)?e===t:Math.abs(e-t)<=Qo(Math.max(Math.abs(e),Math.abs(t)))}var Wm=(e,t)=>e>=t||di(e,t),on=(e,t,n)=>Wm(e,t)&&e<n&&!di(e,n),rA=1e-6,lr=(e,t,n,r)=>on(e,t,n)||Wm(e,t)&&r>0&&n>=r-rA;var gl=null;function Vm(e){gl=e}function at(e,t){if(gl)try{gl({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch(n){G("runtime.analytics.site1",n)}}function iA(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-"),n=0,r=t.length;for(;n<r&&t[n]==="-";)n++;for(;r>n&&t[r-1]==="-";)r--;let i=t.slice(n,r);return i.length>0?i:"node"}function ur(e){return`--${iA(e)}`}function $m(e){let t=new Map;for(let n of e){let r=ur(n),i=t.get(r);i?i.includes(n)||i.push(n):t.set(r,[n])}return[...t.values()].filter(n=>n.length>1)}function zm(){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,fi(i));let n=ea(),r={...t,...n};for(let i of e)xl(i,r);return r}var qm=new Set;function jm(e){let t=e?.getAttribute("data-composition-variables");if(!t)return[];let n;try{n=JSON.parse(t)}catch{return[]}return Array.isArray(n)?n.filter(r=>!!r&&typeof r=="object"):[]}function oA(e,t){return t?.trim()||e.getAttribute("data-composition-id")?.trim()||e.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()||"composition"}function aA(e){return Array.isArray(e.options)?e.options.map(t=>t&&typeof t=="object"?t.value:t).filter(t=>typeof t=="string"||typeof t=="number"):[]}function sA(e,t){if(typeof e.id!="string")return null;let n=t[e.id];if(n==null||"default"in e&&String(n)===String(e.default))return null;let r=aA(e);return r.length===0||r.some(i=>String(i)===String(n))?null:{id:e.id,value:n,allowed:r}}function xl(e,t,n){if(!e)return;let r=jm(e);if(r.length===0)return;let i=oA(e,n);for(let o of r){let a=sA(o,t);if(!a)continue;let s=`${i}|${a.id}|${String(a.value)}`;if(qm.has(s))continue;qm.add(s);let l="default"in o?JSON.stringify(o.default):"the composition default";console.warn(`[hyperframes] runtime_unknown_enum_value: ${i} variable "${a.id}" got ${JSON.stringify(a.value)}, which is not a declared option (${a.allowed.join(", ")}). Rendering ${l} instead.`)}}function fi(e){let t={};for(let n of jm(e))typeof n.id!="string"||!("default"in n)||(t[n.id]=n.default);return t}var bl="data-hf-css-vars";function Zo(e){return"style"in e&&typeof e.style?.setProperty=="function"}function yl(e,t){if(!Zo(e))return;let n=[];for(let[r,i]of Object.entries(t))if(typeof i=="string"&&i!==""||typeof i=="number"){let o=ur(r);e.style.setProperty(o,String(i)),n.push(o)}n.length>0&&e.setAttribute(bl,n.join(" "))}function Km(e,t,n){let r={};for(let[i,o]of Object.entries(t)){let a=ur(i);((Zo(e)?e.style.getPropertyValue(a):"")||(n?n.getComputedStyle(e).getPropertyValue(a):"")).trim()===""&&(r[i]=o)}return r}function Ym(e){if(!Zo(e))return;let t=e.getAttribute(bl);if(t){for(let n of t.split(" "))n.startsWith("--")&&e.style.removeProperty(n);e.removeAttribute(bl)}}function Xm(e){let t=new Set;e.documentElement?.hasAttribute("data-composition-variables")&&t.add(e.documentElement);for(let i of Array.from(e.querySelectorAll("[data-composition-variables]")))t.add(i);let n=ea(),r=[];for(let i of t)r.push(...lA(i,n,e.defaultView));for(let i of $m(r))console.warn(`composition variables ${i.join(", ")} collapse to the same CSS property ${ur(i[0]??"")}. Rename one to avoid cross-talk`)}function lA(e,t,n){if(!Zo(e))return[];let r=fi(e),i={};for(let[o,a]of Object.entries(r)){if(o in t)continue;let s=ur(o);(e.style.getPropertyValue(s)||(n?n.getComputedStyle(e).getPropertyValue(s):"")).trim()===""&&(i[o]=a)}for(let[o,a]of Object.entries(t))o in r&&(i[o]=a);return yl(e,i),Object.keys(r)}function Jm(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 ea(){if(typeof window>"u")return{};let e=window.__hfVariables;return!e||typeof e!="object"||Array.isArray(e)?{}:e}function ta(e,t,n,r){let i=!1;try{e.pause()}catch(o){i=!0,G(r,o)}try{e.currentTime=t}catch(o){G(n,o)}if(i)try{e.pause()}catch(o){G(r,o)}}function Qm(e){let t=[],n=(f,p=()=>f.getAnimations())=>{if(typeof f.getAnimations!="function")return[];try{return p()}catch{return[]}},r=f=>{let p=new Map;if(t.length===0)return p;let b=typeof CSSAnimation<"u";for(let x of n(document,f)){if(b&&!(x instanceof CSSAnimation))continue;let y=x.effect;if(!y?.target||y.pseudoElement)continue;let v=p.get(y.target);v?v.push(x):p.set(y.target,[x])}return p},i=(f=[],p=[])=>[...p,...f.filter(b=>!p.includes(b)&&b.playState!=="idle")],o=f=>{let p=f.closest("[data-start]")??f;return e?.resolveStartSeconds?e.resolveStartSeconds(p):Number.parseFloat(p.getAttribute("data-start")??"0")||0},a=f=>{let p=A=>(A||"").split(",").map(C=>Number.parseFloat(C)/(C.trim().endsWith("ms")?1e3:1)),b=p(f.animationDuration),x=p(f.animationDelay),y=f.animationName.split(","),v=0;return y.forEach((A,C)=>{if(A.trim()==="none")return;let L=x[C%x.length]+b[C%b.length];L>v&&(v=L)}),{cycleSeconds:v,delays:y.map((A,C)=>x[C%x.length]||0)}},s=(f,p)=>{let b=null;try{b=f.effect?.getComputedTiming?.()??null}catch(y){G("runtime.adapters.css.site5",y)}if(!b)return{};let x=Number(b.endTime);return Number.isFinite(x)?{endSeconds:p+x/1e3}:{unbounded:!0}},l=(f,p)=>{for(let b of f)ta(b,p,"runtime.adapters.css.site1","runtime.adapters.css.site2")},c=f=>{for(let p of f)try{p.play()}catch(b){G("runtime.adapters.css.site3",b)}},d=f=>{for(let p of f)try{p.pause()}catch(b){G("runtime.adapters.css.site4",b)}},m=f=>{f.baseDelay?f.el.style.animationDelay=f.baseDelay:f.el.style.removeProperty("animation-delay"),f.basePlayState?f.el.style.animationPlayState=f.basePlayState:f.el.style.removeProperty("animation-play-state")};return{name:"css",discover:()=>{for(let b of t)m(b);let f=new Map(t.map(b=>[b.el,b.handles]));t=[];let p=document.querySelectorAll("*");for(let b of p){if(!_e(b))continue;let x=window.getComputedStyle(b);!x.animationName||x.animationName==="none"||t.push({el:b,baseDelay:b.style.animationDelay||"",basePlayState:b.style.animationPlayState||"",...a(x),handles:f.get(b)})}},getAnimationCycleEndSeconds:()=>{let f=0;for(let p of t)!p.el.isConnected||p.cycleSeconds<=0||(f=Math.max(f,o(p.el)+p.cycleSeconds));return f>0?f:null},getInferredDurationSeconds:()=>{let f=0;for(let p of t){if(!p.el.isConnected)continue;let b=o(p.el);for(let x of n(p.el)){let y=s(x,b);y.endSeconds!=null&&(f=Math.max(f,y.endSeconds))}}return f>0?f:null},seek:f=>{let p=Number(f.time)||0,b=r(f.pageAnimations);for(let x of t)x.handles=i(x.handles,b.get(x.el));for(let x of t){if(!x.el.isConnected)continue;let y=o(x.el),v=Math.max(0,p-y)*1e3;if(x.handles?.length){x.el.style.animationDelay!==x.baseDelay&&m(x),l(x.handles,v);continue}x.el.style.animationPlayState="paused",x.el.style.animationDelay=x.delays.map(A=>`${Number((A-v/1e3).toFixed(3))}s`).join(", ")}},pause:f=>{let p=r(f?.pageAnimations);for(let b of t){if(!b.el.isConnected)continue;let x=p.get(b.el);x&&(d(x),m(b))}},play:()=>{let f=r();for(let p of t)p.el.isConnected&&(m(p),c(f.get(p.el)??[]))},revert:()=>{t=[]}}}function ia(e,t,n){e.totalDuration?.();let r=e.getChildren?.(!1,!0,!0)??[],i=pA(e,n,t).map(l=>[l,l.ratio,l._zTime,l._act]),o=np(r,t).map(l=>[l,l._ts]),a=new Set;for(let[l]of o)for(let c=l.parent;c&&!a.has(c);c=c.parent)a.add(c);let s=[...a].map(l=>[l,l._dur,l._tDur,l._end,l._dirty]);for(let[l]of o)l._ts=0;try{uA(e,r,t,n)}finally{for(let[l,c]of o)l._ts=c;for(let[l,c,d,m,f]of s)Object.assign(l,{_dur:c,_tDur:d,_end:m,_dirty:f})}for(let[l,c,d,m]of i)l.ratio=c,l._zTime=d,l._act=m}function uA(e,t,n,r){let i=n>=na;e.totalTime(i?n-na:n+na,!0),ap(t,n,i?na:0),e.totalTime(n,!0),!i&&r&&tp(e,r,n)}function tp(e,t,n){for(let r of mA(e,t,n)){let{ratio:i,_zTime:o,_act:a}=r;r.render(0,!0,!0),Object.assign(r,{ratio:i,_zTime:o,_act:a})}}function cA(e){let t=e,[n]="_first"in t?t._first?[t._first]:[]:e.getChildren?.(!1,!0,!0)??[],r=n?.parent;return r!==void 0&&!r._initted}function mi(e,t,n,r){if(typeof e.totalTime!="function")return e.seek(t,n),!1;let i=Number(e.totalTime());return e.totalTime(t,n),t<i&&r&&tp(e,r,t),i!==t||!cA(e)?!1:(ia({totalTime:e.totalTime.bind(e),totalDuration:e.totalDuration?.bind(e),getChildren:e.getChildren?.bind(e)},t,r),!0)}var Sl=1e-6;function np(e,t,n=[]){for(let r of e)r.startTime()>t+Sl?n.push(r):r.getChildren&&r.endTime()>=t&&np(r.getChildren(!1,!0,!0),r.time(),n);return n}function rp(e){return(e.getChildren?.(!0,!0,!0)??[]).filter(t=>{let n=t;return typeof n.getChildren=="function"||n.totalDuration?.()===0})}var Zm=new WeakMap,ep=.05;function dA(e,t){let n=Number(e._start);for(let r=e.parent;r&&r!==t;r=r.parent){if(r._repeat||!r._ts)return null;n=Number(r._start)+n/r._ts}return Number.isFinite(n)?n:null}function fA(e,t){let n={version:t.version,always:[],points:[]};for(let r of rp(e)){let i=r,o=typeof i.getChildren=="function"?null:dA(i,t.owner);o===null?n.always.push(r):n.points.push({at:o,mark:r})}return n.points.sort((r,i)=>r.at-i.at),n}function ip(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1;e[i].at<t?n=i+1:r=i}return n}function op(e,t){let n=Zm.get(t.owner);return n?.version!==t.version&&(n=fA(e,t),Zm.set(t.owner,n)),n}function mA(e,t,n){let{points:r}=op(e,t),i=[];for(let o=ip(r,n-Sl);o<r.length&&!(r[o].at>n+Sl);o++)i.push(r[o].mark);return i}function pA(e,t,n){if(!t)return rp(e);let r=op(e,t),{points:i}=r,o=[...r.always],a=n+ep;for(let s=ip(i,n-ep);s<i.length&&!(i[s].at>a);s++)o.push(i[s].mark);return o}var ra=2e-8,na=.001,hA=e=>{let t=e;return typeof t?.render=="function"&&typeof t.startTime=="function"&&typeof t.paused=="function"&&typeof t.timeScale=="function"&&t.timeScale()>0&&!t.paused()};function gA(e){return e.vars?.keyframes&&(e.render(ra,!0),e.render(-ra,!0)),e._startAt&&e._startAt.render(ra,!0,!0),!!(e.vars?.keyframes||e._startAt)}function ap(e,t,n){for(let r of e.filter(hA)){let i=(t-r.startTime())*r.timeScale();Math.abs(i)<1e-9&&gA(r)||i>0&&bA(r,i,n*r.timeScale())}}function bA(e,t,n){t<n&&e._startAt&&e._startAt.render(ra,!0,!0);let r=e.getChildren?e:e.timeline;r?.getChildren&&t<=e.totalDuration()&&ap(r.getChildren(!1,!0,!0),t,n)}function sp(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let r=Math.max(0,Number(t.time)||0),i=t.suppressEvents===!0;typeof n.totalTime=="function"?(n.totalTime(r,i),ia({totalTime:n.totalTime.bind(n),totalDuration:n.totalDuration?.bind(n),getChildren:n.getChildren?.bind(n)},r)):n.seek(r,i)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function lp(){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??[],r=new Set(n);for(let i of t)r.has(i)||n.push(i);window.__hfAnime=n}catch(e){G("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 r of n)try{typeof r.seek=="function"&&r.seek(t)}catch(i){G("runtime.adapters.animejs.site2",i)}},pause:()=>{let e=window.__hfAnime;if(!(!e||e.length===0))for(let t of e)try{typeof t.pause=="function"&&t.pause()}catch(n){G("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){G("runtime.adapters.animejs.site4",n)}},revert:()=>{}}}function fp(e){let t=r=>{let i=cp(r),o=i&&typeof i.closest=="function"?i.closest("[data-composition-id]"):null;return o&&e?.resolveStartSeconds?e.resolveStartSeconds(o):0},n=(r,i)=>Math.max(0,i-t(r));return{name:"lottie",discover:()=>{try{let r=window.lottie;if(r&&typeof r.getRegisteredAnimations=="function"){let i=r.getRegisteredAnimations();if(Array.isArray(i)&&i.length>0){let o=window.__hfLottie??[],a=new Set(o);for(let s of i)a.has(s)||o.push(s);window.__hfLottie=o}}}catch(r){G("runtime.adapters.lottie.site1",r)}},seek:r=>{let i=Math.max(0,Number(r.time)||0),o=window.__hfLottie;if(!(!o||o.length===0))for(let a of o)try{let s=n(a,i),l=a.loop===!0;if(oa(a)){let c=s*a.frameRate;a.totalFrames>0&&l?a.goToAndStop(vl(c,a.totalFrames),!0):a.totalFrames>0&&c>=a.totalFrames?a.goToAndStop(a.totalFrames-1,!0):a.goToAndStop(s*1e3,!1)}else if(El(a)){if(typeof a.setFrame=="function"){let c=a.totalFrames??0,d=a.duration??0;if(!Number.isFinite(c)||c<=0||!Number.isFinite(d)||d<=0)continue;let m=s*c/d;a.setFrame(Math.min(l?vl(m,c):m,c-1))}else if(typeof a.setCurrentRawFrameValue=="function"){let c=a.totalFrames??0,d=a.frameRate??30,m=l&&c>0?vl(s*d,c):s*d;c>0&&a.setCurrentRawFrameValue(Math.min(m,c-1))}else if(typeof a.seek=="function"){let c=a.duration??0;if(Number.isFinite(c)&&c>0){let d=Math.min(100,(l?s%c:s)/c*100);a.seek(d)}}}}catch(s){G("runtime.adapters.lottie.site2",s)}},pause:()=>{let r=window.__hfLottie;if(!(!r||r.length===0))for(let i of r)try{(oa(i)||El(i))&&i.pause()}catch(o){G("runtime.adapters.lottie.site3",o)}},revert:()=>{},getInferredDurationSeconds:()=>up((r,i)=>i),getAnimationCycleEndSeconds:()=>up((r,i)=>cp(r)?.isConnected===!1?null:t(r)+i)}}function up(e){let t=window.__hfLottie;if(!t||t.length===0)return null;let n=0,r=!1;for(let i of t){let o=null;try{let a=xA(i);o=a==null?null:e(i,a)}catch(a){G("runtime.adapters.lottie.site4",a)}o!=null&&(r=!0,n=Math.max(n,o))}return r?n:null}function cp(e){return oa(e)?e.wrapper:e.canvas}function vl(e,t){let n=e%t;return t-n<1e-6?0:n}function dp(e,t){return!Number.isFinite(e)||!e||e<=0||!Number.isFinite(t)||!t||t<=0?null:e/t}function xA(e){return oa(e)?dp(e.totalFrames,e.frameRate):El(e)?Number.isFinite(e.duration)&&(e.duration??0)>0?e.duration??null:dp(e.totalFrames,e.frameRate):null}function oa(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function El(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}var Al=-1,wl=new Set,mp=new WeakSet,cr,_l=0;function pp(e){let t=[],n=!0,r={time:e,waitUntil:i=>{if(!n)throw new Error("hf-seek waitUntil() must be called synchronously from the event listener");t.push(i)}};try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:r}))}catch(i){G("runtime.adapters.seek-dispatch.site1",i)}finally{n=!1}t.length!==0&&st(Promise.all(t))}function st(e,t){let n=e.then(()=>({status:"fulfilled"})).catch(r=>({status:"rejected",reason:r}));wl.add(n),t==="video-frame"&&mp.add(n),n.then(r=>{wl.delete(n)&&r.status==="rejected"&&cr===void 0&&(cr={reason:r.reason})})}function aa(e){e!==Al&&(Al=e,pp(e))}function sa(e){Al=e,pp(e)}function hp(){return _l>0}async function Cl(e){let t=()=>[...wl].filter(r=>e?.videoFrames!==!1||!mp.has(r));_l+=1;let n=cr;try{await Promise.resolve();for(let i=t();i.length>0;i=t()){let a=(await Promise.all(i)).find(s=>s.status==="rejected");n===void 0&&a?.status==="rejected"&&(n={reason:a.reason})}let r=cr;if(n===void 0&&(n=r),cr===r&&(cr=void 0),n)throw n.reason}finally{_l-=1}}function gp(){let e=null,t=0,n=null,r=null,i=null,o=null,a=()=>{if(typeof window>"u")return null;let d=window.THREE?.DefaultLoadingManager;return!d||typeof d!="object"||typeof d.itemsLoaded!="number"||typeof d.itemsTotal!="number"?null:d},s=c=>{o||c.itemsTotal<=c.itemsLoaded||(o=new Promise(d=>{c.onLoad=function(){try{i?.call(this)}finally{o=null,c.onLoad=i??null,d()}}}))},l=c=>{n!==c&&(n=c,r=c.onStart??null,i=c.onLoad??null,c.onStart=function(d,m,f){try{r?.call(this,d,m,f)}finally{s(c)}})};return{name:"three",discover:()=>{let c=a();c&&(l(c),s(c))},seek:c=>{e=Math.max(0,Number(c.time)||0),t=e,window.__hfThreeTime=e,aa(e)},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0},getReadyPromise:()=>{let c=a();return!c||c.itemsTotal<=c.itemsLoaded?null:(o||s(c),o)}}}function Tt(e){let t=null,n=new WeakSet;return{name:e.name,discover:()=>{},seek:()=>{},pause:()=>{},play:()=>{},revert:()=>{},getReadyPromise:()=>{let r=e.getInstances();if(r.length===0)return null;let i=r.filter(o=>!n.has(o));return i.length===0?null:t||(t=Promise.allSettled(i.map(o=>e.waitFor(o).then(()=>{n.add(o)}))).then(()=>{t=null}),t)}}}function bp(){return Tt({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 xp(){return Tt({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 yp(){return Tt({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 Sp(){return Tt({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 vp(){return Tt({name:"d3",getInstances:()=>{if(typeof window>"u")return[];let e=window.__hfD3;return Array.isArray(e)?e:[]},waitFor:e=>e.end()})}var yA=250;function Ep(){let e=null,t=0,n=null,r=()=>{n!==null&&(window.clearInterval(n),n=null)},i=()=>{n===null&&document.querySelector("[data-composition-id][data-requires-webgpu]")&&(n=window.setInterval(()=>{e!==null&&(hp()||(window.__hfTypegpuTime=e,sa(e)))},yA))};return{name:"typegpu",discover:()=>{},seek:o=>{e=Math.max(0,Number(o.time)||0),t=e,window.__hfTypegpuTime=e,aa(e)},pause:()=>{e==null&&(e=Math.max(0,t)),i()},play:()=>{r(),e=null},revert:()=>{r(),e=null,t=0}}}var SA=["width","height","top","left","right","bottom","inset","object-fit","object-position","z-index","opacity","visibility","filter","mix-blend-mode","backdrop-filter","border-width","border-style","border-color","border-radius","overflow","clip-path","mask","mask-image","mask-size","mask-position","mask-repeat","transform","transform-origin","translate","rotate","scale","box-sizing"];function Tl(e){return Number.isFinite(e)&&e>0?e:30}function Rl(e){return Number.isFinite(e)&&e>0?e:0}function kl(e,t){let n=Tl(t);return Math.floor(Rl(e)*n+1e-9)/n}function wp(e,t,n){let r=Number.isInteger(n)?n:1;if(r<=1)return kl(e,t);let i=Tl(t)*r;return Math.round(Rl(e)*i)/i}function Ap(e,t){let n=Tl(t),r=Rl(e),i=r*n,o=Math.round(i);return Math.abs(i-o)<=.001?o/n:r}function la(e,t,n){return{start:Ap(e,n),end:Number.isFinite(t)?Ap(t,n):t}}function _p(e,t,n=SA){for(let r of n){let i=t.getPropertyValue(r);i&&e.setProperty(r,i)}}var dr=new Map,Cp=()=>dr.size>0;function Tp(e){if(dr.has(e.element))throw new Error("This element already has a frame source");let t=e.sourceRange;if(t&&(!Number.isFinite(t.start)||t.start<0||!Number.isFinite(t.duration)||t.duration<=0||!Number.isFinite(t.fps)||t.fps<=0))throw new Error("Frame source ranges require a nonnegative start, positive duration and FPS");let n=new AbortController,r=new Promise(c=>{n.signal.addEventListener("abort",()=>c(),{once:!0})}),i=Promise.race([Promise.resolve(e.ready),r]);i.catch(()=>{});let o=null,a=null,s=async()=>{let c;try{for(await i;!n.signal.aborted&&o!==null;){let d=o;o=null;try{await Promise.race([e.render(d,n.signal),r])}catch(m){c??(c={reason:m})}}if(c)throw c.reason}finally{o=null,a=null}},l={element:e.element,ready:i,seek(c){return o=t?t.start+Math.min(Math.max(0,c),Math.max(0,t.duration-1/t.fps)):c,a??(a=s()),a},dispose(){n.signal.aborted||(n.abort(),o=null,dr.delete(e.element),e.dispose?.())}};return dr.set(e.element,l),l.dispose}function Rp(e){let t=new Set,n=[],r=null,i=()=>{for(let s of t)dr.get(s.element)!==s&&t.delete(s);let a=[];for(let[s,l]of dr){if(!s.isConnected){l.dispose();continue}t.has(l)||(t.add(l),st(l.ready)),a.push([s,l])}return a},o=new MutationObserver(()=>{i()});return o.observe(document,{childList:!0,subtree:!0}),{name:"frame-source",discover:()=>{i()},pause:()=>{},seek:({time:a})=>{for(let[s,l]of i()){let c=e.start(s),d=e.duration(s),m=c+(d??1/0),f=e.exportRenderSeek()?la(c,m,e.canonicalFps()):{start:c,end:m};if(!lr(a,f.start,f.end,e.compositionDuration()))continue;let p=Math.max(0,a-c),b=nr(s)+Fn(_t(s),p);st(l.seek(b))}},getReadyPromise:()=>{let a=i().map(([,s])=>s);return a.length===0?null:((a.length!==n.length||a.some((s,l)=>s!==n[l]))&&(n=a,r=Promise.all(a.map(s=>s.ready))),r)},revert:()=>{o.disconnect();for(let a of t)a.dispose();t.clear()}}}var kp=':not([muted]):is(:not([data-has-audio]),[data-has-audio="true"])',FI=`audio[data-start], video[data-start]${kp}`;function ua(e){if(e.tagName.toLowerCase()!=="video"||e.hasAttribute("muted"))return!1;let t=e.getAttribute("data-has-audio");return t===null||t==="true"}function Mp(e){return(e.volume??1)>1||!!(e.fxChain||e.automation||e.audioGroup||e.masterChain)}var pi="data-hf-render-id",Np="data-hf-group-render-id";function vA(e){return e.getAttribute(pi)||e.id||null}var EA="__render_frame_",AA="__";function wA(e){return`${EA}${e}${AA}`}function _A(e){let t=vA(e);return t?wA(t):null}function ht(e){let t=_A(e),n=t?document.getElementById(t):null;if(!n)return null;let r=e.nextElementSibling;for(;r&&r.id!==t;)r=r.nextElementSibling;return r??(r=n),We(r)?r:null}function Lp(e){let t=e.nextElementSibling;if(We(t)&&t.classList.contains("__render_frame__")&&t.complete&&t.naturalWidth>0)return t;let n=ht(e);return n&&n.complete&&n.naturalWidth>0?n:null}function Fp(){let e=globalThis.GPUQueue;if(!e?.prototype?.copyExternalImageToTexture)return;let t=e.prototype.copyExternalImageToTexture;e.prototype.copyExternalImageToTexture=function(n,r,i){if(Se(n?.source)){let o=Lp(n.source);if(o)return t.call(this,{...n,source:o},r,i)}return t.call(this,n,r,i)}}function Ip(){let e=[globalThis.WebGL2RenderingContext,globalThis.WebGLRenderingContext],t=["texImage2D","texSubImage2D"];for(let n of e){let r=n?.prototype;if(r)for(let i of t){let o=r[i];if(typeof o!="function"||o.__hfVideoPatched)continue;let a=function(...s){let l=s.length-1,c=s[l];if(Se(c)){let d=Lp(c);d&&(s[l]=d)}return o.apply(this,s)};a.__hfVideoPatched=!0,r[i]=a}}}function Dp(){let e=!1,t=0,n=!1,r,i,o,a=new Set,s=new WeakMap,l=(y=()=>document.getAnimations())=>{if(!document.getAnimations)return[];try{return y()}catch{return[]}},c=y=>{let v=Number(y.currentTime);return Number.isFinite(v)&&v>0?v:0},d=(y,v)=>v<=0?y:y>=v?Math.max(0,y-v):y,m=(y,v)=>{let A=s.get(y);if(A)return A;let C={compositionTimeMs:v,animationTimeMs:e?d(c(y),v):c(y)};return s.set(y,C),C},f=(y,v)=>{if(!a.has(y)){a.add(y);let A=()=>{a.delete(y)};try{y.addEventListener("finish",A,{once:!0}),y.addEventListener("cancel",A,{once:!0})}catch(C){G("runtime.adapters.waapi.site4",C)}}m(y,v)},p=(y,v)=>{for(let A of y)f(A,v)},b=()=>{if(n||typeof Element>"u")return;let y=Element.prototype;if(typeof y.animate!="function"||y.__hfOriginalAnimate)return;let v=y.animate;try{Object.defineProperty(y,"__hfOriginalAnimate",{value:v,configurable:!0});let A=function(...C){let L=v.apply(this,C);return f(L,t),L};y.animate=A,r=y,i=v,o=A,n=!0}catch{}},x=y=>{let v=null;try{v=y.effect?.getComputedTiming?.()??null}catch(L){G("runtime.adapters.waapi.site4",L)}if(!v)return{};let A=Number(v.endTime);return Number.isFinite(A)?{endSeconds:(s.get(y)?.compositionTimeMs??0)/1e3+A/1e3}:{unbounded:!0}};return{name:"waapi",discover:()=>{e=!0,b(),p(l(),t)},seek:y=>{let v=Math.max(0,(Number(y.time)||0)*1e3);t=v,(!e||a.size>0)&&p(l(y.pageAnimations),e?v:0);for(let A of a){let C=e?m(A,v):m(A,0),L=C.animationTimeMs+Math.max(0,v-C.compositionTimeMs);ta(A,L,"runtime.adapters.waapi.site1","runtime.adapters.waapi.site2")}},pause:y=>{e||p(l(y?.pageAnimations),t);for(let v of a)try{v.pause()}catch(A){G("runtime.adapters.waapi.site3",A)}},revert:()=>{if(a.clear(),s=new WeakMap,e=!1,t=0,r&&i&&o&&r.animate===o)try{r.animate=i,r.__hfOriginalAnimate===i&&delete r.__hfOriginalAnimate}catch(y){G("runtime.adapters.waapi.site5",y)}r=void 0,i=void 0,o=void 0,n=!1},getInferredDurationSeconds:()=>{let y=0;for(let v of l()){let A=x(v);A.endSeconds!=null&&(y=Math.max(y,A.endSeconds))}return y>0?y:null}}}function CA(e,t,n){let r=e.filter(o=>Number.isFinite(o.time)&&Number.isFinite(o.volume)).map(o=>({time:Math.max(0,o.time-t),volume:ot(o.volume)})).sort((o,a)=>o.time-a.time),i=[];for(let o of r){let a=i.at(-1);a&&Math.abs(a.time-o.time)<1e-9?a.volume=o.volume:i.push(o)}return i.length===0||i[0].time>0&&i.unshift({time:0,volume:ot(n)}),i}function Pp(e,t){if(e.length===0)return 1;let n=0;for(;n<e.length-2&&t>=e[n+1].time;)n+=1;let r=e[n],i=e[n+1]??r,o=i.time-r.time,a=o<=0?0:Math.min(1,Math.max(0,(t-r.time)/o));return r.volume+(i.volume-r.volume)*a}function TA(e,t,n,r){let i=e.at(-1);!i||Math.abs(i.volume-n.volume)>1e-4?(i&&t&&t.time>i.time&&e.push(t),e.push(n)):r&&n.time>i.time&&e.push(n)}function RA(e){let t=Number.parseFloat(e??"");return Number.isFinite(t)?t:void 0}function kA(e,t){let n=Ye({timelineRegistry:window.__timelines,includeAuthoredTimingAttrs:!0}).resolveMediaStartForElement(e),r=Le(e.dataset.end)??void 0,i=Le(e.dataset.duration)??void 0,o=t;i!==void 0&&i>0?o=n+i:r!==void 0&&r>n&&(o=r);let a=RA(e.dataset.volume)??1;return{start:n,end:o,staticVolume:ot(a)}}function MA(e,t,n,r,{start:i,end:o,staticVolume:a}){let s=1/Math.min(60,Math.max(1,r)),l=Math.max(0,i),c=Math.min(n,o),d=fm(e,()=>{e.volume=a;let f=[],p;for(let b=l;b<=c+1e-6;b=Math.min(c,b+s)){t(b);let x=Number(e.volume);if(Number.isFinite(x)){let y={time:Number(b.toFixed(6)),volume:Number(ot(x).toFixed(6))};TA(f,p,y,b===c),p=y}if(b===c)break}return f});return d.some(f=>Math.abs(f.volume-a)>1e-4)?d:null}function ca(e,t,n=0){return n>3||e===null||typeof e!="object"?!1:Array.isArray(e)?e.some(r=>ca(r,t,n+1)):Object.getPrototypeOf(e)!==Object.prototype?!1:Object.entries(e).some(([r,i])=>t(r)||ca(i,t,n+1))}var NA=e=>typeof e?.nodeType=="number";function LA(e,t){for(let n=Object(e);n;n=Object.getPrototypeOf(n)){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return typeof r.set=="function"}return!1}function Ml(e){let t={elements:new Set,anySetter:!1,unknown:!0};if(typeof e.getChildren!="function")return t;try{let n={elements:new Set,anySetter:!1,unknown:!1};for(let r of e.getChildren(!0,!0,!1)){let i=r.targets?.()??[];for(let o of i)NA(o)?ca(r.vars,a=>a==="volume")&&n.elements.add(o):!n.anySetter&&ca(r.vars,a=>LA(o,a))&&(n.anySetter=!0)}return n}catch{return t}}var FA=(e,t)=>e.unknown||e.anySetter||e.elements.has(t);function Op(e,t,n,r,i={}){if(i.allowLiveTimelineSeek===!1||!t||!pe(e)||n<=0||!FA(i.movers?.()??Ml(t),e))return;let o=c=>{try{typeof t.totalTime=="function"?t.totalTime(c,!0):typeof t.seek=="function"&&t.seek(c,!0)}catch{}},a=typeof t.totalTime=="function"?Number(t.totalTime()):typeof t.seek=="function"?Number(t.seek()):0,s=kA(e,n),l=MA(e,o,n,60,s);if(Number.isFinite(a)&&o(a),l){let c=CA(l,s.start,s.staticVolume);c.length>0&&r.set(e,c)}}var Bp="data-fade-in",Up="data-fade-out",JI=Bp.slice(5),QI=Up.slice(5),Wp=Object.freeze({fadeIn:0,fadeOut:0});function Nl(e){return Number.isFinite(e)&&e>0?e:0}function Hp(e){return e==null||e===""?0:Nl(Number.parseFloat(e))}function Vp(e){return{fadeIn:Hp(e.getAttribute(Bp)),fadeOut:Hp(e.getAttribute(Up))}}function IA(e,t){let n=Nl(e.fadeIn),r=Nl(e.fadeOut);if(!Number.isFinite(t)||t<=0)return{fadeIn:n,fadeOut:r};let i=n+r;if(i<=t)return{fadeIn:n,fadeOut:r};let o=t/i;return{fadeIn:n*o,fadeOut:r*o}}function $p(e,t,n){if(!Number.isFinite(e))return 1;let{fadeIn:r,fadeOut:i}=IA(n,t),o=1;return r>0&&(o*=Gp(e/r)),i>0&&Number.isFinite(t)&&(o*=Gp((t-e)/i)),o}function Gp(e){return!Number.isFinite(e)||e<0?0:e>1?1:e}var fr="hf-audio-group",da="data-audio-group";function Ll(e){let t=e?.getAttribute("data-volume"),n=t?parseFloat(t):1;return Number.isFinite(n)?n:1}function Fl(e,t){let n=Array.from(e?.querySelectorAll?.(`${fr}[${pi}]`)??[]).find(i=>i.getAttribute(pi)===t);if(n)return n;let r=e?.getElementById(t)??null;return r&&r.tagName?.toLowerCase()===fr?r:null}function fa(e,t){let n=t?.getAttribute?.(Np)??t?.getAttribute?.(da);return n?Fl(e,n)?.hasAttribute("data-hidden")??!1:!1}function Il(e){let t=e.querySelector("[data-composition-id]");return t&&!t.parentElement?.closest("[data-composition-id]")?t:null}function qp(e){return Il(e)?.getAttribute(Gt)||void 0}function ma(e){return typeof e.tagName!="string"||typeof e.getAttribute!="function"||!DA(e)?null:e.getAttribute(da)||null}function DA(e){return e.tagName.toLowerCase()==="audio"?!0:typeof e.hasAttribute=="function"&&ua(e)}function zp(e){let t="__hf-audio-group-inert";if(!e?.head||e.getElementById(t))return;let n=e.createElement("style");n.id=t,n.textContent=`${fr}{display:none!important}`,e.head.appendChild(n)}function Rt(e){return nr(e)}var jp=["seeked","loadeddata","error","emptied","abort"],Bl=5e3,pa=new WeakMap;function Kp(e){let t=e.readyState<e.HAVE_CURRENT_DATA&&e.networkState===e.NETWORK_LOADING&&!window.__HF_EXPORT_RENDER_SEEK_CONFIG;e.tagName!=="VIDEO"||!(e.seeking||t)||ht(e)||(pa.get(e)?.(),st(new Promise(n=>{let r=o=>{if(!(o?.type==="loadeddata"&&e.seeking)){clearTimeout(i);for(let a of jp)e.removeEventListener(a,r,!0);pa.get(e)===r&&pa.delete(e),n()}},i=setTimeout(r,Bl);for(let o of jp)e.addEventListener(o,r,!0);pa.set(e,r)}),"video-frame"))}function Xp(e){let t=e.isVideo?e.explicitDuration??e.sourceDuration:e.sourceDuration,n=(e.isVideo?[t,e.hostRemaining]:[t,e.hostRemaining,e.explicitDuration]).filter(r=>r!=null&&Number.isFinite(r)&&r>=0);return n.length>0?Math.min(...n):null}function Jp(e){let t=e?.elements??Array.from(document.querySelectorAll("video, audio")),n=e?.shouldIncludeElement?t.filter(a=>e.shouldIncludeElement?.(a)):t.filter(a=>a.hasAttribute("data-start")),r=[],i=[],o=0;for(let a of n){let s=e?.resolveStartSeconds?e.resolveStartSeconds(a):Number.parseFloat(a.dataset.start??"0");if(!Number.isFinite(s))continue;let l=Rt(a),c=Qe(a),d=_t(a),m=a.loop,f=Number.isFinite(a.duration)&&a.duration>0?a.duration:null,p=e?.resolveDurationSeconds?.(a)??Number.parseFloat(a.dataset.duration??"");(!Number.isFinite(p)||p<0)&&f!=null&&(p=Math.max(0,In(d,f-l)));let x=Number.isFinite(p)&&p>=0?s+p:Number.POSITIVE_INFINITY,y=s,v=Dn({start:s,end:x},e?.resolveHostSlots?.(a)??[]);(v.start!==s||v.end!==x)&&({start:s,end:x}=v,p=x-s);let A=Number.parseFloat(a.dataset.volume??""),C={el:a,start:s,origin:y,mediaStart:l,duration:Number.isFinite(x)?p:Number.POSITIVE_INFINITY,end:x,volume:Number.isFinite(A)?A:null,playbackRate:c,rate:d,loop:m,sourceDuration:f,fades:Vp(a)};r.push(C),a.tagName==="VIDEO"&&i.push(C),Number.isFinite(x)&&(o=Math.max(o,x))}return{timedMediaEls:n,mediaClips:r,videoClips:i,maxMediaEnd:o}}var Ol=new WeakMap,ha=new WeakMap,hi=new WeakMap,Hl=new WeakSet,mr=new WeakSet,Dl=new WeakSet;function PA(e){if(mr.has(e))return;mr.add(e);let t=()=>mr.delete(e);e.addEventListener("playing",t,{once:!0}),e.addEventListener("pause",t,{once:!0}),e.addEventListener("error",t,{once:!0})}var OA=3;function Ul(e){return e.error!=null||e.networkState===OA}var Gl=new WeakMap;function Pl(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):1}function Wl(e){Ol.delete(e),ha.delete(e),hi.delete(e),Hl.delete(e),Gl.delete(e),gi.delete(e)}var Vl=.5,$l=1.5;function HA(e,t,n,r){let{el:i}=e,o=e.start-t;if(!n||i.tagName!=="VIDEO"||o<=0||o>$l*r||!i.paused||i.seeking||i.readyState<i.HAVE_METADATA||ht(i)||"__HF_EXPORT_RENDER_SEEK_CONFIG"in window&&window.__HF_EXPORT_RENDER_SEEK_CONFIG)return;let a=e.mediaStart+Fn(e.rate??e.playbackRate,e.start-(e.origin??e.start));if(e.sourceDuration!=null){let s=e.sourceDuration-e.mediaStart;e.loop&&s>0&&a>=e.sourceDuration?a=e.mediaStart+(a-e.mediaStart)%s:e.loop||(a=Math.min(a,e.sourceDuration))}if(!(!Number.isFinite(a)||a<0||Math.abs(i.currentTime-a)<=.001))try{i.currentTime=a}catch(s){G("runtime.media.preseek",s)}}var an=.04,Yp=1/16,GA=.03,BA=.01,gi=new WeakMap;function UA(e,t,n){let r=Math.sign(t),i=gi.get(e);if(Math.abs(t)>an)gi.set(e,r);else if(i!==r||Math.abs(t)<=BA)return gi.delete(e),n;return n*(1+r*GA)}function Qp(e){let t=!!(e.outputMuted||e.userMuted);for(let n of e.clips){let{el:r}=n;if(!r.isConnected)continue;let i=n.rate??n.playbackRate,o=n.origin??n.start,a=r.tagName==="VIDEO"&&!n.loop,s=on(e.timeSeconds,n.start,n.end),l=n.start-e.timeSeconds,c=r.tagName==="AUDIO"&&!s&&l>0&&l*Math.max(1,fl(i,n.start-o))<=Math.max(e.cueAheadSeconds??0,Dl.has(r)?an:0);c?Dl.add(r):Dl.delete(r);let d=a&&!s&&(e.timeSeconds>=n.end||di(e.timeSeconds,n.end))&&lr(e.timeSeconds,n.start,n.end,e.getCompositionDuration()),m=Fn(i,Math.max(0,Math.min(e.timeSeconds,n.end)-o))+n.mediaStart,f=d||a&&n.sourceDuration!=null&&m>=n.sourceDuration&&s;f&&n.sourceDuration!=null&&(m=Math.min(m,n.sourceDuration));let p=ha.get(r),b=r.tagName==="AUDIO"&&(p===void 0||m<p-.04),x=!n.loop&&n.sourceDuration!=null&&m>=n.mediaStart&&m<n.sourceDuration&&(a||b);if((s||d||c)&&m>=0&&(!r.ended||n.loop||f||x)){if(ha.set(r,m),n.loop&&n.sourceDuration!=null&&n.sourceDuration>0){let J=n.sourceDuration-n.mediaStart;J>0&&m>=n.sourceDuration&&(m=n.mediaStart+(m-n.mediaStart)%J)}let A=Pl(e.userVolume??1),C=ot(n.volume??1),L=Gl.get(r),H=Pl(r.volume),M,_=ym(r,e.timeSeconds-o);if(_!==null)M=ot(_);else if(n.volumeKeyframes&&n.volumeKeyframes.length>0){let J=e.timeSeconds-o;M=ot(Pp(n.volumeKeyframes,J))}else e.isWebAudioRouted?.(r)?M=C:L===void 0?M=C>1?C:H:Math.abs(H-L)>1e-4?M=H:M=C;let N=n.fades??Wp;(N.fadeIn>0||N.fadeOut>0)&&(M*=$p(e.timeSeconds-o,n.duration+n.start-o,N));let Y=r.closest("[data-hidden]")!==null||fa(r.ownerDocument,r)?0:Pl(M*A);r.volume=Y,Gl.set(r,Y),e.onElementVolume?.(r,Y,M),(t||e.isWebAudioOwned?.(r))&&(r.muted=!0),r.preload!=="auto"&&(r.preload="auto");let Z=fl(i,e.timeSeconds-o)*e.playbackRate,O=e.playing&&Z>=Yp,I=2,D=r.currentTime||0,R=Math.abs(D-m),V=m-D,se=Ol.get(r);Ol.set(r,V);let j=se===void 0,ne=!j&&Math.abs(V-se)>.5,w=R>3,k=r.tagName==="AUDIO"&&j&&D-m>an,K=f&&R>.001||r.ended&&x&&R>.001||k||R>Vl&&(j||ne||w),$=r.tagName==="VIDEO"&&!r.paused&&O,z=e.playing&&!O||se!==void 0&&Math.abs(V-se)<.004,re=!1;if(!$&&!K&&!j&&z&&R>an){let J=(hi.get(r)??0)+1;hi.set(r,J),J>=I&&(re=!0,hi.set(r,0))}else R<=an&&hi.set(r,0);let ie=!$&&e.forceSync&&R>.02;try{(!$||K)&&gi.delete(r);let J=Math.max(Yp,$&&!K?UA(r,V,Z):Z);Math.abs(r.playbackRate-J)>1e-6&&(r.playbackRate=J)}catch(J){G("runtime.media.site1",J)}if(K||re||ie){if(!(r.tagName==="VIDEO"&&!!ht(r))){try{r.currentTime=m}catch(ee){G("runtime.media.site2",ee)}if(Math.abs(r.currentTime-m)>.5&&!Hl.has(r)){Hl.add(r),r.load();try{r.currentTime=m}catch(ee){G("runtime.media.site3",ee)}}Kp(r)}mr.delete(r)}else O||Kp(r);f?r.paused||r.pause():O&&r.paused&&!mr.has(r)&&!Ul(r)?(PA(r),r.play().catch(J=>{mr.delete(r),(J&&typeof J=="object"&&"name"in J?String(J.name??""):"")==="NotAllowedError"&&e.onAutoplayBlocked?.()})):!O&&!r.paused&&r.pause();continue}let v=on(e.timeSeconds,n.start,n.end);Wl(r),v&&ha.set(r,m),r.paused||r.pause(),HA(n,e.timeSeconds,e.playing,e.playbackRate)}}var sn=new WeakMap;function bi(e){return sn.has(e)?sn.get(e)??null:e.getAttribute("src")}async function ql(e,t){let n=0;for(;t();){let r=await fetch(e,{headers:{Range:"bytes=0-0"},cache:"no-store"}).catch(()=>null);r?.body?.cancel().catch(()=>{});let i=r?.status===202||r?.status===503;if(!i&&r?.ok)return!0;if(!i&&++n>3)return!1;let o=Math.min(Number(r?.headers.get("Retry-After"))||2,30);await new Promise(a=>setTimeout(a,o*1e3))}return!1}var eh="hf-proxy-box",WA=[256,362,512,724,1024,1448,2048,2896,4096,5792,8192];function Zp(e){return e>0?WA.find(t=>t>=e)??null:null}function th(e,t){let n=Zp(e),r=Zp(t);return n&&r?{width:n,height:r}:null}function nh(e){return`${e.width}x${e.height}`}var VA="hf-proxy",rh="runtime_media_proxy_fallback",ih="runtime_media_proxy_unavailable",oh=new WeakSet,xi=new WeakMap;function ga(e){return e.currentSrc||e.src}var pr=window.parent===window?1:null,ah=()=>{},$A=new Promise(e=>ah=e),qA=1e3,Si=new Map,yi=new WeakMap;function zA(){return pr!==null?Promise.resolve(pr):Promise.race([$A.then(()=>pr),new Promise(e=>setTimeout(()=>e(null),qA))])}function sh(e,t){if(getComputedStyle(e).objectFit==="none")return null;let n=e.getBoundingClientRect(),r=document.documentElement,i=t*(window.devicePixelRatio||1);return th(Math.max(n.width,r.clientWidth)*i,Math.max(n.height,r.clientHeight)*i)}function lh(e){if(!(!(e>0)||!Number.isFinite(e))){pr=e,ah();for(let t of Si.keys())uh(t,e)}}function uh(e,t){let n=Si.get(e);if(!n)return;if(!e.isConnected||e.getAttribute("src")!==n.href){Si.delete(e);return}let r=sh(e,t);if(r&&r.width<=n.box.width&&r.height<=n.box.height)return;let i=r&&{width:Math.max(r.width,n.box.width),height:Math.max(r.height,n.box.height)},o=dh(n.originalSrc,n.variant,i);if(yi.get(e)===o)return;yi.set(e,o);let a=()=>yi.get(e)===o&&e.isConnected&&e.getAttribute("src")===n.href;ql(o,a).then(s=>{s&&a()&&ch(e,o,n.originalSrc,n.variant,i),yi.get(e)===o&&yi.delete(e)})}function ch(e,t,n,r,i){i?Si.set(e,{originalSrc:n,variant:r,href:t,box:i}):Si.delete(e),Wl(e),e.src=t,e.load()}function zl(e){return window.__HF_EXPORT_RENDER_SEEK_CONFIG?!0:Se(e)&&!!ht(e)}function jl(e){let t=ga(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 jA(e,t){let n=null;for(let r of Object.keys(t))e.endsWith(r)&&(n===null||r.length>n.length)&&(n=r);return n?t[n]??null:null}function KA(e,t){let n=e.normalize("NFC").toLowerCase(),r=-1,i=null,o=!1;for(let[a,s]of Object.entries(t)){let l=a.normalize("NFC").toLowerCase();n.endsWith(l)&&(l.length>r?(r=l.length,i=s,o=!1):l.length===r&&(o=!0))}return o?null:i}function Kl(e,t){return t[e]??jA(e,t)??KA(e,t)}function dh(e,t,n){let r=new URL(e,document.baseURI);return r.searchParams.set(VA,t),n&&r.searchParams.set(eh,nh(n)),r.href}var YA={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 ln(e,t,n){if(oh.has(e))return;oh.add(e);let r=YA[t];Ae({source:"hf-preview",type:"diagnostic",code:ih,details:{asset:n,codecName:null,reason:t,note:r}}),console.info(`[hyperframes] ${ih}: "${n}" (${t}): ${r}`)}function Yl(e,t=null,n="reactive"){if(sn.has(e)||xi.has(e)&&xi.get(e)===e.getAttribute("src"))return;let r=ga(e),i=t?t.hasAlpha?"vp8":"h264":"auto";try{new URL(r,document.baseURI)}catch(d){G("runtime.mediaProxy.swap",d),ln(e,"invalid_source_url",r);return}let o=e.getAttribute("src");xi.set(e,o);let a=()=>e.isConnected&&e.getAttribute("src")===o,s=zA().then(async d=>{let m=d===null?null:sh(e,d),f=dh(r,i,m),p=await ql(f,a);if(!a()){xi.get(e)===o&&xi.delete(e);return}if(!p){ln(e,"proxy_playback_failed",r);return}return sn.set(e,o),ch(e,f,r,i,m),pr!==null&&uh(e,pr),new Promise(b=>{e.addEventListener("loadeddata",b,{once:!0}),e.addEventListener("error",b,{once:!0})})});st(Promise.race([s,new Promise(d=>setTimeout(d,Bl))]),"video-frame");let l=t?.codecName??null;Ae({source:"hf-preview",type:"diagnostic",code:rh,details:{asset:r,codecName:l,trigger:n,note:"render output is unaffected; only this preview element was swapped to an authoring proxy"}}),console.info(`[hyperframes] ${rh}: "${r}" uses a codec (${l??"unknown"}) this browser can't decode; auto-swapped to an authoring proxy for this preview only. Render output is unaffected.`)}function fh(e){if(zl(e)||!Se(e)||sn.has(e))return;let t=window.__HF_MEDIA_CODEC_MAP__;if(!t)return;let n=jl(e);if(n===null)return;let r=Kl(n,t);if(!r||!r.browserHostile)return;let i=r.representativeMime?e.canPlayType(r.representativeMime):"";i==="probably"||i==="maybe"||Yl(e,r,"proactive")}function mh(e){if(zl(e)||!Se(e)||e.videoWidth!==0)return;let t=ga(e);if(sn.has(e)){ln(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let r=jl(e);if(r===null){ln(e,"cross_origin",t);return}let i=Kl(r,n);if(i&&!i.browserHostile){ln(e,"browser_safe_codec",t);return}Yl(e,i,"reactive")}function ph(e){if(zl(e)||!Se(e))return;let t=ga(e);if(sn.has(e)){ln(e,"proxy_playback_failed",t);return}let n=window.__HF_MEDIA_CODEC_MAP__;if(!n)return;let r=jl(e);if(r===null){ln(e,"cross_origin",t);return}let i=Kl(r,n);if(i&&!i.browserHostile){ln(e,"browser_safe_codec",t);return}Yl(e,i,"tertiary")}var Ge=class extends Error{constructor(n,r=null){super(r==null?n:`${n} at line ${r}`);ce(this,"lineNumber");this.name="CubeLutParseError",this.lineNumber=r}},XA=[0,0,0],JA=[1,1,1],ba=64;function QA(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r==='"'&&(t=!t),r==="#"&&!t)return e.slice(0,n)}return e}function un(e,t){let n=Number(e);if(!Number.isFinite(n))throw new Ge(`Invalid number "${e}"`,t);return n}function hh(e,t,n){if(e.length!==3)throw new Ge(`${t} expects three numbers`,n);return[un(e[0],n),un(e[1],n),un(e[2],n)]}function gh(e,t,n){if(!e)throw new Ge(`${t} expects a size`,n);let r=Number(e);if(!Number.isInteger(r)||r<2)throw new Ge(`${t} must be an integer greater than 1`,n);return r}function ZA(e,t){if(t[0]<=e[0]||t[1]<=e[1]||t[2]<=e[2])throw new Ge("DOMAIN_MAX values must be greater than DOMAIN_MIN values")}function ew(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 tw(e){return/^[+-]?(?:\d|\.\d)/.test(e)}function bh(e,t={}){let n=t.maxSize??ba,r=null,i=XA,o=JA,a=null,s=null,l=[],c=e.replace(/^\uFEFF/,"").split(/\r?\n/);for(let m=0;m<c.length;m++){let f=m+1,p=QA(c[m]??"").trim();if(!p)continue;let b=p.split(/\s+/),x=(b[0]??"").toUpperCase(),y=b.slice(1);if(x==="TITLE"){r=ew(p);continue}if(x==="DOMAIN_MIN"){i=hh(y,x,f);continue}if(x==="DOMAIN_MAX"){o=hh(y,x,f);continue}if(x==="LUT_3D_INPUT_RANGE"){if(y.length!==2)throw new Ge(`${x} expects two numbers`,f);let v=un(y[0],f),A=un(y[1],f);if(A<=v)throw new Ge("LUT_3D_INPUT_RANGE max must exceed min",f);i=[v,v,v],o=[A,A,A];continue}if(x==="LUT_1D_SIZE"){a=gh(y[0],x,f);continue}if(x==="LUT_3D_SIZE"){if(s=gh(y[0],x,f),s>n)throw new Ge(`LUT_3D_SIZE ${s} exceeds max ${n}`,f);continue}if(!tw(x)){if(x.startsWith("LUT_"))throw new Ge(`Unsupported cube keyword ${x}`,f);continue}if(!s)throw a?new Ge("1D cube LUTs are not supported yet",f):new Ge("LUT data appears before LUT_3D_SIZE",f);if(b.length!==3)throw new Ge("LUT data rows must contain three numbers",f);l.push(un(b[0],f),un(b[1],f),un(b[2],f))}if(a&&s)throw new Ge("Mixed 1D and 3D cube LUTs are not supported yet");if(!s)throw a?new Ge("1D cube LUTs are not supported yet"):new Ge("Missing LUT_3D_SIZE");ZA(i,o);let d=s*s*s;if(l.length!==d*3)throw new Ge(`Expected ${d} LUT rows for size ${s}, found ${l.length/3}`);return{title:r,size:s,domainMin:i,domainMax:o,data:new Float32Array(l)}}function nw(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):0}function vi(e){return Math.round(nw(e)*255)}function Xl(e){let t=e.size,n=t*t,r=t,i=new Uint8Array(n*r*4);for(let o=0;o<t;o++)for(let a=0;a<t;a++)for(let s=0;s<t;s++){let l=((o*t+a)*t+s)*3,c=(a*n+o*t+s)*4;i[c]=vi(e.data[l]??0),i[c+1]=vi(e.data[l+1]??0),i[c+2]=vi(e.data[l+2]??0),i[c+3]=255}return{width:n,height:r,data:i}}var xh="rec709";var Ce={hueDegrees:{min:0,max:360,inclusiveMax:!1},unit:{min:0,max:1},signedUnit:{min:-1,max:1},secondaryHueRange:{min:0,max:180},secondaryHueSoftness:{min:0,max:180},secondaryHueCombinedMax:180,secondarySoftRangeSoftness:{min:0,max:.5},secondaryHueShift:{min:-180,max:180},effects:{asciiStyle:{min:0,max:7},bloom:{min:0,max:3},bloomRadius:{min:1,max:100},monoScreenShape:{min:0,max:4}}};var yh=["exposure","contrast","highlights","shadows","whites","blacks","temperature","tint","vibrance","saturation"];var Sh=["shadows","midtones","highlights"],vh=["master","red","green","blue"],Eh=["hueVsHue","hueVsSaturation","hueVsLuma"];var Ah=["vignette","vignetteMidpoint","vignetteRoundness","vignetteFeather","grain","grainSize","grainRoughness"],wh=["blur","pixelate","chromaBleed","tapeDamage","tapeTracking","tapeNoise","tapeSpeed","filmArtifacts","halftone","halftoneSize","twoInkPrint","twoInkPrintSize","ascii","asciiSize","asciiInvert","asciiStyle","asciiColor","asciiRotation","dither","ditherSize","bloom","bloomRadius","monoScreen","monoScreenSize","monoScreenAngle","monoScreenSpread","monoScreenShape","monoScreenInvert","scanlines","scanlineCount","scanlineSoftness","chromaticAberration","chromaticAngle","crtCurvature","digitalGlitch","digitalGlitchColorSplit","digitalGlitchLineTear","digitalGlitchPixelate","digitalGlitchBlockAmount","digitalGlitchBlockDisplacement","digitalGlitchBlockOpacity","digitalGlitchSpeed","engraving","engravingSpacing","engravingMinThickness","engravingMaxThickness","engravingAngle","engravingContrast","engravingSharpness","engravingWave","engravingWaveFrequency","crosshatch","crosshatchSpacing","crosshatchThickness","crosshatchAngle","crosshatchContrast","crosshatchEdges","crosshatchLineWeight","crosshatchWave","crosshatchWaveFrequency","kuwahara","kuwaharaRadius","kuwaharaSharpness","kuwaharaSaturation"];var DD=Ce.unit,PD=Ce.signedUnit,OD=Ce.effects;var kt=1024,Ei=16;function _h(e,t,n,r){let i=((2*e+t)*n-e*r)/(e+t);return Math.sign(i)!==Math.sign(n)?0:Math.sign(n)!==Math.sign(r)&&Math.abs(i)>3*Math.abs(n)?3*n:i}function Be(e,t){let n=e[t];if(n===void 0)throw new RangeError("Color curve points must be contiguous");return n}function rw(e){let t=[],n=[],r=Be(e,0);for(let a of e.slice(1)){let s=a[0]-r[0];t.push(s),n.push((a[1]-r[1])/s),r=a}let i=Be(n,0);if(e.length===2)return[i,i];let o=new Array(e.length);o[0]=_h(Be(t,0),Be(t,1),i,Be(n,1)),o[o.length-1]=_h(Be(t,t.length-1),Be(t,t.length-2),Be(n,n.length-1),Be(n,n.length-2));for(let a=1;a<e.length-1;a+=1){let s=Be(n,a-1),l=Be(n,a);if(s===0||l===0||Math.sign(s)!==Math.sign(l)){o[a]=0;continue}let c=Be(t,a-1),d=Be(t,a),m=2*d+c,f=d+2*c;o[a]=(m+f)/(m/s+f/l)}return o}function Ch(e,t){if(e.length<2)throw new RangeError("A color curve requires at least two points");if(!Number.isInteger(t)||t<2)throw new RangeError("Curve LUT size must be at least 2");let n=Number.NEGATIVE_INFINITY;for(let[r,i]of e){if(!Number.isFinite(r)||!Number.isFinite(i))throw new TypeError("Color curve points must be finite");if(r<=n)throw new RangeError("Color curve inputs must be strictly increasing");n=r}}function iw(e,t,n){if(!Number.isFinite(t)||!Number.isFinite(n)||t>=n)throw new RangeError("Curve output bounds must be finite and increasing");if(e.some(([,r])=>r<t||r>n))throw new RangeError(`Curve outputs must be between ${t} and ${n}`)}function ow(e,t,n,r,i){let o=n[0]-t[0],a=Math.min(1,Math.max(0,(e-t[0])/o)),s=a*a,l=s*a;return(2*l-3*s+1)*t[1]+(l-2*s+a)*o*r+(-2*l+3*s)*n[1]+(l-s)*o*i}function Th(e,t,n,r,i){iw(e,r,i);let o=rw(e),a=new Float32Array(t),s=0;for(let l=0;l<t;l+=1){let c=n(l);for(;s<e.length-2&&c>Be(e,s+1)[0];)s+=1;let d=Be(e,s),m=Be(e,s+1),f=ow(c,d,m,Be(o,s),Be(o,s+1));a[l]=Math.min(i,Math.max(r,f))}return a}function hr(e,t=kt){if(Ch(e,t),e.length>Ei)throw new RangeError(`A color curve supports at most ${Ei} points`);if(e.some(([n])=>n<0||n>1))throw new RangeError("Color curve inputs must be between 0 and 1");if(e[0]?.[0]!==0||e[e.length-1]?.[0]!==1)throw new RangeError("Color curves must include input endpoints 0 and 1");return Th(e,t,n=>n/(t-1),0,1)}function Ql(e,t,n,r=kt){if(e.length<3)throw new RangeError("A hue curve requires at least three points");if(e.length>Ei)throw new RangeError(`A hue curve supports at most ${Ei} points`);let i=[...e].sort((l,c)=>l[0]-c[0]);for(let l=0;l<i.length;l+=1){let c=i[l];if(!c||c[0]<0||c[0]>=360)throw new RangeError("Hue curve inputs must be from 0 up to 360 degrees");if(l>0&&c[0]===i[l-1]?.[0])throw new RangeError("Hue curve inputs must be unique")}let o=i.slice(-2).map(([l,c])=>[l-360,c]),a=i.slice(0,2).map(([l,c])=>[l+360,c]),s=[...o,...i,...a];return Ch(s,r),Th(s,r,l=>l/r*360,t,n)}var Ai="data-color-grading",Pn="data-hf-color-grading-source-hidden",On="data-hf-authored-opacity",Lh="__hf_color_grading_",sw=xh,tu={exposure:0,contrast:0,highlights:0,shadows:0,whites:0,blacks:0,temperature:0,tint:0,vibrance:0,saturation:0},nu={vignette:0,vignetteMidpoint:.5,vignetteRoundness:0,vignetteFeather:.65,grain:0,grainSize:.25,grainRoughness:.5},ru={blur:0,pixelate:0,chromaBleed:0,tapeDamage:0,tapeTracking:0,tapeNoise:1,tapeSpeed:.5,filmArtifacts:0,halftone:0,halftoneSize:0,twoInkPrint:0,twoInkPrintSize:0,ascii:0,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0,dither:0,ditherSize:0,bloom:0,bloomRadius:8,monoScreen:0,monoScreenSize:0,monoScreenAngle:0,monoScreenSpread:0,monoScreenShape:0,monoScreenInvert:0,scanlines:0,scanlineCount:0,scanlineSoftness:0,chromaticAberration:0,chromaticAngle:0,crtCurvature:0,digitalGlitch:0,digitalGlitchColorSplit:0,digitalGlitchLineTear:0,digitalGlitchPixelate:0,digitalGlitchBlockAmount:0,digitalGlitchBlockDisplacement:0,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:0,engraving:0,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9,crosshatch:0,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9,kuwahara:0,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5};var Sa=yh,Fh=Sh,Ih=vh,Dh=Eh,ou=Ah,au=wh,Rh={exposure:.03,contrast:-.12,highlights:-.1,shadows:.16,whites:-.04,blacks:.08,temperature:.13,vibrance:-.08,saturation:-.08},kh={vignette:.18};function Ue(e,t,n={},r={},i={},o=1){return{id:e,label:t,intensity:o,adjust:{...tu,...n},details:{...nu,...r},effects:{...ru,...i}}}var su=[Ue("neutral","Neutral"),Ue("warm-daylight","Warm Daylight",{exposure:.06,contrast:.07,highlights:-.06,shadows:.08,temperature:.18,saturation:.08}),Ue("clean-studio","Clean Studio",{contrast:.08,highlights:-.08,shadows:.06,temperature:-.08,tint:.03,saturation:.04}),Ue("skin-soft","Skin Soft",{exposure:.04,contrast:-.03,highlights:-.12,shadows:.12,temperature:.08,tint:.02,saturation:.04}),Ue("food-pop","Food Pop",{exposure:.06,contrast:.1,shadows:.06,temperature:.14,vibrance:.1,saturation:.18}),Ue("night-lift","Night Lift",{exposure:.08,contrast:.08,highlights:-.18,shadows:.2,blacks:-.08,saturation:.04},{vignette:.12}),Ue("muted-editorial","Muted Editorial",{exposure:-.02,contrast:.08,highlights:-.08,shadows:.06,blacks:-.05,temperature:-.03,saturation:-.12},{vignette:.1}),Ue("vintage-wash","Vintage Wash",Rh,kh),Ue("mono-clean","Mono Clean",{contrast:.12,highlights:-.04,shadows:.04,blacks:-.08,saturation:-1}),Ue("mono-fade","Mono Fade",{contrast:-.04,highlights:-.06,shadows:.1,blacks:.12,saturation:-1},{vignette:.08}),Ue("soft-boost","Soft Boost",{exposure:.06,contrast:-.04,highlights:-.14,shadows:.16,vibrance:.08,saturation:.1}),Ue("bright-pop","Bright Pop",{exposure:.12,contrast:.12,whites:.08,blacks:-.04,vibrance:.08,saturation:.14}),Ue("deep-contrast","Deep Contrast",{exposure:-.03,contrast:.2,highlights:-.08,shadows:-.08,blacks:-.12,saturation:.06}),Ue("creator-camcorder","Creator Camcorder",{contrast:.08,highlights:-.05,shadows:.02,whites:.03,blacks:-.04,temperature:-.03,tint:-.015,vibrance:-.03,saturation:-.06},{vignette:.06,grain:.08,grainSize:.18,grainRoughness:.58},{chromaBleed:.55},.72),Ue("vhs-playback","VHS Playback",{contrast:-.04,saturation:-.08},{grain:.16,grainSize:.12,grainRoughness:.72},{tapeDamage:.82,tapeTracking:.85,tapeNoise:.3,tapeSpeed:.5,chromaBleed:.5,chromaticAberration:.18,scanlines:.35,scanlineCount:.17,scanlineSoftness:1,digitalGlitch:.32,digitalGlitchLineTear:.08,digitalGlitchSpeed:.5}),Ue("home-movie-8mm","8mm Home Movie",Rh,{...kh,vignette:.28,vignetteMidpoint:.54,vignetteFeather:.72,grain:.34,grainSize:.18,grainRoughness:.72},{filmArtifacts:.62},.72),Ue("editorial-halftone","Editorial Halftone",{contrast:.04,saturation:.04},{},{halftone:.94,halftoneSize:.36}),Ue("two-ink-print","Two-Ink Print",{contrast:.08,highlights:-.06,shadows:.04},{},{twoInkPrint:1,twoInkPrintSize:.42})],lw=new Map(su.map(e=>[e.id,e])),uw=/^\$(?:\{([A-Za-z0-9_.:-]+)\}|([A-Za-z0-9_.:-]+))$/,cw={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}},gr={hue:0,amount:0,level:0},Mh={amount:Ce.unit,level:Ce.signedUnit},cn=[[0,0],[1,1]],br=[],dw={hueVsHue:Ce.secondaryHueShift,hueVsSaturation:Ce.signedUnit,hueVsLuma:Ce.signedUnit},Zl={center:0,range:180,softness:0},eu={min:0,max:1,softness:.05},fw={vignette:Ce.unit,vignetteMidpoint:Ce.unit,vignetteRoundness:Ce.signedUnit,vignetteFeather:Ce.unit,grain:Ce.unit,grainSize:Ce.unit,grainRoughness:Ce.unit},iu=Ce.unit,mw=Ce.effects,Ph=["blur","pixelate","chromaBleed","tapeDamage","filmArtifacts","halftone","twoInkPrint","ascii","dither","bloom","monoScreen","scanlines","chromaticAberration","crtCurvature","digitalGlitch","engraving","crosshatch","kuwahara"];var pw=su.filter(e=>Ph.some(t=>e.effects[t]>1e-4)),zD=su.filter(e=>!pw.includes(e)),jD={blur:{blur:.45},pixelate:{pixelate:.55},bloom:{bloom:.55,bloomRadius:8},chromaBleed:{chromaBleed:.55},tapeDamage:{tapeDamage:.65,tapeTracking:.55,tapeNoise:.25,tapeSpeed:.5},filmArtifacts:{filmArtifacts:.55},scanlines:{scanlines:.35,scanlineCount:.17,scanlineSoftness:1},chromaticAberration:{chromaticAberration:.15,chromaticAngle:0},crtCurvature:{crtCurvature:.2},digitalGlitch:{digitalGlitch:.55,digitalGlitchColorSplit:.25,digitalGlitchLineTear:.25,digitalGlitchPixelate:.15,digitalGlitchBlockAmount:.5,digitalGlitchBlockDisplacement:.25,digitalGlitchBlockOpacity:0,digitalGlitchSpeed:.5},halftone:{halftone:.94,halftoneSize:.36},twoInkPrint:{twoInkPrint:1,twoInkPrintSize:.42},ascii:{ascii:1,asciiSize:5/76,asciiInvert:0,asciiStyle:0,asciiColor:1,asciiRotation:0},dither:{dither:1,ditherSize:.5},monoScreen:{monoScreen:1,monoScreenSize:.35,monoScreenAngle:.25,monoScreenSpread:.3,monoScreenShape:0,monoScreenInvert:0},engraving:{engraving:1,engravingSpacing:7/17,engravingMinThickness:.2,engravingMaxThickness:3.2/7,engravingAngle:.25,engravingContrast:7/15,engravingSharpness:.59,engravingWave:.2,engravingWaveFrequency:2/9},crosshatch:{crosshatch:1,crosshatchSpacing:7/25,crosshatchThickness:.25,crosshatchAngle:.25,crosshatchContrast:1/3,crosshatchEdges:.5,crosshatchLineWeight:0,crosshatchWave:.33,crosshatchWaveFrequency:2/9},kuwahara:{kuwahara:1,kuwaharaRadius:1/7,kuwaharaSharpness:5/16,kuwaharaSaturation:.5}},Oh=[{path:"intensity",name:"--hf-color-grading-intensity",min:0,max:1},{path:"lut.intensity",name:"--hf-color-grading-lut-intensity",min:0,max:1},{path:"adjust.exposure",name:"--hf-color-grading-exposure",min:-2,max:2},{path:"effects.blur",name:"--hf-color-grading-blur",min:0,max:1},{path:"effects.bloom",name:"--hf-color-grading-bloom",min:0,max:3},{path:"effects.kuwahara",name:"--hf-color-grading-kuwahara",min:0,max:1},{path:"effects.pixelate",name:"--hf-color-grading-pixelate",min:0,max:1},{path:"effects.ascii",name:"--hf-color-grading-ascii",min:0,max:1},{path:"effects.dither",name:"--hf-color-grading-dither",min:0,max:1}];var hw=/^#[0-9a-f]{6}$/i;function gw(e){return!Array.isArray(e)||e.length<2||e.length>6||!e.every(t=>typeof t=="string"&&hw.test(t))?null:e.map(t=>t.toLowerCase())}function Ve(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ya(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,e)):0}function Hh(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function Xe(e,t){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?ya(n,t.min,t.max):0}function lu(e,t=0){let n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?(n%360+360)%360:t}function bw(e){let t=Ve(e)?e:{};return Fh.reduce((n,r)=>{let i=Ve(t[r])?t[r]:{};return n[r]={hue:lu(i.hue,gr.hue),amount:Xe(i.amount??gr.amount,Mh.amount),level:Xe(i.level??gr.level,Mh.level)},n},{shadows:{...gr},midtones:{...gr},highlights:{...gr}})}function xw(e){if(!Array.isArray(e)||e.length!==2)return null;let t=Number(e[0]),n=Number(e[1]);return Number.isFinite(t)&&Number.isFinite(n)?[ya(t,0,1),ya(n,0,1)]:null}function Gh(e){return e.some((t,n)=>n>0&&t[0]===e[n-1]?.[0])}function yw(e){(e[0]?.[0]??0)>0&&e.unshift([0,0]),(e.at(-1)?.[0]??1)<1&&e.push([1,1])}function Sw(e){if(!Array.isArray(e)||e.length<2)return cn;let t=[];for(let n of e){let r=xw(n);if(!r)return cn;t.push(r)}return t.sort((n,r)=>n[0]-r[0]),Gh(t)||(yw(t),t.length>16)?cn:t}function vw(e){let t=Ve(e)?e:{};return Ih.reduce((n,r)=>(n[r]=Sw(t[r]),n),{master:cn,red:cn,green:cn,blue:cn})}function Ew(e,t){if(!Array.isArray(e)||e.length!==2)return null;let n=Number(e[0]),r=Number(e[1]);return Number.isFinite(n)&&Number.isFinite(r)?[lu(n),ya(r,t.min,t.max)]:null}function Aw(e,t){if(!Array.isArray(e)||e.length<3||e.length>16)return br;let n=[];for(let r of e){let i=Ew(r,t);if(!i)return br;n.push(i)}return n.sort((r,i)=>r[0]-i[0]),Gh(n)?br:n}function ww(e){let t=Ve(e)?e:{};return Dh.reduce((n,r)=>(n[r]=Aw(t[r],dw[r]),n),{hueVsHue:br,hueVsSaturation:br,hueVsLuma:br})}function Nh(e){let t=Ve(e)?e:{},n=Xe(t.min??eu.min,iu),r=Xe(t.max??eu.max,iu);return{min:Math.min(n,r),max:Math.max(n,r),softness:Xe(t.softness??eu.softness,Ce.secondarySoftRangeSoftness)}}function _w(e){let t=Ve(e)?e:{},n=Xe(t.range??Zl.range,Ce.secondaryHueRange);return{center:lu(t.center,Zl.center),range:n,softness:Xe(t.softness??Zl.softness,{min:Ce.secondaryHueSoftness.min,max:Ce.secondaryHueCombinedMax-n})}}function Cw(e){return{hueShift:Xe(e.hueShift??0,Ce.secondaryHueShift),saturation:Xe(e.saturation??0,Ce.signedUnit),luma:Xe(e.luma??0,Ce.signedUnit),temperature:Xe(e.temperature??0,Ce.signedUnit),tint:Xe(e.tint??0,Ce.signedUnit)}}function Tw(e){return!Ve(e)||!Ve(e.key)||!Ve(e.correction)?null:{enabled:e.enabled!==!1,key:{hue:_w(e.key.hue),saturation:Nh(e.key.saturation),luma:Nh(e.key.luma)},correction:Cw(e.correction)}}function Rw(e){if(!Array.isArray(e))return[];let t=[];for(let n of e.slice(0,4)){let r=Tw(n);r&&t.push(r)}return t}function kw(e){if(e==null)return null;let t=String(e).trim();return t||null}function Mw(e){if(e==null)return null;if(typeof e=="string"){let n=e.trim();return n?{src:n,intensity:1}:null}if(!Ve(e))return null;let t=e.src;return typeof t!="string"||t.trim()===""?null:{src:t.trim(),intensity:Hh(e.intensity,1)}}function Nw(e){if(typeof e=="string"){let t=e.trim();if(!t)return null;if(t.startsWith("{"))try{let n=JSON.parse(t);return Ve(n)?n:null}catch{return null}return{preset:t}}return Ve(e)?e:null}function Lw(e,t){let n=e.trim().match(uw);if(!n)return e;let r=n[1]??n[2]??"";return r&&Object.hasOwn(t,r)?t[r]:e}function xa(e,t){if(typeof e=="string"){let r=Lw(e,t);if(r!==e)return r;let i=e.trim();if(!i.startsWith("{"))return e;try{return xa(JSON.parse(i),t)}catch{return e}}if(Array.isArray(e))return e.map(r=>xa(r,t));if(!Ve(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=xa(i,t);return n}function Fw(e){return e?lw.get(e)??null:null}function va(e){let t=Nw(e);if(!t||t.enabled===!1)return null;let n=kw(t.preset),r=Fw(n),i=r?.adjust??tu,o=r?.details??nu,a=r?.effects??ru,s=Ve(t.adjust)?t.adjust:{},l=Ve(t.details)?t.details:{},c=Ve(t.effects)?t.effects:{},d=Sa.reduce((p,b)=>(p[b]=Xe(s[b]??i[b],cw[b]),p),{...tu}),m=ou.reduce((p,b)=>(p[b]=Xe(l[b]??o[b],fw[b]),p),{...nu}),f=au.reduce((p,b)=>(p[b]=Xe(c[b]??a[b],mw[b]??iu),p),{...ru});return{enabled:!0,preset:n,intensity:Hh(t.intensity,r?.intensity??1),adjust:d,wheels:bw(t.wheels),curves:vw(t.curves),hueCurves:ww(t.hueCurves),secondaries:Rw(t.secondaries),details:m,effects:f,palette:gw(t.palette),lut:Mw(t.lut),colorSpace:typeof t.colorSpace=="string"&&t.colorSpace.trim()?t.colorSpace.trim():sw}}function Bh(e,t){return va(xa(e,t))}function Iw(e){return Fh.some(t=>Math.abs(e[t].amount)>1e-4||Math.abs(e[t].level)>1e-4)}function uu(e){return Ih.some(t=>e[t].some(([n,r])=>Math.abs(n-r)>1e-4))}function cu(e){return Dh.some(t=>e[t].some(([,n])=>Math.abs(n)>1e-4))}function du(e){return e.some(t=>t.enabled&&Object.values(t.correction).some(n=>Math.abs(n)>1e-4))}function Uh(e){return e?.enabled?Math.abs(e.details.vignette)>1e-4||Math.abs(e.details.grain)>1e-4||Ph.some(n=>Math.abs(e.effects[n])>1e-4)?!0:e.intensity===0?!1:e.lut&&e.lut.intensity!==0?!0:Sa.some(n=>Math.abs(e.adjust[n])>1e-4)||(e.wheels?Iw(e.wheels):!1)||(e.curves?uu(e.curves):!1)||(e.hueCurves?cu(e.hueCurves):!1)||(e.secondaries?du(e.secondaries):!1):!1}var Ea=/^(|transparent|rgba\(.*,\s*0\)|.*\/\s*0%?\s*\))$/,Dw=new Set(["IMG","VIDEO","IFRAME","EMBED","OBJECT","CANVAS"]),Wh="http://www.w3.org/2000/svg",Pw=new Set(["svg","g","foreignObject"]),Ow=["Top","Right","Bottom","Left"],Hw={left:-1/0,right:1/0,top:-1/0,bottom:1/0},Vh=e=>!!e.backgroundImage&&e.backgroundImage!=="none"||!Ea.test(e.backgroundColor),Gw=e=>{let t=e.getPropertyValue("-webkit-text-fill-color")||e.color,n=Number.parseFloat(e.getPropertyValue("-webkit-text-stroke-width"))||0,r=e.getPropertyValue("-webkit-text-stroke-color")||e.color;return!Ea.test(t)||n>0&&!Ea.test(r)},$h=e=>Ow.map(t=>e[`border${t}Style`]!=="none"&&!Ea.test(e[`border${t}Color`])&&Number.parseFloat(e[`border${t}Width`])||0),Aa=e=>e.bottom-e.top,fu=(e,t,n)=>t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom,qh=(e,t)=>({left:Math.min(e.left,t.left),right:Math.max(e.right,t.right),top:Math.min(e.top,t.top),bottom:Math.max(e.bottom,t.bottom)}),Bw=(e,t)=>t.display==="none"||t.position==="absolute"||t.position==="fixed"||Number.parseFloat(t.opacity)<=.01&&!e.hasAttribute(Pn);function Uw(e,t,n){if(e.width<=0&&e.height<=0)return!1;let r=3*(Number.parseFloat(t.fontSize)||16),i=Math.max(r,Math.min(2*e.height,20*r/3));return n<e.top-i||n>e.bottom+i}function Ww(e,t,n,r){let[i,o,a,s]=$h(t);if(!(i||o||a||s))return!1;let l=e.getBoundingClientRect(),{offsetWidth:c,offsetHeight:d}=e,m=c>0?l.width/c:1,f=d>0?l.height/d:1,p={left:l.left+s*m,right:l.right-o*m,top:l.top+i*f,bottom:l.bottom-a*f};return!fu(p,n,r)}function Vw(e){let t=[];for(let n of[...e].sort((r,i)=>r.left-i.left)){let r=t.findIndex(i=>n.top<i.bottom&&n.bottom>i.top&&n.left-i.right<=2*Math.max(Aa(i),Aa(n)));r<0?t.push(n):t[r]=qh(t[r],n)}return t}function $w(e){let t=[...e].sort((n,r)=>n.top-r.top);return t.flatMap((n,r)=>t.slice(r+1).flatMap(i=>{let o=i.left<n.right&&i.right>n.left,a=i.top-n.bottom<=2*Math.min(Aa(n),Aa(i));return o&&a&&i.top>n.bottom?[qh(n,i)]:[]}))}function zh(e,t,n){let r=e.defaultView,i=typeof e.createRange().getClientRects=="function",o=e.createRange(),a=new Map,s=new Map,l=new Map,c=y=>{let v=s.get(y);if(v===void 0){let A=r.getComputedStyle(y);v=Bw(y,A)||i&&Uw(y.getBoundingClientRect(),A,n),s.set(y,v)}return v},d=y=>{let v=l.get(y);if(v===void 0){let A=y.parentElement,C=A&&y.nodeValue?.trim()?r.getComputedStyle(A):null;v=!!C&&C.visibility!=="hidden"&&Gw(C),l.set(y,v)}return v},m=y=>{if(!i)return[Hw];let v=[];o.selectNodeContents(y);for(let A of o.getClientRects()){let C=A.bottom-A.top;A.width>0&&C>0&&n>=A.top-2*C&&n<=A.bottom+2*C&&v.push(A)}return v},f=y=>{let v=a.get(y);if(v)return v;v=[];for(let A of y.childNodes)A.nodeType===3?d(A)&&v.push(...m(A)):A.nodeType===1&&A.hasChildNodes()&&!c(A)&&v.push(...f(A));return a.set(y,v),v};function p(y){let v=Vw(f(y));return v.some(A=>fu(A,t,n))||$w(v).some(A=>fu(A,t,n))}function b(y,v){let A=r.getComputedStyle(y,v);return!A.content||A.content==="none"||A.content==="normal"||A.display==="none"?!1:A.content!=='""'||Vh(A)||$h(A).some(C=>C>0)}let x=(y,v)=>/inset/.test(v.boxShadow)||Ww(y,v,t,n)||b(y,"::before")||b(y,"::after");return y=>{if(Dw.has(y.tagName)||!(y.namespaceURI!==Wh||Pw.has(y.localName))||!r)return!0;let A=r.getComputedStyle(y);return Vh(A)||x(y,A)||y.namespaceURI!==Wh&&p(y)}}var qw=["[data-hyperframes-ignore]","[data-hyperframes-picker-ignore]","[data-hf-ignore]","[data-no-inspect]","[data-no-pick]","[data-hyper-shader-loading]"].join(","),zw=["[data-hyperframes-picker-block]","[data-hyper-shader-loading]"].join(","),jh="[data-hf-inner-root],[data-composition-id]:not([data-composition-id] *)",Kh=`${jh}{pointer-events:auto!important}`,jw=`@layer hf-picker{${Kh}}`;function Yh(e){let t=!1,n=null,r=null,i=null,o=null,a,s=new Set;function l(w,k){try{window.dispatchEvent(new CustomEvent(w,{detail:k}))}catch(K){G("runtime.picker.site1",K)}}function c(w){i=w,l("hyperframe:picker:hovered",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function d(w){o=w,l("hyperframe:picker:selected",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function m(w){if(s=new Set(Array.from(document.querySelectorAll(jh)).filter($=>getComputedStyle($).pointerEvents==="none")),s.size===0)return w();let k=f(),K=k?p(k):b();try{return w()}finally{K(),s=new Set}}function f(){if(a!==void 0)return a;if(a=null,!Array.isArray(document.adoptedStyleSheets)||typeof CSSStyleSheet>"u")return null;try{let w=new CSSStyleSheet;w.replaceSync(jw),a=w}catch(w){G("runtime.picker.site2",w)}return a}function p(w){return document.adoptedStyleSheets=[...document.adoptedStyleSheets,w],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(k=>k!==w)}}function b(){let w=document.createElement("style");return w.textContent=Kh,(document.head??document.documentElement).appendChild(w),()=>w.remove()}function x(w,k){let K=k.getComputedStyle(w),$=Number.parseFloat(K.opacity||"1");if(Number.isFinite($)&&$<.2&&!(w.textContent??"").trim()){let z=K.backgroundImage;if(z&&z!=="none")return!0}return L(w,k)}function y(w){if(w.namespaceURI!=="http://www.w3.org/2000/svg")return!1;let k=w.tagName.toLowerCase();return k==="filter"||k==="defs"||k.startsWith("fe")}function v(w){if(w.namespaceURI!=="http://www.w3.org/2000/svg"||w.tagName.toLowerCase()!=="rect")return!1;let k=(w.getAttribute("filter")??"").trim();return k&&k!=="none"?!0:(w.ownerDocument.defaultView?.getComputedStyle(w).filter??"none").startsWith("url(")}function A(w){if((w.textContent??"").trim())return!1;if(y(w)||v(w))return!0;let k=[...w.children];return k.length>0&&k.every(K=>A(K))}function C(w,k){let K=Number.parseFloat(k.getComputedStyle(w).opacity||"1");return Number.isFinite(K)&&K<.2}function L(w,k){if(!A(w))return!1;for(let K=w;K&&K!==document.body&&K!==document.documentElement;K=K.parentElement)if(C(K,k)&&A(K))return!0;return!1}function H(w){let k=w.ownerDocument.defaultView;if(!k)return!1;let K=w;if(k.getComputedStyle(w).visibility==="hidden"||x(w,k))return!0;for(;K&&K!==document.body&&K!==document.documentElement;){let $=k.getComputedStyle(K);if($.display==="none"||$.pointerEvents==="none")return!0;let B=Number.parseFloat($.opacity);if(Number.isFinite(B)&&B<=.01&&!K.hasAttribute(Pn))return!0;K=K.parentElement}return!1}function M(w){if(!w||w===document.body||w===document.documentElement)return!1;let k=w.tagName.toLowerCase();return!(k==="script"||k==="style"||k==="link"||k==="meta"||s.has(w)||w.closest(qw)||H(w))}function _(w){return!!w?.closest(zw)}function N(w){let k=w.parentElement?.getAttribute("data-composition-id");return!w.hasAttribute("data-hf-inner-root")||!k?null:`[data-composition-id="${CSS.escape(k)}"] > [data-hf-inner-root]`}function U(w){let k=N(w);if(k)return k;let K=w;if(K.id)return`#${CSS.escape(K.id)}`;let $=w.getAttribute("data-composition-id");if($)return`[data-composition-id="${CSS.escape($)}"]`;let B=w.getAttribute("data-composition-src");if(B)return`[data-composition-src="${CSS.escape(B)}"]`;let z=w.getAttribute("data-track-index");if(z)return`[data-track-index="${CSS.escape(z)}"]`;let re=w.tagName.toLowerCase(),ie=w.parentElement;if(!ie)return re;let J=ie.querySelectorAll(`:scope > ${re}`);if(J.length===1)return re;for(let ee=0;ee<J.length;ee+=1)if(J[ee]===w)return`${re}:nth-of-type(${ee+1})`;return re}function Y(w){let k=w.tagName.toLowerCase(),K=(w.textContent??"").trim().replace(/\s+/g," "),$=(z,re)=>{let ie=Array.from(z);return ie.length>re?`${ie.slice(0,re-1).join("")}\u2026`:z},B=/^h[1-6]$/.test(k);return B||k==="p"||k==="span"||k==="div"?K.length>0?$(K,56):B?"Heading":"Text":k==="img"?"Image":k==="video"?"Video":k==="audio"?"Audio":k==="svg"?"Shape":w.getAttribute("data-composition-src")?"Composition":k==="section"?"Section":`${k.charAt(0).toUpperCase()}${k.slice(1)}`}function Z(w,k,K){let $=typeof K=="number"&&K>0?K:8,B=[];if(document.elementsFromPoint)B=document.elementsFromPoint(w,k);else if(document.elementFromPoint){let ee=document.elementFromPoint(w,k);B=ee?[ee]:[]}if(_(B[0]??null))return[];let z={},re=[],ie=[],J=zh(document,w,k);for(let[ee,X]of B.entries()){if(!M(X))continue;let Me=`${X.tagName}::${X.id||""}::${ee}`;if(!z[Me]&&(z[Me]=!0,re.push(X),(ie.some(et=>X.contains(et))||J(X))&&(ie.push(X),ie.length>=$)))break}return ie.length>0?ie:re.slice(0,$)}function O(w){let k=w.getBoundingClientRect(),K={};for(let B of Array.from(w.attributes))B.name.startsWith("data-")&&(K[B.name]=B.value);return{id:w.id||null,tagName:w.tagName.toLowerCase(),selector:U(w),label:Y(w),boundingBox:{x:k.left,y:k.top,width:k.width,height:k.height},textContent:w.textContent?w.textContent.trim().slice(0,200):null,src:w.getAttribute("src")||w.getAttribute("data-composition-src")||null,dataAttributes:K}}function I(w,k,K){return m(()=>Z(w,k,K)).map(O)}function D(w){if(!t)return;let k=m(()=>{let $=Z(w.clientX,w.clientY,1)[0]??(Re(w.target)?w.target:null);return M($)?$:null});if(!k||n===k)return;n&&n.classList.remove("__hf-pick-highlight"),n=k,k.classList.add("__hf-pick-highlight");let K=O(k);c(K),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:K})}function R(w){if(!t)return;w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation();let k=I(w.clientX,w.clientY,8);k.length!==0&&(c(k[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:k,selectedIndex:0,point:{x:w.clientX,y:w.clientY}}))}function V(w){w.key==="Escape"&&(j(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function se(){t||(t=!0,r=document.createElement("style"),r.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`
|
|
42
|
+
`),document.head.appendChild(r),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",D,!0),document.addEventListener("click",R,!0),document.addEventListener("keydown",V,!0),l("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function j(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),r&&(r.remove(),r=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",D,!0),document.removeEventListener("click",R,!0),document.removeEventListener("keydown",V,!0),l("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function ne(){window.__HF_PICKER_API={enable:se,disable:j,isActive:()=>t,getHovered:()=>i,getSelected:()=>o,getCandidatesAtPoint:(w,k,K)=>Number.isFinite(w)&&Number.isFinite(k)?I(w,k,K):[],pickAtPoint:(w,k,K)=>{if(!Number.isFinite(w)||!Number.isFinite(k))return null;let $=I(w,k,8);if(!$.length)return null;let B=Math.max(0,Math.min($.length-1,Number(K??0))),z=$[B]??null;return z?(d(z),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:z}),j(),z):null},describe:w=>Re(w)?O(w):null,pickManyAtPoint:(w,k,K)=>{if(!Number.isFinite(w)||!Number.isFinite(k))return[];let $=I(w,k,8);if(!$.length)return[];let B=[],z=Array.isArray(K)?K:[0];for(let re of z){let ie=Math.max(0,Math.min($.length-1,Math.floor(Number(re)))),J=$[ie];if(!J)continue;B.some(X=>X.selector===J.selector&&X.tagName===J.tagName)||B.push(J)}return B.length?(d(B[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:B}),j(),B):[]}},l("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:se,disablePickMode:j,installPickerApi:ne}}function wi(e,t,n){let r=e?.[t];return typeof r=="function"?Number(r.call(e))||n:typeof r=="number"&&Number.isFinite(r)?r:(r!=null&&G("runtime.player.nonConformantNum",{prop:t,actual:typeof r}),n)}function gt(e,t){let n=e?.[t];if(typeof n=="function"){n.call(e);return}n!==void 0&&G("runtime.player.nonConformantVoid",{method:t,actual:typeof n})}function _i(e,t,n){if(e){for(let r of Object.values(e))if(!(!r||r===t))try{n(r)}catch(i){G("runtime.player.site1",i)}}}function wa(e,t,n){return n?.exact===!0?Number.isFinite(e)&&e>0?e:0:wp(e,t,n?.subFrameDivisions)}function Xh(e,t,n,r){let i=wa(t,n,r),o=r?.suppressEvents===!0;return gt(e,"pause"),typeof e.totalTime=="function"?e.totalTime(i,o):typeof e.seek=="function"&&e.seek(i,o),i}function Kw(e,t,n,r,i){let o=[];_i(e,t,a=>{gt(a,"play"),o.push(a)});try{return Xh(t,n,r,i)}finally{for(let a of o)try{gt(a,"pause")}catch(s){G("runtime.player.site2",s)}}}function Yw(e,t){_i(e,t,n=>{gt(n,"play")})}function Jh(e){let t=e.transport;return t?{_timeline:null,play:()=>t.play(),pause:()=>t.pause(),seek:(n,r)=>t.seek(n,r),renderSeek:(n,r)=>t.renderSeek(n,r),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 r=Math.max(0,Number(e.getSafeDuration?.()??wi(n,"duration",0))||0);r>0&&Math.max(0,wi(n,"time",0))>=r&&(gt(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()),gt(n,"play"),_i(e.getTimelineRegistry?.(),n,i=>{typeof i.timeScale=="function"&&i.timeScale(e.getPlaybackRate()),gt(i,"play")}),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let n=e.getTimeline();if(!n)return;gt(n,"pause"),_i(e.getTimelineRegistry?.(),n,i=>{gt(i,"pause")});let r=Math.max(0,wi(n,"time",0));e.onDeterministicSeek(r),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(r,!1),e.onRenderFrameSeek(r),e.onStatePost(!0)},seek:(n,r)=>{let i=e.getTimeline();if(!i)return;let o=Math.max(0,Number(n)||0),a=e.getIsPlaying(),s=Kw(e.getTimelineRegistry?.(),i,o,e.getCanonicalFps());e.onDeterministicSeek(s),r?.keepPlaying&&a?(typeof i.timeScale=="function"&&i.timeScale(e.getPlaybackRate()),gt(i,"play"),_i(e.getTimelineRegistry?.(),i,l=>{typeof l.timeScale=="function"&&l.timeScale(e.getPlaybackRate()),gt(l,"play")}),e.onDeterministicPlay(),e.onShowNativeVideos(),e.onSyncMedia(s,!0)):(e.setIsPlaying(!1),e.onSyncMedia(s,!1)),e.onRenderFrameSeek(s),e.onStatePost(!0)},renderSeek:(n,r)=>{let i=e.getTimeline(),o=e.getCanonicalFps(),a=i?(Yw(e.getTimelineRegistry?.(),i),Xh(i,n,o,r)):wa(Math.max(0,Number(n)||0),o,r);e.onDeterministicSeek(a,r),e.setIsPlaying(!1),e.onSyncMedia(a,!1),e.onRenderFrameSeek(a),e.onStatePost(!0)},getTime:()=>wi(e.getTimeline(),"time",0),getDuration:()=>wi(e.getTimeline(),"duration",0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:n=>e.setPlaybackRate(n),getPlaybackRate:()=>e.getPlaybackRate()}}function mu(){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}}function Hn(e){if(e==null||e.trim()==="")return null;let t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function xr(e){if(e==null||e.trim()==="")return null;let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:null}function bt(e=document){let t=e.querySelector('[data-composition-id][data-root="true"]');return _e(t)?t:e.querySelector("[data-composition-id]")}var Xw=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"]);function pu(e){return e.id||e.getAttribute("data-hf-id")||null}function Jw(e){return Le(e)}function Qw(e,t){let n=e.getAttribute("data-composition-id");if(!n)return null;let r=Vt(t[n]);return r!=null&&r>0?r:null}function Zw(e){return pe(e)?Number.isFinite(e.duration)?Ct(e,e.duration):null:ir(e)}function e_(e,t,n,r){let i=Jw(e.getAttribute("data-duration"));return i!=null&&i>0?i:Qw(e,t)??Zw(e)??Math.max(0,n-r)}function t_(e){for(let[t,n]of e){let r=t.parentElement;for(;r;){let i=e.get(r);if(i){n.parentId=i.id,i.children.push(n);break}r=r.parentElement}}}function Qh(e){let{startResolver:t,timelineRegistry:n,rootDuration:r}=e,i=new Map,o=bt(),a=0;for(let s of document.querySelectorAll("[data-start]")){if(s===o||Xw.has(s.tagName))continue;let l=t.resolveStartForElement(s,0);if(e_(s,n,r,l)<=0)continue;let c={id:pu(s)??`__clip-${a++}`,element:s,parentId:null,children:[]};i.set(s,c)}return t_(i),{roots:Array.from(i.values()).filter(s=>s.parentId===null)}}var hu="css:root",Zh=["backdrop-filter","clip-path","filter","mask","mask-border-source","mask-image","perspective","rotate","scale","transform","translate","-webkit-mask-image"],n_=new Set([...Zh,"contain","isolation","mask-border","mix-blend-mode","opacity"]),r_=new Set(["absolute","relative"]),i_=new Set(["flex","inline-flex","grid","inline-grid"]),o_=new Set(["layout","paint","strict","content"]),a_=new Set(["size","inline-size"]);function s_(e){return e.position==="fixed"||e.position==="sticky"}function l_(e,t){if(t.zIndex==="auto"||t.zIndex==="")return!1;if(r_.has(t.position))return!0;let n=e.parentElement?e.ownerDocument.defaultView?.getComputedStyle(e.parentElement).display:null;return n!=null&&i_.has(n)}function u_(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:Zh.some(r=>{let i=e.getPropertyValue(r);return i!==""&&i!=="none"})}function c_(e){return e.getPropertyValue("contain").split(/\s+/).some(n=>o_.has(n))?!0:a_.has(e.getPropertyValue("container-type"))}function d_(e){return e.getPropertyValue("will-change").split(",").map(t=>t.trim()).some(t=>n_.has(t))}function f_(e,t){return e.hasAttribute(Ke)||s_(t)||l_(e,t)||u_(t)||c_(t)?!0:d_(t)}function m_(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 _a(e,t){let n=t?.get(e.parentElement);if(n!==void 0)return n;let r=p_(e);return t?.set(e.parentElement,r),r}function p_(e){let t=e.ownerDocument.defaultView;if(!t)return hu;let n=e.parentElement;for(;n&&n!==e.ownerDocument.documentElement;){try{if(f_(n,t.getComputedStyle(n)))return m_(n)}catch{return hu}n=n.parentElement}return hu}function gu(e){let t=e.trim().toLowerCase();return!(!t||t==="main"||t.includes("caption")||t.includes("ambient"))}var eg=e=>e!==null&&Number.isFinite(e)&&e>0;function yr(e){let t=e.clipEndsSeconds.filter(r=>r===null).length;if(eg(e.authoredDurationSeconds))return{seconds:e.authoredDurationSeconds,source:"authored",pendingClips:t};let n=e.clipEndsSeconds.filter(eg);return n.length>0?{seconds:Math.max(...n),source:"derived",pendingClips:t}:{seconds:null,source:"unresolved",pendingClips:t,reason:t>0?"every clip's length is still pending":"no authored duration and no clip with a length"}}var Sr=7200,$t=1/60,Ci=e=>e!==null&&e>$t?e:null;function tg(e){return{width:xr(e.getAttribute("data-width")),height:xr(e.getAttribute("data-height"))}}function ng(e,t){let n=[];for(let r of e.querySelectorAll("video[data-start], audio[data-start]")){let i=t.mediaStart(r);if(!Number.isFinite(i))continue;let o=t.mediaDuration(r);o==null||o<=$t||n.push(Math.max(0,i)+o)}return Ci(yr({authoredDurationSeconds:null,clipEndsSeconds:n}).seconds)}function rg(e,t){let n=[];for(let i of e.querySelectorAll("[data-composition-id][data-start]")){if(i.parentElement?.closest("[data-composition-id]")!==e)continue;let o=t.resolveStartForElement(i,0),a=t.resolveDurationForElement(i);!Number.isFinite(o)||a==null||a<=0||n.push(Math.max(0,o)+a)}let r=Le(e.getAttribute("data-duration"));return Ci(yr({authoredDurationSeconds:null,clipEndsSeconds:[r,...n]}).seconds)}var h_=e=>e.hasAttribute("data-composition-id")||e.hasAttribute("data-composition-src");function ig(e,t,{unregisteredLottie:n}){let r=[];for(let o of e.querySelectorAll("[data-start]")){let a=t.resolveStartForElement(o,0);if(!Number.isFinite(a))continue;let s=t.resolveDurationForElement(o);s!=null?r.push(Math.max(0,a)+s):(pe(o)||h_(o))&&r.push(null)}(n||e.querySelector("[data-lottie-src]"))&&r.push(null);let i=yr({authoredDurationSeconds:null,clipEndsSeconds:r});return i.pendingClips>0?{...i,seconds:null,source:"unresolved",reason:"a clip's length is pending"}:i}function og(e){if(e.declared!==null&&Number.isFinite(e.declared)&&e.declared>0)return e.declared;let t=Ci(e.timeline()),n=Math.max(0,...e.floors().map(l=>l??0)),r=Number.isFinite(e.fallback)&&e.fallback>$t?e.fallback:0,i=Math.max(n,r),a=t!==null&&t>=Sr&&Ci(i)!==null?null:t,s;return a!==null?s=Math.max(a,i):Ci(n)!==null?s=i:r>0?s=r:s=e.derived(),s>0?s:0}function Ca(e,t){let n=e.tagName.toLowerCase();if(n==="script"||n==="style"||n==="link"||n==="meta")return!1;let i=n==="video"||n==="audio"?t.resolver.resolveMediaStartForElement(e):t.resolver.resolveStartForElement(e,0),o=t.resolver.resolveDurationForElement(e),a=e.getAttribute("data-composition-id");if(a){let c=t.timelineRegistry[a],d=Vt(c);!(e.hasAttribute("data-duration")||e.hasAttribute("data-end")||e.hasAttribute(or)||e.hasAttribute(ar))&&(o==null||o<=0)&&d!=null&&d>0&&(o=d)}let s=o!=null&&o>0?i+o:Number.POSITIVE_INFINITY,l=t.exportRenderSeek?la(i,s,t.canonicalFps):{start:i,end:s};return lr(t.currentTime,l.start,l.end,t.compositionDuration)}function Ri(e){return Le(e)}function bu(e){let t=e.getAttribute("data-duration"),n=e.getAttribute(or),r=sr({start:0,duration:t,authoredDuration:n})?.duration;return r??([t,n].map(Ri).some(o=>o!=null&&o<=0)?0:null)}function ag(e){return sr({start:0,end:e.getAttribute("data-end"),authoredEnd:e.getAttribute(ar)})?.end??null}function xu(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 yu(...e){let t=e.filter(n=>Number.isFinite(n??null));return t.length===0?null:Math.max(...t)}function vr(e,t){let n=e.getAttribute("data-track-index")??e.getAttribute("data-track");if(n==null)return t;let r=Number.parseInt(n,10);return Number.isFinite(r)?r:t}function ki(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 sg(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return ki(t);let n=e.getAttribute("data-composition-src");if(n)return ki(n);let r=e.querySelector("img[src], video[src], audio[src], source[src]");return r?ki(r.getAttribute("src")):null}function b_(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 x_(e){if(!e)return null;let t;try{t=new URL(e,document.baseURI).pathname.split("/").filter(Boolean).at(-1)}catch{t=e.replace(/[?#].*$/,"").split(/[\\/]/).filter(Boolean).at(-1)}if(!t)return null;try{return decodeURIComponent(t)}catch{return t}}function y_(e){let t=e.textContent?.replace(/\s+/g," ").trim();return t?t.length>32?`${t.slice(0,31)}...`:t:null}function Ti(e){let t=e.replace(/\.[^.]+$/i,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim();return t?t.replace(/\b\w/g,n=>n.toUpperCase()):e}function lg(e){return e.getAttribute("data-hf-original-composition-id")??e.getAttribute("data-composition-id")}function S_(e,t,n){let r=e.getAttribute("data-timeline-label")??e.getAttribute("data-label")??e.getAttribute("aria-label")??null;if(r?.trim())return r.trim();let i=lg(e);if(i)return Ti(i);let o=e.id;if(o)return Ti(o);let a=b_(e);if(a)return Ti(a);let s=x_(sg(e));if(s)return Ti(s);let l=y_(e);return l||`${Ti(t)} ${n+1}`}function Su(e){let t=new Map,r=window.__timelines??{},i=Ye({timelineRegistry:r,includeAuthoredTimingAttrs:!0}),o=$=>{if(!$)return null;let B=Vt(r[$]);return B!=null&&B>0?B:null},a=()=>{let $=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if($.length===0)return null;let B=0;for(let z of $){let re=i.resolveMediaStartForElement(z);if(!Number.isFinite(re))continue;let ie=rr(z);ie==null||ie<=0||(B=Math.max(B,Math.max(0,re)+ie))}return B>0?B:null},s=($,B)=>{let z=[],re=null,ie=null,J=null,ee=$.parentElement;for(;ee;){let X=ee.getAttribute("data-composition-id");X&&(z.push(X),!J&&ee!==B&&(J=X),re==null&&(re=i.resolveStartForElement(ee,0)),ie==null&&(ie=Ri(ee.getAttribute("data-duration"))??o(X)??null)),ee=ee.parentElement}return{parentCompositionId:J,compositionAncestors:z.reverse(),inheritedStart:re,inheritedDuration:ie}},l=bt(),c=Array.from(document.querySelectorAll("[data-composition-id]")),d=l?.getAttribute("data-composition-id")??null,m=l?i.resolveStartForElement(l,0):0,f=a(),p=f!=null?Math.max(0,f-Math.max(0,m)):null,b=o(d),x=bu(l??document.body),y=yu(...c.filter($=>$!==l).map($=>{let B=i.resolveStartForElement($,0),z=i.resolveDurationForElement($)??o($.getAttribute("data-composition-id"))??null;return!Number.isFinite(B)||z==null||z<=0?null:Math.max(0,B)+z})),v=y!=null?Math.max(0,y-Math.max(0,m)):null,A=typeof b=="number"&&Number.isFinite(b)&&b>0?b:null,C=typeof x=="number"&&Number.isFinite(x)&&x>0?x:null,L=typeof p=="number"&&Number.isFinite(p)&&p>0?p:null,H=typeof v=="number"&&Number.isFinite(v)&&v>0?v:null,M=yu(L,H),_=A!=null&&M!=null&&A>=Sr,U=C??(_?M:yu(A,L,H))??null,Z=(U!=null?m+U:null)??(typeof f=="number"&&Number.isFinite(f)&&f>0?f:null),O=($,B)=>!Number.isFinite(B)||B<=0?0:Z==null||!Number.isFinite(Z)?B:!Number.isFinite($)||$>=Z?0:Math.max(0,Math.min(B,Z-$)),I=[],D=[],R=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),V=0;for(let[$,B]of R.entries()){if(B===l||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(B.tagName))continue;let z=s(B,l),re=B.tagName.toLowerCase(),ie=re==="video"||re==="audio"?i.resolveMediaStartForElement(B):i.resolveStartForElement(B,z.inheritedStart??0),J=B.getAttribute("data-composition-id"),ee=!!J&&J!==d,X=bu(B);if(X==null&&ee&&(X=o(J)),X==null&&pe(B)&&Number.isFinite(B.duration)&&(X=Ct(B,B.duration)),X==null&&(X=ir(B,ie)),X==null){let Fe=z.inheritedDuration;if(Fe!=null&&Fe>0){let Oe=(z.inheritedStart??0)+Fe;X=Math.max(0,Oe-ie)}}if(X==null||X<=0||(X=O(ie,X),X<=0))continue;let Me=i.resolveHostSlotsForElement(B);if(Me.length>0){let Fe=Dn({start:ie,end:ie+X},Me),De=ee;if(Fe.end<=Fe.start&&!De)continue;ie=Fe.start,X=Fe.end-Fe.start}let et=ie+X;V=Math.max(V,et);let Xt=J&&J!==d?"composition":re==="video"?"video":re==="audio"?"audio":re==="img"?"image":"element";I.push({id:pu(B)??J??null,label:S_(B,Xt,I.length),start:ie,duration:X,track:vr(B,$),zIndex:xu(B),stackingContextId:_a(B,t),kind:Xt,tagName:re,compositionId:B.getAttribute("data-composition-id"),compositionAncestors:z.compositionAncestors,parentCompositionId:z.parentCompositionId,nodePath:null,compositionSrc:ki(B.getAttribute("data-composition-src")),playbackStart:Rt(B),playbackRate:Qe(B),assetUrl:sg(B),timelineRole:B.getAttribute("data-timeline-role"),timelineLabel:B.getAttribute("data-timeline-label"),timelineGroup:B.getAttribute("data-timeline-group"),timelinePriority:Ri(B.getAttribute("data-timeline-priority"))})}let se=new Set(I.map($=>$.id)),j=l?.getAttribute("data-composition-id")??null,ne=j?r[j]??null:null;if(ne&&l){let $=ne;if(typeof $.getChildren=="function")try{let B=$.getChildren(!0,!0,!1)??[],z=new Map;for(let J of l.children){let ee=J;if(!ee.id)continue;let X=ee.tagName.toLowerCase();X==="script"||X==="style"||X==="link"||z.set(ee,{id:ee.id,start:1/0,end:-1/0})}let re=J=>{let ee=J;for(;ee;){if(z.has(ee))return ee;if(ee===l)return null;ee=ee.parentElement}return null};for(let J of B){if(typeof J.targets!="function"||typeof J.startTime!="function"||typeof J.duration!="function")continue;let ee=J.startTime(),X=J.parent;for(;X&&X!==ne&&typeof X.startTime=="function";)ee+=X.startTime(),X=X.parent;let Me=ee+J.duration();if(!(!Number.isFinite(ee)||!Number.isFinite(Me)))for(let et of J.targets()){if(!Re(et))continue;let Xt=re(et);if(!Xt)continue;let Fe=z.get(Xt);Fe&&(Fe.start=Math.min(Fe.start,ee),Fe.end=Math.max(Fe.end,Me))}}let ie=I.length>0?Math.max(...I.map(J=>J.track))+1:0;for(let[J,ee]of z){if(ee.start===1/0||ee.end===-1/0)continue;let X=J;if(se.has(X.id))continue;let Me=Math.max(0,ee.end-ee.start);if(Me<=0)continue;let et=O(ee.start,Me);et<=0||(V=Math.max(V,ee.start+et),I.push({id:X.id,label:X.getAttribute("data-timeline-label")??X.getAttribute("data-label")??X.getAttribute("aria-label")??X.id,start:ee.start,duration:et,track:vr(X,ie),zIndex:xu(X),stackingContextId:_a(X,t),kind:"element",tagName:X.tagName.toLowerCase(),compositionId:X.getAttribute("data-composition-id"),compositionAncestors:j?[j]:[],parentCompositionId:j,nodePath:null,compositionSrc:null,playbackStart:Rt(X),playbackRate:Qe(X),assetUrl:null,timelineRole:X.getAttribute("data-timeline-role"),timelineLabel:X.getAttribute("data-timeline-label"),timelineGroup:X.getAttribute("data-timeline-group"),timelinePriority:Ri(X.getAttribute("data-timeline-priority"))}),se.add(X.id))}}catch(B){G("runtime.timeline.site1",B)}}if(l&&U!=null&&U>0){let $=I.length>0?Math.max(...I.map(B=>B.track))+1:0;for(let B of l.children){let z=B;if(!z.id||se.has(z.id))continue;let re=z.getAttribute("data-timeline-role");if(re!=="overlay"&&re!=="persistent-overlay")continue;let ie=z.tagName.toLowerCase();if(ie==="script"||ie==="style"||ie==="link"||ie==="meta"||window.getComputedStyle(z).display==="none")continue;let ee=O(0,U);ee<=0||(V=Math.max(V,ee),I.push({id:z.id,label:z.getAttribute("data-timeline-label")??z.getAttribute("data-label")??z.getAttribute("aria-label")??z.id,start:0,duration:ee,track:vr(z,$),zIndex:xu(z),stackingContextId:_a(z,t),kind:"element",tagName:ie,compositionId:z.getAttribute("data-composition-id"),compositionAncestors:j?[j]:[],parentCompositionId:j,nodePath:null,compositionSrc:null,playbackStart:Rt(z),playbackRate:Qe(z),assetUrl:null,timelineRole:re,timelineLabel:z.getAttribute("data-timeline-label"),timelineGroup:z.getAttribute("data-timeline-group"),timelinePriority:Ri(z.getAttribute("data-timeline-priority"))}),se.add(z.id))}}for(let $ of c){if($===l)continue;let B=$.getAttribute("data-composition-id");if(!B||!gu(B))continue;let z=i.resolveStartForElement($,0),re=bu($);if((re==null||re<=0)&&ag($)!=null){let X=ag($);re=Math.max(0,X-z)}let ie=o(B),J=re&&re>0?re:ie;if(J==null||J<=0)continue;let ee=O(z,J);ee<=0||D.push({id:B,label:$.getAttribute("data-label")??lg($)??B,start:z,duration:ee,thumbnailUrl:ki($.getAttribute("data-thumbnail-url")),avatarName:null})}let w=Math.max(V||0,U??0),k=w>0?w:1,K=Math.max(1,Math.ceil(k*Math.max(1,e.canonicalFps)));return{...Ho(e.canonicalFps),source:"hf-preview",type:"timeline",compositionContractVersion:1,durationSeconds:k,durationInFrames:K,clips:I,scenes:D,compositionWidth:xr(l?.getAttribute("data-width"))??1920,compositionHeight:xr(l?.getAttribute("data-height"))??1080}}var Eu="data-composition-id",v_="data-composition-src",E_=`[${Eu}]`,JP=`[${v_}]`,Au="style",ug="script",wu='link[rel="stylesheet"], link[rel="preconnect"]',A_=new Set(["","application/ecmascript","application/javascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript"]),w_=e=>(e.getAttribute("type")||"").trim().toLowerCase();function cg(e){let t=w_(e);return t==="module"||t==="importmap"?!0:A_.has(t)&&e.getAttribute("nomodule")===null}function vu(e){return dn(e?.querySelectorAll(ug)).filter(t=>!cg(t))}function _u(e){return dn(e?.querySelectorAll(ug)).filter(cg)}function dg(e){return[...dn(e.querySelectorAll(`${Au}, ${wu}`)),..._u(e)]}function dn(e){return e?Array.from(e):[]}function fg(e){let{contentNode:t,head:n,documentElement:r,hasTemplate:i,compositionId:o}=e,a=dn(t.querySelectorAll(E_)),s=o?a.find(m=>m.getAttribute(Eu)===o)??null:a[0]??null,l=(s??a[0])?.getAttribute(Eu)?.trim()||"",c=i?null:n??null,d=s?vu(s):[];return{innerRoot:s,authoredCompositionId:o||l||null,scriptCompositionId:l||o||null,authoredRootId:s?.getAttribute("id")?.trim()||null,styleSources:[...dn(c?.querySelectorAll(Au)),...dn(t.querySelectorAll(Au))],scriptSources:[..._u(c),..._u(t)],linkSources:[...dn(n?.querySelectorAll(wu)),...dn(t.querySelectorAll(wu))],inertScriptsOutsideRoot:[...vu(c),...s?vu(t).filter(m=>!d.includes(m)):[]],variableDefaultCarriers:[r,s].filter(m=>m!=null)}}function mg(e,t){let n=t[0]?.ownerDocument.querySelector("[data-composition-id]"),r=n&&!t.includes(n)?n.getAttribute("data-composition-id"):null,i=r?e.get(r):void 0;r&&i&&e.set(r,i+1)}var __='"use strict";(()=>{function I(e){return e?/[\\w-]/.test(e)||e.charCodeAt(0)>=128:!1}function _(e){return e===" "||e===" "||e===`\n`||e==="\\r"||e==="\\f"}var j=/^[0-9a-fA-F]{1,6}/;function G(e){let n=e>=55296&&e<=57343;return e===0||e>1114111||n?65533:e}function $(e,n){return e[n]==="\\r"&&e[n+1]===`\n`?n+2:_(e[n])?n+1:n}function R(e,n){let t=e[n+1];if(t===void 0||/[\\n\\r\\f]/.test(t))return null;let i=j.exec(e.slice(n+1,n+7));if(!i)return{value:t,end:n+2};let o=G(Number.parseInt(i[0],16));return{value:String.fromCodePoint(o),end:$(e,n+1+i[0].length)}}function H(e,n){let t=o=>I(o)&&!/[0-9-]/.test(o),i=o=>e[o]==="\\\\"&&R(e,o)!==null;return e[n]==="-"?e[n+1]==="-"||t(e[n+1])||i(n+1):t(e[n])||i(n)}function y(e,n){let t=n;for(;e.startsWith("/*",t);){let i=e.indexOf("*/",t+2);t=i<0?e.length:i+2}return t}function A(e,n){let t=y(e,n);for(;_(e[t]);)t=y(e,t+1);return t}function h(e,n){if(!H(e,n))return null;let t=n,i="";for(;t<e.length;){let o=e[t];if(o==="\\\\"){let a=R(e,t);if(!a)break;i+=a.value,t=a.end;continue}if(!I(o))break;i+=o,t+=1}return t===n?null:{value:i,end:t}}var C=45;function T(e){return e>=48&&e<=57}function z(e){return e>=128||e===C||e===95||T(e)||e>=65&&e<=90||e>=97&&e<=122}function J(e,n){let t=e.charCodeAt(n);return t>=1&&t<=31||t===127?!0:T(t)?n===0||n===1&&e.charCodeAt(0)===C:!1}function k(e){let n="";for(let t=0;t<e.length;t+=1){let i=e.charCodeAt(t),o=e[t];i===0?n+="\\uFFFD":J(e,t)?n+=`\\\\${i.toString(16)} `:t===0&&e.length===1&&i===C?n+=`\\\\${o}`:z(i)?n+=o:n+=`\\\\${o}`}return n}var W=/\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\\\\(?:[0-9a-fA-F]{1,6}(?:\\r\\n|[ \\t\\r\\n\\f])?|[\\s\\S])|"(?:[^"\\\\]|\\\\[\\s\\S])*"|\'(?:[^\'\\\\]|\\\\[\\s\\S])*\'|\\[(?:\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\\\\[\\s\\S]|"(?:[^"\\\\]|\\\\[\\s\\S])*"|\'(?:[^\'\\\\]|\\\\[\\s\\S])*\'|[^\\]"\'\\\\/]|\\/(?!\\*))*\\]/g;function Q(e){let n=new Array(e.length).fill(!0);for(let t of e.matchAll(W)){let i=t.index;n.fill(!1,i,i+t[0].length)}return n}function q(e,n,t){if(n.length===0||!e.includes("#"))return e;let i=new Set(n),o=Q(e),a="",u=0;for(;u<e.length;){let d=o[u]&&e[u]==="#"?h(e,u+1):null;d&&i.has(d.value)?(a+=t(d.value),u=d.end):(a+=e[u],u+=1)}return a}function X(e){let n="";for(let t=0;t<e.length;t+=1){if(e[t]==="\\\\"){let i=e[t+1];if(i!==void 0&&/[\\n\\r\\f]/.test(i)){t=$(e,t+1)-1;continue}let o=R(e,t);if(o){n+=o.value,t=o.end-1;continue}}n+=e[t]}return n}function N(e){return Array.from(e,n=>{let t=n.charCodeAt(0);return t===0?"\\uFFFD":t<32||t===127?`\\\\${t.toString(16)} `:n===\'"\'||n==="\\\\"?`\\\\${n}`:n}).join("")}function Y(e,n){return e?{kind:"any"}:n===void 0?{kind:"none"}:{kind:"named",prefix:n}}function Z(e,n){return e[n]==="|"&&e[n+1]!=="="}function B(e,n){let t=e[n]==="*",i=t?{value:"*",end:n+1}:h(e,n),o=y(e,i?.end??n);if(!Z(e,o))return t?null:i?{token:i,namespace:{kind:"none"}}:null;let a=h(e,y(e,o+1));return a?{token:a,namespace:Y(t,i?.value)}:null}function K(e){if(e[0]!=="[")return null;let n=A(e,1),t=B(e,n);if(!t)return null;let{token:i,namespace:o}=t;return{name:i.value,rawName:e.slice(n,i.end),namespace:o,end:i.end}}function ee(e,n){let t=/^(?:"((?:\\\\[\\s\\S]|[^"\\\\])*)"|\'((?:\\\\[\\s\\S]|[^\'\\\\])*)\')/.exec(e.slice(n));return t?{value:X(t[1]??t[2]),end:n+t[0].length}:h(e,n)}function ne(e,n){let t=A(e,n),i=h(e,t);if(i){if(!/^[is]$/i.test(i.value))return null;t=A(e,i.end)}return e[t]!=="]"||t!==e.length-1?null:{flag:i?.value}}function F(e){let n=K(e);if(!n)return null;let t=A(e,n.end),o=["=","~=","|=","^=","$=","*="].find(d=>e.startsWith(d,t));if(!o)return null;let a=ee(e,A(e,t+o.length));if(!a)return null;let u=ne(e,a.end);return u?{name:n.name,rawName:n.rawName,namespace:n.namespace,operator:o,value:a.value,flag:u.flag}:null}function E(e,n){return e.replace(W,t=>t.startsWith("[")?n(t):t)}var re="data-hf-svg-reference-aliases";function O(e,n,t,i){let o={"=":(s,r)=>s===r,"~=":(s,r)=>s.split(/[ \\t\\r\\n\\f]+/).includes(r),"|=":(s,r)=>s===r||s.startsWith(r+"-"),"^=":(s,r)=>s.startsWith(r),"$=":(s,r)=>s.endsWith(r),"*=":(s,r)=>s.includes(r)},a=(s,r,l)=>!r&&l!=="="&&l!=="|="?!1:o[l](s,r),u=s=>s.replace(/[A-Z]/g,r=>r.toLowerCase()),d=s=>{let r=F(s);if(!r)return s;let{name:l,rawName:g,namespace:m,operator:b,value:D,flag:w}=r;if(m.kind==="named"!=(i!==void 0))return s;let x=w?.toLowerCase()==="i"?u:S=>S,L=u(l),P=t.filter(S=>{let V=m.kind==="none"?S.name:S.localName,U=m.kind==="named"?i.get(m.prefix):null;return(m.kind==="any"||S.namespaceURI===U)&&u(V)===L}),v=new Set([s]);for(let S of P)a(x(S.before),x(D),b)&&v.add(`[${g}="${N(S.after)}"${w?` ${w}`:""}]`);return v.size===1?s:`:is(${[...v].join(", ")})`};if(i)return E(e,d);let p=new Map(n.map(({id:s,replacement:r})=>[s,r])),f=new Map;for(let s of t){if(s.name!=="id"||s.before===s.after||p.has(s.before))continue;let r=f.get(s.before);r||(r=new Set([`#${k(s.before)}`]),f.set(s.before,r)),r.add(`#${k(s.after)}`)}for(let[s,r]of f)p.set(s,`:is(${[...r].join(", ")})`);let c=q(e,[...p.keys()],s=>p.get(s));return E(c,d)}function se(e,n,t=!0){let i=[],a=(t?[...e.querySelectorAll(`[${n}]`)]:[]).map(d=>d.getAttribute(n)),u=e.getAttribute?.(n);u&&a.unshift(u);for(let d of a){let p;try{p=JSON.parse(d)}catch{continue}if(!Array.isArray(p))continue;let f=p;for(let c of f){if(!ie(c))continue;let{name:s,localName:r,namespaceURI:l,before:g,after:m}=c;i.push({name:s,localName:r,namespaceURI:l,before:g,after:m})}}return i}function ie(e){if(!e||typeof e!="object")return!1;let{name:n,localName:t,namespaceURI:i,before:o,after:a}=e;return typeof n=="string"&&typeof t=="string"&&(i===null||typeof i=="string")&&typeof o=="string"&&typeof a=="string"}function oe(e){let n=[],t=[],i=!1,o,a=new WeakMap,u=(f,c)=>{for(let s of f){if("selectorText"in s){let r=s,l=a.get(r),g=r.selectorText,m=l?.applied===g?l.authored:g,b=O(m,[],t,c);b!==g&&(r.selectorText=b),b===m?a.delete(r):a.set(r,{authored:m,applied:r.selectorText})}"cssRules"in s&&u(s.cssRules,c)}},d=()=>{if(t.length)for(let f of e.document.styleSheets){let c;try{c=f.cssRules}catch{continue}let s=new Map;for(let r of c){if(!("namespaceURI"in r))continue;let{prefix:l,namespaceURI:g}=r;l&&s.set(l,g||null)}s.size&&u(c,s)}},p={rewrite:(f,c=[])=>{if(typeof f!="string"||!f.includes("#")&&!f.includes("["))return f;let s=O(f,c.length?[...c,...n]:n,t);if(s!==f){if(!o){let r=e.document.createElement("div");o=r.matches.bind(r)}o(f)}return s},refresh(){t=se(e.document,re).filter(r=>r.before!==r.after);let f=new Set(t.filter(r=>r.name==="id").map(r=>r.before)),c=new Set;n=[];for(let r of e.document.querySelectorAll("[data-hf-authored-id][id]")){let l=r.getAttribute("data-hf-authored-id");if(!l||l===r.id||c.has(l)||f.has(l))continue;c.add(l);let g=N(l);n.push({id:l,replacement:`:is(#${k(l)}, [data-hf-authored-id="${g}"])`})}if(d(),i||!n.length&&!t.length)return;let s=e.Element.prototype;s.querySelector=new Proxy(s.querySelector,{apply(r,l,g){return Reflect.apply(r,l,[p.rewrite(g[0])])}}),s.querySelectorAll=new Proxy(s.querySelectorAll,{apply(r,l,g){return Reflect.apply(r,l,[p.rewrite(g[0])])}}),i=!0}};e.__hfSvgSelectorAliases=p,p.refresh()}function M(){let e=window;e.__hfSvgSelectorAliases||oe(e)}M();})();\n';function pg(){return __}var Te=Vv(V0(),1),Va=Te.default,UO=Te.default.stringify,WO=Te.default.fromJSON,VO=Te.default.plugin,$O=Te.default.parse,qO=Te.default.list,zO=Te.default.document,jO=Te.default.comment,KO=Te.default.atRule,YO=Te.default.rule,XO=Te.default.decl,JO=Te.default.root,QO=Te.default.CssSyntaxError,ZO=Te.default.Declaration,eH=Te.default.Container,tH=Te.default.Processor,nH=Te.default.Document,rH=Te.default.Comment,iH=Te.default.Warning,oH=Te.default.AtRule,aH=Te.default.Result,sH=Te.default.Input,lH=Te.default.Rule,uH=Te.default.Root,cH=Te.default.Node;var Xu="data-hf-scene",Ki="hf-scene-parts",Ju="data-hf-scene-fonts",Qu=e=>e.match(/@font-face\s*\{[^}]*\}/gi)??[],Zu="data-hf-scene-no-swap";var ec="data-hf-authored-id",$0="data-hf-inner-root";function tc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nc(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function i1(e){let t=e.trim();return t?Array.from(new Set([t,Ot(t)])).filter(Boolean):[]}function o1(e,t,n){let r=i1(t);return No(e,r,()=>n)}function a1(e,t){let n=t?.trim();return n?o1(e,n,`[${ec}="${nc(n)}"]`):e}function q0(e){return`${e}:not(:has([${$0}])), ${e} > [${$0}]`}function s1(e,t,n,r,i,o){let a=a1(e,r),s=l1(a,t,n),l=s.trim();if(!l||l==="*")return e;if(/^(html|body|:root)$/i.test(l))return o?q0(t):e;let c=new RegExp(`\\[\\s*data-composition-id\\s*[\\^\\*\\$]?=\\s*(["'])${tc(n)}\\1\\s*\\]`,"g");if(c.test(l))return l.replace(c,"").trim()===""?q0(t):s.replace(c,t);let d=s.match(/^\s*/)?.[0]??"",m=s.match(/\s*$/)?.[0]??"";if(i){let f=r?`[${ec}="${nc(r)}"]`:null;if(f&&l.startsWith(f)){let p=l.slice(f.length);return`${d}${t}${f}${p}${m}`}}return`${d}${t} ${l}${m}`}function l1(e,t,n){let r=tc(n),i=String.raw`\[\s*data-composition-id\s*=\s*(?:"${r}"|'${r}')\s*\]`,o=String.raw`\s*\[\s*data-(?:start|duration)\s*=\s*(?:"[^"]*"|'[^']*')\s*\]`;return e.replace(new RegExp(`${i}(?:${o})+`,"g"),t).replace(new RegExp(`(?:${o})+${i}`,"g"),t)}var u1=new Set(["keyframes","-webkit-keyframes","font-face"]);function c1(e){return e?.type==="atrule"}function d1(e){let t=e.parent;for(;t;){if(c1(t)&&u1.has(t.name.toLowerCase()))return!0;t=t.parent}return!1}function f1(e){let t=e.parent;for(;t;){if(t.type==="rule")return!0;t=t.parent}return!1}function z0(e,t,n,r,i){let o=t.trim();if(!e||!o)return e;let a=n||`[data-composition-id="${nc(o)}"]`,s;try{s=Va.parse(e)}catch{return""}return s.walkRules(l=>{d1(l)||f1(l)||(l.selectors=l.selectors.map(c=>s1(c,a,o,r,i?.compoundAuthoredRoot,i?.scopeRootSelectors)))}),s.toResult({map:!1}).css}function lt(e){return JSON.stringify(e).replace(/</g,"\\u003c")}var j0=`!__hfBaseHyperframes
|
|
43
43
|
? __hfBaseHyperframes
|
|
44
44
|
: Object.assign({}, __hfBaseHyperframes, {
|
|
45
45
|
assetUrl: function(path) {
|
|
@@ -353,7 +353,7 @@ ${e.replace(/<\/(script)/gi,"<\\/$1")}
|
|
|
353
353
|
};
|
|
354
354
|
__hfFindRoot();
|
|
355
355
|
__hfRecordAnimations(__hfRun);
|
|
356
|
-
})();`}var Y0=(e,t)=>e&&Object.fromEntries(Object.entries(e).map(([n,r])=>[n,t(r)]));function X0(e,t){let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object")return null;let{imports:r,scopes:i}=n;return{imports:Y0(r,t),scopes:i&&Object.fromEntries(Object.entries(i).map(([o,a])=>[t(o),Y0(a,t)??{}]))}}var ic="text/hf-after-fonts",Q0=`${ic}+module`,Z0=`script[type="${ic}"], script[type="${Q0}"]`,eb="__hfAfterFontsClaimed",m1="data-hf-inlined-src";var tb=`[defer][src], [defer][${m1}]`;function $a(e){let t=e.getAttribute("type");return t===ic?null:t===Q0?"module":t}function p1(e){let t=e.getAttribute("type")??"",n=e.tagName.toLowerCase()==="link"?t.split(";")[0].trim():t;if(n!==""&&n.toLowerCase()!=="text/css")return;let r=(e.getAttribute("media")??"").trim().toLowerCase();return JSON.stringify([r==="all"?"":r,e.getAttribute("title")??""])}var SH=JSON.stringify(["",""]);function J0(e){return JSON.stringify([e.getAttribute("href"),(e.getAttribute("rel")??"").trim().toLowerCase(),p1(e)??e.getAttribute("type"),e.hasAttribute("disabled")])}function nb(e,t){let n=J0(t);return[...e.querySelectorAll("link[href]")].some(r=>!r.closest("noscript")&&J0(r)===n)}var $e="id",oc="data-hf-authored-id",Tr=/(url\(\s*)(["']?)#([^"')\s]+)\2(\s*\))/gi;function ib(e){return e==="href"||e.endsWith(":href")}function h1(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}function ac(e,t){return!e||!e.toLowerCase().includes("url(")?e:e.replace(Tr,(n,r,i,o,a)=>{let s=t.get(o);return s?`${r}${i}#${s}${i}${a}`:n})}function g1(e,t,n){if(ib(e)&&t.startsWith("#")){let i=n.get(t.slice(1));return i?`#${i}`:t}Tr.lastIndex=0;let r=Tr.test(t);return Tr.lastIndex=0,r?ac(t,n):null}function b1(e,t,n){if(e.name===pt||e.name===$e)return{kind:"skip"};let r=t&&e.value===t.after?t.before:e.value,i=g1(e.name,r,n);return i!==null?{kind:"managed",before:r,after:i}:t?{kind:"retain",alias:t}:{kind:"skip"}}function x1(e,t,n,r){let i=e.namespaceURI===void 0&&e.name==="xlink:href"&&r;return{name:e.name,localName:i?"href":e.localName,namespaceURI:i?"http://www.w3.org/1999/xlink":e.namespaceURI??null,before:t,after:n}}function y1(e,t){let n=new Map(Nn(e,pt,!1).map(o=>[o.name,o])),r=[...n.values()].filter(o=>o.name===$e),i=!!e.closest("svg");for(let o of e.attributes?Array.from(e.attributes):[]){let a=b1(o,n.get(o.name),t);if(a.kind!=="skip"){if(a.kind==="retain"){r.push(a.alias);continue}a.after!==o.value&&(o.namespaceURI?e.setAttributeNS(o.namespaceURI,o.name,a.after):e.setAttribute(o.name,a.after)),r.push(x1(o,a.before,a.after,i))}}r.length&&e.setAttribute(pt,JSON.stringify(r))}function rb(e,t,n){let r;for(Tr.lastIndex=0;r=Tr.exec(e);){let i=r[3];t.has(i)&&n.add(i)}}function S1(e,t,n){if(ib(e.name)&&e.value.startsWith("#")){let r=e.value.slice(1);t.has(r)&&n.add(r)}}function v1(e,t,n){let r=new Set;for(let i of e)for(let o of i.attributes?Array.from(i.attributes):[])!o.value||o.name===pt||(S1(o,n,r),o.value.toLowerCase().includes("url(")&&rb(o.value,n,r));for(let i of t)i.toLowerCase().includes("url(")&&rb(i,n,r);return r}function ob(e,t){return t.some(n=>n===e||n.contains(e))}function E1(e){let t=e.exclude??[],n=[...e.root.querySelectorAll("*")],r=t.length?n.filter(i=>!ob(i,t)):n;return[e.root,...r]}function A1(e){let t=e.exclude??[],n=[...e.root.querySelectorAll("svg [id], svg[id]")];return t.length?n.filter(r=>!ob(r,t)):n}function w1(e){let t=E1(e),n=new Set;if(!e.namespace)return{elements:t,renamable:n};let r=A1(e),i=new Set;for(let a of r){let s=a.getAttribute($e);s&&i.add(s)}if(i.size===0)return{elements:t,renamable:n};let o=v1(t,e.cssTexts??[],i);for(let a of r){let s=a.getAttribute($e);s&&o.has(s)&&n.add(a)}return{elements:t,renamable:n}}function ab(e){if(!e.closest("svg"))return null;let t=Nn(e,pt,!1).find(n=>n.name===$e);return t?e.getAttribute($e)===t.after?t.before:null:e.getAttribute(oc)}function _1(e){let t=new Map,n=new Set;for(let r of e.querySelectorAll("[id]")){let i=r.getAttribute($e);if(!i)continue;n.add(i);let o=t.get(i);o?o.push(r):t.set(i,[r]);let a=ab(r);if(a&&a!==i){let s=t.get(a);s?s.push(r):t.set(a,[r])}}return{elementsById:t,usedIds:n}}function C1(e,t,n){let r=`${h1(e)}--${t}`,i=r;for(let o=2;n.has(i);o+=1)i=`${r}-${o}`;return n.add(i),i}function T1(e,t,n){let r=t.find(a=>!n.has(a))??t[0],o=t.filter(a=>a!==r&&a.getAttribute($e)===e).map(a=>n.get(a));return new Set(o.filter(a=>a!==void 0))}function R1(e,t,n){let r=t.map(()=>new Map);for(let[i,o]of e.elementsById)if(!(o.length<2))for(let a of T1(i,o,n))r[a].set(i,C1(t[a].namespace,i,e.usedIds));return r}function k1(e,t,n){let r=new Map;for(let[i,o]of e.elementsById){let a=o[0],s=a.getAttribute($e);if(s!==i){r.set(i,s);continue}let l=n.get(a),c=l===void 0?void 0:t[l].get(i);c&&r.set(i,c)}return r}function M1(e){let t=new Set(e.map(r=>r.getAttribute($e))),n=new Map;for(let r of e){let i=ab(r),o=r.getAttribute($e);!i||!o||(t.add(i),n.set(i,o))}return{ids:t,renamed:n}}function N1(e,t){for(let n of e.elements){let r=n.getAttribute($e);if(r&&e.renamable.has(n)&&t.has(r)){n.hasAttribute(oc)||n.setAttribute(oc,r);let i=t.get(r),o=Nn(n,pt,!1);o.push({name:$e,localName:$e,namespaceURI:null,before:r,after:i}),n.setAttribute(pt,JSON.stringify(o)),n.setAttribute($e,i)}y1(n,t)}}function sb(e,t,n){if(t.length===0)return[];let r=_1(e),i=t.map(w1),o=i.flatMap(({renamable:d})=>[...d]);if(n)for(let d of i)for(let m of d.renamable)n.has(m)&&d.renamable.delete(m);let a=new Map;i.forEach(({renamable:d},m)=>{for(let f of d)a.set(f,m)});let s=R1(r,t,a),l=k1(r,s,a),c=i.map((d,m)=>{let f=M1(t[m].referenceTarget==="document"?[]:d.elements),p=[...l].filter(([b])=>!f.ids.has(b));return new Map([...p,...f.renamed,...s[m]])});c.forEach((d,m)=>{N1(i[m],d)});for(let d of o)n?.add(d);return c}function lb(e,t,n=[]){if(!e||t.size===0&&n.length===0||!e.includes("#")&&!e.includes("[")&&!e.toLowerCase().includes("url("))return e;let r;try{r=Va.parse(e)}catch{return e}let i=!1,o=new Set(n.filter(s=>s.name===$e).map(s=>s.before)),a=[...t].filter(([s])=>!o.has(s)).map(([s,l])=>({id:s,replacement:`:is(#${Ot(s)}, #${Ot(l)})`}));return r.walkRules(s=>{let l=s.selectors.map(c=>Lo(c,a,n));l.some((c,d)=>c!==s.selectors[d])&&(s.selectors=l,i=!0)}),r.walkDecls(s=>{let l=ac(s.value,t);l!==s.value&&(s.value=l,i=!0)}),r.walkAtRules(s=>{if(!s.params)return;let l=ac(s.params,t);l!==s.params&&(s.params=l,i=!0)}),i?r.toResult({map:!1}).css:e}var sc=5e3;window[eb]=!0;async function lc(){let e=document.fonts;if(!e)return;document.body?.offsetHeight;let t,n=await Promise.race([e.ready.then(()=>!1),new Promise(i=>t=setTimeout(i,sc,!0))]);if(clearTimeout(t),!n)return;let r=[...new Set(Array.from(e).filter(i=>i.status==="loading").map(i=>i.family))];console.warn(`[hyperframes] fonts still loading after ${sc} ms, composition scripts run without them: ${r.join(", ")}`),Ae({source:"hf-preview",type:"diagnostic",code:"runtime_font_wait_timeout",details:{loadingFamilies:r,timeoutMs:sc}})}function L1(e,t){let n=Object.getOwnPropertyDescriptor(e,"addEventListener"),r=e.addEventListener,i=(o,a,s)=>{if(!a)return;o==="DOMContentLoaded"||o==="load"&&e===window&&document.readyState==="complete"?t.push({target:e,type:o,listener:a}):r.call(e,o,a,s)};return e.addEventListener=i,()=>{e.addEventListener===i&&(n?Object.defineProperty(e,"addEventListener",n):delete e.addEventListener)}}function F1(e){if(!e.isConnected)return;let t=document.createElement("script");for(let{name:r,value:i}of Array.from(e.attributes))t.setAttribute(r,i);let n=$a(e);return n===null?t.removeAttribute("type"):t.setAttribute("type",n),t.async=e.hasAttribute("async"),t.text=e.textContent??"",e.replaceWith(t),t}var I1=50,D1=()=>!window.__HF_VIRTUAL_TIME__;function P1(){let e=globalThis.scheduler;return typeof e?.yield=="function"?e.yield():new Promise(t=>{let n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),t()},n.port2.postMessage(null)})}var O1=e=>new Promise(t=>{e.addEventListener("load",t),e.addEventListener("error",t)});function H1(){let e=document.createElement("script");e.type="module",e.async=!1,e.text='document.dispatchEvent(new Event("hf-after-fonts-modules"))';let t=new Promise(n=>document.addEventListener("hf-after-fonts-modules",n,{once:!0}));return document.body.appendChild(e),t.then(()=>e.remove())}async function qa(e,t){await lc();let n=s=>$a(s)==="module"||s.matches(tb),r=[],i=[document,window].map(s=>L1(s,r)),o=D1(),a=performance.now();for(let s of[...e.filter(l=>!n(l)),...e.filter(n)]){o&&performance.now()-a>I1&&(await P1(),a=performance.now());let l=F1(s);l?.hasAttribute("src")&&!l.async&&!l.noModule?await O1(l):$a(s)==="module"&&await H1()}for(let s of i)s();t?.();for(let{target:s,type:l,listener:c}of r){let d=new Event(l);try{typeof c=="function"?c.call(s,d):c.handleEvent(d)}catch(m){reportError(m)}}}var G1=["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 ub(e){let t=e.getAttribute("id")?.trim();for(let n of G1)e.removeAttribute(n);t&&(e.removeAttribute("id"),e.setAttribute("data-hf-authored-id",t)),e.setAttribute("data-hf-inner-root","true")}var B1=8e3,U1=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,W1=/\burl\(\s*(["']?)([^)"']+)\1\s*\)/g,V1=["src","href"];function $1(e){return!e||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/")}function hb(e,t){if(!t)return e;let n=e.trim();if($1(n)||!n.startsWith("../")&&n!=="..")return e;try{return new URL(n,t).href}catch{return e}}function gb(e,t){return!t||!e?e:e.replace(W1,(n,r,i)=>{let o=hb(i||"",t);return o===i?n:`url(${r||""}${o}${r||""})`})}function q1(e,t){for(let n of Array.from(e.querySelectorAll("[src], [href]")))for(let r of V1){let i=n.getAttribute(r);if(i==null)continue;let o=hb(i,t);o!==i&&n.setAttribute(r,o)}}function z1(e,t){for(let n of Array.from(e.querySelectorAll("[style]"))){let r=n.getAttribute("style");if(r==null)continue;let i=gb(r,t);i!==r&&n.setAttribute("style",i)}}function j1(e,t){for(let n of Array.from(e.querySelectorAll("style"))){let r=n.textContent||"",i=gb(r,t);i!==r&&(n.textContent=i)}}function bb(e,t){if(t){q1(e,t),z1(e,t),j1(e,t);for(let n of Array.from(e.querySelectorAll("template")))bb(n.content,t)}}function cb(e,t){return`${e}__hf${t}`}var K1=e=>new Promise(t=>{let n=!1,r=Date.now(),i=null,o=a=>{n||(n=!0,i!=null&&window.clearTimeout(i),t({status:a,elapsedMs:Math.max(0,Date.now()-r)}))};e.addEventListener("load",()=>o("load"),{once:!0}),e.addEventListener("error",()=>o("error"),{once:!0}),i=window.setTimeout(()=>o("timeout"),B1)});function dc(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function uc(e){for(let t of dg(e))t.remove()}function Y1(e){let t=document.importNode(e,!0);ub(t);let n=Hn(t.getAttribute("data-width")),r=Hn(t.getAttribute("data-height"));return t.style.width=n===null?"100%":`${n}px`,t.style.height=r===null?"100%":`${r}px`,t}function db(e,t){let n=e.trim();if(!n)return e;try{return U1.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 fb(e,t){try{let n=new URL(e),r=new URL(t);return n.search="",n.hash="",r.search="",r.hash="",n.href===r.href}catch{return!1}}function Yi(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 X1(e){let t=new Map;for(let n of e){let r=Yi(n).authoredCompositionId||"";r&&t.set(r,(t.get(r)||0)+1)}return mg(t,e),t}function xb(e){let t=Yi(e).authoredCompositionId;return t?!!document.querySelector(`template#${CSS.escape(t)}-template`):!1}function J1(e){return!!e.querySelector('[data-hf-inner-root="true"]')}function mb(e){return e.hasAttribute("data-composition-src")?!0:xb(e)?e.children.length===0||e.hasAttribute("data-hf-original-composition-id")?!0:J1(e):!1}function za(){return Array.from(document.querySelectorAll("[data-composition-src], [data-composition-id]")).filter(t=>t.hasAttribute("data-composition-src")?!0:xb(t))}function fc(){let e=window.__hfVariablesByComp;if(!e)return;let t=new Set(za().map(n=>Yi(n).runtimeCompositionId).filter(n=>!!n));for(let n of Object.keys(e))t.has(n)||delete e[n]}function yb(e,t){let n=X1(e),r=new Set(e.flatMap(a=>{let s=Yi(a),l=s.authoredCompositionId?[s.authoredCompositionId]:[];return(t.has(a)||!mb(a))&&s.runtimeCompositionId&&l.push(s.runtimeCompositionId),l})),i=new Map,o=new Map;for(let a of e){let{authoredCompositionId:s,runtimeCompositionId:l}=Yi(a),c=!t.has(a)&&mb(a);if(!s){o.set(a,{authoredCompositionId:null,runtimeCompositionId:l});continue}let d=(n.get(s)||0)>1,m=l||s;if(c){let f=d?(i.get(s)||0)+1:0;if(d){for(;r.has(cb(s,f));)f+=1;i.set(s,f)}m=d?cb(s,f):s,r.add(m),d?a.setAttribute("data-hf-original-composition-id",s):a.removeAttribute("data-hf-original-composition-id"),a.setAttribute("data-composition-id",m)}o.set(a,{authoredCompositionId:s,runtimeCompositionId:m})}return fc(),o}async function Sb(e){let t=fg({contentNode:e.sourceNode,head:e.head,hasTemplate:e.hasTemplate,compositionId:e.authoredCompositionId}),n=_e(t.innerRoot)?t.innerRoot:null,r=n??e.sourceNode,i=t.authoredCompositionId,o=t.scriptCompositionId,a=e.runtimeCompositionId||null,s=t.authoredRootId,l=a?`[data-composition-id="${CSS.escape(a)}"]`:void 0;for(let x of t.linkSources){let y=(x.getAttribute("href")||"").trim();if(!y)continue;let v=e.compositionUrl?new URL(y,e.compositionUrl).href:y;if(e.compositionUrl&&fb(v,e.compositionUrl))continue;let A=x.cloneNode(!0);$f(A)&&(A.href=v,!nb(document.head,A)&&(document.head.appendChild(A),e.injectedLinks.push(A)))}let c=[];(x=>{for(let y of x){let v=y.cloneNode(!0);if(!Vf(v))continue;i&&(v.textContent=z0(v.textContent||"",i,l,s,{scopeRootSelectors:!0})),document.head.appendChild(v),e.injectedStyles.push(v);let A=v.textContent||"";c.push({element:v,authored:A,applied:A})}})(t.styleSources);let m=x=>{let y=x.getAttribute("type")?.trim()??"",v=x.getAttribute("src")?.trim()??"";if(v){let C=db(v,e.compositionUrl);return e.compositionUrl&&fb(C,e.compositionUrl)?null:{kind:"external",src:C,type:y}}let A=x.textContent?.trim()??"";return A?{kind:"inline",content:A,type:y,scopeCompositionId:o}:null},f=t.scriptSources.map(m).filter(x=>x!==null);if(n){let x=n.getAttribute("data-width"),y=n.getAttribute("data-height"),v=e.parseDimensionPx(x),A=e.parseDimensionPx(y);x&&e.host.setAttribute("data-width",x),y&&e.host.setAttribute("data-height",y),v&&_e(e.host)&&(e.host.style.width=v),A&&_e(e.host)&&(e.host.style.height=A),n.hasAttribute("data-timeline-locked")&&e.host.setAttribute("data-timeline-locked","");let C=Y1(n);!e.authoredCompositionId&&i&&C.setAttribute("data-composition-id",i),uc(C),e.host.appendChild(C)}else if(e.hasTemplate){let x=document.importNode(r,!0);uc(x),e.host.appendChild(x)}else e.host.innerHTML=e.fallbackBodyInnerHtml,uc(e.host);for(let x of t.inertScriptsOutsideRoot)e.host.appendChild(document.importNode(x,!0));a&&Z1(e,r,a);let p=Array.from(e.host.childNodes),b=()=>e.host.isConnected&&(p.length>0||e.host.childNodes.length===0)&&p.every(x=>x.parentNode===e.host);return{host:e.host,namespace:a||i||"",styles:c,isCurrent:b,runScripts:async()=>{if(f.length>0&&await lc(),!!b())for(let x of f){let y=document.createElement("script");if(x.type&&(y.type=x.type),y.async=!1,x.kind==="external")y.src=x.src;else if(x.type.toLowerCase()==="importmap"){let v=X0(x.content,A=>db(A,e.compositionUrl));y.textContent=v?JSON.stringify(v):x.content}else if(x.type.toLowerCase()==="module"){let v=x.scopeCompositionId?K0(a||x.scopeCompositionId,e.compositionUrl?.href):"";y.textContent=v+x.content}else x.scopeCompositionId?y.textContent=rc(x.content,x.scopeCompositionId,"[HyperFrames] composition script error:",l,a||x.scopeCompositionId,s,e.compositionUrl?.href):y.textContent=`(function(){${x.content}})();`;if(document.body.appendChild(y),e.injectedScripts.push(y),x.kind==="external"){let v=await K1(y);v.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.authoredCompositionId,runtimeCompositionId:e.runtimeCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:x.src,loadStatus:v.status,elapsedMs:v.elapsedMs}})}}}}}async function pb(e,t){let n=za();if(fc(),n.length===0)return[];let r=yb(n,t),i=n.filter(a=>{if(t.has(a)||a.hasAttribute("data-composition-src")||a.children.length>0)return!1;let s=r.get(a)?.authoredCompositionId;return s?!!document.querySelector(`template#${CSS.escape(s)}-template`):!1}),o=[];for(let a of i){let s=r.get(a),l=s?.authoredCompositionId;if(!l)continue;let c=document.querySelector(`template#${CSS.escape(l)}-template`);dc(a);let d=await Sb({host:a,authoredCompositionId:l,runtimeCompositionId:s?.runtimeCompositionId||l,hostCompositionSrc:`template#${l}-template`,sourceNode:c.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});o.push(d)}return o}async function Q1(e){let t=za();if(fc(),t.length===0)return[];let n=yb(t,new Set),r=t.filter(o=>o.hasAttribute("data-composition-src"));return(await Promise.all(r.map(async o=>{let a=o.getAttribute("data-composition-src");if(!a)return null;let s=n.get(o),l=s?.authoredCompositionId||null,c=s?.runtimeCompositionId||l||null,d=null;try{d=new URL(a,document.baseURI)}catch{d=null}dc(o);let m=p=>{e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:l,runtimeCompositionId:c,hostCompositionSrc:a,errorMessage:p instanceof Error?p.message:"unknown_error"}}),dc(o)},f=async p=>{let b=await Sb(p),x=b.runScripts;return b.runScripts=async()=>{try{await x()}catch(y){m(y)}},b};try{let p=l!=null?document.querySelector(`template#${CSS.escape(l)}-template`):null;if(p)return await f({host:o,authoredCompositionId:l,runtimeCompositionId:c,hostCompositionSrc:a,sourceNode:p.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:d,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});let b=await fetch(a);if(!b.ok)throw new Error(`HTTP ${b.status}`);let x=await b.text(),v=new DOMParser().parseFromString(x,"text/html");bb(v,d);let A=(l?v.querySelector(`template#${CSS.escape(l)}-template`):null)??v.querySelector("template"),C=A?A.content:v.body;return await f({host:o,authoredCompositionId:l,runtimeCompositionId:c,hostCompositionSrc:a,sourceNode:C,hasTemplate:!!A,fallbackBodyInnerHtml:v.body.innerHTML,compositionUrl:d,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,head:v.head,declaredVariableDefaults:fi(v.documentElement),variableDeclarer:v.documentElement,onDiagnostic:e.onDiagnostic})}catch(p){return m(p),null}}))).filter(o=>o!==null)}async function vb(e){let t=new Set,n={host:document.documentElement,namespace:"",referenceTarget:"document",styles:[...document.querySelectorAll("style")].map(m=>({element:m,authored:m.textContent??"",applied:m.textContent??""}))},r=await Q1(e),i=await pb(e,new Set(r.map(({host:m})=>m))),o=[...r,...i];cc([...o,n],t),await Promise.all(r.map(m=>m.runScripts()));let a=i.filter(m=>{if(m.isCurrent())return!0;for(let f of m.styles)f.element.remove();return window.__hfVariablesByComp&&delete window.__hfVariablesByComp[m.namespace],!1}),s=[...r.filter(m=>m.host.isConnected),...a],l=await pb(e,new Set(s.map(({host:m})=>m)));l.length&&cc([...s,...l,n],t);let c=new Map([...a,...l].map(m=>[m.host,m]));for(let m of za()){let f=c.get(m);f&&await f.runScripts()}let d=[...s,...l].filter(m=>m.host.isConnected);cc([...d,n],t)}function cc(e,t){for(let{styles:r}of e)for(let i of r){let o=i.element.textContent??"";o!==i.applied&&(i.authored=o,i.applied=o)}sb(document,e.map(({host:r,namespace:i,styles:o,referenceTarget:a})=>({root:r,namespace:i,referenceTarget:a,exclude:e.filter(s=>s.host!==r&&r.contains(s.host)).map(s=>s.host),cssTexts:o.map(s=>s.authored)})),t).forEach((r,i)=>{let o=Nn(e[i].host,pt);if(!(r.size===0&&o.length===0))for(let a of e[i].styles){let s=lb(a.authored,r,o);s!==a.applied&&(a.element.textContent=s),a.applied=s}}),Yn()}function Z1(e,t,n){let i={...e.declaredVariableDefaults??(Re(t)?fi(t):{}),...Jm(e.host)};xl(e.variableDeclarer??(Re(t)?t:null),i,n),Ym(e.host),Object.keys(i).length>0?(window.__hfVariablesByComp||(window.__hfVariablesByComp={}),window.__hfVariablesByComp[n]=i,yl(e.host,{...Km(e.host,i,window),...ea()})):window.__hfVariablesByComp&&delete window.__hfVariablesByComp[n]}function eT(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function tT(e){if(!Array.isArray(e))throw new Error("expected a JSON array");if(!e.every(eT))throw new Error("every array entry must be an object");return e}function nT(e){let n=e.vars.data?.captionState;return n==="dim"||n==="active"?n:void 0}function rT(e){return _e(e)?e.dataset.captionWrapper!=="true"?e:e.querySelector(":scope > span")??null:null}function iT(){let e=[],t=document.querySelectorAll(".caption-group");for(let n of t)for(let r of n.children){if(!_e(r))continue;let i=r.dataset.captionWrapper==="true"?r.querySelector(":scope > span"):r.tagName==="SPAN"?r:null;i&&e.push(i)}return e}function oT(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}var pc=()=>window.gsap,Ab=()=>fetch("caption-overrides.json").then(e=>e.ok?e.json():null),wb=e=>e===null?[]:tT(e);function _b(e){let t=e instanceof Error?e.message:String(e);console.error(`[HyperFrames] Invalid caption-overrides.json: ${t}`)}function Cb(){return pc()?Ab().then(wb).catch(e=>(_b(e),[])):Promise.resolve([])}function hc(e,t){return!pc()||document.querySelectorAll(".caption-group").length===0?Promise.resolve():Ab().then(n=>gc(wb(n),e,t)).catch(_b)}function aT(e,t){return(e.wordId?rT(document.getElementById(e.wordId)):null)??(e.wordIndex!==void 0?t[e.wordIndex]??null:null)}function Eb(e,t){return Object.fromEntries(t.filter(n=>e[n]!==void 0).map(n=>[n,e[n]]))}function mc(e,t){let n=e.style.color;e.style.color=t;let r=getComputedStyle(e).color;return e.style.color=n,r}function sT(e,t){let n=t[0]?.vars.startAt;return mc(e,n?.color===void 0?"":String(n.color))}function lT(e,t,n,r){let i=nT(e);if(i)return i;let o=String(e.vars.color);return/var\(|currentcolor/i.test(o)?mc(t,o)===n?"dim":"active":(r.has(o)||r.set(o,mc(t,o)),r.get(o)===n?"dim":"active")}function uT(e,t,n){if(e.dimColor)return e.dimColor;if(!(t.length===0||t.some(r=>r.vars.runBackwards)))return n}function cT(e,t,n,r){let i=e.getTweensOf(t).filter(s=>s.vars.color!==void 0).sort((s,l)=>s.startTime()-l.startTime()),o=sT(t,i);for(let s of i){let c=lT(s,t,o,r)==="dim"?n.dimColor:n.activeColor;c&&(s.vars.color=c),s.vars.runBackwards||s.invalidate?.()}let a=uT(n,i,o);a&&e.set(t,{color:a})}function dT(e,t,n,r){let i=Eb(n,["x","y","scale","rotation"]),o=Eb(n,["opacity","fontWeight","fontFamily"]);if(n.fontSize!==void 0&&(o.fontSize=`${n.fontSize}px`),(n.activeColor||n.dimColor)&&cT(e,t,n,r),Object.keys(o).length>0&&e.set(t,o),Object.keys(i).length>0){let a=oT(t);e.set(a,i)}}function gc(e,t,n=()=>{}){let r=pc();if(!r||e.length===0)return;n();let i=iT(),o=new Map;for(let a of e){let s=aT(a,i);!s||t&&!t.some(l=>l.contains(s))||dT(r,s,a,o)}}var xc="data-hf-edit-base-x",yc="data-hf-edit-base-y",pn="data-hf-edit-original-translate",ja=e=>{let t=parseFloat(e??"");return Number.isFinite(t)?t:0},fT=e=>{let t=[],n=0,r="";for(let i of e.trim())i==="("&&(n+=1),i===")"&&(n=Math.max(0,n-1)),/\s/.test(i)&&n===0?(r&&t.push(r),r=""):r+=i;return r&&t.push(r),t},Tb=/^-?(?:\d+(?:\.\d+)?|\.\d+)px$/,bc=(e,t)=>Tb.test(e)&&Tb.test(t)?`${parseFloat(e)+parseFloat(t)}px`:`calc(${e} + ${t})`,mT=(e,t,n)=>{if(!e||e==="none")return`${t} ${n}`;let[r,i,o]=fT(e);if(r===void 0)return`${t} ${n}`;if(i===void 0)return`${bc(r,t)} ${n}`;let a=o===void 0?"":` ${o}`;return`${bc(r,t)} ${bc(i,n)}${a}`},pT=e=>{try{e.ownerDocument.defaultView?.gsap?.getProperty?.(e,"x")}catch{}},hT=e=>{let t=e.style.getPropertyValue("translate").trim();if(t)return t==="none"?"":t;try{let n=e.ownerDocument.defaultView,r=n?n.getComputedStyle(e).getPropertyValue("translate").trim():"";return r==="none"?"":r}catch{return""}},Ka=new WeakMap;function Lb(e){Ka.delete(e)}function gT(e,t){let n=Ka.get(e);if(!t?.force&&n!==void 0&&e.style.getPropertyValue("translate")!==n){at("position_edit_fold_skipped",{hfId:e.getAttribute("data-hf-id")});return}let r=ja(e.getAttribute("data-x"))-ja(e.getAttribute(xc)),i=ja(e.getAttribute("data-y"))-ja(e.getAttribute(yc));e.hasAttribute(pn)||e.setAttribute(pn,hT(e)),n===void 0&&pT(e);let o=e.getAttribute(pn)??"",a=mT(o,`${r}px`,`${i}px`);e.style.setProperty("translate",a),Ka.set(e,e.style.getPropertyValue("translate"))}function Xi(e,t){let n=e.querySelectorAll(`[${pn}]:not([${xc}]):not([${yc}])`);for(let o=0;o<n.length;o++){let a=n[o];if(a===void 0||!Jn(a))continue;let s=a.getAttribute(pn)??"";s===""?a.style.removeProperty("translate"):a.style.setProperty("translate",s),a.removeAttribute(pn),Ka.delete(a)}let r=e.querySelectorAll(`[${xc}], [${yc}]`),i=0;for(let o=0;o<r.length;o++){let a=r[o];a===void 0||!Jn(a)||(gT(a,t),i+=1)}return i}var Rb="__hfPositionEditsSeekReapplyWrapped",kb=new WeakSet,Mb=new WeakMap,Nb=new WeakMap;function Fb(e){let t=e,n=()=>{try{Xi(t.document)}catch{}},r=m=>typeof m=="function"&&(kb.has(m)||!!m[Rb]),i=m=>{kb.add(m);try{Object.defineProperty(m,Rb,{value:!0})}catch{}},o=m=>{if(typeof m!="function"||r(m))return m;let f=function(...p){let b=m.apply(this,p);return n(),b};return i(f),f},a=(m,f)=>{let p=Mb.get(m);if(p?.has(f))return!0;let b=Object.getOwnPropertyDescriptor(m,f);if(b?.configurable===!1){let v=m[f];return typeof v=="function"&&(m[f]=o(v),n()),!1}let x=m[f],y=b?.set;return Object.defineProperty(m,f,{configurable:!0,enumerable:b?.enumerable??!0,get:()=>x,set:v=>{x=o(v),y?.call(m,v)}}),x=o(x),p??(p=new Set),p.add(f),Mb.set(m,p),n(),!0},s=(m,f)=>{let p=Nb.get(t),b=Object.getOwnPropertyDescriptor(t,m);if(!p?.has(m)){if(b?.configurable===!1){let v=t[m];return v?a(v,f):!1}let y=t[m];Object.defineProperty(t,m,{configurable:!0,enumerable:b?.enumerable??!0,get:()=>y,set:v=>{y=v,y&&a(y,f)}}),p??(p=new Set),p.add(m),Nb.set(t,p)}let x=t[m];return x?a(x,f):!1},l=()=>{let m=s("__hf","seek"),f=s("__player","renderSeek");return m&&f};if(l())return;let c=120,d=t.setInterval(()=>{if(l()){t.clearInterval(d);return}c-=1,c<=0&&t.clearInterval(d)},50)}function Ya(e){let t=window,r=e.closest("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()??"",i=r?t.__hfVariablesByComp?.[r]:void 0;if(i)return i;let o=t.__hyperframes?.getVariables?.();return o&&typeof o=="object"?o:t.__hfVariables??{}}function Xa(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Sc(e){let t=e.replace(/[\u0000-\u0020]/g,""),n=/^([a-z][a-z0-9+.-]*):/i.exec(t);if(!n)return!0;let r=n[1]?.toLowerCase();return r?r==="https"||r==="http"||r==="blob"?!0:r==="data"?/^data:image\//i.test(t):!1:!1}var Ib=new Set(["img","video","audio","source"]);function bT(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 xT(e){return e.replace(/[;{}<>\r\n]/g,"")}function yT(e){if(Xa(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 vc(e,t){let n=e.closest("[data-composition-id]"),r=t.get(n);if(r)return r;let i=Ya(e);return t.set(n,i),i}function ST(e,t){if(e.childElementCount===0){e.textContent=t;return}let n=!1;for(let r of Array.from(e.childNodes))r.nodeType===Node.TEXT_NODE&&(r.nodeValue=n?"":t,n=!0);n||e.insertBefore(e.ownerDocument.createTextNode(t),e.firstChild)}function vT(e){return e.querySelector("[data-hf-root]")??e.getElementById("stage")??e.body?.firstElementChild??e.body}function ET(e,t){for(let n of new Set(e)){let r=vc(n,t);for(let[i,o]of Object.entries(r)){let a=yT(o);a!==null&&_e(n)&&n.style.setProperty(`--${i}`,xT(a))}}}function Db(e,t,n=!0){let r=e.getAttribute("data-var-src")?.trim();if(!r)return null;if(!Ib.has(e.tagName.toLowerCase()))return n&&console.warn(`[hyperframes] Ignoring data-var-src on <${e.tagName.toLowerCase()}>: variable-bound src is only allowed on ${Array.from(Ib).join("/")}.`),null;let i=bT(vc(e,t)[r]);return i===null?null:Sc(i)?i:(n&&console.warn(`[hyperframes] Ignoring data-var-src="${r}": unsafe URL protocol.`),null)}function Pb(e){return Db(e,new Map,!1)??bi(e)}function Ja(e,t){let n=new Map,r=o=>t?[...t.matches(o)?[t]:[],...t.querySelectorAll(o)]:Array.from(e.querySelectorAll(o)),i=t?null:vT(e);ET([...i?[i]:[],...r("[data-composition-id]")],n);for(let o of r("[data-var-src]")){let a=Db(o,n);a!==null&&bi(o)!==a&&o.setAttribute("src",a)}for(let o of r("[data-var-text]")){let a=o.getAttribute("data-var-text")?.trim();if(!a)continue;let s=vc(o,n)[a];Xa(s)&&ST(o,String(s))}}var zt=new Map,AT="data-hf-color-grading-canvas",wT="__hf_color_grading_canvas__";function Kb(){if(typeof MutationObserver>"u"||typeof document>"u")return;let e=document.documentElement;if(!e)return;let t=r=>{_e(r)&&(r.hasAttribute(On)||r.setAttribute(On,r.style.opacity))},n=r=>{if(Re(r)){r.matches("video, img")&&t(r);for(let i of r.querySelectorAll("video, img"))t(i)}};n(e),new MutationObserver(r=>{for(let i of r)for(let o of i.addedNodes)n(o)}).observe(e,{childList:!0,subtree:!0})}var _T=16,CT=4,kr={enabled:!1,position:.5,softness:0,lineWidth:2},Ec=["#000000","#ffffff"],TT=["#1a1a1a","#f5f5dc"],no=3,RT=no-1,kT=5,Ac=`${kt}.0`,Ob=`${kt-1}.0`,MT=`${no}.0`,NT=`${(RT+.5)/no}`;function Qa(e){let t=e.getAttribute(Ai);return t==null?null:Bh(t,Ya(e))}var LT=["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(`
|
|
356
|
+
})();`}var Y0=(e,t)=>e&&Object.fromEntries(Object.entries(e).map(([n,r])=>[n,t(r)]));function X0(e,t){let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object")return null;let{imports:r,scopes:i}=n;return{imports:Y0(r,t),scopes:i&&Object.fromEntries(Object.entries(i).map(([o,a])=>[t(o),Y0(a,t)??{}]))}}var ic="text/hf-after-fonts",Q0=`${ic}+module`,Z0=`script[type="${ic}"], script[type="${Q0}"]`,eb="__hfAfterFontsClaimed",m1="data-hf-inlined-src";var tb=`[defer][src], [defer][${m1}]`;function $a(e){let t=e.getAttribute("type");return t===ic?null:t===Q0?"module":t}function p1(e){let t=e.getAttribute("type")??"",n=e.tagName.toLowerCase()==="link"?t.split(";")[0].trim():t;if(n!==""&&n.toLowerCase()!=="text/css")return;let r=(e.getAttribute("media")??"").trim().toLowerCase();return JSON.stringify([r==="all"?"":r,e.getAttribute("title")??""])}var vH=JSON.stringify(["",""]);function J0(e){return JSON.stringify([e.getAttribute("href"),(e.getAttribute("rel")??"").trim().toLowerCase(),p1(e)??e.getAttribute("type"),e.hasAttribute("disabled")])}function nb(e,t){let n=J0(t);return[...e.querySelectorAll("link[href]")].some(r=>!r.closest("noscript")&&J0(r)===n)}var $e="id",oc="data-hf-authored-id",Tr=/(url\(\s*)(["']?)#([^"')\s]+)\2(\s*\))/gi;function ib(e){return e==="href"||e.endsWith(":href")}function h1(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}function ac(e,t){return!e||!e.toLowerCase().includes("url(")?e:e.replace(Tr,(n,r,i,o,a)=>{let s=t.get(o);return s?`${r}${i}#${s}${i}${a}`:n})}function g1(e,t,n){if(ib(e)&&t.startsWith("#")){let i=n.get(t.slice(1));return i?`#${i}`:t}Tr.lastIndex=0;let r=Tr.test(t);return Tr.lastIndex=0,r?ac(t,n):null}function b1(e,t,n){if(e.name===pt||e.name===$e)return{kind:"skip"};let r=t&&e.value===t.after?t.before:e.value,i=g1(e.name,r,n);return i!==null?{kind:"managed",before:r,after:i}:t?{kind:"retain",alias:t}:{kind:"skip"}}function x1(e,t,n,r){let i=e.namespaceURI===void 0&&e.name==="xlink:href"&&r;return{name:e.name,localName:i?"href":e.localName,namespaceURI:i?"http://www.w3.org/1999/xlink":e.namespaceURI??null,before:t,after:n}}function y1(e,t){let n=new Map(Nn(e,pt,!1).map(o=>[o.name,o])),r=[...n.values()].filter(o=>o.name===$e),i=!!e.closest("svg");for(let o of e.attributes?Array.from(e.attributes):[]){let a=b1(o,n.get(o.name),t);if(a.kind!=="skip"){if(a.kind==="retain"){r.push(a.alias);continue}a.after!==o.value&&(o.namespaceURI?e.setAttributeNS(o.namespaceURI,o.name,a.after):e.setAttribute(o.name,a.after)),r.push(x1(o,a.before,a.after,i))}}r.length&&e.setAttribute(pt,JSON.stringify(r))}function rb(e,t,n){let r;for(Tr.lastIndex=0;r=Tr.exec(e);){let i=r[3];t.has(i)&&n.add(i)}}function S1(e,t,n){if(ib(e.name)&&e.value.startsWith("#")){let r=e.value.slice(1);t.has(r)&&n.add(r)}}function v1(e,t,n){let r=new Set;for(let i of e)for(let o of i.attributes?Array.from(i.attributes):[])!o.value||o.name===pt||(S1(o,n,r),o.value.toLowerCase().includes("url(")&&rb(o.value,n,r));for(let i of t)i.toLowerCase().includes("url(")&&rb(i,n,r);return r}function ob(e,t){return t.some(n=>n===e||n.contains(e))}function E1(e){let t=e.exclude??[],n=[...e.root.querySelectorAll("*")],r=t.length?n.filter(i=>!ob(i,t)):n;return[e.root,...r]}function A1(e){let t=e.exclude??[],n=[...e.root.querySelectorAll("svg [id], svg[id]")];return t.length?n.filter(r=>!ob(r,t)):n}function w1(e){let t=E1(e),n=new Set;if(!e.namespace)return{elements:t,renamable:n};let r=A1(e),i=new Set;for(let a of r){let s=a.getAttribute($e);s&&i.add(s)}if(i.size===0)return{elements:t,renamable:n};let o=v1(t,e.cssTexts??[],i);for(let a of r){let s=a.getAttribute($e);s&&o.has(s)&&n.add(a)}return{elements:t,renamable:n}}function ab(e){if(!e.closest("svg"))return null;let t=Nn(e,pt,!1).find(n=>n.name===$e);return t?e.getAttribute($e)===t.after?t.before:null:e.getAttribute(oc)}function _1(e){let t=new Map,n=new Set;for(let r of e.querySelectorAll("[id]")){let i=r.getAttribute($e);if(!i)continue;n.add(i);let o=t.get(i);o?o.push(r):t.set(i,[r]);let a=ab(r);if(a&&a!==i){let s=t.get(a);s?s.push(r):t.set(a,[r])}}return{elementsById:t,usedIds:n}}function C1(e,t,n){let r=`${h1(e)}--${t}`,i=r;for(let o=2;n.has(i);o+=1)i=`${r}-${o}`;return n.add(i),i}function T1(e,t,n){let r=t.find(a=>!n.has(a))??t[0],o=t.filter(a=>a!==r&&a.getAttribute($e)===e).map(a=>n.get(a));return new Set(o.filter(a=>a!==void 0))}function R1(e,t,n){let r=t.map(()=>new Map);for(let[i,o]of e.elementsById)if(!(o.length<2))for(let a of T1(i,o,n))r[a].set(i,C1(t[a].namespace,i,e.usedIds));return r}function k1(e,t,n){let r=new Map;for(let[i,o]of e.elementsById){let a=o[0],s=a.getAttribute($e);if(s!==i){r.set(i,s);continue}let l=n.get(a),c=l===void 0?void 0:t[l].get(i);c&&r.set(i,c)}return r}function M1(e){let t=new Set(e.map(r=>r.getAttribute($e))),n=new Map;for(let r of e){let i=ab(r),o=r.getAttribute($e);!i||!o||(t.add(i),n.set(i,o))}return{ids:t,renamed:n}}function N1(e,t){for(let n of e.elements){let r=n.getAttribute($e);if(r&&e.renamable.has(n)&&t.has(r)){n.hasAttribute(oc)||n.setAttribute(oc,r);let i=t.get(r),o=Nn(n,pt,!1);o.push({name:$e,localName:$e,namespaceURI:null,before:r,after:i}),n.setAttribute(pt,JSON.stringify(o)),n.setAttribute($e,i)}y1(n,t)}}function sb(e,t,n){if(t.length===0)return[];let r=_1(e),i=t.map(w1),o=i.flatMap(({renamable:d})=>[...d]);if(n)for(let d of i)for(let m of d.renamable)n.has(m)&&d.renamable.delete(m);let a=new Map;i.forEach(({renamable:d},m)=>{for(let f of d)a.set(f,m)});let s=R1(r,t,a),l=k1(r,s,a),c=i.map((d,m)=>{let f=M1(t[m].referenceTarget==="document"?[]:d.elements),p=[...l].filter(([b])=>!f.ids.has(b));return new Map([...p,...f.renamed,...s[m]])});c.forEach((d,m)=>{N1(i[m],d)});for(let d of o)n?.add(d);return c}function lb(e,t,n=[]){if(!e||t.size===0&&n.length===0||!e.includes("#")&&!e.includes("[")&&!e.toLowerCase().includes("url("))return e;let r;try{r=Va.parse(e)}catch{return e}let i=!1,o=new Set(n.filter(s=>s.name===$e).map(s=>s.before)),a=[...t].filter(([s])=>!o.has(s)).map(([s,l])=>({id:s,replacement:`:is(#${Ot(s)}, #${Ot(l)})`}));return r.walkRules(s=>{let l=s.selectors.map(c=>Lo(c,a,n));l.some((c,d)=>c!==s.selectors[d])&&(s.selectors=l,i=!0)}),r.walkDecls(s=>{let l=ac(s.value,t);l!==s.value&&(s.value=l,i=!0)}),r.walkAtRules(s=>{if(!s.params)return;let l=ac(s.params,t);l!==s.params&&(s.params=l,i=!0)}),i?r.toResult({map:!1}).css:e}var sc=5e3;window[eb]=!0;async function lc(){let e=document.fonts;if(!e)return;document.body?.offsetHeight;let t,n=await Promise.race([e.ready.then(()=>!1),new Promise(i=>t=setTimeout(i,sc,!0))]);if(clearTimeout(t),!n)return;let r=[...new Set(Array.from(e).filter(i=>i.status==="loading").map(i=>i.family))];console.warn(`[hyperframes] fonts still loading after ${sc} ms, composition scripts run without them: ${r.join(", ")}`),Ae({source:"hf-preview",type:"diagnostic",code:"runtime_font_wait_timeout",details:{loadingFamilies:r,timeoutMs:sc}})}function L1(e,t){let n=Object.getOwnPropertyDescriptor(e,"addEventListener"),r=e.addEventListener,i=(o,a,s)=>{if(!a)return;o==="DOMContentLoaded"||o==="load"&&e===window&&document.readyState==="complete"?t.push({target:e,type:o,listener:a}):r.call(e,o,a,s)};return e.addEventListener=i,()=>{e.addEventListener===i&&(n?Object.defineProperty(e,"addEventListener",n):delete e.addEventListener)}}function F1(e){if(!e.isConnected)return;let t=document.createElement("script");for(let{name:r,value:i}of Array.from(e.attributes))t.setAttribute(r,i);let n=$a(e);return n===null?t.removeAttribute("type"):t.setAttribute("type",n),t.async=e.hasAttribute("async"),t.text=e.textContent??"",e.replaceWith(t),t}var I1=50,D1=()=>!window.__HF_VIRTUAL_TIME__;function P1(){let e=globalThis.scheduler;return typeof e?.yield=="function"?e.yield():new Promise(t=>{let n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),t()},n.port2.postMessage(null)})}var O1=e=>new Promise(t=>{e.addEventListener("load",t),e.addEventListener("error",t)});function H1(){let e=document.createElement("script");e.type="module",e.async=!1,e.text='document.dispatchEvent(new Event("hf-after-fonts-modules"))';let t=new Promise(n=>document.addEventListener("hf-after-fonts-modules",n,{once:!0}));return document.body.appendChild(e),t.then(()=>e.remove())}async function qa(e,t){await lc();let n=s=>$a(s)==="module"||s.matches(tb),r=[],i=[document,window].map(s=>L1(s,r)),o=D1(),a=performance.now();for(let s of[...e.filter(l=>!n(l)),...e.filter(n)]){o&&performance.now()-a>I1&&(await P1(),a=performance.now());let l=F1(s);l?.hasAttribute("src")&&!l.async&&!l.noModule?await O1(l):$a(s)==="module"&&await H1()}for(let s of i)s();t?.();for(let{target:s,type:l,listener:c}of r){let d=new Event(l);try{typeof c=="function"?c.call(s,d):c.handleEvent(d)}catch(m){reportError(m)}}}var G1=["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 ub(e){let t=e.getAttribute("id")?.trim();for(let n of G1)e.removeAttribute(n);t&&(e.removeAttribute("id"),e.setAttribute("data-hf-authored-id",t)),e.setAttribute("data-hf-inner-root","true")}var B1=8e3,U1=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,W1=/\burl\(\s*(["']?)([^)"']+)\1\s*\)/g,V1=["src","href"];function $1(e){return!e||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/")}function hb(e,t){if(!t)return e;let n=e.trim();if($1(n)||!n.startsWith("../")&&n!=="..")return e;try{return new URL(n,t).href}catch{return e}}function gb(e,t){return!t||!e?e:e.replace(W1,(n,r,i)=>{let o=hb(i||"",t);return o===i?n:`url(${r||""}${o}${r||""})`})}function q1(e,t){for(let n of Array.from(e.querySelectorAll("[src], [href]")))for(let r of V1){let i=n.getAttribute(r);if(i==null)continue;let o=hb(i,t);o!==i&&n.setAttribute(r,o)}}function z1(e,t){for(let n of Array.from(e.querySelectorAll("[style]"))){let r=n.getAttribute("style");if(r==null)continue;let i=gb(r,t);i!==r&&n.setAttribute("style",i)}}function j1(e,t){for(let n of Array.from(e.querySelectorAll("style"))){let r=n.textContent||"",i=gb(r,t);i!==r&&(n.textContent=i)}}function bb(e,t){if(t){q1(e,t),z1(e,t),j1(e,t);for(let n of Array.from(e.querySelectorAll("template")))bb(n.content,t)}}function cb(e,t){return`${e}__hf${t}`}var K1=e=>new Promise(t=>{let n=!1,r=Date.now(),i=null,o=a=>{n||(n=!0,i!=null&&window.clearTimeout(i),t({status:a,elapsedMs:Math.max(0,Date.now()-r)}))};e.addEventListener("load",()=>o("load"),{once:!0}),e.addEventListener("error",()=>o("error"),{once:!0}),i=window.setTimeout(()=>o("timeout"),B1)});function dc(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function uc(e){for(let t of dg(e))t.remove()}function Y1(e){let t=document.importNode(e,!0);ub(t);let n=Hn(t.getAttribute("data-width")),r=Hn(t.getAttribute("data-height"));return t.style.width=n===null?"100%":`${n}px`,t.style.height=r===null?"100%":`${r}px`,t}function db(e,t){let n=e.trim();if(!n)return e;try{return U1.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 fb(e,t){try{let n=new URL(e),r=new URL(t);return n.search="",n.hash="",r.search="",r.hash="",n.href===r.href}catch{return!1}}function Yi(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 X1(e){let t=new Map;for(let n of e){let r=Yi(n).authoredCompositionId||"";r&&t.set(r,(t.get(r)||0)+1)}return mg(t,e),t}function xb(e){let t=Yi(e).authoredCompositionId;return t?!!document.querySelector(`template#${CSS.escape(t)}-template`):!1}function J1(e){return!!e.querySelector('[data-hf-inner-root="true"]')}function mb(e){return e.hasAttribute("data-composition-src")?!0:xb(e)?e.children.length===0||e.hasAttribute("data-hf-original-composition-id")?!0:J1(e):!1}function za(){return Array.from(document.querySelectorAll("[data-composition-src], [data-composition-id]")).filter(t=>t.hasAttribute("data-composition-src")?!0:xb(t))}function fc(){let e=window.__hfVariablesByComp;if(!e)return;let t=new Set(za().map(n=>Yi(n).runtimeCompositionId).filter(n=>!!n));for(let n of Object.keys(e))t.has(n)||delete e[n]}function yb(e,t){let n=X1(e),r=new Set(e.flatMap(a=>{let s=Yi(a),l=s.authoredCompositionId?[s.authoredCompositionId]:[];return(t.has(a)||!mb(a))&&s.runtimeCompositionId&&l.push(s.runtimeCompositionId),l})),i=new Map,o=new Map;for(let a of e){let{authoredCompositionId:s,runtimeCompositionId:l}=Yi(a),c=!t.has(a)&&mb(a);if(!s){o.set(a,{authoredCompositionId:null,runtimeCompositionId:l});continue}let d=(n.get(s)||0)>1,m=l||s;if(c){let f=d?(i.get(s)||0)+1:0;if(d){for(;r.has(cb(s,f));)f+=1;i.set(s,f)}m=d?cb(s,f):s,r.add(m),d?a.setAttribute("data-hf-original-composition-id",s):a.removeAttribute("data-hf-original-composition-id"),a.setAttribute("data-composition-id",m)}o.set(a,{authoredCompositionId:s,runtimeCompositionId:m})}return fc(),o}async function Sb(e){let t=fg({contentNode:e.sourceNode,head:e.head,hasTemplate:e.hasTemplate,compositionId:e.authoredCompositionId}),n=_e(t.innerRoot)?t.innerRoot:null,r=n??e.sourceNode,i=t.authoredCompositionId,o=t.scriptCompositionId,a=e.runtimeCompositionId||null,s=t.authoredRootId,l=a?`[data-composition-id="${CSS.escape(a)}"]`:void 0;for(let x of t.linkSources){let y=(x.getAttribute("href")||"").trim();if(!y)continue;let v=e.compositionUrl?new URL(y,e.compositionUrl).href:y;if(e.compositionUrl&&fb(v,e.compositionUrl))continue;let A=x.cloneNode(!0);$f(A)&&(A.href=v,!nb(document.head,A)&&(document.head.appendChild(A),e.injectedLinks.push(A)))}let c=[];(x=>{for(let y of x){let v=y.cloneNode(!0);if(!Vf(v))continue;i&&(v.textContent=z0(v.textContent||"",i,l,s,{scopeRootSelectors:!0})),document.head.appendChild(v),e.injectedStyles.push(v);let A=v.textContent||"";c.push({element:v,authored:A,applied:A})}})(t.styleSources);let m=x=>{let y=x.getAttribute("type")?.trim()??"",v=x.getAttribute("src")?.trim()??"";if(v){let C=db(v,e.compositionUrl);return e.compositionUrl&&fb(C,e.compositionUrl)?null:{kind:"external",src:C,type:y}}let A=x.textContent?.trim()??"";return A?{kind:"inline",content:A,type:y,scopeCompositionId:o}:null},f=t.scriptSources.map(m).filter(x=>x!==null);if(n){let x=n.getAttribute("data-width"),y=n.getAttribute("data-height"),v=e.parseDimensionPx(x),A=e.parseDimensionPx(y);x&&e.host.setAttribute("data-width",x),y&&e.host.setAttribute("data-height",y),v&&_e(e.host)&&(e.host.style.width=v),A&&_e(e.host)&&(e.host.style.height=A),n.hasAttribute("data-timeline-locked")&&e.host.setAttribute("data-timeline-locked","");let C=Y1(n);!e.authoredCompositionId&&i&&C.setAttribute("data-composition-id",i),uc(C),e.host.appendChild(C)}else if(e.hasTemplate){let x=document.importNode(r,!0);uc(x),e.host.appendChild(x)}else e.host.innerHTML=e.fallbackBodyInnerHtml,uc(e.host);for(let x of t.inertScriptsOutsideRoot)e.host.appendChild(document.importNode(x,!0));a&&Z1(e,r,a);let p=Array.from(e.host.childNodes),b=()=>e.host.isConnected&&(p.length>0||e.host.childNodes.length===0)&&p.every(x=>x.parentNode===e.host);return{host:e.host,namespace:a||i||"",styles:c,isCurrent:b,runScripts:async()=>{if(f.length>0&&await lc(),!!b())for(let x of f){let y=document.createElement("script");if(x.type&&(y.type=x.type),y.async=!1,x.kind==="external")y.src=x.src;else if(x.type.toLowerCase()==="importmap"){let v=X0(x.content,A=>db(A,e.compositionUrl));y.textContent=v?JSON.stringify(v):x.content}else if(x.type.toLowerCase()==="module"){let v=x.scopeCompositionId?K0(a||x.scopeCompositionId,e.compositionUrl?.href):"";y.textContent=v+x.content}else x.scopeCompositionId?y.textContent=rc(x.content,x.scopeCompositionId,"[HyperFrames] composition script error:",l,a||x.scopeCompositionId,s,e.compositionUrl?.href):y.textContent=`(function(){${x.content}})();`;if(document.body.appendChild(y),e.injectedScripts.push(y),x.kind==="external"){let v=await K1(y);v.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.authoredCompositionId,runtimeCompositionId:e.runtimeCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:x.src,loadStatus:v.status,elapsedMs:v.elapsedMs}})}}}}}async function pb(e,t){let n=za();if(fc(),n.length===0)return[];let r=yb(n,t),i=n.filter(a=>{if(t.has(a)||a.hasAttribute("data-composition-src")||a.children.length>0)return!1;let s=r.get(a)?.authoredCompositionId;return s?!!document.querySelector(`template#${CSS.escape(s)}-template`):!1}),o=[];for(let a of i){let s=r.get(a),l=s?.authoredCompositionId;if(!l)continue;let c=document.querySelector(`template#${CSS.escape(l)}-template`);dc(a);let d=await Sb({host:a,authoredCompositionId:l,runtimeCompositionId:s?.runtimeCompositionId||l,hostCompositionSrc:`template#${l}-template`,sourceNode:c.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});o.push(d)}return o}async function Q1(e){let t=za();if(fc(),t.length===0)return[];let n=yb(t,new Set),r=t.filter(o=>o.hasAttribute("data-composition-src"));return(await Promise.all(r.map(async o=>{let a=o.getAttribute("data-composition-src");if(!a)return null;let s=n.get(o),l=s?.authoredCompositionId||null,c=s?.runtimeCompositionId||l||null,d=null;try{d=new URL(a,document.baseURI)}catch{d=null}dc(o);let m=p=>{e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:l,runtimeCompositionId:c,hostCompositionSrc:a,errorMessage:p instanceof Error?p.message:"unknown_error"}}),dc(o)},f=async p=>{let b=await Sb(p),x=b.runScripts;return b.runScripts=async()=>{try{await x()}catch(y){m(y)}},b};try{let p=l!=null?document.querySelector(`template#${CSS.escape(l)}-template`):null;if(p)return await f({host:o,authoredCompositionId:l,runtimeCompositionId:c,hostCompositionSrc:a,sourceNode:p.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:d,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});let b=await fetch(a);if(!b.ok)throw new Error(`HTTP ${b.status}`);let x=await b.text(),v=new DOMParser().parseFromString(x,"text/html");bb(v,d);let A=(l?v.querySelector(`template#${CSS.escape(l)}-template`):null)??v.querySelector("template"),C=A?A.content:v.body;return await f({host:o,authoredCompositionId:l,runtimeCompositionId:c,hostCompositionSrc:a,sourceNode:C,hasTemplate:!!A,fallbackBodyInnerHtml:v.body.innerHTML,compositionUrl:d,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,injectedLinks:e.injectedLinks,parseDimensionPx:e.parseDimensionPx,head:v.head,declaredVariableDefaults:fi(v.documentElement),variableDeclarer:v.documentElement,onDiagnostic:e.onDiagnostic})}catch(p){return m(p),null}}))).filter(o=>o!==null)}async function vb(e){let t=new Set,n={host:document.documentElement,namespace:"",referenceTarget:"document",styles:[...document.querySelectorAll("style")].map(m=>({element:m,authored:m.textContent??"",applied:m.textContent??""}))},r=await Q1(e),i=await pb(e,new Set(r.map(({host:m})=>m))),o=[...r,...i];cc([...o,n],t),await Promise.all(r.map(m=>m.runScripts()));let a=i.filter(m=>{if(m.isCurrent())return!0;for(let f of m.styles)f.element.remove();return window.__hfVariablesByComp&&delete window.__hfVariablesByComp[m.namespace],!1}),s=[...r.filter(m=>m.host.isConnected),...a],l=await pb(e,new Set(s.map(({host:m})=>m)));l.length&&cc([...s,...l,n],t);let c=new Map([...a,...l].map(m=>[m.host,m]));for(let m of za()){let f=c.get(m);f&&await f.runScripts()}let d=[...s,...l].filter(m=>m.host.isConnected);cc([...d,n],t)}function cc(e,t){for(let{styles:r}of e)for(let i of r){let o=i.element.textContent??"";o!==i.applied&&(i.authored=o,i.applied=o)}sb(document,e.map(({host:r,namespace:i,styles:o,referenceTarget:a})=>({root:r,namespace:i,referenceTarget:a,exclude:e.filter(s=>s.host!==r&&r.contains(s.host)).map(s=>s.host),cssTexts:o.map(s=>s.authored)})),t).forEach((r,i)=>{let o=Nn(e[i].host,pt);if(!(r.size===0&&o.length===0))for(let a of e[i].styles){let s=lb(a.authored,r,o);s!==a.applied&&(a.element.textContent=s),a.applied=s}}),Yn()}function Z1(e,t,n){let i={...e.declaredVariableDefaults??(Re(t)?fi(t):{}),...Jm(e.host)};xl(e.variableDeclarer??(Re(t)?t:null),i,n),Ym(e.host),Object.keys(i).length>0?(window.__hfVariablesByComp||(window.__hfVariablesByComp={}),window.__hfVariablesByComp[n]=i,yl(e.host,{...Km(e.host,i,window),...ea()})):window.__hfVariablesByComp&&delete window.__hfVariablesByComp[n]}function eT(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function tT(e){if(!Array.isArray(e))throw new Error("expected a JSON array");if(!e.every(eT))throw new Error("every array entry must be an object");return e}function nT(e){let n=e.vars.data?.captionState;return n==="dim"||n==="active"?n:void 0}function rT(e){return _e(e)?e.dataset.captionWrapper!=="true"?e:e.querySelector(":scope > span")??null:null}function iT(){let e=[],t=document.querySelectorAll(".caption-group");for(let n of t)for(let r of n.children){if(!_e(r))continue;let i=r.dataset.captionWrapper==="true"?r.querySelector(":scope > span"):r.tagName==="SPAN"?r:null;i&&e.push(i)}return e}function oT(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}var pc=()=>window.gsap,Ab=()=>fetch("caption-overrides.json").then(e=>e.ok?e.json():null),wb=e=>e===null?[]:tT(e);function _b(e){let t=e instanceof Error?e.message:String(e);console.error(`[HyperFrames] Invalid caption-overrides.json: ${t}`)}function Cb(){return pc()?Ab().then(wb).catch(e=>(_b(e),[])):Promise.resolve([])}function hc(e,t){return!pc()||document.querySelectorAll(".caption-group").length===0?Promise.resolve():Ab().then(n=>gc(wb(n),e,t)).catch(_b)}function aT(e,t){return(e.wordId?rT(document.getElementById(e.wordId)):null)??(e.wordIndex!==void 0?t[e.wordIndex]??null:null)}function Eb(e,t){return Object.fromEntries(t.filter(n=>e[n]!==void 0).map(n=>[n,e[n]]))}function mc(e,t){let n=e.style.color;e.style.color=t;let r=getComputedStyle(e).color;return e.style.color=n,r}function sT(e,t){let n=t[0]?.vars.startAt;return mc(e,n?.color===void 0?"":String(n.color))}function lT(e,t,n,r){let i=nT(e);if(i)return i;let o=String(e.vars.color);return/var\(|currentcolor/i.test(o)?mc(t,o)===n?"dim":"active":(r.has(o)||r.set(o,mc(t,o)),r.get(o)===n?"dim":"active")}function uT(e,t,n){if(e.dimColor)return e.dimColor;if(!(t.length===0||t.some(r=>r.vars.runBackwards)))return n}function cT(e,t,n,r){let i=e.getTweensOf(t).filter(s=>s.vars.color!==void 0).sort((s,l)=>s.startTime()-l.startTime()),o=sT(t,i);for(let s of i){let c=lT(s,t,o,r)==="dim"?n.dimColor:n.activeColor;c&&(s.vars.color=c),s.vars.runBackwards||s.invalidate?.()}let a=uT(n,i,o);a&&e.set(t,{color:a})}function dT(e,t,n,r){let i=Eb(n,["x","y","scale","rotation"]),o=Eb(n,["opacity","fontWeight","fontFamily"]);if(n.fontSize!==void 0&&(o.fontSize=`${n.fontSize}px`),(n.activeColor||n.dimColor)&&cT(e,t,n,r),Object.keys(o).length>0&&e.set(t,o),Object.keys(i).length>0){let a=oT(t);e.set(a,i)}}function gc(e,t,n=()=>{}){let r=pc();if(!r||e.length===0)return;n();let i=iT(),o=new Map;for(let a of e){let s=aT(a,i);!s||t&&!t.some(l=>l.contains(s))||dT(r,s,a,o)}}var xc="data-hf-edit-base-x",yc="data-hf-edit-base-y",pn="data-hf-edit-original-translate",ja=e=>{let t=parseFloat(e??"");return Number.isFinite(t)?t:0},fT=e=>{let t=[],n=0,r="";for(let i of e.trim())i==="("&&(n+=1),i===")"&&(n=Math.max(0,n-1)),/\s/.test(i)&&n===0?(r&&t.push(r),r=""):r+=i;return r&&t.push(r),t},Tb=/^-?(?:\d+(?:\.\d+)?|\.\d+)px$/,bc=(e,t)=>Tb.test(e)&&Tb.test(t)?`${parseFloat(e)+parseFloat(t)}px`:`calc(${e} + ${t})`,mT=(e,t,n)=>{if(!e||e==="none")return`${t} ${n}`;let[r,i,o]=fT(e);if(r===void 0)return`${t} ${n}`;if(i===void 0)return`${bc(r,t)} ${n}`;let a=o===void 0?"":` ${o}`;return`${bc(r,t)} ${bc(i,n)}${a}`},pT=e=>{try{e.ownerDocument.defaultView?.gsap?.getProperty?.(e,"x")}catch{}},hT=e=>{let t=e.style.getPropertyValue("translate").trim();if(t)return t==="none"?"":t;try{let n=e.ownerDocument.defaultView,r=n?n.getComputedStyle(e).getPropertyValue("translate").trim():"";return r==="none"?"":r}catch{return""}},Ka=new WeakMap;function Lb(e){Ka.delete(e)}function gT(e,t){let n=Ka.get(e);if(!t?.force&&n!==void 0&&e.style.getPropertyValue("translate")!==n){at("position_edit_fold_skipped",{hfId:e.getAttribute("data-hf-id")});return}let r=ja(e.getAttribute("data-x"))-ja(e.getAttribute(xc)),i=ja(e.getAttribute("data-y"))-ja(e.getAttribute(yc));e.hasAttribute(pn)||e.setAttribute(pn,hT(e)),n===void 0&&pT(e);let o=e.getAttribute(pn)??"",a=mT(o,`${r}px`,`${i}px`);e.style.setProperty("translate",a),Ka.set(e,e.style.getPropertyValue("translate"))}function Xi(e,t){let n=e.querySelectorAll(`[${pn}]:not([${xc}]):not([${yc}])`);for(let o=0;o<n.length;o++){let a=n[o];if(a===void 0||!Jn(a))continue;let s=a.getAttribute(pn)??"";s===""?a.style.removeProperty("translate"):a.style.setProperty("translate",s),a.removeAttribute(pn),Ka.delete(a)}let r=e.querySelectorAll(`[${xc}], [${yc}]`),i=0;for(let o=0;o<r.length;o++){let a=r[o];a===void 0||!Jn(a)||(gT(a,t),i+=1)}return i}var Rb="__hfPositionEditsSeekReapplyWrapped",kb=new WeakSet,Mb=new WeakMap,Nb=new WeakMap;function Fb(e){let t=e,n=()=>{try{Xi(t.document)}catch{}},r=m=>typeof m=="function"&&(kb.has(m)||!!m[Rb]),i=m=>{kb.add(m);try{Object.defineProperty(m,Rb,{value:!0})}catch{}},o=m=>{if(typeof m!="function"||r(m))return m;let f=function(...p){let b=m.apply(this,p);return n(),b};return i(f),f},a=(m,f)=>{let p=Mb.get(m);if(p?.has(f))return!0;let b=Object.getOwnPropertyDescriptor(m,f);if(b?.configurable===!1){let v=m[f];return typeof v=="function"&&(m[f]=o(v),n()),!1}let x=m[f],y=b?.set;return Object.defineProperty(m,f,{configurable:!0,enumerable:b?.enumerable??!0,get:()=>x,set:v=>{x=o(v),y?.call(m,v)}}),x=o(x),p??(p=new Set),p.add(f),Mb.set(m,p),n(),!0},s=(m,f)=>{let p=Nb.get(t),b=Object.getOwnPropertyDescriptor(t,m);if(!p?.has(m)){if(b?.configurable===!1){let v=t[m];return v?a(v,f):!1}let y=t[m];Object.defineProperty(t,m,{configurable:!0,enumerable:b?.enumerable??!0,get:()=>y,set:v=>{y=v,y&&a(y,f)}}),p??(p=new Set),p.add(m),Nb.set(t,p)}let x=t[m];return x?a(x,f):!1},l=()=>{let m=s("__hf","seek"),f=s("__player","renderSeek");return m&&f};if(l())return;let c=120,d=t.setInterval(()=>{if(l()){t.clearInterval(d);return}c-=1,c<=0&&t.clearInterval(d)},50)}function Ya(e){let t=window,r=e.closest("[data-composition-id]")?.getAttribute("data-composition-id")?.trim()??"",i=r?t.__hfVariablesByComp?.[r]:void 0;if(i)return i;let o=t.__hyperframes?.getVariables?.();return o&&typeof o=="object"?o:t.__hfVariables??{}}function Xa(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Sc(e){let t=e.replace(/[\u0000-\u0020]/g,""),n=/^([a-z][a-z0-9+.-]*):/i.exec(t);if(!n)return!0;let r=n[1]?.toLowerCase();return r?r==="https"||r==="http"||r==="blob"?!0:r==="data"?/^data:image\//i.test(t):!1:!1}var Ib=new Set(["img","video","audio","source"]);function bT(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 xT(e){return e.replace(/[;{}<>\r\n]/g,"")}function yT(e){if(Xa(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 vc(e,t){let n=e.closest("[data-composition-id]"),r=t.get(n);if(r)return r;let i=Ya(e);return t.set(n,i),i}function ST(e,t){if(e.childElementCount===0){e.textContent=t;return}let n=!1;for(let r of Array.from(e.childNodes))r.nodeType===Node.TEXT_NODE&&(r.nodeValue=n?"":t,n=!0);n||e.insertBefore(e.ownerDocument.createTextNode(t),e.firstChild)}function vT(e){return e.querySelector("[data-hf-root]")??e.getElementById("stage")??e.body?.firstElementChild??e.body}function ET(e,t){for(let n of new Set(e)){let r=vc(n,t);for(let[i,o]of Object.entries(r)){let a=yT(o);a!==null&&_e(n)&&n.style.setProperty(`--${i}`,xT(a))}}}function Db(e,t,n=!0){let r=e.getAttribute("data-var-src")?.trim();if(!r)return null;if(!Ib.has(e.tagName.toLowerCase()))return n&&console.warn(`[hyperframes] Ignoring data-var-src on <${e.tagName.toLowerCase()}>: variable-bound src is only allowed on ${Array.from(Ib).join("/")}.`),null;let i=bT(vc(e,t)[r]);return i===null?null:Sc(i)?i:(n&&console.warn(`[hyperframes] Ignoring data-var-src="${r}": unsafe URL protocol.`),null)}function Pb(e){return Db(e,new Map,!1)??bi(e)}function Ja(e,t){let n=new Map,r=o=>t?[...t.matches(o)?[t]:[],...t.querySelectorAll(o)]:Array.from(e.querySelectorAll(o)),i=t?null:vT(e);ET([...i?[i]:[],...r("[data-composition-id]")],n);for(let o of r("[data-var-src]")){let a=Db(o,n);a!==null&&bi(o)!==a&&o.setAttribute("src",a)}for(let o of r("[data-var-text]")){let a=o.getAttribute("data-var-text")?.trim();if(!a)continue;let s=vc(o,n)[a];Xa(s)&&ST(o,String(s))}}var zt=new Map,AT="data-hf-color-grading-canvas",wT="__hf_color_grading_canvas__";function Kb(){if(typeof MutationObserver>"u"||typeof document>"u")return;let e=document.documentElement;if(!e)return;let t=r=>{_e(r)&&(r.hasAttribute(On)||r.setAttribute(On,r.style.opacity))},n=r=>{if(Re(r)){r.matches("video, img")&&t(r);for(let i of r.querySelectorAll("video, img"))t(i)}};n(e),new MutationObserver(r=>{for(let i of r)for(let o of i.addedNodes)n(o)}).observe(e,{childList:!0,subtree:!0})}var _T=16,CT=4,kr={enabled:!1,position:.5,softness:0,lineWidth:2},Ec=["#000000","#ffffff"],TT=["#1a1a1a","#f5f5dc"],no=3,RT=no-1,kT=5,Ac=`${kt}.0`,Ob=`${kt-1}.0`,MT=`${no}.0`,NT=`${(RT+.5)/no}`;function Qa(e){let t=e.getAttribute(Ai);return t==null?null:Bh(t,Ya(e))}var LT=["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(`
|
|
357
357
|
`),FT=["#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_bloomSource;","uniform sampler2D u_kuwaharaSource;","uniform sampler2D u_lut;","uniform sampler2D u_advanced;","uniform vec2 u_resolution;","uniform vec2 u_uvScale;","uniform vec2 u_uvOffset;","uniform float u_blurReady;","uniform float u_bloomReady;","uniform float u_kuwaharaReady;","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 vec3 u_shadowWheel;","uniform vec3 u_midtoneWheel;","uniform vec3 u_highlightWheel;","uniform float u_rgbCurvesEnabled;","uniform float u_hueCurvesEnabled;","uniform float u_secondaryCount;","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_effectTime;","uniform float u_blur;","uniform float u_bloom;","uniform float u_kuwahara;","uniform float u_pixelate;","uniform float u_chromaBleed;","uniform float u_tapeDamage;","uniform float u_tapeTracking;","uniform float u_tapeNoise;","uniform float u_tapeSpeed;","uniform float u_filmArtifacts;","uniform float u_halftone;","uniform float u_halftoneSize;","uniform float u_twoInkPrint;","uniform float u_twoInkPrintSize;","uniform float u_ascii;","uniform float u_asciiSize;","uniform float u_asciiInvert;","uniform float u_asciiStyle;","uniform float u_asciiColor;","uniform float u_asciiRotation;","uniform float u_dither;","uniform float u_ditherSize;","uniform float u_monoScreen;","uniform float u_monoScreenSize;","uniform float u_monoScreenAngle;","uniform float u_monoScreenSpread;","uniform float u_monoScreenShape;","uniform float u_monoScreenInvert;","uniform float u_scanlines;","uniform float u_scanlineCount;","uniform float u_scanlineSoftness;","uniform float u_chromaticAberration;","uniform float u_chromaticAngle;","uniform float u_crtCurvature;","uniform float u_digitalGlitch;","uniform float u_digitalGlitchColorSplit;","uniform float u_digitalGlitchLineTear;","uniform float u_digitalGlitchPixelate;","uniform float u_digitalGlitchBlockAmount;","uniform float u_digitalGlitchBlockDisplacement;","uniform float u_digitalGlitchBlockOpacity;","uniform float u_digitalGlitchSpeed;","uniform float u_engraving;","uniform float u_engravingSpacing;","uniform float u_engravingMinThickness;","uniform float u_engravingMaxThickness;","uniform float u_engravingAngle;","uniform float u_engravingContrast;","uniform float u_engravingSharpness;","uniform float u_engravingWave;","uniform float u_engravingWaveFrequency;","uniform float u_crosshatch;","uniform float u_crosshatchSpacing;","uniform float u_crosshatchThickness;","uniform float u_crosshatchAngle;","uniform float u_crosshatchContrast;","uniform float u_crosshatchEdges;","uniform float u_crosshatchLineWeight;","uniform float u_crosshatchWave;","uniform float u_crosshatchWaveFrequency;","uniform float u_paletteSize;","uniform vec3 u_palette0;","uniform vec3 u_palette1;","uniform vec3 u_palette2;","uniform vec3 u_palette3;","uniform vec3 u_palette4;","uniform vec3 u_palette5;","uniform float u_intensity;","uniform float u_compareEnabled;","uniform float u_comparePosition;","uniform float u_compareSoftness;","uniform float u_compareLineWidth;","const float PI = 3.14159265359;","float lumaOf(vec3 c){ return dot(c, vec3(0.2126, 0.7152, 0.0722)); }","float bt601Luma(vec3 c){ return dot(c, vec3(0.299, 0.587, 0.114)); }","float grainHash(vec2 p){ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123); }","float digitalHash(vec2 p){"," vec2 q = mod(floor(p), 251.0);"," float x = mod(q.x * q.x * 157.0 + q.x * 89.0, 251.0);"," float y = mod(q.y * q.y * 113.0 + q.y * 47.0, 251.0);"," float xy = mod(q.x * q.y * 71.0, 251.0);"," return mod(x + y + xy + 19.0, 251.0) / 251.0;","}","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)); }","vec2 applyCrtWarp(vec2 uv){"," vec2 centered = uv * 2.0 - 1.0;"," float curvature = clamp(u_crtCurvature, 0.0, 1.0) * 0.5;"," float dist = dot(centered, centered);"," centered *= 1.0 + curvature * dist;"," return centered * 0.5 + 0.5;","}","vec4 sampleSource(vec2 uv){ return texture2D(u_source, clampUv(uv)); }","vec4 sampleBlur(vec2 uv){ return texture2D(u_blurSource, clampUv(uv)); }","vec3 sampleBloom(vec2 uv){ return texture2D(u_bloomSource, clampUv(uv)).rgb; }","vec3 sampleKuwahara(vec2 uv){"," vec2 displayUv = uv * u_uvScale + u_uvOffset;"," return texture2D(u_kuwaharaSource, clampUv(displayUv)).rgb;","}","vec4 samplePrepared(vec2 uv){"," vec4 base = sampleSource(uv);"," float blur = clamp(u_blur, 0.0, 1.0);"," if (blur > 0.0 && u_blurReady > 0.5) base = mix(base, sampleBlur(uv), blur);"," float kuwahara = clamp(u_kuwahara, 0.0, 1.0);"," if (kuwahara > 0.0 && u_kuwaharaReady > 0.5) {"," base.rgb = mix(base.rgb, sampleKuwahara(uv), kuwahara);"," }"," return base;","}","float tapeTrackingBand(float y, float center, float width){"," float offset = fract(y - center + 0.5) - 0.5;"," float triangle = max(0.0, 1.0 - abs(offset) / max(width, 0.0001));"," return triangle * triangle * (3.0 - 2.0 * triangle);","}","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;"," }"," float tapeDamage = clamp(u_tapeDamage, 0.0, 1.0);"," float tapeTracking = clamp(u_tapeTracking, 0.0, 1.0);"," float tapeNoise = clamp(u_tapeNoise, 0.0, 1.0);"," float tapeTime = u_effectTime * mix(0.0, 2.0, clamp(u_tapeSpeed, 0.0, 1.0));"," float tapeFrame = floor(tapeTime * 60.0);"," float tapeLine = floor(sampleUv.y * u_resolution.y * 0.5);"," float lineJitter = (digitalHash(vec2(tapeLine, floor(tapeFrame * 0.5))) - 0.5) * 1.8 * tapeNoise;"," float slowWobble = sin(sampleUv.y * 32.0 + tapeTime * 2.6) * 0.55;"," float headSwitch = smoothstep(0.88, 1.0, sampleUv.y) * sin(sampleUv.y * 240.0 + tapeTime * 8.0) * 4.0;"," float trackingShift = tapeTrackingBand(sampleUv.y, fract(0.08 + tapeTime * 0.083), 0.035);"," trackingShift -= tapeTrackingBand(sampleUv.y, fract(0.28 + tapeTime * 0.061), 0.03) * 0.8;"," trackingShift += tapeTrackingBand(sampleUv.y, fract(0.5 + tapeTime * 0.047), 0.04) * 0.75;"," trackingShift -= tapeTrackingBand(sampleUv.y, fract(0.72 + tapeTime * 0.037), 0.028) * 0.65;"," trackingShift += tapeTrackingBand(sampleUv.y, fract(0.89 + tapeTime * 0.029), 0.032) * 0.55;"," trackingShift *= tapeTracking * 48.0;"," float tapeShift = (lineJitter + slowWobble + headSwitch + trackingShift) * tapeDamage;"," float texelX = 1.0 / max(u_resolution.x * max(u_uvScale.x, 0.00001), 1.0);"," vec2 tapeUv = sampleUv + vec2(tapeShift * texelX, 0.0);"," vec4 base = samplePrepared(tapeUv);"," if (tapeDamage > 0.0) {"," vec2 lumaStep = vec2(texelX * mix(1.0, 3.5, tapeDamage), 0.0);"," vec3 leftTape = samplePrepared(tapeUv - lumaStep).rgb;"," vec3 rightTape = samplePrepared(tapeUv + lumaStep).rgb;"," float tapeLuma = (bt601Luma(leftTape) + bt601Luma(base.rgb) * 2.0 + bt601Luma(rightTape)) * 0.25;"," vec3 centerChroma = base.rgb - vec3(bt601Luma(base.rgb));"," vec3 tapeColor = vec3(tapeLuma) + centerChroma;"," vec3 ghost = samplePrepared(tapeUv - vec2(texelX * 12.0, 0.0)).rgb;"," tapeColor = mix(tapeColor, ghost, 0.045 * tapeDamage);"," float fineNoise = digitalHash(floor(gl_FragCoord.xy) + vec2(tapeFrame * 17.0, tapeFrame * 3.0)) - 0.5;"," float band = digitalHash(vec2(floor(sampleUv.y * 92.0), floor(tapeFrame / 3.0)));"," float dropout = smoothstep(0.985, 1.0, band) * (digitalHash(vec2(floor(sampleUv.x * 18.0), tapeLine)) - 0.5);"," tapeColor += (fineNoise * 0.035 + dropout * 0.12) * tapeDamage * tapeNoise;"," base.rgb = mix(base.rgb, clamp(tapeColor, 0.0, 1.0), tapeDamage);"," }"," float chromaBleed = clamp(u_chromaBleed, 0.0, 1.0);"," if (chromaBleed > 0.0) {"," float radius = mix(1.0, 4.0, chromaBleed);"," vec2 stepUv = vec2(texelX * radius, 0.0);"," vec3 c0 = base.rgb;"," vec3 c1 = samplePrepared(tapeUv - stepUv).rgb;"," vec3 c2 = samplePrepared(tapeUv + stepUv).rgb;"," vec3 c3 = samplePrepared(tapeUv - stepUv * 2.0).rgb;"," vec3 c4 = samplePrepared(tapeUv + stepUv * 2.0).rgb;"," float centerLuma = lumaOf(base.rgb);"," vec3 blurredChroma = ((c0 - vec3(lumaOf(c0))) * 6.0 + (c1 - vec3(lumaOf(c1))) * 4.0 + (c2 - vec3(lumaOf(c2))) * 4.0 + (c3 - vec3(lumaOf(c3))) + (c4 - vec3(lumaOf(c4)))) / 16.0;"," base.rgb = mix(base.rgb, clamp(vec3(centerLuma) + blurredChroma, 0.0, 1.0), chromaBleed);"," }"," return base;","}","vec4 sampleChromaticMedia(vec2 uv, vec4 center){"," float amount = clamp(u_chromaticAberration, 0.0, 1.0);"," if (amount <= 0.0) return center;"," float angle = clamp(u_chromaticAngle, 0.0, 1.0) * PI * 2.0;"," vec2 offset = vec2(cos(angle), sin(angle)) * amount * 0.02;"," vec4 positive = sampleMedia(uv + offset);"," vec4 negative = sampleMedia(uv - offset);"," vec3 split = vec3(positive.r, center.g, negative.b);"," return vec4(split, center.a);","}","vec3 sampleDigitalSplit(vec2 uv, vec2 block, float time, float amount){"," float split = amount * 0.06;"," float direction = digitalHash(block * 0.4 + vec2(floor(time * 3.7), floor(time * 5.3)));"," vec2 axis = direction > 0.66 ? vec2(1.0, 0.0) : direction > 0.33 ? vec2(0.0, 1.0) : vec2(0.7071);"," vec4 center = sampleMedia(uv);"," return vec3(sampleMedia(uv + axis * split).r, center.g, sampleMedia(uv - axis * split).b);","}","vec3 applyDigitalGlitch(vec2 uv, vec3 source){"," float amount = clamp(u_digitalGlitch, 0.0, 1.0);"," if (amount <= 0.0) return source;"," float colorSplit = clamp(u_digitalGlitchColorSplit, 0.0, 1.0) * 2.0;"," float lineTear = clamp(u_digitalGlitchLineTear, 0.0, 1.0) * 2.0;"," float pixelate = clamp(u_digitalGlitchPixelate, 0.0, 1.0) * 2.0;"," float blockAmount = clamp(u_digitalGlitchBlockAmount, 0.0, 1.0);"," float blockDisplacement = clamp(u_digitalGlitchBlockDisplacement, 0.0, 1.0) * 2.0;"," float blockOpacity = clamp(u_digitalGlitchBlockOpacity, 0.0, 1.0);"," float speed = clamp(u_digitalGlitchSpeed, 0.0, 1.0) * 2.0;"," float time = u_effectTime * speed;"," float blockCount = 8.0 + blockAmount * 60.0;"," vec2 block = floor(uv * blockCount);"," float randomA = digitalHash(block + vec2(floor(time * 7.3), floor(time * 11.1)));"," float randomB = digitalHash(block * 0.7 + vec2(17.3 + floor(time * 6.6), 29.1));"," float randomC = digitalHash(block + vec2(floor(time * 5.7) * 13.0, 41.0));"," float randomD = digitalHash(block * 1.3 + vec2(7.0, floor(time * 3.2) * 7.0));"," vec2 displaced = uv;"," if (blockDisplacement > 0.0 && blockOpacity > 0.0) {"," float threshold = 1.0 - blockDisplacement * 0.4;"," if (randomA > threshold) {"," displaced += vec2((randomB - 0.5) * blockDisplacement * 0.5, (randomC - 0.5) * blockDisplacement * 0.3);"," }"," if (randomD > 0.92 && blockDisplacement > 0.5) {"," displaced.x += (digitalHash(vec2(block.y, floor(time * 8.0))) - 0.5) * blockDisplacement;"," }"," displaced = mix(uv, displaced, blockOpacity);"," }"," if (lineTear > 0.0) {"," float row = floor(uv.y * (50.0 + lineTear * 150.0));"," float tearA = digitalHash(vec2(row * 7.3 + floor(time * 12.0 + row * 0.1) * 3.7, 13.0));"," float tearB = digitalHash(vec2(row * 13.7 + floor(time * 8.3) * 5.1, 31.0));"," if (tearA > 1.0 - lineTear * 0.5) displaced.x += (tearB - 0.5) * lineTear * 0.4;"," if (tearB > 0.95 && lineTear > 0.3) displaced.x += (tearA - 0.5) * lineTear * 0.8;"," }"," if (pixelate > 0.0) {"," float pixelRandom = digitalHash(block * 0.5 + vec2(floor(time * 4.9), 53.0));"," if (pixelRandom > 1.0 - pixelate * 0.35) {"," float cells = 4.0 + (1.0 - pixelRandom) * pixelate * 40.0;"," displaced = (floor(clampUv(displaced) * cells) + 0.5) / cells;"," }"," }"," displaced = clampUv(displaced);"," vec3 glitch = sampleDigitalSplit(displaced, block, time, colorSplit);"," if (blockDisplacement > 0.2 && blockOpacity > 0.0) {"," float corruption = digitalHash(block * 1.1 + vec2(floor(time * 11.9), 67.0));"," vec3 changed = glitch;"," if (corruption > 0.9) changed = 1.0 - glitch;"," else if (corruption > 0.85) changed = corruption > 0.875 ? glitch.gbr : glitch.brg;"," else if (corruption > 0.8) {"," float channel = digitalHash(block + vec2(73.0));"," if (channel > 0.66) changed.r = min(changed.r * 2.0, 1.0);"," else if (channel > 0.33) changed.g = min(changed.g * 2.0, 1.0);"," else changed.b = min(changed.b * 2.0, 1.0);"," }"," glitch = mix(glitch, changed, blockOpacity);"," }"," if (blockOpacity > 0.0) {"," float flash = digitalHash(block * 0.8 + vec2(floor(time * 14.7), 83.0));"," vec3 flashed = flash > 0.97 ? min(glitch * 1.8, vec3(1.0)) : flash > 0.94 ? glitch * 0.3 : glitch;"," glitch = mix(glitch, flashed, blockOpacity * 0.6);"," }"," if (lineTear > 0.1) {"," float interference = pow(sin(uv.y * (300.0 + randomA * 200.0) + time * 30.0) * 0.5 + 0.5, 6.0);"," glitch -= interference * 0.08 * lineTear;"," }"," return mix(source, clamp(glitch, 0.0, 1.0), amount);","}","float dustMask(vec2 uv, float frameBucket){"," vec2 grid = vec2(128.0, 72.0);"," vec2 cell = floor(uv * grid);"," vec2 local = fract(uv * grid) - 0.5;"," float chance = grainHash(cell + frameBucket * 19.13);"," float radius = mix(0.05, 0.34, grainHash(cell + 7.1));"," return step(0.9975, chance) * (1.0 - smoothstep(radius, radius + 0.08, length(local)));","}","float screenDot(vec2 p, float ink, float angle, float sharpness){"," float c = cos(angle);"," float s = sin(angle);"," vec2 q = mat2(c, -s, s, c) * p;"," vec2 d = fract(q) - 0.5;"," float radius = sqrt(clamp(ink, 0.0, 1.0)) * 0.68;"," float edge = mix(0.16, 0.025, sharpness);"," return 1.0 - smoothstep(radius - edge, radius + edge, length(d));","}","vec3 paletteColor(float index);","float monoScreenMask(vec2 local, float radius, float shape, float softness){"," vec2 centered = local - 0.5;"," float distanceToInk = length(centered);"," if (shape > 0.5 && shape < 1.5) distanceToInk = max(abs(centered.x), abs(centered.y));"," if (shape > 1.5 && shape < 2.5) distanceToInk = abs(centered.x) + abs(centered.y);"," if (shape > 2.5 && shape < 3.5) distanceToInk = max(abs(centered.x) * 0.86 + centered.y * 0.5, -centered.y);"," if (shape > 3.5) distanceToInk = abs(centered.y);"," float shapeRadius = shape > 3.5 ? radius * 0.45 : radius;"," return 1.0 - smoothstep(shapeRadius, shapeRadius + softness, distanceToInk);","}","vec3 applyMonoScreen(vec3 source, float amount){"," if (amount <= 0.0) return source;"," float invert = step(0.5, u_monoScreenInvert);"," float coverage = mix(1.0 - lumaOf(source), lumaOf(source), invert);"," coverage = pow(clamp(coverage, 0.0, 1.0), mix(1.7, 0.58, clamp(u_monoScreenSpread, 0.0, 1.0)));"," float scale = max(min(u_resolution.x, u_resolution.y) / 540.0, 0.25);"," float cellPx = mix(4.0, 18.0, clamp(u_monoScreenSize, 0.0, 1.0)) * scale;"," float angle = clamp(u_monoScreenAngle, 0.0, 1.0) * PI * 0.5;"," float cosine = cos(angle);"," float sine = sin(angle);"," vec2 point = mat2(cosine, -sine, sine, cosine) * gl_FragCoord.xy / max(cellPx, 1.0);"," float radius = sqrt(coverage) * 0.68;"," float inkMask = monoScreenMask(fract(point), radius, floor(u_monoScreenShape + 0.5), 0.035);"," vec3 ink = paletteColor(0.0);"," vec3 paper = paletteColor(max(u_paletteSize - 1.0, 1.0));"," return mix(source, mix(paper, ink, inkMask), amount);","}","vec3 applyEngraving(vec3 source, float amount){"," if (amount <= 0.0) return source;"," float spacing = mix(3.0, 20.0, clamp(u_engravingSpacing, 0.0, 1.0));"," float minThickness = mix(0.0, 2.0, clamp(u_engravingMinThickness, 0.0, 1.0));"," float maxThickness = mix(1.0, 8.0, clamp(u_engravingMaxThickness, 0.0, 1.0));"," float angle = clamp(u_engravingAngle, 0.0, 1.0) * PI;"," vec2 alongAxis = vec2(cos(angle), sin(angle));"," vec2 acrossAxis = vec2(-alongAxis.y, alongAxis.x);"," float along = dot(gl_FragCoord.xy, alongAxis);"," float across = dot(gl_FragCoord.xy, acrossAxis);"," float frequency = mix(1.0, 10.0, clamp(u_engravingWaveFrequency, 0.0, 1.0));"," float wave = sin(along * frequency * 0.01);"," across += wave * clamp(u_engravingWave, 0.0, 1.0) * 3.0;"," float lineIndex = floor(across / max(spacing, 1.0));"," float lineDistance = abs(fract(across / max(spacing, 1.0)) - 0.5) * spacing;"," float contrast = mix(0.5, 2.0, clamp(u_engravingContrast, 0.0, 1.0));"," float darkness = 1.0 - pow(clamp(lumaOf(source), 0.0, 1.0), contrast);"," float variation = mix(0.88, 1.12, digitalHash(vec2(lineIndex, 73.0)));"," float thickness = mix(minThickness, maxThickness, darkness) * variation;"," float edge = mix(1.0, 0.3, clamp(u_engravingSharpness, 0.0, 1.0));"," float inkMask = 1.0 - smoothstep(max(thickness * 0.5 - edge, 0.0), thickness * 0.5 + edge, lineDistance);"," inkMask *= smoothstep(0.015, 0.12, darkness);"," vec3 ink = paletteColor(0.0);"," vec3 paper = paletteColor(max(u_paletteSize - 1.0, 1.0));"," return mix(source, mix(paper, ink, inkMask), amount);","}","float crosshatchLine(vec2 pixel, float angle, float spacing, float thickness, float seed){"," vec2 alongAxis = vec2(cos(angle), sin(angle));"," vec2 acrossAxis = vec2(-alongAxis.y, alongAxis.x);"," float along = dot(pixel, alongAxis);"," float across = dot(pixel, acrossAxis);"," float frequency = mix(1.0, 10.0, clamp(u_crosshatchWaveFrequency, 0.0, 1.0));"," across += sin(along * frequency * 0.02 + u_effectTime + seed) * clamp(u_crosshatchWave, 0.0, 1.0) * 5.0;"," float lineIndex = floor(across / max(spacing, 1.0));"," float distanceToLine = abs(fract(across / max(spacing, 1.0)) - 0.5) * spacing;"," float variation = mix(1.0, 0.5 + digitalHash(vec2(lineIndex, seed)), clamp(u_crosshatchLineWeight, 0.0, 1.0));"," float halfWidth = thickness * variation * 0.5;"," return 1.0 - smoothstep(max(halfWidth - 0.5, 0.0), halfWidth + 0.5, distanceToLine);","}","float crosshatchEdge(vec2 uv){"," vec2 texel = 1.0 / max(u_resolution * u_uvScale, vec2(1.0));"," float tl = lumaOf(sampleMedia(uv + texel * vec2(-1.0, -1.0)).rgb);"," float tc = lumaOf(sampleMedia(uv + texel * vec2( 0.0, -1.0)).rgb);"," float tr = lumaOf(sampleMedia(uv + texel * vec2( 1.0, -1.0)).rgb);"," float ml = lumaOf(sampleMedia(uv + texel * vec2(-1.0, 0.0)).rgb);"," float mr = lumaOf(sampleMedia(uv + texel * vec2( 1.0, 0.0)).rgb);"," float bl = lumaOf(sampleMedia(uv + texel * vec2(-1.0, 1.0)).rgb);"," float bc = lumaOf(sampleMedia(uv + texel * vec2( 0.0, 1.0)).rgb);"," float br = lumaOf(sampleMedia(uv + texel * vec2( 1.0, 1.0)).rgb);"," float gx = -tl - 2.0 * ml - bl + tr + 2.0 * mr + br;"," float gy = -tl - 2.0 * tc - tr + bl + 2.0 * bc + br;"," return length(vec2(gx, gy));","}","vec3 applyCrosshatch(vec2 uv, vec3 source, float amount){"," if (amount <= 0.0) return source;"," float spacing = mix(5.0, 30.0, clamp(u_crosshatchSpacing, 0.0, 1.0));"," float thickness = mix(1.0, 5.0, clamp(u_crosshatchThickness, 0.0, 1.0));"," float baseAngle = -clamp(u_crosshatchAngle, 0.0, 1.0) * PI;"," float contrast = mix(0.5, 2.0, clamp(u_crosshatchContrast, 0.0, 1.0));"," float darkness = 1.0 - pow(clamp(lumaOf(source), 0.0, 1.0), contrast);"," vec3 ink = paletteColor(0.0);"," vec3 paper = paletteColor(max(u_paletteSize - 1.0, 1.0));"," vec3 result = paper;"," float layer = crosshatchLine(gl_FragCoord.xy, baseAngle, spacing, thickness, 1.0) * smoothstep(0.2, 0.4, darkness);"," result = mix(result, ink, layer);"," layer = crosshatchLine(gl_FragCoord.xy, baseAngle + PI * 0.5, spacing * 0.95, thickness * 0.9, 2.0) * smoothstep(0.4, 0.6, darkness);"," result = mix(result, ink, layer);"," layer = crosshatchLine(gl_FragCoord.xy, baseAngle + PI * 0.25, spacing * 0.9, thickness * 0.8, 3.0) * smoothstep(0.6, 0.8, darkness);"," result = mix(result, ink, layer);"," layer = crosshatchLine(gl_FragCoord.xy, baseAngle - PI * 0.25, spacing * 0.85, thickness * 0.7, 4.0) * smoothstep(0.75, 0.9, darkness);"," result = mix(result, ink, layer);"," result = mix(result, ink, smoothstep(0.9, 1.0, darkness) * 0.8);"," float edgeStrength = mix(0.0, 2.0, clamp(u_crosshatchEdges, 0.0, 1.0));"," float edge = smoothstep(0.1, 0.3, crosshatchEdge(uv)) * edgeStrength;"," result = mix(result, ink, clamp(edge, 0.0, 1.0));"," return mix(source, result, amount);","}","vec3 applyHalftone(vec3 source, float amount){"," if (amount <= 0.0) return source;"," vec3 cmy = 1.0 - source;"," float k = min(cmy.r, min(cmy.g, cmy.b));"," vec3 inks = max(cmy - vec3(k * 0.72), 0.0);"," float scale = min(u_resolution.x, u_resolution.y) / 540.0;"," float cellPx = mix(5.0, 14.0, clamp(u_halftoneSize, 0.0, 1.0)) * max(scale, 0.25);"," vec2 p = gl_FragCoord.xy / max(cellPx, 1.0);"," float cyan = screenDot(p, inks.r, 0.261799, 0.78);"," float magenta = screenDot(p, inks.g, 1.308997, 0.78);"," float yellow = screenDot(p, inks.b, 0.0, 0.78);"," float blackInk = screenDot(p, k, 0.785398, 0.82);"," vec3 printColor = vec3(0.975, 0.962, 0.925);"," printColor *= mix(vec3(1.0), vec3(0.05, 0.79, 0.86), cyan);"," printColor *= mix(vec3(1.0), vec3(0.91, 0.08, 0.48), magenta);"," printColor *= mix(vec3(1.0), vec3(0.98, 0.83, 0.08), yellow);"," printColor *= mix(vec3(1.0), vec3(0.035), blackInk * 0.92);"," return mix(source, printColor, amount);","}","vec3 applyTwoInkPrint(vec3 source, float amount){"," if (amount <= 0.0) return source;"," float sourceLuma = lumaOf(source);"," float darkness = 1.0 - sourceLuma;"," float warmBias = clamp(source.r - (source.g + source.b) * 0.5, -0.35, 0.35);"," float coolBias = clamp((source.g + source.b) * 0.5 - source.r, -0.35, 0.35);"," float redTone = smoothstep(0.08, 0.72, darkness) * (1.0 - 0.68 * smoothstep(0.66, 1.0, darkness));"," float tealTone = smoothstep(0.30, 0.92, darkness);"," float redCoverage = clamp(redTone + warmBias * 1.35 - coolBias * 0.35, 0.0, 1.0);"," float tealCoverage = clamp(tealTone + coolBias * 1.1 - warmBias * 0.45, 0.0, 1.0);"," float scale = min(u_resolution.x, u_resolution.y) / 540.0;"," float cellPx = mix(4.5, 12.0, clamp(u_twoInkPrintSize, 0.0, 1.0)) * max(scale, 0.25);"," vec2 p = gl_FragCoord.xy / max(cellPx, 1.0);"," float redDot = screenDot(p, redCoverage, 0.261799, 0.84);"," float tealDot = screenDot(p + vec2(0.12, -0.08), tealCoverage, 1.308997, 0.84);"," float paperNoise = grainHash(floor(gl_FragCoord.xy * 0.5)) - 0.5;"," vec3 paper = vec3(0.955, 0.910, 0.795) + paperNoise * 0.018;"," vec3 vermilion = vec3(0.88, 0.13, 0.075);"," vec3 teal = vec3(0.035, 0.285, 0.355);"," vec3 overprint = vec3(0.045, 0.055, 0.052);"," vec3 printColor = paper * (1.0 - redDot) * (1.0 - tealDot);"," printColor += vermilion * redDot * (1.0 - tealDot);"," printColor += teal * (1.0 - redDot) * tealDot;"," printColor += overprint * redDot * tealDot;"," return mix(source, clamp(printColor, 0.0, 1.0), amount);","}","vec3 paletteColor(float index){"," if (index < 0.5) return u_palette0;"," if (index < 1.5) return u_palette1;"," if (index < 2.5) return u_palette2;"," if (index < 3.5) return u_palette3;"," if (index < 4.5) return u_palette4;"," return u_palette5;","}","float bayer4(vec2 point){"," vec2 cell = mod(floor(point), 4.0);"," if (cell.y < 0.5) {"," if (cell.x < 0.5) return 0.5 / 16.0;"," if (cell.x < 1.5) return 8.5 / 16.0;"," if (cell.x < 2.5) return 2.5 / 16.0;"," return 10.5 / 16.0;"," }"," if (cell.y < 1.5) {"," if (cell.x < 0.5) return 12.5 / 16.0;"," if (cell.x < 1.5) return 4.5 / 16.0;"," if (cell.x < 2.5) return 14.5 / 16.0;"," return 6.5 / 16.0;"," }"," if (cell.y < 2.5) {"," if (cell.x < 0.5) return 3.5 / 16.0;"," if (cell.x < 1.5) return 11.5 / 16.0;"," if (cell.x < 2.5) return 1.5 / 16.0;"," return 9.5 / 16.0;"," }"," if (cell.x < 0.5) return 15.5 / 16.0;"," if (cell.x < 1.5) return 7.5 / 16.0;"," if (cell.x < 2.5) return 13.5 / 16.0;"," return 5.5 / 16.0;","}","float standardAsciiSample(float brightness, vec2 grid){"," if (brightness < 0.1) return 0.0;"," if (brightness < 0.2) return grid.x == 2.0 && grid.y == 5.0 ? 1.0 : 0.0;"," if (brightness < 0.3) return grid.x == 2.0 && (grid.y == 2.0 || grid.y == 4.0) ? 1.0 : 0.0;"," if (brightness < 0.4) return (grid.y == 2.0 || grid.y == 4.0) && grid.x >= 1.0 && grid.x <= 3.0 ? 1.0 : 0.0;"," if (brightness < 0.5) {"," bool cross = (grid.x == 2.0 && grid.y >= 2.0 && grid.y <= 4.0) || (grid.y == 3.0 && grid.x >= 1.0 && grid.x <= 3.0);"," bool diagonals = (grid.x == 1.0 || grid.x == 3.0) && (grid.y == 2.0 || grid.y == 4.0);"," return cross || diagonals ? 1.0 : 0.0;"," }"," if (brightness < 0.6) {"," bool ring = ((grid.y == 2.0 || grid.y == 4.0) && grid.x >= 1.0 && grid.x <= 3.0) || ((grid.x == 1.0 || grid.x == 3.0) && grid.y == 3.0);"," return ring ? 1.0 : 0.0;"," }"," bool outline = ((grid.y == 1.0 || grid.y == 5.0) && grid.x >= 1.0 && grid.x <= 3.0) || ((grid.x == 0.0 || grid.x == 4.0) && grid.y >= 2.0 && grid.y <= 4.0) || ((grid.x == 1.0 || grid.x == 3.0) && grid.y >= 1.0 && grid.y <= 5.0);"," if (brightness < 0.7) return outline ? 1.0 : 0.0;"," if (brightness < 0.8) {"," bool slash = abs(grid.x - 2.0) == abs(grid.y - 3.0) && grid.x >= 1.0 && grid.x <= 3.0;"," return outline || slash ? 1.0 : 0.0;"," }"," if (brightness < 0.9) {"," bool loops = ((grid.y == 1.0 || grid.y == 3.0 || grid.y == 5.0) && grid.x >= 1.0 && grid.x <= 3.0) || ((grid.x == 1.0 || grid.x == 3.0) && (grid.y == 2.0 || grid.y == 4.0));"," return loops ? 1.0 : 0.0;"," }"," return 1.0;","}","float asciiStyleSample(float style, float brightness, vec2 uv){"," vec2 grid = floor(uv * vec2(5.0, 7.0));"," if (style < 0.5) return standardAsciiSample(brightness, grid);"," if (style < 1.5) {"," float checker = mod(grid.x + grid.y, 2.0);"," float ruled = mod(grid.x, 2.0) == 0.0 || mod(grid.y, 2.0) == 0.0 ? 1.0 : 0.0;"," if (brightness < 0.125) return 0.0;"," if (brightness < 0.25) return checker == 0.0 ? 0.5 : 0.0;"," if (brightness < 0.375) return ruled * 0.6;"," if (brightness < 0.5) return checker == 0.0 ? 1.0 : 0.0;"," if (brightness < 0.625) return ruled > 0.5 ? 1.0 : 0.3;"," if (brightness < 0.75) return checker == 0.0 ? 1.0 : 0.7;"," if (brightness < 0.875) return ruled > 0.5 ? 1.0 : 0.85;"," return 1.0;"," }"," if (style < 2.5) {"," if (brightness < 0.14) return 0.0;"," if (brightness < 0.28) return grid.x == 2.0 && grid.y == 1.0 ? 1.0 : 0.0;"," if (brightness < 0.42) return grid.x == 2.0 && grid.y == 5.0 ? 1.0 : 0.0;"," if (brightness < 0.56) return grid.y == 3.0 && grid.x >= 1.0 && grid.x <= 3.0 ? 1.0 : 0.0;"," if (brightness < 0.7) return (grid.x == 2.0 && grid.y >= 2.0 && grid.y <= 4.0) || (grid.y == 3.0 && grid.x >= 1.0 && grid.x <= 3.0) ? 1.0 : 0.0;"," if (brightness < 0.84) return abs(grid.x - 2.0) == abs(grid.y - 3.0) && grid.y >= 2.0 && grid.y <= 4.0 ? 1.0 : 0.0;"," return grid.x == 1.0 || grid.x == 3.0 || grid.y == 2.0 || grid.y == 4.0 ? 1.0 : 0.0;"," }"," if (style < 3.5) return grid.y >= 6.0 - brightness * 7.0 ? 1.0 : 0.0;"," if (style < 4.5) {"," vec2 dots = floor(uv * vec2(2.0, 4.0));"," if (brightness < 0.125) return 0.0;"," if (brightness < 0.25) return dots.y == 3.0 ? 1.0 : 0.0;"," if (brightness < 0.375) return dots.y >= 2.0 ? 1.0 : 0.0;"," if (brightness < 0.5) return dots.y >= 1.0 ? 1.0 : 0.0;"," if (brightness < 0.625) return dots.y >= 1.0 || dots.x == 1.0 ? 1.0 : 0.0;"," if (brightness < 0.75) return 1.0;"," if (brightness < 0.875) return mod(grid.x + grid.y, 2.0) < 1.5 ? 1.0 : 0.7;"," return 1.0;"," }"," if (style < 5.5) {"," if (brightness < 0.125) return 0.0;"," if (brightness < 0.25) return grid.x == 2.0 && grid.y == 3.0 ? 1.0 : 0.0;"," if (brightness < 0.375) return grid.y == 3.0 && grid.x >= 1.0 && grid.x <= 3.0 ? 1.0 : 0.0;"," if (brightness < 0.5) return grid.x + grid.y == 5.0 || grid.x + grid.y == 6.0 ? 1.0 : 0.0;"," if (brightness < 0.625) return grid.x == 2.0 ? 1.0 : 0.0;"," if (brightness < 0.75) return abs(grid.x - grid.y / 1.4) < 0.7 && grid.x >= 1.0 && grid.x <= 3.0 ? 1.0 : 0.0;"," if (brightness < 0.875) return grid.x == 2.0 || grid.y == 3.0 ? 1.0 : 0.0;"," return grid.x == 1.0 || grid.x == 3.0 || grid.y == 2.0 || grid.y == 4.0 ? 1.0 : 0.0;"," }"," if (style < 6.5) {"," bool top = grid.y == 0.0 && grid.x >= 1.0 && grid.x <= 3.0;"," bool topLeft = grid.x == 1.0 && grid.y <= 3.0;"," bool topRight = grid.x == 3.0 && grid.y <= 3.0;"," bool middle = grid.y == 3.0 && grid.x >= 1.0 && grid.x <= 3.0;"," bool bottomLeft = grid.x == 1.0 && grid.y >= 3.0;"," bool bottomRight = grid.x == 3.0 && grid.y >= 3.0;"," bool bottom = grid.y == 6.0 && grid.x >= 1.0 && grid.x <= 3.0;"," if (brightness < 0.1) return 0.0;"," if (brightness < 0.2) return topRight || bottomRight ? 1.0 : 0.0;"," if (brightness < 0.3) return top || topRight || middle || bottomLeft || bottom ? 1.0 : 0.0;"," if (brightness < 0.4) return top || topRight || middle || bottomRight || bottom ? 1.0 : 0.0;"," if (brightness < 0.5) return topLeft || middle || topRight || bottomRight ? 1.0 : 0.0;"," if (brightness < 0.6) return top || topLeft || middle || bottomRight || bottom ? 1.0 : 0.0;"," if (brightness < 0.7) return top || topLeft || middle || bottomLeft || bottomRight || bottom ? 1.0 : 0.0;"," if (brightness < 0.8) return top || topRight || bottomRight ? 1.0 : 0.0;"," if (brightness < 0.9) return top || topLeft || topRight || middle || bottomLeft || bottomRight || bottom ? 1.0 : 0.0;"," return top || topLeft || topRight || middle || bottomRight || bottom ? 1.0 : 0.0;"," }"," float slash = grid.x - grid.y;"," float backslash = grid.x + grid.y;"," if (brightness < 0.16) return 0.0;"," if (brightness < 0.33) return mod(slash, 3.0) < 0.5 ? 1.0 : 0.0;"," if (brightness < 0.5) return mod(slash, 2.0) < 0.5 ? 1.0 : 0.0;"," bool diagonalA = mod(slash, 2.0) < 0.5;"," bool diagonalB = mod(backslash, 2.0) < 0.5;"," if (brightness < 0.66) return diagonalA || diagonalB ? 1.0 : 0.0;"," if (brightness < 0.83) return mod(slash, 1.5) < 0.5 || mod(backslash, 1.5) < 0.5 ? 1.0 : 0.2;"," return mod(slash, 1.0) < 0.6 || mod(backslash, 1.0) < 0.6 ? 1.0 : 0.5;","}","vec3 rgbToHsv(vec3 color){"," float maximum = max(max(color.r, color.g), color.b);"," float minimum = min(min(color.r, color.g), color.b);"," float delta = maximum - minimum;"," float hue = 0.0;"," if (delta > 0.00001) {"," if (maximum == color.r) hue = mod((color.g - color.b) / delta, 6.0);"," else if (maximum == color.g) hue = (color.b - color.r) / delta + 2.0;"," else hue = (color.r - color.g) / delta + 4.0;"," hue = fract(hue / 6.0);"," }"," return vec3(hue, maximum > 0.00001 ? delta / maximum : 0.0, maximum);","}","vec3 hsvToRgb(vec3 color){"," vec3 bands = abs(fract(color.xxx + vec3(0.0, 0.6666667, 0.3333333)) * 6.0 - 3.0);"," return color.z * mix(vec3(1.0), clamp(bands - 1.0, 0.0, 1.0), color.y);","}","vec4 sampleAdvancedCurve(float coordinate, float row){",` float position = clamp(coordinate, 0.0, 1.0) * ${Ob};`," float lower = floor(position);",` float upper = min(lower + 1.0, ${Ob});`,` float y = (row + 0.5) / ${MT};`,` vec4 before = texture2D(u_advanced, vec2((lower + 0.5) / ${Ac}, y));`,` vec4 after = texture2D(u_advanced, vec2((upper + 0.5) / ${Ac}, y));`," return mix(before, after, position - lower);","}","vec4 advancedConfig(float index){",` return texture2D(u_advanced, vec2((index + 0.5) / ${Ac}, ${NT}));`,"}","vec3 wheelDirection(float hue){"," vec3 direction = hsvToRgb(vec3(fract(hue), 1.0, 1.0));"," direction -= vec3(lumaOf(direction));"," return direction / max(max(max(abs(direction.r), abs(direction.g)), abs(direction.b)), 0.0001);","}","vec3 applyTonalWheels(vec3 color){"," float luma = lumaOf(color);"," float shadows = 1.0 - smoothstep(0.0, 0.6, luma);"," float highlights = smoothstep(0.4, 1.0, luma);"," float midtones = max(0.0, 1.0 - shadows - highlights);"," float total = max(shadows + midtones + highlights, 0.0001);"," vec3 weights = vec3(shadows, midtones, highlights) / total;"," color += wheelDirection(u_shadowWheel.x) * u_shadowWheel.y * weights.x * 0.18;"," color += wheelDirection(u_midtoneWheel.x) * u_midtoneWheel.y * weights.y * 0.18;"," color += wheelDirection(u_highlightWheel.x) * u_highlightWheel.y * weights.z * 0.18;"," color += u_shadowWheel.z * weights.x * 0.25;"," color += u_midtoneWheel.z * weights.y * 0.25;"," color += u_highlightWheel.z * weights.z * 0.25;"," return color;","}","vec3 applyRgbCurves(vec3 color){"," if (u_rgbCurvesEnabled < 0.5) return color;"," vec3 master = vec3("," sampleAdvancedCurve(color.r, 0.0).a,"," sampleAdvancedCurve(color.g, 0.0).a,"," sampleAdvancedCurve(color.b, 0.0).a"," );"," return vec3("," sampleAdvancedCurve(master.r, 0.0).r,"," sampleAdvancedCurve(master.g, 0.0).g,"," sampleAdvancedCurve(master.b, 0.0).b"," );","}","float decodeSigned(float value){ return (value * 255.0 - 128.0) / 127.0; }","vec3 applyHueCurves(vec3 color){"," if (u_hueCurvesEnabled < 0.5) return color;"," vec3 hsv = rgbToHsv(clamp(color, 0.0, 1.0));"," vec3 curves = sampleAdvancedCurve(hsv.x, 1.0).rgb;"," float originalLuma = lumaOf(color);"," hsv.x = fract(hsv.x + decodeSigned(curves.r) * 0.5);"," hsv.y = clamp(hsv.y * max(0.0, 1.0 + decodeSigned(curves.g)), 0.0, 1.0);"," vec3 shifted = hsvToRgb(hsv);"," shifted += vec3(originalLuma - lumaOf(shifted) + decodeSigned(curves.b));"," return shifted;","}","float softRangeMask(float value, float minimum, float maximum, float softness){"," if (value < minimum) {"," if (softness <= 0.0) return 0.0;"," return smoothstep(minimum - softness, minimum, value);"," }"," if (value > maximum) {"," if (softness <= 0.0) return 0.0;"," return 1.0 - smoothstep(maximum, maximum + softness, value);"," }"," return 1.0;","}","float hueRangeMask(float hue, float saturation, vec3 key){"," float distance = abs(fract(hue - key.x + 0.5) - 0.5) * 360.0;"," float range = key.y * 180.0;"," float softness = key.z * 180.0;"," if (range < 179.999 && saturation < 0.001) return 0.0;"," if (distance <= range) return 1.0;"," if (softness <= 0.0) return 0.0;"," return 1.0 - smoothstep(range, range + softness, distance);","}","vec3 applySecondary(vec3 color, float index){"," float base = index * 5.0;"," vec4 hueKey = advancedConfig(base);"," vec4 saturationKey = advancedConfig(base + 1.0);"," vec4 lumaKey = advancedConfig(base + 2.0);"," vec4 correction = advancedConfig(base + 3.0);"," vec4 tintCorrection = advancedConfig(base + 4.0);"," vec3 hsv = rgbToHsv(clamp(color, 0.0, 1.0));"," float luma = lumaOf(color);"," float mask = hueRangeMask(hsv.x, hsv.y, hueKey.rgb);"," mask *= softRangeMask(hsv.y, saturationKey.x, saturationKey.y, saturationKey.z * 0.5);"," mask *= softRangeMask(luma, lumaKey.x, lumaKey.y, lumaKey.z * 0.5);"," if (mask <= 0.0) return color;"," hsv.x = fract(hsv.x + decodeSigned(correction.x) * 0.5);"," vec3 corrected = hsvToRgb(hsv);"," float correctedLuma = lumaOf(corrected);"," corrected = mix(vec3(correctedLuma), corrected, max(0.0, 1.0 + decodeSigned(correction.y)));"," corrected += vec3(decodeSigned(correction.z));"," float temperature = decodeSigned(correction.w);"," float tint = decodeSigned(tintCorrection.x);"," corrected.r += temperature * 0.08 + tint * 0.04;"," corrected.b -= temperature * 0.08 - tint * 0.04;"," corrected.g -= tint * 0.08;"," return mix(color, corrected, mask);","}","vec3 applyAdvancedGrade(vec3 color){"," color = applyTonalWheels(color);"," color = applyRgbCurves(color);"," color = applyHueCurves(color);"," if (u_secondaryCount > 0.5) color = applySecondary(color, 0.0);"," if (u_secondaryCount > 1.5) color = applySecondary(color, 1.0);"," if (u_secondaryCount > 2.5) color = applySecondary(color, 2.0);"," if (u_secondaryCount > 3.5) color = applySecondary(color, 3.0);"," return color;","}","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));","}","vec3 applyPrimaryGrade(vec3 color){"," color *= 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));"," return color;","}","vec3 applyColorGrade(vec3 color){"," color = applyPrimaryGrade(color);"," color = applyAdvancedGrade(color);"," return clamp(applyLut(clamp(color, 0.0, 1.0)), 0.0, 1.0);","}","vec3 applyDither(vec3 source, float amount){"," if (amount <= 0.0) return source;"," float scale = max(min(u_resolution.x, u_resolution.y) / 540.0, 0.25);"," float pixelSize = mix(1.0, 5.0, clamp(u_ditherSize, 0.0, 1.0)) * scale;"," vec2 block = floor(gl_FragCoord.xy / max(pixelSize, 1.0));"," float levels = clamp(u_paletteSize, 2.0, 6.0);"," float index = floor(clamp(lumaOf(source) * (levels - 1.0) + bayer4(block), 0.0, levels - 1.0));"," return mix(source, paletteColor(index), amount);","}","vec2 asciiEdgeDirection(vec2 uv, vec2 stepUv){"," float topLeft = bt601Luma(sampleMedia(uv + vec2(-stepUv.x, -stepUv.y)).rgb);"," float top = bt601Luma(sampleMedia(uv + vec2(0.0, -stepUv.y)).rgb);"," float topRight = bt601Luma(sampleMedia(uv + vec2(stepUv.x, -stepUv.y)).rgb);"," float left = bt601Luma(sampleMedia(uv + vec2(-stepUv.x, 0.0)).rgb);"," float right = bt601Luma(sampleMedia(uv + vec2(stepUv.x, 0.0)).rgb);"," float bottomLeft = bt601Luma(sampleMedia(uv + vec2(-stepUv.x, stepUv.y)).rgb);"," float bottom = bt601Luma(sampleMedia(uv + vec2(0.0, stepUv.y)).rgb);"," float bottomRight = bt601Luma(sampleMedia(uv + stepUv).rgb);"," float x = -topLeft - 2.0 * left - bottomLeft + topRight + 2.0 * right + bottomRight;"," float y = -topLeft - 2.0 * top - topRight + bottomLeft + 2.0 * bottom + bottomRight;"," return vec2(x, y);","}","vec2 rotateAsciiUv(vec2 uv, float angle){"," float cosine = cos(angle);"," float sine = sin(angle);"," vec2 centered = uv - 0.5;"," return vec2(centered.x * cosine - centered.y * sine, centered.x * sine + centered.y * cosine) + 0.5;","}","vec3 applyAscii(vec3 source, float amount){"," if (amount <= 0.0) return source;"," float scale = max(min(u_resolution.x, u_resolution.y) / 540.0, 0.25);"," float cellHeight = mix(4.0, 80.0, clamp(u_asciiSize, 0.0, 1.0)) * scale;"," vec2 cellSize = vec2(cellHeight);"," vec2 cell = floor(gl_FragCoord.xy / cellSize);"," vec2 cellVuv = (cell + 0.5) * cellSize / max(u_resolution, vec2(1.0));"," vec2 cellUv = (cellVuv - u_uvOffset) / u_uvScale;"," cellUv = applyCrtWarp(cellUv);"," vec3 cellColor = applyColorGrade(sampleMedia(cellUv).rgb);"," float brightness = bt601Luma(cellColor);"," float invert = step(0.5, u_asciiInvert);"," brightness = mix(brightness, 1.0 - brightness, invert);"," vec2 glyphUv = fract(gl_FragCoord.xy / cellSize);"," float rotation = clamp(u_asciiRotation, 0.0, 1.0);"," if (rotation > 0.0) {"," vec2 cellStepUv = cellSize / max(u_resolution * u_uvScale, vec2(1.0));"," vec2 edge = asciiEdgeDirection(cellUv, cellStepUv);"," if (length(edge) > 0.1) glyphUv = mix(glyphUv, rotateAsciiUv(glyphUv, atan(edge.y, edge.x)), rotation);"," }"," float ink = asciiStyleSample(floor(u_asciiStyle + 0.5), brightness, glyphUv);"," vec3 background = paletteColor(0.0);"," vec3 inkColor = mix(paletteColor(max(u_paletteSize - 1.0, 1.0)), cellColor, clamp(u_asciiColor, 0.0, 1.0));"," vec3 asciiColor = mix(background, inkColor, ink);"," return mix(source, asciiColor, amount);","}","vec3 applyScanlines(vec3 source, float amount){"," if (amount <= 0.0) return source;"," float count = mix(50.0, 500.0, clamp(u_scanlineCount, 0.0, 1.0));"," float softness = clamp(u_scanlineSoftness, 0.0, 1.0);"," float wave = 0.5 + 0.5 * sin(v_uv.y * count * PI);"," float line = mix(1.0 - wave, pow(1.0 - wave, 2.2), softness);"," return source * (1.0 - line * amount);","}","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);"," uv = applyCrtWarp(uv);"," vec2 displayEdge = smoothstep(vec2(0.0), vec2(0.006), uv) * (1.0 - smoothstep(vec2(0.994), vec2(1.0), uv));"," float displayMask = displayEdge.x * displayEdge.y;"," vec4 sampleColor = sampleMedia(uv);"," sampleColor = sampleChromaticMedia(uv, sampleColor);"," sampleColor.rgb = applyDigitalGlitch(uv, sampleColor.rgb);"," vec3 original = originalSample.rgb;"," vec3 color = mix(sampleColor.rgb, applyColorGrade(sampleColor.rgb), u_intensity);"," 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);"," }"," float filmArtifacts = clamp(u_filmArtifacts, 0.0, 1.0);"," if (filmArtifacts > 0.0) {"," float filmFrame = floor(u_grainSeed);"," float dust = dustMask(v_uv, floor(filmFrame / 3.0));"," float dustTone = grainHash(vec2(floor(filmFrame / 3.0), 8.0));"," color = mix(color, vec3(dustTone > 0.5 ? 0.95 : 0.02), dust * 0.72 * filmArtifacts);"," float scratchBucket = floor(filmFrame / 12.0);"," float scratchX = grainHash(vec2(scratchBucket, 4.2));"," float scratchLife = step(0.78, grainHash(vec2(scratchBucket, 8.4)));"," float scratch = (1.0 - smoothstep(0.0, 1.4 / max(u_resolution.x, 1.0), abs(v_uv.x - scratchX))) * scratchLife;"," color = mix(color, vec3(0.94, 0.88, 0.76), scratch * 0.28 * filmArtifacts);"," }"," color = applyMonoScreen(clamp(color, 0.0, 1.0), clamp(u_monoScreen, 0.0, 1.0));"," color = applyEngraving(clamp(color, 0.0, 1.0), clamp(u_engraving, 0.0, 1.0));"," color = applyCrosshatch(uv, clamp(color, 0.0, 1.0), clamp(u_crosshatch, 0.0, 1.0));"," color = applyHalftone(clamp(color, 0.0, 1.0), clamp(u_halftone, 0.0, 1.0));"," color = applyTwoInkPrint(clamp(color, 0.0, 1.0), clamp(u_twoInkPrint, 0.0, 1.0));"," color = applyDither(clamp(color, 0.0, 1.0), clamp(u_dither, 0.0, 1.0));"," color = applyAscii(clamp(color, 0.0, 1.0), clamp(u_ascii, 0.0, 1.0));"," if (u_bloomReady > 0.5 && u_bloom > 0.0) color += sampleBloom(uv) * u_bloom;"," color = applyScanlines(clamp(color, 0.0, 1.0), clamp(u_scanlines, 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 warpActive = step(0.0001, u_crtCurvature);"," color *= mix(1.0, displayMask, warpActive);"," vec3 graded = clamp(color, 0.0, 1.0);"," 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(`
|
|
358
358
|
`),IT=["#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;","uniform float u_bloomPass;","uniform float u_threshold;","vec4 readSource(vec2 uv){"," vec4 color = texture2D(u_source, clamp(uv, vec2(0.0), vec2(1.0)));"," if (u_bloomPass > 0.5) {"," float luminance = dot(color.rgb, vec3(0.299, 0.587, 0.114));"," if (u_threshold >= 0.0 && luminance <= u_threshold) color.rgb = vec3(0.0);"," return vec4(color.rgb, 1.0);"," }"," color.rgb *= color.a;"," return color;","}","void main(){"," if (u_bloomPass > 0.5) {"," vec2 stepUv = u_direction * max(u_radius, 0.0) / max(u_resolution, vec2(1.0)) * 0.5;"," vec4 bloom = readSource(v_uv) * 0.227027;"," bloom += readSource(v_uv + stepUv) * 0.1945946;"," bloom += readSource(v_uv - stepUv) * 0.1945946;"," bloom += readSource(v_uv + stepUv * 2.0) * 0.1216216;"," bloom += readSource(v_uv - stepUv * 2.0) * 0.1216216;"," bloom += readSource(v_uv + stepUv * 3.0) * 0.054054;"," bloom += readSource(v_uv - stepUv * 3.0) * 0.054054;"," bloom += readSource(v_uv + stepUv * 4.0) * 0.016216;"," bloom += readSource(v_uv - stepUv * 4.0) * 0.016216;"," gl_FragColor = bloom;"," return;"," }"," 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(`
|
|
359
359
|
`),DT=["#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 vec2 u_texel;","uniform vec2 u_uvScale;","uniform vec2 u_uvOffset;","uniform float u_blurReady;","uniform float u_blur;","uniform float u_kuwaharaRadius;","vec3 readPrepared(vec2 displayUv){"," vec2 uv = (displayUv - u_uvOffset) / u_uvScale;"," vec3 color = texture2D(u_source, clamp(uv, vec2(0.0), vec2(1.0))).rgb;"," if (u_blurReady > 0.5 && u_blur > 0.0) {"," vec3 blurred = texture2D(u_blurSource, clamp(uv, vec2(0.0), vec2(1.0))).rgb;"," color = mix(color, blurred, clamp(u_blur, 0.0, 1.0));"," }"," return color;","}","void main(){"," float radius = floor(mix(2.0, 16.0, clamp(u_kuwaharaRadius, 0.0, 1.0)) + 0.5);"," vec3 sum = vec3(0.0);"," float sumSquares = 0.0;"," float count = 0.0;"," for (int offset = 0; offset <= 16; offset++) {"," if (float(offset) > radius) continue;"," vec3 color = readPrepared(v_uv + vec2(float(offset), 0.0) * u_texel);"," sum += color;"," sumSquares += dot(color, color) / 3.0;"," count += 1.0;"," }"," gl_FragColor = vec4(sum / count, sumSquares / count);","}"].join(`
|