From 0f0c00bd03c89c6a0850b4ba90ccbf0e0ea5d4c9 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Sat, 9 Jul 2022 10:57:21 +0300 Subject: [PATCH] [#32] allow decimals in the number field --- .../assets/{Elements.6ae71f5f.js => Elements.2e7d2d27.js} | 2 +- ...ut.5c71eaaa.js => FilterAutocompleteInput.43fff355.js} | 2 +- ...{NotFoundPage.20ca3d22.js => NotFoundPage.880704ae.js} | 2 +- ...3acd2.js => PageAdminConfirmPasswordReset.af271f63.js} | 2 +- ...72c89.js => PageAdminRequestPasswordReset.43376396.js} | 2 +- ...fa09e84a.js => PageUserConfirmEmailChange.79b55304.js} | 2 +- ...dcb527.js => PageUserConfirmPasswordReset.5385bb26.js} | 2 +- ...8b3f8a7.js => PageUserConfirmVerification.6d5d72b2.js} | 2 +- ui/dist/assets/{index.66a4e29c.js => index.a4c2f517.js} | 8 ++++---- ui/dist/index.html | 2 +- ui/src/components/records/fields/NumberField.svelte | 1 + 11 files changed, 14 insertions(+), 13 deletions(-) rename ui/dist/assets/{Elements.6ae71f5f.js => Elements.2e7d2d27.js} (99%) rename ui/dist/assets/{FilterAutocompleteInput.5c71eaaa.js => FilterAutocompleteInput.43fff355.js} (99%) rename ui/dist/assets/{NotFoundPage.20ca3d22.js => NotFoundPage.880704ae.js} (66%) rename ui/dist/assets/{PageAdminConfirmPasswordReset.3443acd2.js => PageAdminConfirmPasswordReset.af271f63.js} (98%) rename ui/dist/assets/{PageAdminRequestPasswordReset.85272c89.js => PageAdminRequestPasswordReset.43376396.js} (98%) rename ui/dist/assets/{PageUserConfirmEmailChange.fa09e84a.js => PageUserConfirmEmailChange.79b55304.js} (98%) rename ui/dist/assets/{PageUserConfirmPasswordReset.d7dcb527.js => PageUserConfirmPasswordReset.5385bb26.js} (98%) rename ui/dist/assets/{PageUserConfirmVerification.08b3f8a7.js => PageUserConfirmVerification.6d5d72b2.js} (97%) rename ui/dist/assets/{index.66a4e29c.js => index.a4c2f517.js} (97%) diff --git a/ui/dist/assets/Elements.6ae71f5f.js b/ui/dist/assets/Elements.2e7d2d27.js similarity index 99% rename from ui/dist/assets/Elements.6ae71f5f.js rename to ui/dist/assets/Elements.2e7d2d27.js index 16f76713..28b6ea7f 100644 --- a/ui/dist/assets/Elements.6ae71f5f.js +++ b/ui/dist/assets/Elements.2e7d2d27.js @@ -1,4 +1,4 @@ -import{S as ln,i as tn,s as sn,O as We,a as en,b as nn,c as fn,e,d as n,f as Xt,g as f,h as i,j as u,m as Dt,k as bn,t as un,l as on,n as zt,o as Ft,p as s,q as Gt,r as pn,u as Ye}from"./index.66a4e29c.js";function mn(v){let b;return{c(){b=e("p"),b.textContent="Lorem ipsum dolor sit amet..."},m(o,p){i(o,b,p)},p:Ye,d(o){o&&s(b)}}}function vn(v){let b;return{c(){b=e("h4"),b.textContent="My title",f(b,"slot","header")},m(o,p){i(o,b,p)},p:Ye,d(o){o&&s(b)}}}function dn(v){let b,o,p;return{c(){b=e("button"),b.textContent="Cancel",o=n(),p=e("button"),p.textContent="Save",f(b,"class","btn btn-secondary"),f(p,"class","btn btn-expanded")},m(m,d){i(m,b,d),i(m,o,d),i(m,p,d)},p:Ye,d(m){m&&s(b),m&&s(o),m&&s(p)}}}function xn(v){let b,o,p,m,d,Jt,Kt,_,_t,Ze,y,Qt,Ut,Vt,L,Lt,re,B,Wt,Yt,Zt,r,rt,c,ct,a,at,h,ht,g,gt,li,ti,Ht,ii,Ct,si,Mt,ei,Tt,ni,yt,fi,Bt,bi,wt,ui,kt,oi,$t,pi,Ot,mi,It,vi,Et,di,xi,_i,ll,Li,Nt,Hi,Pt,Ci,jt,Mi,At,Ti,yi,Bi,tl,wi,ki,$i,il,Oi,sl,Ii,el,Ei,nl,Ni,fl,Pi,bl,ji,Ai,Si,ul,qi,ol,Ri,pl,Xi,ml,Di,vl,zi,dl,Fi,Gi,Ji,xl,Ki,_l,Qi,Ll,Ui,Hl,Vi,Cl,Wi,Ml,Yi,Zi,ri,w,ci,k,ai,$,hi,O,gi,I,ls,E,ts,N,is,P,ss,j,es,A,ns,S,fs,q,bs,us,os,Tl,ps,yl,ms,Bl,vs,wl,ds,kl,xs,_s,Ls,$l,Hs,Ol,Cs,Il,Ms,El,Ts,Nl,ys,Bs,ws,Pl,ks,jl,$s,Al,Os,Sl,Is,ql,Es,Ns,Ps,Rl,js,Xl,As,Dl,Ss,zl,qs,Fl,Rs,Gl,Xs,Ds,zs,Jl,Fs,Kl,Gs,Ql,Js,Ul,Ks,Vl,Qs,Wl,Us,Vs,Ws,R,Ys,X,Zs,D,rs,z,cs,F,as,G,hs,gs,le,St,te,ie,se,J,H,K,Q,ee,ne,fe,Yl,be,ue,oe,Zl,pe,rl,me,C,qt,ce,U,M,V,W,ve,de,xe,cl,_e,al,Le,hl,gl,T,Y,Z,He,Ce,Me,lt,Te,tt,ye,it,Be,st,we,ke,$e,et,Oe,nt,Ie,ft,Ee,bt,Ne,Pe,je,ut,Ae,ot,Se,pt,qe,mt,Re,Xe,De,vt,ze,dt,Fe,Ge,Je,xt,Ke,x,Qe,Rt,Ue,ae;m=new We({props:{multiple:!0,searchable:!0,items:["test1","test2"]}}),y=new We({props:{searchable:!0,items:["test1","test2"]}}),B=new We({props:{disabled:!0,searchable:!0,items:["test1","test2"]}});function ge(l){v[1](l)}let he={popup:!1,$$slots:{footer:[dn],header:[vn],default:[mn]},$$scope:{ctx:v}};return v[0]!==void 0&&(he.active=v[0]),x=new en({props:he}),nn.push(()=>fn(x,"active",ge)),{c(){b=e("div"),o=e("label"),o.textContent="EXAMPLE",p=n(),Xt(m.$$.fragment),d=n(),Jt=e("hr"),Kt=n(),_=e("div"),_t=e("label"),_t.textContent="EXAMPLE",Ze=n(),Xt(y.$$.fragment),Qt=n(),Ut=e("hr"),Vt=n(),L=e("div"),Lt=e("label"),Lt.textContent="EXAMPLE",re=n(),Xt(B.$$.fragment),Wt=n(),Yt=e("hr"),Zt=n(),r=e("div"),r.innerHTML=`
+import{S as ln,i as tn,s as sn,O as We,a as en,b as nn,c as fn,e,d as n,f as Xt,g as f,h as i,j as u,m as Dt,k as bn,t as un,l as on,n as zt,o as Ft,p as s,q as Gt,r as pn,u as Ye}from"./index.a4c2f517.js";function mn(v){let b;return{c(){b=e("p"),b.textContent="Lorem ipsum dolor sit amet..."},m(o,p){i(o,b,p)},p:Ye,d(o){o&&s(b)}}}function vn(v){let b;return{c(){b=e("h4"),b.textContent="My title",f(b,"slot","header")},m(o,p){i(o,b,p)},p:Ye,d(o){o&&s(b)}}}function dn(v){let b,o,p;return{c(){b=e("button"),b.textContent="Cancel",o=n(),p=e("button"),p.textContent="Save",f(b,"class","btn btn-secondary"),f(p,"class","btn btn-expanded")},m(m,d){i(m,b,d),i(m,o,d),i(m,p,d)},p:Ye,d(m){m&&s(b),m&&s(o),m&&s(p)}}}function xn(v){let b,o,p,m,d,Jt,Kt,_,_t,Ze,y,Qt,Ut,Vt,L,Lt,re,B,Wt,Yt,Zt,r,rt,c,ct,a,at,h,ht,g,gt,li,ti,Ht,ii,Ct,si,Mt,ei,Tt,ni,yt,fi,Bt,bi,wt,ui,kt,oi,$t,pi,Ot,mi,It,vi,Et,di,xi,_i,ll,Li,Nt,Hi,Pt,Ci,jt,Mi,At,Ti,yi,Bi,tl,wi,ki,$i,il,Oi,sl,Ii,el,Ei,nl,Ni,fl,Pi,bl,ji,Ai,Si,ul,qi,ol,Ri,pl,Xi,ml,Di,vl,zi,dl,Fi,Gi,Ji,xl,Ki,_l,Qi,Ll,Ui,Hl,Vi,Cl,Wi,Ml,Yi,Zi,ri,w,ci,k,ai,$,hi,O,gi,I,ls,E,ts,N,is,P,ss,j,es,A,ns,S,fs,q,bs,us,os,Tl,ps,yl,ms,Bl,vs,wl,ds,kl,xs,_s,Ls,$l,Hs,Ol,Cs,Il,Ms,El,Ts,Nl,ys,Bs,ws,Pl,ks,jl,$s,Al,Os,Sl,Is,ql,Es,Ns,Ps,Rl,js,Xl,As,Dl,Ss,zl,qs,Fl,Rs,Gl,Xs,Ds,zs,Jl,Fs,Kl,Gs,Ql,Js,Ul,Ks,Vl,Qs,Wl,Us,Vs,Ws,R,Ys,X,Zs,D,rs,z,cs,F,as,G,hs,gs,le,St,te,ie,se,J,H,K,Q,ee,ne,fe,Yl,be,ue,oe,Zl,pe,rl,me,C,qt,ce,U,M,V,W,ve,de,xe,cl,_e,al,Le,hl,gl,T,Y,Z,He,Ce,Me,lt,Te,tt,ye,it,Be,st,we,ke,$e,et,Oe,nt,Ie,ft,Ee,bt,Ne,Pe,je,ut,Ae,ot,Se,pt,qe,mt,Re,Xe,De,vt,ze,dt,Fe,Ge,Je,xt,Ke,x,Qe,Rt,Ue,ae;m=new We({props:{multiple:!0,searchable:!0,items:["test1","test2"]}}),y=new We({props:{searchable:!0,items:["test1","test2"]}}),B=new We({props:{disabled:!0,searchable:!0,items:["test1","test2"]}});function ge(l){v[1](l)}let he={popup:!1,$$slots:{footer:[dn],header:[vn],default:[mn]},$$scope:{ctx:v}};return v[0]!==void 0&&(he.active=v[0]),x=new en({props:he}),nn.push(()=>fn(x,"active",ge)),{c(){b=e("div"),o=e("label"),o.textContent="EXAMPLE",p=n(),Xt(m.$$.fragment),d=n(),Jt=e("hr"),Kt=n(),_=e("div"),_t=e("label"),_t.textContent="EXAMPLE",Ze=n(),Xt(y.$$.fragment),Qt=n(),Ut=e("hr"),Vt=n(),L=e("div"),Lt=e("label"),Lt.textContent="EXAMPLE",re=n(),Xt(B.$$.fragment),Wt=n(),Yt=e("hr"),Zt=n(),r=e("div"),r.innerHTML=`
Hello world!
`,rt=n(),c=e("div"),c.innerHTML=`
Hello world!
diff --git a/ui/dist/assets/FilterAutocompleteInput.5c71eaaa.js b/ui/dist/assets/FilterAutocompleteInput.43fff355.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput.5c71eaaa.js rename to ui/dist/assets/FilterAutocompleteInput.43fff355.js index 590f4290..19d815da 100644 --- a/ui/dist/assets/FilterAutocompleteInput.5c71eaaa.js +++ b/ui/dist/assets/FilterAutocompleteInput.43fff355.js @@ -1,4 +1,4 @@ -import{S as Sa,i as va,s as Ca,e as Aa,g as Ma,h as Da,u as xn,p as Oa,M as Ta,N as Ba,P as Ra,Q as Pa,R as La,H as kn,b as Ea}from"./index.66a4e29c.js";class z{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ve.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Ve.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zt(this),r=new Zt(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zt(this,e)}iterRange(e,t=this.length){return new zo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new qo(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?z.empty:e.length<=32?new Q(e):Ve.from(Q.split(e,[]))}}class Q extends z{constructor(e,t=Ia(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Na(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(hr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Pi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Q(l,o.length+r.length));else{let h=l.length>>1;i.push(new Q(l.slice(0,h)),new Q(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Q))return super.replace(e,t,i);let s=Pi(this.text,Pi(i.text,hr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new Q(s,r):Ve.from(Q.split(s,[]),r)}sliceString(e,t=this.length,i=` +import{S as Sa,i as va,s as Ca,e as Aa,g as Ma,h as Da,u as xn,p as Oa,M as Ta,N as Ba,P as Ra,Q as Pa,R as La,H as kn,b as Ea}from"./index.a4c2f517.js";class z{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ve.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Ve.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zt(this),r=new Zt(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zt(this,e)}iterRange(e,t=this.length){return new zo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new qo(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?z.empty:e.length<=32?new Q(e):Ve.from(Q.split(e,[]))}}class Q extends z{constructor(e,t=Ia(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Na(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(hr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Pi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Q(l,o.length+r.length));else{let h=l.length>>1;i.push(new Q(l.slice(0,h)),new Q(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Q))return super.replace(e,t,i);let s=Pi(this.text,Pi(i.text,hr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new Q(s,r):Ve.from(Q.split(s,[]),r)}sliceString(e,t=this.length,i=` `){let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=h+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new Q(i,s)),i=[],s=-1);return s>-1&&t.push(new Q(i,s)),t}}class Ve extends z{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,h=i+o.lines-1;if((t?h:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=h+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let a=s&((o<=e?1:0)|(h>=t?2:0));o>=e&&h<=t&&!a?i.push(l):l.decompose(e-o,t-o,i,a)}o=h+1}}replace(e,t,i){if(i.lines=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new Ve(c,this.length-(t-e)+i.length)}return super.replace(r,l,h)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` `){let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=h+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ve))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let h=this.children[s],a=e.children[r];if(h!=a)return i+h.scanIdentical(a,t);i+=h.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new Q(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],h=0,a=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ve)for(let g of d.children)f(g);else d.lines>o&&(h>o||!h)?(u(),l.push(d)):d instanceof Q&&h&&(p=c[c.length-1])instanceof Q&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new Q(p.text.concat(d.text),p.length+1+d.length)):(h+d.lines>s&&u(),h+=d.lines,a+=d.length+1,c.push(d))}function u(){h!=0&&(l.push(c.length==1?c[0]:Ve.from(c,a)),a=-1,h=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Ve(l,t)}}z.empty=new Q([""],0);function Ia(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Pi(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(h>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof Q?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof Q?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` `,this;e--}else if(s instanceof Q){let h=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=s.children[o+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof Q?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class zo{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Zt(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class qo{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol!="undefined"&&(z.prototype[Symbol.iterator]=function(){return this.iter()},Zt.prototype[Symbol.iterator]=zo.prototype[Symbol.iterator]=qo.prototype[Symbol.iterator]=function(){return this});class Na{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}let Dt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Dt[e-1]<=n;return!1}function ar(n){return n>=127462&&n<=127487}const cr=8205;function Ae(n,e,t=!0,i=!0){return(t?Ko:Fa)(n,e,i)}function Ko(n,e,t){if(e==n.length)return e;e&&Uo(n.charCodeAt(e))&&jo(n.charCodeAt(e-1))&&e--;let i=re(n,e);for(e+=ve(i);e=0&&ar(re(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Fa(n,e,t){for(;e>0;){let i=Ko(n,e-2,t);if(i=56320&&n<57344}function jo(n){return n>=55296&&n<56320}function re(n,e){let t=n.charCodeAt(e);if(!jo(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Uo(i)?(t-55296<<10)+(i-56320)+65536:t}function Rs(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ve(n){return n<65536?1:2}const Kn=/\r\n?|\n/;var me=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(me||(me={}));class We{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=me.Simple&&a>=e&&(i==me.TrackDel&&se||i==me.TrackBefore&&se))return null;if(a>e||a==e&&t<0&&!l)return e==s||t<0?r:r+h;r+=h}s=a}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new We(e)}static create(e){return new We(e)}}class ee extends We{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Un(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return jn(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let h=s>>1;for(;i.length0&&Ye(i,t,r.text),r.forward(c),l+=c}let a=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function h(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?z.of(d.split(i||Kn)):d:z.empty,g=p.length;if(f==u&&g==0)return;fo&&he(s,f-o,-1),he(s,u-f,g),Ye(r,s,p),o=u}}return a(e),h(!l),l}static empty(e){return new ee(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Ye(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],h=n.sections[o++];e(s,a,r,c,f),s=a,r=c}}}function jn(n,e,t,i=!1){let s=[],r=i?[]:null,o=new si(n),l=new si(e);for(let h=-1;;)if(o.ins==-1&&l.ins==-1){let a=Math.min(o.len,l.len);he(s,a,-1),o.forward(a),l.forward(a)}else if(l.ins>=0&&(o.ins<0||h==o.i||o.off==0&&(l.len=0&&h=0){let a=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);a+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lenh||o.ins>=0&&o.len>h)&&(l||i.length>a),r.forward2(h),o.forward(h)}}}}class si{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?z.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?z.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ct{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new ct(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return m.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return m.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return m.range(e.anchor,e.head)}static create(e,t,i){return new ct(e,t,i)}}class m{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:m.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new m(e.ranges.map(t=>ct.fromJSON(t)),e.main)}static single(e,t=e){return new m([m.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?4:0))}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?m.range(h,l):m.range(l,h))}}return new m(e,t)}}function Jo(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Ps=0;class T{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=Ps++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}static define(e={}){return new T(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Ls),!!e.static,e.enables)}of(e){return new Li([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Li(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Li(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Ls(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Li{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=Ps++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,h=!1,a=!1,c=[];for(let f of this.dependencies)f=="doc"?h=!0:f=="selection"?a=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(h&&u.docChanged||a&&(u.docChanged||u.selection)||Gn(f,c)){let d=i(f);if(l?!fr(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d=i(f),p=u.config.address[r];if(p!=null){let g=Fi(u,p);if(this.dependencies.every(y=>y instanceof T?u.facet(y)===f.facet(y):y instanceof ke?u.field(y,!1)==f.field(y,!1):!0)||(l?fr(d,g,s):s(d,g)))return f.values[o]=g,0}return f.values[o]=d,1}}}}function fr(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[h.id]),s=t.map(h=>h.type),r=i.filter(h=>!(h&1)),o=n[e.id]>>1;function l(h){let a=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(ur).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,ur.of({field:this,create:e})]}get extension(){return this}}const Ct={lowest:4,low:3,default:2,high:1,highest:0};function Kt(n){return e=>new $o(e,n)}const Wt={highest:Kt(Ct.highest),high:Kt(Ct.high),default:Kt(Ct.default),low:Kt(Ct.low),lowest:Kt(Ct.lowest)};class $o{constructor(e,t){this.inner=e,this.prec=t}}class _e{of(e){return new Jn(this,e)}reconfigure(e){return _e.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Jn{constructor(e,t){this.compartment=e,this.inner=t}}class Vi{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of Wa(e,t,o))u instanceof ke?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),h=[],a=[];for(let u of s)l[u.id]=a.length<<1,a.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],p=d[0].facet,g=c&&c[u]||[];if(d.every(y=>y.type==0))if(l[p.id]=h.length<<1|1,Ls(g,d))h.push(i.facet(p));else{let y=p.combine(d.map(b=>b.value));h.push(i&&p.compare(y,i.facet(p))?i.facet(p):y)}else{for(let y of d)y.type==0?(l[y.id]=h.length<<1|1,h.push(y.value)):(l[y.id]=a.length<<1,a.push(b=>y.dynamicSlot(b)));l[p.id]=a.length<<1,a.push(y=>Ha(y,p,d))}}let f=a.map(u=>u(l));return new Vi(e,o,f,l,h,r)}}function Wa(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let h=s.get(o);if(h!=null){if(h<=l)return;let a=i[h].indexOf(o);a>-1&&i[h].splice(a,1),o instanceof Jn&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let a of o)r(a,l);else if(o instanceof Jn){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let a=e.get(o.compartment)||o.inner;t.set(o.compartment,a),r(a,l)}else if(o instanceof $o)r(o.inner,o.prec);else if(o instanceof ke)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Li)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,l);else{let a=o.extension;if(!a)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(a,l)}}return r(n,Ct.default),i.reduce((o,l)=>o.concat(l))}function ei(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Fi(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Xo=T.define(),Yo=T.define({combine:n=>n.some(e=>e),static:!0}),_o=T.define({combine:n=>n.length?n[0]:void 0,static:!0}),Qo=T.define(),Zo=T.define(),el=T.define(),tl=T.define({combine:n=>n.length?n[0]:!1});class wt{constructor(e,t){this.type=e,this.value=t}static define(){return new za}}class za{of(e){return new wt(this,e)}}class qa{constructor(e){this.map=e}of(e){return new H(this,e)}}class H{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new H(this.type,t)}is(e){return this.type==e}static define(e={}){return new qa(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}H.reconfigure=H.define();H.appendConfig=H.define();class te{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Jo(i,t.newLength),r.some(l=>l.type==te.time)||(this.annotations=r.concat(te.time.of(Date.now())))}static create(e,t,i,s,r,o){return new te(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(te.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}te.time=wt.define();te.userEvent=wt.define();te.addToHistory=wt.define();te.remote=wt.define();function Ka(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof te?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof te?n=r[0]:n=nl(e,Ot(r),!1)}return n}function ja(n){let e=n.startState,t=e.facet(el),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=il(n,$n(e,r,n.changes.newLength),!0))}return i==n?n:te.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Ga=[];function Ot(n){return n==null?Ga:Array.isArray(n)?n:[n]}var ce=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(ce||(ce={}));const Ja=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Xn;try{Xn=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function $a(n){if(Xn)return Xn.test(n);for(let e=0;e"\x80"&&(t.toUpperCase()!=t.toLowerCase()||Ja.test(t)))return!0}return!1}function Xa(n){return e=>{if(!/\S/.test(e))return ce.Space;if($a(e))return ce.Word;for(let t=0;t-1)return ce.Word;return ce.Other}}class V{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,l)),t=null),s.set(o.value.compartment,o.value.extension)):o.is(H.reconfigure)?(t=null,i=o.value):o.is(H.appendConfig)&&(t=null,i=Ot(i).concat(o.value));let r;t?r=e.startState.values.slice():(t=Vi.resolve(i,s,this),r=new V(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,h)=>h.reconfigure(l,this),null).values),new V(t,e.newDoc,e.newSelection,r,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:m.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Ot(i.effects);for(let l=1;lo.spec.fromJSON(l,h)))}}return V.create({doc:e.doc,selection:m.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Vi.resolve(e.extensions||[],new Map),i=e.doc instanceof z?e.doc:z.of((e.doc||"").split(t.staticFacet(V.lineSeparator)||Kn)),s=e.selection?e.selection instanceof m?e.selection:m.single(e.selection.anchor,e.selection.head):m.single(0);return Jo(s,i.length),t.staticFacet(Yo)||(s=s.asSingle()),new V(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(V.tabSize)}get lineBreak(){return this.facet(V.lineSeparator)||` diff --git a/ui/dist/assets/NotFoundPage.20ca3d22.js b/ui/dist/assets/NotFoundPage.880704ae.js similarity index 66% rename from ui/dist/assets/NotFoundPage.20ca3d22.js rename to ui/dist/assets/NotFoundPage.880704ae.js index d70ae5d2..de5401ee 100644 --- a/ui/dist/assets/NotFoundPage.20ca3d22.js +++ b/ui/dist/assets/NotFoundPage.880704ae.js @@ -1 +1 @@ -import{S as t,i as n,s as o,K as a}from"./index.66a4e29c.js";function l(e){return a("/collections"),[]}class c extends t{constructor(s){super(),n(this,s,l,null,o,{})}}export{c as default}; +import{S as t,i as n,s as o,K as a}from"./index.a4c2f517.js";function l(e){return a("/collections"),[]}class c extends t{constructor(s){super(),n(this,s,l,null,o,{})}}export{c as default}; diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset.3443acd2.js b/ui/dist/assets/PageAdminConfirmPasswordReset.af271f63.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset.3443acd2.js rename to ui/dist/assets/PageAdminConfirmPasswordReset.af271f63.js index 59113111..649945a7 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset.3443acd2.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset.af271f63.js @@ -1,2 +1,2 @@ -import{S as I,i as K,s as L,F as W,f as F,m as H,n as B,o as J,q as N,H as M,D as q,e as c,g as u,h as b,j as _,E as O,p as w,z,d as k,A as D,B as T,C as Q,k as U,v as V,I as X,y as E,J as Y,K as Z,G as S}from"./index.66a4e29c.js";function G(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&O(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=k(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=T(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=k(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=T(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,C,v,P,A,h,m=f[3]&&G(f);return r=new z({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new z({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password +import{S as I,i as K,s as L,F as W,f as F,m as H,n as B,o as J,q as N,H as M,D as q,e as c,g as u,h as b,j as _,E as O,p as w,z,d as k,A as D,B as T,C as Q,k as U,v as V,I as X,y as E,J as Y,K as Z,G as S}from"./index.a4c2f517.js";function G(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&O(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=k(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=T(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=k(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=T(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,C,v,P,A,h,m=f[3]&&G(f);return r=new z({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new z({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password `),m&&m.c(),t=k(),F(r.$$.fragment),p=k(),F(d.$$.fragment),n=k(),i=c("button"),g=c("span"),g.textContent="Set new password",R=k(),C=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],D(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(C,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),H(r,e,null),_(e,p),H(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,C,$),_(C,v),P=!0,A||(h=[T(e,"submit",Q(f[4])),U(V.call(null,v))],A=!0)},p(a,$){a[3]?m?m.p(a,$):(m=G(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const j={};$&769&&(j.$$scope={dirty:$,ctx:a}),r.$set(j);const y={};$&770&&(y.$$scope={dirty:$,ctx:a}),d.$set(y),(!P||$&4)&&(i.disabled=a[2]),$&4&&D(i,"btn-loading",a[2])},i(a){P||(B(r.$$.fragment,a),B(d.$$.fragment,a),P=!0)},o(a){J(r.$$.fragment,a),J(d.$$.fragment,a),P=!1},d(a){a&&w(e),m&&m.d(),N(r),N(d),a&&w(R),a&&w(C),A=!1,X(h)}}}function se(f){let e,o;return e=new W({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){F(e.$$.fragment)},m(s,l){H(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(B(e.$$.fragment,s),o=!0)},o(s){J(e.$$.fragment,s),o=!1},d(s){N(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await E.Admins.confirmPasswordReset(l==null?void 0:l.token,t,r),Y("Successfully set a new admin password."),Z("/")}catch(g){E.errorResponseHandler(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends I{constructor(e){super(),K(this,e,le,se,L,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset.85272c89.js b/ui/dist/assets/PageAdminRequestPasswordReset.43376396.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset.85272c89.js rename to ui/dist/assets/PageAdminRequestPasswordReset.43376396.js index 9954ffcf..9f2db0bc 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset.85272c89.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset.43376396.js @@ -1,2 +1,2 @@ -import{S,i as B,s as M,F as T,f as A,m as E,n as w,o as y,q as H,d as g,e as _,g as p,h as k,j as d,k as j,v as z,w as D,x as G,p as v,y as C,z as N,A as F,B as L,C as I,D as h,E as J,u as P,G as R}from"./index.66a4e29c.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new N({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

+import{S,i as B,s as M,F as T,f as A,m as E,n as w,o as y,q as H,d as g,e as _,g as p,h as k,j as d,k as j,v as z,w as D,x as G,p as v,y as C,z as N,A as F,B as L,C as I,D as h,E as J,u as P,G as R}from"./index.a4c2f517.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new N({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

Enter the email associated with your account and we\u2019ll send you a recovery link:

`,n=g(),A(l.$$.fragment),t=g(),o=_("button"),f=_("i"),m=g(),i=_("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(i,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=c[1],F(o,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),E(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=L(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(o.disabled=r[1]),$&2&&F(o,"btn-loading",r[1])},i(r){a||(w(l.$$.fragment,r),a=!0)},o(r){y(l.$$.fragment,r),a=!1},d(r){r&&v(e),H(l),b=!1,u()}}}function O(c){let e,s,n,l,t,o,f,m,i;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=g(),l=_("div"),t=_("p"),o=h("Check "),f=_("strong"),m=h(c[0]),i=h(" for the recovery link."),p(s,"class","icon"),p(f,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){k(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,f),d(f,m),d(t,i)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&v(e)}}}function Q(c){let e,s,n,l,t,o,f,m;return{c(){e=_("label"),s=h("Email"),l=g(),t=_("input"),p(e,"for",n=c[5]),p(t,"type","email"),p(t,"id",o=c[5]),t.required=!0,t.autofocus=!0},m(i,a){k(i,e,a),d(e,s),k(i,l,a),k(i,t,a),R(t,c[0]),t.focus(),f||(m=L(t,"input",c[4]),f=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&o!==(o=i[5])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&v(e),i&&v(l),i&&v(t),f=!1,m()}}}function U(c){let e,s,n,l,t,o,f,m;const i=[O,K],a=[];function b(u,r){return u[2]?0:1}return e=b(c),s=a[e]=i[e](c),{c(){s.c(),n=g(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(u,r){a[e].m(u,r),k(u,n,r),k(u,l,r),d(l,t),o=!0,f||(m=j(z.call(null,t)),f=!0)},p(u,r){let $=e;e=b(u),e===$?a[e].p(u,r):(D(),y(a[$],1,1,()=>{a[$]=null}),G(),s=a[e],s?s.p(u,r):(s=a[e]=i[e](u),s.c()),w(s,1),s.m(n.parentNode,n))},i(u){o||(w(s),o=!0)},o(u){y(s),o=!1},d(u){a[e].d(u),u&&v(n),u&&v(l),f=!1,m()}}}function V(c){let e,s;return e=new T({props:{$$slots:{default:[U]},$$scope:{ctx:c}}}),{c(){A(e.$$.fragment)},m(n,l){E(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){H(e,n)}}}function W(c,e,s){let n="",l=!1,t=!1;async function o(){if(!l){s(1,l=!0);try{await C.Admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.errorResponseHandler(m)}s(1,l=!1)}}function f(){n=this.value,s(0,n)}return[n,l,t,o,f]}class Y extends S{constructor(e){super(),B(this,e,W,V,M,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageUserConfirmEmailChange.fa09e84a.js b/ui/dist/assets/PageUserConfirmEmailChange.79b55304.js similarity index 98% rename from ui/dist/assets/PageUserConfirmEmailChange.fa09e84a.js rename to ui/dist/assets/PageUserConfirmEmailChange.79b55304.js index 47448a21..a08feabb 100644 --- a/ui/dist/assets/PageUserConfirmEmailChange.fa09e84a.js +++ b/ui/dist/assets/PageUserConfirmEmailChange.79b55304.js @@ -1,4 +1,4 @@ -import{S as z,i as A,s as B,F as D,f as S,m as U,n as $,o as v,q as j,H as G,L as J,h as _,w as M,x as N,p as b,y as P,D as y,e as m,g as d,j as g,E as R,z as W,d as C,A as F,B as E,C as Y,u as h,G as L}from"./index.66a4e29c.js";function I(r){let e,s,t,l,n,o,c,a,i,u,k,q,p=r[3]&&T(r);return o=new W({props:{class:"form-field required",name:"password",$$slots:{default:[O,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),s=m("div"),t=m("h4"),l=y(`Type your password to confirm changing your email address +import{S as z,i as A,s as B,F as D,f as S,m as U,n as $,o as v,q as j,H as G,L as J,h as _,w as M,x as N,p as b,y as P,D as y,e as m,g as d,j as g,E as R,z as W,d as C,A as F,B as E,C as Y,u as h,G as L}from"./index.a4c2f517.js";function I(r){let e,s,t,l,n,o,c,a,i,u,k,q,p=r[3]&&T(r);return o=new W({props:{class:"form-field required",name:"password",$$slots:{default:[O,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),s=m("div"),t=m("h4"),l=y(`Type your password to confirm changing your email address `),p&&p.c(),n=C(),S(o.$$.fragment),c=C(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","m-b-xs"),d(s,"class","content txt-center m-b-sm"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],F(a,"btn-loading",r[1])},m(f,w){_(f,e,w),g(e,s),g(s,t),g(t,l),p&&p.m(t,null),g(e,n),U(o,e,null),g(e,c),g(e,a),g(a,i),u=!0,k||(q=E(e,"submit",Y(r[4])),k=!0)},p(f,w){f[3]?p?p.p(f,w):(p=T(f),p.c(),p.m(t,null)):p&&(p.d(1),p=null);const H={};w&769&&(H.$$scope={dirty:w,ctx:f}),o.$set(H),(!u||w&2)&&(a.disabled=f[1]),w&2&&F(a,"btn-loading",f[1])},i(f){u||($(o.$$.fragment,f),u=!0)},o(f){v(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),j(o),k=!1,q()}}}function K(r){let e,s,t,l,n;return{c(){e=m("div"),e.innerHTML=`

Email address changed

You can now sign in with your new email address.

`,s=C(),t=m("button"),t.textContent="Close",d(e,"class","alert alert-success"),d(t,"type","button"),d(t,"class","btn btn-secondary btn-block")},m(o,c){_(o,e,c),_(o,s,c),_(o,t,c),l||(n=E(t,"click",r[6]),l=!0)},p:h,i:h,o:h,d(o){o&&b(e),o&&b(s),o&&b(t),l=!1,n()}}}function T(r){let e,s,t;return{c(){e=y("to "),s=m("strong"),t=y(r[3]),d(s,"class","txt-nowrap")},m(l,n){_(l,e,n),_(l,s,n),g(s,t)},p(l,n){n&8&&R(t,l[3])},d(l){l&&b(e),l&&b(s)}}}function O(r){let e,s,t,l,n,o,c,a;return{c(){e=m("label"),s=y("Password"),l=C(),n=m("input"),d(e,"for",t=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(i,u){_(i,e,u),g(e,s),_(i,l,u),_(i,n,u),L(n,r[0]),n.focus(),c||(a=E(n,"input",r[7]),c=!0)},p(i,u){u&256&&t!==(t=i[8])&&d(e,"for",t),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&L(n,i[0])},d(i){i&&b(e),i&&b(l),i&&b(n),c=!1,a()}}}function Q(r){let e,s,t,l;const n=[K,I],o=[];function c(a,i){return a[2]?0:1}return e=c(r),s=o[e]=n[e](r),{c(){s.c(),t=J()},m(a,i){o[e].m(a,i),_(a,t,i),l=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(M(),v(o[u],1,1,()=>{o[u]=null}),N(),s=o[e],s?s.p(a,i):(s=o[e]=n[e](a),s.c()),$(s,1),s.m(t.parentNode,t))},i(a){l||($(s),l=!0)},o(a){v(s),l=!1},d(a){o[e].d(a),a&&b(t)}}}function V(r){let e,s;return e=new D({props:{nobranding:!0,$$slots:{default:[Q]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(t,l){U(e,t,l),s=!0},p(t,[l]){const n={};l&527&&(n.$$scope={dirty:l,ctx:t}),e.$set(n)},i(t){s||($(e.$$.fragment,t),s=!0)},o(t){v(e.$$.fragment,t),s=!1},d(t){j(e,t)}}}function X(r,e,s){let t,{params:l}=e,n="",o=!1,c=!1;async function a(){if(!o){s(1,o=!0);try{await P.Users.confirmEmailChange(l==null?void 0:l.token,n),s(2,c=!0)}catch(k){P.errorResponseHandler(k)}s(1,o=!1)}}const i=()=>window.close();function u(){n=this.value,s(0,n)}return r.$$set=k=>{"params"in k&&s(5,l=k.params)},r.$$.update=()=>{r.$$.dirty&32&&s(3,t=G.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[n,o,c,t,a,l,i,u]}class x extends z{constructor(e){super(),A(this,e,X,V,B,{params:5})}}export{x as default}; diff --git a/ui/dist/assets/PageUserConfirmPasswordReset.d7dcb527.js b/ui/dist/assets/PageUserConfirmPasswordReset.5385bb26.js similarity index 98% rename from ui/dist/assets/PageUserConfirmPasswordReset.d7dcb527.js rename to ui/dist/assets/PageUserConfirmPasswordReset.5385bb26.js index e371221c..bebdd654 100644 --- a/ui/dist/assets/PageUserConfirmPasswordReset.d7dcb527.js +++ b/ui/dist/assets/PageUserConfirmPasswordReset.5385bb26.js @@ -1,4 +1,4 @@ -import{S as D,i as E,s as G,F as J,f as F,m as L,n as P,o as q,q as N,H as M,L as W,h as _,w as Y,x as I,p as m,y as j,D as y,e as b,j as w,E as K,z,d as C,g as c,A,B as R,C as O,u as h,G as H}from"./index.66a4e29c.js";function Q(r){let e,l,t,n,s,o,p,a,i,u,v,g,k,S,d=r[4]&&B(r);return o=new z({props:{class:"form-field required",name:"password",$$slots:{default:[X,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new z({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),t=b("h4"),n=y(`Reset your user password +import{S as D,i as E,s as G,F as J,f as F,m as L,n as P,o as q,q as N,H as M,L as W,h as _,w as Y,x as I,p as m,y as j,D as y,e as b,j as w,E as K,z,d as C,g as c,A,B as R,C as O,u as h,G as H}from"./index.a4c2f517.js";function Q(r){let e,l,t,n,s,o,p,a,i,u,v,g,k,S,d=r[4]&&B(r);return o=new z({props:{class:"form-field required",name:"password",$$slots:{default:[X,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new z({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),t=b("h4"),n=y(`Reset your user password `),d&&d.c(),s=C(),F(o.$$.fragment),p=C(),F(a.$$.fragment),i=C(),u=b("button"),v=b("span"),v.textContent="Set new password",c(t,"class","m-b-xs"),c(l,"class","content txt-center m-b-sm"),c(v,"class","txt"),c(u,"type","submit"),c(u,"class","btn btn-lg btn-block"),u.disabled=r[2],A(u,"btn-loading",r[2])},m(f,$){_(f,e,$),w(e,l),w(l,t),w(t,n),d&&d.m(t,null),w(e,s),L(o,e,null),w(e,p),L(a,e,null),w(e,i),w(e,u),w(u,v),g=!0,k||(S=R(e,"submit",O(r[5])),k=!0)},p(f,$){f[4]?d?d.p(f,$):(d=B(f),d.c(),d.m(t,null)):d&&(d.d(1),d=null);const T={};$&3073&&(T.$$scope={dirty:$,ctx:f}),o.$set(T);const U={};$&3074&&(U.$$scope={dirty:$,ctx:f}),a.$set(U),(!g||$&4)&&(u.disabled=f[2]),$&4&&A(u,"btn-loading",f[2])},i(f){g||(P(o.$$.fragment,f),P(a.$$.fragment,f),g=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),g=!1},d(f){f&&m(e),d&&d.d(),N(o),N(a),k=!1,S()}}}function V(r){let e,l,t,n,s;return{c(){e=b("div"),e.innerHTML=`

Password changed

You can now sign in with your new password.

`,l=C(),t=b("button"),t.textContent="Close",c(e,"class","alert alert-success"),c(t,"type","button"),c(t,"class","btn btn-secondary btn-block")},m(o,p){_(o,e,p),_(o,l,p),_(o,t,p),n||(s=R(t,"click",r[7]),n=!0)},p:h,i:h,o:h,d(o){o&&m(e),o&&m(l),o&&m(t),n=!1,s()}}}function B(r){let e,l,t;return{c(){e=y("for "),l=b("strong"),t=y(r[4])},m(n,s){_(n,e,s),_(n,l,s),w(l,t)},p(n,s){s&16&&K(t,n[4])},d(n){n&&m(e),n&&m(l)}}}function X(r){let e,l,t,n,s,o,p,a;return{c(){e=b("label"),l=y("New password"),n=C(),s=b("input"),c(e,"for",t=r[10]),c(s,"type","password"),c(s,"id",o=r[10]),s.required=!0,s.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,s,u),H(s,r[0]),s.focus(),p||(a=R(s,"input",r[8]),p=!0)},p(i,u){u&1024&&t!==(t=i[10])&&c(e,"for",t),u&1024&&o!==(o=i[10])&&c(s,"id",o),u&1&&s.value!==i[0]&&H(s,i[0])},d(i){i&&m(e),i&&m(n),i&&m(s),p=!1,a()}}}function Z(r){let e,l,t,n,s,o,p,a;return{c(){e=b("label"),l=y("New password confirm"),n=C(),s=b("input"),c(e,"for",t=r[10]),c(s,"type","password"),c(s,"id",o=r[10]),s.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,s,u),H(s,r[1]),p||(a=R(s,"input",r[9]),p=!0)},p(i,u){u&1024&&t!==(t=i[10])&&c(e,"for",t),u&1024&&o!==(o=i[10])&&c(s,"id",o),u&2&&s.value!==i[1]&&H(s,i[1])},d(i){i&&m(e),i&&m(n),i&&m(s),p=!1,a()}}}function x(r){let e,l,t,n;const s=[V,Q],o=[];function p(a,i){return a[3]?0:1}return e=p(r),l=o[e]=s[e](r),{c(){l.c(),t=W()},m(a,i){o[e].m(a,i),_(a,t,i),n=!0},p(a,i){let u=e;e=p(a),e===u?o[e].p(a,i):(Y(),q(o[u],1,1,()=>{o[u]=null}),I(),l=o[e],l?l.p(a,i):(l=o[e]=s[e](a),l.c()),P(l,1),l.m(t.parentNode,t))},i(a){n||(P(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(t)}}}function ee(r){let e,l;return e=new J({props:{nobranding:!0,$$slots:{default:[x]},$$scope:{ctx:r}}}),{c(){F(e.$$.fragment)},m(t,n){L(e,t,n),l=!0},p(t,[n]){const s={};n&2079&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){l||(P(e.$$.fragment,t),l=!0)},o(t){q(e.$$.fragment,t),l=!1},d(t){N(e,t)}}}function te(r,e,l){let t,{params:n}=e,s="",o="",p=!1,a=!1;async function i(){if(!p){l(2,p=!0);try{await j.Users.confirmPasswordReset(n==null?void 0:n.token,s,o),l(3,a=!0)}catch(k){j.errorResponseHandler(k)}l(2,p=!1)}}const u=()=>window.close();function v(){s=this.value,l(0,s)}function g(){o=this.value,l(1,o)}return r.$$set=k=>{"params"in k&&l(6,n=k.params)},r.$$.update=()=>{r.$$.dirty&64&&l(4,t=M.getJWTPayload(n==null?void 0:n.token).email||"")},[s,o,p,a,t,i,n,u,v,g]}class le extends D{constructor(e){super(),E(this,e,te,ee,G,{params:6})}}export{le as default}; diff --git a/ui/dist/assets/PageUserConfirmVerification.08b3f8a7.js b/ui/dist/assets/PageUserConfirmVerification.6d5d72b2.js similarity index 97% rename from ui/dist/assets/PageUserConfirmVerification.08b3f8a7.js rename to ui/dist/assets/PageUserConfirmVerification.6d5d72b2.js index c6ea4945..07d76d83 100644 --- a/ui/dist/assets/PageUserConfirmVerification.08b3f8a7.js +++ b/ui/dist/assets/PageUserConfirmVerification.6d5d72b2.js @@ -1,3 +1,3 @@ -import{S as k,i as v,s as y,F as w,f as x,m as C,n as g,o as L,q as $,y as H,L as M,h as r,p as a,e as u,d as m,g as f,B as _,u as p}from"./index.66a4e29c.js";function P(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`
+import{S as k,i as v,s as y,F as w,f as x,m as C,n as g,o as L,q as $,y as H,L as M,h as r,p as a,e as u,d as m,g as f,B as _,u as p}from"./index.a4c2f517.js";function P(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`

Invalid or expired verification token.

`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(l,c){r(l,t,c),r(l,s,c),r(l,e,c),n||(i=_(e,"click",o[4]),n=!0)},p,d(l){l&&a(t),l&&a(s),l&&a(e),n=!1,i()}}}function S(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`

Successfully verified email address.

`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(l,c){r(l,t,c),r(l,s,c),r(l,e,c),n||(i=_(e,"click",o[3]),n=!0)},p,d(l){l&&a(t),l&&a(s),l&&a(e),n=!1,i()}}}function T(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function q(o){let t;function s(i,l){return i[1]?T:i[0]?S:P}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(i,l){n.m(i,l),r(i,t,l)},p(i,l){e===(e=s(i))&&n?n.p(i,l):(n.d(1),n=e(i),n&&(n.c(),n.m(t.parentNode,t)))},d(i){n.d(i),i&&a(t)}}}function F(o){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[q]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const i={};n&67&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){s||(g(t.$$.fragment,e),s=!0)},o(e){L(t.$$.fragment,e),s=!1},d(e){$(t,e)}}}function U(o,t,s){let{params:e}=t,n=!1,i=!1;l();async function l(){s(1,i=!0);try{await H.Users.confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch(d){console.warn(d),s(0,n=!1)}s(1,i=!1)}const c=()=>window.close(),b=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,i,e,c,b]}class B extends k{constructor(t){super(),v(this,t,U,F,y,{params:2})}}export{B as default}; diff --git a/ui/dist/assets/index.66a4e29c.js b/ui/dist/assets/index.a4c2f517.js similarity index 97% rename from ui/dist/assets/index.66a4e29c.js rename to ui/dist/assets/index.a4c2f517.js index f87e555b..ae94ffa4 100644 --- a/ui/dist/assets/index.66a4e29c.js +++ b/ui/dist/assets/index.a4c2f517.js @@ -10,7 +10,7 @@ const Nb=function(){const e=document.createElement("link").relList;if(e&&e.suppo opacity: ${a-f*d}`}}function un(n,{delay:e=0,duration:t=400,easing:i=To}={}){const s=getComputedStyle(n),l=+s.opacity,r=parseFloat(s.height),o=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:h=>`overflow: hidden;opacity: ${Math.min(h*20,1)*l};height: ${h*r}px;padding-top: ${h*o}px;padding-bottom: ${h*a}px;margin-top: ${h*u}px;margin-bottom: ${h*f}px;border-top-width: ${h*c}px;border-bottom-width: ${h*d}px;`}}function Un(n,{delay:e=0,duration:t=400,easing:i=To,start:s=0,opacity:l=0}={}){const r=getComputedStyle(n),o=+r.opacity,a=r.transform==="none"?"":r.transform,u=1-s,f=o*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` transform: ${a} scale(${1-u*d}); opacity: ${o-f*d} - `}}function Kk(n){let e,t,i,s;return{c(){e=_("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,r){w(l,e,r),n[13](e),$e(e,n[7]),i||(s=X(e,"input",n[14]),i=!0)},p(l,r){r&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),r&128&&e.value!==l[7]&&$e(e,l[7])},i:re,o:re,d(l){l&&k(e),n[13](null),i=!1,s()}}}function Jk(n){let e,t,i,s;function l(a){n[12](a)}var r=n[4];function o(a){let u={singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return r&&(e=new r(o(n)),he.push(()=>Fe(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=rt()},m(a,u){e&&V(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],Re(()=>t=!1)),r!==(r=a[4])){if(e){Te();const c=e;F(c.$$.fragment,1,0,()=>{z(c,1)}),De()}r?(e=new r(o(a)),he.push(()=>Fe(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),E(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else r&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&F(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function Ac(n){let e,t,i,s,l,r,o=n[7]!==n[0]&&Ec();return{c(){o&&o.c(),e=O(),t=_("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){o&&o.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(r=X(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?o?u&129&&E(o,1):(o=Ec(),o.c(),E(o,1),o.m(e.parentNode,e)):o&&(Te(),F(o,1,1,()=>{o=null}),De())},i(a){s||(E(o),Dt(()=>{i||(i=ft(t,ti,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){F(o),i||(i=ft(t,ti,{duration:150,x:5},!1)),i.run(0),s=!1},d(a){o&&o.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,r()}}}function Ec(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(Dt(()=>{t||(t=ft(e,ti,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=ft(e,ti,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function xk(n){let e,t,i,s,l,r,o,a,u,f,c;const d=[Jk,Kk],h=[];function g(b,v){return b[4]&&!b[5]?0:1}r=g(n),o=h[r]=d[r](n);let y=(n[0].length||n[7].length)&&Ac(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=O(),o.c(),a=O(),y&&y.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(b,v){w(b,e,v),m(e,t),m(t,i),m(i,s),m(t,l),h[r].m(t,null),m(t,a),y&&y.m(t,null),u=!0,f||(c=[X(t,"submit",Jt(n[10])),X(e,"click",Bn(n[11]))],f=!0)},p(b,[v]){let S=r;r=g(b),r===S?h[r].p(b,v):(Te(),F(h[S],1,1,()=>{h[S]=null}),De(),o=h[r],o?o.p(b,v):(o=h[r]=d[r](b),o.c()),E(o,1),o.m(t,a)),b[0].length||b[7].length?y?(y.p(b,v),v&129&&E(y,1)):(y=Ac(b),y.c(),E(y,1),y.m(t,null)):y&&(Te(),F(y,1,1,()=>{y=null}),De())},i(b){u||(E(o),E(y),u=!0)},o(b){F(o),F(y),u=!1},d(b){b&&k(e),h[r].d(),y&&y.d(),f=!1,lt(c)}}}function Gk(n,e,t){const i=vn(),s="search_"+U.randomString(7);let{value:l=""}=e,{placeholder:r='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:o=new Pn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h($=!0){t(7,d=""),$&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function y(){u||f||(t(5,f=!0),t(4,u=(await bi(()=>import("./FilterAutocompleteInput.5c71eaaa.js"),[])).default),t(5,f=!1))}di(()=>{y()});function b($){ut.call(this,n,$)}function v($){d=$,t(7,d),t(0,l)}function S($){he[$?"unshift":"push"](()=>{c=$,t(6,c)})}function C(){d=this.value,t(7,d),t(0,l)}const M=()=>{h(!1),g()};return n.$$set=$=>{"value"in $&&t(0,l=$.value),"placeholder"in $&&t(1,r=$.placeholder),"autocompleteCollection"in $&&t(2,o=$.autocompleteCollection),"extraAutocompleteKeys"in $&&t(3,a=$.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,r,o,a,u,f,c,d,s,h,g,b,v,S,C,M]}class Do extends Ne{constructor(e){super(),Ie(this,e,Gk,xk,Pe,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Zk(n){let e,t,i,s,l;const r=n[6].default,o=On(r,n,n[5],null);return{c(){e=_("th"),o&&o.c(),p(e,"tabindex","0"),p(e,"class",t="col-sort "+n[1]),ne(e,"col-sort-disabled",n[3]),ne(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),ne(e,"sort-desc",n[0]==="-"+n[2]),ne(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){w(a,e,u),o&&o.m(e,null),i=!0,s||(l=[X(e,"click",n[7]),X(e,"keydown",n[8])],s=!0)},p(a,[u]){o&&o.p&&(!i||u&32)&&Dn(o,r,a,a[5],i?Tn(r,a[5],u,null):An(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),u&10&&ne(e,"col-sort-disabled",a[3]),u&7&&ne(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),u&7&&ne(e,"sort-desc",a[0]==="-"+a[2]),u&7&&ne(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(E(o,a),i=!0)},o(a){F(o,a),i=!1},d(a){a&&k(e),o&&o.d(a),s=!1,lt(l)}}}function Xk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:r}=e,{sort:o=""}=e,{disable:a=!1}=e;function u(){a||("-"+r===o?t(0,o="+"+r):t(0,o="-"+r))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,r=d.name),"sort"in d&&t(0,o=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[o,l,r,a,u,s,i,f,c]}class en extends Ne{constructor(e){super(),Ie(this,e,Xk,Zk,Pe,{class:1,name:2,sort:0,disable:3})}}function Qk(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function e2(n){let e,t=U.formatToUTCDate(n[0])+"",i,s,l,r,o;return{c(){e=_("span"),i=H(t),s=H(" UTC"),p(e,"class","txt")},m(a,u){w(a,e,u),m(e,i),m(e,s),r||(o=Xe(l=St.call(null,e,U.formatToLocalDate(n[0])+" Local")),r=!0)},p(a,u){u&1&&t!==(t=U.formatToUTCDate(a[0])+"")&&_e(i,t),l&&Kn(l.update)&&u&1&&l.update.call(null,U.formatToLocalDate(a[0])+" Local")},d(a){a&&k(e),r=!1,o()}}}function t2(n){let e;function t(l,r){return l[0]?e2:Qk}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function n2(n,e,t){let{date:i=""}=e;return n.$$set=s=>{"date"in s&&t(0,i=s.date)},[i]}class Ci extends Ne{constructor(e){super(),Ie(this,e,n2,t2,Pe,{date:0})}}function Pc(n,e,t){const i=n.slice();return i[21]=e[t],i}function i2(n){let e;return{c(){e=_("div"),e.innerHTML=` + `}}function Kk(n){let e,t,i,s;return{c(){e=_("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,r){w(l,e,r),n[13](e),$e(e,n[7]),i||(s=X(e,"input",n[14]),i=!0)},p(l,r){r&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),r&128&&e.value!==l[7]&&$e(e,l[7])},i:re,o:re,d(l){l&&k(e),n[13](null),i=!1,s()}}}function Jk(n){let e,t,i,s;function l(a){n[12](a)}var r=n[4];function o(a){let u={singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return r&&(e=new r(o(n)),he.push(()=>Fe(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=rt()},m(a,u){e&&V(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],Re(()=>t=!1)),r!==(r=a[4])){if(e){Te();const c=e;F(c.$$.fragment,1,0,()=>{z(c,1)}),De()}r?(e=new r(o(a)),he.push(()=>Fe(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),E(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else r&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&F(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function Ac(n){let e,t,i,s,l,r,o=n[7]!==n[0]&&Ec();return{c(){o&&o.c(),e=O(),t=_("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){o&&o.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(r=X(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?o?u&129&&E(o,1):(o=Ec(),o.c(),E(o,1),o.m(e.parentNode,e)):o&&(Te(),F(o,1,1,()=>{o=null}),De())},i(a){s||(E(o),Dt(()=>{i||(i=ft(t,ti,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){F(o),i||(i=ft(t,ti,{duration:150,x:5},!1)),i.run(0),s=!1},d(a){o&&o.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,r()}}}function Ec(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(Dt(()=>{t||(t=ft(e,ti,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=ft(e,ti,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function xk(n){let e,t,i,s,l,r,o,a,u,f,c;const d=[Jk,Kk],h=[];function g(b,v){return b[4]&&!b[5]?0:1}r=g(n),o=h[r]=d[r](n);let y=(n[0].length||n[7].length)&&Ac(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=O(),o.c(),a=O(),y&&y.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(b,v){w(b,e,v),m(e,t),m(t,i),m(i,s),m(t,l),h[r].m(t,null),m(t,a),y&&y.m(t,null),u=!0,f||(c=[X(t,"submit",Jt(n[10])),X(e,"click",Bn(n[11]))],f=!0)},p(b,[v]){let S=r;r=g(b),r===S?h[r].p(b,v):(Te(),F(h[S],1,1,()=>{h[S]=null}),De(),o=h[r],o?o.p(b,v):(o=h[r]=d[r](b),o.c()),E(o,1),o.m(t,a)),b[0].length||b[7].length?y?(y.p(b,v),v&129&&E(y,1)):(y=Ac(b),y.c(),E(y,1),y.m(t,null)):y&&(Te(),F(y,1,1,()=>{y=null}),De())},i(b){u||(E(o),E(y),u=!0)},o(b){F(o),F(y),u=!1},d(b){b&&k(e),h[r].d(),y&&y.d(),f=!1,lt(c)}}}function Gk(n,e,t){const i=vn(),s="search_"+U.randomString(7);let{value:l=""}=e,{placeholder:r='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:o=new Pn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h($=!0){t(7,d=""),$&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function y(){u||f||(t(5,f=!0),t(4,u=(await bi(()=>import("./FilterAutocompleteInput.43fff355.js"),[])).default),t(5,f=!1))}di(()=>{y()});function b($){ut.call(this,n,$)}function v($){d=$,t(7,d),t(0,l)}function S($){he[$?"unshift":"push"](()=>{c=$,t(6,c)})}function C(){d=this.value,t(7,d),t(0,l)}const M=()=>{h(!1),g()};return n.$$set=$=>{"value"in $&&t(0,l=$.value),"placeholder"in $&&t(1,r=$.placeholder),"autocompleteCollection"in $&&t(2,o=$.autocompleteCollection),"extraAutocompleteKeys"in $&&t(3,a=$.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,r,o,a,u,f,c,d,s,h,g,b,v,S,C,M]}class Do extends Ne{constructor(e){super(),Ie(this,e,Gk,xk,Pe,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Zk(n){let e,t,i,s,l;const r=n[6].default,o=On(r,n,n[5],null);return{c(){e=_("th"),o&&o.c(),p(e,"tabindex","0"),p(e,"class",t="col-sort "+n[1]),ne(e,"col-sort-disabled",n[3]),ne(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),ne(e,"sort-desc",n[0]==="-"+n[2]),ne(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){w(a,e,u),o&&o.m(e,null),i=!0,s||(l=[X(e,"click",n[7]),X(e,"keydown",n[8])],s=!0)},p(a,[u]){o&&o.p&&(!i||u&32)&&Dn(o,r,a,a[5],i?Tn(r,a[5],u,null):An(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),u&10&&ne(e,"col-sort-disabled",a[3]),u&7&&ne(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),u&7&&ne(e,"sort-desc",a[0]==="-"+a[2]),u&7&&ne(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(E(o,a),i=!0)},o(a){F(o,a),i=!1},d(a){a&&k(e),o&&o.d(a),s=!1,lt(l)}}}function Xk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:r}=e,{sort:o=""}=e,{disable:a=!1}=e;function u(){a||("-"+r===o?t(0,o="+"+r):t(0,o="-"+r))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,r=d.name),"sort"in d&&t(0,o=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[o,l,r,a,u,s,i,f,c]}class en extends Ne{constructor(e){super(),Ie(this,e,Xk,Zk,Pe,{class:1,name:2,sort:0,disable:3})}}function Qk(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function e2(n){let e,t=U.formatToUTCDate(n[0])+"",i,s,l,r,o;return{c(){e=_("span"),i=H(t),s=H(" UTC"),p(e,"class","txt")},m(a,u){w(a,e,u),m(e,i),m(e,s),r||(o=Xe(l=St.call(null,e,U.formatToLocalDate(n[0])+" Local")),r=!0)},p(a,u){u&1&&t!==(t=U.formatToUTCDate(a[0])+"")&&_e(i,t),l&&Kn(l.update)&&u&1&&l.update.call(null,U.formatToLocalDate(a[0])+" Local")},d(a){a&&k(e),r=!1,o()}}}function t2(n){let e;function t(l,r){return l[0]?e2:Qk}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function n2(n,e,t){let{date:i=""}=e;return n.$$set=s=>{"date"in s&&t(0,i=s.date)},[i]}class Ci extends Ne{constructor(e){super(),Ie(this,e,n2,t2,Pe,{date:0})}}function Pc(n,e,t){const i=n.slice();return i[21]=e[t],i}function i2(n){let e;return{c(){e=_("div"),e.innerHTML=` method`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function s2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="url",p(t,"class",U.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function l2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="referer",p(t,"class",U.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function r2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="status",p(t,"class",U.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function o2(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function Lc(n){let e;function t(l,r){return l[6]?u2:a2}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function a2(n){var o;let e,t,i,s,l,r=((o=n[0])==null?void 0:o.length)&&Fc(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No logs found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?r?r.p(a,u):(r=Fc(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function u2(n){let e;return{c(){e=_("tr"),e.innerHTML=` `},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function Fc(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[18]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function Ic(n){let e;return{c(){e=_("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Nc(n,e){var se,G,Oe;let t,i,s,l=((se=e[21].method)==null?void 0:se.toUpperCase())+"",r,o,a,u,f,c=e[21].url+"",d,h,g,y,b,v,S=(e[21].referer||"N/A")+"",C,M,$,T,A,D=e[21].status+"",P,L,N,R,J,W,q,x,K,Y,te=(((G=e[21].meta)==null?void 0:G.errorMessage)||((Oe=e[21].meta)==null?void 0:Oe.errorData))&&Ic();R=new Ci({props:{date:e[21].created}});function fe(){return e[16](e[21])}function ye(...ee){return e[17](e[21],...ee)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("span"),r=H(l),a=O(),u=_("td"),f=_("span"),d=H(c),g=O(),te&&te.c(),y=O(),b=_("td"),v=_("span"),C=H(S),$=O(),T=_("td"),A=_("span"),P=H(D),L=O(),N=_("td"),B(R.$$.fragment),J=O(),W=_("td"),W.innerHTML='',q=O(),p(s,"class",o="label txt-uppercase "+e[9][e[21].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[21].url),p(u,"class","col-type-text col-field-url"),p(v,"class","txt txt-ellipsis"),p(v,"title",M=e[21].referer),ne(v,"txt-hint",!e[21].referer),p(b,"class","col-type-text col-field-referer"),p(A,"class","label"),ne(A,"label-danger",e[21].status>=400),p(T,"class","col-type-number col-field-status"),p(N,"class","col-type-date col-field-created"),p(W,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ee,be){w(ee,t,be),m(t,i),m(i,s),m(s,r),m(t,a),m(t,u),m(u,f),m(f,d),m(u,g),te&&te.m(u,null),m(t,y),m(t,b),m(b,v),m(v,C),m(t,$),m(t,T),m(T,A),m(A,P),m(t,L),m(t,N),V(R,N,null),m(t,J),m(t,W),m(t,q),x=!0,K||(Y=[X(t,"click",fe),X(t,"keydown",ye)],K=!0)},p(ee,be){var ie,ve,je;e=ee,(!x||be&8)&&l!==(l=((ie=e[21].method)==null?void 0:ie.toUpperCase())+"")&&_e(r,l),(!x||be&8&&o!==(o="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&p(s,"class",o),(!x||be&8)&&c!==(c=e[21].url+"")&&_e(d,c),(!x||be&8&&h!==(h=e[21].url))&&p(f,"title",h),((ve=e[21].meta)==null?void 0:ve.errorMessage)||((je=e[21].meta)==null?void 0:je.errorData)?te||(te=Ic(),te.c(),te.m(u,null)):te&&(te.d(1),te=null),(!x||be&8)&&S!==(S=(e[21].referer||"N/A")+"")&&_e(C,S),(!x||be&8&&M!==(M=e[21].referer))&&p(v,"title",M),be&8&&ne(v,"txt-hint",!e[21].referer),(!x||be&8)&&D!==(D=e[21].status+"")&&_e(P,D),be&8&&ne(A,"label-danger",e[21].status>=400);const ue={};be&8&&(ue.date=e[21].created),R.$set(ue)},i(ee){x||(E(R.$$.fragment,ee),x=!0)},o(ee){F(R.$$.fragment,ee),x=!1},d(ee){ee&&k(t),te&&te.d(),z(R),K=!1,lt(Y)}}}function Rc(n){let e,t,i=n[3].length+"",s,l,r;return{c(){e=_("small"),t=H("Showing "),s=H(i),l=H(" of "),r=H(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a&8&&i!==(i=o[3].length+"")&&_e(s,i),a&16&&_e(r,o[4])},d(o){o&&k(e)}}}function jc(n){let e,t,i,s,l=n[4]-n[3].length+"",r,o,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=H("Load more ("),r=H(l),o=H(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ne(t,"btn-loading",n[6]),ne(t,"btn-disabled",n[6]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=X(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&_e(r,l),c&64&&ne(t,"btn-loading",f[6]),c&64&&ne(t,"btn-disabled",f[6])},d(f){f&&k(e),a=!1,u()}}}function f2(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,C,M,$,T,A=[],D=new Map,P,L,N,R;function J(ie){n[11](ie)}let W={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[i2]},$$scope:{ctx:n}};n[1]!==void 0&&(W.sort=n[1]),l=new en({props:W}),he.push(()=>Fe(l,"sort",J));function q(ie){n[12](ie)}let x={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[s2]},$$scope:{ctx:n}};n[1]!==void 0&&(x.sort=n[1]),a=new en({props:x}),he.push(()=>Fe(a,"sort",q));function K(ie){n[13](ie)}let Y={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[l2]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),c=new en({props:Y}),he.push(()=>Fe(c,"sort",K));function te(ie){n[14](ie)}let fe={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[r2]},$$scope:{ctx:n}};n[1]!==void 0&&(fe.sort=n[1]),g=new en({props:fe}),he.push(()=>Fe(g,"sort",te));function ye(ie){n[15](ie)}let se={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[o2]},$$scope:{ctx:n}};n[1]!==void 0&&(se.sort=n[1]),v=new en({props:se}),he.push(()=>Fe(v,"sort",ye));let G=n[3];const Oe=ie=>ie[21].id;for(let ie=0;ier=!1)),l.$set(je);const Le={};ve&16777216&&(Le.$$scope={dirty:ve,ctx:ie}),!u&&ve&2&&(u=!0,Le.sort=ie[1],Re(()=>u=!1)),a.$set(Le);const qe={};ve&16777216&&(qe.$$scope={dirty:ve,ctx:ie}),!d&&ve&2&&(d=!0,qe.sort=ie[1],Re(()=>d=!1)),c.$set(qe);const oe={};ve&16777216&&(oe.$$scope={dirty:ve,ctx:ie}),!y&&ve&2&&(y=!0,oe.sort=ie[1],Re(()=>y=!1)),g.$set(oe);const le={};ve&16777216&&(le.$$scope={dirty:ve,ctx:ie}),!S&&ve&2&&(S=!0,le.sort=ie[1],Re(()=>S=!1)),v.$set(le),ve&841&&(G=ie[3],Te(),A=ot(A,ve,Oe,1,ie,G,D,T,Lt,Nc,null,Pc),De(),!G.length&&ee?ee.p(ie,ve):G.length?ee&&(ee.d(1),ee=null):(ee=Lc(ie),ee.c(),ee.m(T,null))),ve&64&&ne(t,"table-loading",ie[6]),ie[3].length?be?be.p(ie,ve):(be=Rc(ie),be.c(),be.m(L.parentNode,L)):be&&(be.d(1),be=null),ie[3].length&&ie[7]?ue?ue.p(ie,ve):(ue=jc(ie),ue.c(),ue.m(N.parentNode,N)):ue&&(ue.d(1),ue=null)},i(ie){if(!R){E(l.$$.fragment,ie),E(a.$$.fragment,ie),E(c.$$.fragment,ie),E(g.$$.fragment,ie),E(v.$$.fragment,ie);for(let ve=0;ve{D<=1&&g(),t(6,d=!1),t(3,u=u.concat(P.items)),t(5,f=P.page),t(4,c=P.totalItems),s("load",u)}).catch(P=>{P!==null&&(t(6,d=!1),console.warn(P),g(),Se.errorResponseHandler(P,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,c=0)}function y(D){a=D,t(1,a)}function b(D){a=D,t(1,a)}function v(D){a=D,t(1,a)}function S(D){a=D,t(1,a)}function C(D){a=D,t(1,a)}const M=D=>s("select",D),$=(D,P)=>{P.code==="Enter"&&(P.preventDefault(),s("select",D))},T=()=>t(0,r=""),A=()=>h(f+1);return n.$$set=D=>{"filter"in D&&t(0,r=D.filter),"presets"in D&&t(10,o=D.presets),"sort"in D&&t(1,a=D.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a!="undefined"||typeof r!="undefined"||typeof o!="undefined")&&(g(),h(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[r,a,h,u,c,f,d,i,s,l,o,y,b,v,S,C,M,$,T,A]}class d2 extends Ne{constructor(e){super(),Ie(this,e,c2,f2,Pe,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! * Chart.js v3.8.0 @@ -60,7 +60,7 @@ const Nb=function(){const e=document.createElement("link").relList;if(e&&e.suppo
@request.user.id!=null && created>"2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(r,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(S,"class","inline-flex flex-gap-5"),p(M,"class","m-t-10 m-b-5"),p(T,"class","m-b-0"),p(D,"class","inline-flex flex-gap-5"),p(L,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(K,Y){w(K,e,Y),m(e,t),m(t,i),m(i,s),m(i,l),m(i,r),m(r,o),m(r,a),m(r,u),m(r,f),m(r,c),m(r,d);for(let te=0;te{J||(J=ft(e,un,{duration:150},!0)),J.run(1)}),W=!0)},o(K){K&&(J||(J=ft(e,un,{duration:150},!1)),J.run(0)),W=!1},d(K){K&&k(e),zn(x,K),K&&J&&J.end()}}}function k$(n){let e,t=n[19].name+"",i;return{c(){e=_("code"),i=H(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&1&&t!==(t=s[19].name+"")&&_e(i,t)},d(s){s&&k(e)}}}function w$(n){let e,t=n[19].name+"",i,s;return{c(){e=_("code"),i=H(t),s=H(".*")},m(l,r){w(l,e,r),m(e,i),m(e,s)},p(l,r){r&1&&t!==(t=l[19].name+"")&&_e(i,t)},d(l){l&&k(e)}}}function Yp(n){let e;function t(l,r){return l[19].type==="relation"||l[19].type==="user"?w$:k$}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function S$(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const r=o=>o[14];for(let o=0;o',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function M$(n){let e,t,i;function s(){return n[9](n[14])}return{c(){e=_("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Lock and set to Admins only")),X(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function $$(n){let e,t,i;function s(){return n[8](n[14])}return{c(){e=_("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Unlock and set custom rule")),X(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function O$(n){let e;return{c(){e=H("Leave empty to grant everyone access")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function T$(n){let e;return{c(){e=H("Only admins will be able to access (unlock to change)")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function D$(n){let e,t=n[15]+"",i,s,l=Ni(n[0][n[14]])?"Admins only":"Custom rule",r,o,a,u,f=n[14],c,d,h,g,y,b,v;function S(){return n[10](n[14])}const C=()=>n[11](u,f),M=()=>n[11](null,f);function $(N){n[12](N,n[14])}var T=n[4];function A(N){let R={baseCollection:N[0],disabled:Ni(N[0][N[14]])};return N[0][N[14]]!==void 0&&(R.value=N[0][N[14]]),{props:R}}T&&(u=new T(A(n)),C(),he.push(()=>Fe(u,"value",$)));function D(N,R){return R&1&&(g=null),g==null&&(g=!!Ni(N[0][N[14]])),g?T$:O$}let P=D(n,-1),L=P(n);return{c(){e=_("label"),i=H(t),s=H(" - "),r=H(l),a=O(),u&&B(u.$$.fragment),d=O(),h=_("div"),L.c(),p(e,"for",o=n[18]),p(h,"class","help-block")},m(N,R){w(N,e,R),m(e,i),m(e,s),m(e,r),w(N,a,R),u&&V(u,N,R),w(N,d,R),w(N,h,R),L.m(h,null),y=!0,b||(v=X(e,"click",S),b=!0)},p(N,R){n=N,(!y||R&1)&&l!==(l=Ni(n[0][n[14]])?"Admins only":"Custom rule")&&_e(r,l),(!y||R&262144&&o!==(o=n[18]))&&p(e,"for",o),f!==n[14]&&(M(),f=n[14],C());const J={};if(R&1&&(J.baseCollection=n[0]),R&1&&(J.disabled=Ni(n[0][n[14]])),!c&&R&65&&(c=!0,J.value=n[0][n[14]],Re(()=>c=!1)),T!==(T=n[4])){if(u){Te();const W=u;F(W.$$.fragment,1,0,()=>{z(W,1)}),De()}T?(u=new T(A(n)),C(),he.push(()=>Fe(u,"value",$)),B(u.$$.fragment),E(u.$$.fragment,1),V(u,d.parentNode,d)):u=null}else T&&u.$set(J);P!==(P=D(n,R))&&(L.d(1),L=P(n),L&&(L.c(),L.m(h,null)))},i(N){y||(u&&E(u.$$.fragment,N),y=!0)},o(N){u&&F(u.$$.fragment,N),y=!1},d(N){N&&k(e),N&&k(a),M(),u&&z(u,N),N&&k(d),N&&k(h),L.d(),b=!1,v()}}}function Kp(n,e){let t,i,s,l,r,o,a,u;function f(h,g){return g&1&&(l=null),l==null&&(l=!!Ni(h[0][h[14]])),l?$$:M$}let c=f(e,-1),d=c(e);return o=new He({props:{class:"form-field rule-field m-0 "+(Ni(e[0][e[14]])?"disabled":""),name:e[14],$$slots:{default:[D$,({uniqueId:h})=>({18:h}),({uniqueId:h})=>h?262144:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=_("hr"),i=O(),s=_("div"),d.c(),r=O(),B(o.$$.fragment),a=O(),p(t,"class","m-t-sm m-b-sm"),p(s,"class","rule-block svelte-fjxz7k"),this.first=t},m(h,g){w(h,t,g),w(h,i,g),w(h,s,g),d.m(s,null),m(s,r),V(o,s,null),m(s,a),u=!0},p(h,g){e=h,c===(c=f(e,g))&&d?d.p(e,g):(d.d(1),d=c(e),d&&(d.c(),d.m(s,r)));const y={};g&1&&(y.class="form-field rule-field m-0 "+(Ni(e[0][e[14]])?"disabled":"")),g&4456473&&(y.$$scope={dirty:g,ctx:e}),o.$set(y)},i(h){u||(E(o.$$.fragment,h),u=!0)},o(h){F(o.$$.fragment,h),u=!1},d(h){h&&k(t),h&&k(i),h&&k(s),d.d(),z(o)}}}function A$(n){let e,t,i,s,l,r=n[2]?"Hide available fields":"Show available fields",o,a,u,f,c,d,h,g,y,b=n[2]&&Wp(n);const v=[C$,S$],S=[];function C(M,$){return M[5]?0:1}return f=C(n),c=S[f]=v[f](n),{c(){e=_("div"),t=_("div"),i=_("p"),i.innerHTML=`All rules follow the
PocketBase filter syntax and operators - .`,s=O(),l=_("span"),o=H(r),a=O(),b&&b.c(),u=O(),c.c(),d=rt(),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex"),p(e,"class","block m-b-base")},m(M,$){w(M,e,$),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(e,a),b&&b.m(e,null),w(M,u,$),S[f].m(M,$),w(M,d,$),h=!0,g||(y=X(l,"click",n[7]),g=!0)},p(M,[$]){(!h||$&4)&&r!==(r=M[2]?"Hide available fields":"Show available fields")&&_e(o,r),M[2]?b?(b.p(M,$),$&4&&E(b,1)):(b=Wp(M),b.c(),E(b,1),b.m(e,null)):b&&(Te(),F(b,1,1,()=>{b=null}),De());let T=f;f=C(M),f===T?S[f].p(M,$):(Te(),F(S[T],1,1,()=>{S[T]=null}),De(),c=S[f],c?c.p(M,$):(c=S[f]=v[f](M),c.c()),E(c,1),c.m(d.parentNode,d))},i(M){h||(E(b),E(c),h=!0)},o(M){F(b),F(c),h=!1},d(M){M&&k(e),b&&b.d(),M&&k(u),S[f].d(M),M&&k(d),g=!1,y()}}}function Ni(n){return n===null}function E$(n,e,t){let{collection:i=new Pn}=e,s={},l=!1,r={},o,a=!1;const u={listRule:"List Action",viewRule:"View Action",createRule:"Create Action",updateRule:"Update Action",deleteRule:"Delete Action"};async function f(){t(5,a=!0);try{t(4,o=(await bi(()=>import("./FilterAutocompleteInput.5c71eaaa.js"),[])).default)}catch(v){console.warn(v),t(4,o=null)}t(5,a=!1)}di(()=>{f()});const c=()=>t(2,l=!l),d=async v=>{var S;t(0,i[v]=s[v]||"",i),await Ui(),(S=r[v])==null||S.focus()},h=v=>{t(1,s[v]=i[v],s),t(0,i[v]=null,i)},g=v=>{var S;return(S=r[v])==null?void 0:S.focus()};function y(v,S){he[v?"unshift":"push"](()=>{r[S]=v,t(3,r)})}function b(v,S){n.$$.not_equal(i[S],v)&&(i[S]=v,t(0,i))}return n.$$set=v=>{"collection"in v&&t(0,i=v.collection)},[i,s,l,r,o,a,u,c,d,h,g,y,b]}class P$ extends Ne{constructor(e){super(),Ie(this,e,E$,A$,Pe,{collection:0})}}function Jp(n,e,t){const i=n.slice();return i[14]=e[t],i}function xp(n,e,t){const i=n.slice();return i[14]=e[t],i}function Gp(n){let e;return{c(){e=_("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Zp(n){let e,t,i,s,l=n[1].originalName+"",r,o,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=H(`Renamed collection + .`,s=O(),l=_("span"),o=H(r),a=O(),b&&b.c(),u=O(),c.c(),d=rt(),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex"),p(e,"class","block m-b-base")},m(M,$){w(M,e,$),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(e,a),b&&b.m(e,null),w(M,u,$),S[f].m(M,$),w(M,d,$),h=!0,g||(y=X(l,"click",n[7]),g=!0)},p(M,[$]){(!h||$&4)&&r!==(r=M[2]?"Hide available fields":"Show available fields")&&_e(o,r),M[2]?b?(b.p(M,$),$&4&&E(b,1)):(b=Wp(M),b.c(),E(b,1),b.m(e,null)):b&&(Te(),F(b,1,1,()=>{b=null}),De());let T=f;f=C(M),f===T?S[f].p(M,$):(Te(),F(S[T],1,1,()=>{S[T]=null}),De(),c=S[f],c?c.p(M,$):(c=S[f]=v[f](M),c.c()),E(c,1),c.m(d.parentNode,d))},i(M){h||(E(b),E(c),h=!0)},o(M){F(b),F(c),h=!1},d(M){M&&k(e),b&&b.d(),M&&k(u),S[f].d(M),M&&k(d),g=!1,y()}}}function Ni(n){return n===null}function E$(n,e,t){let{collection:i=new Pn}=e,s={},l=!1,r={},o,a=!1;const u={listRule:"List Action",viewRule:"View Action",createRule:"Create Action",updateRule:"Update Action",deleteRule:"Delete Action"};async function f(){t(5,a=!0);try{t(4,o=(await bi(()=>import("./FilterAutocompleteInput.43fff355.js"),[])).default)}catch(v){console.warn(v),t(4,o=null)}t(5,a=!1)}di(()=>{f()});const c=()=>t(2,l=!l),d=async v=>{var S;t(0,i[v]=s[v]||"",i),await Ui(),(S=r[v])==null||S.focus()},h=v=>{t(1,s[v]=i[v],s),t(0,i[v]=null,i)},g=v=>{var S;return(S=r[v])==null?void 0:S.focus()};function y(v,S){he[v?"unshift":"push"](()=>{r[S]=v,t(3,r)})}function b(v,S){n.$$.not_equal(i[S],v)&&(i[S]=v,t(0,i))}return n.$$set=v=>{"collection"in v&&t(0,i=v.collection)},[i,s,l,r,o,a,u,c,d,h,g,y,b]}class P$ extends Ne{constructor(e){super(),Ie(this,e,E$,A$,Pe,{collection:0})}}function Jp(n,e,t){const i=n.slice();return i[14]=e[t],i}function xp(n,e,t){const i=n.slice();return i[14]=e[t],i}function Gp(n){let e;return{c(){e=_("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Zp(n){let e,t,i,s,l=n[1].originalName+"",r,o,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=H(`Renamed collection `),s=_("strong"),r=H(l),o=O(),a=_("i"),u=O(),f=_("strong"),d=H(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,r),m(t,o),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&2&&l!==(l=h[1].originalName+"")&&_e(r,l),g&2&&c!==(c=h[1].name+"")&&_e(d,c)},d(h){h&&k(e)}}}function Xp(n){let e,t,i,s,l=n[14].originalName+"",r,o,a,u,f,c=n[14].name+"",d;return{c(){e=_("li"),t=_("div"),i=H(`Renamed field `),s=_("strong"),r=H(l),o=O(),a=_("i"),u=O(),f=_("strong"),d=H(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,r),m(t,o),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&16&&l!==(l=h[14].originalName+"")&&_e(r,l),g&16&&c!==(c=h[14].name+"")&&_e(d,c)},d(h){h&&k(e)}}}function Qp(n){let e,t,i,s=n[14].name+"",l,r;return{c(){e=_("li"),t=H("Removed field "),i=_("span"),l=H(s),r=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(o,a){w(o,e,a),m(e,t),m(e,i),m(i,l),m(e,r)},p(o,a){a&8&&s!==(s=o[14].name+"")&&_e(l,s)},d(o){o&&k(e)}}}function L$(n){let e,t,i,s,l,r,o,a,u,f,c,d,h=n[3].length&&Gp(),g=n[5]&&Zp(n),y=n[4],b=[];for(let C=0;C',i=O(),s=_("div"),l=_("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to update it manually!`,r=O(),h&&h.c(),o=O(),a=_("h6"),a.textContent="Changes:",u=O(),f=_("ul"),g&&g.c(),c=O();for(let C=0;CCancel',t=O(),i=_("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),e.focus(),s||(l=[X(e,"click",n[8]),X(i,"click",n[9])],s=!0)},p:re,d(r){r&&k(e),r&&k(t),r&&k(i),s=!1,lt(l)}}}function N$(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[I$],header:[F$],default:[L$]},$$scope:{ctx:n}};return e=new Ti({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&524346&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[10](null),z(e,s)}}}function R$(n,e,t){let i,s,l;const r=vn();let o,a;async function u(v){t(1,a=v),await Ui(),!i&&!s.length&&!l.length?c():o==null||o.show()}function f(){o==null||o.hide()}function c(){f(),r("confirm")}const d=()=>f(),h=()=>c();function g(v){he[v?"unshift":"push"](()=>{o=v,t(2,o)})}function y(v){ut.call(this,n,v)}function b(v){ut.call(this,n,v)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(v=>v.id&&!v.toDelete&&v.originalName!=v.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(v=>v.id&&v.toDelete))||[])},[f,a,o,l,s,i,c,u,d,h,g,y,b]}class j$ extends Ne{constructor(e){super(),Ie(this,e,R$,N$,Pe,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function eh(n){let e,t,i,s;function l(o){n[26](o)}let r={};return n[2]!==void 0&&(r.collection=n[2]),t=new P$({props:r}),he.push(()=>Fe(t,"collection",l)),{c(){e=_("div"),B(t.$$.fragment),p(e,"class","tab-item active")},m(o,a){w(o,e,a),V(t,e,null),s=!0},p(o,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=o[2],Re(()=>i=!1)),t.$set(u)},i(o){s||(E(t.$$.fragment,o),s=!0)},o(o){F(t.$$.fragment,o),s=!1},d(o){o&&k(e),z(t)}}}function H$(n){let e,t,i,s,l,r;function o(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new v$({props:a}),he.push(()=>Fe(i,"collection",o));let u=n[9]===Vl&&eh(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),l=O(),u&&u.c(),p(t,"class","tab-item"),ne(t,"active",n[9]===ps),p(e,"class","tabs-content svelte-b10vi")},m(f,c){w(f,e,c),m(e,t),V(i,t,null),m(e,l),u&&u.m(e,null),r=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],Re(()=>s=!1)),i.$set(d),c[0]&512&&ne(t,"active",f[9]===ps),f[9]===Vl?u?(u.p(f,c),c[0]&512&&E(u,1)):(u=eh(f),u.c(),E(u,1),u.m(e,null)):u&&(Te(),F(u,1,1,()=>{u=null}),De())},i(f){r||(E(i.$$.fragment,f),E(u),r=!0)},o(f){F(i.$$.fragment,f),F(u),r=!1},d(f){f&&k(e),z(i),u&&u.d()}}}function th(n){let e,t,i,s,l,r,o;return r=new bs({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[q$]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=O(),i=_("button"),s=_("i"),l=O(),B(r.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),m(i,s),m(i,l),V(r,i,null),o=!0},p(a,u){const f={};u[1]&256&&(f.$$scope={dirty:u,ctx:a}),r.$set(f)},i(a){o||(E(r.$$.fragment,a),o=!0)},o(a){F(r.$$.fragment,a),o=!1},d(a){a&&k(e),a&&k(t),a&&k(i),z(r)}}}function q$(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=` @@ -315,7 +315,7 @@ const Nb=function(){const e=document.createElement("link").relList;if(e&&e.suppo client.Realtime.unsubscribe() // remove all subscriptions client.Realtime.unsubscribe("${i==null?void 0:i.name}") // remove the collection subscription client.Realtime.unsubscribe("${i==null?void 0:i.name}/RECORD_ID") // remove the record subscription - `}])},[i,s,l,r]}class NO extends Ne{constructor(e){super(),Ie(this,e,IO,FO,Pe,{collection:0})}}function am(n,e,t){const i=n.slice();return i[14]=e[t],i}function um(n,e,t){const i=n.slice();return i[14]=e[t],i}function fm(n){let e,t,i,s;var l=n[14].component;function r(o){return{props:{collection:o[3]}}}return l&&(t=new l(r(n))),{c(){e=_("div"),t&&B(t.$$.fragment),i=O(),p(e,"class","tab-item active")},m(o,a){w(o,e,a),t&&V(t,e,null),m(e,i),s=!0},p(o,a){const u={};if(a&8&&(u.collection=o[3]),l!==(l=o[14].component)){if(t){Te();const f=t;F(f.$$.fragment,1,0,()=>{z(f,1)}),De()}l?(t=new l(r(o)),B(t.$$.fragment),E(t.$$.fragment,1),V(t,e,i)):t=null}else l&&t.$set(u)},i(o){s||(t&&E(t.$$.fragment,o),s=!0)},o(o){t&&F(t.$$.fragment,o),s=!1},d(o){o&&k(e),t&&z(t)}}}function cm(n,e){let t,i,s,l=e[4]===e[14].id&&fm(e);return{key:n,first:null,c(){t=rt(),l&&l.c(),i=rt(),this.first=t},m(r,o){w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){e=r,e[4]===e[14].id?l?(l.p(e,o),o&16&&E(l,1)):(l=fm(e),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(Te(),F(l,1,1,()=>{l=null}),De())},i(r){s||(E(l),s=!0)},o(r){F(l),s=!1},d(r){r&&k(t),l&&l.d(r),r&&k(i)}}}function RO(n){let e,t=[],i=new Map,s,l=n[5];const r=o=>o[14].id;for(let o=0;od[14].id;for(let d=0;dClose',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[8]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function qO(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[HO],header:[jO],default:[RO]},$$scope:{ctx:n}};return e=new Ti({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&524312&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[11](null),z(e,s)}}}function VO(n,e,t){const i=[{id:"list",label:"List",component:tO},{id:"view",label:"View",component:sO},{id:"create",label:"Create",component:_O},{id:"update",label:"Update",component:AO},{id:"delete",label:"Delete",component:LO},{id:"realtime",label:"Realtime",component:NO}];let s,l=new Pn,r=i[0].id;function o(v){return t(3,l=v),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(v){t(4,r=v)}function f(v,S){(v.code==="Enter"||v.code==="Space")&&(v.preventDefault(),u(S))}const c=()=>a(),d=v=>u(v.id),h=(v,S)=>f(S,v.id);function g(v){he[v?"unshift":"push"](()=>{s=v,t(2,s)})}function y(v){ut.call(this,n,v)}function b(v){ut.call(this,n,v)}return[a,u,s,l,r,i,f,o,c,d,h,g,y,b]}class zO extends Ne{constructor(e){super(),Ie(this,e,VO,qO,Pe,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function BO(n){let e,t,i,s=[n[3]],l={};for(let r=0;r{o&&(t(1,o.style.height="",o),t(1,o.style.height=Math.min(o.scrollHeight+2,r)+"px",o))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)){h.preventDefault();const g=o.closest("form");g!=null&&g.requestSubmit&&g.requestSubmit()}}function c(h){he[h?"unshift":"push"](()=>{o=h,t(1,o)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=ct(ct({},e),ci(h)),t(3,s=Yt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,r=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&3&&o&&typeof l!==void 0&&u()},[l,o,f,s,r,c,d]}class WO extends Ne{constructor(e){super(),Ie(this,e,UO,BO,Pe,{value:0,maxHeight:4})}}function YO(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d;function h(y){n[2](y)}let g={id:n[3],required:n[1].required};return n[0]!==void 0&&(g.value=n[0]),f=new WO({props:g}),he.push(()=>Fe(f,"value",h)),{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),V(f,y,b),d=!0},p(y,b){(!d||b&2&&i!==(i=U.getFieldTypeIcon(y[1].type)))&&p(t,"class",i),(!d||b&2)&&r!==(r=y[1].name+"")&&_e(o,r),(!d||b&8&&a!==(a=y[3]))&&p(e,"for",a);const v={};b&8&&(v.id=y[3]),b&2&&(v.required=y[1].required),!c&&b&1&&(c=!0,v.value=y[0],Re(()=>c=!1)),f.$set(v)},i(y){d||(E(f.$$.fragment,y),d=!0)},o(y){F(f.$$.fragment,y),d=!1},d(y){y&&k(e),y&&k(u),z(f,y)}}}function KO(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[YO,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function JO(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(r){s=r,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class xO extends Ne{constructor(e){super(),Ie(this,e,JO,KO,Pe,{field:1,value:0})}}function GO(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g,y,b;return{c(){var v,S;e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",h=(v=n[1].options)==null?void 0:v.min),p(f,"max",g=(S=n[1].options)==null?void 0:S.max)},m(v,S){w(v,e,S),m(e,t),m(e,s),m(e,l),m(l,o),w(v,u,S),w(v,f,S),$e(f,n[0]),y||(b=X(f,"input",n[2]),y=!0)},p(v,S){var C,M;S&2&&i!==(i=U.getFieldTypeIcon(v[1].type))&&p(t,"class",i),S&2&&r!==(r=v[1].name+"")&&_e(o,r),S&8&&a!==(a=v[3])&&p(e,"for",a),S&8&&c!==(c=v[3])&&p(f,"id",c),S&2&&d!==(d=v[1].required)&&(f.required=d),S&2&&h!==(h=(C=v[1].options)==null?void 0:C.min)&&p(f,"min",h),S&2&&g!==(g=(M=v[1].options)==null?void 0:M.max)&&p(f,"max",g),S&1&&Tt(f.value)!==v[0]&&$e(f,v[0])},d(v){v&&k(e),v&&k(u),v&&k(f),y=!1,b()}}}function ZO(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[GO,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function XO(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=Tt(this.value),t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class QO extends Ne{constructor(e){super(),Ie(this,e,XO,ZO,Pe,{field:1,value:0})}}function eT(n){let e,t,i,s,l=n[1].name+"",r,o,a,u;return{c(){e=_("input"),i=O(),s=_("label"),r=H(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",o=n[3])},m(f,c){w(f,e,c),e.checked=n[0],w(f,i,c),w(f,s,c),m(s,r),a||(u=X(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&_e(r,l),c&8&&o!==(o=f[3])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),a=!1,u()}}}function tT(n){let e,t;return e=new He({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[eT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function nT(n,e,t){let{field:i=new kn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class iT extends Ne{constructor(e){super(),Ie(this,e,nT,tT,Pe,{field:1,value:0})}}function sT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=X(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=U.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&_e(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&f.value!==y[0]&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function lT(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[sT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function rT(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class oT extends Ne{constructor(e){super(),Ie(this,e,rT,lT,Pe,{field:1,value:0})}}function aT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=X(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=U.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&_e(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function uT(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[aT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function fT(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class cT extends Ne{constructor(e){super(),Ie(this,e,fT,uT,Pe,{field:1,value:0})}}function dT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h;function g(b){n[2](b)}let y={id:n[3],options:U.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(y.formattedValue=n[0]),c=new pf({props:y}),he.push(()=>Fe(c,"formattedValue",g)),{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),a=H(" (UTC)"),f=O(),B(c.$$.fragment),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",u=n[3])},m(b,v){w(b,e,v),m(e,t),m(e,s),m(e,l),m(l,o),m(l,a),w(b,f,v),V(c,b,v),h=!0},p(b,v){(!h||v&2&&i!==(i=U.getFieldTypeIcon(b[1].type)))&&p(t,"class",i),(!h||v&2)&&r!==(r=b[1].name+"")&&_e(o,r),(!h||v&8&&u!==(u=b[3]))&&p(e,"for",u);const S={};v&8&&(S.id=b[3]),v&1&&(S.value=b[0]),!d&&v&1&&(d=!0,S.formattedValue=b[0],Re(()=>d=!1)),c.$set(S)},i(b){h||(E(c.$$.fragment,b),h=!0)},o(b){F(c.$$.fragment,b),h=!1},d(b){b&&k(e),b&&k(f),z(c,b)}}}function pT(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[dT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function hT(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(r){s=r,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class mT extends Ne{constructor(e){super(),Ie(this,e,hT,pT,Pe,{field:1,value:0})}}function pm(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" items."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&_e(s,i)},d(r){r&&k(e)}}}function gT(n){var S,C,M;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y($){n[3]($)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(S=n[1].options)==null?void 0:S.values,searchable:((C=n[1].options)==null?void 0:C.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new Db({props:b}),he.push(()=>Fe(f,"selected",y));let v=((M=n[1].options)==null?void 0:M.maxSelect)>1&&pm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=rt(),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m($,T){w($,e,T),m(e,t),m(e,s),m(e,l),m(l,o),w($,u,T),V(f,$,T),w($,d,T),v&&v.m($,T),w($,h,T),g=!0},p($,T){var D,P,L;(!g||T&2&&i!==(i=U.getFieldTypeIcon($[1].type)))&&p(t,"class",i),(!g||T&2)&&r!==(r=$[1].name+"")&&_e(o,r),(!g||T&16&&a!==(a=$[4]))&&p(e,"for",a);const A={};T&16&&(A.id=$[4]),T&6&&(A.toggle=!$[1].required||$[2]),T&4&&(A.multiple=$[2]),T&2&&(A.items=(D=$[1].options)==null?void 0:D.values),T&2&&(A.searchable=((P=$[1].options)==null?void 0:P.values)>5),!c&&T&1&&(c=!0,A.selected=$[0],Re(()=>c=!1)),f.$set(A),((L=$[1].options)==null?void 0:L.maxSelect)>1?v?v.p($,T):(v=pm($),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i($){g||(E(f.$$.fragment,$),g=!0)},o($){F(f.$$.fragment,$),g=!1},d($){$&&k(e),$&&k(u),z(f,$),$&&k(d),v&&v.d($),$&&k(h)}}}function _T(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[gT,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function bT(n,e,t){let i,{field:s=new kn}=e,{value:l=void 0}=e;function r(o){l=o,t(0,l),t(2,i),t(1,s)}return n.$$set=o=>{"field"in o&&t(1,s=o.field),"value"in o&&t(0,l=o.value)},n.$$.update=()=>{var o;n.$$.dirty&2&&t(2,i=((o=s.options)==null?void 0:o.maxSelect)>1),n.$$.dirty&5&&typeof l=="undefined"&&t(0,l=i?[]:null),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,r]}class yT extends Ne{constructor(e){super(),Ie(this,e,bT,_T,Pe,{field:1,value:0})}}function vT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("textarea"),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono txt-sm")},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=X(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=U.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&_e(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function kT(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[vT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function wT(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s!="undefined"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class ST extends Ne{constructor(e){super(),Ie(this,e,wT,kT,Pe,{field:1,value:0})}}function CT(n){let e,t;return{c(){e=_("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function MT(n){let e,t,i;return{c(){e=_("img"),Qn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!Qn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function $T(n){let e;function t(l,r){return l[2]?MT:CT}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function OT(n,e,t){let i,{file:s}=e,{size:l=50}=e;function r(){t(2,i=""),U.hasImageExtension(s==null?void 0:s.name)&&U.generateThumb(s,l,l).then(o=>{t(2,i=o)}).catch(o=>{console.warn("Unable to generate thumb: ",o)})}return n.$$set=o=>{"file"in o&&t(0,s=o.file),"size"in o&&t(1,l=o.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s!="undefined"&&r()},t(2,i=""),[s,l,i]}class TT extends Ne{constructor(e){super(),Ie(this,e,OT,$T,Pe,{file:0,size:1})}}function DT(n){let e,t;return{c(){e=_("img"),Qn(e.src,t=n[2])||p(e,"src",t),p(e,"alt","Preview")},m(i,s){w(i,e,s)},p(i,s){s&4&&!Qn(e.src,t=i[2])&&p(e,"src",t)},d(i){i&&k(e)}}}function AT(n){let e,t,i=n[2].substring(n[2].lastIndexOf("/")+1)+"",s,l,r,o,a,u,f;return{c(){e=_("a"),t=H("/../"),s=H(i),l=O(),r=_("div"),o=O(),a=_("button"),a.textContent="Close",p(e,"href",n[2]),p(e,"class","link-hint txt-ellipsis"),p(r,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-secondary")},m(c,d){w(c,e,d),m(e,t),m(e,s),w(c,l,d),w(c,r,d),w(c,o,d),w(c,a,d),u||(f=X(a,"click",n[0]),u=!0)},p(c,d){d&4&&i!==(i=c[2].substring(c[2].lastIndexOf("/")+1)+"")&&_e(s,i),d&4&&p(e,"href",c[2])},d(c){c&&k(e),c&&k(l),c&&k(r),c&&k(o),c&&k(a),u=!1,f()}}}function ET(n){let e,t,i={class:"image-preview",popup:!0,$$slots:{footer:[AT],default:[DT]},$$scope:{ctx:n}};return e=new Ti({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&132&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[4](null),z(e,s)}}}function PT(n,e,t){let i,s="";function l(f){f!==""&&U.checkImageUrl(f).then(()=>{t(2,s=f),i==null||i.show()}).catch(()=>{console.warn("Invalid image preview url: ",f),r()})}function r(){return i==null?void 0:i.hide()}function o(f){he[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){ut.call(this,n,f)}function u(f){ut.call(this,n,f)}return[r,i,s,l,o,a,u]}class LT extends Ne{constructor(e){super(),Ie(this,e,PT,ET,Pe,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function FT(n){let e;return{c(){e=_("i"),p(e,"class","ri-file-line")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function IT(n){let e,t,i,s;return{c(){e=_("img"),Qn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",n[0])},m(l,r){w(l,e,r),i||(s=X(e,"error",n[2]),i=!0)},p(l,r){r&2&&!Qn(e.src,t=l[1])&&p(e,"src",t),r&1&&p(e,"alt",l[0])},d(l){l&&k(e),i=!1,s()}}}function NT(n){let e;function t(l,r){return l[1]?IT:FT}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function RT(n,e,t){let{record:i}=e,{filename:s}=e,l="";function r(){t(1,l="")}return n.$$set=o=>{"record"in o&&t(3,i=o.record),"filename"in o&&t(0,s=o.filename)},n.$$.update=()=>{n.$$.dirty&9&&U.hasImageExtension(s)&&t(1,l=Se.Records.getFileUrl(i,`${s}?thumb=100x100`))},[s,l,r,i]}class Lb extends Ne{constructor(e){super(),Ie(this,e,RT,NT,Pe,{record:3,filename:0})}}function hm(n,e,t){const i=n.slice();return i[25]=e[t],i[27]=t,i}function mm(n,e,t){const i=n.slice();return i[28]=e[t],i[27]=t,i}function jT(n){let e,t,i;function s(){return n[16](n[27])}return{c(){e=_("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Remove file")),X(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function HT(n){let e,t,i;function s(){return n[15](n[27])}return{c(){e=_("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,r){w(l,e,r),t||(i=X(e,"click",s),t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,i()}}}function gm(n,e){let t,i,s,l,r,o,a,u=e[28]+"",f,c,d,h,g,y,b,v;s=new Lb({props:{record:e[2],filename:e[28]}});function S(){return e[14](e[28])}function C(T,A){return A&18&&(g=null),g==null&&(g=!!T[1].includes(T[27])),g?HT:jT}let M=C(e,-1),$=M(e);return{key:n,first:null,c(){t=_("div"),i=_("figute"),B(s.$$.fragment),r=O(),o=_("a"),a=H("/.../"),f=H(u),h=O(),$.c(),p(i,"class","thumb"),p(i,"title",l=U.hasImageExtension(e[28])?"Preview":""),ne(i,"fade",e[1].includes(e[27])),ne(i,"link-fade",U.hasImageExtension(e[28])),p(o,"href",c=Se.Records.getFileUrl(e[2],e[28])),p(o,"class","filename"),p(o,"title",d="Download "+e[28]),p(o,"target","_blank"),p(o,"rel","noopener"),p(o,"download",""),ne(o,"txt-strikethrough",e[1].includes(e[27])),p(t,"class","list-item"),this.first=t},m(T,A){w(T,t,A),m(t,i),V(s,i,null),m(t,r),m(t,o),m(o,a),m(o,f),m(t,h),$.m(t,null),y=!0,b||(v=X(i,"click",S),b=!0)},p(T,A){e=T;const D={};A&4&&(D.record=e[2]),A&16&&(D.filename=e[28]),s.$set(D),(!y||A&16&&l!==(l=U.hasImageExtension(e[28])?"Preview":""))&&p(i,"title",l),A&18&&ne(i,"fade",e[1].includes(e[27])),A&16&&ne(i,"link-fade",U.hasImageExtension(e[28])),(!y||A&16)&&u!==(u=e[28]+"")&&_e(f,u),(!y||A&20&&c!==(c=Se.Records.getFileUrl(e[2],e[28])))&&p(o,"href",c),(!y||A&16&&d!==(d="Download "+e[28]))&&p(o,"title",d),A&18&&ne(o,"txt-strikethrough",e[1].includes(e[27])),M===(M=C(e,A))&&$?$.p(e,A):($.d(1),$=M(e),$&&($.c(),$.m(t,null)))},i(T){y||(E(s.$$.fragment,T),y=!0)},o(T){F(s.$$.fragment,T),y=!1},d(T){T&&k(t),z(s),$.d(),b=!1,v()}}}function _m(n){let e,t,i,s,l,r,o,a,u=n[25].name+"",f,c,d,h,g,y,b,v;i=new TT({props:{file:n[25]}});function S(){return n[17](n[27])}return{c(){e=_("div"),t=_("figute"),B(i.$$.fragment),s=O(),l=_("div"),r=_("small"),r.textContent="New",o=O(),a=_("span"),f=H(u),d=O(),h=_("button"),h.innerHTML='',p(t,"class","thumb"),p(r,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[25].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(C,M){w(C,e,M),m(e,t),V(i,t,null),m(e,s),m(e,l),m(l,r),m(l,o),m(l,a),m(a,f),m(e,d),m(e,h),y=!0,b||(v=[Xe(g=St.call(null,h,"Remove file")),X(h,"click",S)],b=!0)},p(C,M){n=C;const $={};M&1&&($.file=n[25]),i.$set($),(!y||M&1)&&u!==(u=n[25].name+"")&&_e(f,u),(!y||M&1&&c!==(c=n[25].name))&&p(l,"title",c)},i(C){y||(E(i.$$.fragment,C),y=!0)},o(C){F(i.$$.fragment,C),y=!1},d(C){C&&k(e),z(i),b=!1,lt(v)}}}function bm(n){let e,t,i,s,l,r;return{c(){e=_("div"),t=_("input"),i=O(),s=_("button"),s.innerHTML=` + `}])},[i,s,l,r]}class NO extends Ne{constructor(e){super(),Ie(this,e,IO,FO,Pe,{collection:0})}}function am(n,e,t){const i=n.slice();return i[14]=e[t],i}function um(n,e,t){const i=n.slice();return i[14]=e[t],i}function fm(n){let e,t,i,s;var l=n[14].component;function r(o){return{props:{collection:o[3]}}}return l&&(t=new l(r(n))),{c(){e=_("div"),t&&B(t.$$.fragment),i=O(),p(e,"class","tab-item active")},m(o,a){w(o,e,a),t&&V(t,e,null),m(e,i),s=!0},p(o,a){const u={};if(a&8&&(u.collection=o[3]),l!==(l=o[14].component)){if(t){Te();const f=t;F(f.$$.fragment,1,0,()=>{z(f,1)}),De()}l?(t=new l(r(o)),B(t.$$.fragment),E(t.$$.fragment,1),V(t,e,i)):t=null}else l&&t.$set(u)},i(o){s||(t&&E(t.$$.fragment,o),s=!0)},o(o){t&&F(t.$$.fragment,o),s=!1},d(o){o&&k(e),t&&z(t)}}}function cm(n,e){let t,i,s,l=e[4]===e[14].id&&fm(e);return{key:n,first:null,c(){t=rt(),l&&l.c(),i=rt(),this.first=t},m(r,o){w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){e=r,e[4]===e[14].id?l?(l.p(e,o),o&16&&E(l,1)):(l=fm(e),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(Te(),F(l,1,1,()=>{l=null}),De())},i(r){s||(E(l),s=!0)},o(r){F(l),s=!1},d(r){r&&k(t),l&&l.d(r),r&&k(i)}}}function RO(n){let e,t=[],i=new Map,s,l=n[5];const r=o=>o[14].id;for(let o=0;od[14].id;for(let d=0;dClose',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[8]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function qO(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[HO],header:[jO],default:[RO]},$$scope:{ctx:n}};return e=new Ti({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&524312&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[11](null),z(e,s)}}}function VO(n,e,t){const i=[{id:"list",label:"List",component:tO},{id:"view",label:"View",component:sO},{id:"create",label:"Create",component:_O},{id:"update",label:"Update",component:AO},{id:"delete",label:"Delete",component:LO},{id:"realtime",label:"Realtime",component:NO}];let s,l=new Pn,r=i[0].id;function o(v){return t(3,l=v),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(v){t(4,r=v)}function f(v,S){(v.code==="Enter"||v.code==="Space")&&(v.preventDefault(),u(S))}const c=()=>a(),d=v=>u(v.id),h=(v,S)=>f(S,v.id);function g(v){he[v?"unshift":"push"](()=>{s=v,t(2,s)})}function y(v){ut.call(this,n,v)}function b(v){ut.call(this,n,v)}return[a,u,s,l,r,i,f,o,c,d,h,g,y,b]}class zO extends Ne{constructor(e){super(),Ie(this,e,VO,qO,Pe,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function BO(n){let e,t,i,s=[n[3]],l={};for(let r=0;r{o&&(t(1,o.style.height="",o),t(1,o.style.height=Math.min(o.scrollHeight+2,r)+"px",o))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)){h.preventDefault();const g=o.closest("form");g!=null&&g.requestSubmit&&g.requestSubmit()}}function c(h){he[h?"unshift":"push"](()=>{o=h,t(1,o)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=ct(ct({},e),ci(h)),t(3,s=Yt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,r=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&3&&o&&typeof l!==void 0&&u()},[l,o,f,s,r,c,d]}class WO extends Ne{constructor(e){super(),Ie(this,e,UO,BO,Pe,{value:0,maxHeight:4})}}function YO(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d;function h(y){n[2](y)}let g={id:n[3],required:n[1].required};return n[0]!==void 0&&(g.value=n[0]),f=new WO({props:g}),he.push(()=>Fe(f,"value",h)),{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),V(f,y,b),d=!0},p(y,b){(!d||b&2&&i!==(i=U.getFieldTypeIcon(y[1].type)))&&p(t,"class",i),(!d||b&2)&&r!==(r=y[1].name+"")&&_e(o,r),(!d||b&8&&a!==(a=y[3]))&&p(e,"for",a);const v={};b&8&&(v.id=y[3]),b&2&&(v.required=y[1].required),!c&&b&1&&(c=!0,v.value=y[0],Re(()=>c=!1)),f.$set(v)},i(y){d||(E(f.$$.fragment,y),d=!0)},o(y){F(f.$$.fragment,y),d=!1},d(y){y&&k(e),y&&k(u),z(f,y)}}}function KO(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[YO,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function JO(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(r){s=r,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class xO extends Ne{constructor(e){super(),Ie(this,e,JO,KO,Pe,{field:1,value:0})}}function GO(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g,y,b;return{c(){var v,S;e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",h=(v=n[1].options)==null?void 0:v.min),p(f,"max",g=(S=n[1].options)==null?void 0:S.max),p(f,"step","1")},m(v,S){w(v,e,S),m(e,t),m(e,s),m(e,l),m(l,o),w(v,u,S),w(v,f,S),$e(f,n[0]),y||(b=X(f,"input",n[2]),y=!0)},p(v,S){var C,M;S&2&&i!==(i=U.getFieldTypeIcon(v[1].type))&&p(t,"class",i),S&2&&r!==(r=v[1].name+"")&&_e(o,r),S&8&&a!==(a=v[3])&&p(e,"for",a),S&8&&c!==(c=v[3])&&p(f,"id",c),S&2&&d!==(d=v[1].required)&&(f.required=d),S&2&&h!==(h=(C=v[1].options)==null?void 0:C.min)&&p(f,"min",h),S&2&&g!==(g=(M=v[1].options)==null?void 0:M.max)&&p(f,"max",g),S&1&&Tt(f.value)!==v[0]&&$e(f,v[0])},d(v){v&&k(e),v&&k(u),v&&k(f),y=!1,b()}}}function ZO(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[GO,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function XO(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=Tt(this.value),t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class QO extends Ne{constructor(e){super(),Ie(this,e,XO,ZO,Pe,{field:1,value:0})}}function eT(n){let e,t,i,s,l=n[1].name+"",r,o,a,u;return{c(){e=_("input"),i=O(),s=_("label"),r=H(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",o=n[3])},m(f,c){w(f,e,c),e.checked=n[0],w(f,i,c),w(f,s,c),m(s,r),a||(u=X(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&_e(r,l),c&8&&o!==(o=f[3])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),a=!1,u()}}}function tT(n){let e,t;return e=new He({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[eT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function nT(n,e,t){let{field:i=new kn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class iT extends Ne{constructor(e){super(),Ie(this,e,nT,tT,Pe,{field:1,value:0})}}function sT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=X(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=U.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&_e(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&f.value!==y[0]&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function lT(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[sT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function rT(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class oT extends Ne{constructor(e){super(),Ie(this,e,rT,lT,Pe,{field:1,value:0})}}function aT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("input"),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=X(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=U.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&_e(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function uT(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[aT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function fT(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class cT extends Ne{constructor(e){super(),Ie(this,e,fT,uT,Pe,{field:1,value:0})}}function dT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h;function g(b){n[2](b)}let y={id:n[3],options:U.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(y.formattedValue=n[0]),c=new pf({props:y}),he.push(()=>Fe(c,"formattedValue",g)),{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),a=H(" (UTC)"),f=O(),B(c.$$.fragment),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",u=n[3])},m(b,v){w(b,e,v),m(e,t),m(e,s),m(e,l),m(l,o),m(l,a),w(b,f,v),V(c,b,v),h=!0},p(b,v){(!h||v&2&&i!==(i=U.getFieldTypeIcon(b[1].type)))&&p(t,"class",i),(!h||v&2)&&r!==(r=b[1].name+"")&&_e(o,r),(!h||v&8&&u!==(u=b[3]))&&p(e,"for",u);const S={};v&8&&(S.id=b[3]),v&1&&(S.value=b[0]),!d&&v&1&&(d=!0,S.formattedValue=b[0],Re(()=>d=!1)),c.$set(S)},i(b){h||(E(c.$$.fragment,b),h=!0)},o(b){F(c.$$.fragment,b),h=!1},d(b){b&&k(e),b&&k(f),z(c,b)}}}function pT(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[dT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function hT(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(r){s=r,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},[s,i,l]}class mT extends Ne{constructor(e){super(),Ie(this,e,hT,pT,Pe,{field:1,value:0})}}function pm(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" items."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&_e(s,i)},d(r){r&&k(e)}}}function gT(n){var S,C,M;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y($){n[3]($)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(S=n[1].options)==null?void 0:S.values,searchable:((C=n[1].options)==null?void 0:C.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new Db({props:b}),he.push(()=>Fe(f,"selected",y));let v=((M=n[1].options)==null?void 0:M.maxSelect)>1&&pm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=rt(),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m($,T){w($,e,T),m(e,t),m(e,s),m(e,l),m(l,o),w($,u,T),V(f,$,T),w($,d,T),v&&v.m($,T),w($,h,T),g=!0},p($,T){var D,P,L;(!g||T&2&&i!==(i=U.getFieldTypeIcon($[1].type)))&&p(t,"class",i),(!g||T&2)&&r!==(r=$[1].name+"")&&_e(o,r),(!g||T&16&&a!==(a=$[4]))&&p(e,"for",a);const A={};T&16&&(A.id=$[4]),T&6&&(A.toggle=!$[1].required||$[2]),T&4&&(A.multiple=$[2]),T&2&&(A.items=(D=$[1].options)==null?void 0:D.values),T&2&&(A.searchable=((P=$[1].options)==null?void 0:P.values)>5),!c&&T&1&&(c=!0,A.selected=$[0],Re(()=>c=!1)),f.$set(A),((L=$[1].options)==null?void 0:L.maxSelect)>1?v?v.p($,T):(v=pm($),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i($){g||(E(f.$$.fragment,$),g=!0)},o($){F(f.$$.fragment,$),g=!1},d($){$&&k(e),$&&k(u),z(f,$),$&&k(d),v&&v.d($),$&&k(h)}}}function _T(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[gT,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function bT(n,e,t){let i,{field:s=new kn}=e,{value:l=void 0}=e;function r(o){l=o,t(0,l),t(2,i),t(1,s)}return n.$$set=o=>{"field"in o&&t(1,s=o.field),"value"in o&&t(0,l=o.value)},n.$$.update=()=>{var o;n.$$.dirty&2&&t(2,i=((o=s.options)==null?void 0:o.maxSelect)>1),n.$$.dirty&5&&typeof l=="undefined"&&t(0,l=i?[]:null),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,r]}class yT extends Ne{constructor(e){super(),Ie(this,e,bT,_T,Pe,{field:1,value:0})}}function vT(n){let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("textarea"),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono txt-sm")},m(y,b){w(y,e,b),m(e,t),m(e,s),m(e,l),m(l,o),w(y,u,b),w(y,f,b),$e(f,n[0]),h||(g=X(f,"input",n[2]),h=!0)},p(y,b){b&2&&i!==(i=U.getFieldTypeIcon(y[1].type))&&p(t,"class",i),b&2&&r!==(r=y[1].name+"")&&_e(o,r),b&8&&a!==(a=y[3])&&p(e,"for",a),b&8&&c!==(c=y[3])&&p(f,"id",c),b&2&&d!==(d=y[1].required)&&(f.required=d),b&1&&$e(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,g()}}}function kT(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[vT,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function wT(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s!="undefined"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class ST extends Ne{constructor(e){super(),Ie(this,e,wT,kT,Pe,{field:1,value:0})}}function CT(n){let e,t;return{c(){e=_("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function MT(n){let e,t,i;return{c(){e=_("img"),Qn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!Qn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function $T(n){let e;function t(l,r){return l[2]?MT:CT}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function OT(n,e,t){let i,{file:s}=e,{size:l=50}=e;function r(){t(2,i=""),U.hasImageExtension(s==null?void 0:s.name)&&U.generateThumb(s,l,l).then(o=>{t(2,i=o)}).catch(o=>{console.warn("Unable to generate thumb: ",o)})}return n.$$set=o=>{"file"in o&&t(0,s=o.file),"size"in o&&t(1,l=o.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s!="undefined"&&r()},t(2,i=""),[s,l,i]}class TT extends Ne{constructor(e){super(),Ie(this,e,OT,$T,Pe,{file:0,size:1})}}function DT(n){let e,t;return{c(){e=_("img"),Qn(e.src,t=n[2])||p(e,"src",t),p(e,"alt","Preview")},m(i,s){w(i,e,s)},p(i,s){s&4&&!Qn(e.src,t=i[2])&&p(e,"src",t)},d(i){i&&k(e)}}}function AT(n){let e,t,i=n[2].substring(n[2].lastIndexOf("/")+1)+"",s,l,r,o,a,u,f;return{c(){e=_("a"),t=H("/../"),s=H(i),l=O(),r=_("div"),o=O(),a=_("button"),a.textContent="Close",p(e,"href",n[2]),p(e,"class","link-hint txt-ellipsis"),p(r,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-secondary")},m(c,d){w(c,e,d),m(e,t),m(e,s),w(c,l,d),w(c,r,d),w(c,o,d),w(c,a,d),u||(f=X(a,"click",n[0]),u=!0)},p(c,d){d&4&&i!==(i=c[2].substring(c[2].lastIndexOf("/")+1)+"")&&_e(s,i),d&4&&p(e,"href",c[2])},d(c){c&&k(e),c&&k(l),c&&k(r),c&&k(o),c&&k(a),u=!1,f()}}}function ET(n){let e,t,i={class:"image-preview",popup:!0,$$slots:{footer:[AT],default:[DT]},$$scope:{ctx:n}};return e=new Ti({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&132&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[4](null),z(e,s)}}}function PT(n,e,t){let i,s="";function l(f){f!==""&&U.checkImageUrl(f).then(()=>{t(2,s=f),i==null||i.show()}).catch(()=>{console.warn("Invalid image preview url: ",f),r()})}function r(){return i==null?void 0:i.hide()}function o(f){he[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){ut.call(this,n,f)}function u(f){ut.call(this,n,f)}return[r,i,s,l,o,a,u]}class LT extends Ne{constructor(e){super(),Ie(this,e,PT,ET,Pe,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function FT(n){let e;return{c(){e=_("i"),p(e,"class","ri-file-line")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function IT(n){let e,t,i,s;return{c(){e=_("img"),Qn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",n[0])},m(l,r){w(l,e,r),i||(s=X(e,"error",n[2]),i=!0)},p(l,r){r&2&&!Qn(e.src,t=l[1])&&p(e,"src",t),r&1&&p(e,"alt",l[0])},d(l){l&&k(e),i=!1,s()}}}function NT(n){let e;function t(l,r){return l[1]?IT:FT}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function RT(n,e,t){let{record:i}=e,{filename:s}=e,l="";function r(){t(1,l="")}return n.$$set=o=>{"record"in o&&t(3,i=o.record),"filename"in o&&t(0,s=o.filename)},n.$$.update=()=>{n.$$.dirty&9&&U.hasImageExtension(s)&&t(1,l=Se.Records.getFileUrl(i,`${s}?thumb=100x100`))},[s,l,r,i]}class Lb extends Ne{constructor(e){super(),Ie(this,e,RT,NT,Pe,{record:3,filename:0})}}function hm(n,e,t){const i=n.slice();return i[25]=e[t],i[27]=t,i}function mm(n,e,t){const i=n.slice();return i[28]=e[t],i[27]=t,i}function jT(n){let e,t,i;function s(){return n[16](n[27])}return{c(){e=_("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,r){w(l,e,r),t||(i=[Xe(St.call(null,e,"Remove file")),X(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function HT(n){let e,t,i;function s(){return n[15](n[27])}return{c(){e=_("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,r){w(l,e,r),t||(i=X(e,"click",s),t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,i()}}}function gm(n,e){let t,i,s,l,r,o,a,u=e[28]+"",f,c,d,h,g,y,b,v;s=new Lb({props:{record:e[2],filename:e[28]}});function S(){return e[14](e[28])}function C(T,A){return A&18&&(g=null),g==null&&(g=!!T[1].includes(T[27])),g?HT:jT}let M=C(e,-1),$=M(e);return{key:n,first:null,c(){t=_("div"),i=_("figute"),B(s.$$.fragment),r=O(),o=_("a"),a=H("/.../"),f=H(u),h=O(),$.c(),p(i,"class","thumb"),p(i,"title",l=U.hasImageExtension(e[28])?"Preview":""),ne(i,"fade",e[1].includes(e[27])),ne(i,"link-fade",U.hasImageExtension(e[28])),p(o,"href",c=Se.Records.getFileUrl(e[2],e[28])),p(o,"class","filename"),p(o,"title",d="Download "+e[28]),p(o,"target","_blank"),p(o,"rel","noopener"),p(o,"download",""),ne(o,"txt-strikethrough",e[1].includes(e[27])),p(t,"class","list-item"),this.first=t},m(T,A){w(T,t,A),m(t,i),V(s,i,null),m(t,r),m(t,o),m(o,a),m(o,f),m(t,h),$.m(t,null),y=!0,b||(v=X(i,"click",S),b=!0)},p(T,A){e=T;const D={};A&4&&(D.record=e[2]),A&16&&(D.filename=e[28]),s.$set(D),(!y||A&16&&l!==(l=U.hasImageExtension(e[28])?"Preview":""))&&p(i,"title",l),A&18&&ne(i,"fade",e[1].includes(e[27])),A&16&&ne(i,"link-fade",U.hasImageExtension(e[28])),(!y||A&16)&&u!==(u=e[28]+"")&&_e(f,u),(!y||A&20&&c!==(c=Se.Records.getFileUrl(e[2],e[28])))&&p(o,"href",c),(!y||A&16&&d!==(d="Download "+e[28]))&&p(o,"title",d),A&18&&ne(o,"txt-strikethrough",e[1].includes(e[27])),M===(M=C(e,A))&&$?$.p(e,A):($.d(1),$=M(e),$&&($.c(),$.m(t,null)))},i(T){y||(E(s.$$.fragment,T),y=!0)},o(T){F(s.$$.fragment,T),y=!1},d(T){T&&k(t),z(s),$.d(),b=!1,v()}}}function _m(n){let e,t,i,s,l,r,o,a,u=n[25].name+"",f,c,d,h,g,y,b,v;i=new TT({props:{file:n[25]}});function S(){return n[17](n[27])}return{c(){e=_("div"),t=_("figute"),B(i.$$.fragment),s=O(),l=_("div"),r=_("small"),r.textContent="New",o=O(),a=_("span"),f=H(u),d=O(),h=_("button"),h.innerHTML='',p(t,"class","thumb"),p(r,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[25].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(C,M){w(C,e,M),m(e,t),V(i,t,null),m(e,s),m(e,l),m(l,r),m(l,o),m(l,a),m(a,f),m(e,d),m(e,h),y=!0,b||(v=[Xe(g=St.call(null,h,"Remove file")),X(h,"click",S)],b=!0)},p(C,M){n=C;const $={};M&1&&($.file=n[25]),i.$set($),(!y||M&1)&&u!==(u=n[25].name+"")&&_e(f,u),(!y||M&1&&c!==(c=n[25].name))&&p(l,"title",c)},i(C){y||(E(i.$$.fragment,C),y=!0)},o(C){F(i.$$.fragment,C),y=!1},d(C){C&&k(e),z(i),b=!1,lt(v)}}}function bm(n){let e,t,i,s,l,r;return{c(){e=_("div"),t=_("input"),i=O(),s=_("button"),s.innerHTML=` Upload new file`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(o,a){w(o,e,a),m(e,t),n[18](t),m(e,i),m(e,s),l||(r=[X(t,"change",n[19]),X(s,"click",n[20])],l=!0)},p(o,a){a&32&&(t.multiple=o[5])},d(o){o&&k(e),n[18](null),l=!1,lt(r)}}}function qT(n){let e,t,i,s,l,r=n[3].name+"",o,a,u,f,c=[],d=new Map,h,g,y,b=n[4];const v=T=>T[28];for(let T=0;TF(C[T],1,1,()=>{C[T]=null});let $=!n[9]&&bm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),f=_("div");for(let T=0;T({24:r}),({uniqueId:r})=>r?16777216:0]},$$scope:{ctx:n}}});let l={};return i=new LT({props:l}),n[22](i),{c(){B(e.$$.fragment),t=O(),B(i.$$.fragment)},m(r,o){V(e,r,o),w(r,t,o),V(i,r,o),s=!0},p(r,[o]){const a={};o&8&&(a.class="form-field form-field-file "+(r[3].required?"required":"")),o&8&&(a.name=r[3].name),o&1090520063&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};i.$set(u)},i(r){s||(E(e.$$.fragment,r),E(i.$$.fragment,r),s=!0)},o(r){F(e.$$.fragment,r),F(i.$$.fragment,r),s=!1},d(r){z(e,r),r&&k(t),n[22](null),z(i,r)}}}function zT(n,e,t){let i,s,l,{record:r}=e,{value:o=null}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new kn}=e,c,d,h;function g(N){U.removeByValue(u,N),t(1,u)}function y(N){U.pushUnique(u,N),t(1,u)}function b(N){U.isEmpty(a[N])||a.splice(N,1),t(0,a)}function v(){h==null||h.dispatchEvent(new CustomEvent("change",{detail:{value:o,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const S=N=>U.hasImageExtension(N)?d==null?void 0:d.show(Se.Records.getFileUrl(r,N)):!1,C=N=>g(N),M=N=>y(N),$=N=>b(N);function T(N){he[N?"unshift":"push"](()=>{c=N,t(6,c)})}const A=()=>{for(let N of c.files)a.push(N);t(0,a),t(6,c.value=null,c)},D=()=>c==null?void 0:c.click();function P(N){he[N?"unshift":"push"](()=>{h=N,t(8,h)})}function L(N){he[N?"unshift":"push"](()=>{d=N,t(7,d)})}return n.$$set=N=>{"record"in N&&t(2,r=N.record),"value"in N&&t(13,o=N.value),"uploadedFiles"in N&&t(0,a=N.uploadedFiles),"deletedFileIndexes"in N&&t(1,u=N.deletedFileIndexes),"field"in N&&t(3,f=N.field)},n.$$.update=()=>{var N,R;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=U.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=U.toArray(u))),n.$$.dirty&8&&t(5,i=((N=f.options)==null?void 0:N.maxSelect)>1),n.$$.dirty&8224&&(typeof o=="undefined"||o===null)&&t(13,o=i?[]:null),n.$$.dirty&8192&&t(4,s=U.toArray(o)),n.$$.dirty&27&&t(9,l=(s.length||a.length)&&((R=f.options)==null?void 0:R.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&v()},[a,u,r,f,s,i,c,d,h,l,g,y,b,o,S,C,M,$,T,A,D,P,L]}class BT extends Ne{constructor(e){super(),Ie(this,e,zT,VT,Pe,{record:2,value:13,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function ym(n){let e,t;return{c(){e=_("small"),t=H(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s&2&&_e(t,i[1])},d(i){i&&k(e)}}}function UT(n){let e,t,i,s,l,r=n[0].id+"",o,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&ym(n);return{c(){e=_("i"),i=O(),s=_("div"),l=_("div"),o=H(r),a=O(),c&&c.c(),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(s,"class","content svelte-1gjwqyd")},m(d,h){w(d,e,h),w(d,i,h),w(d,s,h),m(s,l),m(l,o),m(s,a),c&&c.m(s,null),u||(f=Xe(t=St.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Kn(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&r!==(r=d[0].id+"")&&_e(o,r),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=ym(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:re,o:re,d(d){d&&k(e),d&&k(i),d&&k(s),c&&c.d(),u=!1,f()}}}function WT(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function r(o){o=o||{};const a=["name","title","label","key","email","heading","content",...Object.keys(o)];for(const u of a)if(typeof o[u]=="string"&&!U.isEmpty(o[u])&&!s.includes(u))return u+": "+o[u];return""}return n.$$set=o=>{"item"in o&&t(0,l=o.item)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=r(l))},[l,i]}class YT extends Ne{constructor(e){super(),Ie(this,e,WT,UT,Pe,{item:0})}}function vm(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='Load more',p(e,"type","button"),p(e,"class","btn btn-block btn-sm"),ne(e,"btn-loading",n[6]),ne(e,"btn-disabled",n[6])},m(s,l){w(s,e,l),t||(i=X(e,"click",Bn(n[14])),t=!0)},p(s,l){l&64&&ne(e,"btn-loading",s[6]),l&64&&ne(e,"btn-disabled",s[6])},d(s){s&&k(e),t=!1,i()}}}function KT(n){let e,t=n[7]&&vm(n);return{c(){t&&t.c(),e=rt()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[7]?t?t.p(i,s):(t=vm(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function JT(n){let e,t,i,s;const l=[{selectPlaceholder:n[8]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:n[4]},{optionComponent:n[4]},{multiple:n[2]},{class:"records-select block-options"},n[10]];function r(u){n[15](u)}function o(u){n[16](u)}let a={$$slots:{afterOptions:[KT]},$$scope:{ctx:n}};for(let u=0;uFe(e,"keyOfSelected",r)),he.push(()=>Fe(e,"selected",o)),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){B(e.$$.fragment)},m(u,f){V(e,u,f),s=!0},p(u,[f]){const c=f&1340?gn(l,[f&264&&{selectPlaceholder:u[8]?"Loading...":u[3]},f&32&&{items:u[5]},f&32&&{searchable:u[5].length>5},l[3],f&16&&{labelComponent:u[4]},f&16&&{optionComponent:u[4]},f&4&&{multiple:u[2]},l[7],f&1024&&pi(u[10])]):{};f&4194496&&(c.$$scope={dirty:f,ctx:u}),!t&&f&2&&(t=!0,c.keyOfSelected=u[1],Re(()=>t=!1)),!i&&f&1&&(i=!0,c.selected=u[0],Re(()=>i=!1)),e.$set(c)},i(u){s||(E(e.$$.fragment,u),s=!0)},o(u){F(e.$$.fragment,u),s=!1},d(u){z(e,u)}}}function xT(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent","collectionId"];let r=Yt(e,l);const o="select_"+U.randomString(5);let{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=YT}=e,{collectionId:h}=e,g=[],y=1,b=0,v=!1,S=!1;C();async function C(){const L=U.toArray(f);if(!(!h||!L.length)){t(13,S=!0);try{const N=[];for(const R of L)N.push(`id="${R}"`);t(0,u=await Se.Records.getFullList(h,200,{sort:"-created",filter:N.join("||"),$cancelKey:o+"loadSelected"})),t(5,g=U.filterDuplicatesByKey(g.concat(u)))}catch(N){Se.errorResponseHandler(N)}t(13,S=!1)}}async function M(L=!1){if(!!h){t(6,v=!0);try{const N=L?1:y+1,R=await Se.Records.getList(h,N,200,{sort:"-created",$cancelKey:o+"loadList"});L&&t(5,g=[]),t(5,g=U.filterDuplicatesByKey(g.concat(R.items))),y=R.page,t(12,b=R.totalItems)}catch(N){Se.errorResponseHandler(N)}t(6,v=!1)}}const $=()=>M();function T(L){f=L,t(1,f)}function A(L){u=L,t(0,u)}function D(L){ut.call(this,n,L)}function P(L){ut.call(this,n,L)}return n.$$set=L=>{e=ct(ct({},e),ci(L)),t(10,r=Yt(e,l)),"multiple"in L&&t(2,a=L.multiple),"selected"in L&&t(0,u=L.selected),"keyOfSelected"in L&&t(1,f=L.keyOfSelected),"selectPlaceholder"in L&&t(3,c=L.selectPlaceholder),"optionComponent"in L&&t(4,d=L.optionComponent),"collectionId"in L&&t(11,h=L.collectionId)},n.$$.update=()=>{n.$$.dirty&2048&&h&&M(),n.$$.dirty&8256&&t(8,i=v||S),n.$$.dirty&4128&&t(7,s=b>g.length)},[u,f,a,c,d,g,v,s,i,M,r,h,b,S,$,T,A,D,P]}class GT extends Ne{constructor(e){super(),Ie(this,e,xT,JT,Pe,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4,collectionId:11})}}function km(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" items."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&_e(s,i)},d(r){r&&k(e)}}}function ZT(n){var S,C;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y(M){n[3](M)}let b={toggle:!0,id:n[4],multiple:n[2],collectionId:(S=n[1].options)==null?void 0:S.collectionId};n[0]!==void 0&&(b.keyOfSelected=n[0]),f=new GT({props:b}),he.push(()=>Fe(f,"keyOfSelected",y));let v=((C=n[1].options)==null?void 0:C.maxSelect)>1&&km(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=rt(),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,$){w(M,e,$),m(e,t),m(e,s),m(e,l),m(l,o),w(M,u,$),V(f,M,$),w(M,d,$),v&&v.m(M,$),w(M,h,$),g=!0},p(M,$){var A,D;(!g||$&2&&i!==(i=U.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!g||$&2)&&r!==(r=M[1].name+"")&&_e(o,r),(!g||$&16&&a!==(a=M[4]))&&p(e,"for",a);const T={};$&16&&(T.id=M[4]),$&4&&(T.multiple=M[2]),$&2&&(T.collectionId=(A=M[1].options)==null?void 0:A.collectionId),!c&&$&1&&(c=!0,T.keyOfSelected=M[0],Re(()=>c=!1)),f.$set(T),((D=M[1].options)==null?void 0:D.maxSelect)>1?v?v.p(M,$):(v=km(M),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i(M){g||(E(f.$$.fragment,M),g=!0)},o(M){F(f.$$.fragment,M),g=!1},d(M){M&&k(e),M&&k(u),z(f,M),M&&k(d),v&&v.d(M),M&&k(h)}}}function XT(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[ZT,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function QT(n,e,t){let i,{field:s=new kn}=e,{value:l=void 0}=e;function r(o){l=o,t(0,l),t(2,i),t(1,s)}return n.$$set=o=>{"field"in o&&t(1,s=o.field),"value"in o&&t(0,l=o.value)},n.$$.update=()=>{var o;n.$$.dirty&2&&t(2,i=((o=s.options)==null?void 0:o.maxSelect)>1),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(s.options.maxSelect-1))},[l,s,i,r]}class eD extends Ne{constructor(e){super(),Ie(this,e,QT,XT,Pe,{field:1,value:0})}}function tD(n){let e,t,i,s,l,r=n[0].id+"",o,a,u,f=n[0].email+"",c,d,h;return{c(){e=_("i"),i=O(),s=_("div"),l=_("div"),o=H(r),a=O(),u=_("small"),c=H(f),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(u,"class","block txt-hint txt-ellipsis"),p(s,"class","content")},m(g,y){w(g,e,y),w(g,i,y),w(g,s,y),m(s,l),m(l,o),m(s,a),m(s,u),m(u,c),d||(h=Xe(t=St.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),d=!0)},p(g,[y]){t&&Kn(t.update)&&y&1&&t.update.call(null,{text:JSON.stringify(g[0],null,2),position:"left",class:"code"}),y&1&&r!==(r=g[0].id+"")&&_e(o,r),y&1&&f!==(f=g[0].email+"")&&_e(c,f)},i:re,o:re,d(g){g&&k(e),g&&k(i),g&&k(s),d=!1,h()}}}function nD(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class mu extends Ne{constructor(e){super(),Ie(this,e,nD,tD,Pe,{item:0})}}function wm(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='Load more',p(e,"type","button"),p(e,"class","btn btn-block btn-sm"),ne(e,"btn-loading",n[6]),ne(e,"btn-disabled",n[6])},m(s,l){w(s,e,l),t||(i=X(e,"click",Bn(n[13])),t=!0)},p(s,l){l&64&&ne(e,"btn-loading",s[6]),l&64&&ne(e,"btn-disabled",s[6])},d(s){s&&k(e),t=!1,i()}}}function iD(n){let e,t=n[7]&&wm(n);return{c(){t&&t.c(),e=rt()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[7]?t?t.p(i,s):(t=wm(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function sD(n){let e,t,i,s;const l=[{selectPlaceholder:n[8]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:mu},{optionComponent:n[4]},{multiple:n[2]},{class:"users-select block-options"},n[10]];function r(u){n[14](u)}function o(u){n[15](u)}let a={$$slots:{afterOptions:[iD]},$$scope:{ctx:n}};for(let u=0;uFe(e,"keyOfSelected",r)),he.push(()=>Fe(e,"selected",o)),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){B(e.$$.fragment)},m(u,f){V(e,u,f),s=!0},p(u,[f]){const c=f&1340?gn(l,[f&264&&{selectPlaceholder:u[8]?"Loading...":u[3]},f&32&&{items:u[5]},f&32&&{searchable:u[5].length>5},l[3],f&0&&{labelComponent:mu},f&16&&{optionComponent:u[4]},f&4&&{multiple:u[2]},l[7],f&1024&&pi(u[10])]):{};f&2097344&&(c.$$scope={dirty:f,ctx:u}),!t&&f&2&&(t=!0,c.keyOfSelected=u[1],Re(()=>t=!1)),!i&&f&1&&(i=!0,c.selected=u[0],Re(()=>i=!1)),e.$set(c)},i(u){s||(E(e.$$.fragment,u),s=!0)},o(u){F(e.$$.fragment,u),s=!1},d(u){z(e,u)}}}function lD(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent"];let r=Yt(e,l);const o="select_"+U.randomString(5);let{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=mu}=e,h=[],g=1,y=0,b=!1,v=!1;C(),S();async function S(){const P=U.toArray(f);if(!!P.length){t(12,v=!0);try{const L=[];for(const N of P)L.push(`id="${N}"`);t(0,u=await Se.Users.getFullList(100,{sort:"-created",filter:L.join("||"),$cancelKey:o+"loadSelected"})),t(5,h=U.filterDuplicatesByKey(h.concat(u)))}catch(L){Se.errorResponseHandler(L)}t(12,v=!1)}}async function C(P=!1){t(6,b=!0);try{const L=P?1:g+1,N=await Se.Users.getList(L,200,{sort:"-created",$cancelKey:o+"loadList"});P&&t(5,h=[]),t(5,h=U.filterDuplicatesByKey(h.concat(N.items))),g=N.page,t(11,y=N.totalItems)}catch(L){Se.errorResponseHandler(L)}t(6,b=!1)}const M=()=>C();function $(P){f=P,t(1,f)}function T(P){u=P,t(0,u)}function A(P){ut.call(this,n,P)}function D(P){ut.call(this,n,P)}return n.$$set=P=>{e=ct(ct({},e),ci(P)),t(10,r=Yt(e,l)),"multiple"in P&&t(2,a=P.multiple),"selected"in P&&t(0,u=P.selected),"keyOfSelected"in P&&t(1,f=P.keyOfSelected),"selectPlaceholder"in P&&t(3,c=P.selectPlaceholder),"optionComponent"in P&&t(4,d=P.optionComponent)},n.$$.update=()=>{n.$$.dirty&4160&&t(8,i=b||v),n.$$.dirty&2080&&t(7,s=y>h.length)},[u,f,a,c,d,h,b,s,i,C,r,y,v,M,$,T,A,D]}class rD extends Ne{constructor(e){super(),Ie(this,e,lD,sD,Pe,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4})}}function Sm(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=_("div"),t=H("Select up to "),s=H(i),l=H(" users."),p(e,"class","help-block")},m(r,o){w(r,e,o),m(e,t),m(e,s),m(e,l)},p(r,o){o&2&&i!==(i=r[1].options.maxSelect+"")&&_e(s,i)},d(r){r&&k(e)}}}function oD(n){var S;let e,t,i,s,l,r=n[1].name+"",o,a,u,f,c,d,h,g;function y(C){n[4](C)}let b={toggle:!0,id:n[5],multiple:n[2],disabled:n[3]};n[0]!==void 0&&(b.keyOfSelected=n[0]),f=new rD({props:b}),he.push(()=>Fe(f,"keyOfSelected",y));let v=((S=n[1].options)==null?void 0:S.maxSelect)>1&&Sm(n);return{c(){e=_("label"),t=_("i"),s=O(),l=_("span"),o=H(r),u=O(),B(f.$$.fragment),d=O(),v&&v.c(),h=rt(),p(t,"class",i=U.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[5])},m(C,M){w(C,e,M),m(e,t),m(e,s),m(e,l),m(l,o),w(C,u,M),V(f,C,M),w(C,d,M),v&&v.m(C,M),w(C,h,M),g=!0},p(C,M){var T;(!g||M&2&&i!==(i=U.getFieldTypeIcon(C[1].type)))&&p(t,"class",i),(!g||M&2)&&r!==(r=C[1].name+"")&&_e(o,r),(!g||M&32&&a!==(a=C[5]))&&p(e,"for",a);const $={};M&32&&($.id=C[5]),M&4&&($.multiple=C[2]),M&8&&($.disabled=C[3]),!c&&M&1&&(c=!0,$.keyOfSelected=C[0],Re(()=>c=!1)),f.$set($),((T=C[1].options)==null?void 0:T.maxSelect)>1?v?v.p(C,M):(v=Sm(C),v.c(),v.m(h.parentNode,h)):v&&(v.d(1),v=null)},i(C){g||(E(f.$$.fragment,C),g=!0)},o(C){F(f.$$.fragment,C),g=!1},d(C){C&&k(e),C&&k(u),z(f,C),C&&k(d),v&&v.d(C),C&&k(h)}}}function aD(n){let e,t;return e=new He({props:{class:"form-field "+(n[1].required?"required":"")+" "+(n[3]?"disabled":""),name:n[1].name,$$slots:{default:[oD,({uniqueId:i})=>({5:i}),({uniqueId:i})=>i?32:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&10&&(l.class="form-field "+(i[1].required?"required":"")+" "+(i[3]?"disabled":"")),s&2&&(l.name=i[1].name),s&111&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function uD(n,e,t){let i,s,{field:l=new kn}=e,{value:r=void 0}=e;function o(a){r=a,t(0,r),t(2,s),t(1,l)}return n.$$set=a=>{"field"in a&&t(1,l=a.field),"value"in a&&t(0,r=a.value)},n.$$.update=()=>{var a;n.$$.dirty&2&&t(2,s=((a=l.options)==null?void 0:a.maxSelect)>1),n.$$.dirty&7&&s&&Array.isArray(r)&&r.length>l.options.maxSelect&&t(0,r=r.slice(l.options.maxSelect-1)),n.$$.dirty&3&&t(3,i=!U.isEmpty(r)&&l.system)},[r,l,s,i,o]}class fD extends Ne{constructor(e){super(),Ie(this,e,uD,aD,Pe,{field:1,value:0})}}function Cm(n,e,t){const i=n.slice();return i[40]=e[t],i[41]=e,i[42]=t,i}function Mm(n){let e,t;return e=new He({props:{class:"form-field disabled",name:"id",$$slots:{default:[cD,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function cD(n){let e,t,i,s,l,r,o,a,u,f,c;return{c(){e=_("label"),t=_("i"),i=O(),s=_("span"),s.textContent="id",l=O(),r=_("span"),a=O(),u=_("input"),p(t,"class",U.getFieldTypeIcon("primary")),p(s,"class","txt"),p(r,"class","flex-fill"),p(e,"for",o=n[43]),p(u,"type","text"),p(u,"id",f=n[43]),u.value=c=n[2].id,u.disabled=!0},m(d,h){w(d,e,h),m(e,t),m(e,i),m(e,s),m(e,l),m(e,r),w(d,a,h),w(d,u,h)},p(d,h){h[1]&4096&&o!==(o=d[43])&&p(e,"for",o),h[1]&4096&&f!==(f=d[43])&&p(u,"id",f),h[0]&4&&c!==(c=d[2].id)&&u.value!==c&&(u.value=c)},d(d){d&&k(e),d&&k(a),d&&k(u)}}}function $m(n){let e;return{c(){e=_("div"),e.innerHTML=`
No custom fields to be set
`,p(e,"class","block txt-center txt-disabled")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function dD(n){let e,t,i;function s(r){n[31](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new fD({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function pD(n){let e,t,i;function s(r){n[30](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new eD({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function hD(n){let e,t,i,s,l;function r(f){n[27](f,n[40])}function o(f){n[28](f,n[40])}function a(f){n[29](f,n[40])}let u={field:n[40],record:n[2]};return n[2][n[40].name]!==void 0&&(u.value=n[2][n[40].name]),n[3][n[40].name]!==void 0&&(u.uploadedFiles=n[3][n[40].name]),n[4][n[40].name]!==void 0&&(u.deletedFileIndexes=n[4][n[40].name]),e=new BT({props:u}),he.push(()=>Fe(e,"value",r)),he.push(()=>Fe(e,"uploadedFiles",o)),he.push(()=>Fe(e,"deletedFileIndexes",a)),{c(){B(e.$$.fragment)},m(f,c){V(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[40]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[40].name],Re(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[40].name],Re(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[40].name],Re(()=>s=!1)),e.$set(d)},i(f){l||(E(e.$$.fragment,f),l=!0)},o(f){F(e.$$.fragment,f),l=!1},d(f){z(e,f)}}}function mD(n){let e,t,i;function s(r){n[26](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new ST({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function gD(n){let e,t,i;function s(r){n[25](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new yT({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function _D(n){let e,t,i;function s(r){n[24](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new mT({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function bD(n){let e,t,i;function s(r){n[23](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new cT({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function yD(n){let e,t,i;function s(r){n[22](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new oT({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function vD(n){let e,t,i;function s(r){n[21](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new iT({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function kD(n){let e,t,i;function s(r){n[20](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new QO({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function wD(n){let e,t,i;function s(r){n[19](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new xO({props:l}),he.push(()=>Fe(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],Re(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function Om(n,e){let t,i,s,l,r;const o=[wD,kD,vD,yD,bD,_D,gD,mD,hD,pD,dD],a=[];function u(f,c){return f[40].type==="text"?0:f[40].type==="number"?1:f[40].type==="bool"?2:f[40].type==="email"?3:f[40].type==="url"?4:f[40].type==="date"?5:f[40].type==="select"?6:f[40].type==="json"?7:f[40].type==="file"?8:f[40].type==="relation"?9:f[40].type==="user"?10:-1}return~(i=u(e))&&(s=a[i]=o[i](e)),{key:n,first:null,c(){t=rt(),s&&s.c(),l=rt(),this.first=t},m(f,c){w(f,t,c),~i&&a[i].m(f,c),w(f,l,c),r=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(Te(),F(a[d],1,1,()=>{a[d]=null}),De()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=o[i](e),s.c()),E(s,1),s.m(l.parentNode,l)):s=null)},i(f){r||(E(s),r=!0)},o(f){F(s),r=!1},d(f){f&&k(t),~i&&a[i].d(f),f&&k(l)}}}function SD(n){var d;let e,t,i=[],s=new Map,l,r,o,a=!n[2].isNew&&Mm(n),u=((d=n[0])==null?void 0:d.schema)||[];const f=h=>h[40].name;for(let h=0;h{a=null}),De()):a?(a.p(h,g),g[0]&4&&E(a,1)):(a=Mm(h),a.c(),E(a,1),a.m(e,t)),g[0]&29&&(u=((y=h[0])==null?void 0:y.schema)||[],Te(),i=ot(i,g,f,1,h,u,s,e,Lt,Om,null,Cm),De(),!u.length&&c?c.p(h,g):u.length?c&&(c.d(1),c=null):(c=$m(),c.c(),c.m(e,null)))},i(h){if(!l){E(a);for(let g=0;g Delete`,p(e,"tabindex","0"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[18]),t=!0)},p:re,d(s){s&&k(e),t=!1,i()}}}function MD(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",r,o,a,u,f,c=!n[2].isNew&&n[9]&&Tm(n);return{c(){e=_("h4"),i=H(t),s=O(),r=H(l),o=H(" record"),a=O(),c&&c.c(),u=rt()},m(d,h){w(d,e,h),m(e,i),m(e,s),m(e,r),m(e,o),w(d,a,h),c&&c.m(d,h),w(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&_e(i,t),(!f||h[0]&1)&&l!==(l=d[0].name+"")&&_e(r,l),!d[2].isNew&&d[9]?c?(c.p(d,h),h[0]&516&&E(c,1)):(c=Tm(d),c.c(),E(c,1),c.m(u.parentNode,u)):c&&(Te(),F(c,1,1,()=>{c=null}),De())},i(d){f||(E(c),f=!0)},o(d){F(c),f=!1},d(d){d&&k(e),d&&k(a),c&&c.d(d),d&&k(u)}}}function $D(n){let e,t,i,s,l,r=n[2].isNew?"Create":"Save changes",o,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=O(),s=_("button"),l=_("span"),o=H(r),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[11]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],ne(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,o),u||(f=X(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&r!==(r=c[2].isNew?"Create":"Save changes")&&_e(o,r),d[0]&1152&&a!==(a=!c[10]||c[7])&&(s.disabled=a),d[0]&128&&ne(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function OD(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[$D],header:[MD],default:[SD]},$$scope:{ctx:n}};return e=new Ti({props:i}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&288&&(r.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[33](null),z(e,s)}}}function Dm(n){return JSON.stringify(n)}function TD(n,e,t){let i,s,l,r;const o=vn(),a="record_"+U.randomString(5);let{collection:u}=e,f,c=null,d=new Xr,h=!1,g=!1,y={},b={},v="";function S(ue){return M(ue),t(8,g=!0),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}function M(ue){Wi({}),c=ue||{},t(2,d=ue!=null&&ue.clone?ue.clone():new Xr),t(3,y={}),t(4,b={}),t(15,v=Dm(d))}function $(){if(h||!s)return;t(7,h=!0);const ue=A();let ie;d.isNew?ie=Se.Records.create(u==null?void 0:u.id,ue):ie=Se.Records.update(u==null?void 0:u.id,d.id,ue),ie.then(async ve=>{hn(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),C(),o("save",ve)}).catch(ve=>{Se.errorResponseHandler(ve)}).finally(()=>{t(7,h=!1)})}function T(){!(c!=null&&c.id)||Mi("Do you really want to delete the selected record?",()=>Se.Records.delete(c["@collectionId"],c.id).then(()=>{C(),hn("Successfully deleted record."),o("delete",c)}).catch(ue=>{Se.errorResponseHandler(ue)}))}function A(){const ue=(d==null?void 0:d.export())||{},ie=new FormData,ve={};for(const je of(u==null?void 0:u.schema)||[])ve[je.name]=je;for(const je in ue)!ve[je]||(typeof ue[je]=="undefined"&&(ue[je]=null),U.addValueToFormData(ie,je,ue[je]));for(const je in y){const Le=U.toArray(y[je]);for(const qe of Le)ie.append(je,qe)}for(const je in b){const Le=U.toArray(b[je]);for(const qe of Le)ie.append(je+"."+qe,"")}return ie}const D=()=>C(),P=()=>T();function L(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function N(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function R(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function J(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function W(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function q(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function x(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function K(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function Y(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function te(ue,ie){n.$$.not_equal(y[ie.name],ue)&&(y[ie.name]=ue,t(3,y))}function fe(ue,ie){n.$$.not_equal(b[ie.name],ue)&&(b[ie.name]=ue,t(4,b))}function ye(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}function se(ue,ie){n.$$.not_equal(d[ie.name],ue)&&(d[ie.name]=ue,t(2,d))}const G=()=>s&&g?(Mi("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,g=!1),C()}),!1):!0;function Oe(ue){he[ue?"unshift":"push"](()=>{f=ue,t(6,f)})}function ee(ue){ut.call(this,n,ue)}function be(ue){ut.call(this,n,ue)}return n.$$set=ue=>{"collection"in ue&&t(0,u=ue.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(16,i=U.hasNonEmptyProps(y)||U.hasNonEmptyProps(b)),n.$$.dirty[0]&98308&&t(5,s=i||v!=Dm(d)),n.$$.dirty[0]&36&&t(10,l=d.isNew||s),n.$$.dirty[0]&1&&t(9,r=(u==null?void 0:u.name)!=="profiles")},[u,C,d,y,b,s,f,h,g,r,l,a,$,T,S,v,i,D,P,L,N,R,J,W,q,x,K,Y,te,fe,ye,se,G,Oe,ee,be]}class Fb extends Ne{constructor(e){super(),Ie(this,e,TD,OD,Pe,{collection:0,show:14,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[1]}}function DD(n){let e;return{c(){e=_("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:re,d(t){t&&k(e)}}}function AD(n){let e,t;return{c(){e=_("span"),t=H(n[1]),p(e,"class","label txt-base txt-mono"),p(e,"title",n[0])},m(i,s){w(i,e,s),m(e,t)},p(i,s){s&2&&_e(t,i[1]),s&1&&p(e,"title",i[0])},d(i){i&&k(e)}}}function ED(n){let e;function t(l,r){return l[0]?AD:DD}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:re,o:re,d(l){s.d(l),l&&k(e)}}}function PD(n,e,t){let{id:i=""}=e,s=i;return n.$$set=l=>{"id"in l&&t(0,i=l.id)},n.$$.update=()=>{n.$$.dirty&1&&typeof i=="string"&&i.length>27&&t(1,s=i.substring(0,5)+"..."+i.substring(i.length-10))},[i,s]}class Io extends Ne{constructor(e){super(),Ie(this,e,PD,ED,Pe,{id:0})}}function Am(n,e,t){const i=n.slice();return i[8]=e[t],i}function Em(n,e,t){const i=n.slice();return i[3]=e[t],i}function Pm(n,e,t){const i=n.slice();return i[3]=e[t],i}function LD(n){let e,t=n[0][n[1].name]+"",i,s;return{c(){e=_("span"),i=H(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[0][n[1].name])},m(l,r){w(l,e,r),m(e,i)},p(l,r){r&3&&t!==(t=l[0][l[1].name]+"")&&_e(i,t),r&3&&s!==(s=l[0][l[1].name])&&p(e,"title",s)},i:re,o:re,d(l){l&&k(e)}}}function FD(n){let e,t,i=U.toArray(n[0][n[1].name]),s=[];for(let r=0;rF(s[r],1,1,()=>{s[r]=null});return{c(){e=_("div");for(let r=0;rF(s[r],1,1,()=>{s[r]=null});return{c(){e=_("div");for(let r=0;r{a[d]=null}),De(),s=a[i],s?s.p(f,c):(s=a[i]=o[i](f),s.c()),E(s,1),s.m(e,null)),(!r||c&2&&l!==(l="col-type-"+f[1].type+" col-field-"+f[1].name))&&p(e,"class",l)},i(f){r||(E(s),r=!0)},o(f){F(s),r=!1},d(f){f&&k(e),a[i].d()}}}function BD(n,e,t){let{record:i}=e,{field:s}=e;function l(r){ut.call(this,n,r)}return n.$$set=r=>{"record"in r&&t(0,i=r.record),"field"in r&&t(1,s=r.field)},[i,s,l]}class Ib extends Ne{constructor(e){super(),Ie(this,e,BD,zD,Pe,{record:0,field:1})}}function Nm(n,e,t){const i=n.slice();return i[35]=e[t],i}function Rm(n,e,t){const i=n.slice();return i[38]=e[t],i}function jm(n,e,t){const i=n.slice();return i[38]=e[t],i}function UD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="id",p(t,"class",U.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function WD(n){let e,t,i,s,l,r=n[38].name+"",o;return{c(){e=_("div"),t=_("i"),s=O(),l=_("span"),o=H(r),p(t,"class",i=U.getFieldTypeIcon(n[38].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){w(a,e,u),m(e,t),m(e,s),m(e,l),m(l,o)},p(a,u){u[0]&2048&&i!==(i=U.getFieldTypeIcon(a[38].type))&&p(t,"class",i),u[0]&2048&&r!==(r=a[38].name+"")&&_e(o,r)},d(a){a&&k(e)}}}function Hm(n,e){let t,i,s,l;function r(a){e[22](a)}let o={class:"col-type-"+e[38].type+" col-field-"+e[38].name,name:e[38].name,$$slots:{default:[WD]},$$scope:{ctx:e}};return e[0]!==void 0&&(o.sort=e[0]),i=new en({props:o}),he.push(()=>Fe(i,"sort",r)),{key:n,first:null,c(){t=rt(),B(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),V(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&2048&&(f.class="col-type-"+e[38].type+" col-field-"+e[38].name),u[0]&2048&&(f.name=e[38].name),u[0]&2048|u[1]&4096&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],Re(()=>s=!1)),i.$set(f)},i(a){l||(E(i.$$.fragment,a),l=!0)},o(a){F(i.$$.fragment,a),l=!1},d(a){a&&k(t),z(i,a)}}}function YD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="created",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function KD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=O(),s=_("span"),s.textContent="updated",p(t,"class",U.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:re,d(l){l&&k(e)}}}function qm(n){let e;function t(l,r){return l[8]?xD:JD}let i=t(n),s=i(n);return{c(){s.c(),e=rt()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function JD(n){var o;let e,t,i,s,l,r=((o=n[1])==null?void 0:o.length)&&Vm(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No records found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?r?r.p(a,u):(r=Vm(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function xD(n){let e;return{c(){e=_("tr"),e.innerHTML=` @@ -358,6 +358,6 @@ const Nb=function(){const e=document.createElement("link").relList;if(e&&e.suppo This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,v){(!c||v&65536&&l!==(l=b[16]+".config.onlyDomains"))&&p(e,"for",l);const S={};v&65536&&(S.id=b[16]+".config.onlyDomains"),v&1&&(S.disabled=!U.isEmpty(b[0].exceptDomains)),!a&&v&1&&(a=!0,S.value=b[0].onlyDomains,Re(()=>a=!1)),o.$set(S)},i(b){c||(E(o.$$.fragment,b),c=!0)},o(b){F(o.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(r),z(o,b),b&&k(u),b&&k(f),d=!1,h()}}}function xE(n){let e,t,i,s;e=new He({props:{class:"form-field form-field-toggle m-b-0",name:"emailPassword.enabled",$$slots:{default:[WE,({uniqueId:r})=>({16:r}),({uniqueId:r})=>r?65536:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&Mg(n);return{c(){B(e.$$.fragment),t=O(),l&&l.c(),i=rt()},m(r,o){V(e,r,o),w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){const a={};o&196609&&(a.$$scope={dirty:o,ctx:r}),e.$set(a),r[0].enabled?l?(l.p(r,o),o&1&&E(l,1)):(l=Mg(r),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(Te(),F(l,1,1,()=>{l=null}),De())},i(r){s||(E(e.$$.fragment,r),E(l),s=!0)},o(r){F(e.$$.fragment,r),F(l),s=!1},d(r){z(e,r),r&&k(t),l&&l.d(r),r&&k(i)}}}function GE(n){let e;return{c(){e=_("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ZE(n){let e;return{c(){e=_("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $g(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){s||(Dt(()=>{i||(i=ft(e,Un,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){i||(i=ft(e,Un,{duration:150,start:.7},!1)),i.run(0),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function XE(n){let e,t,i,s,l,r,o;function a(d,h){return d[0].enabled?ZE:GE}let u=a(n),f=u(n),c=n[2]&&$g();return{c(){e=_("div"),e.innerHTML=` Email/Password`,t=O(),f.c(),i=O(),s=_("div"),l=O(),c&&c.c(),r=rt(),p(e,"class","inline-flex"),p(s,"class","flex-fill")},m(d,h){w(d,e,h),w(d,t,h),f.m(d,h),w(d,i,h),w(d,s,h),w(d,l,h),c&&c.m(d,h),w(d,r,h),o=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(i.parentNode,i))),d[2]?c?h&4&&E(c,1):(c=$g(),c.c(),E(c,1),c.m(r.parentNode,r)):c&&(Te(),F(c,1,1,()=>{c=null}),De())},i(d){o||(E(c),o=!0)},o(d){F(c),o=!1},d(d){d&&k(e),d&&k(t),f.d(d),d&&k(i),d&&k(s),d&&k(l),c&&c.d(d),d&&k(r)}}}function QE(n){let e,t;const i=[n[3]];let s={$$slots:{header:[XE],default:[xE]},$$scope:{ctx:n}};for(let l=0;lt(7,r=M));let{config:o={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){o.enabled=this.checked,t(0,o)}function h(){o.minPasswordLength=Tt(this.value),t(0,o)}function g(M){n.$$.not_equal(o.exceptDomains,M)&&(o.exceptDomains=M,t(0,o))}function y(M){n.$$.not_equal(o.onlyDomains,M)&&(o.onlyDomains=M,t(0,o))}function b(M){he[M?"unshift":"push"](()=>{a=M,t(1,a)})}function v(M){ut.call(this,n,M)}function S(M){ut.call(this,n,M)}function C(M){ut.call(this,n,M)}return n.$$set=M=>{e=ct(ct({},e),ci(M)),t(3,l=Yt(e,s)),"config"in M&&t(0,o=M.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!U.isEmpty(r==null?void 0:r.emailPassword))},[o,a,i,l,u,f,c,r,d,h,g,y,b,v,S,C]}class tP extends Ne{constructor(e){super(),Ie(this,e,eP,QE,Pe,{config:0,expand:4,collapse:5,collapseSiblings:6})}get expand(){return this.$$.ctx[4]}get collapse(){return this.$$.ctx[5]}get collapseSiblings(){return this.$$.ctx[6]}}function nP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[22]),p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[11]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Og(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;l=new He({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[iP,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),a=new He({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[sP,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),c=new He({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[lP,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}});let y=n[4]&&Tg(n);return{c(){e=_("div"),t=_("div"),i=O(),s=_("div"),B(l.$$.fragment),r=O(),o=_("div"),B(a.$$.fragment),u=O(),f=_("div"),B(c.$$.fragment),d=O(),y&&y.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(o,"class","col-lg-6"),p(f,"class","col-lg-12"),p(e,"class","grid")},m(b,v){w(b,e,v),m(e,t),m(e,i),m(e,s),V(l,s,null),m(e,r),m(e,o),V(a,o,null),m(e,u),m(e,f),V(c,f,null),m(e,d),y&&y.m(e,null),g=!0},p(b,v){const S={};v&2&&(S.name=b[1]+".clientId"),v&12582913&&(S.$$scope={dirty:v,ctx:b}),l.$set(S);const C={};v&2&&(C.name=b[1]+".clientSecret"),v&12582913&&(C.$$scope={dirty:v,ctx:b}),a.$set(C);const M={};v&2&&(M.name=b[1]+".allowRegistrations"),v&12582913&&(M.$$scope={dirty:v,ctx:b}),c.$set(M),b[4]?y?(y.p(b,v),v&16&&E(y,1)):(y=Tg(b),y.c(),E(y,1),y.m(e,null)):y&&(Te(),F(y,1,1,()=>{y=null}),De())},i(b){g||(E(l.$$.fragment,b),E(a.$$.fragment,b),E(c.$$.fragment,b),E(y),b&&Dt(()=>{h||(h=ft(e,un,{duration:200},!0)),h.run(1)}),g=!0)},o(b){F(l.$$.fragment,b),F(a.$$.fragment,b),F(c.$$.fragment,b),F(y),b&&(h||(h=ft(e,un,{duration:200},!1)),h.run(0)),g=!1},d(b){b&&k(e),z(l),z(a),z(c),y&&y.d(),b&&h&&h.end()}}}function iP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Client ID"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].clientId),o||(a=X(l,"input",n[12]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].clientId&&$e(l,u[0].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function sP(n){let e,t,i,s,l,r,o;function a(f){n[13](f)}let u={id:n[22],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new mf({props:u}),he.push(()=>Fe(l,"value",a)),{c(){e=_("label"),t=H("Client Secret"),s=O(),B(l.$$.fragment),p(e,"for",i=n[22])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),o=!0},p(f,c){(!o||c&4194304&&i!==(i=f[22]))&&p(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!r&&c&1&&(r=!0,d.value=f[0].clientSecret,Re(()=>r=!1)),l.$set(d)},i(f){o||(E(l.$$.fragment,f),o=!0)},o(f){F(l.$$.fragment,f),o=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function lP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("input"),i=O(),s=_("label"),l=H("Allow registration for new users"),p(e,"type","checkbox"),p(e,"id",t=n[22]),p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].allowRegistrations,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[14]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].allowRegistrations),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Tg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;return r=new He({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[rP,({uniqueId:g})=>({22:g}),({uniqueId:g})=>g?4194304:0]},$$scope:{ctx:n}}}),u=new He({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[oP,({uniqueId:g})=>({22:g}),({uniqueId:g})=>g?4194304:0]},$$scope:{ctx:n}}}),d=new He({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[aP,({uniqueId:g})=>({22:g}),({uniqueId:g})=>g?4194304:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),t.textContent="Optional endpoints (if you self host the OAUTH2 service)",i=O(),s=_("div"),l=_("div"),B(r.$$.fragment),o=O(),a=_("div"),B(u.$$.fragment),f=O(),c=_("div"),B(d.$$.fragment),p(t,"class","section-title"),p(l,"class","col-lg-4"),p(a,"class","col-lg-4"),p(c,"class","col-lg-4"),p(s,"class","grid"),p(e,"class","col-lg-12")},m(g,y){w(g,e,y),m(e,t),m(e,i),m(e,s),m(s,l),V(r,l,null),m(s,o),m(s,a),V(u,a,null),m(s,f),m(s,c),V(d,c,null),h=!0},p(g,y){const b={};y&2&&(b.name=g[1]+".authUrl"),y&12582913&&(b.$$scope={dirty:y,ctx:g}),r.$set(b);const v={};y&2&&(v.name=g[1]+".tokenUrl"),y&12582913&&(v.$$scope={dirty:y,ctx:g}),u.$set(v);const S={};y&2&&(S.name=g[1]+".userApiUrl"),y&12582913&&(S.$$scope={dirty:y,ctx:g}),d.$set(S)},i(g){h||(E(r.$$.fragment,g),E(u.$$.fragment,g),E(d.$$.fragment,g),h=!0)},o(g){F(r.$$.fragment,g),F(u.$$.fragment,g),F(d.$$.fragment,g),h=!1},d(g){g&&k(e),z(r),z(u),z(d)}}}function rP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Custom Auth URL"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","url"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].authUrl),o||(a=X(l,"input",n[15]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&$e(l,u[0].authUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function oP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Custom Token URL"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].tokenUrl),o||(a=X(l,"input",n[16]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].tokenUrl&&$e(l,u[0].tokenUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function aP(n){let e,t,i,s,l,r,o,a;return{c(){e=_("label"),t=H("Custom User API URL"),s=O(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].userApiUrl),o||(a=X(l,"input",n[17]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].userApiUrl&&$e(l,u[0].userApiUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function uP(n){let e,t,i,s;e=new He({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[nP,({uniqueId:r})=>({22:r}),({uniqueId:r})=>r?4194304:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&Og(n);return{c(){B(e.$$.fragment),t=O(),l&&l.c(),i=rt()},m(r,o){V(e,r,o),w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){const a={};o&2&&(a.name=r[1]+".enabled"),o&12582913&&(a.$$scope={dirty:o,ctx:r}),e.$set(a),r[0].enabled?l?(l.p(r,o),o&1&&E(l,1)):(l=Og(r),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(Te(),F(l,1,1,()=>{l=null}),De())},i(r){s||(E(e.$$.fragment,r),E(l),s=!0)},o(r){F(e.$$.fragment,r),F(l),s=!1},d(r){z(e,r),r&&k(t),l&&l.d(r),r&&k(i)}}}function Dg(n){let e;return{c(){e=_("i"),p(e,"class",n[3])},m(t,i){w(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&k(e)}}}function fP(n){let e;return{c(){e=_("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function cP(n){let e;return{c(){e=_("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ag(n){let e,t,i,s,l,r;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=St.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){s||(Dt(()=>{i||(i=ft(e,Un,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){i||(i=ft(e,Un,{duration:150,start:.7},!1)),i.run(0),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function dP(n){let e,t,i,s,l,r,o,a,u,f,c=n[3]&&Dg(n);function d(b,v){return b[0].enabled?cP:fP}let h=d(n),g=h(n),y=n[6]&&Ag();return{c(){e=_("div"),c&&c.c(),t=O(),i=_("span"),s=H(n[2]),l=O(),g.c(),r=O(),o=_("div"),a=O(),y&&y.c(),u=rt(),p(i,"class","txt"),p(e,"class","inline-flex"),p(o,"class","flex-fill")},m(b,v){w(b,e,v),c&&c.m(e,null),m(e,t),m(e,i),m(i,s),w(b,l,v),g.m(b,v),w(b,r,v),w(b,o,v),w(b,a,v),y&&y.m(b,v),w(b,u,v),f=!0},p(b,v){b[3]?c?c.p(b,v):(c=Dg(b),c.c(),c.m(e,t)):c&&(c.d(1),c=null),(!f||v&4)&&_e(s,b[2]),h!==(h=d(b))&&(g.d(1),g=h(b),g&&(g.c(),g.m(r.parentNode,r))),b[6]?y?v&64&&E(y,1):(y=Ag(),y.c(),E(y,1),y.m(u.parentNode,u)):y&&(Te(),F(y,1,1,()=>{y=null}),De())},i(b){f||(E(y),f=!0)},o(b){F(y),f=!1},d(b){b&&k(e),c&&c.d(),b&&k(l),g.d(b),b&&k(r),b&&k(o),b&&k(a),y&&y.d(b),b&&k(u)}}}function pP(n){let e,t;const i=[n[7]];let s={$$slots:{header:[dP],default:[uP]},$$scope:{ctx:n}};for(let l=0;lt(10,r=L));let{key:o}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{showSelfHostedFields:c=!1}=e,d;function h(){d==null||d.expand()}function g(){d==null||d.collapse()}function y(){f.enabled=this.checked,t(0,f)}function b(){f.clientId=this.value,t(0,f)}function v(L){n.$$.not_equal(f.clientSecret,L)&&(f.clientSecret=L,t(0,f))}function S(){f.allowRegistrations=this.checked,t(0,f)}function C(){f.authUrl=this.value,t(0,f)}function M(){f.tokenUrl=this.value,t(0,f)}function $(){f.userApiUrl=this.value,t(0,f)}function T(L){he[L?"unshift":"push"](()=>{d=L,t(5,d)})}function A(L){ut.call(this,n,L)}function D(L){ut.call(this,n,L)}function P(L){ut.call(this,n,L)}return n.$$set=L=>{e=ct(ct({},e),ci(L)),t(7,l=Yt(e,s)),"key"in L&&t(1,o=L.key),"title"in L&&t(2,a=L.title),"icon"in L&&t(3,u=L.icon),"config"in L&&t(0,f=L.config),"showSelfHostedFields"in L&&t(4,c=L.showSelfHostedFields)},n.$$.update=()=>{n.$$.dirty&1026&&t(6,i=!U.isEmpty(U.getNestedVal(r,o))),n.$$.dirty&3&&(f.enabled||D0(o))},[f,o,a,u,c,d,i,l,h,g,r,y,b,v,S,C,M,$,T,A,D,P]}class Ir extends Ne{constructor(e){super(),Ie(this,e,hP,pP,Pe,{key:1,title:2,icon:3,config:0,showSelfHostedFields:4,expand:8,collapse:9})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}}function mP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,C,M,$,T,A,D,P;function L(fe){n[8](fe)}let N={single:!0};n[0].emailAuth!==void 0&&(N.config=n[0].emailAuth),t=new tP({props:N}),n[7](t),he.push(()=>Fe(t,"config",L));function R(fe){n[9](fe)}let J={single:!0,key:"googleAuth",title:"Google",icon:"ri-google-line"};n[0].googleAuth!==void 0&&(J.config=n[0].googleAuth),l=new Ir({props:J}),he.push(()=>Fe(l,"config",R));function W(fe){n[10](fe)}let q={single:!0,key:"facebookAuth",title:"Facebook",icon:"ri-facebook-line"};n[0].facebookAuth!==void 0&&(q.config=n[0].facebookAuth),a=new Ir({props:q}),he.push(()=>Fe(a,"config",W));function x(fe){n[11](fe)}let K={single:!0,key:"githubAuth",title:"GitHub",icon:"ri-github-line"};n[0].githubAuth!==void 0&&(K.config=n[0].githubAuth),c=new Ir({props:K}),he.push(()=>Fe(c,"config",x));function Y(fe){n[12](fe)}let te={single:!0,key:"gitlabAuth",title:"GitLab",icon:"ri-gitlab-line",showSelfHostedFields:!0};return n[0].gitlabAuth!==void 0&&(te.config=n[0].gitlabAuth),g=new Ir({props:te}),he.push(()=>Fe(g,"config",Y)),{c(){e=_("div"),B(t.$$.fragment),s=O(),B(l.$$.fragment),o=O(),B(a.$$.fragment),f=O(),B(c.$$.fragment),h=O(),B(g.$$.fragment),b=O(),v=_("div"),S=_("div"),C=O(),M=_("button"),$=_("span"),$.textContent="Save changes",p(e,"class","accordions"),p(S,"class","flex-fill"),p($,"class","txt"),p(M,"type","submit"),p(M,"class","btn btn-expanded"),M.disabled=T=!n[4]||n[3],ne(M,"btn-loading",n[3]),p(v,"class","flex m-t-base")},m(fe,ye){w(fe,e,ye),V(t,e,null),m(e,s),V(l,e,null),m(e,o),V(a,e,null),m(e,f),V(c,e,null),m(e,h),V(g,e,null),w(fe,b,ye),w(fe,v,ye),m(v,S),m(v,C),m(v,M),m(M,$),A=!0,D||(P=X(M,"click",n[13]),D=!0)},p(fe,ye){const se={};!i&&ye&1&&(i=!0,se.config=fe[0].emailAuth,Re(()=>i=!1)),t.$set(se);const G={};!r&&ye&1&&(r=!0,G.config=fe[0].googleAuth,Re(()=>r=!1)),l.$set(G);const Oe={};!u&&ye&1&&(u=!0,Oe.config=fe[0].facebookAuth,Re(()=>u=!1)),a.$set(Oe);const ee={};!d&&ye&1&&(d=!0,ee.config=fe[0].githubAuth,Re(()=>d=!1)),c.$set(ee);const be={};!y&&ye&1&&(y=!0,be.config=fe[0].gitlabAuth,Re(()=>y=!1)),g.$set(be),(!A||ye&24&&T!==(T=!fe[4]||fe[3]))&&(M.disabled=T),ye&8&&ne(M,"btn-loading",fe[3])},i(fe){A||(E(t.$$.fragment,fe),E(l.$$.fragment,fe),E(a.$$.fragment,fe),E(c.$$.fragment,fe),E(g.$$.fragment,fe),A=!0)},o(fe){F(t.$$.fragment,fe),F(l.$$.fragment,fe),F(a.$$.fragment,fe),F(c.$$.fragment,fe),F(g.$$.fragment,fe),A=!1},d(fe){fe&&k(e),n[7](null),z(t),z(l),z(a),z(c),z(g),fe&&k(b),fe&&k(v),D=!1,P()}}}function gP(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:re,i:re,o:re,d(t){t&&k(e)}}}function _P(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new Qs({});const y=[gP,mP],b=[];function v(S,C){return S[2]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=``,l=O(),r=_("div"),o=_("form"),a=_("h6"),a.textContent="Manage the allowed users sign-in/sign-up methods.",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,C){V(e,S,C),w(S,t,C),w(S,i,C),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=X(o,"submit",Jt(n[5])),h=!0)},p(S,[C]){let M=f;f=v(S),f===M?b[f].p(S,C):(Te(),F(b[M],1,1,()=>{b[M]=null}),De(),c=b[f],c?c.p(S,C):(c=b[f]=y[f](S),c.c()),E(c,1),c.m(o,null))},i(S){d||(E(e.$$.fragment,S),E(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function bP(n,e,t){let i,s,l={},r=!1,o=!1,a="";U.setDocumentTitle("Auth providers"),u();async function u(){t(2,r=!0);try{const C=await Se.Settings.getAll()||{};c(C)}catch(C){Se.errorResponseHandler(C)}t(2,r=!1)}async function f(){if(!(o||!i)){t(3,o=!0);try{const C=await Se.Settings.update(U.filterRedactedProps(l));c(C),Wi({}),s==null||s.collapseSiblings(),hn("Successfully updated auth providers.")}catch(C){Se.errorResponseHandler(C)}t(3,o=!1)}}function c(C){C=C||{},t(0,l={}),t(0,l.emailAuth=Object.assign({enabled:!0},C.emailAuth),l);const M=["googleAuth","facebookAuth","githubAuth","gitlabAuth"];for(const $ of M)t(0,l[$]=Object.assign({enabled:!1,allowRegistrations:!0},C[$]),l);t(6,a=JSON.stringify(l))}function d(C){he[C?"unshift":"push"](()=>{s=C,t(1,s)})}function h(C){n.$$.not_equal(l.emailAuth,C)&&(l.emailAuth=C,t(0,l))}function g(C){n.$$.not_equal(l.googleAuth,C)&&(l.googleAuth=C,t(0,l))}function y(C){n.$$.not_equal(l.facebookAuth,C)&&(l.facebookAuth=C,t(0,l))}function b(C){n.$$.not_equal(l.githubAuth,C)&&(l.githubAuth=C,t(0,l))}function v(C){n.$$.not_equal(l.gitlabAuth,C)&&(l.gitlabAuth=C,t(0,l))}const S=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(4,i=a!=JSON.stringify(l))},[l,s,r,o,i,f,a,d,h,g,y,b,v,S]}class yP extends Ne{constructor(e){super(),Ie(this,e,bP,_P,Pe,{})}}function Eg(n,e,t){const i=n.slice();return i[12]=e[t],i[13]=e,i[14]=t,i}function vP(n){let e=[],t=new Map,i,s,l,r,o,a,u,f,c,d,h=n[4];const g=y=>y[12].key;for(let y=0;y({15:l}),({uniqueId:l})=>l?32768:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=rt(),B(i.$$.fragment),this.first=t},m(l,r){w(l,t,r),V(i,l,r),s=!0},p(l,r){e=l;const o={};r&98305&&(o.$$scope={dirty:r,ctx:e}),i.$set(o)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){F(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function SP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;e=new Qs({});const y=[kP,vP],b=[];function v(S,C){return S[1]?0:1}return f=v(n),c=b[f]=y[f](n),{c(){B(e.$$.fragment),t=O(),i=_("main"),s=_("header"),s.innerHTML=``,l=O(),r=_("div"),o=_("form"),a=_("div"),a.innerHTML="

Adjust common token options.

",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content m-b-sm txt-xl"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,C){V(e,S,C),w(S,t,C),w(S,i,C),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=X(o,"submit",Jt(n[5])),h=!0)},p(S,[C]){let M=f;f=v(S),f===M?b[f].p(S,C):(Te(),F(b[M],1,1,()=>{b[M]=null}),De(),c=b[f],c?c.p(S,C):(c=b[f]=y[f](S),c.c()),E(c,1),c.m(o,null))},i(S){d||(E(e.$$.fragment,S),E(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function CP(n,e,t){let i;const s=[{key:"userAuthToken",label:"Users auth token"},{key:"userVerificationToken",label:"Users email verification token"},{key:"userPasswordResetToken",label:"Users password reset token"},{key:"userEmailChangeToken",label:"Users email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];let l={},r=!1,o=!1,a="";U.setDocumentTitle("Token options"),u();async function u(){t(1,r=!0);try{const y=await Se.Settings.getAll()||{};c(y)}catch(y){Se.errorResponseHandler(y)}t(1,r=!1)}async function f(){if(!(o||!i)){t(2,o=!0);try{const y=await Se.Settings.update(U.filterRedactedProps(l));c(y),hn("Successfully saved tokens options.")}catch(y){Se.errorResponseHandler(y)}t(2,o=!1)}}function c(y){var b;y=y||{},t(0,l={});for(const v of s)t(0,l[v.key]={duration:((b=y[v.key])==null?void 0:b.duration)||0},l);t(6,a=JSON.stringify(l))}function d(y){l[y.key].duration=Tt(this.value),t(0,l)}const h=y=>{l[y.key].secret?(delete l[y.key].secret,t(0,l)):t(0,l[y.key].secret=U.randomString(50),l)},g=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(3,i=a!=JSON.stringify(l))},[l,r,o,i,s,f,a,d,h,g]}class MP extends Ne{constructor(e){super(),Ie(this,e,CP,SP,Pe,{})}}const $P={"/_elements":Zt({asyncComponent:()=>bi(()=>import("./Elements.6ae71f5f.js"),[])}),"/login":Zt({component:lE,conditions:[n=>!Se.AuthStore.isValid]}),"/request-password-reset":Zt({asyncComponent:()=>bi(()=>import("./PageAdminRequestPasswordReset.85272c89.js"),[]),conditions:[n=>!Se.AuthStore.isValid]}),"/confirm-password-reset/:token":Zt({asyncComponent:()=>bi(()=>import("./PageAdminConfirmPasswordReset.3443acd2.js"),[]),conditions:[n=>!Se.AuthStore.isValid]}),"/collections":Zt({component:sA,conditions:[n=>Se.AuthStore.isValid]}),"/logs":Zt({component:m4,conditions:[n=>Se.AuthStore.isValid]}),"/users":Zt({component:TA,conditions:[n=>Se.AuthStore.isValid]}),"/users/confirm-password-reset/:token":Zt({asyncComponent:()=>bi(()=>import("./PageUserConfirmPasswordReset.d7dcb527.js"),[]),conditions:[()=>(Se.logout(!1),!0)]}),"/users/confirm-verification/:token":Zt({asyncComponent:()=>bi(()=>import("./PageUserConfirmVerification.08b3f8a7.js"),[]),conditions:[()=>(Se.logout(!1),!0)]}),"/users/confirm-email-change/:token":Zt({asyncComponent:()=>bi(()=>import("./PageUserConfirmEmailChange.fa09e84a.js"),[]),conditions:[()=>(Se.logout(!1),!0)]}),"/settings":Zt({component:pE,conditions:[n=>Se.AuthStore.isValid]}),"/settings/admins":Zt({component:GA,conditions:[n=>Se.AuthStore.isValid]}),"/settings/mail":Zt({component:LE,conditions:[n=>Se.AuthStore.isValid]}),"/settings/storage":Zt({component:UE,conditions:[n=>Se.AuthStore.isValid]}),"/settings/auth-providers":Zt({component:yP,conditions:[n=>Se.AuthStore.isValid]}),"/settings/tokens":Zt({component:MP,conditions:[n=>Se.AuthStore.isValid]}),"*":Zt({asyncComponent:()=>bi(()=>import("./NotFoundPage.20ca3d22.js"),[])})};function OP(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[r,o]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*r/t.width-(t.left+r),u=e.top+e.height*o/t.height-(t.top+o),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=To}=i;return{delay:f,duration:Kn(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,g)=>{const y=g*a,b=g*u,v=h+g*e.width/t.width,S=h+g*e.height/t.height;return`transform: ${l} translate(${y}px, ${b}px) scale(${v}, ${S});`}}}function Lg(n,e,t){const i=n.slice();return i[2]=e[t],i}function TP(n){let e;return{c(){e=_("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function DP(n){let e;return{c(){e=_("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function AP(n){let e;return{c(){e=_("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Fg(n,e){let t,i,s,l,r=e[2].message+"",o,a,u,f,c,d,h=re,g,y,b;function v($,T){return $[2].type==="info"?AP:$[2].type==="success"?DP:TP}let S=v(e),C=S(e);function M(){return e[1](e[2])}return{key:n,first:null,c(){t=_("div"),i=_("div"),C.c(),s=O(),l=_("div"),o=H(r),a=O(),u=_("div"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"class","close"),p(t,"class","alert txt-break"),ne(t,"alert-info",e[2].type=="info"),ne(t,"alert-success",e[2].type=="success"),ne(t,"alert-danger",e[2].type=="error"),ne(t,"alert-warning",e[2].type=="warning"),this.first=t},m($,T){w($,t,T),m(t,i),C.m(i,null),m(t,s),m(t,l),m(l,o),m(t,a),m(t,u),m(t,f),g=!0,y||(b=X(u,"click",Jt(M)),y=!0)},p($,T){e=$,S!==(S=v(e))&&(C.d(1),C=S(e),C&&(C.c(),C.m(i,null))),(!g||T&1)&&r!==(r=e[2].message+"")&&_e(o,r),T&1&&ne(t,"alert-info",e[2].type=="info"),T&1&&ne(t,"alert-success",e[2].type=="success"),T&1&&ne(t,"alert-danger",e[2].type=="error"),T&1&&ne(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){Wb(t),h(),Wg(t,d)},a(){h(),h=Ub(t,d,OP,{duration:150})},i($){g||(Dt(()=>{c||(c=ft(t,so,{duration:150},!0)),c.run(1)}),g=!0)},o($){c||(c=ft(t,so,{duration:150},!1)),c.run(0),g=!1},d($){$&&k(t),C.d(),$&&c&&c.end(),y=!1,b()}}}function EP(n){let e,t=[],i=new Map,s,l=n[0];const r=o=>o[2].message;for(let o=0;ot(0,i=l)),[i,l=>O0(l)]}class LP extends Ne{constructor(e){super(),Ie(this,e,PP,EP,Pe,{})}}function FP(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=_("h4"),i=H(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,r){w(l,e,r),m(e,i)},p(l,r){var o;r&2&&t!==(t=((o=l[1])==null?void 0:o.text)+"")&&_e(i,t)},d(l){l&&k(e)}}}function IP(n){let e,t,i,s,l,r,o;return{c(){e=_("button"),t=_("span"),t.textContent="No",i=O(),s=_("button"),l=_("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],ne(s,"btn-loading",n[2])},m(a,u){w(a,e,u),m(e,t),w(a,i,u),w(a,s,u),m(s,l),e.focus(),r||(o=[X(e,"click",n[3]),X(s,"click",n[4])],r=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&ne(s,"btn-loading",a[2])},d(a){a&&k(e),a&&k(i),a&&k(s),r=!1,lt(o)}}}function NP(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[IP],header:[FP]},$$scope:{ctx:n}};return e=new Ti({props:i}),n[5](e),e.$on("hide",n[6]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&4&&(r.overlayClose=!s[2]),l&4&&(r.escClose=!s[2]),l&135&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[5](null),z(e,s)}}}function RP(n,e,t){let i;pn(n,cf,f=>t(1,i=f));let s,l=!1;const r=()=>{i!=null&&i.noCallback&&i.noCallback(),s==null||s.hide()},o=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),s==null||s.hide()};function a(f){he[f?"unshift":"push"](()=>{s=f,t(0,s)})}const u=async()=>{i!=null&&i.noCallback&&i.noCallback(),await Ui(),Tb()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(s==null||s.show())},[s,i,l,r,o,a,u]}class jP extends Ne{constructor(e){super(),Ie(this,e,RP,NP,Pe,{})}}function Ig(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,C,M,$,T,A,D,P,L,N,R,J,W,q,x,K;return W=new bs({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[HP]},$$scope:{ctx:n}}}),{c(){var Y;e=_("aside"),t=_("a"),t.innerHTML='PocketBase logo',s=O(),l=_("nav"),r=_("a"),r.innerHTML='',f=O(),c=_("a"),c.innerHTML='',y=O(),b=_("a"),b.innerHTML='',M=O(),$=_("a"),$.innerHTML='',P=O(),L=_("figure"),N=_("img"),J=O(),B(W.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(r,"href","/collections"),p(r,"class","menu-item"),p(r,"aria-label","Collections"),p(c,"href","/users"),p(c,"class","menu-item"),p(c,"aria-label","Users"),p(b,"href","/logs"),p(b,"class","menu-item"),p(b,"aria-label","Logs"),p($,"href","/settings"),p($,"class","menu-item"),p($,"aria-label","Settings"),p(l,"class","main-menu"),Qn(N.src,R="/_/images/avatars/avatar"+(((Y=n[0])==null?void 0:Y.avatar)||0)+".svg")||p(N,"src",R),p(N,"alt","Avatar"),p(L,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(Y,te){w(Y,e,te),m(e,t),m(e,s),m(e,l),m(l,r),m(l,f),m(l,c),m(l,y),m(l,b),m(l,M),m(l,$),m(e,P),m(e,L),m(L,N),m(L,J),V(W,L,null),q=!0,x||(K=[Xe(i=Mn.call(null,t)),Xe(o=Mn.call(null,r)),Xe(a=ri.call(null,r,{path:"/collections/?.*",className:"current-route"})),Xe(u=St.call(null,r,{text:"Collections",position:"right"})),Xe(d=Mn.call(null,c)),Xe(h=ri.call(null,c,{path:"/users/?.*",className:"current-route"})),Xe(g=St.call(null,c,{text:"Users",position:"right"})),Xe(v=Mn.call(null,b)),Xe(S=ri.call(null,b,{path:"/logs/?.*",className:"current-route"})),Xe(C=St.call(null,b,{text:"Logs",position:"right"})),Xe(T=Mn.call(null,$)),Xe(A=ri.call(null,$,{path:"/settings/?.*",className:"current-route"})),Xe(D=St.call(null,$,{text:"Settings",position:"right"}))],x=!0)},p(Y,te){var ye;(!q||te&1&&!Qn(N.src,R="/_/images/avatars/avatar"+(((ye=Y[0])==null?void 0:ye.avatar)||0)+".svg"))&&p(N,"src",R);const fe={};te&32&&(fe.$$scope={dirty:te,ctx:Y}),W.$set(fe)},i(Y){q||(E(W.$$.fragment,Y),q=!0)},o(Y){F(W.$$.fragment,Y),q=!1},d(Y){Y&&k(e),z(W),x=!1,lt(K)}}}function HP(n){let e,t,i,s,l,r,o;return{c(){e=_("a"),e.innerHTML=` + `,l=O(),r=_("div"),o=_("form"),a=_("div"),a.innerHTML="

Adjust common token options.

",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content m-b-sm txt-xl"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(S,C){V(e,S,C),w(S,t,C),w(S,i,C),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),b[f].m(o,null),d=!0,h||(g=X(o,"submit",Jt(n[5])),h=!0)},p(S,[C]){let M=f;f=v(S),f===M?b[f].p(S,C):(Te(),F(b[M],1,1,()=>{b[M]=null}),De(),c=b[f],c?c.p(S,C):(c=b[f]=y[f](S),c.c()),E(c,1),c.m(o,null))},i(S){d||(E(e.$$.fragment,S),E(c),d=!0)},o(S){F(e.$$.fragment,S),F(c),d=!1},d(S){z(e,S),S&&k(t),S&&k(i),b[f].d(),h=!1,g()}}}function CP(n,e,t){let i;const s=[{key:"userAuthToken",label:"Users auth token"},{key:"userVerificationToken",label:"Users email verification token"},{key:"userPasswordResetToken",label:"Users password reset token"},{key:"userEmailChangeToken",label:"Users email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];let l={},r=!1,o=!1,a="";U.setDocumentTitle("Token options"),u();async function u(){t(1,r=!0);try{const y=await Se.Settings.getAll()||{};c(y)}catch(y){Se.errorResponseHandler(y)}t(1,r=!1)}async function f(){if(!(o||!i)){t(2,o=!0);try{const y=await Se.Settings.update(U.filterRedactedProps(l));c(y),hn("Successfully saved tokens options.")}catch(y){Se.errorResponseHandler(y)}t(2,o=!1)}}function c(y){var b;y=y||{},t(0,l={});for(const v of s)t(0,l[v.key]={duration:((b=y[v.key])==null?void 0:b.duration)||0},l);t(6,a=JSON.stringify(l))}function d(y){l[y.key].duration=Tt(this.value),t(0,l)}const h=y=>{l[y.key].secret?(delete l[y.key].secret,t(0,l)):t(0,l[y.key].secret=U.randomString(50),l)},g=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(3,i=a!=JSON.stringify(l))},[l,r,o,i,s,f,a,d,h,g]}class MP extends Ne{constructor(e){super(),Ie(this,e,CP,SP,Pe,{})}}const $P={"/_elements":Zt({asyncComponent:()=>bi(()=>import("./Elements.2e7d2d27.js"),[])}),"/login":Zt({component:lE,conditions:[n=>!Se.AuthStore.isValid]}),"/request-password-reset":Zt({asyncComponent:()=>bi(()=>import("./PageAdminRequestPasswordReset.43376396.js"),[]),conditions:[n=>!Se.AuthStore.isValid]}),"/confirm-password-reset/:token":Zt({asyncComponent:()=>bi(()=>import("./PageAdminConfirmPasswordReset.af271f63.js"),[]),conditions:[n=>!Se.AuthStore.isValid]}),"/collections":Zt({component:sA,conditions:[n=>Se.AuthStore.isValid]}),"/logs":Zt({component:m4,conditions:[n=>Se.AuthStore.isValid]}),"/users":Zt({component:TA,conditions:[n=>Se.AuthStore.isValid]}),"/users/confirm-password-reset/:token":Zt({asyncComponent:()=>bi(()=>import("./PageUserConfirmPasswordReset.5385bb26.js"),[]),conditions:[()=>(Se.logout(!1),!0)]}),"/users/confirm-verification/:token":Zt({asyncComponent:()=>bi(()=>import("./PageUserConfirmVerification.6d5d72b2.js"),[]),conditions:[()=>(Se.logout(!1),!0)]}),"/users/confirm-email-change/:token":Zt({asyncComponent:()=>bi(()=>import("./PageUserConfirmEmailChange.79b55304.js"),[]),conditions:[()=>(Se.logout(!1),!0)]}),"/settings":Zt({component:pE,conditions:[n=>Se.AuthStore.isValid]}),"/settings/admins":Zt({component:GA,conditions:[n=>Se.AuthStore.isValid]}),"/settings/mail":Zt({component:LE,conditions:[n=>Se.AuthStore.isValid]}),"/settings/storage":Zt({component:UE,conditions:[n=>Se.AuthStore.isValid]}),"/settings/auth-providers":Zt({component:yP,conditions:[n=>Se.AuthStore.isValid]}),"/settings/tokens":Zt({component:MP,conditions:[n=>Se.AuthStore.isValid]}),"*":Zt({asyncComponent:()=>bi(()=>import("./NotFoundPage.880704ae.js"),[])})};function OP(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[r,o]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*r/t.width-(t.left+r),u=e.top+e.height*o/t.height-(t.top+o),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=To}=i;return{delay:f,duration:Kn(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,g)=>{const y=g*a,b=g*u,v=h+g*e.width/t.width,S=h+g*e.height/t.height;return`transform: ${l} translate(${y}px, ${b}px) scale(${v}, ${S});`}}}function Lg(n,e,t){const i=n.slice();return i[2]=e[t],i}function TP(n){let e;return{c(){e=_("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function DP(n){let e;return{c(){e=_("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function AP(n){let e;return{c(){e=_("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Fg(n,e){let t,i,s,l,r=e[2].message+"",o,a,u,f,c,d,h=re,g,y,b;function v($,T){return $[2].type==="info"?AP:$[2].type==="success"?DP:TP}let S=v(e),C=S(e);function M(){return e[1](e[2])}return{key:n,first:null,c(){t=_("div"),i=_("div"),C.c(),s=O(),l=_("div"),o=H(r),a=O(),u=_("div"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"class","close"),p(t,"class","alert txt-break"),ne(t,"alert-info",e[2].type=="info"),ne(t,"alert-success",e[2].type=="success"),ne(t,"alert-danger",e[2].type=="error"),ne(t,"alert-warning",e[2].type=="warning"),this.first=t},m($,T){w($,t,T),m(t,i),C.m(i,null),m(t,s),m(t,l),m(l,o),m(t,a),m(t,u),m(t,f),g=!0,y||(b=X(u,"click",Jt(M)),y=!0)},p($,T){e=$,S!==(S=v(e))&&(C.d(1),C=S(e),C&&(C.c(),C.m(i,null))),(!g||T&1)&&r!==(r=e[2].message+"")&&_e(o,r),T&1&&ne(t,"alert-info",e[2].type=="info"),T&1&&ne(t,"alert-success",e[2].type=="success"),T&1&&ne(t,"alert-danger",e[2].type=="error"),T&1&&ne(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){Wb(t),h(),Wg(t,d)},a(){h(),h=Ub(t,d,OP,{duration:150})},i($){g||(Dt(()=>{c||(c=ft(t,so,{duration:150},!0)),c.run(1)}),g=!0)},o($){c||(c=ft(t,so,{duration:150},!1)),c.run(0),g=!1},d($){$&&k(t),C.d(),$&&c&&c.end(),y=!1,b()}}}function EP(n){let e,t=[],i=new Map,s,l=n[0];const r=o=>o[2].message;for(let o=0;ot(0,i=l)),[i,l=>O0(l)]}class LP extends Ne{constructor(e){super(),Ie(this,e,PP,EP,Pe,{})}}function FP(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=_("h4"),i=H(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,r){w(l,e,r),m(e,i)},p(l,r){var o;r&2&&t!==(t=((o=l[1])==null?void 0:o.text)+"")&&_e(i,t)},d(l){l&&k(e)}}}function IP(n){let e,t,i,s,l,r,o;return{c(){e=_("button"),t=_("span"),t.textContent="No",i=O(),s=_("button"),l=_("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],ne(s,"btn-loading",n[2])},m(a,u){w(a,e,u),m(e,t),w(a,i,u),w(a,s,u),m(s,l),e.focus(),r||(o=[X(e,"click",n[3]),X(s,"click",n[4])],r=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&ne(s,"btn-loading",a[2])},d(a){a&&k(e),a&&k(i),a&&k(s),r=!1,lt(o)}}}function NP(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[IP],header:[FP]},$$scope:{ctx:n}};return e=new Ti({props:i}),n[5](e),e.$on("hide",n[6]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&4&&(r.overlayClose=!s[2]),l&4&&(r.escClose=!s[2]),l&135&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[5](null),z(e,s)}}}function RP(n,e,t){let i;pn(n,cf,f=>t(1,i=f));let s,l=!1;const r=()=>{i!=null&&i.noCallback&&i.noCallback(),s==null||s.hide()},o=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),s==null||s.hide()};function a(f){he[f?"unshift":"push"](()=>{s=f,t(0,s)})}const u=async()=>{i!=null&&i.noCallback&&i.noCallback(),await Ui(),Tb()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(s==null||s.show())},[s,i,l,r,o,a,u]}class jP extends Ne{constructor(e){super(),Ie(this,e,RP,NP,Pe,{})}}function Ig(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,b,v,S,C,M,$,T,A,D,P,L,N,R,J,W,q,x,K;return W=new bs({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[HP]},$$scope:{ctx:n}}}),{c(){var Y;e=_("aside"),t=_("a"),t.innerHTML='PocketBase logo',s=O(),l=_("nav"),r=_("a"),r.innerHTML='',f=O(),c=_("a"),c.innerHTML='',y=O(),b=_("a"),b.innerHTML='',M=O(),$=_("a"),$.innerHTML='',P=O(),L=_("figure"),N=_("img"),J=O(),B(W.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(r,"href","/collections"),p(r,"class","menu-item"),p(r,"aria-label","Collections"),p(c,"href","/users"),p(c,"class","menu-item"),p(c,"aria-label","Users"),p(b,"href","/logs"),p(b,"class","menu-item"),p(b,"aria-label","Logs"),p($,"href","/settings"),p($,"class","menu-item"),p($,"aria-label","Settings"),p(l,"class","main-menu"),Qn(N.src,R="/_/images/avatars/avatar"+(((Y=n[0])==null?void 0:Y.avatar)||0)+".svg")||p(N,"src",R),p(N,"alt","Avatar"),p(L,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(Y,te){w(Y,e,te),m(e,t),m(e,s),m(e,l),m(l,r),m(l,f),m(l,c),m(l,y),m(l,b),m(l,M),m(l,$),m(e,P),m(e,L),m(L,N),m(L,J),V(W,L,null),q=!0,x||(K=[Xe(i=Mn.call(null,t)),Xe(o=Mn.call(null,r)),Xe(a=ri.call(null,r,{path:"/collections/?.*",className:"current-route"})),Xe(u=St.call(null,r,{text:"Collections",position:"right"})),Xe(d=Mn.call(null,c)),Xe(h=ri.call(null,c,{path:"/users/?.*",className:"current-route"})),Xe(g=St.call(null,c,{text:"Users",position:"right"})),Xe(v=Mn.call(null,b)),Xe(S=ri.call(null,b,{path:"/logs/?.*",className:"current-route"})),Xe(C=St.call(null,b,{text:"Logs",position:"right"})),Xe(T=Mn.call(null,$)),Xe(A=ri.call(null,$,{path:"/settings/?.*",className:"current-route"})),Xe(D=St.call(null,$,{text:"Settings",position:"right"}))],x=!0)},p(Y,te){var ye;(!q||te&1&&!Qn(N.src,R="/_/images/avatars/avatar"+(((ye=Y[0])==null?void 0:ye.avatar)||0)+".svg"))&&p(N,"src",R);const fe={};te&32&&(fe.$$scope={dirty:te,ctx:Y}),W.$set(fe)},i(Y){q||(E(W.$$.fragment,Y),q=!0)},o(Y){F(W.$$.fragment,Y),q=!1},d(Y){Y&&k(e),z(W),x=!1,lt(K)}}}function HP(n){let e,t,i,s,l,r,o;return{c(){e=_("a"),e.innerHTML=` Manage admins`,t=O(),i=_("hr"),s=O(),l=_("div"),l.innerHTML=` Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),r||(o=[Xe(Mn.call(null,e)),X(l,"click",n[3])],r=!0)},p:re,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),r=!1,lt(o)}}}function qP(n){var c;let e,t,i,s,l,r,o,a,u,f=((c=n[0])==null?void 0:c.id)&&Ig(n);return s=new n1({props:{routes:$P}}),s.$on("routeLoading",n[1]),s.$on("conditionsFailed",n[2]),r=new LP({}),a=new jP({}),{c(){e=_("div"),f&&f.c(),t=O(),i=_("div"),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment),p(i,"class","app-body"),p(e,"class","app-layout")},m(d,h){w(d,e,h),f&&f.m(e,null),m(e,t),m(e,i),V(s,i,null),w(d,l,h),V(r,d,h),w(d,o,h),V(a,d,h),u=!0},p(d,[h]){var g;(g=d[0])!=null&&g.id?f?(f.p(d,h),h&1&&E(f,1)):(f=Ig(d),f.c(),E(f,1),f.m(e,t)):f&&(Te(),F(f,1,1,()=>{f=null}),De())},i(d){u||(E(f),E(s.$$.fragment,d),E(r.$$.fragment,d),E(a.$$.fragment,d),u=!0)},o(d){F(f),F(s.$$.fragment,d),F(r.$$.fragment,d),F(a.$$.fragment,d),u=!1},d(d){d&&k(e),f&&f.d(),z(s),d&&k(l),z(r,d),d&&k(o),z(a,d)}}}function VP(n,e,t){let i;pn(n,Vu,a=>t(0,i=a));let s;function l(a){var u,f;((u=a==null?void 0:a.detail)==null?void 0:u.location)!==s&&(s=(f=a==null?void 0:a.detail)==null?void 0:f.location,U.setDocumentTitle(""),Wi({}),Tb())}function r(){Se.AuthStore.isValid?So("/"):Se.logout()}function o(){Se.logout()}return[i,l,r,o]}class zP extends Ne{constructor(e){super(),Ie(this,e,VP,qP,Pe,{})}}new zP({target:document.getElementById("app")});export{ne as A,X as B,Jt as C,H as D,_e as E,QA as F,$e as G,U as H,lt as I,hn as J,So as K,rt as L,pn as M,Ks as N,ys as O,vn as P,Pn as Q,di as R,Ne as S,Ti as a,he as b,Fe as c,O as d,_ as e,B as f,p as g,w as h,Ie as i,m as j,Xe as k,Re as l,V as m,E as n,F as o,k as p,z as q,BP as r,Pe as s,St as t,re as u,Mn as v,Te as w,De as x,Se as y,He as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index d61dbdde..6f197518 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -20,7 +20,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/src/components/records/fields/NumberField.svelte b/ui/src/components/records/fields/NumberField.svelte index 694e97a9..0fa0c16d 100644 --- a/ui/src/components/records/fields/NumberField.svelte +++ b/ui/src/components/records/fields/NumberField.svelte @@ -18,6 +18,7 @@ required={field.required} min={field.options?.min} max={field.options?.max} + step="1" bind:value />