From 56e83aaec0c3f3dc8fd1903cd912b5d26d2b5497 Mon Sep 17 00:00:00 2001 From: lapy Date: Mon, 12 Oct 2026 14:25:20 +0100 Subject: [PATCH] fix(web): generator bundle resolves its route under the console mount path The previous rebuild baked createWebHistory('./') which vue-router normalizes to '/.' and matches nothing - the page rendered only the header shell. The bundle now derives its router base from document.baseURI, verified in a real browser at /generator/: step wizard renders, zero Han in the UI. --- .../assets/{HomePage-C46hPw_t.js => HomePage-DjEdExnq.js} | 2 +- .../assets/{index-C_B_50-2.js => index-CTIG3yYe.js} | 8 ++++---- main/manager-web/public/generator/index.html | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename main/manager-web/public/generator/assets/{HomePage-C46hPw_t.js => HomePage-DjEdExnq.js} (99%) rename main/manager-web/public/generator/assets/{index-C_B_50-2.js => index-CTIG3yYe.js} (99%) diff --git a/main/manager-web/public/generator/assets/HomePage-C46hPw_t.js b/main/manager-web/public/generator/assets/HomePage-DjEdExnq.js similarity index 99% rename from main/manager-web/public/generator/assets/HomePage-C46hPw_t.js rename to main/manager-web/public/generator/assets/HomePage-DjEdExnq.js index 1679252b9..998a177df 100644 --- a/main/manager-web/public/generator/assets/HomePage-C46hPw_t.js +++ b/main/manager-web/public/generator/assets/HomePage-DjEdExnq.js @@ -1,4 +1,4 @@ -import{u as TA,r as j,w as DA,o as Me,a as G,c as U,b as a,t as d,d as fg,e as HA,f as wg,g as O,h as ig,i as nA,j as eA,n as nt,k as gA,F as bA,l as LA,m as rA,v as sA,p as Xe,q as PA,s as CA,x as UA,y as Bt,z as at,_ as sI,A as we}from"./index-C_B_50-2.js";const QI={class:"space-y-6"},EI={class:"text-xl font-semibold text-gray-900 mb-4"},lI={class:"text-gray-600 mb-6"},cI={key:0},hI={key:1},uI={key:2},dI={key:0,class:"space-y-4"},fI={class:"bg-blue-50 border-2 border-blue-200 rounded-lg p-6"},wI={class:"flex items-center justify-center space-x-3"},pI={class:"text-lg font-medium text-blue-900"},yI={class:"text-sm text-blue-700 mt-1"},DI={key:1,class:"space-y-4"},mI={class:"bg-green-50 border-2 border-green-200 rounded-lg p-4"},FI={class:"flex items-start justify-between mb-3"},kI={class:"flex items-center"},vI={class:"text-lg font-medium text-green-900"},SI={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mt-4"},GI={class:"bg-white rounded-lg p-3"},RI={class:"block text-sm font-medium text-gray-700 mb-1"},UI={class:"text-base font-semibold text-gray-900"},NI={class:"bg-white rounded-lg p-3"},bI={class:"block text-sm font-medium text-gray-700 mb-1"},LI={class:"text-base font-semibold text-gray-900"},MI={class:"bg-white rounded-lg p-3"},JI={class:"block text-sm font-medium text-gray-700 mb-1"},xI={class:"text-base font-semibold text-gray-900"},HI={class:"mt-3 text-sm text-green-700"},YI={class:"border border-gray-200 rounded-lg p-4"},KI={key:0,class:"mt-4"},TI={key:2,class:"space-y-4"},VI={class:"bg-yellow-50 border border-yellow-200 rounded-lg p-4"},qI={class:"flex items-start"},OI={class:"font-medium text-yellow-900"},WI={class:"text-sm text-yellow-700 mt-1"},PI={class:"border-2 border-gray-300 rounded-lg p-4"},ZI={class:"text-lg font-medium text-gray-900 mb-4"},XI={class:"flex justify-end"},jI=["disabled"],zI={__name:"ChipConfig",props:{modelValue:{type:Object,default:()=>({model:"",display:{width:320,height:240,color:"RGB565"}})}},emits:["update:modelValue","next"],setup(e,{emit:A}){const{t:g}=TA(),t=A,I=nA(()=>[{value:"",label:g("chipConfig.selectChip")},{value:"esp32s3",label:"ESP32-S3"},{value:"esp32c3",label:"ESP32-C3"},{value:"esp32c5",label:"ESP32-C5"},{value:"esp32c6",label:"ESP32-C6"},{value:"esp32p4",label:"ESP32-P4"},{value:"esp32",label:"ESP32"},{value:"others",label:g("common.other")}]),o={name:"ConfigForm",props:{config:{type:Object,required:!0},showRequired:{type:Boolean,default:!1}},render(){const p=this.$t;return eA("div",{class:"grid grid-cols-1 md:grid-cols-3 gap-4"},[eA("div",[eA("label",{class:"block text-sm font-medium text-gray-700 mb-2"},[p("chipConfig.chipRequired")+" ",this.showRequired&&eA("span",{class:"text-red-500"},"*")]),eA("select",{class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500",value:this.config.model,onChange:v=>{this.config.model=v.target.value}},fg(I).map(v=>eA("option",{value:v.value,key:v.value},v.label)))]),eA("div",[eA("label",{class:"block text-sm font-medium text-gray-700 mb-2"},[p("chipConfig.widthRequired")+" ",this.showRequired&&eA("span",{class:"text-red-500"},"*")]),eA("input",{type:"number",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500",value:this.config.display.width,min:128,max:800,placeholder:"320",onInput:v=>{this.config.display.width=Number(v.target.value)}})]),eA("div",[eA("label",{class:"block text-sm font-medium text-gray-700 mb-2"},[p("chipConfig.heightRequired")+" ",this.showRequired&&eA("span",{class:"text-red-500"},"*")]),eA("input",{type:"number",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500",value:this.config.display.height,min:128,max:600,placeholder:"240",onInput:v=>{this.config.display.height=Number(v.target.value)}})])])}},{deviceInfo:i,isDeviceOnline:r,hasToken:C}=ig(),B=j(C.value),n=j(!1),Q=j(""),s=j(!1),E=j({model:"",display:{width:320,height:240,color:"RGB565"}}),h={"ESP32-S3":"esp32s3",ESP32S3:"esp32s3","ESP32-C3":"esp32c3",ESP32C3:"esp32c3","ESP32-C5":"esp32c5",ESP32C5:"esp32c5","ESP32-P4":"esp32p4",ESP32P4:"esp32p4","ESP32-C6":"esp32c6",ESP32C6:"esp32c6",ESP32:"esp32"},w=()=>{var p,v;try{if(!r.value)return B.value||(Q.value=g("chipConfig.deviceOffline"),n.value=!1),!1;const N=(p=i.value.chip)==null?void 0:p.model;if(!N||N==="Unknown")return!1;let L=h[N.toUpperCase()]||h[N]||N.toLowerCase().replace(/-/g,"");["esp32s3","esp32c3","esp32c5","esp32p4","esp32c6","esp32","others"].includes(L)||(L="others");const k=(v=i.value.screen)==null?void 0:v.resolution;if(!k||k==="Unknown")return!1;const[m,M]=k.split("x").map(Number);return!m||!M||isNaN(m)||isNaN(M)?(Q.value=g("chipConfig.resolutionFormatError"),n.value=!1,B.value=!1,!1):(E.value={model:L,display:{width:m,height:M,color:"RGB565"}},t("update:modelValue",{model:L,display:{width:m,height:M,color:"RGB565"}}),n.value=!0,Q.value="",B.value=!1,console.log("✓ Device config loaded successfully:",{chip:L,width:m,height:M}),!0)}catch(N){return console.error("Failed to load device config:",N),Q.value=g("chipConfig.loadingError"),n.value=!1,B.value=!1,!1}},u=nA(()=>E.value.model&&E.value.display.width&&E.value.display.height),l=nA(()=>E.value.model?E.value.model.toUpperCase().replace(/ESP32/i,"ESP32-"):""),f=nA(()=>E.value.display),c=()=>{s.value=!s.value},D=()=>{u.value&&t("next")};return DA(()=>E.value,p=>{t("update:modelValue",{model:p.model,display:{...p.display}})},{deep:!0}),DA(()=>r.value,p=>{p&&!n.value&&(B.value=!0,Q.value="",setTimeout(()=>{w()},100))}),DA(()=>[i.value.chip,i.value.screen],()=>{r.value&&!n.value&&w()},{deep:!0}),Me(()=>{if(!C.value){B.value=!1,Q.value=g("chipConfig.manualConfigRequired"),console.log("⚠ No device connection detected, using manual config mode");return}r.value&&i.value.chip&&i.value.chip.model!=="Unknown"&&i.value.screen&&i.value.screen.resolution!=="Unknown"?(console.log("✓ Cached device info detected, loading immediately"),w()):r.value?(console.log("⏳ Device online, waiting for device info to load..."),B.value=!0,setTimeout(()=>{w()},500),setTimeout(()=>{B.value&&!n.value&&r.value&&(B.value=!1,!i.value.chip||i.value.chip.model==="Unknown"?Q.value=g("chipConfig.chipModelError"):!i.value.screen||i.value.screen.resolution==="Unknown"?Q.value=g("chipConfig.resolutionError"):Q.value=g("chipConfig.timeoutError"),console.warn("⚠ Device config load timeout:",Q.value))},1e4)):(console.log("⏳ Waiting for device connection..."),B.value=!0,setTimeout(()=>{B.value&&!n.value&&!r.value&&(B.value=!1,Q.value=g("chipConfig.manualConfigHint"),console.warn("⚠ Device connection timeout"))},1e4))}),(p,v)=>(G(),U("div",QI,[a("div",null,[a("h2",EI,d(p.$t("chipConfig.title")),1),a("p",lI,[B.value?(G(),U("span",cI,d(p.$t("chipConfig.loadingFromDevice")),1)):n.value?(G(),U("span",hI,d(p.$t("chipConfig.loadedFromDevice")),1)):(G(),U("span",uI,d(p.$t("chipConfig.manualConfig")),1))])]),B.value?(G(),U("div",dI,[a("div",fI,[a("div",wI,[v[0]||(v[0]=a("svg",{class:"animate-spin h-6 w-6 text-blue-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[a("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),a("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),a("div",null,[a("h3",pI,d(p.$t("chipConfig.loadingTitle")),1),a("p",yI,d(p.$t("chipConfig.loadingDesc")),1)])])])])):fg(r)&&n.value?(G(),U("div",DI,[a("div",mI,[a("div",FI,[a("div",kI,[v[1]||(v[1]=a("div",{class:"w-5 h-5 bg-green-500 rounded-full flex items-center justify-center mr-2"},[a("svg",{class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})])],-1)),a("h3",vI,d(p.$t("chipConfig.autoLoadedTitle")),1)])]),a("div",SI,[a("div",GI,[a("label",RI,d(p.$t("chipConfig.chipModel")),1),a("div",UI,d(l.value),1)]),a("div",NI,[a("label",bI,d(p.$t("chipConfig.screenWidth")),1),a("div",LI,d(f.value.width)+" px",1)]),a("div",MI,[a("label",JI,d(p.$t("chipConfig.screenHeight")),1),a("div",xI,d(f.value.height)+" px",1)])]),a("div",HI," ✓ "+d(p.$t("chipConfig.colorFormat"))+" "+d(f.value.color),1)]),a("div",YI,[a("button",{onClick:c,class:"flex items-center text-sm text-gray-600 hover:text-gray-900"},[v[2]||(v[2]=a("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),HA(" "+d(s.value?p.$t("chipConfig.collapseManual"):p.$t("chipConfig.manualEdit")),1)]),s.value?(G(),U("div",KI,[wg(o,{config:E.value},null,8,["config"])])):O("",!0)])])):(G(),U("div",TI,[a("div",VI,[a("div",qI,[v[3]||(v[3]=a("svg",{class:"w-5 h-5 text-yellow-600 mr-3 flex-shrink-0 mt-0.5",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)),a("div",null,[a("h4",OI,d(p.$t("chipConfig.manualConfigDesc")),1),a("p",WI,d(Q.value||p.$t("chipConfig.manualConfigHint")),1)])])]),a("div",PI,[a("h3",ZI,d(p.$t("chipConfig.manualConfigTitle")),1),wg(o,{config:E.value,"show-required":!0},null,8,["config"])])])),a("div",XI,[a("button",{onClick:D,disabled:!u.value,class:"bg-primary-500 hover:bg-primary-600 disabled:bg-gray-300 text-white px-6 py-2 rounded-lg font-medium transition-colors"},d(p.$t("chipConfig.next")),9,jI)])]))}},_I={class:"space-y-6"},$I={class:"text-lg font-medium text-gray-900 mb-2"},Ao={class:"text-gray-600"},eo={key:0,class:"bg-orange-50 border border-orange-200 rounded-lg p-4"},go={class:"text-sm text-orange-800"},to={class:"mt-1"},Io={key:1,class:"space-y-6"},oo={class:"flex space-x-4"},io={key:0,class:"space-y-4"},ro={class:"block text-sm font-medium text-gray-700"},Co={class:"relative"},no=["value"],Bo=["value"],ao={key:1,class:"space-y-4 bg-gray-50 p-4 rounded-lg border border-gray-200"},so={class:"font-medium text-gray-900"},Qo={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Eo={class:"block text-sm font-medium text-gray-700 mb-1"},lo=["placeholder"],co={key:0,class:"text-xs text-red-500 mt-1"},ho={class:"block text-sm font-medium text-gray-700 mb-1"},uo=["placeholder"],fo={key:0,class:"text-xs text-red-500 mt-1"},wo={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},po={class:"block text-sm font-medium text-gray-700 mb-1"},yo={class:"flex items-center space-x-2"},Do={class:"text-sm text-gray-600 w-8"},mo={class:"text-xs text-gray-500 mt-1"},Fo={class:"block text-sm font-medium text-gray-700 mb-1"},ko={key:0,class:"text-xs text-red-500 mt-1"},vo={class:"block text-sm font-medium text-gray-700 mb-1"},So={value:"mn6_en"},Go={class:"bg-blue-50 border border-blue-200 rounded-lg p-3"},Ro={class:"text-sm text-blue-800"},Uo={class:"mt-1 list-disc list-inside space-y-1"},No={key:0},bo={key:1},Lo={key:2},Mo={__name:"WakewordConfig",props:{modelValue:{type:Object,required:!0},chipModel:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:A}){const{t:g}=TA(),t=e,I=A,o=[{id:"wn9s_hilexin",name:"Hi, Espressif",model:"WakeNet9s"},{id:"wn9s_hiesp",name:"Hi,ESP",model:"WakeNet9s"},{id:"wn9s_nihaoxiaozhi",name:"Hello Xiaozhi",model:"WakeNet9s"},{id:"wn9s_hijason",name:"Hi,Jason",model:"WakeNet9s"},{id:"wn9s_alexa",name:"Alexa",model:"WakeNet9s"},{id:"wn9_hilexin",name:"Hi, Espressif",model:"WakeNet9"},{id:"wn9_hiesp",name:"Hi,ESP",model:"WakeNet9"},{id:"wn9_nihaoxiaozhi_tts",name:"Hello Xiaozhi",model:"WakeNet9"},{id:"wn9_hijason_tts2",name:"Hi,Jason",model:"WakeNet9"},{id:"wn9_himfive",name:"Hi,M Five",model:"WakeNet9"},{id:"wn9_alexa",name:"Alexa",model:"WakeNet9"},{id:"wn9_jarvis_tts",name:"Jarvis",model:"WakeNet9"},{id:"wn9_computer_tts",name:"Computer",model:"WakeNet9"},{id:"wn9_heywillow_tts",name:"Hey,Willow",model:"WakeNet9"},{id:"wn9_sophia_tts",name:"Sophia",model:"WakeNet9"},{id:"wn9_heyprinter_tts",name:"Hey,Printer",model:"WakeNet9"},{id:"wn9_hijoy_tts",name:"Hi,Joy",model:"WakeNet9"},{id:"wn9_heywanda_tts",name:"Hey,Wand",model:"WakeNet9"},{id:"wn9_astrolabe_tts",name:"Astrolabe",model:"WakeNet9"},{id:"wn9_heyily_tts2",name:"Hey,Ily",model:"WakeNet9"},{id:"wn9_hijolly_tts2",name:"Hi,Jolly",model:"WakeNet9"},{id:"wn9_hifairy_tts2",name:"Hi,Fairy",model:"WakeNet9"},{id:"wn9_bluechip_tts2",name:"Blue Chip",model:"WakeNet9"},{id:"wn9_hiandy_tts2",name:"Hi,Andy",model:"WakeNet9"},{id:"wn9_heyivy_tts2",name:"Hey,Ivy",model:"WakeNet9"},{id:"wn9_histackchan_tts3",name:"Hi,Stack Chan",model:"WakeNet9"},{id:"wn9_hiwalle_tts2",name:"Hi,Wall E",model:"WakeNet9"},{id:"wn9_hilili_tts",name:"Hi,Lily",model:"WakeNet9"},{id:"wn9_hitelly_tts",name:"Hi,Telly",model:"WakeNet9"},{id:"wn9_linaiban_tts2",name:"Lina Board",model:"WakeNet9"}],i=nA(()=>{const l=t.chipModel.toLowerCase();return l==="esp32s3"||l==="esp32p4"}),r=nA(()=>{const l=t.chipModel.toLowerCase();return l==="esp32c3"||l==="esp32c5"||l==="esp32c6"}),C=nA(()=>t.chipModel.toLowerCase()==="esp32s3"),B=nA(()=>i.value||r.value),n=nA(()=>i.value?o.filter(l=>l.model==="WakeNet9"):r.value?o.filter(l=>l.model==="WakeNet9s"):[]),Q=j({name:"",command:"",threshold:20,duration:3e3,model:"mn6_en"}),s=j({name:"",command:"",duration:""}),E=()=>{let l=!0;return s.value={name:"",command:"",duration:""},Q.value.name.trim()||(s.value.name=g("wakewordConfig.errors.nameRequired"),l=!1),Q.value.command.trim()?Q.value.model.includes("_en")&&/[!,.?]/.test(Q.value.command)&&(s.value.command=g("wakewordConfig.errors.noPunctuation"),l=!1):(s.value.command=g("wakewordConfig.errors.commandRequired"),l=!1),(!Q.value.duration||Q.value.duration<500||Q.value.duration>1e4)&&(s.value.duration=g("wakewordConfig.errors.durationRange"),l=!1),l},h=j(!1),w=l=>{var f;I("update:modelValue",{...t.modelValue,type:l,preset:l==="preset"&&(t.modelValue.preset||((f=n.value[0])==null?void 0:f.id))||"",custom:{...t.modelValue.custom,...Q.value}})},u=l=>{I("update:modelValue",{...t.modelValue,preset:l})};return DA(Q,l=>{h.value||t.modelValue.type==="custom"&&(E(),I("update:modelValue",{...t.modelValue,custom:{...l}}))},{deep:!0}),DA(()=>t.modelValue.custom,l=>{l&&(h.value=!0,Q.value={name:l.name||"",command:l.command||"",threshold:l.threshold!==void 0?l.threshold:20,duration:l.duration!==void 0?l.duration:3e3,model:l.model||"mn6_en"},nt(()=>{h.value=!1}))},{deep:!0,immediate:!0}),(l,f)=>(G(),U("div",_I,[a("div",null,[a("h3",$I,d(l.$t("wakewordConfig.title")),1),a("p",Ao,d(l.$t("wakewordConfig.description")),1)]),B.value?(G(),U("div",Io,[a("div",oo,[a("button",{onClick:f[0]||(f[0]=c=>w("none")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="none"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(l.$t("wakewordConfig.noWakeword")),3),a("button",{onClick:f[1]||(f[1]=c=>w("preset")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="preset"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(l.$t("wakewordConfig.presetWakeword")),3),C.value?(G(),U("button",{key:0,onClick:f[2]||(f[2]=c=>w("custom")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="custom"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(l.$t("wakewordConfig.customWakeword")),3)):O("",!0)]),e.modelValue.type==="preset"?(G(),U("div",io,[a("label",ro,d(l.$t("wakewordConfig.selectWakeword")),1),a("div",Co,[a("select",{value:e.modelValue.preset,onChange:f[3]||(f[3]=c=>u(c.target.value)),class:"w-full border border-gray-300 rounded-md px-3 py-2 pr-10 bg-white focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},[(G(!0),U(bA,null,LA(n.value,c=>(G(),U("option",{key:c.id,value:c.id},d(c.name)+" ("+d(c.model)+") ",9,Bo))),128))],40,no)])])):O("",!0),e.modelValue.type==="custom"?(G(),U("div",ao,[a("h4",so,d(l.$t("wakewordConfig.customSettings")),1),a("div",Qo,[a("div",null,[a("label",Eo,[HA(d(l.$t("wakewordConfig.wakewordName"))+" ",1),f[9]||(f[9]=a("span",{class:"text-red-500"},"*",-1))]),rA(a("input",{type:"text","onUpdate:modelValue":f[4]||(f[4]=c=>Q.value.name=c),placeholder:l.$t("wakewordConfig.wakewordNamePlaceholder"),class:gA(["w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500",{"border-red-500":s.value.name}])},null,10,lo),[[sA,Q.value.name]]),s.value.name?(G(),U("p",co,d(s.value.name),1)):O("",!0)]),a("div",null,[a("label",ho,[HA(d(l.$t("wakewordConfig.wakewordCommand"))+" ",1),f[10]||(f[10]=a("span",{class:"text-red-500"},"*",-1))]),rA(a("input",{type:"text","onUpdate:modelValue":f[5]||(f[5]=c=>Q.value.command=c),placeholder:l.$t("wakewordConfig.wakewordCommandPlaceholderEN"),class:gA(["w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500",{"border-red-500":s.value.command}])},null,10,uo),[[sA,Q.value.command]]),s.value.command?(G(),U("p",fo,d(s.value.command),1)):O("",!0)])]),a("div",wo,[a("div",null,[a("label",po,d(l.$t("wakewordConfig.threshold")),1),a("div",yo,[rA(a("input",{type:"range","onUpdate:modelValue":f[6]||(f[6]=c=>Q.value.threshold=c),min:"0",max:"100",step:"1",class:"flex-1"},null,512),[[sA,Q.value.threshold,void 0,{number:!0}]]),a("span",Do,d(Q.value.threshold),1)]),a("p",mo,d(l.$t("wakewordConfig.thresholdDesc")),1)]),a("div",null,[a("label",Fo,d(l.$t("wakewordConfig.duration"))+" (ms) ",1),rA(a("input",{type:"number","onUpdate:modelValue":f[7]||(f[7]=c=>Q.value.duration=c),min:"500",max:"10000",step:"100",class:gA(["w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500",{"border-red-500":s.value.duration}])},null,2),[[sA,Q.value.duration,void 0,{number:!0}]]),s.value.duration?(G(),U("p",ko,d(s.value.duration),1)):O("",!0)]),a("div",null,[a("label",vo,d(l.$t("wakewordConfig.selectModel")),1),rA(a("select",{"onUpdate:modelValue":f[8]||(f[8]=c=>Q.value.model=c),class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500"},[a("option",So,d(l.$t("wakewordConfig.mn6en")),1)],512),[[Xe,Q.value.model]])])])])):O("",!0),a("div",Go,[a("div",Ro,[a("strong",null,d(l.$t("wakewordConfig.tips.tipLabel")),1),a("ul",Uo,[a("li",null,d(l.$t("wakewordConfig.tips.optional")),1),r.value?(G(),U("li",No,d(l.$t("wakewordConfig.tips.wakeNet9sOnly")),1)):i.value?(G(),U("li",bo,d(l.$t("wakewordConfig.tips.wakeNet9Full")),1)):O("",!0),C.value?(G(),U("li",Lo,d(l.$t("wakewordConfig.tips.customSupport")),1)):O("",!0)])])])])):(G(),U("div",eo,[a("div",go,[a("strong",null,d(l.$t("wakewordConfig.notice")),1),a("p",to,d(l.$t("wakewordConfig.unsupportedMessage",{chipModel:e.chipModel})),1)])]))]))}};class Jo{constructor(){this.dbName="XiaozhiConfigDB",this.version=1,this.db=null,this.initialized=!1}async initialize(){if(!(this.initialized&&this.db))return new Promise((A,g)=>{const t=indexedDB.open(this.dbName,this.version);t.onerror=()=>{console.error("IndexedDB initialization failed:",t.error),g(t.error)},t.onsuccess=()=>{this.db=t.result,this.initialized=!0,console.log("IndexedDB initialized successfully"),A()},t.onupgradeneeded=I=>{const o=I.target.result;if(o.objectStoreNames.contains("configs")||o.createObjectStore("configs",{keyPath:"key"}).createIndex("timestamp","timestamp",{unique:!1}),!o.objectStoreNames.contains("files")){const i=o.createObjectStore("files",{keyPath:"id"});i.createIndex("type","type",{unique:!1}),i.createIndex("timestamp","timestamp",{unique:!1})}if(!o.objectStoreNames.contains("temp_data")){const i=o.createObjectStore("temp_data",{keyPath:"key"});i.createIndex("type","type",{unique:!1}),i.createIndex("timestamp","timestamp",{unique:!1})}console.log("IndexedDB schema created")}})}async saveConfig(A){this.initialized||await this.initialize();const t={key:"current_config",config:this.sanitizeConfigForStorage(A),timestamp:Date.now()};return new Promise((I,o)=>{const C=this.db.transaction(["configs"],"readwrite").objectStore("configs").put(t);C.onerror=()=>{console.error("Failed to save config:",C.error),o(C.error)},C.onsuccess=()=>{console.log("Config saved to IndexedDB"),I()}})}sanitizeConfigForStorage(A){var t,I,o,i,r,C,B,n,Q,s;const g=JSON.parse(JSON.stringify(A||{}));try{if((I=(t=g==null?void 0:g.theme)==null?void 0:t.font)!=null&&I.custom&&(g.theme.font.custom.file=null),((i=(o=g==null?void 0:g.theme)==null?void 0:o.emoji)==null?void 0:i.type)==="custom"){g.theme.emoji.custom||(g.theme.emoji.custom={});const E=((C=(r=g.theme.emoji)==null?void 0:r.custom)==null?void 0:C.images)||{},h={};if(Object.keys(E).forEach(w=>{h[w]=null}),g.theme.emoji.custom.images=h,g.theme.emoji.custom.emotionMap,g.theme.emoji.custom.fileMap){const w=g.theme.emoji.custom.fileMap,u={};Object.keys(w).forEach(l=>{u[l]=null}),g.theme.emoji.custom.fileMap=u}}(n=(B=g==null?void 0:g.theme)==null?void 0:B.skin)!=null&&n.light&&(g.theme.skin.light.backgroundImage=null),(s=(Q=g==null?void 0:g.theme)==null?void 0:Q.skin)!=null&&s.dark&&(g.theme.skin.dark.backgroundImage=null)}catch{}return g}async loadConfig(){return this.initialized||await this.initialize(),new Promise((A,g)=>{const o=this.db.transaction(["configs"],"readonly").objectStore("configs").get("current_config");o.onerror=()=>{console.error("Failed to load config:",o.error),g(o.error)},o.onsuccess=()=>{const i=o.result;i?(console.log("Config restored from IndexedDB successfully"),A({config:i.config,timestamp:i.timestamp})):A(null)}})}async saveFile(A,g,t,I={}){this.initialized||await this.initialize();const o=await this.fileToArrayBuffer(g);let i={};try{i=I?JSON.parse(JSON.stringify(I)):{}}catch{i={...I}}const r={id:A,type:t,name:g.name,size:g.size,mimeType:g.type,lastModified:g.lastModified,data:o,metadata:i,timestamp:Date.now()};return new Promise((C,B)=>{const s=this.db.transaction(["files"],"readwrite").objectStore("files").put(r);s.onerror=()=>{console.error("Failed to save file:",s.error),B(s.error)},s.onsuccess=()=>{console.log(`File ${g.name} saved to IndexedDB`),C()}})}async loadFile(A){return this.initialized||await this.initialize(),new Promise((g,t)=>{const i=this.db.transaction(["files"],"readonly").objectStore("files").get(A);i.onerror=()=>{console.error("Failed to load file:",i.error),t(i.error)},i.onsuccess=()=>{const r=i.result;if(r){const C=new Blob([r.data],{type:r.mimeType}),B=new File([C],r.name,{type:r.mimeType,lastModified:r.lastModified});B.storedId=r.id,B.storedType=r.type,B.storedMetadata=r.metadata,B.storedTimestamp=r.timestamp,console.log(`File ${r.name} restored from IndexedDB successfully`),g(B)}else g(null)}})}async getFilesByType(A){return this.initialized||await this.initialize(),new Promise((g,t)=>{const r=this.db.transaction(["files"],"readonly").objectStore("files").index("type").getAll(A);r.onerror=()=>{console.error("Failed to get file list:",r.error),t(r.error)},r.onsuccess=()=>{const B=(r.result||[]).map(n=>{const Q=new Blob([n.data],{type:n.mimeType}),s=new File([Q],n.name,{type:n.mimeType,lastModified:n.lastModified});return s.storedId=n.id,s.storedType=n.type,s.storedMetadata=n.metadata,s.storedTimestamp=n.timestamp,s});g(B)}})}async saveTempData(A,g,t,I={}){this.initialized||await this.initialize();const o={key:A,type:t,data:g,metadata:I,timestamp:Date.now()};return new Promise((i,r)=>{const n=this.db.transaction(["temp_data"],"readwrite").objectStore("temp_data").put(o);n.onerror=()=>{console.error("Failed to save temporary data:",n.error),r(n.error)},n.onsuccess=()=>{console.log(`Temporary data ${A} saved`),i()}})}async loadTempData(A){return this.initialized||await this.initialize(),new Promise((g,t)=>{const i=this.db.transaction(["temp_data"],"readonly").objectStore("temp_data").get(A);i.onerror=()=>{console.error("Failed to load temporary data:",i.error),t(i.error)},i.onsuccess=()=>{const r=i.result;g(r||null)}})}async clearAll(){this.initialized||await this.initialize();const A=["configs","files","temp_data"];return new Promise((g,t)=>{const I=this.db.transaction(A,"readwrite");let o=0,i=!1;const r=()=>{o++,o===A.length&&(i?t(new Error("Error occurred while clearing partial data")):(console.log("All storage data cleared"),g()))};A.forEach(C=>{const n=I.objectStore(C).clear();n.onerror=()=>{console.error(`Failed to clear ${C}:`,n.error),i=!0,r()},n.onsuccess=()=>{console.log(`${C} cleared`),r()}})})}async deleteFile(A){return this.initialized||await this.initialize(),new Promise((g,t)=>{const i=this.db.transaction(["files"],"readwrite").objectStore("files").delete(A);i.onerror=()=>{console.error("Failed to delete file:",i.error),t(i.error)},i.onsuccess=()=>{console.log(`File ${A} deleted`),g()}})}async getStorageInfo(){this.initialized||await this.initialize();const A=["configs","files","temp_data"],g={};for(const I of A){const o=await new Promise((i,r)=>{const n=this.db.transaction([I],"readonly").objectStore(I).count();n.onerror=()=>r(n.error),n.onsuccess=()=>i(n.result)});g[I]={count:o}}const t=await this.loadConfig();return g.lastSaved=t?new Date(t.timestamp):null,g}async hasStoredConfig(){try{return await this.loadConfig()!==null}catch(A){return console.error("Error checking config:",A),!1}}fileToArrayBuffer(A){return new Promise((g,t)=>{const I=new FileReader;I.onload=()=>g(I.result),I.onerror=()=>t(new Error("Failed to read file")),I.readAsArrayBuffer(A)})}close(){this.db&&(this.db.close(),this.db=null,this.initialized=!1,console.log("IndexedDB connection closed"))}}const cA=new Jo;class Ie{static async saveFontFile(A,g={}){if(A){const t="custom_font";try{await cA.saveFile(t,A,"font",{size:g.size||20,bpp:g.bpp||4,charset:g.charset||"deepseek"}),console.log(`Font file saved: ${A.name}`)}catch(I){console.warn(`Failed to save font file: ${A.name}`,I)}}}static async saveEmojiFile(A,g,t={}){var I,o;if(g&&A){const i=A.startsWith("hash_")?A:`emoji_${A}`;try{const r=((I=t==null?void 0:t.size)==null?void 0:I.width)??64,C=((o=t==null?void 0:t.size)==null?void 0:o.height)??64;await cA.saveFile(i,g,"emoji",{name:A,size:{width:r,height:C},format:t==null?void 0:t.format,emotions:t==null?void 0:t.emotions}),console.log(`Expression file saved: ${i} - ${g.name}`)}catch(r){console.warn(`Failed to save expression file: ${A}`,r)}}}static async saveBackgroundFile(A,g,t={}){if(g&&A){const I=`background_${A}`;try{let o={};try{o=t?JSON.parse(JSON.stringify(t)):{}}catch{o={...t}}await cA.saveFile(I,g,"background",{mode:A,...o}),console.log(`Background file saved: ${A} - ${g.name}`)}catch(o){console.warn(`Failed to save background file: ${A}`,o)}}}static async restoreFontFile(){try{return await cA.loadFile("custom_font")}catch(A){return console.warn("Failed to restore font file:",A),null}}static async restoreEmojiFile(A){if(!A)return null;try{const g=A.startsWith("hash_")?A:`emoji_${A}`;return await cA.loadFile(g)}catch(g){return console.warn(`Failed to restore expression file: ${A}`,g),null}}static async restoreBackgroundFile(A){if(!A)return null;try{const g=`background_${A}`;return await cA.loadFile(g)}catch(g){return console.warn(`Failed to restore background file: ${A}`,g),null}}static async deleteFontFile(){try{await cA.deleteFile("custom_font"),console.log("Font file deleted")}catch(A){console.warn("Failed to delete font file:",A)}}static async deleteEmojiFile(A){if(A)try{const g=A.startsWith("hash_")?A:`emoji_${A}`;await cA.deleteFile(g),console.log(`Expression file deleted: ${g}`)}catch(g){console.warn(`Failed to delete expression file: ${A}`,g)}}static async deleteBackgroundFile(A){if(A)try{const g=`background_${A}`;await cA.deleteFile(g),console.log(`Background file deleted: ${A}`)}catch(g){console.warn(`Failed to delete background file: ${A}`,g)}}static async getStorageInfo(){try{return await cA.getStorageInfo()}catch(A){return console.warn("Failed to get storage info:",A),{configs:{count:0},files:{count:0},temp_data:{count:0},lastSaved:null}}}static async clearAllFiles(){try{await cA.clearAll(),console.log("All storage files cleaned")}catch(A){throw console.warn("Failed to clean up storage files:",A),A}}}const xo={class:"space-y-6"},Ho={class:"text-lg font-medium text-gray-900 mb-2"},Yo={class:"text-gray-600"},Ko={class:"space-y-4"},To={class:"flex space-x-4"},Vo={key:0,class:"space-y-4"},qo={class:"bg-gray-50 border border-gray-200 rounded-lg p-6 text-center"},Oo={class:"mt-2 text-gray-600"},Wo={key:1,class:"space-y-4"},Po={class:"font-medium text-gray-900"},Zo={class:"grid grid-cols-1 md:grid-cols-4 gap-4"},Xo=["onClick"],jo={class:"flex items-start justify-between"},zo={class:"flex-1"},_o={class:"font-medium text-gray-900 mb-1"},$o={class:"text-sm text-gray-600 space-y-1"},Ai={key:0,class:"flex-shrink-0 ml-3"},ei={key:2,class:"space-y-6"},gi={class:"font-medium text-gray-900"},ti={class:"space-y-2"},Ii={class:"block text-sm font-medium text-gray-700"},oi={key:0},ii={class:"mt-2"},ri={class:"text-gray-500"},Ci={class:"text-xs text-gray-400 mt-1"},ni={key:1,class:"text-green-600"},Bi={class:"mt-1 font-medium"},ai={key:0,class:"grid grid-cols-1 md:grid-cols-3 gap-4"},si={class:"block text-sm font-medium text-gray-700 mb-2"},Qi={class:"text-xs text-gray-500 mt-1"},Ei={class:"block text-sm font-medium text-gray-700 mb-2"},li={value:1},ci={value:2},hi={value:4},ui={class:"block text-sm font-medium text-gray-700 mb-2"},di={value:"qwen"},fi={value:"deepseek"},wi={value:"latin"},pi={value:"full"},yi={class:"flex items-center justify-between p-4 bg-gray-50 rounded-lg border border-gray-200"},Di={class:"flex-1"},mi={class:"font-medium text-gray-900"},Fi={class:"text-sm text-gray-500 mt-1"},ki={class:"ml-4"},vi={class:"relative inline-flex items-center cursor-pointer"},Si=["checked"],Gi={__name:"FontConfig",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(e,{emit:A}){const{t:g}=TA(),t=e,I=A,o=j(null),i=[{id:"font_puhui_deepseek_14_1",size:14,bpp:1,fileSize:"~180KB"},{id:"font_puhui_deepseek_16_4",size:16,bpp:4,fileSize:"~720KB"},{id:"font_puhui_deepseek_20_4",size:20,bpp:4,fileSize:"~1.1MB"},{id:"font_puhui_deepseek_30_4",size:30,bpp:4,fileSize:"~2.5MB"},{id:"font_noto_qwen_14_1",size:14,bpp:1,fileSize:"~626KB"},{id:"font_noto_qwen_16_4",size:16,bpp:4,fileSize:"~2.0MB"},{id:"font_noto_qwen_20_4",size:20,bpp:4,fileSize:"~2.9MB"},{id:"font_noto_qwen_30_4",size:30,bpp:4,fileSize:"~5.8MB"}],r=nA(()=>i.map(u=>{let l;return u.id.startsWith("font_puhui_deepseek_")?l=g("fontConfig.charsetDeepseek"):u.id.startsWith("font_noto_qwen_")&&(l=g("fontConfig.charsetQwen")),{...u,name:g("fontConfig.presetFontNames."+u.id),charset:l}})),C=j({size:20,bpp:4,charset:"qwen"}),B=u=>{I("update:modelValue",{...t.modelValue,type:u,preset:u==="preset"?t.modelValue.preset||"font_puhui_deepseek_20_4":"",custom:{...t.modelValue.custom,file:t.modelValue.custom.file||null}})},n=u=>{I("update:modelValue",{...t.modelValue,preset:u,custom:{...t.modelValue.custom,file:t.modelValue.custom.file||null}})},Q=u=>{const l=u.target.files[0];l&&E(l)},s=u=>{u.preventDefault();const l=u.dataTransfer.files;l.length>0&&E(l[0])},E=async u=>{u&&(u.type.includes("font")||u.name.toLowerCase().match(/\.(ttf|woff|woff2)$/))?(I("update:modelValue",{...t.modelValue,custom:{...t.modelValue.custom,file:u,...C.value}}),await Ie.saveFontFile(u,C.value)):alert(g("fontConfig.selectValidFontFile"))},h=async()=>{I("update:modelValue",{...t.modelValue,custom:{...t.modelValue.custom,file:null}}),o.value&&(o.value.value=""),await Ie.deleteFontFile()},w=j(!1);return DA(()=>C.value,u=>{w.value||t.modelValue.type==="custom"&&t.modelValue.custom.file&&I("update:modelValue",{...t.modelValue,custom:{...t.modelValue.custom,...u}})},{deep:!0}),DA(()=>t.modelValue.custom,u=>{u.size&&u.bpp&&u.charset&&(w.value=!0,C.value={size:u.size,bpp:u.bpp,charset:u.charset},nt(()=>{w.value=!1}))},{deep:!0,immediate:!0}),(u,l)=>{var f;return G(),U("div",xo,[a("div",null,[a("h3",Ho,d(u.$t("fontConfig.title")),1),a("p",Yo,d(u.$t("fontConfig.description")),1)]),a("div",Ko,[a("div",To,[a("button",{onClick:l[0]||(l[0]=c=>B("none")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="none"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(u.$t("fontConfig.noFonts")),3),a("button",{onClick:l[1]||(l[1]=c=>B("preset")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="preset"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(u.$t("fontConfig.presetFonts")),3),a("button",{onClick:l[2]||(l[2]=c=>B("custom")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="custom"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(u.$t("fontConfig.customFonts")),3)])]),e.modelValue.type==="none"?(G(),U("div",Vo,[a("div",qo,[l[10]||(l[10]=a("svg",{class:"mx-auto h-12 w-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)),a("p",Oo,d(u.$t("fontConfig.noFontsDescription")),1)])])):O("",!0),e.modelValue.type==="preset"?(G(),U("div",Wo,[a("h4",Po,d(u.$t("fontConfig.presetFonts")),1),a("div",Zo,[(G(!0),U(bA,null,LA(r.value,c=>(G(),U("div",{key:c.id,onClick:D=>n(c.id),class:gA(["border-2 rounded-lg p-4 cursor-pointer transition-all",e.modelValue.preset===c.id?"border-primary-500 bg-primary-50":"border-gray-200 hover:border-gray-300"])},[a("div",jo,[a("div",zo,[a("h5",_o,d(c.name),1),a("div",$o,[a("div",null,d(u.$t("fontConfig.fontSize"))+" "+d(c.size)+"px",1),a("div",null,d(u.$t("fontConfig.bitDepth"))+" "+d(c.bpp)+"bpp",1),a("div",null,d(u.$t("fontConfig.charset"))+" "+d(c.charset),1),a("div",null,d(u.$t("fontConfig.fileSize"))+" "+d(c.fileSize),1)])]),e.modelValue.preset===c.id?(G(),U("div",Ai,[...l[11]||(l[11]=[a("div",{class:"w-5 h-5 bg-primary-500 rounded-full flex items-center justify-center"},[a("svg",{class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})])],-1)])])):O("",!0)])],10,Xo))),128))])])):O("",!0),e.modelValue.type==="custom"?(G(),U("div",ei,[a("h4",gi,d(u.$t("fontConfig.customFonts")),1),a("div",ti,[a("label",Ii,d(u.$t("fontConfig.fontFile")),1),a("div",{onDrop:s,onDragover:l[4]||(l[4]=PA(()=>{},["prevent"])),onDragenter:l[5]||(l[5]=PA(()=>{},["prevent"])),class:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center hover:border-gray-400 transition-colors"},[a("input",{ref_key:"fileInput",ref:o,type:"file",accept:".ttf,.woff,.woff2",onChange:Q,class:"hidden"},null,544),e.modelValue.custom.file?(G(),U("div",ni,[l[13]||(l[13]=a("svg",{class:"mx-auto h-8 w-8",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1)),a("p",Bi,d((f=e.modelValue.custom.file)==null?void 0:f.name),1),a("button",{onClick:h,class:"text-red-600 hover:text-red-500 text-sm mt-1"},d(u.$t("fontConfig.removeFile")),1)])):(G(),U("div",oi,[l[12]||(l[12]=a("svg",{class:"mx-auto h-12 w-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})],-1)),a("div",ii,[a("button",{onClick:l[3]||(l[3]=c=>u.$refs.fileInput.click()),class:"text-primary-600 hover:text-primary-500 font-medium"},d(u.$t("fontConfig.clickSelectFontFile")),1),a("p",ri,d(u.$t("fontConfig.orDragFileHere")),1)]),a("p",Ci,d(u.$t("fontConfig.supportedFormats")),1)]))],32)]),e.modelValue.custom.file?(G(),U("div",ai,[a("div",null,[a("label",si,d(u.$t("fontConfig.fontSizePx")),1),rA(a("input",{type:"number","onUpdate:modelValue":l[6]||(l[6]=c=>C.value.size=c),min:"8",max:"80",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},null,512),[[sA,C.value.size,void 0,{number:!0}]]),a("p",Qi,d(u.$t("fontConfig.range"))+" 8-80px",1)]),a("div",null,[a("label",Ei,d(u.$t("fontConfig.bitDepthBpp")),1),rA(a("select",{"onUpdate:modelValue":l[7]||(l[7]=c=>C.value.bpp=c),class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},[a("option",li,d(u.$t("fontConfig.monochrome")),1),a("option",ci,d(u.$t("fontConfig.fourColors")),1),a("option",hi,d(u.$t("fontConfig.sixteenColors")),1)],512),[[Xe,C.value.bpp]])]),a("div",null,[a("label",ui,d(u.$t("fontConfig.characterSet")),1),rA(a("select",{"onUpdate:modelValue":l[8]||(l[8]=c=>C.value.charset=c),class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},[a("option",di,d(u.$t("fontConfig.qwen18409")),1),a("option",fi,d(u.$t("fontConfig.deepseekR1")),1),a("option",wi,d(u.$t("fontConfig.latin1")),1),a("option",pi,d(u.$t("fontConfig.fullCharset")),1)],512),[[Xe,C.value.charset]])])])):O("",!0)])):O("",!0),a("div",yi,[a("div",Di,[a("h4",mi,d(u.$t("fontConfig.hideSubtitle")),1),a("p",Fi,d(u.$t("fontConfig.hideSubtitleDescription")),1)]),a("div",ki,[a("label",vi,[a("input",{type:"checkbox",checked:e.modelValue.hide_subtitle,onChange:l[9]||(l[9]=c=>I("update:modelValue",{...e.modelValue,hide_subtitle:c.target.checked})),class:"sr-only peer"},null,40,Si),l[14]||(l[14]=a("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-primary-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary-500"},null,-1))])])])])}}},Ri={class:"space-y-6"},Ui={class:"text-lg font-medium text-gray-900 mb-2"},Ni={class:"text-gray-600"},bi={class:"space-y-4"},Li={class:"flex flex-wrap gap-3"},Mi={key:0,class:"text-sm text-gray-500"},Ji={key:0,class:"space-y-4"},xi={class:"font-medium text-gray-900"},Hi={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Yi=["onClick"],Ki={class:"flex items-start justify-between mb-3"},Ti={class:"font-medium text-gray-900"},Vi={class:"text-sm text-gray-600"},qi={class:"text-xs text-gray-500 mt-1"},Oi={key:0,class:"flex-shrink-0 ml-3"},Wi={class:"grid grid-cols-7 gap-1 justify-items-center overflow-hidden"},Pi=["src","alt"],Zi={key:1,class:"space-y-6"},Xi={class:"font-medium text-gray-900"},ji={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},zi={class:"block text-sm font-medium text-gray-700 mb-2"},_i={class:"block text-sm font-medium text-gray-700 mb-2"},$i={class:"space-y-4"},Ar={class:"font-medium text-gray-900"},er={class:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-4"},gr={class:"text-center"},tr={class:"text-lg mb-1"},Ir={class:"text-xs text-gray-600 flex items-center justify-center gap-1"},or={key:0,class:"text-red-500"},ir=["onDrop"],rr=["onChange"],Cr=["onClick"],nr={class:"text-xs text-gray-500"},Br={key:1,class:"w-full h-full relative"},ar=["src","alt"],sr=["onClick"],Qr={class:"text-xs text-gray-500 mt-2"},Er={__name:"EmojiConfig",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(e,{emit:A}){const{t:g}=TA(),t=e,I=A,o=async f=>{const c=await f.arrayBuffer(),D=await crypto.subtle.digest("SHA-256",c);return Array.from(new Uint8Array(D)).map(N=>N.toString(16).padStart(2,"0")).join("")},i=[{id:"twemoji32",name:g("emojiConfig.twitterEmojiName",{size:32}),description:g("emojiConfig.twitterEmojiDescription",{size:32}),size:32,format:"png",preview:["neutral","happy","laughing","funny","sad","angry","crying"]},{id:"twemoji64",name:g("emojiConfig.twitterEmojiName",{size:64}),description:g("emojiConfig.twitterEmojiDescription",{size:64}),size:64,format:"png",preview:["neutral","happy","laughing","funny","sad","angry","crying"]},{id:"noto-emoji_64",name:g("emojiConfig.notoEmojiName",{size:64}),description:g("emojiConfig.notoEmojiDescription",{size:64}),size:64,format:"gif",preview:["neutral","happy","laughing","funny","sad","angry","crying"]},{id:"noto-emoji_128",name:g("emojiConfig.notoEmojiName",{size:128}),description:g("emojiConfig.notoEmojiDescription",{size:128}),size:128,format:"gif",preview:["neutral","happy","laughing","funny","sad","angry","crying"]}],r=nA(()=>[{key:"neutral",name:g("emojiConfig.emotions.neutral"),emoji:"😶"},{key:"happy",name:g("emojiConfig.emotions.happy"),emoji:"🙂"},{key:"laughing",name:g("emojiConfig.emotions.laughing"),emoji:"😆"},{key:"funny",name:g("emojiConfig.emotions.funny"),emoji:"😂"},{key:"sad",name:g("emojiConfig.emotions.sad"),emoji:"😔"},{key:"angry",name:g("emojiConfig.emotions.angry"),emoji:"😠"},{key:"crying",name:g("emojiConfig.emotions.crying"),emoji:"😭"},{key:"loving",name:g("emojiConfig.emotions.loving"),emoji:"😍"},{key:"embarrassed",name:g("emojiConfig.emotions.embarrassed"),emoji:"😳"},{key:"surprised",name:g("emojiConfig.emotions.surprised"),emoji:"😯"},{key:"shocked",name:g("emojiConfig.emotions.shocked"),emoji:"😱"},{key:"thinking",name:g("emojiConfig.emotions.thinking"),emoji:"🤔"},{key:"winking",name:g("emojiConfig.emotions.winking"),emoji:"😉"},{key:"cool",name:g("emojiConfig.emotions.cool"),emoji:"😎"},{key:"relaxed",name:g("emojiConfig.emotions.relaxed"),emoji:"😌"},{key:"delicious",name:g("emojiConfig.emotions.delicious"),emoji:"🤤"},{key:"kissy",name:g("emojiConfig.emotions.kissy"),emoji:"😘"},{key:"confident",name:g("emojiConfig.emotions.confident"),emoji:"😏"},{key:"sleepy",name:g("emojiConfig.emotions.sleepy"),emoji:"😴"},{key:"silly",name:g("emojiConfig.emotions.silly"),emoji:"😜"},{key:"confused",name:g("emojiConfig.emotions.confused"),emoji:"🙄"}]),C=j({size:{width:32,height:32}}),B=f=>{if(t.modelValue.type===f)return;const c={...t.modelValue,type:f};f==="none"?(c.preset="",c.custom={...t.modelValue.custom,images:t.modelValue.custom.images||{}}):f==="preset"?(c.preset=t.modelValue.preset||"twemoji32",c.custom={...t.modelValue.custom,images:t.modelValue.custom.images||{}}):f==="custom"&&(c.preset="",c.custom={...t.modelValue.custom,images:t.modelValue.custom.images||{}}),I("update:modelValue",c)},n=f=>{t.modelValue.preset!==f&&I("update:modelValue",{...t.modelValue,preset:f,custom:{...t.modelValue.custom,images:t.modelValue.custom.images||{}}})},Q=(f,c)=>{const D=f.target.files[0];D&&E(c,D)},s=(f,c)=>{f.preventDefault();const D=f.dataTransfer.files;D.length>0&&E(c,D[0])},E=async(f,c)=>{const D=["png","gif"],p=c.name.split(".").pop().toLowerCase();if(!D.includes(p)){alert(g("emojiConfig.selectValidFormat"));return}const v=await o(c),N=t.modelValue.custom||{},L={...N.fileMap||{}},X={...N.emotionMap||{}},k={...N.images||{}};let m=[];for(const[M,oA]of Object.entries(X))oA===v&&M!==f&&m.push(M);m.length>0&&console.log(g("emojiConfig.sharedFileMessage",{emotionKey:f,existingEmotions:m.join(", ")})),L[v]=c,X[f]=v,k[f]=c,I("update:modelValue",{...t.modelValue,custom:{...N,size:C.value.size,images:k,fileMap:L,emotionMap:X}}),await Ie.saveEmojiFile(`hash_${v}`,c,{size:C.value.size,format:p,emotions:[...m,f]})},h=async f=>{const c=t.modelValue.custom||{},D={...c.images},p={...c.emotionMap||{}},v={...c.fileMap||{}},N=p[f];delete D[f],delete p[f],Object.values(p).filter(X=>X===N).length===0&&N?(delete v[N],await Ie.deleteEmojiFile(`hash_${N}`),console.log(g("emojiConfig.fileDeleted",{fileHash:N}))):console.log(g("emojiConfig.fileRetained",{fileHash:N})),I("update:modelValue",{...t.modelValue,custom:{...c,images:D,emotionMap:p,fileMap:v}})},w=(f,c)=>{const D=i.find(v=>v.id===f),p=(D==null?void 0:D.format)||"png";return`./static/emojis/${f}/${c}.${p}`},u=f=>{if(t.modelValue.type==="preset")return w(t.modelValue.preset,f);{const c=t.modelValue.custom.images[f];return c instanceof File||c instanceof Blob?URL.createObjectURL(c):null}},l=f=>{console.warn(g("emojiConfig.imageLoadFailed"),f.target.src),f.target.style.display="none"};return DA(()=>C.value.size,f=>{if(t.modelValue.type==="custom"){const c=t.modelValue.custom;JSON.stringify(c.size)!==JSON.stringify(f)&&I("update:modelValue",{...t.modelValue,custom:{...c,size:f}})}},{deep:!0}),t.modelValue.custom.size&&(C.value={size:{...t.modelValue.custom.size}}),(f,c)=>(G(),U("div",Ri,[a("div",null,[a("h3",Ui,d(f.$t("emojiConfig.title")),1),a("p",Ni,d(f.$t("emojiConfig.description")),1)]),a("div",bi,[a("div",Li,[a("button",{onClick:c[0]||(c[0]=D=>B("none")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="none"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(f.$t("emojiConfig.noEmojiPack")),3),a("button",{onClick:c[1]||(c[1]=D=>B("preset")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="preset"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(f.$t("emojiConfig.presetEmojiPack")),3),a("button",{onClick:c[2]||(c[2]=D=>B("custom")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="custom"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(f.$t("emojiConfig.customEmojiPack")),3)]),e.modelValue.type==="none"?(G(),U("p",Mi,d(f.$t("emojiConfig.noEmojiPackDescription")),1)):O("",!0)]),e.modelValue.type==="preset"?(G(),U("div",Ji,[a("h4",xi,d(f.$t("emojiConfig.selectPresetEmojiPack")),1),a("div",Hi,[(G(),U(bA,null,LA(i,D=>a("div",{key:D.id,onClick:p=>n(D.id),class:gA(["border-2 rounded-lg p-4 cursor-pointer transition-all",e.modelValue.preset===D.id?"border-primary-500 bg-primary-50":"border-gray-200 hover:border-gray-300"])},[a("div",Ki,[a("div",null,[a("h5",Ti,d(D.name),1),a("p",Vi,d(D.description),1),a("div",qi,d(f.$t("emojiConfig.size"))+": "+d(D.size)+"px × "+d(D.size)+"px ",1)]),e.modelValue.preset===D.id?(G(),U("div",Oi,[...c[7]||(c[7]=[a("div",{class:"w-5 h-5 bg-primary-500 rounded-full flex items-center justify-center"},[a("svg",{class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})])],-1)])])):O("",!0)]),a("div",Wi,[(G(!0),U(bA,null,LA(D.preview,p=>(G(),U("div",{key:p,style:CA({width:D.size+"px",height:D.size+"px"}),class:"bg-gray-100 rounded flex items-center justify-center"},[a("img",{src:w(D.id,p),alt:p,style:CA({width:D.size+"px",height:D.size+"px"}),class:"object-contain rounded",onError:l},null,44,Pi)],4))),128))])],10,Yi)),64))])])):O("",!0),e.modelValue.type==="custom"?(G(),U("div",Zi,[a("h4",Xi,d(f.$t("emojiConfig.customEmojiPackConfig")),1),a("div",ji,[a("div",null,[a("label",zi,d(f.$t("emojiConfig.maxImageWidth")),1),rA(a("input",{type:"number","onUpdate:modelValue":c[3]||(c[3]=D=>C.value.size.width=D),min:"16",max:"200",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},null,512),[[sA,C.value.size.width,void 0,{number:!0}]])]),a("div",null,[a("label",_i,d(f.$t("emojiConfig.maxImageHeight")),1),rA(a("input",{type:"number","onUpdate:modelValue":c[4]||(c[4]=D=>C.value.size.height=D),min:"16",max:"200",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},null,512),[[sA,C.value.size.height,void 0,{number:!0}]])])]),a("div",$i,[a("h5",Ar,d(f.$t("emojiConfig.uploadEmojiImages")),1),a("div",er,[(G(!0),U(bA,null,LA(r.value,D=>(G(),U("div",{key:D.key,class:"space-y-2"},[a("div",gr,[a("div",tr,d(D.emoji),1),a("div",Ir,[a("span",null,d(D.name),1),D.key==="neutral"?(G(),U("span",or,d(f.$t("emojiConfig.required")),1)):O("",!0)])]),a("div",{onDrop:p=>s(p,D.key),onDragover:c[5]||(c[5]=PA(()=>{},["prevent"])),onDragenter:c[6]||(c[6]=PA(()=>{},["prevent"])),class:gA(["border-2 border-dashed rounded-lg p-2 text-center cursor-pointer transition-colors aspect-square flex flex-col items-center justify-center",e.modelValue.custom.images[D.key]?"border-green-300 bg-green-50":D.key==="neutral"?"border-red-300 bg-red-50":"border-gray-300 hover:border-gray-400"])},[a("input",{ref_for:!0,ref:D.key+"Input",type:"file",accept:".png,.gif",onChange:p=>Q(p,D.key),class:"hidden"},null,40,rr),e.modelValue.custom.images[D.key]?(G(),U("div",Br,[u(D.key)?(G(),U("img",{key:0,src:u(D.key),alt:D.name,class:"w-full h-full object-cover rounded",onError:l},null,40,ar)):O("",!0),a("button",{onClick:p=>h(D.key),class:"absolute -top-1 -right-1 w-4 h-4 bg-red-500 text-white rounded-full flex items-center justify-center text-xs hover:bg-red-600"}," × ",8,sr)])):(G(),U("div",{key:0,onClick:p=>{var v;return(v=f.$refs[D.key+"Input"][0])==null?void 0:v.click()}},[c[8]||(c[8]=a("svg",{class:"w-6 h-6 text-gray-400 mx-auto mb-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})],-1)),a("div",nr,d(f.$t("emojiConfig.clickToUploadOrDrag")),1)],8,Cr))],42,ir)]))),128))]),a("div",Qr,d(f.$t("emojiConfig.neutralRequiredNotice")),1)])])):O("",!0)]))}},lr={class:"space-y-6"},cr={class:"text-lg font-medium text-gray-900 mb-2"},hr={class:"text-gray-600"},ur={class:"space-y-4"},dr={class:"font-medium text-gray-900 flex items-center"},fr={class:"border border-gray-200 rounded-lg p-4 space-y-4"},wr={class:"flex space-x-4"},pr={key:0,class:"space-y-3"},yr={class:"flex items-center space-x-3"},Dr={class:"text-sm font-medium text-gray-700"},mr={class:"flex items-center space-x-2"},Fr={class:"flex items-center space-x-3"},kr={class:"text-sm font-medium text-gray-700"},vr={class:"flex items-center space-x-2"},Sr={key:1,class:"space-y-3"},Gr={class:"text-sm font-medium text-gray-700"},Rr={class:"mt-1 text-sm text-gray-600"},Ur={key:1,class:"space-y-2"},Nr=["src"],br={class:"text-sm text-green-700 font-medium"},Lr={class:"flex items-center space-x-3"},Mr={class:"text-sm font-medium text-gray-700"},Jr={class:"flex items-center space-x-2"},xr={class:"space-y-4"},Hr={class:"font-medium text-gray-900 flex items-center"},Yr={class:"border border-gray-200 rounded-lg p-4 space-y-4"},Kr={class:"flex space-x-4"},Tr={key:0,class:"space-y-3"},Vr={class:"flex items-center space-x-3"},qr={class:"text-sm font-medium text-gray-700"},Or={class:"flex items-center space-x-2"},Wr={class:"flex items-center space-x-3"},Pr={class:"text-sm font-medium text-gray-700"},Zr={class:"flex items-center space-x-2"},Xr={key:1,class:"space-y-3"},jr={class:"text-sm font-medium text-gray-700"},zr={class:"mt-1 text-sm text-gray-600"},_r={key:1,class:"space-y-2"},$r=["src"],AC={class:"text-sm text-green-700 font-medium"},eC={class:"flex items-center space-x-3"},gC={class:"text-sm font-medium text-gray-700"},tC={class:"flex items-center space-x-2"},IC={class:"space-y-4"},oC={class:"font-medium text-gray-900"},iC={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},rC={class:"space-y-2"},CC={class:"text-sm font-medium text-gray-700"},nC={class:"absolute inset-0 bg-white bg-opacity-10 flex items-center justify-center rounded-lg"},BC={class:"space-y-2"},aC={class:"text-sm font-medium text-gray-700"},sC={class:"absolute inset-0 bg-black bg-opacity-10 flex items-center justify-center rounded-lg"},QC={class:"bg-blue-50 border border-blue-200 rounded-lg p-4"},EC={class:"font-medium text-blue-900 mb-2"},lC={class:"flex flex-wrap gap-2"},cC={__name:"BackgroundConfig",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(e,{emit:A}){const{t:g}=TA(),t=e,I=A,o=j(null),i=j(null),r=nA({get:()=>t.modelValue.light.backgroundColor,set:k=>E(k)}),C=nA({get:()=>t.modelValue.dark.backgroundColor,set:k=>h(k)}),B=nA({get:()=>t.modelValue.light.textColor,set:k=>w(k)}),n=nA({get:()=>t.modelValue.dark.textColor,set:k=>u(k)}),Q=k=>{I("update:modelValue",{...t.modelValue,light:{...t.modelValue.light,backgroundType:k,backgroundImage:k==="image"?t.modelValue.light.backgroundImage:null}})},s=k=>{I("update:modelValue",{...t.modelValue,dark:{...t.modelValue.dark,backgroundType:k,backgroundImage:k==="image"?t.modelValue.dark.backgroundImage:null}})},E=k=>{I("update:modelValue",{...t.modelValue,light:{...t.modelValue.light,backgroundColor:k}})},h=k=>{I("update:modelValue",{...t.modelValue,dark:{...t.modelValue.dark,backgroundColor:k}})},w=k=>{I("update:modelValue",{...t.modelValue,light:{...t.modelValue.light,textColor:k}})},u=k=>{I("update:modelValue",{...t.modelValue,dark:{...t.modelValue.dark,textColor:k}})},l=(k,m)=>{const M=k.target.files[0];M&&c(m,M)},f=(k,m)=>{k.preventDefault();const M=k.dataTransfer.files;M.length>0&&c(m,M[0])},c=async(k,m)=>{m&&m.type.startsWith("image/")?(I("update:modelValue",{...t.modelValue,[k]:{...t.modelValue[k],backgroundImage:m}}),await Ie.saveBackgroundFile(k,m)):alert(g("backgroundConfig.selectValidImage"))},D=async k=>{I("update:modelValue",{...t.modelValue,[k]:{...t.modelValue[k],backgroundImage:null}}),k==="light"&&o.value&&(o.value.value=""),k==="dark"&&i.value&&(i.value.value=""),await Ie.deleteBackgroundFile(k)},p=k=>{const m=t.modelValue[k].backgroundImage;return m?URL.createObjectURL(m):null},v=()=>t.modelValue.light.backgroundType==="image"&&t.modelValue.light.backgroundImage?{backgroundImage:`url(${p("light")})`,backgroundSize:"cover",backgroundPosition:"center"}:{backgroundColor:t.modelValue.light.backgroundColor},N=()=>t.modelValue.dark.backgroundType==="image"&&t.modelValue.dark.backgroundImage?{backgroundImage:`url(${p("dark")})`,backgroundSize:"cover",backgroundPosition:"center"}:{backgroundColor:t.modelValue.dark.backgroundColor},L=(k,m)=>{const M=X(k)?"#000000":"#ffffff",oA=X(m)?"#000000":"#ffffff";I("update:modelValue",{...t.modelValue,light:{...t.modelValue.light,backgroundType:"color",backgroundColor:k,textColor:M,backgroundImage:null},dark:{...t.modelValue.dark,backgroundType:"color",backgroundColor:m,textColor:oA,backgroundImage:null}})},X=k=>{const m=k.replace("#",""),M=parseInt(m.substr(0,2),16),oA=parseInt(m.substr(2,2),16),F=parseInt(m.substr(4,2),16);return(M*299+oA*587+F*114)/1e3>128};return(k,m)=>(G(),U("div",lr,[a("div",null,[a("h3",cr,d(k.$t("backgroundConfig.title")),1),a("p",hr,d(k.$t("backgroundConfig.description")),1)]),a("div",ur,[a("h4",dr,[m[33]||(m[33]=a("svg",{class:"w-5 h-5 mr-2 text-yellow-500",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z","clip-rule":"evenodd"})],-1)),HA(" "+d(k.$t("backgroundConfig.lightMode")),1)]),a("div",fr,[a("div",wr,[a("button",{onClick:m[0]||(m[0]=M=>Q("color")),class:gA(["px-3 py-2 text-sm border rounded transition-colors",e.modelValue.light.backgroundType==="color"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(k.$t("backgroundConfig.solidBackground")),3),a("button",{onClick:m[1]||(m[1]=M=>Q("image")),class:gA(["px-3 py-2 text-sm border rounded transition-colors",e.modelValue.light.backgroundType==="image"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(k.$t("backgroundConfig.imageBackground")),3)]),e.modelValue.light.backgroundType==="color"?(G(),U("div",pr,[a("div",yr,[a("label",Dr,d(k.$t("backgroundConfig.backgroundColor")),1),a("div",mr,[rA(a("input",{type:"color","onUpdate:modelValue":m[2]||(m[2]=M=>r.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,r.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[3]||(m[3]=M=>r.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,r.value]])]),a("div",{style:CA({backgroundColor:r.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)]),a("div",Fr,[a("label",kr,d(k.$t("backgroundConfig.textColor")),1),a("div",vr,[rA(a("input",{type:"color","onUpdate:modelValue":m[4]||(m[4]=M=>B.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,B.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[5]||(m[5]=M=>B.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,B.value]])]),a("div",{style:CA({backgroundColor:B.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)])])):O("",!0),e.modelValue.light.backgroundType==="image"?(G(),U("div",Sr,[a("label",Gr,d(k.$t("backgroundConfig.backgroundImage")),1),a("div",{onDrop:m[9]||(m[9]=M=>f(M,"light")),onDragover:m[10]||(m[10]=PA(()=>{},["prevent"])),onDragenter:m[11]||(m[11]=PA(()=>{},["prevent"])),class:gA(["border-2 border-dashed rounded-lg p-4 text-center cursor-pointer transition-colors",e.modelValue.light.backgroundImage?"border-green-300 bg-green-50":"border-gray-300 hover:border-gray-400"])},[a("input",{ref_key:"lightImageInput",ref:o,type:"file",accept:"image/*",onChange:m[6]||(m[6]=M=>l(M,"light")),class:"hidden"},null,544),e.modelValue.light.backgroundImage?(G(),U("div",Ur,[a("img",{src:p("light"),alt:"{{ $t('backgroundConfig.lightModePreview') }} Background",class:"max-w-32 max-h-32 mx-auto rounded shadow"},null,8,Nr),a("p",br,d(e.modelValue.light.backgroundImage.name),1),a("button",{onClick:m[8]||(m[8]=M=>D("light")),class:"text-red-600 hover:text-red-500 text-sm"},d(k.$t("backgroundConfig.removeImage")),1)])):(G(),U("div",{key:0,onClick:m[7]||(m[7]=M=>k.$refs.lightImageInput.click())},[m[34]||(m[34]=a("svg",{class:"mx-auto h-8 w-8 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)),a("p",Rr,d(k.$t("backgroundConfig.clickOrDragToUpload")),1)]))],34),a("div",Lr,[a("label",Mr,d(k.$t("backgroundConfig.textColor")),1),a("div",Jr,[rA(a("input",{type:"color","onUpdate:modelValue":m[12]||(m[12]=M=>B.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,B.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[13]||(m[13]=M=>B.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,B.value]])]),a("div",{style:CA({backgroundColor:B.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)])])):O("",!0)])]),a("div",xr,[a("h4",Hr,[m[35]||(m[35]=a("svg",{class:"w-5 h-5 mr-2 text-gray-600",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})],-1)),HA(" "+d(k.$t("backgroundConfig.darkMode")),1)]),a("div",Yr,[a("div",Kr,[a("button",{onClick:m[14]||(m[14]=M=>s("color")),class:gA(["px-3 py-2 text-sm border rounded transition-colors",e.modelValue.dark.backgroundType==="color"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(k.$t("backgroundConfig.solidBackground")),3),a("button",{onClick:m[15]||(m[15]=M=>s("image")),class:gA(["px-3 py-2 text-sm border rounded transition-colors",e.modelValue.dark.backgroundType==="image"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(k.$t("backgroundConfig.imageBackground")),3)]),e.modelValue.dark.backgroundType==="color"?(G(),U("div",Tr,[a("div",Vr,[a("label",qr,d(k.$t("backgroundConfig.backgroundColor")),1),a("div",Or,[rA(a("input",{type:"color","onUpdate:modelValue":m[16]||(m[16]=M=>C.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,C.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[17]||(m[17]=M=>C.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,C.value]])]),a("div",{style:CA({backgroundColor:C.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)]),a("div",Wr,[a("label",Pr,d(k.$t("backgroundConfig.textColor")),1),a("div",Zr,[rA(a("input",{type:"color","onUpdate:modelValue":m[18]||(m[18]=M=>n.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,n.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[19]||(m[19]=M=>n.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,n.value]])]),a("div",{style:CA({backgroundColor:n.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)])])):O("",!0),e.modelValue.dark.backgroundType==="image"?(G(),U("div",Xr,[a("label",jr,d(k.$t("backgroundConfig.backgroundImage")),1),a("div",{onDrop:m[23]||(m[23]=M=>f(M,"dark")),onDragover:m[24]||(m[24]=PA(()=>{},["prevent"])),onDragenter:m[25]||(m[25]=PA(()=>{},["prevent"])),class:gA(["border-2 border-dashed rounded-lg p-4 text-center cursor-pointer transition-colors",e.modelValue.dark.backgroundImage?"border-green-300 bg-green-50":"border-gray-300 hover:border-gray-400"])},[a("input",{ref_key:"darkImageInput",ref:i,type:"file",accept:"image/*",onChange:m[20]||(m[20]=M=>l(M,"dark")),class:"hidden"},null,544),e.modelValue.dark.backgroundImage?(G(),U("div",_r,[a("img",{src:p("dark"),alt:"{{ $t('backgroundConfig.darkModePreview') }} Background",class:"max-w-32 max-h-32 mx-auto rounded shadow"},null,8,$r),a("p",AC,d(e.modelValue.dark.backgroundImage.name),1),a("button",{onClick:m[22]||(m[22]=M=>D("dark")),class:"text-red-600 hover:text-red-500 text-sm"},d(k.$t("backgroundConfig.removeImage")),1)])):(G(),U("div",{key:0,onClick:m[21]||(m[21]=M=>k.$refs.darkImageInput.click())},[m[36]||(m[36]=a("svg",{class:"mx-auto h-8 w-8 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)),a("p",zr,d(k.$t("backgroundConfig.clickOrDragToUpload")),1)]))],34),a("div",eC,[a("label",gC,d(k.$t("backgroundConfig.textColor")),1),a("div",tC,[rA(a("input",{type:"color","onUpdate:modelValue":m[26]||(m[26]=M=>n.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,n.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[27]||(m[27]=M=>n.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,n.value]])]),a("div",{style:CA({backgroundColor:n.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)])])):O("",!0)])]),a("div",IC,[a("h4",oC,d(k.$t("backgroundConfig.backgroundPreview")),1),a("div",iC,[a("div",rC,[a("div",CC,d(k.$t("backgroundConfig.lightModePreview")),1),a("div",{style:CA(v()),class:"h-32 border border-gray-300 rounded-lg flex items-center justify-center text-sm relative overflow-hidden"},[a("div",nC,[a("span",{style:CA({color:e.modelValue.light.textColor})},d(k.$t("backgroundConfig.chatArea")),5)])],4)]),a("div",BC,[a("div",aC,d(k.$t("backgroundConfig.darkModePreview")),1),a("div",{style:CA(N()),class:"h-32 border border-gray-300 rounded-lg flex items-center justify-center text-sm relative overflow-hidden"},[a("div",sC,[a("span",{style:CA({color:e.modelValue.dark.textColor})},d(k.$t("backgroundConfig.chatArea")),5)])],4)])])]),a("div",QC,[a("h5",EC,d(k.$t("backgroundConfig.quickConfig")),1),a("div",lC,[a("button",{onClick:m[28]||(m[28]=M=>L("#ffffff","#1f2937")),class:"px-3 py-1 text-sm bg-white border border-gray-300 rounded hover:bg-gray-50"},d(k.$t("backgroundConfig.defaultColors")),1),a("button",{onClick:m[29]||(m[29]=M=>L("#f5f5f4","#374151")),class:"px-3 py-1 text-sm bg-stone-100 border border-gray-300 rounded hover:bg-stone-200"},d(k.$t("backgroundConfig.stoneTexture")),1),a("button",{onClick:m[30]||(m[30]=M=>L("#fef7cd","#7c2d12")),class:"px-3 py-1 text-sm bg-yellow-100 border border-gray-300 rounded hover:bg-yellow-200"},d(k.$t("backgroundConfig.sunnyColors")),1),a("button",{onClick:m[31]||(m[31]=M=>L("#e0f2fe","#1e40af")),class:"px-3 py-1 text-sm bg-sky-100 border border-gray-300 rounded hover:bg-sky-200"},d(k.$t("backgroundConfig.skyBlue")),1),a("button",{onClick:m[32]||(m[32]=M=>L("#fdf2f8","#be185d")),class:"px-3 py-1 text-sm bg-pink-100 border border-gray-300 rounded hover:bg-pink-200"},d(k.$t("backgroundConfig.romanticPink")),1)])])]))}},hC={class:"space-y-6"},uC={class:"text-xl font-semibold text-gray-900 mb-4"},dC={class:"text-gray-600 mb-6"},fC={class:"border-b border-gray-200"},wC={class:"-mb-px flex space-x-4 sm:space-x-8"},pC=["onClick"],yC={class:"flex items-center"},DC={class:"hidden sm:inline"},mC={class:"min-h-96"},FC={class:"flex justify-between"},kC={__name:"ThemeDesign",props:{modelValue:{type:Object,required:!0},chipModel:{type:String,required:!0},activeTab:{type:String,default:"wakeword"}},emits:["update:modelValue","next","prev","tabChange"],setup(e,{emit:A}){const{t:g}=TA(),t={render(){return eA("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[eA("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})])}},I={render(){return eA("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 640 640"},[eA("path",{d:"M320 96C329.5 96 338 101.5 341.9 110.2L515.1 496L536 496C549.3 496 560 506.7 560 520C560 533.3 549.3 544 536 544L440 544C426.7 544 416 533.3 416 520C416 506.7 426.7 496 440 496L462.5 496L426.6 416L213.4 416L177.5 496L200 496C213.3 496 224 506.7 224 520C224 533.3 213.3 544 200 544L104 544C90.7 544 80 533.3 80 520C80 506.7 90.7 496 104 496L124.9 496L298.1 110.2C302 101.5 310.5 96 320 96zM320 178.6L235 368L405 368L320 178.6z"})])}},o={render(){return eA("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[eA("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])}},i={render(){return eA("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 640 640"},[eA("path",{d:"M160 144C151.2 144 144 151.2 144 160L144 480C144 488.8 151.2 496 160 496L480 496C488.8 496 496 488.8 496 480L496 160C496 151.2 488.8 144 480 144L160 144zM96 160C96 124.7 124.7 96 160 96L480 96C515.3 96 544 124.7 544 160L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160zM224 192C241.7 192 256 206.3 256 224C256 241.7 241.7 256 224 256C206.3 256 192 241.7 192 224C192 206.3 206.3 192 224 192zM360 264C368.5 264 376.4 268.5 380.7 275.8L460.7 411.8C465.1 419.2 465.1 428.4 460.8 435.9C456.5 443.4 448.6 448 440 448L200 448C191.1 448 182.8 443 178.7 435.1C174.6 427.2 175.2 417.6 180.3 410.3L236.3 330.3C240.8 323.9 248.1 320.1 256 320.1C263.9 320.1 271.2 323.9 275.7 330.3L292.9 354.9L339.4 275.9C343.7 268.6 351.6 264.1 360.1 264.1z"})])}},r=e,C=A,B=j(r.activeTab),n=nA(()=>[{id:"wakeword",name:g("themeDesign.tabs.wakeword"),icon:t},{id:"font",name:g("themeDesign.tabs.font"),icon:I},{id:"emoji",name:g("themeDesign.tabs.emoji"),icon:o},{id:"background",name:g("themeDesign.tabs.background"),icon:i}]),Q=nA({get:()=>r.modelValue,set:h=>C("update:modelValue",h)}),s=()=>{var u,l,f;const h=r.modelValue.wakeword;if(h.type==="custom"){if(!((u=h.custom.name)!=null&&u.trim())){alert(g("wakewordConfig.errors.nameRequired"));return}if(!((l=h.custom.command)!=null&&l.trim())){alert(g("wakewordConfig.errors.commandRequired"));return}if(!h.custom.duration||h.custom.duration<500||h.custom.duration>1e4){alert(g("wakewordConfig.errors.durationRange"));return}}const w=r.modelValue.font;if(w.type==="custom"&&!((f=w.custom)!=null&&f.file)){alert(g("fontConfig.selectValidFontFile"));return}C("next")},E=h=>{B.value=h,C("tabChange",h)};return DA(()=>r.activeTab,h=>{B.value=h}),(h,w)=>(G(),U("div",hC,[a("div",null,[a("h2",uC,d(h.$t("themeDesign.title")),1),a("p",dC,d(h.$t("themeDesign.description")),1)]),a("div",fC,[a("nav",wC,[(G(!0),U(bA,null,LA(n.value,u=>(G(),U("button",{key:u.id,onClick:l=>E(u.id),class:gA(["py-2 px-1 border-b-2 font-medium text-sm relative",B.value===u.id?"border-primary-500 text-primary-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"])},[a("span",yC,[(G(),UA(Bt(u.icon),{class:"w-5 h-5 sm:mr-2"})),a("span",DC,d(u.name),1)])],10,pC))),128))])]),a("div",mC,[B.value==="wakeword"?(G(),UA(Mo,{key:0,modelValue:Q.value.wakeword,"onUpdate:modelValue":w[0]||(w[0]=u=>Q.value.wakeword=u),chipModel:e.chipModel},null,8,["modelValue","chipModel"])):O("",!0),B.value==="font"?(G(),UA(Gi,{key:1,modelValue:Q.value.font,"onUpdate:modelValue":w[1]||(w[1]=u=>Q.value.font=u)},null,8,["modelValue"])):O("",!0),B.value==="emoji"?(G(),UA(Er,{key:2,modelValue:Q.value.emoji,"onUpdate:modelValue":w[2]||(w[2]=u=>Q.value.emoji=u)},null,8,["modelValue"])):O("",!0),B.value==="background"?(G(),UA(cC,{key:3,modelValue:Q.value.skin,"onUpdate:modelValue":w[3]||(w[3]=u=>Q.value.skin=u)},null,8,["modelValue"])):O("",!0)]),a("div",FC,[a("button",{onClick:w[4]||(w[4]=u=>h.$emit("prev")),class:"bg-gray-500 hover:bg-gray-600 text-white px-6 py-2 rounded-lg font-medium transition-colors"},d(h.$t("themeDesign.previous")),1),a("button",{onClick:s,class:"bg-primary-500 hover:bg-primary-600 text-white px-6 py-2 rounded-lg font-medium transition-colors"},d(h.$t("themeDesign.next")),1)])]))}},vC=(e,A)=>{const g=e.__vccOpts||e;for(const[t,I]of A)g[t]=I;return g},SC={class:"space-y-6"},GC={class:"text-xl font-semibold text-gray-900 mb-4"},RC={class:"text-gray-600 mb-6"},UC={class:"flex flex-col lg:flex-row gap-8"},NC={class:"flex-1"},bC={class:"text-lg font-medium text-gray-900 mb-4"},LC={class:"bg-gray-100 p-4 rounded-lg"},MC={class:"max-w-full overflow-auto flex justify-center"},JC={class:"bg-gray-800 p-6 rounded-2xl shadow-2xl inline-block"},xC={class:"bg-gray-900 p-2 rounded-xl"},HC={class:"relative z-10 flex flex-col items-center justify-center p-4 text-center"},YC={class:"mb-4"},KC={key:0,class:"emoji-container"},TC=["src","alt"],VC={key:1,class:"emoji-container"},qC={class:"text-center"},OC={class:"text-sm"},WC={class:"text-xs"},PC={key:0,class:"absolute inset-0 flex items-center justify-center"},ZC={class:"animate-pulse text-gray-400 text-xs"},XC={class:"mt-3 text-center text-xs text-gray-400"},jC={class:"w-full lg:w-80"},zC={class:"text-lg font-medium text-gray-900 mb-4"},_C={class:"space-y-6 bg-white border border-gray-200 rounded-lg p-4"},$C={class:"block text-sm font-medium text-gray-700 mb-2"},An={class:"block text-sm font-medium text-gray-700 mb-2"},en={key:0,class:"flex flex-wrap gap-2 max-h-32 overflow-y-auto justify-center"},gn=["onClick","title"],tn={key:0},In=["src","alt"],on={key:1,class:"text-lg"},rn={key:1,class:"text-center py-4 text-gray-500 bg-gray-50 rounded-lg border-2 border-dashed"},Cn={class:"text-2xl mb-2"},nn={class:"text-sm"},Bn={class:"block text-sm font-medium text-gray-700 mb-2"},an={class:"flex space-x-2"},sn={class:"border-t pt-4"},Qn={class:"font-medium text-gray-900 mb-2"},En={class:"text-xs text-gray-600 space-y-1"},ln={key:0},cn={class:"flex items-center"},hn={key:0,class:"ml-2 animate-pulse text-blue-500"},un={key:1},dn={class:"flex justify-between"},fn={__name:"GenerateSummary",props:{config:{type:Object,required:!0}},emits:["prev","generate"],setup(e){const{t:A}=TA(),g=e,t=j(A("generateSummary.defaultPreviewText")),I=j("happy"),o=j("light"),i=j(!1),r=j(""),C=nA(()=>[{key:"neutral",name:A("generateSummary.emotions.neutral"),emoji:"😶"},{key:"happy",name:A("generateSummary.emotions.happy"),emoji:"🙂"},{key:"laughing",name:A("generateSummary.emotions.laughing"),emoji:"😆"},{key:"funny",name:A("generateSummary.emotions.funny"),emoji:"😂"},{key:"sad",name:A("generateSummary.emotions.sad"),emoji:"😔"},{key:"angry",name:A("generateSummary.emotions.angry"),emoji:"😠"},{key:"crying",name:A("generateSummary.emotions.crying"),emoji:"😭"},{key:"loving",name:A("generateSummary.emotions.loving"),emoji:"😍"},{key:"surprised",name:A("generateSummary.emotions.surprised"),emoji:"😯"},{key:"thinking",name:A("generateSummary.emotions.thinking"),emoji:"🤔"},{key:"cool",name:A("generateSummary.emotions.cool"),emoji:"😎"},{key:"sleepy",name:A("generateSummary.emotions.sleepy"),emoji:"😴"}]),B=nA(()=>{if(g.config.theme.emoji.type==="preset"&&g.config.theme.emoji.preset)return C.value;if(g.config.theme.emoji.type==="custom"){const F=g.config.theme.emoji.custom.images;return C.value.filter(S=>F[S.key])}else return[]}),n=nA(()=>c(I.value)),Q=()=>{const{width:F,height:S}=g.config.chip.display;return{width:`${F}px`,height:`${S}px`}},s=()=>{const F=g.config.theme.skin[o.value];if(F.backgroundType==="image"&&F.backgroundImage)try{if(F.backgroundImage&&typeof F.backgroundImage=="object"&&F.backgroundImage.size)return{backgroundImage:`url(${URL.createObjectURL(F.backgroundImage)})`,backgroundSize:"cover",backgroundPosition:"center"}}catch(S){console.warn("Failed to load background preview:",S)}return{backgroundColor:F.backgroundColor||"#ffffff"}},E={twemoji32:32,twemoji64:64,"noto-emoji_64":64,"noto-emoji_128":128},h=()=>{let F=48;return g.config.theme.emoji.type==="preset"?F=E[g.config.theme.emoji.preset]||32:g.config.theme.emoji.custom.size&&(F=Math.min(g.config.theme.emoji.custom.size.width,g.config.theme.emoji.custom.size.height)),{width:`${F}px`,height:`${F}px`}},w=()=>{let F=14;if(g.config.theme.font.type==="preset"){const J=g.config.theme.font.preset;J.includes("_14_")?F=14:J.includes("_16_")?F=16:J.includes("_20_")?F=20:J.includes("_30_")&&(F=30)}else g.config.theme.font.custom.size&&(F=g.config.theme.font.custom.size);const S=o.value==="dark"?g.config.theme.skin.dark.textColor:g.config.theme.skin.light.textColor;return{fontSize:`${F}px`,color:S,fontFamily:l(),textShadow:o.value==="dark"?"1px 1px 2px rgba(0,0,0,0.5)":"1px 1px 2px rgba(255,255,255,0.5)"}},u=async()=>{document.querySelectorAll("style[data-font-preview]").forEach(S=>S.remove()),i.value=!1,r.value="";try{if(g.config.theme.font.type==="preset"){const S=g.config.theme.font.preset;let J,V;S&&S.startsWith("font_noto_qwen_")?(J="NotoPreview",V="./static/fonts/noto_qwen.ttf"):(J="PuHuiPreview",V="./static/fonts/puhui_deepseek.ttf");const q=document.createElement("style");q.setAttribute("data-font-preview","true"),q.textContent=` +import{u as TA,r as j,w as DA,o as Me,a as G,c as U,b as a,t as d,d as fg,e as HA,f as wg,g as O,h as ig,i as nA,j as eA,n as nt,k as gA,F as bA,l as LA,m as rA,v as sA,p as Xe,q as PA,s as CA,x as UA,y as Bt,z as at,_ as sI,A as we}from"./index-CTIG3yYe.js";const QI={class:"space-y-6"},EI={class:"text-xl font-semibold text-gray-900 mb-4"},lI={class:"text-gray-600 mb-6"},cI={key:0},hI={key:1},uI={key:2},dI={key:0,class:"space-y-4"},fI={class:"bg-blue-50 border-2 border-blue-200 rounded-lg p-6"},wI={class:"flex items-center justify-center space-x-3"},pI={class:"text-lg font-medium text-blue-900"},yI={class:"text-sm text-blue-700 mt-1"},DI={key:1,class:"space-y-4"},mI={class:"bg-green-50 border-2 border-green-200 rounded-lg p-4"},FI={class:"flex items-start justify-between mb-3"},kI={class:"flex items-center"},vI={class:"text-lg font-medium text-green-900"},SI={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mt-4"},GI={class:"bg-white rounded-lg p-3"},RI={class:"block text-sm font-medium text-gray-700 mb-1"},UI={class:"text-base font-semibold text-gray-900"},NI={class:"bg-white rounded-lg p-3"},bI={class:"block text-sm font-medium text-gray-700 mb-1"},LI={class:"text-base font-semibold text-gray-900"},MI={class:"bg-white rounded-lg p-3"},JI={class:"block text-sm font-medium text-gray-700 mb-1"},xI={class:"text-base font-semibold text-gray-900"},HI={class:"mt-3 text-sm text-green-700"},YI={class:"border border-gray-200 rounded-lg p-4"},KI={key:0,class:"mt-4"},TI={key:2,class:"space-y-4"},VI={class:"bg-yellow-50 border border-yellow-200 rounded-lg p-4"},qI={class:"flex items-start"},OI={class:"font-medium text-yellow-900"},WI={class:"text-sm text-yellow-700 mt-1"},PI={class:"border-2 border-gray-300 rounded-lg p-4"},ZI={class:"text-lg font-medium text-gray-900 mb-4"},XI={class:"flex justify-end"},jI=["disabled"],zI={__name:"ChipConfig",props:{modelValue:{type:Object,default:()=>({model:"",display:{width:320,height:240,color:"RGB565"}})}},emits:["update:modelValue","next"],setup(e,{emit:A}){const{t:g}=TA(),t=A,I=nA(()=>[{value:"",label:g("chipConfig.selectChip")},{value:"esp32s3",label:"ESP32-S3"},{value:"esp32c3",label:"ESP32-C3"},{value:"esp32c5",label:"ESP32-C5"},{value:"esp32c6",label:"ESP32-C6"},{value:"esp32p4",label:"ESP32-P4"},{value:"esp32",label:"ESP32"},{value:"others",label:g("common.other")}]),o={name:"ConfigForm",props:{config:{type:Object,required:!0},showRequired:{type:Boolean,default:!1}},render(){const p=this.$t;return eA("div",{class:"grid grid-cols-1 md:grid-cols-3 gap-4"},[eA("div",[eA("label",{class:"block text-sm font-medium text-gray-700 mb-2"},[p("chipConfig.chipRequired")+" ",this.showRequired&&eA("span",{class:"text-red-500"},"*")]),eA("select",{class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500",value:this.config.model,onChange:v=>{this.config.model=v.target.value}},fg(I).map(v=>eA("option",{value:v.value,key:v.value},v.label)))]),eA("div",[eA("label",{class:"block text-sm font-medium text-gray-700 mb-2"},[p("chipConfig.widthRequired")+" ",this.showRequired&&eA("span",{class:"text-red-500"},"*")]),eA("input",{type:"number",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500",value:this.config.display.width,min:128,max:800,placeholder:"320",onInput:v=>{this.config.display.width=Number(v.target.value)}})]),eA("div",[eA("label",{class:"block text-sm font-medium text-gray-700 mb-2"},[p("chipConfig.heightRequired")+" ",this.showRequired&&eA("span",{class:"text-red-500"},"*")]),eA("input",{type:"number",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500",value:this.config.display.height,min:128,max:600,placeholder:"240",onInput:v=>{this.config.display.height=Number(v.target.value)}})])])}},{deviceInfo:i,isDeviceOnline:r,hasToken:C}=ig(),B=j(C.value),n=j(!1),Q=j(""),s=j(!1),E=j({model:"",display:{width:320,height:240,color:"RGB565"}}),h={"ESP32-S3":"esp32s3",ESP32S3:"esp32s3","ESP32-C3":"esp32c3",ESP32C3:"esp32c3","ESP32-C5":"esp32c5",ESP32C5:"esp32c5","ESP32-P4":"esp32p4",ESP32P4:"esp32p4","ESP32-C6":"esp32c6",ESP32C6:"esp32c6",ESP32:"esp32"},w=()=>{var p,v;try{if(!r.value)return B.value||(Q.value=g("chipConfig.deviceOffline"),n.value=!1),!1;const N=(p=i.value.chip)==null?void 0:p.model;if(!N||N==="Unknown")return!1;let L=h[N.toUpperCase()]||h[N]||N.toLowerCase().replace(/-/g,"");["esp32s3","esp32c3","esp32c5","esp32p4","esp32c6","esp32","others"].includes(L)||(L="others");const k=(v=i.value.screen)==null?void 0:v.resolution;if(!k||k==="Unknown")return!1;const[m,M]=k.split("x").map(Number);return!m||!M||isNaN(m)||isNaN(M)?(Q.value=g("chipConfig.resolutionFormatError"),n.value=!1,B.value=!1,!1):(E.value={model:L,display:{width:m,height:M,color:"RGB565"}},t("update:modelValue",{model:L,display:{width:m,height:M,color:"RGB565"}}),n.value=!0,Q.value="",B.value=!1,console.log("✓ Device config loaded successfully:",{chip:L,width:m,height:M}),!0)}catch(N){return console.error("Failed to load device config:",N),Q.value=g("chipConfig.loadingError"),n.value=!1,B.value=!1,!1}},u=nA(()=>E.value.model&&E.value.display.width&&E.value.display.height),l=nA(()=>E.value.model?E.value.model.toUpperCase().replace(/ESP32/i,"ESP32-"):""),f=nA(()=>E.value.display),c=()=>{s.value=!s.value},D=()=>{u.value&&t("next")};return DA(()=>E.value,p=>{t("update:modelValue",{model:p.model,display:{...p.display}})},{deep:!0}),DA(()=>r.value,p=>{p&&!n.value&&(B.value=!0,Q.value="",setTimeout(()=>{w()},100))}),DA(()=>[i.value.chip,i.value.screen],()=>{r.value&&!n.value&&w()},{deep:!0}),Me(()=>{if(!C.value){B.value=!1,Q.value=g("chipConfig.manualConfigRequired"),console.log("⚠ No device connection detected, using manual config mode");return}r.value&&i.value.chip&&i.value.chip.model!=="Unknown"&&i.value.screen&&i.value.screen.resolution!=="Unknown"?(console.log("✓ Cached device info detected, loading immediately"),w()):r.value?(console.log("⏳ Device online, waiting for device info to load..."),B.value=!0,setTimeout(()=>{w()},500),setTimeout(()=>{B.value&&!n.value&&r.value&&(B.value=!1,!i.value.chip||i.value.chip.model==="Unknown"?Q.value=g("chipConfig.chipModelError"):!i.value.screen||i.value.screen.resolution==="Unknown"?Q.value=g("chipConfig.resolutionError"):Q.value=g("chipConfig.timeoutError"),console.warn("⚠ Device config load timeout:",Q.value))},1e4)):(console.log("⏳ Waiting for device connection..."),B.value=!0,setTimeout(()=>{B.value&&!n.value&&!r.value&&(B.value=!1,Q.value=g("chipConfig.manualConfigHint"),console.warn("⚠ Device connection timeout"))},1e4))}),(p,v)=>(G(),U("div",QI,[a("div",null,[a("h2",EI,d(p.$t("chipConfig.title")),1),a("p",lI,[B.value?(G(),U("span",cI,d(p.$t("chipConfig.loadingFromDevice")),1)):n.value?(G(),U("span",hI,d(p.$t("chipConfig.loadedFromDevice")),1)):(G(),U("span",uI,d(p.$t("chipConfig.manualConfig")),1))])]),B.value?(G(),U("div",dI,[a("div",fI,[a("div",wI,[v[0]||(v[0]=a("svg",{class:"animate-spin h-6 w-6 text-blue-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[a("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),a("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),a("div",null,[a("h3",pI,d(p.$t("chipConfig.loadingTitle")),1),a("p",yI,d(p.$t("chipConfig.loadingDesc")),1)])])])])):fg(r)&&n.value?(G(),U("div",DI,[a("div",mI,[a("div",FI,[a("div",kI,[v[1]||(v[1]=a("div",{class:"w-5 h-5 bg-green-500 rounded-full flex items-center justify-center mr-2"},[a("svg",{class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})])],-1)),a("h3",vI,d(p.$t("chipConfig.autoLoadedTitle")),1)])]),a("div",SI,[a("div",GI,[a("label",RI,d(p.$t("chipConfig.chipModel")),1),a("div",UI,d(l.value),1)]),a("div",NI,[a("label",bI,d(p.$t("chipConfig.screenWidth")),1),a("div",LI,d(f.value.width)+" px",1)]),a("div",MI,[a("label",JI,d(p.$t("chipConfig.screenHeight")),1),a("div",xI,d(f.value.height)+" px",1)])]),a("div",HI," ✓ "+d(p.$t("chipConfig.colorFormat"))+" "+d(f.value.color),1)]),a("div",YI,[a("button",{onClick:c,class:"flex items-center text-sm text-gray-600 hover:text-gray-900"},[v[2]||(v[2]=a("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)),HA(" "+d(s.value?p.$t("chipConfig.collapseManual"):p.$t("chipConfig.manualEdit")),1)]),s.value?(G(),U("div",KI,[wg(o,{config:E.value},null,8,["config"])])):O("",!0)])])):(G(),U("div",TI,[a("div",VI,[a("div",qI,[v[3]||(v[3]=a("svg",{class:"w-5 h-5 text-yellow-600 mr-3 flex-shrink-0 mt-0.5",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)),a("div",null,[a("h4",OI,d(p.$t("chipConfig.manualConfigDesc")),1),a("p",WI,d(Q.value||p.$t("chipConfig.manualConfigHint")),1)])])]),a("div",PI,[a("h3",ZI,d(p.$t("chipConfig.manualConfigTitle")),1),wg(o,{config:E.value,"show-required":!0},null,8,["config"])])])),a("div",XI,[a("button",{onClick:D,disabled:!u.value,class:"bg-primary-500 hover:bg-primary-600 disabled:bg-gray-300 text-white px-6 py-2 rounded-lg font-medium transition-colors"},d(p.$t("chipConfig.next")),9,jI)])]))}},_I={class:"space-y-6"},$I={class:"text-lg font-medium text-gray-900 mb-2"},Ao={class:"text-gray-600"},eo={key:0,class:"bg-orange-50 border border-orange-200 rounded-lg p-4"},go={class:"text-sm text-orange-800"},to={class:"mt-1"},Io={key:1,class:"space-y-6"},oo={class:"flex space-x-4"},io={key:0,class:"space-y-4"},ro={class:"block text-sm font-medium text-gray-700"},Co={class:"relative"},no=["value"],Bo=["value"],ao={key:1,class:"space-y-4 bg-gray-50 p-4 rounded-lg border border-gray-200"},so={class:"font-medium text-gray-900"},Qo={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Eo={class:"block text-sm font-medium text-gray-700 mb-1"},lo=["placeholder"],co={key:0,class:"text-xs text-red-500 mt-1"},ho={class:"block text-sm font-medium text-gray-700 mb-1"},uo=["placeholder"],fo={key:0,class:"text-xs text-red-500 mt-1"},wo={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},po={class:"block text-sm font-medium text-gray-700 mb-1"},yo={class:"flex items-center space-x-2"},Do={class:"text-sm text-gray-600 w-8"},mo={class:"text-xs text-gray-500 mt-1"},Fo={class:"block text-sm font-medium text-gray-700 mb-1"},ko={key:0,class:"text-xs text-red-500 mt-1"},vo={class:"block text-sm font-medium text-gray-700 mb-1"},So={value:"mn6_en"},Go={class:"bg-blue-50 border border-blue-200 rounded-lg p-3"},Ro={class:"text-sm text-blue-800"},Uo={class:"mt-1 list-disc list-inside space-y-1"},No={key:0},bo={key:1},Lo={key:2},Mo={__name:"WakewordConfig",props:{modelValue:{type:Object,required:!0},chipModel:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:A}){const{t:g}=TA(),t=e,I=A,o=[{id:"wn9s_hilexin",name:"Hi, Espressif",model:"WakeNet9s"},{id:"wn9s_hiesp",name:"Hi,ESP",model:"WakeNet9s"},{id:"wn9s_nihaoxiaozhi",name:"Hello Xiaozhi",model:"WakeNet9s"},{id:"wn9s_hijason",name:"Hi,Jason",model:"WakeNet9s"},{id:"wn9s_alexa",name:"Alexa",model:"WakeNet9s"},{id:"wn9_hilexin",name:"Hi, Espressif",model:"WakeNet9"},{id:"wn9_hiesp",name:"Hi,ESP",model:"WakeNet9"},{id:"wn9_nihaoxiaozhi_tts",name:"Hello Xiaozhi",model:"WakeNet9"},{id:"wn9_hijason_tts2",name:"Hi,Jason",model:"WakeNet9"},{id:"wn9_himfive",name:"Hi,M Five",model:"WakeNet9"},{id:"wn9_alexa",name:"Alexa",model:"WakeNet9"},{id:"wn9_jarvis_tts",name:"Jarvis",model:"WakeNet9"},{id:"wn9_computer_tts",name:"Computer",model:"WakeNet9"},{id:"wn9_heywillow_tts",name:"Hey,Willow",model:"WakeNet9"},{id:"wn9_sophia_tts",name:"Sophia",model:"WakeNet9"},{id:"wn9_heyprinter_tts",name:"Hey,Printer",model:"WakeNet9"},{id:"wn9_hijoy_tts",name:"Hi,Joy",model:"WakeNet9"},{id:"wn9_heywanda_tts",name:"Hey,Wand",model:"WakeNet9"},{id:"wn9_astrolabe_tts",name:"Astrolabe",model:"WakeNet9"},{id:"wn9_heyily_tts2",name:"Hey,Ily",model:"WakeNet9"},{id:"wn9_hijolly_tts2",name:"Hi,Jolly",model:"WakeNet9"},{id:"wn9_hifairy_tts2",name:"Hi,Fairy",model:"WakeNet9"},{id:"wn9_bluechip_tts2",name:"Blue Chip",model:"WakeNet9"},{id:"wn9_hiandy_tts2",name:"Hi,Andy",model:"WakeNet9"},{id:"wn9_heyivy_tts2",name:"Hey,Ivy",model:"WakeNet9"},{id:"wn9_histackchan_tts3",name:"Hi,Stack Chan",model:"WakeNet9"},{id:"wn9_hiwalle_tts2",name:"Hi,Wall E",model:"WakeNet9"},{id:"wn9_hilili_tts",name:"Hi,Lily",model:"WakeNet9"},{id:"wn9_hitelly_tts",name:"Hi,Telly",model:"WakeNet9"},{id:"wn9_linaiban_tts2",name:"Lina Board",model:"WakeNet9"}],i=nA(()=>{const l=t.chipModel.toLowerCase();return l==="esp32s3"||l==="esp32p4"}),r=nA(()=>{const l=t.chipModel.toLowerCase();return l==="esp32c3"||l==="esp32c5"||l==="esp32c6"}),C=nA(()=>t.chipModel.toLowerCase()==="esp32s3"),B=nA(()=>i.value||r.value),n=nA(()=>i.value?o.filter(l=>l.model==="WakeNet9"):r.value?o.filter(l=>l.model==="WakeNet9s"):[]),Q=j({name:"",command:"",threshold:20,duration:3e3,model:"mn6_en"}),s=j({name:"",command:"",duration:""}),E=()=>{let l=!0;return s.value={name:"",command:"",duration:""},Q.value.name.trim()||(s.value.name=g("wakewordConfig.errors.nameRequired"),l=!1),Q.value.command.trim()?Q.value.model.includes("_en")&&/[!,.?]/.test(Q.value.command)&&(s.value.command=g("wakewordConfig.errors.noPunctuation"),l=!1):(s.value.command=g("wakewordConfig.errors.commandRequired"),l=!1),(!Q.value.duration||Q.value.duration<500||Q.value.duration>1e4)&&(s.value.duration=g("wakewordConfig.errors.durationRange"),l=!1),l},h=j(!1),w=l=>{var f;I("update:modelValue",{...t.modelValue,type:l,preset:l==="preset"&&(t.modelValue.preset||((f=n.value[0])==null?void 0:f.id))||"",custom:{...t.modelValue.custom,...Q.value}})},u=l=>{I("update:modelValue",{...t.modelValue,preset:l})};return DA(Q,l=>{h.value||t.modelValue.type==="custom"&&(E(),I("update:modelValue",{...t.modelValue,custom:{...l}}))},{deep:!0}),DA(()=>t.modelValue.custom,l=>{l&&(h.value=!0,Q.value={name:l.name||"",command:l.command||"",threshold:l.threshold!==void 0?l.threshold:20,duration:l.duration!==void 0?l.duration:3e3,model:l.model||"mn6_en"},nt(()=>{h.value=!1}))},{deep:!0,immediate:!0}),(l,f)=>(G(),U("div",_I,[a("div",null,[a("h3",$I,d(l.$t("wakewordConfig.title")),1),a("p",Ao,d(l.$t("wakewordConfig.description")),1)]),B.value?(G(),U("div",Io,[a("div",oo,[a("button",{onClick:f[0]||(f[0]=c=>w("none")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="none"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(l.$t("wakewordConfig.noWakeword")),3),a("button",{onClick:f[1]||(f[1]=c=>w("preset")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="preset"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(l.$t("wakewordConfig.presetWakeword")),3),C.value?(G(),U("button",{key:0,onClick:f[2]||(f[2]=c=>w("custom")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="custom"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(l.$t("wakewordConfig.customWakeword")),3)):O("",!0)]),e.modelValue.type==="preset"?(G(),U("div",io,[a("label",ro,d(l.$t("wakewordConfig.selectWakeword")),1),a("div",Co,[a("select",{value:e.modelValue.preset,onChange:f[3]||(f[3]=c=>u(c.target.value)),class:"w-full border border-gray-300 rounded-md px-3 py-2 pr-10 bg-white focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},[(G(!0),U(bA,null,LA(n.value,c=>(G(),U("option",{key:c.id,value:c.id},d(c.name)+" ("+d(c.model)+") ",9,Bo))),128))],40,no)])])):O("",!0),e.modelValue.type==="custom"?(G(),U("div",ao,[a("h4",so,d(l.$t("wakewordConfig.customSettings")),1),a("div",Qo,[a("div",null,[a("label",Eo,[HA(d(l.$t("wakewordConfig.wakewordName"))+" ",1),f[9]||(f[9]=a("span",{class:"text-red-500"},"*",-1))]),rA(a("input",{type:"text","onUpdate:modelValue":f[4]||(f[4]=c=>Q.value.name=c),placeholder:l.$t("wakewordConfig.wakewordNamePlaceholder"),class:gA(["w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500",{"border-red-500":s.value.name}])},null,10,lo),[[sA,Q.value.name]]),s.value.name?(G(),U("p",co,d(s.value.name),1)):O("",!0)]),a("div",null,[a("label",ho,[HA(d(l.$t("wakewordConfig.wakewordCommand"))+" ",1),f[10]||(f[10]=a("span",{class:"text-red-500"},"*",-1))]),rA(a("input",{type:"text","onUpdate:modelValue":f[5]||(f[5]=c=>Q.value.command=c),placeholder:l.$t("wakewordConfig.wakewordCommandPlaceholderEN"),class:gA(["w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500",{"border-red-500":s.value.command}])},null,10,uo),[[sA,Q.value.command]]),s.value.command?(G(),U("p",fo,d(s.value.command),1)):O("",!0)])]),a("div",wo,[a("div",null,[a("label",po,d(l.$t("wakewordConfig.threshold")),1),a("div",yo,[rA(a("input",{type:"range","onUpdate:modelValue":f[6]||(f[6]=c=>Q.value.threshold=c),min:"0",max:"100",step:"1",class:"flex-1"},null,512),[[sA,Q.value.threshold,void 0,{number:!0}]]),a("span",Do,d(Q.value.threshold),1)]),a("p",mo,d(l.$t("wakewordConfig.thresholdDesc")),1)]),a("div",null,[a("label",Fo,d(l.$t("wakewordConfig.duration"))+" (ms) ",1),rA(a("input",{type:"number","onUpdate:modelValue":f[7]||(f[7]=c=>Q.value.duration=c),min:"500",max:"10000",step:"100",class:gA(["w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500",{"border-red-500":s.value.duration}])},null,2),[[sA,Q.value.duration,void 0,{number:!0}]]),s.value.duration?(G(),U("p",ko,d(s.value.duration),1)):O("",!0)]),a("div",null,[a("label",vo,d(l.$t("wakewordConfig.selectModel")),1),rA(a("select",{"onUpdate:modelValue":f[8]||(f[8]=c=>Q.value.model=c),class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500"},[a("option",So,d(l.$t("wakewordConfig.mn6en")),1)],512),[[Xe,Q.value.model]])])])])):O("",!0),a("div",Go,[a("div",Ro,[a("strong",null,d(l.$t("wakewordConfig.tips.tipLabel")),1),a("ul",Uo,[a("li",null,d(l.$t("wakewordConfig.tips.optional")),1),r.value?(G(),U("li",No,d(l.$t("wakewordConfig.tips.wakeNet9sOnly")),1)):i.value?(G(),U("li",bo,d(l.$t("wakewordConfig.tips.wakeNet9Full")),1)):O("",!0),C.value?(G(),U("li",Lo,d(l.$t("wakewordConfig.tips.customSupport")),1)):O("",!0)])])])])):(G(),U("div",eo,[a("div",go,[a("strong",null,d(l.$t("wakewordConfig.notice")),1),a("p",to,d(l.$t("wakewordConfig.unsupportedMessage",{chipModel:e.chipModel})),1)])]))]))}};class Jo{constructor(){this.dbName="XiaozhiConfigDB",this.version=1,this.db=null,this.initialized=!1}async initialize(){if(!(this.initialized&&this.db))return new Promise((A,g)=>{const t=indexedDB.open(this.dbName,this.version);t.onerror=()=>{console.error("IndexedDB initialization failed:",t.error),g(t.error)},t.onsuccess=()=>{this.db=t.result,this.initialized=!0,console.log("IndexedDB initialized successfully"),A()},t.onupgradeneeded=I=>{const o=I.target.result;if(o.objectStoreNames.contains("configs")||o.createObjectStore("configs",{keyPath:"key"}).createIndex("timestamp","timestamp",{unique:!1}),!o.objectStoreNames.contains("files")){const i=o.createObjectStore("files",{keyPath:"id"});i.createIndex("type","type",{unique:!1}),i.createIndex("timestamp","timestamp",{unique:!1})}if(!o.objectStoreNames.contains("temp_data")){const i=o.createObjectStore("temp_data",{keyPath:"key"});i.createIndex("type","type",{unique:!1}),i.createIndex("timestamp","timestamp",{unique:!1})}console.log("IndexedDB schema created")}})}async saveConfig(A){this.initialized||await this.initialize();const t={key:"current_config",config:this.sanitizeConfigForStorage(A),timestamp:Date.now()};return new Promise((I,o)=>{const C=this.db.transaction(["configs"],"readwrite").objectStore("configs").put(t);C.onerror=()=>{console.error("Failed to save config:",C.error),o(C.error)},C.onsuccess=()=>{console.log("Config saved to IndexedDB"),I()}})}sanitizeConfigForStorage(A){var t,I,o,i,r,C,B,n,Q,s;const g=JSON.parse(JSON.stringify(A||{}));try{if((I=(t=g==null?void 0:g.theme)==null?void 0:t.font)!=null&&I.custom&&(g.theme.font.custom.file=null),((i=(o=g==null?void 0:g.theme)==null?void 0:o.emoji)==null?void 0:i.type)==="custom"){g.theme.emoji.custom||(g.theme.emoji.custom={});const E=((C=(r=g.theme.emoji)==null?void 0:r.custom)==null?void 0:C.images)||{},h={};if(Object.keys(E).forEach(w=>{h[w]=null}),g.theme.emoji.custom.images=h,g.theme.emoji.custom.emotionMap,g.theme.emoji.custom.fileMap){const w=g.theme.emoji.custom.fileMap,u={};Object.keys(w).forEach(l=>{u[l]=null}),g.theme.emoji.custom.fileMap=u}}(n=(B=g==null?void 0:g.theme)==null?void 0:B.skin)!=null&&n.light&&(g.theme.skin.light.backgroundImage=null),(s=(Q=g==null?void 0:g.theme)==null?void 0:Q.skin)!=null&&s.dark&&(g.theme.skin.dark.backgroundImage=null)}catch{}return g}async loadConfig(){return this.initialized||await this.initialize(),new Promise((A,g)=>{const o=this.db.transaction(["configs"],"readonly").objectStore("configs").get("current_config");o.onerror=()=>{console.error("Failed to load config:",o.error),g(o.error)},o.onsuccess=()=>{const i=o.result;i?(console.log("Config restored from IndexedDB successfully"),A({config:i.config,timestamp:i.timestamp})):A(null)}})}async saveFile(A,g,t,I={}){this.initialized||await this.initialize();const o=await this.fileToArrayBuffer(g);let i={};try{i=I?JSON.parse(JSON.stringify(I)):{}}catch{i={...I}}const r={id:A,type:t,name:g.name,size:g.size,mimeType:g.type,lastModified:g.lastModified,data:o,metadata:i,timestamp:Date.now()};return new Promise((C,B)=>{const s=this.db.transaction(["files"],"readwrite").objectStore("files").put(r);s.onerror=()=>{console.error("Failed to save file:",s.error),B(s.error)},s.onsuccess=()=>{console.log(`File ${g.name} saved to IndexedDB`),C()}})}async loadFile(A){return this.initialized||await this.initialize(),new Promise((g,t)=>{const i=this.db.transaction(["files"],"readonly").objectStore("files").get(A);i.onerror=()=>{console.error("Failed to load file:",i.error),t(i.error)},i.onsuccess=()=>{const r=i.result;if(r){const C=new Blob([r.data],{type:r.mimeType}),B=new File([C],r.name,{type:r.mimeType,lastModified:r.lastModified});B.storedId=r.id,B.storedType=r.type,B.storedMetadata=r.metadata,B.storedTimestamp=r.timestamp,console.log(`File ${r.name} restored from IndexedDB successfully`),g(B)}else g(null)}})}async getFilesByType(A){return this.initialized||await this.initialize(),new Promise((g,t)=>{const r=this.db.transaction(["files"],"readonly").objectStore("files").index("type").getAll(A);r.onerror=()=>{console.error("Failed to get file list:",r.error),t(r.error)},r.onsuccess=()=>{const B=(r.result||[]).map(n=>{const Q=new Blob([n.data],{type:n.mimeType}),s=new File([Q],n.name,{type:n.mimeType,lastModified:n.lastModified});return s.storedId=n.id,s.storedType=n.type,s.storedMetadata=n.metadata,s.storedTimestamp=n.timestamp,s});g(B)}})}async saveTempData(A,g,t,I={}){this.initialized||await this.initialize();const o={key:A,type:t,data:g,metadata:I,timestamp:Date.now()};return new Promise((i,r)=>{const n=this.db.transaction(["temp_data"],"readwrite").objectStore("temp_data").put(o);n.onerror=()=>{console.error("Failed to save temporary data:",n.error),r(n.error)},n.onsuccess=()=>{console.log(`Temporary data ${A} saved`),i()}})}async loadTempData(A){return this.initialized||await this.initialize(),new Promise((g,t)=>{const i=this.db.transaction(["temp_data"],"readonly").objectStore("temp_data").get(A);i.onerror=()=>{console.error("Failed to load temporary data:",i.error),t(i.error)},i.onsuccess=()=>{const r=i.result;g(r||null)}})}async clearAll(){this.initialized||await this.initialize();const A=["configs","files","temp_data"];return new Promise((g,t)=>{const I=this.db.transaction(A,"readwrite");let o=0,i=!1;const r=()=>{o++,o===A.length&&(i?t(new Error("Error occurred while clearing partial data")):(console.log("All storage data cleared"),g()))};A.forEach(C=>{const n=I.objectStore(C).clear();n.onerror=()=>{console.error(`Failed to clear ${C}:`,n.error),i=!0,r()},n.onsuccess=()=>{console.log(`${C} cleared`),r()}})})}async deleteFile(A){return this.initialized||await this.initialize(),new Promise((g,t)=>{const i=this.db.transaction(["files"],"readwrite").objectStore("files").delete(A);i.onerror=()=>{console.error("Failed to delete file:",i.error),t(i.error)},i.onsuccess=()=>{console.log(`File ${A} deleted`),g()}})}async getStorageInfo(){this.initialized||await this.initialize();const A=["configs","files","temp_data"],g={};for(const I of A){const o=await new Promise((i,r)=>{const n=this.db.transaction([I],"readonly").objectStore(I).count();n.onerror=()=>r(n.error),n.onsuccess=()=>i(n.result)});g[I]={count:o}}const t=await this.loadConfig();return g.lastSaved=t?new Date(t.timestamp):null,g}async hasStoredConfig(){try{return await this.loadConfig()!==null}catch(A){return console.error("Error checking config:",A),!1}}fileToArrayBuffer(A){return new Promise((g,t)=>{const I=new FileReader;I.onload=()=>g(I.result),I.onerror=()=>t(new Error("Failed to read file")),I.readAsArrayBuffer(A)})}close(){this.db&&(this.db.close(),this.db=null,this.initialized=!1,console.log("IndexedDB connection closed"))}}const cA=new Jo;class Ie{static async saveFontFile(A,g={}){if(A){const t="custom_font";try{await cA.saveFile(t,A,"font",{size:g.size||20,bpp:g.bpp||4,charset:g.charset||"deepseek"}),console.log(`Font file saved: ${A.name}`)}catch(I){console.warn(`Failed to save font file: ${A.name}`,I)}}}static async saveEmojiFile(A,g,t={}){var I,o;if(g&&A){const i=A.startsWith("hash_")?A:`emoji_${A}`;try{const r=((I=t==null?void 0:t.size)==null?void 0:I.width)??64,C=((o=t==null?void 0:t.size)==null?void 0:o.height)??64;await cA.saveFile(i,g,"emoji",{name:A,size:{width:r,height:C},format:t==null?void 0:t.format,emotions:t==null?void 0:t.emotions}),console.log(`Expression file saved: ${i} - ${g.name}`)}catch(r){console.warn(`Failed to save expression file: ${A}`,r)}}}static async saveBackgroundFile(A,g,t={}){if(g&&A){const I=`background_${A}`;try{let o={};try{o=t?JSON.parse(JSON.stringify(t)):{}}catch{o={...t}}await cA.saveFile(I,g,"background",{mode:A,...o}),console.log(`Background file saved: ${A} - ${g.name}`)}catch(o){console.warn(`Failed to save background file: ${A}`,o)}}}static async restoreFontFile(){try{return await cA.loadFile("custom_font")}catch(A){return console.warn("Failed to restore font file:",A),null}}static async restoreEmojiFile(A){if(!A)return null;try{const g=A.startsWith("hash_")?A:`emoji_${A}`;return await cA.loadFile(g)}catch(g){return console.warn(`Failed to restore expression file: ${A}`,g),null}}static async restoreBackgroundFile(A){if(!A)return null;try{const g=`background_${A}`;return await cA.loadFile(g)}catch(g){return console.warn(`Failed to restore background file: ${A}`,g),null}}static async deleteFontFile(){try{await cA.deleteFile("custom_font"),console.log("Font file deleted")}catch(A){console.warn("Failed to delete font file:",A)}}static async deleteEmojiFile(A){if(A)try{const g=A.startsWith("hash_")?A:`emoji_${A}`;await cA.deleteFile(g),console.log(`Expression file deleted: ${g}`)}catch(g){console.warn(`Failed to delete expression file: ${A}`,g)}}static async deleteBackgroundFile(A){if(A)try{const g=`background_${A}`;await cA.deleteFile(g),console.log(`Background file deleted: ${A}`)}catch(g){console.warn(`Failed to delete background file: ${A}`,g)}}static async getStorageInfo(){try{return await cA.getStorageInfo()}catch(A){return console.warn("Failed to get storage info:",A),{configs:{count:0},files:{count:0},temp_data:{count:0},lastSaved:null}}}static async clearAllFiles(){try{await cA.clearAll(),console.log("All storage files cleaned")}catch(A){throw console.warn("Failed to clean up storage files:",A),A}}}const xo={class:"space-y-6"},Ho={class:"text-lg font-medium text-gray-900 mb-2"},Yo={class:"text-gray-600"},Ko={class:"space-y-4"},To={class:"flex space-x-4"},Vo={key:0,class:"space-y-4"},qo={class:"bg-gray-50 border border-gray-200 rounded-lg p-6 text-center"},Oo={class:"mt-2 text-gray-600"},Wo={key:1,class:"space-y-4"},Po={class:"font-medium text-gray-900"},Zo={class:"grid grid-cols-1 md:grid-cols-4 gap-4"},Xo=["onClick"],jo={class:"flex items-start justify-between"},zo={class:"flex-1"},_o={class:"font-medium text-gray-900 mb-1"},$o={class:"text-sm text-gray-600 space-y-1"},Ai={key:0,class:"flex-shrink-0 ml-3"},ei={key:2,class:"space-y-6"},gi={class:"font-medium text-gray-900"},ti={class:"space-y-2"},Ii={class:"block text-sm font-medium text-gray-700"},oi={key:0},ii={class:"mt-2"},ri={class:"text-gray-500"},Ci={class:"text-xs text-gray-400 mt-1"},ni={key:1,class:"text-green-600"},Bi={class:"mt-1 font-medium"},ai={key:0,class:"grid grid-cols-1 md:grid-cols-3 gap-4"},si={class:"block text-sm font-medium text-gray-700 mb-2"},Qi={class:"text-xs text-gray-500 mt-1"},Ei={class:"block text-sm font-medium text-gray-700 mb-2"},li={value:1},ci={value:2},hi={value:4},ui={class:"block text-sm font-medium text-gray-700 mb-2"},di={value:"qwen"},fi={value:"deepseek"},wi={value:"latin"},pi={value:"full"},yi={class:"flex items-center justify-between p-4 bg-gray-50 rounded-lg border border-gray-200"},Di={class:"flex-1"},mi={class:"font-medium text-gray-900"},Fi={class:"text-sm text-gray-500 mt-1"},ki={class:"ml-4"},vi={class:"relative inline-flex items-center cursor-pointer"},Si=["checked"],Gi={__name:"FontConfig",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(e,{emit:A}){const{t:g}=TA(),t=e,I=A,o=j(null),i=[{id:"font_puhui_deepseek_14_1",size:14,bpp:1,fileSize:"~180KB"},{id:"font_puhui_deepseek_16_4",size:16,bpp:4,fileSize:"~720KB"},{id:"font_puhui_deepseek_20_4",size:20,bpp:4,fileSize:"~1.1MB"},{id:"font_puhui_deepseek_30_4",size:30,bpp:4,fileSize:"~2.5MB"},{id:"font_noto_qwen_14_1",size:14,bpp:1,fileSize:"~626KB"},{id:"font_noto_qwen_16_4",size:16,bpp:4,fileSize:"~2.0MB"},{id:"font_noto_qwen_20_4",size:20,bpp:4,fileSize:"~2.9MB"},{id:"font_noto_qwen_30_4",size:30,bpp:4,fileSize:"~5.8MB"}],r=nA(()=>i.map(u=>{let l;return u.id.startsWith("font_puhui_deepseek_")?l=g("fontConfig.charsetDeepseek"):u.id.startsWith("font_noto_qwen_")&&(l=g("fontConfig.charsetQwen")),{...u,name:g("fontConfig.presetFontNames."+u.id),charset:l}})),C=j({size:20,bpp:4,charset:"qwen"}),B=u=>{I("update:modelValue",{...t.modelValue,type:u,preset:u==="preset"?t.modelValue.preset||"font_puhui_deepseek_20_4":"",custom:{...t.modelValue.custom,file:t.modelValue.custom.file||null}})},n=u=>{I("update:modelValue",{...t.modelValue,preset:u,custom:{...t.modelValue.custom,file:t.modelValue.custom.file||null}})},Q=u=>{const l=u.target.files[0];l&&E(l)},s=u=>{u.preventDefault();const l=u.dataTransfer.files;l.length>0&&E(l[0])},E=async u=>{u&&(u.type.includes("font")||u.name.toLowerCase().match(/\.(ttf|woff|woff2)$/))?(I("update:modelValue",{...t.modelValue,custom:{...t.modelValue.custom,file:u,...C.value}}),await Ie.saveFontFile(u,C.value)):alert(g("fontConfig.selectValidFontFile"))},h=async()=>{I("update:modelValue",{...t.modelValue,custom:{...t.modelValue.custom,file:null}}),o.value&&(o.value.value=""),await Ie.deleteFontFile()},w=j(!1);return DA(()=>C.value,u=>{w.value||t.modelValue.type==="custom"&&t.modelValue.custom.file&&I("update:modelValue",{...t.modelValue,custom:{...t.modelValue.custom,...u}})},{deep:!0}),DA(()=>t.modelValue.custom,u=>{u.size&&u.bpp&&u.charset&&(w.value=!0,C.value={size:u.size,bpp:u.bpp,charset:u.charset},nt(()=>{w.value=!1}))},{deep:!0,immediate:!0}),(u,l)=>{var f;return G(),U("div",xo,[a("div",null,[a("h3",Ho,d(u.$t("fontConfig.title")),1),a("p",Yo,d(u.$t("fontConfig.description")),1)]),a("div",Ko,[a("div",To,[a("button",{onClick:l[0]||(l[0]=c=>B("none")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="none"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(u.$t("fontConfig.noFonts")),3),a("button",{onClick:l[1]||(l[1]=c=>B("preset")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="preset"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(u.$t("fontConfig.presetFonts")),3),a("button",{onClick:l[2]||(l[2]=c=>B("custom")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="custom"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(u.$t("fontConfig.customFonts")),3)])]),e.modelValue.type==="none"?(G(),U("div",Vo,[a("div",qo,[l[10]||(l[10]=a("svg",{class:"mx-auto h-12 w-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)),a("p",Oo,d(u.$t("fontConfig.noFontsDescription")),1)])])):O("",!0),e.modelValue.type==="preset"?(G(),U("div",Wo,[a("h4",Po,d(u.$t("fontConfig.presetFonts")),1),a("div",Zo,[(G(!0),U(bA,null,LA(r.value,c=>(G(),U("div",{key:c.id,onClick:D=>n(c.id),class:gA(["border-2 rounded-lg p-4 cursor-pointer transition-all",e.modelValue.preset===c.id?"border-primary-500 bg-primary-50":"border-gray-200 hover:border-gray-300"])},[a("div",jo,[a("div",zo,[a("h5",_o,d(c.name),1),a("div",$o,[a("div",null,d(u.$t("fontConfig.fontSize"))+" "+d(c.size)+"px",1),a("div",null,d(u.$t("fontConfig.bitDepth"))+" "+d(c.bpp)+"bpp",1),a("div",null,d(u.$t("fontConfig.charset"))+" "+d(c.charset),1),a("div",null,d(u.$t("fontConfig.fileSize"))+" "+d(c.fileSize),1)])]),e.modelValue.preset===c.id?(G(),U("div",Ai,[...l[11]||(l[11]=[a("div",{class:"w-5 h-5 bg-primary-500 rounded-full flex items-center justify-center"},[a("svg",{class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})])],-1)])])):O("",!0)])],10,Xo))),128))])])):O("",!0),e.modelValue.type==="custom"?(G(),U("div",ei,[a("h4",gi,d(u.$t("fontConfig.customFonts")),1),a("div",ti,[a("label",Ii,d(u.$t("fontConfig.fontFile")),1),a("div",{onDrop:s,onDragover:l[4]||(l[4]=PA(()=>{},["prevent"])),onDragenter:l[5]||(l[5]=PA(()=>{},["prevent"])),class:"border-2 border-dashed border-gray-300 rounded-lg p-6 text-center hover:border-gray-400 transition-colors"},[a("input",{ref_key:"fileInput",ref:o,type:"file",accept:".ttf,.woff,.woff2",onChange:Q,class:"hidden"},null,544),e.modelValue.custom.file?(G(),U("div",ni,[l[13]||(l[13]=a("svg",{class:"mx-auto h-8 w-8",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"})],-1)),a("p",Bi,d((f=e.modelValue.custom.file)==null?void 0:f.name),1),a("button",{onClick:h,class:"text-red-600 hover:text-red-500 text-sm mt-1"},d(u.$t("fontConfig.removeFile")),1)])):(G(),U("div",oi,[l[12]||(l[12]=a("svg",{class:"mx-auto h-12 w-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})],-1)),a("div",ii,[a("button",{onClick:l[3]||(l[3]=c=>u.$refs.fileInput.click()),class:"text-primary-600 hover:text-primary-500 font-medium"},d(u.$t("fontConfig.clickSelectFontFile")),1),a("p",ri,d(u.$t("fontConfig.orDragFileHere")),1)]),a("p",Ci,d(u.$t("fontConfig.supportedFormats")),1)]))],32)]),e.modelValue.custom.file?(G(),U("div",ai,[a("div",null,[a("label",si,d(u.$t("fontConfig.fontSizePx")),1),rA(a("input",{type:"number","onUpdate:modelValue":l[6]||(l[6]=c=>C.value.size=c),min:"8",max:"80",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},null,512),[[sA,C.value.size,void 0,{number:!0}]]),a("p",Qi,d(u.$t("fontConfig.range"))+" 8-80px",1)]),a("div",null,[a("label",Ei,d(u.$t("fontConfig.bitDepthBpp")),1),rA(a("select",{"onUpdate:modelValue":l[7]||(l[7]=c=>C.value.bpp=c),class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},[a("option",li,d(u.$t("fontConfig.monochrome")),1),a("option",ci,d(u.$t("fontConfig.fourColors")),1),a("option",hi,d(u.$t("fontConfig.sixteenColors")),1)],512),[[Xe,C.value.bpp]])]),a("div",null,[a("label",ui,d(u.$t("fontConfig.characterSet")),1),rA(a("select",{"onUpdate:modelValue":l[8]||(l[8]=c=>C.value.charset=c),class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},[a("option",di,d(u.$t("fontConfig.qwen18409")),1),a("option",fi,d(u.$t("fontConfig.deepseekR1")),1),a("option",wi,d(u.$t("fontConfig.latin1")),1),a("option",pi,d(u.$t("fontConfig.fullCharset")),1)],512),[[Xe,C.value.charset]])])])):O("",!0)])):O("",!0),a("div",yi,[a("div",Di,[a("h4",mi,d(u.$t("fontConfig.hideSubtitle")),1),a("p",Fi,d(u.$t("fontConfig.hideSubtitleDescription")),1)]),a("div",ki,[a("label",vi,[a("input",{type:"checkbox",checked:e.modelValue.hide_subtitle,onChange:l[9]||(l[9]=c=>I("update:modelValue",{...e.modelValue,hide_subtitle:c.target.checked})),class:"sr-only peer"},null,40,Si),l[14]||(l[14]=a("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-primary-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary-500"},null,-1))])])])])}}},Ri={class:"space-y-6"},Ui={class:"text-lg font-medium text-gray-900 mb-2"},Ni={class:"text-gray-600"},bi={class:"space-y-4"},Li={class:"flex flex-wrap gap-3"},Mi={key:0,class:"text-sm text-gray-500"},Ji={key:0,class:"space-y-4"},xi={class:"font-medium text-gray-900"},Hi={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Yi=["onClick"],Ki={class:"flex items-start justify-between mb-3"},Ti={class:"font-medium text-gray-900"},Vi={class:"text-sm text-gray-600"},qi={class:"text-xs text-gray-500 mt-1"},Oi={key:0,class:"flex-shrink-0 ml-3"},Wi={class:"grid grid-cols-7 gap-1 justify-items-center overflow-hidden"},Pi=["src","alt"],Zi={key:1,class:"space-y-6"},Xi={class:"font-medium text-gray-900"},ji={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},zi={class:"block text-sm font-medium text-gray-700 mb-2"},_i={class:"block text-sm font-medium text-gray-700 mb-2"},$i={class:"space-y-4"},Ar={class:"font-medium text-gray-900"},er={class:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-4"},gr={class:"text-center"},tr={class:"text-lg mb-1"},Ir={class:"text-xs text-gray-600 flex items-center justify-center gap-1"},or={key:0,class:"text-red-500"},ir=["onDrop"],rr=["onChange"],Cr=["onClick"],nr={class:"text-xs text-gray-500"},Br={key:1,class:"w-full h-full relative"},ar=["src","alt"],sr=["onClick"],Qr={class:"text-xs text-gray-500 mt-2"},Er={__name:"EmojiConfig",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(e,{emit:A}){const{t:g}=TA(),t=e,I=A,o=async f=>{const c=await f.arrayBuffer(),D=await crypto.subtle.digest("SHA-256",c);return Array.from(new Uint8Array(D)).map(N=>N.toString(16).padStart(2,"0")).join("")},i=[{id:"twemoji32",name:g("emojiConfig.twitterEmojiName",{size:32}),description:g("emojiConfig.twitterEmojiDescription",{size:32}),size:32,format:"png",preview:["neutral","happy","laughing","funny","sad","angry","crying"]},{id:"twemoji64",name:g("emojiConfig.twitterEmojiName",{size:64}),description:g("emojiConfig.twitterEmojiDescription",{size:64}),size:64,format:"png",preview:["neutral","happy","laughing","funny","sad","angry","crying"]},{id:"noto-emoji_64",name:g("emojiConfig.notoEmojiName",{size:64}),description:g("emojiConfig.notoEmojiDescription",{size:64}),size:64,format:"gif",preview:["neutral","happy","laughing","funny","sad","angry","crying"]},{id:"noto-emoji_128",name:g("emojiConfig.notoEmojiName",{size:128}),description:g("emojiConfig.notoEmojiDescription",{size:128}),size:128,format:"gif",preview:["neutral","happy","laughing","funny","sad","angry","crying"]}],r=nA(()=>[{key:"neutral",name:g("emojiConfig.emotions.neutral"),emoji:"😶"},{key:"happy",name:g("emojiConfig.emotions.happy"),emoji:"🙂"},{key:"laughing",name:g("emojiConfig.emotions.laughing"),emoji:"😆"},{key:"funny",name:g("emojiConfig.emotions.funny"),emoji:"😂"},{key:"sad",name:g("emojiConfig.emotions.sad"),emoji:"😔"},{key:"angry",name:g("emojiConfig.emotions.angry"),emoji:"😠"},{key:"crying",name:g("emojiConfig.emotions.crying"),emoji:"😭"},{key:"loving",name:g("emojiConfig.emotions.loving"),emoji:"😍"},{key:"embarrassed",name:g("emojiConfig.emotions.embarrassed"),emoji:"😳"},{key:"surprised",name:g("emojiConfig.emotions.surprised"),emoji:"😯"},{key:"shocked",name:g("emojiConfig.emotions.shocked"),emoji:"😱"},{key:"thinking",name:g("emojiConfig.emotions.thinking"),emoji:"🤔"},{key:"winking",name:g("emojiConfig.emotions.winking"),emoji:"😉"},{key:"cool",name:g("emojiConfig.emotions.cool"),emoji:"😎"},{key:"relaxed",name:g("emojiConfig.emotions.relaxed"),emoji:"😌"},{key:"delicious",name:g("emojiConfig.emotions.delicious"),emoji:"🤤"},{key:"kissy",name:g("emojiConfig.emotions.kissy"),emoji:"😘"},{key:"confident",name:g("emojiConfig.emotions.confident"),emoji:"😏"},{key:"sleepy",name:g("emojiConfig.emotions.sleepy"),emoji:"😴"},{key:"silly",name:g("emojiConfig.emotions.silly"),emoji:"😜"},{key:"confused",name:g("emojiConfig.emotions.confused"),emoji:"🙄"}]),C=j({size:{width:32,height:32}}),B=f=>{if(t.modelValue.type===f)return;const c={...t.modelValue,type:f};f==="none"?(c.preset="",c.custom={...t.modelValue.custom,images:t.modelValue.custom.images||{}}):f==="preset"?(c.preset=t.modelValue.preset||"twemoji32",c.custom={...t.modelValue.custom,images:t.modelValue.custom.images||{}}):f==="custom"&&(c.preset="",c.custom={...t.modelValue.custom,images:t.modelValue.custom.images||{}}),I("update:modelValue",c)},n=f=>{t.modelValue.preset!==f&&I("update:modelValue",{...t.modelValue,preset:f,custom:{...t.modelValue.custom,images:t.modelValue.custom.images||{}}})},Q=(f,c)=>{const D=f.target.files[0];D&&E(c,D)},s=(f,c)=>{f.preventDefault();const D=f.dataTransfer.files;D.length>0&&E(c,D[0])},E=async(f,c)=>{const D=["png","gif"],p=c.name.split(".").pop().toLowerCase();if(!D.includes(p)){alert(g("emojiConfig.selectValidFormat"));return}const v=await o(c),N=t.modelValue.custom||{},L={...N.fileMap||{}},X={...N.emotionMap||{}},k={...N.images||{}};let m=[];for(const[M,oA]of Object.entries(X))oA===v&&M!==f&&m.push(M);m.length>0&&console.log(g("emojiConfig.sharedFileMessage",{emotionKey:f,existingEmotions:m.join(", ")})),L[v]=c,X[f]=v,k[f]=c,I("update:modelValue",{...t.modelValue,custom:{...N,size:C.value.size,images:k,fileMap:L,emotionMap:X}}),await Ie.saveEmojiFile(`hash_${v}`,c,{size:C.value.size,format:p,emotions:[...m,f]})},h=async f=>{const c=t.modelValue.custom||{},D={...c.images},p={...c.emotionMap||{}},v={...c.fileMap||{}},N=p[f];delete D[f],delete p[f],Object.values(p).filter(X=>X===N).length===0&&N?(delete v[N],await Ie.deleteEmojiFile(`hash_${N}`),console.log(g("emojiConfig.fileDeleted",{fileHash:N}))):console.log(g("emojiConfig.fileRetained",{fileHash:N})),I("update:modelValue",{...t.modelValue,custom:{...c,images:D,emotionMap:p,fileMap:v}})},w=(f,c)=>{const D=i.find(v=>v.id===f),p=(D==null?void 0:D.format)||"png";return`./static/emojis/${f}/${c}.${p}`},u=f=>{if(t.modelValue.type==="preset")return w(t.modelValue.preset,f);{const c=t.modelValue.custom.images[f];return c instanceof File||c instanceof Blob?URL.createObjectURL(c):null}},l=f=>{console.warn(g("emojiConfig.imageLoadFailed"),f.target.src),f.target.style.display="none"};return DA(()=>C.value.size,f=>{if(t.modelValue.type==="custom"){const c=t.modelValue.custom;JSON.stringify(c.size)!==JSON.stringify(f)&&I("update:modelValue",{...t.modelValue,custom:{...c,size:f}})}},{deep:!0}),t.modelValue.custom.size&&(C.value={size:{...t.modelValue.custom.size}}),(f,c)=>(G(),U("div",Ri,[a("div",null,[a("h3",Ui,d(f.$t("emojiConfig.title")),1),a("p",Ni,d(f.$t("emojiConfig.description")),1)]),a("div",bi,[a("div",Li,[a("button",{onClick:c[0]||(c[0]=D=>B("none")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="none"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(f.$t("emojiConfig.noEmojiPack")),3),a("button",{onClick:c[1]||(c[1]=D=>B("preset")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="preset"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(f.$t("emojiConfig.presetEmojiPack")),3),a("button",{onClick:c[2]||(c[2]=D=>B("custom")),class:gA(["px-4 py-2 border rounded-lg transition-colors",e.modelValue.type==="custom"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(f.$t("emojiConfig.customEmojiPack")),3)]),e.modelValue.type==="none"?(G(),U("p",Mi,d(f.$t("emojiConfig.noEmojiPackDescription")),1)):O("",!0)]),e.modelValue.type==="preset"?(G(),U("div",Ji,[a("h4",xi,d(f.$t("emojiConfig.selectPresetEmojiPack")),1),a("div",Hi,[(G(),U(bA,null,LA(i,D=>a("div",{key:D.id,onClick:p=>n(D.id),class:gA(["border-2 rounded-lg p-4 cursor-pointer transition-all",e.modelValue.preset===D.id?"border-primary-500 bg-primary-50":"border-gray-200 hover:border-gray-300"])},[a("div",Ki,[a("div",null,[a("h5",Ti,d(D.name),1),a("p",Vi,d(D.description),1),a("div",qi,d(f.$t("emojiConfig.size"))+": "+d(D.size)+"px × "+d(D.size)+"px ",1)]),e.modelValue.preset===D.id?(G(),U("div",Oi,[...c[7]||(c[7]=[a("div",{class:"w-5 h-5 bg-primary-500 rounded-full flex items-center justify-center"},[a("svg",{class:"w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})])],-1)])])):O("",!0)]),a("div",Wi,[(G(!0),U(bA,null,LA(D.preview,p=>(G(),U("div",{key:p,style:CA({width:D.size+"px",height:D.size+"px"}),class:"bg-gray-100 rounded flex items-center justify-center"},[a("img",{src:w(D.id,p),alt:p,style:CA({width:D.size+"px",height:D.size+"px"}),class:"object-contain rounded",onError:l},null,44,Pi)],4))),128))])],10,Yi)),64))])])):O("",!0),e.modelValue.type==="custom"?(G(),U("div",Zi,[a("h4",Xi,d(f.$t("emojiConfig.customEmojiPackConfig")),1),a("div",ji,[a("div",null,[a("label",zi,d(f.$t("emojiConfig.maxImageWidth")),1),rA(a("input",{type:"number","onUpdate:modelValue":c[3]||(c[3]=D=>C.value.size.width=D),min:"16",max:"200",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},null,512),[[sA,C.value.size.width,void 0,{number:!0}]])]),a("div",null,[a("label",_i,d(f.$t("emojiConfig.maxImageHeight")),1),rA(a("input",{type:"number","onUpdate:modelValue":c[4]||(c[4]=D=>C.value.size.height=D),min:"16",max:"200",class:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500"},null,512),[[sA,C.value.size.height,void 0,{number:!0}]])])]),a("div",$i,[a("h5",Ar,d(f.$t("emojiConfig.uploadEmojiImages")),1),a("div",er,[(G(!0),U(bA,null,LA(r.value,D=>(G(),U("div",{key:D.key,class:"space-y-2"},[a("div",gr,[a("div",tr,d(D.emoji),1),a("div",Ir,[a("span",null,d(D.name),1),D.key==="neutral"?(G(),U("span",or,d(f.$t("emojiConfig.required")),1)):O("",!0)])]),a("div",{onDrop:p=>s(p,D.key),onDragover:c[5]||(c[5]=PA(()=>{},["prevent"])),onDragenter:c[6]||(c[6]=PA(()=>{},["prevent"])),class:gA(["border-2 border-dashed rounded-lg p-2 text-center cursor-pointer transition-colors aspect-square flex flex-col items-center justify-center",e.modelValue.custom.images[D.key]?"border-green-300 bg-green-50":D.key==="neutral"?"border-red-300 bg-red-50":"border-gray-300 hover:border-gray-400"])},[a("input",{ref_for:!0,ref:D.key+"Input",type:"file",accept:".png,.gif",onChange:p=>Q(p,D.key),class:"hidden"},null,40,rr),e.modelValue.custom.images[D.key]?(G(),U("div",Br,[u(D.key)?(G(),U("img",{key:0,src:u(D.key),alt:D.name,class:"w-full h-full object-cover rounded",onError:l},null,40,ar)):O("",!0),a("button",{onClick:p=>h(D.key),class:"absolute -top-1 -right-1 w-4 h-4 bg-red-500 text-white rounded-full flex items-center justify-center text-xs hover:bg-red-600"}," × ",8,sr)])):(G(),U("div",{key:0,onClick:p=>{var v;return(v=f.$refs[D.key+"Input"][0])==null?void 0:v.click()}},[c[8]||(c[8]=a("svg",{class:"w-6 h-6 text-gray-400 mx-auto mb-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})],-1)),a("div",nr,d(f.$t("emojiConfig.clickToUploadOrDrag")),1)],8,Cr))],42,ir)]))),128))]),a("div",Qr,d(f.$t("emojiConfig.neutralRequiredNotice")),1)])])):O("",!0)]))}},lr={class:"space-y-6"},cr={class:"text-lg font-medium text-gray-900 mb-2"},hr={class:"text-gray-600"},ur={class:"space-y-4"},dr={class:"font-medium text-gray-900 flex items-center"},fr={class:"border border-gray-200 rounded-lg p-4 space-y-4"},wr={class:"flex space-x-4"},pr={key:0,class:"space-y-3"},yr={class:"flex items-center space-x-3"},Dr={class:"text-sm font-medium text-gray-700"},mr={class:"flex items-center space-x-2"},Fr={class:"flex items-center space-x-3"},kr={class:"text-sm font-medium text-gray-700"},vr={class:"flex items-center space-x-2"},Sr={key:1,class:"space-y-3"},Gr={class:"text-sm font-medium text-gray-700"},Rr={class:"mt-1 text-sm text-gray-600"},Ur={key:1,class:"space-y-2"},Nr=["src"],br={class:"text-sm text-green-700 font-medium"},Lr={class:"flex items-center space-x-3"},Mr={class:"text-sm font-medium text-gray-700"},Jr={class:"flex items-center space-x-2"},xr={class:"space-y-4"},Hr={class:"font-medium text-gray-900 flex items-center"},Yr={class:"border border-gray-200 rounded-lg p-4 space-y-4"},Kr={class:"flex space-x-4"},Tr={key:0,class:"space-y-3"},Vr={class:"flex items-center space-x-3"},qr={class:"text-sm font-medium text-gray-700"},Or={class:"flex items-center space-x-2"},Wr={class:"flex items-center space-x-3"},Pr={class:"text-sm font-medium text-gray-700"},Zr={class:"flex items-center space-x-2"},Xr={key:1,class:"space-y-3"},jr={class:"text-sm font-medium text-gray-700"},zr={class:"mt-1 text-sm text-gray-600"},_r={key:1,class:"space-y-2"},$r=["src"],AC={class:"text-sm text-green-700 font-medium"},eC={class:"flex items-center space-x-3"},gC={class:"text-sm font-medium text-gray-700"},tC={class:"flex items-center space-x-2"},IC={class:"space-y-4"},oC={class:"font-medium text-gray-900"},iC={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},rC={class:"space-y-2"},CC={class:"text-sm font-medium text-gray-700"},nC={class:"absolute inset-0 bg-white bg-opacity-10 flex items-center justify-center rounded-lg"},BC={class:"space-y-2"},aC={class:"text-sm font-medium text-gray-700"},sC={class:"absolute inset-0 bg-black bg-opacity-10 flex items-center justify-center rounded-lg"},QC={class:"bg-blue-50 border border-blue-200 rounded-lg p-4"},EC={class:"font-medium text-blue-900 mb-2"},lC={class:"flex flex-wrap gap-2"},cC={__name:"BackgroundConfig",props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],setup(e,{emit:A}){const{t:g}=TA(),t=e,I=A,o=j(null),i=j(null),r=nA({get:()=>t.modelValue.light.backgroundColor,set:k=>E(k)}),C=nA({get:()=>t.modelValue.dark.backgroundColor,set:k=>h(k)}),B=nA({get:()=>t.modelValue.light.textColor,set:k=>w(k)}),n=nA({get:()=>t.modelValue.dark.textColor,set:k=>u(k)}),Q=k=>{I("update:modelValue",{...t.modelValue,light:{...t.modelValue.light,backgroundType:k,backgroundImage:k==="image"?t.modelValue.light.backgroundImage:null}})},s=k=>{I("update:modelValue",{...t.modelValue,dark:{...t.modelValue.dark,backgroundType:k,backgroundImage:k==="image"?t.modelValue.dark.backgroundImage:null}})},E=k=>{I("update:modelValue",{...t.modelValue,light:{...t.modelValue.light,backgroundColor:k}})},h=k=>{I("update:modelValue",{...t.modelValue,dark:{...t.modelValue.dark,backgroundColor:k}})},w=k=>{I("update:modelValue",{...t.modelValue,light:{...t.modelValue.light,textColor:k}})},u=k=>{I("update:modelValue",{...t.modelValue,dark:{...t.modelValue.dark,textColor:k}})},l=(k,m)=>{const M=k.target.files[0];M&&c(m,M)},f=(k,m)=>{k.preventDefault();const M=k.dataTransfer.files;M.length>0&&c(m,M[0])},c=async(k,m)=>{m&&m.type.startsWith("image/")?(I("update:modelValue",{...t.modelValue,[k]:{...t.modelValue[k],backgroundImage:m}}),await Ie.saveBackgroundFile(k,m)):alert(g("backgroundConfig.selectValidImage"))},D=async k=>{I("update:modelValue",{...t.modelValue,[k]:{...t.modelValue[k],backgroundImage:null}}),k==="light"&&o.value&&(o.value.value=""),k==="dark"&&i.value&&(i.value.value=""),await Ie.deleteBackgroundFile(k)},p=k=>{const m=t.modelValue[k].backgroundImage;return m?URL.createObjectURL(m):null},v=()=>t.modelValue.light.backgroundType==="image"&&t.modelValue.light.backgroundImage?{backgroundImage:`url(${p("light")})`,backgroundSize:"cover",backgroundPosition:"center"}:{backgroundColor:t.modelValue.light.backgroundColor},N=()=>t.modelValue.dark.backgroundType==="image"&&t.modelValue.dark.backgroundImage?{backgroundImage:`url(${p("dark")})`,backgroundSize:"cover",backgroundPosition:"center"}:{backgroundColor:t.modelValue.dark.backgroundColor},L=(k,m)=>{const M=X(k)?"#000000":"#ffffff",oA=X(m)?"#000000":"#ffffff";I("update:modelValue",{...t.modelValue,light:{...t.modelValue.light,backgroundType:"color",backgroundColor:k,textColor:M,backgroundImage:null},dark:{...t.modelValue.dark,backgroundType:"color",backgroundColor:m,textColor:oA,backgroundImage:null}})},X=k=>{const m=k.replace("#",""),M=parseInt(m.substr(0,2),16),oA=parseInt(m.substr(2,2),16),F=parseInt(m.substr(4,2),16);return(M*299+oA*587+F*114)/1e3>128};return(k,m)=>(G(),U("div",lr,[a("div",null,[a("h3",cr,d(k.$t("backgroundConfig.title")),1),a("p",hr,d(k.$t("backgroundConfig.description")),1)]),a("div",ur,[a("h4",dr,[m[33]||(m[33]=a("svg",{class:"w-5 h-5 mr-2 text-yellow-500",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z","clip-rule":"evenodd"})],-1)),HA(" "+d(k.$t("backgroundConfig.lightMode")),1)]),a("div",fr,[a("div",wr,[a("button",{onClick:m[0]||(m[0]=M=>Q("color")),class:gA(["px-3 py-2 text-sm border rounded transition-colors",e.modelValue.light.backgroundType==="color"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(k.$t("backgroundConfig.solidBackground")),3),a("button",{onClick:m[1]||(m[1]=M=>Q("image")),class:gA(["px-3 py-2 text-sm border rounded transition-colors",e.modelValue.light.backgroundType==="image"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(k.$t("backgroundConfig.imageBackground")),3)]),e.modelValue.light.backgroundType==="color"?(G(),U("div",pr,[a("div",yr,[a("label",Dr,d(k.$t("backgroundConfig.backgroundColor")),1),a("div",mr,[rA(a("input",{type:"color","onUpdate:modelValue":m[2]||(m[2]=M=>r.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,r.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[3]||(m[3]=M=>r.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,r.value]])]),a("div",{style:CA({backgroundColor:r.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)]),a("div",Fr,[a("label",kr,d(k.$t("backgroundConfig.textColor")),1),a("div",vr,[rA(a("input",{type:"color","onUpdate:modelValue":m[4]||(m[4]=M=>B.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,B.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[5]||(m[5]=M=>B.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,B.value]])]),a("div",{style:CA({backgroundColor:B.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)])])):O("",!0),e.modelValue.light.backgroundType==="image"?(G(),U("div",Sr,[a("label",Gr,d(k.$t("backgroundConfig.backgroundImage")),1),a("div",{onDrop:m[9]||(m[9]=M=>f(M,"light")),onDragover:m[10]||(m[10]=PA(()=>{},["prevent"])),onDragenter:m[11]||(m[11]=PA(()=>{},["prevent"])),class:gA(["border-2 border-dashed rounded-lg p-4 text-center cursor-pointer transition-colors",e.modelValue.light.backgroundImage?"border-green-300 bg-green-50":"border-gray-300 hover:border-gray-400"])},[a("input",{ref_key:"lightImageInput",ref:o,type:"file",accept:"image/*",onChange:m[6]||(m[6]=M=>l(M,"light")),class:"hidden"},null,544),e.modelValue.light.backgroundImage?(G(),U("div",Ur,[a("img",{src:p("light"),alt:"{{ $t('backgroundConfig.lightModePreview') }} Background",class:"max-w-32 max-h-32 mx-auto rounded shadow"},null,8,Nr),a("p",br,d(e.modelValue.light.backgroundImage.name),1),a("button",{onClick:m[8]||(m[8]=M=>D("light")),class:"text-red-600 hover:text-red-500 text-sm"},d(k.$t("backgroundConfig.removeImage")),1)])):(G(),U("div",{key:0,onClick:m[7]||(m[7]=M=>k.$refs.lightImageInput.click())},[m[34]||(m[34]=a("svg",{class:"mx-auto h-8 w-8 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)),a("p",Rr,d(k.$t("backgroundConfig.clickOrDragToUpload")),1)]))],34),a("div",Lr,[a("label",Mr,d(k.$t("backgroundConfig.textColor")),1),a("div",Jr,[rA(a("input",{type:"color","onUpdate:modelValue":m[12]||(m[12]=M=>B.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,B.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[13]||(m[13]=M=>B.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,B.value]])]),a("div",{style:CA({backgroundColor:B.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)])])):O("",!0)])]),a("div",xr,[a("h4",Hr,[m[35]||(m[35]=a("svg",{class:"w-5 h-5 mr-2 text-gray-600",fill:"currentColor",viewBox:"0 0 20 20"},[a("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})],-1)),HA(" "+d(k.$t("backgroundConfig.darkMode")),1)]),a("div",Yr,[a("div",Kr,[a("button",{onClick:m[14]||(m[14]=M=>s("color")),class:gA(["px-3 py-2 text-sm border rounded transition-colors",e.modelValue.dark.backgroundType==="color"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(k.$t("backgroundConfig.solidBackground")),3),a("button",{onClick:m[15]||(m[15]=M=>s("image")),class:gA(["px-3 py-2 text-sm border rounded transition-colors",e.modelValue.dark.backgroundType==="image"?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 hover:border-gray-400"])},d(k.$t("backgroundConfig.imageBackground")),3)]),e.modelValue.dark.backgroundType==="color"?(G(),U("div",Tr,[a("div",Vr,[a("label",qr,d(k.$t("backgroundConfig.backgroundColor")),1),a("div",Or,[rA(a("input",{type:"color","onUpdate:modelValue":m[16]||(m[16]=M=>C.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,C.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[17]||(m[17]=M=>C.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,C.value]])]),a("div",{style:CA({backgroundColor:C.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)]),a("div",Wr,[a("label",Pr,d(k.$t("backgroundConfig.textColor")),1),a("div",Zr,[rA(a("input",{type:"color","onUpdate:modelValue":m[18]||(m[18]=M=>n.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,n.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[19]||(m[19]=M=>n.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,n.value]])]),a("div",{style:CA({backgroundColor:n.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)])])):O("",!0),e.modelValue.dark.backgroundType==="image"?(G(),U("div",Xr,[a("label",jr,d(k.$t("backgroundConfig.backgroundImage")),1),a("div",{onDrop:m[23]||(m[23]=M=>f(M,"dark")),onDragover:m[24]||(m[24]=PA(()=>{},["prevent"])),onDragenter:m[25]||(m[25]=PA(()=>{},["prevent"])),class:gA(["border-2 border-dashed rounded-lg p-4 text-center cursor-pointer transition-colors",e.modelValue.dark.backgroundImage?"border-green-300 bg-green-50":"border-gray-300 hover:border-gray-400"])},[a("input",{ref_key:"darkImageInput",ref:i,type:"file",accept:"image/*",onChange:m[20]||(m[20]=M=>l(M,"dark")),class:"hidden"},null,544),e.modelValue.dark.backgroundImage?(G(),U("div",_r,[a("img",{src:p("dark"),alt:"{{ $t('backgroundConfig.darkModePreview') }} Background",class:"max-w-32 max-h-32 mx-auto rounded shadow"},null,8,$r),a("p",AC,d(e.modelValue.dark.backgroundImage.name),1),a("button",{onClick:m[22]||(m[22]=M=>D("dark")),class:"text-red-600 hover:text-red-500 text-sm"},d(k.$t("backgroundConfig.removeImage")),1)])):(G(),U("div",{key:0,onClick:m[21]||(m[21]=M=>k.$refs.darkImageInput.click())},[m[36]||(m[36]=a("svg",{class:"mx-auto h-8 w-8 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1)),a("p",zr,d(k.$t("backgroundConfig.clickOrDragToUpload")),1)]))],34),a("div",eC,[a("label",gC,d(k.$t("backgroundConfig.textColor")),1),a("div",tC,[rA(a("input",{type:"color","onUpdate:modelValue":m[26]||(m[26]=M=>n.value=M),class:"w-10 h-10 border border-gray-300 rounded cursor-pointer"},null,512),[[sA,n.value]]),rA(a("input",{type:"text","onUpdate:modelValue":m[27]||(m[27]=M=>n.value=M),class:"border border-gray-300 rounded px-3 py-2 text-sm font-mono w-24"},null,512),[[sA,n.value]])]),a("div",{style:CA({backgroundColor:n.value}),class:"w-16 h-10 border border-gray-300 rounded shadow-inner"},null,4)])])):O("",!0)])]),a("div",IC,[a("h4",oC,d(k.$t("backgroundConfig.backgroundPreview")),1),a("div",iC,[a("div",rC,[a("div",CC,d(k.$t("backgroundConfig.lightModePreview")),1),a("div",{style:CA(v()),class:"h-32 border border-gray-300 rounded-lg flex items-center justify-center text-sm relative overflow-hidden"},[a("div",nC,[a("span",{style:CA({color:e.modelValue.light.textColor})},d(k.$t("backgroundConfig.chatArea")),5)])],4)]),a("div",BC,[a("div",aC,d(k.$t("backgroundConfig.darkModePreview")),1),a("div",{style:CA(N()),class:"h-32 border border-gray-300 rounded-lg flex items-center justify-center text-sm relative overflow-hidden"},[a("div",sC,[a("span",{style:CA({color:e.modelValue.dark.textColor})},d(k.$t("backgroundConfig.chatArea")),5)])],4)])])]),a("div",QC,[a("h5",EC,d(k.$t("backgroundConfig.quickConfig")),1),a("div",lC,[a("button",{onClick:m[28]||(m[28]=M=>L("#ffffff","#1f2937")),class:"px-3 py-1 text-sm bg-white border border-gray-300 rounded hover:bg-gray-50"},d(k.$t("backgroundConfig.defaultColors")),1),a("button",{onClick:m[29]||(m[29]=M=>L("#f5f5f4","#374151")),class:"px-3 py-1 text-sm bg-stone-100 border border-gray-300 rounded hover:bg-stone-200"},d(k.$t("backgroundConfig.stoneTexture")),1),a("button",{onClick:m[30]||(m[30]=M=>L("#fef7cd","#7c2d12")),class:"px-3 py-1 text-sm bg-yellow-100 border border-gray-300 rounded hover:bg-yellow-200"},d(k.$t("backgroundConfig.sunnyColors")),1),a("button",{onClick:m[31]||(m[31]=M=>L("#e0f2fe","#1e40af")),class:"px-3 py-1 text-sm bg-sky-100 border border-gray-300 rounded hover:bg-sky-200"},d(k.$t("backgroundConfig.skyBlue")),1),a("button",{onClick:m[32]||(m[32]=M=>L("#fdf2f8","#be185d")),class:"px-3 py-1 text-sm bg-pink-100 border border-gray-300 rounded hover:bg-pink-200"},d(k.$t("backgroundConfig.romanticPink")),1)])])]))}},hC={class:"space-y-6"},uC={class:"text-xl font-semibold text-gray-900 mb-4"},dC={class:"text-gray-600 mb-6"},fC={class:"border-b border-gray-200"},wC={class:"-mb-px flex space-x-4 sm:space-x-8"},pC=["onClick"],yC={class:"flex items-center"},DC={class:"hidden sm:inline"},mC={class:"min-h-96"},FC={class:"flex justify-between"},kC={__name:"ThemeDesign",props:{modelValue:{type:Object,required:!0},chipModel:{type:String,required:!0},activeTab:{type:String,default:"wakeword"}},emits:["update:modelValue","next","prev","tabChange"],setup(e,{emit:A}){const{t:g}=TA(),t={render(){return eA("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[eA("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})])}},I={render(){return eA("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 640 640"},[eA("path",{d:"M320 96C329.5 96 338 101.5 341.9 110.2L515.1 496L536 496C549.3 496 560 506.7 560 520C560 533.3 549.3 544 536 544L440 544C426.7 544 416 533.3 416 520C416 506.7 426.7 496 440 496L462.5 496L426.6 416L213.4 416L177.5 496L200 496C213.3 496 224 506.7 224 520C224 533.3 213.3 544 200 544L104 544C90.7 544 80 533.3 80 520C80 506.7 90.7 496 104 496L124.9 496L298.1 110.2C302 101.5 310.5 96 320 96zM320 178.6L235 368L405 368L320 178.6z"})])}},o={render(){return eA("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[eA("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])}},i={render(){return eA("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 640 640"},[eA("path",{d:"M160 144C151.2 144 144 151.2 144 160L144 480C144 488.8 151.2 496 160 496L480 496C488.8 496 496 488.8 496 480L496 160C496 151.2 488.8 144 480 144L160 144zM96 160C96 124.7 124.7 96 160 96L480 96C515.3 96 544 124.7 544 160L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160zM224 192C241.7 192 256 206.3 256 224C256 241.7 241.7 256 224 256C206.3 256 192 241.7 192 224C192 206.3 206.3 192 224 192zM360 264C368.5 264 376.4 268.5 380.7 275.8L460.7 411.8C465.1 419.2 465.1 428.4 460.8 435.9C456.5 443.4 448.6 448 440 448L200 448C191.1 448 182.8 443 178.7 435.1C174.6 427.2 175.2 417.6 180.3 410.3L236.3 330.3C240.8 323.9 248.1 320.1 256 320.1C263.9 320.1 271.2 323.9 275.7 330.3L292.9 354.9L339.4 275.9C343.7 268.6 351.6 264.1 360.1 264.1z"})])}},r=e,C=A,B=j(r.activeTab),n=nA(()=>[{id:"wakeword",name:g("themeDesign.tabs.wakeword"),icon:t},{id:"font",name:g("themeDesign.tabs.font"),icon:I},{id:"emoji",name:g("themeDesign.tabs.emoji"),icon:o},{id:"background",name:g("themeDesign.tabs.background"),icon:i}]),Q=nA({get:()=>r.modelValue,set:h=>C("update:modelValue",h)}),s=()=>{var u,l,f;const h=r.modelValue.wakeword;if(h.type==="custom"){if(!((u=h.custom.name)!=null&&u.trim())){alert(g("wakewordConfig.errors.nameRequired"));return}if(!((l=h.custom.command)!=null&&l.trim())){alert(g("wakewordConfig.errors.commandRequired"));return}if(!h.custom.duration||h.custom.duration<500||h.custom.duration>1e4){alert(g("wakewordConfig.errors.durationRange"));return}}const w=r.modelValue.font;if(w.type==="custom"&&!((f=w.custom)!=null&&f.file)){alert(g("fontConfig.selectValidFontFile"));return}C("next")},E=h=>{B.value=h,C("tabChange",h)};return DA(()=>r.activeTab,h=>{B.value=h}),(h,w)=>(G(),U("div",hC,[a("div",null,[a("h2",uC,d(h.$t("themeDesign.title")),1),a("p",dC,d(h.$t("themeDesign.description")),1)]),a("div",fC,[a("nav",wC,[(G(!0),U(bA,null,LA(n.value,u=>(G(),U("button",{key:u.id,onClick:l=>E(u.id),class:gA(["py-2 px-1 border-b-2 font-medium text-sm relative",B.value===u.id?"border-primary-500 text-primary-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"])},[a("span",yC,[(G(),UA(Bt(u.icon),{class:"w-5 h-5 sm:mr-2"})),a("span",DC,d(u.name),1)])],10,pC))),128))])]),a("div",mC,[B.value==="wakeword"?(G(),UA(Mo,{key:0,modelValue:Q.value.wakeword,"onUpdate:modelValue":w[0]||(w[0]=u=>Q.value.wakeword=u),chipModel:e.chipModel},null,8,["modelValue","chipModel"])):O("",!0),B.value==="font"?(G(),UA(Gi,{key:1,modelValue:Q.value.font,"onUpdate:modelValue":w[1]||(w[1]=u=>Q.value.font=u)},null,8,["modelValue"])):O("",!0),B.value==="emoji"?(G(),UA(Er,{key:2,modelValue:Q.value.emoji,"onUpdate:modelValue":w[2]||(w[2]=u=>Q.value.emoji=u)},null,8,["modelValue"])):O("",!0),B.value==="background"?(G(),UA(cC,{key:3,modelValue:Q.value.skin,"onUpdate:modelValue":w[3]||(w[3]=u=>Q.value.skin=u)},null,8,["modelValue"])):O("",!0)]),a("div",FC,[a("button",{onClick:w[4]||(w[4]=u=>h.$emit("prev")),class:"bg-gray-500 hover:bg-gray-600 text-white px-6 py-2 rounded-lg font-medium transition-colors"},d(h.$t("themeDesign.previous")),1),a("button",{onClick:s,class:"bg-primary-500 hover:bg-primary-600 text-white px-6 py-2 rounded-lg font-medium transition-colors"},d(h.$t("themeDesign.next")),1)])]))}},vC=(e,A)=>{const g=e.__vccOpts||e;for(const[t,I]of A)g[t]=I;return g},SC={class:"space-y-6"},GC={class:"text-xl font-semibold text-gray-900 mb-4"},RC={class:"text-gray-600 mb-6"},UC={class:"flex flex-col lg:flex-row gap-8"},NC={class:"flex-1"},bC={class:"text-lg font-medium text-gray-900 mb-4"},LC={class:"bg-gray-100 p-4 rounded-lg"},MC={class:"max-w-full overflow-auto flex justify-center"},JC={class:"bg-gray-800 p-6 rounded-2xl shadow-2xl inline-block"},xC={class:"bg-gray-900 p-2 rounded-xl"},HC={class:"relative z-10 flex flex-col items-center justify-center p-4 text-center"},YC={class:"mb-4"},KC={key:0,class:"emoji-container"},TC=["src","alt"],VC={key:1,class:"emoji-container"},qC={class:"text-center"},OC={class:"text-sm"},WC={class:"text-xs"},PC={key:0,class:"absolute inset-0 flex items-center justify-center"},ZC={class:"animate-pulse text-gray-400 text-xs"},XC={class:"mt-3 text-center text-xs text-gray-400"},jC={class:"w-full lg:w-80"},zC={class:"text-lg font-medium text-gray-900 mb-4"},_C={class:"space-y-6 bg-white border border-gray-200 rounded-lg p-4"},$C={class:"block text-sm font-medium text-gray-700 mb-2"},An={class:"block text-sm font-medium text-gray-700 mb-2"},en={key:0,class:"flex flex-wrap gap-2 max-h-32 overflow-y-auto justify-center"},gn=["onClick","title"],tn={key:0},In=["src","alt"],on={key:1,class:"text-lg"},rn={key:1,class:"text-center py-4 text-gray-500 bg-gray-50 rounded-lg border-2 border-dashed"},Cn={class:"text-2xl mb-2"},nn={class:"text-sm"},Bn={class:"block text-sm font-medium text-gray-700 mb-2"},an={class:"flex space-x-2"},sn={class:"border-t pt-4"},Qn={class:"font-medium text-gray-900 mb-2"},En={class:"text-xs text-gray-600 space-y-1"},ln={key:0},cn={class:"flex items-center"},hn={key:0,class:"ml-2 animate-pulse text-blue-500"},un={key:1},dn={class:"flex justify-between"},fn={__name:"GenerateSummary",props:{config:{type:Object,required:!0}},emits:["prev","generate"],setup(e){const{t:A}=TA(),g=e,t=j(A("generateSummary.defaultPreviewText")),I=j("happy"),o=j("light"),i=j(!1),r=j(""),C=nA(()=>[{key:"neutral",name:A("generateSummary.emotions.neutral"),emoji:"😶"},{key:"happy",name:A("generateSummary.emotions.happy"),emoji:"🙂"},{key:"laughing",name:A("generateSummary.emotions.laughing"),emoji:"😆"},{key:"funny",name:A("generateSummary.emotions.funny"),emoji:"😂"},{key:"sad",name:A("generateSummary.emotions.sad"),emoji:"😔"},{key:"angry",name:A("generateSummary.emotions.angry"),emoji:"😠"},{key:"crying",name:A("generateSummary.emotions.crying"),emoji:"😭"},{key:"loving",name:A("generateSummary.emotions.loving"),emoji:"😍"},{key:"surprised",name:A("generateSummary.emotions.surprised"),emoji:"😯"},{key:"thinking",name:A("generateSummary.emotions.thinking"),emoji:"🤔"},{key:"cool",name:A("generateSummary.emotions.cool"),emoji:"😎"},{key:"sleepy",name:A("generateSummary.emotions.sleepy"),emoji:"😴"}]),B=nA(()=>{if(g.config.theme.emoji.type==="preset"&&g.config.theme.emoji.preset)return C.value;if(g.config.theme.emoji.type==="custom"){const F=g.config.theme.emoji.custom.images;return C.value.filter(S=>F[S.key])}else return[]}),n=nA(()=>c(I.value)),Q=()=>{const{width:F,height:S}=g.config.chip.display;return{width:`${F}px`,height:`${S}px`}},s=()=>{const F=g.config.theme.skin[o.value];if(F.backgroundType==="image"&&F.backgroundImage)try{if(F.backgroundImage&&typeof F.backgroundImage=="object"&&F.backgroundImage.size)return{backgroundImage:`url(${URL.createObjectURL(F.backgroundImage)})`,backgroundSize:"cover",backgroundPosition:"center"}}catch(S){console.warn("Failed to load background preview:",S)}return{backgroundColor:F.backgroundColor||"#ffffff"}},E={twemoji32:32,twemoji64:64,"noto-emoji_64":64,"noto-emoji_128":128},h=()=>{let F=48;return g.config.theme.emoji.type==="preset"?F=E[g.config.theme.emoji.preset]||32:g.config.theme.emoji.custom.size&&(F=Math.min(g.config.theme.emoji.custom.size.width,g.config.theme.emoji.custom.size.height)),{width:`${F}px`,height:`${F}px`}},w=()=>{let F=14;if(g.config.theme.font.type==="preset"){const J=g.config.theme.font.preset;J.includes("_14_")?F=14:J.includes("_16_")?F=16:J.includes("_20_")?F=20:J.includes("_30_")&&(F=30)}else g.config.theme.font.custom.size&&(F=g.config.theme.font.custom.size);const S=o.value==="dark"?g.config.theme.skin.dark.textColor:g.config.theme.skin.light.textColor;return{fontSize:`${F}px`,color:S,fontFamily:l(),textShadow:o.value==="dark"?"1px 1px 2px rgba(0,0,0,0.5)":"1px 1px 2px rgba(255,255,255,0.5)"}},u=async()=>{document.querySelectorAll("style[data-font-preview]").forEach(S=>S.remove()),i.value=!1,r.value="";try{if(g.config.theme.font.type==="preset"){const S=g.config.theme.font.preset;let J,V;S&&S.startsWith("font_noto_qwen_")?(J="NotoPreview",V="./static/fonts/noto_qwen.ttf"):(J="PuHuiPreview",V="./static/fonts/puhui_deepseek.ttf");const q=document.createElement("style");q.setAttribute("data-font-preview","true"),q.textContent=` @font-face { font-family: '${J}'; src: url('${V}') format('truetype'); diff --git a/main/manager-web/public/generator/assets/index-C_B_50-2.js b/main/manager-web/public/generator/assets/index-CTIG3yYe.js similarity index 99% rename from main/manager-web/public/generator/assets/index-C_B_50-2.js rename to main/manager-web/public/generator/assets/index-CTIG3yYe.js index bc81b840e..1de0e3b42 100644 --- a/main/manager-web/public/generator/assets/index-C_B_50-2.js +++ b/main/manager-web/public/generator/assets/index-CTIG3yYe.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./HomePage-C46hPw_t.js","./HomePage-DL-rX2r7.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./HomePage-DjEdExnq.js","./HomePage-DL-rX2r7.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/** * @vue/shared v3.5.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -11,11 +11,11 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./HomePage-C46hPw_t.js * @vue/runtime-core v3.5.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function sr(e,t,n,r){try{return r?e(...r):e()}catch(s){Gr(s,t,n)}}function It(e,t,n,r){if(ee(e)){const s=sr(e,t,n,r);return s&&ol(s)&&s.catch(i=>{Gr(i,t,n)}),s}if(J(e)){const s=[];for(let i=0;i>>1,s=ze[r],i=zn(s);i=zn(n)?ze.push(e):ze.splice(Kc(t),0,e),e.flags|=1,Ll()}}function Ll(){wr||(wr=Ol.then(Rl))}function Yc(e){J(e)?En.push(...e):Kt&&e.id===-1?Kt.splice(gn+1,0,e):e.flags&1||(En.push(e),e.flags|=1),Ll()}function wi(e,t,n=Et+1){for(;nzn(n)-zn(r));if(En.length=0,Kt){Kt.push(...t);return}for(Kt=t,gn=0;gne.id==null?e.flags&2?-1:1/0:e.id;function Rl(e){try{for(Et=0;Et{r._d&&xr(-1);const i=Sr(t);let o;try{o=e(...s)}finally{Sr(i),r._d&&xr(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Fp(e,t){if(ot===null)return e;const n=qr(ot),r=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&ee(t)?t.call(r&&r.proxy):t}}const zc=Symbol.for("v-scx"),qc=()=>Nt(zc);function fn(e,t,n){return Fl(e,t,n)}function Fl(e,t,n=ve){const{immediate:r,deep:s,flush:i,once:o}=n,l=He({},n),a=t&&r||!t&&i!=="post";let c;if(Jn){if(i==="sync"){const v=qc();c=v.__watcherHandles||(v.__watcherHandles=[])}else if(!a){const v=()=>{};return v.stop=St,v.resume=St,v.pause=St,v}}const u=Ve;l.call=(v,N,k)=>It(v,u,N,k);let d=!1;i==="post"?l.scheduler=v=>{Ze(v,u&&u.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(v,N)=>{N?v():si(v)}),l.augmentJob=v=>{t&&(v.flags|=4),d&&(v.flags|=2,u&&(v.id=u.uid,v.i=u))};const g=Bc(e,t,l);return Jn&&(c?c.push(g):a&&g()),g}function Jc(e,t,n){const r=this.proxy,s=Ie(e)?e.includes(".")?Ml(r,e):()=>r[e]:e.bind(r,r);let i;ee(t)?i=t:(i=t.handler,n=t);const o=ar(this),l=Fl(s,i.bind(r),n);return o(),l}function Ml(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;se.__isTeleport,eu=Symbol("_leaveCb");function ii(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ii(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ir(e,t){return ee(e)?He({name:e.name},t,{setup:e}):e}function Ul(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Si(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Nr=new WeakMap;function $n(e,t,n,r,s=!1){if(J(e)){e.forEach((k,D)=>$n(k,t&&(J(t)?t[D]:t),n,r,s));return}if(Vn(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&$n(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?qr(r.component):r.el,o=s?null:i,{i:l,r:a}=e,c=t&&t.r,u=l.refs===ve?l.refs={}:l.refs,d=l.setupState,g=fe(d),v=d===ve?il:k=>Si(u,k)?!1:he(g,k),N=(k,D)=>!(D&&Si(u,D));if(c!=null&&c!==a){if(Ni(t),Ie(c))u[c]=null,v(c)&&(d[c]=null);else if(Ue(c)){const k=t;N(c,k.k)&&(c.value=null),k.k&&(u[k.k]=null)}}if(ee(a))sr(a,l,12,[o,u]);else{const k=Ie(a),D=Ue(a);if(k||D){const A=()=>{if(e.f){const R=k?v(a)?d[a]:u[a]:N()||!e.k?a.value:u[e.k];if(s)J(R)&&Ks(R,i);else if(J(R))R.includes(i)||R.push(i);else if(k)u[a]=[i],v(a)&&(d[a]=u[a]);else{const b=[i];N(a,e.k)&&(a.value=b),e.k&&(u[e.k]=b)}}else k?(u[a]=o,v(a)&&(d[a]=o)):D&&(N(a,e.k)&&(a.value=o),e.k&&(u[e.k]=o))};if(o){const R=()=>{A(),Nr.delete(e)};R.id=-1,Nr.set(e,R),Ze(R,n)}else Ni(e),A()}}}function Ni(e){const t=Nr.get(e);t&&(t.flags|=8,Nr.delete(e))}$r().requestIdleCallback;$r().cancelIdleCallback;const Vn=e=>!!e.type.__asyncLoader,Wl=e=>e.type.__isKeepAlive;function tu(e,t){Hl(e,"a",t)}function nu(e,t){Hl(e,"da",t)}function Hl(e,t,n=Ve){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Kr(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Wl(s.parent.vnode)&&ru(r,t,n,s),s=s.parent}}function ru(e,t,n,r){const s=Kr(t,e,r,!0);or(()=>{Ks(r[t],s)},n)}function Kr(e,t,n=Ve,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Ht();const l=ar(n),a=It(t,n,e,o);return l(),jt(),a});return r?s.unshift(i):s.push(i),i}}const Vt=e=>(t,n=Ve)=>{(!Jn||e==="sp")&&Kr(e,(...r)=>t(...r),n)},jl=Vt("bm"),Yr=Vt("m"),su=Vt("bu"),iu=Vt("u"),ou=Vt("bum"),or=Vt("um"),lu=Vt("sp"),au=Vt("rtg"),cu=Vt("rtc");function uu(e,t=Ve){Kr("ec",e,t)}const $l="components";function fu(e,t){return Bl($l,e,!0,t)||e}const Vl=Symbol.for("v-ndc");function Mp(e){return Ie(e)?Bl($l,e,!1)||e:e||Vl}function Bl(e,t,n=!0,r=!1){const s=ot||Ve;if(s){const i=s.type;{const l=Ju(i,!1);if(l&&(l===t||l===qe(t)||l===Hr(qe(t))))return i}const o=Pi(s[e]||i[e],t)||Pi(s.appContext[e],t);return!o&&r?i:o}}function Pi(e,t){return e&&(e[t]||e[qe(t)]||e[Hr(qe(t))])}function hu(e,t,n,r){let s;const i=n,o=J(e);if(o||Ie(e)){const l=o&&un(e);let a=!1,c=!1;l&&(a=!ft(e),c=$t(e),e=Vr(e)),s=new Array(e.length);for(let u=0,d=e.length;ut(l,a,void 0,i));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,c=l.length;ae?ua(e)?qr(e):Ss(e.parent):null,Bn=He(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ss(e.parent),$root:e=>Ss(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Kl(e),$forceUpdate:e=>e.f||(e.f=()=>{si(e.update)}),$nextTick:e=>e.n||(e.n=ri.bind(e.proxy)),$watch:e=>Jc.bind(e)}),us=(e,t)=>e!==ve&&!e.__isScriptSetup&&he(e,t),du={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:l,appContext:a}=e;if(t[0]!=="$"){const g=o[t];if(g!==void 0)switch(g){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(us(r,t))return o[t]=1,r[t];if(s!==ve&&he(s,t))return o[t]=2,s[t];if(he(i,t))return o[t]=3,i[t];if(n!==ve&&he(n,t))return o[t]=4,n[t];Ns&&(o[t]=0)}}const c=Bn[t];let u,d;if(c)return t==="$attrs"&&je(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==ve&&he(n,t))return o[t]=4,n[t];if(d=a.config.globalProperties,he(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return us(s,t)?(s[t]=n,!0):r!==ve&&he(r,t)?(r[t]=n,!0):he(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,props:i,type:o}},l){let a;return!!(n[l]||e!==ve&&l[0]!=="$"&&he(e,l)||us(t,l)||he(i,l)||he(r,l)||he(Bn,l)||he(s.config.globalProperties,l)||(a=o.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:he(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function xi(e){return J(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ns=!0;function mu(e){const t=Kl(e),n=e.proxy,r=e.ctx;Ns=!1,t.beforeCreate&&Ii(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:l,provide:a,inject:c,created:u,beforeMount:d,mounted:g,beforeUpdate:v,updated:N,activated:k,deactivated:D,beforeDestroy:A,beforeUnmount:R,destroyed:b,unmounted:y,render:L,renderTracked:x,renderTriggered:F,errorCaptured:B,serverPrefetch:W,expose:ae,inheritAttrs:ke,components:Z,directives:_e,filters:ht}=t;if(c&&gu(c,r,null),o)for(const ie in o){const se=o[ie];ee(se)&&(r[ie]=se.bind(n))}if(s){const ie=s.call(n,n);ge(ie)&&(e.data=Br(ie))}if(Ns=!0,i)for(const ie in i){const se=i[ie],Be=ee(se)?se.bind(n,n):ee(se.get)?se.get.bind(n,n):St,Je=!ee(se)&&ee(se.set)?se.set.bind(n):St,we=ce({get:Be,set:Je});Object.defineProperty(r,ie,{enumerable:!0,configurable:!0,get:()=>we.value,set:Se=>we.value=Se})}if(l)for(const ie in l)Gl(l[ie],r,n,ie);if(a){const ie=ee(a)?a.call(n):a;Reflect.ownKeys(ie).forEach(se=>{_r(se,ie[se])})}u&&Ii(u,e,"c");function de(ie,se){J(se)?se.forEach(Be=>ie(Be.bind(n))):se&&ie(se.bind(n))}if(de(jl,d),de(Yr,g),de(su,v),de(iu,N),de(tu,k),de(nu,D),de(uu,B),de(cu,x),de(au,F),de(ou,R),de(or,y),de(lu,W),J(ae))if(ae.length){const ie=e.exposed||(e.exposed={});ae.forEach(se=>{Object.defineProperty(ie,se,{get:()=>n[se],set:Be=>n[se]=Be,enumerable:!0})})}else e.exposed||(e.exposed={});L&&e.render===St&&(e.render=L),ke!=null&&(e.inheritAttrs=ke),Z&&(e.components=Z),_e&&(e.directives=_e),W&&Ul(e)}function gu(e,t,n=St){J(e)&&(e=Ps(e));for(const r in e){const s=e[r];let i;ge(s)?"default"in s?i=Nt(s.from||r,s.default,!0):i=Nt(s.from||r):i=Nt(s),Ue(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function Ii(e,t,n){It(J(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Gl(e,t,n,r){let s=r.includes(".")?Ml(n,r):()=>n[r];if(Ie(e)){const i=t[e];ee(i)&&fn(s,i)}else if(ee(e))fn(s,e.bind(n));else if(ge(e))if(J(e))e.forEach(i=>Gl(i,t,n,r));else{const i=ee(e.handler)?e.handler.bind(n):t[e.handler];ee(i)&&fn(s,i,e)}}function Kl(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let a;return l?a=l:!s.length&&!n&&!r?a=t:(a={},s.length&&s.forEach(c=>Pr(a,c,o,!0)),Pr(a,t,o)),ge(t)&&i.set(t,a),a}function Pr(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Pr(e,i,n,!0),s&&s.forEach(o=>Pr(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const l=pu[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const pu={data:Oi,props:Li,emits:Li,methods:Mn,computed:Mn,beforeCreate:Ke,created:Ke,beforeMount:Ke,mounted:Ke,beforeUpdate:Ke,updated:Ke,beforeDestroy:Ke,beforeUnmount:Ke,destroyed:Ke,unmounted:Ke,activated:Ke,deactivated:Ke,errorCaptured:Ke,serverPrefetch:Ke,components:Mn,directives:Mn,watch:vu,provide:Oi,inject:_u};function Oi(e,t){return t?e?function(){return He(ee(e)?e.call(this,this):e,ee(t)?t.call(this,this):t)}:t:e}function _u(e,t){return Mn(Ps(e),Ps(t))}function Ps(e){if(J(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${qe(t)}Modifiers`]||e[`${dn(t)}Modifiers`];function Cu(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ve;let s=n;const i=t.startsWith("update:"),o=i&&Eu(r,t.slice(7));o&&(o.trim&&(s=n.map(u=>Ie(u)?u.trim():u)),o.number&&(s=n.map(jr)));let l,a=r[l=is(t)]||r[l=is(qe(t))];!a&&i&&(a=r[l=is(dn(t))]),a&&It(a,e,6,s);const c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,It(c,e,6,s)}}const Tu=new WeakMap;function Xl(e,t,n=!1){const r=n?Tu:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},l=!1;if(!ee(e)){const a=c=>{const u=Xl(c,t,!0);u&&(l=!0,He(o,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(ge(e)&&r.set(e,null),null):(J(i)?i.forEach(a=>o[a]=null):He(o,i),ge(e)&&r.set(e,o),o)}function Xr(e,t){return!e||!Fr(t)?!1:(t=t.slice(2).replace(/Once$/,""),he(e,t[0].toLowerCase()+t.slice(1))||he(e,dn(t))||he(e,t))}function Ai(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:l,emit:a,render:c,renderCache:u,props:d,data:g,setupState:v,ctx:N,inheritAttrs:k}=e,D=Sr(e);let A,R;try{if(n.shapeFlag&4){const y=s||r,L=y;A=Tt(c.call(L,y,u,d,v,g,N)),R=l}else{const y=t;A=Tt(y.length>1?y(d,{attrs:l,slots:o,emit:a}):y(d,null)),R=t.props?l:ku(l)}}catch(y){Gn.length=0,Gr(y,e,1),A=Ee(zt)}let b=A;if(R&&k!==!1){const y=Object.keys(R),{shapeFlag:L}=b;y.length&&L&7&&(i&&y.some(Mr)&&(R=wu(R,i)),b=Sn(b,R,!1,!0))}return n.dirs&&(b=Sn(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ii(b,n.transition),A=b,Sr(D),A}const ku=e=>{let t;for(const n in e)(n==="class"||n==="style"||Fr(n))&&((t||(t={}))[n]=e[n]);return t},wu=(e,t)=>{const n={};for(const r in e)(!Mr(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Su(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:l,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return r?Ri(r,o,c):!!o;if(a&8){const u=t.dynamicProps;for(let d=0;dObject.create(ql),Ql=e=>Object.getPrototypeOf(e)===ql;function Pu(e,t,n,r=!1){const s={},i=Jl();e.propsDefaults=Object.create(null),Zl(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Pl(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function xu(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,l=fe(s),[a]=e.propsOptions;let c=!1;if((r||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[g,v]=ea(d,t,!0);He(o,g),v&&l.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!a)return ge(e)&&r.set(e,bn),bn;if(J(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",li=e=>J(e)?e.map(Tt):[Tt(e)],Ou=(e,t,n)=>{if(t._n)return t;const r=Xc((...s)=>li(t(...s)),n);return r._c=!1,r},ta=(e,t,n)=>{const r=e._ctx;for(const s in e){if(oi(s))continue;const i=e[s];if(ee(i))t[s]=Ou(s,i,r);else if(i!=null){const o=li(i);t[s]=()=>o}}},na=(e,t)=>{const n=li(t);e.slots.default=()=>n},ra=(e,t,n)=>{for(const r in t)(n||!oi(r))&&(e[r]=t[r])},Lu=(e,t,n)=>{const r=e.slots=Jl();if(e.vnode.shapeFlag&32){const s=t._;s?(ra(r,t,n),n&&cl(r,"_",s,!0)):ta(t,r)}else t&&na(e,t)},Au=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=ve;if(r.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:ra(s,t,n):(i=!t.$stable,ta(t,s)),o=t}else t&&(na(e,t),o={default:1});if(i)for(const l in s)!oi(l)&&o[l]==null&&delete s[l]},Ze=Uu;function Ru(e){return Du(e)}function Du(e,t){const n=$r();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:l,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:g,setScopeId:v=St,insertStaticContent:N}=e,k=(m,_,p,T=null,O=null,P=null,H=void 0,U=null,f=!!_.dynamicChildren)=>{if(m===_)return;m&&!Rn(m,_)&&(T=I(m),Se(m,O,P,!0),m=null),_.patchFlag===-2&&(f=!1,_.dynamicChildren=null);const{type:h,ref:C,shapeFlag:w}=_;switch(h){case lr:D(m,_,p,T);break;case zt:A(m,_,p,T);break;case vr:m==null&&R(_,p,T,H);break;case st:Z(m,_,p,T,O,P,H,U,f);break;default:w&1?L(m,_,p,T,O,P,H,U,f):w&6?_e(m,_,p,T,O,P,H,U,f):(w&64||w&128)&&h.process(m,_,p,T,O,P,H,U,f,K)}C!=null&&O?$n(C,m&&m.ref,P,_||m,!_):C==null&&m&&m.ref!=null&&$n(m.ref,null,P,m,!0)},D=(m,_,p,T)=>{if(m==null)r(_.el=l(_.children),p,T);else{const O=_.el=m.el;_.children!==m.children&&c(O,_.children)}},A=(m,_,p,T)=>{m==null?r(_.el=a(_.children||""),p,T):_.el=m.el},R=(m,_,p,T)=>{[m.el,m.anchor]=N(m.children,_,p,T,m.el,m.anchor)},b=({el:m,anchor:_},p,T)=>{let O;for(;m&&m!==_;)O=g(m),r(m,p,T),m=O;r(_,p,T)},y=({el:m,anchor:_})=>{let p;for(;m&&m!==_;)p=g(m),s(m),m=p;s(_)},L=(m,_,p,T,O,P,H,U,f)=>{if(_.type==="svg"?H="svg":_.type==="math"&&(H="mathml"),m==null)x(_,p,T,O,P,H,U,f);else{const h=m.el&&m.el._isVueCE?m.el:null;try{h&&h._beginPatch(),W(m,_,O,P,H,U,f)}finally{h&&h._endPatch()}}},x=(m,_,p,T,O,P,H,U)=>{let f,h;const{props:C,shapeFlag:w,transition:j,dirs:M}=m;if(f=m.el=o(m.type,P,C&&C.is,C),w&8?u(f,m.children):w&16&&B(m.children,f,null,T,O,fs(m,P),H,U),M&&tn(m,null,T,"created"),F(f,m,m.scopeId,H,T),C){for(const S in C)S!=="value"&&!Wn(S)&&i(f,S,null,C[S],P,T);"value"in C&&i(f,"value",null,C.value,P),(h=C.onVnodeBeforeMount)&&yt(h,T,m)}M&&tn(m,null,T,"beforeMount");const E=Fu(O,j);E&&j.beforeEnter(f),r(f,_,p),((h=C&&C.onVnodeMounted)||E||M)&&Ze(()=>{try{h&&yt(h,T,m),E&&j.enter(f),M&&tn(m,null,T,"mounted")}finally{}},O)},F=(m,_,p,T,O)=>{if(p&&v(m,p),T)for(let P=0;P{for(let h=f;h{const U=_.el=m.el;let{patchFlag:f,dynamicChildren:h,dirs:C}=_;f|=m.patchFlag&16;const w=m.props||ve,j=_.props||ve;let M;if(p&&nn(p,!1),(M=j.onVnodeBeforeUpdate)&&yt(M,p,_,m),C&&tn(_,m,p,"beforeUpdate"),p&&nn(p,!0),(w.innerHTML&&j.innerHTML==null||w.textContent&&j.textContent==null)&&u(U,""),h?ae(m.dynamicChildren,h,U,p,T,fs(_,O),P):H||se(m,_,U,null,p,T,fs(_,O),P,!1),f>0){if(f&16)ke(U,w,j,p,O);else if(f&2&&w.class!==j.class&&i(U,"class",null,j.class,O),f&4&&i(U,"style",w.style,j.style,O),f&8){const E=_.dynamicProps;for(let S=0;S{M&&yt(M,p,_,m),C&&tn(_,m,p,"updated")},T)},ae=(m,_,p,T,O,P,H)=>{for(let U=0;U<_.length;U++){const f=m[U],h=_[U],C=f.el&&(f.type===st||!Rn(f,h)||f.shapeFlag&198)?d(f.el):p;k(f,h,C,null,T,O,P,H,!0)}},ke=(m,_,p,T,O)=>{if(_!==p){if(_!==ve)for(const P in _)!Wn(P)&&!(P in p)&&i(m,P,_[P],null,O,T);for(const P in p){if(Wn(P))continue;const H=p[P],U=_[P];H!==U&&P!=="value"&&i(m,P,U,H,O,T)}"value"in p&&i(m,"value",_.value,p.value,O)}},Z=(m,_,p,T,O,P,H,U,f)=>{const h=_.el=m?m.el:l(""),C=_.anchor=m?m.anchor:l("");let{patchFlag:w,dynamicChildren:j,slotScopeIds:M}=_;M&&(U=U?U.concat(M):M),m==null?(r(h,p,T),r(C,p,T),B(_.children||[],p,C,O,P,H,U,f)):w>0&&w&64&&j&&m.dynamicChildren&&m.dynamicChildren.length===j.length?(ae(m.dynamicChildren,j,p,O,P,H,U),(_.key!=null||O&&_===O.subTree)&&sa(m,_,!0)):se(m,_,p,C,O,P,H,U,f)},_e=(m,_,p,T,O,P,H,U,f)=>{_.slotScopeIds=U,m==null?_.shapeFlag&512?O.ctx.activate(_,p,T,H,f):ht(_,p,T,O,P,H,f):at(m,_,f)},ht=(m,_,p,T,O,P,H)=>{const U=m.component=Ku(m,T,O);if(Wl(m)&&(U.ctx.renderer=K),Yu(U,!1,H),U.asyncDep){if(O&&O.registerDep(U,de,H),!m.el){const f=U.subTree=Ee(zt);A(null,f,_,p),m.placeholder=f.el}}else de(U,m,_,p,O,P,H)},at=(m,_,p)=>{const T=_.component=m.component;if(Su(m,_,p))if(T.asyncDep&&!T.asyncResolved){ie(T,_,p);return}else T.next=_,T.update();else _.el=m.el,T.vnode=_},de=(m,_,p,T,O,P,H)=>{const U=()=>{if(m.isMounted){let{next:w,bu:j,u:M,parent:E,vnode:S}=m;{const Me=ia(m);if(Me){w&&(w.el=S.el,ie(m,w,H)),Me.asyncDep.then(()=>{Ze(()=>{m.isUnmounted||h()},O)});return}}let X=w,te;nn(m,!1),w?(w.el=S.el,ie(m,w,H)):w=S,j&&pr(j),(te=w.props&&w.props.onVnodeBeforeUpdate)&&yt(te,E,w,S),nn(m,!0);const be=Ai(m),Ge=m.subTree;m.subTree=be,k(Ge,be,d(Ge.el),I(Ge),m,O,P),w.el=be.el,X===null&&Nu(m,be.el),M&&Ze(M,O),(te=w.props&&w.props.onVnodeUpdated)&&Ze(()=>yt(te,E,w,S),O)}else{let w;const{el:j,props:M}=_,{bm:E,m:S,parent:X,root:te,type:be}=m,Ge=Vn(_);nn(m,!1),E&&pr(E),!Ge&&(w=M&&M.onVnodeBeforeMount)&&yt(w,X,_),nn(m,!0);{te.ce&&te.ce._hasShadowRoot()&&te.ce._injectChildStyle(be,m.parent?m.parent.type:void 0);const Me=m.subTree=Ai(m);k(null,Me,p,T,m,O,P),_.el=Me.el}if(S&&Ze(S,O),!Ge&&(w=M&&M.onVnodeMounted)){const Me=_;Ze(()=>yt(w,X,Me),O)}(_.shapeFlag&256||X&&Vn(X.vnode)&&X.vnode.shapeFlag&256)&&m.a&&Ze(m.a,O),m.isMounted=!0,_=p=T=null}};m.scope.on();const f=m.effect=new ml(U);m.scope.off();const h=m.update=f.run.bind(f),C=m.job=f.runIfDirty.bind(f);C.i=m,C.id=m.uid,f.scheduler=()=>si(C),nn(m,!0),h()},ie=(m,_,p)=>{_.component=m;const T=m.vnode.props;m.vnode=_,m.next=null,xu(m,_.props,T,p),Au(m,_.children,p),Ht(),wi(m),jt()},se=(m,_,p,T,O,P,H,U,f=!1)=>{const h=m&&m.children,C=m?m.shapeFlag:0,w=_.children,{patchFlag:j,shapeFlag:M}=_;if(j>0){if(j&128){Je(h,w,p,T,O,P,H,U,f);return}else if(j&256){Be(h,w,p,T,O,P,H,U,f);return}}M&8?(C&16&&Re(h,O,P),w!==h&&u(p,w)):C&16?M&16?Je(h,w,p,T,O,P,H,U,f):Re(h,O,P,!0):(C&8&&u(p,""),M&16&&B(w,p,T,O,P,H,U,f))},Be=(m,_,p,T,O,P,H,U,f)=>{m=m||bn,_=_||bn;const h=m.length,C=_.length,w=Math.min(h,C);let j;for(j=0;jC?Re(m,O,P,!0,!1,w):B(_,p,T,O,P,H,U,f,w)},Je=(m,_,p,T,O,P,H,U,f)=>{let h=0;const C=_.length;let w=m.length-1,j=C-1;for(;h<=w&&h<=j;){const M=m[h],E=_[h]=f?Ft(_[h]):Tt(_[h]);if(Rn(M,E))k(M,E,p,null,O,P,H,U,f);else break;h++}for(;h<=w&&h<=j;){const M=m[w],E=_[j]=f?Ft(_[j]):Tt(_[j]);if(Rn(M,E))k(M,E,p,null,O,P,H,U,f);else break;w--,j--}if(h>w){if(h<=j){const M=j+1,E=Mj)for(;h<=w;)Se(m[h],O,P,!0),h++;else{const M=h,E=h,S=new Map;for(h=E;h<=j;h++){const rt=_[h]=f?Ft(_[h]):Tt(_[h]);rt.key!=null&&S.set(rt.key,h)}let X,te=0;const be=j-E+1;let Ge=!1,Me=0;const en=new Array(be);for(h=0;h=be){Se(rt,O,P,!0);continue}let bt;if(rt.key!=null)bt=S.get(rt.key);else for(X=E;X<=j;X++)if(en[X-E]===0&&Rn(rt,_[X])){bt=X;break}bt===void 0?Se(rt,O,P,!0):(en[bt-E]=h+1,bt>=Me?Me=bt:Ge=!0,k(rt,_[bt],p,null,O,P,H,U,f),te++)}const ss=Ge?Mu(en):bn;for(X=ss.length-1,h=be-1;h>=0;h--){const rt=E+h,bt=_[rt],bi=_[rt+1],yi=rt+1{const{el:P,type:H,transition:U,children:f,shapeFlag:h}=m;if(h&6){we(m.component.subTree,_,p,T);return}if(h&128){m.suspense.move(_,p,T);return}if(h&64){H.move(m,_,p,K);return}if(H===st){r(P,_,p);for(let w=0;wU.enter(P),O);else{const{leave:w,delayLeave:j,afterLeave:M}=U,E=()=>{m.ctx.isUnmounted?s(P):r(P,_,p)},S=()=>{P._isLeaving&&P[eu](!0),w(P,()=>{E(),M&&M()})};j?j(P,E,S):S()}else r(P,_,p)},Se=(m,_,p,T=!1,O=!1)=>{const{type:P,props:H,ref:U,children:f,dynamicChildren:h,shapeFlag:C,patchFlag:w,dirs:j,cacheIndex:M,memo:E}=m;if(w===-2&&(O=!1),U!=null&&(Ht(),$n(U,null,p,m,!0),jt()),M!=null&&(_.renderCache[M]=void 0),C&256){_.ctx.deactivate(m);return}const S=C&1&&j,X=!Vn(m);let te;if(X&&(te=H&&H.onVnodeBeforeUnmount)&&yt(te,_,m),C&6)nt(m.component,p,T);else{if(C&128){m.suspense.unmount(p,T);return}S&&tn(m,null,_,"beforeUnmount"),C&64?m.type.remove(m,_,p,K,T):h&&!h.hasOnce&&(P!==st||w>0&&w&64)?Re(h,_,p,!1,!0):(P===st&&w&384||!O&&C&16)&&Re(f,_,p),T&&ct(m)}const be=E!=null&&M==null;(X&&(te=H&&H.onVnodeUnmounted)||S||be)&&Ze(()=>{te&&yt(te,_,m),S&&tn(m,null,_,"unmounted"),be&&(m.el=null)},p)},ct=m=>{const{type:_,el:p,anchor:T,transition:O}=m;if(_===st){tt(p,T);return}if(_===vr){y(m);return}const P=()=>{s(p),O&&!O.persisted&&O.afterLeave&&O.afterLeave()};if(m.shapeFlag&1&&O&&!O.persisted){const{leave:H,delayLeave:U}=O,f=()=>H(p,P);U?U(m.el,P,f):f()}else P()},tt=(m,_)=>{let p;for(;m!==_;)p=g(m),s(m),m=p;s(_)},nt=(m,_,p)=>{const{bum:T,scope:O,job:P,subTree:H,um:U,m:f,a:h}=m;Fi(f),Fi(h),T&&pr(T),O.stop(),P&&(P.flags|=8,Se(H,m,_,p)),U&&Ze(U,_),Ze(()=>{m.isUnmounted=!0},_)},Re=(m,_,p,T=!1,O=!1,P=0)=>{for(let H=P;H{if(m.shapeFlag&6)return I(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const _=g(m.anchor||m.el),p=_&&_[Qc];return p?g(p):_};let G=!1;const $=(m,_,p)=>{let T;m==null?_._vnode&&(Se(_._vnode,null,null,!0),T=_._vnode.component):k(_._vnode||null,m,_,null,null,null,p),_._vnode=m,G||(G=!0,wi(T),Al(),G=!1)},K={p:k,um:Se,m:we,r:ct,mt:ht,mc:B,pc:se,pbc:ae,n:I,o:e};return{render:$,hydrate:void 0,createApp:yu($)}}function fs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function nn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function sa(e,t,n=!1){const r=e.children,s=t.children;if(J(r)&&J(s))for(let i=0;i>1,e[n[l]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function ia(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ia(t)}function Fi(e){if(e)for(let t=0;te.__isSuspense;function Uu(e,t){t&&t.pendingBranch?J(e)?t.effects.push(...e):t.effects.push(e):Yc(e)}const st=Symbol.for("v-fgt"),lr=Symbol.for("v-txt"),zt=Symbol.for("v-cmt"),vr=Symbol.for("v-stc"),Gn=[];let lt=null;function oe(e=!1){Gn.push(lt=e?null:[])}function Wu(){Gn.pop(),lt=Gn[Gn.length-1]||null}let qn=1;function xr(e,t=!1){qn+=e,e<0&<&&t&&(lt.hasOnce=!0)}function aa(e){return e.dynamicChildren=qn>0?lt||bn:null,Wu(),qn>0&<&<.push(e),e}function me(e,t,n,r,s,i){return aa(z(e,t,n,r,s,i,!0))}function Un(e,t,n,r,s){return aa(Ee(e,t,n,r,s,!0))}function Ir(e){return e?e.__v_isVNode===!0:!1}function Rn(e,t){return e.type===t.type&&e.key===t.key}const ca=({key:e})=>e??null,br=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ie(e)||Ue(e)||ee(e)?{i:ot,r:e,k:t,f:!!n}:e:null);function z(e,t=null,n=null,r=0,s=null,i=e===st?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ca(t),ref:t&&br(t),scopeId:Dl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ot};return l?(ai(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=Ie(n)?8:16),qn>0&&!o&<&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&<.push(a),a}const Ee=Hu;function Hu(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===Vl)&&(e=zt),Ir(e)){const l=Sn(e,t,!0);return n&&ai(l,n),qn>0&&!i&<&&(l.shapeFlag&6?lt[lt.indexOf(e)]=l:lt.push(l)),l.patchFlag=-2,l}if(Qu(e)&&(e=e.__vccOpts),t){t=ju(t);let{class:l,style:a}=t;l&&!Ie(l)&&(t.class=$e(l)),ge(a)&&(ti(a)&&!J(a)&&(a=He({},a)),t.style=Xs(a))}const o=Ie(e)?1:la(e)?128:Zc(e)?64:ge(e)?4:ee(e)?2:0;return z(e,t,n,r,s,o,i,!0)}function ju(e){return e?ti(e)||Ql(e)?He({},e):e:null}function Sn(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:l,transition:a}=e,c=t?Vu(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&ca(c),ref:t&&t.ref?n&&i?J(i)?i.concat(br(t)):[i,br(t)]:br(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==st?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Sn(e.ssContent),ssFallback:e.ssFallback&&Sn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&ii(u,a.clone(u)),u}function $u(e=" ",t=0){return Ee(lr,null,e,t)}function zr(e,t){const n=Ee(vr,null,e);return n.staticCount=t,n}function Le(e="",t=!1){return t?(oe(),Un(zt,null,e)):Ee(zt,null,e)}function Tt(e){return e==null||typeof e=="boolean"?Ee(zt):J(e)?Ee(st,null,e.slice()):Ir(e)?Ft(e):Ee(lr,null,String(e))}function Ft(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Sn(e)}function ai(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(J(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ai(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Ql(t)?t._ctx=ot:s===3&&ot&&(ot.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ee(t)?(t={default:t,_ctx:ot},n=32):(t=String(t),r&64?(n=16,t=[$u(t)]):n=8);e.children=t,e.shapeFlag|=n}function Vu(...e){const t={};for(let n=0;nVe||ot;let Or,Is;{const e=$r(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Or=t("__VUE_INSTANCE_SETTERS__",n=>Ve=n),Is=t("__VUE_SSR_SETTERS__",n=>Jn=n)}const ar=e=>{const t=Ve;return Or(e),e.scope.on(),()=>{e.scope.off(),Or(t)}},Mi=()=>{Ve&&Ve.scope.off(),Or(null)};function ua(e){return e.vnode.shapeFlag&4}let Jn=!1;function Yu(e,t=!1,n=!1){t&&Is(t);const{props:r,children:s}=e.vnode,i=ua(e);Pu(e,r,i,t),Lu(e,s,n||t);const o=i?Xu(e,t):void 0;return t&&Is(!1),o}function Xu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,du);const{setup:r}=n;if(r){Ht();const s=e.setupContext=r.length>1?qu(e):null,i=ar(e),o=sr(r,e,0,[e.props,s]),l=ol(o);if(jt(),i(),(l||e.sp)&&!Vn(e)&&Ul(e),l){if(o.then(Mi,Mi),t)return o.then(a=>{Ui(e,a)}).catch(a=>{Gr(a,e,0)});e.asyncDep=o}else Ui(e,o)}else fa(e)}function Ui(e,t,n){ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ge(t)&&(e.setupState=Il(t)),fa(e)}function fa(e,t,n){const r=e.type;e.render||(e.render=r.render||St);{const s=ar(e);Ht();try{mu(e)}finally{jt(),s()}}}const zu={get(e,t){return je(e,"get",""),e[t]}};function qu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,zu),slots:e.slots,emit:e.emit,expose:t}}function qr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Il(Uc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Bn)return Bn[n](e)},has(t,n){return n in t||n in Bn}})):e.proxy}function Ju(e,t=!0){return ee(e)?e.displayName||e.name:e.name||t&&e.__name}function Qu(e){return ee(e)&&"__vccOpts"in e}const ce=(e,t)=>$c(e,t,Jn);function Jr(e,t,n){try{xr(-1);const r=arguments.length;return r===2?ge(t)&&!J(t)?Ir(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ir(n)&&(n=[n]),Ee(e,t,n))}finally{xr(1)}}const Zu="3.5.31";/** +**/function sr(e,t,n,r){try{return r?e(...r):e()}catch(s){Gr(s,t,n)}}function It(e,t,n,r){if(ee(e)){const s=sr(e,t,n,r);return s&&ol(s)&&s.catch(i=>{Gr(i,t,n)}),s}if(J(e)){const s=[];for(let i=0;i>>1,s=ze[r],i=zn(s);i=zn(n)?ze.push(e):ze.splice(Kc(t),0,e),e.flags|=1,Ll()}}function Ll(){wr||(wr=Ol.then(Rl))}function Yc(e){J(e)?En.push(...e):Kt&&e.id===-1?Kt.splice(gn+1,0,e):e.flags&1||(En.push(e),e.flags|=1),Ll()}function wi(e,t,n=Et+1){for(;nzn(n)-zn(r));if(En.length=0,Kt){Kt.push(...t);return}for(Kt=t,gn=0;gne.id==null?e.flags&2?-1:1/0:e.id;function Rl(e){try{for(Et=0;Et{r._d&&xr(-1);const i=Sr(t);let o;try{o=e(...s)}finally{Sr(i),r._d&&xr(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Mp(e,t){if(ot===null)return e;const n=qr(ot),r=e.dirs||(e.dirs=[]);for(let s=0;s1)return n&&ee(t)?t.call(r&&r.proxy):t}}const zc=Symbol.for("v-scx"),qc=()=>Nt(zc);function fn(e,t,n){return Fl(e,t,n)}function Fl(e,t,n=ve){const{immediate:r,deep:s,flush:i,once:o}=n,l=He({},n),a=t&&r||!t&&i!=="post";let c;if(Jn){if(i==="sync"){const v=qc();c=v.__watcherHandles||(v.__watcherHandles=[])}else if(!a){const v=()=>{};return v.stop=St,v.resume=St,v.pause=St,v}}const u=Ve;l.call=(v,N,k)=>It(v,u,N,k);let d=!1;i==="post"?l.scheduler=v=>{Ze(v,u&&u.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(v,N)=>{N?v():si(v)}),l.augmentJob=v=>{t&&(v.flags|=4),d&&(v.flags|=2,u&&(v.id=u.uid,v.i=u))};const g=Bc(e,t,l);return Jn&&(c?c.push(g):a&&g()),g}function Jc(e,t,n){const r=this.proxy,s=Ie(e)?e.includes(".")?Ml(r,e):()=>r[e]:e.bind(r,r);let i;ee(t)?i=t:(i=t.handler,n=t);const o=ar(this),l=Fl(s,i.bind(r),n);return o(),l}function Ml(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;se.__isTeleport,eu=Symbol("_leaveCb");function ii(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ii(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ir(e,t){return ee(e)?He({name:e.name},t,{setup:e}):e}function Ul(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Si(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Nr=new WeakMap;function $n(e,t,n,r,s=!1){if(J(e)){e.forEach((k,D)=>$n(k,t&&(J(t)?t[D]:t),n,r,s));return}if(Vn(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&$n(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?qr(r.component):r.el,o=s?null:i,{i:l,r:a}=e,c=t&&t.r,u=l.refs===ve?l.refs={}:l.refs,d=l.setupState,g=fe(d),v=d===ve?il:k=>Si(u,k)?!1:he(g,k),N=(k,D)=>!(D&&Si(u,D));if(c!=null&&c!==a){if(Ni(t),Ie(c))u[c]=null,v(c)&&(d[c]=null);else if(Ue(c)){const k=t;N(c,k.k)&&(c.value=null),k.k&&(u[k.k]=null)}}if(ee(a))sr(a,l,12,[o,u]);else{const k=Ie(a),D=Ue(a);if(k||D){const A=()=>{if(e.f){const R=k?v(a)?d[a]:u[a]:N()||!e.k?a.value:u[e.k];if(s)J(R)&&Ks(R,i);else if(J(R))R.includes(i)||R.push(i);else if(k)u[a]=[i],v(a)&&(d[a]=u[a]);else{const b=[i];N(a,e.k)&&(a.value=b),e.k&&(u[e.k]=b)}}else k?(u[a]=o,v(a)&&(d[a]=o)):D&&(N(a,e.k)&&(a.value=o),e.k&&(u[e.k]=o))};if(o){const R=()=>{A(),Nr.delete(e)};R.id=-1,Nr.set(e,R),Ze(R,n)}else Ni(e),A()}}}function Ni(e){const t=Nr.get(e);t&&(t.flags|=8,Nr.delete(e))}$r().requestIdleCallback;$r().cancelIdleCallback;const Vn=e=>!!e.type.__asyncLoader,Wl=e=>e.type.__isKeepAlive;function tu(e,t){Hl(e,"a",t)}function nu(e,t){Hl(e,"da",t)}function Hl(e,t,n=Ve){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Kr(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Wl(s.parent.vnode)&&ru(r,t,n,s),s=s.parent}}function ru(e,t,n,r){const s=Kr(t,e,r,!0);or(()=>{Ks(r[t],s)},n)}function Kr(e,t,n=Ve,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Ht();const l=ar(n),a=It(t,n,e,o);return l(),jt(),a});return r?s.unshift(i):s.push(i),i}}const Vt=e=>(t,n=Ve)=>{(!Jn||e==="sp")&&Kr(e,(...r)=>t(...r),n)},jl=Vt("bm"),Yr=Vt("m"),su=Vt("bu"),iu=Vt("u"),ou=Vt("bum"),or=Vt("um"),lu=Vt("sp"),au=Vt("rtg"),cu=Vt("rtc");function uu(e,t=Ve){Kr("ec",e,t)}const $l="components";function fu(e,t){return Bl($l,e,!0,t)||e}const Vl=Symbol.for("v-ndc");function Up(e){return Ie(e)?Bl($l,e,!1)||e:e||Vl}function Bl(e,t,n=!0,r=!1){const s=ot||Ve;if(s){const i=s.type;{const l=Ju(i,!1);if(l&&(l===t||l===qe(t)||l===Hr(qe(t))))return i}const o=Pi(s[e]||i[e],t)||Pi(s.appContext[e],t);return!o&&r?i:o}}function Pi(e,t){return e&&(e[t]||e[qe(t)]||e[Hr(qe(t))])}function hu(e,t,n,r){let s;const i=n,o=J(e);if(o||Ie(e)){const l=o&&un(e);let a=!1,c=!1;l&&(a=!ft(e),c=$t(e),e=Vr(e)),s=new Array(e.length);for(let u=0,d=e.length;ut(l,a,void 0,i));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,c=l.length;ae?ua(e)?qr(e):Ss(e.parent):null,Bn=He(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ss(e.parent),$root:e=>Ss(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Kl(e),$forceUpdate:e=>e.f||(e.f=()=>{si(e.update)}),$nextTick:e=>e.n||(e.n=ri.bind(e.proxy)),$watch:e=>Jc.bind(e)}),us=(e,t)=>e!==ve&&!e.__isScriptSetup&&he(e,t),du={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:l,appContext:a}=e;if(t[0]!=="$"){const g=o[t];if(g!==void 0)switch(g){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(us(r,t))return o[t]=1,r[t];if(s!==ve&&he(s,t))return o[t]=2,s[t];if(he(i,t))return o[t]=3,i[t];if(n!==ve&&he(n,t))return o[t]=4,n[t];Ns&&(o[t]=0)}}const c=Bn[t];let u,d;if(c)return t==="$attrs"&&je(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==ve&&he(n,t))return o[t]=4,n[t];if(d=a.config.globalProperties,he(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return us(s,t)?(s[t]=n,!0):r!==ve&&he(r,t)?(r[t]=n,!0):he(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,props:i,type:o}},l){let a;return!!(n[l]||e!==ve&&l[0]!=="$"&&he(e,l)||us(t,l)||he(i,l)||he(r,l)||he(Bn,l)||he(s.config.globalProperties,l)||(a=o.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:he(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function xi(e){return J(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ns=!0;function mu(e){const t=Kl(e),n=e.proxy,r=e.ctx;Ns=!1,t.beforeCreate&&Ii(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:l,provide:a,inject:c,created:u,beforeMount:d,mounted:g,beforeUpdate:v,updated:N,activated:k,deactivated:D,beforeDestroy:A,beforeUnmount:R,destroyed:b,unmounted:y,render:L,renderTracked:x,renderTriggered:F,errorCaptured:B,serverPrefetch:W,expose:ae,inheritAttrs:ke,components:Z,directives:_e,filters:ht}=t;if(c&&gu(c,r,null),o)for(const ie in o){const se=o[ie];ee(se)&&(r[ie]=se.bind(n))}if(s){const ie=s.call(n,n);ge(ie)&&(e.data=Br(ie))}if(Ns=!0,i)for(const ie in i){const se=i[ie],Be=ee(se)?se.bind(n,n):ee(se.get)?se.get.bind(n,n):St,Je=!ee(se)&&ee(se.set)?se.set.bind(n):St,we=ce({get:Be,set:Je});Object.defineProperty(r,ie,{enumerable:!0,configurable:!0,get:()=>we.value,set:Se=>we.value=Se})}if(l)for(const ie in l)Gl(l[ie],r,n,ie);if(a){const ie=ee(a)?a.call(n):a;Reflect.ownKeys(ie).forEach(se=>{_r(se,ie[se])})}u&&Ii(u,e,"c");function de(ie,se){J(se)?se.forEach(Be=>ie(Be.bind(n))):se&&ie(se.bind(n))}if(de(jl,d),de(Yr,g),de(su,v),de(iu,N),de(tu,k),de(nu,D),de(uu,B),de(cu,x),de(au,F),de(ou,R),de(or,y),de(lu,W),J(ae))if(ae.length){const ie=e.exposed||(e.exposed={});ae.forEach(se=>{Object.defineProperty(ie,se,{get:()=>n[se],set:Be=>n[se]=Be,enumerable:!0})})}else e.exposed||(e.exposed={});L&&e.render===St&&(e.render=L),ke!=null&&(e.inheritAttrs=ke),Z&&(e.components=Z),_e&&(e.directives=_e),W&&Ul(e)}function gu(e,t,n=St){J(e)&&(e=Ps(e));for(const r in e){const s=e[r];let i;ge(s)?"default"in s?i=Nt(s.from||r,s.default,!0):i=Nt(s.from||r):i=Nt(s),Ue(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function Ii(e,t,n){It(J(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Gl(e,t,n,r){let s=r.includes(".")?Ml(n,r):()=>n[r];if(Ie(e)){const i=t[e];ee(i)&&fn(s,i)}else if(ee(e))fn(s,e.bind(n));else if(ge(e))if(J(e))e.forEach(i=>Gl(i,t,n,r));else{const i=ee(e.handler)?e.handler.bind(n):t[e.handler];ee(i)&&fn(s,i,e)}}function Kl(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let a;return l?a=l:!s.length&&!n&&!r?a=t:(a={},s.length&&s.forEach(c=>Pr(a,c,o,!0)),Pr(a,t,o)),ge(t)&&i.set(t,a),a}function Pr(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Pr(e,i,n,!0),s&&s.forEach(o=>Pr(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const l=pu[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const pu={data:Oi,props:Li,emits:Li,methods:Mn,computed:Mn,beforeCreate:Ke,created:Ke,beforeMount:Ke,mounted:Ke,beforeUpdate:Ke,updated:Ke,beforeDestroy:Ke,beforeUnmount:Ke,destroyed:Ke,unmounted:Ke,activated:Ke,deactivated:Ke,errorCaptured:Ke,serverPrefetch:Ke,components:Mn,directives:Mn,watch:vu,provide:Oi,inject:_u};function Oi(e,t){return t?e?function(){return He(ee(e)?e.call(this,this):e,ee(t)?t.call(this,this):t)}:t:e}function _u(e,t){return Mn(Ps(e),Ps(t))}function Ps(e){if(J(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${qe(t)}Modifiers`]||e[`${dn(t)}Modifiers`];function Cu(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||ve;let s=n;const i=t.startsWith("update:"),o=i&&Eu(r,t.slice(7));o&&(o.trim&&(s=n.map(u=>Ie(u)?u.trim():u)),o.number&&(s=n.map(jr)));let l,a=r[l=is(t)]||r[l=is(qe(t))];!a&&i&&(a=r[l=is(dn(t))]),a&&It(a,e,6,s);const c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,It(c,e,6,s)}}const Tu=new WeakMap;function Xl(e,t,n=!1){const r=n?Tu:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},l=!1;if(!ee(e)){const a=c=>{const u=Xl(c,t,!0);u&&(l=!0,He(o,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(ge(e)&&r.set(e,null),null):(J(i)?i.forEach(a=>o[a]=null):He(o,i),ge(e)&&r.set(e,o),o)}function Xr(e,t){return!e||!Fr(t)?!1:(t=t.slice(2).replace(/Once$/,""),he(e,t[0].toLowerCase()+t.slice(1))||he(e,dn(t))||he(e,t))}function Ai(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:l,emit:a,render:c,renderCache:u,props:d,data:g,setupState:v,ctx:N,inheritAttrs:k}=e,D=Sr(e);let A,R;try{if(n.shapeFlag&4){const y=s||r,L=y;A=Tt(c.call(L,y,u,d,v,g,N)),R=l}else{const y=t;A=Tt(y.length>1?y(d,{attrs:l,slots:o,emit:a}):y(d,null)),R=t.props?l:ku(l)}}catch(y){Gn.length=0,Gr(y,e,1),A=Ee(zt)}let b=A;if(R&&k!==!1){const y=Object.keys(R),{shapeFlag:L}=b;y.length&&L&7&&(i&&y.some(Mr)&&(R=wu(R,i)),b=Sn(b,R,!1,!0))}return n.dirs&&(b=Sn(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ii(b,n.transition),A=b,Sr(D),A}const ku=e=>{let t;for(const n in e)(n==="class"||n==="style"||Fr(n))&&((t||(t={}))[n]=e[n]);return t},wu=(e,t)=>{const n={};for(const r in e)(!Mr(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Su(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:l,patchFlag:a}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return r?Ri(r,o,c):!!o;if(a&8){const u=t.dynamicProps;for(let d=0;dObject.create(ql),Ql=e=>Object.getPrototypeOf(e)===ql;function Pu(e,t,n,r=!1){const s={},i=Jl();e.propsDefaults=Object.create(null),Zl(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Pl(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function xu(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,l=fe(s),[a]=e.propsOptions;let c=!1;if((r||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[g,v]=ea(d,t,!0);He(o,g),v&&l.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!a)return ge(e)&&r.set(e,bn),bn;if(J(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",li=e=>J(e)?e.map(Tt):[Tt(e)],Ou=(e,t,n)=>{if(t._n)return t;const r=Xc((...s)=>li(t(...s)),n);return r._c=!1,r},ta=(e,t,n)=>{const r=e._ctx;for(const s in e){if(oi(s))continue;const i=e[s];if(ee(i))t[s]=Ou(s,i,r);else if(i!=null){const o=li(i);t[s]=()=>o}}},na=(e,t)=>{const n=li(t);e.slots.default=()=>n},ra=(e,t,n)=>{for(const r in t)(n||!oi(r))&&(e[r]=t[r])},Lu=(e,t,n)=>{const r=e.slots=Jl();if(e.vnode.shapeFlag&32){const s=t._;s?(ra(r,t,n),n&&cl(r,"_",s,!0)):ta(t,r)}else t&&na(e,t)},Au=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=ve;if(r.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:ra(s,t,n):(i=!t.$stable,ta(t,s)),o=t}else t&&(na(e,t),o={default:1});if(i)for(const l in s)!oi(l)&&o[l]==null&&delete s[l]},Ze=Uu;function Ru(e){return Du(e)}function Du(e,t){const n=$r();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:l,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:g,setScopeId:v=St,insertStaticContent:N}=e,k=(m,_,p,T=null,O=null,P=null,H=void 0,U=null,f=!!_.dynamicChildren)=>{if(m===_)return;m&&!Rn(m,_)&&(T=I(m),Se(m,O,P,!0),m=null),_.patchFlag===-2&&(f=!1,_.dynamicChildren=null);const{type:h,ref:C,shapeFlag:w}=_;switch(h){case lr:D(m,_,p,T);break;case zt:A(m,_,p,T);break;case vr:m==null&&R(_,p,T,H);break;case st:Z(m,_,p,T,O,P,H,U,f);break;default:w&1?L(m,_,p,T,O,P,H,U,f):w&6?_e(m,_,p,T,O,P,H,U,f):(w&64||w&128)&&h.process(m,_,p,T,O,P,H,U,f,K)}C!=null&&O?$n(C,m&&m.ref,P,_||m,!_):C==null&&m&&m.ref!=null&&$n(m.ref,null,P,m,!0)},D=(m,_,p,T)=>{if(m==null)r(_.el=l(_.children),p,T);else{const O=_.el=m.el;_.children!==m.children&&c(O,_.children)}},A=(m,_,p,T)=>{m==null?r(_.el=a(_.children||""),p,T):_.el=m.el},R=(m,_,p,T)=>{[m.el,m.anchor]=N(m.children,_,p,T,m.el,m.anchor)},b=({el:m,anchor:_},p,T)=>{let O;for(;m&&m!==_;)O=g(m),r(m,p,T),m=O;r(_,p,T)},y=({el:m,anchor:_})=>{let p;for(;m&&m!==_;)p=g(m),s(m),m=p;s(_)},L=(m,_,p,T,O,P,H,U,f)=>{if(_.type==="svg"?H="svg":_.type==="math"&&(H="mathml"),m==null)x(_,p,T,O,P,H,U,f);else{const h=m.el&&m.el._isVueCE?m.el:null;try{h&&h._beginPatch(),W(m,_,O,P,H,U,f)}finally{h&&h._endPatch()}}},x=(m,_,p,T,O,P,H,U)=>{let f,h;const{props:C,shapeFlag:w,transition:j,dirs:M}=m;if(f=m.el=o(m.type,P,C&&C.is,C),w&8?u(f,m.children):w&16&&B(m.children,f,null,T,O,fs(m,P),H,U),M&&tn(m,null,T,"created"),F(f,m,m.scopeId,H,T),C){for(const S in C)S!=="value"&&!Wn(S)&&i(f,S,null,C[S],P,T);"value"in C&&i(f,"value",null,C.value,P),(h=C.onVnodeBeforeMount)&&yt(h,T,m)}M&&tn(m,null,T,"beforeMount");const E=Fu(O,j);E&&j.beforeEnter(f),r(f,_,p),((h=C&&C.onVnodeMounted)||E||M)&&Ze(()=>{try{h&&yt(h,T,m),E&&j.enter(f),M&&tn(m,null,T,"mounted")}finally{}},O)},F=(m,_,p,T,O)=>{if(p&&v(m,p),T)for(let P=0;P{for(let h=f;h{const U=_.el=m.el;let{patchFlag:f,dynamicChildren:h,dirs:C}=_;f|=m.patchFlag&16;const w=m.props||ve,j=_.props||ve;let M;if(p&&nn(p,!1),(M=j.onVnodeBeforeUpdate)&&yt(M,p,_,m),C&&tn(_,m,p,"beforeUpdate"),p&&nn(p,!0),(w.innerHTML&&j.innerHTML==null||w.textContent&&j.textContent==null)&&u(U,""),h?ae(m.dynamicChildren,h,U,p,T,fs(_,O),P):H||se(m,_,U,null,p,T,fs(_,O),P,!1),f>0){if(f&16)ke(U,w,j,p,O);else if(f&2&&w.class!==j.class&&i(U,"class",null,j.class,O),f&4&&i(U,"style",w.style,j.style,O),f&8){const E=_.dynamicProps;for(let S=0;S{M&&yt(M,p,_,m),C&&tn(_,m,p,"updated")},T)},ae=(m,_,p,T,O,P,H)=>{for(let U=0;U<_.length;U++){const f=m[U],h=_[U],C=f.el&&(f.type===st||!Rn(f,h)||f.shapeFlag&198)?d(f.el):p;k(f,h,C,null,T,O,P,H,!0)}},ke=(m,_,p,T,O)=>{if(_!==p){if(_!==ve)for(const P in _)!Wn(P)&&!(P in p)&&i(m,P,_[P],null,O,T);for(const P in p){if(Wn(P))continue;const H=p[P],U=_[P];H!==U&&P!=="value"&&i(m,P,U,H,O,T)}"value"in p&&i(m,"value",_.value,p.value,O)}},Z=(m,_,p,T,O,P,H,U,f)=>{const h=_.el=m?m.el:l(""),C=_.anchor=m?m.anchor:l("");let{patchFlag:w,dynamicChildren:j,slotScopeIds:M}=_;M&&(U=U?U.concat(M):M),m==null?(r(h,p,T),r(C,p,T),B(_.children||[],p,C,O,P,H,U,f)):w>0&&w&64&&j&&m.dynamicChildren&&m.dynamicChildren.length===j.length?(ae(m.dynamicChildren,j,p,O,P,H,U),(_.key!=null||O&&_===O.subTree)&&sa(m,_,!0)):se(m,_,p,C,O,P,H,U,f)},_e=(m,_,p,T,O,P,H,U,f)=>{_.slotScopeIds=U,m==null?_.shapeFlag&512?O.ctx.activate(_,p,T,H,f):ht(_,p,T,O,P,H,f):at(m,_,f)},ht=(m,_,p,T,O,P,H)=>{const U=m.component=Ku(m,T,O);if(Wl(m)&&(U.ctx.renderer=K),Yu(U,!1,H),U.asyncDep){if(O&&O.registerDep(U,de,H),!m.el){const f=U.subTree=Ee(zt);A(null,f,_,p),m.placeholder=f.el}}else de(U,m,_,p,O,P,H)},at=(m,_,p)=>{const T=_.component=m.component;if(Su(m,_,p))if(T.asyncDep&&!T.asyncResolved){ie(T,_,p);return}else T.next=_,T.update();else _.el=m.el,T.vnode=_},de=(m,_,p,T,O,P,H)=>{const U=()=>{if(m.isMounted){let{next:w,bu:j,u:M,parent:E,vnode:S}=m;{const Me=ia(m);if(Me){w&&(w.el=S.el,ie(m,w,H)),Me.asyncDep.then(()=>{Ze(()=>{m.isUnmounted||h()},O)});return}}let X=w,te;nn(m,!1),w?(w.el=S.el,ie(m,w,H)):w=S,j&&pr(j),(te=w.props&&w.props.onVnodeBeforeUpdate)&&yt(te,E,w,S),nn(m,!0);const be=Ai(m),Ge=m.subTree;m.subTree=be,k(Ge,be,d(Ge.el),I(Ge),m,O,P),w.el=be.el,X===null&&Nu(m,be.el),M&&Ze(M,O),(te=w.props&&w.props.onVnodeUpdated)&&Ze(()=>yt(te,E,w,S),O)}else{let w;const{el:j,props:M}=_,{bm:E,m:S,parent:X,root:te,type:be}=m,Ge=Vn(_);nn(m,!1),E&&pr(E),!Ge&&(w=M&&M.onVnodeBeforeMount)&&yt(w,X,_),nn(m,!0);{te.ce&&te.ce._hasShadowRoot()&&te.ce._injectChildStyle(be,m.parent?m.parent.type:void 0);const Me=m.subTree=Ai(m);k(null,Me,p,T,m,O,P),_.el=Me.el}if(S&&Ze(S,O),!Ge&&(w=M&&M.onVnodeMounted)){const Me=_;Ze(()=>yt(w,X,Me),O)}(_.shapeFlag&256||X&&Vn(X.vnode)&&X.vnode.shapeFlag&256)&&m.a&&Ze(m.a,O),m.isMounted=!0,_=p=T=null}};m.scope.on();const f=m.effect=new ml(U);m.scope.off();const h=m.update=f.run.bind(f),C=m.job=f.runIfDirty.bind(f);C.i=m,C.id=m.uid,f.scheduler=()=>si(C),nn(m,!0),h()},ie=(m,_,p)=>{_.component=m;const T=m.vnode.props;m.vnode=_,m.next=null,xu(m,_.props,T,p),Au(m,_.children,p),Ht(),wi(m),jt()},se=(m,_,p,T,O,P,H,U,f=!1)=>{const h=m&&m.children,C=m?m.shapeFlag:0,w=_.children,{patchFlag:j,shapeFlag:M}=_;if(j>0){if(j&128){Je(h,w,p,T,O,P,H,U,f);return}else if(j&256){Be(h,w,p,T,O,P,H,U,f);return}}M&8?(C&16&&Re(h,O,P),w!==h&&u(p,w)):C&16?M&16?Je(h,w,p,T,O,P,H,U,f):Re(h,O,P,!0):(C&8&&u(p,""),M&16&&B(w,p,T,O,P,H,U,f))},Be=(m,_,p,T,O,P,H,U,f)=>{m=m||bn,_=_||bn;const h=m.length,C=_.length,w=Math.min(h,C);let j;for(j=0;jC?Re(m,O,P,!0,!1,w):B(_,p,T,O,P,H,U,f,w)},Je=(m,_,p,T,O,P,H,U,f)=>{let h=0;const C=_.length;let w=m.length-1,j=C-1;for(;h<=w&&h<=j;){const M=m[h],E=_[h]=f?Ft(_[h]):Tt(_[h]);if(Rn(M,E))k(M,E,p,null,O,P,H,U,f);else break;h++}for(;h<=w&&h<=j;){const M=m[w],E=_[j]=f?Ft(_[j]):Tt(_[j]);if(Rn(M,E))k(M,E,p,null,O,P,H,U,f);else break;w--,j--}if(h>w){if(h<=j){const M=j+1,E=Mj)for(;h<=w;)Se(m[h],O,P,!0),h++;else{const M=h,E=h,S=new Map;for(h=E;h<=j;h++){const rt=_[h]=f?Ft(_[h]):Tt(_[h]);rt.key!=null&&S.set(rt.key,h)}let X,te=0;const be=j-E+1;let Ge=!1,Me=0;const en=new Array(be);for(h=0;h=be){Se(rt,O,P,!0);continue}let bt;if(rt.key!=null)bt=S.get(rt.key);else for(X=E;X<=j;X++)if(en[X-E]===0&&Rn(rt,_[X])){bt=X;break}bt===void 0?Se(rt,O,P,!0):(en[bt-E]=h+1,bt>=Me?Me=bt:Ge=!0,k(rt,_[bt],p,null,O,P,H,U,f),te++)}const ss=Ge?Mu(en):bn;for(X=ss.length-1,h=be-1;h>=0;h--){const rt=E+h,bt=_[rt],bi=_[rt+1],yi=rt+1{const{el:P,type:H,transition:U,children:f,shapeFlag:h}=m;if(h&6){we(m.component.subTree,_,p,T);return}if(h&128){m.suspense.move(_,p,T);return}if(h&64){H.move(m,_,p,K);return}if(H===st){r(P,_,p);for(let w=0;wU.enter(P),O);else{const{leave:w,delayLeave:j,afterLeave:M}=U,E=()=>{m.ctx.isUnmounted?s(P):r(P,_,p)},S=()=>{P._isLeaving&&P[eu](!0),w(P,()=>{E(),M&&M()})};j?j(P,E,S):S()}else r(P,_,p)},Se=(m,_,p,T=!1,O=!1)=>{const{type:P,props:H,ref:U,children:f,dynamicChildren:h,shapeFlag:C,patchFlag:w,dirs:j,cacheIndex:M,memo:E}=m;if(w===-2&&(O=!1),U!=null&&(Ht(),$n(U,null,p,m,!0),jt()),M!=null&&(_.renderCache[M]=void 0),C&256){_.ctx.deactivate(m);return}const S=C&1&&j,X=!Vn(m);let te;if(X&&(te=H&&H.onVnodeBeforeUnmount)&&yt(te,_,m),C&6)nt(m.component,p,T);else{if(C&128){m.suspense.unmount(p,T);return}S&&tn(m,null,_,"beforeUnmount"),C&64?m.type.remove(m,_,p,K,T):h&&!h.hasOnce&&(P!==st||w>0&&w&64)?Re(h,_,p,!1,!0):(P===st&&w&384||!O&&C&16)&&Re(f,_,p),T&&ct(m)}const be=E!=null&&M==null;(X&&(te=H&&H.onVnodeUnmounted)||S||be)&&Ze(()=>{te&&yt(te,_,m),S&&tn(m,null,_,"unmounted"),be&&(m.el=null)},p)},ct=m=>{const{type:_,el:p,anchor:T,transition:O}=m;if(_===st){tt(p,T);return}if(_===vr){y(m);return}const P=()=>{s(p),O&&!O.persisted&&O.afterLeave&&O.afterLeave()};if(m.shapeFlag&1&&O&&!O.persisted){const{leave:H,delayLeave:U}=O,f=()=>H(p,P);U?U(m.el,P,f):f()}else P()},tt=(m,_)=>{let p;for(;m!==_;)p=g(m),s(m),m=p;s(_)},nt=(m,_,p)=>{const{bum:T,scope:O,job:P,subTree:H,um:U,m:f,a:h}=m;Fi(f),Fi(h),T&&pr(T),O.stop(),P&&(P.flags|=8,Se(H,m,_,p)),U&&Ze(U,_),Ze(()=>{m.isUnmounted=!0},_)},Re=(m,_,p,T=!1,O=!1,P=0)=>{for(let H=P;H{if(m.shapeFlag&6)return I(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const _=g(m.anchor||m.el),p=_&&_[Qc];return p?g(p):_};let G=!1;const $=(m,_,p)=>{let T;m==null?_._vnode&&(Se(_._vnode,null,null,!0),T=_._vnode.component):k(_._vnode||null,m,_,null,null,null,p),_._vnode=m,G||(G=!0,wi(T),Al(),G=!1)},K={p:k,um:Se,m:we,r:ct,mt:ht,mc:B,pc:se,pbc:ae,n:I,o:e};return{render:$,hydrate:void 0,createApp:yu($)}}function fs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function nn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function sa(e,t,n=!1){const r=e.children,s=t.children;if(J(r)&&J(s))for(let i=0;i>1,e[n[l]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function ia(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ia(t)}function Fi(e){if(e)for(let t=0;te.__isSuspense;function Uu(e,t){t&&t.pendingBranch?J(e)?t.effects.push(...e):t.effects.push(e):Yc(e)}const st=Symbol.for("v-fgt"),lr=Symbol.for("v-txt"),zt=Symbol.for("v-cmt"),vr=Symbol.for("v-stc"),Gn=[];let lt=null;function oe(e=!1){Gn.push(lt=e?null:[])}function Wu(){Gn.pop(),lt=Gn[Gn.length-1]||null}let qn=1;function xr(e,t=!1){qn+=e,e<0&<&&t&&(lt.hasOnce=!0)}function aa(e){return e.dynamicChildren=qn>0?lt||bn:null,Wu(),qn>0&<&<.push(e),e}function me(e,t,n,r,s,i){return aa(z(e,t,n,r,s,i,!0))}function Un(e,t,n,r,s){return aa(Ee(e,t,n,r,s,!0))}function Ir(e){return e?e.__v_isVNode===!0:!1}function Rn(e,t){return e.type===t.type&&e.key===t.key}const ca=({key:e})=>e??null,br=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ie(e)||Ue(e)||ee(e)?{i:ot,r:e,k:t,f:!!n}:e:null);function z(e,t=null,n=null,r=0,s=null,i=e===st?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ca(t),ref:t&&br(t),scopeId:Dl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ot};return l?(ai(a,n),i&128&&e.normalize(a)):n&&(a.shapeFlag|=Ie(n)?8:16),qn>0&&!o&<&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&<.push(a),a}const Ee=Hu;function Hu(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===Vl)&&(e=zt),Ir(e)){const l=Sn(e,t,!0);return n&&ai(l,n),qn>0&&!i&<&&(l.shapeFlag&6?lt[lt.indexOf(e)]=l:lt.push(l)),l.patchFlag=-2,l}if(Qu(e)&&(e=e.__vccOpts),t){t=ju(t);let{class:l,style:a}=t;l&&!Ie(l)&&(t.class=$e(l)),ge(a)&&(ti(a)&&!J(a)&&(a=He({},a)),t.style=Xs(a))}const o=Ie(e)?1:la(e)?128:Zc(e)?64:ge(e)?4:ee(e)?2:0;return z(e,t,n,r,s,o,i,!0)}function ju(e){return e?ti(e)||Ql(e)?He({},e):e:null}function Sn(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:l,transition:a}=e,c=t?Vu(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&ca(c),ref:t&&t.ref?n&&i?J(i)?i.concat(br(t)):[i,br(t)]:br(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==st?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Sn(e.ssContent),ssFallback:e.ssFallback&&Sn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&ii(u,a.clone(u)),u}function $u(e=" ",t=0){return Ee(lr,null,e,t)}function zr(e,t){const n=Ee(vr,null,e);return n.staticCount=t,n}function Le(e="",t=!1){return t?(oe(),Un(zt,null,e)):Ee(zt,null,e)}function Tt(e){return e==null||typeof e=="boolean"?Ee(zt):J(e)?Ee(st,null,e.slice()):Ir(e)?Ft(e):Ee(lr,null,String(e))}function Ft(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Sn(e)}function ai(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(J(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ai(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Ql(t)?t._ctx=ot:s===3&&ot&&(ot.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ee(t)?(t={default:t,_ctx:ot},n=32):(t=String(t),r&64?(n=16,t=[$u(t)]):n=8);e.children=t,e.shapeFlag|=n}function Vu(...e){const t={};for(let n=0;nVe||ot;let Or,Is;{const e=$r(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Or=t("__VUE_INSTANCE_SETTERS__",n=>Ve=n),Is=t("__VUE_SSR_SETTERS__",n=>Jn=n)}const ar=e=>{const t=Ve;return Or(e),e.scope.on(),()=>{e.scope.off(),Or(t)}},Mi=()=>{Ve&&Ve.scope.off(),Or(null)};function ua(e){return e.vnode.shapeFlag&4}let Jn=!1;function Yu(e,t=!1,n=!1){t&&Is(t);const{props:r,children:s}=e.vnode,i=ua(e);Pu(e,r,i,t),Lu(e,s,n||t);const o=i?Xu(e,t):void 0;return t&&Is(!1),o}function Xu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,du);const{setup:r}=n;if(r){Ht();const s=e.setupContext=r.length>1?qu(e):null,i=ar(e),o=sr(r,e,0,[e.props,s]),l=ol(o);if(jt(),i(),(l||e.sp)&&!Vn(e)&&Ul(e),l){if(o.then(Mi,Mi),t)return o.then(a=>{Ui(e,a)}).catch(a=>{Gr(a,e,0)});e.asyncDep=o}else Ui(e,o)}else fa(e)}function Ui(e,t,n){ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ge(t)&&(e.setupState=Il(t)),fa(e)}function fa(e,t,n){const r=e.type;e.render||(e.render=r.render||St);{const s=ar(e);Ht();try{mu(e)}finally{jt(),s()}}}const zu={get(e,t){return je(e,"get",""),e[t]}};function qu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,zu),slots:e.slots,emit:e.emit,expose:t}}function qr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Il(Uc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Bn)return Bn[n](e)},has(t,n){return n in t||n in Bn}})):e.proxy}function Ju(e,t=!0){return ee(e)?e.displayName||e.name:e.name||t&&e.__name}function Qu(e){return ee(e)&&"__vccOpts"in e}const ce=(e,t)=>$c(e,t,Jn);function Jr(e,t,n){try{xr(-1);const r=arguments.length;return r===2?ge(t)&&!J(t)?Ir(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ir(n)&&(n=[n]),Ee(e,t,n))}finally{xr(1)}}const Zu="3.5.31";/** * @vue/runtime-dom v3.5.31 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Os;const Wi=typeof window<"u"&&window.trustedTypes;if(Wi)try{Os=Wi.createPolicy("vue",{createHTML:e=>e})}catch{}const ha=Os?e=>Os.createHTML(e):e=>e,ef="http://www.w3.org/2000/svg",tf="http://www.w3.org/1998/Math/MathML",Dt=typeof document<"u"?document:null,Hi=Dt&&Dt.createElement("template"),nf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?Dt.createElementNS(ef,e):t==="mathml"?Dt.createElementNS(tf,e):n?Dt.createElement(e,{is:n}):Dt.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Dt.createTextNode(e),createComment:e=>Dt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Dt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{Hi.innerHTML=ha(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const l=Hi.content;if(r==="svg"||r==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},rf=Symbol("_vtc");function sf(e,t,n){const r=e[rf];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ji=Symbol("_vod"),of=Symbol("_vsh"),lf=Symbol(""),af=/(?:^|;)\s*display\s*:/;function cf(e,t,n){const r=e.style,s=Ie(n);let i=!1;if(n&&!s){if(t)if(Ie(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&yr(r,l,"")}else for(const o in t)n[o]==null&&yr(r,o,"");for(const o in n)o==="display"&&(i=!0),yr(r,o,n[o])}else if(s){if(t!==n){const o=r[lf];o&&(n+=";"+o),r.cssText=n,i=af.test(n)}}else t&&e.removeAttribute("style");ji in e&&(e[ji]=i?r.display:"",e[of]&&(r.display="none"))}const $i=/\s*!important$/;function yr(e,t,n){if(J(n))n.forEach(r=>yr(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=uf(e,t);$i.test(n)?e.setProperty(dn(r),n.replace($i,""),"important"):e[r]=n}}const Vi=["Webkit","Moz","ms"],hs={};function uf(e,t){const n=hs[t];if(n)return n;let r=qe(t);if(r!=="filter"&&r in e)return hs[t]=r;r=Hr(r);for(let s=0;sds||(mf.then(()=>ds=0),ds=Date.now());function pf(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;It(_f(r,n.value),t,5,[r])};return n.value=e,n.attached=gf(),n}function _f(e,t){if(J(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const zi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,vf=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?sf(e,r,o):t==="style"?cf(e,n,r):Fr(t)?Mr(t)||hf(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bf(e,t,r,o))?(Ki(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Gi(e,t,r,o,i,t!=="value")):e._isVueCE&&(yf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ie(r)))?Ki(e,qe(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Gi(e,t,r,o))};function bf(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&zi(t)&&ee(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return zi(t)&&Ie(n)?!1:t in e}function yf(e,t){const n=e._def.props;if(!n)return!1;const r=qe(t);return Array.isArray(n)?n.some(s=>qe(s)===r):Object.keys(n).some(s=>qe(s)===r)}const Lr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return J(t)?n=>pr(t,n):t};function Ef(e){e.target.composing=!0}function qi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Tn=Symbol("_assign");function Ji(e,t,n){return t&&(e=e.trim()),n&&(e=jr(e)),e}const Up={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Tn]=Lr(s);const i=r||s.props&&s.props.type==="number";ln(e,t?"change":"input",o=>{o.target.composing||e[Tn](Ji(e.value,n,i))}),(n||i)&&ln(e,"change",()=>{e.value=Ji(e.value,n,i)}),t||(ln(e,"compositionstart",Ef),ln(e,"compositionend",qi),ln(e,"change",qi))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[Tn]=Lr(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?jr(e.value):e.value,a=t??"";if(l===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===a)||(e.value=a)}},Wp={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=Ur(t);ln(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?jr(Ar(o)):Ar(o));e[Tn](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,ri(()=>{e._assigning=!1})}),e[Tn]=Lr(r)},mounted(e,{value:t}){Qi(e,t)},beforeUpdate(e,t,n){e[Tn]=Lr(n)},updated(e,{value:t}){e._assigning||Qi(e,t)}};function Qi(e,t){const n=e.multiple,r=J(t);if(!(n&&!r&&!Ur(t))){for(let s=0,i=e.options.length;sString(c)===String(l)):o.selected=_c(t,l)>-1}else o.selected=t.has(l);else if(rr(Ar(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ar(e){return"_value"in e?e._value:e.value}const Cf=["ctrl","shift","alt","meta"],Tf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Cf.some(n=>e[`${n}Key`]&&!t.includes(n))},kf=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o{const t=Sf().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=xf(r);if(!s)return;const i=t._component;!ee(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,Pf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function Pf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xf(e){return Ie(e)?document.querySelector(e):e}/*! +**/let Os;const Wi=typeof window<"u"&&window.trustedTypes;if(Wi)try{Os=Wi.createPolicy("vue",{createHTML:e=>e})}catch{}const ha=Os?e=>Os.createHTML(e):e=>e,ef="http://www.w3.org/2000/svg",tf="http://www.w3.org/1998/Math/MathML",Dt=typeof document<"u"?document:null,Hi=Dt&&Dt.createElement("template"),nf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?Dt.createElementNS(ef,e):t==="mathml"?Dt.createElementNS(tf,e):n?Dt.createElement(e,{is:n}):Dt.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Dt.createTextNode(e),createComment:e=>Dt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Dt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{Hi.innerHTML=ha(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const l=Hi.content;if(r==="svg"||r==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},rf=Symbol("_vtc");function sf(e,t,n){const r=e[rf];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ji=Symbol("_vod"),of=Symbol("_vsh"),lf=Symbol(""),af=/(?:^|;)\s*display\s*:/;function cf(e,t,n){const r=e.style,s=Ie(n);let i=!1;if(n&&!s){if(t)if(Ie(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&yr(r,l,"")}else for(const o in t)n[o]==null&&yr(r,o,"");for(const o in n)o==="display"&&(i=!0),yr(r,o,n[o])}else if(s){if(t!==n){const o=r[lf];o&&(n+=";"+o),r.cssText=n,i=af.test(n)}}else t&&e.removeAttribute("style");ji in e&&(e[ji]=i?r.display:"",e[of]&&(r.display="none"))}const $i=/\s*!important$/;function yr(e,t,n){if(J(n))n.forEach(r=>yr(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=uf(e,t);$i.test(n)?e.setProperty(dn(r),n.replace($i,""),"important"):e[r]=n}}const Vi=["Webkit","Moz","ms"],hs={};function uf(e,t){const n=hs[t];if(n)return n;let r=qe(t);if(r!=="filter"&&r in e)return hs[t]=r;r=Hr(r);for(let s=0;sds||(mf.then(()=>ds=0),ds=Date.now());function pf(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;It(_f(r,n.value),t,5,[r])};return n.value=e,n.attached=gf(),n}function _f(e,t){if(J(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const zi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,vf=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?sf(e,r,o):t==="style"?cf(e,n,r):Fr(t)?Mr(t)||hf(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bf(e,t,r,o))?(Ki(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Gi(e,t,r,o,i,t!=="value")):e._isVueCE&&(yf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ie(r)))?Ki(e,qe(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Gi(e,t,r,o))};function bf(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&zi(t)&&ee(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return zi(t)&&Ie(n)?!1:t in e}function yf(e,t){const n=e._def.props;if(!n)return!1;const r=qe(t);return Array.isArray(n)?n.some(s=>qe(s)===r):Object.keys(n).some(s=>qe(s)===r)}const Lr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return J(t)?n=>pr(t,n):t};function Ef(e){e.target.composing=!0}function qi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Tn=Symbol("_assign");function Ji(e,t,n){return t&&(e=e.trim()),n&&(e=jr(e)),e}const Wp={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Tn]=Lr(s);const i=r||s.props&&s.props.type==="number";ln(e,t?"change":"input",o=>{o.target.composing||e[Tn](Ji(e.value,n,i))}),(n||i)&&ln(e,"change",()=>{e.value=Ji(e.value,n,i)}),t||(ln(e,"compositionstart",Ef),ln(e,"compositionend",qi),ln(e,"change",qi))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[Tn]=Lr(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?jr(e.value):e.value,a=t??"";if(l===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===a)||(e.value=a)}},Hp={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const s=Ur(t);ln(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?jr(Ar(o)):Ar(o));e[Tn](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,ri(()=>{e._assigning=!1})}),e[Tn]=Lr(r)},mounted(e,{value:t}){Qi(e,t)},beforeUpdate(e,t,n){e[Tn]=Lr(n)},updated(e,{value:t}){e._assigning||Qi(e,t)}};function Qi(e,t){const n=e.multiple,r=J(t);if(!(n&&!r&&!Ur(t))){for(let s=0,i=e.options.length;sString(c)===String(l)):o.selected=_c(t,l)>-1}else o.selected=t.has(l);else if(rr(Ar(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ar(e){return"_value"in e?e._value:e.value}const Cf=["ctrl","shift","alt","meta"],Tf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Cf.some(n=>e[`${n}Key`]&&!t.includes(n))},kf=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o{const t=Sf().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=xf(r);if(!s)return;const i=t._component;!ee(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,Pf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function Pf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xf(e){return Ie(e)?document.querySelector(e):e}/*! * shared v9.14.5 * (c) 2025 kazuya kawaguchi * Released under the MIT License. @@ -49,4 +49,4 @@ Vui lòng tải lại hình ảnh biểu tượng cảm xúc tùy chỉnh.`,inco * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let lp=()=>location.protocol+"//"+location.host;function rc(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(o);return l[0]!=="/"&&(l="/"+l),Bo(l,"")}return Bo(n,e)+r+s}function ap(e,t,n,r){let s=[],i=[],o=null;const l=({state:g})=>{const v=rc(e,location),N=n.value,k=t.value;let D=0;if(g){if(n.value=v,t.value=g,o&&o===N){o=null;return}D=k?g.position-k.position:0}else r(v);s.forEach(A=>{A(n.value,N,{delta:D,type:$s.pop,direction:D?D>0?bs.forward:bs.back:bs.unknown})})};function a(){o=n.value}function c(g){s.push(g);const v=()=>{const N=s.indexOf(g);N>-1&&s.splice(N,1)};return i.push(v),v}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(ue({},g.state,{scroll:rs()}),"")}}function d(){for(const g of i)g();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:a,listen:c,destroy:d}}function zo(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?rs():null}}function cp(e){const{history:t,location:n}=window,r={value:rc(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(a,c,u){const d=e.indexOf("#"),g=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:lp()+e+a;try{t[u?"replaceState":"pushState"](c,"",g),s.value=c}catch(v){console.error(v),n[u?"replace":"assign"](g)}}function o(a,c){i(a,ue({},t.state,zo(s.value.back,a,s.value.forward,!0),c,{position:s.value.position}),!0),r.value=a}function l(a,c){const u=ue({},s.value,t.state,{forward:a,scroll:rs()});i(u.current,u,!0),i(a,ue({},zo(r.value,a,null),{position:u.position+1},c),!1),r.value=a}return{location:r,state:s,push:l,replace:o}}function up(e){e=Yg(e);const t=cp(e),n=ap(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=ue({location:"",base:e,go:r,createHref:zg.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}let an=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Oe=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Oe||{});const fp={type:an.Static,value:""},hp=/[a-zA-Z0-9_]/;function dp(e){if(!e)return[[]];if(e==="/")return[[fp]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${c}": ${v}`)}let n=Oe.Static,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let l=0,a,c="",u="";function d(){c&&(n===Oe.Static?i.push({type:an.Static,value:c}):n===Oe.Param||n===Oe.ParamRegExp||n===Oe.ParamRegExpEnd?(i.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:an.Param,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function g(){c+=a}for(;lt.length?t.length===1&&t[0]===Xe.Static+Xe.Segment?1:-1:0}function sc(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const vp={strict:!1,end:!0,sensitive:!1};function bp(e,t,n){const r=pp(dp(e.path),n),s=ue(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function yp(e,t){const n=[],r=new Map;t=Vo(vp,t);function s(d){return r.get(d)}function i(d,g,v){const N=!v,k=Zo(d);k.aliasOf=v&&v.record;const D=Vo(t,d),A=[k];if("alias"in d){const y=typeof d.alias=="string"?[d.alias]:d.alias;for(const L of y)A.push(Zo(ue({},k,{components:v?v.record.components:k.components,path:L,aliasOf:v?v.record:k})))}let R,b;for(const y of A){const{path:L}=y;if(g&&L[0]!=="/"){const x=g.record.path,F=x[x.length-1]==="/"?"":"/";y.path=g.record.path+(L&&F+L)}if(R=bp(y,g,D),v?v.alias.push(R):(b=b||R,b!==R&&b.alias.push(R),N&&d.name&&!el(R)&&o(d.name)),ic(R)&&a(R),k.children){const x=k.children;for(let F=0;F{o(b)}:Kn}function o(d){if(ec(d)){const g=r.get(d);g&&(r.delete(d),n.splice(n.indexOf(g),1),g.children.forEach(o),g.alias.forEach(o))}else{const g=n.indexOf(d);g>-1&&(n.splice(g,1),d.record.name&&r.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function l(){return n}function a(d){const g=Tp(d,n);n.splice(g,0,d),d.record.name&&!el(d)&&r.set(d.record.name,d)}function c(d,g){let v,N={},k,D;if("name"in d&&d.name){if(v=r.get(d.name),!v)throw On(Pe.MATCHER_NOT_FOUND,{location:d});D=v.record.name,N=ue(Qo(g.params,v.keys.filter(b=>!b.optional).concat(v.parent?v.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),d.params&&Qo(d.params,v.keys.map(b=>b.name))),k=v.stringify(N)}else if(d.path!=null)k=d.path,v=n.find(b=>b.re.test(k)),v&&(N=v.parse(k),D=v.record.name);else{if(v=g.name?r.get(g.name):n.find(b=>b.re.test(g.path)),!v)throw On(Pe.MATCHER_NOT_FOUND,{location:d,currentLocation:g});D=v.record.name,N=ue({},g.params,d.params),k=v.stringify(N)}const A=[];let R=v;for(;R;)A.unshift(R.record),R=R.parent;return{name:D,path:k,params:N,matched:A,meta:Cp(A)}}e.forEach(d=>i(d));function u(){n.length=0,r.clear()}return{addRoute:i,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:l,getRecordMatcher:s}}function Qo(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Zo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ep(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ep(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function el(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Cp(e){return e.reduce((t,n)=>ue(t,n.meta),{})}function Tp(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;sc(e,t[i])<0?r=i:n=i+1}const s=kp(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function kp(e){let t=e;for(;t=t.parent;)if(ic(t)&&sc(e,t)===0)return t}function ic({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function tl(e){const t=Nt(_i),n=Nt(nc),r=ce(()=>{const a=Y(e.to);return t.resolve(a)}),s=ce(()=>{const{matched:a}=r.value,{length:c}=a,u=a[c-1],d=n.matched;if(!u||!d.length)return-1;const g=d.findIndex(In.bind(null,u));if(g>-1)return g;const v=nl(a[c-2]);return c>1&&nl(u)===v&&d[d.length-1].path!==v?d.findIndex(In.bind(null,a[c-2])):g}),i=ce(()=>s.value>-1&&xp(n.params,r.value.params)),o=ce(()=>s.value>-1&&s.value===n.matched.length-1&&Za(n.params,r.value.params));function l(a={}){if(Pp(a)){const c=t[Y(e.replace)?"replace":"push"](Y(e.to)).catch(Kn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:r,href:ce(()=>r.value.href),isActive:i,isExactActive:o,navigate:l}}function wp(e){return e.length===1?e[0]:e}const Sp=ir({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:tl,setup(e,{slots:t}){const n=Br(tl(e)),{options:r}=Nt(_i),s=ce(()=>({[rl(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[rl(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&wp(t.default(n));return e.custom?i:Jr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),Np=Sp;function Pp(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xp(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!vt(s)||s.length!==r.length||r.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function nl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const rl=(e,t,n)=>e??t??n,Ip=ir({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Nt(Bs),s=ce(()=>e.route||r.value),i=Nt(Xo,0),o=ce(()=>{let c=Y(i);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),l=ce(()=>s.value.matched[o.value]);_r(Xo,ce(()=>o.value+1)),_r(ip,l),_r(Bs,s);const a=it();return fn(()=>[a.value,l.value,e.name],([c,u,d],[g,v,N])=>{u&&(u.instances[d]=c,v&&v!==u&&c&&c===g&&(u.leaveGuards.size||(u.leaveGuards=v.leaveGuards),u.updateGuards.size||(u.updateGuards=v.updateGuards))),c&&u&&(!v||!In(u,v)||!g)&&(u.enterCallbacks[d]||[]).forEach(k=>k(c))},{flush:"post"}),()=>{const c=s.value,u=e.name,d=l.value,g=d&&d.components[u];if(!g)return sl(n.default,{Component:g,route:c});const v=d.props[u],N=v?v===!0?c.params:typeof v=="function"?v(c):v:null,D=Jr(g,ue({},N,t,{onVnodeUnmounted:A=>{A.component.isUnmounted&&(d.instances[u]=null)},ref:a}));return sl(n.default,{Component:D,route:c})||D}}});function sl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Op=Ip;function Lp(e){const t=yp(e.routes,e),n=e.parseQuery||rp,r=e.stringifyQuery||Yo,s=e.history,i=Fn(),o=Fn(),l=Fn(),a=ni(Gt);let c=Gt;_n&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=_s.bind(null,I=>""+I),d=_s.bind(null,Hg),g=_s.bind(null,tr);function v(I,G){let $,K;return ec(I)?($=t.getRecordMatcher(I),K=G):K=I,t.addRoute(K,$)}function N(I){const G=t.getRecordMatcher(I);G&&t.removeRoute(G)}function k(){return t.getRoutes().map(I=>I.record)}function D(I){return!!t.getRecordMatcher(I)}function A(I,G){if(G=ue({},G||a.value),typeof I=="string"){const p=vs(n,I,G.path),T=t.resolve({path:p.path},G),O=s.createHref(p.fullPath);return ue(p,T,{params:g(T.params),hash:tr(p.hash),redirectedFrom:void 0,href:O})}let $;if(I.path!=null)$=ue({},I,{path:vs(n,I.path,G.path).path});else{const p=ue({},I.params);for(const T in p)p[T]==null&&delete p[T];$=ue({},I,{params:d(p)}),G.params=d(G.params)}const K=t.resolve($,G),ne=I.hash||"";K.params=u(g(K.params));const m=Vg(r,ue({},I,{hash:Mg(ne),path:K.path})),_=s.createHref(m);return ue({fullPath:m,hash:ne,query:r===Yo?sp(I.query):I.query||{}},K,{redirectedFrom:void 0,href:_})}function R(I){return typeof I=="string"?vs(n,I,a.value.path):ue({},I)}function b(I,G){if(c!==I)return On(Pe.NAVIGATION_CANCELLED,{from:G,to:I})}function y(I){return F(I)}function L(I){return y(ue(R(I),{replace:!0}))}function x(I,G){const $=I.matched[I.matched.length-1];if($&&$.redirect){const{redirect:K}=$;let ne=typeof K=="function"?K(I,G):K;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=R(ne):{path:ne},ne.params={}),ue({query:I.query,hash:I.hash,params:ne.path!=null?{}:I.params},ne)}}function F(I,G){const $=c=A(I),K=a.value,ne=I.state,m=I.force,_=I.replace===!0,p=x($,K);if(p)return F(ue(R(p),{state:typeof p=="object"?ue({},ne,p.state):ne,force:m,replace:_}),G||$);const T=$;T.redirectedFrom=G;let O;return!m&&Bg(r,K,$)&&(O=On(Pe.NAVIGATION_DUPLICATED,{to:T,from:K}),we(K,K,!0,!1)),(O?Promise.resolve(O):ae(T,K)).catch(P=>Rt(P)?Rt(P,Pe.NAVIGATION_GUARD_REDIRECT)?P:Je(P):se(P,T,K)).then(P=>{if(P){if(Rt(P,Pe.NAVIGATION_GUARD_REDIRECT))return F(ue({replace:_},R(P.to),{state:typeof P.to=="object"?ue({},ne,P.to.state):ne,force:m}),G||T)}else P=Z(T,K,!0,_,ne);return ke(T,K,P),P})}function B(I,G){const $=b(I,G);return $?Promise.reject($):Promise.resolve()}function W(I){const G=tt.values().next().value;return G&&typeof G.runWithContext=="function"?G.runWithContext(I):I()}function ae(I,G){let $;const[K,ne,m]=op(I,G);$=ys(K.reverse(),"beforeRouteLeave",I,G);for(const p of K)p.leaveGuards.forEach(T=>{$.push(Xt(T,I,G))});const _=B.bind(null,I,G);return $.push(_),Re($).then(()=>{$=[];for(const p of i.list())$.push(Xt(p,I,G));return $.push(_),Re($)}).then(()=>{$=ys(ne,"beforeRouteUpdate",I,G);for(const p of ne)p.updateGuards.forEach(T=>{$.push(Xt(T,I,G))});return $.push(_),Re($)}).then(()=>{$=[];for(const p of m)if(p.beforeEnter)if(vt(p.beforeEnter))for(const T of p.beforeEnter)$.push(Xt(T,I,G));else $.push(Xt(p.beforeEnter,I,G));return $.push(_),Re($)}).then(()=>(I.matched.forEach(p=>p.enterCallbacks={}),$=ys(m,"beforeRouteEnter",I,G,W),$.push(_),Re($))).then(()=>{$=[];for(const p of o.list())$.push(Xt(p,I,G));return $.push(_),Re($)}).catch(p=>Rt(p,Pe.NAVIGATION_CANCELLED)?p:Promise.reject(p))}function ke(I,G,$){l.list().forEach(K=>W(()=>K(I,G,$)))}function Z(I,G,$,K,ne){const m=b(I,G);if(m)return m;const _=G===Gt,p=_n?history.state:{};$&&(K||_?s.replace(I.fullPath,ue({scroll:_&&p&&p.scroll},ne)):s.push(I.fullPath,ne)),a.value=I,we(I,G,$,_),Je()}let _e;function ht(){_e||(_e=s.listen((I,G,$)=>{if(!nt.listening)return;const K=A(I),ne=x(K,nt.currentRoute.value);if(ne){F(ue(ne,{replace:!0,force:!0}),K).catch(Kn);return}c=K;const m=a.value;_n&&Qg(Ko(m.fullPath,$.delta),rs()),ae(K,m).catch(_=>Rt(_,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_CANCELLED)?_:Rt(_,Pe.NAVIGATION_GUARD_REDIRECT)?(F(ue(R(_.to),{force:!0}),K).then(p=>{Rt(p,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_DUPLICATED)&&!$.delta&&$.type===$s.pop&&s.go(-1,!1)}).catch(Kn),Promise.reject()):($.delta&&s.go(-$.delta,!1),se(_,K,m))).then(_=>{_=_||Z(K,m,!1),_&&($.delta&&!Rt(_,Pe.NAVIGATION_CANCELLED)?s.go(-$.delta,!1):$.type===$s.pop&&Rt(_,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),ke(K,m,_)}).catch(Kn)}))}let at=Fn(),de=Fn(),ie;function se(I,G,$){Je(I);const K=de.list();return K.length?K.forEach(ne=>ne(I,G,$)):console.error(I),Promise.reject(I)}function Be(){return ie&&a.value!==Gt?Promise.resolve():new Promise((I,G)=>{at.add([I,G])})}function Je(I){return ie||(ie=!I,ht(),at.list().forEach(([G,$])=>I?$(I):G()),at.reset()),I}function we(I,G,$,K){const{scrollBehavior:ne}=e;if(!_n||!ne)return Promise.resolve();const m=!$&&Zg(Ko(I.fullPath,0))||(K||!$)&&history.state&&history.state.scroll||null;return ri().then(()=>ne(I,G,m)).then(_=>_&&Jg(_)).catch(_=>se(_,I,G))}const Se=I=>s.go(I);let ct;const tt=new Set,nt={currentRoute:a,listening:!0,addRoute:v,removeRoute:N,clearRoutes:t.clearRoutes,hasRoute:D,getRoutes:k,resolve:A,options:e,push:y,replace:L,go:Se,back:()=>Se(-1),forward:()=>Se(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:de.add,isReady:Be,install(I){I.component("RouterLink",Np),I.component("RouterView",Op),I.config.globalProperties.$router=nt,Object.defineProperty(I.config.globalProperties,"$route",{enumerable:!0,get:()=>Y(a)}),_n&&!ct&&a.value===Gt&&(ct=!0,y(s.location).catch(K=>{}));const G={};for(const K in Gt)Object.defineProperty(G,K,{get:()=>a.value[K],enumerable:!0});I.provide(_i,nt),I.provide(nc,Pl(G)),I.provide(Bs,a);const $=I.unmount;tt.add(I),I.unmount=function(){tt.delete(I),tt.size<1&&(c=Gt,_e&&_e(),_e=null,a.value=Gt,ct=!1,ie=!1),$()}}};function Re(I){return I.reduce((G,$)=>G.then(()=>W($)),Promise.resolve())}return nt}const Ap=[{path:"/",name:"Home",component:()=>Sg(()=>import("./HomePage-C46hPw_t.js"),__vite__mapDeps([0,1]),import.meta.url)}],Rp=Lp({history:up("./"),routes:Ap}),Dp=Nd({legacy:!1,locale:cg(),fallbackLocale:"en",messages:ag}),vi=Nf(Tg);vi.use(Rp);vi.use(Dp);vi.mount("#app");export{Uc as A,st as F,Sg as _,oe as a,z as b,me as c,Y as d,$u as e,Ee as f,Le as g,Bd as h,ce as i,Jr as j,$e as k,hu as l,Fp as m,ri as n,Yr as o,Wp as p,kf as q,it as r,Xs as s,Ne as t,cr as u,Up as v,fn as w,Un as x,Mp as y,or as z}; + */let lp=()=>location.protocol+"//"+location.host;function rc(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(o);return l[0]!=="/"&&(l="/"+l),Bo(l,"")}return Bo(n,e)+r+s}function ap(e,t,n,r){let s=[],i=[],o=null;const l=({state:g})=>{const v=rc(e,location),N=n.value,k=t.value;let D=0;if(g){if(n.value=v,t.value=g,o&&o===N){o=null;return}D=k?g.position-k.position:0}else r(v);s.forEach(A=>{A(n.value,N,{delta:D,type:$s.pop,direction:D?D>0?bs.forward:bs.back:bs.unknown})})};function a(){o=n.value}function c(g){s.push(g);const v=()=>{const N=s.indexOf(g);N>-1&&s.splice(N,1)};return i.push(v),v}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(ue({},g.state,{scroll:rs()}),"")}}function d(){for(const g of i)g();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:a,listen:c,destroy:d}}function zo(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?rs():null}}function cp(e){const{history:t,location:n}=window,r={value:rc(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(a,c,u){const d=e.indexOf("#"),g=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:lp()+e+a;try{t[u?"replaceState":"pushState"](c,"",g),s.value=c}catch(v){console.error(v),n[u?"replace":"assign"](g)}}function o(a,c){i(a,ue({},t.state,zo(s.value.back,a,s.value.forward,!0),c,{position:s.value.position}),!0),r.value=a}function l(a,c){const u=ue({},s.value,t.state,{forward:a,scroll:rs()});i(u.current,u,!0),i(a,ue({},zo(r.value,a,null),{position:u.position+1},c),!1),r.value=a}return{location:r,state:s,push:l,replace:o}}function up(e){e=Yg(e);const t=cp(e),n=ap(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=ue({location:"",base:e,go:r,createHref:zg.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}let an=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Oe=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Oe||{});const fp={type:an.Static,value:""},hp=/[a-zA-Z0-9_]/;function dp(e){if(!e)return[[]];if(e==="/")return[[fp]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${c}": ${v}`)}let n=Oe.Static,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let l=0,a,c="",u="";function d(){c&&(n===Oe.Static?i.push({type:an.Static,value:c}):n===Oe.Param||n===Oe.ParamRegExp||n===Oe.ParamRegExpEnd?(i.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:an.Param,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function g(){c+=a}for(;lt.length?t.length===1&&t[0]===Xe.Static+Xe.Segment?1:-1:0}function sc(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const vp={strict:!1,end:!0,sensitive:!1};function bp(e,t,n){const r=pp(dp(e.path),n),s=ue(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function yp(e,t){const n=[],r=new Map;t=Vo(vp,t);function s(d){return r.get(d)}function i(d,g,v){const N=!v,k=Zo(d);k.aliasOf=v&&v.record;const D=Vo(t,d),A=[k];if("alias"in d){const y=typeof d.alias=="string"?[d.alias]:d.alias;for(const L of y)A.push(Zo(ue({},k,{components:v?v.record.components:k.components,path:L,aliasOf:v?v.record:k})))}let R,b;for(const y of A){const{path:L}=y;if(g&&L[0]!=="/"){const x=g.record.path,F=x[x.length-1]==="/"?"":"/";y.path=g.record.path+(L&&F+L)}if(R=bp(y,g,D),v?v.alias.push(R):(b=b||R,b!==R&&b.alias.push(R),N&&d.name&&!el(R)&&o(d.name)),ic(R)&&a(R),k.children){const x=k.children;for(let F=0;F{o(b)}:Kn}function o(d){if(ec(d)){const g=r.get(d);g&&(r.delete(d),n.splice(n.indexOf(g),1),g.children.forEach(o),g.alias.forEach(o))}else{const g=n.indexOf(d);g>-1&&(n.splice(g,1),d.record.name&&r.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function l(){return n}function a(d){const g=Tp(d,n);n.splice(g,0,d),d.record.name&&!el(d)&&r.set(d.record.name,d)}function c(d,g){let v,N={},k,D;if("name"in d&&d.name){if(v=r.get(d.name),!v)throw On(Pe.MATCHER_NOT_FOUND,{location:d});D=v.record.name,N=ue(Qo(g.params,v.keys.filter(b=>!b.optional).concat(v.parent?v.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),d.params&&Qo(d.params,v.keys.map(b=>b.name))),k=v.stringify(N)}else if(d.path!=null)k=d.path,v=n.find(b=>b.re.test(k)),v&&(N=v.parse(k),D=v.record.name);else{if(v=g.name?r.get(g.name):n.find(b=>b.re.test(g.path)),!v)throw On(Pe.MATCHER_NOT_FOUND,{location:d,currentLocation:g});D=v.record.name,N=ue({},g.params,d.params),k=v.stringify(N)}const A=[];let R=v;for(;R;)A.unshift(R.record),R=R.parent;return{name:D,path:k,params:N,matched:A,meta:Cp(A)}}e.forEach(d=>i(d));function u(){n.length=0,r.clear()}return{addRoute:i,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:l,getRecordMatcher:s}}function Qo(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Zo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ep(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ep(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function el(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Cp(e){return e.reduce((t,n)=>ue(t,n.meta),{})}function Tp(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;sc(e,t[i])<0?r=i:n=i+1}const s=kp(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function kp(e){let t=e;for(;t=t.parent;)if(ic(t)&&sc(e,t)===0)return t}function ic({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function tl(e){const t=Nt(_i),n=Nt(nc),r=ce(()=>{const a=Y(e.to);return t.resolve(a)}),s=ce(()=>{const{matched:a}=r.value,{length:c}=a,u=a[c-1],d=n.matched;if(!u||!d.length)return-1;const g=d.findIndex(In.bind(null,u));if(g>-1)return g;const v=nl(a[c-2]);return c>1&&nl(u)===v&&d[d.length-1].path!==v?d.findIndex(In.bind(null,a[c-2])):g}),i=ce(()=>s.value>-1&&xp(n.params,r.value.params)),o=ce(()=>s.value>-1&&s.value===n.matched.length-1&&Za(n.params,r.value.params));function l(a={}){if(Pp(a)){const c=t[Y(e.replace)?"replace":"push"](Y(e.to)).catch(Kn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:r,href:ce(()=>r.value.href),isActive:i,isExactActive:o,navigate:l}}function wp(e){return e.length===1?e[0]:e}const Sp=ir({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:tl,setup(e,{slots:t}){const n=Br(tl(e)),{options:r}=Nt(_i),s=ce(()=>({[rl(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[rl(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&wp(t.default(n));return e.custom?i:Jr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),Np=Sp;function Pp(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xp(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!vt(s)||s.length!==r.length||r.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function nl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const rl=(e,t,n)=>e??t??n,Ip=ir({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Nt(Bs),s=ce(()=>e.route||r.value),i=Nt(Xo,0),o=ce(()=>{let c=Y(i);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),l=ce(()=>s.value.matched[o.value]);_r(Xo,ce(()=>o.value+1)),_r(ip,l),_r(Bs,s);const a=it();return fn(()=>[a.value,l.value,e.name],([c,u,d],[g,v,N])=>{u&&(u.instances[d]=c,v&&v!==u&&c&&c===g&&(u.leaveGuards.size||(u.leaveGuards=v.leaveGuards),u.updateGuards.size||(u.updateGuards=v.updateGuards))),c&&u&&(!v||!In(u,v)||!g)&&(u.enterCallbacks[d]||[]).forEach(k=>k(c))},{flush:"post"}),()=>{const c=s.value,u=e.name,d=l.value,g=d&&d.components[u];if(!g)return sl(n.default,{Component:g,route:c});const v=d.props[u],N=v?v===!0?c.params:typeof v=="function"?v(c):v:null,D=Jr(g,ue({},N,t,{onVnodeUnmounted:A=>{A.component.isUnmounted&&(d.instances[u]=null)},ref:a}));return sl(n.default,{Component:D,route:c})||D}}});function sl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Op=Ip;function Lp(e){const t=yp(e.routes,e),n=e.parseQuery||rp,r=e.stringifyQuery||Yo,s=e.history,i=Fn(),o=Fn(),l=Fn(),a=ni(Gt);let c=Gt;_n&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=_s.bind(null,I=>""+I),d=_s.bind(null,Hg),g=_s.bind(null,tr);function v(I,G){let $,K;return ec(I)?($=t.getRecordMatcher(I),K=G):K=I,t.addRoute(K,$)}function N(I){const G=t.getRecordMatcher(I);G&&t.removeRoute(G)}function k(){return t.getRoutes().map(I=>I.record)}function D(I){return!!t.getRecordMatcher(I)}function A(I,G){if(G=ue({},G||a.value),typeof I=="string"){const p=vs(n,I,G.path),T=t.resolve({path:p.path},G),O=s.createHref(p.fullPath);return ue(p,T,{params:g(T.params),hash:tr(p.hash),redirectedFrom:void 0,href:O})}let $;if(I.path!=null)$=ue({},I,{path:vs(n,I.path,G.path).path});else{const p=ue({},I.params);for(const T in p)p[T]==null&&delete p[T];$=ue({},I,{params:d(p)}),G.params=d(G.params)}const K=t.resolve($,G),ne=I.hash||"";K.params=u(g(K.params));const m=Vg(r,ue({},I,{hash:Mg(ne),path:K.path})),_=s.createHref(m);return ue({fullPath:m,hash:ne,query:r===Yo?sp(I.query):I.query||{}},K,{redirectedFrom:void 0,href:_})}function R(I){return typeof I=="string"?vs(n,I,a.value.path):ue({},I)}function b(I,G){if(c!==I)return On(Pe.NAVIGATION_CANCELLED,{from:G,to:I})}function y(I){return F(I)}function L(I){return y(ue(R(I),{replace:!0}))}function x(I,G){const $=I.matched[I.matched.length-1];if($&&$.redirect){const{redirect:K}=$;let ne=typeof K=="function"?K(I,G):K;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=R(ne):{path:ne},ne.params={}),ue({query:I.query,hash:I.hash,params:ne.path!=null?{}:I.params},ne)}}function F(I,G){const $=c=A(I),K=a.value,ne=I.state,m=I.force,_=I.replace===!0,p=x($,K);if(p)return F(ue(R(p),{state:typeof p=="object"?ue({},ne,p.state):ne,force:m,replace:_}),G||$);const T=$;T.redirectedFrom=G;let O;return!m&&Bg(r,K,$)&&(O=On(Pe.NAVIGATION_DUPLICATED,{to:T,from:K}),we(K,K,!0,!1)),(O?Promise.resolve(O):ae(T,K)).catch(P=>Rt(P)?Rt(P,Pe.NAVIGATION_GUARD_REDIRECT)?P:Je(P):se(P,T,K)).then(P=>{if(P){if(Rt(P,Pe.NAVIGATION_GUARD_REDIRECT))return F(ue({replace:_},R(P.to),{state:typeof P.to=="object"?ue({},ne,P.to.state):ne,force:m}),G||T)}else P=Z(T,K,!0,_,ne);return ke(T,K,P),P})}function B(I,G){const $=b(I,G);return $?Promise.reject($):Promise.resolve()}function W(I){const G=tt.values().next().value;return G&&typeof G.runWithContext=="function"?G.runWithContext(I):I()}function ae(I,G){let $;const[K,ne,m]=op(I,G);$=ys(K.reverse(),"beforeRouteLeave",I,G);for(const p of K)p.leaveGuards.forEach(T=>{$.push(Xt(T,I,G))});const _=B.bind(null,I,G);return $.push(_),Re($).then(()=>{$=[];for(const p of i.list())$.push(Xt(p,I,G));return $.push(_),Re($)}).then(()=>{$=ys(ne,"beforeRouteUpdate",I,G);for(const p of ne)p.updateGuards.forEach(T=>{$.push(Xt(T,I,G))});return $.push(_),Re($)}).then(()=>{$=[];for(const p of m)if(p.beforeEnter)if(vt(p.beforeEnter))for(const T of p.beforeEnter)$.push(Xt(T,I,G));else $.push(Xt(p.beforeEnter,I,G));return $.push(_),Re($)}).then(()=>(I.matched.forEach(p=>p.enterCallbacks={}),$=ys(m,"beforeRouteEnter",I,G,W),$.push(_),Re($))).then(()=>{$=[];for(const p of o.list())$.push(Xt(p,I,G));return $.push(_),Re($)}).catch(p=>Rt(p,Pe.NAVIGATION_CANCELLED)?p:Promise.reject(p))}function ke(I,G,$){l.list().forEach(K=>W(()=>K(I,G,$)))}function Z(I,G,$,K,ne){const m=b(I,G);if(m)return m;const _=G===Gt,p=_n?history.state:{};$&&(K||_?s.replace(I.fullPath,ue({scroll:_&&p&&p.scroll},ne)):s.push(I.fullPath,ne)),a.value=I,we(I,G,$,_),Je()}let _e;function ht(){_e||(_e=s.listen((I,G,$)=>{if(!nt.listening)return;const K=A(I),ne=x(K,nt.currentRoute.value);if(ne){F(ue(ne,{replace:!0,force:!0}),K).catch(Kn);return}c=K;const m=a.value;_n&&Qg(Ko(m.fullPath,$.delta),rs()),ae(K,m).catch(_=>Rt(_,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_CANCELLED)?_:Rt(_,Pe.NAVIGATION_GUARD_REDIRECT)?(F(ue(R(_.to),{force:!0}),K).then(p=>{Rt(p,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_DUPLICATED)&&!$.delta&&$.type===$s.pop&&s.go(-1,!1)}).catch(Kn),Promise.reject()):($.delta&&s.go(-$.delta,!1),se(_,K,m))).then(_=>{_=_||Z(K,m,!1),_&&($.delta&&!Rt(_,Pe.NAVIGATION_CANCELLED)?s.go(-$.delta,!1):$.type===$s.pop&&Rt(_,Pe.NAVIGATION_ABORTED|Pe.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),ke(K,m,_)}).catch(Kn)}))}let at=Fn(),de=Fn(),ie;function se(I,G,$){Je(I);const K=de.list();return K.length?K.forEach(ne=>ne(I,G,$)):console.error(I),Promise.reject(I)}function Be(){return ie&&a.value!==Gt?Promise.resolve():new Promise((I,G)=>{at.add([I,G])})}function Je(I){return ie||(ie=!I,ht(),at.list().forEach(([G,$])=>I?$(I):G()),at.reset()),I}function we(I,G,$,K){const{scrollBehavior:ne}=e;if(!_n||!ne)return Promise.resolve();const m=!$&&Zg(Ko(I.fullPath,0))||(K||!$)&&history.state&&history.state.scroll||null;return ri().then(()=>ne(I,G,m)).then(_=>_&&Jg(_)).catch(_=>se(_,I,G))}const Se=I=>s.go(I);let ct;const tt=new Set,nt={currentRoute:a,listening:!0,addRoute:v,removeRoute:N,clearRoutes:t.clearRoutes,hasRoute:D,getRoutes:k,resolve:A,options:e,push:y,replace:L,go:Se,back:()=>Se(-1),forward:()=>Se(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:de.add,isReady:Be,install(I){I.component("RouterLink",Np),I.component("RouterView",Op),I.config.globalProperties.$router=nt,Object.defineProperty(I.config.globalProperties,"$route",{enumerable:!0,get:()=>Y(a)}),_n&&!ct&&a.value===Gt&&(ct=!0,y(s.location).catch(K=>{}));const G={};for(const K in Gt)Object.defineProperty(G,K,{get:()=>a.value[K],enumerable:!0});I.provide(_i,nt),I.provide(nc,Pl(G)),I.provide(Bs,a);const $=I.unmount;tt.add(I),I.unmount=function(){tt.delete(I),tt.size<1&&(c=Gt,_e&&_e(),_e=null,a.value=Gt,ct=!1,ie=!1),$()}}};function Re(I){return I.reduce((G,$)=>G.then(()=>W($)),Promise.resolve())}return nt}const Ap=[{path:"/",name:"Home",component:()=>Sg(()=>import("./HomePage-DjEdExnq.js"),__vite__mapDeps([0,1]),import.meta.url)}],Rp=()=>new URL(".",document.baseURI).pathname,Dp=Lp({history:up(Rp()),routes:Ap}),Fp=Nd({legacy:!1,locale:cg(),fallbackLocale:"en",messages:ag}),vi=Nf(Tg);vi.use(Dp);vi.use(Fp);vi.mount("#app");export{Uc as A,st as F,Sg as _,oe as a,z as b,me as c,Y as d,$u as e,Ee as f,Le as g,Bd as h,ce as i,Jr as j,$e as k,hu as l,Mp as m,ri as n,Yr as o,Hp as p,kf as q,it as r,Xs as s,Ne as t,cr as u,Wp as v,fn as w,Un as x,Up as y,or as z}; diff --git a/main/manager-web/public/generator/index.html b/main/manager-web/public/generator/index.html index 0a5e085ee..1872a8e43 100644 --- a/main/manager-web/public/generator/index.html +++ b/main/manager-web/public/generator/index.html @@ -4,7 +4,7 @@ Xiaozhi AI Customization - +