diff --git a/.gitattributes b/.gitattributes index 813d01f500e75b1163ab342b1d7cb93b5c0e6f13..1872eeb6993ec5c7b09f6f99358fd832c13124c5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -65,3 +65,49 @@ live/preview_15.mp4 filter=lfs diff=lfs merge=lfs -text live/preview_16.mp4 filter=lfs diff=lfs merge=lfs -text live/preview_17.mp4 filter=lfs diff=lfs merge=lfs -text live/preview_18.mp4 filter=lfs diff=lfs merge=lfs -text +fonts/lw-sc-500.woff2 filter=lfs diff=lfs merge=lfs -text +fonts/lw-sc-700.woff2 filter=lfs diff=lfs merge=lfs -text +fonts/lw-smiley.woff2 filter=lfs diff=lfs merge=lfs -text +live/cover_19.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_20.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_21.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_22.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_23.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_24.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_25.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_26.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_27.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_28.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_29.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_30.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_33.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_34.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_36.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_37.jpg filter=lfs diff=lfs merge=lfs -text +live/cover_38.jpg filter=lfs diff=lfs merge=lfs -text +live/preview_19.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_20.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_21.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_22.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_23.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_24.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_25.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_26.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_27.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_28.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_29.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_30.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_31.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_32.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_33.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_34.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_35.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_36.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_37.mp4 filter=lfs diff=lfs merge=lfs -text +live/preview_38.mp4 filter=lfs diff=lfs merge=lfs -text +samples/bubble-tea.jpg filter=lfs diff=lfs merge=lfs -text +samples/slippers.jpg filter=lfs diff=lfs merge=lfs -text +samples/steamed-bun.jpg filter=lfs diff=lfs merge=lfs -text +samples/traffic-light.jpg filter=lfs diff=lfs merge=lfs -text +samples/umbrella.jpg filter=lfs diff=lfs merge=lfs -text +samples/yawn.jpg filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md index 3d7f123793b3cbf6ad7a9e7392ab17c1f4a4257f..33c33519c07b0b87bfc59a029262c761c2f29eec 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,18 @@ sdk: static pinned: false --- -# 这个用英语怎么说?· 日常英语实况图素材包 +# 这个用英语怎么说?· 日常英语实况图 -两组共 18 张苹果实况图(Live Photo),竖屏 3:4(1080×1440,30fps)。 +## 实况图制作工具(首页) +上传底图,填写单词和中文,选择读音(维基共享资源真人录音 / 上传音频 / 自己录音)、音效和样式,直接在浏览器里导出苹果实况照片(JPG + MOV,带声音)。默认开启「微信朋友圈兼容」,成片不超过 3 秒。全部在本地浏览器处理,不上传任何文件。 +(「语音合成」需要网站后端,静态部署下不可用。) -- 封面:一张日常生活照,中间以「问网友」的形式提问「「X」用英语怎么说?」。 -- 实况:卡片展开,字母逐个打出揭晓单词,配美式音标、中文释义、两遍真人英语发音和音效。 -- 第一组:AI 生成的写实生活照;第二组:Wikimedia Commons 上允许商用的知识共享 / 公有领域真实照片(作者与授权见页面及素材包)。 +## 示例素材包 +- 第一组:生活照(AI 生成)· 9 张 +- 第二组:真实照片(Wikimedia Commons 授权图片,作者与授权见页面及素材包)· 9 张 +- 第三组:看图填空 G _ _ · 10 张 +- 第四组:看图填空 _ A Y · 10 张 -打开页面即可预览并下载每组 JPG + MOV 压缩包。Mac 上把同一组的 JPG 和 MOV 一起拖进「照片」App,即识别为实况照片。 +每组提供 JPG + MOV 压缩包。Mac 上把同一组的 JPG 和 MOV 一起拖进「照片」App,即识别为实况照片。所有实况均 ≤ 3 秒,可发微信朋友圈、小红书、抖音图文。 -`source/` 目录为网页与制作脚本源码(渲染、配音、音效、实况配对)。实况配对基于 [LiveCanvas](https://github.com/pengchujin/livecanvas)(MIT / Apache-2.0),扩展为保留音轨。 +`source/` 为网页、制作脚本源码。实况配对基于 [LiveCanvas](https://github.com/pengchujin/livecanvas)(MIT / Apache-2.0),扩展为保留音轨;视频编码使用 ffmpeg.wasm。 diff --git a/assets/App-ByzOK7-l.js b/assets/App-ByzOK7-l.js deleted file mode 100644 index 77cd216de03b78d0f1821aa900097850fe0fd9f1..0000000000000000000000000000000000000000 --- a/assets/App-ByzOK7-l.js +++ /dev/null @@ -1,65 +0,0 @@ -import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as a}from"./index-DG-bRo1I.js";import"./index-Df5cY6wZ.js";/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const v=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),h=(...i)=>i.filter((r,s,t)=>!!r&&r.trim()!==""&&t.indexOf(r)===s).join(" ").trim();/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var b={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const f=a.forwardRef(({color:i="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:t,className:n="",children:l,iconNode:o,...x},u)=>a.createElement("svg",{ref:u,...b,width:r,height:r,stroke:i,strokeWidth:t?Number(s)*24/Number(r):s,className:h("lucide",n),...x},[...o.map(([g,w])=>a.createElement(g,w)),...Array.isArray(l)?l:[l]]));/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c=(i,r)=>{const s=a.forwardRef(({className:t,...n},l)=>a.createElement(f,{ref:l,iconNode:r,className:h(`lucide-${v(i)}`,t),...n}));return s.displayName=`${i}`,s};/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const j=c("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _=c("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const C=c("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k=c("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y=c("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** - * @license lucide-react v0.454.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const N=c("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),d={version:"1792234823",sets:[{key:"a",name:"第一组 · 生活照(AI 生成)",zip:"daily-english-live-photos.zip",zipMB:45.2,items:[{id:"01",index:1,zh:"拖鞋",en:"slippers",ipa:"/ˈslɪpərz/",cat:"物",duration:4.03,cover:"cover_01.jpg",preview:"preview_01.mp4",identifier:"8FF2AC15-B32A-4D13-8E9E-06D68A4B4B4D"},{id:"02",index:2,zh:"牙刷",en:"toothbrush",ipa:"/ˈtuːθbrʌʃ/",cat:"物",duration:4.13,cover:"cover_02.jpg",preview:"preview_02.mp4",identifier:"CE020DC5-C55B-453F-9FB6-57674364B72A"},{id:"03",index:3,zh:"雨伞",en:"umbrella",ipa:"/ʌmˈbrelə/",cat:"物",duration:3.8,cover:"cover_03.jpg",preview:"preview_03.mp4",identifier:"F757F373-0F98-40EA-A71A-B8C420D77C35"},{id:"04",index:4,zh:"闹钟",en:"alarm clock",ipa:"/əˈlɑːrm klɑːk/",cat:"物",duration:4.43,cover:"cover_04.jpg",preview:"preview_04.mp4",identifier:"CC9885DD-2DD1-4797-B007-A08315303FDE"},{id:"05",index:5,zh:"外卖小哥",en:"delivery rider",ipa:"/dɪˈlɪvəri ˈraɪdər/",cat:"人",duration:4.8,cover:"cover_05.jpg",preview:"preview_05.mp4",identifier:"2D8160CA-0F07-40CF-A3C2-895469598F13"},{id:"06",index:6,zh:"堵车",en:"traffic jam",ipa:"/ˈtræfɪk dʒæm/",cat:"事",duration:4.4,cover:"cover_06.jpg",preview:"preview_06.mp4",identifier:"36AA6AFC-C1DC-4E3C-A39B-7BEBDE15F380"},{id:"07",index:7,zh:"充电宝",en:"power bank",ipa:"/ˈpaʊər bæŋk/",cat:"物",duration:3.83,cover:"cover_07.jpg",preview:"preview_07.mp4",identifier:"E72ED831-0A58-45A2-AC51-DF26E33877BA"},{id:"08",index:8,zh:"电饭煲",en:"rice cooker",ipa:"/ˈraɪs ˌkʊkər/",cat:"物",duration:4.13,cover:"cover_08.jpg",preview:"preview_08.mp4",identifier:"C91548A9-6B9D-438A-B5C4-C6C3E4E9D771"},{id:"09",index:9,zh:"奶茶",en:"bubble tea",ipa:"/ˈbʌbəl tiː/",cat:"物",duration:4.17,cover:"cover_09.jpg",preview:"preview_09.mp4",identifier:"51FF00B9-1A36-4CA5-AEF1-6073874A71DB"}],copy:{title:"9个天天见的东西,英语你能说出几个?",body:`每天都在用,却不一定叫得出英文名👀 -先看封面猜一猜,再长按实况看答案(记得开声音🔊) -评论区报一下你答对了几个~ - -拖鞋 / 牙刷 / 雨伞 / 闹钟 / 外卖小哥 / 堵车 / 充电宝 / 电饭煲 / 奶茶 - -#英语单词 #日常英语 #英语口语 #实况图 #每日英语 #英语学习 #单词打卡`},credits:[]},{key:"b",name:"第二组 · 真实照片(网络授权图片)",zip:"daily-english-live-photos-set2.zip",zipMB:62.6,items:[{id:"10",index:1,zh:"红绿灯",en:"traffic light",ipa:"/ˈtræfɪk laɪt/",cat:"物",duration:4.27,cover:"cover_10.jpg",preview:"preview_10.mp4",identifier:"7FE90546-61AA-43D8-B527-35A89B92DBF3"},{id:"11",index:2,zh:"自动扶梯",en:"escalator",ipa:"/ˈeskəleɪtər/",cat:"物",duration:4.03,cover:"cover_11.jpg",preview:"preview_11.mp4",identifier:"E62D2FF1-36F4-46EB-8105-638AB6ACCB76"},{id:"12",index:3,zh:"遥控器",en:"remote control",ipa:"/rɪˌmoʊt kənˈtroʊl/",cat:"物",duration:4.63,cover:"cover_12.jpg",preview:"preview_12.mp4",identifier:"5BC66F4C-166F-42C2-858F-FBB442469BAF"},{id:"13",index:4,zh:"保温杯",en:"thermos",ipa:"/ˈθɜːrməs/",cat:"物",duration:3.67,cover:"cover_13.jpg",preview:"preview_13.mp4",identifier:"2A73A39B-3797-444C-8495-D45465ED173E"},{id:"14",index:5,zh:"指甲刀",en:"nail clippers",ipa:"/ˈneɪl ˌklɪpərz/",cat:"物",duration:4.83,cover:"cover_14.jpg",preview:"preview_14.mp4",identifier:"A23B54B0-D5C3-485C-95CB-538534365933"},{id:"15",index:6,zh:"包子",en:"steamed bun",ipa:"/ˌstiːmd ˈbʌn/",cat:"物",duration:4.07,cover:"cover_15.jpg",preview:"preview_15.mp4",identifier:"79DDF372-1DDD-4401-9EE4-F6C443DF9E2B"},{id:"16",index:7,zh:"理发师",en:"barber",ipa:"/ˈbɑːrbər/",cat:"人",duration:3.37,cover:"cover_16.jpg",preview:"preview_16.mp4",identifier:"DF0BF6D9-8C37-4A79-8DF1-C13C77BC99E7"},{id:"17",index:8,zh:"打哈欠",en:"yawn",ipa:"/jɔːn/",cat:"事",duration:3.33,cover:"cover_17.jpg",preview:"preview_17.mp4",identifier:"FDDF00C1-3532-4A57-8CCA-AA86D452D2D5"},{id:"18",index:9,zh:"垃圾桶",en:"trash can",ipa:"/ˈtræʃ kæn/",cat:"物",duration:4.3,cover:"cover_18.jpg",preview:"preview_18.mp4",identifier:"43035BA2-DCDD-409F-99C2-7095714D9C70"}],copy:{title:"这9个东西天天见,英语你都会说吗?",body:`天天见到的东西,换成英文就卡壳?👀 -先看封面猜一猜,再长按实况看答案(记得开声音🔊) -评论区报一下你答对了几个~ - -红绿灯 / 自动扶梯 / 遥控器 / 保温杯 / 指甲刀 / 包子 / 理发师 / 打哈欠 / 垃圾桶 - -图片来源:Wikimedia Commons(作者与授权见素材包内说明) - -#英语单词 #日常英语 #英语口语 #实况图 #每日英语 #英语学习 #单词打卡`},credits:[{id:"10",zh:"红绿灯",en:"traffic light",author:"Gary",license:"CC BY-SA 2.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/2.0",page:"https://commons.wikimedia.org/wiki/File:UK_Green_Traffic_Light_Signal_-_geograph.org.uk_-_5264299.jpg"},{id:"11",zh:"自动扶梯",en:"escalator",author:"Dinkun Chen",license:"CC BY-SA 4.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/4.0",page:"https://commons.wikimedia.org/wiki/File:SHANGHAI_MITSUBISHI_ELEVATOR_ESCALATOR_(MITSUBISHI_ELECTRIC_ESCALATOR)_(11).jpg"},{id:"12",zh:"遥控器",en:"remote control",author:"Donald Trung Quoc Don (Chữ Hán: 徵國單) - Wikimedia Commons - © CC BY-SA 4.0 International.(Want to use this image?)Original publication 📤: --Donald Trung 『徵國單』 (No Fake News 💬) (WikiProject Numismatics 💴) (Articles 📚) 21:51, 2 February 2021 (UTC)",license:"CC BY-SA 4.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/4.0",page:"https://commons.wikimedia.org/wiki/File:JVC_RM-C1508_TV_remote_control_unit,_Het_Lage_Land,_Rotterdam_(2020)_01.jpg"},{id:"13",zh:"保温杯",en:"thermos",author:"Robert Orzanna",license:"CC BY-SA 4.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/4.0",page:"https://commons.wikimedia.org/wiki/File:Thermos_flask_with_hot_water.jpg"},{id:"14",zh:"指甲刀",en:"nail clippers",author:"Mostafameraji",license:"CC0",licenseUrl:"http://creativecommons.org/publicdomain/zero/1.0/deed.en",page:"https://commons.wikimedia.org/wiki/File:People_using_nail_cutters_02.jpg"},{id:"15",zh:"包子",en:"steamed bun",author:"Guilhem Vellut from Paris, France",license:"CC BY 2.0",licenseUrl:"https://creativecommons.org/licenses/by/2.0",page:"https://commons.wikimedia.org/wiki/File:Baozi,_Au_Petit_Grain_de_Sel,_Paris_001.jpg"},{id:"16",zh:"理发师",en:"barber",author:"Nenad Stojkovic",license:"CC BY 2.0",licenseUrl:"https://creativecommons.org/licenses/by/2.0",page:"https://commons.wikimedia.org/wiki/File:Barber_cutting_hair_with_comb._Back_view_of_young_man_in_barber_shop.jpg"},{id:"17",zh:"打哈欠",en:"yawn",author:"Wheeler Cowperthwaite",license:"CC BY 2.0",licenseUrl:"https://creativecommons.org/licenses/by/2.0",page:"https://commons.wikimedia.org/wiki/File:Yawning_woman.jpg"},{id:"18",zh:"垃圾桶",en:"trash can",author:"Infrogmation",license:"CC BY-SA 4.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/4.0",page:"https://commons.wikimedia.org/wiki/File:Trash_can,_Oak_%26_Dante_Streets,_New_Orleans_March_2026.jpg"}]}]},p=i=>`./live/${i}?v=${d.version}`;function A({item:i,active:r,onPlay:s}){const t=a.useRef(null),[n,l]=a.useState(!1);return a.useEffect(()=>{const o=t.current;o&&(r?(o.currentTime=0,o.muted=!1,o.play().catch(()=>{o.muted=!0,o.play().catch(()=>{})})):o.pause())},[r]),e.jsxs("figure",{className:"group flex flex-col gap-3",children:[e.jsxs("button",{type:"button",onClick:()=>s(r?null:i.id),className:"relative aspect-[3/4] w-full overflow-hidden rounded-[22px] bg-neutral-900 ring-1 ring-white/10 transition hover:ring-white/30","aria-label":`播放第 ${i.index} 张实况:${i.zh}`,children:[e.jsx("img",{src:p(i.cover),alt:`${i.zh} 实况图封面`,loading:"lazy",className:`absolute inset-0 h-full w-full object-cover transition-opacity duration-300 ${n?"opacity-0":"opacity-100"}`}),e.jsx("video",{ref:t,src:p(i.preview),playsInline:!0,preload:"none",onPlaying:()=>l(!0),onPause:()=>l(!1),onEnded:()=>{l(!1),s(null)},className:"absolute inset-0 h-full w-full object-cover"}),e.jsxs("span",{className:"absolute left-3 top-3 inline-flex items-center gap-1 rounded-full bg-black/45 px-2.5 py-1 text-[11px] font-semibold tracking-wide text-white backdrop-blur",children:[e.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full border-[1.5px] border-white"}),"LIVE"]}),e.jsx("span",{className:"absolute bottom-3 right-3 inline-flex h-10 w-10 items-center justify-center rounded-full bg-white/90 text-neutral-900 shadow-lg transition group-hover:scale-105",children:r&&n?e.jsx(k,{className:"h-4 w-4"}):e.jsx(y,{className:"ml-0.5 h-4 w-4"})})]}),e.jsxs("figcaption",{className:"flex items-baseline justify-between gap-2 px-1",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"text-[13px] text-neutral-400",children:[String(i.index).padStart(2,"0")," · ",i.zh," · ",i.cat]}),e.jsx("div",{className:"truncate text-lg font-semibold text-white",children:i.en}),e.jsx("div",{className:"text-sm text-neutral-400",children:i.ipa})]}),e.jsxs("div",{className:"shrink-0 text-right text-xs text-neutral-500",children:[i.duration.toFixed(1)," 秒",e.jsx("br",{}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(N,{className:"h-3 w-3"}),"有声"]})]})]})]})}function m({label:i,text:r}){const[s,t]=a.useState(!1);return e.jsxs("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-medium text-neutral-300",children:i}),e.jsxs("button",{type:"button",onClick:()=>{var n;(n=navigator.clipboard)==null||n.writeText(r).then(()=>{t(!0),setTimeout(()=>t(!1),1500)})},className:"inline-flex items-center gap-1 rounded-full border border-white/15 px-3 py-1 text-xs text-neutral-200 hover:bg-white/10",children:[s?e.jsx(j,{className:"h-3.5 w-3.5"}):e.jsx(_,{className:"h-3.5 w-3.5"}),s?"已复制":"复制"]})]}),e.jsx("p",{className:"whitespace-pre-line text-[15px] leading-7 text-neutral-100",children:r})]})}function B({set:i,active:r,onPlay:s}){return e.jsxs("section",{className:"mt-14 border-t border-white/10 pt-10",children:[e.jsxs("div",{className:"mb-6 flex flex-col gap-4 md:flex-row md:items-end md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold",children:i.name}),e.jsx("p",{className:"mt-2 text-sm text-neutral-400",children:i.items.map(t=>t.zh).join(" · ")})]}),e.jsxs("div",{className:"flex flex-col items-start gap-2 md:items-end",children:[e.jsxs("a",{href:p(i.zip),download:!0,className:"inline-flex items-center gap-2 rounded-full bg-white px-6 py-3 text-base font-semibold text-neutral-900 transition hover:bg-neutral-200",children:[e.jsx(C,{className:"h-5 w-5"}),"下载这一组 JPG + MOV"]}),e.jsxs("span",{className:"text-xs text-neutral-500",children:["ZIP · ",i.zipMB.toFixed(1)," MB · ",i.items.length," 组实况"]})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-8 sm:gap-x-6 lg:grid-cols-3",children:i.items.map(t=>e.jsx(A,{item:t,active:r===t.id,onPlay:s},t.id))}),e.jsxs("div",{className:"mt-10 grid gap-4 lg:grid-cols-2",children:[e.jsx(m,{label:"标题",text:i.copy.title}),e.jsx(m,{label:"正文 + 话题",text:i.copy.body})]}),i.credits.length>0&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h3",{className:"mb-3 text-base font-semibold",children:"图片来源与授权"}),e.jsx("div",{className:"overflow-hidden rounded-2xl border border-white/10",children:e.jsx("table",{className:"w-full text-left text-sm",children:e.jsx("tbody",{children:i.credits.map(t=>e.jsxs("tr",{className:"border-t border-white/5 first:border-t-0",children:[e.jsxs("td",{className:"px-4 py-2.5 text-neutral-300",children:[t.zh," · ",t.en]}),e.jsx("td",{className:"px-4 py-2.5 text-neutral-400",children:e.jsx("span",{className:"line-clamp-1",children:t.author})}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx("a",{href:t.page,target:"_blank",rel:"noopener noreferrer",className:"text-neutral-200 underline decoration-white/30 underline-offset-4 hover:decoration-white",children:t.license})})]},t.id))})})}),e.jsx("p",{className:"mt-3 text-xs leading-5 text-neutral-500",children:"照片来自 Wikimedia Commons,均为允许商用的知识共享或公有领域授权。CC BY / BY-SA 授权要求注明作者,发布时建议在正文或评论区写上「图片来源:Wikimedia Commons」及作者。"})]})]})}function E(){const[i,r]=a.useState(null),s=d.sets.reduce((t,n)=>t+n.items.length,0);return e.jsx("div",{className:"min-h-screen bg-[#0d0d10] text-neutral-100",children:e.jsxs("main",{className:"mx-auto max-w-6xl px-5 pb-24 pt-12 sm:px-8",children:[e.jsxs("header",{className:"max-w-2xl",children:[e.jsxs("p",{className:"mb-3 text-sm font-medium text-[#ff3b5c]",children:["实况图素材包 · ",d.sets.length," 组 ",s," 张 · 竖屏 3:4"]}),e.jsx("h1",{className:"text-4xl font-black leading-tight tracking-tight sm:text-5xl",children:"这个用英语怎么说?"}),e.jsx("p",{className:"mt-4 text-base leading-7 text-neutral-400",children:"封面是一张生活照,中间向网友提问;长按实况后,卡片展开、字母逐个打出,单词揭晓,配音标、中文释义、两遍真人发音(美式女声 + 慢速男声)和音效。点击下方任意一张预览(带声音)。"})]}),d.sets.map(t=>e.jsx(B,{set:t,active:i,onPlay:r},t.key)),e.jsxs("section",{className:"mt-16 border-t border-white/10 pt-10",children:[e.jsx("h2",{className:"mb-4 text-xl font-semibold",children:"在 Mac 上变成实况图"}),e.jsxs("ol",{className:"max-w-3xl space-y-4 text-[15px] leading-7 text-neutral-300",children:[e.jsxs("li",{children:[e.jsx("span",{className:"mr-2 font-semibold text-white",children:"1."}),"解压 ZIP。每张实况是一对同名文件,例如 ",e.jsx("code",{className:"rounded bg-white/10 px-1.5",children:"LIVE_01_slippers.JPG"})," 和"," ",e.jsx("code",{className:"rounded bg-white/10 px-1.5",children:"LIVE_01_slippers.MOV"}),"。"]}),e.jsxs("li",{children:[e.jsx("span",{className:"mr-2 font-semibold text-white",children:"2."}),"全选一组的 18 个文件,一起拖进「照片」App(或 文件 → 导入)。照片识别配对后,每组显示为一张带 LIVE 标记的照片。"]}),e.jsxs("li",{children:[e.jsx("span",{className:"mr-2 font-semibold text-white",children:"3."}),"通过 iCloud 照片同步到 iPhone,或用隔空投送从「照片」发到手机,到手机里仍然是实况。"]}),e.jsxs("li",{children:[e.jsx("span",{className:"mr-2 font-semibold text-white",children:"4."}),"小红书 / 抖音发图文时,从相册选这 9 张,保持「实况」开关打开。"]})]}),e.jsx("p",{className:"mt-5 text-sm leading-6 text-neutral-500",children:"JPG 和 MOV 必须成对导入,单独拖一个文件不会变成实况。导入后不要再用其他软件转码 MOV,否则配对信息会丢失。"})]})]})})}export{E as default}; diff --git a/assets/App-NrpfGL82.js b/assets/App-NrpfGL82.js new file mode 100644 index 0000000000000000000000000000000000000000..d49feba419994a2775e713958843271317fe3053 --- /dev/null +++ b/assets/App-NrpfGL82.js @@ -0,0 +1,79 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./LiveMaker-CayowTZW.js","./jsx-runtime-D_zvdyIk.js","./index-DG-bRo1I.js","./index-Df5cY6wZ.js","./index-CChuFSwR.js","./index-C80YNLxN.css"])))=>i.map(i=>d[i]); +import{_ as w}from"./index-CChuFSwR.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as s}from"./index-DG-bRo1I.js";/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),h=(...i)=>i.filter((r,a,t)=>!!r&&r.trim()!==""&&t.indexOf(r)===a).join(" ").trim();/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j=s.forwardRef(({color:i="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:t,className:n="",children:o,iconNode:l,...x},v)=>s.createElement("svg",{ref:v,...f,width:r,height:r,stroke:i,strokeWidth:t?Number(a)*24/Number(r):a,className:h("lucide",n),...x},[...l.map(([u,g])=>s.createElement(u,g)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c=(i,r)=>{const a=s.forwardRef(({className:t,...n},o)=>s.createElement(j,{ref:o,iconNode:r,className:h(`lucide-${_(i)}`,t),...n}));return a.displayName=`${i}`,a};/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C=c("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b=c("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const B=c("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y=c("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A=c("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k=c("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E=c("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),d={version:"1792278702",sets:[{key:"a",name:"第一组 · 生活照(AI 生成)",zip:"daily-english-live-photos.zip",zipMB:33,items:[{id:"01",index:1,zh:"拖鞋",en:"slippers",ipa:"/ˈslɪpərz/",cat:"物",duration:3,cover:"cover_01.jpg",preview:"preview_01.mp4",identifier:"CE171D8D-D609-4CEF-B2A5-9949274DF6C0"},{id:"02",index:2,zh:"牙刷",en:"toothbrush",ipa:"/ˈtuːθbrʌʃ/",cat:"物",duration:3,cover:"cover_02.jpg",preview:"preview_02.mp4",identifier:"17EE131F-7D7C-49D7-B080-136BC74F71BE"},{id:"03",index:3,zh:"雨伞",en:"umbrella",ipa:"/ʌmˈbrelə/",cat:"物",duration:3,cover:"cover_03.jpg",preview:"preview_03.mp4",identifier:"AFE5DAD6-0DFE-419E-BAC2-0DCA79C9B5BB"},{id:"04",index:4,zh:"闹钟",en:"alarm clock",ipa:"/əˈlɑːrm klɑːk/",cat:"物",duration:2.33,cover:"cover_04.jpg",preview:"preview_04.mp4",identifier:"FB7F72BE-6826-4C98-8170-058C34CC33D5"},{id:"05",index:5,zh:"外卖小哥",en:"delivery rider",ipa:"/dɪˈlɪvəri ˈraɪdər/",cat:"人",duration:2.43,cover:"cover_05.jpg",preview:"preview_05.mp4",identifier:"9F351073-3574-4BBF-B842-63C81772E05B"},{id:"06",index:6,zh:"堵车",en:"traffic jam",ipa:"/ˈtræfɪk dʒæm/",cat:"事",duration:3,cover:"cover_06.jpg",preview:"preview_06.mp4",identifier:"4842BB73-D0F6-4DA7-90DB-BA72C45627BF"},{id:"07",index:7,zh:"充电宝",en:"power bank",ipa:"/ˈpaʊər bæŋk/",cat:"物",duration:3,cover:"cover_07.jpg",preview:"preview_07.mp4",identifier:"6AC214BB-3339-4DDD-8328-27C823EBB184"},{id:"08",index:8,zh:"电饭煲",en:"rice cooker",ipa:"/ˈraɪs ˌkʊkər/",cat:"物",duration:3,cover:"cover_08.jpg",preview:"preview_08.mp4",identifier:"53518C01-9B29-478D-8EBB-869D3A0CCFFE"},{id:"09",index:9,zh:"奶茶",en:"bubble tea",ipa:"/ˈbʌbəl tiː/",cat:"物",duration:3,cover:"cover_09.jpg",preview:"preview_09.mp4",identifier:"9856A5C0-76BD-44C9-AB11-F4884B88706D"}],copy:{title:"9个天天见的东西,英语你能说出几个?",body:`每天都在用,却不一定叫得出英文名👀 +先看封面猜一猜,再长按实况看答案(记得开声音🔊) +评论区报一下你答对了几个~ + +拖鞋 / 牙刷 / 雨伞 / 闹钟 / 外卖小哥 / 堵车 / 充电宝 / 电饭煲 / 奶茶 + +#英语单词 #日常英语 #英语口语 #实况图 #每日英语 #英语学习 #单词打卡`},credits:[]},{key:"b",name:"第二组 · 真实照片(网络授权图片)",zip:"daily-english-live-photos-set2.zip",zipMB:46.3,items:[{id:"10",index:1,zh:"红绿灯",en:"traffic light",ipa:"/ˈtræfɪk laɪt/",cat:"物",duration:3,cover:"cover_10.jpg",preview:"preview_10.mp4",identifier:"39C69DAC-FEC5-431F-AA97-088D46047237"},{id:"11",index:2,zh:"自动扶梯",en:"escalator",ipa:"/ˈeskəleɪtər/",cat:"物",duration:3,cover:"cover_11.jpg",preview:"preview_11.mp4",identifier:"BB58AEC7-8EB6-499E-BD1C-D72D2BF15765"},{id:"12",index:3,zh:"遥控器",en:"remote control",ipa:"/rɪˌmoʊt kənˈtroʊl/",cat:"物",duration:2.4,cover:"cover_12.jpg",preview:"preview_12.mp4",identifier:"9CFFC057-3C60-4E19-A8EF-BE4FC710D3EA"},{id:"13",index:4,zh:"保温杯",en:"thermos",ipa:"/ˈθɜːrməs/",cat:"物",duration:3,cover:"cover_13.jpg",preview:"preview_13.mp4",identifier:"E06A79EF-1E9A-4CAB-B508-C4093E47203A"},{id:"14",index:5,zh:"指甲刀",en:"nail clippers",ipa:"/ˈneɪl ˌklɪpərz/",cat:"物",duration:2.43,cover:"cover_14.jpg",preview:"preview_14.mp4",identifier:"9EB05625-9994-49D4-925B-BB5A707DCDAA"},{id:"15",index:6,zh:"包子",en:"steamed bun",ipa:"/ˌstiːmd ˈbʌn/",cat:"物",duration:3,cover:"cover_15.jpg",preview:"preview_15.mp4",identifier:"EDA50DFB-5E70-4EB9-8E93-CE31961CAEBD"},{id:"16",index:7,zh:"理发师",en:"barber",ipa:"/ˈbɑːrbər/",cat:"人",duration:3,cover:"cover_16.jpg",preview:"preview_16.mp4",identifier:"881AE368-459F-45BF-91C9-0D9787D3A157"},{id:"17",index:8,zh:"打哈欠",en:"yawn",ipa:"/jɔːn/",cat:"事",duration:3,cover:"cover_17.jpg",preview:"preview_17.mp4",identifier:"A7296C7C-2B5C-4441-B5AB-7FF6698E3BDD"},{id:"18",index:9,zh:"垃圾桶",en:"trash can",ipa:"/ˈtræʃ kæn/",cat:"物",duration:3,cover:"cover_18.jpg",preview:"preview_18.mp4",identifier:"C877CFF1-96A1-4F58-ACA6-E622B09EC92C"}],copy:{title:"这9个东西天天见,英语你都会说吗?",body:`天天见到的东西,换成英文就卡壳?👀 +先看封面猜一猜,再长按实况看答案(记得开声音🔊) +评论区报一下你答对了几个~ + +红绿灯 / 自动扶梯 / 遥控器 / 保温杯 / 指甲刀 / 包子 / 理发师 / 打哈欠 / 垃圾桶 + +图片来源:Wikimedia Commons(作者与授权见素材包内说明) + +#英语单词 #日常英语 #英语口语 #实况图 #每日英语 #英语学习 #单词打卡`},credits:[{id:"10",zh:"红绿灯",en:"traffic light",author:"Gary",license:"CC BY-SA 2.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/2.0",page:"https://commons.wikimedia.org/wiki/File:UK_Green_Traffic_Light_Signal_-_geograph.org.uk_-_5264299.jpg"},{id:"11",zh:"自动扶梯",en:"escalator",author:"Dinkun Chen",license:"CC BY-SA 4.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/4.0",page:"https://commons.wikimedia.org/wiki/File:SHANGHAI_MITSUBISHI_ELEVATOR_ESCALATOR_(MITSUBISHI_ELECTRIC_ESCALATOR)_(11).jpg"},{id:"12",zh:"遥控器",en:"remote control",author:"Donald Trung Quoc Don (Chữ Hán: 徵國單) - Wikimedia Commons - © CC BY-SA 4.0 International.(Want to use this image?)Original publication 📤: --Donald Trung 『徵國單』 (No Fake News 💬) (WikiProject Numismatics 💴) (Articles 📚) 21:51, 2 February 2021 (UTC)",license:"CC BY-SA 4.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/4.0",page:"https://commons.wikimedia.org/wiki/File:JVC_RM-C1508_TV_remote_control_unit,_Het_Lage_Land,_Rotterdam_(2020)_01.jpg"},{id:"13",zh:"保温杯",en:"thermos",author:"Robert Orzanna",license:"CC BY-SA 4.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/4.0",page:"https://commons.wikimedia.org/wiki/File:Thermos_flask_with_hot_water.jpg"},{id:"14",zh:"指甲刀",en:"nail clippers",author:"Mostafameraji",license:"CC0",licenseUrl:"http://creativecommons.org/publicdomain/zero/1.0/deed.en",page:"https://commons.wikimedia.org/wiki/File:People_using_nail_cutters_02.jpg"},{id:"15",zh:"包子",en:"steamed bun",author:"Guilhem Vellut from Paris, France",license:"CC BY 2.0",licenseUrl:"https://creativecommons.org/licenses/by/2.0",page:"https://commons.wikimedia.org/wiki/File:Baozi,_Au_Petit_Grain_de_Sel,_Paris_001.jpg"},{id:"16",zh:"理发师",en:"barber",author:"Nenad Stojkovic",license:"CC BY 2.0",licenseUrl:"https://creativecommons.org/licenses/by/2.0",page:"https://commons.wikimedia.org/wiki/File:Barber_cutting_hair_with_comb._Back_view_of_young_man_in_barber_shop.jpg"},{id:"17",zh:"打哈欠",en:"yawn",author:"Wheeler Cowperthwaite",license:"CC BY 2.0",licenseUrl:"https://creativecommons.org/licenses/by/2.0",page:"https://commons.wikimedia.org/wiki/File:Yawning_woman.jpg"},{id:"18",zh:"垃圾桶",en:"trash can",author:"Infrogmation",license:"CC BY-SA 4.0",licenseUrl:"https://creativecommons.org/licenses/by-sa/4.0",page:"https://commons.wikimedia.org/wiki/File:Trash_can,_Oak_%26_Dante_Streets,_New_Orleans_March_2026.jpg"}]},{key:"c",name:"第三组 · 看图填空(G _ _)",zip:"daily-english-live-photos-set3.zip",zipMB:42,items:[{id:"19",index:1,zh:"枪",en:"gun",ipa:"/ɡʌn/",cat:"物",duration:3,cover:"cover_19.jpg",preview:"preview_19.mp4",identifier:"A4C1C26D-25C7-4E0A-8A2C-AB4BA57348B2"},{id:"20",index:2,zh:"汽油",en:"gas",ipa:"/ɡæs/",cat:"物",duration:3,cover:"cover_20.jpg",preview:"preview_20.mp4",identifier:"B3044931-CC31-4EF9-8A76-46EF88762453"},{id:"21",index:3,zh:"宝石",en:"gem",ipa:"/dʒem/",cat:"物",duration:3,cover:"cover_21.jpg",preview:"preview_21.mp4",identifier:"C40FF1A1-4E0A-49A4-8D36-02638D122FFD"},{id:"22",index:4,zh:"天哪(表示惊讶)",en:"gee",ipa:"/dʒiː/",cat:"感叹",duration:3,cover:"cover_22.jpg",preview:"preview_22.mp4",identifier:"07ACA23D-2D67-40BA-BCE1-090780CC1E4D"},{id:"23",index:5,zh:"口香糖",en:"gum",ipa:"/ɡʌm/",cat:"物",duration:3,cover:"cover_23.jpg",preview:"preview_23.mp4",identifier:"4FFFE50A-837E-40FC-8E0B-27B4F47E6B25"},{id:"24",index:6,zh:"小岛",en:"cay",ipa:"/keɪ/",cat:"地",duration:3,cover:"cover_24.jpg",preview:"preview_24.mp4",identifier:"A9E6D826-9A61-436D-B285-AC1703B00E5D"},{id:"25",index:7,zh:"上帝;神",en:"god",ipa:"/ɡɑːd/",cat:"人",duration:3,cover:"cover_25.jpg",preview:"preview_25.mp4",identifier:"9B01FBB5-252D-45ED-AF5E-7E6B614DE0EF"},{id:"26",index:8,zh:"健身房",en:"gym",ipa:"/dʒɪm/",cat:"地",duration:3,cover:"cover_26.jpg",preview:"preview_26.mp4",identifier:"CACA22C0-35C5-46DE-AB26-50C2BB9064CC"},{id:"27",index:9,zh:"演出",en:"gig",ipa:"/ɡɪɡ/",cat:"事",duration:3,cover:"cover_27.jpg",preview:"preview_27.mp4",identifier:"C74F1138-2E4E-459B-9F98-5FA1C9374F07"},{id:"28",index:10,zh:"堵嘴",en:"gag",ipa:"/ɡæɡ/",cat:"事",duration:3,cover:"cover_28.jpg",preview:"preview_28.mp4",identifier:"5F37B71C-B13D-4E03-A82F-5403BD6C5D16"}],copy:{title:"看图填空:G _ _ 你能填对几个?",body:`全是三个字母的单词,看图猜一猜是什么👀 +先看封面猜一猜,再长按实况看答案(记得开声音🔊) +评论区报一下你答对了几个~ + +#英语单词 #看图猜单词 #英语学习 #实况图 #每日英语 #单词打卡`},credits:[]},{key:"d",name:"第四组 · 看图填空(_ A Y)",zip:"daily-english-live-photos-set4.zip",zipMB:42.5,items:[{id:"29",index:1,zh:"说",en:"say",ipa:"/seɪ/",cat:"",duration:3,cover:"cover_29.jpg",preview:"preview_29.mp4",identifier:"08125443-28E5-49C4-AF35-384F10F21A58"},{id:"30",index:2,zh:"道路",en:"way",ipa:"/weɪ/",cat:"",duration:3,cover:"cover_30.jpg",preview:"preview_30.mp4",identifier:"02A2AA43-57C7-439A-B479-C4990B550C3B"},{id:"31",index:3,zh:"一天",en:"day",ipa:"/deɪ/",cat:"",duration:3,cover:"cover_31.jpg",preview:"preview_31.mp4",identifier:"2FD1135C-ABA0-43C9-B03C-9E06A50B3A53"},{id:"32",index:4,zh:"海湾",en:"bay",ipa:"/beɪ/",cat:"",duration:3,cover:"cover_32.jpg",preview:"preview_32.mp4",identifier:"0254D155-3038-4A52-8CC4-D6DC157866BB"},{id:"33",index:5,zh:"松鸦",en:"jay",ipa:"/dʒeɪ/",cat:"",duration:3,cover:"cover_33.jpg",preview:"preview_33.mp4",identifier:"E0A8C434-A531-4ADC-AAC5-1E2F8C33A4B4"},{id:"34",index:6,zh:"干草",en:"hay",ipa:"/heɪ/",cat:"",duration:3,cover:"cover_34.jpg",preview:"preview_34.mp4",identifier:"B52B208B-2D1F-4545-9933-01EEC51B02D9"},{id:"35",index:7,zh:"躺下",en:"lay",ipa:"/leɪ/",cat:"",duration:3,cover:"cover_35.jpg",preview:"preview_35.mp4",identifier:"F02CBB0E-839F-43B1-8EB2-7C1BD148E605"},{id:"36",index:8,zh:"五月",en:"may",ipa:"/meɪ/",cat:"",duration:3,cover:"cover_36.jpg",preview:"preview_36.mp4",identifier:"D9C37DA5-EC76-455C-B041-5D30F408807A"},{id:"37",index:9,zh:"支付",en:"pay",ipa:"/peɪ/",cat:"",duration:3,cover:"cover_37.jpg",preview:"preview_37.mp4",identifier:"45972C71-1D8C-4FD7-8C7B-1DB2ACDEBFD0"},{id:"38",index:10,zh:"光线",en:"ray",ipa:"/reɪ/",cat:"",duration:3,cover:"cover_38.jpg",preview:"preview_38.mp4",identifier:"89E12819-83AC-4793-8329-40C2CEF9B0AE"}],copy:{title:"看图填空:_ A Y 你能填对几个?",body:`后面都是 AY,就差第一个字母,看图猜一猜👀 +先看封面猜一猜,再长按实况看答案(记得开声音🔊) +评论区报一下你答对了几个~ + +#英语单词 #看图猜单词 #英语学习 #实况图 #每日英语 #单词打卡`},credits:[]}]},p=i=>`./live/${i}?v=${d.version}`;function D({item:i,active:r,onPlay:a}){const t=s.useRef(null),[n,o]=s.useState(!1);return s.useEffect(()=>{const l=t.current;l&&(r?(l.currentTime=0,l.muted=!1,l.play().catch(()=>{l.muted=!0,l.play().catch(()=>{})})):l.pause())},[r]),e.jsxs("figure",{className:"group flex flex-col gap-3",children:[e.jsxs("button",{type:"button",onClick:()=>a(r?null:i.id),className:"relative aspect-[3/4] w-full overflow-hidden rounded-[22px] bg-neutral-900 ring-1 ring-white/10 transition hover:ring-white/30","aria-label":`播放第 ${i.index} 张实况:${i.zh}`,children:[e.jsx("img",{src:p(i.cover),alt:`${i.zh} 实况图封面`,loading:"lazy",className:`absolute inset-0 h-full w-full object-cover transition-opacity duration-300 ${n?"opacity-0":"opacity-100"}`}),e.jsx("video",{ref:t,src:p(i.preview),playsInline:!0,preload:"none",onPlaying:()=>o(!0),onPause:()=>o(!1),onEnded:()=>{o(!1),a(null)},className:"absolute inset-0 h-full w-full object-cover"}),e.jsxs("span",{className:"absolute left-3 top-3 inline-flex items-center gap-1 rounded-full bg-black/45 px-2.5 py-1 text-[11px] font-semibold tracking-wide text-white backdrop-blur",children:[e.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full border-[1.5px] border-white"}),"LIVE"]}),e.jsx("span",{className:"absolute bottom-3 right-3 inline-flex h-10 w-10 items-center justify-center rounded-full bg-white/90 text-neutral-900 shadow-lg transition group-hover:scale-105",children:r&&n?e.jsx(A,{className:"h-4 w-4"}):e.jsx(k,{className:"ml-0.5 h-4 w-4"})})]}),e.jsxs("figcaption",{className:"flex items-baseline justify-between gap-2 px-1",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"text-[13px] text-neutral-400",children:[String(i.index).padStart(2,"0")," · ",i.zh," · ",i.cat]}),e.jsx("div",{className:"truncate text-lg font-semibold text-white",children:i.en}),e.jsx("div",{className:"text-sm text-neutral-400",children:i.ipa})]}),e.jsxs("div",{className:"shrink-0 text-right text-xs text-neutral-500",children:[i.duration.toFixed(1)," 秒",e.jsx("br",{}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(E,{className:"h-3 w-3"}),"有声"]})]})]})]})}function m({label:i,text:r}){const[a,t]=s.useState(!1);return e.jsxs("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-4",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-medium text-neutral-300",children:i}),e.jsxs("button",{type:"button",onClick:()=>{var n;(n=navigator.clipboard)==null||n.writeText(r).then(()=>{t(!0),setTimeout(()=>t(!1),1500)})},className:"inline-flex items-center gap-1 rounded-full border border-white/15 px-3 py-1 text-xs text-neutral-200 hover:bg-white/10",children:[a?e.jsx(C,{className:"h-3.5 w-3.5"}):e.jsx(b,{className:"h-3.5 w-3.5"}),a?"已复制":"复制"]})]}),e.jsx("p",{className:"whitespace-pre-line text-[15px] leading-7 text-neutral-100",children:r})]})}function N({set:i,active:r,onPlay:a}){return e.jsxs("section",{className:"mt-14 border-t border-white/10 pt-10",children:[e.jsxs("div",{className:"mb-6 flex flex-col gap-4 md:flex-row md:items-end md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold",children:i.name}),e.jsx("p",{className:"mt-2 text-sm text-neutral-400",children:i.items.map(t=>t.zh).join(" · ")})]}),e.jsxs("div",{className:"flex flex-col items-start gap-2 md:items-end",children:[e.jsxs("a",{href:p(i.zip),download:!0,className:"inline-flex items-center gap-2 rounded-full bg-white px-6 py-3 text-base font-semibold text-neutral-900 transition hover:bg-neutral-200",children:[e.jsx(B,{className:"h-5 w-5"}),"下载这一组 JPG + MOV"]}),e.jsxs("span",{className:"text-xs text-neutral-500",children:["ZIP · ",i.zipMB.toFixed(1)," MB · ",i.items.length," 组实况"]})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-8 sm:gap-x-6 lg:grid-cols-3",children:i.items.map(t=>e.jsx(D,{item:t,active:r===t.id,onPlay:a},t.id))}),e.jsxs("div",{className:"mt-10 grid gap-4 lg:grid-cols-2",children:[e.jsx(m,{label:"标题",text:i.copy.title}),e.jsx(m,{label:"正文 + 话题",text:i.copy.body})]}),i.credits.length>0&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h3",{className:"mb-3 text-base font-semibold",children:"图片来源与授权"}),e.jsx("div",{className:"overflow-hidden rounded-2xl border border-white/10",children:e.jsx("table",{className:"w-full text-left text-sm",children:e.jsx("tbody",{children:i.credits.map(t=>e.jsxs("tr",{className:"border-t border-white/5 first:border-t-0",children:[e.jsxs("td",{className:"px-4 py-2.5 text-neutral-300",children:[t.zh," · ",t.en]}),e.jsx("td",{className:"px-4 py-2.5 text-neutral-400",children:e.jsx("span",{className:"line-clamp-1",children:t.author})}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx("a",{href:t.page,target:"_blank",rel:"noopener noreferrer",className:"text-neutral-200 underline decoration-white/30 underline-offset-4 hover:decoration-white",children:t.license})})]},t.id))})})}),e.jsx("p",{className:"mt-3 text-xs leading-5 text-neutral-500",children:"照片来自 Wikimedia Commons,均为允许商用的知识共享或公有领域授权。CC BY / BY-SA 授权要求注明作者,发布时建议在正文或评论区写上「图片来源:Wikimedia Commons」及作者。"})]})]})}function z(){const[i,r]=s.useState(null),a=d.sets.reduce((t,n)=>t+n.items.length,0);return e.jsx("div",{children:e.jsxs("div",{children:[e.jsxs("header",{className:"max-w-2xl",children:[e.jsxs("p",{className:"mb-3 text-sm font-medium text-[#ff3b5c]",children:["实况图素材包 · ",d.sets.length," 组 ",a," 张 · 竖屏 3:4"]}),e.jsx("h1",{className:"text-4xl font-black leading-tight tracking-tight sm:text-5xl",children:"这个用英语怎么说?"}),e.jsx("p",{className:"mt-4 text-base leading-7 text-neutral-400",children:"封面是一张生活照,卡片里向网友提问(第三组为看图填空);长按实况后,字母逐个打出,单词揭晓,配音标、中文释义、英语发音(美式女声,放得下时再加一遍男声慢读)和音效。每张不超过 3 秒,可直接发微信朋友圈。点击下方任意一张预览(带声音)。"})]}),d.sets.map(t=>e.jsx(N,{set:t,active:i,onPlay:r},t.key)),e.jsxs("section",{className:"mt-16 border-t border-white/10 pt-10",children:[e.jsx("h2",{className:"mb-4 text-xl font-semibold",children:"在 Mac 上变成实况图"}),e.jsxs("ol",{className:"max-w-3xl space-y-4 text-[15px] leading-7 text-neutral-300",children:[e.jsxs("li",{children:[e.jsx("span",{className:"mr-2 font-semibold text-white",children:"1."}),"解压 ZIP。每张实况是一对同名文件,例如 ",e.jsx("code",{className:"rounded bg-white/10 px-1.5",children:"LIVE_01_slippers.JPG"})," 和"," ",e.jsx("code",{className:"rounded bg-white/10 px-1.5",children:"LIVE_01_slippers.MOV"}),"。"]}),e.jsxs("li",{children:[e.jsx("span",{className:"mr-2 font-semibold text-white",children:"2."}),"全选一组的 18 个文件,一起拖进「照片」App(或 文件 → 导入)。照片识别配对后,每组显示为一张带 LIVE 标记的照片。"]}),e.jsxs("li",{children:[e.jsx("span",{className:"mr-2 font-semibold text-white",children:"3."}),"通过 iCloud 照片同步到 iPhone,或用隔空投送从「照片」发到手机,到手机里仍然是实况。"]}),e.jsxs("li",{children:[e.jsx("span",{className:"mr-2 font-semibold text-white",children:"4."}),"小红书 / 抖音发图文时,从相册选这 9 张,保持「实况」开关打开。"]})]}),e.jsx("p",{className:"mt-5 text-sm leading-6 text-neutral-500",children:"JPG 和 MOV 必须成对导入,单独拖一个文件不会变成实况。导入后不要再用其他软件转码 MOV,否则配对信息会丢失。"})]})]})})}const F=s.lazy(()=>w(()=>import("./LiveMaker-CayowTZW.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url));function S(){const[i,r]=s.useState(()=>typeof window<"u"&&window.location.hash==="#gallery"?"gallery":"maker"),a=t=>{r(t),typeof window<"u"&&window.history.replaceState(null,"",t==="gallery"?"#gallery":"#maker")};return e.jsx("div",{className:"min-h-screen bg-[#0d0d10] text-neutral-100",children:e.jsxs("main",{className:"mx-auto max-w-6xl px-5 pb-24 pt-8 sm:px-8",children:[e.jsxs("nav",{className:"mb-8 flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"text-sm font-semibold tracking-wide text-neutral-300",children:["这个用英语怎么说",e.jsx("span",{className:"text-[#ff3b5c]",children:"?"})]}),e.jsx("div",{className:"flex rounded-full border border-white/10 p-1 text-sm",children:[["maker","实况图制作工具"],["gallery","示例素材包"]].map(([t,n])=>e.jsx("button",{type:"button",onClick:()=>a(t),className:`rounded-full px-4 py-1.5 transition ${i===t?"bg-white font-semibold text-neutral-900":"text-neutral-300 hover:text-white"}`,children:n},t))})]}),i==="maker"?e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"mb-8 max-w-3xl",children:[e.jsx("h1",{className:"text-3xl font-black leading-tight tracking-tight sm:text-4xl",children:"自己做「这个用英语怎么说?」实况图"}),e.jsx("p",{className:"mt-3 text-[15px] leading-7 text-neutral-400",children:"放一张底图,填上单词和中文,选好读音、音效和样式,直接导出苹果实况照片(JPG + MOV,带声音)。不需要 AI:读音可以用维基共享资源的真人录音、你自己的录音或上传的音频。"})]}),e.jsx(s.Suspense,{fallback:e.jsxs("div",{className:"flex items-center gap-2 text-neutral-400",children:[e.jsx(y,{className:"h-4 w-4 animate-spin"}),"加载中"]}),children:e.jsx(F,{})})]}):e.jsx(z,{})]})})}const L=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"}));export{L as A,B as D,y as L,A as P,E as V,k as a,c}; diff --git a/assets/LiveMaker-CayowTZW.js b/assets/LiveMaker-CayowTZW.js new file mode 100644 index 0000000000000000000000000000000000000000..8935dedd9d58e6e614a127991ea1747cdda16bb4 --- /dev/null +++ b/assets/LiveMaker-CayowTZW.js @@ -0,0 +1,37 @@ +var xn=Object.defineProperty;var Ot=t=>{throw TypeError(t)};var yn=(t,e,n)=>e in t?xn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e,n)=>yn(t,typeof e!="symbol"?e+"":e,n),$t=(t,e,n)=>e.has(t)||Ot("Cannot "+n);var S=(t,e,n)=>($t(t,e,"read from private field"),n?n.call(t):e.get(t)),Ee=(t,e,n)=>e.has(t)?Ot("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Be=(t,e,n,r)=>($t(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{j as f}from"./jsx-runtime-D_zvdyIk.js";import{r as F}from"./index-DG-bRo1I.js";import{c as Ue,L as Ut,P as Mn,a as zt,D as kn,V as jn}from"./App-NrpfGL82.js";import"./index-Df5cY6wZ.js";import"./index-CChuFSwR.js";/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const An=Ue("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const En=Ue("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ft=Ue("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nn=Ue("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cn=Ue("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sn=Ue("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** + * @license lucide-react v0.454.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pn=Ue("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);var se=Uint8Array,he=Uint16Array,Nt=Int32Array,Ct=new se([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),St=new se([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Dt=new se([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),an=function(t,e){for(var n=new he(31),r=0;r<31;++r)n[r]=e+=1<>1|(W&21845)<<1;Ne=(Ne&52428)>>2|(Ne&13107)<<2,Ne=(Ne&61680)>>4|(Ne&3855)<<4,kt[W]=((Ne&65280)>>8|(Ne&255)<<8)>>1}var Ge=(function(t,e,n){for(var r=t.length,a=0,s=new he(e);a>h]=d}else for(i=new he(r),a=0;a>15-t[a]);return i}),Oe=new se(288);for(var W=0;W<144;++W)Oe[W]=8;for(var W=144;W<256;++W)Oe[W]=9;for(var W=256;W<280;++W)Oe[W]=7;for(var W=280;W<288;++W)Oe[W]=8;var ot=new se(32);for(var W=0;W<32;++W)ot[W]=5;var Tn=Ge(Oe,9,0),Ln=Ge(ot,5,0),sn=function(t){return(t+7)/8|0},on=function(t,e,n){return(n==null||n>t.length)&&(n=t.length),new se(t.subarray(e,n))},On=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ht=function(t,e,n){var r=new Error(e||On[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,ht),!n)throw r;return r},ye=function(t,e,n){n<<=e&7;var r=e/8|0;t[r]|=n,t[r+1]|=n>>8},_e=function(t,e,n){n<<=e&7;var r=e/8|0;t[r]|=n,t[r+1]|=n>>8,t[r+2]|=n>>16},dt=function(t,e){for(var n=[],r=0;rp&&(p=s[r].s);var g=new he(p+1),w=jt(n[c-1],g,0);if(w>e){var r=0,m=0,v=w-e,k=1<e)m+=k-(1<>=v;m>0;){var j=s[r].s;g[j]=0&&m;--r){var E=s[r].s;g[E]==e&&(--g[E],++m)}w=e}return{t:new se(g),l:w}},jt=function(t,e,n){return t.s==-1?Math.max(jt(t.l,e,n+1),jt(t.r,e,n+1)):e[t.s]=n},Bt=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new he(++e),r=0,a=t[0],s=1,o=function(h){n[r++]=h},i=1;i<=e;++i)if(t[i]==a&&i!=e)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[i]}return{c:n.subarray(0,r),n:e}},qe=function(t,e){for(var n=0,r=0;r>8,t[a+2]=t[a]^255,t[a+3]=t[a+1]^255;for(var s=0;s4&&!R[Dt[V-1]];--V);var O=d+5<<3,Y=qe(a,Oe)+qe(s,ot)+o,ne=qe(a,p)+qe(s,m)+o+14+3*V+qe(P,R)+2*P[16]+3*P[17]+7*P[18];if(h>=0&&O<=Y&&O<=ne)return ln(e,c,t.subarray(h,h+d));var J,B,oe,fe;if(ye(e,c,1+(ne15&&(ye(e,c,ge[A]>>5&127),c+=ge[A]>>12)}}else J=Tn,B=Oe,oe=Ln,fe=ot;for(var A=0;A255){var de=X>>18&31;_e(e,c,J[de+257]),c+=B[de+257],de>7&&(ye(e,c,X>>23&31),c+=Ct[de]);var je=X&31;_e(e,c,oe[je]),c+=fe[je],je>3&&(_e(e,c,X>>5&8191),c+=St[je])}else _e(e,c,J[X]),c+=B[X]}return _e(e,c,J[256]),c+B[256]},$n=new Nt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),cn=new se(0),Un=function(t,e,n,r,a,s){var o=s.z||t.length,i=new se(r+o+5*(1+Math.ceil(o/7e3))+a),h=i.subarray(r,i.length-a),d=s.l,c=(s.r||0)&7;if(e){c&&(h[0]=s.r>>3);for(var u=$n[e-1],p=u>>13,g=u&8191,w=(1<7e3||R>24576)&&(J>423||!d)){c=_t(t,h,0,E,N,I,A,R,V,y-V,c),R=P=A=0,V=y;for(var B=0;B<286;++B)N[B]=0;for(var B=0;B<30;++B)I[B]=0}var oe=2,fe=0,D=g,ie=Y-ne&32767;if(J>2&&O==j(y-ie))for(var $=Math.min(p,J)-1,ge=Math.min(32767,y),de=Math.min(258,J);ie<=ge&&--D&&Y!=ne;){if(t[y+oe]==t[y+oe-ie]){for(var X=0;Xoe){if(oe=X,fe=ie,X>$)break;for(var je=Math.min(ie,X-2),Xe=0,B=0;BXe&&(Xe=Je,ne=Pe)}}}Y=ne,ne=m[Y],ie+=Y-ne&32767}if(fe){E[R++]=268435456|Mt[oe]<<18|Wt[fe];var Ke=Mt[oe]&31,Ze=Wt[fe]&31;A+=Ct[Ke]+St[Ze],++N[257+Ke],++I[Ze],te=y+oe,++P}else E[R++]=t[y],++N[t[y]]}}for(y=Math.max(y,te);y=o&&(h[c/8|0]=d,De=o),c=ln(h,c+1,t.subarray(y,De))}s.i=o}return on(i,0,r+sn(c)+a)},zn=(function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var n=e,r=9;--r;)n=(n&1&&-306674912)^n>>>1;t[e]=n}return t})(),Fn=function(){var t=-1;return{p:function(e){for(var n=t,r=0;r>>8;t=n},d:function(){return~t}}},Dn=function(t,e,n,r,a){if(!a&&(a={l:1},e.dictionary)){var s=e.dictionary.subarray(-32768),o=new se(s.length+t.length);o.set(s),o.set(t,s.length),t=o,a.w=s.length}return Un(t,e.level==null?6:e.level,e.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,r,a)},hn=function(t,e){var n={};for(var r in t)n[r]=t[r];for(var r in e)n[r]=e[r];return n},Z=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function Wn(t,e){return Dn(t,e||{},0,0)}var fn=function(t,e,n,r){for(var a in t){var s=t[a],o=e+a,i=r;Array.isArray(s)&&(i=hn(r,s[1]),s=s[0]),ArrayBuffer.isView(s)?n[o]=[s,i]:(n[o+="/"]=[new se(0),i],fn(s,o,n,r))}},qt=typeof TextEncoder<"u"&&new TextEncoder,Bn=typeof TextDecoder<"u"&&new TextDecoder,_n=0;try{Bn.decode(cn,{stream:!0}),_n=1}catch{}function Vt(t,e){var n;if(qt)return qt.encode(t);for(var r=t.length,a=new se(t.length+(t.length>>1)),s=0,o=function(d){a[s++]=d},n=0;na.length){var i=new se(s+8+(r-n<<1));i.set(a),a=i}var h=t.charCodeAt(n);h<128||e?o(h):h<2048?(o(192|h>>6),o(128|h&63)):h>55295&&h<57344?(h=65536+(h&1047552)|t.charCodeAt(++n)&1023,o(240|h>>18),o(128|h>>12&63),o(128|h>>6&63),o(128|h&63)):(o(224|h>>12),o(128|h>>6&63),o(128|h&63))}return on(a,0,s)}var At=function(t){var e=0;if(t)for(var n in t){var r=t[n].length;r>65535&&ht(9),e+=r+4}return e},Ht=function(t,e,n,r,a,s,o,i){var h=r.length,d=n.extra,c=i&&i.length,u=At(d);Z(t,e,o!=null?33639248:67324752),e+=4,o!=null&&(t[e++]=20,t[e++]=n.os),t[e]=20,e+=2,t[e++]=n.flag<<1|(s<0&&8),t[e++]=a&&8,t[e++]=n.compression&255,t[e++]=n.compression>>8;var p=new Date(n.mtime==null?Date.now():n.mtime),g=p.getFullYear()-1980;if((g<0||g>119)&&ht(10),Z(t,e,g<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),e+=4,s!=-1&&(Z(t,e,n.crc),Z(t,e+4,s<0?-s-2:s),Z(t,e+8,n.size)),Z(t,e+12,h),Z(t,e+14,u),e+=16,o!=null&&(Z(t,e,c),Z(t,e+6,n.attrs),Z(t,e+10,o),e+=14),t.set(r,e),e+=h,u)for(var w in d){var m=d[w],v=m.length;Z(t,e,+w),Z(t,e+2,v),t.set(m,e+4),e+=4+v}return c&&(t.set(i,e),e+=c),e},qn=function(t,e,n,r,a){Z(t,e,101010256),Z(t,e+8,n),Z(t,e+10,n),Z(t,e+12,r),Z(t,e+16,a)};function Vn(t,e){e||(e={});var n={},r=[];fn(t,"",n,e);var a=0,s=0;for(var o in n){var i=n[o],h=i[0],d=i[1],c=d.level==0?0:8,u=Vt(o),p=u.length,g=d.comment,w=g&&Vt(g),m=w&&w.length,v=At(d.extra);p>65535&&ht(11);var k=c?Wn(h,d):h,x=k.length,j=Fn();j.p(h),r.push(hn(d,{size:h.length,crc:j.d(),c:k,f:u,m:w,u:p!=o.length||w&&g.length!=m,o:a,compression:c})),a+=30+p+v+x,s+=76+2*(p+v)+(m||0)+x}for(var E=new se(s+22),N=a,I=s-a,P=0;PMath.round(G*t);function Qt(t,e){const n=new Float32Array(t.length);let r=0,a=0;for(let s=0;s>>0;return()=>(e=e*1664525+1013904223>>>0,e/4294967296)}function Qn(t){return Math.sqrt(-2*Math.log(t()+1e-12))*Math.cos(2*Math.PI*t())}function Pt(t,e){let n=1e-9;for(const r of t)n=Math.max(n,Math.abs(r));for(let r=0;rQn(n)),a=Qt(r,i=>500+6500*Math.pow(i/e,1.4)),s=Qt(r,i=>150+1800*Math.pow(i/e,1.4)),o=new Float32Array(e);for(let i=0;i{const o=be(a);for(let i=o;i=480&&(r-=Math.abs(t[c-480])),n[c]=r/480;let a=0;for(const c of n)a=Math.max(a,c);const s=Math.max(.004,a*.06);let o=0,i=t.length-1;for(;oo&&n[i]Math.min(1,o/s))}class ta{constructor(e){T(this,"L");T(this,"R");this.dur=e,this.L=new Float32Array(be(e)),this.R=new Float32Array(be(e))}add(e,n,r=1,a=0){const s=Math.round(n*G),o=Math.cos((a+1)*Math.PI/4)*Math.SQRT2*r,i=Math.sin((a+1)*Math.PI/4)*Math.SQRT2*r;for(let h=0;h=this.L.length)break;this.L[d]+=e[h]*o,this.R[d]+=e[h]*i}}}finish(){const e=Math.tanh(1.1),n=this.L.length,r=be(.06);for(let a=0;an-r&&(s=(n-a)/r),this.L[a]=Math.tanh(this.L[a]*1.1)/e*s,this.R[a]=Math.tanh(this.R[a]*1.1)/e*s}return this}wav(){const e=this.L.length,n=new ArrayBuffer(44+e*4),r=new DataView(n),a=(o,i)=>[...i].forEach((h,d)=>r.setUint8(o+d,h.charCodeAt(0)));a(0,"RIFF"),r.setUint32(4,36+e*4,!0),a(8,"WAVE"),a(12,"fmt "),r.setUint32(16,16,!0),r.setUint16(20,1,!0),r.setUint16(22,2,!0),r.setUint32(24,G,!0),r.setUint32(28,G*4,!0),r.setUint16(32,4,!0),r.setUint16(34,16,!0),a(36,"data"),r.setUint32(40,e*4,!0);let s=44;for(let o=0;o{let t=0;return()=>t++})(),aa=new Error("ffmpeg is not loaded, call `await ffmpeg.load()` first"),ra=new Error("called FFmpeg.terminate()");var ce,Se,ke,Re,Te,ct,re;class sa{constructor(){Ee(this,ce,null);Ee(this,Se,{});Ee(this,ke,{});Ee(this,Re,[]);Ee(this,Te,[]);T(this,"loaded",!1);Ee(this,ct,()=>{S(this,ce)&&(S(this,ce).onmessage=({data:{id:e,type:n,data:r}})=>{switch(n){case z.LOAD:this.loaded=!0,S(this,Se)[e](r);break;case z.MOUNT:case z.UNMOUNT:case z.EXEC:case z.FFPROBE:case z.WRITE_FILE:case z.READ_FILE:case z.DELETE_FILE:case z.RENAME:case z.CREATE_DIR:case z.LIST_DIR:case z.DELETE_DIR:S(this,Se)[e](r);break;case z.LOG:S(this,Re).forEach(a=>a(r));break;case z.PROGRESS:S(this,Te).forEach(a=>a(r));break;case z.ERROR:S(this,ke)[e](r);break}delete S(this,Se)[e],delete S(this,ke)[e]})});Ee(this,re,({type:e,data:n},r=[],a)=>S(this,ce)?new Promise((s,o)=>{const i=na();S(this,ce)&&S(this,ce).postMessage({id:i,type:e,data:n},r),S(this,Se)[i]=s,S(this,ke)[i]=o,a==null||a.addEventListener("abort",()=>{o(new DOMException(`Message # ${i} was aborted`,"AbortError"))},{once:!0})}):Promise.reject(aa));T(this,"load",({classWorkerURL:e,...n}={},{signal:r}={})=>(S(this,ce)||(Be(this,ce,e?new Worker(new URL(e,import.meta.url),{type:"module"}):new Worker(new URL(""+new URL("worker-BAOIWoxA.js",import.meta.url).href,import.meta.url),{type:"module"})),S(this,ct).call(this)),S(this,re).call(this,{type:z.LOAD,data:n},void 0,r)));T(this,"exec",(e,n=-1,{signal:r}={})=>S(this,re).call(this,{type:z.EXEC,data:{args:e,timeout:n}},void 0,r));T(this,"ffprobe",(e,n=-1,{signal:r}={})=>S(this,re).call(this,{type:z.FFPROBE,data:{args:e,timeout:n}},void 0,r));T(this,"terminate",()=>{const e=Object.keys(S(this,ke));for(const n of e)S(this,ke)[n](ra),delete S(this,ke)[n],delete S(this,Se)[n];S(this,ce)&&(S(this,ce).terminate(),Be(this,ce,null),this.loaded=!1)});T(this,"writeFile",(e,n,{signal:r}={})=>{const a=[];return n instanceof Uint8Array&&a.push(n.buffer),S(this,re).call(this,{type:z.WRITE_FILE,data:{path:e,data:n}},a,r)});T(this,"mount",(e,n,r)=>{const a=[];return S(this,re).call(this,{type:z.MOUNT,data:{fsType:e,options:n,mountPoint:r}},a)});T(this,"unmount",e=>{const n=[];return S(this,re).call(this,{type:z.UNMOUNT,data:{mountPoint:e}},n)});T(this,"readFile",(e,n="binary",{signal:r}={})=>S(this,re).call(this,{type:z.READ_FILE,data:{path:e,encoding:n}},void 0,r));T(this,"deleteFile",(e,{signal:n}={})=>S(this,re).call(this,{type:z.DELETE_FILE,data:{path:e}},void 0,n));T(this,"rename",(e,n,{signal:r}={})=>S(this,re).call(this,{type:z.RENAME,data:{oldPath:e,newPath:n}},void 0,r));T(this,"createDir",(e,{signal:n}={})=>S(this,re).call(this,{type:z.CREATE_DIR,data:{path:e}},void 0,n));T(this,"listDir",(e,{signal:n}={})=>S(this,re).call(this,{type:z.LIST_DIR,data:{path:e}},void 0,n));T(this,"deleteDir",(e,{signal:n}={})=>S(this,re).call(this,{type:z.DELETE_DIR,data:{path:e}},void 0,n))}on(e,n){e==="log"?S(this,Re).push(n):e==="progress"&&S(this,Te).push(n)}off(e,n){e==="log"?Be(this,Re,S(this,Re).filter(r=>r!==n)):e==="progress"&&Be(this,Te,S(this,Te).filter(r=>r!==n))}}ce=new WeakMap,Se=new WeakMap,ke=new WeakMap,Re=new WeakMap,Te=new WeakMap,ct=new WeakMap,re=new WeakMap;var Yt;(function(t){t.MEMFS="MEMFS",t.NODEFS="NODEFS",t.NODERAWFS="NODERAWFS",t.IDBFS="IDBFS",t.WORKERFS="WORKERFS",t.PROXYFS="PROXYFS"})(Yt||(Yt={}));const oa="./fonts/",ia=[["LW SC","lw-sc-500.woff2","500"],["LW SC","lw-sc-700.woff2","700"],["LW Smiley","lw-smiley.woff2","400"],["LW Poppins","lw-poppins-800.woff2","800"],["LW Poppins","lw-poppins-600.woff2","600"],["LW IPA","lw-ipa-500.woff2","500"]],ue={sc:(t,e)=>`${t} ${e}px "LW SC", "PingFang SC", "Microsoft YaHei", sans-serif`,head:t=>`400 ${t}px "LW Smiley", "LW SC", "PingFang SC", sans-serif`,word:t=>`800 ${t}px "LW Poppins", "Helvetica Neue", Arial, sans-serif`,wordSemi:t=>`600 ${t}px "LW Poppins", "Helvetica Neue", Arial, sans-serif`,ipa:t=>`500 ${t}px "LW IPA", "Lucida Sans Unicode", "Arial Unicode MS", sans-serif`};let nt=null;function la(){return nt||(nt=Promise.all(ia.map(async([t,e,n])=>{const r=new FontFace(t,`url(${oa}${e})`,{weight:n,display:"block"});await r.load(),document.fonts.add(r)})).then(()=>{}),nt)}const Et=[{id:"glass",name:"磨砂白",card:"glass",fill:"rgba(255,255,255,0.70)",ink:"#16161c",sub:"#282834",rim:"rgba(255,255,255,0.8)",shadow:.43,radius:46,rotate:0,pillQ:{bg:"#ffd63d",fg:"#16161c"},pillA:{bg:"#22c55e",fg:"#ffffff"},marker:"rgba(255,214,61,0.85)",tag:{bg:"rgba(22,22,28,0.9)",fg:"#ffffff"},swatch:"linear-gradient(135deg,#f5f5f7,#d9dbe3)"},{id:"night",name:"暗夜玻璃",card:"glass",fill:"rgba(14,14,20,0.62)",ink:"#ffffff",sub:"#e8e8f0",rim:"rgba(255,255,255,0.22)",shadow:.5,radius:46,rotate:0,pillQ:{bg:"rgba(255,255,255,0.16)",fg:"#ffffff"},pillA:{bg:"#22c55e",fg:"#ffffff"},marker:"rgba(255,59,92,0.55)",tag:{bg:"#ffffff",fg:"#16161c"},swatch:"linear-gradient(135deg,#2a2a35,#0e0e14)"},{id:"sticky",name:"便利贴",card:"solid",fill:"#ffe680",ink:"#2a2418",sub:"#3a3222",rim:null,shadow:.35,radius:16,rotate:-2,pillQ:{bg:"#2a2418",fg:"#ffe680"},pillA:{bg:"#2a2418",fg:"#ffe680"},marker:"rgba(255,120,120,0.55)",tag:{bg:"#2a2418",fg:"#ffe680"},swatch:"linear-gradient(135deg,#fff1a8,#ffd84d)"},{id:"paper",name:"纯白卡片",card:"solid",fill:"#ffffff",ink:"#111114",sub:"#2a2a33",rim:null,shadow:.3,radius:36,rotate:0,pillQ:{bg:"#111114",fg:"#ffffff"},pillA:{bg:"#22c55e",fg:"#ffffff"},marker:"rgba(255,214,61,0.9)",tag:{bg:"#111114",fg:"#ffffff"},swatch:"#ffffff"},{id:"mono",name:"极简黑",card:"solid",fill:"rgba(14,14,18,0.94)",ink:"#ffffff",sub:"#dcdce4",rim:"rgba(255,255,255,0.12)",shadow:.45,radius:28,rotate:0,pillQ:{bg:"#ffffff",fg:"#111114"},pillA:{bg:"#ffffff",fg:"#111114"},marker:"rgba(255,59,92,0.6)",tag:{bg:"#ffffff",fg:"#111114"},swatch:"#111114"}],ca=t=>Et.find(e=>e.id===t)??Et[0],pe=1080,xe=1440,Q=30,K=920,ha=82,st=3;function Xt(t,e,n){const r=[...t.en].filter(g=>g!==" ").length||1;if(t.compact){const g=le(t.hold,.25,.6),w=g+.15,m=le(.4/r,.035,.07),v=w+(r-1)*m+.1,k=v+.1,x=k+e*.5,j=n!=null?k+e+.1:null,E=Math.min(st,n!=null?st:Math.max(k+e+.25,x+.6)),N=Math.min(Math.round(st*Q),Math.ceil(E*Q));return{rev:g,grow:.35,type0:w,dt:m,done:v,marker:v+.03,ipa:v+.08,en1:k,mean:x,en2:j,sweep:v+.25,end:E,nf:N,dur:N/Q,coverFrame:Math.max(0,Math.min(6,Math.floor(g*Q)-3))}}const a=Math.max(.3,t.hold),s=a+.23,o=le(.55/r,.05,.085),i=s+(r-1)*o+.14,h=i+.24,d=h+e*.55,c=n!=null?h+e+.3:null,u=(c!=null?c+n:Math.max(h+e,d+.5))+.5,p=Math.ceil(u*Q);return{rev:a,grow:.45,type0:s,dt:o,done:i,marker:i+.05,ipa:i+.18,en1:h,mean:d,en2:c,sweep:i+.35,end:u,nf:p,dur:p/Q,coverFrame:Math.max(0,Math.min(6,Math.floor(a*Q)-3))}}function le(t,e=0,n=1){return Math.max(e,Math.min(n,t))}const me=(t,e,n)=>n>0?le((t-e)/n):t>=e?1:0,at=t=>1-(1-t)**3,Ve=t=>t<.5?4*t**3:1-(-2*t+2)**3/2,Jt=(t,e=1.9)=>1+(e+1)*(t-1)**3+e*(t-1)**2,Kt=(t,e,n)=>t+(e-t)*n;function Ie(t,e,n,r,a,s){s=Math.max(0,Math.min(s,r/2,a/2)),t.beginPath(),t.moveTo(e+s,n),t.arcTo(e+r,n,e+r,n+a,s),t.arcTo(e+r,n+a,e,n+a,s),t.arcTo(e,n+a,e,n,s),t.arcTo(e,n,e+r,n,s),t.closePath()}function Zt(t){let e=t>>>0;return()=>(e=e*1664525+1013904223>>>0,e/4294967296)}const ut=["#ff3b5c","#ffd63d","#3ddc97","#4d96ff","#ff8a3d","#b57cff"];function rt(t,e){const n=document.createElement("canvas");return n.width=t,n.height=e,n}class fa{constructor(e,n,r){T(this,"st");T(this,"T");T(this,"env");T(this,"wsize",124);T(this,"hsize",84);T(this,"wordX0",0);T(this,"wordW",0);T(this,"finalCx",[]);T(this,"qParts",[]);T(this,"po");T(this,"CHQ");T(this,"CHA");T(this,"particles");T(this,"grain",[]);T(this,"tmpA",rt(8,8));T(this,"tmpB",rt(8,8));T(this,"filterOK");this.spec=e,this.st=ca(e.styleId),this.T=n,this.env=r,this.po=e.showPill?0:ha,this.CHQ=252-this.po,this.CHA=(e.ipa||e.zh||e.pos?452:290)-this.po;const a=rt(4,4).getContext("2d");this.filterOK=typeof a.filter=="string";let s=124;for(a.font=ue.word(s);a.measureText(e.en).width>K-120&&s>40;)s-=2,a.font=ue.word(s);this.wsize=s,this.wordW=a.measureText(e.en).width,this.wordX0=(K-this.wordW)/2,this.finalCx=[...e.en].map((c,u)=>this.wordX0+a.measureText(e.en.slice(0,u)).width+a.measureText(c).width/2);const o=e.question||"「{zh}」用英语怎么说?",i=o.indexOf("{zh}");this.qParts=i<0?[{text:o,key:!1}]:[{text:o.slice(0,i),key:!1},{text:e.zh,key:!0},{text:o.slice(i+4),key:!1}].filter(c=>c.text);for(let c=0;c0&&this.qParts[c-1].text.endsWith("「")&&(this.qParts[c-1].text=this.qParts[c-1].text.slice(0,-1),u.text="「"+u.text),u.key&&c+1c.text);let h=84;for(a.font=ue.head(h);a.measureText(this.qParts.map(c=>c.text).join("")).width>K-110&&h>36;)h-=2,a.font=ue.head(h);this.hsize=h;const d=Zt(e.en.length*977+13);if(this.particles=Array.from({length:46},(c,u)=>{const p=-Math.PI*(.05+d()*.9),g=650+d()*850;return{x:(d()-.5)*520,y:(d()-.5)*60,vx:Math.cos(p)*g*.9,vy:Math.sin(p)*g,rot:d()*360,vr:(d()-.5)*1440,kind:Math.floor(d()*3),col:ut[u%ut.length],sz:9+d()*8,delay:d()*.08}}),e.grain){const c=Zt(7);for(let u=0;u<3;u++){const p=rt(540,720),g=p.getContext("2d"),w=g.createImageData(540,720);for(let m=0;m{e.setTransform(1,0,0,1,0,0),e.translate(p,g),e.rotate(w),e.scale(c,c),e.translate(-K/2,-u/2)};e.save(),m(),e.shadowColor=`rgba(10,10,20,${s.shadow})`,e.shadowBlur=68,e.shadowOffsetY=22/c,Ie(e,0,0,K,u,s.radius),e.fillStyle=s.card==="solid"?s.fill:"rgba(128,128,128,1)",e.fill(),e.restore(),e.save(),m(),Ie(e,0,0,K,u,s.radius),e.clip(),h?(e.setTransform(1,0,0,1,0,0),e.imageSmoothingQuality="high",e.drawImage(h.c,h.x,h.y,h.w,h.h),m(),e.fillStyle=s.fill,e.fillRect(-4,-4,K+8,u+8)):(e.fillStyle=s.fill,e.fillRect(-4,-4,K+8,u+8)),this.content(e,r,n,u),this.spec.sweep&&this.drawSweep(e,r,u),e.restore(),s.rim&&(e.save(),m(),Ie(e,1,1,K-2,u-2,s.radius),e.strokeStyle=s.rim,e.lineWidth=2,e.stroke(),e.restore()),e.setTransform(1,0,0,1,0,0),this.spec.confetti&&this.drawConfetti(e,r,g-u*c/2+(186-this.po)*c),this.grain.length&&(e.save(),e.globalCompositeOperation="overlay",e.globalAlpha=.09,e.imageSmoothingEnabled=!1,e.drawImage(this.grain[n%3],0,0,pe,xe),e.restore())}drawSweep(e,n,r){const a=me(n,this.T.sweep,.55);if(a<=0||a>=1)return;const s=Kt(-260,K+300,Ve(a));e.save(),e.translate(s,r/2),e.rotate(18*Math.PI/180);const o=e.createLinearGradient(-130,0,130,0);o.addColorStop(0,"rgba(255,255,255,0)"),o.addColorStop(.5,"rgba(255,255,255,0.45)"),o.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=o,e.fillRect(-130,-r*1.2,260,r*2.4),e.restore()}drawPill(e,n){const r=this.T,a=this.st,s=Ve(me(n,r.rev+.05,r.grow*.7)),o=38,i=54;if(e.font=ue.sc(700,28),e.textBaseline="middle",e.textAlign="left",s<1&&this.spec.pillQ){const h=this.spec.pillQ,d=48+e.measureText(h).width+26,c=(K-d)/2;e.globalAlpha=1-s,Ie(e,c,o,d,i,i/2),e.fillStyle=a.pillQ.bg,e.fill(),e.fillStyle=this.spec.accent,e.beginPath(),e.arc(c+27,o+i/2,7,0,Math.PI*2),e.fill(),(Math.floor(n*2.2)%2===0||n>=r.rev)&&(e.globalAlpha=(1-s)*.35,e.strokeStyle=this.spec.accent,e.lineWidth=3,e.beginPath(),e.arc(c+27,o+i/2,11,0,Math.PI*2),e.stroke(),e.globalAlpha=1-s),e.fillStyle=a.pillQ.fg,e.fillText(h,c+48,o+i/2+1),e.globalAlpha=1}if(s>0&&this.spec.pillA){const h=this.spec.pillA,d=54+e.measureText(h).width+26,c=.85+.15*Jt(s);e.save(),e.globalAlpha=s,e.translate(K/2,o+i/2),e.scale(c,c),e.translate(-d/2,-i/2),Ie(e,0,0,d,i,i/2),e.fillStyle=a.pillA.bg,e.fill(),e.strokeStyle=a.pillA.fg,e.lineWidth=5,e.lineCap="round",e.lineJoin="round",e.beginPath(),e.moveTo(21,i/2+1),e.lineTo(27,i/2+8),e.lineTo(40,i/2-8),e.stroke(),e.fillStyle=a.pillA.fg,e.fillText(h,54,i/2+1),e.restore()}}content(e,n,r,a){const s=this.T,o=this.st,i=this.spec,h=this.po;i.showPill&&this.drawPill(e,n);const d=Ve(me(n,s.rev,s.grow*.62));if(d<1){e.font=ue.head(this.hsize),e.textBaseline="middle",e.textAlign="left";const m=e.measureText(this.qParts.map(x=>x.text).join("")).width;let v=(K-m)/2;const k=176-h-34*d;e.globalAlpha=1-d;for(const x of this.qParts)e.fillStyle=x.key?i.accent:o.ink,e.fillText(x.text,v,k),v+=e.measureText(x.text).width;e.globalAlpha=1}const c=186-h,u=at(me(n,s.marker,.32));if(u>0){const m=c+this.wsize*.22;Ie(e,this.wordX0-14,m-this.wsize*.26,(this.wordW+28)*u,this.wsize*.32,12),e.fillStyle=o.marker,e.fill()}e.textAlign="center",e.textBaseline="alphabetic",e.fillStyle=o.ink;let p=0;[...i.en].forEach((m,v)=>{if(m===" ")return;const k=s.type0+p*s.dt,x=me(n,k,.16),j=p;if(p++,x<=0)return;const E=Jt(x,2.6),N=this.wsize*(.45+.55*E),I=Math.sin(le((n-s.done-j*.03)/.4)*Math.PI)*14,P=c+this.wsize*.3-I-26*(1-at(x));e.globalAlpha=Math.min(1,x*1.8),e.font=ue.word(N),e.fillText(m,this.finalCx[v],P)}),e.globalAlpha=1;const g=at(me(n,s.ipa,.32));if(g>0&&this.CHA>300-h){e.font=ue.ipa(46),e.textAlign="left",e.textBaseline="middle";const m=i.ipa?e.measureText(i.ipa).width:0,v=62,k=(K-(v+(i.ipa?20+m:0)))/2,x=306-h+26*(1-g),j=this.env[Math.min(r,this.env.length-1)]??0,E=k+v/2;e.globalAlpha=g,j>.05&&(e.globalAlpha=.43*j*g,e.strokeStyle=i.accent,e.lineWidth=3,e.beginPath(),e.arc(E,x,v/2+6+16*j,0,Math.PI*2),e.stroke(),e.globalAlpha=g),e.fillStyle=i.accent,e.beginPath(),e.arc(E,x,v/2*(1+.1*j),0,Math.PI*2),e.fill();const N=E-13;e.fillStyle="#ffffff",e.beginPath(),e.moveTo(N,x-6),e.lineTo(N+7,x-6),e.lineTo(N+16,x-14),e.lineTo(N+16,x+14),e.lineTo(N+7,x+6),e.lineTo(N,x+6),e.closePath(),e.fill(),e.strokeStyle="#ffffff",e.lineWidth=3,e.lineCap="butt",[9,16].forEach((I,P)=>{e.globalAlpha=g*(.55+.45*le(j*2.2-P*.5)),e.beginPath(),e.arc(N+15,x,I,-48*Math.PI/180,48*Math.PI/180),e.stroke()}),e.globalAlpha=g,i.ipa&&(e.fillStyle=o.sub,e.fillText(i.ipa,k+v+20,x+5)),e.globalAlpha=1}const w=at(me(n,s.mean,.3));if(w>0&&(i.zh||i.pos)){e.globalAlpha=w,e.textBaseline="middle",e.font=ue.wordSemi(28);const m=i.pos?e.measureText(i.pos).width+26:0;e.font=ue.sc(700,38);const v=e.measureText(i.zh).width,k=(K-(m+(i.pos?16:0)+v))/2,x=394-h+20*(1-w);i.pos&&(Ie(e,k,x-21,m,42,10),e.fillStyle=o.tag.bg,e.fill(),e.font=ue.wordSemi(28),e.textAlign="center",e.fillStyle=o.tag.fg,e.fillText(i.pos,k+m/2,x+2)),e.font=ue.sc(700,38),e.textAlign="left",e.fillStyle=o.ink,e.fillText(i.zh,k+m+(i.pos?16:0),x+1),e.globalAlpha=1}}drawConfetti(e,n,r){const a=n-(this.T.done+.04);if(a<=0||a>1.6)return;const s=pe/2;for(const o of this.particles){const i=a-o.delay;if(i<=0)continue;const h=(1-Math.exp(-2.6*i))/2.6,d=s+o.x+o.vx*h,c=r+o.y+o.vy*h+.5*1500*i*i*.55,u=le(1-(i-.75)/.6);if(u<=0)continue;const p=o.sz,g=(o.rot+o.vr*i)*Math.PI/180;if(e.globalAlpha=u,e.fillStyle=o.col,e.save(),e.translate(d,c),e.rotate(g),o.kind===0){const w=Math.abs(Math.cos(g*1.7))*.8+.2;e.fillRect(-p*.4*w,-p,p*.8*w,p*2)}else if(o.kind===1)e.beginPath(),e.arc(0,0,p*.5,0,Math.PI*2),e.fill();else{o.col===ut[1]&&(e.fillStyle="#ffffff"),e.beginPath();for(let w=0;w<8;w++){const m=w%2===0?p*.95:p*.28,v=w*Math.PI/4;w===0?e.moveTo(m*Math.cos(v),m*Math.sin(v)):e.lineTo(m*Math.cos(v),m*Math.sin(v))}e.closePath(),e.fill()}e.restore()}e.globalAlpha=1}}const It=new TextEncoder,en=It.encode("com.apple.quicktime.content.identifier"),da=It.encode("com.apple.quicktime.still-image-time"),un=new Uint8Array([0,0,0,9,0,0,0,1,0]),ua=new Set(["moov","trak","mdia","minf","dinf","stbl","edts","tref","gmhd","udta","ilst"]);function ma(){const t=globalThis.crypto;if(typeof t.randomUUID=="function")return t.randomUUID().toUpperCase();const e=new Uint8Array(16);t.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;const n=[...e].map(r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`.toUpperCase()}function C(t){const e=t.reduce((a,s)=>a+s.length,0),n=new Uint8Array(e);let r=0;for(const a of t)n.set(a,r),r+=a.length;return n}const ve=(...t)=>new Uint8Array(t);function q(t){return ve(t>>>8&255,t&255)}function M(t){return ve(t>>>24&255,t>>>16&255,t>>>8&255,t&255)}function pa(t){return M(t>>>0)}function $e(t,e){return(t[e]<<24>>>0)+(t[e+1]<<16)+(t[e+2]<<8)+t[e+3]}function mn(t,e){return $e(t,e)*2**32+$e(t,e+4)}function it(t,e,n){t[e]=n>>>24&255,t[e+1]=n>>>16&255,t[e+2]=n>>>8&255,t[e+3]=n&255}function ga(t,e,n){it(t,e,Math.floor(n/2**32)),it(t,e+4,n%2**32)}function pn(t,e){return String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])}function ee(t){return It.encode(t)}const Fe=t=>t.start+t.size,Le=t=>t.start+t.header;function L(t,e){return C([M(e.length+8),ee(t),e])}function lt(t,e=0,n=t.length){const r=[];let a=e;for(;an)throw new Error("MOV atom 头部不完整");let s=$e(t,a);const o=pn(t,a+4);let i=8;if(s===1?(s=mn(t,a+8),i=16):s===0&&(s=n-a),sn)throw new Error(`MOV atom ${o} 越界`);r.push({start:a,size:s,type:o,header:i}),a+=s}return r}const Rt=(t,e)=>lt(t,Le(e),Fe(e)),Ye=(t,e,n)=>Rt(t,e).find(r=>r.type===n);function wa(t,e){const n=lt(t)[0],r=a=>{for(const s of Rt(t,a))if(s.type==="stco"||s.type==="co64"){const o=Le(s)+4,i=$e(t,o),h=s.type==="stco"?4:8;for(let d=0;dve(t,e>>>16&255,e>>>8&255,e&255);function va(t){const e=ee(t),n=L("hdlr",C([ae(),new Uint8Array(4),ee("mdta"),new Uint8Array(12),ve(0,0)])),r=C([M(8+en.length),ee("mdta"),en]),a=L("keys",C([ae(),M(1),r])),s=L("data",C([M(1),M(0),e])),o=L("\0\0\0",s);return L("meta",C([n,a,L("ilst",o)]))}function tn(t){const e=ee(t);return C([ve(e.length),e])}function ba(t,e,n,r,a,s){const o=r+s,i=C([65536,0,0,0,65536,0,0,0,1073741824].map(M)),h=L("tkhd",C([ae(0,15),M(0),M(0),M(t),M(0),M(o),new Uint8Array(8),new Uint8Array(8),i,M(0),M(0)])),d=[];r&&d.push(C([M(r),pa(-1),q(1),q(0)])),d.push(C([M(s),M(0),q(1),q(0)]));const c=L("elst",C([ae(),M(d.length),...d])),u=L("edts",c),p=L("tref",L("cdsc",M(e))),g=L("mdhd",C([ae(),M(0),M(0),M(n),M(s),q(21956),q(0)])),w=L("hdlr",C([ae(),ee("mhlrmetaappl"),M(1),M(0),tn("Core Media Metadata")])),m=L("gmin",C([ae(),q(64),q(32768),q(32768),q(32768),q(0),q(0)])),v=L("gmhd",m),k=L("hdlr",C([ae(),ee("dhlralisappl"),M(0),M(0),tn("Core Media Data Handler")])),x=L("alis",ae(0,1)),j=L("dref",C([ae(),M(1),x])),E=L("dinf",j),N=L("keyd",C([ee("mdta"),da])),I=L("dtyp",C([ae(),M(65)])),P=C([M(8+N.length+I.length),M(1),N,I]),A=L("keys",P),y=L("mebx",C([new Uint8Array(6),q(1),A])),R=L("stsd",C([ae(),M(1),y])),te=L("stts",C([ae(),M(1),M(1),M(s)])),V=L("stsc",C([ae(),M(1),M(1),M(1),M(1)])),O=L("stsz",C([ae(),M(0),M(1),M(un.length)])),Y=L("stco",C([ae(),M(1),M(a)])),ne=L("stbl",C([R,te,V,O,Y])),J=L("minf",C([v,k,E,ne])),B=L("mdia",C([g,w,J]));return L("trak",C([h,u,p,B]))}function xa(t,e){const n=Ye(t,e,"mvhd");if(!n)throw new Error("MOV 缺少 mvhd");const r=t[Le(n)];return $e(t,n.start+(r===1?28:20))}function nn(t,e){const n=Ye(t,e,"tkhd"),r=t[Le(n)];return $e(t,n.start+(r===1?28:20))}function ya(t,e){const n=Ye(t,e,"mdia"),r=n&&Ye(t,n,"hdlr");return r?pn(t,r.start+16):""}function Ma(t,e,n,r,a){const s=lt(t),o=s.filter(O=>O.type==="mdat"),i=s.find(O=>O.type==="moov");if(o.length!==1||!i||s.some(O=>O.type==="moof"))throw new Error("需要单一 mdat 的 MOV");const h=o[0],d=xa(t,i),c=Rt(t,i).filter(O=>O.type==="trak"),u=c.map(O=>nn(t,O)),p=c.find(O=>ya(t,O)==="vide");if(!p)throw new Error("MOV 中没有视频轨");const g=nn(t,p),w=Math.max(0,...u)+1,m=Math.max(0,Math.round(r*d)-1),v=Math.min(Math.max(0,Math.round(n*d)),m),k=C(s.filter(O=>O.type!=="mdat"&&O.type!=="moov").map(O=>t.subarray(O.start,Fe(O)))),x=t.subarray(Le(h),Fe(h)),j=L("mdat",C([x,un])),E=k.length+8,N=E-Le(h),I=E+x.length,P=t.slice(i.start,Fe(i));wa(P,N);const A=lt(P)[0],y=Ye(P,A,"mvhd");it(P,Fe(y)-4,w+1);const R=P.subarray(Le(A),Fe(A)),te=C([va(e),ba(w,g,d,v,I,Math.max(1,Math.round(d/a)))]),V=L("moov",C([R,te]));return C([k,j,V])}function ka(t){const e=ee(t);return C([ee("Apple iOS"),ve(0,0,1),ee("MM"),q(1),q(17),q(2),M(e.length+1),M(32),M(0),e,ve(0)])}function ja(t,e,n,r){if(t[0]!==255||t[1]!==216)throw new Error("不是 JPEG");const a=ka(e),s=ee("Apple\0"),o=ee("LiveWords\0"),i=8,d=i+42;let u=d+78;const p=u;u+=s.length;const g=u;u+=o.length,u%2&&u++;const w=u,m=(N,I,P,A)=>C([q(N),q(I),M(P),A]),v=N=>{const I=new Uint8Array(4);return I.set(N),I},k=C([ee("MM"),q(42),M(i),q(3),m(271,2,s.length,M(p)),m(272,2,o.length,M(g)),m(34665,4,1,M(d)),M(0),q(6),m(36864,7,4,ee("0232")),m(37500,7,a.length,M(w)),m(40960,7,4,ee("0100")),m(40961,3,1,v(q(1))),m(40962,4,1,M(n)),m(40963,4,1,M(r)),M(0),s,o,(p+s.length+o.length)%2?ve(0):new Uint8Array(0),a]),x=C([ee("Exif"),ve(0,0),k]),j=C([ve(255,225),q(x.length+2),x]);let E=2;return t[2]===255&&t[3]===224&&(E=4+(t[4]<<8|t[5])),C([ve(255,216),j,t.subarray(E)])}let ze=null;function Aa(){return ze||(ze=(async()=>{const t=new URL("./ffmpeg/",window.location.href).href,e=new sa;return await e.load({classWorkerURL:`${t}worker.js`,coreURL:`${t}ffmpeg-core.js`,wasmURL:`${t}ffmpeg-core.wasm`}),e})(),ze.catch(()=>{ze=null}),ze)}async function Ea(){if(typeof window>"u"||typeof window.VideoEncoder!="function")return null;for(const t of["avc1.640028","avc1.4d0028","avc1.42e028","avc1.42001f"]){const e={codec:t,width:pe,height:xe,bitrate:1e7,framerate:Q,latencyMode:"quality",avc:{format:"annexb"}};try{if((await VideoEncoder.isConfigSupported(e)).supported)return e}catch{}}return null}function mt(t,e,n){return new Promise((r,a)=>t.toBlob(s=>s?r(s):a(new Error("导出图片失败")),e,n))}async function Na(t,e,n,r=!1){const a=t.T,s=document.createElement("canvas");s.width=pe,s.height=xe;const o=s.getContext("2d",{alpha:!1});n("加载编码器",0);const i=await Aa();let h=null;const d=r?null:await Ea();let c="x264";if(d){c="webcodecs";const j=[];let E=null;const N=new VideoEncoder({output:y=>{const R=new Uint8Array(y.byteLength);y.copyTo(R),j.push(R)},error:y=>{E=y}});N.configure(d);for(let y=0;y4;)await new Promise(te=>setTimeout(te,4));if(E)throw E;y%3===0&&n("渲染画面",y/a.nf)}if(await N.flush(),N.close(),E)throw E;const I=j.reduce((y,R)=>y+R.length,0),P=new Uint8Array(I);let A=0;for(const y of j)P.set(y,A),A+=y.length;await i.writeFile("v.h264",P)}else for(let j=0;jn(c==="webcodecs"?"合成视频":"编码视频",c==="webcodecs"?Math.min(1,j):.5+.5*Math.min(1,j));i.on("progress",u);const p=["-i","a.wav","-map","0:v:0","-map","1:a:0","-c:a","aac","-b:a","128k","-ar","44100","-ac","1","-shortest","-map_metadata","-1","-movie_timescale","60000","-video_track_timescale","30000","-f","mov","out.mov"],g=c==="webcodecs"?["-fflags","+genpts","-framerate",String(Q),"-i","v.h264",...p.slice(0,6),"-c:v","copy",...p.slice(6)]:["-framerate",String(Q),"-i","f%04d.jpg",...p.slice(0,6),"-c:v","libx264","-preset","veryfast","-crf","19","-pix_fmt","yuv420p","-profile:v","high",...p.slice(6)],w=await i.exec(g);if(i.off("progress",u),w!==0)throw new Error("视频合成失败");const m=await i.readFile("out.mov");for(const j of await i.listDir("/"))!j.isDir&&/^(f\d{4}\.jpg|v\.h264|a\.wav|out\.mov)$/.test(j.name)&&await i.deleteFile(j.name);n("写入实况标识",1);const v=ma(),k=Ma(m,v,a.coverFrame/Q,a.nf/Q,Q),x=ja(new Uint8Array(await h.arrayBuffer()),v,pe,xe);return{id:v,jpg:x,mov:k,duration:a.nf/Q,encoder:c,coverURL:URL.createObjectURL(new Blob([x],{type:"image/jpeg"})),videoURL:URL.createObjectURL(new Blob([k],{type:"video/mp4"}))}}const Ca=[[/^Noun$/i,"n."],[/^Verb$/i,"v."],[/^Adjective$/i,"adj."],[/^Adverb$/i,"adv."],[/^(Phrase|Idiom|Proverb)$/i,"phr."],[/^Interjection$/i,"int."],[/^Preposition$/i,"prep."],[/^Pronoun$/i,"pron."]];function Sa(t){return t.replace(/ɹ/g,"r").replace(/ɚ/g,"ər").replace(/ɝ/g,"ɜːr").replace(/ɫ/g,"l").replace(/ɾ/g,"t").replace(/ɛ/g,"e").replace(/ɐ/g,"ʌ").replace(/[()]/g,"").replace(/\.(?=\S)/g,"")}async function gn(t){var g,w;const e=t.trim(),n=`https://en.wiktionary.org/w/api.php?action=parse&format=json&origin=*&redirects=1&prop=wikitext&page=${encodeURIComponent(e)}`,r=await fetch(n);if(!r.ok)throw new Error("词典查询失败");const a=await r.json(),s=((w=(g=a==null?void 0:a.parse)==null?void 0:g.wikitext)==null?void 0:w["*"])??"";if(!s)throw new Error("词典里没有这个词");const o=s.match(/==English==([\s\S]*?)(\n==[^=][^\n]*==\s*\n|$)/),i=o?o[1]:s,h=i.split(` +`).filter(m=>m.includes("{{IPA|en|")),c=(h.find(m=>/(a=|\{\{a\|)[^}]*\b(GA|GenAm)\b/.test(m))??h.find(m=>/\bUS\b/.test(m)&&!/Southern US/.test(m))??h[0]??"").match(/\{\{IPA\|en\|([^}]*)\}\}/);let u="";if(c){const m=c[1].split("|").find(v=>/^[/[]/.test(v.trim()));m&&(u=Sa(m.trim().replace(/^\[/,"/").replace(/\]$/,"/")))}let p="";for(const m of i.matchAll(/\n===+\s*([^=\n]+?)\s*===+/g)){const v=Ca.find(([k])=>k.test(m[1]));if(v){p=v[1];break}}if(!u&&/\s/.test(e)){const m=[];for(const v of e.split(/\s+/))try{const k=await gn(v);if(!k.ipa)return{ipa:"",pos:p};m.push(k.ipa.replace(/^\/|\/$/g,""))}catch{return{ipa:"",pos:p}}u=`/${m.join(" ")}/`}return{ipa:u,pos:p}}const Pa="https://commons.wikimedia.org/w/api.php";async function pt(t){const e=new URLSearchParams({format:"json",origin:"*",...t}),n=await fetch(`${Pa}?${e}`);if(!n.ok)throw new Error("维基共享资源暂时无法访问");return n.json()}function Ia(t){const e=t.replace(/^File:/,"");let n=e.match(/^En-(us|uk|au|ca|nz|ie)-/i);return n?{us:"美式",uk:"英式",au:"澳式",ca:"加拿大",nz:"新西兰",ie:"爱尔兰"}[n[1].toLowerCase()]+" · Commons":(n=e.match(/^LL-Q1860 \(eng\)-([^-]+)-/),n?`LinguaLibre · ${n[1]}`:e)}async function Ra(t){var d,c,u,p;const e=t.trim(),n=e.toLowerCase(),r=new Set;for(const g of[e,n,n.replace(/ /g,"_")])for(const w of["us","uk","au"])r.add(`File:En-${w}-${g}.ogg`);const a=await pt({action:"query",titles:[...r].join("|")}),s=Object.values(((d=a==null?void 0:a.query)==null?void 0:d.pages)??{}).filter(g=>!("missing"in g)).map(g=>g.title);try{const g=await pt({action:"query",list:"search",srnamespace:"6",srlimit:"12",srsearch:`intitle:"${e}" intitle:LL-Q1860`});for(const w of((c=g==null?void 0:g.query)==null?void 0:c.search)??[]){const m=w.title;m.toLowerCase().endsWith(`-${n}.wav`)&&m.includes("(eng)")&&s.push(m)}}catch{}const o=[...new Set(s)].slice(0,8);if(!o.length)return[];const i=await pt({action:"query",titles:o.join("|"),prop:"imageinfo",iiprop:"url"}),h=[];for(const g of Object.values(((u=i==null?void 0:i.query)==null?void 0:u.pages)??{})){const w=(p=g.imageinfo)==null?void 0:p[0];if(!w)continue;let m=w.url.split("?")[0];if(/\.(ogg|oga|opus)$/i.test(m)){const v=m.split("/").pop();m=m.replace("/wikipedia/commons/","/wikipedia/commons/transcoded/")+`/${v}.mp3`}h.push({title:g.title,label:Ia(g.title),url:m,page:w.descriptionurl})}return h.sort((g,w)=>(g.label.startsWith("美式")?-1:0)-(w.label.startsWith("美式")?-1:0)),h}async function Ta(t){let e=await fetch(t);if(!e.ok&&t.includes("/transcoded/")){const n=t.replace("/transcoded/","/").replace(/\/[^/]+\.mp3$/,"");e=await fetch(n)}if(!e.ok)throw new Error("音频下载失败");return e.arrayBuffer()}let gt=null;function La(){return gt||(gt={whoosh:Gn(),chime:Xn(),shimmer:Kn(),pop:Jn()}),gt}const wt=[],Oa=t=>wt[t]??(wt[t]=Yn(t));function $a(t,e,n){const r=e.clip,a=r?r.length/G:.7;let s=null,o=e.second;if(r&&e.second!=="none"){const w=e.second==="slow"?[["slow",Zn(r,.8)],["same",r]]:[["same",r]];if(t.compact){const m=Xt(t,a,null),v=w.find(([,k])=>m.en1+a+.1+k.length/G+.1<=st);s=v?v[1]:null,o=v?v[0]:"none"}else s=w[0][1]}const i=s?s.length/G:null,h=Xt(t,a,i),d=new ta(h.dur),c=n.volume,u=La();if(n.whoosh&&d.add(u.whoosh,h.rev-.06,.9*c),n.tick){const w=t.en.length;let m=0;[...t.en].forEach((v,k)=>{v!==" "&&(d.add(Oa(m),h.type0+m*h.dt,.9*c,k/Math.max(w-1,1)*1.2-.6),m++)})}n.chime&&d.add(u.chime,h.done,.85*c),n.shimmer&&d.add(u.shimmer,h.done+.1,c),n.pop&&(d.add(u.pop,h.ipa,.7*c),d.add(u.pop,h.mean,.5*c));const p=new Float32Array(h.nf+2);r&&d.add(r,h.en1,e.volume),s&&h.en2!=null&&d.add(s,h.en2,e.volume);for(const[w,m]of[[r,h.en1],[s,h.en2]]){if(!w||m==null)continue;const v=ea(w,Q),k=Math.round(m*Q);for(let x=0;x.25*(p[m-1]??0)+.5*p[m]+.25*(p[m+1]??0));return d.finish(),{T:h,renderer:new fa(t,h,g),mixer:d,fitted:o,voiceCut:!!r&&h.en1+a>h.dur+.02}}const vt="./",Ua=[{key:"slippers",en:"slippers",zh:"拖鞋",ipa:"/ˈslɪpərz/",pos:"n.",note:"AI 生成"},{key:"umbrella",en:"umbrella",zh:"雨伞",ipa:"/ʌmˈbrelə/",pos:"n.",note:"AI 生成"},{key:"bubble-tea",en:"bubble tea",zh:"奶茶",ipa:"/ˈbʌbəl tiː/",pos:"n.",note:"AI 生成"},{key:"traffic-light",en:"traffic light",zh:"红绿灯",ipa:"/ˈtræfɪk laɪt/",pos:"n.",note:"Gary · CC BY-SA 2.0"},{key:"steamed-bun",en:"steamed bun",zh:"包子",ipa:"/ˌstiːmd ˈbʌn/",pos:"n.",note:"Guilhem Vellut · CC BY 2.0"},{key:"yawn",en:"yawn",zh:"打哈欠",ipa:"/jɔːn/",pos:"v.",note:"Wheeler Cowperthwaite · CC BY 2.0"}],za=["#ff3b5c","#ff7a1a","#f5b700","#16a34a","#2563eb","#7c3aed","#111114"],bt=[["en-US-AvaMultilingualNeural","美式女声"],["en-US-AndrewMultilingualNeural","美式男声"],["en-GB-SoniaNeural","英式女声"],["en-GB-RyanNeural","英式男声"]],Fa={crop:{zoom:1,x:.5,y:.5},en:"slippers",zh:"拖鞋",ipa:"/ˈslɪpərz/",pos:"n.",question:"「{zh}」用英语怎么说?",pillQ:"在线求助",pillA:"答案揭晓",showPill:!0,styleId:"glass",accent:"#ff3b5c",cardY:.5,motion:!0,grain:!0,confetti:!0,sweep:!0,hold:.35,compact:!0};function Da(t){return new Promise((e,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>e(r),r.onerror=()=>n(new Error("图片无法读取")),r.src=t})}async function xt(t,e){const n=await Da(t),r=Math.min(1,2400/Math.max(n.naturalWidth,n.naturalHeight)),a=document.createElement("canvas");a.width=Math.round(n.naturalWidth*r),a.height=Math.round(n.naturalHeight*r);const s=a.getContext("2d");return s.imageSmoothingQuality="high",s.drawImage(n,0,0,a.width,a.height),{src:a,w:a.width,h:a.height,name:e}}const Wa=t=>t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"word";function yt(t,e,n="application/octet-stream"){const r=t instanceof Blob?t:new Blob([t],{type:n}),a=document.createElement("a");a.href=URL.createObjectURL(r),a.download=e,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(a.href),5e3)}function He({step:t,title:e,children:n,extra:r}){return f.jsxs("section",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-5",children:[f.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[f.jsxs("h3",{className:"flex items-center gap-2.5 text-base font-semibold",children:[f.jsx("span",{className:"inline-flex h-6 w-6 items-center justify-center rounded-full bg-white text-xs font-bold text-neutral-900",children:t}),e]}),r]}),n]})}function Ce({label:t,children:e,hint:n}){return f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-[13px] text-neutral-400",children:t}),e,n&&f.jsx("span",{className:"text-xs text-neutral-500",children:n})]})}const Me="h-10 rounded-lg border border-white/10 bg-black/30 px-3 text-[15px] text-white outline-none focus:border-white/40";function Qe({label:t,value:e,min:n,max:r,step:a,onChange:s,fmt:o}){return f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsxs("span",{className:"flex justify-between text-[13px] text-neutral-400",children:[t,f.jsx("span",{className:"tabular-nums text-neutral-300",children:o?o(e):e})]}),f.jsx("input",{type:"range",min:n,max:r,step:a,value:e,onChange:i=>s(Number(i.target.value)),className:"accent-white"})]})}function we({label:t,checked:e,onChange:n}){return f.jsx("button",{type:"button",onClick:()=>n(!e),className:`rounded-full border px-3.5 py-1.5 text-sm transition ${e?"border-white bg-white text-neutral-900":"border-white/15 text-neutral-300 hover:border-white/40"}`,children:t})}function Ga(){const[t,e]=F.useState(!1),[n,r]=F.useState(null),[a,s]=F.useState(Fa),[o,i]=F.useState({clip:null,label:""}),[h,d]=F.useState("slow"),[c,u]=F.useState(1),[p,g]=F.useState({whoosh:!0,tick:!0,chime:!0,shimmer:!0,pop:!0,volume:1}),[w,m]=F.useState("commons"),[v,k]=F.useState(null),[x,j]=F.useState(""),[E,N]=F.useState(bt[0][0]),[I,P]=F.useState(!1),[A,y]=F.useState([]),[R,te]=F.useState(null),[V,O]=F.useState(""),[Y,ne]=F.useState(!1),J=F.useRef(null),B=F.useRef(null),oe=F.useRef(null),fe=F.useRef(null),D=(l,b)=>s(U=>({...U,[l]:b}));F.useEffect(()=>{la().then(()=>e(!0)).catch(()=>e(!0)),xt(`${vt}samples/slippers.jpg`,"slippers").then(r).catch(()=>{})},[]);const ie=F.useMemo(()=>({...a,image:(n==null?void 0:n.src)??null,imgW:(n==null?void 0:n.w)??0,imgH:(n==null?void 0:n.h)??0}),[a,n]),$=F.useMemo(()=>t&&ie.en.trim()?$a(ie,{clip:o.clip,second:h,volume:c},p):null,[t,ie,o,h,c,p]);F.useEffect(()=>{var b;if(!$||Y)return;const l=(b=J.current)==null?void 0:b.getContext("2d");l&&$.renderer.frame(l,$.T.coverFrame)},[$,Y]);const ge=F.useCallback(async(l,b)=>{if(!l.trim())return;j("正在查询音标和真人发音…"),k(null);const[U,H]=await Promise.allSettled([gn(l),Ra(l)]);let _="";b&&(U.status==="fulfilled"?(s(Ae=>({...Ae,ipa:U.value.ipa||Ae.ipa,pos:U.value.pos||Ae.pos})),U.value.ipa||(_="维基词典里没有这个词的音标,请手动填写。")):_="音标查询失败,请手动填写。"),H.status==="fulfilled"?(k(H.value),j(_+(H.value.length?"":"维基共享资源里没有找到这个词的真人录音,可以上传、录音或用语音合成。"))):(k([]),j(_+"录音查询失败,请稍后再试,或改用上传 / 录音。"))},[]),de=async l=>{try{j(`正在载入 ${l.label}…`);const b=tt(await et(await Ta(l.url)));i({clip:b,label:`${l.label}(维基共享资源真人录音)`}),j("")}catch{j("这段录音无法载入,换一条试试")}},X=async l=>{try{const b=tt(await et(await l.arrayBuffer()));i({clip:b,label:`上传:${l.name}`})}catch{O("这个音频格式无法识别,试试 mp3 / m4a / wav")}},je=async()=>{var l;if(I){(l=oe.current)==null||l.stop();return}try{const b=await navigator.mediaDevices.getUserMedia({audio:!0}),U=new MediaRecorder(b),H=[];U.ondataavailable=_=>H.push(_.data),U.onstop=async()=>{b.getTracks().forEach(_=>_.stop()),P(!1);try{const _=tt(await et(await new Blob(H).arrayBuffer()));i({clip:_,label:"我的录音"})}catch{O("录音解析失败,请重试")}},oe.current=U,U.start(),P(!0),setTimeout(()=>U.state==="recording"&&U.stop(),6e3)}catch{O("无法使用麦克风,请在浏览器里允许麦克风权限")}},Xe=async()=>{var l;try{j("正在合成…");const b=await fetch(Hn(`tts?text=${encodeURIComponent(a.en)}&voice=${E}&rate=-5`));if(!b.ok)throw new Error;const U=tt(await et(await b.arrayBuffer()));i({clip:U,label:`语音合成:${(l=bt.find(H=>H[0]===E))==null?void 0:l[1]}`}),j("")}catch{j("语音合成暂不可用(静态部署时没有后端),请改用真人录音、上传或录音")}},Pe=()=>{var l;(l=B.current)==null||l.stop(),B.current=null,ne(!1)},ft=()=>{if(!$)return;if(Y)return Pe();const l=new AudioContext,b=l.createBufferSource();b.buffer=$.mixer.toAudioBuffer(l),b.connect(l.destination);const U=J.current.getContext("2d");let H=0,_=!0;const Ae=l.currentTime+.05;b.start(Ae);const Tt=()=>{if(!_)return;const bn=l.currentTime-Ae,Lt=Math.max(0,Math.floor(bn*Q));if(Lt>=$.T.nf){Pe();return}$.renderer.frame(U,Lt),H=requestAnimationFrame(Tt)};H=requestAnimationFrame(Tt),B.current={stop:()=>{_=!1,cancelAnimationFrame(H);try{b.stop()}catch{}l.close()}},ne(!0)};F.useEffect(()=>()=>{var l;return(l=B.current)==null?void 0:l.stop()},[]);const Je=l=>{n&&(l.target.setPointerCapture(l.pointerId),fe.current={x:l.clientX,y:l.clientY,cx:a.crop.x,cy:a.crop.y})},Ke=l=>{const b=fe.current;if(!b||!n)return;const U=l.target.getBoundingClientRect(),_=Math.min(n.w,n.h*3/4)/a.crop.zoom/U.width;D("crop",{...a.crop,x:b.cx-(l.clientX-b.x)*_/n.w,y:b.cy-(l.clientY-b.y)*_/n.h})},Ze=()=>{if(fe.current=null,!n)return;const l=Math.min(n.w,n.h*3/4)/a.crop.zoom,b=l*4/3,U=Math.min(1-l/2/n.w,Math.max(l/2/n.w,a.crop.x)),H=Math.min(1-b/2/n.h,Math.max(b/2/n.h,a.crop.y));D("crop",{...a.crop,x:U,y:H})},De=async()=>{var l;if($){Pe(),O(""),te({stage:"准备",ratio:0});try{const b=await Na($.renderer,$.mixer.wav(),(_,Ae)=>te({stage:_,ratio:Ae})),U=`LIVE_${Wa(a.en)}`,H=A.filter(_=>_.name===U||_.name.startsWith(U+"_")).length;y(_=>[{...b,name:H?`${U}_${H+1}`:U,en:a.en,zh:a.zh},..._])}catch(b){O(`生成失败:${b instanceof Error?b.message:String(b)}`)}finally{te(null);const b=(l=J.current)==null?void 0:l.getContext("2d");b&&$&&$.renderer.frame(b,$.T.coverFrame)}}},We=()=>{const l={};for(const b of A)l[`${b.name}.JPG`]=[b.jpg,{level:0}],l[`${b.name}.MOV`]=[b.mov,{level:0}];yt(Vn(l),`live-photos-${A.length}.zip`,"application/zip")},wn=async l=>{r(await xt(`${vt}samples/${l.key}.jpg`,l.key)),s(b=>({...b,en:l.en,zh:l.zh,ipa:l.ipa,pos:l.pos,crop:{zoom:1,x:.5,y:.5}})),i({clip:null,label:""}),k(null)},vn=$?$.T.dur:0;return f.jsxs("div",{className:"grid gap-8 lg:grid-cols-[420px_minmax(0,1fr)]",children:[f.jsxs("div",{className:"lg:sticky lg:top-6 lg:self-start",children:[f.jsxs("div",{className:"relative mx-auto w-full max-w-[420px]",children:[f.jsx("canvas",{ref:J,width:pe,height:xe,onPointerDown:Je,onPointerMove:Ke,onPointerUp:Ze,className:"aspect-[3/4] w-full cursor-grab touch-none rounded-[22px] bg-neutral-900 ring-1 ring-white/10 active:cursor-grabbing"}),!t&&f.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-sm text-neutral-400",children:[f.jsx(Ut,{className:"mr-2 h-4 w-4 animate-spin"})," 正在加载字体"]}),f.jsxs("span",{className:"pointer-events-none absolute left-3 top-3 rounded-full bg-black/45 px-2.5 py-1 text-[11px] font-semibold text-white backdrop-blur",children:["LIVE · ",vn.toFixed(1),"s"]})]}),f.jsx("p",{className:"mt-2 text-center text-xs text-neutral-500",children:"拖动画面调整底图位置 · 上图为封面(静态图)"}),f.jsxs("div",{className:"mt-4 flex gap-3",children:[f.jsxs("button",{type:"button",onClick:ft,disabled:!$||!!R,className:"inline-flex flex-1 items-center justify-center gap-2 rounded-full border border-white/20 py-3 font-medium hover:bg-white/10 disabled:opacity-40",children:[Y?f.jsx(Mn,{className:"h-4 w-4"}):f.jsx(zt,{className:"h-4 w-4"}),Y?"停止":"播放动画(有声)"]}),f.jsxs("button",{type:"button",onClick:De,disabled:!$||!!R||!n,className:"inline-flex flex-[1.3] items-center justify-center gap-2 rounded-full bg-white py-3 font-semibold text-neutral-900 hover:bg-neutral-200 disabled:opacity-40",children:[R?f.jsx(Ut,{className:"h-4 w-4 animate-spin"}):f.jsx(Pn,{className:"h-4 w-4"}),R?`${R.stage} ${Math.round(R.ratio*100)}%`:"生成实况图"]})]}),R&&f.jsx("div",{className:"mt-3 h-1.5 overflow-hidden rounded-full bg-white/10",children:f.jsx("div",{className:"h-full bg-white transition-all",style:{width:`${Math.round(R.ratio*100)}%`}})}),f.jsxs("label",{className:"mt-4 flex cursor-pointer items-start gap-2.5 rounded-xl border border-white/10 px-3.5 py-3 text-sm",children:[f.jsx("input",{type:"checkbox",checked:a.compact,onChange:l=>s(b=>({...b,compact:l.target.checked,hold:l.target.checked?Math.min(b.hold,.6):b.hold})),className:"mt-0.5 accent-white"}),f.jsxs("span",{children:[f.jsx("span",{className:"font-medium",children:"微信朋友圈兼容(≤ 3 秒)"}),f.jsx("span",{className:"mt-0.5 block text-xs leading-5 text-neutral-500",children:"朋友圈只接受 3 秒左右的实况,超长会提示「实况异常」。开启后自动压缩节奏,第二遍读音放不下时改为原速或只读一遍。"})]})]}),$&&a.compact&&o.clip&&h!=="none"&&$.fitted!==h&&f.jsx("p",{className:"mt-2 text-center text-xs text-amber-300/90",children:$.fitted==="none"?"3 秒内放不下第二遍读音,这张只读一遍":"3 秒内放不下慢速第二遍,已改为原速"}),($==null?void 0:$.voiceCut)&&f.jsx("p",{className:"mt-2 text-center text-xs text-amber-300/90",children:"读音太长,结尾会被截断,换一段更短的录音试试"}),!o.clip&&$&&f.jsx("p",{className:"mt-3 text-center text-xs text-amber-300/90",children:"还没有选读音,生成的实况只有音效"}),V&&f.jsx("p",{className:"mt-3 text-center text-sm text-red-400",children:V}),f.jsx("p",{className:"mt-3 text-center text-xs leading-5 text-neutral-500",children:"全部在你的浏览器里完成,图片和录音不会上传。首次生成需要下载约 32 MB 的视频编码器。"}),A.length>0&&f.jsxs("div",{className:"mt-6 rounded-2xl border border-white/10 p-4",children:[f.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[f.jsxs("span",{className:"text-sm font-semibold",children:["已生成 ",A.length," 张"]}),f.jsxs("button",{type:"button",onClick:We,className:"inline-flex items-center gap-1.5 rounded-full bg-white px-3.5 py-1.5 text-sm font-semibold text-neutral-900 hover:bg-neutral-200",children:[f.jsx(kn,{className:"h-4 w-4"})," 打包下载 ZIP"]})]}),f.jsx("ul",{className:"flex flex-col gap-3",children:A.map(l=>f.jsxs("li",{className:"flex items-center gap-3",children:[f.jsx("video",{src:l.videoURL,poster:l.coverURL,controls:!0,playsInline:!0,className:"h-24 w-[72px] shrink-0 rounded-lg bg-black object-cover"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"truncate text-sm font-semibold",children:[l.en," · ",l.zh]}),f.jsxs("div",{className:"text-xs text-neutral-500",children:[l.duration.toFixed(1)," 秒 · ",l.name]}),f.jsxs("div",{className:"mt-2 flex gap-2",children:[f.jsx("button",{type:"button",onClick:()=>yt(l.jpg,`${l.name}.JPG`,"image/jpeg"),className:"rounded-md border border-white/15 px-2.5 py-1 text-xs hover:bg-white/10",children:"JPG"}),f.jsx("button",{type:"button",onClick:()=>yt(l.mov,`${l.name}.MOV`,"video/quicktime"),className:"rounded-md border border-white/15 px-2.5 py-1 text-xs hover:bg-white/10",children:"MOV"}),f.jsx("button",{type:"button",onClick:()=>y(b=>b.filter(U=>U.id!==l.id)),className:"ml-auto rounded-md px-2 py-1 text-neutral-500 hover:text-white","aria-label":"删除",children:f.jsx(Cn,{className:"h-3.5 w-3.5"})})]})]})]},l.id))}),f.jsx("p",{className:"mt-3 text-xs leading-5 text-neutral-500",children:"Mac 上把同名的 JPG 和 MOV 一起拖进「照片」App,就会识别成一张实况照片。"})]})]}),f.jsxs("div",{className:"flex flex-col gap-5",children:[f.jsxs(He,{step:1,title:"底图",children:[f.jsxs("div",{className:"flex flex-wrap gap-3",children:[f.jsxs("label",{className:"inline-flex cursor-pointer items-center gap-2 rounded-full bg-white px-4 py-2 text-sm font-semibold text-neutral-900 hover:bg-neutral-200",children:[f.jsx(An,{className:"h-4 w-4"})," 上传照片",f.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:async l=>{var U;const b=(U=l.target.files)==null?void 0:U[0];if(b){try{const H=URL.createObjectURL(b);r(await xt(H,b.name)),D("crop",{zoom:1,x:.5,y:.5})}catch{O("这张图片无法读取,换成 JPG / PNG 试试")}l.target.value=""}}})]}),f.jsx("span",{className:"self-center text-xs text-neutral-500",children:"建议竖拍照片,会自动裁成 3:4(1080×1440)"})]}),f.jsxs("div",{className:"mt-4",children:[f.jsx("div",{className:"mb-2 text-[13px] text-neutral-400",children:"或者用示例图片"}),f.jsx("div",{className:"grid grid-cols-6 gap-2",children:Ua.map(l=>f.jsx("button",{type:"button",onClick:()=>wn(l),title:`${l.zh} · ${l.note}`,className:`overflow-hidden rounded-lg ring-2 transition ${(n==null?void 0:n.name)===l.key?"ring-white":"ring-transparent hover:ring-white/40"}`,children:f.jsx("img",{src:`${vt}samples/${l.key}.jpg`,alt:l.zh,className:"aspect-[3/4] w-full object-cover",loading:"lazy"})},l.key))}),f.jsx("p",{className:"mt-2 text-[11px] text-neutral-500",children:"示例中红绿灯、包子、打哈欠来自 Wikimedia Commons(作者见鼠标悬停提示),其余为 AI 生成。"})]}),f.jsxs("div",{className:"mt-4 grid gap-4 sm:grid-cols-2",children:[f.jsx(Qe,{label:"放大",value:a.crop.zoom,min:1,max:2.5,step:.01,onChange:l=>D("crop",{...a.crop,zoom:l}),fmt:l=>`${l.toFixed(2)}×`}),f.jsx(Qe,{label:"卡片位置(上 ↔ 下)",value:a.cardY,min:.2,max:.8,step:.01,onChange:l=>D("cardY",l),fmt:l=>`${Math.round(l*100)}%`})]})]}),f.jsx(He,{step:2,title:"单词",children:f.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[f.jsx(Ce,{label:"英文",children:f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{className:`${Me} min-w-0 flex-1`,value:a.en,onChange:l=>{D("en",l.target.value),i({clip:null,label:""}),k(null)},onBlur:()=>v===null&&ge(a.en,!1),placeholder:"umbrella"}),f.jsxs("button",{type:"button",onClick:()=>ge(a.en,!0),className:"inline-flex h-10 items-center gap-1.5 rounded-lg border border-white/15 px-3 text-sm hover:bg-white/10",children:[f.jsx(Ft,{className:"h-4 w-4"})," 查询"]})]})}),f.jsx(Ce,{label:"中文",children:f.jsx("input",{className:Me,value:a.zh,onChange:l=>D("zh",l.target.value),placeholder:"雨伞"})}),f.jsx(Ce,{label:"音标",hint:"点「查询」会从维基词典自动填入,可手动修改",children:f.jsx("input",{className:Me,value:a.ipa,onChange:l=>D("ipa",l.target.value),placeholder:"/ʌmˈbrelə/"})}),f.jsx(Ce,{label:"词性",children:f.jsx("select",{className:Me,value:a.pos,onChange:l=>D("pos",l.target.value),children:["n.","v.","adj.","adv.","phr.","prep.","int.",""].map(l=>f.jsx("option",{value:l,children:l||"不显示"},l))})})]})}),f.jsxs(He,{step:3,title:"读音",extra:o.clip?f.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-emerald-400",children:[f.jsx(jn,{className:"h-3.5 w-3.5"}),o.label," · ",(o.clip.length/G).toFixed(1),"s"]}):null,children:[f.jsx("div",{className:"mb-4 flex flex-wrap gap-2",children:[["commons","真人录音"],["upload","上传音频"],["record","自己录"],["tts","语音合成"]].map(([l,b])=>f.jsx(we,{label:b,checked:w===l,onChange:()=>{m(l),l==="commons"&&v===null&&ge(a.en,!1)}},l))}),w==="commons"&&f.jsxs("div",{children:[f.jsx("p",{className:"mb-3 text-xs text-neutral-500",children:"来自维基共享资源(Wikimedia Commons)志愿者录制的真人发音,多为 CC BY-SA 授权。"}),v===null&&f.jsxs("button",{type:"button",onClick:()=>ge(a.en,!1),className:"inline-flex items-center gap-1.5 rounded-lg border border-white/15 px-3 py-2 text-sm hover:bg-white/10",children:[f.jsx(Ft,{className:"h-4 w-4"})," 查找「",a.en,"」的真人录音"]}),v&&v.length>0&&f.jsx("ul",{className:"flex flex-col gap-2",children:v.map(l=>f.jsxs("li",{className:"flex items-center gap-2 rounded-lg border border-white/10 px-3 py-2",children:[f.jsx("button",{type:"button",onClick:()=>new Audio(l.url).play().catch(()=>{}),className:"rounded-full p-1.5 hover:bg-white/10","aria-label":"试听",children:f.jsx(zt,{className:"h-4 w-4"})}),f.jsx("a",{href:l.page,target:"_blank",rel:"noopener noreferrer",className:"min-w-0 flex-1 truncate text-sm text-neutral-200 hover:underline",children:l.label}),f.jsx("button",{type:"button",onClick:()=>de(l),className:"rounded-md bg-white px-3 py-1 text-xs font-semibold text-neutral-900 hover:bg-neutral-200",children:"使用"})]},l.title))})]}),w==="upload"&&f.jsxs("label",{className:"inline-flex cursor-pointer items-center gap-2 rounded-lg border border-white/15 px-3 py-2 text-sm hover:bg-white/10",children:[f.jsx(Sn,{className:"h-4 w-4"})," 选择音频文件(mp3 / m4a / wav)",f.jsx("input",{type:"file",accept:"audio/*",className:"hidden",onChange:l=>{var b;return((b=l.target.files)==null?void 0:b[0])&&X(l.target.files[0])}})]}),w==="record"&&f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("button",{type:"button",onClick:je,className:`inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-semibold ${I?"bg-red-500 text-white":"bg-white text-neutral-900 hover:bg-neutral-200"}`,children:[I?f.jsx(Nn,{className:"h-4 w-4"}):f.jsx(En,{className:"h-4 w-4"}),I?"停止录音":"开始录音"]}),f.jsx("span",{className:"text-xs text-neutral-500",children:"读一遍单词即可,最长 6 秒,首尾静音会自动剪掉"})]}),w==="tts"&&f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsx("select",{className:Me,value:E,onChange:l=>N(l.target.value),children:bt.map(([l,b])=>f.jsx("option",{value:l,children:b},l))}),f.jsxs("button",{type:"button",onClick:Xe,className:"rounded-lg bg-white px-4 py-2 text-sm font-semibold text-neutral-900 hover:bg-neutral-200",children:["合成「",a.en,"」"]}),f.jsx("span",{className:"w-full text-xs text-neutral-500",children:"找不到真人录音时的备选,使用神经网络语音(属于 AI),需要网站后端。"})]}),x&&f.jsx("p",{className:"mt-3 text-xs text-neutral-400",children:x}),f.jsxs("div",{className:"mt-5 grid gap-4 sm:grid-cols-2",children:[f.jsx(Ce,{label:"第二遍",children:f.jsxs("select",{className:Me,value:h,onChange:l=>d(l.target.value),children:[f.jsx("option",{value:"slow",children:"放慢再读一遍"}),f.jsx("option",{value:"same",children:"原速再读一遍"}),f.jsx("option",{value:"none",children:"只读一遍"})]})}),f.jsx(Qe,{label:"人声音量",value:c,min:0,max:1.5,step:.05,onChange:u,fmt:l=>`${Math.round(l*100)}%`})]})]}),f.jsxs(He,{step:4,title:"音效",children:[f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsx(we,{label:"揭晓转场",checked:p.whoosh,onChange:l=>g({...p,whoosh:l})}),f.jsx(we,{label:"打字叮叮",checked:p.tick,onChange:l=>g({...p,tick:l})}),f.jsx(we,{label:"完成提示音",checked:p.chime,onChange:l=>g({...p,chime:l})}),f.jsx(we,{label:"闪光尾音",checked:p.shimmer,onChange:l=>g({...p,shimmer:l})}),f.jsx(we,{label:"弹出音",checked:p.pop,onChange:l=>g({...p,pop:l})})]}),f.jsx("div",{className:"mt-4 max-w-sm",children:f.jsx(Qe,{label:"音效音量",value:p.volume,min:0,max:1.5,step:.05,onChange:l=>g({...p,volume:l}),fmt:l=>`${Math.round(l*100)}%`})})]}),f.jsxs(He,{step:5,title:"样式",children:[f.jsx("div",{className:"grid grid-cols-5 gap-2",children:Et.map(l=>f.jsxs("button",{type:"button",onClick:()=>D("styleId",l.id),className:`flex flex-col items-center gap-2 rounded-xl border p-2.5 text-xs transition ${a.styleId===l.id?"border-white bg-white/10":"border-white/10 hover:border-white/30"}`,children:[f.jsx("span",{className:"h-9 w-full rounded-md ring-1 ring-white/10",style:{background:l.swatch}}),l.name]},l.id))}),f.jsxs("div",{className:"mt-5",children:[f.jsx("div",{className:"mb-2 text-[13px] text-neutral-400",children:"强调色(关键词、喇叭图标)"}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[za.map(l=>f.jsx("button",{type:"button",onClick:()=>D("accent",l),"aria-label":l,className:`h-8 w-8 rounded-full ring-2 ring-offset-2 ring-offset-[#0d0d10] ${a.accent===l?"ring-white":"ring-transparent"}`,style:{background:l}},l)),f.jsx("input",{type:"color",value:a.accent,onChange:l=>D("accent",l.target.value),className:"h-8 w-10 cursor-pointer rounded border-0 bg-transparent"})]})]}),f.jsxs("div",{className:"mt-5 grid gap-4 sm:grid-cols-2",children:[f.jsx(Ce,{label:"提问文案",hint:"{zh} 会替换成中文并高亮",children:f.jsx("input",{className:Me,value:a.question,onChange:l=>D("question",l.target.value)})}),f.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[f.jsx(Ce,{label:"提问标签",children:f.jsx("input",{className:Me,value:a.pillQ,onChange:l=>D("pillQ",l.target.value),disabled:!a.showPill})}),f.jsx(Ce,{label:"揭晓标签",children:f.jsx("input",{className:Me,value:a.pillA,onChange:l=>D("pillA",l.target.value),disabled:!a.showPill})})]})]}),f.jsxs("div",{className:"mt-5 flex flex-wrap gap-2",children:[f.jsx(we,{label:"显示标签",checked:a.showPill,onChange:l=>D("showPill",l)}),f.jsx(we,{label:"镜头微动",checked:a.motion,onChange:l=>D("motion",l)}),f.jsx(we,{label:"胶片颗粒",checked:a.grain,onChange:l=>D("grain",l)}),f.jsx(we,{label:"彩纸",checked:a.confetti,onChange:l=>D("confetti",l)}),f.jsx(we,{label:"扫光",checked:a.sweep,onChange:l=>D("sweep",l)})]}),f.jsx("div",{className:"mt-5 max-w-sm",children:f.jsx(Qe,{label:"揭晓前停留",value:a.hold,min:.25,max:a.compact?.6:1.5,step:.05,onChange:l=>D("hold",l),fmt:l=>`${l.toFixed(2)} 秒`})})]})]})]})}export{Ga as default}; diff --git a/assets/index-2FKE4hm2.css b/assets/index-2FKE4hm2.css deleted file mode 100644 index da9c1587bd3139572657a56925e58d3e6344b264..0000000000000000000000000000000000000000 --- a/assets/index-2FKE4hm2.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Lato:wght@400;600;700;900&family=Roboto+Mono:wght@400;500&display=swap";/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-neutral-100:oklch(97% 0 0);--color-neutral-200:oklch(92.2% 0 0);--color-neutral-300:oklch(87% 0 0);--color-neutral-400:oklch(70.8% 0 0);--color-neutral-500:oklch(55.6% 0 0);--color-neutral-900:oklch(20.5% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-2xl:40px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Lato,PingFang SC,sans-serif}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-12{top:calc(var(--spacing) * -12)}.top-0{top:calc(var(--spacing) * 0)}.top-1{top:calc(var(--spacing) * 1)}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.-right-12{right:calc(var(--spacing) * -12)}.right-0{right:calc(var(--spacing) * 0)}.right-1{right:calc(var(--spacing) * 1)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-12{bottom:calc(var(--spacing) * -12)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-3{bottom:calc(var(--spacing) * 3)}.-left-12{left:calc(var(--spacing) * -12)}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-3{left:calc(var(--spacing) * 3)}.left-\[50\%\]{left:50%}.z-10{z-index:10}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[100\]{z-index:100}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mt-14{margin-top:calc(var(--spacing) * 14)}.mt-16{margin-top:calc(var(--spacing) * 16)}.mt-24{margin-top:calc(var(--spacing) * 24)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-\[3\/4\]{aspect-ratio:3/4}.aspect-square{aspect-ratio:1}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-\[--cell-size\]{width:--cell-size;height:--cell-size}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-\[--cell-size\]{height:--cell-size}.h-\[1px\]{height:1px}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-\[--radix-context-menu-content-available-height\]{max-height:--radix-context-menu-content-available-height}.max-h-\[--radix-select-content-available-height\]{max-height:--radix-select-content-available-height}.max-h-\[300px\]{max-height:300px}.max-h-\[var\(--radix-dropdown-menu-content-available-height\)\]{max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-screen{max-height:100vh}.min-h-\[60px\]{min-height:60px}.min-h-screen{min-height:100vh}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-\[--cell-size\]{width:--cell-size}.w-\[1px\]{width:1px}.w-\[100px\]{width:100px}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-max{max-width:max-content}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-10{min-width:calc(var(--spacing) * 10)}.min-w-\[--cell-size\]{min-width:--cell-size}.min-w-\[8rem\]{min-width:8rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.origin-\[--radix-context-menu-content-transform-origin\]{transform-origin:--radix-context-menu-content-transform-origin}.origin-\[--radix-dropdown-menu-content-transform-origin\]{transform-origin:--radix-dropdown-menu-content-transform-origin}.origin-\[--radix-hover-card-content-transform-origin\]{transform-origin:--radix-hover-card-content-transform-origin}.origin-\[--radix-menubar-content-transform-origin\]{transform-origin:--radix-menubar-content-transform-origin}.origin-\[--radix-popover-content-transform-origin\]{transform-origin:--radix-popover-content-transform-origin}.origin-\[--radix-select-content-transform-origin\]{transform-origin:--radix-select-content-transform-origin}.origin-\[--radix-tooltip-content-transform-origin\]{transform-origin:--radix-tooltip-content-transform-origin}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.gap-y-8{row-gap:calc(var(--spacing) * 8)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[10px\]{border-radius:10px}.rounded-\[22px\]{border-radius:22px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-\[var\(--border-base\)\]{border-color:var(--border-base)}.border-destructive,.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive) 50%,transparent)}}.border-input{border-color:var(--input)}.border-primary,.border-primary\/50{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,var(--primary) 50%,transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-white\/15{border-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.border-white\/15{border-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\[\#0d0d10\]{background-color:#0d0d10}.bg-\[var\(--bg-subtle\)\]{background-color:var(--bg-subtle)}.bg-\[var\(--neutral-0\)\]{background-color:var(--neutral-0)}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\/45{background-color:#00000073}@supports (color:color-mix(in lab,red,red)){.bg-black\/45{background-color:color-mix(in oklab,var(--color-black) 45%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black) 80%,transparent)}}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-foreground\/5{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\/5{background-color:color-mix(in oklab,var(--foreground) 5%,transparent)}}.bg-muted,.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-neutral-900{background-color:var(--color-neutral-900)}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/20{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-white\/\[0\.03\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.03\]{background-color:color-mix(in oklab,var(--color-white) 3%,transparent)}}.fill-current{fill:currentColor}.fill-primary{fill:var(--primary)}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-\[1px\]{padding:1px}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[--cell-size\]{padding-inline:--cell-size}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-\[\#ff3b5c\]{color:#ff3b5c}.text-\[var\(--fg-subtle\)\]{color:var(--fg-subtle)}.text-accent-foreground{color:var(--accent-foreground)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-foreground,.text-foreground\/50{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/50{color:color-mix(in oklab,var(--foreground) 50%,transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-neutral-100{color:var(--color-neutral-100)}.text-neutral-200{color:var(--color-neutral-200)}.text-neutral-300{color:var(--color-neutral-300)}.text-neutral-400{color:var(--color-neutral-400)}.text-neutral-500{color:var(--color-neutral-500)}.text-neutral-900{color:var(--color-neutral-900)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-white{color:var(--color-white)}.underline{text-decoration-line:underline}.decoration-white\/30{text-decoration-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.decoration-white\/30{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white) 30%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-white\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.ring-white\/10{--tw-ring-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(var(--blur-2xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\[--cell-size\:2rem\]{--cell-size:2rem}.running{animation-play-state:running}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\[focused\=true\]\/day\:relative:is(:where(.group\/day)[data-focused=true] *){position:relative}.group-data-\[focused\=true\]\/day\:z-10:is(:where(.group\/day)[data-focused=true] *){z-index:10}.group-data-\[focused\=true\]\/day\:border-ring:is(:where(.group\/day)[data-focused=true] *){border-color:var(--ring)}.group-data-\[focused\=true\]\/day\:ring-\[3px\]:is(:where(.group\/day)[data-focused=true] *){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[focused\=true\]\/day\:ring-ring\/50:is(:where(.group\/day)[data-focused=true] *){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.group-data-\[focused\=true\]\/day\:ring-ring\/50:is(:where(.group\/day)[data-focused=true] *){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:color-mix(in oklab,var(--muted) 40%,transparent)}}.group-\[\.destructive\]\:text-red-300:is(:where(.group).destructive *){color:var(--color-red-300)}.group-\[\.toast\]\:bg-muted:is(:where(.group).toast *){background-color:var(--muted)}.group-\[\.toast\]\:bg-primary:is(:where(.group).toast *){background-color:var(--primary)}.group-\[\.toast\]\:text-muted-foreground:is(:where(.group).toast *){color:var(--muted-foreground)}.group-\[\.toast\]\:text-primary-foreground:is(:where(.group).toast *){color:var(--primary-foreground)}.group-\[\.toaster\]\:border-border:is(:where(.group).toaster *){border-color:var(--border)}.group-\[\.toaster\]\:bg-background:is(:where(.group).toaster *){background-color:var(--background)}.group-\[\.toaster\]\:text-foreground:is(:where(.group).toaster *){color:var(--foreground)}.group-\[\.toaster\]\:shadow-lg:is(:where(.group).toaster *){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}@media(hover:hover){.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive\/80:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive) 80%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.hover\:bg-neutral-200:hover{background-color:var(--color-neutral-200)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary) 80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-white:hover{-webkit-text-decoration-color:var(--color-white);text-decoration-color:var(--color-white)}.hover\:opacity-100:hover{opacity:1}.hover\:ring-white\/30:hover{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:ring-white\/30:hover{--tw-ring-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:color-mix(in oklab,var(--destructive) 30%,transparent)}}.group-\[\.destructive\]\:hover\:bg-destructive:is(:where(.group).destructive *):hover{background-color:var(--destructive)}.group-\[\.destructive\]\:hover\:text-destructive-foreground:is(:where(.group).destructive *):hover{color:var(--destructive-foreground)}.group-\[\.destructive\]\:hover\:text-red-50:is(:where(.group).destructive *):hover{color:var(--color-red-50)}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:opacity-100:focus{opacity:1}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.group-\[\.destructive\]\:focus\:ring-destructive:is(:where(.group).destructive *):focus{--tw-ring-color:var(--destructive)}.group-\[\.destructive\]\:focus\:ring-red-400:is(:where(.group).destructive *):focus{--tw-ring-color:var(--color-red-400)}.group-\[\.destructive\]\:focus\:ring-offset-red-600:is(:where(.group).destructive *):focus{--tw-ring-offset-color:var(--color-red-600)}.focus-visible\:border-\[var\(--fg-base\)\]:focus-visible{border-color:var(--fg-base)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-focus\:border-ring:has(:focus){border-color:var(--ring)}.has-focus\:ring-\[3px\]:has(:focus){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x:calc(52*var(--spacing))}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x:calc(52*var(--spacing)*-1)}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x:calc(52*var(--spacing))}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x:calc(52*var(--spacing)*-1)}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity:0}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-]{--tw-exit-opacity:0}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing) * 0)}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing) * 1)}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[range-end\=true\]\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-end\=true\]\:bg-primary[data-range-end=true]{background-color:var(--primary)}.data-\[range-end\=true\]\:text-primary-foreground[data-range-end=true]{color:var(--primary-foreground)}.data-\[range-middle\=true\]\:rounded-none[data-range-middle=true]{border-radius:0}.data-\[range-middle\=true\]\:bg-accent[data-range-middle=true]{background-color:var(--accent)}.data-\[range-middle\=true\]\:text-accent-foreground[data-range-middle=true]{color:var(--accent-foreground)}.data-\[range-start\=true\]\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-start\=true\]\:bg-primary[data-range-start=true]{background-color:var(--primary)}.data-\[range-start\=true\]\:text-primary-foreground[data-range-start=true]{color:var(--primary-foreground)}.data-\[selected-single\=true\]\:bg-primary[data-selected-single=true]{background-color:var(--primary)}.data-\[selected-single\=true\]\:text-primary-foreground[data-selected-single=true]{color:var(--primary-foreground)}.data-\[selected\=true\]\:rounded-none[data-selected=true]{border-radius:0}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:.2s ease-out accordion-up}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity:.8}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50% }.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100% }.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48% }.data-\[state\=hidden\]\:animate-out[data-state=hidden]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity:0}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:.2s ease-out accordion-down}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open],.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale:.9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50% }.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48% }.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100% }@media(hover:hover){.data-\[state\=open\]\:hover\:bg-accent[data-state=open]:hover{background-color:var(--accent)}}.data-\[state\=open\]\:focus\:bg-accent[data-state=open]:focus{background-color:var(--accent)}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\[state\=visible\]\:animate-in[data-state=visible]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity:0}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}@media(min-width:40rem){.sm\:top-auto{top:auto}.sm\:right-0{right:calc(var(--spacing) * 0)}.sm\:bottom-0{bottom:calc(var(--spacing) * 0)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:flex-col{flex-direction:column}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:gap-x-6{column-gap:calc(var(--spacing) * 6)}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-8{padding-inline:calc(var(--spacing) * 8)}.sm\:text-left{text-align:left}.sm\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100% }}@media(min-width:48rem){.md\:absolute{position:absolute}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[420px\]{max-width:420px}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:justify-between{justify-content:space-between}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(prefers-color-scheme:dark){.dark\:border-destructive{border-color:var(--destructive)}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing) * 0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\+div\]\:text-xs+div{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&\:first-child\[data-selected\=true\]_button\]\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing) * 0)}:is(.rtl\:\*\*\:\[\.rdp-button\\_next\>svg\]\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_next>svg),:is(.rtl\:\*\*\:\[\.rdp-button\\_previous\>svg\]\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_previous>svg){rotate:180deg}.\[\&\:last-child\[data-selected\=true\]_button\]\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>span\]\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&\>span\]\:text-xs>span{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&\>span\]\:opacity-70>span{opacity:.7}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:top-4>svg{top:calc(var(--spacing) * 4)}.\[\&\>svg\]\:left-4>svg{left:calc(var(--spacing) * 4)}.\[\&\>svg\]\:size-3\.5>svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-3\.5>svg{height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:w-3\.5>svg{width:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-destructive>svg{color:var(--destructive)}.\[\&\>svg\]\:text-foreground>svg{color:var(--foreground)}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:calc(var(--spacing) * 7)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{rotate:180deg}[data-slot=card-content] .\[\[data-slot\=card-content\]_\&\]\:bg-transparent,[data-slot=popover-content] .\[\[data-slot\=popover-content\]_\&\]\:bg-transparent{background-color:#0000}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}to{height:0}}:root{--background:#fff;--foreground:#212121;--card:#fff;--card-foreground:#212121;--popover:#fff;--popover-foreground:#212121;--primary:#ff2974;--primary-foreground:#fff;--secondary:#f3f2f2;--secondary-foreground:#212121;--muted:#f3f2f2;--muted-foreground:#7a7a7a;--accent:#f3f2f2;--accent-foreground:#212121;--destructive:#f5242e;--destructive-foreground:#fff;--border:#e8e8e8;--input:#e8e8e8;--ring:#212121;--radius:.5rem;--neutral-0:#fff;--neutral-50:#fafafa;--neutral-100:#f5f4f4;--neutral-200:#e7e7e7;--neutral-300:#d8d8d8;--neutral-400:#aaa;--neutral-500:#7a7a7a;--neutral-600:#5b5b5b;--neutral-700:#464646;--neutral-800:#2a2a2a;--neutral-900:#212121;--neutral-950:#1b1b1b;--neutral-1000:#101010;--brand-100:#ff2882;--brand-60:#ff288299;--brand-30:#ff28824d;--brand-10:#ff28821a;--brand-seafoam:#b6cfd0;--brand-dusty-teal:#6ba4b8;--brand-black-aqua:#002f38;--brand-deep-teal-blue:#07272d;--visualizer-rose-pop:#fd4b96;--visualizer-indigo-breeze:#6366f1;--visualizer-emerald-mint:#10b981;--visualizer-golden-amber:#f59e0b;--visualizer-royal-blue:#1d4ed8;--visualizer-crimson-spark:#ef4444;--visualizer-aqua-glow:#06b6d4;--visualizer-sunbeam-yellow:#facc15;--bg-subtle:#2a2a2a0a;--bg-subtle-hover:#2a2a2a0f;--bg-base:#ffffffe0;--bg-base-opaque:#fff;--bg-menu:#fff;--bg-chat:#fcfcfc;--bg-chat-nav:#f4f4f4;--fg-base:#212121;--fg-subtle:#7a7a7a;--fg-muted:#aaa;--fg-disabled:#d8d8d8;--border-base:#2a2a2a0a;--border-strong:#2a2a2a14;--border-contrast:#2a2a2a1f;--border-focus:#2a2a2a66;--tag-blue-10:#5bb5ff1a;--tag-blue-100:#5bb5ff;--tag-yellow-10:#dec3781a;--tag-yellow-100:#dec378;--tag-purple-10:#908eb81a;--tag-purple-100:#908eb8;--tag-cyan-10:#74ada41a;--tag-cyan-100:#74ada4;--tag-pink-10:#b88ea71a;--tag-pink-100:#b88ea7;--tag-orange-10:#b8a08e1a;--tag-orange-100:#b8a08e;--gradient-max-dark:linear-gradient(213deg, #8c421d 2%, #fbe67b 31%, #fcfbe7 53%, #f7d14e 77%, #d4a041 100%);--gradient-max-light:linear-gradient(125deg, #8c421d 22%, #d2af00 47%, #cd9124 67%, #d4a041 88%);--gradient-pro-dark:linear-gradient(213deg, #7a96ac 1%, #c5d6e2 27%, #eaeff3 47%, #c5d6e2 65%, #a3bccf 89%);--gradient-pro-light:linear-gradient(129deg, #7a96ac 4%, #6d7f8d 27%, #9fb9ce 55%, #6d7f8d 90%);--gradient-plus-dark:linear-gradient(214deg, #986732 0%, #a7825b 23%, #f6d0ab 45%, #a07043 66%, #9d774e 100%);--gradient-plus-light:linear-gradient(129deg, #9e8976 5%, #7a5e50 19%, #f6d0ab 35%, #9d774e 49%, #c99b70 65%, #795f52 78%);--gradient-upgrade-dark:linear-gradient(214deg, #ffedf3 0%, #ff9fbf 30%, #fd5d92 59%, #ffdab2 100%);--gradient-upgrade-light:linear-gradient(32deg, #fc3bb2 6%, #f7906e 79%);--gradient-new-function:linear-gradient(33deg, #6e86ff 17%, #ff2882 55%, #ff98a4 103%);--gradient-suggestion:linear-gradient(32deg, #fd538c 4%, #5aa6e0 47%, #ffdab2 98%);--gradient-g1:linear-gradient(189deg, #ffacc6 6%, #b6e0f5 99%);--gradient-g2:linear-gradient(34deg, #9796f0 9%, #fbc7d4 84%);--gradient-g3:linear-gradient(to right, #ed4264, #ffedbc);--gradient-g4:linear-gradient(232deg, #fedc2a 4%, #dd5789 56%, #7a2c9e 104%);--gradient-g5:linear-gradient(32deg, #fc3bb2 6%, #f7906e 79%);--gradient-max:var(--gradient-max-light);--gradient-pro:var(--gradient-pro-light);--gradient-plus:var(--gradient-plus-light);--gradient-upgrade:var(--gradient-upgrade-light);--spacing-2:2px;--spacing-4:4px;--spacing-6:6px;--spacing-8:8px;--spacing-10:10px;--spacing-12:12px;--spacing-16:16px;--spacing-24:24px;--spacing-32:32px;--spacing-40:40px;--spacing-64:64px;--spacing-96:96px;--spacing-128:128px;--radius-2:2px;--radius-4:4px;--radius-6:6px;--radius-8:8px;--radius-10:10px;--radius-12:12px;--radius-16:16px;--radius-20:20px;--radius-24:24px;--radius-full:999px;--font-family-header:"Lato", "PingFang SC", sans-serif;--font-family-body:"Lato", "PingFang SC", sans-serif;--font-family-code:"Roboto Mono", monospace}.dark{--background:#171717;--foreground:#e8e8e8;--card:#171717;--card-foreground:#e8e8e8;--popover:#262626;--popover-foreground:#e8e8e8;--primary:#ff2974;--primary-foreground:#fff;--secondary:#292929;--secondary-foreground:#e8e8e8;--muted:#292929;--muted-foreground:#ababab;--accent:#292929;--accent-foreground:#e8e8e8;--destructive:#ff4c4f;--destructive-foreground:#fff;--border:#333;--input:#333;--ring:#e7e7e7;--gradient-max:var(--gradient-max-dark);--gradient-pro:var(--gradient-pro-dark);--gradient-plus:var(--gradient-plus-dark);--gradient-upgrade:var(--gradient-upgrade-dark);--bg-subtle:#ffffff0a;--bg-subtle-hover:#ffffff1f;--bg-base:#2a2a2acc;--bg-base-opaque:#171717;--bg-menu:#252525;--bg-chat:#101010;--bg-chat-nav:#171717;--fg-base:#e7e7e7;--fg-subtle:#aaa;--fg-muted:#7a7a7a;--fg-disabled:#5b5b5b;--border-base:#ffffff0a;--border-strong:#ffffff14;--border-contrast:#ffffff1f;--border-focus:#fff6}@media(max-width:768px){:root{--spacing-96:64px;--spacing-128:64px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}} diff --git a/assets/index-C80YNLxN.css b/assets/index-C80YNLxN.css new file mode 100644 index 0000000000000000000000000000000000000000..c900750a08de6ebc807dda500fc33c5293c75a0e --- /dev/null +++ b/assets/index-C80YNLxN.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Lato:wght@400;600;700;900&family=Roboto+Mono:wght@400;500&display=swap";/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-amber-300:oklch(87.9% .169 91.605);--color-emerald-400:oklch(76.5% .177 163.223);--color-neutral-100:oklch(97% 0 0);--color-neutral-200:oklch(92.2% 0 0);--color-neutral-300:oklch(87% 0 0);--color-neutral-400:oklch(70.8% 0 0);--color-neutral-500:oklch(55.6% 0 0);--color-neutral-900:oklch(20.5% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-2xl:40px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before{border-color:var(--color-border)}body{background-color:var(--color-background);color:var(--color-foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Lato,PingFang SC,sans-serif}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-12{top:calc(var(--spacing) * -12)}.top-0{top:calc(var(--spacing) * 0)}.top-1{top:calc(var(--spacing) * 1)}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.-right-12{right:calc(var(--spacing) * -12)}.right-0{right:calc(var(--spacing) * 0)}.right-1{right:calc(var(--spacing) * 1)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-12{bottom:calc(var(--spacing) * -12)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-3{bottom:calc(var(--spacing) * 3)}.-left-12{left:calc(var(--spacing) * -12)}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-3{left:calc(var(--spacing) * 3)}.left-\[50\%\]{left:50%}.z-10{z-index:10}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[100\]{z-index:100}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mt-14{margin-top:calc(var(--spacing) * 14)}.mt-16{margin-top:calc(var(--spacing) * 16)}.mt-24{margin-top:calc(var(--spacing) * 24)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-\[3\/4\]{aspect-ratio:3/4}.aspect-square{aspect-ratio:1}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-\[--cell-size\]{width:--cell-size;height:--cell-size}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-24{height:calc(var(--spacing) * 24)}.h-\[--cell-size\]{height:--cell-size}.h-\[1px\]{height:1px}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-\[--radix-context-menu-content-available-height\]{max-height:--radix-context-menu-content-available-height}.max-h-\[--radix-select-content-available-height\]{max-height:--radix-select-content-available-height}.max-h-\[300px\]{max-height:300px}.max-h-\[var\(--radix-dropdown-menu-content-available-height\)\]{max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-screen{max-height:100vh}.min-h-\[60px\]{min-height:60px}.min-h-screen{min-height:100vh}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-\[--cell-size\]{width:--cell-size}.w-\[1px\]{width:1px}.w-\[72px\]{width:72px}.w-\[100px\]{width:100px}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[420px\]{max-width:420px}.max-w-lg{max-width:var(--container-lg)}.max-w-max{max-width:max-content}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-10{min-width:calc(var(--spacing) * 10)}.min-w-\[--cell-size\]{min-width:--cell-size}.min-w-\[8rem\]{min-width:8rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-\[1\.3\]{flex:1.3}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.origin-\[--radix-context-menu-content-transform-origin\]{transform-origin:--radix-context-menu-content-transform-origin}.origin-\[--radix-dropdown-menu-content-transform-origin\]{transform-origin:--radix-dropdown-menu-content-transform-origin}.origin-\[--radix-hover-card-content-transform-origin\]{transform-origin:--radix-hover-card-content-transform-origin}.origin-\[--radix-menubar-content-transform-origin\]{transform-origin:--radix-menubar-content-transform-origin}.origin-\[--radix-popover-content-transform-origin\]{transform-origin:--radix-popover-content-transform-origin}.origin-\[--radix-select-content-transform-origin\]{transform-origin:--radix-select-content-transform-origin}.origin-\[--radix-tooltip-content-transform-origin\]{transform-origin:--radix-tooltip-content-transform-origin}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-8{gap:calc(var(--spacing) * 8)}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.gap-y-8{row-gap:calc(var(--spacing) * 8)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[10px\]{border-radius:10px}.rounded-\[22px\]{border-radius:22px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-\[var\(--border-base\)\]{border-color:var(--border-base)}.border-destructive,.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive) 50%,transparent)}}.border-input{border-color:var(--input)}.border-primary,.border-primary\/50{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/50{border-color:color-mix(in oklab,var(--primary) 50%,transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-white\/15{border-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.border-white\/15{border-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\[\#0d0d10\]{background-color:#0d0d10}.bg-\[var\(--bg-subtle\)\]{background-color:var(--bg-subtle)}.bg-\[var\(--neutral-0\)\]{background-color:var(--neutral-0)}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/45{background-color:#00000073}@supports (color:color-mix(in lab,red,red)){.bg-black\/45{background-color:color-mix(in oklab,var(--color-black) 45%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black) 80%,transparent)}}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-destructive{background-color:var(--destructive)}.bg-foreground\/5{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\/5{background-color:color-mix(in oklab,var(--foreground) 5%,transparent)}}.bg-muted,.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-neutral-900{background-color:var(--color-neutral-900)}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/20{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-white\/\[0\.03\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.03\]{background-color:color-mix(in oklab,var(--color-white) 3%,transparent)}}.fill-current{fill:currentColor}.fill-primary{fill:var(--primary)}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-\[1px\]{padding:1px}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[--cell-size\]{padding-inline:--cell-size}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-\[\#ff3b5c\]{color:#ff3b5c}.text-\[var\(--fg-subtle\)\]{color:var(--fg-subtle)}.text-accent-foreground{color:var(--accent-foreground)}.text-amber-300\/90{color:#ffd236e6}@supports (color:color-mix(in lab,red,red)){.text-amber-300\/90{color:color-mix(in oklab,var(--color-amber-300) 90%,transparent)}}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground,.text-foreground\/50{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/50{color:color-mix(in oklab,var(--foreground) 50%,transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-neutral-100{color:var(--color-neutral-100)}.text-neutral-200{color:var(--color-neutral-200)}.text-neutral-300{color:var(--color-neutral-300)}.text-neutral-400{color:var(--color-neutral-400)}.text-neutral-500{color:var(--color-neutral-500)}.text-neutral-900{color:var(--color-neutral-900)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-400{color:var(--color-red-400)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-white{color:var(--color-white)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.decoration-white\/30{text-decoration-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.decoration-white\/30{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white) 30%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.underline-offset-4{text-underline-offset:4px}.accent-white{accent-color:var(--color-white)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-transparent{--tw-ring-color:transparent}.ring-white{--tw-ring-color:var(--color-white)}.ring-white\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.ring-white\/10{--tw-ring-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-\[\#0d0d10\]{--tw-ring-offset-color:#0d0d10}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(var(--blur-2xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\[--cell-size\:2rem\]{--cell-size:2rem}.running{animation-play-state:running}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\[focused\=true\]\/day\:relative:is(:where(.group\/day)[data-focused=true] *){position:relative}.group-data-\[focused\=true\]\/day\:z-10:is(:where(.group\/day)[data-focused=true] *){z-index:10}.group-data-\[focused\=true\]\/day\:border-ring:is(:where(.group\/day)[data-focused=true] *){border-color:var(--ring)}.group-data-\[focused\=true\]\/day\:ring-\[3px\]:is(:where(.group\/day)[data-focused=true] *){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[focused\=true\]\/day\:ring-ring\/50:is(:where(.group\/day)[data-focused=true] *){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.group-data-\[focused\=true\]\/day\:ring-ring\/50:is(:where(.group\/day)[data-focused=true] *){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:border-muted\/40:is(:where(.group).destructive *){border-color:color-mix(in oklab,var(--muted) 40%,transparent)}}.group-\[\.destructive\]\:text-red-300:is(:where(.group).destructive *){color:var(--color-red-300)}.group-\[\.toast\]\:bg-muted:is(:where(.group).toast *){background-color:var(--muted)}.group-\[\.toast\]\:bg-primary:is(:where(.group).toast *){background-color:var(--primary)}.group-\[\.toast\]\:text-muted-foreground:is(:where(.group).toast *){color:var(--muted-foreground)}.group-\[\.toast\]\:text-primary-foreground:is(:where(.group).toast *){color:var(--primary-foreground)}.group-\[\.toaster\]\:border-border:is(:where(.group).toaster *){border-color:var(--border)}.group-\[\.toaster\]\:bg-background:is(:where(.group).toaster *){background-color:var(--background)}.group-\[\.toaster\]\:text-foreground:is(:where(.group).toaster *){color:var(--foreground)}.group-\[\.toaster\]\:shadow-lg:is(:where(.group).toaster *){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}@media(hover:hover){.hover\:border-white\/30:hover{border-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:border-white\/30:hover{border-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.hover\:border-white\/40:hover{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.hover\:border-white\/40:hover{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive\/80:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive) 80%,transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.hover\:bg-neutral-200:hover{background-color:var(--color-neutral-200)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary) 80%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-secondary:hover,.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-white:hover{-webkit-text-decoration-color:var(--color-white);text-decoration-color:var(--color-white)}.hover\:opacity-100:hover{opacity:1}.hover\:ring-white\/30:hover{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:ring-white\/30:hover{--tw-ring-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.hover\:ring-white\/40:hover{--tw-ring-color:#fff6}@supports (color:color-mix(in lab,red,red)){.hover\:ring-white\/40:hover{--tw-ring-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.group-\[\.destructive\]\:hover\:border-destructive\/30:is(:where(.group).destructive *):hover{border-color:color-mix(in oklab,var(--destructive) 30%,transparent)}}.group-\[\.destructive\]\:hover\:bg-destructive:is(:where(.group).destructive *):hover{background-color:var(--destructive)}.group-\[\.destructive\]\:hover\:text-destructive-foreground:is(:where(.group).destructive *):hover{color:var(--destructive-foreground)}.group-\[\.destructive\]\:hover\:text-red-50:is(:where(.group).destructive *):hover{color:var(--color-red-50)}}.focus\:border-white\/40:focus{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.focus\:border-white\/40:focus{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:opacity-100:focus{opacity:1}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.group-\[\.destructive\]\:focus\:ring-destructive:is(:where(.group).destructive *):focus{--tw-ring-color:var(--destructive)}.group-\[\.destructive\]\:focus\:ring-red-400:is(:where(.group).destructive *):focus{--tw-ring-color:var(--color-red-400)}.group-\[\.destructive\]\:focus\:ring-offset-red-600:is(:where(.group).destructive *):focus{--tw-ring-offset-color:var(--color-red-600)}.focus-visible\:border-\[var\(--fg-base\)\]:focus-visible{border-color:var(--fg-base)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.has-focus\:border-ring:has(:focus){border-color:var(--ring)}.has-focus\:ring-\[3px\]:has(:focus){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.has-focus\:ring-ring\/50:has(:focus){--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x:calc(52*var(--spacing))}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x:calc(52*var(--spacing)*-1)}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x:calc(52*var(--spacing))}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x:calc(52*var(--spacing)*-1)}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity:0}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-]{--tw-exit-opacity:0}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing) * 0)}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing) * 1)}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[range-end\=true\]\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-end\=true\]\:bg-primary[data-range-end=true]{background-color:var(--primary)}.data-\[range-end\=true\]\:text-primary-foreground[data-range-end=true]{color:var(--primary-foreground)}.data-\[range-middle\=true\]\:rounded-none[data-range-middle=true]{border-radius:0}.data-\[range-middle\=true\]\:bg-accent[data-range-middle=true]{background-color:var(--accent)}.data-\[range-middle\=true\]\:text-accent-foreground[data-range-middle=true]{color:var(--accent-foreground)}.data-\[range-start\=true\]\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\[range-start\=true\]\:bg-primary[data-range-start=true]{background-color:var(--primary)}.data-\[range-start\=true\]\:text-primary-foreground[data-range-start=true]{color:var(--primary-foreground)}.data-\[selected-single\=true\]\:bg-primary[data-selected-single=true]{background-color:var(--primary)}.data-\[selected-single\=true\]\:text-primary-foreground[data-selected-single=true]{color:var(--primary-foreground)}.data-\[selected\=true\]\:rounded-none[data-selected=true]{border-radius:0}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:.2s ease-out accordion-up}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity:.8}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50% }.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100% }.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48% }.data-\[state\=hidden\]\:animate-out[data-state=hidden]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity:0}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:.2s ease-out accordion-down}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open],.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale:.9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50% }.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48% }.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100% }@media(hover:hover){.data-\[state\=open\]\:hover\:bg-accent[data-state=open]:hover{background-color:var(--accent)}}.data-\[state\=open\]\:focus\:bg-accent[data-state=open]:focus{background-color:var(--accent)}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\[state\=visible\]\:animate-in[data-state=visible]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity:0}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}@media(min-width:40rem){.sm\:top-auto{top:auto}.sm\:right-0{right:calc(var(--spacing) * 0)}.sm\:bottom-0{bottom:calc(var(--spacing) * 0)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-col{flex-direction:column}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:gap-x-6{column-gap:calc(var(--spacing) * 6)}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-8{padding-inline:calc(var(--spacing) * 8)}.sm\:text-left{text-align:left}.sm\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.sm\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100% }}@media(min-width:48rem){.md\:absolute{position:absolute}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[420px\]{max-width:420px}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:justify-between{justify-content:space-between}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(min-width:64rem){.lg\:sticky{position:sticky}.lg\:top-6{top:calc(var(--spacing) * 6)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[420px_minmax\(0\,1fr\)\]{grid-template-columns:420px minmax(0,1fr)}.lg\:self-start{align-self:flex-start}}@media(prefers-color-scheme:dark){.dark\:border-destructive{border-color:var(--destructive)}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing) * 0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\+div\]\:text-xs+div{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&\:first-child\[data-selected\=true\]_button\]\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing) * 0)}:is(.rtl\:\*\*\:\[\.rdp-button\\_next\>svg\]\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_next>svg),:is(.rtl\:\*\*\:\[\.rdp-button\\_previous\>svg\]\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_previous>svg){rotate:180deg}.\[\&\:last-child\[data-selected\=true\]_button\]\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>span\]\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&\>span\]\:text-xs>span{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&\>span\]\:opacity-70>span{opacity:.7}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:top-4>svg{top:calc(var(--spacing) * 4)}.\[\&\>svg\]\:left-4>svg{left:calc(var(--spacing) * 4)}.\[\&\>svg\]\:size-3\.5>svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-3\.5>svg{height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:w-3\.5>svg{width:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-destructive>svg{color:var(--destructive)}.\[\&\>svg\]\:text-foreground>svg{color:var(--foreground)}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:calc(var(--spacing) * 7)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{rotate:180deg}[data-slot=card-content] .\[\[data-slot\=card-content\]_\&\]\:bg-transparent,[data-slot=popover-content] .\[\[data-slot\=popover-content\]_\&\]\:bg-transparent{background-color:#0000}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}to{height:0}}:root{--background:#fff;--foreground:#212121;--card:#fff;--card-foreground:#212121;--popover:#fff;--popover-foreground:#212121;--primary:#ff2974;--primary-foreground:#fff;--secondary:#f3f2f2;--secondary-foreground:#212121;--muted:#f3f2f2;--muted-foreground:#7a7a7a;--accent:#f3f2f2;--accent-foreground:#212121;--destructive:#f5242e;--destructive-foreground:#fff;--border:#e8e8e8;--input:#e8e8e8;--ring:#212121;--radius:.5rem;--neutral-0:#fff;--neutral-50:#fafafa;--neutral-100:#f5f4f4;--neutral-200:#e7e7e7;--neutral-300:#d8d8d8;--neutral-400:#aaa;--neutral-500:#7a7a7a;--neutral-600:#5b5b5b;--neutral-700:#464646;--neutral-800:#2a2a2a;--neutral-900:#212121;--neutral-950:#1b1b1b;--neutral-1000:#101010;--brand-100:#ff2882;--brand-60:#ff288299;--brand-30:#ff28824d;--brand-10:#ff28821a;--brand-seafoam:#b6cfd0;--brand-dusty-teal:#6ba4b8;--brand-black-aqua:#002f38;--brand-deep-teal-blue:#07272d;--visualizer-rose-pop:#fd4b96;--visualizer-indigo-breeze:#6366f1;--visualizer-emerald-mint:#10b981;--visualizer-golden-amber:#f59e0b;--visualizer-royal-blue:#1d4ed8;--visualizer-crimson-spark:#ef4444;--visualizer-aqua-glow:#06b6d4;--visualizer-sunbeam-yellow:#facc15;--bg-subtle:#2a2a2a0a;--bg-subtle-hover:#2a2a2a0f;--bg-base:#ffffffe0;--bg-base-opaque:#fff;--bg-menu:#fff;--bg-chat:#fcfcfc;--bg-chat-nav:#f4f4f4;--fg-base:#212121;--fg-subtle:#7a7a7a;--fg-muted:#aaa;--fg-disabled:#d8d8d8;--border-base:#2a2a2a0a;--border-strong:#2a2a2a14;--border-contrast:#2a2a2a1f;--border-focus:#2a2a2a66;--tag-blue-10:#5bb5ff1a;--tag-blue-100:#5bb5ff;--tag-yellow-10:#dec3781a;--tag-yellow-100:#dec378;--tag-purple-10:#908eb81a;--tag-purple-100:#908eb8;--tag-cyan-10:#74ada41a;--tag-cyan-100:#74ada4;--tag-pink-10:#b88ea71a;--tag-pink-100:#b88ea7;--tag-orange-10:#b8a08e1a;--tag-orange-100:#b8a08e;--gradient-max-dark:linear-gradient(213deg, #8c421d 2%, #fbe67b 31%, #fcfbe7 53%, #f7d14e 77%, #d4a041 100%);--gradient-max-light:linear-gradient(125deg, #8c421d 22%, #d2af00 47%, #cd9124 67%, #d4a041 88%);--gradient-pro-dark:linear-gradient(213deg, #7a96ac 1%, #c5d6e2 27%, #eaeff3 47%, #c5d6e2 65%, #a3bccf 89%);--gradient-pro-light:linear-gradient(129deg, #7a96ac 4%, #6d7f8d 27%, #9fb9ce 55%, #6d7f8d 90%);--gradient-plus-dark:linear-gradient(214deg, #986732 0%, #a7825b 23%, #f6d0ab 45%, #a07043 66%, #9d774e 100%);--gradient-plus-light:linear-gradient(129deg, #9e8976 5%, #7a5e50 19%, #f6d0ab 35%, #9d774e 49%, #c99b70 65%, #795f52 78%);--gradient-upgrade-dark:linear-gradient(214deg, #ffedf3 0%, #ff9fbf 30%, #fd5d92 59%, #ffdab2 100%);--gradient-upgrade-light:linear-gradient(32deg, #fc3bb2 6%, #f7906e 79%);--gradient-new-function:linear-gradient(33deg, #6e86ff 17%, #ff2882 55%, #ff98a4 103%);--gradient-suggestion:linear-gradient(32deg, #fd538c 4%, #5aa6e0 47%, #ffdab2 98%);--gradient-g1:linear-gradient(189deg, #ffacc6 6%, #b6e0f5 99%);--gradient-g2:linear-gradient(34deg, #9796f0 9%, #fbc7d4 84%);--gradient-g3:linear-gradient(to right, #ed4264, #ffedbc);--gradient-g4:linear-gradient(232deg, #fedc2a 4%, #dd5789 56%, #7a2c9e 104%);--gradient-g5:linear-gradient(32deg, #fc3bb2 6%, #f7906e 79%);--gradient-max:var(--gradient-max-light);--gradient-pro:var(--gradient-pro-light);--gradient-plus:var(--gradient-plus-light);--gradient-upgrade:var(--gradient-upgrade-light);--spacing-2:2px;--spacing-4:4px;--spacing-6:6px;--spacing-8:8px;--spacing-10:10px;--spacing-12:12px;--spacing-16:16px;--spacing-24:24px;--spacing-32:32px;--spacing-40:40px;--spacing-64:64px;--spacing-96:96px;--spacing-128:128px;--radius-2:2px;--radius-4:4px;--radius-6:6px;--radius-8:8px;--radius-10:10px;--radius-12:12px;--radius-16:16px;--radius-20:20px;--radius-24:24px;--radius-full:999px;--font-family-header:"Lato", "PingFang SC", sans-serif;--font-family-body:"Lato", "PingFang SC", sans-serif;--font-family-code:"Roboto Mono", monospace}.dark{--background:#171717;--foreground:#e8e8e8;--card:#171717;--card-foreground:#e8e8e8;--popover:#262626;--popover-foreground:#e8e8e8;--primary:#ff2974;--primary-foreground:#fff;--secondary:#292929;--secondary-foreground:#e8e8e8;--muted:#292929;--muted-foreground:#ababab;--accent:#292929;--accent-foreground:#e8e8e8;--destructive:#ff4c4f;--destructive-foreground:#fff;--border:#333;--input:#333;--ring:#e7e7e7;--gradient-max:var(--gradient-max-dark);--gradient-pro:var(--gradient-pro-dark);--gradient-plus:var(--gradient-plus-dark);--gradient-upgrade:var(--gradient-upgrade-dark);--bg-subtle:#ffffff0a;--bg-subtle-hover:#ffffff1f;--bg-base:#2a2a2acc;--bg-base-opaque:#171717;--bg-menu:#252525;--bg-chat:#101010;--bg-chat-nav:#171717;--fg-base:#e7e7e7;--fg-subtle:#aaa;--fg-muted:#7a7a7a;--fg-disabled:#5b5b5b;--border-base:#ffffff0a;--border-strong:#ffffff14;--border-contrast:#ffffff1f;--border-focus:#fff6}@media(max-width:768px){:root{--spacing-96:64px;--spacing-128:64px}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}} diff --git a/assets/index-CChuFSwR.js b/assets/index-CChuFSwR.js new file mode 100644 index 0000000000000000000000000000000000000000..c964c2c469dc88a253b1d3c57afe16f28dd17ce1 --- /dev/null +++ b/assets/index-CChuFSwR.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DG-bRo1I.js","./index-Df5cY6wZ.js","./client-DnlDxDdQ.js","./index-DC_LdNcB.js","./jsx-runtime-D_zvdyIk.js","./App-NrpfGL82.js","./ErrorBoundary-D9nVlWP7.js"])))=>i.map(i=>d[i]); +(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))d(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&d(a)}).observe(document,{childList:!0,subtree:!0});function s(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function d(e){if(e.ep)return;e.ep=!0;const t=s(e);fetch(e.href,t)}})();const E="modulepreload",v=function(o,n){return new URL(o,n).href},w={},y=function(n,s,d){let e=Promise.resolve();if(s&&s.length>0){let a=function(i){return Promise.all(i.map(u=>Promise.resolve(u).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const l=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));e=a(s.map(i=>{if(i=v(i,d),i in w)return;w[i]=!0;const u=i.endsWith(".css"),p=u?'[rel="stylesheet"]':"";if(!!d)for(let m=l.length-1;m>=0;m--){const g=l[m];if(g.href===i&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${p}`))return;const r=document.createElement("link");if(r.rel=u?"stylesheet":E,u||(r.as="script"),r.crossOrigin="",r.href=i,h&&r.setAttribute("nonce",h),document.head.appendChild(r),u)return new Promise((m,g)=>{r.addEventListener("load",m),r.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${i}`)))})}))}function t(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return e.then(a=>{for(const l of a||[])l.status==="rejected"&&t(l.reason);return n().catch(t)})},_="__dep_reload",L=6,O=6e4;function P(){try{return JSON.parse(sessionStorage.getItem(_)||"{}")}catch{return{c:0,t:0}}}async function R(){const o=document.getElementById("root");try{let n=function(){if(!document.querySelector("[data-surf-placeholder]"))try{window.parent.postMessage({type:"surf-app-ready"},"*")}catch{}};const s=await y(()=>import("./index-DG-bRo1I.js").then(c=>c.i),__vite__mapDeps([0,1]),import.meta.url);if(typeof s.useState!="function")throw new Error("dep-stub");const{createElement:d}=s,{createRoot:e,hydrateRoot:t}=await y(async()=>{const{createRoot:c,hydrateRoot:r}=await import("./client-DnlDxDdQ.js").then(m=>m.c);return{createRoot:c,hydrateRoot:r}},__vite__mapDeps([2,1]),import.meta.url),{QueryClient:a,QueryClientProvider:l}=await y(async()=>{const{QueryClient:c,QueryClientProvider:r}=await import("./index-DC_LdNcB.js");return{QueryClient:c,QueryClientProvider:r}},__vite__mapDeps([3,0,1,4]),import.meta.url),{default:f}=await y(async()=>{const{default:c}=await import("./App-NrpfGL82.js").then(r=>r.A);return{default:c}},__vite__mapDeps([5,4,0,1]),import.meta.url),{default:h}=await y(async()=>{const{default:c}=await import("./ErrorBoundary-D9nVlWP7.js");return{default:c}},__vite__mapDeps([6,4,0,1]),import.meta.url),i=new a({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,retryDelay:c=>Math.min(1e3*2**c,1e4),staleTime:3e4}}}),u=d(h,null,d(l,{client:i},d(f))),p=!!o.querySelector("[data-surf-placeholder]");o.childNodes.length>0&&o.innerHTML!==""&&!p?t(o,u):(o.innerHTML="",e(o).render(u)),window.__reactOk=!0,sessionStorage.removeItem(_),n(),new MutationObserver(n).observe(o,{childList:!0,subtree:!0})}catch{const n=P(),s=Date.now()-n.t>O?0:n.c;s','

Loading dependencies...

','

Reloading automatically

',""].join(""),sessionStorage.setItem(_,JSON.stringify({c:s+1,t:Date.now()})),setTimeout(()=>location.reload(),3e3+s*1e3)):o.innerHTML=['
','

Failed to load dependencies

','

Please refresh the page

',"
"].join("")}}R();export{y as _}; diff --git a/assets/index-DzlD-nxJ.js b/assets/index-DzlD-nxJ.js deleted file mode 100644 index 73d3b27d338896528e391d5f1f32f9263e6a0850..0000000000000000000000000000000000000000 --- a/assets/index-DzlD-nxJ.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DG-bRo1I.js","./index-Df5cY6wZ.js","./client-DnlDxDdQ.js","./index-DC_LdNcB.js","./jsx-runtime-D_zvdyIk.js","./App-ByzOK7-l.js","./ErrorBoundary-D9nVlWP7.js"])))=>i.map(i=>d[i]); -(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))d(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const s of t.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&d(s)}).observe(document,{childList:!0,subtree:!0});function i(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function d(e){if(e.ep)return;e.ep=!0;const t=i(e);fetch(e.href,t)}})();const E="modulepreload",v=function(r,o){return new URL(r,o).href},w={},y=function(o,i,d){let e=Promise.resolve();if(i&&i.length>0){let s=function(n){return Promise.all(n.map(u=>Promise.resolve(u).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const l=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));e=s(i.map(n=>{if(n=v(n,d),n in w)return;w[n]=!0;const u=n.endsWith(".css"),p=u?'[rel="stylesheet"]':"";if(!!d)for(let m=l.length-1;m>=0;m--){const g=l[m];if(g.href===n&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${p}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":E,u||(c.as="script"),c.crossOrigin="",c.href=n,h&&c.setAttribute("nonce",h),document.head.appendChild(c),u)return new Promise((m,g)=>{c.addEventListener("load",m),c.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${n}`)))})}))}function t(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return e.then(s=>{for(const l of s||[])l.status==="rejected"&&t(l.reason);return o().catch(t)})},_="__dep_reload",L=6,O=6e4;function P(){try{return JSON.parse(sessionStorage.getItem(_)||"{}")}catch{return{c:0,t:0}}}async function R(){const r=document.getElementById("root");try{let o=function(){if(!document.querySelector("[data-surf-placeholder]"))try{window.parent.postMessage({type:"surf-app-ready"},"*")}catch{}};const i=await y(()=>import("./index-DG-bRo1I.js").then(a=>a.i),__vite__mapDeps([0,1]),import.meta.url);if(typeof i.useState!="function")throw new Error("dep-stub");const{createElement:d}=i,{createRoot:e,hydrateRoot:t}=await y(async()=>{const{createRoot:a,hydrateRoot:c}=await import("./client-DnlDxDdQ.js").then(m=>m.c);return{createRoot:a,hydrateRoot:c}},__vite__mapDeps([2,1]),import.meta.url),{QueryClient:s,QueryClientProvider:l}=await y(async()=>{const{QueryClient:a,QueryClientProvider:c}=await import("./index-DC_LdNcB.js");return{QueryClient:a,QueryClientProvider:c}},__vite__mapDeps([3,0,1,4]),import.meta.url),{default:f}=await y(async()=>{const{default:a}=await import("./App-ByzOK7-l.js");return{default:a}},__vite__mapDeps([5,4,0,1]),import.meta.url),{default:h}=await y(async()=>{const{default:a}=await import("./ErrorBoundary-D9nVlWP7.js");return{default:a}},__vite__mapDeps([6,4,0,1]),import.meta.url),n=new s({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,retryDelay:a=>Math.min(1e3*2**a,1e4),staleTime:3e4}}}),u=d(h,null,d(l,{client:n},d(f))),p=!!r.querySelector("[data-surf-placeholder]");r.childNodes.length>0&&r.innerHTML!==""&&!p?t(r,u):(r.innerHTML="",e(r).render(u)),window.__reactOk=!0,sessionStorage.removeItem(_),o(),new MutationObserver(o).observe(r,{childList:!0,subtree:!0})}catch{const o=P(),i=Date.now()-o.t>O?0:o.c;i','

Loading dependencies...

','

Reloading automatically

',""].join(""),sessionStorage.setItem(_,JSON.stringify({c:i+1,t:Date.now()})),setTimeout(()=>location.reload(),3e3+i*1e3)):r.innerHTML=['
','

Failed to load dependencies

','

Please refresh the page

',"
"].join("")}}R(); diff --git a/assets/worker-BAOIWoxA.js b/assets/worker-BAOIWoxA.js new file mode 100644 index 0000000000000000000000000000000000000000..4be75e95ecb195ea449864292c9771494629d71b --- /dev/null +++ b/assets/worker-BAOIWoxA.js @@ -0,0 +1 @@ +(function(){"use strict";const i="https://unpkg.com/@ffmpeg/core@0.12.9/dist/umd/ffmpeg-core.js";var E;(function(t){t.LOAD="LOAD",t.EXEC="EXEC",t.FFPROBE="FFPROBE",t.WRITE_FILE="WRITE_FILE",t.READ_FILE="READ_FILE",t.DELETE_FILE="DELETE_FILE",t.RENAME="RENAME",t.CREATE_DIR="CREATE_DIR",t.LIST_DIR="LIST_DIR",t.DELETE_DIR="DELETE_DIR",t.ERROR="ERROR",t.DOWNLOAD="DOWNLOAD",t.PROGRESS="PROGRESS",t.LOG="LOG",t.MOUNT="MOUNT",t.UNMOUNT="UNMOUNT"})(E||(E={}));const f=new Error("unknown message type"),a=new Error("ffmpeg is not loaded, call `await ffmpeg.load()` first"),u=new Error("failed to import ffmpeg-core.js");let r;const O=async({coreURL:t,wasmURL:n,workerURL:e})=>{const o=!r;try{t||(t=i),importScripts(t)}catch{if((!t||t===i)&&(t=i.replace("/umd/","/esm/")),self.createFFmpegCore=(await import(t)).default,!self.createFFmpegCore)throw u}const s=t,c=n||t.replace(/.js$/g,".wasm"),p=e||t.replace(/.js$/g,".worker.js");return r=await self.createFFmpegCore({mainScriptUrlOrBlob:`${s}#${btoa(JSON.stringify({wasmURL:c,workerURL:p}))}`}),r.setLogger(R=>self.postMessage({type:E.LOG,data:R})),r.setProgress(R=>self.postMessage({type:E.PROGRESS,data:R})),o},m=({args:t,timeout:n=-1})=>{r.setTimeout(n),r.exec(...t);const e=r.ret;return r.reset(),e},l=({args:t,timeout:n=-1})=>{r.setTimeout(n),r.ffprobe(...t);const e=r.ret;return r.reset(),e},D=({path:t,data:n})=>(r.FS.writeFile(t,n),!0),S=({path:t,encoding:n})=>r.FS.readFile(t,{encoding:n}),I=({path:t})=>(r.FS.unlink(t),!0),L=({oldPath:t,newPath:n})=>(r.FS.rename(t,n),!0),N=({path:t})=>(r.FS.mkdir(t),!0),A=({path:t})=>{const n=r.FS.readdir(t),e=[];for(const o of n){const s=r.FS.stat(`${t}/${o}`),c=r.FS.isDir(s.mode);e.push({name:o,isDir:c})}return e},k=({path:t})=>(r.FS.rmdir(t),!0),w=({fsType:t,options:n,mountPoint:e})=>{const o=t,s=r.FS.filesystems[o];return s?(r.FS.mount(s,n,e),!0):!1},b=({mountPoint:t})=>(r.FS.unmount(t),!0);self.onmessage=async({data:{id:t,type:n,data:e}})=>{const o=[];let s;try{if(n!==E.LOAD&&!r)throw a;switch(n){case E.LOAD:s=await O(e);break;case E.EXEC:s=m(e);break;case E.FFPROBE:s=l(e);break;case E.WRITE_FILE:s=D(e);break;case E.READ_FILE:s=S(e);break;case E.DELETE_FILE:s=I(e);break;case E.RENAME:s=L(e);break;case E.CREATE_DIR:s=N(e);break;case E.LIST_DIR:s=A(e);break;case E.DELETE_DIR:s=k(e);break;case E.MOUNT:s=w(e);break;case E.UNMOUNT:s=b(e);break;default:throw f}}catch(c){self.postMessage({id:t,type:E.ERROR,data:c.toString()});return}s instanceof Uint8Array&&o.push(s.buffer),self.postMessage({id:t,type:n,data:s},o)}})(); diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7f0c16a4782a7b98277a3664bee208d0585c5f5d Binary files /dev/null and b/favicon.ico differ diff --git a/ffmpeg/const.js b/ffmpeg/const.js new file mode 100644 index 0000000000000000000000000000000000000000..9ee05d8797ada8921b339f1e67539da0dcc9e732 --- /dev/null +++ b/ffmpeg/const.js @@ -0,0 +1,23 @@ +export const MIME_TYPE_JAVASCRIPT = "text/javascript"; +export const MIME_TYPE_WASM = "application/wasm"; +export const CORE_VERSION = "0.12.9"; +export const CORE_URL = `https://unpkg.com/@ffmpeg/core@${CORE_VERSION}/dist/umd/ffmpeg-core.js`; +export var FFMessageType; +(function (FFMessageType) { + FFMessageType["LOAD"] = "LOAD"; + FFMessageType["EXEC"] = "EXEC"; + FFMessageType["FFPROBE"] = "FFPROBE"; + FFMessageType["WRITE_FILE"] = "WRITE_FILE"; + FFMessageType["READ_FILE"] = "READ_FILE"; + FFMessageType["DELETE_FILE"] = "DELETE_FILE"; + FFMessageType["RENAME"] = "RENAME"; + FFMessageType["CREATE_DIR"] = "CREATE_DIR"; + FFMessageType["LIST_DIR"] = "LIST_DIR"; + FFMessageType["DELETE_DIR"] = "DELETE_DIR"; + FFMessageType["ERROR"] = "ERROR"; + FFMessageType["DOWNLOAD"] = "DOWNLOAD"; + FFMessageType["PROGRESS"] = "PROGRESS"; + FFMessageType["LOG"] = "LOG"; + FFMessageType["MOUNT"] = "MOUNT"; + FFMessageType["UNMOUNT"] = "UNMOUNT"; +})(FFMessageType || (FFMessageType = {})); diff --git a/ffmpeg/errors.js b/ffmpeg/errors.js new file mode 100644 index 0000000000000000000000000000000000000000..409f5159a906da534864abafedf61c27d820ab7f --- /dev/null +++ b/ffmpeg/errors.js @@ -0,0 +1,4 @@ +export const ERROR_UNKNOWN_MESSAGE_TYPE = new Error("unknown message type"); +export const ERROR_NOT_LOADED = new Error("ffmpeg is not loaded, call `await ffmpeg.load()` first"); +export const ERROR_TERMINATED = new Error("called FFmpeg.terminate()"); +export const ERROR_IMPORT_FAILURE = new Error("failed to import ffmpeg-core.js"); diff --git a/ffmpeg/ffmpeg-core.js b/ffmpeg/ffmpeg-core.js new file mode 100644 index 0000000000000000000000000000000000000000..313031751ec5a726f2688101090a77218f5550f0 --- /dev/null +++ b/ffmpeg/ffmpeg-core.js @@ -0,0 +1,16 @@ + +var createFFmpegCore = (() => { + var _scriptDir = import.meta.url; + + return ( +function(createFFmpegCore = {}) { + +var Module=typeof createFFmpegCore!="undefined"?createFFmpegCore:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});const NULL=0;const SIZE_I32=Uint32Array.BYTES_PER_ELEMENT;const DEFAULT_ARGS=["./ffmpeg","-nostdin","-y"];const DEFAULT_ARGS_FFPROBE=["./ffprobe"];Module["NULL"]=NULL;Module["SIZE_I32"]=SIZE_I32;Module["DEFAULT_ARGS"]=DEFAULT_ARGS;Module["DEFAULT_ARGS_FFPROBE"]=DEFAULT_ARGS_FFPROBE;Module["ret"]=-1;Module["timeout"]=-1;Module["logger"]=()=>{};Module["progress"]=()=>{};function stringToPtr(str){const len=Module["lengthBytesUTF8"](str)+1;const ptr=Module["_malloc"](len);Module["stringToUTF8"](str,ptr,len);return ptr}function stringsToPtr(strs){const len=strs.length;const ptr=Module["_malloc"](len*SIZE_I32);for(let i=0;i{throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=true;var ENVIRONMENT_IS_NODE=false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAP64,HEAPU64,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b);Module["HEAP64"]=HEAP64=new BigInt64Array(b);Module["HEAPU64"]=HEAPU64=new BigUint64Array(b)}var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();SOCKFS.root=FS.mount(SOCKFS,{},null);callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}var wasmBinaryFile;if(Module["locateFile"]){wasmBinaryFile="ffmpeg-core.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}}else{wasmBinaryFile=new URL("ffmpeg-core.wasm",import.meta.url).href}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(()=>getBinary(binaryFile))}}return Promise.resolve().then(()=>getBinary(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>{return WebAssembly.instantiate(binary,imports)}).then(instance=>{return instance}).then(receiver,reason=>{err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}else{return instantiateArrayBuffer(binaryFile,imports,callback)}}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["ra"];updateMemoryViews();wasmTable=Module["asm"]["ua"];addOnInit(Module["asm"]["sa"]);removeRunDependency("wasm-instantiate");return exports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var ASM_CONSTS={6077464:$0=>{Module.ret=$0}};function send_progress(progress,time){Module.receiveProgress(progress,time)}function is_timeout(diff){if(Module.timeout===-1)return 0;else{return Module.timeout<=diff}}function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func}function getValue(ptr,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP64[ptr>>3];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];case"*":return HEAPU32[ptr>>2];default:abort(`invalid type for getValue: ${type}`)}}function setValue(ptr,value,type="i8"){if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":HEAP64[ptr>>3]=BigInt(value);break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;case"*":HEAPU32[ptr>>2]=value;break;default:abort(`invalid type for setValue: ${type}`)}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function ___assert_fail(condition,filename,line,func){abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast}var dlopenMissingError="To use dlopen, you need enable dynamic linking, see https://emscripten.org/docs/compiling/Dynamic-Linking.html";function ___dlsym(handle,symbol){abort(dlopenMissingError)}var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>{return PATH.normalize(l+"/"+r)}};function initRandomFill(){if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){return view=>crypto.getRandomValues(view)}else abort("initRandomDevice")}function randomFill(view){return(randomFill=initRandomFill())(view)}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.fsync(stream.tty)},fsync:function(stream){stream.tty.ops.fsync(stream.tty)},read:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function zeroMemory(address,size){HEAPU8.fill(0,address,address+size);return address}function alignMemory(size,alignment){return Math.ceil(size/alignment)*alignment}function mmapAlloc(size){size=alignMemory(size,65536);var ptr=_emscripten_builtin_memalign(65536,size);if(!ptr)return 0;return zeroMemory(ptr,size)}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage:function(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{assert(arrayBuffer,`Loading data file "${url}" failed (no arrayBuffer).`);onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)}var preloadPlugins=Module["preloadPlugins"]||[];function FS_handledByPreloadPlugin(byteArray,fullname,finish,onerror){if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(function(plugin){if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled}function FS_createPreloadedFile(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish){var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}}function FS_modeStringToFlags(str){var flagModes={"r":0,"r+":2,"w":512|64|1,"w+":512|64|2,"a":1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags}function FS_getMode(canRead,canWrite){var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode}var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(mount){assert(ENVIRONMENT_IS_WORKER);if(!WORKERFS.reader)WORKERFS.reader=new FileReaderSync;var root=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0);var createdParents={};function ensureParent(path){var parts=path.split("/");var parent=root;for(var i=0;i=stream.node.size)return 0;var chunk=stream.node.contents.slice(position,position+length);var ab=WORKERFS.reader.readAsArrayBuffer(chunk);buffer.set(new Uint8Array(ab),offset);return chunk.size},write:function(stream,buffer,offset,length,position){throw new FS.ErrnoError(29)},llseek:function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.size}}if(position<0){throw new FS.ErrnoError(28)}return position}}};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(path,opts={})=>{path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:node=>{var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName:(parentid,name)=>{var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:node=>{var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:node=>{var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:(parent,name)=>{var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:(parent,name,mode,rdev)=>{var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:node=>{FS.hashRemoveNode(node)},isRoot:node=>{return node===node.parent},isMountpoint:node=>{return!!node.mounted},isFile:mode=>{return(mode&61440)===32768},isDir:mode=>{return(mode&61440)===16384},isLink:mode=>{return(mode&61440)===40960},isChrdev:mode=>{return(mode&61440)===8192},isBlkdev:mode=>{return(mode&61440)===24576},isFIFO:mode=>{return(mode&61440)===4096},isSocket:mode=>{return(mode&49152)===49152},flagsToPermissionString:flag=>{var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:(node,perms)=>{if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup:dir=>{var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:(dir,name)=>{try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:(dir,name,isdir)=>{var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:(node,flags)=>{if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:()=>{for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:fd=>FS.streams[fd],createStream:(stream,fd=-1)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(val){this.shared.flags=val}},position:{get:function(){return this.shared.position},set:function(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:fd=>{FS.streams[fd]=null},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:()=>{throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice:(dev,ops)=>{FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts:mount=>{var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:(populate,callback)=>{if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:(type,opts,mountpoint)=>{var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:mountpoint=>{var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:(parent,name)=>{return parent.node_ops.lookup(parent,name)},mknod:(path,mode,dev)=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:(path,mode)=>{mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:(path,mode)=>{mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:(path,mode)=>{var dirs=path.split("/");var d="";for(var i=0;i{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>{return FS.stat(path,true)},chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS_modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>{return stream.fd===null},llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error(`Invalid encoding type "${opts.encoding}"`)}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir:path=>{var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories:()=>{FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:()=>{FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomLeft=randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:()=>{var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:(parent,name)=>{var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS,"WORKERFS":WORKERFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;for(var i=0;i{var ret=FS.analyzePath(path,dontResolveLastLink);if(!ret.exists){return null}return ret.object},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS_getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS_getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS_getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i{for(var i=0;i{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat:function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAPU32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP64[buf+40>>3]=BigInt(stat.size);HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();HEAP64[buf+56>>3]=BigInt(Math.floor(atime/1e3));HEAPU32[buf+64>>2]=atime%1e3*1e3;HEAP64[buf+72>>3]=BigInt(Math.floor(mtime/1e3));HEAPU32[buf+80>>2]=mtime%1e3*1e3;HEAP64[buf+88>>3]=BigInt(Math.floor(ctime/1e3));HEAPU32[buf+96>>2]=ctime%1e3*1e3;HEAP64[buf+104>>3]=BigInt(stat.ino);return 0},doMsync:function(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream}};function ___syscall__newselect(nfds,readfds,writefds,exceptfds,timeout){try{var total=0;var srcReadLow=readfds?HEAP32[readfds>>2]:0,srcReadHigh=readfds?HEAP32[readfds+4>>2]:0;var srcWriteLow=writefds?HEAP32[writefds>>2]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>2]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>2]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>2]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>2]:0)|(writefds?HEAP32[writefds>>2]:0)|(exceptfds?HEAP32[exceptfds>>2]:0);var allHigh=(readfds?HEAP32[readfds+4>>2]:0)|(writefds?HEAP32[writefds+4>>2]:0)|(exceptfds?HEAP32[exceptfds+4>>2]:0);var check=function(fd,low,high,val){return fd<32?low&val:high&val};for(var fd=0;fd>2]=dstReadLow;HEAP32[readfds+4>>2]=dstReadHigh}if(writefds){HEAP32[writefds>>2]=dstWriteLow;HEAP32[writefds+4>>2]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>2]=dstExceptLow;HEAP32[exceptfds+4>>2]=dstExceptHigh}return total}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var SOCKFS={mount:function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function(family,type,protocol){type&=~526336;var streaming=type==1;if(streaming&&protocol&&protocol!=6){throw new FS.ErrnoError(66)}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(sock,addr,port){var ws;if(typeof addr=="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(23)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data=="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}data=new Uint8Array(data)}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,isBinary){if(!isBinary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return 28}},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>2]=value;return value}function inetPton4(str){var b=str.split(".");for(var i=0;i<4;i++){var tmp=Number(b[i]);if(isNaN(tmp))return null;b[i]=tmp}return(b[0]|b[1]<<8|b[2]<<16|b[3]<<24)>>>0}function jstoi_q(str){return parseInt(str)}function inetPton6(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>2]=16}HEAP16[sa>>1]=family;HEAP32[sa+4>>2]=addr;HEAP16[sa+2>>1]=_htons(port);break;case 10:addr=inetPton6(addr);zeroMemory(sa,28);if(addrlen){HEAP32[addrlen>>2]=28}HEAP32[sa>>2]=family;HEAP32[sa+8>>2]=addr[0];HEAP32[sa+12>>2]=addr[1];HEAP32[sa+16>>2]=addr[2];HEAP32[sa+20>>2]=addr[3];HEAP16[sa+2>>1]=_htons(port);break;default:return 5}return 0}var DNS={address_map:{id:1,addrs:{},names:{}},lookup_name:function(name){var res=inetPton4(name);if(res!==null){return name}res=inetPton6(name);if(res!==null){return name}var addr;if(DNS.address_map.addrs[name]){addr=DNS.address_map.addrs[name]}else{var id=DNS.address_map.id++;assert(id<65535,"exceeded max address mappings of 65535");addr="172.29."+(id&255)+"."+(id&65280);DNS.address_map.names[addr]=name;DNS.address_map.addrs[name]=addr}return addr},lookup_addr:function(addr){if(DNS.address_map.names[addr]){return DNS.address_map.names[addr]}return null}};function ___syscall_accept4(fd,addr,addrlen,flags,d1,d2){try{var sock=getSocketFromFD(fd);var newsock=sock.sock_ops.accept(sock);if(addr){var errno=writeSockaddr(addr,newsock.family,DNS.lookup_name(newsock.daddr),newsock.dport,addrlen)}return newsock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function inetNtop4(addr){return(addr&255)+"."+(addr>>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)}function inetNtop6(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=inetNtop4(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word>1];var port=_ntohs(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=inetNtop4(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=inetNtop6(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}}function getSocketAddress(addrp,addrlen,allowNull){if(allowNull&&addrp===0)return null;var info=readSockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info}function ___syscall_bind(fd,addr,addrlen,d1,d2,d3){try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.bind(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_connect(fd,addr,addrlen,d1,d2,d3){try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.connect(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_faccessat(dirfd,path,amode,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(amode&~7){return-28}var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function ___syscall_getdents64(fd,dirp,count){try{var stream=SYSCALLS.getStreamFromFD(fd);if(!stream.getdents){stream.getdents=FS.readdir(stream.path)}var struct_size=280;var pos=0;var off=FS.llseek(stream,0,1);var idx=Math.floor(off/struct_size);while(idx>3]=BigInt(id);HEAP64[dirp+pos+8>>3]=BigInt((idx+1)*struct_size);HEAP16[dirp+pos+16>>1]=280;HEAP8[dirp+pos+18>>0]=type;stringToUTF8(name,dirp+pos+19,256);pos+=struct_size;idx+=1}FS.llseek(stream,idx*struct_size,0);return pos}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_getpeername(fd,addr,addrlen,d1,d2,d3){try{var sock=getSocketFromFD(fd);if(!sock.daddr){return-53}var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(sock.daddr),sock.dport,addrlen);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_getsockname(fd,addr,addrlen,d1,d2,d3){try{var sock=getSocketFromFD(fd);var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(sock.saddr||"0.0.0.0"),sock.sport,addrlen);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_getsockopt(fd,level,optname,optval,optlen,d1){try{var sock=getSocketFromFD(fd);if(level===1){if(optname===4){HEAP32[optval>>2]=sock.error;HEAP32[optlen>>2]=4;sock.error=null;return 0}}return-50}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_listen(fd,backlog){try{var sock=getSocketFromFD(fd);sock.sock_ops.listen(sock,backlog);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_mkdirat(dirfd,path,mode){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_poll(fds,nfds,timeout){try{var nonzero=0;for(var i=0;i>2];var events=HEAP16[pollfd+4>>1];var mask=32;var stream=FS.getStream(fd);if(stream){mask=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){mask=stream.stream_ops.poll(stream)}}mask&=events|8|16;if(mask)nonzero++;HEAP16[pollfd+6>>1]=mask}return nonzero}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_recvfrom(fd,buf,len,flags,addr,addrlen){try{var sock=getSocketFromFD(fd);var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port,addrlen)}HEAPU8.set(msg.buffer,buf);return msg.buffer.byteLength}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_renameat(olddirfd,oldpath,newdirfd,newpath){try{oldpath=SYSCALLS.getStr(oldpath);newpath=SYSCALLS.getStr(newpath);oldpath=SYSCALLS.calculateAt(olddirfd,oldpath);newpath=SYSCALLS.calculateAt(newdirfd,newpath);FS.rename(oldpath,newpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_sendto(fd,message,length,flags,addr,addr_len){try{var sock=getSocketFromFD(fd);var dest=getSocketAddress(addr,addr_len,true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_socket(domain,type,protocol){try{var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_unlinkat(dirfd,path,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(flags===0){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{abort("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var nowIsMonotonic=true;function __emscripten_get_now_is_monotonic(){return nowIsMonotonic}function __emscripten_throw_longjmp(){throw Infinity}function readI53FromI64(ptr){return HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296}function __gmtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];function ydayFromDate(date){var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday}function __localtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}function __mktime_js(tmPtr){var date=new Date(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var dst=HEAP32[tmPtr+32>>2];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>2]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getYear();return date.getTime()/1e3|0}function __mmap_js(len,prot,flags,fd,off,allocated,addr){try{var stream=SYSCALLS.getStreamFromFD(fd);var res=FS.mmap(stream,len,off,prot,flags);var ptr=res.ptr;HEAP32[allocated>>2]=res.allocated;HEAPU32[addr>>2]=ptr;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function __munmap_js(addr,len,prot,flags,fd,offset){try{var stream=SYSCALLS.getStreamFromFD(fd);if(prot&2){SYSCALLS.doMsync(addr,stream,len,flags,offset)}FS.munmap(stream)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function stringToNewUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret}function __tzset_js(timezone,daylight,tzname){var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=stringToNewUTF8(winterName);var summerNamePtr=stringToNewUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAPU32[tzname+4>>2]=summerNamePtr}else{HEAPU32[tzname>>2]=summerNamePtr;HEAPU32[tzname+4>>2]=winterNamePtr}}function _abort(){abort("")}Module["_abort"]=_abort;function _dlopen(handle){abort(dlopenMissingError)}var readEmAsmArgsArray=[];function readEmAsmArgs(sigPtr,buf){readEmAsmArgsArray.length=0;var ch;buf>>=2;while(ch=HEAPU8[sigPtr++]){buf+=ch!=105&buf;readEmAsmArgsArray.push(ch==105?HEAP32[buf]:(ch==106?HEAP64:HEAPF64)[buf++>>1]);++buf}return readEmAsmArgsArray}function runEmAsmFunction(code,sigPtr,argbuf){var args=readEmAsmArgs(sigPtr,argbuf);return ASM_CONSTS[code].apply(null,args)}function _emscripten_asm_const_int(code,sigPtr,argbuf){return runEmAsmFunction(code,sigPtr,argbuf)}function _emscripten_date_now(){return Date.now()}function getHeapMax(){return 2147483648}function _emscripten_get_heap_max(){return getHeapMax()}var _emscripten_get_now;_emscripten_get_now=()=>performance.now();function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings}function stringToAscii(str,buffer){for(var i=0;i>0]=str.charCodeAt(i)}HEAP8[buffer>>0]=0}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _proc_exit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}function exitJS(status,implicit){EXITSTATUS=status;_proc_exit(status)}var _exit=exitJS;function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){try{var rightsBase=0;var rightsInheriting=0;var flags=0;{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4}HEAP8[pbuf>>0]=type;HEAP16[pbuf+2>>1]=flags;HEAP64[pbuf+8>>3]=BigInt(rightsBase);HEAP64[pbuf+16>>3]=BigInt(rightsInheriting);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var MAX_INT53=9007199254740992;var MIN_INT53=-9007199254740992;function bigintToI53Checked(num){return numMAX_INT53?NaN:Number(num)}function _fd_seek(fd,offset,whence,newOffset){try{offset=bigintToI53Checked(offset);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);HEAP64[newOffset>>3]=BigInt(stream.position);if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _getaddrinfo(node,service,hint,out){var addr=0;var port=0;var flags=0;var family=0;var type=0;var proto=0;var ai;function allocaddrinfo(family,type,proto,canon,addr,port){var sa,salen,ai;var errno;salen=family===10?28:16;addr=family===10?inetNtop6(addr):inetNtop4(addr);sa=_malloc(salen);errno=writeSockaddr(sa,family,addr,port);assert(!errno);ai=_malloc(32);HEAP32[ai+4>>2]=family;HEAP32[ai+8>>2]=type;HEAP32[ai+12>>2]=proto;HEAPU32[ai+24>>2]=canon;HEAPU32[ai+20>>2]=sa;if(family===10){HEAP32[ai+16>>2]=28}else{HEAP32[ai+16>>2]=16}HEAP32[ai+28>>2]=0;return ai}if(hint){flags=HEAP32[hint>>2];family=HEAP32[hint+4>>2];type=HEAP32[hint+8>>2];proto=HEAP32[hint+12>>2]}if(type&&!proto){proto=type===2?17:6}if(!type&&proto){type=proto===17?2:1}if(proto===0){proto=6}if(type===0){type=1}if(!node&&!service){return-2}if(flags&~(1|2|4|1024|8|16|32)){return-1}if(hint!==0&&HEAP32[hint>>2]&2&&!node){return-1}if(flags&32){return-2}if(type!==0&&type!==1&&type!==2){return-7}if(family!==0&&family!==2&&family!==10){return-6}if(service){service=UTF8ToString(service);port=parseInt(service,10);if(isNaN(port)){if(flags&1024){return-2}return-8}}if(!node){if(family===0){family=2}if((flags&1)===0){if(family===2){addr=_htonl(2130706433)}else{addr=[0,0,0,1]}}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>2]=ai;return 0}node=UTF8ToString(node);addr=inetPton4(node);if(addr!==null){if(family===0||family===2){family=2}else if(family===10&&flags&8){addr=[0,0,_htonl(65535),addr];family=10}else{return-2}}else{addr=inetPton6(node);if(addr!==null){if(family===0||family===10){family=10}else{return-2}}}if(addr!=null){ai=allocaddrinfo(family,type,proto,node,addr,port);HEAPU32[out>>2]=ai;return 0}if(flags&4){return-2}node=DNS.lookup_name(node);addr=inetPton4(node);if(family===0){family=2}else if(family===10){addr=[0,0,_htonl(65535),addr]}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>2]=ai;return 0}function _getnameinfo(sa,salen,node,nodelen,serv,servlen,flags){var info=readSockaddr(sa,salen);if(info.errno){return-6}var port=info.port;var addr=info.addr;var overflowed=false;if(node&&nodelen){var lookup;if(flags&1||!(lookup=DNS.lookup_addr(addr))){if(flags&8){return-2}}else{addr=lookup}var numBytesWrittenExclNull=stringToUTF8(addr,node,nodelen);if(numBytesWrittenExclNull+1>=nodelen){overflowed=true}}if(serv&&servlen){port=""+port;var numBytesWrittenExclNull=stringToUTF8(port,serv,servlen);if(numBytesWrittenExclNull+1>=servlen){overflowed=true}}if(overflowed){return-12}return 0}function arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}return thisDate.getFullYear()}return thisDate.getFullYear()-1}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+arraySum(isLeapYear(date.tm_year+1900)?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}return"PM"},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var days=date.tm_yday+7-date.tm_wday;return leadingNulls(Math.floor(days/7),2)},"%V":function(date){var val=Math.floor((date.tm_yday+7-(date.tm_wday+6)%7)/7);if((date.tm_wday+371-date.tm_yday-2)%7<=2){val++}if(!val){val=52;var dec31=(date.tm_wday+7-date.tm_yday-1)%7;if(dec31==4||dec31==5&&isLeapYear(date.tm_year%400-1)){val++}}else if(val==53){var jan1=(date.tm_wday+371-date.tm_yday)%7;if(jan1!=4&&(jan1!=3||!isLeapYear(date.tm_year)))val=1}return leadingNulls(val,2)},"%w":function(date){return date.tm_wday},"%W":function(date){var days=date.tm_yday+7-(date.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2)},"%y":function(date){return(date.tm_year+1900).toString().substring(2)},"%Y":function(date){return date.tm_year+1900},"%z":function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();var wasmImports={"b":___assert_fail,"f":___cxa_throw,"ka":___dlsym,"R":___syscall__newselect,"L":___syscall_accept4,"K":___syscall_bind,"J":___syscall_connect,"la":___syscall_faccessat,"g":___syscall_fcntl64,"ha":___syscall_fstat64,"U":___syscall_getdents64,"I":___syscall_getpeername,"H":___syscall_getsockname,"G":___syscall_getsockopt,"y":___syscall_ioctl,"F":___syscall_listen,"ea":___syscall_lstat64,"$":___syscall_mkdirat,"fa":___syscall_newfstatat,"w":___syscall_openat,"V":___syscall_poll,"E":___syscall_recvfrom,"T":___syscall_renameat,"S":___syscall_rmdir,"D":___syscall_sendto,"v":___syscall_socket,"ga":___syscall_stat64,"O":___syscall_unlinkat,"ia":__emscripten_get_now_is_monotonic,"M":__emscripten_throw_longjmp,"Y":__gmtime_js,"Z":__localtime_js,"_":__mktime_js,"W":__mmap_js,"X":__munmap_js,"P":__tzset_js,"a":_abort,"t":_dlopen,"oa":_emscripten_asm_const_int,"m":_emscripten_date_now,"Q":_emscripten_get_heap_max,"p":_emscripten_get_now,"ja":_emscripten_memcpy_big,"N":_emscripten_resize_heap,"ca":_environ_get,"da":_environ_sizes_get,"l":_exit,"n":_fd_close,"ba":_fd_fdstat_get,"x":_fd_read,"aa":_fd_seek,"q":_fd_write,"k":_getaddrinfo,"i":_getnameinfo,"pa":invoke_i,"na":invoke_ii,"c":invoke_iii,"o":invoke_iiii,"s":invoke_iiiii,"z":invoke_iiiiii,"r":invoke_iiiiiiiii,"B":invoke_iiiijj,"qa":invoke_iij,"h":invoke_vi,"j":invoke_vii,"d":invoke_viiii,"ma":invoke_viiiiii,"A":invoke_viiiiiiii,"C":is_timeout,"u":send_progress,"e":_strftime};var asm=createWasm();var ___wasm_call_ctors=function(){return(___wasm_call_ctors=Module["asm"]["sa"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["ta"]).apply(null,arguments)};var ___errno_location=function(){return(___errno_location=Module["asm"]["va"]).apply(null,arguments)};var _ntohs=function(){return(_ntohs=Module["asm"]["wa"]).apply(null,arguments)};var _htons=function(){return(_htons=Module["asm"]["xa"]).apply(null,arguments)};var _ffmpeg=Module["_ffmpeg"]=function(){return(_ffmpeg=Module["_ffmpeg"]=Module["asm"]["ya"]).apply(null,arguments)};var _ffprobe=Module["_ffprobe"]=function(){return(_ffprobe=Module["_ffprobe"]=Module["asm"]["za"]).apply(null,arguments)};var _htonl=function(){return(_htonl=Module["asm"]["Aa"]).apply(null,arguments)};var _emscripten_builtin_memalign=function(){return(_emscripten_builtin_memalign=Module["asm"]["Ba"]).apply(null,arguments)};var _setThrew=function(){return(_setThrew=Module["asm"]["Ca"]).apply(null,arguments)};var stackSave=function(){return(stackSave=Module["asm"]["Da"]).apply(null,arguments)};var stackRestore=function(){return(stackRestore=Module["asm"]["Ea"]).apply(null,arguments)};var ___cxa_is_pointer_type=function(){return(___cxa_is_pointer_type=Module["asm"]["Fa"]).apply(null,arguments)};var _ff_h264_cabac_tables=Module["_ff_h264_cabac_tables"]=1546732;var ___start_em_js=Module["___start_em_js"]=6077485;var ___stop_em_js=Module["___stop_em_js"]=6077662;function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiijj(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iij(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}Module["setValue"]=setValue;Module["getValue"]=getValue;Module["UTF8ToString"]=UTF8ToString;Module["stringToUTF8"]=stringToUTF8;Module["lengthBytesUTF8"]=lengthBytesUTF8;Module["FS"]=FS;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); + + + return createFFmpegCore.ready +} + +); +})(); +export default createFFmpegCore; \ No newline at end of file diff --git a/ffmpeg/ffmpeg-core.wasm b/ffmpeg/ffmpeg-core.wasm new file mode 100644 index 0000000000000000000000000000000000000000..4d48f165989153dfc562ec22ee4ce40429ac08a2 --- /dev/null +++ b/ffmpeg/ffmpeg-core.wasm @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f57947a5bd530d8f00c5b3f2cb2a3492faa7e5d823315342d6a8656d0a6b7b7 +size 32232419 diff --git a/ffmpeg/worker.js b/ffmpeg/worker.js new file mode 100644 index 0000000000000000000000000000000000000000..cca2a6116bab5349cfa35bc1dba0b6e696af91ee --- /dev/null +++ b/ffmpeg/worker.js @@ -0,0 +1,161 @@ +/// +/// +/// +import { CORE_URL, FFMessageType } from "./const.js"; +import { ERROR_UNKNOWN_MESSAGE_TYPE, ERROR_NOT_LOADED, ERROR_IMPORT_FAILURE, } from "./errors.js"; +let ffmpeg; +const load = async ({ coreURL: _coreURL, wasmURL: _wasmURL, workerURL: _workerURL, }) => { + const first = !ffmpeg; + try { + if (!_coreURL) + _coreURL = CORE_URL; + // when web worker type is `classic`. + importScripts(_coreURL); + } + catch { + if (!_coreURL || _coreURL === CORE_URL) + _coreURL = CORE_URL.replace('/umd/', '/esm/'); + // when web worker type is `module`. + self.createFFmpegCore = (await import( + /* @vite-ignore */ _coreURL)).default; + if (!self.createFFmpegCore) { + throw ERROR_IMPORT_FAILURE; + } + } + const coreURL = _coreURL; + const wasmURL = _wasmURL ? _wasmURL : _coreURL.replace(/.js$/g, ".wasm"); + const workerURL = _workerURL + ? _workerURL + : _coreURL.replace(/.js$/g, ".worker.js"); + ffmpeg = await self.createFFmpegCore({ + // Fix `Overload resolution failed.` when using multi-threaded ffmpeg-core. + // Encoded wasmURL and workerURL in the URL as a hack to fix locateFile issue. + mainScriptUrlOrBlob: `${coreURL}#${btoa(JSON.stringify({ wasmURL, workerURL }))}`, + }); + ffmpeg.setLogger((data) => self.postMessage({ type: FFMessageType.LOG, data })); + ffmpeg.setProgress((data) => self.postMessage({ + type: FFMessageType.PROGRESS, + data, + })); + return first; +}; +const exec = ({ args, timeout = -1 }) => { + ffmpeg.setTimeout(timeout); + ffmpeg.exec(...args); + const ret = ffmpeg.ret; + ffmpeg.reset(); + return ret; +}; +const ffprobe = ({ args, timeout = -1 }) => { + ffmpeg.setTimeout(timeout); + ffmpeg.ffprobe(...args); + const ret = ffmpeg.ret; + ffmpeg.reset(); + return ret; +}; +const writeFile = ({ path, data }) => { + ffmpeg.FS.writeFile(path, data); + return true; +}; +const readFile = ({ path, encoding }) => ffmpeg.FS.readFile(path, { encoding }); +// TODO: check if deletion works. +const deleteFile = ({ path }) => { + ffmpeg.FS.unlink(path); + return true; +}; +const rename = ({ oldPath, newPath }) => { + ffmpeg.FS.rename(oldPath, newPath); + return true; +}; +// TODO: check if creation works. +const createDir = ({ path }) => { + ffmpeg.FS.mkdir(path); + return true; +}; +const listDir = ({ path }) => { + const names = ffmpeg.FS.readdir(path); + const nodes = []; + for (const name of names) { + const stat = ffmpeg.FS.stat(`${path}/${name}`); + const isDir = ffmpeg.FS.isDir(stat.mode); + nodes.push({ name, isDir }); + } + return nodes; +}; +// TODO: check if deletion works. +const deleteDir = ({ path }) => { + ffmpeg.FS.rmdir(path); + return true; +}; +const mount = ({ fsType, options, mountPoint }) => { + const str = fsType; + const fs = ffmpeg.FS.filesystems[str]; + if (!fs) + return false; + ffmpeg.FS.mount(fs, options, mountPoint); + return true; +}; +const unmount = ({ mountPoint }) => { + ffmpeg.FS.unmount(mountPoint); + return true; +}; +self.onmessage = async ({ data: { id, type, data: _data }, }) => { + const trans = []; + let data; + try { + if (type !== FFMessageType.LOAD && !ffmpeg) + throw ERROR_NOT_LOADED; // eslint-disable-line + switch (type) { + case FFMessageType.LOAD: + data = await load(_data); + break; + case FFMessageType.EXEC: + data = exec(_data); + break; + case FFMessageType.FFPROBE: + data = ffprobe(_data); + break; + case FFMessageType.WRITE_FILE: + data = writeFile(_data); + break; + case FFMessageType.READ_FILE: + data = readFile(_data); + break; + case FFMessageType.DELETE_FILE: + data = deleteFile(_data); + break; + case FFMessageType.RENAME: + data = rename(_data); + break; + case FFMessageType.CREATE_DIR: + data = createDir(_data); + break; + case FFMessageType.LIST_DIR: + data = listDir(_data); + break; + case FFMessageType.DELETE_DIR: + data = deleteDir(_data); + break; + case FFMessageType.MOUNT: + data = mount(_data); + break; + case FFMessageType.UNMOUNT: + data = unmount(_data); + break; + default: + throw ERROR_UNKNOWN_MESSAGE_TYPE; + } + } + catch (e) { + self.postMessage({ + id, + type: FFMessageType.ERROR, + data: e.toString(), + }); + return; + } + if (data instanceof Uint8Array) { + trans.push(data.buffer); + } + self.postMessage({ id, type, data }, trans); +}; diff --git a/fonts/lw-ipa-500.woff2 b/fonts/lw-ipa-500.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..f80b0287c9c55b4e9f5819326096f7a241bcf616 Binary files /dev/null and b/fonts/lw-ipa-500.woff2 differ diff --git a/fonts/lw-poppins-600.woff2 b/fonts/lw-poppins-600.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..5af6d97b001ef514b4e63dbd5a1999292c324f56 Binary files /dev/null and b/fonts/lw-poppins-600.woff2 differ diff --git a/fonts/lw-poppins-800.woff2 b/fonts/lw-poppins-800.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..767415347337066c2a0e8a360eadb744fc08f751 Binary files /dev/null and b/fonts/lw-poppins-800.woff2 differ diff --git a/fonts/lw-sc-500.woff2 b/fonts/lw-sc-500.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..a48a3620e3df6b5ada422d171d21cd5d62e07c1c --- /dev/null +++ b/fonts/lw-sc-500.woff2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88de44e13bd04f4dec7960d191b12f7a54bd856ab5989e4d4de932c3ab4776a9 +size 1086024 diff --git a/fonts/lw-sc-700.woff2 b/fonts/lw-sc-700.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..efefa03763011ab8348947683370a901834dd8b7 --- /dev/null +++ b/fonts/lw-sc-700.woff2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73f04c1ea45f62728554a69ae7a9c805088881f5eeb06ca9e6279445736ac0b4 +size 1097168 diff --git a/fonts/lw-smiley.woff2 b/fonts/lw-smiley.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..7f376754ca8b949f44393a83e8fc7f41e0c8e4a4 --- /dev/null +++ b/fonts/lw-smiley.woff2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:731f22973349404b15a88a99ef3b5dd4104c0965c23b7e485c1f11e84fea99e2 +size 1150924 diff --git a/index.html b/index.html index f5d5d40a3a9e1ae3cbbee8e9cf49134bb3421183..7e80c24a8a6cae00ba50815a4f0c81ab3f7f9bbc 100644 --- a/index.html +++ b/index.html @@ -53,13 +53,13 @@ - + App - - + +
diff --git a/live/cover_01.jpg b/live/cover_01.jpg index e670d68b4f0c736d53e2a4f4e10341f1b904c948..d2daf38a5c10f93d363a08be696c80435e3ec627 100644 --- a/live/cover_01.jpg +++ b/live/cover_01.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9bd9b7cacebc715cdc1b6559e2cf5551d68e5e1112b9c997d0c26305387afac1 -size 128815 +oid sha256:f00a4247b45f4ce72451464542f0fa6eec2c086ef68158979b83e4cbc87b461f +size 128823 diff --git a/live/cover_02.jpg b/live/cover_02.jpg index e32b6b345b8eb53992f33c5e8aaaaf31158391a7..9429576829733ca4539ba116d43d2ed489851666 100644 Binary files a/live/cover_02.jpg and b/live/cover_02.jpg differ diff --git a/live/cover_03.jpg b/live/cover_03.jpg index c95ba42a4aca5e9cede56b8d1534a58d6b1400fa..ddde047e310e17ba7ad2d59c0c22cecde0292624 100644 --- a/live/cover_03.jpg +++ b/live/cover_03.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a05f1775c0bbf7430454ec933d1089055d1a47173aeed0d22a9cd186caa825a -size 183666 +oid sha256:c712293ce10292c2e6a3ff30774d317024c7b077c9ca58ebf6cbcf53d930b947 +size 183683 diff --git a/live/cover_04.jpg b/live/cover_04.jpg index 18081207a3fa916088adde6769b39af77f70dc2e..fc8ac6493a1798dfb21a672b478229ac3753513e 100644 Binary files a/live/cover_04.jpg and b/live/cover_04.jpg differ diff --git a/live/cover_05.jpg b/live/cover_05.jpg index ee2afbc46aa023b41000f5f2a20ada9ffd460ae4..64587e3dd26e3fd1b6899fab98e78c7d91cb8c41 100644 --- a/live/cover_05.jpg +++ b/live/cover_05.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1323979545c2da8c4bfe4a8aff47490bbfbdd92fbdc78bf882e419c1561ac3c0 -size 152479 +oid sha256:2fb605868651e6fc9ea455ac435b62e5f1df96719c6752c4979373bf4d63c656 +size 152409 diff --git a/live/cover_06.jpg b/live/cover_06.jpg index da0d9c219cecc9d7e62324c44ee3cdddcf7dcd80..f6f1194bad7d94e1d44c8d0a3e444ac8ebdc1102 100644 Binary files a/live/cover_06.jpg and b/live/cover_06.jpg differ diff --git a/live/cover_07.jpg b/live/cover_07.jpg index 8d3e3a67b35b6c1a6e53798353286901154df453..e52c99cd4e579dce3b91343f78aafd5b10f63017 100644 Binary files a/live/cover_07.jpg and b/live/cover_07.jpg differ diff --git a/live/cover_08.jpg b/live/cover_08.jpg index 6b58210a142c8588690b8cffca2e440e88ae3f37..5f502d09938f39e25a51e9e2c8bbce3bdd7af46e 100644 Binary files a/live/cover_08.jpg and b/live/cover_08.jpg differ diff --git a/live/cover_09.jpg b/live/cover_09.jpg index ac375f8b0710e214c9d51a07997fc1f36ed7a24a..87df68593d518109dc395b4ac70c2f2a98f07d43 100644 Binary files a/live/cover_09.jpg and b/live/cover_09.jpg differ diff --git a/live/cover_10.jpg b/live/cover_10.jpg index 141b57c43bba20a17789db81795bbaef2ed2d77f..764abbf10e07c6dd7f8ec0d2b425cb6dc0676bf2 100644 --- a/live/cover_10.jpg +++ b/live/cover_10.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2e00a66ff614c0468478effca9bd627da20648b8d3e66671f3e772348aa86d88 -size 107126 +oid sha256:6cfa072daf50bd3c66cd2d5510161fd10b55f6098d1463633315cf6a1f96e800 +size 107101 diff --git a/live/cover_11.jpg b/live/cover_11.jpg index cfbb11785e7da872dc248fbfe3dde6e7bf43d769..903f198a9073b7d7aa2acf8068e739489a0e0aaf 100644 --- a/live/cover_11.jpg +++ b/live/cover_11.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b61d4084d7069a67cdae786fb6daac975cb4075b07fb4d6c78ae45e474d06d2a -size 210672 +oid sha256:00aee20d23e30bdf87b62b3e69eb55735384b68ed682555ff68e49e3782b4114 +size 210661 diff --git a/live/cover_12.jpg b/live/cover_12.jpg index baab5aebaf063966654477304f3c473e166a37f5..d8019c2dbb1e772756923aaf59599116a3e507d3 100644 Binary files a/live/cover_12.jpg and b/live/cover_12.jpg differ diff --git a/live/cover_13.jpg b/live/cover_13.jpg index 329e00792af9de36f0b3cc4786d7a6754c0db36e..f2422476b2e3086c9286489b950b72119d9acf70 100644 Binary files a/live/cover_13.jpg and b/live/cover_13.jpg differ diff --git a/live/cover_14.jpg b/live/cover_14.jpg index dec66486253588d0b1e3d84ececa1a1edfa368a8..602ad4c574aa210ad0022c7f0059a6aad6426dcc 100644 Binary files a/live/cover_14.jpg and b/live/cover_14.jpg differ diff --git a/live/cover_15.jpg b/live/cover_15.jpg index 0db139099f4bbf99a7107e6fc4388eda83b475ab..dc68ea3d64e60ac41d96379d9a1fed316aca49c8 100644 --- a/live/cover_15.jpg +++ b/live/cover_15.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:982107d88d1f05d86f7ea39920e7fd454459186e5bf38aada980b02693a35e04 -size 105548 +oid sha256:14030d82d9244eb1190d49195a41c2daf113662f7b55cdc950504746045e7fc9 +size 105696 diff --git a/live/cover_16.jpg b/live/cover_16.jpg index ed97e726468fb655ef28ba77016fa6a89048c617..c23a880195d2b334751f5fba62e77dbd4b18a266 100644 --- a/live/cover_16.jpg +++ b/live/cover_16.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cef065bbb0dafa46826214bf35dbc626619b1de8307a949e77845283ec86d10 -size 159470 +oid sha256:c40f86bc2a070771aa8a6545f0ca6443cdadab516c5cebb19ace66eeef3af4b4 +size 159566 diff --git a/live/cover_17.jpg b/live/cover_17.jpg index f1b52c5bf693153d4830f0fc86a9522847d6ad01..12669f6a72b630a6ce40ea48f50c32ba7dc52522 100644 --- a/live/cover_17.jpg +++ b/live/cover_17.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:74d1a73a01a8cc7745014064a61d6e36f4835e5bfe99b180a053c9701b4e20ad -size 191490 +oid sha256:5f8811d8de72cd3638f2361977c57057f165b2818ddcc5b25ca52aa9a470bb99 +size 191395 diff --git a/live/cover_18.jpg b/live/cover_18.jpg index c6f0c09c565d7a05998ee4d6ceffb8481f72583b..585847bd49a6dd2d1e26f8b49509b1023ce83fcb 100644 --- a/live/cover_18.jpg +++ b/live/cover_18.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ca8c84748a915290151b2cbfe2c5a9da114f43af993a54c750bf31477ef6ff0 -size 159756 +oid sha256:36c691161663c6b60aa3f7a36f27d7f3c9ddc4f4b2835d445cff0e60f524ed55 +size 159720 diff --git a/live/cover_19.jpg b/live/cover_19.jpg new file mode 100644 index 0000000000000000000000000000000000000000..afe60a1da6a8b11ae7d22c7483c611cb247c07c2 --- /dev/null +++ b/live/cover_19.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95cb9ee54215191cccbeb2347a405ea2e88ab6e98a416c0e6d937ae3990bb4b6 +size 146772 diff --git a/live/cover_20.jpg b/live/cover_20.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5b8f0441969b2d4e3222c1153a3ef200ad2c36b9 --- /dev/null +++ b/live/cover_20.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34a16e19b47655ec526ec1be2477d654f31cde2e97c15de3fbe5db277169228b +size 156814 diff --git a/live/cover_21.jpg b/live/cover_21.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bde4b94e4b755742e4ab6bd3b675f4fd0e3b2d27 --- /dev/null +++ b/live/cover_21.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a487c3723267c01d2539dfb54f38a296bb77a1b2b24bf18d662c42888d457e6a +size 132831 diff --git a/live/cover_22.jpg b/live/cover_22.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4b0651c398ad9f2463370419c4474c40112e7377 --- /dev/null +++ b/live/cover_22.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25558b751b714a1b3e8fe89bebe4cacffa102b179fba4b88308cf74749619df1 +size 125601 diff --git a/live/cover_23.jpg b/live/cover_23.jpg new file mode 100644 index 0000000000000000000000000000000000000000..305d881b073ac0c8c4e32d145294a2770d544a4b --- /dev/null +++ b/live/cover_23.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37246674899f473cf8cb638edb3a94864eeb548482af01c767aec53a5ef134e1 +size 176364 diff --git a/live/cover_24.jpg b/live/cover_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..574923adc40fe9df0b004a14eb89958c8b7ed7b2 --- /dev/null +++ b/live/cover_24.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c0cd07af6335d00825e76ab03511c6a6ef7480397c14a7075ad8ecfc90ca0e3 +size 174328 diff --git a/live/cover_25.jpg b/live/cover_25.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c330efec858f0b196b53c1a4df649d9acc08a6d5 --- /dev/null +++ b/live/cover_25.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc00609daf4a85cf6c2d9c3925fe00afc605595f53edf2797ba6dc65e419694a +size 145651 diff --git a/live/cover_26.jpg b/live/cover_26.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5c7be7e4725be9851b43bd510c226e9b64c8c2b6 --- /dev/null +++ b/live/cover_26.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f4cf3630e6f33cb8340a0e94bfe348c4d9d94048650e9a72d3037272618c4c4 +size 134688 diff --git a/live/cover_27.jpg b/live/cover_27.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e57a063f2947bae1fa69c106dc9c610580d94064 --- /dev/null +++ b/live/cover_27.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:457d569effc1473937f2be1f97cf6eb76994fc5c76f0c53f7953e17d074ac8e5 +size 140064 diff --git a/live/cover_28.jpg b/live/cover_28.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7bda90cc6ac82a84c5b6d8544eddc29312a9f3f7 --- /dev/null +++ b/live/cover_28.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8267a8c8e0bff19cb405a2e845210cbebf3eb906c4323b0af34b2611f5c5274 +size 132779 diff --git a/live/cover_29.jpg b/live/cover_29.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9ba98261142440c241a1d42ece712cfc8ef08d40 --- /dev/null +++ b/live/cover_29.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab742827ad98291313293d62b668ada57d5384e4fda21b2e73606ab46aa54bee +size 144761 diff --git a/live/cover_30.jpg b/live/cover_30.jpg new file mode 100644 index 0000000000000000000000000000000000000000..aff3444724cded24affdf6e7ac46494d47948b03 --- /dev/null +++ b/live/cover_30.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e9b639c662d9e9703347af1ace2374f08b0bbc03f7dc95ac9bc512cf02bb14e +size 180491 diff --git a/live/cover_31.jpg b/live/cover_31.jpg new file mode 100644 index 0000000000000000000000000000000000000000..02da785df004c28154a209f64fc23acbe2d6472e Binary files /dev/null and b/live/cover_31.jpg differ diff --git a/live/cover_32.jpg b/live/cover_32.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d4677b452e5739a398e78f57340b73109357e033 Binary files /dev/null and b/live/cover_32.jpg differ diff --git a/live/cover_33.jpg b/live/cover_33.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e2a1f88134b14eead8c8b40b6937124434ecb6a1 --- /dev/null +++ b/live/cover_33.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2d46acc5e6a373b153cfe9c6b0370bcd8b1f45ddadb336df60f079161116c58 +size 130450 diff --git a/live/cover_34.jpg b/live/cover_34.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0c89e912d3401266f30f1de9a8d872d842235360 --- /dev/null +++ b/live/cover_34.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b7c97f3f114b4984de7f1638e01b758e33150d98646fc5f519aa732531d04bc +size 131468 diff --git a/live/cover_35.jpg b/live/cover_35.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cc1084829ed5e5a554d4c1aa389b3e6505d52782 Binary files /dev/null and b/live/cover_35.jpg differ diff --git a/live/cover_36.jpg b/live/cover_36.jpg new file mode 100644 index 0000000000000000000000000000000000000000..99aeef1807d806c5b2c0303796081b16bbab356b --- /dev/null +++ b/live/cover_36.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8533bfebf5c2419d89e267d7640b8309dd19c11a7271b4eeea267668f3b76b94 +size 146646 diff --git a/live/cover_37.jpg b/live/cover_37.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3469c75f777aa3aa0d38c4f5ccedffd5163b99d9 --- /dev/null +++ b/live/cover_37.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5598c101b01d3c774773b2f0f207d1c236acbfbac3be90c478388220795b6689 +size 111435 diff --git a/live/cover_38.jpg b/live/cover_38.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c119010716e7447538d7bc0af94b05d18948ba73 --- /dev/null +++ b/live/cover_38.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f4f2f74f6f5dda2284ea0c30fc6371575961aa930e89692f5e08914a1b15dc2 +size 114012 diff --git a/live/daily-english-live-photos-set2.zip b/live/daily-english-live-photos-set2.zip index e786aaa83c2f4d6842d1e1973d91583661247db9..0292bca2a8958485c6836d941e6d4e4c4b0dff49 100644 --- a/live/daily-english-live-photos-set2.zip +++ b/live/daily-english-live-photos-set2.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fdc4efaa3a818273e19638675a551395348b50af0571c989d528ea0898d850dd -size 65643461 +oid sha256:8c97c0e49087045f3c4326c3fffc1575e50fe299455a4cc1c195bdb08970a1d1 +size 48559896 diff --git a/live/daily-english-live-photos-set3.zip b/live/daily-english-live-photos-set3.zip new file mode 100644 index 0000000000000000000000000000000000000000..94527491b6d48baf501cd6cae65647f2a9a38f98 --- /dev/null +++ b/live/daily-english-live-photos-set3.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58a5824f572d9e3593e7023df83df6a7f56b5c2207d4b42c13fda2a61c03a394 +size 44085579 diff --git a/live/daily-english-live-photos-set4.zip b/live/daily-english-live-photos-set4.zip new file mode 100644 index 0000000000000000000000000000000000000000..eed8bd32667e8291b5370b634e423e60ef65b681 --- /dev/null +++ b/live/daily-english-live-photos-set4.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0818cf791ecb68bbd6dd799b25942a30dccb0025d51dd90e466681ec133e75f4 +size 44596691 diff --git a/live/daily-english-live-photos.zip b/live/daily-english-live-photos.zip index 982a6b24adc61a799a9b924ca29b5f18fa92371f..51228d986d3464c770e272a5082d40327dd58e7c 100644 --- a/live/daily-english-live-photos.zip +++ b/live/daily-english-live-photos.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05c3ce1244535e526fc8c3e7dd13b1bbea8c2e70bbcea1648cc2ce31be88c6b9 -size 47404317 +oid sha256:9633f666c7bd9f89786f3b40bc4c6a0e4c080fd8c9ee6c0fc803b772c57f108f +size 34583793 diff --git a/live/preview_01.mp4 b/live/preview_01.mp4 index 7a77787dceef396cc8d7f78b91222f6caa860710..9e41c84a1d281c344c9cf6a38d47b794e3b38d96 100644 --- a/live/preview_01.mp4 +++ b/live/preview_01.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d8102f6139baf839be2dc22518cb4105e7e545b9bdf305c1f4feec2a92868c02 -size 557682 +oid sha256:abf18108ddbc8a0308de0cdd58f11c7bc4ad8ddc03924199b96c39e80ea9d207 +size 456273 diff --git a/live/preview_02.mp4 b/live/preview_02.mp4 index fba65e014ff3a2e2edcfbd6019e7bd278978afc1..7661b7cc33f1de45c1ea9c8790a008dee1cdc7a8 100644 --- a/live/preview_02.mp4 +++ b/live/preview_02.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d2c48d5c54fa76c8af4d4da02af90c84577aabb9e8c5ccf2a2d53b67204eddc -size 360261 +oid sha256:53714158484bd79684e1ef51e5432716b8da67ea02b94be58cdc99d504b9b674 +size 297068 diff --git a/live/preview_03.mp4 b/live/preview_03.mp4 index 378d2af3afa6eea47c78853a29b68793f2c2a702..c8221c1145bdb81e6966d27a0511284c235e37cb 100644 --- a/live/preview_03.mp4 +++ b/live/preview_03.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20a039dd2294583294c78c0508e4d10e5141cfd880cc1617333b486ce6d3cdb7 -size 703866 +oid sha256:8f105962dbb9248504ebe6f18f0ebcb7742ba06ef6ae0d302ab8147c6e5c97c3 +size 585337 diff --git a/live/preview_04.mp4 b/live/preview_04.mp4 index 40ee5ad7a7fee148a33ae9c5bc20d1c4b993cd13..966c07ec6c198b66afa342c716e751036545099e 100644 --- a/live/preview_04.mp4 +++ b/live/preview_04.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:684b4a46e8973822929966d88e4d0a333b91e725d5be9d0ef4fb393432d72b25 -size 347780 +oid sha256:fce7fbafc0131e6bf8cd01d1aa6a6d4a9b944a030e72768951db74434df3533f +size 244432 diff --git a/live/preview_05.mp4 b/live/preview_05.mp4 index 7bb2e725e65098fbb273ec98a5c859d25bcbf95a..6d915c365eb25ffab6facf38414a949680ee09c2 100644 --- a/live/preview_05.mp4 +++ b/live/preview_05.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:11a5b2433a192a8357a5670d598584a1331dce180a7f498475566535309d978d -size 655901 +oid sha256:0d0293576171eb7e26bb609d360ace1c15650ae91312b3846608a64bf1ab7fda +size 429600 diff --git a/live/preview_06.mp4 b/live/preview_06.mp4 index 0a4ccca90746d8089da72a87c3a011d2bbaed05a..8803a6ae1892fbbf1c38782bdb5d52ab1c583d9a 100644 --- a/live/preview_06.mp4 +++ b/live/preview_06.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24657243bd65de8923b96f4ff4d7630d094cfd1137b447ed83616784013e1453 -size 515072 +oid sha256:aa347dde98455a1e09a444a90a404143d51cfbf5c73b02b2e34685cb52f2dcb7 +size 386741 diff --git a/live/preview_07.mp4 b/live/preview_07.mp4 index f2eb2d82d38609a8e65a62e8f83d99b6f73bc5ca..b4b65c401d1247dce584967e945bae980f4af0d2 100644 --- a/live/preview_07.mp4 +++ b/live/preview_07.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6c72485ca58cfe3ec84caa9524537ec04bf62c748f4d36a0873a02ffc4dafe3 -size 393100 +oid sha256:4b0d630b7e58b0aaa3b637f890c1433e505063281778a953926595762ba8e46e +size 339095 diff --git a/live/preview_08.mp4 b/live/preview_08.mp4 index 0f533c285b0bb81cfa1fe1acdd4a0ce1c9ced491..403b710aa4b005dd7af36adb34f1c798906cec13 100644 --- a/live/preview_08.mp4 +++ b/live/preview_08.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6c19451e66d281477ba2070076209ac9a73c01b39e74b3c4cdfd8f719d090532 -size 421900 +oid sha256:99aa52df1bf02ece2b602674dd6b02052ca14ffcaa059c7204c36da68d36c22b +size 353617 diff --git a/live/preview_09.mp4 b/live/preview_09.mp4 index 9207ba0ca8de3c33ecf2931122bbdb6950d04efc..e16c5ba0e8974b2f8c10a2dc5a5cd4f6631ff3b0 100644 --- a/live/preview_09.mp4 +++ b/live/preview_09.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0878c4f651cf9a2aac7caba151d732ba8ea44254e2a0cced214e33d8bff4e55 -size 364377 +oid sha256:cceac952c3963bfe2e36b9efd490f0af06ecd0b3d1284ee2605f057d75198625 +size 302047 diff --git a/live/preview_10.mp4 b/live/preview_10.mp4 index d1ddc5e3c5ec986059d767f836389940776e4d89..c09861bdc527bb9c713c3146a9dd7bfaf4a72640 100644 --- a/live/preview_10.mp4 +++ b/live/preview_10.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09ad51c05683f14ec6e142415ac2cb40df9fccf6aa85175e1f9d4d381450b646 -size 410377 +oid sha256:e8951e3ce8129df663f7541c11de2358245e408a23bcdb4769ca645bc83bf161 +size 333583 diff --git a/live/preview_11.mp4 b/live/preview_11.mp4 index 34774c1891029d44cb97f5a3094cdb3c6bcb7f23..7faf15fddeeb9bdec89f52337e9662af2cfe8e62 100644 --- a/live/preview_11.mp4 +++ b/live/preview_11.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1e10f0d8bcf6778ccde23f3757b71a7aa8a05d47f3c451fcc37d187efb16205 -size 834603 +oid sha256:4099b505e358eb8f2f55167a4a24a59f24ec350ad50f33a55bad6b34861df220 +size 668879 diff --git a/live/preview_12.mp4 b/live/preview_12.mp4 index 533fcedd93f8a5e7a6aa44724517851c4c5be98f..f0278771420834c59e2af31a6b39df918f8a8e05 100644 --- a/live/preview_12.mp4 +++ b/live/preview_12.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee6c71226ef94f72b1044e48976b40ab6a25021c00b61cb809a296dc4df256b5 -size 443968 +oid sha256:5585c98a2774368ecbbbdf31afa9ab30ffe985d5ef09324fea4b030c5b6c84de +size 301452 diff --git a/live/preview_13.mp4 b/live/preview_13.mp4 index 333de4873166c73fcd9361e1a507136f979edfb2..a54053074c80130a137cebceef4dc05a8c9054e5 100644 --- a/live/preview_13.mp4 +++ b/live/preview_13.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01e1f5963d148888db33d1ad2a63191bda36358367cd1db5d35f66319c459ff1 -size 297493 +oid sha256:ffdd15046d85f461ab396824429cf6c410bd45e07ad0a26f1b7ced0f1805ea72 +size 264055 diff --git a/live/preview_14.mp4 b/live/preview_14.mp4 index c9472c4afbd9956113eaa82885ca064fb7d0163b..6f4ec44c306ffe8e92d32647870881990a1a67e7 100644 --- a/live/preview_14.mp4 +++ b/live/preview_14.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:17f4599571dcbc71e4389c5571fa1ea7fd492d3a0db11beb841f06d43ae5cedb -size 387950 +oid sha256:7b475bf21138f7529e343b31cab1bfd501509bfe9d190bedfca9629c9431ecda +size 268165 diff --git a/live/preview_15.mp4 b/live/preview_15.mp4 index 30b4aa39ba98297797e2d348d5f1cba01e54c8cd..5671157e8f1622d30ca646fed5e315fea3d13525 100644 --- a/live/preview_15.mp4 +++ b/live/preview_15.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b39fd27a86873796849efaa1239c4b80b8204655b5a21de8a24ccbd534df2f1a -size 445893 +oid sha256:899cd51e8bc41d6fd4c94f2e06ec0a82681ae8fb74f066a669bc70cd7ee056b1 +size 367131 diff --git a/live/preview_16.mp4 b/live/preview_16.mp4 index dbaf0fdac20c0bfb638f528d60cf2b87de453011..7fc8070b8ec86a98d1449d508a17798e5b08fa74 100644 --- a/live/preview_16.mp4 +++ b/live/preview_16.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:616aa19d77ae23a63144ef0a99cd66ac6f15808eadcab11dc7cece2c21e6b120 -size 472739 +oid sha256:adaf2f75d5bbabc31964fe2e02b8d4d829cd68efb450283b2f9122320f5bd8ee +size 438434 diff --git a/live/preview_17.mp4 b/live/preview_17.mp4 index dafaed6fea0c59e4aec2c54bc8bc46ebdba49ccd..3c69195af3403b621bf788738493b3455916b5ba 100644 --- a/live/preview_17.mp4 +++ b/live/preview_17.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ba0f42d32087ae4c833dc1ccadd8c653419030db0bca80822e0ac443075f5d60 -size 629408 +oid sha256:90fd23454529b667127fbd09ce1462407682ff2fa5fc2809e5b59a404cd37db2 +size 575881 diff --git a/live/preview_18.mp4 b/live/preview_18.mp4 index 99baf19674a64fdd612c8e73f62822f42033dad3..eced9d639d5f6d7c835fe1ed3aa818f8efd14d8d 100644 --- a/live/preview_18.mp4 +++ b/live/preview_18.mp4 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f06d188e2166e131736dd919cbab433bf3106d7591c717fd221916d3a5af425f -size 653132 +oid sha256:45aa4b2d805754f566d91ea548633ddea85938bd85363c43dec40eb2fef252df +size 513405 diff --git a/live/preview_19.mp4 b/live/preview_19.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..91062f48f66f99d1274143b55bfa967461b65e68 --- /dev/null +++ b/live/preview_19.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73459e6c8f6a0961bd01a926733abd495527f31aa85b2a7efe0bfd82ac703f27 +size 410588 diff --git a/live/preview_20.mp4 b/live/preview_20.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..5db1d54be423c7accf0faebc996162d746495758 --- /dev/null +++ b/live/preview_20.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abb92ab5797a5fe90b7868805774192f3c8c1ae2df0c40ad1dbe9da5b5fa8c83 +size 458344 diff --git a/live/preview_21.mp4 b/live/preview_21.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..18357b8f6633cff3dfb9ae951bc16c9e4b569709 --- /dev/null +++ b/live/preview_21.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a03820e5e07f0451ce4b2017fd925c2df2ae0a2d2c474148ae13122ba6c54a78 +size 389455 diff --git a/live/preview_22.mp4 b/live/preview_22.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..a8cf53697975fede9c0304ae39729aa0f57508fb --- /dev/null +++ b/live/preview_22.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a70c29b05b02cb8ff856e5b9872ca0763511f18f64a8c5eae9c0901486af81e0 +size 372412 diff --git a/live/preview_23.mp4 b/live/preview_23.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..53efa79ea14900603d1ce0e74264a2d81166d926 --- /dev/null +++ b/live/preview_23.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8d12a0798c8db8d667c028d301c0a9cba816e2993351abb8c34e6c2008b4ddd +size 518821 diff --git a/live/preview_24.mp4 b/live/preview_24.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..a8062bdf46e07bb25ae134f5e1a774e75ed7a880 --- /dev/null +++ b/live/preview_24.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5787c4c4fb75eeccffa31b52a9a47c8df8f96d5ab8203c478862414760bc791d +size 516199 diff --git a/live/preview_25.mp4 b/live/preview_25.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..ea6f11291a86ad92c8ed77d0fe980753269c2b39 --- /dev/null +++ b/live/preview_25.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7d21f5696ae088fdcd37c72f018a32eaf5cfbf722afedbaed7fb018cce26114 +size 397108 diff --git a/live/preview_26.mp4 b/live/preview_26.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..708312e73c55827b8d1d1c047221051f6e5c77aa --- /dev/null +++ b/live/preview_26.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59fdf336ffdbbcbdad4a3246c47836296db5381eedcbae32039864d8c4df1ff1 +size 379466 diff --git a/live/preview_27.mp4 b/live/preview_27.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..335f707cd8778c55b5d77a3a23ad06f5a09e2bf1 --- /dev/null +++ b/live/preview_27.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fbb26ae000c7715ac56da4003212aced0c22461c287937f7c7086d968a2f7fa +size 403683 diff --git a/live/preview_28.mp4 b/live/preview_28.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..3d2f942c505829fdb8ed4f3160474208839c3360 --- /dev/null +++ b/live/preview_28.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22e440a7e8d805a888fc53d919379078caf030204194231728b1bf71d1abce31 +size 398079 diff --git a/live/preview_29.mp4 b/live/preview_29.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..fde221b5a39ea1a0a956ee7aff00f5922848a7f5 --- /dev/null +++ b/live/preview_29.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d78abe42425b11f1b3dcae664d1eac93f0cdff571bcf5573334241f0549877b +size 412506 diff --git a/live/preview_30.mp4 b/live/preview_30.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..dc4c4d0009cca83ff2b173ceecc545f47b6f0f3d --- /dev/null +++ b/live/preview_30.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40a438658fc088651dec11eff95401d7d0662c408ac2ef8a982bb3d52fe62274 +size 496280 diff --git a/live/preview_31.mp4 b/live/preview_31.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..e88df7b09a05c1db50b81d10fbf0cf12c6ff1d1d --- /dev/null +++ b/live/preview_31.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:409733e5e6e1ca6ed28d119110bfad77f8fb6d91796057be80620fedb61315c3 +size 286361 diff --git a/live/preview_32.mp4 b/live/preview_32.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..48f005afb3e1d9ae6d9fb48e4ecfbd49ee4170a2 --- /dev/null +++ b/live/preview_32.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60e9209b0318d0861b6aecda84e58651bc33bd58d6b2404f2fda83051974d9b4 +size 309937 diff --git a/live/preview_33.mp4 b/live/preview_33.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..146eaa9ce93ba372c95cafbd7a574c47cc9a50e4 --- /dev/null +++ b/live/preview_33.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d796accb4807331f8107b56b95b6256d72be1dffc3e79d2f4611ec444a666fa +size 353458 diff --git a/live/preview_34.mp4 b/live/preview_34.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..73f5e9b7b4d2176adebe4acefca5cc2b1c5ee462 --- /dev/null +++ b/live/preview_34.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0c951d16a8b9e253a71e0405be2f99f083a6f705431d509dfec3eee98aa582c +size 359338 diff --git a/live/preview_35.mp4 b/live/preview_35.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..107a594a01525a0371adc6eef5af2a82883549ec --- /dev/null +++ b/live/preview_35.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5be333fe59160b32f4f528462e4f0d29e9f4935563fc1e0792945818e350707 +size 304505 diff --git a/live/preview_36.mp4 b/live/preview_36.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..1a8931ece2b870f04b0df283a0859d2db3609333 --- /dev/null +++ b/live/preview_36.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:587dfea30a1ff80e87a128c20d9531294f1aa47177df364ad822473202261bf6 +size 379000 diff --git a/live/preview_37.mp4 b/live/preview_37.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..d4ef2fbe08925ef2ae16a5a32d0f7fd5792a5288 --- /dev/null +++ b/live/preview_37.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5987cd296abdf356b40823cc7fb7215e551da367cacc356297a380155bd28e4 +size 312184 diff --git a/live/preview_38.mp4 b/live/preview_38.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..7223a1fff08557f6fa9efafc5ffb0c17579a4ef6 --- /dev/null +++ b/live/preview_38.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4507d2dfb8fc801b178e110991e51b9774ba3b98eaf7c96074b61d426a279d20 +size 317658 diff --git a/samples/bubble-tea.jpg b/samples/bubble-tea.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ac6d13ad069d74576842d833139b5af707911297 --- /dev/null +++ b/samples/bubble-tea.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f72da4226b0e5396e1ba8d9a9b72c58ebe392217331af03e72adc61dcaaf891 +size 136727 diff --git a/samples/slippers.jpg b/samples/slippers.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4a03ddf9c9c179989317e6c8f3f478a2cb574a8a --- /dev/null +++ b/samples/slippers.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bce9129233c4d55903ab921422991097c48d6c9181add230ff2539d7924cfd36 +size 246094 diff --git a/samples/steamed-bun.jpg b/samples/steamed-bun.jpg new file mode 100644 index 0000000000000000000000000000000000000000..69fffcd917663a6647f23baad9a68bd4751b1267 --- /dev/null +++ b/samples/steamed-bun.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea07fed22c582a5d4a50d4498514f33a4b912a1916f95a26fb2ea827d632b750 +size 220378 diff --git a/samples/traffic-light.jpg b/samples/traffic-light.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e58140088438d2916d0fdd25545c55858d10794b --- /dev/null +++ b/samples/traffic-light.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88e98984915282ed5d6b849e5588ecc272a893e8183ff548f871d9a5dcc8fe0e +size 193499 diff --git a/samples/umbrella.jpg b/samples/umbrella.jpg new file mode 100644 index 0000000000000000000000000000000000000000..dbecea9160925872ffa348d58c3a5df6201a2841 --- /dev/null +++ b/samples/umbrella.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a122ed0399f399973af587291d3febec05ef82ffe76452e80b82cedb042eaa84 +size 327508 diff --git a/samples/yawn.jpg b/samples/yawn.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c9fe63be0900e90a6ba442ed78e8baee25cbb42a --- /dev/null +++ b/samples/yawn.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f56ceccef5277f15dfc80cb5e447ad04138f57a4ea2a90edb6998fd1ffd4578a +size 383872 diff --git a/source/backend/routes/tts.js b/source/backend/routes/tts.js new file mode 100644 index 0000000000000000000000000000000000000000..d3db5a12cbd2b66193f478a85f4908032a54fced --- /dev/null +++ b/source/backend/routes/tts.js @@ -0,0 +1,44 @@ +// Optional neural text-to-speech fallback for words without a human recording. +// GET /api/tts?text=umbrella&voice=en-US-AvaMultilingualNeural&rate=-5 -> audio/mpeg +const { Router } = require('express') + +const router = Router() +const VOICES = new Set([ + 'en-US-AvaMultilingualNeural', + 'en-US-AndrewMultilingualNeural', + 'en-US-JennyNeural', + 'en-GB-SoniaNeural', + 'en-GB-RyanNeural', +]) + +router.get('/', async (req, res) => { + const text = String(req.query.text || '').trim().slice(0, 80) + const voice = VOICES.has(String(req.query.voice)) ? String(req.query.voice) : 'en-US-AvaMultilingualNeural' + const rate = Math.max(-50, Math.min(50, Number.parseInt(String(req.query.rate || '0'), 10) || 0)) + if (!text) return res.status(400).json({ error: 'text is required' }) + try { + const { MsEdgeTTS, OUTPUT_FORMAT } = await import('msedge-tts') + const tts = new MsEdgeTTS() + await tts.setMetadata(voice, OUTPUT_FORMAT.AUDIO_24KHZ_96KBITRATE_MONO_MP3) + const safe = text.replace(/[<>&]/g, ' ') + const { audioStream } = tts.toStream(`${safe}.`, { rate: `${rate >= 0 ? '+' : ''}${rate}%` }) + const chunks = [] + await new Promise((resolve, reject) => { + const timer = setTimeout(() => reject(new Error('timeout')), 15000) + audioStream.on('data', (c) => chunks.push(c)) + audioStream.on('end', () => { + clearTimeout(timer) + resolve() + }) + audioStream.on('error', reject) + }) + tts.close?.() + const buf = Buffer.concat(chunks) + if (buf.length < 1000) return res.status(502).json({ error: 'empty audio' }) + res.set('Content-Type', 'audio/mpeg').set('Cache-Control', 'public, max-age=86400').send(buf) + } catch (e) { + res.status(502).json({ error: 'TTS failed', detail: String(e?.message || e) }) + } +}) + +module.exports = router diff --git a/source/frontend/package.json b/source/frontend/package.json index dde01b135753893610e49bbbfa223ae9a3dba4a5..c65eeb439123106e7776a36a08efd2b19306ffe6 100644 --- a/source/frontend/package.json +++ b/source/frontend/package.json @@ -13,16 +13,9 @@ "type-check": "tsc --noEmit --incremental" }, "dependencies": { - "@surf-ai/theme": "latest", - "react": "19.2.4", - "react-dom": "19.2.4", - "class-variance-authority": "0.7.1", - "clsx": "2.1.1", - "tailwind-merge": "2.6.1", - "lucide-react": "0.454.0", - "next-themes": "0.4.6", - "echarts": "5.6.0", - "echarts-for-react": "3.0.6", + "@ffmpeg/ffmpeg": "0.12.15", + "@ffmpeg/util": "0.12.2", + "@hookform/resolvers": "5.2.2", "@radix-ui/react-accordion": "1.2.12", "@radix-ui/react-aspect-ratio": "1.1.8", "@radix-ui/react-avatar": "1.1.11", @@ -49,35 +42,46 @@ "@radix-ui/react-toggle": "1.1.10", "@radix-ui/react-toggle-group": "1.1.11", "@radix-ui/react-tooltip": "1.2.8", - "sonner": "1.7.4", + "@surf-ai/theme": "latest", + "@tanstack/query-core": "5.94.5", + "@tanstack/react-query": "5.94.5", + "class-variance-authority": "0.7.1", + "clsx": "2.1.1", "cmdk": "1.1.1", - "vaul": "1.1.2", + "date-fns": "4.1.0", + "echarts": "5.6.0", + "echarts-for-react": "3.0.6", "embla-carousel-react": "8.6.0", + "fflate": "^0.8.3", + "lucide-react": "0.454.0", + "next-themes": "0.4.6", + "react": "19.2.4", "react-day-picker": "9.14.0", - "react-resizable-panels": "4.7.6", + "react-dom": "19.2.4", "react-hook-form": "7.72.0", - "@hookform/resolvers": "5.2.2", - "date-fns": "4.1.0", - "zod": "3.25.76", - "@tanstack/react-query": "5.94.5", - "@tanstack/query-core": "5.94.5", - "scheduler": "0.27.0" + "react-resizable-panels": "4.7.6", + "scheduler": "0.27.0", + "sonner": "1.7.4", + "tailwind-merge": "2.6.1", + "vaul": "1.1.2", + "zod": "3.25.76" }, "devDependencies": { + "@eslint/js": "9.39.4", + "@ffmpeg/core": "0.12.10", + "@tailwindcss/vite": "4.2.2", + "@types/node": "22.19.15", "@types/react": "19.2.14", "@types/react-dom": "19.2.3", - "@types/node": "22.19.15", - "@eslint/js": "9.39.4", "@vitejs/plugin-react": "4.7.0", - "@tailwindcss/vite": "4.2.2", "eslint": "9.39.4", "eslint-plugin-react-hooks": "5.2.0", "eslint-plugin-react-refresh": "0.4.26", "globals": "16.5.0", "tailwindcss": "4.2.2", "tw-animate-css": "1.4.0", - "typescript-eslint": "8.57.1", "typescript": "5.9.3", + "typescript-eslint": "8.57.1", "vite": "6.4.2" } } diff --git a/source/frontend/src/App.tsx b/source/frontend/src/App.tsx index fae80f1e1760e8b62d73bead91a9a85f2b6cec78..27c48fb4cf06ca1e428107866898cbbc8bada3ed 100644 --- a/source/frontend/src/App.tsx +++ b/source/frontend/src/App.tsx @@ -1,218 +1,52 @@ -import { useEffect, useRef, useState } from 'react' -import { Check, Copy, Download, Pause, Play, Volume2 } from 'lucide-react' -import { pack, type LiveItem, type LiveSet } from './data/livePack' +import { lazy, Suspense, useState } from 'react' +import { Loader2 } from 'lucide-react' +import PackGallery from './components/PackGallery' -const asset = (p: string) => `${import.meta.env.BASE_URL}live/${p}?v=${pack.version}` +const LiveMaker = lazy(() => import('./components/LiveMaker')) -function LiveCard({ item, active, onPlay }: { item: LiveItem; active: boolean; onPlay: (id: string | null) => void }) { - const ref = useRef(null) - const [playing, setPlaying] = useState(false) - - useEffect(() => { - const v = ref.current - if (!v) return - if (active) { - v.currentTime = 0 - v.muted = false - v.play().catch(() => { - v.muted = true - v.play().catch(() => undefined) - }) - } else { - v.pause() - } - }, [active]) - - return ( -
- -
-
-
- {String(item.index).padStart(2, '0')} · {item.zh} · {item.cat} -
-
{item.en}
-
{item.ipa}
-
-
- {item.duration.toFixed(1)} 秒 -
- - - 有声 - -
-
-
- ) -} - -function CopyBlock({ label, text }: { label: string; text: string }) { - const [done, setDone] = useState(false) - return ( -
-
- {label} - -
-

{text}

-
- ) -} - -function SetSection({ set, active, onPlay }: { set: LiveSet; active: string | null; onPlay: (id: string | null) => void }) { - return ( -
-
-
-

{set.name}

-

{set.items.map((i) => i.zh).join(' · ')}

-
-
- - - 下载这一组 JPG + MOV - - - ZIP · {set.zipMB.toFixed(1)} MB · {set.items.length} 组实况 - -
-
-
- {set.items.map((it) => ( - - ))} -
-
- - -
- {set.credits.length > 0 && ( -
-

图片来源与授权

-
- - - {set.credits.map((c) => ( - - - - - - ))} - -
- {c.zh} · {c.en} - - {c.author} - - - {c.license} - -
-
-

- 照片来自 Wikimedia Commons,均为允许商用的知识共享或公有领域授权。CC BY / BY-SA 授权要求注明作者,发布时建议在正文或评论区写上「图片来源:Wikimedia Commons」及作者。 -

-
- )} -
- ) -} +type Tab = 'maker' | 'gallery' export default function App() { - const [active, setActive] = useState(null) - const total = pack.sets.reduce((n, s) => n + s.items.length, 0) + const [tab, setTab] = useState(() => (typeof window !== 'undefined' && window.location.hash === '#gallery' ? 'gallery' : 'maker')) + const go = (t: Tab) => { + setTab(t) + if (typeof window !== 'undefined') window.history.replaceState(null, '', t === 'gallery' ? '#gallery' : '#maker') + } return (
-
-
-

- 实况图素材包 · {pack.sets.length} 组 {total} 张 · 竖屏 3:4 -

-

这个用英语怎么说?

-

- 封面是一张生活照,中间向网友提问;长按实况后,卡片展开、字母逐个打出,单词揭晓,配音标、中文释义、两遍真人发音(美式女声 + 慢速男声)和音效。点击下方任意一张预览(带声音)。 -

-
- - {pack.sets.map((s) => ( - - ))} - -
-

在 Mac 上变成实况图

-
    -
  1. - 1. - 解压 ZIP。每张实况是一对同名文件,例如 LIVE_01_slippers.JPG 和{' '} - LIVE_01_slippers.MOV。 -
  2. -
  3. - 2. - 全选一组的 18 个文件,一起拖进「照片」App(或 文件 → 导入)。照片识别配对后,每组显示为一张带 LIVE 标记的照片。 -
  4. -
  5. - 3. - 通过 iCloud 照片同步到 iPhone,或用隔空投送从「照片」发到手机,到手机里仍然是实况。 -
  6. -
  7. - 4. - 小红书 / 抖音发图文时,从相册选这 9 张,保持「实况」开关打开。 -
  8. -
-

- JPG 和 MOV 必须成对导入,单独拖一个文件不会变成实况。导入后不要再用其他软件转码 MOV,否则配对信息会丢失。 -

-
+
+ + {tab === 'maker' ? ( + <> +
+

自己做「这个用英语怎么说?」实况图

+

+ 放一张底图,填上单词和中文,选好读音、音效和样式,直接导出苹果实况照片(JPG + MOV,带声音)。不需要 AI:读音可以用维基共享资源的真人录音、你自己的录音或上传的音频。 +

+
+ 加载中
}> + + + + ) : ( + + )} ) diff --git a/source/frontend/src/components/LiveMaker.tsx b/source/frontend/src/components/LiveMaker.tsx new file mode 100644 index 0000000000000000000000000000000000000000..9434f4637dffe48a81226fdb19a44e9d35d2a780 --- /dev/null +++ b/source/frontend/src/components/LiveMaker.tsx @@ -0,0 +1,673 @@ +import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from 'react' +import { zipSync } from 'fflate' +import { Download, ImagePlus, Loader2, Mic, Pause, Play, Search, Square, Trash2, Upload, Volume2, Wand2 } from 'lucide-react' +import { api } from '@/lib/api' +import { cleanVoice, decodeToMono, SR } from '@/lib/live/audio' +import { encodeLive, type LiveResult } from '@/lib/live/encode' +import { loadFonts } from '@/lib/live/fonts' +import { fetchAudio, findRecordings, lookupWord, type Recording } from '@/lib/live/lookup' +import { build, type SfxSettings } from '@/lib/live/project' +import { FPS, H, W, type CardSpec } from '@/lib/live/renderer' +import { STYLES } from '@/lib/live/styles' + +type Fields = Omit +interface Photo { + src: HTMLCanvasElement + w: number + h: number + name: string +} +interface Voice { + clip: Float32Array | null + label: string +} +interface ResultItem extends LiveResult { + name: string + en: string + zh: string +} + +const base = import.meta.env.BASE_URL +const SAMPLES = [ + { key: 'slippers', en: 'slippers', zh: '拖鞋', ipa: '/ˈslɪpərz/', pos: 'n.', note: 'AI 生成' }, + { key: 'umbrella', en: 'umbrella', zh: '雨伞', ipa: '/ʌmˈbrelə/', pos: 'n.', note: 'AI 生成' }, + { key: 'bubble-tea', en: 'bubble tea', zh: '奶茶', ipa: '/ˈbʌbəl tiː/', pos: 'n.', note: 'AI 生成' }, + { key: 'traffic-light', en: 'traffic light', zh: '红绿灯', ipa: '/ˈtræfɪk laɪt/', pos: 'n.', note: 'Gary · CC BY-SA 2.0' }, + { key: 'steamed-bun', en: 'steamed bun', zh: '包子', ipa: '/ˌstiːmd ˈbʌn/', pos: 'n.', note: 'Guilhem Vellut · CC BY 2.0' }, + { key: 'yawn', en: 'yawn', zh: '打哈欠', ipa: '/jɔːn/', pos: 'v.', note: 'Wheeler Cowperthwaite · CC BY 2.0' }, +] +const ACCENTS = ['#ff3b5c', '#ff7a1a', '#f5b700', '#16a34a', '#2563eb', '#7c3aed', '#111114'] +const TTS_VOICES = [ + ['en-US-AvaMultilingualNeural', '美式女声'], + ['en-US-AndrewMultilingualNeural', '美式男声'], + ['en-GB-SoniaNeural', '英式女声'], + ['en-GB-RyanNeural', '英式男声'], +] + +const DEFAULT_FIELDS: Fields = { + crop: { zoom: 1, x: 0.5, y: 0.5 }, + en: 'slippers', + zh: '拖鞋', + ipa: '/ˈslɪpərz/', + pos: 'n.', + question: '「{zh}」用英语怎么说?', + pillQ: '在线求助', + pillA: '答案揭晓', + showPill: true, + styleId: 'glass', + accent: '#ff3b5c', + cardY: 0.5, + motion: true, + grain: true, + confetti: true, + sweep: true, + hold: 0.35, + compact: true, +} + +function loadImage(url: string): Promise { + return new Promise((res, rej) => { + const im = new Image() + im.crossOrigin = 'anonymous' + im.onload = () => res(im) + im.onerror = () => rej(new Error('图片无法读取')) + im.src = url + }) +} +async function toPhoto(url: string, name: string): Promise { + const im = await loadImage(url) + const s = Math.min(1, 2400 / Math.max(im.naturalWidth, im.naturalHeight)) + const c = document.createElement('canvas') + c.width = Math.round(im.naturalWidth * s) + c.height = Math.round(im.naturalHeight * s) + const x = c.getContext('2d')! + x.imageSmoothingQuality = 'high' + x.drawImage(im, 0, 0, c.width, c.height) + return { src: c, w: c.width, h: c.height, name } +} +const slug = (s: string) => s.trim().toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') || 'word' +function download(data: Uint8Array | Blob, name: string, type = 'application/octet-stream') { + const blob = data instanceof Blob ? data : new Blob([data as BlobPart], { type }) + const a = document.createElement('a') + a.href = URL.createObjectURL(blob) + a.download = name + document.body.appendChild(a) + a.click() + a.remove() + setTimeout(() => URL.revokeObjectURL(a.href), 5000) +} + +function Section({ step, title, children, extra }: { step: number; title: string; children: ReactNode; extra?: ReactNode }) { + return ( +
+
+

+ {step} + {title} +

+ {extra} +
+ {children} +
+ ) +} +function Field({ label, children, hint }: { label: string; children: ReactNode; hint?: string }) { + return ( + + ) +} +const inputCls = 'h-10 rounded-lg border border-white/10 bg-black/30 px-3 text-[15px] text-white outline-none focus:border-white/40' +function Range({ label, value, min, max, step, onChange, fmt }: { label: string; value: number; min: number; max: number; step: number; onChange: (v: number) => void; fmt?: (v: number) => string }) { + return ( + + ) +} +function Toggle({ label, checked, onChange }: { label: string; checked: boolean; onChange: (v: boolean) => void }) { + return ( + + ) +} + +export default function LiveMaker() { + const [fontsReady, setFontsReady] = useState(false) + const [photo, setPhoto] = useState(null) + const [f, setF] = useState(DEFAULT_FIELDS) + const [voice, setVoice] = useState({ clip: null, label: '' }) + const [second, setSecond] = useState<'slow' | 'same' | 'none'>('slow') + const [voiceVol, setVoiceVol] = useState(1) + const [fx, setFx] = useState({ whoosh: true, tick: true, chime: true, shimmer: true, pop: true, volume: 1 }) + const [voiceTab, setVoiceTab] = useState<'commons' | 'upload' | 'record' | 'tts'>('commons') + const [recs, setRecs] = useState(null) + const [lookupMsg, setLookupMsg] = useState('') + const [ttsVoice, setTtsVoice] = useState(TTS_VOICES[0][0]) + const [recording, setRecording] = useState(false) + const [results, setResults] = useState([]) + const [busy, setBusy] = useState<{ stage: string; ratio: number } | null>(null) + const [error, setError] = useState('') + const [playing, setPlaying] = useState(false) + const canvasRef = useRef(null) + const playRef = useRef<{ stop: () => void } | null>(null) + const recRef = useRef(null) + const dragRef = useRef<{ x: number; y: number; cx: number; cy: number } | null>(null) + const set = (k: K, v: Fields[K]) => setF((p) => ({ ...p, [k]: v })) + + useEffect(() => { + loadFonts().then(() => setFontsReady(true)).catch(() => setFontsReady(true)) + toPhoto(`${base}samples/slippers.jpg`, 'slippers').then(setPhoto).catch(() => undefined) + }, []) + + const spec: CardSpec = useMemo(() => ({ ...f, image: photo?.src ?? null, imgW: photo?.w ?? 0, imgH: photo?.h ?? 0 }), [f, photo]) + const built = useMemo(() => (fontsReady && spec.en.trim() ? build(spec, { clip: voice.clip, second, volume: voiceVol }, fx) : null), [fontsReady, spec, voice, second, voiceVol, fx]) + + // draw the cover frame whenever settings change + useEffect(() => { + if (!built || playing) return + const ctx = canvasRef.current?.getContext('2d') + if (ctx) built.renderer.frame(ctx, built.T.coverFrame) + }, [built, playing]) + + // ----- word lookup ----- + const runLookup = useCallback(async (word: string, fillText: boolean) => { + if (!word.trim()) return + setLookupMsg('正在查询音标和真人发音…') + setRecs(null) + const [info, rec] = await Promise.allSettled([lookupWord(word), findRecordings(word)]) + let note = '' + if (fillText) { + if (info.status === 'fulfilled') { + setF((p) => ({ ...p, ipa: info.value.ipa || p.ipa, pos: info.value.pos || p.pos })) + if (!info.value.ipa) note = '维基词典里没有这个词的音标,请手动填写。' + } else note = '音标查询失败,请手动填写。' + } + if (rec.status === 'fulfilled') { + setRecs(rec.value) + setLookupMsg(note + (rec.value.length ? '' : '维基共享资源里没有找到这个词的真人录音,可以上传、录音或用语音合成。')) + } else { + setRecs([]) + setLookupMsg(note + '录音查询失败,请稍后再试,或改用上传 / 录音。') + } + }, []) + + const applyRecording = async (r: Recording) => { + try { + setLookupMsg(`正在载入 ${r.label}…`) + const clip = cleanVoice(await decodeToMono(await fetchAudio(r.url))) + setVoice({ clip, label: `${r.label}(维基共享资源真人录音)` }) + setLookupMsg('') + } catch { + setLookupMsg('这段录音无法载入,换一条试试') + } + } + + const onAudioFile = async (file: File) => { + try { + const clip = cleanVoice(await decodeToMono(await file.arrayBuffer())) + setVoice({ clip, label: `上传:${file.name}` }) + } catch { + setError('这个音频格式无法识别,试试 mp3 / m4a / wav') + } + } + + const toggleRecord = async () => { + if (recording) { + recRef.current?.stop() + return + } + try { + const stream = await navigator.mediaDevices.getUserMedia({ audio: true }) + const mr = new MediaRecorder(stream) + const parts: Blob[] = [] + mr.ondataavailable = (e) => parts.push(e.data) + mr.onstop = async () => { + stream.getTracks().forEach((t) => t.stop()) + setRecording(false) + try { + const clip = cleanVoice(await decodeToMono(await new Blob(parts).arrayBuffer())) + setVoice({ clip, label: '我的录音' }) + } catch { + setError('录音解析失败,请重试') + } + } + recRef.current = mr + mr.start() + setRecording(true) + setTimeout(() => mr.state === 'recording' && mr.stop(), 6000) + } catch { + setError('无法使用麦克风,请在浏览器里允许麦克风权限') + } + } + + const runTTS = async () => { + try { + setLookupMsg('正在合成…') + const r = await fetch(api(`tts?text=${encodeURIComponent(f.en)}&voice=${ttsVoice}&rate=-5`)) + if (!r.ok) throw new Error() + const clip = cleanVoice(await decodeToMono(await r.arrayBuffer())) + setVoice({ clip, label: `语音合成:${TTS_VOICES.find((v) => v[0] === ttsVoice)?.[1]}` }) + setLookupMsg('') + } catch { + setLookupMsg('语音合成暂不可用(静态部署时没有后端),请改用真人录音、上传或录音') + } + } + + // ----- preview playback ----- + const stopPlay = () => { + playRef.current?.stop() + playRef.current = null + setPlaying(false) + } + const play = () => { + if (!built) return + if (playing) return stopPlay() + const actx = new AudioContext() + const src = actx.createBufferSource() + src.buffer = built.mixer.toAudioBuffer(actx) + src.connect(actx.destination) + const ctx = canvasRef.current!.getContext('2d')! + let raf = 0 + let alive = true + const t0 = actx.currentTime + 0.05 + src.start(t0) + const loop = () => { + if (!alive) return + const t = actx.currentTime - t0 + const fi = Math.max(0, Math.floor(t * FPS)) + if (fi >= built.T.nf) { + stopPlay() + return + } + built.renderer.frame(ctx, fi) + raf = requestAnimationFrame(loop) + } + raf = requestAnimationFrame(loop) + playRef.current = { + stop: () => { + alive = false + cancelAnimationFrame(raf) + try { + src.stop() + } catch { + /* already stopped */ + } + actx.close() + }, + } + setPlaying(true) + } + useEffect(() => () => playRef.current?.stop(), []) + + // ----- drag to reposition the photo ----- + const onPointerDown = (e: React.PointerEvent) => { + if (!photo) return + ;(e.target as HTMLElement).setPointerCapture(e.pointerId) + dragRef.current = { x: e.clientX, y: e.clientY, cx: f.crop.x, cy: f.crop.y } + } + const onPointerMove = (e: React.PointerEvent) => { + const d = dragRef.current + if (!d || !photo) return + const rect = (e.target as HTMLElement).getBoundingClientRect() + const bw = Math.min(photo.w, (photo.h * 3) / 4) / f.crop.zoom + const k = bw / rect.width + set('crop', { ...f.crop, x: d.cx - ((e.clientX - d.x) * k) / photo.w, y: d.cy - ((e.clientY - d.y) * k) / photo.h }) + } + const onPointerUp = () => { + dragRef.current = null + if (!photo) return + // clamp so the 3:4 window stays inside the photo + const bw = Math.min(photo.w, (photo.h * 3) / 4) / f.crop.zoom + const bh = (bw * 4) / 3 + const cx = Math.min(1 - bw / 2 / photo.w, Math.max(bw / 2 / photo.w, f.crop.x)) + const cy = Math.min(1 - bh / 2 / photo.h, Math.max(bh / 2 / photo.h, f.crop.y)) + set('crop', { ...f.crop, x: cx, y: cy }) + } + + // ----- generate ----- + const generate = async () => { + if (!built) return + stopPlay() + setError('') + setBusy({ stage: '准备', ratio: 0 }) + try { + const res = await encodeLive(built.renderer, built.mixer.wav(), (stage, ratio) => setBusy({ stage, ratio })) + const baseName = `LIVE_${slug(f.en)}` + const used = results.filter((r) => r.name === baseName || r.name.startsWith(baseName + '_')).length + setResults((p) => [{ ...res, name: used ? `${baseName}_${used + 1}` : baseName, en: f.en, zh: f.zh }, ...p]) + } catch (e) { + setError(`生成失败:${e instanceof Error ? e.message : String(e)}`) + } finally { + setBusy(null) + const ctx = canvasRef.current?.getContext('2d') + if (ctx && built) built.renderer.frame(ctx, built.T.coverFrame) + } + } + + const downloadAll = () => { + const files: Record = {} + for (const r of results) { + files[`${r.name}.JPG`] = [r.jpg, { level: 0 }] + files[`${r.name}.MOV`] = [r.mov, { level: 0 }] + } + download(zipSync(files), `live-photos-${results.length}.zip`, 'application/zip') + } + + const pickSample = async (s: (typeof SAMPLES)[number]) => { + setPhoto(await toPhoto(`${base}samples/${s.key}.jpg`, s.key)) + setF((p) => ({ ...p, en: s.en, zh: s.zh, ipa: s.ipa, pos: s.pos, crop: { zoom: 1, x: 0.5, y: 0.5 } })) + setVoice({ clip: null, label: '' }) + setRecs(null) + } + + const dur = built ? built.T.dur : 0 + + return ( +
+ {/* preview column */} +
+
+ + {!fontsReady && ( +
+ 正在加载字体 +
+ )} + + LIVE · {dur.toFixed(1)}s + +
+

拖动画面调整底图位置 · 上图为封面(静态图)

+
+ + +
+ {busy && ( +
+
+
+ )} + + {built && f.compact && voice.clip && second !== 'none' && built.fitted !== second && ( +

+ {built.fitted === 'none' ? '3 秒内放不下第二遍读音,这张只读一遍' : '3 秒内放不下慢速第二遍,已改为原速'} +

+ )} + {built?.voiceCut &&

读音太长,结尾会被截断,换一段更短的录音试试

} + {!voice.clip && built &&

还没有选读音,生成的实况只有音效

} + {error &&

{error}

} +

+ 全部在你的浏览器里完成,图片和录音不会上传。首次生成需要下载约 32 MB 的视频编码器。 +

+ + {results.length > 0 && ( +
+
+ 已生成 {results.length} 张 + +
+
    + {results.map((r) => ( +
  • +
  • + ))} +
+

Mac 上把同名的 JPG 和 MOV 一起拖进「照片」App,就会识别成一张实况照片。

+
+ )} +
+ + {/* settings column */} +
+
+
+ + 建议竖拍照片,会自动裁成 3:4(1080×1440) +
+
+
或者用示例图片
+
+ {SAMPLES.map((s) => ( + + ))} +
+

示例中红绿灯、包子、打哈欠来自 Wikimedia Commons(作者见鼠标悬停提示),其余为 AI 生成。

+
+
+ set('crop', { ...f.crop, zoom: v })} fmt={(v) => `${v.toFixed(2)}×`} /> + set('cardY', v)} fmt={(v) => `${Math.round(v * 100)}%`} /> +
+
+ +
+
+ +
+ { + set('en', e.target.value) + setVoice({ clip: null, label: '' }) + setRecs(null) + }} + onBlur={() => recs === null && runLookup(f.en, false)} + placeholder="umbrella" + /> + +
+
+ + set('zh', e.target.value)} placeholder="雨伞" /> + + + set('ipa', e.target.value)} placeholder="/ʌmˈbrelə/" /> + + + + +
+
+ +
{voice.label} · {(voice.clip.length / SR).toFixed(1)}s : null}> +
+ {([['commons', '真人录音'], ['upload', '上传音频'], ['record', '自己录'], ['tts', '语音合成']] as const).map(([k, l]) => ( + { + setVoiceTab(k) + if (k === 'commons' && recs === null) runLookup(f.en, false) + }} /> + ))} +
+ {voiceTab === 'commons' && ( +
+

来自维基共享资源(Wikimedia Commons)志愿者录制的真人发音,多为 CC BY-SA 授权。

+ {recs === null && ( + + )} + {recs && recs.length > 0 && ( +
    + {recs.map((r) => ( +
  • + + {r.label} + +
  • + ))} +
+ )} +
+ )} + {voiceTab === 'upload' && ( + + )} + {voiceTab === 'record' && ( +
+ + 读一遍单词即可,最长 6 秒,首尾静音会自动剪掉 +
+ )} + {voiceTab === 'tts' && ( +
+ + + 找不到真人录音时的备选,使用神经网络语音(属于 AI),需要网站后端。 +
+ )} + {lookupMsg &&

{lookupMsg}

} +
+ + + + `${Math.round(v * 100)}%`} /> +
+
+ +
+
+ setFx({ ...fx, whoosh: v })} /> + setFx({ ...fx, tick: v })} /> + setFx({ ...fx, chime: v })} /> + setFx({ ...fx, shimmer: v })} /> + setFx({ ...fx, pop: v })} /> +
+
+ setFx({ ...fx, volume: v })} fmt={(v) => `${Math.round(v * 100)}%`} /> +
+
+ +
+
+ {STYLES.map((s) => ( + + ))} +
+
+
强调色(关键词、喇叭图标)
+
+ {ACCENTS.map((c) => ( +
+
+
+ + set('question', e.target.value)} /> + +
+ + set('pillQ', e.target.value)} disabled={!f.showPill} /> + + + set('pillA', e.target.value)} disabled={!f.showPill} /> + +
+
+
+ set('showPill', v)} /> + set('motion', v)} /> + set('grain', v)} /> + set('confetti', v)} /> + set('sweep', v)} /> +
+
+ set('hold', v)} fmt={(v) => `${v.toFixed(2)} 秒`} /> +
+
+
+
+ ) +} diff --git a/source/frontend/src/components/PackGallery.tsx b/source/frontend/src/components/PackGallery.tsx new file mode 100644 index 0000000000000000000000000000000000000000..59164429d411c82eb1ff5a871d04a46b2e947433 --- /dev/null +++ b/source/frontend/src/components/PackGallery.tsx @@ -0,0 +1,220 @@ +import { useEffect, useRef, useState } from 'react' +import { Check, Copy, Download, Pause, Play, Volume2 } from 'lucide-react' +import { pack, type LiveItem, type LiveSet } from '@/data/livePack' + +const asset = (p: string) => `${import.meta.env.BASE_URL}live/${p}?v=${pack.version}` + + +function LiveCard({ item, active, onPlay }: { item: LiveItem; active: boolean; onPlay: (id: string | null) => void }) { + const ref = useRef(null) + const [playing, setPlaying] = useState(false) + + useEffect(() => { + const v = ref.current + if (!v) return + if (active) { + v.currentTime = 0 + v.muted = false + v.play().catch(() => { + v.muted = true + v.play().catch(() => undefined) + }) + } else { + v.pause() + } + }, [active]) + + return ( +
+ +
+
+
+ {String(item.index).padStart(2, '0')} · {item.zh} · {item.cat} +
+
{item.en}
+
{item.ipa}
+
+
+ {item.duration.toFixed(1)} 秒 +
+ + + 有声 + +
+
+
+ ) +} + +function CopyBlock({ label, text }: { label: string; text: string }) { + const [done, setDone] = useState(false) + return ( +
+
+ {label} + +
+

{text}

+
+ ) +} + +function SetSection({ set, active, onPlay }: { set: LiveSet; active: string | null; onPlay: (id: string | null) => void }) { + return ( +
+
+
+

{set.name}

+

{set.items.map((i) => i.zh).join(' · ')}

+
+
+ + + 下载这一组 JPG + MOV + + + ZIP · {set.zipMB.toFixed(1)} MB · {set.items.length} 组实况 + +
+
+
+ {set.items.map((it) => ( + + ))} +
+
+ + +
+ {set.credits.length > 0 && ( +
+

图片来源与授权

+
+ + + {set.credits.map((c) => ( + + + + + + ))} + +
+ {c.zh} · {c.en} + + {c.author} + + + {c.license} + +
+
+

+ 照片来自 Wikimedia Commons,均为允许商用的知识共享或公有领域授权。CC BY / BY-SA 授权要求注明作者,发布时建议在正文或评论区写上「图片来源:Wikimedia Commons」及作者。 +

+
+ )} +
+ ) +} + +export default function PackGallery() { + const [active, setActive] = useState(null) + const total = pack.sets.reduce((n, s) => n + s.items.length, 0) + return ( +
+
+
+

+ 实况图素材包 · {pack.sets.length} 组 {total} 张 · 竖屏 3:4 +

+

这个用英语怎么说?

+

+ 封面是一张生活照,卡片里向网友提问(第三组为看图填空);长按实况后,字母逐个打出,单词揭晓,配音标、中文释义、英语发音(美式女声,放得下时再加一遍男声慢读)和音效。每张不超过 3 秒,可直接发微信朋友圈。点击下方任意一张预览(带声音)。 +

+
+ + {pack.sets.map((s) => ( + + ))} + +
+

在 Mac 上变成实况图

+
    +
  1. + 1. + 解压 ZIP。每张实况是一对同名文件,例如 LIVE_01_slippers.JPG 和{' '} + LIVE_01_slippers.MOV。 +
  2. +
  3. + 2. + 全选一组的 18 个文件,一起拖进「照片」App(或 文件 → 导入)。照片识别配对后,每组显示为一张带 LIVE 标记的照片。 +
  4. +
  5. + 3. + 通过 iCloud 照片同步到 iPhone,或用隔空投送从「照片」发到手机,到手机里仍然是实况。 +
  6. +
  7. + 4. + 小红书 / 抖音发图文时,从相册选这 9 张,保持「实况」开关打开。 +
  8. +
+

+ JPG 和 MOV 必须成对导入,单独拖一个文件不会变成实况。导入后不要再用其他软件转码 MOV,否则配对信息会丢失。 +

+
+
+
+ ) +} diff --git a/source/frontend/src/data/livePack.ts b/source/frontend/src/data/livePack.ts index 552921fc1523cc25fa39b912bfa1993881c72135..6402f96755a75ab9ebd486c62c7de8f1f893f299 100644 --- a/source/frontend/src/data/livePack.ts +++ b/source/frontend/src/data/livePack.ts @@ -38,13 +38,13 @@ export interface LivePack { } export const pack: LivePack = { - "version": "1792234823", + "version": "1792278702", "sets": [ { "key": "a", "name": "第一组 · 生活照(AI 生成)", "zip": "daily-english-live-photos.zip", - "zipMB": 45.2, + "zipMB": 33.0, "items": [ { "id": "01", @@ -53,10 +53,10 @@ export const pack: LivePack = { "en": "slippers", "ipa": "/ˈslɪpərz/", "cat": "物", - "duration": 4.03, + "duration": 3.0, "cover": "cover_01.jpg", "preview": "preview_01.mp4", - "identifier": "8FF2AC15-B32A-4D13-8E9E-06D68A4B4B4D" + "identifier": "CE171D8D-D609-4CEF-B2A5-9949274DF6C0" }, { "id": "02", @@ -65,10 +65,10 @@ export const pack: LivePack = { "en": "toothbrush", "ipa": "/ˈtuːθbrʌʃ/", "cat": "物", - "duration": 4.13, + "duration": 3.0, "cover": "cover_02.jpg", "preview": "preview_02.mp4", - "identifier": "CE020DC5-C55B-453F-9FB6-57674364B72A" + "identifier": "17EE131F-7D7C-49D7-B080-136BC74F71BE" }, { "id": "03", @@ -77,10 +77,10 @@ export const pack: LivePack = { "en": "umbrella", "ipa": "/ʌmˈbrelə/", "cat": "物", - "duration": 3.8, + "duration": 3.0, "cover": "cover_03.jpg", "preview": "preview_03.mp4", - "identifier": "F757F373-0F98-40EA-A71A-B8C420D77C35" + "identifier": "AFE5DAD6-0DFE-419E-BAC2-0DCA79C9B5BB" }, { "id": "04", @@ -89,10 +89,10 @@ export const pack: LivePack = { "en": "alarm clock", "ipa": "/əˈlɑːrm klɑːk/", "cat": "物", - "duration": 4.43, + "duration": 2.33, "cover": "cover_04.jpg", "preview": "preview_04.mp4", - "identifier": "CC9885DD-2DD1-4797-B007-A08315303FDE" + "identifier": "FB7F72BE-6826-4C98-8170-058C34CC33D5" }, { "id": "05", @@ -101,10 +101,10 @@ export const pack: LivePack = { "en": "delivery rider", "ipa": "/dɪˈlɪvəri ˈraɪdər/", "cat": "人", - "duration": 4.8, + "duration": 2.43, "cover": "cover_05.jpg", "preview": "preview_05.mp4", - "identifier": "2D8160CA-0F07-40CF-A3C2-895469598F13" + "identifier": "9F351073-3574-4BBF-B842-63C81772E05B" }, { "id": "06", @@ -113,10 +113,10 @@ export const pack: LivePack = { "en": "traffic jam", "ipa": "/ˈtræfɪk dʒæm/", "cat": "事", - "duration": 4.4, + "duration": 3.0, "cover": "cover_06.jpg", "preview": "preview_06.mp4", - "identifier": "36AA6AFC-C1DC-4E3C-A39B-7BEBDE15F380" + "identifier": "4842BB73-D0F6-4DA7-90DB-BA72C45627BF" }, { "id": "07", @@ -125,10 +125,10 @@ export const pack: LivePack = { "en": "power bank", "ipa": "/ˈpaʊər bæŋk/", "cat": "物", - "duration": 3.83, + "duration": 3.0, "cover": "cover_07.jpg", "preview": "preview_07.mp4", - "identifier": "E72ED831-0A58-45A2-AC51-DF26E33877BA" + "identifier": "6AC214BB-3339-4DDD-8328-27C823EBB184" }, { "id": "08", @@ -137,10 +137,10 @@ export const pack: LivePack = { "en": "rice cooker", "ipa": "/ˈraɪs ˌkʊkər/", "cat": "物", - "duration": 4.13, + "duration": 3.0, "cover": "cover_08.jpg", "preview": "preview_08.mp4", - "identifier": "C91548A9-6B9D-438A-B5C4-C6C3E4E9D771" + "identifier": "53518C01-9B29-478D-8EBB-869D3A0CCFFE" }, { "id": "09", @@ -149,10 +149,10 @@ export const pack: LivePack = { "en": "bubble tea", "ipa": "/ˈbʌbəl tiː/", "cat": "物", - "duration": 4.17, + "duration": 3.0, "cover": "cover_09.jpg", "preview": "preview_09.mp4", - "identifier": "51FF00B9-1A36-4CA5-AEF1-6073874A71DB" + "identifier": "9856A5C0-76BD-44C9-AB11-F4884B88706D" } ], "copy": { @@ -165,7 +165,7 @@ export const pack: LivePack = { "key": "b", "name": "第二组 · 真实照片(网络授权图片)", "zip": "daily-english-live-photos-set2.zip", - "zipMB": 62.6, + "zipMB": 46.3, "items": [ { "id": "10", @@ -174,10 +174,10 @@ export const pack: LivePack = { "en": "traffic light", "ipa": "/ˈtræfɪk laɪt/", "cat": "物", - "duration": 4.27, + "duration": 3.0, "cover": "cover_10.jpg", "preview": "preview_10.mp4", - "identifier": "7FE90546-61AA-43D8-B527-35A89B92DBF3" + "identifier": "39C69DAC-FEC5-431F-AA97-088D46047237" }, { "id": "11", @@ -186,10 +186,10 @@ export const pack: LivePack = { "en": "escalator", "ipa": "/ˈeskəleɪtər/", "cat": "物", - "duration": 4.03, + "duration": 3.0, "cover": "cover_11.jpg", "preview": "preview_11.mp4", - "identifier": "E62D2FF1-36F4-46EB-8105-638AB6ACCB76" + "identifier": "BB58AEC7-8EB6-499E-BD1C-D72D2BF15765" }, { "id": "12", @@ -198,10 +198,10 @@ export const pack: LivePack = { "en": "remote control", "ipa": "/rɪˌmoʊt kənˈtroʊl/", "cat": "物", - "duration": 4.63, + "duration": 2.4, "cover": "cover_12.jpg", "preview": "preview_12.mp4", - "identifier": "5BC66F4C-166F-42C2-858F-FBB442469BAF" + "identifier": "9CFFC057-3C60-4E19-A8EF-BE4FC710D3EA" }, { "id": "13", @@ -210,10 +210,10 @@ export const pack: LivePack = { "en": "thermos", "ipa": "/ˈθɜːrməs/", "cat": "物", - "duration": 3.67, + "duration": 3.0, "cover": "cover_13.jpg", "preview": "preview_13.mp4", - "identifier": "2A73A39B-3797-444C-8495-D45465ED173E" + "identifier": "E06A79EF-1E9A-4CAB-B508-C4093E47203A" }, { "id": "14", @@ -222,10 +222,10 @@ export const pack: LivePack = { "en": "nail clippers", "ipa": "/ˈneɪl ˌklɪpərz/", "cat": "物", - "duration": 4.83, + "duration": 2.43, "cover": "cover_14.jpg", "preview": "preview_14.mp4", - "identifier": "A23B54B0-D5C3-485C-95CB-538534365933" + "identifier": "9EB05625-9994-49D4-925B-BB5A707DCDAA" }, { "id": "15", @@ -234,10 +234,10 @@ export const pack: LivePack = { "en": "steamed bun", "ipa": "/ˌstiːmd ˈbʌn/", "cat": "物", - "duration": 4.07, + "duration": 3.0, "cover": "cover_15.jpg", "preview": "preview_15.mp4", - "identifier": "79DDF372-1DDD-4401-9EE4-F6C443DF9E2B" + "identifier": "EDA50DFB-5E70-4EB9-8E93-CE31961CAEBD" }, { "id": "16", @@ -246,10 +246,10 @@ export const pack: LivePack = { "en": "barber", "ipa": "/ˈbɑːrbər/", "cat": "人", - "duration": 3.37, + "duration": 3.0, "cover": "cover_16.jpg", "preview": "preview_16.mp4", - "identifier": "DF0BF6D9-8C37-4A79-8DF1-C13C77BC99E7" + "identifier": "881AE368-459F-45BF-91C9-0D9787D3A157" }, { "id": "17", @@ -258,10 +258,10 @@ export const pack: LivePack = { "en": "yawn", "ipa": "/jɔːn/", "cat": "事", - "duration": 3.33, + "duration": 3.0, "cover": "cover_17.jpg", "preview": "preview_17.mp4", - "identifier": "FDDF00C1-3532-4A57-8CCA-AA86D452D2D5" + "identifier": "A7296C7C-2B5C-4441-B5AB-7FF6698E3BDD" }, { "id": "18", @@ -270,10 +270,10 @@ export const pack: LivePack = { "en": "trash can", "ipa": "/ˈtræʃ kæn/", "cat": "物", - "duration": 4.3, + "duration": 3.0, "cover": "cover_18.jpg", "preview": "preview_18.mp4", - "identifier": "43035BA2-DCDD-409F-99C2-7095714D9C70" + "identifier": "C877CFF1-96A1-4F58-ACA6-E622B09EC92C" } ], "copy": { @@ -363,6 +363,272 @@ export const pack: LivePack = { "page": "https://commons.wikimedia.org/wiki/File:Trash_can,_Oak_%26_Dante_Streets,_New_Orleans_March_2026.jpg" } ] + }, + { + "key": "c", + "name": "第三组 · 看图填空(G _ _)", + "zip": "daily-english-live-photos-set3.zip", + "zipMB": 42.0, + "items": [ + { + "id": "19", + "index": 1, + "zh": "枪", + "en": "gun", + "ipa": "/ɡʌn/", + "cat": "物", + "duration": 3.0, + "cover": "cover_19.jpg", + "preview": "preview_19.mp4", + "identifier": "A4C1C26D-25C7-4E0A-8A2C-AB4BA57348B2" + }, + { + "id": "20", + "index": 2, + "zh": "汽油", + "en": "gas", + "ipa": "/ɡæs/", + "cat": "物", + "duration": 3.0, + "cover": "cover_20.jpg", + "preview": "preview_20.mp4", + "identifier": "B3044931-CC31-4EF9-8A76-46EF88762453" + }, + { + "id": "21", + "index": 3, + "zh": "宝石", + "en": "gem", + "ipa": "/dʒem/", + "cat": "物", + "duration": 3.0, + "cover": "cover_21.jpg", + "preview": "preview_21.mp4", + "identifier": "C40FF1A1-4E0A-49A4-8D36-02638D122FFD" + }, + { + "id": "22", + "index": 4, + "zh": "天哪(表示惊讶)", + "en": "gee", + "ipa": "/dʒiː/", + "cat": "感叹", + "duration": 3.0, + "cover": "cover_22.jpg", + "preview": "preview_22.mp4", + "identifier": "07ACA23D-2D67-40BA-BCE1-090780CC1E4D" + }, + { + "id": "23", + "index": 5, + "zh": "口香糖", + "en": "gum", + "ipa": "/ɡʌm/", + "cat": "物", + "duration": 3.0, + "cover": "cover_23.jpg", + "preview": "preview_23.mp4", + "identifier": "4FFFE50A-837E-40FC-8E0B-27B4F47E6B25" + }, + { + "id": "24", + "index": 6, + "zh": "小岛", + "en": "cay", + "ipa": "/keɪ/", + "cat": "地", + "duration": 3.0, + "cover": "cover_24.jpg", + "preview": "preview_24.mp4", + "identifier": "A9E6D826-9A61-436D-B285-AC1703B00E5D" + }, + { + "id": "25", + "index": 7, + "zh": "上帝;神", + "en": "god", + "ipa": "/ɡɑːd/", + "cat": "人", + "duration": 3.0, + "cover": "cover_25.jpg", + "preview": "preview_25.mp4", + "identifier": "9B01FBB5-252D-45ED-AF5E-7E6B614DE0EF" + }, + { + "id": "26", + "index": 8, + "zh": "健身房", + "en": "gym", + "ipa": "/dʒɪm/", + "cat": "地", + "duration": 3.0, + "cover": "cover_26.jpg", + "preview": "preview_26.mp4", + "identifier": "CACA22C0-35C5-46DE-AB26-50C2BB9064CC" + }, + { + "id": "27", + "index": 9, + "zh": "演出", + "en": "gig", + "ipa": "/ɡɪɡ/", + "cat": "事", + "duration": 3.0, + "cover": "cover_27.jpg", + "preview": "preview_27.mp4", + "identifier": "C74F1138-2E4E-459B-9F98-5FA1C9374F07" + }, + { + "id": "28", + "index": 10, + "zh": "堵嘴", + "en": "gag", + "ipa": "/ɡæɡ/", + "cat": "事", + "duration": 3.0, + "cover": "cover_28.jpg", + "preview": "preview_28.mp4", + "identifier": "5F37B71C-B13D-4E03-A82F-5403BD6C5D16" + } + ], + "copy": { + "title": "看图填空:G _ _ 你能填对几个?", + "body": "全是三个字母的单词,看图猜一猜是什么👀\n先看封面猜一猜,再长按实况看答案(记得开声音🔊)\n评论区报一下你答对了几个~\n\n#英语单词 #看图猜单词 #英语学习 #实况图 #每日英语 #单词打卡" + }, + "credits": [] + }, + { + "key": "d", + "name": "第四组 · 看图填空(_ A Y)", + "zip": "daily-english-live-photos-set4.zip", + "zipMB": 42.5, + "items": [ + { + "id": "29", + "index": 1, + "zh": "说", + "en": "say", + "ipa": "/seɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_29.jpg", + "preview": "preview_29.mp4", + "identifier": "08125443-28E5-49C4-AF35-384F10F21A58" + }, + { + "id": "30", + "index": 2, + "zh": "道路", + "en": "way", + "ipa": "/weɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_30.jpg", + "preview": "preview_30.mp4", + "identifier": "02A2AA43-57C7-439A-B479-C4990B550C3B" + }, + { + "id": "31", + "index": 3, + "zh": "一天", + "en": "day", + "ipa": "/deɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_31.jpg", + "preview": "preview_31.mp4", + "identifier": "2FD1135C-ABA0-43C9-B03C-9E06A50B3A53" + }, + { + "id": "32", + "index": 4, + "zh": "海湾", + "en": "bay", + "ipa": "/beɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_32.jpg", + "preview": "preview_32.mp4", + "identifier": "0254D155-3038-4A52-8CC4-D6DC157866BB" + }, + { + "id": "33", + "index": 5, + "zh": "松鸦", + "en": "jay", + "ipa": "/dʒeɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_33.jpg", + "preview": "preview_33.mp4", + "identifier": "E0A8C434-A531-4ADC-AAC5-1E2F8C33A4B4" + }, + { + "id": "34", + "index": 6, + "zh": "干草", + "en": "hay", + "ipa": "/heɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_34.jpg", + "preview": "preview_34.mp4", + "identifier": "B52B208B-2D1F-4545-9933-01EEC51B02D9" + }, + { + "id": "35", + "index": 7, + "zh": "躺下", + "en": "lay", + "ipa": "/leɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_35.jpg", + "preview": "preview_35.mp4", + "identifier": "F02CBB0E-839F-43B1-8EB2-7C1BD148E605" + }, + { + "id": "36", + "index": 8, + "zh": "五月", + "en": "may", + "ipa": "/meɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_36.jpg", + "preview": "preview_36.mp4", + "identifier": "D9C37DA5-EC76-455C-B041-5D30F408807A" + }, + { + "id": "37", + "index": 9, + "zh": "支付", + "en": "pay", + "ipa": "/peɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_37.jpg", + "preview": "preview_37.mp4", + "identifier": "45972C71-1D8C-4FD7-8C7B-1DB2ACDEBFD0" + }, + { + "id": "38", + "index": 10, + "zh": "光线", + "en": "ray", + "ipa": "/reɪ/", + "cat": "", + "duration": 3.0, + "cover": "cover_38.jpg", + "preview": "preview_38.mp4", + "identifier": "89E12819-83AC-4793-8329-40C2CEF9B0AE" + } + ], + "copy": { + "title": "看图填空:_ A Y 你能填对几个?", + "body": "后面都是 AY,就差第一个字母,看图猜一猜👀\n先看封面猜一猜,再长按实况看答案(记得开声音🔊)\n评论区报一下你答对了几个~\n\n#英语单词 #看图猜单词 #英语学习 #实况图 #每日英语 #单词打卡" + }, + "credits": [] } ] } diff --git a/source/frontend/src/lib/live/audio.ts b/source/frontend/src/lib/live/audio.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4a06eea6859eae6feaf261f7b4fefb72928fe59 --- /dev/null +++ b/source/frontend/src/lib/live/audio.ts @@ -0,0 +1,236 @@ +// Sound design, voice processing and mixing — all synthesised in the browser, no samples, no AI. +export const SR = 48000 + +const secs = (d: number) => Math.round(SR * d) + +function onePoleLP(x: Float32Array, fc: (i: number) => number) { + const out = new Float32Array(x.length) + let y = 0 + let a = 0 + for (let i = 0; i < x.length; i++) { + if (i % 64 === 0) a = Math.exp((-2 * Math.PI * fc(i)) / SR) + y = (1 - a) * x[i] + a * y + out[i] = y + } + return out +} + +function rng(seed: number) { + let s = seed >>> 0 + return () => { + s = (s * 1664525 + 1013904223) >>> 0 + return s / 4294967296 + } +} +function gauss(r: () => number) { + return Math.sqrt(-2 * Math.log(r() + 1e-12)) * Math.cos(2 * Math.PI * r()) +} +function normalize(x: Float32Array, peak: number) { + let m = 1e-9 + for (const v of x) m = Math.max(m, Math.abs(v)) + for (let i = 0; i < x.length; i++) x[i] = (x[i] / m) * peak + return x +} + +export function whoosh(d = 0.45) { + const n = secs(d) + const r = rng(3) + const noise = new Float32Array(n).map(() => gauss(r)) + const hi = onePoleLP(noise, (i) => 500 + 6500 * Math.pow(i / n, 1.4)) + const lo = onePoleLP(noise, (i) => 150 + 1800 * Math.pow(i / n, 1.4)) + const out = new Float32Array(n) + for (let i = 0; i < n; i++) { + const e = Math.pow(Math.sin(Math.PI * Math.pow(i / n, 0.7)), 2) + out[i] = (hi[i] - lo[i]) * e + } + return normalize(out, 0.42) +} + +const SCALE = [0, 2, 4, 7, 9, 12, 14, 16, 19, 21, 24, 26, 28, 31, 33, 36] +export function tick(i: number) { + const f = 587.33 * Math.pow(2, SCALE[Math.min(i, SCALE.length - 1)] / 12) + const n = secs(0.18) + const out = new Float32Array(n) + for (let k = 0; k < n; k++) { + const t = k / SR + const s = Math.sin(2 * Math.PI * f * t) * 0.8 + Math.sin(2 * Math.PI * f * 4 * t) * 0.15 * Math.exp(-t * 70) + out[k] = s * Math.exp(-t * 26) * (1 - Math.exp(-t * 2000)) * 0.3 + } + return out +} + +export function chime() { + const n = secs(1.4) + const out = new Float32Array(n) + const notes: [number, number][] = [[1046.5, 0], [1318.5, 0.055], [1568, 0.11], [2093, 0.165]] + notes.forEach(([f, dt], k) => { + const s0 = secs(dt) + for (let i = s0; i < n; i++) { + const t = (i - s0) / SR + const tone = Math.sin(2 * Math.PI * f * t) + 0.35 * Math.sin(2 * Math.PI * f * 2.76 * t) * Math.exp(-t * 9) + + 0.15 * Math.sin(2 * Math.PI * f * 5.4 * t) * Math.exp(-t * 16) + out[i] += tone * Math.exp(-t * 4) * (1 - Math.exp(-t * 900)) * (0.9 - k * 0.12) + } + }) + return normalize(out, 0.26) +} + +export function pop() { + const n = secs(0.12) + const out = new Float32Array(n) + let ph = 0 + for (let i = 0; i < n; i++) { + const t = i / SR + ph += (2 * Math.PI * (1100 * Math.exp(-t * 22) + 260)) / SR + out[i] = Math.sin(ph) * Math.exp(-t * 32) * (1 - Math.exp(-t * 3000)) * 0.32 + } + return out +} + +export function shimmer(d = 1.0) { + const r = rng(11) + const n = secs(d) + const out = new Float32Array(n) + for (let j = 0; j < 30; j++) { + const st = secs(r() * d * 0.55) + const f = 2800 + r() * 4000 + const amp = 0.2 + r() * 0.3 + const g = secs(0.2) + for (let i = 0; i < g && st + i < n; i++) { + const t = i / SR + out[st + i] += Math.sin(2 * Math.PI * f * t) * Math.exp(-t * 28) * amp + } + } + for (let i = 0; i < n; i++) out[i] *= Math.exp((-i / SR) * 2.4) * 0.16 + return out +} + +// ---------- voice ---------- +/** Decode any audio file the browser understands into mono 48 kHz samples. */ +export async function decodeToMono(data: ArrayBuffer): Promise { + const Ctx = window.OfflineAudioContext || (window as unknown as { webkitOfflineAudioContext: typeof OfflineAudioContext }).webkitOfflineAudioContext + const probe = new Ctx(1, 1, SR) + const buf = await probe.decodeAudioData(data.slice(0)) + const off = new Ctx(1, Math.ceil(buf.duration * SR) + 1, SR) + const src = off.createBufferSource() + src.buffer = buf + src.connect(off.destination) + src.start() + const out = await off.startRendering() + return out.getChannelData(0).slice() +} + +/** Trim leading/trailing silence, fade edges, normalise. */ +export function cleanVoice(x: Float32Array): Float32Array { + const win = 480 + const env = new Float32Array(x.length) + let acc = 0 + for (let i = 0; i < x.length; i++) { + acc += Math.abs(x[i]) + if (i >= win) acc -= Math.abs(x[i - win]) + env[i] = acc / win + } + let peakEnv = 0 + for (const v of env) peakEnv = Math.max(peakEnv, v) + const thr = Math.max(0.004, peakEnv * 0.06) + let a = 0 + let b = x.length - 1 + while (a < x.length && env[a] < thr) a++ + while (b > a && env[b] < thr) b-- + a = Math.max(0, a - 720 - win) + b = Math.min(x.length, b + 2400) + const y = x.slice(a, b) + const f = Math.min(480, Math.floor(y.length / 4)) + for (let i = 0; i < f; i++) { + y[i] *= i / f + y[y.length - 1 - i] *= i / f + } + return normalize(y, 0.92) +} + +/** Slow a clip down by resampling (pitch drops slightly, like a tape slowed down). */ +export function slowDown(x: Float32Array, rate: number): Float32Array { + const n = Math.floor(x.length / rate) + const out = new Float32Array(n) + for (let i = 0; i < n; i++) { + const p = i * rate + const k = Math.floor(p) + const fr = p - k + out[i] = (x[k] ?? 0) * (1 - fr) + (x[k + 1] ?? 0) * fr + } + return out +} + +export function envelope(clip: Float32Array, fps: number): Float32Array { + const hop = Math.floor(SR / fps) + const n = Math.floor(clip.length / hop) + 1 + const e = new Float32Array(n) + let m = 1e-9 + for (let i = 0; i < n; i++) { + let s = 0 + let c = 0 + for (let k = i * hop; k < Math.min(clip.length, (i + 1) * hop); k++) { + s += clip[k] * clip[k] + c++ + } + e[i] = c ? Math.sqrt(s / c) : 0 + m = Math.max(m, e[i]) + } + return e.map((v) => Math.min(1, v / m)) +} + +export class Mixer { + L: Float32Array + R: Float32Array + constructor(public dur: number) { + this.L = new Float32Array(secs(dur)) + this.R = new Float32Array(secs(dur)) + } + add(clip: Float32Array, at: number, gain = 1, pan = 0) { + const s = Math.round(at * SR) + const l = Math.cos(((pan + 1) * Math.PI) / 4) * Math.SQRT2 * gain + const r = Math.sin(((pan + 1) * Math.PI) / 4) * Math.SQRT2 * gain + for (let i = 0; i < clip.length; i++) { + const p = s + i + if (p < 0) continue + if (p >= this.L.length) break + this.L[p] += clip[i] * l + this.R[p] += clip[i] * r + } + } + finish() { + const k = Math.tanh(1.1) + const n = this.L.length + const fade = secs(0.06) + for (let i = 0; i < n; i++) { + let g = 1 + if (i < 240) g = i / 240 + if (i > n - fade) g = (n - i) / fade + this.L[i] = (Math.tanh(this.L[i] * 1.1) / k) * g + this.R[i] = (Math.tanh(this.R[i] * 1.1) / k) * g + } + return this + } + wav(): Uint8Array { + const n = this.L.length + const buf = new ArrayBuffer(44 + n * 4) + const v = new DataView(buf) + const w = (o: number, s: string) => [...s].forEach((c, i) => v.setUint8(o + i, c.charCodeAt(0))) + w(0, 'RIFF'); v.setUint32(4, 36 + n * 4, true); w(8, 'WAVE'); w(12, 'fmt ') + v.setUint32(16, 16, true); v.setUint16(20, 1, true); v.setUint16(22, 2, true); v.setUint32(24, SR, true) + v.setUint32(28, SR * 4, true); v.setUint16(32, 4, true); v.setUint16(34, 16, true); w(36, 'data'); v.setUint32(40, n * 4, true) + let o = 44 + for (let i = 0; i < n; i++) { + v.setInt16(o, Math.max(-1, Math.min(1, this.L[i])) * 32767, true) + v.setInt16(o + 2, Math.max(-1, Math.min(1, this.R[i])) * 32767, true) + o += 4 + } + return new Uint8Array(buf) + } + toAudioBuffer(ctx: BaseAudioContext): AudioBuffer { + const b = ctx.createBuffer(2, this.L.length, SR) + b.copyToChannel(this.L as Float32Array, 0) + b.copyToChannel(this.R as Float32Array, 1) + return b + } +} diff --git a/source/frontend/src/lib/live/encode.ts b/source/frontend/src/lib/live/encode.ts new file mode 100644 index 0000000000000000000000000000000000000000..108f1c1b5aaf98f9145e9701acc41f883f353093 --- /dev/null +++ b/source/frontend/src/lib/live/encode.ts @@ -0,0 +1,140 @@ +// Encode the rendered animation into an Apple Live Photo pair (JPG + MOV with audio), entirely in the browser. +// Video: WebCodecs H.264 when available (fast, hardware), otherwise libx264 in ffmpeg.wasm. +// Audio: AAC via ffmpeg.wasm. Container: QuickTime, then Live Photo metadata is written by livephoto.ts. +import { FFmpeg } from '@ffmpeg/ffmpeg' +import { CardRenderer, FPS, H, W } from './renderer' +import { newIdentifier, writeLiveJpeg, writeLiveMov } from './livephoto' + +let ffPromise: Promise | null = null + +export function getFFmpeg(): Promise { + if (ffPromise) return ffPromise + ffPromise = (async () => { + const base = new URL(`${import.meta.env.BASE_URL}ffmpeg/`, window.location.href).href + const ff = new FFmpeg() + await ff.load({ classWorkerURL: `${base}worker.js`, coreURL: `${base}ffmpeg-core.js`, wasmURL: `${base}ffmpeg-core.wasm` }) + return ff + })() + ffPromise.catch(() => { + ffPromise = null + }) + return ffPromise +} + +export interface LiveResult { + id: string + jpg: Uint8Array + mov: Uint8Array + coverURL: string + videoURL: string + duration: number + encoder: 'webcodecs' | 'x264' +} + +type Progress = (stage: string, ratio: number) => void + +async function pickAvcConfig(): Promise { + if (typeof window === 'undefined' || typeof window.VideoEncoder !== 'function') return null + for (const codec of ['avc1.640028', 'avc1.4d0028', 'avc1.42e028', 'avc1.42001f']) { + const cfg: VideoEncoderConfig = { + codec, width: W, height: H, bitrate: 10_000_000, framerate: FPS, latencyMode: 'quality', + avc: { format: 'annexb' } as AvcEncoderConfig, + } + try { + const s = await VideoEncoder.isConfigSupported(cfg) + if (s.supported) return cfg + } catch { + /* try next */ + } + } + return null +} + +function toBlob(c: HTMLCanvasElement, type: string, q?: number): Promise { + return new Promise((res, rej) => c.toBlob((b) => (b ? res(b) : rej(new Error('导出图片失败'))), type, q)) +} + +export async function encodeLive(renderer: CardRenderer, wav: Uint8Array, onProgress: Progress, forceX264 = false): Promise { + const T = renderer.T + const cv = document.createElement('canvas') + cv.width = W + cv.height = H + const ctx = cv.getContext('2d', { alpha: false })! + onProgress('加载编码器', 0) + const ff = await getFFmpeg() + let cover: Blob | null = null + const cfg = forceX264 ? null : await pickAvcConfig() + let encoder: LiveResult['encoder'] = 'x264' + + if (cfg) { + encoder = 'webcodecs' + const chunks: Uint8Array[] = [] + let err: unknown = null + const ve = new VideoEncoder({ + output: (chunk) => { + const b = new Uint8Array(chunk.byteLength) + chunk.copyTo(b) + chunks.push(b) + }, + error: (e) => { + err = e + }, + }) + ve.configure(cfg) + for (let i = 0; i < T.nf; i++) { + renderer.frame(ctx, i) + if (i === T.coverFrame) cover = await toBlob(cv, 'image/jpeg', 0.95) + const vf = new VideoFrame(cv, { timestamp: Math.round((i * 1e6) / FPS), duration: Math.round(1e6 / FPS) }) + ve.encode(vf, { keyFrame: i % 60 === 0 }) + vf.close() + while (ve.encodeQueueSize > 4) await new Promise((r) => setTimeout(r, 4)) + if (err) throw err + if (i % 3 === 0) onProgress('渲染画面', i / T.nf) + } + await ve.flush() + ve.close() + if (err) throw err + const total = chunks.reduce((a, c) => a + c.length, 0) + const h264 = new Uint8Array(total) + let o = 0 + for (const c of chunks) { + h264.set(c, o) + o += c.length + } + await ff.writeFile('v.h264', h264) + } else { + for (let i = 0; i < T.nf; i++) { + renderer.frame(ctx, i) + const jpg = await toBlob(cv, 'image/jpeg', 0.92) + if (i === T.coverFrame) cover = await toBlob(cv, 'image/jpeg', 0.95) + await ff.writeFile(`f${String(i).padStart(4, '0')}.jpg`, new Uint8Array(await jpg.arrayBuffer())) + if (i % 3 === 0) onProgress('渲染画面', (i / T.nf) * 0.5) + } + } + await ff.writeFile('a.wav', wav) + const onFF = ({ progress }: { progress: number }) => onProgress(encoder === 'webcodecs' ? '合成视频' : '编码视频', encoder === 'webcodecs' ? Math.min(1, progress) : 0.5 + 0.5 * Math.min(1, progress)) + ff.on('progress', onFF) + const common = ['-i', 'a.wav', '-map', '0:v:0', '-map', '1:a:0', '-c:a', 'aac', '-b:a', '128k', '-ar', '44100', '-ac', '1', + '-shortest', '-map_metadata', '-1', '-movie_timescale', '60000', '-video_track_timescale', '30000', '-f', 'mov', 'out.mov'] + const args = encoder === 'webcodecs' + ? ['-fflags', '+genpts', '-framerate', String(FPS), '-i', 'v.h264', ...common.slice(0, 6), '-c:v', 'copy', ...common.slice(6)] + : ['-framerate', String(FPS), '-i', 'f%04d.jpg', ...common.slice(0, 6), '-c:v', 'libx264', '-preset', 'veryfast', '-crf', '19', + '-pix_fmt', 'yuv420p', '-profile:v', 'high', ...common.slice(6)] + const code = await ff.exec(args) + ff.off('progress', onFF) + if (code !== 0) throw new Error('视频合成失败') + const raw = (await ff.readFile('out.mov')) as Uint8Array + // clean the virtual FS + for (const f of await ff.listDir('/')) { + if (!f.isDir && /^(f\d{4}\.jpg|v\.h264|a\.wav|out\.mov)$/.test(f.name)) await ff.deleteFile(f.name) + } + onProgress('写入实况标识', 1) + const id = newIdentifier() + const mov = writeLiveMov(raw, id, T.coverFrame / FPS, T.nf / FPS, FPS) + const jpg = writeLiveJpeg(new Uint8Array(await cover!.arrayBuffer()), id, W, H) + return { + id, jpg, mov, duration: T.nf / FPS, encoder, + coverURL: URL.createObjectURL(new Blob([jpg as BlobPart], { type: 'image/jpeg' })), + videoURL: URL.createObjectURL(new Blob([mov as BlobPart], { type: 'video/mp4' })), + } +} diff --git a/source/frontend/src/lib/live/fonts.ts b/source/frontend/src/lib/live/fonts.ts new file mode 100644 index 0000000000000000000000000000000000000000..a8fa68276b51aa098d9f85a7222ee9fb0a9e93dd --- /dev/null +++ b/source/frontend/src/lib/live/fonts.ts @@ -0,0 +1,31 @@ +// Self-hosted fonts (no Google Fonts, works in mainland China). +const base = `${import.meta.env.BASE_URL}fonts/` +const FACES: [string, string, string][] = [ + ['LW SC', 'lw-sc-500.woff2', '500'], + ['LW SC', 'lw-sc-700.woff2', '700'], + ['LW Smiley', 'lw-smiley.woff2', '400'], + ['LW Poppins', 'lw-poppins-800.woff2', '800'], + ['LW Poppins', 'lw-poppins-600.woff2', '600'], + ['LW IPA', 'lw-ipa-500.woff2', '500'], +] + +export const FONT = { + sc: (w: number, px: number) => `${w} ${px}px "LW SC", "PingFang SC", "Microsoft YaHei", sans-serif`, + head: (px: number) => `400 ${px}px "LW Smiley", "LW SC", "PingFang SC", sans-serif`, + word: (px: number) => `800 ${px}px "LW Poppins", "Helvetica Neue", Arial, sans-serif`, + wordSemi: (px: number) => `600 ${px}px "LW Poppins", "Helvetica Neue", Arial, sans-serif`, + ipa: (px: number) => `500 ${px}px "LW IPA", "Lucida Sans Unicode", "Arial Unicode MS", sans-serif`, +} + +let loading: Promise | null = null +export function loadFonts(): Promise { + if (loading) return loading + loading = Promise.all( + FACES.map(async ([family, file, weight]) => { + const f = new FontFace(family, `url(${base}${file})`, { weight, display: 'block' }) + await f.load() + document.fonts.add(f) + }), + ).then(() => undefined) + return loading +} diff --git a/source/frontend/src/lib/live/livephoto.ts b/source/frontend/src/lib/live/livephoto.ts new file mode 100644 index 0000000000000000000000000000000000000000..5f534b8018dc554e80cfda89708b08bffe1b301a --- /dev/null +++ b/source/frontend/src/lib/live/livephoto.ts @@ -0,0 +1,284 @@ +// Apple Live Photo pairing in the browser. +// TypeScript port of LiveCanvas' portable_live_photo (Apache-2.0, © 2026 杨振; modified by LiveCanvas), +// extended to keep an AAC audio track. Writes: +// - JPEG: Exif MakerNote (Apple, tag 17) carrying the shared content identifier +// - MOV : com.apple.quicktime.content.identifier + a `mebx` timed-metadata track +// with com.apple.quicktime.still-image-time positioned at the cover frame. + +const enc = new TextEncoder() +const CONTENT_KEY = enc.encode('com.apple.quicktime.content.identifier') +const STILL_TIME_KEY = enc.encode('com.apple.quicktime.still-image-time') +const TIMED_SAMPLE = new Uint8Array([0, 0, 0, 9, 0, 0, 0, 1, 0]) +const CONTAINERS = new Set(['moov', 'trak', 'mdia', 'minf', 'dinf', 'stbl', 'edts', 'tref', 'gmhd', 'udta', 'ilst']) + +export function newIdentifier(): string { + const c = globalThis.crypto as Crypto & { randomUUID?: () => string } + if (typeof c.randomUUID === 'function') return c.randomUUID().toUpperCase() + const b = new Uint8Array(16) + c.getRandomValues(b) + b[6] = (b[6] & 0x0f) | 0x40 + b[8] = (b[8] & 0x3f) | 0x80 + const h = [...b].map((x) => x.toString(16).padStart(2, '0')).join('') + return `${h.slice(0, 8)}-${h.slice(8, 12)}-${h.slice(12, 16)}-${h.slice(16, 20)}-${h.slice(20)}`.toUpperCase() +} + +// ---------- byte helpers ---------- +function concat(parts: Uint8Array[]): Uint8Array { + const n = parts.reduce((a, p) => a + p.length, 0) + const out = new Uint8Array(n) + let o = 0 + for (const p of parts) { + out.set(p, o) + o += p.length + } + return out +} +const u8 = (...v: number[]) => new Uint8Array(v) +function be16(v: number) { + return u8((v >>> 8) & 255, v & 255) +} +function be32(v: number) { + return u8((v >>> 24) & 255, (v >>> 16) & 255, (v >>> 8) & 255, v & 255) +} +function bei32(v: number) { + return be32(v >>> 0) +} +function rd32(d: Uint8Array, p: number) { + return ((d[p] << 24) >>> 0) + (d[p + 1] << 16) + (d[p + 2] << 8) + d[p + 3] +} +function rd64(d: Uint8Array, p: number) { + return rd32(d, p) * 2 ** 32 + rd32(d, p + 4) +} +function wr32(d: Uint8Array, p: number, v: number) { + d[p] = (v >>> 24) & 255 + d[p + 1] = (v >>> 16) & 255 + d[p + 2] = (v >>> 8) & 255 + d[p + 3] = v & 255 +} +function wr64(d: Uint8Array, p: number, v: number) { + wr32(d, p, Math.floor(v / 2 ** 32)) + wr32(d, p + 4, v % 2 ** 32) +} +function str4(d: Uint8Array, p: number) { + return String.fromCharCode(d[p], d[p + 1], d[p + 2], d[p + 3]) +} +function ascii(s: string) { + return enc.encode(s) +} + +// ---------- ISO-BMFF ---------- +interface Atom { + start: number + size: number + type: string + header: number +} +const end = (a: Atom) => a.start + a.size +const payload = (a: Atom) => a.start + a.header + +function atom(kind: string, body: Uint8Array): Uint8Array { + return concat([be32(body.length + 8), ascii(kind), body]) +} + +function parseAtoms(d: Uint8Array, start = 0, stop = d.length): Atom[] { + const out: Atom[] = [] + let p = start + while (p < stop) { + if (p + 8 > stop) throw new Error('MOV atom 头部不完整') + let size = rd32(d, p) + const type = str4(d, p + 4) + let header = 8 + if (size === 1) { + size = rd64(d, p + 8) + header = 16 + } else if (size === 0) size = stop - p + if (size < header || p + size > stop) throw new Error(`MOV atom ${type} 越界`) + out.push({ start: p, size, type, header }) + p += size + } + return out +} +const children = (d: Uint8Array, a: Atom) => parseAtoms(d, payload(a), end(a)) +const firstChild = (d: Uint8Array, a: Atom, t: string) => children(d, a).find((c) => c.type === t) + +function patchChunkOffsets(moov: Uint8Array, delta: number) { + const top = parseAtoms(moov)[0] + const visit = (parent: Atom) => { + for (const it of children(moov, parent)) { + if (it.type === 'stco' || it.type === 'co64') { + const countAt = payload(it) + 4 + const count = rd32(moov, countAt) + const w = it.type === 'stco' ? 4 : 8 + for (let i = 0; i < count; i++) { + const p = countAt + 4 + i * w + if (w === 4) wr32(moov, p, rd32(moov, p) + delta) + else wr64(moov, p, rd64(moov, p) + delta) + } + } else if (CONTAINERS.has(it.type)) visit(it) + } + } + visit(top) +} + +const fullbox = (version = 0, flags = 0) => u8(version, (flags >>> 16) & 255, (flags >>> 8) & 255, flags & 255) + +function contentIdentifierMeta(id: string) { + const ident = ascii(id) + const hdlr = atom('hdlr', concat([fullbox(), new Uint8Array(4), ascii('mdta'), new Uint8Array(12), u8(0, 0)])) + const keyEntry = concat([be32(8 + CONTENT_KEY.length), ascii('mdta'), CONTENT_KEY]) + const keys = atom('keys', concat([fullbox(), be32(1), keyEntry])) + const data = atom('data', concat([be32(1), be32(0), ident])) + const item = atom('\x00\x00\x00\x01', data) + return atom('meta', concat([hdlr, keys, atom('ilst', item)])) +} + +function pascal(s: string) { + const b = ascii(s) + return concat([u8(b.length), b]) +} + +function timedMetadataTrack(trackId: number, videoTrackId: number, timescale: number, coverTicks: number, sampleOffset: number, sampleTicks: number) { + const trackDuration = coverTicks + sampleTicks + const matrix = concat([0x00010000, 0, 0, 0, 0x00010000, 0, 0, 0, 0x40000000].map(be32)) + const tkhd = atom('tkhd', concat([fullbox(0, 0x0f), be32(0), be32(0), be32(trackId), be32(0), be32(trackDuration), new Uint8Array(8), + new Uint8Array(8), matrix, be32(0), be32(0)])) + const edits: Uint8Array[] = [] + if (coverTicks) edits.push(concat([be32(coverTicks), bei32(-1), be16(1), be16(0)])) + edits.push(concat([be32(sampleTicks), be32(0), be16(1), be16(0)])) + const elst = atom('elst', concat([fullbox(), be32(edits.length), ...edits])) + const edts = atom('edts', elst) + const tref = atom('tref', atom('cdsc', be32(videoTrackId))) + const mdhd = atom('mdhd', concat([fullbox(), be32(0), be32(0), be32(timescale), be32(sampleTicks), be16(0x55c4), be16(0)])) + const hdlr = atom('hdlr', concat([fullbox(), ascii('mhlrmetaappl'), be32(1), be32(0), pascal('Core Media Metadata')])) + const gmin = atom('gmin', concat([fullbox(), be16(0x0040), be16(0x8000), be16(0x8000), be16(0x8000), be16(0), be16(0)])) + const gmhd = atom('gmhd', gmin) + const dataHdlr = atom('hdlr', concat([fullbox(), ascii('dhlralisappl'), be32(0), be32(0), pascal('Core Media Data Handler')])) + const alias = atom('alis', fullbox(0, 1)) + const dref = atom('dref', concat([fullbox(), be32(1), alias])) + const dinf = atom('dinf', dref) + const keyd = atom('keyd', concat([ascii('mdta'), STILL_TIME_KEY])) + const dtyp = atom('dtyp', concat([fullbox(), be32(0x41)])) + const keyRecord = concat([be32(8 + keyd.length + dtyp.length), be32(1), keyd, dtyp]) + const keys = atom('keys', keyRecord) + const mebx = atom('mebx', concat([new Uint8Array(6), be16(1), keys])) + const stsd = atom('stsd', concat([fullbox(), be32(1), mebx])) + const stts = atom('stts', concat([fullbox(), be32(1), be32(1), be32(sampleTicks)])) + const stsc = atom('stsc', concat([fullbox(), be32(1), be32(1), be32(1), be32(1)])) + const stsz = atom('stsz', concat([fullbox(), be32(0), be32(1), be32(TIMED_SAMPLE.length)])) + const stco = atom('stco', concat([fullbox(), be32(1), be32(sampleOffset)])) + const stbl = atom('stbl', concat([stsd, stts, stsc, stsz, stco])) + const minf = atom('minf', concat([gmhd, dataHdlr, dinf, stbl])) + const mdia = atom('mdia', concat([mdhd, hdlr, minf])) + return atom('trak', concat([tkhd, edts, tref, mdia])) +} + +function movieTimescale(d: Uint8Array, moov: Atom) { + const mvhd = firstChild(d, moov, 'mvhd') + if (!mvhd) throw new Error('MOV 缺少 mvhd') + const v = d[payload(mvhd)] + return rd32(d, mvhd.start + (v === 1 ? 28 : 20)) +} +function trackId(d: Uint8Array, trak: Atom) { + const tkhd = firstChild(d, trak, 'tkhd')! + const v = d[payload(tkhd)] + return rd32(d, tkhd.start + (v === 1 ? 28 : 20)) +} +function handler(d: Uint8Array, trak: Atom) { + const mdia = firstChild(d, trak, 'mdia') + const hdlr = mdia && firstChild(d, mdia, 'hdlr') + return hdlr ? str4(d, hdlr.start + 16) : '' +} + +/** Add Live Photo metadata to a non-fragmented, single-mdat QuickTime file (e.g. FFmpeg `-f mov` output). */ +export function writeLiveMov(src: Uint8Array, id: string, stillTime: number, duration: number, fps: number): Uint8Array { + const top = parseAtoms(src) + const mdats = top.filter((a) => a.type === 'mdat') + const moov = top.find((a) => a.type === 'moov') + if (mdats.length !== 1 || !moov || top.some((a) => a.type === 'moof')) throw new Error('需要单一 mdat 的 MOV') + const mdat = mdats[0] + const timescale = movieTimescale(src, moov) + const tracks = children(src, moov).filter((a) => a.type === 'trak') + const ids = tracks.map((t) => trackId(src, t)) + const video = tracks.find((t) => handler(src, t) === 'vide') + if (!video) throw new Error('MOV 中没有视频轨') + const videoTrackId = trackId(src, video) + const metaTrackId = Math.max(0, ...ids) + 1 + const maxTick = Math.max(0, Math.round(duration * timescale) - 1) + const coverTicks = Math.min(Math.max(0, Math.round(stillTime * timescale)), maxTick) + + const prefix = concat(top.filter((a) => a.type !== 'mdat' && a.type !== 'moov').map((a) => src.subarray(a.start, end(a)))) + const oldMedia = src.subarray(payload(mdat), end(mdat)) + const newMdat = atom('mdat', concat([oldMedia, TIMED_SAMPLE])) + const newMediaStart = prefix.length + 8 + const delta = newMediaStart - payload(mdat) + const sampleOffset = newMediaStart + oldMedia.length + + const moovBytes = src.slice(moov.start, end(moov)) + patchChunkOffsets(moovBytes, delta) + const pm = parseAtoms(moovBytes)[0] + const mvhd = firstChild(moovBytes, pm, 'mvhd')! + wr32(moovBytes, end(mvhd) - 4, metaTrackId + 1) + const originalChildren = moovBytes.subarray(payload(pm), end(pm)) + const additions = concat([ + contentIdentifierMeta(id), + timedMetadataTrack(metaTrackId, videoTrackId, timescale, coverTicks, sampleOffset, Math.max(1, Math.round(timescale / fps))), + ]) + const newMoov = atom('moov', concat([originalChildren, additions])) + return concat([prefix, newMdat, newMoov]) +} + +// ---------- JPEG ---------- +function appleMakerNote(id: string) { + const ident = ascii(id) + return concat([ascii('Apple iOS'), u8(0, 0, 1), ascii('MM'), be16(1), be16(0x11), be16(2), be32(ident.length + 1), be32(32), be32(0), ident, u8(0)]) +} + +/** Insert an Exif APP1 segment with the Apple MakerNote identifier into a baseline JPEG (e.g. canvas.toBlob output). */ +export function writeLiveJpeg(jpeg: Uint8Array, id: string, width: number, height: number): Uint8Array { + if (jpeg[0] !== 0xff || jpeg[1] !== 0xd8) throw new Error('不是 JPEG') + const note = appleMakerNote(id) + const make = ascii('Apple\0') + const model = ascii('LiveWords\0') + // TIFF (big endian). Layout: header(8) | IFD0 (3 entries) | ExifIFD (6 entries) | data + const ifd0Off = 8 + const ifd0Size = 2 + 3 * 12 + 4 + const exifOff = ifd0Off + ifd0Size + const exifSize = 2 + 6 * 12 + 4 + let dataOff = exifOff + exifSize + const makeOff = dataOff + dataOff += make.length + const modelOff = dataOff + dataOff += model.length + if (dataOff % 2) dataOff++ + const noteOff = dataOff + const entry = (tag: number, type: number, count: number, value: Uint8Array) => concat([be16(tag), be16(type), be32(count), value]) + const inline4 = (b: Uint8Array) => { + const o = new Uint8Array(4) + o.set(b) + return o + } + const tiff = concat([ + ascii('MM'), be16(42), be32(ifd0Off), + be16(3), + entry(0x010f, 2, make.length, be32(makeOff)), + entry(0x0110, 2, model.length, be32(modelOff)), + entry(0x8769, 4, 1, be32(exifOff)), + be32(0), + be16(6), + entry(0x9000, 7, 4, ascii('0232')), + entry(0x927c, 7, note.length, be32(noteOff)), + entry(0xa000, 7, 4, ascii('0100')), + entry(0xa001, 3, 1, inline4(be16(1))), + entry(0xa002, 4, 1, be32(width)), + entry(0xa003, 4, 1, be32(height)), + be32(0), + make, model, (makeOff + make.length + model.length) % 2 ? u8(0) : new Uint8Array(0), + note, + ]) + const body = concat([ascii('Exif'), u8(0, 0), tiff]) + const app1 = concat([u8(0xff, 0xe1), be16(body.length + 2), body]) + // drop an existing APP0 (JFIF) so Exif is the first segment, as cameras write it + let p = 2 + if (jpeg[2] === 0xff && jpeg[3] === 0xe0) p = 4 + ((jpeg[4] << 8) | jpeg[5]) + return concat([u8(0xff, 0xd8), app1, jpeg.subarray(p)]) +} diff --git a/source/frontend/src/lib/live/lookup.ts b/source/frontend/src/lib/live/lookup.ts new file mode 100644 index 0000000000000000000000000000000000000000..aae8081439241ca8052656c2eaff85f32f844bde --- /dev/null +++ b/source/frontend/src/lib/live/lookup.ts @@ -0,0 +1,140 @@ +// Word lookup without AI: IPA + part of speech from Wiktionary, human pronunciation recordings from Wikimedia Commons. + +export interface WordInfo { + ipa: string + pos: string +} + +export interface Recording { + title: string + label: string + url: string + page: string +} + +const POS_MAP: [RegExp, string][] = [ + [/^Noun$/i, 'n.'], [/^Verb$/i, 'v.'], [/^Adjective$/i, 'adj.'], [/^Adverb$/i, 'adv.'], + [/^(Phrase|Idiom|Proverb)$/i, 'phr.'], [/^Interjection$/i, 'int.'], [/^Preposition$/i, 'prep.'], [/^Pronoun$/i, 'pron.'], +] + +/** Make Wiktionary's narrow IPA look like the learner-dictionary style most readers expect. */ +export function simplifyIpa(s: string) { + return s + .replace(/ɹ/g, 'r').replace(/ɚ/g, 'ər').replace(/ɝ/g, 'ɜːr').replace(/ɫ/g, 'l').replace(/ɾ/g, 't') + .replace(/ɛ/g, 'e').replace(/ɐ/g, 'ʌ').replace(/[()]/g, '').replace(/\.(?=\S)/g, '') +} + +export async function lookupWord(word: string): Promise { + const w = word.trim() + const url = `https://en.wiktionary.org/w/api.php?action=parse&format=json&origin=*&redirects=1&prop=wikitext&page=${encodeURIComponent(w)}` + const r = await fetch(url) + if (!r.ok) throw new Error('词典查询失败') + const j = await r.json() + const text: string = j?.parse?.wikitext?.['*'] ?? '' + if (!text) throw new Error('词典里没有这个词') + const m = text.match(/==English==([\s\S]*?)(\n==[^=][^\n]*==\s*\n|$)/) + const en = m ? m[1] : text + // IPA: prefer lines marked US / GA + const lines = en.split('\n').filter((l) => l.includes('{{IPA|en|')) + const pick = + lines.find((l) => /(a=|\{\{a\|)[^}]*\b(GA|GenAm)\b/.test(l)) ?? + lines.find((l) => /\bUS\b/.test(l) && !/Southern US/.test(l)) ?? + lines[0] ?? + '' + const ipaM = pick.match(/\{\{IPA\|en\|([^}]*)\}\}/) + let ipa = '' + if (ipaM) { + const first = ipaM[1].split('|').find((p) => /^[/[]/.test(p.trim())) + if (first) ipa = simplifyIpa(first.trim().replace(/^\[/, '/').replace(/\]$/, '/')) + } + let pos = '' + for (const h of en.matchAll(/\n===+\s*([^=\n]+?)\s*===+/g)) { + const hit = POS_MAP.find(([re]) => re.test(h[1])) + if (hit) { + pos = hit[1] + break + } + } + // phrases ("traffic light") often have no IPA of their own: build it from the single words + if (!ipa && /\s/.test(w)) { + const parts: string[] = [] + for (const token of w.split(/\s+/)) { + try { + const sub = await lookupWord(token) + if (!sub.ipa) return { ipa: '', pos } + parts.push(sub.ipa.replace(/^\/|\/$/g, '')) + } catch { + return { ipa: '', pos } + } + } + ipa = `/${parts.join(' ')}/` + } + return { ipa, pos } +} + +const COMMONS = 'https://commons.wikimedia.org/w/api.php' +async function commons(params: Record) { + const q = new URLSearchParams({ format: 'json', origin: '*', ...params }) + const r = await fetch(`${COMMONS}?${q}`) + if (!r.ok) throw new Error('维基共享资源暂时无法访问') + return r.json() +} + +function labelFor(title: string) { + const t = title.replace(/^File:/, '') + let m = t.match(/^En-(us|uk|au|ca|nz|ie)-/i) + if (m) return ({ us: '美式', uk: '英式', au: '澳式', ca: '加拿大', nz: '新西兰', ie: '爱尔兰' } as Record)[m[1].toLowerCase()] + ' · Commons' + m = t.match(/^LL-Q1860 \(eng\)-([^-]+)-/) + if (m) return `LinguaLibre · ${m[1]}` + return t +} + +/** Find human pronunciation recordings of an English word on Wikimedia Commons. */ +export async function findRecordings(word: string): Promise { + const w = word.trim() + const lower = w.toLowerCase() + const titles = new Set() + for (const v of [w, lower, lower.replace(/ /g, '_')]) { + for (const acc of ['us', 'uk', 'au']) titles.add(`File:En-${acc}-${v}.ogg`) + } + const exact = await commons({ action: 'query', titles: [...titles].join('|') }) + const found: string[] = Object.values(exact?.query?.pages ?? {}) + .filter((p) => !('missing' in (p as object))) + .map((p) => (p as { title: string }).title) + try { + const s = await commons({ action: 'query', list: 'search', srnamespace: '6', srlimit: '12', srsearch: `intitle:"${w}" intitle:LL-Q1860` }) + for (const hit of s?.query?.search ?? []) { + const t: string = hit.title + if (t.toLowerCase().endsWith(`-${lower}.wav`) && t.includes('(eng)')) found.push(t) + } + } catch { + /* search is optional */ + } + const uniq = [...new Set(found)].slice(0, 8) + if (!uniq.length) return [] + const info = await commons({ action: 'query', titles: uniq.join('|'), prop: 'imageinfo', iiprop: 'url' }) + const out: Recording[] = [] + for (const p of Object.values(info?.query?.pages ?? {}) as { title: string; imageinfo?: { url: string; descriptionurl: string }[] }[]) { + const ii = p.imageinfo?.[0] + if (!ii) continue + let url = ii.url.split('?')[0] + if (/\.(ogg|oga|opus)$/i.test(url)) { + const name = url.split('/').pop()! + url = url.replace('/wikipedia/commons/', '/wikipedia/commons/transcoded/') + `/${name}.mp3` + } + out.push({ title: p.title, label: labelFor(p.title), url, page: ii.descriptionurl }) + } + out.sort((a, b) => (a.label.startsWith('美式') ? -1 : 0) - (b.label.startsWith('美式') ? -1 : 0)) + return out +} + +/** Fetch audio bytes; for Commons .ogg transcodes fall back to the original file if the mp3 is missing. */ +export async function fetchAudio(url: string): Promise { + let r = await fetch(url) + if (!r.ok && url.includes('/transcoded/')) { + const orig = url.replace('/transcoded/', '/').replace(/\/[^/]+\.mp3$/, '') + r = await fetch(orig) + } + if (!r.ok) throw new Error('音频下载失败') + return r.arrayBuffer() +} diff --git a/source/frontend/src/lib/live/project.ts b/source/frontend/src/lib/live/project.ts new file mode 100644 index 0000000000000000000000000000000000000000..5974efc450ee315b736ef9d153e9740da548a13e --- /dev/null +++ b/source/frontend/src/lib/live/project.ts @@ -0,0 +1,82 @@ +import { Mixer, SR, chime, envelope, pop, shimmer, slowDown, tick, whoosh } from './audio' +import { CardRenderer, FPS, MAX_COMPACT, makeTimeline, type CardSpec, type Timeline } from './renderer' + +export interface SfxSettings { + whoosh: boolean + tick: boolean + chime: boolean + shimmer: boolean + pop: boolean + volume: number // 0..1.5 +} + +export interface VoiceSettings { + clip: Float32Array | null + second: 'slow' | 'same' | 'none' + volume: number +} + +export interface Built { + T: Timeline + renderer: CardRenderer + mixer: Mixer + fitted: 'slow' | 'same' | 'none' // what the second reading became after fitting into 3 s + voiceCut: boolean // the first reading itself runs past the end +} + +let sfxCache: Record | null = null +function sfx() { + if (!sfxCache) sfxCache = { whoosh: whoosh(), chime: chime(), shimmer: shimmer(), pop: pop() } + return sfxCache +} +const ticks: Float32Array[] = [] +const tickAt = (i: number) => (ticks[i] ??= tick(i)) + +export function build(spec: CardSpec, voice: VoiceSettings, fx: SfxSettings): Built { + const v1 = voice.clip + const d1 = v1 ? v1.length / SR : 0.7 + let v2: Float32Array | null = null + let fitted: Built['fitted'] = voice.second + if (v1 && voice.second !== 'none') { + const options: ['slow' | 'same', Float32Array][] = voice.second === 'slow' ? [['slow', slowDown(v1, 0.8)], ['same', v1]] : [['same', v1]] + if (spec.compact) { + const base = makeTimeline(spec, d1, null) + const ok = options.find(([, c]) => base.en1 + d1 + 0.1 + c.length / SR + 0.1 <= MAX_COMPACT) + v2 = ok ? ok[1] : null + fitted = ok ? ok[0] : 'none' + } else v2 = options[0][1] + } + const d2 = v2 ? v2.length / SR : null + const T = makeTimeline(spec, d1, d2) + const mx = new Mixer(T.dur) + const g = fx.volume + const S = sfx() + if (fx.whoosh) mx.add(S.whoosh, T.rev - 0.06, 0.9 * g) + if (fx.tick) { + const n = spec.en.length + let k = 0 + ;[...spec.en].forEach((c, i) => { + if (c === ' ') return + mx.add(tickAt(k), T.type0 + k * T.dt, 0.9 * g, (i / Math.max(n - 1, 1)) * 1.2 - 0.6) + k++ + }) + } + if (fx.chime) mx.add(S.chime, T.done, 0.85 * g) + if (fx.shimmer) mx.add(S.shimmer, T.done + 0.1, g) + if (fx.pop) { + mx.add(S.pop, T.ipa, 0.7 * g) + mx.add(S.pop, T.mean, 0.5 * g) + } + const env = new Float32Array(T.nf + 2) + if (v1) mx.add(v1, T.en1, voice.volume) + if (v2 && T.en2 != null) mx.add(v2, T.en2, voice.volume) + for (const [clip, st] of [[v1, T.en1], [v2, T.en2]] as [Float32Array | null, number | null][]) { + if (!clip || st == null) continue + const e = envelope(clip, FPS) + const s = Math.round(st * FPS) + for (let i = 0; i < e.length && s + i < env.length; i++) env[s + i] = Math.max(env[s + i], e[i]) + } + const sm = env.map((_, i) => 0.25 * (env[i - 1] ?? 0) + 0.5 * env[i] + 0.25 * (env[i + 1] ?? 0)) + mx.finish() + return { T, renderer: new CardRenderer(spec, T, sm), mixer: mx, fitted, voiceCut: !!v1 && T.en1 + d1 > T.dur + 0.02 } +} diff --git a/source/frontend/src/lib/live/renderer.ts b/source/frontend/src/lib/live/renderer.ts new file mode 100644 index 0000000000000000000000000000000000000000..f9ef9df960ce095d16c1d87be80a09671e9e8fda --- /dev/null +++ b/source/frontend/src/lib/live/renderer.ts @@ -0,0 +1,604 @@ +// Frame renderer for the "这个用英语怎么说?" Live Photo card. Pure Canvas 2D, deterministic per frame. +import { FONT } from './fonts' +import { getStyle, type CardStyle } from './styles' + +export const W = 1080 +export const H = 1440 +export const FPS = 30 +const CW = 920 +const PILL_SPACE = 82 + +export interface CardSpec { + image: CanvasImageSource | null + imgW: number + imgH: number + crop: { zoom: number; x: number; y: number } // zoom ≥ 1; x/y = centre of the 3:4 window (0..1) + en: string + zh: string + ipa: string + pos: string + question: string // use {zh} as the highlighted keyword + pillQ: string + pillA: string + showPill: boolean + styleId: string + accent: string + cardY: number // card centre, 0..1 of frame height + motion: boolean + grain: boolean + confetti: boolean + sweep: boolean + hold: number // seconds the question stays before the reveal + compact: boolean // fit everything into 3 s (WeChat Moments only accepts ~3 s Live Photos, like native iPhone ones) +} + +export const MAX_COMPACT = 3.0 + +export interface Timeline { + rev: number + grow: number + type0: number + dt: number + done: number + marker: number + ipa: number + en1: number + mean: number + en2: number | null + sweep: number + end: number + nf: number + dur: number + coverFrame: number +} + +export function makeTimeline(spec: CardSpec, d1: number, d2: number | null): Timeline { + const letters = [...spec.en].filter((c) => c !== ' ').length || 1 + if (spec.compact) { + const rev = clamp(spec.hold, 0.25, 0.6) + const type0 = rev + 0.15 + const dt = clamp(0.4 / letters, 0.035, 0.07) + const done = type0 + (letters - 1) * dt + 0.1 + const en1 = done + 0.1 + const mean = en1 + d1 * 0.5 + const en2 = d2 != null ? en1 + d1 + 0.1 : null + const end = Math.min(MAX_COMPACT, d2 != null ? MAX_COMPACT : Math.max(en1 + d1 + 0.25, mean + 0.6)) + const nf = Math.min(Math.round(MAX_COMPACT * FPS), Math.ceil(end * FPS)) + return { + rev, grow: 0.35, type0, dt, done, marker: done + 0.03, ipa: done + 0.08, en1, mean, en2, sweep: done + 0.25, end, nf, + dur: nf / FPS, coverFrame: Math.max(0, Math.min(6, Math.floor(rev * FPS) - 3)), + } + } + const rev = Math.max(0.3, spec.hold) + const type0 = rev + 0.23 + const dt = clamp(0.55 / letters, 0.05, 0.085) + const done = type0 + (letters - 1) * dt + 0.14 + const en1 = done + 0.24 + const mean = en1 + d1 * 0.55 + const en2 = d2 != null ? en1 + d1 + 0.3 : null + const end = (en2 != null ? en2 + (d2 as number) : Math.max(en1 + d1, mean + 0.5)) + 0.5 + const nf = Math.ceil(end * FPS) + return { + rev, grow: 0.45, type0, dt, done, marker: done + 0.05, ipa: done + 0.18, en1, mean, en2, sweep: done + 0.35, end, nf, + dur: nf / FPS, coverFrame: Math.max(0, Math.min(6, Math.floor(rev * FPS) - 3)), + } +} + +// ---------- math ---------- +function clamp(x: number, a = 0, b = 1) { + return Math.max(a, Math.min(b, x)) +} +const prog = (t: number, t0: number, d: number) => (d > 0 ? clamp((t - t0) / d) : t >= t0 ? 1 : 0) +const easeOutCubic = (x: number) => 1 - (1 - x) ** 3 +const easeInOut = (x: number) => (x < 0.5 ? 4 * x ** 3 : 1 - (-2 * x + 2) ** 3 / 2) +const easeOutBack = (x: number, s = 1.9) => 1 + (s + 1) * (x - 1) ** 3 + s * (x - 1) ** 2 +const lerp = (a: number, b: number, x: number) => a + (b - a) * x + +function rrect(ctx: CanvasRenderingContext2D, x: number, y: number, w: number, h: number, r: number) { + r = Math.max(0, Math.min(r, w / 2, h / 2)) + ctx.beginPath() + ctx.moveTo(x + r, y) + ctx.arcTo(x + w, y, x + w, y + h, r) + ctx.arcTo(x + w, y + h, x, y + h, r) + ctx.arcTo(x, y + h, x, y, r) + ctx.arcTo(x, y, x + w, y, r) + ctx.closePath() +} + +function seeded(seed: number) { + let s = seed >>> 0 + return () => { + s = (s * 1664525 + 1013904223) >>> 0 + return s / 4294967296 + } +} + +const CONFETTI = ['#ff3b5c', '#ffd63d', '#3ddc97', '#4d96ff', '#ff8a3d', '#b57cff'] + +interface Particle { + x: number; y: number; vx: number; vy: number; rot: number; vr: number; kind: number; col: string; sz: number; delay: number +} + +function canvas(w: number, h: number) { + const c = document.createElement('canvas') + c.width = w + c.height = h + return c +} + +export class CardRenderer { + st: CardStyle + T: Timeline + env: Float32Array + wsize = 124 + hsize = 84 + wordX0 = 0 + wordW = 0 + finalCx: number[] = [] + qParts: { text: string; key: boolean }[] = [] + po: number + CHQ: number + CHA: number + particles: Particle[] + grain: HTMLCanvasElement[] = [] + tmpA = canvas(8, 8) + tmpB = canvas(8, 8) + filterOK: boolean + + constructor(public spec: CardSpec, T: Timeline, env: Float32Array) { + this.st = getStyle(spec.styleId) + this.T = T + this.env = env + this.po = spec.showPill ? 0 : PILL_SPACE + this.CHQ = 252 - this.po + this.CHA = (spec.ipa || spec.zh || spec.pos ? 452 : 290) - this.po + const m = canvas(4, 4).getContext('2d')! + this.filterOK = typeof (m as CanvasRenderingContext2D & { filter?: string }).filter === 'string' + // word layout + let size = 124 + m.font = FONT.word(size) + while (m.measureText(spec.en).width > CW - 120 && size > 40) { + size -= 2 + m.font = FONT.word(size) + } + this.wsize = size + this.wordW = m.measureText(spec.en).width + this.wordX0 = (CW - this.wordW) / 2 + this.finalCx = [...spec.en].map((c, i) => this.wordX0 + m.measureText(spec.en.slice(0, i)).width + m.measureText(c).width / 2) + // question layout + const q = spec.question || '「{zh}」用英语怎么说?' + const idx = q.indexOf('{zh}') + this.qParts = idx < 0 ? [{ text: q, key: false }] : [ + { text: q.slice(0, idx), key: false }, { text: spec.zh, key: true }, { text: q.slice(idx + 4), key: false }, + ].filter((p) => p.text) + // brackets around the keyword read as part of it + for (let i = 0; i < this.qParts.length; i++) { + const p = this.qParts[i] + if (p.key && i > 0 && this.qParts[i - 1].text.endsWith('「')) { + this.qParts[i - 1].text = this.qParts[i - 1].text.slice(0, -1) + p.text = '「' + p.text + } + if (p.key && i + 1 < this.qParts.length && this.qParts[i + 1].text.startsWith('」')) { + this.qParts[i + 1].text = this.qParts[i + 1].text.slice(1) + p.text = p.text + '」' + } + } + this.qParts = this.qParts.filter((p) => p.text) + let hs = 84 + m.font = FONT.head(hs) + while (m.measureText(this.qParts.map((p) => p.text).join('')).width > CW - 110 && hs > 36) { + hs -= 2 + m.font = FONT.head(hs) + } + this.hsize = hs + // particles + const r = seeded(spec.en.length * 977 + 13) + this.particles = Array.from({ length: 46 }, (_, k) => { + const ang = -Math.PI * (0.05 + r() * 0.9) + const sp = 650 + r() * 850 + return { + x: (r() - 0.5) * 520, y: (r() - 0.5) * 60, vx: Math.cos(ang) * sp * 0.9, vy: Math.sin(ang) * sp, + rot: r() * 360, vr: (r() - 0.5) * 1440, kind: Math.floor(r() * 3), col: CONFETTI[k % CONFETTI.length], sz: 9 + r() * 8, delay: r() * 0.08, + } + }) + if (spec.grain) { + const gr = seeded(7) + for (let g = 0; g < 3; g++) { + const c = canvas(540, 720) + const x = c.getContext('2d')! + const id = x.createImageData(540, 720) + for (let i = 0; i < id.data.length; i += 4) { + const v = 128 + (gr() + gr() + gr() - 1.5) * 34 + id.data[i] = id.data[i + 1] = id.data[i + 2] = v + id.data[i + 3] = 255 + } + x.putImageData(id, 0, 0) + this.grain.push(c) + } + } + } + + cardH(t: number) { + return lerp(this.CHQ, this.CHA, easeInOut(prog(t, this.T.rev, this.T.grow))) + } + + // ----- photo with handheld drift ----- + drawPhoto(ctx: CanvasRenderingContext2D, t: number) { + const s = this.spec + ctx.fillStyle = '#1a1a1f' + ctx.fillRect(0, 0, W, H) + if (!s.image || !s.imgW) return + const { imgW, imgH } = s + let bw = Math.min(imgW, (imgH * 3) / 4) + let bh = (bw * 4) / 3 + bw /= s.crop.zoom + bh /= s.crop.zoom + let cx = clamp(s.crop.x) * imgW + let cy = clamp(s.crop.y) * imgH + let vw = bw + let vh = bh + if (s.motion) { + const z = 1.02 * (1 + 0.05 * easeInOut(clamp(t / Math.max(this.T.dur, 0.1)))) + vw = bw / z + vh = bh / z + const k = bw / W + cx += (5 * Math.sin(2 * Math.PI * 0.31 * t) + 2.2 * Math.sin(2 * Math.PI * 0.87 * t + 1.1)) * k + cy += (4 * Math.sin(2 * Math.PI * 0.23 * t + 0.4) - 4 * Math.sin(0.4) + 1.8 * Math.sin(2 * Math.PI * 0.71 * t)) * k + } + cx = clamp(cx, vw / 2, imgW - vw / 2) + cy = clamp(cy, vh / 2, imgH - vh / 2) + ctx.imageSmoothingEnabled = true + ctx.imageSmoothingQuality = 'high' + ctx.drawImage(s.image, cx - vw / 2, cy - vh / 2, vw, vh, 0, 0, W, H) + } + + // ----- frosted glass: blur the photo region under the card ----- + blurRegion(src: HTMLCanvasElement, x: number, y: number, w: number, h: number) { + x = Math.max(0, Math.floor(x)); y = Math.max(0, Math.floor(y)) + w = Math.min(W - x, Math.ceil(w)); h = Math.min(H - y, Math.ceil(h)) + if (this.filterOK) { + const sw = Math.max(1, Math.round(w / 3)), sh = Math.max(1, Math.round(h / 3)) + this.tmpA.width = sw; this.tmpA.height = sh + const a = this.tmpA.getContext('2d')! + a.filter = 'blur(8px)' + a.drawImage(src, x - 30, y - 30, w + 60, h + 60, -10, -10, sw + 20, sh + 20) + return { c: this.tmpA, x, y, w, h } + } + const sw = Math.max(1, Math.round(w / 12)), sh = Math.max(1, Math.round(h / 12)) + this.tmpA.width = sw; this.tmpA.height = sh + const a = this.tmpA.getContext('2d')! + a.imageSmoothingQuality = 'high' + a.drawImage(src, x, y, w, h, 0, 0, sw, sh) + const mw = sw * 3, mh = sh * 3 + this.tmpB.width = mw; this.tmpB.height = mh + const b = this.tmpB.getContext('2d')! + b.imageSmoothingQuality = 'high' + b.drawImage(this.tmpA, 0, 0, mw, mh) + return { c: this.tmpB, x, y, w, h } + } + + frame(ctx: CanvasRenderingContext2D, fidx: number) { + const t = fidx / FPS + const T = this.T + const st = this.st + this.drawPhoto(ctx, t) + const bump0 = Math.sin(Math.PI * prog(t, T.rev, 0.32)) * 0.02 + Math.sin(Math.PI * prog(t, T.done, 0.3)) * 0.024 + const ccy0 = clamp(this.spec.cardY, 0.12, 0.88) * H + // sample the photo for the frosted glass before anything is drawn over it + const region = st.card === 'glass' + ? this.blurRegion(ctx.canvas, W / 2 - (CW * (1 + bump0) + 80) / 2, ccy0 - (this.cardH(t) * (1 + bump0) + 80) / 2, CW * (1 + bump0) + 80, this.cardH(t) * (1 + bump0) + 80) + : null + const bump = Math.sin(Math.PI * prog(t, T.rev, 0.32)) * 0.02 + Math.sin(Math.PI * prog(t, T.done, 0.3)) * 0.024 + const sc = 1 + bump + const CH = this.cardH(t) + const ccx = W / 2 + const ccy = clamp(this.spec.cardY, 0.12, 0.88) * H + const rot = (st.rotate * Math.PI) / 180 + const setCard = () => { + ctx.setTransform(1, 0, 0, 1, 0, 0) + ctx.translate(ccx, ccy) + ctx.rotate(rot) + ctx.scale(sc, sc) + ctx.translate(-CW / 2, -CH / 2) + } + // shadow + ctx.save() + setCard() + ctx.shadowColor = `rgba(10,10,20,${st.shadow})` + ctx.shadowBlur = 68 + ctx.shadowOffsetY = 22 / sc + rrect(ctx, 0, 0, CW, CH, st.radius) + ctx.fillStyle = st.card === 'solid' ? st.fill : 'rgba(128,128,128,1)' + ctx.fill() + ctx.restore() + // glass / solid body + ctx.save() + setCard() + rrect(ctx, 0, 0, CW, CH, st.radius) + ctx.clip() + if (region) { + ctx.setTransform(1, 0, 0, 1, 0, 0) + ctx.imageSmoothingQuality = 'high' + ctx.drawImage(region.c, region.x, region.y, region.w, region.h) + setCard() + ctx.fillStyle = st.fill + ctx.fillRect(-4, -4, CW + 8, CH + 8) + } else { + ctx.fillStyle = st.fill + ctx.fillRect(-4, -4, CW + 8, CH + 8) + } + this.content(ctx, t, fidx, CH) + if (this.spec.sweep) this.drawSweep(ctx, t, CH) + ctx.restore() + if (st.rim) { + ctx.save() + setCard() + rrect(ctx, 1, 1, CW - 2, CH - 2, st.radius) + ctx.strokeStyle = st.rim + ctx.lineWidth = 2 + ctx.stroke() + ctx.restore() + } + ctx.setTransform(1, 0, 0, 1, 0, 0) + if (this.spec.confetti) this.drawConfetti(ctx, t, ccy - (CH * sc) / 2 + (186 - this.po) * sc) + if (this.grain.length) { + ctx.save() + ctx.globalCompositeOperation = 'overlay' + ctx.globalAlpha = 0.09 + ctx.imageSmoothingEnabled = false + ctx.drawImage(this.grain[fidx % 3], 0, 0, W, H) + ctx.restore() + } + } + + drawSweep(ctx: CanvasRenderingContext2D, t: number, CH: number) { + const swp = prog(t, this.T.sweep, 0.55) + if (swp <= 0 || swp >= 1) return + const bx = lerp(-260, CW + 300, easeInOut(swp)) + ctx.save() + ctx.translate(bx, CH / 2) + ctx.rotate((18 * Math.PI) / 180) + const g = ctx.createLinearGradient(-130, 0, 130, 0) + g.addColorStop(0, 'rgba(255,255,255,0)') + g.addColorStop(0.5, 'rgba(255,255,255,0.45)') + g.addColorStop(1, 'rgba(255,255,255,0)') + ctx.fillStyle = g + ctx.fillRect(-130, -CH * 1.2, 260, CH * 2.4) + ctx.restore() + } + + drawPill(ctx: CanvasRenderingContext2D, t: number) { + const T = this.T + const st = this.st + const p = easeInOut(prog(t, T.rev + 0.05, T.grow * 0.7)) + const y = 38, h = 54 + ctx.font = FONT.sc(700, 28) + ctx.textBaseline = 'middle' + ctx.textAlign = 'left' + if (p < 1 && this.spec.pillQ) { + const txt = this.spec.pillQ + const w = 48 + ctx.measureText(txt).width + 26 + const x = (CW - w) / 2 + ctx.globalAlpha = 1 - p + rrect(ctx, x, y, w, h, h / 2) + ctx.fillStyle = st.pillQ.bg + ctx.fill() + ctx.fillStyle = this.spec.accent + ctx.beginPath() + ctx.arc(x + 27, y + h / 2, 7, 0, Math.PI * 2) + ctx.fill() + if (Math.floor(t * 2.2) % 2 === 0 || t >= T.rev) { + ctx.globalAlpha = (1 - p) * 0.35 + ctx.strokeStyle = this.spec.accent + ctx.lineWidth = 3 + ctx.beginPath() + ctx.arc(x + 27, y + h / 2, 11, 0, Math.PI * 2) + ctx.stroke() + ctx.globalAlpha = 1 - p + } + ctx.fillStyle = st.pillQ.fg + ctx.fillText(txt, x + 48, y + h / 2 + 1) + ctx.globalAlpha = 1 + } + if (p > 0 && this.spec.pillA) { + const txt = this.spec.pillA + const w = 54 + ctx.measureText(txt).width + 26 + const s = 0.85 + 0.15 * easeOutBack(p) + ctx.save() + ctx.globalAlpha = p + ctx.translate(CW / 2, y + h / 2) + ctx.scale(s, s) + ctx.translate(-w / 2, -h / 2) + rrect(ctx, 0, 0, w, h, h / 2) + ctx.fillStyle = st.pillA.bg + ctx.fill() + ctx.strokeStyle = st.pillA.fg + ctx.lineWidth = 5 + ctx.lineCap = 'round' + ctx.lineJoin = 'round' + ctx.beginPath() + ctx.moveTo(21, h / 2 + 1) + ctx.lineTo(27, h / 2 + 8) + ctx.lineTo(40, h / 2 - 8) + ctx.stroke() + ctx.fillStyle = st.pillA.fg + ctx.fillText(txt, 54, h / 2 + 1) + ctx.restore() + } + } + + content(ctx: CanvasRenderingContext2D, t: number, fidx: number, _CH: number) { + const T = this.T + const st = this.st + const s = this.spec + const po = this.po + if (s.showPill) this.drawPill(ctx, t) + + // question + const hp = easeInOut(prog(t, T.rev, T.grow * 0.62)) + if (hp < 1) { + ctx.font = FONT.head(this.hsize) + ctx.textBaseline = 'middle' + ctx.textAlign = 'left' + const tw = ctx.measureText(this.qParts.map((p) => p.text).join('')).width + let x = (CW - tw) / 2 + const y = 176 - po - 34 * hp + ctx.globalAlpha = 1 - hp + for (const part of this.qParts) { + ctx.fillStyle = part.key ? s.accent : st.ink + ctx.fillText(part.text, x, y) + x += ctx.measureText(part.text).width + } + ctx.globalAlpha = 1 + } + + // word + const rowY = 186 - po + const mk = easeOutCubic(prog(t, T.marker, 0.32)) + if (mk > 0) { + const yb = rowY + this.wsize * 0.22 + rrect(ctx, this.wordX0 - 14, yb - this.wsize * 0.26, (this.wordW + 28) * mk, this.wsize * 0.32, 12) + ctx.fillStyle = st.marker + ctx.fill() + } + ctx.textAlign = 'center' + ctx.textBaseline = 'alphabetic' + ctx.fillStyle = st.ink + let k = 0 + ;[...s.en].forEach((c, i) => { + if (c === ' ') return + const tOn = T.type0 + k * T.dt + const appear = prog(t, tOn, 0.16) + const kk = k + k++ + if (appear <= 0) return + const pop = easeOutBack(appear, 2.6) + const size = this.wsize * (0.45 + 0.55 * pop) + const wave = Math.sin(clamp((t - T.done - kk * 0.03) / 0.4) * Math.PI) * 14 + const base = rowY + this.wsize * 0.3 - wave - 26 * (1 - easeOutCubic(appear)) + ctx.globalAlpha = Math.min(1, appear * 1.8) + ctx.font = FONT.word(size) + ctx.fillText(c, this.finalCx[i], base) + }) + ctx.globalAlpha = 1 + + // IPA row with speaker icon + const ip = easeOutCubic(prog(t, T.ipa, 0.32)) + if (ip > 0 && this.CHA > 300 - po) { + ctx.font = FONT.ipa(46) + ctx.textAlign = 'left' + ctx.textBaseline = 'middle' + const iw = s.ipa ? ctx.measureText(s.ipa).width : 0 + const icon = 62 + const x0 = (CW - (icon + (s.ipa ? 20 + iw : 0))) / 2 + const y = 306 - po + 26 * (1 - ip) + const env = this.env[Math.min(fidx, this.env.length - 1)] ?? 0 + const icx = x0 + icon / 2 + ctx.globalAlpha = ip + if (env > 0.05) { + ctx.globalAlpha = 0.43 * env * ip + ctx.strokeStyle = s.accent + ctx.lineWidth = 3 + ctx.beginPath() + ctx.arc(icx, y, icon / 2 + 6 + 16 * env, 0, Math.PI * 2) + ctx.stroke() + ctx.globalAlpha = ip + } + ctx.fillStyle = s.accent + ctx.beginPath() + ctx.arc(icx, y, (icon / 2) * (1 + 0.1 * env), 0, Math.PI * 2) + ctx.fill() + const bx = icx - 13 + ctx.fillStyle = '#ffffff' + ctx.beginPath() + ctx.moveTo(bx, y - 6); ctx.lineTo(bx + 7, y - 6); ctx.lineTo(bx + 16, y - 14); ctx.lineTo(bx + 16, y + 14) + ctx.lineTo(bx + 7, y + 6); ctx.lineTo(bx, y + 6); ctx.closePath() + ctx.fill() + ctx.strokeStyle = '#ffffff' + ctx.lineWidth = 3 + ctx.lineCap = 'butt' + ;[9, 16].forEach((rad, k2) => { + ctx.globalAlpha = ip * (0.55 + 0.45 * clamp(env * 2.2 - k2 * 0.5)) + ctx.beginPath() + ctx.arc(bx + 15, y, rad, (-48 * Math.PI) / 180, (48 * Math.PI) / 180) + ctx.stroke() + }) + ctx.globalAlpha = ip + if (s.ipa) { + ctx.fillStyle = st.sub + ctx.fillText(s.ipa, x0 + icon + 20, y + 5) + } + ctx.globalAlpha = 1 + } + + // meaning row + const mp = easeOutCubic(prog(t, T.mean, 0.3)) + if (mp > 0 && (s.zh || s.pos)) { + ctx.globalAlpha = mp + ctx.textBaseline = 'middle' + ctx.font = FONT.wordSemi(28) + const tagw = s.pos ? ctx.measureText(s.pos).width + 26 : 0 + ctx.font = FONT.sc(700, 38) + const zw = ctx.measureText(s.zh).width + const x0 = (CW - (tagw + (s.pos ? 16 : 0) + zw)) / 2 + const y = 394 - po + 20 * (1 - mp) + if (s.pos) { + rrect(ctx, x0, y - 21, tagw, 42, 10) + ctx.fillStyle = st.tag.bg + ctx.fill() + ctx.font = FONT.wordSemi(28) + ctx.textAlign = 'center' + ctx.fillStyle = st.tag.fg + ctx.fillText(s.pos, x0 + tagw / 2, y + 2) + } + ctx.font = FONT.sc(700, 38) + ctx.textAlign = 'left' + ctx.fillStyle = st.ink + ctx.fillText(s.zh, x0 + tagw + (s.pos ? 16 : 0), y + 1) + ctx.globalAlpha = 1 + } + } + + drawConfetti(ctx: CanvasRenderingContext2D, t: number, oy: number) { + const ct = t - (this.T.done + 0.04) + if (ct <= 0 || ct > 1.6) return + const ox = W / 2 + for (const p of this.particles) { + const tt = ct - p.delay + if (tt <= 0) continue + const drag = (1 - Math.exp(-2.6 * tt)) / 2.6 + const px = ox + p.x + p.vx * drag + const py = oy + p.y + p.vy * drag + 0.5 * 1500 * tt * tt * 0.55 + const life = clamp(1 - (tt - 0.75) / 0.6) + if (life <= 0) continue + const s = p.sz + const rot = ((p.rot + p.vr * tt) * Math.PI) / 180 + ctx.globalAlpha = life + ctx.fillStyle = p.col + ctx.save() + ctx.translate(px, py) + ctx.rotate(rot) + if (p.kind === 0) { + const flip = Math.abs(Math.cos(rot * 1.7)) * 0.8 + 0.2 + ctx.fillRect(-s * 0.4 * flip, -s, s * 0.8 * flip, s * 2) + } else if (p.kind === 1) { + ctx.beginPath() + ctx.arc(0, 0, s * 0.5, 0, Math.PI * 2) + ctx.fill() + } else { + if (p.col === CONFETTI[1]) ctx.fillStyle = '#ffffff' + ctx.beginPath() + for (let k = 0; k < 8; k++) { + const rr = k % 2 === 0 ? s * 0.95 : s * 0.28 + const a = (k * Math.PI) / 4 + if (k === 0) ctx.moveTo(rr * Math.cos(a), rr * Math.sin(a)) + else ctx.lineTo(rr * Math.cos(a), rr * Math.sin(a)) + } + ctx.closePath() + ctx.fill() + } + ctx.restore() + } + ctx.globalAlpha = 1 + } +} diff --git a/source/frontend/src/lib/live/styles.ts b/source/frontend/src/lib/live/styles.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a5dd8fdfaa9331ebe2abf656767c9223f60bddd --- /dev/null +++ b/source/frontend/src/lib/live/styles.ts @@ -0,0 +1,52 @@ +export interface CardStyle { + id: string + name: string + card: 'glass' | 'solid' + fill: string // glass: tint drawn over the blurred photo; solid: card colour + ink: string + sub: string + rim: string | null + shadow: number + radius: number + rotate: number // degrees + pillQ: { bg: string; fg: string } + pillA: { bg: string; fg: string } + marker: string + tag: { bg: string; fg: string } + swatch: string // UI preview +} + +export const STYLES: CardStyle[] = [ + { + id: 'glass', name: '磨砂白', card: 'glass', fill: 'rgba(255,255,255,0.70)', ink: '#16161c', sub: '#282834', + rim: 'rgba(255,255,255,0.8)', shadow: 0.43, radius: 46, rotate: 0, + pillQ: { bg: '#ffd63d', fg: '#16161c' }, pillA: { bg: '#22c55e', fg: '#ffffff' }, + marker: 'rgba(255,214,61,0.85)', tag: { bg: 'rgba(22,22,28,0.9)', fg: '#ffffff' }, swatch: 'linear-gradient(135deg,#f5f5f7,#d9dbe3)', + }, + { + id: 'night', name: '暗夜玻璃', card: 'glass', fill: 'rgba(14,14,20,0.62)', ink: '#ffffff', sub: '#e8e8f0', + rim: 'rgba(255,255,255,0.22)', shadow: 0.5, radius: 46, rotate: 0, + pillQ: { bg: 'rgba(255,255,255,0.16)', fg: '#ffffff' }, pillA: { bg: '#22c55e', fg: '#ffffff' }, + marker: 'rgba(255,59,92,0.55)', tag: { bg: '#ffffff', fg: '#16161c' }, swatch: 'linear-gradient(135deg,#2a2a35,#0e0e14)', + }, + { + id: 'sticky', name: '便利贴', card: 'solid', fill: '#ffe680', ink: '#2a2418', sub: '#3a3222', + rim: null, shadow: 0.35, radius: 16, rotate: -2, + pillQ: { bg: '#2a2418', fg: '#ffe680' }, pillA: { bg: '#2a2418', fg: '#ffe680' }, + marker: 'rgba(255,120,120,0.55)', tag: { bg: '#2a2418', fg: '#ffe680' }, swatch: 'linear-gradient(135deg,#fff1a8,#ffd84d)', + }, + { + id: 'paper', name: '纯白卡片', card: 'solid', fill: '#ffffff', ink: '#111114', sub: '#2a2a33', + rim: null, shadow: 0.3, radius: 36, rotate: 0, + pillQ: { bg: '#111114', fg: '#ffffff' }, pillA: { bg: '#22c55e', fg: '#ffffff' }, + marker: 'rgba(255,214,61,0.9)', tag: { bg: '#111114', fg: '#ffffff' }, swatch: '#ffffff', + }, + { + id: 'mono', name: '极简黑', card: 'solid', fill: 'rgba(14,14,18,0.94)', ink: '#ffffff', sub: '#dcdce4', + rim: 'rgba(255,255,255,0.12)', shadow: 0.45, radius: 28, rotate: 0, + pillQ: { bg: '#ffffff', fg: '#111114' }, pillA: { bg: '#ffffff', fg: '#111114' }, + marker: 'rgba(255,59,92,0.6)', tag: { bg: '#ffffff', fg: '#111114' }, swatch: '#111114', + }, +] + +export const getStyle = (id: string) => STYLES.find((s) => s.id === id) ?? STYLES[0] diff --git a/source/studio/items3.json b/source/studio/items3.json new file mode 100644 index 0000000000000000000000000000000000000000..050524ac9c44a5ff2ad37aa15d2764bba7728f51 --- /dev/null +++ b/source/studio/items3.json @@ -0,0 +1,125 @@ +[ + { + "id": "19", + "en": "gun", + "zh": "枪", + "ipa": "/ɡʌn/", + "pos": "n.", + "cat": "物", + "hints": [ + 0 + ], + "card_y": 1150 + }, + { + "id": "20", + "en": "gas", + "zh": "汽油", + "ipa": "/ɡæs/", + "pos": "n.", + "cat": "物", + "hints": [ + 0 + ], + "card_y": 1150 + }, + { + "id": "21", + "en": "gem", + "zh": "宝石", + "ipa": "/dʒem/", + "pos": "n.", + "cat": "物", + "hints": [ + 0 + ], + "card_y": 1150 + }, + { + "id": "22", + "en": "gee", + "zh": "天哪(表示惊讶)", + "ipa": "/dʒiː/", + "pos": "int.", + "cat": "感叹", + "hints": [ + 0 + ], + "card_y": 1150, + "tts": "Gee!" + }, + { + "id": "23", + "en": "gum", + "zh": "口香糖", + "ipa": "/ɡʌm/", + "pos": "n.", + "cat": "物", + "hints": [ + 0 + ], + "card_y": 1150 + }, + { + "id": "24", + "en": "cay", + "zh": "小岛", + "ipa": "/keɪ/", + "pos": "n.", + "cat": "地", + "hints": [ + 1, + 2 + ], + "card_y": 1150, + "tts": "Kay" + }, + { + "id": "25", + "en": "god", + "zh": "上帝;神", + "ipa": "/ɡɑːd/", + "pos": "n.", + "cat": "人", + "hints": [ + 0 + ], + "card_y": 1150 + }, + { + "id": "26", + "en": "gym", + "zh": "健身房", + "ipa": "/dʒɪm/", + "pos": "n.", + "cat": "地", + "hints": [ + 0 + ], + "card_y": 1150 + }, + { + "id": "27", + "en": "gig", + "zh": "演出", + "ipa": "/ɡɪɡ/", + "pos": "n.", + "cat": "事", + "hints": [ + 0 + ], + "card_y": 1150 + }, + { + "id": "28", + "en": "gag", + "zh": "堵嘴", + "ipa": "/ɡæɡ/", + "pos": "v.", + "cat": "事", + "hints": [ + 0 + ], + "card_y": 1150 + } +] \ No newline at end of file diff --git a/source/studio/items4.json b/source/studio/items4.json new file mode 100644 index 0000000000000000000000000000000000000000..3a86391599c2a7dd0b07308f9f8501a283893541 --- /dev/null +++ b/source/studio/items4.json @@ -0,0 +1,134 @@ +[ + { + "id": "29", + "en": "say", + "zh": "说", + "ipa": "/seɪ/", + "pos": "v.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1150 + }, + { + "id": "30", + "en": "way", + "zh": "道路", + "ipa": "/weɪ/", + "pos": "n.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1150 + }, + { + "id": "31", + "en": "day", + "zh": "一天", + "ipa": "/deɪ/", + "pos": "n.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1150 + }, + { + "id": "32", + "en": "bay", + "zh": "海湾", + "ipa": "/beɪ/", + "pos": "n.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1150 + }, + { + "id": "33", + "en": "jay", + "zh": "松鸦", + "ipa": "/dʒeɪ/", + "pos": "n.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1150 + }, + { + "id": "34", + "en": "hay", + "zh": "干草", + "ipa": "/heɪ/", + "pos": "n.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1150 + }, + { + "id": "35", + "en": "lay", + "zh": "躺下", + "ipa": "/leɪ/", + "pos": "v.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1150 + }, + { + "id": "36", + "en": "may", + "zh": "五月", + "ipa": "/meɪ/", + "pos": "n.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1150, + "tts": "May" + }, + { + "id": "37", + "en": "pay", + "zh": "支付", + "ipa": "/peɪ/", + "pos": "v.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1195, + "card_scale": 0.86 + }, + { + "id": "38", + "en": "ray", + "zh": "光线", + "ipa": "/reɪ/", + "pos": "n.", + "cat": "", + "hints": [ + 1, + 2 + ], + "card_y": 1150 + } +] \ No newline at end of file diff --git a/source/studio/package.py b/source/studio/package.py index 723636fe653a87d3b02159c4cde25136b603fc57..9bb93f3fdb0bf13b984e54b6843123c6caa29b3a 100644 --- a/source/studio/package.py +++ b/source/studio/package.py @@ -13,6 +13,14 @@ SETS = [ intro='每天都在用,却不一定叫得出英文名👀'), dict(key='b', items='items2.json', name='第二组 · 真实照片(网络授权图片)', folder='日常英语实况图-第二组', zip='daily-english-live-photos-set2.zip', title='这9个东西天天见,英语你都会说吗?', intro='天天见到的东西,换成英文就卡壳?👀', credits='credits2.json'), + dict(key='c', items='items3.json', name='第三组 · 看图填空(G _ _)', folder='日常英语实况图-第三组-看图填空', + zip='daily-english-live-photos-set3.zip', title='看图填空:G _ _ 你能填对几个?', + intro='全是三个字母的单词,看图猜一猜是什么👀', hide_list=True, + tags='#英语单词 #看图猜单词 #英语学习 #实况图 #每日英语 #单词打卡'), + dict(key='d', items='items4.json', name='第四组 · 看图填空(_ A Y)', folder='日常英语实况图-第四组-看图填空', + zip='daily-english-live-photos-set4.zip', title='看图填空:_ A Y 你能填对几个?', + intro='后面都是 AY,就差第一个字母,看图猜一猜👀', hide_list=True, + tags='#英语单词 #看图猜单词 #英语学习 #实况图 #每日英语 #单词打卡'), ] README = """日常英语 · 实况图素材包({n} 张) @@ -38,9 +46,9 @@ Mac 导入方法: def body_for(s, items): return (s['intro'] + '\n先看封面猜一猜,再长按实况看答案(记得开声音🔊)\n评论区报一下你答对了几个~\n\n' - + ' / '.join(i['zh'] for i in items) + '\n\n' + + ('' if s.get('hide_list') else ' / '.join(i['zh'] for i in items) + '\n\n') + ('图片来源:Wikimedia Commons(作者与授权见素材包内说明)\n\n' if s.get('credits') else '') - + '#英语单词 #日常英语 #英语口语 #实况图 #每日英语 #英语学习 #单词打卡') + + s.get('tags', '#英语单词 #日常英语 #英语口语 #实况图 #每日英语 #英语学习 #单词打卡')) def build(s): diff --git a/source/studio/render.py b/source/studio/render.py index 91a4a9e4b8c61c08513981b095f543a650ae8a04..fd579dc6072993ab68cb0c759e0cd59835238e57 100644 --- a/source/studio/render.py +++ b/source/studio/render.py @@ -123,26 +123,43 @@ class Clip: return frame # ----- audio & timeline ----- + def typed_indices(self): + return [i for i, c in enumerate(self.word) if c != ' '] + + def typing_dt(self, n): + return clamp(0.40 / max(n, 1), 0.035, 0.07) + + MAX_DUR = 3.0 # WeChat Moments only accepts Live Photos of about 3 s (native iPhone length) + def prepare_audio(self): - en1 = A.tts(f"{self.word}.", 'en-US-AvaMultilingualNeural', rate='-5%') - en2 = A.tts(f"{self.word}.", 'en-US-AndrewMultilingualNeural', rate='-22%') - self.typed = [i for i, c in enumerate(self.word) if c != ' '] + say = self.it.get('tts', self.word) + en1 = A.tts(f"{say}.", 'en-US-AvaMultilingualNeural', rate='-5%') + self.typed = self.typed_indices() n = len(self.typed) T = {} - T['rev'] = 0.55 - T['grow_d'] = 0.45 - T['type0'] = 0.78 - T['dt'] = clamp(0.55 / max(n, 1), 0.05, 0.085) - T['done'] = T['type0'] + (n - 1) * T['dt'] + 0.14 - T['marker'] = T['done'] + 0.05 - T['ipa'] = T['done'] + 0.18 - T['en1'] = T['done'] + 0.24 + T['rev'] = 0.35 + T['grow_d'] = 0.35 + T['type0'] = 0.50 + T['dt'] = self.typing_dt(n) + T['done'] = T['type0'] + (n - 1) * T['dt'] + 0.10 + T['marker'] = T['done'] + 0.03 + T['ipa'] = T['done'] + 0.08 + T['en1'] = T['done'] + 0.10 d1 = len(en1) / A.SR - T['mean'] = T['en1'] + d1 * 0.55 - T['en2'] = T['en1'] + d1 + 0.30 - d2 = len(en2) / A.SR - T['end'] = T['en2'] + d2 + 0.50 - T['sweep'] = T['done'] + 0.35 + T['mean'] = T['en1'] + d1 * 0.5 + T['sweep'] = T['done'] + 0.25 + en2 = None + for rate in ('-22%', '-10%', '+0%', '+10%'): + cand = A.tts(f"{say}.", 'en-US-AndrewMultilingualNeural', rate=rate) + if T['en1'] + d1 + 0.10 + len(cand) / A.SR + 0.10 <= self.MAX_DUR: + en2 = cand + break + if en2 is not None: + T['en2'] = T['en1'] + d1 + 0.10 + T['end'] = self.MAX_DUR + else: + T['en2'] = None + T['end'] = min(self.MAX_DUR, max(T['en1'] + d1 + 0.25, T['mean'] + 0.6)) nf = int(math.ceil(T['end'] * FPS)) self.nf = nf self.dur = nf / FPS @@ -157,11 +174,14 @@ class Clip: mx.add(A.pop(), T['ipa'], 0.7) mx.add(en1, T['en1'], 1.0) mx.add(A.pop(), T['mean'], 0.5) - mx.add(en2, T['en2'], 1.0) + if en2 is not None: + mx.add(en2, T['en2'], 1.0) self.wav = os.path.join(self.out, 'audio.wav') mx.render(self.dur, self.wav) env = np.zeros(nf + 2) for clip, st in ((en1, T['en1']), (en2, T['en2'])): + if clip is None: + continue e = A.envelope(clip, FPS) s = int(round(st * FPS)) n2 = min(len(e), len(env) - s) @@ -226,12 +246,12 @@ class Clip: # ----- card content ----- def draw_pill(self, layer, t): T = self.T - p = ease_in_out(prog(t, T['rev'] + 0.05, 0.3)) + p = ease_in_out(prog(t, T['rev'] + 0.05, 0.25)) f = font(F_SC, 28, 700) y, h = 38, 54 CW = self.CW if p < 1: - txt = "在线求助" + txt = getattr(self, "pill_q", "在线求助") w = 48 + text_w(txt, f) + 26 x = (CW - w) / 2 pl = Image.new('RGBA', layer.size, (0, 0, 0, 0)) @@ -245,7 +265,7 @@ class Clip: pl.putalpha(pl.getchannel('A').point(lambda v: int(v * (1 - p)))) layer.alpha_composite(pl) if p > 0: - txt = "答案揭晓" + txt = getattr(self, "pill_a", "答案揭晓") w = 54 + text_w(txt, f) + 26 sc = 0.85 + 0.15 * ease_out_back(p) pw, ph = int(w + 2), h + 2 @@ -268,7 +288,7 @@ class Clip: self.draw_pill(layer, t) # question headline - hp = ease_in_out(prog(t, T['rev'], 0.28)) + hp = ease_in_out(prog(t, T['rev'], 0.22)) if hp < 1: f = font(F_SS, self.hsize) kw = f"「{self.it['zh']}」" @@ -359,7 +379,7 @@ class Clip: T = self.T img = self.camera(t).convert('RGBA') bump = math.sin(math.pi * prog(t, T['rev'], 0.32)) * 0.02 + math.sin(math.pi * prog(t, T['done'], 0.3)) * 0.024 - sc = 1 + bump + sc = self.it.get('card_scale', 1.0) * (1 + bump) CW = self.CW CH = int(round(self.card_h(t))) cw, ch = int(round(CW * sc)), int(round(CH * sc)) @@ -374,9 +394,10 @@ class Clip: m = 50 box = (max(0, x0 - m), max(0, y0 - m), min(W, x0 + cw + m), min(H, y0 + ch + m)) reg = img.crop(box).convert('RGB') - small = reg.resize((max(1, reg.width // 6), max(1, reg.height // 6)), Image.BILINEAR).filter(ImageFilter.GaussianBlur(4)) + small = reg.resize((max(1, reg.width // 6), max(1, reg.height // 6)), Image.BILINEAR).filter(ImageFilter.GaussianBlur(getattr(self, 'BLUR', 4))) glass = small.resize(reg.size, Image.BICUBIC) - ga = np.asarray(glass, np.float32) * 0.30 + 255 * 0.70 + g = getattr(self, 'GLASS', 0.70) + ga = np.asarray(glass, np.float32) * (1 - g) + 255 * g glass = Image.fromarray(ga.clip(0, 255).astype(np.uint8)).crop((x0 - box[0], y0 - box[1], x0 - box[0] + cw, y0 - box[1] + ch)) glass = glass.convert('RGBA') glass.putalpha(self.mask_for(cw, ch, rad)) @@ -389,7 +410,7 @@ class Clip: layer = layer.resize((cw, ch), Image.BICUBIC) img.alpha_composite(layer, (x0, y0)) # confetti - ct = t - (T['done'] + 0.05) + ct = t - (T['done'] + 0.03) if 0 < ct < 1.6: ov = Image.new('RGBA', (W, H), (0, 0, 0, 0)) od = ImageDraw.Draw(ov) @@ -433,7 +454,7 @@ class Clip: '-i', self.wav, '-map', '0:v', '-map', '1:a', '-c:v', 'libx264', '-preset', 'medium', '-crf', '18', '-profile:v', 'high', '-pix_fmt', 'yuv420p', '-color_primaries', 'bt709', '-color_trc', 'bt709', '-colorspace', 'bt709', '-tag:v', 'avc1', - '-c:a', 'aac', '-b:a', '192k', '-ar', '48000', '-ac', '2', '-shortest', '-movflags', '+faststart', mp4] + '-c:a', 'aac', '-b:a', '128k', '-ar', '44100', '-ac', '1', '-shortest', '-movflags', '+faststart', mp4] proc = subprocess.Popen(cmd, stdin=subprocess.PIPE) for i in range(self.nf): fr = self.frame(i) diff --git a/source/studio/render_blank.py b/source/studio/render_blank.py new file mode 100644 index 0000000000000000000000000000000000000000..7f80026f264e920869f6efc7746866e6cae59438 --- /dev/null +++ b/source/studio/render_blank.py @@ -0,0 +1,152 @@ +"""'What is this called?' fill-in-the-blank variant: letter tiles like G _ _ / _ A Y, answer typed into the blanks. +Usage: python render_blank.py [ids] (items3.json, photos in /tmp/work/user/.jpg)""" +import json, math, os, sys + +sys.path.insert(0, os.path.dirname(__file__)) +import render as R +from render import (ACCENT, CONFETTI, F_NS, F_POP, F_POP_SB, F_SC, INK, YELLOW, Image, ImageDraw, clamp, ease_in_out, + ease_out_back, ease_out_cubic, font, lerp, np, prog, text_w) + +TILE_W, TILE_H, GAP = 124, 144, 22 +Y_TITLE, Y_TILES_Q, Y_TILES_A, Y_IPA, Y_MEAN = 162, 292, 196, 326, 410 + + +class BlankClip(R.Clip): + CHQ, CHA = 402, 462 + pill_q, pill_a = '看图填空', '答案揭晓' + GLASS = 0.50 # milky-white share of the frosted glass (was 0.70) — more see-through + BLUR = 5 + + def __init__(self, item, *a, **k): + self.hints = set(item['hints']) + super().__init__(item, *a, **k) + + def typed_indices(self): + return [i for i, c in enumerate(self.it['en']) if c != ' ' and i not in self.hints] + + def typing_dt(self, n): + return clamp(0.36 / max(n, 1), 0.08, 0.18) + + def prepare_layout(self): + super().prepare_layout() + n = len(self.word) + total = n * TILE_W + (n - 1) * GAP + x0 = (self.CW - total) / 2 + self.tiles_x = [x0 + i * (TILE_W + GAP) for i in range(n)] + self.title = self.it.get('question', 'What is this called?') + ts = 64 + while text_w(self.title, font(F_POP, ts)) > self.CW - 120: + ts -= 2 + self.title_size = ts + + def content(self, t, fidx, ch): + T = self.T + CW = self.CW + layer = Image.new('RGBA', (CW, ch), (0, 0, 0, 0)) + d = ImageDraw.Draw(layer) + self.draw_pill(layer, t) + + # question title + hp = ease_in_out(prog(t, T['rev'], 0.22)) + if hp < 1: + d.text((CW / 2, Y_TITLE - 30 * hp), self.title, font=font(F_POP, self.title_size), fill=INK + (int(255 * (1 - hp)),), anchor='mm') + + # tiles + sp = ease_in_out(prog(t, T['rev'], 0.35)) + row_y = lerp(Y_TILES_Q, Y_TILES_A, sp) + flash = ease_out_cubic(prog(t, T['done'] - 0.02, 0.25)) + letters = self.word.upper() + lsize = 100 + for i, c in enumerate(letters): + if c == ' ': + continue + x = self.tiles_x[i] + wave = math.sin(clamp((t - T['done'] - i * 0.05) / 0.4) * math.pi) * 16 + top = row_y - TILE_H / 2 - wave + hint = i in self.hints + # tile body: white -> highlighter yellow when the answer completes + base_fill = (255, 255, 255, 205 if hint else 115) + fill = tuple(int(lerp(base_fill[k], (YELLOW + (240,))[k], flash)) for k in range(4)) + d.rounded_rectangle((x, top, x + TILE_W, top + TILE_H), 22, fill=fill, outline=(30, 30, 40, int(lerp(45, 0, flash))), width=3) + if not hint: + d.rounded_rectangle((x + 18, top + TILE_H - 16, x + TILE_W - 18, top + TILE_H - 8), 4, fill=INK + (int(lerp(220, 0, flash)),)) + cx = x + TILE_W / 2 + if hint: + col = ACCENT if flash < 0.5 else INK + d.text((cx, top + TILE_H / 2 + lsize * 0.36), c, font=font(F_POP, lsize), fill=col + (255,), anchor='ms') + else: + k = self.typed.index(i) + appear = prog(t, T['type0'] + k * T['dt'], 0.16) + if appear > 0: + pop = ease_out_back(appear, 2.6) + size = lsize * (0.45 + 0.55 * pop) + base = top + TILE_H / 2 + size * 0.36 - 22 * (1 - ease_out_cubic(appear)) + d.text((cx, base), c, font=font(F_POP, size), fill=INK + (int(255 * min(1, appear * 1.8)),), anchor='ms') + # blinking caret in the first blank while the question is on screen + if t < T['type0'] and self.typed and int(t * 2.4) % 2 == 0: + x = self.tiles_x[self.typed[0]] + TILE_W / 2 + d.rounded_rectangle((x - 3, row_y - 40, x + 3, row_y + 40), 3, fill=ACCENT + (230,)) + + # IPA row + ip = ease_out_cubic(prog(t, T['ipa'], 0.32)) + if ip > 0: + fi = font(F_NS, 46, 500) + ipa = self.it['ipa'] + iw = text_w(ipa, fi) + icon = 62 + x0 = (CW - (icon + 20 + iw)) / 2 + y = Y_IPA + 26 * (1 - ip) + al = int(255 * ip) + env = float(self.env[min(fidx, len(self.env) - 1)]) + r = icon / 2 * (1 + 0.10 * env) + icx = x0 + icon / 2 + if env > 0.05: + rr = icon / 2 + 6 + 16 * env + d.ellipse((icx - rr, y - rr, icx + rr, y + rr), outline=ACCENT + (int(110 * env * ip),), width=3) + d.ellipse((icx - r, y - r, icx + r, y + r), fill=ACCENT + (al,)) + bx = icx - 13 + d.polygon([(bx, y - 6), (bx + 7, y - 6), (bx + 16, y - 14), (bx + 16, y + 14), (bx + 7, y + 6), (bx, y + 6)], fill=(255, 255, 255, al)) + for k2, rad in enumerate((9, 16)): + aa = int(al * (0.55 + 0.45 * clamp(env * 2.2 - k2 * 0.5))) + cxa = bx + 15 + d.arc((cxa - rad, y - rad, cxa + rad, y + rad), -48, 48, fill=(255, 255, 255, aa), width=3) + d.text((x0 + icon + 20, y), ipa, font=fi, fill=(40, 40, 52, al), anchor='lm') + + # meaning row + mpn = ease_out_cubic(prog(t, T['mean'], 0.3)) + if mpn > 0: + al = int(255 * mpn) + fp_ = font(F_POP_SB, 28) + fz = font(F_SC, 38, 700) + pos, zh = self.it['pos'], self.it['zh'] + tagw = text_w(pos, fp_) + 26 + x0 = (CW - (tagw + 16 + text_w(zh, fz))) / 2 + y = Y_MEAN + 20 * (1 - mpn) + d.rounded_rectangle((x0, y - 21, x0 + tagw, y + 21), 10, fill=(22, 22, 28, int(al * 0.9))) + d.text((x0 + tagw / 2, y), pos, font=fp_, fill=(255, 255, 255, al), anchor='mm') + d.text((x0 + tagw + 16, y), zh, font=fz, fill=(30, 30, 40, al), anchor='lm') + + # glossy light sweep + swp = prog(t, T['sweep'], 0.55) + if 0 < swp < 1: + bx = int(lerp(-self.band.width, CW + 40, ease_in_out(swp))) + gl = Image.new('L', (CW, ch), 0) + gl.paste(self.band, (bx, -self.CHA // 2)) + m = self.mask_for(CW, ch, 46) + gl = Image.fromarray((np.asarray(gl, np.float32) * np.asarray(m, np.float32) / 255).astype(np.uint8)) + white = Image.new('RGBA', (CW, ch), (255, 255, 255, 0)) + white.putalpha(gl) + layer = Image.alpha_composite(layer, white) + return layer + + +if __name__ == '__main__': + items = json.load(open(os.path.join(os.path.dirname(__file__), os.environ.get('ITEMS', 'items3.json')))) + want = sys.argv[1].split(',') if len(sys.argv) > 1 else [i['id'] for i in items] + for k, it in enumerate(items, 1): + if it['id'] not in want: + continue + c = BlankClip(it, k, len(items), f"/tmp/work/user/{it['id']}.jpg", f"/tmp/work/out/{it['id']}") + c.snap = [int(x) for x in os.environ.get('SNAP', '').split(',') if x] + print(it['id'], it['en'], 'frames', c.nf, 'dur', round(c.dur, 2), 'en2', c.T['en2'] is not None, flush=True) + c.render()