@junobuild/admin 0.0.58-next-2024-11-27.1 → 0.0.58-next-2024-11-27.2
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/dist/node/index.mjs
CHANGED
|
@@ -12,5 +12,5 @@ index ${n} -> ${o.message}`)}}))return!0;throw new Error(`Invalid ${this.display
|
|
|
12
12
|
|
|
13
13
|
variant ${r} -> ${o.message}`)}}))return!0;throw new Error(`Invalid ${this.display()} argument: ${S(t)}`)}encodeValue(t){for(let r=0;r<this._fields.length;r++){let[n,o]=this._fields[r];if(t.hasOwnProperty(n)){let i=(0,l.lebEncode)(r),a=o.encodeValue(t[n]);return(0,_.concat)(i,a)}}throw Error("Variant has no data: "+t)}_buildTypeTableImpl(t){this._fields.forEach(([,i])=>{i.buildTypeTable(t)});let r=(0,l.slebEncode)(-21),n=(0,l.lebEncode)(this._fields.length),o=this._fields.map(([i,a])=>(0,_.concat)((0,l.lebEncode)((0,H.idlLabelToId)(i)),a.encodeType(t)));t.add(this,(0,_.concat)(r,n,...o))}decodeValue(t,r){let n=this.checkType(r);if(!(n instanceof e))throw new Error("Not a variant type");let o=Number((0,l.lebDecode)(t));if(o>=n._fields.length)throw Error("Invalid variant index: "+o);let[i,a]=n._fields[o];for(let[c,p]of this._fields)if((0,H.idlLabelToId)(i)===(0,H.idlLabelToId)(c)){let d=p.decodeValue(t,a);return{[c]:d}}throw new Error("Cannot find field hash "+i)}get name(){return`variant {${this._fields.map(([r,n])=>r+":"+n.name).join("; ")}}`}display(){return`variant {${this._fields.map(([r,n])=>r+(n.name==="null"?"":`:${n.display()}`)).join("; ")}}`}valueToString(t){for(let[r,n]of this._fields)if(t.hasOwnProperty(r)){let o=n.valueToString(t[r]);return o==="null"?`variant {${r}}`:`variant {${r}=${o}}`}throw new Error("Variant has no data: "+t)}};s.VariantClass=Ke;var D=class e extends W{constructor(){super(...arguments),this._id=e._counter++,this._type=void 0}accept(t,r){if(!this._type)throw Error("Recursive type uninitialized.");return t.visitRec(this,this._type,r)}fill(t){this._type=t}getType(){return this._type}covariant(t){if(this._type&&this._type.covariant(t))return!0;throw new Error(`Invalid ${this.display()} argument: ${S(t)}`)}encodeValue(t){if(!this._type)throw Error("Recursive type uninitialized.");return this._type.encodeValue(t)}_buildTypeTableImpl(t){if(!this._type)throw Error("Recursive type uninitialized.");t.add(this,new Uint8Array([])),this._type.buildTypeTable(t),t.merge(this,this._type.name)}decodeValue(t,r){if(!this._type)throw Error("Recursive type uninitialized.");return this._type.decodeValue(t,r)}get name(){return`rec_${this._id}`}display(){if(!this._type)throw Error("Recursive type uninitialized.");return`\u03BC${this.name}.${this._type.name}`}valueToString(t){if(!this._type)throw Error("Recursive type uninitialized.");return this._type.valueToString(t)}};s.RecClass=D;D._counter=0;function dt(e){if((0,l.safeReadUint8)(e)!==1)throw new Error("Cannot decode principal");let r=Number((0,l.lebDecode)(e));return po.Principal.fromUint8Array(new Uint8Array((0,l.safeRead)(e,r)))}var We=class extends U{accept(t,r){return t.visitPrincipal(this,r)}covariant(t){if(t&&t._isPrincipal)return!0;throw new Error(`Invalid ${this.display()} argument: ${S(t)}`)}encodeValue(t){let r=t.toUint8Array(),n=(0,l.lebEncode)(r.byteLength);return(0,_.concat)(new Uint8Array([1]),n,r)}encodeType(){return(0,l.slebEncode)(-24)}decodeValue(t,r){return this.checkType(r),dt(t)}get name(){return"principal"}valueToString(t){return`${this.name} "${t.toText()}"`}};s.PrincipalClass=We;var ge=class extends W{constructor(t,r,n=[]){super(),this.argTypes=t,this.retTypes=r,this.annotations=n}static argsToString(t,r){if(t.length!==r.length)throw new Error("arity mismatch");return"("+t.map((n,o)=>n.valueToString(r[o])).join(", ")+")"}accept(t,r){return t.visitFunc(this,r)}covariant(t){if(Array.isArray(t)&&t.length===2&&t[0]&&t[0]._isPrincipal&&typeof t[1]=="string")return!0;throw new Error(`Invalid ${this.display()} argument: ${S(t)}`)}encodeValue([t,r]){let n=t.toUint8Array(),o=(0,l.lebEncode)(n.byteLength),i=(0,_.concat)(new Uint8Array([1]),o,n),a=new TextEncoder().encode(r),c=(0,l.lebEncode)(a.byteLength);return(0,_.concat)(new Uint8Array([1]),i,c,a)}_buildTypeTableImpl(t){this.argTypes.forEach(d=>d.buildTypeTable(t)),this.retTypes.forEach(d=>d.buildTypeTable(t));let r=(0,l.slebEncode)(-22),n=(0,l.lebEncode)(this.argTypes.length),o=(0,_.concat)(...this.argTypes.map(d=>d.encodeType(t))),i=(0,l.lebEncode)(this.retTypes.length),a=(0,_.concat)(...this.retTypes.map(d=>d.encodeType(t))),c=(0,l.lebEncode)(this.annotations.length),p=(0,_.concat)(...this.annotations.map(d=>this.encodeAnnotation(d)));t.add(this,(0,_.concat)(r,n,o,i,a,c,p))}decodeValue(t){if((0,l.safeReadUint8)(t)!==1)throw new Error("Cannot decode function reference");let n=dt(t),o=Number((0,l.lebDecode)(t)),i=(0,l.safeRead)(t,o),c=new TextDecoder("utf8",{fatal:!0}).decode(i);return[n,c]}get name(){let t=this.argTypes.map(o=>o.name).join(", "),r=this.retTypes.map(o=>o.name).join(", "),n=" "+this.annotations.join(" ");return`(${t}) -> (${r})${n}`}valueToString([t,r]){return`func "${t.toText()}".${r}`}display(){let t=this.argTypes.map(o=>o.display()).join(", "),r=this.retTypes.map(o=>o.display()).join(", "),n=" "+this.annotations.join(" ");return`(${t}) \u2192 (${r})${n}`}encodeAnnotation(t){if(t==="query")return new Uint8Array([1]);if(t==="oneway")return new Uint8Array([2]);if(t==="composite_query")return new Uint8Array([3]);throw new Error("Illegal function annotation")}};s.FuncClass=ge;var Ge=class extends W{constructor(t){super(),this._fields=Object.entries(t).sort((r,n)=>r[0]<n[0]?-1:r[0]>n[0]?1:0)}accept(t,r){return t.visitService(this,r)}covariant(t){if(t&&t._isPrincipal)return!0;throw new Error(`Invalid ${this.display()} argument: ${S(t)}`)}encodeValue(t){let r=t.toUint8Array(),n=(0,l.lebEncode)(r.length);return(0,_.concat)(new Uint8Array([1]),n,r)}_buildTypeTableImpl(t){this._fields.forEach(([i,a])=>a.buildTypeTable(t));let r=(0,l.slebEncode)(-23),n=(0,l.lebEncode)(this._fields.length),o=this._fields.map(([i,a])=>{let c=new TextEncoder().encode(i),p=(0,l.lebEncode)(c.length);return(0,_.concat)(p,c,a.encodeType(t))});t.add(this,(0,_.concat)(r,n,...o))}decodeValue(t){return dt(t)}get name(){return`service {${this._fields.map(([r,n])=>r+":"+n.name).join("; ")}}`}valueToString(t){return`service "${t.toText()}"`}};s.ServiceClass=Ge;function S(e){let t=JSON.stringify(e,(r,n)=>typeof n=="bigint"?`BigInt(${n})`:n);return t&&t.length>hr?t.substring(0,hr-3)+"...":t}function mo(e,t){if(t.length<e.length)throw Error("Wrong number of message arguments");let r=new lt;e.forEach(p=>p.buildTypeTable(r));let n=new TextEncoder().encode(Ee),o=r.encode(),i=(0,l.lebEncode)(t.length),a=(0,_.concat)(...e.map(p=>p.encodeType(r))),c=(0,_.concat)(...he(e,t,(p,d)=>{try{p.covariant(d)}catch(g){throw new Error(g.message+`
|
|
14
14
|
|
|
15
|
-
`)}return p.encodeValue(d)}));return(0,_.concat)(n,o,i,a,c)}s.encode=mo;function fo(e,t){let r=new _.PipeArrayBuffer(t);if(t.byteLength<Ee.length)throw new Error("Message length smaller than magic number");let n=(0,l.safeRead)(r,Ee.length),o=new TextDecoder().decode(n);if(o!==Ee)throw new Error("Wrong magic number: "+JSON.stringify(o));function i(u){let m=[],T=Number((0,l.lebDecode)(u));for(let b=0;b<T;b++){let C=Number((0,l.slebDecode)(u));switch(C){case-18:case-19:{let x=Number((0,l.slebDecode)(u));m.push([C,x]);break}case-20:case-21:{let x=[],N=Number((0,l.lebDecode)(u)),R;for(;N--;){let V=Number((0,l.lebDecode)(u));if(V>=Math.pow(2,32))throw new Error("field id out of 32-bit range");if(typeof R=="number"&&R>=V)throw new Error("field id collision or not sorted");R=V;let A=Number((0,l.slebDecode)(u));x.push([V,A])}m.push([C,x]);break}case-22:{let x=[],N=Number((0,l.lebDecode)(u));for(;N--;)x.push(Number((0,l.slebDecode)(u)));let R=[],V=Number((0,l.lebDecode)(u));for(;V--;)R.push(Number((0,l.slebDecode)(u)));let A=[],M=Number((0,l.lebDecode)(u));for(;M--;)switch(Number((0,l.lebDecode)(u))){case 1:{A.push("query");break}case 2:{A.push("oneway");break}case 3:{A.push("composite_query");break}default:throw new Error("unknown annotation")}m.push([C,[x,R,A]]);break}case-23:{let x=Number((0,l.lebDecode)(u)),N=[];for(;x--;){let R=Number((0,l.lebDecode)(u)),V=new TextDecoder().decode((0,l.safeRead)(u,R)),A=(0,l.slebDecode)(u);N.push([V,A])}m.push([C,N]);break}default:throw new Error("Illegal op_code: "+C)}}let v=[],w=Number((0,l.lebDecode)(u));for(let b=0;b<w;b++)v.push(Number((0,l.slebDecode)(u)));return[m,v]}let[a,c]=i(r);if(c.length<e.length)throw new Error("Wrong number of return values");let p=a.map(u=>xr());function d(u){if(u<-24)throw new Error("future value not supported");if(u<0)switch(u){case-1:return s.Null;case-2:return s.Bool;case-3:return s.Nat;case-4:return s.Int;case-5:return s.Nat8;case-6:return s.Nat16;case-7:return s.Nat32;case-8:return s.Nat64;case-9:return s.Int8;case-10:return s.Int16;case-11:return s.Int32;case-12:return s.Int64;case-13:return s.Float32;case-14:return s.Float64;case-15:return s.Text;case-16:return s.Reserved;case-17:return s.Empty;case-24:return s.Principal;default:throw new Error("Illegal op_code: "+u)}if(u>=a.length)throw new Error("type index out of range");return p[u]}function g(u){switch(u[0]){case-19:{let m=d(u[1]);return _r(m)}case-18:{let m=d(u[1]);return gr(m)}case-20:{let m={};for(let[w,b]of u[1]){let C=`_${w}_`;m[C]=d(b)}let T=Tr(m),v=T.tryAsTuple();return Array.isArray(v)?yr(...v):T}case-21:{let m={};for(let[T,v]of u[1]){let w=`_${T}_`;m[w]=d(v)}return br(m)}case-22:{let[m,T,v]=u[1];return wr(m.map(w=>d(w)),T.map(w=>d(w)),v)}case-23:{let m={},T=u[1];for(let[v,w]of T){let b=d(w);if(b instanceof D&&(b=b.getType()),!(b instanceof ge))throw new Error("Illegal service definition: services can only contain functions");m[v]=b}return Pr(m)}default:throw new Error("Illegal op_code: "+u[0])}}a.forEach((u,m)=>{if(u[0]===-22){let T=g(u);p[m].fill(T)}}),a.forEach((u,m)=>{if(u[0]!==-22){let T=g(u);p[m].fill(T)}});let y=c.map(u=>d(u)),h=e.map((u,m)=>u.decodeValue(r,y[m]));for(let u=e.length;u<y.length;u++)y[u].decodeValue(r,y[u]);if(r.byteLength>0)throw new Error("decode: Left-over bytes");return h}s.decode=fo;s.Empty=new ke;s.Reserved=new ce;s.Unknown=new Me;s.Bool=new Be;s.Null=new Ue;s.Text=new $e;s.Int=new qe;s.Nat=new je;s.Float32=new ye(32);s.Float64=new ye(64);s.Int8=new Q(8);s.Int16=new Q(16);s.Int32=new Q(32);s.Int64=new Q(64);s.Nat8=new K(8);s.Nat16=new K(16);s.Nat32=new K(32);s.Nat64=new K(64);s.Principal=new We;function yr(...e){return new He(e)}s.Tuple=yr;function _r(e){return new ze(e)}s.Vec=_r;function gr(e){return new le(e)}s.Opt=gr;function Tr(e){return new _e(e)}s.Record=Tr;function br(e){return new Ke(e)}s.Variant=br;function xr(){return new D}s.Rec=xr;function wr(e,t,r=[]){return new ge(e,t,r)}s.Func=wr;function Pr(e){return new Ge(e)}s.Service=Pr});var Tt=Y(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.VecForm=E.OptionForm=E.VariantForm=E.TupleForm=E.RecordForm=E.InputForm=E.InputBox=void 0;var mt=class{constructor(t,r){this.idl=t,this.ui=r,this.label=null,this.value=void 0;let n=document.createElement("span");n.className="status",this.status=n,r.input&&(r.input.addEventListener("blur",()=>{r.input.value!==""&&this.parse()}),r.input.addEventListener("input",()=>{n.style.display="none",r.input.classList.remove("reject")}))}isRejected(){return this.value===void 0}parse(t={}){if(this.ui.form){let r=this.ui.form.parse(t);return this.value=r,r}if(this.ui.input){let r=this.ui.input;try{let n=this.ui.parse(this.idl,t,r.value);if(!this.idl.covariant(n))throw new Error(`${r.value} is not of type ${this.idl.display()}`);return this.status.style.display="none",this.value=n,n}catch(n){r.classList.add("reject"),this.status.style.display="block",this.status.innerHTML="InputError: "+n.message,this.value=void 0;return}}return null}render(t){let r=document.createElement("span");if(this.label){let n=document.createElement("label");n.innerText=this.label,r.appendChild(n)}this.ui.input&&(r.appendChild(this.ui.input),r.appendChild(this.status)),this.ui.form&&this.ui.form.render(r),t.appendChild(r)}};E.InputBox=mt;var L=class{constructor(t){this.ui=t,this.form=[]}renderForm(t){this.ui.container?(this.form.forEach(r=>r.render(this.ui.container)),t.appendChild(this.ui.container)):this.form.forEach(r=>r.render(t))}render(t){if(this.ui.open&&this.ui.event){t.appendChild(this.ui.open);let r=this;r.ui.open.addEventListener(r.ui.event,()=>{if(r.ui.container)r.ui.container.innerHTML="";else{let n=r.ui.open.nextElementSibling;n&&n.parentNode.removeChild(n)}r.generateForm(),r.renderForm(t)})}else this.generateForm(),this.renderForm(t)}};E.InputForm=L;var ft=class extends L{constructor(t,r){super(r),this.fields=t,this.ui=r}generateForm(){this.form=this.fields.map(([t,r])=>{let n=this.ui.render(r);return this.ui.labelMap&&this.ui.labelMap.hasOwnProperty(t)?n.label=this.ui.labelMap[t]+" ":n.label=t+" ",n})}parse(t){let r={};if(this.fields.forEach(([n,o],i)=>{let a=this.form[i].parse(t);r[n]=a}),!this.form.some(n=>n.isRejected()))return r}};E.RecordForm=ft;var ht=class extends L{constructor(t,r){super(r),this.components=t,this.ui=r}generateForm(){this.form=this.components.map(t=>this.ui.render(t))}parse(t){let r=[];if(this.components.forEach((n,o)=>{let i=this.form[o].parse(t);r.push(i)}),!this.form.some(n=>n.isRejected()))return r}};E.TupleForm=ht;var yt=class extends L{constructor(t,r){super(r),this.fields=t,this.ui=r}generateForm(){let t=this.ui.open.selectedIndex,[r,n]=this.fields[t],o=this.ui.render(n);this.form=[o]}parse(t){let r=this.ui.open,n=r.options[r.selectedIndex].value,o=this.form[0].parse(t);if(o===void 0)return;let i={};return i[n]=o,i}};E.VariantForm=yt;var _t=class extends L{constructor(t,r){super(r),this.ty=t,this.ui=r}generateForm(){if(this.ui.open.checked){let t=this.ui.render(this.ty);this.form=[t]}else this.form=[]}parse(t){if(this.form.length===0)return[];{let r=this.form[0].parse(t);return r===void 0?void 0:[r]}}};E.OptionForm=_t;var gt=class extends L{constructor(t,r){super(r),this.ty=t,this.ui=r}generateForm(){let t=+this.ui.open.value;this.form=[];for(let r=0;r<t;r++){let n=this.ui.render(this.ty);this.form.push(n)}}parse(t){let r=this.form.map(n=>n.parse(t));if(!this.form.some(n=>n.isRejected()))return r}};E.VecForm=gt});var Cr=Y(f=>{"use strict";var ho=f&&f.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),yo=f&&f.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),vr=f&&f.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&ho(t,e,r);return yo(t,e),t};Object.defineProperty(f,"__esModule",{value:!0});f.renderValue=f.renderInput=f.Render=f.vecForm=f.optForm=f.variantForm=f.tupleForm=f.recordForm=f.inputBox=void 0;var Ze=vr(pt()),bt=Ft("@dfinity/principal"),ue=vr(Tt()),_o={parse:vo},Te={render:vt},go=(e,t)=>new ue.InputBox(e,Object.assign(Object.assign({},_o),t));f.inputBox=go;var To=(e,t)=>new ue.RecordForm(e,Object.assign(Object.assign({},Te),t));f.recordForm=To;var bo=(e,t)=>new ue.TupleForm(e,Object.assign(Object.assign({},Te),t));f.tupleForm=bo;var xo=(e,t)=>new ue.VariantForm(e,Object.assign(Object.assign({},Te),t));f.variantForm=xo;var wo=(e,t)=>new ue.OptionForm(e,Object.assign(Object.assign({},Te),t));f.optForm=wo;var Po=(e,t)=>new ue.VecForm(e,Object.assign(Object.assign({},Te),t));f.vecForm=Po;var Xe=class extends Ze.Visitor{visitType(t,r){let n=document.createElement("input");return n.classList.add("argument"),n.placeholder=t.display(),(0,f.inputBox)(t,{input:n})}visitNull(t,r){return(0,f.inputBox)(t,{})}visitRecord(t,r,n){let o={};if(r.length>1){let a=document.createElement("div");a.classList.add("popup-form"),o={container:a}}let i=(0,f.recordForm)(r,o);return(0,f.inputBox)(t,{form:i})}visitTuple(t,r,n){let o={};if(r.length>1){let a=document.createElement("div");a.classList.add("popup-form"),o={container:a}}let i=(0,f.tupleForm)(r,o);return(0,f.inputBox)(t,{form:i})}visitVariant(t,r,n){let o=document.createElement("select");for(let[c,p]of r){let d=new Option(c);o.add(d)}o.selectedIndex=-1,o.classList.add("open");let i={open:o,event:"change"},a=(0,f.variantForm)(r,i);return(0,f.inputBox)(t,{form:a})}visitOpt(t,r,n){let o=document.createElement("input");o.type="checkbox",o.classList.add("open");let i=(0,f.optForm)(r,{open:o,event:"change"});return(0,f.inputBox)(t,{form:i})}visitVec(t,r,n){let o=document.createElement("input");o.type="number",o.min="0",o.max="100",o.style.width="8rem",o.placeholder="len",o.classList.add("open");let i=document.createElement("div");i.classList.add("popup-form");let a=(0,f.vecForm)(r,{open:o,event:"change",container:i});return(0,f.inputBox)(t,{form:a})}visitRec(t,r,n){return vt(r)}};f.Render=Xe;var xt=class extends Ze.Visitor{visitNull(t,r){return null}visitBool(t,r){if(r==="true")return!0;if(r==="false")return!1;throw new Error(`Cannot parse ${r} as boolean`)}visitText(t,r){return r}visitFloat(t,r){return parseFloat(r)}visitFixedInt(t,r){return t._bits<=32?parseInt(r,10):BigInt(r)}visitFixedNat(t,r){return t._bits<=32?parseInt(r,10):BigInt(r)}visitNumber(t,r){return BigInt(r)}visitPrincipal(t,r){return bt.Principal.fromText(r)}visitService(t,r){return bt.Principal.fromText(r)}visitFunc(t,r){let n=r.split(".",2);return[bt.Principal.fromText(n[0]),n[1]]}},wt=class extends Ze.Visitor{visitNull(t,r){return null}visitBool(t,r){return Math.random()<.5}visitText(t,r){return Math.random().toString(36).substring(6)}visitFloat(t,r){return Math.random()}visitInt(t,r){return BigInt(this.generateNumber(!0))}visitNat(t,r){return BigInt(this.generateNumber(!1))}visitFixedInt(t,r){let n=this.generateNumber(!0);return t._bits<=32?n:BigInt(r)}visitFixedNat(t,r){let n=this.generateNumber(!1);return t._bits<=32?n:BigInt(r)}generateNumber(t){let r=Math.floor(Math.random()*100);return t&&Math.random()<.5?-r:r}};function vo(e,t,r){return t.random&&r===""?e.accept(new wt,r):e.accept(new xt,r)}function vt(e){return e.accept(new Xe,null)}f.renderInput=vt;function oe(e,t,r){return e.accept(new Pt,{input:t,value:r})}f.renderValue=oe;var Pt=class extends Ze.Visitor{visitType(t,r){r.input.ui.input.value=t.valueToString(r.value)}visitNull(t,r){}visitText(t,r){r.input.ui.input.value=r.value}visitRec(t,r,n){oe(r,n.input,n.value)}visitOpt(t,r,n){if(n.value.length!==0){let o=n.input.ui.form,i=o.ui.open;i.checked=!0,i.dispatchEvent(new Event(o.ui.event)),oe(r,o.form[0],n.value[0])}}visitRecord(t,r,n){let o=n.input.ui.form;r.forEach(([i,a],c)=>{oe(a,o.form[c],n.value[i])})}visitTuple(t,r,n){let o=n.input.ui.form;r.forEach((i,a)=>{oe(i,o.form[a],n.value[a])})}visitVariant(t,r,n){let o=n.input.ui.form,i=Object.entries(n.value)[0];r.forEach(([a,c],p)=>{if(a===i[0]){let d=o.ui.open;d.selectedIndex=p,d.dispatchEvent(new Event(o.ui.event)),oe(c,o.form[0],i[1])}})}visitVec(t,r,n){let o=n.input.ui.form,i=n.value.length,a=o.ui.open;a.value=i,a.dispatchEvent(new Event(o.ui.event)),n.value.forEach((c,p)=>{oe(r,o.form[p],c)})}}});var Sr=Y(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0})});var Ct=Y(F=>{"use strict";var Rr=F&&F.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Co=F&&F.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),de=F&&F.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Rr(t,e,r)},No=F&&F.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Rr(t,e,r);return Co(t,e),t};Object.defineProperty(F,"__esModule",{value:!0});F.IDL=void 0;de(Cr(),F);de(Tt(),F);F.IDL=No(pt());de(it(),F);de(at(),F);de(Ae(),F);de(Sr(),F)});var we=class extends Error{constructor(){super("The Wasm code for the upgrade is identical to the code currently installed. No upgrade is necessary.")}};import{isNullish as kn}from"@junobuild/utils";var kt=({IDL:e})=>{let t=e.Record({updated_at:e.Nat64,orbiter_id:e.Principal,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64}),r=e.Record({subnet_id:e.Opt(e.Principal),name:e.Opt(e.Text)}),n=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,satellite_id:e.Principal}),o=e.Record({cycles:e.Nat,destination_id:e.Principal}),i=e.Record({e8s:e.Nat64}),a=e.Record({timestamp_nanos:e.Nat64}),c=e.Record({to:e.Vec(e.Nat8),fee:i,memo:e.Nat64,from_subaccount:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(a),amount:i}),p=e.Variant({TxTooOld:e.Record({allowed_window_nanos:e.Nat64}),BadFee:e.Record({expected_fee:i}),TxDuplicate:e.Record({duplicate_of:e.Nat64}),TxCreatedInFuture:e.Null,InsufficientFunds:e.Record({balance:i})}),d=e.Variant({Ok:e.Nat64,Err:p}),g=e.Record({owner:e.Principal,subaccount:e.Opt(e.Vec(e.Nat8))}),y=e.Record({to:g,fee:e.Opt(e.Nat),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat}),h=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,BadBurn:e.Record({min_burn_amount:e.Nat}),Duplicate:e.Record({duplicate_of:e.Nat}),BadFee:e.Record({expected_fee:e.Nat}),CreatedInFuture:e.Record({ledger_time:e.Nat64}),TooOld:e.Null,InsufficientFunds:e.Record({balance:e.Nat})}),u=e.Variant({Ok:e.Nat,Err:h}),m=e.Variant({Write:e.Null,Admin:e.Null}),T=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,scope:m,expires_at:e.Opt(e.Nat64)}),v=e.Variant({stopped:e.Null,stopping:e.Null,running:e.Null}),w=e.Record({freezing_threshold:e.Nat,controllers:e.Vec(e.Principal),memory_allocation:e.Nat,compute_allocation:e.Nat}),b=e.Record({status:v,memory_size:e.Nat,cycles:e.Nat,settings:w,idle_cycles_burned_per_day:e.Nat,module_hash:e.Opt(e.Vec(e.Nat8))}),C=e.Record({id:e.Principal,status:b,metadata:e.Opt(e.Vec(e.Tuple(e.Text,e.Text))),status_at:e.Nat64}),x=e.Variant({Ok:C,Err:e.Text}),N=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),scope:m,expires_at:e.Opt(e.Nat64)}),R=e.Record({enabled:e.Bool,cycles_threshold:e.Opt(e.Nat64)}),V=e.Record({mission_control_cycles_threshold:e.Opt(e.Nat64),orbiters:e.Vec(e.Tuple(e.Principal,R)),satellites:e.Vec(e.Tuple(e.Principal,R)),cycles_threshold:e.Opt(e.Nat64)}),A=e.Record({orbiters:e.Opt(e.Vec(x)),satellites:e.Opt(e.Vec(x)),mission_control:x});return e.Service({add_mission_control_controllers:e.Func([e.Vec(e.Principal)],[],[]),add_satellites_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal)],[],[]),create_orbiter:e.Func([e.Opt(e.Text)],[t],[]),create_orbiter_with_config:e.Func([r],[t],[]),create_satellite:e.Func([e.Text],[n],[]),create_satellite_with_config:e.Func([r],[n],[]),del_mission_control_controllers:e.Func([e.Vec(e.Principal)],[],[]),del_orbiter:e.Func([e.Principal,e.Nat],[],[]),del_orbiters_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal)],[],[]),del_satellite:e.Func([e.Principal,e.Nat],[],[]),del_satellites_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal)],[],[]),deposit_cycles:e.Func([o],[],[]),get_user:e.Func([],[e.Principal],["query"]),icp_transfer:e.Func([c],[d],[]),icrc_transfer:e.Func([e.Principal,y],[u],[]),list_mission_control_controllers:e.Func([],[e.Vec(e.Tuple(e.Principal,T))],["query"]),list_mission_control_statuses:e.Func([],[e.Vec(e.Tuple(e.Nat64,x))],["query"]),list_orbiter_statuses:e.Func([e.Principal],[e.Opt(e.Vec(e.Tuple(e.Nat64,x)))],["query"]),list_orbiters:e.Func([],[e.Vec(e.Tuple(e.Principal,t))],["query"]),list_satellite_statuses:e.Func([e.Principal],[e.Opt(e.Vec(e.Tuple(e.Nat64,x)))],["query"]),list_satellites:e.Func([],[e.Vec(e.Tuple(e.Principal,n))],["query"]),remove_mission_control_controllers:e.Func([e.Vec(e.Principal)],[],[]),remove_satellites_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal)],[],[]),set_metadata:e.Func([e.Vec(e.Tuple(e.Text,e.Text))],[],[]),set_mission_control_controllers:e.Func([e.Vec(e.Principal),N],[],[]),set_orbiter:e.Func([e.Principal,e.Opt(e.Text)],[t],[]),set_orbiter_metadata:e.Func([e.Principal,e.Vec(e.Tuple(e.Text,e.Text))],[t],[]),set_orbiters_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal),N],[],[]),set_satellite:e.Func([e.Principal,e.Opt(e.Text)],[n],[]),set_satellite_metadata:e.Func([e.Principal,e.Vec(e.Tuple(e.Text,e.Text))],[n],[]),set_satellites_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal),N],[],[]),status:e.Func([V],[A],[]),top_up:e.Func([e.Principal,i],[],[]),unset_orbiter:e.Func([e.Principal],[],[]),unset_satellite:e.Func([e.Principal],[],[]),version:e.Func([],[e.Text],["query"])})};var Mt=({IDL:e})=>{let t=e.Record({controllers:e.Vec(e.Principal)}),r=e.Variant({Write:e.Null,Admin:e.Null}),n=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,scope:r,expires_at:e.Opt(e.Nat64)}),o=e.Record({version:e.Opt(e.Nat64)}),i=e.Record({cycles:e.Nat,destination_id:e.Principal}),a=e.Record({to:e.Opt(e.Nat64),from:e.Opt(e.Nat64),satellite_id:e.Opt(e.Principal)}),c=e.Record({key:e.Text,collected_at:e.Nat64}),p=e.Record({inner_height:e.Nat16,inner_width:e.Nat16}),d=e.Record({title:e.Text,updated_at:e.Nat64,referrer:e.Opt(e.Text),time_zone:e.Text,session_id:e.Text,href:e.Text,created_at:e.Nat64,satellite_id:e.Principal,device:p,version:e.Opt(e.Nat64),user_agent:e.Opt(e.Text)}),g=e.Record({safari:e.Float64,opera:e.Float64,others:e.Float64,firefox:e.Float64,chrome:e.Float64}),y=e.Record({desktop:e.Float64,others:e.Float64,mobile:e.Float64}),h=e.Record({browsers:g,devices:y}),u=e.Record({day:e.Nat8,month:e.Nat8,year:e.Int32}),m=e.Record({bounce_rate:e.Float64,average_page_views_per_session:e.Float64,daily_total_page_views:e.Vec(e.Tuple(u,e.Nat32)),total_page_views:e.Nat32,unique_page_views:e.Nat64,unique_sessions:e.Nat64}),T=e.Record({referrers:e.Vec(e.Tuple(e.Text,e.Nat32)),pages:e.Vec(e.Tuple(e.Text,e.Nat32))}),v=e.Variant({Navigate:e.Null,Restore:e.Null,Reload:e.Null,BackForward:e.Null,BackForwardCache:e.Null,Prerender:e.Null}),w=e.Record({id:e.Text,value:e.Float64,navigation_type:e.Opt(v),delta:e.Float64}),b=e.Variant({WebVitalsMetric:w}),C=e.Variant({CLS:e.Null,FCP:e.Null,INP:e.Null,LCP:e.Null,TTFB:e.Null}),x=e.Record({updated_at:e.Nat64,session_id:e.Text,data:b,href:e.Text,metric_name:C,created_at:e.Nat64,satellite_id:e.Principal,version:e.Opt(e.Nat64)}),N=e.Record({cls:e.Opt(e.Float64),fcp:e.Opt(e.Float64),inp:e.Opt(e.Float64),lcp:e.Opt(e.Float64),ttfb:e.Opt(e.Float64)}),R=e.Record({overall:N,pages:e.Vec(e.Tuple(e.Text,N))}),V=e.Record({updated_at:e.Nat64,session_id:e.Text,metadata:e.Opt(e.Vec(e.Tuple(e.Text,e.Text))),name:e.Text,created_at:e.Nat64,satellite_id:e.Principal,version:e.Opt(e.Nat64)}),A=e.Record({total:e.Vec(e.Tuple(e.Text,e.Nat32))}),M=e.Record({performance_metrics:e.Bool,track_events:e.Bool,page_views:e.Bool}),k=e.Record({updated_at:e.Nat64,features:e.Opt(M),created_at:e.Nat64,version:e.Opt(e.Nat64)}),$=e.Record({stable:e.Nat64,heap:e.Nat64}),G=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),scope:r,expires_at:e.Opt(e.Nat64)}),j=e.Record({controller:G,controllers:e.Vec(e.Principal)}),X=e.Record({title:e.Text,updated_at:e.Opt(e.Nat64),referrer:e.Opt(e.Text),time_zone:e.Text,session_id:e.Text,href:e.Text,satellite_id:e.Principal,device:p,version:e.Opt(e.Nat64),user_agent:e.Opt(e.Text)}),Z=e.Variant({Ok:d,Err:e.Text}),J=e.Variant({Ok:e.Null,Err:e.Vec(e.Tuple(c,e.Text))}),z=e.Record({session_id:e.Text,data:b,href:e.Text,metric_name:C,satellite_id:e.Principal,version:e.Opt(e.Nat64),user_agent:e.Opt(e.Text)}),et=e.Variant({Ok:x,Err:e.Text}),tt=e.Record({features:e.Opt(M),version:e.Opt(e.Nat64)}),xe=e.Record({updated_at:e.Opt(e.Nat64),session_id:e.Text,metadata:e.Opt(e.Vec(e.Tuple(e.Text,e.Text))),name:e.Text,satellite_id:e.Principal,version:e.Opt(e.Nat64),user_agent:e.Opt(e.Text)}),rt=e.Variant({Ok:V,Err:e.Text});return e.Service({del_controllers:e.Func([t],[e.Vec(e.Tuple(e.Principal,n))],[]),del_satellite_config:e.Func([e.Principal,o],[],[]),deposit_cycles:e.Func([i],[],[]),get_page_views:e.Func([a],[e.Vec(e.Tuple(c,d))],["query"]),get_page_views_analytics_clients:e.Func([a],[h],["query"]),get_page_views_analytics_metrics:e.Func([a],[m],["query"]),get_page_views_analytics_top_10:e.Func([a],[T],["query"]),get_performance_metrics:e.Func([a],[e.Vec(e.Tuple(c,x))],["query"]),get_performance_metrics_analytics_web_vitals:e.Func([a],[R],["query"]),get_track_events:e.Func([a],[e.Vec(e.Tuple(c,V))],["query"]),get_track_events_analytics:e.Func([a],[A],["query"]),list_controllers:e.Func([],[e.Vec(e.Tuple(e.Principal,n))],["query"]),list_satellite_configs:e.Func([],[e.Vec(e.Tuple(e.Principal,k))],["query"]),memory_size:e.Func([],[$],["query"]),set_controllers:e.Func([j],[e.Vec(e.Tuple(e.Principal,n))],[]),set_page_view:e.Func([c,X],[Z],[]),set_page_views:e.Func([e.Vec(e.Tuple(c,X))],[J],[]),set_performance_metric:e.Func([c,z],[et],[]),set_performance_metrics:e.Func([e.Vec(e.Tuple(c,z))],[J],[]),set_satellite_configs:e.Func([e.Vec(e.Tuple(e.Principal,tt))],[e.Vec(e.Tuple(e.Principal,k))],[]),set_track_event:e.Func([c,xe],[rt],[]),set_track_events:e.Func([e.Vec(e.Tuple(c,xe))],[J],[]),version:e.Func([],[e.Text],["query"])})};var Bt=({IDL:e})=>{let t=e.Record({batch_id:e.Nat,headers:e.Vec(e.Tuple(e.Text,e.Text)),chunk_ids:e.Vec(e.Nat)}),r=e.Record({controllers:e.Vec(e.Principal)}),n=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,expires_at:e.Opt(e.Nat64)}),o=e.Record({updated_at:e.Opt(e.Nat64)}),i=e.Record({headers:e.Vec(e.Tuple(e.Text,e.Vec(e.Tuple(e.Text,e.Text))))}),a=e.Record({storage:i}),c=e.Record({updated_at:e.Nat64,owner:e.Principal,data:e.Vec(e.Nat8),created_at:e.Nat64}),p=e.Record({url:e.Text,method:e.Text,body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text))}),d=e.Record({token:e.Opt(e.Text),sha256:e.Opt(e.Vec(e.Nat8)),headers:e.Vec(e.Tuple(e.Text,e.Text)),index:e.Nat64,encoding_type:e.Text,full_path:e.Text}),g=e.Variant({Callback:e.Record({token:d,callback:e.Func([],[],[])})}),y=e.Record({body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text)),streaming_strategy:e.Opt(g),status_code:e.Nat16}),h=e.Record({token:e.Opt(d),body:e.Vec(e.Nat8)}),u=e.Record({token:e.Opt(e.Text),collection:e.Text,name:e.Text,encoding_type:e.Opt(e.Text),full_path:e.Text}),m=e.Record({batch_id:e.Nat}),T=e.Variant({UpdatedAt:e.Null,Keys:e.Null,CreatedAt:e.Null}),v=e.Record({field:T,desc:e.Bool}),w=e.Record({start_after:e.Opt(e.Text),limit:e.Opt(e.Nat64)}),b=e.Record({order:e.Opt(v),owner:e.Opt(e.Principal),matcher:e.Opt(e.Text),paginate:e.Opt(w)}),C=e.Record({token:e.Opt(e.Text),collection:e.Text,owner:e.Principal,name:e.Text,full_path:e.Text}),x=e.Record({modified:e.Nat64,sha256:e.Vec(e.Nat8),total_length:e.Nat}),N=e.Record({key:C,updated_at:e.Nat64,encodings:e.Vec(e.Tuple(e.Text,x)),headers:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64}),R=e.Record({matches_length:e.Nat64,length:e.Nat64,items:e.Vec(e.Tuple(e.Text,N))}),V=e.Record({updated_at:e.Nat64,created_at:e.Nat64,bn_id:e.Opt(e.Text)}),A=e.Record({matches_length:e.Nat64,length:e.Nat64,items:e.Vec(e.Tuple(e.Text,c))}),M=e.Variant({Db:e.Null,Storage:e.Null}),k=e.Variant({Controllers:e.Null,Private:e.Null,Public:e.Null,Managed:e.Null}),$=e.Record({updated_at:e.Nat64,max_size:e.Opt(e.Nat),read:k,created_at:e.Nat64,write:k}),G=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),expires_at:e.Opt(e.Nat64)}),j=e.Record({controller:G,controllers:e.Vec(e.Principal)}),X=e.Record({updated_at:e.Opt(e.Nat64),data:e.Vec(e.Nat8)}),Z=e.Record({updated_at:e.Opt(e.Nat64),max_size:e.Opt(e.Nat),read:k,write:k}),J=e.Record({content:e.Vec(e.Nat8),batch_id:e.Nat}),z=e.Record({chunk_id:e.Nat});return e.Service({commit_asset_upload:e.Func([t],[],[]),del_asset:e.Func([e.Text,e.Text],[],[]),del_assets:e.Func([e.Opt(e.Text)],[],[]),del_controllers:e.Func([r],[e.Vec(e.Tuple(e.Principal,n))],[]),del_custom_domain:e.Func([e.Text],[],[]),del_doc:e.Func([e.Text,e.Text,o],[],[]),get_config:e.Func([],[a],[]),get_doc:e.Func([e.Text,e.Text],[e.Opt(c)],["query"]),http_request:e.Func([p],[y],["query"]),http_request_streaming_callback:e.Func([d],[h],["query"]),init_asset_upload:e.Func([u],[m],[]),list_assets:e.Func([e.Opt(e.Text),b],[R],["query"]),list_controllers:e.Func([],[e.Vec(e.Tuple(e.Principal,n))],["query"]),list_custom_domains:e.Func([],[e.Vec(e.Tuple(e.Text,V))],["query"]),list_docs:e.Func([e.Text,b],[A],["query"]),list_rules:e.Func([M],[e.Vec(e.Tuple(e.Text,$))],["query"]),set_config:e.Func([a],[],[]),set_controllers:e.Func([j],[e.Vec(e.Tuple(e.Principal,n))],[]),set_custom_domain:e.Func([e.Text,e.Opt(e.Text)],[],[]),set_doc:e.Func([e.Text,e.Text,X],[c],[]),set_rule:e.Func([M,e.Text,Z],[],[]),upload_asset_chunk:e.Func([J],[z],[]),version:e.Func([],[e.Text],["query"])})};var Ut=({IDL:e})=>{let t=e.Record({batch_id:e.Nat,headers:e.Vec(e.Tuple(e.Text,e.Text)),chunk_ids:e.Vec(e.Nat)}),r=e.Record({controllers:e.Vec(e.Principal)}),n=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,expires_at:e.Opt(e.Nat64)}),o=e.Record({updated_at:e.Opt(e.Nat64)}),i=e.Record({headers:e.Vec(e.Tuple(e.Text,e.Vec(e.Tuple(e.Text,e.Text))))}),a=e.Record({storage:i}),c=e.Record({updated_at:e.Nat64,owner:e.Principal,data:e.Vec(e.Nat8),created_at:e.Nat64}),p=e.Record({url:e.Text,method:e.Text,body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text))}),d=e.Record({token:e.Opt(e.Text),sha256:e.Opt(e.Vec(e.Nat8)),headers:e.Vec(e.Tuple(e.Text,e.Text)),index:e.Nat64,encoding_type:e.Text,full_path:e.Text}),g=e.Variant({Callback:e.Record({token:d,callback:e.Func([],[],[])})}),y=e.Record({body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text)),streaming_strategy:e.Opt(g),status_code:e.Nat16}),h=e.Record({token:e.Opt(d),body:e.Vec(e.Nat8)}),u=e.Record({token:e.Opt(e.Text),collection:e.Text,name:e.Text,encoding_type:e.Opt(e.Text),full_path:e.Text}),m=e.Record({batch_id:e.Nat}),T=e.Variant({UpdatedAt:e.Null,Keys:e.Null,CreatedAt:e.Null}),v=e.Record({field:T,desc:e.Bool}),w=e.Record({start_after:e.Opt(e.Text),limit:e.Opt(e.Nat64)}),b=e.Record({order:e.Opt(v),matcher:e.Opt(e.Text),paginate:e.Opt(w)}),C=e.Record({token:e.Opt(e.Text),collection:e.Text,owner:e.Principal,name:e.Text,full_path:e.Text}),x=e.Record({modified:e.Nat64,sha256:e.Vec(e.Nat8),total_length:e.Nat}),N=e.Record({key:C,updated_at:e.Nat64,encodings:e.Vec(e.Tuple(e.Text,x)),headers:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64}),R=e.Record({matches_length:e.Nat64,length:e.Nat64,items:e.Vec(e.Tuple(e.Text,N))}),V=e.Record({updated_at:e.Nat64,created_at:e.Nat64,bn_id:e.Opt(e.Text)}),A=e.Record({matches_length:e.Nat64,length:e.Nat64,items:e.Vec(e.Tuple(e.Text,c))}),M=e.Variant({Db:e.Null,Storage:e.Null}),k=e.Variant({Controllers:e.Null,Private:e.Null,Public:e.Null,Managed:e.Null}),$=e.Record({updated_at:e.Nat64,max_size:e.Opt(e.Nat),read:k,created_at:e.Nat64,write:k}),G=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),expires_at:e.Opt(e.Nat64)}),j=e.Record({controller:G,controllers:e.Vec(e.Principal)}),X=e.Record({updated_at:e.Opt(e.Nat64),data:e.Vec(e.Nat8)}),Z=e.Record({updated_at:e.Opt(e.Nat64),max_size:e.Opt(e.Nat),read:k,write:k}),J=e.Record({content:e.Vec(e.Nat8),batch_id:e.Nat}),z=e.Record({chunk_id:e.Nat});return e.Service({commit_asset_upload:e.Func([t],[],[]),del_asset:e.Func([e.Text,e.Text],[],[]),del_assets:e.Func([e.Opt(e.Text)],[],[]),del_controllers:e.Func([r],[e.Vec(e.Tuple(e.Principal,n))],[]),del_custom_domain:e.Func([e.Text],[],[]),del_doc:e.Func([e.Text,e.Text,o],[],[]),get_config:e.Func([],[a],[]),get_doc:e.Func([e.Text,e.Text],[e.Opt(c)],["query"]),http_request:e.Func([p],[y],["query"]),http_request_streaming_callback:e.Func([d],[h],["query"]),init_asset_upload:e.Func([u],[m],[]),list_assets:e.Func([e.Opt(e.Text),b],[R],["query"]),list_controllers:e.Func([],[e.Vec(e.Principal)],["query"]),list_custom_domains:e.Func([],[e.Vec(e.Tuple(e.Text,V))],["query"]),list_docs:e.Func([e.Text,b],[A],["query"]),list_rules:e.Func([M],[e.Vec(e.Tuple(e.Text,$))],["query"]),set_config:e.Func([a],[],[]),set_controllers:e.Func([j],[e.Vec(e.Tuple(e.Principal,n))],[]),set_custom_domain:e.Func([e.Text,e.Opt(e.Text)],[],[]),set_doc:e.Func([e.Text,e.Text,X],[c],[]),set_rule:e.Func([M,e.Text,Z],[],[]),upload_asset_chunk:e.Func([J],[z],[]),version:e.Func([],[e.Text],["query"])})};var $t=({IDL:e})=>{let t=e.Record({batch_id:e.Nat,headers:e.Vec(e.Tuple(e.Text,e.Text)),chunk_ids:e.Vec(e.Nat)}),r=e.Variant({UpdatedAt:e.Null,Keys:e.Null,CreatedAt:e.Null}),n=e.Record({field:r,desc:e.Bool}),o=e.Variant({Equal:e.Nat64,Between:e.Tuple(e.Nat64,e.Nat64),GreaterThan:e.Nat64,LessThan:e.Nat64}),i=e.Record({key:e.Opt(e.Text),updated_at:e.Opt(o),description:e.Opt(e.Text),created_at:e.Opt(o)}),a=e.Record({start_after:e.Opt(e.Text),limit:e.Opt(e.Nat64)}),c=e.Record({order:e.Opt(n),owner:e.Opt(e.Principal),matcher:e.Opt(i),paginate:e.Opt(a)}),p=e.Record({controllers:e.Vec(e.Principal)}),d=e.Variant({Write:e.Null,Admin:e.Null}),g=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,scope:d,expires_at:e.Opt(e.Nat64)}),y=e.Record({version:e.Opt(e.Nat64)}),h=e.Variant({Db:e.Null,Storage:e.Null}),u=e.Record({version:e.Opt(e.Nat64)}),m=e.Record({cycles:e.Nat,destination_id:e.Principal}),T=e.Record({token:e.Opt(e.Text),collection:e.Text,owner:e.Principal,name:e.Text,description:e.Opt(e.Text),full_path:e.Text}),v=e.Record({modified:e.Nat64,sha256:e.Vec(e.Nat8),total_length:e.Nat}),w=e.Record({key:T,updated_at:e.Nat64,encodings:e.Vec(e.Tuple(e.Text,v)),headers:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,version:e.Opt(e.Nat64)}),b=e.Record({derivation_origin:e.Opt(e.Text)}),C=e.Record({internet_identity:e.Opt(b)}),x=e.Record({stable:e.Opt(e.Nat64),heap:e.Opt(e.Nat64)}),N=e.Record({max_memory_size:e.Opt(x)}),R=e.Variant({Deny:e.Null,AllowAny:e.Null,SameOrigin:e.Null}),V=e.Variant({Deny:e.Null,Allow:e.Null}),A=e.Record({status_code:e.Nat16,location:e.Text}),M=e.Record({iframe:e.Opt(R),rewrites:e.Vec(e.Tuple(e.Text,e.Text)),headers:e.Vec(e.Tuple(e.Text,e.Vec(e.Tuple(e.Text,e.Text)))),max_memory_size:e.Opt(x),raw_access:e.Opt(V),redirects:e.Opt(e.Vec(e.Tuple(e.Text,A)))}),k=e.Record({db:e.Opt(N),authentication:e.Opt(C),storage:M}),$=e.Record({updated_at:e.Nat64,owner:e.Principal,data:e.Vec(e.Nat8),description:e.Opt(e.Text),created_at:e.Nat64,version:e.Opt(e.Nat64)}),G=e.Variant({Heap:e.Null,Stable:e.Null}),j=e.Variant({Controllers:e.Null,Private:e.Null,Public:e.Null,Managed:e.Null}),X=e.Record({max_tokens:e.Nat64,time_per_token_ns:e.Nat64}),Z=e.Record({max_capacity:e.Opt(e.Nat32),memory:e.Opt(G),updated_at:e.Nat64,max_size:e.Opt(e.Nat),read:j,created_at:e.Nat64,version:e.Opt(e.Nat64),mutable_permissions:e.Opt(e.Bool),rate_config:e.Opt(X),write:j}),J=e.Record({url:e.Text,method:e.Text,body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text)),certificate_version:e.Opt(e.Nat16)}),z=e.Record({memory:G,token:e.Opt(e.Text),sha256:e.Opt(e.Vec(e.Nat8)),headers:e.Vec(e.Tuple(e.Text,e.Text)),index:e.Nat64,encoding_type:e.Text,full_path:e.Text}),et=e.Variant({Callback:e.Record({token:z,callback:e.Func([],[],["query"])})}),tt=e.Record({body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text)),streaming_strategy:e.Opt(et),status_code:e.Nat16}),xe=e.Record({token:e.Opt(z),body:e.Vec(e.Nat8)}),rt=e.Record({token:e.Opt(e.Text),collection:e.Text,name:e.Text,description:e.Opt(e.Text),encoding_type:e.Opt(e.Text),full_path:e.Text}),hn=e.Record({batch_id:e.Nat}),yn=e.Record({matches_pages:e.Opt(e.Nat64),matches_length:e.Nat64,items_page:e.Opt(e.Nat64),items:e.Vec(e.Tuple(e.Text,w)),items_length:e.Nat64}),_n=e.Record({updated_at:e.Nat64,created_at:e.Nat64,version:e.Opt(e.Nat64),bn_id:e.Opt(e.Text)}),gn=e.Record({matches_pages:e.Opt(e.Nat64),matches_length:e.Nat64,items_page:e.Opt(e.Nat64),items:e.Vec(e.Tuple(e.Text,$)),items_length:e.Nat64}),Tn=e.Record({stable:e.Nat64,heap:e.Nat64}),bn=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),scope:d,expires_at:e.Opt(e.Nat64)}),xn=e.Record({controller:bn,controllers:e.Vec(e.Principal)}),At=e.Record({data:e.Vec(e.Nat8),description:e.Opt(e.Text),version:e.Opt(e.Nat64)}),wn=e.Record({max_capacity:e.Opt(e.Nat32),memory:e.Opt(G),max_size:e.Opt(e.Nat),read:j,version:e.Opt(e.Nat64),mutable_permissions:e.Opt(e.Bool),rate_config:e.Opt(X),write:j}),Pn=e.Record({content:e.Vec(e.Nat8),batch_id:e.Nat,order_id:e.Opt(e.Nat)}),vn=e.Record({chunk_id:e.Nat});return e.Service({build_version:e.Func([],[e.Text],["query"]),commit_asset_upload:e.Func([t],[],[]),count_assets:e.Func([e.Text,c],[e.Nat64],["query"]),count_collection_assets:e.Func([e.Text],[e.Nat64],["query"]),count_collection_docs:e.Func([e.Text],[e.Nat64],["query"]),count_docs:e.Func([e.Text,c],[e.Nat64],["query"]),del_asset:e.Func([e.Text,e.Text],[],[]),del_assets:e.Func([e.Text],[],[]),del_controllers:e.Func([p],[e.Vec(e.Tuple(e.Principal,g))],[]),del_custom_domain:e.Func([e.Text],[],[]),del_doc:e.Func([e.Text,e.Text,y],[],[]),del_docs:e.Func([e.Text],[],[]),del_filtered_assets:e.Func([e.Text,c],[],[]),del_filtered_docs:e.Func([e.Text,c],[],[]),del_many_assets:e.Func([e.Vec(e.Tuple(e.Text,e.Text))],[],[]),del_many_docs:e.Func([e.Vec(e.Tuple(e.Text,e.Text,y))],[],[]),del_rule:e.Func([h,e.Text,u],[],[]),deposit_cycles:e.Func([m],[],[]),get_asset:e.Func([e.Text,e.Text],[e.Opt(w)],["query"]),get_auth_config:e.Func([],[e.Opt(C)],["query"]),get_config:e.Func([],[k],[]),get_db_config:e.Func([],[e.Opt(N)],["query"]),get_doc:e.Func([e.Text,e.Text],[e.Opt($)],["query"]),get_many_assets:e.Func([e.Vec(e.Tuple(e.Text,e.Text))],[e.Vec(e.Tuple(e.Text,e.Opt(w)))],["query"]),get_many_docs:e.Func([e.Vec(e.Tuple(e.Text,e.Text))],[e.Vec(e.Tuple(e.Text,e.Opt($)))],["query"]),get_rule:e.Func([h,e.Text],[e.Opt(Z)],["query"]),get_storage_config:e.Func([],[M],["query"]),http_request:e.Func([J],[tt],["query"]),http_request_streaming_callback:e.Func([z],[xe],["query"]),init_asset_upload:e.Func([rt],[hn],[]),list_assets:e.Func([e.Text,c],[yn],["query"]),list_controllers:e.Func([],[e.Vec(e.Tuple(e.Principal,g))],["query"]),list_custom_domains:e.Func([],[e.Vec(e.Tuple(e.Text,_n))],["query"]),list_docs:e.Func([e.Text,c],[gn],["query"]),list_rules:e.Func([h],[e.Vec(e.Tuple(e.Text,Z))],["query"]),memory_size:e.Func([],[Tn],["query"]),set_auth_config:e.Func([C],[],[]),set_controllers:e.Func([xn],[e.Vec(e.Tuple(e.Principal,g))],[]),set_custom_domain:e.Func([e.Text,e.Opt(e.Text)],[],[]),set_db_config:e.Func([N],[],[]),set_doc:e.Func([e.Text,e.Text,At],[$],[]),set_many_docs:e.Func([e.Vec(e.Tuple(e.Text,e.Text,At))],[e.Vec(e.Tuple(e.Text,$))],[]),set_rule:e.Func([h,e.Text,wn],[Z],[]),set_storage_config:e.Func([M],[],[]),upload_asset_chunk:e.Func([Pn],[vn],[]),version:e.Func([],[e.Text],["query"])})};import{Actor as On,HttpAgent as Fn}from"@dfinity/agent";import{nonNullish as qt}from"@junobuild/utils";var jt=async({canisterId:e,idlFactory:t,config:r,...n})=>{let o=await q(n);return On.createActor(t,{agent:o,canisterId:e,...r??{}})},q=async({agent:e,...t})=>e??await En(t),En=async({identity:e,fetch:t,container:r})=>{let n=qt(r)&&r!==!1,o=n?r===!0?"http://127.0.0.1:5987":r:"https://icp-api.io";return await Fn.create({identity:e,host:o,retryTimes:10,...qt(t)&&{fetch:t},shouldFetchRootKey:n})};var zt=({satelliteId:e,...t})=>me({canisterId:e,...t,idlFactory:Ut}),O=({satelliteId:e,...t})=>me({canisterId:e,...t,idlFactory:$t}),Ht=({satelliteId:e,...t})=>me({canisterId:e,...t,idlFactory:Bt}),ie=({missionControlId:e,...t})=>me({canisterId:e,...t,idlFactory:kt}),Pe=({orbiterId:e,...t})=>me({canisterId:e,...t,idlFactory:Mt}),me=({canisterId:e,idlFactory:t,...r})=>{if(kn(e))throw new Error("No canister ID provided.");return jt({canisterId:e,idlFactory:t,...r})};var Kt=async({missionControl:e})=>(await ie(e)).version(),Wt=async({missionControl:e})=>(await ie(e)).get_user(),Gt=async({missionControl:e})=>(await ie(e)).list_mission_control_controllers(),Xt=async({missionControl:e,satelliteIds:t,controllerIds:r,controller:n})=>(await ie(e)).set_satellites_controllers(t,r,n),Zt=async({missionControl:e,controllerIds:t,controller:r})=>(await ie(e)).set_mission_control_controllers(t,r);import{Principal as Mn}from"@dfinity/principal";import{nonNullish as Bn,toNullable as Un}from"@junobuild/utils";var nt=({controllerId:e,profile:t})=>({controllerIds:[Mn.fromText(e)],controller:$n(t)}),$n=e=>({metadata:Bn(e)&&e!==""?[["profile",e]]:[],expires_at:Un(void 0),scope:{Admin:null}});var ai=({controllerId:e,profile:t,...r})=>Xt({...r,...nt({controllerId:e,profile:t})}),ci=({controllerId:e,profile:t,...r})=>Zt({...r,...nt({controllerId:e,profile:t})}),li=e=>Gt(e);import{Principal as So}from"@dfinity/principal";var fe={reinstall:null},re={upgrade:[{skip_pre_upgrade:[!1],wasm_memory_persistence:[{replace:null}]}]};import{fromNullable as Yn,isNullish as Qn}from"@junobuild/utils";import{CanisterStatus as qn}from"@dfinity/agent";import{ICManagementCanister as I}from"@dfinity/ic-management";import{Principal as jn}from"@dfinity/principal";import{assertNonNullish as zn}from"@junobuild/utils";var Jt=async({canisterId:e,actor:t})=>{let r=await q(t),{stopCanister:n}=I.create({agent:r});await n(e)},Yt=async({canisterId:e,actor:t})=>{let r=await q(t),{startCanister:n}=I.create({agent:r});await n(e)},Qt=async({actor:e,code:t})=>{let r=await q(e),{installCode:n}=I.create({agent:r});return n(t)},It=async({actor:e,canisterId:t})=>{let r=await q(e),{storedChunks:n}=I.create({agent:r});return n({canisterId:t})},ve=async({actor:e,canisterId:t})=>{let r=await q(e),{clearChunkStore:n}=I.create({agent:r});return n({canisterId:t})},Dt=async({actor:e,chunk:t})=>{let r=await q(e),{uploadChunk:n}=I.create({agent:r});return n(t)},Lt=async({actor:e,code:t})=>{let r=await q(e),{installChunkedCode:n}=I.create({agent:r});return n(t)},er=async({actor:e,canisterId:t})=>{let r=await q(e),{canisterStatus:n}=I.create({agent:r});return n(t)},tr=async({canisterId:e,path:t,...r})=>{zn(e,"A canister ID must be provided to request its status.");let n=await q(r);return(await qn.request({canisterId:jn.from(e),agent:n,paths:[{kind:"metadata",key:t,path:t,decodeStrategy:"utf-8"}]})).get(t)};var rr=(o=>(o[o.AssertingExistingCode=0]="AssertingExistingCode",o[o.StoppingCanister=1]="StoppingCanister",o[o.UpgradingCode=2]="UpgradingCode",o[o.RestartingCanister=3]="RestartingCanister",o))(rr||{});var Ce=e=>(e instanceof Uint8Array||(e=Uint8Array.from(e)),e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),""));var nr=e=>crypto.subtle.digest("SHA-256",e),or=e=>Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join(""),ir=async e=>{let t=await nr(await e.arrayBuffer());return or(t)},Ne=async e=>{let t=await nr(e);return or(t)};import{isNullish as Kn,nonNullish as sr}from"@junobuild/utils";var ar=async({actor:e,canisterId:t,missionControlId:r,wasmModule:n,preClearChunks:o,...i})=>{o&&await ve({actor:e,canisterId:t});let a=await Wn({wasmModule:n}),{uploadChunks:c,storedChunks:p,preClearChunks:d,postClearChunks:g}=await Gn({actor:e,wasmChunks:a,canisterId:t,missionControlId:r});d&&await ve({actor:e,canisterId:t});let y=[];for await(let h of Xn({uploadChunks:c,actor:e,canisterId:t,missionControlId:r}))y=[...y,...h];await Lt({actor:e,code:{...i,chunkHashesList:[...y,...p].sort(({orderId:h},{orderId:u})=>h-u).map(({chunkHash:h})=>h),targetCanisterId:t,storeCanisterId:r,wasmModuleHash:await Ne(n)}}),g&&await ve({actor:e,canisterId:t})},Wn=async({wasmModule:e})=>{let t=new Blob([e]),r=[],n=1e6,o=0;for(let i=0;i<t.size;i+=n){let a=t.slice(i,i+n);r.push({chunk:a,orderId:o,sha256:await ir(a)}),o++}return r},Gn=async({canisterId:e,missionControlId:t,actor:r,wasmChunks:n})=>{let o=await It({actor:r,canisterId:t??e}),i=o.map(({hash:p})=>({chunkHash:{hash:p},sha256:Ce(p)})),{storedChunks:a,uploadChunks:c}=n.reduce(({uploadChunks:p,storedChunks:d},{sha256:g,...y})=>{let h=i.find(({sha256:u})=>u===g);return{uploadChunks:[...p,...sr(h)?[]:[{sha256:g,...y}]],storedChunks:[...d,...sr(h)?[{...y,...h}]:[]]}},{uploadChunks:[],storedChunks:[]});return{uploadChunks:c,storedChunks:a,preClearChunks:o.length>0&&a.length===0,postClearChunks:Kn(t)}};async function*Xn({uploadChunks:e,limit:t=12,...r}){for(let n=0;n<e.length;n=n+t){let o=e.slice(n,n+t);yield await Promise.all(o.map(a=>Zn({uploadChunk:a,...r})))}}var Zn=async({actor:e,canisterId:t,missionControlId:r,uploadChunk:{chunk:n,...o}})=>({chunkHash:await Dt({actor:e,chunk:{canisterId:r??t,chunk:new Uint8Array(await n.arrayBuffer())}}),...o});var cr=async({actor:e,...t})=>{await Qt({actor:e,code:t})};var ne=async({wasmModule:e,canisterId:t,actor:r,onProgress:n,...o})=>{await Se({fn:async()=>await In({wasmModule:e,canisterId:t,actor:r,...o}),onProgress:n,step:0}),await Se({fn:async()=>await Jt({canisterId:t,actor:r}),onProgress:n,step:1});try{await Se({fn:async()=>await Dn({wasmModule:e,canisterId:t,actor:r,...o}),onProgress:n,step:2})}finally{await Se({fn:async()=>await Yt({canisterId:t,actor:r}),onProgress:n,step:3})}},Se=async({fn:e,step:t,onProgress:r})=>{r?.({step:t,state:"in_progress"});try{await e(),r?.({step:t,state:"success"})}catch(n){throw r?.({step:t,state:"error"}),n}},In=async({actor:e,canisterId:t,wasmModule:r,reset:n})=>{if(n===!0)return;let{module_hash:o}=await er({actor:e,canisterId:t}),i=Yn(o);if(Qn(i))return;let a=await Ne(r),c=Ce(i);if(a===c)throw new we},Dn=async({wasmModule:e,canisterId:t,actor:r,...n})=>{await((new Blob([e]).size>2e6?"chunked":"simple")==="chunked"?ar:cr)({wasmModule:e,canisterId:t,actor:r,...n})};var ee=Et(Ct(),1),Vr=e=>ee.IDL.encode([ee.IDL.Record({user:ee.IDL.Principal})],[{user:e}]),Je=e=>ee.IDL.encode([ee.IDL.Record({controllers:ee.IDL.Vec(ee.IDL.Principal)})],[{controllers:e.map(([t,r])=>t)}]);var rs=async({missionControl:e,...t})=>{let r=await Wt({missionControl:e}),{missionControlId:n,...o}=e;if(!n)throw new Error("No mission control principal defined.");let i=Vr(r);await ne({actor:o,canisterId:So.fromText(n),arg:new Uint8Array(i),mode:re,...t})};var is=e=>Kt(e);var Ar=async({orbiter:e})=>(await Pe(e)).version(),Ye=async({orbiter:e})=>(await Pe(e)).list_controllers(),Or=async({orbiter:e})=>{let{memory_size:t}=await Pe(e);return t()};var us=e=>Ye(e);var ms=e=>Or(e);import{Principal as Ro}from"@dfinity/principal";var bs=async({orbiter:e,reset:t=!1,...r})=>{let{orbiterId:n,...o}=e;if(!n)throw new Error("No orbiter principal defined.");let i=await Ye({orbiter:e}),a=Je(i);await ne({actor:o,canisterId:Ro.fromText(n),arg:new Uint8Array(a),mode:t?fe:re,reset:t,...r})};var Ps=e=>Ar(e);import{major as Fr,minor as Er,patch as kr}from"semver";var Ns=({currentVersion:e,selectedVersion:t})=>{let r=Fr(e),n=Fr(t),o=Er(e),i=Er(t),a=kr(e),c=kr(t);return r<n-1||o<i-1||a<c-1?{canUpgrade:!1}:{canUpgrade:!0}};import{toNullable as Vo}from"@junobuild/utils";var Mr=async({config:e,satellite:t})=>{let{set_storage_config:r}=await O(t);return r(e)},Br=async({config:e,satellite:t})=>{let{set_db_config:r}=await O(t);return r(e)},Ur=async({config:e,satellite:t})=>{let{set_auth_config:r}=await O(t);return r(e)};var $r=async({satellite:e})=>{let{get_auth_config:t}=await O(e);return t()},qr=async({satellite:e,type:t})=>(await O(e)).list_rules(t),jr=async({type:e,collection:t,rule:r,satellite:n})=>{let{set_rule:o}=await O(n);return o(e,t,r)},zr=async({satellite:e})=>{let{version:t}=await O(e);return t()},Hr=async({satellite:e})=>{let{build_version:t}=await O(e);return t()},Kr=async({satellite:e})=>(await zt(e)).list_controllers(),Qe=async({satellite:e})=>(await Ht(e)).list_controllers(),Ie=async({satellite:e})=>(await O(e)).list_controllers(),Wr=async({satellite:e})=>{let{list_custom_domains:t}=await O(e);return t()},Gr=async({satellite:e,domainName:t,boundaryNodesId:r})=>{let{set_custom_domain:n}=await O(e);await n(t,Vo(r))},Xr=async({satellite:e})=>{let{memory_size:t}=await O(e);return t()},Zr=async({collection:e,satellite:t})=>{let{count_collection_docs:r}=await O(t);return r(e)},Jr=async({collection:e,satellite:t})=>{let{count_collection_assets:r}=await O(t);return r(e)},Yr=async({collection:e,satellite:t})=>{let{del_docs:r}=await O(t);return r(e)},Qr=async({collection:e,satellite:t})=>{let{del_assets:r}=await O(t);return r(e)},Ir=async({args:e,satellite:t})=>{let{set_controllers:r}=await O(t);return r(e)};var Fs=e=>Jr(e),Es=e=>Qr(e);import{fromNullable as De,isNullish as Lr,nonNullish as Dr}from"@junobuild/utils";import{nonNullish as Ao,toNullable as Nt}from"@junobuild/utils";var St=e=>Nt(Ao(e)?{heap:Nt(e.heap),stable:Nt(e.stable)}:void 0);var js=async({config:{headers:e,rewrites:t,redirects:r,iframe:n,rawAccess:o,maxMemorySize:i},satellite:a})=>{let c=(e??[]).map(({source:h,headers:u})=>[h,u]),p=(t??[]).map(({source:h,destination:u})=>[h,u]),d=(r??[]).map(({source:h,location:u,code:m})=>[h,{status_code:m,location:u}]);return await Mr({satellite:a,config:{headers:c,rewrites:p,redirects:[d],iframe:[n==="same-origin"?{SameOrigin:null}:n==="allow-any"?{AllowAny:null}:{Deny:null}],raw_access:[o===!0?{Allow:null}:{Deny:null}],max_memory_size:St(i)}})},zs=async({config:{maxMemorySize:e},...t})=>{await Br({config:{max_memory_size:St(e)},...t})},Hs=async({config:{internetIdentity:e},...t})=>{await Ur({config:{internet_identity:Lr(e?.derivationOrigin)?[]:[{derivation_origin:[e.derivationOrigin]}]},...t})},Ks=async({satellite:e})=>{let t=De(await $r({satellite:e}));if(Lr(t))return;let r=De(t.internet_identity??[]);return{...Dr(r)&&{internetIdentity:{...Dr(De(r.derivation_origin))&&{derivationOrigin:De(r.derivation_origin)}}}}};var Xs=({deprecatedNoScope:e,...t})=>(e===!0?Qe:Ie)(t),Zs=e=>Ir(e);var Qs=e=>Zr(e),Is=e=>Yr(e);import{fromNullable as en,nonNullish as Oo}from"@junobuild/utils";var ta=async({satellite:e})=>(await Wr({satellite:e})).map(([r,n])=>{let o=en(n.version);return{domain:r,bn_id:en(n.bn_id),created_at:n.created_at,updated_at:n.updated_at,...Oo(o)&&{version:o}}}),ra=({satellite:e,domains:t})=>Promise.all(t.map(({domain:r,bn_id:n})=>Gr({satellite:e,domainName:r,boundaryNodesId:n})));var ia=e=>Xr(e);import{fromNullable as pe,nonNullish as te,toNullable as Le}from"@junobuild/utils";var tn={Db:null},rn={Storage:null},nn={Public:null},on={Private:null},sn={Managed:null},an={Controllers:null},Rt={Heap:null},cn={Stable:null},ln=600000000n;var Vt=e=>e==="storage"?rn:tn,pn=({read:e,write:t,memory:r,maxSize:n,maxCapacity:o,version:i,mutablePermissions:a,maxTokens:c})=>({read:dn(e),write:dn(t),memory:te(r)?[Fo(r)]:[],version:Le(i),max_size:Le(te(n)&&n>0?BigInt(n):void 0),max_capacity:Le(te(o)&&o>0?o:void 0),mutable_permissions:Le(a),rate_config:te(c)?[{max_tokens:BigInt(c),time_per_token_ns:ln}]:[]}),mn=([e,t])=>{let{read:r,write:n,updated_at:o,created_at:i,max_size:a,max_capacity:c,memory:p,mutable_permissions:d,version:g,rate_config:y}=t,h=a?.[0]??0n>0n?Number(pe(a)):void 0,u=c?.[0]??!1?pe(c):void 0,m=pe(g),T=y?.[0]?.max_tokens??0n>0n?pe(y)?.max_tokens:void 0;return{collection:e,read:un(r),write:un(n),memory:Eo(pe(p)??Rt),updatedAt:o,createdAt:i,...te(m)&&{version:m},...te(h)&&{maxSize:h},...te(u)&&{maxCapacity:u},mutablePermissions:pe(d)??!0,...te(T)&&{maxTokens:Number(T)}}},un=e=>"Public"in e?"public":"Private"in e?"private":"Managed"in e?"managed":"controllers",dn=e=>{switch(e){case"public":return nn;case"private":return on;case"managed":return sn;default:return an}},Fo=e=>{switch(e.toLowerCase()){case"heap":return Rt;default:return cn}},Eo=e=>"Heap"in e?"heap":"stable";var ma=async({type:e,satellite:t})=>(await qr({satellite:t,type:Vt(e)})).map(n=>mn(n)),fa=async({rule:{collection:e,...t},type:r,satellite:n})=>{await jr({type:Vt(r),rule:pn(t),satellite:n,collection:e})};var be=Et(Ct(),1);import{Principal as fn}from"@dfinity/principal";import{isNullish as ko}from"@junobuild/utils";var wa=async({satellite:e,deprecated:t,deprecatedNoScope:r,reset:n=!1,...o})=>{let{satelliteId:i,...a}=e;if(ko(i))throw new Error("No satellite principal defined.");if(t){let g=await Kr({satellite:e}),y=be.IDL.encode([be.IDL.Record({controllers:be.IDL.Vec(be.IDL.Principal)})],[{controllers:g}]);await ne({actor:a,canisterId:fn.fromText(i),arg:new Uint8Array(y),mode:n?fe:re,reset:n,...o});return}let p=await(r?Qe:Ie)({satellite:e}),d=Je(p);await ne({actor:a,canisterId:fn.fromText(i),arg:new Uint8Array(d),mode:n?fe:re,reset:n,...o})};import{nonNullish as Mo}from"@junobuild/utils";var Sa=e=>zr(e),Ra=e=>Hr(e),Va=async({satellite:{satelliteId:e,...t}})=>{let r=await tr({...t,canisterId:e,path:"juno:build"});return Mo(r)&&["stock","extended"].includes(r)?r:void 0};export{rr as UpgradeCodeProgressStep,we as UpgradeCodeUnchangedError,ir as blobSha256,Ns as checkUpgradeVersion,Fs as countAssets,Qs as countDocs,Es as deleteAssets,Is as deleteDocs,Ks as getAuthConfig,ta as listCustomDomains,li as listMissionControlControllers,us as listOrbiterControllers,ma as listRules,Xs as listSatelliteControllers,is as missionControlVersion,ms as orbiterMemorySize,Ps as orbiterVersion,Va as satelliteBuildType,Ra as satelliteBuildVersion,ia as satelliteMemorySize,Sa as satelliteVersion,Hs as setAuthConfig,ra as setCustomDomains,zs as setDatastoreConfig,ci as setMissionControlController,fa as setRule,Zs as setSatelliteControllers,ai as setSatellitesController,js as setStorageConfig,Ne as uint8ArraySha256,rs as upgradeMissionControl,bs as upgradeOrbiter,wa as upgradeSatellite};
|
|
15
|
+
`)}return p.encodeValue(d)}));return(0,_.concat)(n,o,i,a,c)}s.encode=mo;function fo(e,t){let r=new _.PipeArrayBuffer(t);if(t.byteLength<Ee.length)throw new Error("Message length smaller than magic number");let n=(0,l.safeRead)(r,Ee.length),o=new TextDecoder().decode(n);if(o!==Ee)throw new Error("Wrong magic number: "+JSON.stringify(o));function i(u){let m=[],T=Number((0,l.lebDecode)(u));for(let b=0;b<T;b++){let C=Number((0,l.slebDecode)(u));switch(C){case-18:case-19:{let x=Number((0,l.slebDecode)(u));m.push([C,x]);break}case-20:case-21:{let x=[],N=Number((0,l.lebDecode)(u)),R;for(;N--;){let V=Number((0,l.lebDecode)(u));if(V>=Math.pow(2,32))throw new Error("field id out of 32-bit range");if(typeof R=="number"&&R>=V)throw new Error("field id collision or not sorted");R=V;let A=Number((0,l.slebDecode)(u));x.push([V,A])}m.push([C,x]);break}case-22:{let x=[],N=Number((0,l.lebDecode)(u));for(;N--;)x.push(Number((0,l.slebDecode)(u)));let R=[],V=Number((0,l.lebDecode)(u));for(;V--;)R.push(Number((0,l.slebDecode)(u)));let A=[],M=Number((0,l.lebDecode)(u));for(;M--;)switch(Number((0,l.lebDecode)(u))){case 1:{A.push("query");break}case 2:{A.push("oneway");break}case 3:{A.push("composite_query");break}default:throw new Error("unknown annotation")}m.push([C,[x,R,A]]);break}case-23:{let x=Number((0,l.lebDecode)(u)),N=[];for(;x--;){let R=Number((0,l.lebDecode)(u)),V=new TextDecoder().decode((0,l.safeRead)(u,R)),A=(0,l.slebDecode)(u);N.push([V,A])}m.push([C,N]);break}default:throw new Error("Illegal op_code: "+C)}}let v=[],w=Number((0,l.lebDecode)(u));for(let b=0;b<w;b++)v.push(Number((0,l.slebDecode)(u)));return[m,v]}let[a,c]=i(r);if(c.length<e.length)throw new Error("Wrong number of return values");let p=a.map(u=>xr());function d(u){if(u<-24)throw new Error("future value not supported");if(u<0)switch(u){case-1:return s.Null;case-2:return s.Bool;case-3:return s.Nat;case-4:return s.Int;case-5:return s.Nat8;case-6:return s.Nat16;case-7:return s.Nat32;case-8:return s.Nat64;case-9:return s.Int8;case-10:return s.Int16;case-11:return s.Int32;case-12:return s.Int64;case-13:return s.Float32;case-14:return s.Float64;case-15:return s.Text;case-16:return s.Reserved;case-17:return s.Empty;case-24:return s.Principal;default:throw new Error("Illegal op_code: "+u)}if(u>=a.length)throw new Error("type index out of range");return p[u]}function g(u){switch(u[0]){case-19:{let m=d(u[1]);return _r(m)}case-18:{let m=d(u[1]);return gr(m)}case-20:{let m={};for(let[w,b]of u[1]){let C=`_${w}_`;m[C]=d(b)}let T=Tr(m),v=T.tryAsTuple();return Array.isArray(v)?yr(...v):T}case-21:{let m={};for(let[T,v]of u[1]){let w=`_${T}_`;m[w]=d(v)}return br(m)}case-22:{let[m,T,v]=u[1];return wr(m.map(w=>d(w)),T.map(w=>d(w)),v)}case-23:{let m={},T=u[1];for(let[v,w]of T){let b=d(w);if(b instanceof D&&(b=b.getType()),!(b instanceof ge))throw new Error("Illegal service definition: services can only contain functions");m[v]=b}return Pr(m)}default:throw new Error("Illegal op_code: "+u[0])}}a.forEach((u,m)=>{if(u[0]===-22){let T=g(u);p[m].fill(T)}}),a.forEach((u,m)=>{if(u[0]!==-22){let T=g(u);p[m].fill(T)}});let y=c.map(u=>d(u)),h=e.map((u,m)=>u.decodeValue(r,y[m]));for(let u=e.length;u<y.length;u++)y[u].decodeValue(r,y[u]);if(r.byteLength>0)throw new Error("decode: Left-over bytes");return h}s.decode=fo;s.Empty=new ke;s.Reserved=new ce;s.Unknown=new Me;s.Bool=new Be;s.Null=new Ue;s.Text=new $e;s.Int=new qe;s.Nat=new je;s.Float32=new ye(32);s.Float64=new ye(64);s.Int8=new Q(8);s.Int16=new Q(16);s.Int32=new Q(32);s.Int64=new Q(64);s.Nat8=new K(8);s.Nat16=new K(16);s.Nat32=new K(32);s.Nat64=new K(64);s.Principal=new We;function yr(...e){return new He(e)}s.Tuple=yr;function _r(e){return new ze(e)}s.Vec=_r;function gr(e){return new le(e)}s.Opt=gr;function Tr(e){return new _e(e)}s.Record=Tr;function br(e){return new Ke(e)}s.Variant=br;function xr(){return new D}s.Rec=xr;function wr(e,t,r=[]){return new ge(e,t,r)}s.Func=wr;function Pr(e){return new Ge(e)}s.Service=Pr});var Tt=Y(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.VecForm=E.OptionForm=E.VariantForm=E.TupleForm=E.RecordForm=E.InputForm=E.InputBox=void 0;var mt=class{constructor(t,r){this.idl=t,this.ui=r,this.label=null,this.value=void 0;let n=document.createElement("span");n.className="status",this.status=n,r.input&&(r.input.addEventListener("blur",()=>{r.input.value!==""&&this.parse()}),r.input.addEventListener("input",()=>{n.style.display="none",r.input.classList.remove("reject")}))}isRejected(){return this.value===void 0}parse(t={}){if(this.ui.form){let r=this.ui.form.parse(t);return this.value=r,r}if(this.ui.input){let r=this.ui.input;try{let n=this.ui.parse(this.idl,t,r.value);if(!this.idl.covariant(n))throw new Error(`${r.value} is not of type ${this.idl.display()}`);return this.status.style.display="none",this.value=n,n}catch(n){r.classList.add("reject"),this.status.style.display="block",this.status.innerHTML="InputError: "+n.message,this.value=void 0;return}}return null}render(t){let r=document.createElement("span");if(this.label){let n=document.createElement("label");n.innerText=this.label,r.appendChild(n)}this.ui.input&&(r.appendChild(this.ui.input),r.appendChild(this.status)),this.ui.form&&this.ui.form.render(r),t.appendChild(r)}};E.InputBox=mt;var L=class{constructor(t){this.ui=t,this.form=[]}renderForm(t){this.ui.container?(this.form.forEach(r=>r.render(this.ui.container)),t.appendChild(this.ui.container)):this.form.forEach(r=>r.render(t))}render(t){if(this.ui.open&&this.ui.event){t.appendChild(this.ui.open);let r=this;r.ui.open.addEventListener(r.ui.event,()=>{if(r.ui.container)r.ui.container.innerHTML="";else{let n=r.ui.open.nextElementSibling;n&&n.parentNode.removeChild(n)}r.generateForm(),r.renderForm(t)})}else this.generateForm(),this.renderForm(t)}};E.InputForm=L;var ft=class extends L{constructor(t,r){super(r),this.fields=t,this.ui=r}generateForm(){this.form=this.fields.map(([t,r])=>{let n=this.ui.render(r);return this.ui.labelMap&&this.ui.labelMap.hasOwnProperty(t)?n.label=this.ui.labelMap[t]+" ":n.label=t+" ",n})}parse(t){let r={};if(this.fields.forEach(([n,o],i)=>{let a=this.form[i].parse(t);r[n]=a}),!this.form.some(n=>n.isRejected()))return r}};E.RecordForm=ft;var ht=class extends L{constructor(t,r){super(r),this.components=t,this.ui=r}generateForm(){this.form=this.components.map(t=>this.ui.render(t))}parse(t){let r=[];if(this.components.forEach((n,o)=>{let i=this.form[o].parse(t);r.push(i)}),!this.form.some(n=>n.isRejected()))return r}};E.TupleForm=ht;var yt=class extends L{constructor(t,r){super(r),this.fields=t,this.ui=r}generateForm(){let t=this.ui.open.selectedIndex,[r,n]=this.fields[t],o=this.ui.render(n);this.form=[o]}parse(t){let r=this.ui.open,n=r.options[r.selectedIndex].value,o=this.form[0].parse(t);if(o===void 0)return;let i={};return i[n]=o,i}};E.VariantForm=yt;var _t=class extends L{constructor(t,r){super(r),this.ty=t,this.ui=r}generateForm(){if(this.ui.open.checked){let t=this.ui.render(this.ty);this.form=[t]}else this.form=[]}parse(t){if(this.form.length===0)return[];{let r=this.form[0].parse(t);return r===void 0?void 0:[r]}}};E.OptionForm=_t;var gt=class extends L{constructor(t,r){super(r),this.ty=t,this.ui=r}generateForm(){let t=+this.ui.open.value;this.form=[];for(let r=0;r<t;r++){let n=this.ui.render(this.ty);this.form.push(n)}}parse(t){let r=this.form.map(n=>n.parse(t));if(!this.form.some(n=>n.isRejected()))return r}};E.VecForm=gt});var Cr=Y(f=>{"use strict";var ho=f&&f.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),yo=f&&f.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),vr=f&&f.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&ho(t,e,r);return yo(t,e),t};Object.defineProperty(f,"__esModule",{value:!0});f.renderValue=f.renderInput=f.Render=f.vecForm=f.optForm=f.variantForm=f.tupleForm=f.recordForm=f.inputBox=void 0;var Ze=vr(pt()),bt=Ft("@dfinity/principal"),ue=vr(Tt()),_o={parse:vo},Te={render:vt},go=(e,t)=>new ue.InputBox(e,Object.assign(Object.assign({},_o),t));f.inputBox=go;var To=(e,t)=>new ue.RecordForm(e,Object.assign(Object.assign({},Te),t));f.recordForm=To;var bo=(e,t)=>new ue.TupleForm(e,Object.assign(Object.assign({},Te),t));f.tupleForm=bo;var xo=(e,t)=>new ue.VariantForm(e,Object.assign(Object.assign({},Te),t));f.variantForm=xo;var wo=(e,t)=>new ue.OptionForm(e,Object.assign(Object.assign({},Te),t));f.optForm=wo;var Po=(e,t)=>new ue.VecForm(e,Object.assign(Object.assign({},Te),t));f.vecForm=Po;var Xe=class extends Ze.Visitor{visitType(t,r){let n=document.createElement("input");return n.classList.add("argument"),n.placeholder=t.display(),(0,f.inputBox)(t,{input:n})}visitNull(t,r){return(0,f.inputBox)(t,{})}visitRecord(t,r,n){let o={};if(r.length>1){let a=document.createElement("div");a.classList.add("popup-form"),o={container:a}}let i=(0,f.recordForm)(r,o);return(0,f.inputBox)(t,{form:i})}visitTuple(t,r,n){let o={};if(r.length>1){let a=document.createElement("div");a.classList.add("popup-form"),o={container:a}}let i=(0,f.tupleForm)(r,o);return(0,f.inputBox)(t,{form:i})}visitVariant(t,r,n){let o=document.createElement("select");for(let[c,p]of r){let d=new Option(c);o.add(d)}o.selectedIndex=-1,o.classList.add("open");let i={open:o,event:"change"},a=(0,f.variantForm)(r,i);return(0,f.inputBox)(t,{form:a})}visitOpt(t,r,n){let o=document.createElement("input");o.type="checkbox",o.classList.add("open");let i=(0,f.optForm)(r,{open:o,event:"change"});return(0,f.inputBox)(t,{form:i})}visitVec(t,r,n){let o=document.createElement("input");o.type="number",o.min="0",o.max="100",o.style.width="8rem",o.placeholder="len",o.classList.add("open");let i=document.createElement("div");i.classList.add("popup-form");let a=(0,f.vecForm)(r,{open:o,event:"change",container:i});return(0,f.inputBox)(t,{form:a})}visitRec(t,r,n){return vt(r)}};f.Render=Xe;var xt=class extends Ze.Visitor{visitNull(t,r){return null}visitBool(t,r){if(r==="true")return!0;if(r==="false")return!1;throw new Error(`Cannot parse ${r} as boolean`)}visitText(t,r){return r}visitFloat(t,r){return parseFloat(r)}visitFixedInt(t,r){return t._bits<=32?parseInt(r,10):BigInt(r)}visitFixedNat(t,r){return t._bits<=32?parseInt(r,10):BigInt(r)}visitNumber(t,r){return BigInt(r)}visitPrincipal(t,r){return bt.Principal.fromText(r)}visitService(t,r){return bt.Principal.fromText(r)}visitFunc(t,r){let n=r.split(".",2);return[bt.Principal.fromText(n[0]),n[1]]}},wt=class extends Ze.Visitor{visitNull(t,r){return null}visitBool(t,r){return Math.random()<.5}visitText(t,r){return Math.random().toString(36).substring(6)}visitFloat(t,r){return Math.random()}visitInt(t,r){return BigInt(this.generateNumber(!0))}visitNat(t,r){return BigInt(this.generateNumber(!1))}visitFixedInt(t,r){let n=this.generateNumber(!0);return t._bits<=32?n:BigInt(r)}visitFixedNat(t,r){let n=this.generateNumber(!1);return t._bits<=32?n:BigInt(r)}generateNumber(t){let r=Math.floor(Math.random()*100);return t&&Math.random()<.5?-r:r}};function vo(e,t,r){return t.random&&r===""?e.accept(new wt,r):e.accept(new xt,r)}function vt(e){return e.accept(new Xe,null)}f.renderInput=vt;function oe(e,t,r){return e.accept(new Pt,{input:t,value:r})}f.renderValue=oe;var Pt=class extends Ze.Visitor{visitType(t,r){r.input.ui.input.value=t.valueToString(r.value)}visitNull(t,r){}visitText(t,r){r.input.ui.input.value=r.value}visitRec(t,r,n){oe(r,n.input,n.value)}visitOpt(t,r,n){if(n.value.length!==0){let o=n.input.ui.form,i=o.ui.open;i.checked=!0,i.dispatchEvent(new Event(o.ui.event)),oe(r,o.form[0],n.value[0])}}visitRecord(t,r,n){let o=n.input.ui.form;r.forEach(([i,a],c)=>{oe(a,o.form[c],n.value[i])})}visitTuple(t,r,n){let o=n.input.ui.form;r.forEach((i,a)=>{oe(i,o.form[a],n.value[a])})}visitVariant(t,r,n){let o=n.input.ui.form,i=Object.entries(n.value)[0];r.forEach(([a,c],p)=>{if(a===i[0]){let d=o.ui.open;d.selectedIndex=p,d.dispatchEvent(new Event(o.ui.event)),oe(c,o.form[0],i[1])}})}visitVec(t,r,n){let o=n.input.ui.form,i=n.value.length,a=o.ui.open;a.value=i,a.dispatchEvent(new Event(o.ui.event)),n.value.forEach((c,p)=>{oe(r,o.form[p],c)})}}});var Sr=Y(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0})});var Ct=Y(F=>{"use strict";var Rr=F&&F.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Co=F&&F.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),de=F&&F.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Rr(t,e,r)},No=F&&F.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Rr(t,e,r);return Co(t,e),t};Object.defineProperty(F,"__esModule",{value:!0});F.IDL=void 0;de(Cr(),F);de(Tt(),F);F.IDL=No(pt());de(it(),F);de(at(),F);de(Ae(),F);de(Sr(),F)});var we=class extends Error{constructor(){super("The Wasm code for the upgrade is identical to the code currently installed. No upgrade is necessary.")}};import{isNullish as kn}from"@junobuild/utils";var kt=({IDL:e})=>{let t=e.Record({updated_at:e.Nat64,orbiter_id:e.Principal,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64}),r=e.Record({subnet_id:e.Opt(e.Principal),name:e.Opt(e.Text)}),n=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,satellite_id:e.Principal}),o=e.Record({cycles:e.Nat,destination_id:e.Principal}),i=e.Record({e8s:e.Nat64}),a=e.Record({timestamp_nanos:e.Nat64}),c=e.Record({to:e.Vec(e.Nat8),fee:i,memo:e.Nat64,from_subaccount:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(a),amount:i}),p=e.Variant({TxTooOld:e.Record({allowed_window_nanos:e.Nat64}),BadFee:e.Record({expected_fee:i}),TxDuplicate:e.Record({duplicate_of:e.Nat64}),TxCreatedInFuture:e.Null,InsufficientFunds:e.Record({balance:i})}),d=e.Variant({Ok:e.Nat64,Err:p}),g=e.Record({owner:e.Principal,subaccount:e.Opt(e.Vec(e.Nat8))}),y=e.Record({to:g,fee:e.Opt(e.Nat),memo:e.Opt(e.Vec(e.Nat8)),from_subaccount:e.Opt(e.Vec(e.Nat8)),created_at_time:e.Opt(e.Nat64),amount:e.Nat}),h=e.Variant({GenericError:e.Record({message:e.Text,error_code:e.Nat}),TemporarilyUnavailable:e.Null,BadBurn:e.Record({min_burn_amount:e.Nat}),Duplicate:e.Record({duplicate_of:e.Nat}),BadFee:e.Record({expected_fee:e.Nat}),CreatedInFuture:e.Record({ledger_time:e.Nat64}),TooOld:e.Null,InsufficientFunds:e.Record({balance:e.Nat})}),u=e.Variant({Ok:e.Nat,Err:h}),m=e.Variant({Write:e.Null,Admin:e.Null}),T=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,scope:m,expires_at:e.Opt(e.Nat64)}),v=e.Variant({stopped:e.Null,stopping:e.Null,running:e.Null}),w=e.Record({freezing_threshold:e.Nat,controllers:e.Vec(e.Principal),memory_allocation:e.Nat,compute_allocation:e.Nat}),b=e.Record({status:v,memory_size:e.Nat,cycles:e.Nat,settings:w,idle_cycles_burned_per_day:e.Nat,module_hash:e.Opt(e.Vec(e.Nat8))}),C=e.Record({id:e.Principal,status:b,metadata:e.Opt(e.Vec(e.Tuple(e.Text,e.Text))),status_at:e.Nat64}),x=e.Variant({Ok:C,Err:e.Text}),N=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),scope:m,expires_at:e.Opt(e.Nat64)}),R=e.Record({enabled:e.Bool,cycles_threshold:e.Opt(e.Nat64)}),V=e.Record({mission_control_cycles_threshold:e.Opt(e.Nat64),orbiters:e.Vec(e.Tuple(e.Principal,R)),satellites:e.Vec(e.Tuple(e.Principal,R)),cycles_threshold:e.Opt(e.Nat64)}),A=e.Record({orbiters:e.Opt(e.Vec(x)),satellites:e.Opt(e.Vec(x)),mission_control:x});return e.Service({add_mission_control_controllers:e.Func([e.Vec(e.Principal)],[],[]),add_satellites_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal)],[],[]),create_orbiter:e.Func([e.Opt(e.Text)],[t],[]),create_orbiter_with_config:e.Func([r],[t],[]),create_satellite:e.Func([e.Text],[n],[]),create_satellite_with_config:e.Func([r],[n],[]),del_mission_control_controllers:e.Func([e.Vec(e.Principal)],[],[]),del_orbiter:e.Func([e.Principal,e.Nat],[],[]),del_orbiters_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal)],[],[]),del_satellite:e.Func([e.Principal,e.Nat],[],[]),del_satellites_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal)],[],[]),deposit_cycles:e.Func([o],[],[]),get_user:e.Func([],[e.Principal],["query"]),icp_transfer:e.Func([c],[d],[]),icrc_transfer:e.Func([e.Principal,y],[u],[]),list_mission_control_controllers:e.Func([],[e.Vec(e.Tuple(e.Principal,T))],["query"]),list_mission_control_statuses:e.Func([],[e.Vec(e.Tuple(e.Nat64,x))],["query"]),list_orbiter_statuses:e.Func([e.Principal],[e.Opt(e.Vec(e.Tuple(e.Nat64,x)))],["query"]),list_orbiters:e.Func([],[e.Vec(e.Tuple(e.Principal,t))],["query"]),list_satellite_statuses:e.Func([e.Principal],[e.Opt(e.Vec(e.Tuple(e.Nat64,x)))],["query"]),list_satellites:e.Func([],[e.Vec(e.Tuple(e.Principal,n))],["query"]),remove_mission_control_controllers:e.Func([e.Vec(e.Principal)],[],[]),remove_satellites_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal)],[],[]),set_metadata:e.Func([e.Vec(e.Tuple(e.Text,e.Text))],[],[]),set_mission_control_controllers:e.Func([e.Vec(e.Principal),N],[],[]),set_orbiter:e.Func([e.Principal,e.Opt(e.Text)],[t],[]),set_orbiter_metadata:e.Func([e.Principal,e.Vec(e.Tuple(e.Text,e.Text))],[t],[]),set_orbiters_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal),N],[],[]),set_satellite:e.Func([e.Principal,e.Opt(e.Text)],[n],[]),set_satellite_metadata:e.Func([e.Principal,e.Vec(e.Tuple(e.Text,e.Text))],[n],[]),set_satellites_controllers:e.Func([e.Vec(e.Principal),e.Vec(e.Principal),N],[],[]),status:e.Func([V],[A],[]),top_up:e.Func([e.Principal,i],[],[]),unset_orbiter:e.Func([e.Principal],[],[]),unset_satellite:e.Func([e.Principal],[],[]),version:e.Func([],[e.Text],["query"])})};var Mt=({IDL:e})=>{let t=e.Record({controllers:e.Vec(e.Principal)}),r=e.Variant({Write:e.Null,Admin:e.Null}),n=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,scope:r,expires_at:e.Opt(e.Nat64)}),o=e.Record({version:e.Opt(e.Nat64)}),i=e.Record({cycles:e.Nat,destination_id:e.Principal}),a=e.Record({to:e.Opt(e.Nat64),from:e.Opt(e.Nat64),satellite_id:e.Opt(e.Principal)}),c=e.Record({key:e.Text,collected_at:e.Nat64}),p=e.Record({inner_height:e.Nat16,inner_width:e.Nat16}),d=e.Record({title:e.Text,updated_at:e.Nat64,referrer:e.Opt(e.Text),time_zone:e.Text,session_id:e.Text,href:e.Text,created_at:e.Nat64,satellite_id:e.Principal,device:p,version:e.Opt(e.Nat64),user_agent:e.Opt(e.Text)}),g=e.Record({safari:e.Float64,opera:e.Float64,others:e.Float64,firefox:e.Float64,chrome:e.Float64}),y=e.Record({desktop:e.Float64,others:e.Float64,mobile:e.Float64}),h=e.Record({browsers:g,devices:y}),u=e.Record({day:e.Nat8,month:e.Nat8,year:e.Int32}),m=e.Record({bounce_rate:e.Float64,average_page_views_per_session:e.Float64,daily_total_page_views:e.Vec(e.Tuple(u,e.Nat32)),total_page_views:e.Nat32,unique_page_views:e.Nat64,unique_sessions:e.Nat64}),T=e.Record({referrers:e.Vec(e.Tuple(e.Text,e.Nat32)),pages:e.Vec(e.Tuple(e.Text,e.Nat32))}),v=e.Variant({Navigate:e.Null,Restore:e.Null,Reload:e.Null,BackForward:e.Null,BackForwardCache:e.Null,Prerender:e.Null}),w=e.Record({id:e.Text,value:e.Float64,navigation_type:e.Opt(v),delta:e.Float64}),b=e.Variant({WebVitalsMetric:w}),C=e.Variant({CLS:e.Null,FCP:e.Null,INP:e.Null,LCP:e.Null,TTFB:e.Null}),x=e.Record({updated_at:e.Nat64,session_id:e.Text,data:b,href:e.Text,metric_name:C,created_at:e.Nat64,satellite_id:e.Principal,version:e.Opt(e.Nat64)}),N=e.Record({cls:e.Opt(e.Float64),fcp:e.Opt(e.Float64),inp:e.Opt(e.Float64),lcp:e.Opt(e.Float64),ttfb:e.Opt(e.Float64)}),R=e.Record({overall:N,pages:e.Vec(e.Tuple(e.Text,N))}),V=e.Record({updated_at:e.Nat64,session_id:e.Text,metadata:e.Opt(e.Vec(e.Tuple(e.Text,e.Text))),name:e.Text,created_at:e.Nat64,satellite_id:e.Principal,version:e.Opt(e.Nat64)}),A=e.Record({total:e.Vec(e.Tuple(e.Text,e.Nat32))}),M=e.Record({performance_metrics:e.Bool,track_events:e.Bool,page_views:e.Bool}),k=e.Record({updated_at:e.Nat64,features:e.Opt(M),created_at:e.Nat64,version:e.Opt(e.Nat64)}),$=e.Record({stable:e.Nat64,heap:e.Nat64}),G=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),scope:r,expires_at:e.Opt(e.Nat64)}),j=e.Record({controller:G,controllers:e.Vec(e.Principal)}),X=e.Record({title:e.Text,updated_at:e.Opt(e.Nat64),referrer:e.Opt(e.Text),time_zone:e.Text,session_id:e.Text,href:e.Text,satellite_id:e.Principal,device:p,version:e.Opt(e.Nat64),user_agent:e.Opt(e.Text)}),Z=e.Variant({Ok:d,Err:e.Text}),J=e.Variant({Ok:e.Null,Err:e.Vec(e.Tuple(c,e.Text))}),z=e.Record({session_id:e.Text,data:b,href:e.Text,metric_name:C,satellite_id:e.Principal,version:e.Opt(e.Nat64),user_agent:e.Opt(e.Text)}),et=e.Variant({Ok:x,Err:e.Text}),tt=e.Record({features:e.Opt(M),version:e.Opt(e.Nat64)}),xe=e.Record({updated_at:e.Opt(e.Nat64),session_id:e.Text,metadata:e.Opt(e.Vec(e.Tuple(e.Text,e.Text))),name:e.Text,satellite_id:e.Principal,version:e.Opt(e.Nat64),user_agent:e.Opt(e.Text)}),rt=e.Variant({Ok:V,Err:e.Text});return e.Service({del_controllers:e.Func([t],[e.Vec(e.Tuple(e.Principal,n))],[]),del_satellite_config:e.Func([e.Principal,o],[],[]),deposit_cycles:e.Func([i],[],[]),get_page_views:e.Func([a],[e.Vec(e.Tuple(c,d))],["query"]),get_page_views_analytics_clients:e.Func([a],[h],["query"]),get_page_views_analytics_metrics:e.Func([a],[m],["query"]),get_page_views_analytics_top_10:e.Func([a],[T],["query"]),get_performance_metrics:e.Func([a],[e.Vec(e.Tuple(c,x))],["query"]),get_performance_metrics_analytics_web_vitals:e.Func([a],[R],["query"]),get_track_events:e.Func([a],[e.Vec(e.Tuple(c,V))],["query"]),get_track_events_analytics:e.Func([a],[A],["query"]),list_controllers:e.Func([],[e.Vec(e.Tuple(e.Principal,n))],["query"]),list_satellite_configs:e.Func([],[e.Vec(e.Tuple(e.Principal,k))],["query"]),memory_size:e.Func([],[$],["query"]),set_controllers:e.Func([j],[e.Vec(e.Tuple(e.Principal,n))],[]),set_page_view:e.Func([c,X],[Z],[]),set_page_views:e.Func([e.Vec(e.Tuple(c,X))],[J],[]),set_performance_metric:e.Func([c,z],[et],[]),set_performance_metrics:e.Func([e.Vec(e.Tuple(c,z))],[J],[]),set_satellite_configs:e.Func([e.Vec(e.Tuple(e.Principal,tt))],[e.Vec(e.Tuple(e.Principal,k))],[]),set_track_event:e.Func([c,xe],[rt],[]),set_track_events:e.Func([e.Vec(e.Tuple(c,xe))],[J],[]),version:e.Func([],[e.Text],["query"])})};var Bt=({IDL:e})=>{let t=e.Record({batch_id:e.Nat,headers:e.Vec(e.Tuple(e.Text,e.Text)),chunk_ids:e.Vec(e.Nat)}),r=e.Record({controllers:e.Vec(e.Principal)}),n=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,expires_at:e.Opt(e.Nat64)}),o=e.Record({updated_at:e.Opt(e.Nat64)}),i=e.Record({headers:e.Vec(e.Tuple(e.Text,e.Vec(e.Tuple(e.Text,e.Text))))}),a=e.Record({storage:i}),c=e.Record({updated_at:e.Nat64,owner:e.Principal,data:e.Vec(e.Nat8),created_at:e.Nat64}),p=e.Record({url:e.Text,method:e.Text,body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text))}),d=e.Record({token:e.Opt(e.Text),sha256:e.Opt(e.Vec(e.Nat8)),headers:e.Vec(e.Tuple(e.Text,e.Text)),index:e.Nat64,encoding_type:e.Text,full_path:e.Text}),g=e.Variant({Callback:e.Record({token:d,callback:e.Func([],[],[])})}),y=e.Record({body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text)),streaming_strategy:e.Opt(g),status_code:e.Nat16}),h=e.Record({token:e.Opt(d),body:e.Vec(e.Nat8)}),u=e.Record({token:e.Opt(e.Text),collection:e.Text,name:e.Text,encoding_type:e.Opt(e.Text),full_path:e.Text}),m=e.Record({batch_id:e.Nat}),T=e.Variant({UpdatedAt:e.Null,Keys:e.Null,CreatedAt:e.Null}),v=e.Record({field:T,desc:e.Bool}),w=e.Record({start_after:e.Opt(e.Text),limit:e.Opt(e.Nat64)}),b=e.Record({order:e.Opt(v),owner:e.Opt(e.Principal),matcher:e.Opt(e.Text),paginate:e.Opt(w)}),C=e.Record({token:e.Opt(e.Text),collection:e.Text,owner:e.Principal,name:e.Text,full_path:e.Text}),x=e.Record({modified:e.Nat64,sha256:e.Vec(e.Nat8),total_length:e.Nat}),N=e.Record({key:C,updated_at:e.Nat64,encodings:e.Vec(e.Tuple(e.Text,x)),headers:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64}),R=e.Record({matches_length:e.Nat64,length:e.Nat64,items:e.Vec(e.Tuple(e.Text,N))}),V=e.Record({updated_at:e.Nat64,created_at:e.Nat64,bn_id:e.Opt(e.Text)}),A=e.Record({matches_length:e.Nat64,length:e.Nat64,items:e.Vec(e.Tuple(e.Text,c))}),M=e.Variant({Db:e.Null,Storage:e.Null}),k=e.Variant({Controllers:e.Null,Private:e.Null,Public:e.Null,Managed:e.Null}),$=e.Record({updated_at:e.Nat64,max_size:e.Opt(e.Nat),read:k,created_at:e.Nat64,write:k}),G=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),expires_at:e.Opt(e.Nat64)}),j=e.Record({controller:G,controllers:e.Vec(e.Principal)}),X=e.Record({updated_at:e.Opt(e.Nat64),data:e.Vec(e.Nat8)}),Z=e.Record({updated_at:e.Opt(e.Nat64),max_size:e.Opt(e.Nat),read:k,write:k}),J=e.Record({content:e.Vec(e.Nat8),batch_id:e.Nat}),z=e.Record({chunk_id:e.Nat});return e.Service({commit_asset_upload:e.Func([t],[],[]),del_asset:e.Func([e.Text,e.Text],[],[]),del_assets:e.Func([e.Opt(e.Text)],[],[]),del_controllers:e.Func([r],[e.Vec(e.Tuple(e.Principal,n))],[]),del_custom_domain:e.Func([e.Text],[],[]),del_doc:e.Func([e.Text,e.Text,o],[],[]),get_config:e.Func([],[a],[]),get_doc:e.Func([e.Text,e.Text],[e.Opt(c)],["query"]),http_request:e.Func([p],[y],["query"]),http_request_streaming_callback:e.Func([d],[h],["query"]),init_asset_upload:e.Func([u],[m],[]),list_assets:e.Func([e.Opt(e.Text),b],[R],["query"]),list_controllers:e.Func([],[e.Vec(e.Tuple(e.Principal,n))],["query"]),list_custom_domains:e.Func([],[e.Vec(e.Tuple(e.Text,V))],["query"]),list_docs:e.Func([e.Text,b],[A],["query"]),list_rules:e.Func([M],[e.Vec(e.Tuple(e.Text,$))],["query"]),set_config:e.Func([a],[],[]),set_controllers:e.Func([j],[e.Vec(e.Tuple(e.Principal,n))],[]),set_custom_domain:e.Func([e.Text,e.Opt(e.Text)],[],[]),set_doc:e.Func([e.Text,e.Text,X],[c],[]),set_rule:e.Func([M,e.Text,Z],[],[]),upload_asset_chunk:e.Func([J],[z],[]),version:e.Func([],[e.Text],["query"])})};var Ut=({IDL:e})=>{let t=e.Record({batch_id:e.Nat,headers:e.Vec(e.Tuple(e.Text,e.Text)),chunk_ids:e.Vec(e.Nat)}),r=e.Record({controllers:e.Vec(e.Principal)}),n=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,expires_at:e.Opt(e.Nat64)}),o=e.Record({updated_at:e.Opt(e.Nat64)}),i=e.Record({headers:e.Vec(e.Tuple(e.Text,e.Vec(e.Tuple(e.Text,e.Text))))}),a=e.Record({storage:i}),c=e.Record({updated_at:e.Nat64,owner:e.Principal,data:e.Vec(e.Nat8),created_at:e.Nat64}),p=e.Record({url:e.Text,method:e.Text,body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text))}),d=e.Record({token:e.Opt(e.Text),sha256:e.Opt(e.Vec(e.Nat8)),headers:e.Vec(e.Tuple(e.Text,e.Text)),index:e.Nat64,encoding_type:e.Text,full_path:e.Text}),g=e.Variant({Callback:e.Record({token:d,callback:e.Func([],[],[])})}),y=e.Record({body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text)),streaming_strategy:e.Opt(g),status_code:e.Nat16}),h=e.Record({token:e.Opt(d),body:e.Vec(e.Nat8)}),u=e.Record({token:e.Opt(e.Text),collection:e.Text,name:e.Text,encoding_type:e.Opt(e.Text),full_path:e.Text}),m=e.Record({batch_id:e.Nat}),T=e.Variant({UpdatedAt:e.Null,Keys:e.Null,CreatedAt:e.Null}),v=e.Record({field:T,desc:e.Bool}),w=e.Record({start_after:e.Opt(e.Text),limit:e.Opt(e.Nat64)}),b=e.Record({order:e.Opt(v),matcher:e.Opt(e.Text),paginate:e.Opt(w)}),C=e.Record({token:e.Opt(e.Text),collection:e.Text,owner:e.Principal,name:e.Text,full_path:e.Text}),x=e.Record({modified:e.Nat64,sha256:e.Vec(e.Nat8),total_length:e.Nat}),N=e.Record({key:C,updated_at:e.Nat64,encodings:e.Vec(e.Tuple(e.Text,x)),headers:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64}),R=e.Record({matches_length:e.Nat64,length:e.Nat64,items:e.Vec(e.Tuple(e.Text,N))}),V=e.Record({updated_at:e.Nat64,created_at:e.Nat64,bn_id:e.Opt(e.Text)}),A=e.Record({matches_length:e.Nat64,length:e.Nat64,items:e.Vec(e.Tuple(e.Text,c))}),M=e.Variant({Db:e.Null,Storage:e.Null}),k=e.Variant({Controllers:e.Null,Private:e.Null,Public:e.Null,Managed:e.Null}),$=e.Record({updated_at:e.Nat64,max_size:e.Opt(e.Nat),read:k,created_at:e.Nat64,write:k}),G=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),expires_at:e.Opt(e.Nat64)}),j=e.Record({controller:G,controllers:e.Vec(e.Principal)}),X=e.Record({updated_at:e.Opt(e.Nat64),data:e.Vec(e.Nat8)}),Z=e.Record({updated_at:e.Opt(e.Nat64),max_size:e.Opt(e.Nat),read:k,write:k}),J=e.Record({content:e.Vec(e.Nat8),batch_id:e.Nat}),z=e.Record({chunk_id:e.Nat});return e.Service({commit_asset_upload:e.Func([t],[],[]),del_asset:e.Func([e.Text,e.Text],[],[]),del_assets:e.Func([e.Opt(e.Text)],[],[]),del_controllers:e.Func([r],[e.Vec(e.Tuple(e.Principal,n))],[]),del_custom_domain:e.Func([e.Text],[],[]),del_doc:e.Func([e.Text,e.Text,o],[],[]),get_config:e.Func([],[a],[]),get_doc:e.Func([e.Text,e.Text],[e.Opt(c)],["query"]),http_request:e.Func([p],[y],["query"]),http_request_streaming_callback:e.Func([d],[h],["query"]),init_asset_upload:e.Func([u],[m],[]),list_assets:e.Func([e.Opt(e.Text),b],[R],["query"]),list_controllers:e.Func([],[e.Vec(e.Principal)],["query"]),list_custom_domains:e.Func([],[e.Vec(e.Tuple(e.Text,V))],["query"]),list_docs:e.Func([e.Text,b],[A],["query"]),list_rules:e.Func([M],[e.Vec(e.Tuple(e.Text,$))],["query"]),set_config:e.Func([a],[],[]),set_controllers:e.Func([j],[e.Vec(e.Tuple(e.Principal,n))],[]),set_custom_domain:e.Func([e.Text,e.Opt(e.Text)],[],[]),set_doc:e.Func([e.Text,e.Text,X],[c],[]),set_rule:e.Func([M,e.Text,Z],[],[]),upload_asset_chunk:e.Func([J],[z],[]),version:e.Func([],[e.Text],["query"])})};var $t=({IDL:e})=>{let t=e.Record({batch_id:e.Nat,headers:e.Vec(e.Tuple(e.Text,e.Text)),chunk_ids:e.Vec(e.Nat)}),r=e.Variant({UpdatedAt:e.Null,Keys:e.Null,CreatedAt:e.Null}),n=e.Record({field:r,desc:e.Bool}),o=e.Variant({Equal:e.Nat64,Between:e.Tuple(e.Nat64,e.Nat64),GreaterThan:e.Nat64,LessThan:e.Nat64}),i=e.Record({key:e.Opt(e.Text),updated_at:e.Opt(o),description:e.Opt(e.Text),created_at:e.Opt(o)}),a=e.Record({start_after:e.Opt(e.Text),limit:e.Opt(e.Nat64)}),c=e.Record({order:e.Opt(n),owner:e.Opt(e.Principal),matcher:e.Opt(i),paginate:e.Opt(a)}),p=e.Record({controllers:e.Vec(e.Principal)}),d=e.Variant({Write:e.Null,Admin:e.Null}),g=e.Record({updated_at:e.Nat64,metadata:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,scope:d,expires_at:e.Opt(e.Nat64)}),y=e.Record({version:e.Opt(e.Nat64)}),h=e.Variant({Db:e.Null,Storage:e.Null}),u=e.Record({version:e.Opt(e.Nat64)}),m=e.Record({cycles:e.Nat,destination_id:e.Principal}),T=e.Record({token:e.Opt(e.Text),collection:e.Text,owner:e.Principal,name:e.Text,description:e.Opt(e.Text),full_path:e.Text}),v=e.Record({modified:e.Nat64,sha256:e.Vec(e.Nat8),total_length:e.Nat}),w=e.Record({key:T,updated_at:e.Nat64,encodings:e.Vec(e.Tuple(e.Text,v)),headers:e.Vec(e.Tuple(e.Text,e.Text)),created_at:e.Nat64,version:e.Opt(e.Nat64)}),b=e.Record({derivation_origin:e.Opt(e.Text)}),C=e.Record({internet_identity:e.Opt(b)}),x=e.Record({stable:e.Opt(e.Nat64),heap:e.Opt(e.Nat64)}),N=e.Record({max_memory_size:e.Opt(x)}),R=e.Variant({Deny:e.Null,AllowAny:e.Null,SameOrigin:e.Null}),V=e.Variant({Deny:e.Null,Allow:e.Null}),A=e.Record({status_code:e.Nat16,location:e.Text}),M=e.Record({iframe:e.Opt(R),rewrites:e.Vec(e.Tuple(e.Text,e.Text)),headers:e.Vec(e.Tuple(e.Text,e.Vec(e.Tuple(e.Text,e.Text)))),max_memory_size:e.Opt(x),raw_access:e.Opt(V),redirects:e.Opt(e.Vec(e.Tuple(e.Text,A)))}),k=e.Record({db:e.Opt(N),authentication:e.Opt(C),storage:M}),$=e.Record({updated_at:e.Nat64,owner:e.Principal,data:e.Vec(e.Nat8),description:e.Opt(e.Text),created_at:e.Nat64,version:e.Opt(e.Nat64)}),G=e.Variant({Heap:e.Null,Stable:e.Null}),j=e.Variant({Controllers:e.Null,Private:e.Null,Public:e.Null,Managed:e.Null}),X=e.Record({max_tokens:e.Nat64,time_per_token_ns:e.Nat64}),Z=e.Record({max_capacity:e.Opt(e.Nat32),memory:e.Opt(G),updated_at:e.Nat64,max_size:e.Opt(e.Nat),read:j,created_at:e.Nat64,version:e.Opt(e.Nat64),mutable_permissions:e.Opt(e.Bool),rate_config:e.Opt(X),write:j}),J=e.Record({url:e.Text,method:e.Text,body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text)),certificate_version:e.Opt(e.Nat16)}),z=e.Record({memory:G,token:e.Opt(e.Text),sha256:e.Opt(e.Vec(e.Nat8)),headers:e.Vec(e.Tuple(e.Text,e.Text)),index:e.Nat64,encoding_type:e.Text,full_path:e.Text}),et=e.Variant({Callback:e.Record({token:z,callback:e.Func([],[],["query"])})}),tt=e.Record({body:e.Vec(e.Nat8),headers:e.Vec(e.Tuple(e.Text,e.Text)),streaming_strategy:e.Opt(et),status_code:e.Nat16}),xe=e.Record({token:e.Opt(z),body:e.Vec(e.Nat8)}),rt=e.Record({token:e.Opt(e.Text),collection:e.Text,name:e.Text,description:e.Opt(e.Text),encoding_type:e.Opt(e.Text),full_path:e.Text}),hn=e.Record({batch_id:e.Nat}),yn=e.Record({matches_pages:e.Opt(e.Nat64),matches_length:e.Nat64,items_page:e.Opt(e.Nat64),items:e.Vec(e.Tuple(e.Text,w)),items_length:e.Nat64}),_n=e.Record({updated_at:e.Nat64,created_at:e.Nat64,version:e.Opt(e.Nat64),bn_id:e.Opt(e.Text)}),gn=e.Record({matches_pages:e.Opt(e.Nat64),matches_length:e.Nat64,items_page:e.Opt(e.Nat64),items:e.Vec(e.Tuple(e.Text,$)),items_length:e.Nat64}),Tn=e.Record({stable:e.Nat64,heap:e.Nat64}),bn=e.Record({metadata:e.Vec(e.Tuple(e.Text,e.Text)),scope:d,expires_at:e.Opt(e.Nat64)}),xn=e.Record({controller:bn,controllers:e.Vec(e.Principal)}),At=e.Record({data:e.Vec(e.Nat8),description:e.Opt(e.Text),version:e.Opt(e.Nat64)}),wn=e.Record({max_capacity:e.Opt(e.Nat32),memory:e.Opt(G),max_size:e.Opt(e.Nat),read:j,version:e.Opt(e.Nat64),mutable_permissions:e.Opt(e.Bool),rate_config:e.Opt(X),write:j}),Pn=e.Record({content:e.Vec(e.Nat8),batch_id:e.Nat,order_id:e.Opt(e.Nat)}),vn=e.Record({chunk_id:e.Nat});return e.Service({build_version:e.Func([],[e.Text],["query"]),commit_asset_upload:e.Func([t],[],[]),count_assets:e.Func([e.Text,c],[e.Nat64],["query"]),count_collection_assets:e.Func([e.Text],[e.Nat64],["query"]),count_collection_docs:e.Func([e.Text],[e.Nat64],["query"]),count_docs:e.Func([e.Text,c],[e.Nat64],["query"]),del_asset:e.Func([e.Text,e.Text],[],[]),del_assets:e.Func([e.Text],[],[]),del_controllers:e.Func([p],[e.Vec(e.Tuple(e.Principal,g))],[]),del_custom_domain:e.Func([e.Text],[],[]),del_doc:e.Func([e.Text,e.Text,y],[],[]),del_docs:e.Func([e.Text],[],[]),del_filtered_assets:e.Func([e.Text,c],[],[]),del_filtered_docs:e.Func([e.Text,c],[],[]),del_many_assets:e.Func([e.Vec(e.Tuple(e.Text,e.Text))],[],[]),del_many_docs:e.Func([e.Vec(e.Tuple(e.Text,e.Text,y))],[],[]),del_rule:e.Func([h,e.Text,u],[],[]),deposit_cycles:e.Func([m],[],[]),get_asset:e.Func([e.Text,e.Text],[e.Opt(w)],["query"]),get_auth_config:e.Func([],[e.Opt(C)],["query"]),get_config:e.Func([],[k],[]),get_db_config:e.Func([],[e.Opt(N)],["query"]),get_doc:e.Func([e.Text,e.Text],[e.Opt($)],["query"]),get_many_assets:e.Func([e.Vec(e.Tuple(e.Text,e.Text))],[e.Vec(e.Tuple(e.Text,e.Opt(w)))],["query"]),get_many_docs:e.Func([e.Vec(e.Tuple(e.Text,e.Text))],[e.Vec(e.Tuple(e.Text,e.Opt($)))],["query"]),get_rule:e.Func([h,e.Text],[e.Opt(Z)],["query"]),get_storage_config:e.Func([],[M],["query"]),http_request:e.Func([J],[tt],["query"]),http_request_streaming_callback:e.Func([z],[xe],["query"]),init_asset_upload:e.Func([rt],[hn],[]),list_assets:e.Func([e.Text,c],[yn],["query"]),list_controllers:e.Func([],[e.Vec(e.Tuple(e.Principal,g))],["query"]),list_custom_domains:e.Func([],[e.Vec(e.Tuple(e.Text,_n))],["query"]),list_docs:e.Func([e.Text,c],[gn],["query"]),list_rules:e.Func([h],[e.Vec(e.Tuple(e.Text,Z))],["query"]),memory_size:e.Func([],[Tn],["query"]),set_auth_config:e.Func([C],[],[]),set_controllers:e.Func([xn],[e.Vec(e.Tuple(e.Principal,g))],[]),set_custom_domain:e.Func([e.Text,e.Opt(e.Text)],[],[]),set_db_config:e.Func([N],[],[]),set_doc:e.Func([e.Text,e.Text,At],[$],[]),set_many_docs:e.Func([e.Vec(e.Tuple(e.Text,e.Text,At))],[e.Vec(e.Tuple(e.Text,$))],[]),set_rule:e.Func([h,e.Text,wn],[Z],[]),set_storage_config:e.Func([M],[],[]),upload_asset_chunk:e.Func([Pn],[vn],[]),version:e.Func([],[e.Text],["query"])})};import{Actor as On,HttpAgent as Fn}from"@dfinity/agent";import{nonNullish as qt}from"@junobuild/utils";var jt=async({canisterId:e,idlFactory:t,config:r,...n})=>{let o=await q(n);return On.createActor(t,{agent:o,canisterId:e,...r??{}})},q=async({agent:e,...t})=>e??await En(t),En=async({identity:e,fetch:t,container:r})=>{let n=qt(r)&&r!==!1,o=n?r===!0?"http://127.0.0.1:5987":r:"https://icp-api.io";return await Fn.create({identity:e,host:o,retryTimes:10,...qt(t)&&{fetch:t},shouldFetchRootKey:n})};var zt=({satelliteId:e,...t})=>me({canisterId:e,...t,idlFactory:Ut}),O=({satelliteId:e,...t})=>me({canisterId:e,...t,idlFactory:$t}),Ht=({satelliteId:e,...t})=>me({canisterId:e,...t,idlFactory:Bt}),ie=({missionControlId:e,...t})=>me({canisterId:e,...t,idlFactory:kt}),Pe=({orbiterId:e,...t})=>me({canisterId:e,...t,idlFactory:Mt}),me=({canisterId:e,idlFactory:t,...r})=>{if(kn(e))throw new Error("No canister ID provided.");return jt({canisterId:e,idlFactory:t,...r})};var Kt=async({missionControl:e})=>(await ie(e)).version(),Wt=async({missionControl:e})=>(await ie(e)).get_user(),Gt=async({missionControl:e})=>(await ie(e)).list_mission_control_controllers(),Xt=async({missionControl:e,satelliteIds:t,controllerIds:r,controller:n})=>(await ie(e)).set_satellites_controllers(t,r,n),Zt=async({missionControl:e,controllerIds:t,controller:r})=>(await ie(e)).set_mission_control_controllers(t,r);import{Principal as Mn}from"@dfinity/principal";import{nonNullish as Bn,toNullable as Un}from"@junobuild/utils";var nt=({controllerId:e,profile:t})=>({controllerIds:[Mn.fromText(e)],controller:$n(t)}),$n=e=>({metadata:Bn(e)&&e!==""?[["profile",e]]:[],expires_at:Un(void 0),scope:{Admin:null}});var ai=({controllerId:e,profile:t,...r})=>Xt({...r,...nt({controllerId:e,profile:t})}),ci=({controllerId:e,profile:t,...r})=>Zt({...r,...nt({controllerId:e,profile:t})}),li=e=>Gt(e);import{Principal as So}from"@dfinity/principal";var fe={reinstall:null},re={upgrade:[{skip_pre_upgrade:[!1],wasm_memory_persistence:[{replace:null}]}]};import{fromNullable as Yn,isNullish as Qn}from"@junobuild/utils";import{CanisterStatus as qn}from"@dfinity/agent";import{ICManagementCanister as I}from"@dfinity/ic-management";import{Principal as jn}from"@dfinity/principal";import{assertNonNullish as zn}from"@junobuild/utils";var Jt=async({canisterId:e,actor:t})=>{let r=await q(t),{stopCanister:n}=I.create({agent:r});await n(e)},Yt=async({canisterId:e,actor:t})=>{let r=await q(t),{startCanister:n}=I.create({agent:r});await n(e)},Qt=async({actor:e,code:t})=>{let r=await q(e),{installCode:n}=I.create({agent:r});return n(t)},It=async({actor:e,canisterId:t})=>{let r=await q(e),{storedChunks:n}=I.create({agent:r});return n({canisterId:t})},ve=async({actor:e,canisterId:t})=>{let r=await q(e),{clearChunkStore:n}=I.create({agent:r});return n({canisterId:t})},Dt=async({actor:e,chunk:t})=>{let r=await q(e),{uploadChunk:n}=I.create({agent:r});return n(t)},Lt=async({actor:e,code:t})=>{let r=await q(e),{installChunkedCode:n}=I.create({agent:r});return n(t)},er=async({actor:e,canisterId:t})=>{let r=await q(e),{canisterStatus:n}=I.create({agent:r});return n(t)},tr=async({canisterId:e,path:t,...r})=>{zn(e,"A canister ID must be provided to request its status.");let n=await q(r);return(await qn.request({canisterId:jn.from(e),agent:n,paths:[{kind:"metadata",key:t,path:t,decodeStrategy:"utf-8"}]})).get(t)};var rr=(o=>(o[o.AssertingExistingCode=0]="AssertingExistingCode",o[o.StoppingCanister=1]="StoppingCanister",o[o.UpgradingCode=2]="UpgradingCode",o[o.RestartingCanister=3]="RestartingCanister",o))(rr||{});var Ce=e=>(e instanceof Uint8Array||(e=Uint8Array.from(e)),e.reduce((t,r)=>t+r.toString(16).padStart(2,"0"),""));var nr=e=>crypto.subtle.digest("SHA-256",e),or=e=>Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join(""),ir=async e=>{let t=await nr(await e.arrayBuffer());return or(t)},Ne=async e=>{let t=await nr(e);return or(t)};import{isNullish as Kn,nonNullish as sr}from"@junobuild/utils";var ar=async({actor:e,canisterId:t,missionControlId:r,wasmModule:n,preClearChunks:o,...i})=>{o&&await ve({actor:e,canisterId:t});let a=await Wn({wasmModule:n}),{uploadChunks:c,storedChunks:p,preClearChunks:d,postClearChunks:g}=await Gn({actor:e,wasmChunks:a,canisterId:t,missionControlId:r});d&&await ve({actor:e,canisterId:t});let y=[];for await(let h of Xn({uploadChunks:c,actor:e,canisterId:t,missionControlId:r}))y=[...y,...h];await Lt({actor:e,code:{...i,chunkHashesList:[...y,...p].sort(({orderId:h},{orderId:u})=>h-u).map(({chunkHash:h})=>h),targetCanisterId:t,storeCanisterId:r,wasmModuleHash:await Ne(n)}}),g&&await ve({actor:e,canisterId:t})},Wn=async({wasmModule:e})=>{let t=new Blob([e]),r=[],n=1e6,o=0;for(let i=0;i<t.size;i+=n){let a=t.slice(i,i+n);r.push({chunk:a,orderId:o,sha256:await ir(a)}),o++}return r},Gn=async({canisterId:e,missionControlId:t,actor:r,wasmChunks:n})=>{let o=await It({actor:r,canisterId:t??e}),i=o.map(({hash:p})=>({chunkHash:{hash:p},sha256:Ce(p)})),{storedChunks:a,uploadChunks:c}=n.reduce(({uploadChunks:p,storedChunks:d},{sha256:g,...y})=>{let h=i.find(({sha256:u})=>u===g);return{uploadChunks:[...p,...sr(h)?[]:[{sha256:g,...y}]],storedChunks:[...d,...sr(h)?[{...y,...h}]:[]]}},{uploadChunks:[],storedChunks:[]});return{uploadChunks:c,storedChunks:a,preClearChunks:o.length>0&&a.length===0,postClearChunks:Kn(t)}};async function*Xn({uploadChunks:e,limit:t=12,...r}){for(let n=0;n<e.length;n=n+t){let o=e.slice(n,n+t);yield await Promise.all(o.map(a=>Zn({uploadChunk:a,...r})))}}var Zn=async({actor:e,canisterId:t,missionControlId:r,uploadChunk:{chunk:n,...o}})=>({chunkHash:await Dt({actor:e,chunk:{canisterId:r??t,chunk:new Uint8Array(await n.arrayBuffer())}}),...o});var cr=async({actor:e,...t})=>{await Qt({actor:e,code:t})};var ne=async({wasmModule:e,canisterId:t,actor:r,onProgress:n,...o})=>{await Se({fn:async()=>await In({wasmModule:e,canisterId:t,actor:r,...o}),onProgress:n,step:0}),await Se({fn:async()=>await Jt({canisterId:t,actor:r}),onProgress:n,step:1});try{await Se({fn:async()=>await Dn({wasmModule:e,canisterId:t,actor:r,...o}),onProgress:n,step:2})}finally{await Se({fn:async()=>await Yt({canisterId:t,actor:r}),onProgress:n,step:3})}},Se=async({fn:e,step:t,onProgress:r})=>{r?.({step:t,state:"in_progress"});try{await e(),r?.({step:t,state:"success"})}catch(n){throw r?.({step:t,state:"error"}),n}},In=async({actor:e,canisterId:t,wasmModule:r,reset:n})=>{if(n===!0)return;let{module_hash:o}=await er({actor:e,canisterId:t}),i=Yn(o);if(Qn(i))return;let a=await Ne(r),c=Ce(i);if(a===c)throw new we},Dn=async({wasmModule:e,canisterId:t,actor:r,...n})=>{await((new Blob([e]).size>2e6?"chunked":"single")==="chunked"?ar:cr)({wasmModule:e,canisterId:t,actor:r,...n})};var ee=Et(Ct(),1),Vr=e=>ee.IDL.encode([ee.IDL.Record({user:ee.IDL.Principal})],[{user:e}]),Je=e=>ee.IDL.encode([ee.IDL.Record({controllers:ee.IDL.Vec(ee.IDL.Principal)})],[{controllers:e.map(([t,r])=>t)}]);var rs=async({missionControl:e,...t})=>{let r=await Wt({missionControl:e}),{missionControlId:n,...o}=e;if(!n)throw new Error("No mission control principal defined.");let i=Vr(r);await ne({actor:o,canisterId:So.fromText(n),arg:new Uint8Array(i),mode:re,...t})};var is=e=>Kt(e);var Ar=async({orbiter:e})=>(await Pe(e)).version(),Ye=async({orbiter:e})=>(await Pe(e)).list_controllers(),Or=async({orbiter:e})=>{let{memory_size:t}=await Pe(e);return t()};var us=e=>Ye(e);var ms=e=>Or(e);import{Principal as Ro}from"@dfinity/principal";var bs=async({orbiter:e,reset:t=!1,...r})=>{let{orbiterId:n,...o}=e;if(!n)throw new Error("No orbiter principal defined.");let i=await Ye({orbiter:e}),a=Je(i);await ne({actor:o,canisterId:Ro.fromText(n),arg:new Uint8Array(a),mode:t?fe:re,reset:t,...r})};var Ps=e=>Ar(e);import{major as Fr,minor as Er,patch as kr}from"semver";var Ns=({currentVersion:e,selectedVersion:t})=>{let r=Fr(e),n=Fr(t),o=Er(e),i=Er(t),a=kr(e),c=kr(t);return r<n-1||o<i-1||a<c-1?{canUpgrade:!1}:{canUpgrade:!0}};import{toNullable as Vo}from"@junobuild/utils";var Mr=async({config:e,satellite:t})=>{let{set_storage_config:r}=await O(t);return r(e)},Br=async({config:e,satellite:t})=>{let{set_db_config:r}=await O(t);return r(e)},Ur=async({config:e,satellite:t})=>{let{set_auth_config:r}=await O(t);return r(e)};var $r=async({satellite:e})=>{let{get_auth_config:t}=await O(e);return t()},qr=async({satellite:e,type:t})=>(await O(e)).list_rules(t),jr=async({type:e,collection:t,rule:r,satellite:n})=>{let{set_rule:o}=await O(n);return o(e,t,r)},zr=async({satellite:e})=>{let{version:t}=await O(e);return t()},Hr=async({satellite:e})=>{let{build_version:t}=await O(e);return t()},Kr=async({satellite:e})=>(await zt(e)).list_controllers(),Qe=async({satellite:e})=>(await Ht(e)).list_controllers(),Ie=async({satellite:e})=>(await O(e)).list_controllers(),Wr=async({satellite:e})=>{let{list_custom_domains:t}=await O(e);return t()},Gr=async({satellite:e,domainName:t,boundaryNodesId:r})=>{let{set_custom_domain:n}=await O(e);await n(t,Vo(r))},Xr=async({satellite:e})=>{let{memory_size:t}=await O(e);return t()},Zr=async({collection:e,satellite:t})=>{let{count_collection_docs:r}=await O(t);return r(e)},Jr=async({collection:e,satellite:t})=>{let{count_collection_assets:r}=await O(t);return r(e)},Yr=async({collection:e,satellite:t})=>{let{del_docs:r}=await O(t);return r(e)},Qr=async({collection:e,satellite:t})=>{let{del_assets:r}=await O(t);return r(e)},Ir=async({args:e,satellite:t})=>{let{set_controllers:r}=await O(t);return r(e)};var Fs=e=>Jr(e),Es=e=>Qr(e);import{fromNullable as De,isNullish as Lr,nonNullish as Dr}from"@junobuild/utils";import{nonNullish as Ao,toNullable as Nt}from"@junobuild/utils";var St=e=>Nt(Ao(e)?{heap:Nt(e.heap),stable:Nt(e.stable)}:void 0);var js=async({config:{headers:e,rewrites:t,redirects:r,iframe:n,rawAccess:o,maxMemorySize:i},satellite:a})=>{let c=(e??[]).map(({source:h,headers:u})=>[h,u]),p=(t??[]).map(({source:h,destination:u})=>[h,u]),d=(r??[]).map(({source:h,location:u,code:m})=>[h,{status_code:m,location:u}]);return await Mr({satellite:a,config:{headers:c,rewrites:p,redirects:[d],iframe:[n==="same-origin"?{SameOrigin:null}:n==="allow-any"?{AllowAny:null}:{Deny:null}],raw_access:[o===!0?{Allow:null}:{Deny:null}],max_memory_size:St(i)}})},zs=async({config:{maxMemorySize:e},...t})=>{await Br({config:{max_memory_size:St(e)},...t})},Hs=async({config:{internetIdentity:e},...t})=>{await Ur({config:{internet_identity:Lr(e?.derivationOrigin)?[]:[{derivation_origin:[e.derivationOrigin]}]},...t})},Ks=async({satellite:e})=>{let t=De(await $r({satellite:e}));if(Lr(t))return;let r=De(t.internet_identity??[]);return{...Dr(r)&&{internetIdentity:{...Dr(De(r.derivation_origin))&&{derivationOrigin:De(r.derivation_origin)}}}}};var Xs=({deprecatedNoScope:e,...t})=>(e===!0?Qe:Ie)(t),Zs=e=>Ir(e);var Qs=e=>Zr(e),Is=e=>Yr(e);import{fromNullable as en,nonNullish as Oo}from"@junobuild/utils";var ta=async({satellite:e})=>(await Wr({satellite:e})).map(([r,n])=>{let o=en(n.version);return{domain:r,bn_id:en(n.bn_id),created_at:n.created_at,updated_at:n.updated_at,...Oo(o)&&{version:o}}}),ra=({satellite:e,domains:t})=>Promise.all(t.map(({domain:r,bn_id:n})=>Gr({satellite:e,domainName:r,boundaryNodesId:n})));var ia=e=>Xr(e);import{fromNullable as pe,nonNullish as te,toNullable as Le}from"@junobuild/utils";var tn={Db:null},rn={Storage:null},nn={Public:null},on={Private:null},sn={Managed:null},an={Controllers:null},Rt={Heap:null},cn={Stable:null},ln=600000000n;var Vt=e=>e==="storage"?rn:tn,pn=({read:e,write:t,memory:r,maxSize:n,maxCapacity:o,version:i,mutablePermissions:a,maxTokens:c})=>({read:dn(e),write:dn(t),memory:te(r)?[Fo(r)]:[],version:Le(i),max_size:Le(te(n)&&n>0?BigInt(n):void 0),max_capacity:Le(te(o)&&o>0?o:void 0),mutable_permissions:Le(a),rate_config:te(c)?[{max_tokens:BigInt(c),time_per_token_ns:ln}]:[]}),mn=([e,t])=>{let{read:r,write:n,updated_at:o,created_at:i,max_size:a,max_capacity:c,memory:p,mutable_permissions:d,version:g,rate_config:y}=t,h=a?.[0]??0n>0n?Number(pe(a)):void 0,u=c?.[0]??!1?pe(c):void 0,m=pe(g),T=y?.[0]?.max_tokens??0n>0n?pe(y)?.max_tokens:void 0;return{collection:e,read:un(r),write:un(n),memory:Eo(pe(p)??Rt),updatedAt:o,createdAt:i,...te(m)&&{version:m},...te(h)&&{maxSize:h},...te(u)&&{maxCapacity:u},mutablePermissions:pe(d)??!0,...te(T)&&{maxTokens:Number(T)}}},un=e=>"Public"in e?"public":"Private"in e?"private":"Managed"in e?"managed":"controllers",dn=e=>{switch(e){case"public":return nn;case"private":return on;case"managed":return sn;default:return an}},Fo=e=>{switch(e.toLowerCase()){case"heap":return Rt;default:return cn}},Eo=e=>"Heap"in e?"heap":"stable";var ma=async({type:e,satellite:t})=>(await qr({satellite:t,type:Vt(e)})).map(n=>mn(n)),fa=async({rule:{collection:e,...t},type:r,satellite:n})=>{await jr({type:Vt(r),rule:pn(t),satellite:n,collection:e})};var be=Et(Ct(),1);import{Principal as fn}from"@dfinity/principal";import{isNullish as ko}from"@junobuild/utils";var wa=async({satellite:e,deprecated:t,deprecatedNoScope:r,reset:n=!1,...o})=>{let{satelliteId:i,...a}=e;if(ko(i))throw new Error("No satellite principal defined.");if(t){let g=await Kr({satellite:e}),y=be.IDL.encode([be.IDL.Record({controllers:be.IDL.Vec(be.IDL.Principal)})],[{controllers:g}]);await ne({actor:a,canisterId:fn.fromText(i),arg:new Uint8Array(y),mode:n?fe:re,reset:n,...o});return}let p=await(r?Qe:Ie)({satellite:e}),d=Je(p);await ne({actor:a,canisterId:fn.fromText(i),arg:new Uint8Array(d),mode:n?fe:re,reset:n,...o})};import{nonNullish as Mo}from"@junobuild/utils";var Sa=e=>zr(e),Ra=e=>Hr(e),Va=async({satellite:{satelliteId:e,...t}})=>{let r=await tr({...t,canisterId:e,path:"juno:build"});return Mo(r)&&["stock","extended"].includes(r)?r:void 0};export{rr as UpgradeCodeProgressStep,we as UpgradeCodeUnchangedError,ir as blobSha256,Ns as checkUpgradeVersion,Fs as countAssets,Qs as countDocs,Es as deleteAssets,Is as deleteDocs,Ks as getAuthConfig,ta as listCustomDomains,li as listMissionControlControllers,us as listOrbiterControllers,ma as listRules,Xs as listSatelliteControllers,is as missionControlVersion,ms as orbiterMemorySize,Ps as orbiterVersion,Va as satelliteBuildType,Ra as satelliteBuildVersion,ia as satelliteMemorySize,Sa as satelliteVersion,Hs as setAuthConfig,ra as setCustomDomains,zs as setDatastoreConfig,ci as setMissionControlController,fa as setRule,Zs as setSatelliteControllers,ai as setSatellitesController,js as setStorageConfig,Ne as uint8ArraySha256,rs as upgradeMissionControl,bs as upgradeOrbiter,wa as upgradeSatellite};
|
|
16
16
|
//# sourceMappingURL=index.mjs.map
|