mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-06 06:21:44 +02:00
updated ui/dist
This commit is contained in:
1 parent
f8f785d6e3
commit
c346dd69a4
10 files changed
+649
-647
No files matched your search
+7
-7
@@ -1,12 +1,12 @@
|
||||
import{S as ka,i as Sa,s as va,e as Ca,f as Aa,g as Ma,y as Sn,o as Da,G as Oa,H as Ta,I as Ba,P as Ra,J as La,C as vn,K as Pa}from"./index.6e74b406.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=Ea(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 Ia(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(ar(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,ar(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 ka,i as Sa,s as va,e as Ca,f as Aa,g as Ma,y as Sn,o as Da,G as Oa,H as Ta,I as Ba,J as La,K as Ra,C as vn,L as Pa}from"./index.42f4af63.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=Ea(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 Ia(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(ar(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,ar(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&&o<this.text.length;o++){let l=this.text[o],h=r+l.length;r>e&&o&&(s+=i),e<h&&t>r&&(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<this.children.length;r++){let l=this.children[r],h=o+l.length;if(e<=h&&t>=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<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines<a>>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;r<this.children.length&&o<=t;r++){let l=this.children[r],h=o+l.length;o>e&&r&&(s+=i),e<h&&t>o&&(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 Ea(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<n.length&&s<=i;r++){let l=n[r],h=s+l.length;h>=t&&(h>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=h+1}return e}function ar(n,e,t){return Pi(n,[""],e,t)}class Zt{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?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<"u"&&(z.prototype[Symbol.iterator]=function(){return this.iter()},Zt.prototype[Symbol.iterator]=zo.prototype[Symbol.iterator]=qo.prototype[Symbol.iterator]=function(){return this});class Ia{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;n<Dt.length;n++)Dt[n]+=Dt[n-1];function Na(n){for(let e=1;e<Dt.length;e+=2)if(Dt[e]>n)return Dt[e-1]<=n;return!1}function cr(n){return n>=127462&&n<=127487}const fr=8205;function Ae(n,e,t=!0,i=!0){return(t?Ko:Va)(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<n.length;){let s=re(n,e);if(i==fr||s==fr||t&&Na(s))e+=ve(s),i=s;else if(cr(s)){let r=0,o=e-2;for(;o>=0&&cr(re(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Va(n,e,t){for(;e>0;){let i=Ko(n,e-2,t);if(i<e)return i;e--}return 0}function Uo(n){return n>=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 Ls(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 jn=/\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 He{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){Gn(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s
Line truncated
|
||||
`,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<"u"&&(z.prototype[Symbol.iterator]=function(){return this.iter()},Zt.prototype[Symbol.iterator]=zo.prototype[Symbol.iterator]=qo.prototype[Symbol.iterator]=function(){return this});class Ia{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;n<Dt.length;n++)Dt[n]+=Dt[n-1];function Na(n){for(let e=1;e<Dt.length;e+=2)if(Dt[e]>n)return Dt[e-1]<=n;return!1}function cr(n){return n>=127462&&n<=127487}const fr=8205;function Ae(n,e,t=!0,i=!0){return(t?Ko:Va)(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<n.length;){let s=re(n,e);if(i==fr||s==fr||t&&Na(s))e+=ve(s),i=s;else if(cr(s)){let r=0,o=e-2;for(;o>=0&&cr(re(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Va(n,e,t){for(;e>0;){let i=Ko(n,e-2,t);if(i<e)return i;e--}return 0}function Uo(n){return n>=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 jn=/\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 He{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){Gn(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s
Line truncated
|
||||
`}get readOnly(){return this.facet(tl)}phrase(e,...t){for(let i of this.facet(V.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(_o))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return $a(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let h=Ae(t,o,!1);if(r(t.slice(h,o))!=ce.Word)break;o=h}for(;l<s;){let h=Ae(t,l);if(r(t.slice(l,h))!=ce.Word)break;l=h}return o==l?null:m.range(o+i,l+i)}}V.allowMultipleSelections=Xo;V.tabSize=T.define({combine:n=>n.length?n[0]:4});V.lineSeparator=Yo;V.readOnly=tl;V.phrases=T.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});V.languageData=_o;V.changeFilter=Qo;V.transactionFilter=Zo;V.transactionExtender=el;Qe.reconfigure=W.define();function zt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class gt{eq(e){return this==e}range(e,t=e){return ri.create(e,t,this)}}gt.prototype.startSide=gt.prototype.endSide=0;gt.prototype.point=!1;gt.prototype.mapMode=me.TrackDel;class ri{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new ri(e,t,i)}}function Qn(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Is{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let h=o+l>>1,a=r[h]-e||(i?this.value[h].endSide:this.value[h].startSide)-t;if(h==o)return a>=0?o:l;a>=0?l=h:o=h+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let i=[],s=[],r=[],o=-1,l=-1;for(let h=0;h<this.value.length;h++){let a=this.value[h],c=this.from[h]+e,f=this.to[h]+e,u,d;if(c==f){let p=t.mapPos(c,a.startSide,a.mapMode);if(p==null||(u=d=p,a.startSide!=a.endSide&&(d=t.mapPos(c,a.endSide),d<u)))continue}else if(u=t.mapPos(c,a.startSide),d=t.mapPos(f,a.endSide),u>d||u==d&&a.startSide>0&&a.endSide<=0)continue;(d-u||a.endSide-a.startSide)<0||(o<0&&(o=u),a.point&&(l=Math.max(l,d-u)),i.push(a),s.push(u-o),r.push(d-o))}return{mapped:i.length?new Is(s,r,i,l):null,pos:o}}}class X{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new X(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Qn)),this.isEmpty)return t.length?X.of(t):this;let l=new sl(this,null,-1).goto(0),h=0,a=[],c=new mt;for(;l.value||h<t.length;)if(h<t.length&&(l.from-t[h].from||l.startSide-t[h].value.startSide)>=0){let f=t[h++];c.addInner(f.from,f.to,f.value)||a.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(h==t.length||this.chunkEnd(l.chunkIndex)<t[h].from)&&(!o||s>this.chunkEnd(l.chunkIndex)||r<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||s>l.to||r<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||a.push(ri.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!a.length?X.empty:this.nextLayer.update({add:a,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],h=this.chunk[o],a=e.touchesRange(l,l+h.length);if(a===!1)s=Math.max(s,h.maxPoint),t.push(h),i.push(e.mapPos(l));else if(a===!0){let{mapped:c,pos:f}=h.map(l,e);c&&(s=Math.max(s,c.maxPoint),t.push(c),i.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new X(i,t,r||X.empty,s)}between(e,t,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return oi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return oi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),h=pr(o,l,i),a=new Ut(o,h,r),c=new Ut(l
Line truncated
|
||||
`)}static newName(){let e=br[yr]||1;return br[yr]=e+1,ts+e.toString(36)}static mount(e,t){(e[is]||new Xa(e)).mount(Array.isArray(t)?t:[t])}}let wi=null;class Xa{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(wi)return e.adoptedStyleSheets=[wi.sheet].concat(e.adoptedStyleSheets),e[is]=wi;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),wi=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[is]=this}mount(e){let t=this.sheet,i=0,s=0;for(let r=0;r<e.length;r++){let o=e[r],l=this.modules.indexOf(o);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),t)for(let h=0;h<o.rules.length;h++)t.insertRule(o.rules[h],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=o.rules.length,s++}}if(!t){let r="";for(let o=0;o<this.modules.length;o++)r+=this.modules[o].getRules()+`
|
||||
`;this.styleTag.textContent=r}}}var ot={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Rt={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},wr=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent);typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent);var Ya=typeof navigator<"u"&&/Mac/.test(navigator.platform),Qa=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Za=Ya||wr&&+wr[1]<57;for(var oe=0;oe<10;oe++)ot[48+oe]=ot[96+oe]=String(oe);for(var oe=1;oe<=24;oe++)ot[oe+111]="F"+oe;for(var oe=65;oe<=90;oe++)ot[oe]=String.fromCharCode(oe+32),Rt[oe]=String.fromCharCode(oe);for(var An in ot)Rt.hasOwnProperty(An)||(Rt[An]=ot[An]);function ec(n){var e=Za&&(n.ctrlKey||n.altKey||n.metaKey)||Qa&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Rt:ot)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function zi(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Lt(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function tc(){let n=document.activeElement;for(;n&&n.shadowRoot;)n=n.shadowRoot.activeElement;return n}function Ii(n,e){if(!e.anchorNode)return!1;try{return Lt(n,e.anchorNode)}catch{return!1}}function li(n){return n.nodeType==3?Pt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function qi(n,e,t,i){return t?xr(n,e,t,i,-1)||xr(n,e,t,i,1):!1}function Ki(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function xr(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:hi(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=Ki(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?hi(n):0}else return!1}}function hi(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}const rl={left:0,right:0,top:0,bottom:0};function hn(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function ic(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function nc(n,e,t,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView;for(let c=n;c;)if(c.nodeType==1){let f,u=c==h.body;if(u)f=ic(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let d=0,p=0;if(s=="nearest")e.top<f.top?(p=-(f.top-e.top+o),t>0&&e.bottom>f.bottom+p&&(p=e.bottom-f.bottom+p+o)):e.bottom>f.bottom&&(p=e.bottom-f.bottom+o,t<0&&e.top-p<f.top&&(p=-(f.top+p-e.top+o)));else{let g=e.bottom-e.top,y=f.bottom-f.top;p=(s=="center"&&g<=y?e.top+g/2-y/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-y+o)-f.top}if(i=="nearest"?e.left<f.left?(d=-(f.left-e.left+r),t>0&&e.right>f.right+d&&(d=e.right-f.right+d+r)):e.right>f.right&&(d=e.right-f.right+r,t<0&&e.left<f.left+d&&(d=-(f.left+d-e.left+r))):d=(i=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:i=="start"==l?e.left-r:e.right-(f.right-f.left)+r)-f.left,d||p)if(u)a.scrollBy(d,p);else{if(p){let g=c.scrollTop;c.scrollTop+=p,p=c.scrollTop-g}if(d){let g=c.scrollLeft;c.scrollLeft+=d,d=c.scrollLeft-g}e={left:e.left-d,top:e.top-p,right:e.right-d,bottom:e.bottom-p}}if(u)break;c=c.assignedSlot||c.parentNode,i=s="nearest"}else if(c.nodeType==11)c=c.host;else break}class sc{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Ct=null;function ol(n){if(n.setActive)return n.setActive();if(Ct)return n.focus(Ct);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ct==null?{get preventScroll(){return Ct={preventScroll:!0},!0}}:void 0),!Ct){Ct=!1;for(let t=0;t<e.length;){let i=e[t++],s=e[t++],r=e[t++];i.scrollTop!=s&&(i.scrollTop=s),i.scrollLeft!=r&&(i.scrollLeft=r)}}}let kr;function Pt(n,e,tLine truncated
|
||||
`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),a=m.cursor(t?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function Rc(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==ce.Space&&(s=o),s==o}}function Lc(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return m.cursor(s,e.assoc);let o=e.goalColumn,l,h=n.contentDOM.getBoundingClientRect(),a=n.coordsAtPos(s),c=n.documentTop;if(a)o==null&&(o=a.left-h.left),l=r<0?a.top:a.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(h.right-h.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=h.left+o,u=i!=null?i:n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=Il(n,{x:f,y:p},!1,r);if(p<h.top||p>h.bottom||(r<0?g<s:g>s))return m.cursor(g,e.assoc,void 0,o)}}function Tn(n,e,t){let i=n.state.facet(Dl).map(s=>s(n));for(;;){let s=!1;for(let r of i)r.between(t.from-1,t.from+1,(o,l,h)=>{t.from>o&&t.from<l&&(t=e.from>t.from?m.cursor(o,1):m.cursor(l,-1),s=!0)});if(!s)return t}}class Pc{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let t in ie){let i=ie[t];e.contentDOM.addEventListener(t,s=>{!Vr(e,s)||this.ignoreDuringComposition(s)||t=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(t,e,s)?s.preventDefault():i(e,s))},gs[t]),this.registeredEvents.push(t)}M.chrome&&M.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,M.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let s;this.customHandlers=[];for(let r of t)if(s=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:s});for(let o in s)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{!Vr(e,l)||this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,t,i){for(let s of this.customHandlers){let r=s.handlers[e];if(r)try{if(r.call(s.plugin,i,t)||i.defaultPrevented)return!0}catch(o){Re(t.state,o)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let s=i.handlers.scroll;if(s)try{s.call(i.plugin,t,e)}catch(r){Re(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(M.android&&M.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let i;return M.ios&&(i=Nl.find(s=>s.keyCode==t.keyCode))&&!(t.ctrlKey||t.altKey||t.metaKey)&&!t.synthetic?(this.pendingIOSKey=i,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,ti(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:M.safari&&!M.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229||e.type=="compositionend"&&!M.ios}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const Nl=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Vl=[16,17,18,20,91,92,224,225];class Ec{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.lastEvent=t;let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(V.allowMultipleSelections)&&Ic(e,t),this.dragMove=Nc(e,t),this.dragging=Vc(e,t)&&Ws(t)==1?null:!1,this.dragging===!1&&(t.preventDefault(),this.select(t))}move(e){if(e.buttons==0)return this.destroy();this.dragging===!1&&this.select(this.lastEvent=e)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging|
Line truncated
|
||||
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,xs),Tf={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ln=null;function Bf(){var n;if(Ln==null&&typeof document<"u"&&document.body){let e=document.body.style;Ln=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Ln||!1}const Vi=T.define({combine(n){let e=zt(n,{render:null,specialChars:Of,addSpecialChars:null});return(e.replaceTabs=!Bf())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,xs)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,xs)),e}});function Rf(n={}){return[Vi.of(n),Lf()]}let so=null;function Lf(){return so||(so=ue.fromClass(class{constructor(n){this.view=n,this.decorations=R.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Vi)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Df({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=re(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,h=di(o.text,l,i-o.from);return R.replace({widget:new Nf((l-h%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=R.replace({widget:new If(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Vi);n.startState.facet(Vi)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Pf="\u2022";function Ef(n){return n>=32?Pf:n==10?"\u2424":String.fromCharCode(9216+n)}class If extends kt{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Ef(this.code),i=e.state.phrase("Control character")+" "+(Tf[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class Nf extends kt{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}class Vf extends kt{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}ignoreEvent(){return!1}}function ro(n){return ue.fromClass(class{constructor(e){this.view=e,this.placeholder=R.set([R.widget({widget:new Vf(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?R.none:this.placeholder}},{decorations:e=>e.decorations})}const ks=2e3;function Ff(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>ks||t.off>ks||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let h=i;h<=s;h++){let a=n.doc.line(h);a.length<=l&&r.push(m.range(a.from+o,a.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let h=i;h<=s;h++){let a=n.doc.line(h),c=es(a.text,o,n.tabSize,!0);if(c>-1){let f=es(a.text,l,n.tabSize);r.push(m.range(a.from+c,a.from+f))}}}return r}function Wf(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function oo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>ks?-1:s==i.length?Wf(n,e.clientX):di(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function Hf(n,e){let t=oo(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=oo(n,s);if(!l)return i;let h=Ff(n.state,t,l);return h.length?o?m.create(h.concat(i.ranges)):m.create(h):i}}:null}function zf(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?Hf(t,i):null)}const Pn="-10000px";class qf{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(s=>s),this.tooltipViews=this.tooltips.map(i)}update(e){let t=e.state.facet(this.facet),i=t.filt
Line truncated
|
||||
`;this.styleTag.textContent=r}}}var ot={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Lt={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},wr=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent);typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent);var Ya=typeof navigator<"u"&&/Mac/.test(navigator.platform),Qa=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Za=Ya||wr&&+wr[1]<57;for(var oe=0;oe<10;oe++)ot[48+oe]=ot[96+oe]=String(oe);for(var oe=1;oe<=24;oe++)ot[oe+111]="F"+oe;for(var oe=65;oe<=90;oe++)ot[oe]=String.fromCharCode(oe+32),Lt[oe]=String.fromCharCode(oe);for(var An in ot)Lt.hasOwnProperty(An)||(Lt[An]=ot[An]);function ec(n){var e=Za&&(n.ctrlKey||n.altKey||n.metaKey)||Qa&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Lt:ot)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function zi(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Rt(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function tc(){let n=document.activeElement;for(;n&&n.shadowRoot;)n=n.shadowRoot.activeElement;return n}function Ii(n,e){if(!e.anchorNode)return!1;try{return Rt(n,e.anchorNode)}catch{return!1}}function li(n){return n.nodeType==3?Pt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function qi(n,e,t,i){return t?xr(n,e,t,i,-1)||xr(n,e,t,i,1):!1}function Ki(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function xr(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:hi(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=Ki(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?hi(n):0}else return!1}}function hi(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}const rl={left:0,right:0,top:0,bottom:0};function hn(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function ic(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function nc(n,e,t,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView;for(let c=n;c;)if(c.nodeType==1){let f,u=c==h.body;if(u)f=ic(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let d=0,p=0;if(s=="nearest")e.top<f.top?(p=-(f.top-e.top+o),t>0&&e.bottom>f.bottom+p&&(p=e.bottom-f.bottom+p+o)):e.bottom>f.bottom&&(p=e.bottom-f.bottom+o,t<0&&e.top-p<f.top&&(p=-(f.top+p-e.top+o)));else{let g=e.bottom-e.top,y=f.bottom-f.top;p=(s=="center"&&g<=y?e.top+g/2-y/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-y+o)-f.top}if(i=="nearest"?e.left<f.left?(d=-(f.left-e.left+r),t>0&&e.right>f.right+d&&(d=e.right-f.right+d+r)):e.right>f.right&&(d=e.right-f.right+r,t<0&&e.left<f.left+d&&(d=-(f.left+d-e.left+r))):d=(i=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:i=="start"==l?e.left-r:e.right-(f.right-f.left)+r)-f.left,d||p)if(u)a.scrollBy(d,p);else{if(p){let g=c.scrollTop;c.scrollTop+=p,p=c.scrollTop-g}if(d){let g=c.scrollLeft;c.scrollLeft+=d,d=c.scrollLeft-g}e={left:e.left-d,top:e.top-p,right:e.right-d,bottom:e.bottom-p}}if(u)break;c=c.assignedSlot||c.parentNode,i=s="nearest"}else if(c.nodeType==11)c=c.host;else break}class sc{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Ct=null;function ol(n){if(n.setActive)return n.setActive();if(Ct)return n.focus(Ct);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ct==null?{get preventScroll(){return Ct={preventScroll:!0},!0}}:void 0),!Ct){Ct=!1;for(let t=0;t<e.length;){let i=e[t++],s=e[t++],r=e[t++];i.scrollTop!=s&&(i.scrollTop=s),i.scrollLeft!=r&&(i.scrollLeft=r)}}}let kr;function Pt(n,e,tLine truncated
|
||||
`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),a=m.cursor(t?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function Lc(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==ce.Space&&(s=o),s==o}}function Rc(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return m.cursor(s,e.assoc);let o=e.goalColumn,l,h=n.contentDOM.getBoundingClientRect(),a=n.coordsAtPos(s),c=n.documentTop;if(a)o==null&&(o=a.left-h.left),l=r<0?a.top:a.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(h.right-h.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=h.left+o,u=i!=null?i:n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=Il(n,{x:f,y:p},!1,r);if(p<h.top||p>h.bottom||(r<0?g<s:g>s))return m.cursor(g,e.assoc,void 0,o)}}function Tn(n,e,t){let i=n.state.facet(Dl).map(s=>s(n));for(;;){let s=!1;for(let r of i)r.between(t.from-1,t.from+1,(o,l,h)=>{t.from>o&&t.from<l&&(t=e.from>t.from?m.cursor(o,1):m.cursor(l,-1),s=!0)});if(!s)return t}}class Pc{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let t in ie){let i=ie[t];e.contentDOM.addEventListener(t,s=>{!Vr(e,s)||this.ignoreDuringComposition(s)||t=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(t,e,s)?s.preventDefault():i(e,s))},gs[t]),this.registeredEvents.push(t)}M.chrome&&M.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,M.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let s;this.customHandlers=[];for(let r of t)if(s=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:s});for(let o in s)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{!Vr(e,l)||this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,t,i){for(let s of this.customHandlers){let r=s.handlers[e];if(r)try{if(r.call(s.plugin,i,t)||i.defaultPrevented)return!0}catch(o){Le(t.state,o)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let s=i.handlers.scroll;if(s)try{s.call(i.plugin,t,e)}catch(r){Le(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(M.android&&M.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let i;return M.ios&&(i=Nl.find(s=>s.keyCode==t.keyCode))&&!(t.ctrlKey||t.altKey||t.metaKey)&&!t.synthetic?(this.pendingIOSKey=i,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,ti(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:M.safari&&!M.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229||e.type=="compositionend"&&!M.ios}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const Nl=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Vl=[16,17,18,20,91,92,224,225];class Ec{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.lastEvent=t;let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(V.allowMultipleSelections)&&Ic(e,t),this.dragMove=Nc(e,t),this.dragging=Vc(e,t)&&Ws(t)==1?null:!1,this.dragging===!1&&(t.preventDefault(),this.select(t))}move(e){if(e.buttons==0)return this.destroy();this.dragging===!1&&this.select(this.lastEvent=e)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging|
Line truncated
|
||||
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,xs),Tf={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Rn=null;function Bf(){var n;if(Rn==null&&typeof document<"u"&&document.body){let e=document.body.style;Rn=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Rn||!1}const Vi=T.define({combine(n){let e=zt(n,{render:null,specialChars:Of,addSpecialChars:null});return(e.replaceTabs=!Bf())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,xs)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,xs)),e}});function Lf(n={}){return[Vi.of(n),Rf()]}let so=null;function Rf(){return so||(so=ue.fromClass(class{constructor(n){this.view=n,this.decorations=L.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Vi)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Df({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=re(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,h=di(o.text,l,i-o.from);return L.replace({widget:new Nf((l-h%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=L.replace({widget:new If(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Vi);n.startState.facet(Vi)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Pf="\u2022";function Ef(n){return n>=32?Pf:n==10?"\u2424":String.fromCharCode(9216+n)}class If extends kt{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Ef(this.code),i=e.state.phrase("Control character")+" "+(Tf[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class Nf extends kt{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}class Vf extends kt{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}ignoreEvent(){return!1}}function ro(n){return ue.fromClass(class{constructor(e){this.view=e,this.placeholder=L.set([L.widget({widget:new Vf(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?L.none:this.placeholder}},{decorations:e=>e.decorations})}const ks=2e3;function Ff(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>ks||t.off>ks||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let h=i;h<=s;h++){let a=n.doc.line(h);a.length<=l&&r.push(m.range(a.from+o,a.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let h=i;h<=s;h++){let a=n.doc.line(h),c=es(a.text,o,n.tabSize,!0);if(c>-1){let f=es(a.text,l,n.tabSize);r.push(m.range(a.from+c,a.from+f))}}}return r}function Wf(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function oo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>ks?-1:s==i.length?Wf(n,e.clientX):di(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function Hf(n,e){let t=oo(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=oo(n,s);if(!l)return i;let h=Ff(n.state,t,l);return h.length?o?m.create(h.concat(i.ranges)):m.create(h):i}}:null}function zf(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?Hf(t,i):null)}const Pn="-10000px";class qf{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(s=>s),this.tooltipViews=this.tooltips.map(i)}update(e){let t=e.state.facet(this.facet),i=t.filt
Line truncated
|
||||
`&&(t="");else{let i=t.indexOf(`
|
||||
`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;t+=this.ranges[++this.rangeIndex].from-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,i,s,r){if(this.ranges.length>1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new yh(t,e?e.state.tabSize:4,e?wt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=wh(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=Y.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Wu,topID:0,maxBufferLength:2048,reused:this.chunkReused});e=new Y(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Y(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function wh(n,e,t){e.start=e.pos;for(let i=0;i<10;i++){let s=n(e,t);if(e.pos>e.start)return s}throw new Error("Stream parser failed to advance stream.")}const Xs=Object.create(null),fi=[we.none],Wu=new qs(fi),yo=[],xh=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])xh[n]=Sh(Xs,e);class kh{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),xh)}resolve(e){return e?this.table[e]||(this.table[e]=Sh(this.extra,e)):0}}const Hu=new kh(Xs);function Hn(n,e){yo.indexOf(n)>-1||(yo.push(n),console.warn(e))}function Sh(n,e){let t=null;for(let r of e.split(".")){let o=n[r]||k[r];o?typeof o=="function"?t?t=o(t):Hn(r,`Modifier ${r} used at start of tag`):t?Hn(r,`Tag ${r} used as modifier`):t=o:Hn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=we.define({id:fi.length,name:i,props:[ou({[i]:t})]});return fi.push(s),s.id}function zu(n){let e=we.define({id:fi.length,name:"Document",props:[ci.add(()=>n)]});return fi.push(e),e}const qu=n=>{let e=Qs(n.state);return e.line?Ku(n):e.block?ju(n):!1};function Ys(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const Ku=Ys($u,0),Uu=Ys(vh,0),ju=Ys((n,e)=>vh(n,e,Ju(e)),0);function Qs(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Jt=50;function Gu(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Jt,i),o=n.sliceDoc(s,s+Jt),l=/\s*$/.exec(r)[0].length,h=/^\s*/.exec(o)[0].length,a=r.length-l;if(r.slice(a-e.length,a)==e&&o.slice(h,h+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+h,margin:h&&1}};let c,f;s-i<=2*Jt?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Jt),f=n.sliceDoc(s-Jt,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function Ju(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from,to:s.to})}return e}function vh(n,e,t=e.selection.ranges){let i=t.map(r=>Qs(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>Gu(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;o<s.length;o++)if(l=s[o]){let h=i[o],{open:a,close:c}=l;r.push({from:a.pos-h.open.length,to:a.pos+a.margin},{from:c.pos-c.margin,to:c.pos+h.close.length})}return{changes:r}}return null}function $u(n,e,t=e.selection.ranges){let i=[],s=-1;for(let{from:r,to:o}of t){let l=i.length,h=1e9;for(let a=r;a<=o;){let c=e.doc.lineAt(a);if(c.from>s&&(r==o||o>c.from)){s=c.from;let f=Qs(e,a).line;if(!f)continue;let u=/^\s*/.exec(c.text)[0].length,d=u==c
Line truncated
|
||||
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp}create(){return this.regexp?new rp(this):new sp(this)}getCursor(e,t=0,i=e.length){return this.regexp?Mt(this,e,t,i):At(this,e,t,i)}}class oa{constructor(e){this.spec=e}}function At(n,e,t,i){return new Wt(e,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase())}class sp extends oa{constructor(e){super(e)}nextMatch(e,t,i){let s=At(this.spec,e,i,e.length).nextOverlapping();return s.done&&(s=At(this.spec,e,0,t).nextOverlapping()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=At(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace}matchAll(e,t){let i=At(this.spec,e,0,e.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=At(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Mt(n,e,t,i){return new ia(e,n.search,n.caseSensitive?void 0:{ignoreCase:!0},t,i)}class rp extends oa{nextMatch(e,t,i){let s=Mt(this.spec,e,i,e.length).next();return s.done&&(s=Mt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Mt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i<e.match.length?e.match[i]:t)}matchAll(e,t){let i=Mt(this.spec,e,0,e.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Mt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const ui=W.define(),ir=W.define(),nt=ke.define({create(n){return new Kn(Bs(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ui)?n=new Kn(t.value.create(),n.panel):t.is(ir)&&(n=new Kn(n.query,t.value?nr:null));return n},provide:n=>$i.from(n,e=>e.panel)});class Kn{constructor(e,t){this.query=e,this.panel=t}}const op=R.mark({class:"cm-searchMatch"}),lp=R.mark({class:"cm-searchMatch cm-searchMatch-selected"}),hp=ue.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(nt))}update(n){let e=n.state.field(nt);(e!=n.startState.field(nt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return R.none;let{view:t}=this,i=new mt;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:h}=r[s];for(;s<o-1&&h>r[s+1].from-2*250;)h=r[++s].to;n.highlight(t.state.doc,l,h,(a,c)=>{let f=t.state.selection.ranges.some(u=>u.from==a&&u.to==c);i.add(a,c,f?lp:op)})}return i.finish()}},{decorations:n=>n.decorations});function gi(n){return e=>{let t=e.state.field(nt,!1);return t&&t.query.spec.valid?n(e,t):la(e)}}const nn=gi((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state.doc,t,t);return i?(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:sr(n,i),userEvent:"select.search"}),!0):!1}),sn=gi((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t.doc,i,i);return s?(n.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:sr(n,s),userEvent:"select.search"}),!0):!1}),ap=gi((n,{query:e})=>{let t=e.matchAll(n.state.doc,1e3);return!t||!t.length?!1:(n.dispatch({selection:m.create(t.map(i=>m.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),cp=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Wt(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(m.range(l.value.from,l.value.to))}return e(n.update({selection:m.create(r,o),userEvent:"select.search.matches"})),!0},Lo=gi((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t.doc,i,i);if(!r)return!1;let o=[],l,h,a=[];if(r.from==i&&r.to==s&&(h=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:h}),r=e.nextMatch(t.doc,r.from,r.to),a.push(O.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-h.length;l={anchor:r.from-c,head:r.to-c},a.push(sr(n,r))}return n.dispatch({changes:o,selection:l,scrollIntoView:!!l,effects:a,userEvent:"input.replace"}),!0}),fp=gi((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state.doc,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getRep
Line truncated
|
||||
`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;t+=this.ranges[++this.rangeIndex].from-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,i,s,r){if(this.ranges.length>1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new yh(t,e?e.state.tabSize:4,e?wt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=wh(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=Y.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Wu,topID:0,maxBufferLength:2048,reused:this.chunkReused});e=new Y(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Y(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function wh(n,e,t){e.start=e.pos;for(let i=0;i<10;i++){let s=n(e,t);if(e.pos>e.start)return s}throw new Error("Stream parser failed to advance stream.")}const Xs=Object.create(null),fi=[we.none],Wu=new qs(fi),yo=[],xh=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])xh[n]=Sh(Xs,e);class kh{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),xh)}resolve(e){return e?this.table[e]||(this.table[e]=Sh(this.extra,e)):0}}const Hu=new kh(Xs);function Hn(n,e){yo.indexOf(n)>-1||(yo.push(n),console.warn(e))}function Sh(n,e){let t=null;for(let r of e.split(".")){let o=n[r]||k[r];o?typeof o=="function"?t?t=o(t):Hn(r,`Modifier ${r} used at start of tag`):t?Hn(r,`Tag ${r} used as modifier`):t=o:Hn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=we.define({id:fi.length,name:i,props:[ou({[i]:t})]});return fi.push(s),s.id}function zu(n){let e=we.define({id:fi.length,name:"Document",props:[ci.add(()=>n)]});return fi.push(e),e}const qu=n=>{let e=Qs(n.state);return e.line?Ku(n):e.block?ju(n):!1};function Ys(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const Ku=Ys($u,0),Uu=Ys(vh,0),ju=Ys((n,e)=>vh(n,e,Ju(e)),0);function Qs(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Jt=50;function Gu(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Jt,i),o=n.sliceDoc(s,s+Jt),l=/\s*$/.exec(r)[0].length,h=/^\s*/.exec(o)[0].length,a=r.length-l;if(r.slice(a-e.length,a)==e&&o.slice(h,h+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+h,margin:h&&1}};let c,f;s-i<=2*Jt?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Jt),f=n.sliceDoc(s-Jt,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function Ju(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from,to:s.to})}return e}function vh(n,e,t=e.selection.ranges){let i=t.map(r=>Qs(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>Gu(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;o<s.length;o++)if(l=s[o]){let h=i[o],{open:a,close:c}=l;r.push({from:a.pos-h.open.length,to:a.pos+a.margin},{from:c.pos-c.margin,to:c.pos+h.close.length})}return{changes:r}}return null}function $u(n,e,t=e.selection.ranges){let i=[],s=-1;for(let{from:r,to:o}of t){let l=i.length,h=1e9;for(let a=r;a<=o;){let c=e.doc.lineAt(a);if(c.from>s&&(r==o||o>c.from)){s=c.from;let f=Qs(e,a).line;if(!f)continue;let u=/^\s*/.exec(c.text)[0].length,d=u==c
Line truncated
|
||||
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp}create(){return this.regexp?new rp(this):new sp(this)}getCursor(e,t=0,i=e.length){return this.regexp?Mt(this,e,t,i):At(this,e,t,i)}}class oa{constructor(e){this.spec=e}}function At(n,e,t,i){return new Wt(e,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase())}class sp extends oa{constructor(e){super(e)}nextMatch(e,t,i){let s=At(this.spec,e,i,e.length).nextOverlapping();return s.done&&(s=At(this.spec,e,0,t).nextOverlapping()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=At(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace}matchAll(e,t){let i=At(this.spec,e,0,e.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=At(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Mt(n,e,t,i){return new ia(e,n.search,n.caseSensitive?void 0:{ignoreCase:!0},t,i)}class rp extends oa{nextMatch(e,t,i){let s=Mt(this.spec,e,i,e.length).next();return s.done&&(s=Mt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Mt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i<e.match.length?e.match[i]:t)}matchAll(e,t){let i=Mt(this.spec,e,0,e.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Mt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const ui=W.define(),ir=W.define(),nt=ke.define({create(n){return new Kn(Bs(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ui)?n=new Kn(t.value.create(),n.panel):t.is(ir)&&(n=new Kn(n.query,t.value?nr:null));return n},provide:n=>$i.from(n,e=>e.panel)});class Kn{constructor(e,t){this.query=e,this.panel=t}}const op=L.mark({class:"cm-searchMatch"}),lp=L.mark({class:"cm-searchMatch cm-searchMatch-selected"}),hp=ue.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(nt))}update(n){let e=n.state.field(nt);(e!=n.startState.field(nt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return L.none;let{view:t}=this,i=new mt;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:h}=r[s];for(;s<o-1&&h>r[s+1].from-2*250;)h=r[++s].to;n.highlight(t.state.doc,l,h,(a,c)=>{let f=t.state.selection.ranges.some(u=>u.from==a&&u.to==c);i.add(a,c,f?lp:op)})}return i.finish()}},{decorations:n=>n.decorations});function gi(n){return e=>{let t=e.state.field(nt,!1);return t&&t.query.spec.valid?n(e,t):la(e)}}const nn=gi((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state.doc,t,t);return i?(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:sr(n,i),userEvent:"select.search"}),!0):!1}),sn=gi((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t.doc,i,i);return s?(n.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:sr(n,s),userEvent:"select.search"}),!0):!1}),ap=gi((n,{query:e})=>{let t=e.matchAll(n.state.doc,1e3);return!t||!t.length?!1:(n.dispatch({selection:m.create(t.map(i=>m.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),cp=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Wt(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(m.range(l.value.from,l.value.to))}return e(n.update({selection:m.create(r,o),userEvent:"select.search.matches"})),!0},Ro=gi((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t.doc,i,i);if(!r)return!1;let o=[],l,h,a=[];if(r.from==i&&r.to==s&&(h=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:h}),r=e.nextMatch(t.doc,r.from,r.to),a.push(O.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-h.length;l={anchor:r.from-c,head:r.to-c},a.push(sr(n,r))}return n.dispatch({changes:o,selection:l,scrollIntoView:!!l,effects:a,userEvent:"input.replace"}),!0}),fp=gi((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state.doc,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getRep
Line truncated
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as k,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index.6e74b406.js";function y(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&&Z(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=h(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=h(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,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({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 E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as k,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index.42f4af63.js";function y(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&&Z(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=h(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=h(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,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({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(),A(r.$$.fragment),p=k(),A(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],L(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),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,C,$),_(C,v),P=!0,F||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],F=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!P||$&4)&&(i.disabled=a[2]),$&4&&L(i,"btn-loading",a[2])},i(a){P||(H(r.$$.fragment,a),H(d.$$.fragment,a),P=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),P=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(C),F=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(H(e.$$.fragment,s),o=!0)},o(s){N(e.$$.fragment,s),o=!1},d(s){T(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 W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.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 E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default};
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index.6e74b406.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({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=`<h4 class="m-b-xs">Forgotten admin password</h4>
|
||||
import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index.42f4af63.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({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=`<h4 class="m-b-xs">Forgotten admin password</h4>
|
||||
<p>Enter the email associated with your account and we\u2019ll send you a recovery link:</p>`,n=g(),H(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),L(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=E(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),S(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='<i class="ri-checkbox-circle-line"></i>',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=E(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=A(B.call(null,t)),f=!0)},p(u,r){let $=e;e=b(u),e===$?a[e].p(u,r):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),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 z({props:{$$slots:{default:[U]},$$scope:{ctx:c}}}),{c(){H(e.$$.fragment)},m(n,l){L(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){S(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 M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default};
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{S as M,i as N,s as R,F as U,c as S,m as z,t as $,a as v,d as J,C as W,E as Y,g as _,k as j,n as A,o as b,p as F,q as B,e as m,w as y,b as C,f as d,r as H,h as k,u as E,v as D,y as h,x as G,z as T}from"./index.6e74b406.js";function I(r){let e,s,t,l,n,o,c,a,i,u,g,q,p=r[3]&&L(r);return o=new B({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 M,i as N,s as R,F as U,c as S,m as z,t as $,a as v,d as J,C as W,E as Y,g as _,k as j,n as A,o as b,p as F,q as B,e as m,w as y,b as C,f as d,r as H,h as k,u as E,v as D,y as h,x as G,z as T}from"./index.42f4af63.js";function I(r){let e,s,t,l,n,o,c,a,i,u,g,q,p=r[3]&&L(r);return o=new B({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],H(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,s),k(s,t),k(t,l),p&&p.m(t,null),k(e,n),z(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||(q=E(e,"submit",D(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=L(f),p.c(),p.m(t,null)):p&&(p.d(1),p=null);const P={};w&769&&(P.$$scope={dirty:w,ctx:f}),o.$set(P),(!u||w&2)&&(a.disabled=f[1]),w&2&&H(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),g=!1,q()}}}function K(r){let e,s,t,l,n;return{c(){e=m("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
|
||||
<div class="content txt-bold"><p>Email address changed</p>
|
||||
<p>You can now sign in with your new email address.</p></div>`,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 L(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),k(s,t)},p(l,n){n&8&&G(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),k(e,s),_(i,l,u),_(i,n,u),T(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]&&T(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=Y()},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):(j(),v(o[u],1,1,()=>{o[u]=null}),A(),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 U({props:{nobranding:!0,$$slots:{default:[Q]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(t,l){z(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 F.users.confirmEmailChange(l==null?void 0:l.token,n),s(2,c=!0)}catch(g){F.errorResponseHandler(g)}s(1,o=!1)}}const i=()=>window.close();function u(){n=this.value,s(0,n)}return r.$$set=g=>{"params"in g&&s(5,l=g.params)},r.$$.update=()=>{r.$$.dirty&32&&s(3,t=W.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[n,o,c,t,a,l,i,u]}class x extends M{constructor(e){super(),N(this,e,X,V,R,{params:5})}}export{x as default};
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{S as W,i as Y,s as j,F as A,c as H,m as N,t as P,a as q,d as S,C as B,E as D,g as _,k as G,n as I,o as m,p as E,q as J,e as b,w as y,b as C,f as c,r as M,h as w,u as h,v as K,y as F,x as O,z as R}from"./index.6e74b406.js";function Q(i){let e,l,t,n,s,o,p,a,r,u,v,g,k,L,d=i[4]&&U(i);return o=new J({props:{class:"form-field required",name:"password",$$slots:{default:[X,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),a=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),{c(){e=b("form"),l=b("div"),t=b("h4"),n=y(`Reset your user password
|
||||
import{S as W,i as Y,s as j,F as A,c as H,m as N,t as P,a as q,d as S,C as B,E as D,g as _,k as G,n as I,o as m,p as E,q as J,e as b,w as y,b as C,f as c,r as M,h as w,u as h,v as K,y as F,x as O,z as R}from"./index.42f4af63.js";function Q(i){let e,l,t,n,s,o,p,a,r,u,v,g,k,L,d=i[4]&&U(i);return o=new J({props:{class:"form-field required",name:"password",$$slots:{default:[X,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),a=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),{c(){e=b("form"),l=b("div"),t=b("h4"),n=y(`Reset your user password
|
||||
`),d&&d.c(),s=C(),H(o.$$.fragment),p=C(),H(a.$$.fragment),r=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=i[2],M(u,"btn-loading",i[2])},m(f,$){_(f,e,$),w(e,l),w(l,t),w(t,n),d&&d.m(t,null),w(e,s),N(o,e,null),w(e,p),N(a,e,null),w(e,r),w(e,u),w(u,v),g=!0,k||(L=h(e,"submit",K(i[5])),k=!0)},p(f,$){f[4]?d?d.p(f,$):(d=U(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 z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),a.$set(z),(!g||$&4)&&(u.disabled=f[2]),$&4&&M(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(),S(o),S(a),k=!1,L()}}}function V(i){let e,l,t,n,s;return{c(){e=b("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
|
||||
<div class="content txt-bold"><p>Password changed</p>
|
||||
<p>You can now sign in with your new password.</p></div>`,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=h(t,"click",i[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(t),n=!1,s()}}}function U(i){let e,l,t;return{c(){e=y("for "),l=b("strong"),t=y(i[4])},m(n,s){_(n,e,s),_(n,l,s),w(l,t)},p(n,s){s&16&&O(t,n[4])},d(n){n&&m(e),n&&m(l)}}}function X(i){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=i[10]),c(s,"type","password"),c(s,"id",o=i[10]),s.required=!0,s.autofocus=!0},m(r,u){_(r,e,u),w(e,l),_(r,n,u),_(r,s,u),R(s,i[0]),s.focus(),p||(a=h(s,"input",i[8]),p=!0)},p(r,u){u&1024&&t!==(t=r[10])&&c(e,"for",t),u&1024&&o!==(o=r[10])&&c(s,"id",o),u&1&&s.value!==r[0]&&R(s,r[0])},d(r){r&&m(e),r&&m(n),r&&m(s),p=!1,a()}}}function Z(i){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=i[10]),c(s,"type","password"),c(s,"id",o=i[10]),s.required=!0},m(r,u){_(r,e,u),w(e,l),_(r,n,u),_(r,s,u),R(s,i[1]),p||(a=h(s,"input",i[9]),p=!0)},p(r,u){u&1024&&t!==(t=r[10])&&c(e,"for",t),u&1024&&o!==(o=r[10])&&c(s,"id",o),u&2&&s.value!==r[1]&&R(s,r[1])},d(r){r&&m(e),r&&m(n),r&&m(s),p=!1,a()}}}function x(i){let e,l,t,n;const s=[V,Q],o=[];function p(a,r){return a[3]?0:1}return e=p(i),l=o[e]=s[e](i),{c(){l.c(),t=D()},m(a,r){o[e].m(a,r),_(a,t,r),n=!0},p(a,r){let u=e;e=p(a),e===u?o[e].p(a,r):(G(),q(o[u],1,1,()=>{o[u]=null}),I(),l=o[e],l?l.p(a,r):(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(i){let e,l;return e=new A({props:{nobranding:!0,$$slots:{default:[x]},$$scope:{ctx:i}}}),{c(){H(e.$$.fragment)},m(t,n){N(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){S(e,t)}}}function te(i,e,l){let t,{params:n}=e,s="",o="",p=!1,a=!1;async function r(){if(!p){l(2,p=!0);try{await E.users.confirmPasswordReset(n==null?void 0:n.token,s,o),l(3,a=!0)}catch(k){E.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 i.$$set=k=>{"params"in k&&l(6,n=k.params)},i.$$.update=()=>{i.$$.dirty&64&&l(4,t=B.getJWTPayload(n==null?void 0:n.token).email||"")},[s,o,p,a,t,r,n,u,v,g]}class le extends W{constructor(e){super(),Y(this,e,te,ee,j,{params:6})}}export{le as default};
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
import{S as k,i as v,s as y,F as w,c as x,m as C,t as g,a as $,d as L,p as H,E as M,g as r,o as a,e as u,b as m,f,u as _,y as p}from"./index.6e74b406.js";function P(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div>
|
||||
import{S as k,i as v,s as y,F as w,c as x,m as C,t as g,a as $,d as L,p as H,E as M,g as r,o as a,e as u,b as m,f,u as _,y as p}from"./index.42f4af63.js";function P(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div>
|
||||
<div class="content txt-bold"><p>Invalid or expired verification token.</p></div>`,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=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
|
||||
<div class="content txt-bold"><p>Successfully verified email address.</p></div>`,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='<div class="loader loader-lg"><em>Please wait...</em></div>',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function F(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 V(o){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[F]},$$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){$(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function q(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 I extends k{constructor(t){super(),v(this,t,q,V,y,{params:2})}}export{I as default};
|
||||
Vendored
+633
@@ -0,0 +1,633 @@
|
||||
const b_=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}};b_();function le(){}const hl=n=>n;function pt(n,e){for(const t in e)n[t]=e[t];return n}function qh(n){return n()}function Ka(){return Object.create(null)}function Qe(n){n.forEach(qh)}function Un(n){return typeof n=="function"}function De(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Al;function Gn(n,e){return Al||(Al=document.createElement("a")),Al.href=e,n===Al.href}function v_(n){return Object.keys(n).length===0}function Vh(n,...e){if(n==null)return le;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function kt(n,e,t){n.$$.on_destroy.push(Vh(e,t))}function yn(n,e,t,i){if(n){const s=zh(n,e,t,i);return n[0](s)}}function zh(n,e,t,i){return n[1]&&i?pt(t.ctx.slice(),n[1](i(e))):t.ctx}function kn(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r<o;r+=1)l[r]=e.dirty[r]|s[r];return l}return e.dirty|s}return e.dirty}function wn(n,e,t,i,s,l){if(s){const o=zh(e,t,i,l);n.p(o,s)}}function $n(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function fi(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function Jt(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function Za(n){return n==null?"":n}function fn(n,e,t){return n.set(t),e}function Ye(n){return n&&Un(n.destroy)?n.destroy:le}const Bh=typeof window<"u";let Po=Bh?()=>window.performance.now():()=>Date.now(),sa=Bh?n=>requestAnimationFrame(n):le;const gs=new Set;function Uh(n){gs.forEach(e=>{e.c(n)||(gs.delete(e),e.f())}),gs.size!==0&&sa(Uh)}function Lo(n){let e;return gs.size===0&&sa(Uh),{promise:new Promise(t=>{gs.add(e={c:n,f:t})}),abort(){gs.delete(e)}}}function m(n,e){n.appendChild(e)}function Wh(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function y_(n){const e=_("style");return k_(Wh(n),e),e.sheet}function k_(n,e){m(n.head||n,e)}function k(n,e,t){n.insertBefore(e,t||null)}function y(n){n.parentNode.removeChild(n)}function Xn(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function _(n){return document.createElement(n)}function N(n){return document.createTextNode(n)}function T(){return N(" ")}function Xe(){return N("")}function G(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Yt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Qn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Yh(n){return function(e){e.target===this&&n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function ai(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function At(n){return n===""?null:+n}function w_(n){return Array.from(n.childNodes)}function pe(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function Me(n,e){n.value=e==null?"":e}function Ja(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ne(n,e,t){n.classList[t?"add":"remove"](e)}function Kh(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}const ro=new Map;let ao=0;function $_(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function S_(n,e){const t={stylesheet:y_(e),rules:{}};return ro.set(n,t),t}function sl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{
|
||||
`;for(let b=0;b<=1;b+=a){const w=e+(t-e)*l(b);u+=b*100+`%{${o(w,1-w)}}
|
||||
`}const f=u+`100% {${o(t,1-t)}}
|
||||
}`,c=`__svelte_${$_(f)}_${r}`,d=Wh(n),{stylesheet:h,rules:g}=ro.get(d)||S_(d,n);g[c]||(g[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const v=n.style.animation||"";return n.style.animation=`${v?`${v}, `:""}${c} ${i}ms linear ${s}ms 1 both`,ao+=1,c}function ll(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),ao-=s,ao||C_())}function C_(){sa(()=>{ao||(ro.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),ro.clear())})}function M_(n,e,t,i){if(!e)return le;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return le;const{delay:l=0,duration:o=300,easing:r=hl,start:a=Po()+l,end:u=a+o,tick:f=le,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,g;function v(){c&&(g=sl(n,0,1,o,l,r,c)),l||(h=!0)}function b(){c&&ll(n,g),d=!1}return Lo(w=>{if(!h&&w>=a&&(h=!0),h&&w>=u&&(f(1,0),b()),!d)return!1;if(h){const C=w-a,S=0+1*r(C/o);f(S,1-S)}return!0}),v(),f(0,1),b}function T_(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,Zh(n,s)}}function Zh(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ol;function Js(n){ol=n}function Fo(){if(!ol)throw new Error("Function called outside component initialization");return ol}function Wn(n){Fo().$$.on_mount.push(n)}function D_(n){Fo().$$.after_update.push(n)}function O_(n){Fo().$$.on_destroy.push(n)}function ln(){const n=Fo();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Kh(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function ut(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Us=[],he=[],to=[],Mr=[],Jh=Promise.resolve();let Tr=!1;function Gh(){Tr||(Tr=!0,Jh.then(Xh))}function ei(){return Gh(),Jh}function Dt(n){to.push(n)}function He(n){Mr.push(n)}const Xo=new Set;let Pl=0;function Xh(){const n=ol;do{for(;Pl<Us.length;){const e=Us[Pl];Pl++,Js(e),E_(e.$$)}for(Js(null),Us.length=0,Pl=0;he.length;)he.pop()();for(let e=0;e<to.length;e+=1){const t=to[e];Xo.has(t)||(Xo.add(t),t())}to.length=0}while(Us.length);for(;Mr.length;)Mr.pop()();Tr=!1,Xo.clear(),Js(n)}function E_(n){if(n.fragment!==null){n.update(),Qe(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Dt)}}let Ps;function la(){return Ps||(Ps=Promise.resolve(),Ps.then(()=>{Ps=null})),Ps}function Qi(n,e,t){n.dispatchEvent(Kh(`${e?"intro":"outro"}${t}`))}const no=new Set;let si;function Pe(){si={r:0,c:[],p:si}}function Le(){si.r||Qe(si.c),si=si.p}function E(n,e){n&&n.i&&(no.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(no.has(n))return;no.add(n),si.c.push(()=>{no.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const oa={duration:0};function Qh(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&ll(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=hl,tick:g=le,css:v}=i||oa;v&&(l=sl(n,0,1,d,c,h,v,r++)),g(0,1);const b=Po()+c,w=b+d;o&&o.abort(),s=!0,Dt(()=>Qi(n,!0,"start")),o=Lo(C=>{if(s){if(C>=w)return g(1,0),Qi(n,!0,"end"),a(),s=!1;if(C>=b){const S=h((C-b)/d);g(S,1-S)}}return s})}let f=!1;return{start(){f||(f=!0,ll(n),Un(i)?(i=i(),la().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function xh(n,e,t){let i=e(n,t),s=!0,l;const o=si;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=hl,tick:c=le,css:d}=i||oa;d&&(l=sl(n,1,0,u,a,f,d));const h=Po()+a,g=h+u;Dt(()=>Qi(n,!1,"start")),Lo(v=>{if(s){if(v>=g)return c(0,1),Qi(n,!1,"end"),--o.r||Qe(o.c),!1;if(v>=h){const b=f((v-h)/u);c(1-b,b)}}return s})}return Un(i)?la().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&ll(n,l),s=!1)}}}function rt(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&ll(n,a)}function f(d,h){const g=d.b-l;return h*=Math.abs(g),{a:l,b:d.b,d:g,duration:h,start:d.start,end:d.start+h,group:d.group}}function c(d){const{delay:h=0,duration:g=300,easing:v=hl,tick:b=le,css:w}=s||oa,C={start:Po()+h,b:d};d||(C.group=si,si.r+=1),o||r?r=C:(w&&(u(),a=sl(n,l,d,g,h,v,w)),d&&b(0,1),o=f(C,g),Dt(()=>Qi(n,d,"start")),Lo(S=>{if(r&&S>r.start&&(o=f(r,g),r=null,Qi(n,o.b,"start"),w&&(u(),a=sl(n,l,o.b,o.duration,0,v,s.css))),o){if(S>=o.end)b(l=o.b,1-l),Qi(n,o.b,"end"),r||(o.b?u():--o.group.r||Qe(o.group.c)),o=null;else if(S>=o.start){const $=S-o.start;l=o.a+o.d*v($/o.duration),b(l,1-l)}}return!!(o||r)}))}return{run(d){Un(s)?la().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function mn(n,e){n.d(1),e.delete(n.key)}function Gt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function A_(n,e){n.f(),Gt(n,e)}function mt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,h=
Line truncated
|
||||
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=T(),i=_("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){k(s,e,l),k(s,t,l),k(s,i,l)},d(s){s&&y(e),s&&y(t),s&&y(i)}}}function e1(n){let e,t,i,s=!n[0]&&Tu();const l=n[1].default,o=yn(l,n,n[2],null);return{c(){e=_("div"),s&&s.c(),t=T(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){k(r,e,a),s&&s.m(e,null),m(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Tu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&wn(o,l,r,r[2],i?kn(l,r[2],a,null):$n(r[2]),null)},i(r){i||(E(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&y(e),s&&s.d(),o&&o.d(r)}}}function t1(n){let e,t;return e=new Cn({props:{class:"full-page",center:!0,$$slots:{default:[e1]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function n1(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class ug extends Ee{constructor(e){super(),Oe(this,e,n1,t1,De,{nobranding:0})}}function Du(n,e,t){const i=n.slice();return i[11]=e[t],i}const i1=n=>({}),Ou=n=>({uniqueId:n[3]});function s1(n){let e=(n[11]||go)+"",t;return{c(){t=N(e)},m(i,s){k(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||go)+"")&&pe(t,e)},d(i){i&&y(t)}}}function l1(n){var i,s;let e=(((i=n[11])==null?void 0:i.message)||((s=n[11])==null?void 0:s.code)||go)+"",t;return{c(){t=N(e)},m(l,o){k(l,t,o)},p(l,o){var r,a;o&4&&e!==(e=(((r=l[11])==null?void 0:r.message)||((a=l[11])==null?void 0:a.code)||go)+"")&&pe(t,e)},d(l){l&&y(t)}}}function Eu(n){let e,t;function i(o,r){return typeof o[11]=="object"?l1:s1}let s=i(n),l=s(n);return{c(){e=_("div"),l.c(),t=T(),p(e,"class","help-block help-block-error")},m(o,r){k(o,e,r),l.m(e,null),m(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&y(e),l.d()}}}function o1(n){let e,t,i,s,l;const o=n[7].default,r=yn(o,n,n[6],Ou);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=Eu(Du(n,a,f));return{c(){e=_("div"),r&&r.c(),t=T();for(let f=0;f<u.length;f+=1)u[f].c();p(e,"class",n[0]),ne(e,"error",n[2].length)},m(f,c){k(f,e,c),r&&r.m(e,null),m(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=G(e,"click",n[8]),s=!0)},p(f,[c]){if(r&&r.p&&(!i||c&64)&&wn(r,o,f,f[6],i?kn(o,f[6],c,i1):$n(f[6]),Ou),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const h=Du(f,a,d);u[d]?u[d].p(h,c):(u[d]=Eu(h),u[d].c(),u[d].m(e,null))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}(!i||c&1)&&p(e,"class",f[0]),c&5&&ne(e,"error",f[2].length)},i(f){i||(E(r,f),i=!0)},o(f){P(r,f),i=!1},d(f){f&&y(e),r&&r.d(f),Xn(u,f),n[9](null),s=!1,l()}}}const go="Invalid value";function r1(n,e,t){let i;kt(n,os,g=>t(5,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+Y.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){ag(r)}Wn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(g){ut.call(this,n,g)}function h(g){he[g?"unshift":"push"](()=>{u=g,t(1,u)})}return n.$$set=g=>{"name"in g&&t(4,r=g.name),"class"in g&&t(0,a=g.class),"$$scope"in g&&t(6,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=Y.toArray(Y.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,h]}class Ne extends Ee{constructor(e){super(),Oe(this,e,r1,o1,De,{name:4,class:0})}}function a1(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Email"),s=T(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0]),l.focus(),r||(a=G(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&Me(l,u[0])},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function u1(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("Password"),s=T(),l=_("input"),r=T(),a=_("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){k(c,e,d),m(e,t),k(c,s,d),k(c,l,d),Me(l,n[1]),k(c,r,d),k(c,a,d),u||(f=G(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&Me(l,c[1])},d(c){c&&y(e),c&&y(s),c&&y(l),c&&y(r),c&&y(a),u=!1,f()}}}function f1(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Password confirm"),s=T(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[2]),r||(a=G(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&Me(l,u[2])},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function c1(n){let e,t,i,s,l,o,r,a,Line truncated
|
||||
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),ne(f,"btn-disabled",n[3]),ne(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(g,v){k(g,e,v),m(e,t),m(e,i),j(s,e,null),m(e,l),j(o,e,null),m(e,r),j(a,e,null),m(e,u),m(e,f),c=!0,d||(h=G(e,"submit",Yt(n[4])),d=!0)},p(g,[v]){const b={};v&1537&&(b.$$scope={dirty:v,ctx:g}),s.$set(b);const w={};v&1538&&(w.$$scope={dirty:v,ctx:g}),o.$set(w);const C={};v&1540&&(C.$$scope={dirty:v,ctx:g}),a.$set(C),v&8&&ne(f,"btn-disabled",g[3]),v&8&&ne(f,"btn-loading",g[3])},i(g){c||(E(s.$$.fragment,g),E(o.$$.fragment,g),E(a.$$.fragment,g),c=!0)},o(g){P(s.$$.fragment,g),P(o.$$.fragment,g),P(a.$$.fragment,g),c=!1},d(g){g&&y(e),q(s),q(o),q(a),d=!1,h()}}}function d1(n,e,t){const i=ln();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await _e.admins.create({email:s,password:l,passwordConfirm:o}),await _e.admins.authViaEmail(s,l),i("submit")}catch(d){_e.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class p1 extends Ee{constructor(e){super(),Oe(this,e,d1,c1,De,{})}}function Au(n){let e,t;return e=new ug({props:{$$slots:{default:[h1]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function h1(n){let e,t;return e=new p1({}),e.$on("submit",n[1]),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p:le,i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function m1(n){let e,t,i=n[0]&&Au(n);return{c(){i&&i.c(),e=Xe()},m(s,l){i&&i.m(s,l),k(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&E(i,1)):(i=Au(s),i.c(),E(i,1),i.m(e.parentNode,e)):i&&(Pe(),P(i,1,1,()=>{i=null}),Le())},i(s){t||(E(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&y(e)}}}function g1(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){_e.logout(!1),t(0,i=!0);return}_e.authStore.isValid?ki("/collections"):_e.logout()}return[i,async()=>{t(0,i=!1),await ei(),window.location.search=""}]}class _1 extends Ee{constructor(e){super(),Oe(this,e,g1,m1,De,{})}}const Rt=ti(""),_o=ti("");function Vo(n){const e=n-1;return e*e*e+1}function bo(n,{delay:e=0,duration:t=400,easing:i=hl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function qn(n,{delay:e=0,duration:t=400,easing:i=Vo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>`
|
||||
transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px);
|
||||
opacity: ${a-f*d}`}}function en(n,{delay:e=0,duration:t=400,easing:i=Vo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=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*o}px;padding-top: ${h*r}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 Vn(n,{delay:e=0,duration:t=400,easing:i=Vo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>`
|
||||
transform: ${a} scale(${1-u*d});
|
||||
opacity: ${r-f*d}
|
||||
`}}function b1(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,o){k(l,e,o),n[13](e),Me(e,n[7]),i||(s=G(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&Me(e,l[7])},i:le,o:le,d(l){l&&y(e),n[13](null),i=!1,s()}}}function v1(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(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 o&&(e=new o(r(n)),he.push(()=>Re(e,"value",l)),e.$on("submit",n[10])),{c(){e&&V(e.$$.fragment),i=Xe()},m(a,u){e&&j(e,a,u),k(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],He(()=>t=!1)),o!==(o=a[4])){if(e){Pe();const c=e;P(c.$$.fragment,1,0,()=>{q(c,1)}),Le()}o?(e=new o(r(a)),he.push(()=>Re(e,"value",l)),e.$on("submit",a[10]),V(e.$$.fragment),E(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&y(i),e&&q(e,a)}}}function Pu(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Lu();return{c(){r&&r.c(),e=T(),t=_("button"),t.innerHTML='<span class="txt">Clear</span>',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){r&&r.m(a,u),k(a,e,u),k(a,t,u),s=!0,l||(o=G(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&E(r,1):(r=Lu(),r.c(),E(r,1),r.m(e.parentNode,e)):r&&(Pe(),P(r,1,1,()=>{r=null}),Le())},i(a){s||(E(r),a&&Dt(()=>{i||(i=rt(t,qn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=rt(t,qn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&y(e),a&&y(t),a&&i&&i.end(),l=!1,o()}}}function Lu(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Search</span>',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){k(s,e,l),i=!0},i(s){i||(s&&Dt(()=>{t||(t=rt(e,qn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=rt(e,qn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&y(e),s&&t&&t.end()}}}function y1(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[v1,b1],h=[];function g(b,w){return b[4]&&!b[5]?0:1}o=g(n),r=h[o]=d[o](n);let v=(n[0].length||n[7].length)&&Pu(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=T(),r.c(),a=T(),v&&v.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,w){k(b,e,w),m(e,t),m(t,i),m(i,s),m(t,l),h[o].m(t,null),m(t,a),v&&v.m(t,null),u=!0,f||(c=[G(t,"submit",Yt(n[10])),G(e,"click",Qn(n[11]))],f=!0)},p(b,[w]){let C=o;o=g(b),o===C?h[o].p(b,w):(Pe(),P(h[C],1,1,()=>{h[C]=null}),Le(),r=h[o],r?r.p(b,w):(r=h[o]=d[o](b),r.c()),E(r,1),r.m(t,a)),b[0].length||b[7].length?v?(v.p(b,w),w&129&&E(v,1)):(v=Pu(b),v.c(),E(v,1),v.m(t,null)):v&&(Pe(),P(v,1,1,()=>{v=null}),Le())},i(b){u||(E(r),E(v),u=!0)},o(b){P(r),P(v),u=!1},d(b){b&&y(e),h[o].d(),v&&v.d(),f=!1,Qe(c)}}}function k1(n,e,t){const i=ln(),s="search_"+Y.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new An}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function v(){u||f||(t(5,f=!0),t(4,u=(await Ji(()=>import("./FilterAutocompleteInput.413a6b0b.js"),[],import.meta.url)).default),t(5,f=!1))}Wn(()=>{v()});function b(M){ut.call(this,n,M)}function w(M){d=M,t(7,d),t(0,l)}function C(M){he[M?"unshift":"push"](()=>{c=M,t(6,c)})}function S(){d=this.value,t(7,d),t(0,l)}const $=()=>{h(!1),g()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,g,b,w,C,S,$]}class zo extends Ee{constructor(e){super(),Oe(this,e,k1,y1,De,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let jr,zi;const qr="app-tooltip";function Fu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Pi(){return zi=zi||document.querySelector("."+qr),zi||(zi=document.createElement("div"),zi.classList.add(qr),document.body.appendChild(zi)),zi}function fg(n,e){let t=Pi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Vr();return}t.textContent=e.text,t.className=qr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.to
Line truncated
|
||||
<span class="txt">method</span>`,p(e,"class","col-header-content")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function P1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="url",p(t,"class",Y.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function L1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="referer",p(t,"class",Y.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function F1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="status",p(t,"class",Y.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function I1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",p(t,"class",Y.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function Nu(n){let e;function t(l,o){return l[6]?R1:N1}let i=t(n),s=i(n);return{c(){s.c(),e=Xe()},m(l,o){s.m(l,o),k(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&y(e)}}}function N1(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Ru(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No logs found.",s=T(),o&&o.c(),l=T(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){k(a,e,u),m(e,t),m(t,i),m(t,s),o&&o.m(t,null),m(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Ru(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&y(e),o&&o.d()}}}function R1(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
|
||||
`},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function Ru(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[18]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function Hu(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){k(t,e,i)},d(t){t&&y(e)}}}function ju(n,e){var se,ge,$e;let t,i,s,l=((se=e[21].method)==null?void 0:se.toUpperCase())+"",o,r,a,u,f,c=e[21].url+"",d,h,g,v,b,w,C=(e[21].referer||"N/A")+"",S,$,M,D,O,A=e[21].status+"",L,F,R,B,te,Z,H,J,U,Q,oe=(((ge=e[21].meta)==null?void 0:ge.errorMessage)||(($e=e[21].meta)==null?void 0:$e.errorData))&&Hu();B=new yi({props:{date:e[21].created}});function ae(){return e[16](e[21])}function be(...W){return e[17](e[21],...W)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("span"),o=N(l),a=T(),u=_("td"),f=_("span"),d=N(c),g=T(),oe&&oe.c(),v=T(),b=_("td"),w=_("span"),S=N(C),M=T(),D=_("td"),O=_("span"),L=N(A),F=T(),R=_("td"),V(B.$$.fragment),te=T(),Z=_("td"),Z.innerHTML='<i class="ri-arrow-right-line"></i>',H=T(),p(s,"class",r="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(w,"class","txt txt-ellipsis"),p(w,"title",$=e[21].referer),ne(w,"txt-hint",!e[21].referer),p(b,"class","col-type-text col-field-referer"),p(O,"class","label"),ne(O,"label-danger",e[21].status>=400),p(D,"class","col-type-number col-field-status"),p(R,"class","col-type-date col-field-created"),p(Z,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(W,ye){k(W,t,ye),m(t,i),m(i,s),m(s,o),m(t,a),m(t,u),m(u,f),m(f,d),m(u,g),oe&&oe.m(u,null),m(t,v),m(t,b),m(b,w),m(w,S),m(t,M),m(t,D),m(D,O),m(O,L),m(t,F),m(t,R),j(B,R,null),m(t,te),m(t,Z),m(t,H),J=!0,U||(Q=[G(t,"click",ae),G(t,"keydown",be)],U=!0)},p(W,ye){var X,Se,je;e=W,(!J||ye&8)&&l!==(l=((X=e[21].method)==null?void 0:X.toUpperCase())+"")&&pe(o,l),(!J||ye&8&&r!==(r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&p(s,"class",r),(!J||ye&8)&&c!==(c=e[21].url+"")&&pe(d,c),(!J||ye&8&&h!==(h=e[21].url))&&p(f,"title",h),((Se=e[21].meta)==null?void 0:Se.errorMessage)||((je=e[21].meta)==null?void 0:je.errorData)?oe||(oe=Hu(),oe.c(),oe.m(u,null)):oe&&(oe.d(1),oe=null),(!J||ye&8)&&C!==(C=(e[21].referer||"N/A")+"")&&pe(S,C),(!J||ye&8&&$!==($=e[21].referer))&&p(w,"title",$),ye&8&&ne(w,"txt-hint",!e[21].referer),(!J||ye&8)&&A!==(A=e[21].status+"")&&pe(L,A),ye&8&&ne(O,"label-danger",e[21].status>=400);const ee={};ye&8&&(ee.date=e[21].created),B.$set(ee)},i(W){J||(E(B.$$.fragment,W),J=!0)},o(W){P(B.$$.fragment,W),J=!1},d(W){W&&y(t),oe&&oe.d(),q(B),U=!1,Qe(Q)}}}function qu(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){k(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a&8&&i!==(i=r[3].length+"")&&pe(s,i),a&16&&pe(o,r[4])},d(r){r&&y(e)}}}function Vu(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),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){k(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=G(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&pe(o,l),c&64&&ne(t,"btn-loading",f[6]),c&64&&ne(t,"btn-disabled",f[6])},d(f){f&&y(e),a=!1,u()}}}function H1(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C,S,$,M,D,O=[],A=new Map,L,F,R,B;function te(X){n[11](X)}let Z={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[A1]},$$scope:{ctx:n}};n[1]!==void 0&&(Z.sort=n[1]),l=new nn({props:Z}),he.push(()=>Re(l,"sort",te));function H(X){n[12](X)}let J={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[P1]},$$scope:{ctx:n}};n[1]!==void 0&&(J.sort=n[1]),a=new nn({props:J}),he.push(()=>Re(a,"sort",H));function U(X){n[13](X)}let Q={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[L1]},$$scope:{ctx:n}};n[1]!==void 0&&(Q.sort=n[1]),c=new nn({props:Q}),he.push(()=>Re(c,"sort",U));function oe(X){n[14](X)}let ae={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[F1]},$$scope:{ctx:n}};n[1]!==void 0&&(ae.sort=n[1]),g=new nn({props:ae}),he.push(()=>Re(g,"sort",oe));function be(X){n[15](X)}let se={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[I1]},$$scope:{ctx:n}};n[1]!==void 0&&(se.sort=n[1]),w=new nn({props:se}),he.push(()=>Re(w,"sort",be));let ge=n[3];const $e=X=>X[21].id;for(let X=0;X<ge.length;X+=1){let Se=Iu(n,ge,X),je=$e(Se);A.set(je,O[X]=ju(je,Se))}let W=null;ge.length||(W=Nu(
Line truncated
|
||||
* Chart.js v3.9.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/function hi(){}const V1=function(){let n=0;return function(){return n++}}();function Mt(n){return n===null||typeof n>"u"}function It(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function dt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Wt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function Fn(n,e){return Wt(n)?n:e}function _t(n,e){return typeof n>"u"?e:n}const z1=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,cg=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function zt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function Tt(n,e,t,i){let s,l,o;if(It(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<l;s++)e.call(t,n[s],s);else if(dt(n))for(o=Object.keys(n),l=o.length,s=0;s<l;s++)e.call(t,n[o[s]],o[s])}function vo(n,e){let t,i,s,l;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],l=e[t],s.datasetIndex!==l.datasetIndex||s.index!==l.index)return!1;return!0}function yo(n){if(It(n))return n.map(yo);if(dt(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=yo(n[t[s]]);return e}return n}function dg(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function B1(n,e,t,i){if(!dg(n))return;const s=e[n],l=t[n];dt(s)&&dt(l)?rl(s,l,i):e[n]=yo(l)}function rl(n,e,t){const i=It(e)?e:[e],s=i.length;if(!dt(n))return n;t=t||{};const l=t.merger||B1;for(let o=0;o<s;++o){if(e=i[o],!dt(e))continue;const r=Object.keys(e);for(let a=0,u=r.length;a<u;++a)l(r[a],n,e,t)}return n}function Qs(n,e){return rl(n,e,{merger:U1})}function U1(n,e,t){if(!dg(n))return;const i=e[n],s=t[n];dt(i)&&dt(s)?Qs(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=yo(s))}const zu={"":n=>n,x:n=>n.x,y:n=>n.y};function Fi(n,e){return(zu[e]||(zu[e]=W1(e)))(n)}function W1(n){const e=Y1(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Y1(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function ya(n){return n.charAt(0).toUpperCase()+n.slice(1)}const zn=n=>typeof n<"u",Ii=n=>typeof n=="function",Bu=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function K1(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ut=Math.PI,Et=2*Ut,Z1=Et+Ut,ko=Number.POSITIVE_INFINITY,J1=Ut/180,Bt=Ut/2,Rs=Ut/4,Uu=Ut*2/3,Hn=Math.log10,oi=Math.sign;function Wu(n){const e=Math.round(n);n=xs(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Hn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function G1(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,l)=>s-l).pop(),e}function $s(n){return!isNaN(parseFloat(n))&&isFinite(n)}function xs(n,e,t){return Math.abs(n-e)<t}function X1(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function pg(n,e,t){let i,s,l;for(i=0,s=n.length;i<s;i++)l=n[i][t],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function Jn(n){return n*(Ut/180)}function ka(n){return n*(180/Ut)}function Yu(n){if(!Wt(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function hg(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let l=Math.atan2(i,t);return l<-.5*Ut&&(l+=Et),{angle:l,distance:s}}function zr(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function Q1(n,e){return(n-e+Z1)%Et-Ut}function Dn(n){return(n%Et+Et)%Et}function al(n,e,t,i){const s=Dn(n),l=Dn(e),o=Dn(t),r=Dn(l-s),a=Dn(o-s),u=Dn(s-l),f=Dn(s-o);return s===l||s===o||i&&l===o||r>a&&u<f}function an(n,e,t){return Math.max(e,Math.min(t,n))}function x1(n){return an(n,-32768,32767)}function ul(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function wa(n,e,t){t=t||(o=>n[o]<e);let i=n.length-1,s=0,l;for(;i-s>1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const Xi=(n,e,t,i)=>wa(n,t,i?s=>n[s][e]<=t:s=>n[s][e]<t),ev=(n,e,t)=>wa(n,t,i=>n[i][e]>=t);function tv(n,e,t){let i=0,s=n.length;for(;i<s&&n[i]<e;)i++;for(;s>i&&n[s-1]>t;)s--;return i>0||s<n.length?n.slice(i,s):n}const mg=["push","pop","shift","splice","unshift"];function nv(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),mg.forEach(t=>{const i="_onData"+ya(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function Ku(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(mg.forEach(l=>{delete n[l]}),delete n._chartjs)}function gg(n){const e=new Set;let t,i;for(t=0,i=n.length;t<i;++t)e.add(n[t]);return e.size===i?n:Array.from(e)}const _g=function(){return typeof window>"u"?function(n){return n()}:window.requestLine truncated
|
||||
* @kurkle/color v0.2.1
|
||||
* https://github.com/kurkle/color#readme
|
||||
* (c) 2022 Jukka Kurkela
|
||||
* Released under the MIT License
|
||||
*/function yl(n){return n+.5|0}const Ei=(n,e,t)=>Math.max(Math.min(n,t),e);function Ks(n){return Ei(yl(n*2.55),0,255)}function Li(n){return Ei(yl(n*255),0,255)}function _i(n){return Ei(yl(n/2.55)/100,0,1)}function Xu(n){return Ei(yl(n*100),0,100)}const Ln={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Br=[..."0123456789ABCDEF"],lv=n=>Br[n&15],ov=n=>Br[(n&240)>>4]+Br[n&15],jl=n=>(n&240)>>4===(n&15),rv=n=>jl(n.r)&&jl(n.g)&&jl(n.b)&&jl(n.a);function av(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Ln[n[1]]*17,g:255&Ln[n[2]]*17,b:255&Ln[n[3]]*17,a:e===5?Ln[n[4]]*17:255}:(e===7||e===9)&&(t={r:Ln[n[1]]<<4|Ln[n[2]],g:Ln[n[3]]<<4|Ln[n[4]],b:Ln[n[5]]<<4|Ln[n[6]],a:e===9?Ln[n[7]]<<4|Ln[n[8]]:255})),t}const uv=(n,e)=>n<255?e(n):"";function fv(n){var e=rv(n)?lv:ov;return n?"#"+e(n.r)+e(n.g)+e(n.b)+uv(n.a,e):void 0}const cv=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function kg(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function dv(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function pv(n,e,t){const i=kg(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function hv(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function $a(n){const t=n.r/255,i=n.g/255,s=n.b/255,l=Math.max(t,i,s),o=Math.min(t,i,s),r=(l+o)/2;let a,u,f;return l!==o&&(f=l-o,u=r>.5?f/(2-l-o):f/(l+o),a=hv(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Sa(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Li)}function Ca(n,e,t){return Sa(kg,n,e,t)}function mv(n,e,t){return Sa(pv,n,e,t)}function gv(n,e,t){return Sa(dv,n,e,t)}function wg(n){return(n%360+360)%360}function _v(n){const e=cv.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Ks(+e[5]):Li(+e[5]));const s=wg(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=mv(s,l,o):e[1]==="hsv"?i=gv(s,l,o):i=Ca(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function bv(n,e){var t=$a(n);t[0]=wg(t[0]+e),t=Ca(t),n.r=t[0],n.g=t[1],n.b=t[2]}function vv(n){if(!n)return;const e=$a(n),t=e[0],i=Xu(e[1]),s=Xu(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${_i(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Qu={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},xu={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function yv(){const n={},e=Object.keys(xu),t=Object.keys(Qu);let i,s,l,o,r;for(i=0;i<e.length;i++){for(o=r=e[i],s=0;s<t.length;s++)l=t[s]Line truncated
|
||||
* Chart.js v3.9.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/class wy{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],o=t.duration;l.forEach(r=>r({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=_g.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var mi=new wy;const df="transparent",$y={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=tf(n||df),s=i.valid&&tf(e||df);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class Sy{constructor(e,t,i,s){const l=t[i];s=zl([e.to,s,l,e.from]);const o=zl([e.from,l,s]);this._active=!0,this._fn=e.fn||$y[e.type||typeof o],this._easing=el[e.easing]||el.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=zl([e.to,t,s,e.from]),this._from=zl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t<i),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}}const Cy=["x","y","borderWidth","radius","tension"],My=["color","borderColor","backgroundColor"];bt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const Ty=Object.keys(bt.animation);bt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});bt.set("animations",{colors:{type:"color",properties:My},numbers:{type:"number",properties:Cy}});bt.describe("animations",{_fallback:"animation"});bt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class Rg{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!dt(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!dt(s))return;const l={};for(const o of Ty)l[o]=s[o];(It(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=Oy(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&Dy(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new Sy(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return mi.add(this._chart,i),!0}}function Dy(n,e){const t=[]Line truncated
|
||||
`)>-1?n.split(`
|
||||
`):n}function Bw(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function Bf(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=On(e.bodyFont),u=On(e.titleFont),f=On(e.footerFont),c=l.length,d=s.length,h=i.length,g=Bn(e.padding);let v=g.height,b=0,w=i.reduce(($,M)=>$+M.before.length+M.lines.length+M.after.length,0);if(w+=n.beforeBody.length+n.afterBody.length,c&&(v+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),w){const $=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;v+=h*$+(w-h)*a.lineHeight+(w-1)*e.bodySpacing}d&&(v+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let C=0;const S=function($){b=Math.max(b,t.measureText($).width+C)};return t.save(),t.font=u.string,Tt(n.title,S),t.font=a.string,Tt(n.beforeBody.concat(n.afterBody),S),C=e.displayColors?o+2+e.boxPadding:0,Tt(i,$=>{Tt($.before,S),Tt($.lines,S),Tt($.after,S)}),C=0,t.font=f.string,Tt(n.footer,S),t.restore(),b+=g.width,{width:b,height:v}}function Uw(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function Ww(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function Yw(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),Ww(u,n,e,t)&&(u="center"),u}function Uf(n,e,t){const i=t.yAlign||e.yAlign||Uw(n,t);return{xAlign:t.xAlign||e.xAlign||Yw(n,e,t,i),yAlign:i}}function Kw(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function Zw(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function Wf(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=bs(o);let g=Kw(e,r);const v=Zw(e,a,u);return a==="center"?r==="left"?g+=u:r==="right"&&(g-=u):r==="left"?g-=Math.max(f,d)+s:r==="right"&&(g+=Math.max(c,h)+s),{x:an(g,0,i.width-e.width),y:an(v,0,i.height-e.height)}}function Jl(n,e,t){const i=Bn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function Yf(n){return ii([],gi(n))}function Jw(n,e,t){return Ni(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Kf(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class Qr extends $i{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new Rg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=Jw(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=ii(r,gi(s)),r=ii(r,gi(l)),r=ii(r,gi(o)),r}getBeforeBody(e,t){return Yf(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return Tt(e,l=>{const o={before:[],lines:[],after:[]},r=Kf(i,l);ii(o.before,gi(r.beforeLabel.call(this,l))),ii(o.lines,r.label.call(this,l)),ii(o.after,gi(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return Yf(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=ii(r,gi(s)),r=ii(r,gi(l)),r=ii(r,gi(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;a<u;++a)r.push(Bw(this.chart,t[a]));return e.filter&&(r=r.filter((f,c,d)=>e.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),Tt(r,f=>{const c=Kf(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;l
Line truncated
|
||||
* chartjs-adapter-luxon v1.2.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 chartjs-adapter-luxon Contributors
|
||||
* Released under the MIT license
|
||||
*/const g2={datetime:Ge.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Ge.TIME_WITH_SECONDS,minute:Ge.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};zg._date.override({_id:"luxon",_create:function(n){return Ge.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return g2},parse:function(n,e){const t=this.options,i=typeof n;return n===null||i==="undefined"?null:(i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Ge.fromFormat(n,e,t):n=Ge.fromISO(n,t):n instanceof Date?n=Ge.fromJSDate(n,t):i==="object"&&!(n instanceof Ge)&&(n=Ge.fromObject(n,t)),n.isValid?n.valueOf():null)},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e):t.toLocaleString(e)},add:function(n,e,t){const i={};return i[t]=e,this._create(n).plus(i).valueOf()},diff:function(n,e,t){return this._create(n).diff(this._create(e)).as(t).valueOf()},startOf:function(n,e,t){if(e==="isoWeek"){t=Math.trunc(Math.min(Math.max(0,t),6));const i=this._create(n);return i.minus({days:(i.weekday-t+7)%7}).startOf("day").valueOf()}return e?this._create(n).startOf(e).valueOf():n},endOf:function(n,e){return this._create(n).endOf(e).valueOf()}});function tc(n){let e,t,i;return{c(){e=_("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){k(s,e,l),i=!0},i(s){i||(s&&Dt(()=>{t||(t=rt(e,Vn,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=rt(e,Vn,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&y(e),s&&t&&t.end()}}}function _2(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=N(n[1]),t=T(),s=N(i)},m(l,o){k(l,e,o),k(l,t,o),k(l,s,o)},p(l,o){o&2&&pe(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&pe(s,i)},d(l){l&&y(e),l&&y(t),l&&y(s)}}}function b2(n){let e;return{c(){e=N("Loading...")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function v2(n){let e,t,i,s,l,o=n[2]&&tc();function r(f,c){return f[2]?b2:_2}let a=r(n),u=a(n);return{c(){e=_("div"),o&&o.c(),t=T(),i=_("canvas"),s=T(),l=_("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Ja(i,"height","250px"),Ja(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),ne(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){k(f,e,c),o&&o.m(e,null),m(e,t),m(e,i),n[8](i),k(f,s,c),k(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&E(o,1):(o=tc(),o.c(),E(o,1),o.m(e,t)):o&&(Pe(),P(o,1,1,()=>{o=null}),Le()),c&4&&ne(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){E(o)},o(f){P(o)},d(f){f&&y(e),o&&o.d(),n[8](null),f&&y(s),f&&y(l),u.d()}}}function y2(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),_e.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let g of h)r.push({x:Y.getDateTime(g.date).toLocal().toJSDate(),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(c(),console.warn(h),_e.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Wn(()=>(Oo.register(Ri,Ko,Wo,Va,Sl,zw,Gw),t(6,o=new Oo(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(h){he[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class k2 extends Ee{constructor(e){super(),Oe(this,e,y2,v2,De,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var nc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a_={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
||||
* Prism: Lightweight, robust, elegant syntax highlighting
|
||||
*
|
||||
* @license MIT <https://opensource.org/licenses/MIT>
|
||||
* @author Lea Verou <https://lea.verou.me>
|
||||
* @namespace
|
||||
* @public
|
||||
*/var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function C(S){return S instanceof a?new a(S.type,C(S.content),S.alias):Array.isArray(S)?S.map(C):S.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(C){return Object.prototype.toString.call(C).slice(8,-1)},objId:function(C){return C.__id||Object.defineProperty(C,"__id",{value:++l}),C.__id},clone:function C(S,$){$=$||{};var M,D;switch(r.util.type(S)){case"Object":if(D=r.util.objId(S),$[D])return $[D];M={},$[D]=M;for(var O in S)S.hasOwnProperty(O)&&(M[O]=C(S[O],$));return M;case"Array":return D=r.util.objId(S),$[D]?$[D]:(M=[],$[D]=M,S.forEach(function(A,L){M[L]=C(A,$)}),M);default:return S}},getLanguage:function(C){for(;C;){var S=s.exec(C.className);if(S)return S[1].toLowerCase();C=C.parentElement}return"none"},setLanguage:function(C,S){C.className=C.className.replace(RegExp(s,"gi"),""),C.classList.add("language-"+S)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var C=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(C){var S=document.getElementsByTagName("script");for(var $ in S)if(S[$].src==C)return S[$]}return null}},isActive:function(C,S,$){for(var M="no-"+S;C;){var D=C.classList;if(D.contains(S))return!0;if(D.contains(M))return!1;C=C.parentElement}return!!$}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(C,S){var $=r.util.clone(r.languages[C]);for(var M in S)$[M]=S[M];return $},insertBefore:function(C,S,$,M){M=M||r.languages;var D=M[C],O={};for(var A in D)if(D.hasOwnProperty(A)){if(A==S)for(var L in $)$.hasOwnProperty(L)&&(O[L]=$[L]);$.hasOwnProperty(A)||(O[A]=D[A])}var F=M[C];return M[C]=O,r.languages.DFS(r.languages,function(R,B){B===F&&R!=C&&(this[R]=O)}),O},DFS:function C(S,$,M,D){D=D||{};var O=r.util.objId;for(var A in S)if(S.hasOwnProperty(A)){$.call(S,A,S[A],M||A);var L=S[A],F=r.util.type(L);F==="Object"&&!D[O(L)]?(D[O(L)]=!0,C(L,$,null,D)):F==="Array"&&!D[O(L)]&&(D[O(L)]=!0,C(L,$,A,D))}}},plugins:{},highlightAll:function(C,S){r.highlightAllUnder(document,C,S)},highlightAllUnder:function(C,S,$){var M={callback:$,container:C,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),r.hooks.run("before-all-elements-highlight",M);for(var D=0,O;O=M.elements[D++];)r.highlightElement(O,S===!0,M.callback)},highlightElement:function(C,S,$){var M=r.util.getLanguage(C),D=r.languages[M];r.util.setLanguage(C,M);var O=C.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,M);var A=C.textContent,L={element:C,language:M,grammar:D,code:A};function F(B){L.highlightedCode=B,r.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,r.hooks.run("after-highlight",L),r.hooks.run("complete",L),$&&$.call(L.element)}if(r.hooks.run("before-sanity-check",L),O=L.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!L.code){r.hooks.run("complete",L),$&&$.call(L.element);return}if(r.hooks.run("before-highlight",L),!L.grammar){F(r.util.encode(L.code));return}if(S&&i.Worker){var R=new Worker(r.filename);R.onmessage=function(B){F(B.data)},R.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else F(r.highlight(L.code,L.grammar,L.language))},highlight:function(C,S,$){var M={code:C,grammar:S,language:$};if(r.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=r.tokenize(M.code,M.grammar),r.hooks.run("after-tokenize",M),a.stringify(r.util.encode(M.tokens),M.language)},tokenize:function(C,S){var $=S.rest;if($){for(var M in $)S[M]=$[M];delete S.rest}var D=new c;return d(D,D.head,C),f(C,D,S,D.head,0),g(D)},hooks:{all:{},add:function(C,S){var $=r.hooks.all;$[C]=$[C]||[],$[C].push(S)},run:function(C,S){var $=r.hooks.all[C];if(!(!$||!$.length))for(var M=0,D;D=$[M++];)D(S)}},Token:a};i.Prism=r;function a(C,S,$,M){this.type=C,this.content=S,this.alias=$,this.length=(M||"").length|0}a.stringify=function C(S,$){if(typeof S=="string")return S;if(Array.isArray(S)){var M="";return S.forEach(function(F){M+=C(F,$)}),M}var D={type:S.type,content:C(S.content,$),tag:"span",classes:["token",S.type],attributes:{},language:$},O=S.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(D.classes,O):D.classes.push(O)),r.hooks.run("wrap",D);var A="";for(var L in D.attributes)A+=" "+L+'="'+(D.attributes[L]||"").replace(/"/g,""")+'"';return"<"+D.tag+' class="'+D.classes.join(" ")+'"'+A+">"+D.content+"</"+D.tag+">"};function u(C,S,$,M){C.lastIndex=S;var D=C.exec($);if(D&&M&&D[1]){var O=D[1].length;D.index+=O,D[0]=D[0].slice(O)}return D}funLine truncated
|
||||
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}w.textContent=D,t.highlightElement(w)},function(D){b.setAttribute(r,f),w.textContent=D})}}),t.plugins.fileHighlight={highlight:function(b){for(var w=(b||document).querySelectorAll(c),C=0,S;S=w[C++];)t.highlightElement(S)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(a_);const Bs=a_.exports;var w2={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(l,o){for(var r in o)o.hasOwnProperty(r)&&(l[r]=o[r]);return l};function t(l){this.defaults=e({},l)}function i(l){return l.replace(/-(\w)/g,function(o,r){return r.toUpperCase()})}function s(l){for(var o=0,r=0;r<l.length;++r)l.charCodeAt(r)==" ".charCodeAt(0)&&(o+=3);return l.length+o}t.prototype={setDefaults:function(l){this.defaults=e(this.defaults,l)},normalize:function(l,o){o=e(this.defaults,o);for(var r in o){var a=i(r);r!=="normalize"&&a!=="setDefaults"&&o[r]&&this[a]&&(l=this[a].call(this,l,o[r]))}return l},leftTrim:function(l){return l.replace(/^\s+/,"")},rightTrim:function(l){return l.replace(/\s+$/,"")},tabsToSpaces:function(l,o){return o=o|0||4,l.replace(/\t/g,new Array(++o).join(" "))},spacesToTabs:function(l,o){return o=o|0||4,l.replace(RegExp(" {"+o+"}","g")," ")},removeTrailing:function(l){return l.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(l){return l.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(l){var o=l.match(/^[^\S\n\r]*(?=\S)/gm);return!o||!o[0].length||(o.sort(function(r,a){return r.length-a.length}),!o[0].length)?l:l.replace(RegExp("^"+o[0],"gm"),"")},indent:function(l,o){return l.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++o).join(" ")+"$&")},breakLines:function(l,o){o=o===!0?80:o|0||80;for(var r=l.split(`
|
||||
`),a=0;a<r.length;++a)if(!(s(r[a])<=o)){for(var u=r[a].split(/(\s+)/g),f=0,c=0;c<u.length;++c){var d=s(u[c]);f+=d,f>o&&(u[c]=`
|
||||
`+u[c],f=d)}r[a]=u.join("")}return r.join(`
|
||||
`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(l){var o=Prism.plugins.NormalizeWhitespace;if(!(l.settings&&l.settings["whitespace-normalization"]===!1)&&!!Prism.util.isActive(l.element,"whitespace-normalization",!0)){if((!l.element||!l.element.parentNode)&&l.code){l.code=o.normalize(l.code,l.settings);return}var r=l.element.parentNode;if(!(!l.code||!r||r.nodeName.toLowerCase()!=="pre")){for(var a=r.childNodes,u="",f="",c=!1,d=0;d<a.length;++d){var h=a[d];h==l.element?c=!0:h.nodeName==="#text"&&(c?f+=h.nodeValue:u+=h.nodeValue,r.removeChild(h),--d)}if(!l.element.children.length||!Prism.plugins.KeepMarkup)l.code=u+l.code+f,l.code=o.normalize(l.code,l.settings);else{var g=u+l.element.innerHTML+f;l.element.innerHTML=o.normalize(g,l.settings),l.code=l.element.textContent}}}})})()})(w2);(function(n){var e=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};n.languages.dart=n.languages.extend("clike",{"class-name":[i,{pattern:RegExp(t+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:i.inside}],keyword:e,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function $2(n){let e,t,i;return{c(){e=_("div"),t=_("code"),p(t,"class","svelte-1ua9m3i"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-1ua9m3i")},m(s,l){k(s,e,l),m(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-1ua9m3i")&&p(e,"class",i)},i:le,o:le,d(s){s&&y(e)}}}function S2(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Bs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Bs.highlight(a,Bs.languages[l]||Bs.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof Bs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class hn extends Ee{constructor(e){super(),Oe(this,e,S2,$2,De,{class:0,content:2,language:3})}}const C2=n=>({}),ic=n=>({}),M2=n=>({}),sc=n=>({});function lc(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C,S=n[4]&&!n[2]&&oc(n);const $=n[18].header,M=yn($,n,n[17],sc);let D=n[4]&&n[2]&&rc(n);const O=n[18].default,A=yn(O,n,n[17],null),L=n[18].footer,F=yn(L,n,n[17],ic);return{c(){e=_("div"),t=_("div"),s=T(),l=_("div"),o=_("div"),S&&S.c(),r=T(),M&&M.c(),a=T(),D&&D.c(),u=T(),f=_("div"),A&&A.c(),c=T(),d=_("div"),F&&F.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",h="overlay-panel "+n[1]+" "+n[8]),ne(l,"popup",n[2]),p(e,"class","overlay-panel-container"),ne(e,"padded",n[2]),ne(e,"active",n[0])},m(R,B){k(R,e,B),m(e,t),m(e,s),m(e,l),m(l,o),S&&S.m(o,null),m(o,r),M&&M.m(o,null),m(o,a),D&&D.m(o,null),m(l,u),m(l,f),A&&A.m(f,null),n[20](f),m(l,c),m(l,d),F&&F.m(d,null),b=!0,w||(C=[G(t,"click",Yt(n[19])),G(f,"scroll",n[21])],w=!0)},p(R,B){n=R,n[4]&&!n[2]?S?S.p(n,B):(S=oc(n),S.c(),S.m(o,r)):S&&(S.d(1),S=null),M&&M.p&&(!b||B&131072)&&wn(M,$,n,n[17],b?kn($,n[17],B,M2):$n(n[17]),sc),n[4]&&n[2]?D?D.p(n,B):(D=rc(n),D.c(),D.m(o,null)):D&&(D.d(1),D=null),A&&A.p&&(!b||B&131072)&&wn(A,O,n,n[17],b?kn(O,n[17],B,null):$n(n[17]),null),F&&F.p&&(!b||B&131072)&&wn(F,L,n,n[17],b?kn(L,n[17],B,C2):$n(n[17]),ic),(!b||B&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),B&262&&ne(l,"popup",n[2]),B&4&&ne(e,"padded",n[2]),B&1&&ne(e,"active",n[0])},i(R){b||(Dt(()=>{i||(i=rt(t,bo,{duration:ms,opacity:0},!0)),i
Line truncated
|
||||
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,w){(!c||w&16&&l!==(l=b[4]))&&p(e,"for",l);const C={};w&16&&(C.id=b[4]),w&1&&(C.disabled=!Y.isEmpty(b[0].onlyDomains)),!a&&w&1&&(a=!0,C.value=b[0].exceptDomains,He(()=>a=!1)),r.$set(C)},i(b){c||(E(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&y(e),b&&y(o),q(r,b),b&&y(u),b&&y(f),d=!1,h()}}}function L$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(b){n[3](b)}let v={id:n[4]+".options.onlyDomains",disabled:!Y.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new us({props:v}),he.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=T(),s=_("i"),o=T(),V(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(b,w){k(b,e,w),m(e,t),m(e,i),m(e,s),k(b,o,w),j(r,b,w),k(b,u,w),k(b,f,w),c=!0,d||(h=Ye(Ct.call(null,s,{text:`List of domains that are ONLY allowed.
|
||||
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,w){(!c||w&16&&l!==(l=b[4]+".options.onlyDomains"))&&p(e,"for",l);const C={};w&16&&(C.id=b[4]+".options.onlyDomains"),w&1&&(C.disabled=!Y.isEmpty(b[0].exceptDomains)),!a&&w&1&&(a=!0,C.value=b[0].onlyDomains,He(()=>a=!1)),r.$set(C)},i(b){c||(E(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&y(e),b&&y(o),q(r,b),b&&y(u),b&&y(f),d=!1,h()}}}function F$(n){let e,t,i,s,l,o,r;return i=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[P$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[L$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),V(i.$$.fragment),s=T(),l=_("div"),V(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){k(a,e,u),m(e,t),j(i,t,null),m(e,s),m(e,l),j(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&y(e),q(i),q(o)}}}function I$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class d_ extends Ee{constructor(e){super(),Oe(this,e,I$,F$,De,{key:1,options:0})}}function N$(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new d_({props:r}),he.push(()=>Re(e,"key",l)),he.push(()=>Re(e,"options",o)),{c(){V(e.$$.fragment)},m(a,u){j(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],He(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],He(()=>i=!1)),e.$set(f)},i(a){s||(E(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){q(e,a)}}}function R$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class H$ extends Ee{constructor(e){super(),Oe(this,e,R$,N$,De,{key:0,options:1})}}var yr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],vs={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},dl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to togg
Line truncated
|
||||
<span class='flatpickr-weekday'>
|
||||
`+z.join("</span><span class='flatpickr-weekday'>")+`
|
||||
</span>
|
||||
`}}function ae(){t.calendarContainer.classList.add("hasWeeks");var I=St("div","flatpickr-weekwrapper");I.appendChild(St("span","flatpickr-weekday",t.l10n.weekAbbreviation));var z=St("div","flatpickr-weeks");return I.appendChild(z),{weekWrapper:I,weekNumbers:z}}function be(I,z){z===void 0&&(z=!0);var x=z?I:I-t.currentMonth;x<0&&t._hidePrevMonthArrow===!0||x>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=x,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ke("onYearChange"),te()),B(),Ke("onMonthChange"),at())}function se(I,z){if(I===void 0&&(I=!0),z===void 0&&(z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var x=Sr(t.config),re=x.hours,Ae=x.minutes,ie=x.seconds;h(re,Ae,ie)}t.redraw(),I&&Ke("onChange")}function ge(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ke("onClose")}function $e(){t.config!==void 0&&Ke("onDestroy");for(var I=t._handlers.length;I--;)t._handlers[I].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var z=t.calendarContainer.parentNode;if(z.lastChild&&z.removeChild(z.lastChild),z.parentNode){for(;z.firstChild;)z.parentNode.insertBefore(z.firstChild,z);z.parentNode.removeChild(z)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(x){try{delete t[x]}catch{}})}function W(I){return t.calendarContainer.contains(I)}function ye(I){if(t.isOpen&&!t.config.inline){var z=Mn(I),x=W(z),re=z===t.input||z===t.altInput||t.element.contains(z)||I.path&&I.path.indexOf&&(~I.path.indexOf(t.input)||~I.path.indexOf(t.altInput)),Ae=!re&&!x&&!W(I.relatedTarget),ie=!t.config.ignoredFocusElements.some(function(ve){return ve.contains(z)});Ae&&ie&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ee(I){if(!(!I||t.config.minDate&&I<t.config.minDate.getFullYear()||t.config.maxDate&&I>t.config.maxDate.getFullYear())){var z=I,x=t.currentYear!==z;t.currentYear=z||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),x&&(t.redraw(),Ke("onYearChange"),te())}}function X(I,z){var x;z===void 0&&(z=!0);var re=t.parseDate(I,void 0,z);if(t.config.minDate&&re&&Tn(re,t.config.minDate,z!==void 0?z:!t.minDateHasTime)<0||t.config.maxDate&&re&&Tn(re,t.config.maxDate,z!==void 0?z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(re===void 0)return!1;for(var Ae=!!t.config.enable,ie=(x=t.config.enable)!==null&&x!==void 0?x:t.config.disable,ve=0,Te=void 0;ve<ie.length;ve++){if(Te=ie[ve],typeof Te=="function"&&Te(re))return Ae;if(Te instanceof Date&&re!==void 0&&Te.getTime()===re.getTime())return Ae;if(typeof Te=="string"){var ue=t.parseDate(Te,void 0,!0);return ue&&ue.getTime()===re.getTime()?Ae:!Ae}else if(typeof Te=="object"&&re!==void 0&&Te.from&&Te.to&&re.getTime()>=Te.from.getTime()&&re.getTime()<=Te.to.getTime())return Ae}return!Ae}function Se(I){return t.daysContainer!==void 0?I.className.indexOf("hidden")===-1&&I.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(I):!1}function je(I){var z=I.target===t._input,x=t._input.value.trimEnd()!==Pt();z&&x&&!(I.relatedTarget&&W(I.relatedTarget))&&t.setDate(t._input.value,!0,I.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ue(I){var z=Mn
Line truncated
|
||||
`),d=_("span"),h=_("span"),h.textContent="Choose presets",g=T(),V(v.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(h,"class","txt link-primary"),p(d,"class","inline-flex"),p(f,"class","help-block")},m(M,D){k(M,e,D),m(e,t),m(e,i),m(e,s),k(M,o,D),j(r,M,D),k(M,u,D),k(M,f,D),m(f,c),m(f,d),m(d,h),m(d,g),j(v,d,null),b=!0,w||(C=Ye(Ct.call(null,s,{text:`Allow files ONLY with the listed mime types.
|
||||
Leave empty for no restriction.`,position:"top"})),w=!0)},p(M,D){(!b||D&1024&&l!==(l=M[10]))&&p(e,"for",l);const O={};D&1024&&(O.id=M[10]),!a&&D&1&&(a=!0,O.value=M[0].mimeTypes,He(()=>a=!1)),r.$set(O);const A={};D&2049&&(A.$$scope={dirty:D,ctx:M}),v.$set(A)},i(M){b||(E(r.$$.fragment,M),E(v.$$.fragment,M),b=!0)},o(M){P(r.$$.fragment,M),P(v.$$.fragment,M),b=!1},d(M){M&&y(e),M&&y(o),q(r,M),M&&y(u),M&&y(f),q(v),w=!1,C()}}}function cS(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(b){n[9](b)}let v={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(v.value=n[0].thumbs),r=new us({props:v}),he.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Thumb sizes",i=T(),s=_("i"),o=T(),V(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(f,"class","help-block")},m(b,w){k(b,e,w),m(e,t),m(e,i),m(e,s),k(b,o,w),j(r,b,w),k(b,u,w),k(b,f,w),c=!0,d||(h=Ye(Ct.call(null,s,{text:"List of thumb sizes for image files. The thumbs will be generated lazily on first access.",position:"top"})),d=!0)},p(b,w){(!c||w&1024&&l!==(l=b[10]))&&p(e,"for",l);const C={};w&1024&&(C.id=b[10]),!a&&w&1&&(a=!0,C.value=b[0].thumbs,He(()=>a=!1)),r.$set(C)},i(b){c||(E(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&y(e),b&&y(o),q(r,b),b&&y(u),b&&y(f),d=!1,h()}}}function dS(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[rS,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[aS,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[fS,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[cS,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),V(i.$$.fragment),s=T(),l=_("div"),V(o.$$.fragment),r=T(),a=_("div"),V(u.$$.fragment),f=T(),c=_("div"),V(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(g,v){k(g,e,v),m(e,t),j(i,t,null),m(e,s),m(e,l),j(o,l,null),m(e,r),m(e,a),j(u,a,null),m(e,f),m(e,c),j(d,c,null),h=!0},p(g,[v]){const b={};v&2&&(b.name="schema."+g[1]+".options.maxSize"),v&3073&&(b.$$scope={dirty:v,ctx:g}),i.$set(b);const w={};v&2&&(w.name="schema."+g[1]+".options.maxSelect"),v&3073&&(w.$$scope={dirty:v,ctx:g}),o.$set(w);const C={};v&2&&(C.name="schema."+g[1]+".options.mimeTypes"),v&3073&&(C.$$scope={dirty:v,ctx:g}),u.$set(C);const S={};v&2&&(S.name="schema."+g[1]+".options.thumbs"),v&3073&&(S.$$scope={dirty:v,ctx:g}),d.$set(S)},i(g){h||(E(i.$$.fragment,g),E(o.$$.fragment,g),E(u.$$.fragment,g),E(d.$$.fragment,g),h=!0)},o(g){P(i.$$.fragment,g),P(o.$$.fragment,g),P(u.$$.fragment,g),P(d.$$.fragment,g),h=!1},d(g){g&&y(e),q(i),q(o),q(u),q(d)}}}function pS(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=At(this.value),t(0,s)}function o(){s.maxSelect=At(this.value),t(0,s)}function r(h){n.$$.not_equal(s.mimeTypes,h)&&(s.mimeTypes=h,t(0,s))}const a=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(h){n.$$.not_equal(s.thumbs,h)&&(s.thumbs=h,t(0,s))}return n.$$set=h=>{"key"in h&&t(1,i=h.key),"options"in h&&t(0,s=h.options)},n.$$.update=()=>{n.$$.dirty&1&&Y.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class hS extends Ee{constructor(e){super(),Oe(this,e,pS,dS,De,{key:1,options:0})}}function mS(n){let e,t,i,s,l,o,r;function a(f){n[5](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3]};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new as({props:u}),he.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=N("Collection"),s=T(),V(l.$$.fragment),p(e,"for",i=n[9])},m(f,c){k(f,e,c),m(e,t),k(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&512&&i!==(i=f[9]))&&p(e,"for",i);const d={};c&8&&(d.searchable=f[3].length>5),c&4&&(d.selectPlaceholder=f[2]?"Loading...":"Select collection"),c&8&&(d.items=f[3]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,He(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=
Line truncated
|
||||
form-field
|
||||
required
|
||||
`+(n[5]?"":"invalid")+`
|
||||
`+(n[0].id&&n[0].system?"disabled":"")+`
|
||||
`,name:"schema."+n[1]+".name",$$slots:{default:[TS,({uniqueId:B})=>({38:B}),({uniqueId:B})=>[0,B?128:0]]},$$scope:{ctx:n}}});const O=[HS,RS,NS,IS,FS,LS,PS,AS,ES,OS,DS],A=[];function L(B,te){return B[0].type==="text"?0:B[0].type==="number"?1:B[0].type==="bool"?2:B[0].type==="email"?3:B[0].type==="url"?4:B[0].type==="date"?5:B[0].type==="select"?6:B[0].type==="json"?7:B[0].type==="file"?8:B[0].type==="relation"?9:B[0].type==="user"?10:-1}~(f=L(n))&&(c=A[f]=O[f](n)),g=new Ne({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[jS,({uniqueId:B})=>({38:B}),({uniqueId:B})=>[0,B?128:0]]},$$scope:{ctx:n}}});let F=n[0].type!=="file"&&Fc(n),R=!n[0].toDelete&&Ic(n);return{c(){e=_("form"),t=_("div"),i=_("div"),V(s.$$.fragment),l=T(),o=_("div"),V(r.$$.fragment),a=T(),u=_("div"),c&&c.c(),d=T(),h=_("div"),V(g.$$.fragment),v=T(),b=_("div"),F&&F.c(),w=T(),R&&R.c(),C=T(),S=_("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(h,"class","col-sm-4 flex"),p(b,"class","col-sm-4 flex"),p(t,"class","grid"),p(S,"type","submit"),p(S,"class","hidden"),p(S,"tabindex","-1"),p(e,"class","field-form")},m(B,te){k(B,e,te),m(e,t),m(t,i),j(s,i,null),m(t,l),m(t,o),j(r,o,null),m(t,a),m(t,u),~f&&A[f].m(u,null),m(t,d),m(t,h),j(g,h,null),m(t,v),m(t,b),F&&F.m(b,null),m(t,w),R&&R.m(t,null),m(e,C),m(e,S),$=!0,M||(D=G(e,"submit",Yt(n[31])),M=!0)},p(B,te){const Z={};te[0]&1&&(Z.class="form-field required "+(B[0].id?"disabled":"")),te[0]&2&&(Z.name="schema."+B[1]+".type"),te[0]&1|te[1]&384&&(Z.$$scope={dirty:te,ctx:B}),s.$set(Z);const H={};te[0]&33&&(H.class=`
|
||||
form-field
|
||||
required
|
||||
`+(B[5]?"":"invalid")+`
|
||||
`+(B[0].id&&B[0].system?"disabled":"")+`
|
||||
`),te[0]&2&&(H.name="schema."+B[1]+".name"),te[0]&33|te[1]&384&&(H.$$scope={dirty:te,ctx:B}),r.$set(H);let J=f;f=L(B),f===J?~f&&A[f].p(B,te):(c&&(Pe(),P(A[J],1,1,()=>{A[J]=null}),Le()),~f?(c=A[f],c?c.p(B,te):(c=A[f]=O[f](B),c.c()),E(c,1),c.m(u,null)):c=null);const U={};te[0]&1|te[1]&384&&(U.$$scope={dirty:te,ctx:B}),g.$set(U),B[0].type!=="file"?F?(F.p(B,te),te[0]&1&&E(F,1)):(F=Fc(B),F.c(),E(F,1),F.m(b,null)):F&&(Pe(),P(F,1,1,()=>{F=null}),Le()),B[0].toDelete?R&&(Pe(),P(R,1,1,()=>{R=null}),Le()):R?(R.p(B,te),te[0]&1&&E(R,1)):(R=Ic(B),R.c(),E(R,1),R.m(t,null))},i(B){$||(E(s.$$.fragment,B),E(r.$$.fragment,B),E(c),E(g.$$.fragment,B),E(F),E(R),$=!0)},o(B){P(s.$$.fragment,B),P(r.$$.fragment,B),P(c),P(g.$$.fragment,B),P(F),P(R),$=!1},d(B){B&&y(e),q(s),q(r),~f&&A[f].d(),q(g),F&&F.d(),R&&R.d(),M=!1,D()}}}function Rc(n){let e,t,i,s,l=n[0].system&&Hc(),o=!n[0].id&&jc(n),r=n[0].required&&qc(),a=n[0].unique&&Vc();return{c(){e=_("div"),l&&l.c(),t=T(),o&&o.c(),i=T(),r&&r.c(),s=T(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){k(u,e,f),l&&l.m(e,null),m(e,t),o&&o.m(e,null),m(e,i),r&&r.m(e,null),m(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Hc(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=jc(u),o.c(),o.m(e,i)),u[0].required?r||(r=qc(),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=Vc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&y(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Hc(n){let e;return{c(){e=_("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function jc(n){let e;return{c(){e=_("span"),e.textContent="New",p(e,"class","label"),ne(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){k(t,e,i)},p(t,i){i[0]&257&&ne(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&y(e)}}}function qc(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function Vc(n){let e;return{c(){e=_("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function zc(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){k(o,e,r),i=!0,s||(l=Ye(Ct.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Dt(()=>{t||(t=rt(e,Vn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=rt(e,Vn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&y(e),o&&t&&t.end(),s=!1,l()}}}function Bc(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){k(s,e,l),t||(i=G(e,"click",Qn(n[15])),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function BS(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,h,g,v,b,w=!n[0].toDelete&&Rc(n),C=n[7]&&!n[0].system&&zc(),S=n[0].toDelete&&Bc(n);return{c(){e=_("div"),t=_("span"),i=_("i"),l=T(),o=_("strong"),a=N(r),f=T(),w&&w.c(),c=T(),d=_("div"),h=T(),C&&C.c(),g=T(),S&&S.c(),v=Xe(),p(i,"class",s=Za(Y.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),p(t,"class","icon field-type"),p(o,"class","title field-name svelte-1tpxlm5"),p(o,"title",u=n[0].name),ne(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m($,M){k($,e,M),m(e,t),m(t,i),m(e,l),m(e,o),m(o,a),k($,f,M),w&&w.m($,M),k($,c,M),k($,d,M),k($,h,M),C&&C.m($,M),k($,g,M),S&&S.m($,M),k($,v,M),b=!0},p($,M){(!b||M[0]&1&&s!==(s=Za(Y.getFieldTypeIcon($[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!b||M[0]&1)&&r!==(r=($[0].name||"-")+"")&&pe(a,r),(!b||M[0]&1&&u!==(u=$[0].name))&&p(o,"title",u),M[0]&1&&ne(o,"txt-strikethrough",$[0].toDelete),$[0].toDelete?w&&(w.d(1),w=null):w?w.p($,M):(w=Rc($),w.c(),w.m(c.parentNode,c)),$[7]&&!$[0].system?C?M[0]&129&&E(C,1):(C=zc(),C.c(),E(C,1),C.m(g.parentNode,g)):C&&(Pe(),P(C,1,1,()=>{C=null}),Le()),$[0].toDelete?S?S.p($,M):(S=Bc($),S.c(),S.m(v.parentNode,v)):S&&(S.d(1),S=null)},i($){b||(E(C),b=!0)},o($){P(C),b=!1},d($){$&&y(e),$&&y(f),w&&w.d($),$&&y(c),$&&y(d),$&&y(h),C&&C.d($),$&&y(g),S&&S.d($),$&&y(v)}}}function US(n){let e,t,i={single:!0,interactive:n[8],class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion",$$slots:{header:[BS],default:[zS]},$$scope:{ctx:n}};return e=new Ba({props:i}),n[32](e),e.$on("expand",n[33]),e.$on("collapse",n[34]),e.$on("toggle",n[35]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&256&&(o.interactive=s[8]),l[0]&5&&(o.class=s[2]||s[0].toDelete||s[0].system?"field-accordion disabled":"field-accordion"),l[0]&483|l[1]&256&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[32](null),q(e,s)}}}function WS(n,e,t){let i,s,l,o,r;kt(n,os,W=>t(14,r=W));const a=ln();let{key:u="0"}=e,{field:f=new Sn}=e,{disabled:c=!1}=e,{excludeNames:d=[]}=e,h,g=f.type;function v(){h==null||h.expand()}function b(){h==null||h.collapse()}function w(){f.id?t(0,f.toDelete=!0,f):(b(),a("remove"))}function C(W){if(W=(""+W).toLowerCase(),!W)return!1;for(co
Line truncated
|
||||
<code>@request.query.*</code>
|
||||
<code>@request.data.*</code>
|
||||
<code>@request.user.*</code>`,S=T(),$=_("hr"),M=T(),D=_("p"),D.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",O=T(),A=_("div"),A.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",L=T(),F=_("hr"),R=T(),B=_("p"),B.innerHTML=`Example rule:
|
||||
<br/>
|
||||
<code>@request.user.id!="" && created>"2022-01-01 00:00:00"</code>`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(C,"class","inline-flex flex-gap-5"),p($,"class","m-t-10 m-b-5"),p(D,"class","m-b-0"),p(A,"class","inline-flex flex-gap-5"),p(F,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(U,Q){k(U,e,Q),m(e,t),m(t,i),m(i,s),m(i,l),m(i,o),m(o,r),m(o,a),m(o,u),m(o,f),m(o,c),m(o,d);for(let oe=0;oe<J.length;oe+=1)J[oe].m(o,null);m(i,h),m(i,g),m(i,v),m(i,b),m(i,w),m(i,C),m(i,S),m(i,$),m(i,M),m(i,D),m(i,O),m(i,A),m(i,L),m(i,F),m(i,R),m(i,B),Z=!0},p(U,Q){if(Q&1){H=U[0].schema;let oe;for(oe=0;oe<H.length;oe+=1){const ae=Kc(U,H,oe);J[oe]?J[oe].p(ae,Q):(J[oe]=Jc(ae),J[oe].c(),J[oe].m(o,null))}for(;oe<J.length;oe+=1)J[oe].d(1);J.length=H.length}},i(U){Z||(U&&Dt(()=>{te||(te=rt(e,en,{duration:150},!0)),te.run(1)}),Z=!0)},o(U){U&&(te||(te=rt(e,en,{duration:150},!1)),te.run(0)),Z=!1},d(U){U&&y(e),Xn(J,U),U&&te&&te.end()}}}function GS(n){let e,t=n[19].name+"",i;return{c(){e=_("code"),i=N(t)},m(s,l){k(s,e,l),m(e,i)},p(s,l){l&1&&t!==(t=s[19].name+"")&&pe(i,t)},d(s){s&&y(e)}}}function XS(n){let e,t=n[19].name+"",i,s;return{c(){e=_("code"),i=N(t),s=N(".*")},m(l,o){k(l,e,o),m(e,i),m(e,s)},p(l,o){o&1&&t!==(t=l[19].name+"")&&pe(i,t)},d(l){l&&y(e)}}}function Jc(n){let e;function t(l,o){return l[19].type==="relation"||l[19].type==="user"?XS:GS}let i=t(n),s=i(n);return{c(){s.c(),e=Xe()},m(l,o){s.m(l,o),k(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&y(e)}}}function QS(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const o=r=>r[14];for(let r=0;r<l.length;r+=1){let a=Yc(n,l,r),u=o(a);t.set(u,e[r]=Gc(u,a))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();i=Xe()},m(r,a){for(let u=0;u<e.length;u+=1)e[u].m(r,a);k(r,i,a),s=!0},p(r,a){a&262235&&(l=Object.entries(r[6]),Pe(),e=mt(e,a,o,1,r,l,t,i.parentNode,Gt,Gc,i,Yc),Le())},i(r){if(!s){for(let a=0;a<l.length;a+=1)E(e[a]);s=!0}},o(r){for(let a=0;a<e.length;a+=1)P(e[a]);s=!1},d(r){for(let a=0;a<e.length;a+=1)e[a].d(r);r&&y(i)}}}function xS(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){k(t,e,i)},p:le,i:le,o:le,d(t){t&&y(e)}}}function eC(n){let e,t,i;function s(){return n[9](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,o){k(l,e,o),t||(i=[Ye(Ct.call(null,e,"Lock and set to Admins only")),G(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&y(e),t=!1,Qe(i)}}}function tC(n){let e,t,i;function s(){return n[8](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-unlock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,o){k(l,e,o),t||(i=[Ye(Ct.call(null,e,"Unlock and set custom rule")),G(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&y(e),t=!1,Qe(i)}}}function nC(n){let e;return{c(){e=N("Leave empty to grant everyone access")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function iC(n){let e;return{c(){e=N("Only admins will be able to access (unlock to change)")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function sC(n){let e,t=n[15]+"",i,s,l=Oi(n[0][n[14]])?"Admins only":"Custom rule",o,r,a,u,f=n[14],c,d,h,g,v,b,w;function C(){return n[10](n[14])}const S=()=>n[11](u,f),$=()=>n[11](null,f);function M(R){n[12](R,n[14])}var D=n[4];function O(R){let B={baseCollection:R[0],disabled:Oi(R[0][R[14]])};return R[0][R[14]]!==void 0&&(B.value=R[0][R[14]]),{props:B}}D&&(u=new D(O(n)),S(),he.push(()=>Re(u,"value",M)));function A(R,B){return B&1&&(g=null),g==null&&(g=!!Oi(R[0][R[14]])),g?iC:nC}let L=A(n,-1),F=L(n);return{c(){e=_("label"),i=N(t),s=N(" - "),o=N(l),a=T(),u&&V(u.$$.fragment),d=T(),h=_("div"),F.c(),p(e,"for",r=n[18]),p(h,"class","help-block")},m(R,B){k(R,e,B),m(e,i),m(e,s),m(e,o),k(R,a,B),u&&j(u,R,B),k(R,d,B),k(R,h,B),F.m(h,null),v=!0,b||(w=G(e,"click",C),b=!0)},p(R,B){n=R,(!v||B&1)&&l!==(l=Oi(n[0][n[14]])?"Admins only":"Custom rule")&&pe(o,l),(!v||B&262144&&r!==(r=n[18]))&&p(e,"for",r),f!==n[14]&&($(),f=n[14],S());const te={};if(B&1&&(te.baseCollection=n[0]),B&1&&(te.disabled=Oi(n[0][n[14]])),!c&&B&65&&(c=!0,te.value=n[0][n[14]],He(()=>c=!1)),D!==(D=n[4])){if(u){Pe();const Z=u;P(Z.$$.fragment,1,0,()=>{q(Z,1)}),Le()}D?(u=new D(O(n)),S(),he.push(()=>Re(u,"value",M)),V(u.$$.fragment),E(u.$$.fragment,1),j(u,d.parentNode,d)):u=null}else D&&u.$set(te);L!==(L=A(n,B))&&(F.d(1),F=L(n),F&&(F.c(),F.m(h,null)))},i(R){v||(u&&E(u.$$.fragment,R),v=!0)},o(R){u&&P(u.$$.fragment,R),v=!1},d(R){R&&y(e),R&&y(a),$(),u&&q(u,R),R&&y(d),R&&y(h),F.d(),b=!1,w()}}}function Gc(n,e){let t,i,s,l,o,r,a,u;function f(h,g){return g&1&&(l=null),l==null&&(l=!!Oi(h[0][h[14]])),l?tC:eC}let c=f(e,-1),d=c(e);return r=new Ne({props:{class:"form-field rule-field m-0 "+(Oi(e[0][e[14]])?"disabled":""),namLine truncated
|
||||
<a href="https://pocketbase.io/docs/manage-collections#rules-filters-syntax" target="_blank" rel="noopener">PocketBase filter syntax and operators
|
||||
</a>.`,s=T(),l=_("span"),r=N(o),a=T(),b&&b.c(),u=T(),c.c(),d=Xe(),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){k($,e,M),m(e,t),m(t,i),m(t,s),m(t,l),m(l,r),m(e,a),b&&b.m(e,null),k($,u,M),C[f].m($,M),k($,d,M),h=!0,g||(v=G(l,"click",n[7]),g=!0)},p($,[M]){(!h||M&4)&&o!==(o=$[2]?"Hide available fields":"Show available fields")&&pe(r,o),$[2]?b?(b.p($,M),M&4&&E(b,1)):(b=Zc($),b.c(),E(b,1),b.m(e,null)):b&&(Pe(),P(b,1,1,()=>{b=null}),Le());let D=f;f=S($),f===D?C[f].p($,M):(Pe(),P(C[D],1,1,()=>{C[D]=null}),Le(),c=C[f],c?c.p($,M):(c=C[f]=w[f]($),c.c()),E(c,1),c.m(d.parentNode,d))},i($){h||(E(b),E(c),h=!0)},o($){P(b),P(c),h=!1},d($){$&&y(e),b&&b.d(),$&&y(u),C[f].d($),$&&y(d),g=!1,v()}}}function Oi(n){return n===null}function oC(n,e,t){let{collection:i=new An}=e,s={},l=!1,o={},r,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,r=(await Ji(()=>import("./FilterAutocompleteInput.413a6b0b.js"),[],import.meta.url)).default)}catch(w){console.warn(w),t(4,r=null)}t(5,a=!1)}Wn(()=>{f()});const c=()=>t(2,l=!l),d=async w=>{var C;t(0,i[w]=s[w]||"",i),await ei(),(C=o[w])==null||C.focus()},h=w=>{t(1,s[w]=i[w],s),t(0,i[w]=null,i)},g=w=>{var C;return(C=o[w])==null?void 0:C.focus()};function v(w,C){he[w?"unshift":"push"](()=>{o[C]=w,t(3,o)})}function b(w,C){n.$$.not_equal(i[C],w)&&(i[C]=w,t(0,i))}return n.$$set=w=>{"collection"in w&&t(0,i=w.collection)},[i,s,l,o,r,a,u,c,d,h,g,v,b]}class rC extends Ee{constructor(e){super(),Oe(this,e,oC,lC,De,{collection:0})}}function Xc(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qc(n,e,t){const i=n.slice();return i[14]=e[t],i}function xc(n){let e;return{c(){e=_("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function ed(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=N(`Renamed collection
|
||||
`),s=_("strong"),o=N(l),r=T(),a=_("i"),u=T(),f=_("strong"),d=N(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){k(h,e,g),m(e,t),m(t,i),m(t,s),m(s,o),m(t,r),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&2&&l!==(l=h[1].originalName+"")&&pe(o,l),g&2&&c!==(c=h[1].name+"")&&pe(d,c)},d(h){h&&y(e)}}}function td(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=_("li"),t=_("div"),i=N(`Renamed field
|
||||
`),s=_("strong"),o=N(l),r=T(),a=_("i"),u=T(),f=_("strong"),d=N(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){k(h,e,g),m(e,t),m(t,i),m(t,s),m(s,o),m(t,r),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&16&&l!==(l=h[14].originalName+"")&&pe(o,l),g&16&&c!==(c=h[14].name+"")&&pe(d,c)},d(h){h&&y(e)}}}function nd(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=_("li"),t=N("Removed field "),i=_("span"),l=N(s),o=T(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){k(r,e,a),m(e,t),m(e,i),m(i,l),m(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&pe(l,s)},d(r){r&&y(e)}}}function aC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[3].length&&xc(),g=n[5]&&ed(n),v=n[4],b=[];for(let S=0;S<v.length;S+=1)b[S]=td(Qc(n,v,S));let w=n[3],C=[];for(let S=0;S<w.length;S+=1)C[S]=nd(Xc(n,w,S));return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=T(),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!`,o=T(),h&&h.c(),r=T(),a=_("h6"),a.textContent="Changes:",u=T(),f=_("ul"),g&&g.c(),c=T();for(let S=0;S<b.length;S+=1)b[S].c();d=T();for(let S=0;S<C.length;S+=1)C[S].c();p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning"),p(f,"class","changes-list svelte-1ghly2p")},m(S,$){k(S,e,$),m(e,t),m(e,i),m(e,s),m(s,l),m(s,o),h&&h.m(s,null),k(S,r,$),k(S,a,$),k(S,u,$),k(S,f,$),g&&g.m(f,null),m(f,c);for(let M=0;M<b.length;M+=1)b[M].m(f,null);m(f,d);for(let M=0;M<C.length;M+=1)C[M].m(f,null)},p(S,$){if(S[3].length?h||(h=xc(),h.c(),h.m(s,null)):h&&(h.d(1),h=null),S[5]?g?g.p(S,$):(g=ed(S),g.c(),g.m(f,c)):g&&(g.d(1),g=null),$&16){v=S[4];let M;for(M=0;M<v.length;M+=1){const D=Qc(S,v,M);b[M]?b[M].p(D,$):(b[M]=td(D),b[M].c(),b[M].m(f,d))}for(;M<b.length;M+=1)b[M].d(1);b.length=v.length}if($&8){w=S[3];let M;for(M=0;M<w.length;M+=1){const D=Xc(S,w,M);C[M]?C[M].p(D,$):(C[M]=nd(D),C[M].c(),C[M].m(f,null))}for(;M<C.length;M+=1)C[M].d(1);C.length=w.length}},d(S){S&&y(e),h&&h.d(),S&&y(r),S&&y(a),S&&y(u),S&&y(f),g&&g.d(),Xn(b,S),Xn(C,S)}}}function uC(n){let e;return{c(){e=_("h4"),e.textContent="Confirm collection changes"},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function fC(n){let e,t,i,s,l;return{c(){e=_("button"),e.innerHTML='<span class="txt">Cancel</span>',t=T(),i=_("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){k(o,e,r),k(o,t,r),k(o,i,r),e.focus(),s||(l=[G(e,"click",n[8]),G(i,"click",n[9])],s=!0)},p:le,d(o){o&&y(e),o&&y(t),o&&y(i),s=!1,Qe(l)}}}function cC(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[fC],header:[uC],default:[aC]},$$scope:{ctx:n}};return e=new di({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),q(e,s)}}}function dC(n,e,t){let i,s,l;const o=ln();let r,a;async function u(w){t(1,a=w),await ei(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),h=()=>c();function g(w){he[w?"unshift":"push"](()=>{r=w,t(2,r)})}function v(w){ut.call(this,n,w)}function b(w){ut.call(this,n,w)}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(w=>w.id&&!w.toDelete&&w.originalName!=w.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(w=>w.id&&w.toDelete))||[])},[f,a,r,l,s,i,c,u,d,h,g,v,b]}class pC extends Ee{constructor(e){super(),Oe(this,e,dC,cC,De,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function id(n){let e,t,i,s;function l(r){n[26](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new rC({props:o}),he.push(()=>Re(t,"collection",l)),{c(){e=_("div"),V(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){k(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],He(()=>i=!1)),t.$set(u)},i(r){s||(E(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&y(e),q(t)}}}function hC(n){let e,t,i,s,l,o;function r(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new JS({props:a}),he.push(()=>Re(i,"collection",r));let u=n[9]===pl&&id(n);return{c(){e=_("div"),t=_("div"),V(i.$$.fragment),l=T(),u&&u.c(),p(t,"class","tab-item"),ne(t,"active",n[9]===is),p(e,"class","tabs-content svelte-b10vi")},m(f,c){k(f,e,c),m(e,t),j(i,t,null),m(e,l),u&&u.m(e,null),o=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],He(()=>s=!1)),i.$set(d),c[0]&512&&ne(t,"active",f[9]===is),f[9]===pl?u?(u.p(f,c),c[0]&512&&E(u,1)):(u=id(f),u.c(),E(u,1),u.m(e,null)):u&&(Pe(),P(u,1,1,()=>{u=null}),Le())},i(f){o||(E(i.$$.fragment,f),E(u),o=!0)},o(f){P(i.$$.fragment,f),P(u),o=!1},d(f){f&&y(e),q(i),u&&u.d()}}}function sd(n){let e,t,i,s,l,o,r;return o=new Hi({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[mC]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=T(),i=_("button"),s=_("i"),l=T(),V(o.$$.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){k(a,e,u),k(a,t,u),k(a,i,u),m(i,s),m(i,l),j(o,i,null),r=!0},p(a,u){const f={};u[1]&256&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(E(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&y(e),a&&y(t),a&&y(i),q(o)}}}function mC(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i>
|
||||
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[20]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function ld(n){let e;return{c(){e=_("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function gC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[2].system&&ld();return{c(){e=_("label"),t=N("Name"),s=T(),l=_("input"),u=T(),h&&h.c(),f=Xe(),p(e,"for",i=n[38]),p(l,"type","text"),p(l,"id",o=n[38]),l.required=!0,l.disabled=n[11],p(l,"spellcheck","false"),l.autofocus=r=n[2].isNew,p(l,"placeholder",'eg. "posts"'),l.value=a=n[2].name},m(g,v){k(g,e,v),m(e,t),k(g,s,v),k(g,l,v),k(g,u,v),h&&h.m(g,v),k(g,f,v),n[2].isNew&&l.focus(),c||(d=G(l,"input",n[21]),c=!0)},p(g,v){v[1]&128&&i!==(i=g[38])&&p(e,"for",i),v[1]&128&&o!==(o=g[38])&&p(l,"id",o),v[0]&2048&&(l.disabled=g[11]),v[0]&4&&r!==(r=g[2].isNew)&&(l.autofocus=r),v[0]&4&&a!==(a=g[2].name)&&l.value!==a&&(l.value=a),g[2].system?h||(h=ld(),h.c(),h.m(f.parentNode,f)):h&&(h.d(1),h=null)},d(g){g&&y(e),g&&y(s),g&&y(l),g&&y(u),h&&h.d(g),g&&y(f),c=!1,d()}}}function od(n){let e,t,i,s,l,o;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){k(r,e,a),s=!0,l||(o=Ye(t=Ct.call(null,e,n[12])),l=!0)},p(r,a){t&&Un(t.update)&&a[0]&4096&&t.update.call(null,r[12])},i(r){s||(r&&Dt(()=>{i||(i=rt(e,Vn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=rt(e,Vn,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&y(e),r&&i&&i.end(),l=!1,o()}}}function rd(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){k(o,e,r),i=!0,s||(l=Ye(Ct.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Dt(()=>{t||(t=rt(e,Vn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=rt(e,Vn,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&y(e),o&&t&&t.end(),s=!1,l()}}}function _C(n){var R,B,te,Z,H,J;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,h,g,v=!Y.isEmpty((R=n[4])==null?void 0:R.schema),b,w,C,S,$=!Y.isEmpty((B=n[4])==null?void 0:B.listRule)||!Y.isEmpty((te=n[4])==null?void 0:te.viewRule)||!Y.isEmpty((Z=n[4])==null?void 0:Z.createRule)||!Y.isEmpty((H=n[4])==null?void 0:H.updateRule)||!Y.isEmpty((J=n[4])==null?void 0:J.deleteRule),M,D,O,A=!n[2].isNew&&!n[2].system&&sd(n);r=new Ne({props:{class:"form-field required m-b-0 "+(n[11]?"disabled":""),name:"name",$$slots:{default:[gC,({uniqueId:U})=>({38:U}),({uniqueId:U})=>[0,U?128:0]]},$$scope:{ctx:n}}});let L=v&&od(n),F=$&&rd();return{c(){e=_("h4"),i=N(t),s=T(),A&&A.c(),l=T(),o=_("form"),V(r.$$.fragment),a=T(),u=_("input"),f=T(),c=_("div"),d=_("button"),h=_("span"),h.textContent="Fields",g=T(),L&&L.c(),b=T(),w=_("button"),C=_("span"),C.textContent="API Rules",S=T(),F&&F.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ne(d,"active",n[9]===is),p(C,"class","txt"),p(w,"type","button"),p(w,"class","tab-item"),ne(w,"active",n[9]===pl),p(c,"class","tabs-header stretched")},m(U,Q){k(U,e,Q),m(e,i),k(U,s,Q),A&&A.m(U,Q),k(U,l,Q),k(U,o,Q),j(r,o,null),m(o,a),m(o,u),k(U,f,Q),k(U,c,Q),m(c,d),m(d,h),m(d,g),L&&L.m(d,null),m(c,b),m(c,w),m(w,C),m(w,S),F&&F.m(w,null),M=!0,D||(O=[G(o,"submit",Yt(n[22])),G(d,"click",n[23]),G(w,"click",n[24])],D=!0)},p(U,Q){var ae,be,se,ge,$e,W;(!M||Q[0]&4)&&t!==(t=U[2].isNew?"New collection":"Edit collection")&&pe(i,t),!U[2].isNew&&!U[2].system?A?(A.p(U,Q),Q[0]&4&&E(A,1)):(A=sd(U),A.c(),E(A,1),A.m(l.parentNode,l)):A&&(Pe(),P(A,1,1,()=>{A=null}),Le());const oe={};Q[0]&2048&&(oe.class="form-field required m-b-0 "+(U[11]?"disabled":"")),Q[0]&2052|Q[1]&384&&(oe.$$scope={dirty:Q,ctx:U}),r.$set(oe),Q[0]&16&&(v=!Y.isEmpty((ae=U[4])==null?void 0:ae.schema)),v?L?(L.p(U,Q),Q[0]&16&&E(L,1)):(L=od(U),L.c(),E(L,1),L.m(d,null)):L&&(Pe(),P(L,1,1,()=>{L=null}),Le()),Q[0]&512&&ne(d,"active",U[9]===is),Q[0]&16&&($=!Y.isEmpty((be=U[4])==null?void 0:be.listRule)||!Y.isEmpty((se=U[4])==null?void 0:se.viewRule)||!Y.isEmpty((ge=U[4])==null?void 0:ge.createRule)||!Y.isEmpty(($e=U[4])==null?void 0:$e.updateRule)||!Y.isEmpty((W=U[4])==null?void 0:W.deleteRule)),$?F?Q[0]&16&&E(F,1):(F=rd(),F.c(),E(F,1),F.m(w,null)):F&&(Pe(),P(F,1,1,()=>{F=null}),Le()),Q[0]&512&&ne(w,"active",U[9]===pl)},i(U){M||(E(A),E(r.$$.fragment,U),E(L),E(F),M=!0)},o(U){P(A),P(r.$$.fragment,U),P(L),P(F),M=!1},d(U){U&&y(e),U&&y(s),A&&A.d(U),U&&y(l),U&&y(o),q(r),U&&y(f),U&&y(c),L&&L.d(),F&&F.d(),D=!1,Qe(O)}}}function bC(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=T(),s=_("button"),l=_("span"),r=N(o),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","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],ne(s,"btn-loading",n[7])},m(c,d){k(c,e,d),m(e,t),k(c,i,d),k(c,s,d),m(s,l),m(l,r),u||(f=[G(e,"click",n[18]),G(s,"click",nLine truncated
|
||||
<span class="txt">New collection</span>`,w=T(),V(C.$$.fragment),p(l,"type","button"),p(l,"class","btn btn-xs btn-secondary btn-circle btn-clear"),ne(l,"hidden",!n[4]),p(s,"class","form-field-addon"),p(r,"type","text"),p(r,"placeholder","Search collections..."),p(i,"class","form-field search"),ne(i,"active",n[4]),p(t,"class","sidebar-header"),p(u,"class","m-t-5 m-b-xs"),p(c,"class","sidebar-content"),p(b,"type","button"),p(b,"class","btn btn-block btn-outline"),p(v,"class","sidebar-footer"),p(e,"class","page-sidebar collection-sidebar")},m(F,R){k(F,e,R),m(e,t),m(t,i),m(i,s),m(s,l),m(i,o),m(i,r),Me(r,n[0]),m(e,a),m(e,u),m(e,f),m(e,c);for(let B=0;B<d.length;B+=1)d[B].m(c,null);A&&A.m(c,null),m(e,g),m(e,v),m(v,b),k(F,w,R),j(C,F,R),S=!0,$||(M=[G(l,"click",n[8]),G(r,"input",n[9]),G(b,"click",n[11])],$=!0)},p(F,[R]){R&16&&ne(l,"hidden",!F[4]),R&1&&r.value!==F[0]&&Me(r,F[0]),R&16&&ne(i,"active",F[4]),R&106&&(D=F[3],d=mt(d,R,O,1,F,D,h,c,mn,cd,null,ad),!D.length&&A?A.p(F,R):D.length?A&&(A.d(1),A=null):(A=ud(F),A.c(),A.m(c,null)));const B={};C.$set(B)},i(F){S||(E(C.$$.fragment,F),S=!0)},o(F){P(C.$$.fragment,F),S=!1},d(F){F&&y(e);for(let R=0;R<d.length;R+=1)d[R].d();A&&A.d(),F&&y(w),n[12](null),q(C,F),$=!1,Qe(M)}}}function SC(n,e,t){let i,s,l,o,r;kt(n,ri,b=>t(5,o=b)),kt(n,Ms,b=>t(7,r=b));let a,u="";function f(b){fn(ri,o=b,o)}const c=()=>t(0,u="");function d(){u=this.value,t(0,u)}const h=b=>f(b),g=()=>a==null?void 0:a.show();function v(b){he[b?"unshift":"push"](()=>{a=b,t(2,a)})}return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=u.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=u!==""),n.$$.dirty&131&&t(3,l=r.filter(b=>b.name!="profiles"&&(b.id==u||b.name.replace(/\s+/g,"").toLowerCase().includes(i))))},[u,i,a,l,s,o,f,r,c,d,h,g,v]}class CC extends Ee{constructor(e){super(),Oe(this,e,SC,$C,De,{})}}function MC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C,S,$,M,D,O,A,L,F,R,B,te,Z,H,J,U,Q,oe,ae,be,se,ge,$e,W,ye,ee,X,Se,je,Ue,K,de,fe,ke,Ze;return{c(){e=_("p"),e.innerHTML=`The syntax basically follows the format
|
||||
<code><span class="txt-success">OPERAND</span>
|
||||
<span class="txt-danger">OPERATOR</span>
|
||||
<span class="txt-success">OPERAND</span></code>, where:`,t=T(),i=_("ul"),s=_("li"),s.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single or double
|
||||
quoted), number, null, true, false`,l=T(),o=_("li"),r=_("code"),r.textContent="OPERATOR",a=N(` - is one of:
|
||||
`),u=_("br"),f=T(),c=_("ul"),d=_("li"),h=_("code"),h.textContent="=",g=T(),v=_("span"),v.textContent="Equal",b=T(),w=_("li"),C=_("code"),C.textContent="!=",S=T(),$=_("span"),$.textContent="NOT equal",M=T(),D=_("li"),O=_("code"),O.textContent=">",A=T(),L=_("span"),L.textContent="Greater than",F=T(),R=_("li"),B=_("code"),B.textContent=">=",te=T(),Z=_("span"),Z.textContent="Greater than or equal",H=T(),J=_("li"),U=_("code"),U.textContent="<",Q=T(),oe=_("span"),oe.textContent="Less than or equal",ae=T(),be=_("li"),se=_("code"),se.textContent="<=",ge=T(),$e=_("span"),$e.textContent="Less than or equal",W=T(),ye=_("li"),ee=_("code"),ee.textContent="~",X=T(),Se=_("span"),Se.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard
|
||||
match)`,je=T(),Ue=_("li"),K=_("code"),K.textContent="!~",de=T(),fe=_("span"),fe.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,ke=T(),Ze=_("p"),Ze.innerHTML=`To group and combine several expressions you could use brackets
|
||||
<code>(...)</code>, <code>&&</code> (AND) and <code>||</code> (OR) tokens.`,p(r,"class","txt-danger"),p(h,"class","filter-op svelte-1w7s5nw"),p(v,"class","txt-hint"),p(C,"class","filter-op svelte-1w7s5nw"),p($,"class","txt-hint"),p(O,"class","filter-op svelte-1w7s5nw"),p(L,"class","txt-hint"),p(B,"class","filter-op svelte-1w7s5nw"),p(Z,"class","txt-hint"),p(U,"class","filter-op svelte-1w7s5nw"),p(oe,"class","txt-hint"),p(se,"class","filter-op svelte-1w7s5nw"),p($e,"class","txt-hint"),p(ee,"class","filter-op svelte-1w7s5nw"),p(Se,"class","txt-hint"),p(K,"class","filter-op svelte-1w7s5nw"),p(fe,"class","txt-hint")},m(tt,We){k(tt,e,We),k(tt,t,We),k(tt,i,We),m(i,s),m(i,l),m(i,o),m(o,r),m(o,a),m(o,u),m(o,f),m(o,c),m(c,d),m(d,h),m(d,g),m(d,v),m(c,b),m(c,w),m(w,C),m(w,S),m(w,$),m(c,M),m(c,D),m(D,O),m(D,A),m(D,L),m(c,F),m(c,R),m(R,B),m(R,te),m(R,Z),m(c,H),m(c,J),m(J,U),m(J,Q),m(J,oe),m(c,ae),m(c,be),m(be,se),m(be,ge),m(be,$e),m(c,W),m(c,ye),m(ye,ee),m(ye,X),m(ye,Se),m(c,je),m(c,Ue),m(Ue,K),m(Ue,de),m(Ue,fe),k(tt,ke,We),k(tt,Ze,We)},p:le,i:le,o:le,d(tt){tt&&y(e),tt&&y(t),tt&&y(i),tt&&y(ke),tt&&y(Ze)}}}class TC extends Ee{constructor(e){super(),Oe(this,e,null,MC,De,{})}}function dd(n,e,t){const i=n.slice();return i[5]=e[t],i}function pd(n,e,t){const i=n.slice();return i[5]=e[t],i}function hd(n,e){let t,i,s=e[5].title+"",l,o,r,a;function u(){return e[4](e[5])}return{key:n,first:null,c(){t=_("button"),i=_("div"),l=N(s),o=T(),p(i,"class","txt"),p(t,"class","tab-item svelte-1maocj6"),ne(t,"active",e[0]===e[5].language),this.first=t},m(f,c){k(f,t,c),m(t,i),m(i,l),m(t,o),r||(a=G(t,"click",u),r=!0)},p(f,c){e=f,c&2&&s!==(s=e[5].title+"")&&pe(l,s),c&3&&ne(t,"active",e[0]===e[5].language)},d(f){f&&y(t),r=!1,a()}}}function md(n,e){let t,i,s,l;return i=new hn({props:{language:e[5].language,content:e[5].content}}),{key:n,first:null,c(){t=_("div"),V(i.$$.fragment),s=T(),p(t,"class","tab-item svelte-1maocj6"),ne(t,"active",e[0]===e[5].language),this.first=t},m(o,r){k(o,t,r),j(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&2&&(a.language=e[5].language),r&2&&(a.content=e[5].content),i.$set(a),r&3&&ne(t,"active",e[0]===e[5].language)},i(o){l||(E(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&y(t),q(i)}}}function DC(n){let e,t,i=[],s=new Map,l,o,r=[],a=new Map,u,f=n[1];const c=g=>g[5].language;for(let g=0;g<f.length;g+=1){let v=pd(n,f,g),b=c(v);s.set(b,i[g]=hd(b,v))}let d=n[1];const h=g=>g[5].language;for(let g=0;g<d.length;g+=1){let v=dd(n,d,g),b=h(v);a.set(b,r[g]=md(b,v))}return{c(){e=_("div"),t=_("div");for(let g=0;g<i.length;g+=1)i[g].c();l=T(),o=_("div");for(let g=0;g<r.length;g+=1)r[g].c();p(t,"class","tabs-header compact left"),p(o,"class","tabs-content"),p(e,"class","tabs sdk-tabs m-b-lg svelte-1maocj6")},m(g,v){k(g,e,v),m(e,t);for(let b=0;b<i.length;b+=1)i[b].m(t,null);m(e,l),m(e,o);for(let b=0;b<r.length;b+=1)r[b].m(o,null);u=!0},p(g,[v]){v&3&&(f=g[1],i=mt(i,v,c,1,g,f,s,t,mn,hd,null,pd)),v&3&&(d=g[1],Pe(),r=mt(r,v,h,1,g,d,a,o,Gt,md,null,dd),Le())},i(g){if(!u){for(let v=0;v<d.length;v+=1)E(r[v]);u=!0}},o(g){for(let v=0;v<r.length;v+=1)P(r[v]);u=!1},d(g){g&&y(e);for(let v=0;v<i.length;v+=1)i[v].d();for(let v=0;v<r.length;v+=1)r[v].d()}}}const gd="pb_sdk_preference";function OC(n,e,t){let i,{js:s=""}=e,{dart:l=""}=e,o=localStorage.getItem(gd)||"javascript";const r=a=>t(0,o=a.language);return n.$$set=a=>{"js"in a&&t(2,s=a.js),"dart"in a&&t(3,l=a.dart)},n.$$.update=()=>{n.$$.dirty&1&&o&&localStorage.setItem(gd,o),n.$$.dirty&12&&t(1,i=[{title:"JavaScript",language:"javascript",content:s},{title:"Dart",language:"dart",content:l}])},[o,i,s,l,r]}class As extends Ee{constructor(e){super(),Oe(this,e,OC,DC,De,{js:2,dart:3})}}function _d(n,e,t){const i=n.slice();return i[6]=e[t],i}function bd(n,e,t){const i=n.slice();return i[6]=e[t],i}function vd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function yd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("div"),s=N(i),l=T(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(u,f){k(u,t,f),m(t,s),m(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&20&&ne(t,"active",e[2]===e[6].code)},d(u){u&&y(t),o=!1,r()}}}function kd(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),V(i.$$.fragment),s=T(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(o,r){k(o,t,r),j(i,t,null),m(t,s),l=!0},p(o,r){e=o,r&20&&ne(t,"active",e[2]===e[6].code)},i(o){l||(E(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&y(t),q(i)}}}function EC(n){var pi,Cl,fs,Ml;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,w=n[0].name+"",C,S,$,M,D,O,A,L,F,R,B,te,Z,H,J,U,Q,oe,ae,be,se,ge,$e,W,ye,ee,X,Se,je,Ue,K,de,fe,ke,Ze,tt,We,it,Ce,ze,Je,st,ct,me,Fe,nt,ft,vt,ot,Ot,wt,jt,Nt,Ke,we,Be,et,at,Pt,Ft,Lt,lt,I,z,x,re=[],Ae=new Map,ie,ve,Te=[],ue=new MaLine truncated
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await client.records.getList('${(pi=n[0])==null?void 0:pi.name}', 1, 50, {
|
||||
filter: 'created >= '2022-01-01 00:00:00'',
|
||||
});
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
const records = await client.records.getFullList('${(Cl=n[0])==null?void 0:Cl.name}', 200 /* batch size */, {
|
||||
sort: '-created',
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final result = await client.records.getList(
|
||||
'${(fs=n[0])==null?void 0:fs.name}',
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00"',
|
||||
);
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
final records = await client.records.getFullList('${(Ml=n[0])==null?void 0:Ml.name}', batch: 200, sort: '-created');
|
||||
`}}),K=new hn({props:{content:`
|
||||
// DESC by created and ASC by id
|
||||
?sort=-created,id
|
||||
`}}),ze=new hn({props:{content:`
|
||||
?filter=(id='abc' && created>'2022-01-01')
|
||||
`}}),st=new TC({}),wt=new hn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let ht=n[4];const on=qe=>qe[6].code;for(let qe=0;qe<ht.length;qe+=1){let xe=bd(n,ht,qe),Xt=on(xe);Ae.set(Xt,re[qe]=yd(Xt,xe))}let qt=n[4];const Si=qe=>qe[6].code;for(let qe=0;qe<qt.length;qe+=1){let xe=_d(n,qt,qe),Xt=Si(xe);ue.set(Xt,Te[qe]=kd(Xt,xe))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records"),c=T(),Ie&&Ie.c(),d=T(),h=_("div"),g=_("p"),v=N("Fetch a paginated "),b=_("strong"),C=N(w),S=N(" records list."),$=T(),M=_("div"),M.textContent="Client SDKs example",D=T(),V(O.$$.fragment),A=T(),L=_("div"),L.textContent="Query parameters",F=T(),R=_("table"),B=_("thead"),B.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,te=T(),Z=_("tbody"),H=_("tr"),H.innerHTML=`<td>page</td>
|
||||
<td><span class="label">Number</span></td>
|
||||
<td>The page (aka. offset) of the paginated list (default to 1).</td>`,J=T(),U=_("tr"),U.innerHTML=`<td>perPage</td>
|
||||
<td><span class="label">Number</span></td>
|
||||
<td>Specify the max returned records per page (default to 30).</td>`,Q=T(),oe=_("tr"),ae=_("td"),ae.textContent="sort",be=T(),se=_("td"),se.innerHTML='<span class="label">String</span>',ge=T(),$e=_("td"),W=N("Specify the records order attribute(s). "),ye=_("br"),ee=N(`
|
||||
Add `),X=_("code"),X.textContent="-",Se=N(" / "),je=_("code"),je.textContent="+",Ue=N(` (default) in front of the attribute for DESC / ASC order.
|
||||
Ex.:
|
||||
`),V(K.$$.fragment),de=T(),fe=_("tr"),ke=_("td"),ke.textContent="filter",Ze=T(),tt=_("td"),tt.innerHTML='<span class="label">String</span>',We=T(),it=_("td"),Ce=N(`Filter the returned records. Ex.:
|
||||
`),V(ze.$$.fragment),Je=T(),V(st.$$.fragment),ct=T(),me=_("tr"),Fe=_("td"),Fe.textContent="expand",nt=T(),ft=_("td"),ft.innerHTML='<span class="label">String</span>',vt=T(),ot=_("td"),Ot=N(`Auto expand record relations. Ex.:
|
||||
`),V(wt.$$.fragment),jt=N(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Nt=_("br"),Ke=N(`
|
||||
The expanded relations will be appended to each individual record under the
|
||||
`),we=_("code"),we.textContent="@expand",Be=N(" property (eg. "),et=_("code"),et.textContent='"@expand": {"rel1": {...}, ...}',at=N(`). Only the
|
||||
relations that the user has permissions to `),Pt=_("strong"),Pt.textContent="view",Ft=N(" will be expanded."),Lt=T(),lt=_("div"),lt.textContent="Responses",I=T(),z=_("div"),x=_("div");for(let qe=0;qe<re.length;qe+=1)re[qe].c();ie=T(),ve=_("div");for(let qe=0;qe<Te.length;qe+=1)Te[qe].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(h,"class","content m-b-base"),p(M,"class","section-title"),p(L,"class","section-title"),p(R,"class","table-compact table-border m-b-lg"),p(lt,"class","section-title"),p(x,"class","tabs-header compact left"),p(ve,"class","tabs-content"),p(z,"class","tabs")},m(qe,xe){k(qe,e,xe),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(e,c),Ie&&Ie.m(e,null),k(qe,d,xe),k(qe,h,xe),m(h,g),m(g,v),m(g,b),m(b,C),m(g,S),k(qe,$,xe),k(qe,M,xe),k(qe,D,xe),j(O,qe,xe),k(qe,A,xe),k(qe,L,xe),k(qe,F,xe),k(qe,R,xe),m(R,B),m(R,te),m(R,Z),m(Z,H),m(Z,J),m(Z,U),m(Z,Q),m(Z,oe),m(oe,ae),m(oe,be),m(oe,se),m(oe,ge),m(oe,$e),m($e,W),m($e,ye),m($e,ee),m($e,X),m($e,Se),m($e,je),m($e,Ue),j(K,$e,null),m(Z,de),m(Z,fe),m(fe,ke),m(fe,Ze),m(fe,tt),m(fe,We),m(fe,it),m(it,Ce),j(ze,it,null),m(it,Je),j(st,it,null),m(Z,ct),m(Z,me),m(me,Fe),m(me,nt),m(me,ft),m(me,vt),m(me,ot),m(ot,Ot),j(wt,ot,null),m(ot,jt),m(ot,Nt),m(ot,Ke),m(ot,we),m(ot,Be),m(ot,et),m(ot,at),m(ot,Pt),m(ot,Ft),k(qe,Lt,xe),k(qe,lt,xe),k(qe,I,xe),k(qe,z,xe),m(z,x);for(let Xt=0;Xt<re.length;Xt+=1)re[Xt].m(x,null);m(z,ie),m(z,ve);for(let Xt=0;Xt<Te.length;Xt+=1)Te[Xt].m(ve,null);ce=!0},p(qe,[xe]){var Tl,Dl,Ol,El;(!ce||xe&1)&&a!==(a=qe[0].name+"")&&pe(u,a),qe[1]?Ie||(Ie=vd(),Ie.c(),Ie.m(e,null)):Ie&&(Ie.d(1),Ie=null),(!ce||xe&1)&&w!==(w=qe[0].name+"")&&pe(C,w);const Xt={};xe&9&&(Xt.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${qe[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await client.records.getList('${(Tl=qe[0])==null?void 0:Tl.name}', 1, 50, {
|
||||
filter: 'created >= '2022-01-01 00:00:00'',
|
||||
});
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
const records = await client.records.getFullList('${(Dl=qe[0])==null?void 0:Dl.name}', 200 /* batch size */, {
|
||||
sort: '-created',
|
||||
});
|
||||
`),xe&9&&(Xt.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${qe[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final result = await client.records.getList(
|
||||
'${(Ol=qe[0])==null?void 0:Ol.name}',
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00"',
|
||||
);
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
final records = await client.records.getFullList('${(El=qe[0])==null?void 0:El.name}', batch: 200, sort: '-created');
|
||||
`),O.$set(Xt),xe&20&&(ht=qe[4],re=mt(re,xe,on,1,qe,ht,Ae,x,mn,yd,null,bd)),xe&20&&(qt=qe[4],Pe(),Te=mt(Te,xe,Si,1,qe,qt,ue,ve,Gt,kd,null,_d),Le())},i(qe){if(!ce){E(O.$$.fragment,qe),E(K.$$.fragment,qe),E(ze.$$.fragment,qe),E(st.$$.fragment,qe),E(wt.$$.fragment,qe);for(let xe=0;xe<qt.length;xe+=1)E(Te[xe]);ce=!0}},o(qe){P(O.$$.fragment,qe),P(K.$$.fragment,qe),P(ze.$$.fragment,qe),P(st.$$.fragment,qe),P(wt.$$.fragment,qe);for(let xe=0;xe<Te.length;xe+=1)P(Te[xe]);ce=!1},d(qe){qe&&y(e),Ie&&Ie.d(),qe&&y(d),qe&&y(h),qe&&y($),qe&&y(M),qe&&y(D),q(O,qe),qe&&y(A),qe&&y(L),qe&&y(F),qe&&y(R),q(K),q(ze),q(st),q(wt),qe&&y(Lt),qe&&y(lt),qe&&y(I),qe&&y(z);for(let xe=0;xe<re.length;xe+=1)re[xe].d();for(let xe=0;xe<Te.length;xe+=1)Te[xe].d()}}}function AC(n,e,t){let i,s,{collection:l=new An}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.listRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify({page:1,perPage:30,totalItems:2,items:[Y.dummyCollectionRecord(l),Y.dummyCollectionRecord(l)]},null,2)}),r.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Something went wrong while processing your request. Invalid filter.",
|
||||
"data": {}
|
||||
}
|
||||
`}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||_e.baseUrl),[l,i,o,s,r,a]}class PC extends Ee{constructor(e){super(),Oe(this,e,AC,EC,De,{collection:0})}}function wd(n,e,t){const i=n.slice();return i[6]=e[t],i}function $d(n,e,t){const i=n.slice();return i[6]=e[t],i}function Sd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function Cd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=T(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(u,f){k(u,t,f),m(t,s),m(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&20&&ne(t,"active",e[2]===e[6].code)},d(u){u&&y(t),o=!1,r()}}}function Md(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),V(i.$$.fragment),s=T(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(o,r){k(o,t,r),j(i,t,null),m(t,s),l=!0},p(o,r){e=o,r&20&&ne(t,"active",e[2]===e[6].code)},i(o){l||(E(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&y(t),q(i)}}}function LC(n){var Nt,Ke;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,w,C=n[0].name+"",S,$,M,D,O,A,L,F,R,B,te,Z,H,J,U,Q,oe,ae,be,se,ge,$e,W,ye,ee,X,Se,je,Ue,K,de,fe,ke,Ze,tt,We,it,Ce,ze,Je=[],st=new Map,ct,me,Fe=[],nt=new Map,ft,vt=n[1]&&Sd();A=new As({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await client.records.getOne('${(Nt=n[0])==null?void 0:Nt.name}', 'RECORD_ID', {
|
||||
expand: 'some_relation'
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await client.records.getOne('${(Ke=n[0])==null?void 0:Ke.name}', 'RECORD_ID', query: {
|
||||
'expand': 'some_relation',
|
||||
});
|
||||
`}}),ee=new hn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let ot=n[4];const Ot=we=>we[6].code;for(let we=0;we<ot.length;we+=1){let Be=$d(n,ot,we),et=Ot(Be);st.set(et,Je[we]=Cd(et,Be))}let wt=n[4];const jt=we=>we[6].code;for(let we=0;we<wt.length;we+=1){let Be=wd(n,wt,we),et=jt(Be);nt.set(et,Fe[we]=Md(et,Be))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=T(),vt&&vt.c(),h=T(),g=_("div"),v=_("p"),b=N("Fetch a single "),w=_("strong"),S=N(C),$=N(" record."),M=T(),D=_("div"),D.textContent="Client SDKs example",O=T(),V(A.$$.fragment),L=T(),F=_("div"),F.textContent="Path Parameters",R=T(),B=_("table"),B.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to view.</td></tr></tbody>`,te=T(),Z=_("div"),Z.textContent="Query parameters",H=T(),J=_("table"),U=_("thead"),U.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,Q=T(),oe=_("tbody"),ae=_("tr"),be=_("td"),be.textContent="expand",se=T(),ge=_("td"),ge.innerHTML='<span class="label">String</span>',$e=T(),W=_("td"),ye=N(`Auto expand record relations. Ex.:
|
||||
`),V(ee.$$.fragment),X=N(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Se=_("br"),je=N(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),Ue=_("code"),Ue.textContent="@expand",K=N(" property (eg. "),de=_("code"),de.textContent='"@expand": {"rel1": {...}, ...}',fe=N(`). Only the
|
||||
relations that the user has permissions to `),ke=_("strong"),ke.textContent="view",Ze=N(" will be expanded."),tt=T(),We=_("div"),We.textContent="Responses",it=T(),Ce=_("div"),ze=_("div");for(let we=0;we<Je.length;we+=1)Je[we].c();ct=T(),me=_("div");for(let we=0;we<Fe.length;we+=1)Fe[we].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(g,"class","content m-b-base"),p(D,"class","section-title"),p(F,"class","section-title"),p(B,"class","table-compact table-border m-b-lg"),p(Z,"class","section-title"),p(J,"class","table-compact table-border m-b-lg"),p(We,"class","section-title"),p(ze,"class","tabs-header compact left"),p(me,"class","tabs-content"),p(Ce,"class","tabs")},m(we,Be){k(we,e,Be),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),vt&&vt.m(e,null),k(we,h,Be),k(we,g,Be),m(g,v),m(v,b),m(v,w),m(w,S),m(v,$),k(we,M,Be),k(we,D,Be),k(we,O,Be),j(A,we,Be),k(we,L,Be),k(we,F,Be),k(we,R,Be),k(we,B,Be),k(we,te,Be),k(we,Z,Be),k(we,H,Be),k(we,J,Be),m(J,U),m(J,Q),m(J,oe),m(oe,ae),m(ae,be),m(ae,se),m(ae,ge),m(ae,$e),m(ae,W),m(W,ye),j(ee,W,null),m(W,X),m(W,Se),m(W,je),m(W,Ue),m(W,K),m(W,de),m(W,fe),m(W,ke),m(W,Ze),k(we,tt,Be),k(we,We,Be),k(we,it,Be),k(we,Ce,Be),m(Ce,ze);for(let et=0;et<Je.length;et+=1)Je[et].m(ze,null);m(Ce,ct),m(Ce,me);for(let et=0;et<Fe.length;et+=1)Fe[et].m(me,null);ft=!0},p(we,[Be]){var at,Pt;(!ft||Be&1)&&a!==(a=we[0].name+"")&&pe(u,a),we[1]?vt||(vt=Sd(),vt.c(),vt.m(e,null)):vt&&(vt.d(1),vt=null),(!ft||Be&1)&&C!==(C=we[0].name+"")&&pe(S,C);const et={};Be&9&&(et.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${we[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await client.records.getOne('${(at=we[0])==null?void 0:at.name}', 'RECORD_ID', {
|
||||
expand: 'some_relation'
|
||||
});
|
||||
`),Be&9&&(et.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${we[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await client.records.getOne('${(Pt=we[0])==null?void 0:Pt.name}', 'RECORD_ID', query: {
|
||||
'expand': 'some_relation',
|
||||
});
|
||||
`),A.$set(et),Be&20&&(ot=we[4],Je=mt(Je,Be,Ot,1,we,ot,st,ze,mn,Cd,null,$d)),Be&20&&(wt=we[4],Pe(),Fe=mt(Fe,Be,jt,1,we,wt,nt,me,Gt,Md,null,wd),Le())},i(we){if(!ft){E(A.$$.fragment,we),E(ee.$$.fragment,we);for(let Be=0;Be<wt.length;Be+=1)E(Fe[Be]);ft=!0}},o(we){P(A.$$.fragment,we),P(ee.$$.fragment,we);for(let Be=0;Be<Fe.length;Be+=1)P(Fe[Be]);ft=!1},d(we){we&&y(e),vt&&vt.d(),we&&y(h),we&&y(g),we&&y(M),we&&y(D),we&&y(O),q(A,we),we&&y(L),we&&y(F),we&&y(R),we&&y(B),we&&y(te),we&&y(Z),we&&y(H),we&&y(J),q(ee),we&&y(tt),we&&y(We),we&&y(it),we&&y(Ce);for(let Be=0;Be<Je.length;Be+=1)Je[Be].d();for(let Be=0;Be<Fe.length;Be+=1)Fe[Be].d()}}}function FC(n,e,t){let i,s,{collection:l=new An}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.viewRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify(Y.dummyCollectionRecord(l),null,2)}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||_e.baseUrl),[l,i,o,s,r,a]}class IC extends Ee{constructor(e){super(),Oe(this,e,FC,LC,De,{collection:0})}}function Td(n,e,t){const i=n.slice();return i[6]=e[t],i}function Dd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Od(n,e,t){const i=n.slice();return i[11]=e[t],i}function Ed(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function NC(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function RC(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function HC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("User "),i=N(t),s=N(".")},m(o,r){k(o,e,r),k(o,i,r),k(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&pe(i,t)},d(o){o&&y(e),o&&y(i),o&&y(s)}}}function jC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("Relation record "),i=N(t),s=N(".")},m(o,r){k(o,e,r),k(o,i,r),k(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&pe(i,t)},d(o){o&&y(e),o&&y(i),o&&y(s)}}}function qC(n){let e,t,i,s,l;return{c(){e=N("FormData object."),t=_("br"),i=N(`
|
||||
Set to `),s=_("code"),s.textContent="null",l=N(" to delete already uploaded file(s).")},m(o,r){k(o,e,r),k(o,t,r),k(o,i,r),k(o,s,r),k(o,l,r)},p:le,d(o){o&&y(e),o&&y(t),o&&y(i),o&&y(s),o&&y(l)}}}function VC(n){let e;return{c(){e=N("URL address.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function zC(n){let e;return{c(){e=N("Email address.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function BC(n){let e;return{c(){e=N("JSON array or object.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function UC(n){let e;return{c(){e=N("Number value.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function WC(n){let e;return{c(){e=N("Plain text value.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function Ad(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=Y.getFieldValueType(e[11])+"",h,g,v,b;function w(O,A){return O[11].required?RC:NC}let C=w(e),S=C(e);function $(O,A){if(O[11].type==="text")return WC;if(O[11].type==="number")return UC;if(O[11].type==="json")return BC;if(O[11].type==="email")return zC;if(O[11].type==="url")return VC;if(O[11].type==="file")return qC;if(O[11].type==="relation")return jC;if(O[11].type==="user")return HC}let M=$(e),D=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),S.c(),l=T(),o=_("span"),a=N(r),u=T(),f=_("td"),c=_("span"),h=N(d),g=T(),v=_("td"),D&&D.c(),b=T(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(O,A){k(O,t,A),m(t,i),m(i,s),S.m(s,null),m(s,l),m(s,o),m(o,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,v),D&&D.m(v,null),m(t,b)},p(O,A){e=O,C!==(C=w(e))&&(S.d(1),S=C(e),S&&(S.c(),S.m(s,l))),A&1&&r!==(r=e[11].name+"")&&pe(a,r),A&1&&d!==(d=Y.getFieldValueType(e[11])+"")&&pe(h,d),M===(M=$(e))&&D?D.p(e,A):(D&&D.d(1),D=M&&M(e),D&&(D.c(),D.m(v,null)))},d(O){O&&y(t),S.d(),D&&D.d()}}}function Pd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=T(),p(t,"class","tab-item"),ne(t,"active",e[1]===e[6].code),this.first=t},m(u,f){k(u,t,f),m(t,s),m(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&pe(s,i),f&6&&ne(t,"active",e[1]===e[6].code)},d(u){u&&y(t),o=!1,r()}}}function Ld(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),V(i.$$.fragment),s=T(),p(t,"class","tab-item"),ne(t,"active",e[1]===e[6].code),this.first=t},m(o,r){k(o,t,r),j(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),r&6&&ne(t,"active",e[1]===e[6].code)},i(o){l||(E(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&y(t),q(i)}}}function YC(n){var x,re,Ae;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,w=n[0].name+"",C,S,$,M,D,O,A,L,F,R,B,te,Z,H,J,U,Q,oe,ae,be=[],se=new Map,ge,$e,W,ye,ee,X,Se,je,Ue,K,de,fe,ke,Ze,tt,We,it,Ce,ze,Je,st,ct,me,Fe,nt,ft,vt,ot,Ot,wt=[],jt=new Map,Nt,Ke,we=[],Be=new Map,et,at=n[4]&&Ed();R=new As({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.records.create('${(x=n[0])==null?void 0:x.name}', data);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.create('${(re=n[0])==null?void 0:re.name}', body: body);
|
||||
`}});let Pt=(Ae=n[0])==null?void 0:Ae.schema;const Ft=ie=>ie[11].name;for(let ie=0;ie<Pt.length;ie+=1){let ve=Od(n,Pt,ie),Te=Ft(ve);se.set(Te,be[ie]=Ad(Te,ve))}tt=new hn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let Lt=n[2];const lt=ie=>ie[6].code;for(let ie=0;ie<Lt.length;ie+=1){let ve=Dd(n,Lt,ie),Te=lt(ve);jt.set(Te,wt[ie]=Pd(Te,ve))}let I=n[2];const z=ie=>ie[6].code;for(let ie=0;ie<I.length;ie+=1){let ve=Td(n,I,ie),Te=z(ve);Be.set(Te,we[ie]=Ld(Te,ve))}return{c(){e=_("div"),t=_("strong"),t.textContent="POST",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records"),c=T(),at&&at.c(),d=T(),h=_("div"),g=_("p"),v=N("Create a new "),b=_("strong"),C=N(w),S=N(" record."),$=T(),M=_("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,D=T(),O=_("p"),O.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",A=T(),L=_("div"),L.textContent="Client SDKs example",F=T(),V(R.$$.fragment),B=T(),te=_("div"),te.textContent="Body Parameters",Z=T(),H=_("table"),J=_("thead"),J.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="50%">Description</th></tr>`,U=T(),Q=_("tbody"),oe=_("tr"),oe.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
|
||||
<span>id</span></div></td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td><strong>15 characters string</strong> to store as record ID.
|
||||
<br/>
|
||||
If not set, it will be auto generated.</td>`,ae=T();for(let ie=0;ie<be.length;ie+=1)be[ie].c();ge=T(),$e=_("div"),$e.textContent="Query parameters",W=T(),ye=_("table"),ee=_("thead"),ee.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,X=T(),Se=_("tbody"),je=_("tr"),Ue=_("td"),Ue.textContent="expand",K=T(),de=_("td"),de.innerHTML='<span class="label">String</span>',fe=T(),ke=_("td"),Ze=N(`Auto expand relations when returning the created record. Ex.:
|
||||
`),V(tt.$$.fragment),We=N(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),it=_("br"),Ce=N(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),ze=_("code"),ze.textContent="@expand",Je=N(" property (eg. "),st=_("code"),st.textContent='"@expand": {"rel1": {...}, ...}',ct=N(`). Only the
|
||||
relations that the user has permissions to `),me=_("strong"),me.textContent="view",Fe=N(" will be expanded."),nt=T(),ft=_("div"),ft.textContent="Responses",vt=T(),ot=_("div"),Ot=_("div");for(let ie=0;ie<wt.length;ie+=1)wt[ie].c();Nt=T(),Ke=_("div");for(let ie=0;ie<we.length;ie+=1)we[ie].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-success"),p(h,"class","content m-b-base"),p(L,"class","section-title"),p(te,"class","section-title"),p(H,"class","table-compact table-border m-b-lg"),p($e,"class","section-title"),p(ye,"class","table-compact table-border m-b-lg"),p(ft,"class","section-title"),p(Ot,"class","tabs-header compact left"),p(Ke,"class","tabs-content"),p(ot,"class","tabs")},m(ie,ve){k(ie,e,ve),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(e,c),at&&at.m(e,null),k(ie,d,ve),k(ie,h,ve),m(h,g),m(g,v),m(g,b),m(b,C),m(g,S),m(h,$),m(h,M),m(h,D),m(h,O),k(ie,A,ve),k(ie,L,ve),k(ie,F,ve),j(R,ie,ve),k(ie,B,ve),k(ie,te,ve),k(ie,Z,ve),k(ie,H,ve),m(H,J),m(H,U),m(H,Q),m(Q,oe),m(Q,ae);for(let Te=0;Te<be.length;Te+=1)be[Te].m(Q,null);k(ie,ge,ve),k(ie,$e,ve),k(ie,W,ve),k(ie,ye,ve),m(ye,ee),m(ye,X),m(ye,Se),m(Se,je),m(je,Ue),m(je,K),m(je,de),m(je,fe),m(je,ke),m(ke,Ze),j(tt,ke,null),m(ke,We),m(ke,it),m(ke,Ce),m(ke,ze),m(ke,Je),m(ke,st),m(ke,ct),m(ke,me),m(ke,Fe),k(ie,nt,ve),k(ie,ft,ve),k(ie,vt,ve),k(ie,ot,ve),m(ot,Ot);for(let Te=0;Te<wt.length;Te+=1)wt[Te].m(Ot,null);m(ot,Nt),m(ot,Ke);for(let Te=0;Te<we.length;Te+=1)we[Te].m(Ke,null);et=!0},p(ie,[ve]){var ue,ce,Ie;(!et||ve&1)&&a!==(a=ie[0].name+"")&&pe(u,a),ie[4]?at||(at=Ed(),at.c(),at.m(e,null)):at&&(at.d(1),at=null),(!et||ve&1)&&w!==(w=ie[0].name+"")&&pe(C,w);const Te={};ve&9&&(Te.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${ie[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.records.create('${(ue=ie[0])==null?void 0:ue.name}', data);
|
||||
`),ve&9&&(Te.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${ie[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.create('${(ce=ie[0])==null?void 0:ce.name}', body: body);
|
||||
`),R.$set(Te),ve&1&&(Pt=(Ie=ie[0])==null?void 0:Ie.schema,be=mt(be,ve,Ft,1,ie,Pt,se,Q,mn,Ad,null,Od)),ve&6&&(Lt=ie[2],wt=mt(wt,ve,lt,1,ie,Lt,jt,Ot,mn,Pd,null,Dd)),ve&6&&(I=ie[2],Pe(),we=mt(we,ve,z,1,ie,I,Be,Ke,Gt,Ld,null,Td),Le())},i(ie){if(!et){E(R.$$.fragment,ie),E(tt.$$.fragment,ie);for(let ve=0;ve<I.length;ve+=1)E(we[ve]);et=!0}},o(ie){P(R.$$.fragment,ie),P(tt.$$.fragment,ie);for(let ve=0;ve<we.length;ve+=1)P(we[ve]);et=!1},d(ie){ie&&y(e),at&&at.d(),ie&&y(d),ie&&y(h),ie&&y(A),ie&&y(L),ie&&y(F),q(R,ie),ie&&y(B),ie&&y(te),ie&&y(Z),ie&&y(H);for(let ve=0;ve<be.length;ve+=1)be[ve].d();ie&&y(ge),ie&&y($e),ie&&y(W),ie&&y(ye),q(tt),ie&&y(nt),ie&&y(ft),ie&&y(vt),ie&&y(ot);for(let ve=0;ve<wt.length;ve+=1)wt[ve].d();for(let ve=0;ve<we.length;ve+=1)we[ve].d()}}}function KC(n,e,t){let i,s,{collection:l=new An}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.createRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(Y.dummyCollectionRecord(l),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to create record.",
|
||||
"data": {
|
||||
"${(f=(u=l==null?void 0:l.schema)==null?void 0:u[0])==null?void 0:f.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`}])},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||_e.baseUrl),[l,o,r,s,i,a]}class ZC extends Ee{constructor(e){super(),Oe(this,e,KC,YC,De,{collection:0})}}function Fd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Id(n,e,t){const i=n.slice();return i[6]=e[t],i}function Nd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Rd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function JC(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function GC(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function XC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("User "),i=N(t),s=N(".")},m(o,r){k(o,e,r),k(o,i,r),k(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&pe(i,t)},d(o){o&&y(e),o&&y(i),o&&y(s)}}}function QC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("Relation record "),i=N(t),s=N(".")},m(o,r){k(o,e,r),k(o,i,r),k(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&pe(i,t)},d(o){o&&y(e),o&&y(i),o&&y(s)}}}function xC(n){let e,t,i,s,l;return{c(){e=N("FormData object."),t=_("br"),i=N(`
|
||||
Set to `),s=_("code"),s.textContent="null",l=N(" to delete already uploaded file(s).")},m(o,r){k(o,e,r),k(o,t,r),k(o,i,r),k(o,s,r),k(o,l,r)},p:le,d(o){o&&y(e),o&&y(t),o&&y(i),o&&y(s),o&&y(l)}}}function e3(n){let e;return{c(){e=N("URL address.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function t3(n){let e;return{c(){e=N("Email address.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function n3(n){let e;return{c(){e=N("JSON array or object.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function i3(n){let e;return{c(){e=N("Number value.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function s3(n){let e;return{c(){e=N("Plain text value.")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function Hd(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=Y.getFieldValueType(e[11])+"",h,g,v,b;function w(O,A){return O[11].required?GC:JC}let C=w(e),S=C(e);function $(O,A){if(O[11].type==="text")return s3;if(O[11].type==="number")return i3;if(O[11].type==="json")return n3;if(O[11].type==="email")return t3;if(O[11].type==="url")return e3;if(O[11].type==="file")return xC;if(O[11].type==="relation")return QC;if(O[11].type==="user")return XC}let M=$(e),D=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),S.c(),l=T(),o=_("span"),a=N(r),u=T(),f=_("td"),c=_("span"),h=N(d),g=T(),v=_("td"),D&&D.c(),b=T(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(O,A){k(O,t,A),m(t,i),m(i,s),S.m(s,null),m(s,l),m(s,o),m(o,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,v),D&&D.m(v,null),m(t,b)},p(O,A){e=O,C!==(C=w(e))&&(S.d(1),S=C(e),S&&(S.c(),S.m(s,l))),A&1&&r!==(r=e[11].name+"")&&pe(a,r),A&1&&d!==(d=Y.getFieldValueType(e[11])+"")&&pe(h,d),M===(M=$(e))&&D?D.p(e,A):(D&&D.d(1),D=M&&M(e),D&&(D.c(),D.m(v,null)))},d(O){O&&y(t),S.d(),D&&D.d()}}}function jd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=T(),p(t,"class","tab-item"),ne(t,"active",e[1]===e[6].code),this.first=t},m(u,f){k(u,t,f),m(t,s),m(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&pe(s,i),f&6&&ne(t,"active",e[1]===e[6].code)},d(u){u&&y(t),o=!1,r()}}}function qd(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),V(i.$$.fragment),s=T(),p(t,"class","tab-item"),ne(t,"active",e[1]===e[6].code),this.first=t},m(o,r){k(o,t,r),j(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),r&6&&ne(t,"active",e[1]===e[6].code)},i(o){l||(E(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&y(t),q(i)}}}function l3(n){var ie,ve,Te;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,w,C=n[0].name+"",S,$,M,D,O,A,L,F,R,B,te,Z,H,J,U,Q,oe,ae,be,se,ge,$e=[],W=new Map,ye,ee,X,Se,je,Ue,K,de,fe,ke,Ze,tt,We,it,Ce,ze,Je,st,ct,me,Fe,nt,ft,vt,ot,Ot,wt,jt,Nt,Ke=[],we=new Map,Be,et,at=[],Pt=new Map,Ft,Lt=n[4]&&Rd();B=new As({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.records.update('${(ie=n[0])==null?void 0:ie.name}', 'RECORD_ID', data);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.update('${(ve=n[0])==null?void 0:ve.name}', 'RECORD_ID', body: body);
|
||||
`}});let lt=(Te=n[0])==null?void 0:Te.schema;const I=ue=>ue[11].name;for(let ue=0;ue<lt.length;ue+=1){let ce=Nd(n,lt,ue),Ie=I(ce);W.set(Ie,$e[ue]=Hd(Ie,ce))}Ce=new hn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let z=n[2];const x=ue=>ue[6].code;for(let ue=0;ue<z.length;ue+=1){let ce=Id(n,z,ue),Ie=x(ce);we.set(Ie,Ke[ue]=jd(Ie,ce))}let re=n[2];const Ae=ue=>ue[6].code;for(let ue=0;ue<re.length;ue+=1){let ce=Fd(n,re,ue),Ie=Ae(ce);Pt.set(Ie,at[ue]=qd(Ie,ce))}return{c(){e=_("div"),t=_("strong"),t.textContent="PATCH",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=T(),Lt&&Lt.c(),h=T(),g=_("div"),v=_("p"),b=N("Update a single "),w=_("strong"),S=N(C),$=N(" record."),M=T(),D=_("p"),D.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,O=T(),A=_("p"),A.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",L=T(),F=_("div"),F.textContent="Client SDKs example",R=T(),V(B.$$.fragment),te=T(),Z=_("div"),Z.textContent="Path parameters",H=T(),J=_("table"),J.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to update.</td></tr></tbody>`,U=T(),Q=_("div"),Q.textContent="Body Parameters",oe=T(),ae=_("table"),be=_("thead"),be.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="50%">Description</th></tr>`,se=T(),ge=_("tbody");for(let ue=0;ue<$e.length;ue+=1)$e[ue].c();ye=T(),ee=_("div"),ee.textContent="Query parameters",X=T(),Se=_("table"),je=_("thead"),je.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,Ue=T(),K=_("tbody"),de=_("tr"),fe=_("td"),fe.textContent="expand",ke=T(),Ze=_("td"),Ze.innerHTML='<span class="label">String</span>',tt=T(),We=_("td"),it=N(`Auto expand relations when returning the updated record. Ex.:
|
||||
`),V(Ce.$$.fragment),ze=N(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Je=_("br"),st=N(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),ct=_("code"),ct.textContent="@expand",me=N(" property (eg. "),Fe=_("code"),Fe.textContent='"@expand": {"rel1": {...}, ...}',nt=N(`). Only the
|
||||
relations that the user has permissions to `),ft=_("strong"),ft.textContent="view",vt=N(" will be expanded."),ot=T(),Ot=_("div"),Ot.textContent="Responses",wt=T(),jt=_("div"),Nt=_("div");for(let ue=0;ue<Ke.length;ue+=1)Ke[ue].c();Be=T(),et=_("div");for(let ue=0;ue<at.length;ue+=1)at[ue].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-warning"),p(g,"class","content m-b-base"),p(F,"class","section-title"),p(Z,"class","section-title"),p(J,"class","table-compact table-border m-b-lg"),p(Q,"class","section-title"),p(ae,"class","table-compact table-border m-b-lg"),p(ee,"class","section-title"),p(Se,"class","table-compact table-border m-b-lg"),p(Ot,"class","section-title"),p(Nt,"class","tabs-header compact left"),p(et,"class","tabs-content"),p(jt,"class","tabs")},m(ue,ce){k(ue,e,ce),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),Lt&&Lt.m(e,null),k(ue,h,ce),k(ue,g,ce),m(g,v),m(v,b),m(v,w),m(w,S),m(v,$),m(g,M),m(g,D),m(g,O),m(g,A),k(ue,L,ce),k(ue,F,ce),k(ue,R,ce),j(B,ue,ce),k(ue,te,ce),k(ue,Z,ce),k(ue,H,ce),k(ue,J,ce),k(ue,U,ce),k(ue,Q,ce),k(ue,oe,ce),k(ue,ae,ce),m(ae,be),m(ae,se),m(ae,ge);for(let Ie=0;Ie<$e.length;Ie+=1)$e[Ie].m(ge,null);k(ue,ye,ce),k(ue,ee,ce),k(ue,X,ce),k(ue,Se,ce),m(Se,je),m(Se,Ue),m(Se,K),m(K,de),m(de,fe),m(de,ke),m(de,Ze),m(de,tt),m(de,We),m(We,it),j(Ce,We,null),m(We,ze),m(We,Je),m(We,st),m(We,ct),m(We,me),m(We,Fe),m(We,nt),m(We,ft),m(We,vt),k(ue,ot,ce),k(ue,Ot,ce),k(ue,wt,ce),k(ue,jt,ce),m(jt,Nt);for(let Ie=0;Ie<Ke.length;Ie+=1)Ke[Ie].m(Nt,null);m(jt,Be),m(jt,et);for(let Ie=0;Ie<at.length;Ie+=1)at[Ie].m(et,null);Ft=!0},p(ue,[ce]){var ht,on,qt;(!Ft||ce&1)&&a!==(a=ue[0].name+"")&&pe(u,a),ue[4]?Lt||(Lt=Rd(),Lt.c(),Lt.m(e,null)):Lt&&(Lt.d(1),Lt=null),(!Ft||ce&1)&&C!==(C=ue[0].name+"")&&pe(S,C);const Ie={};ce&9&&(Ie.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${ue[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.records.update('${(ht=ue[0])==null?void 0:ht.name}', 'RECORD_ID', data);
|
||||
`),ce&9&&(Ie.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${ue[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.update('${(on=ue[0])==null?void 0:on.name}', 'RECORD_ID', body: body);
|
||||
`),B.$set(Ie),ce&1&&(lt=(qt=ue[0])==null?void 0:qt.schema,$e=mt($e,ce,I,1,ue,lt,W,ge,mn,Hd,null,Nd)),ce&6&&(z=ue[2],Ke=mt(Ke,ce,x,1,ue,z,we,Nt,mn,jd,null,Id)),ce&6&&(re=ue[2],Pe(),at=mt(at,ce,Ae,1,ue,re,Pt,et,Gt,qd,null,Fd),Le())},i(ue){if(!Ft){E(B.$$.fragment,ue),E(Ce.$$.fragment,ue);for(let ce=0;ce<re.length;ce+=1)E(at[ce]);Ft=!0}},o(ue){P(B.$$.fragment,ue),P(Ce.$$.fragment,ue);for(let ce=0;ce<at.length;ce+=1)P(at[ce]);Ft=!1},d(ue){ue&&y(e),Lt&&Lt.d(),ue&&y(h),ue&&y(g),ue&&y(L),ue&&y(F),ue&&y(R),q(B,ue),ue&&y(te),ue&&y(Z),ue&&y(H),ue&&y(J),ue&&y(U),ue&&y(Q),ue&&y(oe),ue&&y(ae);for(let ce=0;ce<$e.length;ce+=1)$e[ce].d();ue&&y(ye),ue&&y(ee),ue&&y(X),ue&&y(Se),q(Ce),ue&&y(ot),ue&&y(Ot),ue&&y(wt),ue&&y(jt);for(let ce=0;ce<Ke.length;ce+=1)Ke[ce].d();for(let ce=0;ce<at.length;ce+=1)at[ce].d()}}}function o3(n,e,t){let i,s,{collection:l=new An}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.updateRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(Y.dummyCollectionRecord(l),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to update record.",
|
||||
"data": {
|
||||
"${(f=(u=l==null?void 0:l.schema)==null?void 0:u[0])==null?void 0:f.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}])},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||_e.baseUrl),[l,o,r,s,i,a]}class r3 extends Ee{constructor(e){super(),Oe(this,e,o3,l3,De,{collection:0})}}function Vd(n,e,t){const i=n.slice();return i[6]=e[t],i}function zd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Bd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function Ud(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=T(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(u,f){k(u,t,f),m(t,s),m(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&20&&ne(t,"active",e[2]===e[6].code)},d(u){u&&y(t),o=!1,r()}}}function Wd(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),V(i.$$.fragment),s=T(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(o,r){k(o,t,r),j(i,t,null),m(t,s),l=!0},p(o,r){e=o,r&20&&ne(t,"active",e[2]===e[6].code)},i(o){l||(E(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&y(t),q(i)}}}function a3(n){var je,Ue;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,w,C=n[0].name+"",S,$,M,D,O,A,L,F,R,B,te,Z,H,J,U,Q=[],oe=new Map,ae,be,se=[],ge=new Map,$e,W=n[1]&&Bd();A=new As({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(je=n[0])==null?void 0:je.name}', 'RECORD_ID');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(Ue=n[0])==null?void 0:Ue.name}', 'RECORD_ID');
|
||||
`}});let ye=n[4];const ee=K=>K[6].code;for(let K=0;K<ye.length;K+=1){let de=zd(n,ye,K),fe=ee(de);oe.set(fe,Q[K]=Ud(fe,de))}let X=n[4];const Se=K=>K[6].code;for(let K=0;K<X.length;K+=1){let de=Vd(n,X,K),fe=Se(de);ge.set(fe,se[K]=Wd(fe,de))}return{c(){e=_("div"),t=_("strong"),t.textContent="DELETE",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=T(),W&&W.c(),h=T(),g=_("div"),v=_("p"),b=N("Delete a single "),w=_("strong"),S=N(C),$=N(" record."),M=T(),D=_("div"),D.textContent="Client SDKs example",O=T(),V(A.$$.fragment),L=T(),F=_("div"),F.textContent="Path parameters",R=T(),B=_("table"),B.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to delete.</td></tr></tbody>`,te=T(),Z=_("div"),Z.textContent="Responses",H=T(),J=_("div"),U=_("div");for(let K=0;K<Q.length;K+=1)Q[K].c();ae=T(),be=_("div");for(let K=0;K<se.length;K+=1)se[K].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-danger"),p(g,"class","content m-b-base"),p(D,"class","section-title"),p(F,"class","section-title"),p(B,"class","table-compact table-border m-b-lg"),p(Z,"class","section-title"),p(U,"class","tabs-header compact left"),p(be,"class","tabs-content"),p(J,"class","tabs")},m(K,de){k(K,e,de),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),W&&W.m(e,null),k(K,h,de),k(K,g,de),m(g,v),m(v,b),m(v,w),m(w,S),m(v,$),k(K,M,de),k(K,D,de),k(K,O,de),j(A,K,de),k(K,L,de),k(K,F,de),k(K,R,de),k(K,B,de),k(K,te,de),k(K,Z,de),k(K,H,de),k(K,J,de),m(J,U);for(let fe=0;fe<Q.length;fe+=1)Q[fe].m(U,null);m(J,ae),m(J,be);for(let fe=0;fe<se.length;fe+=1)se[fe].m(be,null);$e=!0},p(K,[de]){var ke,Ze;(!$e||de&1)&&a!==(a=K[0].name+"")&&pe(u,a),K[1]?W||(W=Bd(),W.c(),W.m(e,null)):W&&(W.d(1),W=null),(!$e||de&1)&&C!==(C=K[0].name+"")&&pe(S,C);const fe={};de&9&&(fe.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${K[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(ke=K[0])==null?void 0:ke.name}', 'RECORD_ID');
|
||||
`),de&9&&(fe.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${K[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(Ze=K[0])==null?void 0:Ze.name}', 'RECORD_ID');
|
||||
`),A.$set(fe),de&20&&(ye=K[4],Q=mt(Q,de,ee,1,K,ye,oe,U,mn,Ud,null,zd)),de&20&&(X=K[4],Pe(),se=mt(se,de,Se,1,K,X,ge,be,Gt,Wd,null,Vd),Le())},i(K){if(!$e){E(A.$$.fragment,K);for(let de=0;de<X.length;de+=1)E(se[de]);$e=!0}},o(K){P(A.$$.fragment,K);for(let de=0;de<se.length;de+=1)P(se[de]);$e=!1},d(K){K&&y(e),W&&W.d(),K&&y(h),K&&y(g),K&&y(M),K&&y(D),K&&y(O),q(A,K),K&&y(L),K&&y(F),K&&y(R),K&&y(B),K&&y(te),K&&y(Z),K&&y(H),K&&y(J);for(let de=0;de<Q.length;de+=1)Q[de].d();for(let de=0;de<se.length;de+=1)se[de].d()}}}function u3(n,e,t){let i,s,{collection:l=new An}=e,o=204,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.deleteRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:204,body:`
|
||||
null
|
||||
`}),r.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to delete record. Make sure that the record is not part of a required relation reference.",
|
||||
"data": {}
|
||||
}
|
||||
`}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||_e.baseUrl),[l,i,o,s,r,a]}class f3 extends Ee{constructor(e){super(),Oe(this,e,u3,a3,De,{collection:0})}}function c3(n){var h,g,v,b,w,C,S,$;let e,t,i,s,l,o,r,a,u,f,c,d;return r=new As({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(h=n[0])==null?void 0:h.name}', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${(g=n[0])==null?void 0:g.name}/RECORD_ID', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(v=n[0])==null?void 0:v.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${(b=n[0])==null?void 0:b.name}/RECORD_ID') // remove only the record subscription
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(w=n[0])==null?void 0:w.name}', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${(C=n[0])==null?void 0:C.name}/RECORD_ID', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(S=n[0])==null?void 0:S.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${($=n[0])==null?void 0:$.name}/RECORD_ID') // remove only the record subscription
|
||||
`}}),c=new hn({props:{content:JSON.stringify({action:"create",record:Y.dummyCollectionRecord(n[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){e=_("div"),e.innerHTML=`<strong class="label label-primary">SSE</strong>
|
||||
<div class="content"><p>/api/realtime</p></div>`,t=T(),i=_("div"),i.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p>
|
||||
<p>Events are send for <strong>create</strong>, <strong>update</strong>
|
||||
and <strong>delete</strong> record operations (see "Event data format" section below).</p>
|
||||
<div class="alert alert-info m-t-10"><div class="icon"><i class="ri-information-line"></i></div>
|
||||
<div class="contet"><p><strong>You could subscribe to a single record or to an entire collection.</strong></p>
|
||||
<p>When you subscribe to a <strong>single record</strong>, the collection's
|
||||
<strong>ViewRule</strong> will be used to determine whether the subscriber has access to receive
|
||||
the event message.</p>
|
||||
<p>When you subscribe to an <strong>entire collection</strong>, the collection's
|
||||
<strong>ListRule</strong> will be used to determine whether the subscriber has access to receive
|
||||
the event message.</p></div></div>`,s=T(),l=_("div"),l.textContent="Client SDKs example",o=T(),V(r.$$.fragment),a=T(),u=_("div"),u.textContent="Event data format",f=T(),V(c.$$.fragment),p(e,"class","alert"),p(i,"class","content m-b-base"),p(l,"class","section-title"),p(u,"class","section-title")},m(M,D){k(M,e,D),k(M,t,D),k(M,i,D),k(M,s,D),k(M,l,D),k(M,o,D),j(r,M,D),k(M,a,D),k(M,u,D),k(M,f,D),j(c,M,D),d=!0},p(M,[D]){var L,F,R,B,te,Z,H,J;const O={};D&3&&(O.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${M[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(L=M[0])==null?void 0:L.name}', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${(F=M[0])==null?void 0:F.name}/RECORD_ID', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(R=M[0])==null?void 0:R.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${(B=M[0])==null?void 0:B.name}/RECORD_ID') // remove only the record subscription
|
||||
`),D&3&&(O.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${M[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(te=M[0])==null?void 0:te.name}', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${(Z=M[0])==null?void 0:Z.name}/RECORD_ID', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(H=M[0])==null?void 0:H.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${(J=M[0])==null?void 0:J.name}/RECORD_ID') // remove only the record subscription
|
||||
`),r.$set(O);const A={};D&1&&(A.content=JSON.stringify({action:"create",record:Y.dummyCollectionRecord(M[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),c.$set(A)},i(M){d||(E(r.$$.fragment,M),E(c.$$.fragment,M),d=!0)},o(M){P(r.$$.fragment,M),P(c.$$.fragment,M),d=!1},d(M){M&&y(e),M&&y(t),M&&y(i),M&&y(s),M&&y(l),M&&y(o),q(r,M),M&&y(a),M&&y(u),M&&y(f),q(c,M)}}}function d3(n,e,t){let i,{collection:s=new An}=e;return n.$$set=l=>{"collection"in l&&t(0,s=l.collection)},t(1,i=window.location.href.substring(0,window.location.href.indexOf("/_"))||_e.baseUrl),[s,i]}class p3 extends Ee{constructor(e){super(),Oe(this,e,d3,c3,De,{collection:0})}}function Yd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Kd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Zd(n){let e,t,i,s;var l=n[14].component;function o(r){return{props:{collection:r[3]}}}return l&&(t=new l(o(n))),{c(){e=_("div"),t&&V(t.$$.fragment),i=T(),p(e,"class","tab-item active")},m(r,a){k(r,e,a),t&&j(t,e,null),m(e,i),s=!0},p(r,a){const u={};if(a&8&&(u.collection=r[3]),l!==(l=r[14].component)){if(t){Pe();const f=t;P(f.$$.fragment,1,0,()=>{q(f,1)}),Le()}l?(t=new l(o(r)),V(t.$$.fragment),E(t.$$.fragment,1),j(t,e,i)):t=null}else l&&t.$set(u)},i(r){s||(t&&E(t.$$.fragment,r),s=!0)},o(r){t&&P(t.$$.fragment,r),s=!1},d(r){r&&y(e),t&&q(t)}}}function Jd(n,e){let t,i,s,l=e[4]===e[14].id&&Zd(e);return{key:n,first:null,c(){t=Xe(),l&&l.c(),i=Xe(),this.first=t},m(o,r){k(o,t,r),l&&l.m(o,r),k(o,i,r),s=!0},p(o,r){e=o,e[4]===e[14].id?l?(l.p(e,r),r&16&&E(l,1)):(l=Zd(e),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(Pe(),P(l,1,1,()=>{l=null}),Le())},i(o){s||(E(l),s=!0)},o(o){P(l),s=!1},d(o){o&&y(t),l&&l.d(o),o&&y(i)}}}function h3(n){let e,t=[],i=new Map,s,l=n[5];const o=r=>r[14].id;for(let r=0;r<l.length;r+=1){let a=Yd(n,l,r),u=o(a);i.set(u,t[r]=Jd(u,a))}return{c(){e=_("div");for(let r=0;r<t.length;r+=1)t[r].c();p(e,"class","tabs-content")},m(r,a){k(r,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(r,a){a&56&&(l=r[5],Pe(),t=mt(t,a,o,1,r,l,i,e,Gt,Jd,null,Yd),Le())},i(r){if(!s){for(let a=0;a<l.length;a+=1)E(t[a]);s=!0}},o(r){for(let a=0;a<t.length;a+=1)P(t[a]);s=!1},d(r){r&&y(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function Gd(n,e){let t,i,s=e[14].label+"",l,o,r,a;function u(){return e[9](e[14])}function f(...c){return e[10](e[14],...c)}return{key:n,first:null,c(){t=_("button"),i=_("span"),l=N(s),o=T(),p(i,"class","txt"),p(t,"tabindex","0"),p(t,"class","tab-item"),ne(t,"active",e[4]===e[14].id),this.first=t},m(c,d){k(c,t,d),m(t,i),m(i,l),m(t,o),r||(a=[G(t,"click",u),G(t,"keydown",Yh(f))],r=!0)},p(c,d){e=c,d&48&&ne(t,"active",e[4]===e[14].id)},d(c){c&&y(t),r=!1,Qe(a)}}}function m3(n){let e,t,i=n[3].name+"",s,l,o,r,a=[],u=new Map,f=n[5];const c=d=>d[14].id;for(let d=0;d<f.length;d+=1){let h=Kd(n,f,d),g=c(h);u.set(g,a[d]=Gd(g,h))}return{c(){e=_("h4"),t=_("strong"),s=N(i),l=N(" records API"),o=T(),r=_("div");for(let d=0;d<a.length;d+=1)a[d].c();p(r,"class","tabs-header stretched")},m(d,h){k(d,e,h),m(e,t),m(t,s),m(e,l),k(d,o,h),k(d,r,h);for(let g=0;g<a.length;g+=1)a[g].m(r,null)},p(d,h){h&8&&i!==(i=d[3].name+"")&&pe(s,i),h&114&&(f=d[5],a=mt(a,h,c,1,d,f,u,r,mn,Gd,null,Kd))},d(d){d&&y(e),d&&y(o),d&&y(r);for(let h=0;h<a.length;h+=1)a[h].d()}}}function g3(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[8]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function _3(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[g3],header:[m3],default:[h3]},$$scope:{ctx:n}};return e=new di({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&524312&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[11](null),q(e,s)}}}function b3(n,e,t){const i=[{id:"list",label:"List",component:PC},{id:"view",label:"View",component:IC},{id:"create",label:"Create",component:ZC},{id:"update",label:"Update",component:r3},{id:"delete",label:"Delete",component:f3},{id:"realtime",label:"Realtime",component:p3}];let s,l=new An,o=i[0].id;function r(w){return t(3,l=w),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(w){t(4,o=w)}function f(w,C){(w.code==="Enter"||w.code==="Space")&&(w.preventDefault(),u(C))}const c=()=>a(),d=w=>u(w.id),h=(w,C)=>f(C,w.id);function g(w){he[w?"unshift":"push"](()=>{s=w,t(2,s)})}function v(w){ut.call(this,n,w)}function b(w){ut.call(this,n,w)}return[a,u,s,l,o,i,f,r,c,d,h,g,v,b]}class v3 extends Ee{constructor(e){super(),Oe(this,e,b3,_3,De,{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 y3(n){let e,t,i,s=[n[3]],l={};for(let o=0;o<s.length;o+=1)l=pt(l,s[o]);return{c(){e=_("textarea"),ai(e,l),ne(e,"svelte-1x1pbts",!0)},m(o,r){k(o,e,r)
Line truncated
|
||||
<span class="txt">Upload new file</span>`,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(r,a){k(r,e,a),m(e,t),n[16](t),m(e,i),m(e,s),l||(o=[G(t,"change",n[17]),G(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&y(e),n[16](null),l=!1,Qe(o)}}}function b4(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,h,g,v,b=n[4];const w=D=>D[25];for(let D=0;D<b.length;D+=1){let O=xd(n,b,D),A=w(O);d.set(A,c[D]=ep(A,O))}let C=n[0],S=[];for(let D=0;D<C.length;D+=1)S[D]=tp(Qd(n,C,D));const $=D=>P(S[D],1,1,()=>{S[D]=null});let M=!n[8]&&np(n);return{c(){e=_("label"),t=_("i"),s=T(),l=_("span"),r=N(o),u=T(),f=_("div");for(let D=0;D<c.length;D+=1)c[D].c();h=T();for(let D=0;D<S.length;D+=1)S[D].c();g=T(),M&&M.c(),p(t,"class",i=Y.getFieldTypeIcon(n[3].type)),p(l,"class","txt"),p(e,"for",a=n[21]),p(f,"class","files-list")},m(D,O){k(D,e,O),m(e,t),m(e,s),m(e,l),m(l,r),k(D,u,O),k(D,f,O);for(let A=0;A<c.length;A+=1)c[A].m(f,null);m(f,h);for(let A=0;A<S.length;A+=1)S[A].m(f,null);m(f,g),M&&M.m(f,null),n[19](f),v=!0},p(D,O){if((!v||O&8&&i!==(i=Y.getFieldTypeIcon(D[3].type)))&&p(t,"class",i),(!v||O&8)&&o!==(o=D[3].name+"")&&pe(r,o),(!v||O&2097152&&a!==(a=D[21]))&&p(e,"for",a),O&1558&&(b=D[4],Pe(),c=mt(c,O,w,1,D,b,d,f,Gt,ep,h,xd),Le()),O&2049){C=D[0];let A;for(A=0;A<C.length;A+=1){const L=Qd(D,C,A);S[A]?(S[A].p(L,O),E(S[A],1)):(S[A]=tp(L),S[A].c(),E(S[A],1),S[A].m(f,g))}for(Pe(),A=C.length;A<S.length;A+=1)$(A);Le()}D[8]?M&&(M.d(1),M=null):M?M.p(D,O):(M=np(D),M.c(),M.m(f,null))},i(D){if(!v){for(let O=0;O<b.length;O+=1)E(c[O]);for(let O=0;O<C.length;O+=1)E(S[O]);v=!0}},o(D){for(let O=0;O<c.length;O+=1)P(c[O]);S=S.filter(Boolean);for(let O=0;O<S.length;O+=1)P(S[O]);v=!1},d(D){D&&y(e),D&&y(u),D&&y(f);for(let O=0;O<c.length;O+=1)c[O].d();Xn(S,D),M&&M.d(),n[19](null)}}}function v4(n){let e,t;return e=new Ne({props:{class:"form-field form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[b4,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function y4(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new Sn}=e,c,d;function h(A){Y.removeByValue(u,A),t(1,u)}function g(A){Y.pushUnique(u,A),t(1,u)}function v(A){Y.isEmpty(a[A])||a.splice(A,1),t(0,a)}function b(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const w=A=>h(A),C=A=>g(A),S=A=>v(A);function $(A){he[A?"unshift":"push"](()=>{c=A,t(6,c)})}const M=()=>{for(let A of c.files)a.push(A);t(0,a),t(6,c.value=null,c)},D=()=>c==null?void 0:c.click();function O(A){he[A?"unshift":"push"](()=>{d=A,t(7,d)})}return n.$$set=A=>{"record"in A&&t(2,o=A.record),"value"in A&&t(12,r=A.value),"uploadedFiles"in A&&t(0,a=A.uploadedFiles),"deletedFileIndexes"in A&&t(1,u=A.deletedFileIndexes),"field"in A&&t(3,f=A.field)},n.$$.update=()=>{var A,L;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=Y.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=Y.toArray(u))),n.$$.dirty&8&&t(5,i=((A=f.options)==null?void 0:A.maxSelect)>1),n.$$.dirty&4128&&Y.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=Y.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((L=f.options)==null?void 0:L.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&b()},[a,u,o,f,s,i,c,d,l,h,g,v,r,w,C,S,$,M,D,O]}class k4 extends Ee{constructor(e){super(),Oe(this,e,y4,v4,De,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function ip(n){let e,t;return{c(){e=_("small"),t=N(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){k(i,e,s),m(e,t)},p(i,s){s&2&&pe(t,i[1])},d(i){i&&y(e)}}}function w4(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&ip(n);return{c(){e=_("i"),i=T(),s=_("div"),l=_("div"),r=N(o),a=T(),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){k(d,e,h),k(d,i,h),k(d,s,h),m(s,l),m(l,r),m(s,a),c&&c.m(s,null),u||(f=Ye(t=Ct.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Un(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&o!==(o=d[0].id+"")&&pe(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=ip(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:le,o:le,d(d){d&&y(e),d&&y(i),d&&y(s),c&&c.d(),u=!1,f()}}}function $4(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["name","title","label","key","email","heading","content",...ObjectLine truncated
|
||||
`,p(e,"class","block txt-center txt-disabled")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function U4(n){let e,t,i;function s(o){n[31](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new z4({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function W4(n){let e,t,i;function s(o){n[30](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new P4({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function Y4(n){let e,t,i,s,l;function o(f){n[27](f,n[40])}function r(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 k4({props:u}),he.push(()=>Re(e,"value",o)),he.push(()=>Re(e,"uploadedFiles",r)),he.push(()=>Re(e,"deletedFileIndexes",a)),{c(){V(e.$$.fragment)},m(f,c){j(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],He(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[40].name],He(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[40].name],He(()=>s=!1)),e.$set(d)},i(f){l||(E(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){q(e,f)}}}function K4(n){let e,t,i;function s(o){n[26](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new e4({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function Z4(n){let e,t,i;function s(o){n[25](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new G3({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function J4(n){let e,t,i;function s(o){n[24](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new Y3({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function G4(n){let e,t,i;function s(o){n[23](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new z3({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function X4(n){let e,t,i;function s(o){n[22](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new H3({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function Q4(n){let e,t,i;function s(o){n[21](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new F3({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function x4(n){let e,t,i;function s(o){n[20](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new E3({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function eM(n){let e,t,i;function s(o){n[19](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new M3({props:l}),he.push(()=>Re(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;
Line truncated
|
||||
<span class="txt">Delete</span>`,p(e,"tabindex","0"),p(e,"class","dropdown-item closable")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[18]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function iM(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",o,r,a,u,f,c=!n[2].isNew&&n[10]&&dp(n);return{c(){e=_("h4"),i=N(t),s=T(),o=N(l),r=N(" record"),a=T(),c&&c.c(),u=Xe()},m(d,h){k(d,e,h),m(e,i),m(e,s),m(e,o),m(e,r),k(d,a,h),c&&c.m(d,h),k(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&pe(i,t),(!f||h[0]&1)&&l!==(l=d[0].name+"")&&pe(o,l),!d[2].isNew&&d[10]?c?(c.p(d,h),h[0]&1028&&E(c,1)):(c=dp(d),c.c(),E(c,1),c.m(u.parentNode,u)):c&&(Pe(),P(c,1,1,()=>{c=null}),Le())},i(d){f||(E(c),f=!0)},o(d){P(c),f=!1},d(d){d&&y(e),d&&y(a),c&&c.d(d),d&&y(u)}}}function sM(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=T(),s=_("button"),l=_("span"),r=N(o),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[9]||n[7],ne(s,"btn-loading",n[7])},m(c,d){k(c,e,d),m(e,t),k(c,i,d),k(c,s,d),m(s,l),m(l,r),u||(f=G(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&pe(r,o),d[0]&640&&a!==(a=!c[9]||c[7])&&(s.disabled=a),d[0]&128&&ne(s,"btn-loading",c[7])},d(c){c&&y(e),c&&y(i),c&&y(s),u=!1,f()}}}function lM(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[sM],header:[iM],default:[tM]},$$scope:{ctx:n}};return e=new di({props:i}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&288&&(o.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[33](null),q(e,s)}}}function pp(n){return JSON.stringify(n)}function oM(n,e,t){let i,s,l,o;const r=ln(),a="record_"+Y.randomString(5);let{collection:u}=e,f,c=null,d=new uo,h=!1,g=!1,v={},b={},w="";function C(ee){return $(ee),t(8,g=!0),f==null?void 0:f.show()}function S(){return f==null?void 0:f.hide()}async function $(ee){wi({}),c=ee||{},t(2,d=ee!=null&&ee.clone?ee.clone():new uo),t(3,v={}),t(4,b={}),await ei(),t(15,w=pp(d))}function M(){if(h||!l)return;t(7,h=!0);const ee=O();let X;d.isNew?X=_e.records.create(u==null?void 0:u.id,ee):X=_e.records.update(u==null?void 0:u.id,d.id,ee),X.then(async Se=>{un(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),S(),r("save",Se)}).catch(Se=>{_e.errorResponseHandler(Se)}).finally(()=>{t(7,h=!1)})}function D(){!(c!=null&&c.id)||ui("Do you really want to delete the selected record?",()=>_e.records.delete(c["@collectionId"],c.id).then(()=>{S(),un("Successfully deleted record."),r("delete",c)}).catch(ee=>{_e.errorResponseHandler(ee)}))}function O(){const ee=(d==null?void 0:d.export())||{},X=new FormData,Se={};for(const je of(u==null?void 0:u.schema)||[])Se[je.name]=je;for(const je in ee)!Se[je]||(typeof ee[je]>"u"&&(ee[je]=null),Y.addValueToFormData(X,je,ee[je]));for(const je in v){const Ue=Y.toArray(v[je]);for(const K of Ue)X.append(je,K)}for(const je in b){const Ue=Y.toArray(b[je]);for(const K of Ue)X.append(je+"."+K,"")}return X}const A=()=>S(),L=()=>D();function F(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function R(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function B(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function te(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function Z(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function H(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function J(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function U(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function Q(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function oe(ee,X){n.$$.not_equal(v[X.name],ee)&&(v[X.name]=ee,t(3,v))}function ae(ee,X){n.$$.not_equal(b[X.name],ee)&&(b[X.name]=ee,t(4,b))}function be(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}function se(ee,X){n.$$.not_equal(d[X.name],ee)&&(d[X.name]=ee,t(2,d))}const ge=()=>s&&g?(ui("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,g=!1),S()}),!1):!0;function $e(ee){he[ee?"unshift":"push"](()=>{f=ee,t(6,f)})}function W(ee){ut.call(this,n,ee)}function ye(ee){ut.call(this,n,ee)}return n.$$set=ee=>{"collection"in ee&&t(0,u=ee.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(16,i=Y.hasNonEmptyProps(v)||Y.hasNonEmptyProps(b)),n.$$.dirty[0]&98308&&t(5,s=i||w!=pp(d)),n.$$.dirty[0]&36&&t(9,l=d.isNew||s),n.$$.dirty[0]&1&&t(10,o=(u==null?void 0:u.name)!=="profiles")},[u,S,d,v,b,s,f,h,g,l,o,a,M,D,C,w,i,A,L,F,R,B,te,Z,H,J,U,Q,oe,ae,be,se,ge,$e,W,ye]}class g_ extends Ee{constructor(e){super(),Oe(this,e,oM,lM,De,{collection:0,show:14,hide:1},null,[-1,-1])}getLine truncated
|
||||
`},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function Cp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[28]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function Mp(n,e){let t,i,s;return i=new __({props:{record:e[35],field:e[38]}}),{key:n,first:null,c(){t=Xe(),V(i.$$.fragment),this.first=t},m(l,o){k(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8&&(r.record=e[35]),o[0]&2048&&(r.field=e[38]),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&y(t),q(i,l)}}}function Tp(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,g,v=[],b=new Map,w,C,S,$,M,D,O,A,L,F,R,B;function te(){return e[25](e[35])}h=new Go({props:{id:e[35].id}});let Z=e[11];const H=Q=>Q[38].name;for(let Q=0;Q<Z.length;Q+=1){let oe=kp(e,Z,Q),ae=H(oe);b.set(ae,v[Q]=Mp(ae,oe))}S=new yi({props:{date:e[35].created}}),D=new yi({props:{date:e[35].updated}});function J(){return e[26](e[35])}function U(...Q){return e[27](e[35],...Q)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),l=_("input"),a=T(),u=_("label"),c=T(),d=_("td"),V(h.$$.fragment),g=T();for(let Q=0;Q<v.length;Q+=1)v[Q].c();w=T(),C=_("td"),V(S.$$.fragment),$=T(),M=_("td"),V(D.$$.fragment),O=T(),A=_("td"),A.innerHTML='<i class="ri-arrow-right-line"></i>',L=T(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[35].id),l.checked=r=e[5][e[35].id],p(u,"for",f="checkbox_"+e[35].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(d,"class","col-type-text col-field-id"),p(C,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(A,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Q,oe){k(Q,t,oe),m(t,i),m(i,s),m(s,l),m(s,a),m(s,u),m(t,c),m(t,d),j(h,d,null),m(t,g);for(let ae=0;ae<v.length;ae+=1)v[ae].m(t,null);m(t,w),m(t,C),j(S,C,null),m(t,$),m(t,M),j(D,M,null),m(t,O),m(t,A),m(t,L),F=!0,R||(B=[G(l,"change",te),G(s,"click",Qn(e[19])),G(t,"click",J),G(t,"keydown",U)],R=!0)},p(Q,oe){e=Q,(!F||oe[0]&8&&o!==(o="checkbox_"+e[35].id))&&p(l,"id",o),(!F||oe[0]&40&&r!==(r=e[5][e[35].id]))&&(l.checked=r),(!F||oe[0]&8&&f!==(f="checkbox_"+e[35].id))&&p(u,"for",f);const ae={};oe[0]&8&&(ae.id=e[35].id),h.$set(ae),oe[0]&2056&&(Z=e[11],Pe(),v=mt(v,oe,H,1,e,Z,b,t,Gt,Mp,w,kp),Le());const be={};oe[0]&8&&(be.date=e[35].created),S.$set(be);const se={};oe[0]&8&&(se.date=e[35].updated),D.$set(se)},i(Q){if(!F){E(h.$$.fragment,Q);for(let oe=0;oe<Z.length;oe+=1)E(v[oe]);E(S.$$.fragment,Q),E(D.$$.fragment,Q),F=!0}},o(Q){P(h.$$.fragment,Q);for(let oe=0;oe<v.length;oe+=1)P(v[oe]);P(S.$$.fragment,Q),P(D.$$.fragment,Q),F=!1},d(Q){Q&&y(t),q(h);for(let oe=0;oe<v.length;oe+=1)v[oe].d();q(S),q(D),R=!1,Qe(B)}}}function Dp(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){k(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a[0]&8&&i!==(i=r[3].length+"")&&pe(s,i),a[0]&16&&pe(o,r[4])},d(r){r&&y(e)}}}function Op(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ne(t,"btn-loading",n[8]),ne(t,"btn-disabled",n[8]),p(e,"class","block txt-center m-t-xs")},m(f,c){k(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=G(t,"click",n[29]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&pe(o,l),c[0]&256&&ne(t,"btn-loading",f[8]),c[0]&256&&ne(t,"btn-disabled",f[8])},d(f){f&&y(e),a=!1,u()}}}function Ep(n){let e,t,i,s,l,o,r=n[6]===1?"record":"records",a,u,f,c,d,h,g,v,b,w,C;return{c(){e=_("div"),t=_("div"),i=N("Selected "),s=_("strong"),l=N(n[6]),o=T(),a=N(r),u=T(),f=_("button"),f.innerHTML='<span class="txt">Reset</span>',c=T(),d=_("div"),h=T(),g=_("button"),g.innerHTML='<span class="txt">Delete selected</span>',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ne(f,"btn-disabled",n[9]),p(d,"class","flex-fill"),p(g,"type","button"),p(g,"class","btn btn-sm btn-secondary btn-danger"),ne(g,"btn-loading",n[9]),ne(g,"btn-disabled",n[9]),p(e,"class","bulkbar")},m(S,$){k(S,e,$),m(e,t),m(t,i),m(t,s),m(s,l),m(t,o),m(t,a),m(e,u),m(e,f),m(e,c),m(e,d),m(e,h),m(e,g),b=!0,w||(C=[G(f,"click",n[30]),G(g,"click",n[31])],w=!0)},p(S,$){(!b||$[0]&64)&&pe(l,S[6]),(!b||$[0]&64)&&r!==(r=S[6]===1?"record":"records")&&pe(a,r),$[0]&512&&ne(f,"btn-disabled",S[9]),$[0]&512&&ne(g,"btn-loading",S[9]),$[0]&512&&ne(g,"btn-disabled",S[9])},i(S){b||(S&&Dt(()=>{v||(v=rt(e,qn,{duration:150,y:5},!0)),v.run(1)}),b=!0)},o(S){S&&(v||(v=rt(e,qn,{duration:150,y:5},!1)),v.run(0)),b=!1},d(S){S&&y(e),S&&v&&v.end(),w=!1,Qe(C)}}}function DM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v=[],b=new Map,w,C,S,$,M,D,O,A,L,F,R=[],B=new Map,te,Z,H,J,U,Q,oe;function ae(fe){n[21](fe)}let be={class:"col-type-text col-fie
Line truncated
|
||||
<span class="txt">API Preview</span>`,b=T(),w=_("button"),w.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">New record</span>`,C=T(),V(S.$$.fragment),$=T(),V(M.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"type","button"),p(f,"class","btn btn-secondary btn-circle"),p(u,"class","inline-flex gap-5"),p(v,"type","button"),p(v,"class","btn btn-outline"),p(w,"type","button"),p(w,"class","btn btn-expanded"),p(g,"class","btns-group"),p(e,"class","page-header")},m(Z,H){k(Z,e,H),m(e,t),m(t,i),m(t,s),m(t,l),m(l,r),m(e,a),m(e,u),m(u,f),m(u,c),j(d,u,null),m(e,h),m(e,g),m(g,v),m(g,b),m(g,w),k(Z,C,H),j(S,Z,H),k(Z,$,H),j(M,Z,H),A=!0,L||(F=[Ye(Ct.call(null,f,{text:"Edit collection",position:"right"})),G(f,"click",n[12]),G(v,"click",n[14]),G(w,"click",n[15])],L=!0)},p(Z,H){(!A||H&4)&&o!==(o=Z[2].name+"")&&pe(r,o);const J={};H&1&&(J.value=Z[0]),H&4&&(J.autocompleteCollection=Z[2]),S.$set(J);const U={};H&4&&(U.collection=Z[2]),!D&&H&1&&(D=!0,U.filter=Z[0],He(()=>D=!1)),!O&&H&2&&(O=!0,U.sort=Z[1],He(()=>O=!1)),M.$set(U)},i(Z){A||(E(d.$$.fragment,Z),E(S.$$.fragment,Z),E(M.$$.fragment,Z),A=!0)},o(Z){P(d.$$.fragment,Z),P(S.$$.fragment,Z),P(M.$$.fragment,Z),A=!1},d(Z){Z&&y(e),q(d),Z&&y(C),q(S,Z),Z&&y($),n[17](null),q(M,Z),L=!1,Qe(F)}}}function IM(n){let e,t,i,s,l,o,r,a;return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=T(),s=_("h1"),s.textContent="Create your first collection to add records!",l=T(),o=_("button"),o.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">Create new collection</span>`,p(t,"class","icon"),p(s,"class","m-b-10"),p(o,"type","button"),p(o,"class","btn btn-expanded-lg btn-lg"),p(e,"class","placeholder-section m-b-base")},m(u,f){k(u,e,f),m(e,t),m(e,i),m(e,s),m(e,l),m(e,o),r||(a=G(o,"click",n[11]),r=!0)},p:le,d(u){u&&y(e),r=!1,a()}}}function NM(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
|
||||
<h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function RM(n){let e,t,i,s,l,o,r,a,u;const f=[LM,PM,AM],c=[];function d(b,w){return b[8]?0:b[7].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new Wa({props:h}),n[21](s);let g={};o=new v3({props:g}),n[22](o);let v={collection:n[2]};return a=new g_({props:v}),n[23](a),a.$on("save",n[24]),a.$on("delete",n[25]),{c(){t.c(),i=T(),V(s.$$.fragment),l=T(),V(o.$$.fragment),r=T(),V(a.$$.fragment)},m(b,w){c[e].m(b,w),k(b,i,w),j(s,b,w),k(b,l,w),j(o,b,w),k(b,r,w),j(a,b,w),u=!0},p(b,[w]){let C=e;e=d(b),e===C?c[e].p(b,w):(Pe(),P(c[C],1,1,()=>{c[C]=null}),Le(),t=c[e],t?t.p(b,w):(t=c[e]=f[e](b),t.c()),E(t,1),t.m(i.parentNode,i));const S={};s.$set(S);const $={};o.$set($);const M={};w&4&&(M.collection=b[2]),a.$set(M)},i(b){u||(E(t),E(s.$$.fragment,b),E(o.$$.fragment,b),E(a.$$.fragment,b),u=!0)},o(b){P(t),P(s.$$.fragment,b),P(o.$$.fragment,b),P(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&y(i),n[21](null),q(s,b),b&&y(l),n[22](null),q(o,b),b&&y(r),n[23](null),q(a,b)}}}function HM(n,e,t){let i,s,l,o,r,a;kt(n,ri,U=>t(2,s=U)),kt(n,Ms,U=>t(10,l=U)),kt(n,No,U=>t(26,o=U)),kt(n,Rt,U=>t(27,r=U)),kt(n,ta,U=>t(8,a=U)),fn(Rt,r="Collections",r);const u=new URLSearchParams(o);let f,c,d,h,g=u.get("filter")||"",v=u.get("sort")||"-created",b=u.get("collectionId")||"";function w(){t(9,b=s.id),t(1,v="-created"),t(0,g="")}Y2(b);const C=()=>f==null?void 0:f.show(),S=()=>f==null?void 0:f.show(s),$=()=>h==null?void 0:h.load(),M=()=>c==null?void 0:c.show(s),D=()=>d==null?void 0:d.show(),O=U=>t(0,g=U.detail);function A(U){he[U?"unshift":"push"](()=>{h=U,t(6,h)})}function L(U){g=U,t(0,g)}function F(U){v=U,t(1,v)}const R=U=>d==null?void 0:d.show(U==null?void 0:U.detail);function B(U){he[U?"unshift":"push"](()=>{f=U,t(3,f)})}function te(U){he[U?"unshift":"push"](()=>{c=U,t(4,c)})}function Z(U){he[U?"unshift":"push"](()=>{d=U,t(5,d)})}const H=()=>h==null?void 0:h.load(),J=()=>h==null?void 0:h.load();return n.$$.update=()=>{if(n.$$.dirty&1024&&t(7,i=l.filter(U=>U.name!="profiles")),n.$$.dirty&516&&(s==null?void 0:s.id)&&b!=s.id&&w(),n.$$.dirty&7&&(v||g||(s==null?void 0:s.id))){const U=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:g,sort:v}).toString();ki("/collections?"+U)}},[g,v,s,f,c,d,h,i,a,b,l,C,S,$,M,D,O,A,L,F,R,B,te,Z,H,J]}class jM extends Ee{constructor(e){super(),Oe(this,e,HM,RM,De,{})}}function Ap(n){let e,t;return e=new Ne({props:{class:"form-field disabled",name:"id",$$slots:{default:[qM,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&2|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function qM(n){let e,t,i,s,l,o,r,a,u;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="ID",o=T(),r=_("input"),p(t,"class",Y.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[31]),p(r,"type","text"),p(r,"id",a=n[31]),r.value=u=n[1].id,r.disabled=!0},m(f,c){k(f,e,c),m(e,t),m(e,i),m(e,s),k(f,o,c),k(f,r,c)},p(f,c){c[1]&1&&l!==(l=f[31])&&p(e,"for",l),c[1]&1&&a!==(a=f[31])&&p(r,"id",a),c[0]&2&&u!==(u=f[1].id)&&r.value!==u&&(r.value=u)},d(f){f&&y(e),f&&y(o),f&&y(r)}}}function Pp(n){let e,t,i;return{c(){e=_("div"),e.innerHTML='<i class="ri-shield-check-line"></i>',p(e,"class","form-field-addon txt-success")},m(s,l){k(s,e,l),t||(i=Ye(Ct.call(null,e,"Verified")),t=!0)},d(s){s&&y(e),t=!1,i()}}}function VM(n){let e,t,i,s,l,o,r,a,u,f,c,d=n[1].verified&&Pp();return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="Email",o=T(),d&&d.c(),r=T(),a=_("input"),p(t,"class",Y.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[31]),p(a,"type","email"),p(a,"autocomplete","off"),p(a,"id",u=n[31]),a.required=!0},m(h,g){k(h,e,g),m(e,t),m(e,i),m(e,s),k(h,o,g),d&&d.m(h,g),k(h,r,g),k(h,a,g),Me(a,n[2]),f||(c=G(a,"input",n[19]),f=!0)},p(h,g){g[1]&1&&l!==(l=h[31])&&p(e,"for",l),h[1].verified?d||(d=Pp(),d.c(),d.m(r.parentNode,r)):d&&(d.d(1),d=null),g[1]&1&&u!==(u=h[31])&&p(a,"id",u),g[0]&4&&a.value!==h[2]&&Me(a,h[2])},d(h){h&&y(e),h&&y(o),d&&d.d(h),h&&y(r),h&&y(a),f=!1,c()}}}function Lp(n){let e,t;return e=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[zM,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&8|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function zM(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[31]),p(s,"for",o=n[31])},m(u,f){k(u,e,f),e.checked=n[3],k(u,i,f),k(u,s,f),m(s,l),r||(a=G(e,"change",n[20]),r=!0)},p(u,f){f[1]&1&&t!==(t=u[31])&&p(e,"id",t),f[0]&8&&(e.checked=u[3]),f[1]&1&&o!==(o=u[31])&&p(s,"for",o)},d(u){u&&y(e),u&&y(i),u&&y(s),r=!1,a()}}}function Fp(n){let eLine truncated
|
||||
<span class="txt">Send verification email</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[16]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function ZM(n){let e,t,i,s,l=!n[1].verified&&Rp(n);return{c(){l&&l.c(),e=T(),t=_("button"),t.innerHTML=`<i class="ri-delete-bin-7-line"></i>
|
||||
<span class="txt">Delete</span>`,p(t,"type","button"),p(t,"class","dropdown-item")},m(o,r){l&&l.m(o,r),k(o,e,r),k(o,t,r),i||(s=G(t,"click",n[17]),i=!0)},p(o,r){o[1].verified?l&&(l.d(1),l=null):l?l.p(o,r):(l=Rp(o),l.c(),l.m(e.parentNode,e))},d(o){l&&l.d(o),o&&y(e),o&&y(t),i=!1,s()}}}function JM(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&Np(n);return{c(){h&&h.c(),e=T(),t=_("button"),i=_("span"),i.textContent="Cancel",s=T(),l=_("button"),o=_("span"),a=N(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[5],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[5],ne(l,"btn-loading",n[5])},m(g,v){h&&h.m(g,v),k(g,e,v),k(g,t,v),m(t,i),k(g,s,v),k(g,l,v),m(l,o),m(o,a),f=!0,c||(d=G(t,"click",n[18]),c=!0)},p(g,v){g[1].isNew?h&&(Pe(),P(h,1,1,()=>{h=null}),Le()):h?(h.p(g,v),v[0]&2&&E(h,1)):(h=Np(g),h.c(),E(h,1),h.m(e.parentNode,e)),(!f||v[0]&32)&&(t.disabled=g[5]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&pe(a,r),(!f||v[0]&1056&&u!==(u=!g[10]||g[5]))&&(l.disabled=u),v[0]&32&&ne(l,"btn-loading",g[5])},i(g){f||(E(h),f=!0)},o(g){P(h),f=!1},d(g){h&&h.d(g),g&&y(e),g&&y(t),g&&y(s),g&&y(l),c=!1,d()}}}function GM(n){let e,t,i={popup:!0,class:"user-panel",beforeHide:n[24],$$slots:{footer:[JM],header:[KM],default:[YM]},$$scope:{ctx:n}};return e=new di({props:i}),n[25](e),e.$on("hide",n[26]),e.$on("show",n[27]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&1088&&(o.beforeHide=s[24]),l[0]&1966|l[1]&2&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[25](null),q(e,s)}}}function XM(n,e,t){let i;const s=ln(),l="user_"+Y.randomString(5);let o,r=new fo,a=!1,u=!1,f="",c="",d="",h=!1,g=!0;function v(Q){return w(Q),t(6,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function w(Q){wi({}),t(1,r=Q!=null&&Q.clone?Q.clone():new fo),C()}function C(){t(3,h=!1),t(9,g=!0),t(2,f=(r==null?void 0:r.email)||""),t(7,c=""),t(8,d="")}function S(){if(a||!i)return;t(5,a=!0);const Q={email:f};(r.isNew||h)&&(Q.password=c,Q.passwordConfirm=d);let oe;r.isNew?oe=_e.users.create(Q):oe=_e.users.update(r.id,Q),oe.then(async ae=>{g&&M(!1),t(6,u=!1),b(),un(r.isNew?"Successfully created user.":"Successfully updated user."),s("save",ae)}).catch(ae=>{_e.errorResponseHandler(ae)}).finally(()=>{t(5,a=!1)})}function $(){!(r!=null&&r.id)||ui("Do you really want to delete the selected user?",()=>_e.users.delete(r.id).then(()=>{t(6,u=!1),b(),un("Successfully deleted user."),s("delete",r)}).catch(Q=>{_e.errorResponseHandler(Q)}))}function M(Q=!0){return _e.users.requestVerification(r.isNew?f:r.email).then(()=>{t(6,u=!1),b(),Q&&un(`Successfully sent verification email to ${r.email}.`)}).catch(oe=>{_e.errorResponseHandler(oe)})}const D=()=>M(),O=()=>$(),A=()=>b();function L(){f=this.value,t(2,f)}function F(){h=this.checked,t(3,h)}function R(){c=this.value,t(7,c)}function B(){d=this.value,t(8,d)}function te(){g=this.checked,t(9,g)}const Z=()=>i&&u?(ui("You have unsaved changes. Do you really want to close the panel?",()=>{t(6,u=!1),b()}),!1):!0;function H(Q){he[Q?"unshift":"push"](()=>{o=Q,t(4,o)})}function J(Q){ut.call(this,n,Q)}function U(Q){ut.call(this,n,Q)}return n.$$.update=()=>{n.$$.dirty[0]&14&&t(10,i=r.isNew&&f!=""||h||f!==r.email)},[b,r,f,h,o,a,u,c,d,g,i,l,S,$,M,v,D,O,A,L,F,R,B,te,Z,H,J,U]}class QM extends Ee{constructor(e){super(),Oe(this,e,XM,GM,De,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function Hp(n,e,t){const i=n.slice();return i[40]=e[t],i}function jp(n,e,t){const i=n.slice();return i[43]=e[t],i}function qp(n,e,t){const i=n.slice();return i[43]=e[t],i}function xM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C,S,$,M,D,O,A,L,F=[],R=new Map,B,te,Z,H,J,U,Q,oe,ae,be,se=[],ge=new Map,$e,W,ye,ee,X,Se;a=new Bo({}),a.$on("refresh",n[17]),g=new zo({props:{value:n[3],placeholder:"Search filter, eg. verified=1",extraAutocompleteKeys:["verified","email"]}}),g.$on("submit",n[19]);function je(me){n[20](me)}let Ue={class:"col-type-text col-field-id",name:"id",$$slots:{default:[tT]},$$scope:{ctx:n}};n[4]!==void 0&&(Ue.sort=n[4]),$=new nn({props:Ue}),he.push(()=>Re($,"sort",je));function K(me){n[21](me)}let de={class:"col-type-email col-field-email",name:"email",$$slots:{default:[nT]},$$scope:{ctx:n}};n[4]!==void 0&&(de.sort=n[4]),O=new nn({props:de}),he.push(()=>Re(O,"sort",K));let fe=n[12];const ke=me=>me[43].name;for(let me=0;me<fe.length;me+=1){let Fe=qp(n,fe,me),nt=ke(Fe);R.set(nt,F[me]=Vp(nt,Fe))}function Ze(me){n[22](me)}let tt={class:"col-type-date col-field-created",name:"created",$$slots:{default:[iT]},$$scope:{ctx:n}};n[4]!==void 0&&(tt.sort=n[4]),te=new nn({props:tt}),he.push(()=>Re(te,"sort",Ze));function We(me){n[23](me)}let it={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[sT]},$$scope:{ctx:n}};n[4]!==voidLine truncated
|
||||
<span class="txt">New user</span>`,h=T(),V(g.$$.fragment),v=T(),b=_("div"),w=_("table"),C=_("thead"),S=_("tr"),V($.$$.fragment),D=T(),V(O.$$.fragment),L=T();for(let me=0;me<F.length;me+=1)F[me].c();B=T(),V(te.$$.fragment),H=T(),V(J.$$.fragment),Q=T(),oe=_("th"),ae=T(),be=_("tbody");for(let me=0;me<se.length;me+=1)se[me].c();Je&&Je.c(),$e=T(),st&&st.c(),W=T(),ct&&ct.c(),ye=Xe(),p(i,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(o,"type","button"),p(o,"class","btn btn-secondary btn-circle"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p(oe,"class","col-type-action min-width"),p(w,"class","table"),ne(w,"table-loading",n[10]),p(b,"class","table-wrapper")},m(me,Fe){k(me,e,Fe),m(e,t),m(t,i),m(i,s),m(e,l),m(e,o),m(e,r),j(a,e,null),m(e,u),m(e,f),m(e,c),m(e,d),k(me,h,Fe),j(g,me,Fe),k(me,v,Fe),k(me,b,Fe),m(b,w),m(w,C),m(C,S),j($,S,null),m(S,D),j(O,S,null),m(S,L);for(let nt=0;nt<F.length;nt+=1)F[nt].m(S,null);m(S,B),j(te,S,null),m(S,H),j(J,S,null),m(S,Q),m(S,oe),m(w,ae),m(w,be);for(let nt=0;nt<se.length;nt+=1)se[nt].m(be,null);Je&&Je.m(be,null),k(me,$e,Fe),st&&st.m(me,Fe),k(me,W,Fe),ct&&ct.m(me,Fe),k(me,ye,Fe),ee=!0,X||(Se=[Ye(Ct.call(null,o,{text:"Edit profile collection",position:"right"})),G(o,"click",n[16]),G(d,"click",n[18])],X=!0)},p(me,Fe){(!ee||Fe[0]&16384)&&pe(s,me[14]);const nt={};Fe[0]&8&&(nt.value=me[3]),g.$set(nt);const ft={};Fe[1]&131072&&(ft.$$scope={dirty:Fe,ctx:me}),!M&&Fe[0]&16&&(M=!0,ft.sort=me[4],He(()=>M=!1)),$.$set(ft);const vt={};Fe[1]&131072&&(vt.$$scope={dirty:Fe,ctx:me}),!A&&Fe[0]&16&&(A=!0,vt.sort=me[4],He(()=>A=!1)),O.$set(vt),Fe[0]&4096&&(fe=me[12],F=mt(F,Fe,ke,1,me,fe,R,S,mn,Vp,B,qp));const ot={};Fe[1]&131072&&(ot.$$scope={dirty:Fe,ctx:me}),!Z&&Fe[0]&16&&(Z=!0,ot.sort=me[4],He(()=>Z=!1)),te.$set(ot);const Ot={};Fe[1]&131072&&(Ot.$$scope={dirty:Fe,ctx:me}),!U&&Fe[0]&16&&(U=!0,Ot.sort=me[4],He(()=>U=!1)),J.$set(Ot),Fe[0]&5450&&(Ce=me[1],Pe(),se=mt(se,Fe,ze,1,me,Ce,ge,be,Gt,Wp,null,Hp),Le(),!Ce.length&&Je?Je.p(me,Fe):Ce.length?Je&&(Je.d(1),Je=null):(Je=zp(me),Je.c(),Je.m(be,null))),Fe[0]&1024&&ne(w,"table-loading",me[10]),me[1].length?st?st.p(me,Fe):(st=Yp(me),st.c(),st.m(W.parentNode,W)):st&&(st.d(1),st=null),me[1].length&&me[13]?ct?ct.p(me,Fe):(ct=Kp(me),ct.c(),ct.m(ye.parentNode,ye)):ct&&(ct.d(1),ct=null)},i(me){if(!ee){E(a.$$.fragment,me),E(g.$$.fragment,me),E($.$$.fragment,me),E(O.$$.fragment,me),E(te.$$.fragment,me),E(J.$$.fragment,me);for(let Fe=0;Fe<Ce.length;Fe+=1)E(se[Fe]);ee=!0}},o(me){P(a.$$.fragment,me),P(g.$$.fragment,me),P($.$$.fragment,me),P(O.$$.fragment,me),P(te.$$.fragment,me),P(J.$$.fragment,me);for(let Fe=0;Fe<se.length;Fe+=1)P(se[Fe]);ee=!1},d(me){me&&y(e),q(a),me&&y(h),q(g,me),me&&y(v),me&&y(b),q($),q(O);for(let Fe=0;Fe<F.length;Fe+=1)F[Fe].d();q(te),q(J);for(let Fe=0;Fe<se.length;Fe+=1)se[Fe].d();Je&&Je.d(),me&&y($e),st&&st.d(me),me&&y(W),ct&&ct.d(me),me&&y(ye),X=!1,Qe(Se)}}}function eT(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
|
||||
<h1>Loading users...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){k(t,e,i)},p:le,i:le,o:le,d(t){t&&y(e)}}}function tT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="id",p(t,"class",Y.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function nT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="email",p(t,"class",Y.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function Vp(n,e){let t,i,s,l,o,r,a,u=e[43].name+"",f,c,d;return{key:n,first:null,c(){t=_("th"),i=_("div"),s=_("i"),o=T(),r=_("span"),a=N("profile."),f=N(u),p(s,"class",l=Y.getFieldTypeIcon(e[43].type)),p(r,"class","txt"),p(i,"class","col-header-content"),p(t,"class",c="col-type-"+e[43].type+" col-field-"+e[43].name),p(t,"name",d=e[43].name),this.first=t},m(h,g){k(h,t,g),m(t,i),m(i,s),m(i,o),m(i,r),m(r,a),m(r,f)},p(h,g){e=h,g[0]&4096&&l!==(l=Y.getFieldTypeIcon(e[43].type))&&p(s,"class",l),g[0]&4096&&u!==(u=e[43].name+"")&&pe(f,u),g[0]&4096&&c!==(c="col-type-"+e[43].type+" col-field-"+e[43].name)&&p(t,"class",c),g[0]&4096&&d!==(d=e[43].name)&&p(t,"name",d)},d(h){h&&y(t)}}}function iT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",p(t,"class",Y.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function sT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="updated",p(t,"class",Y.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function zp(n){let e;function t(l,o){return l[10]?oT:lT}let i=t(n),s=i(n);return{c(){s.c(),e=Xe()},m(l,o){s.m(l,o),k(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&y(e)}}}function lT(n){var r;let e,t,i,s,l,o=((r=n[3])==null?void 0:r.length)&&Bp(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No users found.",s=T(),o&&o.c(),l=T(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){k(a,e,u),m(e,t),m(t,i),m(t,s),o&&o.m(t,null),m(e,l)},p(a,u){var f;(f=a[3])!=null&&f.length?o?o.p(a,u):(o=Bp(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&y(e),o&&o.d()}}}function oT(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
|
||||
`},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function Bp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[26]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function Up(n,e){let t,i,s;return i=new __({props:{field:e[43],record:e[40].profile||{}}}),{key:n,first:null,c(){t=Xe(),V(i.$$.fragment),this.first=t},m(l,o){k(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&4096&&(r.field=e[43]),o[0]&2&&(r.record=e[40].profile||{}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&y(t),q(i,l)}}}function Wp(n,e){let t,i,s,l,o,r,a,u=e[40].email+"",f,c,d,h,g=e[40].verified?"Verified":"Unverified",v,b,w=[],C=new Map,S,$,M,D,O,A,L,F,R,B,te,Z,H,J,U;s=new Go({props:{id:e[40].id}});let Q=e[12];const oe=se=>se[43].name;for(let se=0;se<Q.length;se+=1){let ge=jp(e,Q,se),$e=oe(ge);C.set($e,w[se]=Up($e,ge))}M=new yi({props:{date:e[40].created}}),A=new yi({props:{date:e[40].updated}});function ae(){return e[24](e[40])}function be(){return e[25](e[40])}return{key:n,first:null,c(){t=_("tr"),i=_("td"),V(s.$$.fragment),l=T(),o=_("td"),r=_("div"),a=_("span"),f=N(u),d=T(),h=_("span"),v=N(g),b=T();for(let se=0;se<w.length;se+=1)w[se].c();S=T(),$=_("td"),V(M.$$.fragment),D=T(),O=_("td"),V(A.$$.fragment),L=T(),F=_("td"),R=_("button"),R.innerHTML=`<i class="ri-user-settings-line"></i>
|
||||
<span class="txt">Edit user</span>`,B=T(),te=_("button"),te.innerHTML=`<i class="ri-profile-line"></i>
|
||||
<span class="txt">Edit profile</span>`,Z=T(),p(i,"class","col-type-text col-field-id"),p(a,"class","txt"),p(a,"title",c=e[40].email),p(h,"class","label"),ne(h,"label-success",e[40].verified),ne(h,"label-warning",!e[40].verified),p(r,"class","inline-flex"),p(o,"class","col-type-email col-field-email"),p($,"class","col-type-date col-field-created"),p(O,"class","col-type-date col-field-updated"),p(R,"type","button"),p(R,"class","btn btn-sm btn-outline"),p(te,"type","button"),p(te,"class","btn btn-sm m-l-10"),p(F,"class","col-type-action min-width"),this.first=t},m(se,ge){k(se,t,ge),m(t,i),j(s,i,null),m(t,l),m(t,o),m(o,r),m(r,a),m(a,f),m(r,d),m(r,h),m(h,v),m(t,b);for(let $e=0;$e<w.length;$e+=1)w[$e].m(t,null);m(t,S),m(t,$),j(M,$,null),m(t,D),m(t,O),j(A,O,null),m(t,L),m(t,F),m(F,R),m(F,B),m(F,te),m(t,Z),H=!0,J||(U=[G(R,"click",Qn(ae)),G(te,"click",Qn(be))],J=!0)},p(se,ge){e=se;const $e={};ge[0]&2&&($e.id=e[40].id),s.$set($e),(!H||ge[0]&2)&&u!==(u=e[40].email+"")&&pe(f,u),(!H||ge[0]&2&&c!==(c=e[40].email))&&p(a,"title",c),(!H||ge[0]&2)&&g!==(g=e[40].verified?"Verified":"Unverified")&&pe(v,g),ge[0]&2&&ne(h,"label-success",e[40].verified),ge[0]&2&&ne(h,"label-warning",!e[40].verified),ge[0]&4098&&(Q=e[12],Pe(),w=mt(w,ge,oe,1,e,Q,C,t,Gt,Up,S,jp),Le());const W={};ge[0]&2&&(W.date=e[40].created),M.$set(W);const ye={};ge[0]&2&&(ye.date=e[40].updated),A.$set(ye)},i(se){if(!H){E(s.$$.fragment,se);for(let ge=0;ge<Q.length;ge+=1)E(w[ge]);E(M.$$.fragment,se),E(A.$$.fragment,se),H=!0}},o(se){P(s.$$.fragment,se);for(let ge=0;ge<w.length;ge+=1)P(w[ge]);P(M.$$.fragment,se),P(A.$$.fragment,se),H=!1},d(se){se&&y(t),q(s);for(let ge=0;ge<w.length;ge+=1)w[ge].d();q(M),q(A),J=!1,Qe(U)}}}function Yp(n){let e,t,i=n[1].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[2]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){k(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a[0]&2&&i!==(i=r[1].length+"")&&pe(s,i),a[0]&4&&pe(o,r[2])},d(r){r&&y(e)}}}function Kp(n){let e,t,i,s,l=n[2]-n[1].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ne(t,"btn-loading",n[10]),ne(t,"btn-disabled",n[10]),p(e,"class","block txt-center m-t-xs")},m(f,c){k(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=G(t,"click",n[27]),a=!0)},p(f,c){c[0]&6&&l!==(l=f[2]-f[1].length+"")&&pe(o,l),c[0]&1024&&ne(t,"btn-loading",f[10]),c[0]&1024&&ne(t,"btn-disabled",f[10])},d(f){f&&y(e),a=!1,u()}}}function rT(n){let e,t,i,s;const l=[eT,xM],o=[];function r(a,u){return a[11]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Xe()},m(a,u){o[e].m(a,u),k(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(Pe(),P(o[f],1,1,()=>{o[f]=null}),Le(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),E(t,1),t.m(i.parentNode,i))},i(a){s||(E(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&y(i)}}}function aT(n){let e,t,i,s,l,o,r,a;e=new Cn({props:{$$slots:{default:[rT]},$$scope:{ctx:n}}});let u={};i=new QM({props:u}),n[28](i),i.$on("save",n[29]),i.$on("delete",n[30]);let f={};l=new Wa({props:f}),n[31](l),l.$on("save",n[32]);let c={collection:n[5]};return r=new g_({props:c}),n[33](r),r.$on("save",n[34]),{c(){V(e.$$.fragment),t=T(),V(i.$$.fragment),s=T(),V(l.$$.fragment),o=T(),V(r.$$.fragment)},m(d,h){j(e,d,h),k(d,t,h),j(i,d,h),k(d,s,h),j(l,d,h),k(d,o,h),j(r,d,h),a=!0},p(d,h){const g={};h[0]&32766|h[1]&131072&&(g.$$scope={dirty:h,ctx:d}),e.$set(g);const v={};i.$set(v);const b={};l.$set(b);const w={};h[0]&32&&(w.collection=d[5]),r.$set(w)},i(d){a||(E(e.$$.fragment,d),E(i.$$.fragment,d),E(l.$$.fragment,d),E(r.$$.fragment,d),a=!0)},o(d){P(e.$$.fragment,d),P(i.$$.fragment,d),P(l.$$.fragment,d),P(r.$$.fragment,d),a=!1},d(d){q(e,d),d&&y(t),n[28](null),q(i,d),d&&y(s),n[31](null),q(l,d),d&&y(o),n[33](null),q(r,d)}}}function uT(n,e,t){let i,s,l,o;kt(n,No,ee=>t(35,l=ee)),kt(n,Rt,ee=>t(14,o=ee)),fn(Rt,o="Users",o);const r=new URLSearchParams(l),a=["id","userId","created","updated"];let u,f,c,d=[],h=1,g=0,v=!1,b=r.get("filter")||"",w=r.get("sort")||"-created",C=new An,S=!1;O();async function $(ee=1){return t(10,v=!0),ee<=1&&M(),_e.users.getList(ee,50,{sort:w||"-created",filter:b}).then(X=>{t(10,v=!1),t(1,d=d.concat(X.items)),t(9,h=X.page),t(2,g=X.totalItems)}).catch(X=>{X!=null&&X.isAbort||(t(10,v=!1),console.warn(X),M(),_e.errorResponseHandler(X,!1))})}function M(){t(1,d=[]),t(9,h=1),t(2,g=0)}function D(ee){const X=d.find(Se=>Se.id===(ee==null?void 0:ee.userId));X&&(X.profile=ee),t(1,d)}async function O(){t(11,S=!0);try{t(5,C=await _e.collections.getOne("profiles"))}catch(ee){_e.errorResponseHandler(ee)}t(11,S=!1)}const A=()=>f==null?void 0:f.show(C),L=()=>$(),F=()=>u==null?void 0:u.show(),R=ee=>t(3,b=ee.detail);function B(ee){w=ee,t(4,w)}function te(ee){w=ee,t(4,w)}function Z(ee){w=ee,t(4,w)}function H(ee){w=ee,t(4,w)}const J=ee=>u==null?void 0:u.show(ee),U=ee=>c==null?void 0:c.show(ee.profile),Q=()=>t(3,b=""),oe=()=>Line truncated
|
||||
<span class="txt">Application</span>`,o=T(),r=_("a"),r.innerHTML=`<i class="ri-send-plane-2-line"></i>
|
||||
<span class="txt">Mail settings</span>`,a=T(),u=_("a"),u.innerHTML=`<i class="ri-archive-drawer-line"></i>
|
||||
<span class="txt">Files storage</span>`,f=T(),c=_("div"),c.textContent="Sync",d=T(),h=_("a"),h.innerHTML=`<i class="ri-uninstall-line"></i>
|
||||
<span class="txt">Export collections</span>`,g=T(),v=_("a"),v.innerHTML=`<i class="ri-install-line"></i>
|
||||
<span class="txt">Import collections</span>`,b=T(),w=_("div"),w.textContent="Authentication",C=T(),S=_("a"),S.innerHTML=`<i class="ri-lock-password-line"></i>
|
||||
<span class="txt">Auth providers</span>`,$=T(),M=_("a"),M.innerHTML=`<i class="ri-key-line"></i>
|
||||
<span class="txt">Token options</span>`,D=T(),O=_("a"),O.innerHTML=`<i class="ri-shield-user-line"></i>
|
||||
<span class="txt">Admins</span>`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(v,"href","/settings/import-collections"),p(v,"class","sidebar-list-item"),p(w,"class","sidebar-title"),p(S,"href","/settings/auth-providers"),p(S,"class","sidebar-list-item"),p(M,"href","/settings/tokens"),p(M,"class","sidebar-list-item"),p(O,"href","/settings/admins"),p(O,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(F,R){k(F,e,R),m(e,t),m(t,i),m(t,s),m(t,l),m(t,o),m(t,r),m(t,a),m(t,u),m(t,f),m(t,c),m(t,d),m(t,h),m(t,g),m(t,v),m(t,b),m(t,w),m(t,C),m(t,S),m(t,$),m(t,M),m(t,D),m(t,O),A||(L=[Ye(Nn.call(null,l,{path:"/settings"})),Ye(dn.call(null,l)),Ye(Nn.call(null,r,{path:"/settings/mail/?.*"})),Ye(dn.call(null,r)),Ye(Nn.call(null,u,{path:"/settings/storage/?.*"})),Ye(dn.call(null,u)),Ye(Nn.call(null,h,{path:"/settings/export-collections/?.*"})),Ye(dn.call(null,h)),Ye(Nn.call(null,v,{path:"/settings/import-collections/?.*"})),Ye(dn.call(null,v)),Ye(Nn.call(null,S,{path:"/settings/auth-providers/?.*"})),Ye(dn.call(null,S)),Ye(Nn.call(null,M,{path:"/settings/tokens/?.*"})),Ye(dn.call(null,M)),Ye(Nn.call(null,O,{path:"/settings/admins/?.*"})),Ye(dn.call(null,O))],A=!0)},p:le,i:le,o:le,d(F){F&&y(e),A=!1,Qe(L)}}}class ji extends Ee{constructor(e){super(),Oe(this,e,null,cT,De,{})}}function Zp(n,e,t){const i=n.slice();return i[31]=e[t],i}function Jp(n){let e,t;return e=new Ne({props:{class:"form-field disabled",name:"id",$$slots:{default:[dT,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function dT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="ID",o=T(),r=_("input"),p(t,"class",Y.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","text"),p(r,"id",a=n[30]),r.value=u=n[1].id,r.disabled=!0},m(f,c){k(f,e,c),m(e,t),m(e,i),m(e,s),k(f,o,c),k(f,r,c)},p(f,c){c[0]&1073741824&&l!==(l=f[30])&&p(e,"for",l),c[0]&1073741824&&a!==(a=f[30])&&p(r,"id",a),c[0]&2&&u!==(u=f[1].id)&&r.value!==u&&(r.value=u)},d(f){f&&y(e),f&&y(o),f&&y(r)}}}function Gp(n){let e,t,i,s,l,o,r;function a(){return n[17](n[31])}function u(...f){return n[18](n[31],...f)}return{c(){e=_("figure"),t=_("img"),s=T(),Gn(t.src,i="./images/avatars/avatar"+n[31]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[31]),p(e,"tabindex","0"),p(e,"class",l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(f,c){k(f,e,c),m(e,t),m(e,s),o||(r=[G(e,"click",a),G(e,"keydown",u)],o=!0)},p(f,c){n=f,c[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(f){f&&y(e),o=!1,Qe(r)}}}function pT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="Email",o=T(),r=_("input"),p(t,"class",Y.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[30]),r.required=!0},m(c,d){k(c,e,d),m(e,t),m(e,i),m(e,s),k(c,o,d),k(c,r,d),Me(r,n[3]),u||(f=G(r,"input",n[19]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&Me(r,c[3])},d(c){c&&y(e),c&&y(o),c&&y(r),u=!1,f()}}}function Xp(n){let e,t;return e=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[hT,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function hT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[30]),p(s,"for",o=n[30])},m(u,f){k(u,e,f),e.checked=n[4],k(u,i,f),k(u,s,f),m(s,l),r||(a=G(e,"change",n[20]),r=!0)},p(u,f){f[0]&1073741824&&t!==(t=u[30])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&1073741824&&o!==(o=u[30])&&p(s,"for",o)},d(u){u&&y(e),u&&y(i),u&&y(s),r=!1,a()}}}function Qp(n){let e,t,i,s,l,o,r,a,u;return s=new Ne({props:{class:"form-field required",name:"password",$$slots:{default:[mT,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[gT,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),i=_("div"),V(s.$$.fragment),l=T(),o=_("div"),V(r.$$.fragment),p(i,"class","col-sm-6"),p(o,Line truncated
|
||||
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[15]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function yT(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&xp(n);return{c(){h&&h.c(),e=T(),t=_("button"),i=_("span"),i.textContent="Cancel",s=T(),l=_("button"),o=_("span"),a=N(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],ne(l,"btn-loading",n[6])},m(g,v){h&&h.m(g,v),k(g,e,v),k(g,t,v),m(t,i),k(g,s,v),k(g,l,v),m(l,o),m(o,a),f=!0,c||(d=G(t,"click",n[16]),c=!0)},p(g,v){g[1].isNew?h&&(Pe(),P(h,1,1,()=>{h=null}),Le()):h?(h.p(g,v),v[0]&2&&E(h,1)):(h=xp(g),h.c(),E(h,1),h.m(e.parentNode,e)),(!f||v[0]&64)&&(t.disabled=g[6]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&pe(a,r),(!f||v[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),v[0]&64&&ne(l,"btn-loading",g[6])},i(g){f||(E(h),f=!0)},o(g){P(h),f=!1},d(g){h&&h.d(g),g&&y(e),g&&y(t),g&&y(s),g&&y(l),c=!1,d()}}}function kT(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[yT],header:[bT],default:[_T]},$$scope:{ctx:n}};return e=new di({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[23]),l[0]&1886|l[1]&8&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[24](null),q(e,s)}}}function wT(n,e,t){let i;const s=ln(),l="admin_"+Y.randomString(5);let o,r=new ks,a=!1,u=!1,f=0,c="",d="",h="",g=!1;function v(U){return w(U),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function w(U){wi({}),t(1,r=U!=null&&U.clone?U.clone():new ks),C()}function C(){t(4,g=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,h="")}function S(){if(a||!i)return;t(6,a=!0);const U={email:c,avatar:f};(r.isNew||g)&&(U.password=d,U.passwordConfirm=h);let Q;r.isNew?Q=_e.admins.create(U):Q=_e.admins.update(r.id,U),Q.then(async oe=>{var ae;t(7,u=!1),b(),un(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",oe),((ae=_e.authStore.model)==null?void 0:ae.id)===oe.id&&_e.authStore.save(_e.authStore.token,oe)}).catch(oe=>{_e.errorResponseHandler(oe)}).finally(()=>{t(6,a=!1)})}function $(){!(r!=null&&r.id)||ui("Do you really want to delete the selected admin?",()=>_e.admins.delete(r.id).then(()=>{t(7,u=!1),b(),un("Successfully deleted admin."),s("delete",r)}).catch(U=>{_e.errorResponseHandler(U)}))}const M=()=>$(),D=()=>b(),O=U=>t(2,f=U),A=(U,Q)=>{(Q.code==="Enter"||Q.code==="Space")&&(Q.preventDefault(),t(2,f=U))};function L(){c=this.value,t(3,c)}function F(){g=this.checked,t(4,g)}function R(){d=this.value,t(8,d)}function B(){h=this.value,t(9,h)}const te=()=>i&&u?(ui("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function Z(U){he[U?"unshift":"push"](()=>{o=U,t(5,o)})}function H(U){ut.call(this,n,U)}function J(U){ut.call(this,n,U)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||g||c!==r.email||f!==r.avatar)},[b,r,f,c,g,o,a,u,d,h,i,l,S,$,v,M,D,O,A,L,F,R,B,te,Z,H,J]}class $T extends Ee{constructor(e){super(),Oe(this,e,wT,kT,De,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function eh(n,e,t){const i=n.slice();return i[24]=e[t],i}function ST(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="id",p(t,"class",Y.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function CT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="email",p(t,"class",Y.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function MT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",p(t,"class",Y.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function TT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="updated",p(t,"class",Y.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){k(l,e,o),m(e,t),m(e,i),m(e,s)},p:le,d(l){l&&y(e)}}}function th(n){let e;function t(l,o){return l[5]?OT:DT}let i=t(n),s=i(n);return{c(){s.c(),e=Xe()},m(l,o){s.m(l,o),k(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&y(e)}}}function DT(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&nh(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No admins found.",s=T(),o&&o.c(),l=T(),p(t,"colspan","99"),p(t,"class","txt-cLine truncated
|
||||
`},m(t,i){k(t,e,i)},p:le,d(t){t&&y(e)}}}function nh(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[17]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function ih(n){let e;return{c(){e=_("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function sh(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,g=e[24].email+"",v,b,w,C,S,$,M,D,O,A,L,F,R,B;u=new Go({props:{id:e[24].id}});let te=e[24].id===e[7].id&&ih();S=new yi({props:{date:e[24].created}}),D=new yi({props:{date:e[24].updated}});function Z(){return e[15](e[24])}function H(...J){return e[16](e[24],...J)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("figure"),l=_("img"),r=T(),a=_("td"),V(u.$$.fragment),f=T(),te&&te.c(),c=T(),d=_("td"),h=_("span"),v=N(g),w=T(),C=_("td"),V(S.$$.fragment),$=T(),M=_("td"),V(D.$$.fragment),O=T(),A=_("td"),A.innerHTML='<i class="ri-arrow-right-line"></i>',L=T(),Gn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",b=e[24].email),p(d,"class","col-type-email col-field-email"),p(C,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(A,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(J,U){k(J,t,U),m(t,i),m(i,s),m(s,l),m(t,r),m(t,a),j(u,a,null),m(a,f),te&&te.m(a,null),m(t,c),m(t,d),m(d,h),m(h,v),m(t,w),m(t,C),j(S,C,null),m(t,$),m(t,M),j(D,M,null),m(t,O),m(t,A),m(t,L),F=!0,R||(B=[G(t,"click",Z),G(t,"keydown",H)],R=!0)},p(J,U){e=J,(!F||U&16&&!Gn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const Q={};U&16&&(Q.id=e[24].id),u.$set(Q),e[24].id===e[7].id?te||(te=ih(),te.c(),te.m(a,null)):te&&(te.d(1),te=null),(!F||U&16)&&g!==(g=e[24].email+"")&&pe(v,g),(!F||U&16&&b!==(b=e[24].email))&&p(h,"title",b);const oe={};U&16&&(oe.date=e[24].created),S.$set(oe);const ae={};U&16&&(ae.date=e[24].updated),D.$set(ae)},i(J){F||(E(u.$$.fragment,J),E(S.$$.fragment,J),E(D.$$.fragment,J),F=!0)},o(J){P(u.$$.fragment,J),P(S.$$.fragment,J),P(D.$$.fragment,J),F=!1},d(J){J&&y(t),q(u),te&&te.d(),q(S),q(D),R=!1,Qe(B)}}}function lh(n){let e,t,i=n[4].length+"",s,l,o=n[4].length+"",r;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),r=N(o),p(e,"class","block txt-hint txt-right m-t-sm")},m(a,u){k(a,e,u),m(e,t),m(e,s),m(e,l),m(e,r)},p(a,u){u&16&&i!==(i=a[4].length+"")&&pe(s,i),u&16&&o!==(o=a[4].length+"")&&pe(r,o)},d(a){a&&y(e)}}}function ET(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C,S,$,M,D,O,A,L,F,R,B,te,Z,H,J,U,Q,oe,ae,be=[],se=new Map,ge,$e,W,ye,ee;a=new Bo({}),a.$on("refresh",n[8]),g=new zo({props:{value:n[1],placeholder:"Search filter, eg. email='test@example.com'",extraAutocompleteKeys:["email"]}}),g.$on("submit",n[10]);function X(Ce){n[11](Ce)}let Se={class:"col-type-text",name:"id",$$slots:{default:[ST]},$$scope:{ctx:n}};n[2]!==void 0&&(Se.sort=n[2]),D=new nn({props:Se}),he.push(()=>Re(D,"sort",X));function je(Ce){n[12](Ce)}let Ue={class:"col-type-email col-field-email",name:"email",$$slots:{default:[CT]},$$scope:{ctx:n}};n[2]!==void 0&&(Ue.sort=n[2]),L=new nn({props:Ue}),he.push(()=>Re(L,"sort",je));function K(Ce){n[13](Ce)}let de={class:"col-type-date col-field-created",name:"created",$$slots:{default:[MT]},$$scope:{ctx:n}};n[2]!==void 0&&(de.sort=n[2]),B=new nn({props:de}),he.push(()=>Re(B,"sort",K));function fe(Ce){n[14](Ce)}let ke={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[TT]},$$scope:{ctx:n}};n[2]!==void 0&&(ke.sort=n[2]),H=new nn({props:ke}),he.push(()=>Re(H,"sort",fe));let Ze=n[4];const tt=Ce=>Ce[24].id;for(let Ce=0;Ce<Ze.length;Ce+=1){let ze=eh(n,Ze,Ce),Je=tt(ze);se.set(Je,be[Ce]=sh(Je,ze))}let We=null;Ze.length||(We=th(n));let it=n[4].length&&lh(n);return{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=T(),l=_("div"),o=N(n[6]),r=T(),V(a.$$.fragment),u=T(),f=_("div"),c=T(),d=_("button"),d.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">New admin</span>`,h=T(),V(g.$$.fragment),v=T(),b=_("div"),w=_("table"),C=_("thead"),S=_("tr"),$=_("th"),M=T(),V(D.$$.fragment),A=T(),V(L.$$.fragment),R=T(),V(B.$$.fragment),Z=T(),V(H.$$.fragment),U=T(),Q=_("th"),oe=T(),ae=_("tbody");for(let Ce=0;Ce<be.length;Ce+=1)be[Ce].c();We&&We.c(),ge=T(),it&&it.c(),$e=Xe(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p($,"class","min-width"),p(Q,"class","col-type-action min-width"),p(w,"class","table"),ne(w,"table-loading",n[5]),p(b,"class","table-wrapper")},m(Ce,ze){k(Ce,e,ze),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(e,r),j(a,e,null),m(e,u),m(e,f),m(e,c),m(e,d),k(Ce,h,ze),j(g,Ce,ze),k(Ce,v,ze),k(Ce,b,ze),m(b,w),m(w,C),m(C,S),m(S,$),m(S,M),j(D,S,null),m(S,A),j(L,S,null),m(S,R),j(B,S,null),m(S,Z),j(H,S,null),m(S,U),m(S,Q),m(w,oe),m(w,ae);for(let Je=0;Je<be.length;Je+=1)be[Je].m(ae,null);We&&We.m(ae,null),k(Ce,ge,ze),it&&it.m(Ce,ze),k(Ce,$e,ze),W=!0,ye||(ee=G(d,"click",n[9]),ye=!0)},p(Ce,ze){(!W||ze&64)&&pe(o,Ce[6]);const Je={};ze&2&&(Je.value=Ce[1]),g.$set(Je);const st={};ze&134217728&&(st.$$scope={dirty:ze,ctx:Ce}),!O&&ze&4&&(O=!0,st.sort=Ce[2],He(()=>O=!1)),D.$set(st);const ct={};ze&134217728&&(ct.$$scope={dirty:ze,ctx:Ce}),!F&&ze&4&&(F=!0,ct.sort=Ce[2],He(()=>F=!1)),L.$set(ct);const me={};ze&134217728&&(me.$$scope={dirty:ze,ctx:Ce}),!te&&ze&4&&(te=!0,me.sort=Ce[2],He(()=>te=!1)),B.$set(me);const Fe={};ze&134217728&&(Fe.$$scope={dirty:ze,ctx:Ce}),!J&&ze&4&&(J=!0,Fe.sort=Ce[2],He(()=>J=!1)),H.$set(Fe),ze&186&&(Ze=Ce[4],Pe(),be=mt(be,ze,tt,1,Ce,Ze,se,ae,Gt,sh,null,eh),Le(),!Ze.length&&We?We.p(Ce,ze):Ze.length?We&&(We.d(1),We=null):(We=th(Ce),We.c(),We.m(ae,null))),ze&32&&ne(w,"table-loading",Ce[5]),Ce[4].length?it?it.p(Ce,ze):(it=lh(Ce),it.c(),it.m($e.parentNode,$e)):it&&(it.d(1),it=null)},i(Ce){if(!W){E(a.$$.fragment,Ce),E(g.$$.fragment,Ce),E(D.$$.fragment,Ce),E(L.$$.fragment,Ce),E(B.$$.fragment,Ce),E(H.$$.fragment,Ce);for(let ze=0;ze<Ze.length;ze+=1)E(be[ze]);W=!0}},o(Ce){P(a.$$.fragment,Ce),P(g.$$.fragment,Ce),P(D.$$.fragment,Ce),P(L.$$.fragment,Ce),P(B.$$.fragment,Ce),P(H.$$.fragment,Ce);for(let ze=0;ze<be.length;ze+=1)P(be[ze]);W=!1},d(Ce){Ce&&y(e),q(a),Ce&&y(h),q(g,Ce),Ce&&y(v),Ce&&y(b),q(D),q(L),q(B),q(H);for(let ze=0;ze<be.length;ze+=1)be[ze].d();We&&We.d(),Ce&&y(ge),it&&it.d(Ce),Ce&&y($e),ye=!1,ee()}}}function AT(n){let e,t,i,s,l,o;e=new ji({}),i=new Cn({props:{$$slots:{default:[ET]},$$scope:{ctx:n}}});let r={};return l=new $T({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){V(e.$$.fragment),t=T(),V(i.$$.fragment),s=T(),V(l.$$.fragment)},m(a,u){j(e,a,u),k(a,t,u),j(i,a,u),k(a,s,u),j(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){q(e,a),a&&y(t),q(i,a),a&&y(s),n[18](null),q(l,a)}}}function PT(n,e,t){let i,s,l;kt(n,No,R=>t(21,i=R)),kt(n,Rt,R=>t(6,s=R)),kt(n,va,R=>t(7,l=R)),fn(Rt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),_e.admins.getFullList(100,{sort:c||"-created",filter:f}).then(R=>{t(4,a=R),t(5,u=!1)}).catch(R=>{R!=null&&R.isAbort||(t(5,u=!1),console.warn(R),h(),_e.errorResponseHandler(R,!1))})}function h(){t(4,a=[])}const g=()=>d(),v=()=>r==null?void 0:r.show(),b=R=>t(1,f=R.detail);function w(R){c=R,t(2,c)}function C(R){c=R,t(2,c)}function S(R){c=R,t(2,c)}function $(R){c=R,t(2,c)}const M=R=>r==null?void 0:r.show(R),D=(R,B)=>{(B.code==="Enter"||B.code==="Space")&&(B.preventDefault(),r==null||r.show(R))},O=()=>t(1,f="");function A(R){he[R?"unshift":"push"](()=>{r=R,t(3,r)})}const L=()=>d(),F=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const R=new URLSearchParams({filter:f,sort:c}).toString();ki("/settings/admins?"+R),d()}},[d,f,c,r,a,u,s,l,g,v,b,w,C,S,$,M,D,O,A,L,F]}class LT extends Ee{constructor(e){super(),Oe(this,e,PT,AT,De,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function FT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Email"),s=T(),l=_("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0]),l.focus(),r||(a=G(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&Me(l,u[0])},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function IT(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=_("label"),t=N("Password"),s=T(),l=_("input"),r=T(),a=_("div"),u=_("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,h){k(d,e,h),m(e,t),k(d,s,h),k(d,lLine truncated
|
||||
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),ne(a,"btn-disabled",n[2]),ne(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){k(d,e,h),m(e,t),m(e,i),j(s,e,null),m(e,l),j(o,e,null),m(e,r),m(e,a),u=!0,f||(c=G(e,"submit",Yt(n[3])),f=!0)},p(d,h){const g={};h&769&&(g.$$scope={dirty:h,ctx:d}),s.$set(g);const v={};h&770&&(v.$$scope={dirty:h,ctx:d}),o.$set(v),h&4&&ne(a,"btn-disabled",d[2]),h&4&&ne(a,"btn-loading",d[2])},i(d){u||(E(s.$$.fragment,d),E(o.$$.fragment,d),u=!0)},o(d){P(s.$$.fragment,d),P(o.$$.fragment,d),u=!1},d(d){d&&y(e),q(s),q(o),f=!1,c()}}}function RT(n){let e,t;return e=new ug({props:{$$slots:{default:[NT]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function HT(n,e,t){let i;kt(n,No,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),_e.admins.authViaEmail(l,o).then(()=>{ki("/")}).catch(()=>{mo("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class jT extends Ee{constructor(e){super(),Oe(this,e,HT,RT,De,{})}}function qT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C;return i=new Ne({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[zT,({uniqueId:S})=>({14:S}),({uniqueId:S})=>S?16384:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[BT,({uniqueId:S})=>({14:S}),({uniqueId:S})=>S?16384:0]},$$scope:{ctx:n}}}),a=new Ne({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[UT,({uniqueId:S})=>({14:S}),({uniqueId:S})=>S?16384:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),V(i.$$.fragment),s=T(),l=_("div"),V(o.$$.fragment),r=T(),V(a.$$.fragment),u=T(),f=_("div"),c=_("div"),d=T(),h=_("button"),g=_("span"),g.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(c,"class","flex-fill"),p(g,"class","txt"),p(h,"type","submit"),p(h,"class","btn btn-expanded"),h.disabled=v=!n[3]||n[2],ne(h,"btn-loading",n[2]),p(f,"class","col-lg-12 flex"),p(e,"class","grid")},m(S,$){k(S,e,$),m(e,t),j(i,t,null),m(e,s),m(e,l),j(o,l,null),m(e,r),j(a,e,null),m(e,u),m(e,f),m(f,c),m(f,d),m(f,h),m(h,g),b=!0,w||(C=G(h,"click",n[9]),w=!0)},p(S,$){const M={};$&49153&&(M.$$scope={dirty:$,ctx:S}),i.$set(M);const D={};$&49153&&(D.$$scope={dirty:$,ctx:S}),o.$set(D);const O={};$&49153&&(O.$$scope={dirty:$,ctx:S}),a.$set(O),(!b||$&12&&v!==(v=!S[3]||S[2]))&&(h.disabled=v),$&4&&ne(h,"btn-loading",S[2])},i(S){b||(E(i.$$.fragment,S),E(o.$$.fragment,S),E(a.$$.fragment,S),b=!0)},o(S){P(i.$$.fragment,S),P(o.$$.fragment,S),P(a.$$.fragment,S),b=!1},d(S){S&&y(e),q(i),q(o),q(a),w=!1,C()}}}function VT(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){k(t,e,i)},p:le,i:le,o:le,d(t){t&&y(e)}}}function zT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Application name"),s=T(),l=_("input"),p(e,"for",i=n[14]),p(l,"type","text"),p(l,"id",o=n[14]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].meta.appName),r||(a=G(l,"input",n[6]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&p(e,"for",i),f&16384&&o!==(o=u[14])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&Me(l,u[0].meta.appName)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function BT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Application url"),s=T(),l=_("input"),p(e,"for",i=n[14]),p(l,"type","text"),p(l,"id",o=n[14]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].meta.appUrl),r||(a=G(l,"input",n[7]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&p(e,"for",i),f&16384&&o!==(o=u[14])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&Me(l,u[0].meta.appUrl)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function UT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Logs max days retention"),s=T(),l=_("input"),p(e,"for",i=n[14]),p(l,"type","number"),p(l,"id",o=n[14]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].logs.maxDays),r||(a=G(l,"input",n[8]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&p(e,"for",i),f&16384&&o!==(o=u[14])&&p(l,"id",o),f&1&&At(l.value)!==u[0].logs.maxDays&&Me(l,u[0].logs.maxDays)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function WT(n){let e,t,i,s,l,o,r,a,u;const f=[VT,qT],c=[];function d(h,g){return h[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=_("header"),e.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div>
|
||||
<div class="breadcrumb-item">Application</div></nav>`,t=T(),i=_("div"),s=_("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(h,g){k(h,e,g),k(h,t,g),k(h,i,g),m(i,s),c[l].m(s,null),r=!0,a||(u=G(s,"submit",Yt(n[4])),a=!0)},p(h,g){let v=l;l=d(h),l===v?c[l].p(h,g):(Pe(),P(c[v],1,1,()=>{c[v]=null}),Le(),o=c[l],o?o.p(h,g):(o=c[l]=f[l](h),o.c()),E(o,1),o.m(s,null))},i(h){r||(E(o),r=!0)},o(h){P(o),r=!1},d(h){h&&y(e),h&&y(t),h&&y(i),c[l].d(),a=!1,u()}}}function YT(n){let e,t,i,s;return e=new ji({}),i=new Cn({props:{$$slots:{default:[WT]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=T(),V(i.$$.fragment)},m(l,o){j(e,l,o),k(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&32783&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&y(t),q(i,l)}}}function KT(n,e,t){let i,s,l;kt(n,_o,w=>t(10,s=w)),kt(n,Rt,w=>t(11,l=w)),fn(Rt,l="Application settings",l);let o={},r=!1,a=!1,u="";f();async function f(){t(1,r=!0);try{const w=await _e.settings.getAll()||{};d(w)}catch(w){_e.errorResponseHandler(w)}t(1,r=!1)}async function c(){if(!(a||!i)){t(2,a=!0);try{const w=await _e.settings.update(Y.filterRedactedProps(o));d(w),un("Successfully saved application settings.")}catch(w){_e.errorResponseHandler(w)}t(2,a=!1)}}function d(w={}){var C;fn(_o,s=(C=w==null?void 0:w.meta)==null?void 0:C.appName,s),t(0,o={meta:(w==null?void 0:w.meta)||{},logs:(w==null?void 0:w.logs)||{}}),t(5,u=JSON.stringify(o))}function h(){o.meta.appName=this.value,t(0,o)}function g(){o.meta.appUrl=this.value,t(0,o)}function v(){o.logs.maxDays=At(this.value),t(0,o)}const b=()=>c();return n.$$.update=()=>{n.$$.dirty&33&&t(3,i=u!=JSON.stringify(o))},[o,r,a,i,c,u,h,g,v,b]}class ZT extends Ee{constructor(e){super(),Oe(this,e,KT,YT,De,{})}}function JT(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o<s.length;o+=1)l=pt(l,s[o]);return{c(){e=_("input"),ai(e,l)},m(o,r){k(o,e,r),e.autofocus&&e.focus(),n[7](e),Me(e,n[0]),t||(i=G(e,"input",n[8]),t=!0)},p(o,r){ai(e,l=gn(s,[{type:"password"},{autocomplete:"new-password"},r&32&&o[5]])),r&1&&e.value!==o[0]&&Me(e,o[0])},d(o){o&&y(e),n[7](null),t=!1,i()}}}function GT(n){let e,t,i,s,l,o,r=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let u=0;u<r.length;u+=1)a=pt(a,r[u]);return{c(){e=_("div"),t=_("button"),t.innerHTML='<i class="ri-key-line"></i>',i=T(),s=_("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),ai(s,a)},m(u,f){k(u,e,f),m(e,t),k(u,i,f),k(u,s,f),s.autofocus&&s.focus(),l||(o=[Ye(Ct.call(null,t,{position:"left",text:"Set new value"})),G(t,"click",n[6])],l=!0)},p(u,f){ai(s,a=gn(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&y(e),u&&y(i),u&&y(s),l=!1,Qe(o)}}}function XT(n){let e;function t(l,o){return l[3]?GT:JT}let i=t(n),s=i(n);return{c(){s.c(),e=Xe()},m(l,o){s.m(l,o),k(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:le,o:le,d(l){s.d(l),l&&y(e)}}}function QT(n,e,t){const i=["value","mask"];let s=Jt(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await ei(),r==null||r.focus()}const f=()=>u();function c(h){he[h?"unshift":"push"](()=>{r=h,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=pt(pt({},e),fi(h)),t(5,s=Jt(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,o=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class Ya extends Ee{constructor(e){super(),Oe(this,e,QT,XT,De,{value:0,mask:1})}}function xT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C,S,$,M,D,O,A,L,F,R,B,te;i=new Ne({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[tD,({uniqueId:H})=>({23:H}),({uniqueId:H})=>H?8388608:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[nD,({uniqueId:H})=>({23:H}),({uniqueId:H})=>H?8388608:0]},$$scope:{ctx:n}}}),a=new Ne({props:{class:"form-field required",name:"meta.userVerificationUrl",$$slots:{default:[iD,({uniqueId:H})=>({23:H}),({uniqueId:H})=>H?8388608:0]},$$scope:{ctx:n}}}),f=new Ne({props:{class:"form-field required",name:"meta.userResetPasswordUrl",$$slots:{default:[sD,({uniqueId:H})=>({23:H}),({uniqueId:H})=>H?8388608:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field required",name:"meta.userConfirmEmailChangeUrl",$$slots:{default:[lD,({uniqueId:H})=>({23:H}),({uniqueId:H})=>H?8388608:0]},$$scope:{ctx:n}}}),C=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[oD,({uniqueId:H})=>({23:H}),({uniqueId:H})=>H?8388608:0]},$$scope:{ctx:n}}});let Z=n[0].smtp.enabled&&oh(n);return{c(){e=_("div"),t=_("div"),V(i.$$.fragment),s=T(),l=_("div"),V(o.$$.fragment),r=T(),V(a.$$.fragment),u=T(),V(f.$$.fragment),c=T(),V(d.$$.fragment),h=T(),g=_("hr"),v=T(),b=_("div"),b.innerHTML=`<p>By default PocketBaseLine truncated
|
||||
<br/>
|
||||
<strong class="txt-bold">For better emails deliverability it is recommended to enable the SMTP settings
|
||||
below.</strong></p>`,w=T(),V(C.$$.fragment),S=T(),Z&&Z.c(),$=T(),M=_("div"),D=_("div"),O=T(),A=_("button"),L=_("span"),L.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid"),p(b,"class","content m-b-sm"),p(D,"class","flex-fill"),p(L,"class","txt"),p(A,"type","submit"),p(A,"class","btn btn-expanded"),A.disabled=F=!n[3]||n[2],ne(A,"btn-loading",n[2]),p(M,"class","flex")},m(H,J){k(H,e,J),m(e,t),j(i,t,null),m(e,s),m(e,l),j(o,l,null),m(e,r),j(a,e,null),m(e,u),j(f,e,null),m(e,c),j(d,e,null),k(H,h,J),k(H,g,J),k(H,v,J),k(H,b,J),k(H,w,J),j(C,H,J),k(H,S,J),Z&&Z.m(H,J),k(H,$,J),k(H,M,J),m(M,D),m(M,O),m(M,A),m(A,L),R=!0,B||(te=G(A,"click",n[19]),B=!0)},p(H,J){const U={};J&25165825&&(U.$$scope={dirty:J,ctx:H}),i.$set(U);const Q={};J&25165825&&(Q.$$scope={dirty:J,ctx:H}),o.$set(Q);const oe={};J&25165825&&(oe.$$scope={dirty:J,ctx:H}),a.$set(oe);const ae={};J&25165825&&(ae.$$scope={dirty:J,ctx:H}),f.$set(ae);const be={};J&25165825&&(be.$$scope={dirty:J,ctx:H}),d.$set(be);const se={};J&25165825&&(se.$$scope={dirty:J,ctx:H}),C.$set(se),H[0].smtp.enabled?Z?(Z.p(H,J),J&1&&E(Z,1)):(Z=oh(H),Z.c(),E(Z,1),Z.m($.parentNode,$)):Z&&(Pe(),P(Z,1,1,()=>{Z=null}),Le()),(!R||J&12&&F!==(F=!H[3]||H[2]))&&(A.disabled=F),J&4&&ne(A,"btn-loading",H[2])},i(H){R||(E(i.$$.fragment,H),E(o.$$.fragment,H),E(a.$$.fragment,H),E(f.$$.fragment,H),E(d.$$.fragment,H),E(C.$$.fragment,H),E(Z),R=!0)},o(H){P(i.$$.fragment,H),P(o.$$.fragment,H),P(a.$$.fragment,H),P(f.$$.fragment,H),P(d.$$.fragment,H),P(C.$$.fragment,H),P(Z),R=!1},d(H){H&&y(e),q(i),q(o),q(a),q(f),q(d),H&&y(h),H&&y(g),H&&y(v),H&&y(b),H&&y(w),q(C,H),H&&y(S),Z&&Z.d(H),H&&y($),H&&y(M),B=!1,te()}}}function eD(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){k(t,e,i)},p:le,i:le,o:le,d(t){t&&y(e)}}}function tD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Sender name"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].meta.senderName),r||(a=G(l,"input",n[8]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderName&&Me(l,u[0].meta.senderName)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function nD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Sender address"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","email"),p(l,"id",o=n[23]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].meta.senderAddress),r||(a=G(l,"input",n[9]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderAddress&&Me(l,u[0].meta.senderAddress)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function iD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("User verification page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user verification email. Available placeholder parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0,p(a,"class","help-block")},m(c,d){k(c,e,d),m(e,t),k(c,s,d),k(c,l,d),Me(l,n[0].meta.userVerificationUrl),k(c,r,d),k(c,a,d),u||(f=G(l,"input",n[10]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&1&&l.value!==c[0].meta.userVerificationUrl&&Me(l,c[0].meta.userVerificationUrl)},d(c){c&&y(e),c&&y(s),c&&y(l),c&&y(r),c&&y(a),u=!1,f()}}}function sD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("User reset password page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user password reset email. Available placeholder parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0,p(a,"class","help-block")},m(c,d){k(c,e,d),m(e,t),k(c,s,d),k(c,l,d),Me(l,n[0].meta.userResetPasswordUrl),k(c,r,d),k(c,a,d),u||(f=G(l,"input",n[11]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&1&&l.value!==c[0].meta.userResetPasswordUrl&&Me(l,c[0].meta.userResetPasswordUrl)},d(c){c&&y(e),c&&y(s),c&&y(l),c&&y(r),c&&y(a),u=!1,f()}}}function lD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("User confirm email change page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user email change confirmation email. Available placeholder
|
||||
parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0,p(a,"class","help-block")},m(c,d){k(c,e,d),m(e,t),k(c,s,d),k(c,l,d),Me(l,n[0].meta.userConfirmEmailChangeUrl),k(c,r,d),k(c,a,d),u||(f=G(l,"input",n[12]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&1&&l.value!==c[0].meta.userConfirmEmailChangeUrl&&Me(l,c[0].meta.userConfirmEmailChangeUrl)},d(c){c&&y(e),c&&y(s),c&&y(l),c&&y(r),c&&y(a),u=!1,f()}}}function oD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Use SMTP mail server"),p(e,"type","checkbox"),p(e,"id",t=n[23]),e.required=!0,p(s,"for",o=n[23])},m(u,f){k(u,e,f),e.checked=n[0].smtp.enabled,k(u,i,f),k(u,s,f),m(s,l),r||(a=G(e,"change",n[13]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&p(e,"id",t),f&1&&(e.checked=u[0].smtp.enabled),f&8388608&&o!==(o=u[23])&&p(s,"for",o)},d(u){u&&y(e),u&&y(i),u&&y(s),r=!1,a()}}}function oh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C,S;return i=new Ne({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[rD,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[aD,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[uD,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field",name:"smtp.username",$$slots:{default:[fD,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),v=new Ne({props:{class:"form-field",name:"smtp.password",$$slots:{default:[cD,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),V(i.$$.fragment),s=T(),l=_("div"),V(o.$$.fragment),r=T(),a=_("div"),V(u.$$.fragment),f=T(),c=_("div"),V(d.$$.fragment),h=T(),g=_("div"),V(v.$$.fragment),b=T(),w=_("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(g,"class","col-lg-6"),p(w,"class","col-lg-12"),p(e,"class","grid")},m($,M){k($,e,M),m(e,t),j(i,t,null),m(e,s),m(e,l),j(o,l,null),m(e,r),m(e,a),j(u,a,null),m(e,f),m(e,c),j(d,c,null),m(e,h),m(e,g),j(v,g,null),m(e,b),m(e,w),S=!0},p($,M){const D={};M&25165825&&(D.$$scope={dirty:M,ctx:$}),i.$set(D);const O={};M&25165825&&(O.$$scope={dirty:M,ctx:$}),o.$set(O);const A={};M&25165825&&(A.$$scope={dirty:M,ctx:$}),u.$set(A);const L={};M&25165825&&(L.$$scope={dirty:M,ctx:$}),d.$set(L);const F={};M&25165825&&(F.$$scope={dirty:M,ctx:$}),v.$set(F)},i($){S||(E(i.$$.fragment,$),E(o.$$.fragment,$),E(u.$$.fragment,$),E(d.$$.fragment,$),E(v.$$.fragment,$),$&&Dt(()=>{C||(C=rt(e,en,{duration:150},!0)),C.run(1)}),S=!0)},o($){P(i.$$.fragment,$),P(o.$$.fragment,$),P(u.$$.fragment,$),P(d.$$.fragment,$),P(v.$$.fragment,$),$&&(C||(C=rt(e,en,{duration:150},!1)),C.run(0)),S=!1},d($){$&&y(e),q(i),q(o),q(u),q(d),q(v),$&&C&&C.end()}}}function rD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("SMTP server host"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].smtp.host),r||(a=G(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.host&&Me(l,u[0].smtp.host)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function aD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Port"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","number"),p(l,"id",o=n[23]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].smtp.port),r||(a=G(l,"input",n[15]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&At(l.value)!==u[0].smtp.port&&Me(l,u[0].smtp.port)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function uD(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[23],items:n[5]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new as({props:u}),he.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=N("TLS Encryption"),s=T(),V(l.$$.fragment),p(e,"for",i=n[23])},m(f,c){k(f,e,c),m(e,t),k(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&8388608&&i!==(i=f[23]))&&p(e,"for",i);const d={};c&8388608&&(d.id=f[23]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,He(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&y(e),f&&y(s),q(l,f)}}}function fD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Username"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23])},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].smtp.username),r||(a=G(l,"input",n[17]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.username&&Me(l,u[0].smtp.username)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function cD(n){let e,t,i,s,l,o,r;function a(f){n[18](f)}let u={id:Line truncated
|
||||
the
|
||||
`),r=_("strong"),u=N(a),f=N(`
|
||||
to the
|
||||
`),c=_("strong"),h=N(d),g=N(`.
|
||||
`),v=_("br"),b=N(`
|
||||
There are numerous command line tools that can help you, such as:
|
||||
`),w=_("a"),w.textContent=`rclone
|
||||
`,C=N(`,
|
||||
`),S=_("a"),S.textContent=`s5cmd
|
||||
`,$=N(", etc."),M=T(),D=_("div"),p(i,"class","icon"),p(w,"href","https://github.com/rclone/rclone"),p(w,"target","_blank"),p(w,"rel","noopener"),p(w,"class","txt-bold"),p(S,"href","https://github.com/peak/s5cmd"),p(S,"target","_blank"),p(S,"rel","noopener"),p(S,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(D,"class","clearfix m-t-base")},m(L,F){k(L,e,F),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(c,h),m(l,g),m(l,v),m(l,b),m(l,w),m(l,C),m(l,S),m(l,$),m(e,M),m(e,D),A=!0},p(L,F){(!A||F&8)&&a!==(a=L[3]?"S3 storage":"local file system")&&pe(u,a),(!A||F&1)&&d!==(d=L[0].enabled?"S3 storage":"local file system")&&pe(h,d)},i(L){A||(L&&Dt(()=>{O||(O=rt(e,en,{duration:150},!0)),O.run(1)}),A=!0)},o(L){L&&(O||(O=rt(e,en,{duration:150},!1)),O.run(0)),A=!1},d(L){L&&y(e),L&&O&&O.end()}}}function ah(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C,S,$,M,D;return i=new Ne({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[vD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[yD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field required",name:"s3.region",$$slots:{default:[kD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[wD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),v=new Ne({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[$D,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),C=new Ne({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[SD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),V(i.$$.fragment),s=T(),l=_("div"),V(o.$$.fragment),r=T(),a=_("div"),V(u.$$.fragment),f=T(),c=_("div"),V(d.$$.fragment),h=T(),g=_("div"),V(v.$$.fragment),b=T(),w=_("div"),V(C.$$.fragment),S=T(),$=_("div"),p(t,"class","col-lg-12"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(c,"class","col-lg-6"),p(g,"class","col-lg-6"),p(w,"class","col-lg-12"),p($,"class","col-lg-12"),p(e,"class","grid")},m(O,A){k(O,e,A),m(e,t),j(i,t,null),m(e,s),m(e,l),j(o,l,null),m(e,r),m(e,a),j(u,a,null),m(e,f),m(e,c),j(d,c,null),m(e,h),m(e,g),j(v,g,null),m(e,b),m(e,w),j(C,w,null),m(e,S),m(e,$),D=!0},p(O,A){const L={};A&1572865&&(L.$$scope={dirty:A,ctx:O}),i.$set(L);const F={};A&1572865&&(F.$$scope={dirty:A,ctx:O}),o.$set(F);const R={};A&1572865&&(R.$$scope={dirty:A,ctx:O}),u.$set(R);const B={};A&1572865&&(B.$$scope={dirty:A,ctx:O}),d.$set(B);const te={};A&1572865&&(te.$$scope={dirty:A,ctx:O}),v.$set(te);const Z={};A&1572865&&(Z.$$scope={dirty:A,ctx:O}),C.$set(Z)},i(O){D||(E(i.$$.fragment,O),E(o.$$.fragment,O),E(u.$$.fragment,O),E(d.$$.fragment,O),E(v.$$.fragment,O),E(C.$$.fragment,O),O&&Dt(()=>{M||(M=rt(e,en,{duration:150},!0)),M.run(1)}),D=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(v.$$.fragment,O),P(C.$$.fragment,O),O&&(M||(M=rt(e,en,{duration:150},!1)),M.run(0)),D=!1},d(O){O&&y(e),q(i),q(o),q(u),q(d),q(v),q(C),O&&M&&M.end()}}}function vD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Endpoint"),s=T(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].endpoint),r||(a=G(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].endpoint&&Me(l,u[0].endpoint)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function yD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Bucket"),s=T(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].bucket),r||(a=G(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].bucket&&Me(l,u[0].bucket)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function kD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Region"),s=T(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].region),r||(a=G(l,"input",n[11]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].region&&Me(l,u[0].region)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function wD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Access key"),s=T(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].accessKey),r||(a=G(l,"input",n[12]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].accessKey&&Me(l,u[0].accessKey)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}functio
Line truncated
|
||||
<p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,c=T(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,M){k($,e,M),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),k($,r,M),k($,a,M),m(a,u),m(u,f),m(u,c),C[d].m(u,null),g=!0,v||(b=G(u,"submit",Yt(n[16])),v=!0)},p($,M){(!g||M&32)&&pe(o,$[5]);let D=d;d=S($),d===D?C[d].p($,M):(Pe(),P(C[D],1,1,()=>{C[D]=null}),Le(),h=C[d],h?h.p($,M):(h=C[d]=w[d]($),h.c()),E(h,1),h.m(u,null))},i($){g||(E(h),g=!0)},o($){P(h),g=!1},d($){$&&y(e),$&&y(r),$&&y(a),C[d].d(),v=!1,b()}}}function MD(n){let e,t,i,s;return e=new ji({}),i=new Cn({props:{$$slots:{default:[CD]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=T(),V(i.$$.fragment)},m(l,o){j(e,l,o),k(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&1048639&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&y(t),q(i,l)}}}function TD(n,e,t){let i,s;kt(n,Rt,D=>t(5,s=D)),fn(Rt,s="Files storage",s);let l={},o=!1,r=!1,a="",u=!1;f();async function f(){t(1,o=!0);try{const D=await _e.settings.getAll()||{};d(D)}catch(D){_e.errorResponseHandler(D)}t(1,o=!1)}async function c(){if(!(r||!i)){t(2,r=!0);try{const D=await _e.settings.update(Y.filterRedactedProps({s3:l}));d(D),wi({}),un("Successfully saved Files storage settings.")}catch(D){_e.errorResponseHandler(D)}t(2,r=!1)}}function d(D={}){t(0,l=(D==null?void 0:D.s3)||{}),t(3,u=l.enabled),t(7,a=JSON.stringify(l))}function h(){l.enabled=this.checked,t(0,l)}function g(){l.endpoint=this.value,t(0,l)}function v(){l.bucket=this.value,t(0,l)}function b(){l.region=this.value,t(0,l)}function w(){l.accessKey=this.value,t(0,l)}function C(D){n.$$.not_equal(l.secret,D)&&(l.secret=D,t(0,l))}function S(){l.forcePathStyle=this.checked,t(0,l)}const $=()=>c(),M=()=>c();return n.$$.update=()=>{n.$$.dirty&129&&t(4,i=a!=JSON.stringify(l))},[l,o,r,u,i,s,c,a,h,g,v,b,w,C,S,$,M]}class DD extends Ee{constructor(e){super(),Oe(this,e,TD,MD,De,{})}}function OD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[16]),p(s,"for",o=n[16])},m(u,f){k(u,e,f),e.checked=n[0].enabled,k(u,i,f),k(u,s,f),m(s,l),r||(a=G(e,"change",n[8]),r=!0)},p(u,f){f&65536&&t!==(t=u[16])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&65536&&o!==(o=u[16])&&p(s,"for",o)},d(u){u&&y(e),u&&y(i),u&&y(s),r=!1,a()}}}function uh(n){let e,t,i,s,l,o,r,a,u,f,c;return i=new Ne({props:{class:"form-field required",name:"emailPassword.minPasswordLength",$$slots:{default:[ED,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field "+(Y.isEmpty(n[0].onlyDomains)?"":"disabled"),name:"emailPassword.exceptDomains",$$slots:{default:[AD,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field "+(Y.isEmpty(n[0].exceptDomains)?"":"disabled"),name:"emailPassword.onlyDomains",$$slots:{default:[PD,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),V(i.$$.fragment),s=T(),l=_("div"),V(o.$$.fragment),r=T(),a=_("div"),V(u.$$.fragment),p(t,"class","col-sm-12 m-t-sm"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(e,"class","grid")},m(d,h){k(d,e,h),m(e,t),j(i,t,null),m(e,s),m(e,l),j(o,l,null),m(e,r),m(e,a),j(u,a,null),c=!0},p(d,h){const g={};h&196609&&(g.$$scope={dirty:h,ctx:d}),i.$set(g);const v={};h&1&&(v.class="form-field "+(Y.isEmpty(d[0].onlyDomains)?"":"disabled")),h&196609&&(v.$$scope={dirty:h,ctx:d}),o.$set(v);const b={};h&1&&(b.class="form-field "+(Y.isEmpty(d[0].exceptDomains)?"":"disabled")),h&196609&&(b.$$scope={dirty:h,ctx:d}),u.$set(b)},i(d){c||(E(i.$$.fragment,d),E(o.$$.fragment,d),E(u.$$.fragment,d),d&&Dt(()=>{f||(f=rt(e,en,{duration:150},!0)),f.run(1)}),c=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),d&&(f||(f=rt(e,en,{duration:150},!1)),f.run(0)),c=!1},d(d){d&&y(e),q(i),q(o),q(u),d&&f&&f.end()}}}function ED(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Minimum password length"),s=T(),l=_("input"),p(e,"for",i=n[16]),p(l,"type","number"),p(l,"id",o=n[16]),l.required=!0,p(l,"min","5"),p(l,"max","200")},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].minPasswordLength),r||(a=G(l,"input",n[9]),r=!0)},p(u,f){f&65536&&i!==(i=u[16])&&p(e,"for",i),f&65536&&o!==(o=u[16])&&p(l,"id",o),f&1&&At(l.value)!==u[0].minPasswordLength&&Me(l,u[0].minPasswordLength)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function AD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(b){n[10](b)}let v={id:n[16],disabled:!Y.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(v.value=n[0].exceptDomains),r=new us({props:v}),he.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Except domains",i=T(),s=_("i"),o=T(),Line truncated
|
||||
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,w){(!c||w&65536&&l!==(l=b[16]))&&p(e,"for",l);const C={};w&65536&&(C.id=b[16]),w&1&&(C.disabled=!Y.isEmpty(b[0].onlyDomains)),!a&&w&1&&(a=!0,C.value=b[0].exceptDomains,He(()=>a=!1)),r.$set(C)},i(b){c||(E(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&y(e),b&&y(o),q(r,b),b&&y(u),b&&y(f),d=!1,h()}}}function PD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(b){n[11](b)}let v={id:n[16]+".config.onlyDomains",disabled:!Y.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new us({props:v}),he.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=T(),s=_("i"),o=T(),V(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[16]+".config.onlyDomains"),p(f,"class","help-block")},m(b,w){k(b,e,w),m(e,t),m(e,i),m(e,s),k(b,o,w),j(r,b,w),k(b,u,w),k(b,f,w),c=!0,d||(h=Ye(Ct.call(null,s,{text:`Email domains that are ONLY allowed to sign up.
|
||||
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,w){(!c||w&65536&&l!==(l=b[16]+".config.onlyDomains"))&&p(e,"for",l);const C={};w&65536&&(C.id=b[16]+".config.onlyDomains"),w&1&&(C.disabled=!Y.isEmpty(b[0].exceptDomains)),!a&&w&1&&(a=!0,C.value=b[0].onlyDomains,He(()=>a=!1)),r.$set(C)},i(b){c||(E(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&y(e),b&&y(o),q(r,b),b&&y(u),b&&y(f),d=!1,h()}}}function LD(n){let e,t,i,s;e=new Ne({props:{class:"form-field form-field-toggle m-b-0",name:"emailPassword.enabled",$$slots:{default:[OD,({uniqueId:o})=>({16:o}),({uniqueId:o})=>o?65536:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&uh(n);return{c(){V(e.$$.fragment),t=T(),l&&l.c(),i=Xe()},m(o,r){j(e,o,r),k(o,t,r),l&&l.m(o,r),k(o,i,r),s=!0},p(o,r){const a={};r&196609&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].enabled?l?(l.p(o,r),r&1&&E(l,1)):(l=uh(o),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(Pe(),P(l,1,1,()=>{l=null}),Le())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){q(e,o),o&&y(t),l&&l.d(o),o&&y(i)}}}function FD(n){let e;return{c(){e=_("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function ID(n){let e;return{c(){e=_("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function fh(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){k(o,e,r),i=!0,s||(l=Ye(Ct.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Dt(()=>{t||(t=rt(e,Vn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=rt(e,Vn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&y(e),o&&t&&t.end(),s=!1,l()}}}function ND(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].enabled?ID:FD}let u=a(n),f=u(n),c=n[2]&&fh();return{c(){e=_("div"),e.innerHTML=`<i class="ri-mail-lock-line"></i>
|
||||
<span class="txt">Email/Password</span>`,t=T(),f.c(),i=T(),s=_("div"),l=T(),c&&c.c(),o=Xe(),p(e,"class","inline-flex"),p(s,"class","flex-fill")},m(d,h){k(d,e,h),k(d,t,h),f.m(d,h),k(d,i,h),k(d,s,h),k(d,l,h),c&&c.m(d,h),k(d,o,h),r=!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=fh(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(Pe(),P(c,1,1,()=>{c=null}),Le())},i(d){r||(E(c),r=!0)},o(d){P(c),r=!1},d(d){d&&y(e),d&&y(t),f.d(d),d&&y(i),d&&y(s),d&&y(l),c&&c.d(d),d&&y(o)}}}function RD(n){let e,t;const i=[n[3]];let s={$$slots:{header:[ND],default:[LD]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=pt(s,i[l]);return e=new Ba({props:s}),n[12](e),e.$on("expand",n[13]),e.$on("collapse",n[14]),e.$on("toggle",n[15]),{c(){V(e.$$.fragment)},m(l,o){j(e,l,o),t=!0},p(l,[o]){const r=o&8?gn(i,[ci(l[3])]):{};o&131077&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(E(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[12](null),q(e,l)}}}function HD(n,e,t){let i;const s=["config","expand","collapse","collapseSiblings"];let l=Jt(e,s),o;kt(n,os,$=>t(7,o=$));let{config:r={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){r.enabled=this.checked,t(0,r)}function h(){r.minPasswordLength=At(this.value),t(0,r)}function g($){n.$$.not_equal(r.exceptDomains,$)&&(r.exceptDomains=$,t(0,r))}function v($){n.$$.not_equal(r.onlyDomains,$)&&(r.onlyDomains=$,t(0,r))}function b($){he[$?"unshift":"push"](()=>{a=$,t(1,a)})}function w($){ut.call(this,n,$)}function C($){ut.call(this,n,$)}function S($){ut.call(this,n,$)}return n.$$set=$=>{e=pt(pt({},e),fi($)),t(3,l=Jt(e,s)),"config"in $&&t(0,r=$.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!Y.isEmpty(o==null?void 0:o.emailPassword))},[r,a,i,l,u,f,c,o,d,h,g,v,b,w,C,S]}class jD extends Ee{constructor(e){super(),Oe(this,e,HD,RD,De,{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 qD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[22]),p(s,"for",o=n[22])},m(u,f){k(u,e,f),e.checked=n[0].enabled,k(u,i,f),k(u,s,f),m(s,l),r||(a=G(e,"change",n[11]),r=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&4194304&&o!==(o=u[22])&&p(s,"for",o)},d(u){u&&y(e),u&&y(i),u&&y(s),r=!1,a()}}}function ch(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g;l=new Ne({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[VD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),a=new Ne({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[zD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),c=new Ne({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[BD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}});let v=n[4]&&dh(n);return{c(){e=_("div"),t=_("div"),i=T(),s=_("div"),V(l.$$.fragment),o=T(),r=_("div"),V(a.$$.fragment),u=T(),f=_("div"),V(c.$$.fragment),d=T(),v&&v.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(r,"class","col-lg-6"),p(f,"class","col-lg-12"),p(e,"class","grid")},m(b,w){k(b,e,w),m(e,t),m(e,i),m(e,s),j(l,s,null),m(e,o),m(e,r),j(a,r,null),m(e,u),m(e,f),j(c,f,null),m(e,d),v&&v.m(e,null),g=!0},p(b,w){const C={};w&2&&(C.name=b[1]+".clientId"),w&12582913&&(C.$$scope={dirty:w,ctx:b}),l.$set(C);const S={};w&2&&(S.name=b[1]+".clientSecret"),w&12582913&&(S.$$scope={dirty:w,ctx:b}),a.$set(S);const $={};w&2&&($.name=b[1]+".allowRegistrations"),w&12582913&&($.$$scope={dirty:w,ctx:b}),c.$set($),b[4]?v?(v.p(b,w),w&16&&E(v,1)):(v=dh(b),v.c(),E(v,1),v.m(e,null)):v&&(Pe(),P(v,1,1,()=>{v=null}),Le())},i(b){g||(E(l.$$.fragment,b),E(a.$$.fragment,b),E(c.$$.fragment,b),E(v),b&&Dt(()=>{h||(h=rt(e,en,{duration:200},!0)),h.run(1)}),g=!0)},o(b){P(l.$$.fragment,b),P(a.$$.fragment,b),P(c.$$.fragment,b),P(v),b&&(h||(h=rt(e,en,{duration:200},!1)),h.run(0)),g=!1},d(b){b&&y(e),q(l),q(a),q(c),v&&v.d(),b&&h&&h.end()}}}function VD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Client ID"),s=T(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",o=n[22]),l.required=!0},m(u,f){k(u,e,f),m(e,t),k(u,s,f),k(u,l,f),Me(l,n[0].clientId),r||(a=G(l,"input",n[12]),r=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&o!==(o=u[22])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&Me(l,u[0].clientId)},d(u){u&&y(e),u&&y(s),u&&y(l),r=!1,a()}}}function zD(n){let e,t,i,s,l,o,r;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 Ya({props:u}),he.push(()=>Re(l,"value",a)),{c(){e=_("label"),t=N("Client Secret"),s=T(),V(l.$$.fragment),p(e,"for",i=n[22])},m(f,c){k(f,e,c),m(e,t),k(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&4194304&&i!==(i=f[22]))&&p(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!o&&c&Line truncated
|
||||
another PocketBase environment.</p>`,t=T(),i=_("div"),s=_("button"),s.innerHTML='<span class="txt">Copy</span>',l=T(),V(o.$$.fragment),r=T(),a=_("div"),u=_("div"),f=T(),c=_("button"),c.innerHTML=`<i class="ri-download-line"></i>
|
||||
<span class="txt">Download as JSON</span>`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-secondary fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(v,b){k(v,e,b),k(v,t,b),k(v,i,b),m(i,s),m(i,l),j(o,i,null),n[8](i),k(v,r,b),k(v,a,b),m(a,u),m(a,f),m(a,c),d=!0,h||(g=[G(s,"click",n[7]),G(i,"keydown",n[9]),G(c,"click",n[10])],h=!0)},p(v,b){const w={};b&4&&(w.content=v[2]),o.$set(w)},i(v){d||(E(o.$$.fragment,v),d=!0)},o(v){P(o.$$.fragment,v),d=!1},d(v){v&&y(e),v&&y(t),v&&y(i),q(o),n[8](null),v&&y(r),v&&y(a),h=!1,Qe(g)}}}function pO(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){k(t,e,i)},p:le,i:le,o:le,d(t){t&&y(e)}}}function hO(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[pO,dO],g=[];function v(b,w){return b[1]?0:1}return f=v(n),c=g[f]=h[f](n),{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=T(),l=_("div"),o=N(n[3]),r=T(),a=_("div"),u=_("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,w){k(b,e,w),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),k(b,r,w),k(b,a,w),m(a,u),g[f].m(u,null),d=!0},p(b,w){(!d||w&8)&&pe(o,b[3]);let C=f;f=v(b),f===C?g[f].p(b,w):(Pe(),P(g[C],1,1,()=>{g[C]=null}),Le(),c=g[f],c?c.p(b,w):(c=g[f]=h[f](b),c.c()),E(c,1),c.m(u,null))},i(b){d||(E(c),d=!0)},o(b){P(c),d=!1},d(b){b&&y(e),b&&y(r),b&&y(a),g[f].d()}}}function mO(n){let e,t,i,s;return e=new ji({}),i=new Cn({props:{$$slots:{default:[hO]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=T(),V(i.$$.fragment)},m(l,o){j(e,l,o),k(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&y(t),q(i,l)}}}function gO(n,e,t){let i,s;kt(n,Rt,b=>t(3,s=b)),fn(Rt,s="Export collections",s);const l="export_"+Y.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await _e.collections.getFullList(100,{$cancelKey:l}));for(let b of r)delete b.created,delete b.updated}catch(b){_e.errorResponseHandler(b)}t(1,a=!1)}function f(){Y.downloadJson(r,"pb_schema")}function c(){Y.copyToClipboard(i),G0("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function h(b){he[b?"unshift":"push"](()=>{o=b,t(0,o)})}const g=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const w=window.getSelection(),C=document.createRange();C.selectNodeContents(o),w.removeAllRanges(),w.addRange(C)}},v=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,2))},[o,a,i,s,f,c,r,d,h,g,v]}class _O extends Ee{constructor(e){super(),Oe(this,e,gO,mO,De,{})}}function _h(n,e,t){const i=n.slice();return i[17]=e[t],i}function bO(n){let e,t,i,s,l,o=n[17].new.name+"",r,a=n[17].old.name!==n[17].new.name&&bh(n);return{c(){e=_("span"),e.textContent="Modified",t=T(),i=_("div"),a&&a.c(),s=T(),l=_("strong"),r=N(o),p(e,"class","label label-warning"),p(l,"class","txt"),p(i,"class","inline-flex fleg-gap-5")},m(u,f){k(u,e,f),k(u,t,f),k(u,i,f),a&&a.m(i,null),m(i,s),m(i,l),m(l,r)},p(u,f){u[17].old.name!==u[17].new.name?a?a.p(u,f):(a=bh(u),a.c(),a.m(i,s)):a&&(a.d(1),a=null),f&4&&o!==(o=u[17].new.name+"")&&pe(r,o)},d(u){u&&y(e),u&&y(t),u&&y(i),a&&a.d()}}}function vO(n){var o;let e,t,i,s=((o=n[17].old)==null?void 0:o.name)+"",l;return{c(){e=_("span"),e.textContent="Deleted",t=T(),i=_("strong"),l=N(s),p(e,"class","label label-danger")},m(r,a){k(r,e,a),k(r,t,a),k(r,i,a),m(i,l)},p(r,a){var u;a&4&&s!==(s=((u=r[17].old)==null?void 0:u.name)+"")&&pe(l,s)},d(r){r&&y(e),r&&y(t),r&&y(i)}}}function yO(n){var o;let e,t,i,s=((o=n[17].new)==null?void 0:o.name)+"",l;return{c(){e=_("span"),e.textContent="New",t=T(),i=_("strong"),l=N(s),p(e,"class","label label-success")},m(r,a){k(r,e,a),k(r,t,a),k(r,i,a),m(i,l)},p(r,a){var u;a&4&&s!==(s=((u=r[17].new)==null?void 0:u.name)+"")&&pe(l,s)},d(r){r&&y(e),r&&y(t),r&&y(i)}}}function bh(n){let e,t=n[17].old.name+"",i,s,l;return{c(){e=_("strong"),i=N(t),s=T(),l=_("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){k(o,e,r),m(e,i),k(o,s,r),k(o,l,r)},p(o,r){r&4&&t!==(t=o[17].old.name+"")&&pe(i,t)},d(o){o&&y(e),o&&y(s),o&&y(l)}}}function vh(n,e){let t,i,s,l,o,r=(eo(e[17].old,e[17].new,[window.DIFF_DELETE,window.DIFF_EQUAL])||"N/A")+"",a,u,f,c=(eo(e[17].old,e[17].new,[window.DIFF_INSERT,window.DIFF_EQUAL])||"N/A")+"",d;function h(b,w){var C,S;return(C=b[17].old)!=null&&C.id?(S=b[17].new)!=null&&S.id?bO:vO:yO}let g=h(e),v=g(e);return{key:n,first:null,c(){t=_("div"),i=_("div"),v.c(),s=T(),l=_("div"),o=_("code"),a=T(),u=_("div"),f=_("code"),d=T(),p(i,"class","flex flex-gap-10"),p(t,"class","col-12"),p(o,"class","code-block svelte-10rlu5l"),p(l,"class","col-6 p-b-10"),p(f,"class","code-block svelLine truncated
|
||||
- ${$.join(`
|
||||
- `)}?`,()=>{g()})}else g()}async function g(){if(!u){t(3,u=!0);try{await _e.collections.import(r,!0),un("Successfully imported the collections configuration."),s("submit")}catch($){_e.errorResponseHandler($)}t(3,u=!1),c()}}const v=()=>h(),b=()=>!u;function w($){he[$?"unshift":"push"](()=>{l=$,t(1,l)})}function C($){ut.call(this,n,$)}function S($){ut.call(this,n,$)}return n.$$.update=()=>{n.$$.dirty&192&&Array.isArray(o)&&Array.isArray(r)&&d(),n.$$.dirty&192&&(i=o.filter($=>{var M;return!((M=Y.findByKey(r,"id",$.id))!=null&&M.id)}))},[c,l,a,u,h,f,o,r,v,b,w,C,S]}class TO extends Ee{constructor(e){super(),Oe(this,e,MO,SO,De,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function yh(n,e,t){const i=n.slice();return i[27]=e[t],i}function kh(n,e,t){const i=n.slice();return i[30]=e[t],i}function wh(n,e,t){const i=n.slice();return i[27]=e[t],i}function DO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,w,C,S,$,M;a=new Ne({props:{class:"form-field "+(n[5]?"":"field-error"),name:"collections",$$slots:{default:[EO,({uniqueId:L})=>({35:L}),({uniqueId:L})=>[0,L?16:0]]},$$scope:{ctx:n}}});let D=n[5]&&n[1].length&&!n[6]&&Sh(),O=n[5]&&n[1].length&&n[6]&&Ch(n),A=!!n[0]&&Nh(n);return{c(){e=_("input"),t=T(),i=_("div"),s=_("p"),l=N(`Paste below the collections configuration you want to import or
|
||||
`),o=_("button"),o.innerHTML='<span class="txt">Load from JSON file</span>',r=T(),V(a.$$.fragment),u=T(),D&&D.c(),f=T(),O&&O.c(),c=T(),d=_("div"),A&&A.c(),h=T(),g=_("div"),v=T(),b=_("button"),w=_("span"),w.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),ne(o,"btn-loading",n[11]),p(i,"class","content txt-xl m-b-base"),p(g,"class","flex-fill"),p(w,"class","txt"),p(b,"type","button"),p(b,"class","btn btn-expanded btn-warning m-l-auto"),b.disabled=C=!n[12],p(d,"class","flex m-t-base")},m(L,F){k(L,e,F),n[16](e),k(L,t,F),k(L,i,F),m(i,s),m(s,l),m(s,o),k(L,r,F),j(a,L,F),k(L,u,F),D&&D.m(L,F),k(L,f,F),O&&O.m(L,F),k(L,c,F),k(L,d,F),A&&A.m(d,null),m(d,h),m(d,g),m(d,v),m(d,b),m(b,w),S=!0,$||(M=[G(e,"change",n[17]),G(o,"click",n[18]),G(b,"click",n[21])],$=!0)},p(L,F){F[0]&2048&&ne(o,"btn-loading",L[11]);const R={};F[0]&32&&(R.class="form-field "+(L[5]?"":"field-error")),F[0]&33|F[1]&48&&(R.$$scope={dirty:F,ctx:L}),a.$set(R),L[5]&&L[1].length&&!L[6]?D||(D=Sh(),D.c(),D.m(f.parentNode,f)):D&&(D.d(1),D=null),L[5]&&L[1].length&&L[6]?O?O.p(L,F):(O=Ch(L),O.c(),O.m(c.parentNode,c)):O&&(O.d(1),O=null),L[0]?A?A.p(L,F):(A=Nh(L),A.c(),A.m(d,h)):A&&(A.d(1),A=null),(!S||F[0]&4096&&C!==(C=!L[12]))&&(b.disabled=C)},i(L){S||(E(a.$$.fragment,L),S=!0)},o(L){P(a.$$.fragment,L),S=!1},d(L){L&&y(e),n[16](null),L&&y(t),L&&y(i),L&&y(r),q(a,L),L&&y(u),D&&D.d(L),L&&y(f),O&&O.d(L),L&&y(c),L&&y(d),A&&A.d(),$=!1,Qe(M)}}}function OO(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){k(t,e,i)},p:le,i:le,o:le,d(t){t&&y(e)}}}function $h(n){let e;return{c(){e=_("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function EO(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[5]&&$h();return{c(){e=_("label"),t=N("Collections"),s=T(),l=_("textarea"),r=T(),c&&c.c(),a=Xe(),p(e,"for",i=n[35]),p(e,"class","p-b-10"),p(l,"id",o=n[35]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,h){k(d,e,h),m(e,t),k(d,s,h),k(d,l,h),Me(l,n[0]),k(d,r,h),c&&c.m(d,h),k(d,a,h),u||(f=G(l,"input",n[19]),u=!0)},p(d,h){h[1]&16&&i!==(i=d[35])&&p(e,"for",i),h[1]&16&&o!==(o=d[35])&&p(l,"id",o),h[0]&1&&Me(l,d[0]),!!d[0]&&!d[5]?c||(c=$h(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&y(e),d&&y(s),d&&y(l),d&&y(r),c&&c.d(d),d&&y(a),u=!1,f()}}}function Sh(n){let e;return{c(){e=_("div"),e.innerHTML=`<div class="icon"><i class="ri-information-line"></i></div>
|
||||
<div class="content"><string>Your collections configuration is already up-to-date!</string></div>`,p(e,"class","alert alert-info")},m(t,i){k(t,e,i)},d(t){t&&y(e)}}}function Ch(n){let e,t,i,s,l,o=n[8].length&&Mh(n),r=n[3].length&&Oh(n),a=n[7].length&&Lh(n);return{c(){e=_("h5"),e.textContent="Detected changes",t=T(),i=_("div"),o&&o.c(),s=T(),r&&r.c(),l=T(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){k(u,e,f),k(u,t,f),k(u,i,f),o&&o.m(i,null),m(i,s),r&&r.m(i,null),m(i,l),a&&a.m(i,null)},p(u,f){u[8].length?o?o.p(u,f):(o=Mh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[3].length?r?r.p(u,f):(r=Oh(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[7].length?a?a.p(u,f):(a=Lh(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&y(e),u&&y(t),u&&y(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function Mh(n){let e=[],t=new Map,i,s=n[8];const l=o=>o[27].id;for(let o=0;o<s.length;o+=1){let r=wh(n,s,o),a=l(r);t.set(a,e[o]=Dh(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Xe()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);k(o,i,r)},p(o,r){r[0]&256&&(s=o[8],e=mt(e,r,l,1,o,s,t,i.parentNode,mn,Dh,i,wh))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&y(i)}}}function Th(n){let e,t,i=n[27].id+"",s,l;return{c(){e=_("small"),t=N("("),s=N(i),l=N(")"),p(e,"class","txt-hint")},m(o,r){k(o,e,r),m(e,t),m(e,s),m(e,l)},p(o,r){r[0]&256&&i!==(i=o[27].id+"")&&pe(s,i)},d(o){o&&y(e)}}}function Dh(n,e){let t,i,s,l,o=e[27].name+"",r,a,u,f=e[27].id&&Th(e);return{key:n,first:null,c(){t=_("div"),i=_("span"),i.textContent="Deleted",s=T(),l=_("strong"),r=N(o),a=T(),f&&f.c(),u=T(),p(i,"class","label label-danger list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){k(c,t,d),m(t,i),m(t,s),m(t,l),m(l,r),m(t,a),f&&f.m(t,null),m(t,u)},p(c,d){e=c,d[0]&256&&o!==(o=e[27].name+"")&&pe(r,o),e[27].id?f?f.p(e,d):(f=Th(e),f.c(),f.m(t,u)):f&&(f.d(1),f=null)},d(c){c&&y(t),f&&f.d()}}}function Oh(n){let e=[],t=new Map,i,s=n[3];const l=o=>o[30].old.id+o[30].new.id;for(let o=0;o<s.length;o+=1){let r=kh(n,s,o),a=l(r);t.set(a,e[o]=Ph(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Xe()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);k(o,i,r)},p(o,r){r[0]&8&&(s=o[3],e=mt(e,r,l,1,o,s,t,i.parentNode,mn,Ph,i,kh))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&y(i)}}}function Eh(n){let e,t=n[30].old.name+"",i,s;return{c(){e=_("span"),i=N(t),s=N(" -"),p(e,"class","txt-strikethrough txt-hint")},m(l,o){k(l,e,o),m(e,i),k(l,s,o)},p(l,o){o[0]&8&&t!==(t=l[30].old.name+"")&&pe(i,t)},d(l){l&&y(e),l&&y(s)}}}function Ah(n){let e,t,i=n[30].new.id+"",s,l;return{c(){e=_("small"),t=N("("),s=N(i),l=N(")"),p(e,"class","txt-hint")},m(o,r){k(o,e,r),m(e,t),m(e,s),m(e,l)},p(o,r){r[0]&8&&i!==(i=o[30].new.id+"")&&pe(s,i)},d(o){o&&y(e)}}}function Ph(n,e){let t,i,s,l,o,r=e[30].new.name+"",a,u,f,c=e[30].old.name!==e[30].new.name&&Eh(e),d=e[30].new.id&&Ah(e);return{key:n,first:null,c(){t=_("div"),i=_("span"),i.textContent="Modified",s=T(),l=_("strong"),c&&c.c(),o=T(),a=N(r),u=T(),d&&d.c(),f=T(),p(i,"class","label label-warning list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(h,g){k(h,t,g),m(t,i),m(t,s),m(t,l),c&&c.m(l,null),m(l,o),m(l,a),m(t,u),d&&d.m(t,null),m(t,f)},p(h,g){e=h,e[30].old.name!==e[30].new.name?c?c.p(e,g):(c=Eh(e),c.c(),c.m(l,o)):c&&(c.d(1),c=null),g[0]&8&&r!==(r=e[30].new.name+"")&&pe(a,r),e[30].new.id?d?d.p(e,g):(d=Ah(e),d.c(),d.m(t,f)):d&&(d.d(1),d=null)},d(h){h&&y(t),c&&c.d(),d&&d.d()}}}function Lh(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[27].id;for(let o=0;o<s.length;o+=1){let r=yh(n,s,o),a=l(r);t.set(a,e[o]=Ih(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Xe()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);k(o,i,r)},p(o,r){r[0]&128&&(s=o[7],e=mt(e,r,l,1,o,s,t,i.parentNode,mn,Ih,i,yh))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&y(i)}}}function Fh(n){let e,t,i=n[27].id+"",s,l;return{c(){e=_("small"),t=N("("),s=N(i),l=N(")"),p(e,"class","txt-hint")},m(o,r){k(o,e,r),m(e,t),m(e,s),m(e,l)},p(o,r){r[0]&128&&i!==(i=o[27].id+"")&&pe(s,i)},d(o){o&&y(e)}}}function Ih(n,e){let t,i,s,l,o=e[27].name+"",r,a,u,f=e[27].id&&Fh(e);return{key:n,first:null,c(){t=_("div"),i=_("span"),i.textContent="New",s=T(),l=_("strong"),r=N(o),a=T(),f&&f.c(),u=T(),p(i,"class","label label-success list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){k(c,t,d),m(t,i),m(t,s),m(t,l),m(l,r),m(t,a),f&&f.m(t,null),m(t,u)},p(c,d){e=c,d[0]&128&&o!==(o=e[27].name+"")&&pe(r,o),e[27].id?f?f.p(e,d):(f=Fh(e),f.c(),f.m(t,u)):f&&(f.d(1),f=null)},d(c){c&&y(t),f&&f.d()}}}function Nh(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear</span>',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){k(s,e,l),t||(i=G(e,"click",n[20]),t=!0)},p:le,d(s){s&&y(e),t=!1,i()}}}function AO(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[OO,DO],g=[];function v(b,w){return b[4]?0:1}return f=v(n),c=g[f]=h[f](n),{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=T(),l=_("div"),o=N(n[13]),r=T(),a=_Line truncated
|
||||
<span class="txt">Manage admins</span>`,t=T(),i=_("hr"),s=T(),l=_("div"),l.innerHTML=`<i class="ri-logout-circle-line"></i>
|
||||
<span class="txt">Logout</span>`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable")},m(a,u){k(a,e,u),k(a,t,u),k(a,i,u),k(a,s,u),k(a,l,u),o||(r=[Ye(dn.call(null,e)),G(l,"click",n[6])],o=!0)},p:le,d(a){a&&y(e),a&&y(t),a&&y(i),a&&y(s),a&&y(l),o=!1,Qe(r)}}}function JO(n){var h;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=Y.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((h=n[0])==null?void 0:h.id)&&n[1]&&jh(n);return o=new j_({props:{routes:IO}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new zO({}),f=new KO({}),{c(){t=T(),i=_("div"),d&&d.c(),s=T(),l=_("div"),V(o.$$.fragment),r=T(),V(a.$$.fragment),u=T(),V(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(g,v){k(g,t,v),k(g,i,v),d&&d.m(i,null),m(i,s),m(i,l),j(o,l,null),m(l,r),j(a,l,null),k(g,u,v),j(f,g,v),c=!0},p(g,[v]){var b;(!c||v&12)&&e!==(e=Y.joinNonEmpty([g[3],g[2],"PocketBase"]," - "))&&(document.title=e),((b=g[0])==null?void 0:b.id)&&g[1]?d?(d.p(g,v),v&3&&E(d,1)):(d=jh(g),d.c(),E(d,1),d.m(i,s)):d&&(Pe(),P(d,1,1,()=>{d=null}),Le())},i(g){c||(E(d),E(o.$$.fragment,g),E(a.$$.fragment,g),E(f.$$.fragment,g),c=!0)},o(g){P(d),P(o.$$.fragment,g),P(a.$$.fragment,g),P(f.$$.fragment,g),c=!1},d(g){g&&y(t),g&&y(i),d&&d.d(),q(o),q(a),g&&y(u),q(f,g)}}}function GO(n,e,t){let i,s,l;kt(n,_o,d=>t(2,i=d)),kt(n,va,d=>t(0,s=d)),kt(n,Rt,d=>t(3,l=d));let o,r=!1;function a(d){var h,g,v,b;((h=d==null?void 0:d.detail)==null?void 0:h.location)!==o&&(t(1,r=!!((v=(g=d==null?void 0:d.detail)==null?void 0:g.userData)!=null&&v.showAppSidebar)),o=(b=d==null?void 0:d.detail)==null?void 0:b.location,fn(Rt,l="",l),wi({}),f_())}function u(){ki("/")}async function f(){var d;if(!!(s!=null&&s.id))try{const h=await _e.settings.getAll({$cancelKey:"loadAppName"});fn(_o,i=((d=h==null?void 0:h.meta)==null?void 0:d.appName)||"",i)}catch(h){console.warn("Failed to load app name.",h)}}function c(){_e.logout()}return n.$$.update=()=>{n.$$.dirty&1&&s!=null&&s.id&&f()},[s,r,i,l,a,u,c]}class XO extends Ee{constructor(e){super(),Oe(this,e,GO,JO,De,{})}}new XO({target:document.getElementById("app")});export{Qe as A,un as B,Y as C,ki as D,Xe as E,ug as F,kt as G,Ms as H,ln as I,An as J,Wn as K,he as L,Ee as S,P as a,T as b,V as c,q as d,_ as e,p as f,k as g,m as h,Oe as i,Ye as j,Pe as k,dn as l,j as m,Le as n,y as o,_e as p,Ne as q,ne as r,De as s,E as t,G as u,Yt as v,N as w,pe as x,le as y,Me as z};
|
||||
@@ -1 +1 @@
|
||||
@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #adb3b8;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #edf0f3;--baseAlt2Color: #dee3e8;--baseAlt3Color: #a9b4bc;--baseAlt4Color: #7c868d;--infoColor: #3da9fc;--infoAltColor: #d8eefe;--successColor: #2cb67d;--successAltColor: #d6f5e8;--dangerColor: #ef4565;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffe7d6;--overlayColor: rgba(88, 95, 101, .3);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .05);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 24px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--baseRadius: 3px;--lgRadius: 12px;--btnRadius: 3px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:befoLine truncated
|
||||
@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #adb3b8;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #edf0f3;--baseAlt2Color: #dee3e8;--baseAlt3Color: #a9b4bc;--baseAlt4Color: #7c868d;--infoColor: #3da9fc;--infoAltColor: #d8eefe;--successColor: #2cb67d;--successAltColor: #d6f5e8;--dangerColor: #ef4565;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffe7d6;--overlayColor: rgba(88, 95, 101, .3);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .05);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 24px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--baseRadius: 3px;--lgRadius: 12px;--btnRadius: 3px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:befoLine truncated
|
||||
Vendored
-631
@@ -1,631 +0,0 @@
|
||||
const __=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}};__();function le(){}const pl=n=>n;function ct(n,e){for(const t in e)n[t]=e[t];return n}function jh(n){return n()}function Ka(){return Object.create(null)}function Je(n){n.forEach(jh)}function Bn(n){return typeof n=="function"}function De(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let El;function Jn(n,e){return El||(El=document.createElement("a")),El.href=e,n===El.href}function b_(n){return Object.keys(n).length===0}function qh(n,...e){if(n==null)return le;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function yt(n,e,t){n.$$.on_destroy.push(qh(e,t))}function Cn(n,e,t,i){if(n){const s=Vh(n,e,t,i);return n[0](s)}}function Vh(n,e,t,i){return n[1]&&i?ct(t.ctx.slice(),n[1](i(e))):t.ctx}function Mn(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r<o;r+=1)l[r]=e.dirty[r]|s[r];return l}return e.dirty|s}return e.dirty}function Tn(n,e,t,i,s,l){if(s){const o=Vh(e,t,i,l);n.p(o,s)}}function Dn(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function ai(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function Jt(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function Za(n){return n==null?"":n}function fn(n,e,t){return n.set(t),e}function Ue(n){return n&&Bn(n.destroy)?n.destroy:le}const zh=typeof window<"u";let Ao=zh?()=>window.performance.now():()=>Date.now(),sa=zh?n=>requestAnimationFrame(n):le;const ms=new Set;function Bh(n){ms.forEach(e=>{e.c(n)||(ms.delete(e),e.f())}),ms.size!==0&&sa(Bh)}function Po(n){let e;return ms.size===0&&sa(Bh),{promise:new Promise(t=>{ms.add(e={c:n,f:t})}),abort(){ms.delete(e)}}}function h(n,e){n.appendChild(e)}function Uh(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function v_(n){const e=_("style");return y_(Uh(n),e),e.sheet}function y_(n,e){h(n.head||n,e)}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode.removeChild(n)}function Gn(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function _(n){return document.createElement(n)}function N(n){return document.createTextNode(n)}function T(){return N(" ")}function xe(){return N("")}function G(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Yt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Xn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Wh(n){return function(e){e.target===this&&n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function ri(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function At(n){return n===""?null:+n}function k_(n){return Array.from(n.childNodes)}function he(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function Ce(n,e){n.value=e==null?"":e}function Ja(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ie(n,e,t){n.classList[t?"add":"remove"](e)}function Yh(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}const oo=new Map;let ro=0;function w_(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function S_(n,e){const t={stylesheet:v_(e),rules:{}};return oo.set(n,t),t}function il(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{
|
||||
`;for(let b=0;b<=1;b+=a){const y=e+(t-e)*l(b);u+=b*100+`%{${o(y,1-y)}}
|
||||
`}const f=u+`100% {${o(t,1-t)}}
|
||||
}`,c=`__svelte_${w_(f)}_${r}`,d=Uh(n),{stylesheet:m,rules:g}=oo.get(d)||S_(d,n);g[c]||(g[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const v=n.style.animation||"";return n.style.animation=`${v?`${v}, `:""}${c} ${i}ms linear ${s}ms 1 both`,ro+=1,c}function sl(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),ro-=s,ro||$_())}function $_(){sa(()=>{ro||(oo.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),oo.clear())})}function C_(n,e,t,i){if(!e)return le;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return le;const{delay:l=0,duration:o=300,easing:r=pl,start:a=Ao()+l,end:u=a+o,tick:f=le,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,g;function v(){c&&(g=il(n,0,1,o,l,r,c)),l||(m=!0)}function b(){c&&sl(n,g),d=!1}return Po(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),b()),!d)return!1;if(m){const $=y-a,S=0+1*r($/o);f(S,1-S)}return!0}),v(),f(0,1),b}function M_(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,Kh(n,s)}}function Kh(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ll;function Zs(n){ll=n}function Lo(){if(!ll)throw new Error("Function called outside component initialization");return ll}function Un(n){Lo().$$.on_mount.push(n)}function T_(n){Lo().$$.after_update.push(n)}function D_(n){Lo().$$.on_destroy.push(n)}function ln(){const n=Lo();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Yh(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function at(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Bs=[],ge=[],eo=[],Mr=[],Zh=Promise.resolve();let Tr=!1;function Jh(){Tr||(Tr=!0,Zh.then(Gh))}function xn(){return Jh(),Zh}function Ot(n){eo.push(n)}function He(n){Mr.push(n)}const Go=new Set;let Al=0;function Gh(){const n=ll;do{for(;Al<Bs.length;){const e=Bs[Al];Al++,Zs(e),O_(e.$$)}for(Zs(null),Bs.length=0,Al=0;ge.length;)ge.pop()();for(let e=0;e<eo.length;e+=1){const t=eo[e];Go.has(t)||(Go.add(t),t())}eo.length=0}while(Bs.length);for(;Mr.length;)Mr.pop()();Tr=!1,Go.clear(),Zs(n)}function O_(n){if(n.fragment!==null){n.update(),Je(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Ot)}}let As;function la(){return As||(As=Promise.resolve(),As.then(()=>{As=null})),As}function Xi(n,e,t){n.dispatchEvent(Yh(`${e?"intro":"outro"}${t}`))}const to=new Set;let ii;function Pe(){ii={r:0,c:[],p:ii}}function Le(){ii.r||Je(ii.c),ii=ii.p}function A(n,e){n&&n.i&&(to.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(to.has(n))return;to.add(n),ii.c.push(()=>{to.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const oa={duration:0};function Xh(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&sl(n,l)}function u(){const{delay:c=0,duration:d=300,easing:m=pl,tick:g=le,css:v}=i||oa;v&&(l=il(n,0,1,d,c,m,v,r++)),g(0,1);const b=Ao()+c,y=b+d;o&&o.abort(),s=!0,Ot(()=>Xi(n,!0,"start")),o=Po($=>{if(s){if($>=y)return g(1,0),Xi(n,!0,"end"),a(),s=!1;if($>=b){const S=m(($-b)/d);g(S,1-S)}}return s})}let f=!1;return{start(){f||(f=!0,sl(n),Bn(i)?(i=i(),la().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Qh(n,e,t){let i=e(n,t),s=!0,l;const o=ii;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=pl,tick:c=le,css:d}=i||oa;d&&(l=il(n,1,0,u,a,f,d));const m=Ao()+a,g=m+u;Ot(()=>Xi(n,!1,"start")),Po(v=>{if(s){if(v>=g)return c(0,1),Xi(n,!1,"end"),--o.r||Je(o.c),!1;if(v>=m){const b=f((v-m)/u);c(1-b,b)}}return s})}return Bn(i)?la().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&sl(n,l),s=!1)}}}function ot(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&sl(n,a)}function f(d,m){const g=d.b-l;return m*=Math.abs(g),{a:l,b:d.b,d:g,duration:m,start:d.start,end:d.start+m,group:d.group}}function c(d){const{delay:m=0,duration:g=300,easing:v=pl,tick:b=le,css:y}=s||oa,$={start:Ao()+m,b:d};d||($.group=ii,ii.r+=1),o||r?r=$:(y&&(u(),a=il(n,l,d,g,m,v,y)),d&&b(0,1),o=f($,g),Ot(()=>Xi(n,d,"start")),Po(S=>{if(r&&S>r.start&&(o=f(r,g),r=null,Xi(n,o.b,"start"),y&&(u(),a=il(n,l,o.b,o.duration,0,v,s.css))),o){if(S>=o.end)b(l=o.b,1-l),Xi(n,o.b,"end"),r||(o.b?u():--o.group.r||Je(o.group.c)),o=null;else if(S>=o.start){const C=S-o.start;l=o.a+o.d*v(C/o.duration),b(l,1-l)}}return!!(o||r)}))}return{run(d){Bn(s)?la().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function mn(n,e){n.d(1),e.delete(n.key)}function Gt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function E_(n,e){n.f(),Gt(n,e)}function ht(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,m=
Line truncated
|
||||
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=T(),i=_("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function X0(n){let e,t,i,s,l,o,r,a,u=!n[0]&&Mu();const f=n[2].default,c=Cn(f,n,n[1],null);return{c(){e=_("div"),t=_("div"),i=T(),s=_("div"),u&&u.c(),l=T(),c&&c.c(),o=T(),r=_("div"),p(t,"class","flex-fill"),p(s,"class","wrapper wrapper-sm m-b-xl svelte-1wbawr2"),p(r,"class","flex-fill"),p(e,"class","page-wrapper full-page-panel svelte-1wbawr2")},m(d,m){w(d,e,m),h(e,t),h(e,i),h(e,s),u&&u.m(s,null),h(s,l),c&&c.m(s,null),h(e,o),h(e,r),a=!0},p(d,[m]){d[0]?u&&(u.d(1),u=null):u||(u=Mu(),u.c(),u.m(s,l)),c&&c.p&&(!a||m&2)&&Tn(c,f,d,d[1],a?Mn(f,d[1],m,null):Dn(d[1]),null)},i(d){a||(A(c,d),a=!0)},o(d){P(c,d),a=!1},d(d){d&&k(e),u&&u.d(),c&&c.d(d)}}}function Q0(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(1,s=o.$$scope)},[l,s,i]}class ag extends Ee{constructor(e){super(),Oe(this,e,Q0,X0,De,{nobranding:0})}}function Tu(n,e,t){const i=n.slice();return i[11]=e[t],i}const x0=n=>({}),Du=n=>({uniqueId:n[3]});function e1(n){let e=(n[11]||mo)+"",t;return{c(){t=N(e)},m(i,s){w(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||mo)+"")&&he(t,e)},d(i){i&&k(t)}}}function t1(n){var i,s;let e=(((i=n[11])==null?void 0:i.message)||((s=n[11])==null?void 0:s.code)||mo)+"",t;return{c(){t=N(e)},m(l,o){w(l,t,o)},p(l,o){var r,a;o&4&&e!==(e=(((r=l[11])==null?void 0:r.message)||((a=l[11])==null?void 0:a.code)||mo)+"")&&he(t,e)},d(l){l&&k(t)}}}function Ou(n){let e,t;function i(o,r){return typeof o[11]=="object"?t1:e1}let s=i(n),l=s(n);return{c(){e=_("div"),l.c(),t=T(),p(e,"class","help-block help-block-error")},m(o,r){w(o,e,r),l.m(e,null),h(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&k(e),l.d()}}}function n1(n){let e,t,i,s,l;const o=n[7].default,r=Cn(o,n,n[6],Du);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=Ou(Tu(n,a,f));return{c(){e=_("div"),r&&r.c(),t=T();for(let f=0;f<u.length;f+=1)u[f].c();p(e,"class",n[0]),ie(e,"error",n[2].length)},m(f,c){w(f,e,c),r&&r.m(e,null),h(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=G(e,"click",n[8]),s=!0)},p(f,[c]){if(r&&r.p&&(!i||c&64)&&Tn(r,o,f,f[6],i?Mn(o,f[6],c,x0):Dn(f[6]),Du),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const m=Tu(f,a,d);u[d]?u[d].p(m,c):(u[d]=Ou(m),u[d].c(),u[d].m(e,null))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}(!i||c&1)&&p(e,"class",f[0]),c&5&&ie(e,"error",f[2].length)},i(f){i||(A(r,f),i=!0)},o(f){P(r,f),i=!1},d(f){f&&k(e),r&&r.d(f),Gn(u,f),n[9](null),s=!1,l()}}}const mo="Invalid value";function i1(n,e,t){let i;yt(n,ls,g=>t(5,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+W.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){rg(r)}Un(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(g){at.call(this,n,g)}function m(g){ge[g?"unshift":"push"](()=>{u=g,t(1,u)})}return n.$$set=g=>{"name"in g&&t(4,r=g.name),"class"in g&&t(0,a=g.class),"$$scope"in g&&t(6,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=W.toArray(W.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,m]}class Ie extends Ee{constructor(e){super(),Oe(this,e,i1,n1,De,{name:4,class:0})}}function s1(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Email"),s=T(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0]),l.focus(),r||(a=G(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&Ce(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function l1(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("Password"),s=T(),l=_("input"),r=T(),a=_("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),h(e,t),w(c,s,d),w(c,l,d),Ce(l,n[1]),w(c,r,d),w(c,a,d),u||(f=G(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&Ce(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function o1(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Password confirm"),s=T(),l=_("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[2]),r||(a=G(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&Ce(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function r1(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return s=new Ie({props:{class:"form-field required",name:"email",$$slots:{default:[s1,({uniqueId:g})=>({9:gLine truncated
|
||||
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),ie(f,"btn-disabled",n[3]),ie(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(g,v){w(g,e,v),h(e,t),h(e,i),V(s,e,null),h(e,l),V(o,e,null),h(e,r),V(a,e,null),h(e,u),h(e,f),c=!0,d||(m=G(e,"submit",Yt(n[4])),d=!0)},p(g,[v]){const b={};v&1537&&(b.$$scope={dirty:v,ctx:g}),s.$set(b);const y={};v&1538&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const $={};v&1540&&($.$$scope={dirty:v,ctx:g}),a.$set($),v&8&&ie(f,"btn-disabled",g[3]),v&8&&ie(f,"btn-loading",g[3])},i(g){c||(A(s.$$.fragment,g),A(o.$$.fragment,g),A(a.$$.fragment,g),c=!0)},o(g){P(s.$$.fragment,g),P(o.$$.fragment,g),P(a.$$.fragment,g),c=!1},d(g){g&&k(e),z(s),z(o),z(a),d=!1,m()}}}function a1(n,e,t){const i=ln();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await be.admins.create({email:s,password:l,passwordConfirm:o}),await be.admins.authViaEmail(s,l),i("submit")}catch(d){be.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class u1 extends Ee{constructor(e){super(),Oe(this,e,a1,r1,De,{})}}function Eu(n){let e,t;return e=new ag({props:{$$slots:{default:[f1]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function f1(n){let e,t;return e=new u1({}),e.$on("submit",n[1]),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p:le,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function c1(n){let e,t,i=n[0]&&Eu(n);return{c(){i&&i.c(),e=xe()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Eu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(Pe(),P(i,1,1,()=>{i=null}),Le())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function d1(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){be.logout(!1),t(0,i=!0);return}be.authStore.isValid?yi("/collections"):be.logout()}return[i,async()=>{t(0,i=!1),await xn(),window.location.search=""}]}class p1 extends Ee{constructor(e){super(),Oe(this,e,d1,c1,De,{})}}const Rt=ei(""),go=ei("");function qo(n){const e=n-1;return e*e*e+1}function _o(n,{delay:e=0,duration:t=400,easing:i=pl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function jn(n,{delay:e=0,duration:t=400,easing:i=qo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>`
|
||||
transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px);
|
||||
opacity: ${a-f*d}`}}function en(n,{delay:e=0,duration:t=400,easing:i=qo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=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:m=>`overflow: hidden;opacity: ${Math.min(m*20,1)*l};height: ${m*o}px;padding-top: ${m*r}px;padding-bottom: ${m*a}px;margin-top: ${m*u}px;margin-bottom: ${m*f}px;border-top-width: ${m*c}px;border-bottom-width: ${m*d}px;`}}function qn(n,{delay:e=0,duration:t=400,easing:i=qo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>`
|
||||
transform: ${a} scale(${1-u*d});
|
||||
opacity: ${r-f*d}
|
||||
`}}function h1(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,o){w(l,e,o),n[13](e),Ce(e,n[7]),i||(s=G(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&Ce(e,l[7])},i:le,o:le,d(l){l&&k(e),n[13](null),i=!1,s()}}}function m1(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(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 o&&(e=new o(r(n)),ge.push(()=>Ne(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=xe()},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],He(()=>t=!1)),o!==(o=a[4])){if(e){Pe();const c=e;P(c.$$.fragment,1,0,()=>{z(c,1)}),Le()}o?(e=new o(r(a)),ge.push(()=>Ne(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function Au(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Pu();return{c(){r&&r.c(),e=T(),t=_("button"),t.innerHTML='<span class="txt">Clear</span>',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){r&&r.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(o=G(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Pu(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(Pe(),P(r,1,1,()=>{r=null}),Le())},i(a){s||(A(r),a&&Ot(()=>{i||(i=ot(t,jn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=ot(t,jn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,o()}}}function Pu(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Search</span>',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||(s&&Ot(()=>{t||(t=ot(e,jn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ot(e,jn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function g1(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[m1,h1],m=[];function g(b,y){return b[4]&&!b[5]?0:1}o=g(n),r=m[o]=d[o](n);let v=(n[0].length||n[7].length)&&Au(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=T(),r.c(),a=T(),v&&v.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,y){w(b,e,y),h(e,t),h(t,i),h(i,s),h(t,l),m[o].m(t,null),h(t,a),v&&v.m(t,null),u=!0,f||(c=[G(t,"submit",Yt(n[10])),G(e,"click",Xn(n[11]))],f=!0)},p(b,[y]){let $=o;o=g(b),o===$?m[o].p(b,y):(Pe(),P(m[$],1,1,()=>{m[$]=null}),Le(),r=m[o],r?r.p(b,y):(r=m[o]=d[o](b),r.c()),A(r,1),r.m(t,a)),b[0].length||b[7].length?v?(v.p(b,y),y&129&&A(v,1)):(v=Au(b),v.c(),A(v,1),v.m(t,null)):v&&(Pe(),P(v,1,1,()=>{v=null}),Le())},i(b){u||(A(r),A(v),u=!0)},o(b){P(r),P(v),u=!1},d(b){b&&k(e),m[o].d(),v&&v.d(),f=!1,Je(c)}}}function _1(n,e,t){const i=ln(),s="search_"+W.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new En}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function v(){u||f||(t(5,f=!0),t(4,u=(await Zi(()=>import("./FilterAutocompleteInput.92765a8b.js"),[],import.meta.url)).default),t(5,f=!1))}Un(()=>{v()});function b(M){at.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function $(M){ge[M?"unshift":"push"](()=>{c=M,t(6,c)})}function S(){d=this.value,t(7,d),t(0,l)}const C=()=>{m(!1),g()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,m,g,b,y,$,S,C]}class Vo extends Ee{constructor(e){super(),Oe(this,e,_1,g1,De,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let jr,Vi;const qr="app-tooltip";function Lu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ai(){return Vi=Vi||document.querySelector("."+qr),Vi||(Vi=document.createElement("div"),Vi.classList.add(qr),document.body.appendChild(Vi)),Vi}function ug(n,e){let t=Ai();if(!t.classList.contains("active")||!(e!=null&&e.text)){Vr();return}t.textContent=e.text,t.className=qr+" active",e.class&&t.classList.add(e.class),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?
Line truncated
|
||||
<span class="txt">method</span>`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function D1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="url",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function O1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="referer",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function E1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="status",p(t,"class",W.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function A1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function Iu(n){let e;function t(l,o){return l[6]?L1:P1}let i=t(n),s=i(n);return{c(){s.c(),e=xe()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function P1(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Nu(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No logs found.",s=T(),o&&o.c(),l=T(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),h(e,t),h(t,i),h(t,s),o&&o.m(t,null),h(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Nu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function L1(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
|
||||
`},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function Nu(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[18]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function Ru(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 Hu(n,e){var re,me,ve;let t,i,s,l=((re=e[21].method)==null?void 0:re.toUpperCase())+"",o,r,a,u,f,c=e[21].url+"",d,m,g,v,b,y,$=(e[21].referer||"N/A")+"",S,C,M,D,O,E=e[21].status+"",L,F,R,H,te,Q,j,X,U,Z,oe=(((me=e[21].meta)==null?void 0:me.errorMessage)||((ve=e[21].meta)==null?void 0:ve.errorData))&&Ru();H=new bi({props:{date:e[21].created}});function ae(){return e[16](e[21])}function Te(...Y){return e[17](e[21],...Y)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("span"),o=N(l),a=T(),u=_("td"),f=_("span"),d=N(c),g=T(),oe&&oe.c(),v=T(),b=_("td"),y=_("span"),S=N($),M=T(),D=_("td"),O=_("span"),L=N(E),F=T(),R=_("td"),B(H.$$.fragment),te=T(),Q=_("td"),Q.innerHTML='<i class="ri-arrow-right-line"></i>',j=T(),p(s,"class",r="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",m=e[21].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[21].referer),ie(y,"txt-hint",!e[21].referer),p(b,"class","col-type-text col-field-referer"),p(O,"class","label"),ie(O,"label-danger",e[21].status>=400),p(D,"class","col-type-number col-field-status"),p(R,"class","col-type-date col-field-created"),p(Q,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Y,Se){w(Y,t,Se),h(t,i),h(i,s),h(s,o),h(t,a),h(t,u),h(u,f),h(f,d),h(u,g),oe&&oe.m(u,null),h(t,v),h(t,b),h(b,y),h(y,S),h(t,M),h(t,D),h(D,O),h(O,L),h(t,F),h(t,R),V(H,R,null),h(t,te),h(t,Q),h(t,j),X=!0,U||(Z=[G(t,"click",ae),G(t,"keydown",Te)],U=!0)},p(Y,Se){var J,we,Re;e=Y,(!X||Se&8)&&l!==(l=((J=e[21].method)==null?void 0:J.toUpperCase())+"")&&he(o,l),(!X||Se&8&&r!==(r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&p(s,"class",r),(!X||Se&8)&&c!==(c=e[21].url+"")&&he(d,c),(!X||Se&8&&m!==(m=e[21].url))&&p(f,"title",m),((we=e[21].meta)==null?void 0:we.errorMessage)||((Re=e[21].meta)==null?void 0:Re.errorData)?oe||(oe=Ru(),oe.c(),oe.m(u,null)):oe&&(oe.d(1),oe=null),(!X||Se&8)&&$!==($=(e[21].referer||"N/A")+"")&&he(S,$),(!X||Se&8&&C!==(C=e[21].referer))&&p(y,"title",C),Se&8&&ie(y,"txt-hint",!e[21].referer),(!X||Se&8)&&E!==(E=e[21].status+"")&&he(L,E),Se&8&&ie(O,"label-danger",e[21].status>=400);const x={};Se&8&&(x.date=e[21].created),H.$set(x)},i(Y){X||(A(H.$$.fragment,Y),X=!0)},o(Y){P(H.$$.fragment,Y),X=!1},d(Y){Y&&k(t),oe&&oe.d(),z(H),U=!1,Je(Z)}}}function ju(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),h(e,t),h(e,s),h(e,l),h(e,o)},p(r,a){a&8&&i!==(i=r[3].length+"")&&he(s,i),a&16&&he(o,r[4])},d(r){r&&k(e)}}}function qu(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ie(t,"btn-loading",n[6]),ie(t,"btn-disabled",n[6]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),h(e,t),h(t,i),h(i,s),h(i,o),h(i,r),a||(u=G(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&he(o,l),c&64&&ie(t,"btn-loading",f[6]),c&64&&ie(t,"btn-disabled",f[6])},d(f){f&&k(e),a=!1,u()}}}function F1(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,$,S,C,M,D,O=[],E=new Map,L,F,R,H;function te(J){n[11](J)}let Q={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[T1]},$$scope:{ctx:n}};n[1]!==void 0&&(Q.sort=n[1]),l=new nn({props:Q}),ge.push(()=>Ne(l,"sort",te));function j(J){n[12](J)}let X={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[D1]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),a=new nn({props:X}),ge.push(()=>Ne(a,"sort",j));function U(J){n[13](J)}let Z={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[O1]},$$scope:{ctx:n}};n[1]!==void 0&&(Z.sort=n[1]),c=new nn({props:Z}),ge.push(()=>Ne(c,"sort",U));function oe(J){n[14](J)}let ae={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[E1]},$$scope:{ctx:n}};n[1]!==void 0&&(ae.sort=n[1]),g=new nn({props:ae}),ge.push(()=>Ne(g,"sort",oe));function Te(J){n[15](J)}let re={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[A1]},$$scope:{ctx:n}};n[1]!==void 0&&(re.sort=n[1]),y=new nn({props:re}),ge.push(()=>Ne(y,"sort",Te));let me=n[3];const ve=J=>J[21].id;for(let J=0;J<me.length;J+=1){let we=Fu(n,me,J),Re=ve(we);E.set(Re,O[J]=Hu(Re,we))}let Y=null;me.length||(Y=Iu(n))
Line truncated
|
||||
* Chart.js v3.9.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/function di(){}const R1=function(){let n=0;return function(){return n++}}();function Tt(n){return n===null||typeof n>"u"}function It(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function ft(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Wt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function Ln(n,e){return Wt(n)?n:e}function _t(n,e){return typeof n>"u"?e:n}const H1=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,fg=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function zt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function Dt(n,e,t,i){let s,l,o;if(It(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<l;s++)e.call(t,n[s],s);else if(ft(n))for(o=Object.keys(n),l=o.length,s=0;s<l;s++)e.call(t,n[o[s]],o[s])}function bo(n,e){let t,i,s,l;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],l=e[t],s.datasetIndex!==l.datasetIndex||s.index!==l.index)return!1;return!0}function vo(n){if(It(n))return n.map(vo);if(ft(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=vo(n[t[s]]);return e}return n}function cg(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function j1(n,e,t,i){if(!cg(n))return;const s=e[n],l=t[n];ft(s)&&ft(l)?ol(s,l,i):e[n]=vo(l)}function ol(n,e,t){const i=It(e)?e:[e],s=i.length;if(!ft(n))return n;t=t||{};const l=t.merger||j1;for(let o=0;o<s;++o){if(e=i[o],!ft(e))continue;const r=Object.keys(e);for(let a=0,u=r.length;a<u;++a)l(r[a],n,e,t)}return n}function Xs(n,e){return ol(n,e,{merger:q1})}function q1(n,e,t){if(!cg(n))return;const i=e[n],s=t[n];ft(i)&&ft(s)?Xs(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=vo(s))}const Vu={"":n=>n,x:n=>n.x,y:n=>n.y};function Li(n,e){return(Vu[e]||(Vu[e]=V1(e)))(n)}function V1(n){const e=z1(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function z1(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function ya(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Vn=n=>typeof n<"u",Fi=n=>typeof n=="function",zu=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function B1(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ut=Math.PI,Et=2*Ut,U1=Et+Ut,yo=Number.POSITIVE_INFINITY,W1=Ut/180,Bt=Ut/2,Ns=Ut/4,Bu=Ut*2/3,Rn=Math.log10,li=Math.sign;function Uu(n){const e=Math.round(n);n=Qs(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Rn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function Y1(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,l)=>s-l).pop(),e}function ws(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Qs(n,e,t){return Math.abs(n-e)<t}function K1(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function dg(n,e,t){let i,s,l;for(i=0,s=n.length;i<s;i++)l=n[i][t],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function Zn(n){return n*(Ut/180)}function ka(n){return n*(180/Ut)}function Wu(n){if(!Wt(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function pg(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let l=Math.atan2(i,t);return l<-.5*Ut&&(l+=Et),{angle:l,distance:s}}function zr(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function Z1(n,e){return(n-e+U1)%Et-Ut}function Sn(n){return(n%Et+Et)%Et}function rl(n,e,t,i){const s=Sn(n),l=Sn(e),o=Sn(t),r=Sn(l-s),a=Sn(o-s),u=Sn(s-l),f=Sn(s-o);return s===l||s===o||i&&l===o||r>a&&u<f}function an(n,e,t){return Math.max(e,Math.min(t,n))}function J1(n){return an(n,-32768,32767)}function al(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function wa(n,e,t){t=t||(o=>n[o]<e);let i=n.length-1,s=0,l;for(;i-s>1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const Gi=(n,e,t,i)=>wa(n,t,i?s=>n[s][e]<=t:s=>n[s][e]<t),G1=(n,e,t)=>wa(n,t,i=>n[i][e]>=t);function X1(n,e,t){let i=0,s=n.length;for(;i<s&&n[i]<e;)i++;for(;s>i&&n[s-1]>t;)s--;return i>0||s<n.length?n.slice(i,s):n}const hg=["push","pop","shift","splice","unshift"];function Q1(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),hg.forEach(t=>{const i="_onData"+ya(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function Yu(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(hg.forEach(l=>{delete n[l]}),delete n._chartjs)}function mg(n){const e=new Set;let t,i;for(t=0,i=n.length;t<i;++t)e.add(n[t]);return e.size===i?n:Array.from(e)}const gg=function(){return typeof window>"u"?function(n){return n()}:window.requestLine truncated
|
||||
* @kurkle/color v0.2.1
|
||||
* https://github.com/kurkle/color#readme
|
||||
* (c) 2022 Jukka Kurkela
|
||||
* Released under the MIT License
|
||||
*/function vl(n){return n+.5|0}const Oi=(n,e,t)=>Math.max(Math.min(n,t),e);function Ys(n){return Oi(vl(n*2.55),0,255)}function Pi(n){return Oi(vl(n*255),0,255)}function mi(n){return Oi(vl(n/2.55)/100,0,1)}function Gu(n){return Oi(vl(n*100),0,100)}const Pn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Br=[..."0123456789ABCDEF"],tv=n=>Br[n&15],nv=n=>Br[(n&240)>>4]+Br[n&15],Hl=n=>(n&240)>>4===(n&15),iv=n=>Hl(n.r)&&Hl(n.g)&&Hl(n.b)&&Hl(n.a);function sv(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Pn[n[1]]*17,g:255&Pn[n[2]]*17,b:255&Pn[n[3]]*17,a:e===5?Pn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Pn[n[1]]<<4|Pn[n[2]],g:Pn[n[3]]<<4|Pn[n[4]],b:Pn[n[5]]<<4|Pn[n[6]],a:e===9?Pn[n[7]]<<4|Pn[n[8]]:255})),t}const lv=(n,e)=>n<255?e(n):"";function ov(n){var e=iv(n)?tv:nv;return n?"#"+e(n.r)+e(n.g)+e(n.b)+lv(n.a,e):void 0}const rv=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function yg(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function av(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function uv(n,e,t){const i=yg(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function fv(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function Sa(n){const t=n.r/255,i=n.g/255,s=n.b/255,l=Math.max(t,i,s),o=Math.min(t,i,s),r=(l+o)/2;let a,u,f;return l!==o&&(f=l-o,u=r>.5?f/(2-l-o):f/(l+o),a=fv(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function $a(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Pi)}function Ca(n,e,t){return $a(yg,n,e,t)}function cv(n,e,t){return $a(uv,n,e,t)}function dv(n,e,t){return $a(av,n,e,t)}function kg(n){return(n%360+360)%360}function pv(n){const e=rv.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Ys(+e[5]):Pi(+e[5]));const s=kg(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=cv(s,l,o):e[1]==="hsv"?i=dv(s,l,o):i=Ca(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function hv(n,e){var t=Sa(n);t[0]=kg(t[0]+e),t=Ca(t),n.r=t[0],n.g=t[1],n.b=t[2]}function mv(n){if(!n)return;const e=Sa(n),t=e[0],i=Gu(e[1]),s=Gu(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${mi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Xu={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Qu={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function gv(){const n={},e=Object.keys(Qu),t=Object.keys(Xu);let i,s,l,o,r;for(i=0;i<e.length;i++){for(o=r=e[i],s=0;s<t.length;s++)l=t[s]Line truncated
|
||||
* Chart.js v3.9.1
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/class by{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],o=t.duration;l.forEach(r=>r({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=gg.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var pi=new by;const cf="transparent",vy={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=ef(n||cf),s=i.valid&&ef(e||cf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class yy{constructor(e,t,i,s){const l=t[i];s=Vl([e.to,s,l,e.from]);const o=Vl([e.from,l,s]);this._active=!0,this._fn=e.fn||vy[e.type||typeof o],this._easing=xs[e.easing]||xs.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Vl([e.to,t,s,e.from]),this._from=Vl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t<i),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}}const ky=["x","y","borderWidth","radius","tension"],wy=["color","borderColor","backgroundColor"];bt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const Sy=Object.keys(bt.animation);bt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});bt.set("animations",{colors:{type:"color",properties:wy},numbers:{type:"number",properties:ky}});bt.describe("animations",{_fallback:"animation"});bt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class Ng{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!ft(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!ft(s))return;const l={};for(const o of Sy)l[o]=s[o];(It(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=Cy(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&$y(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new yy(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return pi.add(this._chart,i),!0}}function $y(n,e){const t=[]Line truncated
|
||||
`)>-1?n.split(`
|
||||
`):n}function jw(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function zf(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=$n(e.bodyFont),u=$n(e.titleFont),f=$n(e.footerFont),c=l.length,d=s.length,m=i.length,g=zn(e.padding);let v=g.height,b=0,y=i.reduce((C,M)=>C+M.before.length+M.lines.length+M.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(v+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;v+=m*C+(y-m)*a.lineHeight+(y-1)*e.bodySpacing}d&&(v+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let $=0;const S=function(C){b=Math.max(b,t.measureText(C).width+$)};return t.save(),t.font=u.string,Dt(n.title,S),t.font=a.string,Dt(n.beforeBody.concat(n.afterBody),S),$=e.displayColors?o+2+e.boxPadding:0,Dt(i,C=>{Dt(C.before,S),Dt(C.lines,S),Dt(C.after,S)}),$=0,t.font=f.string,Dt(n.footer,S),t.restore(),b+=g.width,{width:b,height:v}}function qw(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function Vw(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function zw(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),Vw(u,n,e,t)&&(u="center"),u}function Bf(n,e,t){const i=t.yAlign||e.yAlign||qw(n,t);return{xAlign:t.xAlign||e.xAlign||zw(n,e,t,i),yAlign:i}}function Bw(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function Uw(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function Uf(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:m}=_s(o);let g=Bw(e,r);const v=Uw(e,a,u);return a==="center"?r==="left"?g+=u:r==="right"&&(g-=u):r==="left"?g-=Math.max(f,d)+s:r==="right"&&(g+=Math.max(c,m)+s),{x:an(g,0,i.width-e.width),y:an(v,0,i.height-e.height)}}function Zl(n,e,t){const i=zn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function Wf(n){return ni([],hi(n))}function Ww(n,e,t){return Ii(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Yf(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class Qr extends wi{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new Ng(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=Ww(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=ni(r,hi(s)),r=ni(r,hi(l)),r=ni(r,hi(o)),r}getBeforeBody(e,t){return Wf(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return Dt(e,l=>{const o={before:[],lines:[],after:[]},r=Yf(i,l);ni(o.before,hi(r.beforeLabel.call(this,l))),ni(o.lines,r.label.call(this,l)),ni(o.after,hi(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return Wf(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=ni(r,hi(s)),r=ni(r,hi(l)),r=ni(r,hi(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;a<u;++a)r.push(jw(this.chart,t[a]));return e.filter&&(r=r.filter((f,c,d)=>e.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),Dt(r,f=>{const c=Yf(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;l
Line truncated
|
||||
* chartjs-adapter-luxon v1.2.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 chartjs-adapter-luxon Contributors
|
||||
* Released under the MIT license
|
||||
*/const d2={datetime:Ze.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Ze.TIME_WITH_SECONDS,minute:Ze.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};Vg._date.override({_id:"luxon",_create:function(n){return Ze.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return d2},parse:function(n,e){const t=this.options,i=typeof n;return n===null||i==="undefined"?null:(i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Ze.fromFormat(n,e,t):n=Ze.fromISO(n,t):n instanceof Date?n=Ze.fromJSDate(n,t):i==="object"&&!(n instanceof Ze)&&(n=Ze.fromObject(n,t)),n.isValid?n.valueOf():null)},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e):t.toLocaleString(e)},add:function(n,e,t){const i={};return i[t]=e,this._create(n).plus(i).valueOf()},diff:function(n,e,t){return this._create(n).diff(this._create(e)).as(t).valueOf()},startOf:function(n,e,t){if(e==="isoWeek"){t=Math.trunc(Math.min(Math.max(0,t),6));const i=this._create(n);return i.minus({days:(i.weekday-t+7)%7}).startOf("day").valueOf()}return e?this._create(n).startOf(e).valueOf():n},endOf:function(n,e){return this._create(n).endOf(e).valueOf()}});function ec(n){let e,t,i;return{c(){e=_("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Ot(()=>{t||(t=ot(e,qn,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ot(e,qn,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function p2(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=N(n[1]),t=T(),s=N(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&he(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&he(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function h2(n){let e;return{c(){e=N("Loading...")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function m2(n){let e,t,i,s,l,o=n[2]&&ec();function r(f,c){return f[2]?h2:p2}let a=r(n),u=a(n);return{c(){e=_("div"),o&&o.c(),t=T(),i=_("canvas"),s=T(),l=_("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Ja(i,"height","250px"),Ja(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),ie(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){w(f,e,c),o&&o.m(e,null),h(e,t),h(e,i),n[8](i),w(f,s,c),w(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&A(o,1):(o=ec(),o.c(),A(o,1),o.m(e,t)):o&&(Pe(),P(o,1,1,()=>{o=null}),Le()),c&4&&ie(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(o)},o(f){P(o)},d(f){f&&k(e),o&&o.d(),n[8](null),f&&k(s),f&&k(l),u.d()}}}function g2(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),be.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{c();for(let g of m)r.push({x:W.getDateTime(g.date).toLocal().toJSDate(),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(c(),console.warn(m),be.errorResponseHandler(m,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Un(()=>(Do.register(Ni,Yo,Uo,Va,Sl,Hw,Yw),t(6,o=new Do(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:m=>m.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:m=>m.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(m){ge[m?"unshift":"push"](()=>{l=m,t(0,l)})}return n.$$set=m=>{"filter"in m&&t(3,i=m.filter),"presets"in m&&t(4,s=m.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class _2 extends Ee{constructor(e){super(),Oe(this,e,g2,m2,De,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var tc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r_={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
||||
* Prism: Lightweight, robust, elegant syntax highlighting
|
||||
*
|
||||
* @license MIT <https://opensource.org/licenses/MIT>
|
||||
* @author Lea Verou <https://lea.verou.me>
|
||||
* @namespace
|
||||
* @public
|
||||
*/var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function $(S){return S instanceof a?new a(S.type,$(S.content),S.alias):Array.isArray(S)?S.map($):S.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function($){return Object.prototype.toString.call($).slice(8,-1)},objId:function($){return $.__id||Object.defineProperty($,"__id",{value:++l}),$.__id},clone:function $(S,C){C=C||{};var M,D;switch(r.util.type(S)){case"Object":if(D=r.util.objId(S),C[D])return C[D];M={},C[D]=M;for(var O in S)S.hasOwnProperty(O)&&(M[O]=$(S[O],C));return M;case"Array":return D=r.util.objId(S),C[D]?C[D]:(M=[],C[D]=M,S.forEach(function(E,L){M[L]=$(E,C)}),M);default:return S}},getLanguage:function($){for(;$;){var S=s.exec($.className);if(S)return S[1].toLowerCase();$=$.parentElement}return"none"},setLanguage:function($,S){$.className=$.className.replace(RegExp(s,"gi"),""),$.classList.add("language-"+S)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var $=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if($){var S=document.getElementsByTagName("script");for(var C in S)if(S[C].src==$)return S[C]}return null}},isActive:function($,S,C){for(var M="no-"+S;$;){var D=$.classList;if(D.contains(S))return!0;if(D.contains(M))return!1;$=$.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function($,S){var C=r.util.clone(r.languages[$]);for(var M in S)C[M]=S[M];return C},insertBefore:function($,S,C,M){M=M||r.languages;var D=M[$],O={};for(var E in D)if(D.hasOwnProperty(E)){if(E==S)for(var L in C)C.hasOwnProperty(L)&&(O[L]=C[L]);C.hasOwnProperty(E)||(O[E]=D[E])}var F=M[$];return M[$]=O,r.languages.DFS(r.languages,function(R,H){H===F&&R!=$&&(this[R]=O)}),O},DFS:function $(S,C,M,D){D=D||{};var O=r.util.objId;for(var E in S)if(S.hasOwnProperty(E)){C.call(S,E,S[E],M||E);var L=S[E],F=r.util.type(L);F==="Object"&&!D[O(L)]?(D[O(L)]=!0,$(L,C,null,D)):F==="Array"&&!D[O(L)]&&(D[O(L)]=!0,$(L,C,E,D))}}},plugins:{},highlightAll:function($,S){r.highlightAllUnder(document,$,S)},highlightAllUnder:function($,S,C){var M={callback:C,container:$,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),r.hooks.run("before-all-elements-highlight",M);for(var D=0,O;O=M.elements[D++];)r.highlightElement(O,S===!0,M.callback)},highlightElement:function($,S,C){var M=r.util.getLanguage($),D=r.languages[M];r.util.setLanguage($,M);var O=$.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,M);var E=$.textContent,L={element:$,language:M,grammar:D,code:E};function F(H){L.highlightedCode=H,r.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,r.hooks.run("after-highlight",L),r.hooks.run("complete",L),C&&C.call(L.element)}if(r.hooks.run("before-sanity-check",L),O=L.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!L.code){r.hooks.run("complete",L),C&&C.call(L.element);return}if(r.hooks.run("before-highlight",L),!L.grammar){F(r.util.encode(L.code));return}if(S&&i.Worker){var R=new Worker(r.filename);R.onmessage=function(H){F(H.data)},R.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else F(r.highlight(L.code,L.grammar,L.language))},highlight:function($,S,C){var M={code:$,grammar:S,language:C};if(r.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=r.tokenize(M.code,M.grammar),r.hooks.run("after-tokenize",M),a.stringify(r.util.encode(M.tokens),M.language)},tokenize:function($,S){var C=S.rest;if(C){for(var M in C)S[M]=C[M];delete S.rest}var D=new c;return d(D,D.head,$),f($,D,S,D.head,0),g(D)},hooks:{all:{},add:function($,S){var C=r.hooks.all;C[$]=C[$]||[],C[$].push(S)},run:function($,S){var C=r.hooks.all[$];if(!(!C||!C.length))for(var M=0,D;D=C[M++];)D(S)}},Token:a};i.Prism=r;function a($,S,C,M){this.type=$,this.content=S,this.alias=C,this.length=(M||"").length|0}a.stringify=function $(S,C){if(typeof S=="string")return S;if(Array.isArray(S)){var M="";return S.forEach(function(F){M+=$(F,C)}),M}var D={type:S.type,content:$(S.content,C),tag:"span",classes:["token",S.type],attributes:{},language:C},O=S.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(D.classes,O):D.classes.push(O)),r.hooks.run("wrap",D);var E="";for(var L in D.attributes)E+=" "+L+'="'+(D.attributes[L]||"").replace(/"/g,""")+'"';return"<"+D.tag+' class="'+D.classes.join(" ")+'"'+E+">"+D.content+"</"+D.tag+">"};function u($,S,C,M){$.lastIndex=S;var D=$.exec(C);if(D&&M&&D[1]){var O=D[1].length;D.index+=O,D[0]=D[0].slice(O)}return D}funLine truncated
|
||||
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}y.textContent=D,t.highlightElement(y)},function(D){b.setAttribute(r,f),y.textContent=D})}}),t.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(c),$=0,S;S=y[$++];)t.highlightElement(S)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(r_);const zs=r_.exports;var b2={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(l,o){for(var r in o)o.hasOwnProperty(r)&&(l[r]=o[r]);return l};function t(l){this.defaults=e({},l)}function i(l){return l.replace(/-(\w)/g,function(o,r){return r.toUpperCase()})}function s(l){for(var o=0,r=0;r<l.length;++r)l.charCodeAt(r)==" ".charCodeAt(0)&&(o+=3);return l.length+o}t.prototype={setDefaults:function(l){this.defaults=e(this.defaults,l)},normalize:function(l,o){o=e(this.defaults,o);for(var r in o){var a=i(r);r!=="normalize"&&a!=="setDefaults"&&o[r]&&this[a]&&(l=this[a].call(this,l,o[r]))}return l},leftTrim:function(l){return l.replace(/^\s+/,"")},rightTrim:function(l){return l.replace(/\s+$/,"")},tabsToSpaces:function(l,o){return o=o|0||4,l.replace(/\t/g,new Array(++o).join(" "))},spacesToTabs:function(l,o){return o=o|0||4,l.replace(RegExp(" {"+o+"}","g")," ")},removeTrailing:function(l){return l.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(l){return l.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(l){var o=l.match(/^[^\S\n\r]*(?=\S)/gm);return!o||!o[0].length||(o.sort(function(r,a){return r.length-a.length}),!o[0].length)?l:l.replace(RegExp("^"+o[0],"gm"),"")},indent:function(l,o){return l.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++o).join(" ")+"$&")},breakLines:function(l,o){o=o===!0?80:o|0||80;for(var r=l.split(`
|
||||
`),a=0;a<r.length;++a)if(!(s(r[a])<=o)){for(var u=r[a].split(/(\s+)/g),f=0,c=0;c<u.length;++c){var d=s(u[c]);f+=d,f>o&&(u[c]=`
|
||||
`+u[c],f=d)}r[a]=u.join("")}return r.join(`
|
||||
`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(l){var o=Prism.plugins.NormalizeWhitespace;if(!(l.settings&&l.settings["whitespace-normalization"]===!1)&&!!Prism.util.isActive(l.element,"whitespace-normalization",!0)){if((!l.element||!l.element.parentNode)&&l.code){l.code=o.normalize(l.code,l.settings);return}var r=l.element.parentNode;if(!(!l.code||!r||r.nodeName.toLowerCase()!=="pre")){for(var a=r.childNodes,u="",f="",c=!1,d=0;d<a.length;++d){var m=a[d];m==l.element?c=!0:m.nodeName==="#text"&&(c?f+=m.nodeValue:u+=m.nodeValue,r.removeChild(m),--d)}if(!l.element.children.length||!Prism.plugins.KeepMarkup)l.code=u+l.code+f,l.code=o.normalize(l.code,l.settings);else{var g=u+l.element.innerHTML+f;l.element.innerHTML=o.normalize(g,l.settings),l.code=l.element.textContent}}}})})()})(b2);(function(n){var e=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};n.languages.dart=n.languages.extend("clike",{"class-name":[i,{pattern:RegExp(t+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:i.inside}],keyword:e,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function v2(n){let e,t,i;return{c(){e=_("div"),t=_("code"),p(t,"class","svelte-1ua9m3i"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-1ua9m3i")},m(s,l){w(s,e,l),h(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-1ua9m3i")&&p(e,"class",i)},i:le,o:le,d(s){s&&k(e)}}}function y2(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=zs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),zs.highlight(a,zs.languages[l]||zs.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof zs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class hn extends Ee{constructor(e){super(),Oe(this,e,y2,v2,De,{class:0,content:2,language:3})}}const k2=n=>({}),nc=n=>({}),w2=n=>({}),ic=n=>({});function sc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,$,S=n[4]&&!n[2]&&lc(n);const C=n[18].header,M=Cn(C,n,n[17],ic);let D=n[4]&&n[2]&&oc(n);const O=n[18].default,E=Cn(O,n,n[17],null),L=n[18].footer,F=Cn(L,n,n[17],nc);return{c(){e=_("div"),t=_("div"),s=T(),l=_("div"),o=_("div"),S&&S.c(),r=T(),M&&M.c(),a=T(),D&&D.c(),u=T(),f=_("div"),E&&E.c(),c=T(),d=_("div"),F&&F.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",m="overlay-panel "+n[1]+" "+n[8]),ie(l,"popup",n[2]),p(e,"class","overlay-panel-container"),ie(e,"padded",n[2]),ie(e,"active",n[0])},m(R,H){w(R,e,H),h(e,t),h(e,s),h(e,l),h(l,o),S&&S.m(o,null),h(o,r),M&&M.m(o,null),h(o,a),D&&D.m(o,null),h(l,u),h(l,f),E&&E.m(f,null),n[20](f),h(l,c),h(l,d),F&&F.m(d,null),b=!0,y||($=[G(t,"click",Yt(n[19])),G(f,"scroll",n[21])],y=!0)},p(R,H){n=R,n[4]&&!n[2]?S?S.p(n,H):(S=lc(n),S.c(),S.m(o,r)):S&&(S.d(1),S=null),M&&M.p&&(!b||H&131072)&&Tn(M,C,n,n[17],b?Mn(C,n[17],H,w2):Dn(n[17]),ic),n[4]&&n[2]?D?D.p(n,H):(D=oc(n),D.c(),D.m(o,null)):D&&(D.d(1),D=null),E&&E.p&&(!b||H&131072)&&Tn(E,O,n,n[17],b?Mn(O,n[17],H,null):Dn(n[17]),null),F&&F.p&&(!b||H&131072)&&Tn(F,L,n,n[17],b?Mn(L,n[17],H,k2):Dn(n[17]),nc),(!b||H&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",m),H&262&&ie(l,"popup",n[2]),H&4&&ie(e,"padded",n[2]),H&1&&ie(e,"active",n[0])},i(R){b||(Ot(()=>{i||(i=ot(t,_o,{duration:hs,opacity:0},!0)),i
Line truncated
|
||||
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]))&&p(e,"for",l);const $={};y&16&&($.id=b[4]),y&1&&($.disabled=!W.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,$.value=b[0].exceptDomains,He(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function DS(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function g(b){n[3](b)}let v={id:n[4]+".options.onlyDomains",disabled:!W.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new as({props:v}),ge.push(()=>Ne(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(b,y){w(b,e,y),h(e,t),h(e,i),h(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Ue(Ct.call(null,s,{text:`List of domains that are ONLY allowed.
|
||||
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]+".options.onlyDomains"))&&p(e,"for",l);const $={};y&16&&($.id=b[4]+".options.onlyDomains"),y&1&&($.disabled=!W.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,$.value=b[0].onlyDomains,He(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function OS(n){let e,t,i,s,l,o,r;return i=new Ie({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[TS,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[DS,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),h(e,t),V(i,t,null),h(e,s),h(e,l),V(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&k(e),z(i),z(o)}}}function ES(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class c_ extends Ee{constructor(e){super(),Oe(this,e,ES,OS,De,{key:1,options:0})}}function AS(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new c_({props:r}),ge.push(()=>Ne(e,"key",l)),ge.push(()=>Ne(e,"options",o)),{c(){B(e.$$.fragment)},m(a,u){V(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],He(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],He(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){z(e,a)}}}function PS(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class LS extends Ee{constructor(e){super(),Oe(this,e,PS,AS,De,{key:0,options:1})}}var yr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],bs={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},cl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to togg
Line truncated
|
||||
<span class='flatpickr-weekday'>
|
||||
`+q.join("</span><span class='flatpickr-weekday'>")+`
|
||||
</span>
|
||||
`}}function ae(){t.calendarContainer.classList.add("hasWeeks");var I=$t("div","flatpickr-weekwrapper");I.appendChild($t("span","flatpickr-weekday",t.l10n.weekAbbreviation));var q=$t("div","flatpickr-weeks");return I.appendChild(q),{weekWrapper:I,weekNumbers:q}}function Te(I,q){q===void 0&&(q=!0);var ee=q?I:I-t.currentMonth;ee<0&&t._hidePrevMonthArrow===!0||ee>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ee,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,We("onYearChange"),te()),H(),We("onMonthChange"),rt())}function re(I,q){if(I===void 0&&(I=!0),q===void 0&&(q=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,q===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ee=$r(t.config),ue=ee.hours,Ae=ee.minutes,se=ee.seconds;m(ue,Ae,se)}t.redraw(),I&&We("onChange")}function me(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),We("onClose")}function ve(){t.config!==void 0&&We("onDestroy");for(var I=t._handlers.length;I--;)t._handlers[I].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var q=t.calendarContainer.parentNode;if(q.lastChild&&q.removeChild(q.lastChild),q.parentNode){for(;q.firstChild;)q.parentNode.insertBefore(q.firstChild,q);q.parentNode.removeChild(q)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ee){try{delete t[ee]}catch{}})}function Y(I){return t.calendarContainer.contains(I)}function Se(I){if(t.isOpen&&!t.config.inline){var q=kn(I),ee=Y(q),ue=q===t.input||q===t.altInput||t.element.contains(q)||I.path&&I.path.indexOf&&(~I.path.indexOf(t.input)||~I.path.indexOf(t.altInput)),Ae=!ue&&!ee&&!Y(I.relatedTarget),se=!t.config.ignoredFocusElements.some(function(ye){return ye.contains(q)});Ae&&se&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function x(I){if(!(!I||t.config.minDate&&I<t.config.minDate.getFullYear()||t.config.maxDate&&I>t.config.maxDate.getFullYear())){var q=I,ee=t.currentYear!==q;t.currentYear=q||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ee&&(t.redraw(),We("onYearChange"),te())}}function J(I,q){var ee;q===void 0&&(q=!0);var ue=t.parseDate(I,void 0,q);if(t.config.minDate&&ue&&wn(ue,t.config.minDate,q!==void 0?q:!t.minDateHasTime)<0||t.config.maxDate&&ue&&wn(ue,t.config.maxDate,q!==void 0?q:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(ue===void 0)return!1;for(var Ae=!!t.config.enable,se=(ee=t.config.enable)!==null&&ee!==void 0?ee:t.config.disable,ye=0,Me=void 0;ye<se.length;ye++){if(Me=se[ye],typeof Me=="function"&&Me(ue))return Ae;if(Me instanceof Date&&ue!==void 0&&Me.getTime()===ue.getTime())return Ae;if(typeof Me=="string"){var fe=t.parseDate(Me,void 0,!0);return fe&&fe.getTime()===ue.getTime()?Ae:!Ae}else if(typeof Me=="object"&&ue!==void 0&&Me.from&&Me.to&&ue.getTime()>=Me.from.getTime()&&ue.getTime()<=Me.to.getTime())return Ae}return!Ae}function we(I){return t.daysContainer!==void 0?I.className.indexOf("hidden")===-1&&I.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(I):!1}function Re(I){var q=I.target===t._input,ee=t._input.value.trimEnd()!==Pt();q&&ee&&!(I.relatedTarget&&Y(I.relatedTarget))&&t.setDate(t._input.value,!0,I.target===t.altInput?t.config.altFormat:t.config.dateFormat)}func
Line truncated
|
||||
`),d=_("span"),m=_("span"),m.textContent="Choose presets",g=T(),B(v.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(m,"class","txt link-primary"),p(d,"class","inline-flex"),p(f,"class","help-block")},m(M,D){w(M,e,D),h(e,t),h(e,i),h(e,s),w(M,o,D),V(r,M,D),w(M,u,D),w(M,f,D),h(f,c),h(f,d),h(d,m),h(d,g),V(v,d,null),b=!0,y||($=Ue(Ct.call(null,s,{text:`Allow files ONLY with the listed mime types.
|
||||
Leave empty for no restriction.`,position:"top"})),y=!0)},p(M,D){(!b||D&1024&&l!==(l=M[10]))&&p(e,"for",l);const O={};D&1024&&(O.id=M[10]),!a&&D&1&&(a=!0,O.value=M[0].mimeTypes,He(()=>a=!1)),r.$set(O);const E={};D&2049&&(E.$$scope={dirty:D,ctx:M}),v.$set(E)},i(M){b||(A(r.$$.fragment,M),A(v.$$.fragment,M),b=!0)},o(M){P(r.$$.fragment,M),P(v.$$.fragment,M),b=!1},d(M){M&&k(e),M&&k(o),z(r,M),M&&k(u),M&&k(f),z(v),y=!1,$()}}}function o$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function g(b){n[9](b)}let v={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(v.value=n[0].thumbs),r=new as({props:v}),ge.push(()=>Ne(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Thumb sizes",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(f,"class","help-block")},m(b,y){w(b,e,y),h(e,t),h(e,i),h(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Ue(Ct.call(null,s,{text:"List of thumb sizes for image files. The thumbs will be generated lazily on first access.",position:"top"})),d=!0)},p(b,y){(!c||y&1024&&l!==(l=b[10]))&&p(e,"for",l);const $={};y&1024&&($.id=b[10]),!a&&y&1&&(a=!0,$.value=b[0].thumbs,He(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function r$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return i=new Ie({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[n$,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[i$,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),u=new Ie({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[l$,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),d=new Ie({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[o$,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),f=T(),c=_("div"),B(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(g,v){w(g,e,v),h(e,t),V(i,t,null),h(e,s),h(e,l),V(o,l,null),h(e,r),h(e,a),V(u,a,null),h(e,f),h(e,c),V(d,c,null),m=!0},p(g,[v]){const b={};v&2&&(b.name="schema."+g[1]+".options.maxSize"),v&3073&&(b.$$scope={dirty:v,ctx:g}),i.$set(b);const y={};v&2&&(y.name="schema."+g[1]+".options.maxSelect"),v&3073&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const $={};v&2&&($.name="schema."+g[1]+".options.mimeTypes"),v&3073&&($.$$scope={dirty:v,ctx:g}),u.$set($);const S={};v&2&&(S.name="schema."+g[1]+".options.thumbs"),v&3073&&(S.$$scope={dirty:v,ctx:g}),d.$set(S)},i(g){m||(A(i.$$.fragment,g),A(o.$$.fragment,g),A(u.$$.fragment,g),A(d.$$.fragment,g),m=!0)},o(g){P(i.$$.fragment,g),P(o.$$.fragment,g),P(u.$$.fragment,g),P(d.$$.fragment,g),m=!1},d(g){g&&k(e),z(i),z(o),z(u),z(d)}}}function a$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=At(this.value),t(0,s)}function o(){s.maxSelect=At(this.value),t(0,s)}function r(m){n.$$.not_equal(s.mimeTypes,m)&&(s.mimeTypes=m,t(0,s))}const a=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(m){n.$$.not_equal(s.thumbs,m)&&(s.thumbs=m,t(0,s))}return n.$$set=m=>{"key"in m&&t(1,i=m.key),"options"in m&&t(0,s=m.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class u$ extends Ee{constructor(e){super(),Oe(this,e,a$,r$,De,{key:1,options:0})}}function f$(n){let e,t,i,s,l,o,r;function a(f){n[5](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3]};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new rs({props:u}),ge.push(()=>Ne(l,"keyOfSelected",a)),{c(){e=_("label"),t=N("Collection"),s=T(),B(l.$$.fragment),p(e,"for",i=n[9])},m(f,c){w(f,e,c),h(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&512&&i!==(i=f[9]))&&p(e,"for",i);const d={};c&8&&(d.searchable=f[3].length>5),c&4&&(d.selectPlaceholder=f[2]?"Loading...":"Select collection"),c&8&&(d.items=f[3]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,He(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=
Line truncated
|
||||
form-field
|
||||
required
|
||||
`+(n[5]?"":"invalid")+`
|
||||
`+(n[0].id&&n[0].system?"disabled":"")+`
|
||||
`,name:"schema."+n[1]+".name",$$slots:{default:[w$,({uniqueId:H})=>({38:H}),({uniqueId:H})=>[0,H?128:0]]},$$scope:{ctx:n}}});const O=[L$,P$,A$,E$,O$,D$,T$,M$,C$,$$,S$],E=[];function L(H,te){return H[0].type==="text"?0:H[0].type==="number"?1:H[0].type==="bool"?2:H[0].type==="email"?3:H[0].type==="url"?4:H[0].type==="date"?5:H[0].type==="select"?6:H[0].type==="json"?7:H[0].type==="file"?8:H[0].type==="relation"?9:H[0].type==="user"?10:-1}~(f=L(n))&&(c=E[f]=O[f](n)),g=new Ie({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[F$,({uniqueId:H})=>({38:H}),({uniqueId:H})=>[0,H?128:0]]},$$scope:{ctx:n}}});let F=n[0].type!=="file"&&Lc(n),R=!n[0].toDelete&&Fc(n);return{c(){e=_("form"),t=_("div"),i=_("div"),B(s.$$.fragment),l=T(),o=_("div"),B(r.$$.fragment),a=T(),u=_("div"),c&&c.c(),d=T(),m=_("div"),B(g.$$.fragment),v=T(),b=_("div"),F&&F.c(),y=T(),R&&R.c(),$=T(),S=_("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(m,"class","col-sm-4 flex"),p(b,"class","col-sm-4 flex"),p(t,"class","grid"),p(S,"type","submit"),p(S,"class","hidden"),p(S,"tabindex","-1"),p(e,"class","field-form")},m(H,te){w(H,e,te),h(e,t),h(t,i),V(s,i,null),h(t,l),h(t,o),V(r,o,null),h(t,a),h(t,u),~f&&E[f].m(u,null),h(t,d),h(t,m),V(g,m,null),h(t,v),h(t,b),F&&F.m(b,null),h(t,y),R&&R.m(t,null),h(e,$),h(e,S),C=!0,M||(D=G(e,"submit",Yt(n[31])),M=!0)},p(H,te){const Q={};te[0]&1&&(Q.class="form-field required "+(H[0].id?"disabled":"")),te[0]&2&&(Q.name="schema."+H[1]+".type"),te[0]&1|te[1]&384&&(Q.$$scope={dirty:te,ctx:H}),s.$set(Q);const j={};te[0]&33&&(j.class=`
|
||||
form-field
|
||||
required
|
||||
`+(H[5]?"":"invalid")+`
|
||||
`+(H[0].id&&H[0].system?"disabled":"")+`
|
||||
`),te[0]&2&&(j.name="schema."+H[1]+".name"),te[0]&33|te[1]&384&&(j.$$scope={dirty:te,ctx:H}),r.$set(j);let X=f;f=L(H),f===X?~f&&E[f].p(H,te):(c&&(Pe(),P(E[X],1,1,()=>{E[X]=null}),Le()),~f?(c=E[f],c?c.p(H,te):(c=E[f]=O[f](H),c.c()),A(c,1),c.m(u,null)):c=null);const U={};te[0]&1|te[1]&384&&(U.$$scope={dirty:te,ctx:H}),g.$set(U),H[0].type!=="file"?F?(F.p(H,te),te[0]&1&&A(F,1)):(F=Lc(H),F.c(),A(F,1),F.m(b,null)):F&&(Pe(),P(F,1,1,()=>{F=null}),Le()),H[0].toDelete?R&&(Pe(),P(R,1,1,()=>{R=null}),Le()):R?(R.p(H,te),te[0]&1&&A(R,1)):(R=Fc(H),R.c(),A(R,1),R.m(t,null))},i(H){C||(A(s.$$.fragment,H),A(r.$$.fragment,H),A(c),A(g.$$.fragment,H),A(F),A(R),C=!0)},o(H){P(s.$$.fragment,H),P(r.$$.fragment,H),P(c),P(g.$$.fragment,H),P(F),P(R),C=!1},d(H){H&&k(e),z(s),z(r),~f&&E[f].d(),z(g),F&&F.d(),R&&R.d(),M=!1,D()}}}function Nc(n){let e,t,i,s,l=n[0].system&&Rc(),o=!n[0].id&&Hc(n),r=n[0].required&&jc(),a=n[0].unique&&qc();return{c(){e=_("div"),l&&l.c(),t=T(),o&&o.c(),i=T(),r&&r.c(),s=T(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){w(u,e,f),l&&l.m(e,null),h(e,t),o&&o.m(e,null),h(e,i),r&&r.m(e,null),h(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Rc(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=Hc(u),o.c(),o.m(e,i)),u[0].required?r||(r=jc(),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=qc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Rc(n){let e;return{c(){e=_("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Hc(n){let e;return{c(){e=_("span"),e.textContent="New",p(e,"class","label"),ie(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){w(t,e,i)},p(t,i){i[0]&257&&ie(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&k(e)}}}function jc(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function qc(n){let e;return{c(){e=_("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Vc(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ue(Ct.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Ot(()=>{t||(t=ot(e,qn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ot(e,qn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function zc(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){w(s,e,l),t||(i=G(e,"click",Xn(n[15])),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function H$(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,m,g,v,b,y=!n[0].toDelete&&Nc(n),$=n[7]&&!n[0].system&&Vc(),S=n[0].toDelete&&zc(n);return{c(){e=_("div"),t=_("span"),i=_("i"),l=T(),o=_("strong"),a=N(r),f=T(),y&&y.c(),c=T(),d=_("div"),m=T(),$&&$.c(),g=T(),S&&S.c(),v=xe(),p(i,"class",s=Za(W.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),p(t,"class","icon field-type"),p(o,"class","title field-name svelte-1tpxlm5"),p(o,"title",u=n[0].name),ie(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(C,M){w(C,e,M),h(e,t),h(t,i),h(e,l),h(e,o),h(o,a),w(C,f,M),y&&y.m(C,M),w(C,c,M),w(C,d,M),w(C,m,M),$&&$.m(C,M),w(C,g,M),S&&S.m(C,M),w(C,v,M),b=!0},p(C,M){(!b||M[0]&1&&s!==(s=Za(W.getFieldTypeIcon(C[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!b||M[0]&1)&&r!==(r=(C[0].name||"-")+"")&&he(a,r),(!b||M[0]&1&&u!==(u=C[0].name))&&p(o,"title",u),M[0]&1&&ie(o,"txt-strikethrough",C[0].toDelete),C[0].toDelete?y&&(y.d(1),y=null):y?y.p(C,M):(y=Nc(C),y.c(),y.m(c.parentNode,c)),C[7]&&!C[0].system?$?M[0]&129&&A($,1):($=Vc(),$.c(),A($,1),$.m(g.parentNode,g)):$&&(Pe(),P($,1,1,()=>{$=null}),Le()),C[0].toDelete?S?S.p(C,M):(S=zc(C),S.c(),S.m(v.parentNode,v)):S&&(S.d(1),S=null)},i(C){b||(A($),b=!0)},o(C){P($),b=!1},d(C){C&&k(e),C&&k(f),y&&y.d(C),C&&k(c),C&&k(d),C&&k(m),$&&$.d(C),C&&k(g),S&&S.d(C),C&&k(v)}}}function j$(n){let e,t,i={single:!0,interactive:n[8],class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion",$$slots:{header:[H$],default:[R$]},$$scope:{ctx:n}};return e=new Ba({props:i}),n[32](e),e.$on("expand",n[33]),e.$on("collapse",n[34]),e.$on("toggle",n[35]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&256&&(o.interactive=s[8]),l[0]&5&&(o.class=s[2]||s[0].toDelete||s[0].system?"field-accordion disabled":"field-accordion"),l[0]&483|l[1]&256&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[32](null),z(e,s)}}}function q$(n,e,t){let i,s,l,o,r;yt(n,ls,Y=>t(14,r=Y));const a=ln();let{key:u="0"}=e,{field:f=new yn}=e,{disabled:c=!1}=e,{excludeNames:d=[]}=e,m,g=f.type;function v(){m==null||m.expand()}function b(){m==null||m.collapse()}function y(){f.id?t(0,f.toDelete=!0,f):(b(),a("remove"))}function $(Y){if(Y=(""+Y).toLowerCase(),!Y)return!1;for(co
Line truncated
|
||||
<code>@request.query.*</code>
|
||||
<code>@request.data.*</code>
|
||||
<code>@request.user.*</code>`,S=T(),C=_("hr"),M=T(),D=_("p"),D.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",O=T(),E=_("div"),E.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",L=T(),F=_("hr"),R=T(),H=_("p"),H.innerHTML=`Example rule:
|
||||
<br/>
|
||||
<code>@request.user.id!="" && created>"2022-01-01 00:00:00"</code>`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p($,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p(D,"class","m-b-0"),p(E,"class","inline-flex flex-gap-5"),p(F,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(U,Z){w(U,e,Z),h(e,t),h(t,i),h(i,s),h(i,l),h(i,o),h(o,r),h(o,a),h(o,u),h(o,f),h(o,c),h(o,d);for(let oe=0;oe<X.length;oe+=1)X[oe].m(o,null);h(i,m),h(i,g),h(i,v),h(i,b),h(i,y),h(i,$),h(i,S),h(i,C),h(i,M),h(i,D),h(i,O),h(i,E),h(i,L),h(i,F),h(i,R),h(i,H),Q=!0},p(U,Z){if(Z&1){j=U[0].schema;let oe;for(oe=0;oe<j.length;oe+=1){const ae=Yc(U,j,oe);X[oe]?X[oe].p(ae,Z):(X[oe]=Zc(ae),X[oe].c(),X[oe].m(o,null))}for(;oe<X.length;oe+=1)X[oe].d(1);X.length=j.length}},i(U){Q||(U&&Ot(()=>{te||(te=ot(e,en,{duration:150},!0)),te.run(1)}),Q=!0)},o(U){U&&(te||(te=ot(e,en,{duration:150},!1)),te.run(0)),Q=!1},d(U){U&&k(e),Gn(X,U),U&&te&&te.end()}}}function W$(n){let e,t=n[19].name+"",i;return{c(){e=_("code"),i=N(t)},m(s,l){w(s,e,l),h(e,i)},p(s,l){l&1&&t!==(t=s[19].name+"")&&he(i,t)},d(s){s&&k(e)}}}function Y$(n){let e,t=n[19].name+"",i,s;return{c(){e=_("code"),i=N(t),s=N(".*")},m(l,o){w(l,e,o),h(e,i),h(e,s)},p(l,o){o&1&&t!==(t=l[19].name+"")&&he(i,t)},d(l){l&&k(e)}}}function Zc(n){let e;function t(l,o){return l[19].type==="relation"||l[19].type==="user"?Y$:W$}let i=t(n),s=i(n);return{c(){s.c(),e=xe()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function K$(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const o=r=>r[14];for(let r=0;r<l.length;r+=1){let a=Wc(n,l,r),u=o(a);t.set(u,e[r]=Jc(u,a))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();i=xe()},m(r,a){for(let u=0;u<e.length;u+=1)e[u].m(r,a);w(r,i,a),s=!0},p(r,a){a&262235&&(l=Object.entries(r[6]),Pe(),e=ht(e,a,o,1,r,l,t,i.parentNode,Gt,Jc,i,Wc),Le())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(e[a]);s=!0}},o(r){for(let a=0;a<e.length;a+=1)P(e[a]);s=!1},d(r){for(let a=0;a<e.length;a+=1)e[a].d(r);r&&k(i)}}}function Z$(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:le,i:le,o:le,d(t){t&&k(e)}}}function J$(n){let e,t,i;function s(){return n[9](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[Ue(Ct.call(null,e,"Lock and set to Admins only")),G(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Je(i)}}}function G$(n){let e,t,i;function s(){return n[8](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-unlock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[Ue(Ct.call(null,e,"Unlock and set custom rule")),G(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Je(i)}}}function X$(n){let e;return{c(){e=N("Leave empty to grant everyone access")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Q$(n){let e;return{c(){e=N("Only admins will be able to access (unlock to change)")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function x$(n){let e,t=n[15]+"",i,s,l=Di(n[0][n[14]])?"Admins only":"Custom rule",o,r,a,u,f=n[14],c,d,m,g,v,b,y;function $(){return n[10](n[14])}const S=()=>n[11](u,f),C=()=>n[11](null,f);function M(R){n[12](R,n[14])}var D=n[4];function O(R){let H={baseCollection:R[0],disabled:Di(R[0][R[14]])};return R[0][R[14]]!==void 0&&(H.value=R[0][R[14]]),{props:H}}D&&(u=new D(O(n)),S(),ge.push(()=>Ne(u,"value",M)));function E(R,H){return H&1&&(g=null),g==null&&(g=!!Di(R[0][R[14]])),g?Q$:X$}let L=E(n,-1),F=L(n);return{c(){e=_("label"),i=N(t),s=N(" - "),o=N(l),a=T(),u&&B(u.$$.fragment),d=T(),m=_("div"),F.c(),p(e,"for",r=n[18]),p(m,"class","help-block")},m(R,H){w(R,e,H),h(e,i),h(e,s),h(e,o),w(R,a,H),u&&V(u,R,H),w(R,d,H),w(R,m,H),F.m(m,null),v=!0,b||(y=G(e,"click",$),b=!0)},p(R,H){n=R,(!v||H&1)&&l!==(l=Di(n[0][n[14]])?"Admins only":"Custom rule")&&he(o,l),(!v||H&262144&&r!==(r=n[18]))&&p(e,"for",r),f!==n[14]&&(C(),f=n[14],S());const te={};if(H&1&&(te.baseCollection=n[0]),H&1&&(te.disabled=Di(n[0][n[14]])),!c&&H&65&&(c=!0,te.value=n[0][n[14]],He(()=>c=!1)),D!==(D=n[4])){if(u){Pe();const Q=u;P(Q.$$.fragment,1,0,()=>{z(Q,1)}),Le()}D?(u=new D(O(n)),S(),ge.push(()=>Ne(u,"value",M)),B(u.$$.fragment),A(u.$$.fragment,1),V(u,d.parentNode,d)):u=null}else D&&u.$set(te);L!==(L=E(n,H))&&(F.d(1),F=L(n),F&&(F.c(),F.m(m,null)))},i(R){v||(u&&A(u.$$.fragment,R),v=!0)},o(R){u&&P(u.$$.fragment,R),v=!1},d(R){R&&k(e),R&&k(a),C(),u&&z(u,R),R&&k(d),R&&k(m),F.d(),b=!1,y()}}}function Jc(n,e){let t,i,s,l,o,r,a,u;function f(m,g){return g&1&&(l=null),l==null&&(l=!!Di(m[0][m[14]])),l?G$:J$}let c=f(e,-1),d=c(e);return r=new Ie({props:{class:"form-field rule-field m-0 "+(Di(e[0][e[14]])?"disabled":""),namLine truncated
|
||||
<a href="https://pocketbase.io/docs/manage-collections#rules-filters-syntax" target="_blank" rel="noopener">PocketBase filter syntax and operators
|
||||
</a>.`,s=T(),l=_("span"),r=N(o),a=T(),b&&b.c(),u=T(),c.c(),d=xe(),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(C,M){w(C,e,M),h(e,t),h(t,i),h(t,s),h(t,l),h(l,r),h(e,a),b&&b.m(e,null),w(C,u,M),$[f].m(C,M),w(C,d,M),m=!0,g||(v=G(l,"click",n[7]),g=!0)},p(C,[M]){(!m||M&4)&&o!==(o=C[2]?"Hide available fields":"Show available fields")&&he(r,o),C[2]?b?(b.p(C,M),M&4&&A(b,1)):(b=Kc(C),b.c(),A(b,1),b.m(e,null)):b&&(Pe(),P(b,1,1,()=>{b=null}),Le());let D=f;f=S(C),f===D?$[f].p(C,M):(Pe(),P($[D],1,1,()=>{$[D]=null}),Le(),c=$[f],c?c.p(C,M):(c=$[f]=y[f](C),c.c()),A(c,1),c.m(d.parentNode,d))},i(C){m||(A(b),A(c),m=!0)},o(C){P(b),P(c),m=!1},d(C){C&&k(e),b&&b.d(),C&&k(u),$[f].d(C),C&&k(d),g=!1,v()}}}function Di(n){return n===null}function tC(n,e,t){let{collection:i=new En}=e,s={},l=!1,o={},r,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,r=(await Zi(()=>import("./FilterAutocompleteInput.92765a8b.js"),[],import.meta.url)).default)}catch(y){console.warn(y),t(4,r=null)}t(5,a=!1)}Un(()=>{f()});const c=()=>t(2,l=!l),d=async y=>{var $;t(0,i[y]=s[y]||"",i),await xn(),($=o[y])==null||$.focus()},m=y=>{t(1,s[y]=i[y],s),t(0,i[y]=null,i)},g=y=>{var $;return($=o[y])==null?void 0:$.focus()};function v(y,$){ge[y?"unshift":"push"](()=>{o[$]=y,t(3,o)})}function b(y,$){n.$$.not_equal(i[$],y)&&(i[$]=y,t(0,i))}return n.$$set=y=>{"collection"in y&&t(0,i=y.collection)},[i,s,l,o,r,a,u,c,d,m,g,v,b]}class nC extends Ee{constructor(e){super(),Oe(this,e,tC,eC,De,{collection:0})}}function Gc(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xc(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qc(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 xc(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=N(`Renamed collection
|
||||
`),s=_("strong"),o=N(l),r=T(),a=_("i"),u=T(),f=_("strong"),d=N(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(m,g){w(m,e,g),h(e,t),h(t,i),h(t,s),h(s,o),h(t,r),h(t,a),h(t,u),h(t,f),h(f,d)},p(m,g){g&2&&l!==(l=m[1].originalName+"")&&he(o,l),g&2&&c!==(c=m[1].name+"")&&he(d,c)},d(m){m&&k(e)}}}function ed(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=_("li"),t=_("div"),i=N(`Renamed field
|
||||
`),s=_("strong"),o=N(l),r=T(),a=_("i"),u=T(),f=_("strong"),d=N(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(m,g){w(m,e,g),h(e,t),h(t,i),h(t,s),h(s,o),h(t,r),h(t,a),h(t,u),h(t,f),h(f,d)},p(m,g){g&16&&l!==(l=m[14].originalName+"")&&he(o,l),g&16&&c!==(c=m[14].name+"")&&he(d,c)},d(m){m&&k(e)}}}function td(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=_("li"),t=N("Removed field "),i=_("span"),l=N(s),o=T(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){w(r,e,a),h(e,t),h(e,i),h(i,l),h(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&he(l,s)},d(r){r&&k(e)}}}function iC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=n[3].length&&Qc(),g=n[5]&&xc(n),v=n[4],b=[];for(let S=0;S<v.length;S+=1)b[S]=ed(Xc(n,v,S));let y=n[3],$=[];for(let S=0;S<y.length;S+=1)$[S]=td(Gc(n,y,S));return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=T(),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!`,o=T(),m&&m.c(),r=T(),a=_("h6"),a.textContent="Changes:",u=T(),f=_("ul"),g&&g.c(),c=T();for(let S=0;S<b.length;S+=1)b[S].c();d=T();for(let S=0;S<$.length;S+=1)$[S].c();p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning"),p(f,"class","changes-list svelte-1ghly2p")},m(S,C){w(S,e,C),h(e,t),h(e,i),h(e,s),h(s,l),h(s,o),m&&m.m(s,null),w(S,r,C),w(S,a,C),w(S,u,C),w(S,f,C),g&&g.m(f,null),h(f,c);for(let M=0;M<b.length;M+=1)b[M].m(f,null);h(f,d);for(let M=0;M<$.length;M+=1)$[M].m(f,null)},p(S,C){if(S[3].length?m||(m=Qc(),m.c(),m.m(s,null)):m&&(m.d(1),m=null),S[5]?g?g.p(S,C):(g=xc(S),g.c(),g.m(f,c)):g&&(g.d(1),g=null),C&16){v=S[4];let M;for(M=0;M<v.length;M+=1){const D=Xc(S,v,M);b[M]?b[M].p(D,C):(b[M]=ed(D),b[M].c(),b[M].m(f,d))}for(;M<b.length;M+=1)b[M].d(1);b.length=v.length}if(C&8){y=S[3];let M;for(M=0;M<y.length;M+=1){const D=Gc(S,y,M);$[M]?$[M].p(D,C):($[M]=td(D),$[M].c(),$[M].m(f,null))}for(;M<$.length;M+=1)$[M].d(1);$.length=y.length}},d(S){S&&k(e),m&&m.d(),S&&k(r),S&&k(a),S&&k(u),S&&k(f),g&&g.d(),Gn(b,S),Gn($,S)}}}function sC(n){let e;return{c(){e=_("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function lC(n){let e,t,i,s,l;return{c(){e=_("button"),e.innerHTML='<span class="txt">Cancel</span>',t=T(),i=_("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[G(e,"click",n[8]),G(i,"click",n[9])],s=!0)},p:le,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Je(l)}}}function oC(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[lC],header:[sC],default:[iC]},$$scope:{ctx:n}};return e=new fi({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 o={};l&524346&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),z(e,s)}}}function rC(n,e,t){let i,s,l;const o=ln();let r,a;async function u(y){t(1,a=y),await xn(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),m=()=>c();function g(y){ge[y?"unshift":"push"](()=>{r=y,t(2,r)})}function v(y){at.call(this,n,y)}function b(y){at.call(this,n,y)}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(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,m,g,v,b]}class aC extends Ee{constructor(e){super(),Oe(this,e,rC,oC,De,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function nd(n){let e,t,i,s;function l(r){n[26](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new nC({props:o}),ge.push(()=>Ne(t,"collection",l)),{c(){e=_("div"),B(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){w(r,e,a),V(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],He(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&k(e),z(t)}}}function uC(n){let e,t,i,s,l,o;function r(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new U$({props:a}),ge.push(()=>Ne(i,"collection",r));let u=n[9]===dl&&nd(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),l=T(),u&&u.c(),p(t,"class","tab-item"),ie(t,"active",n[9]===ns),p(e,"class","tabs-content svelte-b10vi")},m(f,c){w(f,e,c),h(e,t),V(i,t,null),h(e,l),u&&u.m(e,null),o=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],He(()=>s=!1)),i.$set(d),c[0]&512&&ie(t,"active",f[9]===ns),f[9]===dl?u?(u.p(f,c),c[0]&512&&A(u,1)):(u=nd(f),u.c(),A(u,1),u.m(e,null)):u&&(Pe(),P(u,1,1,()=>{u=null}),Le())},i(f){o||(A(i.$$.fragment,f),A(u),o=!0)},o(f){P(i.$$.fragment,f),P(u),o=!1},d(f){f&&k(e),z(i),u&&u.d()}}}function id(n){let e,t,i,s,l,o,r;return o=new Ri({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[fC]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=T(),i=_("button"),s=_("i"),l=T(),B(o.$$.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),h(i,s),h(i,l),V(o,i,null),r=!0},p(a,u){const f={};u[1]&256&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&k(e),a&&k(t),a&&k(i),z(o)}}}function fC(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i>
|
||||
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[20]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function sd(n){let e;return{c(){e=_("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function cC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=n[2].system&&sd();return{c(){e=_("label"),t=N("Name"),s=T(),l=_("input"),u=T(),m&&m.c(),f=xe(),p(e,"for",i=n[38]),p(l,"type","text"),p(l,"id",o=n[38]),l.required=!0,l.disabled=n[11],p(l,"spellcheck","false"),l.autofocus=r=n[2].isNew,p(l,"placeholder",'eg. "posts"'),l.value=a=n[2].name},m(g,v){w(g,e,v),h(e,t),w(g,s,v),w(g,l,v),w(g,u,v),m&&m.m(g,v),w(g,f,v),n[2].isNew&&l.focus(),c||(d=G(l,"input",n[21]),c=!0)},p(g,v){v[1]&128&&i!==(i=g[38])&&p(e,"for",i),v[1]&128&&o!==(o=g[38])&&p(l,"id",o),v[0]&2048&&(l.disabled=g[11]),v[0]&4&&r!==(r=g[2].isNew)&&(l.autofocus=r),v[0]&4&&a!==(a=g[2].name)&&l.value!==a&&(l.value=a),g[2].system?m||(m=sd(),m.c(),m.m(f.parentNode,f)):m&&(m.d(1),m=null)},d(g){g&&k(e),g&&k(s),g&&k(l),g&&k(u),m&&m.d(g),g&&k(f),c=!1,d()}}}function ld(n){let e,t,i,s,l,o;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){w(r,e,a),s=!0,l||(o=Ue(t=Ct.call(null,e,n[12])),l=!0)},p(r,a){t&&Bn(t.update)&&a[0]&4096&&t.update.call(null,r[12])},i(r){s||(r&&Ot(()=>{i||(i=ot(e,qn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=ot(e,qn,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function od(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ue(Ct.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Ot(()=>{t||(t=ot(e,qn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ot(e,qn,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function dC(n){var R,H,te,Q,j,X;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,m,g,v=!W.isEmpty((R=n[4])==null?void 0:R.schema),b,y,$,S,C=!W.isEmpty((H=n[4])==null?void 0:H.listRule)||!W.isEmpty((te=n[4])==null?void 0:te.viewRule)||!W.isEmpty((Q=n[4])==null?void 0:Q.createRule)||!W.isEmpty((j=n[4])==null?void 0:j.updateRule)||!W.isEmpty((X=n[4])==null?void 0:X.deleteRule),M,D,O,E=!n[2].isNew&&!n[2].system&&id(n);r=new Ie({props:{class:"form-field required m-b-0 "+(n[11]?"disabled":""),name:"name",$$slots:{default:[cC,({uniqueId:U})=>({38:U}),({uniqueId:U})=>[0,U?128:0]]},$$scope:{ctx:n}}});let L=v&&ld(n),F=C&&od();return{c(){e=_("h4"),i=N(t),s=T(),E&&E.c(),l=T(),o=_("form"),B(r.$$.fragment),a=T(),u=_("input"),f=T(),c=_("div"),d=_("button"),m=_("span"),m.textContent="Fields",g=T(),L&&L.c(),b=T(),y=_("button"),$=_("span"),$.textContent="API Rules",S=T(),F&&F.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(m,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ie(d,"active",n[9]===ns),p($,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),ie(y,"active",n[9]===dl),p(c,"class","tabs-header stretched")},m(U,Z){w(U,e,Z),h(e,i),w(U,s,Z),E&&E.m(U,Z),w(U,l,Z),w(U,o,Z),V(r,o,null),h(o,a),h(o,u),w(U,f,Z),w(U,c,Z),h(c,d),h(d,m),h(d,g),L&&L.m(d,null),h(c,b),h(c,y),h(y,$),h(y,S),F&&F.m(y,null),M=!0,D||(O=[G(o,"submit",Yt(n[22])),G(d,"click",n[23]),G(y,"click",n[24])],D=!0)},p(U,Z){var ae,Te,re,me,ve,Y;(!M||Z[0]&4)&&t!==(t=U[2].isNew?"New collection":"Edit collection")&&he(i,t),!U[2].isNew&&!U[2].system?E?(E.p(U,Z),Z[0]&4&&A(E,1)):(E=id(U),E.c(),A(E,1),E.m(l.parentNode,l)):E&&(Pe(),P(E,1,1,()=>{E=null}),Le());const oe={};Z[0]&2048&&(oe.class="form-field required m-b-0 "+(U[11]?"disabled":"")),Z[0]&2052|Z[1]&384&&(oe.$$scope={dirty:Z,ctx:U}),r.$set(oe),Z[0]&16&&(v=!W.isEmpty((ae=U[4])==null?void 0:ae.schema)),v?L?(L.p(U,Z),Z[0]&16&&A(L,1)):(L=ld(U),L.c(),A(L,1),L.m(d,null)):L&&(Pe(),P(L,1,1,()=>{L=null}),Le()),Z[0]&512&&ie(d,"active",U[9]===ns),Z[0]&16&&(C=!W.isEmpty((Te=U[4])==null?void 0:Te.listRule)||!W.isEmpty((re=U[4])==null?void 0:re.viewRule)||!W.isEmpty((me=U[4])==null?void 0:me.createRule)||!W.isEmpty((ve=U[4])==null?void 0:ve.updateRule)||!W.isEmpty((Y=U[4])==null?void 0:Y.deleteRule)),C?F?Z[0]&16&&A(F,1):(F=od(),F.c(),A(F,1),F.m(y,null)):F&&(Pe(),P(F,1,1,()=>{F=null}),Le()),Z[0]&512&&ie(y,"active",U[9]===dl)},i(U){M||(A(E),A(r.$$.fragment,U),A(L),A(F),M=!0)},o(U){P(E),P(r.$$.fragment,U),P(L),P(F),M=!1},d(U){U&&k(e),U&&k(s),E&&E.d(U),U&&k(l),U&&k(o),z(r),U&&k(f),U&&k(c),L&&L.d(),F&&F.d(),D=!1,Je(O)}}}function pC(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=T(),s=_("button"),l=_("span"),r=N(o),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","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],ie(s,"btn-loading",n[7])},m(c,d){w(c,e,d),h(e,t),w(c,i,d),w(c,s,d),h(s,l),h(l,r),u||(f=[G(e,"click",n[18]),G(s,"click",nLine truncated
|
||||
<span class="txt">New collection</span>`,y=T(),B($.$$.fragment),p(l,"type","button"),p(l,"class","btn btn-xs btn-secondary btn-circle btn-clear"),ie(l,"hidden",!n[4]),p(s,"class","form-field-addon"),p(r,"type","text"),p(r,"placeholder","Search collections..."),p(i,"class","form-field search"),ie(i,"active",n[4]),p(t,"class","sidebar-header"),p(u,"class","m-t-5 m-b-xs"),p(c,"class","sidebar-content"),p(b,"type","button"),p(b,"class","btn btn-block btn-outline"),p(v,"class","sidebar-footer"),p(e,"class","page-sidebar collection-sidebar")},m(F,R){w(F,e,R),h(e,t),h(t,i),h(i,s),h(s,l),h(i,o),h(i,r),Ce(r,n[0]),h(e,a),h(e,u),h(e,f),h(e,c);for(let H=0;H<d.length;H+=1)d[H].m(c,null);E&&E.m(c,null),h(e,g),h(e,v),h(v,b),w(F,y,R),V($,F,R),S=!0,C||(M=[G(l,"click",n[8]),G(r,"input",n[9]),G(b,"click",n[11])],C=!0)},p(F,[R]){R&16&&ie(l,"hidden",!F[4]),R&1&&r.value!==F[0]&&Ce(r,F[0]),R&16&&ie(i,"active",F[4]),R&106&&(D=F[3],d=ht(d,R,O,1,F,D,m,c,mn,fd,null,rd),!D.length&&E?E.p(F,R):D.length?E&&(E.d(1),E=null):(E=ad(F),E.c(),E.m(c,null)));const H={};$.$set(H)},i(F){S||(A($.$$.fragment,F),S=!0)},o(F){P($.$$.fragment,F),S=!1},d(F){F&&k(e);for(let R=0;R<d.length;R+=1)d[R].d();E&&E.d(),F&&k(y),n[12](null),z($,F),C=!1,Je(M)}}}function vC(n,e,t){let i,s,l,o,r;yt(n,oi,b=>t(5,o=b)),yt(n,Cs,b=>t(7,r=b));let a,u="";function f(b){fn(oi,o=b,o)}const c=()=>t(0,u="");function d(){u=this.value,t(0,u)}const m=b=>f(b),g=()=>a==null?void 0:a.show();function v(b){ge[b?"unshift":"push"](()=>{a=b,t(2,a)})}return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=u.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=u!==""),n.$$.dirty&131&&t(3,l=r.filter(b=>b.name!="profiles"&&(b.id==u||b.name.replace(/\s+/g,"").toLowerCase().includes(i))))},[u,i,a,l,s,o,f,r,c,d,m,g,v]}class yC extends Ee{constructor(e){super(),Oe(this,e,vC,bC,De,{})}}function kC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,$,S,C,M,D,O,E,L,F,R,H,te,Q,j,X,U,Z,oe,ae,Te,re,me,ve,Y,Se,x,J,we,Re,ze,K,pe,ce,ke,Ge;return{c(){e=_("p"),e.innerHTML=`The syntax basically follows the format
|
||||
<code><span class="txt-success">OPERAND</span>
|
||||
<span class="txt-danger">OPERATOR</span>
|
||||
<span class="txt-success">OPERAND</span></code>, where:`,t=T(),i=_("ul"),s=_("li"),s.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single or double
|
||||
quoted), number, null, true, false`,l=T(),o=_("li"),r=_("code"),r.textContent="OPERATOR",a=N(` - is one of:
|
||||
`),u=_("br"),f=T(),c=_("ul"),d=_("li"),m=_("code"),m.textContent="=",g=T(),v=_("span"),v.textContent="Equal",b=T(),y=_("li"),$=_("code"),$.textContent="!=",S=T(),C=_("span"),C.textContent="NOT equal",M=T(),D=_("li"),O=_("code"),O.textContent=">",E=T(),L=_("span"),L.textContent="Greater than",F=T(),R=_("li"),H=_("code"),H.textContent=">=",te=T(),Q=_("span"),Q.textContent="Greater than or equal",j=T(),X=_("li"),U=_("code"),U.textContent="<",Z=T(),oe=_("span"),oe.textContent="Less than or equal",ae=T(),Te=_("li"),re=_("code"),re.textContent="<=",me=T(),ve=_("span"),ve.textContent="Less than or equal",Y=T(),Se=_("li"),x=_("code"),x.textContent="~",J=T(),we=_("span"),we.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard
|
||||
match)`,Re=T(),ze=_("li"),K=_("code"),K.textContent="!~",pe=T(),ce=_("span"),ce.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,ke=T(),Ge=_("p"),Ge.innerHTML=`To group and combine several expressions you could use brackets
|
||||
<code>(...)</code>, <code>&&</code> (AND) and <code>||</code> (OR) tokens.`,p(r,"class","txt-danger"),p(m,"class","filter-op svelte-1w7s5nw"),p(v,"class","txt-hint"),p($,"class","filter-op svelte-1w7s5nw"),p(C,"class","txt-hint"),p(O,"class","filter-op svelte-1w7s5nw"),p(L,"class","txt-hint"),p(H,"class","filter-op svelte-1w7s5nw"),p(Q,"class","txt-hint"),p(U,"class","filter-op svelte-1w7s5nw"),p(oe,"class","txt-hint"),p(re,"class","filter-op svelte-1w7s5nw"),p(ve,"class","txt-hint"),p(x,"class","filter-op svelte-1w7s5nw"),p(we,"class","txt-hint"),p(K,"class","filter-op svelte-1w7s5nw"),p(ce,"class","txt-hint")},m(nt,et){w(nt,e,et),w(nt,t,et),w(nt,i,et),h(i,s),h(i,l),h(i,o),h(o,r),h(o,a),h(o,u),h(o,f),h(o,c),h(c,d),h(d,m),h(d,g),h(d,v),h(c,b),h(c,y),h(y,$),h(y,S),h(y,C),h(c,M),h(c,D),h(D,O),h(D,E),h(D,L),h(c,F),h(c,R),h(R,H),h(R,te),h(R,Q),h(c,j),h(c,X),h(X,U),h(X,Z),h(X,oe),h(c,ae),h(c,Te),h(Te,re),h(Te,me),h(Te,ve),h(c,Y),h(c,Se),h(Se,x),h(Se,J),h(Se,we),h(c,Re),h(c,ze),h(ze,K),h(ze,pe),h(ze,ce),w(nt,ke,et),w(nt,Ge,et)},p:le,i:le,o:le,d(nt){nt&&k(e),nt&&k(t),nt&&k(i),nt&&k(ke),nt&&k(Ge)}}}class wC extends Ee{constructor(e){super(),Oe(this,e,null,kC,De,{})}}function cd(n,e,t){const i=n.slice();return i[5]=e[t],i}function dd(n,e,t){const i=n.slice();return i[5]=e[t],i}function pd(n,e){let t,i,s=e[5].title+"",l,o,r,a;function u(){return e[4](e[5])}return{key:n,first:null,c(){t=_("button"),i=_("div"),l=N(s),o=T(),p(i,"class","txt"),p(t,"class","tab-item svelte-1maocj6"),ie(t,"active",e[0]===e[5].language),this.first=t},m(f,c){w(f,t,c),h(t,i),h(i,l),h(t,o),r||(a=G(t,"click",u),r=!0)},p(f,c){e=f,c&2&&s!==(s=e[5].title+"")&&he(l,s),c&3&&ie(t,"active",e[0]===e[5].language)},d(f){f&&k(t),r=!1,a()}}}function hd(n,e){let t,i,s,l;return i=new hn({props:{language:e[5].language,content:e[5].content}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),p(t,"class","tab-item svelte-1maocj6"),ie(t,"active",e[0]===e[5].language),this.first=t},m(o,r){w(o,t,r),V(i,t,null),h(t,s),l=!0},p(o,r){e=o;const a={};r&2&&(a.language=e[5].language),r&2&&(a.content=e[5].content),i.$set(a),r&3&&ie(t,"active",e[0]===e[5].language)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function SC(n){let e,t,i=[],s=new Map,l,o,r=[],a=new Map,u,f=n[1];const c=g=>g[5].language;for(let g=0;g<f.length;g+=1){let v=dd(n,f,g),b=c(v);s.set(b,i[g]=pd(b,v))}let d=n[1];const m=g=>g[5].language;for(let g=0;g<d.length;g+=1){let v=cd(n,d,g),b=m(v);a.set(b,r[g]=hd(b,v))}return{c(){e=_("div"),t=_("div");for(let g=0;g<i.length;g+=1)i[g].c();l=T(),o=_("div");for(let g=0;g<r.length;g+=1)r[g].c();p(t,"class","tabs-header compact left"),p(o,"class","tabs-content"),p(e,"class","tabs sdk-tabs m-b-lg svelte-1maocj6")},m(g,v){w(g,e,v),h(e,t);for(let b=0;b<i.length;b+=1)i[b].m(t,null);h(e,l),h(e,o);for(let b=0;b<r.length;b+=1)r[b].m(o,null);u=!0},p(g,[v]){v&3&&(f=g[1],i=ht(i,v,c,1,g,f,s,t,mn,pd,null,dd)),v&3&&(d=g[1],Pe(),r=ht(r,v,m,1,g,d,a,o,Gt,hd,null,cd),Le())},i(g){if(!u){for(let v=0;v<d.length;v+=1)A(r[v]);u=!0}},o(g){for(let v=0;v<r.length;v+=1)P(r[v]);u=!1},d(g){g&&k(e);for(let v=0;v<i.length;v+=1)i[v].d();for(let v=0;v<r.length;v+=1)r[v].d()}}}const md="pb_sdk_preference";function $C(n,e,t){let i,{js:s=""}=e,{dart:l=""}=e,o=localStorage.getItem(md)||"javascript";const r=a=>t(0,o=a.language);return n.$$set=a=>{"js"in a&&t(2,s=a.js),"dart"in a&&t(3,l=a.dart)},n.$$.update=()=>{n.$$.dirty&1&&o&&localStorage.setItem(md,o),n.$$.dirty&12&&t(1,i=[{title:"JavaScript",language:"javascript",content:s},{title:"Dart",language:"dart",content:l}])},[o,i,s,l,r]}class Es extends Ee{constructor(e){super(),Oe(this,e,$C,SC,De,{js:2,dart:3})}}function gd(n,e,t){const i=n.slice();return i[6]=e[t],i}function _d(n,e,t){const i=n.slice();return i[6]=e[t],i}function bd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function vd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("div"),s=N(i),l=T(),p(t,"class","tab-item"),ie(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),h(t,s),h(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&20&&ie(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function yd(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),p(t,"class","tab-item"),ie(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),h(t,s),l=!0},p(o,r){e=o,r&20&&ie(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function CC(n){var ci,$l,us,Cl;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y=n[0].name+"",$,S,C,M,D,O,E,L,F,R,H,te,Q,j,X,U,Z,oe,ae,Te,re,me,ve,Y,Se,x,J,we,Re,ze,K,pe,ce,ke,Ge,nt,et,kt,it,Mt,Be,Ye,dt,ne,_e,Ke,lt,ut,tt,wt,mt,jt,Nt,We,$e,Ve,Qe,rt,Pt,Ft,Lt,st,I,q,ee,ue=[],Ae=new Map,se,ye,Me=[],fe=new Map,Line truncated
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await client.records.getList('${(ci=n[0])==null?void 0:ci.name}', 1, 50, {
|
||||
filter: 'created >= '2022-01-01 00:00:00'',
|
||||
});
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
const records = await client.records.getFullList('${($l=n[0])==null?void 0:$l.name}', 200 /* batch size */, {
|
||||
sort: '-created',
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final result = await client.records.getList(
|
||||
'${(us=n[0])==null?void 0:us.name}',
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00"',
|
||||
);
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
final records = await client.records.getFullList('${(Cl=n[0])==null?void 0:Cl.name}', batch: 200, sort: '-created');
|
||||
`}}),K=new hn({props:{content:`
|
||||
// DESC by created and ASC by id
|
||||
?sort=-created,id
|
||||
`}}),Mt=new hn({props:{content:`
|
||||
?filter=(id='abc' && created>'2022-01-01')
|
||||
`}}),Ye=new wC({}),mt=new hn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let pt=n[4];const on=je=>je[6].code;for(let je=0;je<pt.length;je+=1){let Xe=_d(n,pt,je),Xt=on(Xe);Ae.set(Xt,ue[je]=vd(Xt,Xe))}let qt=n[4];const Si=je=>je[6].code;for(let je=0;je<qt.length;je+=1){let Xe=gd(n,qt,je),Xt=Si(Xe);fe.set(Xt,Me[je]=yd(Xt,Xe))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records"),c=T(),Fe&&Fe.c(),d=T(),m=_("div"),g=_("p"),v=N("Fetch a paginated "),b=_("strong"),$=N(y),S=N(" records list."),C=T(),M=_("div"),M.textContent="Client SDKs example",D=T(),B(O.$$.fragment),E=T(),L=_("div"),L.textContent="Query parameters",F=T(),R=_("table"),H=_("thead"),H.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,te=T(),Q=_("tbody"),j=_("tr"),j.innerHTML=`<td>page</td>
|
||||
<td><span class="label">Number</span></td>
|
||||
<td>The page (aka. offset) of the paginated list (default to 1).</td>`,X=T(),U=_("tr"),U.innerHTML=`<td>perPage</td>
|
||||
<td><span class="label">Number</span></td>
|
||||
<td>Specify the max returned records per page (default to 30).</td>`,Z=T(),oe=_("tr"),ae=_("td"),ae.textContent="sort",Te=T(),re=_("td"),re.innerHTML='<span class="label">String</span>',me=T(),ve=_("td"),Y=N("Specify the records order attribute(s). "),Se=_("br"),x=N(`
|
||||
Add `),J=_("code"),J.textContent="-",we=N(" / "),Re=_("code"),Re.textContent="+",ze=N(` (default) in front of the attribute for DESC / ASC order.
|
||||
Ex.:
|
||||
`),B(K.$$.fragment),pe=T(),ce=_("tr"),ke=_("td"),ke.textContent="filter",Ge=T(),nt=_("td"),nt.innerHTML='<span class="label">String</span>',et=T(),kt=_("td"),it=N(`Filter the returned records. Ex.:
|
||||
`),B(Mt.$$.fragment),Be=T(),B(Ye.$$.fragment),dt=T(),ne=_("tr"),_e=_("td"),_e.textContent="expand",Ke=T(),lt=_("td"),lt.innerHTML='<span class="label">String</span>',ut=T(),tt=_("td"),wt=N(`Auto expand record relations. Ex.:
|
||||
`),B(mt.$$.fragment),jt=N(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Nt=_("br"),We=N(`
|
||||
The expanded relations will be appended to each individual record under the
|
||||
`),$e=_("code"),$e.textContent="@expand",Ve=N(" property (eg. "),Qe=_("code"),Qe.textContent='"@expand": {"rel1": {...}, ...}',rt=N(`). Only the
|
||||
relations that the user has permissions to `),Pt=_("strong"),Pt.textContent="view",Ft=N(" will be expanded."),Lt=T(),st=_("div"),st.textContent="Responses",I=T(),q=_("div"),ee=_("div");for(let je=0;je<ue.length;je+=1)ue[je].c();se=T(),ye=_("div");for(let je=0;je<Me.length;je+=1)Me[je].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(m,"class","content m-b-base"),p(M,"class","section-title"),p(L,"class","section-title"),p(R,"class","table-compact table-border m-b-lg"),p(st,"class","section-title"),p(ee,"class","tabs-header compact left"),p(ye,"class","tabs-content"),p(q,"class","tabs")},m(je,Xe){w(je,e,Xe),h(e,t),h(e,i),h(e,s),h(s,l),h(l,o),h(l,r),h(r,u),h(l,f),h(e,c),Fe&&Fe.m(e,null),w(je,d,Xe),w(je,m,Xe),h(m,g),h(g,v),h(g,b),h(b,$),h(g,S),w(je,C,Xe),w(je,M,Xe),w(je,D,Xe),V(O,je,Xe),w(je,E,Xe),w(je,L,Xe),w(je,F,Xe),w(je,R,Xe),h(R,H),h(R,te),h(R,Q),h(Q,j),h(Q,X),h(Q,U),h(Q,Z),h(Q,oe),h(oe,ae),h(oe,Te),h(oe,re),h(oe,me),h(oe,ve),h(ve,Y),h(ve,Se),h(ve,x),h(ve,J),h(ve,we),h(ve,Re),h(ve,ze),V(K,ve,null),h(Q,pe),h(Q,ce),h(ce,ke),h(ce,Ge),h(ce,nt),h(ce,et),h(ce,kt),h(kt,it),V(Mt,kt,null),h(kt,Be),V(Ye,kt,null),h(Q,dt),h(Q,ne),h(ne,_e),h(ne,Ke),h(ne,lt),h(ne,ut),h(ne,tt),h(tt,wt),V(mt,tt,null),h(tt,jt),h(tt,Nt),h(tt,We),h(tt,$e),h(tt,Ve),h(tt,Qe),h(tt,rt),h(tt,Pt),h(tt,Ft),w(je,Lt,Xe),w(je,st,Xe),w(je,I,Xe),w(je,q,Xe),h(q,ee);for(let Xt=0;Xt<ue.length;Xt+=1)ue[Xt].m(ee,null);h(q,se),h(q,ye);for(let Xt=0;Xt<Me.length;Xt+=1)Me[Xt].m(ye,null);de=!0},p(je,[Xe]){var Ml,Tl,Dl,Ol;(!de||Xe&1)&&a!==(a=je[0].name+"")&&he(u,a),je[1]?Fe||(Fe=bd(),Fe.c(),Fe.m(e,null)):Fe&&(Fe.d(1),Fe=null),(!de||Xe&1)&&y!==(y=je[0].name+"")&&he($,y);const Xt={};Xe&9&&(Xt.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${je[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await client.records.getList('${(Ml=je[0])==null?void 0:Ml.name}', 1, 50, {
|
||||
filter: 'created >= '2022-01-01 00:00:00'',
|
||||
});
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
const records = await client.records.getFullList('${(Tl=je[0])==null?void 0:Tl.name}', 200 /* batch size */, {
|
||||
sort: '-created',
|
||||
});
|
||||
`),Xe&9&&(Xt.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${je[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final result = await client.records.getList(
|
||||
'${(Dl=je[0])==null?void 0:Dl.name}',
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00"',
|
||||
);
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
final records = await client.records.getFullList('${(Ol=je[0])==null?void 0:Ol.name}', batch: 200, sort: '-created');
|
||||
`),O.$set(Xt),Xe&20&&(pt=je[4],ue=ht(ue,Xe,on,1,je,pt,Ae,ee,mn,vd,null,_d)),Xe&20&&(qt=je[4],Pe(),Me=ht(Me,Xe,Si,1,je,qt,fe,ye,Gt,yd,null,gd),Le())},i(je){if(!de){A(O.$$.fragment,je),A(K.$$.fragment,je),A(Mt.$$.fragment,je),A(Ye.$$.fragment,je),A(mt.$$.fragment,je);for(let Xe=0;Xe<qt.length;Xe+=1)A(Me[Xe]);de=!0}},o(je){P(O.$$.fragment,je),P(K.$$.fragment,je),P(Mt.$$.fragment,je),P(Ye.$$.fragment,je),P(mt.$$.fragment,je);for(let Xe=0;Xe<Me.length;Xe+=1)P(Me[Xe]);de=!1},d(je){je&&k(e),Fe&&Fe.d(),je&&k(d),je&&k(m),je&&k(C),je&&k(M),je&&k(D),z(O,je),je&&k(E),je&&k(L),je&&k(F),je&&k(R),z(K),z(Mt),z(Ye),z(mt),je&&k(Lt),je&&k(st),je&&k(I),je&&k(q);for(let Xe=0;Xe<ue.length;Xe+=1)ue[Xe].d();for(let Xe=0;Xe<Me.length;Xe+=1)Me[Xe].d()}}}function MC(n,e,t){let i,s,{collection:l=new En}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.listRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify({page:1,perPage:30,totalItems:2,items:[W.dummyCollectionRecord(l),W.dummyCollectionRecord(l)]},null,2)}),r.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Something went wrong while processing your request. Invalid filter.",
|
||||
"data": {}
|
||||
}
|
||||
`}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||be.baseUrl),[l,i,o,s,r,a]}class TC extends Ee{constructor(e){super(),Oe(this,e,MC,CC,De,{collection:0})}}function kd(n,e,t){const i=n.slice();return i[6]=e[t],i}function wd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Sd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $d(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=T(),p(t,"class","tab-item"),ie(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),h(t,s),h(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&20&&ie(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Cd(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),p(t,"class","tab-item"),ie(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),h(t,s),l=!0},p(o,r){e=o,r&20&&ie(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function DC(n){var Nt,We;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y,$=n[0].name+"",S,C,M,D,O,E,L,F,R,H,te,Q,j,X,U,Z,oe,ae,Te,re,me,ve,Y,Se,x,J,we,Re,ze,K,pe,ce,ke,Ge,nt,et,kt,it,Mt,Be=[],Ye=new Map,dt,ne,_e=[],Ke=new Map,lt,ut=n[1]&&Sd();E=new Es({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await client.records.getOne('${(Nt=n[0])==null?void 0:Nt.name}', 'RECORD_ID', {
|
||||
expand: 'some_relation'
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await client.records.getOne('${(We=n[0])==null?void 0:We.name}', 'RECORD_ID', query: {
|
||||
'expand': 'some_relation',
|
||||
});
|
||||
`}}),x=new hn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let tt=n[4];const wt=$e=>$e[6].code;for(let $e=0;$e<tt.length;$e+=1){let Ve=wd(n,tt,$e),Qe=wt(Ve);Ye.set(Qe,Be[$e]=$d(Qe,Ve))}let mt=n[4];const jt=$e=>$e[6].code;for(let $e=0;$e<mt.length;$e+=1){let Ve=kd(n,mt,$e),Qe=jt(Ve);Ke.set(Qe,_e[$e]=Cd(Qe,Ve))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=T(),ut&&ut.c(),m=T(),g=_("div"),v=_("p"),b=N("Fetch a single "),y=_("strong"),S=N($),C=N(" record."),M=T(),D=_("div"),D.textContent="Client SDKs example",O=T(),B(E.$$.fragment),L=T(),F=_("div"),F.textContent="Path Parameters",R=T(),H=_("table"),H.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to view.</td></tr></tbody>`,te=T(),Q=_("div"),Q.textContent="Query parameters",j=T(),X=_("table"),U=_("thead"),U.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,Z=T(),oe=_("tbody"),ae=_("tr"),Te=_("td"),Te.textContent="expand",re=T(),me=_("td"),me.innerHTML='<span class="label">String</span>',ve=T(),Y=_("td"),Se=N(`Auto expand record relations. Ex.:
|
||||
`),B(x.$$.fragment),J=N(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),we=_("br"),Re=N(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),ze=_("code"),ze.textContent="@expand",K=N(" property (eg. "),pe=_("code"),pe.textContent='"@expand": {"rel1": {...}, ...}',ce=N(`). Only the
|
||||
relations that the user has permissions to `),ke=_("strong"),ke.textContent="view",Ge=N(" will be expanded."),nt=T(),et=_("div"),et.textContent="Responses",kt=T(),it=_("div"),Mt=_("div");for(let $e=0;$e<Be.length;$e+=1)Be[$e].c();dt=T(),ne=_("div");for(let $e=0;$e<_e.length;$e+=1)_e[$e].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(g,"class","content m-b-base"),p(D,"class","section-title"),p(F,"class","section-title"),p(H,"class","table-compact table-border m-b-lg"),p(Q,"class","section-title"),p(X,"class","table-compact table-border m-b-lg"),p(et,"class","section-title"),p(Mt,"class","tabs-header compact left"),p(ne,"class","tabs-content"),p(it,"class","tabs")},m($e,Ve){w($e,e,Ve),h(e,t),h(e,i),h(e,s),h(s,l),h(l,o),h(l,r),h(r,u),h(l,f),h(l,c),h(e,d),ut&&ut.m(e,null),w($e,m,Ve),w($e,g,Ve),h(g,v),h(v,b),h(v,y),h(y,S),h(v,C),w($e,M,Ve),w($e,D,Ve),w($e,O,Ve),V(E,$e,Ve),w($e,L,Ve),w($e,F,Ve),w($e,R,Ve),w($e,H,Ve),w($e,te,Ve),w($e,Q,Ve),w($e,j,Ve),w($e,X,Ve),h(X,U),h(X,Z),h(X,oe),h(oe,ae),h(ae,Te),h(ae,re),h(ae,me),h(ae,ve),h(ae,Y),h(Y,Se),V(x,Y,null),h(Y,J),h(Y,we),h(Y,Re),h(Y,ze),h(Y,K),h(Y,pe),h(Y,ce),h(Y,ke),h(Y,Ge),w($e,nt,Ve),w($e,et,Ve),w($e,kt,Ve),w($e,it,Ve),h(it,Mt);for(let Qe=0;Qe<Be.length;Qe+=1)Be[Qe].m(Mt,null);h(it,dt),h(it,ne);for(let Qe=0;Qe<_e.length;Qe+=1)_e[Qe].m(ne,null);lt=!0},p($e,[Ve]){var rt,Pt;(!lt||Ve&1)&&a!==(a=$e[0].name+"")&&he(u,a),$e[1]?ut||(ut=Sd(),ut.c(),ut.m(e,null)):ut&&(ut.d(1),ut=null),(!lt||Ve&1)&&$!==($=$e[0].name+"")&&he(S,$);const Qe={};Ve&9&&(Qe.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${$e[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await client.records.getOne('${(rt=$e[0])==null?void 0:rt.name}', 'RECORD_ID', {
|
||||
expand: 'some_relation'
|
||||
});
|
||||
`),Ve&9&&(Qe.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${$e[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await client.records.getOne('${(Pt=$e[0])==null?void 0:Pt.name}', 'RECORD_ID', query: {
|
||||
'expand': 'some_relation',
|
||||
});
|
||||
`),E.$set(Qe),Ve&20&&(tt=$e[4],Be=ht(Be,Ve,wt,1,$e,tt,Ye,Mt,mn,$d,null,wd)),Ve&20&&(mt=$e[4],Pe(),_e=ht(_e,Ve,jt,1,$e,mt,Ke,ne,Gt,Cd,null,kd),Le())},i($e){if(!lt){A(E.$$.fragment,$e),A(x.$$.fragment,$e);for(let Ve=0;Ve<mt.length;Ve+=1)A(_e[Ve]);lt=!0}},o($e){P(E.$$.fragment,$e),P(x.$$.fragment,$e);for(let Ve=0;Ve<_e.length;Ve+=1)P(_e[Ve]);lt=!1},d($e){$e&&k(e),ut&&ut.d(),$e&&k(m),$e&&k(g),$e&&k(M),$e&&k(D),$e&&k(O),z(E,$e),$e&&k(L),$e&&k(F),$e&&k(R),$e&&k(H),$e&&k(te),$e&&k(Q),$e&&k(j),$e&&k(X),z(x),$e&&k(nt),$e&&k(et),$e&&k(kt),$e&&k(it);for(let Ve=0;Ve<Be.length;Ve+=1)Be[Ve].d();for(let Ve=0;Ve<_e.length;Ve+=1)_e[Ve].d()}}}function OC(n,e,t){let i,s,{collection:l=new En}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.viewRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify(W.dummyCollectionRecord(l),null,2)}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||be.baseUrl),[l,i,o,s,r,a]}class EC extends Ee{constructor(e){super(),Oe(this,e,OC,DC,De,{collection:0})}}function Md(n,e,t){const i=n.slice();return i[6]=e[t],i}function Td(n,e,t){const i=n.slice();return i[6]=e[t],i}function Dd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Od(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function AC(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function PC(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function LC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("User "),i=N(t),s=N(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&he(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function FC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("Relation record "),i=N(t),s=N(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&he(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function IC(n){let e,t,i,s,l;return{c(){e=N("FormData object."),t=_("br"),i=N(`
|
||||
Set to `),s=_("code"),s.textContent="null",l=N(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:le,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function NC(n){let e;return{c(){e=N("URL address.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function RC(n){let e;return{c(){e=N("Email address.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function HC(n){let e;return{c(){e=N("JSON array or object.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function jC(n){let e;return{c(){e=N("Number value.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function qC(n){let e;return{c(){e=N("Plain text value.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function Ed(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=W.getFieldValueType(e[11])+"",m,g,v,b;function y(O,E){return O[11].required?PC:AC}let $=y(e),S=$(e);function C(O,E){if(O[11].type==="text")return qC;if(O[11].type==="number")return jC;if(O[11].type==="json")return HC;if(O[11].type==="email")return RC;if(O[11].type==="url")return NC;if(O[11].type==="file")return IC;if(O[11].type==="relation")return FC;if(O[11].type==="user")return LC}let M=C(e),D=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),S.c(),l=T(),o=_("span"),a=N(r),u=T(),f=_("td"),c=_("span"),m=N(d),g=T(),v=_("td"),D&&D.c(),b=T(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(O,E){w(O,t,E),h(t,i),h(i,s),S.m(s,null),h(s,l),h(s,o),h(o,a),h(t,u),h(t,f),h(f,c),h(c,m),h(t,g),h(t,v),D&&D.m(v,null),h(t,b)},p(O,E){e=O,$!==($=y(e))&&(S.d(1),S=$(e),S&&(S.c(),S.m(s,l))),E&1&&r!==(r=e[11].name+"")&&he(a,r),E&1&&d!==(d=W.getFieldValueType(e[11])+"")&&he(m,d),M===(M=C(e))&&D?D.p(e,E):(D&&D.d(1),D=M&&M(e),D&&(D.c(),D.m(v,null)))},d(O){O&&k(t),S.d(),D&&D.d()}}}function Ad(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=T(),p(t,"class","tab-item"),ie(t,"active",e[1]===e[6].code),this.first=t},m(u,f){w(u,t,f),h(t,s),h(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&he(s,i),f&6&&ie(t,"active",e[1]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Pd(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),p(t,"class","tab-item"),ie(t,"active",e[1]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),h(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),r&6&&ie(t,"active",e[1]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function VC(n){var ee,ue,Ae;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y=n[0].name+"",$,S,C,M,D,O,E,L,F,R,H,te,Q,j,X,U,Z,oe,ae,Te=[],re=new Map,me,ve,Y,Se,x,J,we,Re,ze,K,pe,ce,ke,Ge,nt,et,kt,it,Mt,Be,Ye,dt,ne,_e,Ke,lt,ut,tt,wt,mt=[],jt=new Map,Nt,We,$e=[],Ve=new Map,Qe,rt=n[4]&&Od();R=new Es({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.records.create('${(ee=n[0])==null?void 0:ee.name}', data);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.create('${(ue=n[0])==null?void 0:ue.name}', body: body);
|
||||
`}});let Pt=(Ae=n[0])==null?void 0:Ae.schema;const Ft=se=>se[11].name;for(let se=0;se<Pt.length;se+=1){let ye=Dd(n,Pt,se),Me=Ft(ye);re.set(Me,Te[se]=Ed(Me,ye))}nt=new hn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let Lt=n[2];const st=se=>se[6].code;for(let se=0;se<Lt.length;se+=1){let ye=Td(n,Lt,se),Me=st(ye);jt.set(Me,mt[se]=Ad(Me,ye))}let I=n[2];const q=se=>se[6].code;for(let se=0;se<I.length;se+=1){let ye=Md(n,I,se),Me=q(ye);Ve.set(Me,$e[se]=Pd(Me,ye))}return{c(){e=_("div"),t=_("strong"),t.textContent="POST",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records"),c=T(),rt&&rt.c(),d=T(),m=_("div"),g=_("p"),v=N("Create a new "),b=_("strong"),$=N(y),S=N(" record."),C=T(),M=_("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,D=T(),O=_("p"),O.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",E=T(),L=_("div"),L.textContent="Client SDKs example",F=T(),B(R.$$.fragment),H=T(),te=_("div"),te.textContent="Body Parameters",Q=T(),j=_("table"),X=_("thead"),X.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="50%">Description</th></tr>`,U=T(),Z=_("tbody"),oe=_("tr"),oe.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
|
||||
<span>id</span></div></td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td><strong>15 characters string</strong> to store as record ID.
|
||||
<br/>
|
||||
If not set, it will be auto generated.</td>`,ae=T();for(let se=0;se<Te.length;se+=1)Te[se].c();me=T(),ve=_("div"),ve.textContent="Query parameters",Y=T(),Se=_("table"),x=_("thead"),x.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,J=T(),we=_("tbody"),Re=_("tr"),ze=_("td"),ze.textContent="expand",K=T(),pe=_("td"),pe.innerHTML='<span class="label">String</span>',ce=T(),ke=_("td"),Ge=N(`Auto expand relations when returning the created record. Ex.:
|
||||
`),B(nt.$$.fragment),et=N(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),kt=_("br"),it=N(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),Mt=_("code"),Mt.textContent="@expand",Be=N(" property (eg. "),Ye=_("code"),Ye.textContent='"@expand": {"rel1": {...}, ...}',dt=N(`). Only the
|
||||
relations that the user has permissions to `),ne=_("strong"),ne.textContent="view",_e=N(" will be expanded."),Ke=T(),lt=_("div"),lt.textContent="Responses",ut=T(),tt=_("div"),wt=_("div");for(let se=0;se<mt.length;se+=1)mt[se].c();Nt=T(),We=_("div");for(let se=0;se<$e.length;se+=1)$e[se].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-success"),p(m,"class","content m-b-base"),p(L,"class","section-title"),p(te,"class","section-title"),p(j,"class","table-compact table-border m-b-lg"),p(ve,"class","section-title"),p(Se,"class","table-compact table-border m-b-lg"),p(lt,"class","section-title"),p(wt,"class","tabs-header compact left"),p(We,"class","tabs-content"),p(tt,"class","tabs")},m(se,ye){w(se,e,ye),h(e,t),h(e,i),h(e,s),h(s,l),h(l,o),h(l,r),h(r,u),h(l,f),h(e,c),rt&&rt.m(e,null),w(se,d,ye),w(se,m,ye),h(m,g),h(g,v),h(g,b),h(b,$),h(g,S),h(m,C),h(m,M),h(m,D),h(m,O),w(se,E,ye),w(se,L,ye),w(se,F,ye),V(R,se,ye),w(se,H,ye),w(se,te,ye),w(se,Q,ye),w(se,j,ye),h(j,X),h(j,U),h(j,Z),h(Z,oe),h(Z,ae);for(let Me=0;Me<Te.length;Me+=1)Te[Me].m(Z,null);w(se,me,ye),w(se,ve,ye),w(se,Y,ye),w(se,Se,ye),h(Se,x),h(Se,J),h(Se,we),h(we,Re),h(Re,ze),h(Re,K),h(Re,pe),h(Re,ce),h(Re,ke),h(ke,Ge),V(nt,ke,null),h(ke,et),h(ke,kt),h(ke,it),h(ke,Mt),h(ke,Be),h(ke,Ye),h(ke,dt),h(ke,ne),h(ke,_e),w(se,Ke,ye),w(se,lt,ye),w(se,ut,ye),w(se,tt,ye),h(tt,wt);for(let Me=0;Me<mt.length;Me+=1)mt[Me].m(wt,null);h(tt,Nt),h(tt,We);for(let Me=0;Me<$e.length;Me+=1)$e[Me].m(We,null);Qe=!0},p(se,[ye]){var fe,de,Fe;(!Qe||ye&1)&&a!==(a=se[0].name+"")&&he(u,a),se[4]?rt||(rt=Od(),rt.c(),rt.m(e,null)):rt&&(rt.d(1),rt=null),(!Qe||ye&1)&&y!==(y=se[0].name+"")&&he($,y);const Me={};ye&9&&(Me.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${se[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.records.create('${(fe=se[0])==null?void 0:fe.name}', data);
|
||||
`),ye&9&&(Me.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${se[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.create('${(de=se[0])==null?void 0:de.name}', body: body);
|
||||
`),R.$set(Me),ye&1&&(Pt=(Fe=se[0])==null?void 0:Fe.schema,Te=ht(Te,ye,Ft,1,se,Pt,re,Z,mn,Ed,null,Dd)),ye&6&&(Lt=se[2],mt=ht(mt,ye,st,1,se,Lt,jt,wt,mn,Ad,null,Td)),ye&6&&(I=se[2],Pe(),$e=ht($e,ye,q,1,se,I,Ve,We,Gt,Pd,null,Md),Le())},i(se){if(!Qe){A(R.$$.fragment,se),A(nt.$$.fragment,se);for(let ye=0;ye<I.length;ye+=1)A($e[ye]);Qe=!0}},o(se){P(R.$$.fragment,se),P(nt.$$.fragment,se);for(let ye=0;ye<$e.length;ye+=1)P($e[ye]);Qe=!1},d(se){se&&k(e),rt&&rt.d(),se&&k(d),se&&k(m),se&&k(E),se&&k(L),se&&k(F),z(R,se),se&&k(H),se&&k(te),se&&k(Q),se&&k(j);for(let ye=0;ye<Te.length;ye+=1)Te[ye].d();se&&k(me),se&&k(ve),se&&k(Y),se&&k(Se),z(nt),se&&k(Ke),se&&k(lt),se&&k(ut),se&&k(tt);for(let ye=0;ye<mt.length;ye+=1)mt[ye].d();for(let ye=0;ye<$e.length;ye+=1)$e[ye].d()}}}function zC(n,e,t){let i,s,{collection:l=new En}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.createRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(W.dummyCollectionRecord(l),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to create record.",
|
||||
"data": {
|
||||
"${(f=(u=l==null?void 0:l.schema)==null?void 0:u[0])==null?void 0:f.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`}])},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||be.baseUrl),[l,o,r,s,i,a]}class BC extends Ee{constructor(e){super(),Oe(this,e,zC,VC,De,{collection:0})}}function Ld(n,e,t){const i=n.slice();return i[6]=e[t],i}function Fd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Id(n,e,t){const i=n.slice();return i[11]=e[t],i}function Nd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function UC(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function WC(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function YC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("User "),i=N(t),s=N(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&he(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function KC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("Relation record "),i=N(t),s=N(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&he(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function ZC(n){let e,t,i,s,l;return{c(){e=N("FormData object."),t=_("br"),i=N(`
|
||||
Set to `),s=_("code"),s.textContent="null",l=N(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:le,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function JC(n){let e;return{c(){e=N("URL address.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function GC(n){let e;return{c(){e=N("Email address.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function XC(n){let e;return{c(){e=N("JSON array or object.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function QC(n){let e;return{c(){e=N("Number value.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function xC(n){let e;return{c(){e=N("Plain text value.")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function Rd(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=W.getFieldValueType(e[11])+"",m,g,v,b;function y(O,E){return O[11].required?WC:UC}let $=y(e),S=$(e);function C(O,E){if(O[11].type==="text")return xC;if(O[11].type==="number")return QC;if(O[11].type==="json")return XC;if(O[11].type==="email")return GC;if(O[11].type==="url")return JC;if(O[11].type==="file")return ZC;if(O[11].type==="relation")return KC;if(O[11].type==="user")return YC}let M=C(e),D=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),S.c(),l=T(),o=_("span"),a=N(r),u=T(),f=_("td"),c=_("span"),m=N(d),g=T(),v=_("td"),D&&D.c(),b=T(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(O,E){w(O,t,E),h(t,i),h(i,s),S.m(s,null),h(s,l),h(s,o),h(o,a),h(t,u),h(t,f),h(f,c),h(c,m),h(t,g),h(t,v),D&&D.m(v,null),h(t,b)},p(O,E){e=O,$!==($=y(e))&&(S.d(1),S=$(e),S&&(S.c(),S.m(s,l))),E&1&&r!==(r=e[11].name+"")&&he(a,r),E&1&&d!==(d=W.getFieldValueType(e[11])+"")&&he(m,d),M===(M=C(e))&&D?D.p(e,E):(D&&D.d(1),D=M&&M(e),D&&(D.c(),D.m(v,null)))},d(O){O&&k(t),S.d(),D&&D.d()}}}function Hd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=T(),p(t,"class","tab-item"),ie(t,"active",e[1]===e[6].code),this.first=t},m(u,f){w(u,t,f),h(t,s),h(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&he(s,i),f&6&&ie(t,"active",e[1]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function jd(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),p(t,"class","tab-item"),ie(t,"active",e[1]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),h(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),r&6&&ie(t,"active",e[1]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function e3(n){var se,ye,Me;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y,$=n[0].name+"",S,C,M,D,O,E,L,F,R,H,te,Q,j,X,U,Z,oe,ae,Te,re,me,ve=[],Y=new Map,Se,x,J,we,Re,ze,K,pe,ce,ke,Ge,nt,et,kt,it,Mt,Be,Ye,dt,ne,_e,Ke,lt,ut,tt,wt,mt,jt,Nt,We=[],$e=new Map,Ve,Qe,rt=[],Pt=new Map,Ft,Lt=n[4]&&Nd();H=new Es({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.records.update('${(se=n[0])==null?void 0:se.name}', 'RECORD_ID', data);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.update('${(ye=n[0])==null?void 0:ye.name}', 'RECORD_ID', body: body);
|
||||
`}});let st=(Me=n[0])==null?void 0:Me.schema;const I=fe=>fe[11].name;for(let fe=0;fe<st.length;fe+=1){let de=Id(n,st,fe),Fe=I(de);Y.set(Fe,ve[fe]=Rd(Fe,de))}it=new hn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let q=n[2];const ee=fe=>fe[6].code;for(let fe=0;fe<q.length;fe+=1){let de=Fd(n,q,fe),Fe=ee(de);$e.set(Fe,We[fe]=Hd(Fe,de))}let ue=n[2];const Ae=fe=>fe[6].code;for(let fe=0;fe<ue.length;fe+=1){let de=Ld(n,ue,fe),Fe=Ae(de);Pt.set(Fe,rt[fe]=jd(Fe,de))}return{c(){e=_("div"),t=_("strong"),t.textContent="PATCH",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=T(),Lt&&Lt.c(),m=T(),g=_("div"),v=_("p"),b=N("Update a single "),y=_("strong"),S=N($),C=N(" record."),M=T(),D=_("p"),D.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,O=T(),E=_("p"),E.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",L=T(),F=_("div"),F.textContent="Client SDKs example",R=T(),B(H.$$.fragment),te=T(),Q=_("div"),Q.textContent="Path parameters",j=T(),X=_("table"),X.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to update.</td></tr></tbody>`,U=T(),Z=_("div"),Z.textContent="Body Parameters",oe=T(),ae=_("table"),Te=_("thead"),Te.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="50%">Description</th></tr>`,re=T(),me=_("tbody");for(let fe=0;fe<ve.length;fe+=1)ve[fe].c();Se=T(),x=_("div"),x.textContent="Query parameters",J=T(),we=_("table"),Re=_("thead"),Re.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,ze=T(),K=_("tbody"),pe=_("tr"),ce=_("td"),ce.textContent="expand",ke=T(),Ge=_("td"),Ge.innerHTML='<span class="label">String</span>',nt=T(),et=_("td"),kt=N(`Auto expand relations when returning the updated record. Ex.:
|
||||
`),B(it.$$.fragment),Mt=N(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Be=_("br"),Ye=N(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),dt=_("code"),dt.textContent="@expand",ne=N(" property (eg. "),_e=_("code"),_e.textContent='"@expand": {"rel1": {...}, ...}',Ke=N(`). Only the
|
||||
relations that the user has permissions to `),lt=_("strong"),lt.textContent="view",ut=N(" will be expanded."),tt=T(),wt=_("div"),wt.textContent="Responses",mt=T(),jt=_("div"),Nt=_("div");for(let fe=0;fe<We.length;fe+=1)We[fe].c();Ve=T(),Qe=_("div");for(let fe=0;fe<rt.length;fe+=1)rt[fe].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-warning"),p(g,"class","content m-b-base"),p(F,"class","section-title"),p(Q,"class","section-title"),p(X,"class","table-compact table-border m-b-lg"),p(Z,"class","section-title"),p(ae,"class","table-compact table-border m-b-lg"),p(x,"class","section-title"),p(we,"class","table-compact table-border m-b-lg"),p(wt,"class","section-title"),p(Nt,"class","tabs-header compact left"),p(Qe,"class","tabs-content"),p(jt,"class","tabs")},m(fe,de){w(fe,e,de),h(e,t),h(e,i),h(e,s),h(s,l),h(l,o),h(l,r),h(r,u),h(l,f),h(l,c),h(e,d),Lt&&Lt.m(e,null),w(fe,m,de),w(fe,g,de),h(g,v),h(v,b),h(v,y),h(y,S),h(v,C),h(g,M),h(g,D),h(g,O),h(g,E),w(fe,L,de),w(fe,F,de),w(fe,R,de),V(H,fe,de),w(fe,te,de),w(fe,Q,de),w(fe,j,de),w(fe,X,de),w(fe,U,de),w(fe,Z,de),w(fe,oe,de),w(fe,ae,de),h(ae,Te),h(ae,re),h(ae,me);for(let Fe=0;Fe<ve.length;Fe+=1)ve[Fe].m(me,null);w(fe,Se,de),w(fe,x,de),w(fe,J,de),w(fe,we,de),h(we,Re),h(we,ze),h(we,K),h(K,pe),h(pe,ce),h(pe,ke),h(pe,Ge),h(pe,nt),h(pe,et),h(et,kt),V(it,et,null),h(et,Mt),h(et,Be),h(et,Ye),h(et,dt),h(et,ne),h(et,_e),h(et,Ke),h(et,lt),h(et,ut),w(fe,tt,de),w(fe,wt,de),w(fe,mt,de),w(fe,jt,de),h(jt,Nt);for(let Fe=0;Fe<We.length;Fe+=1)We[Fe].m(Nt,null);h(jt,Ve),h(jt,Qe);for(let Fe=0;Fe<rt.length;Fe+=1)rt[Fe].m(Qe,null);Ft=!0},p(fe,[de]){var pt,on,qt;(!Ft||de&1)&&a!==(a=fe[0].name+"")&&he(u,a),fe[4]?Lt||(Lt=Nd(),Lt.c(),Lt.m(e,null)):Lt&&(Lt.d(1),Lt=null),(!Ft||de&1)&&$!==($=fe[0].name+"")&&he(S,$);const Fe={};de&9&&(Fe.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${fe[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.records.update('${(pt=fe[0])==null?void 0:pt.name}', 'RECORD_ID', data);
|
||||
`),de&9&&(Fe.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${fe[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.update('${(on=fe[0])==null?void 0:on.name}', 'RECORD_ID', body: body);
|
||||
`),H.$set(Fe),de&1&&(st=(qt=fe[0])==null?void 0:qt.schema,ve=ht(ve,de,I,1,fe,st,Y,me,mn,Rd,null,Id)),de&6&&(q=fe[2],We=ht(We,de,ee,1,fe,q,$e,Nt,mn,Hd,null,Fd)),de&6&&(ue=fe[2],Pe(),rt=ht(rt,de,Ae,1,fe,ue,Pt,Qe,Gt,jd,null,Ld),Le())},i(fe){if(!Ft){A(H.$$.fragment,fe),A(it.$$.fragment,fe);for(let de=0;de<ue.length;de+=1)A(rt[de]);Ft=!0}},o(fe){P(H.$$.fragment,fe),P(it.$$.fragment,fe);for(let de=0;de<rt.length;de+=1)P(rt[de]);Ft=!1},d(fe){fe&&k(e),Lt&&Lt.d(),fe&&k(m),fe&&k(g),fe&&k(L),fe&&k(F),fe&&k(R),z(H,fe),fe&&k(te),fe&&k(Q),fe&&k(j),fe&&k(X),fe&&k(U),fe&&k(Z),fe&&k(oe),fe&&k(ae);for(let de=0;de<ve.length;de+=1)ve[de].d();fe&&k(Se),fe&&k(x),fe&&k(J),fe&&k(we),z(it),fe&&k(tt),fe&&k(wt),fe&&k(mt),fe&&k(jt);for(let de=0;de<We.length;de+=1)We[de].d();for(let de=0;de<rt.length;de+=1)rt[de].d()}}}function t3(n,e,t){let i,s,{collection:l=new En}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.updateRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(W.dummyCollectionRecord(l),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to update record.",
|
||||
"data": {
|
||||
"${(f=(u=l==null?void 0:l.schema)==null?void 0:u[0])==null?void 0:f.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}])},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||be.baseUrl),[l,o,r,s,i,a]}class n3 extends Ee{constructor(e){super(),Oe(this,e,t3,e3,De,{collection:0})}}function qd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Vd(n,e,t){const i=n.slice();return i[6]=e[t],i}function zd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Bd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=T(),p(t,"class","tab-item"),ie(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),h(t,s),h(t,l),o||(r=G(t,"click",a),o=!0)},p(u,f){e=u,f&20&&ie(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Ud(n,e){let t,i,s,l;return i=new hn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),p(t,"class","tab-item"),ie(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),h(t,s),l=!0},p(o,r){e=o,r&20&&ie(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function i3(n){var Re,ze;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y,$=n[0].name+"",S,C,M,D,O,E,L,F,R,H,te,Q,j,X,U,Z=[],oe=new Map,ae,Te,re=[],me=new Map,ve,Y=n[1]&&zd();E=new Es({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(Re=n[0])==null?void 0:Re.name}', 'RECORD_ID');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(ze=n[0])==null?void 0:ze.name}', 'RECORD_ID');
|
||||
`}});let Se=n[4];const x=K=>K[6].code;for(let K=0;K<Se.length;K+=1){let pe=Vd(n,Se,K),ce=x(pe);oe.set(ce,Z[K]=Bd(ce,pe))}let J=n[4];const we=K=>K[6].code;for(let K=0;K<J.length;K+=1){let pe=qd(n,J,K),ce=we(pe);me.set(ce,re[K]=Ud(ce,pe))}return{c(){e=_("div"),t=_("strong"),t.textContent="DELETE",i=T(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=T(),Y&&Y.c(),m=T(),g=_("div"),v=_("p"),b=N("Delete a single "),y=_("strong"),S=N($),C=N(" record."),M=T(),D=_("div"),D.textContent="Client SDKs example",O=T(),B(E.$$.fragment),L=T(),F=_("div"),F.textContent="Path parameters",R=T(),H=_("table"),H.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to delete.</td></tr></tbody>`,te=T(),Q=_("div"),Q.textContent="Responses",j=T(),X=_("div"),U=_("div");for(let K=0;K<Z.length;K+=1)Z[K].c();ae=T(),Te=_("div");for(let K=0;K<re.length;K+=1)re[K].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-danger"),p(g,"class","content m-b-base"),p(D,"class","section-title"),p(F,"class","section-title"),p(H,"class","table-compact table-border m-b-lg"),p(Q,"class","section-title"),p(U,"class","tabs-header compact left"),p(Te,"class","tabs-content"),p(X,"class","tabs")},m(K,pe){w(K,e,pe),h(e,t),h(e,i),h(e,s),h(s,l),h(l,o),h(l,r),h(r,u),h(l,f),h(l,c),h(e,d),Y&&Y.m(e,null),w(K,m,pe),w(K,g,pe),h(g,v),h(v,b),h(v,y),h(y,S),h(v,C),w(K,M,pe),w(K,D,pe),w(K,O,pe),V(E,K,pe),w(K,L,pe),w(K,F,pe),w(K,R,pe),w(K,H,pe),w(K,te,pe),w(K,Q,pe),w(K,j,pe),w(K,X,pe),h(X,U);for(let ce=0;ce<Z.length;ce+=1)Z[ce].m(U,null);h(X,ae),h(X,Te);for(let ce=0;ce<re.length;ce+=1)re[ce].m(Te,null);ve=!0},p(K,[pe]){var ke,Ge;(!ve||pe&1)&&a!==(a=K[0].name+"")&&he(u,a),K[1]?Y||(Y=zd(),Y.c(),Y.m(e,null)):Y&&(Y.d(1),Y=null),(!ve||pe&1)&&$!==($=K[0].name+"")&&he(S,$);const ce={};pe&9&&(ce.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${K[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(ke=K[0])==null?void 0:ke.name}', 'RECORD_ID');
|
||||
`),pe&9&&(ce.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${K[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(Ge=K[0])==null?void 0:Ge.name}', 'RECORD_ID');
|
||||
`),E.$set(ce),pe&20&&(Se=K[4],Z=ht(Z,pe,x,1,K,Se,oe,U,mn,Bd,null,Vd)),pe&20&&(J=K[4],Pe(),re=ht(re,pe,we,1,K,J,me,Te,Gt,Ud,null,qd),Le())},i(K){if(!ve){A(E.$$.fragment,K);for(let pe=0;pe<J.length;pe+=1)A(re[pe]);ve=!0}},o(K){P(E.$$.fragment,K);for(let pe=0;pe<re.length;pe+=1)P(re[pe]);ve=!1},d(K){K&&k(e),Y&&Y.d(),K&&k(m),K&&k(g),K&&k(M),K&&k(D),K&&k(O),z(E,K),K&&k(L),K&&k(F),K&&k(R),K&&k(H),K&&k(te),K&&k(Q),K&&k(j),K&&k(X);for(let pe=0;pe<Z.length;pe+=1)Z[pe].d();for(let pe=0;pe<re.length;pe+=1)re[pe].d()}}}function s3(n,e,t){let i,s,{collection:l=new En}=e,o=204,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.deleteRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:204,body:`
|
||||
null
|
||||
`}),r.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to delete record. Make sure that the record is not part of a required relation reference.",
|
||||
"data": {}
|
||||
}
|
||||
`}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||be.baseUrl),[l,i,o,s,r,a]}class l3 extends Ee{constructor(e){super(),Oe(this,e,s3,i3,De,{collection:0})}}function o3(n){var m,g,v,b,y,$,S,C;let e,t,i,s,l,o,r,a,u,f,c,d;return r=new Es({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(m=n[0])==null?void 0:m.name}', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${(g=n[0])==null?void 0:g.name}/RECORD_ID', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(v=n[0])==null?void 0:v.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${(b=n[0])==null?void 0:b.name}/RECORD_ID') // remove only the record subscription
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(y=n[0])==null?void 0:y.name}', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${($=n[0])==null?void 0:$.name}/RECORD_ID', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(S=n[0])==null?void 0:S.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${(C=n[0])==null?void 0:C.name}/RECORD_ID') // remove only the record subscription
|
||||
`}}),c=new hn({props:{content:JSON.stringify({action:"create",record:W.dummyCollectionRecord(n[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){e=_("div"),e.innerHTML=`<strong class="label label-primary">SSE</strong>
|
||||
<div class="content"><p>/api/realtime</p></div>`,t=T(),i=_("div"),i.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p>
|
||||
<p>Events are send for <strong>create</strong>, <strong>update</strong>
|
||||
and <strong>delete</strong> record operations (see "Event data format" section below).</p>
|
||||
<div class="alert alert-info m-t-10"><div class="icon"><i class="ri-information-line"></i></div>
|
||||
<div class="contet"><p><strong>You could subscribe to a single record or to an entire collection.</strong></p>
|
||||
<p>When you subscribe to a <strong>single record</strong>, the collection's
|
||||
<strong>ViewRule</strong> will be used to determine whether the subscriber has access to receive
|
||||
the event message.</p>
|
||||
<p>When you subscribe to an <strong>entire collection</strong>, the collection's
|
||||
<strong>ListRule</strong> will be used to determine whether the subscriber has access to receive
|
||||
the event message.</p></div></div>`,s=T(),l=_("div"),l.textContent="Client SDKs example",o=T(),B(r.$$.fragment),a=T(),u=_("div"),u.textContent="Event data format",f=T(),B(c.$$.fragment),p(e,"class","alert"),p(i,"class","content m-b-base"),p(l,"class","section-title"),p(u,"class","section-title")},m(M,D){w(M,e,D),w(M,t,D),w(M,i,D),w(M,s,D),w(M,l,D),w(M,o,D),V(r,M,D),w(M,a,D),w(M,u,D),w(M,f,D),V(c,M,D),d=!0},p(M,[D]){var L,F,R,H,te,Q,j,X;const O={};D&3&&(O.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${M[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(L=M[0])==null?void 0:L.name}', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${(F=M[0])==null?void 0:F.name}/RECORD_ID', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(R=M[0])==null?void 0:R.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${(H=M[0])==null?void 0:H.name}/RECORD_ID') // remove only the record subscription
|
||||
`),D&3&&(O.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${M[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(te=M[0])==null?void 0:te.name}', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${(Q=M[0])==null?void 0:Q.name}/RECORD_ID', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(j=M[0])==null?void 0:j.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${(X=M[0])==null?void 0:X.name}/RECORD_ID') // remove only the record subscription
|
||||
`),r.$set(O);const E={};D&1&&(E.content=JSON.stringify({action:"create",record:W.dummyCollectionRecord(M[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),c.$set(E)},i(M){d||(A(r.$$.fragment,M),A(c.$$.fragment,M),d=!0)},o(M){P(r.$$.fragment,M),P(c.$$.fragment,M),d=!1},d(M){M&&k(e),M&&k(t),M&&k(i),M&&k(s),M&&k(l),M&&k(o),z(r,M),M&&k(a),M&&k(u),M&&k(f),z(c,M)}}}function r3(n,e,t){let i,{collection:s=new En}=e;return n.$$set=l=>{"collection"in l&&t(0,s=l.collection)},t(1,i=window.location.href.substring(0,window.location.href.indexOf("/_"))||be.baseUrl),[s,i]}class a3 extends Ee{constructor(e){super(),Oe(this,e,r3,o3,De,{collection:0})}}function Wd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Yd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Kd(n){let e,t,i,s;var l=n[14].component;function o(r){return{props:{collection:r[3]}}}return l&&(t=new l(o(n))),{c(){e=_("div"),t&&B(t.$$.fragment),i=T(),p(e,"class","tab-item active")},m(r,a){w(r,e,a),t&&V(t,e,null),h(e,i),s=!0},p(r,a){const u={};if(a&8&&(u.collection=r[3]),l!==(l=r[14].component)){if(t){Pe();const f=t;P(f.$$.fragment,1,0,()=>{z(f,1)}),Le()}l?(t=new l(o(r)),B(t.$$.fragment),A(t.$$.fragment,1),V(t,e,i)):t=null}else l&&t.$set(u)},i(r){s||(t&&A(t.$$.fragment,r),s=!0)},o(r){t&&P(t.$$.fragment,r),s=!1},d(r){r&&k(e),t&&z(t)}}}function Zd(n,e){let t,i,s,l=e[4]===e[14].id&&Kd(e);return{key:n,first:null,c(){t=xe(),l&&l.c(),i=xe(),this.first=t},m(o,r){w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){e=o,e[4]===e[14].id?l?(l.p(e,r),r&16&&A(l,1)):(l=Kd(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Pe(),P(l,1,1,()=>{l=null}),Le())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&k(t),l&&l.d(o),o&&k(i)}}}function u3(n){let e,t=[],i=new Map,s,l=n[5];const o=r=>r[14].id;for(let r=0;r<l.length;r+=1){let a=Wd(n,l,r),u=o(a);i.set(u,t[r]=Zd(u,a))}return{c(){e=_("div");for(let r=0;r<t.length;r+=1)t[r].c();p(e,"class","tabs-content")},m(r,a){w(r,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(r,a){a&56&&(l=r[5],Pe(),t=ht(t,a,o,1,r,l,i,e,Gt,Zd,null,Wd),Le())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(t[a]);s=!0}},o(r){for(let a=0;a<t.length;a+=1)P(t[a]);s=!1},d(r){r&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function Jd(n,e){let t,i,s=e[14].label+"",l,o,r,a;function u(){return e[9](e[14])}function f(...c){return e[10](e[14],...c)}return{key:n,first:null,c(){t=_("button"),i=_("span"),l=N(s),o=T(),p(i,"class","txt"),p(t,"tabindex","0"),p(t,"class","tab-item"),ie(t,"active",e[4]===e[14].id),this.first=t},m(c,d){w(c,t,d),h(t,i),h(i,l),h(t,o),r||(a=[G(t,"click",u),G(t,"keydown",Wh(f))],r=!0)},p(c,d){e=c,d&48&&ie(t,"active",e[4]===e[14].id)},d(c){c&&k(t),r=!1,Je(a)}}}function f3(n){let e,t,i=n[3].name+"",s,l,o,r,a=[],u=new Map,f=n[5];const c=d=>d[14].id;for(let d=0;d<f.length;d+=1){let m=Yd(n,f,d),g=c(m);u.set(g,a[d]=Jd(g,m))}return{c(){e=_("h4"),t=_("strong"),s=N(i),l=N(" records API"),o=T(),r=_("div");for(let d=0;d<a.length;d+=1)a[d].c();p(r,"class","tabs-header stretched")},m(d,m){w(d,e,m),h(e,t),h(t,s),h(e,l),w(d,o,m),w(d,r,m);for(let g=0;g<a.length;g+=1)a[g].m(r,null)},p(d,m){m&8&&i!==(i=d[3].name+"")&&he(s,i),m&114&&(f=d[5],a=ht(a,m,c,1,d,f,u,r,mn,Jd,null,Yd))},d(d){d&&k(e),d&&k(o),d&&k(r);for(let m=0;m<a.length;m+=1)a[m].d()}}}function c3(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[8]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function d3(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[c3],header:[f3],default:[u3]},$$scope:{ctx:n}};return e=new fi({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 o={};l&524312&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[11](null),z(e,s)}}}function p3(n,e,t){const i=[{id:"list",label:"List",component:TC},{id:"view",label:"View",component:EC},{id:"create",label:"Create",component:BC},{id:"update",label:"Update",component:n3},{id:"delete",label:"Delete",component:l3},{id:"realtime",label:"Realtime",component:a3}];let s,l=new En,o=i[0].id;function r(y){return t(3,l=y),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(y){t(4,o=y)}function f(y,$){(y.code==="Enter"||y.code==="Space")&&(y.preventDefault(),u($))}const c=()=>a(),d=y=>u(y.id),m=(y,$)=>f($,y.id);function g(y){ge[y?"unshift":"push"](()=>{s=y,t(2,s)})}function v(y){at.call(this,n,y)}function b(y){at.call(this,n,y)}return[a,u,s,l,o,i,f,r,c,d,m,g,v,b]}class h3 extends Ee{constructor(e){super(),Oe(this,e,p3,d3,De,{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 m3(n){let e,t,i,s=[n[3]],l={};for(let o=0;o<s.length;o+=1)l=ct(l,s[o]);return{c(){e=_("textarea"),ri(e,l),ie(e,"svelte-1x1pbts",!0)},m(o,r){w(o,e,r)
Line truncated
|
||||
<span class="txt">Upload new file</span>`,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(r,a){w(r,e,a),h(e,t),n[16](t),h(e,i),h(e,s),l||(o=[G(t,"change",n[17]),G(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&k(e),n[16](null),l=!1,Je(o)}}}function p4(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,m,g,v,b=n[4];const y=D=>D[25];for(let D=0;D<b.length;D+=1){let O=Qd(n,b,D),E=y(O);d.set(E,c[D]=xd(E,O))}let $=n[0],S=[];for(let D=0;D<$.length;D+=1)S[D]=ep(Xd(n,$,D));const C=D=>P(S[D],1,1,()=>{S[D]=null});let M=!n[8]&&tp(n);return{c(){e=_("label"),t=_("i"),s=T(),l=_("span"),r=N(o),u=T(),f=_("div");for(let D=0;D<c.length;D+=1)c[D].c();m=T();for(let D=0;D<S.length;D+=1)S[D].c();g=T(),M&&M.c(),p(t,"class",i=W.getFieldTypeIcon(n[3].type)),p(l,"class","txt"),p(e,"for",a=n[21]),p(f,"class","files-list")},m(D,O){w(D,e,O),h(e,t),h(e,s),h(e,l),h(l,r),w(D,u,O),w(D,f,O);for(let E=0;E<c.length;E+=1)c[E].m(f,null);h(f,m);for(let E=0;E<S.length;E+=1)S[E].m(f,null);h(f,g),M&&M.m(f,null),n[19](f),v=!0},p(D,O){if((!v||O&8&&i!==(i=W.getFieldTypeIcon(D[3].type)))&&p(t,"class",i),(!v||O&8)&&o!==(o=D[3].name+"")&&he(r,o),(!v||O&2097152&&a!==(a=D[21]))&&p(e,"for",a),O&1558&&(b=D[4],Pe(),c=ht(c,O,y,1,D,b,d,f,Gt,xd,m,Qd),Le()),O&2049){$=D[0];let E;for(E=0;E<$.length;E+=1){const L=Xd(D,$,E);S[E]?(S[E].p(L,O),A(S[E],1)):(S[E]=ep(L),S[E].c(),A(S[E],1),S[E].m(f,g))}for(Pe(),E=$.length;E<S.length;E+=1)C(E);Le()}D[8]?M&&(M.d(1),M=null):M?M.p(D,O):(M=tp(D),M.c(),M.m(f,null))},i(D){if(!v){for(let O=0;O<b.length;O+=1)A(c[O]);for(let O=0;O<$.length;O+=1)A(S[O]);v=!0}},o(D){for(let O=0;O<c.length;O+=1)P(c[O]);S=S.filter(Boolean);for(let O=0;O<S.length;O+=1)P(S[O]);v=!1},d(D){D&&k(e),D&&k(u),D&&k(f);for(let O=0;O<c.length;O+=1)c[O].d();Gn(S,D),M&&M.d(),n[19](null)}}}function h4(n){let e,t;return e=new Ie({props:{class:"form-field form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[p4,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function m4(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new yn}=e,c,d;function m(E){W.removeByValue(u,E),t(1,u)}function g(E){W.pushUnique(u,E),t(1,u)}function v(E){W.isEmpty(a[E])||a.splice(E,1),t(0,a)}function b(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=E=>m(E),$=E=>g(E),S=E=>v(E);function C(E){ge[E?"unshift":"push"](()=>{c=E,t(6,c)})}const M=()=>{for(let E of c.files)a.push(E);t(0,a),t(6,c.value=null,c)},D=()=>c==null?void 0:c.click();function O(E){ge[E?"unshift":"push"](()=>{d=E,t(7,d)})}return n.$$set=E=>{"record"in E&&t(2,o=E.record),"value"in E&&t(12,r=E.value),"uploadedFiles"in E&&t(0,a=E.uploadedFiles),"deletedFileIndexes"in E&&t(1,u=E.deletedFileIndexes),"field"in E&&t(3,f=E.field)},n.$$.update=()=>{var E,L;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=W.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=W.toArray(u))),n.$$.dirty&8&&t(5,i=((E=f.options)==null?void 0:E.maxSelect)>1),n.$$.dirty&4128&&W.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=W.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((L=f.options)==null?void 0:L.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&b()},[a,u,o,f,s,i,c,d,l,m,g,v,r,y,$,S,C,M,D,O]}class g4 extends Ee{constructor(e){super(),Oe(this,e,m4,h4,De,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function np(n){let e,t;return{c(){e=_("small"),t=N(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){w(i,e,s),h(e,t)},p(i,s){s&2&&he(t,i[1])},d(i){i&&k(e)}}}function _4(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&np(n);return{c(){e=_("i"),i=T(),s=_("div"),l=_("div"),r=N(o),a=T(),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,m){w(d,e,m),w(d,i,m),w(d,s,m),h(s,l),h(l,r),h(s,a),c&&c.m(s,null),u||(f=Ue(t=Ct.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[m]){t&&Bn(t.update)&&m&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),m&1&&o!==(o=d[0].id+"")&&he(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,m):(c=np(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:le,o:le,d(d){d&&k(e),d&&k(i),d&&k(s),c&&c.d(),u=!1,f()}}}function b4(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["name","title","label","key","email","heading","content",...ObjectLine truncated
|
||||
`,p(e,"class","block txt-center txt-disabled")},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function j4(n){let e,t,i;function s(o){n[31](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new R4({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function q4(n){let e,t,i;function s(o){n[30](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new T4({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function V4(n){let e,t,i,s,l;function o(f){n[27](f,n[40])}function r(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 g4({props:u}),ge.push(()=>Ne(e,"value",o)),ge.push(()=>Ne(e,"uploadedFiles",r)),ge.push(()=>Ne(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],He(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[40].name],He(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[40].name],He(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){z(e,f)}}}function z4(n){let e,t,i;function s(o){n[26](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new J3({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function B4(n){let e,t,i;function s(o){n[25](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new W3({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function U4(n){let e,t,i;function s(o){n[24](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new V3({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function W4(n){let e,t,i;function s(o){n[23](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new R3({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function Y4(n){let e,t,i;function s(o){n[22](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new L3({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function K4(n){let e,t,i;function s(o){n[21](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new O3({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function Z4(n){let e,t,i;function s(o){n[20](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new C3({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function J4(n){let e,t,i;function s(o){n[19](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new k3({props:l}),ge.push(()=>Ne(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;
Line truncated
|
||||
<span class="txt">Delete</span>`,p(e,"tabindex","0"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[18]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function Q4(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",o,r,a,u,f,c=!n[2].isNew&&n[10]&&cp(n);return{c(){e=_("h4"),i=N(t),s=T(),o=N(l),r=N(" record"),a=T(),c&&c.c(),u=xe()},m(d,m){w(d,e,m),h(e,i),h(e,s),h(e,o),h(e,r),w(d,a,m),c&&c.m(d,m),w(d,u,m),f=!0},p(d,m){(!f||m[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&he(i,t),(!f||m[0]&1)&&l!==(l=d[0].name+"")&&he(o,l),!d[2].isNew&&d[10]?c?(c.p(d,m),m[0]&1028&&A(c,1)):(c=cp(d),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(Pe(),P(c,1,1,()=>{c=null}),Le())},i(d){f||(A(c),f=!0)},o(d){P(c),f=!1},d(d){d&&k(e),d&&k(a),c&&c.d(d),d&&k(u)}}}function x4(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=T(),s=_("button"),l=_("span"),r=N(o),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[9]||n[7],ie(s,"btn-loading",n[7])},m(c,d){w(c,e,d),h(e,t),w(c,i,d),w(c,s,d),h(s,l),h(l,r),u||(f=G(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&he(r,o),d[0]&640&&a!==(a=!c[9]||c[7])&&(s.disabled=a),d[0]&128&&ie(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function eM(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[x4],header:[Q4],default:[G4]},$$scope:{ctx:n}};return e=new fi({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 o={};l[0]&288&&(o.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[33](null),z(e,s)}}}function dp(n){return JSON.stringify(n)}function tM(n,e,t){let i,s,l,o;const r=ln(),a="record_"+W.randomString(5);let{collection:u}=e,f,c=null,d=new ao,m=!1,g=!1,v={},b={},y="";function $(x){return C(x),t(8,g=!0),f==null?void 0:f.show()}function S(){return f==null?void 0:f.hide()}async function C(x){ki({}),c=x||{},t(2,d=x!=null&&x.clone?x.clone():new ao),t(3,v={}),t(4,b={}),await xn(),t(15,y=dp(d))}function M(){if(m||!l)return;t(7,m=!0);const x=O();let J;d.isNew?J=be.records.create(u==null?void 0:u.id,x):J=be.records.update(u==null?void 0:u.id,d.id,x),J.then(async we=>{un(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),S(),r("save",we)}).catch(we=>{be.errorResponseHandler(we)}).finally(()=>{t(7,m=!1)})}function D(){!(c!=null&&c.id)||vi("Do you really want to delete the selected record?",()=>be.records.delete(c["@collectionId"],c.id).then(()=>{S(),un("Successfully deleted record."),r("delete",c)}).catch(x=>{be.errorResponseHandler(x)}))}function O(){const x=(d==null?void 0:d.export())||{},J=new FormData,we={};for(const Re of(u==null?void 0:u.schema)||[])we[Re.name]=Re;for(const Re in x)!we[Re]||(typeof x[Re]>"u"&&(x[Re]=null),W.addValueToFormData(J,Re,x[Re]));for(const Re in v){const ze=W.toArray(v[Re]);for(const K of ze)J.append(Re,K)}for(const Re in b){const ze=W.toArray(b[Re]);for(const K of ze)J.append(Re+"."+K,"")}return J}const E=()=>S(),L=()=>D();function F(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function R(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function H(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function te(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function Q(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function j(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function X(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function U(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function Z(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function oe(x,J){n.$$.not_equal(v[J.name],x)&&(v[J.name]=x,t(3,v))}function ae(x,J){n.$$.not_equal(b[J.name],x)&&(b[J.name]=x,t(4,b))}function Te(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}function re(x,J){n.$$.not_equal(d[J.name],x)&&(d[J.name]=x,t(2,d))}const me=()=>s&&g?(vi("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,g=!1),S()}),!1):!0;function ve(x){ge[x?"unshift":"push"](()=>{f=x,t(6,f)})}function Y(x){at.call(this,n,x)}function Se(x){at.call(this,n,x)}return n.$$set=x=>{"collection"in x&&t(0,u=x.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(16,i=W.hasNonEmptyProps(v)||W.hasNonEmptyProps(b)),n.$$.dirty[0]&98308&&t(5,s=i||y!=dp(d)),n.$$.dirty[0]&36&&t(9,l=d.isNew||s),n.$$.dirty[0]&1&&t(10,o=(u==null?void 0:u.name)!=="profiles")},[u,S,d,v,b,s,f,m,g,l,o,a,M,D,$,y,i,E,L,F,R,H,te,Q,j,X,U,Z,oe,ae,Te,re,me,ve,Y,Se]}class m_ extends Ee{constructor(e){super(),Oe(this,e,tM,eM,De,{collection:0,show:14,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[1]}}fLine truncated
|
||||
`},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function $p(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[28]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function Cp(n,e){let t,i,s;return i=new g_({props:{record:e[35],field:e[38]}}),{key:n,first:null,c(){t=xe(),B(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),V(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8&&(r.record=e[35]),o[0]&2048&&(r.field=e[38]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function Mp(n,e){let t,i,s,l,o,r,a,u,f,c,d,m,g,v=[],b=new Map,y,$,S,C,M,D,O,E,L,F,R,H;function te(){return e[25](e[35])}m=new Jo({props:{id:e[35].id}});let Q=e[11];const j=Z=>Z[38].name;for(let Z=0;Z<Q.length;Z+=1){let oe=yp(e,Q,Z),ae=j(oe);b.set(ae,v[Z]=Cp(ae,oe))}S=new bi({props:{date:e[35].created}}),D=new bi({props:{date:e[35].updated}});function X(){return e[26](e[35])}function U(...Z){return e[27](e[35],...Z)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),l=_("input"),a=T(),u=_("label"),c=T(),d=_("td"),B(m.$$.fragment),g=T();for(let Z=0;Z<v.length;Z+=1)v[Z].c();y=T(),$=_("td"),B(S.$$.fragment),C=T(),M=_("td"),B(D.$$.fragment),O=T(),E=_("td"),E.innerHTML='<i class="ri-arrow-right-line"></i>',L=T(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[35].id),l.checked=r=e[5][e[35].id],p(u,"for",f="checkbox_"+e[35].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(d,"class","col-type-text col-field-id"),p($,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(E,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Z,oe){w(Z,t,oe),h(t,i),h(i,s),h(s,l),h(s,a),h(s,u),h(t,c),h(t,d),V(m,d,null),h(t,g);for(let ae=0;ae<v.length;ae+=1)v[ae].m(t,null);h(t,y),h(t,$),V(S,$,null),h(t,C),h(t,M),V(D,M,null),h(t,O),h(t,E),h(t,L),F=!0,R||(H=[G(l,"change",te),G(s,"click",Xn(e[19])),G(t,"click",X),G(t,"keydown",U)],R=!0)},p(Z,oe){e=Z,(!F||oe[0]&8&&o!==(o="checkbox_"+e[35].id))&&p(l,"id",o),(!F||oe[0]&40&&r!==(r=e[5][e[35].id]))&&(l.checked=r),(!F||oe[0]&8&&f!==(f="checkbox_"+e[35].id))&&p(u,"for",f);const ae={};oe[0]&8&&(ae.id=e[35].id),m.$set(ae),oe[0]&2056&&(Q=e[11],Pe(),v=ht(v,oe,j,1,e,Q,b,t,Gt,Cp,y,yp),Le());const Te={};oe[0]&8&&(Te.date=e[35].created),S.$set(Te);const re={};oe[0]&8&&(re.date=e[35].updated),D.$set(re)},i(Z){if(!F){A(m.$$.fragment,Z);for(let oe=0;oe<Q.length;oe+=1)A(v[oe]);A(S.$$.fragment,Z),A(D.$$.fragment,Z),F=!0}},o(Z){P(m.$$.fragment,Z);for(let oe=0;oe<v.length;oe+=1)P(v[oe]);P(S.$$.fragment,Z),P(D.$$.fragment,Z),F=!1},d(Z){Z&&k(t),z(m);for(let oe=0;oe<v.length;oe+=1)v[oe].d();z(S),z(D),R=!1,Je(H)}}}function Tp(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),h(e,t),h(e,s),h(e,l),h(e,o)},p(r,a){a[0]&8&&i!==(i=r[3].length+"")&&he(s,i),a[0]&16&&he(o,r[4])},d(r){r&&k(e)}}}function Dp(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ie(t,"btn-loading",n[8]),ie(t,"btn-disabled",n[8]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),h(e,t),h(t,i),h(i,s),h(i,o),h(i,r),a||(u=G(t,"click",n[29]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&he(o,l),c[0]&256&&ie(t,"btn-loading",f[8]),c[0]&256&&ie(t,"btn-disabled",f[8])},d(f){f&&k(e),a=!1,u()}}}function Op(n){let e,t,i,s,l,o,r=n[6]===1?"record":"records",a,u,f,c,d,m,g,v,b,y,$;return{c(){e=_("div"),t=_("div"),i=N("Selected "),s=_("strong"),l=N(n[6]),o=T(),a=N(r),u=T(),f=_("button"),f.innerHTML='<span class="txt">Reset</span>',c=T(),d=_("div"),m=T(),g=_("button"),g.innerHTML='<span class="txt">Delete selected</span>',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ie(f,"btn-disabled",n[9]),p(d,"class","flex-fill"),p(g,"type","button"),p(g,"class","btn btn-sm btn-secondary btn-danger"),ie(g,"btn-loading",n[9]),ie(g,"btn-disabled",n[9]),p(e,"class","bulkbar")},m(S,C){w(S,e,C),h(e,t),h(t,i),h(t,s),h(s,l),h(t,o),h(t,a),h(e,u),h(e,f),h(e,c),h(e,d),h(e,m),h(e,g),b=!0,y||($=[G(f,"click",n[30]),G(g,"click",n[31])],y=!0)},p(S,C){(!b||C[0]&64)&&he(l,S[6]),(!b||C[0]&64)&&r!==(r=S[6]===1?"record":"records")&&he(a,r),C[0]&512&&ie(f,"btn-disabled",S[9]),C[0]&512&&ie(g,"btn-loading",S[9]),C[0]&512&&ie(g,"btn-disabled",S[9])},i(S){b||(S&&Ot(()=>{v||(v=ot(e,jn,{duration:150,y:5},!0)),v.run(1)}),b=!0)},o(S){S&&(v||(v=ot(e,jn,{duration:150,y:5},!1)),v.run(0)),b=!1},d(S){S&&k(e),S&&v&&v.end(),y=!1,Je($)}}}function SM(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v=[],b=new Map,y,$,S,C,M,D,O,E,L,F,R=[],H=new Map,te,Q,j,X,U,Z,oe;function ae(ce){n[21](ce)}let Te={class:"col-type-text col-fie
Line truncated
|
||||
<span class="txt">API Preview</span>`,S=T(),C=_("button"),C.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">New record</span>`,M=T(),B(D.$$.fragment),O=T(),B(E.$$.fragment),p(o,"class","breadcrumb-item"),p(a,"class","breadcrumb-item"),p(l,"class","breadcrumbs"),p(m,"type","button"),p(m,"class","btn btn-secondary btn-circle"),p(d,"class","inline-flex gap-5"),p($,"type","button"),p($,"class","btn btn-outline"),p(C,"type","button"),p(C,"class","btn btn-expanded"),p(y,"class","btns-group"),p(s,"class","page-header"),p(i,"class","page-wrapper")},m(U,Z){V(e,U,Z),w(U,t,Z),w(U,i,Z),h(i,s),h(s,l),h(l,o),h(l,r),h(l,a),h(a,f),h(s,c),h(s,d),h(d,m),h(d,g),V(v,d,null),h(s,b),h(s,y),h(y,$),h(y,S),h(y,C),h(i,M),V(D,i,null),h(i,O),V(E,i,null),R=!0,H||(te=[Ue(Ct.call(null,m,{text:"Edit collection",position:"right"})),G(m,"click",n[12]),G($,"click",n[14]),G(C,"click",n[15])],H=!0)},p(U,Z){(!R||Z&4)&&u!==(u=U[2].name+"")&&he(f,u);const oe={};Z&1&&(oe.value=U[0]),Z&4&&(oe.autocompleteCollection=U[2]),D.$set(oe);const ae={};Z&4&&(ae.collection=U[2]),!L&&Z&1&&(L=!0,ae.filter=U[0],He(()=>L=!1)),!F&&Z&2&&(F=!0,ae.sort=U[1],He(()=>F=!1)),E.$set(ae)},i(U){R||(A(e.$$.fragment,U),A(v.$$.fragment,U),A(D.$$.fragment,U),A(E.$$.fragment,U),R=!0)},o(U){P(e.$$.fragment,U),P(v.$$.fragment,U),P(D.$$.fragment,U),P(E.$$.fragment,U),R=!1},d(U){z(e,U),U&&k(t),U&&k(i),z(v),z(D),n[17](null),z(E),H=!1,Je(te)}}}function TM(n){let e,t,i,s,l,o,r,a;return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=T(),s=_("h1"),s.textContent="Create your first collection to add records!",l=T(),o=_("button"),o.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">Create new collection</span>`,p(t,"class","icon"),p(s,"class","m-b-10"),p(o,"type","button"),p(o,"class","btn btn-expanded-lg btn-lg"),p(e,"class","placeholder-section m-b-base")},m(u,f){w(u,e,f),h(e,t),h(e,i),h(e,s),h(e,l),h(e,o),r||(a=G(o,"click",n[11]),r=!0)},p:le,i:le,o:le,d(u){u&&k(e),r=!1,a()}}}function DM(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
|
||||
<h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:le,i:le,o:le,d(t){t&&k(e)}}}function OM(n){let e,t,i,s,l,o,r,a,u;const f=[DM,TM,MM],c=[];function d(b,y){return b[8]?0:b[7].length?2:1}e=d(n),t=c[e]=f[e](n);let m={};s=new Wa({props:m}),n[21](s);let g={};o=new h3({props:g}),n[22](o);let v={collection:n[2]};return a=new m_({props:v}),n[23](a),a.$on("save",n[24]),a.$on("delete",n[25]),{c(){t.c(),i=T(),B(s.$$.fragment),l=T(),B(o.$$.fragment),r=T(),B(a.$$.fragment)},m(b,y){c[e].m(b,y),w(b,i,y),V(s,b,y),w(b,l,y),V(o,b,y),w(b,r,y),V(a,b,y),u=!0},p(b,[y]){let $=e;e=d(b),e===$?c[e].p(b,y):(Pe(),P(c[$],1,1,()=>{c[$]=null}),Le(),t=c[e],t?t.p(b,y):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const S={};s.$set(S);const C={};o.$set(C);const M={};y&4&&(M.collection=b[2]),a.$set(M)},i(b){u||(A(t),A(s.$$.fragment,b),A(o.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){P(t),P(s.$$.fragment,b),P(o.$$.fragment,b),P(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[21](null),z(s,b),b&&k(l),n[22](null),z(o,b),b&&k(r),n[23](null),z(a,b)}}}function EM(n,e,t){let i,s,l,o,r,a;yt(n,oi,U=>t(2,s=U)),yt(n,Cs,U=>t(10,l=U)),yt(n,Io,U=>t(26,o=U)),yt(n,Rt,U=>t(27,r=U)),yt(n,ta,U=>t(8,a=U)),fn(Rt,r="Collections",r);const u=new URLSearchParams(o);let f,c,d,m,g=u.get("filter")||"",v=u.get("sort")||"-created",b=u.get("collectionId")||"";function y(){t(9,b=s.id),t(1,v="-created"),t(0,g="")}V2(b);const $=()=>f==null?void 0:f.show(),S=()=>f==null?void 0:f.show(s),C=()=>m==null?void 0:m.load(),M=()=>c==null?void 0:c.show(s),D=()=>d==null?void 0:d.show(),O=U=>t(0,g=U.detail);function E(U){ge[U?"unshift":"push"](()=>{m=U,t(6,m)})}function L(U){g=U,t(0,g)}function F(U){v=U,t(1,v)}const R=U=>d==null?void 0:d.show(U==null?void 0:U.detail);function H(U){ge[U?"unshift":"push"](()=>{f=U,t(3,f)})}function te(U){ge[U?"unshift":"push"](()=>{c=U,t(4,c)})}function Q(U){ge[U?"unshift":"push"](()=>{d=U,t(5,d)})}const j=()=>m==null?void 0:m.load(),X=()=>m==null?void 0:m.load();return n.$$.update=()=>{if(n.$$.dirty&1024&&t(7,i=l.filter(U=>U.name!="profiles")),n.$$.dirty&516&&(s==null?void 0:s.id)&&b!=s.id&&y(),n.$$.dirty&7&&(v||g||(s==null?void 0:s.id))){const U=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:g,sort:v}).toString();yi("/collections?"+U)}},[g,v,s,f,c,d,m,i,a,b,l,$,S,C,M,D,O,E,L,F,R,H,te,Q,j,X]}class AM extends Ee{constructor(e){super(),Oe(this,e,EM,OM,De,{})}}function Ep(n){let e,t;return e=new Ie({props:{class:"form-field disabled",name:"id",$$slots:{default:[PM,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&2|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function PM(n){let e,t,i,s,l,o,r,a,u;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="ID",o=T(),r=_("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[31]),p(r,"type","text"),p(r,"id",a=n[31]),r.value=u=n[1].id,r.disabled=!0},m(f,c){w(f,e,c),h(e,t),h(e,i),h(e,s),w(f,o,c),w(f,r,c)},p(f,c){c[1]&1&&l!==(l=f[31])&&p(e,"for",l),c[1]&1&&a!==(a=f[31])&&p(r,"id",a),c[0]&2&&u!==(u=f[1].id)&&r.value!==u&&(r.value=u)},d(f){f&&k(e),f&&k(o),f&&k(r)}}}function Ap(n){let e,t,i;return{c(){e=_("div"),e.innerHTML='<i class="ri-shield-check-line"></i>',p(e,"class","form-field-addon txt-success")},m(s,l){w(s,e,l),t||(i=Ue(Ct.call(null,e,"Verified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function LM(n){let e,t,i,s,l,o,r,a,u,f,c,d=n[1].verified&&Ap();return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="Email",o=T(),d&&d.c(),r=T(),a=_("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[31]),p(a,"type","email"),p(a,"autocomplete","off"),p(a,"id",u=n[31]),a.required=!0},m(m,g){w(m,e,g),h(e,t),h(e,i),h(e,s),w(m,o,g),d&&d.m(m,g),w(m,r,g),w(m,a,g),Ce(a,n[2]),f||(c=G(a,"input",n[19]),f=!0)},p(m,g){g[1]&1&&l!==(l=m[31])&&p(e,"for",l),m[1].verified?d||(d=Ap(),d.c(),d.m(r.parentNode,r)):d&&(d.d(1),d=null),g[1]&1&&u!==(u=m[31])&&p(a,"id",u),g[0]&4&&a.value!==m[2]&&Ce(a,m[2])},d(m){m&&k(e),m&&k(o),d&&d.d(m),m&&k(r),m&&k(a),f=!1,c()}}}function Pp(n){let e,t;return e=new Ie({props:{class:"form-field form-field-toggle",$$slots:{default:[FM,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&8|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function FM(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[31]),p(s,"for",o=n[31])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),h(s,l),r||(a=G(e,"change",n[20]),r=!0)},p(u,f){f[1]&1&&t!==(t=u[31])&&p(e,"id",t),f[0]&8&&(e.checked=u[3]),f[1]&1&&o!==(o=u[31])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Lp(n)Line truncated
|
||||
<span class="txt">Send verification email</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[16]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function qM(n){let e,t,i,s,l=!n[1].verified&&Np(n);return{c(){l&&l.c(),e=T(),t=_("button"),t.innerHTML=`<i class="ri-delete-bin-7-line"></i>
|
||||
<span class="txt">Delete</span>`,p(t,"type","button"),p(t,"class","dropdown-item")},m(o,r){l&&l.m(o,r),w(o,e,r),w(o,t,r),i||(s=G(t,"click",n[17]),i=!0)},p(o,r){o[1].verified?l&&(l.d(1),l=null):l?l.p(o,r):(l=Np(o),l.c(),l.m(e.parentNode,e))},d(o){l&&l.d(o),o&&k(e),o&&k(t),i=!1,s()}}}function VM(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].isNew&&Ip(n);return{c(){m&&m.c(),e=T(),t=_("button"),i=_("span"),i.textContent="Cancel",s=T(),l=_("button"),o=_("span"),a=N(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[5],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[5],ie(l,"btn-loading",n[5])},m(g,v){m&&m.m(g,v),w(g,e,v),w(g,t,v),h(t,i),w(g,s,v),w(g,l,v),h(l,o),h(o,a),f=!0,c||(d=G(t,"click",n[18]),c=!0)},p(g,v){g[1].isNew?m&&(Pe(),P(m,1,1,()=>{m=null}),Le()):m?(m.p(g,v),v[0]&2&&A(m,1)):(m=Ip(g),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||v[0]&32)&&(t.disabled=g[5]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&he(a,r),(!f||v[0]&1056&&u!==(u=!g[10]||g[5]))&&(l.disabled=u),v[0]&32&&ie(l,"btn-loading",g[5])},i(g){f||(A(m),f=!0)},o(g){P(m),f=!1},d(g){m&&m.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function zM(n){let e,t,i={popup:!0,class:"user-panel",beforeHide:n[24],$$slots:{footer:[VM],header:[jM],default:[HM]},$$scope:{ctx:n}};return e=new fi({props:i}),n[25](e),e.$on("hide",n[26]),e.$on("show",n[27]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&1088&&(o.beforeHide=s[24]),l[0]&1966|l[1]&2&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[25](null),z(e,s)}}}function BM(n,e,t){let i;const s=ln(),l="user_"+W.randomString(5);let o,r=new uo,a=!1,u=!1,f="",c="",d="",m=!1,g=!0;function v(Z){return y(Z),t(6,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(Z){ki({}),t(1,r=Z!=null&&Z.clone?Z.clone():new uo),$()}function $(){t(3,m=!1),t(9,g=!0),t(2,f=(r==null?void 0:r.email)||""),t(7,c=""),t(8,d="")}function S(){if(a||!i)return;t(5,a=!0);const Z={email:f};(r.isNew||m)&&(Z.password=c,Z.passwordConfirm=d);let oe;r.isNew?oe=be.users.create(Z):oe=be.users.update(r.id,Z),oe.then(async ae=>{g&&M(!1),t(6,u=!1),b(),un(r.isNew?"Successfully created user.":"Successfully updated user."),s("save",ae)}).catch(ae=>{be.errorResponseHandler(ae)}).finally(()=>{t(5,a=!1)})}function C(){!(r!=null&&r.id)||vi("Do you really want to delete the selected user?",()=>be.users.delete(r.id).then(()=>{t(6,u=!1),b(),un("Successfully deleted user."),s("delete",r)}).catch(Z=>{be.errorResponseHandler(Z)}))}function M(Z=!0){return be.users.requestVerification(r.isNew?f:r.email).then(()=>{t(6,u=!1),b(),Z&&un(`Successfully sent verification email to ${r.email}.`)}).catch(oe=>{be.errorResponseHandler(oe)})}const D=()=>M(),O=()=>C(),E=()=>b();function L(){f=this.value,t(2,f)}function F(){m=this.checked,t(3,m)}function R(){c=this.value,t(7,c)}function H(){d=this.value,t(8,d)}function te(){g=this.checked,t(9,g)}const Q=()=>i&&u?(vi("You have unsaved changes. Do you really want to close the panel?",()=>{t(6,u=!1),b()}),!1):!0;function j(Z){ge[Z?"unshift":"push"](()=>{o=Z,t(4,o)})}function X(Z){at.call(this,n,Z)}function U(Z){at.call(this,n,Z)}return n.$$.update=()=>{n.$$.dirty[0]&14&&t(10,i=r.isNew&&f!=""||m||f!==r.email)},[b,r,f,m,o,a,u,c,d,g,i,l,S,C,M,v,D,O,E,L,F,R,H,te,Q,j,X,U]}class UM extends Ee{constructor(e){super(),Oe(this,e,BM,zM,De,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function Rp(n,e,t){const i=n.slice();return i[40]=e[t],i}function Hp(n,e,t){const i=n.slice();return i[43]=e[t],i}function jp(n,e,t){const i=n.slice();return i[43]=e[t],i}function WM(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,$,S,C,M,D,O,E,L,F,R=[],H=new Map,te,Q,j,X,U,Z,oe,ae,Te,re,me=[],ve=new Map,Y,Se,x,J,we;u=new zo({}),u.$on("refresh",n[17]),v=new Vo({props:{value:n[3],placeholder:"Search filter, eg. verified=1",extraAutocompleteKeys:["verified","email"]}}),v.$on("submit",n[19]);function Re(ne){n[20](ne)}let ze={class:"col-type-text col-field-id",name:"id",$$slots:{default:[KM]},$$scope:{ctx:n}};n[4]!==void 0&&(ze.sort=n[4]),M=new nn({props:ze}),ge.push(()=>Ne(M,"sort",Re));function K(ne){n[21](ne)}let pe={class:"col-type-email col-field-email",name:"email",$$slots:{default:[ZM]},$$scope:{ctx:n}};n[4]!==void 0&&(pe.sort=n[4]),E=new nn({props:pe}),ge.push(()=>Ne(E,"sort",K));let ce=n[12];const ke=ne=>ne[43].name;for(let ne=0;ne<ce.length;ne+=1){let _e=jp(n,ce,ne),Ke=ke(_e);H.set(Ke,R[ne]=qp(Ke,_e))}function Ge(ne){n[22](ne)}let nt={class:"col-type-date col-field-created",name:"created",$$slots:{default:[JM]},$$scope:{ctx:n}};n[4]!==void 0&&(nt.sort=n[4]),Q=new nn({props:nt}),ge.push(()=>Ne(Q,"sort",Ge));function et(ne){n[23](ne)}let kt={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[GM]},$$scope:{ctx:n}};n[4]!==void 0&Line truncated
|
||||
<span class="txt">New user</span>`,g=T(),B(v.$$.fragment),b=T(),y=_("div"),$=_("table"),S=_("thead"),C=_("tr"),B(M.$$.fragment),O=T(),B(E.$$.fragment),F=T();for(let ne=0;ne<R.length;ne+=1)R[ne].c();te=T(),B(Q.$$.fragment),X=T(),B(U.$$.fragment),oe=T(),ae=_("th"),Te=T(),re=_("tbody");for(let ne=0;ne<me.length;ne+=1)me[ne].c();Be&&Be.c(),Y=T(),Ye&&Ye.c(),Se=T(),dt&&dt.c(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(r,"type","button"),p(r,"class","btn btn-secondary btn-circle"),p(c,"class","flex-fill"),p(m,"type","button"),p(m,"class","btn btn-expanded"),p(t,"class","page-header"),p(ae,"class","col-type-action min-width"),p($,"class","table"),ie($,"table-loading",n[10]),p(y,"class","table-wrapper"),p(e,"class","page-wrapper")},m(ne,_e){w(ne,e,_e),h(e,t),h(t,i),h(i,s),h(s,l),h(t,o),h(t,r),h(t,a),V(u,t,null),h(t,f),h(t,c),h(t,d),h(t,m),h(e,g),V(v,e,null),h(e,b),h(e,y),h(y,$),h($,S),h(S,C),V(M,C,null),h(C,O),V(E,C,null),h(C,F);for(let Ke=0;Ke<R.length;Ke+=1)R[Ke].m(C,null);h(C,te),V(Q,C,null),h(C,X),V(U,C,null),h(C,oe),h(C,ae),h($,Te),h($,re);for(let Ke=0;Ke<me.length;Ke+=1)me[Ke].m(re,null);Be&&Be.m(re,null),h(e,Y),Ye&&Ye.m(e,null),h(e,Se),dt&&dt.m(e,null),x=!0,J||(we=[Ue(Ct.call(null,r,{text:"Edit profile collection",position:"right"})),G(r,"click",n[16]),G(m,"click",n[18])],J=!0)},p(ne,_e){(!x||_e[0]&16384)&&he(l,ne[14]);const Ke={};_e[0]&8&&(Ke.value=ne[3]),v.$set(Ke);const lt={};_e[1]&131072&&(lt.$$scope={dirty:_e,ctx:ne}),!D&&_e[0]&16&&(D=!0,lt.sort=ne[4],He(()=>D=!1)),M.$set(lt);const ut={};_e[1]&131072&&(ut.$$scope={dirty:_e,ctx:ne}),!L&&_e[0]&16&&(L=!0,ut.sort=ne[4],He(()=>L=!1)),E.$set(ut),_e[0]&4096&&(ce=ne[12],R=ht(R,_e,ke,1,ne,ce,H,C,mn,qp,te,jp));const tt={};_e[1]&131072&&(tt.$$scope={dirty:_e,ctx:ne}),!j&&_e[0]&16&&(j=!0,tt.sort=ne[4],He(()=>j=!1)),Q.$set(tt);const wt={};_e[1]&131072&&(wt.$$scope={dirty:_e,ctx:ne}),!Z&&_e[0]&16&&(Z=!0,wt.sort=ne[4],He(()=>Z=!1)),U.$set(wt),_e[0]&5450&&(it=ne[1],Pe(),me=ht(me,_e,Mt,1,ne,it,ve,re,Gt,Up,null,Rp),Le(),!it.length&&Be?Be.p(ne,_e):it.length?Be&&(Be.d(1),Be=null):(Be=Vp(ne),Be.c(),Be.m(re,null))),_e[0]&1024&&ie($,"table-loading",ne[10]),ne[1].length?Ye?Ye.p(ne,_e):(Ye=Wp(ne),Ye.c(),Ye.m(e,Se)):Ye&&(Ye.d(1),Ye=null),ne[1].length&&ne[13]?dt?dt.p(ne,_e):(dt=Yp(ne),dt.c(),dt.m(e,null)):dt&&(dt.d(1),dt=null)},i(ne){if(!x){A(u.$$.fragment,ne),A(v.$$.fragment,ne),A(M.$$.fragment,ne),A(E.$$.fragment,ne),A(Q.$$.fragment,ne),A(U.$$.fragment,ne);for(let _e=0;_e<it.length;_e+=1)A(me[_e]);x=!0}},o(ne){P(u.$$.fragment,ne),P(v.$$.fragment,ne),P(M.$$.fragment,ne),P(E.$$.fragment,ne),P(Q.$$.fragment,ne),P(U.$$.fragment,ne);for(let _e=0;_e<me.length;_e+=1)P(me[_e]);x=!1},d(ne){ne&&k(e),z(u),z(v),z(M),z(E);for(let _e=0;_e<R.length;_e+=1)R[_e].d();z(Q),z(U);for(let _e=0;_e<me.length;_e+=1)me[_e].d();Be&&Be.d(),Ye&&Ye.d(),dt&&dt.d(),J=!1,Je(we)}}}function YM(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
|
||||
<h1>Loading users...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:le,i:le,o:le,d(t){t&&k(e)}}}function KM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function ZM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function qp(n,e){let t,i,s,l,o,r,a,u=e[43].name+"",f,c,d;return{key:n,first:null,c(){t=_("th"),i=_("div"),s=_("i"),o=T(),r=_("span"),a=N("profile."),f=N(u),p(s,"class",l=W.getFieldTypeIcon(e[43].type)),p(r,"class","txt"),p(i,"class","col-header-content"),p(t,"class",c="col-type-"+e[43].type+" col-field-"+e[43].name),p(t,"name",d=e[43].name),this.first=t},m(m,g){w(m,t,g),h(t,i),h(i,s),h(i,o),h(i,r),h(r,a),h(r,f)},p(m,g){e=m,g[0]&4096&&l!==(l=W.getFieldTypeIcon(e[43].type))&&p(s,"class",l),g[0]&4096&&u!==(u=e[43].name+"")&&he(f,u),g[0]&4096&&c!==(c="col-type-"+e[43].type+" col-field-"+e[43].name)&&p(t,"class",c),g[0]&4096&&d!==(d=e[43].name)&&p(t,"name",d)},d(m){m&&k(t)}}}function JM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function GM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function Vp(n){let e;function t(l,o){return l[10]?QM:XM}let i=t(n),s=i(n);return{c(){s.c(),e=xe()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function XM(n){var r;let e,t,i,s,l,o=((r=n[3])==null?void 0:r.length)&&zp(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No users found.",s=T(),o&&o.c(),l=T(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),h(e,t),h(t,i),h(t,s),o&&o.m(t,null),h(e,l)},p(a,u){var f;(f=a[3])!=null&&f.length?o?o.p(a,u):(o=zp(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function QM(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
|
||||
`},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function zp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[26]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function Bp(n,e){let t,i,s;return i=new g_({props:{field:e[43],record:e[40].profile||{}}}),{key:n,first:null,c(){t=xe(),B(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),V(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&4096&&(r.field=e[43]),o[0]&2&&(r.record=e[40].profile||{}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function Up(n,e){let t,i,s,l,o,r,a,u=e[40].email+"",f,c,d,m,g=e[40].verified?"Verified":"Unverified",v,b,y=[],$=new Map,S,C,M,D,O,E,L,F,R,H,te,Q,j,X,U;s=new Jo({props:{id:e[40].id}});let Z=e[12];const oe=re=>re[43].name;for(let re=0;re<Z.length;re+=1){let me=Hp(e,Z,re),ve=oe(me);$.set(ve,y[re]=Bp(ve,me))}M=new bi({props:{date:e[40].created}}),E=new bi({props:{date:e[40].updated}});function ae(){return e[24](e[40])}function Te(){return e[25](e[40])}return{key:n,first:null,c(){t=_("tr"),i=_("td"),B(s.$$.fragment),l=T(),o=_("td"),r=_("div"),a=_("span"),f=N(u),d=T(),m=_("span"),v=N(g),b=T();for(let re=0;re<y.length;re+=1)y[re].c();S=T(),C=_("td"),B(M.$$.fragment),D=T(),O=_("td"),B(E.$$.fragment),L=T(),F=_("td"),R=_("button"),R.innerHTML=`<i class="ri-user-settings-line"></i>
|
||||
<span class="txt">Edit user</span>`,H=T(),te=_("button"),te.innerHTML=`<i class="ri-profile-line"></i>
|
||||
<span class="txt">Edit profile</span>`,Q=T(),p(i,"class","col-type-text col-field-id"),p(a,"class","txt"),p(a,"title",c=e[40].email),p(m,"class","label"),ie(m,"label-success",e[40].verified),ie(m,"label-warning",!e[40].verified),p(r,"class","inline-flex"),p(o,"class","col-type-email col-field-email"),p(C,"class","col-type-date col-field-created"),p(O,"class","col-type-date col-field-updated"),p(R,"type","button"),p(R,"class","btn btn-sm btn-outline"),p(te,"type","button"),p(te,"class","btn btn-sm m-l-10"),p(F,"class","col-type-action min-width"),this.first=t},m(re,me){w(re,t,me),h(t,i),V(s,i,null),h(t,l),h(t,o),h(o,r),h(r,a),h(a,f),h(r,d),h(r,m),h(m,v),h(t,b);for(let ve=0;ve<y.length;ve+=1)y[ve].m(t,null);h(t,S),h(t,C),V(M,C,null),h(t,D),h(t,O),V(E,O,null),h(t,L),h(t,F),h(F,R),h(F,H),h(F,te),h(t,Q),j=!0,X||(U=[G(R,"click",Xn(ae)),G(te,"click",Xn(Te))],X=!0)},p(re,me){e=re;const ve={};me[0]&2&&(ve.id=e[40].id),s.$set(ve),(!j||me[0]&2)&&u!==(u=e[40].email+"")&&he(f,u),(!j||me[0]&2&&c!==(c=e[40].email))&&p(a,"title",c),(!j||me[0]&2)&&g!==(g=e[40].verified?"Verified":"Unverified")&&he(v,g),me[0]&2&&ie(m,"label-success",e[40].verified),me[0]&2&&ie(m,"label-warning",!e[40].verified),me[0]&4098&&(Z=e[12],Pe(),y=ht(y,me,oe,1,e,Z,$,t,Gt,Bp,S,Hp),Le());const Y={};me[0]&2&&(Y.date=e[40].created),M.$set(Y);const Se={};me[0]&2&&(Se.date=e[40].updated),E.$set(Se)},i(re){if(!j){A(s.$$.fragment,re);for(let me=0;me<Z.length;me+=1)A(y[me]);A(M.$$.fragment,re),A(E.$$.fragment,re),j=!0}},o(re){P(s.$$.fragment,re);for(let me=0;me<y.length;me+=1)P(y[me]);P(M.$$.fragment,re),P(E.$$.fragment,re),j=!1},d(re){re&&k(t),z(s);for(let me=0;me<y.length;me+=1)y[me].d();z(M),z(E),X=!1,Je(U)}}}function Wp(n){let e,t,i=n[1].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[2]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),h(e,t),h(e,s),h(e,l),h(e,o)},p(r,a){a[0]&2&&i!==(i=r[1].length+"")&&he(s,i),a[0]&4&&he(o,r[2])},d(r){r&&k(e)}}}function Yp(n){let e,t,i,s,l=n[2]-n[1].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ie(t,"btn-loading",n[10]),ie(t,"btn-disabled",n[10]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),h(e,t),h(t,i),h(i,s),h(i,o),h(i,r),a||(u=G(t,"click",n[27]),a=!0)},p(f,c){c[0]&6&&l!==(l=f[2]-f[1].length+"")&&he(o,l),c[0]&1024&&ie(t,"btn-loading",f[10]),c[0]&1024&&ie(t,"btn-disabled",f[10])},d(f){f&&k(e),a=!1,u()}}}function xM(n){let e,t,i,s,l,o,r,a,u;const f=[YM,WM],c=[];function d(b,y){return b[11]?0:1}e=d(n),t=c[e]=f[e](n);let m={};s=new UM({props:m}),n[28](s),s.$on("save",n[29]),s.$on("delete",n[30]);let g={};o=new Wa({props:g}),n[31](o),o.$on("save",n[32]);let v={collection:n[5]};return a=new m_({props:v}),n[33](a),a.$on("save",n[34]),{c(){t.c(),i=T(),B(s.$$.fragment),l=T(),B(o.$$.fragment),r=T(),B(a.$$.fragment)},m(b,y){c[e].m(b,y),w(b,i,y),V(s,b,y),w(b,l,y),V(o,b,y),w(b,r,y),V(a,b,y),u=!0},p(b,y){let $=e;e=d(b),e===$?c[e].p(b,y):(Pe(),P(c[$],1,1,()=>{c[$]=null}),Le(),t=c[e],t?t.p(b,y):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const S={};s.$set(S);const C={};o.$set(C);const M={};y[0]&32&&(M.collection=b[5]),a.$set(M)},i(b){u||(A(t),A(s.$$.fragment,b),A(o.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){P(t),P(s.$$.fragment,b),P(o.$$.fragment,b),P(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[28](null),z(s,b),b&&k(l),n[31](null),z(o,b),b&&k(r),n[33](null),z(a,b)}}}function eT(n,e,t){let i,s,l,o;yt(n,Io,x=>t(35,l=x)),yt(n,Rt,x=>t(14,o=x)),fn(Rt,o="Users",o);const r=new URLSearchParams(l),a=["id","userId","created","updated"];let u,f,c,d=[],m=1,g=0,v=!1,b=r.get("filter")||"",y=r.get("sort")||"-created",$=new En,S=!1;O();async function C(x=1){return t(10,v=!0),x<=1&&M(),be.users.getList(x,50,{sort:y||"-created",filter:b}).then(J=>{t(10,v=!1),t(1,d=d.concat(J.items)),t(9,m=J.page),t(2,g=J.totalItems)}).catch(J=>{J!=null&&J.isAbort||(t(10,v=!1),console.warn(J),M(),be.errorResponseHandler(J,!1))})}function M(){t(1,d=[]),t(9,m=1),t(2,g=0)}function D(x){const J=d.find(we=>we.id===(x==null?void 0:x.userId));J&&(J.profile=x),t(1,d)}async function O(){t(11,S=!0);try{t(5,$=await be.collections.getOne("profiles"))}catch(x){be.errorResponseHandler(x)}t(11,S=!1)}const E=()=>f==null?void 0:f.show($),L=()=>C(),F=()=>u==null?void 0:u.show(),R=x=>t(3,b=x.detail);function H(x){y=x,t(4,y)}function te(x){y=x,t(4,y)}function Q(x){y=x,t(4,y)}function j(x){y=x,t(4,y)}const X=x=>u==null?void 0:u.show(x),U=x=>c==null?void 0:c.show(x.profile),Z=()=>t(3,b=""),oe=()=>C(m+1);function ae(x){ge[x?"unshift":"push"](()=>{u=x,t(6,u)})}const Te=()=>C(),re=()=>C();function me(x){ge[x?"unshift":"push"](()=>{f=x,t(7,f)})}const ve=x=>t(5,$=x.detail);function Y(x){ge[x?"unshift":"push"](()=>{c=x,t(8,c)})}const Se=x=>D(x.detail);return n.$$.update=()=>{var x;if(n.$$.dirty[0]&24&&y!==-1&&b!==-1){const J=new URLSearchParamLine truncated
|
||||
<span class="txt">Application</span>`,o=T(),r=_("a"),r.innerHTML=`<i class="ri-send-plane-2-line"></i>
|
||||
<span class="txt">Mail settings</span>`,a=T(),u=_("a"),u.innerHTML=`<i class="ri-archive-drawer-line"></i>
|
||||
<span class="txt">Files storage</span>`,f=T(),c=_("div"),c.textContent="Sync",d=T(),m=_("a"),m.innerHTML=`<i class="ri-uninstall-line"></i>
|
||||
<span class="txt">Export collections</span>`,g=T(),v=_("a"),v.innerHTML=`<i class="ri-install-line"></i>
|
||||
<span class="txt">Import collections</span>`,b=T(),y=_("div"),y.textContent="Authentication",$=T(),S=_("a"),S.innerHTML=`<i class="ri-lock-password-line"></i>
|
||||
<span class="txt">Auth providers</span>`,C=T(),M=_("a"),M.innerHTML=`<i class="ri-key-line"></i>
|
||||
<span class="txt">Token options</span>`,D=T(),O=_("a"),O.innerHTML=`<i class="ri-shield-user-line"></i>
|
||||
<span class="txt">Admins</span>`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(m,"href","/settings/export-collections"),p(m,"class","sidebar-list-item"),p(v,"href","/settings/import-collections"),p(v,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p(S,"href","/settings/auth-providers"),p(S,"class","sidebar-list-item"),p(M,"href","/settings/tokens"),p(M,"class","sidebar-list-item"),p(O,"href","/settings/admins"),p(O,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(F,R){w(F,e,R),h(e,t),h(t,i),h(t,s),h(t,l),h(t,o),h(t,r),h(t,a),h(t,u),h(t,f),h(t,c),h(t,d),h(t,m),h(t,g),h(t,v),h(t,b),h(t,y),h(t,$),h(t,S),h(t,C),h(t,M),h(t,D),h(t,O),E||(L=[Ue(In.call(null,l,{path:"/settings"})),Ue(dn.call(null,l)),Ue(In.call(null,r,{path:"/settings/mail/?.*"})),Ue(dn.call(null,r)),Ue(In.call(null,u,{path:"/settings/storage/?.*"})),Ue(dn.call(null,u)),Ue(In.call(null,m,{path:"/settings/export-collections/?.*"})),Ue(dn.call(null,m)),Ue(In.call(null,v,{path:"/settings/import-collections/?.*"})),Ue(dn.call(null,v)),Ue(In.call(null,S,{path:"/settings/auth-providers/?.*"})),Ue(dn.call(null,S)),Ue(In.call(null,M,{path:"/settings/tokens/?.*"})),Ue(dn.call(null,M)),Ue(In.call(null,O,{path:"/settings/admins/?.*"})),Ue(dn.call(null,O))],E=!0)},p:le,i:le,o:le,d(F){F&&k(e),E=!1,Je(L)}}}class Hi extends Ee{constructor(e){super(),Oe(this,e,null,nT,De,{})}}function Kp(n,e,t){const i=n.slice();return i[31]=e[t],i}function Zp(n){let e,t;return e=new Ie({props:{class:"form-field disabled",name:"id",$$slots:{default:[iT,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function iT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="ID",o=T(),r=_("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","text"),p(r,"id",a=n[30]),r.value=u=n[1].id,r.disabled=!0},m(f,c){w(f,e,c),h(e,t),h(e,i),h(e,s),w(f,o,c),w(f,r,c)},p(f,c){c[0]&1073741824&&l!==(l=f[30])&&p(e,"for",l),c[0]&1073741824&&a!==(a=f[30])&&p(r,"id",a),c[0]&2&&u!==(u=f[1].id)&&r.value!==u&&(r.value=u)},d(f){f&&k(e),f&&k(o),f&&k(r)}}}function Jp(n){let e,t,i,s,l,o,r;function a(){return n[17](n[31])}function u(...f){return n[18](n[31],...f)}return{c(){e=_("figure"),t=_("img"),s=T(),Jn(t.src,i="./images/avatars/avatar"+n[31]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[31]),p(e,"tabindex","0"),p(e,"class",l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(f,c){w(f,e,c),h(e,t),h(e,s),o||(r=[G(e,"click",a),G(e,"keydown",u)],o=!0)},p(f,c){n=f,c[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(f){f&&k(e),o=!1,Je(r)}}}function sT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="Email",o=T(),r=_("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),h(e,t),h(e,i),h(e,s),w(c,o,d),w(c,r,d),Ce(r,n[3]),u||(f=G(r,"input",n[19]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&Ce(r,c[3])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function Gp(n){let e,t;return e=new Ie({props:{class:"form-field form-field-toggle",$$slots:{default:[lT,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function lT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[30]),p(s,"for",o=n[30])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),h(s,l),r||(a=G(e,"change",n[20]),r=!0)},p(u,f){f[0]&1073741824&&t!==(t=u[30])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&1073741824&&o!==(o=u[30])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Xp(n){let e,t,i,s,l,o,r,a,u;return s=new Ie({props:{class:"form-field required",name:"password",$$slots:{default:[oT,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),r=new Ie({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[rT,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),i=_("div"),B(s.$$.fragment),l=T(),o=_("div"),B(r.$$.fragment),p(i,"class","col-sm-6"),p(o,Line truncated
|
||||
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[15]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function cT(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].isNew&&Qp(n);return{c(){m&&m.c(),e=T(),t=_("button"),i=_("span"),i.textContent="Cancel",s=T(),l=_("button"),o=_("span"),a=N(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],ie(l,"btn-loading",n[6])},m(g,v){m&&m.m(g,v),w(g,e,v),w(g,t,v),h(t,i),w(g,s,v),w(g,l,v),h(l,o),h(o,a),f=!0,c||(d=G(t,"click",n[16]),c=!0)},p(g,v){g[1].isNew?m&&(Pe(),P(m,1,1,()=>{m=null}),Le()):m?(m.p(g,v),v[0]&2&&A(m,1)):(m=Qp(g),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||v[0]&64)&&(t.disabled=g[6]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&he(a,r),(!f||v[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),v[0]&64&&ie(l,"btn-loading",g[6])},i(g){f||(A(m),f=!0)},o(g){P(m),f=!1},d(g){m&&m.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function dT(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[cT],header:[uT],default:[aT]},$$scope:{ctx:n}};return e=new fi({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[23]),l[0]&1886|l[1]&8&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[24](null),z(e,s)}}}function pT(n,e,t){let i;const s=ln(),l="admin_"+W.randomString(5);let o,r=new ys,a=!1,u=!1,f=0,c="",d="",m="",g=!1;function v(U){return y(U),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(U){ki({}),t(1,r=U!=null&&U.clone?U.clone():new ys),$()}function $(){t(4,g=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,m="")}function S(){if(a||!i)return;t(6,a=!0);const U={email:c,avatar:f};(r.isNew||g)&&(U.password=d,U.passwordConfirm=m);let Z;r.isNew?Z=be.admins.create(U):Z=be.admins.update(r.id,U),Z.then(async oe=>{var ae;t(7,u=!1),b(),un(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",oe),((ae=be.authStore.model)==null?void 0:ae.id)===oe.id&&be.authStore.save(be.authStore.token,oe)}).catch(oe=>{be.errorResponseHandler(oe)}).finally(()=>{t(6,a=!1)})}function C(){!(r!=null&&r.id)||vi("Do you really want to delete the selected admin?",()=>be.admins.delete(r.id).then(()=>{t(7,u=!1),b(),un("Successfully deleted admin."),s("delete",r)}).catch(U=>{be.errorResponseHandler(U)}))}const M=()=>C(),D=()=>b(),O=U=>t(2,f=U),E=(U,Z)=>{(Z.code==="Enter"||Z.code==="Space")&&(Z.preventDefault(),t(2,f=U))};function L(){c=this.value,t(3,c)}function F(){g=this.checked,t(4,g)}function R(){d=this.value,t(8,d)}function H(){m=this.value,t(9,m)}const te=()=>i&&u?(vi("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function Q(U){ge[U?"unshift":"push"](()=>{o=U,t(5,o)})}function j(U){at.call(this,n,U)}function X(U){at.call(this,n,U)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||g||c!==r.email||f!==r.avatar)},[b,r,f,c,g,o,a,u,d,m,i,l,S,C,v,M,D,O,E,L,F,R,H,te,Q,j,X]}class hT extends Ee{constructor(e){super(),Oe(this,e,pT,dT,De,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function xp(n,e,t){const i=n.slice();return i[24]=e[t],i}function mT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function gT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function _T(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function bT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),h(e,t),h(e,i),h(e,s)},p:le,d(l){l&&k(e)}}}function eh(n){let e;function t(l,o){return l[5]?yT:vT}let i=t(n),s=i(n);return{c(){s.c(),e=xe()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function vT(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&th(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No admins found.",s=T(),o&&o.c(),l=T(),p(t,"colspan","99"),p(t,"class","txt-cLine truncated
|
||||
`},m(t,i){w(t,e,i)},p:le,d(t){t&&k(e)}}}function th(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[17]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function nh(n){let e;return{c(){e=_("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ih(n,e){let t,i,s,l,o,r,a,u,f,c,d,m,g=e[24].email+"",v,b,y,$,S,C,M,D,O,E,L,F,R,H;u=new Jo({props:{id:e[24].id}});let te=e[24].id===e[7].id&&nh();S=new bi({props:{date:e[24].created}}),D=new bi({props:{date:e[24].updated}});function Q(){return e[15](e[24])}function j(...X){return e[16](e[24],...X)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("figure"),l=_("img"),r=T(),a=_("td"),B(u.$$.fragment),f=T(),te&&te.c(),c=T(),d=_("td"),m=_("span"),v=N(g),y=T(),$=_("td"),B(S.$$.fragment),C=T(),M=_("td"),B(D.$$.fragment),O=T(),E=_("td"),E.innerHTML='<i class="ri-arrow-right-line"></i>',L=T(),Jn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(a,"class","col-type-text col-field-id"),p(m,"class","txt txt-ellipsis"),p(m,"title",b=e[24].email),p(d,"class","col-type-email col-field-email"),p($,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(E,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(X,U){w(X,t,U),h(t,i),h(i,s),h(s,l),h(t,r),h(t,a),V(u,a,null),h(a,f),te&&te.m(a,null),h(t,c),h(t,d),h(d,m),h(m,v),h(t,y),h(t,$),V(S,$,null),h(t,C),h(t,M),V(D,M,null),h(t,O),h(t,E),h(t,L),F=!0,R||(H=[G(t,"click",Q),G(t,"keydown",j)],R=!0)},p(X,U){e=X,(!F||U&16&&!Jn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const Z={};U&16&&(Z.id=e[24].id),u.$set(Z),e[24].id===e[7].id?te||(te=nh(),te.c(),te.m(a,null)):te&&(te.d(1),te=null),(!F||U&16)&&g!==(g=e[24].email+"")&&he(v,g),(!F||U&16&&b!==(b=e[24].email))&&p(m,"title",b);const oe={};U&16&&(oe.date=e[24].created),S.$set(oe);const ae={};U&16&&(ae.date=e[24].updated),D.$set(ae)},i(X){F||(A(u.$$.fragment,X),A(S.$$.fragment,X),A(D.$$.fragment,X),F=!0)},o(X){P(u.$$.fragment,X),P(S.$$.fragment,X),P(D.$$.fragment,X),F=!1},d(X){X&&k(t),z(u),te&&te.d(),z(S),z(D),R=!1,Je(H)}}}function sh(n){let e,t,i=n[4].length+"",s,l,o=n[4].length+"",r;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),r=N(o),p(e,"class","block txt-hint txt-right m-t-sm")},m(a,u){w(a,e,u),h(e,t),h(e,s),h(e,l),h(e,r)},p(a,u){u&16&&i!==(i=a[4].length+"")&&he(s,i),u&16&&o!==(o=a[4].length+"")&&he(r,o)},d(a){a&&k(e)}}}function kT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,$,S,C,M,D,O,E,L,F,R,H,te,Q,j,X,U,Z,oe,ae,Te,re,me,ve=[],Y=new Map,Se,x,J,we,Re,ze;e=new Hi({}),c=new zo({}),c.$on("refresh",n[8]),y=new Vo({props:{value:n[1],placeholder:"Search filter, eg. email='test@example.com'",extraAutocompleteKeys:["email"]}}),y.$on("submit",n[10]);function K(ne){n[11](ne)}let pe={class:"col-type-text",name:"id",$$slots:{default:[mT]},$$scope:{ctx:n}};n[2]!==void 0&&(pe.sort=n[2]),L=new nn({props:pe}),ge.push(()=>Ne(L,"sort",K));function ce(ne){n[12](ne)}let ke={class:"col-type-email col-field-email",name:"email",$$slots:{default:[gT]},$$scope:{ctx:n}};n[2]!==void 0&&(ke.sort=n[2]),H=new nn({props:ke}),ge.push(()=>Ne(H,"sort",ce));function Ge(ne){n[13](ne)}let nt={class:"col-type-date col-field-created",name:"created",$$slots:{default:[_T]},$$scope:{ctx:n}};n[2]!==void 0&&(nt.sort=n[2]),j=new nn({props:nt}),ge.push(()=>Ne(j,"sort",Ge));function et(ne){n[14](ne)}let kt={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[bT]},$$scope:{ctx:n}};n[2]!==void 0&&(kt.sort=n[2]),Z=new nn({props:kt}),ge.push(()=>Ne(Z,"sort",et));let it=n[4];const Mt=ne=>ne[24].id;for(let ne=0;ne<it.length;ne+=1){let _e=xp(n,it,ne),Ke=Mt(_e);Y.set(Ke,ve[ne]=ih(Ke,_e))}let Be=null;it.length||(Be=eh(n));let Ye=n[4].length&&sh(n),dt={};return J=new hT({props:dt}),n[18](J),J.$on("save",n[19]),J.$on("delete",n[20]),{c(){B(e.$$.fragment),t=T(),i=_("main"),s=_("header"),l=_("nav"),o=_("div"),o.textContent="Settings",r=T(),a=_("div"),u=N(n[6]),f=T(),B(c.$$.fragment),d=T(),m=_("div"),g=T(),v=_("button"),v.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">New admin</span>`,b=T(),B(y.$$.fragment),$=T(),S=_("div"),C=_("table"),M=_("thead"),D=_("tr"),O=_("th"),E=T(),B(L.$$.fragment),R=T(),B(H.$$.fragment),Q=T(),B(j.$$.fragment),U=T(),B(Z.$$.fragment),ae=T(),Te=_("th"),re=T(),me=_("tbody");for(let ne=0;ne<ve.length;ne+=1)ve[ne].c();Be&&Be.c(),Se=T(),Ye&&Ye.c(),x=T(),B(J.$$.fragment),p(o,"class","breadcrumb-item"),p(a,"class","breadcrumb-item"),p(l,"class","breadcrumbs"),p(m,"class","flex-fill"),p(v,"type","button"),p(v,"class","btn btn-expanded"),p(s,"class","page-header"),p(O,"class","min-width"),p(Te,"class","col-type-action min-width"),p(C,"class","table"),ie(C,"table-loading",n[5]),p(S,"class","table-wrapper"),p(i,"class","page-wrapper")},m(ne,_e){V(e,ne,_e),w(ne,t,_e),w(ne,i,_e),h(i,s),h(s,l),h(l,o),h(l,r),h(l,a),h(a,u),h(s,f),V(c,s,null),h(s,d),h(s,m),h(s,g),h(s,v),h(i,b),V(y,i,null),h(i,$),h(i,S),h(S,C),h(C,M),h(M,D),h(D,O),h(D,E),V(L,D,null),h(D,R),V(H,D,null),h(D,Q),V(j,D,null),h(D,U),V(Z,D,null),h(D,ae),h(D,Te),h(C,re),h(C,me);for(let Ke=0;Ke<ve.length;Ke+=1)ve[Ke].m(me,null);Be&&Be.m(me,null),h(i,Se),Ye&&Ye.m(i,null),w(ne,x,_e),V(J,ne,_e),we=!0,Re||(ze=G(v,"click",n[9]),Re=!0)},p(ne,[_e]){(!we||_e&64)&&he(u,ne[6]);const Ke={};_e&2&&(Ke.value=ne[1]),y.$set(Ke);const lt={};_e&134217728&&(lt.$$scope={dirty:_e,ctx:ne}),!F&&_e&4&&(F=!0,lt.sort=ne[2],He(()=>F=!1)),L.$set(lt);const ut={};_e&134217728&&(ut.$$scope={dirty:_e,ctx:ne}),!te&&_e&4&&(te=!0,ut.sort=ne[2],He(()=>te=!1)),H.$set(ut);const tt={};_e&134217728&&(tt.$$scope={dirty:_e,ctx:ne}),!X&&_e&4&&(X=!0,tt.sort=ne[2],He(()=>X=!1)),j.$set(tt);const wt={};_e&134217728&&(wt.$$scope={dirty:_e,ctx:ne}),!oe&&_e&4&&(oe=!0,wt.sort=ne[2],He(()=>oe=!1)),Z.$set(wt),_e&186&&(it=ne[4],Pe(),ve=ht(ve,_e,Mt,1,ne,it,Y,me,Gt,ih,null,xp),Le(),!it.length&&Be?Be.p(ne,_e):it.length?Be&&(Be.d(1),Be=null):(Be=eh(ne),Be.c(),Be.m(me,null))),_e&32&&ie(C,"table-loading",ne[5]),ne[4].length?Ye?Ye.p(ne,_e):(Ye=sh(ne),Ye.c(),Ye.m(i,null)):Ye&&(Ye.d(1),Ye=null);const mt={};J.$set(mt)},i(ne){if(!we){A(e.$$.fragment,ne),A(c.$$.fragment,ne),A(y.$$.fragment,ne),A(L.$$.fragment,ne),A(H.$$.fragment,ne),A(j.$$.fragment,ne),A(Z.$$.fragment,ne);for(let _e=0;_e<it.length;_e+=1)A(ve[_e]);A(J.$$.fragment,ne),we=!0}},o(ne){P(e.$$.fragment,ne),P(c.$$.fragment,ne),P(y.$$.fragment,ne),P(L.$$.fragment,ne),P(H.$$.fragment,ne),P(j.$$.fragment,ne),P(Z.$$.fragment,ne);for(let _e=0;_e<ve.length;_e+=1)P(ve[_e]);P(J.$$.fragment,ne),we=!1},d(ne){z(e,ne),ne&&k(t),ne&&k(i),z(c),z(y),z(L),z(H),z(j),z(Z);for(let _e=0;_e<ve.length;_e+=1)ve[_e].d();Be&&Be.d(),Ye&&Ye.d(),ne&&k(x),n[18](null),z(J,ne),Re=!1,ze()}}}function wT(n,e,t){let i,s,l;yt(n,Io,R=>t(21,i=R)),yt(n,Rt,R=>t(6,s=R)),yt(n,va,R=>t(7,l=R)),fn(Rt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),be.admins.getFullList(100,{sort:c||"-created",filter:f}).then(R=>{t(4,a=R),t(5,u=!1)}).catch(R=>{R!=null&&R.isAbort||(t(5,u=!1),console.warn(R),m(),be.errorResponseHandler(R,!1))})}function m(){t(4,a=[])}const g=()=>d(),v=()=>r==null?void 0:r.show(),b=R=>t(1,f=R.detail);function y(R){c=R,t(2,c)}function $(R){c=R,t(2,c)}function S(R){c=R,t(2,c)}function C(R){c=R,t(2,c)}const M=R=>r==null?void 0:r.show(R),D=(R,H)=>{(H.code==="Enter"||H.code==="Space")&&(H.preventDefault(),r==null||r.show(R))},O=()=>t(1,f="");function E(R){ge[R?"unshift":"push"](()=>{r=R,t(3,r)})}const L=()=>d(),F=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const R=new URLSearchParams({filter:f,sort:c}).toString();yi("/settings/admins?"+R),d()}},[d,f,c,r,a,u,s,l,g,v,b,y,$,S,C,M,D,O,E,L,F]}class ST extends Ee{constructor(e){super(),Oe(this,e,wT,kT,De,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function $T(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Email"),s=T(),l=_("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0]),l.focus(),r||(a=G(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&Ce(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function CT(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=_("label"),t=N("Password"),s=T(),l=_("input"),r=T(),a=_("div"),u=_("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,m){w(d,e,m),h(e,t),w(d,s,m),w(d,l,m),Ce(l,n[1]),w(d,r,m),w(d,a,m),h(a,u),f||(c=[G(l,"input",n[5]),Ue(dn.call(null,u))],f=!0)},p(d,m){m&256&&i!==(i=d[8])&&p(e,"for",i),m&256&&o!==(o=d[8])&&p(l,"id",o),m&2&&l.value!==d[1]&&Ce(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),d&&k(a),f=!1,Je(c)}}}function MT(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new Ie({props:{class:"form-field required",name:"email",$$slots:{default:[$T,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$sLine truncated
|
||||
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),ie(a,"btn-disabled",n[2]),ie(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){w(d,e,m),h(e,t),h(e,i),V(s,e,null),h(e,l),V(o,e,null),h(e,r),h(e,a),u=!0,f||(c=G(e,"submit",Yt(n[3])),f=!0)},p(d,m){const g={};m&769&&(g.$$scope={dirty:m,ctx:d}),s.$set(g);const v={};m&770&&(v.$$scope={dirty:m,ctx:d}),o.$set(v),m&4&&ie(a,"btn-disabled",d[2]),m&4&&ie(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){P(s.$$.fragment,d),P(o.$$.fragment,d),u=!1},d(d){d&&k(e),z(s),z(o),f=!1,c()}}}function TT(n){let e,t;return e=new ag({props:{$$slots:{default:[MT]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function DT(n,e,t){let i;yt(n,Io,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),be.admins.authViaEmail(l,o).then(()=>{yi("/")}).catch(()=>{ho("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class OT extends Ee{constructor(e){super(),Oe(this,e,DT,TT,De,{})}}function ET(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,$;return i=new Ie({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[PT,({uniqueId:S})=>({14:S}),({uniqueId:S})=>S?16384:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[LT,({uniqueId:S})=>({14:S}),({uniqueId:S})=>S?16384:0]},$$scope:{ctx:n}}}),a=new Ie({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[FT,({uniqueId:S})=>({14:S}),({uniqueId:S})=>S?16384:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),B(a.$$.fragment),u=T(),f=_("div"),c=_("div"),d=T(),m=_("button"),g=_("span"),g.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(c,"class","flex-fill"),p(g,"class","txt"),p(m,"type","submit"),p(m,"class","btn btn-expanded"),m.disabled=v=!n[3]||n[2],ie(m,"btn-loading",n[2]),p(f,"class","col-lg-12 flex"),p(e,"class","grid")},m(S,C){w(S,e,C),h(e,t),V(i,t,null),h(e,s),h(e,l),V(o,l,null),h(e,r),V(a,e,null),h(e,u),h(e,f),h(f,c),h(f,d),h(f,m),h(m,g),b=!0,y||($=G(m,"click",n[9]),y=!0)},p(S,C){const M={};C&49153&&(M.$$scope={dirty:C,ctx:S}),i.$set(M);const D={};C&49153&&(D.$$scope={dirty:C,ctx:S}),o.$set(D);const O={};C&49153&&(O.$$scope={dirty:C,ctx:S}),a.$set(O),(!b||C&12&&v!==(v=!S[3]||S[2]))&&(m.disabled=v),C&4&&ie(m,"btn-loading",S[2])},i(S){b||(A(i.$$.fragment,S),A(o.$$.fragment,S),A(a.$$.fragment,S),b=!0)},o(S){P(i.$$.fragment,S),P(o.$$.fragment,S),P(a.$$.fragment,S),b=!1},d(S){S&&k(e),z(i),z(o),z(a),y=!1,$()}}}function AT(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:le,i:le,o:le,d(t){t&&k(e)}}}function PT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Application name"),s=T(),l=_("input"),p(e,"for",i=n[14]),p(l,"type","text"),p(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].meta.appName),r||(a=G(l,"input",n[6]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&p(e,"for",i),f&16384&&o!==(o=u[14])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&Ce(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function LT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Application url"),s=T(),l=_("input"),p(e,"for",i=n[14]),p(l,"type","text"),p(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].meta.appUrl),r||(a=G(l,"input",n[7]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&p(e,"for",i),f&16384&&o!==(o=u[14])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&Ce(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function FT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Logs max days retention"),s=T(),l=_("input"),p(e,"for",i=n[14]),p(l,"type","number"),p(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].logs.maxDays),r||(a=G(l,"input",n[8]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&p(e,"for",i),f&16384&&o!==(o=u[14])&&p(l,"id",o),f&1&&At(l.value)!==u[0].logs.maxDays&&Ce(l,u[0].logs.maxDays)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function IT(n){let e,t,i,s,l,o,r,a,u,f,c,d;e=new Hi({});const m=[AT,ET],g=[];function v(b,y){return b[1]?0:1}return a=v(n),u=g[a]=m[a](n),{c(){B(e.$$.fragment),t=T(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div>
|
||||
<div class="breadcrumb-item">Application</div></nav>`,l=T(),o=_("div"),r=_("form"),u.c(),p(s,"class","page-header"),p(r,"class","panel"),p(r,"autocomplete","off"),p(o,"class","wrapper"),p(i,"class","page-wrapper")},m(b,y){V(e,b,y),w(b,t,y),w(b,i,y),h(i,s),h(i,l),h(i,o),h(o,r),g[a].m(r,null),f=!0,c||(d=G(r,"submit",Yt(n[4])),c=!0)},p(b,[y]){let $=a;a=v(b),a===$?g[a].p(b,y):(Pe(),P(g[$],1,1,()=>{g[$]=null}),Le(),u=g[a],u?u.p(b,y):(u=g[a]=m[a](b),u.c()),A(u,1),u.m(r,null))},i(b){f||(A(e.$$.fragment,b),A(u),f=!0)},o(b){P(e.$$.fragment,b),P(u),f=!1},d(b){z(e,b),b&&k(t),b&&k(i),g[a].d(),c=!1,d()}}}function NT(n,e,t){let i,s,l;yt(n,go,y=>t(10,s=y)),yt(n,Rt,y=>t(11,l=y)),fn(Rt,l="Application settings",l);let o={},r=!1,a=!1,u="";f();async function f(){t(1,r=!0);try{const y=await be.settings.getAll()||{};d(y)}catch(y){be.errorResponseHandler(y)}t(1,r=!1)}async function c(){if(!(a||!i)){t(2,a=!0);try{const y=await be.settings.update(W.filterRedactedProps(o));d(y),un("Successfully saved application settings.")}catch(y){be.errorResponseHandler(y)}t(2,a=!1)}}function d(y={}){var $;fn(go,s=($=y==null?void 0:y.meta)==null?void 0:$.appName,s),t(0,o={meta:(y==null?void 0:y.meta)||{},logs:(y==null?void 0:y.logs)||{}}),t(5,u=JSON.stringify(o))}function m(){o.meta.appName=this.value,t(0,o)}function g(){o.meta.appUrl=this.value,t(0,o)}function v(){o.logs.maxDays=At(this.value),t(0,o)}const b=()=>c();return n.$$.update=()=>{n.$$.dirty&33&&t(3,i=u!=JSON.stringify(o))},[o,r,a,i,c,u,m,g,v,b]}class RT extends Ee{constructor(e){super(),Oe(this,e,NT,IT,De,{})}}function HT(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o<s.length;o+=1)l=ct(l,s[o]);return{c(){e=_("input"),ri(e,l)},m(o,r){w(o,e,r),e.autofocus&&e.focus(),n[7](e),Ce(e,n[0]),t||(i=G(e,"input",n[8]),t=!0)},p(o,r){ri(e,l=gn(s,[{type:"password"},{autocomplete:"new-password"},r&32&&o[5]])),r&1&&e.value!==o[0]&&Ce(e,o[0])},d(o){o&&k(e),n[7](null),t=!1,i()}}}function jT(n){let e,t,i,s,l,o,r=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let u=0;u<r.length;u+=1)a=ct(a,r[u]);return{c(){e=_("div"),t=_("button"),t.innerHTML='<i class="ri-key-line"></i>',i=T(),s=_("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),ri(s,a)},m(u,f){w(u,e,f),h(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(o=[Ue(Ct.call(null,t,{position:"left",text:"Set new value"})),G(t,"click",n[6])],l=!0)},p(u,f){ri(s,a=gn(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&k(e),u&&k(i),u&&k(s),l=!1,Je(o)}}}function qT(n){let e;function t(l,o){return l[3]?jT:HT}let i=t(n),s=i(n);return{c(){s.c(),e=xe()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:le,o:le,d(l){s.d(l),l&&k(e)}}}function VT(n,e,t){const i=["value","mask"];let s=Jt(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await xn(),r==null||r.focus()}const f=()=>u();function c(m){ge[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=ct(ct({},e),ai(m)),t(5,s=Jt(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class Ya extends Ee{constructor(e){super(),Oe(this,e,VT,qT,De,{value:0,mask:1})}}function zT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,$,S,C,M,D,O,E,L,F,R,H,te;i=new Ie({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[UT,({uniqueId:j})=>({23:j}),({uniqueId:j})=>j?8388608:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[WT,({uniqueId:j})=>({23:j}),({uniqueId:j})=>j?8388608:0]},$$scope:{ctx:n}}}),a=new Ie({props:{class:"form-field required",name:"meta.userVerificationUrl",$$slots:{default:[YT,({uniqueId:j})=>({23:j}),({uniqueId:j})=>j?8388608:0]},$$scope:{ctx:n}}}),f=new Ie({props:{class:"form-field required",name:"meta.userResetPasswordUrl",$$slots:{default:[KT,({uniqueId:j})=>({23:j}),({uniqueId:j})=>j?8388608:0]},$$scope:{ctx:n}}}),d=new Ie({props:{class:"form-field required",name:"meta.userConfirmEmailChangeUrl",$$slots:{default:[ZT,({uniqueId:j})=>({23:j}),({uniqueId:j})=>j?8388608:0]},$$scope:{ctx:n}}}),$=new Ie({props:{class:"form-field form-field-toggle",$$slots:{default:[JT,({uniqueId:j})=>({23:j}),({uniqueId:j})=>j?8388608:0]},$$scope:{ctx:n}}});let Q=n[0].smtp.enabled&&lh(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),B(a.$$.fragment),u=T(),B(f.$$.fragment),c=T(),B(d.$$.fragment),m=T(),g=_("hr"),v=T(),b=_("div"),b.innerHTML=`<p>By default PocketBase uses the OS <code>sendmail</code> command for sending emails.
|
||||
<br/>
|
||||
<strong class="txt-bold">For better emails deliverability it is recommended to enable the SMTP settings
|
||||
below.</strong></p>`,y=T(),B($.$$.fragment),S=T(),Q&&Q.c(),C=T(),M=_("div"),D=_("div"),O=T(),E=_("button"),L=_("span"),L.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid"),p(b,"class","content m-b-sm"),p(D,"class","flex-fill"),p(L,"class","txt"),p(E,"type","submit"),p(E,"class","btn btn-expanded"),E.disabled=F=!n[3]||n[2],ie(E,"btn-loading",n[2]),p(M,"class","flex")},m(j,X){w(j,e,X),h(e,t),V(i,t,null),h(e,s),h(e,l),V(o,l,null),h(e,r),V(a,e,null),h(e,u),V(f,e,null),h(e,c),V(d,e,null),w(j,m,X),w(j,g,X),w(j,v,X),w(j,b,X),w(j,y,X),V($,j,X),w(j,S,X),Q&&Q.m(j,X),w(j,C,X),w(j,M,X),h(M,D),h(M,O),h(M,E),h(E,L),R=!0,H||(te=G(E,"click",n[19]),H=!0)},p(j,X){const U={};X&25165825&&(U.$$scope={dirty:X,ctx:j}),i.$set(U);const Z={};X&25165825&&(Z.$$scope={dirty:X,ctx:j}),o.$set(Z);const oe={};X&25165825&&(oe.$$scope={dirty:X,ctx:j}),a.$set(oe);const ae={};X&25165825&&(ae.$$scope={dirty:X,ctx:j}),f.$set(ae);const Te={};X&25165825&&(Te.$$scope={dirty:X,ctx:j}),d.$set(Te);const re={};X&25165825&&(re.$$scope={dirty:X,ctx:j}),$.$set(re),j[0].smtp.enabled?Q?(Q.p(j,X),X&1&&A(Q,1)):(Q=lh(j),Q.c(),A(Q,1),Q.m(C.parentNode,C)):Q&&(Pe(),P(Q,1,1,()=>{Q=null}),Le()),(!R||X&12&&F!==(F=!j[3]||j[2]))&&(E.disabled=F),X&4&&ie(E,"btn-loading",j[2])},i(j){R||(A(i.$$.fragment,j),A(o.$$.fragment,j),A(a.$$.fragment,j),A(f.$$.fragment,j),A(d.$$.fragment,j),A($.$$.fragment,j),A(Q),R=!0)},o(j){P(i.$$.fragment,j),P(o.$$.fragment,j),P(a.$$.fragment,j),P(f.$$.fragment,j),P(d.$$.fragment,j),P($.$$.fragment,j),P(Q),R=!1},d(j){j&&k(e),z(i),z(o),z(a),z(f),z(d),j&&k(m),j&&k(g),j&&k(v),j&&k(b),j&&k(y),z($,j),j&&k(S),Q&&Q.d(j),j&&k(C),j&&k(M),H=!1,te()}}}function BT(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:le,i:le,o:le,d(t){t&&k(e)}}}function UT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Sender name"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].meta.senderName),r||(a=G(l,"input",n[8]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderName&&Ce(l,u[0].meta.senderName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function WT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Sender address"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","email"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].meta.senderAddress),r||(a=G(l,"input",n[9]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderAddress&&Ce(l,u[0].meta.senderAddress)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function YT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("User verification page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user verification email. Available placeholder parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),h(e,t),w(c,s,d),w(c,l,d),Ce(l,n[0].meta.userVerificationUrl),w(c,r,d),w(c,a,d),u||(f=G(l,"input",n[10]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&1&&l.value!==c[0].meta.userVerificationUrl&&Ce(l,c[0].meta.userVerificationUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function KT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("User reset password page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user password reset email. Available placeholder parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),h(e,t),w(c,s,d),w(c,l,d),Ce(l,n[0].meta.userResetPasswordUrl),w(c,r,d),w(c,a,d),u||(f=G(l,"input",n[11]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&1&&l.value!==c[0].meta.userResetPasswordUrl&&Ce(l,c[0].meta.userResetPasswordUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function ZT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("User confirm email change page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user email change confirmation email. Available placeholder
|
||||
parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),h(e,t),w(c,s,d),w(c,l,d),Ce(l,n[0].meta.userConfirmEmailChangeUrl),w(c,r,d),w(c,a,d),u||(f=G(l,"input",n[12]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&1&&l.value!==c[0].meta.userConfirmEmailChangeUrl&&Ce(l,c[0].meta.userConfirmEmailChangeUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function JT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Use SMTP mail server"),p(e,"type","checkbox"),p(e,"id",t=n[23]),e.required=!0,p(s,"for",o=n[23])},m(u,f){w(u,e,f),e.checked=n[0].smtp.enabled,w(u,i,f),w(u,s,f),h(s,l),r||(a=G(e,"change",n[13]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&p(e,"id",t),f&1&&(e.checked=u[0].smtp.enabled),f&8388608&&o!==(o=u[23])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function lh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,$,S;return i=new Ie({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[GT,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[XT,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),u=new Ie({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[QT,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),d=new Ie({props:{class:"form-field",name:"smtp.username",$$slots:{default:[xT,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),v=new Ie({props:{class:"form-field",name:"smtp.password",$$slots:{default:[eD,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),f=T(),c=_("div"),B(d.$$.fragment),m=T(),g=_("div"),B(v.$$.fragment),b=T(),y=_("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(g,"class","col-lg-6"),p(y,"class","col-lg-12"),p(e,"class","grid")},m(C,M){w(C,e,M),h(e,t),V(i,t,null),h(e,s),h(e,l),V(o,l,null),h(e,r),h(e,a),V(u,a,null),h(e,f),h(e,c),V(d,c,null),h(e,m),h(e,g),V(v,g,null),h(e,b),h(e,y),S=!0},p(C,M){const D={};M&25165825&&(D.$$scope={dirty:M,ctx:C}),i.$set(D);const O={};M&25165825&&(O.$$scope={dirty:M,ctx:C}),o.$set(O);const E={};M&25165825&&(E.$$scope={dirty:M,ctx:C}),u.$set(E);const L={};M&25165825&&(L.$$scope={dirty:M,ctx:C}),d.$set(L);const F={};M&25165825&&(F.$$scope={dirty:M,ctx:C}),v.$set(F)},i(C){S||(A(i.$$.fragment,C),A(o.$$.fragment,C),A(u.$$.fragment,C),A(d.$$.fragment,C),A(v.$$.fragment,C),C&&Ot(()=>{$||($=ot(e,en,{duration:150},!0)),$.run(1)}),S=!0)},o(C){P(i.$$.fragment,C),P(o.$$.fragment,C),P(u.$$.fragment,C),P(d.$$.fragment,C),P(v.$$.fragment,C),C&&($||($=ot(e,en,{duration:150},!1)),$.run(0)),S=!1},d(C){C&&k(e),z(i),z(o),z(u),z(d),z(v),C&&$&&$.end()}}}function GT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("SMTP server host"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].smtp.host),r||(a=G(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.host&&Ce(l,u[0].smtp.host)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function XT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Port"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","number"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].smtp.port),r||(a=G(l,"input",n[15]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&At(l.value)!==u[0].smtp.port&&Ce(l,u[0].smtp.port)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function QT(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[23],items:n[5]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new rs({props:u}),ge.push(()=>Ne(l,"keyOfSelected",a)),{c(){e=_("label"),t=N("TLS Encryption"),s=T(),B(l.$$.fragment),p(e,"for",i=n[23])},m(f,c){w(f,e,c),h(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&8388608&&i!==(i=f[23]))&&p(e,"for",i);const d={};c&8388608&&(d.id=f[23]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,He(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function xT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Username"),s=T(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23])},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].smtp.username),r||(a=G(l,"input",n[17]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.username&&Ce(l,u[0].smtp.username)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function eD(n){let e,t,i,s,l,o,r;function a(f){n[18](f)}let u={id:Line truncated
|
||||
the
|
||||
`),r=_("strong"),u=N(a),f=N(`
|
||||
to the
|
||||
`),c=_("strong"),m=N(d),g=N(`.
|
||||
`),v=_("br"),b=N(`
|
||||
There are numerous command line tools that can help you, such as:
|
||||
`),y=_("a"),y.textContent=`rclone
|
||||
`,$=N(`,
|
||||
`),S=_("a"),S.textContent=`s5cmd
|
||||
`,C=N(", etc."),M=T(),D=_("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener"),p(y,"class","txt-bold"),p(S,"href","https://github.com/peak/s5cmd"),p(S,"target","_blank"),p(S,"rel","noopener"),p(S,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(D,"class","clearfix m-t-base")},m(L,F){w(L,e,F),h(e,t),h(t,i),h(t,s),h(t,l),h(l,o),h(l,r),h(r,u),h(l,f),h(l,c),h(c,m),h(l,g),h(l,v),h(l,b),h(l,y),h(l,$),h(l,S),h(l,C),h(e,M),h(e,D),E=!0},p(L,F){(!E||F&8)&&a!==(a=L[3]?"S3 storage":"local file system")&&he(u,a),(!E||F&1)&&d!==(d=L[0].enabled?"S3 storage":"local file system")&&he(m,d)},i(L){E||(L&&Ot(()=>{O||(O=ot(e,en,{duration:150},!0)),O.run(1)}),E=!0)},o(L){L&&(O||(O=ot(e,en,{duration:150},!1)),O.run(0)),E=!1},d(L){L&&k(e),L&&O&&O.end()}}}function rh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,$,S,C,M,D;return i=new Ie({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[rD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[aD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),u=new Ie({props:{class:"form-field required",name:"s3.region",$$slots:{default:[uD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),d=new Ie({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[fD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),v=new Ie({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[cD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),$=new Ie({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[dD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),f=T(),c=_("div"),B(d.$$.fragment),m=T(),g=_("div"),B(v.$$.fragment),b=T(),y=_("div"),B($.$$.fragment),S=T(),C=_("div"),p(t,"class","col-lg-12"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(c,"class","col-lg-6"),p(g,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(O,E){w(O,e,E),h(e,t),V(i,t,null),h(e,s),h(e,l),V(o,l,null),h(e,r),h(e,a),V(u,a,null),h(e,f),h(e,c),V(d,c,null),h(e,m),h(e,g),V(v,g,null),h(e,b),h(e,y),V($,y,null),h(e,S),h(e,C),D=!0},p(O,E){const L={};E&1572865&&(L.$$scope={dirty:E,ctx:O}),i.$set(L);const F={};E&1572865&&(F.$$scope={dirty:E,ctx:O}),o.$set(F);const R={};E&1572865&&(R.$$scope={dirty:E,ctx:O}),u.$set(R);const H={};E&1572865&&(H.$$scope={dirty:E,ctx:O}),d.$set(H);const te={};E&1572865&&(te.$$scope={dirty:E,ctx:O}),v.$set(te);const Q={};E&1572865&&(Q.$$scope={dirty:E,ctx:O}),$.$set(Q)},i(O){D||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(v.$$.fragment,O),A($.$$.fragment,O),O&&Ot(()=>{M||(M=ot(e,en,{duration:150},!0)),M.run(1)}),D=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(v.$$.fragment,O),P($.$$.fragment,O),O&&(M||(M=ot(e,en,{duration:150},!1)),M.run(0)),D=!1},d(O){O&&k(e),z(i),z(o),z(u),z(d),z(v),z($),O&&M&&M.end()}}}function rD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Endpoint"),s=T(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].endpoint),r||(a=G(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].endpoint&&Ce(l,u[0].endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function aD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Bucket"),s=T(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].bucket),r||(a=G(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].bucket&&Ce(l,u[0].bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function uD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Region"),s=T(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].region),r||(a=G(l,"input",n[11]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].region&&Ce(l,u[0].region)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function fD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Access key"),s=T(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].accessKey),r||(a=G(l,"input",n[12]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].accessKey&&Ce(l,u[0].accessKey)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}functio
Line truncated
|
||||
<p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,g=T(),b.c(),p(o,"class","breadcrumb-item"),p(a,"class","breadcrumb-item"),p(l,"class","breadcrumbs"),p(s,"class","page-header"),p(m,"class","content txt-xl m-b-base"),p(d,"class","panel"),p(d,"autocomplete","off"),p(c,"class","wrapper"),p(i,"class","page-wrapper")},m(O,E){V(e,O,E),w(O,t,E),w(O,i,E),h(i,s),h(s,l),h(l,o),h(l,r),h(l,a),h(a,u),h(i,f),h(i,c),h(c,d),h(d,m),h(d,g),M[v].m(d,null),y=!0,$||(S=G(d,"submit",Yt(n[16])),$=!0)},p(O,[E]){(!y||E&32)&&he(u,O[5]);let L=v;v=D(O),v===L?M[v].p(O,E):(Pe(),P(M[L],1,1,()=>{M[L]=null}),Le(),b=M[v],b?b.p(O,E):(b=M[v]=C[v](O),b.c()),A(b,1),b.m(d,null))},i(O){y||(A(e.$$.fragment,O),A(b),y=!0)},o(O){P(e.$$.fragment,O),P(b),y=!1},d(O){z(e,O),O&&k(t),O&&k(i),M[v].d(),$=!1,S()}}}function hD(n,e,t){let i,s;yt(n,Rt,D=>t(5,s=D)),fn(Rt,s="Files storage",s);let l={},o=!1,r=!1,a="",u=!1;f();async function f(){t(1,o=!0);try{const D=await be.settings.getAll()||{};d(D)}catch(D){be.errorResponseHandler(D)}t(1,o=!1)}async function c(){if(!(r||!i)){t(2,r=!0);try{const D=await be.settings.update(W.filterRedactedProps({s3:l}));d(D),ki({}),un("Successfully saved Files storage settings.")}catch(D){be.errorResponseHandler(D)}t(2,r=!1)}}function d(D={}){t(0,l=(D==null?void 0:D.s3)||{}),t(3,u=l.enabled),t(7,a=JSON.stringify(l))}function m(){l.enabled=this.checked,t(0,l)}function g(){l.endpoint=this.value,t(0,l)}function v(){l.bucket=this.value,t(0,l)}function b(){l.region=this.value,t(0,l)}function y(){l.accessKey=this.value,t(0,l)}function $(D){n.$$.not_equal(l.secret,D)&&(l.secret=D,t(0,l))}function S(){l.forcePathStyle=this.checked,t(0,l)}const C=()=>c(),M=()=>c();return n.$$.update=()=>{n.$$.dirty&129&&t(4,i=a!=JSON.stringify(l))},[l,o,r,u,i,s,c,a,m,g,v,b,y,$,S,C,M]}class mD extends Ee{constructor(e){super(),Oe(this,e,hD,pD,De,{})}}function gD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[16]),p(s,"for",o=n[16])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),h(s,l),r||(a=G(e,"change",n[8]),r=!0)},p(u,f){f&65536&&t!==(t=u[16])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&65536&&o!==(o=u[16])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function ah(n){let e,t,i,s,l,o,r,a,u,f,c;return i=new Ie({props:{class:"form-field required",name:"emailPassword.minPasswordLength",$$slots:{default:[_D,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field "+(W.isEmpty(n[0].onlyDomains)?"":"disabled"),name:"emailPassword.exceptDomains",$$slots:{default:[bD,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),u=new Ie({props:{class:"form-field "+(W.isEmpty(n[0].exceptDomains)?"":"disabled"),name:"emailPassword.onlyDomains",$$slots:{default:[vD,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),p(t,"class","col-sm-12 m-t-sm"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(e,"class","grid")},m(d,m){w(d,e,m),h(e,t),V(i,t,null),h(e,s),h(e,l),V(o,l,null),h(e,r),h(e,a),V(u,a,null),c=!0},p(d,m){const g={};m&196609&&(g.$$scope={dirty:m,ctx:d}),i.$set(g);const v={};m&1&&(v.class="form-field "+(W.isEmpty(d[0].onlyDomains)?"":"disabled")),m&196609&&(v.$$scope={dirty:m,ctx:d}),o.$set(v);const b={};m&1&&(b.class="form-field "+(W.isEmpty(d[0].exceptDomains)?"":"disabled")),m&196609&&(b.$$scope={dirty:m,ctx:d}),u.$set(b)},i(d){c||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),d&&Ot(()=>{f||(f=ot(e,en,{duration:150},!0)),f.run(1)}),c=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),d&&(f||(f=ot(e,en,{duration:150},!1)),f.run(0)),c=!1},d(d){d&&k(e),z(i),z(o),z(u),d&&f&&f.end()}}}function _D(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Minimum password length"),s=T(),l=_("input"),p(e,"for",i=n[16]),p(l,"type","number"),p(l,"id",o=n[16]),l.required=!0,p(l,"min","5"),p(l,"max","200")},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].minPasswordLength),r||(a=G(l,"input",n[9]),r=!0)},p(u,f){f&65536&&i!==(i=u[16])&&p(e,"for",i),f&65536&&o!==(o=u[16])&&p(l,"id",o),f&1&&At(l.value)!==u[0].minPasswordLength&&Ce(l,u[0].minPasswordLength)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function bD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function g(b){n[10](b)}let v={id:n[16],disabled:!W.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(v.value=n[0].exceptDomains),r=new as({props:v}),ge.push(()=>Ne(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Except domains",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[16]),p(f,"class","help-block")},m(b,y){w(b,e,y),h(e,t),h(e,i),h(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Ue(Ct.call(null,s,{text:`Email domainsLine truncated
|
||||
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&65536&&l!==(l=b[16]))&&p(e,"for",l);const $={};y&65536&&($.id=b[16]),y&1&&($.disabled=!W.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,$.value=b[0].exceptDomains,He(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function vD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function g(b){n[11](b)}let v={id:n[16]+".config.onlyDomains",disabled:!W.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new as({props:v}),ge.push(()=>Ne(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[16]+".config.onlyDomains"),p(f,"class","help-block")},m(b,y){w(b,e,y),h(e,t),h(e,i),h(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Ue(Ct.call(null,s,{text:`Email domains that are ONLY allowed to sign up.
|
||||
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&65536&&l!==(l=b[16]+".config.onlyDomains"))&&p(e,"for",l);const $={};y&65536&&($.id=b[16]+".config.onlyDomains"),y&1&&($.disabled=!W.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,$.value=b[0].onlyDomains,He(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function yD(n){let e,t,i,s;e=new Ie({props:{class:"form-field form-field-toggle m-b-0",name:"emailPassword.enabled",$$slots:{default:[gD,({uniqueId:o})=>({16:o}),({uniqueId:o})=>o?65536:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&ah(n);return{c(){B(e.$$.fragment),t=T(),l&&l.c(),i=xe()},m(o,r){V(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&196609&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].enabled?l?(l.p(o,r),r&1&&A(l,1)):(l=ah(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Pe(),P(l,1,1,()=>{l=null}),Le())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){z(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function kD(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 wD(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 uh(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ue(Ct.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Ot(()=>{t||(t=ot(e,qn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ot(e,qn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function SD(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].enabled?wD:kD}let u=a(n),f=u(n),c=n[2]&&uh();return{c(){e=_("div"),e.innerHTML=`<i class="ri-mail-lock-line"></i>
|
||||
<span class="txt">Email/Password</span>`,t=T(),f.c(),i=T(),s=_("div"),l=T(),c&&c.c(),o=xe(),p(e,"class","inline-flex"),p(s,"class","flex-fill")},m(d,m){w(d,e,m),w(d,t,m),f.m(d,m),w(d,i,m),w(d,s,m),w(d,l,m),c&&c.m(d,m),w(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(i.parentNode,i))),d[2]?c?m&4&&A(c,1):(c=uh(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(Pe(),P(c,1,1,()=>{c=null}),Le())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!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(o)}}}function $D(n){let e,t;const i=[n[3]];let s={$$slots:{header:[SD],default:[yD]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ct(s,i[l]);return e=new Ba({props:s}),n[12](e),e.$on("expand",n[13]),e.$on("collapse",n[14]),e.$on("toggle",n[15]),{c(){B(e.$$.fragment)},m(l,o){V(e,l,o),t=!0},p(l,[o]){const r=o&8?gn(i,[ui(l[3])]):{};o&131077&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[12](null),z(e,l)}}}function CD(n,e,t){let i;const s=["config","expand","collapse","collapseSiblings"];let l=Jt(e,s),o;yt(n,ls,C=>t(7,o=C));let{config:r={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){r.enabled=this.checked,t(0,r)}function m(){r.minPasswordLength=At(this.value),t(0,r)}function g(C){n.$$.not_equal(r.exceptDomains,C)&&(r.exceptDomains=C,t(0,r))}function v(C){n.$$.not_equal(r.onlyDomains,C)&&(r.onlyDomains=C,t(0,r))}function b(C){ge[C?"unshift":"push"](()=>{a=C,t(1,a)})}function y(C){at.call(this,n,C)}function $(C){at.call(this,n,C)}function S(C){at.call(this,n,C)}return n.$$set=C=>{e=ct(ct({},e),ai(C)),t(3,l=Jt(e,s)),"config"in C&&t(0,r=C.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!W.isEmpty(o==null?void 0:o.emailPassword))},[r,a,i,l,u,f,c,o,d,m,g,v,b,y,$,S]}class MD extends Ee{constructor(e){super(),Oe(this,e,CD,$D,De,{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 TD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=N("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[22]),p(s,"for",o=n[22])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),h(s,l),r||(a=G(e,"change",n[11]),r=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&4194304&&o!==(o=u[22])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function fh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g;l=new Ie({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[DD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),a=new Ie({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[OD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),c=new Ie({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[ED,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}});let v=n[4]&&ch(n);return{c(){e=_("div"),t=_("div"),i=T(),s=_("div"),B(l.$$.fragment),o=T(),r=_("div"),B(a.$$.fragment),u=T(),f=_("div"),B(c.$$.fragment),d=T(),v&&v.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(r,"class","col-lg-6"),p(f,"class","col-lg-12"),p(e,"class","grid")},m(b,y){w(b,e,y),h(e,t),h(e,i),h(e,s),V(l,s,null),h(e,o),h(e,r),V(a,r,null),h(e,u),h(e,f),V(c,f,null),h(e,d),v&&v.m(e,null),g=!0},p(b,y){const $={};y&2&&($.name=b[1]+".clientId"),y&12582913&&($.$$scope={dirty:y,ctx:b}),l.$set($);const S={};y&2&&(S.name=b[1]+".clientSecret"),y&12582913&&(S.$$scope={dirty:y,ctx:b}),a.$set(S);const C={};y&2&&(C.name=b[1]+".allowRegistrations"),y&12582913&&(C.$$scope={dirty:y,ctx:b}),c.$set(C),b[4]?v?(v.p(b,y),y&16&&A(v,1)):(v=ch(b),v.c(),A(v,1),v.m(e,null)):v&&(Pe(),P(v,1,1,()=>{v=null}),Le())},i(b){g||(A(l.$$.fragment,b),A(a.$$.fragment,b),A(c.$$.fragment,b),A(v),b&&Ot(()=>{m||(m=ot(e,en,{duration:200},!0)),m.run(1)}),g=!0)},o(b){P(l.$$.fragment,b),P(a.$$.fragment,b),P(c.$$.fragment,b),P(v),b&&(m||(m=ot(e,en,{duration:200},!1)),m.run(0)),g=!1},d(b){b&&k(e),z(l),z(a),z(c),v&&v.d(),b&&m&&m.end()}}}function DD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Client ID"),s=T(),l=_("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",o=n[22]),l.required=!0},m(u,f){w(u,e,f),h(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].clientId),r||(a=G(l,"input",n[12]),r=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&o!==(o=u[22])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&Ce(l,u[0].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function OD(n){let e,t,i,s,l,o,r;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 Ya({props:u}),ge.push(()=>Ne(l,"value",a)),{c(){e=_("label"),t=N("Client Secret"),s=T(),B(l.$$.fragment),p(e,"for",i=n[22])},m(f,c){w(f,e,c),h(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&4194304&&i!==(i=f[22]))&&p(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!o&&c&Line truncated
|
||||
another PocketBase environment.</p>`,t=T(),i=_("div"),s=_("button"),s.innerHTML='<span class="txt">Copy</span>',l=T(),B(o.$$.fragment),r=T(),a=_("div"),u=_("div"),f=T(),c=_("button"),c.innerHTML=`<i class="ri-download-line"></i>
|
||||
<span class="txt">Download as JSON</span>`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-secondary fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(v,b){w(v,e,b),w(v,t,b),w(v,i,b),h(i,s),h(i,l),V(o,i,null),n[8](i),w(v,r,b),w(v,a,b),h(a,u),h(a,f),h(a,c),d=!0,m||(g=[G(s,"click",n[7]),G(i,"keydown",n[9]),G(c,"click",n[10])],m=!0)},p(v,b){const y={};b&4&&(y.content=v[2]),o.$set(y)},i(v){d||(A(o.$$.fragment,v),d=!0)},o(v){P(o.$$.fragment,v),d=!1},d(v){v&&k(e),v&&k(t),v&&k(i),z(o),n[8](null),v&&k(r),v&&k(a),m=!1,Je(g)}}}function QD(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:le,i:le,o:le,d(t){t&&k(e)}}}function xD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v;e=new Hi({});const b=[QD,XD],y=[];function $(S,C){return S[1]?0:1}return m=$(n),g=y[m]=b[m](n),{c(){B(e.$$.fragment),t=T(),i=_("main"),s=_("header"),l=_("nav"),o=_("div"),o.textContent="Settings",r=T(),a=_("div"),u=N(n[3]),f=T(),c=_("div"),d=_("div"),g.c(),p(o,"class","breadcrumb-item"),p(a,"class","breadcrumb-item"),p(l,"class","breadcrumbs"),p(s,"class","page-header"),p(d,"class","panel"),p(c,"class","wrapper"),p(i,"class","page-wrapper")},m(S,C){V(e,S,C),w(S,t,C),w(S,i,C),h(i,s),h(s,l),h(l,o),h(l,r),h(l,a),h(a,u),h(i,f),h(i,c),h(c,d),y[m].m(d,null),v=!0},p(S,[C]){(!v||C&8)&&he(u,S[3]);let M=m;m=$(S),m===M?y[m].p(S,C):(Pe(),P(y[M],1,1,()=>{y[M]=null}),Le(),g=y[m],g?g.p(S,C):(g=y[m]=b[m](S),g.c()),A(g,1),g.m(d,null))},i(S){v||(A(e.$$.fragment,S),A(g),v=!0)},o(S){P(e.$$.fragment,S),P(g),v=!1},d(S){z(e,S),S&&k(t),S&&k(i),y[m].d()}}}function eO(n,e,t){let i,s;yt(n,Rt,b=>t(3,s=b)),fn(Rt,s="Export collections",s);const l="export_"+W.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await be.collections.getFullList(100,{$cancelKey:l}));for(let b of r)delete b.created,delete b.updated}catch(b){be.errorResponseHandler(b)}t(1,a=!1)}function f(){W.downloadJson(r,"pb_schema")}function c(){W.copyToClipboard(i),J0("The collections list was copied to your clipboard!",3e3)}const d=()=>c();function m(b){ge[b?"unshift":"push"](()=>{o=b,t(0,o)})}const g=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const y=window.getSelection(),$=document.createRange();$.selectNodeContents(o),y.removeAllRanges(),y.addRange($)}},v=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,2))},[o,a,i,s,f,c,r,d,m,g,v]}class tO extends Ee{constructor(e){super(),Oe(this,e,eO,xD,De,{})}}function gh(n,e,t){const i=n.slice();return i[15]=e[t],i}function nO(n){let e,t,i,s,l,o=n[15].new.name+"",r,a=n[15].old.name!==n[15].new.name&&_h(n);return{c(){e=_("span"),e.textContent="Modified",t=T(),i=_("div"),a&&a.c(),s=T(),l=_("strong"),r=N(o),p(e,"class","label label-warning"),p(l,"class","txt"),p(i,"class","inline-flex fleg-gap-5")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),a&&a.m(i,null),h(i,s),h(i,l),h(l,r)},p(u,f){u[15].old.name!==u[15].new.name?a?a.p(u,f):(a=_h(u),a.c(),a.m(i,s)):a&&(a.d(1),a=null),f&4&&o!==(o=u[15].new.name+"")&&he(r,o)},d(u){u&&k(e),u&&k(t),u&&k(i),a&&a.d()}}}function iO(n){var o;let e,t,i,s=((o=n[15].old)==null?void 0:o.name)+"",l;return{c(){e=_("span"),e.textContent="Deleted",t=T(),i=_("strong"),l=N(s),p(e,"class","label label-danger")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),h(i,l)},p(r,a){var u;a&4&&s!==(s=((u=r[15].old)==null?void 0:u.name)+"")&&he(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function sO(n){var o;let e,t,i,s=((o=n[15].new)==null?void 0:o.name)+"",l;return{c(){e=_("span"),e.textContent="New",t=T(),i=_("strong"),l=N(s),p(e,"class","label label-success")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),h(i,l)},p(r,a){var u;a&4&&s!==(s=((u=r[15].new)==null?void 0:u.name)+"")&&he(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function _h(n){let e,t=n[15].old.name+"",i,s,l;return{c(){e=_("strong"),i=N(t),s=T(),l=_("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){w(o,e,r),h(e,i),w(o,s,r),w(o,l,r)},p(o,r){r&4&&t!==(t=o[15].old.name+"")&&he(i,t)},d(o){o&&k(e),o&&k(s),o&&k(l)}}}function bh(n,e){let t,i,s,l,o,r=(xl(e[15].old,e[15].new,[window.DIFF_DELETE,window.DIFF_EQUAL])||"N/A")+"",a,u,f,c=(xl(e[15].old,e[15].new,[window.DIFF_INSERT,window.DIFF_EQUAL])||"N/A")+"",d;function m(b,y){var $,S;return($=b[15].old)!=null&&$.id?(S=b[15].new)!=null&&S.id?nO:iO:sO}let g=m(e),v=g(e);return{key:n,first:null,c(){t=_("div"),i=_("div"),v.c(),s=T(),l=_("div"),o=_("code"),a=T(),u=_("div"),f=_("code"),d=T(),p(i,"class","flex flex-gap-10"),p(t,"class","col-12"),p(o,"class","code-block svelte-10rlu5l"),p(l,"class","col-6 p-b-10"),p(f,"class","code-block svelte-10rlu5l"),p(u,"class","col-6 p-b-10"),this.first=t},m(b,y){w(b,t,y),h(t,i),v.m(i,null),w(b,s,y),w(b,l,y),h(l,o),o.innerHTML=r,w(b,a,y),w(b,u,y),h(u,f),f.innerHTML=c,h(u,d)},p(b,y){e=b,g===(g=m(e))&&v?v.p(e,y):(v.d(1),v=g(e),v&&(v.c(),v.m(i,nulLine truncated
|
||||
`),o=_("button"),o.innerHTML='<span class="txt">Load from JSON file</span>',r=T(),B(a.$$.fragment),u=T(),D&&D.c(),f=T(),O&&O.c(),c=T(),d=_("div"),E&&E.c(),m=T(),g=_("div"),v=T(),b=_("button"),y=_("span"),y.textContent="Review",p(t,"type","file"),p(t,"class","hidden"),p(t,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),ie(o,"btn-loading",n[11]),p(e,"class","content txt-xl m-b-base"),p(g,"class","flex-fill"),p(y,"class","txt"),p(b,"type","button"),p(b,"class","btn btn-expanded btn-warning m-l-auto"),b.disabled=$=!n[12],p(d,"class","flex m-t-base")},m(L,F){w(L,e,F),h(e,t),n[16](t),h(e,i),h(e,s),h(s,l),h(s,o),w(L,r,F),V(a,L,F),w(L,u,F),D&&D.m(L,F),w(L,f,F),O&&O.m(L,F),w(L,c,F),w(L,d,F),E&&E.m(d,null),h(d,m),h(d,g),h(d,v),h(d,b),h(b,y),S=!0,C||(M=[G(t,"change",n[17]),G(o,"click",n[18]),G(b,"click",n[21])],C=!0)},p(L,F){F[0]&2048&&ie(o,"btn-loading",L[11]);const R={};F[0]&32&&(R.class="form-field "+(L[5]?"":"field-error")),F[0]&33|F[1]&48&&(R.$$scope={dirty:F,ctx:L}),a.$set(R),L[5]&&L[1].length&&!L[6]?D||(D=Sh(),D.c(),D.m(f.parentNode,f)):D&&(D.d(1),D=null),L[5]&&L[1].length&&L[6]?O?O.p(L,F):(O=$h(L),O.c(),O.m(c.parentNode,c)):O&&(O.d(1),O=null),L[0]?E?E.p(L,F):(E=Ih(L),E.c(),E.m(d,m)):E&&(E.d(1),E=null),(!S||F[0]&4096&&$!==($=!L[12]))&&(b.disabled=$)},i(L){S||(A(a.$$.fragment,L),S=!0)},o(L){P(a.$$.fragment,L),S=!1},d(L){L&&k(e),n[16](null),L&&k(r),z(a,L),L&&k(u),D&&D.d(L),L&&k(f),O&&O.d(L),L&&k(c),L&&k(d),E&&E.d(),C=!1,Je(M)}}}function pO(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:le,i:le,o:le,d(t){t&&k(e)}}}function wh(n){let e;return{c(){e=_("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function hO(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[5]&&wh();return{c(){e=_("label"),t=N("Collections"),s=T(),l=_("textarea"),r=T(),c&&c.c(),a=xe(),p(e,"for",i=n[35]),p(e,"class","p-b-10"),p(l,"id",o=n[35]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,m){w(d,e,m),h(e,t),w(d,s,m),w(d,l,m),Ce(l,n[0]),w(d,r,m),c&&c.m(d,m),w(d,a,m),u||(f=G(l,"input",n[19]),u=!0)},p(d,m){m[1]&16&&i!==(i=d[35])&&p(e,"for",i),m[1]&16&&o!==(o=d[35])&&p(l,"id",o),m[0]&1&&Ce(l,d[0]),!!d[0]&&!d[5]?c||(c=wh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),c&&c.d(d),d&&k(a),u=!1,f()}}}function Sh(n){let e;return{c(){e=_("div"),e.innerHTML=`<div class="icon"><i class="ri-information-line"></i></div>
|
||||
<div class="content"><string>Your collections configuration is already up-to-date!</string></div>`,p(e,"class","alert alert-info")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $h(n){let e,t,i,s,l,o=n[8].length&&Ch(n),r=n[3].length&&Dh(n),a=n[7].length&&Ph(n);return{c(){e=_("h5"),e.textContent="Detected changes",t=T(),i=_("div"),o&&o.c(),s=T(),r&&r.c(),l=T(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),o&&o.m(i,null),h(i,s),r&&r.m(i,null),h(i,l),a&&a.m(i,null)},p(u,f){u[8].length?o?o.p(u,f):(o=Ch(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[3].length?r?r.p(u,f):(r=Dh(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[7].length?a?a.p(u,f):(a=Ph(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),u&&k(t),u&&k(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function Ch(n){let e=[],t=new Map,i,s=n[8];const l=o=>o[27].id;for(let o=0;o<s.length;o+=1){let r=kh(n,s,o),a=l(r);t.set(a,e[o]=Th(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=xe()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&256&&(s=o[8],e=ht(e,r,l,1,o,s,t,i.parentNode,mn,Th,i,kh))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&k(i)}}}function Mh(n){let e,t,i=n[27].id+"",s,l;return{c(){e=_("small"),t=N("("),s=N(i),l=N(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),h(e,t),h(e,s),h(e,l)},p(o,r){r[0]&256&&i!==(i=o[27].id+"")&&he(s,i)},d(o){o&&k(e)}}}function Th(n,e){let t,i,s,l,o=e[27].name+"",r,a,u,f=e[27].id&&Mh(e);return{key:n,first:null,c(){t=_("div"),i=_("span"),i.textContent="Deleted",s=T(),l=_("strong"),r=N(o),a=T(),f&&f.c(),u=T(),p(i,"class","label label-danger list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){w(c,t,d),h(t,i),h(t,s),h(t,l),h(l,r),h(t,a),f&&f.m(t,null),h(t,u)},p(c,d){e=c,d[0]&256&&o!==(o=e[27].name+"")&&he(r,o),e[27].id?f?f.p(e,d):(f=Mh(e),f.c(),f.m(t,u)):f&&(f.d(1),f=null)},d(c){c&&k(t),f&&f.d()}}}function Dh(n){let e=[],t=new Map,i,s=n[3];const l=o=>o[30].old.id+o[30].new.id;for(let o=0;o<s.length;o+=1){let r=yh(n,s,o),a=l(r);t.set(a,e[o]=Ah(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=xe()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&8&&(s=o[3],e=ht(e,r,l,1,o,s,t,i.parentNode,mn,Ah,i,yh))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&k(i)}}}function Oh(n){let e,t=n[30].old.name+"",i,s;return{c(){e=_("span"),i=N(t),s=N(" -"),p(e,"class","txt-strikethrough txt-hint")},m(l,o){w(l,e,o),h(e,i),w(l,s,o)},p(l,o){o[0]&8&&t!==(t=l[30].old.name+"")&&he(i,t)},d(l){l&&k(e),l&&k(s)}}}function Eh(n){let e,t,i=n[30].new.id+"",s,l;return{c(){e=_("small"),t=N("("),s=N(i),l=N(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),h(e,t),h(e,s),h(e,l)},p(o,r){r[0]&8&&i!==(i=o[30].new.id+"")&&he(s,i)},d(o){o&&k(e)}}}function Ah(n,e){let t,i,s,l,o,r=e[30].new.name+"",a,u,f,c=e[30].old.name!==e[30].new.name&&Oh(e),d=e[30].new.id&&Eh(e);return{key:n,first:null,c(){t=_("div"),i=_("span"),i.textContent="Modified",s=T(),l=_("strong"),c&&c.c(),o=T(),a=N(r),u=T(),d&&d.c(),f=T(),p(i,"class","label label-warning list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(m,g){w(m,t,g),h(t,i),h(t,s),h(t,l),c&&c.m(l,null),h(l,o),h(l,a),h(t,u),d&&d.m(t,null),h(t,f)},p(m,g){e=m,e[30].old.name!==e[30].new.name?c?c.p(e,g):(c=Oh(e),c.c(),c.m(l,o)):c&&(c.d(1),c=null),g[0]&8&&r!==(r=e[30].new.name+"")&&he(a,r),e[30].new.id?d?d.p(e,g):(d=Eh(e),d.c(),d.m(t,f)):d&&(d.d(1),d=null)},d(m){m&&k(t),c&&c.d(),d&&d.d()}}}function Ph(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[27].id;for(let o=0;o<s.length;o+=1){let r=vh(n,s,o),a=l(r);t.set(a,e[o]=Fh(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=xe()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&128&&(s=o[7],e=ht(e,r,l,1,o,s,t,i.parentNode,mn,Fh,i,vh))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&k(i)}}}function Lh(n){let e,t,i=n[27].id+"",s,l;return{c(){e=_("small"),t=N("("),s=N(i),l=N(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),h(e,t),h(e,s),h(e,l)},p(o,r){r[0]&128&&i!==(i=o[27].id+"")&&he(s,i)},d(o){o&&k(e)}}}function Fh(n,e){let t,i,s,l,o=e[27].name+"",r,a,u,f=e[27].id&&Lh(e);return{key:n,first:null,c(){t=_("div"),i=_("span"),i.textContent="New",s=T(),l=_("strong"),r=N(o),a=T(),f&&f.c(),u=T(),p(i,"class","label label-success list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){w(c,t,d),h(t,i),h(t,s),h(t,l),h(l,r),h(t,a),f&&f.m(t,null),h(t,u)},p(c,d){e=c,d[0]&128&&o!==(o=e[27].name+"")&&he(r,o),e[27].id?f?f.p(e,d):(f=Lh(e),f.c(),f.m(t,u)):f&&(f.d(1),f=null)},d(c){c&&k(t),f&&f.d()}}}function Ih(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear</span>',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){w(s,e,l),t||(i=G(e,"click",n[20]),t=!0)},p:le,d(s){s&&k(e),t=!1,i()}}}function mO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y;e=new Hi({});const $=[pO,dO],S=[];function C(D,O){return D[4]?0:1}m=C(n),g=S[m]=$[m](n);let M={};return b=new cO({props:M}),n[22](b),b.$on("submit",n[23]),{c(){B(e.$$.fragmentLine truncated
|
||||
<span class="txt">Manage admins</span>`,t=T(),i=_("hr"),s=T(),l=_("div"),l.innerHTML=`<i class="ri-logout-circle-line"></i>
|
||||
<span class="txt">Logout</span>`,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),o||(r=[Ue(dn.call(null,e)),G(l,"click",n[6])],o=!0)},p:le,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,Je(r)}}}function PO(n){var m;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=W.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((m=n[0])==null?void 0:m.id)&&n[1]&&Hh(n);return o=new H_({props:{routes:bO}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new CO({}),f=new EO({}),{c(){t=T(),i=_("div"),d&&d.c(),s=T(),l=_("div"),B(o.$$.fragment),r=T(),B(a.$$.fragment),u=T(),B(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(g,v){w(g,t,v),w(g,i,v),d&&d.m(i,null),h(i,s),h(i,l),V(o,l,null),h(l,r),V(a,l,null),w(g,u,v),V(f,g,v),c=!0},p(g,[v]){var b;(!c||v&12)&&e!==(e=W.joinNonEmpty([g[3],g[2],"PocketBase"]," - "))&&(document.title=e),((b=g[0])==null?void 0:b.id)&&g[1]?d?(d.p(g,v),v&3&&A(d,1)):(d=Hh(g),d.c(),A(d,1),d.m(i,s)):d&&(Pe(),P(d,1,1,()=>{d=null}),Le())},i(g){c||(A(d),A(o.$$.fragment,g),A(a.$$.fragment,g),A(f.$$.fragment,g),c=!0)},o(g){P(d),P(o.$$.fragment,g),P(a.$$.fragment,g),P(f.$$.fragment,g),c=!1},d(g){g&&k(t),g&&k(i),d&&d.d(),z(o),z(a),g&&k(u),z(f,g)}}}function LO(n,e,t){let i,s,l;yt(n,go,d=>t(2,i=d)),yt(n,va,d=>t(0,s=d)),yt(n,Rt,d=>t(3,l=d));let o,r=!1;function a(d){var m,g,v,b;((m=d==null?void 0:d.detail)==null?void 0:m.location)!==o&&(t(1,r=!!((v=(g=d==null?void 0:d.detail)==null?void 0:g.userData)!=null&&v.showAppSidebar)),o=(b=d==null?void 0:d.detail)==null?void 0:b.location,fn(Rt,l="",l),ki({}),u_())}function u(){yi("/")}async function f(){var d;if(!!(s!=null&&s.id))try{const m=await be.settings.getAll({$cancelKey:"loadAppName"});fn(go,i=((d=m==null?void 0:m.meta)==null?void 0:d.appName)||"",i)}catch(m){console.warn("Failed to load app name.",m)}}function c(){be.logout()}return n.$$.update=()=>{n.$$.dirty&1&&s!=null&&s.id&&f()},[s,r,i,l,a,u,c]}class FO extends Ee{constructor(e){super(),Oe(this,e,LO,PO,De,{})}}new FO({target:document.getElementById("app")});export{Je as A,un as B,W as C,yi as D,xe as E,ag as F,yt as G,Cs as H,ln as I,Un as J,ge as K,En as P,Ee as S,P as a,T as b,B as c,z as d,_ as e,p as f,w as g,h,Oe as i,Ue as j,Pe as k,dn as l,V as m,Le as n,k as o,be as p,Ie as q,ie as r,De as s,A as t,G as u,Yt as v,N as w,he as x,le as y,Ce as z};
|
||||
Vendored
+3
-3
@@ -20,14 +20,14 @@
|
||||
<meta name="msapplication-config" content="./images/favicon/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<!-- the base path ./ will be auto concatenated diring build -->
|
||||
<!-- the base path is auto replaced diring build for static loaded js -->
|
||||
<script src="./libs/diff/diff.js"></script>
|
||||
<script>
|
||||
window.Prism = window.Prism || {};
|
||||
window.Prism.manual = true;
|
||||
</script>
|
||||
<script type="module" crossorigin src="./assets/index.6e74b406.js"></script>
|
||||
<link rel="stylesheet" href="./assets/index.b7dd967b.css">
|
||||
<script type="module" crossorigin src="./assets/index.42f4af63.js"></script>
|
||||
<link rel="stylesheet" href="./assets/index.4ee1c213.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
Reference in new issue
Block a user