Compare commits

...
1 Commits
Author SHA1 Message Date
Gani Georgiev 3f196128c7 unregistered closed/destroyed overlay panels 2023-01-30 16:28:24 +02:00
29 changed files with 122 additions and 116 deletions

No files matched your search

@@ -1,4 +1,4 @@
import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as me,f as k,g as h,h as n,m as _e,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as m,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index-7525a1a3.js";import{S as Be}from"./SdkTabs-abcd77ed.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",_,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),_=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,_),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&m(o),i=!1,u()}}}function he(a,l){let o,s,_,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),me(s.$$.fragment),_=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),_e(s,o,null),n(o,_),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&m(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",_,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",E,x,I,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:`
import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as me,f as k,g as h,h as n,m as _e,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as m,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index-4530dce9.js";import{S as Be}from"./SdkTabs-af8657d5.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",_,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),_=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,_),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&m(o),i=!1,u()}}}function he(a,l){let o,s,_,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),me(s.$$.fragment),_=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),_e(s,o,null),n(o,_),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&m(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",_,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",E,x,I,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@@ -1,4 +1,4 @@
import{S as ze,i as Ue,s as je,N as Ve,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,O as qe,P as xe,k as Je,Q as Ke,n as Qe,t as U,a as j,o as d,d as ie,R as Ie,C as He,p as We,r as x,u as Ge}from"./index-7525a1a3.js";import{S as Xe}from"./SdkTabs-abcd77ed.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,J,S,F,ce,L,M,de,K,N=r[0].name+"",Q,ue,pe,V,I,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:`
import{S as ze,i as Ue,s as je,N as Ve,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,O as qe,P as xe,k as Je,Q as Ke,n as Qe,t as U,a as j,o as d,d as ie,R as Ie,C as He,p as We,r as x,u as Ge}from"./index-4530dce9.js";import{S as Xe}from"./SdkTabs-af8657d5.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,J,S,F,ce,L,M,de,K,N=r[0].name+"",Q,ue,pe,V,I,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${r[3]}');
@@ -1,4 +1,4 @@
import{S as je,i as He,s as Je,N as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,O as Ve,P as Ne,k as Qe,Q as ze,n as Ke,t as j,a as H,o as c,d as ue,R as Ye,C as Be,p as Ge,r as J,u as Xe}from"./index-7525a1a3.js";import{S as Ze}from"./SdkTabs-abcd77ed.js";function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function Le(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,L,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,U,ie,A,V,S=[],Ae=new Map,Ee,B,w=[],Te=new Map,T;k=new Ze({props:{js:`
import{S as je,i as He,s as Je,N as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,O as Ve,P as Ne,k as Qe,Q as ze,n as Ke,t as j,a as H,o as c,d as ue,R as Ye,C as Be,p as Ge,r as J,u as Xe}from"./index-4530dce9.js";import{S as Ze}from"./SdkTabs-af8657d5.js";function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function Le(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,L,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,U,ie,A,V,S=[],Ae=new Map,Ee,B,w=[],Te=new Map,T;k=new Ze({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');
@@ -1,4 +1,4 @@
import{S as Se,i as ve,s as we,N as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,O as ce,P as ye,k as ge,Q as Pe,n as Re,t as tt,a as et,o as c,d as Ut,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index-7525a1a3.js";import{S as Ae}from"./SdkTabs-abcd77ed.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&&lt(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&&lt(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,M,dt,Lt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:`
import{S as Se,i as ve,s as we,N as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,O as ce,P as ye,k as ge,Q as Pe,n as Re,t as tt,a as et,o as c,d as Ut,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index-4530dce9.js";import{S as Ae}from"./SdkTabs-af8657d5.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&&lt(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&&lt(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,M,dt,Lt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[6]}');
@@ -1,4 +1,4 @@
import{S as Ue,i as _e,s as qe,e as je,f as Ce,T as XO,g as Ge,y as ZO,o as Re,K as ze,L as Ae,M as Ie}from"./index-7525a1a3.js";import{P as Ee,N as Ne,u as Be,D as De,v as QO,T as R,I as Oe,w as cO,x as l,y as Me,L as hO,z as pO,A as z,B as uO,F as ee,G as SO,H as C,J as Je,K as Le,E as k,M as j,O as Ke,Q as He,R as g,U as Fe,V as Ot,a as V,h as et,b as tt,c as at,d as it,e as rt,s as st,f as nt,g as lt,i as ot,r as Qt,j as ct,k as ht,l as pt,m as ut,n as St,o as $t,p as ft,q as dt,t as bO,C as G}from"./index-0935db40.js";class N{constructor(O,t,a,i,s,r,n,o,c,h=0,Q){this.p=O,this.stack=t,this.state=a,this.reducePos=i,this.pos=s,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=c,this.lookAhead=h,this.parent=Q}toString(){return`[${this.stack.filter((O,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,t,a=0){let i=O.parser.context;return new N(O,[],t,a,a,0,[],0,i?new xO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let t=O>>19,a=O&65535,{parser:i}=this.p,s=i.dynamicPrecedence(a);if(s&&(this.score+=s),t==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),a<i.minRepeatTerm&&this.storeNode(a,this.reducePos,this.reducePos,4,!0),this.reduceContext(a,this.reducePos);return}let r=this.stack.length-(t-1)*3-(O&262144?6:0),n=r?this.stack[r-2]:0,o=this.reducePos-n;o>=2e3&&(n==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=o):this.p.lastBigReductionSize<o&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=n,this.p.lastBigReductionSize=o));let c=r?this.stack[r-1]:0,h=this.bufferBase+this.buffer.length-c;if(a<i.minRepeatTerm||O&131072){let Q=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(a,n,Q,h+4,!0)}if(O&262144)this.state=this.stack[r];else{let Q=this.stack[r-3];this.state=i.getGoto(Q,a,!0)}for(;this.stack.length>r;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,t,a,i=4,s=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,n=this.buffer.length;if(n==0&&r.parent&&(n=r.bufferBase-r.parent.bufferBase,r=r.parent),n>0&&r.buffer[n-4]==0&&r.buffer[n-1]>-1){if(t==a)return;if(r.buffer[n-2]>=t){r.buffer[n-2]=a;return}}}if(!s||this.pos==a)this.buffer.push(O,t,a,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0)for(;r>0&&this.buffer[r-2]>a;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4);this.buffer[r]=O,this.buffer[r+1]=t,this.buffer[r+2]=a,this.buffer[r+3]=i}}shift(O,t,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=a,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,a,4);else{let s=O,{parser:r}=this.p;(a>this.pos||t<=r.maxNode)&&(this.pos=a,r.stateFlag(s,1)||(this.reducePos=a)),this.pushState(s,i),this.shiftContext(t,i),t<=r.maxNode&&this.buffer.push(t,i,a,4)}}apply(O,t,a){O&65536?this.reduce(O):this.shift(O,t,a)}useNode(O,t){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(t,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,t=O.buffer.length;for(;t>0&&O.buffer[t-2]>O.reducePos;)t-=4;let a=O.buffer.slice(t),i=O.bufferBase+t;for(;O&&i==O.bufferBase;)O=O.parent;return new N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,t){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,t,4),this.storeNode(0,this.pos,t,a?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(O){for(let t=new Pt(this);;){let a=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,O);if(a==0)return!1;if(!(a&65536))return!0;t.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let s=0,r;s<t.length;s+=2)(r=t[s+1])!=this.state&&this.p.parser.hasAction(r,O)&&i.push(t[s],r);if(this.stack.length<120)for(let s=0;i.length<4<<1&&s<t.length;s+=2){let r=t[s+1];i.some((n,o)=>o&1&&n==r)||i.push(t[s],r)}t=i}let a=[];for(let i=0;i<t.length&&a.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let r=this.split();r.pushState(s,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(t[i],this.pos),r.score-=200,a.push(r)}return a}forceReduce(){let O=this.p.parser.stateSlot(this.state,5);if(!(O&65536))return!1;let{parser:t}=this.p;if(!t.validAction(this.state,O)){let a=O>>19,i=O&65535,s=this.stack.length-a*3;if(s<0||t.getGoto(this.stack[s],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.Line truncated
import{S as Ue,i as _e,s as qe,e as je,f as Ce,T as XO,g as Ge,y as ZO,o as Re,K as ze,L as Ae,M as Ie}from"./index-4530dce9.js";import{P as Ee,N as Ne,u as Be,D as De,v as QO,T as R,I as Oe,w as cO,x as l,y as Me,L as hO,z as pO,A as z,B as uO,F as ee,G as SO,H as C,J as Je,K as Le,E as k,M as j,O as Ke,Q as He,R as g,U as Fe,V as Ot,a as V,h as et,b as tt,c as at,d as it,e as rt,s as st,f as nt,g as lt,i as ot,r as Qt,j as ct,k as ht,l as pt,m as ut,n as St,o as $t,p as ft,q as dt,t as bO,C as G}from"./index-0935db40.js";class N{constructor(O,t,a,i,s,r,n,o,c,h=0,Q){this.p=O,this.stack=t,this.state=a,this.reducePos=i,this.pos=s,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=c,this.lookAhead=h,this.parent=Q}toString(){return`[${this.stack.filter((O,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,t,a=0){let i=O.parser.context;return new N(O,[],t,a,a,0,[],0,i?new xO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let t=O>>19,a=O&65535,{parser:i}=this.p,s=i.dynamicPrecedence(a);if(s&&(this.score+=s),t==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),a<i.minRepeatTerm&&this.storeNode(a,this.reducePos,this.reducePos,4,!0),this.reduceContext(a,this.reducePos);return}let r=this.stack.length-(t-1)*3-(O&262144?6:0),n=r?this.stack[r-2]:0,o=this.reducePos-n;o>=2e3&&(n==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=o):this.p.lastBigReductionSize<o&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=n,this.p.lastBigReductionSize=o));let c=r?this.stack[r-1]:0,h=this.bufferBase+this.buffer.length-c;if(a<i.minRepeatTerm||O&131072){let Q=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(a,n,Q,h+4,!0)}if(O&262144)this.state=this.stack[r];else{let Q=this.stack[r-3];this.state=i.getGoto(Q,a,!0)}for(;this.stack.length>r;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,t,a,i=4,s=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,n=this.buffer.length;if(n==0&&r.parent&&(n=r.bufferBase-r.parent.bufferBase,r=r.parent),n>0&&r.buffer[n-4]==0&&r.buffer[n-1]>-1){if(t==a)return;if(r.buffer[n-2]>=t){r.buffer[n-2]=a;return}}}if(!s||this.pos==a)this.buffer.push(O,t,a,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0)for(;r>0&&this.buffer[r-2]>a;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4);this.buffer[r]=O,this.buffer[r+1]=t,this.buffer[r+2]=a,this.buffer[r+3]=i}}shift(O,t,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=a,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,a,4);else{let s=O,{parser:r}=this.p;(a>this.pos||t<=r.maxNode)&&(this.pos=a,r.stateFlag(s,1)||(this.reducePos=a)),this.pushState(s,i),this.shiftContext(t,i),t<=r.maxNode&&this.buffer.push(t,i,a,4)}}apply(O,t,a){O&65536?this.reduce(O):this.shift(O,t,a)}useNode(O,t){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(t,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,t=O.buffer.length;for(;t>0&&O.buffer[t-2]>O.reducePos;)t-=4;let a=O.buffer.slice(t),i=O.bufferBase+t;for(;O&&i==O.bufferBase;)O=O.parent;return new N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,t){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,t,4),this.storeNode(0,this.pos,t,a?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(O){for(let t=new Pt(this);;){let a=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,O);if(a==0)return!1;if(!(a&65536))return!0;t.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let s=0,r;s<t.length;s+=2)(r=t[s+1])!=this.state&&this.p.parser.hasAction(r,O)&&i.push(t[s],r);if(this.stack.length<120)for(let s=0;i.length<4<<1&&s<t.length;s+=2){let r=t[s+1];i.some((n,o)=>o&1&&n==r)||i.push(t[s],r)}t=i}let a=[];for(let i=0;i<t.length&&a.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let r=this.split();r.pushState(s,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(t[i],this.pos),r.score-=200,a.push(r)}return a}forceReduce(){let O=this.p.parser.stateSlot(this.state,5);if(!(O&65536))return!1;let{parser:t}=this.p;if(!t.validAction(this.state,O)){let a=O>>19,i=O&65535,s=this.stack.length-a*3;if(s<0||t.getGoto(this.stack[s],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.Line truncated
\${}
} catch (\${error}) {
\${}
@@ -1,4 +1,4 @@
import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,O as pe,P as Pe,k as Se,Q as Oe,n as Re,t as Z,a as x,o as f,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,N as qe}from"./index-7525a1a3.js";import{S as Ae}from"./SdkTabs-abcd77ed.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,R,L,P,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:`
import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,O as pe,P as Pe,k as Se,Q as Oe,n as Re,t as Z,a as x,o as f,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,N as qe}from"./index-4530dce9.js";import{S as Ae}from"./SdkTabs-af8657d5.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,R,L,P,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@@ -1,4 +1,4 @@
import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as d,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,N as Ae}from"./index-7525a1a3.js";import{S as De}from"./SdkTabs-abcd77ed.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:`
import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as d,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,N as Ae}from"./index-4530dce9.js";import{S as De}from"./SdkTabs-af8657d5.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@@ -1,4 +1,4 @@
import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,O as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as f,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,N as Ne}from"./index-7525a1a3.js";import{S as Ve}from"./SdkTabs-abcd77ed.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Ke(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,M=i[0].name+"",F,ee,I,P,L,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,N,$=[],oe=new Map,ie,V,k=[],ne=new Map,y;P=new Ve({props:{js:`
import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,O as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as f,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,N as Ne}from"./index-4530dce9.js";import{S as Ve}from"./SdkTabs-af8657d5.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Ke(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,M=i[0].name+"",F,ee,I,P,L,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,N,$=[],oe=new Map,ie,V,k=[],ne=new Map,y;P=new Ve({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');
@@ -1,4 +1,4 @@
import{S as Ht,i as Lt,s as Pt,C as Q,N as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,O as Le,P as ht,k as Rt,Q as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index-7525a1a3.js";import{S as Nt}from"./SdkTabs-abcd77ed.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,g,D,V,L,J,j,B,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?Jt:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=m(),s=a("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
import{S as Ht,i as Lt,s as Pt,C as Q,N as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,O as Le,P as ht,k as Rt,Q as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index-4530dce9.js";import{S as Nt}from"./SdkTabs-af8657d5.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,g,D,V,L,J,j,B,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?Jt:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=m(),s=a("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>username</span></div></td>
<td><span class="label">String</span></td>
<td>The username of the auth record.
@@ -1,4 +1,4 @@
import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-7525a1a3.js";import{S as He}from"./SdkTabs-abcd77ed.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:`
import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-4530dce9.js";import{S as He}from"./SdkTabs-af8657d5.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@@ -1 +1 @@
import{S as oe,i as ae,s as ue,e as le,f as ce,g as fe,y as M,o as de,I as he,J as ge,K as pe,L as ye,C as I,M as me}from"./index-7525a1a3.js";import{C as R,E as S,a as q,h as be,b as ke,c as xe,d as Ke,e as Ce,s as Se,f as qe,g as we,i as Le,r as Ee,j as Ie,k as Re,l as Ae,m as ve,n as Be,o as Oe,p as _e,q as Me,t as Y,S as De}from"./index-0935db40.js";function He(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],r=0;r<o.length;r++){var l=o[r];d.push(new Ue(l,e)),(l.indent||l.dedent)&&(g=!0)}return{name:n.name,startState:function(){return{state:"start",pending:null,indent:g?[]:null}},copyState:function(a){var b={state:a.state,pending:a.pending,indent:a.indent&&a.indent.slice(0)};return a.stack&&(b.stack=a.stack.slice(0)),b},token:We(i),indent:Ne(i,n),languageData:n}}function Z(e,i){if(!e.hasOwnProperty(i))throw new Error("Undefined state "+i+" in simple mode")}function Fe(e,i){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e=e.source):e=String(e),new RegExp((i===!1?"":"^")+"(?:"+e+")",n)}function Te(e){if(!e)return null;if(e.apply)return e;if(typeof e=="string")return e.replace(/\./g," ");for(var i=[],n=0;n<e.length;n++)i.push(e[n]&&e[n].replace(/\./g," "));return i}function Ue(e,i){(e.next||e.push)&&Z(i,e.next||e.push),this.regex=Fe(e.regex),this.token=Te(e.token),this.data=e}function We(e){return function(i,n){if(n.pending){var g=n.pending.shift();return n.pending.length==0&&(n.pending=null),i.pos+=g.text.length,g.token}for(var p=e[n.state],d=0;d<p.length;d++){var o=p[d],r=(!o.data.sol||i.sol())&&i.match(o.regex);if(r){o.data.next?n.state=o.data.next:o.data.push?((n.stack||(n.stack=[])).push(n.state),n.state=o.data.push):o.data.pop&&n.stack&&n.stack.length&&(n.state=n.stack.pop()),o.data.indent&&n.indent.push(i.indentation()+i.indentUnit),o.data.dedent&&n.indent.pop();var l=o.token;if(l&&l.apply&&(l=l(r)),r.length>2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a<r.length;a++)r[a]&&n.pending.push({text:r[a],token:o.token[a-1]});return i.backUp(r[0].length-(r[1]?r[1].length:0)),l[0]}else return l&&l.join?l[0]:l}}return i.next(),null}}function Ne(e,i){return function(n,g){if(n.indent==null||i.dontIndentStates&&i.doneIndentState.indexOf(n.state)>-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;o<d.length;o++){var r=d[o];if(r.data.dedent&&r.data.dedentIfLineStart!==!1){var l=r.regex.exec(g);if(l&&l[0]){p--,(r.next||r.push)&&(d=e[r.next||r.push]),g=g.slice(l[0].length);continue e}}}break}return p<0?0:n.indent[p]}}function Ve(e){let i;return{c(){i=le("div"),ce(i,"class","code-editor")},m(n,g){fe(n,i,g),e[15](i)},p:M,i:M,o:M,d(n){n&&de(i),e[15](null)}}}function Je(e){return JSON.stringify([e==null?void 0:e.name,e==null?void 0:e.type,e==null?void 0:e.schema])}function Pe(e,i,n){let g;he(e,ge,t=>n(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:r=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:A=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,v=r,D=new R,H=new R,F=new R,T=new R,w=[],U=[],W=[],N=[],L="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{w=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let s=t.slice();return a&&I.pushOrReplaceByKey(s,a,"id"),s}function V(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function J(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.removeEventListener("click",O)}function P(){if(!d)return;J();const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.addEventListener("click",O)}function C(t,s="",c=0){var m,z,Q;let h=w.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=[s+"id",s+"created",s+"updated"];h.isAuth&&(u.push(s+"username"),u.push(s+"email"),u.push(s+"emailVisibility"),u.push(s+"verified"));for(const y of h.schema){const E=s+y.name;if(u.push(E),y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,E+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(E+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(E+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const s=w.filter(h=>h.isAuth);for(const h of s){const u=C(h.id,"@request.auth.");for(const m of u)I.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@requestLine truncated
import{S as oe,i as ae,s as ue,e as le,f as ce,g as fe,y as M,o as de,I as he,J as ge,K as pe,L as ye,C as I,M as me}from"./index-4530dce9.js";import{C as R,E as S,a as q,h as be,b as ke,c as xe,d as Ke,e as Ce,s as Se,f as qe,g as we,i as Le,r as Ee,j as Ie,k as Re,l as Ae,m as ve,n as Be,o as Oe,p as _e,q as Me,t as Y,S as De}from"./index-0935db40.js";function He(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],r=0;r<o.length;r++){var l=o[r];d.push(new Ue(l,e)),(l.indent||l.dedent)&&(g=!0)}return{name:n.name,startState:function(){return{state:"start",pending:null,indent:g?[]:null}},copyState:function(a){var b={state:a.state,pending:a.pending,indent:a.indent&&a.indent.slice(0)};return a.stack&&(b.stack=a.stack.slice(0)),b},token:We(i),indent:Ne(i,n),languageData:n}}function Z(e,i){if(!e.hasOwnProperty(i))throw new Error("Undefined state "+i+" in simple mode")}function Fe(e,i){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e=e.source):e=String(e),new RegExp((i===!1?"":"^")+"(?:"+e+")",n)}function Te(e){if(!e)return null;if(e.apply)return e;if(typeof e=="string")return e.replace(/\./g," ");for(var i=[],n=0;n<e.length;n++)i.push(e[n]&&e[n].replace(/\./g," "));return i}function Ue(e,i){(e.next||e.push)&&Z(i,e.next||e.push),this.regex=Fe(e.regex),this.token=Te(e.token),this.data=e}function We(e){return function(i,n){if(n.pending){var g=n.pending.shift();return n.pending.length==0&&(n.pending=null),i.pos+=g.text.length,g.token}for(var p=e[n.state],d=0;d<p.length;d++){var o=p[d],r=(!o.data.sol||i.sol())&&i.match(o.regex);if(r){o.data.next?n.state=o.data.next:o.data.push?((n.stack||(n.stack=[])).push(n.state),n.state=o.data.push):o.data.pop&&n.stack&&n.stack.length&&(n.state=n.stack.pop()),o.data.indent&&n.indent.push(i.indentation()+i.indentUnit),o.data.dedent&&n.indent.pop();var l=o.token;if(l&&l.apply&&(l=l(r)),r.length>2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a<r.length;a++)r[a]&&n.pending.push({text:r[a],token:o.token[a-1]});return i.backUp(r[0].length-(r[1]?r[1].length:0)),l[0]}else return l&&l.join?l[0]:l}}return i.next(),null}}function Ne(e,i){return function(n,g){if(n.indent==null||i.dontIndentStates&&i.doneIndentState.indexOf(n.state)>-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;o<d.length;o++){var r=d[o];if(r.data.dedent&&r.data.dedentIfLineStart!==!1){var l=r.regex.exec(g);if(l&&l[0]){p--,(r.next||r.push)&&(d=e[r.next||r.push]),g=g.slice(l[0].length);continue e}}}break}return p<0?0:n.indent[p]}}function Ve(e){let i;return{c(){i=le("div"),ce(i,"class","code-editor")},m(n,g){fe(n,i,g),e[15](i)},p:M,i:M,o:M,d(n){n&&de(i),e[15](null)}}}function Je(e){return JSON.stringify([e==null?void 0:e.name,e==null?void 0:e.type,e==null?void 0:e.schema])}function Pe(e,i,n){let g;he(e,ge,t=>n(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:r=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:A=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,v=r,D=new R,H=new R,F=new R,T=new R,w=[],U=[],W=[],N=[],L="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{w=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let s=t.slice();return a&&I.pushOrReplaceByKey(s,a,"id"),s}function V(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function J(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.removeEventListener("click",O)}function P(){if(!d)return;J();const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.addEventListener("click",O)}function C(t,s="",c=0){var m,z,Q;let h=w.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=[s+"id",s+"created",s+"updated"];h.isAuth&&(u.push(s+"username"),u.push(s+"email"),u.push(s+"emailVisibility"),u.push(s+"verified"));for(const y of h.schema){const E=s+y.name;if(u.push(E),y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,E+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(E+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(E+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const s=w.filter(h=>h.isAuth);for(const h of s){const u=C(h.id,"@request.auth.");for(const m of u)I.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@requestLine truncated
@@ -1,4 +1,4 @@
import{S as Se,i as Ne,s as qe,e,b as s,E as He,f as o,g as u,u as De,y as Fe,o as m,w as _,h as t,N as he,c as Yt,m as Zt,x as we,O as Le,P as Me,k as Be,Q as Ie,n as Ge,t as Bt,a as It,d as te,R as ze,C as _e,p as Ue,r as xe}from"./index-7525a1a3.js";import{S as je}from"./SdkTabs-abcd77ed.js";function Qe(d){let n,a,r;return{c(){n=e("span"),n.textContent="Show details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-down-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Je(d){let n,a,r;return{c(){n=e("span"),n.textContent="Hide details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-up-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Ae(d){let n,a,r,f,p,b,x,$,h,w,c,V,bt,Gt,R,zt,q,it,F,W,ee,I,G,le,at,ht,X,xt,se,rt,ct,Y,O,Ut,wt,y,Z,_t,jt,$t,z,tt,Ct,Qt,kt,L,dt,gt,ne,ft,oe,D,vt,et,yt,U,pt,ie,H,Ft,lt,Lt,st,At,nt,j,E,Jt,Tt,Kt,Pt,C,Q,M,ae,Rt,re,ut,ce,B,Ot,de,Et,Vt,St,Wt,A,mt,J,K,S,Nt,fe,T,k,pe,N,v,ot,ue,P,qt,me,Dt,be,Ht,Xt,Mt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format
import{S as Se,i as Ne,s as qe,e,b as s,E as He,f as o,g as u,u as De,y as Fe,o as m,w as _,h as t,N as he,c as Yt,m as Zt,x as we,O as Le,P as Me,k as Be,Q as Ie,n as Ge,t as Bt,a as It,d as te,R as ze,C as _e,p as Ue,r as xe}from"./index-4530dce9.js";import{S as je}from"./SdkTabs-af8657d5.js";function Qe(d){let n,a,r;return{c(){n=e("span"),n.textContent="Show details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-down-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Je(d){let n,a,r;return{c(){n=e("span"),n.textContent="Hide details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-up-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Ae(d){let n,a,r,f,p,b,x,$,h,w,c,V,bt,Gt,R,zt,q,it,F,W,ee,I,G,le,at,ht,X,xt,se,rt,ct,Y,O,Ut,wt,y,Z,_t,jt,$t,z,tt,Ct,Qt,kt,L,dt,gt,ne,ft,oe,D,vt,et,yt,U,pt,ie,H,Ft,lt,Lt,st,At,nt,j,E,Jt,Tt,Kt,Pt,C,Q,M,ae,Rt,re,ut,ce,B,Ot,de,Et,Vt,St,Wt,A,mt,J,K,S,Nt,fe,T,k,pe,N,v,ot,ue,P,qt,me,Dt,be,Ht,Xt,Mt;return{c(){n=e("p"),n.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:`,a=s(),r=e("ul"),f=e("li"),f.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single
@@ -1,4 +1,4 @@
import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Se,f as b,g as r,h as s,m as Ee,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ie,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index-7525a1a3.js";import{S as Ne}from"./SdkTabs-abcd77ed.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Ee(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,S,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,E,Z,I,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:`
import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Se,f as b,g as r,h as s,m as Ee,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ie,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index-4530dce9.js";import{S as Ne}from"./SdkTabs-af8657d5.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Ee(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,S,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,E,Z,I,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@@ -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 C,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-7525a1a3.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=C(),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=C(),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,P,v,k,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 C,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-4530dce9.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=C(),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=C(),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,P,v,k,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=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",R=C(),P=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(P,"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,P,$),_(P,v),k=!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),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(H(r.$$.fragment,a),H(d.$$.fragment,a),k=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(P),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,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-7525a1a3.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-4530dce9.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’ll 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]),(!a||$&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,4 +1,4 @@
import{S as z,i as G,s as I,F as J,c as S,m as L,t as v,a as y,d as R,C as M,E as N,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as C,b as h,f as d,r as H,h as k,u as P,v as K,y as E,x as O,z as T}from"./index-7525a1a3.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&F(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),l=m("h5"),s=C(`Type your password to confirm changing your email address
import{S as z,i as G,s as I,F as J,c as S,m as L,t as v,a as y,d as R,C as M,E as N,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as C,b as h,f as d,r as H,h as k,u as P,v as K,y as E,x as O,z as T}from"./index-4530dce9.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&F(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),l=m("h5"),s=C(`Type your password to confirm changing your email address
`),p&&p.c(),n=h(),S(o.$$.fragment),c=h(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),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,t),k(t,l),k(l,s),p&&p.m(l,null),k(e,n),L(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=P(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=F(f),p.c(),p.m(l,null)):p&&(p.d(1),p=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:f}),o.$set(q),(!u||w&2)&&(a.disabled=f[1]),(!u||w&2)&&H(a,"btn-loading",f[1])},i(f){u||(v(o.$$.fragment,f),u=!0)},o(f){y(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),R(o),g=!1,$()}}}function U(r){let e,t,l,s,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>Successfully changed the user email address.</p>
<p>You can now sign in with your new email address.</p></div>`,t=h(),l=m("button"),l.textContent="Close",d(e,"class","alert alert-success"),d(l,"type","button"),d(l,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,l,c),s||(n=P(l,"click",r[6]),s=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(l),s=!1,n()}}}function F(r){let e,t,l;return{c(){e=C("to "),t=m("strong"),l=C(r[3]),d(t,"class","txt-nowrap")},m(s,n){_(s,e,n),_(s,t,n),k(t,l)},p(s,n){n&8&&O(l,s[3])},d(s){s&&b(e),s&&b(t)}}}function V(r){let e,t,l,s,n,o,c,a;return{c(){e=m("label"),t=C("Password"),s=h(),n=m("input"),d(e,"for",l=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,t),_(i,s,u),_(i,n,u),T(n,r[0]),n.focus(),c||(a=P(n,"input",r[7]),c=!0)},p(i,u){u&256&&l!==(l=i[8])&&d(e,"for",l),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(s),i&&b(n),c=!1,a()}}}function X(r){let e,t,l,s;const n=[U,Q],o=[];function c(a,i){return a[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),l=N()},m(a,i){o[e].m(a,i),_(a,l,i),s=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(W(),y(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,i):(t=o[e]=n[e](a),t.c()),v(t,1),t.m(l.parentNode,l))},i(a){s||(v(t),s=!0)},o(a){y(t),s=!1},d(a){o[e].d(a),a&&b(l)}}}function Z(r){let e,t;return e=new J({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(l,s){L(e,l,s),t=!0},p(l,[s]){const n={};s&527&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){R(e,l)}}}function x(r,e,t){let l,{params:s}=e,n="",o=!1,c=!1;async function a(){if(o)return;t(1,o=!0);const g=new j("../");try{const $=A(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){B.errorResponseHandler($)}t(1,o=!1)}const i=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,s=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,l=M.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends z{constructor(e){super(),G(this,e,x,Z,I,{params:5})}}export{te as default};
@@ -1,4 +1,4 @@
import{S as J,i as M,s as W,F as Y,c as F,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as H,v as U,y as S,x as V,z as h}from"./index-7525a1a3.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=R(`Reset your user password
import{S as J,i as M,s as W,F as Y,c as F,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as H,v as U,y as S,x as V,z as h}from"./index-4530dce9.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=R(`Reset your user password
`),d&&d.c(),t=P(),F(o.$$.fragment),c=P(),F(a.$$.fragment),i=P(),u=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block"),u.disabled=r[2],G(u,"btn-loading",r[2])},m(f,$){_(f,e,$),w(e,l),w(l,s),w(s,n),d&&d.m(s,null),w(e,t),N(o,e,null),w(e,c),N(a,e,null),w(e,i),w(e,u),w(u,v),k=!0,g||(C=H(e,"submit",U(r[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=I(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const L={};$&3073&&(L.$$scope={dirty:$,ctx:f}),o.$set(L);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),a.$set(z),(!k||$&4)&&(u.disabled=f[2]),(!k||$&4)&&G(u,"btn-loading",f[2])},i(f){k||(y(o.$$.fragment,f),y(a.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),T(o),T(a),g=!1,C()}}}function Z(r){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
<div class="content txt-bold"><p>Successfully changed the user password.</p>
<p>You can now sign in with your new password.</p></div>`,l=P(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=H(s,"click",r[7]),n=!0)},p:S,i:S,o:S,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function I(r){let e,l,s;return{c(){e=R("for "),l=b("strong"),s=R(r[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&V(s,n[4])},d(n){n&&m(e),n&&m(l)}}}function x(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0,t.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[0]),t.focus(),c||(a=H(t,"input",r[8]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&1&&t.value!==i[0]&&h(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function ee(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password confirm"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[1]),c||(a=H(t,"input",r[9]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&2&&t.value!==i[1]&&h(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(a,i){return a[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=A()},m(a,i){o[e].m(a,i),_(a,s,i),n=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(B(),q(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(a,i):(l=o[e]=t[e](a),l.c()),y(l,1),l.m(s.parentNode,s))},i(a){n||(y(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(s)}}}function se(r){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){F(e.$$.fragment)},m(s,n){N(e,s,n),l=!0},p(s,[n]){const t={};n&2079&&(t.$$scope={dirty:n,ctx:s}),e.$set(t)},i(s){l||(y(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,a=!1;async function i(){if(c)return;l(2,c=!0);const g=new K("../");try{const C=O(n==null?void 0:n.token);await g.collection(C.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,a=!0)}catch(C){Q.errorResponseHandler(C)}l(2,c=!1)}const u=()=>window.close();function v(){t=this.value,l(0,t)}function k(){o=this.value,l(1,o)}return r.$$set=g=>{"params"in g&&l(6,n=g.params)},r.$$.update=()=>{r.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,a,s,i,n,u,v,k]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default};
@@ -1,3 +1,3 @@
import{S as v,i as y,s as w,F as C,c as g,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-7525a1a3.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div>
import{S as v,i as y,s as w,F as C,c as g,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-4530dce9.js";function S(o){let t,s,e,n,l;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=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[4]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function F(o){let t,s,e,n,l;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=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(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 V(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function q(o){let t,s;return t=new C({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:o}}}),{c(){g(t.$$.fragment)},m(e,n){x(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function E(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new P("../");try{const m=T(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class N extends v{constructor(t){super(),y(this,t,E,q,w,{params:2})}}export{N as default};
@@ -1,4 +1,4 @@
import{S as re,i as ae,s as be,N as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index-7525a1a3.js";import{S as fe}from"./SdkTabs-abcd77ed.js";function $e(o){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:`
import{S as re,i as ae,s as be,N as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index-4530dce9.js";import{S as fe}from"./SdkTabs-af8657d5.js";function $e(o){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[1]}');
@@ -1,4 +1,4 @@
import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as L,O as ve,P as Se,k as Re,Q as Me,n as Ae,t as x,a as ee,o as m,d as ye,R as We,C as ze,p as He,r as N,u as Oe,N as Ue}from"./index-7525a1a3.js";import{S as je}from"./SdkTabs-abcd77ed.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,Q,w,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new je({props:{js:`
import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as L,O as ve,P as Se,k as Re,Q as Me,n as Ae,t as x,a as ee,o as m,d as ye,R as We,C as ze,p as He,r as N,u as Oe,N as Ue}from"./index-4530dce9.js";import{S as je}from"./SdkTabs-af8657d5.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,Q,w,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new je({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@@ -1,4 +1,4 @@
import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as I,O as me,P as Re,k as ge,Q as ye,n as Be,t as Z,a as x,o as d,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,N as Ae}from"./index-7525a1a3.js";import{S as Ue}from"./SdkTabs-abcd77ed.js";function ue(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),u=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,u),i||(p=Me(l,"click",m),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,u;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),o.$set(m),(!u||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){u||(Z(o.$$.fragment,i),u=!0)},o(i){x(o.$$.fragment,i),u=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,u,i,p,m,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,R,H,te,O,C,se,J,E=a[0].name+"",K,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:`
import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as I,O as me,P as Re,k as ge,Q as ye,n as Be,t as Z,a as x,o as d,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,N as Ae}from"./index-4530dce9.js";import{S as Ue}from"./SdkTabs-af8657d5.js";function ue(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),u=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,u),i||(p=Me(l,"click",m),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,u;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),o.$set(m),(!u||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){u||(Z(o.$$.fragment,i),u=!0)},o(i){x(o.$$.fragment,i),u=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,u,i,p,m,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,R,H,te,O,C,se,J,E=a[0].name+"",K,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@@ -1,4 +1,4 @@
import{S as qe,i as we,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as F,O as de,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as f,d as $e,R as Se,C as Te,p as Re,r as I,u as Ve,N as Me}from"./index-7525a1a3.js";import{S as Ae}from"./SdkTabs-abcd77ed.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){r(q,s,w),i(s,_),i(s,p),n||(u=Ve(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&f(s),n=!1,u()}}}function ke(a,l){let s,o,_,p;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){r(n,s,u),he(o,s,null),i(s,_),p=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!p||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,O=a[0].name+"",J,se,K,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:`
import{S as qe,i as we,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as F,O as de,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as f,d as $e,R as Se,C as Te,p as Re,r as I,u as Ve,N as Me}from"./index-4530dce9.js";import{S as Ae}from"./SdkTabs-af8657d5.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){r(q,s,w),i(s,_),i(s,p),n||(u=Ve(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&f(s),n=!1,u()}}}function ke(a,l){let s,o,_,p;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){r(n,s,u),he(o,s,null),i(s,_),p=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!p||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,O=a[0].name+"",J,se,K,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@@ -1 +1 @@
import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index-7525a1a3.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&R(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(N(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,u,_=o[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(o,_,t),d=p(a);g.set(d,s[t]=T(d,a))}let f=o[2];const b=t=>t[6].language;for(let t=0;t<f.length;t+=1){let a=D(o,f,t),d=b(a);k.set(d,n[t]=I(d,a))}return{c(){e=v("div"),l=v("div");for(let t=0;t<s.length;t+=1)s[t].c();r=j(),i=v("div");for(let t=0;t<n.length;t+=1)n[t].c();h(l,"class","tabs-header compact left"),h(i,"class","tabs-content"),h(e,"class",c="tabs sdk-tabs "+o[0]+" svelte-1maocj6")},m(t,a){y(t,e,a),m(e,l);for(let d=0;d<s.length;d+=1)s[d].m(l,null);m(e,r),m(e,i);for(let d=0;d<n.length;d+=1)n[d].m(i,null);u=!0},p(t,[a]){a&6&&(_=t[2],s=C(s,a,p,1,t,_,g,l,J,T,null,K)),a&6&&(f=t[2],O(),n=C(n,a,b,1,t,f,k,i,Q,I,null,D),Y()),(!u||a&1&&c!==(c="tabs sdk-tabs "+t[0]+" svelte-1maocj6"))&&h(e,"class",c)},i(t){if(!u){for(let a=0;a<f.length;a+=1)N(n[a]);u=!0}},o(t){for(let a=0;a<n.length;a+=1)P(n[a]);u=!1},d(t){t&&w(e);for(let a=0;a<s.length;a+=1)s[a].d();for(let a=0;a<n.length;a+=1)n[a].d()}}}const M="pb_sdk_preference";function V(o,e,l){let s,{class:g="m-b-base"}=e,{js:r=""}=e,{dart:i=""}=e,n=localStorage.getItem(M)||"javascript";const k=c=>l(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S};
import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index-4530dce9.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&R(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(N(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,u,_=o[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(o,_,t),d=p(a);g.set(d,s[t]=T(d,a))}let f=o[2];const b=t=>t[6].language;for(let t=0;t<f.length;t+=1){let a=D(o,f,t),d=b(a);k.set(d,n[t]=I(d,a))}return{c(){e=v("div"),l=v("div");for(let t=0;t<s.length;t+=1)s[t].c();r=j(),i=v("div");for(let t=0;t<n.length;t+=1)n[t].c();h(l,"class","tabs-header compact left"),h(i,"class","tabs-content"),h(e,"class",c="tabs sdk-tabs "+o[0]+" svelte-1maocj6")},m(t,a){y(t,e,a),m(e,l);for(let d=0;d<s.length;d+=1)s[d].m(l,null);m(e,r),m(e,i);for(let d=0;d<n.length;d+=1)n[d].m(i,null);u=!0},p(t,[a]){a&6&&(_=t[2],s=C(s,a,p,1,t,_,g,l,J,T,null,K)),a&6&&(f=t[2],O(),n=C(n,a,b,1,t,f,k,i,Q,I,null,D),Y()),(!u||a&1&&c!==(c="tabs sdk-tabs "+t[0]+" svelte-1maocj6"))&&h(e,"class",c)},i(t){if(!u){for(let a=0;a<f.length;a+=1)N(n[a]);u=!0}},o(t){for(let a=0;a<n.length;a+=1)P(n[a]);u=!1},d(t){t&&w(e);for(let a=0;a<s.length;a+=1)s[a].d();for(let a=0;a<n.length;a+=1)n[a].d()}}}const M="pb_sdk_preference";function V(o,e,l){let s,{class:g="m-b-base"}=e,{js:r=""}=e,{dart:i=""}=e,n=localStorage.getItem(M)||"javascript";const k=c=>l(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S};
@@ -1,4 +1,4 @@
import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as j,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as d,d as Ue,R as Le,C as Re,p as je,r as I,u as Ie,N as Ne}from"./index-7525a1a3.js";import{S as Ke}from"./SdkTabs-abcd77ed.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&j(_,a),P&6&&I(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&I(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,M=n[0].name+"",N,se,ae,K,Q,A,F,E,G,g,W,ne,z,y,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ke({props:{js:`
import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as j,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as d,d as Ue,R as Le,C as Re,p as je,r as I,u as Ie,N as Ne}from"./index-4530dce9.js";import{S as Ke}from"./SdkTabs-af8657d5.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&j(_,a),P&6&&I(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&I(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,M=n[0].name+"",N,se,ae,K,Q,A,F,E,G,g,W,ne,z,y,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ke({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[3]}');
@@ -1,4 +1,4 @@
import{S as Ct,i as St,s as Ot,C as U,N as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,O as Pe,P as ut,k as Mt,Q as $t,n as Rt,t as pe,a as fe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index-7525a1a3.js";import{S as Lt}from"./SdkTabs-abcd77ed.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=m(),s=r("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
import{S as Ct,i as St,s as Ot,C as U,N as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,O as Pe,P as ut,k as Mt,Q as $t,n as Rt,t as pe,a as fe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index-4530dce9.js";import{S as Lt}from"./SdkTabs-af8657d5.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=m(),s=r("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>username</span></div></td>
<td><span class="label">String</span></td>
<td>The username of the auth record.</td>`,b=m(),u=r("tr"),u.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
@@ -1,4 +1,4 @@
import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index-7525a1a3.js";import{S as dt}from"./SdkTabs-abcd77ed.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,x,se,A,ne,I,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,xe,fe,Ae,ue,M,be,P,H,R=[],Ie=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:`
import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index-4530dce9.js";import{S as dt}from"./SdkTabs-af8657d5.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,x,se,A,ne,I,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,xe,fe,Ae,ue,M,be,P,H,R=[],Ie=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');
@@ -1,62 +1,62 @@
(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 X(){}const kl=n=>n;function Xe(n,e){for(const t in e)n[t]=e[t];return n}function yb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function Nh(n){return n()}function iu(){return Object.create(null)}function Le(n){n.forEach(Nh)}function zt(n){return typeof n=="function"}function be(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function Hn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function kb(n){return Object.keys(n).length===0}function Fh(n,...e){if(n==null)return X;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Je(n,e,t){n.$$.on_destroy.push(Fh(e,t))}function Ft(n,e,t,i){if(n){const s=Rh(n,e,t,i);return n[0](s)}}function Rh(n,e,t,i){return n[1]&&i?Xe(t.ctx.slice(),n[1](i(e))):t.ctx}function Rt(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 jt(n,e,t,i,s,l){if(s){const o=Rh(e,t,i,l);n.p(o,s)}}function Ht(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 Gn(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function At(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 yi(n){return n??""}function Yt(n,e,t){return n.set(t),e}function Pe(n){return n&&zt(n.destroy)?n.destroy:X}const jh=typeof window<"u";let Fo=jh?()=>window.performance.now():()=>Date.now(),fa=jh?n=>requestAnimationFrame(n):X;const _s=new Set;function Hh(n){_s.forEach(e=>{e.c(n)||(_s.delete(e),e.f())}),_s.size!==0&&fa(Hh)}function Ro(n){let e;return _s.size===0&&fa(Hh),{promise:new Promise(t=>{_s.add(e={c:n,f:t})}),abort(){_s.delete(e)}}}function _(n,e){n.appendChild(e)}function qh(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function wb(n){const e=v("style");return Sb(qh(n),e),e.sheet}function Sb(n,e){return _(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function bt(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function v(n){return document.createElement(n)}function z(n){return document.createTextNode(n)}function D(){return z(" ")}function Ae(){return z("")}function K(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function pt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function yn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Zn(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 ht(n){return n===""?null:+n}function Tb(n){return Array.from(n.childNodes)}function re(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function de(n,e){n.value=e??""}function Ir(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Q(n,e,t){n.classList[t?"add":"remove"](e)}function Vh(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Kt(n,e){return new n(e)}const mo=new Map;let ho=0;function Cb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function $b(n,e){const t={stylesheet:wb(e),rules:{}};return mo.set(n,t),t}function rl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{
(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 G(){}const kl=n=>n;function Xe(n,e){for(const t in e)n[t]=e[t];return n}function yb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function Nh(n){return n()}function iu(){return Object.create(null)}function Le(n){n.forEach(Nh)}function zt(n){return typeof n=="function"}function be(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function Hn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function kb(n){return Object.keys(n).length===0}function Fh(n,...e){if(n==null)return G;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Je(n,e,t){n.$$.on_destroy.push(Fh(e,t))}function Ft(n,e,t,i){if(n){const s=Rh(n,e,t,i);return n[0](s)}}function Rh(n,e,t,i){return n[1]&&i?Xe(t.ctx.slice(),n[1](i(e))):t.ctx}function Rt(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 jt(n,e,t,i,s,l){if(s){const o=Rh(e,t,i,l);n.p(o,s)}}function Ht(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 Gn(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function At(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 yi(n){return n??""}function Yt(n,e,t){return n.set(t),e}function Pe(n){return n&&zt(n.destroy)?n.destroy:G}const jh=typeof window<"u";let No=jh?()=>window.performance.now():()=>Date.now(),fa=jh?n=>requestAnimationFrame(n):G;const _s=new Set;function Hh(n){_s.forEach(e=>{e.c(n)||(_s.delete(e),e.f())}),_s.size!==0&&fa(Hh)}function Fo(n){let e;return _s.size===0&&fa(Hh),{promise:new Promise(t=>{_s.add(e={c:n,f:t})}),abort(){_s.delete(e)}}}function _(n,e){n.appendChild(e)}function qh(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function wb(n){const e=v("style");return Sb(qh(n),e),e.sheet}function Sb(n,e){return _(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function bt(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function v(n){return document.createElement(n)}function z(n){return document.createTextNode(n)}function D(){return z(" ")}function Ae(){return z("")}function K(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function pt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function yn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Zn(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 ht(n){return n===""?null:+n}function Tb(n){return Array.from(n.childNodes)}function re(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function de(n,e){n.value=e??""}function Ir(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function x(n,e,t){n.classList[t?"add":"remove"](e)}function Vh(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Kt(n,e){return new n(e)}const po=new Map;let mo=0;function Cb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function $b(n,e){const t={stylesheet:wb(e),rules:{}};return po.set(n,t),t}function rl(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_${Cb(f)}_${r}`,d=qh(n),{stylesheet:m,rules:h}=mo.get(d)||$b(d,n);h[c]||(h[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${c} ${i}ms linear ${s}ms 1 both`,ho+=1,c}function al(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(", "),ho-=s,ho||Mb())}function Mb(){fa(()=>{ho||(mo.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),mo.clear())})}function Db(n,e,t,i){if(!e)return X;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return X;const{delay:l=0,duration:o=300,easing:r=kl,start:a=Fo()+l,end:u=a+o,tick:f=X,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,h;function g(){c&&(h=rl(n,0,1,o,l,r,c)),l||(m=!0)}function b(){c&&al(n,h),d=!1}return Ro(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),b()),!d)return!1;if(m){const k=y-a,T=0+1*r(k/o);f(T,1-T)}return!0}),g(),f(0,1),b}function Ob(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 ul;function li(n){ul=n}function wl(){if(!ul)throw new Error("Function called outside component initialization");return ul}function nn(n){wl().$$.on_mount.push(n)}function Eb(n){wl().$$.after_update.push(n)}function Bh(n){wl().$$.on_destroy.push(n)}function $t(){const n=wl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Vh(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function We(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ms=[],ie=[],ro=[],Pr=[],Uh=Promise.resolve();let Lr=!1;function Wh(){Lr||(Lr=!0,Uh.then(ca))}function cn(){return Wh(),Uh}function nt(n){ro.push(n)}function we(n){Pr.push(n)}const er=new Set;let as=0;function ca(){if(as!==0)return;const n=ul;do{try{for(;as<ms.length;){const e=ms[as];as++,li(e),Ab(e.$$)}}catch(e){throw ms.length=0,as=0,e}for(li(null),ms.length=0,as=0;ie.length;)ie.pop()();for(let e=0;e<ro.length;e+=1){const t=ro[e];er.has(t)||(er.add(t),t())}ro.length=0}while(ms.length);for(;Pr.length;)Pr.pop()();Lr=!1,er.clear(),li(n)}function Ab(n){if(n.fragment!==null){n.update(),Le(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(nt)}}let Rs;function da(){return Rs||(Rs=Promise.resolve(),Rs.then(()=>{Rs=null})),Rs}function Bi(n,e,t){n.dispatchEvent(Vh(`${e?"intro":"outro"}${t}`))}const ao=new Set;let Yn;function pe(){Yn={r:0,c:[],p:Yn}}function me(){Yn.r||Le(Yn.c),Yn=Yn.p}function A(n,e){n&&n.i&&(ao.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(ao.has(n))return;ao.add(n),Yn.c.push(()=>{ao.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const pa={duration:0};function Yh(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&al(n,o)}function f(){const{delay:d=0,duration:m=300,easing:h=kl,tick:g=X,css:b}=s||pa;b&&(o=rl(n,0,1,m,d,h,b,a++)),g(0,1);const y=Fo()+d,k=y+m;r&&r.abort(),l=!0,nt(()=>Bi(n,!0,"start")),r=Ro(T=>{if(l){if(T>=k)return g(1,0),Bi(n,!0,"end"),u(),l=!1;if(T>=y){const C=h((T-y)/m);g(C,1-C)}}return l})}let c=!1;return{start(){c||(c=!0,al(n),zt(s)?(s=s(i),da().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function Kh(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=Yn;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:c=kl,tick:d=X,css:m}=s||pa;m&&(o=rl(n,1,0,f,u,c,m));const h=Fo()+u,g=h+f;nt(()=>Bi(n,!1,"start")),Ro(b=>{if(l){if(b>=g)return d(0,1),Bi(n,!1,"end"),--r.r||Le(r.c),!1;if(b>=h){const y=c((b-h)/f);d(1-y,y)}}return l})}return zt(s)?da().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&al(n,o),l=!1)}}}function ze(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&al(n,u)}function c(m,h){const g=m.b-o;return h*=Math.abs(g),{a:o,b:m.b,d:g,duration:h,start:m.start,end:m.start+h,group:m.group}}function d(m){const{delay:h=0,duration:g=300,easing:b=kl,tick:y=X,css:k}=l||pa,T={start:Fo()+h,b:m};m||(T.group=Yn,Yn.r+=1),r||a?a=T:(k&&(f(),u=rl(n,o,m,g,h,b,k)),m&&y(0,1),r=c(T,g),nt(()=>Bi(n,m,"start")),Ro(C=>{if(a&&C>a.start&&(r=c(a,g),a=null,Bi(n,r.b,"start"),k&&(f(),u=rl(n,o,r.b,r.duration,0,b,l.css))),r){if(C>=r.end)y(o=r.b,1-o),Bi(n,r.b,"end"),a||(r.b?f():--r.group.r||Le(r.group.c)),r=null;else if(C>=r.start){const M=C-r.start;o=r.a+r.d*b(M/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){zt(l)?da().then(()=>{l=l(s),d(m)}):d(m)},end(){f(),r=a=null}}}function su(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e Line truncated
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=D(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function av(n){let e,t,i,s=!n[0]&&Ru();const l=n[1].default,o=Ft(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=D(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),_(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Ru(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&jt(o,l,r,r[2],i?Rt(l,r[2],a,null):Ht(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function uv(n){let e,t;return e=new kn({props:{class:"full-page",center:!0,$$slots:{default:[av]},$$scope:{ctx:n}}}),{c(){q(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function fv(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 t_ extends ye{constructor(e){super(),ve(this,e,fv,uv,be,{nobranding:0})}}function ju(n,e,t){const i=n.slice();return i[11]=e[t],i}const cv=n=>({}),Hu=n=>({uniqueId:n[3]});function dv(n){let e=(n[11]||vo)+"",t;return{c(){t=z(e)},m(i,s){S(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||vo)+"")&&re(t,e)},d(i){i&&w(t)}}}function pv(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||vo)+"",i;return{c(){e=v("pre"),i=z(t)},m(o,r){S(o,e,r),_(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||vo)+"")&&re(i,t)},d(o){o&&w(e)}}}function qu(n){let e,t;function i(o,r){return typeof o[11]=="object"?pv:dv}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=D(),p(e,"class","help-block help-block-error")},m(o,r){S(o,e,r),l.m(e,null),_(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&&w(e),l.d()}}}function mv(n){let e,t,i,s,l;const o=n[7].default,r=Ft(o,n,n[6],Hu);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=qu(ju(n,a,f));return{c(){e=v("div"),r&&r.c(),t=D();for(let f=0;f<u.length;f+=1)u[f].c();p(e,"class",n[0]),Q(e,"error",n[2].length)},m(f,c){S(f,e,c),r&&r.m(e,null),_(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=K(e,"click",n[8]),s=!0)},p(f,[c]){if(r&&r.p&&(!i||c&64)&&jt(r,o,f,f[6],i?Rt(o,f[6],c,cv):Ht(f[6]),Hu),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const m=ju(f,a,d);u[d]?u[d].p(m,c):(u[d]=qu(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]),(!i||c&5)&&Q(e,"error",f[2].length)},i(f){i||(A(r,f),i=!0)},o(f){P(r,f),i=!1},d(f){f&&w(e),r&&r.d(f),bt(u,f),n[9](null),s=!1,l()}}}const vo="Invalid value";function hv(n,e,t){let i;Je(n,Ci,h=>t(5,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+B.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){Ts(r)}nn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(h){We.call(this,n,h)}function m(h){ie[h?"unshift":"push"](()=>{u=h,t(1,u)})}return n.$$set=h=>{"name"in h&&t(4,r=h.name),"class"in h&&t(0,a=h.class),"$$scope"in h&&t(6,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=B.toArray(B.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,m]}class _e extends ye{constructor(e){super(),ve(this,e,hv,mv,be,{name:4,class:0})}}function gv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=D(),l=v("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){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0]),l.focus(),r||(a=K(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]&&de(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _v(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Password"),s=D(),l=v("input"),r=D(),a=v("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){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),de(l,n[1]),S(c,r,d),S(c,a,d),u||(f=K(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]&&de(l,c[1])},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function bv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Password confirm"),s=D(),l=v("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){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[2]),r||(a=K(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]&&de(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function vvLine 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"),Q(f,"btn-disabled",n[3]),Q(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(h,g){S(h,e,g),_(e,t),_(e,i),j(s,e,null),_(e,l),j(o,e,null),_(e,r),j(a,e,null),_(e,u),_(e,f),c=!0,d||(m=K(e,"submit",pt(n[4])),d=!0)},p(h,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:h}),s.$set(b);const y={};g&1538&&(y.$$scope={dirty:g,ctx:h}),o.$set(y);const k={};g&1540&&(k.$$scope={dirty:g,ctx:h}),a.$set(k),(!c||g&8)&&Q(f,"btn-disabled",h[3]),(!c||g&8)&&Q(f,"btn-loading",h[3])},i(h){c||(A(s.$$.fragment,h),A(o.$$.fragment,h),A(a.$$.fragment,h),c=!0)},o(h){P(s.$$.fragment,h),P(o.$$.fragment,h),P(a.$$.fragment,h),c=!1},d(h){h&&w(e),H(s),H(o),H(a),d=!1,m()}}}function yv(n,e,t){const i=$t();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await he.admins.create({email:s,password:l,passwordConfirm:o}),await he.admins.authWithPassword(s,l),i("submit")}catch(d){he.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 kv extends ye{constructor(e){super(),ve(this,e,yv,vv,be,{})}}function Vu(n){let e,t;return e=new t_({props:{$$slots:{default:[wv]},$$scope:{ctx:n}}}),{c(){q(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function wv(n){let e,t;return e=new kv({}),e.$on("submit",n[1]),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p:X,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Sv(n){let e,t,i=n[0]&&Vu(n);return{c(){i&&i.c(),e=Ae()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Vu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(pe(),P(i,1,1,()=>{i=null}),me())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Tv(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){he.logout(!1),t(0,i=!0);return}he.authStore.isValid?Ti("/collections"):he.logout()}return[i,async()=>{t(0,i=!1),await cn(),window.location.search=""}]}class Cv extends ye{constructor(e){super(),ve(this,e,Tv,Sv,be,{})}}const St=Pn(""),yo=Pn(""),Cs=Pn(!1);function Uo(n){const e=n-1;return e*e*e+1}function ko(n,{delay:e=0,duration:t=400,easing:i=kl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function En(n,{delay:e=0,duration:t=400,easing:i=Uo,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)=>`
}`,c=`__svelte_${Cb(f)}_${r}`,d=qh(n),{stylesheet:m,rules:h}=po.get(d)||$b(d,n);h[c]||(h[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${c} ${i}ms linear ${s}ms 1 both`,mo+=1,c}function al(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(", "),mo-=s,mo||Mb())}function Mb(){fa(()=>{mo||(po.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),po.clear())})}function Db(n,e,t,i){if(!e)return G;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return G;const{delay:l=0,duration:o=300,easing:r=kl,start:a=No()+l,end:u=a+o,tick:f=G,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,h;function g(){c&&(h=rl(n,0,1,o,l,r,c)),l||(m=!0)}function b(){c&&al(n,h),d=!1}return Fo(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),b()),!d)return!1;if(m){const k=y-a,T=0+1*r(k/o);f(T,1-T)}return!0}),g(),f(0,1),b}function Ob(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 ul;function li(n){ul=n}function wl(){if(!ul)throw new Error("Function called outside component initialization");return ul}function nn(n){wl().$$.on_mount.push(n)}function Eb(n){wl().$$.after_update.push(n)}function Bh(n){wl().$$.on_destroy.push(n)}function $t(){const n=wl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Vh(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function We(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ms=[],ie=[],oo=[],Pr=[],Uh=Promise.resolve();let Lr=!1;function Wh(){Lr||(Lr=!0,Uh.then(ca))}function cn(){return Wh(),Uh}function nt(n){oo.push(n)}function we(n){Pr.push(n)}const Qo=new Set;let as=0;function ca(){if(as!==0)return;const n=ul;do{try{for(;as<ms.length;){const e=ms[as];as++,li(e),Ab(e.$$)}}catch(e){throw ms.length=0,as=0,e}for(li(null),ms.length=0,as=0;ie.length;)ie.pop()();for(let e=0;e<oo.length;e+=1){const t=oo[e];Qo.has(t)||(Qo.add(t),t())}oo.length=0}while(ms.length);for(;Pr.length;)Pr.pop()();Lr=!1,Qo.clear(),li(n)}function Ab(n){if(n.fragment!==null){n.update(),Le(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(nt)}}let Rs;function da(){return Rs||(Rs=Promise.resolve(),Rs.then(()=>{Rs=null})),Rs}function Bi(n,e,t){n.dispatchEvent(Vh(`${e?"intro":"outro"}${t}`))}const ro=new Set;let Yn;function pe(){Yn={r:0,c:[],p:Yn}}function me(){Yn.r||Le(Yn.c),Yn=Yn.p}function A(n,e){n&&n.i&&(ro.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(ro.has(n))return;ro.add(n),Yn.c.push(()=>{ro.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const pa={duration:0};function Yh(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&al(n,o)}function f(){const{delay:d=0,duration:m=300,easing:h=kl,tick:g=G,css:b}=s||pa;b&&(o=rl(n,0,1,m,d,h,b,a++)),g(0,1);const y=No()+d,k=y+m;r&&r.abort(),l=!0,nt(()=>Bi(n,!0,"start")),r=Fo(T=>{if(l){if(T>=k)return g(1,0),Bi(n,!0,"end"),u(),l=!1;if(T>=y){const C=h((T-y)/m);g(C,1-C)}}return l})}let c=!1;return{start(){c||(c=!0,al(n),zt(s)?(s=s(i),da().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function Kh(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=Yn;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:c=kl,tick:d=G,css:m}=s||pa;m&&(o=rl(n,1,0,f,u,c,m));const h=No()+u,g=h+f;nt(()=>Bi(n,!1,"start")),Fo(b=>{if(l){if(b>=g)return d(0,1),Bi(n,!1,"end"),--r.r||Le(r.c),!1;if(b>=h){const y=c((b-h)/f);d(1-y,y)}}return l})}return zt(s)?da().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&al(n,o),l=!1)}}}function ze(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&al(n,u)}function c(m,h){const g=m.b-o;return h*=Math.abs(g),{a:o,b:m.b,d:g,duration:h,start:m.start,end:m.start+h,group:m.group}}function d(m){const{delay:h=0,duration:g=300,easing:b=kl,tick:y=G,css:k}=l||pa,T={start:No()+h,b:m};m||(T.group=Yn,Yn.r+=1),r||a?a=T:(k&&(f(),u=rl(n,o,m,g,h,b,k)),m&&y(0,1),r=c(T,g),nt(()=>Bi(n,m,"start")),Fo(C=>{if(a&&C>a.start&&(r=c(a,g),a=null,Bi(n,r.b,"start"),k&&(f(),u=rl(n,o,r.b,r.duration,0,b,l.css))),r){if(C>=r.end)y(o=r.b,1-o),Bi(n,r.b,"end"),a||(r.b?f():--r.group.r||Le(r.group.c)),r=null;else if(C>=r.start){const M=C-r.start;o=r.a+r.d*b(M/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){zt(l)?da().then(()=>{l=l(s),d(m)}):d(m)},end(){f(),r=a=null}}}function su(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e Line truncated
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=D(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function av(n){let e,t,i,s=!n[0]&&Ru();const l=n[1].default,o=Ft(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=D(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),_(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Ru(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&jt(o,l,r,r[2],i?Rt(l,r[2],a,null):Ht(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function uv(n){let e,t;return e=new kn({props:{class:"full-page",center:!0,$$slots:{default:[av]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(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){q(e,i)}}}function fv(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 t_ extends ye{constructor(e){super(),ve(this,e,fv,uv,be,{nobranding:0})}}function ju(n,e,t){const i=n.slice();return i[11]=e[t],i}const cv=n=>({}),Hu=n=>({uniqueId:n[3]});function dv(n){let e=(n[11]||bo)+"",t;return{c(){t=z(e)},m(i,s){S(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||bo)+"")&&re(t,e)},d(i){i&&w(t)}}}function pv(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||bo)+"",i;return{c(){e=v("pre"),i=z(t)},m(o,r){S(o,e,r),_(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||bo)+"")&&re(i,t)},d(o){o&&w(e)}}}function qu(n){let e,t;function i(o,r){return typeof o[11]=="object"?pv:dv}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=D(),p(e,"class","help-block help-block-error")},m(o,r){S(o,e,r),l.m(e,null),_(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&&w(e),l.d()}}}function mv(n){let e,t,i,s,l;const o=n[7].default,r=Ft(o,n,n[6],Hu);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=qu(ju(n,a,f));return{c(){e=v("div"),r&&r.c(),t=D();for(let f=0;f<u.length;f+=1)u[f].c();p(e,"class",n[0]),x(e,"error",n[2].length)},m(f,c){S(f,e,c),r&&r.m(e,null),_(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=K(e,"click",n[8]),s=!0)},p(f,[c]){if(r&&r.p&&(!i||c&64)&&jt(r,o,f,f[6],i?Rt(o,f[6],c,cv):Ht(f[6]),Hu),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const m=ju(f,a,d);u[d]?u[d].p(m,c):(u[d]=qu(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]),(!i||c&5)&&x(e,"error",f[2].length)},i(f){i||(A(r,f),i=!0)},o(f){P(r,f),i=!1},d(f){f&&w(e),r&&r.d(f),bt(u,f),n[9](null),s=!1,l()}}}const bo="Invalid value";function hv(n,e,t){let i;Je(n,Ci,h=>t(5,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+B.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){Ts(r)}nn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(h){We.call(this,n,h)}function m(h){ie[h?"unshift":"push"](()=>{u=h,t(1,u)})}return n.$$set=h=>{"name"in h&&t(4,r=h.name),"class"in h&&t(0,a=h.class),"$$scope"in h&&t(6,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=B.toArray(B.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,m]}class _e extends ye{constructor(e){super(),ve(this,e,hv,mv,be,{name:4,class:0})}}function gv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=D(),l=v("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){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0]),l.focus(),r||(a=K(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]&&de(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _v(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Password"),s=D(),l=v("input"),r=D(),a=v("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){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),de(l,n[1]),S(c,r,d),S(c,a,d),u||(f=K(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]&&de(l,c[1])},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function bv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Password confirm"),s=D(),l=v("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){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[2]),r||(a=K(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]&&de(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function vvLine 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"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(h,g){S(h,e,g),_(e,t),_(e,i),H(s,e,null),_(e,l),H(o,e,null),_(e,r),H(a,e,null),_(e,u),_(e,f),c=!0,d||(m=K(e,"submit",pt(n[4])),d=!0)},p(h,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:h}),s.$set(b);const y={};g&1538&&(y.$$scope={dirty:g,ctx:h}),o.$set(y);const k={};g&1540&&(k.$$scope={dirty:g,ctx:h}),a.$set(k),(!c||g&8)&&x(f,"btn-disabled",h[3]),(!c||g&8)&&x(f,"btn-loading",h[3])},i(h){c||(A(s.$$.fragment,h),A(o.$$.fragment,h),A(a.$$.fragment,h),c=!0)},o(h){P(s.$$.fragment,h),P(o.$$.fragment,h),P(a.$$.fragment,h),c=!1},d(h){h&&w(e),q(s),q(o),q(a),d=!1,m()}}}function yv(n,e,t){const i=$t();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await he.admins.create({email:s,password:l,passwordConfirm:o}),await he.admins.authWithPassword(s,l),i("submit")}catch(d){he.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 kv extends ye{constructor(e){super(),ve(this,e,yv,vv,be,{})}}function Vu(n){let e,t;return e=new t_({props:{$$slots:{default:[wv]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(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){q(e,i)}}}function wv(n){let e,t;return e=new kv({}),e.$on("submit",n[1]),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p:G,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Sv(n){let e,t,i=n[0]&&Vu(n);return{c(){i&&i.c(),e=Ae()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Vu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(pe(),P(i,1,1,()=>{i=null}),me())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Tv(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){he.logout(!1),t(0,i=!0);return}he.authStore.isValid?Ti("/collections"):he.logout()}return[i,async()=>{t(0,i=!1),await cn(),window.location.search=""}]}class Cv extends ye{constructor(e){super(),ve(this,e,Tv,Sv,be,{})}}const St=Pn(""),vo=Pn(""),Cs=Pn(!1);function Bo(n){const e=n-1;return e*e*e+1}function yo(n,{delay:e=0,duration:t=400,easing:i=kl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function En(n,{delay:e=0,duration:t=400,easing:i=Bo,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 It(n,{delay:e=0,duration:t=400,easing:i=Uo}={}){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 Pt(n,{delay:e=0,duration:t=400,easing:i=Uo,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)=>`
opacity: ${a-f*d}`}}function It(n,{delay:e=0,duration:t=400,easing:i=Bo}={}){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 Pt(n,{delay:e=0,duration:t=400,easing:i=Bo,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 $v(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),de(e,n[7]),i||(s=K(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]&&de(e,l[7])},i:X,o:X,d(l){l&&w(e),n[13](null),i=!1,s()}}}function Mv(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],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=Kt(o,r(n)),ie.push(()=>ke(e,"value",l)),e.$on("submit",n[10])),{c(){e&&q(e.$$.fragment),i=Ae()},m(a,u){e&&j(e,a,u),S(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],we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ke(e,"value",l)),e.$on("submit",a[10]),q(e.$$.fragment),A(e.$$.fragment,1),j(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&&w(i),e&&H(e,a)}}}function zu(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Bu();return{c(){r&&r.c(),e=D(),t=v("button"),t.innerHTML='<span class="txt">Clear</span>',p(t,"type","button"),p(t,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=K(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Bu(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(pe(),P(r,1,1,()=>{r=null}),me())},i(a){s||(A(r),a&&nt(()=>{i||(i=ze(t,En,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=ze(t,En,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Bu(n){let e,t,i;return{c(){e=v("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){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{t||(t=ze(e,En,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ze(e,En,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function Dv(n){let e,t,i,s,l,o,r,a,u,f;const c=[Mv,$v],d=[];function m(g,b){return g[4]&&!g[5]?0:1}l=m(n),o=d[l]=c[l](n);let h=(n[0].length||n[7].length)&&zu(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=D(),o.c(),r=D(),h&&h.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(g,b){S(g,e,b),_(e,t),_(t,i),_(e,s),d[l].m(e,null),_(e,r),h&&h.m(e,null),a=!0,u||(f=[K(e,"click",yn(n[11])),K(e,"submit",pt(n[10]))],u=!0)},p(g,[b]){let y=l;l=m(g),l===y?d[l].p(g,b):(pe(),P(d[y],1,1,()=>{d[y]=null}),me(),o=d[l],o?o.p(g,b):(o=d[l]=c[l](g),o.c()),A(o,1),o.m(e,r)),g[0].length||g[7].length?h?(h.p(g,b),b&129&&A(h,1)):(h=zu(g),h.c(),A(h,1),h.m(e,null)):h&&(pe(),P(h,1,1,()=>{h=null}),me())},i(g){a||(A(o),A(h),a=!0)},o(g){P(o),P(h),a=!1},d(g){g&&w(e),d[l].d(),h&&h.d(),u=!1,Le(f)}}}function Ov(n,e,t){const i=$t(),s="search_"+B.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new bn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function h(){t(0,l=d),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await ft(()=>import("./FilterAutocompleteInput-f06ea6a0.js"),["./FilterAutocompleteInput-f06ea6a0.js","./index-0935db40.js"],import.meta.url)).default),t(5,f=!1))}nn(()=>{g()});function b(M){We.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){ie[M?"unshift":"push"](()=>{c=M,t(6,c)})}function T(){d=this.value,t(7,d),t(0,l)}const C=()=>{m(!1),h()};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,h,b,y,k,T,C]}class Wo extends ye{constructor(e){super(),ve(this,e,Ov,Dv,be,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Yr,Li;const Kr="app-tooltip";function Uu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function bi(){return Li=Li||document.querySelector("."+Kr),Li||(Li=document.createElement("div"),Li.classList.add(Kr),document.body.appendChild(Li)),Li}function n_(n,e){let t=bi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Jr();return}t.textContent=e.text,t.className=Kr+" 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 Line truncated
<span class="txt">method</span>`,p(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function Uv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="url",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:X,d(l){l&&w(e)}}}function Wv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="referer",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:X,d(l){l&&w(e)}}}function Yv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="User IP",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:X,d(l){l&&w(e)}}}function Kv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="status",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:X,d(l){l&&w(e)}}}function Jv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:X,d(l){l&&w(e)}}}function Ju(n){let e;function t(l,o){return l[6]?Gv:Zv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(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&&w(e)}}}function Zv(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Zu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Zu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function Gv(n){let e;return{c(){e=v("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
`},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function Zu(n){let e,t,i;return{c(){e=v("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){S(s,e,l),t||(i=K(e,"click",n[19]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function Gu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Xu(n,e){var Se,Ue,lt;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,m,h,g,b,y,k=(e[23].referer||"N/A")+"",T,C,M,$,O,E=(e[23].userIp||"N/A")+"",I,L,N,F,U,Z=e[23].status+"",ne,G,J,te,V,x,Y,se,He,Re,Fe=(((Ue=e[23].meta)==null?void 0:Ue.errorMessage)||((lt=e[23].meta)==null?void 0:lt.errorData))&&Gu();te=new Zi({props:{date:e[23].created}});function qe(){return e[17](e[23])}function ge(...ue){return e[18](e[23],...ue)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=z(l),a=D(),u=v("td"),f=v("span"),d=z(c),h=D(),Fe&&Fe.c(),g=D(),b=v("td"),y=v("span"),T=z(k),M=D(),$=v("td"),O=v("span"),I=z(E),N=D(),F=v("td"),U=v("span"),ne=z(Z),G=D(),J=v("td"),q(te.$$.fragment),V=D(),x=v("td"),x.innerHTML='<i class="ri-arrow-right-line"></i>',Y=D(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",m=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[23].referer),Q(y,"txt-hint",!e[23].referer),p(b,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",L=e[23].userIp),Q(O,"txt-hint",!e[23].userIp),p($,"class","col-type-number col-field-userIp"),p(U,"class","label"),Q(U,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(J,"class","col-type-date col-field-created"),p(x,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ue,fe){S(ue,t,fe),_(t,i),_(i,s),_(s,o),_(t,a),_(t,u),_(u,f),_(f,d),_(u,h),Fe&&Fe.m(u,null),_(t,g),_(t,b),_(b,y),_(y,T),_(t,M),_(t,$),_($,O),_(O,I),_(t,N),_(t,F),_(F,U),_(U,ne),_(t,G),_(t,J),j(te,J,null),_(t,V),_(t,x),_(t,Y),se=!0,He||(Re=[K(t,"click",qe),K(t,"keydown",ge)],He=!0)},p(ue,fe){var oe,je,Me;e=ue,(!se||fe&8)&&l!==(l=((oe=e[23].method)==null?void 0:oe.toUpperCase())+"")&&re(o,l),(!se||fe&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!se||fe&8)&&c!==(c=e[23].url+"")&&re(d,c),(!se||fe&8&&m!==(m=e[23].url))&&p(f,"title",m),(je=e[23].meta)!=null&&je.errorMessage||(Me=e[23].meta)!=null&&Me.errorData?Fe||(Fe=Gu(),Fe.c(),Fe.m(u,null)):Fe&&(Fe.d(1),Fe=null),(!se||fe&8)&&k!==(k=(e[23].referer||"N/A")+"")&&re(T,k),(!se||fe&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!se||fe&8)&&Q(y,"txt-hint",!e[23].referer),(!se||fe&8)&&E!==(E=(e[23].userIp||"N/A")+"")&&re(I,E),(!se||fe&8&&L!==(L=e[23].userIp))&&p(O,"title",L),(!se||fe&8)&&Q(O,"txt-hint",!e[23].userIp),(!se||fe&8)&&Z!==(Z=e[23].status+"")&&re(ne,Z),(!se||fe&8)&&Q(U,"label-danger",e[23].status>=400);const ae={};fe&8&&(ae.date=e[23].created),te.$set(ae)},i(ue){se||(A(te.$$.fragment,ue),se=!0)},o(ue){P(te.$$.fragment,ue),se=!1},d(ue){ue&&w(t),Fe&&Fe.d(),H(te),He=!1,Le(Re)}}}function Xv(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I=[],L=new Map,N;function F(ge){n[11](ge)}let U={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[Bv]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),s=new Ut({props:U}),ie.push(()=>ke(s,"sort",F));function Z(ge){n[12](ge)}let ne={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[Uv]},$$scope:{ctx:n}};n[1]!==void 0&&(ne.sort=n[1]),r=new Ut({props:ne}),ie.push(()=>ke(r,"sort",Z));function G(ge){n[13](ge)}let J={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[Wv]},$$scope:{ctx:n}};n[1]!==void 0&&(J.sort=n[1]),f=new Ut({props:J}),ie.push(()=>ke(f,"sort",G));function te(ge){n[14](ge)}let V={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[Yv]},$$scope:{ctx:n}};n[1]!==void 0&&(V.sort=n[1]),m=new Ut({props:V}),ie.push(()=>ke(m,"sort",te));function x(ge){n[15](ge)}let Y={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Kv]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),b=new Ut({props:Y}),ie.push(()=>ke(b,"sort",x));function se(ge){n[16](ge)}let He={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[Jv]},$$scope:{ctx:n}};n[1]!==void 0&&(He.sort=n[1]),T=new Ut({props:He}),ie.push(()=>ke(T,"sort",se));let Re=n[3];const Fe=ge=>ge[23].id;for(let ge=0;ge<Re.length;ge+=1){let Se=Ku(n,Re,ge),Ue=Fe(Se);L.set(Ue,I[ge]=Xu(Ue,Se))}let qe=null;return Re.length||(qe=Ju(n)),{c(){e=v("table"),t=v("thead"),i=v("tr"),q(s.$$.fragment),o=D(),q(r.$$.fragment),u=D(),q(f.$$.fragment),d=D(),q(m.$$.fragment),g=D(),q(b.$$.fragment),k=D(),q(T.$$.fragm Line truncated
`}}function $v(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),de(e,n[7]),i||(s=K(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]&&de(e,l[7])},i:G,o:G,d(l){l&&w(e),n[13](null),i=!1,s()}}}function Mv(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],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=Kt(o,r(n)),ie.push(()=>ke(e,"value",l)),e.$on("submit",n[10])),{c(){e&&V(e.$$.fragment),i=Ae()},m(a,u){e&&H(e,a,u),S(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],we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{q(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ke(e,"value",l)),e.$on("submit",a[10]),V(e.$$.fragment),A(e.$$.fragment,1),H(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&&w(i),e&&q(e,a)}}}function zu(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Bu();return{c(){r&&r.c(),e=D(),t=v("button"),t.innerHTML='<span class="txt">Clear</span>',p(t,"type","button"),p(t,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=K(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Bu(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(pe(),P(r,1,1,()=>{r=null}),me())},i(a){s||(A(r),a&&nt(()=>{i||(i=ze(t,En,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=ze(t,En,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Bu(n){let e,t,i;return{c(){e=v("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){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{t||(t=ze(e,En,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ze(e,En,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function Dv(n){let e,t,i,s,l,o,r,a,u,f;const c=[Mv,$v],d=[];function m(g,b){return g[4]&&!g[5]?0:1}l=m(n),o=d[l]=c[l](n);let h=(n[0].length||n[7].length)&&zu(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=D(),o.c(),r=D(),h&&h.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(g,b){S(g,e,b),_(e,t),_(t,i),_(e,s),d[l].m(e,null),_(e,r),h&&h.m(e,null),a=!0,u||(f=[K(e,"click",yn(n[11])),K(e,"submit",pt(n[10]))],u=!0)},p(g,[b]){let y=l;l=m(g),l===y?d[l].p(g,b):(pe(),P(d[y],1,1,()=>{d[y]=null}),me(),o=d[l],o?o.p(g,b):(o=d[l]=c[l](g),o.c()),A(o,1),o.m(e,r)),g[0].length||g[7].length?h?(h.p(g,b),b&129&&A(h,1)):(h=zu(g),h.c(),A(h,1),h.m(e,null)):h&&(pe(),P(h,1,1,()=>{h=null}),me())},i(g){a||(A(o),A(h),a=!0)},o(g){P(o),P(h),a=!1},d(g){g&&w(e),d[l].d(),h&&h.d(),u=!1,Le(f)}}}function Ov(n,e,t){const i=$t(),s="search_"+B.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new bn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function h(){t(0,l=d),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await ft(()=>import("./FilterAutocompleteInput-1e7de362.js"),["./FilterAutocompleteInput-1e7de362.js","./index-0935db40.js"],import.meta.url)).default),t(5,f=!1))}nn(()=>{g()});function b(M){We.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){ie[M?"unshift":"push"](()=>{c=M,t(6,c)})}function T(){d=this.value,t(7,d),t(0,l)}const C=()=>{m(!1),h()};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,h,b,y,k,T,C]}class Uo extends ye{constructor(e){super(),ve(this,e,Ov,Dv,be,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Yr,Li;const Kr="app-tooltip";function Uu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function bi(){return Li=Li||document.querySelector("."+Kr),Li||(Li=document.createElement("div"),Li.classList.add(Kr),document.body.appendChild(Li)),Li}function n_(n,e){let t=bi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Jr();return}t.textContent=e.text,t.className=Kr+" 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 Line truncated
<span class="txt">method</span>`,p(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Uv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="url",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Wv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="referer",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Yv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="User IP",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Kv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="status",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Jv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Ju(n){let e;function t(l,o){return l[6]?Gv:Zv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(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&&w(e)}}}function Zv(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Zu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Zu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function Gv(n){let e;return{c(){e=v("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
`},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Zu(n){let e,t,i;return{c(){e=v("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){S(s,e,l),t||(i=K(e,"click",n[19]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Gu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Xu(n,e){var Se,Ue,lt;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,m,h,g,b,y,k=(e[23].referer||"N/A")+"",T,C,M,$,O,E=(e[23].userIp||"N/A")+"",I,L,N,F,U,J=e[23].status+"",ne,Z,te,ee,R,X,Y,se,He,Re,Fe=(((Ue=e[23].meta)==null?void 0:Ue.errorMessage)||((lt=e[23].meta)==null?void 0:lt.errorData))&&Gu();ee=new Zi({props:{date:e[23].created}});function qe(){return e[17](e[23])}function ge(...ue){return e[18](e[23],...ue)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=z(l),a=D(),u=v("td"),f=v("span"),d=z(c),h=D(),Fe&&Fe.c(),g=D(),b=v("td"),y=v("span"),T=z(k),M=D(),$=v("td"),O=v("span"),I=z(E),N=D(),F=v("td"),U=v("span"),ne=z(J),Z=D(),te=v("td"),V(ee.$$.fragment),R=D(),X=v("td"),X.innerHTML='<i class="ri-arrow-right-line"></i>',Y=D(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",m=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[23].referer),x(y,"txt-hint",!e[23].referer),p(b,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",L=e[23].userIp),x(O,"txt-hint",!e[23].userIp),p($,"class","col-type-number col-field-userIp"),p(U,"class","label"),x(U,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(te,"class","col-type-date col-field-created"),p(X,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ue,fe){S(ue,t,fe),_(t,i),_(i,s),_(s,o),_(t,a),_(t,u),_(u,f),_(f,d),_(u,h),Fe&&Fe.m(u,null),_(t,g),_(t,b),_(b,y),_(y,T),_(t,M),_(t,$),_($,O),_(O,I),_(t,N),_(t,F),_(F,U),_(U,ne),_(t,Z),_(t,te),H(ee,te,null),_(t,R),_(t,X),_(t,Y),se=!0,He||(Re=[K(t,"click",qe),K(t,"keydown",ge)],He=!0)},p(ue,fe){var oe,je,Me;e=ue,(!se||fe&8)&&l!==(l=((oe=e[23].method)==null?void 0:oe.toUpperCase())+"")&&re(o,l),(!se||fe&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!se||fe&8)&&c!==(c=e[23].url+"")&&re(d,c),(!se||fe&8&&m!==(m=e[23].url))&&p(f,"title",m),(je=e[23].meta)!=null&&je.errorMessage||(Me=e[23].meta)!=null&&Me.errorData?Fe||(Fe=Gu(),Fe.c(),Fe.m(u,null)):Fe&&(Fe.d(1),Fe=null),(!se||fe&8)&&k!==(k=(e[23].referer||"N/A")+"")&&re(T,k),(!se||fe&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!se||fe&8)&&x(y,"txt-hint",!e[23].referer),(!se||fe&8)&&E!==(E=(e[23].userIp||"N/A")+"")&&re(I,E),(!se||fe&8&&L!==(L=e[23].userIp))&&p(O,"title",L),(!se||fe&8)&&x(O,"txt-hint",!e[23].userIp),(!se||fe&8)&&J!==(J=e[23].status+"")&&re(ne,J),(!se||fe&8)&&x(U,"label-danger",e[23].status>=400);const ae={};fe&8&&(ae.date=e[23].created),ee.$set(ae)},i(ue){se||(A(ee.$$.fragment,ue),se=!0)},o(ue){P(ee.$$.fragment,ue),se=!1},d(ue){ue&&w(t),Fe&&Fe.d(),q(ee),He=!1,Le(Re)}}}function Xv(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I=[],L=new Map,N;function F(ge){n[11](ge)}let U={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[Bv]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),s=new Ut({props:U}),ie.push(()=>ke(s,"sort",F));function J(ge){n[12](ge)}let ne={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[Uv]},$$scope:{ctx:n}};n[1]!==void 0&&(ne.sort=n[1]),r=new Ut({props:ne}),ie.push(()=>ke(r,"sort",J));function Z(ge){n[13](ge)}let te={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[Wv]},$$scope:{ctx:n}};n[1]!==void 0&&(te.sort=n[1]),f=new Ut({props:te}),ie.push(()=>ke(f,"sort",Z));function ee(ge){n[14](ge)}let R={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[Yv]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),m=new Ut({props:R}),ie.push(()=>ke(m,"sort",ee));function X(ge){n[15](ge)}let Y={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Kv]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),b=new Ut({props:Y}),ie.push(()=>ke(b,"sort",X));function se(ge){n[16](ge)}let He={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[Jv]},$$scope:{ctx:n}};n[1]!==void 0&&(He.sort=n[1]),T=new Ut({props:He}),ie.push(()=>ke(T,"sort",se));let Re=n[3];const Fe=ge=>ge[23].id;for(let ge=0;ge<Re.length;ge+=1){let Se=Ku(n,Re,ge),Ue=Fe(Se);L.set(Ue,I[ge]=Xu(Ue,Se))}let qe=null;return Re.length||(qe=Ju(n)),{c(){e=v("table"),t=v("thead"),i=v("tr"),V(s.$$.fragment),o=D(),V(r.$$.fragment),u=D(),V(f.$$.fragment),d=D(),V(m.$$.fragment),g=D(),V(b.$$.fragment),k=D(),V(T. Line truncated
* Chart.js v3.9.1
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/function ti(){}const ty=function(){let n=0;return function(){return n++}}();function ut(n){return n===null||typeof n>"u"}function gt(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 Ge(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Ct=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function Tn(n,e){return Ct(n)?n:e}function et(n,e){return typeof n>"u"?e:n}const ny=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,i_=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function yt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function ct(n,e,t,i){let s,l,o;if(gt(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(Ge(n))for(o=Object.keys(n),l=o.length,s=0;s<l;s++)e.call(t,n[o[s]],o[s])}function wo(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 So(n){if(gt(n))return n.map(So);if(Ge(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=So(n[t[s]]);return e}return n}function s_(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function iy(n,e,t,i){if(!s_(n))return;const s=e[n],l=t[n];Ge(s)&&Ge(l)?dl(s,l,i):e[n]=So(l)}function dl(n,e,t){const i=gt(e)?e:[e],s=i.length;if(!Ge(n))return n;t=t||{};const l=t.merger||iy;for(let o=0;o<s;++o){if(e=i[o],!Ge(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 tl(n,e){return dl(n,e,{merger:sy})}function sy(n,e,t){if(!s_(n))return;const i=e[n],s=t[n];Ge(i)&&Ge(s)?tl(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=So(s))}const ef={"":n=>n,x:n=>n.x,y:n=>n.y};function ki(n,e){return(ef[e]||(ef[e]=ly(e)))(n)}function ly(n){const e=oy(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function oy(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 Ea(n){return n.charAt(0).toUpperCase()+n.slice(1)}const An=n=>typeof n<"u",wi=n=>typeof n=="function",tf=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function ry(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Tt=Math.PI,dt=2*Tt,ay=dt+Tt,To=Number.POSITIVE_INFINITY,uy=Tt/180,kt=Tt/2,zs=Tt/4,nf=Tt*2/3,Dn=Math.log10,Jn=Math.sign;function sf(n){const e=Math.round(n);n=nl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Dn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function fy(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 nl(n,e,t){return Math.abs(n-e)<t}function cy(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function l_(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*(Tt/180)}function Aa(n){return n*(180/Tt)}function lf(n){if(!Ct(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function o_(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*Tt&&(l+=dt),{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 dy(n,e){return(n-e+ay)%dt-Tt}function gn(n){return(n%dt+dt)%dt}function pl(n,e,t,i){const s=gn(n),l=gn(e),o=gn(t),r=gn(l-s),a=gn(o-s),u=gn(s-l),f=gn(s-o);return s===l||s===o||i&&l===o||r>a&&u<f}function Wt(n,e,t){return Math.max(e,Math.min(t,n))}function py(n){return Wt(n,-32768,32767)}function ml(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ia(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 zi=(n,e,t,i)=>Ia(n,t,i?s=>n[s][e]<=t:s=>n[s][e]<t),my=(n,e,t)=>Ia(n,t,i=>n[i][e]>=t);function hy(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 r_=["push","pop","shift","splice","unshift"];function gy(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),r_.forEach(t=>{const i="_onData"+Ea(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 of(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)&&(r_.forEach(l=>{delete n[l]}),delete n._chartjs)}function a_(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 u_=function(){return typeof window>"u"?function(n){return n()}:window.requestLine truncated
*/function ti(){}const ty=function(){let n=0;return function(){return n++}}();function ut(n){return n===null||typeof n>"u"}function gt(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 Ge(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Ct=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function Tn(n,e){return Ct(n)?n:e}function et(n,e){return typeof n>"u"?e:n}const ny=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,i_=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function yt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function ct(n,e,t,i){let s,l,o;if(gt(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(Ge(n))for(o=Object.keys(n),l=o.length,s=0;s<l;s++)e.call(t,n[o[s]],o[s])}function ko(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 wo(n){if(gt(n))return n.map(wo);if(Ge(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=wo(n[t[s]]);return e}return n}function s_(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function iy(n,e,t,i){if(!s_(n))return;const s=e[n],l=t[n];Ge(s)&&Ge(l)?dl(s,l,i):e[n]=wo(l)}function dl(n,e,t){const i=gt(e)?e:[e],s=i.length;if(!Ge(n))return n;t=t||{};const l=t.merger||iy;for(let o=0;o<s;++o){if(e=i[o],!Ge(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 tl(n,e){return dl(n,e,{merger:sy})}function sy(n,e,t){if(!s_(n))return;const i=e[n],s=t[n];Ge(i)&&Ge(s)?tl(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=wo(s))}const ef={"":n=>n,x:n=>n.x,y:n=>n.y};function ki(n,e){return(ef[e]||(ef[e]=ly(e)))(n)}function ly(n){const e=oy(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function oy(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 Ea(n){return n.charAt(0).toUpperCase()+n.slice(1)}const An=n=>typeof n<"u",wi=n=>typeof n=="function",tf=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function ry(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Tt=Math.PI,dt=2*Tt,ay=dt+Tt,So=Number.POSITIVE_INFINITY,uy=Tt/180,kt=Tt/2,zs=Tt/4,nf=Tt*2/3,Dn=Math.log10,Jn=Math.sign;function sf(n){const e=Math.round(n);n=nl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Dn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function fy(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 nl(n,e,t){return Math.abs(n-e)<t}function cy(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function l_(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*(Tt/180)}function Aa(n){return n*(180/Tt)}function lf(n){if(!Ct(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function o_(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*Tt&&(l+=dt),{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 dy(n,e){return(n-e+ay)%dt-Tt}function gn(n){return(n%dt+dt)%dt}function pl(n,e,t,i){const s=gn(n),l=gn(e),o=gn(t),r=gn(l-s),a=gn(o-s),u=gn(s-l),f=gn(s-o);return s===l||s===o||i&&l===o||r>a&&u<f}function Wt(n,e,t){return Math.max(e,Math.min(t,n))}function py(n){return Wt(n,-32768,32767)}function ml(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ia(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 zi=(n,e,t,i)=>Ia(n,t,i?s=>n[s][e]<=t:s=>n[s][e]<t),my=(n,e,t)=>Ia(n,t,i=>n[i][e]>=t);function hy(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 r_=["push","pop","shift","splice","unshift"];function gy(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),r_.forEach(t=>{const i="_onData"+Ea(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 of(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)&&(r_.forEach(l=>{delete n[l]}),delete n._chartjs)}function a_(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 u_=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 Ol(n){return n+.5|0}const hi=(n,e,t)=>Math.max(Math.min(n,t),e);function Xs(n){return hi(Ol(n*2.55),0,255)}function vi(n){return hi(Ol(n*255),0,255)}function si(n){return hi(Ol(n/2.55)/100,0,1)}function ff(n){return hi(Ol(n*100),0,100)}const Sn={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},Gr=[..."0123456789ABCDEF"],vy=n=>Gr[n&15],yy=n=>Gr[(n&240)>>4]+Gr[n&15],Wl=n=>(n&240)>>4===(n&15),ky=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function wy(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Sn[n[1]]*17,g:255&Sn[n[2]]*17,b:255&Sn[n[3]]*17,a:e===5?Sn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Sn[n[1]]<<4|Sn[n[2]],g:Sn[n[3]]<<4|Sn[n[4]],b:Sn[n[5]]<<4|Sn[n[6]],a:e===9?Sn[n[7]]<<4|Sn[n[8]]:255})),t}const Sy=(n,e)=>n<255?e(n):"";function Ty(n){var e=ky(n)?vy:yy;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Sy(n.a,e):void 0}const Cy=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function p_(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 $y(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 My(n,e,t){const i=p_(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 Dy(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 Pa(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=Dy(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function La(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(vi)}function Na(n,e,t){return La(p_,n,e,t)}function Oy(n,e,t){return La(My,n,e,t)}function Ey(n,e,t){return La($y,n,e,t)}function m_(n){return(n%360+360)%360}function Ay(n){const e=Cy.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Xs(+e[5]):vi(+e[5]));const s=m_(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=Oy(s,l,o):e[1]==="hsv"?i=Ey(s,l,o):i=Na(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function Iy(n,e){var t=Pa(n);t[0]=m_(t[0]+e),t=Na(t),n.r=t[0],n.g=t[1],n.b=t[2]}function Py(n){if(!n)return;const e=Pa(n),t=e[0],i=ff(e[1]),s=ff(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${si(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const cf={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"},df={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 Ly(){const n={},e=Object.keys(df),t=Object.keys(cf);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
*/function Ol(n){return n+.5|0}const hi=(n,e,t)=>Math.max(Math.min(n,t),e);function Xs(n){return hi(Ol(n*2.55),0,255)}function vi(n){return hi(Ol(n*255),0,255)}function si(n){return hi(Ol(n/2.55)/100,0,1)}function ff(n){return hi(Ol(n*100),0,100)}const Sn={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},Gr=[..."0123456789ABCDEF"],vy=n=>Gr[n&15],yy=n=>Gr[(n&240)>>4]+Gr[n&15],Wl=n=>(n&240)>>4===(n&15),ky=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function wy(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Sn[n[1]]*17,g:255&Sn[n[2]]*17,b:255&Sn[n[3]]*17,a:e===5?Sn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Sn[n[1]]<<4|Sn[n[2]],g:Sn[n[3]]<<4|Sn[n[4]],b:Sn[n[5]]<<4|Sn[n[6]],a:e===9?Sn[n[7]]<<4|Sn[n[8]]:255})),t}const Sy=(n,e)=>n<255?e(n):"";function Ty(n){var e=ky(n)?vy:yy;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Sy(n.a,e):void 0}const Cy=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function p_(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 $y(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 My(n,e,t){const i=p_(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 Dy(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 Pa(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=Dy(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function La(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(vi)}function Na(n,e,t){return La(p_,n,e,t)}function Oy(n,e,t){return La(My,n,e,t)}function Ey(n,e,t){return La($y,n,e,t)}function m_(n){return(n%360+360)%360}function Ay(n){const e=Cy.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Xs(+e[5]):vi(+e[5]));const s=m_(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=Oy(s,l,o):e[1]==="hsv"?i=Ey(s,l,o):i=Na(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function Iy(n,e){var t=Pa(n);t[0]=m_(t[0]+e),t=Na(t),n.r=t[0],n.g=t[1],n.b=t[2]}function Py(n){if(!n)return;const e=Pa(n),t=e[0],i=ff(e[1]),s=ff(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${si(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const cf={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"},df={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 Ly(){const n={},e=Object.keys(df),t=Object.keys(cf);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 F2{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=u_.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 ni=new F2;const Tf="transparent",R2={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=mf(n||Tf),s=i.valid&&mf(e||Tf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class j2{constructor(e,t,i,s){const l=t[i];s=Jl([e.to,s,l,e.from]);const o=Jl([e.from,l,s]);this._active=!0,this._fn=e.fn||R2[e.type||typeof o],this._easing=il[e.easing]||il.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=Jl([e.to,t,s,e.from]),this._from=Jl([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 H2=["x","y","borderWidth","radius","tension"],q2=["color","borderColor","backgroundColor"];tt.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 V2=Object.keys(tt.animation);tt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});tt.set("animations",{colors:{type:"color",properties:q2},numbers:{type:"number",properties:H2}});tt.describe("animations",{_fallback:"animation"});tt.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 O_{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Ge(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!Ge(s))return;const l={};for(const o of V2)l[o]=s[o];(gt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=B2(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&z2(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 j2(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 ni.add(this._chart,i),!0}}function z2(n,e){const t=[],Line truncated
*/class F2{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=u_.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 ni=new F2;const Tf="transparent",R2={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=mf(n||Tf),s=i.valid&&mf(e||Tf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class j2{constructor(e,t,i,s){const l=t[i];s=Jl([e.to,s,l,e.from]);const o=Jl([e.from,l,s]);this._active=!0,this._fn=e.fn||R2[e.type||typeof o],this._easing=il[e.easing]||il.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=Jl([e.to,t,s,e.from]),this._from=Jl([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 H2=["x","y","borderWidth","radius","tension"],q2=["color","borderColor","backgroundColor"];tt.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 V2=Object.keys(tt.animation);tt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});tt.set("animations",{colors:{type:"color",properties:q2},numbers:{type:"number",properties:H2}});tt.describe("animations",{_fallback:"animation"});tt.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 O_{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Ge(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!Ge(s))return;const l={};for(const o of V2)l[o]=s[o];(gt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=B2(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&z2(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 j2(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 ni.add(this._chart,i),!0}}function z2(n,e){const t=[],Line truncated
`)>-1?n.split(`
`):n}function iS(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 tc(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,h=In(e.padding);let g=h.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&&(g+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;g+=m*C+(y-m)*a.lineHeight+(y-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let k=0;const T=function(C){b=Math.max(b,t.measureText(C).width+k)};return t.save(),t.font=u.string,ct(n.title,T),t.font=a.string,ct(n.beforeBody.concat(n.afterBody),T),k=e.displayColors?o+2+e.boxPadding:0,ct(i,C=>{ct(C.before,T),ct(C.lines,T),ct(C.after,T)}),k=0,t.font=f.string,ct(n.footer,T),t.restore(),b+=h.width,{width:b,height:g}}function sS(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function lS(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 oS(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"),lS(u,n,e,t)&&(u="center"),u}function nc(n,e,t){const i=t.yAlign||e.yAlign||sS(n,t);return{xAlign:t.xAlign||e.xAlign||oS(n,e,t,i),yAlign:i}}function rS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function aS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function ic(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}=vs(o);let h=rS(e,r);const g=aS(e,a,u);return a==="center"?r==="left"?h+=u:r==="right"&&(h-=u):r==="left"?h-=Math.max(f,d)+s:r==="right"&&(h+=Math.max(c,m)+s),{x:Wt(h,0,i.width-e.width),y:Wt(g,0,i.height-e.height)}}function to(n,e,t){const i=In(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function sc(n){return Wn([],ii(n))}function uS(n,e,t){return $i(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function lc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class la extends ai{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 O_(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=uS(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=Wn(r,ii(s)),r=Wn(r,ii(l)),r=Wn(r,ii(o)),r}getBeforeBody(e,t){return sc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return ct(e,l=>{const o={before:[],lines:[],after:[]},r=lc(i,l);Wn(o.before,ii(r.beforeLabel.call(this,l))),Wn(o.lines,r.label.call(this,l)),Wn(o.after,ii(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return sc(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=Wn(r,ii(s)),r=Wn(r,ii(l)),r=Wn(r,ii(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(iS(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))),ct(r,f=>{const c=lc(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
`):n}function iS(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 tc(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,h=In(e.padding);let g=h.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&&(g+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;g+=m*C+(y-m)*a.lineHeight+(y-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let k=0;const T=function(C){b=Math.max(b,t.measureText(C).width+k)};return t.save(),t.font=u.string,ct(n.title,T),t.font=a.string,ct(n.beforeBody.concat(n.afterBody),T),k=e.displayColors?o+2+e.boxPadding:0,ct(i,C=>{ct(C.before,T),ct(C.lines,T),ct(C.after,T)}),k=0,t.font=f.string,ct(n.footer,T),t.restore(),b+=h.width,{width:b,height:g}}function sS(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function lS(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 oS(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"),lS(u,n,e,t)&&(u="center"),u}function nc(n,e,t){const i=t.yAlign||e.yAlign||sS(n,t);return{xAlign:t.xAlign||e.xAlign||oS(n,e,t,i),yAlign:i}}function rS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function aS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function ic(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}=vs(o);let h=rS(e,r);const g=aS(e,a,u);return a==="center"?r==="left"?h+=u:r==="right"&&(h-=u):r==="left"?h-=Math.max(f,d)+s:r==="right"&&(h+=Math.max(c,m)+s),{x:Wt(h,0,i.width-e.width),y:Wt(g,0,i.height-e.height)}}function to(n,e,t){const i=In(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function sc(n){return Wn([],ii(n))}function uS(n,e,t){return $i(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function lc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class la extends ai{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 O_(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=uS(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=Wn(r,ii(s)),r=Wn(r,ii(l)),r=Wn(r,ii(o)),r}getBeforeBody(e,t){return sc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return ct(e,l=>{const o={before:[],lines:[],after:[]},r=lc(i,l);Wn(o.before,ii(r.beforeLabel.call(this,l))),Wn(o.lines,r.label.call(this,l)),Wn(o.after,ii(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return sc(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=Wn(r,ii(s)),r=Wn(r,ii(l)),r=Wn(r,ii(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(iS(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))),ct(r,f=>{const c=lc(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.3.0
* https://www.chartjs.org
* (c) 2022 chartjs-adapter-luxon Contributors
* Released under the MIT license
*/const ES={datetime:Ve.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Ve.TIME_WITH_SECONDS,minute:Ve.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};L_._date.override({_id:"luxon",_create:function(n){return Ve.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return ES},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=Ve.fromFormat(n,e,t):n=Ve.fromISO(n,t):n instanceof Date?n=Ve.fromJSDate(n,t):i==="object"&&!(n instanceof Ve)&&(n=Ve.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 pc(n){let e,t,i;return{c(){e=v("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{t||(t=ze(e,Pt,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ze(e,Pt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function AS(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=z(n[1]),t=D(),s=z(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&re(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&re(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function IS(n){let e;return{c(){e=z("Loading...")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function PS(n){let e,t,i,s,l,o=n[2]&&pc();function r(f,c){return f[2]?IS:AS}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=D(),i=v("canvas"),s=D(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Ir(i,"height","250px"),Ir(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),Q(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){S(f,e,c),o&&o.m(e,null),_(e,t),_(e,i),n[8](i),S(f,s,c),S(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&A(o,1):(o=pc(),o.c(),A(o,1),o.m(e,t)):o&&(pe(),P(o,1,1,()=>{o=null}),me()),c&4&&Q(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&&w(e),o&&o.d(),n[8](null),f&&w(s),f&&w(l),u.d()}}}function LS(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),he.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{c();for(let h of m)r.push({x:new Date(h.date),y:h.total}),t(1,a+=h.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(c(),console.warn(m),he.errorResponseHandler(m,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}nn(()=>(Io.register(Mi,Zo,Ko,Xa,Pl,nS,fS),t(6,o=new Io(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){ie[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 NS extends ye{constructor(e){super(),ve(this,e,LS,PS,be,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var mc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},aa={},FS={get exports(){return aa},set exports(n){aa=n}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
*/const ES={datetime:Ve.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Ve.TIME_WITH_SECONDS,minute:Ve.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};L_._date.override({_id:"luxon",_create:function(n){return Ve.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return ES},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=Ve.fromFormat(n,e,t):n=Ve.fromISO(n,t):n instanceof Date?n=Ve.fromJSDate(n,t):i==="object"&&!(n instanceof Ve)&&(n=Ve.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 pc(n){let e,t,i;return{c(){e=v("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{t||(t=ze(e,Pt,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ze(e,Pt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function AS(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=z(n[1]),t=D(),s=z(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&re(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&re(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function IS(n){let e;return{c(){e=z("Loading...")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function PS(n){let e,t,i,s,l,o=n[2]&&pc();function r(f,c){return f[2]?IS:AS}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=D(),i=v("canvas"),s=D(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Ir(i,"height","250px"),Ir(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),x(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){S(f,e,c),o&&o.m(e,null),_(e,t),_(e,i),n[8](i),S(f,s,c),S(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&A(o,1):(o=pc(),o.c(),A(o,1),o.m(e,t)):o&&(pe(),P(o,1,1,()=>{o=null}),me()),c&4&&x(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&&w(e),o&&o.d(),n[8](null),f&&w(s),f&&w(l),u.d()}}}function LS(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),he.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{c();for(let h of m)r.push({x:new Date(h.date),y:h.total}),t(1,a+=h.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(c(),console.warn(m),he.errorResponseHandler(m,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}nn(()=>(Ao.register(Mi,Jo,Yo,Xa,Pl,nS,fS),t(6,o=new Ao(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){ie[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 NS extends ye{constructor(e){super(),ve(this,e,LS,PS,be,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var mc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},aa={},FS={get exports(){return aa},set exports(n){aa=n}};(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 k(T){return T instanceof a?new a(T.type,k(T.content),T.alias):Array.isArray(T)?T.map(k):T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(k){return Object.prototype.toString.call(k).slice(8,-1)},objId:function(k){return k.__id||Object.defineProperty(k,"__id",{value:++l}),k.__id},clone:function k(T,C){C=C||{};var M,$;switch(r.util.type(T)){case"Object":if($=r.util.objId(T),C[$])return C[$];M={},C[$]=M;for(var O in T)T.hasOwnProperty(O)&&(M[O]=k(T[O],C));return M;case"Array":return $=r.util.objId(T),C[$]?C[$]:(M=[],C[$]=M,T.forEach(function(E,I){M[I]=k(E,C)}),M);default:return T}},getLanguage:function(k){for(;k;){var T=s.exec(k.className);if(T)return T[1].toLowerCase();k=k.parentElement}return"none"},setLanguage:function(k,T){k.className=k.className.replace(RegExp(s,"gi"),""),k.classList.add("language-"+T)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var k=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(k){var T=document.getElementsByTagName("script");for(var C in T)if(T[C].src==k)return T[C]}return null}},isActive:function(k,T,C){for(var M="no-"+T;k;){var $=k.classList;if($.contains(T))return!0;if($.contains(M))return!1;k=k.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(k,T){var C=r.util.clone(r.languages[k]);for(var M in T)C[M]=T[M];return C},insertBefore:function(k,T,C,M){M=M||r.languages;var $=M[k],O={};for(var E in $)if($.hasOwnProperty(E)){if(E==T)for(var I in C)C.hasOwnProperty(I)&&(O[I]=C[I]);C.hasOwnProperty(E)||(O[E]=$[E])}var L=M[k];return M[k]=O,r.languages.DFS(r.languages,function(N,F){F===L&&N!=k&&(this[N]=O)}),O},DFS:function k(T,C,M,$){$=$||{};var O=r.util.objId;for(var E in T)if(T.hasOwnProperty(E)){C.call(T,E,T[E],M||E);var I=T[E],L=r.util.type(I);L==="Object"&&!$[O(I)]?($[O(I)]=!0,k(I,C,null,$)):L==="Array"&&!$[O(I)]&&($[O(I)]=!0,k(I,C,E,$))}}},plugins:{},highlightAll:function(k,T){r.highlightAllUnder(document,k,T)},highlightAllUnder:function(k,T,C){var M={callback:C,container:k,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 $=0,O;O=M.elements[$++];)r.highlightElement(O,T===!0,M.callback)},highlightElement:function(k,T,C){var M=r.util.getLanguage(k),$=r.languages[M];r.util.setLanguage(k,M);var O=k.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,M);var E=k.textContent,I={element:k,language:M,grammar:$,code:E};function L(F){I.highlightedCode=F,r.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,r.hooks.run("after-highlight",I),r.hooks.run("complete",I),C&&C.call(I.element)}if(r.hooks.run("before-sanity-check",I),O=I.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!I.code){r.hooks.run("complete",I),C&&C.call(I.element);return}if(r.hooks.run("before-highlight",I),!I.grammar){L(r.util.encode(I.code));return}if(T&&i.Worker){var N=new Worker(r.filename);N.onmessage=function(F){L(F.data)},N.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else L(r.highlight(I.code,I.grammar,I.language))},highlight:function(k,T,C){var M={code:k,grammar:T,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(k,T){var C=T.rest;if(C){for(var M in C)T[M]=C[M];delete T.rest}var $=new c;return d($,$.head,k),f(k,$,T,$.head,0),h($)},hooks:{all:{},add:function(k,T){var C=r.hooks.all;C[k]=C[k]||[],C[k].push(T)},run:function(k,T){var C=r.hooks.all[k];if(!(!C||!C.length))for(var M=0,$;$=C[M++];)$(T)}},Token:a};i.Prism=r;function a(k,T,C,M){this.type=k,this.content=T,this.alias=C,this.length=(M||"").length|0}a.stringify=function k(T,C){if(typeof T=="string")return T;if(Array.isArray(T)){var M="";return T.forEach(function(L){M+=k(L,C)}),M}var $={type:T.type,content:k(T.content,C),tag:"span",classes:["token",T.type],attributes:{},language:C},O=T.alias;O&&(Array.isArray(O)?Array.prototype.push.apply($.classes,O):$.classes.push(O)),r.hooks.run("wrap",$);var E="";for(var I in $.attributes)E+=" "+I+'="'+($.attributes[I]||"").replace(/"/g,"&quot;")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+E+">"+$.content+"</"+$.tag+">"};function u(k,T,C,M){k.lastIndex=T;var $=k.exec(C);if($&&M&&$[1]){var O=$[1].length;$.index+=O,$[0]=$[0].slice(O)}return $}funLine truncated
*/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 k(T){return T instanceof a?new a(T.type,k(T.content),T.alias):Array.isArray(T)?T.map(k):T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(k){return Object.prototype.toString.call(k).slice(8,-1)},objId:function(k){return k.__id||Object.defineProperty(k,"__id",{value:++l}),k.__id},clone:function k(T,C){C=C||{};var M,$;switch(r.util.type(T)){case"Object":if($=r.util.objId(T),C[$])return C[$];M={},C[$]=M;for(var O in T)T.hasOwnProperty(O)&&(M[O]=k(T[O],C));return M;case"Array":return $=r.util.objId(T),C[$]?C[$]:(M=[],C[$]=M,T.forEach(function(E,I){M[I]=k(E,C)}),M);default:return T}},getLanguage:function(k){for(;k;){var T=s.exec(k.className);if(T)return T[1].toLowerCase();k=k.parentElement}return"none"},setLanguage:function(k,T){k.className=k.className.replace(RegExp(s,"gi"),""),k.classList.add("language-"+T)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var k=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(k){var T=document.getElementsByTagName("script");for(var C in T)if(T[C].src==k)return T[C]}return null}},isActive:function(k,T,C){for(var M="no-"+T;k;){var $=k.classList;if($.contains(T))return!0;if($.contains(M))return!1;k=k.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(k,T){var C=r.util.clone(r.languages[k]);for(var M in T)C[M]=T[M];return C},insertBefore:function(k,T,C,M){M=M||r.languages;var $=M[k],O={};for(var E in $)if($.hasOwnProperty(E)){if(E==T)for(var I in C)C.hasOwnProperty(I)&&(O[I]=C[I]);C.hasOwnProperty(E)||(O[E]=$[E])}var L=M[k];return M[k]=O,r.languages.DFS(r.languages,function(N,F){F===L&&N!=k&&(this[N]=O)}),O},DFS:function k(T,C,M,$){$=$||{};var O=r.util.objId;for(var E in T)if(T.hasOwnProperty(E)){C.call(T,E,T[E],M||E);var I=T[E],L=r.util.type(I);L==="Object"&&!$[O(I)]?($[O(I)]=!0,k(I,C,null,$)):L==="Array"&&!$[O(I)]&&($[O(I)]=!0,k(I,C,E,$))}}},plugins:{},highlightAll:function(k,T){r.highlightAllUnder(document,k,T)},highlightAllUnder:function(k,T,C){var M={callback:C,container:k,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 $=0,O;O=M.elements[$++];)r.highlightElement(O,T===!0,M.callback)},highlightElement:function(k,T,C){var M=r.util.getLanguage(k),$=r.languages[M];r.util.setLanguage(k,M);var O=k.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,M);var E=k.textContent,I={element:k,language:M,grammar:$,code:E};function L(F){I.highlightedCode=F,r.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,r.hooks.run("after-highlight",I),r.hooks.run("complete",I),C&&C.call(I.element)}if(r.hooks.run("before-sanity-check",I),O=I.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!I.code){r.hooks.run("complete",I),C&&C.call(I.element);return}if(r.hooks.run("before-highlight",I),!I.grammar){L(r.util.encode(I.code));return}if(T&&i.Worker){var N=new Worker(r.filename);N.onmessage=function(F){L(F.data)},N.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else L(r.highlight(I.code,I.grammar,I.language))},highlight:function(k,T,C){var M={code:k,grammar:T,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(k,T){var C=T.rest;if(C){for(var M in C)T[M]=C[M];delete T.rest}var $=new c;return d($,$.head,k),f(k,$,T,$.head,0),h($)},hooks:{all:{},add:function(k,T){var C=r.hooks.all;C[k]=C[k]||[],C[k].push(T)},run:function(k,T){var C=r.hooks.all[k];if(!(!C||!C.length))for(var M=0,$;$=C[M++];)$(T)}},Token:a};i.Prism=r;function a(k,T,C,M){this.type=k,this.content=T,this.alias=C,this.length=(M||"").length|0}a.stringify=function k(T,C){if(typeof T=="string")return T;if(Array.isArray(T)){var M="";return T.forEach(function(L){M+=k(L,C)}),M}var $={type:T.type,content:k(T.content,C),tag:"span",classes:["token",T.type],attributes:{},language:C},O=T.alias;O&&(Array.isArray(O)?Array.prototype.push.apply($.classes,O):$.classes.push(O)),r.hooks.run("wrap",$);var E="";for(var I in $.attributes)E+=" "+I+'="'+($.attributes[I]||"").replace(/"/g,"&quot;")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+E+">"+$.content+"</"+$.tag+">"};function u(k,T,C,M){k.lastIndex=T;var $=k.exec(C);if($&&M&&$[1]){var O=$[1].length;$.index+=O,$[0]=$[0].slice(O)}return $}funLine truncated
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(I+1))}y.textContent=$,t.highlightElement(y)},function($){b.setAttribute(r,f),y.textContent=$})}}),t.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(c),k=0,T;T=y[k++];)t.highlightElement(T)}};var h=!1;t.fileHighlight=function(){h||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),h=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(FS);const Js=aa;var hc={},RS={get exports(){return hc},set exports(n){hc=n}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;a<o.length;++a)o.charCodeAt(a)==" ".charCodeAt(0)&&(r+=3);return o.length+r}var l={"remove-trailing":"boolean","remove-indent":"boolean","left-trim":"boolean","right-trim":"boolean","break-lines":"number",indent:"number","remove-initial-line-feed":"boolean","tabs-to-spaces":"number","spaces-to-tabs":"number"};t.prototype={setDefaults:function(o){this.defaults=e(this.defaults,o)},normalize:function(o,r){r=e(this.defaults,r);for(var a in r){var u=i(a);a!=="normalize"&&u!=="setDefaults"&&r[a]&&this[u]&&(o=this[u].call(this,o,r[a]))}return o},leftTrim:function(o){return o.replace(/^\s+/,"")},rightTrim:function(o){return o.replace(/\s+$/,"")},tabsToSpaces:function(o,r){return r=r|0||4,o.replace(/\t/g,new Array(++r).join(" "))},spacesToTabs:function(o,r){return r=r|0||4,o.replace(RegExp(" {"+r+"}","g")," ")},removeTrailing:function(o){return o.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(o){return o.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(o){var r=o.match(/^[^\S\n\r]*(?=\S)/gm);return!r||!r[0].length||(r.sort(function(a,u){return a.length-u.length}),!r[0].length)?o:o.replace(RegExp("^"+r[0],"gm"),"")},indent:function(o,r){return o.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++r).join(" ")+"$&")},breakLines:function(o,r){r=r===!0?80:r|0||80;for(var a=o.split(`
`),u=0;u<a.length;++u)if(!(s(a[u])<=r)){for(var f=a[u].split(/(\s+)/g),c=0,d=0;d<f.length;++d){var m=s(f[d]);c+=m,c>r&&(f[d]=`
`+f[d],c=m)}a[u]=f.join("")}return a.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(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,m="",h="",g=!1,b=0;b<d.length;++b){var y=d[b];y==o.element?g=!0:y.nodeName==="#text"&&(g?h+=y.nodeValue:m+=y.nodeValue,a.removeChild(y),--b)}if(!o.element.children.length||!Prism.plugins.KeepMarkup)o.code=m+o.code+h,o.code=r.normalize(o.code,o.settings);else{var k=m+o.element.innerHTML+h;o.element.innerHTML=r.normalize(k,o.settings),o.code=o.element.textContent}}}})})()})(RS);(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 jS(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),_(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-10s5tkd")&&p(e,"class",i)},i:X,o:X,d(s){s&&w(e)}}}function HS(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=Js.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Js.highlight(a,Js.languages[l]||Js.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 Js<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class eb extends ye{constructor(e){super(),ve(this,e,HS,jS,be,{class:0,content:2,language:3})}}const qS=n=>({}),gc=n=>({}),VS=n=>({}),_c=n=>({});function bc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T=n[4]&&!n[2]&&vc(n);const C=n[19].header,M=Ft(C,n,n[18],_c);let $=n[4]&&n[2]&&yc(n);const O=n[19].default,E=Ft(O,n,n[18],null),I=n[19].footer,L=Ft(I,n,n[18],gc);return{c(){e=v("div"),t=v("div"),s=D(),l=v("div"),o=v("div"),T&&T.c(),r=D(),M&&M.c(),a=D(),$&&$.c(),u=D(),f=v("div"),E&&E.c(),c=D(),d=v("div"),L&&L.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]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(N,F){S(N,e,F),_(e,t),_(e,s),_(e,l),_(l,o),T&&T.m(o,null),_(o,r),M&&M.m(o,null),_(o,a),$&&$.m(o,null),_(l,u),_(l,f),E&&E.m(f,null),n[21](f),_(l,c),_(l,d),L&&L.m(d,null),b=!0,y||(k=[K(t,"click",pt(n[20])),K(f,"scroll",n[22])],y=!0)},p(N,F){n=N,n[4]&&!n[2]?T?T.p(n,F):(T=vc(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),M&&M.p&&(!b||F&262144)&&jt(M,C,n,n[18],b?Rt(C,n[18],F,VS):Ht(n[18]),_c),n[4]&&n[2]?$?$.p(n,F):($=yc(n),$.c(),$.m(o,null)):$&&($.d(1),$=null),E&&E.p&&(!b||F&262144)&&jt(E,O,n,n[18],b?Rt(O,n[18],F,null):Ht(n[18]),null),L&&L.p&&(!b||F&262144)&&jt(L,I,n,n[18],b?Rt(I,n[18],F,qS):Ht(n[1 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 k={};y&16&&(k.id=b[4]),y&1&&(k.disabled=!B.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,k.value=b[0].exceptDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function K3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[3](b)}let g={id:n[4]+".options.onlyDomains",disabled:!B.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(g.value=n[0].onlyDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("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){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),j(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.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 k={};y&16&&(k.id=b[4]+".options.onlyDomains"),y&1&&(k.disabled=!B.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,k.value=b[0].onlyDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function J3(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[Y3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[K3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),j(i,t,null),_(e,s),_(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||(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&&w(e),H(i),H(o)}}}function Z3(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 sb extends ye{constructor(e){super(),ve(this,e,Z3,J3,be,{key:1,options:0})}}function G3(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 sb({props:r}),ie.push(()=>ke(e,"key",l)),ie.push(()=>ke(e,"options",o)),{c(){q(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],we(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],we(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){H(e,a)}}}function X3(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 x3 extends ye{constructor(e){super(),ve(this,e,X3,G3,be,{key:0,options:1})}}function Q3(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class eT extends ye{constructor(e){super(),ve(this,e,Q3,null,be,{key:0,options:1})}}var Sr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ks={_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},_l={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%10 Line truncated
`)}},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(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,m="",h="",g=!1,b=0;b<d.length;++b){var y=d[b];y==o.element?g=!0:y.nodeName==="#text"&&(g?h+=y.nodeValue:m+=y.nodeValue,a.removeChild(y),--b)}if(!o.element.children.length||!Prism.plugins.KeepMarkup)o.code=m+o.code+h,o.code=r.normalize(o.code,o.settings);else{var k=m+o.element.innerHTML+h;o.element.innerHTML=r.normalize(k,o.settings),o.code=o.element.textContent}}}})})()})(RS);(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 jS(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),_(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-10s5tkd")&&p(e,"class",i)},i:G,o:G,d(s){s&&w(e)}}}function HS(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=Js.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Js.highlight(a,Js.languages[l]||Js.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 Js<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class eb extends ye{constructor(e){super(),ve(this,e,HS,jS,be,{class:0,content:2,language:3})}}const qS=n=>({}),gc=n=>({}),VS=n=>({}),_c=n=>({});function bc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T=n[4]&&!n[2]&&vc(n);const C=n[19].header,M=Ft(C,n,n[18],_c);let $=n[4]&&n[2]&&yc(n);const O=n[19].default,E=Ft(O,n,n[18],null),I=n[19].footer,L=Ft(I,n,n[18],gc);return{c(){e=v("div"),t=v("div"),s=D(),l=v("div"),o=v("div"),T&&T.c(),r=D(),M&&M.c(),a=D(),$&&$.c(),u=D(),f=v("div"),E&&E.c(),c=D(),d=v("div"),L&&L.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]),x(l,"popup",n[2]),p(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(N,F){S(N,e,F),_(e,t),_(e,s),_(e,l),_(l,o),T&&T.m(o,null),_(o,r),M&&M.m(o,null),_(o,a),$&&$.m(o,null),_(l,u),_(l,f),E&&E.m(f,null),n[21](f),_(l,c),_(l,d),L&&L.m(d,null),b=!0,y||(k=[K(t,"click",pt(n[20])),K(f,"scroll",n[22])],y=!0)},p(N,F){n=N,n[4]&&!n[2]?T?T.p(n,F):(T=vc(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),M&&M.p&&(!b||F[0]&262144)&&jt(M,C,n,n[18],b?Rt(C,n[18],F,VS):Ht(n[18]),_c),n[4]&&n[2]?$?$.p(n,F):($=yc(n),$.c(),$.m(o,null)):$&&($.d(1),$=null),E&&E.p&&(!b||F[0]&262144)&&jt(E,O,n,n[18],b?Rt(O,n[18],F,null):Ht(n[18]),null),L&&L.p&&(!b||F[0]&262144)&&jt(L,I,n,n[18],b?Rt(I,n[18],F,q 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 k={};y&16&&(k.id=b[4]),y&1&&(k.disabled=!B.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,k.value=b[0].exceptDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),q(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function K3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[3](b)}let g={id:n[4]+".options.onlyDomains",disabled:!B.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(g.value=n[0].onlyDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("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){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),H(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.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 k={};y&16&&(k.id=b[4]+".options.onlyDomains"),y&1&&(k.disabled=!B.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,k.value=b[0].onlyDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),q(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function J3(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[Y3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[K3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),H(i,t,null),_(e,s),_(e,l),H(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&&w(e),q(i),q(o)}}}function Z3(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 sb extends ye{constructor(e){super(),ve(this,e,Z3,J3,be,{key:1,options:0})}}function G3(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 sb({props:r}),ie.push(()=>ke(e,"key",l)),ie.push(()=>ke(e,"options",o)),{c(){V(e.$$.fragment)},m(a,u){H(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],we(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],we(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){q(e,a)}}}function X3(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 x3 extends ye{constructor(e){super(),ve(this,e,X3,G3,be,{key:0,options:1})}}function Q3(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class eT extends ye{constructor(e){super(),ve(this,e,Q3,null,be,{key:0,options:1})}}var Sr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ks={_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},_l={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%10 Line truncated
<span class='flatpickr-weekday'>
`+W.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function x(){t.calendarContainer.classList.add("hasWeeks");var R=at("div","flatpickr-weekwrapper");R.appendChild(at("span","flatpickr-weekday",t.l10n.weekAbbreviation));var W=at("div","flatpickr-weeks");return R.appendChild(W),{weekWrapper:R,weekNumbers:W}}function Y(R,W){W===void 0&&(W=!0);var ee=W?R:R-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,xe("onYearChange"),U()),F(),xe("onMonthChange"),Ei())}function se(R,W){if(R===void 0&&(R=!0),W===void 0&&(W=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,W===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ee=Mr(t.config),le=ee.hours,Ce=ee.minutes,Ee=ee.seconds;m(le,Ce,Ee)}t.redraw(),R&&xe("onChange")}function He(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),xe("onClose")}function Re(){t.config!==void 0&&xe("onDestroy");for(var R=t._handlers.length;R--;)t._handlers[R].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 W=t.calendarContainer.parentNode;if(W.lastChild&&W.removeChild(W.lastChild),W.parentNode){for(;W.firstChild;)W.parentNode.insertBefore(W.firstChild,W);W.parentNode.removeChild(W)}}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 Fe(R){return t.calendarContainer.contains(R)}function qe(R){if(t.isOpen&&!t.config.inline){var W=mn(R),ee=Fe(W),le=W===t.input||W===t.altInput||t.element.contains(W)||R.path&&R.path.indexOf&&(~R.path.indexOf(t.input)||~R.path.indexOf(t.altInput)),Ce=!le&&!ee&&!Fe(R.relatedTarget),Ee=!t.config.ignoredFocusElements.some(function(Ie){return Ie.contains(W)});Ce&&Ee&&(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 ge(R){if(!(!R||t.config.minDate&&R<t.config.minDate.getFullYear()||t.config.maxDate&&R>t.config.maxDate.getFullYear())){var W=R,ee=t.currentYear!==W;t.currentYear=W||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(),xe("onYearChange"),U())}}function Se(R,W){var ee;W===void 0&&(W=!0);var le=t.parseDate(R,void 0,W);if(t.config.minDate&&le&&hn(le,t.config.minDate,W!==void 0?W:!t.minDateHasTime)<0||t.config.maxDate&&le&&hn(le,t.config.maxDate,W!==void 0?W:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(le===void 0)return!1;for(var Ce=!!t.config.enable,Ee=(ee=t.config.enable)!==null&&ee!==void 0?ee:t.config.disable,Ie=0,De=void 0;Ie<Ee.length;Ie++){if(De=Ee[Ie],typeof De=="function"&&De(le))return Ce;if(De instanceof Date&&le!==void 0&&De.getTime()===le.getTime())return Ce;if(typeof De=="string"){var Ke=t.parseDate(De,void 0,!0);return Ke&&Ke.getTime()===le.getTime()?Ce:!Ce}else if(typeof De=="object"&&le!==void 0&&De.from&&De.to&&le.getTime()>=De.from.getTime()&&le.getTime()<=De.to.getTime())return Ce}return!Ce}function Ue(R){return t.daysContainer!==void 0?R.className.indexOf("hidden")===-1&&R.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(R):!1}function lt(R){var W=R.target===t._input,ee=t._input.value.trimEnd()!==Ai();W&&ee&&!(R.relatedTarget&&Fe(R.relatedTarget))&&t.setDate(t._input.value,!0,R.target===t.altInput?t.config.altFormat:t.config.dateFormat)}fu Line truncated
`}}function X(){t.calendarContainer.classList.add("hasWeeks");var j=at("div","flatpickr-weekwrapper");j.appendChild(at("span","flatpickr-weekday",t.l10n.weekAbbreviation));var W=at("div","flatpickr-weeks");return j.appendChild(W),{weekWrapper:j,weekNumbers:W}}function Y(j,W){W===void 0&&(W=!0);var Q=W?j:j-t.currentMonth;Q<0&&t._hidePrevMonthArrow===!0||Q>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=Q,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,xe("onYearChange"),U()),F(),xe("onMonthChange"),Ei())}function se(j,W){if(j===void 0&&(j=!0),W===void 0&&(W=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,W===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var Q=Mr(t.config),le=Q.hours,Ce=Q.minutes,Ee=Q.seconds;m(le,Ce,Ee)}t.redraw(),j&&xe("onChange")}function He(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),xe("onClose")}function Re(){t.config!==void 0&&xe("onDestroy");for(var j=t._handlers.length;j--;)t._handlers[j].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 W=t.calendarContainer.parentNode;if(W.lastChild&&W.removeChild(W.lastChild),W.parentNode){for(;W.firstChild;)W.parentNode.insertBefore(W.firstChild,W);W.parentNode.removeChild(W)}}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(Q){try{delete t[Q]}catch{}})}function Fe(j){return t.calendarContainer.contains(j)}function qe(j){if(t.isOpen&&!t.config.inline){var W=mn(j),Q=Fe(W),le=W===t.input||W===t.altInput||t.element.contains(W)||j.path&&j.path.indexOf&&(~j.path.indexOf(t.input)||~j.path.indexOf(t.altInput)),Ce=!le&&!Q&&!Fe(j.relatedTarget),Ee=!t.config.ignoredFocusElements.some(function(Ie){return Ie.contains(W)});Ce&&Ee&&(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 ge(j){if(!(!j||t.config.minDate&&j<t.config.minDate.getFullYear()||t.config.maxDate&&j>t.config.maxDate.getFullYear())){var W=j,Q=t.currentYear!==W;t.currentYear=W||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)),Q&&(t.redraw(),xe("onYearChange"),U())}}function Se(j,W){var Q;W===void 0&&(W=!0);var le=t.parseDate(j,void 0,W);if(t.config.minDate&&le&&hn(le,t.config.minDate,W!==void 0?W:!t.minDateHasTime)<0||t.config.maxDate&&le&&hn(le,t.config.maxDate,W!==void 0?W:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(le===void 0)return!1;for(var Ce=!!t.config.enable,Ee=(Q=t.config.enable)!==null&&Q!==void 0?Q:t.config.disable,Ie=0,De=void 0;Ie<Ee.length;Ie++){if(De=Ee[Ie],typeof De=="function"&&De(le))return Ce;if(De instanceof Date&&le!==void 0&&De.getTime()===le.getTime())return Ce;if(typeof De=="string"){var Ke=t.parseDate(De,void 0,!0);return Ke&&Ke.getTime()===le.getTime()?Ce:!Ce}else if(typeof De=="object"&&le!==void 0&&De.from&&De.to&&le.getTime()>=De.from.getTime()&&le.getTime()<=De.to.getTime())return Ce}return!Ce}function Ue(j){return t.daysContainer!==void 0?j.className.indexOf("hidden")===-1&&j.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(j):!1}function lt(j){var W=j.target===t._input,Q=t._input.value.trimEnd()!==Ai();W&&Q&&!(j.relatedTarget&&Fe(j.relatedTarget))&&t.setDate(t._input.value,!0,j.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ue(j){var W=m Line truncated
`),r=v("code"),r.textContent="multipart/form-data",a=z(`
requests, the following normalization rules are applied if the `),u=v("code"),u.textContent="json",f=z(` field is a
`),c=v("strong"),c.textContent="plain string",d=z(`:
`),m=v("ul"),h=v("li"),h.innerHTML="&quot;true&quot; is converted to the json <code>true</code>",g=D(),b=v("li"),b.innerHTML="&quot;false&quot; is converted to the json <code>false</code>",y=D(),k=v("li"),k.innerHTML="&quot;null&quot; is converted to the json <code>null</code>",T=D(),C=v("li"),C.innerHTML="&quot;[1,2,3]&quot; is converted to the json <code>[1,2,3]</code>",M=D(),$=v("li"),E=z(O),I=z(" is converted to the json "),L=v("code"),L.textContent='{"a":1,"b":2}',N=D(),F=v("li"),F.textContent="numeric strings are converted to json number",U=D(),Z=v("li"),Z.textContent="double quoted strings are left as they are (aka. without normalizations)",ne=D(),G=v("li"),G.textContent="any other string (empty string too) is double quoted",J=z(`
`),m=v("ul"),h=v("li"),h.innerHTML="&quot;true&quot; is converted to the json <code>true</code>",g=D(),b=v("li"),b.innerHTML="&quot;false&quot; is converted to the json <code>false</code>",y=D(),k=v("li"),k.innerHTML="&quot;null&quot; is converted to the json <code>null</code>",T=D(),C=v("li"),C.innerHTML="&quot;[1,2,3]&quot; is converted to the json <code>[1,2,3]</code>",M=D(),$=v("li"),E=z(O),I=z(" is converted to the json "),L=v("code"),L.textContent='{"a":1,"b":2}',N=D(),F=v("li"),F.textContent="numeric strings are converted to json number",U=D(),J=v("li"),J.textContent="double quoted strings are left as they are (aka. without normalizations)",ne=D(),Z=v("li"),Z.textContent="any other string (empty string too) is double quoted",te=z(`
Alternatively, if you want to avoid the string value normalizations, you can wrap your data inside
an object, eg.`),te=v("code"),te.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(Y,se){S(Y,e,se),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(i,r),_(i,a),_(i,u),_(i,f),_(i,c),_(i,d),_(i,m),_(m,h),_(m,g),_(m,b),_(m,y),_(m,k),_(m,T),_(m,C),_(m,M),_(m,$),_($,E),_($,I),_($,L),_(m,N),_(m,F),_(m,U),_(m,Z),_(m,ne),_(m,G),_(i,J),_(i,te),x=!0},i(Y){x||(Y&&nt(()=>{V||(V=ze(e,It,{duration:150},!0)),V.run(1)}),x=!0)},o(Y){Y&&(V||(V=ze(e,It,{duration:150},!1)),V.run(0)),x=!1},d(Y){Y&&w(e),Y&&V&&V.end()}}}function ST(n){let e,t,i,s,l,o,r;function a(d,m){return d[0]?wT:kT}let u=a(n),f=u(n),c=n[0]&&Yc();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=D(),f.c(),s=D(),c&&c.c(),l=Ae(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,m){S(d,e,m),_(e,t),_(e,i),f.m(e,null),S(d,s,m),c&&c.m(d,m),S(d,l,m),o||(r=K(e,"click",n[3]),o=!0)},p(d,[m]){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(e,null))),d[0]?c?m&1&&A(c,1):(c=Yc(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){A(c)},o(d){P(c)},d(d){d&&w(e),f.d(),d&&w(s),c&&c.d(d),d&&w(l),o=!1,r()}}}function TT(n,e,t){const i="",s={};let l=!1;return[l,i,s,()=>{t(0,l=!l)}]}class CT extends ye{constructor(e){super(),ve(this,e,TT,ST,be,{key:1,options:2})}get key(){return this.$$.ctx[1]}get options(){return this.$$.ctx[2]}}function $T(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=z(t),s=D(),l=v("small"),r=z(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){S(a,e,u),_(e,i),S(a,s,u),S(a,l,u),_(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&re(i,t),u&1&&o!==(o=a[0].mimeType+"")&&re(r,o)},i:X,o:X,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function MT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Kc extends ye{constructor(e){super(),ve(this,e,MT,$T,be,{item:0})}}const DT=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType Line truncated
Leave empty for no restriction.`,position:"top"})),k=!0)},p($,O){(!y||O&4096&&l!==(l=$[12]))&&p(e,"for",l);const E={};O&4096&&(E.id=$[12]),O&4&&(E.items=$[2]),!a&&O&1&&(a=!0,E.keyOfSelected=$[0].mimeTypes,we(()=>a=!1)),r.$set(E);const I={};O&8193&&(I.$$scope={dirty:O,ctx:$}),b.$set(I)},i($){y||(A(r.$$.fragment,$),A(b.$$.fragment,$),y=!0)},o($){P(r.$$.fragment,$),P(b.$$.fragment,$),y=!1},d($){$&&w(e),$&&w(o),H(r,$),$&&w(u),$&&w(f),H(b),k=!1,T()}}}function PT(n){let e;return{c(){e=v("ul"),e.innerHTML=`<li><strong>WxH</strong>
an object, eg.`),ee=v("code"),ee.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(Y,se){S(Y,e,se),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(i,r),_(i,a),_(i,u),_(i,f),_(i,c),_(i,d),_(i,m),_(m,h),_(m,g),_(m,b),_(m,y),_(m,k),_(m,T),_(m,C),_(m,M),_(m,$),_($,E),_($,I),_($,L),_(m,N),_(m,F),_(m,U),_(m,J),_(m,ne),_(m,Z),_(i,te),_(i,ee),X=!0},i(Y){X||(Y&&nt(()=>{R||(R=ze(e,It,{duration:150},!0)),R.run(1)}),X=!0)},o(Y){Y&&(R||(R=ze(e,It,{duration:150},!1)),R.run(0)),X=!1},d(Y){Y&&w(e),Y&&R&&R.end()}}}function ST(n){let e,t,i,s,l,o,r;function a(d,m){return d[0]?wT:kT}let u=a(n),f=u(n),c=n[0]&&Yc();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=D(),f.c(),s=D(),c&&c.c(),l=Ae(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,m){S(d,e,m),_(e,t),_(e,i),f.m(e,null),S(d,s,m),c&&c.m(d,m),S(d,l,m),o||(r=K(e,"click",n[3]),o=!0)},p(d,[m]){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(e,null))),d[0]?c?m&1&&A(c,1):(c=Yc(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){A(c)},o(d){P(c)},d(d){d&&w(e),f.d(),d&&w(s),c&&c.d(d),d&&w(l),o=!1,r()}}}function TT(n,e,t){const i="",s={};let l=!1;return[l,i,s,()=>{t(0,l=!l)}]}class CT extends ye{constructor(e){super(),ve(this,e,TT,ST,be,{key:1,options:2})}get key(){return this.$$.ctx[1]}get options(){return this.$$.ctx[2]}}function $T(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=z(t),s=D(),l=v("small"),r=z(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){S(a,e,u),_(e,i),S(a,s,u),S(a,l,u),_(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&re(i,t),u&1&&o!==(o=a[0].mimeType+"")&&re(r,o)},i:G,o:G,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function MT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Kc extends ye{constructor(e){super(),ve(this,e,MT,$T,be,{item:0})}}const DT=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeTyp Line truncated
Leave empty for no restriction.`,position:"top"})),k=!0)},p($,O){(!y||O&4096&&l!==(l=$[12]))&&p(e,"for",l);const E={};O&4096&&(E.id=$[12]),O&4&&(E.items=$[2]),!a&&O&1&&(a=!0,E.keyOfSelected=$[0].mimeTypes,we(()=>a=!1)),r.$set(E);const I={};O&8193&&(I.$$scope={dirty:O,ctx:$}),b.$set(I)},i($){y||(A(r.$$.fragment,$),A(b.$$.fragment,$),y=!0)},o($){P(r.$$.fragment,$),P(b.$$.fragment,$),y=!1},d($){$&&w(e),$&&w(o),q(r,$),$&&w(u),$&&w(f),q(b),k=!1,T()}}}function PT(n){let e;return{c(){e=v("ul"),e.innerHTML=`<li><strong>WxH</strong>
(eg. 100x50) - crop to WxH viewbox (from center)</li>
<li><strong>WxHt</strong>
(eg. 100x50t) - crop to WxH viewbox (from top)</li>
@@ -67,78 +67,78 @@
<li><strong>0xH</strong>
(eg. 0x50) - resize to H height preserving the aspect ratio</li>
<li><strong>Wx0</strong>
(eg. 100x0) - resize to W width preserving the aspect ratio</li>`,p(e,"class","m-0")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function LT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M;function $(E){n[10](E)}let O={id:n[12],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(O.value=n[0].thumbs),r=new Ns({props:O}),ie.push(()=>ke(r,"value",$)),k=new xn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[PT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=D(),m=v("button"),h=v("span"),h.textContent="Supported formats",g=D(),b=v("i"),y=D(),q(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(c,"class","txt"),p(h,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(m,"type","button"),p(m,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(E,I){S(E,e,I),_(e,t),_(e,i),_(e,s),S(E,o,I),j(r,E,I),S(E,u,I),S(E,f,I),_(f,c),_(f,d),_(f,m),_(m,h),_(m,g),_(m,b),_(m,y),j(k,m,null),T=!0,C||(M=Pe(Ye.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),C=!0)},p(E,I){(!T||I&4096&&l!==(l=E[12]))&&p(e,"for",l);const L={};I&4096&&(L.id=E[12]),!a&&I&1&&(a=!0,L.value=E[0].thumbs,we(()=>a=!1)),r.$set(L);const N={};I&8192&&(N.$$scope={dirty:I,ctx:E}),k.$set(N)},i(E){T||(A(r.$$.fragment,E),A(k.$$.fragment,E),T=!0)},o(E){P(r.$$.fragment,E),P(k.$$.fragment,E),T=!1},d(E){E&&w(e),E&&w(o),H(r,E),E&&w(u),E&&w(f),H(k),C=!1,M()}}}function NT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[OT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[ET,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[IT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[LT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(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(h,g){S(h,e,g),_(e,t),j(i,t,null),_(e,s),_(e,l),j(o,l,null),_(e,r),_(e,a),j(u,a,null),_(e,f),_(e,c),j(d,c,null),m=!0},p(h,[g]){const b={};g&2&&(b.name="schema."+h[1]+".options.maxSize"),g&12289&&(b.$$scope={dirty:g,ctx:h}),i.$set(b);const y={};g&2&&(y.name="schema."+h[1]+".options.maxSelect"),g&12289&&(y.$$scope={dirty:g,ctx:h}),o.$set(y);const k={};g&2&&(k.name="schema."+h[1]+".options.mimeTypes"),g&12293&&(k.$$scope={dirty:g,ctx:h}),u.$set(k);const T={};g&2&&(T.name="schema."+h[1]+".options.thumbs"),g&12289&&(T.$$scope={dirty:g,ctx:h}),d.$set(T)},i(h){m||(A(i.$$.fragment,h),A(o.$$.fragment,h),A(u.$$.fragment,h),A(d.$$.fragment,h),m=!0)},o(h){P(i.$$.fragment,h),P(o.$$.fragment,h),P(u.$$.fragment,h),P(d.$$.fragment,h),m=!1},d(h){h&&w(e),H(i),H(o),H(u),H(d)}}}function FT(n,e,t){let{key:i=""}=e,{options:s={}}=e,l=DT.slice();function o(){if(B.isEmpty(s.mimeTypes))return;const g=[];for(const b of s.mimeTypes)l.find(y=>y.mimeType===b)||g.push({mimeType:b});g.length&&t(2,l=l.concat(g))}function r(){s.maxSize=ht(this.value),t(0,s)}function a(){s.maxSelect=ht(this.value),t(0,s)}function u(g){n.$$.not_equal(s.mimeTypes,g)&&(s.mimeTypes=g,t(0,s))}const f=()=>{t(0,s.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],s)},c=()=>{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)},d=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},m=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function h(g){n.$$.not_equal(s.thumbs,g)&&(s.thumbs=g,t(0,s))}return n.$$set=g=>{"key"in g&&t(1,i=g.key),"options"in g&&t(0,s=g.options)},n.$$.update=()=>{n.$$.dirty&1&&(B.isEmpty(s)?t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]}):o())},[s,i,l,r,a,u,f,c,d,m,h]}class RT extends ye{constructor(e){super(),ve(this,e,FT,NT,be,{key:1,options:0})}}function jT(n){let e,t,i,s,l;return{c(){e=v("hr"),t=D(),i=v("button"),i.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New collection</span>`,p(i,"type","button"),p(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[7]),s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function HT(n){let e,t,i,s,l,o,r;function a(f){n[8](f)}let u={searchable:n[2].length>5,selectPlaceholder:"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[2],$$slots:{afterOptions:[jT]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Collection"),s=D(),q(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&4&&(d.searchable=f[2].length>5),c&4&&(d.items=f[2]),c&524296&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,we(()=>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&&w(e),f&&w(s),H(l,f)}}}function qT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=D(),s=v("i"),o=D(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18]),p(r,"type","number"),p(r,"id",a=n[18]),p(r,"step","1"),p(r,"min","1")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[0].maxSelect),u||(f=[Pe(Ye.call(null,s,{text:"Leave empty for no limit.",position:"top"})),K(r,"input",n[9])],u=!0)},p(c,d){d&262144&&l!==(l=c[18])&&p(e,"for",l),d&262144&&a!==(a=c[18])&&p(r,"id",a),d&1&&ht(r.value)!==c[0].maxSelect&&de(r,c[0].maxSelect)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,Le(f)}}}function VT(n){let e,t,i,s,l,o,r,a,u,f,c;function d(h){n[10](h)}let m={multiple:!0,searchable:!0,id:n[18],selectPlaceholder:"Auto",items:n[4]};return n[0].displayFields!==void 0&&(m.selected=n[0].displayFields),r=new Qa({props:m}),ie.push(()=>ke(r,"selected",d)),{c(){e=v("label"),t=v("span"),t.textContent="Display fields",i=D(),s=v("i"),o=D(),q(r.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18])},m(h,g){S(h,e,g),_(e,t),_(e,i),_(e,s),S(h,o,g),j(r,h,g),u=!0,f||(c=Pe(Ye.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(h,g){(!u||g&262144&&l!==(l=h[18]))&&p(e,"for",l);const b={};g&262144&&(b.id=h[18]),g&16&&(b.items=h[4]),!a&&g&1&&(a=!0,b.selected=h[0].displayFields,we(()=>a=!1)),r.$set(b)},i(h){u||(A(r.$$.fragment,h),u=!0)},o(h){P(r.$$.fragment,h),u=!1},d(h){h&&w(e),h&&w(o),H(r,h),f=!1,c()}}}function zT(n){let e,t,i,s,l,o,r;function a(f){n[11](f)}let u={id:n[18],items:n[5]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Cascade delete"),s=D(),q(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&262144&&(d.id=f[18]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,we(()=>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&&w(e),f&&w(s),H(l,f)}}}function BT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[HT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[qT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[VT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[zT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}});let b={};return h=new tu({props:b}),n[12](h),h.$on("save",n[13]),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(d.$$.fragment),m=D(),q(h.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-9"),p(c,"class","col-sm-3"),p(e,"class","grid")},m(y,k){S(y,e,k),_(e,t),j(i,t,null),_(e,s),_(e,l),j(o,l,null),_(e,r),_(e,a),j(u,a,null),_(e,f),_(e,c),j(d,c,null),S(y,m,k),j(h,y,k),g=!0},p(y,[k]){const T={};k&2&&(T.name="schema."+y[1]+".options.collectionId"),k&786445&&(T.$$scope={dirty:k,ctx:y}),i.$set(T);const C={};k&2&&(C.name="schema."+y[1]+".options.maxSelect"),k&786433&&(C.$$scope={dirty:k,ctx:y}),o.$set(C);const M={};k&2&&(M.name="schema."+y[1]+".options.displayFields"),k&786449&&(M.$$scope={dirty:k,ctx:y}),u.$set(M);const $={};k&2&&($.name="schema."+y[1]+".options.cascadeDelete"),k&786433&&($.$$scope={dirty:k,ctx:y}),d.$set($);const O={};h.$set(O)},i(y){g||(A(i.$$.fragment,y),A(o.$$.fLine truncated
(eg. 100x0) - resize to W width preserving the aspect ratio</li>`,p(e,"class","m-0")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function LT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M;function $(E){n[10](E)}let O={id:n[12],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(O.value=n[0].thumbs),r=new Ns({props:O}),ie.push(()=>ke(r,"value",$)),k=new xn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[PT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=D(),m=v("button"),h=v("span"),h.textContent="Supported formats",g=D(),b=v("i"),y=D(),V(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(c,"class","txt"),p(h,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(m,"type","button"),p(m,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(E,I){S(E,e,I),_(e,t),_(e,i),_(e,s),S(E,o,I),H(r,E,I),S(E,u,I),S(E,f,I),_(f,c),_(f,d),_(f,m),_(m,h),_(m,g),_(m,b),_(m,y),H(k,m,null),T=!0,C||(M=Pe(Ye.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),C=!0)},p(E,I){(!T||I&4096&&l!==(l=E[12]))&&p(e,"for",l);const L={};I&4096&&(L.id=E[12]),!a&&I&1&&(a=!0,L.value=E[0].thumbs,we(()=>a=!1)),r.$set(L);const N={};I&8192&&(N.$$scope={dirty:I,ctx:E}),k.$set(N)},i(E){T||(A(r.$$.fragment,E),A(k.$$.fragment,E),T=!0)},o(E){P(r.$$.fragment,E),P(k.$$.fragment,E),T=!1},d(E){E&&w(e),E&&w(o),q(r,E),E&&w(u),E&&w(f),q(k),C=!1,M()}}}function NT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[OT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[ET,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[IT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[LT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),V(u.$$.fragment),f=D(),c=v("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(h,g){S(h,e,g),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),_(e,a),H(u,a,null),_(e,f),_(e,c),H(d,c,null),m=!0},p(h,[g]){const b={};g&2&&(b.name="schema."+h[1]+".options.maxSize"),g&12289&&(b.$$scope={dirty:g,ctx:h}),i.$set(b);const y={};g&2&&(y.name="schema."+h[1]+".options.maxSelect"),g&12289&&(y.$$scope={dirty:g,ctx:h}),o.$set(y);const k={};g&2&&(k.name="schema."+h[1]+".options.mimeTypes"),g&12293&&(k.$$scope={dirty:g,ctx:h}),u.$set(k);const T={};g&2&&(T.name="schema."+h[1]+".options.thumbs"),g&12289&&(T.$$scope={dirty:g,ctx:h}),d.$set(T)},i(h){m||(A(i.$$.fragment,h),A(o.$$.fragment,h),A(u.$$.fragment,h),A(d.$$.fragment,h),m=!0)},o(h){P(i.$$.fragment,h),P(o.$$.fragment,h),P(u.$$.fragment,h),P(d.$$.fragment,h),m=!1},d(h){h&&w(e),q(i),q(o),q(u),q(d)}}}function FT(n,e,t){let{key:i=""}=e,{options:s={}}=e,l=DT.slice();function o(){if(B.isEmpty(s.mimeTypes))return;const g=[];for(const b of s.mimeTypes)l.find(y=>y.mimeType===b)||g.push({mimeType:b});g.length&&t(2,l=l.concat(g))}function r(){s.maxSize=ht(this.value),t(0,s)}function a(){s.maxSelect=ht(this.value),t(0,s)}function u(g){n.$$.not_equal(s.mimeTypes,g)&&(s.mimeTypes=g,t(0,s))}const f=()=>{t(0,s.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],s)},c=()=>{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)},d=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},m=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function h(g){n.$$.not_equal(s.thumbs,g)&&(s.thumbs=g,t(0,s))}return n.$$set=g=>{"key"in g&&t(1,i=g.key),"options"in g&&t(0,s=g.options)},n.$$.update=()=>{n.$$.dirty&1&&(B.isEmpty(s)?t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]}):o())},[s,i,l,r,a,u,f,c,d,m,h]}class RT extends ye{constructor(e){super(),ve(this,e,FT,NT,be,{key:1,options:0})}}function jT(n){let e,t,i,s,l;return{c(){e=v("hr"),t=D(),i=v("button"),i.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New collection</span>`,p(i,"type","button"),p(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[7]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function HT(n){let e,t,i,s,l,o,r;function a(f){n[8](f)}let u={searchable:n[2].length>5,selectPlaceholder:"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[2],$$slots:{afterOptions:[jT]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Collection"),s=D(),V(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&4&&(d.searchable=f[2].length>5),c&4&&(d.items=f[2]),c&524296&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,we(()=>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&&w(e),f&&w(s),q(l,f)}}}function qT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=D(),s=v("i"),o=D(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18]),p(r,"type","number"),p(r,"id",a=n[18]),p(r,"step","1"),p(r,"min","1")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[0].maxSelect),u||(f=[Pe(Ye.call(null,s,{text:"Leave empty for no limit.",position:"top"})),K(r,"input",n[9])],u=!0)},p(c,d){d&262144&&l!==(l=c[18])&&p(e,"for",l),d&262144&&a!==(a=c[18])&&p(r,"id",a),d&1&&ht(r.value)!==c[0].maxSelect&&de(r,c[0].maxSelect)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,Le(f)}}}function VT(n){let e,t,i,s,l,o,r,a,u,f,c;function d(h){n[10](h)}let m={multiple:!0,searchable:!0,id:n[18],selectPlaceholder:"Auto",items:n[4]};return n[0].displayFields!==void 0&&(m.selected=n[0].displayFields),r=new Qa({props:m}),ie.push(()=>ke(r,"selected",d)),{c(){e=v("label"),t=v("span"),t.textContent="Display fields",i=D(),s=v("i"),o=D(),V(r.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18])},m(h,g){S(h,e,g),_(e,t),_(e,i),_(e,s),S(h,o,g),H(r,h,g),u=!0,f||(c=Pe(Ye.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(h,g){(!u||g&262144&&l!==(l=h[18]))&&p(e,"for",l);const b={};g&262144&&(b.id=h[18]),g&16&&(b.items=h[4]),!a&&g&1&&(a=!0,b.selected=h[0].displayFields,we(()=>a=!1)),r.$set(b)},i(h){u||(A(r.$$.fragment,h),u=!0)},o(h){P(r.$$.fragment,h),u=!1},d(h){h&&w(e),h&&w(o),q(r,h),f=!1,c()}}}function zT(n){let e,t,i,s,l,o,r;function a(f){n[11](f)}let u={id:n[18],items:n[5]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Cascade delete"),s=D(),V(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&262144&&(d.id=f[18]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,we(()=>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&&w(e),f&&w(s),q(l,f)}}}function BT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[HT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[qT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[VT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[zT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}});let b={};return h=new tu({props:b}),n[12](h),h.$on("save",n[13]),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),V(u.$$.fragment),f=D(),c=v("div"),V(d.$$.fragment),m=D(),V(h.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-9"),p(c,"class","col-sm-3"),p(e,"class","grid")},m(y,k){S(y,e,k),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),_(e,a),H(u,a,null),_(e,f),_(e,c),H(d,c,null),S(y,m,k),H(h,y,k),g=!0},p(y,[k]){const T={};k&2&&(T.name="schema."+y[1]+".options.collectionId"),k&786445&&(T.$$scope={dirty:k,ctx:y}),i.$set(T);const C={};k&2&&(C.name="schema."+y[1]+".options.maxSelect"),k&786433&&(C.$$scope={dirty:k,ctx:y}),o.$set(C);const M={};k&2&&(M.name="schema."+y[1]+".options.displayFields"),k&786449&&(M.$$scope={dirty:k,ctx:y}),u.$set(M);const $={};k&2&&($.name="schema."+y[1]+".options.cascadeDelete"),k&786433&&($.$$scope={dirty:k,ctx:y}),d.$set($);const O={};h.$set(O)},i(y){g||(A(i.$$.fragment,y),A(o.$$.fLine truncated
(aka. not ${B.zeroDefaultStr(n[0])}).`,position:"right"}))],d=!0)},p(h,g){g[1]&4096&&t!==(t=h[43])&&p(e,"id",t),g[0]&1&&(e.checked=h[0].required),g[0]&1&&o!==(o=gs(h[0])+"")&&re(r,o),f&&zt(f.update)&&g[0]&1&&f.update.call(null,{text:`Requires the field value to be ${gs(h[0])}
(aka. not ${B.zeroDefaultStr(h[0])}).`,position:"right"}),g[1]&4096&&c!==(c=h[43])&&p(s,"for",c)},d(h){h&&w(e),h&&w(i),h&&w(s),d=!1,Le(m)}}}function Zc(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[oC,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&12288&&(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){H(e,i)}}}function oC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(s,"for",o=n[43])},m(u,f){S(u,e,f),e.checked=n[0].unique,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[31]),r=!0)},p(u,f){f[1]&4096&&t!==(t=u[43])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&4096&&o!==(o=u[43])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Gc(n){let e,t,i,s,l,o,r,a,u,f;a=new xn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[rC]},$$scope:{ctx:n}}});let c=n[8]&&Xc(n);return{c(){e=v("div"),t=v("div"),i=D(),s=v("div"),l=v("button"),o=v("i"),r=D(),q(a.$$.fragment),u=D(),c&&c.c(),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 txt-right")},m(d,m){S(d,e,m),_(e,t),_(e,i),_(e,s),_(s,l),_(l,o),_(l,r),j(a,l,null),_(s,u),c&&c.m(s,null),f=!0},p(d,m){const h={};m[1]&8192&&(h.$$scope={dirty:m,ctx:d}),a.$set(h),d[8]?c?c.p(d,m):(c=Xc(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i(d){f||(A(a.$$.fragment,d),f=!0)},o(d){P(a.$$.fragment,d),f=!1},d(d){d&&w(e),H(a),c&&c.d()}}}function rC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<span class="txt">Remove</span>',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function Xc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<span class="txt">Done</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",yn(n[3])),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function aC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$;s=new _e({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[YT,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:`
(aka. not ${B.zeroDefaultStr(h[0])}).`,position:"right"}),g[1]&4096&&c!==(c=h[43])&&p(s,"for",c)},d(h){h&&w(e),h&&w(i),h&&w(s),d=!1,Le(m)}}}function Zc(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[oC,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&12288&&(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){q(e,i)}}}function oC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(s,"for",o=n[43])},m(u,f){S(u,e,f),e.checked=n[0].unique,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[31]),r=!0)},p(u,f){f[1]&4096&&t!==(t=u[43])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&4096&&o!==(o=u[43])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Gc(n){let e,t,i,s,l,o,r,a,u,f;a=new xn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[rC]},$$scope:{ctx:n}}});let c=n[8]&&Xc(n);return{c(){e=v("div"),t=v("div"),i=D(),s=v("div"),l=v("button"),o=v("i"),r=D(),V(a.$$.fragment),u=D(),c&&c.c(),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 txt-right")},m(d,m){S(d,e,m),_(e,t),_(e,i),_(e,s),_(s,l),_(l,o),_(l,r),H(a,l,null),_(s,u),c&&c.m(s,null),f=!0},p(d,m){const h={};m[1]&8192&&(h.$$scope={dirty:m,ctx:d}),a.$set(h),d[8]?c?c.p(d,m):(c=Xc(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i(d){f||(A(a.$$.fragment,d),f=!0)},o(d){P(a.$$.fragment,d),f=!1},d(d){d&&w(e),q(a),c&&c.d()}}}function rC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<span class="txt">Remove</span>',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Xc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<span class="txt">Done</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",yn(n[3])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function aC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$;s=new _e({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[YT,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:`
form-field
required
`+(n[5]?"":"invalid")+`
`+(n[0].id&&n[0].system?"disabled":"")+`
`,name:"schema."+n[1]+".name",$$slots:{default:[KT,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});const O=[sC,iC,nC,tC,eC,QT,xT,XT,GT,ZT,JT],E=[];function I(F,U){return F[0].type==="text"?0:F[0].type==="number"?1:F[0].type==="bool"?2:F[0].type==="email"?3:F[0].type==="url"?4:F[0].type==="editor"?5:F[0].type==="date"?6:F[0].type==="select"?7:F[0].type==="json"?8:F[0].type==="file"?9:F[0].type==="relation"?10:-1}~(f=I(n))&&(c=E[f]=O[f](n)),h=new _e({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[lC,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&Zc(n),N=!n[0].toDelete&&Gc(n);return{c(){e=v("form"),t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),q(r.$$.fragment),a=D(),u=v("div"),c&&c.c(),d=D(),m=v("div"),q(h.$$.fragment),g=D(),b=v("div"),L&&L.c(),y=D(),N&&N.c(),k=D(),T=v("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(T,"type","submit"),p(T,"class","hidden"),p(T,"tabindex","-1"),p(e,"class","field-form")},m(F,U){S(F,e,U),_(e,t),_(t,i),j(s,i,null),_(t,l),_(t,o),j(r,o,null),_(t,a),_(t,u),~f&&E[f].m(u,null),_(t,d),_(t,m),j(h,m,null),_(t,g),_(t,b),L&&L.m(b,null),_(t,y),N&&N.m(t,null),_(e,k),_(e,T),C=!0,M||($=[K(e,"dragstart",cC),K(e,"submit",pt(n[32]))],M=!0)},p(F,U){const Z={};U[0]&1&&(Z.class="form-field required "+(F[0].id?"disabled":"")),U[0]&2&&(Z.name="schema."+F[1]+".type"),U[0]&1|U[1]&12288&&(Z.$$scope={dirty:U,ctx:F}),s.$set(Z);const ne={};U[0]&33&&(ne.class=`
`,name:"schema."+n[1]+".name",$$slots:{default:[KT,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});const O=[sC,iC,nC,tC,eC,QT,xT,XT,GT,ZT,JT],E=[];function I(F,U){return F[0].type==="text"?0:F[0].type==="number"?1:F[0].type==="bool"?2:F[0].type==="email"?3:F[0].type==="url"?4:F[0].type==="editor"?5:F[0].type==="date"?6:F[0].type==="select"?7:F[0].type==="json"?8:F[0].type==="file"?9:F[0].type==="relation"?10:-1}~(f=I(n))&&(c=E[f]=O[f](n)),h=new _e({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[lC,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&Zc(n),N=!n[0].toDelete&&Gc(n);return{c(){e=v("form"),t=v("div"),i=v("div"),V(s.$$.fragment),l=D(),o=v("div"),V(r.$$.fragment),a=D(),u=v("div"),c&&c.c(),d=D(),m=v("div"),V(h.$$.fragment),g=D(),b=v("div"),L&&L.c(),y=D(),N&&N.c(),k=D(),T=v("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(T,"type","submit"),p(T,"class","hidden"),p(T,"tabindex","-1"),p(e,"class","field-form")},m(F,U){S(F,e,U),_(e,t),_(t,i),H(s,i,null),_(t,l),_(t,o),H(r,o,null),_(t,a),_(t,u),~f&&E[f].m(u,null),_(t,d),_(t,m),H(h,m,null),_(t,g),_(t,b),L&&L.m(b,null),_(t,y),N&&N.m(t,null),_(e,k),_(e,T),C=!0,M||($=[K(e,"dragstart",cC),K(e,"submit",pt(n[32]))],M=!0)},p(F,U){const J={};U[0]&1&&(J.class="form-field required "+(F[0].id?"disabled":"")),U[0]&2&&(J.name="schema."+F[1]+".type"),U[0]&1|U[1]&12288&&(J.$$scope={dirty:U,ctx:F}),s.$set(J);const ne={};U[0]&33&&(ne.class=`
form-field
required
`+(F[5]?"":"invalid")+`
`+(F[0].id&&F[0].system?"disabled":"")+`
`),U[0]&2&&(ne.name="schema."+F[1]+".name"),U[0]&33|U[1]&12288&&(ne.$$scope={dirty:U,ctx:F}),r.$set(ne);let G=f;f=I(F),f===G?~f&&E[f].p(F,U):(c&&(pe(),P(E[G],1,1,()=>{E[G]=null}),me()),~f?(c=E[f],c?c.p(F,U):(c=E[f]=O[f](F),c.c()),A(c,1),c.m(u,null)):c=null);const J={};U[0]&1|U[1]&12288&&(J.$$scope={dirty:U,ctx:F}),h.$set(J),F[0].type!=="file"?L?(L.p(F,U),U[0]&1&&A(L,1)):(L=Zc(F),L.c(),A(L,1),L.m(b,null)):L&&(pe(),P(L,1,1,()=>{L=null}),me()),F[0].toDelete?N&&(pe(),P(N,1,1,()=>{N=null}),me()):N?(N.p(F,U),U[0]&1&&A(N,1)):(N=Gc(F),N.c(),A(N,1),N.m(t,null))},i(F){C||(A(s.$$.fragment,F),A(r.$$.fragment,F),A(c),A(h.$$.fragment,F),A(L),A(N),C=!0)},o(F){P(s.$$.fragment,F),P(r.$$.fragment,F),P(c),P(h.$$.fragment,F),P(L),P(N),C=!1},d(F){F&&w(e),H(s),H(r),~f&&E[f].d(),H(h),L&&L.d(),N&&N.d(),M=!1,Le($)}}}function xc(n){let e,t,i,s,l=n[0].system&&Qc(),o=!n[0].id&&ed(n),r=n[0].required&&td(n),a=n[0].unique&&nd();return{c(){e=v("div"),l&&l.c(),t=D(),o&&o.c(),i=D(),r&&r.c(),s=D(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){S(u,e,f),l&&l.m(e,null),_(e,t),o&&o.m(e,null),_(e,i),r&&r.m(e,null),_(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Qc(),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=ed(u),o.c(),o.m(e,i)),u[0].required?r?r.p(u,f):(r=td(u),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=nd(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Qc(n){let e;return{c(){e=v("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ed(n){let e;return{c(){e=v("span"),e.textContent="New",p(e,"class","label"),Q(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){S(t,e,i)},p(t,i){i[0]&257&&Q(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&w(e)}}}function td(n){let e,t=gs(n[0])+"",i;return{c(){e=v("span"),i=z(t),p(e,"class","label label-success")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=gs(s[0])+"")&&re(i,t)},d(s){s&&w(e)}}}function nd(n){let e;return{c(){e=v("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function id(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function sd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(s,l){S(s,e,l),t||(i=K(e,"click",yn(n[16])),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function uC(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,m,h,g,b,y=!n[0].toDelete&&xc(n),k=n[7]&&!n[0].system&&id(),T=n[0].toDelete&&sd(n);return{c(){e=v("div"),t=v("span"),i=v("i"),l=D(),o=v("strong"),a=z(r),f=D(),y&&y.c(),c=D(),d=v("div"),m=D(),k&&k.c(),h=D(),T&&T.c(),g=Ae(),p(i,"class",s=yi(B.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),Q(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(e,l),_(e,o),_(o,a),S(C,f,M),y&&y.m(C,M),S(C,c,M),S(C,d,M),S(C,m,M),k&&k.m(C,M),S(C,h,M),T&&T.m(C,M),S(C,g,M),b=!0},p(C,M){(!b||M[0]&1&&s!==(s=yi(B.getFieldTypeIcon(C[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!b||M[0]&1)&&r!==(r=(C[0].name||"-")+"")&&re(a,r),(!b||M[0]&1&&u!==(u=C[0].name))&&p(o,"title",u),(!b||M[0]&1)&&Q(o,"txt-strikethrough",C[0].toDelete),C[0].toDelete?y&&(y.d(1),y=null):y?y.p(C,M):(y=xc(C),y.c(),y.m(c.parentNode,c)),C[7]&&!C[0].system?k?M[0]&129&&A(k,1):(k=id(),k.c(),A(k,1),k.m(h.parentNode,h)):k&&(pe(),P(k,1,1,()=>{k=null}),me()),C[0].toDelete?T?T.p(C,M):(T=sd(C),T.c(),T.m(g.parentNode,g)):T&&(T.d(1),T=null)},i(C){b||(A(k),b=!0)},o(C){P(k),b=!1},d(C){C&&w(e),C&&w(f),y&&y.d(C),C&&w(c),C&&w(d),C&&w(m),k&&k.d(C),C&&w(h),T&&T.d(C),C&&w(g)}}}function fC(n){let e,t;const i=[{draggable:!0},{single:!0},{interactive:n[8]},{class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion"},n[11]];let s={$$slots:{header:[uC],default:[aC]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=Xe(s,i[l]);return e=new ys({props:s}),n[33](e),e.$on("expand",n[34]),e.$on("collapse",n[35]),e.$on("toggle",n[36]),e.$on("dragenter",n[37]),e.$on("dragleave",n[38]),e.$on("dragstart",n[39]),e.$on("drop",n[40]),{c(){q(e.$$.fragment)},m(l,o){j(e,l,o),t=!0},p(l,o){const r=o[0]&2309?sn(i,[i[0],i[1],o[0]&256&&{interactive:l[8]},o[0]&5&&{class:l[2]||l[0].toDelete||l[0].system?"field-accordion disabled":"field-accordion"},o[0]&2048&&Xn(l[11])]):{};o[0]&483|o[1]&8192&&(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[33](null),H(e,l)}}}function gs(n){switch(n==null?void 0:n.type){case"bool": Line truncated
`),U[0]&2&&(ne.name="schema."+F[1]+".name"),U[0]&33|U[1]&12288&&(ne.$$scope={dirty:U,ctx:F}),r.$set(ne);let Z=f;f=I(F),f===Z?~f&&E[f].p(F,U):(c&&(pe(),P(E[Z],1,1,()=>{E[Z]=null}),me()),~f?(c=E[f],c?c.p(F,U):(c=E[f]=O[f](F),c.c()),A(c,1),c.m(u,null)):c=null);const te={};U[0]&1|U[1]&12288&&(te.$$scope={dirty:U,ctx:F}),h.$set(te),F[0].type!=="file"?L?(L.p(F,U),U[0]&1&&A(L,1)):(L=Zc(F),L.c(),A(L,1),L.m(b,null)):L&&(pe(),P(L,1,1,()=>{L=null}),me()),F[0].toDelete?N&&(pe(),P(N,1,1,()=>{N=null}),me()):N?(N.p(F,U),U[0]&1&&A(N,1)):(N=Gc(F),N.c(),A(N,1),N.m(t,null))},i(F){C||(A(s.$$.fragment,F),A(r.$$.fragment,F),A(c),A(h.$$.fragment,F),A(L),A(N),C=!0)},o(F){P(s.$$.fragment,F),P(r.$$.fragment,F),P(c),P(h.$$.fragment,F),P(L),P(N),C=!1},d(F){F&&w(e),q(s),q(r),~f&&E[f].d(),q(h),L&&L.d(),N&&N.d(),M=!1,Le($)}}}function xc(n){let e,t,i,s,l=n[0].system&&Qc(),o=!n[0].id&&ed(n),r=n[0].required&&td(n),a=n[0].unique&&nd();return{c(){e=v("div"),l&&l.c(),t=D(),o&&o.c(),i=D(),r&&r.c(),s=D(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){S(u,e,f),l&&l.m(e,null),_(e,t),o&&o.m(e,null),_(e,i),r&&r.m(e,null),_(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Qc(),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=ed(u),o.c(),o.m(e,i)),u[0].required?r?r.p(u,f):(r=td(u),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=nd(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Qc(n){let e;return{c(){e=v("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ed(n){let e;return{c(){e=v("span"),e.textContent="New",p(e,"class","label"),x(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){S(t,e,i)},p(t,i){i[0]&257&&x(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&w(e)}}}function td(n){let e,t=gs(n[0])+"",i;return{c(){e=v("span"),i=z(t),p(e,"class","label label-success")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=gs(s[0])+"")&&re(i,t)},d(s){s&&w(e)}}}function nd(n){let e;return{c(){e=v("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function id(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function sd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(s,l){S(s,e,l),t||(i=K(e,"click",yn(n[16])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function uC(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,m,h,g,b,y=!n[0].toDelete&&xc(n),k=n[7]&&!n[0].system&&id(),T=n[0].toDelete&&sd(n);return{c(){e=v("div"),t=v("span"),i=v("i"),l=D(),o=v("strong"),a=z(r),f=D(),y&&y.c(),c=D(),d=v("div"),m=D(),k&&k.c(),h=D(),T&&T.c(),g=Ae(),p(i,"class",s=yi(B.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),x(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(e,l),_(e,o),_(o,a),S(C,f,M),y&&y.m(C,M),S(C,c,M),S(C,d,M),S(C,m,M),k&&k.m(C,M),S(C,h,M),T&&T.m(C,M),S(C,g,M),b=!0},p(C,M){(!b||M[0]&1&&s!==(s=yi(B.getFieldTypeIcon(C[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!b||M[0]&1)&&r!==(r=(C[0].name||"-")+"")&&re(a,r),(!b||M[0]&1&&u!==(u=C[0].name))&&p(o,"title",u),(!b||M[0]&1)&&x(o,"txt-strikethrough",C[0].toDelete),C[0].toDelete?y&&(y.d(1),y=null):y?y.p(C,M):(y=xc(C),y.c(),y.m(c.parentNode,c)),C[7]&&!C[0].system?k?M[0]&129&&A(k,1):(k=id(),k.c(),A(k,1),k.m(h.parentNode,h)):k&&(pe(),P(k,1,1,()=>{k=null}),me()),C[0].toDelete?T?T.p(C,M):(T=sd(C),T.c(),T.m(g.parentNode,g)):T&&(T.d(1),T=null)},i(C){b||(A(k),b=!0)},o(C){P(k),b=!1},d(C){C&&w(e),C&&w(f),y&&y.d(C),C&&w(c),C&&w(d),C&&w(m),k&&k.d(C),C&&w(h),T&&T.d(C),C&&w(g)}}}function fC(n){let e,t;const i=[{draggable:!0},{single:!0},{interactive:n[8]},{class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion"},n[11]];let s={$$slots:{header:[uC],default:[aC]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=Xe(s,i[l]);return e=new ys({props:s}),n[33](e),e.$on("expand",n[34]),e.$on("collapse",n[35]),e.$on("toggle",n[36]),e.$on("dragenter",n[37]),e.$on("dragleave",n[38]),e.$on("dragstart",n[39]),e.$on("drop",n[40]),{c(){V(e.$$.fragment)},m(l,o){H(e,l,o),t=!0},p(l,o){const r=o[0]&2309?sn(i,[i[0],i[1],o[0]&256&&{interactive:l[8]},o[0]&5&&{class:l[2]||l[0].toDelete||l[0].system?"field-accordion disabled":"field-accordion"},o[0]&2048&&Xn(l[11])]):{};o[0]&483|o[1]&8192&&(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[33](null),q(e,l)}}}function gs(n){switch(n==null?void 0:n.type){case"boo Line truncated
`),t=v("code"),t.textContent="username",i=z(` ,
`),s=v("code"),s.textContent="email",l=z(` ,
`),o=v("code"),o.textContent="emailVisibility",r=z(` ,
`),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),S(u,s,f),S(u,l,f),S(u,o,f),S(u,r,f),S(u,a,f)},d(u){u&&w(e),u&&w(t),u&&w(i),u&&w(s),u&&w(l),u&&w(o),u&&w(r),u&&w(a)}}}function rd(n,e){let t,i,s,l;function o(c){e[6](c,e[13],e[14],e[15])}function r(){return e[7](e[15])}function a(...c){return e[8](e[15],...c)}function u(...c){return e[9](e[15],...c)}let f={key:e[15],excludeNames:e[1].concat(e[4](e[13]))};return e[13]!==void 0&&(f.field=e[13]),i=new pC({props:f}),ie.push(()=>ke(i,"field",o)),i.$on("remove",r),i.$on("dragstart",a),i.$on("drop",u),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(c,d){S(c,t,d),j(i,c,d),l=!0},p(c,d){e=c;const m={};d&1&&(m.key=e[15]),d&3&&(m.excludeNames=e[1].concat(e[4](e[13]))),!s&&d&1&&(s=!0,m.field=e[13],we(()=>s=!1)),i.$set(m)},i(c){l||(A(i.$$.fragment,c),l=!0)},o(c){P(i.$$.fragment,c),l=!1},d(c){c&&w(t),H(i,c)}}}function mC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=[],h=new Map,g,b,y,k,T,C,M,$,O,E,I,L=n[0].isAuth&&od(),N=n[0].schema;const F=U=>U[13];for(let U=0;U<N.length;U+=1){let Z=ld(n,N,U),ne=F(Z);h.set(ne,m[U]=rd(ne,Z))}return{c(){e=v("div"),t=v("p"),i=z(`System fields:
`),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),S(u,s,f),S(u,l,f),S(u,o,f),S(u,r,f),S(u,a,f)},d(u){u&&w(e),u&&w(t),u&&w(i),u&&w(s),u&&w(l),u&&w(o),u&&w(r),u&&w(a)}}}function rd(n,e){let t,i,s,l;function o(c){e[6](c,e[13],e[14],e[15])}function r(){return e[7](e[15])}function a(...c){return e[8](e[15],...c)}function u(...c){return e[9](e[15],...c)}let f={key:e[15],excludeNames:e[1].concat(e[4](e[13]))};return e[13]!==void 0&&(f.field=e[13]),i=new pC({props:f}),ie.push(()=>ke(i,"field",o)),i.$on("remove",r),i.$on("dragstart",a),i.$on("drop",u),{key:n,first:null,c(){t=Ae(),V(i.$$.fragment),this.first=t},m(c,d){S(c,t,d),H(i,c,d),l=!0},p(c,d){e=c;const m={};d&1&&(m.key=e[15]),d&3&&(m.excludeNames=e[1].concat(e[4](e[13]))),!s&&d&1&&(s=!0,m.field=e[13],we(()=>s=!1)),i.$set(m)},i(c){l||(A(i.$$.fragment,c),l=!0)},o(c){P(i.$$.fragment,c),l=!1},d(c){c&&w(t),q(i,c)}}}function mC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=[],h=new Map,g,b,y,k,T,C,M,$,O,E,I,L=n[0].isAuth&&od(),N=n[0].schema;const F=U=>U[13];for(let U=0;U<N.length;U+=1){let J=ld(n,N,U),ne=F(J);h.set(ne,m[U]=rd(ne,J))}return{c(){e=v("div"),t=v("p"),i=z(`System fields:
`),s=v("code"),s.textContent="id",l=z(` ,
`),o=v("code"),o.textContent="created",r=z(` ,
`),a=v("code"),a.textContent="updated",u=D(),L&&L.c(),f=z(`
.`),c=D(),d=v("div");for(let U=0;U<m.length;U+=1)m[U].c();g=D(),b=v("div"),y=D(),k=v("button"),T=v("i"),C=D(),M=v("span"),M.textContent="New field",p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm"),p(t,"class","txt-sm"),p(e,"class","block m-b-25"),p(d,"class","accordions"),p(b,"class","clearfix m-t-xs"),p(T,"class","ri-add-line"),p(M,"class","txt"),p(k,"type","button"),p(k,"class",$="btn btn-block "+(n[0].schema.length?"btn-transparent":"btn-secondary"))},m(U,Z){S(U,e,Z),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),L&&L.m(t,null),_(t,f),S(U,c,Z),S(U,d,Z);for(let ne=0;ne<m.length;ne+=1)m[ne].m(d,null);S(U,g,Z),S(U,b,Z),S(U,y,Z),S(U,k,Z),_(k,T),_(k,C),_(k,M),O=!0,E||(I=K(k,"click",n[3]),E=!0)},p(U,[Z]){U[0].isAuth?L||(L=od(),L.c(),L.m(t,f)):L&&(L.d(1),L=null),Z&55&&(N=U[0].schema,pe(),m=wt(m,Z,F,1,U,N,h,d,tn,rd,null,ld),me()),(!O||Z&1&&$!==($="btn btn-block "+(U[0].schema.length?"btn-transparent":"btn-secondary")))&&p(k,"class",$)},i(U){if(!O){for(let Z=0;Z<N.length;Z+=1)A(m[Z]);O=!0}},o(U){for(let Z=0;Z<m.length;Z+=1)P(m[Z]);O=!1},d(U){U&&w(e),L&&L.d(),U&&w(c),U&&w(d);for(let Z=0;Z<m.length;Z+=1)m[Z].d();U&&w(g),U&&w(b),U&&w(y),U&&w(k),E=!1,I()}}}function hC(n,e){n&&(n.dataTransfer.effectAllowed="move",n.dataTransfer.dropEffect="move",n.dataTransfer.setData("text/plain",e))}function gC(n,e,t){let{collection:i=new bn}=e;const s=["id","created","updated","collectionId","collectionName","expand","true","false","null"];let l=[];function o(b){i.schema[b]&&(i.schema.splice(b,1),t(0,i))}function r(){const b=new dn({name:a()});b.onMountExpand=!0,i.schema.push(b),t(0,i)}function a(b="field"){let y="";for(;u(b+y);)++y;return b+y}function u(b){return!!i.schema.find(y=>y.name===b)}function f(b){let y=[];if(b.toDelete)return y;for(let k of i.schema)k===b||k.toDelete||y.push(k.name);return y}function c(b,y){if(!b)return;b.dataTransfer.dropEffect="move";const k=parseInt(b.dataTransfer.getData("text/plain")),T=i.schema;k<y?(T.splice(y+1,0,T[k]),T.splice(k,1)):(T.splice(y,0,T[k]),T.splice(k+1,1)),t(0,i.schema=T,i)}function d(b,y,k,T){k[T]=b,t(0,i)}const m=b=>o(b),h=(b,y)=>hC(y==null?void 0:y.detail,b),g=(b,y)=>c(y==null?void 0:y.detail,b);return n.$$set=b=>{"collection"in b&&t(0,i=b.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof i.schema>"u"&&(t(0,i=i||new bn),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,m,h,g]}class _C extends ye{constructor(e){super(),ve(this,e,gC,mC,be,{collection:0})}}const bC=n=>({isAdminOnly:n&256}),ad=n=>({isAdminOnly:n[8]});function vC(n){let e,t;return e=new _e({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[8]?"disabled":""),name:n[3],$$slots:{default:[$C,({uniqueId:i})=>({17:i}),({uniqueId:i})=>i?131072:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&272&&(l.class="form-field rule-field m-0 "+(i[4]?"requied":"")+" "+(i[8]?"disabled":"")),s&8&&(l.name=i[3]),s&147815&&(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){H(e,i)}}}function yC(n){let e;return{c(){e=v("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function kC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=`<i class="ri-lock-line"></i>
<span class="txt">Set Admins only</span>`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1walzui")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[10]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function wC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=`<i class="ri-lock-unlock-line"></i>
<span class="txt">Set custom rule</span>`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-success lock-toggle svelte-1walzui")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function SC(n){let e;return{c(){e=z("Leave empty to grant everyone access.")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function TC(n){let e,t,i,s,l;return{c(){e=z(`Only admins will be able to perform this action (
.`),c=D(),d=v("div");for(let U=0;U<m.length;U+=1)m[U].c();g=D(),b=v("div"),y=D(),k=v("button"),T=v("i"),C=D(),M=v("span"),M.textContent="New field",p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm"),p(t,"class","txt-sm"),p(e,"class","block m-b-25"),p(d,"class","accordions"),p(b,"class","clearfix m-t-xs"),p(T,"class","ri-add-line"),p(M,"class","txt"),p(k,"type","button"),p(k,"class",$="btn btn-block "+(n[0].schema.length?"btn-transparent":"btn-secondary"))},m(U,J){S(U,e,J),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),L&&L.m(t,null),_(t,f),S(U,c,J),S(U,d,J);for(let ne=0;ne<m.length;ne+=1)m[ne].m(d,null);S(U,g,J),S(U,b,J),S(U,y,J),S(U,k,J),_(k,T),_(k,C),_(k,M),O=!0,E||(I=K(k,"click",n[3]),E=!0)},p(U,[J]){U[0].isAuth?L||(L=od(),L.c(),L.m(t,f)):L&&(L.d(1),L=null),J&55&&(N=U[0].schema,pe(),m=wt(m,J,F,1,U,N,h,d,tn,rd,null,ld),me()),(!O||J&1&&$!==($="btn btn-block "+(U[0].schema.length?"btn-transparent":"btn-secondary")))&&p(k,"class",$)},i(U){if(!O){for(let J=0;J<N.length;J+=1)A(m[J]);O=!0}},o(U){for(let J=0;J<m.length;J+=1)P(m[J]);O=!1},d(U){U&&w(e),L&&L.d(),U&&w(c),U&&w(d);for(let J=0;J<m.length;J+=1)m[J].d();U&&w(g),U&&w(b),U&&w(y),U&&w(k),E=!1,I()}}}function hC(n,e){n&&(n.dataTransfer.effectAllowed="move",n.dataTransfer.dropEffect="move",n.dataTransfer.setData("text/plain",e))}function gC(n,e,t){let{collection:i=new bn}=e;const s=["id","created","updated","collectionId","collectionName","expand","true","false","null"];let l=[];function o(b){i.schema[b]&&(i.schema.splice(b,1),t(0,i))}function r(){const b=new dn({name:a()});b.onMountExpand=!0,i.schema.push(b),t(0,i)}function a(b="field"){let y="";for(;u(b+y);)++y;return b+y}function u(b){return!!i.schema.find(y=>y.name===b)}function f(b){let y=[];if(b.toDelete)return y;for(let k of i.schema)k===b||k.toDelete||y.push(k.name);return y}function c(b,y){if(!b)return;b.dataTransfer.dropEffect="move";const k=parseInt(b.dataTransfer.getData("text/plain")),T=i.schema;k<y?(T.splice(y+1,0,T[k]),T.splice(k,1)):(T.splice(y,0,T[k]),T.splice(k+1,1)),t(0,i.schema=T,i)}function d(b,y,k,T){k[T]=b,t(0,i)}const m=b=>o(b),h=(b,y)=>hC(y==null?void 0:y.detail,b),g=(b,y)=>c(y==null?void 0:y.detail,b);return n.$$set=b=>{"collection"in b&&t(0,i=b.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof i.schema>"u"&&(t(0,i=i||new bn),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,m,h,g]}class _C extends ye{constructor(e){super(),ve(this,e,gC,mC,be,{collection:0})}}const bC=n=>({isAdminOnly:n&256}),ad=n=>({isAdminOnly:n[8]});function vC(n){let e,t;return e=new _e({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[8]?"disabled":""),name:n[3],$$slots:{default:[$C,({uniqueId:i})=>({17:i}),({uniqueId:i})=>i?131072:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&272&&(l.class="form-field rule-field m-0 "+(i[4]?"requied":"")+" "+(i[8]?"disabled":"")),s&8&&(l.name=i[3]),s&147815&&(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){q(e,i)}}}function yC(n){let e;return{c(){e=v("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function kC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=`<i class="ri-lock-line"></i>
<span class="txt">Set Admins only</span>`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1walzui")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[10]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function wC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=`<i class="ri-lock-unlock-line"></i>
<span class="txt">Set custom rule</span>`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-success lock-toggle svelte-1walzui")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function SC(n){let e;return{c(){e=z("Leave empty to grant everyone access.")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function TC(n){let e,t,i,s,l;return{c(){e=z(`Only admins will be able to perform this action (
`),t=v("button"),t.textContent="unlock to change",i=z(`
).`),p(t,"type","button"),p(t,"class","link-hint")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(t,"click",n[9]),s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function CC(n){let e;function t(l,o){return l[8]?TC:SC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function $C(n){let e,t,i,s,l=n[8]?"Admins only":"Custom rule",o,r,a,u,f,c,d,m,h;function g(E,I){return E[8]?wC:kC}let b=g(n),y=b(n);function k(E){n[13](E)}var T=n[6];function C(E){let I={id:E[17],baseCollection:E[1],disabled:E[8]};return E[0]!==void 0&&(I.value=E[0]),{props:I}}T&&(f=Kt(T,C(n)),n[12](f),ie.push(()=>ke(f,"value",k)));const M=n[11].default,$=Ft(M,n,n[14],ad),O=$||CC(n);return{c(){e=v("label"),t=v("span"),i=z(n[2]),s=z(" - "),o=z(l),r=D(),y.c(),u=D(),f&&q(f.$$.fragment),d=D(),m=v("div"),O&&O.c(),p(t,"class","txt"),p(e,"for",a=n[17]),p(m,"class","help-block")},m(E,I){S(E,e,I),_(e,t),_(t,i),_(t,s),_(t,o),_(e,r),y.m(e,null),S(E,u,I),f&&j(f,E,I),S(E,d,I),S(E,m,I),O&&O.m(m,null),h=!0},p(E,I){(!h||I&4)&&re(i,E[2]),(!h||I&256)&&l!==(l=E[8]?"Admins only":"Custom rule")&&re(o,l),b===(b=g(E))&&y?y.p(E,I):(y.d(1),y=b(E),y&&(y.c(),y.m(e,null))),(!h||I&131072&&a!==(a=E[17]))&&p(e,"for",a);const L={};if(I&131072&&(L.id=E[17]),I&2&&(L.baseCollection=E[1]),I&256&&(L.disabled=E[8]),!c&&I&1&&(c=!0,L.value=E[0],we(()=>c=!1)),T!==(T=E[6])){if(f){pe();const N=f;P(N.$$.fragment,1,0,()=>{H(N,1)}),me()}T?(f=Kt(T,C(E)),E[12](f),ie.push(()=>ke(f,"value",k)),q(f.$$.fragment),A(f.$$.fragment,1),j(f,d.parentNode,d)):f=null}else T&&f.$set(L);$?$.p&&(!h||I&16640)&&jt($,M,E,E[14],h?Rt(M,E[14],I,bC):Ht(E[14]),ad):O&&O.p&&(!h||I&256)&&O.p(E,h?I:-1)},i(E){h||(f&&A(f.$$.fragment,E),A(O,E),h=!0)},o(E){f&&P(f.$$.fragment,E),P(O,E),h=!1},d(E){E&&w(e),y.d(),E&&w(u),n[12](null),f&&H(f,E),E&&w(d),E&&w(m),O&&O.d(E)}}}function MC(n){let e,t,i,s;const l=[yC,vC],o=[];function r(a,u){return a[7]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(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}),me(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let ud;function DC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,m=ud,h=!1;g();async function g(){m||h||(t(7,h=!0),t(6,m=(await ft(()=>import("./FilterAutocompleteInput-f06ea6a0.js"),["./FilterAutocompleteInput-f06ea6a0.js","./index-0935db40.js"],import.meta.url)).default),ud=m,t(7,h=!1))}async function b(){t(0,r=d||""),await cn(),c==null||c.focus()}async function y(){d=r,t(0,r=null)}function k(C){ie[C?"unshift":"push"](()=>{c=C,t(5,c)})}function T(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(14,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(8,i=r===null)},[r,o,a,u,f,c,m,h,i,b,y,s,k,T,l]}class hs extends ye{constructor(e){super(),ve(this,e,DC,MC,be,{collection:1,rule:0,label:2,formKey:3,required:4})}}function fd(n,e,t){const i=n.slice();return i[9]=e[t],i}function cd(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I,L,N,F,U,Z,ne=n[0].schema,G=[];for(let J=0;J<ne.length;J+=1)G[J]=dd(fd(n,ne,J));return{c(){e=v("div"),t=v("div"),i=v("div"),s=v("p"),s.textContent="The following record fields are available:",l=D(),o=v("div"),r=v("code"),r.textContent="id",a=D(),u=v("code"),u.textContent="created",f=D(),c=v("code"),c.textContent="updated",d=D();for(let J=0;J<G.length;J+=1)G[J].c();m=D(),h=v("hr"),g=D(),b=v("p"),b.innerHTML="The request fields could be accessed with the special <em>@request</em> filter:",y=D(),k=v("div"),k.innerHTML=`<code>@request.method</code>
).`),p(t,"type","button"),p(t,"class","link-hint")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(t,"click",n[9]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function CC(n){let e;function t(l,o){return l[8]?TC:SC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function $C(n){let e,t,i,s,l=n[8]?"Admins only":"Custom rule",o,r,a,u,f,c,d,m,h;function g(E,I){return E[8]?wC:kC}let b=g(n),y=b(n);function k(E){n[13](E)}var T=n[6];function C(E){let I={id:E[17],baseCollection:E[1],disabled:E[8]};return E[0]!==void 0&&(I.value=E[0]),{props:I}}T&&(f=Kt(T,C(n)),n[12](f),ie.push(()=>ke(f,"value",k)));const M=n[11].default,$=Ft(M,n,n[14],ad),O=$||CC(n);return{c(){e=v("label"),t=v("span"),i=z(n[2]),s=z(" - "),o=z(l),r=D(),y.c(),u=D(),f&&V(f.$$.fragment),d=D(),m=v("div"),O&&O.c(),p(t,"class","txt"),p(e,"for",a=n[17]),p(m,"class","help-block")},m(E,I){S(E,e,I),_(e,t),_(t,i),_(t,s),_(t,o),_(e,r),y.m(e,null),S(E,u,I),f&&H(f,E,I),S(E,d,I),S(E,m,I),O&&O.m(m,null),h=!0},p(E,I){(!h||I&4)&&re(i,E[2]),(!h||I&256)&&l!==(l=E[8]?"Admins only":"Custom rule")&&re(o,l),b===(b=g(E))&&y?y.p(E,I):(y.d(1),y=b(E),y&&(y.c(),y.m(e,null))),(!h||I&131072&&a!==(a=E[17]))&&p(e,"for",a);const L={};if(I&131072&&(L.id=E[17]),I&2&&(L.baseCollection=E[1]),I&256&&(L.disabled=E[8]),!c&&I&1&&(c=!0,L.value=E[0],we(()=>c=!1)),T!==(T=E[6])){if(f){pe();const N=f;P(N.$$.fragment,1,0,()=>{q(N,1)}),me()}T?(f=Kt(T,C(E)),E[12](f),ie.push(()=>ke(f,"value",k)),V(f.$$.fragment),A(f.$$.fragment,1),H(f,d.parentNode,d)):f=null}else T&&f.$set(L);$?$.p&&(!h||I&16640)&&jt($,M,E,E[14],h?Rt(M,E[14],I,bC):Ht(E[14]),ad):O&&O.p&&(!h||I&256)&&O.p(E,h?I:-1)},i(E){h||(f&&A(f.$$.fragment,E),A(O,E),h=!0)},o(E){f&&P(f.$$.fragment,E),P(O,E),h=!1},d(E){E&&w(e),y.d(),E&&w(u),n[12](null),f&&q(f,E),E&&w(d),E&&w(m),O&&O.d(E)}}}function MC(n){let e,t,i,s;const l=[yC,vC],o=[];function r(a,u){return a[7]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(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}),me(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let ud;function DC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,m=ud,h=!1;g();async function g(){m||h||(t(7,h=!0),t(6,m=(await ft(()=>import("./FilterAutocompleteInput-1e7de362.js"),["./FilterAutocompleteInput-1e7de362.js","./index-0935db40.js"],import.meta.url)).default),ud=m,t(7,h=!1))}async function b(){t(0,r=d||""),await cn(),c==null||c.focus()}async function y(){d=r,t(0,r=null)}function k(C){ie[C?"unshift":"push"](()=>{c=C,t(5,c)})}function T(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(14,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(8,i=r===null)},[r,o,a,u,f,c,m,h,i,b,y,s,k,T,l]}class hs extends ye{constructor(e){super(),ve(this,e,DC,MC,be,{collection:1,rule:0,label:2,formKey:3,required:4})}}function fd(n,e,t){const i=n.slice();return i[9]=e[t],i}function cd(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I,L,N,F,U,J,ne=n[0].schema,Z=[];for(let te=0;te<ne.length;te+=1)Z[te]=dd(fd(n,ne,te));return{c(){e=v("div"),t=v("div"),i=v("div"),s=v("p"),s.textContent="The following record fields are available:",l=D(),o=v("div"),r=v("code"),r.textContent="id",a=D(),u=v("code"),u.textContent="created",f=D(),c=v("code"),c.textContent="updated",d=D();for(let te=0;te<Z.length;te+=1)Z[te].c();m=D(),h=v("hr"),g=D(),b=v("p"),b.innerHTML="The request fields could be accessed with the special <em>@request</em> filter:",y=D(),k=v("div"),k.innerHTML=`<code>@request.method</code>
<code>@request.query.*</code>
<code>@request.data.*</code>
<code>@request.auth.*</code>`,T=D(),C=v("hr"),M=D(),$=v("p"),$.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",O=D(),E=v("div"),E.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",I=D(),L=v("hr"),N=D(),F=v("p"),F.innerHTML=`Example rule:
<br/>
<code>@request.auth.id != &quot;&quot; &amp;&amp; created &gt; &quot;2022-01-01 00:00:00&quot;</code>`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(h,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(k,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p($,"class","m-b-0"),p(E,"class","inline-flex flex-gap-5"),p(L,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(J,te){S(J,e,te),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,r),_(o,a),_(o,u),_(o,f),_(o,c),_(o,d);for(let V=0;V<G.length;V+=1)G[V].m(o,null);_(i,m),_(i,h),_(i,g),_(i,b),_(i,y),_(i,k),_(i,T),_(i,C),_(i,M),_(i,$),_(i,O),_(i,E),_(i,I),_(i,L),_(i,N),_(i,F),Z=!0},p(J,te){if(te&1){ne=J[0].schema;let V;for(V=0;V<ne.length;V+=1){const x=fd(J,ne,V);G[V]?G[V].p(x,te):(G[V]=dd(x),G[V].c(),G[V].m(o,null))}for(;V<G.length;V+=1)G[V].d(1);G.length=ne.length}},i(J){Z||(J&&nt(()=>{U||(U=ze(e,It,{duration:150},!0)),U.run(1)}),Z=!0)},o(J){J&&(U||(U=ze(e,It,{duration:150},!1)),U.run(0)),Z=!1},d(J){J&&w(e),bt(G,J),J&&U&&U.end()}}}function OC(n){let e,t=n[9].name+"",i;return{c(){e=v("code"),i=z(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&1&&t!==(t=s[9].name+"")&&re(i,t)},d(s){s&&w(e)}}}function EC(n){let e,t=n[9].name+"",i,s;return{c(){e=v("code"),i=z(t),s=z(".*")},m(l,o){S(l,e,o),_(e,i),_(e,s)},p(l,o){o&1&&t!==(t=l[9].name+"")&&re(i,t)},d(l){l&&w(e)}}}function dd(n){let e;function t(l,o){return l[9].type==="relation"||l[9].type==="user"?EC:OC}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(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&&w(e)}}}function pd(n){let e,t,i,s,l;function o(a){n[8](a)}let r={label:"Manage action",formKey:"options.manageRule",collection:n[0],$$slots:{default:[AC]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(r.rule=n[0].options.manageRule),i=new hs({props:r}),ie.push(()=>ke(i,"rule",o)),{c(){e=v("hr"),t=D(),q(i.$$.fragment),p(e,"class","m-t-sm m-b-sm")},m(a,u){S(a,e,u),S(a,t,u),j(i,a,u),l=!0},p(a,u){const f={};u&1&&(f.collection=a[0]),u&4096&&(f.$$scope={dirty:u,ctx:a}),!s&&u&1&&(s=!0,f.rule=a[0].options.manageRule,we(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(e),a&&w(t),H(i,a)}}}function AC(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg.
<code>@request.auth.id != &quot;&quot; &amp;&amp; created &gt; &quot;2022-01-01 00:00:00&quot;</code>`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(h,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(k,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p($,"class","m-b-0"),p(E,"class","inline-flex flex-gap-5"),p(L,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(te,ee){S(te,e,ee),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,r),_(o,a),_(o,u),_(o,f),_(o,c),_(o,d);for(let R=0;R<Z.length;R+=1)Z[R].m(o,null);_(i,m),_(i,h),_(i,g),_(i,b),_(i,y),_(i,k),_(i,T),_(i,C),_(i,M),_(i,$),_(i,O),_(i,E),_(i,I),_(i,L),_(i,N),_(i,F),J=!0},p(te,ee){if(ee&1){ne=te[0].schema;let R;for(R=0;R<ne.length;R+=1){const X=fd(te,ne,R);Z[R]?Z[R].p(X,ee):(Z[R]=dd(X),Z[R].c(),Z[R].m(o,null))}for(;R<Z.length;R+=1)Z[R].d(1);Z.length=ne.length}},i(te){J||(te&&nt(()=>{U||(U=ze(e,It,{duration:150},!0)),U.run(1)}),J=!0)},o(te){te&&(U||(U=ze(e,It,{duration:150},!1)),U.run(0)),J=!1},d(te){te&&w(e),bt(Z,te),te&&U&&U.end()}}}function OC(n){let e,t=n[9].name+"",i;return{c(){e=v("code"),i=z(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&1&&t!==(t=s[9].name+"")&&re(i,t)},d(s){s&&w(e)}}}function EC(n){let e,t=n[9].name+"",i,s;return{c(){e=v("code"),i=z(t),s=z(".*")},m(l,o){S(l,e,o),_(e,i),_(e,s)},p(l,o){o&1&&t!==(t=l[9].name+"")&&re(i,t)},d(l){l&&w(e)}}}function dd(n){let e;function t(l,o){return l[9].type==="relation"||l[9].type==="user"?EC:OC}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(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&&w(e)}}}function pd(n){let e,t,i,s,l;function o(a){n[8](a)}let r={label:"Manage action",formKey:"options.manageRule",collection:n[0],$$slots:{default:[AC]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(r.rule=n[0].options.manageRule),i=new hs({props:r}),ie.push(()=>ke(i,"rule",o)),{c(){e=v("hr"),t=D(),V(i.$$.fragment),p(e,"class","m-t-sm m-b-sm")},m(a,u){S(a,e,u),S(a,t,u),H(i,a,u),l=!0},p(a,u){const f={};u&1&&(f.collection=a[0]),u&4096&&(f.$$scope={dirty:u,ctx:a}),!s&&u&1&&(s=!0,f.rule=a[0].options.manageRule,we(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(e),a&&w(t),q(i,a)}}}function AC(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg.
changing the password without requiring to enter the old one, directly updating the verified
state or email, etc.`,t=D(),i=v("p"),i.innerHTML="This rule is executed in addition to the <code>create</code> and <code>update</code> API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:X,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function IC(n){var ae;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I,L,N,F,U,Z,ne,G,J,te,V,x,Y=n[1]&&cd(n);function se(oe){n[3](oe)}let He={label:"List/Search action",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(He.rule=n[0].listRule),f=new hs({props:He}),ie.push(()=>ke(f,"rule",se));function Re(oe){n[4](oe)}let Fe={label:"View action",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(Fe.rule=n[0].viewRule),g=new hs({props:Fe}),ie.push(()=>ke(g,"rule",Re));function qe(oe){n[5](oe)}let ge={label:"Create action",formKey:"createRule",collection:n[0]};n[0].createRule!==void 0&&(ge.rule=n[0].createRule),C=new hs({props:ge}),ie.push(()=>ke(C,"rule",qe));function Se(oe){n[6](oe)}let Ue={label:"Update action",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(Ue.rule=n[0].updateRule),I=new hs({props:Ue}),ie.push(()=>ke(I,"rule",Se));function lt(oe){n[7](oe)}let ue={label:"Delete action",formKey:"deleteRule",collection:n[0]};n[0].deleteRule!==void 0&&(ue.rule=n[0].deleteRule),Z=new hs({props:ue}),ie.push(()=>ke(Z,"rule",lt));let fe=((ae=n[0])==null?void 0:ae.isAuth)&&pd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the
state or email, etc.`,t=D(),i=v("p"),i.innerHTML="This rule is executed in addition to the <code>create</code> and <code>update</code> API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:G,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function IC(n){var ae;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I,L,N,F,U,J,ne,Z,te,ee,R,X,Y=n[1]&&cd(n);function se(oe){n[3](oe)}let He={label:"List/Search action",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(He.rule=n[0].listRule),f=new hs({props:He}),ie.push(()=>ke(f,"rule",se));function Re(oe){n[4](oe)}let Fe={label:"View action",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(Fe.rule=n[0].viewRule),g=new hs({props:Fe}),ie.push(()=>ke(g,"rule",Re));function qe(oe){n[5](oe)}let ge={label:"Create action",formKey:"createRule",collection:n[0]};n[0].createRule!==void 0&&(ge.rule=n[0].createRule),C=new hs({props:ge}),ie.push(()=>ke(C,"rule",qe));function Se(oe){n[6](oe)}let Ue={label:"Update action",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(Ue.rule=n[0].updateRule),I=new hs({props:Ue}),ie.push(()=>ke(I,"rule",Se));function lt(oe){n[7](oe)}let ue={label:"Delete action",formKey:"deleteRule",collection:n[0]};n[0].deleteRule!==void 0&&(ue.rule=n[0].deleteRule),J=new hs({props:ue}),ie.push(()=>ke(J,"rule",lt));let fe=((ae=n[0])==null?void 0:ae.isAuth)&&pd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the
<a href="https://pocketbase.io/docs/api-rules-and-filters/" target="_blank" rel="noopener noreferrer">PocketBase filter syntax and operators
</a>.`,s=D(),l=v("button"),r=z(o),a=D(),Y&&Y.c(),u=D(),q(f.$$.fragment),d=D(),m=v("hr"),h=D(),q(g.$$.fragment),y=D(),k=v("hr"),T=D(),q(C.$$.fragment),$=D(),O=v("hr"),E=D(),q(I.$$.fragment),N=D(),F=v("hr"),U=D(),q(Z.$$.fragment),G=D(),fe&&fe.c(),J=Ae(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-base"),p(m,"class","m-t-sm m-b-sm"),p(k,"class","m-t-sm m-b-sm"),p(O,"class","m-t-sm m-b-sm"),p(F,"class","m-t-sm m-b-sm")},m(oe,je){S(oe,e,je),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),Y&&Y.m(e,null),S(oe,u,je),j(f,oe,je),S(oe,d,je),S(oe,m,je),S(oe,h,je),j(g,oe,je),S(oe,y,je),S(oe,k,je),S(oe,T,je),j(C,oe,je),S(oe,$,je),S(oe,O,je),S(oe,E,je),j(I,oe,je),S(oe,N,je),S(oe,F,je),S(oe,U,je),j(Z,oe,je),S(oe,G,je),fe&&fe.m(oe,je),S(oe,J,je),te=!0,V||(x=K(l,"click",n[2]),V=!0)},p(oe,[je]){var it;(!te||je&2)&&o!==(o=oe[1]?"Hide available fields":"Show available fields")&&re(r,o),oe[1]?Y?(Y.p(oe,je),je&2&&A(Y,1)):(Y=cd(oe),Y.c(),A(Y,1),Y.m(e,null)):Y&&(pe(),P(Y,1,1,()=>{Y=null}),me());const Me={};je&1&&(Me.collection=oe[0]),!c&&je&1&&(c=!0,Me.rule=oe[0].listRule,we(()=>c=!1)),f.$set(Me);const Te={};je&1&&(Te.collection=oe[0]),!b&&je&1&&(b=!0,Te.rule=oe[0].viewRule,we(()=>b=!1)),g.$set(Te);const ce={};je&1&&(ce.collection=oe[0]),!M&&je&1&&(M=!0,ce.rule=oe[0].createRule,we(()=>M=!1)),C.$set(ce);const $e={};je&1&&($e.collection=oe[0]),!L&&je&1&&(L=!0,$e.rule=oe[0].updateRule,we(()=>L=!1)),I.$set($e);const Ze={};je&1&&(Ze.collection=oe[0]),!ne&&je&1&&(ne=!0,Ze.rule=oe[0].deleteRule,we(()=>ne=!1)),Z.$set(Ze),(it=oe[0])!=null&&it.isAuth?fe?(fe.p(oe,je),je&1&&A(fe,1)):(fe=pd(oe),fe.c(),A(fe,1),fe.m(J.parentNode,J)):fe&&(pe(),P(fe,1,1,()=>{fe=null}),me())},i(oe){te||(A(Y),A(f.$$.fragment,oe),A(g.$$.fragment,oe),A(C.$$.fragment,oe),A(I.$$.fragment,oe),A(Z.$$.fragment,oe),A(fe),te=!0)},o(oe){P(Y),P(f.$$.fragment,oe),P(g.$$.fragment,oe),P(C.$$.fragment,oe),P(I.$$.fragment,oe),P(Z.$$.fragment,oe),P(fe),te=!1},d(oe){oe&&w(e),Y&&Y.d(),oe&&w(u),H(f,oe),oe&&w(d),oe&&w(m),oe&&w(h),H(g,oe),oe&&w(y),oe&&w(k),oe&&w(T),H(C,oe),oe&&w($),oe&&w(O),oe&&w(E),H(I,oe),oe&&w(N),oe&&w(F),oe&&w(U),H(Z,oe),oe&&w(G),fe&&fe.d(oe),oe&&w(J),V=!1,x()}}}function PC(n,e,t){let{collection:i=new bn}=e,s=!1;const l=()=>t(1,s=!s);function o(d){n.$$.not_equal(i.listRule,d)&&(i.listRule=d,t(0,i))}function r(d){n.$$.not_equal(i.viewRule,d)&&(i.viewRule=d,t(0,i))}function a(d){n.$$.not_equal(i.createRule,d)&&(i.createRule=d,t(0,i))}function u(d){n.$$.not_equal(i.updateRule,d)&&(i.updateRule=d,t(0,i))}function f(d){n.$$.not_equal(i.deleteRule,d)&&(i.deleteRule=d,t(0,i))}function c(d){n.$$.not_equal(i.options.manageRule,d)&&(i.options.manageRule=d,t(0,i))}return n.$$set=d=>{"collection"in d&&t(0,i=d.collection)},[i,s,l,o,r,a,u,f,c]}class LC extends ye{constructor(e){super(),ve(this,e,PC,IC,be,{collection:0})}}function NC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function FC(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[NC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12289&&(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){H(e,i)}}}function RC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function jC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function md(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function HC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowUsernameAuth?jC:RC}let u=a(n),f=u(n),c=n[3]&&md();return{c(){e=v("div"),e.innerHTML=`<i class="ri-user-star-line"></i>
<span class="txt">Username/Password</span>`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?m&8&&A(c,1):(c=md(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function qC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function hd(n){let e,t,i,s,l,o,r,a;return i=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[VC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[zC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),_(e,t),j(i,t,null),_(e,s),_(e,l),j(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(B.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(B.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&nt(()=>{r||(r=ze(e,It,{duration:150},!0)),r.run(1)}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=ze(e,It,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),H(i),H(o),u&&r&&r.end()}}}function VC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[7](b)}let g={id:n[12],disabled:!B.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),j(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`Email domains that are NOT allowed to sign up.
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=b[12]),y&1&&(k.disabled=!B.isEmpty(b[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,k.value=b[0].options.exceptEmailDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function zC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[8](b)}let g={id:n[12],disabled:!B.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),j(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.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&4096&&l!==(l=b[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=b[12]),y&1&&(k.disabled=!B.isEmpty(b[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,k.value=b[0].options.onlyEmailDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function BC(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[qC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&hd(n);return{c(){q(e.$$.fragment),t=D(),l&&l.c(),i=Ae()},m(o,r){j(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=hd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function UC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function WC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function gd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function YC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowEmailAuth?WC:UC}let u=a(n),f=u(n),c=n[2]&&gd();return{c(){e=v("div"),e.innerHTML=`<i class="ri-mail-star-line"></i>
<span class="txt">Email/Password</span>`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?m&4&&A(c,1):(c=gd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function KC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function _d(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='<div class="flex p-t-base"><a href="/_/#/settings/auth-providers" target="_blank" class="btn btn-sm btn-outline"><span class="txt">Manage OAuth2 providers</span></a></div>',p(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{t||(t=ze(e,It,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ze(e,It,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function JC(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[KC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&_d();return{c(){q(e.$$.fragment),t=D(),l&&l.c(),i=Ae()},m(o,r){j(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=_d(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function ZC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function GC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function bd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function XC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowOAuth2Auth?GC:ZC}let u=a(n),f=u(n),c=n[1]&&bd();return{c(){e=v("div"),e.innerHTML=`<i class="ri-shield-star-line"></i>
</a>.`,s=D(),l=v("button"),r=z(o),a=D(),Y&&Y.c(),u=D(),V(f.$$.fragment),d=D(),m=v("hr"),h=D(),V(g.$$.fragment),y=D(),k=v("hr"),T=D(),V(C.$$.fragment),$=D(),O=v("hr"),E=D(),V(I.$$.fragment),N=D(),F=v("hr"),U=D(),V(J.$$.fragment),Z=D(),fe&&fe.c(),te=Ae(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-base"),p(m,"class","m-t-sm m-b-sm"),p(k,"class","m-t-sm m-b-sm"),p(O,"class","m-t-sm m-b-sm"),p(F,"class","m-t-sm m-b-sm")},m(oe,je){S(oe,e,je),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),Y&&Y.m(e,null),S(oe,u,je),H(f,oe,je),S(oe,d,je),S(oe,m,je),S(oe,h,je),H(g,oe,je),S(oe,y,je),S(oe,k,je),S(oe,T,je),H(C,oe,je),S(oe,$,je),S(oe,O,je),S(oe,E,je),H(I,oe,je),S(oe,N,je),S(oe,F,je),S(oe,U,je),H(J,oe,je),S(oe,Z,je),fe&&fe.m(oe,je),S(oe,te,je),ee=!0,R||(X=K(l,"click",n[2]),R=!0)},p(oe,[je]){var it;(!ee||je&2)&&o!==(o=oe[1]?"Hide available fields":"Show available fields")&&re(r,o),oe[1]?Y?(Y.p(oe,je),je&2&&A(Y,1)):(Y=cd(oe),Y.c(),A(Y,1),Y.m(e,null)):Y&&(pe(),P(Y,1,1,()=>{Y=null}),me());const Me={};je&1&&(Me.collection=oe[0]),!c&&je&1&&(c=!0,Me.rule=oe[0].listRule,we(()=>c=!1)),f.$set(Me);const Te={};je&1&&(Te.collection=oe[0]),!b&&je&1&&(b=!0,Te.rule=oe[0].viewRule,we(()=>b=!1)),g.$set(Te);const ce={};je&1&&(ce.collection=oe[0]),!M&&je&1&&(M=!0,ce.rule=oe[0].createRule,we(()=>M=!1)),C.$set(ce);const $e={};je&1&&($e.collection=oe[0]),!L&&je&1&&(L=!0,$e.rule=oe[0].updateRule,we(()=>L=!1)),I.$set($e);const Ze={};je&1&&(Ze.collection=oe[0]),!ne&&je&1&&(ne=!0,Ze.rule=oe[0].deleteRule,we(()=>ne=!1)),J.$set(Ze),(it=oe[0])!=null&&it.isAuth?fe?(fe.p(oe,je),je&1&&A(fe,1)):(fe=pd(oe),fe.c(),A(fe,1),fe.m(te.parentNode,te)):fe&&(pe(),P(fe,1,1,()=>{fe=null}),me())},i(oe){ee||(A(Y),A(f.$$.fragment,oe),A(g.$$.fragment,oe),A(C.$$.fragment,oe),A(I.$$.fragment,oe),A(J.$$.fragment,oe),A(fe),ee=!0)},o(oe){P(Y),P(f.$$.fragment,oe),P(g.$$.fragment,oe),P(C.$$.fragment,oe),P(I.$$.fragment,oe),P(J.$$.fragment,oe),P(fe),ee=!1},d(oe){oe&&w(e),Y&&Y.d(),oe&&w(u),q(f,oe),oe&&w(d),oe&&w(m),oe&&w(h),q(g,oe),oe&&w(y),oe&&w(k),oe&&w(T),q(C,oe),oe&&w($),oe&&w(O),oe&&w(E),q(I,oe),oe&&w(N),oe&&w(F),oe&&w(U),q(J,oe),oe&&w(Z),fe&&fe.d(oe),oe&&w(te),R=!1,X()}}}function PC(n,e,t){let{collection:i=new bn}=e,s=!1;const l=()=>t(1,s=!s);function o(d){n.$$.not_equal(i.listRule,d)&&(i.listRule=d,t(0,i))}function r(d){n.$$.not_equal(i.viewRule,d)&&(i.viewRule=d,t(0,i))}function a(d){n.$$.not_equal(i.createRule,d)&&(i.createRule=d,t(0,i))}function u(d){n.$$.not_equal(i.updateRule,d)&&(i.updateRule=d,t(0,i))}function f(d){n.$$.not_equal(i.deleteRule,d)&&(i.deleteRule=d,t(0,i))}function c(d){n.$$.not_equal(i.options.manageRule,d)&&(i.options.manageRule=d,t(0,i))}return n.$$set=d=>{"collection"in d&&t(0,i=d.collection)},[i,s,l,o,r,a,u,f,c]}class LC extends ye{constructor(e){super(),ve(this,e,PC,IC,be,{collection:0})}}function NC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function FC(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[NC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&12289&&(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){q(e,i)}}}function RC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function jC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function md(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function HC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowUsernameAuth?jC:RC}let u=a(n),f=u(n),c=n[3]&&md();return{c(){e=v("div"),e.innerHTML=`<i class="ri-user-star-line"></i>
<span class="txt">Username/Password</span>`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?m&8&&A(c,1):(c=md(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function qC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function hd(n){let e,t,i,s,l,o,r,a;return i=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[VC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[zC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(B.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(B.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&nt(()=>{r||(r=ze(e,It,{duration:150},!0)),r.run(1)}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=ze(e,It,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),q(i),q(o),u&&r&&r.end()}}}function VC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[7](b)}let g={id:n[12],disabled:!B.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),H(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`Email domains that are NOT allowed to sign up.
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=b[12]),y&1&&(k.disabled=!B.isEmpty(b[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,k.value=b[0].options.exceptEmailDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),q(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function zC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[8](b)}let g={id:n[12],disabled:!B.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),H(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.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&4096&&l!==(l=b[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=b[12]),y&1&&(k.disabled=!B.isEmpty(b[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,k.value=b[0].options.onlyEmailDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),q(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function BC(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[qC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&hd(n);return{c(){V(e.$$.fragment),t=D(),l&&l.c(),i=Ae()},m(o,r){H(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=hd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){q(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function UC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function WC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function gd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function YC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowEmailAuth?WC:UC}let u=a(n),f=u(n),c=n[2]&&gd();return{c(){e=v("div"),e.innerHTML=`<i class="ri-mail-star-line"></i>
<span class="txt">Email/Password</span>`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?m&4&&A(c,1):(c=gd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function KC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function _d(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='<div class="flex p-t-base"><a href="/_/#/settings/auth-providers" target="_blank" class="btn btn-sm btn-outline"><span class="txt">Manage OAuth2 providers</span></a></div>',p(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{t||(t=ze(e,It,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ze(e,It,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function JC(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[KC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&_d();return{c(){V(e.$$.fragment),t=D(),l&&l.c(),i=Ae()},m(o,r){H(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=_d(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){q(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function ZC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function GC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function bd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function XC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowOAuth2Auth?GC:ZC}let u=a(n),f=u(n),c=n[1]&&bd();return{c(){e=v("div"),e.innerHTML=`<i class="ri-shield-star-line"></i>
<span class="txt">OAuth2</span>`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?m&2&&A(c,1):(c=bd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function xC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Minimum password length"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].options.minPasswordLength),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.minPasswordLength&&de(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function QC(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Always require email",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){S(c,e,d),e.checked=n[0].options.requireEmail,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[11]),Pe(Ye.call(null,r,{text:`The constraint is applied only for new records.
Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function e$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y;return s=new ys({props:{single:!0,$$slots:{header:[HC],default:[FC]},$$scope:{ctx:n}}}),o=new ys({props:{single:!0,$$slots:{header:[YC],default:[BC]},$$scope:{ctx:n}}}),a=new ys({props:{single:!0,$$slots:{header:[XC],default:[JC]},$$scope:{ctx:n}}}),h=new _e({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[xC,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),b=new _e({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[QC,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=D(),i=v("div"),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),f=v("hr"),c=D(),d=v("h4"),d.textContent="General",m=D(),q(h.$$.fragment),g=D(),q(b.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(k,T){S(k,e,T),S(k,t,T),S(k,i,T),j(s,i,null),_(i,l),j(o,i,null),_(i,r),j(a,i,null),S(k,u,T),S(k,f,T),S(k,c,T),S(k,d,T),S(k,m,T),j(h,k,T),S(k,g,T),j(b,k,T),y=!0},p(k,[T]){const C={};T&8201&&(C.$$scope={dirty:T,ctx:k}),s.$set(C);const M={};T&8197&&(M.$$scope={dirty:T,ctx:k}),o.$set(M);const $={};T&8195&&($.$$scope={dirty:T,ctx:k}),a.$set($);const O={};T&12289&&(O.$$scope={dirty:T,ctx:k}),h.$set(O);const E={};T&12289&&(E.$$scope={dirty:T,ctx:k}),b.$set(E)},i(k){y||(A(s.$$.fragment,k),A(o.$$.fragment,k),A(a.$$.fragment,k),A(h.$$.fragment,k),A(b.$$.fragment,k),y=!0)},o(k){P(s.$$.fragment,k),P(o.$$.fragment,k),P(a.$$.fragment,k),P(h.$$.fragment,k),P(b.$$.fragment,k),y=!1},d(k){k&&w(e),k&&w(t),k&&w(i),H(s),H(o),H(a),k&&w(u),k&&w(f),k&&w(c),k&&w(d),k&&w(m),H(h,k),k&&w(g),H(b,k)}}}function t$(n,e,t){let i,s,l,o;Je(n,Ci,g=>t(4,o=g));let{collection:r=new bn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(g){n.$$.not_equal(r.options.exceptEmailDomains,g)&&(r.options.exceptEmailDomains=g,t(0,r))}function c(g){n.$$.not_equal(r.options.onlyEmailDomains,g)&&(r.options.onlyEmailDomains=g,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=ht(this.value),t(0,r)}function h(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=g=>{"collection"in g&&t(0,r=g.collection)},n.$$.update=()=>{var g,b,y,k;n.$$.dirty&1&&r.isAuth&&B.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!B.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.allowEmailAuth)||!B.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!B.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!B.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,m,h]}class n$ extends ye{constructor(e){super(),ve(this,e,t$,e$,be,{collection:0})}}function vd(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;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function wd(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=v("li"),t=v("div"),i=z(`Renamed collection
Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function e$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y;return s=new ys({props:{single:!0,$$slots:{header:[HC],default:[FC]},$$scope:{ctx:n}}}),o=new ys({props:{single:!0,$$slots:{header:[YC],default:[BC]},$$scope:{ctx:n}}}),a=new ys({props:{single:!0,$$slots:{header:[XC],default:[JC]},$$scope:{ctx:n}}}),h=new _e({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[xC,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),b=new _e({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[QC,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=D(),i=v("div"),V(s.$$.fragment),l=D(),V(o.$$.fragment),r=D(),V(a.$$.fragment),u=D(),f=v("hr"),c=D(),d=v("h4"),d.textContent="General",m=D(),V(h.$$.fragment),g=D(),V(b.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(k,T){S(k,e,T),S(k,t,T),S(k,i,T),H(s,i,null),_(i,l),H(o,i,null),_(i,r),H(a,i,null),S(k,u,T),S(k,f,T),S(k,c,T),S(k,d,T),S(k,m,T),H(h,k,T),S(k,g,T),H(b,k,T),y=!0},p(k,[T]){const C={};T&8201&&(C.$$scope={dirty:T,ctx:k}),s.$set(C);const M={};T&8197&&(M.$$scope={dirty:T,ctx:k}),o.$set(M);const $={};T&8195&&($.$$scope={dirty:T,ctx:k}),a.$set($);const O={};T&12289&&(O.$$scope={dirty:T,ctx:k}),h.$set(O);const E={};T&12289&&(E.$$scope={dirty:T,ctx:k}),b.$set(E)},i(k){y||(A(s.$$.fragment,k),A(o.$$.fragment,k),A(a.$$.fragment,k),A(h.$$.fragment,k),A(b.$$.fragment,k),y=!0)},o(k){P(s.$$.fragment,k),P(o.$$.fragment,k),P(a.$$.fragment,k),P(h.$$.fragment,k),P(b.$$.fragment,k),y=!1},d(k){k&&w(e),k&&w(t),k&&w(i),q(s),q(o),q(a),k&&w(u),k&&w(f),k&&w(c),k&&w(d),k&&w(m),q(h,k),k&&w(g),q(b,k)}}}function t$(n,e,t){let i,s,l,o;Je(n,Ci,g=>t(4,o=g));let{collection:r=new bn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(g){n.$$.not_equal(r.options.exceptEmailDomains,g)&&(r.options.exceptEmailDomains=g,t(0,r))}function c(g){n.$$.not_equal(r.options.onlyEmailDomains,g)&&(r.options.onlyEmailDomains=g,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=ht(this.value),t(0,r)}function h(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=g=>{"collection"in g&&t(0,r=g.collection)},n.$$.update=()=>{var g,b,y,k;n.$$.dirty&1&&r.isAuth&&B.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!B.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.allowEmailAuth)||!B.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!B.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!B.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,m,h]}class n$ extends ye{constructor(e){super(),ve(this,e,t$,e$,be,{collection:0})}}function vd(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;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function wd(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=v("li"),t=v("div"),i=z(`Renamed collection
`),s=v("strong"),o=z(l),r=D(),a=v("i"),u=D(),f=v("strong"),d=z(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,h){S(m,e,h),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(m,h){h&2&&l!==(l=m[1].originalName+"")&&re(o,l),h&2&&c!==(c=m[1].name+"")&&re(d,c)},d(m){m&&w(e)}}}function Sd(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=v("li"),t=v("div"),i=z(`Renamed field
`),s=v("strong"),o=z(l),r=D(),a=v("i"),u=D(),f=v("strong"),d=z(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,h){S(m,e,h),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(m,h){h&16&&l!==(l=m[14].originalName+"")&&re(o,l),h&16&&c!==(c=m[14].name+"")&&re(d,c)},d(m){m&&w(e)}}}function Td(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=v("li"),t=z("Removed field "),i=v("span"),l=z(s),o=D(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(i,l),_(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&re(l,s)},d(r){r&&w(e)}}}function i$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=n[3].length&&kd(),h=n[5]&&wd(n),g=n[4],b=[];for(let T=0;T<g.length;T+=1)b[T]=Sd(yd(n,g,T));let y=n[3],k=[];for(let T=0;T<y.length;T+=1)k[T]=Td(vd(n,y,T));return{c(){e=v("div"),t=v("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=D(),s=v("div"),l=v("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=D(),m&&m.c(),r=D(),a=v("h6"),a.textContent="Changes:",u=D(),f=v("ul"),h&&h.c(),c=D();for(let T=0;T<b.length;T+=1)b[T].c();d=D();for(let T=0;T<k.length;T+=1)k[T].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(T,C){S(T,e,C),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),m&&m.m(s,null),S(T,r,C),S(T,a,C),S(T,u,C),S(T,f,C),h&&h.m(f,null),_(f,c);for(let M=0;M<b.length;M+=1)b[M].m(f,null);_(f,d);for(let M=0;M<k.length;M+=1)k[M].m(f,null)},p(T,C){if(T[3].length?m||(m=kd(),m.c(),m.m(s,null)):m&&(m.d(1),m=null),T[5]?h?h.p(T,C):(h=wd(T),h.c(),h.m(f,c)):h&&(h.d(1),h=null),C&16){g=T[4];let M;for(M=0;M<g.length;M+=1){const $=yd(T,g,M);b[M]?b[M].p($,C):(b[M]=Sd($),b[M].c(),b[M].m(f,d))}for(;M<b.length;M+=1)b[M].d(1);b.length=g.length}if(C&8){y=T[3];let M;for(M=0;M<y.length;M+=1){const $=vd(T,y,M);k[M]?k[M].p($,C):(k[M]=Td($),k[M].c(),k[M].m(f,null))}for(;M<k.length;M+=1)k[M].d(1);k.length=y.length}},d(T){T&&w(e),m&&m.d(),T&&w(r),T&&w(a),T&&w(u),T&&w(f),h&&h.d(),bt(b,T),bt(k,T)}}}function s$(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function l$(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Cancel</span>',t=D(),i=v("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[K(e,"click",n[8]),K(i,"click",n[9])],s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function o$(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[l$],header:[s$],default:[i$]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){q(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||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function r$(n,e,t){let i,s,l;const o=$t();let r,a;async function u(y){t(1,a=y),await cn(),!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 h(y){ie[y?"unshift":"push"](()=>{r=y,t(2,r)})}function g(y){We.call(this,n,y)}function b(y){We.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,h,g,b]}class a$ extends ye{constructor(e){super(),ve(this,e,r$,o$,be,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function Cd(n,e,t){const i=n.slice();return i[46]=e[t][0],i[47]=e[t][1],i}function $d(n){let e,t,i,s;function l(r){n[32](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new LC({props:o}),ie.push(()=>ke(t,"collection",l)),{c(){e=v("div"),q(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){S(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],we(()=>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&&w(e),H(t)}}}function Md(n){let e,t,i,s;function l(r){n[33](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new n$({props:o}),ie.push(()=>ke(t,"collection",l)),{c(){e=v("div"),q(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===Os)},m(r,a){S(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],we(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&Q(e,"active",r[3]===Os)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function u$(n){let e,t,i,s,l,o,r;function a(d){n[31](d)}let u={};n[2]!==void 0&&(u.collection=n[2]),i=new _C({props:u}),ie.push(()=>ke(i,"collection",a));let f=n[3]===bl&&$d(n),c=n[2].isAuth&&Md(n);return{c(){e=v("div"),t=v("div"),q(i.$$.fragment),l=D(),f&&f.c(),o=D(),c&&c.c(),p(t,"class","tab-item"),Q(t,"active",n[3]===_i),p(e,"class","tabs-content svelte-1yfp6mj")},m(d,m){S(d,e,m),_(e,t),j(i,t,null),_(e,l),f&&f.m(e,null),_(e,o),c&&c.m(e,null),r=!0},p(d,m){const h={};!s&&m[0]&4&&(s=!0,h.collection=d[2],we(()=>s=!1)),i.$set(h),(!r||m[0]&8)&&Q(t,"active",d[3]===_i),d[3]===bl?f?(f.p(d,m),m[0]&8&&A(f,1)):(f=$d(d),f.c(),A(f,1),f.m(e,o)):f&&(pe(),P(f,1,1,()=>{f=null}),me()),d[2].isAuth?c?(c.p(d,m),m[0]&4&&A(c,1)):(c=Md(d),c.c(),A(c,1),c.m(e,null)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(i.$$.fragment,d),A(f),A(c),r=!0)},o(d){P(i.$$.fragment,d),P(f),P(c),r=!1},d(d){d&&w(e),H(i),f&&f.d(),c&&c.d()}}}function Dd(n){let e,t,i,s,l,o,r;return o=new xn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[f$]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=D(),i=v("button"),s=v("i"),l=D(),q(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line" Line truncated
update it manually!`,o=D(),m&&m.c(),r=D(),a=v("h6"),a.textContent="Changes:",u=D(),f=v("ul"),h&&h.c(),c=D();for(let T=0;T<b.length;T+=1)b[T].c();d=D();for(let T=0;T<k.length;T+=1)k[T].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(T,C){S(T,e,C),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),m&&m.m(s,null),S(T,r,C),S(T,a,C),S(T,u,C),S(T,f,C),h&&h.m(f,null),_(f,c);for(let M=0;M<b.length;M+=1)b[M].m(f,null);_(f,d);for(let M=0;M<k.length;M+=1)k[M].m(f,null)},p(T,C){if(T[3].length?m||(m=kd(),m.c(),m.m(s,null)):m&&(m.d(1),m=null),T[5]?h?h.p(T,C):(h=wd(T),h.c(),h.m(f,c)):h&&(h.d(1),h=null),C&16){g=T[4];let M;for(M=0;M<g.length;M+=1){const $=yd(T,g,M);b[M]?b[M].p($,C):(b[M]=Sd($),b[M].c(),b[M].m(f,d))}for(;M<b.length;M+=1)b[M].d(1);b.length=g.length}if(C&8){y=T[3];let M;for(M=0;M<y.length;M+=1){const $=vd(T,y,M);k[M]?k[M].p($,C):(k[M]=Td($),k[M].c(),k[M].m(f,null))}for(;M<k.length;M+=1)k[M].d(1);k.length=y.length}},d(T){T&&w(e),m&&m.d(),T&&w(r),T&&w(a),T&&w(u),T&&w(f),h&&h.d(),bt(b,T),bt(k,T)}}}function s$(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function l$(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Cancel</span>',t=D(),i=v("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[K(e,"click",n[8]),K(i,"click",n[9])],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function o$(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[l$],header:[s$],default:[i$]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){V(e.$$.fragment)},m(s,l){H(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),q(e,s)}}}function r$(n,e,t){let i,s,l;const o=$t();let r,a;async function u(y){t(1,a=y),await cn(),!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 h(y){ie[y?"unshift":"push"](()=>{r=y,t(2,r)})}function g(y){We.call(this,n,y)}function b(y){We.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,h,g,b]}class a$ extends ye{constructor(e){super(),ve(this,e,r$,o$,be,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function Cd(n,e,t){const i=n.slice();return i[46]=e[t][0],i[47]=e[t][1],i}function $d(n){let e,t,i,s;function l(r){n[32](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new LC({props:o}),ie.push(()=>ke(t,"collection",l)),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){S(r,e,a),H(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],we(()=>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&&w(e),q(t)}}}function Md(n){let e,t,i,s;function l(r){n[33](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new n$({props:o}),ie.push(()=>ke(t,"collection",l)),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","tab-item"),x(e,"active",n[3]===Os)},m(r,a){S(r,e,a),H(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],we(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&x(e,"active",r[3]===Os)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),q(t)}}}function u$(n){let e,t,i,s,l,o,r;function a(d){n[31](d)}let u={};n[2]!==void 0&&(u.collection=n[2]),i=new _C({props:u}),ie.push(()=>ke(i,"collection",a));let f=n[3]===bl&&$d(n),c=n[2].isAuth&&Md(n);return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),l=D(),f&&f.c(),o=D(),c&&c.c(),p(t,"class","tab-item"),x(t,"active",n[3]===_i),p(e,"class","tabs-content svelte-1yfp6mj")},m(d,m){S(d,e,m),_(e,t),H(i,t,null),_(e,l),f&&f.m(e,null),_(e,o),c&&c.m(e,null),r=!0},p(d,m){const h={};!s&&m[0]&4&&(s=!0,h.collection=d[2],we(()=>s=!1)),i.$set(h),(!r||m[0]&8)&&x(t,"active",d[3]===_i),d[3]===bl?f?(f.p(d,m),m[0]&8&&A(f,1)):(f=$d(d),f.c(),A(f,1),f.m(e,o)):f&&(pe(),P(f,1,1,()=>{f=null}),me()),d[2].isAuth?c?(c.p(d,m),m[0]&4&&A(c,1)):(c=Md(d),c.c(),A(c,1),c.m(e,null)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(i.$$.fragment,d),A(f),A(c),r=!0)},o(d){P(i.$$.fragment,d),P(f),P(c),r=!1},d(d){d&&w(e),q(i),f&&f.d(),c&&c.d()}}}function Dd(n){let e,t,i,s,l,o,r;return o=new xn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[f$]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=D(),i=v("button"),s=v("i"),l=D(),V(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line" Line truncated
<span class="txt">Duplicate</span>`,t=D(),i=v("button"),i.innerHTML=`<i class="ri-delete-bin-7-line"></i>
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[K(e,"click",n[23]),K(i,"click",yn(pt(n[24])))],s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function Od(n){let e,t,i,s;return i=new xn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[c$]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=D(),q(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&524288&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),H(i,l)}}}function Ed(n){let e,t,i,s,l,o=n[47]+"",r,a,u,f,c;function d(){return n[26](n[46])}return{c(){e=v("button"),t=v("i"),s=D(),l=v("span"),r=z(o),a=z(" collection"),u=D(),p(t,"class",i=yi(B.getCollectionTypeIcon(n[46]))+" svelte-1yfp6mj"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),Q(e,"selected",n[46]==n[2].type)},m(m,h){S(m,e,h),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),_(e,u),f||(c=K(e,"click",d),f=!0)},p(m,h){n=m,h[0]&64&&i!==(i=yi(B.getCollectionTypeIcon(n[46]))+" svelte-1yfp6mj")&&p(t,"class",i),h[0]&64&&o!==(o=n[47]+"")&&re(r,o),h[0]&68&&Q(e,"selected",n[46]==n[2].type)},d(m){m&&w(e),f=!1,c()}}}function c$(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s<t.length;s+=1)i[s]=Ed(Cd(n,t,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=Ae()},m(s,l){for(let o=0;o<i.length;o+=1)i[o].m(s,l);S(s,e,l)},p(s,l){if(l[0]&131140){t=Object.entries(s[6]);let o;for(o=0;o<t.length;o+=1){const r=Cd(s,t,o);i[o]?i[o].p(r,l):(i[o]=Ed(r),i[o].c(),i[o].m(e.parentNode,e))}for(;o<i.length;o+=1)i[o].d(1);i.length=t.length}},d(s){bt(i,s),s&&w(e)}}}function Ad(n){let e;return{c(){e=v("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function d$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y=(n[6][n[2].type]||"N/A")+"",k,T,C,M,$,O,E,I,L,N=n[2].isNew&&Od(n),F=n[2].system&&Ad();return{c(){e=v("label"),t=z("Name"),s=D(),l=v("input"),f=D(),c=v("div"),d=v("button"),m=v("span"),h=D(),g=v("span"),b=z("Type: "),k=z(y),T=D(),N&&N.c(),$=D(),F&&F.c(),O=Ae(),p(e,"for",i=n[45]),p(l,"type","text"),p(l,"id",o=n[45]),l.required=!0,l.disabled=n[12],p(l,"spellcheck","false"),l.autofocus=r=n[2].isNew,p(l,"placeholder",a=n[2].isAuth?'eg. "users"':'eg. "posts"'),l.value=u=n[2].name,p(g,"class","txt"),p(d,"type","button"),p(d,"class",C="btn btn-sm p-r-10 p-l-10 "+(n[2].isNew?"btn-hint":"btn-transparent")),d.disabled=M=!n[2].isNew,p(c,"class","form-field-addon")},m(U,Z){S(U,e,Z),_(e,t),S(U,s,Z),S(U,l,Z),S(U,f,Z),S(U,c,Z),_(c,d),_(d,m),_(d,h),_(d,g),_(g,b),_(g,k),_(d,T),N&&N.m(d,null),S(U,$,Z),F&&F.m(U,Z),S(U,O,Z),E=!0,n[2].isNew&&l.focus(),I||(L=K(l,"input",n[25]),I=!0)},p(U,Z){(!E||Z[1]&16384&&i!==(i=U[45]))&&p(e,"for",i),(!E||Z[1]&16384&&o!==(o=U[45]))&&p(l,"id",o),(!E||Z[0]&4096)&&(l.disabled=U[12]),(!E||Z[0]&4&&r!==(r=U[2].isNew))&&(l.autofocus=r),(!E||Z[0]&4&&a!==(a=U[2].isAuth?'eg. "users"':'eg. "posts"'))&&p(l,"placeholder",a),(!E||Z[0]&4&&u!==(u=U[2].name)&&l.value!==u)&&(l.value=u),(!E||Z[0]&68)&&y!==(y=(U[6][U[2].type]||"N/A")+"")&&re(k,y),U[2].isNew?N?(N.p(U,Z),Z[0]&4&&A(N,1)):(N=Od(U),N.c(),A(N,1),N.m(d,null)):N&&(pe(),P(N,1,1,()=>{N=null}),me()),(!E||Z[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(U[2].isNew?"btn-hint":"btn-transparent")))&&p(d,"class",C),(!E||Z[0]&4&&M!==(M=!U[2].isNew))&&(d.disabled=M),U[2].system?F||(F=Ad(),F.c(),F.m(O.parentNode,O)):F&&(F.d(1),F=null)},i(U){E||(A(N),E=!0)},o(U){P(N),E=!1},d(U){U&&w(e),U&&w(s),U&&w(l),U&&w(f),U&&w(c),N&&N.d(),U&&w($),F&&F.d(U),U&&w(O),I=!1,L()}}}function Id(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Pe(t=Ye.call(null,e,n[13])),l=!0)},p(r,a){t&&zt(t.update)&&a[0]&8192&&t.update.call(null,r[13])},i(r){s||(r&&nt(()=>{i||(i=ze(e,Pt,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=ze(e,Pt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function Pd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Ld(n){var a,u,f;let e,t,i,s=!B.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&Nd();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=D(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),Q(e,"active",n[3]===Os)},m(c,d){S(c,e,d),_(e,t),_(e,i),r&&r.m(e,null),l||(o=K(e,"click",n[30]),l=!0)},p(c,d){var m,h,g;d[0]&32&&(s=!B.isEmpty((m=c[5])==null?void 0:m.options)&&!((g=(h=c[5])==Line truncated
<span class="txt">New collection</span>`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",n[12]),i=!0)},p:X,d(l){l&&w(e),i=!1,s()}}}function b$(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],m=new Map,h,g,b,y,k,T,C=n[3];const M=I=>I[15].id;for(let I=0;I<C.length;I+=1){let L=Rd(n,C,I),N=M(L);m.set(N,d[I]=qd(N,L))}let $=null;C.length||($=jd(n));let O=!n[7]&&Vd(n),E={};return b=new tu({props:E}),n[13](b),b.$on("save",n[14]),{c(){e=v("aside"),t=v("header"),i=v("div"),s=v("div"),l=v("button"),l.innerHTML='<i class="ri-close-line"></i>',o=D(),r=v("input"),a=D(),u=v("hr"),f=D(),c=v("div");for(let I=0;I<d.length;I+=1)d[I].c();$&&$.c(),h=D(),O&&O.c(),g=D(),q(b.$$.fragment),p(l,"type","button"),p(l,"class","btn btn-xs btn-transparent btn-circle btn-clear"),Q(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"),Q(i,"active",n[4]),p(t,"class","sidebar-header"),p(u,"class","m-t-5 m-b-xs"),p(c,"class","sidebar-content"),Q(c,"fade",n[6]),Q(c,"sidebar-content-compact",n[3].length>20),p(e,"class","page-sidebar collection-sidebar")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),de(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let N=0;N<d.length;N+=1)d[N].m(c,null);$&&$.m(c,null),_(e,h),O&&O.m(e,null),S(I,g,L),j(b,I,L),y=!0,k||(T=[K(l,"click",n[10]),K(r,"input",n[11])],k=!0)},p(I,[L]){(!y||L&16)&&Q(l,"hidden",!I[4]),L&1&&r.value!==I[0]&&de(r,I[0]),(!y||L&16)&&Q(i,"active",I[4]),L&42&&(C=I[3],d=wt(d,L,M,1,I,C,m,c,Xi,qd,null,Rd),!C.length&&$?$.p(I,L):C.length?$&&($.d(1),$=null):($=jd(I),$.c(),$.m(c,null))),(!y||L&64)&&Q(c,"fade",I[6]),(!y||L&8)&&Q(c,"sidebar-content-compact",I[3].length>20),I[7]?O&&(O.d(1),O=null):O?O.p(I,L):(O=Vd(I),O.c(),O.m(e,null));const N={};b.$set(N)},i(I){y||(A(b.$$.fragment,I),y=!0)},o(I){P(b.$$.fragment,I),y=!1},d(I){I&&w(e);for(let L=0;L<d.length;L+=1)d[L].d();$&&$.d(),O&&O.d(),I&&w(g),n[13](null),H(b,I),k=!1,Le(T)}}}function v$(){setTimeout(()=>{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function y$(n,e,t){let i,s,l,o,r,a,u;Je(n,Si,k=>t(5,o=k)),Je(n,es,k=>t(9,r=k)),Je(n,Lo,k=>t(6,a=k)),Je(n,Cs,k=>t(7,u=k));let f,c="";function d(k){Yt(Si,o=k,o)}const m=()=>t(0,c="");function h(){c=this.value,t(0,c)}const g=()=>f==null?void 0:f.show();function b(k){ie[k?"unshift":"push"](()=>{f=k,t(2,f)})}const y=k=>{var T;(T=k.detail)!=null&&T.isNew&&k.detail.collection&&d(k.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=c.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=c!==""),n.$$.dirty&515&&t(3,l=r.filter(k=>k.id==c||k.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&512&&r&&v$()},[c,i,f,l,s,o,a,u,d,r,m,h,g,b,y]}class k$ extends ye{constructor(e){super(),ve(this,e,y$,b$,be,{})}}function zd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Bd(n){n[18]=n[19].default}function Ud(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Wd(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Wd();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Ae(),c&&c.c(),s=D(),l=v("button"),r=z(o),a=D(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(l,"active",e[5]===e[14]),this.first=t},m(m,h){S(m,t,h),c&&c.m(m,h),S(m,s,h),S(m,l,h),_(l,r),_(l,a),u||(f=K(l,"click",d),u=!0)},p(m,h){e=m,h&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Wd(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),h&8&&o!==(o=e[15].label+"")&&re(r,o),h&40&&Q(l,"active",e[5]===e[14])},d(m){m&&w(t),c&&c.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Kd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:T$,then:S$,catch:w$,value:19,blocks:[,,,]};return su(t=n[15].component,s),{c(){e=Ae(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&su(t,s)||Ib(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function w$(n){return{c:X,m:X,p:X,i:X,o:X,d:X}}function S$(n){Bd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){q(e.$$.fragment),t=D()},m(s,l){j(e,s,l),S(s,t,l),i=!0},p(s,l){Bd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&w(t)}}}function T$(n){return{c:X,m:X,p:X,i:X,o:X,d:X}}function Jd(n,e){let t,i,s,l=e[5]===e[14]&&Kd(e);return{key:n,first:null,c(){t=Ae(),l&&l.c(),i=Ae(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Kd(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(l),s=!0)},o(o){P(lLine 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-transparent btn-sm btn-block"),p(e,"class","list-item list-item-btn")},m(r,a){S(r,e,a),_(e,t),n[16](t),_(e,i),_(e,s),l||(o=[K(t,"change",n[17]),K(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&w(e),n[16](null),l=!1,Le(o)}}}function q4(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,m,h,g,b=n[4];const y=$=>$[25]+$[2].id;for(let $=0;$<b.length;$+=1){let O=tp(n,b,$),E=y(O);d.set(E,c[$]=np(E,O))}let k=n[0],T=[];for(let $=0;$<k.length;$+=1)T[$]=ip(ep(n,k,$));const C=$=>P(T[$],1,1,()=>{T[$]=null});let M=!n[8]&&sp(n);return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("div");for(let $=0;$<c.length;$+=1)c[$].c();m=D();for(let $=0;$<T.length;$+=1)T[$].c();h=D(),M&&M.c(),p(t,"class",i=B.getFieldTypeIcon(n[3].type)),p(l,"class","txt"),p(e,"for",a=n[21]),p(f,"class","list")},m($,O){S($,e,O),_(e,t),_(e,s),_(e,l),_(l,r),S($,u,O),S($,f,O);for(let E=0;E<c.length;E+=1)c[E].m(f,null);_(f,m);for(let E=0;E<T.length;E+=1)T[E].m(f,null);_(f,h),M&&M.m(f,null),n[19](f),g=!0},p($,O){if((!g||O&8&&i!==(i=B.getFieldTypeIcon($[3].type)))&&p(t,"class",i),(!g||O&8)&&o!==(o=$[3].name+"")&&re(r,o),(!g||O&2097152&&a!==(a=$[21]))&&p(e,"for",a),O&1558&&(b=$[4],pe(),c=wt(c,O,y,1,$,b,d,f,tn,np,m,tp),me()),O&2049){k=$[0];let E;for(E=0;E<k.length;E+=1){const I=ep($,k,E);T[E]?(T[E].p(I,O),A(T[E],1)):(T[E]=ip(I),T[E].c(),A(T[E],1),T[E].m(f,h))}for(pe(),E=k.length;E<T.length;E+=1)C(E);me()}$[8]?M&&(M.d(1),M=null):M?M.p($,O):(M=sp($),M.c(),M.m(f,null))},i($){if(!g){for(let O=0;O<b.length;O+=1)A(c[O]);for(let O=0;O<k.length;O+=1)A(T[O]);g=!0}},o($){for(let O=0;O<c.length;O+=1)P(c[O]);T=T.filter(Boolean);for(let O=0;O<T.length;O+=1)P(T[O]);g=!1},d($){$&&w(e),$&&w(u),$&&w(f);for(let O=0;O<c.length;O+=1)c[O].d();bt(T,$),M&&M.d(),n[19](null)}}}function V4(n){let e,t;return e=new _e({props:{class:"form-field form-field-list form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[q4,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-list form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&270533119&&(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){H(e,i)}}}function z4(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new dn}=e,c,d;function m(E){B.removeByValue(u,E),t(1,u)}function h(E){B.pushUnique(u,E),t(1,u)}function g(E){B.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),k=E=>h(E),T=E=>g(E);function C(E){ie[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)},$=()=>c==null?void 0:c.click();function O(E){ie[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,I;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=B.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=B.toArray(u))),n.$$.dirty&8&&t(5,i=((E=f.options)==null?void 0:E.maxSelect)>1),n.$$.dirty&4128&&B.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=B.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((I=f.options)==null?void 0:I.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,h,g,r,y,k,T,C,M,$,O]}class B4 extends ye{constructor(e){super(),ve(this,e,z4,V4,be,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function lp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function U4(n,e){e=lp(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=lp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}const W4=n=>({dragging:n&2,dragover:n&4}),op=n=>({dragging:n[1],dragover:n[2]});function Y4(n){let e,t,i,s;const l=n[8].default,o=Ft(l,n,n[7],op);return{c(){e=v("div"),o&&o.c(),p(e,"draggable",!0),p(e,"class","draggable svelte-28orm4"),Q(e,"dragging",n[1]),Q(e,"dragover",n[2])},m(r,a){S(r,e,a),o&&o.m(e,null),t=!0,i||(s=[K(e,"dragover",pt(n[9])),K(e,"dragleave",pt(n[10])),K(e,"dragend",n[11]),K(e,"dragstart",n[12]),K(e,"drop",n[13])],i=!0)},p(r,[a]){o&&o.p&&(!t||a&134)&&jt(o,l,r,r[7],t?Rt(l,r[7],a,W4):Ht(r[7]),op),(!t||a&2)&&Q(e,"dragging",r[1]),(!t||a&4)&&Q(e,"dragover",r[2])},i(r){t||(A(o,r),t=!0)},o(r){P(o,r),t=!1},d(r)Line truncated
`),O&&O.c(),m=D(),g.c(),b=Ae(),p(s,"type","button"),p(s,"class","btn btn-transparent btn-hint p-l-sm p-r-sm"),p(e,"class","flex m-b-base flex-gap-10"),p(o,"class","list picker-list m-b-base svelte-1u8jhky"),p(c,"class","section-title")},m(N,F){S(N,e,F),j(t,e,null),_(e,i),_(e,s),S(N,l,F),S(N,o,F);for(let U=0;U<r.length;U+=1)r[U].m(o,null);$&&$.m(o,null),S(N,f,F),S(N,c,F),_(c,d),O&&O.m(c,null),S(N,m,F),I[h].m(N,F),S(N,b,F),y=!0,k||(T=[K(s,"click",n[31]),Pe(u=U4.call(null,o,n[36]))],k=!0)},p(N,F){const U={};F[0]&4&&(U.value=N[2]),F[0]&4096&&(U.autocompleteCollection=N[12]),t.$set(U),F[0]&142252&&(C=N[3],pe(),r=wt(r,F,M,1,N,C,a,o,tn,cp,null,ap),me(),!C.length&&$?$.p(N,F):C.length?$&&($.d(1),$=null):($=up(N),$.c(),$.m(o,null))),u&&zt(u.update)&&F[0]&1040&&u.update.call(null,N[36]),N[5]>1?O?O.p(N,F):(O=dp(N),O.c(),O.m(c,null)):O&&(O.d(1),O=null);let Z=h;h=L(N),h===Z?I[h].p(N,F):(pe(),P(I[Z],1,1,()=>{I[Z]=null}),me(),g=I[h],g?g.p(N,F):(g=I[h]=E[h](N),g.c()),A(g,1),g.m(b.parentNode,b))},i(N){if(!y){A(t.$$.fragment,N);for(let F=0;F<C.length;F+=1)A(r[F]);A(g),y=!0}},o(N){P(t.$$.fragment,N);for(let F=0;F<r.length;F+=1)P(r[F]);P(g),y=!1},d(N){N&&w(e),H(t),N&&w(l),N&&w(o);for(let F=0;F<r.length;F+=1)r[F].d();$&&$.d(),N&&w(f),N&&w(c),O&&O.d(),N&&w(m),I[h].d(N),N&&w(b),k=!1,Le(T)}}}function lM(n){var r;let e,t,i,s=(((r=n[12])==null?void 0:r.name)||"")+"",l,o;return{c(){e=v("h4"),t=z("Select "),i=v("strong"),l=z(s),o=z(" records")},m(a,u){S(a,e,u),_(e,t),_(e,i),_(i,l),_(e,o)},p(a,u){var f;u[0]&4096&&s!==(s=(((f=a[12])==null?void 0:f.name)||"")+"")&&re(l,s)},d(a){a&&w(e)}}}function oM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Cancel</span>',t=D(),i=v("button"),i.innerHTML='<span class="txt">Save selection</span>',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[K(e,"click",n[28]),K(i,"click",n[29])],s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function rM(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[oM],header:[lM],default:[sM]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)o=Xe(o,l[a]);e=new Bn({props:o}),n[39](e),e.$on("hide",n[40]),e.$on("show",n[41]);let r={collection:n[12]};return i=new ub({props:r}),n[42](i),i.$on("save",n[43]),i.$on("delete",n[44]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),s=!0},p(a,u){const f=u[0]&524288?sn(l,[l[0],l[1],Xn(a[19])]):{};u[0]&16380|u[1]&33554432&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};u[0]&4096&&(c.collection=a[12]),i.$set(c)},i(a){s||(A(e.$$.fragment,a),A(i.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),s=!1},d(a){n[39](null),H(e,a),a&&w(t),n[42](null),H(i,a)}}}const Or=100;function aM(n,e,t){let i,s,l,o,r,a,u,f;const c=["value","field","show","hide"];let d=At(e,c),m;Je(n,es,Te=>t(26,m=Te));const h=$t(),g="picker_"+B.randomString(5);let{value:b}=e,{field:y}=e,k,T,C="",M=[],$=[],O=1,E=0,I=!1,L=!1;function N(){return t(2,C=""),t(3,M=[]),t(6,$=[]),U(),Z(!0),k==null?void 0:k.show()}function F(){return k==null?void 0:k.hide()}async function U(){const Te=B.toArray(b);if(!s||!Te.length)return;t(24,L=!0);let ce=[];const $e=Te.slice(),Ze=[];for(;$e.length>0;){const it=[];for(const Mt of $e.splice(0,Or))it.push(`id="${Mt}"`);Ze.push(he.collection(s).getFullList(Or,{filter:it.join("||"),$autoCancel:!1}))}try{await Promise.all(Ze).then(it=>{ce=ce.concat(...it)}),t(6,$=[]);for(const it of Te){const Mt=B.findByKey(ce,"id",it);Mt&&$.push(Mt)}C.trim()||t(3,M=B.filterDuplicatesByKey($.concat(M)))}catch(it){he.errorResponseHandler(it)}t(24,L=!1)}async function Z(Te=!1){if(s){t(4,I=!0),Te&&(C.trim()?t(3,M=[]):t(3,M=B.toArray($).slice()));try{const ce=Te?1:O+1,$e=await he.collection(s).getList(ce,Or,{filter:C,sort:"-created",$cancelKey:g+"loadList"});t(3,M=B.filterDuplicatesByKey(M.concat($e.items))),O=$e.page,t(23,E=$e.totalItems)}catch(ce){he.errorResponseHandler(ce)}t(4,I=!1)}}function ne(Te){i==1?t(6,$=[Te]):u&&(B.pushOrReplaceByKey($,Te),t(6,$))}function G(Te){B.removeByKey($,"id",Te.id),t(6,$)}function J(Te){f(Te)?G(Te):ne(Te)}function te(){var Te;i!=1?t(20,b=$.map(ce=>ce.id)):t(20,b=((Te=$==null?void 0:$[0])==null?void 0:Te.id)||""),h("save",$),F()}function V(Te){We.call(this,n,Te)}const x=()=>F(),Y=()=>te(),se=Te=>t(2,C=Te.detail),He=()=>T==null?void 0:T.show(),Re=Te=>T==null?void 0:T.show(Te),Fe=Te=>J(Te),qe=(Te,ce)=>{(ce.code==="Enter"||ce.code==="Space")&&(ce.preventDefault(),ce.stopPropagation(),J(Te))},ge=()=>t(2,C=""),Se=()=>{a&&!I&&Z()},Ue=Te=>G(Te);function lt(Te){$=Te,t(6,$)}function ue(Te){ie[Te?"unshift":"push"](()=>{k=Te,t(1,k)})}function fe(Te){We.call(this,n,Te)}function ae(Te){We.call(this,n,Te)}function oe(Te){ie[Te?"unshift":"push"](()=>{T=Te,t(7,T)})}const je=Te=>{B.removeByKey(M,"id",Te.detail.id),M.unshift(Te.detail),t(3,M),ne(Te.detail)},Me=Te=>{B.removeByKey(M,"id",Te.detail.id),t(3,M),G(Te.detail)};return n.$$set=Te=>{e=Xe(Xe({} Line truncated
`,p(e,"class","list-item")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function vp(n){var d;let e,t,i,s,l,o,r,a,u,f;i=new xo({props:{record:n[13],displayFields:(d=n[2].options)==null?void 0:d.displayFields}});function c(){return n[7](n[13])}return{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),o=v("button"),o.innerHTML='<i class="ri-close-line"></i>',r=D(),p(t,"class","content"),p(o,"type","button"),p(o,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(l,"class","actions"),p(e,"class","list-item")},m(m,h){S(m,e,h),_(e,t),j(i,t,null),_(e,s),_(e,l),_(l,o),_(e,r),a=!0,u||(f=[Pe(Ye.call(null,o,"Remove")),K(o,"click",c)],u=!0)},p(m,h){var b;n=m;const g={};h&8&&(g.record=n[13]),h&4&&(g.displayFields=(b=n[2].options)==null?void 0:b.displayFields),i.$set(g)},i(m){a||(A(i.$$.fragment,m),a=!0)},o(m){P(i.$$.fragment,m),a=!1},d(m){m&&w(e),H(i),u=!1,Le(f)}}}function fM(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,h,g,b,y,k=n[3],T=[];for(let $=0;$<k.length;$+=1)T[$]=vp(mp(n,k,$));const C=$=>P(T[$],1,1,()=>{T[$]=null});let M=null;return k.length||(M=gp(n)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("div"),c=v("div");for(let $=0;$<T.length;$+=1)T[$].c();M&&M.c(),d=D(),m=v("div"),h=v("button"),h.innerHTML=`<i class="ri-magic-line"></i>
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[K(e,"click",n[23]),K(i,"click",yn(pt(n[24])))],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function Od(n){let e,t,i,s;return i=new xn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[c$]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=D(),V(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),H(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&524288&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),q(i,l)}}}function Ed(n){let e,t,i,s,l,o=n[47]+"",r,a,u,f,c;function d(){return n[26](n[46])}return{c(){e=v("button"),t=v("i"),s=D(),l=v("span"),r=z(o),a=z(" collection"),u=D(),p(t,"class",i=yi(B.getCollectionTypeIcon(n[46]))+" svelte-1yfp6mj"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),x(e,"selected",n[46]==n[2].type)},m(m,h){S(m,e,h),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),_(e,u),f||(c=K(e,"click",d),f=!0)},p(m,h){n=m,h[0]&64&&i!==(i=yi(B.getCollectionTypeIcon(n[46]))+" svelte-1yfp6mj")&&p(t,"class",i),h[0]&64&&o!==(o=n[47]+"")&&re(r,o),h[0]&68&&x(e,"selected",n[46]==n[2].type)},d(m){m&&w(e),f=!1,c()}}}function c$(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s<t.length;s+=1)i[s]=Ed(Cd(n,t,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=Ae()},m(s,l){for(let o=0;o<i.length;o+=1)i[o].m(s,l);S(s,e,l)},p(s,l){if(l[0]&131140){t=Object.entries(s[6]);let o;for(o=0;o<t.length;o+=1){const r=Cd(s,t,o);i[o]?i[o].p(r,l):(i[o]=Ed(r),i[o].c(),i[o].m(e.parentNode,e))}for(;o<i.length;o+=1)i[o].d(1);i.length=t.length}},d(s){bt(i,s),s&&w(e)}}}function Ad(n){let e;return{c(){e=v("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function d$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y=(n[6][n[2].type]||"N/A")+"",k,T,C,M,$,O,E,I,L,N=n[2].isNew&&Od(n),F=n[2].system&&Ad();return{c(){e=v("label"),t=z("Name"),s=D(),l=v("input"),f=D(),c=v("div"),d=v("button"),m=v("span"),h=D(),g=v("span"),b=z("Type: "),k=z(y),T=D(),N&&N.c(),$=D(),F&&F.c(),O=Ae(),p(e,"for",i=n[45]),p(l,"type","text"),p(l,"id",o=n[45]),l.required=!0,l.disabled=n[12],p(l,"spellcheck","false"),l.autofocus=r=n[2].isNew,p(l,"placeholder",a=n[2].isAuth?'eg. "users"':'eg. "posts"'),l.value=u=n[2].name,p(g,"class","txt"),p(d,"type","button"),p(d,"class",C="btn btn-sm p-r-10 p-l-10 "+(n[2].isNew?"btn-hint":"btn-transparent")),d.disabled=M=!n[2].isNew,p(c,"class","form-field-addon")},m(U,J){S(U,e,J),_(e,t),S(U,s,J),S(U,l,J),S(U,f,J),S(U,c,J),_(c,d),_(d,m),_(d,h),_(d,g),_(g,b),_(g,k),_(d,T),N&&N.m(d,null),S(U,$,J),F&&F.m(U,J),S(U,O,J),E=!0,n[2].isNew&&l.focus(),I||(L=K(l,"input",n[25]),I=!0)},p(U,J){(!E||J[1]&16384&&i!==(i=U[45]))&&p(e,"for",i),(!E||J[1]&16384&&o!==(o=U[45]))&&p(l,"id",o),(!E||J[0]&4096)&&(l.disabled=U[12]),(!E||J[0]&4&&r!==(r=U[2].isNew))&&(l.autofocus=r),(!E||J[0]&4&&a!==(a=U[2].isAuth?'eg. "users"':'eg. "posts"'))&&p(l,"placeholder",a),(!E||J[0]&4&&u!==(u=U[2].name)&&l.value!==u)&&(l.value=u),(!E||J[0]&68)&&y!==(y=(U[6][U[2].type]||"N/A")+"")&&re(k,y),U[2].isNew?N?(N.p(U,J),J[0]&4&&A(N,1)):(N=Od(U),N.c(),A(N,1),N.m(d,null)):N&&(pe(),P(N,1,1,()=>{N=null}),me()),(!E||J[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(U[2].isNew?"btn-hint":"btn-transparent")))&&p(d,"class",C),(!E||J[0]&4&&M!==(M=!U[2].isNew))&&(d.disabled=M),U[2].system?F||(F=Ad(),F.c(),F.m(O.parentNode,O)):F&&(F.d(1),F=null)},i(U){E||(A(N),E=!0)},o(U){P(N),E=!1},d(U){U&&w(e),U&&w(s),U&&w(l),U&&w(f),U&&w(c),N&&N.d(),U&&w($),F&&F.d(U),U&&w(O),I=!1,L()}}}function Id(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Pe(t=Ye.call(null,e,n[13])),l=!0)},p(r,a){t&&zt(t.update)&&a[0]&8192&&t.update.call(null,r[13])},i(r){s||(r&&nt(()=>{i||(i=ze(e,Pt,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=ze(e,Pt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function Pd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Ld(n){var a,u,f;let e,t,i,s=!B.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&Nd();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=D(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),x(e,"active",n[3]===Os)},m(c,d){S(c,e,d),_(e,t),_(e,i),r&&r.m(e,null),l||(o=K(e,"click",n[30]),l=!0)},p(c,d){var m,h,g;d[0]&32&&(s=!B.isEmpty((m=c[5])==null?void 0:m.options)&&!((g=(h=c[5])==Line truncated
<span class="txt">New collection</span>`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",n[12]),i=!0)},p:G,d(l){l&&w(e),i=!1,s()}}}function b$(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],m=new Map,h,g,b,y,k,T,C=n[3];const M=I=>I[15].id;for(let I=0;I<C.length;I+=1){let L=Rd(n,C,I),N=M(L);m.set(N,d[I]=qd(N,L))}let $=null;C.length||($=jd(n));let O=!n[7]&&Vd(n),E={};return b=new tu({props:E}),n[13](b),b.$on("save",n[14]),{c(){e=v("aside"),t=v("header"),i=v("div"),s=v("div"),l=v("button"),l.innerHTML='<i class="ri-close-line"></i>',o=D(),r=v("input"),a=D(),u=v("hr"),f=D(),c=v("div");for(let I=0;I<d.length;I+=1)d[I].c();$&&$.c(),h=D(),O&&O.c(),g=D(),V(b.$$.fragment),p(l,"type","button"),p(l,"class","btn btn-xs btn-transparent btn-circle btn-clear"),x(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"),x(i,"active",n[4]),p(t,"class","sidebar-header"),p(u,"class","m-t-5 m-b-xs"),p(c,"class","sidebar-content"),x(c,"fade",n[6]),x(c,"sidebar-content-compact",n[3].length>20),p(e,"class","page-sidebar collection-sidebar")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),de(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let N=0;N<d.length;N+=1)d[N].m(c,null);$&&$.m(c,null),_(e,h),O&&O.m(e,null),S(I,g,L),H(b,I,L),y=!0,k||(T=[K(l,"click",n[10]),K(r,"input",n[11])],k=!0)},p(I,[L]){(!y||L&16)&&x(l,"hidden",!I[4]),L&1&&r.value!==I[0]&&de(r,I[0]),(!y||L&16)&&x(i,"active",I[4]),L&42&&(C=I[3],d=wt(d,L,M,1,I,C,m,c,Xi,qd,null,Rd),!C.length&&$?$.p(I,L):C.length?$&&($.d(1),$=null):($=jd(I),$.c(),$.m(c,null))),(!y||L&64)&&x(c,"fade",I[6]),(!y||L&8)&&x(c,"sidebar-content-compact",I[3].length>20),I[7]?O&&(O.d(1),O=null):O?O.p(I,L):(O=Vd(I),O.c(),O.m(e,null));const N={};b.$set(N)},i(I){y||(A(b.$$.fragment,I),y=!0)},o(I){P(b.$$.fragment,I),y=!1},d(I){I&&w(e);for(let L=0;L<d.length;L+=1)d[L].d();$&&$.d(),O&&O.d(),I&&w(g),n[13](null),q(b,I),k=!1,Le(T)}}}function v$(){setTimeout(()=>{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function y$(n,e,t){let i,s,l,o,r,a,u;Je(n,Si,k=>t(5,o=k)),Je(n,es,k=>t(9,r=k)),Je(n,Po,k=>t(6,a=k)),Je(n,Cs,k=>t(7,u=k));let f,c="";function d(k){Yt(Si,o=k,o)}const m=()=>t(0,c="");function h(){c=this.value,t(0,c)}const g=()=>f==null?void 0:f.show();function b(k){ie[k?"unshift":"push"](()=>{f=k,t(2,f)})}const y=k=>{var T;(T=k.detail)!=null&&T.isNew&&k.detail.collection&&d(k.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=c.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=c!==""),n.$$.dirty&515&&t(3,l=r.filter(k=>k.id==c||k.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&512&&r&&v$()},[c,i,f,l,s,o,a,u,d,r,m,h,g,b,y]}class k$ extends ye{constructor(e){super(),ve(this,e,y$,b$,be,{})}}function zd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Bd(n){n[18]=n[19].default}function Ud(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Wd(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Wd();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Ae(),c&&c.c(),s=D(),l=v("button"),r=z(o),a=D(),p(l,"type","button"),p(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(m,h){S(m,t,h),c&&c.m(m,h),S(m,s,h),S(m,l,h),_(l,r),_(l,a),u||(f=K(l,"click",d),u=!0)},p(m,h){e=m,h&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Wd(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),h&8&&o!==(o=e[15].label+"")&&re(r,o),h&40&&x(l,"active",e[5]===e[14])},d(m){m&&w(t),c&&c.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Kd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:T$,then:S$,catch:w$,value:19,blocks:[,,,]};return su(t=n[15].component,s),{c(){e=Ae(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&su(t,s)||Ib(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function w$(n){return{c:G,m:G,p:G,i:G,o:G,d:G}}function S$(n){Bd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){V(e.$$.fragment),t=D()},m(s,l){H(e,s,l),S(s,t,l),i=!0},p(s,l){Bd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){q(e,s),s&&w(t)}}}function T$(n){return{c:G,m:G,p:G,i:G,o:G,d:G}}function Jd(n,e){let t,i,s,l=e[5]===e[14]&&Kd(e);return{key:n,first:null,c(){t=Ae(),l&&l.c(),i=Ae(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Kd(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(l),s=!0)},o(o){P(lLine 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-transparent btn-sm btn-block"),p(e,"class","list-item list-item-btn")},m(r,a){S(r,e,a),_(e,t),n[16](t),_(e,i),_(e,s),l||(o=[K(t,"change",n[17]),K(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&w(e),n[16](null),l=!1,Le(o)}}}function q4(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,m,h,g,b=n[4];const y=$=>$[25]+$[2].id;for(let $=0;$<b.length;$+=1){let O=tp(n,b,$),E=y(O);d.set(E,c[$]=np(E,O))}let k=n[0],T=[];for(let $=0;$<k.length;$+=1)T[$]=ip(ep(n,k,$));const C=$=>P(T[$],1,1,()=>{T[$]=null});let M=!n[8]&&sp(n);return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("div");for(let $=0;$<c.length;$+=1)c[$].c();m=D();for(let $=0;$<T.length;$+=1)T[$].c();h=D(),M&&M.c(),p(t,"class",i=B.getFieldTypeIcon(n[3].type)),p(l,"class","txt"),p(e,"for",a=n[21]),p(f,"class","list")},m($,O){S($,e,O),_(e,t),_(e,s),_(e,l),_(l,r),S($,u,O),S($,f,O);for(let E=0;E<c.length;E+=1)c[E].m(f,null);_(f,m);for(let E=0;E<T.length;E+=1)T[E].m(f,null);_(f,h),M&&M.m(f,null),n[19](f),g=!0},p($,O){if((!g||O&8&&i!==(i=B.getFieldTypeIcon($[3].type)))&&p(t,"class",i),(!g||O&8)&&o!==(o=$[3].name+"")&&re(r,o),(!g||O&2097152&&a!==(a=$[21]))&&p(e,"for",a),O&1558&&(b=$[4],pe(),c=wt(c,O,y,1,$,b,d,f,tn,np,m,tp),me()),O&2049){k=$[0];let E;for(E=0;E<k.length;E+=1){const I=ep($,k,E);T[E]?(T[E].p(I,O),A(T[E],1)):(T[E]=ip(I),T[E].c(),A(T[E],1),T[E].m(f,h))}for(pe(),E=k.length;E<T.length;E+=1)C(E);me()}$[8]?M&&(M.d(1),M=null):M?M.p($,O):(M=sp($),M.c(),M.m(f,null))},i($){if(!g){for(let O=0;O<b.length;O+=1)A(c[O]);for(let O=0;O<k.length;O+=1)A(T[O]);g=!0}},o($){for(let O=0;O<c.length;O+=1)P(c[O]);T=T.filter(Boolean);for(let O=0;O<T.length;O+=1)P(T[O]);g=!1},d($){$&&w(e),$&&w(u),$&&w(f);for(let O=0;O<c.length;O+=1)c[O].d();bt(T,$),M&&M.d(),n[19](null)}}}function V4(n){let e,t;return e=new _e({props:{class:"form-field form-field-list form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[q4,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-list form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&270533119&&(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){q(e,i)}}}function z4(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new dn}=e,c,d;function m(E){B.removeByValue(u,E),t(1,u)}function h(E){B.pushUnique(u,E),t(1,u)}function g(E){B.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),k=E=>h(E),T=E=>g(E);function C(E){ie[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)},$=()=>c==null?void 0:c.click();function O(E){ie[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,I;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=B.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=B.toArray(u))),n.$$.dirty&8&&t(5,i=((E=f.options)==null?void 0:E.maxSelect)>1),n.$$.dirty&4128&&B.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=B.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((I=f.options)==null?void 0:I.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,h,g,r,y,k,T,C,M,$,O]}class B4 extends ye{constructor(e){super(),ve(this,e,z4,V4,be,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function lp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function U4(n,e){e=lp(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=lp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}const W4=n=>({dragging:n&2,dragover:n&4}),op=n=>({dragging:n[1],dragover:n[2]});function Y4(n){let e,t,i,s;const l=n[8].default,o=Ft(l,n,n[7],op);return{c(){e=v("div"),o&&o.c(),p(e,"draggable",!0),p(e,"class","draggable svelte-28orm4"),x(e,"dragging",n[1]),x(e,"dragover",n[2])},m(r,a){S(r,e,a),o&&o.m(e,null),t=!0,i||(s=[K(e,"dragover",pt(n[9])),K(e,"dragleave",pt(n[10])),K(e,"dragend",n[11]),K(e,"dragstart",n[12]),K(e,"drop",n[13])],i=!0)},p(r,[a]){o&&o.p&&(!t||a&134)&&jt(o,l,r,r[7],t?Rt(l,r[7],a,W4):Ht(r[7]),op),(!t||a&2)&&x(e,"dragging",r[1]),(!t||a&4)&&x(e,"dragover",r[2])},i(r){t||(A(o,r),t=!0)},o(r){P(o,r),t=!1},d(r)Line truncated
`),O&&O.c(),m=D(),g.c(),b=Ae(),p(s,"type","button"),p(s,"class","btn btn-transparent btn-hint p-l-sm p-r-sm"),p(e,"class","flex m-b-base flex-gap-10"),p(o,"class","list picker-list m-b-base svelte-1u8jhky"),p(c,"class","section-title")},m(N,F){S(N,e,F),H(t,e,null),_(e,i),_(e,s),S(N,l,F),S(N,o,F);for(let U=0;U<r.length;U+=1)r[U].m(o,null);$&&$.m(o,null),S(N,f,F),S(N,c,F),_(c,d),O&&O.m(c,null),S(N,m,F),I[h].m(N,F),S(N,b,F),y=!0,k||(T=[K(s,"click",n[31]),Pe(u=U4.call(null,o,n[36]))],k=!0)},p(N,F){const U={};F[0]&4&&(U.value=N[2]),F[0]&4096&&(U.autocompleteCollection=N[12]),t.$set(U),F[0]&142252&&(C=N[3],pe(),r=wt(r,F,M,1,N,C,a,o,tn,cp,null,ap),me(),!C.length&&$?$.p(N,F):C.length?$&&($.d(1),$=null):($=up(N),$.c(),$.m(o,null))),u&&zt(u.update)&&F[0]&1040&&u.update.call(null,N[36]),N[5]>1?O?O.p(N,F):(O=dp(N),O.c(),O.m(c,null)):O&&(O.d(1),O=null);let J=h;h=L(N),h===J?I[h].p(N,F):(pe(),P(I[J],1,1,()=>{I[J]=null}),me(),g=I[h],g?g.p(N,F):(g=I[h]=E[h](N),g.c()),A(g,1),g.m(b.parentNode,b))},i(N){if(!y){A(t.$$.fragment,N);for(let F=0;F<C.length;F+=1)A(r[F]);A(g),y=!0}},o(N){P(t.$$.fragment,N);for(let F=0;F<r.length;F+=1)P(r[F]);P(g),y=!1},d(N){N&&w(e),q(t),N&&w(l),N&&w(o);for(let F=0;F<r.length;F+=1)r[F].d();$&&$.d(),N&&w(f),N&&w(c),O&&O.d(),N&&w(m),I[h].d(N),N&&w(b),k=!1,Le(T)}}}function lM(n){var r;let e,t,i,s=(((r=n[12])==null?void 0:r.name)||"")+"",l,o;return{c(){e=v("h4"),t=z("Select "),i=v("strong"),l=z(s),o=z(" records")},m(a,u){S(a,e,u),_(e,t),_(e,i),_(i,l),_(e,o)},p(a,u){var f;u[0]&4096&&s!==(s=(((f=a[12])==null?void 0:f.name)||"")+"")&&re(l,s)},d(a){a&&w(e)}}}function oM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Cancel</span>',t=D(),i=v("button"),i.innerHTML='<span class="txt">Save selection</span>',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[K(e,"click",n[28]),K(i,"click",n[29])],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function rM(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[oM],header:[lM],default:[sM]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)o=Xe(o,l[a]);e=new Bn({props:o}),n[39](e),e.$on("hide",n[40]),e.$on("show",n[41]);let r={collection:n[12]};return i=new ub({props:r}),n[42](i),i.$on("save",n[43]),i.$on("delete",n[44]),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(a,u){H(e,a,u),S(a,t,u),H(i,a,u),s=!0},p(a,u){const f=u[0]&524288?sn(l,[l[0],l[1],Xn(a[19])]):{};u[0]&16380|u[1]&33554432&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};u[0]&4096&&(c.collection=a[12]),i.$set(c)},i(a){s||(A(e.$$.fragment,a),A(i.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),s=!1},d(a){n[39](null),q(e,a),a&&w(t),n[42](null),q(i,a)}}}const Or=100;function aM(n,e,t){let i,s,l,o,r,a,u,f;const c=["value","field","show","hide"];let d=At(e,c),m;Je(n,es,Te=>t(26,m=Te));const h=$t(),g="picker_"+B.randomString(5);let{value:b}=e,{field:y}=e,k,T,C="",M=[],$=[],O=1,E=0,I=!1,L=!1;function N(){return t(2,C=""),t(3,M=[]),t(6,$=[]),U(),J(!0),k==null?void 0:k.show()}function F(){return k==null?void 0:k.hide()}async function U(){const Te=B.toArray(b);if(!s||!Te.length)return;t(24,L=!0);let ce=[];const $e=Te.slice(),Ze=[];for(;$e.length>0;){const it=[];for(const Mt of $e.splice(0,Or))it.push(`id="${Mt}"`);Ze.push(he.collection(s).getFullList(Or,{filter:it.join("||"),$autoCancel:!1}))}try{await Promise.all(Ze).then(it=>{ce=ce.concat(...it)}),t(6,$=[]);for(const it of Te){const Mt=B.findByKey(ce,"id",it);Mt&&$.push(Mt)}C.trim()||t(3,M=B.filterDuplicatesByKey($.concat(M)))}catch(it){he.errorResponseHandler(it)}t(24,L=!1)}async function J(Te=!1){if(s){t(4,I=!0),Te&&(C.trim()?t(3,M=[]):t(3,M=B.toArray($).slice()));try{const ce=Te?1:O+1,$e=await he.collection(s).getList(ce,Or,{filter:C,sort:"-created",$cancelKey:g+"loadList"});t(3,M=B.filterDuplicatesByKey(M.concat($e.items))),O=$e.page,t(23,E=$e.totalItems)}catch(ce){he.errorResponseHandler(ce)}t(4,I=!1)}}function ne(Te){i==1?t(6,$=[Te]):u&&(B.pushOrReplaceByKey($,Te),t(6,$))}function Z(Te){B.removeByKey($,"id",Te.id),t(6,$)}function te(Te){f(Te)?Z(Te):ne(Te)}function ee(){var Te;i!=1?t(20,b=$.map(ce=>ce.id)):t(20,b=((Te=$==null?void 0:$[0])==null?void 0:Te.id)||""),h("save",$),F()}function R(Te){We.call(this,n,Te)}const X=()=>F(),Y=()=>ee(),se=Te=>t(2,C=Te.detail),He=()=>T==null?void 0:T.show(),Re=Te=>T==null?void 0:T.show(Te),Fe=Te=>te(Te),qe=(Te,ce)=>{(ce.code==="Enter"||ce.code==="Space")&&(ce.preventDefault(),ce.stopPropagation(),te(Te))},ge=()=>t(2,C=""),Se=()=>{a&&!I&&J()},Ue=Te=>Z(Te);function lt(Te){$=Te,t(6,$)}function ue(Te){ie[Te?"unshift":"push"](()=>{k=Te,t(1,k)})}function fe(Te){We.call(this,n,Te)}function ae(Te){We.call(this,n,Te)}function oe(Te){ie[Te?"unshift":"push"](()=>{T=Te,t(7,T)})}const je=Te=>{B.removeByKey(M,"id",Te.detail.id),M.unshift(Te.detail),t(3,M),ne(Te.detail)},Me=Te=>{B.removeByKey(M,"id",Te.detail.id),t(3,M),Z(Te.detail)};return n.$$set=Te=>{e=Xe(Xe Line truncated
`,p(e,"class","list-item")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function vp(n){var d;let e,t,i,s,l,o,r,a,u,f;i=new Xo({props:{record:n[13],displayFields:(d=n[2].options)==null?void 0:d.displayFields}});function c(){return n[7](n[13])}return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),o=v("button"),o.innerHTML='<i class="ri-close-line"></i>',r=D(),p(t,"class","content"),p(o,"type","button"),p(o,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(l,"class","actions"),p(e,"class","list-item")},m(m,h){S(m,e,h),_(e,t),H(i,t,null),_(e,s),_(e,l),_(l,o),_(e,r),a=!0,u||(f=[Pe(Ye.call(null,o,"Remove")),K(o,"click",c)],u=!0)},p(m,h){var b;n=m;const g={};h&8&&(g.record=n[13]),h&4&&(g.displayFields=(b=n[2].options)==null?void 0:b.displayFields),i.$set(g)},i(m){a||(A(i.$$.fragment,m),a=!0)},o(m){P(i.$$.fragment,m),a=!1},d(m){m&&w(e),q(i),u=!1,Le(f)}}}function fM(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,h,g,b,y,k=n[3],T=[];for(let $=0;$<k.length;$+=1)T[$]=vp(mp(n,k,$));const C=$=>P(T[$],1,1,()=>{T[$]=null});let M=null;return k.length||(M=gp(n)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("div"),c=v("div");for(let $=0;$<T.length;$+=1)T[$].c();M&&M.c(),d=D(),m=v("div"),h=v("button"),h.innerHTML=`<i class="ri-magic-line"></i>
<span class="txt">Open picker</span>`,p(t,"class",i=yi(B.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[12]),p(c,"class","relations-list svelte-1ynw0pc"),p(h,"type","button"),p(h,"class","btn btn-transparent btn-sm btn-block"),p(m,"class","list-item list-item-btn"),p(f,"class","list")},m($,O){S($,e,O),_(e,t),_(e,s),_(e,l),_(l,r),S($,u,O),S($,f,O),_(f,c);for(let E=0;E<T.length;E+=1)T[E].m(c,null);M&&M.m(c,null),_(f,d),_(f,m),_(m,h),g=!0,b||(y=K(h,"click",n[8]),b=!0)},p($,O){if((!g||O&4&&i!==(i=yi(B.getFieldTypeIcon($[2].type))+" svelte-1ynw0pc"))&&p(t,"class",i),(!g||O&4)&&o!==(o=$[2].name+"")&&re(r,o),(!g||O&4096&&a!==(a=$[12]))&&p(e,"for",a),O&93){k=$[3];let E;for(E=0;E<k.length;E+=1){const I=mp($,k,E);T[E]?(T[E].p(I,O),A(T[E],1)):(T[E]=vp(I),T[E].c(),A(T[E],1),T[E].m(c,null))}for(pe(),E=k.length;E<T.length;E+=1)C(E);me(),!k.length&&M?M.p($,O):k.length?M&&(M.d(1),M=null):(M=gp($),M.c(),M.m(c,null))}},i($){if(!g){for(let O=0;O<k.length;O+=1)A(T[O]);g=!0}},o($){T=T.filter(Boolean);for(let O=0;O<T.length;O+=1)P(T[O]);g=!1},d($){$&&w(e),$&&w(u),$&&w(f),bt(T,$),M&&M.d(),b=!1,y()}}}function cM(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-list "+(n[2].required?"required":""),name:n[2].name,$$slots:{default:[fM,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l={value:n[0],field:n[2]};return i=new uM({props:l}),n[9](i),i.$on("save",n[10]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(o,r){j(e,o,r),S(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&4&&(a.class="form-field form-field-list "+(o[2].required?"required":"")),r&4&&(a.name=o[2].name),r&528415&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};r&1&&(u.value=o[0]),r&4&&(u.field=o[2]),i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&w(t),n[9](null),H(i,o)}}}const yp=100;function dM(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new dn}=e,r=[],a=!1;u();async function u(){var k,T;const g=B.toArray(s);if(!((k=o==null?void 0:o.options)!=null&&k.collectionId)||!g.length){t(3,r=[]),t(4,a=!1);return}t(4,a=!0);const b=g.slice(),y=[];for(;b.length>0;){const C=[];for(const M of b.splice(0,yp))C.push(`id="${M}"`);y.push(he.collection((T=o==null?void 0:o.options)==null?void 0:T.collectionId).getFullList(yp,{filter:C.join("||"),$autoCancel:!1}))}try{let C=[];await Promise.all(y).then(M=>{C=C.concat(...M)});for(const M of g){const $=B.findByKey(C,"id",M);$&&r.push($)}t(3,r)}catch(C){he.errorResponseHandler(C)}t(4,a=!1)}function f(g){var b;B.removeByKey(r,"id",g.id),t(3,r),i?t(0,s=r.map(y=>y.id)):t(0,s=((b=r[0])==null?void 0:b.id)||"")}const c=g=>f(g),d=()=>l==null?void 0:l.show();function m(g){ie[g?"unshift":"push"](()=>{l=g,t(1,l)})}const h=g=>{var b;t(3,r=g.detail||[]),t(0,s=i?r.map(y=>y.id):((b=r[0])==null?void 0:b.id)||"")};return n.$$set=g=>{"value"in g&&t(0,s=g.value),"picker"in g&&t(1,l=g.picker),"field"in g&&t(2,o=g.field)},n.$$.update=()=>{var g;n.$$.dirty&4&&t(5,i=((g=o.options)==null?void 0:g.maxSelect)!=1)},[s,l,o,r,a,i,f,c,d,m,h]}class pM extends ye{constructor(e){super(),ve(this,e,dM,cM,be,{value:0,picker:1,field:2})}}const mM=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],hM=(n,e)=>{mM.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function gM(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),Ir(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function _M(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function bM(n){let e;function t(l,o){return l[1]?_M:gM}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&p(e,"class",l[2])},i:X,o:X,d(l){l&&w(e),s.d(),n[19](null)}}}const ab=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),vM=()=>{let n={listeners:[],scriptId:ab("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{nLine truncated
<span class="txt">Open picker</span>`,p(t,"class",i=yi(B.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[12]),p(c,"class","relations-list svelte-1ynw0pc"),p(h,"type","button"),p(h,"class","btn btn-transparent btn-sm btn-block"),p(m,"class","list-item list-item-btn"),p(f,"class","list")},m($,O){S($,e,O),_(e,t),_(e,s),_(e,l),_(l,r),S($,u,O),S($,f,O),_(f,c);for(let E=0;E<T.length;E+=1)T[E].m(c,null);M&&M.m(c,null),_(f,d),_(f,m),_(m,h),g=!0,b||(y=K(h,"click",n[8]),b=!0)},p($,O){if((!g||O&4&&i!==(i=yi(B.getFieldTypeIcon($[2].type))+" svelte-1ynw0pc"))&&p(t,"class",i),(!g||O&4)&&o!==(o=$[2].name+"")&&re(r,o),(!g||O&4096&&a!==(a=$[12]))&&p(e,"for",a),O&93){k=$[3];let E;for(E=0;E<k.length;E+=1){const I=mp($,k,E);T[E]?(T[E].p(I,O),A(T[E],1)):(T[E]=vp(I),T[E].c(),A(T[E],1),T[E].m(c,null))}for(pe(),E=k.length;E<T.length;E+=1)C(E);me(),!k.length&&M?M.p($,O):k.length?M&&(M.d(1),M=null):(M=gp($),M.c(),M.m(c,null))}},i($){if(!g){for(let O=0;O<k.length;O+=1)A(T[O]);g=!0}},o($){T=T.filter(Boolean);for(let O=0;O<T.length;O+=1)P(T[O]);g=!1},d($){$&&w(e),$&&w(u),$&&w(f),bt(T,$),M&&M.d(),b=!1,y()}}}function cM(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-list "+(n[2].required?"required":""),name:n[2].name,$$slots:{default:[fM,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l={value:n[0],field:n[2]};return i=new uM({props:l}),n[9](i),i.$on("save",n[10]),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(o,r){H(e,o,r),S(o,t,r),H(i,o,r),s=!0},p(o,[r]){const a={};r&4&&(a.class="form-field form-field-list "+(o[2].required?"required":"")),r&4&&(a.name=o[2].name),r&528415&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};r&1&&(u.value=o[0]),r&4&&(u.field=o[2]),i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){q(e,o),o&&w(t),n[9](null),q(i,o)}}}const yp=100;function dM(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new dn}=e,r=[],a=!1;u();async function u(){var k,T;const g=B.toArray(s);if(!((k=o==null?void 0:o.options)!=null&&k.collectionId)||!g.length){t(3,r=[]),t(4,a=!1);return}t(4,a=!0);const b=g.slice(),y=[];for(;b.length>0;){const C=[];for(const M of b.splice(0,yp))C.push(`id="${M}"`);y.push(he.collection((T=o==null?void 0:o.options)==null?void 0:T.collectionId).getFullList(yp,{filter:C.join("||"),$autoCancel:!1}))}try{let C=[];await Promise.all(y).then(M=>{C=C.concat(...M)});for(const M of g){const $=B.findByKey(C,"id",M);$&&r.push($)}t(3,r)}catch(C){he.errorResponseHandler(C)}t(4,a=!1)}function f(g){var b;B.removeByKey(r,"id",g.id),t(3,r),i?t(0,s=r.map(y=>y.id)):t(0,s=((b=r[0])==null?void 0:b.id)||"")}const c=g=>f(g),d=()=>l==null?void 0:l.show();function m(g){ie[g?"unshift":"push"](()=>{l=g,t(1,l)})}const h=g=>{var b;t(3,r=g.detail||[]),t(0,s=i?r.map(y=>y.id):((b=r[0])==null?void 0:b.id)||"")};return n.$$set=g=>{"value"in g&&t(0,s=g.value),"picker"in g&&t(1,l=g.picker),"field"in g&&t(2,o=g.field)},n.$$.update=()=>{var g;n.$$.dirty&4&&t(5,i=((g=o.options)==null?void 0:g.maxSelect)!=1)},[s,l,o,r,a,i,f,c,d,m,h]}class pM extends ye{constructor(e){super(),ve(this,e,dM,cM,be,{value:0,picker:1,field:2})}}const mM=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],hM=(n,e)=>{mM.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function gM(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),Ir(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function _M(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function bM(n){let e;function t(l,o){return l[1]?_M:gM}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&p(e,"class",l[2])},i:G,o:G,d(l){l&&w(e),s.d(),n[19](null)}}}const ab=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),vM=()=>{let n={listeners:[],scriptId:ab("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{nLine truncated
Updated: ${n[2].updated}`,position:"left"})),b=!0)},p(k,T){T[1]&8388608&&r!==(r=k[54])&&p(e,"for",r),c&&zt(c.update)&&T[0]&4&&c.update.call(null,{text:`Created: ${k[2].created}
Updated: ${k[2].updated}`,position:"left"}),T[1]&8388608&&h!==(h=k[54])&&p(m,"id",h),T[0]&4&&g!==(g=k[2].id)&&m.value!==g&&(m.value=g)},d(k){k&&w(e),k&&w(a),k&&w(u),k&&w(d),k&&w(m),b=!1,y()}}}function $p(n){var u,f;let e,t,i,s,l;function o(c){n[29](c)}let r={collection:n[0]};n[2]!==void 0&&(r.record=n[2]),e=new j$({props:r}),ie.push(()=>ke(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&Mp();return{c(){q(e.$$.fragment),i=D(),a&&a.c(),s=Ae()},m(c,d){j(e,c,d),S(c,i,d),a&&a.m(c,d),S(c,s,d),l=!0},p(c,d){var h,g;const m={};d[0]&1&&(m.collection=c[0]),!t&&d[0]&4&&(t=!0,m.record=c[2],we(()=>t=!1)),e.$set(m),(g=(h=c[0])==null?void 0:h.schema)!=null&&g.length?a||(a=Mp(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){P(e.$$.fragment,c),l=!1},d(c){H(e,c),c&&w(i),a&&a.d(c),c&&w(s)}}}function Mp(n){let e;return{c(){e=v("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function GM(n){let e,t,i;function s(o){n[42](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new pM({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function XM(n){let e,t,i,s,l;function o(f){n[39](f,n[51])}function r(f){n[40](f,n[51])}function a(f){n[41](f,n[51])}let u={field:n[51],record:n[2]};return n[2][n[51].name]!==void 0&&(u.value=n[2][n[51].name]),n[3][n[51].name]!==void 0&&(u.uploadedFiles=n[3][n[51].name]),n[4][n[51].name]!==void 0&&(u.deletedFileIndexes=n[4][n[51].name]),e=new B4({props:u}),ie.push(()=>ke(e,"value",o)),ie.push(()=>ke(e,"uploadedFiles",r)),ie.push(()=>ke(e,"deletedFileIndexes",a)),{c(){q(e.$$.fragment)},m(f,c){j(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[51]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[51].name],we(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[51].name],we(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[51].name],we(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){H(e,f)}}}function xM(n){let e,t,i;function s(o){n[38](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new v4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function QM(n){let e,t,i;function s(o){n[37](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new h4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function e5(n){let e,t,i;function s(o){n[36](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new c4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function t5(n){let e,t,i;function s(o){n[35](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new $M({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function n5(n){let e,t,i;function s(o){n[34](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new r4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function i5(n){let e,t,i;function s(o){n[33](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new i4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function s5(n){let e,t,i;function s(o){n[32](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new Q$({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={}; Line truncated
<span class="txt">Send verification email</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[23]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function Ip(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=`<i class="ri-mail-lock-line"></i>
<span class="txt">Send password reset email</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[24]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function a5(n){let e,t,i,s,l,o,r,a=n[0].isAuth&&!n[7].verified&&n[7].email&&Ap(n),u=n[0].isAuth&&n[7].email&&Ip(n);return{c(){a&&a.c(),e=D(),u&&u.c(),t=D(),i=v("button"),i.innerHTML=`<i class="ri-file-copy-line"></i>
Updated: ${k[2].updated}`,position:"left"}),T[1]&8388608&&h!==(h=k[54])&&p(m,"id",h),T[0]&4&&g!==(g=k[2].id)&&m.value!==g&&(m.value=g)},d(k){k&&w(e),k&&w(a),k&&w(u),k&&w(d),k&&w(m),b=!1,y()}}}function $p(n){var u,f;let e,t,i,s,l;function o(c){n[29](c)}let r={collection:n[0]};n[2]!==void 0&&(r.record=n[2]),e=new j$({props:r}),ie.push(()=>ke(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&Mp();return{c(){V(e.$$.fragment),i=D(),a&&a.c(),s=Ae()},m(c,d){H(e,c,d),S(c,i,d),a&&a.m(c,d),S(c,s,d),l=!0},p(c,d){var h,g;const m={};d[0]&1&&(m.collection=c[0]),!t&&d[0]&4&&(t=!0,m.record=c[2],we(()=>t=!1)),e.$set(m),(g=(h=c[0])==null?void 0:h.schema)!=null&&g.length?a||(a=Mp(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){P(e.$$.fragment,c),l=!1},d(c){q(e,c),c&&w(i),a&&a.d(c),c&&w(s)}}}function Mp(n){let e;return{c(){e=v("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function GM(n){let e,t,i;function s(o){n[42](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new pM({props:l}),ie.push(()=>ke(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function XM(n){let e,t,i,s,l;function o(f){n[39](f,n[51])}function r(f){n[40](f,n[51])}function a(f){n[41](f,n[51])}let u={field:n[51],record:n[2]};return n[2][n[51].name]!==void 0&&(u.value=n[2][n[51].name]),n[3][n[51].name]!==void 0&&(u.uploadedFiles=n[3][n[51].name]),n[4][n[51].name]!==void 0&&(u.deletedFileIndexes=n[4][n[51].name]),e=new B4({props:u}),ie.push(()=>ke(e,"value",o)),ie.push(()=>ke(e,"uploadedFiles",r)),ie.push(()=>ke(e,"deletedFileIndexes",a)),{c(){V(e.$$.fragment)},m(f,c){H(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[51]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[51].name],we(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[51].name],we(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[51].name],we(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){q(e,f)}}}function xM(n){let e,t,i;function s(o){n[38](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new v4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function QM(n){let e,t,i;function s(o){n[37](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new h4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function e5(n){let e,t,i;function s(o){n[36](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new c4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function t5(n){let e,t,i;function s(o){n[35](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new $M({props:l}),ie.push(()=>ke(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function n5(n){let e,t,i;function s(o){n[34](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new r4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function i5(n){let e,t,i;function s(o){n[33](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new i4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function s5(n){let e,t,i;function s(o){n[32](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new Q$({props:l}),ie.push(()=>ke(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={}; Line truncated
<span class="txt">Send verification email</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[23]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Ip(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=`<i class="ri-mail-lock-line"></i>
<span class="txt">Send password reset email</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[24]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function a5(n){let e,t,i,s,l,o,r,a=n[0].isAuth&&!n[7].verified&&n[7].email&&Ap(n),u=n[0].isAuth&&n[7].email&&Ip(n);return{c(){a&&a.c(),e=D(),u&&u.c(),t=D(),i=v("button"),i.innerHTML=`<i class="ri-file-copy-line"></i>
<span class="txt">Duplicate</span>`,s=D(),l=v("button"),l.innerHTML=`<i class="ri-delete-bin-7-line"></i>
<span class="txt">Delete</span>`,p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item txt-danger closable")},m(f,c){a&&a.m(f,c),S(f,e,c),u&&u.m(f,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),o||(r=[K(i,"click",n[25]),K(l,"click",yn(pt(n[26])))],o=!0)},p(f,c){f[0].isAuth&&!f[7].verified&&f[7].email?a?a.p(f,c):(a=Ap(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].isAuth&&f[7].email?u?u.p(f,c):(u=Ip(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&w(e),u&&u.d(f),f&&w(t),f&&w(i),f&&w(s),f&&w(l),o=!1,Le(r)}}}function Pp(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=D(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),Q(t,"active",n[10]===Yi),p(s,"type","button"),p(s,"class","tab-item"),Q(s,"active",n[10]===yl),p(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(e,s),l||(o=[K(t,"click",n[27]),K(s,"click",n[28])],l=!0)},p(r,a){a[0]&1024&&Q(t,"active",r[10]===Yi),a[0]&1024&&Q(s,"active",r[10]===yl)},d(r){r&&w(e),l=!1,Le(o)}}}function u5(n){var g;let e,t=n[2].isNew?"New":"Edit",i,s,l,o=((g=n[0])==null?void 0:g.name)+"",r,a,u,f,c,d,m=!n[2].isNew&&Ep(n),h=n[0].isAuth&&!n[2].isNew&&Pp(n);return{c(){e=v("h4"),i=z(t),s=D(),l=v("strong"),r=z(o),a=z(" record"),u=D(),m&&m.c(),f=D(),h&&h.c(),c=Ae()},m(b,y){S(b,e,y),_(e,i),_(e,s),_(e,l),_(l,r),_(e,a),S(b,u,y),m&&m.m(b,y),S(b,f,y),h&&h.m(b,y),S(b,c,y),d=!0},p(b,y){var k;(!d||y[0]&4)&&t!==(t=b[2].isNew?"New":"Edit")&&re(i,t),(!d||y[0]&1)&&o!==(o=((k=b[0])==null?void 0:k.name)+"")&&re(r,o),b[2].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),me()):m?(m.p(b,y),y[0]&4&&A(m,1)):(m=Ep(b),m.c(),A(m,1),m.m(f.parentNode,f)),b[0].isAuth&&!b[2].isNew?h?h.p(b,y):(h=Pp(b),h.c(),h.m(c.parentNode,c)):h&&(h.d(1),h=null)},i(b){d||(A(m),d=!0)},o(b){P(m),d=!1},d(b){b&&w(e),b&&w(u),m&&m.d(b),b&&w(f),h&&h.d(b),b&&w(c)}}}function f5(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=D(),s=v("button"),l=v("span"),r=z(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[8],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[13]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[8],Q(s,"btn-loading",n[8])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=K(e,"click",n[22]),u=!0)},p(c,d){d[0]&256&&(e.disabled=c[8]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&re(r,o),d[0]&2304&&a!==(a=!c[11]||c[8])&&(s.disabled=a),d[0]&256&&Q(s,"btn-loading",c[8])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,f()}}}function c5(n){var s;let e,t,i={class:`
<span class="txt">Delete</span>`,p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item txt-danger closable")},m(f,c){a&&a.m(f,c),S(f,e,c),u&&u.m(f,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),o||(r=[K(i,"click",n[25]),K(l,"click",yn(pt(n[26])))],o=!0)},p(f,c){f[0].isAuth&&!f[7].verified&&f[7].email?a?a.p(f,c):(a=Ap(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].isAuth&&f[7].email?u?u.p(f,c):(u=Ip(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&w(e),u&&u.d(f),f&&w(t),f&&w(i),f&&w(s),f&&w(l),o=!1,Le(r)}}}function Pp(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=D(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),x(t,"active",n[10]===Yi),p(s,"type","button"),p(s,"class","tab-item"),x(s,"active",n[10]===yl),p(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(e,s),l||(o=[K(t,"click",n[27]),K(s,"click",n[28])],l=!0)},p(r,a){a[0]&1024&&x(t,"active",r[10]===Yi),a[0]&1024&&x(s,"active",r[10]===yl)},d(r){r&&w(e),l=!1,Le(o)}}}function u5(n){var g;let e,t=n[2].isNew?"New":"Edit",i,s,l,o=((g=n[0])==null?void 0:g.name)+"",r,a,u,f,c,d,m=!n[2].isNew&&Ep(n),h=n[0].isAuth&&!n[2].isNew&&Pp(n);return{c(){e=v("h4"),i=z(t),s=D(),l=v("strong"),r=z(o),a=z(" record"),u=D(),m&&m.c(),f=D(),h&&h.c(),c=Ae()},m(b,y){S(b,e,y),_(e,i),_(e,s),_(e,l),_(l,r),_(e,a),S(b,u,y),m&&m.m(b,y),S(b,f,y),h&&h.m(b,y),S(b,c,y),d=!0},p(b,y){var k;(!d||y[0]&4)&&t!==(t=b[2].isNew?"New":"Edit")&&re(i,t),(!d||y[0]&1)&&o!==(o=((k=b[0])==null?void 0:k.name)+"")&&re(r,o),b[2].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),me()):m?(m.p(b,y),y[0]&4&&A(m,1)):(m=Ep(b),m.c(),A(m,1),m.m(f.parentNode,f)),b[0].isAuth&&!b[2].isNew?h?h.p(b,y):(h=Pp(b),h.c(),h.m(c.parentNode,c)):h&&(h.d(1),h=null)},i(b){d||(A(m),d=!0)},o(b){P(m),d=!1},d(b){b&&w(e),b&&w(u),m&&m.d(b),b&&w(f),h&&h.d(b),b&&w(c)}}}function f5(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=D(),s=v("button"),l=v("span"),r=z(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[8],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[13]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[8],x(s,"btn-loading",n[8])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=K(e,"click",n[22]),u=!0)},p(c,d){d[0]&256&&(e.disabled=c[8]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&re(r,o),d[0]&2304&&a!==(a=!c[11]||c[8])&&(s.disabled=a),d[0]&256&&x(s,"btn-loading",c[8])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,f()}}}function c5(n){var s;let e,t,i={class:`
record-panel
`+(n[12]?"overlay-panel-xl":"overlay-panel-lg")+`
`+((s=n[0])!=null&&s.isAuth&&!n[2].isNew?"colored-header":"")+`
`,beforeHide:n[43],$$slots:{footer:[f5],header:[u5],default:[r5]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[44](e),e.$on("hide",n[45]),e.$on("show",n[46]),{c(){q(e.$$.fragment)},m(l,o){j(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&4101&&(r.class=`
`,beforeHide:n[43],$$slots:{footer:[f5],header:[u5],default:[r5]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[44](e),e.$on("hide",n[45]),e.$on("show",n[46]),{c(){V(e.$$.fragment)},m(l,o){H(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&4101&&(r.class=`
record-panel
`+(l[12]?"overlay-panel-xl":"overlay-panel-lg")+`
`+((a=l[0])!=null&&a.isAuth&&!l[2].isNew?"colored-header":"")+`
`),o[0]&544&&(r.beforeHide=l[43]),o[0]&3485|o[1]&16777216&&(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[44](null),H(e,l)}}}const Yi="form",yl="providers";function Lp(n){return JSON.stringify(n)}function d5(n,e,t){let i,s,l,o;const r=$t(),a="record_"+B.randomString(5);let{collection:u}=e,f,c=null,d=new Ki,m=!1,h=!1,g={},b={},y="",k=Yi;function T(ce){return M(ce),t(9,h=!0),t(10,k=Yi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(ce){Vn({}),t(7,c=ce||{}),ce!=null&&ce.clone?t(2,d=ce.clone()):t(2,d=new Ki),t(3,g={}),t(4,b={}),await cn(),t(20,y=Lp(d))}function $(){if(m||!o||!(u!=null&&u.id))return;t(8,m=!0);const ce=E();let $e;d.isNew?$e=he.collection(u.id).create(ce):$e=he.collection(u.id).update(d.id,ce),$e.then(Ze=>{Vt(d.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),C(),r("save",Ze)}).catch(Ze=>{he.errorResponseHandler(Ze)}).finally(()=>{t(8,m=!1)})}function O(){c!=null&&c.id&&un("Do you really want to delete the selected record?",()=>he.collection(c.collectionId).delete(c.id).then(()=>{C(),Vt("Successfully deleted record."),r("delete",c)}).catch(ce=>{he.errorResponseHandler(ce)}))}function E(){const ce=(d==null?void 0:d.export())||{},$e=new FormData,Ze={};for(const it of(u==null?void 0:u.schema)||[])Ze[it.name]=!0;u!=null&&u.isAuth&&(Ze.username=!0,Ze.email=!0,Ze.emailVisibility=!0,Ze.password=!0,Ze.passwordConfirm=!0,Ze.verified=!0);for(const it in ce)Ze[it]&&(typeof ce[it]>"u"&&(ce[it]=null),B.addValueToFormData($e,it,ce[it]));for(const it in g){const Mt=B.toArray(g[it]);for(const ot of Mt)$e.append(it,ot)}for(const it in b){const Mt=B.toArray(b[it]);for(const ot of Mt)$e.append(it+"."+ot,"")}return $e}function I(){!(u!=null&&u.id)||!(c!=null&&c.email)||un(`Do you really want to sent verification email to ${c.email}?`,()=>he.collection(u.id).requestVerification(c.email).then(()=>{Vt(`Successfully sent verification email to ${c.email}.`)}).catch(ce=>{he.errorResponseHandler(ce)}))}function L(){!(u!=null&&u.id)||!(c!=null&&c.email)||un(`Do you really want to sent password reset email to ${c.email}?`,()=>he.collection(u.id).requestPasswordReset(c.email).then(()=>{Vt(`Successfully sent password reset email to ${c.email}.`)}).catch(ce=>{he.errorResponseHandler(ce)}))}function N(){l?un("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const ce=c==null?void 0:c.clone();if(ce){ce.id="",ce.created="",ce.updated="";const $e=(u==null?void 0:u.schema)||[];for(const Ze of $e)Ze.type==="file"&&delete ce[Ze.name]}T(ce),await cn(),t(20,y="")}const U=()=>C(),Z=()=>I(),ne=()=>L(),G=()=>N(),J=()=>O(),te=()=>t(10,k=Yi),V=()=>t(10,k=yl);function x(ce){d=ce,t(2,d)}function Y(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function se(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function He(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Re(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Fe(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function qe(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function ge(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Se(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Ue(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function lt(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function ue(ce,$e){n.$$.not_equal(g[$e.name],ce)&&(g[$e.name]=ce,t(3,g))}function fe(ce,$e){n.$$.not_equal(b[$e.name],ce)&&(b[$e.name]=ce,t(4,b))}function ae(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}const oe=()=>l&&h?(un("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),C()}),!1):(Vn({}),!0);function je(ce){ie[ce?"unshift":"push"](()=>{f=ce,t(6,f)})}function Me(ce){We.call(this,n,ce)}function Te(ce){We.call(this,n,ce)}return n.$$set=ce=>{"collection"in ce&&t(0,u=ce.collection)},n.$$.update=()=>{var ce;n.$$.dirty[0]&1&&t(12,i=!!((ce=u==null?void 0:u.schema)!=null&&ce.find($e=>$e.type==="editor"))),n.$$.dirty[0]&24&&t(21,s=B.hasNonEmptyProps(g)||B.hasNonEmptyProps(b)),n.$$.dirty[0]&3145732&&t(5,l=s||y!=Lp(d)),n.$$.dirty[0]&36&&t(11,o=d.isNew||l)},[u,C,d,g,b,l,f,c,m,h,k,o,i,a,$,O,I,L,N,T,y,s,U,Z,ne,G,J,te,V,x,Y,se,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je,Me,Te]}class ub extends ye{constructor(e){super(),ve(this,e,d5,c5,be,{collection:0,show:19,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function p5(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[Pe(i=Ye.call(null,e,n[2]?"":"Copy")),K(e,"click",yn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&zt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:X,o:X,d(o){o&&w(e),s=!1,Le(l)}}}function m5(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm lin Line truncated
`},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function z5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New record</span>`,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[38]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function B5(n){let e,t,i;return{c(){e=v("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){S(s,e,l),t||(i=K(e,"click",n[37]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function nm(n){let e,t,i,s,l,o,r=n[53].id+"",a,u,f;s=new fb({props:{value:n[53].id}});let c=n[2].isAuth&&im(n);return{c(){e=v("td"),t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),a=z(r),u=D(),c&&c.c(),p(o,"class","txt"),p(i,"class","label"),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(d,m){S(d,e,m),_(e,t),_(t,i),j(s,i,null),_(i,l),_(i,o),_(o,a),_(t,u),c&&c.m(t,null),f=!0},p(d,m){const h={};m[0]&16&&(h.value=d[53].id),s.$set(h),(!f||m[0]&16)&&r!==(r=d[53].id+"")&&re(a,r),d[2].isAuth?c?c.p(d,m):(c=im(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){f||(A(s.$$.fragment,d),f=!0)},o(d){P(s.$$.fragment,d),f=!1},d(d){d&&w(e),H(s),c&&c.d()}}}function im(n){let e;function t(l,o){return l[53].verified?W5:U5}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function U5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function W5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function sm(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&lm(n),o=i&&om(n);return{c(){l&&l.c(),t=D(),o&&o.c(),s=Ae()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=lm(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=om(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function lm(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[53].username)),t?K5:Y5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function Y5(n){let e,t=n[53].username+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].username)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].username+"")&&re(i,t),o[0]&16&&s!==(s=l[53].username)&&p(e,"title",s)},d(l){l&&w(e)}}}function K5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function om(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[53].email)),t?Z5:J5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function J5(n){let e,t=n[53].email+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].email)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].email+"")&&re(i,t),o[0]&16&&s!==(s=l[53].email)&&p(e,"title",s)},d(l){l&&w(e)}}}function Z5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function rm(n,e){let t,i,s;return i=new A5({props:{record:e[53],field:e[56]}}),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&16&&(r.record=e[53]),o[0]&65536&&(r.field=e[56]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function am(n){let e,t,i;return t=new Zi({props:{date:n[53].created}}),{c(){e=v("td"),q(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function um(n){let e,t,i;return t=new Zi({props:{date:n[53].updated}}),{c(){e=v("td"),q(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function fm(n,e){let t,i,s,l,o,r,a,u,f,c,d=!e[7].includes("@id"),m,h,g=[],b=new Map,y,k=!e[7].includes("@created"),T,C=!e[7].includes("@updated"),M,$,O,E,I,L;function N(){return e[34](e[53])}let F=d&&nm(e),U=e[2].isAuth&&sm(e),Z=e[16];const ne=x=>x[56].name;for(let x=0;x<Z.length;x+=1){let Y=Wp(e,Z,x),se=ne(Y);b.sLine truncated
`),o[0]&544&&(r.beforeHide=l[43]),o[0]&3485|o[1]&16777216&&(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[44](null),q(e,l)}}}const Yi="form",yl="providers";function Lp(n){return JSON.stringify(n)}function d5(n,e,t){let i,s,l,o;const r=$t(),a="record_"+B.randomString(5);let{collection:u}=e,f,c=null,d=new Ki,m=!1,h=!1,g={},b={},y="",k=Yi;function T(ce){return M(ce),t(9,h=!0),t(10,k=Yi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(ce){Vn({}),t(7,c=ce||{}),ce!=null&&ce.clone?t(2,d=ce.clone()):t(2,d=new Ki),t(3,g={}),t(4,b={}),await cn(),t(20,y=Lp(d))}function $(){if(m||!o||!(u!=null&&u.id))return;t(8,m=!0);const ce=E();let $e;d.isNew?$e=he.collection(u.id).create(ce):$e=he.collection(u.id).update(d.id,ce),$e.then(Ze=>{Vt(d.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),C(),r("save",Ze)}).catch(Ze=>{he.errorResponseHandler(Ze)}).finally(()=>{t(8,m=!1)})}function O(){c!=null&&c.id&&un("Do you really want to delete the selected record?",()=>he.collection(c.collectionId).delete(c.id).then(()=>{C(),Vt("Successfully deleted record."),r("delete",c)}).catch(ce=>{he.errorResponseHandler(ce)}))}function E(){const ce=(d==null?void 0:d.export())||{},$e=new FormData,Ze={};for(const it of(u==null?void 0:u.schema)||[])Ze[it.name]=!0;u!=null&&u.isAuth&&(Ze.username=!0,Ze.email=!0,Ze.emailVisibility=!0,Ze.password=!0,Ze.passwordConfirm=!0,Ze.verified=!0);for(const it in ce)Ze[it]&&(typeof ce[it]>"u"&&(ce[it]=null),B.addValueToFormData($e,it,ce[it]));for(const it in g){const Mt=B.toArray(g[it]);for(const ot of Mt)$e.append(it,ot)}for(const it in b){const Mt=B.toArray(b[it]);for(const ot of Mt)$e.append(it+"."+ot,"")}return $e}function I(){!(u!=null&&u.id)||!(c!=null&&c.email)||un(`Do you really want to sent verification email to ${c.email}?`,()=>he.collection(u.id).requestVerification(c.email).then(()=>{Vt(`Successfully sent verification email to ${c.email}.`)}).catch(ce=>{he.errorResponseHandler(ce)}))}function L(){!(u!=null&&u.id)||!(c!=null&&c.email)||un(`Do you really want to sent password reset email to ${c.email}?`,()=>he.collection(u.id).requestPasswordReset(c.email).then(()=>{Vt(`Successfully sent password reset email to ${c.email}.`)}).catch(ce=>{he.errorResponseHandler(ce)}))}function N(){l?un("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const ce=c==null?void 0:c.clone();if(ce){ce.id="",ce.created="",ce.updated="";const $e=(u==null?void 0:u.schema)||[];for(const Ze of $e)Ze.type==="file"&&delete ce[Ze.name]}T(ce),await cn(),t(20,y="")}const U=()=>C(),J=()=>I(),ne=()=>L(),Z=()=>N(),te=()=>O(),ee=()=>t(10,k=Yi),R=()=>t(10,k=yl);function X(ce){d=ce,t(2,d)}function Y(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function se(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function He(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Re(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Fe(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function qe(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function ge(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Se(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Ue(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function lt(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function ue(ce,$e){n.$$.not_equal(g[$e.name],ce)&&(g[$e.name]=ce,t(3,g))}function fe(ce,$e){n.$$.not_equal(b[$e.name],ce)&&(b[$e.name]=ce,t(4,b))}function ae(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}const oe=()=>l&&h?(un("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),C()}),!1):(Vn({}),!0);function je(ce){ie[ce?"unshift":"push"](()=>{f=ce,t(6,f)})}function Me(ce){We.call(this,n,ce)}function Te(ce){We.call(this,n,ce)}return n.$$set=ce=>{"collection"in ce&&t(0,u=ce.collection)},n.$$.update=()=>{var ce;n.$$.dirty[0]&1&&t(12,i=!!((ce=u==null?void 0:u.schema)!=null&&ce.find($e=>$e.type==="editor"))),n.$$.dirty[0]&24&&t(21,s=B.hasNonEmptyProps(g)||B.hasNonEmptyProps(b)),n.$$.dirty[0]&3145732&&t(5,l=s||y!=Lp(d)),n.$$.dirty[0]&36&&t(11,o=d.isNew||l)},[u,C,d,g,b,l,f,c,m,h,k,o,i,a,$,O,I,L,N,T,y,s,U,J,ne,Z,te,ee,R,X,Y,se,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je,Me,Te]}class ub extends ye{constructor(e){super(),ve(this,e,d5,c5,be,{collection:0,show:19,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function p5(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[Pe(i=Ye.call(null,e,n[2]?"":"Copy")),K(e,"click",yn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&zt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:G,o:G,d(o){o&&w(e),s=!1,Le(l)}}}function m5(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm l Line truncated
`},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function z5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New record</span>`,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[38]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function B5(n){let e,t,i;return{c(){e=v("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){S(s,e,l),t||(i=K(e,"click",n[37]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function nm(n){let e,t,i,s,l,o,r=n[53].id+"",a,u,f;s=new fb({props:{value:n[53].id}});let c=n[2].isAuth&&im(n);return{c(){e=v("td"),t=v("div"),i=v("div"),V(s.$$.fragment),l=D(),o=v("div"),a=z(r),u=D(),c&&c.c(),p(o,"class","txt"),p(i,"class","label"),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(d,m){S(d,e,m),_(e,t),_(t,i),H(s,i,null),_(i,l),_(i,o),_(o,a),_(t,u),c&&c.m(t,null),f=!0},p(d,m){const h={};m[0]&16&&(h.value=d[53].id),s.$set(h),(!f||m[0]&16)&&r!==(r=d[53].id+"")&&re(a,r),d[2].isAuth?c?c.p(d,m):(c=im(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){f||(A(s.$$.fragment,d),f=!0)},o(d){P(s.$$.fragment,d),f=!1},d(d){d&&w(e),q(s),c&&c.d()}}}function im(n){let e;function t(l,o){return l[53].verified?W5:U5}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function U5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function W5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function sm(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&lm(n),o=i&&om(n);return{c(){l&&l.c(),t=D(),o&&o.c(),s=Ae()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=lm(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=om(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function lm(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[53].username)),t?K5:Y5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function Y5(n){let e,t=n[53].username+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].username)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].username+"")&&re(i,t),o[0]&16&&s!==(s=l[53].username)&&p(e,"title",s)},d(l){l&&w(e)}}}function K5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function om(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[53].email)),t?Z5:J5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function J5(n){let e,t=n[53].email+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].email)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].email+"")&&re(i,t),o[0]&16&&s!==(s=l[53].email)&&p(e,"title",s)},d(l){l&&w(e)}}}function Z5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function rm(n,e){let t,i,s;return i=new A5({props:{record:e[53],field:e[56]}}),{key:n,first:null,c(){t=Ae(),V(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),H(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&16&&(r.record=e[53]),o[0]&65536&&(r.field=e[56]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),q(i,l)}}}function am(n){let e,t,i;return t=new Zi({props:{date:n[53].created}}),{c(){e=v("td"),V(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),H(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),q(t)}}}function um(n){let e,t,i;return t=new Zi({props:{date:n[53].updated}}),{c(){e=v("td"),V(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),H(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),q(t)}}}function fm(n,e){let t,i,s,l,o,r,a,u,f,c,d=!e[7].includes("@id"),m,h,g=[],b=new Map,y,k=!e[7].includes("@created"),T,C=!e[7].includes("@updated"),M,$,O,E,I,L;function N(){return e[34](e[53])}let F=d&&nm(e),U=e[2].isAuth&&sm(e),J=e[16];const ne=X=>X[56].name;for(let X=0;X<J.length;X+=1){let Y=Wp(e,J,X),se=ne(Y);b.sLine truncated
<span class="txt">API Preview</span>`,g=D(),b=v("button"),b.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New record</span>`,y=D(),q(k.$$.fragment),T=D(),C=v("div"),M=D(),q($.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(h,"type","button"),p(h,"class","btn btn-outline"),p(b,"type","button"),p(b,"class","btn btn-expanded"),p(m,"class","btns-group"),p(e,"class","page-header"),p(C,"class","clearfix m-b-base")},m(G,J){S(G,e,J),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),_(e,u),F&&F.m(u,null),_(u,f),j(c,u,null),_(e,d),_(e,m),_(m,h),_(m,g),_(m,b),S(G,y,J),j(k,G,J),S(G,T,J),S(G,C,J),S(G,M,J),j($,G,J),I=!0,L||(N=[K(h,"click",n[16]),K(b,"click",n[17])],L=!0)},p(G,J){(!I||J[0]&4)&&o!==(o=G[2].name+"")&&re(r,o),G[9]?F&&(F.d(1),F=null):F?F.p(G,J):(F=hm(G),F.c(),F.m(u,f));const te={};J[0]&1&&(te.value=G[0]),J[0]&4&&(te.autocompleteCollection=G[2]),k.$set(te);const V={};J[0]&4&&(V.collection=G[2]),!O&&J[0]&1&&(O=!0,V.filter=G[0],we(()=>O=!1)),!E&&J[0]&2&&(E=!0,V.sort=G[1],we(()=>E=!1)),$.$set(V)},i(G){I||(A(c.$$.fragment,G),A(k.$$.fragment,G),A($.$$.fragment,G),I=!0)},o(G){P(c.$$.fragment,G),P(k.$$.fragment,G),P($.$$.fragment,G),I=!1},d(G){G&&w(e),F&&F.d(),H(c),G&&w(y),H(k,G),G&&w(T),G&&w(C),G&&w(M),n[19](null),H($,G),L=!1,Le(N)}}}function aD(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=D(),i=v("button"),i.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">Create new collection</span>`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[13]),s=!0)},p:X,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function uD(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function fD(n){let e,t,i;function s(r,a){return r[9]?uD:aD}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=D(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),_(e,t),_(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function cD(n){let e;return{c(){e=v("div"),e.innerHTML=`<span class="loader loader-lg"></span>
<h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function dD(n){let e,t,i,s,l,o,r,a,u;const f=[oD,lD,sD],c=[];function d(b,y){return b[3]&&!b[8].length?0:b[8].length?2:1}e=d(n),t=c[e]=f[e](n);let m={};s=new tu({props:m}),n[24](s);let h={};o=new O$({props:h}),n[25](o);let g={collection:n[2]};return a=new ub({props:g}),n[26](a),a.$on("save",n[27]),a.$on("delete",n[28]),{c(){t.c(),i=D(),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),q(a.$$.fragment)},m(b,y){c[e].m(b,y),S(b,i,y),j(s,b,y),S(b,l,y),j(o,b,y),S(b,r,y),j(a,b,y),u=!0},p(b,y){let k=e;e=d(b),e===k?c[e].p(b,y):(pe(),P(c[k],1,1,()=>{c[k]=null}),me(),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 T={};s.$set(T);const C={};o.$set(C);const M={};y[0]&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&&w(i),n[24](null),H(s,b),b&&w(l),n[25](null),H(o,b),b&&w(r),n[26](null),H(a,b)}}}function pD(n,e,t){let i,s,l,o,r,a,u;Je(n,Si,V=>t(2,s=V)),Je(n,St,V=>t(29,l=V)),Je(n,Lo,V=>t(3,o=V)),Je(n,ma,V=>t(12,r=V)),Je(n,es,V=>t(8,a=V)),Je(n,Cs,V=>t(9,u=V));const f=new URLSearchParams(r);let c,d,m,h,g=f.get("filter")||"",b=f.get("sort")||"-created",y=f.get("collectionId")||(s==null?void 0:s.id);function k(){t(10,y=s.id),t(1,b="-created"),t(0,g="")}nb(y);const T=()=>c==null?void 0:c.show(),C=()=>c==null?void 0:c.show(s),M=()=>h==null?void 0:h.load(),$=()=>d==null?void 0:d.show(s),O=()=>m==null?void 0:m.show(),E=V=>t(0,g=V.detail);function I(V){ie[V?"unshift":"push"](()=>{h=V,t(7,h)})}function L(V){g=V,t(0,g)}function N(V){b=V,t(1,b)}const F=V=>m==null?void 0:m.show(V==null?void 0:V.detail),U=()=>m==null?void 0:m.show();function Z(V){ie[V?"unshift":"push"](()=>{c=V,t(4,c)})}function ne(V){ie[V?"unshift":"push"](()=>{d=V,t(5,d)})}function G(V){ie[V?"unshift":"push"](()=>{m=V,t(6,m)})}const J=()=>h==null?void 0:h.reloadLoadedPages(),te=()=>h==null?void 0:h.reloadLoadedPages();return n.$$.update=()=>{if(n.$$.dirty[0]&4096&&t(11,i=new URLSearchParams(r)),n.$$.dirty[0]&3080&&!o&&i.get("collectionId")&&i.get("collectionId")!=y&&l3(i.get("collectionId")),n.$$.dirty[0]&1028&&s!=null&&s.id&&y!=s.id&&k(),n.$$.dirty[0]&7&&(b||g||s!=null&&s.id)){const V=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:g,sort:b}).toString();Ti("/collections?"+V)}n.$$.dirty[0]&4&&Yt(St,l=(s==null?void 0:s.name)||"Collections",l)},[g,b,s,o,c,d,m,h,a,u,y,i,r,T,C,M,$,O,E,I,L,N,F,U,Z,ne,G,J,te]}class mD extends ye{constructor(e){super(),ve(this,e,pD,dD,be,{},null,[-1,-1])}}function hD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=D(),l=v("a"),l.innerHTML=`<i class="ri-home-gear-line"></i>
<span class="txt">New record</span>`,y=D(),V(k.$$.fragment),T=D(),C=v("div"),M=D(),V($.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(h,"type","button"),p(h,"class","btn btn-outline"),p(b,"type","button"),p(b,"class","btn btn-expanded"),p(m,"class","btns-group"),p(e,"class","page-header"),p(C,"class","clearfix m-b-base")},m(Z,te){S(Z,e,te),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),_(e,u),F&&F.m(u,null),_(u,f),H(c,u,null),_(e,d),_(e,m),_(m,h),_(m,g),_(m,b),S(Z,y,te),H(k,Z,te),S(Z,T,te),S(Z,C,te),S(Z,M,te),H($,Z,te),I=!0,L||(N=[K(h,"click",n[16]),K(b,"click",n[17])],L=!0)},p(Z,te){(!I||te[0]&4)&&o!==(o=Z[2].name+"")&&re(r,o),Z[9]?F&&(F.d(1),F=null):F?F.p(Z,te):(F=hm(Z),F.c(),F.m(u,f));const ee={};te[0]&1&&(ee.value=Z[0]),te[0]&4&&(ee.autocompleteCollection=Z[2]),k.$set(ee);const R={};te[0]&4&&(R.collection=Z[2]),!O&&te[0]&1&&(O=!0,R.filter=Z[0],we(()=>O=!1)),!E&&te[0]&2&&(E=!0,R.sort=Z[1],we(()=>E=!1)),$.$set(R)},i(Z){I||(A(c.$$.fragment,Z),A(k.$$.fragment,Z),A($.$$.fragment,Z),I=!0)},o(Z){P(c.$$.fragment,Z),P(k.$$.fragment,Z),P($.$$.fragment,Z),I=!1},d(Z){Z&&w(e),F&&F.d(),q(c),Z&&w(y),q(k,Z),Z&&w(T),Z&&w(C),Z&&w(M),n[19](null),q($,Z),L=!1,Le(N)}}}function aD(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=D(),i=v("button"),i.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">Create new collection</span>`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[13]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function uD(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function fD(n){let e,t,i;function s(r,a){return r[9]?uD:aD}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=D(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),_(e,t),_(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function cD(n){let e;return{c(){e=v("div"),e.innerHTML=`<span class="loader loader-lg"></span>
<h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function dD(n){let e,t,i,s,l,o,r,a,u;const f=[oD,lD,sD],c=[];function d(b,y){return b[3]&&!b[8].length?0:b[8].length?2:1}e=d(n),t=c[e]=f[e](n);let m={};s=new tu({props:m}),n[24](s);let h={};o=new O$({props:h}),n[25](o);let g={collection:n[2]};return a=new ub({props:g}),n[26](a),a.$on("save",n[27]),a.$on("delete",n[28]),{c(){t.c(),i=D(),V(s.$$.fragment),l=D(),V(o.$$.fragment),r=D(),V(a.$$.fragment)},m(b,y){c[e].m(b,y),S(b,i,y),H(s,b,y),S(b,l,y),H(o,b,y),S(b,r,y),H(a,b,y),u=!0},p(b,y){let k=e;e=d(b),e===k?c[e].p(b,y):(pe(),P(c[k],1,1,()=>{c[k]=null}),me(),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 T={};s.$set(T);const C={};o.$set(C);const M={};y[0]&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&&w(i),n[24](null),q(s,b),b&&w(l),n[25](null),q(o,b),b&&w(r),n[26](null),q(a,b)}}}function pD(n,e,t){let i,s,l,o,r,a,u;Je(n,Si,R=>t(2,s=R)),Je(n,St,R=>t(29,l=R)),Je(n,Po,R=>t(3,o=R)),Je(n,ma,R=>t(12,r=R)),Je(n,es,R=>t(8,a=R)),Je(n,Cs,R=>t(9,u=R));const f=new URLSearchParams(r);let c,d,m,h,g=f.get("filter")||"",b=f.get("sort")||"-created",y=f.get("collectionId")||(s==null?void 0:s.id);function k(){t(10,y=s.id),t(1,b="-created"),t(0,g="")}nb(y);const T=()=>c==null?void 0:c.show(),C=()=>c==null?void 0:c.show(s),M=()=>h==null?void 0:h.load(),$=()=>d==null?void 0:d.show(s),O=()=>m==null?void 0:m.show(),E=R=>t(0,g=R.detail);function I(R){ie[R?"unshift":"push"](()=>{h=R,t(7,h)})}function L(R){g=R,t(0,g)}function N(R){b=R,t(1,b)}const F=R=>m==null?void 0:m.show(R==null?void 0:R.detail),U=()=>m==null?void 0:m.show();function J(R){ie[R?"unshift":"push"](()=>{c=R,t(4,c)})}function ne(R){ie[R?"unshift":"push"](()=>{d=R,t(5,d)})}function Z(R){ie[R?"unshift":"push"](()=>{m=R,t(6,m)})}const te=()=>h==null?void 0:h.reloadLoadedPages(),ee=()=>h==null?void 0:h.reloadLoadedPages();return n.$$.update=()=>{if(n.$$.dirty[0]&4096&&t(11,i=new URLSearchParams(r)),n.$$.dirty[0]&3080&&!o&&i.get("collectionId")&&i.get("collectionId")!=y&&l3(i.get("collectionId")),n.$$.dirty[0]&1028&&s!=null&&s.id&&y!=s.id&&k(),n.$$.dirty[0]&7&&(b||g||s!=null&&s.id)){const R=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:g,sort:b}).toString();Ti("/collections?"+R)}n.$$.dirty[0]&4&&Yt(St,l=(s==null?void 0:s.name)||"Collections",l)},[g,b,s,o,c,d,m,h,a,u,y,i,r,T,C,M,$,O,E,I,L,N,F,U,J,ne,Z,te,ee]}class mD extends ye{constructor(e){super(),ve(this,e,pD,dD,be,{},null,[-1,-1])}}function hD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=D(),l=v("a"),l.innerHTML=`<i class="ri-home-gear-line"></i>
<span class="txt">Application</span>`,o=D(),r=v("a"),r.innerHTML=`<i class="ri-send-plane-2-line"></i>
<span class="txt">Mail settings</span>`,a=D(),u=v("a"),u.innerHTML=`<i class="ri-archive-drawer-line"></i>
<span class="txt">Files storage</span>`,f=D(),c=v("div"),c.innerHTML='<span class="txt">Sync</span>',d=D(),m=v("a"),m.innerHTML=`<i class="ri-uninstall-line"></i>
@@ -146,14 +146,14 @@ Updated: ${k[2].updated}`,position:"left"}),T[1]&8388608&&h!==(h=k[54])&&p(m,"id
<span class="txt">Import collections</span>`,b=D(),y=v("div"),y.textContent="Authentication",k=D(),T=v("a"),T.innerHTML=`<i class="ri-lock-password-line"></i>
<span class="txt">Auth providers</span>`,C=D(),M=v("a"),M.innerHTML=`<i class="ri-key-line"></i>
<span class="txt">Token options</span>`,$=D(),O=v("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(g,"href","/settings/import-collections"),p(g,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"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(L,N){S(L,e,N),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),_(t,f),_(t,c),_(t,d),_(t,m),_(t,h),_(t,g),_(t,b),_(t,y),_(t,k),_(t,T),_(t,C),_(t,M),_(t,$),_(t,O),E||(I=[Pe(Fn.call(null,l,{path:"/settings"})),Pe(Xt.call(null,l)),Pe(Fn.call(null,r,{path:"/settings/mail/?.*"})),Pe(Xt.call(null,r)),Pe(Fn.call(null,u,{path:"/settings/storage/?.*"})),Pe(Xt.call(null,u)),Pe(Fn.call(null,m,{path:"/settings/export-collections/?.*"})),Pe(Xt.call(null,m)),Pe(Fn.call(null,g,{path:"/settings/import-collections/?.*"})),Pe(Xt.call(null,g)),Pe(Fn.call(null,T,{path:"/settings/auth-providers/?.*"})),Pe(Xt.call(null,T)),Pe(Fn.call(null,M,{path:"/settings/tokens/?.*"})),Pe(Xt.call(null,M)),Pe(Fn.call(null,O,{path:"/settings/admins/?.*"})),Pe(Xt.call(null,O))],E=!0)},p:X,i:X,o:X,d(L){L&&w(e),E=!1,Le(I)}}}class Di extends ye{constructor(e){super(),ve(this,e,null,hD,be,{})}}function gm(n,e,t){const i=n.slice();return i[30]=e[t],i}function _m(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[gD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(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){H(e,i)}}}function gD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="ID",o=D(),r=v("div"),a=v("i"),f=D(),c=v("input"),p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[29]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[29]),c.value=m=n[1].id,c.disabled=!0},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),S(b,r,y),_(r,a),S(b,f,y),S(b,c,y),h||(g=Pe(u=Ye.call(null,a,{text:`Created: ${n[1].created}
<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(g,"href","/settings/import-collections"),p(g,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"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(L,N){S(L,e,N),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),_(t,f),_(t,c),_(t,d),_(t,m),_(t,h),_(t,g),_(t,b),_(t,y),_(t,k),_(t,T),_(t,C),_(t,M),_(t,$),_(t,O),E||(I=[Pe(Fn.call(null,l,{path:"/settings"})),Pe(Xt.call(null,l)),Pe(Fn.call(null,r,{path:"/settings/mail/?.*"})),Pe(Xt.call(null,r)),Pe(Fn.call(null,u,{path:"/settings/storage/?.*"})),Pe(Xt.call(null,u)),Pe(Fn.call(null,m,{path:"/settings/export-collections/?.*"})),Pe(Xt.call(null,m)),Pe(Fn.call(null,g,{path:"/settings/import-collections/?.*"})),Pe(Xt.call(null,g)),Pe(Fn.call(null,T,{path:"/settings/auth-providers/?.*"})),Pe(Xt.call(null,T)),Pe(Fn.call(null,M,{path:"/settings/tokens/?.*"})),Pe(Xt.call(null,M)),Pe(Fn.call(null,O,{path:"/settings/admins/?.*"})),Pe(Xt.call(null,O))],E=!0)},p:G,i:G,o:G,d(L){L&&w(e),E=!1,Le(I)}}}class Di extends ye{constructor(e){super(),ve(this,e,null,hD,be,{})}}function gm(n,e,t){const i=n.slice();return i[30]=e[t],i}function _m(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[gD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(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){q(e,i)}}}function gD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="ID",o=D(),r=v("div"),a=v("i"),f=D(),c=v("input"),p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[29]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[29]),c.value=m=n[1].id,c.disabled=!0},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),S(b,r,y),_(r,a),S(b,f,y),S(b,c,y),h||(g=Pe(u=Ye.call(null,a,{text:`Created: ${n[1].created}
Updated: ${n[1].updated}`,position:"left"})),h=!0)},p(b,y){y[0]&536870912&&l!==(l=b[29])&&p(e,"for",l),u&&zt(u.update)&&y[0]&2&&u.update.call(null,{text:`Created: ${b[1].created}
Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c,"id",d),y[0]&2&&m!==(m=b[1].id)&&c.value!==m&&(c.value=m)},d(b){b&&w(e),b&&w(o),b&&w(r),b&&w(f),b&&w(c),h=!1,g()}}}function bm(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=D(),Hn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),_(e,t),_(e,s),o||(r=K(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function _D(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Email",o=D(),r=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[3]),u||(f=K(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&de(r,c[3])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function vm(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[bD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(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){H(e,i)}}}function bD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ym(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[vD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[yD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),q(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){S(f,e,c),_(e,t),_(t,i),j(s,i,null),_(t,l),_(t,o),j(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&536871424|c[1]&4&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{a||(a=ze(t,It,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=ze(t,It,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function vD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[8]),u||(f=K(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&de(r,c[8])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function yD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password confirm",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[9]),u||(f=K(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&de(r,c[9])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function kD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[1].isNew&&_m(n),g=[0,1,2,3,4,5,6,7,8,9],b=[];for(let T=0;T<10;T+=1)b[T]=bm(gm(n,g,T));a=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[_D,({uniqueId:T})=>({29:T}),({uniqueId:T})=>[T?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].isNew&&vm(n),k=(n[1].isNew||n[4])&&ym(n);return{c(){e=v("form"),h&&h.c(),t=D(),i=v("div"),s=v("p"),s.textContent="Avatar",l=D(),o=v("div");for(let T=0;T<10;T+=1)b[T].c();r=D(),q(a.$$.fragment),u=D(),y&&y.c(),f=D(),k&&k.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(T,C){S(T,e,C),h&&h.m(e,null),_(e,t),_(e,i),_(i,s),_(i,l),_(i,o);for(let M=0;M<10;M+=1)b[M].m(o,null);_ Line truncated
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[15]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function TD(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].isNew&&km(n);return{c(){m&&m.c(),e=D(),t=v("button"),i=v("span"),i.textContent="Cancel",s=D(),l=v("button"),o=v("span"),a=z(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-transparent"),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],Q(l,"btn-loading",n[6])},m(h,g){m&&m.m(h,g),S(h,e,g),S(h,t,g),_(t,i),S(h,s,g),S(h,l,g),_(l,o),_(o,a),f=!0,c||(d=K(t,"click",n[16]),c=!0)},p(h,g){h[1].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),me()):m?(m.p(h,g),g[0]&2&&A(m,1)):(m=km(h),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||g[0]&64)&&(t.disabled=h[6]),(!f||g[0]&2)&&r!==(r=h[1].isNew?"Create":"Save changes")&&re(a,r),(!f||g[0]&1088&&u!==(u=!h[10]||h[6]))&&(l.disabled=u),(!f||g[0]&64)&&Q(l,"btn-loading",h[6])},i(h){f||(A(m),f=!0)},o(h){P(m),f=!1},d(h){m&&m.d(h),h&&w(e),h&&w(t),h&&w(s),h&&w(l),c=!1,d()}}}function CD(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[TD],header:[wD],default:[kD]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(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[23](null),H(e,s)}}}function $D(n,e,t){let i;const s=$t(),l="admin_"+B.randomString(5);let o,r=new Ji,a=!1,u=!1,f=0,c="",d="",m="",h=!1;function g(G){return y(G),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(G){t(1,r=G!=null&&G.clone?G.clone():new Ji),k()}function k(){t(4,h=!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=""),Vn({})}function T(){if(a||!i)return;t(6,a=!0);const G={email:c,avatar:f};(r.isNew||h)&&(G.password=d,G.passwordConfirm=m);let J;r.isNew?J=he.admins.create(G):J=he.admins.update(r.id,G),J.then(async te=>{var V;t(7,u=!1),b(),Vt(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",te),((V=he.authStore.model)==null?void 0:V.id)===te.id&&he.authStore.save(he.authStore.token,te)}).catch(te=>{he.errorResponseHandler(te)}).finally(()=>{t(6,a=!1)})}function C(){r!=null&&r.id&&un("Do you really want to delete the selected admin?",()=>he.admins.delete(r.id).then(()=>{t(7,u=!1),b(),Vt("Successfully deleted admin."),s("delete",r)}).catch(G=>{he.errorResponseHandler(G)}))}const M=()=>C(),$=()=>b(),O=G=>t(2,f=G);function E(){c=this.value,t(3,c)}function I(){h=this.checked,t(4,h)}function L(){d=this.value,t(8,d)}function N(){m=this.value,t(9,m)}const F=()=>i&&u?(un("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function U(G){ie[G?"unshift":"push"](()=>{o=G,t(5,o)})}function Z(G){We.call(this,n,G)}function ne(G){We.call(this,n,G)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||h||c!==r.email||f!==r.avatar)},[b,r,f,c,h,o,a,u,d,m,i,l,T,C,g,M,$,O,E,I,L,N,F,U,Z,ne]}class MD extends ye{constructor(e){super(),ve(this,e,$D,CD,be,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function wm(n,e,t){const i=n.slice();return i[24]=e[t],i}function DD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:X,d(l){l&&w(e)}}}function OD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:X,d(l){l&&w(e)}}}function ED(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:X,d(l){l&&w(e)}}}function AD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:X,d(l){l&&w(e)}}}function Sm(n){let e;function t(l,o){return l[5]?PD:ID}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(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&&w(e)}}}function ID(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Tm(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),Line truncated
`},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function Tm(n){let e,t,i;return{c(){e=v("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){S(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function Cm(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $m(n,e){let t,i,s,l,o,r,a,u,f,c,d,m=e[24].id+"",h,g,b,y,k,T=e[24].email+"",C,M,$,O,E,I,L,N,F,U,Z,ne,G,J;f=new fb({props:{value:e[24].id}});let te=e[24].id===e[7].id&&Cm();E=new Zi({props:{date:e[24].created}}),N=new Zi({props:{date:e[24].updated}});function V(){return e[15](e[24])}function x(...Y){return e[16](e[24],...Y)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=D(),a=v("td"),u=v("div"),q(f.$$.fragment),c=D(),d=v("span"),h=z(m),g=D(),te&&te.c(),b=D(),y=v("td"),k=v("span"),C=z(T),$=D(),O=v("td"),q(E.$$.fragment),I=D(),L=v("td"),q(N.$$.fragment),F=D(),U=v("td"),U.innerHTML='<i class="ri-arrow-right-line"></i>',Z=D(),Hn(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(d,"class","txt"),p(u,"class","label"),p(a,"class","col-type-text col-field-id"),p(k,"class","txt txt-ellipsis"),p(k,"title",M=e[24].email),p(y,"class","col-type-email col-field-email"),p(O,"class","col-type-date col-field-created"),p(L,"class","col-type-date col-field-updated"),p(U,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Y,se){S(Y,t,se),_(t,i),_(i,s),_(s,l),_(t,r),_(t,a),_(a,u),j(f,u,null),_(u,c),_(u,d),_(d,h),_(a,g),te&&te.m(a,null),_(t,b),_(t,y),_(y,k),_(k,C),_(t,$),_(t,O),j(E,O,null),_(t,I),_(t,L),j(N,L,null),_(t,F),_(t,U),_(t,Z),ne=!0,G||(J=[K(t,"click",V),K(t,"keydown",x)],G=!0)},p(Y,se){e=Y,(!ne||se&16&&!Hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const He={};se&16&&(He.value=e[24].id),f.$set(He),(!ne||se&16)&&m!==(m=e[24].id+"")&&re(h,m),e[24].id===e[7].id?te||(te=Cm(),te.c(),te.m(a,null)):te&&(te.d(1),te=null),(!ne||se&16)&&T!==(T=e[24].email+"")&&re(C,T),(!ne||se&16&&M!==(M=e[24].email))&&p(k,"title",M);const Re={};se&16&&(Re.date=e[24].created),E.$set(Re);const Fe={};se&16&&(Fe.date=e[24].updated),N.$set(Fe)},i(Y){ne||(A(f.$$.fragment,Y),A(E.$$.fragment,Y),A(N.$$.fragment,Y),ne=!0)},o(Y){P(f.$$.fragment,Y),P(E.$$.fragment,Y),P(N.$$.fragment,Y),ne=!1},d(Y){Y&&w(t),H(f),te&&te.d(),H(E),H(N),G=!1,Le(J)}}}function LD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M=[],$=new Map,O;function E(V){n[11](V)}let I={class:"col-type-text",name:"id",$$slots:{default:[DD]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new Ut({props:I}),ie.push(()=>ke(o,"sort",E));function L(V){n[12](V)}let N={class:"col-type-email col-field-email",name:"email",$$slots:{default:[OD]},$$scope:{ctx:n}};n[2]!==void 0&&(N.sort=n[2]),u=new Ut({props:N}),ie.push(()=>ke(u,"sort",L));function F(V){n[13](V)}let U={class:"col-type-date col-field-created",name:"created",$$slots:{default:[ED]},$$scope:{ctx:n}};n[2]!==void 0&&(U.sort=n[2]),d=new Ut({props:U}),ie.push(()=>ke(d,"sort",F));function Z(V){n[14](V)}let ne={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[AD]},$$scope:{ctx:n}};n[2]!==void 0&&(ne.sort=n[2]),g=new Ut({props:ne}),ie.push(()=>ke(g,"sort",Z));let G=n[4];const J=V=>V[24].id;for(let V=0;V<G.length;V+=1){let x=wm(n,G,V),Y=J(x);$.set(Y,M[V]=$m(Y,x))}let te=null;return G.length||(te=Sm(n)),{c(){e=v("table"),t=v("thead"),i=v("tr"),s=v("th"),l=D(),q(o.$$.fragment),a=D(),q(u.$$.fragment),c=D(),q(d.$$.fragment),h=D(),q(g.$$.fragment),y=D(),k=v("th"),T=D(),C=v("tbody");for(let V=0;V<M.length;V+=1)M[V].c();te&&te.c(),p(s,"class","min-width"),p(k,"class","col-type-action min-width"),p(e,"class","table"),Q(e,"table-loading",n[5])},m(V,x){S(V,e,x),_(e,t),_(t,i),_(i,s),_(i,l),j(o,i,null),_(i,a),j(u,i,null),_(i,c),j(d,i,null),_(i,h),j(g,i,null),_(i,y),_(i,k),_(e,T),_(e,C);for(let Y=0;Y<M.length;Y+=1)M[Y].m(C,null);te&&te.m(C,null),O=!0},p(V,x){const Y={};x&134217728&&(Y.$$scope={dirty:x,ctx:V}),!r&&x&4&&(r=!0,Y.sort=V[2],we(()=>r=!1)),o.$set(Y);const se={};x&134217728&&(se.$$scope={dirty:x,ctx:V}),!f&&x&4&&(f=!0,se.sort=V[2],we(()=>f=!1)),u.$set(se);const He={};x&134217728&&(He.$$scope={dirty:x,ctx:V}),!m&&x&4&&(m=!0,He.sort=V[2],we(()=>m=!1)),d.$set(He);const Re={};x&134217728&&(Re.$$scope={dirty:x,ctx:V}),!b&&x&4&&(b=!0,Re.sort=V[2],we(()=>b=!1)),g.$set(Re),x&186&&(G=V[4],pe(),M=wt(M,x,J,1,V,G,$,C,tn,$m,null,wm),me(),!G.length&&te?te.p(V,x):G.length?te&&(te.d(1),te=null):(te=Sm(V),te.c(),te.m(C,null))),(!O||x&32)&&Q(e,"table-loading",V[5])},i(V){if(!O){A(o.$$.fragment,V),A(u.$$.fragment,V),A(d.$$.fragment,V),A(g.$$.fragment,V);for(let x=0;x<G.length;x+=1)A(M[x]);O=!0}},o(V){P(o.$$.fragment,V),P(u.$$.fragment,V),P(d.$$.fragment,V),P(g.$$.fragment,V);for( Line truncated
<span class="txt">New admin</span>`,m=D(),q(h.$$.fragment),g=D(),b=v("div"),y=D(),q(k.$$.fragment),T=D(),E&&E.c(),C=Ae(),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(b,"class","clearfix m-b-base")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(e,r),j(a,e,null),_(e,u),_(e,f),_(e,c),_(e,d),S(I,m,L),j(h,I,L),S(I,g,L),S(I,b,L),S(I,y,L),j(k,I,L),S(I,T,L),E&&E.m(I,L),S(I,C,L),M=!0,$||(O=K(d,"click",n[9]),$=!0)},p(I,L){(!M||L&64)&&re(o,I[6]);const N={};L&2&&(N.value=I[1]),h.$set(N);const F={};L&134217918&&(F.$$scope={dirty:L,ctx:I}),k.$set(F),I[4].length?E?E.p(I,L):(E=Mm(I),E.c(),E.m(C.parentNode,C)):E&&(E.d(1),E=null)},i(I){M||(A(a.$$.fragment,I),A(h.$$.fragment,I),A(k.$$.fragment,I),M=!0)},o(I){P(a.$$.fragment,I),P(h.$$.fragment,I),P(k.$$.fragment,I),M=!1},d(I){I&&w(e),H(a),I&&w(m),H(h,I),I&&w(g),I&&w(b),I&&w(y),H(k,I),I&&w(T),E&&E.d(I),I&&w(C),$=!1,O()}}}function FD(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[ND]},$$scope:{ctx:n}}});let r={};return l=new MD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(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||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[18](null),H(l,a)}}}function RD(n,e,t){let i,s,l;Je(n,ma,N=>t(21,i=N)),Je(n,St,N=>t(6,s=N)),Je(n,Ma,N=>t(7,l=N)),Yt(St,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=[]),he.admins.getFullList(100,{sort:c||"-created",filter:f}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),m(),he.errorResponseHandler(N,!1))})}function m(){t(4,a=[])}const h=()=>d(),g=()=>r==null?void 0:r.show(),b=N=>t(1,f=N.detail);function y(N){c=N,t(2,c)}function k(N){c=N,t(2,c)}function T(N){c=N,t(2,c)}function C(N){c=N,t(2,c)}const M=N=>r==null?void 0:r.show(N),$=(N,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(N))},O=()=>t(1,f="");function E(N){ie[N?"unshift":"push"](()=>{r=N,t(3,r)})}const I=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const N=new URLSearchParams({filter:f,sort:c}).toString();Ti("/settings/admins?"+N),d()}},[d,f,c,r,a,u,s,l,h,g,b,y,k,T,C,M,$,O,E,I,L]}class jD extends ye{constructor(e){super(),ve(this,e,RD,FD,be,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function HD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=D(),l=v("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){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0]),l.focus(),r||(a=K(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]&&de(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function qD(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=z("Password"),s=D(),l=v("input"),r=D(),a=v("div"),u=v("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){S(d,e,m),_(e,t),S(d,s,m),S(d,l,m),de(l,n[1]),S(d,r,m),S(d,a,m),_(a,u),f||(c=[K(l,"input",n[5]),Pe(Xt.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]&&de(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),f=!1,Le(c)}}}function VD(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new _e({props:{class:"form-field required",name:"identity",$$slots:{default:[HD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[qD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="<h4>Admin sign in</h4>",i=D(),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),a=v("button"),a.innerHTML=`<span class="txt">Login</span>
<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"),Q(a,"btn-disabled",n[2]),Q(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){S(d,e,m),_(e,t),_(e,i),j(s,e,null),_(e,l),j(o,e,null),_(e,r),_(e,a),u=!0,f||(c=K(e,"submit",pt(n[3])),f=!0)},p(d,m){const h={};m&769&&(h.$$scope={dirty:m,ctx:d}),s.$set(h);const g={};m&770&&(g.$$scope={dirty:m,ctx:d}),o.$set(g),(!u||m&4)&&Q(a,"btn-disabled",d[2]),(!u||m&4)&&Q(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&&w(e),H(s),H(o),f=!1,c()}}}function zD(n){let e,t;return e=new t_({props:{$$slots:{default:[VD]},$$scope:{ctx:n}}}),{c(){q(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function BD(n,e,t){let i;Je(n,ma,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),he.admins.authWithPassword(l,o).then(()=>{Ca(),Ti("/")}).catch(()=>{cl("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 UD extends ye{constructor(e){super(),ve(this,e,BD,zD,be,{})}}function WD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M;i=new _e({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[KD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[JD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[ZD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[GD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let $=n[3]&&Dm(n);return{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),c=D(),d=v("div"),m=v("div"),h=D(),$&&$.c(),g=D(),b=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(m,"class","flex-fill"),p(y,"class","txt"),p(b,"type","submit"),p(b,"class","btn btn-expanded"),b.disabled=k=!n[3]||n[2],Q(b,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,E){S(O,e,E),_(e,t),j(i,t,null),_(e,s),_(e,l),j(o,l,null),_(e,r),j(a,e,null),_(e,u),j(f,e,null),_(e,c),_(e,d),_(d,m),_(d,h),$&&$.m(d,null),_(d,g),_(d,b),_(b,y),T=!0,C||(M=K(b,"click",n[13]),C=!0)},p(O,E){const I={};E&1572865&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&1572865&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&1572865&&(N.$$scope={dirty:E,ctx:O}),a.$set(N);const F={};E&1572865&&(F.$$scope={dirty:E,ctx:O}),f.$set(F),O[3]?$?$.p(O,E):($=Dm(O),$.c(),$.m(d,g)):$&&($.d(1),$=null),(!T||E&12&&k!==(k=!O[3]||O[2]))&&(b.disabled=k),(!T||E&4)&&Q(b,"btn-loading",O[2])},i(O){T||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),T=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(a.$$.fragment,O),P(f.$$.fragment,O),T=!1},d(O){O&&w(e),H(i),H(o),H(a),H(f),$&&$.d(),C=!1,M()}}}function YD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function KD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application name"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.appName),r||(a=K(l,"input",n[8]),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].meta.appName&&de(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function JD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application url"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.appUrl),r||(a=K(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].meta.appUrl&&de(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function ZD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Logs max days retention"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].logs.maxDays),r||(a=K(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&&ht(l.value)!==u[0].logs.maxDays&&de(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function GD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("spanLine truncated
<div class="breadcrumb-item">Application</div></nav>`,t=D(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),_(i,s),c[l].m(s,null),r=!0,a||(u=K(s,"submit",pt(n[4])),a=!0)},p(m,h){let g=l;l=d(m),l===g?c[l].p(m,h):(pe(),P(c[g],1,1,()=>{c[g]=null}),me(),o=c[l],o?o.p(m,h):(o=c[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){P(o),r=!1},d(m){m&&w(e),m&&w(t),m&&w(i),c[l].d(),a=!1,u()}}}function xD(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[XD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function QD(n,e,t){let i,s,l,o;Je(n,Cs,$=>t(14,s=$)),Je(n,yo,$=>t(15,l=$)),Je(n,St,$=>t(16,o=$)),Yt(St,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const $=await he.settings.getAll()||{};h($)}catch($){he.errorResponseHandler($)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const $=await he.settings.update(B.filterRedactedProps(a));h($),Vt("Successfully saved application settings.")}catch($){he.errorResponseHandler($)}t(2,f=!1)}}function h($={}){var O,E;Yt(yo,l=(O=$==null?void 0:$.meta)==null?void 0:O.appName,l),Yt(Cs,s=!!((E=$==null?void 0:$.meta)!=null&&E.hideControls),s),t(0,a={meta:($==null?void 0:$.meta)||{},logs:($==null?void 0:$.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function g(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function k(){a.logs.maxDays=ht(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>g(),M=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,m,g,r,c,b,y,k,T,C,M]}class eO extends ye{constructor(e){super(),ve(this,e,QD,xD,be,{})}}function tO(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o<s.length;o+=1)l=Xe(l,s[o]);return{c(){e=v("input"),Zn(e,l)},m(o,r){S(o,e,r),e.autofocus&&e.focus(),n[7](e),de(e,n[0]),t||(i=K(e,"input",n[8]),t=!0)},p(o,r){Zn(e,l=sn(s,[{type:"password"},{autocomplete:"new-password"},r&32&&o[5]])),r&1&&e.value!==o[0]&&de(e,o[0])},d(o){o&&w(e),n[7](null),t=!1,i()}}}function nO(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=Xe(a,r[u]);return{c(){e=v("div"),t=v("button"),t.innerHTML='<i class="ri-key-line"></i>',i=D(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),Zn(s,a)},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Pe(Ye.call(null,t,{position:"left",text:"Set new value"})),K(t,"click",n[6])],l=!0)},p(u,f){Zn(s,a=sn(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Le(o)}}}function iO(n){let e;function t(l,o){return l[3]?nO:tO}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(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:X,o:X,d(l){s.d(l),l&&w(e)}}}function sO(n,e,t){const i=["value","mask"];let s=At(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await cn(),r==null||r.focus()}const f=()=>u();function c(m){ie[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Xe(Xe({},e),Gn(m)),t(5,s=At(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 nu extends ye{constructor(e){super(),ve(this,e,sO,iO,be,{value:0,mask:1})}}function lO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=z("Subject"),s=D(),l=v("input"),r=D(),a=v("div"),u=z(`Available placeholder parameters:
Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c,"id",d),y[0]&2&&m!==(m=b[1].id)&&c.value!==m&&(c.value=m)},d(b){b&&w(e),b&&w(o),b&&w(r),b&&w(f),b&&w(c),h=!1,g()}}}function bm(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=D(),Hn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),_(e,t),_(e,s),o||(r=K(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function _D(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Email",o=D(),r=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[3]),u||(f=K(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&de(r,c[3])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function vm(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[bD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(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){q(e,i)}}}function bD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ym(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[vD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[yD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),V(s.$$.fragment),l=D(),o=v("div"),V(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){S(f,e,c),_(e,t),_(t,i),H(s,i,null),_(t,l),_(t,o),H(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&536871424|c[1]&4&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{a||(a=ze(t,It,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=ze(t,It,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),q(s),q(r),f&&a&&a.end()}}}function vD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[8]),u||(f=K(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&de(r,c[8])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function yD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password confirm",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[9]),u||(f=K(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&de(r,c[9])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function kD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[1].isNew&&_m(n),g=[0,1,2,3,4,5,6,7,8,9],b=[];for(let T=0;T<10;T+=1)b[T]=bm(gm(n,g,T));a=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[_D,({uniqueId:T})=>({29:T}),({uniqueId:T})=>[T?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].isNew&&vm(n),k=(n[1].isNew||n[4])&&ym(n);return{c(){e=v("form"),h&&h.c(),t=D(),i=v("div"),s=v("p"),s.textContent="Avatar",l=D(),o=v("div");for(let T=0;T<10;T+=1)b[T].c();r=D(),V(a.$$.fragment),u=D(),y&&y.c(),f=D(),k&&k.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(T,C){S(T,e,C),h&&h.m(e,null),_(e,t),_(e,i),_(i,s),_(i,l),_(i,o);for(let M=0;M<10;M+=1)b[M].m(o,null);_ Line truncated
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[15]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function TD(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].isNew&&km(n);return{c(){m&&m.c(),e=D(),t=v("button"),i=v("span"),i.textContent="Cancel",s=D(),l=v("button"),o=v("span"),a=z(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-transparent"),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],x(l,"btn-loading",n[6])},m(h,g){m&&m.m(h,g),S(h,e,g),S(h,t,g),_(t,i),S(h,s,g),S(h,l,g),_(l,o),_(o,a),f=!0,c||(d=K(t,"click",n[16]),c=!0)},p(h,g){h[1].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),me()):m?(m.p(h,g),g[0]&2&&A(m,1)):(m=km(h),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||g[0]&64)&&(t.disabled=h[6]),(!f||g[0]&2)&&r!==(r=h[1].isNew?"Create":"Save changes")&&re(a,r),(!f||g[0]&1088&&u!==(u=!h[10]||h[6]))&&(l.disabled=u),(!f||g[0]&64)&&x(l,"btn-loading",h[6])},i(h){f||(A(m),f=!0)},o(h){P(m),f=!1},d(h){m&&m.d(h),h&&w(e),h&&w(t),h&&w(s),h&&w(l),c=!1,d()}}}function CD(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[TD],header:[wD],default:[kD]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(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[23](null),q(e,s)}}}function $D(n,e,t){let i;const s=$t(),l="admin_"+B.randomString(5);let o,r=new Ji,a=!1,u=!1,f=0,c="",d="",m="",h=!1;function g(Z){return y(Z),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(Z){t(1,r=Z!=null&&Z.clone?Z.clone():new Ji),k()}function k(){t(4,h=!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=""),Vn({})}function T(){if(a||!i)return;t(6,a=!0);const Z={email:c,avatar:f};(r.isNew||h)&&(Z.password=d,Z.passwordConfirm=m);let te;r.isNew?te=he.admins.create(Z):te=he.admins.update(r.id,Z),te.then(async ee=>{var R;t(7,u=!1),b(),Vt(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",ee),((R=he.authStore.model)==null?void 0:R.id)===ee.id&&he.authStore.save(he.authStore.token,ee)}).catch(ee=>{he.errorResponseHandler(ee)}).finally(()=>{t(6,a=!1)})}function C(){r!=null&&r.id&&un("Do you really want to delete the selected admin?",()=>he.admins.delete(r.id).then(()=>{t(7,u=!1),b(),Vt("Successfully deleted admin."),s("delete",r)}).catch(Z=>{he.errorResponseHandler(Z)}))}const M=()=>C(),$=()=>b(),O=Z=>t(2,f=Z);function E(){c=this.value,t(3,c)}function I(){h=this.checked,t(4,h)}function L(){d=this.value,t(8,d)}function N(){m=this.value,t(9,m)}const F=()=>i&&u?(un("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function U(Z){ie[Z?"unshift":"push"](()=>{o=Z,t(5,o)})}function J(Z){We.call(this,n,Z)}function ne(Z){We.call(this,n,Z)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||h||c!==r.email||f!==r.avatar)},[b,r,f,c,h,o,a,u,d,m,i,l,T,C,g,M,$,O,E,I,L,N,F,U,J,ne]}class MD extends ye{constructor(e){super(),ve(this,e,$D,CD,be,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function wm(n,e,t){const i=n.slice();return i[24]=e[t],i}function DD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function OD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function ED(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function AD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Sm(n){let e;function t(l,o){return l[5]?PD:ID}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(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&&w(e)}}}function ID(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Tm(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,nuLine truncated
`},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Tm(n){let e,t,i;return{c(){e=v("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){S(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Cm(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $m(n,e){let t,i,s,l,o,r,a,u,f,c,d,m=e[24].id+"",h,g,b,y,k,T=e[24].email+"",C,M,$,O,E,I,L,N,F,U,J,ne,Z,te;f=new fb({props:{value:e[24].id}});let ee=e[24].id===e[7].id&&Cm();E=new Zi({props:{date:e[24].created}}),N=new Zi({props:{date:e[24].updated}});function R(){return e[15](e[24])}function X(...Y){return e[16](e[24],...Y)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=D(),a=v("td"),u=v("div"),V(f.$$.fragment),c=D(),d=v("span"),h=z(m),g=D(),ee&&ee.c(),b=D(),y=v("td"),k=v("span"),C=z(T),$=D(),O=v("td"),V(E.$$.fragment),I=D(),L=v("td"),V(N.$$.fragment),F=D(),U=v("td"),U.innerHTML='<i class="ri-arrow-right-line"></i>',J=D(),Hn(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(d,"class","txt"),p(u,"class","label"),p(a,"class","col-type-text col-field-id"),p(k,"class","txt txt-ellipsis"),p(k,"title",M=e[24].email),p(y,"class","col-type-email col-field-email"),p(O,"class","col-type-date col-field-created"),p(L,"class","col-type-date col-field-updated"),p(U,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Y,se){S(Y,t,se),_(t,i),_(i,s),_(s,l),_(t,r),_(t,a),_(a,u),H(f,u,null),_(u,c),_(u,d),_(d,h),_(a,g),ee&&ee.m(a,null),_(t,b),_(t,y),_(y,k),_(k,C),_(t,$),_(t,O),H(E,O,null),_(t,I),_(t,L),H(N,L,null),_(t,F),_(t,U),_(t,J),ne=!0,Z||(te=[K(t,"click",R),K(t,"keydown",X)],Z=!0)},p(Y,se){e=Y,(!ne||se&16&&!Hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const He={};se&16&&(He.value=e[24].id),f.$set(He),(!ne||se&16)&&m!==(m=e[24].id+"")&&re(h,m),e[24].id===e[7].id?ee||(ee=Cm(),ee.c(),ee.m(a,null)):ee&&(ee.d(1),ee=null),(!ne||se&16)&&T!==(T=e[24].email+"")&&re(C,T),(!ne||se&16&&M!==(M=e[24].email))&&p(k,"title",M);const Re={};se&16&&(Re.date=e[24].created),E.$set(Re);const Fe={};se&16&&(Fe.date=e[24].updated),N.$set(Fe)},i(Y){ne||(A(f.$$.fragment,Y),A(E.$$.fragment,Y),A(N.$$.fragment,Y),ne=!0)},o(Y){P(f.$$.fragment,Y),P(E.$$.fragment,Y),P(N.$$.fragment,Y),ne=!1},d(Y){Y&&w(t),q(f),ee&&ee.d(),q(E),q(N),Z=!1,Le(te)}}}function LD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M=[],$=new Map,O;function E(R){n[11](R)}let I={class:"col-type-text",name:"id",$$slots:{default:[DD]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new Ut({props:I}),ie.push(()=>ke(o,"sort",E));function L(R){n[12](R)}let N={class:"col-type-email col-field-email",name:"email",$$slots:{default:[OD]},$$scope:{ctx:n}};n[2]!==void 0&&(N.sort=n[2]),u=new Ut({props:N}),ie.push(()=>ke(u,"sort",L));function F(R){n[13](R)}let U={class:"col-type-date col-field-created",name:"created",$$slots:{default:[ED]},$$scope:{ctx:n}};n[2]!==void 0&&(U.sort=n[2]),d=new Ut({props:U}),ie.push(()=>ke(d,"sort",F));function J(R){n[14](R)}let ne={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[AD]},$$scope:{ctx:n}};n[2]!==void 0&&(ne.sort=n[2]),g=new Ut({props:ne}),ie.push(()=>ke(g,"sort",J));let Z=n[4];const te=R=>R[24].id;for(let R=0;R<Z.length;R+=1){let X=wm(n,Z,R),Y=te(X);$.set(Y,M[R]=$m(Y,X))}let ee=null;return Z.length||(ee=Sm(n)),{c(){e=v("table"),t=v("thead"),i=v("tr"),s=v("th"),l=D(),V(o.$$.fragment),a=D(),V(u.$$.fragment),c=D(),V(d.$$.fragment),h=D(),V(g.$$.fragment),y=D(),k=v("th"),T=D(),C=v("tbody");for(let R=0;R<M.length;R+=1)M[R].c();ee&&ee.c(),p(s,"class","min-width"),p(k,"class","col-type-action min-width"),p(e,"class","table"),x(e,"table-loading",n[5])},m(R,X){S(R,e,X),_(e,t),_(t,i),_(i,s),_(i,l),H(o,i,null),_(i,a),H(u,i,null),_(i,c),H(d,i,null),_(i,h),H(g,i,null),_(i,y),_(i,k),_(e,T),_(e,C);for(let Y=0;Y<M.length;Y+=1)M[Y].m(C,null);ee&&ee.m(C,null),O=!0},p(R,X){const Y={};X&134217728&&(Y.$$scope={dirty:X,ctx:R}),!r&&X&4&&(r=!0,Y.sort=R[2],we(()=>r=!1)),o.$set(Y);const se={};X&134217728&&(se.$$scope={dirty:X,ctx:R}),!f&&X&4&&(f=!0,se.sort=R[2],we(()=>f=!1)),u.$set(se);const He={};X&134217728&&(He.$$scope={dirty:X,ctx:R}),!m&&X&4&&(m=!0,He.sort=R[2],we(()=>m=!1)),d.$set(He);const Re={};X&134217728&&(Re.$$scope={dirty:X,ctx:R}),!b&&X&4&&(b=!0,Re.sort=R[2],we(()=>b=!1)),g.$set(Re),X&186&&(Z=R[4],pe(),M=wt(M,X,te,1,R,Z,$,C,tn,$m,null,wm),me(),!Z.length&&ee?ee.p(R,X):Z.length?ee&&(ee.d(1),ee=null):(ee=Sm(R),ee.c(),ee.m(C,null))),(!O||X&32)&&x(e,"table-loading",R[5])},i(R){if(!O){A(o.$$.fragment,R),A(u.$$.fragment,R),A(d.$$.fragment,R),A(g.$$.fragment,R);for(let X=0;X<Z.length;X+=1)A(M[X]);O=!0}},o(R){P(o.$$.fragment,R),P(u.$$.fragment,R),P(d.$$.fragment,R),P(g.$$.fragment,R Line truncated
<span class="txt">New admin</span>`,m=D(),V(h.$$.fragment),g=D(),b=v("div"),y=D(),V(k.$$.fragment),T=D(),E&&E.c(),C=Ae(),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(b,"class","clearfix m-b-base")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(e,r),H(a,e,null),_(e,u),_(e,f),_(e,c),_(e,d),S(I,m,L),H(h,I,L),S(I,g,L),S(I,b,L),S(I,y,L),H(k,I,L),S(I,T,L),E&&E.m(I,L),S(I,C,L),M=!0,$||(O=K(d,"click",n[9]),$=!0)},p(I,L){(!M||L&64)&&re(o,I[6]);const N={};L&2&&(N.value=I[1]),h.$set(N);const F={};L&134217918&&(F.$$scope={dirty:L,ctx:I}),k.$set(F),I[4].length?E?E.p(I,L):(E=Mm(I),E.c(),E.m(C.parentNode,C)):E&&(E.d(1),E=null)},i(I){M||(A(a.$$.fragment,I),A(h.$$.fragment,I),A(k.$$.fragment,I),M=!0)},o(I){P(a.$$.fragment,I),P(h.$$.fragment,I),P(k.$$.fragment,I),M=!1},d(I){I&&w(e),q(a),I&&w(m),q(h,I),I&&w(g),I&&w(b),I&&w(y),q(k,I),I&&w(T),E&&E.d(I),I&&w(C),$=!1,O()}}}function FD(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[ND]},$$scope:{ctx:n}}});let r={};return l=new MD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment),s=D(),V(l.$$.fragment)},m(a,u){H(e,a,u),S(a,t,u),H(i,a,u),S(a,s,u),H(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||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(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&&w(t),q(i,a),a&&w(s),n[18](null),q(l,a)}}}function RD(n,e,t){let i,s,l;Je(n,ma,N=>t(21,i=N)),Je(n,St,N=>t(6,s=N)),Je(n,Ma,N=>t(7,l=N)),Yt(St,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=[]),he.admins.getFullList(100,{sort:c||"-created",filter:f}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),m(),he.errorResponseHandler(N,!1))})}function m(){t(4,a=[])}const h=()=>d(),g=()=>r==null?void 0:r.show(),b=N=>t(1,f=N.detail);function y(N){c=N,t(2,c)}function k(N){c=N,t(2,c)}function T(N){c=N,t(2,c)}function C(N){c=N,t(2,c)}const M=N=>r==null?void 0:r.show(N),$=(N,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(N))},O=()=>t(1,f="");function E(N){ie[N?"unshift":"push"](()=>{r=N,t(3,r)})}const I=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const N=new URLSearchParams({filter:f,sort:c}).toString();Ti("/settings/admins?"+N),d()}},[d,f,c,r,a,u,s,l,h,g,b,y,k,T,C,M,$,O,E,I,L]}class jD extends ye{constructor(e){super(),ve(this,e,RD,FD,be,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function HD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=D(),l=v("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){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0]),l.focus(),r||(a=K(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]&&de(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function qD(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=z("Password"),s=D(),l=v("input"),r=D(),a=v("div"),u=v("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){S(d,e,m),_(e,t),S(d,s,m),S(d,l,m),de(l,n[1]),S(d,r,m),S(d,a,m),_(a,u),f||(c=[K(l,"input",n[5]),Pe(Xt.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]&&de(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),f=!1,Le(c)}}}function VD(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new _e({props:{class:"form-field required",name:"identity",$$slots:{default:[HD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[qD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="<h4>Admin sign in</h4>",i=D(),V(s.$$.fragment),l=D(),V(o.$$.fragment),r=D(),a=v("button"),a.innerHTML=`<span class="txt">Login</span>
<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"),x(a,"btn-disabled",n[2]),x(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){S(d,e,m),_(e,t),_(e,i),H(s,e,null),_(e,l),H(o,e,null),_(e,r),_(e,a),u=!0,f||(c=K(e,"submit",pt(n[3])),f=!0)},p(d,m){const h={};m&769&&(h.$$scope={dirty:m,ctx:d}),s.$set(h);const g={};m&770&&(g.$$scope={dirty:m,ctx:d}),o.$set(g),(!u||m&4)&&x(a,"btn-disabled",d[2]),(!u||m&4)&&x(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&&w(e),q(s),q(o),f=!1,c()}}}function zD(n){let e,t;return e=new t_({props:{$$slots:{default:[VD]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(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){q(e,i)}}}function BD(n,e,t){let i;Je(n,ma,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),he.admins.authWithPassword(l,o).then(()=>{Ca(),Ti("/")}).catch(()=>{cl("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 UD extends ye{constructor(e){super(),ve(this,e,BD,zD,be,{})}}function WD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M;i=new _e({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[KD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[JD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[ZD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[GD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let $=n[3]&&Dm(n);return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),V(a.$$.fragment),u=D(),V(f.$$.fragment),c=D(),d=v("div"),m=v("div"),h=D(),$&&$.c(),g=D(),b=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(m,"class","flex-fill"),p(y,"class","txt"),p(b,"type","submit"),p(b,"class","btn btn-expanded"),b.disabled=k=!n[3]||n[2],x(b,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,E){S(O,e,E),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),H(a,e,null),_(e,u),H(f,e,null),_(e,c),_(e,d),_(d,m),_(d,h),$&&$.m(d,null),_(d,g),_(d,b),_(b,y),T=!0,C||(M=K(b,"click",n[13]),C=!0)},p(O,E){const I={};E&1572865&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&1572865&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&1572865&&(N.$$scope={dirty:E,ctx:O}),a.$set(N);const F={};E&1572865&&(F.$$scope={dirty:E,ctx:O}),f.$set(F),O[3]?$?$.p(O,E):($=Dm(O),$.c(),$.m(d,g)):$&&($.d(1),$=null),(!T||E&12&&k!==(k=!O[3]||O[2]))&&(b.disabled=k),(!T||E&4)&&x(b,"btn-loading",O[2])},i(O){T||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),T=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(a.$$.fragment,O),P(f.$$.fragment,O),T=!1},d(O){O&&w(e),q(i),q(o),q(a),q(f),$&&$.d(),C=!1,M()}}}function YD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function KD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application name"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.appName),r||(a=K(l,"input",n[8]),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].meta.appName&&de(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function JD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application url"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.appUrl),r||(a=K(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].meta.appUrl&&de(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function ZD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Logs max days retention"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].logs.maxDays),r||(a=K(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&&ht(l.value)!==u[0].logs.maxDays&&de(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function GD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("spanLine truncated
<div class="breadcrumb-item">Application</div></nav>`,t=D(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),_(i,s),c[l].m(s,null),r=!0,a||(u=K(s,"submit",pt(n[4])),a=!0)},p(m,h){let g=l;l=d(m),l===g?c[l].p(m,h):(pe(),P(c[g],1,1,()=>{c[g]=null}),me(),o=c[l],o?o.p(m,h):(o=c[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){P(o),r=!1},d(m){m&&w(e),m&&w(t),m&&w(i),c[l].d(),a=!1,u()}}}function xD(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[XD]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(l,o){H(e,l,o),S(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&w(t),q(i,l)}}}function QD(n,e,t){let i,s,l,o;Je(n,Cs,$=>t(14,s=$)),Je(n,vo,$=>t(15,l=$)),Je(n,St,$=>t(16,o=$)),Yt(St,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const $=await he.settings.getAll()||{};h($)}catch($){he.errorResponseHandler($)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const $=await he.settings.update(B.filterRedactedProps(a));h($),Vt("Successfully saved application settings.")}catch($){he.errorResponseHandler($)}t(2,f=!1)}}function h($={}){var O,E;Yt(vo,l=(O=$==null?void 0:$.meta)==null?void 0:O.appName,l),Yt(Cs,s=!!((E=$==null?void 0:$.meta)!=null&&E.hideControls),s),t(0,a={meta:($==null?void 0:$.meta)||{},logs:($==null?void 0:$.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function g(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function k(){a.logs.maxDays=ht(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>g(),M=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,m,g,r,c,b,y,k,T,C,M]}class eO extends ye{constructor(e){super(),ve(this,e,QD,xD,be,{})}}function tO(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o<s.length;o+=1)l=Xe(l,s[o]);return{c(){e=v("input"),Zn(e,l)},m(o,r){S(o,e,r),e.autofocus&&e.focus(),n[7](e),de(e,n[0]),t||(i=K(e,"input",n[8]),t=!0)},p(o,r){Zn(e,l=sn(s,[{type:"password"},{autocomplete:"new-password"},r&32&&o[5]])),r&1&&e.value!==o[0]&&de(e,o[0])},d(o){o&&w(e),n[7](null),t=!1,i()}}}function nO(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=Xe(a,r[u]);return{c(){e=v("div"),t=v("button"),t.innerHTML='<i class="ri-key-line"></i>',i=D(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),Zn(s,a)},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Pe(Ye.call(null,t,{position:"left",text:"Set new value"})),K(t,"click",n[6])],l=!0)},p(u,f){Zn(s,a=sn(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Le(o)}}}function iO(n){let e;function t(l,o){return l[3]?nO:tO}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(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:G,o:G,d(l){s.d(l),l&&w(e)}}}function sO(n,e,t){const i=["value","mask"];let s=At(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await cn(),r==null||r.focus()}const f=()=>u();function c(m){ie[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Xe(Xe({},e),Gn(m)),t(5,s=At(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 nu extends ye{constructor(e){super(),ve(this,e,sO,iO,be,{value:0,mask:1})}}function lO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=z("Subject"),s=D(),l=v("input"),r=D(),a=v("div"),u=z(`Available placeholder parameters:
`),f=v("button"),f.textContent=`{APP_NAME}
`,c=z(`,
`),d=v("button"),d.textContent=`{APP_URL}
@@ -163,7 +163,7 @@ Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c,"
`),d=v("button"),d.textContent=`{APP_URL}
`,m=z(`,
`),h=v("button"),h.textContent=`{TOKEN}
`,g=z("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(h,"title","Required parameter"),p(a,"class","help-block")},m(k,T){S(k,e,T),_(e,t),S(k,s,T),S(k,l,T),de(l,n[0].actionUrl),S(k,r,T),S(k,a,T),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),_(a,h),_(a,g),b||(y=[K(l,"input",n[16]),K(f,"click",n[17]),K(d,"click",n[18]),K(h,"click",n[19])],b=!0)},p(k,T){T[1]&1&&i!==(i=k[31])&&p(e,"for",i),T[1]&1&&o!==(o=k[31])&&p(l,"id",o),T[0]&1&&l.value!==k[0].actionUrl&&de(l,k[0].actionUrl)},d(k){k&&w(e),k&&w(s),k&&w(l),k&&w(r),k&&w(a),b=!1,Le(y)}}}function rO(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),de(e,n[0].body),i||(s=K(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&de(e,l[0].body)},i:X,o:X,d(l){l&&w(e),i=!1,s()}}}function aO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=Kt(o,r(n)),ie.push(()=>ke(e,"value",l))),{c(){e&&q(e.$$.fragment),i=Ae()},m(a,u){e&&j(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ke(e,"value",l)),q(e.$$.fragment),A(e.$$.fragment,1),j(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&&w(i),e&&H(e,a)}}}function uO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C;const M=[aO,rO],$=[];function O(E,I){return E[4]&&!E[5]?0:1}return l=O(n),o=$[l]=M[l](n),{c(){e=v("label"),t=z("Body (HTML)"),s=D(),o.c(),r=D(),a=v("div"),u=z(`Available placeholder parameters:
`,g=z("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(h,"title","Required parameter"),p(a,"class","help-block")},m(k,T){S(k,e,T),_(e,t),S(k,s,T),S(k,l,T),de(l,n[0].actionUrl),S(k,r,T),S(k,a,T),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),_(a,h),_(a,g),b||(y=[K(l,"input",n[16]),K(f,"click",n[17]),K(d,"click",n[18]),K(h,"click",n[19])],b=!0)},p(k,T){T[1]&1&&i!==(i=k[31])&&p(e,"for",i),T[1]&1&&o!==(o=k[31])&&p(l,"id",o),T[0]&1&&l.value!==k[0].actionUrl&&de(l,k[0].actionUrl)},d(k){k&&w(e),k&&w(s),k&&w(l),k&&w(r),k&&w(a),b=!1,Le(y)}}}function rO(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),de(e,n[0].body),i||(s=K(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&de(e,l[0].body)},i:G,o:G,d(l){l&&w(e),i=!1,s()}}}function aO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=Kt(o,r(n)),ie.push(()=>ke(e,"value",l))),{c(){e&&V(e.$$.fragment),i=Ae()},m(a,u){e&&H(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{q(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ke(e,"value",l)),V(e.$$.fragment),A(e.$$.fragment,1),H(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&&w(i),e&&q(e,a)}}}function uO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C;const M=[aO,rO],$=[];function O(E,I){return E[4]&&!E[5]?0:1}return l=O(n),o=$[l]=M[l](n),{c(){e=v("label"),t=z("Body (HTML)"),s=D(),o.c(),r=D(),a=v("div"),u=z(`Available placeholder parameters:
`),f=v("button"),f.textContent=`{APP_NAME}
`,c=z(`,
`),d=v("button"),d.textContent=`{APP_URL}
@@ -171,8 +171,8 @@ Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c,"
`),h=v("button"),h.textContent=`{TOKEN}
`,g=z(`,
`),b=v("button"),b.textContent=`{ACTION_URL}
`,y=z("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(b,"type","button"),p(b,"class","label label-sm link-primary txt-mono"),p(b,"title","Required parameter"),p(a,"class","help-block")},m(E,I){S(E,e,I),_(e,t),S(E,s,I),$[l].m(E,I),S(E,r,I),S(E,a,I),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),_(a,h),_(a,g),_(a,b),_(a,y),k=!0,T||(C=[K(f,"click",n[22]),K(d,"click",n[23]),K(h,"click",n[24]),K(b,"click",n[25])],T=!0)},p(E,I){(!k||I[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let L=l;l=O(E),l===L?$[l].p(E,I):(pe(),P($[L],1,1,()=>{$[L]=null}),me(),o=$[l],o?o.p(E,I):(o=$[l]=M[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){k||(A(o),k=!0)},o(E){P(o),k=!1},d(E){E&&w(e),E&&w(s),$[l].d(E),E&&w(r),E&&w(a),T=!1,Le(C)}}}function fO(n){let e,t,i,s,l,o;return e=new _e({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[lO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new _e({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[oO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new _e({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[uO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(r,a){j(e,r,a),S(r,t,a),j(i,r,a),S(r,s,a),j(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function Om(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function cO(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Om();return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),l=z(n[2]),o=D(),r=v("div"),a=D(),f&&f.c(),u=Ae(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),_(s,l),S(c,o,d),S(c,r,d),S(c,a,d),f&&f.m(c,d),S(c,u,d)},p(c,d){d[0]&4&&re(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Om(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(pe(),P(f,1,1,()=>{f=null}),me())},d(c){c&&w(e),c&&w(o),c&&w(r),c&&w(a),f&&f.d(c),c&&w(u)}}}function dO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[cO],default:[fO]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=Xe(s,i[l]);return e=new ys({props:s}),n[26](e),e.$on("expand",n[27]),e.$on("collapse",n[28]),e.$on("toggle",n[29]),{c(){q(e.$$.fragment)},m(l,o){j(e,l,o),t=!0},p(l,o){const r=o[0]&256?sn(i,[Xn(l[8])]):{};o[0]&119|o[1]&2&&(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[26](null),H(e,l)}}}let Em;function pO(n,e,t){let i;const s=["key","title","config","expand","collapse","collapseSiblings"];let l=At(e,s),o;Je(n,Ci,V=>t(12,o=V));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Em,d=!1;function m(){f==null||f.expand()}function h(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){c||d||(t(5,d=!0),t(4,c=(await ft(()=>import("./CodeEditor-1157d668.js"),["./CodeEditor-1157d668.js","./index-0935db40.js"],import.meta.url)).default),Em=c,t(5,d=!1))}function y(V){B.copyToClipboard(V),Qg(`Copied ${V} to clipboard`,2e3)}b();function k(){u.subject=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),E=()=>y("{TOKEN}");function I(V){n.$$.not_equal(u.body,V)&&(u.body=V,t(0,u))}function L(){u.body=this.value,t(0,u)}const N=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),U=()=>y("{TOKEN}"),Z=()=>y("{ACTION_URL}");function ne(V){ie[V?"unshift":"push"](()=>{f=V,t(3,f)})}function G(V){We.call(this,n,V)}function J(V){We.call(this,n,V)}function te(V){We.call(this,n,V)}return n.$$set=V=>{e=Xe(Xe({},e),Gn(V)),t(8,l=At(e,s)),"key"in V&&t(1,r=V.key),"title"in V&&t(2,a=V.title),"config"in V&&t(0,u=V.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ts(r))},[u,r,a,f,c,d,i,y,l,m,h,g,o,k,T,C,M,$,O,E,I,L,N,F,U,Z,ne,G,J,te]}class Er extends ye{constructor(e){super(),ve(this,e,pO,dO,be,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return t Line truncated
<span class="txt">Send test email</span>`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[26]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function LO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=D(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],Q(s,"btn-loading",n[3])},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"click",n[24]),K(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&Q(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Le(a)}}}function NO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const y=[SO,wO],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[5]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="<p>Configure common settings for sending emails.</p>",c=D(),m.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(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),h=!0,g||(b=K(u,"submit",pt(n[27])),g=!0)},p(C,M){(!h||M[0]&32)&&re(o,C[5]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function FO(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[NO]},$$scope:{ctx:n}}});let r={};return l=new kO({props:r}),n[28](l),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[28](null),H(l,a)}}}function RO(n,e,t){let i,s,l;Je(n,St,te=>t(5,l=te));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];Yt(St,l="Mail settings",l);let a,u={},f={},c=!1,d=!1;m();async function m(){t(2,c=!0);try{const te=await he.settings.getAll()||{};g(te)}catch(te){he.errorResponseHandler(te)}t(2,c=!1)}async function h(){if(!(d||!s)){t(3,d=!0);try{const te=await he.settings.update(B.filterRedactedProps(f));g(te),Vn({}),Vt("Successfully saved mail settings.")}catch(te){he.errorResponseHandler(te)}t(3,d=!1)}}function g(te={}){t(0,f={meta:(te==null?void 0:te.meta)||{},smtp:(te==null?void 0:te.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function y(){f.meta.senderName=this.value,t(0,f)}function k(){f.meta.senderAddress=this.value,t(0,f)}function T(te){n.$$.not_equal(f.meta.verificationTemplate,te)&&(f.meta.verificationTemplate=te,t(0,f))}function C(te){n.$$.not_equal(f.meta.resetPasswordTemplate,te)&&(f.meta.resetPasswordTemplate=te,t(0,f))}function M(te){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,te)&&(f.meta.confirmEmailChangeTemplate=te,t(0,f))}function $(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function E(){f.smtp.port=ht(this.value),t(0,f)}function I(te){n.$$.not_equal(f.smtp.tls,te)&&(f.smtp.tls=te,t(0,f))}function L(te){n.$$.not_equal(f.smtp.authMethod,te)&&(f.smtp.authMethod=te,t(0,f))}function N(){f.smtp.username=this.value,t(0,f)}function F(te){n.$$.not_equal(f.smtp.password,te)&&(f.smtp.password=te,t(0,f))}const U=()=>b(),Z=()=>h(),ne=()=>a==null?void 0:a.show(),G=()=>h();function J(te){ie[te?"unshift":"push"](()=>{a=te,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,c,d,s,l,o,r,h,b,u,i,y,k,T,C,M,$,O,E,I,L,N,F,U,Z,ne,G,J]}class jO extends ye{constructor(e){super(),ve(this,e,RO,FO,be,{},null,[-1,-1])}}function HO(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[VO,({uniqueId:$})=>({25:$}),({uniqueId:$})=>$?33554432:0]},$$scope:{ctx:n}}});let b=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&Nm(n),y=n[1].s3.enabled&&Fm(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&Rm(n),T=n[6]&&jm(n);return{c(){q(e.$$.fragment),t=D(),b&&b.c(),i=D(),y&&y.c(),s=D(),l=v("div"),o=v("div"),r=D(),k&&k.c(),a=D(),T&&T.c(),u=D(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"classLine truncated
`,y=z("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(b,"type","button"),p(b,"class","label label-sm link-primary txt-mono"),p(b,"title","Required parameter"),p(a,"class","help-block")},m(E,I){S(E,e,I),_(e,t),S(E,s,I),$[l].m(E,I),S(E,r,I),S(E,a,I),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),_(a,h),_(a,g),_(a,b),_(a,y),k=!0,T||(C=[K(f,"click",n[22]),K(d,"click",n[23]),K(h,"click",n[24]),K(b,"click",n[25])],T=!0)},p(E,I){(!k||I[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let L=l;l=O(E),l===L?$[l].p(E,I):(pe(),P($[L],1,1,()=>{$[L]=null}),me(),o=$[l],o?o.p(E,I):(o=$[l]=M[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){k||(A(o),k=!0)},o(E){P(o),k=!1},d(E){E&&w(e),E&&w(s),$[l].d(E),E&&w(r),E&&w(a),T=!1,Le(C)}}}function fO(n){let e,t,i,s,l,o;return e=new _e({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[lO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new _e({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[oO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new _e({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[uO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment),s=D(),V(l.$$.fragment)},m(r,a){H(e,r,a),S(r,t,a),H(i,r,a),S(r,s,a),H(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){q(e,r),r&&w(t),q(i,r),r&&w(s),q(l,r)}}}function Om(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function cO(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Om();return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),l=z(n[2]),o=D(),r=v("div"),a=D(),f&&f.c(),u=Ae(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),_(s,l),S(c,o,d),S(c,r,d),S(c,a,d),f&&f.m(c,d),S(c,u,d)},p(c,d){d[0]&4&&re(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Om(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(pe(),P(f,1,1,()=>{f=null}),me())},d(c){c&&w(e),c&&w(o),c&&w(r),c&&w(a),f&&f.d(c),c&&w(u)}}}function dO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[cO],default:[fO]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=Xe(s,i[l]);return e=new ys({props:s}),n[26](e),e.$on("expand",n[27]),e.$on("collapse",n[28]),e.$on("toggle",n[29]),{c(){V(e.$$.fragment)},m(l,o){H(e,l,o),t=!0},p(l,o){const r=o[0]&256?sn(i,[Xn(l[8])]):{};o[0]&119|o[1]&2&&(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[26](null),q(e,l)}}}let Em;function pO(n,e,t){let i;const s=["key","title","config","expand","collapse","collapseSiblings"];let l=At(e,s),o;Je(n,Ci,R=>t(12,o=R));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Em,d=!1;function m(){f==null||f.expand()}function h(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){c||d||(t(5,d=!0),t(4,c=(await ft(()=>import("./CodeEditor-dffc8186.js"),["./CodeEditor-dffc8186.js","./index-0935db40.js"],import.meta.url)).default),Em=c,t(5,d=!1))}function y(R){B.copyToClipboard(R),Qg(`Copied ${R} to clipboard`,2e3)}b();function k(){u.subject=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),E=()=>y("{TOKEN}");function I(R){n.$$.not_equal(u.body,R)&&(u.body=R,t(0,u))}function L(){u.body=this.value,t(0,u)}const N=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),U=()=>y("{TOKEN}"),J=()=>y("{ACTION_URL}");function ne(R){ie[R?"unshift":"push"](()=>{f=R,t(3,f)})}function Z(R){We.call(this,n,R)}function te(R){We.call(this,n,R)}function ee(R){We.call(this,n,R)}return n.$$set=R=>{e=Xe(Xe({},e),Gn(R)),t(8,l=At(e,s)),"key"in R&&t(1,r=R.key),"title"in R&&t(2,a=R.title),"config"in R&&t(0,u=R.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ts(r))},[u,r,a,f,c,d,i,y,l,m,h,g,o,k,T,C,M,$,O,E,I,L,N,F,U,J,ne,Z,te,ee]}class Er extends ye{constructor(e){super(),ve(this,e,pO,dO,be,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return Line truncated
<span class="txt">Send test email</span>`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[26]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function LO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=D(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],x(s,"btn-loading",n[3])},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"click",n[24]),K(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&x(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Le(a)}}}function NO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const y=[SO,wO],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[5]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="<p>Configure common settings for sending emails.</p>",c=D(),m.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(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),h=!0,g||(b=K(u,"submit",pt(n[27])),g=!0)},p(C,M){(!h||M[0]&32)&&re(o,C[5]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function FO(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[NO]},$$scope:{ctx:n}}});let r={};return l=new kO({props:r}),n[28](l),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment),s=D(),V(l.$$.fragment)},m(a,u){H(e,a,u),S(a,t,u),H(i,a,u),S(a,s,u),H(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(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&&w(t),q(i,a),a&&w(s),n[28](null),q(l,a)}}}function RO(n,e,t){let i,s,l;Je(n,St,ee=>t(5,l=ee));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];Yt(St,l="Mail settings",l);let a,u={},f={},c=!1,d=!1;m();async function m(){t(2,c=!0);try{const ee=await he.settings.getAll()||{};g(ee)}catch(ee){he.errorResponseHandler(ee)}t(2,c=!1)}async function h(){if(!(d||!s)){t(3,d=!0);try{const ee=await he.settings.update(B.filterRedactedProps(f));g(ee),Vn({}),Vt("Successfully saved mail settings.")}catch(ee){he.errorResponseHandler(ee)}t(3,d=!1)}}function g(ee={}){t(0,f={meta:(ee==null?void 0:ee.meta)||{},smtp:(ee==null?void 0:ee.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function y(){f.meta.senderName=this.value,t(0,f)}function k(){f.meta.senderAddress=this.value,t(0,f)}function T(ee){n.$$.not_equal(f.meta.verificationTemplate,ee)&&(f.meta.verificationTemplate=ee,t(0,f))}function C(ee){n.$$.not_equal(f.meta.resetPasswordTemplate,ee)&&(f.meta.resetPasswordTemplate=ee,t(0,f))}function M(ee){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,ee)&&(f.meta.confirmEmailChangeTemplate=ee,t(0,f))}function $(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function E(){f.smtp.port=ht(this.value),t(0,f)}function I(ee){n.$$.not_equal(f.smtp.tls,ee)&&(f.smtp.tls=ee,t(0,f))}function L(ee){n.$$.not_equal(f.smtp.authMethod,ee)&&(f.smtp.authMethod=ee,t(0,f))}function N(){f.smtp.username=this.value,t(0,f)}function F(ee){n.$$.not_equal(f.smtp.password,ee)&&(f.smtp.password=ee,t(0,f))}const U=()=>b(),J=()=>h(),ne=()=>a==null?void 0:a.show(),Z=()=>h();function te(ee){ie[ee?"unshift":"push"](()=>{a=ee,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,c,d,s,l,o,r,h,b,u,i,y,k,T,C,M,$,O,E,I,L,N,F,U,J,ne,Z,te]}class jO extends ye{constructor(e){super(),ve(this,e,RO,FO,be,{},null,[-1,-1])}}function HO(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[VO,({uniqueId:$})=>({25:$}),({uniqueId:$})=>$?33554432:0]},$$scope:{ctx:n}}});let b=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&Nm(n),y=n[1].s3.enabled&&Fm(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&Rm(n),T=n[6]&&jm(n);return{c(){V(e.$$.fragment),t=D(),b&&b.c(),i=D(),y&&y.c(),s=D(),l=v("div"),o=v("div"),r=D(),k&&k.c(),a=D(),T&&T.c(),u=D(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"claLine truncated
the
`),r=v("strong"),u=z(a),f=z(`
to the
@@ -182,19 +182,19 @@ Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c,"
`),y=v("a"),y.textContent=`rclone
`,k=z(`,
`),T=v("a"),T.textContent=`s5cmd
`,C=z(", etc."),M=D(),$=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p(T,"href","https://github.com/peak/s5cmd"),p(T,"target","_blank"),p(T,"rel","noopener noreferrer"),p(T,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p($,"class","clearfix m-t-base")},m(L,N){S(L,e,N),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(l,r),_(r,u),_(l,f),_(l,c),_(c,m),_(l,h),_(l,g),_(l,b),_(l,y),_(l,k),_(l,T),_(l,C),_(e,M),_(e,$),E=!0},p(L,N){var F;(!E||N&1)&&a!==(a=(F=L[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&re(u,a),(!E||N&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&re(m,d)},i(L){E||(L&&nt(()=>{O||(O=ze(e,It,{duration:150},!0)),O.run(1)}),E=!0)},o(L){L&&(O||(O=ze(e,It,{duration:150},!1)),O.run(0)),E=!1},d(L){L&&w(e),L&&O&&O.end()}}}function Fm(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$;return i=new _e({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[zO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[BO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"s3.region",$$slots:{default:[UO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[WO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[YO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[KO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(d.$$.fragment),m=D(),h=v("div"),q(g.$$.fragment),b=D(),y=v("div"),q(k.$$.fragment),T=D(),C=v("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(h,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(O,E){S(O,e,E),_(e,t),j(i,t,null),_(e,s),_(e,l),j(o,l,null),_(e,r),_(e,a),j(u,a,null),_(e,f),_(e,c),j(d,c,null),_(e,m),_(e,h),j(g,h,null),_(e,b),_(e,y),j(k,y,null),_(e,T),_(e,C),$=!0},p(O,E){const I={};E&100663298&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&100663298&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&100663298&&(N.$$scope={dirty:E,ctx:O}),u.$set(N);const F={};E&100663298&&(F.$$scope={dirty:E,ctx:O}),d.$set(F);const U={};E&100663298&&(U.$$scope={dirty:E,ctx:O}),g.$set(U);const Z={};E&100663298&&(Z.$$scope={dirty:E,ctx:O}),k.$set(Z)},i(O){$||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(k.$$.fragment,O),O&&nt(()=>{M||(M=ze(e,It,{duration:150},!0)),M.run(1)}),$=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(g.$$.fragment,O),P(k.$$.fragment,O),O&&(M||(M=ze(e,It,{duration:150},!1)),M.run(0)),$=!1},d(O){O&&w(e),H(i),H(o),H(u),H(d),H(g),H(k),O&&M&&M.end()}}}function zO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Endpoint"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.endpoint),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&de(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function BO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Bucket"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.bucket),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&de(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function UO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Region"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.region),r||(a=K(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&de(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function WO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Access key"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.accessKey),r||(a=K(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==( Line truncated
<span class="txt">S3 connected successfully</span>`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function ZO(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=`<i class="ri-error-warning-line txt-warning"></i>
<span class="txt">Failed to establish S3 connection</span>`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Pe(t=Ye.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&zt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function GO(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function jm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function XO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const y=[qO,HO],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[7]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`<p>By default PocketBase uses the local file system to store uploaded files.</p>
<p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,c=D(),m.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(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),h=!0,g||(b=K(u,"submit",pt(n[20])),g=!0)},p(C,M){(!h||M&128)&&re(o,C[7]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function xO(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[XO]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}const oo="s3_test_request";function QO(n,e,t){let i,s,l;Je(n,St,F=>t(7,l=F)),Yt(St,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;m();async function m(){t(2,a=!0);try{const F=await he.settings.getAll()||{};g(F)}catch(F){he.errorResponseHandler(F)}t(2,a=!1)}async function h(){if(!(u||!s)){t(3,u=!0);try{he.cancelRequest(oo);const F=await he.settings.update(B.filterRedactedProps(r));Vn({}),await g(F),Ca(),c?sv("Successfully saved but failed to establish S3 connection."):Vt("Successfully saved files storage settings.")}catch(F){he.errorResponseHandler(F)}t(3,u=!1)}}async function g(F={}){t(1,r={s3:(F==null?void 0:F.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await y()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await y()}async function y(){if(t(5,c=null),!!r.s3.enabled){he.cancelRequest(oo),clearTimeout(d),d=setTimeout(()=>{he.cancelRequest(oo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await he.settings.testS3({$cancelKey:oo})}catch(F){t(5,c=F)}t(4,f=!1),clearTimeout(d)}}nn(()=>()=>{clearTimeout(d)});function k(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function $(){r.s3.accessKey=this.value,t(1,r)}function O(F){n.$$.not_equal(r.s3.secret,F)&&(r.s3.secret=F,t(1,r))}function E(){r.s3.forcePathStyle=this.checked,t(1,r)}const I=()=>b(),L=()=>h(),N=()=>h();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,h,b,i,k,T,C,M,$,O,E,I,L,N]}class eE extends ye{constructor(e){super(),ve(this,e,QO,xO,be,{})}}function tE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function nE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Client ID"),s=D(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].clientId),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&de(l,u[0].clientId)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function iE(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new nu({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=z("Client Secret"),s=D(),q(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,we(()=>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&&w(e),f&&w(s),H(l,f)}}}function Hm(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=Kt(o,r(n)),ie.push(()=>ke(t,"config",l))),{c(){e=v("div"),t&&q(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&j(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],we(()=>i=!1)),o!==(o=a[4])){if(t){pe();const c=t;P(c.$$.fragment,1,0,()=>{H(c,1)}),me()}o?(t=Kt(o,r(a)),ie.push(()=>ke(t,"config",l)),q(t.$$.fragment),A(t.$$.fragment,1),j(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&H(t)}}}function sE(n){let e,t,i,s,l,o,r,a,u,f,c,d;e=new _e({props:{class:"form-field form-field-toggle m-b-0",naLine truncated
another PocketBase environment.</p>`,t=D(),i=v("div"),s=v("button"),s.innerHTML='<span class="txt">Copy</span>',l=D(),q(o.$$.fragment),r=D(),a=v("div"),u=v("div"),f=D(),c=v("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-transparent 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(g,b){S(g,e,b),S(g,t,b),S(g,i,b),_(i,s),_(i,l),j(o,i,null),n[8](i),S(g,r,b),S(g,a,b),_(a,u),_(a,f),_(a,c),d=!0,m||(h=[K(s,"click",n[7]),K(i,"keydown",n[9]),K(c,"click",n[10])],m=!0)},p(g,b){const y={};b&4&&(y.content=g[2]),o.$set(y)},i(g){d||(A(o.$$.fragment,g),d=!0)},o(g){P(o.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(t),g&&w(i),H(o),n[8](null),g&&w(r),g&&w(a),m=!1,Le(h)}}}function CE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function $E(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[CE,TE],h=[];function g(b,y){return b[1]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[3]),r=D(),a=v("div"),u=v("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,y){S(b,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,y),S(b,a,y),_(a,u),h[f].m(u,null),d=!0},p(b,y){(!d||y&8)&&re(o,b[3]);let k=f;f=g(b),f===k?h[f].p(b,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),me(),c=h[f],c?c.p(b,y):(c=h[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){P(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),h[f].d()}}}function ME(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[$E]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(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||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function DE(n,e,t){let i,s;Je(n,St,b=>t(3,s=b)),Yt(St,s="Export collections",s);const l="export_"+B.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await he.collections.getFullList(100,{$cancelKey:l}));for(let b of r)delete b.created,delete b.updated}catch(b){he.errorResponseHandler(b)}t(1,a=!1)}function f(){B.downloadJson(r,"pb_schema")}function c(){B.copyToClipboard(i),Qg("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function m(b){ie[b?"unshift":"push"](()=>{o=b,t(0,o)})}const h=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const y=window.getSelection(),k=document.createRange();k.selectNodeContents(o),y.removeAllRanges(),y.addRange(k)}},g=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,m,h,g]}class OE extends ye{constructor(e){super(),ve(this,e,DE,ME,be,{})}}function Jm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Zm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Gm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function xm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function eh(n,e,t){const i=n.slice();return i[30]=e[t],i}function EE(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&th(),a=n[0].name!==n[1].name&&nh(n);return{c(){e=v("div"),r&&r.c(),t=D(),a&&a.c(),i=D(),s=v("strong"),o=z(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),_(e,t),a&&a.m(e,null),_(e,i),_(e,s),_(s,o)},p(u,f){u[9]?r||(r=th(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=nh(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&re(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function AE(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=D(),i=v("strong"),l=z(s),p(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function IE(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=D(),i=v("strong"),l=z(s),p(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function th(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function nh(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=z(t),s=D(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),_(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&re(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function ih(n){var b,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",Line truncated
`,C=z(", etc."),M=D(),$=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p(T,"href","https://github.com/peak/s5cmd"),p(T,"target","_blank"),p(T,"rel","noopener noreferrer"),p(T,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p($,"class","clearfix m-t-base")},m(L,N){S(L,e,N),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(l,r),_(r,u),_(l,f),_(l,c),_(c,m),_(l,h),_(l,g),_(l,b),_(l,y),_(l,k),_(l,T),_(l,C),_(e,M),_(e,$),E=!0},p(L,N){var F;(!E||N&1)&&a!==(a=(F=L[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&re(u,a),(!E||N&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&re(m,d)},i(L){E||(L&&nt(()=>{O||(O=ze(e,It,{duration:150},!0)),O.run(1)}),E=!0)},o(L){L&&(O||(O=ze(e,It,{duration:150},!1)),O.run(0)),E=!1},d(L){L&&w(e),L&&O&&O.end()}}}function Fm(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$;return i=new _e({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[zO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[BO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"s3.region",$$slots:{default:[UO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[WO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[YO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[KO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),V(u.$$.fragment),f=D(),c=v("div"),V(d.$$.fragment),m=D(),h=v("div"),V(g.$$.fragment),b=D(),y=v("div"),V(k.$$.fragment),T=D(),C=v("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(h,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(O,E){S(O,e,E),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),_(e,a),H(u,a,null),_(e,f),_(e,c),H(d,c,null),_(e,m),_(e,h),H(g,h,null),_(e,b),_(e,y),H(k,y,null),_(e,T),_(e,C),$=!0},p(O,E){const I={};E&100663298&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&100663298&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&100663298&&(N.$$scope={dirty:E,ctx:O}),u.$set(N);const F={};E&100663298&&(F.$$scope={dirty:E,ctx:O}),d.$set(F);const U={};E&100663298&&(U.$$scope={dirty:E,ctx:O}),g.$set(U);const J={};E&100663298&&(J.$$scope={dirty:E,ctx:O}),k.$set(J)},i(O){$||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(k.$$.fragment,O),O&&nt(()=>{M||(M=ze(e,It,{duration:150},!0)),M.run(1)}),$=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(g.$$.fragment,O),P(k.$$.fragment,O),O&&(M||(M=ze(e,It,{duration:150},!1)),M.run(0)),$=!1},d(O){O&&w(e),q(i),q(o),q(u),q(d),q(g),q(k),O&&M&&M.end()}}}function zO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Endpoint"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.endpoint),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&de(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function BO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Bucket"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.bucket),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&de(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function UO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Region"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.region),r||(a=K(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&de(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function WO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Access key"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.accessKey),r||(a=K(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==( Line truncated
<span class="txt">S3 connected successfully</span>`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function ZO(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=`<i class="ri-error-warning-line txt-warning"></i>
<span class="txt">Failed to establish S3 connection</span>`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Pe(t=Ye.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&zt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function GO(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function jm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function XO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const y=[qO,HO],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[7]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`<p>By default PocketBase uses the local file system to store uploaded files.</p>
<p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,c=D(),m.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(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),h=!0,g||(b=K(u,"submit",pt(n[20])),g=!0)},p(C,M){(!h||M&128)&&re(o,C[7]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function xO(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[XO]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(l,o){H(e,l,o),S(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&w(t),q(i,l)}}}const lo="s3_test_request";function QO(n,e,t){let i,s,l;Je(n,St,F=>t(7,l=F)),Yt(St,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;m();async function m(){t(2,a=!0);try{const F=await he.settings.getAll()||{};g(F)}catch(F){he.errorResponseHandler(F)}t(2,a=!1)}async function h(){if(!(u||!s)){t(3,u=!0);try{he.cancelRequest(lo);const F=await he.settings.update(B.filterRedactedProps(r));Vn({}),await g(F),Ca(),c?sv("Successfully saved but failed to establish S3 connection."):Vt("Successfully saved files storage settings.")}catch(F){he.errorResponseHandler(F)}t(3,u=!1)}}async function g(F={}){t(1,r={s3:(F==null?void 0:F.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await y()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await y()}async function y(){if(t(5,c=null),!!r.s3.enabled){he.cancelRequest(lo),clearTimeout(d),d=setTimeout(()=>{he.cancelRequest(lo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await he.settings.testS3({$cancelKey:lo})}catch(F){t(5,c=F)}t(4,f=!1),clearTimeout(d)}}nn(()=>()=>{clearTimeout(d)});function k(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function $(){r.s3.accessKey=this.value,t(1,r)}function O(F){n.$$.not_equal(r.s3.secret,F)&&(r.s3.secret=F,t(1,r))}function E(){r.s3.forcePathStyle=this.checked,t(1,r)}const I=()=>b(),L=()=>h(),N=()=>h();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,h,b,i,k,T,C,M,$,O,E,I,L,N]}class eE extends ye{constructor(e){super(),ve(this,e,QO,xO,be,{})}}function tE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function nE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Client ID"),s=D(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].clientId),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&de(l,u[0].clientId)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function iE(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new nu({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=z("Client Secret"),s=D(),V(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,we(()=>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&&w(e),f&&w(s),q(l,f)}}}function Hm(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=Kt(o,r(n)),ie.push(()=>ke(t,"config",l))),{c(){e=v("div"),t&&V(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&H(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],we(()=>i=!1)),o!==(o=a[4])){if(t){pe();const c=t;P(c.$$.fragment,1,0,()=>{q(c,1)}),me()}o?(t=Kt(o,r(a)),ie.push(()=>ke(t,"config",l)),V(t.$$.fragment),A(t.$$.fragment,1),H(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&q(t)}}}function sE(n){let e,t,i,s,l,o,r,a,u,f,c,d;e=new _e({props:{class:"form-field form-field-toggle m-b-0",naLine truncated
another PocketBase environment.</p>`,t=D(),i=v("div"),s=v("button"),s.innerHTML='<span class="txt">Copy</span>',l=D(),V(o.$$.fragment),r=D(),a=v("div"),u=v("div"),f=D(),c=v("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-transparent 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(g,b){S(g,e,b),S(g,t,b),S(g,i,b),_(i,s),_(i,l),H(o,i,null),n[8](i),S(g,r,b),S(g,a,b),_(a,u),_(a,f),_(a,c),d=!0,m||(h=[K(s,"click",n[7]),K(i,"keydown",n[9]),K(c,"click",n[10])],m=!0)},p(g,b){const y={};b&4&&(y.content=g[2]),o.$set(y)},i(g){d||(A(o.$$.fragment,g),d=!0)},o(g){P(o.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(t),g&&w(i),q(o),n[8](null),g&&w(r),g&&w(a),m=!1,Le(h)}}}function CE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function $E(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[CE,TE],h=[];function g(b,y){return b[1]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[3]),r=D(),a=v("div"),u=v("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,y){S(b,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,y),S(b,a,y),_(a,u),h[f].m(u,null),d=!0},p(b,y){(!d||y&8)&&re(o,b[3]);let k=f;f=g(b),f===k?h[f].p(b,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),me(),c=h[f],c?c.p(b,y):(c=h[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){P(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),h[f].d()}}}function ME(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[$E]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(l,o){H(e,l,o),S(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&w(t),q(i,l)}}}function DE(n,e,t){let i,s;Je(n,St,b=>t(3,s=b)),Yt(St,s="Export collections",s);const l="export_"+B.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await he.collections.getFullList(100,{$cancelKey:l}));for(let b of r)delete b.created,delete b.updated}catch(b){he.errorResponseHandler(b)}t(1,a=!1)}function f(){B.downloadJson(r,"pb_schema")}function c(){B.copyToClipboard(i),Qg("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function m(b){ie[b?"unshift":"push"](()=>{o=b,t(0,o)})}const h=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const y=window.getSelection(),k=document.createRange();k.selectNodeContents(o),y.removeAllRanges(),y.addRange(k)}},g=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,m,h,g]}class OE extends ye{constructor(e){super(),ve(this,e,DE,ME,be,{})}}function Jm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Zm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Gm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function xm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function eh(n,e,t){const i=n.slice();return i[30]=e[t],i}function EE(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&th(),a=n[0].name!==n[1].name&&nh(n);return{c(){e=v("div"),r&&r.c(),t=D(),a&&a.c(),i=D(),s=v("strong"),o=z(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),_(e,t),a&&a.m(e,null),_(e,i),_(e,s),_(s,o)},p(u,f){u[9]?r||(r=th(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=nh(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&re(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function AE(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=D(),i=v("strong"),l=z(s),p(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function IE(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=D(),i=v("strong"),l=z(s),p(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function th(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function nh(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=z(t),s=D(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),_(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&re(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function ih(n){var b,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",Line truncated
<th width="10%" class="svelte-lmkr38">Old</th>
<th width="10%" class="svelte-lmkr38">New</th></tr>`,l=D(),o=v("tbody");for(let C=0;C<h.length;C+=1)h[C].c();r=D(),g&&g.c(),a=D();for(let C=0;C<y.length;C+=1)y[C].c();u=D();for(let C=0;C<T.length;C+=1)T[C].c();p(e,"class","section-title"),p(i,"class","table collections-diff-table m-b-base svelte-lmkr38")},m(C,M){S(C,e,M),d.m(e,null),S(C,t,M),S(C,i,M),_(i,s),_(i,l),_(i,o);for(let $=0;$<h.length;$+=1)h[$].m(o,null);_(o,r),g&&g.m(o,null),_(o,a);for(let $=0;$<y.length;$+=1)y[$].m(o,null);_(o,u);for(let $=0;$<T.length;$+=1)T[$].m(o,null)},p(C,M){if(c===(c=f(C))&&d?d.p(C,M):(d.d(1),d=c(C),d&&(d.c(),d.m(e,null))),M[0]&7203){m=C[11];let $;for($=0;$<m.length;$+=1){const O=eh(C,m,$);h[$]?h[$].p(O,M):(h[$]=ih(O),h[$].c(),h[$].m(o,r))}for(;$<h.length;$+=1)h[$].d(1);h.length=m.length}if(C[2]||C[5]?g?g.p(C,M):(g=sh(C),g.c(),g.m(o,a)):g&&(g.d(1),g=null),M[0]&4248){b=C[7];let $;for($=0;$<b.length;$+=1){const O=Gm(C,b,$);y[$]?y[$].p(O,M):(y[$]=uh(O),y[$].c(),y[$].m(o,u))}for(;$<y.length;$+=1)y[$].d(1);y.length=b.length}if(M[0]&4352){k=C[8];let $;for($=0;$<k.length;$+=1){const O=Jm(C,k,$);T[$]?T[$].p(O,M):(T[$]=ch(O),T[$].c(),T[$].m(o,null))}for(;$<T.length;$+=1)T[$].d(1);T.length=k.length}},i:X,o:X,d(C){C&&w(e),d.d(),C&&w(t),C&&w(i),bt(h,C),g&&g.d(),bt(y,C),bt(T,C)}}}function $n(n,e){n=n||[];for(let t of n)if(t.id==e)return t;return null}function rn(n,e){return n===e?!1:JSON.stringify(n)!==JSON.stringify(e)}function LE(n,e,t){let i,s,l,{collectionA:o=new bn}=e,{collectionB:r=new bn}=e,{deleteMissing:a=!1}=e,u=[],f=[],c=[],d=[],m=[];const h=Object.keys(new bn().export()).filter(y=>!["schema","created","updated"].includes(y));function g(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(k=>y.id==k.id))))}function b(y){return typeof y>"u"?"":B.isObject(y)?JSON.stringify(y,null,4):y}return n.$$set=y=>{"collectionA"in y&&t(0,o=y.collectionA),"collectionB"in y&&t(1,r=y.collectionB),"deleteMissing"in y&&t(2,a=y.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&g(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(k=>y.id==k.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(k=>k.id==y.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(y=>!u.find(k=>k.id==y.id))),n.$$.dirty[0]&7&&t(9,l=B.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,m,l,s,h,b]}class NE extends ye{constructor(e){super(),ve(this,e,LE,PE,be,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function dh(n,e,t){const i=n.slice();return i[17]=e[t],i}function ph(n){let e,t;return e=new NE({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function FE(n){let e,t,i=n[2],s=[];for(let o=0;o<i.length;o+=1)s[o]=ph(dh(n,i,o));const l=o=>P(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=Ae()},m(o,r){for(let a=0;a<s.length;a+=1)s[a].m(o,r);S(o,e,r),t=!0},p(o,r){if(r&12){i=o[2];let a;for(a=0;a<i.length;a+=1){const u=dh(o,i,a);s[a]?(s[a].p(u,r),A(s[a],1)):(s[a]=ph(u),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(pe(),a=i.length;a<s.length;a+=1)l(a);me()}},i(o){if(!t){for(let r=0;r<i.length;r+=1)A(s[r]);t=!0}},o(o){s=s.filter(Boolean);for(let r=0;r<s.length;r+=1)P(s[r]);t=!1},d(o){bt(s,o),o&&w(e)}}}function RE(n){let e;return{c(){e=v("h4"),e.textContent="Side-by-side diff",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:X,d(t){t&&w(e)}}}function jE(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=z("Close"),i=D(),s=v("button"),l=v("span"),l.textContent="Confirm and import",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=n[4],Q(s,"btn-loading",n[4])},m(a,u){S(a,e,u),_(e,t),S(a,i,u),S(a,s,u),_(s,l),o||(r=[K(e,"click",n[0]),K(s,"click",n[9])],o=!0)},p(a,u){u&16&&(e.disabled=a[4]),u&16&&(s.disabled=a[4]),u&16&&Q(s,"btn-loading",a[4])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Le(r)}}}function HE(n){let e,t,i={class:"full-width-popup import-popup",overlayClose:!1,escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[jE],header:[RE],default:[FE]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[10]),l&1048604&&(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),H(e,s)}}}function qE(n,e,t){const i=$t();let s,l=[Line truncated
<th width="10%" class="svelte-lmkr38">New</th></tr>`,l=D(),o=v("tbody");for(let C=0;C<h.length;C+=1)h[C].c();r=D(),g&&g.c(),a=D();for(let C=0;C<y.length;C+=1)y[C].c();u=D();for(let C=0;C<T.length;C+=1)T[C].c();p(e,"class","section-title"),p(i,"class","table collections-diff-table m-b-base svelte-lmkr38")},m(C,M){S(C,e,M),d.m(e,null),S(C,t,M),S(C,i,M),_(i,s),_(i,l),_(i,o);for(let $=0;$<h.length;$+=1)h[$].m(o,null);_(o,r),g&&g.m(o,null),_(o,a);for(let $=0;$<y.length;$+=1)y[$].m(o,null);_(o,u);for(let $=0;$<T.length;$+=1)T[$].m(o,null)},p(C,M){if(c===(c=f(C))&&d?d.p(C,M):(d.d(1),d=c(C),d&&(d.c(),d.m(e,null))),M[0]&7203){m=C[11];let $;for($=0;$<m.length;$+=1){const O=eh(C,m,$);h[$]?h[$].p(O,M):(h[$]=ih(O),h[$].c(),h[$].m(o,r))}for(;$<h.length;$+=1)h[$].d(1);h.length=m.length}if(C[2]||C[5]?g?g.p(C,M):(g=sh(C),g.c(),g.m(o,a)):g&&(g.d(1),g=null),M[0]&4248){b=C[7];let $;for($=0;$<b.length;$+=1){const O=Gm(C,b,$);y[$]?y[$].p(O,M):(y[$]=uh(O),y[$].c(),y[$].m(o,u))}for(;$<y.length;$+=1)y[$].d(1);y.length=b.length}if(M[0]&4352){k=C[8];let $;for($=0;$<k.length;$+=1){const O=Jm(C,k,$);T[$]?T[$].p(O,M):(T[$]=ch(O),T[$].c(),T[$].m(o,null))}for(;$<T.length;$+=1)T[$].d(1);T.length=k.length}},i:G,o:G,d(C){C&&w(e),d.d(),C&&w(t),C&&w(i),bt(h,C),g&&g.d(),bt(y,C),bt(T,C)}}}function $n(n,e){n=n||[];for(let t of n)if(t.id==e)return t;return null}function rn(n,e){return n===e?!1:JSON.stringify(n)!==JSON.stringify(e)}function LE(n,e,t){let i,s,l,{collectionA:o=new bn}=e,{collectionB:r=new bn}=e,{deleteMissing:a=!1}=e,u=[],f=[],c=[],d=[],m=[];const h=Object.keys(new bn().export()).filter(y=>!["schema","created","updated"].includes(y));function g(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(k=>y.id==k.id))))}function b(y){return typeof y>"u"?"":B.isObject(y)?JSON.stringify(y,null,4):y}return n.$$set=y=>{"collectionA"in y&&t(0,o=y.collectionA),"collectionB"in y&&t(1,r=y.collectionB),"deleteMissing"in y&&t(2,a=y.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&g(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(k=>y.id==k.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(k=>k.id==y.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(y=>!u.find(k=>k.id==y.id))),n.$$.dirty[0]&7&&t(9,l=B.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,m,l,s,h,b]}class NE extends ye{constructor(e){super(),ve(this,e,LE,PE,be,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function dh(n,e,t){const i=n.slice();return i[17]=e[t],i}function ph(n){let e,t;return e=new NE({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function FE(n){let e,t,i=n[2],s=[];for(let o=0;o<i.length;o+=1)s[o]=ph(dh(n,i,o));const l=o=>P(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=Ae()},m(o,r){for(let a=0;a<s.length;a+=1)s[a].m(o,r);S(o,e,r),t=!0},p(o,r){if(r&12){i=o[2];let a;for(a=0;a<i.length;a+=1){const u=dh(o,i,a);s[a]?(s[a].p(u,r),A(s[a],1)):(s[a]=ph(u),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(pe(),a=i.length;a<s.length;a+=1)l(a);me()}},i(o){if(!t){for(let r=0;r<i.length;r+=1)A(s[r]);t=!0}},o(o){s=s.filter(Boolean);for(let r=0;r<s.length;r+=1)P(s[r]);t=!1},d(o){bt(s,o),o&&w(e)}}}function RE(n){let e;return{c(){e=v("h4"),e.textContent="Side-by-side diff",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function jE(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=z("Close"),i=D(),s=v("button"),l=v("span"),l.textContent="Confirm and import",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=n[4],x(s,"btn-loading",n[4])},m(a,u){S(a,e,u),_(e,t),S(a,i,u),S(a,s,u),_(s,l),o||(r=[K(e,"click",n[0]),K(s,"click",n[9])],o=!0)},p(a,u){u&16&&(e.disabled=a[4]),u&16&&(s.disabled=a[4]),u&16&&x(s,"btn-loading",a[4])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Le(r)}}}function HE(n){let e,t,i={class:"full-width-popup import-popup",overlayClose:!1,escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[jE],header:[RE],default:[FE]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[10]),l&1048604&&(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),q(e,s)}}}function qE(n,e,t){const i=$t();let s,l=[Line truncated
- ${C.join(`
- `)}`,()=>{h()}):h()}async function h(){if(!u){t(4,u=!0);try{await he.collections.import(o,a),Vt("Successfully imported collections configuration."),i("submit")}catch(C){he.errorResponseHandler(C)}t(4,u=!1),c()}}const g=()=>m(),b=()=>!u;function y(C){ie[C?"unshift":"push"](()=>{s=C,t(1,s)})}function k(C){We.call(this,n,C)}function T(C){We.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,m,f,l,o,g,b,y,k,T]}class VE extends ye{constructor(e){super(),ve(this,e,qE,HE,be,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function mh(n,e,t){const i=n.slice();return i[32]=e[t],i}function hh(n,e,t){const i=n.slice();return i[35]=e[t],i}function gh(n,e,t){const i=n.slice();return i[32]=e[t],i}function zE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O;a=new _e({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[UE,({uniqueId:U})=>({40:U}),({uniqueId:U})=>[0,U?512:0]]},$$scope:{ctx:n}}});let E=!1,I=n[6]&&n[1].length&&!n[7]&&bh(),L=n[6]&&n[1].length&&n[7]&&vh(n),N=n[13].length&&Eh(n),F=!!n[0]&&Ah(n);return{c(){e=v("input"),t=D(),i=v("div"),s=v("p"),l=z(`Paste below the collections configuration you want to import or
`),o=v("button"),o.innerHTML='<span class="txt">Load from JSON file</span>',r=D(),q(a.$$.fragment),u=D(),f=D(),I&&I.c(),c=D(),L&&L.c(),d=D(),N&&N.c(),m=D(),h=v("div"),F&&F.c(),g=D(),b=v("div"),y=D(),k=v("button"),T=v("span"),T.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"),Q(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(b,"class","flex-fill"),p(T,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(h,"class","flex m-t-base")},m(U,Z){S(U,e,Z),n[19](e),S(U,t,Z),S(U,i,Z),_(i,s),_(s,l),_(s,o),S(U,r,Z),j(a,U,Z),S(U,u,Z),S(U,f,Z),I&&I.m(U,Z),S(U,c,Z),L&&L.m(U,Z),S(U,d,Z),N&&N.m(U,Z),S(U,m,Z),S(U,h,Z),F&&F.m(h,null),_(h,g),_(h,b),_(h,y),_(h,k),_(k,T),M=!0,$||(O=[K(e,"change",n[20]),K(o,"click",n[21]),K(k,"click",n[26])],$=!0)},p(U,Z){(!M||Z[0]&4096)&&Q(o,"btn-loading",U[12]);const ne={};Z[0]&64&&(ne.class="form-field "+(U[6]?"":"field-error")),Z[0]&65|Z[1]&1536&&(ne.$$scope={dirty:Z,ctx:U}),a.$set(ne),U[6]&&U[1].length&&!U[7]?I||(I=bh(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),U[6]&&U[1].length&&U[7]?L?L.p(U,Z):(L=vh(U),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),U[13].length?N?N.p(U,Z):(N=Eh(U),N.c(),N.m(m.parentNode,m)):N&&(N.d(1),N=null),U[0]?F?F.p(U,Z):(F=Ah(U),F.c(),F.m(h,g)):F&&(F.d(1),F=null),(!M||Z[0]&16384&&C!==(C=!U[14]))&&(k.disabled=C)},i(U){M||(A(a.$$.fragment,U),A(E),M=!0)},o(U){P(a.$$.fragment,U),P(E),M=!1},d(U){U&&w(e),n[19](null),U&&w(t),U&&w(i),U&&w(r),H(a,U),U&&w(u),U&&w(f),I&&I.d(U),U&&w(c),L&&L.d(U),U&&w(d),N&&N.d(U),U&&w(m),U&&w(h),F&&F.d(),$=!1,Le(O)}}}function BE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:X,i:X,o:X,d(t){t&&w(e)}}}function _h(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function UE(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&_h();return{c(){e=v("label"),t=z("Collections"),s=D(),l=v("textarea"),r=D(),c&&c.c(),a=Ae(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,m){S(d,e,m),_(e,t),S(d,s,m),S(d,l,m),de(l,n[0]),S(d,r,m),c&&c.m(d,m),S(d,a,m),u||(f=K(l,"input",n[22]),u=!0)},p(d,m){m[1]&512&&i!==(i=d[40])&&p(e,"for",i),m[1]&512&&o!==(o=d[40])&&p(l,"id",o),m[0]&1&&de(l,d[0]),d[0]&&!d[6]?c||(c=_h(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function bh(n){let e;return{c(){e=v("div"),e.innerHTML=`<div class="icon"><i class="ri-information-line"></i></div>
`),o=v("button"),o.innerHTML='<span class="txt">Load from JSON file</span>',r=D(),V(a.$$.fragment),u=D(),f=D(),I&&I.c(),c=D(),L&&L.c(),d=D(),N&&N.c(),m=D(),h=v("div"),F&&F.c(),g=D(),b=v("div"),y=D(),k=v("button"),T=v("span"),T.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"),x(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(b,"class","flex-fill"),p(T,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(h,"class","flex m-t-base")},m(U,J){S(U,e,J),n[19](e),S(U,t,J),S(U,i,J),_(i,s),_(s,l),_(s,o),S(U,r,J),H(a,U,J),S(U,u,J),S(U,f,J),I&&I.m(U,J),S(U,c,J),L&&L.m(U,J),S(U,d,J),N&&N.m(U,J),S(U,m,J),S(U,h,J),F&&F.m(h,null),_(h,g),_(h,b),_(h,y),_(h,k),_(k,T),M=!0,$||(O=[K(e,"change",n[20]),K(o,"click",n[21]),K(k,"click",n[26])],$=!0)},p(U,J){(!M||J[0]&4096)&&x(o,"btn-loading",U[12]);const ne={};J[0]&64&&(ne.class="form-field "+(U[6]?"":"field-error")),J[0]&65|J[1]&1536&&(ne.$$scope={dirty:J,ctx:U}),a.$set(ne),U[6]&&U[1].length&&!U[7]?I||(I=bh(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),U[6]&&U[1].length&&U[7]?L?L.p(U,J):(L=vh(U),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),U[13].length?N?N.p(U,J):(N=Eh(U),N.c(),N.m(m.parentNode,m)):N&&(N.d(1),N=null),U[0]?F?F.p(U,J):(F=Ah(U),F.c(),F.m(h,g)):F&&(F.d(1),F=null),(!M||J[0]&16384&&C!==(C=!U[14]))&&(k.disabled=C)},i(U){M||(A(a.$$.fragment,U),A(E),M=!0)},o(U){P(a.$$.fragment,U),P(E),M=!1},d(U){U&&w(e),n[19](null),U&&w(t),U&&w(i),U&&w(r),q(a,U),U&&w(u),U&&w(f),I&&I.d(U),U&&w(c),L&&L.d(U),U&&w(d),N&&N.d(U),U&&w(m),U&&w(h),F&&F.d(),$=!1,Le(O)}}}function BE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function _h(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function UE(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&_h();return{c(){e=v("label"),t=z("Collections"),s=D(),l=v("textarea"),r=D(),c&&c.c(),a=Ae(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,m){S(d,e,m),_(e,t),S(d,s,m),S(d,l,m),de(l,n[0]),S(d,r,m),c&&c.m(d,m),S(d,a,m),u||(f=K(l,"input",n[22]),u=!0)},p(d,m){m[1]&512&&i!==(i=d[40])&&p(e,"for",i),m[1]&512&&o!==(o=d[40])&&p(l,"id",o),m[0]&1&&de(l,d[0]),d[0]&&!d[6]?c||(c=_h(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function bh(n){let e;return{c(){e=v("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){S(t,e,i)},d(t){t&&w(e)}}}function vh(n){let e,t,i,s,l,o=n[9].length&&yh(n),r=n[4].length&&Sh(n),a=n[8].length&&Mh(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=D(),i=v("div"),o&&o.c(),s=D(),r&&r.c(),l=D(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),_(i,s),r&&r.m(i,null),_(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=yh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=Sh(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=Mh(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function yh(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;o<s.length;o+=1){let r=gh(n,s,o),a=l(r);t.set(a,e[o]=wh(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Ae()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);S(o,i,r)},p(o,r){r[0]&512&&(s=o[9],e=wt(e,r,l,1,o,s,t,i.parentNode,Xi,wh,i,gh))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&w(i)}}}function kh(n){let e,t,i=n[32].id+"",s,l;return{c(){e=v("small"),t=z("("),s=z(i),l=z(")"),p(e,"class","txt-hint")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r[0]&512&&i!==(i=o[32].id+"")&&re(s,i)},d(o){o&&w(e)}}}function wh(n,e){let t,i,s,l,o=e[32].name+"",r,a,u,f=e[32].id&&kh(e);return{key:n,first:null,c(){t=v("div"),i=v("span"),i.textContent="Deleted",s=D(),l=v("strong"),r=z(o),a=D(),f&&f.c(),u=D(),p(i,"class","label label-danger list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){S(c,t,d),_(t,i),_(t,s),_(t,l),_(l,r),_(t,a),f&&f.m(t,null),_(t,u)},p(c,d){e=c,d[0]&512&&o!==(o=e[32].name+"")&&re(r,o),e[32].id?f?f.p(e,d):(f=kh(e),f.c(),f.m(t,u)):f&&(f.d(1),f=null)},d(c){c&&w(t),f&&f.d()}}}function Sh(n){let e=[],t=new Map,i,s=n[4];const l=o=>o[35].old.id+o[35].new.id;for(let o=0;o<s.length;o+=1){let r=hh(n,s,o),a=l(r);t.set(a,e[o]=$h(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Ae()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);S(o,i,r)},p(o,r){r[0]&16&&(s=o[4],e=wt(e,r,l,1,o,s,t,i.parentNode,Xi,$h,i,hh))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&w(i)}}}function Th(n){let e,t=n[35].old.name+"",i,s,l;return{c(){e=v("strong"),i=z(t),s=D(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),_(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&16&&t!==(t=o[35].old.name+"")&&re(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function Ch(n){let e,t,i=n[35].new.id+"",s,l;return{c(){e=v("small"),t=z("("),s=z(i),l=z(")"),p(e,"class","txt-hint")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r[0]&16&&i!==(i=o[35].new.id+"")&&re(s,i)},d(o){o&&w(e)}}}function $h(n,e){let t,i,s,l,o,r,a=e[35].new.name+"",u,f,c,d=e[35].old.name!==e[35].new.name&&Th(e),m=e[35].new.id&&Ch(e);return{key:n,first:null,c(){t=v("div"),i=v("span"),i.textContent="Changed",s=D(),l=v("div"),d&&d.c(),o=D(),r=v("strong"),u=z(a),f=D(),m&&m.c(),c=D(),p(i,"class","label label-warning list-label svelte-1jx20fl"),p(l,"class","inline-flex flex-gap-5"),p(t,"class","list-item"),this.first=t},m(h,g){S(h,t,g),_(t,i),_(t,s),_(t,l),d&&d.m(l,null),_(l,o),_(l,r),_(r,u),_(l,f),m&&m.m(l,null),_(t,c)},p(h,g){e=h,e[35].old.name!==e[35].new.name?d?d.p(e,g):(d=Th(e),d.c(),d.m(l,o)):d&&(d.d(1),d=null),g[0]&16&&a!==(a=e[35].new.name+"")&&re(u,a),e[35].new.id?m?m.p(e,g):(m=Ch(e),m.c(),m.m(l,null)):m&&(m.d(1),m=null)},d(h){h&&w(t),d&&d.d(),m&&m.d()}}}function Mh(n){let e=[],t=new Map,i,s=n[8];const l=o=>o[32].id;for(let o=0;o<s.length;o+=1){let r=mh(n,s,o),a=l(r);t.set(a,e[o]=Oh(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Ae()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);S(o,i,r)},p(o,r){r[0]&256&&(s=o[8],e=wt(e,r,l,1,o,s,t,i.parentNode,Xi,Oh,i,mh))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&w(i)}}}function Dh(n){let e,t,i=n[32].id+"",s,l;return{c(){e=v("small"),t=z("("),s=z(i),l=z(")"),p(e,"class","txt-hint")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r[0]&256&&i!==(i=o[32].id+"")&&re(s,i)},d(o){o&&w(e)}}}function Oh(n,e){let t,i,s,l,o=e[32].name+"",r,a,u,f=e[32].id&&Dh(e);return{key:n,first:null,c(){t=v("div"),i=v("span"),i.textContent="Added",s=D(),l=v("strong"),r=z(o),a=D(),f&&f.c(),u=D(),p(i,"class","label label-success list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){S(c,t,d),_(t,i),_(t,s),_(t,l),_(l,r),_(t,a),f&&f.m(t,null),_(t,u)},p(c,d){e=c,d[0]&256&&o!==(o=e[32].name+"")&&re(r,o),e[32].id?f?f.p(e,d):(f=Dh(e),f.c(),f.m(t,u)):f&&(f.d(1),f=null)},d(c){c&&w(t),f&&f.d()}}}function Eh(n){let e,t,i,s,l,o,r,a;return{c(){e=v("div"),t=v("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=D(),s=v("div"),s.innerHTML=`<string>Some of the imported collections shares the same name and/or fields but are
imported with different IDs. You can replace them in the import if you want
to.</string>`,l=D(),o=v("button"),o.innerHTML='<span class="txt">Replace with original ids</span>',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:X,d(u){u&&w(e),r=!1,a()}}}function Ah(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<span class="txt">Clear</span>',p(e,"type","button"),p(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:X,d(s){s&&w(e),t=!1,i()}}}function WE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[BE,zE],h=[];function g(b,y){return b[5]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[15]),r=D(),a=v("div"),u=v("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,y){S(b,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,y),S(b,a,y),_(a,u),h[f].m(u,null),d=!0},p(b,y){(!d||y[0]&32768)&&re(o,b[15]);let k=f;f=g(b),f===k?h[f].p(b,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),me(),c=h[f],c?c.p(b,y):(c=h[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){P(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),h[f].d()}}}function YE(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[WE]},$$scope:{ctx:n}}});let r={};return l=new VE({props:r}),n[27](l),l.$on("submit",n[28]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[27](null),H(l,a)}}}function KE(n,e,t){let i,s,l,o,r,a,u;Je(n,St,V=>t(15,u=V)),Yt(St,u="Import collections",u);let f,c,d="",m=!1,h=[],g=[],b=!0,y=[],k=!1;T();async function T(){t(5,k=!0);try{t(2,g=await he.collections.getFullList(200));for(let V of g)delete V.created,delete V.updated}catch(V){he.errorResponseHandler(V)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let V of h){const x=B.findByKey(g,"id",V.id);!(x!=null&&x.id)||!B.hasCollectionChanges(x,V,b)||y.push({new:V,old:x})}}function M(){t(1,h=[]);try{t(1,h=JSON.parse(d))}catch{}Array.isArray(h)?t(1,h=B.filterDuplicatesByKey(h)):t(1,h=[]);for(let V of h)delete V.created,delete V.updated,V.schema=B.filterDuplicatesByKey(V.schema)}function $(){var V,x;for(let Y of h){const se=B.findByKey(g,"name",Y.name)||B.findByKey(g,"id",Y.id);if(!se)continue;const He=Y.id,Re=se.id;Y.id=Re;const Fe=Array.isArray(se.schema)?se.schema:[],qe=Array.isArray(Y.schema)?Y.schema:[];for(const ge of qe){const Se=B.findByKey(Fe,"name",ge.name);Se&&Se.id&&(ge.id=Se.id)}for(let ge of h)if(Array.isArray(ge.schema))for(let Se of ge.schema)(V=Se.options)!=null&&V.collectionId&&((x=Se.options)==null?void 0:x.collectionId)===He&&(Se.options.collectionId=Re)}t(0,d=JSON.stringify(h,null,4))}function O(V){t(12,m=!0);const x=new FileReader;x.onload=async Y=>{t(12,m=!1),t(10,f.value="",f),t(0,d=Y.target.result),await cn(),h.length||(cl("Invalid collections configuration."),E())},x.onerror=Y=>{console.warn(Y),cl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},x.readAsText(V)}function E(){t(0,d=""),t(10,f.value="",f),Vn({})}function I(V){ie[V?"unshift":"push"](()=>{f=V,t(10,f)})}const L=()=>{f.files.length&&O(f.files[0])},N=()=>{f.click()};function F(){d=this.value,t(0,d)}function U(){b=this.checked,t(3,b)}const Z=()=>$(),ne=()=>E(),G=()=>c==null?void 0:c.show(g,h,b);function J(V){ie[V?"unshift":"push"](()=>{c=V,t(11,c)})}const te=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&h.length&&h.length===h.filter(V=>!!V.id&&!!V.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(V=>i&&b&&!B.findByKey(h,"id",V.id))),n.$$.dirty[0]&70&&t(8,l=h.filter(V=>i&&!B.findByKey(g,"id",V.id))),n.$$.dirty[0]&10&&(typeof h<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=h.filter(V=>{let x=B.findByKey(g,"name",V.name)||B.findByKey(g,"id",V.id);if(!x)return!1;if(x.id!=V.id)return!0;const Y=Array.isArray(x.schema)?x.schema:[],se=Array.isArray(V.schema)?V.schema:[];for(const He of se){if(B.findByKey(Y,"id",He.id))continue;const Fe=B.findByKey(Y,"name",He.name);if(Fe&&He.id!=Fe.id)return!0}return!1}))},[d,h,g,b,y,k,i,o,l,s,f,c,m,a,r,u,$,O,E,I,L,N,F,U,Z,ne,G,J,te]}class JE extends ye{constructor(e){super(),ve(this,e,KE,YE,be,{},null,[-1,-1])}}const Lt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Ti("/"):!0}],ZE={"/login":Dt({component:UD,conditions:Lt.concat([n=>!he.auLine truncated
to.</string>`,l=D(),o=v("button"),o.innerHTML='<span class="txt">Replace with original ids</span>',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:G,d(u){u&&w(e),r=!1,a()}}}function Ah(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<span class="txt">Clear</span>',p(e,"type","button"),p(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function WE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[BE,zE],h=[];function g(b,y){return b[5]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[15]),r=D(),a=v("div"),u=v("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,y){S(b,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,y),S(b,a,y),_(a,u),h[f].m(u,null),d=!0},p(b,y){(!d||y[0]&32768)&&re(o,b[15]);let k=f;f=g(b),f===k?h[f].p(b,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),me(),c=h[f],c?c.p(b,y):(c=h[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){P(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),h[f].d()}}}function YE(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[WE]},$$scope:{ctx:n}}});let r={};return l=new VE({props:r}),n[27](l),l.$on("submit",n[28]),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment),s=D(),V(l.$$.fragment)},m(a,u){H(e,a,u),S(a,t,u),H(i,a,u),S(a,s,u),H(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(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&&w(t),q(i,a),a&&w(s),n[27](null),q(l,a)}}}function KE(n,e,t){let i,s,l,o,r,a,u;Je(n,St,R=>t(15,u=R)),Yt(St,u="Import collections",u);let f,c,d="",m=!1,h=[],g=[],b=!0,y=[],k=!1;T();async function T(){t(5,k=!0);try{t(2,g=await he.collections.getFullList(200));for(let R of g)delete R.created,delete R.updated}catch(R){he.errorResponseHandler(R)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let R of h){const X=B.findByKey(g,"id",R.id);!(X!=null&&X.id)||!B.hasCollectionChanges(X,R,b)||y.push({new:R,old:X})}}function M(){t(1,h=[]);try{t(1,h=JSON.parse(d))}catch{}Array.isArray(h)?t(1,h=B.filterDuplicatesByKey(h)):t(1,h=[]);for(let R of h)delete R.created,delete R.updated,R.schema=B.filterDuplicatesByKey(R.schema)}function $(){var R,X;for(let Y of h){const se=B.findByKey(g,"name",Y.name)||B.findByKey(g,"id",Y.id);if(!se)continue;const He=Y.id,Re=se.id;Y.id=Re;const Fe=Array.isArray(se.schema)?se.schema:[],qe=Array.isArray(Y.schema)?Y.schema:[];for(const ge of qe){const Se=B.findByKey(Fe,"name",ge.name);Se&&Se.id&&(ge.id=Se.id)}for(let ge of h)if(Array.isArray(ge.schema))for(let Se of ge.schema)(R=Se.options)!=null&&R.collectionId&&((X=Se.options)==null?void 0:X.collectionId)===He&&(Se.options.collectionId=Re)}t(0,d=JSON.stringify(h,null,4))}function O(R){t(12,m=!0);const X=new FileReader;X.onload=async Y=>{t(12,m=!1),t(10,f.value="",f),t(0,d=Y.target.result),await cn(),h.length||(cl("Invalid collections configuration."),E())},X.onerror=Y=>{console.warn(Y),cl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},X.readAsText(R)}function E(){t(0,d=""),t(10,f.value="",f),Vn({})}function I(R){ie[R?"unshift":"push"](()=>{f=R,t(10,f)})}const L=()=>{f.files.length&&O(f.files[0])},N=()=>{f.click()};function F(){d=this.value,t(0,d)}function U(){b=this.checked,t(3,b)}const J=()=>$(),ne=()=>E(),Z=()=>c==null?void 0:c.show(g,h,b);function te(R){ie[R?"unshift":"push"](()=>{c=R,t(11,c)})}const ee=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&h.length&&h.length===h.filter(R=>!!R.id&&!!R.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(R=>i&&b&&!B.findByKey(h,"id",R.id))),n.$$.dirty[0]&70&&t(8,l=h.filter(R=>i&&!B.findByKey(g,"id",R.id))),n.$$.dirty[0]&10&&(typeof h<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=h.filter(R=>{let X=B.findByKey(g,"name",R.name)||B.findByKey(g,"id",R.id);if(!X)return!1;if(X.id!=R.id)return!0;const Y=Array.isArray(X.schema)?X.schema:[],se=Array.isArray(R.schema)?R.schema:[];for(const He of se){if(B.findByKey(Y,"id",He.id))continue;const Fe=B.findByKey(Y,"name",He.name);if(Fe&&He.id!=Fe.id)return!0}return!1}))},[d,h,g,b,y,k,i,o,l,s,f,c,m,a,r,u,$,O,E,I,L,N,F,U,J,ne,Z,te,ee]}class JE extends ye{constructor(e){super(),ve(this,e,KE,YE,be,{},null,[-1,-1])}}const Lt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Ti("/"):!0}],ZE={"/login":Dt({component:UD,conditions:Lt.concat([n=>!he.Line truncated
<span class="txt">Manage admins</span>`,t=D(),i=v("hr"),s=D(),l=v("button"),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,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Pe(Xt.call(null,e)),K(l,"click",n[6])],o=!0)},p:X,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Le(r)}}}function fA(n){var m;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=B.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((m=n[0])==null?void 0:m.id)&&n[1]&&Lh(n);return o=new Vb({props:{routes:ZE}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new iA({}),f=new aA({}),{c(){t=D(),i=v("div"),d&&d.c(),s=D(),l=v("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(h,g){S(h,t,g),S(h,i,g),d&&d.m(i,null),_(i,s),_(i,l),j(o,l,null),_(l,r),j(a,l,null),S(h,u,g),j(f,h,g),c=!0},p(h,[g]){var b;(!c||g&12)&&e!==(e=B.joinNonEmpty([h[3],h[2],"PocketBase"]," - "))&&(document.title=e),(b=h[0])!=null&&b.id&&h[1]?d?(d.p(h,g),g&3&&A(d,1)):(d=Lh(h),d.c(),A(d,1),d.m(i,s)):d&&(pe(),P(d,1,1,()=>{d=null}),me())},i(h){c||(A(d),A(o.$$.fragment,h),A(a.$$.fragment,h),A(f.$$.fragment,h),c=!0)},o(h){P(d),P(o.$$.fragment,h),P(a.$$.fragment,h),P(f.$$.fragment,h),c=!1},d(h){h&&w(t),h&&w(i),d&&d.d(),H(o),H(a),h&&w(u),H(f,h)}}}function cA(n,e,t){let i,s,l,o;Je(n,Cs,m=>t(8,i=m)),Je(n,yo,m=>t(2,s=m)),Je(n,Ma,m=>t(0,l=m)),Je(n,St,m=>t(3,o=m));let r,a=!1;function u(m){var h,g,b,y;((h=m==null?void 0:m.detail)==null?void 0:h.location)!==r&&(t(1,a=!!((b=(g=m==null?void 0:m.detail)==null?void 0:g.userData)!=null&&b.showAppSidebar)),r=(y=m==null?void 0:m.detail)==null?void 0:y.location,Yt(St,o="",o),Vn({}),ib())}function f(){Ti("/")}async function c(){var m,h;if(l!=null&&l.id)try{const g=await he.settings.getAll({$cancelKey:"initialAppSettings"});Yt(yo,s=((m=g==null?void 0:g.meta)==null?void 0:m.appName)||"",s),Yt(Cs,i=!!((h=g==null?void 0:g.meta)!=null&&h.hideControls),i)}catch(g){g!=null&&g.isAbort||console.warn("Failed to load app settings.",g)}}function d(){he.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class dA extends ye{constructor(e){super(),ve(this,e,cA,fA,be,{})}}new dA({target:document.getElementById("app")});export{Le as A,Vt as B,B as C,Ti as D,Ae as E,t_ as F,ga as G,du as H,Je as I,es as J,$t as K,nn as L,ie as M,eb as N,wt as O,Xi as P,tn as Q,bn as R,ye as S,Ir as T,P as a,D as b,q as c,H as d,v as e,p as f,S as g,_ as h,ve as i,Pe as j,pe as k,Xt as l,j as m,me as n,w as o,he as p,_e as q,Q as r,be as s,A as t,K as u,pt as v,z as w,re as x,X as y,de as z};
<span class="txt">Logout</span>`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Pe(Xt.call(null,e)),K(l,"click",n[6])],o=!0)},p:G,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Le(r)}}}function fA(n){var m;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=B.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((m=n[0])==null?void 0:m.id)&&n[1]&&Lh(n);return o=new Vb({props:{routes:ZE}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new iA({}),f=new aA({}),{c(){t=D(),i=v("div"),d&&d.c(),s=D(),l=v("div"),V(o.$$.fragment),r=D(),V(a.$$.fragment),u=D(),V(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(h,g){S(h,t,g),S(h,i,g),d&&d.m(i,null),_(i,s),_(i,l),H(o,l,null),_(l,r),H(a,l,null),S(h,u,g),H(f,h,g),c=!0},p(h,[g]){var b;(!c||g&12)&&e!==(e=B.joinNonEmpty([h[3],h[2],"PocketBase"]," - "))&&(document.title=e),(b=h[0])!=null&&b.id&&h[1]?d?(d.p(h,g),g&3&&A(d,1)):(d=Lh(h),d.c(),A(d,1),d.m(i,s)):d&&(pe(),P(d,1,1,()=>{d=null}),me())},i(h){c||(A(d),A(o.$$.fragment,h),A(a.$$.fragment,h),A(f.$$.fragment,h),c=!0)},o(h){P(d),P(o.$$.fragment,h),P(a.$$.fragment,h),P(f.$$.fragment,h),c=!1},d(h){h&&w(t),h&&w(i),d&&d.d(),q(o),q(a),h&&w(u),q(f,h)}}}function cA(n,e,t){let i,s,l,o;Je(n,Cs,m=>t(8,i=m)),Je(n,vo,m=>t(2,s=m)),Je(n,Ma,m=>t(0,l=m)),Je(n,St,m=>t(3,o=m));let r,a=!1;function u(m){var h,g,b,y;((h=m==null?void 0:m.detail)==null?void 0:h.location)!==r&&(t(1,a=!!((b=(g=m==null?void 0:m.detail)==null?void 0:g.userData)!=null&&b.showAppSidebar)),r=(y=m==null?void 0:m.detail)==null?void 0:y.location,Yt(St,o="",o),Vn({}),ib())}function f(){Ti("/")}async function c(){var m,h;if(l!=null&&l.id)try{const g=await he.settings.getAll({$cancelKey:"initialAppSettings"});Yt(vo,s=((m=g==null?void 0:g.meta)==null?void 0:m.appName)||"",s),Yt(Cs,i=!!((h=g==null?void 0:g.meta)!=null&&h.hideControls),i)}catch(g){g!=null&&g.isAbort||console.warn("Failed to load app settings.",g)}}function d(){he.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class dA extends ye{constructor(e){super(),ve(this,e,cA,fA,be,{})}}new dA({target:document.getElementById("app")});export{Le as A,Vt as B,B as C,Ti as D,Ae as E,t_ as F,ga as G,du as H,Je as I,es as J,$t as K,nn as L,ie as M,eb as N,wt as O,Xi as P,tn as Q,bn as R,ye as S,Ir as T,P as a,D as b,V as c,q as d,v as e,p as f,S as g,_ as h,ve as i,Pe as j,pe as k,Xt as l,H as m,me as n,w as o,he as p,_e as q,x as r,be as s,A as t,K as u,pt as v,z as w,re as x,G as y,de as z};
+1 -1
View File
@@ -24,7 +24,7 @@
window.Prism = window.Prism || {};
window.Prism.manual = true;
</script>
<script type="module" crossorigin src="./assets/index-7525a1a3.js"></script>
<script type="module" crossorigin src="./assets/index-4530dce9.js"></script>
<link rel="stylesheet" href="./assets/index-1f00ff88.css">
</head>
<body>
+18 -12
View File
@@ -68,15 +68,9 @@
}
$: if (active) {
// add helper body class
CommonHelper.pushUnique(activePanels, uniqueId);
document.body.classList.add("overlay-active");
registerActivePanel();
} else {
// remove helper body class if there are no other active panels
CommonHelper.removeByValue(activePanels, uniqueId);
if (!activePanels.length) {
document.body.classList.remove("overlay-active");
}
unregisterActivePanel();
}
export function show() {
@@ -129,6 +123,20 @@
}
}
function registerActivePanel() {
CommonHelper.pushUnique(activePanels, uniqueId);
document.body.classList.add("overlay-active");
}
function unregisterActivePanel() {
CommonHelper.removeByValue(activePanels, uniqueId);
if (!activePanels.length) {
document.body.classList.remove("overlay-active");
}
}
function highestZIndex() {
return 1000 + getHolder().querySelectorAll(".overlay-panel-container.active").length;
}
@@ -196,14 +204,12 @@
return () => {
clearTimeout(contentScrollThrottle);
unregisterActivePanel();
// ensures that no artifacts remains
// (currently there is a bug with svelte transition)
wrapper?.classList?.add("hidden");
if (!activePanels.length) {
document.body.classList.remove("overlay-active");
}
setTimeout(() => {
wrapper?.remove();
}, 0);