skill-base 2.0.11 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ function yS(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&
6
6
 
7
7
  Example:
8
8
  - feat: add new feature
9
- - fix: resolve issue`,"publish.cancelBtn":"Cancel","publish.publishBtn":"Publish New Version","publish.submitBtn":"Publish New Version","publish.publishing":"Publishing...","publish.uploading":"Uploading...","publish.preparing":"Preparing...","publish.compressing":"Compressing...","publish.completed":"Completed","publish.uploadFailed":"Upload failed","publish.zipError":"Failed to read zip file","publish.successTitle":"Published Successfully!","publish.viewDetail":"View Details","publish.publishAnother":"Publish Another","publish.filesCount":" files","publish.totalSize":"Total size: ","settings.title":"Account Settings - Skill Base","settings.heading":"Account Settings","settings.subtitle":"// Manage your personal info and credentials","settings.basicInfo":"Basic Info","settings.usernameLabel":"Username","settings.usernameHint":"// Username cannot be changed","settings.nameLabel":"Name","settings.namePlaceholder":"Enter your name","settings.nameHint":"// Optional, displayed as skill author","settings.saveBtn":"Save Changes","settings.saving":"Saving...","settings.saveSuccess":"Saved successfully","settings.saveFailed":"Failed to save","settings.cliSection":"CLI Access","settings.cliDesc":"// Get verification code to login with <code>skb</code> CLI tool.","settings.cliLink":"Get CLI Code","settings.passwordSection":"Change Password","settings.oldPassword":"Current Password","settings.newPassword":"New Password","settings.newPasswordHint":"// At least 6 characters","settings.confirmPassword":"Confirm New Password","settings.changePasswordBtn":"Change Password","settings.changing":"Changing...","settings.loadFailed":"Failed to load user info","settings.usernameLenError":"Username must be 1-50 characters","settings.updateSuccess":"Profile updated","settings.updateFailed":"Update failed","settings.noOldPassword":"Please enter current password","settings.newPassTooShort":"New password must be at least 6 characters","settings.passMismatch":"Passwords do not match","settings.changeSuccess":"Password changed successfully","settings.changeFailed":"Failed to change password","settings.wrongPassword":"Current password is incorrect","diff.title":"Version Diff - Skill Base","diff.breadcrumbCurrent":"Version Diff","diff.versionA":"Version A (Old):","diff.versionB":"Version B (New):","diff.selectVersion":"Select version...","diff.recalculate":"Recalculate","diff.file":"File:","diff.allFiles":"All Files","diff.sideBySide":"Side by Side","diff.unified":"Unified","diff.changedFiles":"Changed Files","diff.back":"Back to Detail","diff.missingId":"Missing Skill ID parameter","diff.loadInfoFailed":"Failed to load Skill info","diff.selectBoth":"Please select two versions to compare","diff.loadVersionsFailed":"Failed to load version list","diff.computing":"Computing differences...","diff.computeFailed":"Failed to compute differences","diff.empty":'Select two versions and click "Recalculate" to view differences',"diff.linesAdded":" lines","diff.linesRemoved":" lines","diff.filesChanged":" files changed","diff.added":"Added","diff.deleted":"Deleted","diff.modified":"Modified","diff.binaryDiff":"Binary file, cannot show differences","diff.pageTitle":"Version Diff - ","diff.old":"Old:","diff.new":"New:","diff.clearSelection":"Clear Selection","diff.split":"Split","diff.unifiedView":"Unified","diff.computingDiff":"Computing...","diff.loadFailed":"Load Failed","diff.backToHome":"Back to Home","file.title":"File Preview - Skill Base","file.breadcrumbFile":"File","file.currentVersion":"Current Version:","file.fileDir":"Files","file.selectFile":"Select a file to preview","file.clickFile":"Click a file on the left to view content","file.download":"Download","file.selectOtherVersion":"Select other version...","file.compare":"Compare","file.back":"Back to Detail","file.missingId":"Missing Skill ID parameter","file.loadFailed":"Load failed","file.binaryFile":"Binary file, cannot preview","file.binaryHint":"Download the zip package to view locally","file.largeFile":"File is large, only showing first 100KB","file.noFile":"Cannot read file","cliCode.title":"CLI Code - Skill Base","cliCode.heading":"CLI Verification Code","cliCode.subtitle":"Enter this code in the CLI tool to complete login","cliCode.generating":"Generating code...","cliCode.expires":" until expiration","cliCode.expired":"Expired","cliCode.copyBtn":"Copy Code","cliCode.copied":"Copied","cliCode.regenerate":"Regenerate","cliCode.hintTitle":"How to use:","cliCode.hintText":"Run <code>skb login</code> in the terminal, then enter the code above to complete CLI login.","cliCode.fromCli":"Please enter the code below after successful login","cliCode.generateFailed":"Failed to generate code","cliCode.genFailed":"Generation failed","cliCode.noCopy":"No code to copy","cliCode.copiedToast":"Code copied to clipboard","cliCode.pressCopy":"Please press Ctrl+C to copy the code","cliCode.newGenerated":"New code generated","cliCode.secureToken":"Generating secure token...","cliCode.usage":"Usage:","cliCode.cliHint":"Run <code>skb login</code> in the terminal, then enter the code above to complete CLI login.","admin.title":"User Management - Skill Base","admin.heading":"User Management","admin.subtitle":"// Manage platform users and permissions","admin.userList":"User List","admin.addUser":"Add User","admin.searchPlaceholder":"Search username...","admin.allStatus":"All Status","admin.active":"Active","admin.disabled":"Disabled","admin.thUsername":"Username","admin.thName":"Name","admin.thRole":"Role","admin.thStatus":"Status","admin.thCreatedAt":"Created At","admin.thActions":"Actions","admin.emptyState":"No user data","admin.prevPage":"Previous","admin.nextPage":"Next","admin.addModal":"Add User","admin.editModal":"Edit User","admin.roleLabel":"Role","admin.roleAdmin":"Admin","admin.roleUser":"User","admin.statusLabel":"Account Status","admin.statusActive":"Account is active","admin.statusDisabled":"Account is disabled","admin.resetPassword":"Reset Password","admin.resetPasswordHint":"Set a new password for user","admin.doReset":"Reset","admin.cancelReset":"Cancel","admin.newPasswordPlaceholder":"Enter new password","admin.cancel":"Cancel","admin.confirmAdd":"Confirm Add","admin.confirmSave":"Save Changes","admin.editUser":"Edit User","admin.fetchError":"Failed to fetch users","admin.addSuccess":"User added successfully","admin.addError":"Failed to add user","admin.editSuccess":"User updated successfully","admin.editError":"Failed to update user","admin.resetSuccess":"Password reset successfully","admin.resetError":"Failed to reset password","admin.usernameRequired":"Please enter username","admin.passwordRequired":"Please enter password","admin.newPasswordRequired":"Please enter new password","admin.close":"Close","admin.name":"Name","admin.password":"Password","admin.generatePassword":"Generate Random Password","admin.toggleVisibility":"Toggle Visibility","admin.adding":"Adding...","admin.saving":"Saving...","admin.resetting":"Resetting...","admin.getUserFailed":"Failed to get user info","admin.loadUsersFailed":"Failed to load user list"};function Mv(t){const e=document.cookie.match(new RegExp("(^| )"+t+"=([^;]+)"));return e&&e[2]?decodeURIComponent(e[2]):null}function kv(t,e,n=365){const r=new Date(Date.now()+n*864e5).toUTCString();document.cookie=t+"="+encodeURIComponent(e)+"; expires="+r+"; path=/"}function Pv(){try{const t=localStorage.getItem("skb-lang");if(t)return t}catch{}return Mv("skb-lang")}const ts=Pv();let cd;ts==="zh"||ts==="en"?cd=ts==="zh":cd=(navigator.language||navigator.languages?.[0]||"en").toLowerCase().startsWith("zh");const ns=me(cd?"zh":"en");function on(){const t=(n,r)=>{let a=(ns.value==="zh"?wv:Lv)[n]||n;return r&&Object.entries(r).forEach(([s,o])=>{a=a.replace(`{${s}}`,String(o))}),a},e=n=>{ns.value=n;try{localStorage.setItem("skb-lang",n)}catch{}kv("skb-lang",n),window.location.reload()};return{t,currentLang:Ie(()=>ns.value),setLang:e}}const Uv={class:"navbar sticky top-0 z-50 bg-base-950/80 backdrop-blur-md border-b border-base-800"},Fv={class:"container max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"},Bv={class:"sb-nav-main"},Gv={class:"sb-nav-links"},Yv={class:"sb-nav-link-prefix"},qv={class:"sb-nav-controls"},Hv=["aria-expanded"],Vv={class:"navbar-user"},zv={class:"lang-switcher-menu"},$v={class:"username"},Wv={class:"navbar-user-menu"},Kv=["hidden"],Qv={class:"sb-nav-mobile-panel"},Xv={class:"sb-nav-mobile-links"},Zv={class:"sb-nav-mobile-marker"},jv=Pt({__name:"SkillBaseNav",props:{items:{default:()=>[{href:"/",label:"Home",i18n:"nav.home"},{href:"/publish",label:"Publish",i18n:"nav.publish"}]},currentPath:{default:"/"}},setup(t){const e=t,n=Mr(),r=Ci(),{currentLang:i,setLang:a}=on(),s=me(!1),o=me(!1),l=me(!1),c=Ie(()=>i.value),{t:d}=on(),u=Ie(()=>(!e.items||!Array.isArray(e.items)||e.items.length===0?[{href:"/",label:"Home",i18n:"nav.home"},{href:"/publish",label:"Publish",i18n:"nav.publish"}]:e.items).map(L=>({...L,label:L.i18n?d(L.i18n):L.label})));function p(D){if(!D)return"/";const[L]=D.split(/[?#]/);return(L||"").replace(/\/index\.html$/,"/").replace(/\/+$/,"")||"/"}function _(D){return p(D)===p(e.currentPath)}function f(){s.value=!s.value}function g(){s.value=!1}function S(){l.value=!l.value,l.value&&(o.value=!1)}function b(){o.value=!o.value,o.value&&(l.value=!1)}function h(D){a(D),l.value=!1}async function v(){await r.logout(),o.value=!1,g(),n.push("/login")}function C(){o.value=!1,l.value=!1}function y(){window.innerWidth>=768&&(s.value=!1)}return Ht(async()=>{document.addEventListener("click",C),window.addEventListener("resize",y),await r.fetchUser()}),ha(()=>{document.removeEventListener("click",C),window.removeEventListener("resize",y)}),(D,L)=>{const O=Bn("router-link");return le(),de("nav",Uv,[m("div",Fv,[m("div",Bv,[Ue(O,{to:"/",class:"sb-nav-brand text-lg tracking-tight select-none cursor-pointer"},{default:it(()=>[...L[4]||(L[4]=[m("svg",{class:"sb-nav-brand-icon",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[m("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),m("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),m("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})],-1),m("span",{class:"font-mono text-neon-400 font-bold drop-shadow-[0_0_8px_rgba(0,255,163,0.4)]"},"Skill",-1),m("span",{class:"text-white font-bold"},"Base",-1)])]),_:1}),m("div",Gv,[(le(!0),de(ke,null,Rt(u.value,N=>(le(),wn(O,{key:N.href,to:N.href,class:Fe(["sb-nav-link",{"is-active":_(N.href)}])},{default:it(()=>[m("span",Yv,X(_(N.href)?"./":""),1),m("span",null,X(N.label),1)]),_:2},1032,["to","class"]))),128))])]),m("div",qv,[m("button",{type:"button",class:"sb-nav-toggle","aria-expanded":s.value,"aria-label":"Toggle navigation",onClick:f},[...L[5]||(L[5]=[m("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("line",{x1:"4",y1:"7",x2:"20",y2:"7"}),m("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),m("line",{x1:"4",y1:"17",x2:"20",y2:"17"})],-1)])],8,Hv),m("div",Vv,[m("div",{class:Fe(["lang-switcher",{active:l.value}])},[m("button",{type:"button",class:"lang-switcher-trigger navbar-surface-btn",onClick:At(S,["stop"])},[L[6]||(L[6]=m("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2"},[m("circle",{cx:"12",cy:"12",r:"10"}),m("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),m("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})],-1)),m("span",null,X(c.value==="zh"?"中文":"English"),1),L[7]||(L[7]=m("svg",{class:"lang-chevron",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},[m("polyline",{points:"6 9 12 15 18 9"})],-1))]),m("div",zv,[m("button",{class:Fe(["lang-switcher-option",{active:c.value==="zh"}]),onClick:L[0]||(L[0]=N=>h("zh"))},"中文",2),m("button",{class:Fe(["lang-switcher-option",{active:c.value==="en"}]),onClick:L[1]||(L[1]=N=>h("en"))},"English",2)])],2),J(r).isLoggedIn?(le(),de("div",{key:0,class:Fe(["navbar-user-dropdown",{active:o.value}])},[m("button",{type:"button",class:"navbar-user-btn navbar-surface-btn",onClick:At(b,["stop"])},[m("span",$v,X(J(r).displayName),1),L[8]||(L[8]=m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("polyline",{points:"6 9 12 15 18 9"})],-1))]),m("div",Wv,[Ue(O,{to:"/settings",class:"navbar-user-menu-item",onClick:L[2]||(L[2]=N=>o.value=!1)},{default:it(()=>[L[9]||(L[9]=m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("circle",{cx:"12",cy:"12",r:"3"}),m("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})],-1)),he(" "+X(J(d)("nav.settings")),1)]),_:1}),J(r).isAdmin?(le(),wn(O,{key:0,to:"/admin/users",class:"navbar-user-menu-item",onClick:L[3]||(L[3]=N=>o.value=!1)},{default:it(()=>[L[10]||(L[10]=m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),m("circle",{cx:"9",cy:"7",r:"4"}),m("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),m("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})],-1)),he(" "+X(J(d)("nav.admin")),1)]),_:1})):ze("",!0),L[12]||(L[12]=m("div",{class:"navbar-user-menu-divider"},null,-1)),m("button",{class:"navbar-user-menu-item navbar-user-logout",onClick:v},[L[11]||(L[11]=m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),m("polyline",{points:"16 17 21 12 16 7"}),m("line",{x1:"21",y1:"12",x2:"9",y2:"12"})],-1)),he(" "+X(J(d)("nav.logout")),1)])])],2)):(le(),wn(O,{key:1,to:"/login",class:"btn btn-primary btn-sm"},{default:it(()=>[he(X(J(d)("nav.login")),1)]),_:1}))])])]),m("div",{class:"sb-nav-mobile",hidden:!s.value},[m("div",Qv,[m("div",Xv,[(le(!0),de(ke,null,Rt(u.value,N=>(le(),wn(O,{key:N.href,to:N.href,class:Fe(["sb-nav-mobile-link",{"is-active":_(N.href)}]),onClick:g},{default:it(()=>[m("span",Zv,X(_(N.href)?"./":"--"),1),m("span",null,X(N.label),1)]),_:2},1032,["to","class"]))),128))])])],8,Kv)])}}}),vn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},Jv=vn(jv,[["__scopeId","data-v-f78274dd"]]),eR={class:"toast-container"},tR={class:"toast__icon"},nR={key:0,viewBox:"0 0 20 20",fill:"currentColor"},rR={key:1,viewBox:"0 0 20 20",fill:"currentColor"},iR={key:2,viewBox:"0 0 20 20",fill:"currentColor"},aR={key:3,viewBox:"0 0 20 20",fill:"currentColor"},sR={class:"toast__content"},oR={class:"toast__message"},lR=["onClick"],cR=Pt({__name:"Toast",setup(t,{expose:e}){const n=me([]);let r=0;const i=(d,u="info",p=3e3)=>{const _=++r,f={id:_,message:d,type:u,duration:p};n.value.push(f),p>0&&setTimeout(()=>{a(_)},p)},a=d=>{const u=n.value.findIndex(p=>p.id===d);u>-1&&n.value.splice(u,1)};return e({show:i,success:(d,u)=>i(d,"success",u),error:(d,u)=>i(d,"error",u),warning:(d,u)=>i(d,"warning",u),info:(d,u)=>i(d,"info",u)}),(d,u)=>(le(),wn(Cb,{to:"body"},[m("div",eR,[Ue(Zh,{name:"toast"},{default:it(()=>[(le(!0),de(ke,null,Rt(n.value,p=>(le(),de("div",{key:p.id,class:Fe(["toast",[`toast--${p.type}`]])},[m("div",tR,[p.type==="success"?(le(),de("svg",nR,[...u[0]||(u[0]=[m("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"},null,-1)])])):p.type==="error"?(le(),de("svg",rR,[...u[1]||(u[1]=[m("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"},null,-1)])])):p.type==="warning"?(le(),de("svg",iR,[...u[2]||(u[2]=[m("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"},null,-1)])])):(le(),de("svg",aR,[...u[3]||(u[3]=[m("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"},null,-1)])]))]),m("div",sR,[m("p",oR,X(p.message),1)]),m("button",{class:"toast__close",onClick:_=>a(p.id)},[...u[4]||(u[4]=[m("svg",{viewBox:"0 0 20 20",fill:"currentColor"},[m("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])],8,lR)],2))),128))]),_:1})])]))}}),dR=vn(cR,[["__scopeId","data-v-b4a0e035"]]),Jt=me(null);function uR(){return{setToastRef:s=>{Jt.value=s},show:(s,o="info",l)=>{Jt.value?.show(s,o,l)},success:(s,o)=>{Jt.value?.success(s,o)},error:(s,o)=>{Jt.value?.error(s,o)},warning:(s,o)=>{Jt.value?.warning(s,o)},info:(s,o)=>{Jt.value?.info(s,o)}}}const rt={show:(t,e="info",n)=>{Jt.value?.show(t,e,n)},success:(t,e)=>{Jt.value?.success(t,e)},error:(t,e)=>{Jt.value?.error(t,e)},warning:(t,e)=>{Jt.value?.warning(t,e)},info:(t,e)=>{Jt.value?.info(t,e)}},_R={id:"app",class:"min-h-screen"},pR=Pt({__name:"App",setup(t){const e=Na(),n=me(null),{setToastRef:r}=uR();Ht(()=>{n.value&&r(n.value)});const i=Ie(()=>!["landing","login","setup"].includes(e.name)),a=Ie(()=>e.path);return(s,o)=>{const l=Bn("router-view");return le(),de("div",_R,[i.value?(le(),wn(Jv,{key:0,"current-path":a.value},null,8,["current-path"])):ze("",!0),Ue(l),Ue(dR,{ref_key:"toastRef",ref:n},null,512)])}}}),Ld=HE("skills",()=>{const t=me([]),e=me(null),n=me(!1),r=me(!1),i=me(null),a=me(""),s=Ie(()=>[...t.value].sort((D,L)=>new Date(L.updated_at).getTime()-new Date(D.updated_at).getTime())),o=Ie(()=>{if(!a.value.trim())return s.value;const D=a.value.toLowerCase();return s.value.filter(L=>L.name.toLowerCase().includes(D)||L.description.toLowerCase().includes(D))}),l=Ie(()=>e.value?e.value.permission==="owner"||e.value.permission==="collaborator":!1),c=Ie(()=>e.value?.permission==="owner"),d=Ie(()=>e.value?.versions||[]);async function u(D){n.value=!0,i.value=null;try{const L=await rr.list(D);return t.value=L.skills,!0}catch(L){return i.value=L.message||"获取 Skill 列表失败",!1}finally{n.value=!1}}async function p(D){r.value=!0,i.value=null,e.value=null;try{const L=await rr.get(D);return e.value=L,!0}catch(L){return i.value=L.message||"获取 Skill 详情失败",e.value=null,!1}finally{r.value=!1}}async function _(D){i.value=null;try{const L=await rr.create(D);return t.value.unshift(L),L}catch(L){throw i.value=L.message||"创建 Skill 失败",L}}async function f(D,L){i.value=null;try{const O=await rr.update(D,L),N=t.value.findIndex(B=>B.id===D);return N!==-1&&(t.value[N]={...t.value[N],...O}),e.value?.id===D&&(e.value={...e.value,...O}),O}catch(O){throw i.value=O.message||"更新 Skill 失败",O}}async function g(D){i.value=null;try{return await rr.delete(D),t.value=t.value.filter(L=>L.id!==D),e.value?.id===D&&(e.value=null),!0}catch(L){return i.value=L.message||"删除 Skill 失败",!1}}async function S(D){try{const L=await Rr.list(D);return e.value?.id===D&&(e.value.versions=L.versions),L.versions}catch(L){return i.value=L.message||"获取版本列表失败",[]}}async function b(D,L){try{return await T_.add(D,L),await p(D),!0}catch(O){return i.value=O.message||"添加协作者失败",!1}}async function h(D,L){try{return await T_.remove(D,L),await p(D),!0}catch(O){return i.value=O.message||"移除协作者失败",!1}}function v(D){a.value=D}function C(){e.value=null}function y(){i.value=null}return{skills:t,currentSkill:e,isLoading:n,isLoadingDetail:r,error:i,searchQuery:a,sortedSkills:s,filteredSkills:o,canEditCurrentSkill:l,isOwner:c,currentVersions:d,fetchSkills:u,fetchSkill:p,createSkill:_,updateSkill:f,deleteSkill:g,fetchVersions:S,addCollaborator:b,removeCollaborator:h,setSearchQuery:v,clearCurrentSkill:C,clearError:y}});function nS(t){if(!t)return"";const e=new Date(t),r=new Date().getTime()-e.getTime(),i=Math.floor(r/(1e3*60*60*24));return i===0?"今天":i===1?"昨天":i<7?`${i} 天前`:i<30?`${Math.floor(i/7)} 周前`:i<365?`${Math.floor(i/30)} 个月前`:`${Math.floor(i/365)} 年前`}function mR(t){return t?new Date(t).toLocaleString("zh-CN",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):""}const gR={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8"},fR={class:"page-header mb-8 text-center"},ER={class:"search-bar"},SR=["placeholder"],bR={key:0,class:"text-sm text-base-400 font-mono mb-6 flex items-center gap-2"},hR={id:"skill-list",class:"skill-grid pb-16"},TR={key:1,class:"empty-state",style:{"grid-column":"1 / -1"}},vR={key:0,class:"empty-state-text"},RR={class:"empty-state-text"},CR={class:"skill-card-header"},yR={class:"skill-card-name"},NR={class:"skill-card-desc"},OR={class:"skill-card-footer"},AR={class:"skill-card-meta"},IR={class:"skill-card-owner"},xR=Pt({__name:"HomeView",setup(t){const e=Ld(),{t:n}=on(),r=me(""),i=me(!0),a=Ie(()=>{if(!r.value)return e.skills;const l=r.value.toLowerCase();return e.skills.filter(c=>c.name.toLowerCase().includes(l)||c.description.toLowerCase().includes(l))});function s(){r.value=""}function o(l){return l?l.length>100?l.substring(0,100)+"...":l:n("state.noDesc")}return Ht(async()=>{await e.fetchSkills(),i.value=!1}),(l,c)=>{const d=Bn("router-link");return le(),de(ke,null,[m("main",gR,[m("div",fR,[c[3]||(c[3]=m("div",{class:"inline-flex items-center justify-center gap-2 px-3 py-1 bg-base-900 border border-base-800 rounded-full mb-6 text-xs font-mono text-neon-400"},[m("span",{class:"w-2 h-2 rounded-full bg-neon-400 animate-pulse"}),he(" Skill Directory ")],-1)),m("div",ER,[c[2]||(c[2]=m("div",{class:"search-icon-wrapper"},[m("span",null,"$"),m("span",null,"grep")],-1)),Ve(m("input",{type:"search",id:"searchInput",placeholder:`"${J(n)("index.searchPlaceholder")}"`,autocomplete:"off","onUpdate:modelValue":c[0]||(c[0]=u=>r.value=u)},null,8,SR),[[at,r.value]]),m("button",{type:"button",class:"clear-btn",id:"clearSearch",onClick:s},[...c[1]||(c[1]=[m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])])]),J(e).skills.length>0?(le(),de("div",bR,[...c[4]||(c[4]=[m("span",{class:"text-neon-400"},"~",-1),m("span",{class:"opacity-50"},"/",-1),m("span",{class:"text-white"},"skills",-1),m("span",{class:"opacity-50 ml-2"},"ls -la",-1)])])):ze("",!0),m("div",hR,[i.value?(le(),de(ke,{key:0},Rt(6,u=>m("div",{key:u,class:"skeleton-card"},[...c[5]||(c[5]=[m("div",{class:"skeleton-title"},null,-1),m("div",{class:"skeleton-desc"},null,-1),m("div",{class:"skeleton-desc-short"},null,-1),m("div",{class:"skeleton-footer"},null,-1)])])),64)):!a.value||a.value.length===0?(le(),de("div",TR,[c[7]||(c[7]=m("div",{class:"empty-state-icon"},"📦",-1)),r.value?(le(),de("p",vR,X(J(n)("index.noResults",{q:r.value})),1)):(le(),de(ke,{key:1},[m("p",RR,X(J(n)("index.noSkills")),1),Ue(d,{to:"/publish",class:"btn btn-primary mt-6"},{default:it(()=>[c[6]||(c[6]=m("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5",class:"mr-1"},[m("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),m("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)),he(" "+X(J(n)("index.publishBtn")),1)]),_:1})],64))])):(le(!0),de(ke,{key:2},Rt(a.value,u=>(le(),wn(d,{key:u.id,to:`/skills/${u.id}`,class:"skill-card"},{default:it(()=>[m("div",CR,[m("h3",yR,X(u.name),1)]),m("p",NR,X(o(u.description)),1),m("div",OR,[m("div",AR,[m("span",IR,[c[8]||(c[8]=m("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),m("circle",{cx:"12",cy:"7",r:"4"})],-1)),he(" "+X(u.owner?.name||u.owner?.username||J(n)("state.unknown")),1)])]),m("span",null,X(J(nS)(u.updated_at)),1)])]),_:2},1032,["to"]))),128))])]),Ue(d,{to:"/publish",class:"fab",title:J(n)("index.fabTitle")},{default:it(()=>[...c[9]||(c[9]=[m("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),m("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])]),_:1},8,["title"])],64)}}}),DR=vn(xR,[["__scopeId","data-v-da3c9440"]]),wR={class:"login-container"},LR={class:"login-shell"},MR={class:"login-card"},kR={class:"login-header"},PR={class:"login-subtitle"},UR={key:0,class:"login-error",role:"alert"},FR={class:"login-field"},BR=["disabled"],GR={class:"login-field"},YR=["disabled"],qR={class:"login-actions"},HR=["disabled"],VR={key:0,class:"btn-devtools-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},zR={key:1,class:"spinner"},$R=Pt({__name:"LoginView",setup(t){const e=Na(),n=Mr(),r=Ci(),{t:i}=on(),a=me(""),s=me("");Ht(async()=>{if(await Dv(),await r.fetchUser()){const c=e.query.redirect||"/";n.push(c)}});async function o(){if(r.clearError(),await r.login(a.value,s.value))if(e.query.from==="cli")n.push("/cli-code?from=cli");else{const d=e.query.redirect||"/";n.push(d)}}return(l,c)=>(le(),de("div",wR,[m("div",LR,[c[7]||(c[7]=dr('<div class="login-brand" data-v-ec9495f3><span class="login-brand-icon" data-v-ec9495f3><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" data-v-ec9495f3><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" data-v-ec9495f3></path><polyline points="3.27 6.96 12 12.01 20.73 6.96" data-v-ec9495f3></polyline><line x1="12" y1="22.08" x2="12" y2="12" data-v-ec9495f3></line></svg></span><span class="login-brand-text" data-v-ec9495f3>Skill Base</span></div>',1)),m("div",MR,[c[6]||(c[6]=m("div",{class:"login-card-badge"},"AUTH-REQ",-1)),m("div",kR,[c[2]||(c[2]=m("h1",{class:"login-title"},[m("span",{class:"login-title-prompt"},">"),he(" Sign In ")],-1)),m("p",PR,X(J(i)("login.subtitle")),1)]),J(r).error?(le(),de("div",UR,X(J(r).error),1)):ze("",!0),m("form",{onSubmit:At(o,["prevent"]),class:"login-form"},[m("div",FR,[c[3]||(c[3]=m("label",{for:"username",class:"login-label"},[m("span",{class:"login-keyword"},"const"),he(),m("span",{class:"login-label-name"},"username"),he(),m("span",{class:"login-equals"},"=")],-1)),m("div",null,[Ve(m("input",{type:"text",id:"username","onUpdate:modelValue":c[0]||(c[0]=d=>a.value=d),placeholder:'"operator"',autocomplete:"username",required:"",disabled:J(r).isLoading,class:"login-input"},null,8,BR),[[at,a.value]])])]),m("div",GR,[c[4]||(c[4]=m("label",{for:"password",class:"login-label"},[m("span",{class:"login-keyword"},"const"),he(),m("span",{class:"login-label-name"},"password"),he(),m("span",{class:"login-equals"},"=")],-1)),m("div",null,[Ve(m("input",{type:"password",id:"password","onUpdate:modelValue":c[1]||(c[1]=d=>s.value=d),placeholder:"••••••••",autocomplete:"current-password",required:"",disabled:J(r).isLoading,class:"login-input"},null,8,YR),[[at,s.value]])])]),m("div",qR,[m("button",{type:"submit",disabled:J(r).isLoading,class:"login-submit"},[J(r).isLoading?ze("",!0):(le(),de("svg",VR,[...c[5]||(c[5]=[m("polygon",{points:"5 3 19 12 5 21 5 3"},null,-1)])])),J(r).isLoading?(le(),de("span",zR)):ze("",!0),m("span",null,X(J(r).isLoading?J(i)("login.loading"):J(i)("login.submit")),1)],8,HR)])],32)]),c[8]||(c[8]=m("div",{class:"login-status"},[m("span",{class:"login-status-dot"}),m("span",{class:"login-status-text"},"Secure Connection Established")],-1))])]))}}),WR=vn($R,[["__scopeId","data-v-ec9495f3"]]),KR="modulepreload",QR=function(t,e){return new URL(t,e).href},v_={},XR=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let c=function(d){return Promise.all(d.map(u=>Promise.resolve(u).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");i=c(n.map(d=>{if(d=QR(d,r),d in v_)return;v_[d]=!0;const u=d.endsWith(".css"),p=u?'[rel="stylesheet"]':"";if(r)for(let f=s.length-1;f>=0;f--){const g=s[f];if(g.href===d&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${p}`))return;const _=document.createElement("link");if(_.rel=u?"stylesheet":KR,u||(_.as="script"),_.crossOrigin="",_.href=d,l&&_.setAttribute("nonce",l),document.head.appendChild(_),u)return new Promise((f,g)=>{_.addEventListener("load",f),_.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return e().catch(a)})};function Md(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var pr=Md();function rS(t){pr=t}var ir={exec:()=>null};function Be(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Mt.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}var ZR=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Mt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},jR=/^(?:[ \t]*(?:\n|$))+/,JR=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,eC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kd=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,iS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,aS=Be(iS).replace(/bull/g,kd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nC=Be(iS).replace(/bull/g,kd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Pd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rC=/^[^\n]+/,Ud=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,iC=Be(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ud).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),aC=Be(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kd).getRegex(),Aa="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Fd=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sC=Be("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Fd).replace("tag",Aa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sS=Be(Pd).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Aa).getRegex(),oC=Be(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sS).getRegex(),Bd={blockquote:oC,code:JR,def:iC,fences:eC,heading:tC,hr:yi,html:sC,lheading:aS,list:aC,newline:jR,paragraph:sS,table:ir,text:rC},R_=Be("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Aa).getRegex(),lC={...Bd,lheading:nC,table:R_,paragraph:Be(Pd).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",R_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Aa).getRegex()},cC={...Bd,html:Be(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fd).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ir,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Be(Pd).replace("hr",yi).replace("heading",` *#{1,6} *[^
9
+ - fix: resolve issue`,"publish.cancelBtn":"Cancel","publish.publishBtn":"Publish New Version","publish.submitBtn":"Publish New Version","publish.publishing":"Publishing...","publish.uploading":"Uploading...","publish.preparing":"Preparing...","publish.compressing":"Compressing...","publish.completed":"Completed","publish.uploadFailed":"Upload failed","publish.zipError":"Failed to read zip file","publish.successTitle":"Published Successfully!","publish.viewDetail":"View Details","publish.publishAnother":"Publish Another","publish.filesCount":" files","publish.totalSize":"Total size: ","settings.title":"Account Settings - Skill Base","settings.heading":"Account Settings","settings.subtitle":"// Manage your personal info and credentials","settings.basicInfo":"Basic Info","settings.usernameLabel":"Username","settings.usernameHint":"// Username cannot be changed","settings.nameLabel":"Name","settings.namePlaceholder":"Enter your name","settings.nameHint":"// Optional, displayed as skill author","settings.saveBtn":"Save Changes","settings.saving":"Saving...","settings.saveSuccess":"Saved successfully","settings.saveFailed":"Failed to save","settings.cliSection":"CLI Access","settings.cliDesc":"// Get verification code to login with <code>skb</code> CLI tool.","settings.cliLink":"Get CLI Code","settings.passwordSection":"Change Password","settings.oldPassword":"Current Password","settings.newPassword":"New Password","settings.newPasswordHint":"// At least 6 characters","settings.confirmPassword":"Confirm New Password","settings.changePasswordBtn":"Change Password","settings.changing":"Changing...","settings.loadFailed":"Failed to load user info","settings.usernameLenError":"Username must be 1-50 characters","settings.updateSuccess":"Profile updated","settings.updateFailed":"Update failed","settings.noOldPassword":"Please enter current password","settings.newPassTooShort":"New password must be at least 6 characters","settings.passMismatch":"Passwords do not match","settings.changeSuccess":"Password changed successfully","settings.changeFailed":"Failed to change password","settings.wrongPassword":"Current password is incorrect","diff.title":"Version Diff - Skill Base","diff.breadcrumbCurrent":"Version Diff","diff.versionA":"Version A (Old):","diff.versionB":"Version B (New):","diff.selectVersion":"Select version...","diff.recalculate":"Recalculate","diff.file":"File:","diff.allFiles":"All Files","diff.sideBySide":"Side by Side","diff.unified":"Unified","diff.changedFiles":"Changed Files","diff.back":"Back to Detail","diff.missingId":"Missing Skill ID parameter","diff.loadInfoFailed":"Failed to load Skill info","diff.selectBoth":"Please select two versions to compare","diff.loadVersionsFailed":"Failed to load version list","diff.computing":"Computing differences...","diff.computeFailed":"Failed to compute differences","diff.empty":'Select two versions and click "Recalculate" to view differences',"diff.linesAdded":" lines","diff.linesRemoved":" lines","diff.filesChanged":" files changed","diff.added":"Added","diff.deleted":"Deleted","diff.modified":"Modified","diff.binaryDiff":"Binary file, cannot show differences","diff.pageTitle":"Version Diff - ","diff.old":"Old:","diff.new":"New:","diff.clearSelection":"Clear Selection","diff.split":"Split","diff.unifiedView":"Unified","diff.computingDiff":"Computing...","diff.loadFailed":"Load Failed","diff.backToHome":"Back to Home","file.title":"File Preview - Skill Base","file.breadcrumbFile":"File","file.currentVersion":"Current Version:","file.fileDir":"Files","file.selectFile":"Select a file to preview","file.clickFile":"Click a file on the left to view content","file.download":"Download","file.selectOtherVersion":"Select other version...","file.compare":"Compare","file.back":"Back to Detail","file.missingId":"Missing Skill ID parameter","file.loadFailed":"Load failed","file.binaryFile":"Binary file, cannot preview","file.binaryHint":"Download the zip package to view locally","file.largeFile":"File is large, only showing first 100KB","file.noFile":"Cannot read file","cliCode.title":"CLI Code - Skill Base","cliCode.heading":"CLI Verification Code","cliCode.subtitle":"Enter this code in the CLI tool to complete login","cliCode.generating":"Generating code...","cliCode.expires":" until expiration","cliCode.expired":"Expired","cliCode.copyBtn":"Copy Code","cliCode.copied":"Copied","cliCode.regenerate":"Regenerate","cliCode.hintTitle":"How to use:","cliCode.hintText":"Run <code>skb login</code> in the terminal, then enter the code above to complete CLI login.","cliCode.fromCli":"Please enter the code below after successful login","cliCode.generateFailed":"Failed to generate code","cliCode.genFailed":"Generation failed","cliCode.noCopy":"No code to copy","cliCode.copiedToast":"Code copied to clipboard","cliCode.pressCopy":"Please press Ctrl+C to copy the code","cliCode.newGenerated":"New code generated","cliCode.secureToken":"Generating secure token...","cliCode.usage":"Usage:","cliCode.cliHint":"Run <code>skb login</code> in the terminal, then enter the code above to complete CLI login.","admin.title":"User Management - Skill Base","admin.heading":"User Management","admin.subtitle":"// Manage platform users and permissions","admin.userList":"User List","admin.addUser":"Add User","admin.searchPlaceholder":"Search username...","admin.allStatus":"All Status","admin.active":"Active","admin.disabled":"Disabled","admin.thUsername":"Username","admin.thName":"Name","admin.thRole":"Role","admin.thStatus":"Status","admin.thCreatedAt":"Created At","admin.thActions":"Actions","admin.emptyState":"No user data","admin.prevPage":"Previous","admin.nextPage":"Next","admin.addModal":"Add User","admin.editModal":"Edit User","admin.roleLabel":"Role","admin.roleAdmin":"Admin","admin.roleUser":"User","admin.statusLabel":"Account Status","admin.statusActive":"Account is active","admin.statusDisabled":"Account is disabled","admin.resetPassword":"Reset Password","admin.resetPasswordHint":"Set a new password for user","admin.doReset":"Reset","admin.cancelReset":"Cancel","admin.newPasswordPlaceholder":"Enter new password","admin.cancel":"Cancel","admin.confirmAdd":"Confirm Add","admin.confirmSave":"Save Changes","admin.editUser":"Edit User","admin.fetchError":"Failed to fetch users","admin.addSuccess":"User added successfully","admin.addError":"Failed to add user","admin.editSuccess":"User updated successfully","admin.editError":"Failed to update user","admin.resetSuccess":"Password reset successfully","admin.resetError":"Failed to reset password","admin.usernameRequired":"Please enter username","admin.passwordRequired":"Please enter password","admin.newPasswordRequired":"Please enter new password","admin.close":"Close","admin.name":"Name","admin.password":"Password","admin.generatePassword":"Generate Random Password","admin.toggleVisibility":"Toggle Visibility","admin.adding":"Adding...","admin.saving":"Saving...","admin.resetting":"Resetting...","admin.getUserFailed":"Failed to get user info","admin.loadUsersFailed":"Failed to load user list"};function Mv(t){const e=document.cookie.match(new RegExp("(^| )"+t+"=([^;]+)"));return e&&e[2]?decodeURIComponent(e[2]):null}function kv(t,e,n=365){const r=new Date(Date.now()+n*864e5).toUTCString();document.cookie=t+"="+encodeURIComponent(e)+"; expires="+r+"; path=/"}function Pv(){try{const t=localStorage.getItem("skb-lang");if(t)return t}catch{}return Mv("skb-lang")}const ts=Pv();let cd;ts==="zh"||ts==="en"?cd=ts==="zh":cd=(navigator.language||navigator.languages?.[0]||"en").toLowerCase().startsWith("zh");const ns=me(cd?"zh":"en");function on(){const t=(n,r)=>{let a=(ns.value==="zh"?wv:Lv)[n]||n;return r&&Object.entries(r).forEach(([s,o])=>{a=a.replace(`{${s}}`,String(o))}),a},e=n=>{ns.value=n;try{localStorage.setItem("skb-lang",n)}catch{}kv("skb-lang",n),window.location.reload()};return{t,currentLang:Ie(()=>ns.value),setLang:e}}const Uv={class:"navbar sticky top-0 z-50 bg-base-950/80 backdrop-blur-md border-b border-base-800"},Fv={class:"container max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"},Bv={class:"sb-nav-main"},Gv={class:"sb-nav-links"},Yv={class:"sb-nav-link-prefix"},qv={class:"sb-nav-controls"},Hv=["aria-expanded"],Vv={class:"navbar-user"},zv={class:"lang-switcher-menu"},$v={class:"username"},Wv={class:"navbar-user-menu"},Kv=["hidden"],Qv={class:"sb-nav-mobile-panel"},Xv={class:"sb-nav-mobile-links"},Zv={class:"sb-nav-mobile-marker"},jv=Pt({__name:"SkillBaseNav",props:{items:{default:()=>[{href:"/",label:"Home",i18n:"nav.home"},{href:"/publish",label:"Publish",i18n:"nav.publish"}]},currentPath:{default:"/"}},setup(t){const e=t,n=Mr(),r=Ci(),{currentLang:i,setLang:a}=on(),s=me(!1),o=me(!1),l=me(!1),c=Ie(()=>i.value),{t:d}=on(),u=Ie(()=>(!e.items||!Array.isArray(e.items)||e.items.length===0?[{href:"/",label:"Home",i18n:"nav.home"},{href:"/publish",label:"Publish",i18n:"nav.publish"}]:e.items).map(L=>({...L,label:L.i18n?d(L.i18n):L.label})));function p(D){if(!D)return"/";const[L]=D.split(/[?#]/);return(L||"").replace(/\/index\.html$/,"/").replace(/\/+$/,"")||"/"}function _(D){return p(D)===p(e.currentPath)}function f(){s.value=!s.value}function g(){s.value=!1}function S(){l.value=!l.value,l.value&&(o.value=!1)}function b(){o.value=!o.value,o.value&&(l.value=!1)}function h(D){a(D),l.value=!1}async function v(){await r.logout(),o.value=!1,g(),n.push("/login")}function C(){o.value=!1,l.value=!1}function y(){window.innerWidth>=768&&(s.value=!1)}return Ht(async()=>{document.addEventListener("click",C),window.addEventListener("resize",y),await r.fetchUser()}),ha(()=>{document.removeEventListener("click",C),window.removeEventListener("resize",y)}),(D,L)=>{const O=Bn("router-link");return le(),de("nav",Uv,[m("div",Fv,[m("div",Bv,[Ue(O,{to:"/",class:"sb-nav-brand text-lg tracking-tight select-none cursor-pointer"},{default:it(()=>[...L[4]||(L[4]=[m("svg",{class:"sb-nav-brand-icon",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[m("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),m("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),m("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})],-1),m("span",{class:"font-mono text-neon-400 font-bold drop-shadow-[0_0_8px_rgba(0,255,163,0.4)]"},"Skill",-1),m("span",{class:"text-white font-bold"},"Base",-1)])]),_:1}),m("div",Gv,[(le(!0),de(ke,null,Rt(u.value,N=>(le(),wn(O,{key:N.href,to:N.href,class:Fe(["sb-nav-link",{"is-active":_(N.href)}])},{default:it(()=>[m("span",Yv,X(_(N.href)?"./":""),1),m("span",null,X(N.label),1)]),_:2},1032,["to","class"]))),128))])]),m("div",qv,[m("button",{type:"button",class:"sb-nav-toggle","aria-expanded":s.value,"aria-label":"Toggle navigation",onClick:f},[...L[5]||(L[5]=[m("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("line",{x1:"4",y1:"7",x2:"20",y2:"7"}),m("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),m("line",{x1:"4",y1:"17",x2:"20",y2:"17"})],-1)])],8,Hv),m("div",Vv,[m("div",{class:Fe(["lang-switcher",{active:l.value}])},[m("button",{type:"button",class:"lang-switcher-trigger navbar-surface-btn",onClick:At(S,["stop"])},[L[6]||(L[6]=m("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.2"},[m("circle",{cx:"12",cy:"12",r:"10"}),m("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),m("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})],-1)),m("span",null,X(c.value==="zh"?"中文":"English"),1),L[7]||(L[7]=m("svg",{class:"lang-chevron",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},[m("polyline",{points:"6 9 12 15 18 9"})],-1))]),m("div",zv,[m("button",{class:Fe(["lang-switcher-option",{active:c.value==="zh"}]),onClick:L[0]||(L[0]=N=>h("zh"))},"中文",2),m("button",{class:Fe(["lang-switcher-option",{active:c.value==="en"}]),onClick:L[1]||(L[1]=N=>h("en"))},"English",2)])],2),J(r).isLoggedIn?(le(),de("div",{key:0,class:Fe(["navbar-user-dropdown",{active:o.value}])},[m("button",{type:"button",class:"navbar-user-btn navbar-surface-btn",onClick:At(b,["stop"])},[m("span",$v,X(J(r).displayName),1),L[8]||(L[8]=m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("polyline",{points:"6 9 12 15 18 9"})],-1))]),m("div",Wv,[Ue(O,{to:"/settings",class:"navbar-user-menu-item",onClick:L[2]||(L[2]=N=>o.value=!1)},{default:it(()=>[L[9]||(L[9]=m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("circle",{cx:"12",cy:"12",r:"3"}),m("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})],-1)),he(" "+X(J(d)("nav.settings")),1)]),_:1}),J(r).isAdmin?(le(),wn(O,{key:0,to:"/admin/users",class:"navbar-user-menu-item",onClick:L[3]||(L[3]=N=>o.value=!1)},{default:it(()=>[L[10]||(L[10]=m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),m("circle",{cx:"9",cy:"7",r:"4"}),m("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),m("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})],-1)),he(" "+X(J(d)("nav.admin")),1)]),_:1})):ze("",!0),L[12]||(L[12]=m("div",{class:"navbar-user-menu-divider"},null,-1)),m("button",{class:"navbar-user-menu-item navbar-user-logout",onClick:v},[L[11]||(L[11]=m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),m("polyline",{points:"16 17 21 12 16 7"}),m("line",{x1:"21",y1:"12",x2:"9",y2:"12"})],-1)),he(" "+X(J(d)("nav.logout")),1)])])],2)):(le(),wn(O,{key:1,to:"/login",class:"btn btn-primary btn-sm"},{default:it(()=>[he(X(J(d)("nav.login")),1)]),_:1}))])])]),m("div",{class:"sb-nav-mobile",hidden:!s.value},[m("div",Qv,[m("div",Xv,[(le(!0),de(ke,null,Rt(u.value,N=>(le(),wn(O,{key:N.href,to:N.href,class:Fe(["sb-nav-mobile-link",{"is-active":_(N.href)}]),onClick:g},{default:it(()=>[m("span",Zv,X(_(N.href)?"./":"--"),1),m("span",null,X(N.label),1)]),_:2},1032,["to","class"]))),128))])])],8,Kv)])}}}),vn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},Jv=vn(jv,[["__scopeId","data-v-f78274dd"]]),eR={class:"toast-container"},tR={class:"toast__icon"},nR={key:0,viewBox:"0 0 20 20",fill:"currentColor"},rR={key:1,viewBox:"0 0 20 20",fill:"currentColor"},iR={key:2,viewBox:"0 0 20 20",fill:"currentColor"},aR={key:3,viewBox:"0 0 20 20",fill:"currentColor"},sR={class:"toast__content"},oR={class:"toast__message"},lR=["onClick"],cR=Pt({__name:"Toast",setup(t,{expose:e}){const n=me([]);let r=0;const i=(d,u="info",p=3e3)=>{const _=++r,f={id:_,message:d,type:u,duration:p};n.value.push(f),p>0&&setTimeout(()=>{a(_)},p)},a=d=>{const u=n.value.findIndex(p=>p.id===d);u>-1&&n.value.splice(u,1)};return e({show:i,success:(d,u)=>i(d,"success",u),error:(d,u)=>i(d,"error",u),warning:(d,u)=>i(d,"warning",u),info:(d,u)=>i(d,"info",u)}),(d,u)=>(le(),wn(Cb,{to:"body"},[m("div",eR,[Ue(Zh,{name:"toast"},{default:it(()=>[(le(!0),de(ke,null,Rt(n.value,p=>(le(),de("div",{key:p.id,class:Fe(["toast",[`toast--${p.type}`]])},[m("div",tR,[p.type==="success"?(le(),de("svg",nR,[...u[0]||(u[0]=[m("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"},null,-1)])])):p.type==="error"?(le(),de("svg",rR,[...u[1]||(u[1]=[m("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"},null,-1)])])):p.type==="warning"?(le(),de("svg",iR,[...u[2]||(u[2]=[m("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"},null,-1)])])):(le(),de("svg",aR,[...u[3]||(u[3]=[m("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"},null,-1)])]))]),m("div",sR,[m("p",oR,X(p.message),1)]),m("button",{class:"toast__close",onClick:_=>a(p.id)},[...u[4]||(u[4]=[m("svg",{viewBox:"0 0 20 20",fill:"currentColor"},[m("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])],8,lR)],2))),128))]),_:1})])]))}}),dR=vn(cR,[["__scopeId","data-v-b4a0e035"]]),Jt=me(null);function uR(){return{setToastRef:s=>{Jt.value=s},show:(s,o="info",l)=>{Jt.value?.show(s,o,l)},success:(s,o)=>{Jt.value?.success(s,o)},error:(s,o)=>{Jt.value?.error(s,o)},warning:(s,o)=>{Jt.value?.warning(s,o)},info:(s,o)=>{Jt.value?.info(s,o)}}}const rt={show:(t,e="info",n)=>{Jt.value?.show(t,e,n)},success:(t,e)=>{Jt.value?.success(t,e)},error:(t,e)=>{Jt.value?.error(t,e)},warning:(t,e)=>{Jt.value?.warning(t,e)},info:(t,e)=>{Jt.value?.info(t,e)}},_R={id:"app",class:"min-h-screen"},pR=Pt({__name:"App",setup(t){const e=Na(),n=me(null),{setToastRef:r}=uR();Ht(()=>{n.value&&r(n.value)});const i=Ie(()=>!["landing","login","setup"].includes(e.name)),a=Ie(()=>e.path);return(s,o)=>{const l=Bn("router-view");return le(),de("div",_R,[i.value?(le(),wn(Jv,{key:0,"current-path":a.value},null,8,["current-path"])):ze("",!0),Ue(l),Ue(dR,{ref_key:"toastRef",ref:n},null,512)])}}}),Ld=HE("skills",()=>{const t=me([]),e=me(null),n=me(!1),r=me(!1),i=me(null),a=me(""),s=Ie(()=>[...t.value].sort((D,L)=>new Date(L.updated_at).getTime()-new Date(D.updated_at).getTime())),o=Ie(()=>{if(!a.value.trim())return s.value;const D=a.value.toLowerCase();return s.value.filter(L=>L.name.toLowerCase().includes(D)||L.description.toLowerCase().includes(D))}),l=Ie(()=>e.value?e.value.permission==="owner"||e.value.permission==="collaborator":!1),c=Ie(()=>e.value?.permission==="owner"),d=Ie(()=>e.value?.versions||[]);async function u(D){n.value=!0,i.value=null;try{const L=await rr.list(D);return t.value=L.skills,!0}catch(L){return i.value=L.message||"获取 Skill 列表失败",!1}finally{n.value=!1}}async function p(D){r.value=!0,i.value=null,e.value=null;try{const L=await rr.get(D);return e.value=L,!0}catch(L){return i.value=L.message||"获取 Skill 详情失败",e.value=null,!1}finally{r.value=!1}}async function _(D){i.value=null;try{const L=await rr.create(D);return t.value.unshift(L),L}catch(L){throw i.value=L.message||"创建 Skill 失败",L}}async function f(D,L){i.value=null;try{const O=await rr.update(D,L),N=t.value.findIndex(B=>B.id===D);return N!==-1&&(t.value[N]={...t.value[N],...O}),e.value?.id===D&&(e.value={...e.value,...O}),O}catch(O){throw i.value=O.message||"更新 Skill 失败",O}}async function g(D){i.value=null;try{return await rr.delete(D),t.value=t.value.filter(L=>L.id!==D),e.value?.id===D&&(e.value=null),!0}catch(L){return i.value=L.message||"删除 Skill 失败",!1}}async function S(D){try{const L=await Rr.list(D);return e.value?.id===D&&(e.value.versions=L.versions),L.versions}catch(L){return i.value=L.message||"获取版本列表失败",[]}}async function b(D,L){try{return await T_.add(D,L),await p(D),!0}catch(O){return i.value=O.message||"添加协作者失败",!1}}async function h(D,L){try{return await T_.remove(D,L),await p(D),!0}catch(O){return i.value=O.message||"移除协作者失败",!1}}function v(D){a.value=D}function C(){e.value=null}function y(){i.value=null}return{skills:t,currentSkill:e,isLoading:n,isLoadingDetail:r,error:i,searchQuery:a,sortedSkills:s,filteredSkills:o,canEditCurrentSkill:l,isOwner:c,currentVersions:d,fetchSkills:u,fetchSkill:p,createSkill:_,updateSkill:f,deleteSkill:g,fetchVersions:S,addCollaborator:b,removeCollaborator:h,setSearchQuery:v,clearCurrentSkill:C,clearError:y}});function nS(t){if(!t)return"";const e=new Date(t),r=new Date().getTime()-e.getTime(),i=Math.floor(r/(1e3*60*60*24));return i===0?"今天":i===1?"昨天":i<7?`${i} 天前`:i<30?`${Math.floor(i/7)} 周前`:i<365?`${Math.floor(i/30)} 个月前`:`${Math.floor(i/365)} 年前`}function mR(t){return t?new Date(t).toLocaleString("zh-CN",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):""}const gR={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8"},fR={class:"page-header mb-8 text-center"},ER={class:"search-bar"},SR=["placeholder"],bR={key:0,class:"text-sm text-base-400 font-mono mb-6 flex items-center gap-2"},hR={id:"skill-list",class:"skill-grid pb-16"},TR={key:1,class:"empty-state",style:{"grid-column":"1 / -1"}},vR={key:0,class:"empty-state-text"},RR={class:"empty-state-text"},CR={class:"skill-card-header"},yR={class:"skill-card-name"},NR={class:"skill-card-desc"},OR={class:"skill-card-footer"},AR={class:"skill-card-meta"},IR={class:"skill-card-owner"},xR=Pt({__name:"HomeView",setup(t){const e=Ld(),{t:n}=on(),r=me(""),i=me(!0),a=Ie(()=>{if(!r.value)return e.skills;const l=r.value.toLowerCase();return e.skills.filter(c=>c.name.toLowerCase().includes(l)||c.description.toLowerCase().includes(l))});function s(){r.value=""}function o(l){return l?l.length>100?l.substring(0,100)+"...":l:n("state.noDesc")}return Ht(async()=>{await e.fetchSkills(),i.value=!1}),(l,c)=>{const d=Bn("router-link");return le(),de(ke,null,[m("main",gR,[m("div",fR,[c[3]||(c[3]=m("div",{class:"inline-flex items-center justify-center gap-2 px-3 py-1 bg-base-900 border border-base-800 rounded-full mb-6 text-xs font-mono text-neon-400"},[m("span",{class:"w-2 h-2 rounded-full bg-neon-400 animate-pulse"}),he(" Skill Directory ")],-1)),m("div",ER,[c[2]||(c[2]=m("div",{class:"search-icon-wrapper"},[m("span",null,"$"),m("span",null,"grep")],-1)),Ve(m("input",{type:"search",id:"searchInput",placeholder:`"${J(n)("index.searchPlaceholder")}"`,autocomplete:"off","onUpdate:modelValue":c[0]||(c[0]=u=>r.value=u)},null,8,SR),[[at,r.value]]),m("button",{type:"button",class:"clear-btn",id:"clearSearch",onClick:s},[...c[1]||(c[1]=[m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])])])]),J(e).skills.length>0?(le(),de("div",bR,[...c[4]||(c[4]=[m("span",{class:"text-neon-400"},"~",-1),m("span",{class:"opacity-50"},"/",-1),m("span",{class:"text-white"},"skills",-1),m("span",{class:"opacity-50 ml-2"},"ls -la",-1)])])):ze("",!0),m("div",hR,[i.value?(le(),de(ke,{key:0},Rt(6,u=>m("div",{key:u,class:"skeleton-card"},[...c[5]||(c[5]=[m("div",{class:"skeleton-title"},null,-1),m("div",{class:"skeleton-desc"},null,-1),m("div",{class:"skeleton-desc-short"},null,-1),m("div",{class:"skeleton-footer"},null,-1)])])),64)):!a.value||a.value.length===0?(le(),de("div",TR,[c[7]||(c[7]=m("div",{class:"empty-state-icon"},"📦",-1)),r.value?(le(),de("p",vR,X(J(n)("index.noResults",{q:r.value})),1)):(le(),de(ke,{key:1},[m("p",RR,X(J(n)("index.noSkills")),1),Ue(d,{to:"/publish",class:"btn btn-primary mt-6"},{default:it(()=>[c[6]||(c[6]=m("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5",class:"mr-1"},[m("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),m("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)),he(" "+X(J(n)("index.publishBtn")),1)]),_:1})],64))])):(le(!0),de(ke,{key:2},Rt(a.value,u=>(le(),wn(d,{key:u.id,to:`/skills/${u.id}`,class:"skill-card"},{default:it(()=>[m("div",CR,[m("h3",yR,X(u.name),1)]),m("p",NR,X(o(u.description)),1),m("div",OR,[m("div",AR,[m("span",IR,[c[8]||(c[8]=m("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),m("circle",{cx:"12",cy:"7",r:"4"})],-1)),he(" "+X(u.owner?.name||u.owner?.username||J(n)("state.unknown")),1)])]),m("span",null,X(J(nS)(u.updated_at)),1)])]),_:2},1032,["to"]))),128))])]),Ue(d,{to:"/publish",class:"fab",title:J(n)("index.fabTitle")},{default:it(()=>[...c[9]||(c[9]=[m("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),m("line",{x1:"5",y1:"12",x2:"19",y2:"12"})],-1)])]),_:1},8,["title"])],64)}}}),DR=vn(xR,[["__scopeId","data-v-da3c9440"]]),wR={class:"login-container"},LR={class:"login-shell"},MR={class:"login-card"},kR={class:"login-header"},PR={class:"login-subtitle"},UR={key:0,class:"login-error",role:"alert"},FR={class:"login-field"},BR=["disabled"],GR={class:"login-field"},YR=["disabled"],qR={class:"login-actions"},HR=["disabled"],VR={key:0,class:"btn-devtools-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},zR={key:1,class:"spinner"},$R=Pt({__name:"LoginView",setup(t){const e=Na(),n=Mr(),r=Ci(),{t:i}=on(),a=me(""),s=me("");Ht(async()=>{if(await Dv(),await r.fetchUser())if(e.query.from==="cli")n.push("/cli-code?from=cli");else{const c=e.query.redirect||"/";n.push(c)}});async function o(){if(r.clearError(),await r.login(a.value,s.value))if(e.query.from==="cli")n.push("/cli-code?from=cli");else{const d=e.query.redirect||"/";n.push(d)}}return(l,c)=>(le(),de("div",wR,[m("div",LR,[c[7]||(c[7]=dr('<div class="login-brand" data-v-66bc928a><span class="login-brand-icon" data-v-66bc928a><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" data-v-66bc928a><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" data-v-66bc928a></path><polyline points="3.27 6.96 12 12.01 20.73 6.96" data-v-66bc928a></polyline><line x1="12" y1="22.08" x2="12" y2="12" data-v-66bc928a></line></svg></span><span class="login-brand-text" data-v-66bc928a>Skill Base</span></div>',1)),m("div",MR,[c[6]||(c[6]=m("div",{class:"login-card-badge"},"AUTH-REQ",-1)),m("div",kR,[c[2]||(c[2]=m("h1",{class:"login-title"},[m("span",{class:"login-title-prompt"},">"),he(" Sign In ")],-1)),m("p",PR,X(J(i)("login.subtitle")),1)]),J(r).error?(le(),de("div",UR,X(J(r).error),1)):ze("",!0),m("form",{onSubmit:At(o,["prevent"]),class:"login-form"},[m("div",FR,[c[3]||(c[3]=m("label",{for:"username",class:"login-label"},[m("span",{class:"login-keyword"},"const"),he(),m("span",{class:"login-label-name"},"username"),he(),m("span",{class:"login-equals"},"=")],-1)),m("div",null,[Ve(m("input",{type:"text",id:"username","onUpdate:modelValue":c[0]||(c[0]=d=>a.value=d),placeholder:'"operator"',autocomplete:"username",required:"",disabled:J(r).isLoading,class:"login-input"},null,8,BR),[[at,a.value]])])]),m("div",GR,[c[4]||(c[4]=m("label",{for:"password",class:"login-label"},[m("span",{class:"login-keyword"},"const"),he(),m("span",{class:"login-label-name"},"password"),he(),m("span",{class:"login-equals"},"=")],-1)),m("div",null,[Ve(m("input",{type:"password",id:"password","onUpdate:modelValue":c[1]||(c[1]=d=>s.value=d),placeholder:"••••••••",autocomplete:"current-password",required:"",disabled:J(r).isLoading,class:"login-input"},null,8,YR),[[at,s.value]])])]),m("div",qR,[m("button",{type:"submit",disabled:J(r).isLoading,class:"login-submit"},[J(r).isLoading?ze("",!0):(le(),de("svg",VR,[...c[5]||(c[5]=[m("polygon",{points:"5 3 19 12 5 21 5 3"},null,-1)])])),J(r).isLoading?(le(),de("span",zR)):ze("",!0),m("span",null,X(J(r).isLoading?J(i)("login.loading"):J(i)("login.submit")),1)],8,HR)])],32)]),c[8]||(c[8]=m("div",{class:"login-status"},[m("span",{class:"login-status-dot"}),m("span",{class:"login-status-text"},"Secure Connection Established")],-1))])]))}}),WR=vn($R,[["__scopeId","data-v-66bc928a"]]),KR="modulepreload",QR=function(t,e){return new URL(t,e).href},v_={},XR=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let c=function(d){return Promise.all(d.map(u=>Promise.resolve(u).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");i=c(n.map(d=>{if(d=QR(d,r),d in v_)return;v_[d]=!0;const u=d.endsWith(".css"),p=u?'[rel="stylesheet"]':"";if(r)for(let f=s.length-1;f>=0;f--){const g=s[f];if(g.href===d&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${p}`))return;const _=document.createElement("link");if(_.rel=u?"stylesheet":KR,u||(_.as="script"),_.crossOrigin="",_.href=d,l&&_.setAttribute("nonce",l),document.head.appendChild(_),u)return new Promise((f,g)=>{_.addEventListener("load",f),_.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return e().catch(a)})};function Md(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var pr=Md();function rS(t){pr=t}var ir={exec:()=>null};function Be(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Mt.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}var ZR=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Mt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},jR=/^(?:[ \t]*(?:\n|$))+/,JR=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,eC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kd=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,iS=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,aS=Be(iS).replace(/bull/g,kd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nC=Be(iS).replace(/bull/g,kd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Pd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rC=/^[^\n]+/,Ud=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,iC=Be(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ud).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),aC=Be(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,kd).getRegex(),Aa="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Fd=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sC=Be("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Fd).replace("tag",Aa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sS=Be(Pd).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Aa).getRegex(),oC=Be(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sS).getRegex(),Bd={blockquote:oC,code:JR,def:iC,fences:eC,heading:tC,hr:yi,html:sC,lheading:aS,list:aC,newline:jR,paragraph:sS,table:ir,text:rC},R_=Be("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Aa).getRegex(),lC={...Bd,lheading:nC,table:R_,paragraph:Be(Pd).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",R_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Aa).getRegex()},cC={...Bd,html:Be(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fd).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ir,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Be(Pd).replace("hr",yi).replace("heading",` *#{1,6} *[^
10
10
  ]`).replace("lheading",aS).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},dC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,uC=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oS=/^( {2,}|\\)\n(?!\s*$)/,_C=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,kr=/[\p{P}\p{S}]/u,Ia=/[\s\p{P}\p{S}]/u,Gd=/[^\s\p{P}\p{S}]/u,pC=Be(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ia).getRegex(),lS=/(?!~)[\p{P}\p{S}]/u,mC=/(?!~)[\s\p{P}\p{S}]/u,gC=/(?:[^\s\p{P}\p{S}]|~)/u,fC=Be(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ZR?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),cS=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,EC=Be(cS,"u").replace(/punct/g,kr).getRegex(),SC=Be(cS,"u").replace(/punct/g,lS).getRegex(),dS="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bC=Be(dS,"gu").replace(/notPunctSpace/g,Gd).replace(/punctSpace/g,Ia).replace(/punct/g,kr).getRegex(),hC=Be(dS,"gu").replace(/notPunctSpace/g,gC).replace(/punctSpace/g,mC).replace(/punct/g,lS).getRegex(),TC=Be("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Gd).replace(/punctSpace/g,Ia).replace(/punct/g,kr).getRegex(),vC=Be(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,kr).getRegex(),RC="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",CC=Be(RC,"gu").replace(/notPunctSpace/g,Gd).replace(/punctSpace/g,Ia).replace(/punct/g,kr).getRegex(),yC=Be(/\\(punct)/,"gu").replace(/punct/g,kr).getRegex(),NC=Be(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),OC=Be(Fd).replace("(?:-->|$)","-->").getRegex(),AC=Be("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",OC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ia=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,IC=Be(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ia).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),uS=Be(/^!?\[(label)\]\[(ref)\]/).replace("label",ia).replace("ref",Ud).getRegex(),_S=Be(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ud).getRegex(),xC=Be("reflink|nolink(?!\\()","g").replace("reflink",uS).replace("nolink",_S).getRegex(),C_=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Yd={_backpedal:ir,anyPunctuation:yC,autolink:NC,blockSkip:fC,br:oS,code:uC,del:ir,delLDelim:ir,delRDelim:ir,emStrongLDelim:EC,emStrongRDelimAst:bC,emStrongRDelimUnd:TC,escape:dC,link:IC,nolink:_S,punctuation:pC,reflink:uS,reflinkSearch:xC,tag:AC,text:_C,url:ir},DC={...Yd,link:Be(/^!?\[(label)\]\((.*?)\)/).replace("label",ia).getRegex(),reflink:Be(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ia).getRegex()},dd={...Yd,emStrongRDelimAst:hC,emStrongLDelim:SC,delLDelim:vC,delRDelim:CC,url:Be(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",C_).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Be(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",C_).getRegex()},wC={...dd,br:Be(oS).replace("{2,}","*").getRegex(),text:Be(dd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pi={normal:Bd,gfm:lC,pedantic:cC},Wr={normal:Yd,gfm:dd,breaks:wC,pedantic:DC},LC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},y_=t=>LC[t];function mn(t,e){if(e){if(Mt.escapeTest.test(t))return t.replace(Mt.escapeReplace,y_)}else if(Mt.escapeTestNoEncode.test(t))return t.replace(Mt.escapeReplaceNoEncode,y_);return t}function N_(t){try{t=encodeURI(t).replace(Mt.percentDecode,"%")}catch{return null}return t}function O_(t,e){let n=t.replace(Mt.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(Mt.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(Mt.slashPipe,"|");return r}function Kr(t,e,n){let r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function MC(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function kC(t,e=0){let n=e,r="";for(let i of t)if(i===" "){let a=4-n%4;r+=" ".repeat(a),n+=a}else r+=i,n++;return r}function A_(t,e,n,r,i){let a=e.href,s=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}function PC(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
11
11
  `).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
12
12
  `)}var aa=class{options;rules;lexer;constructor(t){this.options=t||pr}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Kr(n,`
@@ -77,7 +77,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),gt=fe,je=Ne),Pe===void
77
77
  `)}function B(E){return E?N(E).split(`
78
78
  `).length:1}const K=new Set([".md",".py",".sh",".bash",".zsh",".js",".jsx",".ts",".tsx",".vue",".json",".yaml",".yml",".toml",".ini",".cfg",".txt",".text",".log",".csv",".html",".htm",".css",".scss",".sass",".less",".xml",".sql",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".rb",".php",".swift",".kt",".dockerfile",".gitignore",".env.example"]),I=new Set(["dockerfile","makefile","rakefile","readme","license","changelog",".gitignore",".gitattributes",".editorconfig",".env",".env.example"]),W=Ie(()=>{if(!p.value)return!1;const E=p.value.toLowerCase(),x="."+E.split(".").pop(),P=E.split("/").pop()||"";return K.has(x)||I.has(P)||I.has(P.replace(/^\./,""))}),T=Ie(()=>_.value?Ze.parse(w.value):""),w=Ie(()=>_.value?N(_.value):""),ce=Ie(()=>{const E=B(_.value);return Array.from({length:E},(x,P)=>P+1).join(`
79
79
  `)}),U=Ie(()=>{const E=B(_.value);return Array.from({length:E},(x,P)=>P+1).join(`
80
- `)});Ht(async()=>{document.title=i("skill.title"),await r.fetchSkill(a.value),await H(),o.value.length>0&&(l.value=o.value[0].version,await te(l.value)),S.value=!1,document.addEventListener("keydown",Y)}),or([()=>L.value,()=>w.value],([E])=>{E&&W.value&&!g.value&&Ti(()=>{mS.highlightElement(E)})});async function H(){try{const E=await Rr.list(a.value);o.value=E.versions||[]}catch(E){console.error("Failed to load versions:",E)}}async function q(){l.value&&await te(l.value)}async function te(E){c.value=!0,p.value="",_.value="";try{const x=await fetch(Rr.downloadUrl(a.value,E),{credentials:"include"});if(!x.ok)throw new Error("Failed to download version");const P=await x.arrayBuffer(),A=await(await XR(async()=>{const{default:F}=await Promise.resolve().then(()=>ix);return{default:F}},void 0,import.meta.url)).default.loadAsync(P);d.value=A,u.value=M(A)}catch(x){console.error("Failed to load version zip:",x),u.value=[]}finally{c.value=!1}}function M(E){const x={children:[]};return E.forEach((P,R)=>{if(!P)return;const A=P.split("/").filter(Boolean);let F=x;for(let Q=0;Q<A.length;Q++){const $=A[Q],z=Q===A.length-1,ee=R.dir||!z;let se=F.children.find(ae=>ae.name===$);se||(se={type:ee?"directory":"file",name:$,path:P,...ee?{children:[],isOpen:!1}:{}},F.children.push(se)),ee&&(F=se)}}),G(x.children),x.children}function G(E){E.sort((x,P)=>x.type!==P.type?x.type==="directory"?-1:1:x.name.localeCompare(P.name)),E.forEach(x=>{x.children&&G(x.children)})}async function j(E){if(p.value=E.path,!d.value)return;const x=d.value.file(E.path);if(x)try{const P=await x.async("string");_.value=P,g.value&&(f.value="render")}catch{_.value=""}}function oe(E){E.isOpen=!E.isOpen}function ie(E){f.value=E}function Ee(){l.value&&Z(l.value)}function Z(E){window.open(Rr.downloadUrl(a.value,E),"_blank")}function ne(){if(!s.value){rt.warning(i("skill.infoLoading"));return}if(o.value.length<2){rt.warning(i("skill.needTwoVersions"));return}const E=o.value[1]?.version||"",x=o.value[0]?.version||"",P=`/diff?id=${encodeURIComponent(a.value)}&version_a=${encodeURIComponent(E)}&version_b=${encodeURIComponent(x)}`;window.open(P,"_blank")}async function re(){if(C.value){y.value=!0;try{await r.addCollaborator(a.value,C.value),h.value=!1,C.value="",rt.success(i("collab.addSuccess"))}catch{rt.error(i("collab.addFailed"))}finally{y.value=!1}}}async function _e(E){if(confirm(i("collab.removeConfirm")))try{await r.removeCollaborator(a.value,E),rt.success(i("collab.removeSuccess"))}catch{rt.error(i("collab.removeFailed"))}}async function ge(){if(D.value===String(s.value?.id))try{await r.deleteSkill(a.value),v.value=!1,n.push("/")}catch{rt.error(i("collab.deleteFailed"))}}function k(){O.value=!O.value,document.body.style.overflow=O.value?"hidden":""}function Y(E){E.key==="Escape"&&O.value&&k()}return(E,x)=>{const P=Bn("router-link");return le(),de("div",TA,[m("div",vA,[S.value||J(r).isLoadingDetail?(le(),de("div",RA,[...x[14]||(x[14]=[dr('<div class="cube-loader" data-v-406f7ae2><div class="cube cube-1" data-v-406f7ae2></div><div class="cube cube-2" data-v-406f7ae2></div><div class="cube cube-3" data-v-406f7ae2></div><div class="cube cube-4" data-v-406f7ae2></div></div>',1)])])):s.value?(le(),de(ke,{key:2},[m("div",OA,[x[16]||(x[16]=m("span",{class:"text-neon-400"},"~",-1)),x[17]||(x[17]=m("span",{class:"opacity-50"},"/",-1)),Ue(P,{to:"/",class:"hover:text-white transition-colors"},{default:it(()=>[he(X(J(i)("skill.breadcrumbHome")),1)]),_:1}),x[18]||(x[18]=m("span",{class:"opacity-50"},"/",-1)),m("span",AA,X(s.value.name),1)]),m("div",IA,[m("div",xA,"ID: "+X(s.value.id.toString().substring(0,8)),1),m("h1",DA,[x[19]||(x[19]=m("span",{class:"text-neon-400 font-mono font-normal opacity-70"},">",-1)),he(" "+X(s.value.name),1)]),m("p",wA,X(s.value.description||J(i)("state.noDesc")),1),m("div",LA,[m("div",MA,[Ve(m("select",{"onUpdate:modelValue":x[0]||(x[0]=R=>l.value=R),onChange:q,class:"w-full appearance-none bg-base-950 border border-base-800 text-white font-mono text-sm rounded-lg px-4 py-2.5 focus:outline-none focus:border-neon-500 focus:ring-1 focus:ring-neon-500 transition-colors cursor-pointer"},[(le(!0),de(ke,null,Rt(o.value,(R,A)=>(le(),de("option",{key:R.id,value:R.version},X(R.version)+" "+X(A===0?J(i)("skill.latestTag"):""),9,kA))),128))],544),[[Ir,l.value]]),x[20]||(x[20]=m("svg",{class:"w-4 h-4 absolute right-4 top-3 pointer-events-none text-base-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),m("div",PA,[m("button",{onClick:ne,class:"flex items-center justify-center gap-2 bg-transparent text-white border border-base-800 hover:bg-base-800 text-sm font-mono px-5 py-2.5 rounded-lg transition-colors w-full sm:w-auto"},[x[21]||(x[21]=m("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})],-1)),he(" "+X(J(i)("skill.compare")),1)]),m("button",{onClick:Ee,class:"flex items-center justify-center gap-2 bg-transparent border border-neon-500 text-neon-400 hover:bg-neon-400/10 text-sm font-mono px-5 py-2.5 rounded-lg transition-colors w-full sm:w-auto shadow-[0_0_15px_rgba(0,255,163,0.1)] hover:shadow-[0_0_20px_rgba(0,255,163,0.2)]"},[x[22]||(x[22]=m("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)),he(" "+X(J(i)("skill.download")),1)])])])]),m("section",UA,[m("div",FA,[x[24]||(x[24]=dr('<div class="px-5 py-3 border-b border-base-800 font-mono text-sm text-base-400 flex items-center gap-2" data-v-406f7ae2><span class="w-2.5 h-2.5 rounded-full bg-base-800" data-v-406f7ae2></span><span class="w-2.5 h-2.5 rounded-full bg-base-800" data-v-406f7ae2></span><span class="w-2.5 h-2.5 rounded-full bg-base-800" data-v-406f7ae2></span><span class="ml-2 text-white/50" data-v-406f7ae2>ls -la</span></div>',1)),m("div",BA,[c.value?(le(),de("div",GA,[...x[23]||(x[23]=[m("div",{class:"spinner spinner-sm"},null,-1)])])):u.value.length===0?(le(),de("div",YA,[m("p",qA,X(J(i)("skill.noFile")),1)])):(le(!0),de(ke,{key:2},Rt(u.value,R=>(le(),wn(gS,{key:R.path,node:R,"selected-path":p.value,onSelect:j,onToggle:oe},null,8,["node","selected-path"]))),128))])]),m("div",{id:"file-preview-panel",class:Fe(["lg:col-span-3 bg-base-900 border border-base-800 rounded-xl flex flex-col min-h-[400px] max-h-[500px]",{fullscreen:O.value}])},[m("div",HA,[m("div",null,[m("span",null,[x[25]||(x[25]=he("cat ",-1)),m("span",VA,X(p.value||"<file>"),1)])]),m("div",zA,[g.value?(le(),de("div",$A,[m("button",{onClick:x[1]||(x[1]=R=>ie("render")),class:Fe(["md-view-btn",f.value==="render"?"is-active":""])},X(J(i)("skill.htmlPreview")),3),m("button",{onClick:x[2]||(x[2]=R=>ie("source")),class:Fe(["md-view-btn",f.value==="source"?"is-active":""])},X(J(i)("skill.mdSource")),3)])):ze("",!0),m("button",{onClick:k,class:"md-view-btn",title:O.value?J(i)("skill.exitFullscreen"):J(i)("skill.fullscreen")},[O.value?(le(),de("svg",QA,[...x[27]||(x[27]=[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):(le(),de("svg",KA,[...x[26]||(x[26]=[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"},null,-1)])]))],8,WA)])]),m("div",XA,[_.value?g.value&&f.value==="render"?(le(),de("div",{key:1,class:"markdown-body p-6",innerHTML:T.value},null,8,JA)):g.value&&f.value==="source"?(le(),de("div",eI,[m("div",tI,X(ce.value),1),m("pre",nI,[m("code",null,X(w.value),1)])])):W.value?(le(),de("div",rI,[m("div",iI,X(U.value),1),m("pre",null,[m("code",{ref_key:"codeBlock",ref:L},X(w.value),513)])])):(le(),de("div",aI,[m("p",sI,X(J(i)("skill.binaryFile")),1)])):(le(),de("div",ZA,[x[28]||(x[28]=m("div",{class:"flex items-center gap-3 opacity-30 font-mono mb-4"},[m("span",{class:"text-neon-400 animate-pulse"},"_"),m("span",null,"EOF")],-1)),m("p",jA,X(J(i)("skill.selectFile")),1)]))])],2)]),m("div",oI,[m("div",lI,[m("div",cI,[m("div",dI,[x[29]||(x[29]=m("span",{class:"text-neon-400"},"#",-1)),he(" "+X(J(i)("skill.collaborators")),1)]),J(r).isOwner?(le(),de("button",{key:0,onClick:x[3]||(x[3]=R=>h.value=!0),class:"text-xs text-neon-400 hover:text-white transition-colors"}," + "+X(J(i)("btn.add")),1)):ze("",!0)]),m("div",uI,[m("div",_I,[m("div",pI,[m("span",mI,X((s.value.owner?.username||"U").charAt(0).toUpperCase()),1),m("div",null,[m("div",gI,X(s.value.owner?.name||s.value.owner?.username),1),m("div",fI,X(s.value.owner?.email||""),1)])]),m("span",EI,X(J(i)("collab.owner")),1)]),(le(!0),de(ke,null,Rt(s.value.collaborators,R=>(le(),de("div",{key:R.id,class:"flex items-center justify-between"},[m("div",SI,[m("span",bI,X((R.username||"U").charAt(0).toUpperCase()),1),m("div",null,[m("div",hI,X(R.name||R.username),1),m("div",TI,X(R.email||""),1)])]),m("div",vI,[m("span",RI,X(J(i)("collab.collaborator")),1),J(r).isOwner?(le(),de("button",{key:0,onClick:A=>_e(R.id),class:"p-1.5 text-base-400 hover:text-red-400 transition-colors",title:J(i)("btn.remove")},[...x[30]||(x[30]=[m("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,CI)):ze("",!0)])]))),128))]),J(r).isOwner?(le(),de("div",yI,[m("div",NI,[m("button",{onClick:x[4]||(x[4]=R=>v.value=!0),class:"w-full py-2 text-xs font-mono text-red-500 border border-red-500/30 rounded bg-red-500/5 hover:bg-red-500/10 transition-colors"},X(J(i)("skill.deleteSkill")),1)])])):ze("",!0)]),m("div",OI,[m("div",{class:"px-5 py-4 border-b border-base-800 flex items-center justify-between rounded-t-xl cursor-pointer hover:bg-white/5 transition-colors",onClick:x[5]||(x[5]=R=>b.value=!b.value)},[x[32]||(x[32]=m("div",{class:"flex items-center gap-2 font-mono font-semibold text-white text-sm"},[m("span",{class:"text-neon-400"},"git"),he(" log ")],-1)),m("span",{class:Fe(["text-base-400 transition-transform",b.value?"-rotate-90":""])},[...x[31]||(x[31]=[m("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("polyline",{points:"6 9 12 15 18 9"})],-1)])],2)]),b.value?ze("",!0):(le(),de("div",AI,[m("div",II,[x[34]||(x[34]=m("div",{class:"absolute left-[5px] top-0 bottom-2 w-px bg-base-800"},null,-1)),(le(!0),de(ke,null,Rt(o.value,(R,A)=>(le(),de("div",{key:R.id,class:"relative mb-8 last:mb-0 group cursor-pointer"},[m("span",{class:Fe(["absolute -left-[21px] top-2 w-2.5 h-2.5 rounded-full ring-4 ring-base-900 transition-colors",A===0?"bg-neon-400 shadow-[0_0_8px_rgba(0,255,163,0.8)]":"bg-base-800 group-hover:bg-neon-500"])},null,2),m("div",xI,[m("div",DI,[m("div",wI,[m("span",{class:Fe(["text-xs px-2 py-0.5 rounded font-mono border transition-colors",A===0?"text-neon-400 border-neon-500/30 bg-neon-400/5":"text-base-400 border-base-800 group-hover:text-neon-400 group-hover:border-neon-500/30"])},X(R.version),3),A===0?(le(),de("span",LI,"Head")):ze("",!0)]),m("p",{class:Fe(["text-sm font-medium mt-2",A===0?"text-white":"text-base-200"])},X(R.changelog||J(i)("skill.noChangelog")),3),m("p",MI," by @"+X(R.uploader?.name||R.uploader?.username||J(i)("state.unknown")),1)]),m("div",kI,[m("span",{class:"text-xs text-base-400 font-mono whitespace-nowrap text-right",title:J(mR)(R.created_at)},X(J(nS)(R.created_at)),9,PI),m("button",{title:J(i)("skill.download"),class:"flex items-center justify-center p-2 text-base-400 border border-base-800 rounded bg-base-950 hover:text-neon-400 hover:border-neon-500 hover:bg-neon-400/10 hover:shadow-[0_0_10px_rgba(0,255,163,0.15)] transition-all",onClick:F=>Z(R.version)},[...x[33]||(x[33]=[m("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)])],8,UI)])])]))),128)),o.value.length===0?(le(),de("div",FI,[m("p",BI,X(J(i)("skill.noVersions")),1)])):ze("",!0)])]))])])],64)):(le(),de("div",CA,[x[15]||(x[15]=m("div",{class:"w-20 h-20 mx-auto mb-6 rounded-full bg-base-800 flex items-center justify-center"},[m("svg",{class:"w-10 h-10 text-base-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),m("h3",yA,X(J(i)("skill.notFound")),1),m("p",NA,X(J(i)("skill.notFoundDesc")),1),Ue(P,{to:"/",class:"btn-primary px-6 py-3 rounded-lg"},{default:it(()=>[he(X(J(i)("skill.backToHome")),1)]),_:1})]))]),h.value?(le(),de("div",{key:0,class:"modal",onClick:x[9]||(x[9]=At(R=>h.value=!1,["self"]))},[x[35]||(x[35]=m("div",{class:"modal-overlay"},null,-1)),m("div",GI,[m("div",YI,[m("h3",null,X(J(i)("collab.modal")),1),m("button",{class:"modal-close",onClick:x[6]||(x[6]=R=>h.value=!1)},"×")]),m("div",qI,[m("div",HI,[m("label",null,X(J(i)("collab.usernameLabel")),1),Ve(m("input",{"onUpdate:modelValue":x[7]||(x[7]=R=>C.value=R),type:"text",placeholder:J(i)("collab.usernamePlaceholder"),class:"form-input",onKeyup:lT(re,["enter"])},null,40,VI),[[at,C.value]])])]),m("div",zI,[m("button",{class:"btn btn-secondary",onClick:x[8]||(x[8]=R=>h.value=!1)},X(J(i)("btn.cancel")),1),m("button",{class:"btn btn-primary",onClick:re,disabled:!C.value||y.value},[y.value?(le(),de("span",WI)):ze("",!0),he(" "+X(J(i)("btn.add")),1)],8,$I)])])])):ze("",!0),v.value?(le(),de("div",{key:1,class:"modal",onClick:x[13]||(x[13]=At(R=>v.value=!1,["self"]))},[x[36]||(x[36]=m("div",{class:"modal-overlay"},null,-1)),m("div",KI,[m("div",QI,[m("h3",null,X(J(i)("collab.deleteModal")),1),m("button",{class:"modal-close",onClick:x[10]||(x[10]=R=>v.value=!1)},"×")]),m("div",XI,[m("p",ZI,X(J(i)("collab.deleteWarning")),1),m("div",jI,[m("label",null,X(J(i)("collab.deleteLabel"))+" "+X(s.value?.id),1),Ve(m("input",{"onUpdate:modelValue":x[11]||(x[11]=R=>D.value=R),type:"text",placeholder:"",class:"form-input"},null,512),[[at,D.value]])])]),m("div",JI,[m("button",{class:"btn btn-secondary",onClick:x[12]||(x[12]=R=>v.value=!1)},X(J(i)("btn.cancel")),1),m("button",{class:"btn btn-danger",onClick:ge,disabled:D.value!==String(s.value?.id)},X(J(i)("collab.deleteConfirmBtn")),9,ex)])])])):ze("",!0)])}}}),nx=vn(tx,[["__scopeId","data-v-406f7ae2"]]);function Fi(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Pc={exports:{}};var lf;function rx(){return lf||(lf=1,(function(t,e){(function(n){t.exports=n()})(function(){return(function n(r,i,a){function s(c,d){if(!i[c]){if(!r[c]){var u=typeof Fi=="function"&&Fi;if(!d&&u)return u(c,!0);if(o)return o(c,!0);var p=new Error("Cannot find module '"+c+"'");throw p.code="MODULE_NOT_FOUND",p}var _=i[c]={exports:{}};r[c][0].call(_.exports,function(f){var g=r[c][1][f];return s(g||f)},_,_.exports,n,r,i,a)}return i[c].exports}for(var o=typeof Fi=="function"&&Fi,l=0;l<a.length;l++)s(a[l]);return s})({1:[function(n,r,i){var a=n("./utils"),s=n("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var c,d,u,p,_,f,g,S=[],b=0,h=l.length,v=h,C=a.getTypeOf(l)!=="string";b<l.length;)v=h-b,u=C?(c=l[b++],d=b<h?l[b++]:0,b<h?l[b++]:0):(c=l.charCodeAt(b++),d=b<h?l.charCodeAt(b++):0,b<h?l.charCodeAt(b++):0),p=c>>2,_=(3&c)<<4|d>>4,f=1<v?(15&d)<<2|u>>6:64,g=2<v?63&u:64,S.push(o.charAt(p)+o.charAt(_)+o.charAt(f)+o.charAt(g));return S.join("")},i.decode=function(l){var c,d,u,p,_,f,g=0,S=0,b="data:";if(l.substr(0,b.length)===b)throw new Error("Invalid base64 input, it looks like a data url.");var h,v=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===o.charAt(64)&&v--,l.charAt(l.length-2)===o.charAt(64)&&v--,v%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=s.uint8array?new Uint8Array(0|v):new Array(0|v);g<l.length;)c=o.indexOf(l.charAt(g++))<<2|(p=o.indexOf(l.charAt(g++)))>>4,d=(15&p)<<4|(_=o.indexOf(l.charAt(g++)))>>2,u=(3&_)<<6|(f=o.indexOf(l.charAt(g++))),h[S++]=c,_!==64&&(h[S++]=d),f!==64&&(h[S++]=u);return h}},{"./support":30,"./utils":32}],2:[function(n,r,i){var a=n("./external"),s=n("./stream/DataWorker"),o=n("./stream/Crc32Probe"),l=n("./stream/DataLengthProbe");function c(d,u,p,_,f){this.compressedSize=d,this.uncompressedSize=u,this.crc32=p,this.compression=_,this.compressedContent=f}c.prototype={getContentWorker:function(){var d=new s(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),u=this;return d.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new s(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(d,u,p){return d.pipe(new o).pipe(new l("uncompressedSize")).pipe(u.compressWorker(p)).pipe(new l("compressedSize")).withStreamInfo("compression",u)},r.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,i){var a=n("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},i.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,i){var a=n("./utils"),s=(function(){for(var o,l=[],c=0;c<256;c++){o=c;for(var d=0;d<8;d++)o=1&o?3988292384^o>>>1:o>>>1;l[c]=o}return l})();r.exports=function(o,l){return o!==void 0&&o.length?a.getTypeOf(o)!=="string"?(function(c,d,u,p){var _=s,f=p+u;c^=-1;for(var g=p;g<f;g++)c=c>>>8^_[255&(c^d[g])];return-1^c})(0|l,o,o.length,0):(function(c,d,u,p){var _=s,f=p+u;c^=-1;for(var g=p;g<f;g++)c=c>>>8^_[255&(c^d.charCodeAt(g))];return-1^c})(0|l,o,o.length,0):0}},{"./utils":32}],5:[function(n,r,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(n,r,i){var a=null;a=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:a}},{lie:37}],7:[function(n,r,i){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=n("pako"),o=n("./utils"),l=n("./stream/GenericWorker"),c=a?"uint8array":"array";function d(u,p){l.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=p,this.meta={}}i.magic="\b\0",o.inherits(d,l),d.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,u.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(p){u.push({data:p,meta:u.meta})}},i.compressWorker=function(u){return new d("Deflate",u)},i.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,i){function a(_,f){var g,S="";for(g=0;g<f;g++)S+=String.fromCharCode(255&_),_>>>=8;return S}function s(_,f,g,S,b,h){var v,C,y=_.file,D=_.compression,L=h!==c.utf8encode,O=o.transformTo("string",h(y.name)),N=o.transformTo("string",c.utf8encode(y.name)),B=y.comment,K=o.transformTo("string",h(B)),I=o.transformTo("string",c.utf8encode(B)),W=N.length!==y.name.length,T=I.length!==B.length,w="",ce="",U="",H=y.dir,q=y.date,te={crc32:0,compressedSize:0,uncompressedSize:0};f&&!g||(te.crc32=_.crc32,te.compressedSize=_.compressedSize,te.uncompressedSize=_.uncompressedSize);var M=0;f&&(M|=8),L||!W&&!T||(M|=2048);var G=0,j=0;H&&(G|=16),b==="UNIX"?(j=798,G|=(function(ie,Ee){var Z=ie;return ie||(Z=Ee?16893:33204),(65535&Z)<<16})(y.unixPermissions,H)):(j=20,G|=(function(ie){return 63&(ie||0)})(y.dosPermissions)),v=q.getUTCHours(),v<<=6,v|=q.getUTCMinutes(),v<<=5,v|=q.getUTCSeconds()/2,C=q.getUTCFullYear()-1980,C<<=4,C|=q.getUTCMonth()+1,C<<=5,C|=q.getUTCDate(),W&&(ce=a(1,1)+a(d(O),4)+N,w+="up"+a(ce.length,2)+ce),T&&(U=a(1,1)+a(d(K),4)+I,w+="uc"+a(U.length,2)+U);var oe="";return oe+=`
80
+ `)});Ht(async()=>{document.title=i("skill.title"),await r.fetchSkill(a.value),await H(),o.value.length>0&&(l.value=o.value[0].version,await te(l.value)),S.value=!1,document.addEventListener("keydown",Y)}),or([()=>L.value,()=>w.value],([E])=>{E&&W.value&&!g.value&&Ti(()=>{mS.highlightElement(E)})});async function H(){try{const E=await Rr.list(a.value);o.value=E.versions||[]}catch(E){console.error("Failed to load versions:",E)}}async function q(){l.value&&await te(l.value)}async function te(E){c.value=!0,p.value="",_.value="";try{const x=await fetch(Rr.downloadUrl(a.value,E),{credentials:"include"});if(!x.ok)throw new Error("Failed to download version");const P=await x.arrayBuffer(),A=await(await XR(async()=>{const{default:F}=await Promise.resolve().then(()=>ix);return{default:F}},void 0,import.meta.url)).default.loadAsync(P);d.value=A,u.value=M(A)}catch(x){console.error("Failed to load version zip:",x),u.value=[]}finally{c.value=!1}}function M(E){const x={children:[]};return E.forEach((P,R)=>{if(!P)return;const A=P.split("/").filter(Boolean);let F=x;for(let Q=0;Q<A.length;Q++){const $=A[Q],z=Q===A.length-1,ee=R.dir||!z;let se=F.children.find(ae=>ae.name===$);se||(se={type:ee?"directory":"file",name:$,path:P,...ee?{children:[],isOpen:!1}:{}},F.children.push(se)),ee&&(F=se)}}),G(x.children),x.children}function G(E){E.sort((x,P)=>x.type!==P.type?x.type==="directory"?-1:1:x.name.localeCompare(P.name)),E.forEach(x=>{x.children&&G(x.children)})}async function j(E){if(p.value=E.path,!d.value)return;const x=d.value.file(E.path);if(x)try{const P=await x.async("string");_.value=P,g.value&&(f.value="render")}catch{_.value=""}}function oe(E){E.isOpen=!E.isOpen}function ie(E){f.value=E}function Ee(){l.value&&Z(l.value)}function Z(E){window.open(Rr.downloadUrl(a.value,E),"_blank")}function ne(){if(!s.value){rt.warning(i("skill.infoLoading"));return}if(o.value.length<2){rt.warning(i("skill.needTwoVersions"));return}const E=o.value[1]?.version||"",x=o.value[0]?.version||"";n.push({path:"/diff",query:{id:a.value,version_a:E,version_b:x}})}async function re(){if(C.value){y.value=!0;try{await r.addCollaborator(a.value,C.value),h.value=!1,C.value="",rt.success(i("collab.addSuccess"))}catch{rt.error(i("collab.addFailed"))}finally{y.value=!1}}}async function _e(E){if(confirm(i("collab.removeConfirm")))try{await r.removeCollaborator(a.value,E),rt.success(i("collab.removeSuccess"))}catch{rt.error(i("collab.removeFailed"))}}async function ge(){if(D.value===String(s.value?.id))try{await r.deleteSkill(a.value),v.value=!1,n.push("/")}catch{rt.error(i("collab.deleteFailed"))}}function k(){O.value=!O.value,document.body.style.overflow=O.value?"hidden":""}function Y(E){E.key==="Escape"&&O.value&&k()}return(E,x)=>{const P=Bn("router-link");return le(),de("div",TA,[m("div",vA,[S.value||J(r).isLoadingDetail?(le(),de("div",RA,[...x[14]||(x[14]=[dr('<div class="cube-loader" data-v-8eedbc16><div class="cube cube-1" data-v-8eedbc16></div><div class="cube cube-2" data-v-8eedbc16></div><div class="cube cube-3" data-v-8eedbc16></div><div class="cube cube-4" data-v-8eedbc16></div></div>',1)])])):s.value?(le(),de(ke,{key:2},[m("div",OA,[x[16]||(x[16]=m("span",{class:"text-neon-400"},"~",-1)),x[17]||(x[17]=m("span",{class:"opacity-50"},"/",-1)),Ue(P,{to:"/",class:"hover:text-white transition-colors"},{default:it(()=>[he(X(J(i)("skill.breadcrumbHome")),1)]),_:1}),x[18]||(x[18]=m("span",{class:"opacity-50"},"/",-1)),m("span",AA,X(s.value.name),1)]),m("div",IA,[m("div",xA,"ID: "+X(s.value.id.toString().substring(0,8)),1),m("h1",DA,[x[19]||(x[19]=m("span",{class:"text-neon-400 font-mono font-normal opacity-70"},">",-1)),he(" "+X(s.value.name),1)]),m("p",wA,X(s.value.description||J(i)("state.noDesc")),1),m("div",LA,[m("div",MA,[Ve(m("select",{"onUpdate:modelValue":x[0]||(x[0]=R=>l.value=R),onChange:q,class:"w-full appearance-none bg-base-950 border border-base-800 text-white font-mono text-sm rounded-lg px-4 py-2.5 focus:outline-none focus:border-neon-500 focus:ring-1 focus:ring-neon-500 transition-colors cursor-pointer"},[(le(!0),de(ke,null,Rt(o.value,(R,A)=>(le(),de("option",{key:R.id,value:R.version},X(R.version)+" "+X(A===0?J(i)("skill.latestTag"):""),9,kA))),128))],544),[[Ir,l.value]]),x[20]||(x[20]=m("svg",{class:"w-4 h-4 absolute right-4 top-3 pointer-events-none text-base-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})],-1))]),m("div",PA,[m("button",{onClick:ne,class:"flex items-center justify-center gap-2 bg-transparent text-white border border-base-800 hover:bg-base-800 text-sm font-mono px-5 py-2.5 rounded-lg transition-colors w-full sm:w-auto"},[x[21]||(x[21]=m("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})],-1)),he(" "+X(J(i)("skill.compare")),1)]),m("button",{onClick:Ee,class:"flex items-center justify-center gap-2 bg-transparent border border-neon-500 text-neon-400 hover:bg-neon-400/10 text-sm font-mono px-5 py-2.5 rounded-lg transition-colors w-full sm:w-auto shadow-[0_0_15px_rgba(0,255,163,0.1)] hover:shadow-[0_0_20px_rgba(0,255,163,0.2)]"},[x[22]||(x[22]=m("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)),he(" "+X(J(i)("skill.download")),1)])])])]),m("section",UA,[m("div",FA,[x[24]||(x[24]=dr('<div class="px-5 py-3 border-b border-base-800 font-mono text-sm text-base-400 flex items-center gap-2" data-v-8eedbc16><span class="w-2.5 h-2.5 rounded-full bg-base-800" data-v-8eedbc16></span><span class="w-2.5 h-2.5 rounded-full bg-base-800" data-v-8eedbc16></span><span class="w-2.5 h-2.5 rounded-full bg-base-800" data-v-8eedbc16></span><span class="ml-2 text-white/50" data-v-8eedbc16>ls -la</span></div>',1)),m("div",BA,[c.value?(le(),de("div",GA,[...x[23]||(x[23]=[m("div",{class:"spinner spinner-sm"},null,-1)])])):u.value.length===0?(le(),de("div",YA,[m("p",qA,X(J(i)("skill.noFile")),1)])):(le(!0),de(ke,{key:2},Rt(u.value,R=>(le(),wn(gS,{key:R.path,node:R,"selected-path":p.value,onSelect:j,onToggle:oe},null,8,["node","selected-path"]))),128))])]),m("div",{id:"file-preview-panel",class:Fe(["lg:col-span-3 bg-base-900 border border-base-800 rounded-xl flex flex-col min-h-[400px] max-h-[500px]",{fullscreen:O.value}])},[m("div",HA,[m("div",null,[m("span",null,[x[25]||(x[25]=he("cat ",-1)),m("span",VA,X(p.value||"<file>"),1)])]),m("div",zA,[g.value?(le(),de("div",$A,[m("button",{onClick:x[1]||(x[1]=R=>ie("render")),class:Fe(["md-view-btn",f.value==="render"?"is-active":""])},X(J(i)("skill.htmlPreview")),3),m("button",{onClick:x[2]||(x[2]=R=>ie("source")),class:Fe(["md-view-btn",f.value==="source"?"is-active":""])},X(J(i)("skill.mdSource")),3)])):ze("",!0),m("button",{onClick:k,class:"md-view-btn",title:O.value?J(i)("skill.exitFullscreen"):J(i)("skill.fullscreen")},[O.value?(le(),de("svg",QA,[...x[27]||(x[27]=[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):(le(),de("svg",KA,[...x[26]||(x[26]=[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"},null,-1)])]))],8,WA)])]),m("div",XA,[_.value?g.value&&f.value==="render"?(le(),de("div",{key:1,class:"markdown-body p-6",innerHTML:T.value},null,8,JA)):g.value&&f.value==="source"?(le(),de("div",eI,[m("div",tI,X(ce.value),1),m("pre",nI,[m("code",null,X(w.value),1)])])):W.value?(le(),de("div",rI,[m("div",iI,X(U.value),1),m("pre",null,[m("code",{ref_key:"codeBlock",ref:L},X(w.value),513)])])):(le(),de("div",aI,[m("p",sI,X(J(i)("skill.binaryFile")),1)])):(le(),de("div",ZA,[x[28]||(x[28]=m("div",{class:"flex items-center gap-3 opacity-30 font-mono mb-4"},[m("span",{class:"text-neon-400 animate-pulse"},"_"),m("span",null,"EOF")],-1)),m("p",jA,X(J(i)("skill.selectFile")),1)]))])],2)]),m("div",oI,[m("div",lI,[m("div",cI,[m("div",dI,[x[29]||(x[29]=m("span",{class:"text-neon-400"},"#",-1)),he(" "+X(J(i)("skill.collaborators")),1)]),J(r).isOwner?(le(),de("button",{key:0,onClick:x[3]||(x[3]=R=>h.value=!0),class:"text-xs text-neon-400 hover:text-white transition-colors"}," + "+X(J(i)("btn.add")),1)):ze("",!0)]),m("div",uI,[m("div",_I,[m("div",pI,[m("span",mI,X((s.value.owner?.username||"U").charAt(0).toUpperCase()),1),m("div",null,[m("div",gI,X(s.value.owner?.name||s.value.owner?.username),1),m("div",fI,X(s.value.owner?.email||""),1)])]),m("span",EI,X(J(i)("collab.owner")),1)]),(le(!0),de(ke,null,Rt(s.value.collaborators,R=>(le(),de("div",{key:R.id,class:"flex items-center justify-between"},[m("div",SI,[m("span",bI,X((R.username||"U").charAt(0).toUpperCase()),1),m("div",null,[m("div",hI,X(R.name||R.username),1),m("div",TI,X(R.email||""),1)])]),m("div",vI,[m("span",RI,X(J(i)("collab.collaborator")),1),J(r).isOwner?(le(),de("button",{key:0,onClick:A=>_e(R.id),class:"p-1.5 text-base-400 hover:text-red-400 transition-colors",title:J(i)("btn.remove")},[...x[30]||(x[30]=[m("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,CI)):ze("",!0)])]))),128))]),J(r).isOwner?(le(),de("div",yI,[m("div",NI,[m("button",{onClick:x[4]||(x[4]=R=>v.value=!0),class:"w-full py-2 text-xs font-mono text-red-500 border border-red-500/30 rounded bg-red-500/5 hover:bg-red-500/10 transition-colors"},X(J(i)("skill.deleteSkill")),1)])])):ze("",!0)]),m("div",OI,[m("div",{class:"px-5 py-4 border-b border-base-800 flex items-center justify-between rounded-t-xl cursor-pointer hover:bg-white/5 transition-colors",onClick:x[5]||(x[5]=R=>b.value=!b.value)},[x[32]||(x[32]=m("div",{class:"flex items-center gap-2 font-mono font-semibold text-white text-sm"},[m("span",{class:"text-neon-400"},"git"),he(" log ")],-1)),m("span",{class:Fe(["text-base-400 transition-transform",b.value?"-rotate-90":""])},[...x[31]||(x[31]=[m("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("polyline",{points:"6 9 12 15 18 9"})],-1)])],2)]),b.value?ze("",!0):(le(),de("div",AI,[m("div",II,[x[34]||(x[34]=m("div",{class:"absolute left-[5px] top-0 bottom-2 w-px bg-base-800"},null,-1)),(le(!0),de(ke,null,Rt(o.value,(R,A)=>(le(),de("div",{key:R.id,class:"relative mb-8 last:mb-0 group cursor-pointer"},[m("span",{class:Fe(["absolute -left-[21px] top-2 w-2.5 h-2.5 rounded-full ring-4 ring-base-900 transition-colors",A===0?"bg-neon-400 shadow-[0_0_8px_rgba(0,255,163,0.8)]":"bg-base-800 group-hover:bg-neon-500"])},null,2),m("div",xI,[m("div",DI,[m("div",wI,[m("span",{class:Fe(["text-xs px-2 py-0.5 rounded font-mono border transition-colors",A===0?"text-neon-400 border-neon-500/30 bg-neon-400/5":"text-base-400 border-base-800 group-hover:text-neon-400 group-hover:border-neon-500/30"])},X(R.version),3),A===0?(le(),de("span",LI,"Head")):ze("",!0)]),m("p",{class:Fe(["text-sm font-medium mt-2",A===0?"text-white":"text-base-200"])},X(R.changelog||J(i)("skill.noChangelog")),3),m("p",MI," by @"+X(R.uploader?.name||R.uploader?.username||J(i)("state.unknown")),1)]),m("div",kI,[m("span",{class:"text-xs text-base-400 font-mono whitespace-nowrap text-right",title:J(mR)(R.created_at)},X(J(nS)(R.created_at)),9,PI),m("button",{title:J(i)("skill.download"),class:"flex items-center justify-center p-2 text-base-400 border border-base-800 rounded bg-base-950 hover:text-neon-400 hover:border-neon-500 hover:bg-neon-400/10 hover:shadow-[0_0_10px_rgba(0,255,163,0.15)] transition-all",onClick:F=>Z(R.version)},[...x[33]||(x[33]=[m("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)])],8,UI)])])]))),128)),o.value.length===0?(le(),de("div",FI,[m("p",BI,X(J(i)("skill.noVersions")),1)])):ze("",!0)])]))])])],64)):(le(),de("div",CA,[x[15]||(x[15]=m("div",{class:"w-20 h-20 mx-auto mb-6 rounded-full bg-base-800 flex items-center justify-center"},[m("svg",{class:"w-10 h-10 text-base-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[m("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])],-1)),m("h3",yA,X(J(i)("skill.notFound")),1),m("p",NA,X(J(i)("skill.notFoundDesc")),1),Ue(P,{to:"/",class:"btn-primary px-6 py-3 rounded-lg"},{default:it(()=>[he(X(J(i)("skill.backToHome")),1)]),_:1})]))]),h.value?(le(),de("div",{key:0,class:"modal",onClick:x[9]||(x[9]=At(R=>h.value=!1,["self"]))},[x[35]||(x[35]=m("div",{class:"modal-overlay"},null,-1)),m("div",GI,[m("div",YI,[m("h3",null,X(J(i)("collab.modal")),1),m("button",{class:"modal-close",onClick:x[6]||(x[6]=R=>h.value=!1)},"×")]),m("div",qI,[m("div",HI,[m("label",null,X(J(i)("collab.usernameLabel")),1),Ve(m("input",{"onUpdate:modelValue":x[7]||(x[7]=R=>C.value=R),type:"text",placeholder:J(i)("collab.usernamePlaceholder"),class:"form-input",onKeyup:lT(re,["enter"])},null,40,VI),[[at,C.value]])])]),m("div",zI,[m("button",{class:"btn btn-secondary",onClick:x[8]||(x[8]=R=>h.value=!1)},X(J(i)("btn.cancel")),1),m("button",{class:"btn btn-primary",onClick:re,disabled:!C.value||y.value},[y.value?(le(),de("span",WI)):ze("",!0),he(" "+X(J(i)("btn.add")),1)],8,$I)])])])):ze("",!0),v.value?(le(),de("div",{key:1,class:"modal",onClick:x[13]||(x[13]=At(R=>v.value=!1,["self"]))},[x[36]||(x[36]=m("div",{class:"modal-overlay"},null,-1)),m("div",KI,[m("div",QI,[m("h3",null,X(J(i)("collab.deleteModal")),1),m("button",{class:"modal-close",onClick:x[10]||(x[10]=R=>v.value=!1)},"×")]),m("div",XI,[m("p",ZI,X(J(i)("collab.deleteWarning")),1),m("div",jI,[m("label",null,X(J(i)("collab.deleteLabel"))+" "+X(s.value?.id),1),Ve(m("input",{"onUpdate:modelValue":x[11]||(x[11]=R=>D.value=R),type:"text",placeholder:"",class:"form-input"},null,512),[[at,D.value]])])]),m("div",JI,[m("button",{class:"btn btn-secondary",onClick:x[12]||(x[12]=R=>v.value=!1)},X(J(i)("btn.cancel")),1),m("button",{class:"btn btn-danger",onClick:ge,disabled:D.value!==String(s.value?.id)},X(J(i)("collab.deleteConfirmBtn")),9,ex)])])])):ze("",!0)])}}}),nx=vn(tx,[["__scopeId","data-v-8eedbc16"]]);function Fi(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Pc={exports:{}};var lf;function rx(){return lf||(lf=1,(function(t,e){(function(n){t.exports=n()})(function(){return(function n(r,i,a){function s(c,d){if(!i[c]){if(!r[c]){var u=typeof Fi=="function"&&Fi;if(!d&&u)return u(c,!0);if(o)return o(c,!0);var p=new Error("Cannot find module '"+c+"'");throw p.code="MODULE_NOT_FOUND",p}var _=i[c]={exports:{}};r[c][0].call(_.exports,function(f){var g=r[c][1][f];return s(g||f)},_,_.exports,n,r,i,a)}return i[c].exports}for(var o=typeof Fi=="function"&&Fi,l=0;l<a.length;l++)s(a[l]);return s})({1:[function(n,r,i){var a=n("./utils"),s=n("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var c,d,u,p,_,f,g,S=[],b=0,h=l.length,v=h,C=a.getTypeOf(l)!=="string";b<l.length;)v=h-b,u=C?(c=l[b++],d=b<h?l[b++]:0,b<h?l[b++]:0):(c=l.charCodeAt(b++),d=b<h?l.charCodeAt(b++):0,b<h?l.charCodeAt(b++):0),p=c>>2,_=(3&c)<<4|d>>4,f=1<v?(15&d)<<2|u>>6:64,g=2<v?63&u:64,S.push(o.charAt(p)+o.charAt(_)+o.charAt(f)+o.charAt(g));return S.join("")},i.decode=function(l){var c,d,u,p,_,f,g=0,S=0,b="data:";if(l.substr(0,b.length)===b)throw new Error("Invalid base64 input, it looks like a data url.");var h,v=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===o.charAt(64)&&v--,l.charAt(l.length-2)===o.charAt(64)&&v--,v%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=s.uint8array?new Uint8Array(0|v):new Array(0|v);g<l.length;)c=o.indexOf(l.charAt(g++))<<2|(p=o.indexOf(l.charAt(g++)))>>4,d=(15&p)<<4|(_=o.indexOf(l.charAt(g++)))>>2,u=(3&_)<<6|(f=o.indexOf(l.charAt(g++))),h[S++]=c,_!==64&&(h[S++]=d),f!==64&&(h[S++]=u);return h}},{"./support":30,"./utils":32}],2:[function(n,r,i){var a=n("./external"),s=n("./stream/DataWorker"),o=n("./stream/Crc32Probe"),l=n("./stream/DataLengthProbe");function c(d,u,p,_,f){this.compressedSize=d,this.uncompressedSize=u,this.crc32=p,this.compression=_,this.compressedContent=f}c.prototype={getContentWorker:function(){var d=new s(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),u=this;return d.on("end",function(){if(this.streamInfo.data_length!==u.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new s(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(d,u,p){return d.pipe(new o).pipe(new l("uncompressedSize")).pipe(u.compressWorker(p)).pipe(new l("compressedSize")).withStreamInfo("compression",u)},r.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,i){var a=n("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},i.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,i){var a=n("./utils"),s=(function(){for(var o,l=[],c=0;c<256;c++){o=c;for(var d=0;d<8;d++)o=1&o?3988292384^o>>>1:o>>>1;l[c]=o}return l})();r.exports=function(o,l){return o!==void 0&&o.length?a.getTypeOf(o)!=="string"?(function(c,d,u,p){var _=s,f=p+u;c^=-1;for(var g=p;g<f;g++)c=c>>>8^_[255&(c^d[g])];return-1^c})(0|l,o,o.length,0):(function(c,d,u,p){var _=s,f=p+u;c^=-1;for(var g=p;g<f;g++)c=c>>>8^_[255&(c^d.charCodeAt(g))];return-1^c})(0|l,o,o.length,0):0}},{"./utils":32}],5:[function(n,r,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(n,r,i){var a=null;a=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:a}},{lie:37}],7:[function(n,r,i){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=n("pako"),o=n("./utils"),l=n("./stream/GenericWorker"),c=a?"uint8array":"array";function d(u,p){l.call(this,"FlateWorker/"+u),this._pako=null,this._pakoAction=u,this._pakoOptions=p,this.meta={}}i.magic="\b\0",o.inherits(d,l),d.prototype.processChunk=function(u){this.meta=u.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(c,u.data),!1)},d.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var u=this;this._pako.onData=function(p){u.push({data:p,meta:u.meta})}},i.compressWorker=function(u){return new d("Deflate",u)},i.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,i){function a(_,f){var g,S="";for(g=0;g<f;g++)S+=String.fromCharCode(255&_),_>>>=8;return S}function s(_,f,g,S,b,h){var v,C,y=_.file,D=_.compression,L=h!==c.utf8encode,O=o.transformTo("string",h(y.name)),N=o.transformTo("string",c.utf8encode(y.name)),B=y.comment,K=o.transformTo("string",h(B)),I=o.transformTo("string",c.utf8encode(B)),W=N.length!==y.name.length,T=I.length!==B.length,w="",ce="",U="",H=y.dir,q=y.date,te={crc32:0,compressedSize:0,uncompressedSize:0};f&&!g||(te.crc32=_.crc32,te.compressedSize=_.compressedSize,te.uncompressedSize=_.uncompressedSize);var M=0;f&&(M|=8),L||!W&&!T||(M|=2048);var G=0,j=0;H&&(G|=16),b==="UNIX"?(j=798,G|=(function(ie,Ee){var Z=ie;return ie||(Z=Ee?16893:33204),(65535&Z)<<16})(y.unixPermissions,H)):(j=20,G|=(function(ie){return 63&(ie||0)})(y.dosPermissions)),v=q.getUTCHours(),v<<=6,v|=q.getUTCMinutes(),v<<=5,v|=q.getUTCSeconds()/2,C=q.getUTCFullYear()-1980,C<<=4,C|=q.getUTCMonth()+1,C<<=5,C|=q.getUTCDate(),W&&(ce=a(1,1)+a(d(O),4)+N,w+="up"+a(ce.length,2)+ce),T&&(U=a(1,1)+a(d(K),4)+I,w+="uc"+a(U.length,2)+U);var oe="";return oe+=`
81
81
  \0`,oe+=a(M,2),oe+=D.magic,oe+=a(v,2),oe+=a(C,2),oe+=a(te.crc32,4),oe+=a(te.compressedSize,4),oe+=a(te.uncompressedSize,4),oe+=a(O.length,2),oe+=a(w.length,2),{fileRecord:u.LOCAL_FILE_HEADER+oe+O+w,dirRecord:u.CENTRAL_FILE_HEADER+a(j,2)+oe+a(K.length,2)+"\0\0\0\0"+a(G,4)+a(S,4)+O+w+K}}var o=n("../utils"),l=n("../stream/GenericWorker"),c=n("../utf8"),d=n("../crc32"),u=n("../signature");function p(_,f,g,S){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=f,this.zipPlatform=g,this.encodeFileName=S,this.streamFiles=_,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(p,l),p.prototype.push=function(_){var f=_.meta.percent||0,g=this.entriesCount,S=this._sources.length;this.accumulate?this.contentBuffer.push(_):(this.bytesWritten+=_.data.length,l.prototype.push.call(this,{data:_.data,meta:{currentFile:this.currentFile,percent:g?(f+100*(g-S-1))/g:100}}))},p.prototype.openedSource=function(_){this.currentSourceOffset=this.bytesWritten,this.currentFile=_.file.name;var f=this.streamFiles&&!_.file.dir;if(f){var g=s(_,f,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(_){this.accumulate=!1;var f=this.streamFiles&&!_.file.dir,g=s(_,f,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),f)this.push({data:(function(S){return u.DATA_DESCRIPTOR+a(S.crc32,4)+a(S.compressedSize,4)+a(S.uncompressedSize,4)})(_),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var _=this.bytesWritten,f=0;f<this.dirRecords.length;f++)this.push({data:this.dirRecords[f],meta:{percent:100}});var g=this.bytesWritten-_,S=(function(b,h,v,C,y){var D=o.transformTo("string",y(C));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(b,2)+a(b,2)+a(h,4)+a(v,4)+a(D.length,2)+D})(this.dirRecords.length,g,_,this.zipComment,this.encodeFileName);this.push({data:S,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(_){this._sources.push(_);var f=this;return _.on("data",function(g){f.processChunk(g)}),_.on("end",function(){f.closedSource(f.previous.streamInfo),f._sources.length?f.prepareNextSource():f.end()}),_.on("error",function(g){f.error(g)}),this},p.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(_){var f=this._sources;if(!l.prototype.error.call(this,_))return!1;for(var g=0;g<f.length;g++)try{f[g].error(_)}catch{}return!0},p.prototype.lock=function(){l.prototype.lock.call(this);for(var _=this._sources,f=0;f<_.length;f++)_[f].lock()},r.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,i){var a=n("../compressions"),s=n("./ZipFileWorker");i.generateWorker=function(o,l,c){var d=new s(l.streamFiles,c,l.platform,l.encodeFileName),u=0;try{o.forEach(function(p,_){u++;var f=(function(h,v){var C=h||v,y=a[C];if(!y)throw new Error(C+" is not a valid compression method !");return y})(_.options.compression,l.compression),g=_.options.compressionOptions||l.compressionOptions||{},S=_.dir,b=_.date;_._compressWorker(f,g).withStreamInfo("file",{name:p,dir:S,date:b,comment:_.comment||"",unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions}).pipe(d)}),d.entriesCount=u}catch(p){d.error(p)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,i){function a(){if(!(this instanceof a))return new a;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var s=new a;for(var o in this)typeof this[o]!="function"&&(s[o]=this[o]);return s}}(a.prototype=n("./object")).loadAsync=n("./load"),a.support=n("./support"),a.defaults=n("./defaults"),a.version="3.10.1",a.loadAsync=function(s,o){return new a().loadAsync(s,o)},a.external=n("./external"),r.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,i){var a=n("./utils"),s=n("./external"),o=n("./utf8"),l=n("./zipEntries"),c=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function u(p){return new s.Promise(function(_,f){var g=p.decompressed.getContentWorker().pipe(new c);g.on("error",function(S){f(S)}).on("end",function(){g.streamInfo.crc32!==p.decompressed.crc32?f(new Error("Corrupted zip : CRC32 mismatch")):_()}).resume()})}r.exports=function(p,_){var f=this;return _=a.extend(_||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),d.isNode&&d.isStream(p)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",p,!0,_.optimizedBinaryString,_.base64).then(function(g){var S=new l(_);return S.load(g),S}).then(function(g){var S=[s.Promise.resolve(g)],b=g.files;if(_.checkCRC32)for(var h=0;h<b.length;h++)S.push(u(b[h]));return s.Promise.all(S)}).then(function(g){for(var S=g.shift(),b=S.files,h=0;h<b.length;h++){var v=b[h],C=v.fileNameStr,y=a.resolve(v.fileNameStr);f.file(y,v.decompressed,{binary:!0,optimizedBinaryString:!0,date:v.date,dir:v.dir,comment:v.fileCommentStr.length?v.fileCommentStr:null,unixPermissions:v.unixPermissions,dosPermissions:v.dosPermissions,createFolders:_.createFolders}),v.dir||(f.file(y).unsafeOriginalName=C)}return S.zipComment.length&&(f.comment=S.zipComment),f})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,i){var a=n("../utils"),s=n("../stream/GenericWorker");function o(l,c){s.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}a.inherits(o,s),o.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(d){c.push({data:d,meta:{percent:0}})}).on("error",function(d){c.isPaused?this.generatedError=d:c.error(d)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},o.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,i){var a=n("readable-stream").Readable;function s(o,l,c){a.call(this,l),this._helper=o;var d=this;o.on("data",function(u,p){d.push(u)||d._helper.pause(),c&&c(p)}).on("error",function(u){d.emit("error",u)}).on("end",function(){d.push(null)})}n("../utils").inherits(s,a),s.prototype._read=function(){this._helper.resume()},r.exports=s},{"../utils":32,"readable-stream":16}],14:[function(n,r,i){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(a,s){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(a,s);if(typeof a=="number")throw new Error('The "data" argument must not be a number');return new Buffer(a,s)},allocBuffer:function(a){if(Buffer.alloc)return Buffer.alloc(a);var s=new Buffer(a);return s.fill(0),s},isBuffer:function(a){return Buffer.isBuffer(a)},isStream:function(a){return a&&typeof a.on=="function"&&typeof a.pause=="function"&&typeof a.resume=="function"}}},{}],15:[function(n,r,i){function a(y,D,L){var O,N=o.getTypeOf(D),B=o.extend(L||{},d);B.date=B.date||new Date,B.compression!==null&&(B.compression=B.compression.toUpperCase()),typeof B.unixPermissions=="string"&&(B.unixPermissions=parseInt(B.unixPermissions,8)),B.unixPermissions&&16384&B.unixPermissions&&(B.dir=!0),B.dosPermissions&&16&B.dosPermissions&&(B.dir=!0),B.dir&&(y=b(y)),B.createFolders&&(O=S(y))&&h.call(this,O,!0);var K=N==="string"&&B.binary===!1&&B.base64===!1;L&&L.binary!==void 0||(B.binary=!K),(D instanceof u&&D.uncompressedSize===0||B.dir||!D||D.length===0)&&(B.base64=!1,B.binary=!0,D="",B.compression="STORE",N="string");var I=null;I=D instanceof u||D instanceof l?D:f.isNode&&f.isStream(D)?new g(y,D):o.prepareContent(y,D,B.binary,B.optimizedBinaryString,B.base64);var W=new p(y,I,B);this.files[y]=W}var s=n("./utf8"),o=n("./utils"),l=n("./stream/GenericWorker"),c=n("./stream/StreamHelper"),d=n("./defaults"),u=n("./compressedObject"),p=n("./zipObject"),_=n("./generate"),f=n("./nodejsUtils"),g=n("./nodejs/NodejsStreamInputAdapter"),S=function(y){y.slice(-1)==="/"&&(y=y.substring(0,y.length-1));var D=y.lastIndexOf("/");return 0<D?y.substring(0,D):""},b=function(y){return y.slice(-1)!=="/"&&(y+="/"),y},h=function(y,D){return D=D!==void 0?D:d.createFolders,y=b(y),this.files[y]||a.call(this,y,null,{dir:!0,createFolders:D}),this.files[y]};function v(y){return Object.prototype.toString.call(y)==="[object RegExp]"}var C={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(y){var D,L,O;for(D in this.files)O=this.files[D],(L=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&y(L,O)},filter:function(y){var D=[];return this.forEach(function(L,O){y(L,O)&&D.push(O)}),D},file:function(y,D,L){if(arguments.length!==1)return y=this.root+y,a.call(this,y,D,L),this;if(v(y)){var O=y;return this.filter(function(B,K){return!K.dir&&O.test(B)})}var N=this.files[this.root+y];return N&&!N.dir?N:null},folder:function(y){if(!y)return this;if(v(y))return this.filter(function(N,B){return B.dir&&y.test(N)});var D=this.root+y,L=h.call(this,D),O=this.clone();return O.root=L.name,O},remove:function(y){y=this.root+y;var D=this.files[y];if(D||(y.slice(-1)!=="/"&&(y+="/"),D=this.files[y]),D&&!D.dir)delete this.files[y];else for(var L=this.filter(function(N,B){return B.name.slice(0,y.length)===y}),O=0;O<L.length;O++)delete this.files[L[O].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(y){var D,L={};try{if((L=o.extend(y||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=L.type.toLowerCase(),L.compression=L.compression.toUpperCase(),L.type==="binarystring"&&(L.type="string"),!L.type)throw new Error("No output type specified.");o.checkSupport(L.type),L.platform!=="darwin"&&L.platform!=="freebsd"&&L.platform!=="linux"&&L.platform!=="sunos"||(L.platform="UNIX"),L.platform==="win32"&&(L.platform="DOS");var O=L.comment||this.comment||"";D=_.generateWorker(this,L,O)}catch(N){(D=new l("error")).error(N)}return new c(D,L.type||"string",L.mimeType)},generateAsync:function(y,D){return this.generateInternalStream(y).accumulate(D)},generateNodeStream:function(y,D){return(y=y||{}).type||(y.type="nodebuffer"),this.generateInternalStream(y).toNodejsStream(D)}};r.exports=C},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,i){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,i){var a=n("./DataReader");function s(o){a.call(this,o);for(var l=0;l<this.data.length;l++)o[l]=255&o[l]}n("../utils").inherits(s,a),s.prototype.byteAt=function(o){return this.data[this.zero+o]},s.prototype.lastIndexOfSignature=function(o){for(var l=o.charCodeAt(0),c=o.charCodeAt(1),d=o.charCodeAt(2),u=o.charCodeAt(3),p=this.length-4;0<=p;--p)if(this.data[p]===l&&this.data[p+1]===c&&this.data[p+2]===d&&this.data[p+3]===u)return p-this.zero;return-1},s.prototype.readAndCheckSignature=function(o){var l=o.charCodeAt(0),c=o.charCodeAt(1),d=o.charCodeAt(2),u=o.charCodeAt(3),p=this.readData(4);return l===p[0]&&c===p[1]&&d===p[2]&&u===p[3]},s.prototype.readData=function(o){if(this.checkOffset(o),o===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},r.exports=s},{"../utils":32,"./DataReader":18}],18:[function(n,r,i){var a=n("../utils");function s(o){this.data=o,this.length=o.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(o){this.checkIndex(this.index+o)},checkIndex:function(o){if(this.length<this.zero+o||o<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+o+"). Corrupted zip ?")},setIndex:function(o){this.checkIndex(o),this.index=o},skip:function(o){this.setIndex(this.index+o)},byteAt:function(){},readInt:function(o){var l,c=0;for(this.checkOffset(o),l=this.index+o-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=o,c},readString:function(o){return a.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},r.exports=s},{"../utils":32}],19:[function(n,r,i){var a=n("./Uint8ArrayReader");function s(o){a.call(this,o)}n("../utils").inherits(s,a),s.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},r.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,i){var a=n("./DataReader");function s(o){a.call(this,o)}n("../utils").inherits(s,a),s.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},s.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},s.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},s.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},r.exports=s},{"../utils":32,"./DataReader":18}],21:[function(n,r,i){var a=n("./ArrayReader");function s(o){a.call(this,o)}n("../utils").inherits(s,a),s.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},r.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,i){var a=n("../utils"),s=n("../support"),o=n("./ArrayReader"),l=n("./StringReader"),c=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(u){var p=a.getTypeOf(u);return a.checkSupport(p),p!=="string"||s.uint8array?p==="nodebuffer"?new c(u):s.uint8array?new d(a.transformTo("uint8array",u)):new o(a.transformTo("array",u)):new l(u)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,i){var a=n("./GenericWorker"),s=n("../utils");function o(l){a.call(this,"ConvertWorker to "+l),this.destType=l}s.inherits(o,a),o.prototype.processChunk=function(l){this.push({data:s.transformTo(this.destType,l.data),meta:l.meta})},r.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,i){var a=n("./GenericWorker"),s=n("../crc32");function o(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(o,a),o.prototype.processChunk=function(l){this.streamInfo.crc32=s(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,i){var a=n("../utils"),s=n("./GenericWorker");function o(l){s.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}a.inherits(o,s),o.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}s.prototype.processChunk.call(this,l)},r.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,i){var a=n("../utils"),s=n("./GenericWorker");function o(l){s.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(d){c.dataIsReady=!0,c.data=d,c.max=d&&d.length||0,c.type=a.getTypeOf(d),c.isPaused||c._tickAndRepeat()},function(d){c.error(d)})}a.inherits(o,s),o.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,i){function a(s){this.name=s||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}a.prototype={push:function(s){this.emit("data",s)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(s){this.emit("error",s)}return!0},error:function(s){return!this.isFinished&&(this.isPaused?this.generatedError=s:(this.isFinished=!0,this.emit("error",s),this.previous&&this.previous.error(s),this.cleanUp()),!0)},on:function(s,o){return this._listeners[s].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(s,o){if(this._listeners[s])for(var l=0;l<this._listeners[s].length;l++)this._listeners[s][l].call(this,o)},pipe:function(s){return s.registerPrevious(this)},registerPrevious:function(s){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=s.streamInfo,this.mergeStreamInfo(),this.previous=s;var o=this;return s.on("data",function(l){o.processChunk(l)}),s.on("end",function(){o.end()}),s.on("error",function(l){o.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var s=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),s=!0),this.previous&&this.previous.resume(),!s},flush:function(){},processChunk:function(s){this.push(s)},withStreamInfo:function(s,o){return this.extraStreamInfo[s]=o,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var s in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,s)&&(this.streamInfo[s]=this.extraStreamInfo[s])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var s="Worker "+this.name;return this.previous?this.previous+" -> "+s:s}},r.exports=a},{}],29:[function(n,r,i){var a=n("../utils"),s=n("./ConvertWorker"),o=n("./GenericWorker"),l=n("../base64"),c=n("../support"),d=n("../external"),u=null;if(c.nodestream)try{u=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(f,g){return new d.Promise(function(S,b){var h=[],v=f._internalType,C=f._outputType,y=f._mimeType;f.on("data",function(D,L){h.push(D),g&&g(L)}).on("error",function(D){h=[],b(D)}).on("end",function(){try{var D=(function(L,O,N){switch(L){case"blob":return a.newBlob(a.transformTo("arraybuffer",O),N);case"base64":return l.encode(O);default:return a.transformTo(L,O)}})(C,(function(L,O){var N,B=0,K=null,I=0;for(N=0;N<O.length;N++)I+=O[N].length;switch(L){case"string":return O.join("");case"array":return Array.prototype.concat.apply([],O);case"uint8array":for(K=new Uint8Array(I),N=0;N<O.length;N++)K.set(O[N],B),B+=O[N].length;return K;case"nodebuffer":return Buffer.concat(O);default:throw new Error("concat : unsupported type '"+L+"'")}})(v,h),y);S(D)}catch(L){b(L)}h=[]}).resume()})}function _(f,g,S){var b=g;switch(g){case"blob":case"arraybuffer":b="uint8array";break;case"base64":b="string"}try{this._internalType=b,this._outputType=g,this._mimeType=S,a.checkSupport(b),this._worker=f.pipe(new s(b)),f.lock()}catch(h){this._worker=new o("error"),this._worker.error(h)}}_.prototype={accumulate:function(f){return p(this,f)},on:function(f,g){var S=this;return f==="data"?this._worker.on(f,function(b){g.call(S,b.data,b.meta)}):this._worker.on(f,function(){a.delay(g,arguments,S)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(f){if(a.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:this._outputType!=="nodebuffer"},f)}},r.exports=_},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var a=new ArrayBuffer(0);try{i.blob=new Blob([a],{type:"application/zip"}).size===0}catch{try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(a),i.blob=s.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!n("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,i){for(var a=n("./utils"),s=n("./support"),o=n("./nodejsUtils"),l=n("./stream/GenericWorker"),c=new Array(256),d=0;d<256;d++)c[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;c[254]=c[254]=1;function u(){l.call(this,"utf-8 decode"),this.leftOver=null}function p(){l.call(this,"utf-8 encode")}i.utf8encode=function(_){return s.nodebuffer?o.newBufferFrom(_,"utf-8"):(function(f){var g,S,b,h,v,C=f.length,y=0;for(h=0;h<C;h++)(64512&(S=f.charCodeAt(h)))==55296&&h+1<C&&(64512&(b=f.charCodeAt(h+1)))==56320&&(S=65536+(S-55296<<10)+(b-56320),h++),y+=S<128?1:S<2048?2:S<65536?3:4;for(g=s.uint8array?new Uint8Array(y):new Array(y),h=v=0;v<y;h++)(64512&(S=f.charCodeAt(h)))==55296&&h+1<C&&(64512&(b=f.charCodeAt(h+1)))==56320&&(S=65536+(S-55296<<10)+(b-56320),h++),S<128?g[v++]=S:(S<2048?g[v++]=192|S>>>6:(S<65536?g[v++]=224|S>>>12:(g[v++]=240|S>>>18,g[v++]=128|S>>>12&63),g[v++]=128|S>>>6&63),g[v++]=128|63&S);return g})(_)},i.utf8decode=function(_){return s.nodebuffer?a.transformTo("nodebuffer",_).toString("utf-8"):(function(f){var g,S,b,h,v=f.length,C=new Array(2*v);for(g=S=0;g<v;)if((b=f[g++])<128)C[S++]=b;else if(4<(h=c[b]))C[S++]=65533,g+=h-1;else{for(b&=h===2?31:h===3?15:7;1<h&&g<v;)b=b<<6|63&f[g++],h--;1<h?C[S++]=65533:b<65536?C[S++]=b:(b-=65536,C[S++]=55296|b>>10&1023,C[S++]=56320|1023&b)}return C.length!==S&&(C.subarray?C=C.subarray(0,S):C.length=S),a.applyFromCharCode(C)})(_=a.transformTo(s.uint8array?"uint8array":"array",_))},a.inherits(u,l),u.prototype.processChunk=function(_){var f=a.transformTo(s.uint8array?"uint8array":"array",_.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var g=f;(f=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),f.set(g,this.leftOver.length)}else f=this.leftOver.concat(f);this.leftOver=null}var S=(function(h,v){var C;for((v=v||h.length)>h.length&&(v=h.length),C=v-1;0<=C&&(192&h[C])==128;)C--;return C<0||C===0?v:C+c[h[C]]>v?C:v})(f),b=f;S!==f.length&&(s.uint8array?(b=f.subarray(0,S),this.leftOver=f.subarray(S,f.length)):(b=f.slice(0,S),this.leftOver=f.slice(S,f.length))),this.push({data:i.utf8decode(b),meta:_.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=u,a.inherits(p,l),p.prototype.processChunk=function(_){this.push({data:i.utf8encode(_.data),meta:_.meta})},i.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,i){var a=n("./support"),s=n("./base64"),o=n("./nodejsUtils"),l=n("./external");function c(g){return g}function d(g,S){for(var b=0;b<g.length;++b)S[b]=255&g.charCodeAt(b);return S}n("setimmediate"),i.newBlob=function(g,S){i.checkSupport("blob");try{return new Blob([g],{type:S})}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return b.append(g),b.getBlob(S)}catch{throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(g,S,b){var h=[],v=0,C=g.length;if(C<=b)return String.fromCharCode.apply(null,g);for(;v<C;)S==="array"||S==="nodebuffer"?h.push(String.fromCharCode.apply(null,g.slice(v,Math.min(v+b,C)))):h.push(String.fromCharCode.apply(null,g.subarray(v,Math.min(v+b,C)))),v+=b;return h.join("")},stringifyByChar:function(g){for(var S="",b=0;b<g.length;b++)S+=String.fromCharCode(g[b]);return S},applyCanBeUsed:{uint8array:(function(){try{return a.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return a.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch{return!1}})()}};function p(g){var S=65536,b=i.getTypeOf(g),h=!0;if(b==="uint8array"?h=u.applyCanBeUsed.uint8array:b==="nodebuffer"&&(h=u.applyCanBeUsed.nodebuffer),h)for(;1<S;)try{return u.stringifyByChunk(g,b,S)}catch{S=Math.floor(S/2)}return u.stringifyByChar(g)}function _(g,S){for(var b=0;b<g.length;b++)S[b]=g[b];return S}i.applyFromCharCode=p;var f={};f.string={string:c,array:function(g){return d(g,new Array(g.length))},arraybuffer:function(g){return f.string.uint8array(g).buffer},uint8array:function(g){return d(g,new Uint8Array(g.length))},nodebuffer:function(g){return d(g,o.allocBuffer(g.length))}},f.array={string:p,array:c,arraybuffer:function(g){return new Uint8Array(g).buffer},uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return o.newBufferFrom(g)}},f.arraybuffer={string:function(g){return p(new Uint8Array(g))},array:function(g){return _(new Uint8Array(g),new Array(g.byteLength))},arraybuffer:c,uint8array:function(g){return new Uint8Array(g)},nodebuffer:function(g){return o.newBufferFrom(new Uint8Array(g))}},f.uint8array={string:p,array:function(g){return _(g,new Array(g.length))},arraybuffer:function(g){return g.buffer},uint8array:c,nodebuffer:function(g){return o.newBufferFrom(g)}},f.nodebuffer={string:p,array:function(g){return _(g,new Array(g.length))},arraybuffer:function(g){return f.nodebuffer.uint8array(g).buffer},uint8array:function(g){return _(g,new Uint8Array(g.length))},nodebuffer:c},i.transformTo=function(g,S){if(S=S||"",!g)return S;i.checkSupport(g);var b=i.getTypeOf(S);return f[b][g](S)},i.resolve=function(g){for(var S=g.split("/"),b=[],h=0;h<S.length;h++){var v=S[h];v==="."||v===""&&h!==0&&h!==S.length-1||(v===".."?b.pop():b.push(v))}return b.join("/")},i.getTypeOf=function(g){return typeof g=="string"?"string":Object.prototype.toString.call(g)==="[object Array]"?"array":a.nodebuffer&&o.isBuffer(g)?"nodebuffer":a.uint8array&&g instanceof Uint8Array?"uint8array":a.arraybuffer&&g instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(g){if(!a[g.toLowerCase()])throw new Error(g+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(g){var S,b,h="";for(b=0;b<(g||"").length;b++)h+="\\x"+((S=g.charCodeAt(b))<16?"0":"")+S.toString(16).toUpperCase();return h},i.delay=function(g,S,b){setImmediate(function(){g.apply(b||null,S||[])})},i.inherits=function(g,S){function b(){}b.prototype=S.prototype,g.prototype=new b},i.extend=function(){var g,S,b={};for(g=0;g<arguments.length;g++)for(S in arguments[g])Object.prototype.hasOwnProperty.call(arguments[g],S)&&b[S]===void 0&&(b[S]=arguments[g][S]);return b},i.prepareContent=function(g,S,b,h,v){return l.Promise.resolve(S).then(function(C){return a.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new l.Promise(function(y,D){var L=new FileReader;L.onload=function(O){y(O.target.result)},L.onerror=function(O){D(O.target.error)},L.readAsArrayBuffer(C)}):C}).then(function(C){var y=i.getTypeOf(C);return y?(y==="arraybuffer"?C=i.transformTo("uint8array",C):y==="string"&&(v?C=s.decode(C):b&&h!==!0&&(C=(function(D){return d(D,a.uint8array?new Uint8Array(D.length):new Array(D.length))})(C))),C):l.Promise.reject(new Error("Can't read the data of '"+g+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,i){var a=n("./reader/readerFor"),s=n("./utils"),o=n("./signature"),l=n("./zipEntry"),c=n("./support");function d(u){this.files=[],this.loadOptions=u}d.prototype={checkSignature:function(u){if(!this.reader.readAndCheckSignature(u)){this.reader.index-=4;var p=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(p)+", expected "+s.pretty(u)+")")}},isSignature:function(u,p){var _=this.reader.index;this.reader.setIndex(u);var f=this.reader.readString(4)===p;return this.reader.setIndex(_),f},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var u=this.reader.readData(this.zipCommentLength),p=c.uint8array?"uint8array":"array",_=s.transformTo(p,u);this.zipComment=this.loadOptions.decodeFileName(_)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var u,p,_,f=this.zip64EndOfCentralSize-44;0<f;)u=this.reader.readInt(2),p=this.reader.readInt(4),_=this.reader.readData(p),this.zip64ExtensibleData[u]={id:u,length:p,value:_}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var u,p;for(u=0;u<this.files.length;u++)p=this.files[u],this.reader.setIndex(p.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),p.readLocalPart(this.reader),p.handleUTF8(),p.processAttributes()},readCentralDir:function(){var u;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(u=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(u);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var u=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(u<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(u);var p=u;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(u=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(u),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var _=this.centralDirOffset+this.centralDirSize;this.zip64&&(_+=20,_+=12+this.zip64EndOfCentralSize);var f=p-_;if(0<f)this.isSignature(p,o.CENTRAL_FILE_HEADER)||(this.reader.zero=f);else if(f<0)throw new Error("Corrupted zip: missing "+Math.abs(f)+" bytes.")},prepareReader:function(u){this.reader=a(u)},load:function(u){this.prepareReader(u),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,i){var a=n("./reader/readerFor"),s=n("./utils"),o=n("./compressedObject"),l=n("./crc32"),c=n("./utf8"),d=n("./compressions"),u=n("./support");function p(_,f){this.options=_,this.loadOptions=f}p.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(_){var f,g;if(_.skip(22),this.fileNameLength=_.readInt(2),g=_.readInt(2),this.fileName=_.readData(this.fileNameLength),_.skip(g),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((f=(function(S){for(var b in d)if(Object.prototype.hasOwnProperty.call(d,b)&&d[b].magic===S)return d[b];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,f,_.readData(this.compressedSize))},readCentralPart:function(_){this.versionMadeBy=_.readInt(2),_.skip(2),this.bitFlag=_.readInt(2),this.compressionMethod=_.readString(2),this.date=_.readDate(),this.crc32=_.readInt(4),this.compressedSize=_.readInt(4),this.uncompressedSize=_.readInt(4);var f=_.readInt(2);if(this.extraFieldsLength=_.readInt(2),this.fileCommentLength=_.readInt(2),this.diskNumberStart=_.readInt(2),this.internalFileAttributes=_.readInt(2),this.externalFileAttributes=_.readInt(4),this.localHeaderOffset=_.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");_.skip(f),this.readExtraFields(_),this.parseZIP64ExtraField(_),this.fileComment=_.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var _=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),_==0&&(this.dosPermissions=63&this.externalFileAttributes),_==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var _=a(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=_.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=_.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=_.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=_.readInt(4))}},readExtraFields:function(_){var f,g,S,b=_.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});_.index+4<b;)f=_.readInt(2),g=_.readInt(2),S=_.readData(g),this.extraFields[f]={id:f,length:g,value:S};_.setIndex(b)},handleUTF8:function(){var _=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var f=this.findExtraFieldUnicodePath();if(f!==null)this.fileNameStr=f;else{var g=s.transformTo(_,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(g)}var S=this.findExtraFieldUnicodeComment();if(S!==null)this.fileCommentStr=S;else{var b=s.transformTo(_,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var _=this.extraFields[28789];if(_){var f=a(_.value);return f.readInt(1)!==1||l(this.fileName)!==f.readInt(4)?null:c.utf8decode(f.readData(_.length-5))}return null},findExtraFieldUnicodeComment:function(){var _=this.extraFields[25461];if(_){var f=a(_.value);return f.readInt(1)!==1||l(this.fileComment)!==f.readInt(4)?null:c.utf8decode(f.readData(_.length-5))}return null}},r.exports=p},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,i){function a(f,g,S){this.name=f,this.dir=S.dir,this.date=S.date,this.comment=S.comment,this.unixPermissions=S.unixPermissions,this.dosPermissions=S.dosPermissions,this._data=g,this._dataBinary=S.binary,this.options={compression:S.compression,compressionOptions:S.compressionOptions}}var s=n("./stream/StreamHelper"),o=n("./stream/DataWorker"),l=n("./utf8"),c=n("./compressedObject"),d=n("./stream/GenericWorker");a.prototype={internalStream:function(f){var g=null,S="string";try{if(!f)throw new Error("No output type specified.");var b=(S=f.toLowerCase())==="string"||S==="text";S!=="binarystring"&&S!=="text"||(S="string"),g=this._decompressWorker();var h=!this._dataBinary;h&&!b&&(g=g.pipe(new l.Utf8EncodeWorker)),!h&&b&&(g=g.pipe(new l.Utf8DecodeWorker))}catch(v){(g=new d("error")).error(v)}return new s(g,S,"")},async:function(f,g){return this.internalStream(f).accumulate(g)},nodeStream:function(f,g){return this.internalStream(f||"nodebuffer").toNodejsStream(g)},_compressWorker:function(f,g){if(this._data instanceof c&&this._data.compression.magic===f.magic)return this._data.getCompressedWorker();var S=this._decompressWorker();return this._dataBinary||(S=S.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(S,f,g)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof d?this._data:new o(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],p=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},_=0;_<u.length;_++)a.prototype[u[_]]=p;r.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,i){(function(a){var s,o,l=a.MutationObserver||a.WebKitMutationObserver;if(l){var c=0,d=new l(f),u=a.document.createTextNode("");d.observe(u,{characterData:!0}),s=function(){u.data=c=++c%2}}else if(a.setImmediate||a.MessageChannel===void 0)s="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var g=a.document.createElement("script");g.onreadystatechange=function(){f(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},a.document.documentElement.appendChild(g)}:function(){setTimeout(f,0)};else{var p=new a.MessageChannel;p.port1.onmessage=f,s=function(){p.port2.postMessage(0)}}var _=[];function f(){var g,S;o=!0;for(var b=_.length;b;){for(S=_,_=[],g=-1;++g<b;)S[g]();b=_.length}o=!1}r.exports=function(g){_.push(g)!==1||o||s()}}).call(this,typeof Ui<"u"?Ui:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,i){var a=n("immediate");function s(){}var o={},l=["REJECTED"],c=["FULFILLED"],d=["PENDING"];function u(b){if(typeof b!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,b!==s&&g(this,b)}function p(b,h,v){this.promise=b,typeof h=="function"&&(this.onFulfilled=h,this.callFulfilled=this.otherCallFulfilled),typeof v=="function"&&(this.onRejected=v,this.callRejected=this.otherCallRejected)}function _(b,h,v){a(function(){var C;try{C=h(v)}catch(y){return o.reject(b,y)}C===b?o.reject(b,new TypeError("Cannot resolve promise with itself")):o.resolve(b,C)})}function f(b){var h=b&&b.then;if(b&&(typeof b=="object"||typeof b=="function")&&typeof h=="function")return function(){h.apply(b,arguments)}}function g(b,h){var v=!1;function C(L){v||(v=!0,o.reject(b,L))}function y(L){v||(v=!0,o.resolve(b,L))}var D=S(function(){h(y,C)});D.status==="error"&&C(D.value)}function S(b,h){var v={};try{v.value=b(h),v.status="success"}catch(C){v.status="error",v.value=C}return v}(r.exports=u).prototype.finally=function(b){if(typeof b!="function")return this;var h=this.constructor;return this.then(function(v){return h.resolve(b()).then(function(){return v})},function(v){return h.resolve(b()).then(function(){throw v})})},u.prototype.catch=function(b){return this.then(null,b)},u.prototype.then=function(b,h){if(typeof b!="function"&&this.state===c||typeof h!="function"&&this.state===l)return this;var v=new this.constructor(s);return this.state!==d?_(v,this.state===c?b:h,this.outcome):this.queue.push(new p(v,b,h)),v},p.prototype.callFulfilled=function(b){o.resolve(this.promise,b)},p.prototype.otherCallFulfilled=function(b){_(this.promise,this.onFulfilled,b)},p.prototype.callRejected=function(b){o.reject(this.promise,b)},p.prototype.otherCallRejected=function(b){_(this.promise,this.onRejected,b)},o.resolve=function(b,h){var v=S(f,h);if(v.status==="error")return o.reject(b,v.value);var C=v.value;if(C)g(b,C);else{b.state=c,b.outcome=h;for(var y=-1,D=b.queue.length;++y<D;)b.queue[y].callFulfilled(h)}return b},o.reject=function(b,h){b.state=l,b.outcome=h;for(var v=-1,C=b.queue.length;++v<C;)b.queue[v].callRejected(h);return b},u.resolve=function(b){return b instanceof this?b:o.resolve(new this(s),b)},u.reject=function(b){var h=new this(s);return o.reject(h,b)},u.all=function(b){var h=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=b.length,C=!1;if(!v)return this.resolve([]);for(var y=new Array(v),D=0,L=-1,O=new this(s);++L<v;)N(b[L],L);return O;function N(B,K){h.resolve(B).then(function(I){y[K]=I,++D!==v||C||(C=!0,o.resolve(O,y))},function(I){C||(C=!0,o.reject(O,I))})}},u.race=function(b){var h=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=b.length,C=!1;if(!v)return this.resolve([]);for(var y=-1,D=new this(s);++y<v;)L=b[y],h.resolve(L).then(function(O){C||(C=!0,o.resolve(D,O))},function(O){C||(C=!0,o.reject(D,O))});var L;return D}},{immediate:36}],38:[function(n,r,i){var a={};(0,n("./lib/utils/common").assign)(a,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,i){var a=n("./zlib/deflate"),s=n("./utils/common"),o=n("./utils/strings"),l=n("./zlib/messages"),c=n("./zlib/zstream"),d=Object.prototype.toString,u=0,p=-1,_=0,f=8;function g(b){if(!(this instanceof g))return new g(b);this.options=s.assign({level:p,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:_,to:""},b||{});var h=this.options;h.raw&&0<h.windowBits?h.windowBits=-h.windowBits:h.gzip&&0<h.windowBits&&h.windowBits<16&&(h.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var v=a.deflateInit2(this.strm,h.level,h.method,h.windowBits,h.memLevel,h.strategy);if(v!==u)throw new Error(l[v]);if(h.header&&a.deflateSetHeader(this.strm,h.header),h.dictionary){var C;if(C=typeof h.dictionary=="string"?o.string2buf(h.dictionary):d.call(h.dictionary)==="[object ArrayBuffer]"?new Uint8Array(h.dictionary):h.dictionary,(v=a.deflateSetDictionary(this.strm,C))!==u)throw new Error(l[v]);this._dict_set=!0}}function S(b,h){var v=new g(h);if(v.push(b,!0),v.err)throw v.msg||l[v.err];return v.result}g.prototype.push=function(b,h){var v,C,y=this.strm,D=this.options.chunkSize;if(this.ended)return!1;C=h===~~h?h:h===!0?4:0,typeof b=="string"?y.input=o.string2buf(b):d.call(b)==="[object ArrayBuffer]"?y.input=new Uint8Array(b):y.input=b,y.next_in=0,y.avail_in=y.input.length;do{if(y.avail_out===0&&(y.output=new s.Buf8(D),y.next_out=0,y.avail_out=D),(v=a.deflate(y,C))!==1&&v!==u)return this.onEnd(v),!(this.ended=!0);y.avail_out!==0&&(y.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(o.buf2binstring(s.shrinkBuf(y.output,y.next_out))):this.onData(s.shrinkBuf(y.output,y.next_out)))}while((0<y.avail_in||y.avail_out===0)&&v!==1);return C===4?(v=a.deflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===u):C!==2||(this.onEnd(u),!(y.avail_out=0))},g.prototype.onData=function(b){this.chunks.push(b)},g.prototype.onEnd=function(b){b===u&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},i.Deflate=g,i.deflate=S,i.deflateRaw=function(b,h){return(h=h||{}).raw=!0,S(b,h)},i.gzip=function(b,h){return(h=h||{}).gzip=!0,S(b,h)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,i){var a=n("./zlib/inflate"),s=n("./utils/common"),o=n("./utils/strings"),l=n("./zlib/constants"),c=n("./zlib/messages"),d=n("./zlib/zstream"),u=n("./zlib/gzheader"),p=Object.prototype.toString;function _(g){if(!(this instanceof _))return new _(g);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},g||{});var S=this.options;S.raw&&0<=S.windowBits&&S.windowBits<16&&(S.windowBits=-S.windowBits,S.windowBits===0&&(S.windowBits=-15)),!(0<=S.windowBits&&S.windowBits<16)||g&&g.windowBits||(S.windowBits+=32),15<S.windowBits&&S.windowBits<48&&(15&S.windowBits)==0&&(S.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var b=a.inflateInit2(this.strm,S.windowBits);if(b!==l.Z_OK)throw new Error(c[b]);this.header=new u,a.inflateGetHeader(this.strm,this.header)}function f(g,S){var b=new _(S);if(b.push(g,!0),b.err)throw b.msg||c[b.err];return b.result}_.prototype.push=function(g,S){var b,h,v,C,y,D,L=this.strm,O=this.options.chunkSize,N=this.options.dictionary,B=!1;if(this.ended)return!1;h=S===~~S?S:S===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof g=="string"?L.input=o.binstring2buf(g):p.call(g)==="[object ArrayBuffer]"?L.input=new Uint8Array(g):L.input=g,L.next_in=0,L.avail_in=L.input.length;do{if(L.avail_out===0&&(L.output=new s.Buf8(O),L.next_out=0,L.avail_out=O),(b=a.inflate(L,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&N&&(D=typeof N=="string"?o.string2buf(N):p.call(N)==="[object ArrayBuffer]"?new Uint8Array(N):N,b=a.inflateSetDictionary(this.strm,D)),b===l.Z_BUF_ERROR&&B===!0&&(b=l.Z_OK,B=!1),b!==l.Z_STREAM_END&&b!==l.Z_OK)return this.onEnd(b),!(this.ended=!0);L.next_out&&(L.avail_out!==0&&b!==l.Z_STREAM_END&&(L.avail_in!==0||h!==l.Z_FINISH&&h!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(v=o.utf8border(L.output,L.next_out),C=L.next_out-v,y=o.buf2string(L.output,v),L.next_out=C,L.avail_out=O-C,C&&s.arraySet(L.output,L.output,v,C,0),this.onData(y)):this.onData(s.shrinkBuf(L.output,L.next_out)))),L.avail_in===0&&L.avail_out===0&&(B=!0)}while((0<L.avail_in||L.avail_out===0)&&b!==l.Z_STREAM_END);return b===l.Z_STREAM_END&&(h=l.Z_FINISH),h===l.Z_FINISH?(b=a.inflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===l.Z_OK):h!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(L.avail_out=0))},_.prototype.onData=function(g){this.chunks.push(g)},_.prototype.onEnd=function(g){g===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},i.Inflate=_,i.inflate=f,i.inflateRaw=function(g,S){return(S=S||{}).raw=!0,f(g,S)},i.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,i){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var u in d)d.hasOwnProperty(u)&&(l[u]=d[u])}}return l},i.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var s={arraySet:function(l,c,d,u,p){if(c.subarray&&l.subarray)l.set(c.subarray(d,d+u),p);else for(var _=0;_<u;_++)l[p+_]=c[d+_]},flattenChunks:function(l){var c,d,u,p,_,f;for(c=u=0,d=l.length;c<d;c++)u+=l[c].length;for(f=new Uint8Array(u),c=p=0,d=l.length;c<d;c++)_=l[c],f.set(_,p),p+=_.length;return f}},o={arraySet:function(l,c,d,u,p){for(var _=0;_<u;_++)l[p+_]=c[d+_]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,s)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,o))},i.setTyped(a)},{}],42:[function(n,r,i){var a=n("./common"),s=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch{s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{o=!1}for(var l=new a.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function d(u,p){if(p<65537&&(u.subarray&&o||!u.subarray&&s))return String.fromCharCode.apply(null,a.shrinkBuf(u,p));for(var _="",f=0;f<p;f++)_+=String.fromCharCode(u[f]);return _}l[254]=l[254]=1,i.string2buf=function(u){var p,_,f,g,S,b=u.length,h=0;for(g=0;g<b;g++)(64512&(_=u.charCodeAt(g)))==55296&&g+1<b&&(64512&(f=u.charCodeAt(g+1)))==56320&&(_=65536+(_-55296<<10)+(f-56320),g++),h+=_<128?1:_<2048?2:_<65536?3:4;for(p=new a.Buf8(h),g=S=0;S<h;g++)(64512&(_=u.charCodeAt(g)))==55296&&g+1<b&&(64512&(f=u.charCodeAt(g+1)))==56320&&(_=65536+(_-55296<<10)+(f-56320),g++),_<128?p[S++]=_:(_<2048?p[S++]=192|_>>>6:(_<65536?p[S++]=224|_>>>12:(p[S++]=240|_>>>18,p[S++]=128|_>>>12&63),p[S++]=128|_>>>6&63),p[S++]=128|63&_);return p},i.buf2binstring=function(u){return d(u,u.length)},i.binstring2buf=function(u){for(var p=new a.Buf8(u.length),_=0,f=p.length;_<f;_++)p[_]=u.charCodeAt(_);return p},i.buf2string=function(u,p){var _,f,g,S,b=p||u.length,h=new Array(2*b);for(_=f=0;_<b;)if((g=u[_++])<128)h[f++]=g;else if(4<(S=l[g]))h[f++]=65533,_+=S-1;else{for(g&=S===2?31:S===3?15:7;1<S&&_<b;)g=g<<6|63&u[_++],S--;1<S?h[f++]=65533:g<65536?h[f++]=g:(g-=65536,h[f++]=55296|g>>10&1023,h[f++]=56320|1023&g)}return d(h,f)},i.utf8border=function(u,p){var _;for((p=p||u.length)>u.length&&(p=u.length),_=p-1;0<=_&&(192&u[_])==128;)_--;return _<0||_===0?p:_+l[u[_]]>p?_:p}},{"./common":41}],43:[function(n,r,i){r.exports=function(a,s,o,l){for(var c=65535&a|0,d=a>>>16&65535|0,u=0;o!==0;){for(o-=u=2e3<o?2e3:o;d=d+(c=c+s[l++]|0)|0,--u;);c%=65521,d%=65521}return c|d<<16|0}},{}],44:[function(n,r,i){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,i){var a=(function(){for(var s,o=[],l=0;l<256;l++){s=l;for(var c=0;c<8;c++)s=1&s?3988292384^s>>>1:s>>>1;o[l]=s}return o})();r.exports=function(s,o,l,c){var d=a,u=c+l;s^=-1;for(var p=c;p<u;p++)s=s>>>8^d[255&(s^o[p])];return-1^s}},{}],46:[function(n,r,i){var a,s=n("../utils/common"),o=n("./trees"),l=n("./adler32"),c=n("./crc32"),d=n("./messages"),u=0,p=4,_=0,f=-2,g=-1,S=4,b=2,h=8,v=9,C=286,y=30,D=19,L=2*C+1,O=15,N=3,B=258,K=B+N+1,I=42,W=113,T=1,w=2,ce=3,U=4;function H(E,x){return E.msg=d[x],x}function q(E){return(E<<1)-(4<E?9:0)}function te(E){for(var x=E.length;0<=--x;)E[x]=0}function M(E){var x=E.state,P=x.pending;P>E.avail_out&&(P=E.avail_out),P!==0&&(s.arraySet(E.output,x.pending_buf,x.pending_out,P,E.next_out),E.next_out+=P,x.pending_out+=P,E.total_out+=P,E.avail_out-=P,x.pending-=P,x.pending===0&&(x.pending_out=0))}function G(E,x){o._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,x),E.block_start=E.strstart,M(E.strm)}function j(E,x){E.pending_buf[E.pending++]=x}function oe(E,x){E.pending_buf[E.pending++]=x>>>8&255,E.pending_buf[E.pending++]=255&x}function ie(E,x){var P,R,A=E.max_chain_length,F=E.strstart,Q=E.prev_length,$=E.nice_match,z=E.strstart>E.w_size-K?E.strstart-(E.w_size-K):0,ee=E.window,se=E.w_mask,ae=E.prev,pe=E.strstart+B,Re=ee[F+Q-1],Te=ee[F+Q];E.prev_length>=E.good_match&&(A>>=2),$>E.lookahead&&($=E.lookahead);do if(ee[(P=x)+Q]===Te&&ee[P+Q-1]===Re&&ee[P]===ee[F]&&ee[++P]===ee[F+1]){F+=2,P++;do;while(ee[++F]===ee[++P]&&ee[++F]===ee[++P]&&ee[++F]===ee[++P]&&ee[++F]===ee[++P]&&ee[++F]===ee[++P]&&ee[++F]===ee[++P]&&ee[++F]===ee[++P]&&ee[++F]===ee[++P]&&F<pe);if(R=B-(pe-F),F=pe-B,Q<R){if(E.match_start=x,$<=(Q=R))break;Re=ee[F+Q-1],Te=ee[F+Q]}}while((x=ae[x&se])>z&&--A!=0);return Q<=E.lookahead?Q:E.lookahead}function Ee(E){var x,P,R,A,F,Q,$,z,ee,se,ae=E.w_size;do{if(A=E.window_size-E.lookahead-E.strstart,E.strstart>=ae+(ae-K)){for(s.arraySet(E.window,E.window,ae,ae,0),E.match_start-=ae,E.strstart-=ae,E.block_start-=ae,x=P=E.hash_size;R=E.head[--x],E.head[x]=ae<=R?R-ae:0,--P;);for(x=P=ae;R=E.prev[--x],E.prev[x]=ae<=R?R-ae:0,--P;);A+=ae}if(E.strm.avail_in===0)break;if(Q=E.strm,$=E.window,z=E.strstart+E.lookahead,ee=A,se=void 0,se=Q.avail_in,ee<se&&(se=ee),P=se===0?0:(Q.avail_in-=se,s.arraySet($,Q.input,Q.next_in,se,z),Q.state.wrap===1?Q.adler=l(Q.adler,$,se,z):Q.state.wrap===2&&(Q.adler=c(Q.adler,$,se,z)),Q.next_in+=se,Q.total_in+=se,se),E.lookahead+=P,E.lookahead+E.insert>=N)for(F=E.strstart-E.insert,E.ins_h=E.window[F],E.ins_h=(E.ins_h<<E.hash_shift^E.window[F+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[F+N-1])&E.hash_mask,E.prev[F&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=F,F++,E.insert--,!(E.lookahead+E.insert<N)););}while(E.lookahead<K&&E.strm.avail_in!==0)}function Z(E,x){for(var P,R;;){if(E.lookahead<K){if(Ee(E),E.lookahead<K&&x===u)return T;if(E.lookahead===0)break}if(P=0,E.lookahead>=N&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+N-1])&E.hash_mask,P=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),P!==0&&E.strstart-P<=E.w_size-K&&(E.match_length=ie(E,P)),E.match_length>=N)if(R=o._tr_tally(E,E.strstart-E.match_start,E.match_length-N),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=N){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+N-1])&E.hash_mask,P=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else R=o._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(R&&(G(E,!1),E.strm.avail_out===0))return T}return E.insert=E.strstart<N-1?E.strstart:N-1,x===p?(G(E,!0),E.strm.avail_out===0?ce:U):E.last_lit&&(G(E,!1),E.strm.avail_out===0)?T:w}function ne(E,x){for(var P,R,A;;){if(E.lookahead<K){if(Ee(E),E.lookahead<K&&x===u)return T;if(E.lookahead===0)break}if(P=0,E.lookahead>=N&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+N-1])&E.hash_mask,P=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=N-1,P!==0&&E.prev_length<E.max_lazy_match&&E.strstart-P<=E.w_size-K&&(E.match_length=ie(E,P),E.match_length<=5&&(E.strategy===1||E.match_length===N&&4096<E.strstart-E.match_start)&&(E.match_length=N-1)),E.prev_length>=N&&E.match_length<=E.prev_length){for(A=E.strstart+E.lookahead-N,R=o._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-N),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=A&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+N-1])&E.hash_mask,P=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=N-1,E.strstart++,R&&(G(E,!1),E.strm.avail_out===0))return T}else if(E.match_available){if((R=o._tr_tally(E,0,E.window[E.strstart-1]))&&G(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return T}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(R=o._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<N-1?E.strstart:N-1,x===p?(G(E,!0),E.strm.avail_out===0?ce:U):E.last_lit&&(G(E,!1),E.strm.avail_out===0)?T:w}function re(E,x,P,R,A){this.good_length=E,this.max_lazy=x,this.nice_length=P,this.max_chain=R,this.func=A}function _e(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=h,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new s.Buf16(2*L),this.dyn_dtree=new s.Buf16(2*(2*y+1)),this.bl_tree=new s.Buf16(2*(2*D+1)),te(this.dyn_ltree),te(this.dyn_dtree),te(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(O+1),this.heap=new s.Buf16(2*C+1),te(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(2*C+1),te(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ge(E){var x;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=b,(x=E.state).pending=0,x.pending_out=0,x.wrap<0&&(x.wrap=-x.wrap),x.status=x.wrap?I:W,E.adler=x.wrap===2?0:1,x.last_flush=u,o._tr_init(x),_):H(E,f)}function k(E){var x=ge(E);return x===_&&(function(P){P.window_size=2*P.w_size,te(P.head),P.max_lazy_match=a[P.level].max_lazy,P.good_match=a[P.level].good_length,P.nice_match=a[P.level].nice_length,P.max_chain_length=a[P.level].max_chain,P.strstart=0,P.block_start=0,P.lookahead=0,P.insert=0,P.match_length=P.prev_length=N-1,P.match_available=0,P.ins_h=0})(E.state),x}function Y(E,x,P,R,A,F){if(!E)return f;var Q=1;if(x===g&&(x=6),R<0?(Q=0,R=-R):15<R&&(Q=2,R-=16),A<1||v<A||P!==h||R<8||15<R||x<0||9<x||F<0||S<F)return H(E,f);R===8&&(R=9);var $=new _e;return(E.state=$).strm=E,$.wrap=Q,$.gzhead=null,$.w_bits=R,$.w_size=1<<$.w_bits,$.w_mask=$.w_size-1,$.hash_bits=A+7,$.hash_size=1<<$.hash_bits,$.hash_mask=$.hash_size-1,$.hash_shift=~~(($.hash_bits+N-1)/N),$.window=new s.Buf8(2*$.w_size),$.head=new s.Buf16($.hash_size),$.prev=new s.Buf16($.w_size),$.lit_bufsize=1<<A+6,$.pending_buf_size=4*$.lit_bufsize,$.pending_buf=new s.Buf8($.pending_buf_size),$.d_buf=1*$.lit_bufsize,$.l_buf=3*$.lit_bufsize,$.level=x,$.strategy=F,$.method=P,k(E)}a=[new re(0,0,0,0,function(E,x){var P=65535;for(P>E.pending_buf_size-5&&(P=E.pending_buf_size-5);;){if(E.lookahead<=1){if(Ee(E),E.lookahead===0&&x===u)return T;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var R=E.block_start+P;if((E.strstart===0||E.strstart>=R)&&(E.lookahead=E.strstart-R,E.strstart=R,G(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-K&&(G(E,!1),E.strm.avail_out===0))return T}return E.insert=0,x===p?(G(E,!0),E.strm.avail_out===0?ce:U):(E.strstart>E.block_start&&(G(E,!1),E.strm.avail_out),T)}),new re(4,4,8,4,Z),new re(4,5,16,8,Z),new re(4,6,32,32,Z),new re(4,4,16,16,ne),new re(8,16,32,32,ne),new re(8,16,128,128,ne),new re(8,32,128,256,ne),new re(32,128,258,1024,ne),new re(32,258,258,4096,ne)],i.deflateInit=function(E,x){return Y(E,x,h,15,8,0)},i.deflateInit2=Y,i.deflateReset=k,i.deflateResetKeep=ge,i.deflateSetHeader=function(E,x){return E&&E.state?E.state.wrap!==2?f:(E.state.gzhead=x,_):f},i.deflate=function(E,x){var P,R,A,F;if(!E||!E.state||5<x||x<0)return E?H(E,f):f;if(R=E.state,!E.output||!E.input&&E.avail_in!==0||R.status===666&&x!==p)return H(E,E.avail_out===0?-5:f);if(R.strm=E,P=R.last_flush,R.last_flush=x,R.status===I)if(R.wrap===2)E.adler=0,j(R,31),j(R,139),j(R,8),R.gzhead?(j(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),j(R,255&R.gzhead.time),j(R,R.gzhead.time>>8&255),j(R,R.gzhead.time>>16&255),j(R,R.gzhead.time>>24&255),j(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),j(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(j(R,255&R.gzhead.extra.length),j(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(E.adler=c(E.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(j(R,0),j(R,0),j(R,0),j(R,0),j(R,0),j(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),j(R,3),R.status=W);else{var Q=h+(R.w_bits-8<<4)<<8;Q|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(Q|=32),Q+=31-Q%31,R.status=W,oe(R,Q),R.strstart!==0&&(oe(R,E.adler>>>16),oe(R,65535&E.adler)),E.adler=1}if(R.status===69)if(R.gzhead.extra){for(A=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>A&&(E.adler=c(E.adler,R.pending_buf,R.pending-A,A)),M(E),A=R.pending,R.pending!==R.pending_buf_size));)j(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>A&&(E.adler=c(E.adler,R.pending_buf,R.pending-A,A)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){A=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>A&&(E.adler=c(E.adler,R.pending_buf,R.pending-A,A)),M(E),A=R.pending,R.pending===R.pending_buf_size)){F=1;break}F=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,j(R,F)}while(F!==0);R.gzhead.hcrc&&R.pending>A&&(E.adler=c(E.adler,R.pending_buf,R.pending-A,A)),F===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){A=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>A&&(E.adler=c(E.adler,R.pending_buf,R.pending-A,A)),M(E),A=R.pending,R.pending===R.pending_buf_size)){F=1;break}F=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,j(R,F)}while(F!==0);R.gzhead.hcrc&&R.pending>A&&(E.adler=c(E.adler,R.pending_buf,R.pending-A,A)),F===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&M(E),R.pending+2<=R.pending_buf_size&&(j(R,255&E.adler),j(R,E.adler>>8&255),E.adler=0,R.status=W)):R.status=W),R.pending!==0){if(M(E),E.avail_out===0)return R.last_flush=-1,_}else if(E.avail_in===0&&q(x)<=q(P)&&x!==p)return H(E,-5);if(R.status===666&&E.avail_in!==0)return H(E,-5);if(E.avail_in!==0||R.lookahead!==0||x!==u&&R.status!==666){var $=R.strategy===2?(function(z,ee){for(var se;;){if(z.lookahead===0&&(Ee(z),z.lookahead===0)){if(ee===u)return T;break}if(z.match_length=0,se=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,se&&(G(z,!1),z.strm.avail_out===0))return T}return z.insert=0,ee===p?(G(z,!0),z.strm.avail_out===0?ce:U):z.last_lit&&(G(z,!1),z.strm.avail_out===0)?T:w})(R,x):R.strategy===3?(function(z,ee){for(var se,ae,pe,Re,Te=z.window;;){if(z.lookahead<=B){if(Ee(z),z.lookahead<=B&&ee===u)return T;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=N&&0<z.strstart&&(ae=Te[pe=z.strstart-1])===Te[++pe]&&ae===Te[++pe]&&ae===Te[++pe]){Re=z.strstart+B;do;while(ae===Te[++pe]&&ae===Te[++pe]&&ae===Te[++pe]&&ae===Te[++pe]&&ae===Te[++pe]&&ae===Te[++pe]&&ae===Te[++pe]&&ae===Te[++pe]&&pe<Re);z.match_length=B-(Re-pe),z.match_length>z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=N?(se=o._tr_tally(z,1,z.match_length-N),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(se=o._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),se&&(G(z,!1),z.strm.avail_out===0))return T}return z.insert=0,ee===p?(G(z,!0),z.strm.avail_out===0?ce:U):z.last_lit&&(G(z,!1),z.strm.avail_out===0)?T:w})(R,x):a[R.level].func(R,x);if($!==ce&&$!==U||(R.status=666),$===T||$===ce)return E.avail_out===0&&(R.last_flush=-1),_;if($===w&&(x===1?o._tr_align(R):x!==5&&(o._tr_stored_block(R,0,0,!1),x===3&&(te(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),M(E),E.avail_out===0))return R.last_flush=-1,_}return x!==p?_:R.wrap<=0?1:(R.wrap===2?(j(R,255&E.adler),j(R,E.adler>>8&255),j(R,E.adler>>16&255),j(R,E.adler>>24&255),j(R,255&E.total_in),j(R,E.total_in>>8&255),j(R,E.total_in>>16&255),j(R,E.total_in>>24&255)):(oe(R,E.adler>>>16),oe(R,65535&E.adler)),M(E),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?_:1)},i.deflateEnd=function(E){var x;return E&&E.state?(x=E.state.status)!==I&&x!==69&&x!==73&&x!==91&&x!==103&&x!==W&&x!==666?H(E,f):(E.state=null,x===W?H(E,-3):_):f},i.deflateSetDictionary=function(E,x){var P,R,A,F,Q,$,z,ee,se=x.length;if(!E||!E.state||(F=(P=E.state).wrap)===2||F===1&&P.status!==I||P.lookahead)return f;for(F===1&&(E.adler=l(E.adler,x,se,0)),P.wrap=0,se>=P.w_size&&(F===0&&(te(P.head),P.strstart=0,P.block_start=0,P.insert=0),ee=new s.Buf8(P.w_size),s.arraySet(ee,x,se-P.w_size,P.w_size,0),x=ee,se=P.w_size),Q=E.avail_in,$=E.next_in,z=E.input,E.avail_in=se,E.next_in=0,E.input=x,Ee(P);P.lookahead>=N;){for(R=P.strstart,A=P.lookahead-(N-1);P.ins_h=(P.ins_h<<P.hash_shift^P.window[R+N-1])&P.hash_mask,P.prev[R&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=R,R++,--A;);P.strstart=R,P.lookahead=N-1,Ee(P)}return P.strstart+=P.lookahead,P.block_start=P.strstart,P.insert=P.lookahead,P.lookahead=0,P.match_length=P.prev_length=N-1,P.match_available=0,E.next_in=$,E.input=z,E.avail_in=Q,P.wrap=F,_},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,i){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,i){r.exports=function(a,s){var o,l,c,d,u,p,_,f,g,S,b,h,v,C,y,D,L,O,N,B,K,I,W,T,w;o=a.state,l=a.next_in,T=a.input,c=l+(a.avail_in-5),d=a.next_out,w=a.output,u=d-(s-a.avail_out),p=d+(a.avail_out-257),_=o.dmax,f=o.wsize,g=o.whave,S=o.wnext,b=o.window,h=o.hold,v=o.bits,C=o.lencode,y=o.distcode,D=(1<<o.lenbits)-1,L=(1<<o.distbits)-1;e:do{v<15&&(h+=T[l++]<<v,v+=8,h+=T[l++]<<v,v+=8),O=C[h&D];t:for(;;){if(h>>>=N=O>>>24,v-=N,(N=O>>>16&255)===0)w[d++]=65535&O;else{if(!(16&N)){if((64&N)==0){O=C[(65535&O)+(h&(1<<N)-1)];continue t}if(32&N){o.mode=12;break e}a.msg="invalid literal/length code",o.mode=30;break e}B=65535&O,(N&=15)&&(v<N&&(h+=T[l++]<<v,v+=8),B+=h&(1<<N)-1,h>>>=N,v-=N),v<15&&(h+=T[l++]<<v,v+=8,h+=T[l++]<<v,v+=8),O=y[h&L];n:for(;;){if(h>>>=N=O>>>24,v-=N,!(16&(N=O>>>16&255))){if((64&N)==0){O=y[(65535&O)+(h&(1<<N)-1)];continue n}a.msg="invalid distance code",o.mode=30;break e}if(K=65535&O,v<(N&=15)&&(h+=T[l++]<<v,(v+=8)<N&&(h+=T[l++]<<v,v+=8)),_<(K+=h&(1<<N)-1)){a.msg="invalid distance too far back",o.mode=30;break e}if(h>>>=N,v-=N,(N=d-u)<K){if(g<(N=K-N)&&o.sane){a.msg="invalid distance too far back",o.mode=30;break e}if(W=b,(I=0)===S){if(I+=f-N,N<B){for(B-=N;w[d++]=b[I++],--N;);I=d-K,W=w}}else if(S<N){if(I+=f+S-N,(N-=S)<B){for(B-=N;w[d++]=b[I++],--N;);if(I=0,S<B){for(B-=N=S;w[d++]=b[I++],--N;);I=d-K,W=w}}}else if(I+=S-N,N<B){for(B-=N;w[d++]=b[I++],--N;);I=d-K,W=w}for(;2<B;)w[d++]=W[I++],w[d++]=W[I++],w[d++]=W[I++],B-=3;B&&(w[d++]=W[I++],1<B&&(w[d++]=W[I++]))}else{for(I=d-K;w[d++]=w[I++],w[d++]=w[I++],w[d++]=w[I++],2<(B-=3););B&&(w[d++]=w[I++],1<B&&(w[d++]=w[I++]))}break}}break}}while(l<c&&d<p);l-=B=v>>3,h&=(1<<(v-=B<<3))-1,a.next_in=l,a.next_out=d,a.avail_in=l<c?c-l+5:5-(l-c),a.avail_out=d<p?p-d+257:257-(d-p),o.hold=h,o.bits=v}},{}],49:[function(n,r,i){var a=n("../utils/common"),s=n("./adler32"),o=n("./crc32"),l=n("./inffast"),c=n("./inftrees"),d=1,u=2,p=0,_=-2,f=1,g=852,S=592;function b(I){return(I>>>24&255)+(I>>>8&65280)+((65280&I)<<8)+((255&I)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(I){var W;return I&&I.state?(W=I.state,I.total_in=I.total_out=W.total=0,I.msg="",W.wrap&&(I.adler=1&W.wrap),W.mode=f,W.last=0,W.havedict=0,W.dmax=32768,W.head=null,W.hold=0,W.bits=0,W.lencode=W.lendyn=new a.Buf32(g),W.distcode=W.distdyn=new a.Buf32(S),W.sane=1,W.back=-1,p):_}function C(I){var W;return I&&I.state?((W=I.state).wsize=0,W.whave=0,W.wnext=0,v(I)):_}function y(I,W){var T,w;return I&&I.state?(w=I.state,W<0?(T=0,W=-W):(T=1+(W>>4),W<48&&(W&=15)),W&&(W<8||15<W)?_:(w.window!==null&&w.wbits!==W&&(w.window=null),w.wrap=T,w.wbits=W,C(I))):_}function D(I,W){var T,w;return I?(w=new h,(I.state=w).window=null,(T=y(I,W))!==p&&(I.state=null),T):_}var L,O,N=!0;function B(I){if(N){var W;for(L=new a.Buf32(512),O=new a.Buf32(32),W=0;W<144;)I.lens[W++]=8;for(;W<256;)I.lens[W++]=9;for(;W<280;)I.lens[W++]=7;for(;W<288;)I.lens[W++]=8;for(c(d,I.lens,0,288,L,0,I.work,{bits:9}),W=0;W<32;)I.lens[W++]=5;c(u,I.lens,0,32,O,0,I.work,{bits:5}),N=!1}I.lencode=L,I.lenbits=9,I.distcode=O,I.distbits=5}function K(I,W,T,w){var ce,U=I.state;return U.window===null&&(U.wsize=1<<U.wbits,U.wnext=0,U.whave=0,U.window=new a.Buf8(U.wsize)),w>=U.wsize?(a.arraySet(U.window,W,T-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(w<(ce=U.wsize-U.wnext)&&(ce=w),a.arraySet(U.window,W,T-w,ce,U.wnext),(w-=ce)?(a.arraySet(U.window,W,T-w,w,0),U.wnext=w,U.whave=U.wsize):(U.wnext+=ce,U.wnext===U.wsize&&(U.wnext=0),U.whave<U.wsize&&(U.whave+=ce))),0}i.inflateReset=C,i.inflateReset2=y,i.inflateResetKeep=v,i.inflateInit=function(I){return D(I,15)},i.inflateInit2=D,i.inflate=function(I,W){var T,w,ce,U,H,q,te,M,G,j,oe,ie,Ee,Z,ne,re,_e,ge,k,Y,E,x,P,R,A=0,F=new a.Buf8(4),Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!I||!I.state||!I.output||!I.input&&I.avail_in!==0)return _;(T=I.state).mode===12&&(T.mode=13),H=I.next_out,ce=I.output,te=I.avail_out,U=I.next_in,w=I.input,q=I.avail_in,M=T.hold,G=T.bits,j=q,oe=te,x=p;e:for(;;)switch(T.mode){case f:if(T.wrap===0){T.mode=13;break}for(;G<16;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if(2&T.wrap&&M===35615){F[T.check=0]=255&M,F[1]=M>>>8&255,T.check=o(T.check,F,2,0),G=M=0,T.mode=2;break}if(T.flags=0,T.head&&(T.head.done=!1),!(1&T.wrap)||(((255&M)<<8)+(M>>8))%31){I.msg="incorrect header check",T.mode=30;break}if((15&M)!=8){I.msg="unknown compression method",T.mode=30;break}if(G-=4,E=8+(15&(M>>>=4)),T.wbits===0)T.wbits=E;else if(E>T.wbits){I.msg="invalid window size",T.mode=30;break}T.dmax=1<<E,I.adler=T.check=1,T.mode=512&M?10:12,G=M=0;break;case 2:for(;G<16;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if(T.flags=M,(255&T.flags)!=8){I.msg="unknown compression method",T.mode=30;break}if(57344&T.flags){I.msg="unknown header flags set",T.mode=30;break}T.head&&(T.head.text=M>>8&1),512&T.flags&&(F[0]=255&M,F[1]=M>>>8&255,T.check=o(T.check,F,2,0)),G=M=0,T.mode=3;case 3:for(;G<32;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}T.head&&(T.head.time=M),512&T.flags&&(F[0]=255&M,F[1]=M>>>8&255,F[2]=M>>>16&255,F[3]=M>>>24&255,T.check=o(T.check,F,4,0)),G=M=0,T.mode=4;case 4:for(;G<16;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}T.head&&(T.head.xflags=255&M,T.head.os=M>>8),512&T.flags&&(F[0]=255&M,F[1]=M>>>8&255,T.check=o(T.check,F,2,0)),G=M=0,T.mode=5;case 5:if(1024&T.flags){for(;G<16;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}T.length=M,T.head&&(T.head.extra_len=M),512&T.flags&&(F[0]=255&M,F[1]=M>>>8&255,T.check=o(T.check,F,2,0)),G=M=0}else T.head&&(T.head.extra=null);T.mode=6;case 6:if(1024&T.flags&&(q<(ie=T.length)&&(ie=q),ie&&(T.head&&(E=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),a.arraySet(T.head.extra,w,U,ie,E)),512&T.flags&&(T.check=o(T.check,w,ie,U)),q-=ie,U+=ie,T.length-=ie),T.length))break e;T.length=0,T.mode=7;case 7:if(2048&T.flags){if(q===0)break e;for(ie=0;E=w[U+ie++],T.head&&E&&T.length<65536&&(T.head.name+=String.fromCharCode(E)),E&&ie<q;);if(512&T.flags&&(T.check=o(T.check,w,ie,U)),q-=ie,U+=ie,E)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=8;case 8:if(4096&T.flags){if(q===0)break e;for(ie=0;E=w[U+ie++],T.head&&E&&T.length<65536&&(T.head.comment+=String.fromCharCode(E)),E&&ie<q;);if(512&T.flags&&(T.check=o(T.check,w,ie,U)),q-=ie,U+=ie,E)break e}else T.head&&(T.head.comment=null);T.mode=9;case 9:if(512&T.flags){for(;G<16;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if(M!==(65535&T.check)){I.msg="header crc mismatch",T.mode=30;break}G=M=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),I.adler=T.check=0,T.mode=12;break;case 10:for(;G<32;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}I.adler=T.check=b(M),G=M=0,T.mode=11;case 11:if(T.havedict===0)return I.next_out=H,I.avail_out=te,I.next_in=U,I.avail_in=q,T.hold=M,T.bits=G,2;I.adler=T.check=1,T.mode=12;case 12:if(W===5||W===6)break e;case 13:if(T.last){M>>>=7&G,G-=7&G,T.mode=27;break}for(;G<3;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}switch(T.last=1&M,G-=1,3&(M>>>=1)){case 0:T.mode=14;break;case 1:if(B(T),T.mode=20,W!==6)break;M>>>=2,G-=2;break e;case 2:T.mode=17;break;case 3:I.msg="invalid block type",T.mode=30}M>>>=2,G-=2;break;case 14:for(M>>>=7&G,G-=7&G;G<32;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if((65535&M)!=(M>>>16^65535)){I.msg="invalid stored block lengths",T.mode=30;break}if(T.length=65535&M,G=M=0,T.mode=15,W===6)break e;case 15:T.mode=16;case 16:if(ie=T.length){if(q<ie&&(ie=q),te<ie&&(ie=te),ie===0)break e;a.arraySet(ce,w,U,ie,H),q-=ie,U+=ie,te-=ie,H+=ie,T.length-=ie;break}T.mode=12;break;case 17:for(;G<14;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if(T.nlen=257+(31&M),M>>>=5,G-=5,T.ndist=1+(31&M),M>>>=5,G-=5,T.ncode=4+(15&M),M>>>=4,G-=4,286<T.nlen||30<T.ndist){I.msg="too many length or distance symbols",T.mode=30;break}T.have=0,T.mode=18;case 18:for(;T.have<T.ncode;){for(;G<3;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}T.lens[Q[T.have++]]=7&M,M>>>=3,G-=3}for(;T.have<19;)T.lens[Q[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,P={bits:T.lenbits},x=c(0,T.lens,0,19,T.lencode,0,T.work,P),T.lenbits=P.bits,x){I.msg="invalid code lengths set",T.mode=30;break}T.have=0,T.mode=19;case 19:for(;T.have<T.nlen+T.ndist;){for(;re=(A=T.lencode[M&(1<<T.lenbits)-1])>>>16&255,_e=65535&A,!((ne=A>>>24)<=G);){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if(_e<16)M>>>=ne,G-=ne,T.lens[T.have++]=_e;else{if(_e===16){for(R=ne+2;G<R;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if(M>>>=ne,G-=ne,T.have===0){I.msg="invalid bit length repeat",T.mode=30;break}E=T.lens[T.have-1],ie=3+(3&M),M>>>=2,G-=2}else if(_e===17){for(R=ne+3;G<R;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}G-=ne,E=0,ie=3+(7&(M>>>=ne)),M>>>=3,G-=3}else{for(R=ne+7;G<R;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}G-=ne,E=0,ie=11+(127&(M>>>=ne)),M>>>=7,G-=7}if(T.have+ie>T.nlen+T.ndist){I.msg="invalid bit length repeat",T.mode=30;break}for(;ie--;)T.lens[T.have++]=E}}if(T.mode===30)break;if(T.lens[256]===0){I.msg="invalid code -- missing end-of-block",T.mode=30;break}if(T.lenbits=9,P={bits:T.lenbits},x=c(d,T.lens,0,T.nlen,T.lencode,0,T.work,P),T.lenbits=P.bits,x){I.msg="invalid literal/lengths set",T.mode=30;break}if(T.distbits=6,T.distcode=T.distdyn,P={bits:T.distbits},x=c(u,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,P),T.distbits=P.bits,x){I.msg="invalid distances set",T.mode=30;break}if(T.mode=20,W===6)break e;case 20:T.mode=21;case 21:if(6<=q&&258<=te){I.next_out=H,I.avail_out=te,I.next_in=U,I.avail_in=q,T.hold=M,T.bits=G,l(I,oe),H=I.next_out,ce=I.output,te=I.avail_out,U=I.next_in,w=I.input,q=I.avail_in,M=T.hold,G=T.bits,T.mode===12&&(T.back=-1);break}for(T.back=0;re=(A=T.lencode[M&(1<<T.lenbits)-1])>>>16&255,_e=65535&A,!((ne=A>>>24)<=G);){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if(re&&(240&re)==0){for(ge=ne,k=re,Y=_e;re=(A=T.lencode[Y+((M&(1<<ge+k)-1)>>ge)])>>>16&255,_e=65535&A,!(ge+(ne=A>>>24)<=G);){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}M>>>=ge,G-=ge,T.back+=ge}if(M>>>=ne,G-=ne,T.back+=ne,T.length=_e,re===0){T.mode=26;break}if(32&re){T.back=-1,T.mode=12;break}if(64&re){I.msg="invalid literal/length code",T.mode=30;break}T.extra=15&re,T.mode=22;case 22:if(T.extra){for(R=T.extra;G<R;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}T.length+=M&(1<<T.extra)-1,M>>>=T.extra,G-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=23;case 23:for(;re=(A=T.distcode[M&(1<<T.distbits)-1])>>>16&255,_e=65535&A,!((ne=A>>>24)<=G);){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if((240&re)==0){for(ge=ne,k=re,Y=_e;re=(A=T.distcode[Y+((M&(1<<ge+k)-1)>>ge)])>>>16&255,_e=65535&A,!(ge+(ne=A>>>24)<=G);){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}M>>>=ge,G-=ge,T.back+=ge}if(M>>>=ne,G-=ne,T.back+=ne,64&re){I.msg="invalid distance code",T.mode=30;break}T.offset=_e,T.extra=15&re,T.mode=24;case 24:if(T.extra){for(R=T.extra;G<R;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}T.offset+=M&(1<<T.extra)-1,M>>>=T.extra,G-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){I.msg="invalid distance too far back",T.mode=30;break}T.mode=25;case 25:if(te===0)break e;if(ie=oe-te,T.offset>ie){if((ie=T.offset-ie)>T.whave&&T.sane){I.msg="invalid distance too far back",T.mode=30;break}Ee=ie>T.wnext?(ie-=T.wnext,T.wsize-ie):T.wnext-ie,ie>T.length&&(ie=T.length),Z=T.window}else Z=ce,Ee=H-T.offset,ie=T.length;for(te<ie&&(ie=te),te-=ie,T.length-=ie;ce[H++]=Z[Ee++],--ie;);T.length===0&&(T.mode=21);break;case 26:if(te===0)break e;ce[H++]=T.length,te--,T.mode=21;break;case 27:if(T.wrap){for(;G<32;){if(q===0)break e;q--,M|=w[U++]<<G,G+=8}if(oe-=te,I.total_out+=oe,T.total+=oe,oe&&(I.adler=T.check=T.flags?o(T.check,ce,oe,H-oe):s(T.check,ce,oe,H-oe)),oe=te,(T.flags?M:b(M))!==T.check){I.msg="incorrect data check",T.mode=30;break}G=M=0}T.mode=28;case 28:if(T.wrap&&T.flags){for(;G<32;){if(q===0)break e;q--,M+=w[U++]<<G,G+=8}if(M!==(4294967295&T.total)){I.msg="incorrect length check",T.mode=30;break}G=M=0}T.mode=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return-4;default:return _}return I.next_out=H,I.avail_out=te,I.next_in=U,I.avail_in=q,T.hold=M,T.bits=G,(T.wsize||oe!==I.avail_out&&T.mode<30&&(T.mode<27||W!==4))&&K(I,I.output,I.next_out,oe-I.avail_out)?(T.mode=31,-4):(j-=I.avail_in,oe-=I.avail_out,I.total_in+=j,I.total_out+=oe,T.total+=oe,T.wrap&&oe&&(I.adler=T.check=T.flags?o(T.check,ce,oe,I.next_out-oe):s(T.check,ce,oe,I.next_out-oe)),I.data_type=T.bits+(T.last?64:0)+(T.mode===12?128:0)+(T.mode===20||T.mode===15?256:0),(j==0&&oe===0||W===4)&&x===p&&(x=-5),x)},i.inflateEnd=function(I){if(!I||!I.state)return _;var W=I.state;return W.window&&(W.window=null),I.state=null,p},i.inflateGetHeader=function(I,W){var T;return I&&I.state?(2&(T=I.state).wrap)==0?_:((T.head=W).done=!1,p):_},i.inflateSetDictionary=function(I,W){var T,w=W.length;return I&&I.state?(T=I.state).wrap!==0&&T.mode!==11?_:T.mode===11&&s(1,W,w,0)!==T.check?-3:K(I,W,w,w)?(T.mode=31,-4):(T.havedict=1,p):_},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,i){var a=n("../utils/common"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,u,p,_,f,g,S,b){var h,v,C,y,D,L,O,N,B,K=b.bits,I=0,W=0,T=0,w=0,ce=0,U=0,H=0,q=0,te=0,M=0,G=null,j=0,oe=new a.Buf16(16),ie=new a.Buf16(16),Ee=null,Z=0;for(I=0;I<=15;I++)oe[I]=0;for(W=0;W<_;W++)oe[u[p+W]]++;for(ce=K,w=15;1<=w&&oe[w]===0;w--);if(w<ce&&(ce=w),w===0)return f[g++]=20971520,f[g++]=20971520,b.bits=1,0;for(T=1;T<w&&oe[T]===0;T++);for(ce<T&&(ce=T),I=q=1;I<=15;I++)if(q<<=1,(q-=oe[I])<0)return-1;if(0<q&&(d===0||w!==1))return-1;for(ie[1]=0,I=1;I<15;I++)ie[I+1]=ie[I]+oe[I];for(W=0;W<_;W++)u[p+W]!==0&&(S[ie[u[p+W]]++]=W);if(L=d===0?(G=Ee=S,19):d===1?(G=s,j-=257,Ee=o,Z-=257,256):(G=l,Ee=c,-1),I=T,D=g,H=W=M=0,C=-1,y=(te=1<<(U=ce))-1,d===1&&852<te||d===2&&592<te)return 1;for(;;){for(O=I-H,B=S[W]<L?(N=0,S[W]):S[W]>L?(N=Ee[Z+S[W]],G[j+S[W]]):(N=96,0),h=1<<I-H,T=v=1<<U;f[D+(M>>H)+(v-=h)]=O<<24|N<<16|B|0,v!==0;);for(h=1<<I-1;M&h;)h>>=1;if(h!==0?(M&=h-1,M+=h):M=0,W++,--oe[I]==0){if(I===w)break;I=u[p+S[W]]}if(ce<I&&(M&y)!==C){for(H===0&&(H=ce),D+=T,q=1<<(U=I-H);U+H<w&&!((q-=oe[U+H])<=0);)U++,q<<=1;if(te+=1<<U,d===1&&852<te||d===2&&592<te)return 1;f[C=M&y]=ce<<24|U<<16|D-g|0}}return M!==0&&(f[D+M]=I-H<<24|64<<16|0),b.bits=ce,0}},{"../utils/common":41}],51:[function(n,r,i){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,i){var a=n("../utils/common"),s=0,o=1;function l(A){for(var F=A.length;0<=--F;)A[F]=0}var c=0,d=29,u=256,p=u+1+d,_=30,f=19,g=2*p+1,S=15,b=16,h=7,v=256,C=16,y=17,D=18,L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],O=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=new Array(2*(p+2));l(K);var I=new Array(2*_);l(I);var W=new Array(512);l(W);var T=new Array(256);l(T);var w=new Array(d);l(w);var ce,U,H,q=new Array(_);function te(A,F,Q,$,z){this.static_tree=A,this.extra_bits=F,this.extra_base=Q,this.elems=$,this.max_length=z,this.has_stree=A&&A.length}function M(A,F){this.dyn_tree=A,this.max_code=0,this.stat_desc=F}function G(A){return A<256?W[A]:W[256+(A>>>7)]}function j(A,F){A.pending_buf[A.pending++]=255&F,A.pending_buf[A.pending++]=F>>>8&255}function oe(A,F,Q){A.bi_valid>b-Q?(A.bi_buf|=F<<A.bi_valid&65535,j(A,A.bi_buf),A.bi_buf=F>>b-A.bi_valid,A.bi_valid+=Q-b):(A.bi_buf|=F<<A.bi_valid&65535,A.bi_valid+=Q)}function ie(A,F,Q){oe(A,Q[2*F],Q[2*F+1])}function Ee(A,F){for(var Q=0;Q|=1&A,A>>>=1,Q<<=1,0<--F;);return Q>>>1}function Z(A,F,Q){var $,z,ee=new Array(S+1),se=0;for($=1;$<=S;$++)ee[$]=se=se+Q[$-1]<<1;for(z=0;z<=F;z++){var ae=A[2*z+1];ae!==0&&(A[2*z]=Ee(ee[ae]++,ae))}}function ne(A){var F;for(F=0;F<p;F++)A.dyn_ltree[2*F]=0;for(F=0;F<_;F++)A.dyn_dtree[2*F]=0;for(F=0;F<f;F++)A.bl_tree[2*F]=0;A.dyn_ltree[2*v]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function re(A){8<A.bi_valid?j(A,A.bi_buf):0<A.bi_valid&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function _e(A,F,Q,$){var z=2*F,ee=2*Q;return A[z]<A[ee]||A[z]===A[ee]&&$[F]<=$[Q]}function ge(A,F,Q){for(var $=A.heap[Q],z=Q<<1;z<=A.heap_len&&(z<A.heap_len&&_e(F,A.heap[z+1],A.heap[z],A.depth)&&z++,!_e(F,$,A.heap[z],A.depth));)A.heap[Q]=A.heap[z],Q=z,z<<=1;A.heap[Q]=$}function k(A,F,Q){var $,z,ee,se,ae=0;if(A.last_lit!==0)for(;$=A.pending_buf[A.d_buf+2*ae]<<8|A.pending_buf[A.d_buf+2*ae+1],z=A.pending_buf[A.l_buf+ae],ae++,$===0?ie(A,z,F):(ie(A,(ee=T[z])+u+1,F),(se=L[ee])!==0&&oe(A,z-=w[ee],se),ie(A,ee=G(--$),Q),(se=O[ee])!==0&&oe(A,$-=q[ee],se)),ae<A.last_lit;);ie(A,v,F)}function Y(A,F){var Q,$,z,ee=F.dyn_tree,se=F.stat_desc.static_tree,ae=F.stat_desc.has_stree,pe=F.stat_desc.elems,Re=-1;for(A.heap_len=0,A.heap_max=g,Q=0;Q<pe;Q++)ee[2*Q]!==0?(A.heap[++A.heap_len]=Re=Q,A.depth[Q]=0):ee[2*Q+1]=0;for(;A.heap_len<2;)ee[2*(z=A.heap[++A.heap_len]=Re<2?++Re:0)]=1,A.depth[z]=0,A.opt_len--,ae&&(A.static_len-=se[2*z+1]);for(F.max_code=Re,Q=A.heap_len>>1;1<=Q;Q--)ge(A,ee,Q);for(z=pe;Q=A.heap[1],A.heap[1]=A.heap[A.heap_len--],ge(A,ee,1),$=A.heap[1],A.heap[--A.heap_max]=Q,A.heap[--A.heap_max]=$,ee[2*z]=ee[2*Q]+ee[2*$],A.depth[z]=(A.depth[Q]>=A.depth[$]?A.depth[Q]:A.depth[$])+1,ee[2*Q+1]=ee[2*$+1]=z,A.heap[1]=z++,ge(A,ee,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],(function(Te,Me){var $e,et,st,Ye,Bt,ot,nt=Me.dyn_tree,ln=Me.max_code,Zt=Me.stat_desc.static_tree,Zn=Me.stat_desc.has_stree,qe=Me.stat_desc.extra_bits,cn=Me.stat_desc.extra_base,It=Me.stat_desc.max_length,Ut=0;for(Ye=0;Ye<=S;Ye++)Te.bl_count[Ye]=0;for(nt[2*Te.heap[Te.heap_max]+1]=0,$e=Te.heap_max+1;$e<g;$e++)It<(Ye=nt[2*nt[2*(et=Te.heap[$e])+1]+1]+1)&&(Ye=It,Ut++),nt[2*et+1]=Ye,ln<et||(Te.bl_count[Ye]++,Bt=0,cn<=et&&(Bt=qe[et-cn]),ot=nt[2*et],Te.opt_len+=ot*(Ye+Bt),Zn&&(Te.static_len+=ot*(Zt[2*et+1]+Bt)));if(Ut!==0){do{for(Ye=It-1;Te.bl_count[Ye]===0;)Ye--;Te.bl_count[Ye]--,Te.bl_count[Ye+1]+=2,Te.bl_count[It]--,Ut-=2}while(0<Ut);for(Ye=It;Ye!==0;Ye--)for(et=Te.bl_count[Ye];et!==0;)ln<(st=Te.heap[--$e])||(nt[2*st+1]!==Ye&&(Te.opt_len+=(Ye-nt[2*st+1])*nt[2*st],nt[2*st+1]=Ye),et--)}})(A,F),Z(ee,Re,A.bl_count)}function E(A,F,Q){var $,z,ee=-1,se=F[1],ae=0,pe=7,Re=4;for(se===0&&(pe=138,Re=3),F[2*(Q+1)+1]=65535,$=0;$<=Q;$++)z=se,se=F[2*($+1)+1],++ae<pe&&z===se||(ae<Re?A.bl_tree[2*z]+=ae:z!==0?(z!==ee&&A.bl_tree[2*z]++,A.bl_tree[2*C]++):ae<=10?A.bl_tree[2*y]++:A.bl_tree[2*D]++,ee=z,Re=(ae=0)===se?(pe=138,3):z===se?(pe=6,3):(pe=7,4))}function x(A,F,Q){var $,z,ee=-1,se=F[1],ae=0,pe=7,Re=4;for(se===0&&(pe=138,Re=3),$=0;$<=Q;$++)if(z=se,se=F[2*($+1)+1],!(++ae<pe&&z===se)){if(ae<Re)for(;ie(A,z,A.bl_tree),--ae!=0;);else z!==0?(z!==ee&&(ie(A,z,A.bl_tree),ae--),ie(A,C,A.bl_tree),oe(A,ae-3,2)):ae<=10?(ie(A,y,A.bl_tree),oe(A,ae-3,3)):(ie(A,D,A.bl_tree),oe(A,ae-11,7));ee=z,Re=(ae=0)===se?(pe=138,3):z===se?(pe=6,3):(pe=7,4)}}l(q);var P=!1;function R(A,F,Q,$){oe(A,(c<<1)+($?1:0),3),(function(z,ee,se,ae){re(z),j(z,se),j(z,~se),a.arraySet(z.pending_buf,z.window,ee,se,z.pending),z.pending+=se})(A,F,Q)}i._tr_init=function(A){P||((function(){var F,Q,$,z,ee,se=new Array(S+1);for(z=$=0;z<d-1;z++)for(w[z]=$,F=0;F<1<<L[z];F++)T[$++]=z;for(T[$-1]=z,z=ee=0;z<16;z++)for(q[z]=ee,F=0;F<1<<O[z];F++)W[ee++]=z;for(ee>>=7;z<_;z++)for(q[z]=ee<<7,F=0;F<1<<O[z]-7;F++)W[256+ee++]=z;for(Q=0;Q<=S;Q++)se[Q]=0;for(F=0;F<=143;)K[2*F+1]=8,F++,se[8]++;for(;F<=255;)K[2*F+1]=9,F++,se[9]++;for(;F<=279;)K[2*F+1]=7,F++,se[7]++;for(;F<=287;)K[2*F+1]=8,F++,se[8]++;for(Z(K,p+1,se),F=0;F<_;F++)I[2*F+1]=5,I[2*F]=Ee(F,5);ce=new te(K,L,u+1,p,S),U=new te(I,O,0,_,S),H=new te(new Array(0),N,0,f,h)})(),P=!0),A.l_desc=new M(A.dyn_ltree,ce),A.d_desc=new M(A.dyn_dtree,U),A.bl_desc=new M(A.bl_tree,H),A.bi_buf=0,A.bi_valid=0,ne(A)},i._tr_stored_block=R,i._tr_flush_block=function(A,F,Q,$){var z,ee,se=0;0<A.level?(A.strm.data_type===2&&(A.strm.data_type=(function(ae){var pe,Re=4093624447;for(pe=0;pe<=31;pe++,Re>>>=1)if(1&Re&&ae.dyn_ltree[2*pe]!==0)return s;if(ae.dyn_ltree[18]!==0||ae.dyn_ltree[20]!==0||ae.dyn_ltree[26]!==0)return o;for(pe=32;pe<u;pe++)if(ae.dyn_ltree[2*pe]!==0)return o;return s})(A)),Y(A,A.l_desc),Y(A,A.d_desc),se=(function(ae){var pe;for(E(ae,ae.dyn_ltree,ae.l_desc.max_code),E(ae,ae.dyn_dtree,ae.d_desc.max_code),Y(ae,ae.bl_desc),pe=f-1;3<=pe&&ae.bl_tree[2*B[pe]+1]===0;pe--);return ae.opt_len+=3*(pe+1)+5+5+4,pe})(A),z=A.opt_len+3+7>>>3,(ee=A.static_len+3+7>>>3)<=z&&(z=ee)):z=ee=Q+5,Q+4<=z&&F!==-1?R(A,F,Q,$):A.strategy===4||ee===z?(oe(A,2+($?1:0),3),k(A,K,I)):(oe(A,4+($?1:0),3),(function(ae,pe,Re,Te){var Me;for(oe(ae,pe-257,5),oe(ae,Re-1,5),oe(ae,Te-4,4),Me=0;Me<Te;Me++)oe(ae,ae.bl_tree[2*B[Me]+1],3);x(ae,ae.dyn_ltree,pe-1),x(ae,ae.dyn_dtree,Re-1)})(A,A.l_desc.max_code+1,A.d_desc.max_code+1,se+1),k(A,A.dyn_ltree,A.dyn_dtree)),ne(A),$&&re(A)},i._tr_tally=function(A,F,Q){return A.pending_buf[A.d_buf+2*A.last_lit]=F>>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&F,A.pending_buf[A.l_buf+A.last_lit]=255&Q,A.last_lit++,F===0?A.dyn_ltree[2*Q]++:(A.matches++,F--,A.dyn_ltree[2*(T[Q]+u+1)]++,A.dyn_dtree[2*G(F)]++),A.last_lit===A.lit_bufsize-1},i._tr_align=function(A){oe(A,2,3),ie(A,v,K),(function(F){F.bi_valid===16?(j(F,F.bi_buf),F.bi_buf=0,F.bi_valid=0):8<=F.bi_valid&&(F.pending_buf[F.pending++]=255&F.bi_buf,F.bi_buf>>=8,F.bi_valid-=8)})(A)}},{"../utils/common":41}],53:[function(n,r,i){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,i){(function(a){(function(s,o){if(!s.setImmediate){var l,c,d,u,p=1,_={},f=!1,g=s.document,S=Object.getPrototypeOf&&Object.getPrototypeOf(s);S=S&&S.setTimeout?S:s,l={}.toString.call(s.process)==="[object process]"?function(C){process.nextTick(function(){h(C)})}:(function(){if(s.postMessage&&!s.importScripts){var C=!0,y=s.onmessage;return s.onmessage=function(){C=!1},s.postMessage("","*"),s.onmessage=y,C}})()?(u="setImmediate$"+Math.random()+"$",s.addEventListener?s.addEventListener("message",v,!1):s.attachEvent("onmessage",v),function(C){s.postMessage(u+C,"*")}):s.MessageChannel?((d=new MessageChannel).port1.onmessage=function(C){h(C.data)},function(C){d.port2.postMessage(C)}):g&&"onreadystatechange"in g.createElement("script")?(c=g.documentElement,function(C){var y=g.createElement("script");y.onreadystatechange=function(){h(C),y.onreadystatechange=null,c.removeChild(y),y=null},c.appendChild(y)}):function(C){setTimeout(h,0,C)},S.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var y=new Array(arguments.length-1),D=0;D<y.length;D++)y[D]=arguments[D+1];var L={callback:C,args:y};return _[p]=L,l(p),p++},S.clearImmediate=b}function b(C){delete _[C]}function h(C){if(f)setTimeout(h,0,C);else{var y=_[C];if(y){f=!0;try{(function(D){var L=D.callback,O=D.args;switch(O.length){case 0:L();break;case 1:L(O[0]);break;case 2:L(O[0],O[1]);break;case 3:L(O[0],O[1],O[2]);break;default:L.apply(o,O)}})(y)}finally{b(C),f=!1}}}}function v(C){C.source===s&&typeof C.data=="string"&&C.data.indexOf(u)===0&&h(+C.data.slice(u.length))}})(typeof self>"u"?a===void 0?this:a:self)}).call(this,typeof Ui<"u"?Ui:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Pc)),Pc.exports}var fS=rx();const Cr=pS(fS),ix=yS({__proto__:null,default:Cr},[fS]),ax={class:"page-content"},sx={class:"container mx-auto px-4 sm:px-6 lg:px-8 pb-16",style:{"max-width":"720px"}},ox={class:"text-sm text-base-400 font-mono mb-6 flex items-center gap-2"},lx={class:"card publish-card relative overflow-hidden p-8"},cx={class:"text-2xl font-bold text-white mb-8 flex items-center gap-3"},dx={class:"form-group"},ux={class:"form-label font-mono text-base-400 mb-2 block required"},_x={class:"drop-zone-text"},px={class:"drop-zone-subtitle"},mx={class:"drop-zone-hint"},gx={class:"text-center"},fx={class:"btn btn-secondary zip-select-btn px-4 py-2 rounded-lg cursor-pointer"},Ex={class:"file-preview-header"},Sx={id:"file-preview-list",class:"file-preview-list"},bx={key:0,class:"mt-2 text-neon-400"},hx={id:"file-preview-summary",class:"file-preview-summary"},Tx={class:"form-group"},vx={for:"skill-select",class:"form-label font-mono text-base-400 mb-2 block"},Rx=["disabled"],Cx={value:""},yx=["value"],Nx={class:"form-hint"},Ox={class:"skill-meta-readonly space-y-4 pt-4 border-t border-base-800"},Ax={class:"form-group"},Ix={for:"skill-id",class:"form-label font-mono text-base-400 mb-2 block required"},xx=["placeholder"],Dx={class:"form-hint"},wx={class:"form-group"},Lx={for:"skill-name",class:"form-label font-mono text-base-400 mb-2 block required"},Mx=["placeholder"],kx={class:"form-group"},Px={for:"skill-description",class:"form-label font-mono text-base-400 mb-2 block required"},Ux=["placeholder"],Fx={class:"form-hint"},Bx={class:"text-neon-400"},Gx={class:"form-group pt-4 border-t border-base-800"},Yx={for:"changelog",class:"form-label font-mono text-base-400 mb-2 block"},qx=["disabled","placeholder"],Hx={key:0,class:"p-4 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 text-sm"},Vx={key:1,class:"progress-container visible"},zx={class:"progress-bar-wrapper"},$x={class:"progress-text"},Wx={class:"flex gap-4 justify-end pt-6 border-t border-base-800 mt-8"},Kx=["disabled"],Qx={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Xx={key:1,class:"spinner spinner-sm"},Bi=500,Zx=Pt({__name:"PublishView",setup(t){const e=Mr(),{t:n}=on(),r=me(),i=me(),a=me([]),s=me([]),o=me(null),l=me(""),c=me(!1),d=me(!1),u=me(0),p=me(""),_=me(""),f=me(""),g=me({skillId:"",name:"",description:"",changelog:""}),S=Ie(()=>f.value===""),b=Ie(()=>S.value?g.value.name&&s.value.length>0:s.value.length>0);Ht(async()=>{try{const U=await rr.list();a.value=U.skills.filter(H=>H.permission==="owner"||H.permission==="collaborator")}catch(U){console.error("Failed to load skills:",U)}});function h(U){if(!U||typeof U!="string")return"";let H=U.trim().replace(/\.zip$/i,"");return H=H.toLowerCase().replace(/[\s_]+/g,"-").replace(/[^a-z0-9\-]+/g,""),H=H.replace(/-+/g,"-").replace(/^-|-$/g,""),!H||!/^[a-z0-9\-_]+$/.test(H)?"":H}function v(U){const H=U.filter(q=>/(^|\/)SKILL\.md$/i.test(q));return H.length?H.slice().sort((q,te)=>q.length-te.length)[0]:null}function C(U){const H={},q=U.split(/\r?\n/);let te=0;for(;te<q.length;){const M=q[te];if(M===void 0){te+=1;continue}const G=M.match(/^([\w-]+):\s*(.*)$/);if(!G||!G[1]){te+=1;continue}const j=G[1];let oe=G[2]?.trimEnd()||"";if([">","|",">-",">+","|-","|+"].includes(oe)){te+=1;const Ee=[];for(;te<q.length;){const Z=q[te];if(Z===void 0||Z.match(/^([\w-]+):\s/)&&!Z.startsWith(" ")&&Ee.length)break;if(Z.startsWith(" ")||Z===""&&Ee.length)Ee.push(Z.startsWith(" ")?Z.slice(2):"");else{if(Ee.length)break;if(Z===""){te+=1;continue}else break}te+=1}H[j]=Ee.join(`
82
82
  `).trim();continue}H[j]=oe.replace(/^["'](.+)["']$/,"$1").trim(),te+=1}return H}function y(U){let H=U,q="",te="";const M=U.match(/^---\r?\n([\s\S]*?)\r?\n---\s*\r?\n?/);if(M&&M[1]){const G=C(M[1]);q=(G.name||"").trim(),te=(G.description||"").trim(),H=U.slice(M[0].length)}if(!q){const G=H.match(/^#\s+(.+)$/m);G&&G[1]&&(q=G[1].trim())}if(!te){const j=H.replace(/^#\s+.+$/m,"").trim().split(/\n\n+/).find(oe=>{const ie=oe.trim();return ie&&!ie.startsWith("#")&&!ie.startsWith("```")});j&&(te=j.replace(/\s*\n\s*/g," ").trim())}return te.length>Bi&&(te=te.slice(0,Bi)),{name:q,description:te}}function D(U,H){U&&(g.value.skillId=U),g.value.name=H.name||"",g.value.description=H.description||""}async function L(U,H){const q=v(H);if(!q)return null;const te=U.file(q);return te?te.async("string"):null}function O(){r.value?.click()}async function N(U){const q=U.target.files;if(!q||q.length===0)return;_.value="",s.value=[];let te=0;const M=new Cr,G=[];try{for(let Z=0;Z<q.length;Z++){const ne=q[Z];if(!ne)continue;const re=ne.webkitRelativePath;M.file(re,ne),G.push(re),s.value.push({name:re,size:ne.size}),te+=ne.size}if(!v(G)){_.value="上传的目录中未找到 SKILL.md 文件";return}const j=await L(M,G),oe=j!=null?y(j):{name:"",description:""},ie=q[0],Ee=ie?h(ie.webkitRelativePath.split("/")[0]||""):"";o.value=await M.generateAsync({type:"blob"}),l.value="skill-package.zip",D(Ee,oe)}catch(j){_.value="处理文件失败: "+j.message}}async function B(U){const q=U.target.files?.[0];if(!q)return;if(_.value="",!q.name.toLowerCase().endsWith(".zip")){_.value="请选择 .zip 文件";return}const te=h(q.name);await K(q,te),i.value&&(i.value.value="")}async function K(U,H){try{const q=await Cr.loadAsync(U),te=[];if(q.forEach((j,oe)=>{oe.dir||te.push(j)}),!v(te)){_.value="zip 中未找到 SKILL.md";return}const M=await L(q,te),G=M!=null?y(M):{name:"",description:""};o.value=U,l.value=U.name,s.value=te.map(j=>({name:j,size:0})),D(H,G)}catch(q){_.value="读取 zip 失败: "+q.message}}async function I(U){c.value=!1,_.value="";const H=U.dataTransfer?.items;if(!H||H.length===0)return;const q=H[0];if(!q||q.kind!=="file"){_.value="请拖拽文件夹或 zip 文件";return}const te=q.webkitGetAsEntry();if(!te){_.value="无法读取拖拽项";return}if(te.isFile&&te.name.toLowerCase().endsWith(".zip")){const ie=await new Promise((Z,ne)=>{te.file(Z,ne)}),Ee=h(ie.name);await K(ie,Ee);return}let M="";te.isDirectory&&(M=h(te.name));const G=new Cr,j=[];s.value=[];let oe=0;try{for(let Z=0;Z<H.length;Z++){const ne=H[Z];if(ne&&ne.kind==="file"){const re=ne.webkitGetAsEntry();re&&await W(re,G,"",j,(_e,ge)=>{s.value.push({name:ge,size:_e}),oe+=_e})}}if(!v(j)){_.value="上传的目录中未找到 SKILL.md 文件";return}const ie=await L(G,j),Ee=ie!=null?y(ie):{name:"",description:""};o.value=await G.generateAsync({type:"blob"}),l.value="skill-package.zip",D(M,Ee)}catch(ie){_.value="处理文件失败: "+ie.message}}async function W(U,H,q,te,M){if(U.isFile){const G=await new Promise((oe,ie)=>{U.file(oe,ie)}),j=q+U.name;H.file(j,G),te.push(j),M&&M(G.size,j)}else if(U.isDirectory){const G=q+U.name+"/",j=U.createReader(),oe=await new Promise((ie,Ee)=>{const Z=[],ne=()=>{j.readEntries(re=>{re.length===0?ie(Z):(Z.push(...re),ne())},Ee)};ne()});for(const ie of oe)await W(ie,H,G,te,M)}}function T(){s.value=[],o.value=null,l.value="",g.value.skillId="",g.value.name="",g.value.description="",r.value&&(r.value.value=""),i.value&&(i.value.value="")}function w(U){return U<1024?U+" B":U<1024*1024?(U/1024).toFixed(1)+" KB":(U/(1024*1024)).toFixed(1)+" MB"}async function ce(){if(!o.value||d.value)return;_.value="";const U=g.value.skillId.trim();if(!U){_.value="无法从上传包得到 Skill ID,请使用合法文件夹名或 zip 文件名";return}if(!/^[a-z0-9\-_]+$/.test(U)){_.value="Skill ID 只能包含小写字母、数字、下划线和连字符";return}if(f.value&&f.value!==U){_.value="上传包的 Skill ID 与下拉框所选已有 Skill 不一致,请重新选择或更换压缩包";return}if(S.value){if(!g.value.name.trim()){_.value="SKILL.md 中缺少可用的 Skill 名称";return}const q=g.value.description.trim();if(!q){_.value="SKILL.md 中缺少描述";return}if(q.length>Bi){_.value=`描述不能超过 ${Bi} 字`;return}}d.value=!0,u.value=0,p.value=n("publish.preparing");try{p.value=n("publish.uploading");const H=setInterval(()=>{u.value<90&&(u.value+=Math.random()*15)},200),q=new FormData;q.append("zip_file",o.value,l.value),q.append("skill_id",U),S.value&&(q.append("name",g.value.name.trim()),q.append("description",g.value.description.trim())),g.value.changelog.trim()&&q.append("changelog",g.value.changelog.trim());const te=await rr.upload(q);clearInterval(H),u.value=100,p.value=n("publish.completed"),setTimeout(()=>{e.push("/")},1e3)}catch(H){_.value=H.message||n("publish.uploadFailed"),d.value=!1}}return(U,H)=>{const q=Bn("router-link");return le(),de("main",ax,[m("div",sx,[m("div",ox,[H[8]||(H[8]=m("span",{class:"text-neon-400"},"~",-1)),H[9]||(H[9]=m("span",{class:"opacity-50"},"/",-1)),Ue(q,{to:"/",class:"hover:text-white transition-colors"},{default:it(()=>[...H[7]||(H[7]=[he("home",-1)])]),_:1}),H[10]||(H[10]=m("span",{class:"opacity-50"},"/",-1)),H[11]||(H[11]=m("span",{class:"text-white"},"publish",-1))]),m("div",lx,[H[18]||(H[18]=m("div",{class:"absolute top-0 right-0 bg-base-800 text-base-400 text-[10px] font-mono px-2 py-1 rounded-bl-lg opacity-50 select-none"},"CMD-PUB",-1)),m("h1",cx,[H[12]||(H[12]=m("span",{class:"text-neon-400 font-mono font-normal opacity-70"},">",-1)),m("span",null,X(J(n)("publish.title")),1)]),m("form",{onSubmit:At(ce,["prevent"]),class:"space-y-6"},[m("div",dx,[m("label",ux,X(J(n)("publish.uploadFile")),1),m("div",{id:"drop-zone",class:Fe(["drop-zone",{"drag-over":c.value}]),onDragover:H[0]||(H[0]=At(te=>c.value=!0,["prevent"])),onDragleave:H[1]||(H[1]=At(te=>c.value=!1,["prevent"])),onDrop:At(I,["prevent"]),onClick:O},[H[13]||(H[13]=dr('<div class="drop-zone-icon" data-v-2271b8c9><svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-2271b8c9><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" data-v-2271b8c9></path><polyline points="17 8 12 3 7 8" data-v-2271b8c9></polyline><line x1="12" y1="3" x2="12" y2="15" data-v-2271b8c9></line></svg></div>',1)),m("div",_x,X(J(n)("publish.dropZoneText")),1),m("div",px,X(J(n)("publish.dropZoneSubtitle")),1),m("div",mx,X(J(n)("publish.dropZoneHint")),1)],34),m("input",{ref_key:"fileInput",ref:r,type:"file",webkitdirectory:"",directory:"",multiple:"",class:"hidden",onChange:N},null,544),H[15]||(H[15]=m("div",{class:"divider"},[m("span",null,"OR")],-1)),m("div",gx,[m("label",fx,[H[14]||(H[14]=m("span",{class:"text-neon-400"},"📎",-1)),m("span",null,X(J(n)("publish.selectZip")),1),m("input",{type:"file",ref_key:"zipInput",ref:i,class:"hidden",accept:".zip",onChange:B},null,544)])]),m("div",{id:"file-preview",class:Fe(["file-preview",{visible:s.value.length>0}])},[m("div",Ex,[m("span",null,X(J(n)("publish.selectedFiles")),1),m("button",{type:"button",class:"file-preview-clear",onClick:T},"[ clear ]")]),m("div",Sx,[(le(!0),de(ke,null,Rt(s.value.slice(0,20),te=>(le(),de("div",{key:te.name,class:"file-item"},X(te.name)+" ("+X(w(te.size))+") ",1))),128)),s.value.length>20?(le(),de("div",bx,X(J(n)("publish.moreFiles",{count:s.value.length-20})),1)):ze("",!0)]),m("div",hx,X(J(n)("publish.totalFiles",{count:s.value.length})),1)],2)]),m("div",Tx,[m("label",vx,X(J(n)("publish.selectSkill")),1),Ve(m("select",{id:"skill-select","onUpdate:modelValue":H[2]||(H[2]=te=>f.value=te),class:"rounded-lg px-4 py-2.5 w-full",disabled:d.value},[m("option",Cx,"-- "+X(J(n)("publish.createNewSkill"))+" --",1),(le(!0),de(ke,null,Rt(a.value,te=>(le(),de("option",{key:te.id,value:te.id},X(te.name),9,yx))),128))],8,Rx),[[Ir,f.value]]),m("p",Nx,X(J(n)("publish.skillSelectHint")),1)]),m("div",Ox,[m("div",Ax,[m("label",Ix,X(J(n)("publish.skillId")),1),Ve(m("input",{type:"text",id:"skill-id","onUpdate:modelValue":H[3]||(H[3]=te=>g.value.skillId=te),readonly:"",placeholder:J(n)("publish.skillIdPlaceholder"),pattern:"[a-z0-9\\-_]+",class:"rounded-lg px-4 py-2.5 w-full"},null,8,xx),[[at,g.value.skillId]]),m("p",Dx,X(J(n)("publish.skillIdHint")),1)]),m("div",wx,[m("label",Lx,X(J(n)("publish.skillName")),1),Ve(m("input",{type:"text",id:"skill-name","onUpdate:modelValue":H[4]||(H[4]=te=>g.value.name=te),readonly:"",placeholder:J(n)("publish.skillNamePlaceholder"),class:"rounded-lg px-4 py-2.5 w-full"},null,8,Mx),[[at,g.value.name]])]),m("div",kx,[m("label",Px,X(J(n)("publish.description")),1),Ve(m("textarea",{id:"skill-description","onUpdate:modelValue":H[5]||(H[5]=te=>g.value.description=te),rows:"3",readonly:"",maxlength:"500",placeholder:J(n)("publish.descriptionPlaceholder"),class:"rounded-lg px-4 py-2.5 w-full"},null,8,Ux),[[at,g.value.description]]),m("p",Fx,[m("span",Bx,X(g.value.description.length),1),H[16]||(H[16]=he(" / 500 chars",-1))])])]),m("div",Gx,[m("label",Yx,X(J(n)("publish.changelog")),1),Ve(m("textarea",{id:"changelog","onUpdate:modelValue":H[6]||(H[6]=te=>g.value.changelog=te),rows:"4",disabled:d.value,placeholder:J(n)("publish.changelogPlaceholder"),class:"rounded-lg px-4 py-2.5 w-full"},null,8,qx),[[at,g.value.changelog]])]),_.value?(le(),de("div",Hx,X(_.value),1)):ze("",!0),d.value?(le(),de("div",Vx,[m("div",zx,[m("div",{class:"progress-bar",style:ga({width:u.value+"%"})},null,4)]),m("p",$x,X(p.value),1)])):ze("",!0),m("div",Wx,[Ue(q,{to:"/",class:"btn btn-secondary px-6 py-2.5 rounded-lg"},{default:it(()=>[he(X(J(n)("common.cancel")),1)]),_:1}),m("button",{type:"submit",id:"submit-btn",disabled:!b.value||d.value,class:"btn btn-primary px-6 py-2.5 rounded-lg flex items-center gap-2"},[d.value?ze("",!0):(le(),de("svg",Qx,[...H[17]||(H[17]=[m("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},null,-1),m("polyline",{points:"17 8 12 3 7 8"},null,-1),m("line",{x1:"12",y1:"3",x2:"12",y2:"15"},null,-1)])])),d.value?(le(),de("span",Xx)):ze("",!0),he(" "+X(d.value?J(n)("publish.publishing"):J(n)("publish.publishBtn")),1)],8,Kx)])],32)])])])}}}),jx=vn(Zx,[["__scopeId","data-v-2271b8c9"]]),Jx={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-8"},eD={class:"max-w-2xl mx-auto"},tD={class:"text-sm text-base-400 font-mono mb-6 flex items-center gap-2"},nD={class:"text-white"},rD={class:"skill-card p-8 relative overflow-hidden"},iD={class:"mb-8 border-b border-base-800 pb-6"},aD={class:"text-2xl font-bold text-white mb-2 flex items-center gap-3"},sD={class:"text-base-400 text-sm font-mono"},oD={class:"mb-10"},lD={class:"flex items-center gap-2 text-lg font-semibold text-white pb-3 border-b border-base-800 font-mono"},cD={class:"font-mono text-xs text-base-500 mt-1"},dD=["placeholder"],uD={class:"font-mono text-xs text-base-500 mt-1"},_D={class:"pt-2"},pD=["disabled"],mD={key:0,class:"spinner spinner-sm"},gD={class:"mb-10"},fD={class:"flex items-center gap-2 text-lg font-semibold text-white pb-3 border-b border-base-800 font-mono"},ED={class:"mt-6"},SD=["innerHTML"],bD={class:"flex items-center gap-2 text-lg font-semibold text-white pb-3 border-b border-base-800 font-mono"},hD={class:"font-mono text-xs text-base-500 mt-1"},TD={class:"pt-2"},vD=["disabled"],RD={key:0,class:"spinner spinner-sm"},CD=Pt({__name:"SettingsView",setup(t){const e=Ci(),{t:n}=on(),r=me({username:"",name:""}),i=me(!1),a=me({current:"",new:"",confirm:""}),s=me(!1),o=Ie(()=>a.value.current&&a.value.new&&a.value.confirm&&a.value.new===a.value.confirm);Ht(()=>{l()});function l(){r.value={username:e.username||"",name:e.user?.name||""}}async function c(){i.value=!0;try{await e.updateProfile({name:r.value.name}),rt.success(n("settings.saveSuccess"))}catch{rt.error(n("settings.saveFailed"))}finally{i.value=!1}}async function d(){if(!a.value.current){rt.warning(n("settings.noOldPassword"));return}if(a.value.new.length<6){rt.warning(n("settings.newPassTooShort"));return}if(a.value.new!==a.value.confirm){rt.warning(n("settings.passMismatch"));return}s.value=!0;try{const u=await Tn("/auth/me/change-password",{old_password:a.value.current,new_password:a.value.new});u.ok?(rt.success(n("settings.changeSuccess")),a.value={current:"",new:"",confirm:""}):rt.error(u.detail||n("settings.changeFailed"))}catch(u){u.data?.error==="wrong_password"?rt.error(n("settings.wrongPassword")):rt.error(u.message||n("settings.changeFailed"))}finally{s.value=!1}}return(u,p)=>{const _=Bn("router-link");return le(),de("main",Jx,[m("div",eD,[m("div",tD,[p[5]||(p[5]=m("span",{class:"text-neon-400"},"~",-1)),p[6]||(p[6]=m("span",{class:"opacity-50"},"/",-1)),Ue(_,{to:"/",class:"hover:text-white transition-colors"},{default:it(()=>[he(X(J(n)("nav.home")),1)]),_:1}),p[7]||(p[7]=m("span",{class:"opacity-50"},"/",-1)),m("span",nD,X(J(n)("nav.settings")),1)]),m("div",rD,[p[18]||(p[18]=m("div",{class:"absolute top-0 right-0 bg-base-800 text-base-400 text-[10px] font-mono px-2 py-1 rounded-bl-lg opacity-50 select-none"},"CFG-USER",-1)),m("div",iD,[m("h1",aD,[p[8]||(p[8]=m("span",{class:"text-neon-400 font-mono font-normal opacity-70"},">",-1)),m("span",null,X(J(n)("settings.heading")),1)]),m("p",sD,X(J(n)("settings.subtitle")),1)]),m("div",oD,[m("h2",lD,[p[9]||(p[9]=m("span",{class:"text-neon-400"},"#",-1)),he(" "+X(J(n)("settings.basicInfo")),1)]),m("form",{onSubmit:At(c,["prevent"]),class:"space-y-5 mt-6"},[m("div",null,[p[10]||(p[10]=m("label",{class:"font-mono text-base-400 mb-2 block text-sm"},[m("span",{class:"text-neon-400 opacity-70"},"let"),he(),m("span",{class:"text-white"},"username"),he(),m("span",{class:"text-neon-400 opacity-70"},"=")],-1)),Ve(m("input",{type:"text","onUpdate:modelValue":p[0]||(p[0]=f=>r.value.username=f),disabled:"",class:"w-full bg-base-950 border border-base-800 rounded-lg px-4 py-3 font-mono text-white opacity-50 cursor-not-allowed"},null,512),[[at,r.value.username]]),m("p",cD,X(J(n)("settings.usernameHint")),1)]),m("div",null,[p[11]||(p[11]=m("label",{class:"font-mono text-base-400 mb-2 block text-sm"},[m("span",{class:"text-neon-400 opacity-70"},"let"),he(),m("span",{class:"text-white"},"name"),he(),m("span",{class:"text-neon-400 opacity-70"},"=")],-1)),Ve(m("input",{type:"text","onUpdate:modelValue":p[1]||(p[1]=f=>r.value.name=f),placeholder:J(n)("settings.namePlaceholder"),class:"w-full bg-base-950 border border-base-800 rounded-lg px-4 py-3 font-mono text-white focus:border-neon-400 focus:outline-none focus:ring-1 focus:ring-neon-400 transition-colors"},null,8,dD),[[at,r.value.name]]),m("p",uD,X(J(n)("settings.nameHint")),1)]),m("div",_D,[m("button",{type:"submit",disabled:i.value,class:"btn-primary px-6 py-2.5 rounded-lg font-mono flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed"},[i.value?(le(),de("span",mD)):(le(),de(ke,{key:1},[he(X(J(n)("settings.saveBtn")),1)],64))],8,pD)])],32)]),m("div",gD,[m("h2",fD,[p[12]||(p[12]=m("span",{class:"text-neon-400"},"#",-1)),he(" "+X(J(n)("settings.cliSection")),1)]),m("div",ED,[m("p",{class:"text-base-400 text-sm font-mono mb-4",innerHTML:J(n)("settings.cliDesc")},null,8,SD),Ue(_,{to:"/cli-code",class:"inline-flex items-center gap-2 rounded-lg px-4 py-3 font-mono text-sm border border-neon-400/20 text-neon-400 bg-neon-400/5 hover:bg-neon-400/10 transition-colors"},{default:it(()=>[p[13]||(p[13]=m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"w-4 h-4"},[m("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),m("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})],-1)),m("span",null,X(J(n)("settings.cliLink")),1)]),_:1})])]),m("div",null,[m("h2",bD,[p[14]||(p[14]=m("span",{class:"text-neon-400"},"#",-1)),he(" "+X(J(n)("settings.passwordSection")),1)]),m("form",{onSubmit:At(d,["prevent"]),class:"space-y-5 mt-6"},[m("div",null,[p[15]||(p[15]=m("label",{class:"font-mono text-base-400 mb-2 block text-sm"},[m("span",{class:"text-neon-400 opacity-70"},"let"),he(),m("span",{class:"text-white"},"current_password"),he(),m("span",{class:"text-neon-400 opacity-70"},"=")],-1)),Ve(m("input",{type:"password","onUpdate:modelValue":p[2]||(p[2]=f=>a.value.current=f),required:"",class:"w-full bg-base-950 border border-base-800 rounded-lg px-4 py-3 font-mono text-white focus:border-neon-400 focus:outline-none focus:ring-1 focus:ring-neon-400 transition-colors"},null,512),[[at,a.value.current]])]),m("div",null,[p[16]||(p[16]=m("label",{class:"font-mono text-base-400 mb-2 block text-sm"},[m("span",{class:"text-neon-400 opacity-70"},"let"),he(),m("span",{class:"text-white"},"new_password"),he(),m("span",{class:"text-neon-400 opacity-70"},"=")],-1)),Ve(m("input",{type:"password","onUpdate:modelValue":p[3]||(p[3]=f=>a.value.new=f),required:"",class:"w-full bg-base-950 border border-base-800 rounded-lg px-4 py-3 font-mono text-white focus:border-neon-400 focus:outline-none focus:ring-1 focus:ring-neon-400 transition-colors"},null,512),[[at,a.value.new]]),m("p",hD,X(J(n)("settings.newPasswordHint")),1)]),m("div",null,[p[17]||(p[17]=m("label",{class:"font-mono text-base-400 mb-2 block text-sm"},[m("span",{class:"text-neon-400 opacity-70"},"let"),he(),m("span",{class:"text-white"},"confirm_password"),he(),m("span",{class:"text-neon-400 opacity-70"},"=")],-1)),Ve(m("input",{type:"password","onUpdate:modelValue":p[4]||(p[4]=f=>a.value.confirm=f),required:"",class:"w-full bg-base-950 border border-base-800 rounded-lg px-4 py-3 font-mono text-white focus:border-neon-400 focus:outline-none focus:ring-1 focus:ring-neon-400 transition-colors"},null,512),[[at,a.value.confirm]])]),m("div",TD,[m("button",{type:"submit",disabled:s.value||!o.value,class:"btn-primary px-6 py-2.5 rounded-lg font-mono flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed"},[s.value?(le(),de("span",RD)):(le(),de(ke,{key:1},[he(X(J(n)("settings.changePasswordBtn")),1)],64))],8,vD)])],32)])])])])}}}),yD={class:"min-h-screen"},ND={class:"container mx-auto px-4 sm:px-6 lg:px-8 pt-8 pb-0",style:{"max-width":"520px"}},OD={class:"text-sm text-base-400 font-mono mb-6 flex items-center gap-2"},AD={class:"page-content"},ID={class:"container mx-auto px-4 sm:px-6 lg:px-8 pt-0 pb-16",style:{"max-width":"520px"}},xD={class:"card cli-code-card relative overflow-hidden p-8"},DD={class:"cli-code-header mb-8 text-left"},wD={class:"text-2xl font-bold text-white mb-2 flex items-center gap-3"},LD={class:"text-base-400 text-sm font-mono"},MD={key:0,class:"cli-code-loading py-8 text-center"},kD={class:"text-base-400 text-sm font-mono mt-4"},PD={key:1},UD={class:"cli-code-display rounded-xl p-8 mb-8 flex flex-col items-center"},FD={class:"cli-code-value text-4xl sm:text-5xl font-mono tracking-widest text-center select-all"},BD={class:"cli-code-timer font-mono mt-6 flex items-center gap-2 text-base-400"},GD={class:"cli-code-actions flex flex-col sm:flex-row gap-4 justify-center"},YD=["disabled"],qD={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},HD={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},VD=["disabled"],zD={class:"cli-code-hint mt-8 p-4 rounded-lg text-left"},$D={class:"block mb-2 font-mono text-neon-400"},WD=["innerHTML"],KD=Pt({__name:"CliCodeView",setup(t){const e=Ci(),{t:n}=on(),r=me(""),i=me(!1),a=me(!1),s=me(null),o=me(null),l=me(0),c=Ie(()=>l.value<=0),d=Ie(()=>l.value>0&&l.value<=6e4),u=Ie(()=>{if(c.value)return n("cliCode.expired");const S=Math.floor(l.value/6e4),b=Math.floor(l.value%6e4/1e3);return`${`${S}:${String(b).padStart(2,"0")}`}${n("cliCode.expires")}`});Ht(async()=>{await e.fetchUser()&&p()}),ha(()=>{o.value&&clearInterval(o.value)});async function p(){i.value=!0;try{const S=await Tn("/auth/cli-code/generate");r.value=S.code,s.value=new Date(S.expires_at),_()}catch{rt.error(n("cliCode.genFailed"))}finally{i.value=!1}}function _(){o.value&&clearInterval(o.value),f(),o.value=window.setInterval(f,1e3)}function f(){if(!s.value){l.value=0;return}const S=new Date;l.value=Math.max(0,s.value.getTime()-S.getTime()),l.value<=0&&o.value&&clearInterval(o.value)}async function g(){if(r.value)try{await navigator.clipboard.writeText(r.value),a.value=!0,setTimeout(()=>{a.value=!1},2e3)}catch{rt.info(n("cliCode.copiedToast"))}}return(S,b)=>{const h=Bn("router-link");return le(),de("div",yD,[m("div",ND,[m("div",OD,[b[1]||(b[1]=m("span",{class:"text-neon-400"},"~",-1)),b[2]||(b[2]=m("span",{class:"opacity-50"},"/",-1)),Ue(h,{to:"/",class:"hover:text-white transition-colors"},{default:it(()=>[...b[0]||(b[0]=[he("home",-1)])]),_:1}),b[3]||(b[3]=m("span",{class:"opacity-50"},"/",-1)),b[4]||(b[4]=m("span",{class:"text-white"},"cli-code",-1))])]),m("main",AD,[m("div",ID,[m("div",xD,[b[11]||(b[11]=m("div",{class:"absolute top-0 right-0 bg-base-800 text-base-400 text-[10px] font-mono px-2 py-1 rounded-bl-lg opacity-50 select-none"},"AUTH-CLI",-1)),m("div",DD,[m("h1",wD,[b[5]||(b[5]=m("span",{class:"text-neon-400 font-mono font-normal opacity-70"},">",-1)),m("span",null,X(J(n)("cliCode.heading")),1)]),m("p",LD,"// "+X(J(n)("cliCode.subtitle")),1)]),i.value?(le(),de("div",MD,[b[6]||(b[6]=m("div",{class:"spinner mx-auto"},null,-1)),m("div",kD,X(J(n)("cliCode.secureToken")),1)])):(le(),de("div",PD,[m("div",UD,[m("div",FD,X(r.value||"----"),1),m("div",BD,[b[7]||(b[7]=m("svg",{class:"cli-code-timer-icon w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("circle",{cx:"12",cy:"12",r:"10"}),m("polyline",{points:"12 6 12 12 16 14"})],-1)),m("span",{class:Fe({"text-red-400":d.value,"text-red-500":c.value})},X(u.value),3)])]),m("div",GD,[m("button",{onClick:g,disabled:!r.value||i.value,class:"btn btn-primary flex-1 py-3 font-mono text-sm rounded-lg flex items-center justify-center gap-2"},[a.value?(le(),de("svg",HD,[...b[9]||(b[9]=[m("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(le(),de("svg",qD,[...b[8]||(b[8]=[m("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),m("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),m("span",null,X(a.value?J(n)("cliCode.copied"):J(n)("cliCode.copyBtn")),1)],8,YD),m("button",{onClick:p,disabled:i.value,class:"btn btn-secondary flex-1 py-3 font-mono text-sm rounded-lg flex items-center justify-center gap-2"},[b[10]||(b[10]=m("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("polyline",{points:"23 4 23 10 17 10"}),m("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})],-1)),m("span",null,X(J(n)("cliCode.regenerate")),1)],8,VD)])])),m("div",zD,[m("strong",$D,"# "+X(J(n)("cliCode.usage")),1),m("span",{class:"font-mono text-sm",innerHTML:J(n)("cliCode.cliHint")},null,8,WD)])])])])])}}}),QD=vn(KD,[["__scopeId","data-v-d1a07731"]]),XD={class:"setup-container"},ZD={class:"setup-shell"},jD={class:"lang-switcher-menu"},JD={class:"setup-card"},ew={class:"setup-header"},tw={class:"setup-subtitle"},nw={key:0,class:"setup-error",role:"alert"},rw={key:1,class:"setup-success",role:"status"},iw={class:"setup-field"},aw=["disabled"],sw={class:"setup-hint"},ow={class:"setup-field"},lw=["disabled"],cw={class:"setup-hint"},dw={class:"setup-field"},uw=["disabled"],_w={class:"setup-actions"},pw=["disabled"],mw=Pt({__name:"SetupView",setup(t){const e=Mr(),{t:n,setLang:r,currentLang:i}=on(),a=Ie(()=>i.value),s=me(!1),o=Ie(()=>a.value==="zh"?"中文":"English"),l=me(""),c=me(""),d=me(""),u=me(!1),p=me(""),_=me("");function f(){s.value=!s.value}function g(v){r(v),s.value=!1}async function S(){try{(await ur("/init/status")).initialized&&e.push("/")}catch(v){console.error("Failed to check init status:",v)}}async function b(){p.value="",_.value="";const v=l.value.trim(),C=c.value,y=d.value;if(!v){p.value=n("setup.errUsername");return}if(v.length<3||v.length>50){p.value=n("setup.errUsernameLength");return}if(!C){p.value=n("setup.errPassword");return}if(C.length<6){p.value=n("setup.errPasswordLength");return}if(C!==y){p.value=n("setup.errPasswordMismatch");return}u.value=!0;try{await Tn("/init/setup",{username:v,password:C}),_.value=n("setup.success"),setTimeout(()=>{e.push("/login")},2e3)}catch(D){p.value=D.message||n("setup.errFailed")}finally{u.value=!1}}function h(v){v.target.closest(".lang-switcher")||(s.value=!1)}return Ht(()=>{S(),document.addEventListener("click",h)}),(v,C)=>(le(),de("div",XD,[m("div",ZD,[m("div",{class:Fe(["lang-switcher",{active:s.value}])},[m("button",{class:"lang-switcher-trigger",onClick:f},[C[6]||(C[6]=m("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[m("circle",{cx:"12",cy:"12",r:"10"}),m("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),m("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})],-1)),m("span",null,X(o.value),1),(le(),de("svg",{class:Fe(["lang-chevron",{rotated:s.value}]),width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[...C[5]||(C[5]=[m("polyline",{points:"6 9 12 15 18 9"},null,-1)])],2))]),m("div",jD,[m("button",{class:Fe(["lang-switcher-option",{active:a.value==="zh"}]),onClick:C[0]||(C[0]=y=>g("zh"))}," 中文 ",2),m("button",{class:Fe(["lang-switcher-option",{active:a.value==="en"}]),onClick:C[1]||(C[1]=y=>g("en"))}," English ",2)])],2),C[13]||(C[13]=dr('<div class="setup-brand" data-v-0ec8dc37><span class="setup-brand-icon" data-v-0ec8dc37><svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true" data-v-0ec8dc37><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" data-v-0ec8dc37></path><polyline points="3.27 6.96 12 12.01 20.73 6.96" data-v-0ec8dc37></polyline><line x1="12" y1="22.08" x2="12" y2="12" data-v-0ec8dc37></line></svg></span><span class="setup-brand-text" data-v-0ec8dc37>Skill Base</span></div>',1)),m("div",JD,[C[12]||(C[12]=m("div",{class:"setup-card-badge"},"INIT-SYS",-1)),m("div",ew,[C[7]||(C[7]=m("h1",{class:"setup-title"},[m("span",{class:"setup-title-prompt"},">"),he(" Setup ")],-1)),m("p",tw,X(J(n)("setup.subtitle")),1)]),p.value?(le(),de("div",nw,X(p.value),1)):ze("",!0),_.value?(le(),de("div",rw,X(_.value),1)):ze("",!0),m("form",{onSubmit:At(b,["prevent"]),class:"setup-form"},[m("div",iw,[C[8]||(C[8]=m("label",{for:"username",class:"setup-label"},[m("span",{class:"setup-keyword"},"let"),he(),m("span",{class:"setup-label-name"},"admin_username"),he(),m("span",{class:"setup-equals"},"=")],-1)),m("div",null,[Ve(m("input",{type:"text",id:"username","onUpdate:modelValue":C[2]||(C[2]=y=>l.value=y),placeholder:"admin",autocomplete:"username",required:"",minlength:"3",maxlength:"50",disabled:u.value,class:"setup-input"},null,8,aw),[[at,l.value]])]),m("p",sw,X(J(n)("setup.usernameHint")),1)]),m("div",ow,[C[9]||(C[9]=m("label",{for:"password",class:"setup-label"},[m("span",{class:"setup-keyword"},"let"),he(),m("span",{class:"setup-label-name"},"password"),he(),m("span",{class:"setup-equals"},"=")],-1)),m("div",null,[Ve(m("input",{type:"password",id:"password","onUpdate:modelValue":C[3]||(C[3]=y=>c.value=y),placeholder:"••••••••",autocomplete:"new-password",required:"",minlength:"6",disabled:u.value,class:"setup-input"},null,8,lw),[[at,c.value]])]),m("p",cw,X(J(n)("setup.passwordHint")),1)]),m("div",dw,[C[10]||(C[10]=m("label",{for:"confirmPassword",class:"setup-label"},[m("span",{class:"setup-keyword"},"let"),he(),m("span",{class:"setup-label-name"},"confirm_password"),he(),m("span",{class:"setup-equals"},"=")],-1)),m("div",null,[Ve(m("input",{type:"password",id:"confirmPassword","onUpdate:modelValue":C[4]||(C[4]=y=>d.value=y),placeholder:"••••••••",autocomplete:"new-password",required:"",minlength:"6",disabled:u.value,class:"setup-input"},null,8,uw),[[at,d.value]])])]),m("div",_w,[m("button",{type:"submit",disabled:u.value,class:"setup-submit"},[C[11]||(C[11]=m("svg",{class:"btn-devtools-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[m("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})],-1)),m("span",null,X(u.value?J(n)("setup.loading"):J(n)("setup.submit")),1)],8,pw)])],32)]),C[14]||(C[14]=m("div",{class:"setup-status"},[m("span",{class:"setup-status-dot"}),m("span",{class:"setup-status-text"},"System Initialization")],-1))])]))}}),gw=vn(mw,[["__scopeId","data-v-0ec8dc37"]]);class Hd{diff(e,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const a=this.castInput(e,r),s=this.castInput(n,r),o=this.removeEmpty(this.tokenize(a,r)),l=this.removeEmpty(this.tokenize(s,r));return this.diffWithOptionsObj(o,l,r,i)}diffWithOptionsObj(e,n,r,i){var a;const s=h=>{if(h=this.postProcess(h,r),i){setTimeout(function(){i(h)},0);return}else return h},o=n.length,l=e.length;let c=1,d=o+l;r.maxEditLength!=null&&(d=Math.min(d,r.maxEditLength));const u=(a=r.timeout)!==null&&a!==void 0?a:1/0,p=Date.now()+u,_=[{oldPos:-1,lastComponent:void 0}];let f=this.extractCommon(_[0],n,e,0,r);if(_[0].oldPos+1>=l&&f+1>=o)return s(this.buildValues(_[0].lastComponent,n,e));let g=-1/0,S=1/0;const b=()=>{for(let h=Math.max(g,-c);h<=Math.min(S,c);h+=2){let v;const C=_[h-1],y=_[h+1];C&&(_[h-1]=void 0);let D=!1;if(y){const O=y.oldPos-h;D=y&&0<=O&&O<o}const L=C&&C.oldPos+1<l;if(!D&&!L){_[h]=void 0;continue}if(!L||D&&C.oldPos<y.oldPos?v=this.addToPath(y,!0,!1,0,r):v=this.addToPath(C,!1,!0,1,r),f=this.extractCommon(v,n,e,h,r),v.oldPos+1>=l&&f+1>=o)return s(this.buildValues(v.lastComponent,n,e))||!0;_[h]=v,v.oldPos+1>=l&&(S=Math.min(S,h-1)),f+1>=o&&(g=Math.max(g,h+1))}c++};if(i)(function h(){setTimeout(function(){if(c>d||Date.now()>p)return i(void 0);b()||h()},0)})();else for(;c<=d&&Date.now()<=p;){const h=b();if(h)return h}}addToPath(e,n,r,i,a){const s=e.lastComponent;return s&&!a.oneChangePerToken&&s.added===n&&s.removed===r?{oldPos:e.oldPos+i,lastComponent:{count:s.count+1,added:n,removed:r,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:s}}}extractCommon(e,n,r,i,a){const s=n.length,o=r.length;let l=e.oldPos,c=l-i,d=0;for(;c+1<s&&l+1<o&&this.equals(r[l+1],n[c+1],a);)c++,l++,d++,a.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return d&&!a.oneChangePerToken&&(e.lastComponent={count:d,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,c}equals(e,n,r){return r.comparator?r.comparator(e,n):e===n||!!r.ignoreCase&&e.toLowerCase()===n.toLowerCase()}removeEmpty(e){const n=[];for(let r=0;r<e.length;r++)e[r]&&n.push(e[r]);return n}castInput(e,n){return e}tokenize(e,n){return Array.from(e)}join(e){return e.join("")}postProcess(e,n){return e}get useLongestToken(){return!1}buildValues(e,n,r){const i=[];let a;for(;e;)i.push(e),a=e.previousComponent,delete e.previousComponent,e=a;i.reverse();const s=i.length;let o=0,l=0,c=0;for(;o<s;o++){const d=i[o];if(d.removed)d.value=this.join(r.slice(c,c+d.count)),c+=d.count;else{if(!d.added&&this.useLongestToken){let u=n.slice(l,l+d.count);u=u.map(function(p,_){const f=r[c+_];return f.length>p.length?f:p}),d.value=this.join(u)}else d.value=this.join(n.slice(l,l+d.count));l+=d.count,d.added||(c+=d.count)}}return i}}class fw extends Hd{}const Ew=new fw;function Sw(t,e,n){return Ew.diff(t,e,n)}const cf="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class bw extends Hd{tokenize(e){const n=new RegExp(`(\\r?\\n)|[${cf}]+|[^\\S\\n\\r]+|[^${cf}]`,"ug");return e.match(n)||[]}}const hw=new bw;function Tw(t,e,n){return hw.diff(t,e,n)}class vw extends Hd{constructor(){super(...arguments),this.tokenize=Cw}equals(e,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!e.includes(`
83
83
  `))&&(e=e.trim()),(!r.newlineIsToken||!n.includes(`