@highstate/designer 0.9.34 → 0.9.36
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/3e_JDR0d.js +2 -0
- package/.output/public/_nuxt/AAMMtP7D.js +16 -0
- package/.output/public/_nuxt/{B-tzHMOR.js → B-Cq1MKr.js} +1 -1
- package/.output/public/_nuxt/{CGIsbOqt.js → B19ncWn1.js} +1 -1
- package/.output/public/_nuxt/{FQpR5TAR.js → BRwnrBzN.js} +1 -1
- package/.output/public/_nuxt/{yCy9iX43.js → BcautuHn.js} +1 -1
- package/.output/public/_nuxt/{D2hOj9XC.js → BpWWYZTV.js} +1 -1
- package/.output/public/_nuxt/{DizFB7BZ.js → C-YbE85W.js} +1 -1
- package/.output/public/_nuxt/{BL-2dw2H.js → CD9Hkzj8.js} +1 -1
- package/.output/public/_nuxt/{DeCCkKCn.js → CHa34Mjf.js} +1 -1
- package/.output/public/_nuxt/{BkNdYhVU.js → CMqXSfVv.js} +1 -1
- package/.output/public/_nuxt/{B9QOj8at.js → CT0Qdh4h.js} +1 -1
- package/.output/public/_nuxt/{DA66NkQb.js → CTu4awv_.js} +1 -1
- package/.output/public/_nuxt/{D4I3CwV0.js → CiwR41uk.js} +1 -1
- package/.output/public/_nuxt/{UlOiG1et.js → ClBsnNkh.js} +1 -1
- package/.output/public/_nuxt/{BKe7h20I.js → CsCYo3-3.js} +1 -1
- package/.output/public/_nuxt/{LPrTxMoA.js → D3nND01j.js} +1 -1
- package/.output/public/_nuxt/D5igWdHQ.js +1 -0
- package/.output/public/_nuxt/{CUlEAfaO.js → DImTt3Pn.js} +58 -58
- package/.output/public/_nuxt/{CXRolcM8.js → DbpD4JwV.js} +1 -1
- package/.output/public/_nuxt/DpKDvret.js +1 -0
- package/.output/public/_nuxt/{RIDdiPVc.js → DpS7j0-i.js} +1 -1
- package/.output/public/_nuxt/{BIoksCZ6.js → I2KZJVps.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/63ab1285-ac6b-4b72-9716-8fe591ad00c9.json +1 -0
- package/.output/public/_nuxt/{Dn-R_Odm.js → e4IUZygv.js} +1 -1
- package/.output/public/_nuxt/{entry.BmVIGwdf.css → entry.PSMumvpV.css} +1 -1
- package/.output/public/_nuxt/kwA1-GVE.js +1 -0
- package/.output/public/_nuxt/{AV0MK5it.js → mzIiiUgI.js} +1 -1
- package/.output/server/index.mjs +422 -422
- package/.output/server/package.json +1 -1
- package/package.json +5 -5
- package/.output/public/_nuxt/BcoNctsL.js +0 -1
- package/.output/public/_nuxt/BuN5GOse.js +0 -1
- package/.output/public/_nuxt/CDPuLdqk.js +0 -1
- package/.output/public/_nuxt/DmCOOqTD.js +0 -2
- package/.output/public/_nuxt/Dqe2EjXB.js +0 -16
- package/.output/public/_nuxt/builds/meta/e078712d-664b-41c7-9aa8-b59330e10324.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ai as Y,aj as ut}from"#entry";import{F as je,av as Zt,aW as $e,Z as Pe,W as Ve,az as We,a1 as Jt,X as Ge,a0 as Xe,a2 as De,a3 as qe}from"./CJ9AjueP.js";const at=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ye(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function V(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ft(e,...t){if(!ye(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 It(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");V(e.outputLen),V(e.blockLen)}function At(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 Ye(e,t){ft(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function St(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ct(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Et(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function q(e,t){return e<<32-t|e>>>t}function K(e,t){return e<<t|e>>>32-t>>>0}const Ze=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Je(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Qe(e){for(let t=0;t<e.length;t++)e[t]=Je(e[t]);return e}const Qt=Ze?e=>e:Qe,pe=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",tn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function en(e){if(ft(e),pe)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=tn[e[n]];return t}const tt={_0:48,_9:57,A:65,F:70,a:97,f:102};function te(e){if(e>=tt._0&&e<=tt._9)return e-tt._0;if(e>=tt.A&&e<=tt.F)return e-(tt.A-10);if(e>=tt.a&&e<=tt.f)return e-(tt.a-10)}function ge(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(pe)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 i=te(e.charCodeAt(s)),c=te(e.charCodeAt(s+1));if(i===void 0||c===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]=i*16+c}return r}function we(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function xt(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function ee(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function xe(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 be{}function nn(e){const t=r=>e().update(xt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ot(e=32){if(at&&typeof at.getRandomValues=="function")return at.getRandomValues(new Uint8Array(e));if(at&&typeof at.randomBytes=="function")return Uint8Array.from(at.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class me extends be{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,It(t);const r=xt(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 i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),ct(s)}update(t){return At(this),this.iHash.update(t),this}digestInto(t){At(this),ft(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:i,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=c,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 gt=(e,t,n)=>new me(e,t).update(n).digest();gt.create=(e,t)=>new me(e,t);function Ee(e,t,n){return It(e),n===void 0&&(n=new Uint8Array(e.outputLen)),gt(e,xt(n),xt(t))}const kt=Uint8Array.from([0]),ne=Uint8Array.of();function rn(e,t,n,r=32){It(e),V(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=ne);const i=new Uint8Array(s*o),c=gt.create(e,t),f=c._cloneInto(),h=new Uint8Array(c.outputLen);for(let a=0;a<s;a++)kt[0]=a+1,f.update(a===0?ne:h).update(n).update(kt).digestInto(h),i.set(h,o*a),c._cloneInto(f);return c.destroy(),f.destroy(),ct(h,kt),i.slice(0,r)}const dt=(e,t,n,r,o)=>rn(e,Ee(e,t,n),r,o);function sn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=r?4:0,h=r?0:4;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function on(e,t,n){return e&t^~e&n}function cn(e,t,n){return e&t^e&n^t&n}class fn extends be{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=Et(this.buffer)}update(t){At(this),t=xt(t),ft(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const c=Math.min(o-this.pos,s-i);if(c===o){const f=Et(t);for(;o<=s-i;i+=o)this.process(f,i);continue}r.set(t.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){At(this),Ye(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,ct(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let l=i;l<o;l++)n[l]=0;sn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const c=Et(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=f/4,a=this.get();if(h>a.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<h;l++)c.setUint32(4*l,a[l],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:i,pos:c}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=c,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const nt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),an=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]),rt=new Uint32Array(64);class ln extends fn{constructor(t=32){super(64,t,8,!1),this.A=nt[0]|0,this.B=nt[1]|0,this.C=nt[2]|0,this.D=nt[3]|0,this.E=nt[4]|0,this.F=nt[5]|0,this.G=nt[6]|0,this.H=nt[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:c,H:f}=this;return[t,n,r,o,s,i,c,f]}set(t,n,r,o,s,i,c,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=c|0,this.H=f|0}process(t,n){for(let l=0;l<16;l++,n+=4)rt[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const w=rt[l-15],g=rt[l-2],b=q(w,7)^q(w,18)^w>>>3,p=q(g,17)^q(g,19)^g>>>10;rt[l]=p+rt[l-7]+b+rt[l-16]|0}let{A:r,B:o,C:s,D:i,E:c,F:f,G:h,H:a}=this;for(let l=0;l<64;l++){const w=q(c,6)^q(c,11)^q(c,25),g=a+w+on(c,f,h)+an[l]+rt[l]|0,p=(q(r,2)^q(r,13)^q(r,22))+cn(r,o,s)|0;a=h,h=f,f=c,c=i+g|0,i=s,s=o,o=r,r=g+p|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,c=c+this.E|0,f=f+this.F|0,h=h+this.G|0,a=a+this.H|0,this.set(r,o,s,i,c,f,h,a)}roundClean(){ct(rt)}destroy(){this.set(0,0,0,0,0,0,0,0),ct(this.buffer)}}const $t=nn(()=>new ln),et=$t;function hn(e,t,n,r){It(e);const o=xe({dkLen:32,asyncTick:10},r),{c:s,dkLen:i,asyncTick:c}=o;if(V(s),V(i),V(c),s<1)throw new Error("iterations (c) should be >= 1");const f=ee(t),h=ee(n),a=new Uint8Array(i),l=gt.create(e,f),w=l._cloneInto().update(h);return{c:s,dkLen:i,asyncTick:c,DK:a,PRF:l,PRFSalt:w}}function un(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ct(o),n}function Ae(e,t,n,r){const{c:o,dkLen:s,DK:i,PRF:c,PRFSalt:f}=hn(e,t,n,r);let h;const a=new Uint8Array(4),l=Et(a),w=new Uint8Array(c.outputLen);for(let g=1,b=0;b<s;g++,b+=c.outputLen){const p=i.subarray(b,b+c.outputLen);l.setInt32(0,g,!1),(h=f._cloneInto(h)).update(a).digestInto(w),p.set(w.subarray(0,p.length));for(let y=1;y<o;y++){c._cloneInto(h).update(w).digestInto(w);for(let B=0;B<p.length;B++)p[B]^=w[B]}}return un(c,f,i,h,w)}function re(e,t,n,r,o,s){let i=e[t++]^n[r++],c=e[t++]^n[r++],f=e[t++]^n[r++],h=e[t++]^n[r++],a=e[t++]^n[r++],l=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],b=e[t++]^n[r++],p=e[t++]^n[r++],y=e[t++]^n[r++],B=e[t++]^n[r++],M=e[t++]^n[r++],z=e[t++]^n[r++],O=e[t++]^n[r++],j=e[t++]^n[r++],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let F=0;F<8;F+=2)_^=K(v+A|0,7),x^=K(_+v|0,9),A^=K(x+_|0,13),v^=K(A+x|0,18),m^=K(S+H|0,7),u^=K(m+S|0,9),H^=K(u+m|0,13),S^=K(H+u|0,18),U^=K(I+k|0,7),R^=K(U+I|0,9),k^=K(R+U|0,13),I^=K(k+R|0,18),C^=K(L+E|0,7),d^=K(C+L|0,9),E^=K(d+C|0,13),L^=K(E+d|0,18),H^=K(v+C|0,7),R^=K(H+v|0,9),C^=K(R+H|0,13),v^=K(C+R|0,18),k^=K(S+_|0,7),d^=K(k+S|0,9),_^=K(d+k|0,13),S^=K(_+d|0,18),E^=K(I+m|0,7),x^=K(E+I|0,9),m^=K(x+E|0,13),I^=K(m+x|0,18),A^=K(L+U|0,7),u^=K(A+L|0,9),U^=K(u+A|0,13),L^=K(U+u|0,18);o[s++]=i+v|0,o[s++]=c+H|0,o[s++]=f+R|0,o[s++]=h+C|0,o[s++]=a+_|0,o[s++]=l+S|0,o[s++]=w+k|0,o[s++]=g+d|0,o[s++]=b+x|0,o[s++]=p+m|0,o[s++]=y+I|0,o[s++]=B+E|0,o[s++]=M+A|0,o[s++]=z+u|0,o[s++]=O+U|0,o[s++]=j+L|0}function vt(e,t,n,r,o){let s=r+0,i=r+16*o;for(let c=0;c<16;c++)n[i+c]=e[t+(2*o-1)*16+c];for(let c=0;c<o;c++,s+=16,t+=16)re(n,i,e,t,n,s),c>0&&(i+=16),re(n,s,e,t+=16,n,i)}function dn(e,t,n){const r=xe({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:i,dkLen:c,asyncTick:f,maxmem:h,onProgress:a}=r;if(V(o),V(s),V(i),V(c),V(f),V(h),a!==void 0&&typeof a!="function")throw new Error("progressCb should be function");const l=128*s,w=l/4,g=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>g)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(i<0||i>(g-1)*32/l)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(c<0||c>(g-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(l*(o+i)>h)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+h);const p=Ae($t,e,t,{c:1,dkLen:l*i}),y=St(p),B=St(new Uint8Array(l*o)),M=St(new Uint8Array(l));let z=()=>{};if(a){const O=2*o*i,j=Math.max(Math.floor(O/1e4),1);let v=0;z=()=>{v++,a&&(!(v%j)||v===O)&&a(v/O)}}return{N:o,r:s,p:i,dkLen:c,blockSize32:w,V:B,B32:y,B:p,tmp:M,blockMixCb:z,asyncTick:f}}function yn(e,t,n,r,o){const s=Ae($t,e,n,{c:1,dkLen:t});return ct(n,r,o),s}function Be(e,t,n){const{N:r,r:o,p:s,dkLen:i,blockSize32:c,V:f,B32:h,B:a,tmp:l,blockMixCb:w}=dn(e,t,n);Qt(h);for(let g=0;g<s;g++){const b=c*g;for(let p=0;p<c;p++)f[p]=h[b+p];for(let p=0,y=0;p<r-1;p++)vt(f,y,f,y+=c,o),w();vt(f,(r-1)*c,h,b,o),w();for(let p=0;p<r;p++){const y=h[b+c-16]%r;for(let B=0;B<c;B++)l[B]=h[b+B]^f[y*c+B];vt(l,0,h,b,o),w()}}return Qt(h),yn(e,i,a,f,l)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ht(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Kt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function $(e,...t){if(!Ue(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 se(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 pn(e,t){$(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function st(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function yt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function gn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const wn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function xn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Ft(e){if(typeof e=="string")e=xn(e);else if(Ue(e))e=Rt(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function bn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function mn(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 En=(e,t)=>{function n(r,...o){if($(r),!wn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const a=o[0];if(!a)throw new Error("nonce / iv required");e.varSizeNonce?$(a):$(a,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&$(o[1]);const i=t(r,...o),c=(a,l)=>{if(l!==void 0){if(a!==2)throw new Error("cipher output not supported");$(l)}};let f=!1;return{encrypt(a,l){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,$(a),c(i.encrypt.length,l),i.encrypt(a,l)},decrypt(a,l){if($(a),s&&a.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return c(i.decrypt.length,l),i.decrypt(a,l)}}}return Object.assign(n,e),n};function oe(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&&!Bn(t))throw new Error("invalid output, must be aligned");return t}function ie(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=4,h=0;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function An(e,t,n){Ht(n);const r=new Uint8Array(16),o=gn(r);return ie(o,0,BigInt(t),n),ie(o,8,BigInt(e),n),r}function Bn(e){return e.byteOffset%4===0}function Rt(e){return Uint8Array.from(e)}const Ie=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Un=Ie("expand 16-byte k"),In=Ie("expand 32-byte k"),Ln=st(Un),Cn=st(In);function T(e,t){return e<<t|e>>>32-t}function Mt(e){return e.byteOffset%4===0}const bt=64,_n=16,Le=2**32-1,ce=new Uint32Array;function Sn(e,t,n,r,o,s,i,c){const f=o.length,h=new Uint8Array(bt),a=st(h),l=Mt(o)&&Mt(s),w=l?st(o):ce,g=l?st(s):ce;for(let b=0;b<f;i++){if(e(t,n,r,a,i,c),i>=Le)throw new Error("arx: counter overflow");const p=Math.min(bt,f-b);if(l&&p===bt){const y=b/4;if(b%4!==0)throw new Error("arx: invalid block position");for(let B=0,M;B<_n;B++)M=y+B,g[M]=w[M]^a[B];b+=bt;continue}for(let y=0,B;y<p;y++)B=b+y,s[B]=o[B]^h[y];b+=p}}function kn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=bn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Kt(o),Kt(i),Ht(s),Ht(n),(c,f,h,a,l=0)=>{$(c),$(f),$(h);const w=h.length;if(a===void 0&&(a=new Uint8Array(w)),$(a),Kt(l),l<0||l>=Le)throw new Error("arx: counter overflow");if(a.length<w)throw new Error(`arx: output (${a.length}) is shorter than data (${w})`);const g=[];let b=c.length,p,y;if(b===32)g.push(p=Rt(c)),y=Cn;else if(b===16&&n)p=new Uint8Array(32),p.set(c),p.set(c,16),y=Ln,g.push(p);else throw new Error(`arx: invalid 32-byte key, got length=${b}`);Mt(f)||g.push(f=Rt(f));const B=st(p);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(y,B,st(f.subarray(0,16)),B),f=f.subarray(16)}const M=16-o;if(M!==f.length)throw new Error(`arx: nonce must be ${M} or 16 bytes`);if(M!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,g.push(f)}const z=st(f);return Sn(e,y,B,z,h,a,l,i),yt(...g),a}}const N=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class vn{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=Ft(t),$(t,32);const n=N(t,0),r=N(t,2),o=N(t,4),s=N(t,6),i=N(t,8),c=N(t,10),f=N(t,12),h=N(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|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|c<<2)&8191,this.r[7]=(c>>>11|f<<5)&8065,this.r[8]=(f>>>8|h<<8)&8191,this.r[9]=h>>>5&127;for(let a=0;a<8;a++)this.pad[a]=N(t,16+2*a)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:i}=this,c=i[0],f=i[1],h=i[2],a=i[3],l=i[4],w=i[5],g=i[6],b=i[7],p=i[8],y=i[9],B=N(t,n+0),M=N(t,n+2),z=N(t,n+4),O=N(t,n+6),j=N(t,n+8),v=N(t,n+10),H=N(t,n+12),R=N(t,n+14);let C=s[0]+(B&8191),_=s[1]+((B>>>13|M<<3)&8191),S=s[2]+((M>>>10|z<<6)&8191),k=s[3]+((z>>>7|O<<9)&8191),d=s[4]+((O>>>4|j<<12)&8191),x=s[5]+(j>>>1&8191),m=s[6]+((j>>>14|v<<2)&8191),I=s[7]+((v>>>11|H<<5)&8191),E=s[8]+((H>>>8|R<<8)&8191),A=s[9]+(R>>>5|o),u=0,U=u+C*c+_*(5*y)+S*(5*p)+k*(5*b)+d*(5*g);u=U>>>13,U&=8191,U+=x*(5*w)+m*(5*l)+I*(5*a)+E*(5*h)+A*(5*f),u+=U>>>13,U&=8191;let L=u+C*f+_*c+S*(5*y)+k*(5*p)+d*(5*b);u=L>>>13,L&=8191,L+=x*(5*g)+m*(5*w)+I*(5*l)+E*(5*a)+A*(5*h),u+=L>>>13,L&=8191;let F=u+C*h+_*f+S*c+k*(5*y)+d*(5*p);u=F>>>13,F&=8191,F+=x*(5*b)+m*(5*g)+I*(5*w)+E*(5*l)+A*(5*a),u+=F>>>13,F&=8191;let P=u+C*a+_*h+S*f+k*c+d*(5*y);u=P>>>13,P&=8191,P+=x*(5*p)+m*(5*b)+I*(5*g)+E*(5*w)+A*(5*l),u+=P>>>13,P&=8191;let Z=u+C*l+_*a+S*h+k*f+d*c;u=Z>>>13,Z&=8191,Z+=x*(5*y)+m*(5*p)+I*(5*b)+E*(5*g)+A*(5*w),u+=Z>>>13,Z&=8191;let G=u+C*w+_*l+S*a+k*h+d*f;u=G>>>13,G&=8191,G+=x*c+m*(5*y)+I*(5*p)+E*(5*b)+A*(5*g),u+=G>>>13,G&=8191;let X=u+C*g+_*w+S*l+k*a+d*h;u=X>>>13,X&=8191,X+=x*f+m*c+I*(5*y)+E*(5*p)+A*(5*b),u+=X>>>13,X&=8191;let D=u+C*b+_*g+S*w+k*l+d*a;u=D>>>13,D&=8191,D+=x*h+m*f+I*c+E*(5*y)+A*(5*p),u+=D>>>13,D&=8191;let J=u+C*p+_*b+S*g+k*w+d*l;u=J>>>13,J&=8191,J+=x*a+m*h+I*f+E*c+A*(5*y),u+=J>>>13,J&=8191;let Q=u+C*y+_*p+S*b+k*g+d*w;u=Q>>>13,Q&=8191,Q+=x*l+m*a+I*h+E*f+A*c,u+=Q>>>13,Q&=8191,u=(u<<2)+u|0,u=u+U|0,U=u&8191,u=u>>>13,L+=u,s[0]=U,s[1]=L,s[2]=F,s[3]=P,s[4]=Z,s[5]=G,s[6]=X,s[7]=D,s[8]=J,s[9]=Q}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=o,o=t[c]>>>13,t[c]&=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 c=1;c<10;c++)r[c]=t[c]+o,o=r[c]>>>13,r[c]&=8191;r[9]-=8192;let s=(o^1)-1;for(let c=0;c<10;c++)r[c]&=s;s=~s;for(let c=0;c<10;c++)t[c]=t[c]&s|r[c];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 i=t[0]+n[0];t[0]=i&65535;for(let c=1;c<8;c++)i=(t[c]+n[c]|0)+(i>>>16)|0,t[c]=i&65535;yt(r)}update(t){se(this),t=Ft(t),$(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(r-this.pos,o-s);if(i===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){yt(this.h,this.r,this.buffer,this.pad)}digestInto(t){se(this),pn(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 i=0;i<8;i++)t[s++]=r[i]>>>0,t[s++]=r[i]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Kn(e){const t=(r,o)=>e(o).update(Ft(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Tn=Kn(e=>new vn(e));function Hn(e,t,n,r,o,s=20){let i=e[0],c=e[1],f=e[2],h=e[3],a=t[0],l=t[1],w=t[2],g=t[3],b=t[4],p=t[5],y=t[6],B=t[7],M=o,z=n[0],O=n[1],j=n[2],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let P=0;P<s;P+=2)v=v+_|0,A=T(A^v,16),x=x+A|0,_=T(_^x,12),v=v+_|0,A=T(A^v,8),x=x+A|0,_=T(_^x,7),H=H+S|0,u=T(u^H,16),m=m+u|0,S=T(S^m,12),H=H+S|0,u=T(u^H,8),m=m+u|0,S=T(S^m,7),R=R+k|0,U=T(U^R,16),I=I+U|0,k=T(k^I,12),R=R+k|0,U=T(U^R,8),I=I+U|0,k=T(k^I,7),C=C+d|0,L=T(L^C,16),E=E+L|0,d=T(d^E,12),C=C+d|0,L=T(L^C,8),E=E+L|0,d=T(d^E,7),v=v+S|0,L=T(L^v,16),I=I+L|0,S=T(S^I,12),v=v+S|0,L=T(L^v,8),I=I+L|0,S=T(S^I,7),H=H+k|0,A=T(A^H,16),E=E+A|0,k=T(k^E,12),H=H+k|0,A=T(A^H,8),E=E+A|0,k=T(k^E,7),R=R+d|0,u=T(u^R,16),x=x+u|0,d=T(d^x,12),R=R+d|0,u=T(u^R,8),x=x+u|0,d=T(d^x,7),C=C+_|0,U=T(U^C,16),m=m+U|0,_=T(_^m,12),C=C+_|0,U=T(U^C,8),m=m+U|0,_=T(_^m,7);let F=0;r[F++]=i+v|0,r[F++]=c+H|0,r[F++]=f+R|0,r[F++]=h+C|0,r[F++]=a+_|0,r[F++]=l+S|0,r[F++]=w+k|0,r[F++]=g+d|0,r[F++]=b+x|0,r[F++]=p+m|0,r[F++]=y+I|0,r[F++]=B+E|0,r[F++]=M+A|0,r[F++]=z+u|0,r[F++]=O+U|0,r[F++]=j+L|0}const Fn=kn(Hn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Rn=new Uint8Array(16),fe=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Rn.subarray(n))},Mn=new Uint8Array(32);function ae(e,t,n,r,o){const s=e(t,n,Mn),i=Tn.create(s);o&&fe(i,o),fe(i,r);const c=An(r.length,o?o.length:0,!0);i.update(c);const f=i.digest();return yt(s,c),f}const On=e=>(t,n,r)=>({encrypt(s,i){const c=s.length;i=oe(c+16,i,!1),i.set(s);const f=i.subarray(0,-16);e(t,n,f,f,1);const h=ae(e,t,n,f,r);return i.set(h,c),yt(h),i},decrypt(s,i){i=oe(s.length-16,i,!1);const c=s.subarray(0,-16),f=s.subarray(-16),h=ae(e,t,n,c,r);if(!mn(f,h))throw new Error("invalid tag");return i.set(s.subarray(0,-16)),e(t,n,i,i,1),yt(h),i}}),pt=En({blockSize:64,nonceLength:12,tagLength:16},On(Fn));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ce=BigInt(0);function Nn(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Ce:BigInt("0x"+e)}function le(e){return ft(e),Nn(en(Uint8Array.from(e).reverse()))}function zn(e,t){return ge(e.toString(16).padStart(t*2,"0"))}function jn(e,t){return zn(e,t).reverse()}function he(e,t,n){let r;if(typeof t=="string")try{r=ge(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(ye(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 Tt=e=>typeof e=="bigint"&&Ce<=e;function $n(e,t,n){return Tt(e)&&Tt(t)&&Tt(n)&&t<=e&&e<n}function ue(e,t,n,r){if(!$n(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Pn(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,i){const c=e[o];if(i&&c===void 0)return;const f=typeof c;if(f!==s||c===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 _e=BigInt(0);BigInt(1);function Se(e,t){const n=e%t;return n>=_e?n:t+n}function W(e,t,n){let r=e;for(;t-- >_e;)r*=r,r%=n;return r}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wt=BigInt(0),lt=BigInt(1),mt=BigInt(2);function Vn(e){return Pn(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function Wn(e){const t=Vn(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:i}=t,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const f=i||ot,h=c?255:448,a=c?32:56,l=BigInt(c?9:5),w=BigInt(c?121665:39081),g=c?mt**BigInt(254):mt**BigInt(447),b=c?BigInt(8)*mt**BigInt(251)-lt:BigInt(4)*mt**BigInt(445)-lt,p=g+b+lt,y=d=>Se(d,n),B=M(l);function M(d){return jn(y(d),a)}function z(d){const x=he("u coordinate",d,a);return c&&(x[31]&=127),y(le(x))}function O(d){return le(o(he("scalar",d,a)))}function j(d,x){const m=R(z(x),O(d));if(m===wt)throw new Error("invalid private or public key received");return M(m)}function v(d){return j(d,B)}function H(d,x,m){const I=y(d*(x-m));return x=y(x-I),m=y(m+I),{x_2:x,x_3:m}}function R(d,x){ue("u",d,wt,n),ue("scalar",x,g,p);const m=x,I=d;let E=lt,A=wt,u=d,U=lt,L=wt;for(let P=BigInt(h-1);P>=wt;P--){const Z=m>>P<L^=Z,{x_2:E,x_3:u}=H(L,E,u),{x_2:A,x_3:U}=H(L,A,U),L=Z;const G=E+A,X=y(G*G),D=E-A,J=y(D*D),Q=X-J,Ne=u+U,ze=u-U,Xt=y(ze*G),Dt=y(Ne*D),qt=Xt+Dt,Yt=Xt-Dt;u=y(qt*qt),U=y(I*y(Yt*Yt)),E=y(X*J),A=y(Q*(X+y(w*Q)))}({x_2:E,x_3:u}=H(L,E,u)),{x_2:A,x_3:U}=H(L,A,U);const F=s(A);return y(E*F)}const C=(d=f(a))=>d,_={randomSecretKey:C,randomPrivateKey:C};function S(d){const x=_.randomSecretKey(d);return{secretKey:x,publicKey:v(x)}}const k={secret:a,public:a,seed:a};return{keygen:S,getSharedSecret:(d,x)=>j(d,x),getPublicKey:d=>v(d),scalarMult:j,scalarMultBase:v,utils:_,GuBytes:B.slice(),info:{type:"montgomery",lengths:k}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Gn=BigInt(1),de=BigInt(2),Xn=BigInt(3),Dn=BigInt(5);BigInt(8);const ke={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function qn(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=ke.p,c=e*e%s*e%s,f=W(c,de,s)*c%s,h=W(f,Gn,s)*e%s,a=W(h,Dn,s)*h%s,l=W(a,t,s)*a%s,w=W(l,n,s)*l%s,g=W(w,r,s)*w%s,b=W(g,o,s)*g%s,p=W(b,o,s)*g%s,y=W(p,t,s)*a%s;return{pow_p_5_8:W(y,de,s)*e%s,b2:c}}function Yn(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ot=(()=>{const e=ke.p;return Wn({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=qn(t);return Se(W(n,Xn,e)*r,e)},adjustScalarBytes:Yn})})(),ve=!1;async function Ke(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 Pt(e,t){return await Ke(async()=>{const n=Nt(e)?e:await Jn(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},ve,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMult(e,t)})}async function Bt(e){return await Ke(async()=>Pt(e,Ot.GuBytes),()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMultBase(e)})}const Zn=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Jn(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Zn,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},ve,["deriveBits"])}function Nt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class Qn{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),tr(ht(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=ht(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:ht(this.transcript)}}}function tr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function ht(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 Ut(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function zt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Te(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function er(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function nr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:h}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(h),o+=h.length}n.releaseLock();const s=ht(r),i=s.subarray(0,t),c=Ut(e,s.subarray(t));return{data:i,rest:c}}class Lt{args;body;constructor(t,n){this.args=t,this.body=n}}async function rr(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 i=Y.decode(s);if(i.length>48)throw Error("invalid stanza");if(r.push(i),i.length<48)break}const o=ht(r);return{s:new Lt(n,o)}}async function sr(e){const t=new Qn(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 rr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const i=Y.decode(s.slice(4)),{rest:c,transcript:f}=t.close(),h=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:h,MAC:i,headerSize:f.length,rest:Ut(e,c)}}}function He(e){const t=[];t.push(`age-encryption.org/v1
|
|
1
|
+
import{aj as Y,ak as ut}from"#entry";import{F as je,av as Zt,aW as $e,Z as Pe,W as Ve,az as We,a1 as Jt,X as Ge,a0 as Xe,a2 as De,a3 as qe}from"./CJ9AjueP.js";const at=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ye(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function V(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ft(e,...t){if(!ye(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 It(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");V(e.outputLen),V(e.blockLen)}function At(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 Ye(e,t){ft(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function St(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ct(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Et(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function q(e,t){return e<<32-t|e>>>t}function K(e,t){return e<<t|e>>>32-t>>>0}const Ze=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Je(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Qe(e){for(let t=0;t<e.length;t++)e[t]=Je(e[t]);return e}const Qt=Ze?e=>e:Qe,pe=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",tn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function en(e){if(ft(e),pe)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=tn[e[n]];return t}const tt={_0:48,_9:57,A:65,F:70,a:97,f:102};function te(e){if(e>=tt._0&&e<=tt._9)return e-tt._0;if(e>=tt.A&&e<=tt.F)return e-(tt.A-10);if(e>=tt.a&&e<=tt.f)return e-(tt.a-10)}function ge(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(pe)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 i=te(e.charCodeAt(s)),c=te(e.charCodeAt(s+1));if(i===void 0||c===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]=i*16+c}return r}function we(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function xt(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function ee(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function xe(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 be{}function nn(e){const t=r=>e().update(xt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ot(e=32){if(at&&typeof at.getRandomValues=="function")return at.getRandomValues(new Uint8Array(e));if(at&&typeof at.randomBytes=="function")return Uint8Array.from(at.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class me extends be{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,It(t);const r=xt(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 i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),ct(s)}update(t){return At(this),this.iHash.update(t),this}digestInto(t){At(this),ft(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:i,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=c,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 gt=(e,t,n)=>new me(e,t).update(n).digest();gt.create=(e,t)=>new me(e,t);function Ee(e,t,n){return It(e),n===void 0&&(n=new Uint8Array(e.outputLen)),gt(e,xt(n),xt(t))}const kt=Uint8Array.from([0]),ne=Uint8Array.of();function rn(e,t,n,r=32){It(e),V(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=ne);const i=new Uint8Array(s*o),c=gt.create(e,t),f=c._cloneInto(),h=new Uint8Array(c.outputLen);for(let a=0;a<s;a++)kt[0]=a+1,f.update(a===0?ne:h).update(n).update(kt).digestInto(h),i.set(h,o*a),c._cloneInto(f);return c.destroy(),f.destroy(),ct(h,kt),i.slice(0,r)}const dt=(e,t,n,r,o)=>rn(e,Ee(e,t,n),r,o);function sn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=r?4:0,h=r?0:4;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function on(e,t,n){return e&t^~e&n}function cn(e,t,n){return e&t^e&n^t&n}class fn extends be{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=Et(this.buffer)}update(t){At(this),t=xt(t),ft(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const c=Math.min(o-this.pos,s-i);if(c===o){const f=Et(t);for(;o<=s-i;i+=o)this.process(f,i);continue}r.set(t.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){At(this),Ye(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,ct(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let l=i;l<o;l++)n[l]=0;sn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const c=Et(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=f/4,a=this.get();if(h>a.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<h;l++)c.setUint32(4*l,a[l],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:i,pos:c}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=c,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const nt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),an=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]),rt=new Uint32Array(64);class ln extends fn{constructor(t=32){super(64,t,8,!1),this.A=nt[0]|0,this.B=nt[1]|0,this.C=nt[2]|0,this.D=nt[3]|0,this.E=nt[4]|0,this.F=nt[5]|0,this.G=nt[6]|0,this.H=nt[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:c,H:f}=this;return[t,n,r,o,s,i,c,f]}set(t,n,r,o,s,i,c,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=c|0,this.H=f|0}process(t,n){for(let l=0;l<16;l++,n+=4)rt[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const w=rt[l-15],g=rt[l-2],b=q(w,7)^q(w,18)^w>>>3,p=q(g,17)^q(g,19)^g>>>10;rt[l]=p+rt[l-7]+b+rt[l-16]|0}let{A:r,B:o,C:s,D:i,E:c,F:f,G:h,H:a}=this;for(let l=0;l<64;l++){const w=q(c,6)^q(c,11)^q(c,25),g=a+w+on(c,f,h)+an[l]+rt[l]|0,p=(q(r,2)^q(r,13)^q(r,22))+cn(r,o,s)|0;a=h,h=f,f=c,c=i+g|0,i=s,s=o,o=r,r=g+p|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,c=c+this.E|0,f=f+this.F|0,h=h+this.G|0,a=a+this.H|0,this.set(r,o,s,i,c,f,h,a)}roundClean(){ct(rt)}destroy(){this.set(0,0,0,0,0,0,0,0),ct(this.buffer)}}const $t=nn(()=>new ln),et=$t;function hn(e,t,n,r){It(e);const o=xe({dkLen:32,asyncTick:10},r),{c:s,dkLen:i,asyncTick:c}=o;if(V(s),V(i),V(c),s<1)throw new Error("iterations (c) should be >= 1");const f=ee(t),h=ee(n),a=new Uint8Array(i),l=gt.create(e,f),w=l._cloneInto().update(h);return{c:s,dkLen:i,asyncTick:c,DK:a,PRF:l,PRFSalt:w}}function un(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ct(o),n}function Ae(e,t,n,r){const{c:o,dkLen:s,DK:i,PRF:c,PRFSalt:f}=hn(e,t,n,r);let h;const a=new Uint8Array(4),l=Et(a),w=new Uint8Array(c.outputLen);for(let g=1,b=0;b<s;g++,b+=c.outputLen){const p=i.subarray(b,b+c.outputLen);l.setInt32(0,g,!1),(h=f._cloneInto(h)).update(a).digestInto(w),p.set(w.subarray(0,p.length));for(let y=1;y<o;y++){c._cloneInto(h).update(w).digestInto(w);for(let B=0;B<p.length;B++)p[B]^=w[B]}}return un(c,f,i,h,w)}function re(e,t,n,r,o,s){let i=e[t++]^n[r++],c=e[t++]^n[r++],f=e[t++]^n[r++],h=e[t++]^n[r++],a=e[t++]^n[r++],l=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],b=e[t++]^n[r++],p=e[t++]^n[r++],y=e[t++]^n[r++],B=e[t++]^n[r++],M=e[t++]^n[r++],z=e[t++]^n[r++],O=e[t++]^n[r++],j=e[t++]^n[r++],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let F=0;F<8;F+=2)_^=K(v+A|0,7),x^=K(_+v|0,9),A^=K(x+_|0,13),v^=K(A+x|0,18),m^=K(S+H|0,7),u^=K(m+S|0,9),H^=K(u+m|0,13),S^=K(H+u|0,18),U^=K(I+k|0,7),R^=K(U+I|0,9),k^=K(R+U|0,13),I^=K(k+R|0,18),C^=K(L+E|0,7),d^=K(C+L|0,9),E^=K(d+C|0,13),L^=K(E+d|0,18),H^=K(v+C|0,7),R^=K(H+v|0,9),C^=K(R+H|0,13),v^=K(C+R|0,18),k^=K(S+_|0,7),d^=K(k+S|0,9),_^=K(d+k|0,13),S^=K(_+d|0,18),E^=K(I+m|0,7),x^=K(E+I|0,9),m^=K(x+E|0,13),I^=K(m+x|0,18),A^=K(L+U|0,7),u^=K(A+L|0,9),U^=K(u+A|0,13),L^=K(U+u|0,18);o[s++]=i+v|0,o[s++]=c+H|0,o[s++]=f+R|0,o[s++]=h+C|0,o[s++]=a+_|0,o[s++]=l+S|0,o[s++]=w+k|0,o[s++]=g+d|0,o[s++]=b+x|0,o[s++]=p+m|0,o[s++]=y+I|0,o[s++]=B+E|0,o[s++]=M+A|0,o[s++]=z+u|0,o[s++]=O+U|0,o[s++]=j+L|0}function vt(e,t,n,r,o){let s=r+0,i=r+16*o;for(let c=0;c<16;c++)n[i+c]=e[t+(2*o-1)*16+c];for(let c=0;c<o;c++,s+=16,t+=16)re(n,i,e,t,n,s),c>0&&(i+=16),re(n,s,e,t+=16,n,i)}function dn(e,t,n){const r=xe({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:i,dkLen:c,asyncTick:f,maxmem:h,onProgress:a}=r;if(V(o),V(s),V(i),V(c),V(f),V(h),a!==void 0&&typeof a!="function")throw new Error("progressCb should be function");const l=128*s,w=l/4,g=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>g)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(i<0||i>(g-1)*32/l)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(c<0||c>(g-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(l*(o+i)>h)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+h);const p=Ae($t,e,t,{c:1,dkLen:l*i}),y=St(p),B=St(new Uint8Array(l*o)),M=St(new Uint8Array(l));let z=()=>{};if(a){const O=2*o*i,j=Math.max(Math.floor(O/1e4),1);let v=0;z=()=>{v++,a&&(!(v%j)||v===O)&&a(v/O)}}return{N:o,r:s,p:i,dkLen:c,blockSize32:w,V:B,B32:y,B:p,tmp:M,blockMixCb:z,asyncTick:f}}function yn(e,t,n,r,o){const s=Ae($t,e,n,{c:1,dkLen:t});return ct(n,r,o),s}function Be(e,t,n){const{N:r,r:o,p:s,dkLen:i,blockSize32:c,V:f,B32:h,B:a,tmp:l,blockMixCb:w}=dn(e,t,n);Qt(h);for(let g=0;g<s;g++){const b=c*g;for(let p=0;p<c;p++)f[p]=h[b+p];for(let p=0,y=0;p<r-1;p++)vt(f,y,f,y+=c,o),w();vt(f,(r-1)*c,h,b,o),w();for(let p=0;p<r;p++){const y=h[b+c-16]%r;for(let B=0;B<c;B++)l[B]=h[b+B]^f[y*c+B];vt(l,0,h,b,o),w()}}return Qt(h),yn(e,i,a,f,l)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ht(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Kt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function $(e,...t){if(!Ue(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 se(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 pn(e,t){$(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function st(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function yt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function gn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const wn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function xn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Ft(e){if(typeof e=="string")e=xn(e);else if(Ue(e))e=Rt(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function bn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function mn(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 En=(e,t)=>{function n(r,...o){if($(r),!wn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const a=o[0];if(!a)throw new Error("nonce / iv required");e.varSizeNonce?$(a):$(a,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&$(o[1]);const i=t(r,...o),c=(a,l)=>{if(l!==void 0){if(a!==2)throw new Error("cipher output not supported");$(l)}};let f=!1;return{encrypt(a,l){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,$(a),c(i.encrypt.length,l),i.encrypt(a,l)},decrypt(a,l){if($(a),s&&a.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return c(i.decrypt.length,l),i.decrypt(a,l)}}}return Object.assign(n,e),n};function oe(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&&!Bn(t))throw new Error("invalid output, must be aligned");return t}function ie(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=4,h=0;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function An(e,t,n){Ht(n);const r=new Uint8Array(16),o=gn(r);return ie(o,0,BigInt(t),n),ie(o,8,BigInt(e),n),r}function Bn(e){return e.byteOffset%4===0}function Rt(e){return Uint8Array.from(e)}const Ie=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Un=Ie("expand 16-byte k"),In=Ie("expand 32-byte k"),Ln=st(Un),Cn=st(In);function T(e,t){return e<<t|e>>>32-t}function Mt(e){return e.byteOffset%4===0}const bt=64,_n=16,Le=2**32-1,ce=new Uint32Array;function Sn(e,t,n,r,o,s,i,c){const f=o.length,h=new Uint8Array(bt),a=st(h),l=Mt(o)&&Mt(s),w=l?st(o):ce,g=l?st(s):ce;for(let b=0;b<f;i++){if(e(t,n,r,a,i,c),i>=Le)throw new Error("arx: counter overflow");const p=Math.min(bt,f-b);if(l&&p===bt){const y=b/4;if(b%4!==0)throw new Error("arx: invalid block position");for(let B=0,M;B<_n;B++)M=y+B,g[M]=w[M]^a[B];b+=bt;continue}for(let y=0,B;y<p;y++)B=b+y,s[B]=o[B]^h[y];b+=p}}function kn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=bn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Kt(o),Kt(i),Ht(s),Ht(n),(c,f,h,a,l=0)=>{$(c),$(f),$(h);const w=h.length;if(a===void 0&&(a=new Uint8Array(w)),$(a),Kt(l),l<0||l>=Le)throw new Error("arx: counter overflow");if(a.length<w)throw new Error(`arx: output (${a.length}) is shorter than data (${w})`);const g=[];let b=c.length,p,y;if(b===32)g.push(p=Rt(c)),y=Cn;else if(b===16&&n)p=new Uint8Array(32),p.set(c),p.set(c,16),y=Ln,g.push(p);else throw new Error(`arx: invalid 32-byte key, got length=${b}`);Mt(f)||g.push(f=Rt(f));const B=st(p);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(y,B,st(f.subarray(0,16)),B),f=f.subarray(16)}const M=16-o;if(M!==f.length)throw new Error(`arx: nonce must be ${M} or 16 bytes`);if(M!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,g.push(f)}const z=st(f);return Sn(e,y,B,z,h,a,l,i),yt(...g),a}}const N=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class vn{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=Ft(t),$(t,32);const n=N(t,0),r=N(t,2),o=N(t,4),s=N(t,6),i=N(t,8),c=N(t,10),f=N(t,12),h=N(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|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|c<<2)&8191,this.r[7]=(c>>>11|f<<5)&8065,this.r[8]=(f>>>8|h<<8)&8191,this.r[9]=h>>>5&127;for(let a=0;a<8;a++)this.pad[a]=N(t,16+2*a)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:i}=this,c=i[0],f=i[1],h=i[2],a=i[3],l=i[4],w=i[5],g=i[6],b=i[7],p=i[8],y=i[9],B=N(t,n+0),M=N(t,n+2),z=N(t,n+4),O=N(t,n+6),j=N(t,n+8),v=N(t,n+10),H=N(t,n+12),R=N(t,n+14);let C=s[0]+(B&8191),_=s[1]+((B>>>13|M<<3)&8191),S=s[2]+((M>>>10|z<<6)&8191),k=s[3]+((z>>>7|O<<9)&8191),d=s[4]+((O>>>4|j<<12)&8191),x=s[5]+(j>>>1&8191),m=s[6]+((j>>>14|v<<2)&8191),I=s[7]+((v>>>11|H<<5)&8191),E=s[8]+((H>>>8|R<<8)&8191),A=s[9]+(R>>>5|o),u=0,U=u+C*c+_*(5*y)+S*(5*p)+k*(5*b)+d*(5*g);u=U>>>13,U&=8191,U+=x*(5*w)+m*(5*l)+I*(5*a)+E*(5*h)+A*(5*f),u+=U>>>13,U&=8191;let L=u+C*f+_*c+S*(5*y)+k*(5*p)+d*(5*b);u=L>>>13,L&=8191,L+=x*(5*g)+m*(5*w)+I*(5*l)+E*(5*a)+A*(5*h),u+=L>>>13,L&=8191;let F=u+C*h+_*f+S*c+k*(5*y)+d*(5*p);u=F>>>13,F&=8191,F+=x*(5*b)+m*(5*g)+I*(5*w)+E*(5*l)+A*(5*a),u+=F>>>13,F&=8191;let P=u+C*a+_*h+S*f+k*c+d*(5*y);u=P>>>13,P&=8191,P+=x*(5*p)+m*(5*b)+I*(5*g)+E*(5*w)+A*(5*l),u+=P>>>13,P&=8191;let Z=u+C*l+_*a+S*h+k*f+d*c;u=Z>>>13,Z&=8191,Z+=x*(5*y)+m*(5*p)+I*(5*b)+E*(5*g)+A*(5*w),u+=Z>>>13,Z&=8191;let G=u+C*w+_*l+S*a+k*h+d*f;u=G>>>13,G&=8191,G+=x*c+m*(5*y)+I*(5*p)+E*(5*b)+A*(5*g),u+=G>>>13,G&=8191;let X=u+C*g+_*w+S*l+k*a+d*h;u=X>>>13,X&=8191,X+=x*f+m*c+I*(5*y)+E*(5*p)+A*(5*b),u+=X>>>13,X&=8191;let D=u+C*b+_*g+S*w+k*l+d*a;u=D>>>13,D&=8191,D+=x*h+m*f+I*c+E*(5*y)+A*(5*p),u+=D>>>13,D&=8191;let J=u+C*p+_*b+S*g+k*w+d*l;u=J>>>13,J&=8191,J+=x*a+m*h+I*f+E*c+A*(5*y),u+=J>>>13,J&=8191;let Q=u+C*y+_*p+S*b+k*g+d*w;u=Q>>>13,Q&=8191,Q+=x*l+m*a+I*h+E*f+A*c,u+=Q>>>13,Q&=8191,u=(u<<2)+u|0,u=u+U|0,U=u&8191,u=u>>>13,L+=u,s[0]=U,s[1]=L,s[2]=F,s[3]=P,s[4]=Z,s[5]=G,s[6]=X,s[7]=D,s[8]=J,s[9]=Q}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=o,o=t[c]>>>13,t[c]&=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 c=1;c<10;c++)r[c]=t[c]+o,o=r[c]>>>13,r[c]&=8191;r[9]-=8192;let s=(o^1)-1;for(let c=0;c<10;c++)r[c]&=s;s=~s;for(let c=0;c<10;c++)t[c]=t[c]&s|r[c];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 i=t[0]+n[0];t[0]=i&65535;for(let c=1;c<8;c++)i=(t[c]+n[c]|0)+(i>>>16)|0,t[c]=i&65535;yt(r)}update(t){se(this),t=Ft(t),$(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(r-this.pos,o-s);if(i===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){yt(this.h,this.r,this.buffer,this.pad)}digestInto(t){se(this),pn(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 i=0;i<8;i++)t[s++]=r[i]>>>0,t[s++]=r[i]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Kn(e){const t=(r,o)=>e(o).update(Ft(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Tn=Kn(e=>new vn(e));function Hn(e,t,n,r,o,s=20){let i=e[0],c=e[1],f=e[2],h=e[3],a=t[0],l=t[1],w=t[2],g=t[3],b=t[4],p=t[5],y=t[6],B=t[7],M=o,z=n[0],O=n[1],j=n[2],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let P=0;P<s;P+=2)v=v+_|0,A=T(A^v,16),x=x+A|0,_=T(_^x,12),v=v+_|0,A=T(A^v,8),x=x+A|0,_=T(_^x,7),H=H+S|0,u=T(u^H,16),m=m+u|0,S=T(S^m,12),H=H+S|0,u=T(u^H,8),m=m+u|0,S=T(S^m,7),R=R+k|0,U=T(U^R,16),I=I+U|0,k=T(k^I,12),R=R+k|0,U=T(U^R,8),I=I+U|0,k=T(k^I,7),C=C+d|0,L=T(L^C,16),E=E+L|0,d=T(d^E,12),C=C+d|0,L=T(L^C,8),E=E+L|0,d=T(d^E,7),v=v+S|0,L=T(L^v,16),I=I+L|0,S=T(S^I,12),v=v+S|0,L=T(L^v,8),I=I+L|0,S=T(S^I,7),H=H+k|0,A=T(A^H,16),E=E+A|0,k=T(k^E,12),H=H+k|0,A=T(A^H,8),E=E+A|0,k=T(k^E,7),R=R+d|0,u=T(u^R,16),x=x+u|0,d=T(d^x,12),R=R+d|0,u=T(u^R,8),x=x+u|0,d=T(d^x,7),C=C+_|0,U=T(U^C,16),m=m+U|0,_=T(_^m,12),C=C+_|0,U=T(U^C,8),m=m+U|0,_=T(_^m,7);let F=0;r[F++]=i+v|0,r[F++]=c+H|0,r[F++]=f+R|0,r[F++]=h+C|0,r[F++]=a+_|0,r[F++]=l+S|0,r[F++]=w+k|0,r[F++]=g+d|0,r[F++]=b+x|0,r[F++]=p+m|0,r[F++]=y+I|0,r[F++]=B+E|0,r[F++]=M+A|0,r[F++]=z+u|0,r[F++]=O+U|0,r[F++]=j+L|0}const Fn=kn(Hn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Rn=new Uint8Array(16),fe=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Rn.subarray(n))},Mn=new Uint8Array(32);function ae(e,t,n,r,o){const s=e(t,n,Mn),i=Tn.create(s);o&&fe(i,o),fe(i,r);const c=An(r.length,o?o.length:0,!0);i.update(c);const f=i.digest();return yt(s,c),f}const On=e=>(t,n,r)=>({encrypt(s,i){const c=s.length;i=oe(c+16,i,!1),i.set(s);const f=i.subarray(0,-16);e(t,n,f,f,1);const h=ae(e,t,n,f,r);return i.set(h,c),yt(h),i},decrypt(s,i){i=oe(s.length-16,i,!1);const c=s.subarray(0,-16),f=s.subarray(-16),h=ae(e,t,n,c,r);if(!mn(f,h))throw new Error("invalid tag");return i.set(s.subarray(0,-16)),e(t,n,i,i,1),yt(h),i}}),pt=En({blockSize:64,nonceLength:12,tagLength:16},On(Fn));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ce=BigInt(0);function Nn(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Ce:BigInt("0x"+e)}function le(e){return ft(e),Nn(en(Uint8Array.from(e).reverse()))}function zn(e,t){return ge(e.toString(16).padStart(t*2,"0"))}function jn(e,t){return zn(e,t).reverse()}function he(e,t,n){let r;if(typeof t=="string")try{r=ge(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(ye(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 Tt=e=>typeof e=="bigint"&&Ce<=e;function $n(e,t,n){return Tt(e)&&Tt(t)&&Tt(n)&&t<=e&&e<n}function ue(e,t,n,r){if(!$n(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Pn(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,i){const c=e[o];if(i&&c===void 0)return;const f=typeof c;if(f!==s||c===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 _e=BigInt(0);BigInt(1);function Se(e,t){const n=e%t;return n>=_e?n:t+n}function W(e,t,n){let r=e;for(;t-- >_e;)r*=r,r%=n;return r}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wt=BigInt(0),lt=BigInt(1),mt=BigInt(2);function Vn(e){return Pn(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function Wn(e){const t=Vn(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:i}=t,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const f=i||ot,h=c?255:448,a=c?32:56,l=BigInt(c?9:5),w=BigInt(c?121665:39081),g=c?mt**BigInt(254):mt**BigInt(447),b=c?BigInt(8)*mt**BigInt(251)-lt:BigInt(4)*mt**BigInt(445)-lt,p=g+b+lt,y=d=>Se(d,n),B=M(l);function M(d){return jn(y(d),a)}function z(d){const x=he("u coordinate",d,a);return c&&(x[31]&=127),y(le(x))}function O(d){return le(o(he("scalar",d,a)))}function j(d,x){const m=R(z(x),O(d));if(m===wt)throw new Error("invalid private or public key received");return M(m)}function v(d){return j(d,B)}function H(d,x,m){const I=y(d*(x-m));return x=y(x-I),m=y(m+I),{x_2:x,x_3:m}}function R(d,x){ue("u",d,wt,n),ue("scalar",x,g,p);const m=x,I=d;let E=lt,A=wt,u=d,U=lt,L=wt;for(let P=BigInt(h-1);P>=wt;P--){const Z=m>>P<L^=Z,{x_2:E,x_3:u}=H(L,E,u),{x_2:A,x_3:U}=H(L,A,U),L=Z;const G=E+A,X=y(G*G),D=E-A,J=y(D*D),Q=X-J,Ne=u+U,ze=u-U,Xt=y(ze*G),Dt=y(Ne*D),qt=Xt+Dt,Yt=Xt-Dt;u=y(qt*qt),U=y(I*y(Yt*Yt)),E=y(X*J),A=y(Q*(X+y(w*Q)))}({x_2:E,x_3:u}=H(L,E,u)),{x_2:A,x_3:U}=H(L,A,U);const F=s(A);return y(E*F)}const C=(d=f(a))=>d,_={randomSecretKey:C,randomPrivateKey:C};function S(d){const x=_.randomSecretKey(d);return{secretKey:x,publicKey:v(x)}}const k={secret:a,public:a,seed:a};return{keygen:S,getSharedSecret:(d,x)=>j(d,x),getPublicKey:d=>v(d),scalarMult:j,scalarMultBase:v,utils:_,GuBytes:B.slice(),info:{type:"montgomery",lengths:k}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Gn=BigInt(1),de=BigInt(2),Xn=BigInt(3),Dn=BigInt(5);BigInt(8);const ke={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function qn(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=ke.p,c=e*e%s*e%s,f=W(c,de,s)*c%s,h=W(f,Gn,s)*e%s,a=W(h,Dn,s)*h%s,l=W(a,t,s)*a%s,w=W(l,n,s)*l%s,g=W(w,r,s)*w%s,b=W(g,o,s)*g%s,p=W(b,o,s)*g%s,y=W(p,t,s)*a%s;return{pow_p_5_8:W(y,de,s)*e%s,b2:c}}function Yn(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ot=(()=>{const e=ke.p;return Wn({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=qn(t);return Se(W(n,Xn,e)*r,e)},adjustScalarBytes:Yn})})(),ve=!1;async function Ke(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 Pt(e,t){return await Ke(async()=>{const n=Nt(e)?e:await Jn(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},ve,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMult(e,t)})}async function Bt(e){return await Ke(async()=>Pt(e,Ot.GuBytes),()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMultBase(e)})}const Zn=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Jn(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Zn,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},ve,["deriveBits"])}function Nt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class Qn{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),tr(ht(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=ht(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:ht(this.transcript)}}}function tr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function ht(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 Ut(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function zt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Te(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function er(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function nr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:h}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(h),o+=h.length}n.releaseLock();const s=ht(r),i=s.subarray(0,t),c=Ut(e,s.subarray(t));return{data:i,rest:c}}class Lt{args;body;constructor(t,n){this.args=t,this.body=n}}async function rr(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 i=Y.decode(s);if(i.length>48)throw Error("invalid stanza");if(r.push(i),i.length<48)break}const o=ht(r);return{s:new Lt(n,o)}}async function sr(e){const t=new Qn(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 rr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const i=Y.decode(s.slice(4)),{rest:c,transcript:f}=t.close(),h=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:h,MAC:i,headerSize:f.length,rest:Ut(e,c)}}}function He(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(Y.encode(n.body.subarray(r,o))+`
|
|
4
4
|
`)}n.body.length%48===0&&t.push(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as k,t as M,s as C,n as z}from"#entry";import{_ as B,I as L}from"./CFtPCidf.js";import{S as V}from"./DkPrE8g-.js";import{D as x,a as N}from"./DtufO5Sm.js";import{O}from"./B-
|
|
1
|
+
import{q as k,t as M,s as C,n as z}from"#entry";import{_ as B,I as L}from"./CFtPCidf.js";import{S as V}from"./DkPrE8g-.js";import{D as x,a as N}from"./DtufO5Sm.js";import{O}from"./B-Cq1MKr.js";import{_ as I}from"./RJCesp1_.js";import{t as F}from"./BQy0v27R.js";import{_ as H}from"./D12QiTSl.js";import{S as E,b as T}from"./ByQEjDj-.js";import{F as U,aO as w,av as P,Z as b,W as h,G as e,a1 as m,X as d,ai as R,$,a3 as D,aP as q,a2 as G,aL as v,aM as W}from"./CJ9AjueP.js";import{_ as X}from"./Q0n-WHNk.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./DnodTinn.js";import"./Dj-ZGW1B.js";import"./ClBsnNkh.js";import"./DpCgGkMV.js";import"./BOoETPDV.js";import"./D-IcYK3n.js";const Z={class:"text-body-2"},J=U({__name:"TerminalSessionsTable",props:w({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:w(["openSession"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(u,{emit:i}){const n=i,c=P(u,"search"),p=P(u,"sortBy"),o=P(u,"page"),r=P(u,"itemsPerPage"),l=[T.id,{title:"Started",key:"startedAt"},{title:"Finished",key:"finishedAt"},{title:"Duration",key:"duration"},T.actions],A=(g,t)=>{const a=new Date(g),j=(t?new Date(t):new Date).getTime()-a.getTime(),f=Math.floor(j/1e3),y=Math.floor(f/60),S=Math.floor(y/60);return S>0?`${S}h ${y%60}m ${f%60}s`:y>0?`${y}m ${f%60}s`:`${f}s`};return(g,t)=>(h(),b(e(E),{search:c.value,"onUpdate:search":t[0]||(t[0]=a=>c.value=a),"sort-by":p.value,"onUpdate:sortBy":t[1]||(t[1]=a=>p.value=a),page:o.value,"onUpdate:page":t[2]||(t[2]=a=>o.value=a),"items-per-page":r.value,"onUpdate:itemsPerPage":t[3]||(t[3]=a=>r.value=a),headers:l,data:g.data,loading:g.loading,"hide-header":g.hideHeader},{"item.startedAt":m(({item:a})=>[d(e(B),{value:a.startedAt},null,8,["value"])]),"item.finishedAt":m(({item:a})=>[a.finishedAt?(h(),b(e(B),{key:0,value:a.finishedAt},null,8,["value"])):(h(),b(q,{key:1,size:"small",color:"success",variant:"outlined"},{default:m(()=>t[4]||(t[4]=[G("Running")])),_:1,__:[4]}))]),"item.duration":m(({item:a})=>[$("div",Z,D(A(a.startedAt,a.finishedAt)),1)]),"item.actions":m(({item:a})=>[d(R,{variant:"text",icon:"mdi-open-in-new",size:"small",onClick:s=>n("openSession",a.id)},null,8,["onClick"])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header"]))}}),K={class:"text-body-2"},fe=U({__name:"[terminalId]",props:{params:{}},async setup(u){let i,n;const{settingsStore:c}=k(),{projectStore:p}=k();p.initializing?([i,n]=v(()=>C(()=>p.initialized).toBe(!0)),await i,n(),p.addLibraryRoot()):([i,n]=v(()=>p.initialize1()),await i,n(),[i,n]=v(()=>p.initialize2()),await i,n());const o=([i,n]=v(()=>c.getTerminalDetails(u.params.terminalId)),i=await i,n(),i);if(!o)throw M({statusCode:404,statusMessage:"Terminal not found"});const r=c.sessionsForTerminal(u.params.terminalId),l=c.artifactsForTerminal(u.params.terminalId);[i,n]=v(()=>r.load()),await i,n(),[i,n]=v(()=>l.load()),await i,n();const A=[{key:"terminalId",label:"Terminal ID"},{key:"name",label:"Name"},{key:"serviceAccount",label:"Owner"},{key:"createdAt",label:"Created"},{key:"updatedAt",label:"Last Updated"}],g=t=>{z({name:"terminal-session",params:{projectId:u.params.projectId,sessionId:t}})};return(t,a)=>(h(),b(e(x),null,{default:m(()=>[d(V,{meta:e(o).meta,"fallback-icon":"mdi-console",title:e(o).meta.title||e(o).name||"Unnamed Terminal",status:e(o).status,"status-map":e(F),description:e(o).meta.description},null,8,["meta","title","status","status-map","description"]),d(e(N),{title:"Terminal Details",items:A},{"item.terminalId":m(()=>[d(e(L),{value:e(o).id},null,8,["value"])]),"item.name":m(()=>[$("div",K,D(e(o).name||"N/A"),1)]),"item.serviceAccount":m(()=>[d(e(H),{item:e(o)},null,8,["item"])]),"item.createdAt":m(()=>[d(e(B),{value:e(o).createdAt},null,8,["value"])]),"item.updatedAt":m(()=>[d(e(B),{value:e(o).updatedAt},null,8,["value"])]),_:1}),d(W,{elevation:0},{default:m(()=>[d(e(O),{title:"Spec",data:e(o).spec},null,8,["data"]),d(e(I),{title:"Sessions",icon:"mdi-console",count:e(r).data.value.total},{default:m(()=>[d(e(J),{search:e(r).search.value,"onUpdate:search":a[0]||(a[0]=s=>e(r).search.value=s),"sort-by":e(r).sortBy.value,"onUpdate:sortBy":a[1]||(a[1]=s=>e(r).sortBy.value=s),page:e(r).page.value,"onUpdate:page":a[2]||(a[2]=s=>e(r).page.value=s),"items-per-page":e(r).itemsPerPage.value,"onUpdate:itemsPerPage":a[3]||(a[3]=s=>e(r).itemsPerPage.value=s),"project-id":t.params.projectId,data:e(r).data.value,loading:e(r).isLoading.value,"hide-header":!0,onOpenSession:g},null,8,["search","sort-by","page","items-per-page","project-id","data","loading"])]),_:1},8,["count"]),d(e(I),{title:"Artifacts",icon:"mdi-package-variant",count:e(l).data.value.total},{default:m(()=>[d(e(X),{search:e(l).search.value,"onUpdate:search":a[4]||(a[4]=s=>e(l).search.value=s),"sort-by":e(l).sortBy.value,"onUpdate:sortBy":a[5]||(a[5]=s=>e(l).sortBy.value=s),page:e(l).page.value,"onUpdate:page":a[6]||(a[6]=s=>e(l).page.value=s),"items-per-page":e(l).itemsPerPage.value,"onUpdate:itemsPerPage":a[7]||(a[7]=s=>e(l).itemsPerPage.value=s),"project-id":t.params.projectId,data:e(l).data.value,loading:e(l).isLoading.value,"hide-header":""},null,8,["search","sort-by","page","items-per-page","project-id","data","loading"])]),_:1},8,["count"])]),_:1})]),_:1}))}});export{fe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ah as j,_ as y,ai as w,f as C}from"#entry";import{P as k}from"./BpWWYZTV.js";import{F as _,r as x,aW as $,j as I,L as c,W as i,X as n,aE as O,aX as S,a1 as f,$ as r,a3 as m,G as t,b as A,aA as M,aL as P,ai as T,a9 as U,af as B,Z as b}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import{a as L,o as V}from"./BQy0v27R.js";import{_ as F,a as N}from"./mzIiiUgI.js";import{_ as v}from"./Dj-ZGW1B.js";import"./PZl7tHUC.js";import"./CD9Hkzj8.js";import"./Cvl8iHT_.js";const z={class:"d-flex flex-column ga-4"},D={class:"d-flex align-center justify-space-between"},E={class:"text-truncate pr-2",style:{"font-size":"16px","font-weight":"500"}},R={class:"text-caption text-medium-emphasis font-mono text-truncate"},W={class:"d-flex align-center justify-space-between"},X=_({__name:"OperationCard",props:{operation:{},operationsStore:{}},setup(l){const e=x(!1),o=x(!1),a=$("contextMenu"),d=I(()=>!j(l.operation.status)),p=async s=>{a.value&&await a.value.showContextMenu(s)},u=async()=>{if(!(!d.value||o.value)){o.value=!0;try{await l.operationsStore.cancelOperation(l.operation.id),e.value=!1}finally{o.value=!1}}};return(s,h)=>(i(),c("div",null,[n(O,{width:360,class:"operation-card",color:"#2d2d2d",variant:"flat",style:{"border-radius":"4px"},onContextmenu:S(p,["prevent"])},{title:f(()=>[r("div",z,[r("div",D,[r("div",E,m(s.operation.meta.title),1),r("div",R,m(s.operation.id.slice(0,8)),1)]),r("div",W,[n(t(v),{status:s.operation.status,"status-map":t(L)},null,8,["status","status-map"]),n(t(v),{status:s.operation.type,"status-map":t(V)},null,8,["status","status-map"])])])]),_:1}),n(t(F),{ref_key:"contextMenu",ref:a,visible:t(e),"onUpdate:visible":h[0]||(h[0]=g=>A(e)?e.value=g:null),title:s.operation.meta.title,subtitle:s.operation.id},{default:f(()=>[n(M),n(t(N),{title:"Cancel",icon:"mdi-cancel",color:"error",disabled:!t(d)||t(o),loading:t(o),onClick:u},null,8,["disabled","loading"])]),_:1},8,["visible","title","subtitle"])]))}}),G=y(X,[["__scopeId","data-v-ef13af79"]]),Z={class:"d-flex flex-column pl-4 pr-4 gr-4 pt-4 align-center sidebar-container"},q={key:0,class:"d-flex text-disabled text-subtitle-1",style:{"line-height":"1"}},H={key:1,class:"d-flex text-disabled text-subtitle-1",style:{"line-height":"1"}},J={class:"d-flex flex-column gr-4 operation-list-container"},K=_({__name:"OperationList",props:{projectId:{}},async setup(l){let e,o;const a=([e,o]=P(()=>w.async(l.projectId)),e=await e,o(),e),d=async()=>{await a.launchOperation({projectId:l.projectId,meta:{title:`Auto Update ${a.instancesToAutoUpdate.length} instance(s)`,description:"The operation was started by clicking the auto update button in the operation panel."},type:"update",instanceIds:a.instancesToAutoUpdate.map(p=>p.id)})};return(p,u)=>(i(),c("div",Z,[n(T,{"prepend-icon":"mdi-auto-fix",color:"primary",size:"large",width:"360px",disabled:t(a).instancesToAutoUpdate.length===0,title:"Ебанёт?",onClick:d},{default:f(()=>[r("div",null,[u[0]||(u[0]=r("div",{class:"d-flex",style:{"line-height":"1"}},"auto update",-1)),t(a).instancesToAutoUpdate.length>0?(i(),c("div",q,m(t(a).instancesToAutoUpdate.length)+" component(s) ",1)):(i(),c("div",H," nothing to update "))])]),_:1},8,["disabled"]),r("div",J,[(i(!0),c(U,null,B(t(a).operations,s=>(i(),b(G,{key:s.id,operation:s,"operations-store":t(a)},null,8,["operation","operations-store"]))),128))])]))}}),Q=y(K,[["__scopeId","data-v-35c1dff8"]]),Y={key:1,class:"mt-4 text-center text-uppercase text-disabled"},dt=_({__name:"operations",props:{params:{}},setup(l){const e=C();return(o,a)=>t(e).focusedProjectId?(i(),b(t(k),{key:t(e).focusedProjectId,"project-id":t(e).focusedProjectId},{default:f(()=>[n(t(Q),{"project-id":t(e).focusedProjectId},null,8,["project-id"])]),_:1},8,["project-id"])):(i(),c("div",Y,"No active project"))}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as _,s as z}from"#entry";import"./DkPrE8g-.js";import{S as N}from"./DqcsB7RK.js";import{b as P,S as H}from"./ByQEjDj-.js";import{u as E}from"./BQy0v27R.js";import{_ as R}from"./Dj-ZGW1B.js";import{_ as W}from"./D-IcYK3n.js";import{F as V,aO as U,av as M,r as h,w as q,Z as w,W as b,a1 as l,aw as x,X as a,ay as S,_ as j,G as t,aB as $,a2 as v,a3 as T,aC as A,aD as I,ai as C,aE as L,a0 as G,aF as O,$ as B,aL as D,L as X,b as F,a9 as Z}from"./CJ9AjueP.js";import{_ as J,c as K}from"./
|
|
1
|
+
import{q as _,s as z}from"#entry";import"./DkPrE8g-.js";import{S as N}from"./DqcsB7RK.js";import{b as P,S as H}from"./ByQEjDj-.js";import{u as E}from"./BQy0v27R.js";import{_ as R}from"./Dj-ZGW1B.js";import{_ as W}from"./D-IcYK3n.js";import{F as V,aO as U,av as M,r as h,w as q,Z as w,W as b,a1 as l,aw as x,X as a,ay as S,_ as j,G as t,aB as $,a2 as v,a3 as T,aC as A,aD as I,ai as C,aE as L,a0 as G,aF as O,$ as B,aL as D,L as X,b as F,a9 as Z}from"./CJ9AjueP.js";import{_ as J,c as K}from"./e4IUZygv.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./DnodTinn.js";import"./CFtPCidf.js";import"./CD9Hkzj8.js";const Q=V({__name:"CreateUnlockMethodDialog",props:{visible:{type:Boolean},visibleModifiers:{}},emits:U(["created"],["update:visible"]),setup(k,{emit:g}){const n=M(k,"visible"),s=g,{settingsStore:c}=_(),p=h(!1),u=h(!1),m=h(null),d=h(),e=h({type:"password",title:"",description:"",password:"",confirmPassword:""}),i=()=>{n.value=!1,d.value?.resetForm(),m.value=null},y=async()=>{if(p.value){u.value=!0,m.value=null;try{const o=await K(e.value);await c.addUnlockMethod(o),n.value=!1,d.value?.resetForm(),m.value=null,s("created")}catch(o){console.error("Failed to create unlock method:",o),m.value="Some error occurred"}finally{u.value=!1}}};return q(n,o=>{o||(d.value?.resetForm(),m.value=null)}),(o,r)=>(b(),w(x,{modelValue:n.value,"onUpdate:modelValue":r[2]||(r[2]=f=>n.value=f),"max-width":"600px"},{default:l(()=>[a(L,{title:"Create Unlock Method"},{default:l(()=>[a(S,null,{default:l(()=>[a(J,{ref_key:"unlockMethodForm",ref:d,"onUpdate:valid":r[0]||(r[0]=f=>p.value=f),"onUpdate:form":r[1]||(r[1]=f=>e.value=f)},null,512),t(m)?(b(),w($,{key:0,type:"error",density:"compact",class:"mb-4"},{default:l(()=>[v(T(t(m)),1)]),_:1})):j("",!0)]),_:1}),a(A,null,{default:l(()=>[a(I),a(C,{disabled:t(u),onClick:i},{default:l(()=>r[3]||(r[3]=[v("Cancel")])),_:1,__:[3]},8,["disabled"]),a(C,{color:"primary",disabled:!t(p),loading:t(u),onClick:y},{default:l(()=>r[4]||(r[4]=[v(" Create ")])),_:1,__:[4]},8,["disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Y={class:"mb-3"},ee=V({__name:"DeleteUnlockMethodDialog",props:U({unlockMethod:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:U(["confirm"],["update:visible"]),setup(k,{emit:g}){const n=M(k,"visible"),s=k,c=g,p=h(!1),u=()=>{s.unlockMethod&&c("confirm",s.unlockMethod)},m=()=>{n.value=!1};return(d,e)=>(b(),w(x,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=i=>n.value=i),"max-width":"500px"},{default:l(()=>[d.unlockMethod?(b(),w(L,{key:0},{default:l(()=>[a(O,{class:"d-flex align-center"},{default:l(()=>[a(G,{class:"mr-2 text-error"},{default:l(()=>e[1]||(e[1]=[v("mdi-alert-circle-outline")])),_:1,__:[1]}),e[2]||(e[2]=v(" Delete Unlock Method "))]),_:1,__:[2]}),a(S,null,{default:l(()=>[B("p",Y,[e[3]||(e[3]=v(" Are you sure you want to delete the unlock method ")),B("strong",null,'"'+T(d.unlockMethod.meta.title)+'"',1),e[4]||(e[4]=v(" ? "))]),a($,{type:"warning",density:"compact"},{default:l(()=>e[5]||(e[5]=[B("strong",null,"Warning:",-1),v(" Deleting this unlock method will permanently remove your ability to unlock the project using this method. Make sure you have at least one other unlock method configured before proceeding. ")])),_:1,__:[5]})]),_:1}),a(A,null,{default:l(()=>[a(I),a(C,{disabled:t(p),onClick:m},{default:l(()=>e[6]||(e[6]=[v("Cancel")])),_:1,__:[6]},8,["disabled"]),a(C,{color:"error",loading:t(p),onClick:u},{default:l(()=>e[7]||(e[7]=[v("Delete")])),_:1,__:[7]},8,["loading"])]),_:1})]),_:1})):j("",!0)]),_:1},8,["modelValue"]))}}),te={class:"d-flex align-center gap-1"},oe=V({__name:"UnlockMethodsTable",props:U({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:U(["delete"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(k,{emit:g}){const n=g,s=M(k,"search"),c=M(k,"sortBy"),p=M(k,"page"),u=M(k,"itemsPerPage"),m=[{key:"type",title:"Type"},P.name,P.id,P.createdAt,P.actions];return(d,e)=>(b(),w(t(H),{search:s.value,"onUpdate:search":e[0]||(e[0]=i=>s.value=i),"sort-by":c.value,"onUpdate:sortBy":e[1]||(e[1]=i=>c.value=i),page:p.value,"onUpdate:page":e[2]||(e[2]=i=>p.value=i),"items-per-page":u.value,"onUpdate:itemsPerPage":e[3]||(e[3]=i=>u.value=i),headers:m,data:d.data,loading:d.loading,"hide-header":d.hideHeader,height:d.height},{"item.type":l(({item:i})=>[a(t(R),{status:i.type,"status-map":t(E)},null,8,["status","status-map"])]),"item.actions":l(({item:i})=>[B("div",te,[a(t(W),{"page-name":"settings.unlock-method-details","page-params":{projectId:d.projectId,unlockMethodId:i.id}},null,8,["page-params"]),a(C,{variant:"text",icon:"mdi-delete",size:"small",color:"error",onClick:y=>n("delete",i)},null,8,["onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}}),ke=V({__name:"index",async setup(k){let g,n;const{settingsStore:s}=_(),{projectStore:c}=_();c.initializing?([g,n]=D(()=>z(()=>c.initialized).toBe(!0)),await g,n(),c.addLibraryRoot()):([g,n]=D(()=>c.initialize1()),await g,n(),[g,n]=D(()=>c.initialize2()),await g,n()),s.unlockMethods.load();const p=h(!1),u=h(!1),m=h(null),d=h(!1),e=y=>{m.value=y,u.value=!0},i=async y=>{d.value=!0;try{await s.removeUnlockMethod(y.id),u.value=!1,m.value=null}catch(o){console.error("Failed to delete unlock method:",o)}finally{d.value=!1}};return(y,o)=>(b(),X(Z,null,[a(t(N),{title:"Unlock Methods",icon:"mdi-lock-open-outline",description:"Manage the methods used to unlock and access this project's encrypted data."},{actions:l(()=>[a(C,{color:"primary","prepend-icon":"mdi-plus",onClick:o[0]||(o[0]=r=>p.value=!0)},{default:l(()=>o[7]||(o[7]=[v(" Add Unlock Method ")])),_:1,__:[7]})]),default:l(({height:r})=>[a(t(oe),{search:t(s).unlockMethods.search,"onUpdate:search":o[1]||(o[1]=f=>t(s).unlockMethods.search=f),"sort-by":t(s).unlockMethods.sortBy,"onUpdate:sortBy":o[2]||(o[2]=f=>t(s).unlockMethods.sortBy=f),page:t(s).unlockMethods.page,"onUpdate:page":o[3]||(o[3]=f=>t(s).unlockMethods.page=f),"items-per-page":t(s).unlockMethods.itemsPerPage,"onUpdate:itemsPerPage":o[4]||(o[4]=f=>t(s).unlockMethods.itemsPerPage=f),"project-id":t(c).projectId,data:t(s).unlockMethods.data,loading:t(s).unlockMethods.isLoading,height:r,onDelete:e},null,8,["search","sort-by","page","items-per-page","project-id","data","loading","height"])]),_:1}),a(t(Q),{visible:t(p),"onUpdate:visible":o[5]||(o[5]=r=>F(p)?p.value=r:null)},null,8,["visible"]),a(t(ee),{visible:t(u),"onUpdate:visible":o[6]||(o[6]=r=>F(u)?u.value=r:null),"unlock-method":t(m),onConfirm:i},null,8,["visible","unlock-method"])],64))}});export{ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as N,m as F,s as H,I as O,n as P}from"#entry";import"./DkPrE8g-.js";import{S as R}from"./DqcsB7RK.js";import{I as U}from"./
|
|
1
|
+
import{q as N,m as F,s as H,I as O,n as P}from"#entry";import"./DkPrE8g-.js";import{S as R}from"./DqcsB7RK.js";import{I as U}from"./CsCYo3-3.js";import{F as W,aL as x,r as $,j as S,Z as f,W as m,a1 as h,G as t,$ as s,X as g,a2 as q,a0 as j,a3 as y,b as A,az as E,_ as b,L as G,ac as M,aN as X,aa as Z}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./DnodTinn.js";import"./Dj-ZGW1B.js";import"./DbpD4JwV.js";const J={class:"d-flex align-center justify-space-between mb-4",style:{"flex-shrink":"0"}},K={class:"d-flex align-center"},Q={class:"text-subtitle-1 font-weight-medium"},Y={style:{flex:"1","min-height":"0","overflow-y":"auto"}},ee={class:"mr-2"},te=["onClick"],oe={class:"d-flex flex-column flex-grow-1 mr-4"},ne={key:0,class:"text-caption text-medium-emphasis"},he=W({__name:"index",async setup(ie){let c,l;const{projectStore:d,instancesStore:_,libraryStore:k,stateStore:I,validationStore:z,infoStore:r}=N();d.initializing?([c,l]=x(()=>H(()=>d.initialized).toBe(!0)),await c,l(),d.addLibraryRoot()):([c,l]=x(()=>d.initialize1()),await c,l(),[c,l]=x(()=>d.initialize2()),await c,l());const p=$(""),V=F(p,300),B=S(()=>{const o=[..._.instances.values()],n=V.value.toLowerCase().trim(),e=(n?o.filter(i=>i.id.includes(n)):o).map(i=>{const a=k.library.components[i.type];return{...i,meta:{title:a.meta.title,description:i.name,color:a.meta.color,icon:a.meta.icon??"iconamoon:component",iconColor:a.meta.iconColor,secondaryIcon:a.meta.secondaryIcon,secondaryIconColor:a.meta.secondaryIconColor}}}),u=e.filter(i=>!i.parentId),w=i=>i.map(a=>{const C=e.filter(L=>L.parentId===a.id);return{...a,children:C.length>0?w(C):void 0}});return w(u)}),T=S(()=>{if(!r.projectInfo)return[];const o=r.projectInfo;return[{id:o.id,meta:{title:o.meta.title||o.name,description:o.id,icon:o.meta.icon||"mdi-folder-outline",iconColor:o.meta.iconColor},children:B.value}]}),D=o=>{if(o.id===r.projectInfo?.id)return;const n=I.getInstanceState(o.id);n&&P({name:"settings.instance-details",params:{projectId:d.projectId,stateId:n.id}})};return(o,n)=>(m(),f(t(R),{title:"Instances",icon:"mdi-cube-outline",description:"View and manage instances created in this project."},{default:h(({height:v})=>[s("div",{class:"instances-tree",style:Z({height:v,display:"flex",flexDirection:"column"})},[s("div",J,[s("div",K,[g(j,{class:"mr-2"},{default:h(()=>n[1]||(n[1]=[q("mdi-format-list-bulleted")])),_:1,__:[1]}),s("span",Q,y(t(_).instances.size)+" instance"+y(t(_).instances.size===1?"":"s"),1)]),g(E,{modelValue:t(p),"onUpdate:modelValue":n[0]||(n[0]=e=>A(p)?p.value=e:null),"prepend-inner-icon":"mdi-magnify",placeholder:"Search instances...",variant:"outlined",density:"compact",clearable:"","hide-details":"",style:{"max-width":"300px"}},null,8,["modelValue"])]),s("div",Y,[g(X,{items:t(T),"item-title":"meta.title","item-value":"id","open-strategy":"multiple","select-strategy":"independent",density:"compact","indent-lines":"",opened:[t(r).projectInfo?.id]},{prepend:h(({item:e,isOpen:u})=>[s("div",ee,[e.id!==t(r).projectInfo?.id?(m(),f(t(U),{key:0,state:t(I).instanceStates.get(e.id),"expected-input-hash":t(I).inputHashOutputs.get(e.id)?.inputHash,"validation-output":t(z).validationOutputs.get(e.id)},null,8,["state","expected-input-hash","validation-output"])):(m(),f(j,{key:1,icon:u?"mdi-folder-open-outline":"mdi-folder-outline",size:"20",color:e.meta.iconColor},null,8,["icon","color"]))])]),title:h(({item:e})=>[s("div",{class:"d-flex align-center flex-grow-1",style:{cursor:"pointer"},onClick:u=>D(e)},[e.meta.icon&&e.id!==t(r).projectInfo?.id?(m(),f(t(O),{key:0,icon:e.meta.icon,color:e.meta.iconColor,width:"24",class:"mr-3"},null,8,["icon","color"])):b("",!0),s("div",oe,[s("div",{class:M(["font-weight-medium",e.id===t(r).projectInfo?.id?"text-h6":"text-body-1"])},y(e.meta.title||"Unnamed"),3),e.meta.description?(m(),G("div",ne,y(e.meta.description),1)):b("",!0)])],8,te)]),_:1},8,["items","opened"])])],4)]),_:1}))}});export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{am as pe,an as ye,ao as et,I as Ce,E as Ee,_ as Be}from"#entry";import{F as ae,r as Re,w as Ie,H as Te,L as F,W as D,a9 as vt,af as Pe,Z as Ae,_ as nt,G as k,$,X as H,a1 as Q,a_ as Ne,a3 as Mt,aD as Se,ai as _e,a0 as ve,a2 as Me,aE as be}from"./CJ9AjueP.js";const Le={"application/x-yaml":"devicon-plain:yaml"},qe={yaml:"devicon-plain:yaml",yml:"devicon-plain:yaml",zip:"devicon-plain:zip"};function De(e){const o=e.name.split(".").pop();return Le[e.contentType??""]??qe[o??""]??"mdi:file"}var j={},rt,bt;function Ue(){return bt||(bt=1,rt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),rt}var ot={},U={},Lt;function V(){if(Lt)return U;Lt=1;let e;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},U.getSymbolTotalCodewords=function(n){return o[n]},U.getBCHDigit=function(i){let n=0;for(;i!==0;)n++,i>>>=1;return n},U.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');e=n},U.isKanjiModeEnabled=function(){return typeof e<"u"},U.toSJIS=function(n){return e(n)},U}var it={},qt;function At(){return qt||(qt=1,function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+i)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,t){if(e.isValid(n))return n;try{return o(n)}catch{return t}}}(it)),it}var st,Dt;function Fe(){if(Dt)return st;Dt=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let n=0;n<i;n++)this.putBit((o>>>i-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},st=e,st}var at,Ut;function ke(){if(Ut)return at;Ut=1;function e(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return e.prototype.set=function(o,i,n,t){const r=o*this.size+i;this.data[r]=n,t&&(this.reservedBit[r]=!0)},e.prototype.get=function(o,i){return this.data[o*this.size+i]},e.prototype.xor=function(o,i,n){this.data[o*this.size+i]^=n},e.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},at=e,at}var ut={},Ft;function Ve(){return Ft||(Ft=1,function(e){const o=V().getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const t=Math.floor(n/7)+2,r=o(n),s=r===145?26:Math.ceil((r-13)/(2*t-2))*2,a=[r-7];for(let u=1;u<t-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},e.getPositions=function(n){const t=[],r=e.getRowColCoords(n),s=r.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||t.push([r[a],r[u]]);return t}}(ut)),ut}var ct={},kt;function ze(){if(kt)return ct;kt=1;const e=V().getSymbolSize,o=7;return ct.getPositions=function(n){const t=e(n);return[[0,0],[t-o,0],[0,t-o]]},ct}var lt={},Vt;function Oe(){return Vt||(Vt=1,function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const o={N1:3,N2:3,N3:40,N4:10};e.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const r=t.size;let s=0,a=0,u=0,c=null,d=null;for(let E=0;E<r;E++){a=u=0,c=d=null;for(let h=0;h<r;h++){let l=t.get(E,h);l===c?a++:(a>=5&&(s+=o.N1+(a-5)),c=l,a=1),l=t.get(h,E),l===d?u++:(u>=5&&(s+=o.N1+(u-5)),d=l,u=1)}a>=5&&(s+=o.N1+(a-5)),u>=5&&(s+=o.N1+(u-5))}return s},e.getPenaltyN2=function(t){const r=t.size;let s=0;for(let a=0;a<r-1;a++)for(let u=0;u<r-1;u++){const c=t.get(a,u)+t.get(a,u+1)+t.get(a+1,u)+t.get(a+1,u+1);(c===4||c===0)&&s++}return s*o.N2},e.getPenaltyN3=function(t){const r=t.size;let s=0,a=0,u=0;for(let c=0;c<r;c++){a=u=0;for(let d=0;d<r;d++)a=a<<1&2047|t.get(c,d),d>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|t.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*o.N3},e.getPenaltyN4=function(t){let r=0;const s=t.data.length;for(let u=0;u<s;u++)r+=t.data[u];return Math.abs(Math.ceil(r*100/s/5)-10)*o.N4};function i(n,t,r){switch(n){case e.Patterns.PATTERN000:return(t+r)%2===0;case e.Patterns.PATTERN001:return t%2===0;case e.Patterns.PATTERN010:return r%3===0;case e.Patterns.PATTERN011:return(t+r)%3===0;case e.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2===0;case e.Patterns.PATTERN101:return t*r%2+t*r%3===0;case e.Patterns.PATTERN110:return(t*r%2+t*r%3)%2===0;case e.Patterns.PATTERN111:return(t*r%3+(t+r)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}e.applyMask=function(t,r){const s=r.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)r.isReserved(u,a)||r.xor(u,a,i(t,u,a))},e.getBestMask=function(t,r){const s=Object.keys(e.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){r(c),e.applyMask(c,t);const d=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(c,t),d<u&&(u=d,a=c)}return a}}(lt)),lt}var G={},zt;function ue(){if(zt)return G;zt=1;const e=At(),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],i=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return G.getBlocksCount=function(t,r){switch(r){case e.L:return o[(t-1)*4+0];case e.M:return o[(t-1)*4+1];case e.Q:return o[(t-1)*4+2];case e.H:return o[(t-1)*4+3];default:return}},G.getTotalCodewordsCount=function(t,r){switch(r){case e.L:return i[(t-1)*4+0];case e.M:return i[(t-1)*4+1];case e.Q:return i[(t-1)*4+2];case e.H:return i[(t-1)*4+3];default:return}},G}var ft={},J={},Ot;function He(){if(Ot)return J;Ot=1;const e=new Uint8Array(512),o=new Uint8Array(256);return function(){let n=1;for(let t=0;t<255;t++)e[t]=n,o[n]=t,n<<=1,n&256&&(n^=285);for(let t=255;t<512;t++)e[t]=e[t-255]}(),J.log=function(n){if(n<1)throw new Error("log("+n+")");return o[n]},J.exp=function(n){return e[n]},J.mul=function(n,t){return n===0||t===0?0:e[o[n]+o[t]]},J}var Ht;function je(){return Ht||(Ht=1,function(e){const o=He();e.mul=function(n,t){const r=new Uint8Array(n.length+t.length-1);for(let s=0;s<n.length;s++)for(let a=0;a<t.length;a++)r[s+a]^=o.mul(n[s],t[a]);return r},e.mod=function(n,t){let r=new Uint8Array(n);for(;r.length-t.length>=0;){const s=r[0];for(let u=0;u<t.length;u++)r[u]^=o.mul(t[u],s);let a=0;for(;a<r.length&&r[a]===0;)a++;r=r.slice(a)}return r},e.generateECPolynomial=function(n){let t=new Uint8Array([1]);for(let r=0;r<n;r++)t=e.mul(t,new Uint8Array([1,o.exp(r)]));return t}}(ft)),ft}var dt,jt;function Ke(){if(jt)return dt;jt=1;const e=je();function o(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}return o.prototype.initialize=function(n){this.degree=n,this.genPoly=e.generateECPolynomial(this.degree)},o.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(n.length+this.degree);t.set(n);const r=e.mod(t,this.genPoly),s=this.degree-r.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(r,s),a}return r},dt=o,dt}var gt={},ht={},mt={},Kt;function ce(){return Kt||(Kt=1,mt.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),mt}var M={},Jt;function le(){if(Jt)return M;Jt=1;const e="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
|
|
2
2
|
]))+`;M.KANJI=new RegExp(i,"g"),M.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),M.BYTE=new RegExp(n,"g"),M.NUMERIC=new RegExp(e,"g"),M.ALPHANUMERIC=new RegExp(o,"g");const t=new RegExp("^"+i+"$"),r=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return M.testKanji=function(u){return t.test(u)},M.testNumeric=function(u){return r.test(u)},M.testAlphanumeric=function(u){return s.test(u)},M}var Yt;function z(){return Yt||(Yt=1,function(e){const o=ce(),i=le();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(r,s){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!o.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?r.ccBits[0]:s<27?r.ccBits[1]:r.ccBits[2]},e.getBestModeForData=function(r){return i.testNumeric(r)?e.NUMERIC:i.testAlphanumeric(r)?e.ALPHANUMERIC:i.testKanji(r)?e.KANJI:e.BYTE},e.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},e.isValid=function(r){return r&&r.bit&&r.ccBits};function n(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}e.from=function(r,s){if(e.isValid(r))return r;try{return n(r)}catch{return s}}}(ht)),ht}var $t;function Je(){return $t||($t=1,function(e){const o=V(),i=ue(),n=At(),t=z(),r=ce(),s=7973,a=o.getBCHDigit(s);function u(h,l,A){for(let N=1;N<=40;N++)if(l<=e.getCapacity(N,A,h))return N}function c(h,l){return t.getCharCountIndicator(h,l)+4}function d(h,l){let A=0;return h.forEach(function(N){const _=c(N.mode,l);A+=_+N.getBitsLength()}),A}function E(h,l){for(let A=1;A<=40;A++)if(d(h,A)<=e.getCapacity(A,l,t.MIXED))return A}e.from=function(l,A){return r.isValid(l)?parseInt(l,10):A},e.getCapacity=function(l,A,N){if(!r.isValid(l))throw new Error("Invalid QR Code version");typeof N>"u"&&(N=t.BYTE);const _=o.getSymbolTotalCodewords(l),I=i.getTotalCodewordsCount(l,A),S=(_-I)*8;if(N===t.MIXED)return S;const T=S-c(N,l);switch(N){case t.NUMERIC:return Math.floor(T/10*3);case t.ALPHANUMERIC:return Math.floor(T/11*2);case t.KANJI:return Math.floor(T/13);case t.BYTE:default:return Math.floor(T/8)}},e.getBestVersionForData=function(l,A){let N;const _=n.from(A,n.M);if(Array.isArray(l)){if(l.length>1)return E(l,_);if(l.length===0)return 1;N=l[0]}else N=l;return u(N.mode,N.getLength(),_)},e.getEncodedBits=function(l){if(!r.isValid(l)||l<7)throw new Error("Invalid QR Code version");let A=l<<12;for(;o.getBCHDigit(A)-a>=0;)A^=s<<o.getBCHDigit(A)-a;return l<<12|A}}(gt)),gt}var wt={},Qt;function Ye(){if(Qt)return wt;Qt=1;const e=V(),o=1335,i=21522,n=e.getBCHDigit(o);return wt.getEncodedBits=function(r,s){const a=r.bit<<3|s;let u=a<<10;for(;e.getBCHDigit(u)-n>=0;)u^=o<<e.getBCHDigit(u)-n;return(a<<10|u)^i},wt}var pt={},yt,Gt;function $e(){if(Gt)return yt;Gt=1;const e=z();function o(i){this.mode=e.NUMERIC,this.data=i.toString()}return o.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(n){let t,r,s;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),s=parseInt(r,10),n.put(s,10);const a=this.data.length-t;a>0&&(r=this.data.substr(t),s=parseInt(r,10),n.put(s,a*3+1))},yt=o,yt}var Ct,xt;function Qe(){if(xt)return Ct;xt=1;const e=z(),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(n){this.mode=e.ALPHANUMERIC,this.data=n}return i.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let s=o.indexOf(this.data[r])*45;s+=o.indexOf(this.data[r+1]),t.put(s,11)}this.data.length%2&&t.put(o.indexOf(this.data[r]),6)},Ct=i,Ct}var Et,Wt;function Ge(){if(Wt)return Et;Wt=1;const e=z();function o(i){this.mode=e.BYTE,typeof i=="string"?this.data=new TextEncoder().encode(i):this.data=new Uint8Array(i)}return o.getBitsLength=function(n){return n*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(i){for(let n=0,t=this.data.length;n<t;n++)i.put(this.data[n],8)},Et=o,Et}var Bt,Xt;function xe(){if(Xt)return Bt;Xt=1;const e=z(),o=V();function i(n){this.mode=e.KANJI,this.data=n}return i.getBitsLength=function(t){return t*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(n){let t;for(t=0;t<this.data.length;t++){let r=o.toSJIS(this.data[t]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
3
3
|
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),n.put(r,13)}},Bt=i,Bt}var Rt={exports:{}},Zt;function We(){return Zt||(Zt=1,function(e){var o={single_source_shortest_paths:function(i,n,t){var r={},s={};s[n]=0;var a=o.PriorityQueue.make();a.push(n,0);for(var u,c,d,E,h,l,A,N,_;!a.empty();){u=a.pop(),c=u.value,E=u.cost,h=i[c]||{};for(d in h)h.hasOwnProperty(d)&&(l=h[d],A=E+l,N=s[d],_=typeof s[d]>"u",(_||N>A)&&(s[d]=A,a.push(d,A),r[d]=c))}if(typeof t<"u"&&typeof s[t]>"u"){var I=["Could not find a path from ",n," to ",t,"."].join("");throw new Error(I)}return r},extract_shortest_path_from_predecessor_list:function(i,n){for(var t=[],r=n;r;)t.push(r),i[r],r=i[r];return t.reverse(),t},find_path:function(i,n,t){var r=o.single_source_shortest_paths(i,n,t);return o.extract_shortest_path_from_predecessor_list(r,t)},PriorityQueue:{make:function(i){var n=o.PriorityQueue,t={},r;i=i||{};for(r in n)n.hasOwnProperty(r)&&(t[r]=n[r]);return t.queue=[],t.sorter=i.sorter||n.default_sorter,t},default_sorter:function(i,n){return i.cost-n.cost},push:function(i,n){var t={value:i,cost:n};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=o}(Rt)),Rt.exports}var te;function Xe(){return te||(te=1,function(e){const o=z(),i=$e(),n=Qe(),t=Ge(),r=xe(),s=le(),a=V(),u=We();function c(I){return unescape(encodeURIComponent(I)).length}function d(I,S,T){const B=[];let v;for(;(v=I.exec(T))!==null;)B.push({data:v[0],index:v.index,mode:S,length:v[0].length});return B}function E(I){const S=d(s.NUMERIC,o.NUMERIC,I),T=d(s.ALPHANUMERIC,o.ALPHANUMERIC,I);let B,v;return a.isKanjiModeEnabled()?(B=d(s.BYTE,o.BYTE,I),v=d(s.KANJI,o.KANJI,I)):(B=d(s.BYTE_KANJI,o.BYTE,I),v=[]),S.concat(T,B,v).sort(function(y,p){return y.index-p.index}).map(function(y){return{data:y.data,mode:y.mode,length:y.length}})}function h(I,S){switch(S){case o.NUMERIC:return i.getBitsLength(I);case o.ALPHANUMERIC:return n.getBitsLength(I);case o.KANJI:return r.getBitsLength(I);case o.BYTE:return t.getBitsLength(I)}}function l(I){return I.reduce(function(S,T){const B=S.length-1>=0?S[S.length-1]:null;return B&&B.mode===T.mode?(S[S.length-1].data+=T.data,S):(S.push(T),S)},[])}function A(I){const S=[];for(let T=0;T<I.length;T++){const B=I[T];switch(B.mode){case o.NUMERIC:S.push([B,{data:B.data,mode:o.ALPHANUMERIC,length:B.length},{data:B.data,mode:o.BYTE,length:B.length}]);break;case o.ALPHANUMERIC:S.push([B,{data:B.data,mode:o.BYTE,length:B.length}]);break;case o.KANJI:S.push([B,{data:B.data,mode:o.BYTE,length:c(B.data)}]);break;case o.BYTE:S.push([{data:B.data,mode:o.BYTE,length:c(B.data)}])}}return S}function N(I,S){const T={},B={start:{}};let v=["start"];for(let g=0;g<I.length;g++){const y=I[g],p=[];for(let f=0;f<y.length;f++){const R=y[f],m=""+g+f;p.push(m),T[m]={node:R,lastCount:0},B[m]={};for(let C=0;C<v.length;C++){const w=v[C];T[w]&&T[w].node.mode===R.mode?(B[w][m]=h(T[w].lastCount+R.length,R.mode)-h(T[w].lastCount,R.mode),T[w].lastCount+=R.length):(T[w]&&(T[w].lastCount=R.length),B[w][m]=h(R.length,R.mode)+4+o.getCharCountIndicator(R.mode,S))}}v=p}for(let g=0;g<v.length;g++)B[v[g]].end=0;return{map:B,table:T}}function _(I,S){let T;const B=o.getBestModeForData(I);if(T=o.from(S,B),T!==o.BYTE&&T.bit<B.bit)throw new Error('"'+I+'" cannot be encoded with mode '+o.toString(T)+`.
|
|
4
4
|
Suggested mode is: `+o.toString(B));switch(T===o.KANJI&&!a.isKanjiModeEnabled()&&(T=o.BYTE),T){case o.NUMERIC:return new i(I);case o.ALPHANUMERIC:return new n(I);case o.KANJI:return new r(I);case o.BYTE:return new t(I)}}e.fromArray=function(S){return S.reduce(function(T,B){return typeof B=="string"?T.push(_(B,null)):B.data&&T.push(_(B.data,B.mode)),T},[])},e.fromString=function(S,T){const B=E(S,a.isKanjiModeEnabled()),v=A(B),g=N(v,T),y=u.find_path(g.map,"start","end"),p=[];for(let f=1;f<y.length-1;f++)p.push(g.table[y[f]].node);return e.fromArray(l(p))},e.rawSplit=function(S){return e.fromArray(E(S,a.isKanjiModeEnabled()))}}(pt)),pt}var ee;function Ze(){if(ee)return ot;ee=1;const e=V(),o=At(),i=Fe(),n=ke(),t=Ve(),r=ze(),s=Oe(),a=ue(),u=Ke(),c=Je(),d=Ye(),E=z(),h=Xe();function l(g,y){const p=g.size,f=r.getPositions(y);for(let R=0;R<f.length;R++){const m=f[R][0],C=f[R][1];for(let w=-1;w<=7;w++)if(!(m+w<=-1||p<=m+w))for(let P=-1;P<=7;P++)C+P<=-1||p<=C+P||(w>=0&&w<=6&&(P===0||P===6)||P>=0&&P<=6&&(w===0||w===6)||w>=2&&w<=4&&P>=2&&P<=4?g.set(m+w,C+P,!0,!0):g.set(m+w,C+P,!1,!0))}}function A(g){const y=g.size;for(let p=8;p<y-8;p++){const f=p%2===0;g.set(p,6,f,!0),g.set(6,p,f,!0)}}function N(g,y){const p=t.getPositions(y);for(let f=0;f<p.length;f++){const R=p[f][0],m=p[f][1];for(let C=-2;C<=2;C++)for(let w=-2;w<=2;w++)C===-2||C===2||w===-2||w===2||C===0&&w===0?g.set(R+C,m+w,!0,!0):g.set(R+C,m+w,!1,!0)}}function _(g,y){const p=g.size,f=c.getEncodedBits(y);let R,m,C;for(let w=0;w<18;w++)R=Math.floor(w/3),m=w%3+p-8-3,C=(f>>w&1)===1,g.set(R,m,C,!0),g.set(m,R,C,!0)}function I(g,y,p){const f=g.size,R=d.getEncodedBits(y,p);let m,C;for(m=0;m<15;m++)C=(R>>m&1)===1,m<6?g.set(m,8,C,!0):m<8?g.set(m+1,8,C,!0):g.set(f-15+m,8,C,!0),m<8?g.set(8,f-m-1,C,!0):m<9?g.set(8,15-m-1+1,C,!0):g.set(8,15-m-1,C,!0);g.set(f-8,8,1,!0)}function S(g,y){const p=g.size;let f=-1,R=p-1,m=7,C=0;for(let w=p-1;w>0;w-=2)for(w===6&&w--;;){for(let P=0;P<2;P++)if(!g.isReserved(R,w-P)){let q=!1;C<y.length&&(q=(y[C]>>>m&1)===1),g.set(R,w-P,q),m--,m===-1&&(C++,m=7)}if(R+=f,R<0||p<=R){R-=f,f=-f;break}}}function T(g,y,p){const f=new i;p.forEach(function(P){f.put(P.mode.bit,4),f.put(P.getLength(),E.getCharCountIndicator(P.mode,g)),P.write(f)});const R=e.getSymbolTotalCodewords(g),m=a.getTotalCodewordsCount(g,y),C=(R-m)*8;for(f.getLengthInBits()+4<=C&&f.put(0,4);f.getLengthInBits()%8!==0;)f.putBit(0);const w=(C-f.getLengthInBits())/8;for(let P=0;P<w;P++)f.put(P%2?17:236,8);return B(f,g,y)}function B(g,y,p){const f=e.getSymbolTotalCodewords(y),R=a.getTotalCodewordsCount(y,p),m=f-R,C=a.getBlocksCount(y,p),w=f%C,P=C-w,q=Math.floor(f/C),K=Math.floor(m/C),he=K+1,Nt=q-K,me=new u(Nt);let W=0;const Y=new Array(C),St=new Array(C);let X=0;const we=new Uint8Array(g.buffer);for(let O=0;O<C;O++){const tt=O<P?K:he;Y[O]=we.slice(W,W+tt),St[O]=me.encode(Y[O]),W+=tt,X=Math.max(X,tt)}const Z=new Uint8Array(f);let _t=0,b,L;for(b=0;b<X;b++)for(L=0;L<C;L++)b<Y[L].length&&(Z[_t++]=Y[L][b]);for(b=0;b<Nt;b++)for(L=0;L<C;L++)Z[_t++]=St[L][b];return Z}function v(g,y,p,f){let R;if(Array.isArray(g))R=h.fromArray(g);else if(typeof g=="string"){let q=y;if(!q){const K=h.rawSplit(g);q=c.getBestVersionForData(K,p)}R=h.fromString(g,q||40)}else throw new Error("Invalid data");const m=c.getBestVersionForData(R,p);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(!y)y=m;else if(y<m)throw new Error(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aV as P}from"#entry";import{F,H as y,C as S,j as m,O as H,w as g,r as j,J as I,n as N}from"./CJ9AjueP.js";var T=Object.defineProperty,W=Object.defineProperties,z=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,B=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={}))A.call(t,a)&&b(e,a,t[a]);if(V)for(var a of V(t))B.call(t,a)&&b(e,a,t[a]);return e},J=(e,t)=>W(e,z(t));const _={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}};function q(e,t){const a=m(()=>{const{width:r,height:i}=e;return J(h({},_.wrapper),{width:r,height:i})}),l=m(()=>h(h({},_.fullWidth),!t.value&&_.hide));return{wrapperStyle:a,containerStyle:l}}function G(){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 K(e,l)||Q(e,t,a,l)}function K(e,t){return e.editor.getModel(k(e,t))}function Q(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 X=Object.defineProperty,E=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,C=(e,t,a)=>t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,R=(e,t)=>{for(var a in t||(t={}))Y.call(t,a)&&C(e,a,t[a]);if(E)for(var a of E(t))Z.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}=G(),{editorRef:n}=te(t,e,r,l),{disposeValidator:v}=ae(t,e,r,n),s=m(()=>!!r.value&&!!n.value),{wrapperStyle:d,containerStyle:O}=q(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,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ap as x,aq as C,ar as O,q as _,_ as $}from"#entry";import"./BmhnSWN5.js";import{_ as y}from"./DnodTinn.js";import{G as T}from"./DbpD4JwV.js";import{F as V,u as j,O as B,Z as g,W as m,G as s,j as h,r as w,w as L,a$ as E,b as I,a1 as d,X as p,b0 as N,b1 as P,b2 as R,_ as W,b3 as q,$ as v,aa as b,ac as k,a3 as S,aP as z,a8 as H,L as U}from"./CJ9AjueP.js";const G={error:"alert-circle-outline",healthy:"heart",degraded:"heart-flash",down:"heart-broken",warning:"alert-octagon-outline",progressing:"progress-clock"},K={error:"error",degraded:"warning",down:"error",healthy:"success",warning:"warning",progressing:"warning"},D={cancelled:"close-circle-outline",destroyed:"trash-can-outline",refreshed:"check-circle-outline",updated:"check-circle-outline",skipped:"skip-next-circle-outline",failed:"alert-circle-outline",cancelling:"stop-circle-outline",pending:"clock-outline",destroying:"trash-can-outline",processing_triggers:"flash",previewing:"eye-outline",previewed:"eye-outline",refreshing:"refresh",updating:"sync"},M={updated:"success",cancelled:"warning",destroyed:"success",refreshed:"success",skipped:"",failed:"error",cancelling:"warning",pending:"",destroying:"error",processing_triggers:"primary",previewing:"secondary",previewed:"success",refreshing:"info",updating:"primary"},A={undeployed:"circle-outline",attempted:"clock-outline",deployed:"check-circle-outline",failed:"alert-circle-outline"},F={undeployed:"",attempted:"warning",deployed:"success",failed:"error"},X={error:"alert-circle-outline",evaluated:"check-circle-outline",evaluating:"cogs"},Z={error:"error",evaluated:"success",evaluating:"primary"};function J(e,r){return e.inputHash&&e.inputHash!==r?{name:"instance-state",title:"State",status:"changed",message:"The configuration of this instance or one of its dependencies has changed since the last operation.",icon:"not-equal-variant",color:"warning",important:!1,order:5}:{name:"instance-state",status:e.status,title:"State",message:`Instance is ${e.status}`,icon:A[e.status],color:F[e.status],order:5,important:!1}}function Q(){return{name:"instnace-state",status:"undeployed",title:"State",message:"Instance is not deployed",icon:"circle-outline",color:"",important:!1,order:5}}function Y(e,r){const t=e.lastOperationState;return{name:"operation",logs:!0,title:"Operation",status:t.status,icon:D[t.status],color:M[t.status],important:x(r?.status)||t.status==="failed"&&e.status!=="undeployed",order:10,progress:C(t.status)&&t.status!=="pending"&&t.currentResourceCount&&t.totalResourceCount?Math.round(t.currentResourceCount/t.totalResourceCount*100):void 0}}function ee(e){return{name:"evaluation",status:e.status,title:"Evaluation",message:e.message??"",icon:X[e.status],color:Z[e.status],important:e.status==="error",order:15}}function te(e){return e.status==="ok"?{name:"validation",status:"ok",title:"Validation",message:"Instance is valid",icon:"check-circle-outline",color:"success",important:!1,order:20}:{name:"validation",title:"Validation",status:"error",message:e.errorText,icon:"alert-circle-outline",color:"error",important:!0,order:20}}function ae(e){return{name:e.name,status:e.value,title:e.meta.title,message:e.message??"",icon:G[e.value]??"information-outline",customIcon:e.meta.icon,color:e.meta.iconColor??K[e.value]??"primary",important:e.value===O.Error,order:e.order??50}}function oe(e,r,t,i){const n=[];if(e&&e.status!=="undeployed"?n.push(J(e,t)):n.push(Q()),e?.lastOperationState&&n.push(Y(e,r)),e?.evaluationState&&n.push(ee(e.evaluationState)),i&&n.push(te(i)),e?.customStatuses)for(const u of e.customStatuses)n.push(ae(u));return n.sort((u,c)=>u.order-c.order)}const ne=V({__name:"InstanceStatusLogsTab",props:{operationState:{}},setup(e){const{projectStore:r}=_(),{$client:t}=j();let i=null;const n=c=>{const l=c.split(`
|
|
2
2
|
`);for(const o of l)i.writeln(o)};if(C(e.operationState.status)){const{unsubscribe:c}=t.logs.watchInstanceLogs.subscribe({stateId:e.operationState.stateId,operationId:e.operationState.operationId},{onData:l=>{i&&n(l.content)}});B(c)}const u=async c=>{i=c;const l=await t.logs.getInstanceLogs.query({projectId:r.projectId,stateId:e.operationState.stateId,operationId:e.operationState.operationId});for(const o of l)n(o.content)};return(c,l)=>(m(),g(s(T),{class:"mt-2 mb-2",columns:80,rows:24,onLoad:u}))}}),se={key:0,class:"d-flex align-center justify-center",style:{width:"100%",height:"100%"}},re={class:"d-flex flex-column"},ie=V({__name:"InstanceStatusBadge",props:{state:{},operation:{},expectedInputHash:{},validationOutput:{}},setup(e){const r=h(()=>oe(e.state,e.operation,e.expectedInputHash,e.validationOutput)),t=h(()=>r.value.find(o=>o.important)??r.value[0]),i=w(t.value.name),n=w(!1);L([t,e.state],()=>{n.value||(i.value=t.value.name)},{immediate:!0});const u=o=>o.startsWith("#")?{}:{[`text-${o}`]:!0},c=o=>o.startsWith("#")?{color:o}:{},l=h(()=>t.value.progress!==void 0&&t.value.progress<100);return(o,f)=>(m(),g(E,{modelValue:s(n),"onUpdate:modelValue":f[1]||(f[1]=a=>I(n)?n.value=a:null),"open-on-hover":"","close-on-content-click":!1,location:"end"},{activator:d(({props:a})=>[p(z,H(a,{color:s(t).color,style:[{width:"44px"},{padding:s(l)?"0":void 0}],class:"status-chip"}),{default:d(()=>[s(l)?(m(),U("div",se,S(s(t).progress)+"% ",1)):(m(),g(s(y),{key:1,size:20,icon:`mdi-${s(t).icon}`,"custom-icon":s(t).customIcon},null,8,["icon","custom-icon"]))]),_:2},1040,["color","style"])]),default:d(()=>[p(N,{color:"black"},{default:d(()=>[p(P,{modelValue:s(i),"onUpdate:modelValue":f[0]||(f[0]=a=>I(i)?i.value=a:null),items:s(r)},{tab:d(({item:a})=>[p(q,{value:a.name},{default:d(()=>[p(s(y),{size:22,icon:`mdi-${a.icon}`,"custom-icon":a.customIcon,color:a.color,class:"mr-2"},null,8,["icon","custom-icon","color"]),v("div",re,[v("div",{class:k(["font-weight-bold text-start",u(a.color)]),style:b(c(a.color))},S(a.title),7),v("div",{class:k(["text-caption font-weight-bold text-start",u(a.color)]),style:b(c(a.color))},S(a.status),7)])]),_:2},1032,["value"])]),item:d(({item:a})=>[p(R,{value:a.name},{default:d(()=>[a.logs?o.state?.lastOperationState?.operationId?(m(),g(ne,{key:o.state.lastOperationState.operationId,"instance-id":o.state.id,operationState:o.state.lastOperationState},null,8,["instance-id","operationState"])):W("",!0):(m(),g(s(T),{key:0,class:"mt-2 mb-2",columns:80,rows:24,content:a.message},null,8,["content"]))]),_:2},1032,["value"])]),_:1},8,["modelValue","items"])]),_:1})]),_:1},8,["modelValue"]))}}),me=$(ie,[["__scopeId","data-v-eb35995d"]]);export{me as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as c,t as b,s as C,_ as I}from"#entry";import{_ as g,I as A}from"./CFtPCidf.js";import{S as k}from"./DkPrE8g-.js";import{D as w,a as x}from"./DtufO5Sm.js";import{_ as V}from"./RJCesp1_.js";import{_ as B}from"./D12QiTSl.js";import{_ as D}from"./Q0n-WHNk.js";import{P as N}from"./
|
|
1
|
+
import{q as c,t as b,s as C,_ as I}from"#entry";import{_ as g,I as A}from"./CFtPCidf.js";import{S as k}from"./DkPrE8g-.js";import{D as w,a as x}from"./DtufO5Sm.js";import{_ as V}from"./RJCesp1_.js";import{_ as B}from"./D12QiTSl.js";import{_ as D}from"./Q0n-WHNk.js";import{P as N}from"./CiwR41uk.js";import{F as S,aL as m,Z as f,W as _,a1 as s,G as e,X as i,_ as U,$ as v,a3 as j,aM as L,aE as $,a2 as h,aF as z,ay as T}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./DnodTinn.js";import"./Dj-ZGW1B.js";import"./DpCgGkMV.js";import"./BOoETPDV.js";import"./ByQEjDj-.js";import"./D-IcYK3n.js";const E={class:"text-body-2"},F={class:"page-content-container"},M=S({__name:"[pageId]",props:{params:{}},async setup(p){let t,r;const{settingsStore:u}=c(),{projectStore:d}=c();d.initializing?([t,r]=m(()=>C(()=>d.initialized).toBe(!0)),await t,r(),d.addLibraryRoot()):([t,r]=m(()=>d.initialize1()),await t,r(),[t,r]=m(()=>d.initialize2()),await t,r());const a=([t,r]=m(()=>u.getPageDetails(p.params.pageId)),t=await t,r(),t);if(!a)throw b({statusCode:404,statusMessage:"Page not found"});const o=u.artifactsForPage(p.params.pageId);[t,r]=m(()=>o.load()),await t,r();const P=[{key:"pageId",label:"Page ID"},{key:"name",label:"Name"},{key:"serviceAccount",label:"Owner"},{key:"createdAt",label:"Created"},{key:"updatedAt",label:"Last Updated"}];return(y,n)=>(_(),f(e(w),null,{default:s(()=>[i(k,{meta:e(a).meta,"fallback-icon":"mdi-file-document-outline",title:e(a).meta.title||e(a).name||"Unnamed Page",description:e(a).meta.description},null,8,["meta","title","description"]),i(e(x),{title:"Page Details",items:P},{"item.pageId":s(()=>[i(e(A),{value:e(a).id},null,8,["value"])]),"item.name":s(()=>[v("div",E,j(e(a).name||"N/A"),1)]),"item.serviceAccount":s(()=>[i(e(B),{item:e(a)},null,8,["item"])]),"item.createdAt":s(()=>[i(e(g),{value:e(a).createdAt},null,8,["value"])]),"item.updatedAt":s(()=>[i(e(g),{value:e(a).updatedAt},null,8,["value"])]),_:1}),i(L,{elevation:0},{default:s(()=>[i(e(V),{title:"Artifacts",icon:"mdi-package-variant",count:e(o).data.value.total},{default:s(()=>[i(e(D),{search:e(o).search.value,"onUpdate:search":n[0]||(n[0]=l=>e(o).search.value=l),"sort-by":e(o).sortBy.value,"onUpdate:sortBy":n[1]||(n[1]=l=>e(o).sortBy.value=l),page:e(o).page.value,"onUpdate:page":n[2]||(n[2]=l=>e(o).page.value=l),"items-per-page":e(o).itemsPerPage.value,"onUpdate:itemsPerPage":n[3]||(n[3]=l=>e(o).itemsPerPage.value=l),"project-id":y.params.projectId,data:e(o).data.value,loading:e(o).isLoading.value,"hide-header":""},null,8,["search","sort-by","page","items-per-page","project-id","data","loading"])]),_:1},8,["count"])]),_:1}),e(a).content&&e(a).content.length>0?(_(),f($,{key:0,class:"content-card",color:"#2d2d2d","bg-color":"#1e1e1e"},{default:s(()=>[i(z,null,{default:s(()=>n[4]||(n[4]=[h("Page Content")])),_:1,__:[4]}),i(T,null,{default:s(()=>[v("div",F,[i(e(N),{content:e(a).content},null,8,["content"])])]),_:1})]),_:1})):U("",!0)]),_:1}))}}),se=I(M,[["__scopeId","data-v-a7e23b29"]]);export{se as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as j,aW as D,aX as E,aD as O,aY as H,aZ as W,z as A,A as G,B as q,s as X,_ as Y,k as Z}from"#entry";import"./BmhnSWN5.js";import{c as J,_ as K,a as Q,b as U}from"./kwA1-GVE.js";import{I as ee,a as te,G as ne}from"./AAMMtP7D.js";import{I as se}from"./CsCYo3-3.js";import{F as b,j as m,aW as oe,Z as g,W as y,G as e,a1 as v,X as S,u as ae,aL as h,J as ie,ak as z,al as V,_ as B,a8 as $,L as F,$ as N,a3 as re,aY as ce}from"./CJ9AjueP.js";import{_ as pe}from"./BDCIi1Fb.js";import{P as ue}from"./BpWWYZTV.js";import"./PZl7tHUC.js";import"./mzIiiUgI.js";import"./Cvl8iHT_.js";import"./CiwR41uk.js";import"./ClBsnNkh.js";import"./DnodTinn.js";import"./DbpD4JwV.js";import"./CD9Hkzj8.js";const de=b({__name:"CompositeInstanceInputNode",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:{},instance:{}},setup(s){const t=j(),{instancesStore:n,libraryStore:a,stateStore:u,validationStore:c,operationsStore:o}=t,p=m(()=>u.instanceLocks.get(s.instance.id)),f=m(()=>a.library.components[s.instance.type]),i=m(()=>u.getInstanceState(s.instance.id)),C=oe("contextMenu");return(l,d)=>(y(),g(e(ee),{instance:l.instance,component:e(f),entities:e(a).library.entities,state:e(i),editable:e(n).instances.has(l.instance.id),"input-resolver-outputs":e(n).inputResolverOutputs,"input-resolver-dependent-map":e(n).inputResolverDependentMap,"io-type":"inputs","io-mirror":!0,"hide-show-composite":!0,"onSave:args":d[0]||(d[0]=(I,w,_)=>e(n).updateInstance(I,w,_)),"onOperation:launch":d[1]||(d[1]=I=>e(o).launchInstanceOperation(I,l.data.instance)),"onOperation:cancel":d[2]||(d[2]=I=>e(o).cancelInstanceOperation(e(i).lastOperationState.operationId,l.data.instance.id)),onContextmenu:d[3]||(d[3]=I=>e(C)?.showContextMenu(I))},{status:v(()=>[S(e(se),{state:e(i),"expected-input-hash":e(u).inputHashOutputs.get(l.instance.id)?.inputHash,"validation-output":e(c).validationOutputs.get(l.instance.id)},null,8,["state","expected-input-hash","validation-output"])]),default:v(()=>[S(e(J),{ref_key:"contextMenu",ref:C,stores:e(t),instance:l.instance,component:e(f),state:e(i),editable:!1,locked:!!e(p)},null,8,["stores","instance","component","state","locked"])]),_:1},8,["instance","component","entities","state","editable","input-resolver-outputs","input-resolver-dependent-map"]))}}),le=b({__name:"CompositeInstanceOutputNode",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:{},instance:{}},setup(s){const{libraryStore:t}=j(),n=m(()=>t.library.components[s.instance.type]);return(a,u)=>(y(),g(e(pe),{component:e(n),subtitle:"Outputs",style:{overflow:"visible"}},{default:v(()=>[S(e(te),{instance:a.instance,component:e(n),entities:e(t).library.entities,type:"outputs",mirror:!0},null,8,["instance","component","entities"])]),_:1},8,["component"]))}}),M=D({name:"instance",getStoreId:(s,t,n)=>`projects/${s}/composites/${t}/${n}`,create:({storeId:s,id:[t,n,a],logger:u})=>E(s,()=>{const{vueFlowStore:c,nodeFactory:o,onNodesMoved:p}=O("instance",t,n,a),{$client:f}=ae(),{instancesStore:i,stateStore:C}=H(t),l=m(()=>C.stateIdToStateMap.get(n)),d=m(()=>{const r=l.value;return r?i.instances.get(r.instanceId):void 0}),I=async()=>{u.info({projectId:t},"initializing composite instance store");const r=await f.workspace.getCompositeViewport.query({projectId:t,stateId:n});r&&(c.defaultViewport.value=r),u.info({projectId:t,stateId:n},"composite instance store initialized")},w=()=>{const r=d.value;if(!r)throw new Error(`Virtual instance not found for state: ${n}`);const x=o.createNodeFromInstance(r,{type:"inputs"}),R=i.getInstanceChildren(r.id);if(o.createNodesForModels(R,[],{readonly:!0}),r.outputs&&Object.keys(r.outputs).length>0){o.createNodeFromInstance(r,{id:"outputs",type:"outputs",readonly:!0}),o.instanceIdToNodeIdMap.set(r.id,x.id);for(const[L,T]of Object.entries(r.outputs))for(const k of T){const P=i.instances.get(k.instanceId);P&&o.createEdgeForInstanceOutput(P,L,k)}}A(c).then(()=>G(c)).then(()=>c.fitView()).then(()=>q(c,p))},_=W(async r=>{await f.workspace.setCompositeViewport.mutate({projectId:t,stateId:n,viewport:r})},1e3);return c.onViewportChange(_),{initialize:I,placeNodes:w,stateId:n,instanceState:l,instance:d,version:a}})}),me=b({__name:"CompositeInstanceCanvas",async setup(s){let t,n;const{projectStore:a,instancesStore:u,libraryStore:c}=j(),o=M();return a.initializing?([t,n]=h(()=>X(()=>a.initialized).toBe(!0)),await t,n(),a.addLibraryRoot()):([t,n]=h(()=>a.initialize1()),await t,n(),[t,n]=h(()=>a.initialize2()),await t,n()),[t,n]=h(()=>o.initialize()),await t,n(),ie(o.placeNodes),(p,f)=>(y(),g(e(ne),{canvasId:["instance",e(a).projectId,e(o).stateId,e(o).version],components:e(c).library.components,entities:e(c).library.entities,"input-resolver-outputs":e(u).inputResolverOutputs,editable:""},{"node-instance":v(i=>[S(e(U),z(V(i)),null,16)]),"node-inputs":v(i=>[e(o).instance?(y(),g(de,$({key:0},i,{instance:e(o).instance}),null,16,["instance"])):B("",!0)]),"node-outputs":v(i=>[e(o).instance?(y(),g(le,$({key:0},i,{instance:e(o).instance,type:"outputs"}),null,16,["instance"])):B("",!0)]),"node-hub":v(i=>[S(e(Q),z(V(i)),null,16)]),"panel-bottom-left":v(()=>[S(e(K))]),_:1},8,["canvasId","components","entities","input-resolver-outputs"]))}}),ye=Y(me,[["__scopeId","data-v-2e3534bb"]]),fe=b({__name:"CompositeInstanceWrapper",props:{projectId:{},stateId:{},version:{}},setup(s){return O.ensureCreated("instance",s.projectId,s.stateId,s.version),M.ensureCreated(s.projectId,s.stateId,s.version),(t,n)=>(y(),g(ye,{"project-id":t.projectId,"state-id":t.stateId,version:t.version},null,8,["project-id","state-id","version"]))}}),ve={key:1,class:"d-flex justify-center align-center h-100"},Ie={class:"text-center"},ge={key:2,class:"d-flex justify-center align-center h-100"},Me=b({__name:"index",props:{params:{}},setup(s){const{instancesStore:t,stateStore:n}=Z(s.params.projectId),a=m(()=>n.stateIdToStateMap.get(s.params.stateId)),u=m(()=>{const p=a.value;return p?t.instances.get(p.instanceId):void 0}),c=m(()=>t.initializationPhase==="ready"&&n.initializationPhase==="ready"),o=m(()=>!!(a.value&&u.value));return(p,f)=>(y(),g(e(ue),{"project-id":p.params.projectId,"can-unlock":""},{default:v(()=>[e(c)&&e(o)?(y(),g(e(fe),{key:e(t).evaluationVersion,"project-id":p.params.projectId,"state-id":p.params.stateId,version:e(t).evaluationVersion},null,8,["project-id","state-id","version"])):e(c)?(y(),F("div",ve,[N("div",Ie,[f[0]||(f[0]=N("h3",null,"Instance state not found",-1)),N("p",null,"No instance state found for state ID: "+re(p.params.stateId),1)])])):(y(),F("div",ge,[S(ce,{indeterminate:"",color:"dark",size:"32"})]))]),_:1},8,["project-id"]))}});export{Me as default};
|