reduced the default prewarmed goja vms to 25

This commit is contained in:
Gani Georgiev committed 2023-08-22 22:09:33 +03:00
1 parent 6ca1f5c431
commit 04826ba588
33 files changed
+92 -89

No files matched your search

@@ -1,4 +1,4 @@
import{S as Me,i as Se,s as ye,e as c,w,b as k,c as oe,f as h,g as d,h as a,m as se,x as G,O as we,P as Te,k as je,Q as Ae,n as Be,t as U,a as W,o as u,d as ae,C as Oe,p as Fe,r as V,u as Qe,N as Ne}from"./index-e9c07574.js";import{S as He}from"./SdkTabs-31f0c5d0.js";import{F as Ke}from"./FieldsQueryParam-152f9b5c.js";function ve(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l){let o,s=l[5].code+"",_,p,i,f;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),p=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,p),i||(f=Qe(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&V(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,f()}}}function $e(n,l){let o,s,_,p;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),oe(s.$$.fragment),_=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(i,f){d(i,o,f),se(s,o,null),a(o,_),p=!0},p(i,f){l=i;const m={};f&4&&(m.content=l[5].body),s.$set(m),(!p||f&6)&&V(o,"active",l[1]===l[5].code)},i(i){p||(U(s.$$.fragment,i),p=!0)},o(i){W(s.$$.fragment,i),p=!1},d(i){i&&u(o),ae(s)}}}function qe(n){var _e,be;let l,o,s=n[0].name+"",_,p,i,f,m,v,C,H=n[0].name+"",L,ne,E,P,I,j,J,$,K,ie,q,A,ce,Y,z=n[0].name+"",X,re,R,B,Z,M,x,de,ee,T,te,O,le,S,F,g=[],ue=new Map,fe,Q,b=[],me=new Map,y;P=new He({props:{js:`
import{S as Me,i as Se,s as ye,e as c,w,b as k,c as oe,f as h,g as d,h as a,m as se,x as G,O as we,P as Te,k as je,Q as Ae,n as Be,t as U,a as W,o as u,d as ae,C as Oe,p as Fe,r as V,u as Qe,N as Ne}from"./index-b606ec56.js";import{S as He}from"./SdkTabs-35d04812.js";import{F as Ke}from"./FieldsQueryParam-161606a5.js";function ve(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l){let o,s=l[5].code+"",_,p,i,f;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),p=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,p),i||(f=Qe(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&V(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,f()}}}function $e(n,l){let o,s,_,p;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),oe(s.$$.fragment),_=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(i,f){d(i,o,f),se(s,o,null),a(o,_),p=!0},p(i,f){l=i;const m={};f&4&&(m.content=l[5].body),s.$set(m),(!p||f&6)&&V(o,"active",l[1]===l[5].code)},i(i){p||(U(s.$$.fragment,i),p=!0)},o(i){W(s.$$.fragment,i),p=!1},d(i){i&&u(o),ae(s)}}}function qe(n){var _e,be;let l,o,s=n[0].name+"",_,p,i,f,m,v,C,H=n[0].name+"",L,ne,E,P,I,j,J,$,K,ie,q,A,ce,Y,z=n[0].name+"",X,re,R,B,Z,M,x,de,ee,T,te,O,le,S,F,g=[],ue=new Map,fe,Q,b=[],me=new Map,y;P=new He({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[3]}');
@@ -1,4 +1,4 @@
import{S as Ue,i as je,s as xe,N as Qe,e as s,w as k,b as p,c as J,f as b,g as d,h as o,m as K,x as ce,O as He,P as Je,k as Ke,Q as Ie,n as We,t as N,a as V,o as u,d as I,C as Ee,p as Ge,r as W,u as Xe}from"./index-e9c07574.js";import{S as Ye}from"./SdkTabs-31f0c5d0.js";import{F as Ze}from"./FieldsQueryParam-152f9b5c.js";function Le(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l){let a,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m($,w){d($,a,w),o(a,m),o(a,_),i||(f=Xe(a,"click",v),i=!0)},p($,w){l=$,w&4&&n!==(n=l[5].code+"")&&ce(m,n),w&6&&W(a,"active",l[1]===l[5].code)},d($){$&&u(a),i=!1,f()}}}function ze(r,l){let a,n,m,_;return n=new Qe({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),J(n.$$.fragment),m=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m(i,f){d(i,a,f),K(n,a,null),o(a,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&W(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),I(n)}}}function et(r){var qe,De;let l,a,n=r[0].name+"",m,_,i,f,v,$,w,M,G,S,z,de,Q,q,ue,X,U=r[0].name+"",Y,pe,fe,j,Z,D,ee,T,te,he,F,C,oe,be,le,me,h,_e,R,ke,ve,$e,ae,ge,se,ye,Se,we,ne,Te,Ce,A,re,O,ie,P,H,y=[],Pe=new Map,Re,E,g=[],Ae=new Map,B;$=new Ye({props:{js:`
import{S as Ue,i as je,s as xe,N as Qe,e as s,w as k,b as p,c as J,f as b,g as d,h as o,m as K,x as ce,O as He,P as Je,k as Ke,Q as Ie,n as We,t as N,a as V,o as u,d as I,C as Ee,p as Ge,r as W,u as Xe}from"./index-b606ec56.js";import{S as Ye}from"./SdkTabs-35d04812.js";import{F as Ze}from"./FieldsQueryParam-161606a5.js";function Le(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l){let a,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m($,w){d($,a,w),o(a,m),o(a,_),i||(f=Xe(a,"click",v),i=!0)},p($,w){l=$,w&4&&n!==(n=l[5].code+"")&&ce(m,n),w&6&&W(a,"active",l[1]===l[5].code)},d($){$&&u(a),i=!1,f()}}}function ze(r,l){let a,n,m,_;return n=new Qe({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),J(n.$$.fragment),m=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m(i,f){d(i,a,f),K(n,a,null),o(a,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&W(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),I(n)}}}function et(r){var qe,De;let l,a,n=r[0].name+"",m,_,i,f,v,$,w,M,G,S,z,de,Q,q,ue,X,U=r[0].name+"",Y,pe,fe,j,Z,D,ee,T,te,he,F,C,oe,be,le,me,h,_e,R,ke,ve,$e,ae,ge,se,ye,Se,we,ne,Te,Ce,A,re,O,ie,P,H,y=[],Pe=new Map,Re,E,g=[],Ae=new Map,B;$=new Ye({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${r[3]}');
@@ -1,4 +1,4 @@
import{S as Ve,i as Le,s as Ee,N as je,e as s,w as k,b as h,c as z,f as p,g as r,h as a,m as I,x as he,O as xe,P as Je,k as Ne,Q as Qe,n as ze,t as V,a as L,o as c,d as K,C as We,p as Ie,r as G,u as Ke}from"./index-e9c07574.js";import{S as Ge}from"./SdkTabs-31f0c5d0.js";import{F as Xe}from"./FieldsQueryParam-152f9b5c.js";function Ue(i,l,o){const n=i.slice();return n[5]=l[o],n}function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l){let o,n=l[5].code+"",m,g,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=k(n),g=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,g),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&he(m,n),A&6&&G(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function He(i,l){let o,n,m,g;return n=new je({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),z(n.$$.fragment),m=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),I(n,o,null),a(o,m),g=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!g||b&6)&&G(o,"active",l[1]===l[5].code)},i(u){g||(V(n.$$.fragment,u),g=!0)},o(u){L(n.$$.fragment,u),g=!1},d(u){u&&c(o),K(n)}}}function Ye(i){let l,o,n=i[0].name+"",m,g,u,b,_,v,A,P,X,S,E,pe,J,M,be,Y,N=i[0].name+"",Z,fe,ee,R,te,x,ae,W,le,y,oe,me,U,$,se,ge,ne,ke,f,_e,C,ve,we,Oe,ie,Ae,re,Se,ye,$e,ce,Te,Ce,q,ue,B,de,T,F,O=[],qe=new Map,De,H,w=[],Pe=new Map,D;v=new Ge({props:{js:`
import{S as Ve,i as Le,s as Ee,N as je,e as s,w as k,b as h,c as z,f as p,g as r,h as a,m as I,x as he,O as xe,P as Je,k as Ne,Q as Qe,n as ze,t as V,a as L,o as c,d as K,C as We,p as Ie,r as G,u as Ke}from"./index-b606ec56.js";import{S as Ge}from"./SdkTabs-35d04812.js";import{F as Xe}from"./FieldsQueryParam-161606a5.js";function Ue(i,l,o){const n=i.slice();return n[5]=l[o],n}function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l){let o,n=l[5].code+"",m,g,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=k(n),g=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,g),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&he(m,n),A&6&&G(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function He(i,l){let o,n,m,g;return n=new je({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),z(n.$$.fragment),m=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),I(n,o,null),a(o,m),g=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!g||b&6)&&G(o,"active",l[1]===l[5].code)},i(u){g||(V(n.$$.fragment,u),g=!0)},o(u){L(n.$$.fragment,u),g=!1},d(u){u&&c(o),K(n)}}}function Ye(i){let l,o,n=i[0].name+"",m,g,u,b,_,v,A,P,X,S,E,pe,J,M,be,Y,N=i[0].name+"",Z,fe,ee,R,te,x,ae,W,le,y,oe,me,U,$,se,ge,ne,ke,f,_e,C,ve,we,Oe,ie,Ae,re,Se,ye,$e,ce,Te,Ce,q,ue,B,de,T,F,O=[],qe=new Map,De,H,w=[],Pe=new Map,D;v=new Ge({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');
@@ -1,4 +1,4 @@
import{S as we,i as ye,s as ge,N as ve,e as s,w as f,b as d,c as at,f as h,g as r,h as e,m as st,x as Mt,O as ue,P as $e,k as Pe,Q as Re,n as Ce,t as Z,a as x,o as c,d as nt,C as fe,p as Oe,r as it,u as Ae}from"./index-e9c07574.js";import{S as Te}from"./SdkTabs-31f0c5d0.js";import{F as Ue}from"./FieldsQueryParam-152f9b5c.js";function pe(n,l,o){const i=n.slice();return i[8]=l[o],i}function be(n,l,o){const i=n.slice();return i[8]=l[o],i}function Me(n){let l;return{c(){l=f("email")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function De(n){let l;return{c(){l=f("username")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function Ee(n){let l;return{c(){l=f("username/email")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function me(n){let l;return{c(){l=s("strong"),l.textContent="username"},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function he(n){let l;return{c(){l=f("or")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function _e(n){let l;return{c(){l=s("strong"),l.textContent="email"},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function ke(n,l){let o,i=l[8].code+"",S,m,p,u;function _(){return l[7](l[8])}return{key:n,first:null,c(){o=s("button"),S=f(i),m=d(),h(o,"class","tab-item"),it(o,"active",l[3]===l[8].code),this.first=o},m(R,C){r(R,o,C),e(o,S),e(o,m),p||(u=Ae(o,"click",_),p=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Mt(S,i),C&24&&it(o,"active",l[3]===l[8].code)},d(R){R&&c(o),p=!1,u()}}}function Se(n,l){let o,i,S,m;return i=new ve({props:{content:l[8].body}}),{key:n,first:null,c(){o=s("div"),at(i.$$.fragment),S=d(),h(o,"class","tab-item"),it(o,"active",l[3]===l[8].code),this.first=o},m(p,u){r(p,o,u),st(i,o,null),e(o,S),m=!0},p(p,u){l=p;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!m||u&24)&&it(o,"active",l[3]===l[8].code)},i(p){m||(Z(i.$$.fragment,p),m=!0)},o(p){x(i.$$.fragment,p),m=!1},d(p){p&&c(o),nt(i)}}}function We(n){var ie,re;let l,o,i=n[0].name+"",S,m,p,u,_,R,C,O,B,Dt,rt,T,ct,N,dt,U,tt,Et,et,I,Wt,ut,lt=n[0].name+"",ft,Lt,pt,V,bt,M,mt,Bt,Q,D,ht,qt,_t,Ft,$,Ht,kt,St,vt,Yt,wt,yt,j,gt,E,$t,Nt,J,W,Pt,It,Rt,Vt,k,Qt,q,jt,Jt,Kt,Ct,zt,Ot,Gt,Xt,Zt,At,xt,te,F,Tt,K,Ut,L,z,A=[],ee=new Map,le,G,v=[],oe=new Map,H;function ae(t,a){if(t[1]&&t[2])return Ee;if(t[1])return De;if(t[2])return Me}let Y=ae(n),P=Y&&Y(n);T=new Te({props:{js:`
import{S as we,i as ye,s as ge,N as ve,e as s,w as f,b as d,c as at,f as h,g as r,h as e,m as st,x as Mt,O as ue,P as $e,k as Pe,Q as Re,n as Ce,t as Z,a as x,o as c,d as nt,C as fe,p as Oe,r as it,u as Ae}from"./index-b606ec56.js";import{S as Te}from"./SdkTabs-35d04812.js";import{F as Ue}from"./FieldsQueryParam-161606a5.js";function pe(n,l,o){const i=n.slice();return i[8]=l[o],i}function be(n,l,o){const i=n.slice();return i[8]=l[o],i}function Me(n){let l;return{c(){l=f("email")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function De(n){let l;return{c(){l=f("username")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function Ee(n){let l;return{c(){l=f("username/email")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function me(n){let l;return{c(){l=s("strong"),l.textContent="username"},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function he(n){let l;return{c(){l=f("or")},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function _e(n){let l;return{c(){l=s("strong"),l.textContent="email"},m(o,i){r(o,l,i)},d(o){o&&c(l)}}}function ke(n,l){let o,i=l[8].code+"",S,m,p,u;function _(){return l[7](l[8])}return{key:n,first:null,c(){o=s("button"),S=f(i),m=d(),h(o,"class","tab-item"),it(o,"active",l[3]===l[8].code),this.first=o},m(R,C){r(R,o,C),e(o,S),e(o,m),p||(u=Ae(o,"click",_),p=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Mt(S,i),C&24&&it(o,"active",l[3]===l[8].code)},d(R){R&&c(o),p=!1,u()}}}function Se(n,l){let o,i,S,m;return i=new ve({props:{content:l[8].body}}),{key:n,first:null,c(){o=s("div"),at(i.$$.fragment),S=d(),h(o,"class","tab-item"),it(o,"active",l[3]===l[8].code),this.first=o},m(p,u){r(p,o,u),st(i,o,null),e(o,S),m=!0},p(p,u){l=p;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!m||u&24)&&it(o,"active",l[3]===l[8].code)},i(p){m||(Z(i.$$.fragment,p),m=!0)},o(p){x(i.$$.fragment,p),m=!1},d(p){p&&c(o),nt(i)}}}function We(n){var ie,re;let l,o,i=n[0].name+"",S,m,p,u,_,R,C,O,B,Dt,rt,T,ct,N,dt,U,tt,Et,et,I,Wt,ut,lt=n[0].name+"",ft,Lt,pt,V,bt,M,mt,Bt,Q,D,ht,qt,_t,Ft,$,Ht,kt,St,vt,Yt,wt,yt,j,gt,E,$t,Nt,J,W,Pt,It,Rt,Vt,k,Qt,q,jt,Jt,Kt,Ct,zt,Ot,Gt,Xt,Zt,At,xt,te,F,Tt,K,Ut,L,z,A=[],ee=new Map,le,G,v=[],oe=new Map,H;function ae(t,a){if(t[1]&&t[2])return Ee;if(t[1])return De;if(t[2])return Me}let Y=ae(n),P=Y&&Y(n);T=new Te({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[6]}');
@@ -1,4 +1,4 @@
import{S as dt,i as pt,s as St,e as $t,f as gt,T as J,g as mt,y as ze,o as Xt,J as Pt,K as Zt,L as bt,I as kt,C as xt,M as wt}from"./index-e9c07574.js";import{P as yt,N as Yt,u as Tt,D as vt,v as Te,T as M,I as ve,w as oe,x as n,y as Ut,L as ce,z as Qe,A as E,B as ue,F as ZO,G as fe,H as q,J as bO,K as kO,M as xO,E as U,O as N,Q as Rt,R as Vt,U as wO,V as Z,W as _t,X as Ct,a as j,h as Wt,b as qt,c as jt,d as zt,e as Gt,s as It,t as At,f as Et,g as Nt,r as Bt,i as Dt,k as Jt,j as Lt,l as Mt,m as Ft,n as Kt,o as Ht,p as ea,q as Ge,C as L}from"./index-4841d67b.js";class ee{constructor(e,a,t,i,s,r,l,o,Q,f=0,c){this.p=e,this.stack=a,this.state=t,this.reducePos=i,this.pos=s,this.score=r,this.buffer=l,this.bufferBase=o,this.curContext=Q,this.lookAhead=f,this.parent=c}toString(){return`[${this.stack.filter((e,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,a,t=0){let i=e.parser.context;return new ee(e,[],a,t,t,0,[],0,i?new Ie(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var a;let t=e>>19,i=e&65535,{parser:s}=this.p,r=s.dynamicPrecedence(i);if(r&&(this.score+=r),t==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(t-1)*3-(e&262144?6:0),o=l?this.stack[l-2]:this.p.ranges[0].from,Q=this.reducePos-o;Q>=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSize<Q&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=o,this.p.lastBigReductionSize=Q));let f=l?this.stack[l-1]:0,c=this.bufferBase+this.buffer.length-f;if(i<s.minRepeatTerm||e&131072){let h=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,o,h,c+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=s.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,o)}storeNode(e,a,t,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,l=this.buffer.length;if(l==0&&r.parent&&(l=r.bufferBase-r.parent.bufferBase,r=r.parent),l>0&&r.buffer[l-4]==0&&r.buffer[l-1]>-1){if(a==t)return;if(r.buffer[l-2]>=a){r.buffer[l-2]=t;return}}}if(!s||this.pos==t)this.buffer.push(e,a,t,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0)for(;r>0&&this.buffer[r-2]>t;)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]=e,this.buffer[r+1]=a,this.buffer[r+2]=t,this.buffer[r+3]=i}}shift(e,a,t){let i=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let s=e,{parser:r}=this.p;(t>this.pos||a<=r.maxNode)&&(this.pos=t,r.stateFlag(s,1)||(this.reducePos=t)),this.pushState(s,i),this.shiftContext(a,i),a<=r.maxNode&&this.buffer.push(a,i,t,4)}}apply(e,a,t){e&65536?this.reduce(e):this.shift(e,a,t)}useNode(e,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=e)&&(this.p.reused.push(e),t++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(a,i),this.buffer.push(t,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,a=e.buffer.length;for(;a>0&&e.buffer[a-2]>e.reducePos;)a-=4;let t=e.buffer.slice(a),i=e.bufferBase+a;for(;e&&i==e.bufferBase;)e=e.parent;return new ee(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,a){let t=e<=this.p.parser.maxNode;t&&this.storeNode(e,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(e){for(let a=new Oa(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,e);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(e){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>8||this.stack.length>=120){let i=[];for(let s=0,r;s<a.length;s+=2)(r=a[s+1])!=this.state&&this.p.parser.hasAction(r,e)&&i.push(a[s],r);if(this.stack.length<120)for(let s=0;i.length<8&&s<a.length;s+=2){let r=a[s+1];i.some((l,o)=>o&1&&l==r)||i.push(a[s],r)}a=i}let t=[];for(let i=0;i<a.length&&t.length<4;i+=2){let s=a[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(a[i],this.pos),r.score-=200,t.push(r)}return t}forceReduce(){let{parser:e}=this.p,a=e.stateSlot(this.state,5);if(!(a&65536))return!1;if(!e.validAction(this.state,a)){let t=a>>19,i=a&65535,s=this.stLine truncated
import{S as dt,i as pt,s as St,e as $t,f as gt,T as J,g as mt,y as ze,o as Xt,J as Pt,K as Zt,L as bt,I as kt,C as xt,M as wt}from"./index-b606ec56.js";import{P as yt,N as Yt,u as Tt,D as vt,v as Te,T as M,I as ve,w as oe,x as n,y as Ut,L as ce,z as Qe,A as E,B as ue,F as ZO,G as fe,H as q,J as bO,K as kO,M as xO,E as U,O as N,Q as Rt,R as Vt,U as wO,V as Z,W as _t,X as Ct,a as j,h as Wt,b as qt,c as jt,d as zt,e as Gt,s as It,t as At,f as Et,g as Nt,r as Bt,i as Dt,k as Jt,j as Lt,l as Mt,m as Ft,n as Kt,o as Ht,p as ea,q as Ge,C as L}from"./index-4841d67b.js";class ee{constructor(e,a,t,i,s,r,l,o,Q,f=0,c){this.p=e,this.stack=a,this.state=t,this.reducePos=i,this.pos=s,this.score=r,this.buffer=l,this.bufferBase=o,this.curContext=Q,this.lookAhead=f,this.parent=c}toString(){return`[${this.stack.filter((e,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,a,t=0){let i=e.parser.context;return new ee(e,[],a,t,t,0,[],0,i?new Ie(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var a;let t=e>>19,i=e&65535,{parser:s}=this.p,r=s.dynamicPrecedence(i);if(r&&(this.score+=r),t==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(t-1)*3-(e&262144?6:0),o=l?this.stack[l-2]:this.p.ranges[0].from,Q=this.reducePos-o;Q>=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSize<Q&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=o,this.p.lastBigReductionSize=Q));let f=l?this.stack[l-1]:0,c=this.bufferBase+this.buffer.length-f;if(i<s.minRepeatTerm||e&131072){let h=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,o,h,c+4,!0)}if(e&262144)this.state=this.stack[l];else{let h=this.stack[l-3];this.state=s.getGoto(h,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,o)}storeNode(e,a,t,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,l=this.buffer.length;if(l==0&&r.parent&&(l=r.bufferBase-r.parent.bufferBase,r=r.parent),l>0&&r.buffer[l-4]==0&&r.buffer[l-1]>-1){if(a==t)return;if(r.buffer[l-2]>=a){r.buffer[l-2]=t;return}}}if(!s||this.pos==t)this.buffer.push(e,a,t,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0)for(;r>0&&this.buffer[r-2]>t;)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]=e,this.buffer[r+1]=a,this.buffer[r+2]=t,this.buffer[r+3]=i}}shift(e,a,t){let i=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let s=e,{parser:r}=this.p;(t>this.pos||a<=r.maxNode)&&(this.pos=t,r.stateFlag(s,1)||(this.reducePos=t)),this.pushState(s,i),this.shiftContext(a,i),a<=r.maxNode&&this.buffer.push(a,i,t,4)}}apply(e,a,t){e&65536?this.reduce(e):this.shift(e,a,t)}useNode(e,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=e)&&(this.p.reused.push(e),t++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(a,i),this.buffer.push(t,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,a=e.buffer.length;for(;a>0&&e.buffer[a-2]>e.reducePos;)a-=4;let t=e.buffer.slice(a),i=e.bufferBase+a;for(;e&&i==e.bufferBase;)e=e.parent;return new ee(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,a){let t=e<=this.p.parser.maxNode;t&&this.storeNode(e,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(e){for(let a=new Oa(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,e);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(e){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>8||this.stack.length>=120){let i=[];for(let s=0,r;s<a.length;s+=2)(r=a[s+1])!=this.state&&this.p.parser.hasAction(r,e)&&i.push(a[s],r);if(this.stack.length<120)for(let s=0;i.length<8&&s<a.length;s+=2){let r=a[s+1];i.some((l,o)=>o&1&&l==r)||i.push(a[s],r)}a=i}let t=[];for(let i=0;i<a.length&&t.length<4;i+=2){let s=a[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(a[i],this.pos),r.score-=200,t.push(r)}return t}forceReduce(){let{parser:e}=this.p,a=e.stateSlot(this.state,5);if(!(a&65536))return!1;if(!e.validAction(this.state,a)){let t=a>>19,i=a&65535,s=this.stLine truncated
\${}
} catch (\${error}) {
\${}
@@ -1,4 +1,4 @@
import{S as Ce,i as $e,s as Pe,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,O as pe,P as Se,k as we,Q as Oe,n as Re,t as Z,a as x,o as m,d as ge,C as Te,p as Ee,r as j,u as ye,N as Be}from"./index-e9c07574.js";import{S as qe}from"./SdkTabs-31f0c5d0.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=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=ye(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&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new Be({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(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&&m(s),ge(a)}}}function Ae(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,P,I,R,L,S,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,w,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;P=new qe({props:{js:`
import{S as Ce,i as $e,s as Pe,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,O as pe,P as Se,k as we,Q as Oe,n as Re,t as Z,a as x,o as m,d as ge,C as Te,p as Ee,r as j,u as ye,N as Be}from"./index-b606ec56.js";import{S as qe}from"./SdkTabs-35d04812.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=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=ye(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&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new Be({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(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&&m(s),ge(a)}}}function Ae(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,P,I,R,L,S,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,w,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;P=new qe({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 r,w as P,b as v,c as ve,f as b,g as d,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 f,d as Pe,C as $e,p as Ee,r as U,u as Te,N as ge}from"./index-e9c07574.js";import{S as Ae}from"./SdkTabs-31f0c5d0.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=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(S,l,h),n(l,_),n(l,u),i||(p=Te(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&&f(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new ge({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(l),Pe(a)}}}function De(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,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new Ae({props:{js:`
import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,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 f,d as Pe,C as $e,p as Ee,r as U,u as Te,N as ge}from"./index-b606ec56.js";import{S as Ae}from"./SdkTabs-35d04812.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=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(S,l,h),n(l,_),n(l,u),i||(p=Te(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&&f(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new ge({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(l),Pe(a)}}}function De(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,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new Ae({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@@ -1,4 +1,4 @@
import{S as Pe,i as Se,s as Te,e as r,w,b as k,c as ge,f as b,g as f,h as i,m as ye,x as D,O as _e,P as Be,k as qe,Q as Oe,n as Re,t as Z,a as x,o as p,d as Ce,C as Ee,p as Ne,r as H,u as Ve,N as Ke}from"./index-e9c07574.js";import{S as Me}from"./SdkTabs-31f0c5d0.js";function ke(a,l,s){const o=a.slice();return o[5]=l[s],o}function ve(a,l,s){const o=a.slice();return o[5]=l[s],o}function we(a,l){let s,o=l[5].code+"",h,d,n,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),h=w(o),d=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m($,g){f($,s,g),i(s,h),i(s,d),n||(u=Ve(s,"click",m),n=!0)},p($,g){l=$,g&4&&o!==(o=l[5].code+"")&&D(h,o),g&6&&H(s,"active",l[1]===l[5].code)},d($){$&&p(s),n=!1,u()}}}function $e(a,l){let s,o,h,d;return o=new Ke({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ge(o.$$.fragment),h=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),ye(o,s,null),i(s,h),d=!0},p(n,u){l=n;const m={};u&4&&(m.content=l[5].body),o.$set(m),(!d||u&6)&&H(s,"active",l[1]===l[5].code)},i(n){d||(Z(o.$$.fragment,n),d=!0)},o(n){x(o.$$.fragment,n),d=!1},d(n){n&&p(s),Ce(o)}}}function Ae(a){var re,fe,pe,ue;let l,s,o=a[0].name+"",h,d,n,u,m,$,g,K=a[0].name+"",F,ee,I,y,L,T,Q,C,M,te,A,B,le,z,U=a[0].name+"",G,se,J,q,W,O,X,R,Y,P,E,v=[],oe=new Map,ae,N,_=[],ie=new Map,S;y=new Me({props:{js:`
import{S as Pe,i as Se,s as Te,e as r,w,b as k,c as ge,f as b,g as f,h as i,m as ye,x as D,O as _e,P as Be,k as qe,Q as Oe,n as Re,t as Z,a as x,o as p,d as Ce,C as Ee,p as Ne,r as H,u as Ve,N as Ke}from"./index-b606ec56.js";import{S as Me}from"./SdkTabs-35d04812.js";function ke(a,l,s){const o=a.slice();return o[5]=l[s],o}function ve(a,l,s){const o=a.slice();return o[5]=l[s],o}function we(a,l){let s,o=l[5].code+"",h,d,n,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),h=w(o),d=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m($,g){f($,s,g),i(s,h),i(s,d),n||(u=Ve(s,"click",m),n=!0)},p($,g){l=$,g&4&&o!==(o=l[5].code+"")&&D(h,o),g&6&&H(s,"active",l[1]===l[5].code)},d($){$&&p(s),n=!1,u()}}}function $e(a,l){let s,o,h,d;return o=new Ke({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ge(o.$$.fragment),h=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),ye(o,s,null),i(s,h),d=!0},p(n,u){l=n;const m={};u&4&&(m.content=l[5].body),o.$set(m),(!d||u&6)&&H(s,"active",l[1]===l[5].code)},i(n){d||(Z(o.$$.fragment,n),d=!0)},o(n){x(o.$$.fragment,n),d=!1},d(n){n&&p(s),Ce(o)}}}function Ae(a){var re,fe,pe,ue;let l,s,o=a[0].name+"",h,d,n,u,m,$,g,K=a[0].name+"",F,ee,I,y,L,T,Q,C,M,te,A,B,le,z,U=a[0].name+"",G,se,J,q,W,O,X,R,Y,P,E,v=[],oe=new Map,ae,N,_=[],ie=new Map,S;y=new Me({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@@ -1,4 +1,4 @@
import{S as qt,i as Ot,s as Mt,C as Q,N as Tt,e as a,w as k,b as u,c as be,f as h,g as d,h as n,m as _e,x,O as Be,P as _t,k as Ht,Q as Lt,n as Pt,t as fe,a as pe,o as c,d as ke,p as gt,r as ye,u as Ft,y as ne}from"./index-e9c07574.js";import{S as At}from"./SdkTabs-31f0c5d0.js";import{F as Bt}from"./FieldsQueryParam-152f9b5c.js";function kt(o,e,l){const s=o.slice();return s[8]=e[l],s}function yt(o,e,l){const s=o.slice();return s[8]=e[l],s}function vt(o,e,l){const s=o.slice();return s[13]=e[l],s}function ht(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){d(l,e,s)},d(l){l&&c(e)}}}function wt(o){let e,l,s,m,b,r,f,v,T,q,$,L,D,E,g,I,j,R,C,N,O,w,_;function M(p,S){var ee,K;return(K=(ee=p[0])==null?void 0:ee.options)!=null&&K.requireEmail?jt:Rt}let z=M(o),F=z(o);return{c(){e=a("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=u(),s=a("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
import{S as qt,i as Ot,s as Mt,C as Q,N as Tt,e as a,w as k,b as u,c as be,f as h,g as d,h as n,m as _e,x,O as Be,P as _t,k as Ht,Q as Lt,n as Pt,t as fe,a as pe,o as c,d as ke,p as gt,r as ye,u as Ft,y as ne}from"./index-b606ec56.js";import{S as At}from"./SdkTabs-35d04812.js";import{F as Bt}from"./FieldsQueryParam-161606a5.js";function kt(o,e,l){const s=o.slice();return s[8]=e[l],s}function yt(o,e,l){const s=o.slice();return s[8]=e[l],s}function vt(o,e,l){const s=o.slice();return s[13]=e[l],s}function ht(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){d(l,e,s)},d(l){l&&c(e)}}}function wt(o){let e,l,s,m,b,r,f,v,T,q,$,L,D,E,g,I,j,R,C,N,O,w,_;function M(p,S){var ee,K;return(K=(ee=p[0])==null?void 0:ee.options)!=null&&K.requireEmail?jt:Rt}let z=M(o),F=z(o);return{c(){e=a("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=u(),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 $,b as h,c as $e,f as m,g as f,h as n,m as ge,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as p,d as we,C as Ie,p as Ae,r as N,u as Me,N as Se}from"./index-e9c07574.js";import{S as qe}from"./SdkTabs-31f0c5d0.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){f(s,l,a)},d(s){s&&p(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,u;function g(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,w){f(b,s,w),n(s,v),n(s,i),r||(u=Me(s,"click",g),r=!0)},p(b,w){l=b,w&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&p(s),r=!1,u()}}}function De(o,l){let s,a,v,i;return a=new Se({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){f(r,s,u),ge(a,s,null),n(s,v),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&&p(s),we(a)}}}function He(o){var pe,ue;let l,s,a=o[0].name+"",v,i,r,u,g,b,w,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,D=[],ie=new Map,re,M,_=[],ce=new Map,P;C=new qe({props:{js:`
import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as ge,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as p,d as we,C as Ie,p as Ae,r as N,u as Me,N as Se}from"./index-b606ec56.js";import{S as qe}from"./SdkTabs-35d04812.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){f(s,l,a)},d(s){s&&p(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,u;function g(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,w){f(b,s,w),n(s,v),n(s,i),r||(u=Me(s,"click",g),r=!0)},p(b,w){l=b,w&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&p(s),r=!1,u()}}}function De(o,l){let s,a,v,i;return a=new Se({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){f(r,s,u),ge(a,s,null),n(s,v),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&&p(s),we(a)}}}function He(o){var pe,ue;let l,s,a=o[0].name+"",v,i,r,u,g,b,w,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,D=[],ie=new Map,re,M,_=[],ce=new Map,P;C=new qe({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@@ -1,4 +1,4 @@
import{S as d,i as n,s as i,e as l,g as o,y as s,o as p}from"./index-e9c07574.js";function c(a){let e;return{c(){e=l("tr"),e.innerHTML=`<td id="query-page">fields</td>
import{S as d,i as n,s as i,e as l,g as o,y as s,o as p}from"./index-b606ec56.js";function c(a){let e;return{c(){e=l("tr"),e.innerHTML=`<td id="query-page">fields</td>
<td><span class="label">String</span></td>
<td>Comma separated string of the fields to return in the JSON response
<em>(by default returns all fields)</em>. For example:
@@ -1 +1 @@
import{S as se,i as ae,s as le,e as ce,f as ue,g as de,y as M,o as fe,J as he,K as ge,L as pe,I as ye,C as f,M as ke}from"./index-e9c07574.js";import{E as K,a as C,h as xe,b as me,c as be,d as we,e as Ee,s as Se,f as Ke,g as Ce,r as qe,i as Re,k as Le,j as Ie,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as L,S as Me,t as De}from"./index-4841d67b.js";function He(e){Z(e,"start");var r={},n=e.languageData||{},p=!1;for(var y in e)if(y!=n&&e.hasOwnProperty(y))for(var h=r[y]=[],s=e[y],i=0;i<s.length;i++){var l=s[i];h.push(new Ue(l,e)),(l.indent||l.dedent)&&(p=!0)}return{name:n.name,startState:function(){return{state:"start",pending:null,indent:p?[]:null}},copyState:function(a){var m={state:a.state,pending:a.pending,indent:a.indent&&a.indent.slice(0)};return a.stack&&(m.stack=a.stack.slice(0)),m},token:We(r),indent:Ne(r,n),languageData:n}}function Z(e,r){if(!e.hasOwnProperty(r))throw new Error("Undefined state "+r+" in simple mode")}function Fe(e,r){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e=e.source):e=String(e),new RegExp((r===!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 r=[],n=0;n<e.length;n++)r.push(e[n]&&e[n].replace(/\./g," "));return r}function Ue(e,r){(e.next||e.push)&&Z(r,e.next||e.push),this.regex=Fe(e.regex),this.token=Te(e.token),this.data=e}function We(e){return function(r,n){if(n.pending){var p=n.pending.shift();return n.pending.length==0&&(n.pending=null),r.pos+=p.text.length,p.token}for(var y=e[n.state],h=0;h<y.length;h++){var s=y[h],i=(!s.data.sol||r.sol())&&r.match(s.regex);if(i){s.data.next?n.state=s.data.next:s.data.push?((n.stack||(n.stack=[])).push(n.state),n.state=s.data.push):s.data.pop&&n.stack&&n.stack.length&&(n.state=n.stack.pop()),s.data.indent&&n.indent.push(r.indentation()+r.indentUnit),s.data.dedent&&n.indent.pop();var l=s.token;if(l&&l.apply&&(l=l(i)),i.length>2&&s.token&&typeof s.token!="string"){n.pending=[];for(var a=2;a<i.length;a++)i[a]&&n.pending.push({text:i[a],token:s.token[a-1]});return r.backUp(i[0].length-(i[1]?i[1].length:0)),l[0]}else return l&&l.join?l[0]:l}}return r.next(),null}}function Ne(e,r){return function(n,p){if(n.indent==null||r.dontIndentStates&&r.doneIndentState.indexOf(n.state)>-1)return null;var y=n.indent.length-1,h=e[n.state];e:for(;;){for(var s=0;s<h.length;s++){var i=h[s];if(i.data.dedent&&i.data.dedentIfLineStart!==!1){var l=i.regex.exec(p);if(l&&l[0]){y--,(i.next||i.push)&&(h=e[i.next||i.push]),p=p.slice(l[0].length);continue e}}}break}return y<0?0:n.indent[y]}}function Je(e){let r;return{c(){r=ce("div"),ue(r,"class","code-editor")},m(n,p){de(n,r,p),e[15](r)},p:M,i:M,o:M,d(n){n&&fe(r),e[15](null)}}}function Pe(e){return JSON.stringify([e==null?void 0:e.name,e==null?void 0:e.type,e==null?void 0:e.schema])}function Ve(e,r,n){let p;he(e,ge,t=>n(21,p=t));const y=pe();let{id:h=""}=r,{value:s=""}=r,{disabled:i=!1}=r,{placeholder:l=""}=r,{baseCollection:a=null}=r,{singleLine:m=!1}=r,{extraAutocompleteKeys:I=[]}=r,{disableRequestKeys:w=!1}=r,{disableIndirectCollectionsKeys:E=!1}=r,d,b,A=i,D=new L,H=new L,F=new L,T=new L,q=[],U=[],W=[],N=[],R="",B="";function O(){d==null||d.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{q=$(p),N=ee(),U=w?[]:te(),W=E?[]:ne()},300)}function $(t){let o=t.slice();return a&&f.pushOrReplaceByKey(o,a,"id"),o}function J(){b==null||b.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0}))}function P(){if(!h)return;const t=document.querySelectorAll('[for="'+h+'"]');for(let o of t)o.removeEventListener("click",O)}function V(){if(!h)return;P();const t=document.querySelectorAll('[for="'+h+'"]');for(let o of t)o.addEventListener("click",O)}function S(t,o="",u=0){var x,z,Q;let g=q.find(k=>k.name==t||k.id==t);if(!g||u>=4)return[];let c=f.getAllCollectionIdentifiers(g,o);for(const k of g.schema){const v=o+k.name;if(k.type==="relation"&&((x=k.options)!=null&&x.collectionId)){const X=S(k.options.collectionId,v+".",u+1);X.length&&(c=c.concat(X))}k.type==="select"&&((z=k.options)==null?void 0:z.maxSelect)!=1&&c.push(v+":each"),((Q=k.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(k.type)&&c.push(v+":length")}return c}function ee(){return S(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.headers."),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 o=q.filter(g=>g.type==="auth");for(const g of o){const c=S(g.id,"@request.auth.");for(const x of c)f.pushUnique(t,x)}const u=["created","updated"];if(a!=null&&a.id){const g=S(a.name,"@request.data.");for(const c of g){t.push(c);const x=c.split(".");x.length===3&&xLine truncated
import{S as se,i as ae,s as le,e as ce,f as ue,g as de,y as M,o as fe,J as he,K as ge,L as pe,I as ye,C as f,M as ke}from"./index-b606ec56.js";import{E as K,a as C,h as xe,b as me,c as be,d as we,e as Ee,s as Se,f as Ke,g as Ce,r as qe,i as Re,k as Le,j as Ie,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as L,S as Me,t as De}from"./index-4841d67b.js";function He(e){Z(e,"start");var r={},n=e.languageData||{},p=!1;for(var y in e)if(y!=n&&e.hasOwnProperty(y))for(var h=r[y]=[],s=e[y],i=0;i<s.length;i++){var l=s[i];h.push(new Ue(l,e)),(l.indent||l.dedent)&&(p=!0)}return{name:n.name,startState:function(){return{state:"start",pending:null,indent:p?[]:null}},copyState:function(a){var m={state:a.state,pending:a.pending,indent:a.indent&&a.indent.slice(0)};return a.stack&&(m.stack=a.stack.slice(0)),m},token:We(r),indent:Ne(r,n),languageData:n}}function Z(e,r){if(!e.hasOwnProperty(r))throw new Error("Undefined state "+r+" in simple mode")}function Fe(e,r){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e=e.source):e=String(e),new RegExp((r===!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 r=[],n=0;n<e.length;n++)r.push(e[n]&&e[n].replace(/\./g," "));return r}function Ue(e,r){(e.next||e.push)&&Z(r,e.next||e.push),this.regex=Fe(e.regex),this.token=Te(e.token),this.data=e}function We(e){return function(r,n){if(n.pending){var p=n.pending.shift();return n.pending.length==0&&(n.pending=null),r.pos+=p.text.length,p.token}for(var y=e[n.state],h=0;h<y.length;h++){var s=y[h],i=(!s.data.sol||r.sol())&&r.match(s.regex);if(i){s.data.next?n.state=s.data.next:s.data.push?((n.stack||(n.stack=[])).push(n.state),n.state=s.data.push):s.data.pop&&n.stack&&n.stack.length&&(n.state=n.stack.pop()),s.data.indent&&n.indent.push(r.indentation()+r.indentUnit),s.data.dedent&&n.indent.pop();var l=s.token;if(l&&l.apply&&(l=l(i)),i.length>2&&s.token&&typeof s.token!="string"){n.pending=[];for(var a=2;a<i.length;a++)i[a]&&n.pending.push({text:i[a],token:s.token[a-1]});return r.backUp(i[0].length-(i[1]?i[1].length:0)),l[0]}else return l&&l.join?l[0]:l}}return r.next(),null}}function Ne(e,r){return function(n,p){if(n.indent==null||r.dontIndentStates&&r.doneIndentState.indexOf(n.state)>-1)return null;var y=n.indent.length-1,h=e[n.state];e:for(;;){for(var s=0;s<h.length;s++){var i=h[s];if(i.data.dedent&&i.data.dedentIfLineStart!==!1){var l=i.regex.exec(p);if(l&&l[0]){y--,(i.next||i.push)&&(h=e[i.next||i.push]),p=p.slice(l[0].length);continue e}}}break}return y<0?0:n.indent[y]}}function Je(e){let r;return{c(){r=ce("div"),ue(r,"class","code-editor")},m(n,p){de(n,r,p),e[15](r)},p:M,i:M,o:M,d(n){n&&fe(r),e[15](null)}}}function Pe(e){return JSON.stringify([e==null?void 0:e.name,e==null?void 0:e.type,e==null?void 0:e.schema])}function Ve(e,r,n){let p;he(e,ge,t=>n(21,p=t));const y=pe();let{id:h=""}=r,{value:s=""}=r,{disabled:i=!1}=r,{placeholder:l=""}=r,{baseCollection:a=null}=r,{singleLine:m=!1}=r,{extraAutocompleteKeys:I=[]}=r,{disableRequestKeys:w=!1}=r,{disableIndirectCollectionsKeys:E=!1}=r,d,b,A=i,D=new L,H=new L,F=new L,T=new L,q=[],U=[],W=[],N=[],R="",B="";function O(){d==null||d.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{q=$(p),N=ee(),U=w?[]:te(),W=E?[]:ne()},300)}function $(t){let o=t.slice();return a&&f.pushOrReplaceByKey(o,a,"id"),o}function J(){b==null||b.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0}))}function P(){if(!h)return;const t=document.querySelectorAll('[for="'+h+'"]');for(let o of t)o.removeEventListener("click",O)}function V(){if(!h)return;P();const t=document.querySelectorAll('[for="'+h+'"]');for(let o of t)o.addEventListener("click",O)}function S(t,o="",u=0){var x,z,Q;let g=q.find(k=>k.name==t||k.id==t);if(!g||u>=4)return[];let c=f.getAllCollectionIdentifiers(g,o);for(const k of g.schema){const v=o+k.name;if(k.type==="relation"&&((x=k.options)!=null&&x.collectionId)){const X=S(k.options.collectionId,v+".",u+1);X.length&&(c=c.concat(X))}k.type==="select"&&((z=k.options)==null?void 0:z.maxSelect)!=1&&c.push(v+":each"),((Q=k.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(k.type)&&c.push(v+":length")}return c}function ee(){return S(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.headers."),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 o=q.filter(g=>g.type==="auth");for(const g of o){const c=S(g.id,"@request.auth.");for(const x of c)f.pushUnique(t,x)}const u=["created","updated"];if(a!=null&&a.id){const g=S(a.name,"@request.data.");for(const c of g){t.push(c);const x=c.split(".");x.length===3&&xLine truncated
@@ -1,4 +1,4 @@
import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o as m,w as x,h as t,N as ve,c as te,m as ee,x as $e,O as Ue,P as sl,k as nl,Q as ol,n as il,t as Bt,a as Gt,d as le,R as al,C as ye,p as rl,r as Fe}from"./index-e9c07574.js";import{S as cl}from"./SdkTabs-31f0c5d0.js";function dl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function fl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function je(c){let n,o,a,p,b,d,h,g,w,_,f,Z,Ct,Ut,E,jt,M,at,S,tt,se,G,U,ne,rt,$t,et,kt,oe,ct,dt,lt,N,zt,yt,v,st,vt,Jt,Ft,j,nt,Lt,Kt,At,L,ft,Tt,ie,pt,ae,D,Pt,ot,St,O,ut,re,z,Ot,Qt,Rt,ce,q,Vt,J,mt,de,I,fe,B,pe,P,Et,K,bt,ue,ht,me,$,Nt,it,qt,be,Ht,Wt,Q,_t,he,Mt,_e,wt,we,V,xt,xe,gt,Xt,W,Yt,A,X,R,Dt,ge,Y,F,It;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format
import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o as m,w as x,h as t,N as ve,c as te,m as ee,x as $e,O as Ue,P as sl,k as nl,Q as ol,n as il,t as Bt,a as Gt,d as le,R as al,C as ye,p as rl,r as Fe}from"./index-b606ec56.js";import{S as cl}from"./SdkTabs-35d04812.js";function dl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function fl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function je(c){let n,o,a,p,b,d,h,g,w,_,f,Z,Ct,Ut,E,jt,M,at,S,tt,se,G,U,ne,rt,$t,et,kt,oe,ct,dt,lt,N,zt,yt,v,st,vt,Jt,Ft,j,nt,Lt,Kt,At,L,ft,Tt,ie,pt,ae,D,Pt,ot,St,O,ut,re,z,Ot,Qt,Rt,ce,q,Vt,J,mt,de,I,fe,B,pe,P,Et,K,bt,ue,ht,me,$,Nt,it,qt,be,Ht,Wt,Q,_t,he,Mt,_e,wt,we,V,xt,xe,gt,Xt,W,Yt,A,X,R,Dt,ge,Y,F,It;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:`,o=s(),a=e("ul"),p=e("li"),p.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single
@@ -1,4 +1,4 @@
import{S as ze,i as Qe,s as Re,e as n,w as v,b as f,c as de,f as m,g as r,h as o,m as pe,x as F,O as Me,P as Ue,k as je,Q as Fe,n as Ne,t as N,a as G,o as c,d as ue,C as Ge,p as Ke,r as K,u as Je,N as Ve}from"./index-e9c07574.js";import{S as Xe}from"./SdkTabs-31f0c5d0.js";import{F as Ye}from"./FieldsQueryParam-152f9b5c.js";function Oe(a,l,s){const i=a.slice();return i[5]=l[s],i}function De(a,l,s){const i=a.slice();return i[5]=l[s],i}function He(a,l){let s,i=l[5].code+"",b,_,d,u;function h(){return l[4](l[5])}return{key:a,first:null,c(){s=n("button"),b=v(i),_=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(y,P){r(y,s,P),o(s,b),o(s,_),d||(u=Je(s,"click",h),d=!0)},p(y,P){l=y,P&4&&i!==(i=l[5].code+"")&&F(b,i),P&6&&K(s,"active",l[1]===l[5].code)},d(y){y&&c(s),d=!1,u()}}}function We(a,l){let s,i,b,_;return i=new Ve({props:{content:l[5].body}}),{key:a,first:null,c(){s=n("div"),de(i.$$.fragment),b=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(d,u){r(d,s,u),pe(i,s,null),o(s,b),_=!0},p(d,u){l=d;const h={};u&4&&(h.content=l[5].body),i.$set(h),(!_||u&6)&&K(s,"active",l[1]===l[5].code)},i(d){_||(N(i.$$.fragment,d),_=!0)},o(d){G(i.$$.fragment,d),_=!1},d(d){d&&c(s),ue(i)}}}function Ze(a){var Ce,ge,Se,Ee;let l,s,i=a[0].name+"",b,_,d,u,h,y,P,W=a[0].name+"",J,fe,me,V,X,T,Y,I,Z,w,z,be,Q,A,he,x,R=a[0].name+"",ee,_e,te,ke,ve,U,le,B,se,q,oe,L,ae,C,ie,$e,ne,E,re,M,ce,g,O,$=[],we=new Map,ye,D,k=[],Pe=new Map,S;T=new Xe({props:{js:`
import{S as ze,i as Qe,s as Re,e as n,w as v,b as f,c as de,f as m,g as r,h as o,m as pe,x as F,O as Me,P as Ue,k as je,Q as Fe,n as Ne,t as N,a as G,o as c,d as ue,C as Ge,p as Ke,r as K,u as Je,N as Ve}from"./index-b606ec56.js";import{S as Xe}from"./SdkTabs-35d04812.js";import{F as Ye}from"./FieldsQueryParam-161606a5.js";function Oe(a,l,s){const i=a.slice();return i[5]=l[s],i}function De(a,l,s){const i=a.slice();return i[5]=l[s],i}function He(a,l){let s,i=l[5].code+"",b,_,d,u;function h(){return l[4](l[5])}return{key:a,first:null,c(){s=n("button"),b=v(i),_=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(y,P){r(y,s,P),o(s,b),o(s,_),d||(u=Je(s,"click",h),d=!0)},p(y,P){l=y,P&4&&i!==(i=l[5].code+"")&&F(b,i),P&6&&K(s,"active",l[1]===l[5].code)},d(y){y&&c(s),d=!1,u()}}}function We(a,l){let s,i,b,_;return i=new Ve({props:{content:l[5].body}}),{key:a,first:null,c(){s=n("div"),de(i.$$.fragment),b=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(d,u){r(d,s,u),pe(i,s,null),o(s,b),_=!0},p(d,u){l=d;const h={};u&4&&(h.content=l[5].body),i.$set(h),(!_||u&6)&&K(s,"active",l[1]===l[5].code)},i(d){_||(N(i.$$.fragment,d),_=!0)},o(d){G(i.$$.fragment,d),_=!1},d(d){d&&c(s),ue(i)}}}function Ze(a){var Ce,ge,Se,Ee;let l,s,i=a[0].name+"",b,_,d,u,h,y,P,W=a[0].name+"",J,fe,me,V,X,T,Y,I,Z,w,z,be,Q,A,he,x,R=a[0].name+"",ee,_e,te,ke,ve,U,le,B,se,q,oe,L,ae,C,ie,$e,ne,E,re,M,ce,g,O,$=[],we=new Map,ye,D,k=[],Pe=new Map,S;T=new Xe({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 N,a as T,d as h,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 j,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-e9c07574.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=j(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=j(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,F,P,v,k,R,z,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 N,a as T,d as h,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 j,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-b606ec56.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=j(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=j(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,F,P,v,k,R,z,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",F=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,F,$),b(a,P,$),_(P,v),k=!0,R||(z=[j(e,"submit",O(f[4])),Q(U.call(null,v))],R=!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 D={};$&769&&(D.$$scope={dirty:$,ctx:a}),r.$set(D);const H={};$&770&&(H.$$scope={dirty:$,ctx:a}),d.$set(H),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(N(r.$$.fragment,a),N(d.$$.fragment,a),k=!0)},o(a){T(r.$$.fragment,a),T(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),h(r),h(d),a&&w(F),a&&w(P),R=!1,V(z)}}}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||(N(e.$$.fragment,s),o=!0)},o(s){T(e.$$.fragment,s),o=!1},d(s){h(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.error(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 R,m as S,t as w,a as y,d as E,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 H,v as I,w as h,x as J,y as P,z as L}from"./index-e9c07574.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 R,m as S,t as w,a as y,d as E,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 H,v as I,w as h,x as J,y as P,z as L}from"./index-b606ec56.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(),R(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),S(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=H(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),E(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),L(t,c[0]),t.focus(),f||(m=H(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]&&L(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(){R(e.$$.fragment)},m(n,l){S(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){E(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.error(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,2 +1,2 @@
import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,I as h}from"./index-e9c07574.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML=`<h3 class="m-b-sm">Auth completed.</h3>
import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,I as h}from"./index-b606ec56.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML=`<h3 class="m-b-sm">Auth completed.</h3>
<h5>You can go back to the app if this window is not automatically closed.</h5>`,l(t,"class","content txt-hint txt-center p-base")},m(e,a){u(e,t,a)},p:s,i:s,o:s,d(e){e&&d(t)}}}function m(n){return h(()=>{window.close()}),[]}class x extends o{constructor(t){super(),i(this,t,m,f,c,{})}}export{x as default};
@@ -1,4 +1,4 @@
import{S as G,i as I,s as J,F as M,c as S,m as L,t as v,a as y,d as z,C as N,E as R,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 T,h as k,u as P,v as K,y as E,x as O,z as F}from"./index-e9c07574.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&H(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 G,i as I,s as J,F as M,c as S,m as L,t as v,a as y,d as z,C as N,E as R,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 T,h as k,u as P,v as K,y as E,x as O,z as F}from"./index-b606ec56.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&H(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],T(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=H(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)&&T(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(),z(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 H(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),F(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]&&F(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=R()},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 M({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){z(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.error($)}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=N.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends G{constructor(e){super(),I(this,e,x,Z,J,{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 H,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 h,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as R}from"./index-e9c07574.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=h(`Reset your user password
import{S as J,i as M,s as W,F as Y,c as H,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 h,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as R}from"./index-b606ec56.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=h(`Reset your user password
`),d&&d.c(),t=P(),H(o.$$.fragment),c=P(),H(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=S(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=S(s,"click",r[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function I(r){let e,l,s;return{c(){e=h("for "),l=b("strong"),s=h(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=h("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),R(t,r[0]),t.focus(),c||(a=S(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]&&R(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=h("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),R(t,r[1]),c||(a=S(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]&&R(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(){H(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.error(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-e9c07574.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-b606ec56.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 pe,C as P,e as p,w as y,b as a,c as te,f as u,g as t,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,p as me}from"./index-e9c07574.js";import{S as de}from"./SdkTabs-31f0c5d0.js";function fe(s){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,c=s[0].name+"",b,d,h,f,_,$,k,l,S,v,C,R,w,g,E,r,D;return l=new de({props:{js:`
import{S as re,i as ae,s as be,N as pe,C as P,e as p,w as y,b as a,c as te,f as u,g as t,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,p as me}from"./index-b606ec56.js";import{S as de}from"./SdkTabs-35d04812.js";function fe(s){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,c=s[0].name+"",b,d,h,f,_,$,k,l,S,v,C,R,w,g,E,r,D;return l=new de({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${s[1]}');
@@ -1,4 +1,4 @@
import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,O as ve,P as Se,k as Me,Q as Re,n as Ae,t as x,a as ee,o as d,d as ye,C as We,p as ze,r as N,u as He,N as Oe}from"./index-e9c07574.js";import{S as Ue}from"./SdkTabs-31f0c5d0.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=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=He(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($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Oe({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(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&&d(s),ye(a)}}}function je(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,g,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new Ue({props:{js:`
import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,O as ve,P as Se,k as Me,Q as Re,n as Ae,t as x,a as ee,o as d,d as ye,C as We,p as ze,r as N,u as He,N as Oe}from"./index-b606ec56.js";import{S as Ue}from"./SdkTabs-35d04812.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=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=He(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($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Oe({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(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&&d(s),ye(a)}}}function je(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,g,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new Ue({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 r,w,b as v,c as ve,f as b,g as d,h as n,m as he,x as I,O as ue,P as ge,k as ye,Q as Re,n as Be,t as Z,a as x,o as f,d as we,C as Ce,p as Se,r as L,u as Te,N as Me}from"./index-e9c07574.js";import{S as Ae}from"./SdkTabs-31f0c5d0.js";function me(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+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=r("button"),_=w(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(P,l,$),n(l,_),n(l,m),i||(p=Te(l,"click",u),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&&f(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Me({props:{content:s[5].body}}),{key:a,first:null,c(){l=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),he(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&f(l),we(o)}}}function Ue(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,g,H,te,O,C,se,J,E=a[0].name+"",K,le,V,S,W,T,X,M,Y,y,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ae({props:{js:`
import{S as Pe,i as $e,s as qe,e as r,w,b as v,c as ve,f as b,g as d,h as n,m as he,x as I,O as ue,P as ge,k as ye,Q as Re,n as Be,t as Z,a as x,o as f,d as we,C as Ce,p as Se,r as L,u as Te,N as Me}from"./index-b606ec56.js";import{S as Ae}from"./SdkTabs-35d04812.js";function me(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+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=r("button"),_=w(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(P,l,$),n(l,_),n(l,m),i||(p=Te(l,"click",u),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&&f(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Me({props:{content:s[5].body}}),{key:a,first:null,c(){l=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),he(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&f(l),we(o)}}}function Ue(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,g,H,te,O,C,se,J,E=a[0].name+"",K,le,V,S,W,T,X,M,Y,y,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ae({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 r,w as $,b as v,c as ve,f as b,g as f,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 p,d as $e,C as Se,p as Te,r as I,u as Ve,N as Me}from"./index-e9c07574.js";import{S as Re}from"./SdkTabs-31f0c5d0.js";function me(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+"",_,m,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),m=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,m),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&&p(s),n=!1,u()}}}function ke(a,l){let s,o,_,m;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),he(o,s,null),i(s,_),m=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!m||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){m||(Z(o.$$.fragment,n),m=!0)},o(n){x(o.$$.fragment,n),m=!1},d(n){n&&p(s),$e(o)}}}function Ae(a){var re,fe;let l,s,o=a[0].name+"",_,m,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,V,X,M,Y,y,R,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Re({props:{js:`
import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,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 p,d as $e,C as Se,p as Te,r as I,u as Ve,N as Me}from"./index-b606ec56.js";import{S as Re}from"./SdkTabs-35d04812.js";function me(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+"",_,m,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),m=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,m),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&&p(s),n=!1,u()}}}function ke(a,l){let s,o,_,m;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),he(o,s,null),i(s,_),m=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!m||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){m||(Z(o.$$.fragment,n),m=!0)},o(n){x(o.$$.fragment,n),m=!1},d(n){n&&p(s),$e(o)}}}function Ae(a){var re,fe;let l,s,o=a[0].name+"",_,m,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,V,X,M,Y,y,R,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Re({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-e9c07574.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(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;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),_=E(" SDK"),p=j(),h(n,"href",f=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,_),m(l,p),d=!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),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!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,_,f=o[2];const p=t=>t[6].language;for(let t=0;t<f.length;t+=1){let a=K(o,f,t),u=p(a);g.set(u,s[t]=T(u,a))}let d=o[2];const b=t=>t[6].language;for(let t=0;t<d.length;t+=1){let a=D(o,d,t),u=b(a);k.set(u,n[t]=I(u,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 u=0;u<s.length;u+=1)s[u]&&s[u].m(l,null);m(e,r),m(e,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(i,null);_=!0},p(t,[a]){a&6&&(f=t[2],s=C(s,a,p,1,t,f,g,l,J,T,null,K)),a&6&&(d=t[2],O(),n=C(n,a,b,1,t,d,k,i,Q,I,null,D),Y()),(!_||a&1&&c!==(c="tabs sdk-tabs "+t[0]+" svelte-1maocj6"))&&h(e,"class",c)},i(t){if(!_){for(let a=0;a<d.length;a+=1)N(n[a]);_=!0}},o(t){for(let a=0;a<n.length;a+=1)P(n[a]);_=!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-b606ec56.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(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;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),_=E(" SDK"),p=j(),h(n,"href",f=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,_),m(l,p),d=!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),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!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,_,f=o[2];const p=t=>t[6].language;for(let t=0;t<f.length;t+=1){let a=K(o,f,t),u=p(a);g.set(u,s[t]=T(u,a))}let d=o[2];const b=t=>t[6].language;for(let t=0;t<d.length;t+=1){let a=D(o,d,t),u=b(a);k.set(u,n[t]=I(u,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 u=0;u<s.length;u+=1)s[u]&&s[u].m(l,null);m(e,r),m(e,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(i,null);_=!0},p(t,[a]){a&6&&(f=t[2],s=C(s,a,p,1,t,f,g,l,J,T,null,K)),a&6&&(d=t[2],O(),n=C(n,a,b,1,t,d,k,i,Q,I,null,D),Y()),(!_||a&1&&c!==(c="tabs sdk-tabs "+t[0]+" svelte-1maocj6"))&&h(e,"class",c)},i(t){if(!_){for(let a=0;a<d.length;a+=1)N(n[a]);_=!0}},o(t){for(let a=0;a<n.length;a+=1)P(n[a]);_=!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 as m,g as d,h as s,m as Be,x as I,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as u,d as Ue,C as Le,p as je,r as N,u as Ie,N as Ne}from"./index-e9c07574.js";import{S as Re}from"./SdkTabs-31f0c5d0.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,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ie(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}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(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(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&&u(o),Ue(a)}}}function Ke(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,M=n[0].name+"",R,se,ae,K,Q,A,F,E,G,w,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,g=[],ue=new Map,pe,O,k=[],fe=new Map,T;A=new Re({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 as m,g as d,h as s,m as Be,x as I,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as u,d as Ue,C as Le,p as je,r as N,u as Ie,N as Ne}from"./index-b606ec56.js";import{S as Re}from"./SdkTabs-35d04812.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,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ie(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}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(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(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&&u(o),Ue(a)}}}function Ke(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,M=n[0].name+"",R,se,ae,K,Q,A,F,E,G,w,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,g=[],ue=new Map,pe,O,k=[],fe=new Map,T;A=new Re({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 E,N as Tt,e as r,w as y,b,c as be,f as w,g as o,h as a,m as me,x as U,O as je,P as ut,k as $t,Q as Mt,n as qt,t as de,a as re,o as d,d as _e,p as Dt,r as ye,u as Ht,y as X}from"./index-e9c07574.js";import{S as Pt}from"./SdkTabs-31f0c5d0.js";import{F as Rt}from"./FieldsQueryParam-152f9b5c.js";function bt(f,t,l){const n=f.slice();return n[8]=t[l],n}function mt(f,t,l){const n=f.slice();return n[8]=t[l],n}function _t(f,t,l){const n=f.slice();return n[13]=t[l],n}function yt(f){let t;return{c(){t=r("p"),t.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",w(t,"class","txt-hint txt-sm txt-right")},m(l,n){o(l,t,n)},d(l){l&&d(t)}}}function kt(f){let t,l,n,u,_,s,p,k,C,S,T,$,F,A,M,g,B;return{c(){t=r("tr"),t.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=b(),n=r("tr"),n.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 E,N as Tt,e as r,w as y,b,c as be,f as w,g as o,h as a,m as me,x as U,O as je,P as ut,k as $t,Q as Mt,n as qt,t as de,a as re,o as d,d as _e,p as Dt,r as ye,u as Ht,y as X}from"./index-b606ec56.js";import{S as Pt}from"./SdkTabs-35d04812.js";import{F as Rt}from"./FieldsQueryParam-161606a5.js";function bt(f,t,l){const n=f.slice();return n[8]=t[l],n}function mt(f,t,l){const n=f.slice();return n[8]=t[l],n}function _t(f,t,l){const n=f.slice();return n[13]=t[l],n}function yt(f){let t;return{c(){t=r("p"),t.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",w(t,"class","txt-hint txt-sm txt-right")},m(l,n){o(l,t,n)},d(l){l&&d(t)}}}function kt(f){let t,l,n,u,_,s,p,k,C,S,T,$,F,A,M,g,B;return{c(){t=r("tr"),t.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=b(),n=r("tr"),n.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>`,u=b(),_=r("tr"),_.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
@@ -1,4 +1,4 @@
import{S as tt,i as lt,s as st,N as et,e as o,w as b,b as u,c as W,f as _,g as r,h as l,m as X,x as ve,O as Ge,P as nt,k as ot,Q as it,n as at,t as U,a as j,o as d,d as Y,C as Je,p as rt,r as Z,u as dt}from"./index-e9c07574.js";import{S as ct}from"./SdkTabs-31f0c5d0.js";import{F as ft}from"./FieldsQueryParam-152f9b5c.js";function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function We(i,s,n){const a=i.slice();return a[6]=s[n],a}function Xe(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 Ye(i,s){let n,a=s[6].code+"",w,c,f,m;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=b(a),c=u(),_(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(h,g){r(h,n,g),l(n,w),l(n,c),f||(m=dt(n,"click",F),f=!0)},p(h,g){s=h,g&20&&Z(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,m()}}}function Ze(i,s){let n,a,w,c;return a=new et({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),W(a.$$.fragment),w=u(),_(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(f,m){r(f,n,m),X(a,n,null),l(n,w),c=!0},p(f,m){s=f,(!c||m&20)&&Z(n,"active",s[2]===s[6].code)},i(f){c||(U(a.$$.fragment,f),c=!0)},o(f){j(a.$$.fragment,f),c=!1},d(f){f&&d(n),Y(a)}}}function pt(i){var Ue,je;let s,n,a=i[0].name+"",w,c,f,m,F,h,g,V=i[0].name+"",ee,$e,te,R,le,x,se,y,z,we,G,E,ye,ne,J=i[0].name+"",oe,Ce,ie,Fe,ae,A,re,I,de,M,ce,O,fe,ge,q,P,pe,Re,ue,Oe,k,Pe,S,De,Te,Ee,me,Se,be,Be,xe,Ae,_e,Ie,Me,B,ke,H,he,D,L,C=[],qe=new Map,He,N,v=[],Le=new Map,T;R=new ct({props:{js:`
import{S as tt,i as lt,s as st,N as et,e as o,w as b,b as u,c as W,f as _,g as r,h as l,m as X,x as ve,O as Ge,P as nt,k as ot,Q as it,n as at,t as U,a as j,o as d,d as Y,C as Je,p as rt,r as Z,u as dt}from"./index-b606ec56.js";import{S as ct}from"./SdkTabs-35d04812.js";import{F as ft}from"./FieldsQueryParam-161606a5.js";function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function We(i,s,n){const a=i.slice();return a[6]=s[n],a}function Xe(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 Ye(i,s){let n,a=s[6].code+"",w,c,f,m;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=b(a),c=u(),_(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(h,g){r(h,n,g),l(n,w),l(n,c),f||(m=dt(n,"click",F),f=!0)},p(h,g){s=h,g&20&&Z(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,m()}}}function Ze(i,s){let n,a,w,c;return a=new et({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),W(a.$$.fragment),w=u(),_(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(f,m){r(f,n,m),X(a,n,null),l(n,w),c=!0},p(f,m){s=f,(!c||m&20)&&Z(n,"active",s[2]===s[6].code)},i(f){c||(U(a.$$.fragment,f),c=!0)},o(f){j(a.$$.fragment,f),c=!1},d(f){f&&d(n),Y(a)}}}function pt(i){var Ue,je;let s,n,a=i[0].name+"",w,c,f,m,F,h,g,V=i[0].name+"",ee,$e,te,R,le,x,se,y,z,we,G,E,ye,ne,J=i[0].name+"",oe,Ce,ie,Fe,ae,A,re,I,de,M,ce,O,fe,ge,q,P,pe,Re,ue,Oe,k,Pe,S,De,Te,Ee,me,Se,be,Be,xe,Ae,_e,Ie,Me,B,ke,H,he,D,L,C=[],qe=new Map,He,N,v=[],Le=new Map,T;R=new ct({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');
@@ -1,22 +1,22 @@
(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 ee(){}const bl=n=>n;function qe(n,e){for(const t in e)n[t]=e[t];return n}function D1(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function W_(n){return n()}function rf(){return Object.create(null)}function Me(n){n.forEach(W_)}function qt(n){return typeof n=="function"}function me(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Il;function mn(n,e){return Il||(Il=document.createElement("a")),Il.href=e,n===Il.href}function A1(n){return Object.keys(n).length===0}function ca(n,...e){if(n==null)return ee;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function I1(n){let e;return ca(n,t=>e=t)(),e}function We(n,e,t){n.$$.on_destroy.push(ca(e,t))}function Ct(n,e,t,i){if(n){const s=Y_(n,e,t,i);return n[0](s)}}function Y_(n,e,t,i){return n[1]&&i?qe(t.ctx.slice(),n[1](i(e))):t.ctx}function $t(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 Tt(n,e,t,i,s,l){if(s){const o=Y_(e,t,i,l);n.p(o,s)}}function Mt(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 Zt(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function Qe(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 is(n){return n??""}function tn(n,e,t){return n.set(t),e}function Ce(n){return n&&qt(n.destroy)?n.destroy:ee}function af(n){const e=typeof n=="string"&&n.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[n,"px"]}const K_=typeof window<"u";let Lo=K_?()=>window.performance.now():()=>Date.now(),da=K_?n=>requestAnimationFrame(n):ee;const gs=new Set;function J_(n){gs.forEach(e=>{e.c(n)||(gs.delete(e),e.f())}),gs.size!==0&&da(J_)}function Po(n){let e;return gs.size===0&&da(J_),{promise:new Promise(t=>{gs.add(e={c:n,f:t})}),abort(){gs.delete(e)}}}function b(n,e){n.appendChild(e)}function Z_(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function L1(n){const e=v("style");return P1(Z_(n),e),e.sheet}function P1(n,e){return b(n.head||n,e),e.sheet}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode&&n.parentNode.removeChild(n)}function _t(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 U(n){return document.createTextNode(n)}function E(){return U(" ")}function ye(){return U("")}function Y(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Xe(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Ln(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)}const F1=["width","height"];function ui(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&&F1.indexOf(i)===-1?n[i]=e[i]:p(n,i,e[i])}function N1(n){let e;return{p(...t){e=t,e.forEach(i=>n.push(i))},r(){e.forEach(t=>n.splice(n.indexOf(t),1))}}}function pt(n){return n===""?null:+n}function R1(n){return Array.from(n.childNodes)}function se(n,e){e=""+e,n.data!==e&&(n.data=e)}function re(n,e){n.value=e??""}function Nr(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 G_(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Nt(n,e){return new n(e)}const uo=new Map;let co=0;function q1(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function j1(n,e){const t={stylesheet:L1(e),rules:{}};return uo.set(n,t),t}function rl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let f=`{
`;for(let g=0;g<=1;g+=a){const y=e+(t-e)*l(g);f+=g*100+`%{${o(y,1-y)}}
`}const u=f+`100% {${o(t,1-t)}}
}`,c=`__svelte_${q1(u)}_${r}`,d=Z_(n),{stylesheet:m,rules:_}=uo.get(d)||j1(d,n);_[c]||(_[c]=!0,m.insertRule(`@keyframes ${c} ${u}`,m.cssRules.length));const h=n.style.animation||"";return n.style.animation=`${h?`${h}, `:""}${c} ${i}ms linear ${s}ms 1 both`,co+=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(", "),co-=s,co||z1())}function z1(){da(()=>{co||(uo.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&k(e)}),uo.clear())})}function V1(n,e,t,i){if(!e)return ee;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return ee;const{delay:l=0,duration:o=300,easing:r=bl,start:a=Lo()+l,end:f=a+o,tick:u=ee,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,_;function h(){c&&(_=rl(n,0,1,o,l,r,c)),l||(m=!0)}function g(){c&&al(n,_),d=!1}return Po(y=>{if(!m&&y>=a&&(m=!0),m&&y>=f&&(u(1,0),g()),!d)return!1;if(m){const S=y-a,$=0+1*r(S/o);u($,1-$)}return!0}),h(),u(0,1),g}function H1(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,X_(n,s)}}function X_(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 fl;function vi(n){fl=n}function vl(){if(!fl)throw new Error("Function called outside component initialization");return fl}function Gt(n){vl().$$.on_mount.push(n)}function B1(n){vl().$$.after_update.push(n)}function Fo(n){vl().$$.on_destroy.push(n)}function wt(){const n=vl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=G_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Fe(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const _s=[],ne=[];let bs=[];const Rr=[],Q_=Promise.resolve();let qr=!1;function x_(){qr||(qr=!0,Q_.then(pa))}function fn(){return x_(),Q_}function Ge(n){bs.push(n)}function ge(n){Rr.push(n)}const er=new Set;let us=0;function pa(){if(us!==0)return;const n=fl;do{try{for(;us<_s.length;){const e=_s[us];us++,vi(e),U1(e.$$)}}catch(e){throw _s.length=0,us=0,e}for(vi(null),_s.length=0,us=0;ne.length;)ne.pop()();for(let e=0;e<bs.length;e+=1){const t=bs[e];er.has(t)||(er.add(t),t())}bs.length=0}while(_s.length);for(;Rr.length;)Rr.pop()();qr=!1,er.clear(),vi(n)}function U1(n){if(n.fragment!==null){n.update(),Me(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Ge)}}function W1(n){const e=[],t=[];bs.forEach(i=>n.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),bs=e}let Rs;function ma(){return Rs||(Rs=Promise.resolve(),Rs.then(()=>{Rs=null})),Rs}function xi(n,e,t){n.dispatchEvent(G_(`${e?"intro":"outro"}${t}`))}const to=new Set;let ri;function ae(){ri={r:0,c:[],p:ri}}function fe(){ri.r||Me(ri.c),ri=ri.p}function A(n,e){n&&n.i&&(to.delete(n),n.i(e))}function L(n,e,t,i){if(n&&n.o){if(to.has(n))return;to.add(n),ri.c.push(()=>{to.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ha={duration:0};function eg(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function f(){o&&al(n,o)}function u(){const{delay:d=0,duration:m=300,easing:_=bl,tick:h=ee,css:g}=s||ha;g&&(o=rl(n,0,1,m,d,_,g,a++)),h(0,1);const y=Lo()+d,S=y+m;r&&r.abort(),l=!0,Ge(()=>xi(n,!0,"start")),r=Po($=>{if(l){if($>=S)return h(1,0),xi(n,!0,"end"),f(),l=!1;if($>=y){const C=_(($-y)/m);h(C,1-C)}}return l})}let c=!1;return{start(){c||(c=!0,al(n),qt(s)?(s=s(i),ma().then(u)):u())},invalidate(){c=!1},end(){l&&(f(),l=!1)}}}function _a(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=ri;r.r+=1;function a(){const{delay:f=0,duration:u=300,easing:c=bl,tick:d=ee,css:m}=s||ha;m&&(o=rl(n,1,0,u,f,c,m));const _=Lo()+f,h=_+u;Ge(()=>xi(n,!1,"start")),Po(g=>{if(l){if(g>=h)return d(0,1),xi(n,!1,"end"),--r.r||Me(r.c),!1;if(g>=_){const y=c((g-_)/u);d(1-y,y)}}return l})}return qt(s)?ma().then(()=>{s=s(i),a()}):a(),{end(f){f&&s.tick&&s.tick(1,0),l&&(o&&al(n,o),l=!1)}}}function Re(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,f=null;function u(){f&&al(n,f)}function c(m,_){const h=m.b-o;return _*=Math.abs(h),{a:o,b:m.b,d:h,duration:_,start:m.start,end:m.start+_,group:m.group}}function d(m){const{delay:_=0,duration:h=300,easing:g=bl,tick:y=ee,css:S}=l||ha,$={start:Lo()+_,b:m};m||($.group=ri,ri.r+=1),r||a?a=$:(S&&(u(),f=rl(n,o,m,h,_,g,S)),m&&y(0,1),r=c($,h),Ge(()=>xi(n,m,"start")),Po(C=>{if(a&&C>a.start&&(r=c(a,h),a=null,xi(n,r.b,"start"),S&&(u(),f=rl(n,o,r.b,r.duration,0,g,l.css))),r){if(C>=r.end)y(o=r.b,1-o),xi(n,r.b,"end"),a||(r.b?u():--r.group.r||Me(r.group.c)),r=null;else if(C>=r.start){const T=C-r.start;o=r.a+r.d*g(T/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){qt(l)?ma().then(() Line truncated
}`,c=`__svelte_${q1(u)}_${r}`,d=Z_(n),{stylesheet:m,rules:_}=uo.get(d)||j1(d,n);_[c]||(_[c]=!0,m.insertRule(`@keyframes ${c} ${u}`,m.cssRules.length));const h=n.style.animation||"";return n.style.animation=`${h?`${h}, `:""}${c} ${i}ms linear ${s}ms 1 both`,co+=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(", "),co-=s,co||z1())}function z1(){da(()=>{co||(uo.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&k(e)}),uo.clear())})}function V1(n,e,t,i){if(!e)return ee;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return ee;const{delay:l=0,duration:o=300,easing:r=bl,start:a=Lo()+l,end:f=a+o,tick:u=ee,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,_;function h(){c&&(_=rl(n,0,1,o,l,r,c)),l||(m=!0)}function g(){c&&al(n,_),d=!1}return Po(y=>{if(!m&&y>=a&&(m=!0),m&&y>=f&&(u(1,0),g()),!d)return!1;if(m){const S=y-a,$=0+1*r(S/o);u($,1-$)}return!0}),h(),u(0,1),g}function H1(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,X_(n,s)}}function X_(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 fl;function vi(n){fl=n}function vl(){if(!fl)throw new Error("Function called outside component initialization");return fl}function Gt(n){vl().$$.on_mount.push(n)}function B1(n){vl().$$.after_update.push(n)}function Fo(n){vl().$$.on_destroy.push(n)}function wt(){const n=vl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=G_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Fe(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const _s=[],ne=[];let bs=[];const Rr=[],Q_=Promise.resolve();let qr=!1;function x_(){qr||(qr=!0,Q_.then(pa))}function fn(){return x_(),Q_}function Ge(n){bs.push(n)}function ge(n){Rr.push(n)}const er=new Set;let us=0;function pa(){if(us!==0)return;const n=fl;do{try{for(;us<_s.length;){const e=_s[us];us++,vi(e),U1(e.$$)}}catch(e){throw _s.length=0,us=0,e}for(vi(null),_s.length=0,us=0;ne.length;)ne.pop()();for(let e=0;e<bs.length;e+=1){const t=bs[e];er.has(t)||(er.add(t),t())}bs.length=0}while(_s.length);for(;Rr.length;)Rr.pop()();qr=!1,er.clear(),vi(n)}function U1(n){if(n.fragment!==null){n.update(),Me(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Ge)}}function W1(n){const e=[],t=[];bs.forEach(i=>n.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),bs=e}let Rs;function ma(){return Rs||(Rs=Promise.resolve(),Rs.then(()=>{Rs=null})),Rs}function xi(n,e,t){n.dispatchEvent(G_(`${e?"intro":"outro"}${t}`))}const to=new Set;let ri;function ae(){ri={r:0,c:[],p:ri}}function fe(){ri.r||Me(ri.c),ri=ri.p}function A(n,e){n&&n.i&&(to.delete(n),n.i(e))}function L(n,e,t,i){if(n&&n.o){if(to.has(n))return;to.add(n),ri.c.push(()=>{to.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ha={duration:0};function eg(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function f(){o&&al(n,o)}function u(){const{delay:d=0,duration:m=300,easing:_=bl,tick:h=ee,css:g}=s||ha;g&&(o=rl(n,0,1,m,d,_,g,a++)),h(0,1);const y=Lo()+d,S=y+m;r&&r.abort(),l=!0,Ge(()=>xi(n,!0,"start")),r=Po($=>{if(l){if($>=S)return h(1,0),xi(n,!0,"end"),f(),l=!1;if($>=y){const C=_(($-y)/m);h(C,1-C)}}return l})}let c=!1;return{start(){c||(c=!0,al(n),qt(s)?(s=s(i),ma().then(u)):u())},invalidate(){c=!1},end(){l&&(f(),l=!1)}}}function _a(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=ri;r.r+=1;function a(){const{delay:f=0,duration:u=300,easing:c=bl,tick:d=ee,css:m}=s||ha;m&&(o=rl(n,1,0,u,f,c,m));const _=Lo()+f,h=_+u;Ge(()=>xi(n,!1,"start")),Po(g=>{if(l){if(g>=h)return d(0,1),xi(n,!1,"end"),--r.r||Me(r.c),!1;if(g>=_){const y=c((g-_)/u);d(1-y,y)}}return l})}return qt(s)?ma().then(()=>{s=s(i),a()}):a(),{end(f){f&&s.tick&&s.tick(1,0),l&&(o&&al(n,o),l=!1)}}}function Re(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,f=null;function u(){f&&al(n,f)}function c(m,_){const h=m.b-o;return _*=Math.abs(h),{a:o,b:m.b,d:h,duration:_,start:m.start,end:m.start+_,group:m.group}}function d(m){const{delay:_=0,duration:h=300,easing:g=bl,tick:y=ee,css:S}=l||ha,$={start:Lo()+_,b:m};m||($.group=ri,ri.r+=1),r||a?a=$:(S&&(u(),f=rl(n,o,m,h,_,g,S)),m&&y(0,1),r=c($,h),Ge(()=>xi(n,m,"start")),Po(C=>{if(a&&C>a.start&&(r=c(a,h),a=null,xi(n,r.b,"start"),S&&(u(),f=rl(n,o,r.b,r.duration,0,g,l.css))),r){if(C>=r.end)y(o=r.b,1-o),xi(n,r.b,"end"),a||(r.b?u():--r.group.r||Me(r.group.c)),r=null;else if(C>=r.start){const T=C-r.start;o=r.a+r.d*g(T/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){qt(l)?ma().then(() Line truncated
`),t+=i.map(s=>{let l="";return s.name.includes("(")||s.name.includes(" ")?l+=s.name:l+="`"+s.name+"`",s.collate&&(l+=" COLLATE "+s.collate),s.sort&&(l+=" "+s.sort.toUpperCase()),l}).join(`,
`),i.length>1&&(t+=`
`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=z.parseIndex(e);return i.tableName=t,z.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=z.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?z.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}static initCollection(e){return Object.assign({id:"",created:"",updated:"",name:"",type:"base",system:!1,listRule:null,viewRule:null,createRule:null,updateRule:null,deleteRule:null,schema:[],indexes:[],options:{}},e)}static initSchemaField(e){return Object.assign({id:"",name:"",type:"text",system:!1,required:!1,options:{}},e)}}const Vo=Pn([]);function _o(n,e=4e3){return Ho(n,"info",e)}function zt(n,e=3e3){return Ho(n,"success",e)}function $s(n,e=4500){return Ho(n,"error",e)}function ky(n,e=4500){return Ho(n,"warning",e)}function Ho(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{ob(i)},t)};Vo.update(s=>(Ea(s,i.message),z.pushOrReplaceByKey(s,i,"message"),s))}function ob(n){Vo.update(e=>(Ea(e,n),e))}function Ma(){Vo.update(n=>{for(let e of n)Ea(n,e);return[]})}function Ea(n,e){let t;typeof e=="string"?t=z.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),z.removeByKey(n,"message",t.message))}const Ci=Pn({});function xt(n){Ci.set(n||{})}function ci(n){Ci.update(e=>(z.deleteByPath(e,n),e))}const Oa=Pn({});function Yr(n){Oa.set(n||{})}const ni=Pn([]),wi=Pn({}),go=Pn(!1),rb=Pn({});function wy(n){ni.update(e=>{const t=z.findByKey(e,"id",n);return t?wi.set(t):e.length&&wi.set(e[0]),e})}function Sy(n){wi.update(e=>z.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ni.update(e=>(z.pushOrReplaceByKey(e,n,"id"),Da(),z.sortCollections(e)))}function Cy(n){ni.update(e=>(z.removeByKey(e,"id",n.id),wi.update(t=>t.id===n.id?e[0]:t),Da(),e))}async function $y(n=null){go.set(!0);try{let e=await ue.collections.getFullList(200,{sort:"+name"});e=z.sortCollections(e),ni.set(e);const t=n&&z.findByKey(e,"id",n);t?wi.set(t):e.length&&wi.set(e[0]),Da()}catch(e){ue.error(e)}go.set(!1)}function Da(){rb.update(n=>(ni.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const fr="pb_admin_file_token";Ro.prototype.logout=function(n=!0){this.authStore.clear(),n&&qi("/login")};Ro.prototype.error=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{},l=s.message||n.message||t;if(e&&l&&$s(l),z.isEmpty(s.data)||xt(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),qi("/")};Ro.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=I1(rb);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(fr)||"";return(!t||rg(t,10))&&(t&&localStorage.removeItem(fr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(fr,t),this._adminFileTokenRequest=null),t};class Ty extends ag{save(e,t){super.save(e,t),t&&!t.collectionId&&Yr(t)}clear(){super.clear(),Yr(null)}}const ue=new Ro("../",new Ty("pb_admin_auth"));ue.authStore.model&&!ue.authStore.model.collectionId&&Yr(ue.authStore.model);function My(n){let e,t,i,s,l,o,r,a,f,u,c,d;const m=n[3].default,_=Ct(m,n,n[2],null);return{c(){e=v("div"),t=v("main"),_&&_.c(),i=E(),s=v("footer"),l=v("a"),l.innerHTML=`<i class="ri-book-open-line txt-sm"></i>
`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=j.parseIndex(e);return i.tableName=t,j.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=j.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?j.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}static initCollection(e){return Object.assign({id:"",created:"",updated:"",name:"",type:"base",system:!1,listRule:null,viewRule:null,createRule:null,updateRule:null,deleteRule:null,schema:[],indexes:[],options:{}},e)}static initSchemaField(e){return Object.assign({id:"",name:"",type:"text",system:!1,required:!1,options:{}},e)}}const Vo=Pn([]);function _o(n,e=4e3){return Ho(n,"info",e)}function zt(n,e=3e3){return Ho(n,"success",e)}function $s(n,e=4500){return Ho(n,"error",e)}function ky(n,e=4500){return Ho(n,"warning",e)}function Ho(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{ob(i)},t)};Vo.update(s=>(Ea(s,i.message),j.pushOrReplaceByKey(s,i,"message"),s))}function ob(n){Vo.update(e=>(Ea(e,n),e))}function Ma(){Vo.update(n=>{for(let e of n)Ea(n,e);return[]})}function Ea(n,e){let t;typeof e=="string"?t=j.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),j.removeByKey(n,"message",t.message))}const Ci=Pn({});function xt(n){Ci.set(n||{})}function ci(n){Ci.update(e=>(j.deleteByPath(e,n),e))}const Oa=Pn({});function Yr(n){Oa.set(n||{})}const ni=Pn([]),wi=Pn({}),go=Pn(!1),rb=Pn({});function wy(n){ni.update(e=>{const t=j.findByKey(e,"id",n);return t?wi.set(t):e.length&&wi.set(e[0]),e})}function Sy(n){wi.update(e=>j.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ni.update(e=>(j.pushOrReplaceByKey(e,n,"id"),Da(),j.sortCollections(e)))}function Cy(n){ni.update(e=>(j.removeByKey(e,"id",n.id),wi.update(t=>t.id===n.id?e[0]:t),Da(),e))}async function $y(n=null){go.set(!0);try{let e=await ue.collections.getFullList(200,{sort:"+name"});e=j.sortCollections(e),ni.set(e);const t=n&&j.findByKey(e,"id",n);t?wi.set(t):e.length&&wi.set(e[0]),Da()}catch(e){ue.error(e)}go.set(!1)}function Da(){rb.update(n=>(ni.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const fr="pb_admin_file_token";Ro.prototype.logout=function(n=!0){this.authStore.clear(),n&&qi("/login")};Ro.prototype.error=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{},l=s.message||n.message||t;if(e&&l&&$s(l),j.isEmpty(s.data)||xt(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),qi("/")};Ro.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=I1(rb);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(fr)||"";return(!t||rg(t,10))&&(t&&localStorage.removeItem(fr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(fr,t),this._adminFileTokenRequest=null),t};class Ty extends ag{save(e,t){super.save(e,t),t&&!t.collectionId&&Yr(t)}clear(){super.clear(),Yr(null)}}const ue=new Ro("../",new Ty("pb_admin_auth"));ue.authStore.model&&!ue.authStore.model.collectionId&&Yr(ue.authStore.model);function My(n){let e,t,i,s,l,o,r,a,f,u,c,d;const m=n[3].default,_=Ct(m,n,n[2],null);return{c(){e=v("div"),t=v("main"),_&&_.c(),i=E(),s=v("footer"),l=v("a"),l.innerHTML=`<i class="ri-book-open-line txt-sm"></i>
<span class="txt">Docs</span>`,o=E(),r=v("span"),r.textContent="|",a=E(),f=v("a"),u=v("span"),u.textContent="PocketBase v0.17.6",p(t,"class","page-content"),p(l,"href","https://pocketbase.io/docs/"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(r,"class","delimiter"),p(u,"class","txt"),p(f,"href","https://github.com/pocketbase/pocketbase/releases"),p(f,"target","_blank"),p(f,"rel","noopener noreferrer"),p(f,"title","Releases"),p(s,"class","page-footer"),p(e,"class",c="page-wrapper "+n[1]),X(e,"center-content",n[0])},m(h,g){w(h,e,g),b(e,t),_&&_.m(t,null),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,f),b(f,u),d=!0},p(h,[g]){_&&_.p&&(!d||g&4)&&Tt(_,m,h,h[2],d?$t(m,h[2],g,null):Mt(h[2]),null),(!d||g&2&&c!==(c="page-wrapper "+h[1]))&&p(e,"class",c),(!d||g&3)&&X(e,"center-content",h[0])},i(h){d||(A(_,h),d=!0)},o(h){L(_,h),d=!1},d(h){h&&k(e),_&&_.d(h)}}}function Ey(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class kn extends ve{constructor(e){super(),be(this,e,Ey,My,me,{center:0,class:1})}}function Hf(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=`<figure class="logo"><img src="./images/logo.svg" alt="PocketBase logo" width="40" height="40"/>
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=E(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function Oy(n){let e,t,i,s=!n[0]&&Hf();const l=n[1].default,o=Ct(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=E(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){w(r,e,a),s&&s.m(e,null),b(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Hf(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&Tt(o,l,r,r[2],i?$t(l,r[2],a,null):Mt(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){L(o,r),i=!1},d(r){r&&k(e),s&&s.d(),o&&o.d(r)}}}function Dy(n){let e,t;return e=new kn({props:{class:"full-page",center:!0,$$slots:{default:[Oy]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(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){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Ay(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 ab extends ve{constructor(e){super(),be(this,e,Ay,Dy,me,{nobranding:0})}}function Bo(n){const e=n-1;return e*e*e+1}function Kr(n,{delay:e=0,duration:t=400,easing:i=bl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function di(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,f=r.transform==="none"?"":r.transform,u=a*(1-o),[c,d]=af(s),[m,_]=af(l);return{delay:e,duration:t,easing:i,css:(h,g)=>`
transform: ${f} translate(${(1-h)*c}${d}, ${(1-h)*m}${_});
opacity: ${a-u*g}`}}function tt(n,{delay:e=0,duration:t=400,easing:i=Bo,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),f=s==="y"?["top","bottom"]:["left","right"],u=f.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(l[`padding${u[0]}`]),d=parseFloat(l[`padding${u[1]}`]),m=parseFloat(l[`margin${u[0]}`]),_=parseFloat(l[`margin${u[1]}`]),h=parseFloat(l[`border${u[0]}Width`]),g=parseFloat(l[`border${u[1]}Width`]);return{delay:e,duration:t,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${r}: ${y*a}px;padding-${f[0]}: ${y*c}px;padding-${f[1]}: ${y*d}px;margin-${f[0]}: ${y*m}px;margin-${f[1]}: ${y*_}px;border-${f[0]}-width: ${y*h}px;border-${f[1]}-width: ${y*g}px;`}}function Yt(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,f=1-s,u=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>`
transform: ${a} scale(${1-f*d});
opacity: ${r-u*d}
`}}let Jr,Ui;const Zr="app-tooltip";function Bf(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Pi(){return Ui=Ui||document.querySelector("."+Zr),Ui||(Ui=document.createElement("div"),Ui.classList.add(Zr),document.body.appendChild(Ui)),Ui}function fb(n,e){let t=Pi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Gr();return}t.textContent=e.text,t.className=Zr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function Gr(){clearTimeout(Jr),Pi().classList.remove("active"),Pi().activeNode=void 0}function Iy(n,e){Pi().activeNode=n,clearTimeout(Jr),Jr=setTimeout(()=>{Pi().classList.add("active"),fb(n,e)},isNaN(e.delay)?0:e.delay)}function ze(n,e){let t=Bf(e);function i(){Iy(n,t)}function s(){Gr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&z.isFocusable(n))&&n.addEventListener("click",s),Pi(),{update(l){var o,r;t=Bf(l),(r=(o=Pi())==null?void 0:o.activeNode)!=null&&r.contains(n)&&fb(n,t)},destroy(){var l,o;(o=(l=Pi())==null?void 0:l.activeNode)!=null&&o.contains(n)&&Gr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Uf(n,e,t){const i=n.slice();return i[12]=e[t],i}const Ly=n=>({}),Wf=n=>({uniqueId:n[4]});function Py(n){let e,t,i=n[3],s=[];for(let o=0;o<i.length;o+=1)s[o]=Yf(Uf(n,i,o));const l=o=>L(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=ye()},m(o,r){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(o,r);w(o,e,r),t=!0},p(o,r){if(r&8){i=o[3];let a;for(a=0;a<i.length;a+=1){const f=Uf(o,i,a);s[a]?(s[a].p(f,r),A(s[a],1)):(s[a]=Yf(f),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(ae(),a=i.length;a<s.length;a+=1)l(a);fe()}},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)L(s[r]);t=!1},d(o){_t(s,o),o&&k(e)}}}function Fy(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("i"),p(t,"class","ri-error-warning-fill txt-danger"),p(e,"class","form-field-addon")},m(a,f){w(a,e,f),b(e,t),l=!0,o||(r=Ce(i=ze.call(null,t,{position:"left",text:n[3].map(bo).join(`
`}}let Jr,Ui;const Zr="app-tooltip";function Bf(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Pi(){return Ui=Ui||document.querySelector("."+Zr),Ui||(Ui=document.createElement("div"),Ui.classList.add(Zr),document.body.appendChild(Ui)),Ui}function fb(n,e){let t=Pi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Gr();return}t.textContent=e.text,t.className=Zr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function Gr(){clearTimeout(Jr),Pi().classList.remove("active"),Pi().activeNode=void 0}function Iy(n,e){Pi().activeNode=n,clearTimeout(Jr),Jr=setTimeout(()=>{Pi().classList.add("active"),fb(n,e)},isNaN(e.delay)?0:e.delay)}function ze(n,e){let t=Bf(e);function i(){Iy(n,t)}function s(){Gr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&j.isFocusable(n))&&n.addEventListener("click",s),Pi(),{update(l){var o,r;t=Bf(l),(r=(o=Pi())==null?void 0:o.activeNode)!=null&&r.contains(n)&&fb(n,t)},destroy(){var l,o;(o=(l=Pi())==null?void 0:l.activeNode)!=null&&o.contains(n)&&Gr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Uf(n,e,t){const i=n.slice();return i[12]=e[t],i}const Ly=n=>({}),Wf=n=>({uniqueId:n[4]});function Py(n){let e,t,i=n[3],s=[];for(let o=0;o<i.length;o+=1)s[o]=Yf(Uf(n,i,o));const l=o=>L(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=ye()},m(o,r){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(o,r);w(o,e,r),t=!0},p(o,r){if(r&8){i=o[3];let a;for(a=0;a<i.length;a+=1){const f=Uf(o,i,a);s[a]?(s[a].p(f,r),A(s[a],1)):(s[a]=Yf(f),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(ae(),a=i.length;a<s.length;a+=1)l(a);fe()}},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)L(s[r]);t=!1},d(o){_t(s,o),o&&k(e)}}}function Fy(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("i"),p(t,"class","ri-error-warning-fill txt-danger"),p(e,"class","form-field-addon")},m(a,f){w(a,e,f),b(e,t),l=!0,o||(r=Ce(i=ze.call(null,t,{position:"left",text:n[3].map(bo).join(`
`)})),o=!0)},p(a,f){i&&qt(i.update)&&f&8&&i.update.call(null,{position:"left",text:a[3].map(bo).join(`
`)})},i(a){l||(a&&Ge(()=>{l&&(s||(s=Re(t,Yt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=Re(t,Yt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&k(e),a&&s&&s.end(),o=!1,r()}}}function Yf(n){let e,t,i=bo(n[12])+"",s,l,o,r;return{c(){e=v("div"),t=v("pre"),s=U(i),l=E(),p(e,"class","help-block help-block-error")},m(a,f){w(a,e,f),b(e,t),b(t,s),b(e,l),r=!0},p(a,f){(!r||f&8)&&i!==(i=bo(a[12])+"")&&se(s,i)},i(a){r||(a&&Ge(()=>{r&&(o||(o=Re(e,tt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=Re(e,tt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&k(e),a&&o&&o.end()}}}function Ny(n){let e,t,i,s,l,o,r;const a=n[9].default,f=Ct(a,n,n[8],Wf),u=[Fy,Py],c=[];function d(m,_){return m[0]&&m[3].length?0:1}return i=d(n),s=c[i]=u[i](n),{c(){e=v("div"),f&&f.c(),t=E(),s.c(),p(e,"class",n[1]),X(e,"error",n[3].length)},m(m,_){w(m,e,_),f&&f.m(e,null),b(e,t),c[i].m(e,null),n[11](e),l=!0,o||(r=Y(e,"click",n[10]),o=!0)},p(m,[_]){f&&f.p&&(!l||_&256)&&Tt(f,a,m,m[8],l?$t(a,m[8],_,Ly):Mt(m[8]),Wf);let h=i;i=d(m),i===h?c[i].p(m,_):(ae(),L(c[h],1,1,()=>{c[h]=null}),fe(),s=c[i],s?s.p(m,_):(s=c[i]=u[i](m),s.c()),A(s,1),s.m(e,null)),(!l||_&2)&&p(e,"class",m[1]),(!l||_&10)&&X(e,"error",m[3].length)},i(m){l||(A(f,m),A(s),l=!0)},o(m){L(f,m),L(s),l=!1},d(m){m&&k(e),f&&f.d(m),c[i].d(),n[11](null),o=!1,r()}}}const Kf="Invalid value";function bo(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||Kf:n||Kf}function Ry(n,e,t){let i;We(n,Ci,h=>t(7,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+z.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:f=void 0}=e,u,c=[];function d(){ci(r)}Gt(()=>(u.addEventListener("input",d),u.addEventListener("change",d),()=>{u.removeEventListener("input",d),u.removeEventListener("change",d)}));function m(h){Fe.call(this,n,h)}function _(h){ne[h?"unshift":"push"](()=>{u=h,t(2,u)})}return n.$$set=h=>{"name"in h&&t(5,r=h.name),"inlineError"in h&&t(0,a=h.inlineError),"class"in h&&t(1,f=h.class),"$$scope"in h&&t(8,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,c=z.toArray(z.getNestedVal(i,r)))},[a,f,u,c,o,r,d,i,l,s,m,_]}class ce extends ve{constructor(e){super(),be(this,e,Ry,Ny,me,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function qy(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=E(),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(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0]),l.focus(),r||(a=Y(l,"input",n[5]),r=!0)},p(f,u){u&512&&i!==(i=f[9])&&p(e,"for",i),u&512&&o!==(o=f[9])&&p(l,"id",o),u&1&&l.value!==f[0]&&re(l,f[0])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function jy(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Password"),s=E(),l=v("input"),r=E(),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){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),re(l,n[1]),w(c,r,d),w(c,a,d),f||(u=Y(l,"input",n[6]),f=!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]&&re(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),f=!1,u()}}}function zy(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Password confirm"),s=E(),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(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[2]),r||(a=Y(l,"input",n[7]),r=!0)},p(f,u){u&512&&i!==(i=f[9])&&p(e,"for",i),u&512&&o!==(o=f[9])&&p(l,"id",o),u&4&&l.value!==f[2]&&re(l,f[2])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function Vy(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;return s=new ce({props:{class:"form-field required",name:"email",$$slots:{default:[qy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[jy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),a=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[zy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="<h4>Create your first admin account in order to continue</h4>",i=E(),B(s.$$.fragment),l=E(),B(o.$$.fragment),r=E(),B(a.$$.fragment),f=E(),u=v("button"),u.innerHTML=`<span class="txt">Create and login</span>
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block btn-next"),X(u,"btn-disabled",n[3]),X(u,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(_,h){w(_,e,h),b(e,t),b(e,i),V(s,e,null),b(e,l),V(o,e,null),b(e,r),V(a,e,null),b(e,f),b(e,u),c=!0,d||(m=Y(e,"submit",Xe(n[4])),d=!0)},p(_,[h]){const g={};h&1537&&(g.$$scope={dirty:h,ctx:_}),s.$set(g);const y={};h&1538&&(y.$$scope={dirty:h,ctx:_}),o.$set(y);const S={};h&1540&&(S.$$scope={dirty:h,ctx:_}),a.$set(S),(!c||h&8)&&X(u,"btn-disabled",_[3]),(!c||h&8)&&X(u,"btn-loading",_[3])},i(_){c||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),c=!0)},o(_){L(s.$$.fragment,_),L(o.$$.fragment,_),L(a.$$.fragment,_),c=!1},d(_){_&&k(e),H(s),H(o),H(a),d=!1,m()}}}function Hy(n,e,t){const i=wt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await ue.admins.create({email:s,password:l,passwordConfirm:o}),await ue.admins.authWithPassword(s,l),i("submit")}catch(d){ue.error(d)}t(3,r=!1)}}function f(){s=this.value,t(0,s)}function u(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,f,u,c]}class By extends ve{constructor(e){super(),be(this,e,Hy,Vy,me,{})}}function Jf(n){let e,t;return e=new ab({props:{$$slots:{default:[Uy]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Uy(n){let e,t;return e=new By({}),e.$on("submit",n[1]),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p:ee,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Wy(n){let e,t,i=n[0]&&Jf(n);return{c(){i&&i.c(),e=ye()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Jf(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),L(i,1,1,()=>{i=null}),fe())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function Yy(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ue.logout(!1),t(0,i=!0);return}ue.authStore.isValid?qi("/collections"):ue.logout()}return[i,async()=>{t(0,i=!1),await fn(),window.location.search=""}]}class Ky extends ve{constructor(e){super(),be(this,e,Yy,Wy,me,{})}}const Et=Pn(""),vo=Pn(""),Ts=Pn(!1);function Jy(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){w(l,e,o),n[13](e),re(e,n[7]),i||(s=Y(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]&&re(e,l[7])},i:ee,o:ee,d(l){l&&k(e),n[13](null),i=!1,s()}}}function Zy(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let f={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&&(f.value=a[7]),{props:f}}return o&&(e=Nt(o,r(n)),ne.push(()=>de(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=ye()},m(a,f){e&&V(e,a,f),w(a,i,f),s=!0},p(a,f){const u={};if(f&8&&(u.extraAutocompleteKeys=a[3]),f&4&&(u.baseCollection=a[2]),f&3&&(u.placeholder=a[0]||a[1]),!t&&f&128&&(t=!0,u.value=a[7],ge(()=>t=!1)),f&16&&o!==(o=a[4])){if(e){ae();const c=e;L(c.$$.fragment,1,0,()=>{H(c,1)}),fe()}o?(e=Nt(o,r(a)),ne.push(()=>de(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else o&&e.$set(u)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&L(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&H(e,a)}}}function Zf(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){w(s,e,l),i=!0},i(s){i||(s&&Ge(()=>{i&&(t||(t=Re(e,di,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=Re(e,di,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function Gf(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Clear</span>',p(e,"type","button"),p(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",n[15]),s=!0)},p:ee,i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,di,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,di,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Gy(n){let e,t,i,s,l,o,r,a,f,u,c;const d=[Zy,Jy],m=[];function _(y,S){return y[4]&&!y[5]?0:1}l=_(n),o=m[l]=d[l](n);let h=(n[0].length||n[7].length)&&n[7]!=n[0]&&Zf(),g=(n[0].length||n[7].length)&&Gf(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=E(),o.c(),r=E(),h&&h.c(),a=E(),g&&g.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(y,S){w(y,e,S),b(e,t),b(t,i),b(e,s),m[l].m(e,null),b(e,r),h&&h.m(e,null),b(e,a),g&&g.m(e,null),f=!0,u||(c=[Y(e,"click",Ln(n[11])),Y(e,"submit",Xe(n[10]))],u=!0)},p(y,[S]){let $=l;l=_(y),l===$?m[l].p(y,SLine truncated
<span class="txt">Method</span>`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function ck(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="URL",p(t,"class",z.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function dk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Referer",p(t,"class",z.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function pk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="User IP",p(t,"class",z.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function mk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Status",p(t,"class",z.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function hk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Created",p(t,"class",z.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function eu(n){let e;function t(l,o){return l[6]?gk:_k}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function _k(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&tu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,f){w(a,e,f),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,f){var u;(u=a[0])!=null&&u.length?o?o.p(a,f):(o=tu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function gk(n){let e;return{c(){e=v("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader m-0"></span></td>
`},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function tu(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){w(s,e,l),t||(i=Y(e,"click",n[19]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function nu(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){w(t,e,i)},d(t){t&&k(e)}}}function iu(n,e){var $e,Je,gt;let t,i,s,l=(($e=e[23].method)==null?void 0:$e.toUpperCase())+"",o,r,a,f,u,c=e[23].url+"",d,m,_,h,g,y,S=(e[23].referer||"N/A")+"",$,C,T,M,O,D=(e[23].userIp||"N/A")+"",I,P,F,R,N,q=e[23].status+"",j,J,G,Q,K,le,x,te,Ee,Pe,je=(((Je=e[23].meta)==null?void 0:Je.errorMessage)||((gt=e[23].meta)==null?void 0:gt.errorData))&&nu();Q=new Si({props:{date:e[23].created}});function Ve(){return e[17](e[23])}function ke(...Ze){return e[18](e[23],...Ze)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=U(l),a=E(),f=v("td"),u=v("span"),d=U(c),_=E(),je&&je.c(),h=E(),g=v("td"),y=v("span"),$=U(S),T=E(),M=v("td"),O=v("span"),I=U(D),F=E(),R=v("td"),N=v("span"),j=U(q),J=E(),G=v("td"),B(Q.$$.fragment),K=E(),le=v("td"),le.innerHTML='<i class="ri-arrow-right-line"></i>',x=E(),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(u,"class","txt txt-ellipsis"),p(u,"title",m=e[23].url),p(f,"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(g,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",P=e[23].userIp),X(O,"txt-hint",!e[23].userIp),p(M,"class","col-type-number col-field-userIp"),p(N,"class","label"),X(N,"label-danger",e[23].status>=400),p(R,"class","col-type-number col-field-status"),p(G,"class","col-type-date col-field-created"),p(le,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Ze,Ye){w(Ze,t,Ye),b(t,i),b(i,s),b(s,o),b(t,a),b(t,f),b(f,u),b(u,d),b(f,_),je&&je.m(f,null),b(t,h),b(t,g),b(g,y),b(y,$),b(t,T),b(t,M),b(M,O),b(O,I),b(t,F),b(t,R),b(R,N),b(N,j),b(t,J),b(t,G),V(Q,G,null),b(t,K),b(t,le),b(t,x),te=!0,Ee||(Pe=[Y(t,"click",Ve),Y(t,"keydown",ke)],Ee=!0)},p(Ze,Ye){var pe,he,Ke;e=Ze,(!te||Ye&8)&&l!==(l=((pe=e[23].method)==null?void 0:pe.toUpperCase())+"")&&se(o,l),(!te||Ye&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!te||Ye&8)&&c!==(c=e[23].url+"")&&se(d,c),(!te||Ye&8&&m!==(m=e[23].url))&&p(u,"title",m),(he=e[23].meta)!=null&&he.errorMessage||(Ke=e[23].meta)!=null&&Ke.errorData?je||(je=nu(),je.c(),je.m(f,null)):je&&(je.d(1),je=null),(!te||Ye&8)&&S!==(S=(e[23].referer||"N/A")+"")&&se($,S),(!te||Ye&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!te||Ye&8)&&X(y,"txt-hint",!e[23].referer),(!te||Ye&8)&&D!==(D=(e[23].userIp||"N/A")+"")&&se(I,D),(!te||Ye&8&&P!==(P=e[23].userIp))&&p(O,"title",P),(!te||Ye&8)&&X(O,"txt-hint",!e[23].userIp),(!te||Ye&8)&&q!==(q=e[23].status+"")&&se(j,q),(!te||Ye&8)&&X(N,"label-danger",e[23].status>=400);const kt={};Ye&8&&(kt.date=e[23].created),Q.$set(kt)},i(Ze){te||(A(Q.$$.fragment,Ze),te=!0)},o(Ze){L(Q.$$.fragment,Ze),te=!1},d(Ze){Ze&&k(t),je&&je.d(),H(Q),Ee=!1,Me(Pe)}}}function bk(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I=[],P=new Map,F;function R(ke){n[11](ke)}let N={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[uk]},$$scope:{ctx:n}};n[1]!==void 0&&(N.sort=n[1]),s=new rn({props:N}),ne.push(()=>de(s,"sort",R));function q(ke){n[12](ke)}let j={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[ck]},$$scope:{ctx:n}};n[1]!==void 0&&(j.sort=n[1]),r=new rn({props:j}),ne.push(()=>de(r,"sort",q));function J(ke){n[13](ke)}let G={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[dk]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),u=new rn({props:G}),ne.push(()=>de(u,"sort",J));function Q(ke){n[14](ke)}let K={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[pk]},$$scope:{ctx:n}};n[1]!==void 0&&(K.sort=n[1]),m=new rn({props:K}),ne.push(()=>de(m,"sort",Q));function le(ke){n[15](ke)}let x={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[mk]},$$scope:{ctx:n}};n[1]!==void 0&&(x.sort=n[1]),g=new rn({props:x}),ne.push(()=>de(g,"sort",le));function te(ke){n[16](ke)}let Ee={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[hk]},$$scope:{ctx:n}};n[1]!==void 0&&(Ee.sort=n[1]),$=new rn({props:Ee}),ne.push(()=>de($,"sort",te));let Pe=n[3];const je=ke=>ke[23].id;for(let ke=0;ke<Pe.length;ke+=1){let $e=xf(n,Pe,ke),Je=je($e);P.set(Je,I[ke]=iu(Je,$e))}let Ve=null;return Pe.length||(Ve=eu(n)),{c(){e=v("table"),t=v("thead"),i=v("tr"),B(s.$$.fragment),o=E(),B(r.$$.fragment),f=E(),B(u.$$.fragment),d=E(),B(m.$$.fragment),h=E(),B(g.$$.fragment),S=E(),B($.$$.fragment),T=E Line truncated
`)})},i(a){l||(a&&Ge(()=>{l&&(s||(s=Re(t,Yt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=Re(t,Yt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&k(e),a&&s&&s.end(),o=!1,r()}}}function Yf(n){let e,t,i=bo(n[12])+"",s,l,o,r;return{c(){e=v("div"),t=v("pre"),s=U(i),l=E(),p(e,"class","help-block help-block-error")},m(a,f){w(a,e,f),b(e,t),b(t,s),b(e,l),r=!0},p(a,f){(!r||f&8)&&i!==(i=bo(a[12])+"")&&se(s,i)},i(a){r||(a&&Ge(()=>{r&&(o||(o=Re(e,tt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=Re(e,tt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&k(e),a&&o&&o.end()}}}function Ny(n){let e,t,i,s,l,o,r;const a=n[9].default,f=Ct(a,n,n[8],Wf),u=[Fy,Py],c=[];function d(m,_){return m[0]&&m[3].length?0:1}return i=d(n),s=c[i]=u[i](n),{c(){e=v("div"),f&&f.c(),t=E(),s.c(),p(e,"class",n[1]),X(e,"error",n[3].length)},m(m,_){w(m,e,_),f&&f.m(e,null),b(e,t),c[i].m(e,null),n[11](e),l=!0,o||(r=Y(e,"click",n[10]),o=!0)},p(m,[_]){f&&f.p&&(!l||_&256)&&Tt(f,a,m,m[8],l?$t(a,m[8],_,Ly):Mt(m[8]),Wf);let h=i;i=d(m),i===h?c[i].p(m,_):(ae(),L(c[h],1,1,()=>{c[h]=null}),fe(),s=c[i],s?s.p(m,_):(s=c[i]=u[i](m),s.c()),A(s,1),s.m(e,null)),(!l||_&2)&&p(e,"class",m[1]),(!l||_&10)&&X(e,"error",m[3].length)},i(m){l||(A(f,m),A(s),l=!0)},o(m){L(f,m),L(s),l=!1},d(m){m&&k(e),f&&f.d(m),c[i].d(),n[11](null),o=!1,r()}}}const Kf="Invalid value";function bo(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||Kf:n||Kf}function Ry(n,e,t){let i;We(n,Ci,h=>t(7,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+j.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:f=void 0}=e,u,c=[];function d(){ci(r)}Gt(()=>(u.addEventListener("input",d),u.addEventListener("change",d),()=>{u.removeEventListener("input",d),u.removeEventListener("change",d)}));function m(h){Fe.call(this,n,h)}function _(h){ne[h?"unshift":"push"](()=>{u=h,t(2,u)})}return n.$$set=h=>{"name"in h&&t(5,r=h.name),"inlineError"in h&&t(0,a=h.inlineError),"class"in h&&t(1,f=h.class),"$$scope"in h&&t(8,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,c=j.toArray(j.getNestedVal(i,r)))},[a,f,u,c,o,r,d,i,l,s,m,_]}class ce extends ve{constructor(e){super(),be(this,e,Ry,Ny,me,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function qy(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=E(),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(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0]),l.focus(),r||(a=Y(l,"input",n[5]),r=!0)},p(f,u){u&512&&i!==(i=f[9])&&p(e,"for",i),u&512&&o!==(o=f[9])&&p(l,"id",o),u&1&&l.value!==f[0]&&re(l,f[0])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function jy(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Password"),s=E(),l=v("input"),r=E(),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){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),re(l,n[1]),w(c,r,d),w(c,a,d),f||(u=Y(l,"input",n[6]),f=!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]&&re(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),f=!1,u()}}}function zy(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Password confirm"),s=E(),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(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[2]),r||(a=Y(l,"input",n[7]),r=!0)},p(f,u){u&512&&i!==(i=f[9])&&p(e,"for",i),u&512&&o!==(o=f[9])&&p(l,"id",o),u&4&&l.value!==f[2]&&re(l,f[2])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function Vy(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;return s=new ce({props:{class:"form-field required",name:"email",$$slots:{default:[qy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[jy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),a=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[zy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="<h4>Create your first admin account in order to continue</h4>",i=E(),B(s.$$.fragment),l=E(),B(o.$$.fragment),r=E(),B(a.$$.fragment),f=E(),u=v("button"),u.innerHTML=`<span class="txt">Create and login</span>
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block btn-next"),X(u,"btn-disabled",n[3]),X(u,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(_,h){w(_,e,h),b(e,t),b(e,i),V(s,e,null),b(e,l),V(o,e,null),b(e,r),V(a,e,null),b(e,f),b(e,u),c=!0,d||(m=Y(e,"submit",Xe(n[4])),d=!0)},p(_,[h]){const g={};h&1537&&(g.$$scope={dirty:h,ctx:_}),s.$set(g);const y={};h&1538&&(y.$$scope={dirty:h,ctx:_}),o.$set(y);const S={};h&1540&&(S.$$scope={dirty:h,ctx:_}),a.$set(S),(!c||h&8)&&X(u,"btn-disabled",_[3]),(!c||h&8)&&X(u,"btn-loading",_[3])},i(_){c||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),c=!0)},o(_){L(s.$$.fragment,_),L(o.$$.fragment,_),L(a.$$.fragment,_),c=!1},d(_){_&&k(e),H(s),H(o),H(a),d=!1,m()}}}function Hy(n,e,t){const i=wt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await ue.admins.create({email:s,password:l,passwordConfirm:o}),await ue.admins.authWithPassword(s,l),i("submit")}catch(d){ue.error(d)}t(3,r=!1)}}function f(){s=this.value,t(0,s)}function u(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,f,u,c]}class By extends ve{constructor(e){super(),be(this,e,Hy,Vy,me,{})}}function Jf(n){let e,t;return e=new ab({props:{$$slots:{default:[Uy]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Uy(n){let e,t;return e=new By({}),e.$on("submit",n[1]),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p:ee,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Wy(n){let e,t,i=n[0]&&Jf(n);return{c(){i&&i.c(),e=ye()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Jf(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),L(i,1,1,()=>{i=null}),fe())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function Yy(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ue.logout(!1),t(0,i=!0);return}ue.authStore.isValid?qi("/collections"):ue.logout()}return[i,async()=>{t(0,i=!1),await fn(),window.location.search=""}]}class Ky extends ve{constructor(e){super(),be(this,e,Yy,Wy,me,{})}}const Et=Pn(""),vo=Pn(""),Ts=Pn(!1);function Jy(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){w(l,e,o),n[13](e),re(e,n[7]),i||(s=Y(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]&&re(e,l[7])},i:ee,o:ee,d(l){l&&k(e),n[13](null),i=!1,s()}}}function Zy(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let f={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&&(f.value=a[7]),{props:f}}return o&&(e=Nt(o,r(n)),ne.push(()=>de(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=ye()},m(a,f){e&&V(e,a,f),w(a,i,f),s=!0},p(a,f){const u={};if(f&8&&(u.extraAutocompleteKeys=a[3]),f&4&&(u.baseCollection=a[2]),f&3&&(u.placeholder=a[0]||a[1]),!t&&f&128&&(t=!0,u.value=a[7],ge(()=>t=!1)),f&16&&o!==(o=a[4])){if(e){ae();const c=e;L(c.$$.fragment,1,0,()=>{H(c,1)}),fe()}o?(e=Nt(o,r(a)),ne.push(()=>de(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else o&&e.$set(u)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&L(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&H(e,a)}}}function Zf(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){w(s,e,l),i=!0},i(s){i||(s&&Ge(()=>{i&&(t||(t=Re(e,di,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=Re(e,di,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function Gf(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Clear</span>',p(e,"type","button"),p(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",n[15]),s=!0)},p:ee,i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,di,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,di,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Gy(n){let e,t,i,s,l,o,r,a,f,u,c;const d=[Zy,Jy],m=[];function _(y,S){return y[4]&&!y[5]?0:1}l=_(n),o=m[l]=d[l](n);let h=(n[0].length||n[7].length)&&n[7]!=n[0]&&Zf(),g=(n[0].length||n[7].length)&&Gf(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=E(),o.c(),r=E(),h&&h.c(),a=E(),g&&g.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(y,S){w(y,e,S),b(e,t),b(t,i),b(e,s),m[l].m(e,null),b(e,r),h&&h.m(e,null),b(e,a),g&&g.m(e,null),f=!0,u||(c=[Y(e,"click",Ln(n[11])),Y(e,"submit",Xe(n[10]))],u=!0)},p(y,[S]){let $=l;l=_(y),l===$?m[l].p(y,SLine truncated
<span class="txt">Method</span>`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function ck(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="URL",p(t,"class",j.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function dk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Referer",p(t,"class",j.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function pk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="User IP",p(t,"class",j.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function mk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Status",p(t,"class",j.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function hk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Created",p(t,"class",j.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function eu(n){let e;function t(l,o){return l[6]?gk:_k}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function _k(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&tu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,f){w(a,e,f),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,f){var u;(u=a[0])!=null&&u.length?o?o.p(a,f):(o=tu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function gk(n){let e;return{c(){e=v("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader m-0"></span></td>
`},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function tu(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){w(s,e,l),t||(i=Y(e,"click",n[19]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function nu(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){w(t,e,i)},d(t){t&&k(e)}}}function iu(n,e){var $e,Je,gt;let t,i,s,l=(($e=e[23].method)==null?void 0:$e.toUpperCase())+"",o,r,a,f,u,c=e[23].url+"",d,m,_,h,g,y,S=(e[23].referer||"N/A")+"",$,C,T,M,O,D=(e[23].userIp||"N/A")+"",I,P,F,R,N,q=e[23].status+"",z,J,G,Q,K,le,x,te,Ee,Pe,je=(((Je=e[23].meta)==null?void 0:Je.errorMessage)||((gt=e[23].meta)==null?void 0:gt.errorData))&&nu();Q=new Si({props:{date:e[23].created}});function Ve(){return e[17](e[23])}function ke(...Ze){return e[18](e[23],...Ze)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=U(l),a=E(),f=v("td"),u=v("span"),d=U(c),_=E(),je&&je.c(),h=E(),g=v("td"),y=v("span"),$=U(S),T=E(),M=v("td"),O=v("span"),I=U(D),F=E(),R=v("td"),N=v("span"),z=U(q),J=E(),G=v("td"),B(Q.$$.fragment),K=E(),le=v("td"),le.innerHTML='<i class="ri-arrow-right-line"></i>',x=E(),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(u,"class","txt txt-ellipsis"),p(u,"title",m=e[23].url),p(f,"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(g,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",P=e[23].userIp),X(O,"txt-hint",!e[23].userIp),p(M,"class","col-type-number col-field-userIp"),p(N,"class","label"),X(N,"label-danger",e[23].status>=400),p(R,"class","col-type-number col-field-status"),p(G,"class","col-type-date col-field-created"),p(le,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Ze,Ye){w(Ze,t,Ye),b(t,i),b(i,s),b(s,o),b(t,a),b(t,f),b(f,u),b(u,d),b(f,_),je&&je.m(f,null),b(t,h),b(t,g),b(g,y),b(y,$),b(t,T),b(t,M),b(M,O),b(O,I),b(t,F),b(t,R),b(R,N),b(N,z),b(t,J),b(t,G),V(Q,G,null),b(t,K),b(t,le),b(t,x),te=!0,Ee||(Pe=[Y(t,"click",Ve),Y(t,"keydown",ke)],Ee=!0)},p(Ze,Ye){var pe,he,Ke;e=Ze,(!te||Ye&8)&&l!==(l=((pe=e[23].method)==null?void 0:pe.toUpperCase())+"")&&se(o,l),(!te||Ye&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!te||Ye&8)&&c!==(c=e[23].url+"")&&se(d,c),(!te||Ye&8&&m!==(m=e[23].url))&&p(u,"title",m),(he=e[23].meta)!=null&&he.errorMessage||(Ke=e[23].meta)!=null&&Ke.errorData?je||(je=nu(),je.c(),je.m(f,null)):je&&(je.d(1),je=null),(!te||Ye&8)&&S!==(S=(e[23].referer||"N/A")+"")&&se($,S),(!te||Ye&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!te||Ye&8)&&X(y,"txt-hint",!e[23].referer),(!te||Ye&8)&&D!==(D=(e[23].userIp||"N/A")+"")&&se(I,D),(!te||Ye&8&&P!==(P=e[23].userIp))&&p(O,"title",P),(!te||Ye&8)&&X(O,"txt-hint",!e[23].userIp),(!te||Ye&8)&&q!==(q=e[23].status+"")&&se(z,q),(!te||Ye&8)&&X(N,"label-danger",e[23].status>=400);const kt={};Ye&8&&(kt.date=e[23].created),Q.$set(kt)},i(Ze){te||(A(Q.$$.fragment,Ze),te=!0)},o(Ze){L(Q.$$.fragment,Ze),te=!1},d(Ze){Ze&&k(t),je&&je.d(),H(Q),Ee=!1,Me(Pe)}}}function bk(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I=[],P=new Map,F;function R(ke){n[11](ke)}let N={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[uk]},$$scope:{ctx:n}};n[1]!==void 0&&(N.sort=n[1]),s=new rn({props:N}),ne.push(()=>de(s,"sort",R));function q(ke){n[12](ke)}let z={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[ck]},$$scope:{ctx:n}};n[1]!==void 0&&(z.sort=n[1]),r=new rn({props:z}),ne.push(()=>de(r,"sort",q));function J(ke){n[13](ke)}let G={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[dk]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),u=new rn({props:G}),ne.push(()=>de(u,"sort",J));function Q(ke){n[14](ke)}let K={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[pk]},$$scope:{ctx:n}};n[1]!==void 0&&(K.sort=n[1]),m=new rn({props:K}),ne.push(()=>de(m,"sort",Q));function le(ke){n[15](ke)}let x={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[mk]},$$scope:{ctx:n}};n[1]!==void 0&&(x.sort=n[1]),g=new rn({props:x}),ne.push(()=>de(g,"sort",le));function te(ke){n[16](ke)}let Ee={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[hk]},$$scope:{ctx:n}};n[1]!==void 0&&(Ee.sort=n[1]),$=new rn({props:Ee}),ne.push(()=>de($,"sort",te));let Pe=n[3];const je=ke=>ke[23].id;for(let ke=0;ke<Pe.length;ke+=1){let $e=xf(n,Pe,ke),Je=je($e);P.set(Je,I[ke]=iu(Je,$e))}let Ve=null;return Pe.length||(Ve=eu(n)),{c(){e=v("table"),t=v("thead"),i=v("tr"),B(s.$$.fragment),o=E(),B(r.$$.fragment),f=E(),B(u.$$.fragment),d=E(),B(m.$$.fragment),h=E(),B(g.$$.fragment),S=E(),B($.$$.fragment),T=E Line truncated
* Chart.js v3.9.1
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
@@ -31,7 +31,7 @@
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/class iw{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=_b.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 _i=new iw;const Ou="transparent",sw={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=vu(n||Ou),s=i.valid&&vu(e||Ou);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class lw{constructor(e,t,i,s){const l=t[i];s=Bl([e.to,s,l,e.from]);const o=Bl([e.from,l,s]);this._active=!0,this._fn=e.fn||sw[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=Bl([e.to,t,s,e.from]),this._from=Bl([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 ow=["x","y","borderWidth","radius","tension"],rw=["color","borderColor","backgroundColor"];st.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 aw=Object.keys(st.animation);st.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});st.set("animations",{colors:{type:"color",properties:rw},numbers:{type:"number",properties:ow}});st.describe("animations",{_fallback:"animation"});st.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 Nb{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!et(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!et(s))return;const l={};for(const o of aw)l[o]=s[o];(St(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=uw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&fw(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 f=o[a];if(f.charAt(0)==="$")continue;if(f==="options"){s.push(...this._animateOptions(e,t));continue}const u=t[f];let c=l[f];const d=i.get(f);if(c)if(d&&c.active()){c.update(d,u,r);continue}else c.cancel();if(!d||!d.duration){e[f]=u;continue}l[f]=c=new lw(d,e,f,u),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 _i.add(this._chart,i),!0}}function fw(n,e){const t=[],Line truncated
*/class iw{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=_b.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 _i=new iw;const Ou="transparent",sw={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=vu(n||Ou),s=i.valid&&vu(e||Ou);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class lw{constructor(e,t,i,s){const l=t[i];s=Bl([e.to,s,l,e.from]);const o=Bl([e.from,l,s]);this._active=!0,this._fn=e.fn||sw[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=Bl([e.to,t,s,e.from]),this._from=Bl([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 ow=["x","y","borderWidth","radius","tension"],rw=["color","borderColor","backgroundColor"];st.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 aw=Object.keys(st.animation);st.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});st.set("animations",{colors:{type:"color",properties:rw},numbers:{type:"number",properties:ow}});st.describe("animations",{_fallback:"animation"});st.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 Nb{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!et(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!et(s))return;const l={};for(const o of aw)l[o]=s[o];(St(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=uw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&fw(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 f=o[a];if(f.charAt(0)==="$")continue;if(f==="options"){s.push(...this._animateOptions(e,t));continue}const u=t[f];let c=l[f];const d=i.get(f);if(c)if(d&&c.active()){c.update(d,u,r);continue}else c.cancel();if(!d||!d.duration){e[f]=u;continue}l[f]=c=new lw(d,e,f,u),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 _i.add(this._chart,i),!0}}function fw(n,e){const t=[],Line truncated
`)>-1?n.split(`
`):n}function CS(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 oc(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=An(e.bodyFont),f=An(e.titleFont),u=An(e.footerFont),c=l.length,d=s.length,m=i.length,_=Yn(e.padding);let h=_.height,g=0,y=i.reduce((C,T)=>C+T.before.length+T.lines.length+T.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(h+=c*f.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;h+=m*C+(y-m)*a.lineHeight+(y-1)*e.bodySpacing}d&&(h+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let S=0;const $=function(C){g=Math.max(g,t.measureText(C).width+S)};return t.save(),t.font=f.string,ht(n.title,$),t.font=a.string,ht(n.beforeBody.concat(n.afterBody),$),S=e.displayColors?o+2+e.boxPadding:0,ht(i,C=>{ht(C.before,$),ht(C.lines,$),ht(C.after,$)}),S=0,t.font=u.string,ht(n.footer,$),t.restore(),g+=_.width,{width:g,height:h}}function $S(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function TS(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 MS(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let f="center";return i==="center"?f=s<=(r+a)/2?"left":"right":s<=l/2?f="left":s>=o-l/2&&(f="right"),TS(f,n,e,t)&&(f="center"),f}function rc(n,e,t){const i=t.yAlign||e.yAlign||$S(n,t);return{xAlign:t.xAlign||e.xAlign||MS(n,e,t,i),yAlign:i}}function ES(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function OS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function ac(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,f=s+l,{topLeft:u,topRight:c,bottomLeft:d,bottomRight:m}=ys(o);let _=ES(e,r);const h=OS(e,a,f);return a==="center"?r==="left"?_+=f:r==="right"&&(_-=f):r==="left"?_-=Math.max(u,d)+s:r==="right"&&(_+=Math.max(c,m)+s),{x:an(_,0,i.width-e.width),y:an(h,0,i.height-e.height)}}function Gl(n,e,t){const i=Yn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function fc(n){return oi([],gi(n))}function DS(n,e,t){return ji(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function uc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ra extends $i{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new Nb(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=DS(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=oi(r,gi(s)),r=oi(r,gi(l)),r=oi(r,gi(o)),r}getBeforeBody(e,t){return fc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return ht(e,l=>{const o={before:[],lines:[],after:[]},r=uc(i,l);oi(o.before,gi(r.beforeLabel.call(this,l))),oi(o.lines,r.label.call(this,l)),oi(o.after,gi(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return fc(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=oi(r,gi(s)),r=oi(r,gi(l)),r=oi(r,gi(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,f;for(a=0,f=t.length;a<f;++a)r.push(CS(this.chart,t[a]));return e.filter&&(r=r.filter((u,c,d)=>e.filter(u,c,d,i))),e.itemSort&&(r=r.sort((u,c)=>e.itemSort(u,c,i))),ht(r,u=>{const c=uc(e.callbacks,u);s.push(c.labelColor.call(this,u)),l.push(c.labelPointStyle.call(this,u)),o.push(c.labelTextColor.call(this,u))}),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.1
@@ -45,25 +45,25 @@
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function S($){return $ instanceof a?new a($.type,S($.content),$.alias):Array.isArray($)?$.map(S):$.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++l}),S.__id},clone:function S($,C){C=C||{};var T,M;switch(r.util.type($)){case"Object":if(M=r.util.objId($),C[M])return C[M];T={},C[M]=T;for(var O in $)$.hasOwnProperty(O)&&(T[O]=S($[O],C));return T;case"Array":return M=r.util.objId($),C[M]?C[M]:(T=[],C[M]=T,$.forEach(function(D,I){T[I]=S(D,C)}),T);default:return $}},getLanguage:function(S){for(;S;){var $=s.exec(S.className);if($)return $[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,$){S.className=S.className.replace(RegExp(s,"gi"),""),S.classList.add("language-"+$)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(T){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(T.stack)||[])[1];if(S){var $=document.getElementsByTagName("script");for(var C in $)if($[C].src==S)return $[C]}return null}},isActive:function(S,$,C){for(var T="no-"+$;S;){var M=S.classList;if(M.contains($))return!0;if(M.contains(T))return!1;S=S.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(S,$){var C=r.util.clone(r.languages[S]);for(var T in $)C[T]=$[T];return C},insertBefore:function(S,$,C,T){T=T||r.languages;var M=T[S],O={};for(var D in M)if(M.hasOwnProperty(D)){if(D==$)for(var I in C)C.hasOwnProperty(I)&&(O[I]=C[I]);C.hasOwnProperty(D)||(O[D]=M[D])}var P=T[S];return T[S]=O,r.languages.DFS(r.languages,function(F,R){R===P&&F!=S&&(this[F]=O)}),O},DFS:function S($,C,T,M){M=M||{};var O=r.util.objId;for(var D in $)if($.hasOwnProperty(D)){C.call($,D,$[D],T||D);var I=$[D],P=r.util.type(I);P==="Object"&&!M[O(I)]?(M[O(I)]=!0,S(I,C,null,M)):P==="Array"&&!M[O(I)]&&(M[O(I)]=!0,S(I,C,D,M))}}},plugins:{},highlightAll:function(S,$){r.highlightAllUnder(document,S,$)},highlightAllUnder:function(S,$,C){var T={callback:C,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",T),T.elements=Array.prototype.slice.apply(T.container.querySelectorAll(T.selector)),r.hooks.run("before-all-elements-highlight",T);for(var M=0,O;O=T.elements[M++];)r.highlightElement(O,$===!0,T.callback)},highlightElement:function(S,$,C){var T=r.util.getLanguage(S),M=r.languages[T];r.util.setLanguage(S,T);var O=S.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,T);var D=S.textContent,I={element:S,language:T,grammar:M,code:D};function P(R){I.highlightedCode=R,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){P(r.util.encode(I.code));return}if($&&i.Worker){var F=new Worker(r.filename);F.onmessage=function(R){P(R.data)},F.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else P(r.highlight(I.code,I.grammar,I.language))},highlight:function(S,$,C){var T={code:S,grammar:$,language:C};if(r.hooks.run("before-tokenize",T),!T.grammar)throw new Error('The language "'+T.language+'" has no grammar.');return T.tokens=r.tokenize(T.code,T.grammar),r.hooks.run("after-tokenize",T),a.stringify(r.util.encode(T.tokens),T.language)},tokenize:function(S,$){var C=$.rest;if(C){for(var T in C)$[T]=C[T];delete $.rest}var M=new c;return d(M,M.head,S),u(S,M,$,M.head,0),_(M)},hooks:{all:{},add:function(S,$){var C=r.hooks.all;C[S]=C[S]||[],C[S].push($)},run:function(S,$){var C=r.hooks.all[S];if(!(!C||!C.length))for(var T=0,M;M=C[T++];)M($)}},Token:a};i.Prism=r;function a(S,$,C,T){this.type=S,this.content=$,this.alias=C,this.length=(T||"").length|0}a.stringify=function S($,C){if(typeof $=="string")return $;if(Array.isArray($)){var T="";return $.forEach(function(P){T+=S(P,C)}),T}var M={type:$.type,content:S($.content,C),tag:"span",classes:["token",$.type],attributes:{},language:C},O=$.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(M.classes,O):M.classes.push(O)),r.hooks.run("wrap",M);var D="";for(var I in M.attributes)D+=" "+I+'="'+(M.attributes[I]||"").replace(/"/g,"&quot;")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+D+">"+M.content+"</"+M.tag+">"};function f(S,$,C,T){S.lastIndex=$;var M=S.exec(C);if(M&&T&&M[1]){var O=M[1].length;M.index+=O,M[0]=M[0].slice(O)}return M}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 S($){return $ instanceof a?new a($.type,S($.content),$.alias):Array.isArray($)?$.map(S):$.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++l}),S.__id},clone:function S($,C){C=C||{};var T,M;switch(r.util.type($)){case"Object":if(M=r.util.objId($),C[M])return C[M];T={},C[M]=T;for(var O in $)$.hasOwnProperty(O)&&(T[O]=S($[O],C));return T;case"Array":return M=r.util.objId($),C[M]?C[M]:(T=[],C[M]=T,$.forEach(function(D,I){T[I]=S(D,C)}),T);default:return $}},getLanguage:function(S){for(;S;){var $=s.exec(S.className);if($)return $[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,$){S.className=S.className.replace(RegExp(s,"gi"),""),S.classList.add("language-"+$)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(T){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(T.stack)||[])[1];if(S){var $=document.getElementsByTagName("script");for(var C in $)if($[C].src==S)return $[C]}return null}},isActive:function(S,$,C){for(var T="no-"+$;S;){var M=S.classList;if(M.contains($))return!0;if(M.contains(T))return!1;S=S.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(S,$){var C=r.util.clone(r.languages[S]);for(var T in $)C[T]=$[T];return C},insertBefore:function(S,$,C,T){T=T||r.languages;var M=T[S],O={};for(var D in M)if(M.hasOwnProperty(D)){if(D==$)for(var I in C)C.hasOwnProperty(I)&&(O[I]=C[I]);C.hasOwnProperty(D)||(O[D]=M[D])}var P=T[S];return T[S]=O,r.languages.DFS(r.languages,function(F,R){R===P&&F!=S&&(this[F]=O)}),O},DFS:function S($,C,T,M){M=M||{};var O=r.util.objId;for(var D in $)if($.hasOwnProperty(D)){C.call($,D,$[D],T||D);var I=$[D],P=r.util.type(I);P==="Object"&&!M[O(I)]?(M[O(I)]=!0,S(I,C,null,M)):P==="Array"&&!M[O(I)]&&(M[O(I)]=!0,S(I,C,D,M))}}},plugins:{},highlightAll:function(S,$){r.highlightAllUnder(document,S,$)},highlightAllUnder:function(S,$,C){var T={callback:C,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",T),T.elements=Array.prototype.slice.apply(T.container.querySelectorAll(T.selector)),r.hooks.run("before-all-elements-highlight",T);for(var M=0,O;O=T.elements[M++];)r.highlightElement(O,$===!0,T.callback)},highlightElement:function(S,$,C){var T=r.util.getLanguage(S),M=r.languages[T];r.util.setLanguage(S,T);var O=S.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,T);var D=S.textContent,I={element:S,language:T,grammar:M,code:D};function P(R){I.highlightedCode=R,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){P(r.util.encode(I.code));return}if($&&i.Worker){var F=new Worker(r.filename);F.onmessage=function(R){P(R.data)},F.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else P(r.highlight(I.code,I.grammar,I.language))},highlight:function(S,$,C){var T={code:S,grammar:$,language:C};if(r.hooks.run("before-tokenize",T),!T.grammar)throw new Error('The language "'+T.language+'" has no grammar.');return T.tokens=r.tokenize(T.code,T.grammar),r.hooks.run("after-tokenize",T),a.stringify(r.util.encode(T.tokens),T.language)},tokenize:function(S,$){var C=$.rest;if(C){for(var T in C)$[T]=C[T];delete $.rest}var M=new c;return d(M,M.head,S),u(S,M,$,M.head,0),_(M)},hooks:{all:{},add:function(S,$){var C=r.hooks.all;C[S]=C[S]||[],C[S].push($)},run:function(S,$){var C=r.hooks.all[S];if(!(!C||!C.length))for(var T=0,M;M=C[T++];)M($)}},Token:a};i.Prism=r;function a(S,$,C,T){this.type=S,this.content=$,this.alias=C,this.length=(T||"").length|0}a.stringify=function S($,C){if(typeof $=="string")return $;if(Array.isArray($)){var T="";return $.forEach(function(P){T+=S(P,C)}),T}var M={type:$.type,content:S($.content,C),tag:"span",classes:["token",$.type],attributes:{},language:C},O=$.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(M.classes,O):M.classes.push(O)),r.hooks.run("wrap",M);var D="";for(var I in M.attributes)D+=" "+I+'="'+(M.attributes[I]||"").replace(/"/g,"&quot;")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+D+">"+M.content+"</"+M.tag+">"};function f(S,$,C,T){S.lastIndex=$;var M=S.exec(C);if(M&&T&&M[1]){var O=M[1].length;M.index+=O,M[0]=M[0].slice(O)}return M}funLine truncated
`),g.hasAttribute("data-start")||g.setAttribute("data-start",String(I+1))}y.textContent=M,t.highlightElement(y)},function(M){g.setAttribute(r,u),y.textContent=M})}}),t.plugins.fileHighlight={highlight:function(g){for(var y=(g||document).querySelectorAll(c),S=0,$;$=y[S++];)t.highlightElement($)}};var _=!1;t.fileHighlight=function(){_||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),_=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(r1);var s4=r1.exports;const Js=i4(s4);var l4={exports:{}};(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 f=i(a);a!=="normalize"&&f!=="setDefaults"&&r[a]&&this[f]&&(o=this[f].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,f){return a.length-f.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(`
`),f=0;f<a.length;++f)if(!(s(a[f])<=r)){for(var u=a[f].split(/(\s+)/g),c=0,d=0;d<u.length;++d){var m=s(u[d]);c+=m,c>r&&(u[d]=`
`+u[d],c=m)}a[f]=u.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 f in l)if(Object.hasOwnProperty.call(l,f)){var u=l[f];if(a.hasAttribute("data-"+f))try{var c=JSON.parse(a.getAttribute("data-"+f)||"true");typeof c===u&&(o.settings[f]=c)}catch{}}for(var d=a.childNodes,m="",_="",h=!1,g=0;g<d.length;++g){var y=d[g];y==o.element?h=!0:y.nodeName==="#text"&&(h?_+=y.nodeValue:m+=y.nodeValue,a.removeChild(y),--g)}if(!o.element.children.length||!Prism.plugins.KeepMarkup)o.code=m+o.code+_,o.code=r.normalize(o.code,o.settings);else{var S=m+o.element.innerHTML+_;o.element.innerHTML=r.normalize(S,o.settings),o.code=o.element.textContent}}}})})()})(l4);(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 o4(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){w(s,e,l),b(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:ee,o:ee,d(s){s&&k(e)}}}function r4(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 a1 extends ve{constructor(e){super(),be(this,e,r4,o4,me,{class:0,content:2,language:3})}}const a4=n=>({}),yc=n=>({}),f4=n=>({}),kc=n=>({});function wc(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$=n[4]&&!n[2]&&Sc(n);const C=n[19].header,T=Ct(C,n,n[18],kc);let M=n[4]&&n[2]&&Cc(n);const O=n[19].default,D=Ct(O,n,n[18],null),I=n[19].footer,P=Ct(I,n,n[18],yc);return{c(){e=v("div"),t=v("div"),s=E(),l=v("div"),o=v("div"),$&&$.c(),r=E(),T&&T.c(),a=E(),M&&M.c(),f=E(),u=v("div"),D&&D.c(),c=E(),d=v("div"),P&&P.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(u,"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(F,R){w(F,e,R),b(e,t),b(e,s),b(e,l),b(l,o),$&&$.m(o,null),b(o,r),T&&T.m(o,null),b(o,a),M&&M.m(o,null),b(l,f),b(l,u),D&&D.m(u,null),n[21](u),b(l,c),b(l,d),P&&P.m(d,null),g=!0,y||(S=[Y(t,"click",Xe(n[20])),Y(u,"scroll",n[22])],y=!0)},p(F,R){n=F,n[4]&&!n[2]?$?$.p(n,R):($=Sc(n),$.c(),$.m(o,r)):$&&($.d(1),$=null),T&&T.p&&(!g||R[0]&262144)&&Tt(T,C,n,n[18],g?$t(C,n[18],R,f4):Mt(n[18]),kc),n[4]&&n[2]?M?M.p(n,R):(M=Cc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),D&&D.p&&(!g||R[0]&262144)&&Tt(D,O,n,n[18],g?$t(O,n[18],R,null):Mt(n[18]),null),P&&P.p&&(!g||R[0]&262144)&&Tt(P,I,n,n[18],g?$t(I,n[18],R Line truncated
<span class="txt">New index</span>`,u=E(),B(c.$$.fragment),p(e,"class","section-title"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-pill btn-outline"),p(r,"class","indexes-list svelte-167lbwu")},m(O,D){w(O,e,D),b(e,t),b(e,s),b(e,l),w(O,o,D),w(O,r,D);for(let I=0;I<y.length;I+=1)y[I]&&y[I].m(r,null);b(r,a),b(r,f),w(O,u,D),V(c,O,D),m=!0,_||(h=Y(f,"click",n[5]),_=!0)},p(O,[D]){var P,F,R;if((!m||D&1)&&i!==(i=(((F=(P=O[0])==null?void 0:P.indexes)==null?void 0:F.length)||0)+"")&&se(s,i),D&7){g=((R=O[0])==null?void 0:R.indexes)||[];let N;for(N=0;N<g.length;N+=1){const q=Pc(O,g,N);y[N]?y[N].p(q,D):(y[N]=Nc(q),y[N].c(),y[N].m(r,a))}for(;N<y.length;N+=1)y[N].d(1);y.length=g.length}const I={};!d&&D&1&&(d=!0,I.collection=O[0],ge(()=>d=!1)),c.$set(I)},i(O){m||(A(c.$$.fragment,O),m=!0)},o(O){L(c.$$.fragment,O),m=!1},d(O){O&&k(e),O&&k(o),O&&k(r),_t(y,O),O&&k(u),n[6](null),H(c,O),_=!1,h()}}}const Rc=n=>n.name;function z4(n,e,t){let i;We(n,Ci,m=>t(2,i=m));let{collection:s}=e,l;function o(m,_){for(let h=0;h<s.indexes.length;h++)if(s.indexes[h]==m){t(0,s.indexes[h]=_,s),ci("indexes."+h);return}s.indexes.push(_),t(0,s)}const r=(m,_)=>l==null?void 0:l.show(m,_),a=()=>l==null?void 0:l.show();function f(m){ne[m?"unshift":"push"](()=>{l=m,t(1,l)})}function u(m){s=m,t(0,s)}const c=m=>{for(let _=0;_<s.indexes.length;_++)if(s.indexes[_]==m.detail){s.indexes.splice(_,1),ci("indexes."+_);break}t(0,s)},d=m=>{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},[s,l,i,o,r,a,f,u,c,d]}class V4 extends ve{constructor(e){super(),be(this,e,z4,j4,me,{collection:0})}}function qc(n,e,t){const i=n.slice();return i[6]=e[t],i}function jc(n){let e,t,i,s,l=n[6].label+"",o,r,a,f;function u(){return n[4](n[6])}function c(...d){return n[5](n[6],...d)}return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),o=U(l),r=E(),p(t,"class","icon "+n[6].icon+" svelte-1gz9b6p"),p(s,"class","txt"),p(e,"tabindex","0"),p(e,"class","dropdown-item closable svelte-1gz9b6p")},m(d,m){w(d,e,m),b(e,t),b(e,i),b(e,s),b(s,o),b(e,r),a||(f=[Y(e,"click",Ln(u)),Y(e,"keydown",Ln(c))],a=!0)},p(d,m){n=d},d(d){d&&k(e),a=!1,Me(f)}}}function H4(n){let e,t=n[2],i=[];for(let s=0;s<t.length;s+=1)i[s]=jc(qc(n,t,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=ye()},m(s,l){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(s,l);w(s,e,l)},p(s,l){if(l&12){t=s[2];let o;for(o=0;o<t.length;o+=1){const r=qc(s,t,o);i[o]?i[o].p(r,l):(i[o]=jc(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){_t(i,s),s&&k(e)}}}function B4(n){let e,t,i,s,l,o,r,a,f,u;return o=new Kn({props:{class:"dropdown field-types-dropdown",$$slots:{default:[H4]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("i"),i=E(),s=v("div"),s.textContent="New field",l=E(),B(o.$$.fragment),p(t,"class","ri-add-line"),p(s,"class","txt"),p(e,"type","button"),p(e,"class",r="field-types-btn "+n[0]+" svelte-1gz9b6p")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(e,l),V(o,e,null),a=!0,f||(u=Y(e,"click",n[1]),f=!0)},p(c,[d]){const m={};d&512&&(m.$$scope={dirty:d,ctx:c}),o.$set(m),(!a||d&1&&r!==(r="field-types-btn "+c[0]+" svelte-1gz9b6p"))&&p(e,"class",r)},i(c){a||(A(o.$$.fragment,c),a=!0)},o(c){L(o.$$.fragment,c),a=!1},d(c){c&&k(e),H(o),f=!1,u()}}}function U4(n,e,t){let{class:i=""}=e;const s=wt(),l=[{label:"Plain text",value:"text",icon:z.getFieldTypeIcon("text")},{label:"Rich editor",value:"editor",icon:z.getFieldTypeIcon("editor")},{label:"Number",value:"number",icon:z.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:z.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:z.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:z.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:z.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:z.getFieldTypeIcon("select")},{label:"File",value:"file",icon:z.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:z.getFieldTypeIcon("relation")},{label:"JSON",value:"json",icon:z.getFieldTypeIcon("json")}];function o(f){s("select",f)}const r=f=>{o(f.value)},a=(f,u)=>{(u.code==="Enter"||u.code==="Space")&&o(f.value)};return n.$$set=f=>{"class"in f&&t(0,i=f.class)},[i,s,l,o,r,a]}class W4 extends ve{constructor(e){super(),be(this,e,U4,B4,me,{class:0})}}const Y4=n=>({interactive:n&64,hasErrors:n&32}),zc=n=>({interactive:n[6],hasErrors:n[5]}),K4=n=>({interactive:n&64,hasErrors:n&32}),Vc=n=>({interactive:n[6],hasErrors:n[5]}),J4=n=>({interactive:n&64,hasErrors:n&32}),Hc=n=>({interactive:n[6],hasErrors:n[5]});function Bc(n){let e;return{c(){e=v("div"),e.innerHTML='<span class="drag-handle"></span>',p(e,"class","drag-handle-wrapper"),p(e,"draggable",!0),p(e,"aria-label","Sort")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Uc(n){let e,t,i,s;return{c(){e=v("span"),p(e,"class","marker marker-required")},m(l,o){w(l,e,o),i||(s=Ce(t=ze.call(null,e,n[4])),i=!0)},p(l,o){t&&qt(t.update)&&o&16&&t.update.call(null,l[4])},d(l){l&&k(e),i=!1,s()}}}function Z4(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_=n[0].required&&Line truncated
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&256&&l!==(l=g[8]))&&p(e,"for",l);const S={};y&256&&(S.id=g[8]),y&1&&(S.disabled=!z.isEmpty(g[0].options.onlyDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.exceptDomains,ge(()=>a=!1)),r.$set(S)},i(g){c||(A(r.$$.fragment,g),c=!0)},o(g){L(r.$$.fragment,g),c=!1},d(g){g&&k(e),g&&k(o),H(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function SC(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;function _(g){n[4](g)}let h={id:n[8]+".options.onlyDomains",disabled:!z.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(h.value=n[0].options.onlyDomains),r=new Fs({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),B(r.$$.fragment),f=E(),u=v("div"),u.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]+".options.onlyDomains"),p(u,"class","help-block")},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),w(g,o,y),V(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Ce(ze.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(g,y){(!c||y&256&&l!==(l=g[8]+".options.onlyDomains"))&&p(e,"for",l);const S={};y&256&&(S.id=g[8]+".options.onlyDomains"),y&1&&(S.disabled=!z.isEmpty(g[0].options.exceptDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.onlyDomains,ge(()=>a=!1)),r.$set(S)},i(g){c||(A(r.$$.fragment,g),c=!0)},o(g){L(r.$$.fragment,g),c=!1},d(g){g&&k(e),g&&k(o),H(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function CC(n){let e,t,i,s,l,o,r;return i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[wC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[SC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),B(i.$$.fragment),s=E(),l=v("div"),B(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,f){w(a,e,f),b(e,t),V(i,t,null),b(e,s),b(e,l),V(o,l,null),r=!0},p(a,f){const u={};f&2&&(u.name="schema."+a[1]+".options.exceptDomains"),f&769&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};f&2&&(c.name="schema."+a[1]+".options.onlyDomains"),f&769&&(c.$$scope={dirty:f,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){L(i.$$.fragment,a),L(o.$$.fragment,a),r=!1},d(a){a&&k(e),H(i),H(o)}}}function $C(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[CC]},$$scope:{ctx:n}};for(let r=0;r<s.length;r+=1)o=qe(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new pi({props:o}),ne.push(()=>de(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){B(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const f=a&6?Ot(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&515&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],ge(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function TC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(d){n.$$.not_equal(l.options.exceptDomains,d)&&(l.options.exceptDomains=d,t(0,l))}function a(d){n.$$.not_equal(l.options.onlyDomains,d)&&(l.options.onlyDomains=d,t(0,l))}function f(d){l=d,t(0,l)}function u(d){Fe.call(this,n,d)}function c(d){Fe.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(2,s=Qe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,s,r,a,f,u,c]}class c1 extends ve{constructor(e){super(),be(this,e,TC,$C,me,{field:0,key:1})}}function MC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;r<s.length;r+=1)o=qe(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new c1({props:o}),ne.push(()=>de(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){B(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const f=a&6?Ot(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};!t&&a&1&&(t=!0,f.field=r[0],ge(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function EC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(u){l=u,t(0,l)}function a(u){Fe.call(this,n,u)}function f(u){Fe.call(this,n,u)}return n.$$set=u=>{e=qe(qe({},e),Zt(u)),t(2,s=Qe(e,i)),"field"in u&&t(0,l=u.field),"key"in u&&t(1,o=u.key)},[l,o,s,r,a,f]}class OC extends ve{constructor(e){super(),be(this,e,EC,MC,me,{field:0,key:1})}}function DC(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Strip urls domain",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[8]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[8])},m(c,d){w(c,e,d),e.checked=n[0].options.convertUrls,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=[Y(e,"change",n[3]),Ce(ze.call(null,r,{text:"This could help making the editor content more portable between environments since there will be no local base url to replace."}))],f=!0)},p(c,d){d&256&&t!==(t=c[8])&&p(e,"id",t),d&1&&(e.checked=c[0].options.convertUrls),d&256&&a!==(a=c[8])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,Me(u)}}}function AC(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.convertUrls",$$slots:{default:[DC,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.convertUrls"),s&769&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function IC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[4](r)}let o={$$slots:{optionsFooter:[AC]},$$scope:{ctx:n}};for(let r=0;r<s.length;r+=1)o=qe(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new pi({props:o}),ne.push(()=>de(e,"field",l)),e.$on("rename",n[5]),e.$on("remove",n[6]),{c(){B(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const f=a&6?Ot(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&515&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&( 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 f in l)if(Object.hasOwnProperty.call(l,f)){var u=l[f];if(a.hasAttribute("data-"+f))try{var c=JSON.parse(a.getAttribute("data-"+f)||"true");typeof c===u&&(o.settings[f]=c)}catch{}}for(var d=a.childNodes,m="",_="",h=!1,g=0;g<d.length;++g){var y=d[g];y==o.element?h=!0:y.nodeName==="#text"&&(h?_+=y.nodeValue:m+=y.nodeValue,a.removeChild(y),--g)}if(!o.element.children.length||!Prism.plugins.KeepMarkup)o.code=m+o.code+_,o.code=r.normalize(o.code,o.settings);else{var S=m+o.element.innerHTML+_;o.element.innerHTML=r.normalize(S,o.settings),o.code=o.element.textContent}}}})})()})(l4);(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 o4(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){w(s,e,l),b(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:ee,o:ee,d(s){s&&k(e)}}}function r4(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 a1 extends ve{constructor(e){super(),be(this,e,r4,o4,me,{class:0,content:2,language:3})}}const a4=n=>({}),yc=n=>({}),f4=n=>({}),kc=n=>({});function wc(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$=n[4]&&!n[2]&&Sc(n);const C=n[19].header,T=Ct(C,n,n[18],kc);let M=n[4]&&n[2]&&Cc(n);const O=n[19].default,D=Ct(O,n,n[18],null),I=n[19].footer,P=Ct(I,n,n[18],yc);return{c(){e=v("div"),t=v("div"),s=E(),l=v("div"),o=v("div"),$&&$.c(),r=E(),T&&T.c(),a=E(),M&&M.c(),f=E(),u=v("div"),D&&D.c(),c=E(),d=v("div"),P&&P.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(u,"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(F,R){w(F,e,R),b(e,t),b(e,s),b(e,l),b(l,o),$&&$.m(o,null),b(o,r),T&&T.m(o,null),b(o,a),M&&M.m(o,null),b(l,f),b(l,u),D&&D.m(u,null),n[21](u),b(l,c),b(l,d),P&&P.m(d,null),g=!0,y||(S=[Y(t,"click",Xe(n[20])),Y(u,"scroll",n[22])],y=!0)},p(F,R){n=F,n[4]&&!n[2]?$?$.p(n,R):($=Sc(n),$.c(),$.m(o,r)):$&&($.d(1),$=null),T&&T.p&&(!g||R[0]&262144)&&Tt(T,C,n,n[18],g?$t(C,n[18],R,f4):Mt(n[18]),kc),n[4]&&n[2]?M?M.p(n,R):(M=Cc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),D&&D.p&&(!g||R[0]&262144)&&Tt(D,O,n,n[18],g?$t(O,n[18],R,null):Mt(n[18]),null),P&&P.p&&(!g||R[0]&262144)&&Tt(P,I,n,n[18],g?$t(I,n[18],R Line truncated
<span class="txt">New index</span>`,u=E(),B(c.$$.fragment),p(e,"class","section-title"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-pill btn-outline"),p(r,"class","indexes-list svelte-167lbwu")},m(O,D){w(O,e,D),b(e,t),b(e,s),b(e,l),w(O,o,D),w(O,r,D);for(let I=0;I<y.length;I+=1)y[I]&&y[I].m(r,null);b(r,a),b(r,f),w(O,u,D),V(c,O,D),m=!0,_||(h=Y(f,"click",n[5]),_=!0)},p(O,[D]){var P,F,R;if((!m||D&1)&&i!==(i=(((F=(P=O[0])==null?void 0:P.indexes)==null?void 0:F.length)||0)+"")&&se(s,i),D&7){g=((R=O[0])==null?void 0:R.indexes)||[];let N;for(N=0;N<g.length;N+=1){const q=Pc(O,g,N);y[N]?y[N].p(q,D):(y[N]=Nc(q),y[N].c(),y[N].m(r,a))}for(;N<y.length;N+=1)y[N].d(1);y.length=g.length}const I={};!d&&D&1&&(d=!0,I.collection=O[0],ge(()=>d=!1)),c.$set(I)},i(O){m||(A(c.$$.fragment,O),m=!0)},o(O){L(c.$$.fragment,O),m=!1},d(O){O&&k(e),O&&k(o),O&&k(r),_t(y,O),O&&k(u),n[6](null),H(c,O),_=!1,h()}}}const Rc=n=>n.name;function z4(n,e,t){let i;We(n,Ci,m=>t(2,i=m));let{collection:s}=e,l;function o(m,_){for(let h=0;h<s.indexes.length;h++)if(s.indexes[h]==m){t(0,s.indexes[h]=_,s),ci("indexes."+h);return}s.indexes.push(_),t(0,s)}const r=(m,_)=>l==null?void 0:l.show(m,_),a=()=>l==null?void 0:l.show();function f(m){ne[m?"unshift":"push"](()=>{l=m,t(1,l)})}function u(m){s=m,t(0,s)}const c=m=>{for(let _=0;_<s.indexes.length;_++)if(s.indexes[_]==m.detail){s.indexes.splice(_,1),ci("indexes."+_);break}t(0,s)},d=m=>{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},[s,l,i,o,r,a,f,u,c,d]}class V4 extends ve{constructor(e){super(),be(this,e,z4,j4,me,{collection:0})}}function qc(n,e,t){const i=n.slice();return i[6]=e[t],i}function jc(n){let e,t,i,s,l=n[6].label+"",o,r,a,f;function u(){return n[4](n[6])}function c(...d){return n[5](n[6],...d)}return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),o=U(l),r=E(),p(t,"class","icon "+n[6].icon+" svelte-1gz9b6p"),p(s,"class","txt"),p(e,"tabindex","0"),p(e,"class","dropdown-item closable svelte-1gz9b6p")},m(d,m){w(d,e,m),b(e,t),b(e,i),b(e,s),b(s,o),b(e,r),a||(f=[Y(e,"click",Ln(u)),Y(e,"keydown",Ln(c))],a=!0)},p(d,m){n=d},d(d){d&&k(e),a=!1,Me(f)}}}function H4(n){let e,t=n[2],i=[];for(let s=0;s<t.length;s+=1)i[s]=jc(qc(n,t,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=ye()},m(s,l){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(s,l);w(s,e,l)},p(s,l){if(l&12){t=s[2];let o;for(o=0;o<t.length;o+=1){const r=qc(s,t,o);i[o]?i[o].p(r,l):(i[o]=jc(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){_t(i,s),s&&k(e)}}}function B4(n){let e,t,i,s,l,o,r,a,f,u;return o=new Kn({props:{class:"dropdown field-types-dropdown",$$slots:{default:[H4]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("i"),i=E(),s=v("div"),s.textContent="New field",l=E(),B(o.$$.fragment),p(t,"class","ri-add-line"),p(s,"class","txt"),p(e,"type","button"),p(e,"class",r="field-types-btn "+n[0]+" svelte-1gz9b6p")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(e,l),V(o,e,null),a=!0,f||(u=Y(e,"click",n[1]),f=!0)},p(c,[d]){const m={};d&512&&(m.$$scope={dirty:d,ctx:c}),o.$set(m),(!a||d&1&&r!==(r="field-types-btn "+c[0]+" svelte-1gz9b6p"))&&p(e,"class",r)},i(c){a||(A(o.$$.fragment,c),a=!0)},o(c){L(o.$$.fragment,c),a=!1},d(c){c&&k(e),H(o),f=!1,u()}}}function U4(n,e,t){let{class:i=""}=e;const s=wt(),l=[{label:"Plain text",value:"text",icon:j.getFieldTypeIcon("text")},{label:"Rich editor",value:"editor",icon:j.getFieldTypeIcon("editor")},{label:"Number",value:"number",icon:j.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:j.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:j.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:j.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:j.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:j.getFieldTypeIcon("select")},{label:"File",value:"file",icon:j.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:j.getFieldTypeIcon("relation")},{label:"JSON",value:"json",icon:j.getFieldTypeIcon("json")}];function o(f){s("select",f)}const r=f=>{o(f.value)},a=(f,u)=>{(u.code==="Enter"||u.code==="Space")&&o(f.value)};return n.$$set=f=>{"class"in f&&t(0,i=f.class)},[i,s,l,o,r,a]}class W4 extends ve{constructor(e){super(),be(this,e,U4,B4,me,{class:0})}}const Y4=n=>({interactive:n&64,hasErrors:n&32}),zc=n=>({interactive:n[6],hasErrors:n[5]}),K4=n=>({interactive:n&64,hasErrors:n&32}),Vc=n=>({interactive:n[6],hasErrors:n[5]}),J4=n=>({interactive:n&64,hasErrors:n&32}),Hc=n=>({interactive:n[6],hasErrors:n[5]});function Bc(n){let e;return{c(){e=v("div"),e.innerHTML='<span class="drag-handle"></span>',p(e,"class","drag-handle-wrapper"),p(e,"draggable",!0),p(e,"aria-label","Sort")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Uc(n){let e,t,i,s;return{c(){e=v("span"),p(e,"class","marker marker-required")},m(l,o){w(l,e,o),i||(s=Ce(t=ze.call(null,e,n[4])),i=!0)},p(l,o){t&&qt(t.update)&&o&16&&t.update.call(null,l[4])},d(l){l&&k(e),i=!1,s()}}}function Z4(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_=n[0].required&&Line truncated
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&256&&l!==(l=g[8]))&&p(e,"for",l);const S={};y&256&&(S.id=g[8]),y&1&&(S.disabled=!j.isEmpty(g[0].options.onlyDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.exceptDomains,ge(()=>a=!1)),r.$set(S)},i(g){c||(A(r.$$.fragment,g),c=!0)},o(g){L(r.$$.fragment,g),c=!1},d(g){g&&k(e),g&&k(o),H(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function SC(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;function _(g){n[4](g)}let h={id:n[8]+".options.onlyDomains",disabled:!j.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(h.value=n[0].options.onlyDomains),r=new Fs({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),B(r.$$.fragment),f=E(),u=v("div"),u.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]+".options.onlyDomains"),p(u,"class","help-block")},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),w(g,o,y),V(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Ce(ze.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(g,y){(!c||y&256&&l!==(l=g[8]+".options.onlyDomains"))&&p(e,"for",l);const S={};y&256&&(S.id=g[8]+".options.onlyDomains"),y&1&&(S.disabled=!j.isEmpty(g[0].options.exceptDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.onlyDomains,ge(()=>a=!1)),r.$set(S)},i(g){c||(A(r.$$.fragment,g),c=!0)},o(g){L(r.$$.fragment,g),c=!1},d(g){g&&k(e),g&&k(o),H(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function CC(n){let e,t,i,s,l,o,r;return i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[wC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[SC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),B(i.$$.fragment),s=E(),l=v("div"),B(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,f){w(a,e,f),b(e,t),V(i,t,null),b(e,s),b(e,l),V(o,l,null),r=!0},p(a,f){const u={};f&2&&(u.name="schema."+a[1]+".options.exceptDomains"),f&769&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};f&2&&(c.name="schema."+a[1]+".options.onlyDomains"),f&769&&(c.$$scope={dirty:f,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){L(i.$$.fragment,a),L(o.$$.fragment,a),r=!1},d(a){a&&k(e),H(i),H(o)}}}function $C(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[CC]},$$scope:{ctx:n}};for(let r=0;r<s.length;r+=1)o=qe(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new pi({props:o}),ne.push(()=>de(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){B(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const f=a&6?Ot(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&515&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],ge(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function TC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(d){n.$$.not_equal(l.options.exceptDomains,d)&&(l.options.exceptDomains=d,t(0,l))}function a(d){n.$$.not_equal(l.options.onlyDomains,d)&&(l.options.onlyDomains=d,t(0,l))}function f(d){l=d,t(0,l)}function u(d){Fe.call(this,n,d)}function c(d){Fe.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(2,s=Qe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,s,r,a,f,u,c]}class c1 extends ve{constructor(e){super(),be(this,e,TC,$C,me,{field:0,key:1})}}function MC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;r<s.length;r+=1)o=qe(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new c1({props:o}),ne.push(()=>de(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){B(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const f=a&6?Ot(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};!t&&a&1&&(t=!0,f.field=r[0],ge(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function EC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(u){l=u,t(0,l)}function a(u){Fe.call(this,n,u)}function f(u){Fe.call(this,n,u)}return n.$$set=u=>{e=qe(qe({},e),Zt(u)),t(2,s=Qe(e,i)),"field"in u&&t(0,l=u.field),"key"in u&&t(1,o=u.key)},[l,o,s,r,a,f]}class OC extends ve{constructor(e){super(),be(this,e,EC,MC,me,{field:0,key:1})}}function DC(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Strip urls domain",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[8]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[8])},m(c,d){w(c,e,d),e.checked=n[0].options.convertUrls,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=[Y(e,"change",n[3]),Ce(ze.call(null,r,{text:"This could help making the editor content more portable between environments since there will be no local base url to replace."}))],f=!0)},p(c,d){d&256&&t!==(t=c[8])&&p(e,"id",t),d&1&&(e.checked=c[0].options.convertUrls),d&256&&a!==(a=c[8])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,Me(u)}}}function AC(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.convertUrls",$$slots:{default:[DC,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.convertUrls"),s&769&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function IC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[4](r)}let o={$$slots:{optionsFooter:[AC]},$$scope:{ctx:n}};for(let r=0;r<s.length;r+=1)o=qe(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new pi({props:o}),ne.push(()=>de(e,"field",l)),e.$on("rename",n[5]),e.$on("remove",n[6]),{c(){B(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const f=a&6?Ot(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&515&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&( Line truncated
<span class='flatpickr-weekday'>
`+Z.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function le(){t.calendarContainer.classList.add("hasWeeks");var W=ft("div","flatpickr-weekwrapper");W.appendChild(ft("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=ft("div","flatpickr-weeks");return W.appendChild(Z),{weekWrapper:W,weekNumbers:Z}}function x(W,Z){Z===void 0&&(Z=!0);var ie=Z?W:W-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,we("onYearChange"),N()),R(),we("onMonthChange"),_n())}function te(W,Z){if(W===void 0&&(W=!0),Z===void 0&&(Z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,Z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=Dr(t.config),oe=ie.hours,Se=ie.minutes,Ie=ie.seconds;m(oe,Se,Ie)}t.redraw(),W&&we("onChange")}function Ee(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),we("onClose")}function Pe(){t.config!==void 0&&we("onDestroy");for(var W=t._handlers.length;W--;)t._handlers[W].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var Z=t.calendarContainer.parentNode;if(Z.lastChild&&Z.removeChild(Z.lastChild),Z.parentNode){for(;Z.firstChild;)Z.parentNode.insertBefore(Z.firstChild,Z);Z.parentNode.removeChild(Z)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ie){try{delete t[ie]}catch{}})}function je(W){return t.calendarContainer.contains(W)}function Ve(W){if(t.isOpen&&!t.config.inline){var Z=Mn(W),ie=je(Z),oe=Z===t.input||Z===t.altInput||t.element.contains(Z)||W.path&&W.path.indexOf&&(~W.path.indexOf(t.input)||~W.path.indexOf(t.altInput)),Se=!oe&&!ie&&!je(W.relatedTarget),Ie=!t.config.ignoredFocusElements.some(function(Le){return Le.contains(Z)});Se&&Ie&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ke(W){if(!(!W||t.config.minDate&&W<t.config.minDate.getFullYear()||t.config.maxDate&&W>t.config.maxDate.getFullYear())){var Z=W,ie=t.currentYear!==Z;t.currentYear=Z||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ie&&(t.redraw(),we("onYearChange"),N())}}function $e(W,Z){var ie;Z===void 0&&(Z=!0);var oe=t.parseDate(W,void 0,Z);if(t.config.minDate&&oe&&En(oe,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&oe&&En(oe,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var Se=!!t.config.enable,Ie=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,Le=0,Oe=void 0;Le<Ie.length;Le++){if(Oe=Ie[Le],typeof Oe=="function"&&Oe(oe))return Se;if(Oe instanceof Date&&oe!==void 0&&Oe.getTime()===oe.getTime())return Se;if(typeof Oe=="string"){var Ue=t.parseDate(Oe,void 0,!0);return Ue&&Ue.getTime()===oe.getTime()?Se:!Se}else if(typeof Oe=="object"&&oe!==void 0&&Oe.from&&Oe.to&&oe.getTime()>=Oe.from.getTime()&&oe.getTime()<=Oe.to.getTime())return Se}return!Se}function Je(W){return t.daysContainer!==void 0?W.className.indexOf("hidden")===-1&&W.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(W):!1}function gt(W){var Z=W.target===t._input,ie=t._input.value.trimEnd()!==Fn();Z&&ie&&!(W.relatedTarget&&je(W.relatedTarget))&&t.setDate(t._input.value,!0,W.target===t.altInput?t.config.altFormat:t.config.dateFormat)}f Line truncated
`}}function le(){t.calendarContainer.classList.add("hasWeeks");var W=ft("div","flatpickr-weekwrapper");W.appendChild(ft("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=ft("div","flatpickr-weeks");return W.appendChild(Z),{weekWrapper:W,weekNumbers:Z}}function x(W,Z){Z===void 0&&(Z=!0);var ie=Z?W:W-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,we("onYearChange"),N()),R(),we("onMonthChange"),_n())}function te(W,Z){if(W===void 0&&(W=!0),Z===void 0&&(Z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,Z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=Dr(t.config),oe=ie.hours,Se=ie.minutes,Ie=ie.seconds;m(oe,Se,Ie)}t.redraw(),W&&we("onChange")}function Ee(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),we("onClose")}function Pe(){t.config!==void 0&&we("onDestroy");for(var W=t._handlers.length;W--;)t._handlers[W].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var Z=t.calendarContainer.parentNode;if(Z.lastChild&&Z.removeChild(Z.lastChild),Z.parentNode){for(;Z.firstChild;)Z.parentNode.insertBefore(Z.firstChild,Z);Z.parentNode.removeChild(Z)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ie){try{delete t[ie]}catch{}})}function je(W){return t.calendarContainer.contains(W)}function Ve(W){if(t.isOpen&&!t.config.inline){var Z=Mn(W),ie=je(Z),oe=Z===t.input||Z===t.altInput||t.element.contains(Z)||W.path&&W.path.indexOf&&(~W.path.indexOf(t.input)||~W.path.indexOf(t.altInput)),Se=!oe&&!ie&&!je(W.relatedTarget),Ie=!t.config.ignoredFocusElements.some(function(Le){return Le.contains(Z)});Se&&Ie&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ke(W){if(!(!W||t.config.minDate&&W<t.config.minDate.getFullYear()||t.config.maxDate&&W>t.config.maxDate.getFullYear())){var Z=W,ie=t.currentYear!==Z;t.currentYear=Z||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ie&&(t.redraw(),we("onYearChange"),N())}}function $e(W,Z){var ie;Z===void 0&&(Z=!0);var oe=t.parseDate(W,void 0,Z);if(t.config.minDate&&oe&&En(oe,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&oe&&En(oe,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var Se=!!t.config.enable,Ie=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,Le=0,Oe=void 0;Le<Ie.length;Le++){if(Oe=Ie[Le],typeof Oe=="function"&&Oe(oe))return Se;if(Oe instanceof Date&&oe!==void 0&&Oe.getTime()===oe.getTime())return Se;if(typeof Oe=="string"){var Ue=t.parseDate(Oe,void 0,!0);return Ue&&Ue.getTime()===oe.getTime()?Se:!Se}else if(typeof Oe=="object"&&oe!==void 0&&Oe.from&&Oe.to&&oe.getTime()>=Oe.from.getTime()&&oe.getTime()<=Oe.to.getTime())return Se}return!Se}function Je(W){return t.daysContainer!==void 0?W.className.indexOf("hidden")===-1&&W.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(W):!1}function gt(W){var Z=W.target===t._input,ie=t._input.value.trimEnd()!==Fn();Z&&ie&&!(W.relatedTarget&&je(W.relatedTarget))&&t.setDate(t._input.value,!0,W.target===t.altInput?t.config.altFormat:t.config.dateFormat)}f Line truncated
`),r=v("code"),r.textContent="multipart/form-data",a=U(`
requests, the following normalization rules are applied if the `),f=v("code"),f.textContent="json",u=U(` field
is a
`),c=v("strong"),c.textContent="plain string",d=U(`:
`),m=v("ul"),_=v("li"),_.innerHTML="&quot;true&quot; is converted to the json <code>true</code>",h=E(),g=v("li"),g.innerHTML="&quot;false&quot; is converted to the json <code>false</code>",y=E(),S=v("li"),S.innerHTML="&quot;null&quot; is converted to the json <code>null</code>",$=E(),C=v("li"),C.innerHTML="&quot;[1,2,3]&quot; is converted to the json <code>[1,2,3]</code>",T=E(),M=v("li"),D=U(O),I=U(" is converted to the json "),P=v("code"),P.textContent='{"a":1,"b":2}',F=E(),R=v("li"),R.textContent="numeric strings are converted to json number",N=E(),q=v("li"),q.textContent="double quoted strings are left as they are (aka. without normalizations)",j=E(),J=v("li"),J.textContent="any other string (empty string too) is double quoted",G=U(`
`),m=v("ul"),_=v("li"),_.innerHTML="&quot;true&quot; is converted to the json <code>true</code>",h=E(),g=v("li"),g.innerHTML="&quot;false&quot; is converted to the json <code>false</code>",y=E(),S=v("li"),S.innerHTML="&quot;null&quot; is converted to the json <code>null</code>",$=E(),C=v("li"),C.innerHTML="&quot;[1,2,3]&quot; is converted to the json <code>[1,2,3]</code>",T=E(),M=v("li"),D=U(O),I=U(" is converted to the json "),P=v("code"),P.textContent='{"a":1,"b":2}',F=E(),R=v("li"),R.textContent="numeric strings are converted to json number",N=E(),q=v("li"),q.textContent="double quoted strings are left as they are (aka. without normalizations)",z=E(),J=v("li"),J.textContent="any other string (empty string too) is double quoted",G=U(`
Alternatively, if you want to avoid the string value normalizations, you can wrap your
data inside an object, eg.`),Q=v("code"),Q.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(x,te){w(x,e,te),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o),b(i,r),b(i,a),b(i,f),b(i,u),b(i,c),b(i,d),b(i,m),b(m,_),b(m,h),b(m,g),b(m,y),b(m,S),b(m,$),b(m,C),b(m,T),b(m,M),b(M,D),b(M,I),b(M,P),b(m,F),b(m,R),b(m,N),b(m,q),b(m,j),b(m,J),b(i,G),b(i,Q),le=!0},i(x){le||(x&&Ge(()=>{le&&(K||(K=Re(e,tt,{duration:150},!0)),K.run(1))}),le=!0)},o(x){x&&(K||(K=Re(e,tt,{duration:150},!1)),K.run(0)),le=!1},d(x){x&&k(e),x&&K&&K.end()}}}function S$(n){let e,t,i,s,l,o,r;function a(d,m){return d[2]?w$:k$}let f=a(n),u=f(n),c=n[2]&&md();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=E(),u.c(),s=E(),c&&c.c(),l=ye(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,m){w(d,e,m),b(e,t),b(e,i),u.m(e,null),w(d,s,m),c&&c.m(d,m),w(d,l,m),o||(r=Y(e,"click",n[4]),o=!0)},p(d,m){f!==(f=a(d))&&(u.d(1),u=f(d),u&&(u.c(),u.m(e,null))),d[2]?c?m&4&&A(c,1):(c=md(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(ae(),L(c,1,1,()=>{c=null}),fe())},d(d){d&&k(e),u.d(),d&&k(s),c&&c.d(d),d&&k(l),o=!1,r()}}}function C$(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[S$]},$$scope:{ctx:n}};for(let r=0;r<s.length;r+=1)o=qe(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new pi({props:o}),ne.push(()=>de(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){B(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const f=a&10?Ot(s,[a&2&&{key:r[1]},a&8&&Xt(r[3])]):{};a&260&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],ge(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function $$(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function f(d){l=d,t(0,l)}function u(d){Fe.call(this,n,d)}function c(d){Fe.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(3,s=Qe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,r,s,a,f,u,c]}class T$ extends ve{constructor(e){super(),be(this,e,$$,C$,me,{field:0,key:1})}}function M$(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=U(t),s=E(),l=v("small"),r=U(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,f){w(a,e,f),b(e,i),w(a,s,f),w(a,l,f),b(l,r)},p(a,[f]){f&1&&t!==(t=(a[0].ext||"N/A")+"")&&se(i,t),f&1&&o!==(o=a[0].mimeType+"")&&se(r,o)},i:ee,o:ee,d(a){a&&k(e),a&&k(s),a&&k(l)}}}function E$(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class hd extends ve{constructor(e){super(),be(this,e,E$,M$,me,{item:0})}}const O$=[{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 Line truncated
data inside an object, eg.`),Q=v("code"),Q.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(x,te){w(x,e,te),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o),b(i,r),b(i,a),b(i,f),b(i,u),b(i,c),b(i,d),b(i,m),b(m,_),b(m,h),b(m,g),b(m,y),b(m,S),b(m,$),b(m,C),b(m,T),b(m,M),b(M,D),b(M,I),b(M,P),b(m,F),b(m,R),b(m,N),b(m,q),b(m,z),b(m,J),b(i,G),b(i,Q),le=!0},i(x){le||(x&&Ge(()=>{le&&(K||(K=Re(e,tt,{duration:150},!0)),K.run(1))}),le=!0)},o(x){x&&(K||(K=Re(e,tt,{duration:150},!1)),K.run(0)),le=!1},d(x){x&&k(e),x&&K&&K.end()}}}function S$(n){let e,t,i,s,l,o,r;function a(d,m){return d[2]?w$:k$}let f=a(n),u=f(n),c=n[2]&&md();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=E(),u.c(),s=E(),c&&c.c(),l=ye(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,m){w(d,e,m),b(e,t),b(e,i),u.m(e,null),w(d,s,m),c&&c.m(d,m),w(d,l,m),o||(r=Y(e,"click",n[4]),o=!0)},p(d,m){f!==(f=a(d))&&(u.d(1),u=f(d),u&&(u.c(),u.m(e,null))),d[2]?c?m&4&&A(c,1):(c=md(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(ae(),L(c,1,1,()=>{c=null}),fe())},d(d){d&&k(e),u.d(),d&&k(s),c&&c.d(d),d&&k(l),o=!1,r()}}}function C$(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[S$]},$$scope:{ctx:n}};for(let r=0;r<s.length;r+=1)o=qe(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new pi({props:o}),ne.push(()=>de(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){B(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const f=a&10?Ot(s,[a&2&&{key:r[1]},a&8&&Xt(r[3])]):{};a&260&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],ge(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function $$(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function f(d){l=d,t(0,l)}function u(d){Fe.call(this,n,d)}function c(d){Fe.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(3,s=Qe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,r,s,a,f,u,c]}class T$ extends ve{constructor(e){super(),be(this,e,$$,C$,me,{field:0,key:1})}}function M$(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=U(t),s=E(),l=v("small"),r=U(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,f){w(a,e,f),b(e,i),w(a,s,f),w(a,l,f),b(l,r)},p(a,[f]){f&1&&t!==(t=(a[0].ext||"N/A")+"")&&se(i,t),f&1&&o!==(o=a[0].mimeType+"")&&se(r,o)},i:ee,o:ee,d(a){a&&k(e),a&&k(s),a&&k(l)}}}function E$(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class hd extends ve{constructor(e){super(),be(this,e,E$,M$,me,{item:0})}}const O$=[{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 Line truncated
Leave empty for no restriction.`,position:"top"})),S=!0)},p(M,O){(!y||O&4194304&&l!==(l=M[22]))&&p(e,"for",l);const D={};O&4194304&&(D.id=M[22]),O&8&&(D.items=M[3]),!a&&O&1&&(a=!0,D.keyOfSelected=M[0].options.mimeTypes,ge(()=>a=!1)),r.$set(D);const I={};O&16777217&&(I.$$scope={dirty:O,ctx:M}),g.$set(I)},i(M){y||(A(r.$$.fragment,M),A(g.$$.fragment,M),y=!0)},o(M){L(r.$$.fragment,M),L(g.$$.fragment,M),y=!1},d(M){M&&k(e),M&&k(o),H(r,M),M&&k(f),M&&k(u),H(g),S=!1,$()}}}function P$(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>
@@ -75,12 +75,12 @@
<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){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function F$(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T;function M(D){n[13](D)}let O={id:n[22],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(O.value=n[0].options.thumbs),r=new Fs({props:O}),ne.push(()=>de(r,"value",M)),S=new Kn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[P$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=E(),s=v("i"),o=E(),B(r.$$.fragment),f=E(),u=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=E(),m=v("button"),_=v("span"),_.textContent="Supported formats",h=E(),g=v("i"),y=E(),B(S.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[22]),p(c,"class","txt"),p(_,"class","txt link-primary"),p(g,"class","ri-arrow-drop-down-fill"),p(m,"type","button"),p(m,"class","inline-flex flex-gap-0"),p(u,"class","help-block")},m(D,I){w(D,e,I),b(e,t),b(e,i),b(e,s),w(D,o,I),V(r,D,I),w(D,f,I),w(D,u,I),b(u,c),b(u,d),b(u,m),b(m,_),b(m,h),b(m,g),b(m,y),V(S,m,null),$=!0,C||(T=Ce(ze.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(D,I){(!$||I&4194304&&l!==(l=D[22]))&&p(e,"for",l);const P={};I&4194304&&(P.id=D[22]),!a&&I&1&&(a=!0,P.value=D[0].options.thumbs,ge(()=>a=!1)),r.$set(P);const F={};I&16777216&&(F.$$scope={dirty:I,ctx:D}),S.$set(F)},i(D){$||(A(r.$$.fragment,D),A(S.$$.fragment,D),$=!0)},o(D){L(r.$$.fragment,D),L(S.$$.fragment,D),$=!1},d(D){D&&k(e),D&&k(o),H(r,D),D&&k(f),D&&k(u),H(S),C=!1,T()}}}function N$(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Max file size"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Must be in bytes.",p(e,"for",i=n[22]),p(l,"type","number"),p(l,"id",o=n[22]),p(l,"step","1"),p(l,"min","0"),p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),re(l,n[0].options.maxSize),w(c,r,d),w(c,a,d),f||(u=Y(l,"input",n[14]),f=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&o!==(o=c[22])&&p(l,"id",o),d&1&&pt(l.value)!==c[0].options.maxSize&&re(l,c[0].options.maxSize)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),f=!1,u()}}}function _d(n){let e,t,i;return t=new ce({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[R$,({uniqueId:s})=>({22:s}),({uniqueId:s})=>s?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),B(t.$$.fragment),p(e,"class","col-sm-3")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.maxSelect"),l&20971521&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),H(t)}}}function R$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=E(),l=v("input"),p(e,"for",i=n[22]),p(l,"id",o=n[22]),p(l,"type","number"),p(l,"step","1"),p(l,"min","2"),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0].options.maxSelect),r||(a=Y(l,"input",n[15]),r=!0)},p(f,u){u&4194304&&i!==(i=f[22])&&p(e,"for",i),u&4194304&&o!==(o=f[22])&&p(l,"id",o),u&1&&pt(l.value)!==f[0].options.maxSelect&&re(l,f[0].options.maxSelect)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function q$(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[L$,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[F$,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[N$,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}});let _=!n[2]&&_d(n);return{c(){e=v("div"),t=v("div"),B(i.$$.fragment),s=E(),l=v("div"),B(o.$$.fragment),a=E(),f=v("div"),B(u.$$.fragment),d=E(),_&&_.c(),p(t,"class","col-sm-12"),p(l,"class",r=n[2]?"col-sm-8":"col-sm-6"),p(f,"class",c=n[2]?"col-sm-4":"col-sm-3"),p(e,"class","grid grid-sm")},m(h,g){w(h,e,g),b(e,t),V(i,t,null),b(e,s),b(e,l),V(o,l,null),b(e,a),b(e,f),V(u,f,null),b(e,d),_&&_.m(e,null),m=!0},p(h,g){const y={};g&2&&(y.name="schema."+h[1]+".options.mimeTypes"),g&20971529&&(y.$$scope={dirty:g,ctx:h}),i.$set(y);const S={};g&2&&(S.name="schema."+h[1]+".options.thumbs"),g&20971521&&(S.$$scope={dirty:g,ctx:h}),o.$set(S),(!m||g&4&&r!==(r=h[2]?"col-sm-8":"col-sm-6"))&&p(l,"class",r);const $={};g&2&&($.name="schema."+h[1]+".options.maxSize"),g&20971521&&($.$$scope={dirty:g,ctx:h}),u.$set($),(!m||g&4&&c!==(c=h[2]?"col-sm-4":"col-sm-3"))&&p(f,"class",c),h[2]?_&&(ae(),L(_,1,1,()=>{_=null}),fe()):_?(_.p(h,g),g&4&&A(_,1)):(_=_d(h),_.c(),A(_,1),_.m(e,null))},i(h){m||(A(i.$$.fragment,h),A(o.$$.fragment,h),A(u.$$.fragment,h),A(_),m=!0)Line truncated
(eg. 100x0) - resize to W width preserving the aspect ratio</li>`,p(e,"class","m-0")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function F$(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T;function M(D){n[13](D)}let O={id:n[22],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(O.value=n[0].options.thumbs),r=new Fs({props:O}),ne.push(()=>de(r,"value",M)),S=new Kn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[P$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=E(),s=v("i"),o=E(),B(r.$$.fragment),f=E(),u=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=E(),m=v("button"),_=v("span"),_.textContent="Supported formats",h=E(),g=v("i"),y=E(),B(S.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[22]),p(c,"class","txt"),p(_,"class","txt link-primary"),p(g,"class","ri-arrow-drop-down-fill"),p(m,"type","button"),p(m,"class","inline-flex flex-gap-0"),p(u,"class","help-block")},m(D,I){w(D,e,I),b(e,t),b(e,i),b(e,s),w(D,o,I),V(r,D,I),w(D,f,I),w(D,u,I),b(u,c),b(u,d),b(u,m),b(m,_),b(m,h),b(m,g),b(m,y),V(S,m,null),$=!0,C||(T=Ce(ze.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(D,I){(!$||I&4194304&&l!==(l=D[22]))&&p(e,"for",l);const P={};I&4194304&&(P.id=D[22]),!a&&I&1&&(a=!0,P.value=D[0].options.thumbs,ge(()=>a=!1)),r.$set(P);const F={};I&16777216&&(F.$$scope={dirty:I,ctx:D}),S.$set(F)},i(D){$||(A(r.$$.fragment,D),A(S.$$.fragment,D),$=!0)},o(D){L(r.$$.fragment,D),L(S.$$.fragment,D),$=!1},d(D){D&&k(e),D&&k(o),H(r,D),D&&k(f),D&&k(u),H(S),C=!1,T()}}}function N$(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Max file size"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Must be in bytes.",p(e,"for",i=n[22]),p(l,"type","number"),p(l,"id",o=n[22]),p(l,"step","1"),p(l,"min","0"),p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),re(l,n[0].options.maxSize),w(c,r,d),w(c,a,d),f||(u=Y(l,"input",n[14]),f=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&o!==(o=c[22])&&p(l,"id",o),d&1&&pt(l.value)!==c[0].options.maxSize&&re(l,c[0].options.maxSize)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),f=!1,u()}}}function _d(n){let e,t,i;return t=new ce({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[R$,({uniqueId:s})=>({22:s}),({uniqueId:s})=>s?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),B(t.$$.fragment),p(e,"class","col-sm-3")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.maxSelect"),l&20971521&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),H(t)}}}function R$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=E(),l=v("input"),p(e,"for",i=n[22]),p(l,"id",o=n[22]),p(l,"type","number"),p(l,"step","1"),p(l,"min","2"),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0].options.maxSelect),r||(a=Y(l,"input",n[15]),r=!0)},p(f,u){u&4194304&&i!==(i=f[22])&&p(e,"for",i),u&4194304&&o!==(o=f[22])&&p(l,"id",o),u&1&&pt(l.value)!==f[0].options.maxSelect&&re(l,f[0].options.maxSelect)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function q$(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[L$,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[F$,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[N$,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}});let _=!n[2]&&_d(n);return{c(){e=v("div"),t=v("div"),B(i.$$.fragment),s=E(),l=v("div"),B(o.$$.fragment),a=E(),f=v("div"),B(u.$$.fragment),d=E(),_&&_.c(),p(t,"class","col-sm-12"),p(l,"class",r=n[2]?"col-sm-8":"col-sm-6"),p(f,"class",c=n[2]?"col-sm-4":"col-sm-3"),p(e,"class","grid grid-sm")},m(h,g){w(h,e,g),b(e,t),V(i,t,null),b(e,s),b(e,l),V(o,l,null),b(e,a),b(e,f),V(u,f,null),b(e,d),_&&_.m(e,null),m=!0},p(h,g){const y={};g&2&&(y.name="schema."+h[1]+".options.mimeTypes"),g&20971529&&(y.$$scope={dirty:g,ctx:h}),i.$set(y);const S={};g&2&&(S.name="schema."+h[1]+".options.thumbs"),g&20971521&&(S.$$scope={dirty:g,ctx:h}),o.$set(S),(!m||g&4&&r!==(r=h[2]?"col-sm-8":"col-sm-6"))&&p(l,"class",r);const $={};g&2&&($.name="schema."+h[1]+".options.maxSize"),g&20971521&&($.$$scope={dirty:g,ctx:h}),u.$set($),(!m||g&4&&c!==(c=h[2]?"col-sm-4":"col-sm-3"))&&p(f,"class",c),h[2]?_&&(ae(),L(_,1,1,()=>{_=null}),fe()):_?(_.p(h,g),g&4&&A(_,1)):(_=_d(h),_.c(),A(_,1),_.m(e,null))},i(h){m||(A(i.$$.fragment,h),A(o.$$.fragment,h),A(u.$$.fragment,h),A(_),m=!0)Line truncated
<span class="txt">New collection</span>`,p(i,"type","button"),p(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=Y(i,"click",n[14]),s=!0)},p:ee,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,l()}}}function W$(n){let e,t,i;function s(o){n[15](o)}let l={id:n[23],searchable:n[5].length>5,selectPlaceholder:"Select collection *",noOptionsText:"No collections found",selectionKey:"id",items:n[5],readonly:!n[24]||n[0].id,$$slots:{afterOptions:[U$]},$$scope:{ctx:n}};return n[0].options.collectionId!==void 0&&(l.keyOfSelected=n[0].options.collectionId),e=new Vi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r&8388608&&(a.id=o[23]),r&32&&(a.searchable=o[5].length>5),r&32&&(a.items=o[5]),r&16777217&&(a.readonly=!o[24]||o[0].id),r&33554440&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.keyOfSelected=o[0].options.collectionId,ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function Y$(n){let e,t,i;function s(o){n[16](o)}let l={id:n[23],items:n[6],readonly:!n[24]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Vi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r&8388608&&(a.id=o[23]),r&16777216&&(a.readonly=!o[24]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function K$(n){let e,t,i,s,l,o,r,a,f,u;return i=new ce({props:{class:"form-field required "+(n[24]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.collectionId",$$slots:{default:[W$,({uniqueId:c})=>({23:c}),({uniqueId:c})=>c?8388608:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field form-field-single-multiple-select "+(n[24]?"":"readonly"),inlineError:!0,$$slots:{default:[Y$,({uniqueId:c})=>({23:c}),({uniqueId:c})=>c?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),B(i.$$.fragment),s=E(),l=v("div"),o=E(),B(r.$$.fragment),a=E(),f=v("div"),p(e,"class","separator"),p(l,"class","separator"),p(f,"class","separator")},m(c,d){w(c,e,d),w(c,t,d),V(i,c,d),w(c,s,d),w(c,l,d),w(c,o,d),V(r,c,d),w(c,a,d),w(c,f,d),u=!0},p(c,d){const m={};d&16777216&&(m.class="form-field required "+(c[24]?"":"readonly")),d&2&&(m.name="schema."+c[1]+".options.collectionId"),d&58720297&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const _={};d&16777216&&(_.class="form-field form-field-single-multiple-select "+(c[24]?"":"readonly")),d&58720260&&(_.$$scope={dirty:d,ctx:c}),r.$set(_)},i(c){u||(A(i.$$.fragment,c),A(r.$$.fragment,c),u=!0)},o(c){L(i.$$.fragment,c),L(r.$$.fragment,c),u=!1},d(c){c&&k(e),c&&k(t),H(i,c),c&&k(s),c&&k(l),c&&k(o),H(r,c),c&&k(a),c&&k(f)}}}function gd(n){let e,t,i,s,l,o;return t=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.minSelect",$$slots:{default:[J$,({uniqueId:r})=>({23:r}),({uniqueId:r})=>r?8388608:0]},$$scope:{ctx:n}}}),l=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[Z$,({uniqueId:r})=>({23:r}),({uniqueId:r})=>r?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),B(t.$$.fragment),i=E(),s=v("div"),B(l.$$.fragment),p(e,"class","col-sm-6"),p(s,"class","col-sm-6")},m(r,a){w(r,e,a),V(t,e,null),w(r,i,a),w(r,s,a),V(l,s,null),o=!0},p(r,a){const f={};a&2&&(f.name="schema."+r[1]+".options.minSelect"),a&41943041&&(f.$$scope={dirty:a,ctx:r}),t.$set(f);const u={};a&2&&(u.name="schema."+r[1]+".options.maxSelect"),a&41943041&&(u.$$scope={dirty:a,ctx:r}),l.$set(u)},i(r){o||(A(t.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){L(t.$$.fragment,r),L(l.$$.fragment,r),o=!1},d(r){r&&k(e),H(t),r&&k(i),r&&k(s),H(l)}}}function J$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min select"),s=E(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","number"),p(l,"id",o=n[23]),p(l,"step","1"),p(l,"min","1"),p(l,"placeholder","No min limit")},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0].options.minSelect),r||(a=Y(l,"input",n[11]),r=!0)},p(f,u){u&8388608&&i!==(i=f[23])&&p(e,"for",i),u&8388608&&o!==(o=f[23])&&p(l,"id",o),u&1&&pt(l.value)!==f[0].options.minSelect&&re(l,f[0].options.minSelect)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function Z$(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("label"),t=U("Max select"),s=E(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","number"),p(l,"id",o=n[23]),p(l,"step","1"),p(l,"placeholder","No max limit"),p(l,"min",r=n[0].options.minSelect||2)},m(u,c){w(u,e,c),b(e,t),w(u,s,c),w(u,l,c),re(l,n[0].options.maxSelect),a||(f=Y(l,"input",n[12]),a=!0)},p(u,c){c&8388608&&i!==(i=u[23])&&p(e,"for",i),c&8388608&&o!==(o=u[23])&&p(l,"id",o),c&1&&r!==(r=u[0].options.minSelect||2)&&p(l,"min",r),c&1&&pt(l.value)!==u[0].options.maxSelect&&re(l,u[0].options.maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),a=!1,f()}}}function G$(n){let e,t,i,s,l,o,r,a,f,u,c,d;function m(h){n[13](h)}let _={id:n[23],items:n[7]};return n[0].options.cascadeDelete!==void 0&&(_.keyOfSelected=n[0].options.cascadeDelete),a=new VLine truncated
`),position:"top"})),c=!0)},p(h,g){var S,$;l&&qt(l.update)&&g&20&&l.update.call(null,{text:[`Whether on ${((S=h[4])==null?void 0:S.name)||"relation"} record deletion to delete also the current corresponding collection record(s).`,h[2]?null:`For "Multiple" relation fields the cascade delete is triggered only when all ${(($=h[4])==null?void 0:$.name)||"relation"} ids are removed from the corresponding record.`].filter(Boolean).join(`
`),position:"top"}),(!u||g&8388608&&o!==(o=h[23]))&&p(e,"for",o);const y={};g&8388608&&(y.id=h[23]),!f&&g&1&&(f=!0,y.keyOfSelected=h[0].options.cascadeDelete,ge(()=>f=!1)),a.$set(y)},i(h){u||(A(a.$$.fragment,h),u=!0)},o(h){L(a.$$.fragment,h),u=!1},d(h){h&&k(e),h&&k(r),H(a,h),c=!1,d()}}}function X$(n){let e,t,i,s,l,o=!n[2]&&gd(n);return s=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[G$,({uniqueId:r})=>({23:r}),({uniqueId:r})=>r?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),o&&o.c(),t=E(),i=v("div"),B(s.$$.fragment),p(i,"class","col-sm-12"),p(e,"class","grid grid-sm")},m(r,a){w(r,e,a),o&&o.m(e,null),b(e,t),b(e,i),V(s,i,null),l=!0},p(r,a){r[2]?o&&(ae(),L(o,1,1,()=>{o=null}),fe()):o?(o.p(r,a),a&4&&A(o,1)):(o=gd(r),o.c(),A(o,1),o.m(e,t));const f={};a&2&&(f.name="schema."+r[1]+".options.cascadeDelete"),a&41943061&&(f.$$scope={dirty:a,ctx:r}),s.$set(f)},i(r){l||(A(o),A(s.$$.fragment,r),l=!0)},o(r){L(o),L(s.$$.fragment,r),l=!1},d(r){r&&k(e),o&&o.d(),H(s)}}}function Q$(n){let e,t,i,s,l;const o=[{key:n[1]},n[8]];function r(u){n[17](u)}let a={$$slots:{options:[X$],default:[K$,({interactive:u})=>({24:u}),({interactive:u})=>u?16777216:0]},$$scope:{ctx:n}};for(let u=0;u<o.length;u+=1)a=qe(a,o[u]);n[0]!==void 0&&(a.field=n[0]),e=new pi({props:a}),ne.push(()=>de(e,"field",r)),e.$on("rename",n[18]),e.$on("remove",n[19]);let f={};return s=new nf({props:f}),n[20](s),s.$on("save",n[21]),{c(){B(e.$$.fragment),i=E(),B(s.$$.fragment)},m(u,c){V(e,u,c),w(u,i,c),V(s,u,c),l=!0},p(u,[c]){const d=c&258?Ot(o,[c&2&&{key:u[1]},c&256&&Xt(u[8])]):{};c&50331711&&(d.$$scope={dirty:c,ctx:u}),!t&&c&1&&(t=!0,d.field=u[0],ge(()=>t=!1)),e.$set(d);const m={};s.$set(m)},i(u){l||(A(e.$$.fragment,u),A(s.$$.fragment,u),l=!0)},o(u){L(e.$$.fragment,u),L(s.$$.fragment,u),l=!1},d(u){H(e,u),u&&k(i),n[20](null),H(s,u)}}}function x$(n,e,t){var F;let i,s;const l=["field","key"];let o=Qe(e,l),r;We(n,ni,R=>t(10,r=R));let{field:a}=e,{key:f=""}=e;const u=[{label:"Single",value:!0},{label:"Multiple",value:!1}],c=[{label:"False",value:!1},{label:"True",value:!0}];let d=null,m=((F=a.options)==null?void 0:F.maxSelect)==1,_=m;function h(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1},a),t(2,m=!0),t(9,_=m)}function g(){a.options.minSelect=pt(this.value),t(0,a),t(9,_),t(2,m)}function y(){a.options.maxSelect=pt(this.value),t(0,a),t(9,_),t(2,m)}function S(R){n.$$.not_equal(a.options.cascadeDelete,R)&&(a.options.cascadeDelete=R,t(0,a),t(9,_),t(2,m))}const $=()=>d==null?void 0:d.show();function C(R){n.$$.not_equal(a.options.collectionId,R)&&(a.options.collectionId=R,t(0,a),t(9,_),t(2,m))}function T(R){m=R,t(2,m)}function M(R){a=R,t(0,a),t(9,_),t(2,m)}function O(R){Fe.call(this,n,R)}function D(R){Fe.call(this,n,R)}function I(R){ne[R?"unshift":"push"](()=>{d=R,t(3,d)})}const P=R=>{var N,q;(q=(N=R==null?void 0:R.detail)==null?void 0:N.collection)!=null&&q.id&&R.detail.collection.type!="view"&&t(0,a.options.collectionId=R.detail.collection.id,a)};return n.$$set=R=>{e=qe(qe({},e),Zt(R)),t(8,o=Qe(e,l)),"field"in R&&t(0,a=R.field),"key"in R&&t(1,f=R.key)},n.$$.update=()=>{n.$$.dirty&1024&&t(5,i=r.filter(R=>R.type!="view")),n.$$.dirty&516&&_!=m&&(t(9,_=m),m?(t(0,a.options.minSelect=null,a),t(0,a.options.maxSelect=1,a)):t(0,a.options.maxSelect=null,a)),n.$$.dirty&1&&z.isEmpty(a.options)&&h(),n.$$.dirty&1025&&t(4,s=r.find(R=>R.id==a.options.collectionId)||null)},[a,f,m,d,s,i,u,c,o,_,r,g,y,S,$,C,T,M,O,D,I,P]}class eT extends ve{constructor(e){super(),be(this,e,x$,Q$,me,{field:0,key:1})}}const tT=n=>({dragging:n&4,dragover:n&8}),bd=n=>({dragging:n[2],dragover:n[3]});function nT(n){let e,t,i,s,l;const o=n[10].default,r=Ct(o,n,n[9],bd);return{c(){e=v("div"),r&&r.c(),p(e,"draggable",t=!n[1]),p(e,"class","draggable svelte-28orm4"),X(e,"dragging",n[2]),X(e,"dragover",n[3])},m(a,f){w(a,e,f),r&&r.m(e,null),i=!0,s||(l=[Y(e,"dragover",Xe(n[11])),Y(e,"dragleave",Xe(n[12])),Y(e,"dragend",n[13]),Y(e,"dragstart",n[14]),Y(e,"drop",n[15])],s=!0)},p(a,[f]){r&&r.p&&(!i||f&524)&&Tt(r,o,a,a[9],i?$t(o,a[9],f,tT):Mt(a[9]),bd),(!i||f&2&&t!==(t=!a[1]))&&p(e,"draggable",t),(!i||f&4)&&X(e,"dragging",a[2]),(!i||f&8)&&X(e,"dragover",a[3])},i(a){i||(A(r,a),i=!0)},o(a){L(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),s=!1,Me(l)}}}function iT(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=wt();let{index:o}=e,{list:r=[]}=e,{group:a="default"}=e,{disabled:f=!1}=e,{dragHandleClass:u=""}=e,c=!1,d=!1;function m(C,T){if(!(!C||f)){if(u&&!C.target.classList.contains(u)){t(3,d=!1),t(2,c=!1),C.preventDefault();return}t(2,c=!0),C.dataTransfer.effectAllowed="move",C.dataTransfer.dropEffect="move",C.dataTransfer.setData("text/plain",JSON.stringify({index:T,group:a})),l("drag",C)}}function _(C,T){if(t(3,d=!1),t(2,c=!1),!C||f)return;C.dataTransfer.dropEffect="move";let M={};try{M=JSON.parse(C.dataTransfer.getData("text/plain"))}catch{}if(M.group!=a)return;const O=M.index<<0;O<T?(r.splice(T+1,0,r[O]),r.splice(O,1)):(r.splice(T,0,r[O]),r.splice(O+1,1)),t(6,r),l("sort",{oldIndex Line truncated
`),position:"top"}),(!u||g&8388608&&o!==(o=h[23]))&&p(e,"for",o);const y={};g&8388608&&(y.id=h[23]),!f&&g&1&&(f=!0,y.keyOfSelected=h[0].options.cascadeDelete,ge(()=>f=!1)),a.$set(y)},i(h){u||(A(a.$$.fragment,h),u=!0)},o(h){L(a.$$.fragment,h),u=!1},d(h){h&&k(e),h&&k(r),H(a,h),c=!1,d()}}}function X$(n){let e,t,i,s,l,o=!n[2]&&gd(n);return s=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[G$,({uniqueId:r})=>({23:r}),({uniqueId:r})=>r?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),o&&o.c(),t=E(),i=v("div"),B(s.$$.fragment),p(i,"class","col-sm-12"),p(e,"class","grid grid-sm")},m(r,a){w(r,e,a),o&&o.m(e,null),b(e,t),b(e,i),V(s,i,null),l=!0},p(r,a){r[2]?o&&(ae(),L(o,1,1,()=>{o=null}),fe()):o?(o.p(r,a),a&4&&A(o,1)):(o=gd(r),o.c(),A(o,1),o.m(e,t));const f={};a&2&&(f.name="schema."+r[1]+".options.cascadeDelete"),a&41943061&&(f.$$scope={dirty:a,ctx:r}),s.$set(f)},i(r){l||(A(o),A(s.$$.fragment,r),l=!0)},o(r){L(o),L(s.$$.fragment,r),l=!1},d(r){r&&k(e),o&&o.d(),H(s)}}}function Q$(n){let e,t,i,s,l;const o=[{key:n[1]},n[8]];function r(u){n[17](u)}let a={$$slots:{options:[X$],default:[K$,({interactive:u})=>({24:u}),({interactive:u})=>u?16777216:0]},$$scope:{ctx:n}};for(let u=0;u<o.length;u+=1)a=qe(a,o[u]);n[0]!==void 0&&(a.field=n[0]),e=new pi({props:a}),ne.push(()=>de(e,"field",r)),e.$on("rename",n[18]),e.$on("remove",n[19]);let f={};return s=new nf({props:f}),n[20](s),s.$on("save",n[21]),{c(){B(e.$$.fragment),i=E(),B(s.$$.fragment)},m(u,c){V(e,u,c),w(u,i,c),V(s,u,c),l=!0},p(u,[c]){const d=c&258?Ot(o,[c&2&&{key:u[1]},c&256&&Xt(u[8])]):{};c&50331711&&(d.$$scope={dirty:c,ctx:u}),!t&&c&1&&(t=!0,d.field=u[0],ge(()=>t=!1)),e.$set(d);const m={};s.$set(m)},i(u){l||(A(e.$$.fragment,u),A(s.$$.fragment,u),l=!0)},o(u){L(e.$$.fragment,u),L(s.$$.fragment,u),l=!1},d(u){H(e,u),u&&k(i),n[20](null),H(s,u)}}}function x$(n,e,t){var F;let i,s;const l=["field","key"];let o=Qe(e,l),r;We(n,ni,R=>t(10,r=R));let{field:a}=e,{key:f=""}=e;const u=[{label:"Single",value:!0},{label:"Multiple",value:!1}],c=[{label:"False",value:!1},{label:"True",value:!0}];let d=null,m=((F=a.options)==null?void 0:F.maxSelect)==1,_=m;function h(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1},a),t(2,m=!0),t(9,_=m)}function g(){a.options.minSelect=pt(this.value),t(0,a),t(9,_),t(2,m)}function y(){a.options.maxSelect=pt(this.value),t(0,a),t(9,_),t(2,m)}function S(R){n.$$.not_equal(a.options.cascadeDelete,R)&&(a.options.cascadeDelete=R,t(0,a),t(9,_),t(2,m))}const $=()=>d==null?void 0:d.show();function C(R){n.$$.not_equal(a.options.collectionId,R)&&(a.options.collectionId=R,t(0,a),t(9,_),t(2,m))}function T(R){m=R,t(2,m)}function M(R){a=R,t(0,a),t(9,_),t(2,m)}function O(R){Fe.call(this,n,R)}function D(R){Fe.call(this,n,R)}function I(R){ne[R?"unshift":"push"](()=>{d=R,t(3,d)})}const P=R=>{var N,q;(q=(N=R==null?void 0:R.detail)==null?void 0:N.collection)!=null&&q.id&&R.detail.collection.type!="view"&&t(0,a.options.collectionId=R.detail.collection.id,a)};return n.$$set=R=>{e=qe(qe({},e),Zt(R)),t(8,o=Qe(e,l)),"field"in R&&t(0,a=R.field),"key"in R&&t(1,f=R.key)},n.$$.update=()=>{n.$$.dirty&1024&&t(5,i=r.filter(R=>R.type!="view")),n.$$.dirty&516&&_!=m&&(t(9,_=m),m?(t(0,a.options.minSelect=null,a),t(0,a.options.maxSelect=1,a)):t(0,a.options.maxSelect=null,a)),n.$$.dirty&1&&j.isEmpty(a.options)&&h(),n.$$.dirty&1025&&t(4,s=r.find(R=>R.id==a.options.collectionId)||null)},[a,f,m,d,s,i,u,c,o,_,r,g,y,S,$,C,T,M,O,D,I,P]}class eT extends ve{constructor(e){super(),be(this,e,x$,Q$,me,{field:0,key:1})}}const tT=n=>({dragging:n&4,dragover:n&8}),bd=n=>({dragging:n[2],dragover:n[3]});function nT(n){let e,t,i,s,l;const o=n[10].default,r=Ct(o,n,n[9],bd);return{c(){e=v("div"),r&&r.c(),p(e,"draggable",t=!n[1]),p(e,"class","draggable svelte-28orm4"),X(e,"dragging",n[2]),X(e,"dragover",n[3])},m(a,f){w(a,e,f),r&&r.m(e,null),i=!0,s||(l=[Y(e,"dragover",Xe(n[11])),Y(e,"dragleave",Xe(n[12])),Y(e,"dragend",n[13]),Y(e,"dragstart",n[14]),Y(e,"drop",n[15])],s=!0)},p(a,[f]){r&&r.p&&(!i||f&524)&&Tt(r,o,a,a[9],i?$t(o,a[9],f,tT):Mt(a[9]),bd),(!i||f&2&&t!==(t=!a[1]))&&p(e,"draggable",t),(!i||f&4)&&X(e,"dragging",a[2]),(!i||f&8)&&X(e,"dragover",a[3])},i(a){i||(A(r,a),i=!0)},o(a){L(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),s=!1,Me(l)}}}function iT(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=wt();let{index:o}=e,{list:r=[]}=e,{group:a="default"}=e,{disabled:f=!1}=e,{dragHandleClass:u=""}=e,c=!1,d=!1;function m(C,T){if(!(!C||f)){if(u&&!C.target.classList.contains(u)){t(3,d=!1),t(2,c=!1),C.preventDefault();return}t(2,c=!0),C.dataTransfer.effectAllowed="move",C.dataTransfer.dropEffect="move",C.dataTransfer.setData("text/plain",JSON.stringify({index:T,group:a})),l("drag",C)}}function _(C,T){if(t(3,d=!1),t(2,c=!1),!C||f)return;C.dataTransfer.dropEffect="move";let M={};try{M=JSON.parse(C.dataTransfer.getData("text/plain"))}catch{}if(M.group!=a)return;const O=M.index<<0;O<T?(r.splice(T+1,0,r[O]),r.splice(O,1)):(r.splice(T,0,r[O]),r.splice(O+1,1)),t(6,r),l("sort",{oldIndex Line truncated
`),t=v("code"),t.textContent="username",i=U(` ,
`),s=v("code"),s.textContent="email",l=U(` ,
`),o=v("code"),o.textContent="emailVisibility",r=U(` ,
@@ -88,9 +88,9 @@
`),s=v("code"),s.textContent="id",l=U(` ,
`),o=v("code"),o.textContent="created",r=U(` ,
`),a=v("code"),a.textContent="updated",f=E(),O&&O.c(),u=U(`
.`),c=E(),d=v("div");for(let R=0;R<m.length;R+=1)m[R].c();h=E(),B(g.$$.fragment),y=E(),S=v("hr"),$=E(),B(C.$$.fragment),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","schema-fields")},m(R,N){w(R,e,N),b(e,t),b(t,i),b(t,s),b(t,l),b(t,o),b(t,r),b(t,a),b(t,f),O&&O.m(t,null),b(t,u),w(R,c,N),w(R,d,N);for(let q=0;q<m.length;q+=1)m[q]&&m[q].m(d,null);w(R,h,N),V(g,R,N),w(R,y,N),w(R,S,N),w(R,$,N),V(C,R,N),M=!0},p(R,[N]){R[0].type==="auth"?O||(O=yd(),O.c(),O.m(t,u)):O&&(O.d(1),O=null),N&55&&(D=R[0].schema,ae(),m=vt(m,N,I,1,R,D,_,d,Ht,kd,null,vd),fe());const q={};!T&&N&1&&(T=!0,q.collection=R[0],ge(()=>T=!1)),C.$set(q)},i(R){if(!M){for(let N=0;N<D.length;N+=1)A(m[N]);A(g.$$.fragment,R),A(C.$$.fragment,R),M=!0}},o(R){for(let N=0;N<m.length;N+=1)L(m[N]);L(g.$$.fragment,R),L(C.$$.fragment,R),M=!1},d(R){R&&k(e),O&&O.d(),R&&k(c),R&&k(d);for(let N=0;N<m.length;N+=1)m[N].d();R&&k(h),H(g,R),R&&k(y),R&&k(S),R&&k($),H(C,R)}}}function oT(n,e,t){let i,{collection:s}=e;const l={text:uC,number:_C,bool:vC,email:c1,url:OC,editor:PC,date:GC,select:y$,json:T$,file:B$,relation:eT};function o(C){s.schema[C]&&(s.schema.splice(C,1),t(0,s))}function r(C="text"){const T=z.initSchemaField({name:a(),type:C});T.onMountSelect=!0,s.schema.push(T),t(0,s)}function a(C="field"){let T="";for(;f(C+T);)++T;return C+T}function f(C){var T;return!!((T=s==null?void 0:s.schema)!=null&&T.find(M=>M.name===C))}function u(C){return i.findIndex(T=>T===C)}function c(C,T){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||C===T||!T||t(0,s.indexes=s.indexes.map(O=>z.replaceIndexColumn(O,C,T)),s)}function d(C,T,M,O){M[O]=C,t(0,s)}const m=C=>o(C),_=C=>c(C.detail.oldName,C.detail.newName);function h(C){n.$$.not_equal(s.schema,C)&&(s.schema=C,t(0,s))}const g=C=>{if(!C.detail)return;const T=C.detail.target;T.style.opacity=0,setTimeout(()=>{var M;(M=T==null?void 0:T.style)==null||M.removeProperty("opacity")},0),C.detail.dataTransfer.setDragImage(T,0,0)},y=()=>{xt({})},S=C=>r(C.detail);function $(C){s=C,t(0,s)}return n.$$set=C=>{"collection"in C&&t(0,s=C.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&t(0,s.schema=[],s),n.$$.dirty&1&&(i=s.schema.filter(C=>!C.toDelete)||[])},[s,l,o,r,u,c,d,m,_,h,g,y,S,$]}class rT extends ve{constructor(e){super(),be(this,e,oT,lT,me,{collection:0})}}const aT=n=>({isAdminOnly:n&512}),wd=n=>({isAdminOnly:n[9]}),fT=n=>({isAdminOnly:n&512}),Sd=n=>({isAdminOnly:n[9]}),uT=n=>({isAdminOnly:n&512}),Cd=n=>({isAdminOnly:n[9]});function cT(n){let e,t;return e=new ce({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[pT,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function dT(n){let e;return{c(){e=v("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&k(e)}}}function $d(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=`<i class="ri-lock-line"></i>
.`),c=E(),d=v("div");for(let R=0;R<m.length;R+=1)m[R].c();h=E(),B(g.$$.fragment),y=E(),S=v("hr"),$=E(),B(C.$$.fragment),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","schema-fields")},m(R,N){w(R,e,N),b(e,t),b(t,i),b(t,s),b(t,l),b(t,o),b(t,r),b(t,a),b(t,f),O&&O.m(t,null),b(t,u),w(R,c,N),w(R,d,N);for(let q=0;q<m.length;q+=1)m[q]&&m[q].m(d,null);w(R,h,N),V(g,R,N),w(R,y,N),w(R,S,N),w(R,$,N),V(C,R,N),M=!0},p(R,[N]){R[0].type==="auth"?O||(O=yd(),O.c(),O.m(t,u)):O&&(O.d(1),O=null),N&55&&(D=R[0].schema,ae(),m=vt(m,N,I,1,R,D,_,d,Ht,kd,null,vd),fe());const q={};!T&&N&1&&(T=!0,q.collection=R[0],ge(()=>T=!1)),C.$set(q)},i(R){if(!M){for(let N=0;N<D.length;N+=1)A(m[N]);A(g.$$.fragment,R),A(C.$$.fragment,R),M=!0}},o(R){for(let N=0;N<m.length;N+=1)L(m[N]);L(g.$$.fragment,R),L(C.$$.fragment,R),M=!1},d(R){R&&k(e),O&&O.d(),R&&k(c),R&&k(d);for(let N=0;N<m.length;N+=1)m[N].d();R&&k(h),H(g,R),R&&k(y),R&&k(S),R&&k($),H(C,R)}}}function oT(n,e,t){let i,{collection:s}=e;const l={text:uC,number:_C,bool:vC,email:c1,url:OC,editor:PC,date:GC,select:y$,json:T$,file:B$,relation:eT};function o(C){s.schema[C]&&(s.schema.splice(C,1),t(0,s))}function r(C="text"){const T=j.initSchemaField({name:a(),type:C});T.onMountSelect=!0,s.schema.push(T),t(0,s)}function a(C="field"){let T="";for(;f(C+T);)++T;return C+T}function f(C){var T;return!!((T=s==null?void 0:s.schema)!=null&&T.find(M=>M.name===C))}function u(C){return i.findIndex(T=>T===C)}function c(C,T){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||C===T||!T||t(0,s.indexes=s.indexes.map(O=>j.replaceIndexColumn(O,C,T)),s)}function d(C,T,M,O){M[O]=C,t(0,s)}const m=C=>o(C),_=C=>c(C.detail.oldName,C.detail.newName);function h(C){n.$$.not_equal(s.schema,C)&&(s.schema=C,t(0,s))}const g=C=>{if(!C.detail)return;const T=C.detail.target;T.style.opacity=0,setTimeout(()=>{var M;(M=T==null?void 0:T.style)==null||M.removeProperty("opacity")},0),C.detail.dataTransfer.setDragImage(T,0,0)},y=()=>{xt({})},S=C=>r(C.detail);function $(C){s=C,t(0,s)}return n.$$set=C=>{"collection"in C&&t(0,s=C.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&t(0,s.schema=[],s),n.$$.dirty&1&&(i=s.schema.filter(C=>!C.toDelete)||[])},[s,l,o,r,u,c,d,m,_,h,g,y,S,$]}class rT extends ve{constructor(e){super(),be(this,e,oT,lT,me,{collection:0})}}const aT=n=>({isAdminOnly:n&512}),wd=n=>({isAdminOnly:n[9]}),fT=n=>({isAdminOnly:n&512}),Sd=n=>({isAdminOnly:n[9]}),uT=n=>({isAdminOnly:n&512}),Cd=n=>({isAdminOnly:n[9]});function cT(n){let e,t;return e=new ce({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[pT,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function dT(n){let e;return{c(){e=v("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&k(e)}}}function $d(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-1akuazq")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[11]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function Td(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=`<small class="txt svelte-1akuazq">Unlock and set custom rule</small>
<div class="icon svelte-1akuazq"><i class="ri-lock-unlock-line svelte-1akuazq"></i></div>`,p(e,"type","button"),p(e,"class","unlock-overlay svelte-1akuazq"),p(e,"aria-label","Unlock and set custom rule")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",n[10]),s=!0)},p:ee,i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,Yt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,Yt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function pT(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,f,u,c,d,m,_,h,g,y,S;const $=n[12].beforeLabel,C=Ct($,n,n[15],Cd),T=n[12].afterLabel,M=Ct(T,n,n[15],Sd);let O=!n[9]&&$d(n);function D(q){n[14](q)}var I=n[7];function P(q){let j={id:q[18],baseCollection:q[1],disabled:q[9],placeholder:q[9]?"":q[5]};return q[0]!==void 0&&(j.value=q[0]),{props:j}}I&&(m=Nt(I,P(n)),n[13](m),ne.push(()=>de(m,"value",D)));let F=n[9]&&Td(n);const R=n[12].default,N=Ct(R,n,n[15],wd);return{c(){e=v("div"),t=v("label"),C&&C.c(),i=E(),s=v("span"),l=U(n[2]),o=E(),a=U(r),f=E(),M&&M.c(),u=E(),O&&O.c(),d=E(),m&&B(m.$$.fragment),h=E(),F&&F.c(),g=E(),y=v("div"),N&&N.c(),p(s,"class","txt"),X(s,"txt-hint",n[9]),p(t,"for",c=n[18]),p(e,"class","input-wrapper svelte-1akuazq"),p(y,"class","help-block")},m(q,j){w(q,e,j),b(e,t),C&&C.m(t,null),b(t,i),b(t,s),b(s,l),b(s,o),b(s,a),b(t,f),M&&M.m(t,null),b(t,u),O&&O.m(t,null),b(e,d),m&&V(m,e,null),b(e,h),F&&F.m(e,null),w(q,g,j),w(q,y,j),N&&N.m(y,null),S=!0},p(q,j){C&&C.p&&(!S||j&33280)&&Tt(C,$,q,q[15],S?$t($,q[15],j,uT):Mt(q[15]),Cd),(!S||j&4)&&se(l,q[2]),(!S||j&512)&&r!==(r=q[9]?"- Admins only":"")&&se(a,r),(!S||j&512)&&X(s,"txt-hint",q[9]),M&&M.p&&(!S||j&33280)&&Tt(M,T,q,q[15],S?$t(T,q[15],j,fT):Mt(q[15]),Sd),q[9]?O&&(O.d(1),O=null):O?O.p(q,j):(O=$d(q),O.c(),O.m(t,null)),(!S||j&262144&&c!==(c=q[18]))&&p(t,"for",c);const J={};if(j&262144&&(J.id=q[18]),j&2&&(J.baseCollection=q[1]),j&512&&(J.disabled=q[9]),j&544&&(J.placeholder=q[9]?"":q[5]),!_&&j&1&&(_=!0,J.value=q[0],ge(()=>_=!1)),j&128&&I!==(I=q[7])){if(m){ae();const G=m;L(G.$$.fragment,1,0,()=>{H(G,1)}),fe()}I?(m=Nt(I,P(q)),q[13](m),ne.push(()=>de(m,"value",D)),B(m.$$.fragment),A(m.$$.fragment,1),V(m,e,h)):m=null}else I&&m.$set(J);q[9]?F?(F.p(q,j),j&512&&A(F,1)):(F=Td(q),F.c(),A(F,1),F.m(e,null)):F&&(ae(),L(F,1,1,()=>{F=null}),fe()),N&&N.p&&(!S||j&33280)&&Tt(N,R,q,q[15],S?$t(R,q[15],j,aT):Mt(q[15]),wd)},i(q){S||(A(C,q),A(M,q),m&&A(m.$$.fragment,q),A(F),A(N,q),S=!0)},o(q){L(C,q),L(M,q),m&&L(m.$$.fragment,q),L(F),L(N,q),S=!1},d(q){q&&k(e),C&&C.d(q),M&&M.d(q),O&&O.d(),n[13](null),m&&H(m),F&&F.d(),q&&k(g),q&&k(y),N&&N.d(q)}}}function mT(n){let e,t,i,s;const l=[dT,cT],o=[];function r(a,f){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,f){o[e].m(a,f),w(a,i,f),s=!0},p(a,[f]){let u=e;e=r(a),e===u?o[e].p(a,f):(ae(),L(o[u],1,1,()=>{o[u]=null}),fe(),t=o[e],t?t.p(a,f):(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){L(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}let Md;function hT(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:f="rule"}=e,{required:u=!1}=e,{placeholder:c="Leave empty to grant everyone access..."}=e,d=null,m=null,_=Md,h=!1;g();async function g(){_||h||(t(8,h=!0),t(7,_=(await ot(()=>import("./FilterAutocompleteInput-102d4ee5.js"),["./FilterAutocompleteInput-102d4ee5.js","./index-4841d67b.js"],import.meta.url)).default),Md=_,t(8,h=!1))}async function y(){t(0,r=m||""),await fn(),d==null||d.focus()}async function S(){m=r,t(0,r=null)}function $(T){ne[T?"unshift":"push"](()=>{d=T,t(6,d)})}function C(T){r=T,t(0,r)}return n.$$set=T=>{"collection"in T&&t(1,o=T.collection),"rule"in T&&t(0,r=T.rule),"label"in T&&t(2,a=T.label),"formKey"in T&&t(3,f=T.formKey),"required"in T&&t(4,u=T.required),"placeholder"in T&&t(5,c=T.placeholder),"$$scope"in T&&t(15,l=T.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,f,u,c,d,_,h,i,y,S,s,$,C,l]}class Ss extends ve{constructor(e){super(),be(this,e,hT,mT,me,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Ed(n,e,t){const i=n.slice();return i[11]=e[t],i}function Od(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I=n[2],P=[];for(let F=0;F<I.length;F+=1)P[F]=Dd(Ed(n,I,F));return{c(){e=v("div"),t=v("div"),i=v("div"),s=v("p"),s.textContent="The following record fields are available:",l=E(),o=v("div");for(let F=0;F<P.length;F+=1)P[F].c();r=E(),a=v("hr"),f=E(),u=v("p"),u.innerHTML="The request fields could be accessed with the special <em>@request</em> filter:",c=E(),d=v("div"),d.innerHTML=`<code>@request.headers.*</code>
<div class="icon svelte-1akuazq"><i class="ri-lock-unlock-line svelte-1akuazq"></i></div>`,p(e,"type","button"),p(e,"class","unlock-overlay svelte-1akuazq"),p(e,"aria-label","Unlock and set custom rule")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",n[10]),s=!0)},p:ee,i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,Yt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,Yt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function pT(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,f,u,c,d,m,_,h,g,y,S;const $=n[12].beforeLabel,C=Ct($,n,n[15],Cd),T=n[12].afterLabel,M=Ct(T,n,n[15],Sd);let O=!n[9]&&$d(n);function D(q){n[14](q)}var I=n[7];function P(q){let z={id:q[18],baseCollection:q[1],disabled:q[9],placeholder:q[9]?"":q[5]};return q[0]!==void 0&&(z.value=q[0]),{props:z}}I&&(m=Nt(I,P(n)),n[13](m),ne.push(()=>de(m,"value",D)));let F=n[9]&&Td(n);const R=n[12].default,N=Ct(R,n,n[15],wd);return{c(){e=v("div"),t=v("label"),C&&C.c(),i=E(),s=v("span"),l=U(n[2]),o=E(),a=U(r),f=E(),M&&M.c(),u=E(),O&&O.c(),d=E(),m&&B(m.$$.fragment),h=E(),F&&F.c(),g=E(),y=v("div"),N&&N.c(),p(s,"class","txt"),X(s,"txt-hint",n[9]),p(t,"for",c=n[18]),p(e,"class","input-wrapper svelte-1akuazq"),p(y,"class","help-block")},m(q,z){w(q,e,z),b(e,t),C&&C.m(t,null),b(t,i),b(t,s),b(s,l),b(s,o),b(s,a),b(t,f),M&&M.m(t,null),b(t,u),O&&O.m(t,null),b(e,d),m&&V(m,e,null),b(e,h),F&&F.m(e,null),w(q,g,z),w(q,y,z),N&&N.m(y,null),S=!0},p(q,z){C&&C.p&&(!S||z&33280)&&Tt(C,$,q,q[15],S?$t($,q[15],z,uT):Mt(q[15]),Cd),(!S||z&4)&&se(l,q[2]),(!S||z&512)&&r!==(r=q[9]?"- Admins only":"")&&se(a,r),(!S||z&512)&&X(s,"txt-hint",q[9]),M&&M.p&&(!S||z&33280)&&Tt(M,T,q,q[15],S?$t(T,q[15],z,fT):Mt(q[15]),Sd),q[9]?O&&(O.d(1),O=null):O?O.p(q,z):(O=$d(q),O.c(),O.m(t,null)),(!S||z&262144&&c!==(c=q[18]))&&p(t,"for",c);const J={};if(z&262144&&(J.id=q[18]),z&2&&(J.baseCollection=q[1]),z&512&&(J.disabled=q[9]),z&544&&(J.placeholder=q[9]?"":q[5]),!_&&z&1&&(_=!0,J.value=q[0],ge(()=>_=!1)),z&128&&I!==(I=q[7])){if(m){ae();const G=m;L(G.$$.fragment,1,0,()=>{H(G,1)}),fe()}I?(m=Nt(I,P(q)),q[13](m),ne.push(()=>de(m,"value",D)),B(m.$$.fragment),A(m.$$.fragment,1),V(m,e,h)):m=null}else I&&m.$set(J);q[9]?F?(F.p(q,z),z&512&&A(F,1)):(F=Td(q),F.c(),A(F,1),F.m(e,null)):F&&(ae(),L(F,1,1,()=>{F=null}),fe()),N&&N.p&&(!S||z&33280)&&Tt(N,R,q,q[15],S?$t(R,q[15],z,aT):Mt(q[15]),wd)},i(q){S||(A(C,q),A(M,q),m&&A(m.$$.fragment,q),A(F),A(N,q),S=!0)},o(q){L(C,q),L(M,q),m&&L(m.$$.fragment,q),L(F),L(N,q),S=!1},d(q){q&&k(e),C&&C.d(q),M&&M.d(q),O&&O.d(),n[13](null),m&&H(m),F&&F.d(),q&&k(g),q&&k(y),N&&N.d(q)}}}function mT(n){let e,t,i,s;const l=[dT,cT],o=[];function r(a,f){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,f){o[e].m(a,f),w(a,i,f),s=!0},p(a,[f]){let u=e;e=r(a),e===u?o[e].p(a,f):(ae(),L(o[u],1,1,()=>{o[u]=null}),fe(),t=o[e],t?t.p(a,f):(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){L(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}let Md;function hT(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:f="rule"}=e,{required:u=!1}=e,{placeholder:c="Leave empty to grant everyone access..."}=e,d=null,m=null,_=Md,h=!1;g();async function g(){_||h||(t(8,h=!0),t(7,_=(await ot(()=>import("./FilterAutocompleteInput-14f3595a.js"),["./FilterAutocompleteInput-14f3595a.js","./index-4841d67b.js"],import.meta.url)).default),Md=_,t(8,h=!1))}async function y(){t(0,r=m||""),await fn(),d==null||d.focus()}async function S(){m=r,t(0,r=null)}function $(T){ne[T?"unshift":"push"](()=>{d=T,t(6,d)})}function C(T){r=T,t(0,r)}return n.$$set=T=>{"collection"in T&&t(1,o=T.collection),"rule"in T&&t(0,r=T.rule),"label"in T&&t(2,a=T.label),"formKey"in T&&t(3,f=T.formKey),"required"in T&&t(4,u=T.required),"placeholder"in T&&t(5,c=T.placeholder),"$$scope"in T&&t(15,l=T.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,f,u,c,d,_,h,i,y,S,s,$,C,l]}class Ss extends ve{constructor(e){super(),be(this,e,hT,mT,me,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Ed(n,e,t){const i=n.slice();return i[11]=e[t],i}function Od(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I=n[2],P=[];for(let F=0;F<I.length;F+=1)P[F]=Dd(Ed(n,I,F));return{c(){e=v("div"),t=v("div"),i=v("div"),s=v("p"),s.textContent="The following record fields are available:",l=E(),o=v("div");for(let F=0;F<P.length;F+=1)P[F].c();r=E(),a=v("hr"),f=E(),u=v("p"),u.innerHTML="The request fields could be accessed with the special <em>@request</em> filter:",c=E(),d=v("div"),d.innerHTML=`<code>@request.headers.*</code>
<code>@request.query.*</code>
<code>@request.data.*</code>
<code>@request.auth.*</code>`,m=E(),_=v("hr"),h=E(),g=v("p"),g.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",y=E(),S=v("div"),S.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",$=E(),C=v("hr"),T=E(),M=v("p"),M.innerHTML=`Example rule:
@@ -99,26 +99,26 @@
changing the password without requiring to enter the old one, directly updating the verified
state or email, etc.`,t=E(),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){w(s,e,l),w(s,t,l),w(s,i,l)},p:ee,d(s){s&&k(e),s&&k(t),s&&k(i)}}}function bT(n){var R,N;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,f,u,c,d,m,_,h,g,y,S,$,C,T=n[1]&&Od(n);function M(q){n[4](q)}let O={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(O.rule=n[0].listRule),u=new Ss({props:O}),ne.push(()=>de(u,"rule",M));function D(q){n[5](q)}let I={label:"View rule",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(I.rule=n[0].viewRule),m=new Ss({props:I}),ne.push(()=>de(m,"rule",D));let P=((R=n[0])==null?void 0:R.type)!=="view"&&Ad(n),F=((N=n[0])==null?void 0:N.type)==="auth"&&Ld(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=E(),l=v("button"),r=U(o),a=E(),T&&T.c(),f=E(),B(u.$$.fragment),d=E(),B(m.$$.fragment),h=E(),P&&P.c(),g=E(),F&&F.c(),y=ye(),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-sm handle")},m(q,j){w(q,e,j),b(e,t),b(t,i),b(t,s),b(t,l),b(l,r),b(e,a),T&&T.m(e,null),w(q,f,j),V(u,q,j),w(q,d,j),V(m,q,j),w(q,h,j),P&&P.m(q,j),w(q,g,j),F&&F.m(q,j),w(q,y,j),S=!0,$||(C=Y(l,"click",n[3]),$=!0)},p(q,[j]){var Q,K;(!S||j&2)&&o!==(o=q[1]?"Hide available fields":"Show available fields")&&se(r,o),q[1]?T?(T.p(q,j),j&2&&A(T,1)):(T=Od(q),T.c(),A(T,1),T.m(e,null)):T&&(ae(),L(T,1,1,()=>{T=null}),fe());const J={};j&1&&(J.collection=q[0]),!c&&j&1&&(c=!0,J.rule=q[0].listRule,ge(()=>c=!1)),u.$set(J);const G={};j&1&&(G.collection=q[0]),!_&&j&1&&(_=!0,G.rule=q[0].viewRule,ge(()=>_=!1)),m.$set(G),((Q=q[0])==null?void 0:Q.type)!=="view"?P?(P.p(q,j),j&1&&A(P,1)):(P=Ad(q),P.c(),A(P,1),P.m(g.parentNode,g)):P&&(ae(),L(P,1,1,()=>{P=null}),fe()),((K=q[0])==null?void 0:K.type)==="auth"?F?(F.p(q,j),j&1&&A(F,1)):(F=Ld(q),F.c(),A(F,1),F.m(y.parentNode,y)):F&&(ae(),L(F,1,1,()=>{F=null}),fe())},i(q){S||(A(T),A(u.$$.fragment,q),A(m.$$.fragment,q),A(P),A(F),S=!0)},o(q){L(T),L(u.$$.fragment,q),L(m.$$.fragment,q),L(P),L(F),S=!1},d(q){q&&k(e),T&&T.d(),q&&k(f),H(u,q),q&&k(d),H(m,q),q&&k(h),P&&P.d(q),q&&k(g),F&&F.d(q),q&&k(y),$=!1,C()}}}function vT(n,e,t){let i,{collection:s}=e,l=!1;const o=()=>t(1,l=!l);function r(m){n.$$.not_equal(s.listRule,m)&&(s.listRule=m,t(0,s))}function a(m){n.$$.not_equal(s.viewRule,m)&&(s.viewRule=m,t(0,s))}function f(m){n.$$.not_equal(s.createRule,m)&&(s.createRule=m,t(0,s))}function u(m){n.$$.not_equal(s.updateRule,m)&&(s.updateRule=m,t(0,s))}function c(m){n.$$.not_equal(s.deleteRule,m)&&(s.deleteRule=m,t(0,s))}function d(m){n.$$.not_equal(s.options.manageRule,m)&&(s.options.manageRule=m,t(0,s))}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=z.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,f,u,c,d]}class yT extends ve{constructor(e){super(),be(this,e,vT,bT,me,{collection:0})}}function Pd(n,e,t){const i=n.slice();return i[9]=e[t],i}function kT(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a){let f={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql-select",minHeight:"150"};return a[0].options.query!==void 0&&(f.value=a[0].options.query),{props:f}}return o&&(e=Nt(o,r(n)),ne.push(()=>de(e,"value",l)),e.$on("change",n[6])),{c(){e&&B(e.$$.fragment),i=ye()},m(a,f){e&&V(e,a,f),w(a,i,f),s=!0},p(a,f){const u={};if(f&256&&(u.id=a[8]),!t&&f&1&&(t=!0,u.value=a[0].options.query,ge(()=>t=!1)),f&2&&o!==(o=a[1])){if(e){ae();const c=e;L(c.$$.fragment,1,0,()=>{H(c,1)}),fe()}o?(e=Nt(o,r(a)),ne.push(()=>de(e,"value",l)),e.$on("change",a[6]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else o&&e.$set(u)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&L(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&H(e,a)}}}function wT(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){w(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&k(e)}}}function Fd(n){let e,t,i=n[3],s=[];for(let l=0;l<i.length;l+=1)s[l]=Nd(Pd(n,i,l));return{c(){e=v("div"),t=v("div");for(let l=0;l<s.length;l+=1)s[l].c();p(t,"class","content"),p(e,"class","help-block help-block-error")},m(l,o){w(l,e,o),b(e,t);for(let r=0;r<s.length;r+=1)s[r]&&s[r].m(t,null)},p(l,o){if(o&8){i=l[3];let r;for(r=0;r<i.length;r+=1){const a=Pd(l,i,r);s[r]?s[r].p(a,o):(s[r]=Nd(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(l){l&&k(e),_t(s,l)}}}function Nd(n){let e,t=n[9]+"",i;return{c(){e=v("p"),i=U(t)},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&8&&t!==(t=s[9]+"")&&se(i,t)},d(s){s&&k(e)}}}function ST(n){let e,t,i,s,l,o,r,a,f,u,c;const d=[wT,kT],m=[];function _(g,y){return g[2]?0:1}l=_(n),o=m[l]=d[l](n);let h=n[3].length&&Fd(n);return{c(){e=v("label"),t=v("span"),t.textContent="Select query",s=E(),o.c(),r=E(),a=v("div"),a.innerHTML=`<ul><li>Wildcard columns (<code>*</code>) are not supported.</li>
</a>.`,s=E(),l=v("button"),r=U(o),a=E(),T&&T.c(),f=E(),B(u.$$.fragment),d=E(),B(m.$$.fragment),h=E(),P&&P.c(),g=E(),F&&F.c(),y=ye(),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-sm handle")},m(q,z){w(q,e,z),b(e,t),b(t,i),b(t,s),b(t,l),b(l,r),b(e,a),T&&T.m(e,null),w(q,f,z),V(u,q,z),w(q,d,z),V(m,q,z),w(q,h,z),P&&P.m(q,z),w(q,g,z),F&&F.m(q,z),w(q,y,z),S=!0,$||(C=Y(l,"click",n[3]),$=!0)},p(q,[z]){var Q,K;(!S||z&2)&&o!==(o=q[1]?"Hide available fields":"Show available fields")&&se(r,o),q[1]?T?(T.p(q,z),z&2&&A(T,1)):(T=Od(q),T.c(),A(T,1),T.m(e,null)):T&&(ae(),L(T,1,1,()=>{T=null}),fe());const J={};z&1&&(J.collection=q[0]),!c&&z&1&&(c=!0,J.rule=q[0].listRule,ge(()=>c=!1)),u.$set(J);const G={};z&1&&(G.collection=q[0]),!_&&z&1&&(_=!0,G.rule=q[0].viewRule,ge(()=>_=!1)),m.$set(G),((Q=q[0])==null?void 0:Q.type)!=="view"?P?(P.p(q,z),z&1&&A(P,1)):(P=Ad(q),P.c(),A(P,1),P.m(g.parentNode,g)):P&&(ae(),L(P,1,1,()=>{P=null}),fe()),((K=q[0])==null?void 0:K.type)==="auth"?F?(F.p(q,z),z&1&&A(F,1)):(F=Ld(q),F.c(),A(F,1),F.m(y.parentNode,y)):F&&(ae(),L(F,1,1,()=>{F=null}),fe())},i(q){S||(A(T),A(u.$$.fragment,q),A(m.$$.fragment,q),A(P),A(F),S=!0)},o(q){L(T),L(u.$$.fragment,q),L(m.$$.fragment,q),L(P),L(F),S=!1},d(q){q&&k(e),T&&T.d(),q&&k(f),H(u,q),q&&k(d),H(m,q),q&&k(h),P&&P.d(q),q&&k(g),F&&F.d(q),q&&k(y),$=!1,C()}}}function vT(n,e,t){let i,{collection:s}=e,l=!1;const o=()=>t(1,l=!l);function r(m){n.$$.not_equal(s.listRule,m)&&(s.listRule=m,t(0,s))}function a(m){n.$$.not_equal(s.viewRule,m)&&(s.viewRule=m,t(0,s))}function f(m){n.$$.not_equal(s.createRule,m)&&(s.createRule=m,t(0,s))}function u(m){n.$$.not_equal(s.updateRule,m)&&(s.updateRule=m,t(0,s))}function c(m){n.$$.not_equal(s.deleteRule,m)&&(s.deleteRule=m,t(0,s))}function d(m){n.$$.not_equal(s.options.manageRule,m)&&(s.options.manageRule=m,t(0,s))}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=j.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,f,u,c,d]}class yT extends ve{constructor(e){super(),be(this,e,vT,bT,me,{collection:0})}}function Pd(n,e,t){const i=n.slice();return i[9]=e[t],i}function kT(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a){let f={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql-select",minHeight:"150"};return a[0].options.query!==void 0&&(f.value=a[0].options.query),{props:f}}return o&&(e=Nt(o,r(n)),ne.push(()=>de(e,"value",l)),e.$on("change",n[6])),{c(){e&&B(e.$$.fragment),i=ye()},m(a,f){e&&V(e,a,f),w(a,i,f),s=!0},p(a,f){const u={};if(f&256&&(u.id=a[8]),!t&&f&1&&(t=!0,u.value=a[0].options.query,ge(()=>t=!1)),f&2&&o!==(o=a[1])){if(e){ae();const c=e;L(c.$$.fragment,1,0,()=>{H(c,1)}),fe()}o?(e=Nt(o,r(a)),ne.push(()=>de(e,"value",l)),e.$on("change",a[6]),B(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else o&&e.$set(u)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&L(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&H(e,a)}}}function wT(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){w(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&k(e)}}}function Fd(n){let e,t,i=n[3],s=[];for(let l=0;l<i.length;l+=1)s[l]=Nd(Pd(n,i,l));return{c(){e=v("div"),t=v("div");for(let l=0;l<s.length;l+=1)s[l].c();p(t,"class","content"),p(e,"class","help-block help-block-error")},m(l,o){w(l,e,o),b(e,t);for(let r=0;r<s.length;r+=1)s[r]&&s[r].m(t,null)},p(l,o){if(o&8){i=l[3];let r;for(r=0;r<i.length;r+=1){const a=Pd(l,i,r);s[r]?s[r].p(a,o):(s[r]=Nd(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(l){l&&k(e),_t(s,l)}}}function Nd(n){let e,t=n[9]+"",i;return{c(){e=v("p"),i=U(t)},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&8&&t!==(t=s[9]+"")&&se(i,t)},d(s){s&&k(e)}}}function ST(n){let e,t,i,s,l,o,r,a,f,u,c;const d=[wT,kT],m=[];function _(g,y){return g[2]?0:1}l=_(n),o=m[l]=d[l](n);let h=n[3].length&&Fd(n);return{c(){e=v("label"),t=v("span"),t.textContent="Select query",s=E(),o.c(),r=E(),a=v("div"),a.innerHTML=`<ul><li>Wildcard columns (<code>*</code>) are not supported.</li>
<li>The query must have a unique <code>id</code> column.
<br/>
If your query doesn&#39;t have a suitable one, you can use the universal
<code>(ROW_NUMBER() OVER()) as id</code>.</li>
<li>Expressions must be aliased with a valid formatted field name (eg.
<code>MAX(balance) as maxBalance</code>).</li></ul>`,f=E(),h&&h.c(),u=ye(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(g,y){w(g,e,y),b(e,t),w(g,s,y),m[l].m(g,y),w(g,r,y),w(g,a,y),w(g,f,y),h&&h.m(g,y),w(g,u,y),c=!0},p(g,y){(!c||y&256&&i!==(i=g[8]))&&p(e,"for",i);let S=l;l=_(g),l===S?m[l].p(g,y):(ae(),L(m[S],1,1,()=>{m[S]=null}),fe(),o=m[l],o?o.p(g,y):(o=m[l]=d[l](g),o.c()),A(o,1),o.m(r.parentNode,r)),g[3].length?h?h.p(g,y):(h=Fd(g),h.c(),h.m(u.parentNode,u)):h&&(h.d(1),h=null)},i(g){c||(A(o),c=!0)},o(g){L(o),c=!1},d(g){g&&k(e),g&&k(s),m[l].d(g),g&&k(r),g&&k(a),g&&k(f),h&&h.d(g),g&&k(u)}}}function CT(n){let e,t;return e=new ce({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[ST,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function $T(n,e,t){let i;We(n,Ci,c=>t(4,i=c));let{collection:s}=e,l,o=!1,r=[];function a(c){var _;t(3,r=[]);const d=z.getNestedVal(c,"schema",null);if(z.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const m=z.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);z.removeByValue(m,"id"),z.removeByValue(m,"created"),z.removeByValue(m,"updated");for(let h in d)for(let g in d[h]){const y=d[h][g].message,S=m[h]||h;r.push(z.sentenize(S+": "+y))}}Gt(async()=>{t(2,o=!0);try{t(1,l=(await ot(()=>import("./CodeEditor-0a0fa5f0.js"),["./CodeEditor-0a0fa5f0.js","./index-4841d67b.js"],import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function f(c){n.$$.not_equal(s.options.query,c)&&(s.options.query=c,t(0,s))}const u=()=>{r.length&&ci("schema")};return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,f,u]}class TT extends ve{constructor(e){super(),be(this,e,$T,CT,me,{collection:0})}}const MT=n=>({active:n&1}),Rd=n=>({active:n[0]});function qd(n){let e,t,i;const s=n[15].default,l=Ct(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){w(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Tt(l,s,o,o[14],i?$t(s,o[14],r,null):Mt(o[14]),null)},i(o){i||(A(l,o),o&&Ge(()=>{i&&(t||(t=Re(e,tt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){L(l,o),o&&(t||(t=Re(e,tt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),o&&t&&t.end()}}}function ET(n){let e,t,i,s,l,o,r;const a=n[15].header,f=Ct(a,n,n[14],Rd);let u=n[0]&&qd(n);return{c(){e=v("div"),t=v("button"),f&&f.c(),i=E(),u&&u.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),X(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),X(e,"active",n[0])},m(c,d){w(c,e,d),b(e,t),f&&f.m(t,null),b(e,i),u&&u.m(e,null),n[22](e),l=!0,o||(r=[Y(t,"click",Xe(n[17])),Y(t,"drop",Xe(n[18])),Y(t,"dragstart",n[19]),Y(t,"dragenter",n[20]),Y(t,"dragleave",n[21]),Y(t,"dragover",Xe(n[16]))],o=!0)},p(c,[d]){f&&f.p&&(!l||d&16385)&&Tt(f,a,c,c[14],l?$t(a,c[14],d,MT):Mt(c[14]),Rd),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&X(t,"interactive",c[3]),c[0]?u?(u.p(c,d),d&1&&A(u,1)):(u=qd(c),u.c(),A(u,1),u.m(e,null)):u&&(ae(),L(u,1,1,()=>{u=null}),fe()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&X(e,"active",c[0])},i(c){l||(A(f,c),A(u),l=!0)},o(c){L(f,c),L(u),l=!1},d(c){c&&k(e),f&&f.d(c),u&&u.d(),n[22](null),o=!1,Me(r)}}}function OT(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=wt();let o,r,{class:a=""}=e,{draggable:f=!1}=e,{active:u=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,m=!1;function _(){return!!u}function h(){S(),t(0,u=!0),l("expand")}function g(){t(0,u=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),u?g():h()}function S(){if(d&&o.closest(".accordions")){const P=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const F of P)F.click()}}Gt(()=>()=>clearTimeout(r));function $(P){Fe.call(this,n,P)}const C=()=>c&&y(),T=P=>{f&&(t(7,m=!1),S(),l("drop",P))},M=P=>f&&l("dragstart",P),O=P=>{f&&(t(7,m=!0),l("dragenter",P))},D=P=>{f&&(t(7,m=!1),l("dragleave",P))};function I(P){ne[P?"unshift":"push"](()=>{o=P,t(6,o)})}return n.$$set=P=>{"class"in P&&t(1,a=P.class),"draggable"in P&&t(2,f=P.draggable),"active"in P&&t(0,u=P.active),"interactive"in P&&t(3,c=P.interactive),"single"in P&&t(9,d=P.single),"$$scope"in P&&t(14,s=P.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&u&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[u,a,f,c,y,S,o,m,l,d,_,h,g,r,s,i,$,C,T,M,O,D,I]}class ro extends ve{constructor(e){super(),be(this,e,OT,ET,me,{class:1,draggable:2,active:0,interactive:3,single:9,isExpandedLine truncated
<span class="txt">Username/Password</span>`,t=E(),i=v("div"),s=E(),f.c(),l=E(),u&&u.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){w(c,e,d),w(c,t,d),w(c,i,d),w(c,s,d),f.m(c,d),w(c,l,d),u&&u.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(f.d(1),f=a(c),f&&(f.c(),f.m(l.parentNode,l))),c[3]?u?d&8&&A(u,1):(u=jd(),u.c(),A(u,1),u.m(o.parentNode,o)):u&&(ae(),L(u,1,1,()=>{u=null}),fe())},d(c){c&&k(e),c&&k(t),c&&k(i),c&&k(s),f.d(c),c&&k(l),u&&u.d(c),c&&k(o)}}}function FT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(f,u){w(f,e,u),e.checked=n[0].options.allowEmailAuth,w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[6]),r=!0)},p(f,u){u&4096&&t!==(t=f[12])&&p(e,"id",t),u&1&&(e.checked=f[0].options.allowEmailAuth),u&4096&&o!==(o=f[12])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function zd(n){let e,t,i,s,l,o,r,a;return i=new ce({props:{class:"form-field "+(z.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[NT,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field "+(z.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[RT,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),B(i.$$.fragment),s=E(),l=v("div"),B(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(f,u){w(f,e,u),b(e,t),V(i,t,null),b(e,s),b(e,l),V(o,l,null),a=!0},p(f,u){const c={};u&1&&(c.class="form-field "+(z.isEmpty(f[0].options.onlyEmailDomains)?"":"disabled")),u&12289&&(c.$$scope={dirty:u,ctx:f}),i.$set(c);const d={};u&1&&(d.class="form-field "+(z.isEmpty(f[0].options.exceptEmailDomains)?"":"disabled")),u&12289&&(d.$$scope={dirty:u,ctx:f}),o.$set(d)},i(f){a||(A(i.$$.fragment,f),A(o.$$.fragment,f),f&&Ge(()=>{a&&(r||(r=Re(e,tt,{duration:150},!0)),r.run(1))}),a=!0)},o(f){L(i.$$.fragment,f),L(o.$$.fragment,f),f&&(r||(r=Re(e,tt,{duration:150},!1)),r.run(0)),a=!1},d(f){f&&k(e),H(i),H(o),f&&r&&r.end()}}}function NT(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;function _(g){n[7](g)}let h={id:n[12],disabled:!z.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(h.value=n[0].options.exceptEmailDomains),r=new Fs({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),B(r.$$.fragment),f=E(),u=v("div"),u.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(u,"class","help-block")},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),w(g,o,y),V(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Ce(ze.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(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=g[12]),y&1&&(S.disabled=!z.isEmpty(g[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.exceptEmailDomains,ge(()=>a=!1)),r.$set(S)},i(g){c||(A(r.$$.fragment,g),c=!0)},o(g){L(r.$$.fragment,g),c=!1},d(g){g&&k(e),g&&k(o),H(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function RT(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;function _(g){n[8](g)}let h={id:n[12],disabled:!z.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(h.value=n[0].options.onlyEmailDomains),r=new Fs({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),B(r.$$.fragment),f=E(),u=v("div"),u.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(u,"class","help-block")},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),w(g,o,y),V(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Ce(ze.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(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=g[12]),y&1&&(S.disabled=!z.isEmpty(g[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.onlyEmailDomains,ge(()=>a=!1)),r.$set(S)},i(g){c||(A(r.$$.fragment,g),c=!0)},o(g){L(r.$$.fragment,g),c=!1},d(g){g&&k(e),g&&k(o),H(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function qT(n){let e,t,i,s;e=new ce({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[FT,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&zd(n);return{c(){B(e.$$.fragment),t=E(),l&&l.c(),i=ye()},m(o,r){V(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&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=zd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),L(l,1,1,()=>{l=null}),fe())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){H(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function jT(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function zT(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Vd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(ze.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function VT(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowEmailAuth?zT:jT}let a=r(n),f=a(n),u=n[2]&&Vd();return{c(){e=v("div"),e.innerHTML=`<i class="ri-mail-star-line"></i>
<code>MAX(balance) as maxBalance</code>).</li></ul>`,f=E(),h&&h.c(),u=ye(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(g,y){w(g,e,y),b(e,t),w(g,s,y),m[l].m(g,y),w(g,r,y),w(g,a,y),w(g,f,y),h&&h.m(g,y),w(g,u,y),c=!0},p(g,y){(!c||y&256&&i!==(i=g[8]))&&p(e,"for",i);let S=l;l=_(g),l===S?m[l].p(g,y):(ae(),L(m[S],1,1,()=>{m[S]=null}),fe(),o=m[l],o?o.p(g,y):(o=m[l]=d[l](g),o.c()),A(o,1),o.m(r.parentNode,r)),g[3].length?h?h.p(g,y):(h=Fd(g),h.c(),h.m(u.parentNode,u)):h&&(h.d(1),h=null)},i(g){c||(A(o),c=!0)},o(g){L(o),c=!1},d(g){g&&k(e),g&&k(s),m[l].d(g),g&&k(r),g&&k(a),g&&k(f),h&&h.d(g),g&&k(u)}}}function CT(n){let e,t;return e=new ce({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[ST,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function $T(n,e,t){let i;We(n,Ci,c=>t(4,i=c));let{collection:s}=e,l,o=!1,r=[];function a(c){var _;t(3,r=[]);const d=j.getNestedVal(c,"schema",null);if(j.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const m=j.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);j.removeByValue(m,"id"),j.removeByValue(m,"created"),j.removeByValue(m,"updated");for(let h in d)for(let g in d[h]){const y=d[h][g].message,S=m[h]||h;r.push(j.sentenize(S+": "+y))}}Gt(async()=>{t(2,o=!0);try{t(1,l=(await ot(()=>import("./CodeEditor-5a011c38.js"),["./CodeEditor-5a011c38.js","./index-4841d67b.js"],import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function f(c){n.$$.not_equal(s.options.query,c)&&(s.options.query=c,t(0,s))}const u=()=>{r.length&&ci("schema")};return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,f,u]}class TT extends ve{constructor(e){super(),be(this,e,$T,CT,me,{collection:0})}}const MT=n=>({active:n&1}),Rd=n=>({active:n[0]});function qd(n){let e,t,i;const s=n[15].default,l=Ct(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){w(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Tt(l,s,o,o[14],i?$t(s,o[14],r,null):Mt(o[14]),null)},i(o){i||(A(l,o),o&&Ge(()=>{i&&(t||(t=Re(e,tt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){L(l,o),o&&(t||(t=Re(e,tt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),o&&t&&t.end()}}}function ET(n){let e,t,i,s,l,o,r;const a=n[15].header,f=Ct(a,n,n[14],Rd);let u=n[0]&&qd(n);return{c(){e=v("div"),t=v("button"),f&&f.c(),i=E(),u&&u.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),X(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),X(e,"active",n[0])},m(c,d){w(c,e,d),b(e,t),f&&f.m(t,null),b(e,i),u&&u.m(e,null),n[22](e),l=!0,o||(r=[Y(t,"click",Xe(n[17])),Y(t,"drop",Xe(n[18])),Y(t,"dragstart",n[19]),Y(t,"dragenter",n[20]),Y(t,"dragleave",n[21]),Y(t,"dragover",Xe(n[16]))],o=!0)},p(c,[d]){f&&f.p&&(!l||d&16385)&&Tt(f,a,c,c[14],l?$t(a,c[14],d,MT):Mt(c[14]),Rd),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&X(t,"interactive",c[3]),c[0]?u?(u.p(c,d),d&1&&A(u,1)):(u=qd(c),u.c(),A(u,1),u.m(e,null)):u&&(ae(),L(u,1,1,()=>{u=null}),fe()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&X(e,"active",c[0])},i(c){l||(A(f,c),A(u),l=!0)},o(c){L(f,c),L(u),l=!1},d(c){c&&k(e),f&&f.d(c),u&&u.d(),n[22](null),o=!1,Me(r)}}}function OT(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=wt();let o,r,{class:a=""}=e,{draggable:f=!1}=e,{active:u=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,m=!1;function _(){return!!u}function h(){S(),t(0,u=!0),l("expand")}function g(){t(0,u=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),u?g():h()}function S(){if(d&&o.closest(".accordions")){const P=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const F of P)F.click()}}Gt(()=>()=>clearTimeout(r));function $(P){Fe.call(this,n,P)}const C=()=>c&&y(),T=P=>{f&&(t(7,m=!1),S(),l("drop",P))},M=P=>f&&l("dragstart",P),O=P=>{f&&(t(7,m=!0),l("dragenter",P))},D=P=>{f&&(t(7,m=!1),l("dragleave",P))};function I(P){ne[P?"unshift":"push"](()=>{o=P,t(6,o)})}return n.$$set=P=>{"class"in P&&t(1,a=P.class),"draggable"in P&&t(2,f=P.draggable),"active"in P&&t(0,u=P.active),"interactive"in P&&t(3,c=P.interactive),"single"in P&&t(9,d=P.single),"$$scope"in P&&t(14,s=P.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&u&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[u,a,f,c,y,S,o,m,l,d,_,h,g,r,s,i,$,C,T,M,O,D,I]}class ro extends ve{constructor(e){super(),be(this,e,OT,ET,me,{class:1,draggable:2,active:0,interactive:3,single:9,isExpandedLine truncated
<span class="txt">Username/Password</span>`,t=E(),i=v("div"),s=E(),f.c(),l=E(),u&&u.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){w(c,e,d),w(c,t,d),w(c,i,d),w(c,s,d),f.m(c,d),w(c,l,d),u&&u.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(f.d(1),f=a(c),f&&(f.c(),f.m(l.parentNode,l))),c[3]?u?d&8&&A(u,1):(u=jd(),u.c(),A(u,1),u.m(o.parentNode,o)):u&&(ae(),L(u,1,1,()=>{u=null}),fe())},d(c){c&&k(e),c&&k(t),c&&k(i),c&&k(s),f.d(c),c&&k(l),u&&u.d(c),c&&k(o)}}}function FT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(f,u){w(f,e,u),e.checked=n[0].options.allowEmailAuth,w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[6]),r=!0)},p(f,u){u&4096&&t!==(t=f[12])&&p(e,"id",t),u&1&&(e.checked=f[0].options.allowEmailAuth),u&4096&&o!==(o=f[12])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function zd(n){let e,t,i,s,l,o,r,a;return i=new ce({props:{class:"form-field "+(j.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[NT,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field "+(j.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[RT,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),B(i.$$.fragment),s=E(),l=v("div"),B(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(f,u){w(f,e,u),b(e,t),V(i,t,null),b(e,s),b(e,l),V(o,l,null),a=!0},p(f,u){const c={};u&1&&(c.class="form-field "+(j.isEmpty(f[0].options.onlyEmailDomains)?"":"disabled")),u&12289&&(c.$$scope={dirty:u,ctx:f}),i.$set(c);const d={};u&1&&(d.class="form-field "+(j.isEmpty(f[0].options.exceptEmailDomains)?"":"disabled")),u&12289&&(d.$$scope={dirty:u,ctx:f}),o.$set(d)},i(f){a||(A(i.$$.fragment,f),A(o.$$.fragment,f),f&&Ge(()=>{a&&(r||(r=Re(e,tt,{duration:150},!0)),r.run(1))}),a=!0)},o(f){L(i.$$.fragment,f),L(o.$$.fragment,f),f&&(r||(r=Re(e,tt,{duration:150},!1)),r.run(0)),a=!1},d(f){f&&k(e),H(i),H(o),f&&r&&r.end()}}}function NT(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;function _(g){n[7](g)}let h={id:n[12],disabled:!j.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(h.value=n[0].options.exceptEmailDomains),r=new Fs({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),B(r.$$.fragment),f=E(),u=v("div"),u.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(u,"class","help-block")},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),w(g,o,y),V(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Ce(ze.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(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=g[12]),y&1&&(S.disabled=!j.isEmpty(g[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.exceptEmailDomains,ge(()=>a=!1)),r.$set(S)},i(g){c||(A(r.$$.fragment,g),c=!0)},o(g){L(r.$$.fragment,g),c=!1},d(g){g&&k(e),g&&k(o),H(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function RT(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;function _(g){n[8](g)}let h={id:n[12],disabled:!j.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(h.value=n[0].options.onlyEmailDomains),r=new Fs({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),B(r.$$.fragment),f=E(),u=v("div"),u.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(u,"class","help-block")},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),w(g,o,y),V(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Ce(ze.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(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=g[12]),y&1&&(S.disabled=!j.isEmpty(g[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.onlyEmailDomains,ge(()=>a=!1)),r.$set(S)},i(g){c||(A(r.$$.fragment,g),c=!0)},o(g){L(r.$$.fragment,g),c=!1},d(g){g&&k(e),g&&k(o),H(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function qT(n){let e,t,i,s;e=new ce({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[FT,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&zd(n);return{c(){B(e.$$.fragment),t=E(),l&&l.c(),i=ye()},m(o,r){V(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&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=zd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),L(l,1,1,()=>{l=null}),fe())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){H(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function jT(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function zT(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Vd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(ze.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function VT(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowEmailAuth?zT:jT}let a=r(n),f=a(n),u=n[2]&&Vd();return{c(){e=v("div"),e.innerHTML=`<i class="ri-mail-star-line"></i>
<span class="txt">Email/Password</span>`,t=E(),i=v("div"),s=E(),f.c(),l=E(),u&&u.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){w(c,e,d),w(c,t,d),w(c,i,d),w(c,s,d),f.m(c,d),w(c,l,d),u&&u.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(f.d(1),f=a(c),f&&(f.c(),f.m(l.parentNode,l))),c[2]?u?d&4&&A(u,1):(u=Vd(),u.c(),A(u,1),u.m(o.parentNode,o)):u&&(ae(),L(u,1,1,()=>{u=null}),fe())},d(c){c&&k(e),c&&k(t),c&&k(i),c&&k(s),f.d(c),c&&k(l),u&&u.d(c),c&&k(o)}}}function HT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(f,u){w(f,e,u),e.checked=n[0].options.allowOAuth2Auth,w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[9]),r=!0)},p(f,u){u&4096&&t!==(t=f[12])&&p(e,"id",t),u&1&&(e.checked=f[0].options.allowOAuth2Auth),u&4096&&o!==(o=f[12])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function Hd(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){w(s,e,l),i=!0},i(s){i||(s&&Ge(()=>{i&&(t||(t=Re(e,tt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=Re(e,tt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function BT(n){let e,t,i,s;e=new ce({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[HT,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Hd();return{c(){B(e.$$.fragment),t=E(),l&&l.c(),i=ye()},m(o,r){V(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=Hd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),L(l,1,1,()=>{l=null}),fe())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){H(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function UT(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function WT(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(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){w(o,e,r),i=!0,s||(l=Ce(ze.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function YT(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowOAuth2Auth?WT:UT}let a=r(n),f=a(n),u=n[1]&&Bd();return{c(){e=v("div"),e.innerHTML=`<i class="ri-shield-star-line"></i>
<span class="txt">OAuth2</span>`,t=E(),i=v("div"),s=E(),f.c(),l=E(),u&&u.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){w(c,e,d),w(c,t,d),w(c,i,d),w(c,s,d),f.m(c,d),w(c,l,d),u&&u.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(f.d(1),f=a(c),f&&(f.c(),f.m(l.parentNode,l))),c[1]?u?d&2&&A(u,1):(u=Bd(),u.c(),A(u,1),u.m(o.parentNode,o)):u&&(ae(),L(u,1,1,()=>{u=null}),fe())},d(c){c&&k(e),c&&k(t),c&&k(i),c&&k(s),f.d(c),c&&k(l),u&&u.d(c),c&&k(o)}}}function KT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Minimum password length"),s=E(),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(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0].options.minPasswordLength),r||(a=Y(l,"input",n[10]),r=!0)},p(f,u){u&4096&&i!==(i=f[12])&&p(e,"for",i),u&4096&&o!==(o=f[12])&&p(l,"id",o),u&1&&pt(l.value)!==f[0].options.minPasswordLength&&re(l,f[0].options.minPasswordLength)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function JT(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Always require email",o=E(),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){w(c,e,d),e.checked=n[0].options.requireEmail,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=[Y(e,"change",n[11]),Ce(ze.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"}))],f=!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&&k(e),c&&k(i),c&&k(s),f=!1,Me(u)}}}function ZT(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y;return s=new ro({props:{single:!0,$$slots:{header:[PT],default:[AT]},$$scope:{ctx:n}}}),o=new ro({props:{single:!0,$$slots:{header:[VT],default:[qT]},$$scope:{ctx:n}}}),a=new ro({props:{single:!0,$$slots:{header:[YT],default:[BT]},$$scope:{ctx:n}}}),_=new ce({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[KT,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),g=new ce({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[JT,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=E(),i=v("div"),B(s.$$.fragment),l=E(),B(o.$$.fragment),r=E(),B(a.$$.fragment),f=E(),u=v("hr"),c=E(),d=v("h4"),d.textContent="General",m=E(),B(_.$$.fragment),h=E(),B(g.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(S,$){w(S,e,$),w(S,t,$),w(S,i,$),V(s,i,null),b(i,l),V(o,i,null),b(i,r),V(a,i,null),w(S,f,$),w(S,u,$),w(S,c,$),w(S,d,$),w(S,m,$),V(_,S,$),w(S,h,$),V(g,S,$),y=!0},p(S,[$]){const C={};$&8201&&(C.$$scope={dirty:$,ctx:S}),s.$set(C);const T={};$&8197&&(T.$$scope={dirty:$,ctx:S}),o.$set(T);const M={};$&8195&&(M.$$scope={dirty:$,ctx:S}),a.$set(M);const O={};$&12289&&(O.$$scope={dirty:$,ctx:S}),_.$set(O);const D={};$&12289&&(D.$$scope={dirty:$,ctx:S}),g.$set(D)},i(S){y||(A(s.$$.fragment,S),A(o.$$.fragment,S),A(a.$$.fragment,S),A(_.$$.fragment,S),A(g.$$.fragment,S),y=!0)},o(S){L(s.$$.fragment,S),L(o.$$.fragment,S),L(a.$$.fragment,S),L(_.$$.fragment,S),L(g.$$.fragment,S),y=!1},d(S){S&&k(e),S&&k(t),S&&k(i),H(s),H(o),H(a),S&&k(f),S&&k(u),S&&k(c),S&&k(d),S&&k(m),H(_,S),S&&k(h),H(g,S)}}}function GT(n,e,t){let i,s,l,o;We(n,Ci,h=>t(4,o=h));let{collection:r}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function f(){r.options.allowEmailAuth=this.checked,t(0,r)}function u(h){n.$$.not_equal(r.options.exceptEmailDomains,h)&&(r.options.exceptEmailDomains=h,t(0,r))}function c(h){n.$$.not_equal(r.options.onlyEmailDomains,h)&&(r.options.onlyEmailDomains=h,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=pt(this.value),t(0,r)}function _(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=h=>{"collection"in h&&t(0,r=h.collection)},n.$$.update=()=>{var h,g,y,S;n.$$.dirty&1&&r.type==="auth"&&z.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!z.isEmpty((h=o==null?void 0:o.options)==null?void 0:h.allowEmailAuth)||!z.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.onlyEmailDomains)||!z.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!z.isEmpty((S=o==null?void 0:o.options)==null?void 0:S.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,f,u,c,d,m,_]}class XT extends ve{constructor(e){super(),be(this,e,GT,ZT,me,{collection:0})}}function Ud(n,e,t){const i=n.slice();return i[18]=e[t],i}function Wd(n,e,t){const i=n.slice();return i[18]=e[t],i}function Yd(n,e,t){const i=n.slice();return i[18]=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){w(t,e,i)},d(t){t&&k(e)}}}function Jd(n){let e,t,i,s,l=n[3]&&Zd(n),o=!n[4]&&Gd(n);return{c(){e=v("h6"),e.textContent="Changes:",t=E(),i=v("ul"),l&&l.c(),s=E(),o&&o.c(),p(i,"class","changes-list svelte-xqpcsf")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),l&&l.m(i,null),b(i,s),o&&o.m(i,null)},p(r,a){r[3]?l?l.p(r,a):(l=Zd(r),l.c(),l.m(i,s)):l&&(l.d(1),l=null),r[4]?o&&(o.d(1),o=null):o?o.p(r,a):(o=Gd(r),o.c(),o.m(i,null))},d(r){r&&k(e),r&&k(t),r&&k(i),l&&l.d(),o&&o.d()}}}function Zd(n){var m,_;let e,t,i,s,l=((m=n[1])==null?void 0:m.name)+"",o,r,a,f,u,c=((_=n[2])==null?void 0:_.name)+"",d;return{c(){e=v("li"),t=v("div"),i=U(`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"}))],f=!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&&k(e),c&&k(i),c&&k(s),f=!1,Me(u)}}}function ZT(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y;return s=new ro({props:{single:!0,$$slots:{header:[PT],default:[AT]},$$scope:{ctx:n}}}),o=new ro({props:{single:!0,$$slots:{header:[VT],default:[qT]},$$scope:{ctx:n}}}),a=new ro({props:{single:!0,$$slots:{header:[YT],default:[BT]},$$scope:{ctx:n}}}),_=new ce({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[KT,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),g=new ce({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[JT,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=E(),i=v("div"),B(s.$$.fragment),l=E(),B(o.$$.fragment),r=E(),B(a.$$.fragment),f=E(),u=v("hr"),c=E(),d=v("h4"),d.textContent="General",m=E(),B(_.$$.fragment),h=E(),B(g.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(S,$){w(S,e,$),w(S,t,$),w(S,i,$),V(s,i,null),b(i,l),V(o,i,null),b(i,r),V(a,i,null),w(S,f,$),w(S,u,$),w(S,c,$),w(S,d,$),w(S,m,$),V(_,S,$),w(S,h,$),V(g,S,$),y=!0},p(S,[$]){const C={};$&8201&&(C.$$scope={dirty:$,ctx:S}),s.$set(C);const T={};$&8197&&(T.$$scope={dirty:$,ctx:S}),o.$set(T);const M={};$&8195&&(M.$$scope={dirty:$,ctx:S}),a.$set(M);const O={};$&12289&&(O.$$scope={dirty:$,ctx:S}),_.$set(O);const D={};$&12289&&(D.$$scope={dirty:$,ctx:S}),g.$set(D)},i(S){y||(A(s.$$.fragment,S),A(o.$$.fragment,S),A(a.$$.fragment,S),A(_.$$.fragment,S),A(g.$$.fragment,S),y=!0)},o(S){L(s.$$.fragment,S),L(o.$$.fragment,S),L(a.$$.fragment,S),L(_.$$.fragment,S),L(g.$$.fragment,S),y=!1},d(S){S&&k(e),S&&k(t),S&&k(i),H(s),H(o),H(a),S&&k(f),S&&k(u),S&&k(c),S&&k(d),S&&k(m),H(_,S),S&&k(h),H(g,S)}}}function GT(n,e,t){let i,s,l,o;We(n,Ci,h=>t(4,o=h));let{collection:r}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function f(){r.options.allowEmailAuth=this.checked,t(0,r)}function u(h){n.$$.not_equal(r.options.exceptEmailDomains,h)&&(r.options.exceptEmailDomains=h,t(0,r))}function c(h){n.$$.not_equal(r.options.onlyEmailDomains,h)&&(r.options.onlyEmailDomains=h,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=pt(this.value),t(0,r)}function _(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=h=>{"collection"in h&&t(0,r=h.collection)},n.$$.update=()=>{var h,g,y,S;n.$$.dirty&1&&r.type==="auth"&&j.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!j.isEmpty((h=o==null?void 0:o.options)==null?void 0:h.allowEmailAuth)||!j.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.onlyEmailDomains)||!j.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!j.isEmpty((S=o==null?void 0:o.options)==null?void 0:S.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,f,u,c,d,m,_]}class XT extends ve{constructor(e){super(),be(this,e,GT,ZT,me,{collection:0})}}function Ud(n,e,t){const i=n.slice();return i[18]=e[t],i}function Wd(n,e,t){const i=n.slice();return i[18]=e[t],i}function Yd(n,e,t){const i=n.slice();return i[18]=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){w(t,e,i)},d(t){t&&k(e)}}}function Jd(n){let e,t,i,s,l=n[3]&&Zd(n),o=!n[4]&&Gd(n);return{c(){e=v("h6"),e.textContent="Changes:",t=E(),i=v("ul"),l&&l.c(),s=E(),o&&o.c(),p(i,"class","changes-list svelte-xqpcsf")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),l&&l.m(i,null),b(i,s),o&&o.m(i,null)},p(r,a){r[3]?l?l.p(r,a):(l=Zd(r),l.c(),l.m(i,s)):l&&(l.d(1),l=null),r[4]?o&&(o.d(1),o=null):o?o.p(r,a):(o=Gd(r),o.c(),o.m(i,null))},d(r){r&&k(e),r&&k(t),r&&k(i),l&&l.d(),o&&o.d()}}}function Zd(n){var m,_;let e,t,i,s,l=((m=n[1])==null?void 0:m.name)+"",o,r,a,f,u,c=((_=n[2])==null?void 0:_.name)+"",d;return{c(){e=v("li"),t=v("div"),i=U(`Renamed collection
`),s=v("strong"),o=U(l),r=E(),a=v("i"),f=E(),u=v("strong"),d=U(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(u,"class","txt"),p(t,"class","inline-flex"),p(e,"class","svelte-xqpcsf")},m(h,g){w(h,e,g),b(e,t),b(t,i),b(t,s),b(s,o),b(t,r),b(t,a),b(t,f),b(t,u),b(u,d)},p(h,g){var y,S;g&2&&l!==(l=((y=h[1])==null?void 0:y.name)+"")&&se(o,l),g&4&&c!==(c=((S=h[2])==null?void 0:S.name)+"")&&se(d,c)},d(h){h&&k(e)}}}function Gd(n){let e,t,i,s=n[6],l=[];for(let u=0;u<s.length;u+=1)l[u]=Xd(Yd(n,s,u));let o=n[8],r=[];for(let u=0;u<o.length;u+=1)r[u]=Qd(Wd(n,o,u));let a=n[7],f=[];for(let u=0;u<a.length;u+=1)f[u]=xd(Ud(n,a,u));return{c(){for(let u=0;u<l.length;u+=1)l[u].c();e=E();for(let u=0;u<r.length;u+=1)r[u].c();t=E();for(let u=0;u<f.length;u+=1)f[u].c();i=ye()},m(u,c){for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(u,c);w(u,e,c);for(let d=0;d<r.length;d+=1)r[d]&&r[d].m(u,c);w(u,t,c);for(let d=0;d<f.length;d+=1)f[d]&&f[d].m(u,c);w(u,i,c)},p(u,c){if(c&64){s=u[6];let d;for(d=0;d<s.length;d+=1){const m=Yd(u,s,d);l[d]?l[d].p(m,c):(l[d]=Xd(m),l[d].c(),l[d].m(e.parentNode,e))}for(;d<l.length;d+=1)l[d].d(1);l.length=s.length}if(c&256){o=u[8];let d;for(d=0;d<o.length;d+=1){const m=Wd(u,o,d);r[d]?r[d].p(m,c):(r[d]=Qd(m),r[d].c(),r[d].m(t.parentNode,t))}for(;d<r.length;d+=1)r[d].d(1);r.length=o.length}if(c&128){a=u[7];let d;for(d=0;d<a.length;d+=1){const m=Ud(u,a,d);f[d]?f[d].p(m,c):(f[d]=xd(m),f[d].c(),f[d].m(i.parentNode,i))}for(;d<f.length;d+=1)f[d].d(1);f.length=a.length}},d(u){_t(l,u),u&&k(e),_t(r,u),u&&k(t),_t(f,u),u&&k(i)}}}function Xd(n){let e,t,i,s=n[18].name+"",l,o,r;return{c(){e=v("li"),t=U(`Multiple to single value conversion of field
`),i=v("strong"),l=U(s),o=E(),r=v("em"),r.textContent="(will keep only the last array item)",p(r,"class","txt-sm"),p(e,"class","svelte-xqpcsf")},m(a,f){w(a,e,f),b(e,t),b(e,i),b(i,l),b(e,o),b(e,r)},p(a,f){f&64&&s!==(s=a[18].name+"")&&se(l,s)},d(a){a&&k(e)}}}function Qd(n){let e,t,i,s,l=n[18].originalName+"",o,r,a,f,u,c=n[18].name+"",d;return{c(){e=v("li"),t=v("div"),i=U(`Renamed field
`),s=v("strong"),o=U(l),r=E(),a=v("i"),f=E(),u=v("strong"),d=U(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(u,"class","txt"),p(t,"class","inline-flex"),p(e,"class","svelte-xqpcsf")},m(m,_){w(m,e,_),b(e,t),b(t,i),b(t,s),b(s,o),b(t,r),b(t,a),b(t,f),b(t,u),b(u,d)},p(m,_){_&256&&l!==(l=m[18].originalName+"")&&se(o,l),_&256&&c!==(c=m[18].name+"")&&se(d,c)},d(m){m&&k(e)}}}function xd(n){let e,t,i,s=n[18].name+"",l,o;return{c(){e=v("li"),t=U("Removed field "),i=v("span"),l=U(s),o=E(),p(i,"class","txt-bold"),p(e,"class","txt-danger svelte-xqpcsf")},m(r,a){w(r,e,a),b(e,t),b(e,i),b(i,l),b(e,o)},p(r,a){a&128&&s!==(s=r[18].name+"")&&se(l,s)},d(r){r&&k(e)}}}function QT(n){let e,t,i,s,l,o,r,a,f=n[7].length&&Kd(),u=n[9]&&Jd(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=E(),s=v("div"),l=v("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query,
you'll have to update it manually!`,o=E(),f&&f.c(),r=E(),u&&u.c(),a=ye(),p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),f&&f.m(s,null),w(c,r,d),u&&u.m(c,d),w(c,a,d)},p(c,d){c[7].length?f||(f=Kd(),f.c(),f.m(s,null)):f&&(f.d(1),f=null),c[9]?u?u.p(c,d):(u=Jd(c),u.c(),u.m(a.parentNode,a)):u&&(u.d(1),u=null)},d(c){c&&k(e),f&&f.d(),c&&k(r),u&&u.d(c),c&&k(a)}}}function xT(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function eM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Cancel</span>',t=E(),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){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[Y(e,"click",n[12]),Y(i,"click",n[13])],s=!0)},p:ee,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Me(l)}}}function tM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[eM],header:[xT],default:[QT]},$$scope:{ctx:n}};return e=new nn({props:i}),n[14](e),e.$on("hide",n[15]),e.$on("show",n[16]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&33555422&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[14](null),H(e,s)}}}function nM(n,e,t){let i,s,l,o,r,a;const f=wt();let u,c,d;async function m(T,M){t(1,c=T),t(2,d=M),await fn(),i||l.length||o.length||r.length?u==null||u.show():h()}function _(){u==null||u.hide()}function h(){_(),f("confirm")}const g=()=>_(),y=()=>h();function S(T){ne[T?"unshift":"push"](()=>{u=T,t(5,u)})}function $(T){Fe.call(this,n,T)}function C(T){Fe.call(this,n,T)}return n.$$.update=()=>{var T,M,O;n.$$.dirty&6&&t(3,i=(c==null?void 0:c.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(4,s=(d==null?void 0:d.type)==="view"),n.$$.dirty&4&&t(8,l=((T=d==null?void 0:d.schema)==null?void 0:T.filter(D=>D.id&&!D.toDelete&&D.originalName!=D.name))||[]),n.$$.dirty&4&&t(7,o=((M=d==null?void 0:d.schema)==null?void 0:M.filter(D=>D.id&&D.toDelete))||[]),n.$$.dirty&6&&t(6,r=((O=d==null?void 0:d.schema)==null?void 0:O.filter(D=>{var P,F,R;const I=(P=c==null?void 0:c.schema)==null?void 0:P.find(N=>N.id==D.id);return I?((F=I.options)==null?void 0:F.maxSelect)!=1&&((R=D.options)==null?void 0:R.maxSelect)==1:!1}))||[]),n.$$.dirty&24&&t(9,a=!s||i)},[_,c,d,i,s,u,r,o,l,a,h,m,g,y,S,$,C]}class iM extends ve{constructor(e){super(),be(this,e,nM,tM,me,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function ep(n,e,t){const i=n.slice();return i[49]=e[t][0],i[50]=e[t][1],i}function sM(n){let e,t,i;function s(o){n[35](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new rT({props:l}),ne.push(()=>de(e,"collection",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function lM(n){let e,t,i;function s(o){n[34](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new TT({props:l}),ne.push(()=>de(e,"collection",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function tp(n){let e,t,i,s;function l(r){n[36](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new yT({props:o}),ne.push(()=>de(t,"collection",l)),{c(){e=v("div"),B(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){w(r,e,a),V(t,e,null),s=!0},p(r,a){const f={};!i&&a[0]&4&&(i=!0,f.collection=r[2],ge(()=>i=!1)),t.$set(f)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){L(t.$$.fragment,r),s=!1},d(r){r&&k(e),H(t)}}}function np(n){let e,t,i,s;function l(r){n[37](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new XT({props:o}),ne.push(()=>de(t,"collection",l)),{c(){e=v("div"),B(t.$$.fragment),p(e,"class","tab-item"),X(e,"active",n[3]===Ds)},m(r,a){w(r,e,a),V(t,e,null),s=!0},p(r,a){const f={};!i&&a[0]&4&&(i=!0,f.collection=r[2],ge(()=>i=!1)),t.$set(f),(!s||a[0]&8)&&X(e,"active",r[3]===Ds)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){L(t.$$.fragment,r),s=!1},d(r){r&&k(e),H(t)}}}function oM(n){let e,t,i,s,l,o,r;const a=[lM,sM],f=[];function u(m,_){return m[14]?0:1}i=u(n),s=f[i]=a[i](n);let c=n[3]===_l&&tp(n),d=n[15]&&np(n);return{c(){e=v("div"),t=v("div"),s.c(),l=E(),c&&c.c(),o=E(),d&&d.c(),p(t,"class","tab-item"),X(t,"active",n[3]===Li),p(e,"class","tabs-content svelte-12y0yzb")},m(m,_){w(m,e,_),b(e,t),f[i].m(t,null),b(e,l),c&&c.m(e,null),b(e,o),d&&d.m(e,null),r=!0},p(m,_){let h=i;i=u(m),i===h?f[i].p(m,_):(ae(),L(f[h],1,1,()=>{f[h]=null}),fe(),s=f[i],s?s.p(m,_):(s=f[i]=a[i](m),s.c()),A(s,1),s.m(t,null)),(!r||_[0]&8)&&X(t,"active",m[3]===Li),m[3]===_l?c?(c.p(m,_),_[0]&8&&A(c,1)):(c=tp(m),c.c(),A(c,1),c.m(e,o)):c&&(ae(),L(c,1,1,Line truncated
<span class="txt">Duplicate</span>`,t=E(),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){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[Y(e,"click",n[26]),Y(i,"click",Ln(Xe(n[27])))],s=!0)},p:ee,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Me(l)}}}function sp(n){let e,t,i,s;return i=new Kn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[aM]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=E(),B(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){w(l,e,o),w(l,t,o),V(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&4194304&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(e),l&&k(t),H(i,l)}}}function lp(n){let e,t,i,s,l,o=n[50]+"",r,a,f,u,c;function d(){return n[29](n[49])}return{c(){e=v("button"),t=v("i"),s=E(),l=v("span"),r=U(o),a=U(" collection"),f=E(),p(t,"class",i=is(z.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),X(e,"selected",n[49]==n[2].type)},m(m,_){w(m,e,_),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),b(e,f),u||(c=Y(e,"click",d),u=!0)},p(m,_){n=m,_[0]&64&&i!==(i=is(z.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb")&&p(t,"class",i),_[0]&64&&o!==(o=n[50]+"")&&se(r,o),_[0]&68&&X(e,"selected",n[49]==n[2].type)},d(m){m&&k(e),u=!1,c()}}}function aM(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s<t.length;s+=1)i[s]=lp(ep(n,t,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=ye()},m(s,l){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(s,l);w(s,e,l)},p(s,l){if(l[0]&524356){t=Object.entries(s[6]);let o;for(o=0;o<t.length;o+=1){const r=ep(s,t,o);i[o]?i[o].p(r,l):(i[o]=lp(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){_t(i,s),s&&k(e)}}}function op(n){let e;return{c(){e=v("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function fM(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y=(n[6][n[2].type]||"N/A")+"",S,$,C,T,M,O,D,I,P,F=!n[2].id&&sp(n),R=n[2].system&&op();return{c(){e=v("label"),t=U("Name"),s=E(),l=v("input"),u=E(),c=v("div"),d=v("button"),m=v("span"),_=E(),h=v("span"),g=U("Type: "),S=U(y),$=E(),F&&F.c(),M=E(),R&&R.c(),O=ye(),p(e,"for",i=n[48]),p(l,"type","text"),p(l,"id",o=n[48]),l.required=!0,l.disabled=n[13],p(l,"spellcheck","false"),l.autofocus=r=!n[2].id,p(l,"placeholder",a=n[15]?'eg. "users"':'eg. "posts"'),l.value=f=n[2].name,p(h,"class","txt"),p(d,"type","button"),p(d,"class",C="btn btn-sm p-r-10 p-l-10 "+(n[2].id?"btn-transparent":"btn-outline")),d.disabled=T=!!n[2].id,p(c,"class","form-field-addon")},m(N,q){w(N,e,q),b(e,t),w(N,s,q),w(N,l,q),w(N,u,q),w(N,c,q),b(c,d),b(d,m),b(d,_),b(d,h),b(h,g),b(h,S),b(d,$),F&&F.m(d,null),w(N,M,q),R&&R.m(N,q),w(N,O,q),D=!0,n[2].id||l.focus(),I||(P=Y(l,"input",n[28]),I=!0)},p(N,q){(!D||q[1]&131072&&i!==(i=N[48]))&&p(e,"for",i),(!D||q[1]&131072&&o!==(o=N[48]))&&p(l,"id",o),(!D||q[0]&8192)&&(l.disabled=N[13]),(!D||q[0]&4&&r!==(r=!N[2].id))&&(l.autofocus=r),(!D||q[0]&32768&&a!==(a=N[15]?'eg. "users"':'eg. "posts"'))&&p(l,"placeholder",a),(!D||q[0]&4&&f!==(f=N[2].name)&&l.value!==f)&&(l.value=f),(!D||q[0]&68)&&y!==(y=(N[6][N[2].type]||"N/A")+"")&&se(S,y),N[2].id?F&&(ae(),L(F,1,1,()=>{F=null}),fe()):F?(F.p(N,q),q[0]&4&&A(F,1)):(F=sp(N),F.c(),A(F,1),F.m(d,null)),(!D||q[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(N[2].id?"btn-transparent":"btn-outline")))&&p(d,"class",C),(!D||q[0]&4&&T!==(T=!!N[2].id))&&(d.disabled=T),N[2].system?R||(R=op(),R.c(),R.m(O.parentNode,O)):R&&(R.d(1),R=null)},i(N){D||(A(F),D=!0)},o(N){L(F),D=!1},d(N){N&&k(e),N&&k(s),N&&k(l),N&&k(u),N&&k(c),F&&F.d(),N&&k(M),R&&R.d(N),N&&k(O),I=!1,P()}}}function rp(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){w(r,e,a),s=!0,l||(o=Ce(t=ze.call(null,e,n[11])),l=!0)},p(r,a){t&&qt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&Ge(()=>{s&&(i||(i=Re(e,Yt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=Re(e,Yt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function ap(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(ze.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function fp(n){var a,f,u;let e,t,i,s=!z.isEmpty((a=n[5])==null?void 0:a.options)&&!((u=(f=n[5])==null?void 0:f.options)!=null&&u.manageRule),l,o,r=s&&up();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=E(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),X(e,"active",n[3]===Ds)},m(c,d){w(c,e,d),b(e,t),b(e,i),r&&r.m(e,null),l||(o=Y(e,"click",n[33]),l=!0)},p(c,d){var m,_,h;d[0]&32&&(s=!z.isEmpty((m=c[5])==null?void 0:m.options)&&!((h=(_=c[5])==nullLine 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){w(l,e,o),b(e,t),i||(s=Y(t,"click",n[12]),i=!0)},p:ee,d(l){l&&k(e),i=!1,s()}}}function hM(n){let e,t,i,s,l,o,r,a,f,u,c,d=[],m=new Map,_,h,g,y,S,$,C=n[3];const T=I=>I[15].id;for(let I=0;I<C.length;I+=1){let P=pp(n,C,I),F=T(P);m.set(F,d[I]=_p(F,P))}let M=null;C.length||(M=mp(n));let O=!n[7]&&gp(n),D={};return g=new nf({props:D}),n[13](g),g.$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=E(),r=v("input"),a=E(),f=v("hr"),u=E(),c=v("div");for(let I=0;I<d.length;I+=1)d[I].c();M&&M.c(),_=E(),O&&O.c(),h=E(),B(g.$$.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(f,"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,P){w(I,e,P),b(e,t),b(t,i),b(i,s),b(s,l),b(i,o),b(i,r),re(r,n[0]),b(e,a),b(e,f),b(e,u),b(e,c);for(let F=0;F<d.length;F+=1)d[F]&&d[F].m(c,null);M&&M.m(c,null),b(e,_),O&&O.m(e,null),w(I,h,P),V(g,I,P),y=!0,S||($=[Y(l,"click",n[10]),Y(r,"input",n[11])],S=!0)},p(I,[P]){(!y||P&16)&&X(l,"hidden",!I[4]),P&1&&r.value!==I[0]&&re(r,I[0]),(!y||P&16)&&X(i,"active",I[4]),P&42&&(C=I[3],d=vt(d,P,T,1,I,C,m,c,ls,_p,null,pp),!C.length&&M?M.p(I,P):C.length?M&&(M.d(1),M=null):(M=mp(I),M.c(),M.m(c,null))),(!y||P&64)&&X(c,"fade",I[6]),(!y||P&8)&&X(c,"sidebar-content-compact",I[3].length>20),I[7]?O&&(O.d(1),O=null):O?O.p(I,P):(O=gp(I),O.c(),O.m(e,null));const F={};g.$set(F)},i(I){y||(A(g.$$.fragment,I),y=!0)},o(I){L(g.$$.fragment,I),y=!1},d(I){I&&k(e);for(let P=0;P<d.length;P+=1)d[P].d();M&&M.d(),O&&O.d(),I&&k(h),n[13](null),H(g,I),S=!1,Me($)}}}function _M(){setTimeout(()=>{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function gM(n,e,t){let i,s,l,o,r,a,f;We(n,wi,S=>t(5,o=S)),We(n,ni,S=>t(9,r=S)),We(n,go,S=>t(6,a=S)),We(n,Ts,S=>t(7,f=S));let u,c="";function d(S){tn(wi,o=S,o)}const m=()=>t(0,c="");function _(){c=this.value,t(0,c)}const h=()=>u==null?void 0:u.show();function g(S){ne[S?"unshift":"push"](()=>{u=S,t(2,u)})}const y=S=>{var $;($=S.detail)!=null&&$.isNew&&S.detail.collection&&d(S.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&_M(),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(S=>S.id==c||S.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[c,i,u,l,s,o,a,f,d,r,m,_,h,g,y]}class bM extends ve{constructor(e){super(),be(this,e,gM,hM,me,{})}}function bp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function vp(n){n[18]=n[19].default}function yp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function kp(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function wp(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,f,u,c=i&&kp();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ye(),c&&c.c(),s=E(),l=v("button"),r=U(o),a=E(),p(l,"type","button"),p(l,"class","sidebar-item"),X(l,"active",e[5]===e[14]),this.first=t},m(m,_){w(m,t,_),c&&c.m(m,_),w(m,s,_),w(m,l,_),b(l,r),b(l,a),f||(u=Y(l,"click",d),f=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=kp(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),_&8&&o!==(o=e[15].label+"")&&se(r,o),_&40&&X(l,"active",e[5]===e[14])},d(m){m&&k(t),c&&c.d(m),m&&k(s),m&&k(l),f=!1,u()}}}function Sp(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:kM,then:yM,catch:vM,value:19,blocks:[,,,]};return ff(t=n[15].component,s),{c(){e=ye(),s.block.c()},m(l,o){w(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)&&ff(t,s)||Y1(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];L(r)}i=!1},d(l){l&&k(e),s.block.d(l),s.token=null,s=null}}}function vM(n){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function yM(n){vp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){B(e.$$.fragment),t=E()},m(s,l){V(e,s,l),w(s,t,l),i=!0},p(s,l){vp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){L(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&k(t)}}}function kM(n){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function Cp(n,e){let t,i,s,l=e[5]===e[14]&&Sp(e);return{key:n,first:null,c(){t=ye(),l&&l.c(),i=ye(),this.first=t},m(o,r){w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Sp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),L(l,1,1,()=>{l=null}),fe())},i(o){s||(ALine truncated
<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){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[Y(e,"click",n[26]),Y(i,"click",Ln(Xe(n[27])))],s=!0)},p:ee,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Me(l)}}}function sp(n){let e,t,i,s;return i=new Kn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[aM]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=E(),B(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){w(l,e,o),w(l,t,o),V(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&4194304&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(e),l&&k(t),H(i,l)}}}function lp(n){let e,t,i,s,l,o=n[50]+"",r,a,f,u,c;function d(){return n[29](n[49])}return{c(){e=v("button"),t=v("i"),s=E(),l=v("span"),r=U(o),a=U(" collection"),f=E(),p(t,"class",i=is(j.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),X(e,"selected",n[49]==n[2].type)},m(m,_){w(m,e,_),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),b(e,f),u||(c=Y(e,"click",d),u=!0)},p(m,_){n=m,_[0]&64&&i!==(i=is(j.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb")&&p(t,"class",i),_[0]&64&&o!==(o=n[50]+"")&&se(r,o),_[0]&68&&X(e,"selected",n[49]==n[2].type)},d(m){m&&k(e),u=!1,c()}}}function aM(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s<t.length;s+=1)i[s]=lp(ep(n,t,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=ye()},m(s,l){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(s,l);w(s,e,l)},p(s,l){if(l[0]&524356){t=Object.entries(s[6]);let o;for(o=0;o<t.length;o+=1){const r=ep(s,t,o);i[o]?i[o].p(r,l):(i[o]=lp(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){_t(i,s),s&&k(e)}}}function op(n){let e;return{c(){e=v("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function fM(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y=(n[6][n[2].type]||"N/A")+"",S,$,C,T,M,O,D,I,P,F=!n[2].id&&sp(n),R=n[2].system&&op();return{c(){e=v("label"),t=U("Name"),s=E(),l=v("input"),u=E(),c=v("div"),d=v("button"),m=v("span"),_=E(),h=v("span"),g=U("Type: "),S=U(y),$=E(),F&&F.c(),M=E(),R&&R.c(),O=ye(),p(e,"for",i=n[48]),p(l,"type","text"),p(l,"id",o=n[48]),l.required=!0,l.disabled=n[13],p(l,"spellcheck","false"),l.autofocus=r=!n[2].id,p(l,"placeholder",a=n[15]?'eg. "users"':'eg. "posts"'),l.value=f=n[2].name,p(h,"class","txt"),p(d,"type","button"),p(d,"class",C="btn btn-sm p-r-10 p-l-10 "+(n[2].id?"btn-transparent":"btn-outline")),d.disabled=T=!!n[2].id,p(c,"class","form-field-addon")},m(N,q){w(N,e,q),b(e,t),w(N,s,q),w(N,l,q),w(N,u,q),w(N,c,q),b(c,d),b(d,m),b(d,_),b(d,h),b(h,g),b(h,S),b(d,$),F&&F.m(d,null),w(N,M,q),R&&R.m(N,q),w(N,O,q),D=!0,n[2].id||l.focus(),I||(P=Y(l,"input",n[28]),I=!0)},p(N,q){(!D||q[1]&131072&&i!==(i=N[48]))&&p(e,"for",i),(!D||q[1]&131072&&o!==(o=N[48]))&&p(l,"id",o),(!D||q[0]&8192)&&(l.disabled=N[13]),(!D||q[0]&4&&r!==(r=!N[2].id))&&(l.autofocus=r),(!D||q[0]&32768&&a!==(a=N[15]?'eg. "users"':'eg. "posts"'))&&p(l,"placeholder",a),(!D||q[0]&4&&f!==(f=N[2].name)&&l.value!==f)&&(l.value=f),(!D||q[0]&68)&&y!==(y=(N[6][N[2].type]||"N/A")+"")&&se(S,y),N[2].id?F&&(ae(),L(F,1,1,()=>{F=null}),fe()):F?(F.p(N,q),q[0]&4&&A(F,1)):(F=sp(N),F.c(),A(F,1),F.m(d,null)),(!D||q[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(N[2].id?"btn-transparent":"btn-outline")))&&p(d,"class",C),(!D||q[0]&4&&T!==(T=!!N[2].id))&&(d.disabled=T),N[2].system?R||(R=op(),R.c(),R.m(O.parentNode,O)):R&&(R.d(1),R=null)},i(N){D||(A(F),D=!0)},o(N){L(F),D=!1},d(N){N&&k(e),N&&k(s),N&&k(l),N&&k(u),N&&k(c),F&&F.d(),N&&k(M),R&&R.d(N),N&&k(O),I=!1,P()}}}function rp(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){w(r,e,a),s=!0,l||(o=Ce(t=ze.call(null,e,n[11])),l=!0)},p(r,a){t&&qt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&Ge(()=>{s&&(i||(i=Re(e,Yt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=Re(e,Yt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function ap(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(ze.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function fp(n){var a,f,u;let e,t,i,s=!j.isEmpty((a=n[5])==null?void 0:a.options)&&!((u=(f=n[5])==null?void 0:f.options)!=null&&u.manageRule),l,o,r=s&&up();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=E(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),X(e,"active",n[3]===Ds)},m(c,d){w(c,e,d),b(e,t),b(e,i),r&&r.m(e,null),l||(o=Y(e,"click",n[33]),l=!0)},p(c,d){var m,_,h;d[0]&32&&(s=!j.isEmpty((m=c[5])==null?void 0:m.options)&&!((h=(_=c[5])==nullLine 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){w(l,e,o),b(e,t),i||(s=Y(t,"click",n[12]),i=!0)},p:ee,d(l){l&&k(e),i=!1,s()}}}function hM(n){let e,t,i,s,l,o,r,a,f,u,c,d=[],m=new Map,_,h,g,y,S,$,C=n[3];const T=I=>I[15].id;for(let I=0;I<C.length;I+=1){let P=pp(n,C,I),F=T(P);m.set(F,d[I]=_p(F,P))}let M=null;C.length||(M=mp(n));let O=!n[7]&&gp(n),D={};return g=new nf({props:D}),n[13](g),g.$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=E(),r=v("input"),a=E(),f=v("hr"),u=E(),c=v("div");for(let I=0;I<d.length;I+=1)d[I].c();M&&M.c(),_=E(),O&&O.c(),h=E(),B(g.$$.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(f,"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,P){w(I,e,P),b(e,t),b(t,i),b(i,s),b(s,l),b(i,o),b(i,r),re(r,n[0]),b(e,a),b(e,f),b(e,u),b(e,c);for(let F=0;F<d.length;F+=1)d[F]&&d[F].m(c,null);M&&M.m(c,null),b(e,_),O&&O.m(e,null),w(I,h,P),V(g,I,P),y=!0,S||($=[Y(l,"click",n[10]),Y(r,"input",n[11])],S=!0)},p(I,[P]){(!y||P&16)&&X(l,"hidden",!I[4]),P&1&&r.value!==I[0]&&re(r,I[0]),(!y||P&16)&&X(i,"active",I[4]),P&42&&(C=I[3],d=vt(d,P,T,1,I,C,m,c,ls,_p,null,pp),!C.length&&M?M.p(I,P):C.length?M&&(M.d(1),M=null):(M=mp(I),M.c(),M.m(c,null))),(!y||P&64)&&X(c,"fade",I[6]),(!y||P&8)&&X(c,"sidebar-content-compact",I[3].length>20),I[7]?O&&(O.d(1),O=null):O?O.p(I,P):(O=gp(I),O.c(),O.m(e,null));const F={};g.$set(F)},i(I){y||(A(g.$$.fragment,I),y=!0)},o(I){L(g.$$.fragment,I),y=!1},d(I){I&&k(e);for(let P=0;P<d.length;P+=1)d[P].d();M&&M.d(),O&&O.d(),I&&k(h),n[13](null),H(g,I),S=!1,Me($)}}}function _M(){setTimeout(()=>{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function gM(n,e,t){let i,s,l,o,r,a,f;We(n,wi,S=>t(5,o=S)),We(n,ni,S=>t(9,r=S)),We(n,go,S=>t(6,a=S)),We(n,Ts,S=>t(7,f=S));let u,c="";function d(S){tn(wi,o=S,o)}const m=()=>t(0,c="");function _(){c=this.value,t(0,c)}const h=()=>u==null?void 0:u.show();function g(S){ne[S?"unshift":"push"](()=>{u=S,t(2,u)})}const y=S=>{var $;($=S.detail)!=null&&$.isNew&&S.detail.collection&&d(S.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&_M(),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(S=>S.id==c||S.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[c,i,u,l,s,o,a,f,d,r,m,_,h,g,y]}class bM extends ve{constructor(e){super(),be(this,e,gM,hM,me,{})}}function bp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function vp(n){n[18]=n[19].default}function yp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function kp(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function wp(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,f,u,c=i&&kp();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ye(),c&&c.c(),s=E(),l=v("button"),r=U(o),a=E(),p(l,"type","button"),p(l,"class","sidebar-item"),X(l,"active",e[5]===e[14]),this.first=t},m(m,_){w(m,t,_),c&&c.m(m,_),w(m,s,_),w(m,l,_),b(l,r),b(l,a),f||(u=Y(l,"click",d),f=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=kp(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),_&8&&o!==(o=e[15].label+"")&&se(r,o),_&40&&X(l,"active",e[5]===e[14])},d(m){m&&k(t),c&&c.d(m),m&&k(s),m&&k(l),f=!1,u()}}}function Sp(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:kM,then:yM,catch:vM,value:19,blocks:[,,,]};return ff(t=n[15].component,s),{c(){e=ye(),s.block.c()},m(l,o){w(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)&&ff(t,s)||Y1(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];L(r)}i=!1},d(l){l&&k(e),s.block.d(l),s.token=null,s=null}}}function vM(n){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function yM(n){vp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){B(e.$$.fragment),t=E()},m(s,l){V(e,s,l),w(s,t,l),i=!0},p(s,l){vp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){L(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&k(t)}}}function kM(n){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function Cp(n,e){let t,i,s,l=e[5]===e[14]&&Sp(e);return{key:n,first:null,c(){t=ye(),l&&l.c(),i=ye(),this.first=t},m(o,r){w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Sp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),L(l,1,1,()=>{l=null}),fe())},i(o){s||(ALine truncated
form-field form-field-list form-field-file
`+(n[4].required?"required":"")+`
`+(n[9]?"dragover":"")+`
@@ -126,16 +126,16 @@ Also note that some OAuth2 providers (like Twitter), don't return an email and t
form-field form-field-list form-field-file
`+(o[4].required?"required":"")+`
`+(o[9]?"dragover":"")+`
`),r[0]&16&&(a.name=o[4].name),r[0]&268439039|r[1]&64&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(A(t.$$.fragment,o),i=!0)},o(o){L(t.$$.fragment,o),i=!1},d(o){o&&k(e),H(t),s=!1,Me(l)}}}function B5(n,e,t){let i,s,l,{record:o}=e,{field:r}=e,{value:a=""}=e,{uploadedFiles:f=[]}=e,{deletedFileNames:u=[]}=e,c,d,m=!1,_="";function h(j){z.removeByValue(u,j),t(2,u)}function g(j){z.pushUnique(u,j),t(2,u)}function y(j){z.isEmpty(f[j])||f.splice(j,1),t(1,f)}function S(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:a,uploadedFiles:f,deletedFileNames:u},bubbles:!0}))}function $(j){var G,Q;j.preventDefault(),t(9,m=!1);const J=((G=j.dataTransfer)==null?void 0:G.files)||[];if(!(l||!J.length)){for(const K of J){const le=s.length+f.length-u.length;if(((Q=r.options)==null?void 0:Q.maxSelect)<=le)break;f.push(K)}t(1,f)}}Gt(async()=>{t(10,_=await ue.getAdminFileToken(o.collectionId))});const C=j=>h(j),T=j=>g(j);function M(j){a=j,t(0,a),t(6,i),t(4,r)}const O=j=>y(j);function D(j){f=j,t(1,f)}function I(j){ne[j?"unshift":"push"](()=>{c=j,t(7,c)})}const P=()=>{for(let j of c.files)f.push(j);t(1,f),t(7,c.value=null,c)},F=()=>c==null?void 0:c.click();function R(j){ne[j?"unshift":"push"](()=>{d=j,t(8,d)})}const N=()=>{t(9,m=!0)},q=()=>{t(9,m=!1)};return n.$$set=j=>{"record"in j&&t(3,o=j.record),"field"in j&&t(4,r=j.field),"value"in j&&t(0,a=j.value),"uploadedFiles"in j&&t(1,f=j.uploadedFiles),"deletedFileNames"in j&&t(2,u=j.deletedFileNames)},n.$$.update=()=>{var j,J;n.$$.dirty[0]&2&&(Array.isArray(f)||t(1,f=z.toArray(f))),n.$$.dirty[0]&4&&(Array.isArray(u)||t(2,u=z.toArray(u))),n.$$.dirty[0]&16&&t(6,i=((j=r.options)==null?void 0:j.maxSelect)>1),n.$$.dirty[0]&65&&z.isEmpty(a)&&t(0,a=i?[]:""),n.$$.dirty[0]&1&&t(5,s=z.toArray(a)),n.$$.dirty[0]&54&&t(11,l=(s.length||f.length)&&((J=r.options)==null?void 0:J.maxSelect)<=s.length+f.length-u.length),n.$$.dirty[0]&6&&(f!==-1||u!==-1)&&S()},[a,f,u,o,r,s,i,c,d,m,_,l,h,g,y,$,C,T,M,O,D,I,P,F,R,N,q]}class U5 extends ve{constructor(e){super(),be(this,e,B5,H5,me,{record:3,field:4,value:0,uploadedFiles:1,deletedFileNames:2},null,[-1,-1])}}function Pp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function W5(n,e){e=Pp(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=Pp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}function Fp(n,e,t){const i=n.slice();i[5]=e[t];const s=z.toArray(i[0][i[5]]).slice(0,5);return i[6]=s,i}function Np(n,e,t){const i=n.slice();return i[9]=e[t],i}function Rp(n){let e,t;return e=new sf({props:{record:n[0],filename:n[9],size:"xs"}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&5&&(l.filename=i[9]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function qp(n){let e=!z.isEmpty(n[9]),t,i,s=e&&Rp(n);return{c(){s&&s.c(),t=ye()},m(l,o){s&&s.m(l,o),w(l,t,o),i=!0},p(l,o){o&5&&(e=!z.isEmpty(l[9])),e?s?(s.p(l,o),o&5&&A(s,1)):(s=Rp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(ae(),L(s,1,1,()=>{s=null}),fe())},i(l){i||(A(s),i=!0)},o(l){L(s),i=!1},d(l){s&&s.d(l),l&&k(t)}}}function jp(n){let e,t,i=n[6],s=[];for(let o=0;o<i.length;o+=1)s[o]=qp(Np(n,i,o));const l=o=>L(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=ye()},m(o,r){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(o,r);w(o,e,r),t=!0},p(o,r){if(r&5){i=o[6];let a;for(a=0;a<i.length;a+=1){const f=Np(o,i,a);s[a]?(s[a].p(f,r),A(s[a],1)):(s[a]=qp(f),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(ae(),a=i.length;a<s.length;a+=1)l(a);fe()}},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)L(s[r]);t=!1},d(o){_t(s,o),o&&k(e)}}}function Y5(n){let e,t,i,s,l,o,r=z.truncate(z.displayValue(n[0],n[1]),70)+"",a,f,u,c,d=n[2],m=[];for(let h=0;h<d.length;h+=1)m[h]=jp(Fp(n,d,h));const _=h=>L(m[h],1,1,()=>{m[h]=null});return{c(){e=v("div"),t=v("i"),s=E();for(let h=0;h<m.length;h+=1)m[h].c();l=E(),o=v("span"),a=U(r),p(t,"class","link-hint txt-sm ri-information-line svelte-fhw3qk"),p(o,"class","txt txt-ellipsis svelte-fhw3qk"),p(e,"class","record-info svelte-fhw3qk")},m(h,g){w(h,e,g),b(e,t),b(e,s);for(let y=0;y<m.length;y+=1)m[y]&&m[y].m(e,null);b(e,l),b(e,o),b(o,a),f=!0,u||(c=Ce(i=ze.call(null,t,{text:z.truncate(JSON.stringify(z.truncateObject(n[0]),null,2),800,!0),class:"code",position:"left"})),u=!0)},p(h,[g]){if(i&&qt(i.update)&&g&1&&i.update.call(null,{text:z.truncate(JSON.stringify(z.truncateObject(h[0]),null,2),800,!0),class:"code",position:"left"}),g&5){d=h[2];let y;for(y=0;y<d.length;y+=1){const S=Fp(h,d,y);m[y]?(m[y].p(S,g),A(m[y],1)):(m[y]=jp(S),m[y].c(),A(m[y],1),m[y].m(e,l))}for(ae(),y=d.length;y<m.length;y+=1)_(y);fe()}(!f||g&3)&&r!==(r=z.truncate(z.displayValue(h[0],h[1]),70)+"")&&se(a,r)},i(h){ Line truncated
`),I&&I.c(),m=E(),h.c(),g=ye(),p(e,"class","flex m-b-base flex-gap-10"),p(l,"class","list picker-list m-b-base svelte-1u8jhky"),p(c,"class","section-title")},m(N,q){w(N,e,q),V(t,e,null),b(e,i),C&&C.m(e,null),w(N,s,q),w(N,l,q);for(let j=0;j<o.length;j+=1)o[j]&&o[j].m(l,null);O&&O.m(l,null),b(l,a),D&&D.m(l,null),w(N,u,q),w(N,c,q),b(c,d),I&&I.m(c,null),w(N,m,q),F[_].m(N,q),w(N,g,q),y=!0,S||($=Ce(f=W5.call(null,l,n[36])),S=!0)},p(N,q){const j={};q[0]&4&&(j.value=N[2]),q[0]&32&&(j.autocompleteCollection=N[5]),t.$set(j),N[11]?C&&(C.d(1),C=null):C?C.p(N,q):(C=Hp(N),C.c(),C.m(e,null)),q[0]&143252&&(T=N[8],ae(),o=vt(o,q,M,1,N,T,r,l,Ht,Kp,a,Vp),fe(),!T.length&&O?O.p(N,q):T.length?O&&(O.d(1),O=null):(O=Bp(N),O.c(),O.m(l,a))),N[13]?D||(D=Jp(),D.c(),D.m(l,null)):D&&(D.d(1),D=null),f&&qt(f.update)&&q[0]&4104&&f.update.call(null,N[36]),N[4]>1?I?I.p(N,q):(I=Zp(N),I.c(),I.m(c,null)):I&&(I.d(1),I=null);let J=_;_=R(N),_===J?F[_].p(N,q):(ae(),L(F[J],1,1,()=>{F[J]=null}),fe(),h=F[_],h?h.p(N,q):(h=F[_]=P[_](N),h.c()),A(h,1),h.m(g.parentNode,g))},i(N){if(!y){A(t.$$.fragment,N);for(let q=0;q<T.length;q+=1)A(o[q]);A(h),y=!0}},o(N){L(t.$$.fragment,N);for(let q=0;q<o.length;q+=1)L(o[q]);L(h),y=!1},d(N){N&&k(e),H(t),C&&C.d(),N&&k(s),N&&k(l);for(let q=0;q<o.length;q+=1)o[q].d();O&&O.d(),D&&D.d(),N&&k(u),N&&k(c),I&&I.d(),N&&k(m),F[_].d(N),N&&k(g),S=!1,$()}}}function e6(n){var r;let e,t,i,s=(((r=n[5])==null?void 0:r.name)||"")+"",l,o;return{c(){e=v("h4"),t=U("Select "),i=v("strong"),l=U(s),o=U(" records")},m(a,f){w(a,e,f),b(e,t),b(e,i),b(i,l),b(e,o)},p(a,f){var u;f[0]&32&&s!==(s=(((u=a[5])==null?void 0:u.name)||"")+"")&&se(l,s)},d(a){a&&k(e)}}}function t6(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Cancel</span>',t=E(),i=v("button"),i.innerHTML='<span class="txt">Set selection</span>',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[Y(e,"click",n[28]),Y(i,"click",n[29])],s=!0)},p:ee,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Me(l)}}}function n6(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[t6],header:[e6],default:[x5]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)o=qe(o,l[a]);e=new nn({props:o}),n[39](e),e.$on("hide",n[40]),e.$on("show",n[41]);let r={collection:n[5]};return i=new _1({props:r}),n[42](i),i.$on("save",n[43]),i.$on("delete",n[44]),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(a,f){V(e,a,f),w(a,t,f),V(i,a,f),s=!0},p(a,f){const u=f[0]&524288?Ot(l,[l[0],l[1],Xt(a[19])]):{};f[0]&16380|f[1]&33554432&&(u.$$scope={dirty:f,ctx:a}),e.$set(u);const c={};f[0]&32&&(c.collection=a[5]),i.$set(c)},i(a){s||(A(e.$$.fragment,a),A(i.$$.fragment,a),s=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),s=!1},d(a){n[39](null),H(e,a),a&&k(t),n[42](null),H(i,a)}}}const eo=50;function i6(n,e,t){let i,s,l,o,r,a,f,u;const c=["value","field","show","hide"];let d=Qe(e,c),m;We(n,ni,Te=>t(26,m=Te));const _=wt(),h="picker_"+z.randomString(5);let{value:g}=e,{field:y}=e,S,$,C="",T=[],M=[],O=1,D=0,I=!1,P=!1;function F(){return t(2,C=""),t(8,T=[]),t(6,M=[]),N(),q(!0),S==null?void 0:S.show()}function R(){return S==null?void 0:S.hide()}async function N(){const Te=z.toArray(g);if(!s||!Te.length)return;t(24,P=!0);let mt=[];const At=Te.slice(),sn=[];for(;At.length>0;){const De=[];for(const rt of At.splice(0,eo))De.push(`id="${rt}"`);sn.push(ue.collection(s).getFullList(eo,{filter:De.join("||"),$autoCancel:!1}))}try{await Promise.all(sn).then(De=>{mt=mt.concat(...De)}),t(6,M=[]);for(const De of Te){const rt=z.findByKey(mt,"id",De);rt&&M.push(rt)}C.trim()||t(8,T=z.filterDuplicatesByKey(M.concat(T))),t(24,P=!1)}catch(De){De.isAbort||(ue.error(De),t(24,P=!1))}}async function q(Te=!1){if(s){t(3,I=!0),Te&&(C.trim()?t(8,T=[]):t(8,T=z.toArray(M).slice()));try{const mt=Te?1:O+1,At=z.getAllCollectionIdentifiers(l),sn=await ue.collection(s).getList(mt,eo,{filter:z.normalizeSearchFilter(C,At),sort:o?"":"-created",skipTotal:1,$cancelKey:h+"loadList"});t(8,T=z.filterDuplicatesByKey(T.concat(sn.items))),O=sn.page,t(23,D=sn.items.length),t(3,I=!1)}catch(mt){mt.isAbort||(ue.error(mt),t(3,I=!1))}}}function j(Te){i==1?t(6,M=[Te]):f&&(z.pushOrReplaceByKey(M,Te),t(6,M))}function J(Te){z.removeByKey(M,"id",Te.id),t(6,M)}function G(Te){u(Te)?J(Te):j(Te)}function Q(){var Te;i!=1?t(20,g=M.map(mt=>mt.id)):t(20,g=((Te=M==null?void 0:M[0])==null?void 0:Te.id)||""),_("save",M),R()}function K(Te){Fe.call(this,n,Te)}const le=()=>R(),x=()=>Q(),te=Te=>t(2,C=Te.detail),Ee=()=>$==null?void 0:$.show(),Pe=Te=>$==null?void 0:$.show(Te),je=Te=>G(Te),Ve=(Te,mt)=>{(mt.code==="Enter"||mt.code==="Space")&&(mt.preventDefault(),mt.stopPropagation(),G(Te))},ke=()=>t(2,C=""),$e=()=>{a&&!I&&q()},Je=Te=>J(Te);function gt(Te){M=Te,t(6,M)}function Ze(Te){ne[Te?"unshift":"push"](()=>{S=Te,t(1,S)})}function Ye(Te){Fe.call(this,n,Te)}function kt(Te){Fe.call(this,n,Te)}function pe(Te){ne[Te?"unshift":"push"](()=>{$=Te,t(7,$)})}const he=Te=>{z.removeByKey(T,"i Line truncated
`),r[0]&16&&(a.name=o[4].name),r[0]&268439039|r[1]&64&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(A(t.$$.fragment,o),i=!0)},o(o){L(t.$$.fragment,o),i=!1},d(o){o&&k(e),H(t),s=!1,Me(l)}}}function B5(n,e,t){let i,s,l,{record:o}=e,{field:r}=e,{value:a=""}=e,{uploadedFiles:f=[]}=e,{deletedFileNames:u=[]}=e,c,d,m=!1,_="";function h(z){j.removeByValue(u,z),t(2,u)}function g(z){j.pushUnique(u,z),t(2,u)}function y(z){j.isEmpty(f[z])||f.splice(z,1),t(1,f)}function S(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:a,uploadedFiles:f,deletedFileNames:u},bubbles:!0}))}function $(z){var G,Q;z.preventDefault(),t(9,m=!1);const J=((G=z.dataTransfer)==null?void 0:G.files)||[];if(!(l||!J.length)){for(const K of J){const le=s.length+f.length-u.length;if(((Q=r.options)==null?void 0:Q.maxSelect)<=le)break;f.push(K)}t(1,f)}}Gt(async()=>{t(10,_=await ue.getAdminFileToken(o.collectionId))});const C=z=>h(z),T=z=>g(z);function M(z){a=z,t(0,a),t(6,i),t(4,r)}const O=z=>y(z);function D(z){f=z,t(1,f)}function I(z){ne[z?"unshift":"push"](()=>{c=z,t(7,c)})}const P=()=>{for(let z of c.files)f.push(z);t(1,f),t(7,c.value=null,c)},F=()=>c==null?void 0:c.click();function R(z){ne[z?"unshift":"push"](()=>{d=z,t(8,d)})}const N=()=>{t(9,m=!0)},q=()=>{t(9,m=!1)};return n.$$set=z=>{"record"in z&&t(3,o=z.record),"field"in z&&t(4,r=z.field),"value"in z&&t(0,a=z.value),"uploadedFiles"in z&&t(1,f=z.uploadedFiles),"deletedFileNames"in z&&t(2,u=z.deletedFileNames)},n.$$.update=()=>{var z,J;n.$$.dirty[0]&2&&(Array.isArray(f)||t(1,f=j.toArray(f))),n.$$.dirty[0]&4&&(Array.isArray(u)||t(2,u=j.toArray(u))),n.$$.dirty[0]&16&&t(6,i=((z=r.options)==null?void 0:z.maxSelect)>1),n.$$.dirty[0]&65&&j.isEmpty(a)&&t(0,a=i?[]:""),n.$$.dirty[0]&1&&t(5,s=j.toArray(a)),n.$$.dirty[0]&54&&t(11,l=(s.length||f.length)&&((J=r.options)==null?void 0:J.maxSelect)<=s.length+f.length-u.length),n.$$.dirty[0]&6&&(f!==-1||u!==-1)&&S()},[a,f,u,o,r,s,i,c,d,m,_,l,h,g,y,$,C,T,M,O,D,I,P,F,R,N,q]}class U5 extends ve{constructor(e){super(),be(this,e,B5,H5,me,{record:3,field:4,value:0,uploadedFiles:1,deletedFileNames:2},null,[-1,-1])}}function Pp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function W5(n,e){e=Pp(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=Pp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}function Fp(n,e,t){const i=n.slice();i[5]=e[t];const s=j.toArray(i[0][i[5]]).slice(0,5);return i[6]=s,i}function Np(n,e,t){const i=n.slice();return i[9]=e[t],i}function Rp(n){let e,t;return e=new sf({props:{record:n[0],filename:n[9],size:"xs"}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&5&&(l.filename=i[9]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function qp(n){let e=!j.isEmpty(n[9]),t,i,s=e&&Rp(n);return{c(){s&&s.c(),t=ye()},m(l,o){s&&s.m(l,o),w(l,t,o),i=!0},p(l,o){o&5&&(e=!j.isEmpty(l[9])),e?s?(s.p(l,o),o&5&&A(s,1)):(s=Rp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(ae(),L(s,1,1,()=>{s=null}),fe())},i(l){i||(A(s),i=!0)},o(l){L(s),i=!1},d(l){s&&s.d(l),l&&k(t)}}}function jp(n){let e,t,i=n[6],s=[];for(let o=0;o<i.length;o+=1)s[o]=qp(Np(n,i,o));const l=o=>L(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=ye()},m(o,r){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(o,r);w(o,e,r),t=!0},p(o,r){if(r&5){i=o[6];let a;for(a=0;a<i.length;a+=1){const f=Np(o,i,a);s[a]?(s[a].p(f,r),A(s[a],1)):(s[a]=qp(f),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(ae(),a=i.length;a<s.length;a+=1)l(a);fe()}},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)L(s[r]);t=!1},d(o){_t(s,o),o&&k(e)}}}function Y5(n){let e,t,i,s,l,o,r=j.truncate(j.displayValue(n[0],n[1]),70)+"",a,f,u,c,d=n[2],m=[];for(let h=0;h<d.length;h+=1)m[h]=jp(Fp(n,d,h));const _=h=>L(m[h],1,1,()=>{m[h]=null});return{c(){e=v("div"),t=v("i"),s=E();for(let h=0;h<m.length;h+=1)m[h].c();l=E(),o=v("span"),a=U(r),p(t,"class","link-hint txt-sm ri-information-line svelte-fhw3qk"),p(o,"class","txt txt-ellipsis svelte-fhw3qk"),p(e,"class","record-info svelte-fhw3qk")},m(h,g){w(h,e,g),b(e,t),b(e,s);for(let y=0;y<m.length;y+=1)m[y]&&m[y].m(e,null);b(e,l),b(e,o),b(o,a),f=!0,u||(c=Ce(i=ze.call(null,t,{text:j.truncate(JSON.stringify(j.truncateObject(n[0]),null,2),800,!0),class:"code",position:"left"})),u=!0)},p(h,[g]){if(i&&qt(i.update)&&g&1&&i.update.call(null,{text:j.truncate(JSON.stringify(j.truncateObject(h[0]),null,2),800,!0),class:"code",position:"left"}),g&5){d=h[2];let y;for(y=0;y<d.length;y+=1){const S=Fp(h,d,y);m[y]?(m[y].p(S,g),A(m[y],1)):(m[y]=jp(S),m[y].c(),A(m[y],1),m[y].m(e,l))}for(ae(),y=d.length;y<m.length;y+=1)_(y);fe()}(!f||g&3)&&r!==(r=j.truncate(j.displayValue(h[0],h[1]),70)+"")&&se(a,r)},i(h){ Line truncated
`),I&&I.c(),m=E(),h.c(),g=ye(),p(e,"class","flex m-b-base flex-gap-10"),p(l,"class","list picker-list m-b-base svelte-1u8jhky"),p(c,"class","section-title")},m(N,q){w(N,e,q),V(t,e,null),b(e,i),C&&C.m(e,null),w(N,s,q),w(N,l,q);for(let z=0;z<o.length;z+=1)o[z]&&o[z].m(l,null);O&&O.m(l,null),b(l,a),D&&D.m(l,null),w(N,u,q),w(N,c,q),b(c,d),I&&I.m(c,null),w(N,m,q),F[_].m(N,q),w(N,g,q),y=!0,S||($=Ce(f=W5.call(null,l,n[36])),S=!0)},p(N,q){const z={};q[0]&4&&(z.value=N[2]),q[0]&32&&(z.autocompleteCollection=N[5]),t.$set(z),N[11]?C&&(C.d(1),C=null):C?C.p(N,q):(C=Hp(N),C.c(),C.m(e,null)),q[0]&143252&&(T=N[8],ae(),o=vt(o,q,M,1,N,T,r,l,Ht,Kp,a,Vp),fe(),!T.length&&O?O.p(N,q):T.length?O&&(O.d(1),O=null):(O=Bp(N),O.c(),O.m(l,a))),N[13]?D||(D=Jp(),D.c(),D.m(l,null)):D&&(D.d(1),D=null),f&&qt(f.update)&&q[0]&4104&&f.update.call(null,N[36]),N[4]>1?I?I.p(N,q):(I=Zp(N),I.c(),I.m(c,null)):I&&(I.d(1),I=null);let J=_;_=R(N),_===J?F[_].p(N,q):(ae(),L(F[J],1,1,()=>{F[J]=null}),fe(),h=F[_],h?h.p(N,q):(h=F[_]=P[_](N),h.c()),A(h,1),h.m(g.parentNode,g))},i(N){if(!y){A(t.$$.fragment,N);for(let q=0;q<T.length;q+=1)A(o[q]);A(h),y=!0}},o(N){L(t.$$.fragment,N);for(let q=0;q<o.length;q+=1)L(o[q]);L(h),y=!1},d(N){N&&k(e),H(t),C&&C.d(),N&&k(s),N&&k(l);for(let q=0;q<o.length;q+=1)o[q].d();O&&O.d(),D&&D.d(),N&&k(u),N&&k(c),I&&I.d(),N&&k(m),F[_].d(N),N&&k(g),S=!1,$()}}}function e6(n){var r;let e,t,i,s=(((r=n[5])==null?void 0:r.name)||"")+"",l,o;return{c(){e=v("h4"),t=U("Select "),i=v("strong"),l=U(s),o=U(" records")},m(a,f){w(a,e,f),b(e,t),b(e,i),b(i,l),b(e,o)},p(a,f){var u;f[0]&32&&s!==(s=(((u=a[5])==null?void 0:u.name)||"")+"")&&se(l,s)},d(a){a&&k(e)}}}function t6(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Cancel</span>',t=E(),i=v("button"),i.innerHTML='<span class="txt">Set selection</span>',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[Y(e,"click",n[28]),Y(i,"click",n[29])],s=!0)},p:ee,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Me(l)}}}function n6(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[t6],header:[e6],default:[x5]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)o=qe(o,l[a]);e=new nn({props:o}),n[39](e),e.$on("hide",n[40]),e.$on("show",n[41]);let r={collection:n[5]};return i=new _1({props:r}),n[42](i),i.$on("save",n[43]),i.$on("delete",n[44]),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(a,f){V(e,a,f),w(a,t,f),V(i,a,f),s=!0},p(a,f){const u=f[0]&524288?Ot(l,[l[0],l[1],Xt(a[19])]):{};f[0]&16380|f[1]&33554432&&(u.$$scope={dirty:f,ctx:a}),e.$set(u);const c={};f[0]&32&&(c.collection=a[5]),i.$set(c)},i(a){s||(A(e.$$.fragment,a),A(i.$$.fragment,a),s=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),s=!1},d(a){n[39](null),H(e,a),a&&k(t),n[42](null),H(i,a)}}}const eo=50;function i6(n,e,t){let i,s,l,o,r,a,f,u;const c=["value","field","show","hide"];let d=Qe(e,c),m;We(n,ni,Te=>t(26,m=Te));const _=wt(),h="picker_"+j.randomString(5);let{value:g}=e,{field:y}=e,S,$,C="",T=[],M=[],O=1,D=0,I=!1,P=!1;function F(){return t(2,C=""),t(8,T=[]),t(6,M=[]),N(),q(!0),S==null?void 0:S.show()}function R(){return S==null?void 0:S.hide()}async function N(){const Te=j.toArray(g);if(!s||!Te.length)return;t(24,P=!0);let mt=[];const At=Te.slice(),sn=[];for(;At.length>0;){const De=[];for(const rt of At.splice(0,eo))De.push(`id="${rt}"`);sn.push(ue.collection(s).getFullList(eo,{filter:De.join("||"),$autoCancel:!1}))}try{await Promise.all(sn).then(De=>{mt=mt.concat(...De)}),t(6,M=[]);for(const De of Te){const rt=j.findByKey(mt,"id",De);rt&&M.push(rt)}C.trim()||t(8,T=j.filterDuplicatesByKey(M.concat(T))),t(24,P=!1)}catch(De){De.isAbort||(ue.error(De),t(24,P=!1))}}async function q(Te=!1){if(s){t(3,I=!0),Te&&(C.trim()?t(8,T=[]):t(8,T=j.toArray(M).slice()));try{const mt=Te?1:O+1,At=j.getAllCollectionIdentifiers(l),sn=await ue.collection(s).getList(mt,eo,{filter:j.normalizeSearchFilter(C,At),sort:o?"":"-created",skipTotal:1,$cancelKey:h+"loadList"});t(8,T=j.filterDuplicatesByKey(T.concat(sn.items))),O=sn.page,t(23,D=sn.items.length),t(3,I=!1)}catch(mt){mt.isAbort||(ue.error(mt),t(3,I=!1))}}}function z(Te){i==1?t(6,M=[Te]):f&&(j.pushOrReplaceByKey(M,Te),t(6,M))}function J(Te){j.removeByKey(M,"id",Te.id),t(6,M)}function G(Te){u(Te)?J(Te):z(Te)}function Q(){var Te;i!=1?t(20,g=M.map(mt=>mt.id)):t(20,g=((Te=M==null?void 0:M[0])==null?void 0:Te.id)||""),_("save",M),R()}function K(Te){Fe.call(this,n,Te)}const le=()=>R(),x=()=>Q(),te=Te=>t(2,C=Te.detail),Ee=()=>$==null?void 0:$.show(),Pe=Te=>$==null?void 0:$.show(Te),je=Te=>G(Te),Ve=(Te,mt)=>{(mt.code==="Enter"||mt.code==="Space")&&(mt.preventDefault(),mt.stopPropagation(),G(Te))},ke=()=>t(2,C=""),$e=()=>{a&&!I&&q()},Je=Te=>J(Te);function gt(Te){M=Te,t(6,M)}function Ze(Te){ne[Te?"unshift":"push"](()=>{S=Te,t(1,S)})}function Ye(Te){Fe.call(this,n,Te)}function kt(Te){Fe.call(this,n,Te)}function pe(Te){ne[Te?"unshift":"push"](()=>{$=Te,t(7,$)})}const he=Te=>{j.removeByKey(T,"i Line truncated
`,p(e,"class","list-item")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function l6(n){let e,t,i,s,l,o,r,a,f,u;i=new Qo({props:{record:n[20]}});function c(){return n[10](n[20])}return{c(){e=v("div"),t=v("div"),B(i.$$.fragment),s=E(),l=v("div"),o=v("button"),o.innerHTML='<i class="ri-close-line"></i>',r=E(),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"),X(e,"dragging",n[23]),X(e,"dragover",n[24])},m(d,m){w(d,e,m),b(e,t),V(i,t,null),b(e,s),b(e,l),b(l,o),w(d,r,m),a=!0,f||(u=[Ce(ze.call(null,o,"Remove")),Y(o,"click",c)],f=!0)},p(d,m){n=d;const _={};m&16&&(_.record=n[20]),i.$set(_),(!a||m&8388608)&&X(e,"dragging",n[23]),(!a||m&16777216)&&X(e,"dragover",n[24])},i(d){a||(A(i.$$.fragment,d),a=!0)},o(d){L(i.$$.fragment,d),a=!1},d(d){d&&k(e),H(i),d&&k(r),f=!1,Me(u)}}}function nm(n,e){let t,i,s,l;function o(a){e[11](a)}let r={group:e[2].name+"_relation",index:e[22],disabled:!e[6],$$slots:{default:[l6,({dragging:a,dragover:f})=>({23:a,24:f}),({dragging:a,dragover:f})=>(a?8388608:0)|(f?16777216:0)]},$$scope:{ctx:e}};return e[4]!==void 0&&(r.list=e[4]),i=new Ol({props:r}),ne.push(()=>de(i,"list",o)),i.$on("sort",e[12]),{key:n,first:null,c(){t=ye(),B(i.$$.fragment),this.first=t},m(a,f){w(a,t,f),V(i,a,f),l=!0},p(a,f){e=a;const u={};f&4&&(u.group=e[2].name+"_relation"),f&16&&(u.index=e[22]),f&64&&(u.disabled=!e[6]),f&293601296&&(u.$$scope={dirty:f,ctx:e}),!s&&f&16&&(s=!0,u.list=e[4],ge(()=>s=!1)),i.$set(u)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){L(i.$$.fragment,a),l=!1},d(a){a&&k(t),H(i,a)}}}function o6(n){let e,t,i,s,l,o=n[2].name+"",r,a,f,u,c,d=[],m=new Map,_,h,g,y,S,$,C=n[4];const T=O=>O[20].id;for(let O=0;O<C.length;O+=1){let D=Xp(n,C,O),I=T(D);m.set(I,d[O]=nm(I,D))}let M=null;return C.length||(M=xp(n)),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),f=E(),u=v("div"),c=v("div");for(let O=0;O<d.length;O+=1)d[O].c();M&&M.c(),_=E(),h=v("div"),g=v("button"),g.innerHTML=`<i class="ri-magic-line"></i>
<span class="txt">Open picker</span>`,p(t,"class",i=is(z.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[19]),p(c,"class","relations-list svelte-1ynw0pc"),p(g,"type","button"),p(g,"class","btn btn-transparent btn-sm btn-block"),p(h,"class","list-item list-item-btn"),p(u,"class","list")},m(O,D){w(O,e,D),b(e,t),b(e,s),b(e,l),b(l,r),w(O,f,D),w(O,u,D),b(u,c);for(let I=0;I<d.length;I+=1)d[I]&&d[I].m(c,null);M&&M.m(c,null),b(u,_),b(u,h),b(h,g),y=!0,S||($=Y(g,"click",n[13]),S=!0)},p(O,D){(!y||D&4&&i!==(i=is(z.getFieldTypeIcon(O[2].type))+" svelte-1ynw0pc"))&&p(t,"class",i),(!y||D&4)&&o!==(o=O[2].name+"")&&se(r,o),(!y||D&524288&&a!==(a=O[19]))&&p(e,"for",a),D&25166325&&(C=O[4],ae(),d=vt(d,D,T,1,O,C,m,c,Ht,nm,null,Xp),fe(),!C.length&&M?M.p(O,D):C.length?M&&(M.d(1),M=null):(M=xp(O),M.c(),M.m(c,null)))},i(O){if(!y){for(let D=0;D<C.length;D+=1)A(d[D]);y=!0}},o(O){for(let D=0;D<d.length;D+=1)L(d[D]);y=!1},d(O){O&&k(e),O&&k(f),O&&k(u);for(let D=0;D<d.length;D+=1)d[D].d();M&&M.d(),S=!1,$()}}}function r6(n){let e,t,i,s,l={class:"form-field form-field-list "+(n[2].required?"required":""),name:n[2].name,$$slots:{default:[o6,({uniqueId:r})=>({19:r}),({uniqueId:r})=>r?524288:0]},$$scope:{ctx:n}};e=new ce({props:l}),n[14](e);let o={value:n[0],field:n[2]};return i=new s6({props:o}),n[15](i),i.$on("save",n[16]),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(r,a){V(e,r,a),w(r,t,a),V(i,r,a),s=!0},p(r,[a]){const f={};a&4&&(f.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(f.name=r[2].name),a&268959863&&(f.$$scope={dirty:a,ctx:r}),e.$set(f);const u={};a&1&&(u.value=r[0]),a&4&&(u.field=r[2]),i.$set(u)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){L(e.$$.fragment,r),L(i.$$.fragment,r),s=!1},d(r){n[14](null),H(e,r),r&&k(t),n[15](null),H(i,r)}}}const im=100;function a6(n,e,t){let i,{field:s}=e,{value:l}=e,{picker:o}=e,r,a=[],f=!1,u;function c(){if(f)return!1;const M=z.toArray(l);return t(4,a=a.filter(O=>M.includes(O.id))),M.length!=a.length}async function d(){var I,P;const M=z.toArray(l);if(t(4,a=[]),!((I=s==null?void 0:s.options)!=null&&I.collectionId)||!M.length){t(5,f=!1);return}t(5,f=!0);const O=M.slice(),D=[];for(;O.length>0;){const F=[];for(const R of O.splice(0,im))F.push(`id="${R}"`);D.push(ue.collection((P=s==null?void 0:s.options)==null?void 0:P.collectionId).getFullList(im,{filter:F.join("||"),$autoCancel:!1}))}try{let F=[];await Promise.all(D).then(R=>{F=F.concat(...R)});for(const R of M){const N=z.findByKey(F,"id",R);N&&a.push(N)}t(4,a),_()}catch(F){ue.error(F)}t(5,f=!1)}function m(M){z.removeByKey(a,"id",M.id),t(4,a),_()}function _(){var M;i?t(0,l=a.map(O=>O.id)):t(0,l=((M=a[0])==null?void 0:M.id)||"")}Fo(()=>{clearTimeout(u)});const h=M=>m(M);function g(M){a=M,t(4,a)}const y=()=>{_()},S=()=>o==null?void 0:o.show();function $(M){ne[M?"unshift":"push"](()=>{r=M,t(3,r)})}function C(M){ne[M?"unshift":"push"](()=>{o=M,t(1,o)})}const T=M=>{var O;t(4,a=M.detail||[]),t(0,l=i?a.map(D=>D.id):((O=a[0])==null?void 0:O.id)||"")};return n.$$set=M=>{"field"in M&&t(2,s=M.field),"value"in M&&t(0,l=M.value),"picker"in M&&t(1,o=M.picker)},n.$$.update=()=>{var M;n.$$.dirty&4&&t(6,i=((M=s.options)==null?void 0:M.maxSelect)!=1),n.$$.dirty&9&&typeof l<"u"&&(r==null||r.changed()),n.$$.dirty&529&&c()&&(t(5,f=!0),clearTimeout(u),t(9,u=setTimeout(d,0)))},[l,o,s,r,a,f,i,m,_,u,h,g,y,S,$,C,T]}class f6 extends ve{constructor(e){super(),be(this,e,a6,r6,me,{field:2,value:0,picker:1})}}const u6=["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"],c6=(n,e)=>{u6.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function d6(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),Nr(e,"visibility","hidden")},m(t,i){w(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&k(e),n[18](null)}}}function p6(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){w(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&k(e),n[17](null)}}}function m6(n){let e;function t(l,o){return l[1]?p6:d6}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){w(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:ee,o:ee,d(l){l&&k(e),s.d(),n[19](null)}}}const h1=n=>n+"_"+Math.floor(Math.random()*1e9)+String(DatLine truncated
<span class="txt">Open picker</span>`,p(t,"class",i=is(j.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[19]),p(c,"class","relations-list svelte-1ynw0pc"),p(g,"type","button"),p(g,"class","btn btn-transparent btn-sm btn-block"),p(h,"class","list-item list-item-btn"),p(u,"class","list")},m(O,D){w(O,e,D),b(e,t),b(e,s),b(e,l),b(l,r),w(O,f,D),w(O,u,D),b(u,c);for(let I=0;I<d.length;I+=1)d[I]&&d[I].m(c,null);M&&M.m(c,null),b(u,_),b(u,h),b(h,g),y=!0,S||($=Y(g,"click",n[13]),S=!0)},p(O,D){(!y||D&4&&i!==(i=is(j.getFieldTypeIcon(O[2].type))+" svelte-1ynw0pc"))&&p(t,"class",i),(!y||D&4)&&o!==(o=O[2].name+"")&&se(r,o),(!y||D&524288&&a!==(a=O[19]))&&p(e,"for",a),D&25166325&&(C=O[4],ae(),d=vt(d,D,T,1,O,C,m,c,Ht,nm,null,Xp),fe(),!C.length&&M?M.p(O,D):C.length?M&&(M.d(1),M=null):(M=xp(O),M.c(),M.m(c,null)))},i(O){if(!y){for(let D=0;D<C.length;D+=1)A(d[D]);y=!0}},o(O){for(let D=0;D<d.length;D+=1)L(d[D]);y=!1},d(O){O&&k(e),O&&k(f),O&&k(u);for(let D=0;D<d.length;D+=1)d[D].d();M&&M.d(),S=!1,$()}}}function r6(n){let e,t,i,s,l={class:"form-field form-field-list "+(n[2].required?"required":""),name:n[2].name,$$slots:{default:[o6,({uniqueId:r})=>({19:r}),({uniqueId:r})=>r?524288:0]},$$scope:{ctx:n}};e=new ce({props:l}),n[14](e);let o={value:n[0],field:n[2]};return i=new s6({props:o}),n[15](i),i.$on("save",n[16]),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(r,a){V(e,r,a),w(r,t,a),V(i,r,a),s=!0},p(r,[a]){const f={};a&4&&(f.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(f.name=r[2].name),a&268959863&&(f.$$scope={dirty:a,ctx:r}),e.$set(f);const u={};a&1&&(u.value=r[0]),a&4&&(u.field=r[2]),i.$set(u)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){L(e.$$.fragment,r),L(i.$$.fragment,r),s=!1},d(r){n[14](null),H(e,r),r&&k(t),n[15](null),H(i,r)}}}const im=100;function a6(n,e,t){let i,{field:s}=e,{value:l}=e,{picker:o}=e,r,a=[],f=!1,u;function c(){if(f)return!1;const M=j.toArray(l);return t(4,a=a.filter(O=>M.includes(O.id))),M.length!=a.length}async function d(){var I,P;const M=j.toArray(l);if(t(4,a=[]),!((I=s==null?void 0:s.options)!=null&&I.collectionId)||!M.length){t(5,f=!1);return}t(5,f=!0);const O=M.slice(),D=[];for(;O.length>0;){const F=[];for(const R of O.splice(0,im))F.push(`id="${R}"`);D.push(ue.collection((P=s==null?void 0:s.options)==null?void 0:P.collectionId).getFullList(im,{filter:F.join("||"),$autoCancel:!1}))}try{let F=[];await Promise.all(D).then(R=>{F=F.concat(...R)});for(const R of M){const N=j.findByKey(F,"id",R);N&&a.push(N)}t(4,a),_()}catch(F){ue.error(F)}t(5,f=!1)}function m(M){j.removeByKey(a,"id",M.id),t(4,a),_()}function _(){var M;i?t(0,l=a.map(O=>O.id)):t(0,l=((M=a[0])==null?void 0:M.id)||"")}Fo(()=>{clearTimeout(u)});const h=M=>m(M);function g(M){a=M,t(4,a)}const y=()=>{_()},S=()=>o==null?void 0:o.show();function $(M){ne[M?"unshift":"push"](()=>{r=M,t(3,r)})}function C(M){ne[M?"unshift":"push"](()=>{o=M,t(1,o)})}const T=M=>{var O;t(4,a=M.detail||[]),t(0,l=i?a.map(D=>D.id):((O=a[0])==null?void 0:O.id)||"")};return n.$$set=M=>{"field"in M&&t(2,s=M.field),"value"in M&&t(0,l=M.value),"picker"in M&&t(1,o=M.picker)},n.$$.update=()=>{var M;n.$$.dirty&4&&t(6,i=((M=s.options)==null?void 0:M.maxSelect)!=1),n.$$.dirty&9&&typeof l<"u"&&(r==null||r.changed()),n.$$.dirty&529&&c()&&(t(5,f=!0),clearTimeout(u),t(9,u=setTimeout(d,0)))},[l,o,s,r,a,f,i,m,_,u,h,g,y,S,$,C,T]}class f6 extends ve{constructor(e){super(),be(this,e,a6,r6,me,{field:2,value:0,picker:1})}}const u6=["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"],c6=(n,e)=>{u6.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function d6(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),Nr(e,"visibility","hidden")},m(t,i){w(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&k(e),n[18](null)}}}function p6(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){w(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&k(e),n[17](null)}}}function m6(n){let e;function t(l,o){return l[1]?p6:d6}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){w(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:ee,o:ee,d(l){l&&k(e),s.d(),n[19](null)}}}const h1=n=>n+"_"+Math.floor(Math.random()*1e9)+String(DatLine truncated
...
-----END PRIVATE KEY-----`),p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),re(l,n[5]),w(c,r,d),w(c,a,d),f||(u=Y(l,"input",n[16]),f=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&32&&re(l,c[5])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),f=!1,u()}}}function H6(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S;return s=new ce({props:{class:"form-field required",name:"clientId",$$slots:{default:[R6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"teamId",$$slots:{default:[q6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field required",name:"keyId",$$slots:{default:[j6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),m=new ce({props:{class:"form-field required",name:"duration",$$slots:{default:[z6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),h=new ce({props:{class:"form-field required",name:"privateKey",$$slots:{default:[V6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),i=v("div"),B(s.$$.fragment),l=E(),o=v("div"),B(r.$$.fragment),a=E(),f=v("div"),B(u.$$.fragment),c=E(),d=v("div"),B(m.$$.fragment),_=E(),B(h.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(f,"class","col-lg-6"),p(d,"class","col-lg-6"),p(t,"class","grid"),p(e,"id",n[9]),p(e,"autocomplete","off")},m($,C){w($,e,C),b(e,t),b(t,i),V(s,i,null),b(t,l),b(t,o),V(r,o,null),b(t,a),b(t,f),V(u,f,null),b(t,c),b(t,d),V(m,d,null),b(t,_),V(h,t,null),g=!0,y||(S=Y(e,"submit",Xe(n[17])),y=!0)},p($,C){const T={};C&25165828&&(T.$$scope={dirty:C,ctx:$}),s.$set(T);const M={};C&25165832&&(M.$$scope={dirty:C,ctx:$}),r.$set(M);const O={};C&25165840&&(O.$$scope={dirty:C,ctx:$}),u.$set(O);const D={};C&25165888&&(D.$$scope={dirty:C,ctx:$}),m.$set(D);const I={};C&25165856&&(I.$$scope={dirty:C,ctx:$}),h.$set(I)},i($){g||(A(s.$$.fragment,$),A(r.$$.fragment,$),A(u.$$.fragment,$),A(m.$$.fragment,$),A(h.$$.fragment,$),g=!0)},o($){L(s.$$.fragment,$),L(r.$$.fragment,$),L(u.$$.fragment,$),L(m.$$.fragment,$),L(h.$$.fragment,$),g=!1},d($){$&&k(e),H(s),H(r),H(u),H(m),H(h),y=!1,S()}}}function B6(n){let e;return{c(){e=v("h4"),e.textContent="Generate Apple client secret",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function U6(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("button"),t=U("Close"),i=E(),s=v("button"),l=v("i"),o=E(),r=v("span"),r.textContent="Generate and set secret",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[7],p(l,"class","ri-key-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[9]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],X(s,"btn-loading",n[7])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=Y(e,"click",n[0]),f=!0)},p(c,d){d&128&&(e.disabled=c[7]),d&384&&a!==(a=!c[8]||c[7])&&(s.disabled=a),d&128&&X(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,u()}}}function W6(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[U6],header:[B6],default:[H6]},$$scope:{ctx:n}};return e=new nn({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[19](null),H(e,s)}}}const ao=15777e3;function Y6(n,e,t){let i;const s=wt(),l="apple_secret_"+z.randomString(5);let o,r,a,f,u,c,d=!1;function m(P={}){t(2,r=P.clientId||""),t(3,a=P.teamId||""),t(4,f=P.keyId||""),t(5,u=P.privateKey||""),t(6,c=P.duration||ao),xt({}),o==null||o.show()}function _(){return o==null?void 0:o.hide()}async function h(){t(7,d=!0);try{const P=await ue.settings.generateAppleClientSecret(r,a,f,u.trim(),c);t(7,d=!1),zt("Successfully generated client secret."),s("submit",P),o==null||o.hide()}catch(P){ue.error(P)}t(7,d=!1)}function g(){r=this.value,t(2,r)}function y(){a=this.value,t(3,a)}function S(){f=this.value,t(4,f)}function $(){c=this.value,t(6,c)}function C(){u=this.value,t(5,u)}const T=()=>h(),M=()=>!d;function O(P){ne[P?"unshift":"push"](()=>{o=P,t(1,o)})}function D(P){Fe.call(this,n,P)}function I(P){Fe.call(this,n,P)}return t(8,i=!0),[_,o,r,a,f,u,c,d,i,l,h,m,g,y,S,$,C,T,M,O,D,I]}class K6 extends ve{constructor(e){super(),be(this,e,Y6,W6,me,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function J6(n){let e,t,i,s,l,o,r,a,f,u,c={};return r=new K6({props:c}),n[4](r),r.$on("submit",n[5]),{c(){e=v("button"),t=v("i"),i=E(),s=v("span"),s.textContent="Generate secret",o=E(),B(r.$$.fragment),p(t,"class","ri-key-line"),p(s,"class","txt"),p(e,"type","button"),p(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(d,m){w(d,e,m),b(e,t),b(e,i),b(e,s),w(d,o,m),V(r,d,m), Line truncated
-----END PRIVATE KEY-----`),p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),re(l,n[5]),w(c,r,d),w(c,a,d),f||(u=Y(l,"input",n[16]),f=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&32&&re(l,c[5])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),f=!1,u()}}}function H6(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S;return s=new ce({props:{class:"form-field required",name:"clientId",$$slots:{default:[R6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"teamId",$$slots:{default:[q6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field required",name:"keyId",$$slots:{default:[j6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),m=new ce({props:{class:"form-field required",name:"duration",$$slots:{default:[z6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),h=new ce({props:{class:"form-field required",name:"privateKey",$$slots:{default:[V6,({uniqueId:$})=>({23:$}),({uniqueId:$})=>$?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),i=v("div"),B(s.$$.fragment),l=E(),o=v("div"),B(r.$$.fragment),a=E(),f=v("div"),B(u.$$.fragment),c=E(),d=v("div"),B(m.$$.fragment),_=E(),B(h.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(f,"class","col-lg-6"),p(d,"class","col-lg-6"),p(t,"class","grid"),p(e,"id",n[9]),p(e,"autocomplete","off")},m($,C){w($,e,C),b(e,t),b(t,i),V(s,i,null),b(t,l),b(t,o),V(r,o,null),b(t,a),b(t,f),V(u,f,null),b(t,c),b(t,d),V(m,d,null),b(t,_),V(h,t,null),g=!0,y||(S=Y(e,"submit",Xe(n[17])),y=!0)},p($,C){const T={};C&25165828&&(T.$$scope={dirty:C,ctx:$}),s.$set(T);const M={};C&25165832&&(M.$$scope={dirty:C,ctx:$}),r.$set(M);const O={};C&25165840&&(O.$$scope={dirty:C,ctx:$}),u.$set(O);const D={};C&25165888&&(D.$$scope={dirty:C,ctx:$}),m.$set(D);const I={};C&25165856&&(I.$$scope={dirty:C,ctx:$}),h.$set(I)},i($){g||(A(s.$$.fragment,$),A(r.$$.fragment,$),A(u.$$.fragment,$),A(m.$$.fragment,$),A(h.$$.fragment,$),g=!0)},o($){L(s.$$.fragment,$),L(r.$$.fragment,$),L(u.$$.fragment,$),L(m.$$.fragment,$),L(h.$$.fragment,$),g=!1},d($){$&&k(e),H(s),H(r),H(u),H(m),H(h),y=!1,S()}}}function B6(n){let e;return{c(){e=v("h4"),e.textContent="Generate Apple client secret",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function U6(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("button"),t=U("Close"),i=E(),s=v("button"),l=v("i"),o=E(),r=v("span"),r.textContent="Generate and set secret",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[7],p(l,"class","ri-key-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[9]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],X(s,"btn-loading",n[7])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=Y(e,"click",n[0]),f=!0)},p(c,d){d&128&&(e.disabled=c[7]),d&384&&a!==(a=!c[8]||c[7])&&(s.disabled=a),d&128&&X(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,u()}}}function W6(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[U6],header:[B6],default:[H6]},$$scope:{ctx:n}};return e=new nn({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[19](null),H(e,s)}}}const ao=15777e3;function Y6(n,e,t){let i;const s=wt(),l="apple_secret_"+j.randomString(5);let o,r,a,f,u,c,d=!1;function m(P={}){t(2,r=P.clientId||""),t(3,a=P.teamId||""),t(4,f=P.keyId||""),t(5,u=P.privateKey||""),t(6,c=P.duration||ao),xt({}),o==null||o.show()}function _(){return o==null?void 0:o.hide()}async function h(){t(7,d=!0);try{const P=await ue.settings.generateAppleClientSecret(r,a,f,u.trim(),c);t(7,d=!1),zt("Successfully generated client secret."),s("submit",P),o==null||o.hide()}catch(P){ue.error(P)}t(7,d=!1)}function g(){r=this.value,t(2,r)}function y(){a=this.value,t(3,a)}function S(){f=this.value,t(4,f)}function $(){c=this.value,t(6,c)}function C(){u=this.value,t(5,u)}const T=()=>h(),M=()=>!d;function O(P){ne[P?"unshift":"push"](()=>{o=P,t(1,o)})}function D(P){Fe.call(this,n,P)}function I(P){Fe.call(this,n,P)}return t(8,i=!0),[_,o,r,a,f,u,c,d,i,l,h,m,g,y,S,$,C,T,M,O,D,I]}class K6 extends ve{constructor(e){super(),be(this,e,Y6,W6,me,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function J6(n){let e,t,i,s,l,o,r,a,f,u,c={};return r=new K6({props:c}),n[4](r),r.$on("submit",n[5]),{c(){e=v("button"),t=v("i"),i=E(),s=v("span"),s.textContent="Generate secret",o=E(),B(r.$$.fragment),p(t,"class","ri-key-line"),p(s,"class","txt"),p(e,"type","button"),p(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(d,m){w(d,e,m),b(e,t),b(e,i),b(e,s),w(d,o,m),V(r,d,m), Line truncated
`),r=v("button"),r.textContent="Restore draft",a=E(),f=v("button"),f.innerHTML='<i class="ri-close-line"></i>',u=E(),c=v("div"),p(i,"class","icon"),p(r,"type","button"),p(r,"class","btn btn-sm btn-secondary"),p(l,"class","flex flex-gap-xs"),p(f,"type","button"),p(f,"class","close"),p(f,"aria-label","Discard draft"),p(t,"class","alert alert-info m-0"),p(c,"class","clearfix p-b-base"),p(e,"class","block")},m(g,y){w(g,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(l,r),b(t,a),b(t,f),b(e,u),b(e,c),m=!0,_||(h=[Y(r,"click",n[37]),Ce(ze.call(null,f,"Discard draft")),Y(f,"click",Xe(n[38]))],_=!0)},p:ee,i(g){m||(d&&d.end(1),m=!0)},o(g){d=_a(e,tt,{duration:150}),m=!1},d(g){g&&k(e),g&&d&&d.end(),_=!1,Me(h)}}}function fm(n){let e,t,i,s,l;return{c(){e=v("div"),t=v("i"),p(t,"class","ri-calendar-event-line txt-disabled"),p(e,"class","form-field-addon")},m(o,r){w(o,e,r),b(e,t),s||(l=Ce(i=ze.call(null,t,{text:`Created: ${n[3].created}
Updated: ${n[3].updated}`,position:"left"})),s=!0)},p(o,r){i&&qt(i.update)&&r[0]&8&&i.update.call(null,{text:`Created: ${o[3].created}
Updated: ${o[3].updated}`,position:"left"})},d(o){o&&k(e),s=!1,l()}}}function iE(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h=!n[6]&&fm(n);return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="id",l=E(),o=v("span"),a=E(),h&&h.c(),f=E(),u=v("input"),p(t,"class",is(z.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[70]),p(u,"type","text"),p(u,"id",c=n[70]),p(u,"placeholder","Leave empty to auto generate..."),p(u,"minlength","15"),u.readOnly=d=!n[6]},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),w(g,a,y),h&&h.m(g,y),w(g,f,y),w(g,u,y),re(u,n[3].id),m||(_=Y(u,"input",n[39]),m=!0)},p(g,y){y[2]&256&&r!==(r=g[70])&&p(e,"for",r),g[6]?h&&(h.d(1),h=null):h?h.p(g,y):(h=fm(g),h.c(),h.m(f.parentNode,f)),y[2]&256&&c!==(c=g[70])&&p(u,"id",c),y[0]&64&&d!==(d=!g[6])&&(u.readOnly=d),y[0]&8&&u.value!==g[3].id&&re(u,g[3].id)},d(g){g&&k(e),g&&k(a),h&&h.d(g),g&&k(f),g&&k(u),m=!1,_()}}}function um(n){var f,u;let e,t,i,s,l;function o(c){n[40](c)}let r={isNew:n[6],collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new FM({props:r}),ne.push(()=>de(e,"record",o));let a=((u=(f=n[0])==null?void 0:f.schema)==null?void 0:u.length)&&cm();return{c(){B(e.$$.fragment),i=E(),a&&a.c(),s=ye()},m(c,d){V(e,c,d),w(c,i,d),a&&a.m(c,d),w(c,s,d),l=!0},p(c,d){var _,h;const m={};d[0]&64&&(m.isNew=c[6]),d[0]&1&&(m.collection=c[0]),!t&&d[0]&8&&(t=!0,m.record=c[3],ge(()=>t=!1)),e.$set(m),(h=(_=c[0])==null?void 0:_.schema)!=null&&h.length?a||(a=cm(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){L(e.$$.fragment,c),l=!1},d(c){H(e,c),c&&k(i),a&&a.d(c),c&&k(s)}}}function cm(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function sE(n){let e,t,i;function s(o){n[53](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new f6({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function lE(n){let e,t,i,s,l;function o(u){n[50](u,n[67])}function r(u){n[51](u,n[67])}function a(u){n[52](u,n[67])}let f={field:n[67],record:n[3]};return n[3][n[67].name]!==void 0&&(f.value=n[3][n[67].name]),n[4][n[67].name]!==void 0&&(f.uploadedFiles=n[4][n[67].name]),n[5][n[67].name]!==void 0&&(f.deletedFileNames=n[5][n[67].name]),e=new U5({props:f}),ne.push(()=>de(e,"value",o)),ne.push(()=>de(e,"uploadedFiles",r)),ne.push(()=>de(e,"deletedFileNames",a)),{c(){B(e.$$.fragment)},m(u,c){V(e,u,c),l=!0},p(u,c){n=u;const d={};c[0]&1&&(d.field=n[67]),c[0]&8&&(d.record=n[3]),!t&&c[0]&9&&(t=!0,d.value=n[3][n[67].name],ge(()=>t=!1)),!i&&c[0]&17&&(i=!0,d.uploadedFiles=n[4][n[67].name],ge(()=>i=!1)),!s&&c[0]&33&&(s=!0,d.deletedFileNames=n[5][n[67].name],ge(()=>s=!1)),e.$set(d)},i(u){l||(A(e.$$.fragment,u),l=!0)},o(u){L(e.$$.fragment,u),l=!1},d(u){H(e,u)}}}function oE(n){let e,t,i;function s(o){n[49](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new _5({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function rE(n){let e,t,i;function s(o){n[48](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new d5({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function aE(n){let e,t,i;function s(o){n[47](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new a5({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function fE(n){let e,t,i;function s(o){n[46](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new k6({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function uE(n){let e,t,i;function s(o){n[45](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new s5({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name] Line truncated
Updated: ${o[3].updated}`,position:"left"})},d(o){o&&k(e),s=!1,l()}}}function iE(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h=!n[6]&&fm(n);return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="id",l=E(),o=v("span"),a=E(),h&&h.c(),f=E(),u=v("input"),p(t,"class",is(j.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[70]),p(u,"type","text"),p(u,"id",c=n[70]),p(u,"placeholder","Leave empty to auto generate..."),p(u,"minlength","15"),u.readOnly=d=!n[6]},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),w(g,a,y),h&&h.m(g,y),w(g,f,y),w(g,u,y),re(u,n[3].id),m||(_=Y(u,"input",n[39]),m=!0)},p(g,y){y[2]&256&&r!==(r=g[70])&&p(e,"for",r),g[6]?h&&(h.d(1),h=null):h?h.p(g,y):(h=fm(g),h.c(),h.m(f.parentNode,f)),y[2]&256&&c!==(c=g[70])&&p(u,"id",c),y[0]&64&&d!==(d=!g[6])&&(u.readOnly=d),y[0]&8&&u.value!==g[3].id&&re(u,g[3].id)},d(g){g&&k(e),g&&k(a),h&&h.d(g),g&&k(f),g&&k(u),m=!1,_()}}}function um(n){var f,u;let e,t,i,s,l;function o(c){n[40](c)}let r={isNew:n[6],collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new FM({props:r}),ne.push(()=>de(e,"record",o));let a=((u=(f=n[0])==null?void 0:f.schema)==null?void 0:u.length)&&cm();return{c(){B(e.$$.fragment),i=E(),a&&a.c(),s=ye()},m(c,d){V(e,c,d),w(c,i,d),a&&a.m(c,d),w(c,s,d),l=!0},p(c,d){var _,h;const m={};d[0]&64&&(m.isNew=c[6]),d[0]&1&&(m.collection=c[0]),!t&&d[0]&8&&(t=!0,m.record=c[3],ge(()=>t=!1)),e.$set(m),(h=(_=c[0])==null?void 0:_.schema)!=null&&h.length?a||(a=cm(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){L(e.$$.fragment,c),l=!1},d(c){H(e,c),c&&k(i),a&&a.d(c),c&&k(s)}}}function cm(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function sE(n){let e,t,i;function s(o){n[53](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new f6({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function lE(n){let e,t,i,s,l;function o(u){n[50](u,n[67])}function r(u){n[51](u,n[67])}function a(u){n[52](u,n[67])}let f={field:n[67],record:n[3]};return n[3][n[67].name]!==void 0&&(f.value=n[3][n[67].name]),n[4][n[67].name]!==void 0&&(f.uploadedFiles=n[4][n[67].name]),n[5][n[67].name]!==void 0&&(f.deletedFileNames=n[5][n[67].name]),e=new U5({props:f}),ne.push(()=>de(e,"value",o)),ne.push(()=>de(e,"uploadedFiles",r)),ne.push(()=>de(e,"deletedFileNames",a)),{c(){B(e.$$.fragment)},m(u,c){V(e,u,c),l=!0},p(u,c){n=u;const d={};c[0]&1&&(d.field=n[67]),c[0]&8&&(d.record=n[3]),!t&&c[0]&9&&(t=!0,d.value=n[3][n[67].name],ge(()=>t=!1)),!i&&c[0]&17&&(i=!0,d.uploadedFiles=n[4][n[67].name],ge(()=>i=!1)),!s&&c[0]&33&&(s=!0,d.deletedFileNames=n[5][n[67].name],ge(()=>s=!1)),e.$set(d)},i(u){l||(A(e.$$.fragment,u),l=!0)},o(u){L(e.$$.fragment,u),l=!1},d(u){H(e,u)}}}function oE(n){let e,t,i;function s(o){n[49](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new _5({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function rE(n){let e,t,i;function s(o){n[48](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new d5({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function aE(n){let e,t,i;function s(o){n[47](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new a5({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function fE(n){let e,t,i;function s(o){n[46](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new k6({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],ge(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function uE(n){let e,t,i;function s(o){n[45](o,n[67])}let l={field:n[67]};return n[3][n[67].name]!==void 0&&(l.value=n[3][n[67].name]),e=new s5({props:l}),ne.push(()=>de(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name] Line truncated
<span class="txt">Send verification email</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[31]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function _m(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){w(s,e,l),t||(i=Y(e,"click",n[32]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function _E(n){let e,t,i,s,l,o,r,a=n[13]&&!n[2].verified&&n[2].email&&hm(n),f=n[13]&&n[2].email&&_m(n);return{c(){a&&a.c(),e=E(),f&&f.c(),t=E(),i=v("button"),i.innerHTML=`<i class="ri-file-copy-line"></i>
<span class="txt">Duplicate</span>`,s=E(),l=v("button"),l.innerHTML=`<i class="ri-delete-bin-7-line"></i>
@@ -147,13 +147,13 @@ Updated: ${o[3].updated}`,position:"left"})},d(o){o&&k(e),s=!1,l()}}}function iE
record-panel
`+(s[15]?"overlay-panel-xl":"overlay-panel-lg")+`
`+(s[13]&&!s[6]?"colored-header":"")+`
`),l[0]&2176&&(o.beforeHide=s[54]),l[0]&30461|l[2]&512&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[55](null),H(e,s)}}}const ns="form",gl="providers";function yE(n,e,t){let i,s,l,o,r;const a=wt(),f="record_"+z.randomString(5);let{collection:u}=e,c,d=null,m=null,_=null,h=!1,g=!1,y={},S={},$=JSON.stringify(null),C=$,T=ns,M=!0,O=!1;function D(_e){return P(_e),t(11,g=!0),t(12,T=ns),c==null?void 0:c.show()}function I(){return c==null?void 0:c.hide()}async function P(_e){t(28,O=!1),xt({}),t(2,d=_e||{}),t(3,m=structuredClone(d)),t(4,y={}),t(5,S={}),await fn(),t(9,_=N()),!_||J(m,_)?t(9,_=null):(delete _.password,delete _.passwordConfirm),t(26,$=JSON.stringify(m)),t(28,O=!0)}async function F(_e){var ct,xe;xt({}),t(2,d=_e||{}),t(4,y={}),t(5,S={});const we=((xe=(ct=u==null?void 0:u.schema)==null?void 0:ct.filter(Bt=>Bt.type!="file"))==null?void 0:xe.map(Bt=>Bt.name))||[];for(let Bt in _e)we.includes(Bt)||t(3,m[Bt]=_e[Bt],m);await fn(),t(26,$=JSON.stringify(m)),G()}function R(){return"record_draft_"+((u==null?void 0:u.id)||"")+"_"+((d==null?void 0:d.id)||"")}function N(_e){try{const we=window.localStorage.getItem(R());if(we)return new Record(JSON.parse(we))}catch{}return _e}function q(_e){window.localStorage.setItem(R(),_e)}function j(){_&&(t(3,m=_),t(9,_=null))}function J(_e,we){var _n;const ct=structuredClone(_e||{}),xe=structuredClone(we||{}),Bt=(_n=u==null?void 0:u.schema)==null?void 0:_n.filter(Fn=>Fn.type==="file");for(let Fn of Bt)delete ct[Fn.name],delete xe[Fn.name];return delete ct.password,delete ct.passwordConfirm,delete xe.password,delete xe.passwordConfirm,JSON.stringify(ct)==JSON.stringify(xe)}function G(){t(9,_=null),window.localStorage.removeItem(R())}function Q(_e=!0){if(h||!r||!(u!=null&&u.id))return;t(10,h=!0);const we=le();let ct;M?ct=ue.collection(u.id).create(we):ct=ue.collection(u.id).update(m.id,we),ct.then(xe=>{zt(M?"Successfully created record.":"Successfully updated record."),G(),_e?(t(11,g=!1),I()):F(xe),a("save",xe)}).catch(xe=>{ue.error(xe)}).finally(()=>{t(10,h=!1)})}function K(){d!=null&&d.id&&dn("Do you really want to delete the selected record?",()=>ue.collection(d.collectionId).delete(d.id).then(()=>{I(),zt("Successfully deleted record."),a("delete",d)}).catch(_e=>{ue.error(_e)}))}function le(){const _e=structuredClone(m||{}),we=new FormData,ct={id:_e.id};for(const xe of(u==null?void 0:u.schema)||[])ct[xe.name]=!0;i&&(ct.username=!0,ct.email=!0,ct.emailVisibility=!0,ct.password=!0,ct.passwordConfirm=!0,ct.verified=!0);for(const xe in _e)ct[xe]&&(typeof _e[xe]>"u"&&(_e[xe]=null),z.addValueToFormData(we,xe,_e[xe]));for(const xe in y){const Bt=z.toArray(y[xe]);for(const _n of Bt)we.append(xe,_n)}for(const xe in S){const Bt=z.toArray(S[xe]);for(const _n of Bt)we.append(xe+"."+_n,"")}return we}function x(){!(u!=null&&u.id)||!(d!=null&&d.email)||dn(`Do you really want to sent verification email to ${d.email}?`,()=>ue.collection(u.id).requestVerification(d.email).then(()=>{zt(`Successfully sent verification email to ${d.email}.`)}).catch(_e=>{ue.error(_e)}))}function te(){!(u!=null&&u.id)||!(d!=null&&d.email)||dn(`Do you really want to sent password reset email to ${d.email}?`,()=>ue.collection(u.id).requestPasswordReset(d.email).then(()=>{zt(`Successfully sent password reset email to ${d.email}.`)}).catch(_e=>{ue.error(_e)}))}function Ee(){o?dn("You have unsaved changes. Do you really want to discard them?",()=>{Pe()}):Pe()}async function Pe(){let _e=d?structuredClone(d):null;if(_e){_e.id="",_e.created="",_e.updated="";const we=(u==null?void 0:u.schema)||[];for(const ct of we)ct.type==="file"&&delete _e[ct.name]}G(),D(_e),await fn(),t(26,$="")}function je(_e){(_e.ctrlKey||_e.metaKey)&&_e.code=="KeyS"&&(_e.preventDefault(),_e.stopPropagation(),Q(!1))}const Ve=()=>I(),ke=()=>x(),$e=()=>te(),Je=()=>Ee(),gt=()=>K(),Ze=()=>t(12,T=ns),Ye=()=>t(12,T=gl),kt=()=>j(),pe=()=>G();function he(){m.id=this.value,t(3,m)}function Ke(_e){m=_e,t(3,m)}function Te(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function mt(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function At(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function sn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function De(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function rt(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function hn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function wn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function Sn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function si(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function Jn(_e,we){n.$$.not_equal(y[we.name],_e)&&(y[we.name]=_e,t(4,y))}function mi(_e,we){n.$$.not_equal(S[we.name],_e)&&(S[we.name]=_e,t(5,S))}function Cn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}const ut=()=>o&&g?(dn("You have unsaved changes. Do you r Line truncated
`),l[0]&2176&&(o.beforeHide=s[54]),l[0]&30461|l[2]&512&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[55](null),H(e,s)}}}const ns="form",gl="providers";function yE(n,e,t){let i,s,l,o,r;const a=wt(),f="record_"+j.randomString(5);let{collection:u}=e,c,d=null,m=null,_=null,h=!1,g=!1,y={},S={},$=JSON.stringify(null),C=$,T=ns,M=!0,O=!1;function D(_e){return P(_e),t(11,g=!0),t(12,T=ns),c==null?void 0:c.show()}function I(){return c==null?void 0:c.hide()}async function P(_e){t(28,O=!1),xt({}),t(2,d=_e||{}),t(3,m=structuredClone(d)),t(4,y={}),t(5,S={}),await fn(),t(9,_=N()),!_||J(m,_)?t(9,_=null):(delete _.password,delete _.passwordConfirm),t(26,$=JSON.stringify(m)),t(28,O=!0)}async function F(_e){var ct,xe;xt({}),t(2,d=_e||{}),t(4,y={}),t(5,S={});const we=((xe=(ct=u==null?void 0:u.schema)==null?void 0:ct.filter(Bt=>Bt.type!="file"))==null?void 0:xe.map(Bt=>Bt.name))||[];for(let Bt in _e)we.includes(Bt)||t(3,m[Bt]=_e[Bt],m);await fn(),t(26,$=JSON.stringify(m)),G()}function R(){return"record_draft_"+((u==null?void 0:u.id)||"")+"_"+((d==null?void 0:d.id)||"")}function N(_e){try{const we=window.localStorage.getItem(R());if(we)return new Record(JSON.parse(we))}catch{}return _e}function q(_e){window.localStorage.setItem(R(),_e)}function z(){_&&(t(3,m=_),t(9,_=null))}function J(_e,we){var _n;const ct=structuredClone(_e||{}),xe=structuredClone(we||{}),Bt=(_n=u==null?void 0:u.schema)==null?void 0:_n.filter(Fn=>Fn.type==="file");for(let Fn of Bt)delete ct[Fn.name],delete xe[Fn.name];return delete ct.password,delete ct.passwordConfirm,delete xe.password,delete xe.passwordConfirm,JSON.stringify(ct)==JSON.stringify(xe)}function G(){t(9,_=null),window.localStorage.removeItem(R())}function Q(_e=!0){if(h||!r||!(u!=null&&u.id))return;t(10,h=!0);const we=le();let ct;M?ct=ue.collection(u.id).create(we):ct=ue.collection(u.id).update(m.id,we),ct.then(xe=>{zt(M?"Successfully created record.":"Successfully updated record."),G(),_e?(t(11,g=!1),I()):F(xe),a("save",xe)}).catch(xe=>{ue.error(xe)}).finally(()=>{t(10,h=!1)})}function K(){d!=null&&d.id&&dn("Do you really want to delete the selected record?",()=>ue.collection(d.collectionId).delete(d.id).then(()=>{I(),zt("Successfully deleted record."),a("delete",d)}).catch(_e=>{ue.error(_e)}))}function le(){const _e=structuredClone(m||{}),we=new FormData,ct={id:_e.id};for(const xe of(u==null?void 0:u.schema)||[])ct[xe.name]=!0;i&&(ct.username=!0,ct.email=!0,ct.emailVisibility=!0,ct.password=!0,ct.passwordConfirm=!0,ct.verified=!0);for(const xe in _e)ct[xe]&&(typeof _e[xe]>"u"&&(_e[xe]=null),j.addValueToFormData(we,xe,_e[xe]));for(const xe in y){const Bt=j.toArray(y[xe]);for(const _n of Bt)we.append(xe,_n)}for(const xe in S){const Bt=j.toArray(S[xe]);for(const _n of Bt)we.append(xe+"."+_n,"")}return we}function x(){!(u!=null&&u.id)||!(d!=null&&d.email)||dn(`Do you really want to sent verification email to ${d.email}?`,()=>ue.collection(u.id).requestVerification(d.email).then(()=>{zt(`Successfully sent verification email to ${d.email}.`)}).catch(_e=>{ue.error(_e)}))}function te(){!(u!=null&&u.id)||!(d!=null&&d.email)||dn(`Do you really want to sent password reset email to ${d.email}?`,()=>ue.collection(u.id).requestPasswordReset(d.email).then(()=>{zt(`Successfully sent password reset email to ${d.email}.`)}).catch(_e=>{ue.error(_e)}))}function Ee(){o?dn("You have unsaved changes. Do you really want to discard them?",()=>{Pe()}):Pe()}async function Pe(){let _e=d?structuredClone(d):null;if(_e){_e.id="",_e.created="",_e.updated="";const we=(u==null?void 0:u.schema)||[];for(const ct of we)ct.type==="file"&&delete _e[ct.name]}G(),D(_e),await fn(),t(26,$="")}function je(_e){(_e.ctrlKey||_e.metaKey)&&_e.code=="KeyS"&&(_e.preventDefault(),_e.stopPropagation(),Q(!1))}const Ve=()=>I(),ke=()=>x(),$e=()=>te(),Je=()=>Ee(),gt=()=>K(),Ze=()=>t(12,T=ns),Ye=()=>t(12,T=gl),kt=()=>z(),pe=()=>G();function he(){m.id=this.value,t(3,m)}function Ke(_e){m=_e,t(3,m)}function Te(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function mt(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function At(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function sn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function De(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function rt(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function hn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function wn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function Sn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function si(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}function Jn(_e,we){n.$$.not_equal(y[we.name],_e)&&(y[we.name]=_e,t(4,y))}function mi(_e,we){n.$$.not_equal(S[we.name],_e)&&(S[we.name]=_e,t(5,S))}function Cn(_e,we){n.$$.not_equal(m[we.name],_e)&&(m[we.name]=_e,t(3,m))}const ut=()=>o&&g?(dn("You have unsaved changes. Do you r Line truncated
`},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function aO(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){w(s,e,l),t||(i=Y(e,"click",n[42]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function fO(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){w(s,e,l),t||(i=Y(e,"click",n[41]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function Km(n){let e,t,i,s,l,o,r,a,f,u;function c(){return n[38](n[58])}return{c(){e=v("td"),t=v("div"),i=v("input"),o=E(),r=v("label"),p(i,"type","checkbox"),p(i,"id",s="checkbox_"+n[58].id),i.checked=l=n[5][n[58].id],p(r,"for",a="checkbox_"+n[58].id),p(t,"class","form-field"),p(e,"class","bulk-select-col min-width")},m(d,m){w(d,e,m),b(e,t),b(t,i),b(t,o),b(t,r),f||(u=[Y(i,"change",c),Y(t,"click",Ln(n[28]))],f=!0)},p(d,m){n=d,m[0]&8&&s!==(s="checkbox_"+n[58].id)&&p(i,"id",s),m[0]&40&&l!==(l=n[5][n[58].id])&&(i.checked=l),m[0]&8&&a!==(a="checkbox_"+n[58].id)&&p(r,"for",a)},d(d){d&&k(e),f=!1,Me(u)}}}function Jm(n){let e,t,i,s,l,o,r=n[58].id+"",a,f,u;s=new Dl({props:{value:n[58].id}});let c=n[10]&&Zm(n);return{c(){e=v("td"),t=v("div"),i=v("div"),B(s.$$.fragment),l=E(),o=v("div"),a=U(r),f=E(),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){w(d,e,m),b(e,t),b(t,i),V(s,i,null),b(i,l),b(i,o),b(o,a),b(t,f),c&&c.m(t,null),u=!0},p(d,m){const _={};m[0]&8&&(_.value=d[58].id),s.$set(_),(!u||m[0]&8)&&r!==(r=d[58].id+"")&&se(a,r),d[10]?c?c.p(d,m):(c=Zm(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){u||(A(s.$$.fragment,d),u=!0)},o(d){L(s.$$.fragment,d),u=!1},d(d){d&&k(e),H(s),c&&c.d()}}}function Zm(n){let e;function t(l,o){return l[58].verified?cO:uO}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(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&&k(e)}}}function uO(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){w(s,e,l),t||(i=Ce(ze.call(null,e,"Unverified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function cO(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){w(s,e,l),t||(i=Ce(ze.call(null,e,"Verified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function Gm(n){let e=!n[6].includes("@username"),t,i=!n[6].includes("@email"),s,l=e&&Xm(n),o=i&&Qm(n);return{c(){l&&l.c(),t=E(),o&&o.c(),s=ye()},m(r,a){l&&l.m(r,a),w(r,t,a),o&&o.m(r,a),w(r,s,a)},p(r,a){a[0]&64&&(e=!r[6].includes("@username")),e?l?l.p(r,a):(l=Xm(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&64&&(i=!r[6].includes("@email")),i?o?o.p(r,a):(o=Qm(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&k(t),o&&o.d(r),r&&k(s)}}}function Xm(n){let e,t;function i(o,r){return r[0]&8&&(t=null),t==null&&(t=!!z.isEmpty(o[58].username)),t?pO:dO}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){w(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&&k(e),l.d()}}}function dO(n){let e,t=n[58].username+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[58].username)},m(l,o){w(l,e,o),b(e,i)},p(l,o){o[0]&8&&t!==(t=l[58].username+"")&&se(i,t),o[0]&8&&s!==(s=l[58].username)&&p(e,"title",s)},d(l){l&&k(e)}}}function pO(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function Qm(n){let e,t;function i(o,r){return r[0]&8&&(t=null),t==null&&(t=!!z.isEmpty(o[58].email)),t?hO:mO}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){w(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&&k(e),l.d()}}}function mO(n){let e,t=n[58].email+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[58].email)},m(l,o){w(l,e,o),b(e,i)},p(l,o){o[0]&8&&t!==(t=l[58].email+"")&&se(i,t),o[0]&8&&s!==(s=l[58].email)&&p(e,"title",s)},d(l){l&&k(e)}}}function hO(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function xm(n,e){let t,i,s,l;return i=new g1({props:{short:!0,record:e[58],field:e[61]}}),{key:n,first:null,c(){t=v("td"),B(i.$$.fragment),p(t,"class",s="col-type-"+e[61].type+" col-field-"+e[61].name),this.first=t},m(o,r){w(o,t,r),V(i,t,null),l=!0},p(o,r){e=o;const a={};r[0]&8&&(a.record=e[58]),r[0]&524288&&(a.field=e[61]),i.$set(a),(!l||r[0]&524288&&s!==(s="col-type-"+e[61].type+" col-field-"+e[61].name))&&p(t,"class",s)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),H(i)}}}function eh(n){let e,t,i;return t=new Si({props:{date:n[58].created}}),{c(){e=v("td"),B(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.dLine truncated
<span class="txt">New record</span>`,p(e,"type","button"),p(e,"class","btn btn-expanded")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[18]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function MO(n){let e,t,i,s,l,o=n[2].name+"",r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I,P,F=!n[10]&&ah(n);c=new Wo({}),c.$on("refresh",n[16]);let R=n[2].type!=="view"&&fh(n);y=new Uo({props:{value:n[0],autocompleteCollection:n[2]}}),y.$on("submit",n[19]);function N(J){n[21](J)}function q(J){n[22](J)}let j={collection:n[2]};return n[0]!==void 0&&(j.filter=n[0]),n[1]!==void 0&&(j.sort=n[1]),T=new SO({props:j}),n[20](T),ne.push(()=>de(T,"filter",N)),ne.push(()=>de(T,"sort",q)),T.$on("select",n[23]),T.$on("new",n[24]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=E(),l=v("div"),r=U(o),a=E(),f=v("div"),F&&F.c(),u=E(),B(c.$$.fragment),d=E(),m=v("div"),_=v("button"),_.innerHTML=`<i class="ri-code-s-slash-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){w(s,e,l),t||(i=Y(e,"click",n[42]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function fO(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){w(s,e,l),t||(i=Y(e,"click",n[41]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function Km(n){let e,t,i,s,l,o,r,a,f,u;function c(){return n[38](n[58])}return{c(){e=v("td"),t=v("div"),i=v("input"),o=E(),r=v("label"),p(i,"type","checkbox"),p(i,"id",s="checkbox_"+n[58].id),i.checked=l=n[5][n[58].id],p(r,"for",a="checkbox_"+n[58].id),p(t,"class","form-field"),p(e,"class","bulk-select-col min-width")},m(d,m){w(d,e,m),b(e,t),b(t,i),b(t,o),b(t,r),f||(u=[Y(i,"change",c),Y(t,"click",Ln(n[28]))],f=!0)},p(d,m){n=d,m[0]&8&&s!==(s="checkbox_"+n[58].id)&&p(i,"id",s),m[0]&40&&l!==(l=n[5][n[58].id])&&(i.checked=l),m[0]&8&&a!==(a="checkbox_"+n[58].id)&&p(r,"for",a)},d(d){d&&k(e),f=!1,Me(u)}}}function Jm(n){let e,t,i,s,l,o,r=n[58].id+"",a,f,u;s=new Dl({props:{value:n[58].id}});let c=n[10]&&Zm(n);return{c(){e=v("td"),t=v("div"),i=v("div"),B(s.$$.fragment),l=E(),o=v("div"),a=U(r),f=E(),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){w(d,e,m),b(e,t),b(t,i),V(s,i,null),b(i,l),b(i,o),b(o,a),b(t,f),c&&c.m(t,null),u=!0},p(d,m){const _={};m[0]&8&&(_.value=d[58].id),s.$set(_),(!u||m[0]&8)&&r!==(r=d[58].id+"")&&se(a,r),d[10]?c?c.p(d,m):(c=Zm(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){u||(A(s.$$.fragment,d),u=!0)},o(d){L(s.$$.fragment,d),u=!1},d(d){d&&k(e),H(s),c&&c.d()}}}function Zm(n){let e;function t(l,o){return l[58].verified?cO:uO}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(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&&k(e)}}}function uO(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){w(s,e,l),t||(i=Ce(ze.call(null,e,"Unverified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function cO(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){w(s,e,l),t||(i=Ce(ze.call(null,e,"Verified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function Gm(n){let e=!n[6].includes("@username"),t,i=!n[6].includes("@email"),s,l=e&&Xm(n),o=i&&Qm(n);return{c(){l&&l.c(),t=E(),o&&o.c(),s=ye()},m(r,a){l&&l.m(r,a),w(r,t,a),o&&o.m(r,a),w(r,s,a)},p(r,a){a[0]&64&&(e=!r[6].includes("@username")),e?l?l.p(r,a):(l=Xm(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&64&&(i=!r[6].includes("@email")),i?o?o.p(r,a):(o=Qm(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&k(t),o&&o.d(r),r&&k(s)}}}function Xm(n){let e,t;function i(o,r){return r[0]&8&&(t=null),t==null&&(t=!!j.isEmpty(o[58].username)),t?pO:dO}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){w(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&&k(e),l.d()}}}function dO(n){let e,t=n[58].username+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[58].username)},m(l,o){w(l,e,o),b(e,i)},p(l,o){o[0]&8&&t!==(t=l[58].username+"")&&se(i,t),o[0]&8&&s!==(s=l[58].username)&&p(e,"title",s)},d(l){l&&k(e)}}}function pO(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function Qm(n){let e,t;function i(o,r){return r[0]&8&&(t=null),t==null&&(t=!!j.isEmpty(o[58].email)),t?hO:mO}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){w(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&&k(e),l.d()}}}function mO(n){let e,t=n[58].email+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[58].email)},m(l,o){w(l,e,o),b(e,i)},p(l,o){o[0]&8&&t!==(t=l[58].email+"")&&se(i,t),o[0]&8&&s!==(s=l[58].email)&&p(e,"title",s)},d(l){l&&k(e)}}}function hO(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function xm(n,e){let t,i,s,l;return i=new g1({props:{short:!0,record:e[58],field:e[61]}}),{key:n,first:null,c(){t=v("td"),B(i.$$.fragment),p(t,"class",s="col-type-"+e[61].type+" col-field-"+e[61].name),this.first=t},m(o,r){w(o,t,r),V(i,t,null),l=!0},p(o,r){e=o;const a={};r[0]&8&&(a.record=e[58]),r[0]&524288&&(a.field=e[61]),i.$set(a),(!l||r[0]&524288&&s!==(s="col-type-"+e[61].type+" col-field-"+e[61].name))&&p(t,"class",s)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),H(i)}}}function eh(n){let e,t,i;return t=new Si({props:{date:n[58].created}}),{c(){e=v("td"),B(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.dLine truncated
<span class="txt">New record</span>`,p(e,"type","button"),p(e,"class","btn btn-expanded")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[18]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function MO(n){let e,t,i,s,l,o=n[2].name+"",r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I,P,F=!n[10]&&ah(n);c=new Wo({}),c.$on("refresh",n[16]);let R=n[2].type!=="view"&&fh(n);y=new Uo({props:{value:n[0],autocompleteCollection:n[2]}}),y.$on("submit",n[19]);function N(J){n[21](J)}function q(J){n[22](J)}let z={collection:n[2]};return n[0]!==void 0&&(z.filter=n[0]),n[1]!==void 0&&(z.sort=n[1]),T=new SO({props:z}),n[20](T),ne.push(()=>de(T,"filter",N)),ne.push(()=>de(T,"sort",q)),T.$on("select",n[23]),T.$on("new",n[24]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=E(),l=v("div"),r=U(o),a=E(),f=v("div"),F&&F.c(),u=E(),B(c.$$.fragment),d=E(),m=v("div"),_=v("button"),_.innerHTML=`<i class="ri-code-s-slash-line"></i>
<span class="txt">API Preview</span>`,h=E(),R&&R.c(),g=E(),B(y.$$.fragment),S=E(),$=v("div"),C=E(),B(T.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","inline-flex gap-5"),p(_,"type","button"),p(_,"class","btn btn-outline"),p(m,"class","btns-group"),p(e,"class","page-header"),p($,"class","clearfix m-b-base")},m(J,G){w(J,e,G),b(e,t),b(t,i),b(t,s),b(t,l),b(l,r),b(e,a),b(e,f),F&&F.m(f,null),b(f,u),V(c,f,null),b(e,d),b(e,m),b(m,_),b(m,h),R&&R.m(m,null),w(J,g,G),V(y,J,G),w(J,S,G),w(J,$,G),w(J,C,G),V(T,J,G),D=!0,I||(P=Y(_,"click",n[17]),I=!0)},p(J,G){(!D||G[0]&4)&&o!==(o=J[2].name+"")&&se(r,o),J[10]?F&&(F.d(1),F=null):F?F.p(J,G):(F=ah(J),F.c(),F.m(f,u)),J[2].type!=="view"?R?R.p(J,G):(R=fh(J),R.c(),R.m(m,null)):R&&(R.d(1),R=null);const Q={};G[0]&1&&(Q.value=J[0]),G[0]&4&&(Q.autocompleteCollection=J[2]),y.$set(Q);const K={};G[0]&4&&(K.collection=J[2]),!M&&G[0]&1&&(M=!0,K.filter=J[0],ge(()=>M=!1)),!O&&G[0]&2&&(O=!0,K.sort=J[1],ge(()=>O=!1)),T.$set(K)},i(J){D||(A(c.$$.fragment,J),A(y.$$.fragment,J),A(T.$$.fragment,J),D=!0)},o(J){L(c.$$.fragment,J),L(y.$$.fragment,J),L(T.$$.fragment,J),D=!1},d(J){J&&k(e),F&&F.d(),H(c),R&&R.d(),J&&k(g),H(y,J),J&&k(S),J&&k($),J&&k(C),n[20](null),H(T,J),I=!1,P()}}}function EO(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=E(),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){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=Y(i,"click",n[14]),s=!0)},p:ee,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,l()}}}function OO(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){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function DO(n){let e,t,i;function s(r,a){return r[10]?OO:EO}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=E(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){w(r,e,a),b(e,t),b(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&&k(e),o.d()}}}function AO(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){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function IO(n){let e,t,i,s,l,o,r,a,f,u,c;const d=[TO,$O,CO],m=[];function _($,C){return $[3]&&!$[9].length?0:$[9].length?2:1}e=_(n),t=m[e]=d[e](n);let h={};s=new nf({props:h}),n[25](s);let g={};o=new TM({props:g}),n[26](o);let y={collection:n[2]};a=new _1({props:y}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let S={collection:n[2]};return u=new XE({props:S}),n[30](u),{c(){t.c(),i=E(),B(s.$$.fragment),l=E(),B(o.$$.fragment),r=E(),B(a.$$.fragment),f=E(),B(u.$$.fragment)},m($,C){m[e].m($,C),w($,i,C),V(s,$,C),w($,l,C),V(o,$,C),w($,r,C),V(a,$,C),w($,f,C),V(u,$,C),c=!0},p($,C){let T=e;e=_($),e===T?m[e].p($,C):(ae(),L(m[T],1,1,()=>{m[T]=null}),fe(),t=m[e],t?t.p($,C):(t=m[e]=d[e]($),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const O={};o.$set(O);const D={};C[0]&4&&(D.collection=$[2]),a.$set(D);const I={};C[0]&4&&(I.collection=$[2]),u.$set(I)},i($){c||(A(t),A(s.$$.fragment,$),A(o.$$.fragment,$),A(a.$$.fragment,$),A(u.$$.fragment,$),c=!0)},o($){L(t),L(s.$$.fragment,$),L(o.$$.fragment,$),L(a.$$.fragment,$),L(u.$$.fragment,$),c=!1},d($){m[e].d($),$&&k(i),n[25](null),H(s,$),$&&k(l),n[26](null),H(o,$),$&&k(r),n[27](null),H(a,$),$&&k(f),n[30](null),H(u,$)}}}function LO(n,e,t){let i,s,l,o,r,a,f;We(n,wi,te=>t(2,s=te)),We(n,Et,te=>t(31,l=te)),We(n,go,te=>t(3,o=te)),We(n,ga,te=>t(13,r=te)),We(n,ni,te=>t(9,a=te)),We(n,Ts,te=>t(10,f=te));const u=new URLSearchParams(r);let c,d,m,_,h,g=u.get("filter")||"",y=u.get("sort")||"-created",S=u.get("collectionId")||(s==null?void 0:s.id);function $(){t(11,S=s==null?void 0:s.id),t(0,g=""),t(1,y="-created"),C()}async function C(){if(!y)return;const te=z.getAllCollectionIdentifiers(s),Ee=y.split(",").map(Pe=>Pe.startsWith("+")||Pe.startsWith("-")?Pe.substring(1):Pe);Ee.filter(Pe=>te.includes(Pe)).length!=Ee.length&&(te.includes("created")?t(1,y="-created"):t(1,y=""))}$y(S);const T=()=>c==null?void 0:c.show(),M=()=>c==null?void 0:c.show(s),O=()=>h==null?void 0:h.load(),D=()=>d==null?void 0:d.show(s),I=()=>m==null?void 0:m.show(),P=te=>t(0,g=te.detail);function F(te){ne[te?"unshift":"push"](()=>{h=te,t(8,h)})}function R(te){g=te,t(0,g)}function N(te){y=te,t(1,y)}const q=te=>{s.type==="view"?_.show(te==null?void 0:te.detail):m==null||m.show(te==null?void 0:te.detail)},j=()=>m==null?void 0:m.show();function J(te){ne[te?"unshift":"push"](()=>{c=te,t(4,c)})}function G(te){ne[te?"unshift":"push"](()=>{d=te,t(5,d)})}function Q(te){ne[te?"unshift":"push"](()=>{m=te,t(6,m)})}const K=()=>h==null?void 0:h.reloadLoadedPages(),le=()=>h==null?void 0:h.reloadLoadedPages();function x(te){ne[te?"unshift":"push"](()=>{_=te,t(7,_)})}return n.$$.update=()=>{if(n.$$.dirty[0]&8192&&t(12,i=new URLSearchParams(r)),n.$$.dirty[0]&6152&&!o&&i.get("collectionId")&&i.get("collectionId")!=S&&wy(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&S!=s.id&&$(),n.$$.dirty[0]&4&&s!=null&&s.id&&C(),n.$$.dirty[0]&7&&(y||g||s!=null&&s.id)){const te=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:g,sort:y}).toString();qi("/collections?"+te)}n.$$.dirty[0]&4&&tn(Et,l=(s==null?void 0:s.name)||"Collections",l)},[g,y,s,o,c,d,m,_,h,a,f,S,i,r,T,M,O,D,I,P,F,R,N,q,j,J,G,Q,K,le,x]}class PO extends ve{constructor(e){super(),be(this,e,LO,IO,me,{},null,[-1,-1])}}function FO(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I,P,F;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=E(),l=v("a"),l.innerHTML=`<i class="ri-home-gear-line"></i>
<h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function IO(n){let e,t,i,s,l,o,r,a,f,u,c;const d=[TO,$O,CO],m=[];function _($,C){return $[3]&&!$[9].length?0:$[9].length?2:1}e=_(n),t=m[e]=d[e](n);let h={};s=new nf({props:h}),n[25](s);let g={};o=new TM({props:g}),n[26](o);let y={collection:n[2]};a=new _1({props:y}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let S={collection:n[2]};return u=new XE({props:S}),n[30](u),{c(){t.c(),i=E(),B(s.$$.fragment),l=E(),B(o.$$.fragment),r=E(),B(a.$$.fragment),f=E(),B(u.$$.fragment)},m($,C){m[e].m($,C),w($,i,C),V(s,$,C),w($,l,C),V(o,$,C),w($,r,C),V(a,$,C),w($,f,C),V(u,$,C),c=!0},p($,C){let T=e;e=_($),e===T?m[e].p($,C):(ae(),L(m[T],1,1,()=>{m[T]=null}),fe(),t=m[e],t?t.p($,C):(t=m[e]=d[e]($),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const O={};o.$set(O);const D={};C[0]&4&&(D.collection=$[2]),a.$set(D);const I={};C[0]&4&&(I.collection=$[2]),u.$set(I)},i($){c||(A(t),A(s.$$.fragment,$),A(o.$$.fragment,$),A(a.$$.fragment,$),A(u.$$.fragment,$),c=!0)},o($){L(t),L(s.$$.fragment,$),L(o.$$.fragment,$),L(a.$$.fragment,$),L(u.$$.fragment,$),c=!1},d($){m[e].d($),$&&k(i),n[25](null),H(s,$),$&&k(l),n[26](null),H(o,$),$&&k(r),n[27](null),H(a,$),$&&k(f),n[30](null),H(u,$)}}}function LO(n,e,t){let i,s,l,o,r,a,f;We(n,wi,te=>t(2,s=te)),We(n,Et,te=>t(31,l=te)),We(n,go,te=>t(3,o=te)),We(n,ga,te=>t(13,r=te)),We(n,ni,te=>t(9,a=te)),We(n,Ts,te=>t(10,f=te));const u=new URLSearchParams(r);let c,d,m,_,h,g=u.get("filter")||"",y=u.get("sort")||"-created",S=u.get("collectionId")||(s==null?void 0:s.id);function $(){t(11,S=s==null?void 0:s.id),t(0,g=""),t(1,y="-created"),C()}async function C(){if(!y)return;const te=j.getAllCollectionIdentifiers(s),Ee=y.split(",").map(Pe=>Pe.startsWith("+")||Pe.startsWith("-")?Pe.substring(1):Pe);Ee.filter(Pe=>te.includes(Pe)).length!=Ee.length&&(te.includes("created")?t(1,y="-created"):t(1,y=""))}$y(S);const T=()=>c==null?void 0:c.show(),M=()=>c==null?void 0:c.show(s),O=()=>h==null?void 0:h.load(),D=()=>d==null?void 0:d.show(s),I=()=>m==null?void 0:m.show(),P=te=>t(0,g=te.detail);function F(te){ne[te?"unshift":"push"](()=>{h=te,t(8,h)})}function R(te){g=te,t(0,g)}function N(te){y=te,t(1,y)}const q=te=>{s.type==="view"?_.show(te==null?void 0:te.detail):m==null||m.show(te==null?void 0:te.detail)},z=()=>m==null?void 0:m.show();function J(te){ne[te?"unshift":"push"](()=>{c=te,t(4,c)})}function G(te){ne[te?"unshift":"push"](()=>{d=te,t(5,d)})}function Q(te){ne[te?"unshift":"push"](()=>{m=te,t(6,m)})}const K=()=>h==null?void 0:h.reloadLoadedPages(),le=()=>h==null?void 0:h.reloadLoadedPages();function x(te){ne[te?"unshift":"push"](()=>{_=te,t(7,_)})}return n.$$.update=()=>{if(n.$$.dirty[0]&8192&&t(12,i=new URLSearchParams(r)),n.$$.dirty[0]&6152&&!o&&i.get("collectionId")&&i.get("collectionId")!=S&&wy(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&S!=s.id&&$(),n.$$.dirty[0]&4&&s!=null&&s.id&&C(),n.$$.dirty[0]&7&&(y||g||s!=null&&s.id)){const te=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:g,sort:y}).toString();qi("/collections?"+te)}n.$$.dirty[0]&4&&tn(Et,l=(s==null?void 0:s.name)||"Collections",l)},[g,y,s,o,c,d,m,_,h,a,f,S,i,r,T,M,O,D,I,P,F,R,N,q,z,J,G,Q,K,le,x]}class PO extends ve{constructor(e){super(),be(this,e,LO,IO,me,{},null,[-1,-1])}}function FO(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I,P,F;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=E(),l=v("a"),l.innerHTML=`<i class="ri-home-gear-line"></i>
<span class="txt">Application</span>`,o=E(),r=v("a"),r.innerHTML=`<i class="ri-send-plane-2-line"></i>
<span class="txt">Mail settings</span>`,a=E(),f=v("a"),f.innerHTML=`<i class="ri-archive-drawer-line"></i>
<span class="txt">Files storage</span>`,u=E(),c=v("a"),c.innerHTML=`<i class="ri-archive-line"></i>
@@ -162,14 +162,14 @@ Updated: ${o[3].updated}`,position:"left"})},d(o){o&&k(e),s=!1,l()}}}function iE
<span class="txt">Import collections</span>`,S=E(),$=v("div"),$.textContent="Authentication",C=E(),T=v("a"),T.innerHTML=`<i class="ri-lock-password-line"></i>
<span class="txt">Auth providers</span>`,M=E(),O=v("a"),O.innerHTML=`<i class="ri-key-line"></i>
<span class="txt">Token options</span>`,D=E(),I=v("a"),I.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(f,"href","/settings/storage"),p(f,"class","sidebar-list-item"),p(c,"href","/settings/backups"),p(c,"class","sidebar-list-item"),p(m,"class","sidebar-title"),p(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(y,"href","/settings/import-collections"),p(y,"class","sidebar-list-item"),p($,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"class","sidebar-list-item"),p(O,"href","/settings/tokens"),p(O,"class","sidebar-list-item"),p(I,"href","/settings/admins"),p(I,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(R,N){w(R,e,N),b(e,t),b(t,i),b(t,s),b(t,l),b(t,o),b(t,r),b(t,a),b(t,f),b(t,u),b(t,c),b(t,d),b(t,m),b(t,_),b(t,h),b(t,g),b(t,y),b(t,S),b(t,$),b(t,C),b(t,T),b(t,M),b(t,O),b(t,D),b(t,I),P||(F=[Ce(zn.call(null,l,{path:"/settings"})),Ce(ln.call(null,l)),Ce(zn.call(null,r,{path:"/settings/mail/?.*"})),Ce(ln.call(null,r)),Ce(zn.call(null,f,{path:"/settings/storage/?.*"})),Ce(ln.call(null,f)),Ce(zn.call(null,c,{path:"/settings/backups/?.*"})),Ce(ln.call(null,c)),Ce(zn.call(null,h,{path:"/settings/export-collections/?.*"})),Ce(ln.call(null,h)),Ce(zn.call(null,y,{path:"/settings/import-collections/?.*"})),Ce(ln.call(null,y)),Ce(zn.call(null,T,{path:"/settings/auth-providers/?.*"})),Ce(ln.call(null,T)),Ce(zn.call(null,O,{path:"/settings/tokens/?.*"})),Ce(ln.call(null,O)),Ce(zn.call(null,I,{path:"/settings/admins/?.*"})),Ce(ln.call(null,I))],P=!0)},p:ee,i:ee,o:ee,d(R){R&&k(e),P=!1,Me(F)}}}class Ti extends ve{constructor(e){super(),be(this,e,null,FO,me,{})}}function uh(n,e,t){const i=n.slice();return i[31]=e[t],i}function ch(n){let e,t;return e=new ce({props:{class:"form-field readonly",name:"id",$$slots:{default:[NO,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function NO(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="id",o=E(),r=v("div"),a=v("i"),u=E(),c=v("input"),p(t,"class",z.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[30]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[30]),c.value=m=n[1].id,c.readOnly=!0},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),w(g,o,y),w(g,r,y),b(r,a),w(g,u,y),w(g,c,y),_||(h=Ce(f=ze.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(f,"href","/settings/storage"),p(f,"class","sidebar-list-item"),p(c,"href","/settings/backups"),p(c,"class","sidebar-list-item"),p(m,"class","sidebar-title"),p(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(y,"href","/settings/import-collections"),p(y,"class","sidebar-list-item"),p($,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"class","sidebar-list-item"),p(O,"href","/settings/tokens"),p(O,"class","sidebar-list-item"),p(I,"href","/settings/admins"),p(I,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(R,N){w(R,e,N),b(e,t),b(t,i),b(t,s),b(t,l),b(t,o),b(t,r),b(t,a),b(t,f),b(t,u),b(t,c),b(t,d),b(t,m),b(t,_),b(t,h),b(t,g),b(t,y),b(t,S),b(t,$),b(t,C),b(t,T),b(t,M),b(t,O),b(t,D),b(t,I),P||(F=[Ce(zn.call(null,l,{path:"/settings"})),Ce(ln.call(null,l)),Ce(zn.call(null,r,{path:"/settings/mail/?.*"})),Ce(ln.call(null,r)),Ce(zn.call(null,f,{path:"/settings/storage/?.*"})),Ce(ln.call(null,f)),Ce(zn.call(null,c,{path:"/settings/backups/?.*"})),Ce(ln.call(null,c)),Ce(zn.call(null,h,{path:"/settings/export-collections/?.*"})),Ce(ln.call(null,h)),Ce(zn.call(null,y,{path:"/settings/import-collections/?.*"})),Ce(ln.call(null,y)),Ce(zn.call(null,T,{path:"/settings/auth-providers/?.*"})),Ce(ln.call(null,T)),Ce(zn.call(null,O,{path:"/settings/tokens/?.*"})),Ce(ln.call(null,O)),Ce(zn.call(null,I,{path:"/settings/admins/?.*"})),Ce(ln.call(null,I))],P=!0)},p:ee,i:ee,o:ee,d(R){R&&k(e),P=!1,Me(F)}}}class Ti extends ve{constructor(e){super(),be(this,e,null,FO,me,{})}}function uh(n,e,t){const i=n.slice();return i[31]=e[t],i}function ch(n){let e,t;return e=new ce({props:{class:"form-field readonly",name:"id",$$slots:{default:[NO,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function NO(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="id",o=E(),r=v("div"),a=v("i"),u=E(),c=v("input"),p(t,"class",j.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[30]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[30]),c.value=m=n[1].id,c.readOnly=!0},m(g,y){w(g,e,y),b(e,t),b(e,i),b(e,s),w(g,o,y),w(g,r,y),b(r,a),w(g,u,y),w(g,c,y),_||(h=Ce(f=ze.call(null,a,{text:`Created: ${n[1].created}
Updated: ${n[1].updated}`,position:"left"})),_=!0)},p(g,y){y[0]&1073741824&&l!==(l=g[30])&&p(e,"for",l),f&&qt(f.update)&&y[0]&2&&f.update.call(null,{text:`Created: ${g[1].created}
Updated: ${g[1].updated}`,position:"left"}),y[0]&1073741824&&d!==(d=g[30])&&p(c,"id",d),y[0]&2&&m!==(m=g[1].id)&&c.value!==m&&(c.value=m)},d(g){g&&k(e),g&&k(o),g&&k(r),g&&k(u),g&&k(c),_=!1,h()}}}function dh(n){let e,t,i,s,l,o,r;function a(){return n[18](n[31])}return{c(){e=v("button"),t=v("img"),s=E(),mn(t.src,i="./images/avatars/avatar"+n[31]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[31]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(f,u){w(f,e,u),b(e,t),b(e,s),o||(r=Y(e,"click",a),o=!0)},p(f,u){n=f,u[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(f){f&&k(e),o=!1,r()}}}function RO(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Email",o=E(),r=v("input"),p(t,"class",z.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),re(r,n[3]),f||(u=Y(r,"input",n[19]),f=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&re(r,c[3])},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,u()}}}function ph(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",$$slots:{default:[qO,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function qO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[30]),p(s,"for",o=n[30])},m(f,u){w(f,e,u),e.checked=n[4],w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[20]),r=!0)},p(f,u){u[0]&1073741824&&t!==(t=f[30])&&p(e,"id",t),u[0]&16&&(e.checked=f[4]),u[0]&1073741824&&o!==(o=f[30])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function mh(n){let e,t,i,s,l,o,r,a,f;return s=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[jO,({uniqueId:u})=>({30:u}),({uniqueId:u})=>[u?1073741824:0]]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[zO,({uniqueId:u})=>({30:u}),({uniqueId:u})=>[u?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),B(s.$$.fragment),l=E(),o=v("div"),B(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(u,c){w(u,e,c),b(e,t),b(t,i),V(s,i,null),b(t,l),b(t,o),V(r,o,null),f=!0},p(u,c){const d={};c[0]&1073742336|c[1]&8&&(d.$$scope={dirty:c,ctx:u}),s.$set(d);const m={};c[0]&1073742848|c[1]&8&&(m.$$scope={dirty:c,ctx:u}),r.$set(m)},i(u){f||(A(s.$$.fragment,u),A(r.$$.fragment,u),u&&Ge(()=>{f&&(a||(a=Re(t,tt,{duration:150},!0)),a.run(1))}),f=!0)},o(u){L(s.$$.fragment,u),L(r.$$.fragment,u),u&&(a||(a=Re(t,tt,{duration:150},!1)),a.run(0)),f=!1},d(u){u&&k(e),H(s),H(r),u&&a&&a.end()}}}function jO(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),re(r,n[9]),f||(u=Y(r,"input",n[21]),f=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&re(r,c[9])},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,u()}}}function zO(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password confirm",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),re(r,n[10]),f||(u=Y(r,"input",n[22]),f=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&1024&&r.value!==c[10]&&re(r,c[10])},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,u()}}}function VO(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_=!n[5]&&ch(n),h=[0,1,2,3,4,5,6,7,8,9],g=[];for(let $=0;$<10;$+=1)g[$]=dh(uh(n,h,$));a=new ce({props:{class:"form-field required",name:"email",$$slots:{default:[RO,({uniqueId:$})=>({30:$}),({uniqueId:$})=>[$?1073741824:0]]},$$scope:{ctx:n}}});let y=!n[5]&&ph(n),S=(n[5]||n[4])&&mh(n);return{c(){e=v("form"),_&&_.c(),t=E(),i=v("div"),s=v("p"),s.textContent="Avatar",l=E(),o=v("div");for(let $=0;$<10;$+=1)g[$].c();r=E(),B(a.$$.fragment),f=E(),y&&y.c(),u=E(),S&&S.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[12]),p(e,"class","grid"),p(e,"autocomplete","off")},m($,C){w($,e,C),_&&_.m(e,null),b(e,t),b(e,i),b(i,s),b(i,l),b(i,o);for(let T=0;T<10;T+=1)g[T]&&g[T Line truncated
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[16]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function UO(n){let e,t,i,s,l,o,r=n[5]?"Create":"Save changes",a,f,u,c,d,m=!n[5]&&hh(n);return{c(){m&&m.c(),e=E(),t=v("button"),i=v("span"),i.textContent="Cancel",s=E(),l=v("button"),o=v("span"),a=U(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-transparent"),t.disabled=n[7],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[12]),p(l,"class","btn btn-expanded"),l.disabled=f=!n[11]||n[7],X(l,"btn-loading",n[7])},m(_,h){m&&m.m(_,h),w(_,e,h),w(_,t,h),b(t,i),w(_,s,h),w(_,l,h),b(l,o),b(o,a),u=!0,c||(d=Y(t,"click",n[17]),c=!0)},p(_,h){_[5]?m&&(ae(),L(m,1,1,()=>{m=null}),fe()):m?(m.p(_,h),h[0]&32&&A(m,1)):(m=hh(_),m.c(),A(m,1),m.m(e.parentNode,e)),(!u||h[0]&128)&&(t.disabled=_[7]),(!u||h[0]&32)&&r!==(r=_[5]?"Create":"Save changes")&&se(a,r),(!u||h[0]&2176&&f!==(f=!_[11]||_[7]))&&(l.disabled=f),(!u||h[0]&128)&&X(l,"btn-loading",_[7])},i(_){u||(A(m),u=!0)},o(_){L(m),u=!1},d(_){m&&m.d(_),_&&k(e),_&&k(t),_&&k(s),_&&k(l),c=!1,d()}}}function WO(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[UO],header:[HO],default:[VO]},$$scope:{ctx:n}};return e=new nn({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&2304&&(o.beforeHide=s[23]),l[0]&3774|l[1]&8&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[24](null),H(e,s)}}}function YO(n,e,t){let i,s;const l=wt(),o="admin_"+z.randomString(5);let r,a={},f=!1,u=!1,c=0,d="",m="",_="",h=!1;function g(G){return S(G),t(8,u=!0),r==null?void 0:r.show()}function y(){return r==null?void 0:r.hide()}function S(G){t(1,a=structuredClone(G||{})),$()}function $(){t(4,h=!1),t(3,d=(a==null?void 0:a.email)||""),t(2,c=(a==null?void 0:a.avatar)||0),t(9,m=""),t(10,_=""),xt({})}function C(){if(f||!s)return;t(7,f=!0);const G={email:d,avatar:c};(i||h)&&(G.password=m,G.passwordConfirm=_);let Q;i?Q=ue.admins.create(G):Q=ue.admins.update(a.id,G),Q.then(async K=>{var le;t(8,u=!1),y(),zt(i?"Successfully created admin.":"Successfully updated admin."),((le=ue.authStore.model)==null?void 0:le.id)===K.id&&ue.authStore.save(ue.authStore.token,K),l("save",K)}).catch(K=>{ue.error(K)}).finally(()=>{t(7,f=!1)})}function T(){a!=null&&a.id&&dn("Do you really want to delete the selected admin?",()=>ue.admins.delete(a.id).then(()=>{t(8,u=!1),y(),zt("Successfully deleted admin."),l("delete",a)}).catch(G=>{ue.error(G)}))}const M=()=>T(),O=()=>y(),D=G=>t(2,c=G);function I(){d=this.value,t(3,d)}function P(){h=this.checked,t(4,h)}function F(){m=this.value,t(9,m)}function R(){_=this.value,t(10,_)}const N=()=>s&&u?(dn("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,u=!1),y()}),!1):!0;function q(G){ne[G?"unshift":"push"](()=>{r=G,t(6,r)})}function j(G){Fe.call(this,n,G)}function J(G){Fe.call(this,n,G)}return n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(a!=null&&a.id)),n.$$.dirty[0]&62&&t(11,s=i&&d!=""||h||d!==a.email||c!==a.avatar)},[y,a,c,d,h,i,r,f,u,m,_,s,o,C,T,g,M,O,D,I,P,F,R,N,q,j,J]}class KO extends ve{constructor(e){super(),be(this,e,YO,WO,me,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function _h(n,e,t){const i=n.slice();return i[24]=e[t],i}function JO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="id",p(t,"class",z.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function ZO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="email",p(t,"class",z.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function GO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="created",p(t,"class",z.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function XO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="updated",p(t,"class",z.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function gh(n){let e;function t(l,o){return l[5]?xO:QO}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function QO(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&bh(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,f){w(a,e,f),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,f){var u;(u=a[1])!=null&&u.lenLine truncated
`},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function bh(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){w(s,e,l),t||(i=Y(e,"click",n[17]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function vh(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function yh(n,e){let t,i,s,l,o,r,a,f,u,c,d,m=e[24].id+"",_,h,g,y,S,$=e[24].email+"",C,T,M,O,D,I,P,F,R,N,q,j,J,G;u=new Dl({props:{value:e[24].id}});let Q=e[24].id===e[7].id&&vh();D=new Si({props:{date:e[24].created}}),F=new Si({props:{date:e[24].updated}});function K(){return e[15](e[24])}function le(...x){return e[16](e[24],...x)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=E(),a=v("td"),f=v("div"),B(u.$$.fragment),c=E(),d=v("span"),_=U(m),h=E(),Q&&Q.c(),g=E(),y=v("td"),S=v("span"),C=U($),M=E(),O=v("td"),B(D.$$.fragment),I=E(),P=v("td"),B(F.$$.fragment),R=E(),N=v("td"),N.innerHTML='<i class="ri-arrow-right-line"></i>',q=E(),mn(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(f,"class","label"),p(a,"class","col-type-text col-field-id"),p(S,"class","txt txt-ellipsis"),p(S,"title",T=e[24].email),p(y,"class","col-type-email col-field-email"),p(O,"class","col-type-date col-field-created"),p(P,"class","col-type-date col-field-updated"),p(N,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(x,te){w(x,t,te),b(t,i),b(i,s),b(s,l),b(t,r),b(t,a),b(a,f),V(u,f,null),b(f,c),b(f,d),b(d,_),b(a,h),Q&&Q.m(a,null),b(t,g),b(t,y),b(y,S),b(S,C),b(t,M),b(t,O),V(D,O,null),b(t,I),b(t,P),V(F,P,null),b(t,R),b(t,N),b(t,q),j=!0,J||(G=[Y(t,"click",K),Y(t,"keydown",le)],J=!0)},p(x,te){e=x,(!j||te&16&&!mn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const Ee={};te&16&&(Ee.value=e[24].id),u.$set(Ee),(!j||te&16)&&m!==(m=e[24].id+"")&&se(_,m),e[24].id===e[7].id?Q||(Q=vh(),Q.c(),Q.m(a,null)):Q&&(Q.d(1),Q=null),(!j||te&16)&&$!==($=e[24].email+"")&&se(C,$),(!j||te&16&&T!==(T=e[24].email))&&p(S,"title",T);const Pe={};te&16&&(Pe.date=e[24].created),D.$set(Pe);const je={};te&16&&(je.date=e[24].updated),F.$set(je)},i(x){j||(A(u.$$.fragment,x),A(D.$$.fragment,x),A(F.$$.fragment,x),j=!0)},o(x){L(u.$$.fragment,x),L(D.$$.fragment,x),L(F.$$.fragment,x),j=!1},d(x){x&&k(t),H(u),Q&&Q.d(),H(D),H(F),J=!1,Me(G)}}}function eD(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T=[],M=new Map,O;function D(K){n[11](K)}let I={class:"col-type-text",name:"id",$$slots:{default:[JO]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new rn({props:I}),ne.push(()=>de(o,"sort",D));function P(K){n[12](K)}let F={class:"col-type-email col-field-email",name:"email",$$slots:{default:[ZO]},$$scope:{ctx:n}};n[2]!==void 0&&(F.sort=n[2]),f=new rn({props:F}),ne.push(()=>de(f,"sort",P));function R(K){n[13](K)}let N={class:"col-type-date col-field-created",name:"created",$$slots:{default:[GO]},$$scope:{ctx:n}};n[2]!==void 0&&(N.sort=n[2]),d=new rn({props:N}),ne.push(()=>de(d,"sort",R));function q(K){n[14](K)}let j={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[XO]},$$scope:{ctx:n}};n[2]!==void 0&&(j.sort=n[2]),h=new rn({props:j}),ne.push(()=>de(h,"sort",q));let J=n[4];const G=K=>K[24].id;for(let K=0;K<J.length;K+=1){let le=_h(n,J,K),x=G(le);M.set(x,T[K]=yh(x,le))}let Q=null;return J.length||(Q=gh(n)),{c(){e=v("table"),t=v("thead"),i=v("tr"),s=v("th"),l=E(),B(o.$$.fragment),a=E(),B(f.$$.fragment),c=E(),B(d.$$.fragment),_=E(),B(h.$$.fragment),y=E(),S=v("th"),$=E(),C=v("tbody");for(let K=0;K<T.length;K+=1)T[K].c();Q&&Q.c(),p(s,"class","min-width"),p(S,"class","col-type-action min-width"),p(e,"class","table"),X(e,"table-loading",n[5])},m(K,le){w(K,e,le),b(e,t),b(t,i),b(i,s),b(i,l),V(o,i,null),b(i,a),V(f,i,null),b(i,c),V(d,i,null),b(i,_),V(h,i,null),b(i,y),b(i,S),b(e,$),b(e,C);for(let x=0;x<T.length;x+=1)T[x]&&T[x].m(C,null);Q&&Q.m(C,null),O=!0},p(K,le){const x={};le&134217728&&(x.$$scope={dirty:le,ctx:K}),!r&&le&4&&(r=!0,x.sort=K[2],ge(()=>r=!1)),o.$set(x);const te={};le&134217728&&(te.$$scope={dirty:le,ctx:K}),!u&&le&4&&(u=!0,te.sort=K[2],ge(()=>u=!1)),f.$set(te);const Ee={};le&134217728&&(Ee.$$scope={dirty:le,ctx:K}),!m&&le&4&&(m=!0,Ee.sort=K[2],ge(()=>m=!1)),d.$set(Ee);const Pe={};le&134217728&&(Pe.$$scope={dirty:le,ctx:K}),!g&&le&4&&(g=!0,Pe.sort=K[2],ge(()=>g=!1)),h.$set(Pe),le&186&&(J=K[4],ae(),T=vt(T,le,G,1,K,J,M,C,Ht,yh,null,_h),fe(),!J.length&&Q?Q.p(K,le):J.length?Q&&(Q.d(1),Q=null):(Q=gh(K),Q.c(),Q.m(C,null))),(!O||le&32)&&X(e,"table-loading",K[5])},i(K){if(!O){A(o.$$.fragment,K),A(f.$$.fragment,K),A(d.$$.fragment,K),A(h.$$.fragment,K);for(let le=0;le<J.length;le+=1)A(T[le]);O=!0}},o(K){L(o.$$.fragment,K),L(f.$$.fragment,K),L(d.$$.fragment,K),L(h.$$.fragment,K);for(let Line truncated
<span class="txt">New admin</span>`,m=E(),B(_.$$.fragment),h=E(),g=v("div"),y=E(),B(S.$$.fragment),$=E(),D&&D.c(),C=ye(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p(g,"class","clearfix m-b-base")},m(I,P){w(I,e,P),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(e,r),V(a,e,null),b(e,f),b(e,u),b(e,c),b(e,d),w(I,m,P),V(_,I,P),w(I,h,P),w(I,g,P),w(I,y,P),V(S,I,P),w(I,$,P),D&&D.m(I,P),w(I,C,P),T=!0,M||(O=Y(d,"click",n[9]),M=!0)},p(I,P){(!T||P&64)&&se(o,I[6]);const F={};P&2&&(F.value=I[1]),_.$set(F);const R={};P&134217918&&(R.$$scope={dirty:P,ctx:I}),S.$set(R),I[4].length?D?D.p(I,P):(D=kh(I),D.c(),D.m(C.parentNode,C)):D&&(D.d(1),D=null)},i(I){T||(A(a.$$.fragment,I),A(_.$$.fragment,I),A(S.$$.fragment,I),T=!0)},o(I){L(a.$$.fragment,I),L(_.$$.fragment,I),L(S.$$.fragment,I),T=!1},d(I){I&&k(e),H(a),I&&k(m),H(_,I),I&&k(h),I&&k(g),I&&k(y),H(S,I),I&&k($),D&&D.d(I),I&&k(C),M=!1,O()}}}function nD(n){let e,t,i,s,l,o;e=new Ti({}),i=new kn({props:{$$slots:{default:[tD]},$$scope:{ctx:n}}});let r={};return l=new KO({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment),s=E(),B(l.$$.fragment)},m(a,f){V(e,a,f),w(a,t,f),V(i,a,f),w(a,s,f),V(l,a,f),o=!0},p(a,[f]){const u={};f&134217982&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&k(t),H(i,a),a&&k(s),n[18](null),H(l,a)}}}function iD(n,e,t){let i,s,l;We(n,ga,F=>t(21,i=F)),We(n,Et,F=>t(6,s=F)),We(n,Oa,F=>t(7,l=F)),tn(Et,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],f=!1,u=o.get("filter")||"",c=o.get("sort")||"-created";function d(){t(5,f=!0),t(4,a=[]);const F=z.normalizeSearchFilter(u,["id","email","created","updated"]);return ue.admins.getFullList(100,{sort:c||"-created",filter:F}).then(R=>{t(4,a=R),t(5,f=!1)}).catch(R=>{R!=null&&R.isAbort||(t(5,f=!1),console.warn(R),m(),ue.error(R,(R==null?void 0:R.status)!=400))})}function m(){t(4,a=[])}const _=()=>d(),h=()=>r==null?void 0:r.show(),g=F=>t(1,u=F.detail);function y(F){c=F,t(2,c)}function S(F){c=F,t(2,c)}function $(F){c=F,t(2,c)}function C(F){c=F,t(2,c)}const T=F=>r==null?void 0:r.show(F),M=(F,R)=>{(R.code==="Enter"||R.code==="Space")&&(R.preventDefault(),r==null||r.show(F))},O=()=>t(1,u="");function D(F){ne[F?"unshift":"push"](()=>{r=F,t(3,r)})}const I=()=>d(),P=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&u!==-1){const F=new URLSearchParams({filter:u,sort:c}).toString();qi("/settings/admins?"+F),d()}},[d,u,c,r,a,f,s,l,_,h,g,y,S,$,C,T,M,O,D,I,P]}class sD extends ve{constructor(e){super(),be(this,e,iD,nD,me,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function lD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=E(),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(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0]),l.focus(),r||(a=Y(l,"input",n[4]),r=!0)},p(f,u){u&256&&i!==(i=f[8])&&p(e,"for",i),u&256&&o!==(o=f[8])&&p(l,"id",o),u&1&&l.value!==f[0]&&re(l,f[0])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function oD(n){let e,t,i,s,l,o,r,a,f,u,c;return{c(){e=v("label"),t=U("Password"),s=E(),l=v("input"),r=E(),a=v("div"),f=v("a"),f.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(f,"href","/request-password-reset"),p(f,"class","link-hint"),p(a,"class","help-block")},m(d,m){w(d,e,m),b(e,t),w(d,s,m),w(d,l,m),re(l,n[1]),w(d,r,m),w(d,a,m),b(a,f),u||(c=[Y(l,"input",n[5]),Ce(ln.call(null,f))],u=!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]&&re(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),d&&k(a),u=!1,Me(c)}}}function rD(n){let e,t,i,s,l,o,r,a,f,u,c;return s=new ce({props:{class:"form-field required",name:"identity",$$slots:{default:[lD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[oD,({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=E(),B(s.$$.fragment),l=E(),B(o.$$.fragment),r=E(),a=v("button"),a.innerHTML=`<span class="txt">Login</span>
Updated: ${g[1].updated}`,position:"left"}),y[0]&1073741824&&d!==(d=g[30])&&p(c,"id",d),y[0]&2&&m!==(m=g[1].id)&&c.value!==m&&(c.value=m)},d(g){g&&k(e),g&&k(o),g&&k(r),g&&k(u),g&&k(c),_=!1,h()}}}function dh(n){let e,t,i,s,l,o,r;function a(){return n[18](n[31])}return{c(){e=v("button"),t=v("img"),s=E(),mn(t.src,i="./images/avatars/avatar"+n[31]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[31]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(f,u){w(f,e,u),b(e,t),b(e,s),o||(r=Y(e,"click",a),o=!0)},p(f,u){n=f,u[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(f){f&&k(e),o=!1,r()}}}function RO(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Email",o=E(),r=v("input"),p(t,"class",j.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),re(r,n[3]),f||(u=Y(r,"input",n[19]),f=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&re(r,c[3])},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,u()}}}function ph(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",$$slots:{default:[qO,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function qO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[30]),p(s,"for",o=n[30])},m(f,u){w(f,e,u),e.checked=n[4],w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[20]),r=!0)},p(f,u){u[0]&1073741824&&t!==(t=f[30])&&p(e,"id",t),u[0]&16&&(e.checked=f[4]),u[0]&1073741824&&o!==(o=f[30])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function mh(n){let e,t,i,s,l,o,r,a,f;return s=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[jO,({uniqueId:u})=>({30:u}),({uniqueId:u})=>[u?1073741824:0]]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[zO,({uniqueId:u})=>({30:u}),({uniqueId:u})=>[u?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),B(s.$$.fragment),l=E(),o=v("div"),B(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(u,c){w(u,e,c),b(e,t),b(t,i),V(s,i,null),b(t,l),b(t,o),V(r,o,null),f=!0},p(u,c){const d={};c[0]&1073742336|c[1]&8&&(d.$$scope={dirty:c,ctx:u}),s.$set(d);const m={};c[0]&1073742848|c[1]&8&&(m.$$scope={dirty:c,ctx:u}),r.$set(m)},i(u){f||(A(s.$$.fragment,u),A(r.$$.fragment,u),u&&Ge(()=>{f&&(a||(a=Re(t,tt,{duration:150},!0)),a.run(1))}),f=!0)},o(u){L(s.$$.fragment,u),L(r.$$.fragment,u),u&&(a||(a=Re(t,tt,{duration:150},!1)),a.run(0)),f=!1},d(u){u&&k(e),H(s),H(r),u&&a&&a.end()}}}function jO(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),re(r,n[9]),f||(u=Y(r,"input",n[21]),f=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&re(r,c[9])},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,u()}}}function zO(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password confirm",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),re(r,n[10]),f||(u=Y(r,"input",n[22]),f=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&1024&&r.value!==c[10]&&re(r,c[10])},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,u()}}}function VO(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_=!n[5]&&ch(n),h=[0,1,2,3,4,5,6,7,8,9],g=[];for(let $=0;$<10;$+=1)g[$]=dh(uh(n,h,$));a=new ce({props:{class:"form-field required",name:"email",$$slots:{default:[RO,({uniqueId:$})=>({30:$}),({uniqueId:$})=>[$?1073741824:0]]},$$scope:{ctx:n}}});let y=!n[5]&&ph(n),S=(n[5]||n[4])&&mh(n);return{c(){e=v("form"),_&&_.c(),t=E(),i=v("div"),s=v("p"),s.textContent="Avatar",l=E(),o=v("div");for(let $=0;$<10;$+=1)g[$].c();r=E(),B(a.$$.fragment),f=E(),y&&y.c(),u=E(),S&&S.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[12]),p(e,"class","grid"),p(e,"autocomplete","off")},m($,C){w($,e,C),_&&_.m(e,null),b(e,t),b(e,i),b(i,s),b(i,l),b(i,o);for(let T=0;T<10;T+=1)g[T]&&g[T Line truncated
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[16]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function UO(n){let e,t,i,s,l,o,r=n[5]?"Create":"Save changes",a,f,u,c,d,m=!n[5]&&hh(n);return{c(){m&&m.c(),e=E(),t=v("button"),i=v("span"),i.textContent="Cancel",s=E(),l=v("button"),o=v("span"),a=U(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-transparent"),t.disabled=n[7],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[12]),p(l,"class","btn btn-expanded"),l.disabled=f=!n[11]||n[7],X(l,"btn-loading",n[7])},m(_,h){m&&m.m(_,h),w(_,e,h),w(_,t,h),b(t,i),w(_,s,h),w(_,l,h),b(l,o),b(o,a),u=!0,c||(d=Y(t,"click",n[17]),c=!0)},p(_,h){_[5]?m&&(ae(),L(m,1,1,()=>{m=null}),fe()):m?(m.p(_,h),h[0]&32&&A(m,1)):(m=hh(_),m.c(),A(m,1),m.m(e.parentNode,e)),(!u||h[0]&128)&&(t.disabled=_[7]),(!u||h[0]&32)&&r!==(r=_[5]?"Create":"Save changes")&&se(a,r),(!u||h[0]&2176&&f!==(f=!_[11]||_[7]))&&(l.disabled=f),(!u||h[0]&128)&&X(l,"btn-loading",_[7])},i(_){u||(A(m),u=!0)},o(_){L(m),u=!1},d(_){m&&m.d(_),_&&k(e),_&&k(t),_&&k(s),_&&k(l),c=!1,d()}}}function WO(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[UO],header:[HO],default:[VO]},$$scope:{ctx:n}};return e=new nn({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&2304&&(o.beforeHide=s[23]),l[0]&3774|l[1]&8&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[24](null),H(e,s)}}}function YO(n,e,t){let i,s;const l=wt(),o="admin_"+j.randomString(5);let r,a={},f=!1,u=!1,c=0,d="",m="",_="",h=!1;function g(G){return S(G),t(8,u=!0),r==null?void 0:r.show()}function y(){return r==null?void 0:r.hide()}function S(G){t(1,a=structuredClone(G||{})),$()}function $(){t(4,h=!1),t(3,d=(a==null?void 0:a.email)||""),t(2,c=(a==null?void 0:a.avatar)||0),t(9,m=""),t(10,_=""),xt({})}function C(){if(f||!s)return;t(7,f=!0);const G={email:d,avatar:c};(i||h)&&(G.password=m,G.passwordConfirm=_);let Q;i?Q=ue.admins.create(G):Q=ue.admins.update(a.id,G),Q.then(async K=>{var le;t(8,u=!1),y(),zt(i?"Successfully created admin.":"Successfully updated admin."),((le=ue.authStore.model)==null?void 0:le.id)===K.id&&ue.authStore.save(ue.authStore.token,K),l("save",K)}).catch(K=>{ue.error(K)}).finally(()=>{t(7,f=!1)})}function T(){a!=null&&a.id&&dn("Do you really want to delete the selected admin?",()=>ue.admins.delete(a.id).then(()=>{t(8,u=!1),y(),zt("Successfully deleted admin."),l("delete",a)}).catch(G=>{ue.error(G)}))}const M=()=>T(),O=()=>y(),D=G=>t(2,c=G);function I(){d=this.value,t(3,d)}function P(){h=this.checked,t(4,h)}function F(){m=this.value,t(9,m)}function R(){_=this.value,t(10,_)}const N=()=>s&&u?(dn("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,u=!1),y()}),!1):!0;function q(G){ne[G?"unshift":"push"](()=>{r=G,t(6,r)})}function z(G){Fe.call(this,n,G)}function J(G){Fe.call(this,n,G)}return n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(a!=null&&a.id)),n.$$.dirty[0]&62&&t(11,s=i&&d!=""||h||d!==a.email||c!==a.avatar)},[y,a,c,d,h,i,r,f,u,m,_,s,o,C,T,g,M,O,D,I,P,F,R,N,q,z,J]}class KO extends ve{constructor(e){super(),be(this,e,YO,WO,me,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function _h(n,e,t){const i=n.slice();return i[24]=e[t],i}function JO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="id",p(t,"class",j.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function ZO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="email",p(t,"class",j.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function GO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="created",p(t,"class",j.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function XO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="updated",p(t,"class",j.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(e,s)},p:ee,d(l){l&&k(e)}}}function gh(n){let e;function t(l,o){return l[5]?xO:QO}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function QO(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&bh(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,f){w(a,e,f),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,f){var u;(u=a[1])!=null&&u.lenLine truncated
`},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function bh(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){w(s,e,l),t||(i=Y(e,"click",n[17]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function vh(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function yh(n,e){let t,i,s,l,o,r,a,f,u,c,d,m=e[24].id+"",_,h,g,y,S,$=e[24].email+"",C,T,M,O,D,I,P,F,R,N,q,z,J,G;u=new Dl({props:{value:e[24].id}});let Q=e[24].id===e[7].id&&vh();D=new Si({props:{date:e[24].created}}),F=new Si({props:{date:e[24].updated}});function K(){return e[15](e[24])}function le(...x){return e[16](e[24],...x)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=E(),a=v("td"),f=v("div"),B(u.$$.fragment),c=E(),d=v("span"),_=U(m),h=E(),Q&&Q.c(),g=E(),y=v("td"),S=v("span"),C=U($),M=E(),O=v("td"),B(D.$$.fragment),I=E(),P=v("td"),B(F.$$.fragment),R=E(),N=v("td"),N.innerHTML='<i class="ri-arrow-right-line"></i>',q=E(),mn(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(f,"class","label"),p(a,"class","col-type-text col-field-id"),p(S,"class","txt txt-ellipsis"),p(S,"title",T=e[24].email),p(y,"class","col-type-email col-field-email"),p(O,"class","col-type-date col-field-created"),p(P,"class","col-type-date col-field-updated"),p(N,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(x,te){w(x,t,te),b(t,i),b(i,s),b(s,l),b(t,r),b(t,a),b(a,f),V(u,f,null),b(f,c),b(f,d),b(d,_),b(a,h),Q&&Q.m(a,null),b(t,g),b(t,y),b(y,S),b(S,C),b(t,M),b(t,O),V(D,O,null),b(t,I),b(t,P),V(F,P,null),b(t,R),b(t,N),b(t,q),z=!0,J||(G=[Y(t,"click",K),Y(t,"keydown",le)],J=!0)},p(x,te){e=x,(!z||te&16&&!mn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const Ee={};te&16&&(Ee.value=e[24].id),u.$set(Ee),(!z||te&16)&&m!==(m=e[24].id+"")&&se(_,m),e[24].id===e[7].id?Q||(Q=vh(),Q.c(),Q.m(a,null)):Q&&(Q.d(1),Q=null),(!z||te&16)&&$!==($=e[24].email+"")&&se(C,$),(!z||te&16&&T!==(T=e[24].email))&&p(S,"title",T);const Pe={};te&16&&(Pe.date=e[24].created),D.$set(Pe);const je={};te&16&&(je.date=e[24].updated),F.$set(je)},i(x){z||(A(u.$$.fragment,x),A(D.$$.fragment,x),A(F.$$.fragment,x),z=!0)},o(x){L(u.$$.fragment,x),L(D.$$.fragment,x),L(F.$$.fragment,x),z=!1},d(x){x&&k(t),H(u),Q&&Q.d(),H(D),H(F),J=!1,Me(G)}}}function eD(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T=[],M=new Map,O;function D(K){n[11](K)}let I={class:"col-type-text",name:"id",$$slots:{default:[JO]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new rn({props:I}),ne.push(()=>de(o,"sort",D));function P(K){n[12](K)}let F={class:"col-type-email col-field-email",name:"email",$$slots:{default:[ZO]},$$scope:{ctx:n}};n[2]!==void 0&&(F.sort=n[2]),f=new rn({props:F}),ne.push(()=>de(f,"sort",P));function R(K){n[13](K)}let N={class:"col-type-date col-field-created",name:"created",$$slots:{default:[GO]},$$scope:{ctx:n}};n[2]!==void 0&&(N.sort=n[2]),d=new rn({props:N}),ne.push(()=>de(d,"sort",R));function q(K){n[14](K)}let z={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[XO]},$$scope:{ctx:n}};n[2]!==void 0&&(z.sort=n[2]),h=new rn({props:z}),ne.push(()=>de(h,"sort",q));let J=n[4];const G=K=>K[24].id;for(let K=0;K<J.length;K+=1){let le=_h(n,J,K),x=G(le);M.set(x,T[K]=yh(x,le))}let Q=null;return J.length||(Q=gh(n)),{c(){e=v("table"),t=v("thead"),i=v("tr"),s=v("th"),l=E(),B(o.$$.fragment),a=E(),B(f.$$.fragment),c=E(),B(d.$$.fragment),_=E(),B(h.$$.fragment),y=E(),S=v("th"),$=E(),C=v("tbody");for(let K=0;K<T.length;K+=1)T[K].c();Q&&Q.c(),p(s,"class","min-width"),p(S,"class","col-type-action min-width"),p(e,"class","table"),X(e,"table-loading",n[5])},m(K,le){w(K,e,le),b(e,t),b(t,i),b(i,s),b(i,l),V(o,i,null),b(i,a),V(f,i,null),b(i,c),V(d,i,null),b(i,_),V(h,i,null),b(i,y),b(i,S),b(e,$),b(e,C);for(let x=0;x<T.length;x+=1)T[x]&&T[x].m(C,null);Q&&Q.m(C,null),O=!0},p(K,le){const x={};le&134217728&&(x.$$scope={dirty:le,ctx:K}),!r&&le&4&&(r=!0,x.sort=K[2],ge(()=>r=!1)),o.$set(x);const te={};le&134217728&&(te.$$scope={dirty:le,ctx:K}),!u&&le&4&&(u=!0,te.sort=K[2],ge(()=>u=!1)),f.$set(te);const Ee={};le&134217728&&(Ee.$$scope={dirty:le,ctx:K}),!m&&le&4&&(m=!0,Ee.sort=K[2],ge(()=>m=!1)),d.$set(Ee);const Pe={};le&134217728&&(Pe.$$scope={dirty:le,ctx:K}),!g&&le&4&&(g=!0,Pe.sort=K[2],ge(()=>g=!1)),h.$set(Pe),le&186&&(J=K[4],ae(),T=vt(T,le,G,1,K,J,M,C,Ht,yh,null,_h),fe(),!J.length&&Q?Q.p(K,le):J.length?Q&&(Q.d(1),Q=null):(Q=gh(K),Q.c(),Q.m(C,null))),(!O||le&32)&&X(e,"table-loading",K[5])},i(K){if(!O){A(o.$$.fragment,K),A(f.$$.fragment,K),A(d.$$.fragment,K),A(h.$$.fragment,K);for(let le=0;le<J.length;le+=1)A(T[le]);O=!0}},o(K){L(o.$$.fragment,K),L(f.$$.fragment,K),L(d.$$.fragment,K),L(h.$$.fragment,K);for(let Line truncated
<span class="txt">New admin</span>`,m=E(),B(_.$$.fragment),h=E(),g=v("div"),y=E(),B(S.$$.fragment),$=E(),D&&D.c(),C=ye(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p(g,"class","clearfix m-b-base")},m(I,P){w(I,e,P),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(e,r),V(a,e,null),b(e,f),b(e,u),b(e,c),b(e,d),w(I,m,P),V(_,I,P),w(I,h,P),w(I,g,P),w(I,y,P),V(S,I,P),w(I,$,P),D&&D.m(I,P),w(I,C,P),T=!0,M||(O=Y(d,"click",n[9]),M=!0)},p(I,P){(!T||P&64)&&se(o,I[6]);const F={};P&2&&(F.value=I[1]),_.$set(F);const R={};P&134217918&&(R.$$scope={dirty:P,ctx:I}),S.$set(R),I[4].length?D?D.p(I,P):(D=kh(I),D.c(),D.m(C.parentNode,C)):D&&(D.d(1),D=null)},i(I){T||(A(a.$$.fragment,I),A(_.$$.fragment,I),A(S.$$.fragment,I),T=!0)},o(I){L(a.$$.fragment,I),L(_.$$.fragment,I),L(S.$$.fragment,I),T=!1},d(I){I&&k(e),H(a),I&&k(m),H(_,I),I&&k(h),I&&k(g),I&&k(y),H(S,I),I&&k($),D&&D.d(I),I&&k(C),M=!1,O()}}}function nD(n){let e,t,i,s,l,o;e=new Ti({}),i=new kn({props:{$$slots:{default:[tD]},$$scope:{ctx:n}}});let r={};return l=new KO({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment),s=E(),B(l.$$.fragment)},m(a,f){V(e,a,f),w(a,t,f),V(i,a,f),w(a,s,f),V(l,a,f),o=!0},p(a,[f]){const u={};f&134217982&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&k(t),H(i,a),a&&k(s),n[18](null),H(l,a)}}}function iD(n,e,t){let i,s,l;We(n,ga,F=>t(21,i=F)),We(n,Et,F=>t(6,s=F)),We(n,Oa,F=>t(7,l=F)),tn(Et,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],f=!1,u=o.get("filter")||"",c=o.get("sort")||"-created";function d(){t(5,f=!0),t(4,a=[]);const F=j.normalizeSearchFilter(u,["id","email","created","updated"]);return ue.admins.getFullList(100,{sort:c||"-created",filter:F}).then(R=>{t(4,a=R),t(5,f=!1)}).catch(R=>{R!=null&&R.isAbort||(t(5,f=!1),console.warn(R),m(),ue.error(R,(R==null?void 0:R.status)!=400))})}function m(){t(4,a=[])}const _=()=>d(),h=()=>r==null?void 0:r.show(),g=F=>t(1,u=F.detail);function y(F){c=F,t(2,c)}function S(F){c=F,t(2,c)}function $(F){c=F,t(2,c)}function C(F){c=F,t(2,c)}const T=F=>r==null?void 0:r.show(F),M=(F,R)=>{(R.code==="Enter"||R.code==="Space")&&(R.preventDefault(),r==null||r.show(F))},O=()=>t(1,u="");function D(F){ne[F?"unshift":"push"](()=>{r=F,t(3,r)})}const I=()=>d(),P=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&u!==-1){const F=new URLSearchParams({filter:u,sort:c}).toString();qi("/settings/admins?"+F),d()}},[d,u,c,r,a,f,s,l,_,h,g,y,S,$,C,T,M,O,D,I,P]}class sD extends ve{constructor(e){super(),be(this,e,iD,nD,me,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function lD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=E(),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(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0]),l.focus(),r||(a=Y(l,"input",n[4]),r=!0)},p(f,u){u&256&&i!==(i=f[8])&&p(e,"for",i),u&256&&o!==(o=f[8])&&p(l,"id",o),u&1&&l.value!==f[0]&&re(l,f[0])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function oD(n){let e,t,i,s,l,o,r,a,f,u,c;return{c(){e=v("label"),t=U("Password"),s=E(),l=v("input"),r=E(),a=v("div"),f=v("a"),f.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(f,"href","/request-password-reset"),p(f,"class","link-hint"),p(a,"class","help-block")},m(d,m){w(d,e,m),b(e,t),w(d,s,m),w(d,l,m),re(l,n[1]),w(d,r,m),w(d,a,m),b(a,f),u||(c=[Y(l,"input",n[5]),Ce(ln.call(null,f))],u=!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]&&re(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),d&&k(a),u=!1,Me(c)}}}function rD(n){let e,t,i,s,l,o,r,a,f,u,c;return s=new ce({props:{class:"form-field required",name:"identity",$$slots:{default:[lD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[oD,({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=E(),B(s.$$.fragment),l=E(),B(o.$$.fragment),r=E(),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){w(d,e,m),b(e,t),b(e,i),V(s,e,null),b(e,l),V(o,e,null),b(e,r),b(e,a),f=!0,u||(c=Y(e,"submit",Xe(n[3])),u=!0)},p(d,m){const _={};m&769&&(_.$$scope={dirty:m,ctx:d}),s.$set(_);const h={};m&770&&(h.$$scope={dirty:m,ctx:d}),o.$set(h),(!f||m&4)&&X(a,"btn-disabled",d[2]),(!f||m&4)&&X(a,"btn-loading",d[2])},i(d){f||(A(s.$$.fragment,d),A(o.$$.fragment,d),f=!0)},o(d){L(s.$$.fragment,d),L(o.$$.fragment,d),f=!1},d(d){d&&k(e),H(s),H(o),u=!1,c()}}}function aD(n){let e,t;return e=new ab({props:{$$slots:{default:[rD]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function fD(n,e,t){let i;We(n,ga,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),ue.admins.authWithPassword(l,o).then(()=>{Ma(),qi("/")}).catch(()=>{$s("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function f(){l=this.value,t(0,l)}function u(){o=this.value,t(1,o)}return[l,o,r,a,f,u]}class uD extends ve{constructor(e){super(),be(this,e,fD,aD,me,{})}}function cD(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T;i=new ce({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[pD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[mD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new ce({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[hD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[_D,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&wh(n);return{c(){e=v("div"),t=v("div"),B(i.$$.fragment),s=E(),l=v("div"),B(o.$$.fragment),r=E(),B(a.$$.fragment),f=E(),B(u.$$.fragment),c=E(),d=v("div"),m=v("div"),_=E(),M&&M.c(),h=E(),g=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(g,"type","submit"),p(g,"class","btn btn-expanded"),g.disabled=S=!n[3]||n[2],X(g,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,D){w(O,e,D),b(e,t),V(i,t,null),b(e,s),b(e,l),V(o,l,null),b(e,r),V(a,e,null),b(e,f),V(u,e,null),b(e,c),b(e,d),b(d,m),b(d,_),M&&M.m(d,null),b(d,h),b(d,g),b(g,y),$=!0,C||(T=Y(g,"click",n[13]),C=!0)},p(O,D){const I={};D&1572865&&(I.$$scope={dirty:D,ctx:O}),i.$set(I);const P={};D&1572865&&(P.$$scope={dirty:D,ctx:O}),o.$set(P);const F={};D&1572865&&(F.$$scope={dirty:D,ctx:O}),a.$set(F);const R={};D&1572865&&(R.$$scope={dirty:D,ctx:O}),u.$set(R),O[3]?M?M.p(O,D):(M=wh(O),M.c(),M.m(d,h)):M&&(M.d(1),M=null),(!$||D&12&&S!==(S=!O[3]||O[2]))&&(g.disabled=S),(!$||D&4)&&X(g,"btn-loading",O[2])},i(O){$||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(u.$$.fragment,O),$=!0)},o(O){L(i.$$.fragment,O),L(o.$$.fragment,O),L(a.$$.fragment,O),L(u.$$.fragment,O),$=!1},d(O){O&&k(e),H(i),H(o),H(a),H(u),M&&M.d(),C=!1,T()}}}function dD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&k(e)}}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Application name"),s=E(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0].meta.appName),r||(a=Y(l,"input",n[8]),r=!0)},p(f,u){u&524288&&i!==(i=f[19])&&p(e,"for",i),u&524288&&o!==(o=f[19])&&p(l,"id",o),u&1&&l.value!==f[0].meta.appName&&re(l,f[0].meta.appName)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function mD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Application URL"),s=E(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0].meta.appUrl),r||(a=Y(l,"input",n[9]),r=!0)},p(f,u){u&524288&&i!==(i=f[19])&&p(e,"for",i),u&524288&&o!==(o=f[19])&&p(l,"id",o),u&1&&l.value!==f[0].meta.appUrl&&re(l,f[0].meta.appUrl)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function hD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Logs max days retention"),s=E(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[0].logs.maxDays),r||(a=Y(l,"input",n[10]),r=!0)},p(f,u){u&524288&&i!==(i=f[19])&&p(e,"for",i),u&524288&&o!==(o=f[19])&&p(l,"id",o),u&1&&pt(l.value)!==f[0].logs.maxDays&&re(l,f[0].logs.maxDays)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function _D(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=E(),s=v("label"),l=v("sLine truncated
<div class="breadcrumb-item">Application</div></nav>`,t=E(),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,_){w(m,e,_),w(m,t,_),w(m,i,_),b(i,s),c[l].m(s,null),r=!0,a||(f=Y(s,"submit",Xe(n[4])),a=!0)},p(m,_){let h=l;l=d(m),l===h?c[l].p(m,_):(ae(),L(c[h],1,1,()=>{c[h]=null}),fe(),o=c[l],o?o.p(m,_):(o=c[l]=u[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){L(o),r=!1},d(m){m&&k(e),m&&k(t),m&&k(i),c[l].d(),a=!1,f()}}}function bD(n){let e,t,i,s;return e=new Ti({}),i=new kn({props:{$$slots:{default:[gD]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(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){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&k(t),H(i,l)}}}function vD(n,e,t){let i,s,l,o;We(n,Ts,M=>t(14,s=M)),We(n,vo,M=>t(15,l=M)),We(n,Et,M=>t(16,o=M)),tn(Et,o="Application settings",o);let r={},a={},f=!1,u=!1,c="";d();async function d(){t(1,f=!0);try{const M=await ue.settings.getAll()||{};_(M)}catch(M){ue.error(M)}t(1,f=!1)}async function m(){if(!(u||!i)){t(2,u=!0);try{const M=await ue.settings.update(z.filterRedactedProps(a));_(M),zt("Successfully saved application settings.")}catch(M){ue.error(M)}t(2,u=!1)}}function _(M={}){var O,D;tn(vo,l=(O=M==null?void 0:M.meta)==null?void 0:O.appName,l),tn(Ts,s=!!((D=M==null?void 0:M.meta)!=null&&D.hideControls),s),t(0,a={meta:(M==null?void 0:M.meta)||{},logs:(M==null?void 0:M.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function S(){a.logs.maxDays=pt(this.value),t(0,a)}function $(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>h(),T=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,f,u,i,m,h,r,c,g,y,S,$,C,T]}class yD extends ve{constructor(e){super(),be(this,e,vD,bD,me,{})}}function kD(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o<s.length;o+=1)l=qe(l,s[o]);return{c(){e=v("input"),ui(e,l)},m(o,r){w(o,e,r),e.autofocus&&e.focus(),n[7](e),re(e,n[0]),t||(i=Y(e,"input",n[8]),t=!0)},p(o,r){ui(e,l=Ot(s,[{type:"password"},{autocomplete:"new-password"},r&32&&o[5]])),r&1&&e.value!==o[0]&&re(e,o[0])},d(o){o&&k(e),n[7](null),t=!1,i()}}}function wD(n){let e,t,i,s,l,o,r=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let f=0;f<r.length;f+=1)a=qe(a,r[f]);return{c(){e=v("div"),t=v("button"),t.innerHTML='<i class="ri-key-line"></i>',i=E(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),ui(s,a)},m(f,u){w(f,e,u),b(e,t),w(f,i,u),w(f,s,u),s.autofocus&&s.focus(),l||(o=[Ce(ze.call(null,t,{position:"left",text:"Set new value"})),Y(t,"click",n[6])],l=!0)},p(f,u){ui(s,a=Ot(r,[{readOnly:!0},{type:"text"},u&2&&{placeholder:f[1]},u&32&&f[5]]))},d(f){f&&k(e),f&&k(i),f&&k(s),l=!1,Me(o)}}}function SD(n){let e;function t(l,o){return l[3]?wD:kD}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&k(e)}}}function CD(n,e,t){const i=["value","mask"];let s=Qe(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function f(){t(0,l=""),t(3,a=!1),await fn(),r==null||r.focus()}const u=()=>f();function c(m){ne[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=qe(qe({},e),Zt(m)),t(5,s=Qe(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&t(3,a=l===o)},[l,o,r,a,f,s,u,c,d]}class of extends ve{constructor(e){super(),be(this,e,CD,SD,me,{value:0,mask:1})}}function $D(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h;return{c(){e=v("label"),t=U("Subject"),s=E(),l=v("input"),r=E(),a=v("div"),f=U(`Available placeholder parameters:
<div class="breadcrumb-item">Application</div></nav>`,t=E(),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,_){w(m,e,_),w(m,t,_),w(m,i,_),b(i,s),c[l].m(s,null),r=!0,a||(f=Y(s,"submit",Xe(n[4])),a=!0)},p(m,_){let h=l;l=d(m),l===h?c[l].p(m,_):(ae(),L(c[h],1,1,()=>{c[h]=null}),fe(),o=c[l],o?o.p(m,_):(o=c[l]=u[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){L(o),r=!1},d(m){m&&k(e),m&&k(t),m&&k(i),c[l].d(),a=!1,f()}}}function bD(n){let e,t,i,s;return e=new Ti({}),i=new kn({props:{$$slots:{default:[gD]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(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){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&k(t),H(i,l)}}}function vD(n,e,t){let i,s,l,o;We(n,Ts,M=>t(14,s=M)),We(n,vo,M=>t(15,l=M)),We(n,Et,M=>t(16,o=M)),tn(Et,o="Application settings",o);let r={},a={},f=!1,u=!1,c="";d();async function d(){t(1,f=!0);try{const M=await ue.settings.getAll()||{};_(M)}catch(M){ue.error(M)}t(1,f=!1)}async function m(){if(!(u||!i)){t(2,u=!0);try{const M=await ue.settings.update(j.filterRedactedProps(a));_(M),zt("Successfully saved application settings.")}catch(M){ue.error(M)}t(2,u=!1)}}function _(M={}){var O,D;tn(vo,l=(O=M==null?void 0:M.meta)==null?void 0:O.appName,l),tn(Ts,s=!!((D=M==null?void 0:M.meta)!=null&&D.hideControls),s),t(0,a={meta:(M==null?void 0:M.meta)||{},logs:(M==null?void 0:M.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function S(){a.logs.maxDays=pt(this.value),t(0,a)}function $(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>h(),T=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,f,u,i,m,h,r,c,g,y,S,$,C,T]}class yD extends ve{constructor(e){super(),be(this,e,vD,bD,me,{})}}function kD(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o<s.length;o+=1)l=qe(l,s[o]);return{c(){e=v("input"),ui(e,l)},m(o,r){w(o,e,r),e.autofocus&&e.focus(),n[7](e),re(e,n[0]),t||(i=Y(e,"input",n[8]),t=!0)},p(o,r){ui(e,l=Ot(s,[{type:"password"},{autocomplete:"new-password"},r&32&&o[5]])),r&1&&e.value!==o[0]&&re(e,o[0])},d(o){o&&k(e),n[7](null),t=!1,i()}}}function wD(n){let e,t,i,s,l,o,r=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let f=0;f<r.length;f+=1)a=qe(a,r[f]);return{c(){e=v("div"),t=v("button"),t.innerHTML='<i class="ri-key-line"></i>',i=E(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),ui(s,a)},m(f,u){w(f,e,u),b(e,t),w(f,i,u),w(f,s,u),s.autofocus&&s.focus(),l||(o=[Ce(ze.call(null,t,{position:"left",text:"Set new value"})),Y(t,"click",n[6])],l=!0)},p(f,u){ui(s,a=Ot(r,[{readOnly:!0},{type:"text"},u&2&&{placeholder:f[1]},u&32&&f[5]]))},d(f){f&&k(e),f&&k(i),f&&k(s),l=!1,Me(o)}}}function SD(n){let e;function t(l,o){return l[3]?wD:kD}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&k(e)}}}function CD(n,e,t){const i=["value","mask"];let s=Qe(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function f(){t(0,l=""),t(3,a=!1),await fn(),r==null||r.focus()}const u=()=>f();function c(m){ne[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=qe(qe({},e),Zt(m)),t(5,s=Qe(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&t(3,a=l===o)},[l,o,r,a,f,s,u,c,d]}class of extends ve{constructor(e){super(),be(this,e,CD,SD,me,{value:0,mask:1})}}function $D(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h;return{c(){e=v("label"),t=U("Subject"),s=E(),l=v("input"),r=E(),a=v("div"),f=U(`Available placeholder parameters:
`),u=v("button"),u.textContent=`{APP_NAME}
`,c=U(`,
`),d=v("button"),d.textContent=`{APP_URL}
@@ -187,8 +187,8 @@ Updated: ${g[1].updated}`,position:"left"}),y[0]&1073741824&&d!==(d=g[30])&&p(c,
`),_=v("button"),_.textContent=`{TOKEN}
`,h=U(`,
`),g=v("button"),g.textContent=`{ACTION_URL}
`,y=U("."),p(e,"for",i=n[31]),p(u,"type","button"),p(u,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(g,"type","button"),p(g,"class","label label-sm link-primary txt-mono"),p(g,"title","Required parameter"),p(a,"class","help-block")},m(D,I){w(D,e,I),b(e,t),w(D,s,I),M[l].m(D,I),w(D,r,I),w(D,a,I),b(a,f),b(a,u),b(a,c),b(a,d),b(a,m),b(a,_),b(a,h),b(a,g),b(a,y),S=!0,$||(C=[Y(u,"click",n[22]),Y(d,"click",n[23]),Y(_,"click",n[24]),Y(g,"click",n[25])],$=!0)},p(D,I){(!S||I[1]&1&&i!==(i=D[31]))&&p(e,"for",i);let P=l;l=O(D),l===P?M[l].p(D,I):(ae(),L(M[P],1,1,()=>{M[P]=null}),fe(),o=M[l],o?o.p(D,I):(o=M[l]=T[l](D),o.c()),A(o,1),o.m(r.parentNode,r))},i(D){S||(A(o),S=!0)},o(D){L(o),S=!1},d(D){D&&k(e),D&&k(s),M[l].d(D),D&&k(r),D&&k(a),$=!1,Me(C)}}}function DD(n){let e,t,i,s,l,o;return e=new ce({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[$D,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new ce({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[TD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new ce({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[OD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment),s=E(),B(l.$$.fragment)},m(r,a){V(e,r,a),w(r,t,a),V(i,r,a),w(r,s,a),V(l,r,a),o=!0},p(r,a){const f={};a[0]&2&&(f.name=r[1]+".subject"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),e.$set(f);const u={};a[0]&2&&(u.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);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){L(e.$$.fragment,r),L(i.$$.fragment,r),L(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&k(t),H(i,r),r&&k(s),H(l,r)}}}function Sh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(ze.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function AD(n){let e,t,i,s,l,o,r,a,f,u=n[6]&&Sh();return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),l=U(n[2]),o=E(),r=v("div"),a=E(),u&&u.c(),f=ye(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),w(c,o,d),w(c,r,d),w(c,a,d),u&&u.m(c,d),w(c,f,d)},p(c,d){d[0]&4&&se(l,c[2]),c[6]?u?d[0]&64&&A(u,1):(u=Sh(),u.c(),A(u,1),u.m(f.parentNode,f)):u&&(ae(),L(u,1,1,()=>{u=null}),fe())},d(c){c&&k(e),c&&k(o),c&&k(r),c&&k(a),u&&u.d(c),c&&k(f)}}}function ID(n){let e,t;const i=[n[8]];let s={$$slots:{header:[AD],default:[DD]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=qe(s,i[l]);return e=new ro({props:s}),n[26](e),e.$on("expand",n[27]),e.$on("collapse",n[28]),e.$on("toggle",n[29]),{c(){B(e.$$.fragment)},m(l,o){V(e,l,o),t=!0},p(l,o){const r=o[0]&256?Ot(i,[Xt(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){L(e.$$.fragment,l),t=!1},d(l){n[26](null),H(e,l)}}}let Ch;function LD(n,e,t){let i;const s=["key","title","config","expand","collapse","collapseSiblings"];let l=Qe(e,s),o;We(n,Ci,K=>t(12,o=K));let{key:r}=e,{title:a}=e,{config:f={}}=e,u,c=Ch,d=!1;function m(){u==null||u.expand()}function _(){u==null||u.collapse()}function h(){u==null||u.collapseSiblings()}async function g(){c||d||(t(5,d=!0),t(4,c=(await ot(()=>import("./CodeEditor-0a0fa5f0.js"),["./CodeEditor-0a0fa5f0.js","./index-4841d67b.js"],import.meta.url)).default),Ch=c,t(5,d=!1))}function y(K){z.copyToClipboard(K),_o(`Copied ${K} to clipboard`,2e3)}g();function S(){f.subject=this.value,t(0,f)}const $=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function T(){f.actionUrl=this.value,t(0,f)}const M=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),D=()=>y("{TOKEN}");function I(K){n.$$.not_equal(f.body,K)&&(f.body=K,t(0,f))}function P(){f.body=this.value,t(0,f)}const F=()=>y("{APP_NAME}"),R=()=>y("{APP_URL}"),N=()=>y("{TOKEN}"),q=()=>y("{ACTION_URL}");function j(K){ne[K?"unshift":"push"](()=>{u=K,t(3,u)})}function J(K){Fe.call(this,n,K)}function G(K){Fe.call(this,n,K)}function Q(K){Fe.call(this,n,K)}return n.$$set=K=>{e=qe(qe({},e),Zt(K)),t(8,l=Qe(e,s)),"key"in K&&t(1,r=K.key),"title"in K&&t(2,a=K.title),"config"in K&&t(0,f=K.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!z.isEmpty(z.getNestedVal(o,r))),n.$$.dirty[0]&3&&(f.enabled||ci(r))},[f,r,a,u,c,d,i,y,l,m,_,h,o,S,$,C,T,M,O,D,I,P,F,R,N,q,j,J,G,Q]}class Lr extends ve{constructor(e){super(),be(this,e,LD,ID,me,{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){w(s,e,l),t||(i=Y(e,"click",n[29]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function iA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),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[5]||n[3],X(s,"btn-loading",n[3])},m(f,u){w(f,e,u),b(e,t),w(f,i,u),w(f,s,u),b(s,l),r||(a=[Y(e,"click",n[27]),Y(s,"click",n[28])],r=!0)},p(f,u){u[0]&8&&(e.disabled=f[3]),u[0]&40&&o!==(o=!f[5]||f[3])&&(s.disabled=o),u[0]&8&&X(s,"btn-loading",f[3])},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,Me(a)}}}function sA(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;const y=[BD,HD],S=[];function $(C,T){return C[2]?0:1}return d=$(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[6]),r=E(),a=v("div"),f=v("form"),u=v("div"),u.innerHTML="<p>Configure common settings for sending emails.</p>",c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","content txt-xl m-b-base"),p(f,"class","panel"),p(f,"autocomplete","off"),p(a,"class","wrapper")},m(C,T){w(C,e,T),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(C,r,T),w(C,a,T),b(a,f),b(f,u),b(f,c),S[d].m(f,null),_=!0,h||(g=Y(f,"submit",Xe(n[30])),h=!0)},p(C,T){(!_||T[0]&64)&&se(o,C[6]);let M=d;d=$(C),d===M?S[d].p(C,T):(ae(),L(S[M],1,1,()=>{S[M]=null}),fe(),m=S[d],m?m.p(C,T):(m=S[d]=y[d](C),m.c()),A(m,1),m.m(f,null))},i(C){_||(A(m),_=!0)},o(C){L(m),_=!1},d(C){C&&k(e),C&&k(r),C&&k(a),S[d].d(),h=!1,g()}}}function lA(n){let e,t,i,s,l,o;e=new Ti({}),i=new kn({props:{$$slots:{default:[sA]},$$scope:{ctx:n}}});let r={};return l=new VD({props:r}),n[31](l),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment),s=E(),B(l.$$.fragment)},m(a,f){V(e,a,f),w(a,t,f),V(i,a,f),w(a,s,f),V(l,a,f),o=!0},p(a,f){const u={};f[0]&127|f[1]&16&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&k(t),H(i,a),a&&k(s),n[31](null),H(l,a)}}}function oA(n,e,t){let i,s,l;We(n,Et,x=>t(6,l=x));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];tn(Et,l="Mail settings",l);let a,f={},u={},c=!1,d=!1,m=!1;_();async function _(){t(2,c=!0);try{const x=await ue.settings.getAll()||{};g(x)}catch(x){ue.error(x)}t(2,c=!1)}async function h(){if(!(d||!s)){t(3,d=!0);try{const x=await ue.settings.update(z.filterRedactedProps(u));g(x),xt({}),zt("Successfully saved mail settings.")}catch(x){ue.error(x)}t(3,d=!1)}}function g(x={}){t(0,u={meta:(x==null?void 0:x.meta)||{},smtp:(x==null?void 0:x.smtp)||{}}),u.smtp.authMethod||t(0,u.smtp.authMethod=r[0].value,u),t(11,f=JSON.parse(JSON.stringify(u)))}function y(){t(0,u=JSON.parse(JSON.stringify(f||{})))}function S(){u.meta.senderName=this.value,t(0,u)}function $(){u.meta.senderAddress=this.value,t(0,u)}function C(x){n.$$.not_equal(u.meta.verificationTemplate,x)&&(u.meta.verificationTemplate=x,t(0,u))}function T(x){n.$$.not_equal(u.meta.resetPasswordTemplate,x)&&(u.meta.resetPasswordTemplate=x,t(0,u))}function M(x){n.$$.not_equal(u.meta.confirmEmailChangeTemplate,x)&&(u.meta.confirmEmailChangeTemplate=x,t(0,u))}function O(){u.smtp.enabled=this.checked,t(0,u)}function D(){u.smtp.host=this.value,t(0,u)}function I(){u.smtp.port=pt(this.value),t(0,u)}function P(){u.smtp.username=this.value,t(0,u)}function F(x){n.$$.not_equal(u.smtp.password,x)&&(u.smtp.password=x,t(0,u))}const R=()=>{t(4,m=!m)};function N(x){n.$$.not_equal(u.smtp.tls,x)&&(u.smtp.tls=x,t(0,u))}function q(x){n.$$.not_equal(u.smtp.authMethod,x)&&(u.smtp.authMethod=x,t(0,u))}function j(){u.smtp.localName=this.value,t(0,u)}const J=()=>y(),G=()=>h(),Q=()=>a==null?void 0:a.show(),K=()=>h();function le(x){ne[x?"unshift":"push"](()=>{a=x,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&2048&&t(12,i=JSON.stringify(f)),n.$$.dirty[0]&4097&&t(5,s=i!=JSON.stringify(u))},[u,a,c,d,m,s,l,o,r,h,y,f,i,S,$,C,T,M,O,D,I,P,F,R,N,q,j,J,G,Q,K,le]}class rA extends ve{constructor(e){super(),be(this,e,oA,lA,me,{},null,[-1,-1])}}const aA=n=>({isTesting:n&4,testError:n&2,enabled:n&1}),Dh=n=>({isTesting:n[2],testError:n[1],enabled:n[0].enabled});function fA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U(n[4]),p(e,"type","checkbox"),p(e,"id",t=n[20]),e.required=!0,p(s,"for",o=n[20])},m(f,u){w(f,e,u),e.checked=n[0].enabled,w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(f,u){u&1048576&&t!==(t=f[20])&&p(e,"id",t),u&1&&(e.checked=f[0].enabled),u&16&&se(l,f[4]),u&1048576&&o!==(o=f[20])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!Line truncated
`,y=U("."),p(e,"for",i=n[31]),p(u,"type","button"),p(u,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(g,"type","button"),p(g,"class","label label-sm link-primary txt-mono"),p(g,"title","Required parameter"),p(a,"class","help-block")},m(D,I){w(D,e,I),b(e,t),w(D,s,I),M[l].m(D,I),w(D,r,I),w(D,a,I),b(a,f),b(a,u),b(a,c),b(a,d),b(a,m),b(a,_),b(a,h),b(a,g),b(a,y),S=!0,$||(C=[Y(u,"click",n[22]),Y(d,"click",n[23]),Y(_,"click",n[24]),Y(g,"click",n[25])],$=!0)},p(D,I){(!S||I[1]&1&&i!==(i=D[31]))&&p(e,"for",i);let P=l;l=O(D),l===P?M[l].p(D,I):(ae(),L(M[P],1,1,()=>{M[P]=null}),fe(),o=M[l],o?o.p(D,I):(o=M[l]=T[l](D),o.c()),A(o,1),o.m(r.parentNode,r))},i(D){S||(A(o),S=!0)},o(D){L(o),S=!1},d(D){D&&k(e),D&&k(s),M[l].d(D),D&&k(r),D&&k(a),$=!1,Me(C)}}}function DD(n){let e,t,i,s,l,o;return e=new ce({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[$D,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new ce({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[TD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new ce({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[OD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment),s=E(),B(l.$$.fragment)},m(r,a){V(e,r,a),w(r,t,a),V(i,r,a),w(r,s,a),V(l,r,a),o=!0},p(r,a){const f={};a[0]&2&&(f.name=r[1]+".subject"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),e.$set(f);const u={};a[0]&2&&(u.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);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){L(e.$$.fragment,r),L(i.$$.fragment,r),L(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&k(t),H(i,r),r&&k(s),H(l,r)}}}function Sh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(ze.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Ge(()=>{i&&(t||(t=Re(e,Yt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Re(e,Yt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function AD(n){let e,t,i,s,l,o,r,a,f,u=n[6]&&Sh();return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),l=U(n[2]),o=E(),r=v("div"),a=E(),u&&u.c(),f=ye(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),w(c,o,d),w(c,r,d),w(c,a,d),u&&u.m(c,d),w(c,f,d)},p(c,d){d[0]&4&&se(l,c[2]),c[6]?u?d[0]&64&&A(u,1):(u=Sh(),u.c(),A(u,1),u.m(f.parentNode,f)):u&&(ae(),L(u,1,1,()=>{u=null}),fe())},d(c){c&&k(e),c&&k(o),c&&k(r),c&&k(a),u&&u.d(c),c&&k(f)}}}function ID(n){let e,t;const i=[n[8]];let s={$$slots:{header:[AD],default:[DD]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=qe(s,i[l]);return e=new ro({props:s}),n[26](e),e.$on("expand",n[27]),e.$on("collapse",n[28]),e.$on("toggle",n[29]),{c(){B(e.$$.fragment)},m(l,o){V(e,l,o),t=!0},p(l,o){const r=o[0]&256?Ot(i,[Xt(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){L(e.$$.fragment,l),t=!1},d(l){n[26](null),H(e,l)}}}let Ch;function LD(n,e,t){let i;const s=["key","title","config","expand","collapse","collapseSiblings"];let l=Qe(e,s),o;We(n,Ci,K=>t(12,o=K));let{key:r}=e,{title:a}=e,{config:f={}}=e,u,c=Ch,d=!1;function m(){u==null||u.expand()}function _(){u==null||u.collapse()}function h(){u==null||u.collapseSiblings()}async function g(){c||d||(t(5,d=!0),t(4,c=(await ot(()=>import("./CodeEditor-5a011c38.js"),["./CodeEditor-5a011c38.js","./index-4841d67b.js"],import.meta.url)).default),Ch=c,t(5,d=!1))}function y(K){j.copyToClipboard(K),_o(`Copied ${K} to clipboard`,2e3)}g();function S(){f.subject=this.value,t(0,f)}const $=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function T(){f.actionUrl=this.value,t(0,f)}const M=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),D=()=>y("{TOKEN}");function I(K){n.$$.not_equal(f.body,K)&&(f.body=K,t(0,f))}function P(){f.body=this.value,t(0,f)}const F=()=>y("{APP_NAME}"),R=()=>y("{APP_URL}"),N=()=>y("{TOKEN}"),q=()=>y("{ACTION_URL}");function z(K){ne[K?"unshift":"push"](()=>{u=K,t(3,u)})}function J(K){Fe.call(this,n,K)}function G(K){Fe.call(this,n,K)}function Q(K){Fe.call(this,n,K)}return n.$$set=K=>{e=qe(qe({},e),Zt(K)),t(8,l=Qe(e,s)),"key"in K&&t(1,r=K.key),"title"in K&&t(2,a=K.title),"config"in K&&t(0,f=K.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!j.isEmpty(j.getNestedVal(o,r))),n.$$.dirty[0]&3&&(f.enabled||ci(r))},[f,r,a,u,c,d,i,y,l,m,_,h,o,S,$,C,T,M,O,D,I,P,F,R,N,q,z,J,G,Q]}class Lr extends ve{constructor(e){super(),be(this,e,LD,ID,me,{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){w(s,e,l),t||(i=Y(e,"click",n[29]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function iA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),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[5]||n[3],X(s,"btn-loading",n[3])},m(f,u){w(f,e,u),b(e,t),w(f,i,u),w(f,s,u),b(s,l),r||(a=[Y(e,"click",n[27]),Y(s,"click",n[28])],r=!0)},p(f,u){u[0]&8&&(e.disabled=f[3]),u[0]&40&&o!==(o=!f[5]||f[3])&&(s.disabled=o),u[0]&8&&X(s,"btn-loading",f[3])},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,Me(a)}}}function sA(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;const y=[BD,HD],S=[];function $(C,T){return C[2]?0:1}return d=$(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[6]),r=E(),a=v("div"),f=v("form"),u=v("div"),u.innerHTML="<p>Configure common settings for sending emails.</p>",c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","content txt-xl m-b-base"),p(f,"class","panel"),p(f,"autocomplete","off"),p(a,"class","wrapper")},m(C,T){w(C,e,T),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(C,r,T),w(C,a,T),b(a,f),b(f,u),b(f,c),S[d].m(f,null),_=!0,h||(g=Y(f,"submit",Xe(n[30])),h=!0)},p(C,T){(!_||T[0]&64)&&se(o,C[6]);let M=d;d=$(C),d===M?S[d].p(C,T):(ae(),L(S[M],1,1,()=>{S[M]=null}),fe(),m=S[d],m?m.p(C,T):(m=S[d]=y[d](C),m.c()),A(m,1),m.m(f,null))},i(C){_||(A(m),_=!0)},o(C){L(m),_=!1},d(C){C&&k(e),C&&k(r),C&&k(a),S[d].d(),h=!1,g()}}}function lA(n){let e,t,i,s,l,o;e=new Ti({}),i=new kn({props:{$$slots:{default:[sA]},$$scope:{ctx:n}}});let r={};return l=new VD({props:r}),n[31](l),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment),s=E(),B(l.$$.fragment)},m(a,f){V(e,a,f),w(a,t,f),V(i,a,f),w(a,s,f),V(l,a,f),o=!0},p(a,f){const u={};f[0]&127|f[1]&16&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&k(t),H(i,a),a&&k(s),n[31](null),H(l,a)}}}function oA(n,e,t){let i,s,l;We(n,Et,x=>t(6,l=x));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];tn(Et,l="Mail settings",l);let a,f={},u={},c=!1,d=!1,m=!1;_();async function _(){t(2,c=!0);try{const x=await ue.settings.getAll()||{};g(x)}catch(x){ue.error(x)}t(2,c=!1)}async function h(){if(!(d||!s)){t(3,d=!0);try{const x=await ue.settings.update(j.filterRedactedProps(u));g(x),xt({}),zt("Successfully saved mail settings.")}catch(x){ue.error(x)}t(3,d=!1)}}function g(x={}){t(0,u={meta:(x==null?void 0:x.meta)||{},smtp:(x==null?void 0:x.smtp)||{}}),u.smtp.authMethod||t(0,u.smtp.authMethod=r[0].value,u),t(11,f=JSON.parse(JSON.stringify(u)))}function y(){t(0,u=JSON.parse(JSON.stringify(f||{})))}function S(){u.meta.senderName=this.value,t(0,u)}function $(){u.meta.senderAddress=this.value,t(0,u)}function C(x){n.$$.not_equal(u.meta.verificationTemplate,x)&&(u.meta.verificationTemplate=x,t(0,u))}function T(x){n.$$.not_equal(u.meta.resetPasswordTemplate,x)&&(u.meta.resetPasswordTemplate=x,t(0,u))}function M(x){n.$$.not_equal(u.meta.confirmEmailChangeTemplate,x)&&(u.meta.confirmEmailChangeTemplate=x,t(0,u))}function O(){u.smtp.enabled=this.checked,t(0,u)}function D(){u.smtp.host=this.value,t(0,u)}function I(){u.smtp.port=pt(this.value),t(0,u)}function P(){u.smtp.username=this.value,t(0,u)}function F(x){n.$$.not_equal(u.smtp.password,x)&&(u.smtp.password=x,t(0,u))}const R=()=>{t(4,m=!m)};function N(x){n.$$.not_equal(u.smtp.tls,x)&&(u.smtp.tls=x,t(0,u))}function q(x){n.$$.not_equal(u.smtp.authMethod,x)&&(u.smtp.authMethod=x,t(0,u))}function z(){u.smtp.localName=this.value,t(0,u)}const J=()=>y(),G=()=>h(),Q=()=>a==null?void 0:a.show(),K=()=>h();function le(x){ne[x?"unshift":"push"](()=>{a=x,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&2048&&t(12,i=JSON.stringify(f)),n.$$.dirty[0]&4097&&t(5,s=i!=JSON.stringify(u))},[u,a,c,d,m,s,l,o,r,h,y,f,i,S,$,C,T,M,O,D,I,P,F,R,N,q,z,J,G,Q,K,le]}class rA extends ve{constructor(e){super(),be(this,e,oA,lA,me,{},null,[-1,-1])}}const aA=n=>({isTesting:n&4,testError:n&2,enabled:n&1}),Dh=n=>({isTesting:n[2],testError:n[1],enabled:n[0].enabled});function fA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U(n[4]),p(e,"type","checkbox"),p(e,"id",t=n[20]),e.required=!0,p(s,"for",o=n[20])},m(f,u){w(f,e,u),e.checked=n[0].enabled,w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(f,u){u&1048576&&t!==(t=f[20])&&p(e,"id",t),u&1&&(e.checked=f[0].enabled),u&16&&se(l,f[4]),u&1048576&&o!==(o=f[20])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!Line truncated
from the
`),r=v("strong"),f=U(a),u=U(`
to the
@@ -201,31 +201,31 @@ Updated: ${g[1].updated}`,position:"left"}),y[0]&1073741824&&d!==(d=g[30])&&p(c,
`,C=U(", etc."),T=E(),M=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($,"href","https://github.com/peak/s5cmd"),p($,"target","_blank"),p($,"rel","noopener noreferrer"),p($,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(M,"class","clearfix m-t-base")},m(P,F){w(P,e,F),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(l,r),b(r,f),b(l,u),b(l,c),b(c,m),b(l,_),b(l,h),b(l,g),b(l,y),b(l,S),b(l,$),b(l,C),b(e,T),b(e,M),D=!0},p(P,F){var R;(!D||F&1)&&a!==(a=(R=P[0].s3)!=null&&R.enabled?"S3 storage":"local file system")&&se(f,a),(!D||F&2)&&d!==(d=P[1].s3.enabled?"S3 storage":"local file system")&&se(m,d)},i(P){D||(P&&Ge(()=>{D&&(O||(O=Re(e,tt,{duration:150},!0)),O.run(1))}),D=!0)},o(P){P&&(O||(O=Re(e,tt,{duration:150},!1)),O.run(0)),D=!1},d(P){P&&k(e),P&&O&&O.end()}}}function yA(n){var i;let e,t=((i=n[0].s3)==null?void 0:i.enabled)!=n[1].s3.enabled&&Ih(n);return{c(){t&&t.c(),e=ye()},m(s,l){t&&t.m(s,l),w(s,e,l)},p(s,l){var o;((o=s[0].s3)==null?void 0:o.enabled)!=s[1].s3.enabled?t?(t.p(s,l),l&3&&A(t,1)):(t=Ih(s),t.c(),A(t,1),t.m(e.parentNode,e)):t&&(ae(),L(t,1,1,()=>{t=null}),fe())},d(s){t&&t.d(s),s&&k(e)}}}function Lh(n){let e;function t(l,o){return l[4]?SA:l[5]?wA:kA}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function kA(n){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-checkbox-circle-line txt-success"></i>
<span class="txt">S3 connected successfully</span>`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function wA(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;w(l,e,o),i||(s=Ce(t=ze.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&qt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function SA(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function Ph(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){w(l,e,o),b(e,t),i||(s=Y(e,"click",n[14]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&k(e),i=!1,s()}}}function CA(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;const y=[vA,bA],S=[];function $(C,T){return C[2]?0:1}return d=$(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[7]),r=E(),a=v("div"),f=v("form"),u=v("div"),u.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 an S3 compatible storage.</p>`,c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","content txt-xl m-b-base"),p(f,"class","panel"),p(f,"autocomplete","off"),p(a,"class","wrapper")},m(C,T){w(C,e,T),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(C,r,T),w(C,a,T),b(a,f),b(f,u),b(f,c),S[d].m(f,null),_=!0,h||(g=Y(f,"submit",Xe(n[16])),h=!0)},p(C,T){(!_||T&128)&&se(o,C[7]);let M=d;d=$(C),d===M?S[d].p(C,T):(ae(),L(S[M],1,1,()=>{S[M]=null}),fe(),m=S[d],m?m.p(C,T):(m=S[d]=y[d](C),m.c()),A(m,1),m.m(f,null))},i(C){_||(A(m),_=!0)},o(C){L(m),_=!1},d(C){C&&k(e),C&&k(r),C&&k(a),S[d].d(),h=!1,g()}}}function $A(n){let e,t,i,s;return e=new Ti({}),i=new kn({props:{$$slots:{default:[CA]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,[o]){const r={};o&524543&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&k(t),H(i,l)}}}const TA="s3_test_request";function MA(n,e,t){let i,s,l;We(n,Et,M=>t(7,l=M)),tn(Et,l="Files storage",l);let o={},r={},a=!1,f=!1,u=!1,c=null;d();async function d(){t(2,a=!0);try{const M=await ue.settings.getAll()||{};_(M)}catch(M){ue.error(M)}t(2,a=!1)}async function m(){if(!(f||!s)){t(3,f=!0);try{ue.cancelRequest(TA);const M=await ue.settings.update(z.filterRedactedProps(r));xt({}),await _(M),Ma(),c?ky("Successfully saved but failed to establish S3 connection."):zt("Successfully saved files storage settings.")}catch(M){ue.error(M)}t(3,f=!1)}}async function _(M={}){t(1,r={s3:(M==null?void 0:M.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r)))}async function h(){t(1,r=JSON.parse(JSON.stringify(o||{})))}function g(M){n.$$.not_equal(r.s3,M)&&(r.s3=M,t(1,r))}function y(M){u=M,t(4,u)}function S(M){c=M,t(5,c)}const $=()=>h(),C=()=>m(),T=()=>m();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,f,u,c,s,l,m,h,i,g,y,S,$,C,T]}class EA extends ve{constructor(e){super(),be(this,e,MA,$A,me,{})}}function OA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(f,u){w(f,e,u),e.checked=n[1].enabled,w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[11]),r=!0)},p(f,u){u&1048576&&t!==(t=f[20])&&p(e,"id",t),u&2&&(e.checked=f[1].enabled),u&1048576&&o!==(o=f[20])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function DA(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("label"),t=U("Client ID"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=r=n[1].enabled},m(u,c){w(u,e,c),b(e,t),w(u,s,c),w(u,l,c),re(l,n[1].clientId),a||(f=Y(l,"input",n[12]),a=!0)},p(u,c){c&1048576&&i!==(i=u[20])&&p(e,"for",i),c&1048576&&o!==(o=u[20])&&p(l,"id",o),c&2&&r!==(r=u[1].enabled)&&(l.required=r),c&2&&l.value!==u[1].clientId&&re(l,u[1].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),a=!1,f()}}}function AA(n){let e,t,i,s,l,o,r;function a(u){n[13](u)}let f={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(f.value=n[1].clientSecret),l=new of({props:f}),ne.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Client secret"),s=E(),B(l.$$.fragment),p(e,"for",i=n[20])},m(u,c){w(u,e,c),b(e,t),w(u,s,c),V(l,u,c),r=!0},p(u,c){(!r||c&1048576&&i!==(i=u[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=u[20]),c&2&&(d.required=u[1].enabled),!o&&c&2&&(o=!0,d.value=u[1].clientSecret,ge(()=>o=!1)),l.$set(d)},i(u){r||(A(l.$$.fragment,u),r=!0)},o(u){L(l.$$.fragment,u),r=!1},d(u){u&&k(e),u&&k(s),H(l,u)}}}function Fh(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let f={key:a[3].key};return a[1]!==void 0&&(f.config=a[1]),{props:f}}return o&&(t=Nt(o,r(n)),ne.push(()=>de(t,"config",l))),{c(){e=v("div"),t&&B(t.$$.fragment),p(e,"class","col-lg-12")},m(a,f){w(a,e,f),t&&V(t,e,null),s=!0},p(a,f){const u={};if(f&8&&(u.key=a[3].key),!i&&f&2&&(i=!0,u.config=a[1],ge(()=>i=!1)),f&8&&o!==(o=a[3].optionsComponent)){if(t){ae();const c=t;L(c.$$.fragment,1,0,()=>{H(c,1)}),fe()}o?(t=Nt(o,r(a)),ne.push(()=>de(t,"config",l)),B(t.$$.fragment),A(t.$$.fragment,1),V(t,e,null)):t=null}else o&&t.$set(u)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&L(t.$$.fragment,a),s=!1},d(a){a&&k(e),t&&H(t)}}}function IA(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;i=new ce({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[OA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[DA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),f=new ce({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[AA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?104Line truncated
<p>If you have limited disk space, you could optionally connect to an S3 compatible storage.</p>`,c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","content txt-xl m-b-base"),p(f,"class","panel"),p(f,"autocomplete","off"),p(a,"class","wrapper")},m(C,T){w(C,e,T),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(C,r,T),w(C,a,T),b(a,f),b(f,u),b(f,c),S[d].m(f,null),_=!0,h||(g=Y(f,"submit",Xe(n[16])),h=!0)},p(C,T){(!_||T&128)&&se(o,C[7]);let M=d;d=$(C),d===M?S[d].p(C,T):(ae(),L(S[M],1,1,()=>{S[M]=null}),fe(),m=S[d],m?m.p(C,T):(m=S[d]=y[d](C),m.c()),A(m,1),m.m(f,null))},i(C){_||(A(m),_=!0)},o(C){L(m),_=!1},d(C){C&&k(e),C&&k(r),C&&k(a),S[d].d(),h=!1,g()}}}function $A(n){let e,t,i,s;return e=new Ti({}),i=new kn({props:{$$slots:{default:[CA]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,[o]){const r={};o&524543&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&k(t),H(i,l)}}}const TA="s3_test_request";function MA(n,e,t){let i,s,l;We(n,Et,M=>t(7,l=M)),tn(Et,l="Files storage",l);let o={},r={},a=!1,f=!1,u=!1,c=null;d();async function d(){t(2,a=!0);try{const M=await ue.settings.getAll()||{};_(M)}catch(M){ue.error(M)}t(2,a=!1)}async function m(){if(!(f||!s)){t(3,f=!0);try{ue.cancelRequest(TA);const M=await ue.settings.update(j.filterRedactedProps(r));xt({}),await _(M),Ma(),c?ky("Successfully saved but failed to establish S3 connection."):zt("Successfully saved files storage settings.")}catch(M){ue.error(M)}t(3,f=!1)}}async function _(M={}){t(1,r={s3:(M==null?void 0:M.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r)))}async function h(){t(1,r=JSON.parse(JSON.stringify(o||{})))}function g(M){n.$$.not_equal(r.s3,M)&&(r.s3=M,t(1,r))}function y(M){u=M,t(4,u)}function S(M){c=M,t(5,c)}const $=()=>h(),C=()=>m(),T=()=>m();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,f,u,c,s,l,m,h,i,g,y,S,$,C,T]}class EA extends ve{constructor(e){super(),be(this,e,MA,$A,me,{})}}function OA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(f,u){w(f,e,u),e.checked=n[1].enabled,w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[11]),r=!0)},p(f,u){u&1048576&&t!==(t=f[20])&&p(e,"id",t),u&2&&(e.checked=f[1].enabled),u&1048576&&o!==(o=f[20])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function DA(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("label"),t=U("Client ID"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=r=n[1].enabled},m(u,c){w(u,e,c),b(e,t),w(u,s,c),w(u,l,c),re(l,n[1].clientId),a||(f=Y(l,"input",n[12]),a=!0)},p(u,c){c&1048576&&i!==(i=u[20])&&p(e,"for",i),c&1048576&&o!==(o=u[20])&&p(l,"id",o),c&2&&r!==(r=u[1].enabled)&&(l.required=r),c&2&&l.value!==u[1].clientId&&re(l,u[1].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),a=!1,f()}}}function AA(n){let e,t,i,s,l,o,r;function a(u){n[13](u)}let f={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(f.value=n[1].clientSecret),l=new of({props:f}),ne.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Client secret"),s=E(),B(l.$$.fragment),p(e,"for",i=n[20])},m(u,c){w(u,e,c),b(e,t),w(u,s,c),V(l,u,c),r=!0},p(u,c){(!r||c&1048576&&i!==(i=u[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=u[20]),c&2&&(d.required=u[1].enabled),!o&&c&2&&(o=!0,d.value=u[1].clientSecret,ge(()=>o=!1)),l.$set(d)},i(u){r||(A(l.$$.fragment,u),r=!0)},o(u){L(l.$$.fragment,u),r=!1},d(u){u&&k(e),u&&k(s),H(l,u)}}}function Fh(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let f={key:a[3].key};return a[1]!==void 0&&(f.config=a[1]),{props:f}}return o&&(t=Nt(o,r(n)),ne.push(()=>de(t,"config",l))),{c(){e=v("div"),t&&B(t.$$.fragment),p(e,"class","col-lg-12")},m(a,f){w(a,e,f),t&&V(t,e,null),s=!0},p(a,f){const u={};if(f&8&&(u.key=a[3].key),!i&&f&2&&(i=!0,u.config=a[1],ge(()=>i=!1)),f&8&&o!==(o=a[3].optionsComponent)){if(t){ae();const c=t;L(c.$$.fragment,1,0,()=>{H(c,1)}),fe()}o?(t=Nt(o,r(a)),ne.push(()=>de(t,"config",l)),B(t.$$.fragment),A(t.$$.fragment,1),V(t,e,null)):t=null}else o&&t.$set(u)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&L(t.$$.fragment,a),s=!1},d(a){a&&k(e),t&&H(t)}}}function IA(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;i=new ce({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[OA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[DA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),f=new ce({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[AA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?104Line truncated
another PocketBase environment.</p>`,t=E(),i=v("div"),s=v("button"),s.innerHTML='<span class="txt">Copy</span>',l=E(),B(o.$$.fragment),r=E(),a=v("div"),f=v("div"),u=E(),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(f,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(h,g){w(h,e,g),w(h,t,g),w(h,i,g),b(i,s),b(i,l),V(o,i,null),n[8](i),w(h,r,g),w(h,a,g),b(a,f),b(a,u),b(a,c),d=!0,m||(_=[Y(s,"click",n[7]),Y(i,"keydown",n[9]),Y(c,"click",n[10])],m=!0)},p(h,g){const y={};g&4&&(y.content=h[2]),o.$set(y)},i(h){d||(A(o.$$.fragment,h),d=!0)},o(h){L(o.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(t),h&&k(i),H(o),n[8](null),h&&k(r),h&&k(a),m=!1,Me(_)}}}function n8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&k(e)}}}function i8(n){let e,t,i,s,l,o,r,a,f,u,c,d;const m=[n8,t8],_=[];function h(g,y){return g[1]?0:1}return u=h(n),c=_[u]=m[u](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[3]),r=E(),a=v("div"),f=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","panel"),p(a,"class","wrapper")},m(g,y){w(g,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(g,r,y),w(g,a,y),b(a,f),_[u].m(f,null),d=!0},p(g,y){(!d||y&8)&&se(o,g[3]);let S=u;u=h(g),u===S?_[u].p(g,y):(ae(),L(_[S],1,1,()=>{_[S]=null}),fe(),c=_[u],c?c.p(g,y):(c=_[u]=m[u](g),c.c()),A(c,1),c.m(f,null))},i(g){d||(A(c),d=!0)},o(g){L(c),d=!1},d(g){g&&k(e),g&&k(r),g&&k(a),_[u].d()}}}function s8(n){let e,t,i,s;return e=new Ti({}),i=new kn({props:{$$slots:{default:[i8]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(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){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&k(t),H(i,l)}}}function l8(n,e,t){let i,s;We(n,Et,g=>t(3,s=g)),tn(Et,s="Export collections",s);const l="export_"+z.randomString(5);let o,r=[],a=!1;f();async function f(){t(1,a=!0);try{t(6,r=await ue.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let g of r)delete g.created,delete g.updated}catch(g){ue.error(g)}t(1,a=!1)}function u(){z.downloadJson(r,"pb_schema")}function c(){z.copyToClipboard(i),_o("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function m(g){ne[g?"unshift":"push"](()=>{o=g,t(0,o)})}const _=g=>{if(g.ctrlKey&&g.code==="KeyA"){g.preventDefault();const y=window.getSelection(),S=document.createRange();S.selectNodeContents(o),y.removeAllRanges(),y.addRange(S)}},h=()=>u();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,u,c,r,d,m,_,h]}class o8 extends ve{constructor(e){super(),be(this,e,l8,s8,me,{})}}function Jh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Zh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Gh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function Qh(n,e,t){const i=n.slice();return i[14]=e[t],i}function xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function e_(n,e,t){const i=n.slice();return i[30]=e[t],i}function r8(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&t_(),a=n[0].name!==n[1].name&&n_(n);return{c(){e=v("div"),r&&r.c(),t=E(),a&&a.c(),i=E(),s=v("strong"),o=U(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(f,u){w(f,e,u),r&&r.m(e,null),b(e,t),a&&a.m(e,null),b(e,i),b(e,s),b(s,o)},p(f,u){f[9]?r||(r=t_(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),f[0].name!==f[1].name?a?a.p(f,u):(a=n_(f),a.c(),a.m(e,i)):a&&(a.d(1),a=null),u[0]&2&&l!==(l=f[1].name+"")&&se(o,l)},d(f){f&&k(e),r&&r.d(),a&&a.d()}}}function a8(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=E(),i=v("strong"),l=U(s),p(e,"class","label label-danger")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),b(i,l)},p(r,a){var f;a[0]&1&&s!==(s=((f=r[0])==null?void 0:f.name)+"")&&se(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function f8(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=E(),i=v("strong"),l=U(s),p(e,"class","label label-success")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),b(i,l)},p(r,a){var f;a[0]&2&&s!==(s=((f=r[1])==null?void 0:f.name)+"")&&se(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function t_(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function n_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=U(t),s=E(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){w(o,e,r),b(e,i),w(o,s,r),w(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&se(i,t)},d(o){o&&k(e),o&&k(s),o&&k(l)}}}function i_(n){var g,y;let e,t,i,s=n[30]+"",l,o,r,a,f=n[12]((g=n[0])==null?void 0:g[n[30]])+Line truncated
<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(f,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(h,g){w(h,e,g),w(h,t,g),w(h,i,g),b(i,s),b(i,l),V(o,i,null),n[8](i),w(h,r,g),w(h,a,g),b(a,f),b(a,u),b(a,c),d=!0,m||(_=[Y(s,"click",n[7]),Y(i,"keydown",n[9]),Y(c,"click",n[10])],m=!0)},p(h,g){const y={};g&4&&(y.content=h[2]),o.$set(y)},i(h){d||(A(o.$$.fragment,h),d=!0)},o(h){L(o.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(t),h&&k(i),H(o),n[8](null),h&&k(r),h&&k(a),m=!1,Me(_)}}}function n8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&k(e)}}}function i8(n){let e,t,i,s,l,o,r,a,f,u,c,d;const m=[n8,t8],_=[];function h(g,y){return g[1]?0:1}return u=h(n),c=_[u]=m[u](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[3]),r=E(),a=v("div"),f=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","panel"),p(a,"class","wrapper")},m(g,y){w(g,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(g,r,y),w(g,a,y),b(a,f),_[u].m(f,null),d=!0},p(g,y){(!d||y&8)&&se(o,g[3]);let S=u;u=h(g),u===S?_[u].p(g,y):(ae(),L(_[S],1,1,()=>{_[S]=null}),fe(),c=_[u],c?c.p(g,y):(c=_[u]=m[u](g),c.c()),A(c,1),c.m(f,null))},i(g){d||(A(c),d=!0)},o(g){L(c),d=!1},d(g){g&&k(e),g&&k(r),g&&k(a),_[u].d()}}}function s8(n){let e,t,i,s;return e=new Ti({}),i=new kn({props:{$$slots:{default:[i8]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(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){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&k(t),H(i,l)}}}function l8(n,e,t){let i,s;We(n,Et,g=>t(3,s=g)),tn(Et,s="Export collections",s);const l="export_"+j.randomString(5);let o,r=[],a=!1;f();async function f(){t(1,a=!0);try{t(6,r=await ue.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let g of r)delete g.created,delete g.updated}catch(g){ue.error(g)}t(1,a=!1)}function u(){j.downloadJson(r,"pb_schema")}function c(){j.copyToClipboard(i),_o("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function m(g){ne[g?"unshift":"push"](()=>{o=g,t(0,o)})}const _=g=>{if(g.ctrlKey&&g.code==="KeyA"){g.preventDefault();const y=window.getSelection(),S=document.createRange();S.selectNodeContents(o),y.removeAllRanges(),y.addRange(S)}},h=()=>u();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,u,c,r,d,m,_,h]}class o8 extends ve{constructor(e){super(),be(this,e,l8,s8,me,{})}}function Jh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Zh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Gh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function Qh(n,e,t){const i=n.slice();return i[14]=e[t],i}function xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function e_(n,e,t){const i=n.slice();return i[30]=e[t],i}function r8(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&t_(),a=n[0].name!==n[1].name&&n_(n);return{c(){e=v("div"),r&&r.c(),t=E(),a&&a.c(),i=E(),s=v("strong"),o=U(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(f,u){w(f,e,u),r&&r.m(e,null),b(e,t),a&&a.m(e,null),b(e,i),b(e,s),b(s,o)},p(f,u){f[9]?r||(r=t_(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),f[0].name!==f[1].name?a?a.p(f,u):(a=n_(f),a.c(),a.m(e,i)):a&&(a.d(1),a=null),u[0]&2&&l!==(l=f[1].name+"")&&se(o,l)},d(f){f&&k(e),r&&r.d(),a&&a.d()}}}function a8(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=E(),i=v("strong"),l=U(s),p(e,"class","label label-danger")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),b(i,l)},p(r,a){var f;a[0]&1&&s!==(s=((f=r[0])==null?void 0:f.name)+"")&&se(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function f8(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=E(),i=v("strong"),l=U(s),p(e,"class","label label-success")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),b(i,l)},p(r,a){var f;a[0]&2&&s!==(s=((f=r[1])==null?void 0:f.name)+"")&&se(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function t_(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function n_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=U(t),s=E(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){w(o,e,r),b(e,i),w(o,s,r),w(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&se(i,t)},d(o){o&&k(e),o&&k(s),o&&k(l)}}}function i_(n){var g,y;let e,t,i,s=n[30]+"",l,o,r,a,f=n[12]((g=n[0])==null?void 0:g[n[30]])+Line truncated
<th width="10%" class="svelte-lmkr38">Old</th>
<th width="10%" class="svelte-lmkr38">New</th></tr>`,l=E(),o=v("tbody");for(let C=0;C<_.length;C+=1)_[C].c();r=E(),h&&h.c(),a=E();for(let C=0;C<y.length;C+=1)y[C].c();f=E();for(let C=0;C<$.length;C+=1)$[C].c();p(e,"class","section-title"),p(i,"class","table collections-diff-table m-b-base svelte-lmkr38")},m(C,T){w(C,e,T),d.m(e,null),w(C,t,T),w(C,i,T),b(i,s),b(i,l),b(i,o);for(let M=0;M<_.length;M+=1)_[M]&&_[M].m(o,null);b(o,r),h&&h.m(o,null),b(o,a);for(let M=0;M<y.length;M+=1)y[M]&&y[M].m(o,null);b(o,f);for(let M=0;M<$.length;M+=1)$[M]&&$[M].m(o,null)},p(C,T){if(c===(c=u(C))&&d?d.p(C,T):(d.d(1),d=c(C),d&&(d.c(),d.m(e,null))),T[0]&7203){m=C[11];let M;for(M=0;M<m.length;M+=1){const O=e_(C,m,M);_[M]?_[M].p(O,T):(_[M]=i_(O),_[M].c(),_[M].m(o,r))}for(;M<_.length;M+=1)_[M].d(1);_.length=m.length}if(C[2]||C[5]?h?h.p(C,T):(h=s_(C),h.c(),h.m(o,a)):h&&(h.d(1),h=null),T[0]&4248){g=C[7];let M;for(M=0;M<g.length;M+=1){const O=Gh(C,g,M);y[M]?y[M].p(O,T):(y[M]=f_(O),y[M].c(),y[M].m(o,f))}for(;M<y.length;M+=1)y[M].d(1);y.length=g.length}if(T[0]&4352){S=C[8];let M;for(M=0;M<S.length;M+=1){const O=Jh(C,S,M);$[M]?$[M].p(O,T):($[M]=c_(O),$[M].c(),$[M].m(o,null))}for(;M<$.length;M+=1)$[M].d(1);$.length=S.length}},i:ee,o:ee,d(C){C&&k(e),d.d(),C&&k(t),C&&k(i),_t(_,C),h&&h.d(),_t(y,C),_t($,C)}}}function Vn(n,e){n=n||[];for(let t of n)if(t.id==e)return t;return null}function bn(n,e){return n===e?!1:JSON.stringify(n)!==JSON.stringify(e)}function c8(n,e,t){let i,s,l,{collectionA:o=z.initCollection()}=e,{collectionB:r=z.initCollection()}=e,{deleteMissing:a=!1}=e,f=[],u=[],c=[],d=[],m=[];const _=Object.keys(z.initCollection()).filter(y=>!["schema","created","updated"].includes(y));function h(){t(4,u=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,u=u.concat(f.filter(y=>!u.find(S=>y.id==S.id))))}function g(y){return typeof y>"u"?"":z.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,f=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")&&h(),n.$$.dirty[0]&24&&t(6,c=f.filter(y=>!u.find(S=>y.id==S.id))),n.$$.dirty[0]&24&&t(7,d=u.filter(y=>f.find(S=>S.id==y.id))),n.$$.dirty[0]&24&&t(8,m=u.filter(y=>!f.find(S=>S.id==y.id))),n.$$.dirty[0]&7&&t(9,l=z.hasCollectionChanges(o,r,a))},[o,r,a,f,u,i,c,d,m,l,s,_,g]}class d8 extends ve{constructor(e){super(),be(this,e,c8,u8,me,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function d_(n,e,t){const i=n.slice();return i[17]=e[t],i}function p_(n){let e,t;return e=new d8({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){B(e.$$.fragment)},m(i,s){V(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){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function p8(n){let e,t,i=n[2],s=[];for(let o=0;o<i.length;o+=1)s[o]=p_(d_(n,i,o));const l=o=>L(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=ye()},m(o,r){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(o,r);w(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 f=d_(o,i,a);s[a]?(s[a].p(f,r),A(s[a],1)):(s[a]=p_(f),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(ae(),a=i.length;a<s.length;a+=1)l(a);fe()}},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)L(s[r]);t=!1},d(o){_t(s,o),o&&k(e)}}}function m8(n){let e;return{c(){e=v("h4"),e.textContent="Side-by-side diff",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function h8(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=U("Close"),i=E(),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,f){w(a,e,f),b(e,t),w(a,i,f),w(a,s,f),b(s,l),o||(r=[Y(e,"click",n[0]),Y(s,"click",n[9])],o=!0)},p(a,f){f&16&&(e.disabled=a[4]),f&16&&(s.disabled=a[4]),f&16&&X(s,"btn-loading",a[4])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,Me(r)}}}function _8(n){let e,t,i={class:"full-width-popup import-popup",overlayClose:!1,escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[h8],header:[m8],default:[p8]},$$scope:{ctx:n}};return e=new nn({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(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){L(e.$$.fragment,s),t=!1},d(s){n[11](nullLine truncated
<th width="10%" class="svelte-lmkr38">New</th></tr>`,l=E(),o=v("tbody");for(let C=0;C<_.length;C+=1)_[C].c();r=E(),h&&h.c(),a=E();for(let C=0;C<y.length;C+=1)y[C].c();f=E();for(let C=0;C<$.length;C+=1)$[C].c();p(e,"class","section-title"),p(i,"class","table collections-diff-table m-b-base svelte-lmkr38")},m(C,T){w(C,e,T),d.m(e,null),w(C,t,T),w(C,i,T),b(i,s),b(i,l),b(i,o);for(let M=0;M<_.length;M+=1)_[M]&&_[M].m(o,null);b(o,r),h&&h.m(o,null),b(o,a);for(let M=0;M<y.length;M+=1)y[M]&&y[M].m(o,null);b(o,f);for(let M=0;M<$.length;M+=1)$[M]&&$[M].m(o,null)},p(C,T){if(c===(c=u(C))&&d?d.p(C,T):(d.d(1),d=c(C),d&&(d.c(),d.m(e,null))),T[0]&7203){m=C[11];let M;for(M=0;M<m.length;M+=1){const O=e_(C,m,M);_[M]?_[M].p(O,T):(_[M]=i_(O),_[M].c(),_[M].m(o,r))}for(;M<_.length;M+=1)_[M].d(1);_.length=m.length}if(C[2]||C[5]?h?h.p(C,T):(h=s_(C),h.c(),h.m(o,a)):h&&(h.d(1),h=null),T[0]&4248){g=C[7];let M;for(M=0;M<g.length;M+=1){const O=Gh(C,g,M);y[M]?y[M].p(O,T):(y[M]=f_(O),y[M].c(),y[M].m(o,f))}for(;M<y.length;M+=1)y[M].d(1);y.length=g.length}if(T[0]&4352){S=C[8];let M;for(M=0;M<S.length;M+=1){const O=Jh(C,S,M);$[M]?$[M].p(O,T):($[M]=c_(O),$[M].c(),$[M].m(o,null))}for(;M<$.length;M+=1)$[M].d(1);$.length=S.length}},i:ee,o:ee,d(C){C&&k(e),d.d(),C&&k(t),C&&k(i),_t(_,C),h&&h.d(),_t(y,C),_t($,C)}}}function Vn(n,e){n=n||[];for(let t of n)if(t.id==e)return t;return null}function bn(n,e){return n===e?!1:JSON.stringify(n)!==JSON.stringify(e)}function c8(n,e,t){let i,s,l,{collectionA:o=j.initCollection()}=e,{collectionB:r=j.initCollection()}=e,{deleteMissing:a=!1}=e,f=[],u=[],c=[],d=[],m=[];const _=Object.keys(j.initCollection()).filter(y=>!["schema","created","updated"].includes(y));function h(){t(4,u=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,u=u.concat(f.filter(y=>!u.find(S=>y.id==S.id))))}function g(y){return typeof y>"u"?"":j.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,f=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")&&h(),n.$$.dirty[0]&24&&t(6,c=f.filter(y=>!u.find(S=>y.id==S.id))),n.$$.dirty[0]&24&&t(7,d=u.filter(y=>f.find(S=>S.id==y.id))),n.$$.dirty[0]&24&&t(8,m=u.filter(y=>!f.find(S=>S.id==y.id))),n.$$.dirty[0]&7&&t(9,l=j.hasCollectionChanges(o,r,a))},[o,r,a,f,u,i,c,d,m,l,s,_,g]}class d8 extends ve{constructor(e){super(),be(this,e,c8,u8,me,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function d_(n,e,t){const i=n.slice();return i[17]=e[t],i}function p_(n){let e,t;return e=new d8({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){B(e.$$.fragment)},m(i,s){V(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){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function p8(n){let e,t,i=n[2],s=[];for(let o=0;o<i.length;o+=1)s[o]=p_(d_(n,i,o));const l=o=>L(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=ye()},m(o,r){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(o,r);w(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 f=d_(o,i,a);s[a]?(s[a].p(f,r),A(s[a],1)):(s[a]=p_(f),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(ae(),a=i.length;a<s.length;a+=1)l(a);fe()}},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)L(s[r]);t=!1},d(o){_t(s,o),o&&k(e)}}}function m8(n){let e;return{c(){e=v("h4"),e.textContent="Side-by-side diff",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function h8(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=U("Close"),i=E(),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,f){w(a,e,f),b(e,t),w(a,i,f),w(a,s,f),b(s,l),o||(r=[Y(e,"click",n[0]),Y(s,"click",n[9])],o=!0)},p(a,f){f&16&&(e.disabled=a[4]),f&16&&(s.disabled=a[4]),f&16&&X(s,"btn-loading",a[4])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,Me(r)}}}function _8(n){let e,t,i={class:"full-width-popup import-popup",overlayClose:!1,escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[h8],header:[m8],default:[p8]},$$scope:{ctx:n}};return e=new nn({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(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){L(e.$$.fragment,s),t=!1},d(s){n[11](nullLine truncated
- ${C.join(`
- `)}`,()=>{_()}):_()}async function _(){if(!f){t(4,f=!0);try{await ue.collections.import(o,a),zt("Successfully imported collections configuration."),i("submit")}catch(C){ue.error(C)}t(4,f=!1),c()}}const h=()=>m(),g=()=>!f;function y(C){ne[C?"unshift":"push"](()=>{s=C,t(1,s)})}function S(C){Fe.call(this,n,C)}function $(C){Fe.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,f,m,u,l,o,h,g,y,S,$]}class b8 extends ve{constructor(e){super(),be(this,e,g8,_8,me,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function m_(n,e,t){const i=n.slice();return i[32]=e[t],i}function h_(n,e,t){const i=n.slice();return i[35]=e[t],i}function __(n,e,t){const i=n.slice();return i[32]=e[t],i}function v8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O;a=new ce({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[k8,({uniqueId:N})=>({40:N}),({uniqueId:N})=>[0,N?512:0]]},$$scope:{ctx:n}}});let D=!1,I=n[6]&&n[1].length&&!n[7]&&b_(),P=n[6]&&n[1].length&&n[7]&&v_(n),F=n[13].length&&D_(n),R=!!n[0]&&A_(n);return{c(){e=v("input"),t=E(),i=v("div"),s=v("p"),l=U(`Paste below the collections configuration you want to import or
`),o=v("button"),o.innerHTML='<span class="txt">Load from JSON file</span>',r=E(),B(a.$$.fragment),f=E(),u=E(),I&&I.c(),c=E(),P&&P.c(),d=E(),F&&F.c(),m=E(),_=v("div"),R&&R.c(),h=E(),g=v("div"),y=E(),S=v("button"),$=v("span"),$.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(g,"class","flex-fill"),p($,"class","txt"),p(S,"type","button"),p(S,"class","btn btn-expanded btn-warning m-l-auto"),S.disabled=C=!n[14],p(_,"class","flex m-t-base")},m(N,q){w(N,e,q),n[19](e),w(N,t,q),w(N,i,q),b(i,s),b(s,l),b(s,o),w(N,r,q),V(a,N,q),w(N,f,q),w(N,u,q),I&&I.m(N,q),w(N,c,q),P&&P.m(N,q),w(N,d,q),F&&F.m(N,q),w(N,m,q),w(N,_,q),R&&R.m(_,null),b(_,h),b(_,g),b(_,y),b(_,S),b(S,$),T=!0,M||(O=[Y(e,"change",n[20]),Y(o,"click",n[21]),Y(S,"click",n[26])],M=!0)},p(N,q){(!T||q[0]&4096)&&X(o,"btn-loading",N[12]);const j={};q[0]&64&&(j.class="form-field "+(N[6]?"":"field-error")),q[0]&65|q[1]&1536&&(j.$$scope={dirty:q,ctx:N}),a.$set(j),N[6]&&N[1].length&&!N[7]?I||(I=b_(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),N[6]&&N[1].length&&N[7]?P?P.p(N,q):(P=v_(N),P.c(),P.m(d.parentNode,d)):P&&(P.d(1),P=null),N[13].length?F?F.p(N,q):(F=D_(N),F.c(),F.m(m.parentNode,m)):F&&(F.d(1),F=null),N[0]?R?R.p(N,q):(R=A_(N),R.c(),R.m(_,h)):R&&(R.d(1),R=null),(!T||q[0]&16384&&C!==(C=!N[14]))&&(S.disabled=C)},i(N){T||(A(a.$$.fragment,N),A(D),T=!0)},o(N){L(a.$$.fragment,N),L(D),T=!1},d(N){N&&k(e),n[19](null),N&&k(t),N&&k(i),N&&k(r),H(a,N),N&&k(f),N&&k(u),I&&I.d(N),N&&k(c),P&&P.d(N),N&&k(d),F&&F.d(N),N&&k(m),N&&k(_),R&&R.d(),M=!1,Me(O)}}}function y8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&k(e)}}}function g_(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function k8(n){let e,t,i,s,l,o,r,a,f,u,c=!!n[0]&&!n[6]&&g_();return{c(){e=v("label"),t=U("Collections"),s=E(),l=v("textarea"),r=E(),c&&c.c(),a=ye(),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){w(d,e,m),b(e,t),w(d,s,m),w(d,l,m),re(l,n[0]),w(d,r,m),c&&c.m(d,m),w(d,a,m),f||(u=Y(l,"input",n[22]),f=!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&&re(l,d[0]),d[0]&&!d[6]?c||(c=g_(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),c&&c.d(d),d&&k(a),f=!1,u()}}}function b_(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=E(),B(a.$$.fragment),f=E(),u=E(),I&&I.c(),c=E(),P&&P.c(),d=E(),F&&F.c(),m=E(),_=v("div"),R&&R.c(),h=E(),g=v("div"),y=E(),S=v("button"),$=v("span"),$.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(g,"class","flex-fill"),p($,"class","txt"),p(S,"type","button"),p(S,"class","btn btn-expanded btn-warning m-l-auto"),S.disabled=C=!n[14],p(_,"class","flex m-t-base")},m(N,q){w(N,e,q),n[19](e),w(N,t,q),w(N,i,q),b(i,s),b(s,l),b(s,o),w(N,r,q),V(a,N,q),w(N,f,q),w(N,u,q),I&&I.m(N,q),w(N,c,q),P&&P.m(N,q),w(N,d,q),F&&F.m(N,q),w(N,m,q),w(N,_,q),R&&R.m(_,null),b(_,h),b(_,g),b(_,y),b(_,S),b(S,$),T=!0,M||(O=[Y(e,"change",n[20]),Y(o,"click",n[21]),Y(S,"click",n[26])],M=!0)},p(N,q){(!T||q[0]&4096)&&X(o,"btn-loading",N[12]);const z={};q[0]&64&&(z.class="form-field "+(N[6]?"":"field-error")),q[0]&65|q[1]&1536&&(z.$$scope={dirty:q,ctx:N}),a.$set(z),N[6]&&N[1].length&&!N[7]?I||(I=b_(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),N[6]&&N[1].length&&N[7]?P?P.p(N,q):(P=v_(N),P.c(),P.m(d.parentNode,d)):P&&(P.d(1),P=null),N[13].length?F?F.p(N,q):(F=D_(N),F.c(),F.m(m.parentNode,m)):F&&(F.d(1),F=null),N[0]?R?R.p(N,q):(R=A_(N),R.c(),R.m(_,h)):R&&(R.d(1),R=null),(!T||q[0]&16384&&C!==(C=!N[14]))&&(S.disabled=C)},i(N){T||(A(a.$$.fragment,N),A(D),T=!0)},o(N){L(a.$$.fragment,N),L(D),T=!1},d(N){N&&k(e),n[19](null),N&&k(t),N&&k(i),N&&k(r),H(a,N),N&&k(f),N&&k(u),I&&I.d(N),N&&k(c),P&&P.d(N),N&&k(d),F&&F.d(N),N&&k(m),N&&k(_),R&&R.d(),M=!1,Me(O)}}}function y8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&k(e)}}}function g_(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function k8(n){let e,t,i,s,l,o,r,a,f,u,c=!!n[0]&&!n[6]&&g_();return{c(){e=v("label"),t=U("Collections"),s=E(),l=v("textarea"),r=E(),c&&c.c(),a=ye(),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){w(d,e,m),b(e,t),w(d,s,m),w(d,l,m),re(l,n[0]),w(d,r,m),c&&c.m(d,m),w(d,a,m),f||(u=Y(l,"input",n[22]),f=!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&&re(l,d[0]),d[0]&&!d[6]?c||(c=g_(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),c&&c.d(d),d&&k(a),f=!1,u()}}}function b_(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){w(t,e,i)},d(t){t&&k(e)}}}function v_(n){let e,t,i,s,l,o=n[9].length&&y_(n),r=n[4].length&&S_(n),a=n[8].length&&M_(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=E(),i=v("div"),o&&o.c(),s=E(),r&&r.c(),l=E(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(f,u){w(f,e,u),w(f,t,u),w(f,i,u),o&&o.m(i,null),b(i,s),r&&r.m(i,null),b(i,l),a&&a.m(i,null)},p(f,u){f[9].length?o?o.p(f,u):(o=y_(f),o.c(),o.m(i,s)):o&&(o.d(1),o=null),f[4].length?r?r.p(f,u):(r=S_(f),r.c(),r.m(i,l)):r&&(r.d(1),r=null),f[8].length?a?a.p(f,u):(a=M_(f),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(f){f&&k(e),f&&k(t),f&&k(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function y_(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=__(n,s,o),a=l(r);t.set(a,e[o]=w_(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=ye()},m(o,r){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&512&&(s=o[9],e=vt(e,r,l,1,o,s,t,i.parentNode,ls,w_,i,__))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&k(i)}}}function k_(n){let e,t,i=n[32].id+"",s,l;return{c(){e=v("small"),t=U("("),s=U(i),l=U(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r[0]&512&&i!==(i=o[32].id+"")&&se(s,i)},d(o){o&&k(e)}}}function w_(n,e){let t,i,s,l,o=e[32].name+"",r,a,f,u=e[32].id&&k_(e);return{key:n,first:null,c(){t=v("div"),i=v("span"),i.textContent="Deleted",s=E(),l=v("strong"),r=U(o),a=E(),u&&u.c(),f=E(),p(i,"class","label label-danger list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){w(c,t,d),b(t,i),b(t,s),b(t,l),b(l,r),b(t,a),u&&u.m(t,null),b(t,f)},p(c,d){e=c,d[0]&512&&o!==(o=e[32].name+"")&&se(r,o),e[32].id?u?u.p(e,d):(u=k_(e),u.c(),u.m(t,f)):u&&(u.d(1),u=null)},d(c){c&&k(t),u&&u.d()}}}function S_(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=h_(n,s,o),a=l(r);t.set(a,e[o]=T_(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=ye()},m(o,r){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&16&&(s=o[4],e=vt(e,r,l,1,o,s,t,i.parentNode,ls,T_,i,h_))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&k(i)}}}function C_(n){let e,t=n[35].old.name+"",i,s,l;return{c(){e=v("strong"),i=U(t),s=E(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){w(o,e,r),b(e,i),w(o,s,r),w(o,l,r)},p(o,r){r[0]&16&&t!==(t=o[35].old.name+"")&&se(i,t)},d(o){o&&k(e),o&&k(s),o&&k(l)}}}function $_(n){let e,t,i=n[35].new.id+"",s,l;return{c(){e=v("small"),t=U("("),s=U(i),l=U(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r[0]&16&&i!==(i=o[35].new.id+"")&&se(s,i)},d(o){o&&k(e)}}}function T_(n,e){let t,i,s,l,o,r,a=e[35].new.name+"",f,u,c,d=e[35].old.name!==e[35].new.name&&C_(e),m=e[35].new.id&&$_(e);return{key:n,first:null,c(){t=v("div"),i=v("span"),i.textContent="Changed",s=E(),l=v("div"),d&&d.c(),o=E(),r=v("strong"),f=U(a),u=E(),m&&m.c(),c=E(),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){w(_,t,h),b(t,i),b(t,s),b(t,l),d&&d.m(l,null),b(l,o),b(l,r),b(r,f),b(l,u),m&&m.m(l,null),b(t,c)},p(_,h){e=_,e[35].old.name!==e[35].new.name?d?d.p(e,h):(d=C_(e),d.c(),d.m(l,o)):d&&(d.d(1),d=null),h[0]&16&&a!==(a=e[35].new.name+"")&&se(f,a),e[35].new.id?m?m.p(e,h):(m=$_(e),m.c(),m.m(l,null)):m&&(m.d(1),m=null)},d(_){_&&k(t),d&&d.d(),m&&m.d()}}}function M_(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=m_(n,s,o),a=l(r);t.set(a,e[o]=O_(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=ye()},m(o,r){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&256&&(s=o[8],e=vt(e,r,l,1,o,s,t,i.parentNode,ls,O_,i,m_))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&k(i)}}}function E_(n){let e,t,i=n[32].id+"",s,l;return{c(){e=v("small"),t=U("("),s=U(i),l=U(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r[0]&256&&i!==(i=o[32].id+"")&&se(s,i)},d(o){o&&k(e)}}}function O_(n,e){let t,i,s,l,o=e[32].name+"",r,a,f,u=e[32].id&&E_(e);return{key:n,first:null,c(){t=v("div"),i=v("span"),i.textContent="Added",s=E(),l=v("strong"),r=U(o),a=E(),u&&u.c(),f=E(),p(i,"class","label label-success list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){w(c,t,d),b(t,i),b(t,s),b(t,l),b(l,r),b(t,a),u&&u.m(t,null),b(t,f)},p(c,d){e=c,d[0]&256&&o!==(o=e[32].name+"")&&se(r,o),e[32].id?u?u.p(e,d):(u=E_(e),u.c(),u.m(t,f)):u&&(u.d(1),u=null)},d(c){c&&k(t),u&&u.d()}}}function D_(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=E(),s=v("div"),s.innerHTML=`<string>Some of the imported collections share 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=E(),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(f,u){w(f,e,u),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),r||(a=Y(o,"click",n[24]),r=!0)},p:ee,d(f){f&&k(e),r=!1,a()}}}function A_(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){w(s,e,l),t||(i=Y(e,"click",n[25]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function w8(n){let e,t,i,s,l,o,r,a,f,u,c,d;const m=[y8,v8],_=[];function h(g,y){return g[5]?0:1}return u=h(n),c=_[u]=m[u](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[15]),r=E(),a=v("div"),f=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","panel"),p(a,"class","wrapper")},m(g,y){w(g,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(g,r,y),w(g,a,y),b(a,f),_[u].m(f,null),d=!0},p(g,y){(!d||y[0]&32768)&&se(o,g[15]);let S=u;u=h(g),u===S?_[u].p(g,y):(ae(),L(_[S],1,1,()=>{_[S]=null}),fe(),c=_[u],c?c.p(g,y):(c=_[u]=m[u](g),c.c()),A(c,1),c.m(f,null))},i(g){d||(A(c),d=!0)},o(g){L(c),d=!1},d(g){g&&k(e),g&&k(r),g&&k(a),_[u].d()}}}function S8(n){let e,t,i,s,l,o;e=new Ti({}),i=new kn({props:{$$slots:{default:[w8]},$$scope:{ctx:n}}});let r={};return l=new b8({props:r}),n[27](l),l.$on("submit",n[28]),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment),s=E(),B(l.$$.fragment)},m(a,f){V(e,a,f),w(a,t,f),V(i,a,f),w(a,s,f),V(l,a,f),o=!0},p(a,f){const u={};f[0]&65535|f[1]&1024&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&k(t),H(i,a),a&&k(s),n[27](null),H(l,a)}}}function C8(n,e,t){let i,s,l,o,r,a,f;We(n,Et,K=>t(15,f=K)),tn(Et,f="Import collections",f);let u,c,d="",m=!1,_=[],h=[],g=!0,y=[],S=!1;$();async function $(){t(5,S=!0);try{t(2,h=await ue.collections.getFullList(200));for(let K of h)delete K.created,delete K.updated}catch(K){ue.error(K)}t(5,S=!1)}function C(){if(t(4,y=[]),!!i)for(let K of _){const le=z.findByKey(h,"id",K.id);!(le!=null&&le.id)||!z.hasCollectionChanges(le,K,g)||y.push({new:K,old:le})}}function T(){t(1,_=[]);try{t(1,_=JSON.parse(d))}catch{}Array.isArray(_)?t(1,_=z.filterDuplicatesByKey(_)):t(1,_=[]);for(let K of _)delete K.created,delete K.updated,K.schema=z.filterDuplicatesByKey(K.schema)}function M(){var K,le;for(let x of _){const te=z.findByKey(h,"name",x.name)||z.findByKey(h,"id",x.id);if(!te)continue;const Ee=x.id,Pe=te.id;x.id=Pe;const je=Array.isArray(te.schema)?te.schema:[],Ve=Array.isArray(x.schema)?x.schema:[];for(const ke of Ve){const $e=z.findByKey(je,"name",ke.name);$e&&$e.id&&(ke.id=$e.id)}for(let ke of _)if(Array.isArray(ke.schema))for(let $e of ke.schema)(K=$e.options)!=null&&K.collectionId&&((le=$e.options)==null?void 0:le.collectionId)===Ee&&($e.options.collectionId=Pe)}t(0,d=JSON.stringify(_,null,4))}function O(K){t(12,m=!0);const le=new FileReader;le.onload=async x=>{t(12,m=!1),t(10,u.value="",u),t(0,d=x.target.result),await fn(),_.length||($s("Invalid collections configuration."),D())},le.onerror=x=>{console.warn(x),$s("Failed to load the imported JSON."),t(12,m=!1),t(10,u.value="",u)},le.readAsText(K)}function D(){t(0,d=""),t(10,u.value="",u),xt({})}function I(K){ne[K?"unshift":"push"](()=>{u=K,t(10,u)})}const P=()=>{u.files.length&&O(u.files[0])},F=()=>{u.click()};function R(){d=this.value,t(0,d)}function N(){g=this.checked,t(3,g)}const q=()=>M(),j=()=>D(),J=()=>c==null?void 0:c.show(h,_,g);function G(K){ne[K?"unshift":"push"](()=>{c=K,t(11,c)})}const Q=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&T(),n.$$.dirty[0]&3&&t(6,i=!!d&&_.length&&_.length===_.filter(K=>!!K.id&&!!K.name).length),n.$$.dirty[0]&78&&t(9,s=h.filter(K=>i&&g&&!z.findByKey(_,"id",K.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(K=>i&&!z.findByKey(h,"id",K.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof g<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!S&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(K=>{let le=z.findByKey(h,"name",K.name)||z.findByKey(h,"id",K.id);if(!le)return!1;if(le.id!=K.id)return!0;const x=Array.isArray(le.schema)?le.schema:[],te=Array.isArray(K.schema)?K.schema:[];for(const Ee of te){if(z.findByKey(x,"id",Ee.id))continue;const je=z.findByKey(x,"name",Ee.name);if(je&&Ee.id!=je.id)return!0}return!1}))},[d,_,h,g,y,S,i,o,l,s,u,c,m,a,r,f,M,O,D,I,P,F,R,N,q,j,J,G,Q]}class $8 extends ve{constructor(e){super(),be(this,e,C8,S8,me,{},null,[-1,-1])}}function T8(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Backup name"),s=E(),l=v("input"),r=E(),a=v("em"),a.textContent="Must be in the format [a-z0-9_-].zip",p(e,"for",i=n[15]),pLine truncated
to.</string>`,l=E(),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(f,u){w(f,e,u),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),r||(a=Y(o,"click",n[24]),r=!0)},p:ee,d(f){f&&k(e),r=!1,a()}}}function A_(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){w(s,e,l),t||(i=Y(e,"click",n[25]),t=!0)},p:ee,d(s){s&&k(e),t=!1,i()}}}function w8(n){let e,t,i,s,l,o,r,a,f,u,c,d;const m=[y8,v8],_=[];function h(g,y){return g[5]?0:1}return u=h(n),c=_[u]=m[u](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[15]),r=E(),a=v("div"),f=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","panel"),p(a,"class","wrapper")},m(g,y){w(g,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(g,r,y),w(g,a,y),b(a,f),_[u].m(f,null),d=!0},p(g,y){(!d||y[0]&32768)&&se(o,g[15]);let S=u;u=h(g),u===S?_[u].p(g,y):(ae(),L(_[S],1,1,()=>{_[S]=null}),fe(),c=_[u],c?c.p(g,y):(c=_[u]=m[u](g),c.c()),A(c,1),c.m(f,null))},i(g){d||(A(c),d=!0)},o(g){L(c),d=!1},d(g){g&&k(e),g&&k(r),g&&k(a),_[u].d()}}}function S8(n){let e,t,i,s,l,o;e=new Ti({}),i=new kn({props:{$$slots:{default:[w8]},$$scope:{ctx:n}}});let r={};return l=new b8({props:r}),n[27](l),l.$on("submit",n[28]),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment),s=E(),B(l.$$.fragment)},m(a,f){V(e,a,f),w(a,t,f),V(i,a,f),w(a,s,f),V(l,a,f),o=!0},p(a,f){const u={};f[0]&65535|f[1]&1024&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&k(t),H(i,a),a&&k(s),n[27](null),H(l,a)}}}function C8(n,e,t){let i,s,l,o,r,a,f;We(n,Et,K=>t(15,f=K)),tn(Et,f="Import collections",f);let u,c,d="",m=!1,_=[],h=[],g=!0,y=[],S=!1;$();async function $(){t(5,S=!0);try{t(2,h=await ue.collections.getFullList(200));for(let K of h)delete K.created,delete K.updated}catch(K){ue.error(K)}t(5,S=!1)}function C(){if(t(4,y=[]),!!i)for(let K of _){const le=j.findByKey(h,"id",K.id);!(le!=null&&le.id)||!j.hasCollectionChanges(le,K,g)||y.push({new:K,old:le})}}function T(){t(1,_=[]);try{t(1,_=JSON.parse(d))}catch{}Array.isArray(_)?t(1,_=j.filterDuplicatesByKey(_)):t(1,_=[]);for(let K of _)delete K.created,delete K.updated,K.schema=j.filterDuplicatesByKey(K.schema)}function M(){var K,le;for(let x of _){const te=j.findByKey(h,"name",x.name)||j.findByKey(h,"id",x.id);if(!te)continue;const Ee=x.id,Pe=te.id;x.id=Pe;const je=Array.isArray(te.schema)?te.schema:[],Ve=Array.isArray(x.schema)?x.schema:[];for(const ke of Ve){const $e=j.findByKey(je,"name",ke.name);$e&&$e.id&&(ke.id=$e.id)}for(let ke of _)if(Array.isArray(ke.schema))for(let $e of ke.schema)(K=$e.options)!=null&&K.collectionId&&((le=$e.options)==null?void 0:le.collectionId)===Ee&&($e.options.collectionId=Pe)}t(0,d=JSON.stringify(_,null,4))}function O(K){t(12,m=!0);const le=new FileReader;le.onload=async x=>{t(12,m=!1),t(10,u.value="",u),t(0,d=x.target.result),await fn(),_.length||($s("Invalid collections configuration."),D())},le.onerror=x=>{console.warn(x),$s("Failed to load the imported JSON."),t(12,m=!1),t(10,u.value="",u)},le.readAsText(K)}function D(){t(0,d=""),t(10,u.value="",u),xt({})}function I(K){ne[K?"unshift":"push"](()=>{u=K,t(10,u)})}const P=()=>{u.files.length&&O(u.files[0])},F=()=>{u.click()};function R(){d=this.value,t(0,d)}function N(){g=this.checked,t(3,g)}const q=()=>M(),z=()=>D(),J=()=>c==null?void 0:c.show(h,_,g);function G(K){ne[K?"unshift":"push"](()=>{c=K,t(11,c)})}const Q=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&T(),n.$$.dirty[0]&3&&t(6,i=!!d&&_.length&&_.length===_.filter(K=>!!K.id&&!!K.name).length),n.$$.dirty[0]&78&&t(9,s=h.filter(K=>i&&g&&!j.findByKey(_,"id",K.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(K=>i&&!j.findByKey(h,"id",K.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof g<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!S&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(K=>{let le=j.findByKey(h,"name",K.name)||j.findByKey(h,"id",K.id);if(!le)return!1;if(le.id!=K.id)return!0;const x=Array.isArray(le.schema)?le.schema:[],te=Array.isArray(K.schema)?K.schema:[];for(const Ee of te){if(j.findByKey(x,"id",Ee.id))continue;const je=j.findByKey(x,"name",Ee.name);if(je&&Ee.id!=je.id)return!0}return!1}))},[d,_,h,g,y,S,i,o,l,s,u,c,m,a,r,f,M,O,D,I,P,F,R,N,q,z,J,G,Q]}class $8 extends ve{constructor(e){super(),be(this,e,C8,S8,me,{},null,[-1,-1])}}function T8(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Backup name"),s=E(),l=v("input"),r=E(),a=v("em"),a.textContent="Must be in the format [a-z0-9_-].zip",p(e,"for",i=n[15]),pLine truncated
<div class="content"><p>Please note that during the backup other concurrent write requests may fail since the
database will be temporary &quot;locked&quot; (this usually happens only during the ZIP generation).</p>
<p class="txt-bold">If you are using S3 storage for the collections file upload, you&#39;ll have to backup them
separately since they are not locally stored and will not be included in the final backup!</p></div>`,t=E(),i=v("form"),B(s.$$.fragment),p(e,"class","alert alert-info"),p(i,"id",n[4]),p(i,"autocomplete","off")},m(a,f){w(a,e,f),w(a,t,f),w(a,i,f),V(s,i,null),l=!0,o||(r=Y(i,"submit",Xe(n[5])),o=!0)},p(a,f){const u={};f&98308&&(u.$$scope={dirty:f,ctx:a}),s.$set(u)},i(a){l||(A(s.$$.fragment,a),l=!0)},o(a){L(s.$$.fragment,a),l=!1},d(a){a&&k(e),a&&k(t),a&&k(i),H(s),o=!1,r()}}}function E8(n){let e;return{c(){e=v("h4"),e.textContent="Initialize new backup",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function O8(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),l.textContent="Start backup",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[4]),p(s,"class","btn btn-expanded"),s.disabled=n[3],X(s,"btn-loading",n[3])},m(a,f){w(a,e,f),b(e,t),w(a,i,f),w(a,s,f),b(s,l),o||(r=Y(e,"click",n[0]),o=!0)},p(a,f){f&8&&(e.disabled=a[3]),f&8&&(s.disabled=a[3]),f&8&&X(s,"btn-loading",a[3])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,r()}}}function D8(n){let e,t,i={class:"backup-create-panel",beforeOpen:n[8],beforeHide:n[9],popup:!0,$$slots:{footer:[O8],header:[E8],default:[M8]},$$scope:{ctx:n}};return e=new nn({props:i}),n[10](e),e.$on("show",n[11]),e.$on("hide",n[12]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&8&&(o.beforeOpen=s[8]),l&8&&(o.beforeHide=s[9]),l&65548&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function A8(n,e,t){const i=wt(),s="backup_create_"+z.randomString(5);let l,o="",r=!1,a;function f(S){xt({}),t(3,r=!1),t(2,o=S||""),l==null||l.show()}function u(){return l==null?void 0:l.hide()}async function c(){if(!r){t(3,r=!0),clearTimeout(a),a=setTimeout(()=>{u()},1500);try{await ue.backups.create(o,{$cancelKey:s}),t(3,r=!1),u(),i("submit"),zt("Successfully generated new backup.")}catch(S){S.isAbort||ue.error(S)}clearTimeout(a),t(3,r=!1)}}Fo(()=>{clearTimeout(a)});function d(){o=this.value,t(2,o)}const m=()=>r?(_o("A backup has already been started, please wait."),!1):!0,_=()=>(r&&_o("The backup was started but may take a while to complete. You can come back later.",4500),!0);function h(S){ne[S?"unshift":"push"](()=>{l=S,t(1,l)})}function g(S){Fe.call(this,n,S)}function y(S){Fe.call(this,n,S)}return[u,l,o,r,s,c,f,d,m,_,h,g,y]}class I8 extends ve{constructor(e){super(),be(this,e,A8,D8,me,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function L8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Backup name"),s=E(),l=v("input"),p(e,"for",i=n[14]),p(l,"type","text"),p(l,"id",o=n[14]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[2]),r||(a=Y(l,"input",n[9]),r=!0)},p(f,u){u&16384&&i!==(i=f[14])&&p(e,"for",i),u&16384&&o!==(o=f[14])&&p(l,"id",o),u&4&&l.value!==f[2]&&re(l,f[2])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function P8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;return f=new Dl({props:{value:n[1]}}),m=new ce({props:{class:"form-field required m-0",name:"name",$$slots:{default:[L8,({uniqueId:y})=>({14:y}),({uniqueId:y})=>y?16384:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`<div class="icon"><i class="ri-alert-line"></i></div>
separately since they are not locally stored and will not be included in the final backup!</p></div>`,t=E(),i=v("form"),B(s.$$.fragment),p(e,"class","alert alert-info"),p(i,"id",n[4]),p(i,"autocomplete","off")},m(a,f){w(a,e,f),w(a,t,f),w(a,i,f),V(s,i,null),l=!0,o||(r=Y(i,"submit",Xe(n[5])),o=!0)},p(a,f){const u={};f&98308&&(u.$$scope={dirty:f,ctx:a}),s.$set(u)},i(a){l||(A(s.$$.fragment,a),l=!0)},o(a){L(s.$$.fragment,a),l=!1},d(a){a&&k(e),a&&k(t),a&&k(i),H(s),o=!1,r()}}}function E8(n){let e;return{c(){e=v("h4"),e.textContent="Initialize new backup",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function O8(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),l.textContent="Start backup",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[4]),p(s,"class","btn btn-expanded"),s.disabled=n[3],X(s,"btn-loading",n[3])},m(a,f){w(a,e,f),b(e,t),w(a,i,f),w(a,s,f),b(s,l),o||(r=Y(e,"click",n[0]),o=!0)},p(a,f){f&8&&(e.disabled=a[3]),f&8&&(s.disabled=a[3]),f&8&&X(s,"btn-loading",a[3])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,r()}}}function D8(n){let e,t,i={class:"backup-create-panel",beforeOpen:n[8],beforeHide:n[9],popup:!0,$$slots:{footer:[O8],header:[E8],default:[M8]},$$scope:{ctx:n}};return e=new nn({props:i}),n[10](e),e.$on("show",n[11]),e.$on("hide",n[12]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&8&&(o.beforeOpen=s[8]),l&8&&(o.beforeHide=s[9]),l&65548&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function A8(n,e,t){const i=wt(),s="backup_create_"+j.randomString(5);let l,o="",r=!1,a;function f(S){xt({}),t(3,r=!1),t(2,o=S||""),l==null||l.show()}function u(){return l==null?void 0:l.hide()}async function c(){if(!r){t(3,r=!0),clearTimeout(a),a=setTimeout(()=>{u()},1500);try{await ue.backups.create(o,{$cancelKey:s}),t(3,r=!1),u(),i("submit"),zt("Successfully generated new backup.")}catch(S){S.isAbort||ue.error(S)}clearTimeout(a),t(3,r=!1)}}Fo(()=>{clearTimeout(a)});function d(){o=this.value,t(2,o)}const m=()=>r?(_o("A backup has already been started, please wait."),!1):!0,_=()=>(r&&_o("The backup was started but may take a while to complete. You can come back later.",4500),!0);function h(S){ne[S?"unshift":"push"](()=>{l=S,t(1,l)})}function g(S){Fe.call(this,n,S)}function y(S){Fe.call(this,n,S)}return[u,l,o,r,s,c,f,d,m,_,h,g,y]}class I8 extends ve{constructor(e){super(),be(this,e,A8,D8,me,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function L8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Backup name"),s=E(),l=v("input"),p(e,"for",i=n[14]),p(l,"type","text"),p(l,"id",o=n[14]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[2]),r||(a=Y(l,"input",n[9]),r=!0)},p(f,u){u&16384&&i!==(i=f[14])&&p(e,"for",i),u&16384&&o!==(o=f[14])&&p(l,"id",o),u&4&&l.value!==f[2]&&re(l,f[2])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function P8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;return f=new Dl({props:{value:n[1]}}),m=new ce({props:{class:"form-field required m-0",name:"name",$$slots:{default:[L8,({uniqueId:y})=>({14:y}),({uniqueId:y})=>y?16384:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`<div class="icon"><i class="ri-alert-line"></i></div>
<div class="content"><p>Please proceed with caution.</p>
<p>The restore operation will replace your existing <code>pb_data</code> with the one from the backup
and will restart the application process!</p>
<p class="txt-bold">Backup restore is still experimental and currently works only on UNIX based systems.</p></div>`,t=E(),i=v("div"),s=U(`Type the backup name
`),l=v("div"),o=v("span"),r=U(n[1]),a=E(),B(f.$$.fragment),u=U(`
to confirm:`),c=E(),d=v("form"),B(m.$$.fragment),p(e,"class","alert alert-danger"),p(o,"class","txt"),p(l,"class","label"),p(i,"class","content m-b-sm"),p(d,"id",n[6]),p(d,"autocomplete","off")},m(y,S){w(y,e,S),w(y,t,S),w(y,i,S),b(i,s),b(i,l),b(l,o),b(o,r),b(l,a),V(f,l,null),b(i,u),w(y,c,S),w(y,d,S),V(m,d,null),_=!0,h||(g=Y(d,"submit",Xe(n[7])),h=!0)},p(y,S){(!_||S&2)&&se(r,y[1]);const $={};S&2&&($.value=y[1]),f.$set($);const C={};S&49156&&(C.$$scope={dirty:S,ctx:y}),m.$set(C)},i(y){_||(A(f.$$.fragment,y),A(m.$$.fragment,y),_=!0)},o(y){L(f.$$.fragment,y),L(m.$$.fragment,y),_=!1},d(y){y&&k(e),y&&k(t),y&&k(i),H(f),y&&k(c),y&&k(d),H(m),h=!1,g()}}}function F8(n){let e,t,i,s;return{c(){e=v("h4"),t=U("Restore "),i=v("strong"),s=U(n[1]),p(e,"class","center txt-break")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(i,s)},p(l,o){o&2&&se(s,l[1])},d(l){l&&k(e)}}}function N8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Cancel"),i=E(),s=v("button"),l=v("span"),l.textContent="Restore backup",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],X(s,"btn-loading",n[4])},m(f,u){w(f,e,u),b(e,t),w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"click",n[0]),r=!0)},p(f,u){u&16&&(e.disabled=f[4]),u&48&&o!==(o=!f[5]||f[4])&&(s.disabled=o),u&16&&X(s,"btn-loading",f[4])},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function R8(n){let e,t,i={class:"backup-restore-panel",overlayClose:!n[4],escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[N8],header:[F8],default:[P8]},$$scope:{ctx:n}};return e=new nn({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[10]),l&32822&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[11](null),H(e,s)}}}function q8(n,e,t){let i;const s="backup_restore_"+z.randomString(5);let l,o="",r="",a=!1;function f(y){xt({}),t(2,r=""),t(1,o=y),t(4,a=!1),l==null||l.show()}function u(){return l==null?void 0:l.hide()}async function c(){var y;if(!(!i||a)){t(4,a=!0);try{await ue.backups.restore(o),setTimeout(()=>{window.location.reload()},1e3)}catch(S){S!=null&&S.isAbort||(t(4,a=!1),$s(((y=S.response)==null?void 0:y.message)||S.message))}}}function d(){r=this.value,t(2,r)}const m=()=>!a;function _(y){ne[y?"unshift":"push"](()=>{l=y,t(3,l)})}function h(y){Fe.call(this,n,y)}function g(y){Fe.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=r!=""&&o==r)},[u,o,r,l,a,i,s,c,f,d,m,_,h,g]}class j8 extends ve{constructor(e){super(),be(this,e,q8,R8,me,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function I_(n,e,t){const i=n.slice();return i[22]=e[t],i}function L_(n,e,t){const i=n.slice();return i[19]=e[t],i}function z8(n){let e=[],t=new Map,i,s,l=n[3];const o=a=>a[22].key;for(let a=0;a<l.length;a+=1){let f=I_(n,l,a),u=o(f);t.set(u,e[a]=F_(u,f))}let r=null;return l.length||(r=P_()),{c(){for(let a=0;a<e.length;a+=1)e[a].c();i=ye(),r&&r.c()},m(a,f){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(a,f);w(a,i,f),r&&r.m(a,f),s=!0},p(a,f){f&876&&(l=a[3],ae(),e=vt(e,f,o,1,a,l,t,i.parentNode,Ht,F_,i,I_),fe(),!l.length&&r?r.p(a,f):l.length?r&&(r.d(1),r=null):(r=P_(),r.c(),r.m(i.parentNode,i)))},i(a){if(!s){for(let f=0;f<l.length;f+=1)A(e[f]);s=!0}},o(a){for(let f=0;f<e.length;f+=1)L(e[f]);s=!1},d(a){for(let f=0;f<e.length;f+=1)e[f].d(a);a&&k(i),r&&r.d(a)}}}function V8(n){let e,t=Array(n[3].length||1),i=[];for(let s=0;s<t.length;s+=1)i[s]=N_(L_(n,t,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=ye()},m(s,l){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(s,l);w(s,e,l)},p(s,l){if(l&8){t=Array(s[3].length||1);let o;for(o=0;o<t.length;o+=1){const r=L_(s,t,o);i[o]?i[o].p(r,l):(i[o]=N_(),i[o].c(),i[o].m(e.parentNode,e))}for(;o<i.length;o+=1)i[o].d(1);i.length=t.length}},i:ee,o:ee,d(s){_t(i,s),s&&k(e)}}}function P_(n){let e;return{c(){e=v("div"),e.innerHTML=`<span class="txt">No backups yet.</span>
`,p(e,"class","list-item list-item-placeholder svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function F_(n,e){let t,i,s,l,o,r=e[22].key+"",a,f,u,c,d=z.formattedFileSize(e[22].size)+"",m,_,h,g,y,S,$,C,T,M,O,D,I,P,F,R,N,q,j,J;function G(){return e[10](e[22])}function Q(){return e[11](e[22])}function K(){return e[12](e[22])}return{key:n,first:null,c(){t=v("div"),i=v("i"),s=E(),l=v("div"),o=v("span"),a=U(r),f=E(),u=v("span"),c=U("("),m=U(d),_=U(")"),h=E(),g=v("div"),y=v("button"),S=v("i"),C=E(),T=v("button"),M=v("i"),D=E(),I=v("button"),P=v("i"),R=E(),p(i,"class","ri-folder-zip-line"),p(o,"class","name backup-name svelte-1ulbkf5"),p(u,"class","size txt-hint txt-nowrap"),p(l,"class","content"),p(S,"class","ri-download-line"),p(y,"type","button"),p(y,"class","btn btn-sm btn-circle btn-hint btn-transparent"),y.disabled=$=e[6][e[22].key]||e[5][e[22].key],p(y,"aria-label","Download"),X(y,"btn-loading",e[5][e[22].key]),p(M,"class","ri-restart-line"),p(T,"type","button"),p(T,"class","btn btn-sm btn-circle btn-hint btn-transparent"),T.disabled=O=e[6][e[22].key],p(T,"aria-label","Restore"),p(P,"class","ri-delete-bin-7-line"),p(I,"type","button"),p(I,"class","btn btn-sm btn-circle btn-hint btn-transparent"),I.disabled=F=e[6][e[22].key],p(I,"aria-label","Delete"),X(I,"btn-loading",e[6][e[22].key]),p(g,"class","actions nonintrusive"),p(t,"class","list-item svelte-1ulbkf5"),this.first=t},m(le,x){w(le,t,x),b(t,i),b(t,s),b(t,l),b(l,o),b(o,a),b(l,f),b(l,u),b(u,c),b(u,m),b(u,_),b(t,h),b(t,g),b(g,y),b(y,S),b(g,C),b(g,T),b(T,M),b(g,D),b(g,I),b(I,P),b(t,R),q=!0,j||(J=[Ce(ze.call(null,y,"Download")),Y(y,"click",Xe(G)),Ce(ze.call(null,T,"Restore")),Y(T,"click",Xe(Q)),Ce(ze.call(null,I,"Delete")),Y(I,"click",Xe(K))],j=!0)},p(le,x){e=le,(!q||x&8)&&r!==(r=e[22].key+"")&&se(a,r),(!q||x&8)&&d!==(d=z.formattedFileSize(e[22].size)+"")&&se(m,d),(!q||x&104&&$!==($=e[6][e[22].key]||e[5][e[22].key]))&&(y.disabled=$),(!q||x&40)&&X(y,"btn-loading",e[5][e[22].key]),(!q||x&72&&O!==(O=e[6][e[22].key]))&&(T.disabled=O),(!q||x&72&&F!==(F=e[6][e[22].key]))&&(I.disabled=F),(!q||x&72)&&X(I,"btn-loading",e[6][e[22].key])},i(le){q||(le&&Ge(()=>{q&&(N||(N=Re(t,tt,{duration:150},!0)),N.run(1))}),q=!0)},o(le){le&&(N||(N=Re(t,tt,{duration:150},!1)),N.run(0)),q=!1},d(le){le&&k(t),le&&N&&N.end(),j=!1,Me(J)}}}function N_(n){let e;return{c(){e=v("div"),e.innerHTML=`<span class="skeleton-loader"></span>
`,p(e,"class","list-item list-item-loader svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function H8(n){let e,t,i;return{c(){e=v("span"),t=E(),i=v("span"),i.textContent="Backup/restore operation is in process",p(e,"class","loader loader-sm"),p(i,"class","txt")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function B8(n){let e,t,i;return{c(){e=v("i"),t=E(),i=v("span"),i.textContent="Initialize new backup",p(e,"class","ri-play-circle-line"),p(i,"class","txt")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function U8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h;const g=[V8,z8],y=[];function S(D,I){return D[4]?0:1}i=S(n),s=y[i]=g[i](n);function $(D,I){return D[7]?B8:H8}let C=$(n),T=C(n),M={};u=new I8({props:M}),n[14](u),u.$on("submit",n[15]);let O={};return d=new j8({props:O}),n[16](d),{c(){e=v("div"),t=v("div"),s.c(),l=E(),o=v("div"),r=v("button"),T.c(),f=E(),B(u.$$.fragment),c=E(),B(d.$$.fragment),p(t,"class","list-content svelte-1ulbkf5"),p(r,"type","button"),p(r,"class","btn btn-block btn-transparent"),r.disabled=a=n[4]||!n[7],p(o,"class","list-item list-item-btn"),p(e,"class","list list-compact")},m(D,I){w(D,e,I),b(e,t),y[i].m(t,null),b(e,l),b(e,o),b(o,r),T.m(r,null),w(D,f,I),V(u,D,I),w(D,c,I),V(d,D,I),m=!0,_||(h=Y(r,"click",n[13]),_=!0)},p(D,[I]){let P=i;i=S(D),i===P?y[i].p(D,I):(ae(),L(y[P],1,1,()=>{y[P]=null}),fe(),s=y[i],s?s.p(D,I):(s=y[i]=g[i](D),s.c()),A(s,1),s.m(t,null)),C!==(C=$(D))&&(T.d(1),T=C(D),T&&(T.c(),T.m(r,null))),(!m||I&144&&a!==(a=D[4]||!D[7]))&&(r.disabled=a);const F={};u.$set(F);const R={};d.$set(R)},i(D){m||(A(s),A(u.$$.fragment,D),A(d.$$.fragment,D),m=!0)},o(D){L(s),L(u.$$.fragment,D),L(d.$$.fragment,D),m=!1},d(D){D&&k(e),y[i].d(),T.d(),D&&k(f),n[14](null),H(u,D),D&&k(c),n[16](null),H(d,D),_=!1,h()}}}function W8(n,e,t){let i,s,l=[],o=!1,r={},a={},f=!0;u(),_();async function u(){t(4,o=!0);try{t(3,l=await ue.backups.getFullList()),l.sort((M,O)=>M.modified<O.modified?1:M.modified>O.modified?-1:0),t(4,o=!1)}catch(M){M.isAbort||(ue.error(M),t(4,o=!1))}}async function c(M){if(!r[M]){t(5,r[M]=!0,r);try{const O=await ue.getAdminFileToken(),D=ue.backups.getDownloadUrl(O,M);z.download(D)}catch(O){O.isAbort||ue.error(O)}delete r[M],t(5,r)}}function d(M){dn(`Do you really want to delete ${M}?`,()=>m(M))}async function m(M){if(!a[M]){t(6,a[M]=!0,a);try{await ue.backups.delete(M),z.removeByKey(l,"name",M),u(),zt(`Successfully deleted ${M}.`)}catch(O){O.isAbort||ue.error(O)}delete a[M],t(6,a)}}async function _(){var M;try{const O=await ue.health.check({$autoCancel:!1}),D=f;t(7,f=((M=O==null?void 0:O.data)==null?void 0:M.canBackup)||!1),D!=f&&f&&u()}catch{}}Gt(()=>{let M=setInterval(()=>{_()},3e3);return()=>{clearInterval(M)}});const h=M=>c(M.key),g=M=>s.show(M.key),y=M=>d(M.key),S=()=>i==null?void 0:i.show();function $(M){ne[M?"unshift":"push"](()=>{i=M,t(1,i)})}const C=()=>{u()};function T(M){ne[M?"unshift":"push"](()=>{s=M,t(2,s)})}return[u,i,s,l,o,r,a,f,c,d,h,g,y,S,$,C,T]}class Y8 extends ve{constructor(e){super(),be(this,e,W8,U8,me,{loadBackups:0})}get loadBackups(){return this.$$.ctx[0]}}function K8(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function J8(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function R_(n){var j,J,G;let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O;t=new ce({props:{class:"form-field form-field-toggle m-t-base m-b-0",$$slots:{default:[Z8,({uniqueId:Q})=>({32:Q}),({uniqueId:Q})=>[0,Q?2:0]]},$$scope:{ctx:n}}});let D=n[2]&&q_(n);function I(Q){n[25](Q)}function P(Q){n[26](Q)}function F(Q){n[27](Q)}let R={toggleLabel:"Store backups in S3 storage",testFilesystem:"backups",configKey:"backups.s3",originalConfig:(j=n[0].backups)==null?void 0:j.s3};n[1].backups.s3!==void 0&&(R.config=n[1].backups.s3),n[7]!==void 0&&(R.isTesting=n[7]),n[8]!==void 0&&(R.testError=n[8]),r=new b1({props:R}),ne.push(()=>de(r,"config",I)),ne.push(()=>de(r,"isTesting",P)),ne.push(()=>de(r,"testError",F));let N=((G=(J=n[1].backups)==null?void 0:J.s3)==null?void 0:G.enabled)&&!n[9]&&!n[5]&&j_(n),q=n[9]&&z_(n);return{c(){e=v("form"),B(t.$$.fragment),i=E(),D&&D.c(),s=E(),l=v("div"),o=E(),B(r.$$.fragment),c=E(),d=v("div"),m=v("div"),_=E(),N&&N.c(),h=E(),q&&q.c(),g=E(),y=v("button"),S=v("span"),S.textContent="Save changes",p(l,"class","clearfix m-b-base"),p(m,"class","flex-fill"),p(S,"class","txt"),p(y,"type","submit"),p(y,"class","btn btn-expanded"),y.disabled=$=!n[9]||n[5],X(y,"btn-loading",n[5]),p(d,"class","flex"),p(e,"class","block"),p(e,"autocomplete","off")},m(Q,K){w(Q,e,K),V(t,e,null),b(e,i),D&&D.m(e,null),b(e,s),b(e,l),b(e,o),V(r,e,null),b(e,c),b(e,d),b(d,m),b(d,_),N&&N.m(d,null),b(d,h),q&&q.m(d,null),b(d,g),b(d,y),b(y,S),T=!0,M||(O=[Y(y,"click",n[29]),Y(e,"submit",Xe(n[11]))],M=!0)},p(Q,K){var te,Ee,Pe;const le={};K[0]&4|K[1]&6&&(le.$$scope={dirty:K,ctx:Q}),t.$set(le),Q[2]?D?(D.p(Q,K),K[0]&4&&A(D,1)):(D=q_(Q),D.c(),A(D,1),D.m(e,s)):D&&(ae() Line truncated
to confirm:`),c=E(),d=v("form"),B(m.$$.fragment),p(e,"class","alert alert-danger"),p(o,"class","txt"),p(l,"class","label"),p(i,"class","content m-b-sm"),p(d,"id",n[6]),p(d,"autocomplete","off")},m(y,S){w(y,e,S),w(y,t,S),w(y,i,S),b(i,s),b(i,l),b(l,o),b(o,r),b(l,a),V(f,l,null),b(i,u),w(y,c,S),w(y,d,S),V(m,d,null),_=!0,h||(g=Y(d,"submit",Xe(n[7])),h=!0)},p(y,S){(!_||S&2)&&se(r,y[1]);const $={};S&2&&($.value=y[1]),f.$set($);const C={};S&49156&&(C.$$scope={dirty:S,ctx:y}),m.$set(C)},i(y){_||(A(f.$$.fragment,y),A(m.$$.fragment,y),_=!0)},o(y){L(f.$$.fragment,y),L(m.$$.fragment,y),_=!1},d(y){y&&k(e),y&&k(t),y&&k(i),H(f),y&&k(c),y&&k(d),H(m),h=!1,g()}}}function F8(n){let e,t,i,s;return{c(){e=v("h4"),t=U("Restore "),i=v("strong"),s=U(n[1]),p(e,"class","center txt-break")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(i,s)},p(l,o){o&2&&se(s,l[1])},d(l){l&&k(e)}}}function N8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Cancel"),i=E(),s=v("button"),l=v("span"),l.textContent="Restore backup",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],X(s,"btn-loading",n[4])},m(f,u){w(f,e,u),b(e,t),w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"click",n[0]),r=!0)},p(f,u){u&16&&(e.disabled=f[4]),u&48&&o!==(o=!f[5]||f[4])&&(s.disabled=o),u&16&&X(s,"btn-loading",f[4])},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function R8(n){let e,t,i={class:"backup-restore-panel",overlayClose:!n[4],escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[N8],header:[F8],default:[P8]},$$scope:{ctx:n}};return e=new nn({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[10]),l&32822&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[11](null),H(e,s)}}}function q8(n,e,t){let i;const s="backup_restore_"+j.randomString(5);let l,o="",r="",a=!1;function f(y){xt({}),t(2,r=""),t(1,o=y),t(4,a=!1),l==null||l.show()}function u(){return l==null?void 0:l.hide()}async function c(){var y;if(!(!i||a)){t(4,a=!0);try{await ue.backups.restore(o),setTimeout(()=>{window.location.reload()},1e3)}catch(S){S!=null&&S.isAbort||(t(4,a=!1),$s(((y=S.response)==null?void 0:y.message)||S.message))}}}function d(){r=this.value,t(2,r)}const m=()=>!a;function _(y){ne[y?"unshift":"push"](()=>{l=y,t(3,l)})}function h(y){Fe.call(this,n,y)}function g(y){Fe.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=r!=""&&o==r)},[u,o,r,l,a,i,s,c,f,d,m,_,h,g]}class j8 extends ve{constructor(e){super(),be(this,e,q8,R8,me,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function I_(n,e,t){const i=n.slice();return i[22]=e[t],i}function L_(n,e,t){const i=n.slice();return i[19]=e[t],i}function z8(n){let e=[],t=new Map,i,s,l=n[3];const o=a=>a[22].key;for(let a=0;a<l.length;a+=1){let f=I_(n,l,a),u=o(f);t.set(u,e[a]=F_(u,f))}let r=null;return l.length||(r=P_()),{c(){for(let a=0;a<e.length;a+=1)e[a].c();i=ye(),r&&r.c()},m(a,f){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(a,f);w(a,i,f),r&&r.m(a,f),s=!0},p(a,f){f&876&&(l=a[3],ae(),e=vt(e,f,o,1,a,l,t,i.parentNode,Ht,F_,i,I_),fe(),!l.length&&r?r.p(a,f):l.length?r&&(r.d(1),r=null):(r=P_(),r.c(),r.m(i.parentNode,i)))},i(a){if(!s){for(let f=0;f<l.length;f+=1)A(e[f]);s=!0}},o(a){for(let f=0;f<e.length;f+=1)L(e[f]);s=!1},d(a){for(let f=0;f<e.length;f+=1)e[f].d(a);a&&k(i),r&&r.d(a)}}}function V8(n){let e,t=Array(n[3].length||1),i=[];for(let s=0;s<t.length;s+=1)i[s]=N_(L_(n,t,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=ye()},m(s,l){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(s,l);w(s,e,l)},p(s,l){if(l&8){t=Array(s[3].length||1);let o;for(o=0;o<t.length;o+=1){const r=L_(s,t,o);i[o]?i[o].p(r,l):(i[o]=N_(),i[o].c(),i[o].m(e.parentNode,e))}for(;o<i.length;o+=1)i[o].d(1);i.length=t.length}},i:ee,o:ee,d(s){_t(i,s),s&&k(e)}}}function P_(n){let e;return{c(){e=v("div"),e.innerHTML=`<span class="txt">No backups yet.</span>
`,p(e,"class","list-item list-item-placeholder svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function F_(n,e){let t,i,s,l,o,r=e[22].key+"",a,f,u,c,d=j.formattedFileSize(e[22].size)+"",m,_,h,g,y,S,$,C,T,M,O,D,I,P,F,R,N,q,z,J;function G(){return e[10](e[22])}function Q(){return e[11](e[22])}function K(){return e[12](e[22])}return{key:n,first:null,c(){t=v("div"),i=v("i"),s=E(),l=v("div"),o=v("span"),a=U(r),f=E(),u=v("span"),c=U("("),m=U(d),_=U(")"),h=E(),g=v("div"),y=v("button"),S=v("i"),C=E(),T=v("button"),M=v("i"),D=E(),I=v("button"),P=v("i"),R=E(),p(i,"class","ri-folder-zip-line"),p(o,"class","name backup-name svelte-1ulbkf5"),p(u,"class","size txt-hint txt-nowrap"),p(l,"class","content"),p(S,"class","ri-download-line"),p(y,"type","button"),p(y,"class","btn btn-sm btn-circle btn-hint btn-transparent"),y.disabled=$=e[6][e[22].key]||e[5][e[22].key],p(y,"aria-label","Download"),X(y,"btn-loading",e[5][e[22].key]),p(M,"class","ri-restart-line"),p(T,"type","button"),p(T,"class","btn btn-sm btn-circle btn-hint btn-transparent"),T.disabled=O=e[6][e[22].key],p(T,"aria-label","Restore"),p(P,"class","ri-delete-bin-7-line"),p(I,"type","button"),p(I,"class","btn btn-sm btn-circle btn-hint btn-transparent"),I.disabled=F=e[6][e[22].key],p(I,"aria-label","Delete"),X(I,"btn-loading",e[6][e[22].key]),p(g,"class","actions nonintrusive"),p(t,"class","list-item svelte-1ulbkf5"),this.first=t},m(le,x){w(le,t,x),b(t,i),b(t,s),b(t,l),b(l,o),b(o,a),b(l,f),b(l,u),b(u,c),b(u,m),b(u,_),b(t,h),b(t,g),b(g,y),b(y,S),b(g,C),b(g,T),b(T,M),b(g,D),b(g,I),b(I,P),b(t,R),q=!0,z||(J=[Ce(ze.call(null,y,"Download")),Y(y,"click",Xe(G)),Ce(ze.call(null,T,"Restore")),Y(T,"click",Xe(Q)),Ce(ze.call(null,I,"Delete")),Y(I,"click",Xe(K))],z=!0)},p(le,x){e=le,(!q||x&8)&&r!==(r=e[22].key+"")&&se(a,r),(!q||x&8)&&d!==(d=j.formattedFileSize(e[22].size)+"")&&se(m,d),(!q||x&104&&$!==($=e[6][e[22].key]||e[5][e[22].key]))&&(y.disabled=$),(!q||x&40)&&X(y,"btn-loading",e[5][e[22].key]),(!q||x&72&&O!==(O=e[6][e[22].key]))&&(T.disabled=O),(!q||x&72&&F!==(F=e[6][e[22].key]))&&(I.disabled=F),(!q||x&72)&&X(I,"btn-loading",e[6][e[22].key])},i(le){q||(le&&Ge(()=>{q&&(N||(N=Re(t,tt,{duration:150},!0)),N.run(1))}),q=!0)},o(le){le&&(N||(N=Re(t,tt,{duration:150},!1)),N.run(0)),q=!1},d(le){le&&k(t),le&&N&&N.end(),z=!1,Me(J)}}}function N_(n){let e;return{c(){e=v("div"),e.innerHTML=`<span class="skeleton-loader"></span>
`,p(e,"class","list-item list-item-loader svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function H8(n){let e,t,i;return{c(){e=v("span"),t=E(),i=v("span"),i.textContent="Backup/restore operation is in process",p(e,"class","loader loader-sm"),p(i,"class","txt")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function B8(n){let e,t,i;return{c(){e=v("i"),t=E(),i=v("span"),i.textContent="Initialize new backup",p(e,"class","ri-play-circle-line"),p(i,"class","txt")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function U8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h;const g=[V8,z8],y=[];function S(D,I){return D[4]?0:1}i=S(n),s=y[i]=g[i](n);function $(D,I){return D[7]?B8:H8}let C=$(n),T=C(n),M={};u=new I8({props:M}),n[14](u),u.$on("submit",n[15]);let O={};return d=new j8({props:O}),n[16](d),{c(){e=v("div"),t=v("div"),s.c(),l=E(),o=v("div"),r=v("button"),T.c(),f=E(),B(u.$$.fragment),c=E(),B(d.$$.fragment),p(t,"class","list-content svelte-1ulbkf5"),p(r,"type","button"),p(r,"class","btn btn-block btn-transparent"),r.disabled=a=n[4]||!n[7],p(o,"class","list-item list-item-btn"),p(e,"class","list list-compact")},m(D,I){w(D,e,I),b(e,t),y[i].m(t,null),b(e,l),b(e,o),b(o,r),T.m(r,null),w(D,f,I),V(u,D,I),w(D,c,I),V(d,D,I),m=!0,_||(h=Y(r,"click",n[13]),_=!0)},p(D,[I]){let P=i;i=S(D),i===P?y[i].p(D,I):(ae(),L(y[P],1,1,()=>{y[P]=null}),fe(),s=y[i],s?s.p(D,I):(s=y[i]=g[i](D),s.c()),A(s,1),s.m(t,null)),C!==(C=$(D))&&(T.d(1),T=C(D),T&&(T.c(),T.m(r,null))),(!m||I&144&&a!==(a=D[4]||!D[7]))&&(r.disabled=a);const F={};u.$set(F);const R={};d.$set(R)},i(D){m||(A(s),A(u.$$.fragment,D),A(d.$$.fragment,D),m=!0)},o(D){L(s),L(u.$$.fragment,D),L(d.$$.fragment,D),m=!1},d(D){D&&k(e),y[i].d(),T.d(),D&&k(f),n[14](null),H(u,D),D&&k(c),n[16](null),H(d,D),_=!1,h()}}}function W8(n,e,t){let i,s,l=[],o=!1,r={},a={},f=!0;u(),_();async function u(){t(4,o=!0);try{t(3,l=await ue.backups.getFullList()),l.sort((M,O)=>M.modified<O.modified?1:M.modified>O.modified?-1:0),t(4,o=!1)}catch(M){M.isAbort||(ue.error(M),t(4,o=!1))}}async function c(M){if(!r[M]){t(5,r[M]=!0,r);try{const O=await ue.getAdminFileToken(),D=ue.backups.getDownloadUrl(O,M);j.download(D)}catch(O){O.isAbort||ue.error(O)}delete r[M],t(5,r)}}function d(M){dn(`Do you really want to delete ${M}?`,()=>m(M))}async function m(M){if(!a[M]){t(6,a[M]=!0,a);try{await ue.backups.delete(M),j.removeByKey(l,"name",M),u(),zt(`Successfully deleted ${M}.`)}catch(O){O.isAbort||ue.error(O)}delete a[M],t(6,a)}}async function _(){var M;try{const O=await ue.health.check({$autoCancel:!1}),D=f;t(7,f=((M=O==null?void 0:O.data)==null?void 0:M.canBackup)||!1),D!=f&&f&&u()}catch{}}Gt(()=>{let M=setInterval(()=>{_()},3e3);return()=>{clearInterval(M)}});const h=M=>c(M.key),g=M=>s.show(M.key),y=M=>d(M.key),S=()=>i==null?void 0:i.show();function $(M){ne[M?"unshift":"push"](()=>{i=M,t(1,i)})}const C=()=>{u()};function T(M){ne[M?"unshift":"push"](()=>{s=M,t(2,s)})}return[u,i,s,l,o,r,a,f,c,d,h,g,y,S,$,C,T]}class Y8 extends ve{constructor(e){super(),be(this,e,W8,U8,me,{loadBackups:0})}get loadBackups(){return this.$$.ctx[0]}}function K8(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function J8(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function R_(n){var z,J,G;let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O;t=new ce({props:{class:"form-field form-field-toggle m-t-base m-b-0",$$slots:{default:[Z8,({uniqueId:Q})=>({32:Q}),({uniqueId:Q})=>[0,Q?2:0]]},$$scope:{ctx:n}}});let D=n[2]&&q_(n);function I(Q){n[25](Q)}function P(Q){n[26](Q)}function F(Q){n[27](Q)}let R={toggleLabel:"Store backups in S3 storage",testFilesystem:"backups",configKey:"backups.s3",originalConfig:(z=n[0].backups)==null?void 0:z.s3};n[1].backups.s3!==void 0&&(R.config=n[1].backups.s3),n[7]!==void 0&&(R.isTesting=n[7]),n[8]!==void 0&&(R.testError=n[8]),r=new b1({props:R}),ne.push(()=>de(r,"config",I)),ne.push(()=>de(r,"isTesting",P)),ne.push(()=>de(r,"testError",F));let N=((G=(J=n[1].backups)==null?void 0:J.s3)==null?void 0:G.enabled)&&!n[9]&&!n[5]&&j_(n),q=n[9]&&z_(n);return{c(){e=v("form"),B(t.$$.fragment),i=E(),D&&D.c(),s=E(),l=v("div"),o=E(),B(r.$$.fragment),c=E(),d=v("div"),m=v("div"),_=E(),N&&N.c(),h=E(),q&&q.c(),g=E(),y=v("button"),S=v("span"),S.textContent="Save changes",p(l,"class","clearfix m-b-base"),p(m,"class","flex-fill"),p(S,"class","txt"),p(y,"type","submit"),p(y,"class","btn btn-expanded"),y.disabled=$=!n[9]||n[5],X(y,"btn-loading",n[5]),p(d,"class","flex"),p(e,"class","block"),p(e,"autocomplete","off")},m(Q,K){w(Q,e,K),V(t,e,null),b(e,i),D&&D.m(e,null),b(e,s),b(e,l),b(e,o),V(r,e,null),b(e,c),b(e,d),b(d,m),b(d,_),N&&N.m(d,null),b(d,h),q&&q.m(d,null),b(d,g),b(d,y),b(y,S),T=!0,M||(O=[Y(y,"click",n[29]),Y(e,"submit",Xe(n[11]))],M=!0)},p(Q,K){var te,Ee,Pe;const le={};K[0]&4|K[1]&6&&(le.$$scope={dirty:K,ctx:Q}),t.$set(le),Q[2]?D?(D.p(Q,K),K[0]&4&&A(D,1)):(D=q_(Q),D.c(),A(D,1),D.m(e,s)):D&&(ae() Line truncated
UTC.</p>`,p(e,"for",i=n[32]),l.required=!0,p(l,"type","text"),p(l,"id",o=n[32]),p(l,"class","txt-lg txt-mono"),p(l,"placeholder","* * * * *"),l.autofocus=r=!((M=(T=n[0])==null?void 0:T.backups)!=null&&M.cron),p(c,"class","txt"),p(m,"class","ri-arrow-drop-down-fill"),p(u,"type","button"),p(u,"class","btn btn-sm btn-outline p-r-0"),p(f,"class","form-field-addon"),p(y,"class","help-block")},m(T,M){var O,D;w(T,e,M),b(e,t),w(T,s,M),w(T,l,M),re(l,n[1].backups.cron),w(T,a,M),w(T,f,M),b(f,u),b(u,c),b(u,d),b(u,m),b(u,_),V(h,u,null),w(T,g,M),w(T,y,M),S=!0,(D=(O=n[0])==null?void 0:O.backups)!=null&&D.cron||l.focus(),$||(C=Y(l,"input",n[19]),$=!0)},p(T,M){var D,I;(!S||M[1]&2&&i!==(i=T[32]))&&p(e,"for",i),(!S||M[1]&2&&o!==(o=T[32]))&&p(l,"id",o),(!S||M[0]&1&&r!==(r=!((I=(D=T[0])==null?void 0:D.backups)!=null&&I.cron)))&&(l.autofocus=r),M[0]&2&&l.value!==T[1].backups.cron&&re(l,T[1].backups.cron);const O={};M[0]&2|M[1]&4&&(O.$$scope={dirty:M,ctx:T}),h.$set(O)},i(T){S||(A(h.$$.fragment,T),S=!0)},o(T){L(h.$$.fragment,T),S=!1},d(T){T&&k(e),T&&k(s),T&&k(l),T&&k(a),T&&k(f),H(h),T&&k(g),T&&k(y),$=!1,C()}}}function Q8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max @auto backups to keep"),s=E(),l=v("input"),p(e,"for",i=n[32]),p(l,"type","number"),p(l,"id",o=n[32]),p(l,"min","1")},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),re(l,n[1].backups.cronMaxKeep),r||(a=Y(l,"input",n[24]),r=!0)},p(f,u){u[1]&2&&i!==(i=f[32])&&p(e,"for",i),u[1]&2&&o!==(o=f[32])&&p(l,"id",o),u[0]&2&&pt(l.value)!==f[1].backups.cronMaxKeep&&re(l,f[1].backups.cronMaxKeep)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function j_(n){let e;function t(l,o){return l[7]?tI:l[8]?eI:x8}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function x8(n){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-checkbox-circle-line txt-success"></i>
<span class="txt">S3 connected successfully</span>`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function eI(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;w(l,e,o),i||(s=Ce(t=ze.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&qt(t.update)&&o[0]&256&&t.update.call(null,(r=l[8].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function tI(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function z_(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","submit"),p(e,"class","btn btn-hint btn-transparent"),e.disabled=i=!n[9]||n[5]},m(o,r){w(o,e,r),b(e,t),s||(l=Y(e,"click",n[28]),s=!0)},p(o,r){r[0]&544&&i!==(i=!o[9]||o[5])&&(e.disabled=i)},d(o){o&&k(e),s=!1,l()}}}function nI(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I;m=new Wo({props:{class:"btn-sm",tooltip:"Reload backups list"}}),m.$on("refresh",n[15]);let P={};h=new Y8({props:P}),n[16](h);function F(j,J){return j[6]?J8:K8}let R=F(n),N=R(n),q=n[6]&&!n[4]&&R_(n);return{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[10]),r=E(),a=v("div"),f=v("div"),u=v("div"),c=v("span"),c.textContent="Backup and restore your PocketBase data",d=E(),B(m.$$.fragment),_=E(),B(h.$$.fragment),g=E(),y=v("hr"),S=E(),$=v("button"),C=v("span"),C.textContent="Backups options",T=E(),N.c(),M=E(),q&&q.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(c,"class","txt-xl"),p(u,"class","flex m-b-sm flex-gap-5"),p(C,"class","txt"),p($,"type","button"),p($,"class","btn btn-secondary"),$.disabled=n[4],X($,"btn-loading",n[4]),p(f,"class","panel"),p(f,"autocomplete","off"),p(a,"class","wrapper")},m(j,J){w(j,e,J),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(j,r,J),w(j,a,J),b(a,f),b(f,u),b(u,c),b(u,d),V(m,u,null),b(f,_),V(h,f,null),b(f,g),b(f,y),b(f,S),b(f,$),b($,C),b($,T),N.m($,null),b(f,M),q&&q.m(f,null),O=!0,D||(I=[Y($,"click",n[17]),Y(f,"submit",Xe(n[11]))],D=!0)},p(j,J){(!O||J[0]&1024)&&se(o,j[10]);const G={};h.$set(G),R!==(R=F(j))&&(N.d(1),N=R(j),N&&(N.c(),N.m($,null))),(!O||J[0]&16)&&($.disabled=j[4]),(!O||J[0]&16)&&X($,"btn-loading",j[4]),j[6]&&!j[4]?q?(q.p(j,J),J[0]&80&&A(q,1)):(q=R_(j),q.c(),A(q,1),q.m(f,null)):q&&(ae(),L(q,1,1,()=>{q=null}),fe())},i(j){O||(A(m.$$.fragment,j),A(h.$$.fragment,j),A(q),O=!0)},o(j){L(m.$$.fragment,j),L(h.$$.fragment,j),L(q),O=!1},d(j){j&&k(e),j&&k(r),j&&k(a),H(m),n[16](null),H(h),N.d(),q&&q.d(),D=!1,Me(I)}}}function iI(n){let e,t,i,s;return e=new Ti({}),i=new kn({props:{$$slots:{default:[nI]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,o){const r={};o[0]&2047|o[1]&4&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&k(t),H(i,l)}}}function sI(n,e,t){let i,s;We(n,Et,K=>t(10,s=K)),tn(Et,s="Backups",s);let l,o={},r={},a=!1,f=!1,u="",c=!1,d=!1,m=!1,_=null;h();async function h(){t(4,a=!0);try{const K=await ue.settings.getAll()||{};y(K)}catch(K){ue.error(K)}t(4,a=!1)}async function g(){if(!(f||!i)){t(5,f=!0);try{const K=await ue.settings.update(z.filterRedactedProps(r));await $(),y(K),zt("Successfully saved application settings.")}catch(K){ue.error(K)}t(5,f=!1)}}function y(K={}){t(1,r={backups:(K==null?void 0:K.backups)||{}}),t(2,c=r.backups.cron!=""),t(0,o=JSON.parse(JSON.stringify(r)))}function S(){t(1,r=JSON.parse(JSON.stringify(o||{backups:{}}))),t(2,c=r.backups.cron!="")}async function $(){await(l==null?void 0:l.loadBackups())}const C=()=>$();function T(K){ne[K?"unshift":"push"](()=>{l=K,t(3,l)})}const M=()=>t(6,d=!d);function O(){c=this.checked,t(2,c)}function D(){r.backups.cron=this.value,t(1,r),t(2,c)}const I=()=>{t(1,r.backups.cron="0 0 * * *",r)},P=()=>{t(1,r.backups.cron="0 0 * * 0",r)},F=()=>{t(1,r.backups.cron="0 0 * * 1,3",r)},R=()=>{t(1,r.backups.cron="0 0 1 * *",r)};function N(){r.backups.cronMaxKeep=pt(this.value),t(1,r),t(2,c)}function q(K){n.$$.not_equal(r.backups.s3,K)&&(r.backups.s3=K,t(1,r),t(2,c))}function j(K){m=K,t(7,m)}function J(K){_=K,t(8,_)}const G=()=>S(),Q=()=>g();return n.$$.update=()=>{var K;n.$$.dirty[0]&1&&t(14,u=JSON.stringify(o)),n.$$.dirty[0]&6&&!c&&(K=r==null?void 0:r.backups)!=null&&K.cron&&(ci("backups.cron"),t(1,r.backups.cron="",r)),n.$$.dirty[0]&16386&&t(9,i=u!=JSON.stringify(r))},[o,r,c,l,a,f,d,m,_,i,s,g,S,$,u,C,T,M,O,D,I,P,F,R,N,q,j,J,G,Q]}class lI extends ve{constructor(e){super(),be(this,e,sI,iI,me,{},null,[-1,-1])}}const jt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?qi("/"):!0}],oI={"/login":It({component:uD,conditions:jt.concat([n=>!ue.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":It({asyncComponent:()=>ot(()=>import("./PageAdminRequestPasswordReset-eeda3323.js"),[],import.meta.url),conditions:jLine truncated
<span class="txt">Failed to establish S3 connection</span>`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Ce(t=ze.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&qt(t.update)&&o[0]&256&&t.update.call(null,(r=l[8].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function tI(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:ee,d(t){t&&k(e)}}}function z_(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","submit"),p(e,"class","btn btn-hint btn-transparent"),e.disabled=i=!n[9]||n[5]},m(o,r){w(o,e,r),b(e,t),s||(l=Y(e,"click",n[28]),s=!0)},p(o,r){r[0]&544&&i!==(i=!o[9]||o[5])&&(e.disabled=i)},d(o){o&&k(e),s=!1,l()}}}function nI(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,$,C,T,M,O,D,I;m=new Wo({props:{class:"btn-sm",tooltip:"Reload backups list"}}),m.$on("refresh",n[15]);let P={};h=new Y8({props:P}),n[16](h);function F(z,J){return z[6]?J8:K8}let R=F(n),N=R(n),q=n[6]&&!n[4]&&R_(n);return{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[10]),r=E(),a=v("div"),f=v("div"),u=v("div"),c=v("span"),c.textContent="Backup and restore your PocketBase data",d=E(),B(m.$$.fragment),_=E(),B(h.$$.fragment),g=E(),y=v("hr"),S=E(),$=v("button"),C=v("span"),C.textContent="Backups options",T=E(),N.c(),M=E(),q&&q.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(c,"class","txt-xl"),p(u,"class","flex m-b-sm flex-gap-5"),p(C,"class","txt"),p($,"type","button"),p($,"class","btn btn-secondary"),$.disabled=n[4],X($,"btn-loading",n[4]),p(f,"class","panel"),p(f,"autocomplete","off"),p(a,"class","wrapper")},m(z,J){w(z,e,J),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(z,r,J),w(z,a,J),b(a,f),b(f,u),b(u,c),b(u,d),V(m,u,null),b(f,_),V(h,f,null),b(f,g),b(f,y),b(f,S),b(f,$),b($,C),b($,T),N.m($,null),b(f,M),q&&q.m(f,null),O=!0,D||(I=[Y($,"click",n[17]),Y(f,"submit",Xe(n[11]))],D=!0)},p(z,J){(!O||J[0]&1024)&&se(o,z[10]);const G={};h.$set(G),R!==(R=F(z))&&(N.d(1),N=R(z),N&&(N.c(),N.m($,null))),(!O||J[0]&16)&&($.disabled=z[4]),(!O||J[0]&16)&&X($,"btn-loading",z[4]),z[6]&&!z[4]?q?(q.p(z,J),J[0]&80&&A(q,1)):(q=R_(z),q.c(),A(q,1),q.m(f,null)):q&&(ae(),L(q,1,1,()=>{q=null}),fe())},i(z){O||(A(m.$$.fragment,z),A(h.$$.fragment,z),A(q),O=!0)},o(z){L(m.$$.fragment,z),L(h.$$.fragment,z),L(q),O=!1},d(z){z&&k(e),z&&k(r),z&&k(a),H(m),n[16](null),H(h),N.d(),q&&q.d(),D=!1,Me(I)}}}function iI(n){let e,t,i,s;return e=new Ti({}),i=new kn({props:{$$slots:{default:[nI]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment),t=E(),B(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,o){const r={};o[0]&2047|o[1]&4&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&k(t),H(i,l)}}}function sI(n,e,t){let i,s;We(n,Et,K=>t(10,s=K)),tn(Et,s="Backups",s);let l,o={},r={},a=!1,f=!1,u="",c=!1,d=!1,m=!1,_=null;h();async function h(){t(4,a=!0);try{const K=await ue.settings.getAll()||{};y(K)}catch(K){ue.error(K)}t(4,a=!1)}async function g(){if(!(f||!i)){t(5,f=!0);try{const K=await ue.settings.update(j.filterRedactedProps(r));await $(),y(K),zt("Successfully saved application settings.")}catch(K){ue.error(K)}t(5,f=!1)}}function y(K={}){t(1,r={backups:(K==null?void 0:K.backups)||{}}),t(2,c=r.backups.cron!=""),t(0,o=JSON.parse(JSON.stringify(r)))}function S(){t(1,r=JSON.parse(JSON.stringify(o||{backups:{}}))),t(2,c=r.backups.cron!="")}async function $(){await(l==null?void 0:l.loadBackups())}const C=()=>$();function T(K){ne[K?"unshift":"push"](()=>{l=K,t(3,l)})}const M=()=>t(6,d=!d);function O(){c=this.checked,t(2,c)}function D(){r.backups.cron=this.value,t(1,r),t(2,c)}const I=()=>{t(1,r.backups.cron="0 0 * * *",r)},P=()=>{t(1,r.backups.cron="0 0 * * 0",r)},F=()=>{t(1,r.backups.cron="0 0 * * 1,3",r)},R=()=>{t(1,r.backups.cron="0 0 1 * *",r)};function N(){r.backups.cronMaxKeep=pt(this.value),t(1,r),t(2,c)}function q(K){n.$$.not_equal(r.backups.s3,K)&&(r.backups.s3=K,t(1,r),t(2,c))}function z(K){m=K,t(7,m)}function J(K){_=K,t(8,_)}const G=()=>S(),Q=()=>g();return n.$$.update=()=>{var K;n.$$.dirty[0]&1&&t(14,u=JSON.stringify(o)),n.$$.dirty[0]&6&&!c&&(K=r==null?void 0:r.backups)!=null&&K.cron&&(ci("backups.cron"),t(1,r.backups.cron="",r)),n.$$.dirty[0]&16386&&t(9,i=u!=JSON.stringify(r))},[o,r,c,l,a,f,d,m,_,i,s,g,S,$,u,C,T,M,O,D,I,P,F,R,N,q,z,J,G,Q]}class lI extends ve{constructor(e){super(),be(this,e,sI,iI,me,{},null,[-1,-1])}}const jt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?qi("/"):!0}],oI={"/login":It({component:uD,conditions:jt.concat([n=>!ue.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":It({asyncComponent:()=>ot(()=>import("./PageAdminRequestPasswordReset-9a33efa2.js"),[],import.meta.url),conditions:jLine truncated
<span class="txt">Manage admins</span>`,t=E(),i=v("hr"),s=E(),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,f){w(a,e,f),w(a,t,f),w(a,i,f),w(a,s,f),w(a,l,f),o||(r=[Ce(ln.call(null,e)),Y(l,"click",n[7])],o=!0)},p:ee,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,Me(r)}}}function U_(n){let e,t,i;return t=new lf({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:z.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=v("div"),B(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p:ee,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),H(t)}}}function kI(n){var g;let e,t,i,s,l,o,r,a,f,u,c,d,m;document.title=e=z.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let _=((g=n[0])==null?void 0:g.id)&&n[1]&&B_(n);o=new t0({props:{routes:oI}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new mI({}),u=new vI({});let h=n[1]&&!n[2]&&U_(n);return{c(){t=E(),i=v("div"),_&&_.c(),s=E(),l=v("div"),B(o.$$.fragment),r=E(),B(a.$$.fragment),f=E(),B(u.$$.fragment),c=E(),h&&h.c(),d=ye(),p(l,"class","app-body"),p(i,"class","app-layout")},m(y,S){w(y,t,S),w(y,i,S),_&&_.m(i,null),b(i,s),b(i,l),V(o,l,null),b(l,r),V(a,l,null),w(y,f,S),V(u,y,S),w(y,c,S),h&&h.m(y,S),w(y,d,S),m=!0},p(y,[S]){var $;(!m||S&24)&&e!==(e=z.joinNonEmpty([y[4],y[3],"PocketBase"]," - "))&&(document.title=e),($=y[0])!=null&&$.id&&y[1]?_?(_.p(y,S),S&3&&A(_,1)):(_=B_(y),_.c(),A(_,1),_.m(i,s)):_&&(ae(),L(_,1,1,()=>{_=null}),fe()),y[1]&&!y[2]?h?(h.p(y,S),S&6&&A(h,1)):(h=U_(y),h.c(),A(h,1),h.m(d.parentNode,d)):h&&(ae(),L(h,1,1,()=>{h=null}),fe())},i(y){m||(A(_),A(o.$$.fragment,y),A(a.$$.fragment,y),A(u.$$.fragment,y),A(h),m=!0)},o(y){L(_),L(o.$$.fragment,y),L(a.$$.fragment,y),L(u.$$.fragment,y),L(h),m=!1},d(y){y&&k(t),y&&k(i),_&&_.d(),H(o),H(a),y&&k(f),H(u,y),y&&k(c),h&&h.d(y),y&&k(d)}}}function wI(n,e,t){let i,s,l,o;We(n,Ts,h=>t(10,i=h)),We(n,vo,h=>t(3,s=h)),We(n,Oa,h=>t(0,l=h)),We(n,Et,h=>t(4,o=h));let r,a=!1,f=!1;function u(h){var g,y,S,$;((g=h==null?void 0:h.detail)==null?void 0:g.location)!==r&&(t(1,a=!!((S=(y=h==null?void 0:h.detail)==null?void 0:y.userData)!=null&&S.showAppSidebar)),r=($=h==null?void 0:h.detail)==null?void 0:$.location,tn(Et,o="",o),xt({}),u1())}function c(){qi("/")}async function d(){var h,g;if(l!=null&&l.id)try{const y=await ue.settings.getAll({$cancelKey:"initialAppSettings"});tn(vo,s=((h=y==null?void 0:y.meta)==null?void 0:h.appName)||"",s),tn(Ts,i=!!((g=y==null?void 0:y.meta)!=null&&g.hideControls),i)}catch(y){y!=null&&y.isAbort||console.warn("Failed to load app settings.",y)}}function m(){ue.logout()}const _=()=>{t(2,f=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&d()},[l,a,f,s,o,u,c,m,_]}class SI extends ve{constructor(e){super(),be(this,e,wI,kI,me,{})}}new SI({target:document.getElementById("app")});export{Me as A,zt as B,z as C,qi as D,ye as E,ab as F,Ro as G,io as H,Gt as I,We as J,ni as K,wt as L,ne as M,a1 as N,vt as O,ls as P,Ht as Q,_t as R,ve as S,Nr as T,L as a,E as b,B as c,H as d,v as e,p as f,w as g,b as h,be as i,Ce as j,ae as k,ln as l,V as m,fe as n,k as o,ue as p,ce as q,X as r,me as s,A as t,Y as u,Xe as v,U as w,se as x,ee as y,re 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,f){w(a,e,f),w(a,t,f),w(a,i,f),w(a,s,f),w(a,l,f),o||(r=[Ce(ln.call(null,e)),Y(l,"click",n[7])],o=!0)},p:ee,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,Me(r)}}}function U_(n){let e,t,i;return t=new lf({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:j.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=v("div"),B(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p:ee,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),H(t)}}}function kI(n){var g;let e,t,i,s,l,o,r,a,f,u,c,d,m;document.title=e=j.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let _=((g=n[0])==null?void 0:g.id)&&n[1]&&B_(n);o=new t0({props:{routes:oI}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new mI({}),u=new vI({});let h=n[1]&&!n[2]&&U_(n);return{c(){t=E(),i=v("div"),_&&_.c(),s=E(),l=v("div"),B(o.$$.fragment),r=E(),B(a.$$.fragment),f=E(),B(u.$$.fragment),c=E(),h&&h.c(),d=ye(),p(l,"class","app-body"),p(i,"class","app-layout")},m(y,S){w(y,t,S),w(y,i,S),_&&_.m(i,null),b(i,s),b(i,l),V(o,l,null),b(l,r),V(a,l,null),w(y,f,S),V(u,y,S),w(y,c,S),h&&h.m(y,S),w(y,d,S),m=!0},p(y,[S]){var $;(!m||S&24)&&e!==(e=j.joinNonEmpty([y[4],y[3],"PocketBase"]," - "))&&(document.title=e),($=y[0])!=null&&$.id&&y[1]?_?(_.p(y,S),S&3&&A(_,1)):(_=B_(y),_.c(),A(_,1),_.m(i,s)):_&&(ae(),L(_,1,1,()=>{_=null}),fe()),y[1]&&!y[2]?h?(h.p(y,S),S&6&&A(h,1)):(h=U_(y),h.c(),A(h,1),h.m(d.parentNode,d)):h&&(ae(),L(h,1,1,()=>{h=null}),fe())},i(y){m||(A(_),A(o.$$.fragment,y),A(a.$$.fragment,y),A(u.$$.fragment,y),A(h),m=!0)},o(y){L(_),L(o.$$.fragment,y),L(a.$$.fragment,y),L(u.$$.fragment,y),L(h),m=!1},d(y){y&&k(t),y&&k(i),_&&_.d(),H(o),H(a),y&&k(f),H(u,y),y&&k(c),h&&h.d(y),y&&k(d)}}}function wI(n,e,t){let i,s,l,o;We(n,Ts,h=>t(10,i=h)),We(n,vo,h=>t(3,s=h)),We(n,Oa,h=>t(0,l=h)),We(n,Et,h=>t(4,o=h));let r,a=!1,f=!1;function u(h){var g,y,S,$;((g=h==null?void 0:h.detail)==null?void 0:g.location)!==r&&(t(1,a=!!((S=(y=h==null?void 0:h.detail)==null?void 0:y.userData)!=null&&S.showAppSidebar)),r=($=h==null?void 0:h.detail)==null?void 0:$.location,tn(Et,o="",o),xt({}),u1())}function c(){qi("/")}async function d(){var h,g;if(l!=null&&l.id)try{const y=await ue.settings.getAll({$cancelKey:"initialAppSettings"});tn(vo,s=((h=y==null?void 0:y.meta)==null?void 0:h.appName)||"",s),tn(Ts,i=!!((g=y==null?void 0:y.meta)!=null&&g.hideControls),i)}catch(y){y!=null&&y.isAbort||console.warn("Failed to load app settings.",y)}}function m(){ue.logout()}const _=()=>{t(2,f=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&d()},[l,a,f,s,o,u,c,m,_]}class SI extends ve{constructor(e){super(),be(this,e,wI,kI,me,{})}}new SI({target:document.getElementById("app")});export{Me as A,zt as B,j as C,qi as D,ye as E,ab as F,Ro as G,io as H,Gt as I,We as J,ni as K,wt as L,ne as M,a1 as N,vt as O,ls as P,Ht as Q,_t as R,ve as S,Nr as T,L as a,E as b,B as c,H as d,v as e,p as f,w as g,b as h,be as i,Ce as j,ae as k,ln as l,V as m,fe as n,k as o,ue as p,ce as q,X as r,me as s,A as t,Y as u,Xe as v,U as w,se as x,ee as y,re as z};
+1 -1
View File
@@ -45,7 +45,7 @@
window.Prism = window.Prism || {};
window.Prism.manual = true;
</script>
<script type="module" crossorigin src="./assets/index-e9c07574.js"></script>
<script type="module" crossorigin src="./assets/index-b606ec56.js"></script>
<link rel="stylesheet" href="./assets/index-76391aa4.css">
</head>
<body>
+4 -3
View File
@@ -21,9 +21,10 @@
if (secret) {
secret = undefined;
} else {
secret = crypto?.randomUUID
? crypto.randomUUID() + CommonHelper.randomString(14)
: CommonHelper.randomString(50);
secret =
typeof crypto != "undefined" && crypto.randomUUID
? crypto.randomUUID() + CommonHelper.randomString(14)
: CommonHelper.randomString(50);
}
}}
>