@highstate/designer 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{xiAiC-VY.js → -oaD50UK.js} +1 -1
- package/.output/public/_nuxt/{CodzMKzx.js → 0ekw3e2V.js} +1 -1
- package/.output/public/_nuxt/{CM0USXxa.js → 1f5tAgHw.js} +1 -1
- package/.output/public/_nuxt/{DTEvwfme.js → 54_UD3a3.js} +1 -1
- package/.output/public/_nuxt/{8hNo2oxe.js → 5ggY4uig.js} +1 -1
- package/.output/public/_nuxt/{htyOXo2B.js → 6EZimURw.js} +1 -1
- package/.output/public/_nuxt/{Be3bUPYU.js → BFNM2w_f.js} +1 -1
- package/.output/public/_nuxt/{BBhg39jC.js → BGLu70Yq.js} +1 -1
- package/.output/public/_nuxt/{8KpM6cBw.js → BIuj43Wh.js} +1 -1
- package/.output/public/_nuxt/BNGfscqk.js +1 -0
- package/.output/public/_nuxt/{C1OzDFAd.js → BUXOnL59.js} +1 -1
- package/.output/public/_nuxt/{BYmHaUHG.js → Bbwybh3N.js} +1 -1
- package/.output/public/_nuxt/{DaZa-Z5n.js → BczD6j-v.js} +1 -1
- package/.output/public/_nuxt/{B13CirDR.js → Bh0qehhp.js} +1 -1
- package/.output/public/_nuxt/{rtii14lI.js → BmDdxTjo.js} +1 -1
- package/.output/public/_nuxt/{DdSZEM1_.js → BqeRdtD4.js} +2 -2
- package/.output/public/_nuxt/{B3_RfxPY.js → BxZD33h1.js} +1 -1
- package/.output/public/_nuxt/{C-Sr9OUA.js → CCd08HS_.js} +1 -1
- package/.output/public/_nuxt/{DIo7DiTh.js → CJ6lOLXp.js} +1 -1
- package/.output/public/_nuxt/CN9dMhDM.js +1 -0
- package/.output/public/_nuxt/{HXyjJC-p.js → CQ4fj8p0.js} +1 -1
- package/.output/public/_nuxt/{CXHtlxuP.js → CXxzV4dz.js} +1 -1
- package/.output/public/_nuxt/{BktRuikR.js → CatV_12G.js} +1 -1
- package/.output/public/_nuxt/{bgIcLC22.js → CeMkeBDb.js} +1 -1
- package/.output/public/_nuxt/{CBZUZSSS.js → CelvVQyk.js} +1 -1
- package/.output/public/_nuxt/{CnrObePb.js → CfV455SO.js} +1 -1
- package/.output/public/_nuxt/{D9ayVCRO.js → CfqrF6sE.js} +1 -1
- package/.output/public/_nuxt/{Bi--9362.js → Cfs9EX91.js} +1 -1
- package/.output/public/_nuxt/{LXHlNQaX.js → ChM1GEGa.js} +1 -1
- package/.output/public/_nuxt/CimE6O20.js +280 -0
- package/.output/public/_nuxt/CtwNW5xN.js +1 -0
- package/.output/public/_nuxt/{D9yrQeKB.js → Cu8OsqJL.js} +1 -1
- package/.output/public/_nuxt/{BCAAo2Xs.js → CusJppg0.js} +1 -1
- package/.output/public/_nuxt/{DZALWWcz.js → CvELRi2k.js} +1 -1
- package/.output/public/_nuxt/{c7cuww2j.js → Cw6nGM9K.js} +1 -1
- package/.output/public/_nuxt/{DfRNGSx_.js → CwUT5n6w.js} +1 -1
- package/.output/public/_nuxt/{DazHGnQt.js → D-AHKB2i.js} +1 -1
- package/.output/public/_nuxt/{BQe-EN0e.js → D-kcn2fr.js} +1 -1
- package/.output/public/_nuxt/{gPpeS_SO.js → D1ibY74j.js} +1 -1
- package/.output/public/_nuxt/D34EmFco.js +1 -0
- package/.output/public/_nuxt/{BQKBEqPh.js → D4OhWExI.js} +1 -1
- package/.output/public/_nuxt/{WyI18QTo.js → DDHikT5j.js} +1 -1
- package/.output/public/_nuxt/{CDPBuKr5.js → DDTT3lYc.js} +1 -1
- package/.output/public/_nuxt/DFsBSlE_.js +1 -0
- package/.output/public/_nuxt/{B7HXz7Pj.js → DHLkt8Yr.js} +1 -1
- package/.output/public/_nuxt/{B0CZVjFF.js → DHuTDtaT.js} +1 -1
- package/.output/public/_nuxt/{CYdh-fCb.js → DRzH1pOL.js} +1 -1
- package/.output/public/_nuxt/DSUF3NDE.js +1 -0
- package/.output/public/_nuxt/{Bu-pZzEo.js → DWmtspXK.js} +1 -1
- package/.output/public/_nuxt/DXh9HyqW.js +1 -0
- package/.output/public/_nuxt/DXtl0MQI.js +1 -0
- package/.output/public/_nuxt/{BxDN7GvZ.js → D_zCY0Xl.js} +1 -1
- package/.output/public/_nuxt/{DwgroK_o.js → DaZJpzOl.js} +1 -1
- package/.output/public/_nuxt/{BC4bzN3h.js → DcmvOc98.js} +1 -1
- package/.output/public/_nuxt/DhQfdAdO.js +1 -0
- package/.output/public/_nuxt/{C492izQx.js → Dm4QKadl.js} +8 -8
- package/.output/public/_nuxt/{BaNZZ_dQ.js → DmCK90gL.js} +1 -1
- package/.output/public/_nuxt/DqRHBxBn.js +1 -0
- package/.output/public/_nuxt/{Clpw7Yi1.js → DtFoCuZo.js} +1 -1
- package/.output/public/_nuxt/{CBhhCAGJ.js → DxuitVdg.js} +1 -1
- package/.output/public/_nuxt/{yQo4vWqK.js → GAB5JH5K.js} +1 -1
- package/.output/public/_nuxt/{Doe3qPsx.js → LUl67wzp.js} +1 -1
- package/.output/public/_nuxt/{CuLjlXlo.js → M2rHlmBj.js} +1 -1
- package/.output/public/_nuxt/{CAWn6QGE.js → U3pqMjXV.js} +1 -1
- package/.output/public/_nuxt/XrMy4kkt.js +1 -0
- package/.output/public/_nuxt/{CiW4qRt5.js → YB_1Ta41.js} +1 -1
- package/.output/public/_nuxt/{Xt7jYYu7.js → YXI84j39.js} +1 -1
- package/.output/public/_nuxt/{DAbczt3Y.js → ZZ6g6dXy.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/5447597b-48ec-41ad-8928-729a28784f20.json +1 -0
- package/.output/public/_nuxt/{edge-router-qFL00oIW.js → edge-router-yEORMNQw.js} +1 -1
- package/.output/public/_nuxt/{entry.CvsoFAPr.css → entry.BAsn-2au.css} +1 -1
- package/.output/public/_nuxt/error-404.h4BWQQPs.css +1 -0
- package/.output/public/_nuxt/error-500.B72O9eXJ.css +1 -0
- package/.output/public/_nuxt/{AlZVL3pR.js → ga9TZ2z5.js} +1 -1
- package/.output/public/_nuxt/graph-resolver-Cs66Hj63.js +166 -0
- package/.output/public/_nuxt/ih8zLb53.js +14 -0
- package/.output/public/_nuxt/{B0MclPaN.js → ov4D99rA.js} +1 -1
- package/.output/public/_nuxt/{BcIhEyqj.js → qYU5Tabh.js} +1 -1
- package/.output/public/_nuxt/{vuetify.DF63EsYl.css → vuetify.BrkCt9t5.css} +1 -1
- package/.output/public/_nuxt/{yaml.worker-B7qHIEmf.js → yaml.worker-CQ6dFw39.js} +10 -10
- package/.output/server/index.mjs +1527 -1527
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/package.json +4 -4
- package/.output/public/_nuxt/3xoHIewA.js +0 -283
- package/.output/public/_nuxt/6pS6ZuG3.js +0 -1
- package/.output/public/_nuxt/B8cfqe27.js +0 -16
- package/.output/public/_nuxt/BJeaBD25.js +0 -1
- package/.output/public/_nuxt/CZeOmOJM.js +0 -1
- package/.output/public/_nuxt/CgmzNBdw.js +0 -1
- package/.output/public/_nuxt/CqbFpzKO.js +0 -1
- package/.output/public/_nuxt/DA8LIUWa.js +0 -1
- package/.output/public/_nuxt/DbcOKM93.js +0 -1
- package/.output/public/_nuxt/DeyR_GFX.js +0 -1
- package/.output/public/_nuxt/MBzYIBwY.js +0 -1
- package/.output/public/_nuxt/SucuqcV1.js +0 -1
- package/.output/public/_nuxt/builds/meta/40fca5d2-f9f2-4e82-849f-81a42733e9df.json +0 -1
- package/.output/public/_nuxt/error-404.CtwfpkiA.css +0 -1
- package/.output/public/_nuxt/error-500.OXvA_D27.css +0 -1
- package/.output/public/_nuxt/graph-resolver-CizqVag8.js +0 -169
- package/.output/public/_nuxt/luRfMbTH.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as K,I as be,b2 as De,b3 as Te,_ as pe,g as he,aD as we,aW as re,n as Oe,aq as Pe,av as Fe,b4 as Me,aE as Ue}from"#entry";import{E as q,g as S,Z as D,_ as P,W as p,aE as ne,a1 as s,X as n,ay as oe,a2 as B,a3 as H,F as e,aS as Ne,aW as ie,K as U,aN as Ie,$ as O,ac as xe,aO as Q,av as _,a9 as R,af as ae,b8 as ce,aB as fe,r as V,w as ee,aw as me,bc as ke,bd as Se,be as se,az as Be,b as J,aR as Ae,aA as G,aC as ve,aD as ge,ai as te,a0 as ue,a$ as Le,aH as ze,aJ as de,bf as Ee,m as Re,N as qe,ab as je}from"./Dm4QKadl.js";import{H as He,I as We}from"./ih8zLb53.js";import{I as Ge}from"./BqeRdtD4.js";import{a as E,_ as Je}from"./ga9TZ2z5.js";import{C as Ke}from"./DhQfdAdO.js";import{P as Xe}from"./DHuTDtaT.js";const ye=q({__name:"EditorLoader",props:{text:{},value:{}},setup(t){const{instancesStore:l}=K(),x=S(()=>t.value===-1?t.text:`${t.text} ${t.value}/${l.totalInstanceCount}...`);return(h,I)=>t.text?(p(),D(ne,{key:0,variant:"tonal"},{default:s(()=>[n(oe,{class:"text-overline"},{default:s(()=>[B(H(e(x)),1)]),_:1}),n(Ne,{indeterminate:t.value===-1,"model-value":t.value,max:e(l).totalInstanceCount,height:4,color:"primary",class:"w-full"},null,8,["indeterminate","model-value","max"])]),_:1})):P("",!0)}}),Ot=q({__name:"EditorLoaderPopup",setup(t){const{instancesStore:l,stateStore:x}=K(),h=S(()=>l.initializationPhase==="resolving"||x.initializationPhase==="calculating");return(I,g)=>e(h)?(p(),D(ne,{key:0,variant:"tonal"},{default:s(()=>[e(l).initializationPhase==="resolving"?(p(),D(ye,{key:0,text:"Resolving instance inputs",value:e(l).resolvedInstanceCount},null,8,["value"])):P("",!0),e(x).initializationPhase==="calculating"?(p(),D(ye,{key:1,text:"Detecting instance changes",value:e(x).calculatedInputHashCount},null,8,["value"])):P("",!0)]),_:1})):P("",!0)}}),Pt=q({__name:"HubNodeWrapper",props:{id:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,Number,String,Function]},position:{},dimensions:{},label:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},parentNodeId:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},targetPosition:{},sourcePosition:{},dragHandle:{},data:{},events:{}},setup(t){const{stateStore:l}=K(),x=ie("contextMenu");return(h,I)=>(p(),D(He,{hub:t.data.hub,onContextmenu:I[0]||(I[0]=g=>e(x)?.showContextMenu(g))},{default:s(()=>[n(e($e),{ref_key:"contextMenu",ref:x,title:"Hub",subtitle:t.data.hub.id,"is-deletable":g=>e(l).isNodeDeletable(g)},null,8,["subtitle","is-deletable"])]),_:1},8,["hub"]))}}),Ye={key:0},Ze={class:"d-flex flex-column"},Qe={key:0,class:"text-caption text-medium-emphasis"},_e={key:1,class:"text-body-2 text-medium-emphasis pa-4"},et=q({__name:"OperationPlanTree",props:{phases:{}},setup(t){const{instancesStore:l,libraryStore:x}=K(),h=S(()=>{const f=[];for(const r of t.phases){const m={id:`phase-${r.type}`,title:`${r.type.charAt(0).toUpperCase()+r.type.slice(1)} Phase`,subtitle:`${r.instances.length} instance${r.instances.length===1?"":"s"}`,icon:w(r.type),iconColor:d(r.type),phaseType:r.type,children:[]},a=I(r.instances);m.children=a,f.push(m)}return f}),I=f=>{const r=new Map;for(const a of f)r.has(a.id)||r.set(a.id,{...a,children:[]});for(const a of f)a.parentId&&r.has(a.parentId)&&r.get(a.parentId).children.push(a);return f.filter(a=>!a.parentId||!r.has(a.parentId)).map(a=>g(a,r))},g=(f,r)=>{const m=l.instances.get(f.id),a=m?x.library.components[m.type]:null,y={id:f.id,title:a&&m?`${a.meta.title} "${m.name}"`:f.id,subtitle:f.message,icon:a?.meta.icon??"iconamoon:component",iconColor:a?.meta.iconColor,phaseType:"instance"},o=r.get(f.id);return o&&o.children.length>0&&(y.children=o.children.map(i=>g(i,r))),y},w=f=>{switch(f){case"preview":return"mdi-eye";case"destroy":return"mdi-delete";case"update":return"mdi-update";case"refresh":return"mdi-refresh";default:return"mdi-cog"}},d=f=>{switch(f){case"preview":return"secondary";case"destroy":return"error";case"update":return"primary";case"refresh":return"info";default:return"secondary"}};return(f,r)=>t.phases.length>0?(p(),U("div",Ye,[n(Ie,{items:e(h),"item-title":"title","item-value":"id",density:"compact","open-all":"","indent-lines":"","bg-color":"#2d2d2d"},{prepend:s(({item:m})=>[n(e(be),{icon:m.icon,color:m.iconColor,width:"20",class:"mr-2"},null,8,["icon","color"])]),title:s(({item:m})=>[O("div",Ze,[O("div",{class:xe(["text-body-2",m.phaseType==="instance"?"font-weight-regular":"font-weight-medium"])},H(m.title),3),m.subtitle?(p(),U("div",Qe,H(m.subtitle),1)):P("",!0)])]),_:1},8,["items"])])):(p(),U("div",_e," No changes planned for this operation. "))}}),tt={key:0},nt={class:"text-caption"},at=q({__name:"OperationOptions",props:Q({operation:{}},{options:{default:{}},optionsModifiers:{}}),emits:["update:options"],setup(t){const l=_(t,"options"),x=[{key:"forceUpdateDependencies",label:"Force update dependencies",description:"Force update all dependencies regardless of their current state. Bypasses hash-based change detection for dependency chains.",showForOperations:["update"]},{key:"ignoreDependencies",label:"Ignore dependencies",description:"Skip dependency inclusion entirely. Only the requested instances are operated on, even if their dependencies are outdated or failed.",warning:"Ignoring dependencies will skip undeployed or failed prerequisites. Expect the operation to fail unless every required instance is handled manually.",showForOperations:["update"]},{key:"forceUpdateChildren",label:"Force update children instances",description:"Force update all children of composite instances regardless of their state. Overrides selective child inclusion logic.",showForOperations:["update"]},{key:"destroyDependentInstances",label:"Destroy dependent instances",description:"Include dependent instances when destroying instances. Traverses the dependency graph in reverse to prevent orphaned instances.",defaultValue:!0,showForOperations:["destroy","recreate"]},{key:"invokeDestroyTriggers",label:"Invoke destroy triggers",description:"Execute destroy triggers when destroying instances. Controls trigger execution during the destruction phase.",defaultValue:!0},{key:"deleteUnreachableResources",label:"Delete unreachable resources",description:"Delete Pulumi resources that are no longer referenced in the state. Deletes orphaned resources within individual instances.",warning:"All resources that will not be reachable at the moment of the destroy operation will be removed from the state. Only use when you are sure that these resources do not actually exist!"},{key:"forceDeleteState",label:"Force delete state",description:"Force deletion of instance state even if the destroy operation fails. Bypasses normal destroy procedures as emergency fallback.",warning:"This will delete the stack state and all resources in it even if the destroy operation failed. Use only when the stack is unrecoverable and you want to start from scratch.",showForOperations:["destroy","recreate"]},{key:"allowPartialCompositeInstanceUpdate",label:"Allow partial update of composite instances",description:"Allow update of individual composite children without requiring all siblings. When enabled, only necessary children are included.",showForOperations:["update","recreate"]},{key:"allowPartialCompositeInstanceDestruction",label:"Allow partial destruction of composite instances",description:"Allow partial destruction of composite instances during cascade operations. When enabled, cascade destruction includes only directly dependent children.",showForOperations:["destroy","recreate"]},{key:"refresh",label:"Refresh state before operation",description:"Also refresh the state of instances during the operation. Synchronizes state with actual infrastructure."},{key:"debug",label:"Enable debug logging",description:"Enable debug logging for Pulumi engine and resource providers. Sets TF_LOG=DEBUG for Terraform providers.",warning:"Debug mode may expose sensitive information including credentials in the logs. Use only when absolutely necessary for troubleshooting."}],h=S(()=>x.filter(g=>g.showForOperations?g.showForOperations.includes(t.operation):!0)),I=(g,w)=>{const d=w??!1;g==="forceUpdateDependencies"&&d&&(l.value.ignoreDependencies=!1),g==="ignoreDependencies"&&d&&(l.value.forceUpdateDependencies=!1),l.value[g]=d};return(g,w)=>l.value?(p(),U("div",tt,[(p(!0),U(R,null,ae(e(h),d=>(p(),U(R,{key:d.key},[n(ce,{"model-value":l.value[d.key],"onUpdate:modelValue":f=>I(d.key,f),class:xe(d===e(h)[0]?"mt-2":""),label:d.label,density:"compact","hide-details":""},null,8,["model-value","onUpdate:modelValue","class","label"]),O("div",nt,H(d.description),1)],64))),128)),(p(!0),U(R,null,ae(e(h),d=>(p(),U(R,{key:`warning-${d.key}`},[d.warning&&l.value[d.key]?(p(),D(fe,{key:0,density:"compact",type:"warning",variant:"outlined",class:"mt-4"},{default:s(()=>[B(H(d.warning),1)]),_:2},1024)):P("",!0)],64))),128))])):P("",!0)}}),st={class:"metadata-section"},ot={class:"options-header"},it={class:"text-body-2 text-medium-emphasis mb-4"},lt={class:"options-scrollable"},rt={class:"plan-header"},dt={class:"plan-scrollable"},ct=q({__name:"InstanceOperationDialog",props:Q({instances:{},component:{},operation:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){const l=_(t,"visible"),{operationsStore:x,projectStore:h}=K(),I=S(()=>t.instances.length>1),g=S(()=>t.instances[0]),w=V({forceUpdateDependencies:!1,ignoreDependencies:!1,forceUpdateChildren:!1,destroyDependentInstances:!1,invokeDestroyTriggers:!0,deleteUnreachableResources:!1,forceDeleteState:!1,allowPartialCompositeInstanceUpdate:!1,allowPartialCompositeInstanceDestruction:!1,refresh:!1}),d=V([]),f=V(!1),r=V(null),m=V(""),a=V("");ee([()=>t.operation,()=>t.instances],()=>{t.instances.length!==0&&(m.value=I.value?De(t.operation,t.instances):Te(t.operation,g.value),w.value={...w.value,destroyDependentInstances:t.operation==="destroy"})},{immediate:!0}),ee(()=>w.value,()=>{y()},{deep:!0}),ee(()=>l.value,v=>{v&&y()});const y=async()=>{if(l.value){f.value=!0,r.value=null;try{const v=await x.planOperation({projectId:h.projectId,type:t.operation,instanceIds:t.instances.map(u=>u.id),options:w.value});d.value=v}catch(v){console.error("Failed to load operation plan:",v),r.value=v instanceof Error?v.message:"Unknown error"}finally{f.value=!1}}},o=S(()=>{const v=new Set,u=new Set,F=new Set,X=new Set,Z=new Set;for(const b of d.value)for(const c of b.instances){if(Z.add(c.id),b.type==="update"){v.add(c.id);continue}if(b.type==="destroy"){u.add(c.id);continue}if(b.type==="refresh"){F.add(c.id);continue}b.type==="preview"&&X.add(c.id)}return{update:v.size,destroy:u.size,refresh:F.size,preview:X.size,unique:Z.size}}),i=v=>`${v} instance${v===1?"":"s"}`,C=S(()=>{switch(t.operation){case"update":return"Update";case"preview":return"Preview";case"refresh":return"Refresh";case"destroy":return"Destroy";case"recreate":return"Recreate";default:return"Unknown operation"}}),$=S(()=>{const v=o.value;switch(t.operation){case"update":{const{update:u}=v;return u===0?C.value:`Update ${i(u)}`}case"recreate":return v.unique===0?C.value:`Recreate ${i(v.unique)}`;case"destroy":return v.destroy===0?C.value:`Destroy ${i(v.destroy)}`;case"refresh":return v.refresh===0?C.value:`Refresh ${i(v.refresh)}`;case"preview":return v.preview===0?C.value:`Preview ${i(v.preview)}`;default:return v.unique===0?C.value:`${C.value} ${i(v.unique)}`}}),N=S(()=>{switch(t.operation){case"update":return"primary";case"preview":return"secondary";case"refresh":return"info";case"destroy":return"error";case"recreate":return"warning";default:return"primary"}}),L=V(!1),W=async()=>{L.value=!0;try{await x.launchOperation({projectId:h.projectId,type:t.operation,instanceIds:t.instances.map(v=>v.id),options:w.value,meta:{title:m.value,description:a.value}}),l.value=!1}finally{L.value=!1}},z=S(()=>I.value?`${C.value} ${t.instances.length} instances`:t.component?`${C.value} ${t.component.meta.title} "${g.value.name}"`:`${C.value} "${g.value.name}"`);return(v,u)=>(p(),D(me,{modelValue:l.value,"onUpdate:modelValue":u[4]||(u[4]=F=>l.value=F),"max-width":"1200px",class:"operation-dialog"},{default:s(()=>[n(ne,{title:e(z),color:t.component?.meta.color??"#2d2d2d",class:"operation-card"},{prepend:s(()=>[t.component&&!e(I)?(p(),D(e(Ke),{key:0,meta:t.component.meta},null,8,["meta"])):e(I)?(p(),D(ue,{key:1},{default:s(()=>[...u[5]||(u[5]=[B("mdi-format-list-bulleted",-1)])]),_:1})):(p(),D(ue,{key:2},{default:s(()=>[...u[6]||(u[6]=[B("mdi-cube-outline",-1)])]),_:1}))]),default:s(()=>[n(oe,{class:"operation-card-content"},{default:s(()=>[n(ke,{fluid:"",class:"pa-0 fill-height"},{default:s(()=>[n(Se,{"no-gutters":"",class:"fill-height"},{default:s(()=>[n(se,{cols:"12",md:"5",class:"pr-md-4 column-container"},{default:s(()=>[O("div",st,[u[7]||(u[7]=O("div",{class:"text-overline mb-2"},"Metadata",-1)),n(Be,{modelValue:e(m),"onUpdate:modelValue":u[0]||(u[0]=F=>J(m)?m.value=F:null),label:"Title",variant:"outlined",density:"compact",class:"mb-3",hint:"A descriptive title for this operation (optional)","persistent-hint":""},null,8,["modelValue"]),n(Ae,{modelValue:e(a),"onUpdate:modelValue":u[1]||(u[1]=F=>J(a)?a.value=F:null),label:"Description",variant:"outlined",density:"compact",rows:"2",hint:"Describe the purpose of this operation (optional)","persistent-hint":""},null,8,["modelValue"])]),n(G,{class:"my-4"}),O("div",ot,[u[10]||(u[10]=O("div",{class:"text-overline mb-2"},"Options",-1)),O("p",it,[u[8]||(u[8]=B(" Configure how the ",-1)),O("b",null,H(t.operation),1),u[9]||(u[9]=B(" operation should be executed. These options control the behavior and scope of the operation. ",-1))])]),O("div",lt,[n(at,{options:e(w),"onUpdate:options":u[2]||(u[2]=F=>J(w)?w.value=F:null),operation:t.operation},null,8,["options","operation"])])]),_:1}),n(G,{vertical:"",class:"d-none d-md-flex"}),n(se,{cols:"12",md:"7",class:"pl-md-4 column-container"},{default:s(()=>[O("div",rt,[u[11]||(u[11]=O("div",{class:"text-overline mb-2"},"Execution Plan",-1)),u[12]||(u[12]=O("p",{class:"text-body-2 text-medium-emphasis mb-4"}," Preview of instances that will be affected by this operation. The plan shows the execution phases and which instances will be processed. ",-1)),e(r)?(p(),D(fe,{key:0,type:"error",variant:"outlined",density:"compact",class:"mb-3"},{default:s(()=>[B(" Failed to load operation plan: "+H(e(r)),1)]),_:1})):P("",!0)]),O("div",dt,[n(et,{phases:e(d)},null,8,["phases"])])]),_:1})]),_:1})]),_:1})]),_:1}),n(ve,null,{default:s(()=>[n(ge),n(te,{onClick:u[3]||(u[3]=F=>l.value=!1)},{default:s(()=>[...u[13]||(u[13]=[B("Cancel",-1)])]),_:1}),n(te,{color:e(N),loading:e(L),disabled:e(f),onClick:W},{default:s(()=>[B(H(e($)),1)]),_:1},8,["color","loading","disabled"])]),_:1})]),_:1},8,["title","color"])]),_:1},8,["modelValue"]))}}),ut=pe(ct,[["__scopeId","data-v-8655a745"]]),pt={class:"tree-scrollable"},ft={class:"d-flex flex-column"},mt={class:"text-body-2 font-weight-regular"},vt={class:"text-caption text-medium-emphasis"},gt=q({__name:"ForgetInstanceStateDialog",props:Q({instances:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){const l=_(t,"visible"),{stateStore:x,libraryStore:h}=K(),I=S(()=>t.instances.length>1),g=S(()=>t.instances[0]),w=V(!1),d=V(!1),f=V(!1),r=S(()=>t.instances.map(y=>{const o=h.library.components?.[y.type];return{id:y.id,title:o?`${o.meta.title} "${y.name}"`:`${y.type} "${y.name}"`,subtitle:y.id,icon:o?.meta.icon??"iconamoon:component",iconColor:o?.meta.iconColor}})),m=async()=>{w.value=!0;try{await x.forgetInstanceStates(t.instances.map(y=>y.id),d.value,f.value),l.value=!1}finally{w.value=!1}},a=S(()=>{if(t.instances.length===0)return"Forget state";if(!I.value){const y=g.value,o=h.library.components?.[y.type];return o?`Forget state of ${o.meta.title} "${y.name}"`:`Forget state of ${y.type} "${y.name}"`}return`Forget state of ${t.instances.length} instances`});return(y,o)=>(p(),D(me,{modelValue:l.value,"onUpdate:modelValue":o[3]||(o[3]=i=>l.value=i),"max-width":"1200px",class:"forget-dialog"},{default:s(()=>[n(ne,{title:e(a),color:"#2d2d2d",class:"forget-card"},{default:s(()=>[n(oe,{class:"forget-card-content"},{default:s(()=>[n(ke,{fluid:"",class:"pa-0 fill-height"},{default:s(()=>[n(Se,{"no-gutters":"",class:"fill-height"},{default:s(()=>[n(se,{cols:"12",md:"5",class:"pr-md-4 column-container"},{default:s(()=>[o[5]||(o[5]=O("div",{class:"text-overline mb-2"},"Options",-1)),n(ce,{modelValue:e(d),"onUpdate:modelValue":o[0]||(o[0]=i=>J(d)?d.value=i:null),label:"Delete all secrets associated with this instance",density:"compact","hide-details":""},null,8,["modelValue"]),n(ce,{modelValue:e(f),"onUpdate:modelValue":o[1]||(o[1]=i=>J(f)?f.value=i:null),label:"Clear all terminal data associated with this instance",density:"compact","hide-details":""},null,8,["modelValue"]),n(fe,{density:"compact",type:"warning",variant:"outlined",class:"mt-4 alert-auto"},{default:s(()=>[...o[4]||(o[4]=[O("div",null," No destroy operation will be performed, so all resources will be left in place and unreachable by HighState. ",-1),O("div",null," You should only use this operation when the instance is unreachable/unrecoverable and you want to start from scratch. ",-1)])]),_:1})]),_:1}),n(G,{vertical:"",class:"d-none d-md-flex"}),n(se,{cols:"12",md:"7",class:"pl-md-4 mt-4 mt-md-0 column-container"},{default:s(()=>[o[6]||(o[6]=O("div",{class:"text-overline mb-2"},"Instances",-1)),O("div",pt,[n(Ie,{items:e(r),"item-title":"title","item-value":"id",density:"compact","bg-color":"#2d2d2d",class:"forget-instance-tree"},{prepend:s(({item:i})=>[n(e(be),{icon:i.icon,color:i.iconColor,width:"20",class:"mr-2"},null,8,["icon","color"])]),title:s(({item:i})=>[O("div",ft,[O("div",mt,H(i.title),1),O("div",vt,H(i.subtitle),1)])]),_:1},8,["items"])])]),_:1})]),_:1})]),_:1})]),_:1}),n(ve,null,{default:s(()=>[n(ge),n(te,{onClick:o[2]||(o[2]=i=>l.value=!1)},{default:s(()=>[...o[7]||(o[7]=[B("Cancel",-1)])]),_:1}),n(te,{loading:e(w),onClick:m},{default:s(()=>[B(" Forget State"+H(e(I)?` (${t.instances.length})`:""),1)]),_:1},8,["loading"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"]))}}),yt=pe(gt,[["__scopeId","data-v-7881a32c"]]),bt={class:"session-list-cointainer"},ht=q({__name:"TerminalListSubmenu",props:Q({stateId:{},terminalIds:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){const{instancesStore:l,stateStore:x}=K(),{state:h,execute:I,isLoading:g}=x.getTerminalsState(S(()=>t.terminalIds)),{state:w,execute:d,isLoading:f}=l.getTerminalSessionsState(S(()=>t.stateId)),r=_(t,"visible");ee(r,i=>{i&&(d(),I())});const m=i=>i.finishedAt?`Finished at ${new Date(i.finishedAt).toLocaleString()}`:`Started at ${new Date(i.startedAt).toLocaleString()}`,a=i=>{const C=Ee();return i.finishedAt?"#9E9E9E":C.current.value.colors.success},y=V(null),o=async i=>{y.value=i;try{await l.openTerminal(i,!0)}finally{y.value=null}};return(i,C)=>(p(),D(e(E),{icon:"mdi-console",title:"Terminals"},{append:s(()=>[n(ue,{icon:"mdi-menu-right",size:"x-small"})]),default:s(()=>[n(Le,{modelValue:r.value,"onUpdate:modelValue":C[0]||(C[0]=$=>r.value=$),"open-on-focus":!1,"open-on-hover":"","close-on-content-click":!1,submenu:"",activator:"parent"},{default:s(()=>[n(ze,{density:"compact",variant:"text"},{default:s(()=>[n(de,{class:"text-overline"},{default:s(()=>[...C[1]||(C[1]=[B("Available Terminals",-1)])]),_:1}),(p(!0),U(R,null,ae(e(h),$=>(p(),D(e(E),{key:$.id,disabled:!!e(y),title:$.meta.title,subtitle:$.meta.description,"custom-icon":$.meta.icon,loading:e(y)===$.id,icon:"mdi-console",onClick:N=>o($.id)},null,8,["disabled","title","subtitle","custom-icon","loading","onClick"]))),128)),n(G,{class:"mt-2 mb-2"}),n(de,{class:"text-overline"},{default:s(()=>[...C[2]||(C[2]=[B("Sessions",-1)])]),_:1}),O("div",bt,[(p(!0),U(R,null,ae(e(w),$=>(p(),D(e(E),{key:$.id,title:$.meta.title,subtitle:m($),"custom-icon":$.meta.icon,icon:"mdi-console",color:a($),onClick:N=>e(l).openTerminalSession($)},null,8,["title","subtitle","custom-icon","color","onClick"]))),128))]),e(w).length===0?(p(),D(de,{key:0,class:"text-disabled"},{default:s(()=>[...C[3]||(C[3]=[B(" No sessions found ",-1)])]),_:1})):P("",!0)]),_:1})]),_:1},8,["modelValue"])]),_:1}))}}),wt=pe(ht,[["__scopeId","data-v-7c86584d"]]),It=q({__name:"InstanceContextMenu",props:{instance:{},component:{},state:{},stores:{},operation:{},locked:{type:Boolean},editable:{type:Boolean},ghost:{type:Boolean,default:!1}},setup(t,{expose:l}){const{projectStore:x,stateStore:h,operationsStore:I}=t.stores,g=he(),{selection:w}=we(),d=V(!1),f=V(!1),r=V("update"),m=V([]),a=V(!1),y=V([]),o=S(()=>w.selectedInstances.length>1&&w.selectedInstances.some(c=>c.id===t.instance.id)?w.selectedInstances:[t.instance]),i=S(()=>o.value.length>1),C=(b,c,k)=>{if(k==="preview"&&(i.value||b.kind!=="unit"))return!1;const j=Pe(c?.lastOperationState?.status);switch(k){case"update":return!j;case"refresh":return re(c)&&!j;case"preview":return!j;case"recreate":case"destroy":return re(c)&&!j;default:return!1}},$=b=>t.ghost&&b!=="destroy"?!1:o.value.some(c=>{const k=h.instanceStates.get(c.id);return C(c,k,b)}),N=b=>t.ghost&&b!=="destroy"?!1:o.value.every(c=>{const k=h.instanceStates.get(c.id);return C(c,k,b)}),L=S(()=>o.value.some(b=>{const c=h.instanceStates.get(b.id);return re(c)})),W=b=>{const c=o.value.length;return c===1?b==="update"?L.value?"Update":"Create":b.charAt(0).toUpperCase()+b.slice(1):b==="update"?`${L.value?"Update":"Create"} selected (${c})`:`${b.charAt(0).toUpperCase()+b.slice(1)} selected (${c})`},z=b=>{if(i.value)return"mdi-format-list-bulleted";switch(b){case"update":return L.value?"mdi-play":"mdi-rocket-launch";case"refresh":return"mdi-reload";case"preview":return"mdi-eye";case"recreate":return"mdi-restart";case"destroy":return"mdi-stop";default:return"mdi-play"}},v=b=>{r.value=b,m.value=o.value,f.value=!0,d.value=!1,w.clearSelection()},u=()=>{y.value=o.value,a.value=!0,d.value=!1,w.clearSelection()},F=ie("contextMenu"),X=async b=>{F.value&&await F.value.showContextMenu(b)},Z=async()=>{if(o.value.length!==1||t.instance.kind!=="unit"){d.value=!1;return}const b=await I.launchInstanceOperation("preview",t.instance);d.value=!1,t.state&&await g.openLogsPanel(x.projectId,b.id,t.state.id)};return l({showContextMenu:X}),(b,c)=>(p(),U(R,null,[n(e($e),{ref_key:"contextMenu",ref:F,visible:e(d),"onUpdate:visible":c[6]||(c[6]=k=>J(d)?d.value=k:null),title:"Instance",subtitle:t.instance.id,"is-deletable":k=>t.stores.stateStore.isNodeDeletable(k)},{default:s(()=>[$("update")?(p(),D(e(E),{key:0,title:W("update"),icon:z("update"),color:"primary",disabled:t.locked||!N("update"),onClick:c[0]||(c[0]=k=>v("update"))},null,8,["title","icon","disabled"])):P("",!0),$("refresh")?(p(),D(e(E),{key:1,title:W("refresh"),icon:z("refresh"),color:"primary",disabled:t.locked||!N("refresh"),onClick:c[1]||(c[1]=k=>v("refresh"))},null,8,["title","icon","disabled"])):P("",!0),$("preview")?(p(),D(e(E),{key:2,title:W("preview"),icon:z("preview"),color:"secondary",disabled:t.locked||!N("preview"),onClick:Z},null,8,["title","icon","disabled"])):P("",!0),t.state?.lastOperationState?(p(),U(R,{key:3},[n(G),n(e(E),{title:"Open Logs",icon:"mdi-text",color:"primary",onClick:c[2]||(c[2]=k=>e(h).openInstanceLogs(t.instance))})],64)):P("",!0),n(G),n(e(E),{title:"View in Settings",icon:"mdi-cog",color:"primary",onClick:c[3]||(c[3]=()=>{const k=e(h).getInstanceState(t.instance.id);k&&("navigateTo"in b?b.navigateTo:e(Oe))({name:"settings.instance-details",params:{projectId:e(x).projectId,stateId:k.id}}),d.value=!1})}),t.state?.terminalIds?.length?(p(),U(R,{key:4},[n(G),n(wt,{"state-id":t.state.id,"terminal-ids":t.state.terminalIds},null,8,["state-id","terminal-ids"])],64)):P("",!0),e(L)?(p(),U(R,{key:5},[n(G),$("recreate")?(p(),D(e(E),{key:0,title:W("recreate"),icon:z("recreate"),color:"warning",disabled:t.locked||!N("recreate"),onClick:c[4]||(c[4]=k=>v("recreate"))},null,8,["title","icon","disabled"])):P("",!0),$("destroy")?(p(),D(e(E),{key:1,title:W("destroy"),icon:z("destroy"),color:"error",disabled:t.locked||!N("destroy"),onClick:c[5]||(c[5]=k=>v("destroy"))},null,8,["title","icon","disabled"])):P("",!0),n(e(E),{title:e(i)?`Forget State selected (${e(o).length})`:"Forget State",icon:"mdi-delete-forever",color:"error",disabled:t.locked,onClick:u},null,8,["title","disabled"])],64)):P("",!0)]),_:1},8,["visible","subtitle","is-deletable"]),n(ut,{visible:e(f),"onUpdate:visible":c[7]||(c[7]=k=>J(f)?f.value=k:null),operation:e(r),instances:e(m),component:t.component},null,8,["visible","operation","instances","component"]),n(yt,{visible:e(a),"onUpdate:visible":c[8]||(c[8]=k=>J(a)?a.value=k:null),instances:e(y)},null,8,["visible","instances"])],64))}}),xt=q({__name:"PageDialog",props:Q({meta:{},content:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){const l=_(t,"visible");return(x,h)=>(p(),D(me,{modelValue:l.value,"onUpdate:modelValue":h[1]||(h[1]=I=>l.value=I),"max-width":"80vh","max-height":"60vh"},{default:s(()=>[n(ne,{title:t.meta.title,color:"#2d2d2d"},{default:s(()=>[n(oe,{style:{"overflow-y":"scroll"}},{default:s(()=>[n(Xe,{content:t.content},null,8,["content"])]),_:1}),n(ve,null,{default:s(()=>[n(ge),n(te,{onClick:h[0]||(h[0]=I=>l.value=!1)},{default:s(()=>[...h[2]||(h[2]=[B("Close",-1)])]),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"]))}}),Ft=q({__name:"InstanceNodeWrapper",props:{id:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,Number,String,Function]},position:{},dimensions:{},label:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},parentNodeId:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},targetPosition:{},sourcePosition:{},dragHandle:{},data:{},events:{}},setup(t){const l=K(),x=he(),{projectStore:h,stateStore:I,instancesStore:g,libraryStore:w,operationsStore:d,validationStore:f}=l,r=S(()=>t.data.instance),m=S(()=>{const A=w.library.components[r.value.type];if(!A)throw new Error(`component "${r.value.type}" for instance "${r.value.id}" not found in library`);return A}),a=S(()=>I.instanceStates.get(r.value.id)),y=S(()=>a.value&&I.instanceLocks.get(a.value.id)),o=S(()=>d.getLastInstanceOperation(r.value.id)),i=S(()=>g.isGhostInstance(r.value.id)),C=S(()=>i.value&&a.value?.source==="resident"),$=V(!1),N=V(!1),L=V(),W=V([]),z=V(!1),v=V(!1),u=V({}),F=async()=>{$.value=!0;try{if(!a.value?.pageIds)return;const A=a.value.pageIds;if(!A.length)return;const T=await I.getPage(A[0]);if(!T)return;W.value=T.content,L.value=T.meta,N.value=!0}finally{$.value=!1}},X=V(!1),Z=async()=>{X.value=!0;try{if(!a.value?.terminalIds||a.value.terminalIds.length===0)return;await g.openTerminal(a.value.terminalIds[0])}finally{X.value=!1}},b=async()=>{v.value=!0;try{if(!a.value)return;const A=await l.stateStore.getInstanceSecrets(a.value.id);u.value={...A},z.value=!0}finally{v.value=!1}},c=ie("contextMenu"),k=Fe(),j=V(null),Ce=A=>i.value?!1:Me(k,w.library,A);return ee(()=>({ghost:i.value,resident:C.value,initialized:k.areNodesInitialized.value}),({ghost:A,resident:T,initialized:M})=>{if(!M)return;const Y=k.findNode(t.id);if(Y){if(!A){if(j.value){const{connectable:le,draggable:Ve}=j.value;k.updateNode(t.id,()=>({connectable:le,draggable:Ve})),j.value=null}return}j.value||(j.value={connectable:!!Y.connectable,draggable:Y.draggable??!0}),k.updateNode(t.id,()=>({connectable:!1,draggable:T}))}},{immediate:!0}),(A,T)=>(p(),D(We,{"editing-secrets":e(z),"onUpdate:editingSecrets":T[2]||(T[2]=M=>J(z)?z.value=M:null),"loading-secrets":e(v),"initial-secrets":e(u),"loading-page":e($),instance:t.data.instance,component:e(m),entities:e(w).library.entities,"input-resolver-outputs":e(g).inputResolverOutputs,"input-resolver-dependent-map":e(g).inputResolverDependentMap,"is-valid-connection":Ce,"instance-lock":e(y),state:e(a),editable:t.data.editable&&!e(i),ghost:e(i),stores:("markRaw"in A?A.markRaw:e(Re))(e(l)),"workspace-store":e(x),"all-instances":e(g).instances,"onSave:args":T[3]||(T[3]=(M,Y,le)=>e(g).updateInstance(M,Y,le)),"onSave:secrets":T[4]||(T[4]=(M,Y)=>e(I).updateInstanceSecrets(M,Y)),"onOpen:secrets":b,"onOpen:terminal":Z,"onOperation:launch":T[5]||(T[5]=M=>e(d).launchInstanceOperation(M,t.data.instance)),"onOperation:cancel":T[6]||(T[6]=M=>e(d).cancelInstanceOperation(e(a).lastOperationState.operationId,t.data.instance.id)),onContextmenu:T[7]||(T[7]=M=>e(c)?.showContextMenu(M)),"onOpen:composite":T[8]||(T[8]=M=>e(x).openCompositeInstancePanel(e(h).projectId,e(a).id)),"onOpen:page":F},{status:s(()=>[n(e(Ge),{state:e(a),operation:e(o),"expected-input-hash":e(I).inputHashOutputs.get(e(r).id)?.inputHash,"validation-output":e(f).validationOutputs.get(e(r).id)},null,8,["state","operation","expected-input-hash","validation-output"])]),default:s(()=>[n(e(It),{ref_key:"contextMenu",ref:c,stores:e(l),instance:e(r),component:e(m),state:e(a),editable:t.data.editable&&!e(i),locked:!!e(y),ghost:e(i)},null,8,["stores","instance","component","state","editable","locked","ghost"]),e(L)?(p(),D(e(xt),{key:0,visible:e(N),"onUpdate:visible":T[0]||(T[0]=M=>J(N)?N.value=M:null),meta:e(L),content:e(W),onClose:T[1]||(T[1]=M=>N.value=!1)},null,8,["visible","meta","content"])):P("",!0)]),_:1},8,["editing-secrets","loading-secrets","initial-secrets","loading-page","instance","component","entities","input-resolver-outputs","input-resolver-dependent-map","instance-lock","state","editable","ghost","stores","workspace-store","all-instances"]))}}),$e=q({__name:"NodeContextMenu",props:Q({title:{},subtitle:{},isDeletable:{type:Function}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(t,{expose:l}){const{selection:x,vueFlowStore:h,deleteNodes:I}=we(),g=_(t,"visible"),w=Ue(),d=ie("contextMenu"),f=async y=>{d.value&&await d.value.showContextMenu(y)},{off:r}=h.onViewportChange(()=>{g.value=!1});qe(()=>{r(),g.value=!1}),l({showContextMenu:f});const m=S(()=>t.isDeletable(w.node)?x.selectedNodeIds.has(w.id)?Array.from(x.selectedNodes).filter(t.isDeletable):[w.node]:[]),a=S(()=>m.value.length===1?"Delete":`Delete selected (${m.value.length})`);return(y,o)=>(p(),D(Je,{ref_key:"contextMenu",ref:d,visible:g.value,"onUpdate:visible":o[1]||(o[1]=i=>g.value=i),title:t.title,subtitle:t.subtitle},{default:s(()=>[y.$slots.default?(p(),U(R,{key:0},[n(G),je(y.$slots,"default")],64)):P("",!0),e(m).length>0?(p(),U(R,{key:1},[n(G),n(E,{title:e(a),icon:"mdi-delete",color:"error",onClick:o[0]||(o[0]=i=>e(I)(e(m)))},null,8,["title"])],64)):P("",!0)]),_:3},8,["visible","title","subtitle"]))}});export{Ot as _,Pt as a,Ft as b,It as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as k,t as V,s as j,n as C}from"#entry";import{I as b,_ as S}from"./
|
|
1
|
+
import{q as k,t as V,s as j,n as C}from"#entry";import{I as b,_ as S}from"./BmDdxTjo.js";import{S as D}from"./DXh9HyqW.js";import{D as $,a as L}from"./BxZD33h1.js";import{_ as M}from"./CeMkeBDb.js";import{E as h,aO as w,av as g,Z as I,W as P,F as e,a1 as l,$ as B,X as r,aP as A,a2 as U,a3 as x,aL as v,aM as W}from"./Dm4QKadl.js";import{_ as z}from"./GAB5JH5K.js";import{S as E,b as f}from"./DxuitVdg.js";import{w as T}from"./M3Z1JMP1.js";import{_ as H}from"./DtFoCuZo.js";import{_ as N,a as F}from"./DcmvOc98.js";import"./CmALWFRB.js";import"./D1Jbgd7O.js";import"./Cw6nGM9K.js";import"./0ekw3e2V.js";const q={class:"d-flex justify-end gap-1"},O=h({__name:"WorkerVersionsTable",props:w({projectId:{},workerId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:w(["viewLogs"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(t,{emit:i}){const d=i,c=g(t,"search"),m=g(t,"sortBy"),o=g(t,"page"),p=g(t,"itemsPerPage"),s=[{title:"Status",key:"status",sortable:!1},f.name,f.id,{title:"Digest",key:"digest",sortable:!1},{title:"Enabled",key:"enabled",sortable:!1},f.createdAt,f.actions];return(y,n)=>(P(),I(e(E),{search:c.value,"onUpdate:search":n[0]||(n[0]=a=>c.value=a),"sort-by":m.value,"onUpdate:sortBy":n[1]||(n[1]=a=>m.value=a),page:o.value,"onUpdate:page":n[2]||(n[2]=a=>o.value=a),"items-per-page":p.value,"onUpdate:itemsPerPage":n[3]||(n[3]=a=>p.value=a),headers:s,data:t.data,loading:t.loading,"hide-header":t.hideHeader,height:t.height},{"item.status":l(({item:a})=>[r(e(H),{status:a.status,"status-map":e(T)},null,8,["status","status-map"])]),"item.digest":l(({item:a})=>[r(e(b),{value:a.digest,truncate:!0,"copy-full-text":"Copy full digest"},null,8,["value"])]),"item.enabled":l(({item:a})=>[r(A,{size:"small",color:a.enabled?"success":"secondary",class:"text-uppercase"},{default:l(()=>[U(x(a.enabled?"Enabled":"Disabled"),1)]),_:2},1032,["color"])]),"item.actions":l(({item:a})=>[B("div",q,[r(e(N),{"page-name":"settings.worker-version-details","page-params":{projectId:t.projectId,workerId:t.workerId,versionId:a.id}},null,8,["page-params"]),r(e(F),{icon:"mdi-console",tooltip:"View Logs",variant:"text",size:"small",onClick:u=>d("viewLogs",a.id)},null,8,["onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}}),R={class:"text-body-2"},le=h({__name:"[workerId]",props:{params:{}},async setup(t){let i,d;const{settingsStore:c}=k(),{projectStore:m}=k();m.initializing?([i,d]=v(()=>j(()=>m.initialized).toBe(!0)),await i,d(),m.addLibraryRoot()):([i,d]=v(()=>m.initialize1()),await i,d(),[i,d]=v(()=>m.initialize2()),await i,d());const o=([i,d]=v(()=>c.getWorkerDetails(t.params.workerId)),i=await i,d(),i);if(!o)throw V({statusCode:404,statusMessage:"Worker not found"});const p=[{key:"workerId",label:"Worker ID"},{key:"identity",label:"Identity"},{key:"serviceAccount",label:"Service Account"},{key:"createdAt",label:"Created"}],s=c.versionsForWorker(t.params.workerId);s.load();const y=n=>{C({name:"worker-version-logs",params:{projectId:t.params.projectId,workerVersionId:n}})};return(n,a)=>(P(),I(e($),null,{default:l(()=>[r(D,{meta:e(o).meta,"fallback-icon":"mdi-progress-wrench",title:e(o).meta.title||e(o).identity,description:e(o).meta.description},null,8,["meta","title","description"]),r(e(L),{title:"Worker Details",items:p},{"item.workerId":l(()=>[r(e(b),{value:e(o).id},null,8,["value"])]),"item.identity":l(()=>[B("div",R,x(e(o).identity),1)]),"item.serviceAccount":l(()=>[r(e(z),{item:e(o)},null,8,["item"])]),"item.createdAt":l(()=>[r(e(S),{value:e(o).createdAt},null,8,["value"])]),_:1}),r(W,{elevation:0},{default:l(()=>[r(e(M),{title:"Worker Versions",icon:"mdi-source-branch",count:e(s).data.value.total},{default:l(()=>[r(e(O),{search:e(s).search.value,"onUpdate:search":a[0]||(a[0]=u=>e(s).search.value=u),"sort-by":e(s).sortBy.value,"onUpdate:sortBy":a[1]||(a[1]=u=>e(s).sortBy.value=u),page:e(s).page.value,"onUpdate:page":a[2]||(a[2]=u=>e(s).page.value=u),"items-per-page":e(s).itemsPerPage.value,"onUpdate:itemsPerPage":a[3]||(a[3]=u=>e(s).itemsPerPage.value=u),"project-id":t.params.projectId,"worker-id":t.params.workerId,data:e(s).data.value,loading:e(s).isLoading.value,"hide-header":!0,onViewLogs:y},null,8,["search","sort-by","page","items-per-page","project-id","worker-id","data","loading"])]),_:1},8,["count"])]),_:1})]),_:1}))}});export{le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as m,s as l}from"#entry";import"./
|
|
1
|
+
import{q as m,s as l}from"#entry";import"./DXh9HyqW.js";import{S as d}from"./5ggY4uig.js";import{_ as g}from"./Bh0qehhp.js";import{E as c,aL as n,Z as f,W as u,a1 as y,F as t,X as P}from"./Dm4QKadl.js";import"./CmALWFRB.js";import"./D1Jbgd7O.js";import"./Cw6nGM9K.js";import"./DtFoCuZo.js";import"./DxuitVdg.js";import"./BmDdxTjo.js";import"./M3Z1JMP1.js";import"./CQ4fj8p0.js";import"./GAB5JH5K.js";import"./0ekw3e2V.js";import"./DcmvOc98.js";const I=c({__name:"index",async setup(_){let r,s;const{settingsStore:e}=m(),{projectStore:o}=m();return o.initializing?([r,s]=n(()=>l(()=>o.initialized).toBe(!0)),await r,s(),o.addLibraryRoot()):([r,s]=n(()=>o.initialize1()),await r,s(),[r,s]=n(()=>o.initialize2()),await r,s()),e.terminals.load(),(j,i)=>(u(),f(t(d),{title:"Terminals",icon:"mdi-console",description:"Manage terminals and terminal sessions for this project."},{default:y(({height:p})=>[P(t(g),{search:t(e).terminals.search,"onUpdate:search":i[0]||(i[0]=a=>t(e).terminals.search=a),"sort-by":t(e).terminals.sortBy,"onUpdate:sortBy":i[1]||(i[1]=a=>t(e).terminals.sortBy=a),page:t(e).terminals.page,"onUpdate:page":i[2]||(i[2]=a=>t(e).terminals.page=a),"items-per-page":t(e).terminals.itemsPerPage,"onUpdate:itemsPerPage":i[3]||(i[3]=a=>t(e).terminals.itemsPerPage=a),"project-id":t(o).projectId,data:t(e).terminals.data,loading:t(e).terminals.isLoading,height:p},null,8,["search","sort-by","page","items-per-page","project-id","data","loading","height"])]),_:1}))}});export{I as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{V as vt}from"./
|
|
1
|
+
import{V as vt}from"./CwUT5n6w.js";import{Y as R,F as It,G as q,H as $t,J as ot,S as u,K as h,L as C,M as F,N as L,O as At,P as Tt,Q as _t,R as jt,T as w,U as at,V as W,W as xt,X as H,Z as X,$ as x,a0 as Bt,a1 as kt,a2 as Ct,a3 as Ft,a4 as Lt,a5 as y,a6 as Mt,a7 as E,a8 as Pt,a9 as Z,aa as Dt,ab as Jt,ac as Ut,_ as Yt}from"#entry";import{E as Kt,g as Vt,Z as Rt,W as qt,aT as Wt,a1 as B,$ as z,X as G,F as Q,aa as Ht,a2 as tt,a0 as Xt,a3 as et}from"./Dm4QKadl.js";import"./DXh9HyqW.js";const p={collection:"map",default:!0,nodeClass:R,tag:"tag:yaml.org,2002:map",resolve(t,e){return It(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>R.from(t,e,n)},b={collection:"seq",default:!0,nodeClass:q,tag:"tag:yaml.org,2002:seq",resolve(t,e){return $t(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>q.from(t,e,n)},v={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,i){return e=Object.assign({actualString:!0},e),ot(t,e,n,i)}},I={identify:t=>t==null,createNode:()=>new u(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new u(null),stringify:({source:t},e)=>typeof t=="string"&&I.test.test(t)?t:e.options.nullStr},M={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new u(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&M.test.test(t)){const i=t[0]==="t"||t[0]==="T";if(e===i)return t}return e?n.options.trueStr:n.options.falseStr}};function g({format:t,minFractionDigits:e,tag:n,value:i}){if(typeof i=="bigint")return String(i);const s=typeof i=="number"?i:Number(i);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let r=JSON.stringify(i);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let f=e-(r.length-o-1);for(;f-- >0;)r+="0"}return r}const ft={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:g},lt={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():g(t)}},ct={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new u(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:g},$=t=>typeof t=="bigint"||Number.isInteger(t),P=(t,e,n,{intAsBigInt:i})=>i?BigInt(t):parseInt(t.substring(e),n);function ut(t,e,n){const{value:i}=t;return $(i)&&i>=0?n+i.toString(e):g(t)}const gt={identify:t=>$(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>P(t,2,8,n),stringify:t=>ut(t,8,"0o")},mt={identify:$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>P(t,0,10,n),stringify:g},dt={identify:t=>$(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>P(t,2,16,n),stringify:t=>ut(t,16,"0x")},Zt=[p,b,v,I,M,gt,mt,dt,ft,lt,ct];function nt(t){return typeof t=="bigint"||Number.isInteger(t)}const O=({value:t})=>JSON.stringify(t),zt=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:O},{identify:t=>t==null,createNode:()=>new u(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:O},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:O},{identify:nt,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>nt(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:O}],Gt={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Qt=[p,b].concat(zt,Gt),D={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),i=new Uint8Array(n.length);for(let s=0;s<n.length;++s)i[s]=n.charCodeAt(s);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},i,s,r){if(!n)return"";const o=n;let f;if(typeof btoa=="function"){let a="";for(let l=0;l<o.length;++l)a+=String.fromCharCode(o[l]);f=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=u.BLOCK_LITERAL),e!==u.QUOTE_DOUBLE){const a=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(f.length/a),c=new Array(l);for(let m=0,S=0;m<l;++m,S+=a)c[m]=f.substr(S,a);f=c.join(e===u.BLOCK_LITERAL?`
|
|
2
2
|
`:" ")}return ot({comment:t,type:e,value:f},i,s,r)}};function yt({value:t,source:e},n){return e&&(t?ht:pt).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const ht={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new u(!0),stringify:yt},pt={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new u(!1),stringify:yt},te={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:g},ee={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():g(t)}},ne={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new u(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const i=t.substring(n+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:g},N=t=>typeof t=="bigint"||Number.isInteger(t);function A(t,e,n,{intAsBigInt:i}){const s=t[0];if((s==="-"||s==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),i){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return s==="-"?BigInt(-1)*o:o}const r=parseInt(t,n);return s==="-"?-1*r:r}function J(t,e,n){const{value:i}=t;if(N(i)){const s=i.toString(e);return i<0?"-"+n+s.substr(1):n+s}return g(t)}const ie={identify:N,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>A(t,2,2,n),stringify:t=>J(t,2,"0b")},se={identify:N,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>A(t,1,8,n),stringify:t=>J(t,8,"0")},re={identify:N,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>A(t,0,10,n),stringify:g},oe={identify:N,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>A(t,2,16,n),stringify:t=>J(t,16,"0x")};function U(t,e){const n=t[0],i=n==="-"||n==="+"?t.substring(1):t,s=o=>e?BigInt(o):Number(o),r=i.replace(/_/g,"").split(":").reduce((o,f)=>o*s(60)+s(f),s(0));return n==="-"?s(-1)*r:r}function bt(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return g(t);let i="";e<0&&(i="-",e*=n(-1));const s=n(60),r=[e%s];return e<60?r.unshift(0):(e=(e-r[0])/s,r.unshift(e%s),e>=60&&(e=(e-r[0])/s,r.unshift(e))),i+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Nt={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>U(t,n),stringify:bt},St={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>U(t,!1),stringify:bt},T={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(T.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,i,s,r,o,f]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let l=Date.UTC(n,i-1,s,r||0,o||0,f||0,a);const c=e[8];if(c&&c!=="Z"){let m=U(c,!1);Math.abs(m)<30&&(m*=60),l-=6e4*m}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},it=[p,b,v,I,ht,pt,ie,se,re,oe,te,ee,ne,D,h,C,F,L,Nt,St,T],st=new Map([["core",Zt],["failsafe",[p,b,v]],["json",Qt],["yaml11",it],["yaml-1.1",it]]),rt={binary:D,bool:M,float:ct,floatExp:lt,floatNaN:ft,floatTime:St,int:mt,intHex:dt,intOct:gt,intTime:Nt,map:p,merge:h,null:I,omap:C,pairs:F,seq:b,set:L,timestamp:T},ae={"tag:yaml.org,2002:binary":D,"tag:yaml.org,2002:merge":h,"tag:yaml.org,2002:omap":C,"tag:yaml.org,2002:pairs":F,"tag:yaml.org,2002:set":L,"tag:yaml.org,2002:timestamp":T};function k(t,e,n){const i=st.get(e);if(i&&!t)return n&&!i.includes(h)?i.concat(h):i.slice();let s=i;if(!s)if(Array.isArray(t))s=[];else{const r=Array.from(st.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(t))for(const r of t)s=s.concat(r);else typeof t=="function"&&(s=t(s.slice()));return n&&(s=s.concat(h)),s.reduce((r,o)=>{const f=typeof o=="string"?rt[o]:o;if(!f){const a=JSON.stringify(o),l=Object.keys(rt).map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${l}`)}return r.includes(f)||r.push(f),r},[])}const fe=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class Y{constructor({compat:e,customTags:n,merge:i,resolveKnownTags:s,schema:r,sortMapEntries:o,toStringDefaults:f}){this.compat=Array.isArray(e)?k(e,"compat"):e?k(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=s?ae:{},this.tags=k(n,this.name,i),this.toStringOptions=f??null,Object.defineProperty(this,At,{value:p}),Object.defineProperty(this,Tt,{value:v}),Object.defineProperty(this,_t,{value:b}),this.sortMapEntries=typeof o=="function"?o:o===!0?fe:null}clone(){const e=Object.create(Y.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function le(t,e){const n=[];let i=e.directives===!0;if(e.directives!==!1&&t.directives){const a=t.directives.toString(t);a?(n.push(a),i=!0):t.directives.docStart&&(i=!0)}i&&n.push("---");const s=jt(t,e),{commentString:r}=s.options;if(t.commentBefore){n.length!==1&&n.unshift("");const a=r(t.commentBefore);n.unshift(w(a,""))}let o=!1,f=null;if(t.contents){if(at(t.contents)){if(t.contents.spaceBefore&&i&&n.push(""),t.contents.commentBefore){const c=r(t.contents.commentBefore);n.push(w(c,""))}s.forceBlockIndent=!!t.comment,f=t.contents.comment}const a=f?void 0:()=>o=!0;let l=W(t.contents,s,()=>f=null,a);f&&(l+=xt(l,"",r(f))),(l[0]==="|"||l[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${l}`:n.push(l)}else n.push(W(t.contents,s));if(t.directives?.docEnd)if(t.comment){const a=r(t.comment);a.includes(`
|
|
3
3
|
`)?(n.push("..."),n.push(w(a,""))):n.push(`... ${a}`)}else n.push("...");else{let a=t.comment;a&&o&&(a=a.replace(/^\n+/,"")),a&&((!o||f)&&n[n.length-1]!==""&&n.push(""),n.push(w(r(a),"")))}return n.join(`
|
|
4
4
|
`)+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as t}from"#entry";import{E as s,g as a,Z as n,W as i,F as c,a0 as l}from"./
|
|
1
|
+
import{I as t}from"#entry";import{E as s,g as a,Z as n,W as i,F as c,a0 as l}from"./Dm4QKadl.js";const I=s({__name:"GenericIcon",props:{icon:{},size:{default:16},color:{},customIcon:{}},setup(o){const e=a(()=>o.size-4);return(r,m)=>o.customIcon?(i(),n(c(t),{key:0,class:"mr-2",icon:o.customIcon,width:c(e),height:c(e),color:o.color},null,8,["icon","width","height","color"])):(i(),n(l,{key:1,icon:o.icon,size:o.size,color:o.color},null,8,["icon","size","color"]))}});export{I as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aZ as P}from"#entry";import{E as F,G as y,B as S,g as m,N as H,w as g,r as j,I,n as N}from"./Dm4QKadl.js";var T=Object.defineProperty,B=Object.defineProperties,W=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,b=(e,t,a)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,h=(e,t)=>{for(var a in t||(t={}))z.call(t,a)&&b(e,a,t[a]);if(V)for(var a of V(t))A.call(t,a)&&b(e,a,t[a]);return e},G=(e,t)=>B(e,W(t));const _={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}};function Z(e,t){const a=m(()=>{const{width:r,height:i}=e;return G(h({},_.wrapper),{width:r,height:i})}),l=m(()=>h(h({},_.fullWidth),!t.value&&_.hide));return{wrapperStyle:a,containerStyle:l}}function q(){const e=S(P.__getMonacoInstance()),t=j(!1);let a;return I(()=>{e.value||(a=P.init(),a.then(r=>e.value=r).catch(r=>{r?.type!=="cancelation"&&(t.value=!0,console.error("Monaco initialization error:",r))}))}),{monacoRef:e,unload:()=>a?.cancel(),isLoadFailed:t}}function $(e){return typeof e=="function"?e():e}function M(e){return e===void 0}function L(e,t,a,l){return J(e,l)||K(e,t,a,l)}function J(e,t){return e.editor.getModel(k(e,t))}function K(e,t,a,l){return e.editor.createModel(t,a,l?k(e,l):void 0)}function k(e,t){return e.Uri.parse(t)}var Q=Object.defineProperty,E=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,C=(e,t,a)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,R=(e,t)=>{for(var a in t||(t={}))X.call(t,a)&&C(e,a,t[a]);if(E)for(var a of E(t))Y.call(t,a)&&C(e,a,t[a]);return e};const ee={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"};var ue=F({name:"VueMonacoEditor",model:{prop:"value",event:"update:value"},props:{defaultValue:String,defaultPath:String,defaultLanguage:String,value:String,language:String,path:String,theme:{type:String,default:"vs"},line:Number,options:{type:Object,default:()=>({})},overrideServices:{type:Object,default:()=>({})},saveViewState:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:String},emits:["update:value","beforeMount","mount","change","validate"],setup(e,t){const a=new Map,l=S(null),{monacoRef:r,unload:i,isLoadFailed:o}=q(),{editorRef:n}=te(t,e,r,l),{disposeValidator:v}=ae(t,e,r,n),s=m(()=>!!r.value&&!!n.value),{wrapperStyle:d,containerStyle:O}=Z(e,s);return H(()=>{var u,c;(u=v.value)==null||u.call(v),n.value?((c=n.value.getModel())==null||c.dispose(),n.value.dispose()):i()}),g([()=>e.path,()=>e.value,()=>e.language,()=>e.line],([u,c,p,f],[w,re,U,x])=>{if(s.value){if(u!==w){const D=L(r.value,c||e.defaultValue||"",p||e.defaultLanguage||"",u||e.defaultPath||"");e.saveViewState&&a.set(w,n.value.saveViewState()),n.value.setModel(D),e.saveViewState&&n.value.restoreViewState(a.get(u)),M(f)||n.value.revealLine(f);return}n.value.getValue()!==c&&n.value.setValue(c),p!==U&&r.value.editor.setModelLanguage(n.value.getModel(),p),!M(f)&&f!==x&&n.value.revealLine(f)}}),g(()=>e.options,u=>n.value&&n.value.updateOptions(u),{deep:!0}),g(()=>e.theme,u=>r.value&&r.value.editor.setTheme(u)),{containerRef:l,isEditorReady:s,isLoadFailed:o,wrapperStyle:d,containerStyle:O}},render(){const{$slots:e,isEditorReady:t,isLoadFailed:a,wrapperStyle:l,containerStyle:r,className:i}=this;return y("div",{style:l},[!t&&y("div",{style:ee},a?e.failure?$(e.failure):"load failed":e.default?$(e.default):"loading..."),y("div",{ref:"containerRef",key:"monaco_editor_container",style:r,class:i})])}});function te({emit:e},t,a,l){const r=S(null);I(()=>{const o=g(a,()=>{l.value&&a.value&&(N(()=>o()),i())},{immediate:!0})});function i(){var o;if(!l.value||!a.value||r.value)return;e("beforeMount",a.value);const n=t.path||t.defaultPath,v=L(a.value,t.value||t.defaultValue||"",t.language||t.defaultLanguage||"",n||"");r.value=a.value.editor.create(l.value,R({model:v,theme:t.theme,automaticLayout:!0,autoIndent:"brackets",formatOnPaste:!0,formatOnType:!0},t.options),t.overrideServices),(o=r.value)==null||o.onDidChangeModelContent(s=>{const d=r.value.getValue();d!==t.value&&(e("update:value",d),e("change",d,s))}),r.value&&!M(t.line)&&r.value.revealLine(t.line),e("mount",r.value,a.value)}return{editorRef:r}}function ae({emit:e},t,a,l){const r=j(null),i=g([a,l],()=>{if(a.value&&l.value){N(()=>i());const o=a.value.editor.onDidChangeMarkers(n=>{var v,s;const d=(s=(v=l.value)==null?void 0:v.getModel())==null?void 0:s.uri;if(d&&n.find(u=>u.path===d.path)){const u=a.value.editor.getModelMarkers({resource:d});e("validate",u)}});r.value=()=>o?.dispose()}});return{disposeValidator:r}}export{ue as V};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aj as J,ak as pt}from"#entry";import{E as on,av as se,aW as cn,Z as fn,W as an,az as ln,a1 as oe,X as hn,a0 as un,a2 as dn,a3 as yn}from"./C492izQx.js";const dt=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ae(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function W(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function at(e,...t){if(!Ae(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function St(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");W(e.outputLen),W(e.blockLen)}function vt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function gn(e,t){at(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Kt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ut(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ut(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Q(e,t){return e<<32-t|e>>>t}function T(e,t){return e<<t|e>>>32-t>>>0}const pn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function wn(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function xn(e){for(let t=0;t<e.length;t++)e[t]=wn(e[t]);return e}const ie=pn?e=>e:xn,Ie=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",bn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ue(e){if(at(e),Ie)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=bn[e[n]];return t}const rt={_0:48,_9:57,A:65,F:70,a:97,f:102};function ce(e){if(e>=rt._0&&e<=rt._9)return e-rt._0;if(e>=rt.A&&e<=rt.F)return e-(rt.A-10);if(e>=rt.a&&e<=rt.f)return e-(rt.a-10)}function ve(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Ie)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const c=ce(e.charCodeAt(s)),i=ce(e.charCodeAt(s+1));if(c===void 0||i===void 0){const f=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+s)}r[o]=c*16+i}return r}function _e(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Bt(e){return typeof e=="string"&&(e=_e(e)),at(e),e}function fe(e){return typeof e=="string"&&(e=_e(e)),at(e),e}function Le(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class Se{}function mn(e){const t=r=>e().update(Bt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ft(e=32){if(dt&&typeof dt.getRandomValues=="function")return dt.getRandomValues(new Uint8Array(e));if(dt&&typeof dt.randomBytes=="function")return Uint8Array.from(dt.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class Ce extends Se{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,St(t);const r=Bt(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let c=0;c<s.length;c++)s[c]^=54;this.iHash.update(s),this.oHash=t.create();for(let c=0;c<s.length;c++)s[c]^=106;this.oHash.update(s),ut(s)}update(t){return vt(this),this.iHash.update(t),this}digestInto(t){vt(this),at(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:c,outputLen:i}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=c,t.outputLen=i,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const mt=(e,t,n)=>new Ce(e,t).update(n).digest();mt.create=(e,t)=>new Ce(e,t);function ke(e,t,n){return St(e),n===void 0&&(n=new Uint8Array(e.outputLen)),mt(e,Bt(n),Bt(t))}const Ht=Uint8Array.from([0]),ae=Uint8Array.of();function En(e,t,n,r=32){St(e),W(r);const o=e.outputLen;if(r>255*o)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0&&(n=ae);const c=new Uint8Array(s*o),i=mt.create(e,t),f=i._cloneInto(),l=new Uint8Array(i.outputLen);for(let h=0;h<s;h++)Ht[0]=h+1,f.update(h===0?ae:l).update(n).update(Ht).digestInto(l),c.set(l,o*h),i._cloneInto(f);return i.destroy(),f.destroy(),ut(l,Ht),c.slice(0,r)}const wt=(e,t,n,r,o)=>En(e,ke(e,t,n),r,o);function Bn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),c=Number(n>>o&s),i=Number(n&s),f=r?4:0,l=r?0:4;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function An(e,t,n){return e&t^~e&n}function In(e,t,n){return e&t^e&n^t&n}class Un extends Se{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Ut(this.buffer)}update(t){vt(this),t=Bt(t),at(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let c=0;c<s;){const i=Math.min(o-this.pos,s-c);if(i===o){const f=Ut(t);for(;o<=s-c;c+=o)this.process(f,c);continue}r.set(t.subarray(c,c+i),this.pos),this.pos+=i,c+=i,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){vt(this),gn(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:c}=this;n[c++]=128,ut(this.buffer.subarray(c)),this.padOffset>o-c&&(this.process(r,0),c=0);for(let u=c;u<o;u++)n[u]=0;Bn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const i=Ut(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=f/4,h=this.get();if(l>h.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<l;u++)i.setUint32(4*u,h[u],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:c,pos:i}=this;return t.destroyed=c,t.finished=s,t.length=o,t.pos=i,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const ot=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vn=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),it=new Uint32Array(64);class _n extends Un{constructor(t=32){super(64,t,8,!1),this.A=ot[0]|0,this.B=ot[1]|0,this.C=ot[2]|0,this.D=ot[3]|0,this.E=ot[4]|0,this.F=ot[5]|0,this.G=ot[6]|0,this.H=ot[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:c,G:i,H:f}=this;return[t,n,r,o,s,c,i,f]}set(t,n,r,o,s,c,i,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=c|0,this.G=i|0,this.H=f|0}process(t,n){for(let u=0;u<16;u++,n+=4)it[u]=t.getUint32(n,!1);for(let u=16;u<64;u++){const a=it[u-15],d=it[u-2],w=Q(a,7)^Q(a,18)^a>>>3,g=Q(d,17)^Q(d,19)^d>>>10;it[u]=g+it[u-7]+w+it[u-16]|0}let{A:r,B:o,C:s,D:c,E:i,F:f,G:l,H:h}=this;for(let u=0;u<64;u++){const a=Q(i,6)^Q(i,11)^Q(i,25),d=h+a+An(i,f,l)+vn[u]+it[u]|0,g=(Q(r,2)^Q(r,13)^Q(r,22))+In(r,o,s)|0;h=l,l=f,f=i,i=c+d|0,c=s,s=o,o=r,r=d+g|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,c=c+this.D|0,i=i+this.E|0,f=f+this.F|0,l=l+this.G|0,h=h+this.H|0,this.set(r,o,s,c,i,f,l,h)}roundClean(){ut(it)}destroy(){this.set(0,0,0,0,0,0,0,0),ut(this.buffer)}}const Xt=mn(()=>new _n),st=Xt;function Ln(e,t,n,r){St(e);const o=Le({dkLen:32,asyncTick:10},r),{c:s,dkLen:c,asyncTick:i}=o;if(W(s),W(c),W(i),s<1)throw new Error("iterations (c) should be >= 1");const f=fe(t),l=fe(n),h=new Uint8Array(c),u=mt.create(e,f),a=u._cloneInto().update(l);return{c:s,dkLen:c,asyncTick:i,DK:h,PRF:u,PRFSalt:a}}function Sn(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ut(o),n}function Te(e,t,n,r){const{c:o,dkLen:s,DK:c,PRF:i,PRFSalt:f}=Ln(e,t,n,r);let l;const h=new Uint8Array(4),u=Ut(h),a=new Uint8Array(i.outputLen);for(let d=1,w=0;w<s;d++,w+=i.outputLen){const g=c.subarray(w,w+i.outputLen);u.setInt32(0,d,!1),(l=f._cloneInto(l)).update(h).digestInto(a),g.set(a.subarray(0,g.length));for(let p=1;p<o;p++){i._cloneInto(l).update(a).digestInto(a);for(let E=0;E<g.length;E++)g[E]^=a[E]}}return Sn(i,f,c,l,a)}function le(e,t,n,r,o,s){let c=e[t++]^n[r++],i=e[t++]^n[r++],f=e[t++]^n[r++],l=e[t++]^n[r++],h=e[t++]^n[r++],u=e[t++]^n[r++],a=e[t++]^n[r++],d=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],p=e[t++]^n[r++],E=e[t++]^n[r++],q=e[t++]^n[r++],z=e[t++]^n[r++],O=e[t++]^n[r++],$=e[t++]^n[r++],C=c,H=i,M=f,L=l,v=h,S=u,k=a,x=d,b=w,m=g,U=p,B=E,A=q,y=z,I=O,_=$;for(let N=0;N<8;N+=2)v^=T(C+A|0,7),b^=T(v+C|0,9),A^=T(b+v|0,13),C^=T(A+b|0,18),m^=T(S+H|0,7),y^=T(m+S|0,9),H^=T(y+m|0,13),S^=T(H+y|0,18),I^=T(U+k|0,7),M^=T(I+U|0,9),k^=T(M+I|0,13),U^=T(k+M|0,18),L^=T(_+B|0,7),x^=T(L+_|0,9),B^=T(x+L|0,13),_^=T(B+x|0,18),H^=T(C+L|0,7),M^=T(H+C|0,9),L^=T(M+H|0,13),C^=T(L+M|0,18),k^=T(S+v|0,7),x^=T(k+S|0,9),v^=T(x+k|0,13),S^=T(v+x|0,18),B^=T(U+m|0,7),b^=T(B+U|0,9),m^=T(b+B|0,13),U^=T(m+b|0,18),A^=T(_+I|0,7),y^=T(A+_|0,9),I^=T(y+A|0,13),_^=T(I+y|0,18);o[s++]=c+C|0,o[s++]=i+H|0,o[s++]=f+M|0,o[s++]=l+L|0,o[s++]=h+v|0,o[s++]=u+S|0,o[s++]=a+k|0,o[s++]=d+x|0,o[s++]=w+b|0,o[s++]=g+m|0,o[s++]=p+U|0,o[s++]=E+B|0,o[s++]=q+A|0,o[s++]=z+y|0,o[s++]=O+I|0,o[s++]=$+_|0}function Nt(e,t,n,r,o){let s=r+0,c=r+16*o;for(let i=0;i<16;i++)n[c+i]=e[t+(2*o-1)*16+i];for(let i=0;i<o;i++,s+=16,t+=16)le(n,c,e,t,n,s),i>0&&(c+=16),le(n,s,e,t+=16,n,c)}function Cn(e,t,n){const r=Le({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:c,dkLen:i,asyncTick:f,maxmem:l,onProgress:h}=r;if(W(o),W(s),W(c),W(i),W(f),W(l),h!==void 0&&typeof h!="function")throw new Error("progressCb should be function");const u=128*s,a=u/4,d=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>d)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(c<0||c>(d-1)*32/u)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(i<0||i>(d-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(u*(o+c)>l)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+l);const g=Te(Xt,e,t,{c:1,dkLen:u*c}),p=Kt(g),E=Kt(new Uint8Array(u*o)),q=Kt(new Uint8Array(u));let z=()=>{};if(h){const O=2*o*c,$=Math.max(Math.floor(O/1e4),1);let C=0;z=()=>{C++,h&&(!(C%$)||C===O)&&h(C/O)}}return{N:o,r:s,p:c,dkLen:i,blockSize32:a,V:E,B32:p,B:g,tmp:q,blockMixCb:z,asyncTick:f}}function kn(e,t,n,r,o){const s=Te(Xt,e,n,{c:1,dkLen:t});return ut(n,r,o),s}function Ke(e,t,n){const{N:r,r:o,p:s,dkLen:c,blockSize32:i,V:f,B32:l,B:h,tmp:u,blockMixCb:a}=Cn(e,t,n);ie(l);for(let d=0;d<s;d++){const w=i*d;for(let g=0;g<i;g++)f[g]=l[w+g];for(let g=0,p=0;g<r-1;g++)Nt(f,p,f,p+=i,o),a();Nt(f,(r-1)*i,l,w,o),a();for(let g=0;g<r;g++){const p=l[w+i-16]%r;for(let E=0;E<i;E++)u[E]=l[w+E]^f[p*i+E];Nt(u,0,l,w,o),a()}}return ie(l),kn(e,c,h,f,u)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function He(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ot(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Mt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function j(e,...t){if(!He(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function he(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Tn(e,t){j(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ct(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function xt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Kn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Hn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Nn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Rt(e){if(typeof e=="string")e=Nn(e);else if(He(e))e=zt(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function Mn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function qn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const On=(e,t)=>{function n(r,...o){if(j(r),!Hn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const h=o[0];if(!h)throw new Error("nonce / iv required");e.varSizeNonce?j(h):j(h,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&j(o[1]);const c=t(r,...o),i=(h,u)=>{if(u!==void 0){if(h!==2)throw new Error("cipher output not supported");j(u)}};let f=!1;return{encrypt(h,u){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,j(h),i(c.encrypt.length,u),c.encrypt(h,u)},decrypt(h,u){if(j(h),s&&h.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return i(c.decrypt.length,u),c.decrypt(h,u)}}}return Object.assign(n,e),n};function ue(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!zn(t))throw new Error("invalid output, must be aligned");return t}function de(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),c=Number(n>>o&s),i=Number(n&s),f=4,l=0;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function Rn(e,t,n){Ot(n);const r=new Uint8Array(16),o=Kn(r);return de(o,0,BigInt(t),n),de(o,8,BigInt(e),n),r}function zn(e){return e.byteOffset%4===0}function zt(e){return Uint8Array.from(e)}const Ne=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),$n=Ne("expand 16-byte k"),jn=Ne("expand 32-byte k"),Vn=ct($n),Pn=ct(jn);function K(e,t){return e<<t|e>>>32-t}function $t(e){return e.byteOffset%4===0}const At=64,Wn=16,Me=2**32-1,ye=new Uint32Array;function Gn(e,t,n,r,o,s,c,i){const f=o.length,l=new Uint8Array(At),h=ct(l),u=$t(o)&&$t(s),a=u?ct(o):ye,d=u?ct(s):ye;for(let w=0;w<f;c++){if(e(t,n,r,h,c,i),c>=Me)throw new Error("arx: counter overflow");const g=Math.min(At,f-w);if(u&&g===At){const p=w/4;if(w%4!==0)throw new Error("arx: invalid block position");for(let E=0,q;E<Wn;E++)q=p+E,d[q]=a[q]^h[E];w+=At;continue}for(let p=0,E;p<g;p++)E=w+p,s[E]=o[E]^l[p];w+=g}}function Xn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:c}=Mn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Mt(o),Mt(c),Ot(s),Ot(n),(i,f,l,h,u=0)=>{j(i),j(f),j(l);const a=l.length;if(h===void 0&&(h=new Uint8Array(a)),j(h),Mt(u),u<0||u>=Me)throw new Error("arx: counter overflow");if(h.length<a)throw new Error(`arx: output (${h.length}) is shorter than data (${a})`);const d=[];let w=i.length,g,p;if(w===32)d.push(g=zt(i)),p=Pn;else if(w===16&&n)g=new Uint8Array(32),g.set(i),g.set(i,16),p=Vn,d.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${w}`);$t(f)||d.push(f=zt(f));const E=ct(g);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(p,E,ct(f.subarray(0,16)),E),f=f.subarray(16)}const q=16-o;if(q!==f.length)throw new Error(`arx: nonce must be ${q} or 16 bytes`);if(q!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,d.push(f)}const z=ct(f);return Gn(e,p,E,z,l,h,u,c),xt(...d),h}}const R=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class Dn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Rt(t),j(t,32);const n=R(t,0),r=R(t,2),o=R(t,4),s=R(t,6),c=R(t,8),i=R(t,10),f=R(t,12),l=R(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|c<<12)&255,this.r[5]=c>>>1&8190,this.r[6]=(c>>>14|i<<2)&8191,this.r[7]=(i>>>11|f<<5)&8065,this.r[8]=(f>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let h=0;h<8;h++)this.pad[h]=R(t,16+2*h)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:c}=this,i=c[0],f=c[1],l=c[2],h=c[3],u=c[4],a=c[5],d=c[6],w=c[7],g=c[8],p=c[9],E=R(t,n+0),q=R(t,n+2),z=R(t,n+4),O=R(t,n+6),$=R(t,n+8),C=R(t,n+10),H=R(t,n+12),M=R(t,n+14);let L=s[0]+(E&8191),v=s[1]+((E>>>13|q<<3)&8191),S=s[2]+((q>>>10|z<<6)&8191),k=s[3]+((z>>>7|O<<9)&8191),x=s[4]+((O>>>4|$<<12)&8191),b=s[5]+($>>>1&8191),m=s[6]+(($>>>14|C<<2)&8191),U=s[7]+((C>>>11|H<<5)&8191),B=s[8]+((H>>>8|M<<8)&8191),A=s[9]+(M>>>5|o),y=0,I=y+L*i+v*(5*p)+S*(5*g)+k*(5*w)+x*(5*d);y=I>>>13,I&=8191,I+=b*(5*a)+m*(5*u)+U*(5*h)+B*(5*l)+A*(5*f),y+=I>>>13,I&=8191;let _=y+L*f+v*i+S*(5*p)+k*(5*g)+x*(5*w);y=_>>>13,_&=8191,_+=b*(5*d)+m*(5*a)+U*(5*u)+B*(5*h)+A*(5*l),y+=_>>>13,_&=8191;let N=y+L*l+v*f+S*i+k*(5*p)+x*(5*g);y=N>>>13,N&=8191,N+=b*(5*w)+m*(5*d)+U*(5*a)+B*(5*u)+A*(5*h),y+=N>>>13,N&=8191;let P=y+L*h+v*l+S*f+k*i+x*(5*p);y=P>>>13,P&=8191,P+=b*(5*g)+m*(5*w)+U*(5*d)+B*(5*a)+A*(5*u),y+=P>>>13,P&=8191;let tt=y+L*u+v*h+S*l+k*f+x*i;y=tt>>>13,tt&=8191,tt+=b*(5*p)+m*(5*g)+U*(5*w)+B*(5*d)+A*(5*a),y+=tt>>>13,tt&=8191;let Y=y+L*a+v*u+S*h+k*l+x*f;y=Y>>>13,Y&=8191,Y+=b*i+m*(5*p)+U*(5*g)+B*(5*w)+A*(5*d),y+=Y>>>13,Y&=8191;let Z=y+L*d+v*a+S*u+k*h+x*l;y=Z>>>13,Z&=8191,Z+=b*f+m*i+U*(5*p)+B*(5*g)+A*(5*w),y+=Z>>>13,Z&=8191;let F=y+L*w+v*d+S*a+k*u+x*h;y=F>>>13,F&=8191,F+=b*l+m*f+U*i+B*(5*p)+A*(5*g),y+=F>>>13,F&=8191;let et=y+L*g+v*w+S*d+k*a+x*u;y=et>>>13,et&=8191,et+=b*h+m*l+U*f+B*i+A*(5*p),y+=et>>>13,et&=8191;let nt=y+L*p+v*g+S*w+k*d+x*a;y=nt>>>13,nt&=8191,nt+=b*u+m*h+U*l+B*f+A*i,y+=nt>>>13,nt&=8191,y=(y<<2)+y|0,y=y+I|0,I=y&8191,y=y>>>13,_+=y,s[0]=I,s[1]=_,s[2]=N,s[3]=P,s[4]=tt,s[5]=Y,s[6]=Z,s[7]=F,s[8]=et,s[9]=nt}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let i=2;i<10;i++)t[i]+=o,o=t[i]>>>13,t[i]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let i=1;i<10;i++)r[i]=t[i]+o,o=r[i]>>>13,r[i]&=8191;r[9]-=8192;let s=(o^1)-1;for(let i=0;i<10;i++)r[i]&=s;s=~s;for(let i=0;i<10;i++)t[i]=t[i]&s|r[i];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let c=t[0]+n[0];t[0]=c&65535;for(let i=1;i<8;i++)c=(t[i]+n[i]|0)+(c>>>16)|0,t[i]=c&65535;xt(r)}update(t){he(this),t=Rt(t),j(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const c=Math.min(r-this.pos,o-s);if(c===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+c),this.pos),this.pos+=c,s+=c,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){xt(this.h,this.r,this.buffer,this.pad)}digestInto(t){he(this),Tn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let c=0;c<8;c++)t[s++]=r[c]>>>0,t[s++]=r[c]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Yn(e){const t=(r,o)=>e(o).update(Rt(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Zn=Yn(e=>new Dn(e));function Fn(e,t,n,r,o,s=20){let c=e[0],i=e[1],f=e[2],l=e[3],h=t[0],u=t[1],a=t[2],d=t[3],w=t[4],g=t[5],p=t[6],E=t[7],q=o,z=n[0],O=n[1],$=n[2],C=c,H=i,M=f,L=l,v=h,S=u,k=a,x=d,b=w,m=g,U=p,B=E,A=q,y=z,I=O,_=$;for(let P=0;P<s;P+=2)C=C+v|0,A=K(A^C,16),b=b+A|0,v=K(v^b,12),C=C+v|0,A=K(A^C,8),b=b+A|0,v=K(v^b,7),H=H+S|0,y=K(y^H,16),m=m+y|0,S=K(S^m,12),H=H+S|0,y=K(y^H,8),m=m+y|0,S=K(S^m,7),M=M+k|0,I=K(I^M,16),U=U+I|0,k=K(k^U,12),M=M+k|0,I=K(I^M,8),U=U+I|0,k=K(k^U,7),L=L+x|0,_=K(_^L,16),B=B+_|0,x=K(x^B,12),L=L+x|0,_=K(_^L,8),B=B+_|0,x=K(x^B,7),C=C+S|0,_=K(_^C,16),U=U+_|0,S=K(S^U,12),C=C+S|0,_=K(_^C,8),U=U+_|0,S=K(S^U,7),H=H+k|0,A=K(A^H,16),B=B+A|0,k=K(k^B,12),H=H+k|0,A=K(A^H,8),B=B+A|0,k=K(k^B,7),M=M+x|0,y=K(y^M,16),b=b+y|0,x=K(x^b,12),M=M+x|0,y=K(y^M,8),b=b+y|0,x=K(x^b,7),L=L+v|0,I=K(I^L,16),m=m+I|0,v=K(v^m,12),L=L+v|0,I=K(I^L,8),m=m+I|0,v=K(v^m,7);let N=0;r[N++]=c+C|0,r[N++]=i+H|0,r[N++]=f+M|0,r[N++]=l+L|0,r[N++]=h+v|0,r[N++]=u+S|0,r[N++]=a+k|0,r[N++]=d+x|0,r[N++]=w+b|0,r[N++]=g+m|0,r[N++]=p+U|0,r[N++]=E+B|0,r[N++]=q+A|0,r[N++]=z+y|0,r[N++]=O+I|0,r[N++]=$+_|0}const Qn=Xn(Fn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Jn=new Uint8Array(16),ge=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Jn.subarray(n))},tr=new Uint8Array(32);function pe(e,t,n,r,o){const s=e(t,n,tr),c=Zn.create(s);o&&ge(c,o),ge(c,r);const i=Rn(r.length,o?o.length:0,!0);c.update(i);const f=c.digest();return xt(s,i),f}const er=e=>(t,n,r)=>({encrypt(s,c){const i=s.length;c=ue(i+16,c,!1),c.set(s);const f=c.subarray(0,-16);e(t,n,f,f,1);const l=pe(e,t,n,f,r);return c.set(l,i),xt(l),c},decrypt(s,c){c=ue(s.length-16,c,!1);const i=s.subarray(0,-16),f=s.subarray(-16),l=pe(e,t,n,i,r);if(!qn(f,l))throw new Error("invalid tag");return c.set(s.subarray(0,-16)),e(t,n,c,c,1),xt(l),c}}),bt=On({blockSize:64,nonceLength:12,tagLength:16},er(Qn));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qe=BigInt(0),we=BigInt(1);function Oe(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?qe:BigInt("0x"+e)}function nr(e){return Oe(Ue(e))}function jt(e){return at(e),Oe(Ue(Uint8Array.from(e).reverse()))}function Re(e,t){return ve(e.toString(16).padStart(t*2,"0"))}function ze(e,t){return Re(e,t).reverse()}function xe(e,t,n){let r;if(typeof t=="string")try{r=ve(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(Ae(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}const qt=e=>typeof e=="bigint"&&qe<=e;function rr(e,t,n){return qt(e)&&qt(t)&&qt(n)&&t<=e&&e<n}function be(e,t,n,r){if(!rr(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}const sr=e=>(we<<BigInt(e))-we;function or(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,c){const i=e[o];if(c&&i===void 0)return;const f=typeof i;if(f!==s||i===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${f}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const V=BigInt(0),G=BigInt(1),ht=BigInt(2),$e=BigInt(3),je=BigInt(4),Ve=BigInt(5),ir=BigInt(7),Pe=BigInt(8),cr=BigInt(9),We=BigInt(16);function X(e,t){const n=e%t;return n>=V?n:t+n}function D(e,t,n){let r=e;for(;t-- >V;)r*=r,r%=n;return r}function me(e,t){if(e===V)throw new Error("invert: expected non-zero number");if(t<=V)throw new Error("invert: expected positive modulus, got "+t);let n=X(e,t),r=t,o=V,s=G;for(;n!==V;){const i=r/n,f=r%n,l=o-s*i;r=n,n=f,o=s,s=l}if(r!==G)throw new Error("invert: does not exist");return X(o,t)}function Dt(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function Ge(e,t){const n=(e.ORDER+G)/je,r=e.pow(t,n);return Dt(e,r,t),r}function fr(e,t){const n=(e.ORDER-Ve)/Pe,r=e.mul(t,ht),o=e.pow(r,n),s=e.mul(t,o),c=e.mul(e.mul(s,ht),o),i=e.mul(s,e.sub(c,e.ONE));return Dt(e,i,t),i}function ar(e){const t=Yt(e),n=Xe(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),c=(e+ir)/We;return(i,f)=>{let l=i.pow(f,c),h=i.mul(l,r);const u=i.mul(l,o),a=i.mul(l,s),d=i.eql(i.sqr(h),f),w=i.eql(i.sqr(u),f);l=i.cmov(l,h,d),h=i.cmov(a,u,w);const g=i.eql(i.sqr(h),f),p=i.cmov(l,h,g);return Dt(i,p,f),p}}function Xe(e){if(e<$e)throw new Error("sqrt is not defined for small field");let t=e-G,n=0;for(;t%ht===V;)t/=ht,n++;let r=ht;const o=Yt(e);for(;Ee(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Ge;let s=o.pow(r,t);const c=(t+G)/ht;return function(f,l){if(f.is0(l))return l;if(Ee(f,l)!==1)throw new Error("Cannot find square root");let h=n,u=f.mul(f.ONE,s),a=f.pow(l,t),d=f.pow(l,c);for(;!f.eql(a,f.ONE);){if(f.is0(a))return f.ZERO;let w=1,g=f.sqr(a);for(;!f.eql(g,f.ONE);)if(w++,g=f.sqr(g),w===h)throw new Error("Cannot find square root");const p=G<<BigInt(h-w-1),E=f.pow(u,p);h=w,u=f.sqr(E),a=f.mul(a,u),d=f.mul(d,E)}return d}}function lr(e){return e%je===$e?Ge:e%Pe===Ve?fr:e%We===cr?ar(e):Xe(e)}function hr(e,t,n){if(n<V)throw new Error("invalid exponent, negatives unsupported");if(n===V)return e.ONE;if(n===G)return t;let r=e.ONE,o=t;for(;n>V;)n&G&&(r=e.mul(r,o)),o=e.sqr(o),n>>=G;return r}function ur(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((c,i,f)=>e.is0(i)?c:(r[f]=c,e.mul(c,i)),e.ONE),s=e.inv(o);return t.reduceRight((c,i,f)=>e.is0(i)?c:(r[f]=e.mul(c,r[f]),e.mul(c,i)),s),r}function Ee(e,t){const n=(e.ORDER-G)/ht,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!c)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function dr(e,t){t!==void 0&&W(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Yt(e,t,n=!1,r={}){if(e<=V)throw new Error("invalid field: expected ORDER > 0, got "+e);let o,s,c=!1,i;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const a=t;a.BITS&&(o=a.BITS),a.sqrt&&(s=a.sqrt),typeof a.isLE=="boolean"&&(n=a.isLE),typeof a.modFromBytes=="boolean"&&(c=a.modFromBytes),i=a.allowedLengths}else typeof t=="number"&&(o=t),r.sqrt&&(s=r.sqrt);const{nBitLength:f,nByteLength:l}=dr(e,o);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let h;const u=Object.freeze({ORDER:e,isLE:n,BITS:f,BYTES:l,MASK:sr(f),ZERO:V,ONE:G,allowedLengths:i,create:a=>X(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof a);return V<=a&&a<e},is0:a=>a===V,isValidNot0:a=>!u.is0(a)&&u.isValid(a),isOdd:a=>(a&G)===G,neg:a=>X(-a,e),eql:(a,d)=>a===d,sqr:a=>X(a*a,e),add:(a,d)=>X(a+d,e),sub:(a,d)=>X(a-d,e),mul:(a,d)=>X(a*d,e),pow:(a,d)=>hr(u,a,d),div:(a,d)=>X(a*me(d,e),e),sqrN:a=>a*a,addN:(a,d)=>a+d,subN:(a,d)=>a-d,mulN:(a,d)=>a*d,inv:a=>me(a,e),sqrt:s||(a=>(h||(h=lr(e)),h(u,a))),toBytes:a=>n?ze(a,l):Re(a,l),fromBytes:(a,d=!0)=>{if(i){if(!i.includes(a.length)||a.length>l)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+a.length);const g=new Uint8Array(l);g.set(a,n?0:g.length-a.length),a=g}if(a.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+a.length);let w=n?jt(a):nr(a);if(c&&(w=X(w,e)),!d&&!u.isValid(w))throw new Error("invalid field element: outside of range 0..ORDER");return w},invertBatch:a=>ur(u,a),cmov:(a,d,w)=>w?d:a});return Object.freeze(u)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Et=BigInt(0),yt=BigInt(1),It=BigInt(2);function yr(e){return or(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function gr(e){const t=yr(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:c}=t,i=r==="x25519";if(!i&&r!=="x448")throw new Error("invalid type");const f=c||ft,l=i?255:448,h=i?32:56,u=BigInt(i?9:5),a=BigInt(i?121665:39081),d=i?It**BigInt(254):It**BigInt(447),w=i?BigInt(8)*It**BigInt(251)-yt:BigInt(4)*It**BigInt(445)-yt,g=d+w+yt,p=x=>X(x,n),E=q(u);function q(x){return ze(p(x),h)}function z(x){const b=xe("u coordinate",x,h);return i&&(b[31]&=127),p(jt(b))}function O(x){return jt(o(xe("scalar",x,h)))}function $(x,b){const m=M(z(b),O(x));if(m===Et)throw new Error("invalid private or public key received");return q(m)}function C(x){return $(x,E)}function H(x,b,m){const U=p(x*(b-m));return b=p(b-U),m=p(m+U),{x_2:b,x_3:m}}function M(x,b){be("u",x,Et,n),be("scalar",b,d,g);const m=b,U=x;let B=yt,A=Et,y=x,I=yt,_=Et;for(let P=BigInt(l-1);P>=Et;P--){const tt=m>>P&yt;_^=tt,{x_2:B,x_3:y}=H(_,B,y),{x_2:A,x_3:I}=H(_,A,I),_=tt;const Y=B+A,Z=p(Y*Y),F=B-A,et=p(F*F),nt=Z-et,rn=y+I,sn=y-I,te=p(sn*Y),ee=p(rn*F),ne=te+ee,re=te-ee;y=p(ne*ne),I=p(U*p(re*re)),B=p(Z*et),A=p(nt*(Z+p(a*nt)))}({x_2:B,x_3:y}=H(_,B,y)),{x_2:A,x_3:I}=H(_,A,I);const N=s(A);return p(B*N)}const L={secretKey:h,publicKey:h,seed:h},v=(x=f(h))=>(at(x,L.seed),x);function S(x){const b=v(x);return{secretKey:b,publicKey:C(b)}}return{keygen:S,getSharedSecret:(x,b)=>$(x,b),getPublicKey:x=>C(x),scalarMult:$,scalarMultBase:C,utils:{randomSecretKey:v,randomPrivateKey:v},GuBytes:E.slice(),lengths:L}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const pr=BigInt(1),Be=BigInt(2),wr=BigInt(3),xr=BigInt(5),br=BigInt(8),De=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),mr={p:De,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:br,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Er(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=De,i=e*e%s*e%s,f=D(i,Be,s)*i%s,l=D(f,pr,s)*e%s,h=D(l,xr,s)*l%s,u=D(h,t,s)*h%s,a=D(u,n,s)*u%s,d=D(a,r,s)*a%s,w=D(d,o,s)*d%s,g=D(w,o,s)*d%s,p=D(g,t,s)*h%s;return{pow_p_5_8:D(p,Be,s)*e%s,b2:i}}function Br(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ar=Yt(mr.p,{isLE:!0}),Vt=(()=>{const e=Ar.ORDER;return gr({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=Er(t);return X(D(n,wr,e)*r,e)},adjustScalarBytes:Br})})(),Ye=!1;async function Ze(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Zt(e,t){return await Ze(async()=>{const n=Pt(e)?e:await Ur(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},Ye,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMult(e,t)})}async function _t(e){return await Ze(async()=>Zt(e,Vt.GuBytes),()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMultBase(e)})}const Ir=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Ur(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Ir,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},Ye,["deriveBits"])}function Pt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class vr{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),_r(gt(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=gt(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:gt(this.transcript)}}}function _r(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function gt(e){const t=e.reduce(((o,s)=>o+s.length),0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Lt(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function Wt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Fe(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function Lr(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function Sr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:l}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(l),o+=l.length}n.releaseLock();const s=gt(r),c=s.subarray(0,t),i=Lt(e,s.subarray(t));return{data:c,rest:i}}class Ct{args;body;constructor(t,n){this.args=t,this.body=n}}async function Cr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const s of n)if(s.length===0)throw Error("invalid stanza");const r=[];for(;;){const s=await e.readLine();if(s===null)throw Error("invalid stanza");const c=J.decode(s);if(c.length>48)throw Error("invalid stanza");if(r.push(c),c.length<48)break}const o=gt(r);return{s:new Ct(n,o)}}async function kr(e){const t=new vr(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s:o,next:s}=await Cr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const c=J.decode(s.slice(4)),{rest:i,transcript:f}=t.close(),l=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:l,MAC:c,headerSize:f.length,rest:Lt(e,i)}}}function Qe(e){const t=[];t.push(`age-encryption.org/v1
|
|
1
|
+
import{aj as J,ak as pt}from"#entry";import{E as on,av as se,aW as cn,Z as fn,W as an,az as ln,a1 as oe,X as hn,a0 as un,a2 as dn,a3 as yn}from"./Dm4QKadl.js";const dt=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ae(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function W(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function at(e,...t){if(!Ae(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function St(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");W(e.outputLen),W(e.blockLen)}function vt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function gn(e,t){at(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Kt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ut(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ut(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Q(e,t){return e<<32-t|e>>>t}function T(e,t){return e<<t|e>>>32-t>>>0}const pn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function wn(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function xn(e){for(let t=0;t<e.length;t++)e[t]=wn(e[t]);return e}const ie=pn?e=>e:xn,Ie=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",bn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ue(e){if(at(e),Ie)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=bn[e[n]];return t}const rt={_0:48,_9:57,A:65,F:70,a:97,f:102};function ce(e){if(e>=rt._0&&e<=rt._9)return e-rt._0;if(e>=rt.A&&e<=rt.F)return e-(rt.A-10);if(e>=rt.a&&e<=rt.f)return e-(rt.a-10)}function ve(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Ie)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const c=ce(e.charCodeAt(s)),i=ce(e.charCodeAt(s+1));if(c===void 0||i===void 0){const f=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+s)}r[o]=c*16+i}return r}function _e(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Bt(e){return typeof e=="string"&&(e=_e(e)),at(e),e}function fe(e){return typeof e=="string"&&(e=_e(e)),at(e),e}function Le(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class Se{}function mn(e){const t=r=>e().update(Bt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ft(e=32){if(dt&&typeof dt.getRandomValues=="function")return dt.getRandomValues(new Uint8Array(e));if(dt&&typeof dt.randomBytes=="function")return Uint8Array.from(dt.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class Ce extends Se{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,St(t);const r=Bt(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let c=0;c<s.length;c++)s[c]^=54;this.iHash.update(s),this.oHash=t.create();for(let c=0;c<s.length;c++)s[c]^=106;this.oHash.update(s),ut(s)}update(t){return vt(this),this.iHash.update(t),this}digestInto(t){vt(this),at(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:c,outputLen:i}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=c,t.outputLen=i,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const mt=(e,t,n)=>new Ce(e,t).update(n).digest();mt.create=(e,t)=>new Ce(e,t);function ke(e,t,n){return St(e),n===void 0&&(n=new Uint8Array(e.outputLen)),mt(e,Bt(n),Bt(t))}const Ht=Uint8Array.from([0]),ae=Uint8Array.of();function En(e,t,n,r=32){St(e),W(r);const o=e.outputLen;if(r>255*o)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0&&(n=ae);const c=new Uint8Array(s*o),i=mt.create(e,t),f=i._cloneInto(),l=new Uint8Array(i.outputLen);for(let h=0;h<s;h++)Ht[0]=h+1,f.update(h===0?ae:l).update(n).update(Ht).digestInto(l),c.set(l,o*h),i._cloneInto(f);return i.destroy(),f.destroy(),ut(l,Ht),c.slice(0,r)}const wt=(e,t,n,r,o)=>En(e,ke(e,t,n),r,o);function Bn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),c=Number(n>>o&s),i=Number(n&s),f=r?4:0,l=r?0:4;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function An(e,t,n){return e&t^~e&n}function In(e,t,n){return e&t^e&n^t&n}class Un extends Se{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Ut(this.buffer)}update(t){vt(this),t=Bt(t),at(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let c=0;c<s;){const i=Math.min(o-this.pos,s-c);if(i===o){const f=Ut(t);for(;o<=s-c;c+=o)this.process(f,c);continue}r.set(t.subarray(c,c+i),this.pos),this.pos+=i,c+=i,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){vt(this),gn(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:c}=this;n[c++]=128,ut(this.buffer.subarray(c)),this.padOffset>o-c&&(this.process(r,0),c=0);for(let u=c;u<o;u++)n[u]=0;Bn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const i=Ut(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=f/4,h=this.get();if(l>h.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<l;u++)i.setUint32(4*u,h[u],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:c,pos:i}=this;return t.destroyed=c,t.finished=s,t.length=o,t.pos=i,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const ot=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vn=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),it=new Uint32Array(64);class _n extends Un{constructor(t=32){super(64,t,8,!1),this.A=ot[0]|0,this.B=ot[1]|0,this.C=ot[2]|0,this.D=ot[3]|0,this.E=ot[4]|0,this.F=ot[5]|0,this.G=ot[6]|0,this.H=ot[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:c,G:i,H:f}=this;return[t,n,r,o,s,c,i,f]}set(t,n,r,o,s,c,i,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=c|0,this.G=i|0,this.H=f|0}process(t,n){for(let u=0;u<16;u++,n+=4)it[u]=t.getUint32(n,!1);for(let u=16;u<64;u++){const a=it[u-15],d=it[u-2],w=Q(a,7)^Q(a,18)^a>>>3,g=Q(d,17)^Q(d,19)^d>>>10;it[u]=g+it[u-7]+w+it[u-16]|0}let{A:r,B:o,C:s,D:c,E:i,F:f,G:l,H:h}=this;for(let u=0;u<64;u++){const a=Q(i,6)^Q(i,11)^Q(i,25),d=h+a+An(i,f,l)+vn[u]+it[u]|0,g=(Q(r,2)^Q(r,13)^Q(r,22))+In(r,o,s)|0;h=l,l=f,f=i,i=c+d|0,c=s,s=o,o=r,r=d+g|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,c=c+this.D|0,i=i+this.E|0,f=f+this.F|0,l=l+this.G|0,h=h+this.H|0,this.set(r,o,s,c,i,f,l,h)}roundClean(){ut(it)}destroy(){this.set(0,0,0,0,0,0,0,0),ut(this.buffer)}}const Xt=mn(()=>new _n),st=Xt;function Ln(e,t,n,r){St(e);const o=Le({dkLen:32,asyncTick:10},r),{c:s,dkLen:c,asyncTick:i}=o;if(W(s),W(c),W(i),s<1)throw new Error("iterations (c) should be >= 1");const f=fe(t),l=fe(n),h=new Uint8Array(c),u=mt.create(e,f),a=u._cloneInto().update(l);return{c:s,dkLen:c,asyncTick:i,DK:h,PRF:u,PRFSalt:a}}function Sn(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ut(o),n}function Te(e,t,n,r){const{c:o,dkLen:s,DK:c,PRF:i,PRFSalt:f}=Ln(e,t,n,r);let l;const h=new Uint8Array(4),u=Ut(h),a=new Uint8Array(i.outputLen);for(let d=1,w=0;w<s;d++,w+=i.outputLen){const g=c.subarray(w,w+i.outputLen);u.setInt32(0,d,!1),(l=f._cloneInto(l)).update(h).digestInto(a),g.set(a.subarray(0,g.length));for(let p=1;p<o;p++){i._cloneInto(l).update(a).digestInto(a);for(let E=0;E<g.length;E++)g[E]^=a[E]}}return Sn(i,f,c,l,a)}function le(e,t,n,r,o,s){let c=e[t++]^n[r++],i=e[t++]^n[r++],f=e[t++]^n[r++],l=e[t++]^n[r++],h=e[t++]^n[r++],u=e[t++]^n[r++],a=e[t++]^n[r++],d=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],p=e[t++]^n[r++],E=e[t++]^n[r++],q=e[t++]^n[r++],z=e[t++]^n[r++],O=e[t++]^n[r++],$=e[t++]^n[r++],C=c,H=i,M=f,L=l,v=h,S=u,k=a,x=d,b=w,m=g,U=p,B=E,A=q,y=z,I=O,_=$;for(let N=0;N<8;N+=2)v^=T(C+A|0,7),b^=T(v+C|0,9),A^=T(b+v|0,13),C^=T(A+b|0,18),m^=T(S+H|0,7),y^=T(m+S|0,9),H^=T(y+m|0,13),S^=T(H+y|0,18),I^=T(U+k|0,7),M^=T(I+U|0,9),k^=T(M+I|0,13),U^=T(k+M|0,18),L^=T(_+B|0,7),x^=T(L+_|0,9),B^=T(x+L|0,13),_^=T(B+x|0,18),H^=T(C+L|0,7),M^=T(H+C|0,9),L^=T(M+H|0,13),C^=T(L+M|0,18),k^=T(S+v|0,7),x^=T(k+S|0,9),v^=T(x+k|0,13),S^=T(v+x|0,18),B^=T(U+m|0,7),b^=T(B+U|0,9),m^=T(b+B|0,13),U^=T(m+b|0,18),A^=T(_+I|0,7),y^=T(A+_|0,9),I^=T(y+A|0,13),_^=T(I+y|0,18);o[s++]=c+C|0,o[s++]=i+H|0,o[s++]=f+M|0,o[s++]=l+L|0,o[s++]=h+v|0,o[s++]=u+S|0,o[s++]=a+k|0,o[s++]=d+x|0,o[s++]=w+b|0,o[s++]=g+m|0,o[s++]=p+U|0,o[s++]=E+B|0,o[s++]=q+A|0,o[s++]=z+y|0,o[s++]=O+I|0,o[s++]=$+_|0}function Nt(e,t,n,r,o){let s=r+0,c=r+16*o;for(let i=0;i<16;i++)n[c+i]=e[t+(2*o-1)*16+i];for(let i=0;i<o;i++,s+=16,t+=16)le(n,c,e,t,n,s),i>0&&(c+=16),le(n,s,e,t+=16,n,c)}function Cn(e,t,n){const r=Le({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:c,dkLen:i,asyncTick:f,maxmem:l,onProgress:h}=r;if(W(o),W(s),W(c),W(i),W(f),W(l),h!==void 0&&typeof h!="function")throw new Error("progressCb should be function");const u=128*s,a=u/4,d=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>d)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(c<0||c>(d-1)*32/u)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(i<0||i>(d-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(u*(o+c)>l)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+l);const g=Te(Xt,e,t,{c:1,dkLen:u*c}),p=Kt(g),E=Kt(new Uint8Array(u*o)),q=Kt(new Uint8Array(u));let z=()=>{};if(h){const O=2*o*c,$=Math.max(Math.floor(O/1e4),1);let C=0;z=()=>{C++,h&&(!(C%$)||C===O)&&h(C/O)}}return{N:o,r:s,p:c,dkLen:i,blockSize32:a,V:E,B32:p,B:g,tmp:q,blockMixCb:z,asyncTick:f}}function kn(e,t,n,r,o){const s=Te(Xt,e,n,{c:1,dkLen:t});return ut(n,r,o),s}function Ke(e,t,n){const{N:r,r:o,p:s,dkLen:c,blockSize32:i,V:f,B32:l,B:h,tmp:u,blockMixCb:a}=Cn(e,t,n);ie(l);for(let d=0;d<s;d++){const w=i*d;for(let g=0;g<i;g++)f[g]=l[w+g];for(let g=0,p=0;g<r-1;g++)Nt(f,p,f,p+=i,o),a();Nt(f,(r-1)*i,l,w,o),a();for(let g=0;g<r;g++){const p=l[w+i-16]%r;for(let E=0;E<i;E++)u[E]=l[w+E]^f[p*i+E];Nt(u,0,l,w,o),a()}}return ie(l),kn(e,c,h,f,u)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function He(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ot(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Mt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function j(e,...t){if(!He(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function he(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Tn(e,t){j(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ct(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function xt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Kn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Hn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Nn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Rt(e){if(typeof e=="string")e=Nn(e);else if(He(e))e=zt(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function Mn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function qn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const On=(e,t)=>{function n(r,...o){if(j(r),!Hn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const h=o[0];if(!h)throw new Error("nonce / iv required");e.varSizeNonce?j(h):j(h,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&j(o[1]);const c=t(r,...o),i=(h,u)=>{if(u!==void 0){if(h!==2)throw new Error("cipher output not supported");j(u)}};let f=!1;return{encrypt(h,u){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,j(h),i(c.encrypt.length,u),c.encrypt(h,u)},decrypt(h,u){if(j(h),s&&h.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return i(c.decrypt.length,u),c.decrypt(h,u)}}}return Object.assign(n,e),n};function ue(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!zn(t))throw new Error("invalid output, must be aligned");return t}function de(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),c=Number(n>>o&s),i=Number(n&s),f=4,l=0;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function Rn(e,t,n){Ot(n);const r=new Uint8Array(16),o=Kn(r);return de(o,0,BigInt(t),n),de(o,8,BigInt(e),n),r}function zn(e){return e.byteOffset%4===0}function zt(e){return Uint8Array.from(e)}const Ne=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),$n=Ne("expand 16-byte k"),jn=Ne("expand 32-byte k"),Vn=ct($n),Pn=ct(jn);function K(e,t){return e<<t|e>>>32-t}function $t(e){return e.byteOffset%4===0}const At=64,Wn=16,Me=2**32-1,ye=new Uint32Array;function Gn(e,t,n,r,o,s,c,i){const f=o.length,l=new Uint8Array(At),h=ct(l),u=$t(o)&&$t(s),a=u?ct(o):ye,d=u?ct(s):ye;for(let w=0;w<f;c++){if(e(t,n,r,h,c,i),c>=Me)throw new Error("arx: counter overflow");const g=Math.min(At,f-w);if(u&&g===At){const p=w/4;if(w%4!==0)throw new Error("arx: invalid block position");for(let E=0,q;E<Wn;E++)q=p+E,d[q]=a[q]^h[E];w+=At;continue}for(let p=0,E;p<g;p++)E=w+p,s[E]=o[E]^l[p];w+=g}}function Xn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:c}=Mn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Mt(o),Mt(c),Ot(s),Ot(n),(i,f,l,h,u=0)=>{j(i),j(f),j(l);const a=l.length;if(h===void 0&&(h=new Uint8Array(a)),j(h),Mt(u),u<0||u>=Me)throw new Error("arx: counter overflow");if(h.length<a)throw new Error(`arx: output (${h.length}) is shorter than data (${a})`);const d=[];let w=i.length,g,p;if(w===32)d.push(g=zt(i)),p=Pn;else if(w===16&&n)g=new Uint8Array(32),g.set(i),g.set(i,16),p=Vn,d.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${w}`);$t(f)||d.push(f=zt(f));const E=ct(g);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(p,E,ct(f.subarray(0,16)),E),f=f.subarray(16)}const q=16-o;if(q!==f.length)throw new Error(`arx: nonce must be ${q} or 16 bytes`);if(q!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,d.push(f)}const z=ct(f);return Gn(e,p,E,z,l,h,u,c),xt(...d),h}}const R=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class Dn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Rt(t),j(t,32);const n=R(t,0),r=R(t,2),o=R(t,4),s=R(t,6),c=R(t,8),i=R(t,10),f=R(t,12),l=R(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|c<<12)&255,this.r[5]=c>>>1&8190,this.r[6]=(c>>>14|i<<2)&8191,this.r[7]=(i>>>11|f<<5)&8065,this.r[8]=(f>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let h=0;h<8;h++)this.pad[h]=R(t,16+2*h)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:c}=this,i=c[0],f=c[1],l=c[2],h=c[3],u=c[4],a=c[5],d=c[6],w=c[7],g=c[8],p=c[9],E=R(t,n+0),q=R(t,n+2),z=R(t,n+4),O=R(t,n+6),$=R(t,n+8),C=R(t,n+10),H=R(t,n+12),M=R(t,n+14);let L=s[0]+(E&8191),v=s[1]+((E>>>13|q<<3)&8191),S=s[2]+((q>>>10|z<<6)&8191),k=s[3]+((z>>>7|O<<9)&8191),x=s[4]+((O>>>4|$<<12)&8191),b=s[5]+($>>>1&8191),m=s[6]+(($>>>14|C<<2)&8191),U=s[7]+((C>>>11|H<<5)&8191),B=s[8]+((H>>>8|M<<8)&8191),A=s[9]+(M>>>5|o),y=0,I=y+L*i+v*(5*p)+S*(5*g)+k*(5*w)+x*(5*d);y=I>>>13,I&=8191,I+=b*(5*a)+m*(5*u)+U*(5*h)+B*(5*l)+A*(5*f),y+=I>>>13,I&=8191;let _=y+L*f+v*i+S*(5*p)+k*(5*g)+x*(5*w);y=_>>>13,_&=8191,_+=b*(5*d)+m*(5*a)+U*(5*u)+B*(5*h)+A*(5*l),y+=_>>>13,_&=8191;let N=y+L*l+v*f+S*i+k*(5*p)+x*(5*g);y=N>>>13,N&=8191,N+=b*(5*w)+m*(5*d)+U*(5*a)+B*(5*u)+A*(5*h),y+=N>>>13,N&=8191;let P=y+L*h+v*l+S*f+k*i+x*(5*p);y=P>>>13,P&=8191,P+=b*(5*g)+m*(5*w)+U*(5*d)+B*(5*a)+A*(5*u),y+=P>>>13,P&=8191;let tt=y+L*u+v*h+S*l+k*f+x*i;y=tt>>>13,tt&=8191,tt+=b*(5*p)+m*(5*g)+U*(5*w)+B*(5*d)+A*(5*a),y+=tt>>>13,tt&=8191;let Y=y+L*a+v*u+S*h+k*l+x*f;y=Y>>>13,Y&=8191,Y+=b*i+m*(5*p)+U*(5*g)+B*(5*w)+A*(5*d),y+=Y>>>13,Y&=8191;let Z=y+L*d+v*a+S*u+k*h+x*l;y=Z>>>13,Z&=8191,Z+=b*f+m*i+U*(5*p)+B*(5*g)+A*(5*w),y+=Z>>>13,Z&=8191;let F=y+L*w+v*d+S*a+k*u+x*h;y=F>>>13,F&=8191,F+=b*l+m*f+U*i+B*(5*p)+A*(5*g),y+=F>>>13,F&=8191;let et=y+L*g+v*w+S*d+k*a+x*u;y=et>>>13,et&=8191,et+=b*h+m*l+U*f+B*i+A*(5*p),y+=et>>>13,et&=8191;let nt=y+L*p+v*g+S*w+k*d+x*a;y=nt>>>13,nt&=8191,nt+=b*u+m*h+U*l+B*f+A*i,y+=nt>>>13,nt&=8191,y=(y<<2)+y|0,y=y+I|0,I=y&8191,y=y>>>13,_+=y,s[0]=I,s[1]=_,s[2]=N,s[3]=P,s[4]=tt,s[5]=Y,s[6]=Z,s[7]=F,s[8]=et,s[9]=nt}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let i=2;i<10;i++)t[i]+=o,o=t[i]>>>13,t[i]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let i=1;i<10;i++)r[i]=t[i]+o,o=r[i]>>>13,r[i]&=8191;r[9]-=8192;let s=(o^1)-1;for(let i=0;i<10;i++)r[i]&=s;s=~s;for(let i=0;i<10;i++)t[i]=t[i]&s|r[i];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let c=t[0]+n[0];t[0]=c&65535;for(let i=1;i<8;i++)c=(t[i]+n[i]|0)+(c>>>16)|0,t[i]=c&65535;xt(r)}update(t){he(this),t=Rt(t),j(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const c=Math.min(r-this.pos,o-s);if(c===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+c),this.pos),this.pos+=c,s+=c,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){xt(this.h,this.r,this.buffer,this.pad)}digestInto(t){he(this),Tn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let c=0;c<8;c++)t[s++]=r[c]>>>0,t[s++]=r[c]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Yn(e){const t=(r,o)=>e(o).update(Rt(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Zn=Yn(e=>new Dn(e));function Fn(e,t,n,r,o,s=20){let c=e[0],i=e[1],f=e[2],l=e[3],h=t[0],u=t[1],a=t[2],d=t[3],w=t[4],g=t[5],p=t[6],E=t[7],q=o,z=n[0],O=n[1],$=n[2],C=c,H=i,M=f,L=l,v=h,S=u,k=a,x=d,b=w,m=g,U=p,B=E,A=q,y=z,I=O,_=$;for(let P=0;P<s;P+=2)C=C+v|0,A=K(A^C,16),b=b+A|0,v=K(v^b,12),C=C+v|0,A=K(A^C,8),b=b+A|0,v=K(v^b,7),H=H+S|0,y=K(y^H,16),m=m+y|0,S=K(S^m,12),H=H+S|0,y=K(y^H,8),m=m+y|0,S=K(S^m,7),M=M+k|0,I=K(I^M,16),U=U+I|0,k=K(k^U,12),M=M+k|0,I=K(I^M,8),U=U+I|0,k=K(k^U,7),L=L+x|0,_=K(_^L,16),B=B+_|0,x=K(x^B,12),L=L+x|0,_=K(_^L,8),B=B+_|0,x=K(x^B,7),C=C+S|0,_=K(_^C,16),U=U+_|0,S=K(S^U,12),C=C+S|0,_=K(_^C,8),U=U+_|0,S=K(S^U,7),H=H+k|0,A=K(A^H,16),B=B+A|0,k=K(k^B,12),H=H+k|0,A=K(A^H,8),B=B+A|0,k=K(k^B,7),M=M+x|0,y=K(y^M,16),b=b+y|0,x=K(x^b,12),M=M+x|0,y=K(y^M,8),b=b+y|0,x=K(x^b,7),L=L+v|0,I=K(I^L,16),m=m+I|0,v=K(v^m,12),L=L+v|0,I=K(I^L,8),m=m+I|0,v=K(v^m,7);let N=0;r[N++]=c+C|0,r[N++]=i+H|0,r[N++]=f+M|0,r[N++]=l+L|0,r[N++]=h+v|0,r[N++]=u+S|0,r[N++]=a+k|0,r[N++]=d+x|0,r[N++]=w+b|0,r[N++]=g+m|0,r[N++]=p+U|0,r[N++]=E+B|0,r[N++]=q+A|0,r[N++]=z+y|0,r[N++]=O+I|0,r[N++]=$+_|0}const Qn=Xn(Fn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Jn=new Uint8Array(16),ge=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Jn.subarray(n))},tr=new Uint8Array(32);function pe(e,t,n,r,o){const s=e(t,n,tr),c=Zn.create(s);o&&ge(c,o),ge(c,r);const i=Rn(r.length,o?o.length:0,!0);c.update(i);const f=c.digest();return xt(s,i),f}const er=e=>(t,n,r)=>({encrypt(s,c){const i=s.length;c=ue(i+16,c,!1),c.set(s);const f=c.subarray(0,-16);e(t,n,f,f,1);const l=pe(e,t,n,f,r);return c.set(l,i),xt(l),c},decrypt(s,c){c=ue(s.length-16,c,!1);const i=s.subarray(0,-16),f=s.subarray(-16),l=pe(e,t,n,i,r);if(!qn(f,l))throw new Error("invalid tag");return c.set(s.subarray(0,-16)),e(t,n,c,c,1),xt(l),c}}),bt=On({blockSize:64,nonceLength:12,tagLength:16},er(Qn));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qe=BigInt(0),we=BigInt(1);function Oe(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?qe:BigInt("0x"+e)}function nr(e){return Oe(Ue(e))}function jt(e){return at(e),Oe(Ue(Uint8Array.from(e).reverse()))}function Re(e,t){return ve(e.toString(16).padStart(t*2,"0"))}function ze(e,t){return Re(e,t).reverse()}function xe(e,t,n){let r;if(typeof t=="string")try{r=ve(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(Ae(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}const qt=e=>typeof e=="bigint"&&qe<=e;function rr(e,t,n){return qt(e)&&qt(t)&&qt(n)&&t<=e&&e<n}function be(e,t,n,r){if(!rr(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}const sr=e=>(we<<BigInt(e))-we;function or(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,c){const i=e[o];if(c&&i===void 0)return;const f=typeof i;if(f!==s||i===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${f}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const V=BigInt(0),G=BigInt(1),ht=BigInt(2),$e=BigInt(3),je=BigInt(4),Ve=BigInt(5),ir=BigInt(7),Pe=BigInt(8),cr=BigInt(9),We=BigInt(16);function X(e,t){const n=e%t;return n>=V?n:t+n}function D(e,t,n){let r=e;for(;t-- >V;)r*=r,r%=n;return r}function me(e,t){if(e===V)throw new Error("invert: expected non-zero number");if(t<=V)throw new Error("invert: expected positive modulus, got "+t);let n=X(e,t),r=t,o=V,s=G;for(;n!==V;){const i=r/n,f=r%n,l=o-s*i;r=n,n=f,o=s,s=l}if(r!==G)throw new Error("invert: does not exist");return X(o,t)}function Dt(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function Ge(e,t){const n=(e.ORDER+G)/je,r=e.pow(t,n);return Dt(e,r,t),r}function fr(e,t){const n=(e.ORDER-Ve)/Pe,r=e.mul(t,ht),o=e.pow(r,n),s=e.mul(t,o),c=e.mul(e.mul(s,ht),o),i=e.mul(s,e.sub(c,e.ONE));return Dt(e,i,t),i}function ar(e){const t=Yt(e),n=Xe(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),c=(e+ir)/We;return(i,f)=>{let l=i.pow(f,c),h=i.mul(l,r);const u=i.mul(l,o),a=i.mul(l,s),d=i.eql(i.sqr(h),f),w=i.eql(i.sqr(u),f);l=i.cmov(l,h,d),h=i.cmov(a,u,w);const g=i.eql(i.sqr(h),f),p=i.cmov(l,h,g);return Dt(i,p,f),p}}function Xe(e){if(e<$e)throw new Error("sqrt is not defined for small field");let t=e-G,n=0;for(;t%ht===V;)t/=ht,n++;let r=ht;const o=Yt(e);for(;Ee(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Ge;let s=o.pow(r,t);const c=(t+G)/ht;return function(f,l){if(f.is0(l))return l;if(Ee(f,l)!==1)throw new Error("Cannot find square root");let h=n,u=f.mul(f.ONE,s),a=f.pow(l,t),d=f.pow(l,c);for(;!f.eql(a,f.ONE);){if(f.is0(a))return f.ZERO;let w=1,g=f.sqr(a);for(;!f.eql(g,f.ONE);)if(w++,g=f.sqr(g),w===h)throw new Error("Cannot find square root");const p=G<<BigInt(h-w-1),E=f.pow(u,p);h=w,u=f.sqr(E),a=f.mul(a,u),d=f.mul(d,E)}return d}}function lr(e){return e%je===$e?Ge:e%Pe===Ve?fr:e%We===cr?ar(e):Xe(e)}function hr(e,t,n){if(n<V)throw new Error("invalid exponent, negatives unsupported");if(n===V)return e.ONE;if(n===G)return t;let r=e.ONE,o=t;for(;n>V;)n&G&&(r=e.mul(r,o)),o=e.sqr(o),n>>=G;return r}function ur(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((c,i,f)=>e.is0(i)?c:(r[f]=c,e.mul(c,i)),e.ONE),s=e.inv(o);return t.reduceRight((c,i,f)=>e.is0(i)?c:(r[f]=e.mul(c,r[f]),e.mul(c,i)),s),r}function Ee(e,t){const n=(e.ORDER-G)/ht,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!c)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function dr(e,t){t!==void 0&&W(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Yt(e,t,n=!1,r={}){if(e<=V)throw new Error("invalid field: expected ORDER > 0, got "+e);let o,s,c=!1,i;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const a=t;a.BITS&&(o=a.BITS),a.sqrt&&(s=a.sqrt),typeof a.isLE=="boolean"&&(n=a.isLE),typeof a.modFromBytes=="boolean"&&(c=a.modFromBytes),i=a.allowedLengths}else typeof t=="number"&&(o=t),r.sqrt&&(s=r.sqrt);const{nBitLength:f,nByteLength:l}=dr(e,o);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let h;const u=Object.freeze({ORDER:e,isLE:n,BITS:f,BYTES:l,MASK:sr(f),ZERO:V,ONE:G,allowedLengths:i,create:a=>X(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof a);return V<=a&&a<e},is0:a=>a===V,isValidNot0:a=>!u.is0(a)&&u.isValid(a),isOdd:a=>(a&G)===G,neg:a=>X(-a,e),eql:(a,d)=>a===d,sqr:a=>X(a*a,e),add:(a,d)=>X(a+d,e),sub:(a,d)=>X(a-d,e),mul:(a,d)=>X(a*d,e),pow:(a,d)=>hr(u,a,d),div:(a,d)=>X(a*me(d,e),e),sqrN:a=>a*a,addN:(a,d)=>a+d,subN:(a,d)=>a-d,mulN:(a,d)=>a*d,inv:a=>me(a,e),sqrt:s||(a=>(h||(h=lr(e)),h(u,a))),toBytes:a=>n?ze(a,l):Re(a,l),fromBytes:(a,d=!0)=>{if(i){if(!i.includes(a.length)||a.length>l)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+a.length);const g=new Uint8Array(l);g.set(a,n?0:g.length-a.length),a=g}if(a.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+a.length);let w=n?jt(a):nr(a);if(c&&(w=X(w,e)),!d&&!u.isValid(w))throw new Error("invalid field element: outside of range 0..ORDER");return w},invertBatch:a=>ur(u,a),cmov:(a,d,w)=>w?d:a});return Object.freeze(u)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Et=BigInt(0),yt=BigInt(1),It=BigInt(2);function yr(e){return or(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function gr(e){const t=yr(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:c}=t,i=r==="x25519";if(!i&&r!=="x448")throw new Error("invalid type");const f=c||ft,l=i?255:448,h=i?32:56,u=BigInt(i?9:5),a=BigInt(i?121665:39081),d=i?It**BigInt(254):It**BigInt(447),w=i?BigInt(8)*It**BigInt(251)-yt:BigInt(4)*It**BigInt(445)-yt,g=d+w+yt,p=x=>X(x,n),E=q(u);function q(x){return ze(p(x),h)}function z(x){const b=xe("u coordinate",x,h);return i&&(b[31]&=127),p(jt(b))}function O(x){return jt(o(xe("scalar",x,h)))}function $(x,b){const m=M(z(b),O(x));if(m===Et)throw new Error("invalid private or public key received");return q(m)}function C(x){return $(x,E)}function H(x,b,m){const U=p(x*(b-m));return b=p(b-U),m=p(m+U),{x_2:b,x_3:m}}function M(x,b){be("u",x,Et,n),be("scalar",b,d,g);const m=b,U=x;let B=yt,A=Et,y=x,I=yt,_=Et;for(let P=BigInt(l-1);P>=Et;P--){const tt=m>>P&yt;_^=tt,{x_2:B,x_3:y}=H(_,B,y),{x_2:A,x_3:I}=H(_,A,I),_=tt;const Y=B+A,Z=p(Y*Y),F=B-A,et=p(F*F),nt=Z-et,rn=y+I,sn=y-I,te=p(sn*Y),ee=p(rn*F),ne=te+ee,re=te-ee;y=p(ne*ne),I=p(U*p(re*re)),B=p(Z*et),A=p(nt*(Z+p(a*nt)))}({x_2:B,x_3:y}=H(_,B,y)),{x_2:A,x_3:I}=H(_,A,I);const N=s(A);return p(B*N)}const L={secretKey:h,publicKey:h,seed:h},v=(x=f(h))=>(at(x,L.seed),x);function S(x){const b=v(x);return{secretKey:b,publicKey:C(b)}}return{keygen:S,getSharedSecret:(x,b)=>$(x,b),getPublicKey:x=>C(x),scalarMult:$,scalarMultBase:C,utils:{randomSecretKey:v,randomPrivateKey:v},GuBytes:E.slice(),lengths:L}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const pr=BigInt(1),Be=BigInt(2),wr=BigInt(3),xr=BigInt(5),br=BigInt(8),De=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),mr={p:De,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:br,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Er(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=De,i=e*e%s*e%s,f=D(i,Be,s)*i%s,l=D(f,pr,s)*e%s,h=D(l,xr,s)*l%s,u=D(h,t,s)*h%s,a=D(u,n,s)*u%s,d=D(a,r,s)*a%s,w=D(d,o,s)*d%s,g=D(w,o,s)*d%s,p=D(g,t,s)*h%s;return{pow_p_5_8:D(p,Be,s)*e%s,b2:i}}function Br(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ar=Yt(mr.p,{isLE:!0}),Vt=(()=>{const e=Ar.ORDER;return gr({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=Er(t);return X(D(n,wr,e)*r,e)},adjustScalarBytes:Br})})(),Ye=!1;async function Ze(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Zt(e,t){return await Ze(async()=>{const n=Pt(e)?e:await Ur(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},Ye,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMult(e,t)})}async function _t(e){return await Ze(async()=>Zt(e,Vt.GuBytes),()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMultBase(e)})}const Ir=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Ur(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Ir,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},Ye,["deriveBits"])}function Pt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class vr{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),_r(gt(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=gt(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:gt(this.transcript)}}}function _r(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function gt(e){const t=e.reduce(((o,s)=>o+s.length),0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Lt(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function Wt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Fe(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function Lr(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function Sr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:l}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(l),o+=l.length}n.releaseLock();const s=gt(r),c=s.subarray(0,t),i=Lt(e,s.subarray(t));return{data:c,rest:i}}class Ct{args;body;constructor(t,n){this.args=t,this.body=n}}async function Cr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const s of n)if(s.length===0)throw Error("invalid stanza");const r=[];for(;;){const s=await e.readLine();if(s===null)throw Error("invalid stanza");const c=J.decode(s);if(c.length>48)throw Error("invalid stanza");if(r.push(c),c.length<48)break}const o=gt(r);return{s:new Ct(n,o)}}async function kr(e){const t=new vr(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s:o,next:s}=await Cr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const c=J.decode(s.slice(4)),{rest:i,transcript:f}=t.close(),l=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:l,MAC:c,headerSize:f.length,rest:Lt(e,i)}}}function Qe(e){const t=[];t.push(`age-encryption.org/v1
|
|
2
2
|
`);for(const n of e){t.push("-> "+n.args.join(" ")+`
|
|
3
3
|
`);for(let r=0;r<n.body.length;r+=48){let o=r+48;o>n.body.length&&(o=n.body.length),t.push(J.encode(n.body.subarray(r,o))+`
|
|
4
4
|
`)}n.body.length%48===0&&t.push(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as D}from"#entry";import{E as I,u as g,N as _,Z as E,W as f,F as u,a1 as V,X as h}from"./
|
|
1
|
+
import{k as D}from"#entry";import{E as I,u as g,N as _,Z as E,W as f,F as u,a1 as V,X as h}from"./Dm4QKadl.js";import{G as k}from"./YXI84j39.js";import{P as S}from"./CN9dMhDM.js";import"./CmALWFRB.js";import"./D1Jbgd7O.js";import"./D-AHKB2i.js";const j="0123456789ABCDEFGHJKMNPQRSTVWXYZ",x=32,C=16,p=10,L=0xffffffffffff;var c;(function(e){e.Base32IncorrectEncoding="B32_ENC_INVALID",e.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",e.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",e.EncodeTimeNegative="ENC_TIME_NEG",e.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",e.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",e.PRNGDetectFailure="PRNG_DETECT",e.ULIDInvalid="ULID_INVALID",e.Unexpected="UNEXPECTED",e.UUIDInvalid="UUID_INVALID"})(c||(c={}));class l extends Error{constructor(r,t){super(`${t} (${r})`),this.name="ULIDError",this.code=r}}function $(e){if(e.length!==p+C)throw new l(c.DecodeTimeValueMalformed,"Malformed ULID");const r=e.substr(0,p).toUpperCase().split("").reverse().reduce((t,i,a)=>{const d=j.indexOf(i);if(d===-1)throw new l(c.DecodeTimeInvalidCharacter,`Time decode error: Invalid character: ${i}`);return t+=d*Math.pow(x,a)},0);if(r>L)throw new l(c.DecodeTimeValueMalformed,`Malformed ULID: timestamp too large: ${r}`);return r}const v=I({__name:"WorkerVersionLogsPanel",props:{projectId:{},workerVersionId:{}},setup(e){const{$client:r}=g();let t=null;const i=o=>{try{const s=$(o),n=new Date(s),m=n.getHours().toString().padStart(2,"0"),w=n.getMinutes().toString().padStart(2,"0"),M=n.getSeconds().toString().padStart(2,"0"),T=n.getMilliseconds().toString().padStart(3,"0");return`${m}:${w}:${M}.${T}`}catch{return"00:00:00.000"}},a=(o,s,n=!1)=>{if(!t)return;const m=i(o);t.write(`\x1B[36m[${m}]\x1B[0m `),n&&t.write("\x1B[1;35m[runtime]\x1B[0m "),t.writeln(s)},{unsubscribe:d}=r.logs.watchWorkerVersionLogs.subscribe({projectId:e.projectId,workerVersionId:e.workerVersionId},{onData:o=>{t&&a(o.id,o.content,o.isSystem)}});_(d);const N=async o=>{t=o;const s=await r.logs.getWorkerVersionLogs.query({projectId:e.projectId,workerVersionId:e.workerVersionId});for(const n of s)a(n.id,n.content,n.isSystem)};return(o,s)=>(f(),E(u(k),{onLoad:N}))}}),U=I({__name:"logs",props:{params:{}},setup(e){return D(e.params.projectId),(r,t)=>(f(),E(u(S),{"project-id":e.params.projectId,"can-unlock":""},{default:V(()=>[h(u(v),{"project-id":e.params.projectId,"worker-version-id":e.params.workerVersionId},null,8,["project-id","worker-version-id"])]),_:1},8,["project-id"]))}});export{U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as p,s as c}from"#entry";import"./
|
|
1
|
+
import{q as p,s as c}from"#entry";import"./DXh9HyqW.js";import{S as d}from"./5ggY4uig.js";import{_ as f}from"./U3pqMjXV.js";import{E as g,aL as n,Z as l,W as u,a1 as y,F as t,X as P}from"./Dm4QKadl.js";import"./CmALWFRB.js";import"./D1Jbgd7O.js";import"./Cw6nGM9K.js";import"./DtFoCuZo.js";import"./DxuitVdg.js";import"./BmDdxTjo.js";import"./DcmvOc98.js";const q=g({__name:"index",async setup(_){let r,o;const{settingsStore:a}=p(),{projectStore:s}=p();return s.initializing?([r,o]=n(()=>c(()=>s.initialized).toBe(!0)),await r,o(),s.addLibraryRoot()):([r,o]=n(()=>s.initialize1()),await r,o(),[r,o]=n(()=>s.initialize2()),await r,o()),a.artifacts.load(),(j,i)=>(u(),l(t(d),{title:"Artifacts",icon:"mdi-package-variant",description:"Manage the artifacts produced by units or other components in your project."},{default:y(({height:m})=>[P(t(f),{search:t(a).artifacts.search,"onUpdate:search":i[0]||(i[0]=e=>t(a).artifacts.search=e),"sort-by":t(a).artifacts.sortBy,"onUpdate:sortBy":i[1]||(i[1]=e=>t(a).artifacts.sortBy=e),page:t(a).artifacts.page,"onUpdate:page":i[2]||(i[2]=e=>t(a).artifacts.page=e),"items-per-page":t(a).artifacts.itemsPerPage,"onUpdate:itemsPerPage":i[3]||(i[3]=e=>t(a).artifacts.itemsPerPage=e),"project-id":t(s).projectId,data:t(a).artifacts.data,loading:t(a).artifacts.isLoading,height:m},null,8,["search","sort-by","page","items-per-page","project-id","data","loading","height"])]),_:1}))}});export{q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as I,D as _}from"#entry";import{E as W,r as q,a as H,g as x,w as P,I as L,Q as z,Z as k,W as i,ax as A,F as e,b as $,a1 as u,_ as p,K as m,aQ as Q,X as c,ai as N,a2 as v,a0 as T,az as j,aR as K,aB as C,$ as y,a3 as h,aP as O,aS as X,a9 as D,af as Y}from"./Dm4QKadl.js";import{_ as U,E as B,W as Z,g as G,i as J}from"./D-AHKB2i.js";const ee={class:"ml-2"},te={key:0,class:"mt-1"},se={key:1},ae={key:1,class:"mb-4"},oe={class:"d-flex justify-space-between align-center mb-2"},re={class:"text-caption text-medium-emphasis mt-1"},ne={key:0,class:"mt-2"},ie={class:"text-caption text-medium-emphasis ml-4"},me=W({__name:"UnlockMethodForm",props:{showTypeSelector:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},showDisplayName:{type:Boolean,default:!0},initialType:{default:"password"},displayNameLabel:{default:"Display Name"},displayNameHint:{default:"A friendly name to identify this unlock method"},passwordHint:{default:"Password must be strong enough to resist offline attacks"},defaultDisplayName:{default:""},defaultDescription:{default:""}},emits:["update:valid","update:form"],setup(o,{expose:l,emit:w}){const d=o,g=w,f=q(!1),t=H({type:d.initialType,title:"",description:"",password:"",confirmPassword:""}),E=x(()=>d.showDisplayName?[s=>!!s||"Display name is required",s=>s&&s.length<=100||"Display name must be less than 100 characters"]:[]),F=[s=>!!s||"Password is required"],R=[s=>!!s||"Confirm password is required",s=>s===t.password||"Passwords do not match"],n=x(()=>{if(!t.password)return null;const s=I.zxcvbn(t.password),a={0:"very-weak",1:"weak",2:"fair",3:"strong",4:"very-strong"},r=Math.max(0,Math.min(4,s.score));return{score:s.score/4*100,level:a[r],estimatedCrackTime:s.crack_times_display.offline_slow_hashing_1e4_per_second||"unknown",recommendations:s.feedback.suggestions||[],warning:s.feedback.warning||void 0}}),V=s=>{switch(s){case"very-weak":return"error";case"weak":return"warning";case"fair":return"info";case"strong":return"success";case"very-strong":return"success";default:return"info"}},b=s=>{switch(s){case"password":return"mdi-key-variant";case"passkey":return"mdi-fingerprint";default:return"mdi-lock"}},S=()=>{t.type=d.initialType,t.title=d.defaultDisplayName,t.description=d.defaultDescription,t.password="",t.confirmPassword=""};return P(f,s=>{g("update:valid",s)}),P(t,s=>{g("update:form",{...s})},{deep:!0}),L(()=>{t.title=d.defaultDisplayName,t.description=d.defaultDescription}),l({resetForm:S,form:z(t)}),(s,a)=>(i(),k(A,{modelValue:e(f),"onUpdate:modelValue":a[5]||(a[5]=r=>$(f)?f.value=r:null)},{default:u(()=>[o.showTypeSelector?(i(),k(Q,{key:0,modelValue:e(t).type,"onUpdate:modelValue":a[0]||(a[0]=r=>e(t).type=r),mandatory:"",variant:"outlined",density:"compact",divided:"",class:"w-100 mb-6"},{default:u(()=>[c(N,{value:"password",class:"flex-grow-1"},{default:u(()=>[c(T,{icon:b("password"),class:"mr-2"},null,8,["icon"]),a[6]||(a[6]=v(" Password ",-1))]),_:1}),c(N,{value:"passkey",class:"flex-grow-1"},{default:u(()=>[c(T,{icon:b("passkey"),class:"mr-2"},null,8,["icon"]),a[7]||(a[7]=v(" Passkey ",-1))]),_:1})]),_:1},8,["modelValue"])):p("",!0),o.showDisplayName?(i(),k(j,{key:1,modelValue:e(t).title,"onUpdate:modelValue":a[1]||(a[1]=r=>e(t).title=r),class:"mb-4",variant:"outlined",density:"compact",label:o.displayNameLabel,rules:e(E),placeholder:"My unlock method",hint:o.displayNameHint,"persistent-hint":""},null,8,["modelValue","label","rules","hint"])):p("",!0),o.showDescription?(i(),k(K,{key:2,modelValue:e(t).description,"onUpdate:modelValue":a[2]||(a[2]=r=>e(t).description=r),class:"mb-4",variant:"outlined",density:"compact",label:"Description",placeholder:"Optional description for this unlock method",rows:"2","auto-grow":"","hide-details":""},null,8,["modelValue"])):p("",!0),e(t).type==="password"?(i(),m(D,{key:3},[c(e(U),{modelValue:e(t).password,"onUpdate:modelValue":a[3]||(a[3]=r=>e(t).password=r),class:"mb-4",label:"Password",rules:F,hint:o.passwordHint,"persistent-hint":""},null,8,["modelValue","hint"]),c(e(U),{modelValue:e(t).confirmPassword,"onUpdate:modelValue":a[4]||(a[4]=r=>e(t).confirmPassword=r),class:"mb-4",label:"Confirm Password",rules:R},null,8,["modelValue"]),e(n)&&e(n).score<40?(i(),k(C,{key:0,type:e(n).score<20?"error":"warning",density:"compact",class:"mb-4"},{default:u(()=>[y("div",ee,[y("strong",null,h(e(n).score<20?"Very Weak":"Weak")+" Password:",1),e(n).warning?(i(),m("div",te,h(e(n).warning),1)):(i(),m("div",se," This password may be vulnerable to offline attacks. Consider using a stronger password. "))])]),_:1},8,["type"])):p("",!0),e(n)?(i(),m("div",ae,[y("div",oe,[a[8]||(a[8]=y("span",{class:"text-caption"},"Password Strength",-1)),c(O,{color:V(e(n).level),size:"small",variant:"flat"},{default:u(()=>[v(h(e(n).level.replace("-"," ").toUpperCase()),1)]),_:1},8,["color"])]),c(X,{"model-value":e(n).score,color:V(e(n).level),height:"6",rounded:""},null,8,["model-value","color"]),y("div",re," Estimated crack time: "+h(e(n).estimatedCrackTime),1),e(n).recommendations.length>0?(i(),m("div",ne,[a[9]||(a[9]=y("div",{class:"text-caption font-weight-medium mb-1"},"Suggestions:",-1)),y("ul",ie,[(i(!0),m(D,null,Y(e(n).recommendations,r=>(i(),m("li",{key:r},h(r),1))),128))])])):p("",!0)])):p("",!0)],64)):e(t).type==="passkey"?(i(),k(C,{key:4,type:"info",density:"compact",class:"mb-4"},{default:u(()=>[...a[10]||(a[10]=[v(" You'll be prompted to create a passkey using your device's biometric authentication or security key when you click Create. ",-1)])]),_:1})):p("",!0)]),_:1},8,["modelValue"]))}});async function M(o,l,w){const d=await G(),g=await w.encrypt(d),f=_(g),t=await J(d);return{meta:l,type:o,encryptedIdentity:f,recipient:t}}function le(o,l){const w=new B;return w.setPassphrase(o),M("password",l,w)}function de(o){if(!o.title)throw new Error("Display name is required for passkey unlock method");const l=new B;return l.addRecipient(new Z),M("passkey",o,l)}function ye(o){const l={title:o.title,description:o.description};if(o.type==="password")return le(o.password,l);if(o.type==="passkey")return de(l);throw new Error(`Unsupported unlock method type: ${o.type}`)}export{me as _,ye as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as p,b as s}from"./
|
|
1
|
+
import{S as p,b as s}from"./DxuitVdg.js";import"#entry";import"./DXh9HyqW.js";import{_ as l}from"./DcmvOc98.js";import{E as u,aO as h,av as r,Z as c,W as P,F as n,a1 as f,X as y}from"./Dm4QKadl.js";const j=u({__name:"TriggersTable",props:h({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:["update:search","update:sortBy","update:page","update:itemsPerPage"],setup(e){const i=r(e,"search"),o=r(e,"sortBy"),d=r(e,"page"),g=r(e,"itemsPerPage"),m=[s.name,s.id,s.createdAt,s.actions];return(B,t)=>(P(),c(n(p),{search:i.value,"onUpdate:search":t[0]||(t[0]=a=>i.value=a),"sort-by":o.value,"onUpdate:sortBy":t[1]||(t[1]=a=>o.value=a),page:d.value,"onUpdate:page":t[2]||(t[2]=a=>d.value=a),"items-per-page":g.value,"onUpdate:itemsPerPage":t[3]||(t[3]=a=>g.value=a),headers:m,data:e.data,loading:e.loading,"hide-header":e.hideHeader,height:e.height},{"item.actions":f(({item:a})=>[y(n(l),{"page-name":"settings.trigger-details","page-params":{projectId:e.projectId,triggerId:a.id}},null,8,["page-params"])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}});export{j as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as a,K as n,W as o,$ as e,X as i,aA as l,a3 as r,a9 as m}from"./
|
|
1
|
+
import{E as a,K as n,W as o,$ as e,X as i,aA as l,a3 as r,a9 as m}from"./Dm4QKadl.js";const u={class:"d-flex justify-space-between mb-2"},d={class:"font-weight-medium"},f=a({__name:"about",setup(c){return(t,s)=>(o(),n(m,null,[s[1]||(s[1]=e("div",{class:"d-flex align-center justify-space-between"},[e("div",null,[e("h2",{class:"text-h5 font-weight-medium mb-1"},"About Highstate Designer"),e("p",{class:"text-body-2 text-medium-emphasis ma-0"}," A powerful infrastructure-as-code management tool that helps you design, deploy, and manage cloud infrastructure with ease. ")])],-1)),i(l,{class:"mt-6 mb-6"}),e("div",u,[s[0]||(s[0]=e("span",null,"Version:",-1)),e("span",d,r(t.$config.public.version),1)])],64))}});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as F,g as U,i as A,_ as R}from"#entry";import{_ as H,c as E}from"./
|
|
1
|
+
import{f as F,g as U,i as A,_ as R}from"#entry";import{_ as H,c as E}from"./D34EmFco.js";import{E as _,av as z,r as c,g as W,w as N,Z as T,W as V,a1 as s,aw as q,X as t,ax as K,F as n,b as w,ay as $,$ as d,az as M,aA as B,a2 as l,a0 as k,aB as Y,aC as G,aD as J,ai as S,aE as L,I as X,N as Z,K as I,a3 as x,a9 as P,aF as O,aG as Q,y as ee,aH as te,aI as C,aJ as ae,af as se}from"./Dm4QKadl.js";import"./CmALWFRB.js";import"./D1Jbgd7O.js";import"./D-AHKB2i.js";const oe={class:"mb-4"},le={class:"text-subtitle-1 font-weight-medium mb-2"},ne=_({__name:"NewProjectDialog",props:{visible:{type:Boolean},visibleModifiers:{}},emits:["update:visible"],setup(j){const p=z(j,"visible"),f=c(!1),b=c(!1),r=c(""),m=c(""),v=c(),g=c({type:"password",title:"",description:"",password:"",confirmPassword:""}),h=[o=>!!o||"Name is required",o=>o&&o.length<=64||"Name must be less than 64 characters",o=>/^[a-z0-9-\.]+$/.test(o)||"Name must be alphanumeric in lowercase with dashes (-) and dots (.)",o=>/^[a-z]/i.test(o)||"Name must start with a letter"],y=F(),a=U(),u=W(()=>f.value&&b.value),D=async()=>{if(!u.value)return;const o=await E(g.value),e=await y.createProject(r.value,{title:m.value},o);a.openProjectPanel(e.id),p.value=!1,r.value="",v.value?.resetForm()};return N(p,o=>{o||(r.value="",v.value?.resetForm())}),N(r,o=>{m.value=A(o)}),(o,e)=>(V(),T(q,{modelValue:p.value,"onUpdate:modelValue":e[6]||(e[6]=i=>p.value=i),"max-width":"600px"},{default:s(()=>[t(L,{title:"New project",color:"#2d2d2d"},{default:s(()=>[t(K,{modelValue:n(f),"onUpdate:modelValue":e[5]||(e[5]=i=>w(f)?f.value=i:null)},{default:s(()=>[t($,null,{default:s(()=>[t(M,{modelValue:n(r),"onUpdate:modelValue":e[0]||(e[0]=i=>w(r)?r.value=i:null),class:"mb-4",variant:"outlined",density:"compact",label:"Name",rules:h,placeholder:"my-awesome-project",hint:"Name must be unique across all repositories connected to the same storage","persistent-hint":""},null,8,["modelValue"]),t(M,{modelValue:n(m),"onUpdate:modelValue":e[1]||(e[1]=i=>w(m)?m.value=i:null),class:"mb-4",variant:"outlined",density:"compact",label:"Title",hint:"A human-readable title for your project","persistent-hint":""},null,8,["modelValue"]),t(B,{class:"my-6"}),d("div",oe,[d("h3",le,[t(k,{class:"mr-2"},{default:s(()=>[...e[7]||(e[7]=[l("mdi-lock-outline",-1)])]),_:1}),e[8]||(e[8]=l(" Unlock Method ",-1))]),e[9]||(e[9]=d("p",{class:"text-body-2 text-medium-emphasis mb-4"}," This method will be used to encrypt your project secrets and state data. You can add more unlock methods later. ",-1))]),t(n(H),{ref_key:"unlockMethodForm",ref:v,"show-type-selector":!0,"show-description":!1,"show-display-name":!1,"display-name-label":"Unlock Method Name","display-name-hint":"A friendly name for your unlock method","password-hint":"Password must be strong enough to resist offline attacks","default-display-name":"Default","default-description":"The initial unlock method configured when creating the project.","onUpdate:valid":e[2]||(e[2]=i=>b.value=i),"onUpdate:form":e[3]||(e[3]=i=>g.value=i)},null,512),t(Y,{type:"warning",density:"compact",class:"mt-4"},{default:s(()=>[...e[10]||(e[10]=[d("div",{class:"ml-2"},[d("strong",null,"Important:"),l(" Losing your unlock method will result in losing control over the created resources! ")],-1)])]),_:1})]),_:1}),t(G,null,{default:s(()=>[t(J),t(S,{onClick:e[4]||(e[4]=i=>p.value=!1)},{default:s(()=>[...e[11]||(e[11]=[l("Cancel",-1)])]),_:1}),t(S,{disabled:!n(u),loading:n(y).loadingCreateProject,onClick:D},{default:s(()=>[...e[12]||(e[12]=[l(" Create ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"]))}}),re=""+new URL("hira-1.DuDDiA5P.png",import.meta.url).href,ie=globalThis.setInterval,de={class:"main-menu-container"},ue={class:"content-layout"},me={class:"project-list"},ce={class:"mascot-container"},pe={class:"catchphrase-text text-h6"},fe=_({__name:"index",props:{params:{}},setup(j){const p=F(),f=U(),b=ee(),r=c(!1),m=["Let's orchestrate this beautifully!","State is everything!","No infrastructure left behind!","Visual first, code second!","Infrastructure should be as elegant as it is functional!","Time to sync the state!","Ready to deploy some magic?","Every good system starts with a solid foundation!","Building the future, one container at a time!","Kubernetes makes everything better... except debugging!","Your infrastructure deserves some love too!","Who needs sleep when you have perfectly orchestrated deployments?","Configuration drift is my arch-nemesis!","Monitoring dashboards are my happy place!","Clean architecture is the key to digital zen!","Infrastructure as art, code as poetry!","Scaling up? Scaling out? Let's scale with style!","Error 404: Downtime not found!","Highstate слабее ArgoCD и FluxCD, но в цирке не выступает!"],v=c(""),g=()=>{const y=Math.floor(Math.random()*m.length);return m[y]};v.value=g();let h;return X(()=>{h=ie(()=>{v.value=g()},1e4)}),Z(()=>{h&&clearInterval(h)}),(y,a)=>(V(),I(P,null,[d("div",de,[d("div",ue,[t(L,{variant:"text",class:"project-card-inner"},{default:s(()=>[t($,null,{default:s(()=>[t(O,{class:"text-center text-uppercase text-bold"},{default:s(()=>[...a[3]||(a[3]=[l("Highstate Designer",-1)])]),_:1}),t(Q,{class:"text-center"},{default:s(()=>[l(" v"+x(n(b).public.version)+" • Все зонды удалены ",1)]),_:1}),t(B,{class:"mt-4"}),t(te,{variant:"flat",class:"main-menu-list"},{default:s(()=>[t(C,{class:"list-item list-button",onClick:a[0]||(a[0]=u=>n(f).openDataSettingsPanel())},{default:s(()=>[t(k,{class:"mr-2"},{default:s(()=>[...a[4]||(a[4]=[l("mdi-database-cog",-1)])]),_:1}),a[5]||(a[5]=l(" Data & Settings ",-1))]),_:1}),t(ae,{class:"text-uppercase"},{default:s(()=>[...a[6]||(a[6]=[l("Projects",-1)])]),_:1}),d("div",me,[(V(!0),I(P,null,se(n(p).projects,u=>(V(),T(C,{key:u.id,class:"list-item",onClick:D=>n(f).openProjectPanel(u.id)},{default:s(()=>[t(k,{class:"mr-2"},{default:s(()=>[...a[7]||(a[7]=[l("mdi-folder",-1)])]),_:1}),l(" "+x(u.meta.title),1)]),_:2},1032,["onClick"]))),128))]),t(C,{class:"list-item",onClick:a[1]||(a[1]=u=>r.value=!0)},{default:s(()=>[t(k,{class:"mr-2"},{default:s(()=>[...a[8]||(a[8]=[l("mdi-plus",-1)])]),_:1}),a[9]||(a[9]=l(" Create new project ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),d("div",ce,[a[10]||(a[10]=d("img",{src:re,alt:"Hira Nakamura - Highstate Mascot",class:"mascot-image"},null,-1)),d("div",pe,'"'+x(n(v))+'"',1)])])]),t(n(ne),{visible:n(r),"onUpdate:visible":a[2]||(a[2]=u=>w(r)?r.value=u:null)},null,8,["visible"])],64))}}),we=R(fe,[["__scopeId","data-v-49de3d73"]]);export{we as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a_ as V,a$ as A,b0 as B,aD as C,b1 as K,s as x,l as L,z as G,B as O,aw as z,q as U,aT as q,v as W,k as X}from"#entry";import{_ as Z,a as J,b as Q}from"./CtwNW5xN.js";import{a as Y,g as ee,i as te}from"./oZs8U75K.js";import{_ as ne,G as oe}from"./ih8zLb53.js";import{E as F,Z as D,W as P,aE as ae,a1 as g,$ as re,X as v,u as ie,aL as _,I as se,F as p,ak as M,al as $}from"./Dm4QKadl.js";import{P as de}from"./CN9dMhDM.js";import"./CmALWFRB.js";import"./D1Jbgd7O.js";import"./BqeRdtD4.js";import"./Cw6nGM9K.js";import"./YXI84j39.js";import"./ga9TZ2z5.js";import"./DXtl0MQI.js";import"./DhQfdAdO.js";import"./DHuTDtaT.js";import"./CwUT5n6w.js";import"./D-AHKB2i.js";const ue=F({__name:"ExtraElementPanel",setup(I){const d=u=>{Y(u.dataTransfer)};return(u,n)=>(P(),D(ae,null,{default:g(()=>[re("div",{draggable:"true",style:{cursor:"grab"},onDragstart:d},[v(ne)],32)]),_:1}))}}),k=V({name:"project-panel",getStoreId:I=>`projects/${I}/panel`,create:({storeId:I,id:[d],logger:u})=>A(I,()=>{const{instancesStore:n}=B(d),{vueFlowStore:r,nodeFactory:a,onHubMoved:y,onInstanceMoved:h,onHubNodeDeleted:j,onInstanceNodeDeleted:l,onNodesMoved:f,edgeEndpointOffsets:c}=C("project",d),{$client:w}=ie(),H=K(async e=>{await w.workspace.setProjectViewport.mutate({projectId:d,viewport:e})},1e3);r.onViewportChange(H);const N=async()=>{L.info({projectId:d},"initializing project panel store");const e=await w.workspace.getProjectViewport.query({projectId:d});e&&(r.defaultViewport.value=e)},R=async()=>{a.createNodesForModels(n.getProjectInstances(),[...n.hubs.values()]),G(r).then(()=>O(r,f,c))};h(e=>{n.patchInstance(e,["position"])}),y(e=>{n.patchHub(e,["position"])}),j(e=>{n.deleteHub(e.data.hub,!e.data.blueprint)}),l(e=>{n.deleteInstance(e.data.instance,!e.data.blueprint)});const S=e=>{const{inputInstance:t,outputInstance:o,inputHub:i,outputHub:s,outputKey:b,inputKey:m}=z(r,e);if(t&&o)return n.addInstanceInput(t,m,{instanceId:o.id,output:b});if(s&&t&&m)return n.addInstanceHubInput(t,m,{hubId:s.id});if(s&&t)return n.addInstanceInjectionInput(t,{hubId:s.id});if(o&&i)return n.addHubInput(i,{instanceId:o.id,output:b});if(s&&i)return n.addHubInjectionInput(i,{hubId:s.id});throw u.error({msg:"unexpected connection while adding",connection:e,inputInstance:t,outputInstance:o,inputHub:i,outputHub:s,outputKey:b,inputKey:m}),new Error("Invalid connection")},T=e=>{const{inputInstance:t,outputInstance:o,inputHub:i,outputHub:s,outputKey:b,inputKey:m}=z(r,e);if(t&&o)return n.removeInstanceInput(t,m,{instanceId:o.id,output:b});if(s&&t&&m)return n.removeInstanceHubInput(t,m,{hubId:s.id});if(s&&t)return n.removeInstanceInjectionInput(t,{hubId:s.id});if(o&&i)return n.removeHubInput(i,{instanceId:o.id,output:b});if(s&&i)return n.removeHubInjectionInput(i,{hubId:s.id});throw u.error({msg:"unexpected connection while removing",edge:e,inputInstance:t,outputInstance:o,inputHub:i,outputHub:s,outputKey:b,inputKey:m}),new Error("Invalid connection")};r.onConnect(S);let E=!1;return r.onEdgeUpdate(async({edge:e,connection:t})=>{E=!0,await T(e),await S(t)}),r.onEdgeUpdateEnd(async({edge:e})=>{try{if(E)return;await T(e)}finally{E=!1}}),n.onInstanceInputAdded(({instance:e,inputName:t,input:o})=>{a.createEdgeForInstanceInput(e,t,o)}),n.onInstanceHubInputAdded(({instance:e,inputName:t,input:o})=>{a.createEdgeForInstanceHubInput(e,t,o)}),n.onInstanceInjectionInputAdded(({instance:e,input:t})=>{a.createEdgeForInstanceInjectionInput(e,t)}),n.onHubInputAdded(({hub:e,input:t})=>{a.createEdgeForHubInput(e,t)}),n.onHubInjectionInputAdded(({hub:e,input:t})=>{a.createEdgeForHubInjectionInput(e,t)}),n.onInstanceInputRemoved(({instance:e,inputName:t,input:o})=>{a.removeEdgeForInstanceInput(e,t,o)}),n.onInstanceHubInputRemoved(({instance:e,inputName:t,input:o})=>{a.removeEdgeForInstanceHubInput(e,t,o)}),n.onInstanceInjectionInputRemoved(({instance:e,input:t})=>{a.removeEdgeForInstanceInjectionInput(e,t)}),n.onHubInputRemoved(({hub:e,input:t})=>{a.removeEdgeForHubInput(e,t)}),n.onHubInjectionInputRemoved(({hub:e,input:t})=>{a.removeEdgeForHubInjectionInput(e,t)}),n.onInstanceNameChanged(({oldId:e,newId:t})=>{const o=a.instanceIdToNodeIdMap.get(e);a.instanceIdToNodeIdMap.set(t,o),a.instanceIdToNodeIdMap.delete(e),r.updateNodeData(o,{})}),n.onInstanceCreated(async({instance:e,blueprint:t})=>{const o=a.createNodeFromInstance(e,{blueprint:t});if(await x(r.areNodesInitialized).toBe(!0),!t){if(n.isGhostInstance(e.id))return;r.updateNode(o.id,i=>{const s={x:i.position.x-i.dimensions.width/2,y:i.position.y-i.dimensions.height/2};return e.position=s,{position:s}})}}),n.onInstanceDeleted(e=>{const t=a.instanceIdToNodeIdMap.get(e);t&&(r.removeNodes(t),a.instanceIdToNodeIdMap.delete(e))}),n.onHubDeleted(e=>{r.removeNodes(e)}),n.onHubCreated(async({hub:e,blueprint:t})=>{a.createNodeFromHub(e,{blueprint:t}),await x(r.areNodesInitialized).toBe(!0),t||r.updateNode(e.id,o=>{const i={x:o.position.x-o.dimensions.width/2,y:o.position.y-o.dimensions.height/2};return e.position=i,{position:i}})}),{initialize:N,placeNodes:R}})}),ce=F({__name:"ProjectCanvas",async setup(I){let d,u;const n=C(),r=k(),{projectStore:a,instancesStore:y,libraryStore:h}=U();a.initializing?([d,u]=_(()=>x(()=>a.initialized).toBe(!0)),await d,u(),a.addLibraryRoot()):([d,u]=_(()=>a.initialize1()),await d,u(),[d,u]=_(()=>a.initialize2()),await d,u()),[d,u]=_(()=>r.initialize()),await d,u(),se(r.placeNodes);const j=l=>{if(l.preventDefault(),!l.dataTransfer||n.blueprint)return;let f;const c=ee(l.dataTransfer);if(c){const w=y.getNextInstanceName(c),H=q(c,w),N=h.library.components[c];f={boundary:{width:360,height:260},instances:[{id:H,name:w,type:c,kind:N.kind,position:{x:0,y:0}}],hubs:[]}}else if(te(l.dataTransfer))f={boundary:{width:74,height:74},instances:[],hubs:[{id:W.createId(),position:{x:0,y:0}}]};else return;n.blueprint=f};return(l,f)=>(P(),D(p(oe),{canvasId:["project",p(a).projectId],components:p(h).library.components,entities:p(h).library.entities,"input-resolver-outputs":p(y).inputResolverOutputs,editable:"",onDragover:j},{"node-instance":g(c=>[v(p(Q),M($(c)),null,16)]),"node-hub":g(c=>[v(p(J),M($(c)),null,16)]),"panel-bottom-left":g(()=>[v(p(Z))]),"panel-bottom-right":g(()=>[v(p(ue))]),_:1},8,["canvasId","components","entities","input-resolver-outputs"]))}}),Ce=F({__name:"index",props:{params:{}},setup(I){return X(I.params.projectId),C.ensureCreated("project",I.params.projectId),k.ensureCreated(I.params.projectId),(d,u)=>(P(),D(p(de),{"project-id":I.params.projectId,"can-unlock":""},{default:g(()=>[v(p(ce))]),_:1},8,["project-id"]))}});export{Ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as n,s as d}from"#entry";import"./
|
|
1
|
+
import{q as n,s as d}from"#entry";import"./DXh9HyqW.js";import{S as y}from"./5ggY4uig.js";import{_ as g}from"./BGLu70Yq.js";import{E as l,aL as p,Z as c,W as u,a1 as K,F as e,X as f}from"./Dm4QKadl.js";import"./CmALWFRB.js";import"./D1Jbgd7O.js";import"./Cw6nGM9K.js";import"./DtFoCuZo.js";import"./DxuitVdg.js";import"./BmDdxTjo.js";import"./CQ4fj8p0.js";import"./GAB5JH5K.js";import"./0ekw3e2V.js";import"./DcmvOc98.js";const q=l({__name:"index",async setup(P){let o,r;const{settingsStore:t}=n(),{projectStore:s}=n();return s.initializing?([o,r]=p(()=>d(()=>s.initialized).toBe(!0)),await o,r(),s.addLibraryRoot()):([o,r]=p(()=>s.initialize1()),await o,r(),[o,r]=p(()=>s.initialize2()),await o,r()),t.apiKeys.load(),(_,i)=>(u(),c(e(y),{title:"API Keys",icon:"mdi-key-variant",description:"Manage the API keys that provide programmatic access to your project resources."},{default:K(({height:m})=>[f(e(g),{search:e(t).apiKeys.search,"onUpdate:search":i[0]||(i[0]=a=>e(t).apiKeys.search=a),"sort-by":e(t).apiKeys.sortBy,"onUpdate:sortBy":i[1]||(i[1]=a=>e(t).apiKeys.sortBy=a),page:e(t).apiKeys.page,"onUpdate:page":i[2]||(i[2]=a=>e(t).apiKeys.page=a),"items-per-page":e(t).apiKeys.itemsPerPage,"onUpdate:itemsPerPage":i[3]||(i[3]=a=>e(t).apiKeys.itemsPerPage=a),"project-id":e(s).projectId,data:e(t).apiKeys.data,loading:e(t).apiKeys.isLoading,height:m},null,8,["search","sort-by","page","items-per-page","project-id","data","loading","height"])]),_:1}))}});export{q as default};
|