diff --git a/ui/dist/assets/AuthMethodsDocs-89c0a52a.js b/ui/dist/assets/AuthMethodsDocs-89c0a52a.js new file mode 100644 index 00000000..973304f0 --- /dev/null +++ b/ui/dist/assets/AuthMethodsDocs-89c0a52a.js @@ -0,0 +1,64 @@ +import{S as Se,i as ye,s as Te,O as G,e as c,w,b as k,c as se,f as p,g as d,h as a,m as ae,x as U,P as ve,Q as je,k as Ae,R as Be,n as Oe,t as W,a as V,o as u,d as ne,C as Fe,p as Qe,r as L,u as Ne,N as He}from"./index-7d8498e9.js";import{S as Ke}from"./SdkTabs-36d454aa.js";import{F as qe}from"./FieldsQueryParam-594c3384.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l,o){const s=n.slice();return s[5]=l[o],s}function $e(n,l){let o,s=l[5].code+"",_,f,i,h;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),f=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,f),i||(h=Ne(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&U(_,s),C&6&&L(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,h()}}}function Me(n,l){let o,s,_,f;return s=new He({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),se(s.$$.fragment),_=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(i,h){d(i,o,h),ae(s,o,null),a(o,_),f=!0},p(i,h){l=i;const m={};h&4&&(m.content=l[5].body),s.$set(m),(!f||h&6)&&L(o,"active",l[1]===l[5].code)},i(i){f||(W(s.$$.fragment,i),f=!0)},o(i){V(s.$$.fragment,i),f=!1},d(i){i&&u(o),ne(s)}}}function ze(n){var be,ke;let l,o,s=n[0].name+"",_,f,i,h,m,v,C,H=n[0].name+"",E,ie,I,P,J,j,Y,$,K,ce,q,A,re,R,z=n[0].name+"",X,de,Z,B,x,M,ee,ue,te,T,le,O,oe,S,F,g=[],he=new Map,me,Q,b=[],fe=new Map,y;P=new Ke({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${n[3]}'); + + ... + + const result = await pb.collection('${(be=n[0])==null?void 0:be.name}').listAuthMethods(); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${n[3]}'); + + ... + + final result = await pb.collection('${(ke=n[0])==null?void 0:ke.name}').listAuthMethods(); + `}}),T=new qe({});let D=G(n[2]);const pe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description',ue=k(),te=c("tbody"),se(T.$$.fragment),le=k(),O=c("div"),O.textContent="Responses",oe=k(),S=c("div"),F=c("div");for(let e=0;eo(1,f=m.code);return n.$$set=m=>{"collection"in m&&o(0,_=m.collection)},o(3,s=Fe.getApiExampleUrl(Qe.baseUrl)),o(2,i=[{code:200,body:` + { + "usernamePassword": true, + "emailPassword": true, + "authProviders": [ + { + "name": "github", + "state": "3Yd8jNkK_6PJG6hPWwBjLqKwse6Ejd", + "codeVerifier": "KxFDWz1B3fxscCDJ_9gHQhLuh__ie7", + "codeChallenge": "NM1oVexB6Q6QH8uPtOUfK7tq4pmu4Jz6lNDIwoxHZNE=", + "codeChallengeMethod": "S256", + "authUrl": "https://github.com/login/oauth/authorize?client_id=demo&code_challenge=NM1oVexB6Q6QH8uPtOUfK7tq4pmu4Jz6lNDIwoxHZNE%3D&code_challenge_method=S256&response_type=code&scope=user&state=3Yd8jNkK_6PJG6hPWwBjLqKwse6Ejd&redirect_uri=" + }, + { + "name": "gitlab", + "state": "NeQSbtO5cShr_mk5__3CUukiMnymeb", + "codeVerifier": "ahTFHOgua8mkvPAlIBGwCUJbWKR_xi", + "codeChallenge": "O-GATkTj4eXDCnfonsqGLCd6njvTixlpCMvy5kjgOOg=", + "codeChallengeMethod": "S256", + "authUrl": "https://gitlab.com/oauth/authorize?client_id=demo&code_challenge=O-GATkTj4eXDCnfonsqGLCd6njvTixlpCMvy5kjgOOg%3D&code_challenge_method=S256&response_type=code&scope=read_user&state=NeQSbtO5cShr_mk5__3CUukiMnymeb&redirect_uri=" + }, + { + "name": "google", + "state": "zB3ZPifV1TW2GMuvuFkamSXfSNkHPQ", + "codeVerifier": "t3CmO5VObGzdXqieakvR_fpjiW0zdO", + "codeChallenge": "KChwoQPKYlz2anAdqtgsSTdIo8hdwtc1fh2wHMwW2Yk=", + "codeChallengeMethod": "S256", + "authUrl": "https://accounts.google.com/o/oauth2/auth?client_id=demo&code_challenge=KChwoQPKYlz2anAdqtgsSTdIo8hdwtc1fh2wHMwW2Yk%3D&code_challenge_method=S256&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&state=zB3ZPifV1TW2GMuvuFkamSXfSNkHPQ&redirect_uri=" + } + ] + } + `}]),[_,f,i,s,h]}class Ve extends Se{constructor(l){super(),ye(this,l,De,ze,Te,{collection:0})}}export{Ve as default}; diff --git a/ui/dist/assets/AuthMethodsDocs-bf9bb316.js b/ui/dist/assets/AuthMethodsDocs-bf9bb316.js deleted file mode 100644 index de328f36..00000000 --- a/ui/dist/assets/AuthMethodsDocs-bf9bb316.js +++ /dev/null @@ -1,66 +0,0 @@ -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-cc2b3041.js";import{S as He}from"./SdkTabs-cf23198f.js";import{F as Ke}from"./FieldsQueryParam-b174364f.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]}'); - - ... - - const result = await pb.collection('${(_e=n[0])==null?void 0:_e.name}').listAuthMethods(); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${n[3]}'); - - ... - - final result = await pb.collection('${(be=n[0])==null?void 0:be.name}').listAuthMethods(); - `}}),T=new Ke({});let D=n[2];const pe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam - Type - Description`,de=k(),ee=c("tbody"),oe(T.$$.fragment),te=k(),O=c("div"),O.textContent="Responses",le=k(),S=c("div"),F=c("div");for(let e=0;eo(1,p=m.code);return n.$$set=m=>{"collection"in m&&o(0,_=m.collection)},o(3,s=Oe.getApiExampleUrl(Fe.baseUrl)),o(2,i=[{code:200,body:` - { - "usernamePassword": true, - "emailPassword": true, - "authProviders": [ - { - "name": "github", - "state": "3Yd8jNkK_6PJG6hPWwBjLqKwse6Ejd", - "codeVerifier": "KxFDWz1B3fxscCDJ_9gHQhLuh__ie7", - "codeChallenge": "NM1oVexB6Q6QH8uPtOUfK7tq4pmu4Jz6lNDIwoxHZNE=", - "codeChallengeMethod": "S256", - "authUrl": "https://github.com/login/oauth/authorize?client_id=demo&code_challenge=NM1oVexB6Q6QH8uPtOUfK7tq4pmu4Jz6lNDIwoxHZNE%3D&code_challenge_method=S256&response_type=code&scope=user&state=3Yd8jNkK_6PJG6hPWwBjLqKwse6Ejd&redirect_uri=" - }, - { - "name": "gitlab", - "state": "NeQSbtO5cShr_mk5__3CUukiMnymeb", - "codeVerifier": "ahTFHOgua8mkvPAlIBGwCUJbWKR_xi", - "codeChallenge": "O-GATkTj4eXDCnfonsqGLCd6njvTixlpCMvy5kjgOOg=", - "codeChallengeMethod": "S256", - "authUrl": "https://gitlab.com/oauth/authorize?client_id=demo&code_challenge=O-GATkTj4eXDCnfonsqGLCd6njvTixlpCMvy5kjgOOg%3D&code_challenge_method=S256&response_type=code&scope=read_user&state=NeQSbtO5cShr_mk5__3CUukiMnymeb&redirect_uri=" - }, - { - "name": "google", - "state": "zB3ZPifV1TW2GMuvuFkamSXfSNkHPQ", - "codeVerifier": "t3CmO5VObGzdXqieakvR_fpjiW0zdO", - "codeChallenge": "KChwoQPKYlz2anAdqtgsSTdIo8hdwtc1fh2wHMwW2Yk=", - "codeChallengeMethod": "S256", - "authUrl": "https://accounts.google.com/o/oauth2/auth?client_id=demo&code_challenge=KChwoQPKYlz2anAdqtgsSTdIo8hdwtc1fh2wHMwW2Yk%3D&code_challenge_method=S256&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&state=zB3ZPifV1TW2GMuvuFkamSXfSNkHPQ&redirect_uri=" - } - ] - } - `}]),[_,p,i,s,f]}class We extends Me{constructor(l){super(),Se(this,l,ze,qe,ye,{collection:0})}}export{We as default}; diff --git a/ui/dist/assets/AuthRefreshDocs-76212dfb.js b/ui/dist/assets/AuthRefreshDocs-76212dfb.js deleted file mode 100644 index 27ada9c1..00000000 --- a/ui/dist/assets/AuthRefreshDocs-76212dfb.js +++ /dev/null @@ -1,82 +0,0 @@ -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-cc2b3041.js";import{S as Ye}from"./SdkTabs-cf23198f.js";import{F as Ze}from"./FieldsQueryParam-b174364f.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]}'); - - ... - - const authData = await pb.collection('${(qe=r[0])==null?void 0:qe.name}').authRefresh(); - - // after the above you can also access the refreshed auth data from the authStore - console.log(pb.authStore.isValid); - console.log(pb.authStore.token); - console.log(pb.authStore.model.id); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${r[3]}'); - - ... - - final authData = await pb.collection('${(De=r[0])==null?void 0:De.name}').authRefresh(); - - // after the above you can also access the refreshed auth data from the authStore - print(pb.authStore.isValid); - print(pb.authStore.token); - print(pb.authStore.model.id); - `}}),R=new Qe({props:{content:"?expand=relField1,relField2.subRelField"}}),A=new Ze({});let x=r[2];const Be=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eReturns a new auth response (token and record data) for an - already authenticated record.

-

This method is usually called by users on page/screen reload to ensure that the previously stored - data in pb.authStore is still valid and up-to-date.

`,v=p(),J($.$$.fragment),w=p(),M=s("h6"),M.textContent="API details",G=p(),S=s("div"),z=s("strong"),z.textContent="POST",de=p(),Q=s("div"),q=s("p"),ue=k("/api/collections/"),X=s("strong"),Y=k(U),pe=k("/auth-refresh"),fe=p(),j=s("p"),j.innerHTML="Requires record Authorization:TOKEN header",Z=p(),D=s("div"),D.textContent="Query parameters",ee=p(),T=s("table"),te=s("thead"),te.innerHTML=`Param - Type - Description`,he=p(),F=s("tbody"),C=s("tr"),oe=s("td"),oe.textContent="expand",be=p(),le=s("td"),le.innerHTML='String',me=p(),h=s("td"),_e=k(`Auto expand record relations. Ex.: - `),J(R.$$.fragment),ke=k(` - Supports up to 6-levels depth nested relations expansion. `),ve=s("br"),$e=k(` - The expanded relations will be appended to the record under the - `),ae=s("code"),ae.textContent="expand",ge=k(" property (eg. "),se=s("code"),se.textContent='"expand": {"relField1": {...}, ...}',ye=k(`). - `),Se=s("br"),we=k(` - Only the relations to which the request user has permissions to `),ne=s("strong"),ne.textContent="view",Te=k(" will be expanded."),Ce=p(),J(A.$$.fragment),re=p(),O=s("div"),O.textContent="Responses",ie=p(),P=s("div"),H=s("div");for(let e=0;ea(1,_=v.code);return r.$$set=v=>{"collection"in v&&a(0,m=v.collection)},r.$$.update=()=>{r.$$.dirty&1&&a(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:Ee.dummyCollectionRecord(m)},null,2)},{code:401,body:` - { - "code": 401, - "message": "The request requires valid record authorization token to be set.", - "data": {} - } - `},{code:403,body:` - { - "code": 403, - "message": "The authorized record model is not allowed to perform this action.", - "data": {} - } - `},{code:404,body:` - { - "code": 404, - "message": "Missing auth record context.", - "data": {} - } - `}])},a(3,n=Ee.getApiExampleUrl(Ge.baseUrl)),[m,_,i,n,f]}class st extends Ue{constructor(l){super(),je(this,l,tt,et,xe,{collection:0})}}export{st as default}; diff --git a/ui/dist/assets/AuthRefreshDocs-e0c8945f.js b/ui/dist/assets/AuthRefreshDocs-e0c8945f.js new file mode 100644 index 00000000..320975e5 --- /dev/null +++ b/ui/dist/assets/AuthRefreshDocs-e0c8945f.js @@ -0,0 +1,79 @@ +import{S as je,i as xe,s as Je,N as Ue,O as J,e as s,w as k,b as p,c as K,f as b,g as d,h as o,m as I,x as de,P as Ee,Q as Ke,k as Ie,R as We,n as Ge,t as N,a as V,o as u,d as W,C as Le,p as Xe,r as G,u as Ye}from"./index-7d8498e9.js";import{S as Ze}from"./SdkTabs-36d454aa.js";import{F as et}from"./FieldsQueryParam-594c3384.js";function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l,a){const n=r.slice();return n[5]=l[a],n}function ze(r,l){let a,n=l[5].code+"",m,_,i,h;function g(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(v,w){d(v,a,w),o(a,m),o(a,_),i||(h=Ye(a,"click",g),i=!0)},p(v,w){l=v,w&4&&n!==(n=l[5].code+"")&&de(m,n),w&6&&G(a,"active",l[1]===l[5].code)},d(v){v&&u(a),i=!1,h()}}}function Qe(r,l){let a,n,m,_;return n=new Ue({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),K(n.$$.fragment),m=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(i,h){d(i,a,h),I(n,a,null),o(a,m),_=!0},p(i,h){l=i;const g={};h&4&&(g.content=l[5].body),n.$set(g),(!_||h&6)&&G(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),W(n)}}}function tt(r){var De,Fe;let l,a,n=r[0].name+"",m,_,i,h,g,v,w,M,X,S,z,ue,Q,q,pe,Y,U=r[0].name+"",Z,he,fe,j,ee,D,te,T,oe,be,F,C,le,me,ae,_e,f,ke,R,ge,ve,$e,se,ye,ne,Se,we,Te,re,Ce,Pe,A,ie,O,ce,P,H,y=[],Re=new Map,Ae,E,$=[],Be=new Map,B;v=new Ze({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${r[3]}'); + + ... + + const authData = await pb.collection('${(De=r[0])==null?void 0:De.name}').authRefresh(); + + // after the above you can also access the refreshed auth data from the authStore + console.log(pb.authStore.isValid); + console.log(pb.authStore.token); + console.log(pb.authStore.model.id); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${r[3]}'); + + ... + + final authData = await pb.collection('${(Fe=r[0])==null?void 0:Fe.name}').authRefresh(); + + // after the above you can also access the refreshed auth data from the authStore + print(pb.authStore.isValid); + print(pb.authStore.token); + print(pb.authStore.model.id); + `}}),R=new Ue({props:{content:"?expand=relField1,relField2.subRelField"}}),A=new et({});let x=J(r[2]);const Me=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eReturns a new auth response (token and record data) for an + already authenticated record.

This method is usually called by users on page/screen reload to ensure that the previously stored + data in pb.authStore is still valid and up-to-date.

`,g=p(),K(v.$$.fragment),w=p(),M=s("h6"),M.textContent="API details",X=p(),S=s("div"),z=s("strong"),z.textContent="POST",ue=p(),Q=s("div"),q=s("p"),pe=k("/api/collections/"),Y=s("strong"),Z=k(U),he=k("/auth-refresh"),fe=p(),j=s("p"),j.innerHTML="Requires record Authorization:TOKEN header",ee=p(),D=s("div"),D.textContent="Query parameters",te=p(),T=s("table"),oe=s("thead"),oe.innerHTML='Param Type Description',be=p(),F=s("tbody"),C=s("tr"),le=s("td"),le.textContent="expand",me=p(),ae=s("td"),ae.innerHTML='String',_e=p(),f=s("td"),ke=k(`Auto expand record relations. Ex.: + `),K(R.$$.fragment),ge=k(` + Supports up to 6-levels depth nested relations expansion. `),ve=s("br"),$e=k(` + The expanded relations will be appended to the record under the + `),se=s("code"),se.textContent="expand",ye=k(" property (eg. "),ne=s("code"),ne.textContent='"expand": {"relField1": {...}, ...}',Se=k(`). + `),we=s("br"),Te=k(` + Only the relations to which the request user has permissions to `),re=s("strong"),re.textContent="view",Ce=k(" will be expanded."),Pe=p(),K(A.$$.fragment),ie=p(),O=s("div"),O.textContent="Responses",ce=p(),P=s("div"),H=s("div");for(let e=0;ea(1,_=g.code);return r.$$set=g=>{"collection"in g&&a(0,m=g.collection)},r.$$.update=()=>{r.$$.dirty&1&&a(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:Le.dummyCollectionRecord(m)},null,2)},{code:401,body:` + { + "code": 401, + "message": "The request requires valid record authorization token to be set.", + "data": {} + } + `},{code:403,body:` + { + "code": 403, + "message": "The authorized record model is not allowed to perform this action.", + "data": {} + } + `},{code:404,body:` + { + "code": 404, + "message": "Missing auth record context.", + "data": {} + } + `}])},a(3,n=Le.getApiExampleUrl(Xe.baseUrl)),[m,_,i,n,h]}class nt extends je{constructor(l){super(),xe(this,l,ot,tt,Je,{collection:0})}}export{nt as default}; diff --git a/ui/dist/assets/AuthWithOAuth2Docs-3045a640.js b/ui/dist/assets/AuthWithOAuth2Docs-3045a640.js deleted file mode 100644 index 09ffee88..00000000 --- a/ui/dist/assets/AuthWithOAuth2Docs-3045a640.js +++ /dev/null @@ -1,144 +0,0 @@ -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-cc2b3041.js";import{S as Ge}from"./SdkTabs-cf23198f.js";import{F as Xe}from"./FieldsQueryParam-b174364f.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]}'); - - ... - - // OAuth2 authentication with a single realtime call. - // - // Make sure to register ${i[3]}/api/oauth2-redirect as redirect url. - const authData = await pb.collection('users').authWithOAuth2({ provider: 'google' }); - - // OR authenticate with manual OAuth2 code exchange - // const authData = await pb.collection('users').authWithOAuth2Code(...); - - // after the above you can also access the auth data from the authStore - console.log(pb.authStore.isValid); - console.log(pb.authStore.token); - console.log(pb.authStore.model.id); - - // "logout" the last authenticated model - pb.authStore.clear(); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - import 'package:url_launcher/url_launcher.dart'; - - final pb = PocketBase('${i[3]}'); - - ... - - // OAuth2 authentication with a single realtime call. - // - // Make sure to register ${i[3]}/api/oauth2-redirect as redirect url. - final authData = await pb.collection('users').authWithOAuth2('google', (url) async { - await launchUrl(url); - }); - - // OR authenticate with manual OAuth2 code exchange - // final authData = await pb.collection('users').authWithOAuth2Code(...); - - // after the above you can also access the auth data from the authStore - print(pb.authStore.isValid); - print(pb.authStore.token); - print(pb.authStore.model.id); - - // "logout" the last authenticated model - pb.authStore.clear(); - `}}),C=new je({props:{content:"?expand=relField1,relField2.subRelField"}}),q=new Xe({});let Q=i[2];const Me=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthenticate with an OAuth2 provider and returns a new auth token and record data.

-

For more details please check the - OAuth2 integration documentation - .

`,_=h(),z(v.$$.fragment),A=h(),P=s("h6"),P.textContent="API details",X=h(),S=s("div"),E=s("strong"),E.textContent="POST",pe=h(),J=s("div"),M=s("p"),be=k("/api/collections/"),Y=s("strong"),Z=k(N),fe=k("/auth-with-oauth2"),ee=h(),R=s("div"),R.textContent="Body Parameters",te=h(),x=s("table"),x.innerHTML=`Param - Type - Description -
Required - provider
- String - The name of the OAuth2 client provider (eg. "google"). -
Required - code
- String - The authorization code returned from the initial request. -
Required - codeVerifier
- String - The code verifier sent with the initial request as part of the code_challenge. -
Required - redirectUrl
- String - The redirect url sent with the initial request. -
Optional - createData
- Object -

Optional data that will be used when creating the auth record on OAuth2 sign-up.

-

The created auth record must comply with the same requirements and validations in the - regular create action. -
- The data can only be in json, aka. multipart/form-data and files - upload currently are not supported during OAuth2 sign-ups.

`,ae=h(),W=s("div"),W.textContent="Query parameters",le=h(),y=s("table"),oe=s("thead"),oe.innerHTML=`Param - Type - Description`,me=h(),U=s("tbody"),$=s("tr"),se=s("td"),se.textContent="expand",ge=h(),ne=s("td"),ne.innerHTML='String',ke=h(),f=s("td"),_e=k(`Auto expand record relations. Ex.: - `),z(C.$$.fragment),ve=k(` - Supports up to 6-levels depth nested relations expansion. `),we=s("br"),Oe=k(` - The expanded relations will be appended to the record under the - `),ie=s("code"),ie.textContent="expand",Ae=k(" property (eg. "),re=s("code"),re.textContent='"expand": {"relField1": {...}, ...}',Se=k(`). - `),ye=s("br"),$e=k(` - Only the relations to which the request user has permissions to `),ce=s("strong"),ce.textContent="view",Te=k(" will be expanded."),Ce=h(),z(q.$$.fragment),ue=h(),B=s("div"),B.textContent="Responses",de=h(),T=s("div"),F=s("div");for(let e=0;eo(1,g=_.code);return i.$$set=_=>{"collection"in _&&o(0,m=_.collection)},i.$$.update=()=>{i.$$.dirty&1&&o(2,u=[{code:200,body:JSON.stringify({token:"JWT_AUTH_TOKEN",record:We.dummyCollectionRecord(m),meta:{id:"abc123",name:"John Doe",username:"john.doe",email:"test@example.com",avatarUrl:"https://example.com/avatar.png",accessToken:"...",refreshToken:"...",rawUser:{}}},null,2)},{code:400,body:` - { - "code": 400, - "message": "An error occurred while submitting the form.", - "data": { - "provider": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `}])},o(3,n=We.getApiExampleUrl(Ie.baseUrl)),[m,g,u,n,b]}class lt extends Ve{constructor(l){super(),Le(this,l,Ze,Ye,Ee,{collection:0})}}export{lt as default}; diff --git a/ui/dist/assets/AuthWithOAuth2Docs-e75369d5.js b/ui/dist/assets/AuthWithOAuth2Docs-e75369d5.js new file mode 100644 index 00000000..d58fa48a --- /dev/null +++ b/ui/dist/assets/AuthWithOAuth2Docs-e75369d5.js @@ -0,0 +1,117 @@ +import{S as Le,i as Ee,s as Je,N as Ve,O as z,e as o,w as k,b as h,c as I,f as p,g as r,h as a,m as K,x as pe,P as We,Q as Ne,k as Qe,R as ze,n as Ie,t as V,a as L,o as c,d as G,C as Ue,p as Ke,r as X,u as Ge}from"./index-7d8498e9.js";import{S as Xe}from"./SdkTabs-36d454aa.js";import{F as Ye}from"./FieldsQueryParam-594c3384.js";function Be(i,l,s){const n=i.slice();return n[5]=l[s],n}function Fe(i,l,s){const n=i.slice();return n[5]=l[s],n}function He(i,l){let s,n=l[5].code+"",f,g,d,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){s=o("button"),f=k(n),g=h(),p(s,"class","tab-item"),X(s,"active",l[1]===l[5].code),this.first=s},m(v,A){r(v,s,A),a(s,f),a(s,g),d||(b=Ge(s,"click",_),d=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&pe(f,n),A&6&&X(s,"active",l[1]===l[5].code)},d(v){v&&c(s),d=!1,b()}}}function je(i,l){let s,n,f,g;return n=new Ve({props:{content:l[5].body}}),{key:i,first:null,c(){s=o("div"),I(n.$$.fragment),f=h(),p(s,"class","tab-item"),X(s,"active",l[1]===l[5].code),this.first=s},m(d,b){r(d,s,b),K(n,s,null),a(s,f),g=!0},p(d,b){l=d;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!g||b&6)&&X(s,"active",l[1]===l[5].code)},i(d){g||(V(n.$$.fragment,d),g=!0)},o(d){L(n.$$.fragment,d),g=!1},d(d){d&&c(s),G(n)}}}function Ze(i){let l,s,n=i[0].name+"",f,g,d,b,_,v,A,P,Y,S,E,be,J,R,me,Z,N=i[0].name+"",ee,fe,te,M,ae,x,le,W,se,y,oe,ge,U,$,ne,ke,ie,_e,m,ve,C,we,Oe,Ae,re,Se,ce,ye,$e,Te,de,Ce,qe,q,ue,B,he,T,F,O=[],De=new Map,Pe,H,w=[],Re=new Map,D;v=new Xe({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${i[3]}'); + + ... + + // OAuth2 authentication with a single realtime call. + // + // Make sure to register ${i[3]}/api/oauth2-redirect as redirect url. + const authData = await pb.collection('users').authWithOAuth2({ provider: 'google' }); + + // OR authenticate with manual OAuth2 code exchange + // const authData = await pb.collection('users').authWithOAuth2Code(...); + + // after the above you can also access the auth data from the authStore + console.log(pb.authStore.isValid); + console.log(pb.authStore.token); + console.log(pb.authStore.model.id); + + // "logout" the last authenticated model + pb.authStore.clear(); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + import 'package:url_launcher/url_launcher.dart'; + + final pb = PocketBase('${i[3]}'); + + ... + + // OAuth2 authentication with a single realtime call. + // + // Make sure to register ${i[3]}/api/oauth2-redirect as redirect url. + final authData = await pb.collection('users').authWithOAuth2('google', (url) async { + await launchUrl(url); + }); + + // OR authenticate with manual OAuth2 code exchange + // final authData = await pb.collection('users').authWithOAuth2Code(...); + + // after the above you can also access the auth data from the authStore + print(pb.authStore.isValid); + print(pb.authStore.token); + print(pb.authStore.model.id); + + // "logout" the last authenticated model + pb.authStore.clear(); + `}}),C=new Ve({props:{content:"?expand=relField1,relField2.subRelField"}}),q=new Ye({});let Q=z(i[2]);const Me=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthenticate with an OAuth2 provider and returns a new auth token and record data.

For more details please check the + OAuth2 integration documentation + .

`,_=h(),I(v.$$.fragment),A=h(),P=o("h6"),P.textContent="API details",Y=h(),S=o("div"),E=o("strong"),E.textContent="POST",be=h(),J=o("div"),R=o("p"),me=k("/api/collections/"),Z=o("strong"),ee=k(N),fe=k("/auth-with-oauth2"),te=h(),M=o("div"),M.textContent="Body Parameters",ae=h(),x=o("table"),x.innerHTML=`Param Type Description
Required provider
String The name of the OAuth2 client provider (eg. "google").
Required code
String The authorization code returned from the initial request.
Required codeVerifier
String The code verifier sent with the initial request as part of the code_challenge.
Required redirectUrl
String The redirect url sent with the initial request.
Optional createData
Object

Optional data that will be used when creating the auth record on OAuth2 sign-up.

The created auth record must comply with the same requirements and validations in the + regular create action. +
The data can only be in json, aka. multipart/form-data and files + upload currently are not supported during OAuth2 sign-ups.

`,le=h(),W=o("div"),W.textContent="Query parameters",se=h(),y=o("table"),oe=o("thead"),oe.innerHTML='Param Type Description',ge=h(),U=o("tbody"),$=o("tr"),ne=o("td"),ne.textContent="expand",ke=h(),ie=o("td"),ie.innerHTML='String',_e=h(),m=o("td"),ve=k(`Auto expand record relations. Ex.: + `),I(C.$$.fragment),we=k(` + Supports up to 6-levels depth nested relations expansion. `),Oe=o("br"),Ae=k(` + The expanded relations will be appended to the record under the + `),re=o("code"),re.textContent="expand",Se=k(" property (eg. "),ce=o("code"),ce.textContent='"expand": {"relField1": {...}, ...}',ye=k(`). + `),$e=o("br"),Te=k(` + Only the relations to which the request user has permissions to `),de=o("strong"),de.textContent="view",Ce=k(" will be expanded."),qe=h(),I(q.$$.fragment),ue=h(),B=o("div"),B.textContent="Responses",he=h(),T=o("div"),F=o("div");for(let e=0;es(1,g=_.code);return i.$$set=_=>{"collection"in _&&s(0,f=_.collection)},i.$$.update=()=>{i.$$.dirty&1&&s(2,d=[{code:200,body:JSON.stringify({token:"JWT_AUTH_TOKEN",record:Ue.dummyCollectionRecord(f),meta:{id:"abc123",name:"John Doe",username:"john.doe",email:"test@example.com",avatarUrl:"https://example.com/avatar.png",accessToken:"...",refreshToken:"...",rawUser:{}}},null,2)},{code:400,body:` + { + "code": 400, + "message": "An error occurred while submitting the form.", + "data": { + "provider": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `}])},s(3,n=Ue.getApiExampleUrl(Ke.baseUrl)),[f,g,d,n,b]}class st extends Le{constructor(l){super(),Ee(this,l,et,Ze,Je,{collection:0})}}export{st as default}; diff --git a/ui/dist/assets/AuthWithPasswordDocs-78868ea3.js b/ui/dist/assets/AuthWithPasswordDocs-78868ea3.js new file mode 100644 index 00000000..8827e051 --- /dev/null +++ b/ui/dist/assets/AuthWithPasswordDocs-78868ea3.js @@ -0,0 +1,98 @@ +import{S as we,i as ye,s as $e,N as ve,O as ot,e as n,w as p,b as d,c as nt,f as m,g as r,h as e,m as st,x as Dt,P as pe,Q as Pe,k as Re,R as Ce,n as Oe,t as Z,a as x,o as c,d as it,C as fe,p as Ae,r as rt,u as Te}from"./index-7d8498e9.js";import{S as Ue}from"./SdkTabs-36d454aa.js";import{F as Me}from"./FieldsQueryParam-594c3384.js";function he(s,l,a){const i=s.slice();return i[8]=l[a],i}function be(s,l,a){const i=s.slice();return i[8]=l[a],i}function De(s){let l;return{c(){l=p("email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function Ee(s){let l;return{c(){l=p("username")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function We(s){let l;return{c(){l=p("username/email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function me(s){let l;return{c(){l=n("strong"),l.textContent="username"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function _e(s){let l;return{c(){l=p("or")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ke(s){let l;return{c(){l=n("strong"),l.textContent="email"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ge(s,l){let a,i=l[8].code+"",g,b,f,u;function _(){return l[7](l[8])}return{key:s,first:null,c(){a=n("button"),g=p(i),b=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(R,C){r(R,a,C),e(a,g),e(a,b),f||(u=Te(a,"click",_),f=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Dt(g,i),C&24&&rt(a,"active",l[3]===l[8].code)},d(R){R&&c(a),f=!1,u()}}}function Se(s,l){let a,i,g,b;return i=new ve({props:{content:l[8].body}}),{key:s,first:null,c(){a=n("div"),nt(i.$$.fragment),g=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(f,u){r(f,a,u),st(i,a,null),e(a,g),b=!0},p(f,u){l=f;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!b||u&24)&&rt(a,"active",l[3]===l[8].code)},i(f){b||(Z(i.$$.fragment,f),b=!0)},o(f){x(i.$$.fragment,f),b=!1},d(f){f&&c(a),it(i)}}}function Le(s){var re,ce;let l,a,i=s[0].name+"",g,b,f,u,_,R,C,O,B,Et,ct,T,dt,N,ut,U,tt,Wt,et,I,Lt,pt,lt=s[0].name+"",ft,Bt,ht,V,bt,M,mt,qt,Q,D,_t,Ft,kt,Ht,$,Yt,gt,St,vt,Nt,wt,yt,j,$t,E,Pt,It,J,W,Rt,Vt,Ct,Qt,k,jt,q,Jt,Kt,zt,Ot,Gt,At,Xt,Zt,xt,Tt,te,ee,F,Ut,K,Mt,L,z,A=[],le=new Map,ae,G,S=[],oe=new Map,H;function ne(t,o){if(t[1]&&t[2])return We;if(t[1])return Ee;if(t[2])return De}let Y=ne(s),P=Y&&Y(s);T=new Ue({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${s[6]}'); + + ... + + const authData = await pb.collection('${(re=s[0])==null?void 0:re.name}').authWithPassword( + '${s[5]}', + 'YOUR_PASSWORD', + ); + + // after the above you can also access the auth data from the authStore + console.log(pb.authStore.isValid); + console.log(pb.authStore.token); + console.log(pb.authStore.model.id); + + // "logout" the last authenticated account + pb.authStore.clear(); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${s[6]}'); + + ... + + final authData = await pb.collection('${(ce=s[0])==null?void 0:ce.name}').authWithPassword( + '${s[5]}', + 'YOUR_PASSWORD', + ); + + // after the above you can also access the auth data from the authStore + print(pb.authStore.isValid); + print(pb.authStore.token); + print(pb.authStore.model.id); + + // "logout" the last authenticated account + pb.authStore.clear(); + `}});let v=s[1]&&me(),w=s[1]&&s[2]&&_e(),y=s[2]&&ke();q=new ve({props:{content:"?expand=relField1,relField2.subRelField"}}),F=new Me({});let at=ot(s[4]);const se=t=>t[8].code;for(let t=0;tt[8].code;for(let t=0;tParam Type Description',qt=d(),Q=n("tbody"),D=n("tr"),_t=n("td"),_t.innerHTML='
Required identity
',Ft=d(),kt=n("td"),kt.innerHTML='String',Ht=d(),$=n("td"),Yt=p(`The + `),v&&v.c(),gt=d(),w&&w.c(),St=d(),y&&y.c(),vt=p(` + of the record to authenticate.`),Nt=d(),wt=n("tr"),wt.innerHTML='
Required password
String The auth record password.',yt=d(),j=n("div"),j.textContent="Query parameters",$t=d(),E=n("table"),Pt=n("thead"),Pt.innerHTML='Param Type Description',It=d(),J=n("tbody"),W=n("tr"),Rt=n("td"),Rt.textContent="expand",Vt=d(),Ct=n("td"),Ct.innerHTML='String',Qt=d(),k=n("td"),jt=p(`Auto expand record relations. Ex.: + `),nt(q.$$.fragment),Jt=p(` + Supports up to 6-levels depth nested relations expansion. `),Kt=n("br"),zt=p(` + The expanded relations will be appended to the record under the + `),Ot=n("code"),Ot.textContent="expand",Gt=p(" property (eg. "),At=n("code"),At.textContent='"expand": {"relField1": {...}, ...}',Xt=p(`). + `),Zt=n("br"),xt=p(` + Only the relations to which the request user has permissions to `),Tt=n("strong"),Tt.textContent="view",te=p(" will be expanded."),ee=d(),nt(F.$$.fragment),Ut=d(),K=n("div"),K.textContent="Responses",Mt=d(),L=n("div"),z=n("div");for(let t=0;ta(3,_=O.code);return s.$$set=O=>{"collection"in O&&a(0,u=O.collection)},s.$$.update=()=>{var O,B;s.$$.dirty&1&&a(2,g=(O=u==null?void 0:u.options)==null?void 0:O.allowEmailAuth),s.$$.dirty&1&&a(1,b=(B=u==null?void 0:u.options)==null?void 0:B.allowUsernameAuth),s.$$.dirty&6&&a(5,f=b&&g?"YOUR_USERNAME_OR_EMAIL":b?"YOUR_USERNAME":"YOUR_EMAIL"),s.$$.dirty&1&&a(4,R=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:fe.dummyCollectionRecord(u)},null,2)},{code:400,body:` + { + "code": 400, + "message": "Failed to authenticate.", + "data": { + "identity": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `}])},a(6,i=fe.getApiExampleUrl(Ae.baseUrl)),[u,b,g,_,R,f,i,C]}class Ye extends we{constructor(l){super(),ye(this,l,Be,Le,$e,{collection:0})}}export{Ye as default}; diff --git a/ui/dist/assets/AuthWithPasswordDocs-9be87c66.js b/ui/dist/assets/AuthWithPasswordDocs-9be87c66.js deleted file mode 100644 index 0cd3304f..00000000 --- a/ui/dist/assets/AuthWithPasswordDocs-9be87c66.js +++ /dev/null @@ -1,106 +0,0 @@ -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-cc2b3041.js";import{S as Te}from"./SdkTabs-cf23198f.js";import{F as Ue}from"./FieldsQueryParam-b174364f.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]}'); - - ... - - const authData = await pb.collection('${(ie=n[0])==null?void 0:ie.name}').authWithPassword( - '${n[5]}', - 'YOUR_PASSWORD', - ); - - // after the above you can also access the auth data from the authStore - console.log(pb.authStore.isValid); - console.log(pb.authStore.token); - console.log(pb.authStore.model.id); - - // "logout" the last authenticated account - pb.authStore.clear(); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${n[6]}'); - - ... - - final authData = await pb.collection('${(re=n[0])==null?void 0:re.name}').authWithPassword( - '${n[5]}', - 'YOUR_PASSWORD', - ); - - // after the above you can also access the auth data from the authStore - print(pb.authStore.isValid); - print(pb.authStore.token); - print(pb.authStore.model.id); - - // "logout" the last authenticated account - pb.authStore.clear(); - `}});let w=n[1]&&me(),y=n[1]&&n[2]&&he(),g=n[2]&&_e();q=new ve({props:{content:"?expand=relField1,relField2.subRelField"}}),F=new Ue({});let ot=n[4];const se=t=>t[8].code;for(let t=0;tt[8].code;for(let t=0;tParam - Type - Description`,Bt=d(),Q=s("tbody"),D=s("tr"),ht=s("td"),ht.innerHTML=`
Required - identity
`,qt=d(),_t=s("td"),_t.innerHTML='String',Ft=d(),$=s("td"),Ht=f(`The - `),w&&w.c(),kt=d(),y&&y.c(),St=d(),g&&g.c(),vt=f(` - of the record to authenticate.`),Yt=d(),wt=s("tr"),wt.innerHTML=`
Required - password
- String - The auth record password.`,yt=d(),j=s("div"),j.textContent="Query parameters",gt=d(),E=s("table"),$t=s("thead"),$t.innerHTML=`Param - Type - Description`,Nt=d(),J=s("tbody"),W=s("tr"),Pt=s("td"),Pt.textContent="expand",It=d(),Rt=s("td"),Rt.innerHTML='String',Vt=d(),k=s("td"),Qt=f(`Auto expand record relations. Ex.: - `),at(q.$$.fragment),jt=f(` - Supports up to 6-levels depth nested relations expansion. `),Jt=s("br"),Kt=f(` - The expanded relations will be appended to the record under the - `),Ct=s("code"),Ct.textContent="expand",zt=f(" property (eg. "),Ot=s("code"),Ot.textContent='"expand": {"relField1": {...}, ...}',Gt=f(`). - `),Xt=s("br"),Zt=f(` - Only the relations to which the request user has permissions to `),At=s("strong"),At.textContent="view",xt=f(" will be expanded."),te=d(),at(F.$$.fragment),Tt=d(),K=s("div"),K.textContent="Responses",Ut=d(),L=s("div"),z=s("div");for(let t=0;to(3,_=O.code);return n.$$set=O=>{"collection"in O&&o(0,u=O.collection)},n.$$.update=()=>{var O,B;n.$$.dirty&1&&o(2,S=(O=u==null?void 0:u.options)==null?void 0:O.allowEmailAuth),n.$$.dirty&1&&o(1,m=(B=u==null?void 0:u.options)==null?void 0:B.allowUsernameAuth),n.$$.dirty&6&&o(5,p=m&&S?"YOUR_USERNAME_OR_EMAIL":m?"YOUR_USERNAME":"YOUR_EMAIL"),n.$$.dirty&1&&o(4,R=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:fe.dummyCollectionRecord(u)},null,2)},{code:400,body:` - { - "code": 400, - "message": "Failed to authenticate.", - "data": { - "identity": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `}])},o(6,i=fe.getApiExampleUrl(Oe.baseUrl)),[u,m,S,_,R,p,i,C]}class He extends we{constructor(l){super(),ye(this,l,Le,We,ge,{collection:0})}}export{He as default}; diff --git a/ui/dist/assets/CodeEditor-7fe9ddeb.js b/ui/dist/assets/CodeEditor-d578f3b8.js similarity index 99% rename from ui/dist/assets/CodeEditor-7fe9ddeb.js rename to ui/dist/assets/CodeEditor-d578f3b8.js index e417afc0..3ee4f455 100644 --- a/ui/dist/assets/CodeEditor-7fe9ddeb.js +++ b/ui/dist/assets/CodeEditor-d578f3b8.js @@ -1,4 +1,4 @@ -import{S as dt,i as pt,s as St,e as $t,f as gt,T as H,g as mt,y as Ge,o as Pt,J as Xt,K as Zt,L as bt,I as kt,C as xt,M as wt}from"./index-cc2b3041.js";import{P as yt,N as Yt,u as Tt,D as vt,v as Te,T as Oe,I as ve,w as J,x as n,y as Ut,L,z as M,A as V,B as F,F as Ue,G as K,H as j,J as bO,K as kO,M as xO,E as R,O as N,Q as Rt,R as Vt,U as wO,V as Z,W as _t,X as Ct,a as z,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 Ie,C as ee}from"./index-4841d67b.js";class re{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 re(e,[],a,t,t,0,[],0,i?new Ae(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=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.lastBigReductionSizel;)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]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 re(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;so&1&&l==r)||i.push(a[s],r)}a=i}let t=[];for(let i=0;i>19,i=a&65535,s=this.stack.length-t*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;a=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(a),!0}findForcedReduction(){let{parser:e}=this.p,a=[],t=(i,s)=>{if(!a.includes(i))return a.push(i),e.allActions(i,r=>{if(!(r&393216))if(r&65536){let l=(r>>19)-s;if(l>1){let o=r&65535,Q=this.stack.length-l*3;if(Q>=0&&e.getGoto(this.stack[Q],o,!1)>=0)return l<<19|65536|o}}else{let l=t(r,s+1);if(l!=null)return l}})};return t(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ae{constructor(e,a){this.tracker=e,this.context=a,this.hash=e.strict?e.hash(a):0}}class Oa{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let a=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class se{constructor(e,a,t){this.stack=e,this.pos=a,this.index=t,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,a=e.bufferBase+e.buffer.length){return new se(e,a,a-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new se(this.stack,this.pos,this.index)}}function E(O,e=Uint16Array){if(typeof O!="string")return O;let a=null;for(let t=0,i=0;t=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,l=!0),s+=o,l)break;s*=46}a?a[i++]=s:a=new e(s)}return a}class te{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ee=new te;class ta{constructor(e,a){this.input=e,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ee,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(e,a){let t=this.range,i=this.rangeIndex,s=this.pos+e;for(;st.to:s>=t.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];s+=r.from-t.to,t=r}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,a.from);return this.end}peek(e){let a=this.chunkOff+e,t,i;if(a>=0&&a=this.chunk2Pos&&tl.to&&(this.chunk2=this.chunk2.slice(0,l.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,a){if(a?(this.token=a,a.start=e,a.lookAhead=e+1,a.value=a.extended=-1):this.token=Ee,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,a-this.chunkPos);if(e>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,a-this.chunk2Pos);if(e>=this.range.from&&a<=this.range.to)return this.input.read(e,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>e&&(t+=this.input.read(Math.max(i.from,e),Math.min(i.to,a)))}return t}}class C{constructor(e,a){this.data=e,this.id=a}token(e,a){let{parser:t}=a.p;yO(this.data,e,a,this.id,t.data,t.tokenPrecTable)}}C.prototype.contextual=C.prototype.fallback=C.prototype.extend=!1;class le{constructor(e,a,t){this.precTable=a,this.elseToken=t,this.data=typeof e=="string"?E(e):e}token(e,a){let t=e.pos,i=0;for(;;){let s=e.next<0,r=e.resolveOffset(1,1);if(yO(this.data,e,a,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,r==null)break;e.reset(r,e.token)}i&&(e.reset(t,e.token),e.acceptToken(this.elseToken,i))}}le.prototype.contextual=C.prototype.fallback=C.prototype.extend=!1;class b{constructor(e,a={}){this.token=e,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function yO(O,e,a,t,i,s){let r=0,l=1<0){let p=O[u];if(o.allows(p)&&(e.token.value==-1||e.token.value==p||aa(p,e.token.value,i,s))){e.acceptToken(p);break}}let f=e.next,c=0,h=O[r+2];if(e.next<0&&h>c&&O[Q+h*3-3]==65535&&O[Q+h*3-3]==65535){r=O[Q+h*3-1];continue e}for(;c>1,p=Q+u+(u<<1),g=O[p],$=O[p+1]||65536;if(f=$)c=u+1;else{r=O[p+2],e.advance();continue e}}break}}function Ne(O,e,a){for(let t=e,i;(i=O[t])!=65535;t++)if(i==a)return t-e;return-1}function aa(O,e,a,t){let i=Ne(a,t,e);return i<0||Ne(a,t,O)e)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,e-25)):Math.min(O.length,Math.max(t.from+1,e+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:O.length}}class ia{constructor(e,a){this.fragments=e,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Be(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Be(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=r,null;if(s instanceof Oe){if(r==e){if(r=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[a]++,this.nextStart=r+s.length}}}class ra{constructor(e,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(t=>new te)}getActions(e){let a=0,t=null,{parser:i}=e.p,{tokenizers:s}=i,r=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let h=a;if(c.extended>-1&&(a=this.addActions(e,c.extended,c.end,a)),a=this.addActions(e,c.value,c.end,a),!f.extend&&(t=c,a>h))break}}for(;this.actions.length>a;)this.actions.pop();return o&&e.setLookAhead(o),!t&&e.pos==this.stream.end&&(t=new te,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,a=this.addActions(e,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let a=new te,{pos:t,p:i}=e;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(e,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,e),t),e.value>-1){let{parser:s}=t.p;for(let r=0;r=0&&t.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,a,t,i){for(let s=0;se.bufferLength*4?new ia(t,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,a=this.minStackPos,t=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[r]=e;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;ra)t.push(l);else{if(this.advanceStack(l,t,e))continue;{i||(i=[],s=[]),i.push(l);let o=this.tokens.getMainToken(l);s.push(o.value,o.end)}}break}}if(!t.length){let r=i&&na(i);if(r)return P&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw P&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,t);if(r)return P&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(t.length>r)for(t.sort((l,o)=>o.score-l.score);t.length>r;)t.pop();t.some(l=>l.reducePos>a)&&this.recovering--}else if(t.length>1){e:for(let r=0;r500&&Q.buffer.length>500)if((l.score-Q.score||l.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(r--,1);continue e}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let r=1;r ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let Q=e.curContext&&e.curContext.tracker.strict,f=Q?e.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let h=this.parser.nodeSet.types[c.type.id]==c.type?s.getGoto(e.state,c.type.id):-1;if(h>-1&&c.length&&(!Q||(c.prop(Te.contextHash)||0)==f))return e.useNode(c,h),P&&console.log(r+this.stackID(e)+` (via reuse of ${s.getName(c.type.id)})`),!0;if(!(c instanceof Oe)||c.children.length==0||c.positions[0]>0)break;let u=c.children[0];if(u instanceof Oe&&c.positions[0]==0)c=u;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),P&&console.log(r+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(e,a){let t=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>t)return De(e,a),!0}}runRecovery(e,a,t){let i=null,s=!1;for(let r=0;r ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),P&&console.log(f+this.stackID(l)+" (restarted)"),this.advanceFully(l,t))))continue;let c=l.split(),h=f;for(let u=0;c.forceReduce()&&u<10&&(P&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));u++)P&&(h=this.stackID(c)+" -> ");for(let u of l.recoverByInsert(o))P&&console.log(f+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,t);this.stream.end>l.pos?(Q==l.pos&&(Q++,o=0),l.recoverByDelete(o,Q),P&&console.log(f+this.stackID(l)+` (via recover-delete ${this.parser.getName(o)})`),De(l,t)):(!i||i.scoreO;class YO{constructor(e){this.start=e.start,this.shift=e.shift||de,this.reduce=e.reduce||de,this.reuse=e.reuse||de,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class T extends yt{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let a=e.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let l=0;le.topRules[l][1]),i=[];for(let l=0;l=0)s(f,o,l[Q++]);else{let c=l[Q+-f];for(let h=-f;h>0;h--)s(l[Q++],o,c);Q++}}}this.nodeSet=new Yt(a.map((l,o)=>Tt.define({name:o>=this.minRepeatTerm?void 0:l,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=vt;let r=E(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new C(r,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,a,t){let i=new sa(this,e,a,t);for(let s of this.wrappers)i=s(i,e,a,t);return i}getGoto(e,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let s=i[a+1];;){let r=i[s++],l=r&1,o=i[s++];if(l&&t)return o;for(let Q=s+(r>>1);s0}validAction(e,a){return!!this.allActions(e,t=>t==a?!0:null)}allActions(e,a){let t=this.stateSlot(e,4),i=t?a(t):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=x(this.data,s+2);else break;i=a(x(this.data,s+1))}return i}nextStates(e){let a=[];for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=x(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((s,r)=>r&1&&s==i)||a.push(this.data[t],i)}}return a}configure(e){let a=Object.assign(Object.create(T.prototype),this);if(e.props&&(a.nodeSet=this.nodeSet.extend(...e.props)),e.top){let t=this.topRules[e.top];if(!t)throw new RangeError(`Invalid top rule name ${e.top}`);a.top=t}return e.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=e.tokenizers.find(s=>s.from==t);return i?i.to:t})),e.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let s=e.specializers.find(l=>l.from==t.external);if(!s)return t;let r=Object.assign(Object.assign({},t),{external:s.to});return a.specializers[i]=Je(r),r})),e.contextTracker&&(a.context=e.contextTracker),e.dialect&&(a.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(a.strict=e.strict),e.wrap&&(a.wrappers=a.wrappers.concat(e.wrap)),e.bufferLength!=null&&(a.bufferLength=e.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let a=this.dynamicPrecedences;return a==null?0:a[e]||0}parseDialect(e){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(e)for(let s of e.split(" ")){let r=a.indexOf(s);r>=0&&(t[r]=!0)}let i=null;for(let s=0;st)&&a.p.parser.stateFlag(a.state,2)&&(!e||e.scoreO.external(a,t)<<1|e}return O.get}const oa=54,ca=1,Qa=55,ua=2,fa=56,ha=3,Le=4,da=5,ne=6,TO=7,vO=8,UO=9,RO=10,pa=11,Sa=12,$a=13,pe=57,ga=14,Me=58,VO=20,ma=22,_O=23,Pa=24,ke=26,CO=27,Xa=28,Za=31,ba=34,ka=36,xa=37,wa=0,ya=1,Ya={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Ta={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Fe={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function va(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function WO(O){return O==9||O==10||O==13||O==32}let Ke=null,He=null,eO=0;function xe(O,e){let a=O.pos+e;if(eO==a&&He==O)return Ke;let t=O.peek(e);for(;WO(t);)t=O.peek(++e);let i="";for(;va(t);)i+=String.fromCharCode(t),t=O.peek(++e);return He=O,eO=a,Ke=i?i.toLowerCase():t==Ua||t==Ra?void 0:null}const qO=60,oe=62,Re=47,Ua=63,Ra=33,Va=45;function OO(O,e){this.name=O,this.parent=e,this.hash=e?e.hash:0;for(let a=0;a-1?new OO(xe(t,1)||"",O):O},reduce(O,e){return e==VO&&O?O.parent:O},reuse(O,e,a,t){let i=e.type.id;return i==ne||i==ka?new OO(xe(t,1)||"",O):O},hash(O){return O?O.hash:0},strict:!1}),Wa=new b((O,e)=>{if(O.next!=qO){O.next<0&&e.context&&O.acceptToken(pe);return}O.advance();let a=O.next==Re;a&&O.advance();let t=xe(O,0);if(t===void 0)return;if(!t)return O.acceptToken(a?ga:ne);let i=e.context?e.context.name:null;if(a){if(t==i)return O.acceptToken(pa);if(i&&Ta[i])return O.acceptToken(pe,-2);if(e.dialectEnabled(wa))return O.acceptToken(Sa);for(let s=e.context;s;s=s.parent)if(s.name==t)return;O.acceptToken($a)}else{if(t=="script")return O.acceptToken(TO);if(t=="style")return O.acceptToken(vO);if(t=="textarea")return O.acceptToken(UO);if(Ya.hasOwnProperty(t))return O.acceptToken(RO);i&&Fe[i]&&Fe[i][t]?O.acceptToken(pe,-1):O.acceptToken(ne)}},{contextual:!0}),qa=new b(O=>{for(let e=0,a=0;;a++){if(O.next<0){a&&O.acceptToken(Me);break}if(O.next==Va)e++;else if(O.next==oe&&e>=2){a>3&&O.acceptToken(Me,-2);break}else e=0;O.advance()}});function ja(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}const za=new b((O,e)=>{if(O.next==Re&&O.peek(1)==oe){let a=e.dialectEnabled(ya)||ja(e.context);O.acceptToken(a?da:Le,2)}else O.next==oe&&O.acceptToken(Le,1)});function Ve(O,e,a){let t=2+O.length;return new b(i=>{for(let s=0,r=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(s==0&&i.next==qO||s==1&&i.next==Re||s>=2&&sr?i.acceptToken(e,-r):i.acceptToken(a,-(r-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else s=r=0;i.advance()}})}const Ga=Ve("script",oa,ca),Ia=Ve("style",Qa,ua),Aa=Ve("textarea",fa,ha),Ea=J({"Text RawText":n.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":n.angleBracket,TagName:n.tagName,"MismatchedCloseTag/TagName":[n.tagName,n.invalid],AttributeName:n.attributeName,"AttributeValue UnquotedAttributeValue":n.attributeValue,Is:n.definitionOperator,"EntityReference CharacterReference":n.character,Comment:n.blockComment,ProcessingInst:n.processingInstruction,DoctypeDecl:n.documentMeta}),Na=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ca,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ea],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let Q=l.type.id;if(Q==Xa)return Se(l,o,a);if(Q==Za)return Se(l,o,t);if(Q==ba)return Se(l,o,i);if(Q==VO&&s.length){let f=l.node,c=f.firstChild,h=c&&tO(c,o),u;if(h){for(let p of s)if(p.tag==h&&(!p.attrs||p.attrs(u||(u=jO(f,o))))){let g=f.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:g.type.id==xa?g.from:f.to}]}}}}if(r&&Q==_O){let f=l.node,c;if(c=f.firstChild){let h=r[o.read(c.from,c.to)];if(h)for(let u of h){if(u.tagName&&u.tagName!=tO(f.parent,o))continue;let p=f.lastChild;if(p.type.id==ke){let g=p.from+1,$=p.lastChild,k=p.to-($&&$.isError?0:1);if(k>g)return{parser:u.parser,overlay:[{from:g,to:k}]}}else if(p.type.id==CO)return{parser:u.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Ba=96,aO=1,Da=97,Ja=98,iO=2,GO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],La=58,Ma=40,IO=95,Fa=91,ae=45,Ka=46,Ha=35,ei=37;function ce(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function Oi(O){return O>=48&&O<=57}const ti=new b((O,e)=>{for(let a=!1,t=0,i=0;;i++){let{next:s}=O;if(ce(s)||s==ae||s==IO||a&&Oi(s))!a&&(s!=ae||i>0)&&(a=!0),t===i&&s==ae&&t++,O.advance();else{a&&O.acceptToken(s==Ma?Da:t==2&&e.canShift(iO)?iO:Ja);break}}}),ai=new b(O=>{if(GO.includes(O.peek(-1))){let{next:e}=O;(ce(e)||e==IO||e==Ha||e==Ka||e==Fa||e==La||e==ae)&&O.acceptToken(Ba)}}),ii=new b(O=>{if(!GO.includes(O.peek(-1))){let{next:e}=O;if(e==ei&&(O.advance(),O.acceptToken(aO)),ce(e)){do O.advance();while(ce(O.next));O.acceptToken(aO)}}}),ri=J({"AtKeyword import charset namespace keyframes media supports":n.definitionKeyword,"from to selector":n.keyword,NamespaceName:n.namespace,KeyframeName:n.labelName,KeyframeRangeName:n.operatorKeyword,TagName:n.tagName,ClassName:n.className,PseudoClassName:n.constant(n.className),IdName:n.labelName,"FeatureName PropertyName":n.propertyName,AttributeName:n.attributeName,NumberLiteral:n.number,KeywordQuery:n.keyword,UnaryQueryOp:n.operatorKeyword,"CallTag ValueName":n.atom,VariableName:n.variableName,Callee:n.operatorKeyword,Unit:n.unit,"UniversalSelector NestingSelector":n.definitionOperator,MatchOp:n.compareOperator,"ChildOp SiblingOp, LogicOp":n.logicOperator,BinOp:n.arithmeticOperator,Important:n.modifier,Comment:n.blockComment,ColorLiteral:n.color,"ParenthesizedContent StringLiteral":n.string,":":n.punctuation,"PseudoOp #":n.derefOperator,"; ,":n.separator,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace}),si={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},li={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},ni={__proto__:null,not:128,only:128},oi=T.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O)QQ[O,59SO$qQ[O,59kO$vQ[O,59oO(^Q[O,59sO(^Q[O,59uO(^Q[O,59vO)]Q[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)dQWO,59SO)iQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)nQ`O,59oOOQS'#Cp'#CpO${QdO'#CqO)vQvO'#CsO+TQtO,5:POOQO'#Cx'#CxO)iQWO'#CwO+iQWO'#CyOOQS'#Em'#EmOOQO'#Dh'#DhO+nQ[O'#DoO+|QWO'#EqO&]Q[O'#DmO,[QWO'#DpOOQO'#Er'#ErO({QWO,5:^O,aQpO,5:`OOQS'#Dx'#DxO,iQWO,5:bO,nQ[O,5:bOOQO'#D{'#D{O,vQWO,5:eO,{QWO,5:kO-TQWO,5:mOOQS-E8S-E8SO${QdO,59{O-]Q[O'#EZO-jQWO,5;[O-jQWO,5;[POOO'#ET'#ETP-uO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO.lQXO,5:sOOQO-E8V-E8VOOQS1G.g1G.gOOQP1G.n1G.nO)dQWO1G.nO)iQWO1G.nOOQP1G/V1G/VO.yQ`O1G/ZO/dQXO1G/_O/zQXO1G/aO0bQXO1G/bO0xQWO,59zO0}Q[O'#DOO1UQdO'#CoOOQP1G/Z1G/ZO${QdO1G/ZO1]QpO,59]OOQS,59_,59_O${QdO,59aO1eQWO1G/kOOQS,59c,59cO1jQ!bO,59eO1rQWO'#DhO1}QWO,5:TO2SQWO,5:ZO&]Q[O,5:VO&]Q[O'#E[O2[QWO,5;]O2gQWO,5:XO(^Q[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2xQWO1G/|O2}QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO3YQtO1G/gOOQO,5:u,5:uO3pQ[O,5:uOOQO-E8X-E8XO3}QWO1G0vPOOO-E8R-E8RPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$u7+$uO${QdO7+$uOOQS1G/f1G/fO4YQXO'#EoO4aQWO,59jO4fQtO'#EVO5ZQdO'#ElO5eQWO,59ZO5jQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5rQWO1G/PO${QdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5wQWO,5:vOOQO-E8Y-E8YO6VQXO1G/vOOQS7+%h7+%hO6^QYO'#CsOOQO'#EO'#EOO6iQ`O'#D}OOQO'#D}'#D}O6tQWO'#E]O6|QdO,5:hOOQS,5:h,5:hO7XQtO'#EYO${QdO'#EYO8VQdO7+%ROOQO7+%R7+%ROOQO1G0a1G0aO8jQpO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#b[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSp^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#_QOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#X~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!W^Oy%^z;'S%^;'S;=`%o<%lO%^dCoSzSOy%^z;'S%^;'S;=`%o<%lO%^bDQU|QOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS|Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!YQo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bFfSxQOy%^z;'S%^;'S;=`%o<%lO%^lFwSv[Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!`Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[ai,ii,ti,1,2,3,4,new le("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:O=>si[O]||-1},{term:56,get:O=>li[O]||-1},{term:98,get:O=>ni[O]||-1}],tokenPrec:1169});let $e=null;function ge(){if(!$e&&typeof document=="object"&&document.body){let{style:O}=document.body,e=[],a=new Set;for(let t in O)t!="cssText"&&t!="cssFloat"&&typeof O[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(e.push(t),a.add(t)));$e=e.sort().map(t=>({type:"property",label:t}))}return $e||[]}const rO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(O=>({type:"class",label:O})),sO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(O=>({type:"keyword",label:O})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(O=>({type:"constant",label:O}))),ci=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(O=>({type:"type",label:O})),Y=/^(\w[\w-]*|-\w[\w-]*|)$/,Qi=/^-(-[\w-]*)?$/;function ui(O,e){var a;if((O.name=="("||O.type.isError)&&(O=O.parent||O),O.name!="ArgList")return!1;let t=(a=O.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:e.sliceString(t.from,t.to)=="var"}const lO=new bO,fi=["Declaration"];function hi(O){for(let e=O;;){if(e.type.isTop)return e;if(!(e=e.parent))return O}}function AO(O,e,a){if(e.to-e.from>4096){let t=lO.get(e);if(t)return t;let i=[],s=new Set,r=e.cursor(ve.IncludeAnonymous);if(r.firstChild())do for(let l of AO(O,r.node,a))s.has(l.label)||(s.add(l.label),i.push(l));while(r.nextSibling());return lO.set(e,i),i}else{let t=[],i=new Set;return e.cursor().iterate(s=>{var r;if(a(s)&&s.matchContext(fi)&&((r=s.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let l=O.sliceString(s.from,s.to);i.has(l)||(i.add(l),t.push({label:l,type:"variable"}))}}),t}}const di=O=>e=>{let{state:a,pos:t}=e,i=j(a).resolveInner(t,-1),s=i.type.isError&&i.from==i.to-1&&a.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:ge(),validFor:Y};if(i.name=="ValueName")return{from:i.from,options:sO,validFor:Y};if(i.name=="PseudoClassName")return{from:i.from,options:rO,validFor:Y};if(O(i)||(e.explicit||s)&&ui(i,a.doc))return{from:O(i)||s?i.from:t,options:AO(a.doc,hi(i),O),validFor:Qi};if(i.name=="TagName"){for(let{parent:o}=i;o;o=o.parent)if(o.name=="Block")return{from:i.from,options:ge(),validFor:Y};return{from:i.from,options:ci,validFor:Y}}if(!e.explicit)return null;let r=i.resolve(t),l=r.childBefore(t);return l&&l.name==":"&&r.name=="PseudoClassSelector"?{from:t,options:rO,validFor:Y}:l&&l.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:t,options:sO,validFor:Y}:r.name=="Block"||r.name=="Styles"?{from:t,options:ge(),validFor:Y}:null},pi=di(O=>O.name=="VariableName"),Qe=L.define({name:"css",parser:oi.configure({props:[M.add({Declaration:V()}),F.add({"Block KeyframeList":Ue})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Si(){return new K(Qe,Qe.data.of({autocomplete:pi}))}const $i=303,nO=1,gi=2,mi=304,Pi=306,Xi=307,Zi=3,bi=4,ki=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],EO=125,xi=59,oO=47,wi=42,yi=43,Yi=45,Ti=new YO({start:!1,shift(O,e){return e==Zi||e==bi||e==Pi?O:e==Xi},strict:!1}),vi=new b((O,e)=>{let{next:a}=O;(a==EO||a==-1||e.context)&&O.acceptToken(mi)},{contextual:!0,fallback:!0}),Ui=new b((O,e)=>{let{next:a}=O,t;ki.indexOf(a)>-1||a==oO&&((t=O.peek(1))==oO||t==wi)||a!=EO&&a!=xi&&a!=-1&&!e.context&&O.acceptToken($i)},{contextual:!0}),Ri=new b((O,e)=>{let{next:a}=O;if((a==yi||a==Yi)&&(O.advance(),a==O.next)){O.advance();let t=!e.context&&e.canShift(nO);O.acceptToken(t?nO:gi)}},{contextual:!0}),Vi=J({"get set async static":n.modifier,"for while do if else switch try catch finally return throw break continue default case":n.controlKeyword,"in of await yield void typeof delete instanceof":n.operatorKeyword,"let var const function class extends":n.definitionKeyword,"import export from":n.moduleKeyword,"with debugger as new":n.keyword,TemplateString:n.special(n.string),super:n.atom,BooleanLiteral:n.bool,this:n.self,null:n.null,Star:n.modifier,VariableName:n.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":n.function(n.variableName),VariableDefinition:n.definition(n.variableName),Label:n.labelName,PropertyName:n.propertyName,PrivatePropertyName:n.special(n.propertyName),"CallExpression/MemberExpression/PropertyName":n.function(n.propertyName),"FunctionDeclaration/VariableDefinition":n.function(n.definition(n.variableName)),"ClassDeclaration/VariableDefinition":n.definition(n.className),PropertyDefinition:n.definition(n.propertyName),PrivatePropertyDefinition:n.definition(n.special(n.propertyName)),UpdateOp:n.updateOperator,LineComment:n.lineComment,BlockComment:n.blockComment,Number:n.number,String:n.string,Escape:n.escape,ArithOp:n.arithmeticOperator,LogicOp:n.logicOperator,BitOp:n.bitwiseOperator,CompareOp:n.compareOperator,RegExp:n.regexp,Equals:n.definitionOperator,Arrow:n.function(n.punctuation),": Spread":n.punctuation,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace,"InterpolationStart InterpolationEnd":n.special(n.brace),".":n.derefOperator,", ;":n.separator,"@":n.meta,TypeName:n.typeName,TypeDefinition:n.definition(n.typeName),"type enum interface implements namespace module declare":n.definitionKeyword,"abstract global Privacy readonly override":n.modifier,"is keyof unique infer":n.operatorKeyword,JSXAttributeValue:n.attributeValue,JSXText:n.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":n.angleBracket,"JSXIdentifier JSXNameSpacedName":n.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":n.attributeName,"JSXBuiltin/JSXIdentifier":n.standard(n.tagName)}),_i={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,using:413,interface:419,enum:423,namespace:429,module:431,declare:435,global:439,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},Ci={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},Wi={__proto__:null,"<":137},qi=T.deserialize({version:14,states:"$6tO`QUOOO%TQUOOO'WQWOOP(eOSOOO*sQ(CjO'#CfO*zOpO'#CgO+YO!bO'#CgO+hO07`O'#DZO-yQUO'#DaO.ZQUO'#DlO%TQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0xQSO'#ETOOQO'#Ei'#EiOOQO'#Ic'#IcO1QQSO'#GkO1]QSO'#EhO1bQSO'#EhO3dQ(CjO'#JdO6TQ(CjO'#JeO6qQSO'#FWO6vQ#tO'#FoOOQ(CY'#F`'#F`O7RO&jO'#F`O7aQ,UO'#FvO8wQSO'#FuOOQ(CY'#Je'#JeOOQ(CW'#Jd'#JdO8|QSO'#GoOOQQ'#KP'#KPO9XQSO'#IPO9^Q(C[O'#IQOOQQ'#JQ'#JQOOQQ'#IU'#IUQ`QUOOO%TQUO'#DnO9fQUO'#DzO9mQUO'#D|O9SQSO'#GkO9tQ,UO'#ClO:SQSO'#EgO:_QSO'#ErO:dQ,UO'#F_O;RQSO'#GkOOQO'#KQ'#KQO;WQSO'#KQO;fQSO'#GsO;fQSO'#GtO;fQSO'#GvO9SQSO'#GyO<]QSO'#G|O=tQSO'#CbO>UQSO'#HYO>^QSO'#H`O>^QSO'#HbO`QUO'#HdO>^QSO'#HfO>^QSO'#HiO>cQSO'#HoO>hQ(C]O'#HuO%TQUO'#HwO>sQ(C]O'#HyO?OQ(C]O'#H{O9^Q(C[O'#H}O?ZQ(CjO'#CfO@]QWO'#DfQOQSOOO%TQUO'#D|O@sQSO'#EPO9tQ,UO'#EgOAOQSO'#EgOAZQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jh'#JhO%TQUO'#JhOOQO'#Jl'#JlOOQO'#I`'#I`OBZQWO'#E`OOQ(CW'#E_'#E_OCVQ(C`O'#E`OCaQWO'#ESOOQO'#Jk'#JkOCuQWO'#JlOESQWO'#ESOCaQWO'#E`PEaO?MpO'#C`POOO)CDo)CDoOOOO'#IV'#IVOElOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOEzO!bO,59RO%TQUO'#D]OOOO'#IY'#IYOFYO07`O,59uOOQ(CY,59u,59uOFhQUO'#IZOF{QSO'#JfOH}QbO'#JfO+vQUO'#JfOIUQSO,59{OIlQSO'#EiOIyQSO'#JtOJUQSO'#JsOJUQSO'#JsOJ^QSO,5;VOJcQSO'#JrOOQ(CY,5:W,5:WOJjQUO,5:WOLkQ(CjO,5:bOM[QSO,5:jOMuQ(C[O'#JqOM|QSO'#JpO8|QSO'#JpONbQSO'#JpONjQSO,5;UONoQSO'#JpO!!wQbO'#JeOOQ(CY'#Cf'#CfO%TQUO'#EOO!#gQ`O,5:oOOQO'#Jm'#JmOOQO-EkOOQQ'#JY'#JYOOQQ,5>l,5>lOOQQ-EqQ(CjO,5:hOOQO,5@l,5@lO!?bQ,UO,5=VO!?pQ(C[O'#JZO8wQSO'#JZO!@RQ(C[O,59WO!@^QWO,59WO!@fQ,UO,59WO9tQ,UO,59WO!@qQSO,5;SO!@yQSO'#HXO!A[QSO'#KUO%TQUO,5;wO!7[QWO,5;yO!AdQSO,5=rO!AiQSO,5=rO!AnQSO,5=rO9^Q(C[O,5=rO;fQSO,5=bOOQO'#Cr'#CrO!A|QWO,5=_O!BUQ,UO,5=`O!BaQSO,5=bO!BfQ`O,5=eO!BnQSO'#KQO>cQSO'#HOO9SQSO'#HQO!BsQSO'#HQO9tQ,UO'#HSO!BxQSO'#HSOOQQ,5=h,5=hO!B}QSO'#HTO!CVQSO'#ClO!C[QSO,58|O!CfQSO,58|O!EkQUO,58|OOQQ,58|,58|O!E{Q(C[O,58|O%TQUO,58|O!HWQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!HnQSO,5=tO`QUO,5=zO`QUO,5=|O!HsQSO,5>OO`QUO,5>QO!HxQSO,5>TO!H}QUO,5>ZOOQQ,5>a,5>aO%TQUO,5>aO9^Q(C[O,5>cOOQQ,5>e,5>eO!MXQSO,5>eOOQQ,5>g,5>gO!MXQSO,5>gOOQQ,5>i,5>iO!M^QWO'#DXO%TQUO'#JhO!M{QWO'#JhO!NjQWO'#DgO!N{QWO'#DgO##^QUO'#DgO##eQSO'#JgO##mQSO,5:QO##rQSO'#EmO#$QQSO'#JuO#$YQSO,5;WO#$_QWO'#DgO#$lQWO'#EROOQ(CY,5:k,5:kO%TQUO,5:kO#$sQSO,5:kO>cQSO,5;RO!@^QWO,5;RO!@fQ,UO,5;RO9tQ,UO,5;RO#${QSO,5@SO#%QQ!LQO,5:oOOQO-E<^-E<^O#&WQ(C`O,5:zOCaQWO,5:nO#&bQWO,5:nOCaQWO,5:zO!@RQ(C[O,5:nOOQ(CW'#Ec'#EcOOQO,5:z,5:zO%TQUO,5:zO#&oQ(C[O,5:zO#&zQ(C[O,5:zO!@^QWO,5:nOOQO,5;Q,5;QO#'YQ(C[O,5:zPOOO'#IT'#ITP#'nO?MpO,58zPOOO,58z,58zOOOO-EuO+vQUO,5>uOOQO,5>{,5>{O#(YQUO'#IZOOQO-E^QSO1G3jO$.OQUO1G3lO$2SQUO'#HkOOQQ1G3o1G3oO$2aQSO'#HqO>cQSO'#HsOOQQ1G3u1G3uO$2iQUO1G3uO9^Q(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9^Q(C[O1G4PO9^Q(C[O1G4RO$6pQSO,5@SO!){QUO,5;XO8|QSO,5;XO>cQSO,5:RO!){QUO,5:RO!@^QWO,5:RO$6uQ$IUO,5:ROOQO,5;X,5;XO$7PQWO'#I[O$7gQSO,5@ROOQ(CY1G/l1G/lO$7oQWO'#IbO$7yQSO,5@aOOQ(CW1G0r1G0rO!N{QWO,5:ROOQO'#I_'#I_O$8RQWO,5:mOOQ(CY,5:m,5:mO#$vQSO1G0VOOQ(CY1G0V1G0VO%TQUO1G0VOOQ(CY1G0m1G0mO>cQSO1G0mO!@^QWO1G0mO!@fQ,UO1G0mOOQ(CW1G5n1G5nO!@RQ(C[O1G0YOOQO1G0f1G0fO%TQUO1G0fO$8YQ(C[O1G0fO$8eQ(C[O1G0fO!@^QWO1G0YOCaQWO1G0YO$8sQ(C[O1G0fOOQO1G0Y1G0YO$9XQ(CjO1G0fPOOO-EuO$9uQSO1G5lO$9}QSO1G5yO$:VQbO1G5zO8|QSO,5>{O$:aQ(CjO1G5wO%TQUO1G5wO$:qQ(C[O1G5wO$;SQSO1G5vO$;SQSO1G5vO8|QSO1G5vO$;[QSO,5?OO8|QSO,5?OOOQO,5?O,5?OO$;pQSO,5?OO$$QQSO,5?OOOQO-EqQ(CjO,5VOOQQ,5>V,5>VO%TQUO'#HlO%(SQSO'#HnOOQQ,5>],5>]O8|QSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%(XQWO1G5nO%(mQ$IUO1G0sO%(wQSO1G0sOOQO1G/m1G/mO%)SQ$IUO1G/mO>cQSO1G/mO!){QUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!@^QWO1G/mOOQO-E<]-E<]OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO#$vQSO7+%qOOQ(CY7+&X7+&XO>cQSO7+&XO!@^QWO7+&XOOQO7+%t7+%tO$9XQ(CjO7+&QOOQO7+&Q7+&QO%TQUO7+&QO%)^Q(C[O7+&QO!@RQ(C[O7+%tO!@^QWO7+%tO%)iQ(C[O7+&QO%)wQ(CjO7++cO%TQUO7++cO%*XQSO7++bO%*XQSO7++bOOQO1G4j1G4jO8|QSO1G4jO%*aQSO1G4jOOQO7+%y7+%yO#$vQSO<wOOQO-ExO%TQUO,5>xOOQO-E<[-E<[O%2aQSO1G5pOOQ(CY<QQ$IUO1G0xO%>XQ$IUO1G0xO%@PQ$IUO1G0xO%@dQ(CjO<WOOQQ,5>Y,5>YO%M}QSO1G3wO8|QSO7+&_O!){QUO7+&_OOQO7+%X7+%XO%NSQ$IUO1G5zO>cQSO7+%XOOQ(CY<cQSO<cQSO7+)cO&5kQSO<zAN>zO%TQUOAN?WOOQO<TQSOANAxOOQQANAzANAzO9^Q(C[OANAzO#MsQSOANAzOOQO'#HV'#HVOOQO7+*d7+*dOOQQG22tG22tOOQQANEOANEOOOQQANEPANEPOOQQANBSANBSO&>]QSOANBSOOQQ<bQSOLD,iO&>jQ$IUO7+'sO&@`Q$IUO7+'uO&BUQ,UOG26{OOQO<ROPYXXYXkYXyYXzYX|YX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX!VYX!WYX~O#yYX~P#@lOP$[OX:XOk9{Oy#xOz#yO|#zO!e9}O!f#vO!h#wO!l$[O#g9yO#h9zO#i9zO#j9zO#k9|O#l9}O#m9}O#n:WO#o9}O#q:OO#s:QO#u:SO#v:TO(SVO(c$YO(j#{O(k#|O~O#y.hO~P#ByO#X:YO#{:YO#y(XX!W(XX~PN}O^'Za!V'Za'l'Za'j'Za!g'Za!S'Zao'Za!X'Za%a'Za!a'Za~P!7sOP#fiX#fi^#fik#fiz#fi!V#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'l#fi(S#fi(c#fi'j#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#,`O^#zi!V#zi'l#zi'j#zi!S#zi!g#zio#zi!X#zi%a#zi!a#zi~P!7sO$W.mO$Y.mO~O$W.nO$Y.nO~O!a)^O#X.oO!X$^X$T$^X$W$^X$Y$^X$a$^X~O!U.pO~O!X)aO$T.rO$W)`O$Y)`O$a.sO~O!V:UO!W(WX~P#ByO!W.tO~O!a)^O$a(lX~O$a.vO~Oq)pO(T)qO(U.yO~O!S.}O~P!&VO!VcX!acX!gcX!g$sX(ccX~P!/ZO!g/TO~P#,`O!V/UO!a#tO(c'fO!g(pX~O!g/ZO~O!U*RO'u%_O!g(pP~O#d/]O~O!S$sX!V$sX!a$zX~P!/ZO!V/^O!S(qX~P#,`O!a/`O~O!S/bO~Ok/fO!a#tO!h%]O(O%QO(c'fO~O'u/hO~O!a+XO~O^%fO!V/lO'l%fO~O!W/nO~P!3XO!]/oO!^/oO'v!kO(V!lO~O|/qO(V!lO~O#T/rO~O'u&POd'`X!V'`X~O!V*kOd(Pa~Od/wO~Oy/xOz/xO|/yOgva(jva(kva!Vva#Xva~Odva#yva~P$ aOy)uO|)vOg$la(j$la(k$la!V$la#X$la~Od$la#y$la~P$!VOy)uO|)vOg$na(j$na(k$na!V$na#X$na~Od$na#y$na~P$!xO#d/{O~Od$|a!V$|a#X$|a#y$|a~P!0dO!a#tO~O#d0OO~O!V*|O^(ua'l(ua~Oy#xOz#yO|#zO!f#vO!h#wO(SVOP!niX!nik!ni!V!ni!e!ni!l!ni#g!ni#h!ni#i!ni#j!ni#k!ni#l!ni#m!ni#n!ni#o!ni#q!ni#s!ni#u!ni#v!ni(c!ni(j!ni(k!ni~O^!ni'l!ni'j!ni!S!ni!g!nio!ni!X!ni%a!ni!a!ni~P$$gOg.TO!X'UO%a.SO~Oi0YO'u0XO~P!1UO!a+XO^'}a!X'}a'l'}a!V'}a~O#d0`O~OXYX!VcX!WcX~O!V0aO!W(yX~O!W0cO~OX0dO~O'u+aO'wTO'zUO~O!X%vO'u%_O]'hX!V'hX~O!V+fO](xa~O!g0iO~P!7sOX0lO~O]0mO~O#X0pO~Og0sO!X${O~O(V(sO!W(vP~Og0|O!X0yO%a0{O(O%QO~OX1WO!V1UO!W(wX~O!W1XO~O]1ZO^%fO'l%fO~O'u#lO'wTO'zUO~O#X$dO#{$dOP(XXX(XXk(XXy(XXz(XX|(XX!V(XX!e(XX!h(XX!l(XX#g(XX#h(XX#i(XX#j(XX#k(XX#l(XX#m(XX#n(XX#q(XX#s(XX#u(XX#v(XX(S(XX(c(XX(j(XX(k(XX~O#o1^O&R1_O^(XX!f(XX~P$+]O#X$dO#o1^O&R1_O~O^1aO~P%TO^1cO~O&[1fOP&YiQ&YiV&Yi^&Yia&Yib&Yii&Yik&Yil&Yim&Yis&Yiu&Yiw&Yi|&Yi!Q&Yi!R&Yi!X&Yi!c&Yi!h&Yi!k&Yi!l&Yi!m&Yi!o&Yi!q&Yi!t&Yi!x&Yi#p&Yi$Q&Yi$U&Yi%`&Yi%b&Yi%d&Yi%e&Yi%f&Yi%i&Yi%k&Yi%n&Yi%o&Yi%q&Yi%}&Yi&T&Yi&V&Yi&X&Yi&Z&Yi&^&Yi&d&Yi&j&Yi&l&Yi&n&Yi&p&Yi&r&Yi'j&Yi'u&Yi'w&Yi'z&Yi(S&Yi(b&Yi(o&Yi!W&Yi_&Yi&a&Yi~O_1lO!W1jO&a1kO~P`O!XXO!h1nO~O&h,iOP&ciQ&ciV&ci^&cia&cib&cii&cik&cil&cim&cis&ciu&ciw&ci|&ci!Q&ci!R&ci!X&ci!c&ci!h&ci!k&ci!l&ci!m&ci!o&ci!q&ci!t&ci!x&ci#p&ci$Q&ci$U&ci%`&ci%b&ci%d&ci%e&ci%f&ci%i&ci%k&ci%n&ci%o&ci%q&ci%}&ci&T&ci&V&ci&X&ci&Z&ci&^&ci&d&ci&j&ci&l&ci&n&ci&p&ci&r&ci'j&ci'u&ci'w&ci'z&ci(S&ci(b&ci(o&ci!W&ci&[&ci_&ci&a&ci~O!S1tO~O!V!Za!W!Za~P#ByOl!mO|!nO!U1zO(V!lO!V'OX!W'OX~P?wO!V,yO!W(Za~O!V'UX!W'UX~P!6{O!V,|O!W(ia~O!W2RO~P'WO^%fO#X2[O'l%fO~O^%fO!a#tO#X2[O'l%fO~O^%fO!a#tO!l2`O#X2[O'l%fO(c'fO~O^%fO'l%fO~P!7sO!V$`Oo$ka~O!S&}i!V&}i~P!7sO!V'zO!S(Yi~O!V(RO!S(gi~O!S(hi!V(hi~P!7sO!V(ei!g(ei^(ei'l(ei~P!7sO#X2bO!V(ei!g(ei^(ei'l(ei~O!V(_O!g(di~O|%`O!X%aO!x]O#b2gO#c2fO'u%_O~O|%`O!X%aO#c2fO'u%_O~Og2nO!X'UO%a2mO~Og2nO!X'UO%a2mO(O%QO~O#dvaPvaXva^vakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva'lva(Sva(cva!gva!Sva'jvaova!Xva%ava!ava~P$ aO#d$laP$laX$la^$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la'l$la(S$la(c$la!g$la!S$la'j$lao$la!X$la%a$la!a$la~P$!VO#d$naP$naX$na^$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na'l$na(S$na(c$na!g$na!S$na'j$nao$na!X$na%a$na!a$na~P$!xO#d$|aP$|aX$|a^$|ak$|az$|a!V$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a'l$|a(S$|a(c$|a!g$|a!S$|a'j$|a#X$|ao$|a!X$|a%a$|a!a$|a~P#,`O^#[q!V#[q'l#[q'j#[q!S#[q!g#[qo#[q!X#[q%a#[q!a#[q~P!7sOd'PX!V'PX~P!'oO!V.^Od(]a~O!U2vO!V'QX!g'QX~P%TO!V.aO!g(^a~O!V.aO!g(^a~P!7sO!S2yO~O#y!ja!W!ja~PJqO#y!ba!V!ba!W!ba~P#ByO#y!na!W!na~P!:^O#y!pa!W!pa~P!`O^#wy!V#wy'l#wy'j#wy!S#wy!g#wyo#wy!X#wy%a#wy!a#wy~P!7sOg;lOy)uO|)vO(j)xO(k)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(S#fi(c#fi!V#fi!W#fi~P%AWO!f#vOP(RXX(RXg(RXk(RXy(RXz(RX|(RX!e(RX!h(RX!l(RX#g(RX#h(RX#i(RX#j(RX#k(RX#l(RX#m(RX#n(RX#o(RX#q(RX#s(RX#u(RX#v(RX#y(RX(S(RX(c(RX(j(RX(k(RX!V(RX!W(RX~O#y#zi!V#zi!W#zi~P#ByO#y!ni!W!ni~P$$gO!W6_O~O!V'Za!W'Za~P#ByO!a#tO(c'fO!V'[a!g'[a~O!V/UO!g(pi~O!V/UO!a#tO!g(pi~Od$uq!V$uq#X$uq#y$uq~P!0dO!S'^a!V'^a~P#,`O!a6fO~O!V/^O!S(qi~P#,`O!V/^O!S(qi~O!S6jO~O!a#tO#o6oO~Ok6pO!a#tO(c'fO~O!S6rO~Od$wq!V$wq#X$wq#y$wq~P!0dO^$iy!V$iy'l$iy'j$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!7sO!a5jO~O!V4VO!X(ra~O^#[y!V#[y'l#[y'j#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!7sOX6wO~O!V0aO!W(yi~O]6}O~O(V(sO!V'cX!W'cX~O!V4mO!W(va~OikO'u7UO~P.bO!W7XO~P%$gOl!mO|7YO'wTO'zUO(V!lO(b!rO~O!X0yO~O!X0yO%a7[O~Og7_O!X0yO%a7[O~OX7dO!V'fa!W'fa~O!V1UO!W(wi~O!g7hO~O!g7iO~O!g7lO~O!g7lO~P%TO^7nO~O!a7oO~O!g7pO~O!V(hi!W(hi~P#ByO^%fO#X7xO'l%fO~O!V(ey!g(ey^(ey'l(ey~P!7sO!V(_O!g(dy~O!X'UO%a7{O~O#d$uqP$uqX$uq^$uqk$uqz$uq!V$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq'l$uq(S$uq(c$uq!g$uq!S$uq'j$uq#X$uqo$uq!X$uq%a$uq!a$uq~P#,`O#d$wqP$wqX$wq^$wqk$wqz$wq!V$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq'l$wq(S$wq(c$wq!g$wq!S$wq'j$wq#X$wqo$wq!X$wq%a$wq!a$wq~P#,`O!V'Qi!g'Qi~P!7sO#y#[q!V#[q!W#[q~P#ByOy/xOz/xO|/yOPvaXvagvakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva#yva(Sva(cva(jva(kva!Vva!Wva~Oy)uO|)vOP$laX$lag$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la#y$la(S$la(c$la(j$la(k$la!V$la!W$la~Oy)uO|)vOP$naX$nag$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na#y$na(S$na(c$na(j$na(k$na!V$na!W$na~OP$|aX$|ak$|az$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a#y$|a(S$|a(c$|a!V$|a!W$|a~P%AWO#y$hq!V$hq!W$hq~P#ByO#y$iq!V$iq!W$iq~P#ByO!W8VO~O#y8WO~P!0dO!a#tO!V'[i!g'[i~O!a#tO(c'fO!V'[i!g'[i~O!V/UO!g(pq~O!S'^i!V'^i~P#,`O!V/^O!S(qq~O!S8^O~P#,`O!S8^O~Od(Qy!V(Qy~P!0dO!V'aa!X'aa~P#,`O^%Tq!X%Tq'l%Tq!V%Tq~P#,`OX8cO~O!V0aO!W(yq~O#X8gO!V'ca!W'ca~O!V4mO!W(vi~P#ByOPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX~O!a%RX#o%RX~P&2WO!X0yO%a8kO~O'wTO'zUO(V8pO~O!V1UO!W(wq~O!g8sO~O!g8tO~O!g8uO~O!g8uO~P%TO#X8xO!V#ay!W#ay~O!V#ay!W#ay~P#ByO!X'UO%a8}O~O#y#wy!V#wy!W#wy~P#ByOP$uiX$uik$uiz$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui#y$ui(S$ui(c$ui!V$ui!W$ui~P%AWOy)uO|)vO(k)zOP%XiX%Xig%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi#y%Xi(S%Xi(c%Xi(j%Xi!V%Xi!W%Xi~Oy)uO|)vOP%ZiX%Zig%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi#y%Zi(S%Zi(c%Zi(j%Zi(k%Zi!V%Zi!W%Zi~O#y$iy!V$iy!W$iy~P#ByO#y#[y!V#[y!W#[y~P#ByO!a#tO!V'[q!g'[q~O!V/UO!g(py~O!S'^q!V'^q~P#,`O!S9UO~P#,`O!V0aO!W(yy~O!V4mO!W(vq~O!X0yO%a9]O~O!g9`O~O!X'UO%a9eO~OP$uqX$uqk$uqz$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq#y$uq(S$uq(c$uq!V$uq!W$uq~P%AWOP$wqX$wqk$wqz$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq#y$wq(S$wq(c$wq!V$wq!W$wq~P%AWOd%]!Z!V%]!Z#X%]!Z#y%]!Z~P!0dO!V'cq!W'cq~P#ByO!V#a!Z!W#a!Z~P#ByO#d%]!ZP%]!ZX%]!Z^%]!Zk%]!Zz%]!Z!V%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z'l%]!Z(S%]!Z(c%]!Z!g%]!Z!S%]!Z'j%]!Z#X%]!Zo%]!Z!X%]!Z%a%]!Z!a%]!Z~P#,`OP%]!ZX%]!Zk%]!Zz%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z#y%]!Z(S%]!Z(c%]!Z!V%]!Z!W%]!Z~P%AWOo(WX~P1jO'v!kO~P!){O!ScX!VcX#XcX~P&2WOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#XYX#XcX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX~O!acX!gYX!gcX(ccX~P&GnOP9pOQ9pOa;aOb!hOikOk9pOlkOmkOskOu9pOw9pO|WO!QkO!RkO!XXO!c9sO!hZO!k9pO!l9pO!m9pO!o9tO!q9wO!t!gO$Q!jO$UfO'u)TO'wTO'zUO(SVO(b[O(o;_O~O!V:UO!W$ka~Oi%ROk$sOl$rOm$rOs%SOu%TOw:[O|$zO!X${O!c;fO!h$wO#c:bO$Q%XO$m:^O$o:`O$r%YO'u(kO'wTO'zUO(O%QO(S$tO~O#p)[O~P&LdO!WYX!WcX~P&GnO#d9xO~O!a#tO#d9xO~O#X:YO~O#o9}O~O#X:dO!V(hX!W(hX~O#X:YO!V(fX!W(fX~O#d:eO~Od:gO~P!0dO#d:lO~O#d:mO~O!a#tO#d:nO~O!a#tO#d:eO~O#y:oO~P#ByO#d:pO~O#d:qO~O#d:rO~O#d:sO~O#d:tO~O#d:uO~O#y:vO~P!0dO#y:wO~P!0dO$U~!f!|!}#P#Q#T#b#c#n(o$m$o$r%U%`%a%b%i%k%n%o%q%s~'pR$U(o#h!R'n'v#il#g#jky'o(V'o'u$W$Y$W~",goto:"$&a(}PPPP)OP)RP)cP*r.uPPPP5UPP5kP;f>mP?QP?QPPP?QP@rP?QP?QP?QP@vPP@{PAfPF]PPPFaPPPPFaIaPPPIgJbPFaPLoPPPPN}FaPPPFaPFaP!#]FaP!&p!'r!'{P!(n!(r!(nPPPPP!+|!'rPP!,j!-dP!0WFaFa!0]!3f!7z!7z!;oPPP!;vFaPPPPPPPPPPP!?SP!@ePPFa!ArPFaPFaFaFaFaPFa!CUPP!F]P!I`P!Id!In!Ir!IrP!FYP!Iv!IvP!LyP!L}FaFa!MT#!V?QP?QP?Q?QP##a?Q?Q#%]?Q#'l?Q#)b?Q?Q#*O#+|#+|#,Q#,Y#+|#,bP#+|P?Q#,z?Q#.T?Q?Q5UPPP#/aPPP#/y#/yP#/yP#0`#/yPP#0fP#0]P#0]#0x#0]#1d#1j5R)R#1m)RP#1t#1t#1tP)RP)RP)RP)RPP)RP#1z#1}P#1})RP#2RP#2UP)RP)RP)RP)RP)RP)R)RPP#2[#2b#2l#2r#2x#3O#3U#3d#3j#3p#3z#4Q#4[#4k#4q#5b#5t#5z#6Q#6`#6u#8W#8f#8l#8r#8x#9O#9Y#9`#9f#9p#:S#:YPPPPPPPPPP#:`PPPPPPP#;S#>ZP#?j#?q#?yPPPP#DX#F}#Me#Mh#Mk#Nd#Ng#Nj#Nq#NyPP$ P$ T$ {$!z$#O$#dPP$#h$#n$#rP$#u$#y$#|$$r$%Y$%p$%t$%w$%z$&Q$&T$&X$&]R!zRmqOXs!Y#b%e&h&j&k&m,a,f1f1iY!tQ'U-R0y4tQ%kuQ%sxQ%z{Q&`!US&|!d,yQ'[!hS'b!q!wS*^${*cQ+_%tQ+l%|Q,Q&YQ-P'TQ-Z']Q-c'cQ/o*eQ1T,RR:c9t$|dOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{,^,a,f-V-_-m-s.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2v4q4{5]5^5a5t7Y7_7n7xS#o]9q!r)V$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ*n%UQ+d%vQ,S&]Q,Z&eQ.W:ZQ0V+VQ0Z+XQ0f+eQ1],XQ2j.TQ4_0aQ5S1UQ6Q2nQ6W:[Q6y4`R8O6R&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bt!mQ!q!t!w!x&|'T'U'b'c'd,y-P-R-c0y4t4v$^$ri#t#v$b$c$w$z%V%W%[)p)v)y){)|*T*Z*i*j+U+X+p+s.S.^/O/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lQ%}{Q&z!dS'Q%a,|Q+d%vQ/z*rQ0f+eQ0k+kQ1[,WQ1],XQ4_0aQ4h0mQ5V1WQ5W1ZQ6y4`Q6|4eQ7g5YQ8f6}R8q7dpnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iR,U&a&t^OPXYstuvy!Y!_!f!i!n#Q#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y'W'h'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;a;b[#ZWZ#U#X&}'x!S%bm#f#g#j%]%`(R(](^(_*y*z*|,],s-q-w-x-y-{1n2f2g5j5{Q%nwQ%rxS%w{%|Q&T!SQ'X!gQ'Z!hQ(f#qS*Q$w*US+^%s%tQ+b%vQ+{&WQ,P&YS-Y'[']Q.V(gQ/Y*RQ0_+_Q0e+eQ0g+fQ0j+jQ1O+|S1S,Q,RQ2W-ZQ3f/UQ4^0aQ4b0dQ4g0lQ5R1TQ6c3gQ6x4`Q6{4dQ8b6wR9W8cv$yi#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h!S%px!h!s%r%s%t&{'Z'[']'a'k*]+^+_,v-Y-Z-b/g0_2P2W2_3yQ+W%nQ+q&QQ+t&RQ,O&YQ.U(fQ0}+{U1R,P,Q,RQ2o.VQ4|1OS5Q1S1TQ7c5R#O;c#t$b$c$w$z)p)v)|*Z+U+X+p+s.S/O/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lg;d:W:X:^:`:b:i:k:m:q:s:wW%Oi%Q*k;_S&Q!P&_Q&R!QQ&S!RR+o&O$_$}i#t#v$b$c$w$z%V%W%[)p)v)y){)|*T*Z*i*j+U+X+p+s.S.^/O/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lT)q$t)rV*o%U:Z:[U'Q!d%a,|S(t#x#yQ+i%yS.O(b(cQ0t+uQ4O/xR7R4m&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;b$i$_c#W#c%i%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.i.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;UT#RV#S&{kOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ'O!dR1{,yv!mQ!d!q!t!w!x&|'T'U'b'c'd,y-P-R-c0y4t4vS*]${*cS/g*^*eQ/p*fQ0v+wQ3y/oR3|/rlqOXs!Y#b%e&h&j&k&m,a,f1f1iQ&o!]Q'l!vS(h#s9xQ+[%qQ+y&TQ+z&VQ-W'YQ-e'eS.[(m:eS/}*w:nQ0]+]Q0x+xQ1m,hQ1o,iQ1w,tQ2U-XQ2X-]S4T0O:tQ4Y0^S4]0`:uQ5l1yQ5p2VQ5u2^Q6v4ZQ7s5nQ7t5qQ7w5vR8w7p$d$^c#W#c%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;US(e#n'_U*h$|(l3YS+R%i.iQ2k0VQ5}2jQ7}6QR9O8O$d$]c#W#c%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;US(d#n'_S(v#y$^S+Q%i.iS.P(c(eQ.l)WQ0S+RR2h.Q&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bS#o]9qQ&j!WQ&k!XQ&m!ZQ&n![R1e,dQ'V!gQ+T%nQ-U'XS.R(f+WQ2S-TW2l.U.V0U0WQ5o2TU5|2i2k2oS7z5}6PS8|7|7}S9c8{9OQ9k9dR9n9lU!uQ'U-RT4r0y4t!O_OXZ`s!U!Y#b#f%]%e&_&a&h&j&k&m(_,a,f-x1f1i]!oQ!q'U-R0y4tT#o]9q%WzOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xS(t#x#yS.O(b(c!s:{$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bY!sQ'U-R0y4tQ'a!qS'k!t!wS'm!x4vS-b'b'cQ-d'dR2_-cQ'j!sS(Z#e1`S-a'a'mQ/X*QQ/e*]Q2`-dQ3k/YS3t/f/pQ6b3fS6m3z3|Q8Y6cR8a6pQ#ubQ'i!sS(Y#e1`S([#k*vQ*x%^Q+Y%oQ+`%uU-`'a'j'mQ-t(ZQ/W*QQ/d*]Q/j*`Q0[+ZQ1P+}S2]-a-dQ2e-|S3j/X/YS3s/e/pQ3v/iQ3x/kQ5O1QQ5w2`Q6a3fQ6e3kS6i3t3|Q6n3{Q7a5PS8X6b6cQ8]6jQ8_6mQ8n7bQ9S8YQ9T8^Q9V8aQ9_8oQ9g9UQ;O:yQ;Z;SR;[;TV!uQ'U-R%WaOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xS#uy!i!r:x$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bR;O;a%WbOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xQ%^j!S%ox!h!s%r%s%t&{'Z'[']'a'k*]+^+_,v-Y-Z-b/g0_2P2W2_3yS%uy!iQ+Z%pQ+}&YW1Q,O,P,Q,RU5P1R1S1TS7b5Q5RQ8o7c!r:y$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ;S;`R;T;a$zeOPXYstuv!Y!_!f!n#Q#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xY#`WZ#U#X'x!S%bm#f#g#j%]%`(R(](^(_*y*z*|,],s-q-w-x-y-{1n2f2g5j5{Q,[&e!p:z$Z$l)i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bR:}&}S'R!d%aR1},|$|dOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{,^,a,f-V-_-m-s.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2v4q4{5]5^5a5t7Y7_7n7x!r)V$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ,Z&eQ0V+VQ2j.TQ6Q2nR8O6R!f$Tc#W%i'w'}(i(p)P)Q)R)S)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9r!T:P)U)g,w.i1u1x2z3S3T3U3V3Z3a5m6V6[6]7T7r8P8T8U9Y9a;U!b$Vc#W%i'w'}(i(p)R)S)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9r!P:R)U)g,w.i1u1x2z3U3V3Z3a5m6V6[6]7T7r8P8T8U9Y9a;U!^$Zc#W%i'w'}(i(p)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9rQ3e/Sz;b)U)g,w.i1u1x2z3Z3a5m6V6[6]7T7r8P8T8U9Y9a;UQ;g;iR;h;j&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bS$mh$nR3^.o'RgOPWXYZhstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l$n%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.o.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bT$if$oQ$gfS)`$j)dR)l$oT$hf$oT)b$j)d'RhOPWXYZhstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l$n%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.o.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bT$mh$nQ$phR)k$n%WjOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7x!s;`$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;b#alOPXZs!Y!_!n#Q#b#m#z$l%e&a&d&e&h&j&k&m&q&y'W(u)i*{+V,^,a,f-V.T.p/y0|1^1_1a1c1f1i1k2n3]4q4{5]5^5a6R7Y7_7nv$|i#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h#O(l#t$b$c$w$z)p)v)|*Z+U+X+p+s.S/O/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lQ*s%YQ.{)ug3Y:W:X:^:`:b:i:k:m:q:s:wv$xi#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;hQ*V$yS*`${*cQ*t%ZQ/k*a#O;Q#t$b$c$w$z)p)v)|*Z+U+X+p+s.S/O/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lf;R:W:X:^:`:b:i:k:m:q:s:wQ;V;cQ;W;dQ;X;eR;Y;fv$|i#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h#O(l#t$b$c$w$z)p)v)|*Z+U+X+p+s.S/O/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lg3Y:W:X:^:`:b:i:k:m:q:s:wloOXs!Y#b%e&h&j&k&m,a,f1f1iQ*Y$zQ,o&tQ,p&vR3n/^$^$}i#t#v$b$c$w$z%V%W%[)p)v)y){)|*T*Z*i*j+U+X+p+s.S.^/O/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lQ+r&RQ0r+tQ4k0qR7Q4lT*b${*cS*b${*cT4s0y4tS/i*_4qT3{/q7YQ+Y%oQ/j*`Q0[+ZQ1P+}Q5O1QQ7a5PQ8n7bR9_8on)y$u(n*u/[/s/t2s3l4R6`6q9R;P;];^!Y:h(j)Z*P*X.Z.w.|/S/a0T0o0q2r3m3q4j4l6S6T6g6k6s6u8[8`9f;i;j]:i3X6Z8Q9P9Q9op){$u(n*u/Q/[/s/t2s3l4R6`6q9R;P;];^![:j(j)Z*P*X.Z.w.|/S/a0T0o0q2p2r3m3q4j4l6S6T6g6k6s6u8[8`9f;i;j_:k3X6Z8Q8R9P9Q9opnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iQ&[!TR,^&epnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iR&[!TQ+v&SR0n+oqnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iQ0z+{S4y0}1OU7Z4w4x4|S8j7]7^S9Z8i8lQ9h9[R9m9iQ&c!UR,V&_R5V1WS%w{%|R0g+fQ&h!VR,a&iR,g&nT1g,f1iR,k&oQ,j&oR1p,kQ'o!yR-g'oQsOQ#bXT%hs#bQ!|TR'q!|Q#PUR's#PQ)r$tR.x)rQ#SVR'u#SQ#VWU'{#V'|-nQ'|#WR-n'}Q,z'OR1|,zQ._(nR2t._Q.b(pS2w.b2xR2x.cQ-R'UR2Q-RY!qQ'U-R0y4tR'`!qS#]W%`U(S#](T-oQ(T#^R-o(OQ,}'RR2O,}r`OXs!U!Y#b%e&_&a&h&j&k&m,a,f1f1iS#fZ%]U#p`#f-xR-x(_Q(`#hQ-u([W-}(`-u2c5yQ2c-vR5y2dQ)d$jR.q)dQ$nhR)j$nQ$acU)Y$a-j:VQ-j9rR:V)gQ/V*QW3h/V3i6d8ZU3i/W/X/YS6d3j3kR8Z6e#o)w$u(j(n)Z*P*X*p*q*u.X.Y.Z.w.|/Q/R/S/[/a/s/t0T0o0q2p2q2r2s3X3l3m3q4R4j4l6S6T6X6Y6Z6`6g6k6q6s6u8Q8R8S8[8`9P9Q9R9f9o;P;];^;i;jQ/_*XU3p/_3r6hQ3r/aR6h3qQ*c${R/m*cQ*l%PR/v*lQ4W0TR6t4WQ*}%cR0R*}Q4n0tS7S4n8hR8h7TQ+x&TR0w+xQ4t0yR7W4tQ1V,SS5T1V7eR7e5VQ0b+bW4a0b4c6z8dQ4c0eQ6z4bR8d6{Q+g%wR0h+gQ1i,fR5e1iWrOXs#bQ&l!YQ+P%eQ,`&hQ,b&jQ,c&kQ,e&mQ1d,aS1g,f1iR5d1fQ%gpQ&p!^Q&s!`Q&u!aQ&w!bQ'g!sQ+O%dQ+[%qQ+n%}Q,U&cQ,m&rW-^'a'i'j'mQ-e'eQ/l*bQ0]+]S1Y,V,YQ1q,lQ1r,oQ1s,pQ2X-]W2Z-`-a-d-fQ4Y0^Q4f0kQ4i0oQ4}1PQ5X1[Q5c1eU5r2Y2]2`Q5u2^Q6v4ZQ7O4hQ7P4jQ7V4sQ7`5OQ7f5WS7u5s5wQ7w5vQ8e6|Q8m7aQ8r7gQ8y7vQ9X8fQ9^8nQ9b8zR9j9_Q%qxQ'Y!hQ'e!sU+]%r%s%tQ,t&{U-X'Z'[']S-]'a'kQ/c*]S0^+^+_Q1y,vS2V-Y-ZQ2^-bQ3u/gQ4Z0_Q5n2PQ5q2WQ5v2_R6l3yS$vi;_R*m%QU%Pi%Q;_R/u*kQ$uiS(j#t+XQ(n#vS)Z$b$cQ*P$wQ*X$zQ*p%VQ*q%WQ*u%[Q.X:]Q.Y:_Q.Z:aQ.w)pS.|)v/OQ/Q)yQ/R){Q/S)|Q/[*TQ/a*ZQ/s*iQ/t*jh0T+U.S0{2m4z6O7[7{8k8}9]9eQ0o+pQ0q+sQ2p:hQ2q:jQ2r:lQ2s.^S3X:W:XQ3l/]Q3m/^Q3q/`Q4R/{Q4j0pQ4l0sQ6S:pQ6T:rQ6X:^Q6Y:`Q6Z:bQ6`3eQ6g3oQ6k3wQ6q3}Q6s4VQ6u4XQ8Q:mQ8R:iQ8S:kQ8[6fQ8`6oQ9P:qQ9Q:sQ9R8WQ9f:vQ9o:wQ;P;_Q;];gQ;^;hQ;i;kR;j;llpOXs!Y#b%e&h&j&k&m,a,f1f1iQ!ePS#dZ#mQ&r!_U'^!n4q7YQ't#QQ(w#zQ)h$lS,Y&a&dQ,_&eQ,l&qQ,q&yQ-T'WQ.e(uQ.u)iQ0P*{Q0W+VQ1b,^Q2T-VQ2k.TQ3`.pQ4P/yQ4x0|Q5Z1^Q5[1_Q5`1aQ5b1cQ5g1kQ5}2nQ6^3]Q7^4{Q7j5]Q7k5^Q7m5aQ7}6RQ8l7_R8v7n#UcOPXZs!Y!_!n#b#m#z%e&a&d&e&h&j&k&m&q&y'W(u*{+V,^,a,f-V.T/y0|1^1_1a1c1f1i1k2n4q4{5]5^5a6R7Y7_7nQ#WWQ#cYQ%itQ%juS%lv!fS'w#U'zQ'}#XQ(i#sQ(p#wQ(x#}Q(y$OQ(z$PQ({$QQ(|$RQ(}$SQ)O$TQ)P$UQ)Q$VQ)R$WQ)S$XQ)U$ZQ)X$`Q)]$dW)g$l)i.p3]Q+S%kQ+h%xS,w&}1zQ-f'hS-k'x-mQ-p(QQ-r(XQ.](mQ.c(qQ.g9pQ.i9sQ.j9tQ.k9wQ.z)tQ/|*wQ1u,rQ1x,uQ2Y-_Q2a-sQ2u.aQ2z9xQ2{9yQ2|9zQ2}9{Q3O9|Q3P9}Q3Q:OQ3R:PQ3S:QQ3T:RQ3U:SQ3V:TQ3W.hQ3Z:YQ3[:cQ3a:UQ4S0OQ4[0`Q5m:dQ5s2[Q5x2bQ6U2vQ6V:eQ6[:gQ6]:nQ7T4oQ7r5kQ7v5tQ8P:oQ8T:tQ8U:uQ8z7xQ9Y8gQ9a8xQ9r#QR;U;bR#YWR'P!dY!sQ'U-R0y4tS&{!d,yQ'a!qS'k!t!wS'm!x4vS,v&|'TS-b'b'cQ-d'dQ2P-PR2_-cR(o#vR(r#wQ!eQT-Q'U-R]!pQ!q'U-R0y4tQ#n]R'_9qT#iZ%]S#hZ%]S%cm,]U([#f#g#jS-v(](^Q-z(_Q0Q*|Q2d-wU2e-x-y-{S5z2f2gR7y5{`#[W#U#X%`'x(R*y-qr#eZm#f#g#j%](](^(_*|-w-x-y-{2f2g5{Q1`,]Q1v,sQ5i1nQ7q5jT:|&}*zT#_W%`S#^W%`S'y#U(RS(O#X*yS,x&}*zT-l'x-qT'S!d%aQ$jfR)n$oT)c$j)dR3_.oT*S$w*UR*[$zQ0U+UQ2i.SQ4w0{Q6P2mQ7]4zQ7|6OQ8i7[Q8{7{Q9[8kQ9d8}Q9i9]R9l9elqOXs!Y#b%e&h&j&k&m,a,f1f1iQ&b!UR,U&_rmOXs!T!U!Y#b%e&_&h&j&k&m,a,f1f1iR,]&eT%dm,]R0u+uR,T&]Q%{{R+m%|R+c%vT&f!V&iT&g!V&iT1h,f1i",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:366,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,207,208,210,213,216,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Vi],skippedNodes:[0,3,4,269],repeatNodeCount:33,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'{!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'{!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'xpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'xpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'xp'{!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'xp'{!b'n(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'y#S$d&j'o(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'xp'{!b'o(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'w$(n$d&j'{!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'{!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'{!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'{!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'{!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'xp'{!b(V!LY'u&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'xp'{!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'xp'{!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(k%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'xp'{!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'xp'{!b'o(;d(V!LY'u&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Ui,Ri,2,3,4,5,6,7,8,9,10,11,12,13,vi,new le("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(U~~",141,327),new le("j~RQYZXz{^~^O'r~~aP!P!Qd~iO's~~",25,309)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:12794,ts:12796},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:313,get:O=>_i[O]||-1},{term:329,get:O=>Ci[O]||-1},{term:67,get:O=>Wi[O]||-1}],tokenPrec:12820}),ji=[Z("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Z("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Z("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Z("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Z("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Z(`try { +import{S as dt,i as pt,s as St,e as $t,f as gt,U as H,g as mt,y as Ge,o as Pt,J as Xt,K as Zt,L as bt,I as kt,C as xt,M as wt}from"./index-7d8498e9.js";import{P as yt,N as Yt,u as Tt,D as vt,v as Te,T as Oe,I as ve,w as J,x as n,y as Ut,L,z as M,A as V,B as F,F as Ue,G as K,H as j,J as bO,K as kO,M as xO,E as R,O as N,Q as Rt,R as Vt,U as wO,V as Z,W as _t,X as Ct,a as z,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 Ie,C as ee}from"./index-4841d67b.js";class re{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 re(e,[],a,t,t,0,[],0,i?new Ae(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=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.lastBigReductionSizel;)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]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 re(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;so&1&&l==r)||i.push(a[s],r)}a=i}let t=[];for(let i=0;i>19,i=a&65535,s=this.stack.length-t*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;a=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(a),!0}findForcedReduction(){let{parser:e}=this.p,a=[],t=(i,s)=>{if(!a.includes(i))return a.push(i),e.allActions(i,r=>{if(!(r&393216))if(r&65536){let l=(r>>19)-s;if(l>1){let o=r&65535,Q=this.stack.length-l*3;if(Q>=0&&e.getGoto(this.stack[Q],o,!1)>=0)return l<<19|65536|o}}else{let l=t(r,s+1);if(l!=null)return l}})};return t(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ae{constructor(e,a){this.tracker=e,this.context=a,this.hash=e.strict?e.hash(a):0}}class Oa{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let a=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class se{constructor(e,a,t){this.stack=e,this.pos=a,this.index=t,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,a=e.bufferBase+e.buffer.length){return new se(e,a,a-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new se(this.stack,this.pos,this.index)}}function E(O,e=Uint16Array){if(typeof O!="string")return O;let a=null;for(let t=0,i=0;t=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,l=!0),s+=o,l)break;s*=46}a?a[i++]=s:a=new e(s)}return a}class te{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ee=new te;class ta{constructor(e,a){this.input=e,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ee,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(e,a){let t=this.range,i=this.rangeIndex,s=this.pos+e;for(;st.to:s>=t.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];s+=r.from-t.to,t=r}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,a.from);return this.end}peek(e){let a=this.chunkOff+e,t,i;if(a>=0&&a=this.chunk2Pos&&tl.to&&(this.chunk2=this.chunk2.slice(0,l.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,a){if(a?(this.token=a,a.start=e,a.lookAhead=e+1,a.value=a.extended=-1):this.token=Ee,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,a-this.chunkPos);if(e>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,a-this.chunk2Pos);if(e>=this.range.from&&a<=this.range.to)return this.input.read(e,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>e&&(t+=this.input.read(Math.max(i.from,e),Math.min(i.to,a)))}return t}}class C{constructor(e,a){this.data=e,this.id=a}token(e,a){let{parser:t}=a.p;yO(this.data,e,a,this.id,t.data,t.tokenPrecTable)}}C.prototype.contextual=C.prototype.fallback=C.prototype.extend=!1;class le{constructor(e,a,t){this.precTable=a,this.elseToken=t,this.data=typeof e=="string"?E(e):e}token(e,a){let t=e.pos,i=0;for(;;){let s=e.next<0,r=e.resolveOffset(1,1);if(yO(this.data,e,a,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,r==null)break;e.reset(r,e.token)}i&&(e.reset(t,e.token),e.acceptToken(this.elseToken,i))}}le.prototype.contextual=C.prototype.fallback=C.prototype.extend=!1;class b{constructor(e,a={}){this.token=e,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function yO(O,e,a,t,i,s){let r=0,l=1<0){let p=O[u];if(o.allows(p)&&(e.token.value==-1||e.token.value==p||aa(p,e.token.value,i,s))){e.acceptToken(p);break}}let f=e.next,c=0,h=O[r+2];if(e.next<0&&h>c&&O[Q+h*3-3]==65535&&O[Q+h*3-3]==65535){r=O[Q+h*3-1];continue e}for(;c>1,p=Q+u+(u<<1),g=O[p],$=O[p+1]||65536;if(f=$)c=u+1;else{r=O[p+2],e.advance();continue e}}break}}function Ne(O,e,a){for(let t=e,i;(i=O[t])!=65535;t++)if(i==a)return t-e;return-1}function aa(O,e,a,t){let i=Ne(a,t,e);return i<0||Ne(a,t,O)e)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,e-25)):Math.min(O.length,Math.max(t.from+1,e+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:O.length}}class ia{constructor(e,a){this.fragments=e,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Be(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Be(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=r,null;if(s instanceof Oe){if(r==e){if(r=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[a]++,this.nextStart=r+s.length}}}class ra{constructor(e,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(t=>new te)}getActions(e){let a=0,t=null,{parser:i}=e.p,{tokenizers:s}=i,r=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let h=a;if(c.extended>-1&&(a=this.addActions(e,c.extended,c.end,a)),a=this.addActions(e,c.value,c.end,a),!f.extend&&(t=c,a>h))break}}for(;this.actions.length>a;)this.actions.pop();return o&&e.setLookAhead(o),!t&&e.pos==this.stream.end&&(t=new te,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,a=this.addActions(e,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let a=new te,{pos:t,p:i}=e;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(e,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,e),t),e.value>-1){let{parser:s}=t.p;for(let r=0;r=0&&t.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,a,t,i){for(let s=0;se.bufferLength*4?new ia(t,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,a=this.minStackPos,t=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[r]=e;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;ra)t.push(l);else{if(this.advanceStack(l,t,e))continue;{i||(i=[],s=[]),i.push(l);let o=this.tokens.getMainToken(l);s.push(o.value,o.end)}}break}}if(!t.length){let r=i&&na(i);if(r)return P&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw P&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,t);if(r)return P&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(t.length>r)for(t.sort((l,o)=>o.score-l.score);t.length>r;)t.pop();t.some(l=>l.reducePos>a)&&this.recovering--}else if(t.length>1){e:for(let r=0;r500&&Q.buffer.length>500)if((l.score-Q.score||l.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(r--,1);continue e}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let r=1;r ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let Q=e.curContext&&e.curContext.tracker.strict,f=Q?e.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let h=this.parser.nodeSet.types[c.type.id]==c.type?s.getGoto(e.state,c.type.id):-1;if(h>-1&&c.length&&(!Q||(c.prop(Te.contextHash)||0)==f))return e.useNode(c,h),P&&console.log(r+this.stackID(e)+` (via reuse of ${s.getName(c.type.id)})`),!0;if(!(c instanceof Oe)||c.children.length==0||c.positions[0]>0)break;let u=c.children[0];if(u instanceof Oe&&c.positions[0]==0)c=u;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),P&&console.log(r+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(e,a){let t=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>t)return De(e,a),!0}}runRecovery(e,a,t){let i=null,s=!1;for(let r=0;r ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),P&&console.log(f+this.stackID(l)+" (restarted)"),this.advanceFully(l,t))))continue;let c=l.split(),h=f;for(let u=0;c.forceReduce()&&u<10&&(P&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));u++)P&&(h=this.stackID(c)+" -> ");for(let u of l.recoverByInsert(o))P&&console.log(f+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,t);this.stream.end>l.pos?(Q==l.pos&&(Q++,o=0),l.recoverByDelete(o,Q),P&&console.log(f+this.stackID(l)+` (via recover-delete ${this.parser.getName(o)})`),De(l,t)):(!i||i.scoreO;class YO{constructor(e){this.start=e.start,this.shift=e.shift||de,this.reduce=e.reduce||de,this.reuse=e.reuse||de,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class T extends yt{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let a=e.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let l=0;le.topRules[l][1]),i=[];for(let l=0;l=0)s(f,o,l[Q++]);else{let c=l[Q+-f];for(let h=-f;h>0;h--)s(l[Q++],o,c);Q++}}}this.nodeSet=new Yt(a.map((l,o)=>Tt.define({name:o>=this.minRepeatTerm?void 0:l,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=vt;let r=E(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new C(r,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,a,t){let i=new sa(this,e,a,t);for(let s of this.wrappers)i=s(i,e,a,t);return i}getGoto(e,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let s=i[a+1];;){let r=i[s++],l=r&1,o=i[s++];if(l&&t)return o;for(let Q=s+(r>>1);s0}validAction(e,a){return!!this.allActions(e,t=>t==a?!0:null)}allActions(e,a){let t=this.stateSlot(e,4),i=t?a(t):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=x(this.data,s+2);else break;i=a(x(this.data,s+1))}return i}nextStates(e){let a=[];for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=x(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((s,r)=>r&1&&s==i)||a.push(this.data[t],i)}}return a}configure(e){let a=Object.assign(Object.create(T.prototype),this);if(e.props&&(a.nodeSet=this.nodeSet.extend(...e.props)),e.top){let t=this.topRules[e.top];if(!t)throw new RangeError(`Invalid top rule name ${e.top}`);a.top=t}return e.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=e.tokenizers.find(s=>s.from==t);return i?i.to:t})),e.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let s=e.specializers.find(l=>l.from==t.external);if(!s)return t;let r=Object.assign(Object.assign({},t),{external:s.to});return a.specializers[i]=Je(r),r})),e.contextTracker&&(a.context=e.contextTracker),e.dialect&&(a.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(a.strict=e.strict),e.wrap&&(a.wrappers=a.wrappers.concat(e.wrap)),e.bufferLength!=null&&(a.bufferLength=e.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let a=this.dynamicPrecedences;return a==null?0:a[e]||0}parseDialect(e){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(e)for(let s of e.split(" ")){let r=a.indexOf(s);r>=0&&(t[r]=!0)}let i=null;for(let s=0;st)&&a.p.parser.stateFlag(a.state,2)&&(!e||e.scoreO.external(a,t)<<1|e}return O.get}const oa=54,ca=1,Qa=55,ua=2,fa=56,ha=3,Le=4,da=5,ne=6,TO=7,vO=8,UO=9,RO=10,pa=11,Sa=12,$a=13,pe=57,ga=14,Me=58,VO=20,ma=22,_O=23,Pa=24,ke=26,CO=27,Xa=28,Za=31,ba=34,ka=36,xa=37,wa=0,ya=1,Ya={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Ta={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Fe={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function va(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function WO(O){return O==9||O==10||O==13||O==32}let Ke=null,He=null,eO=0;function xe(O,e){let a=O.pos+e;if(eO==a&&He==O)return Ke;let t=O.peek(e);for(;WO(t);)t=O.peek(++e);let i="";for(;va(t);)i+=String.fromCharCode(t),t=O.peek(++e);return He=O,eO=a,Ke=i?i.toLowerCase():t==Ua||t==Ra?void 0:null}const qO=60,oe=62,Re=47,Ua=63,Ra=33,Va=45;function OO(O,e){this.name=O,this.parent=e,this.hash=e?e.hash:0;for(let a=0;a-1?new OO(xe(t,1)||"",O):O},reduce(O,e){return e==VO&&O?O.parent:O},reuse(O,e,a,t){let i=e.type.id;return i==ne||i==ka?new OO(xe(t,1)||"",O):O},hash(O){return O?O.hash:0},strict:!1}),Wa=new b((O,e)=>{if(O.next!=qO){O.next<0&&e.context&&O.acceptToken(pe);return}O.advance();let a=O.next==Re;a&&O.advance();let t=xe(O,0);if(t===void 0)return;if(!t)return O.acceptToken(a?ga:ne);let i=e.context?e.context.name:null;if(a){if(t==i)return O.acceptToken(pa);if(i&&Ta[i])return O.acceptToken(pe,-2);if(e.dialectEnabled(wa))return O.acceptToken(Sa);for(let s=e.context;s;s=s.parent)if(s.name==t)return;O.acceptToken($a)}else{if(t=="script")return O.acceptToken(TO);if(t=="style")return O.acceptToken(vO);if(t=="textarea")return O.acceptToken(UO);if(Ya.hasOwnProperty(t))return O.acceptToken(RO);i&&Fe[i]&&Fe[i][t]?O.acceptToken(pe,-1):O.acceptToken(ne)}},{contextual:!0}),qa=new b(O=>{for(let e=0,a=0;;a++){if(O.next<0){a&&O.acceptToken(Me);break}if(O.next==Va)e++;else if(O.next==oe&&e>=2){a>3&&O.acceptToken(Me,-2);break}else e=0;O.advance()}});function ja(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}const za=new b((O,e)=>{if(O.next==Re&&O.peek(1)==oe){let a=e.dialectEnabled(ya)||ja(e.context);O.acceptToken(a?da:Le,2)}else O.next==oe&&O.acceptToken(Le,1)});function Ve(O,e,a){let t=2+O.length;return new b(i=>{for(let s=0,r=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(s==0&&i.next==qO||s==1&&i.next==Re||s>=2&&sr?i.acceptToken(e,-r):i.acceptToken(a,-(r-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else s=r=0;i.advance()}})}const Ga=Ve("script",oa,ca),Ia=Ve("style",Qa,ua),Aa=Ve("textarea",fa,ha),Ea=J({"Text RawText":n.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":n.angleBracket,TagName:n.tagName,"MismatchedCloseTag/TagName":[n.tagName,n.invalid],AttributeName:n.attributeName,"AttributeValue UnquotedAttributeValue":n.attributeValue,Is:n.definitionOperator,"EntityReference CharacterReference":n.character,Comment:n.blockComment,ProcessingInst:n.processingInstruction,DoctypeDecl:n.documentMeta}),Na=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ca,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ea],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let Q=l.type.id;if(Q==Xa)return Se(l,o,a);if(Q==Za)return Se(l,o,t);if(Q==ba)return Se(l,o,i);if(Q==VO&&s.length){let f=l.node,c=f.firstChild,h=c&&tO(c,o),u;if(h){for(let p of s)if(p.tag==h&&(!p.attrs||p.attrs(u||(u=jO(f,o))))){let g=f.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:g.type.id==xa?g.from:f.to}]}}}}if(r&&Q==_O){let f=l.node,c;if(c=f.firstChild){let h=r[o.read(c.from,c.to)];if(h)for(let u of h){if(u.tagName&&u.tagName!=tO(f.parent,o))continue;let p=f.lastChild;if(p.type.id==ke){let g=p.from+1,$=p.lastChild,k=p.to-($&&$.isError?0:1);if(k>g)return{parser:u.parser,overlay:[{from:g,to:k}]}}else if(p.type.id==CO)return{parser:u.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Ba=96,aO=1,Da=97,Ja=98,iO=2,GO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],La=58,Ma=40,IO=95,Fa=91,ae=45,Ka=46,Ha=35,ei=37;function ce(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function Oi(O){return O>=48&&O<=57}const ti=new b((O,e)=>{for(let a=!1,t=0,i=0;;i++){let{next:s}=O;if(ce(s)||s==ae||s==IO||a&&Oi(s))!a&&(s!=ae||i>0)&&(a=!0),t===i&&s==ae&&t++,O.advance();else{a&&O.acceptToken(s==Ma?Da:t==2&&e.canShift(iO)?iO:Ja);break}}}),ai=new b(O=>{if(GO.includes(O.peek(-1))){let{next:e}=O;(ce(e)||e==IO||e==Ha||e==Ka||e==Fa||e==La||e==ae)&&O.acceptToken(Ba)}}),ii=new b(O=>{if(!GO.includes(O.peek(-1))){let{next:e}=O;if(e==ei&&(O.advance(),O.acceptToken(aO)),ce(e)){do O.advance();while(ce(O.next));O.acceptToken(aO)}}}),ri=J({"AtKeyword import charset namespace keyframes media supports":n.definitionKeyword,"from to selector":n.keyword,NamespaceName:n.namespace,KeyframeName:n.labelName,KeyframeRangeName:n.operatorKeyword,TagName:n.tagName,ClassName:n.className,PseudoClassName:n.constant(n.className),IdName:n.labelName,"FeatureName PropertyName":n.propertyName,AttributeName:n.attributeName,NumberLiteral:n.number,KeywordQuery:n.keyword,UnaryQueryOp:n.operatorKeyword,"CallTag ValueName":n.atom,VariableName:n.variableName,Callee:n.operatorKeyword,Unit:n.unit,"UniversalSelector NestingSelector":n.definitionOperator,MatchOp:n.compareOperator,"ChildOp SiblingOp, LogicOp":n.logicOperator,BinOp:n.arithmeticOperator,Important:n.modifier,Comment:n.blockComment,ColorLiteral:n.color,"ParenthesizedContent StringLiteral":n.string,":":n.punctuation,"PseudoOp #":n.derefOperator,"; ,":n.separator,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace}),si={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},li={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},ni={__proto__:null,not:128,only:128},oi=T.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O)QQ[O,59SO$qQ[O,59kO$vQ[O,59oO(^Q[O,59sO(^Q[O,59uO(^Q[O,59vO)]Q[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)dQWO,59SO)iQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)nQ`O,59oOOQS'#Cp'#CpO${QdO'#CqO)vQvO'#CsO+TQtO,5:POOQO'#Cx'#CxO)iQWO'#CwO+iQWO'#CyOOQS'#Em'#EmOOQO'#Dh'#DhO+nQ[O'#DoO+|QWO'#EqO&]Q[O'#DmO,[QWO'#DpOOQO'#Er'#ErO({QWO,5:^O,aQpO,5:`OOQS'#Dx'#DxO,iQWO,5:bO,nQ[O,5:bOOQO'#D{'#D{O,vQWO,5:eO,{QWO,5:kO-TQWO,5:mOOQS-E8S-E8SO${QdO,59{O-]Q[O'#EZO-jQWO,5;[O-jQWO,5;[POOO'#ET'#ETP-uO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO.lQXO,5:sOOQO-E8V-E8VOOQS1G.g1G.gOOQP1G.n1G.nO)dQWO1G.nO)iQWO1G.nOOQP1G/V1G/VO.yQ`O1G/ZO/dQXO1G/_O/zQXO1G/aO0bQXO1G/bO0xQWO,59zO0}Q[O'#DOO1UQdO'#CoOOQP1G/Z1G/ZO${QdO1G/ZO1]QpO,59]OOQS,59_,59_O${QdO,59aO1eQWO1G/kOOQS,59c,59cO1jQ!bO,59eO1rQWO'#DhO1}QWO,5:TO2SQWO,5:ZO&]Q[O,5:VO&]Q[O'#E[O2[QWO,5;]O2gQWO,5:XO(^Q[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2xQWO1G/|O2}QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO3YQtO1G/gOOQO,5:u,5:uO3pQ[O,5:uOOQO-E8X-E8XO3}QWO1G0vPOOO-E8R-E8RPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$u7+$uO${QdO7+$uOOQS1G/f1G/fO4YQXO'#EoO4aQWO,59jO4fQtO'#EVO5ZQdO'#ElO5eQWO,59ZO5jQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5rQWO1G/PO${QdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5wQWO,5:vOOQO-E8Y-E8YO6VQXO1G/vOOQS7+%h7+%hO6^QYO'#CsOOQO'#EO'#EOO6iQ`O'#D}OOQO'#D}'#D}O6tQWO'#E]O6|QdO,5:hOOQS,5:h,5:hO7XQtO'#EYO${QdO'#EYO8VQdO7+%ROOQO7+%R7+%ROOQO1G0a1G0aO8jQpO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#b[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSp^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#_QOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#X~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!W^Oy%^z;'S%^;'S;=`%o<%lO%^dCoSzSOy%^z;'S%^;'S;=`%o<%lO%^bDQU|QOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS|Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!YQo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bFfSxQOy%^z;'S%^;'S;=`%o<%lO%^lFwSv[Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!`Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[ai,ii,ti,1,2,3,4,new le("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:O=>si[O]||-1},{term:56,get:O=>li[O]||-1},{term:98,get:O=>ni[O]||-1}],tokenPrec:1169});let $e=null;function ge(){if(!$e&&typeof document=="object"&&document.body){let{style:O}=document.body,e=[],a=new Set;for(let t in O)t!="cssText"&&t!="cssFloat"&&typeof O[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(e.push(t),a.add(t)));$e=e.sort().map(t=>({type:"property",label:t}))}return $e||[]}const rO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(O=>({type:"class",label:O})),sO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(O=>({type:"keyword",label:O})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(O=>({type:"constant",label:O}))),ci=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(O=>({type:"type",label:O})),Y=/^(\w[\w-]*|-\w[\w-]*|)$/,Qi=/^-(-[\w-]*)?$/;function ui(O,e){var a;if((O.name=="("||O.type.isError)&&(O=O.parent||O),O.name!="ArgList")return!1;let t=(a=O.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:e.sliceString(t.from,t.to)=="var"}const lO=new bO,fi=["Declaration"];function hi(O){for(let e=O;;){if(e.type.isTop)return e;if(!(e=e.parent))return O}}function AO(O,e,a){if(e.to-e.from>4096){let t=lO.get(e);if(t)return t;let i=[],s=new Set,r=e.cursor(ve.IncludeAnonymous);if(r.firstChild())do for(let l of AO(O,r.node,a))s.has(l.label)||(s.add(l.label),i.push(l));while(r.nextSibling());return lO.set(e,i),i}else{let t=[],i=new Set;return e.cursor().iterate(s=>{var r;if(a(s)&&s.matchContext(fi)&&((r=s.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let l=O.sliceString(s.from,s.to);i.has(l)||(i.add(l),t.push({label:l,type:"variable"}))}}),t}}const di=O=>e=>{let{state:a,pos:t}=e,i=j(a).resolveInner(t,-1),s=i.type.isError&&i.from==i.to-1&&a.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:ge(),validFor:Y};if(i.name=="ValueName")return{from:i.from,options:sO,validFor:Y};if(i.name=="PseudoClassName")return{from:i.from,options:rO,validFor:Y};if(O(i)||(e.explicit||s)&&ui(i,a.doc))return{from:O(i)||s?i.from:t,options:AO(a.doc,hi(i),O),validFor:Qi};if(i.name=="TagName"){for(let{parent:o}=i;o;o=o.parent)if(o.name=="Block")return{from:i.from,options:ge(),validFor:Y};return{from:i.from,options:ci,validFor:Y}}if(!e.explicit)return null;let r=i.resolve(t),l=r.childBefore(t);return l&&l.name==":"&&r.name=="PseudoClassSelector"?{from:t,options:rO,validFor:Y}:l&&l.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:t,options:sO,validFor:Y}:r.name=="Block"||r.name=="Styles"?{from:t,options:ge(),validFor:Y}:null},pi=di(O=>O.name=="VariableName"),Qe=L.define({name:"css",parser:oi.configure({props:[M.add({Declaration:V()}),F.add({"Block KeyframeList":Ue})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Si(){return new K(Qe,Qe.data.of({autocomplete:pi}))}const $i=303,nO=1,gi=2,mi=304,Pi=306,Xi=307,Zi=3,bi=4,ki=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],EO=125,xi=59,oO=47,wi=42,yi=43,Yi=45,Ti=new YO({start:!1,shift(O,e){return e==Zi||e==bi||e==Pi?O:e==Xi},strict:!1}),vi=new b((O,e)=>{let{next:a}=O;(a==EO||a==-1||e.context)&&O.acceptToken(mi)},{contextual:!0,fallback:!0}),Ui=new b((O,e)=>{let{next:a}=O,t;ki.indexOf(a)>-1||a==oO&&((t=O.peek(1))==oO||t==wi)||a!=EO&&a!=xi&&a!=-1&&!e.context&&O.acceptToken($i)},{contextual:!0}),Ri=new b((O,e)=>{let{next:a}=O;if((a==yi||a==Yi)&&(O.advance(),a==O.next)){O.advance();let t=!e.context&&e.canShift(nO);O.acceptToken(t?nO:gi)}},{contextual:!0}),Vi=J({"get set async static":n.modifier,"for while do if else switch try catch finally return throw break continue default case":n.controlKeyword,"in of await yield void typeof delete instanceof":n.operatorKeyword,"let var const function class extends":n.definitionKeyword,"import export from":n.moduleKeyword,"with debugger as new":n.keyword,TemplateString:n.special(n.string),super:n.atom,BooleanLiteral:n.bool,this:n.self,null:n.null,Star:n.modifier,VariableName:n.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":n.function(n.variableName),VariableDefinition:n.definition(n.variableName),Label:n.labelName,PropertyName:n.propertyName,PrivatePropertyName:n.special(n.propertyName),"CallExpression/MemberExpression/PropertyName":n.function(n.propertyName),"FunctionDeclaration/VariableDefinition":n.function(n.definition(n.variableName)),"ClassDeclaration/VariableDefinition":n.definition(n.className),PropertyDefinition:n.definition(n.propertyName),PrivatePropertyDefinition:n.definition(n.special(n.propertyName)),UpdateOp:n.updateOperator,LineComment:n.lineComment,BlockComment:n.blockComment,Number:n.number,String:n.string,Escape:n.escape,ArithOp:n.arithmeticOperator,LogicOp:n.logicOperator,BitOp:n.bitwiseOperator,CompareOp:n.compareOperator,RegExp:n.regexp,Equals:n.definitionOperator,Arrow:n.function(n.punctuation),": Spread":n.punctuation,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace,"InterpolationStart InterpolationEnd":n.special(n.brace),".":n.derefOperator,", ;":n.separator,"@":n.meta,TypeName:n.typeName,TypeDefinition:n.definition(n.typeName),"type enum interface implements namespace module declare":n.definitionKeyword,"abstract global Privacy readonly override":n.modifier,"is keyof unique infer":n.operatorKeyword,JSXAttributeValue:n.attributeValue,JSXText:n.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":n.angleBracket,"JSXIdentifier JSXNameSpacedName":n.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":n.attributeName,"JSXBuiltin/JSXIdentifier":n.standard(n.tagName)}),_i={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,using:413,interface:419,enum:423,namespace:429,module:431,declare:435,global:439,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},Ci={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},Wi={__proto__:null,"<":137},qi=T.deserialize({version:14,states:"$6tO`QUOOO%TQUOOO'WQWOOP(eOSOOO*sQ(CjO'#CfO*zOpO'#CgO+YO!bO'#CgO+hO07`O'#DZO-yQUO'#DaO.ZQUO'#DlO%TQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0xQSO'#ETOOQO'#Ei'#EiOOQO'#Ic'#IcO1QQSO'#GkO1]QSO'#EhO1bQSO'#EhO3dQ(CjO'#JdO6TQ(CjO'#JeO6qQSO'#FWO6vQ#tO'#FoOOQ(CY'#F`'#F`O7RO&jO'#F`O7aQ,UO'#FvO8wQSO'#FuOOQ(CY'#Je'#JeOOQ(CW'#Jd'#JdO8|QSO'#GoOOQQ'#KP'#KPO9XQSO'#IPO9^Q(C[O'#IQOOQQ'#JQ'#JQOOQQ'#IU'#IUQ`QUOOO%TQUO'#DnO9fQUO'#DzO9mQUO'#D|O9SQSO'#GkO9tQ,UO'#ClO:SQSO'#EgO:_QSO'#ErO:dQ,UO'#F_O;RQSO'#GkOOQO'#KQ'#KQO;WQSO'#KQO;fQSO'#GsO;fQSO'#GtO;fQSO'#GvO9SQSO'#GyO<]QSO'#G|O=tQSO'#CbO>UQSO'#HYO>^QSO'#H`O>^QSO'#HbO`QUO'#HdO>^QSO'#HfO>^QSO'#HiO>cQSO'#HoO>hQ(C]O'#HuO%TQUO'#HwO>sQ(C]O'#HyO?OQ(C]O'#H{O9^Q(C[O'#H}O?ZQ(CjO'#CfO@]QWO'#DfQOQSOOO%TQUO'#D|O@sQSO'#EPO9tQ,UO'#EgOAOQSO'#EgOAZQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jh'#JhO%TQUO'#JhOOQO'#Jl'#JlOOQO'#I`'#I`OBZQWO'#E`OOQ(CW'#E_'#E_OCVQ(C`O'#E`OCaQWO'#ESOOQO'#Jk'#JkOCuQWO'#JlOESQWO'#ESOCaQWO'#E`PEaO?MpO'#C`POOO)CDo)CDoOOOO'#IV'#IVOElOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOEzO!bO,59RO%TQUO'#D]OOOO'#IY'#IYOFYO07`O,59uOOQ(CY,59u,59uOFhQUO'#IZOF{QSO'#JfOH}QbO'#JfO+vQUO'#JfOIUQSO,59{OIlQSO'#EiOIyQSO'#JtOJUQSO'#JsOJUQSO'#JsOJ^QSO,5;VOJcQSO'#JrOOQ(CY,5:W,5:WOJjQUO,5:WOLkQ(CjO,5:bOM[QSO,5:jOMuQ(C[O'#JqOM|QSO'#JpO8|QSO'#JpONbQSO'#JpONjQSO,5;UONoQSO'#JpO!!wQbO'#JeOOQ(CY'#Cf'#CfO%TQUO'#EOO!#gQ`O,5:oOOQO'#Jm'#JmOOQO-EkOOQQ'#JY'#JYOOQQ,5>l,5>lOOQQ-EqQ(CjO,5:hOOQO,5@l,5@lO!?bQ,UO,5=VO!?pQ(C[O'#JZO8wQSO'#JZO!@RQ(C[O,59WO!@^QWO,59WO!@fQ,UO,59WO9tQ,UO,59WO!@qQSO,5;SO!@yQSO'#HXO!A[QSO'#KUO%TQUO,5;wO!7[QWO,5;yO!AdQSO,5=rO!AiQSO,5=rO!AnQSO,5=rO9^Q(C[O,5=rO;fQSO,5=bOOQO'#Cr'#CrO!A|QWO,5=_O!BUQ,UO,5=`O!BaQSO,5=bO!BfQ`O,5=eO!BnQSO'#KQO>cQSO'#HOO9SQSO'#HQO!BsQSO'#HQO9tQ,UO'#HSO!BxQSO'#HSOOQQ,5=h,5=hO!B}QSO'#HTO!CVQSO'#ClO!C[QSO,58|O!CfQSO,58|O!EkQUO,58|OOQQ,58|,58|O!E{Q(C[O,58|O%TQUO,58|O!HWQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!HnQSO,5=tO`QUO,5=zO`QUO,5=|O!HsQSO,5>OO`QUO,5>QO!HxQSO,5>TO!H}QUO,5>ZOOQQ,5>a,5>aO%TQUO,5>aO9^Q(C[O,5>cOOQQ,5>e,5>eO!MXQSO,5>eOOQQ,5>g,5>gO!MXQSO,5>gOOQQ,5>i,5>iO!M^QWO'#DXO%TQUO'#JhO!M{QWO'#JhO!NjQWO'#DgO!N{QWO'#DgO##^QUO'#DgO##eQSO'#JgO##mQSO,5:QO##rQSO'#EmO#$QQSO'#JuO#$YQSO,5;WO#$_QWO'#DgO#$lQWO'#EROOQ(CY,5:k,5:kO%TQUO,5:kO#$sQSO,5:kO>cQSO,5;RO!@^QWO,5;RO!@fQ,UO,5;RO9tQ,UO,5;RO#${QSO,5@SO#%QQ!LQO,5:oOOQO-E<^-E<^O#&WQ(C`O,5:zOCaQWO,5:nO#&bQWO,5:nOCaQWO,5:zO!@RQ(C[O,5:nOOQ(CW'#Ec'#EcOOQO,5:z,5:zO%TQUO,5:zO#&oQ(C[O,5:zO#&zQ(C[O,5:zO!@^QWO,5:nOOQO,5;Q,5;QO#'YQ(C[O,5:zPOOO'#IT'#ITP#'nO?MpO,58zPOOO,58z,58zOOOO-EuO+vQUO,5>uOOQO,5>{,5>{O#(YQUO'#IZOOQO-E^QSO1G3jO$.OQUO1G3lO$2SQUO'#HkOOQQ1G3o1G3oO$2aQSO'#HqO>cQSO'#HsOOQQ1G3u1G3uO$2iQUO1G3uO9^Q(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9^Q(C[O1G4PO9^Q(C[O1G4RO$6pQSO,5@SO!){QUO,5;XO8|QSO,5;XO>cQSO,5:RO!){QUO,5:RO!@^QWO,5:RO$6uQ$IUO,5:ROOQO,5;X,5;XO$7PQWO'#I[O$7gQSO,5@ROOQ(CY1G/l1G/lO$7oQWO'#IbO$7yQSO,5@aOOQ(CW1G0r1G0rO!N{QWO,5:ROOQO'#I_'#I_O$8RQWO,5:mOOQ(CY,5:m,5:mO#$vQSO1G0VOOQ(CY1G0V1G0VO%TQUO1G0VOOQ(CY1G0m1G0mO>cQSO1G0mO!@^QWO1G0mO!@fQ,UO1G0mOOQ(CW1G5n1G5nO!@RQ(C[O1G0YOOQO1G0f1G0fO%TQUO1G0fO$8YQ(C[O1G0fO$8eQ(C[O1G0fO!@^QWO1G0YOCaQWO1G0YO$8sQ(C[O1G0fOOQO1G0Y1G0YO$9XQ(CjO1G0fPOOO-EuO$9uQSO1G5lO$9}QSO1G5yO$:VQbO1G5zO8|QSO,5>{O$:aQ(CjO1G5wO%TQUO1G5wO$:qQ(C[O1G5wO$;SQSO1G5vO$;SQSO1G5vO8|QSO1G5vO$;[QSO,5?OO8|QSO,5?OOOQO,5?O,5?OO$;pQSO,5?OO$$QQSO,5?OOOQO-EqQ(CjO,5VOOQQ,5>V,5>VO%TQUO'#HlO%(SQSO'#HnOOQQ,5>],5>]O8|QSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%(XQWO1G5nO%(mQ$IUO1G0sO%(wQSO1G0sOOQO1G/m1G/mO%)SQ$IUO1G/mO>cQSO1G/mO!){QUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!@^QWO1G/mOOQO-E<]-E<]OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO#$vQSO7+%qOOQ(CY7+&X7+&XO>cQSO7+&XO!@^QWO7+&XOOQO7+%t7+%tO$9XQ(CjO7+&QOOQO7+&Q7+&QO%TQUO7+&QO%)^Q(C[O7+&QO!@RQ(C[O7+%tO!@^QWO7+%tO%)iQ(C[O7+&QO%)wQ(CjO7++cO%TQUO7++cO%*XQSO7++bO%*XQSO7++bOOQO1G4j1G4jO8|QSO1G4jO%*aQSO1G4jOOQO7+%y7+%yO#$vQSO<wOOQO-ExO%TQUO,5>xOOQO-E<[-E<[O%2aQSO1G5pOOQ(CY<QQ$IUO1G0xO%>XQ$IUO1G0xO%@PQ$IUO1G0xO%@dQ(CjO<WOOQQ,5>Y,5>YO%M}QSO1G3wO8|QSO7+&_O!){QUO7+&_OOQO7+%X7+%XO%NSQ$IUO1G5zO>cQSO7+%XOOQ(CY<cQSO<cQSO7+)cO&5kQSO<zAN>zO%TQUOAN?WOOQO<TQSOANAxOOQQANAzANAzO9^Q(C[OANAzO#MsQSOANAzOOQO'#HV'#HVOOQO7+*d7+*dOOQQG22tG22tOOQQANEOANEOOOQQANEPANEPOOQQANBSANBSO&>]QSOANBSOOQQ<bQSOLD,iO&>jQ$IUO7+'sO&@`Q$IUO7+'uO&BUQ,UOG26{OOQO<ROPYXXYXkYXyYXzYX|YX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX!VYX!WYX~O#yYX~P#@lOP$[OX:XOk9{Oy#xOz#yO|#zO!e9}O!f#vO!h#wO!l$[O#g9yO#h9zO#i9zO#j9zO#k9|O#l9}O#m9}O#n:WO#o9}O#q:OO#s:QO#u:SO#v:TO(SVO(c$YO(j#{O(k#|O~O#y.hO~P#ByO#X:YO#{:YO#y(XX!W(XX~PN}O^'Za!V'Za'l'Za'j'Za!g'Za!S'Zao'Za!X'Za%a'Za!a'Za~P!7sOP#fiX#fi^#fik#fiz#fi!V#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'l#fi(S#fi(c#fi'j#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#,`O^#zi!V#zi'l#zi'j#zi!S#zi!g#zio#zi!X#zi%a#zi!a#zi~P!7sO$W.mO$Y.mO~O$W.nO$Y.nO~O!a)^O#X.oO!X$^X$T$^X$W$^X$Y$^X$a$^X~O!U.pO~O!X)aO$T.rO$W)`O$Y)`O$a.sO~O!V:UO!W(WX~P#ByO!W.tO~O!a)^O$a(lX~O$a.vO~Oq)pO(T)qO(U.yO~O!S.}O~P!&VO!VcX!acX!gcX!g$sX(ccX~P!/ZO!g/TO~P#,`O!V/UO!a#tO(c'fO!g(pX~O!g/ZO~O!U*RO'u%_O!g(pP~O#d/]O~O!S$sX!V$sX!a$zX~P!/ZO!V/^O!S(qX~P#,`O!a/`O~O!S/bO~Ok/fO!a#tO!h%]O(O%QO(c'fO~O'u/hO~O!a+XO~O^%fO!V/lO'l%fO~O!W/nO~P!3XO!]/oO!^/oO'v!kO(V!lO~O|/qO(V!lO~O#T/rO~O'u&POd'`X!V'`X~O!V*kOd(Pa~Od/wO~Oy/xOz/xO|/yOgva(jva(kva!Vva#Xva~Odva#yva~P$ aOy)uO|)vOg$la(j$la(k$la!V$la#X$la~Od$la#y$la~P$!VOy)uO|)vOg$na(j$na(k$na!V$na#X$na~Od$na#y$na~P$!xO#d/{O~Od$|a!V$|a#X$|a#y$|a~P!0dO!a#tO~O#d0OO~O!V*|O^(ua'l(ua~Oy#xOz#yO|#zO!f#vO!h#wO(SVOP!niX!nik!ni!V!ni!e!ni!l!ni#g!ni#h!ni#i!ni#j!ni#k!ni#l!ni#m!ni#n!ni#o!ni#q!ni#s!ni#u!ni#v!ni(c!ni(j!ni(k!ni~O^!ni'l!ni'j!ni!S!ni!g!nio!ni!X!ni%a!ni!a!ni~P$$gOg.TO!X'UO%a.SO~Oi0YO'u0XO~P!1UO!a+XO^'}a!X'}a'l'}a!V'}a~O#d0`O~OXYX!VcX!WcX~O!V0aO!W(yX~O!W0cO~OX0dO~O'u+aO'wTO'zUO~O!X%vO'u%_O]'hX!V'hX~O!V+fO](xa~O!g0iO~P!7sOX0lO~O]0mO~O#X0pO~Og0sO!X${O~O(V(sO!W(vP~Og0|O!X0yO%a0{O(O%QO~OX1WO!V1UO!W(wX~O!W1XO~O]1ZO^%fO'l%fO~O'u#lO'wTO'zUO~O#X$dO#{$dOP(XXX(XXk(XXy(XXz(XX|(XX!V(XX!e(XX!h(XX!l(XX#g(XX#h(XX#i(XX#j(XX#k(XX#l(XX#m(XX#n(XX#q(XX#s(XX#u(XX#v(XX(S(XX(c(XX(j(XX(k(XX~O#o1^O&R1_O^(XX!f(XX~P$+]O#X$dO#o1^O&R1_O~O^1aO~P%TO^1cO~O&[1fOP&YiQ&YiV&Yi^&Yia&Yib&Yii&Yik&Yil&Yim&Yis&Yiu&Yiw&Yi|&Yi!Q&Yi!R&Yi!X&Yi!c&Yi!h&Yi!k&Yi!l&Yi!m&Yi!o&Yi!q&Yi!t&Yi!x&Yi#p&Yi$Q&Yi$U&Yi%`&Yi%b&Yi%d&Yi%e&Yi%f&Yi%i&Yi%k&Yi%n&Yi%o&Yi%q&Yi%}&Yi&T&Yi&V&Yi&X&Yi&Z&Yi&^&Yi&d&Yi&j&Yi&l&Yi&n&Yi&p&Yi&r&Yi'j&Yi'u&Yi'w&Yi'z&Yi(S&Yi(b&Yi(o&Yi!W&Yi_&Yi&a&Yi~O_1lO!W1jO&a1kO~P`O!XXO!h1nO~O&h,iOP&ciQ&ciV&ci^&cia&cib&cii&cik&cil&cim&cis&ciu&ciw&ci|&ci!Q&ci!R&ci!X&ci!c&ci!h&ci!k&ci!l&ci!m&ci!o&ci!q&ci!t&ci!x&ci#p&ci$Q&ci$U&ci%`&ci%b&ci%d&ci%e&ci%f&ci%i&ci%k&ci%n&ci%o&ci%q&ci%}&ci&T&ci&V&ci&X&ci&Z&ci&^&ci&d&ci&j&ci&l&ci&n&ci&p&ci&r&ci'j&ci'u&ci'w&ci'z&ci(S&ci(b&ci(o&ci!W&ci&[&ci_&ci&a&ci~O!S1tO~O!V!Za!W!Za~P#ByOl!mO|!nO!U1zO(V!lO!V'OX!W'OX~P?wO!V,yO!W(Za~O!V'UX!W'UX~P!6{O!V,|O!W(ia~O!W2RO~P'WO^%fO#X2[O'l%fO~O^%fO!a#tO#X2[O'l%fO~O^%fO!a#tO!l2`O#X2[O'l%fO(c'fO~O^%fO'l%fO~P!7sO!V$`Oo$ka~O!S&}i!V&}i~P!7sO!V'zO!S(Yi~O!V(RO!S(gi~O!S(hi!V(hi~P!7sO!V(ei!g(ei^(ei'l(ei~P!7sO#X2bO!V(ei!g(ei^(ei'l(ei~O!V(_O!g(di~O|%`O!X%aO!x]O#b2gO#c2fO'u%_O~O|%`O!X%aO#c2fO'u%_O~Og2nO!X'UO%a2mO~Og2nO!X'UO%a2mO(O%QO~O#dvaPvaXva^vakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva'lva(Sva(cva!gva!Sva'jvaova!Xva%ava!ava~P$ aO#d$laP$laX$la^$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la'l$la(S$la(c$la!g$la!S$la'j$lao$la!X$la%a$la!a$la~P$!VO#d$naP$naX$na^$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na'l$na(S$na(c$na!g$na!S$na'j$nao$na!X$na%a$na!a$na~P$!xO#d$|aP$|aX$|a^$|ak$|az$|a!V$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a'l$|a(S$|a(c$|a!g$|a!S$|a'j$|a#X$|ao$|a!X$|a%a$|a!a$|a~P#,`O^#[q!V#[q'l#[q'j#[q!S#[q!g#[qo#[q!X#[q%a#[q!a#[q~P!7sOd'PX!V'PX~P!'oO!V.^Od(]a~O!U2vO!V'QX!g'QX~P%TO!V.aO!g(^a~O!V.aO!g(^a~P!7sO!S2yO~O#y!ja!W!ja~PJqO#y!ba!V!ba!W!ba~P#ByO#y!na!W!na~P!:^O#y!pa!W!pa~P!`O^#wy!V#wy'l#wy'j#wy!S#wy!g#wyo#wy!X#wy%a#wy!a#wy~P!7sOg;lOy)uO|)vO(j)xO(k)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(S#fi(c#fi!V#fi!W#fi~P%AWO!f#vOP(RXX(RXg(RXk(RXy(RXz(RX|(RX!e(RX!h(RX!l(RX#g(RX#h(RX#i(RX#j(RX#k(RX#l(RX#m(RX#n(RX#o(RX#q(RX#s(RX#u(RX#v(RX#y(RX(S(RX(c(RX(j(RX(k(RX!V(RX!W(RX~O#y#zi!V#zi!W#zi~P#ByO#y!ni!W!ni~P$$gO!W6_O~O!V'Za!W'Za~P#ByO!a#tO(c'fO!V'[a!g'[a~O!V/UO!g(pi~O!V/UO!a#tO!g(pi~Od$uq!V$uq#X$uq#y$uq~P!0dO!S'^a!V'^a~P#,`O!a6fO~O!V/^O!S(qi~P#,`O!V/^O!S(qi~O!S6jO~O!a#tO#o6oO~Ok6pO!a#tO(c'fO~O!S6rO~Od$wq!V$wq#X$wq#y$wq~P!0dO^$iy!V$iy'l$iy'j$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!7sO!a5jO~O!V4VO!X(ra~O^#[y!V#[y'l#[y'j#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!7sOX6wO~O!V0aO!W(yi~O]6}O~O(V(sO!V'cX!W'cX~O!V4mO!W(va~OikO'u7UO~P.bO!W7XO~P%$gOl!mO|7YO'wTO'zUO(V!lO(b!rO~O!X0yO~O!X0yO%a7[O~Og7_O!X0yO%a7[O~OX7dO!V'fa!W'fa~O!V1UO!W(wi~O!g7hO~O!g7iO~O!g7lO~O!g7lO~P%TO^7nO~O!a7oO~O!g7pO~O!V(hi!W(hi~P#ByO^%fO#X7xO'l%fO~O!V(ey!g(ey^(ey'l(ey~P!7sO!V(_O!g(dy~O!X'UO%a7{O~O#d$uqP$uqX$uq^$uqk$uqz$uq!V$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq'l$uq(S$uq(c$uq!g$uq!S$uq'j$uq#X$uqo$uq!X$uq%a$uq!a$uq~P#,`O#d$wqP$wqX$wq^$wqk$wqz$wq!V$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq'l$wq(S$wq(c$wq!g$wq!S$wq'j$wq#X$wqo$wq!X$wq%a$wq!a$wq~P#,`O!V'Qi!g'Qi~P!7sO#y#[q!V#[q!W#[q~P#ByOy/xOz/xO|/yOPvaXvagvakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva#yva(Sva(cva(jva(kva!Vva!Wva~Oy)uO|)vOP$laX$lag$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la#y$la(S$la(c$la(j$la(k$la!V$la!W$la~Oy)uO|)vOP$naX$nag$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na#y$na(S$na(c$na(j$na(k$na!V$na!W$na~OP$|aX$|ak$|az$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a#y$|a(S$|a(c$|a!V$|a!W$|a~P%AWO#y$hq!V$hq!W$hq~P#ByO#y$iq!V$iq!W$iq~P#ByO!W8VO~O#y8WO~P!0dO!a#tO!V'[i!g'[i~O!a#tO(c'fO!V'[i!g'[i~O!V/UO!g(pq~O!S'^i!V'^i~P#,`O!V/^O!S(qq~O!S8^O~P#,`O!S8^O~Od(Qy!V(Qy~P!0dO!V'aa!X'aa~P#,`O^%Tq!X%Tq'l%Tq!V%Tq~P#,`OX8cO~O!V0aO!W(yq~O#X8gO!V'ca!W'ca~O!V4mO!W(vi~P#ByOPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX~O!a%RX#o%RX~P&2WO!X0yO%a8kO~O'wTO'zUO(V8pO~O!V1UO!W(wq~O!g8sO~O!g8tO~O!g8uO~O!g8uO~P%TO#X8xO!V#ay!W#ay~O!V#ay!W#ay~P#ByO!X'UO%a8}O~O#y#wy!V#wy!W#wy~P#ByOP$uiX$uik$uiz$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui#y$ui(S$ui(c$ui!V$ui!W$ui~P%AWOy)uO|)vO(k)zOP%XiX%Xig%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi#y%Xi(S%Xi(c%Xi(j%Xi!V%Xi!W%Xi~Oy)uO|)vOP%ZiX%Zig%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi#y%Zi(S%Zi(c%Zi(j%Zi(k%Zi!V%Zi!W%Zi~O#y$iy!V$iy!W$iy~P#ByO#y#[y!V#[y!W#[y~P#ByO!a#tO!V'[q!g'[q~O!V/UO!g(py~O!S'^q!V'^q~P#,`O!S9UO~P#,`O!V0aO!W(yy~O!V4mO!W(vq~O!X0yO%a9]O~O!g9`O~O!X'UO%a9eO~OP$uqX$uqk$uqz$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq#y$uq(S$uq(c$uq!V$uq!W$uq~P%AWOP$wqX$wqk$wqz$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq#y$wq(S$wq(c$wq!V$wq!W$wq~P%AWOd%]!Z!V%]!Z#X%]!Z#y%]!Z~P!0dO!V'cq!W'cq~P#ByO!V#a!Z!W#a!Z~P#ByO#d%]!ZP%]!ZX%]!Z^%]!Zk%]!Zz%]!Z!V%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z'l%]!Z(S%]!Z(c%]!Z!g%]!Z!S%]!Z'j%]!Z#X%]!Zo%]!Z!X%]!Z%a%]!Z!a%]!Z~P#,`OP%]!ZX%]!Zk%]!Zz%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z#y%]!Z(S%]!Z(c%]!Z!V%]!Z!W%]!Z~P%AWOo(WX~P1jO'v!kO~P!){O!ScX!VcX#XcX~P&2WOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#XYX#XcX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX~O!acX!gYX!gcX(ccX~P&GnOP9pOQ9pOa;aOb!hOikOk9pOlkOmkOskOu9pOw9pO|WO!QkO!RkO!XXO!c9sO!hZO!k9pO!l9pO!m9pO!o9tO!q9wO!t!gO$Q!jO$UfO'u)TO'wTO'zUO(SVO(b[O(o;_O~O!V:UO!W$ka~Oi%ROk$sOl$rOm$rOs%SOu%TOw:[O|$zO!X${O!c;fO!h$wO#c:bO$Q%XO$m:^O$o:`O$r%YO'u(kO'wTO'zUO(O%QO(S$tO~O#p)[O~P&LdO!WYX!WcX~P&GnO#d9xO~O!a#tO#d9xO~O#X:YO~O#o9}O~O#X:dO!V(hX!W(hX~O#X:YO!V(fX!W(fX~O#d:eO~Od:gO~P!0dO#d:lO~O#d:mO~O!a#tO#d:nO~O!a#tO#d:eO~O#y:oO~P#ByO#d:pO~O#d:qO~O#d:rO~O#d:sO~O#d:tO~O#d:uO~O#y:vO~P!0dO#y:wO~P!0dO$U~!f!|!}#P#Q#T#b#c#n(o$m$o$r%U%`%a%b%i%k%n%o%q%s~'pR$U(o#h!R'n'v#il#g#jky'o(V'o'u$W$Y$W~",goto:"$&a(}PPPP)OP)RP)cP*r.uPPPP5UPP5kP;f>mP?QP?QPPP?QP@rP?QP?QP?QP@vPP@{PAfPF]PPPFaPPPPFaIaPPPIgJbPFaPLoPPPPN}FaPPPFaPFaP!#]FaP!&p!'r!'{P!(n!(r!(nPPPPP!+|!'rPP!,j!-dP!0WFaFa!0]!3f!7z!7z!;oPPP!;vFaPPPPPPPPPPP!?SP!@ePPFa!ArPFaPFaFaFaFaPFa!CUPP!F]P!I`P!Id!In!Ir!IrP!FYP!Iv!IvP!LyP!L}FaFa!MT#!V?QP?QP?Q?QP##a?Q?Q#%]?Q#'l?Q#)b?Q?Q#*O#+|#+|#,Q#,Y#+|#,bP#+|P?Q#,z?Q#.T?Q?Q5UPPP#/aPPP#/y#/yP#/yP#0`#/yPP#0fP#0]P#0]#0x#0]#1d#1j5R)R#1m)RP#1t#1t#1tP)RP)RP)RP)RPP)RP#1z#1}P#1})RP#2RP#2UP)RP)RP)RP)RP)RP)R)RPP#2[#2b#2l#2r#2x#3O#3U#3d#3j#3p#3z#4Q#4[#4k#4q#5b#5t#5z#6Q#6`#6u#8W#8f#8l#8r#8x#9O#9Y#9`#9f#9p#:S#:YPPPPPPPPPP#:`PPPPPPP#;S#>ZP#?j#?q#?yPPPP#DX#F}#Me#Mh#Mk#Nd#Ng#Nj#Nq#NyPP$ P$ T$ {$!z$#O$#dPP$#h$#n$#rP$#u$#y$#|$$r$%Y$%p$%t$%w$%z$&Q$&T$&X$&]R!zRmqOXs!Y#b%e&h&j&k&m,a,f1f1iY!tQ'U-R0y4tQ%kuQ%sxQ%z{Q&`!US&|!d,yQ'[!hS'b!q!wS*^${*cQ+_%tQ+l%|Q,Q&YQ-P'TQ-Z']Q-c'cQ/o*eQ1T,RR:c9t$|dOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{,^,a,f-V-_-m-s.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2v4q4{5]5^5a5t7Y7_7n7xS#o]9q!r)V$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ*n%UQ+d%vQ,S&]Q,Z&eQ.W:ZQ0V+VQ0Z+XQ0f+eQ1],XQ2j.TQ4_0aQ5S1UQ6Q2nQ6W:[Q6y4`R8O6R&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bt!mQ!q!t!w!x&|'T'U'b'c'd,y-P-R-c0y4t4v$^$ri#t#v$b$c$w$z%V%W%[)p)v)y){)|*T*Z*i*j+U+X+p+s.S.^/O/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lQ%}{Q&z!dS'Q%a,|Q+d%vQ/z*rQ0f+eQ0k+kQ1[,WQ1],XQ4_0aQ4h0mQ5V1WQ5W1ZQ6y4`Q6|4eQ7g5YQ8f6}R8q7dpnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iR,U&a&t^OPXYstuvy!Y!_!f!i!n#Q#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y'W'h'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;a;b[#ZWZ#U#X&}'x!S%bm#f#g#j%]%`(R(](^(_*y*z*|,],s-q-w-x-y-{1n2f2g5j5{Q%nwQ%rxS%w{%|Q&T!SQ'X!gQ'Z!hQ(f#qS*Q$w*US+^%s%tQ+b%vQ+{&WQ,P&YS-Y'[']Q.V(gQ/Y*RQ0_+_Q0e+eQ0g+fQ0j+jQ1O+|S1S,Q,RQ2W-ZQ3f/UQ4^0aQ4b0dQ4g0lQ5R1TQ6c3gQ6x4`Q6{4dQ8b6wR9W8cv$yi#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h!S%px!h!s%r%s%t&{'Z'[']'a'k*]+^+_,v-Y-Z-b/g0_2P2W2_3yQ+W%nQ+q&QQ+t&RQ,O&YQ.U(fQ0}+{U1R,P,Q,RQ2o.VQ4|1OS5Q1S1TQ7c5R#O;c#t$b$c$w$z)p)v)|*Z+U+X+p+s.S/O/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lg;d:W:X:^:`:b:i:k:m:q:s:wW%Oi%Q*k;_S&Q!P&_Q&R!QQ&S!RR+o&O$_$}i#t#v$b$c$w$z%V%W%[)p)v)y){)|*T*Z*i*j+U+X+p+s.S.^/O/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lT)q$t)rV*o%U:Z:[U'Q!d%a,|S(t#x#yQ+i%yS.O(b(cQ0t+uQ4O/xR7R4m&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;b$i$_c#W#c%i%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.i.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;UT#RV#S&{kOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ'O!dR1{,yv!mQ!d!q!t!w!x&|'T'U'b'c'd,y-P-R-c0y4t4vS*]${*cS/g*^*eQ/p*fQ0v+wQ3y/oR3|/rlqOXs!Y#b%e&h&j&k&m,a,f1f1iQ&o!]Q'l!vS(h#s9xQ+[%qQ+y&TQ+z&VQ-W'YQ-e'eS.[(m:eS/}*w:nQ0]+]Q0x+xQ1m,hQ1o,iQ1w,tQ2U-XQ2X-]S4T0O:tQ4Y0^S4]0`:uQ5l1yQ5p2VQ5u2^Q6v4ZQ7s5nQ7t5qQ7w5vR8w7p$d$^c#W#c%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;US(e#n'_U*h$|(l3YS+R%i.iQ2k0VQ5}2jQ7}6QR9O8O$d$]c#W#c%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;US(d#n'_S(v#y$^S+Q%i.iS.P(c(eQ.l)WQ0S+RR2h.Q&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bS#o]9qQ&j!WQ&k!XQ&m!ZQ&n![R1e,dQ'V!gQ+T%nQ-U'XS.R(f+WQ2S-TW2l.U.V0U0WQ5o2TU5|2i2k2oS7z5}6PS8|7|7}S9c8{9OQ9k9dR9n9lU!uQ'U-RT4r0y4t!O_OXZ`s!U!Y#b#f%]%e&_&a&h&j&k&m(_,a,f-x1f1i]!oQ!q'U-R0y4tT#o]9q%WzOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xS(t#x#yS.O(b(c!s:{$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bY!sQ'U-R0y4tQ'a!qS'k!t!wS'm!x4vS-b'b'cQ-d'dR2_-cQ'j!sS(Z#e1`S-a'a'mQ/X*QQ/e*]Q2`-dQ3k/YS3t/f/pQ6b3fS6m3z3|Q8Y6cR8a6pQ#ubQ'i!sS(Y#e1`S([#k*vQ*x%^Q+Y%oQ+`%uU-`'a'j'mQ-t(ZQ/W*QQ/d*]Q/j*`Q0[+ZQ1P+}S2]-a-dQ2e-|S3j/X/YS3s/e/pQ3v/iQ3x/kQ5O1QQ5w2`Q6a3fQ6e3kS6i3t3|Q6n3{Q7a5PS8X6b6cQ8]6jQ8_6mQ8n7bQ9S8YQ9T8^Q9V8aQ9_8oQ9g9UQ;O:yQ;Z;SR;[;TV!uQ'U-R%WaOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xS#uy!i!r:x$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bR;O;a%WbOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xQ%^j!S%ox!h!s%r%s%t&{'Z'[']'a'k*]+^+_,v-Y-Z-b/g0_2P2W2_3yS%uy!iQ+Z%pQ+}&YW1Q,O,P,Q,RU5P1R1S1TS7b5Q5RQ8o7c!r:y$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ;S;`R;T;a$zeOPXYstuv!Y!_!f!n#Q#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xY#`WZ#U#X'x!S%bm#f#g#j%]%`(R(](^(_*y*z*|,],s-q-w-x-y-{1n2f2g5j5{Q,[&e!p:z$Z$l)i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bR:}&}S'R!d%aR1},|$|dOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{,^,a,f-V-_-m-s.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2v4q4{5]5^5a5t7Y7_7n7x!r)V$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ,Z&eQ0V+VQ2j.TQ6Q2nR8O6R!f$Tc#W%i'w'}(i(p)P)Q)R)S)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9r!T:P)U)g,w.i1u1x2z3S3T3U3V3Z3a5m6V6[6]7T7r8P8T8U9Y9a;U!b$Vc#W%i'w'}(i(p)R)S)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9r!P:R)U)g,w.i1u1x2z3U3V3Z3a5m6V6[6]7T7r8P8T8U9Y9a;U!^$Zc#W%i'w'}(i(p)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9rQ3e/Sz;b)U)g,w.i1u1x2z3Z3a5m6V6[6]7T7r8P8T8U9Y9a;UQ;g;iR;h;j&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bS$mh$nR3^.o'RgOPWXYZhstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l$n%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.o.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bT$if$oQ$gfS)`$j)dR)l$oT$hf$oT)b$j)d'RhOPWXYZhstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l$n%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.o.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bT$mh$nQ$phR)k$n%WjOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7x!s;`$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;b#alOPXZs!Y!_!n#Q#b#m#z$l%e&a&d&e&h&j&k&m&q&y'W(u)i*{+V,^,a,f-V.T.p/y0|1^1_1a1c1f1i1k2n3]4q4{5]5^5a6R7Y7_7nv$|i#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h#O(l#t$b$c$w$z)p)v)|*Z+U+X+p+s.S/O/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lQ*s%YQ.{)ug3Y:W:X:^:`:b:i:k:m:q:s:wv$xi#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;hQ*V$yS*`${*cQ*t%ZQ/k*a#O;Q#t$b$c$w$z)p)v)|*Z+U+X+p+s.S/O/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lf;R:W:X:^:`:b:i:k:m:q:s:wQ;V;cQ;W;dQ;X;eR;Y;fv$|i#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h#O(l#t$b$c$w$z)p)v)|*Z+U+X+p+s.S/O/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lg3Y:W:X:^:`:b:i:k:m:q:s:wloOXs!Y#b%e&h&j&k&m,a,f1f1iQ*Y$zQ,o&tQ,p&vR3n/^$^$}i#t#v$b$c$w$z%V%W%[)p)v)y){)|*T*Z*i*j+U+X+p+s.S.^/O/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lQ+r&RQ0r+tQ4k0qR7Q4lT*b${*cS*b${*cT4s0y4tS/i*_4qT3{/q7YQ+Y%oQ/j*`Q0[+ZQ1P+}Q5O1QQ7a5PQ8n7bR9_8on)y$u(n*u/[/s/t2s3l4R6`6q9R;P;];^!Y:h(j)Z*P*X.Z.w.|/S/a0T0o0q2r3m3q4j4l6S6T6g6k6s6u8[8`9f;i;j]:i3X6Z8Q9P9Q9op){$u(n*u/Q/[/s/t2s3l4R6`6q9R;P;];^![:j(j)Z*P*X.Z.w.|/S/a0T0o0q2p2r3m3q4j4l6S6T6g6k6s6u8[8`9f;i;j_:k3X6Z8Q8R9P9Q9opnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iQ&[!TR,^&epnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iR&[!TQ+v&SR0n+oqnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iQ0z+{S4y0}1OU7Z4w4x4|S8j7]7^S9Z8i8lQ9h9[R9m9iQ&c!UR,V&_R5V1WS%w{%|R0g+fQ&h!VR,a&iR,g&nT1g,f1iR,k&oQ,j&oR1p,kQ'o!yR-g'oQsOQ#bXT%hs#bQ!|TR'q!|Q#PUR's#PQ)r$tR.x)rQ#SVR'u#SQ#VWU'{#V'|-nQ'|#WR-n'}Q,z'OR1|,zQ._(nR2t._Q.b(pS2w.b2xR2x.cQ-R'UR2Q-RY!qQ'U-R0y4tR'`!qS#]W%`U(S#](T-oQ(T#^R-o(OQ,}'RR2O,}r`OXs!U!Y#b%e&_&a&h&j&k&m,a,f1f1iS#fZ%]U#p`#f-xR-x(_Q(`#hQ-u([W-}(`-u2c5yQ2c-vR5y2dQ)d$jR.q)dQ$nhR)j$nQ$acU)Y$a-j:VQ-j9rR:V)gQ/V*QW3h/V3i6d8ZU3i/W/X/YS6d3j3kR8Z6e#o)w$u(j(n)Z*P*X*p*q*u.X.Y.Z.w.|/Q/R/S/[/a/s/t0T0o0q2p2q2r2s3X3l3m3q4R4j4l6S6T6X6Y6Z6`6g6k6q6s6u8Q8R8S8[8`9P9Q9R9f9o;P;];^;i;jQ/_*XU3p/_3r6hQ3r/aR6h3qQ*c${R/m*cQ*l%PR/v*lQ4W0TR6t4WQ*}%cR0R*}Q4n0tS7S4n8hR8h7TQ+x&TR0w+xQ4t0yR7W4tQ1V,SS5T1V7eR7e5VQ0b+bW4a0b4c6z8dQ4c0eQ6z4bR8d6{Q+g%wR0h+gQ1i,fR5e1iWrOXs#bQ&l!YQ+P%eQ,`&hQ,b&jQ,c&kQ,e&mQ1d,aS1g,f1iR5d1fQ%gpQ&p!^Q&s!`Q&u!aQ&w!bQ'g!sQ+O%dQ+[%qQ+n%}Q,U&cQ,m&rW-^'a'i'j'mQ-e'eQ/l*bQ0]+]S1Y,V,YQ1q,lQ1r,oQ1s,pQ2X-]W2Z-`-a-d-fQ4Y0^Q4f0kQ4i0oQ4}1PQ5X1[Q5c1eU5r2Y2]2`Q5u2^Q6v4ZQ7O4hQ7P4jQ7V4sQ7`5OQ7f5WS7u5s5wQ7w5vQ8e6|Q8m7aQ8r7gQ8y7vQ9X8fQ9^8nQ9b8zR9j9_Q%qxQ'Y!hQ'e!sU+]%r%s%tQ,t&{U-X'Z'[']S-]'a'kQ/c*]S0^+^+_Q1y,vS2V-Y-ZQ2^-bQ3u/gQ4Z0_Q5n2PQ5q2WQ5v2_R6l3yS$vi;_R*m%QU%Pi%Q;_R/u*kQ$uiS(j#t+XQ(n#vS)Z$b$cQ*P$wQ*X$zQ*p%VQ*q%WQ*u%[Q.X:]Q.Y:_Q.Z:aQ.w)pS.|)v/OQ/Q)yQ/R){Q/S)|Q/[*TQ/a*ZQ/s*iQ/t*jh0T+U.S0{2m4z6O7[7{8k8}9]9eQ0o+pQ0q+sQ2p:hQ2q:jQ2r:lQ2s.^S3X:W:XQ3l/]Q3m/^Q3q/`Q4R/{Q4j0pQ4l0sQ6S:pQ6T:rQ6X:^Q6Y:`Q6Z:bQ6`3eQ6g3oQ6k3wQ6q3}Q6s4VQ6u4XQ8Q:mQ8R:iQ8S:kQ8[6fQ8`6oQ9P:qQ9Q:sQ9R8WQ9f:vQ9o:wQ;P;_Q;];gQ;^;hQ;i;kR;j;llpOXs!Y#b%e&h&j&k&m,a,f1f1iQ!ePS#dZ#mQ&r!_U'^!n4q7YQ't#QQ(w#zQ)h$lS,Y&a&dQ,_&eQ,l&qQ,q&yQ-T'WQ.e(uQ.u)iQ0P*{Q0W+VQ1b,^Q2T-VQ2k.TQ3`.pQ4P/yQ4x0|Q5Z1^Q5[1_Q5`1aQ5b1cQ5g1kQ5}2nQ6^3]Q7^4{Q7j5]Q7k5^Q7m5aQ7}6RQ8l7_R8v7n#UcOPXZs!Y!_!n#b#m#z%e&a&d&e&h&j&k&m&q&y'W(u*{+V,^,a,f-V.T/y0|1^1_1a1c1f1i1k2n4q4{5]5^5a6R7Y7_7nQ#WWQ#cYQ%itQ%juS%lv!fS'w#U'zQ'}#XQ(i#sQ(p#wQ(x#}Q(y$OQ(z$PQ({$QQ(|$RQ(}$SQ)O$TQ)P$UQ)Q$VQ)R$WQ)S$XQ)U$ZQ)X$`Q)]$dW)g$l)i.p3]Q+S%kQ+h%xS,w&}1zQ-f'hS-k'x-mQ-p(QQ-r(XQ.](mQ.c(qQ.g9pQ.i9sQ.j9tQ.k9wQ.z)tQ/|*wQ1u,rQ1x,uQ2Y-_Q2a-sQ2u.aQ2z9xQ2{9yQ2|9zQ2}9{Q3O9|Q3P9}Q3Q:OQ3R:PQ3S:QQ3T:RQ3U:SQ3V:TQ3W.hQ3Z:YQ3[:cQ3a:UQ4S0OQ4[0`Q5m:dQ5s2[Q5x2bQ6U2vQ6V:eQ6[:gQ6]:nQ7T4oQ7r5kQ7v5tQ8P:oQ8T:tQ8U:uQ8z7xQ9Y8gQ9a8xQ9r#QR;U;bR#YWR'P!dY!sQ'U-R0y4tS&{!d,yQ'a!qS'k!t!wS'm!x4vS,v&|'TS-b'b'cQ-d'dQ2P-PR2_-cR(o#vR(r#wQ!eQT-Q'U-R]!pQ!q'U-R0y4tQ#n]R'_9qT#iZ%]S#hZ%]S%cm,]U([#f#g#jS-v(](^Q-z(_Q0Q*|Q2d-wU2e-x-y-{S5z2f2gR7y5{`#[W#U#X%`'x(R*y-qr#eZm#f#g#j%](](^(_*|-w-x-y-{2f2g5{Q1`,]Q1v,sQ5i1nQ7q5jT:|&}*zT#_W%`S#^W%`S'y#U(RS(O#X*yS,x&}*zT-l'x-qT'S!d%aQ$jfR)n$oT)c$j)dR3_.oT*S$w*UR*[$zQ0U+UQ2i.SQ4w0{Q6P2mQ7]4zQ7|6OQ8i7[Q8{7{Q9[8kQ9d8}Q9i9]R9l9elqOXs!Y#b%e&h&j&k&m,a,f1f1iQ&b!UR,U&_rmOXs!T!U!Y#b%e&_&h&j&k&m,a,f1f1iR,]&eT%dm,]R0u+uR,T&]Q%{{R+m%|R+c%vT&f!V&iT&g!V&iT1h,f1i",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:366,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,207,208,210,213,216,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Vi],skippedNodes:[0,3,4,269],repeatNodeCount:33,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'{!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'{!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'xpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'xpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'xp'{!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'xp'{!b'n(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'y#S$d&j'o(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'xp'{!b'o(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'w$(n$d&j'{!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'{!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'{!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'{!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'{!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'xp'{!b(V!LY'u&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'xp'{!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'xp'{!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(k%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'xp'{!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'xp'{!b'o(;d(V!LY'u&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Ui,Ri,2,3,4,5,6,7,8,9,10,11,12,13,vi,new le("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(U~~",141,327),new le("j~RQYZXz{^~^O'r~~aP!P!Qd~iO's~~",25,309)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:12794,ts:12796},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:313,get:O=>_i[O]||-1},{term:329,get:O=>Ci[O]||-1},{term:67,get:O=>Wi[O]||-1}],tokenPrec:12820}),ji=[Z("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Z("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Z("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Z("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Z("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Z(`try { \${} } catch (\${error}) { \${} diff --git a/ui/dist/assets/ConfirmEmailChangeDocs-0832d705.js b/ui/dist/assets/ConfirmEmailChangeDocs-0832d705.js deleted file mode 100644 index 840b07e6..00000000 --- a/ui/dist/assets/ConfirmEmailChangeDocs-0832d705.js +++ /dev/null @@ -1,66 +0,0 @@ -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-cc2b3041.js";import{S as qe}from"./SdkTabs-cf23198f.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]}'); - - ... - - await pb.collection('${(re=o[0])==null?void 0:re.name}').confirmEmailChange( - 'TOKEN', - 'YOUR_PASSWORD', - ); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${o[3]}'); - - ... - - await pb.collection('${(fe=o[0])==null?void 0:fe.name}').confirmEmailChange( - 'TOKEN', - 'YOUR_PASSWORD', - ); - `}});let W=o[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam - Type - Description -
Required - token
- String - The token from the change email request email. -
Required - password
- String - The account password to confirm the email change.`,V=h(),B=r("div"),B.textContent="Responses",X=h(),w=r("div"),q=r("div");for(let e=0;es(1,u=p.code);return o.$$set=p=>{"collection"in p&&s(0,_=p.collection)},s(3,a=Te.getApiExampleUrl(Ee.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` - { - "code": 400, - "message": "Failed to authenticate.", - "data": { - "token": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `}]),[_,u,i,a,d]}class Ke extends Ce{constructor(l){super(),$e(this,l,Ue,Ae,Pe,{collection:0})}}export{Ke as default}; diff --git a/ui/dist/assets/ConfirmEmailChangeDocs-96c1f5c9.js b/ui/dist/assets/ConfirmEmailChangeDocs-96c1f5c9.js new file mode 100644 index 00000000..775ab644 --- /dev/null +++ b/ui/dist/assets/ConfirmEmailChangeDocs-96c1f5c9.js @@ -0,0 +1,56 @@ +import{S as $e,i as Pe,s as Se,O as Y,e as r,w as v,b as k,c as ge,f as b,g as d,h as o,m as ve,x as j,P as ue,Q as we,k as Oe,R as Re,n as Te,t as x,a as ee,o as m,d as Ce,C as ye,p as Ee,r as H,u as Be,N as qe}from"./index-7d8498e9.js";import{S as Ae}from"./SdkTabs-36d454aa.js";function be(n,l,s){const a=n.slice();return a[5]=l[s],a}function _e(n,l,s){const a=n.slice();return a[5]=l[s],a}function he(n,l){let s,a=l[5].code+"",_,u,i,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){s=r("button"),_=v(a),u=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(C,$){d(C,s,$),o(s,_),o(s,u),i||(p=Be(s,"click",f),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&j(_,a),$&6&&H(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,p()}}}function ke(n,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:n,first:null,c(){s=r("div"),ge(a.$$.fragment),_=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(i,p){d(i,s,p),ve(a,s,null),o(s,_),u=!0},p(i,p){l=i;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(i){u||(x(a.$$.fragment,i),u=!0)},o(i){ee(a.$$.fragment,i),u=!1},d(i){i&&m(s),Ce(a)}}}function Ue(n){var de,me;let l,s,a=n[0].name+"",_,u,i,p,f,C,$,D=n[0].name+"",F,te,I,P,L,R,Q,S,N,le,K,T,se,z,M=n[0].name+"",G,ae,J,y,V,E,X,B,Z,w,q,g=[],ne=new Map,oe,A,h=[],ie=new Map,O;P=new Ae({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${n[3]}'); + + ... + + await pb.collection('${(de=n[0])==null?void 0:de.name}').confirmEmailChange( + 'TOKEN', + 'YOUR_PASSWORD', + ); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${n[3]}'); + + ... + + await pb.collection('${(me=n[0])==null?void 0:me.name}').confirmEmailChange( + 'TOKEN', + 'YOUR_PASSWORD', + ); + `}});let W=Y(n[2]);const ce=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required token
String The token from the change email request email.
Required password
String The account password to confirm the email change.',X=k(),B=r("div"),B.textContent="Responses",Z=k(),w=r("div"),q=r("div");for(let e=0;es(1,u=f.code);return n.$$set=f=>{"collection"in f&&s(0,_=f.collection)},s(3,a=ye.getApiExampleUrl(Ee.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` + { + "code": 400, + "message": "Failed to authenticate.", + "data": { + "token": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `}]),[_,u,i,a,p]}class Me extends $e{constructor(l){super(),Pe(this,l,De,Ue,Se,{collection:0})}}export{Me as default}; diff --git a/ui/dist/assets/ConfirmPasswordResetDocs-0f92024f.js b/ui/dist/assets/ConfirmPasswordResetDocs-0f92024f.js deleted file mode 100644 index 3a985bd0..00000000 --- a/ui/dist/assets/ConfirmPasswordResetDocs-0f92024f.js +++ /dev/null @@ -1,74 +0,0 @@ -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-cc2b3041.js";import{S as Ae}from"./SdkTabs-cf23198f.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]}'); - - ... - - await pb.collection('${(re=o[0])==null?void 0:re.name}').confirmPasswordReset( - 'TOKEN', - 'NEW_PASSWORD', - 'NEW_PASSWORD_CONFIRM', - ); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${o[3]}'); - - ... - - await pb.collection('${(de=o[0])==null?void 0:de.name}').confirmPasswordReset( - 'TOKEN', - 'NEW_PASSWORD', - 'NEW_PASSWORD_CONFIRM', - ); - `}});let I=o[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam - Type - Description -
Required - token
- String - The token from the password reset request email. -
Required - password
- String - The new password to set. -
Required - passwordConfirm
- String - The new password confirmation.`,X=v(),g=r("div"),g.textContent="Responses",Y=v(),N=r("div"),A=r("div");for(let e=0;el(1,u=m.code);return o.$$set=m=>{"collection"in m&&l(0,_=m.collection)},l(3,a=$e.getApiExampleUrl(Ee.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` - { - "code": 400, - "message": "Failed to authenticate.", - "data": { - "token": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `}]),[_,u,i,a,p]}class Me extends Se{constructor(s){super(),he(this,s,ye,De,Re,{collection:0})}}export{Me as default}; diff --git a/ui/dist/assets/ConfirmPasswordResetDocs-c1cf9a9f.js b/ui/dist/assets/ConfirmPasswordResetDocs-c1cf9a9f.js new file mode 100644 index 00000000..508c96ef --- /dev/null +++ b/ui/dist/assets/ConfirmPasswordResetDocs-c1cf9a9f.js @@ -0,0 +1,60 @@ +import{S as Pe,i as Se,s as Re,O as K,e as r,w,b as h,c as ve,f as _,g as d,h as o,m as we,x as U,P as ue,Q as Oe,k as Ne,R as Ce,n as We,t as x,a as ee,o as p,d as ge,C as $e,p as Ee,r as j,u as Te,N as Ae}from"./index-7d8498e9.js";import{S as ye}from"./SdkTabs-36d454aa.js";function _e(n,s,l){const a=n.slice();return a[5]=s[l],a}function be(n,s,l){const a=n.slice();return a[5]=s[l],a}function ke(n,s){let l,a=s[5].code+"",b,u,i,f;function m(){return s[4](s[5])}return{key:n,first:null,c(){l=r("button"),b=w(a),u=h(),_(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(g,P){d(g,l,P),o(l,b),o(l,u),i||(f=Te(l,"click",m),i=!0)},p(g,P){s=g,P&4&&a!==(a=s[5].code+"")&&U(b,a),P&6&&j(l,"active",s[1]===s[5].code)},d(g){g&&p(l),i=!1,f()}}}function he(n,s){let l,a,b,u;return a=new Ae({props:{content:s[5].body}}),{key:n,first:null,c(){l=r("div"),ve(a.$$.fragment),b=h(),_(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(i,f){d(i,l,f),we(a,l,null),o(l,b),u=!0},p(i,f){s=i;const m={};f&4&&(m.content=s[5].body),a.$set(m),(!u||f&6)&&j(l,"active",s[1]===s[5].code)},i(i){u||(x(a.$$.fragment,i),u=!0)},o(i){ee(a.$$.fragment,i),u=!1},d(i){i&&p(l),ge(a)}}}function De(n){var de,pe;let s,l,a=n[0].name+"",b,u,i,f,m,g,P,q=n[0].name+"",H,te,L,S,Q,C,z,R,B,se,M,W,le,G,F=n[0].name+"",J,ae,V,$,X,E,Y,T,Z,O,A,v=[],ne=new Map,oe,y,k=[],ie=new Map,N;S=new ye({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${n[3]}'); + + ... + + await pb.collection('${(de=n[0])==null?void 0:de.name}').confirmPasswordReset( + 'TOKEN', + 'NEW_PASSWORD', + 'NEW_PASSWORD_CONFIRM', + ); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${n[3]}'); + + ... + + await pb.collection('${(pe=n[0])==null?void 0:pe.name}').confirmPasswordReset( + 'TOKEN', + 'NEW_PASSWORD', + 'NEW_PASSWORD_CONFIRM', + ); + `}});let I=K(n[2]);const ce=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required token
String The token from the password reset request email.
Required password
String The new password to set.
Required passwordConfirm
String The new password confirmation.',Y=h(),T=r("div"),T.textContent="Responses",Z=h(),O=r("div"),A=r("div");for(let e=0;el(1,u=m.code);return n.$$set=m=>{"collection"in m&&l(0,b=m.collection)},l(3,a=$e.getApiExampleUrl(Ee.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` + { + "code": 400, + "message": "Failed to authenticate.", + "data": { + "token": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `}]),[b,u,i,a,f]}class Fe extends Pe{constructor(s){super(),Se(this,s,qe,De,Re,{collection:0})}}export{Fe as default}; diff --git a/ui/dist/assets/ConfirmVerificationDocs-076a26a1.js b/ui/dist/assets/ConfirmVerificationDocs-076a26a1.js new file mode 100644 index 00000000..5e299c27 --- /dev/null +++ b/ui/dist/assets/ConfirmVerificationDocs-076a26a1.js @@ -0,0 +1,56 @@ +import{S as Se,i as Te,s as Be,O as D,e as r,w as g,b as k,c as ye,f as h,g as f,h as n,m as Ce,x as H,P as ke,Q as Re,k as qe,R as Oe,n as Ee,t as x,a as ee,o as d,d as Pe,C as Ne,p as Ve,r as F,u as Ke,N as Me}from"./index-7d8498e9.js";import{S as Ae}from"./SdkTabs-36d454aa.js";function ve(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 we(o,l){let s,a=l[5].code+"",b,m,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),b=g(a),m=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(w,$){f(w,s,$),n(s,b),n(s,m),i||(p=Ke(s,"click",u),i=!0)},p(w,$){l=w,$&4&&a!==(a=l[5].code+"")&&H(b,a),$&6&&F(s,"active",l[1]===l[5].code)},d(w){w&&d(s),i=!1,p()}}}function $e(o,l){let s,a,b,m;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ye(a.$$.fragment),b=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(i,p){f(i,s,p),Ce(a,s,null),n(s,b),m=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!m||p&6)&&F(s,"active",l[1]===l[5].code)},i(i){m||(x(a.$$.fragment,i),m=!0)},o(i){ee(a.$$.fragment,i),m=!1},d(i){i&&d(s),Pe(a)}}}function Ue(o){var fe,de,pe,ue;let l,s,a=o[0].name+"",b,m,i,p,u,w,$,K=o[0].name+"",I,te,L,y,Q,T,z,C,M,le,A,B,se,G,U=o[0].name+"",J,ae,W,R,X,q,Y,O,Z,P,E,v=[],oe=new Map,ne,N,_=[],ie=new Map,S;y=new Ae({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${o[3]}'); + + ... + + await pb.collection('${(fe=o[0])==null?void 0:fe.name}').confirmVerification('TOKEN'); + + // optionally refresh the previous authStore state with the latest record changes + await pb.collection('${(de=o[0])==null?void 0:de.name}').authRefresh(); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${o[3]}'); + + ... + + await pb.collection('${(pe=o[0])==null?void 0:pe.name}').confirmVerification('TOKEN'); + + // optionally refresh the previous authStore state with the latest record changes + await pb.collection('${(ue=o[0])==null?void 0:ue.name}').authRefresh(); + `}});let j=D(o[2]);const ce=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required token
String The token from the verification request email.',Y=k(),O=r("div"),O.textContent="Responses",Z=k(),P=r("div"),E=r("div");for(let e=0;es(1,m=u.code);return o.$$set=u=>{"collection"in u&&s(0,b=u.collection)},s(3,a=Ne.getApiExampleUrl(Ve.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` + { + "code": 400, + "message": "Failed to authenticate.", + "data": { + "token": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `}]),[b,m,i,a,p]}class Fe extends Se{constructor(l){super(),Te(this,l,je,Ue,Be,{collection:0})}}export{Fe as default}; diff --git a/ui/dist/assets/ConfirmVerificationDocs-a85ed388.js b/ui/dist/assets/ConfirmVerificationDocs-a85ed388.js deleted file mode 100644 index 74cb8983..00000000 --- a/ui/dist/assets/ConfirmVerificationDocs-a85ed388.js +++ /dev/null @@ -1,62 +0,0 @@ -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-cc2b3041.js";import{S as Me}from"./SdkTabs-cf23198f.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]}'); - - ... - - await pb.collection('${(re=a[0])==null?void 0:re.name}').confirmVerification('TOKEN'); - - // optionally refresh the previous authStore state with the latest record changes - await pb.collection('${(fe=a[0])==null?void 0:fe.name}').authRefresh(); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${a[3]}'); - - ... - - await pb.collection('${(pe=a[0])==null?void 0:pe.name}').confirmVerification('TOKEN'); - - // optionally refresh the previous authStore state with the latest record changes - await pb.collection('${(ue=a[0])==null?void 0:ue.name}').authRefresh(); - `}});let j=a[2];const ne=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam - Type - Description -
Required - token
- String - The token from the verification request email.`,X=k(),R=r("div"),R.textContent="Responses",Y=k(),P=r("div"),E=r("div");for(let e=0;es(1,d=m.code);return a.$$set=m=>{"collection"in m&&s(0,h=m.collection)},s(3,o=Ee.getApiExampleUrl(Ne.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:` - { - "code": 400, - "message": "Failed to authenticate.", - "data": { - "token": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `}]),[h,d,n,o,u]}class He extends Pe{constructor(l){super(),Se(this,l,Ue,Ae,Te,{collection:0})}}export{He as default}; diff --git a/ui/dist/assets/CreateApiDocs-75ddf886.js b/ui/dist/assets/CreateApiDocs-75ddf886.js new file mode 100644 index 00000000..4e65568e --- /dev/null +++ b/ui/dist/assets/CreateApiDocs-75ddf886.js @@ -0,0 +1,92 @@ +import{S as qt,i as Ot,s as Mt,C as Q,O as ne,N as Tt,e as i,w as _,b as u,c as _e,f as v,g as r,h as n,m as he,x,P as Be,Q as ht,k as Ht,R as Lt,n as Pt,t as ue,a as fe,o as d,d as ke,p as Ft,r as ye,u as Rt,y as ae}from"./index-7d8498e9.js";import{S as At}from"./SdkTabs-36d454aa.js";import{F as Bt}from"./FieldsQueryParam-594c3384.js";function kt(o,e,t){const a=o.slice();return a[8]=e[t],a}function yt(o,e,t){const a=o.slice();return a[8]=e[t],a}function vt(o,e,t){const a=o.slice();return a[13]=e[t],a}function gt(o){let e;return{c(){e=i("p"),e.innerHTML="Requires admin Authorization:TOKEN header",v(e,"class","txt-hint txt-sm txt-right")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function wt(o){let e,t,a,f,m,c,p,y,S,T,w,H,D,E,P,I,j,B,$,N,q,g,b;function O(h,C){var ee,K;return(K=(ee=h[0])==null?void 0:ee.options)!=null&&K.requireEmail?Dt:jt}let z=O(o),F=z(o);return{c(){e=i("tr"),e.innerHTML='Auth fields',t=u(),a=i("tr"),a.innerHTML=`
Optional username
String The username of the auth record. +
+ If not set, it will be auto generated.`,f=u(),m=i("tr"),c=i("td"),p=i("div"),F.c(),y=u(),S=i("span"),S.textContent="email",T=u(),w=i("td"),w.innerHTML='String',H=u(),D=i("td"),D.textContent="Auth record email address.",E=u(),P=i("tr"),P.innerHTML='
Optional emailVisibility
Boolean Whether to show/hide the auth record email when fetching the record data.',I=u(),j=i("tr"),j.innerHTML='
Required password
String Auth record password.',B=u(),$=i("tr"),$.innerHTML='
Required passwordConfirm
String Auth record password confirmation.',N=u(),q=i("tr"),q.innerHTML=`
Optional verified
Boolean Indicates whether the auth record is verified or not. +
+ This field can be set only by admins or auth records with "Manage" access.`,g=u(),b=i("tr"),b.innerHTML='Schema fields',v(p,"class","inline-flex")},m(h,C){r(h,e,C),r(h,t,C),r(h,a,C),r(h,f,C),r(h,m,C),n(m,c),n(c,p),F.m(p,null),n(p,y),n(p,S),n(m,T),n(m,w),n(m,H),n(m,D),r(h,E,C),r(h,P,C),r(h,I,C),r(h,j,C),r(h,B,C),r(h,$,C),r(h,N,C),r(h,q,C),r(h,g,C),r(h,b,C)},p(h,C){z!==(z=O(h))&&(F.d(1),F=z(h),F&&(F.c(),F.m(p,y)))},d(h){h&&(d(e),d(t),d(a),d(f),d(m),d(E),d(P),d(I),d(j),d(B),d($),d(N),d(q),d(g),d(b)),F.d()}}}function jt(o){let e;return{c(){e=i("span"),e.textContent="Optional",v(e,"class","label label-warning")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function Dt(o){let e;return{c(){e=i("span"),e.textContent="Required",v(e,"class","label label-success")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function Nt(o){let e;return{c(){e=i("span"),e.textContent="Optional",v(e,"class","label label-warning")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function Vt(o){let e;return{c(){e=i("span"),e.textContent="Required",v(e,"class","label label-success")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function Jt(o){var m;let e,t=((m=o[13].options)==null?void 0:m.maxSelect)===1?"id":"ids",a,f;return{c(){e=_("Relation record "),a=_(t),f=_(".")},m(c,p){r(c,e,p),r(c,a,p),r(c,f,p)},p(c,p){var y;p&1&&t!==(t=((y=c[13].options)==null?void 0:y.maxSelect)===1?"id":"ids")&&x(a,t)},d(c){c&&(d(e),d(a),d(f))}}}function Et(o){let e,t,a,f,m;return{c(){e=_("File object."),t=i("br"),a=_(` + Set to `),f=i("code"),f.textContent="null",m=_(" to delete already uploaded file(s).")},m(c,p){r(c,e,p),r(c,t,p),r(c,a,p),r(c,f,p),r(c,m,p)},p:ae,d(c){c&&(d(e),d(t),d(a),d(f),d(m))}}}function It(o){let e;return{c(){e=_("URL address.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function Ut(o){let e;return{c(){e=_("Email address.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function Qt(o){let e;return{c(){e=_("JSON array or object.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function zt(o){let e;return{c(){e=_("Number value.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function Kt(o){let e;return{c(){e=_("Plain text value.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function $t(o,e){let t,a,f,m,c,p=e[13].name+"",y,S,T,w,H=Q.getFieldValueType(e[13])+"",D,E,P,I;function j(b,O){return b[13].required?Vt:Nt}let B=j(e),$=B(e);function N(b,O){if(b[13].type==="text")return Kt;if(b[13].type==="number")return zt;if(b[13].type==="json")return Qt;if(b[13].type==="email")return Ut;if(b[13].type==="url")return It;if(b[13].type==="file")return Et;if(b[13].type==="relation")return Jt}let q=N(e),g=q&&q(e);return{key:o,first:null,c(){t=i("tr"),a=i("td"),f=i("div"),$.c(),m=u(),c=i("span"),y=_(p),S=u(),T=i("td"),w=i("span"),D=_(H),E=u(),P=i("td"),g&&g.c(),I=u(),v(f,"class","inline-flex"),v(w,"class","label"),this.first=t},m(b,O){r(b,t,O),n(t,a),n(a,f),$.m(f,null),n(f,m),n(f,c),n(c,y),n(t,S),n(t,T),n(T,w),n(w,D),n(t,E),n(t,P),g&&g.m(P,null),n(t,I)},p(b,O){e=b,B!==(B=j(e))&&($.d(1),$=B(e),$&&($.c(),$.m(f,m))),O&1&&p!==(p=e[13].name+"")&&x(y,p),O&1&&H!==(H=Q.getFieldValueType(e[13])+"")&&x(D,H),q===(q=N(e))&&g?g.p(e,O):(g&&g.d(1),g=q&&q(e),g&&(g.c(),g.m(P,null)))},d(b){b&&d(t),$.d(),g&&g.d()}}}function Ct(o,e){let t,a=e[8].code+"",f,m,c,p;function y(){return e[7](e[8])}return{key:o,first:null,c(){t=i("button"),f=_(a),m=u(),v(t,"class","tab-item"),ye(t,"active",e[2]===e[8].code),this.first=t},m(S,T){r(S,t,T),n(t,f),n(t,m),c||(p=Rt(t,"click",y),c=!0)},p(S,T){e=S,T&8&&a!==(a=e[8].code+"")&&x(f,a),T&12&&ye(t,"active",e[2]===e[8].code)},d(S){S&&d(t),c=!1,p()}}}function St(o,e){let t,a,f,m;return a=new Tt({props:{content:e[8].body}}),{key:o,first:null,c(){t=i("div"),_e(a.$$.fragment),f=u(),v(t,"class","tab-item"),ye(t,"active",e[2]===e[8].code),this.first=t},m(c,p){r(c,t,p),he(a,t,null),n(t,f),m=!0},p(c,p){e=c;const y={};p&8&&(y.content=e[8].body),a.$set(y),(!m||p&12)&&ye(t,"active",e[2]===e[8].code)},i(c){m||(ue(a.$$.fragment,c),m=!0)},o(c){fe(a.$$.fragment,c),m=!1},d(c){c&&d(t),ke(a)}}}function Wt(o){var ot,rt,dt,ct,pt;let e,t,a=o[0].name+"",f,m,c,p,y,S,T,w=o[0].name+"",H,D,E,P,I,j,B,$,N,q,g,b,O,z,F,h,C,ee,K=o[0].name+"",ve,je,De,ge,se,we,W,$e,Ne,U,Ce,Ve,Se,V=[],Je=new Map,Te,ie,qe,Y,Oe,Ee,oe,G,Me,Ie,He,Ue,M,Qe,te,ze,Ke,We,Le,Ye,Pe,Ge,Xe,Ze,Fe,xe,et,le,Re,re,Ae,X,de,J=[],tt=new Map,lt,ce,R=[],nt=new Map,Z;$=new At({props:{js:` +import PocketBase from 'pocketbase'; + +const pb = new PocketBase('${o[5]}'); + +... + +// example create data +const data = ${JSON.stringify(Object.assign({},o[4],Q.dummyCollectionSchemaData(o[0])),null,4)}; + +const record = await pb.collection('${(ot=o[0])==null?void 0:ot.name}').create(data); +`+(o[1]?` +// (optional) send an email verification request +await pb.collection('${(rt=o[0])==null?void 0:rt.name}').requestVerification('test@example.com'); +`:""),dart:` +import 'package:pocketbase/pocketbase.dart'; + +final pb = PocketBase('${o[5]}'); + +... + +// example create body +final body = ${JSON.stringify(Object.assign({},o[4],Q.dummyCollectionSchemaData(o[0])),null,2)}; + +final record = await pb.collection('${(dt=o[0])==null?void 0:dt.name}').create(body: body); +`+(o[1]?` +// (optional) send an email verification request +await pb.collection('${(ct=o[0])==null?void 0:ct.name}').requestVerification('test@example.com'); +`:"")}});let A=o[6]&>(),L=o[1]&&wt(o),me=ne((pt=o[0])==null?void 0:pt.schema);const at=l=>l[13].name;for(let l=0;ll[8].code;for(let l=0;ll[8].code;for(let l=0;lapplication/json or + multipart/form-data.`,I=u(),j=i("p"),j.innerHTML=`File upload is supported only via multipart/form-data. +
+ For more info and examples you could check the detailed + Files upload and handling docs + .`,B=u(),_e($.$$.fragment),N=u(),q=i("h6"),q.textContent="API details",g=u(),b=i("div"),O=i("strong"),O.textContent="POST",z=u(),F=i("div"),h=i("p"),C=_("/api/collections/"),ee=i("strong"),ve=_(K),je=_("/records"),De=u(),A&&A.c(),ge=u(),se=i("div"),se.textContent="Body Parameters",we=u(),W=i("table"),$e=i("thead"),$e.innerHTML='Param Type Description',Ne=u(),U=i("tbody"),Ce=i("tr"),Ce.innerHTML=`
Optional id
String 15 characters string to store as record ID. +
+ If not set, it will be auto generated.`,Ve=u(),L&&L.c(),Se=u();for(let l=0;lParam Type Description',Ee=u(),oe=i("tbody"),G=i("tr"),Me=i("td"),Me.textContent="expand",Ie=u(),He=i("td"),He.innerHTML='String',Ue=u(),M=i("td"),Qe=_(`Auto expand relations when returning the created record. Ex.: + `),_e(te.$$.fragment),ze=_(` + Supports up to 6-levels depth nested relations expansion. `),Ke=i("br"),We=_(` + The expanded relations will be appended to the record under the + `),Le=i("code"),Le.textContent="expand",Ye=_(" property (eg. "),Pe=i("code"),Pe.textContent='"expand": {"relField1": {...}, ...}',Ge=_(`). + `),Xe=i("br"),Ze=_(` + Only the relations to which the request user has permissions to `),Fe=i("strong"),Fe.textContent="view",xe=_(" will be expanded."),et=u(),_e(le.$$.fragment),Re=u(),re=i("div"),re.textContent="Responses",Ae=u(),X=i("div"),de=i("div");for(let l=0;l${JSON.stringify(Object.assign({},l[4],Q.dummyCollectionSchemaData(l[0])),null,2)}; + +final record = await pb.collection('${(mt=l[0])==null?void 0:mt.name}').create(body: body); +`+(l[1]?` +// (optional) send an email verification request +await pb.collection('${(bt=l[0])==null?void 0:bt.name}').requestVerification('test@example.com'); +`:"")),$.$set(k),(!Z||s&1)&&K!==(K=l[0].name+"")&&x(ve,K),l[6]?A||(A=gt(),A.c(),A.m(b,null)):A&&(A.d(1),A=null),l[1]?L?L.p(l,s):(L=wt(l),L.c(),L.m(U,Se)):L&&(L.d(1),L=null),s&1&&(me=ne((_t=l[0])==null?void 0:_t.schema),V=Be(V,s,at,1,l,me,Je,U,ht,$t,null,vt)),s&12&&(be=ne(l[3]),J=Be(J,s,st,1,l,be,tt,de,ht,Ct,null,yt)),s&12&&(pe=ne(l[3]),Ht(),R=Be(R,s,it,1,l,pe,nt,ce,Lt,St,null,kt),Pt())},i(l){if(!Z){ue($.$$.fragment,l),ue(te.$$.fragment,l),ue(le.$$.fragment,l);for(let s=0;st(2,p=w.code);return o.$$set=w=>{"collection"in w&&t(0,c=w.collection)},o.$$.update=()=>{var w,H;o.$$.dirty&1&&t(1,a=c.type==="auth"),o.$$.dirty&1&&t(6,f=(c==null?void 0:c.createRule)===null),o.$$.dirty&1&&t(3,y=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(c),null,2)},{code:400,body:` + { + "code": 400, + "message": "Failed to create record.", + "data": { + "${(H=(w=c==null?void 0:c.schema)==null?void 0:w[0])==null?void 0:H.name}": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `},{code:403,body:` + { + "code": 403, + "message": "You are not allowed to perform this request.", + "data": {} + } + `}]),o.$$.dirty&2&&(a?t(4,S={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):t(4,S={}))},t(5,m=Q.getApiExampleUrl(Ft.baseUrl)),[c,a,p,y,S,m,f,T]}class xt extends qt{constructor(e){super(),Ot(this,e,Yt,Wt,Mt,{collection:0})}}export{xt as default}; diff --git a/ui/dist/assets/CreateApiDocs-8ef601e2.js b/ui/dist/assets/CreateApiDocs-8ef601e2.js deleted file mode 100644 index 0067c941..00000000 --- a/ui/dist/assets/CreateApiDocs-8ef601e2.js +++ /dev/null @@ -1,114 +0,0 @@ -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-cc2b3041.js";import{S as At}from"./SdkTabs-cf23198f.js";import{F as Bt}from"./FieldsQueryParam-b174364f.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 Authorization:TOKEN 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='Auth fields',l=u(),s=a("tr"),s.innerHTML=`
Optional - username
- String - The username of the auth record. -
- If not set, it will be auto generated.`,m=u(),b=a("tr"),r=a("td"),f=a("div"),F.c(),v=u(),T=a("span"),T.textContent="email",q=u(),$=a("td"),$.innerHTML='String',L=u(),D=a("td"),D.textContent="Auth record email address.",E=u(),g=a("tr"),g.innerHTML=`
Optional - emailVisibility
- Boolean - Whether to show/hide the auth record email when fetching the record data.`,I=u(),j=a("tr"),j.innerHTML=`
Required - password
- String - Auth record password.`,R=u(),C=a("tr"),C.innerHTML=`
Required - passwordConfirm
- String - Auth record password confirmation.`,N=u(),O=a("tr"),O.innerHTML=`
Optional - verified
- Boolean - Indicates whether the auth record is verified or not. -
- This field can be set only by admins or auth records with "Manage" access.`,w=u(),_=a("tr"),_.innerHTML='Schema fields',h(f,"class","inline-flex")},m(p,S){d(p,e,S),d(p,l,S),d(p,s,S),d(p,m,S),d(p,b,S),n(b,r),n(r,f),F.m(f,null),n(f,v),n(f,T),n(b,q),n(b,$),n(b,L),n(b,D),d(p,E,S),d(p,g,S),d(p,I,S),d(p,j,S),d(p,R,S),d(p,C,S),d(p,N,S),d(p,O,S),d(p,w,S),d(p,_,S)},p(p,S){z!==(z=M(p))&&(F.d(1),F=z(p),F&&(F.c(),F.m(f,v)))},d(p){p&&c(e),p&&c(l),p&&c(s),p&&c(m),p&&c(b),F.d(),p&&c(E),p&&c(g),p&&c(I),p&&c(j),p&&c(R),p&&c(C),p&&c(N),p&&c(O),p&&c(w),p&&c(_)}}}function Rt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function jt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function Dt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function Nt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function Vt(o){var b;let e,l=((b=o[13].options)==null?void 0:b.maxSelect)===1?"id":"ids",s,m;return{c(){e=k("Relation record "),s=k(l),m=k(".")},m(r,f){d(r,e,f),d(r,s,f),d(r,m,f)},p(r,f){var v;f&1&&l!==(l=((v=r[13].options)==null?void 0:v.maxSelect)===1?"id":"ids")&&x(s,l)},d(r){r&&c(e),r&&c(s),r&&c(m)}}}function Jt(o){let e,l,s,m,b;return{c(){e=k("File object."),l=a("br"),s=k(` - Set to `),m=a("code"),m.textContent="null",b=k(" to delete already uploaded file(s).")},m(r,f){d(r,e,f),d(r,l,f),d(r,s,f),d(r,m,f),d(r,b,f)},p:ne,d(r){r&&c(e),r&&c(l),r&&c(s),r&&c(m),r&&c(b)}}}function Et(o){let e;return{c(){e=k("URL address.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function It(o){let e;return{c(){e=k("Email address.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function Ut(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function Qt(o){let e;return{c(){e=k("Number value.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function zt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function $t(o,e){let l,s,m,b,r,f=e[13].name+"",v,T,q,$,L=Q.getFieldValueType(e[13])+"",D,E,g,I;function j(_,M){return _[13].required?Nt:Dt}let R=j(e),C=R(e);function N(_,M){if(_[13].type==="text")return zt;if(_[13].type==="number")return Qt;if(_[13].type==="json")return Ut;if(_[13].type==="email")return It;if(_[13].type==="url")return Et;if(_[13].type==="file")return Jt;if(_[13].type==="relation")return Vt}let O=N(e),w=O&&O(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),m=a("div"),C.c(),b=u(),r=a("span"),v=k(f),T=u(),q=a("td"),$=a("span"),D=k(L),E=u(),g=a("td"),w&&w.c(),I=u(),h(m,"class","inline-flex"),h($,"class","label"),this.first=l},m(_,M){d(_,l,M),n(l,s),n(s,m),C.m(m,null),n(m,b),n(m,r),n(r,v),n(l,T),n(l,q),n(q,$),n($,D),n(l,E),n(l,g),w&&w.m(g,null),n(l,I)},p(_,M){e=_,R!==(R=j(e))&&(C.d(1),C=R(e),C&&(C.c(),C.m(m,b))),M&1&&f!==(f=e[13].name+"")&&x(v,f),M&1&&L!==(L=Q.getFieldValueType(e[13])+"")&&x(D,L),O===(O=N(e))&&w?w.p(e,M):(w&&w.d(1),w=O&&O(e),w&&(w.c(),w.m(g,null)))},d(_){_&&c(l),C.d(),w&&w.d()}}}function Ct(o,e){let l,s=e[8].code+"",m,b,r,f;function v(){return e[7](e[8])}return{key:o,first:null,c(){l=a("button"),m=k(s),b=u(),h(l,"class","tab-item"),ye(l,"active",e[2]===e[8].code),this.first=l},m(T,q){d(T,l,q),n(l,m),n(l,b),r||(f=Ft(l,"click",v),r=!0)},p(T,q){e=T,q&8&&s!==(s=e[8].code+"")&&x(m,s),q&12&&ye(l,"active",e[2]===e[8].code)},d(T){T&&c(l),r=!1,f()}}}function St(o,e){let l,s,m,b;return s=new Tt({props:{content:e[8].body}}),{key:o,first:null,c(){l=a("div"),be(s.$$.fragment),m=u(),h(l,"class","tab-item"),ye(l,"active",e[2]===e[8].code),this.first=l},m(r,f){d(r,l,f),_e(s,l,null),n(l,m),b=!0},p(r,f){e=r;const v={};f&8&&(v.content=e[8].body),s.$set(v),(!b||f&12)&&ye(l,"active",e[2]===e[8].code)},i(r){b||(fe(s.$$.fragment,r),b=!0)},o(r){pe(s.$$.fragment,r),b=!1},d(r){r&&c(l),ke(s)}}}function Kt(o){var at,ot,rt,dt,ct;let e,l,s=o[0].name+"",m,b,r,f,v,T,q,$=o[0].name+"",L,D,E,g,I,j,R,C,N,O,w,_,M,z,F,p,S,ee,K=o[0].name+"",ve,Re,je,he,se,we,W,$e,De,U,Ce,Ne,Se,V=[],Ve=new Map,Te,ie,qe,Y,Oe,Je,ae,G,Me,Ee,He,Ie,H,Ue,te,Qe,ze,Ke,Le,We,Pe,Ye,Ge,Xe,ge,Ze,xe,le,Fe,oe,Ae,X,re,J=[],et=new Map,tt,de,A=[],lt=new Map,Z;C=new At({props:{js:` -import PocketBase from 'pocketbase'; - -const pb = new PocketBase('${o[5]}'); - -... - -// example create data -const data = ${JSON.stringify(Object.assign({},o[4],Q.dummyCollectionSchemaData(o[0])),null,4)}; - -const record = await pb.collection('${(at=o[0])==null?void 0:at.name}').create(data); -`+(o[1]?` -// (optional) send an email verification request -await pb.collection('${(ot=o[0])==null?void 0:ot.name}').requestVerification('test@example.com'); -`:""),dart:` -import 'package:pocketbase/pocketbase.dart'; - -final pb = PocketBase('${o[5]}'); - -... - -// example create body -final body = ${JSON.stringify(Object.assign({},o[4],Q.dummyCollectionSchemaData(o[0])),null,2)}; - -final record = await pb.collection('${(rt=o[0])==null?void 0:rt.name}').create(body: body); -`+(o[1]?` -// (optional) send an email verification request -await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('test@example.com'); -`:"")}});let B=o[6]&&ht(),P=o[1]&&wt(o),ue=(ct=o[0])==null?void 0:ct.schema;const nt=t=>t[13].name;for(let t=0;tt[8].code;for(let t=0;tt[8].code;for(let t=0;tapplication/json or - multipart/form-data.`,I=u(),j=a("p"),j.innerHTML=`File upload is supported only via multipart/form-data. -
- For more info and examples you could check the detailed - Files upload and handling docs - .`,R=u(),be(C.$$.fragment),N=u(),O=a("h6"),O.textContent="API details",w=u(),_=a("div"),M=a("strong"),M.textContent="POST",z=u(),F=a("div"),p=a("p"),S=k("/api/collections/"),ee=a("strong"),ve=k(K),Re=k("/records"),je=u(),B&&B.c(),he=u(),se=a("div"),se.textContent="Body Parameters",we=u(),W=a("table"),$e=a("thead"),$e.innerHTML=`Param - Type - Description`,De=u(),U=a("tbody"),Ce=a("tr"),Ce.innerHTML=`
Optional - id
- String - 15 characters string to store as record ID. -
- If not set, it will be auto generated.`,Ne=u(),P&&P.c(),Se=u();for(let t=0;tParam - Type - Description`,Je=u(),ae=a("tbody"),G=a("tr"),Me=a("td"),Me.textContent="expand",Ee=u(),He=a("td"),He.innerHTML='String',Ie=u(),H=a("td"),Ue=k(`Auto expand relations when returning the created record. Ex.: - `),be(te.$$.fragment),Qe=k(` - Supports up to 6-levels depth nested relations expansion. `),ze=a("br"),Ke=k(` - The expanded relations will be appended to the record under the - `),Le=a("code"),Le.textContent="expand",We=k(" property (eg. "),Pe=a("code"),Pe.textContent='"expand": {"relField1": {...}, ...}',Ye=k(`). - `),Ge=a("br"),Xe=k(` - Only the relations to which the request user has permissions to `),ge=a("strong"),ge.textContent="view",Ze=k(" will be expanded."),xe=u(),be(le.$$.fragment),Fe=u(),oe=a("div"),oe.textContent="Responses",Ae=u(),X=a("div"),re=a("div");for(let t=0;t${JSON.stringify(Object.assign({},t[4],Q.dummyCollectionSchemaData(t[0])),null,2)}; - -final record = await pb.collection('${(ut=t[0])==null?void 0:ut.name}').create(body: body); -`+(t[1]?` -// (optional) send an email verification request -await pb.collection('${(mt=t[0])==null?void 0:mt.name}').requestVerification('test@example.com'); -`:"")),C.$set(y),(!Z||i&1)&&K!==(K=t[0].name+"")&&x(ve,K),t[6]?B||(B=ht(),B.c(),B.m(_,null)):B&&(B.d(1),B=null),t[1]?P?P.p(t,i):(P=wt(t),P.c(),P.m(U,Se)):P&&(P.d(1),P=null),i&1&&(ue=(bt=t[0])==null?void 0:bt.schema,V=Be(V,i,nt,1,t,ue,Ve,U,_t,$t,null,vt)),i&12&&(me=t[3],J=Be(J,i,st,1,t,me,et,re,_t,Ct,null,yt)),i&12&&(ce=t[3],Ht(),A=Be(A,i,it,1,t,ce,lt,de,Lt,St,null,kt),Pt())},i(t){if(!Z){fe(C.$$.fragment,t),fe(te.$$.fragment,t),fe(le.$$.fragment,t);for(let i=0;il(2,f=$.code);return o.$$set=$=>{"collection"in $&&l(0,r=$.collection)},o.$$.update=()=>{var $,L;o.$$.dirty&1&&l(1,s=r.type==="auth"),o.$$.dirty&1&&l(6,m=(r==null?void 0:r.createRule)===null),o.$$.dirty&1&&l(3,v=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(r),null,2)},{code:400,body:` - { - "code": 400, - "message": "Failed to create record.", - "data": { - "${(L=($=r==null?void 0:r.schema)==null?void 0:$[0])==null?void 0:L.name}": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `},{code:403,body:` - { - "code": 403, - "message": "You are not allowed to perform this request.", - "data": {} - } - `}]),o.$$.dirty&2&&(s?l(4,T={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):l(4,T={}))},l(5,b=Q.getApiExampleUrl(gt.baseUrl)),[r,s,f,v,T,b,m,q]}class Zt extends qt{constructor(e){super(),Ot(this,e,Wt,Kt,Mt,{collection:0})}}export{Zt as default}; diff --git a/ui/dist/assets/DeleteApiDocs-830e0b27.js b/ui/dist/assets/DeleteApiDocs-830e0b27.js deleted file mode 100644 index 88e91ca7..00000000 --- a/ui/dist/assets/DeleteApiDocs-830e0b27.js +++ /dev/null @@ -1,58 +0,0 @@ -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-cc2b3041.js";import{S as qe}from"./SdkTabs-cf23198f.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 Authorization:TOKEN 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]}'); - - ... - - await pb.collection('${(pe=o[0])==null?void 0:pe.name}').delete('RECORD_ID'); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${o[3]}'); - - ... - - await pb.collection('${(ue=o[0])==null?void 0:ue.name}').delete('RECORD_ID'); - `}});let k=o[1]&&ve(),j=o[4];const de=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam - Type - Description - id - String - ID of the record to delete.`,Y=h(),I=c("div"),I.textContent="Responses",Z=h(),R=c("div"),A=c("div");for(let e=0;es(2,r=b.code);return o.$$set=b=>{"collection"in b&&s(0,i=b.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(1,a=(i==null?void 0:i.deleteRule)===null),o.$$.dirty&3&&i!=null&&i.id&&(u.push({code:204,body:` - null - `}),u.push({code:400,body:` - { - "code": 400, - "message": "Failed to delete record. Make sure that the record is not part of a required relation reference.", - "data": {} - } - `}),a&&u.push({code:403,body:` - { - "code": 403, - "message": "Only admins can access this action.", - "data": {} - } - `}),u.push({code:404,body:` - { - "code": 404, - "message": "The requested resource wasn't found.", - "data": {} - } - `}))},s(3,v=Ie.getApiExampleUrl(Ae.baseUrl)),[i,a,r,v,u,g]}class Ne extends Ce{constructor(l){super(),Re(this,l,Le,He,Pe,{collection:0})}}export{Ne as default}; diff --git a/ui/dist/assets/DeleteApiDocs-d3ab258e.js b/ui/dist/assets/DeleteApiDocs-d3ab258e.js new file mode 100644 index 00000000..2d655107 --- /dev/null +++ b/ui/dist/assets/DeleteApiDocs-d3ab258e.js @@ -0,0 +1,53 @@ +import{S as Re,i as Pe,s as Ee,O as j,e as c,w as y,b as k,c as De,f as m,g as p,h as i,m as Ce,x as ee,P as he,Q as Oe,k as Te,R as Be,n as Ie,t as te,a as le,o as u,d as we,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-7d8498e9.js";import{S as He}from"./SdkTabs-36d454aa.js";function ke(a,l,s){const o=a.slice();return o[6]=l[s],o}function ge(a,l,s){const o=a.slice();return o[6]=l[s],o}function ve(a){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,o){p(s,l,o)},d(s){s&&u(l)}}}function ye(a,l){let s,o,h;function d(){return l[5](l[6])}return{key:a,first:null,c(){s=c("button"),s.textContent=`${l[6].code} `,m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),o||(h=Se(s,"click",d),o=!0)},p(n,r){l=n,r&20&&N(s,"active",l[2]===l[6].code)},d(n){n&&u(s),o=!1,h()}}}function $e(a,l){let s,o,h,d;return o=new qe({props:{content:l[6].body}}),{key:a,first:null,c(){s=c("div"),De(o.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),Ce(o,s,null),i(s,h),d=!0},p(n,r){l=n,(!d||r&20)&&N(s,"active",l[2]===l[6].code)},i(n){d||(te(o.$$.fragment,n),d=!0)},o(n){le(o.$$.fragment,n),d=!1},d(n){n&&u(s),we(o)}}}function Le(a){var ue,me;let l,s,o=a[0].name+"",h,d,n,r,$,D,z,S=a[0].name+"",F,se,K,C,Q,E,G,g,q,ae,H,P,oe,J,L=a[0].name+"",V,ne,W,ie,X,O,Y,T,Z,B,x,w,I,v=[],ce=new Map,de,A,b=[],re=new Map,R;C=new He({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${a[3]}'); + + ... + + await pb.collection('${(ue=a[0])==null?void 0:ue.name}').delete('RECORD_ID'); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${a[3]}'); + + ... + + await pb.collection('${(me=a[0])==null?void 0:me.name}').delete('RECORD_ID'); + `}});let _=a[1]&&ve(),U=j(a[4]);const fe=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam Type Description id String ID of the record to delete.',Z=k(),B=c("div"),B.textContent="Responses",x=k(),w=c("div"),I=c("div");for(let e=0;es(2,n=D.code);return a.$$set=D=>{"collection"in D&&s(0,d=D.collection)},a.$$.update=()=>{a.$$.dirty&1&&s(1,o=(d==null?void 0:d.deleteRule)===null),a.$$.dirty&3&&d!=null&&d.id&&(r.push({code:204,body:` + null + `}),r.push({code:400,body:` + { + "code": 400, + "message": "Failed to delete record. Make sure that the record is not part of a required relation reference.", + "data": {} + } + `}),o&&r.push({code:403,body:` + { + "code": 403, + "message": "Only admins can access this action.", + "data": {} + } + `}),r.push({code:404,body:` + { + "code": 404, + "message": "The requested resource wasn't found.", + "data": {} + } + `}))},s(3,h=Ae.getApiExampleUrl(Me.baseUrl)),[d,o,n,h,r,$]}class ze extends Re{constructor(l){super(),Pe(this,l,Ue,Le,Ee,{collection:0})}}export{ze as default}; diff --git a/ui/dist/assets/FieldsQueryParam-594c3384.js b/ui/dist/assets/FieldsQueryParam-594c3384.js new file mode 100644 index 00000000..b231be27 --- /dev/null +++ b/ui/dist/assets/FieldsQueryParam-594c3384.js @@ -0,0 +1,3 @@ +import{S as d,i as n,s as i,e as l,g as o,y as s,o as p}from"./index-7d8498e9.js";function c(a){let e;return{c(){e=l("tr"),e.innerHTML=`fields String Comma separated string of the fields to return in the JSON response + (by default returns all fields). For example: +
?fields=id,expand.relField.id,expand.relField.created`},m(t,r){o(t,e,r)},p:s,i:s,o:s,d(t){t&&p(e)}}}class f extends d{constructor(e){super(),n(this,e,null,c,i,{})}}export{f as F}; diff --git a/ui/dist/assets/FieldsQueryParam-b174364f.js b/ui/dist/assets/FieldsQueryParam-b174364f.js deleted file mode 100644 index 10a40546..00000000 --- a/ui/dist/assets/FieldsQueryParam-b174364f.js +++ /dev/null @@ -1,6 +0,0 @@ -import{S as d,i as n,s as i,e as l,g as o,y as s,o as p}from"./index-cc2b3041.js";function c(a){let e;return{c(){e=l("tr"),e.innerHTML=`fields - String - Comma separated string of the fields to return in the JSON response - (by default returns all fields). For example: -
- ?fields=id,expand.relField.id,expand.relField.created`},m(t,r){o(t,e,r)},p:s,i:s,o:s,d(t){t&&p(e)}}}class f extends d{constructor(e){super(),n(this,e,null,c,i,{})}}export{f as F}; diff --git a/ui/dist/assets/FilterAutocompleteInput-8ec993bb.js b/ui/dist/assets/FilterAutocompleteInput-d2bb33f8.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput-8ec993bb.js rename to ui/dist/assets/FilterAutocompleteInput-d2bb33f8.js index 082d96f2..13b15f8c 100644 --- a/ui/dist/assets/FilterAutocompleteInput-8ec993bb.js +++ b/ui/dist/assets/FilterAutocompleteInput-d2bb33f8.js @@ -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-cc2b3041.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;i2&&s.token&&typeof s.token!="string"){n.pending=[];for(var a=2;a-1)return null;var y=n.indent.length-1,h=e[n.state];e:for(;;){for(var s=0;sn(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&&x[2].indexOf(":")===-1&&!u.includes(x[2])&&t.push(c+":isset")}}return t}function ne(){const t=[];for(const o of q){const u="@collection."+o.name+".",g=S(o.name,u);for(const c of g)t.push(c)}return t}function re(t=!0,o=!0){let u=[].concat(I);return u=u.concat(N||[]),t&&(u=u.concat(U||[])),o&&(u=u.concat(W||[])),u.sort(function(g,c){return c.length-g.length}),u}function ie(t){let o=t.matchBefore(/[\'\"\@\w\.]*/);if(o&&o.from==o.to&&!t.explicit)return null;let u=[{label:"false"},{label:"true"},{label:"@now"},{label:"@second"},{label:"@minute"},{label:"@hour"},{label:"@year"},{label:"@day"},{label:"@month"},{label:"@weekday"},{label:"@todayStart"},{label:"@todayEnd"},{label:"@monthStart"},{label:"@monthEnd"},{label:"@yearStart"},{label:"@yearEnd"}];E||u.push({label:"@collection.*",apply:"@collection."});const g=re(!w,!w&&o.text.startsWith("@c"));for(const c of g)u.push({label:c.endsWith(".")?c+"*":c,apply:c});return{from:o.from,options:u}}function G(){return Me.define(He({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:f.escapeRegExp("@now"),token:"keyword"},{regex:f.escapeRegExp("@second"),token:"keyword"},{regex:f.escapeRegExp("@minute"),token:"keyword"},{regex:f.escapeRegExp("@hour"),token:"keyword"},{regex:f.escapeRegExp("@year"),token:"keyword"},{regex:f.escapeRegExp("@day"),token:"keyword"},{regex:f.escapeRegExp("@month"),token:"keyword"},{regex:f.escapeRegExp("@weekday"),token:"keyword"},{regex:f.escapeRegExp("@todayStart"),token:"keyword"},{regex:f.escapeRegExp("@todayEnd"),token:"keyword"},{regex:f.escapeRegExp("@monthStart"),token:"keyword"},{regex:f.escapeRegExp("@monthEnd"),token:"keyword"},{regex:f.escapeRegExp("@yearStart"),token:"keyword"},{regex:f.escapeRegExp("@yearEnd"),token:"keyword"},{regex:f.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:o=>{m&&y("submit",s)}};return V(),n(11,d=new K({parent:b,state:C.create({doc:s,extensions:[xe(),me(),be(),we(),Ee(),C.allowMultipleSelections.of(!0),Se(De,{fallback:!0}),Ke(),Ce(),qe(),Re(),Le.of([t,...Ie,...Ae,Be.find(o=>o.key==="Mod-d"),...Oe,..._e]),K.lineWrapping,ve({override:[ie],icons:!1}),T.of(Y(l)),H.of(K.editable.of(!i)),F.of(C.readOnly.of(i)),D.of(G()),C.transactionFilter.of(o=>m&&o.newDoc.lines>1?[]:o),K.updateListener.of(o=>{!o.docChanged||i||(n(1,s=o.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),d==null||d.destroy()}});function oe(t){ke[t?"unshift":"push"](()=>{b=t,n(0,b)})}return e.$$set=t=>{"id"in t&&n(2,h=t.id),"value"in t&&n(1,s=t.value),"disabled"in t&&n(3,i=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,m=t.singleLine),"extraAutocompleteKeys"in t&&n(7,I=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,w=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,E=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,R=Pe(a)),e.$$.dirty[0]&25352&&!i&&(B!=R||w!==-1||E!==-1)&&(n(14,B=R),j()),e.$$.dirty[0]&4&&h&&V(),e.$$.dirty[0]&2080&&d&&a!=null&&a.schema&&d.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&d&&A!=i&&(d.dispatch({effects:[H.reconfigure(K.editable.of(!i)),F.reconfigure(C.readOnly.of(i))]}),n(12,A=i),J()),e.$$.dirty[0]&2050&&d&&s!=d.state.doc.toString()&&d.dispatch({changes:{from:0,to:d.state.doc.length,insert:s}}),e.$$.dirty[0]&2064&&d&&typeof l<"u"&&d.dispatch({effects:[T.reconfigure(Y(l))]})},[b,s,h,i,l,a,m,I,w,E,O,d,A,R,B,oe]}class Qe extends se{constructor(r){super(),ae(this,r,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; +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-7d8498e9.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;i2&&s.token&&typeof s.token!="string"){n.pending=[];for(var a=2;a-1)return null;var y=n.indent.length-1,h=e[n.state];e:for(;;){for(var s=0;sn(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&&x[2].indexOf(":")===-1&&!u.includes(x[2])&&t.push(c+":isset")}}return t}function ne(){const t=[];for(const o of q){const u="@collection."+o.name+".",g=S(o.name,u);for(const c of g)t.push(c)}return t}function re(t=!0,o=!0){let u=[].concat(I);return u=u.concat(N||[]),t&&(u=u.concat(U||[])),o&&(u=u.concat(W||[])),u.sort(function(g,c){return c.length-g.length}),u}function ie(t){let o=t.matchBefore(/[\'\"\@\w\.]*/);if(o&&o.from==o.to&&!t.explicit)return null;let u=[{label:"false"},{label:"true"},{label:"@now"},{label:"@second"},{label:"@minute"},{label:"@hour"},{label:"@year"},{label:"@day"},{label:"@month"},{label:"@weekday"},{label:"@todayStart"},{label:"@todayEnd"},{label:"@monthStart"},{label:"@monthEnd"},{label:"@yearStart"},{label:"@yearEnd"}];E||u.push({label:"@collection.*",apply:"@collection."});const g=re(!w,!w&&o.text.startsWith("@c"));for(const c of g)u.push({label:c.endsWith(".")?c+"*":c,apply:c});return{from:o.from,options:u}}function G(){return Me.define(He({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:f.escapeRegExp("@now"),token:"keyword"},{regex:f.escapeRegExp("@second"),token:"keyword"},{regex:f.escapeRegExp("@minute"),token:"keyword"},{regex:f.escapeRegExp("@hour"),token:"keyword"},{regex:f.escapeRegExp("@year"),token:"keyword"},{regex:f.escapeRegExp("@day"),token:"keyword"},{regex:f.escapeRegExp("@month"),token:"keyword"},{regex:f.escapeRegExp("@weekday"),token:"keyword"},{regex:f.escapeRegExp("@todayStart"),token:"keyword"},{regex:f.escapeRegExp("@todayEnd"),token:"keyword"},{regex:f.escapeRegExp("@monthStart"),token:"keyword"},{regex:f.escapeRegExp("@monthEnd"),token:"keyword"},{regex:f.escapeRegExp("@yearStart"),token:"keyword"},{regex:f.escapeRegExp("@yearEnd"),token:"keyword"},{regex:f.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:o=>{m&&y("submit",s)}};return V(),n(11,d=new K({parent:b,state:C.create({doc:s,extensions:[xe(),me(),be(),we(),Ee(),C.allowMultipleSelections.of(!0),Se(De,{fallback:!0}),Ke(),Ce(),qe(),Re(),Le.of([t,...Ie,...Ae,Be.find(o=>o.key==="Mod-d"),...Oe,..._e]),K.lineWrapping,ve({override:[ie],icons:!1}),T.of(Y(l)),H.of(K.editable.of(!i)),F.of(C.readOnly.of(i)),D.of(G()),C.transactionFilter.of(o=>m&&o.newDoc.lines>1?[]:o),K.updateListener.of(o=>{!o.docChanged||i||(n(1,s=o.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),d==null||d.destroy()}});function oe(t){ke[t?"unshift":"push"](()=>{b=t,n(0,b)})}return e.$$set=t=>{"id"in t&&n(2,h=t.id),"value"in t&&n(1,s=t.value),"disabled"in t&&n(3,i=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,m=t.singleLine),"extraAutocompleteKeys"in t&&n(7,I=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,w=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,E=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,R=Pe(a)),e.$$.dirty[0]&25352&&!i&&(B!=R||w!==-1||E!==-1)&&(n(14,B=R),j()),e.$$.dirty[0]&4&&h&&V(),e.$$.dirty[0]&2080&&d&&a!=null&&a.schema&&d.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&d&&A!=i&&(d.dispatch({effects:[H.reconfigure(K.editable.of(!i)),F.reconfigure(C.readOnly.of(i))]}),n(12,A=i),J()),e.$$.dirty[0]&2050&&d&&s!=d.state.doc.toString()&&d.dispatch({changes:{from:0,to:d.state.doc.length,insert:s}}),e.$$.dirty[0]&2064&&d&&typeof l<"u"&&d.dispatch({effects:[T.reconfigure(Y(l))]})},[b,s,h,i,l,a,m,I,w,E,O,d,A,R,B,oe]}class Qe extends se{constructor(r){super(),ae(this,r,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; diff --git a/ui/dist/assets/ListApiDocs-8cb2691d.js b/ui/dist/assets/ListApiDocs-8cb2691d.js deleted file mode 100644 index ebfd61c2..00000000 --- a/ui/dist/assets/ListApiDocs-8cb2691d.js +++ /dev/null @@ -1,149 +0,0 @@ -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-cc2b3041.js";import{S as cl}from"./SdkTabs-cf23198f.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 - OPERAND - OPERATOR - OPERAND, where:`,o=s(),a=e("ul"),p=e("li"),p.innerHTML=`OPERAND - could be any of the above field literal, string (single - or double quoted), number, null, true, false`,b=s(),d=e("li"),h=e("code"),h.textContent="OPERATOR",g=x(` - is one of: - `),w=e("br"),_=s(),f=e("ul"),Z=e("li"),Ct=e("code"),Ct.textContent="=",Ut=s(),E=e("span"),E.textContent="Equal",jt=s(),M=e("li"),at=e("code"),at.textContent="!=",S=s(),tt=e("span"),tt.textContent="NOT equal",se=s(),G=e("li"),U=e("code"),U.textContent=">",ne=s(),rt=e("span"),rt.textContent="Greater than",$t=s(),et=e("li"),kt=e("code"),kt.textContent=">=",oe=s(),ct=e("span"),ct.textContent="Greater than or equal",dt=s(),lt=e("li"),N=e("code"),N.textContent="<",zt=s(),yt=e("span"),yt.textContent="Less than",v=s(),st=e("li"),vt=e("code"),vt.textContent="<=",Jt=s(),Ft=e("span"),Ft.textContent="Less than or equal",j=s(),nt=e("li"),Lt=e("code"),Lt.textContent="~",Kt=s(),At=e("span"),At.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for - wildcard match)`,L=s(),ft=e("li"),Tt=e("code"),Tt.textContent="!~",ie=s(),pt=e("span"),pt.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for - wildcard match)`,ae=s(),D=e("li"),Pt=e("code"),Pt.textContent="?=",ot=s(),St=e("em"),St.textContent="Any/At least one of",O=s(),ut=e("span"),ut.textContent="Equal",re=s(),z=e("li"),Ot=e("code"),Ot.textContent="?!=",Qt=s(),Rt=e("em"),Rt.textContent="Any/At least one of",ce=s(),q=e("span"),q.textContent="NOT equal",Vt=s(),J=e("li"),mt=e("code"),mt.textContent="?>",de=s(),I=e("em"),I.textContent="Any/At least one of",fe=s(),B=e("span"),B.textContent="Greater than",pe=s(),P=e("li"),Et=e("code"),Et.textContent="?>=",K=s(),bt=e("em"),bt.textContent="Any/At least one of",ue=s(),ht=e("span"),ht.textContent="Greater than or equal",me=s(),$=e("li"),Nt=e("code"),Nt.textContent="?<",it=s(),qt=e("em"),qt.textContent="Any/At least one of",be=s(),Ht=e("span"),Ht.textContent="Less than",Wt=s(),Q=e("li"),_t=e("code"),_t.textContent="?<=",he=s(),Mt=e("em"),Mt.textContent="Any/At least one of",_e=s(),wt=e("span"),wt.textContent="Less than or equal",we=s(),V=e("li"),xt=e("code"),xt.textContent="?~",xe=s(),gt=e("em"),gt.textContent="Any/At least one of",Xt=s(),W=e("span"),W.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for - wildcard match)`,Yt=s(),A=e("li"),X=e("code"),X.textContent="?!~",R=s(),Dt=e("em"),Dt.textContent="Any/At least one of",ge=s(),Y=e("span"),Y.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for - wildcard match)`,F=s(),It=e("p"),It.innerHTML=`To group and combine several expressions you could use brackets - (...), && (AND) and || (OR) tokens.`,i(h,"class","txt-danger"),i(Ct,"class","filter-op svelte-1w7s5nw"),i(E,"class","txt"),i(at,"class","filter-op svelte-1w7s5nw"),i(tt,"class","txt"),i(U,"class","filter-op svelte-1w7s5nw"),i(rt,"class","txt"),i(kt,"class","filter-op svelte-1w7s5nw"),i(ct,"class","txt"),i(N,"class","filter-op svelte-1w7s5nw"),i(yt,"class","txt"),i(vt,"class","filter-op svelte-1w7s5nw"),i(Ft,"class","txt"),i(Lt,"class","filter-op svelte-1w7s5nw"),i(At,"class","txt"),i(Tt,"class","filter-op svelte-1w7s5nw"),i(pt,"class","txt"),i(Pt,"class","filter-op svelte-1w7s5nw"),i(St,"class","txt-hint"),i(ut,"class","txt"),i(Ot,"class","filter-op svelte-1w7s5nw"),i(Rt,"class","txt-hint"),i(q,"class","txt"),i(mt,"class","filter-op svelte-1w7s5nw"),i(I,"class","txt-hint"),i(B,"class","txt"),i(Et,"class","filter-op svelte-1w7s5nw"),i(bt,"class","txt-hint"),i(ht,"class","txt"),i(Nt,"class","filter-op svelte-1w7s5nw"),i(qt,"class","txt-hint"),i(Ht,"class","txt"),i(_t,"class","filter-op svelte-1w7s5nw"),i(Mt,"class","txt-hint"),i(wt,"class","txt"),i(xt,"class","filter-op svelte-1w7s5nw"),i(gt,"class","txt-hint"),i(W,"class","txt"),i(X,"class","filter-op svelte-1w7s5nw"),i(Dt,"class","txt-hint"),i(Y,"class","txt")},m(k,y){u(k,n,y),u(k,o,y),u(k,a,y),t(a,p),t(a,b),t(a,d),t(d,h),t(d,g),t(d,w),t(d,_),t(d,f),t(f,Z),t(Z,Ct),t(Z,Ut),t(Z,E),t(f,jt),t(f,M),t(M,at),t(M,S),t(M,tt),t(f,se),t(f,G),t(G,U),t(G,ne),t(G,rt),t(f,$t),t(f,et),t(et,kt),t(et,oe),t(et,ct),t(f,dt),t(f,lt),t(lt,N),t(lt,zt),t(lt,yt),t(f,v),t(f,st),t(st,vt),t(st,Jt),t(st,Ft),t(f,j),t(f,nt),t(nt,Lt),t(nt,Kt),t(nt,At),t(f,L),t(f,ft),t(ft,Tt),t(ft,ie),t(ft,pt),t(f,ae),t(f,D),t(D,Pt),t(D,ot),t(D,St),t(D,O),t(D,ut),t(f,re),t(f,z),t(z,Ot),t(z,Qt),t(z,Rt),t(z,ce),t(z,q),t(f,Vt),t(f,J),t(J,mt),t(J,de),t(J,I),t(J,fe),t(J,B),t(f,pe),t(f,P),t(P,Et),t(P,K),t(P,bt),t(P,ue),t(P,ht),t(f,me),t(f,$),t($,Nt),t($,it),t($,qt),t($,be),t($,Ht),t(f,Wt),t(f,Q),t(Q,_t),t(Q,he),t(Q,Mt),t(Q,_e),t(Q,wt),t(f,we),t(f,V),t(V,xt),t(V,xe),t(V,gt),t(V,Xt),t(V,W),t(f,Yt),t(f,A),t(A,X),t(A,R),t(A,Dt),t(A,ge),t(A,Y),u(k,F,y),u(k,It,y)},d(k){k&&m(n),k&&m(o),k&&m(a),k&&m(F),k&&m(It)}}}function pl(c){let n,o,a,p,b;function d(_,f){return _[0]?fl:dl}let h=d(c),g=h(c),w=c[0]&&je();return{c(){n=e("button"),g.c(),o=s(),w&&w.c(),a=ll(),i(n,"class","btn btn-sm btn-secondary m-t-10")},m(_,f){u(_,n,f),g.m(n,null),u(_,o,f),w&&w.m(_,f),u(_,a,f),p||(b=el(n,"click",c[1]),p=!0)},p(_,[f]){h!==(h=d(_))&&(g.d(1),g=h(_),g&&(g.c(),g.m(n,null))),_[0]?w||(w=je(),w.c(),w.m(a.parentNode,a)):w&&(w.d(1),w=null)},i:Ge,o:Ge,d(_){_&&m(n),g.d(),_&&m(o),w&&w.d(_),_&&m(a),p=!1,b()}}}function ul(c,n,o){let a=!1;function p(){o(0,a=!a)}return[a,p]}class ml extends Ye{constructor(n){super(),Ze(this,n,ul,pl,tl,{})}}function ze(c,n,o){const a=c.slice();return a[7]=n[o],a}function Je(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ke(c,n,o){const a=c.slice();return a[12]=n[o],a[14]=o,a}function Qe(c){let n;return{c(){n=e("p"),n.innerHTML="Requires admin Authorization:TOKEN header",i(n,"class","txt-hint txt-sm txt-right")},m(o,a){u(o,n,a)},d(o){o&&m(n)}}}function Ve(c){let n,o=c[12]+"",a,p=c[14]= "2022-01-01 00:00:00" && someField1 != someField2', - }); - - // you can also fetch all records at once via getFullList - const records = await pb.collection('${(Pe=c[0])==null?void 0:Pe.name}').getFullList({ - sort: '-created', - }); - - // or fetch only the first record that matches the specified filter - const record = await pb.collection('${(Se=c[0])==null?void 0:Se.name}').getFirstListItem('someField="test"', { - expand: 'relField1,relField2.subRelField', - }); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${c[3]}'); - - ... - - // fetch a paginated records list - final resultList = await pb.collection('${(Oe=c[0])==null?void 0:Oe.name}').getList( - page: 1, - perPage: 50, - filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', - ); - - // you can also fetch all records at once via getFullList - final records = await pb.collection('${(Re=c[0])==null?void 0:Re.name}').getFullList( - sort: '-created', - ); - - // or fetch only the first record that matches the specified filter - final record = await pb.collection('${(Ee=c[0])==null?void 0:Ee.name}').getFirstListItem( - 'someField="test"', - expand: 'relField1,relField2.subRelField', - ); - `}});let y=c[1]&&Qe();ot=new ve({props:{content:` - // DESC by created and ASC by id - ?sort=-created,id - `}});let Zt=c[4],T=[];for(let l=0;l'2022-01-01') - `}}),P=new ml({}),it=new ve({props:{content:"?expand=relField1,relField2.subRelField"}});let ke=c[5];const Le=l=>l[7].code;for(let l=0;ll[7].code;for(let l=0;lParam - Type - Description`,yt=s(),v=e("tbody"),st=e("tr"),st.innerHTML=`page - Number - The page (aka. offset) of the paginated list (default to 1).`,vt=s(),Jt=e("tr"),Jt.innerHTML=`perPage - Number - Specify the max returned records per page (default to 30).`,Ft=s(),j=e("tr"),nt=e("td"),nt.textContent="sort",Lt=s(),Kt=e("td"),Kt.innerHTML='String',At=s(),L=e("td"),ft=x("Specify the records order attribute(s). "),Tt=e("br"),ie=x(` - Add `),pt=e("code"),pt.textContent="-",ae=x(" / "),D=e("code"),D.textContent="+",Pt=x(` (default) in front of the attribute for DESC / ASC order. - Ex.: - `),te(ot.$$.fragment),St=s(),O=e("p"),ut=e("strong"),ut.textContent="Supported record sort fields:",re=s(),z=e("br"),Ot=s(),Qt=e("code"),Qt.textContent="@random",Rt=x(`, - `);for(let l=0;lString',de=s(),I=e("td"),fe=x(`Filter the returned records. Ex.: - `),te(B.$$.fragment),pe=s(),te(P.$$.fragment),Et=s(),K=e("tr"),bt=e("td"),bt.textContent="expand",ue=s(),ht=e("td"),ht.innerHTML='String',me=s(),$=e("td"),Nt=x(`Auto expand record relations. Ex.: - `),te(it.$$.fragment),qt=x(` - Supports up to 6-levels depth nested relations expansion. `),be=e("br"),Ht=x(` - The expanded relations will be appended to each individual record under the - `),Wt=e("code"),Wt.textContent="expand",Q=x(" property (eg. "),_t=e("code"),_t.textContent='"expand": {"relField1": {...}, ...}',he=x(`). - `),Mt=e("br"),_e=x(` - Only the relations to which the request user has permissions to `),wt=e("strong"),wt.textContent="view",we=x(" will be expanded."),V=s(),xt=e("tr"),xt.innerHTML=`fields - String - Comma separated string of the fields to return in the JSON response - (by default returns all fields).`,xe=s(),gt=e("tr"),gt.innerHTML=`skipTotal - Boolean - If it is set the total counts query will be skipped and the response fields - totalItems and totalPages will have -1 value. -
- This could drastically speed up the search queries when the total counters are not needed or cursor - based pagination is used. -
- For optimization purposes, it is set by default for the - getFirstListItem() - and - getFullList() SDKs methods.`,Xt=s(),W=e("div"),W.textContent="Responses",Yt=s(),A=e("div"),X=e("div");for(let l=0;l= "2022-01-01 00:00:00" && someField1 != someField2', - }); - - // you can also fetch all records at once via getFullList - const records = await pb.collection('${(qe=l[0])==null?void 0:qe.name}').getFullList({ - sort: '-created', - }); - - // or fetch only the first record that matches the specified filter - const record = await pb.collection('${(He=l[0])==null?void 0:He.name}').getFirstListItem('someField="test"', { - expand: 'relField1,relField2.subRelField', - }); - `),r&9&&(C.dart=` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${l[3]}'); - - ... - - // fetch a paginated records list - final resultList = await pb.collection('${(Me=l[0])==null?void 0:Me.name}').getList( - page: 1, - perPage: 50, - filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', - ); - - // you can also fetch all records at once via getFullList - final records = await pb.collection('${(De=l[0])==null?void 0:De.name}').getFullList( - sort: '-created', - ); - - // or fetch only the first record that matches the specified filter - final record = await pb.collection('${(Ie=l[0])==null?void 0:Ie.name}').getFirstListItem( - 'someField="test"', - expand: 'relField1,relField2.subRelField', - ); - `),E.$set(C),(!k||r&1)&&$t!==($t=l[0].name+"")&&$e(et,$t),l[1]?y||(y=Qe(),y.c(),y.m(S,null)):y&&(y.d(1),y=null),r&16){Zt=l[4];let H;for(H=0;Ho(2,h=_.code);return c.$$set=_=>{"collection"in _&&o(0,d=_.collection)},c.$$.update=()=>{c.$$.dirty&1&&o(4,a=ye.getAllCollectionIdentifiers(d)),c.$$.dirty&1&&o(1,p=(d==null?void 0:d.listRule)===null),c.$$.dirty&3&&d!=null&&d.id&&(g.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ye.dummyCollectionRecord(d),ye.dummyCollectionRecord(d)]},null,2)}),g.push({code:400,body:` - { - "code": 400, - "message": "Something went wrong while processing your request. Invalid filter.", - "data": {} - } - `}),p&&g.push({code:403,body:` - { - "code": 403, - "message": "Only admins can access this action.", - "data": {} - } - `}))},o(3,b=ye.getApiExampleUrl(rl.baseUrl)),[d,p,h,b,a,g,w]}class xl extends Ye{constructor(n){super(),Ze(this,n,hl,bl,tl,{collection:0})}}export{xl as default}; diff --git a/ui/dist/assets/ListApiDocs-b2735b9f.js b/ui/dist/assets/ListApiDocs-b2735b9f.js new file mode 100644 index 00000000..0dbd27ce --- /dev/null +++ b/ui/dist/assets/ListApiDocs-b2735b9f.js @@ -0,0 +1,137 @@ +import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,u as ll,y as Ue,o as m,w as _,h as t,N as Fe,O as te,c as ee,m as le,x as ke,P as je,Q as nl,k as ol,R as al,n as il,t as Bt,a as Gt,d as se,T as rl,C as ve,p as cl,r as Le}from"./index-7d8498e9.js";import{S as dl}from"./SdkTabs-36d454aa.js";function pl(d){let n,o,i;return{c(){n=e("span"),n.textContent="Show details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-down-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function fl(d){let n,o,i;return{c(){n=e("span"),n.textContent="Hide details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-up-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function ze(d){let n,o,i,f,h,r,b,C,$,g,p,Z,Ct,Ut,E,jt,M,it,S,tt,ne,G,U,oe,rt,$t,et,kt,ae,ct,dt,lt,N,zt,yt,y,st,vt,Jt,Ft,j,nt,Lt,Kt,At,F,pt,Tt,ie,ft,re,D,Pt,ot,St,O,ut,ce,z,Ot,Qt,Rt,de,q,Vt,J,mt,pe,I,fe,B,ue,P,Et,K,ht,me,bt,he,x,Nt,at,qt,be,Ht,Wt,Q,gt,ge,Mt,_e,_t,we,V,wt,xe,xt,Xt,W,Yt,L,X,R,Dt,Ce,Y,v,It;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format + OPERAND OPERATOR OPERAND, where:`,o=s(),i=e("ul"),f=e("li"),f.innerHTML=`OPERAND - could be any of the above field literal, string (single + or double quoted), number, null, true, false`,h=s(),r=e("li"),b=e("code"),b.textContent="OPERATOR",C=_(` - is one of: + `),$=e("br"),g=s(),p=e("ul"),Z=e("li"),Ct=e("code"),Ct.textContent="=",Ut=s(),E=e("span"),E.textContent="Equal",jt=s(),M=e("li"),it=e("code"),it.textContent="!=",S=s(),tt=e("span"),tt.textContent="NOT equal",ne=s(),G=e("li"),U=e("code"),U.textContent=">",oe=s(),rt=e("span"),rt.textContent="Greater than",$t=s(),et=e("li"),kt=e("code"),kt.textContent=">=",ae=s(),ct=e("span"),ct.textContent="Greater than or equal",dt=s(),lt=e("li"),N=e("code"),N.textContent="<",zt=s(),yt=e("span"),yt.textContent="Less than",y=s(),st=e("li"),vt=e("code"),vt.textContent="<=",Jt=s(),Ft=e("span"),Ft.textContent="Less than or equal",j=s(),nt=e("li"),Lt=e("code"),Lt.textContent="~",Kt=s(),At=e("span"),At.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for + wildcard match)`,F=s(),pt=e("li"),Tt=e("code"),Tt.textContent="!~",ie=s(),ft=e("span"),ft.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for + wildcard match)`,re=s(),D=e("li"),Pt=e("code"),Pt.textContent="?=",ot=s(),St=e("em"),St.textContent="Any/At least one of",O=s(),ut=e("span"),ut.textContent="Equal",ce=s(),z=e("li"),Ot=e("code"),Ot.textContent="?!=",Qt=s(),Rt=e("em"),Rt.textContent="Any/At least one of",de=s(),q=e("span"),q.textContent="NOT equal",Vt=s(),J=e("li"),mt=e("code"),mt.textContent="?>",pe=s(),I=e("em"),I.textContent="Any/At least one of",fe=s(),B=e("span"),B.textContent="Greater than",ue=s(),P=e("li"),Et=e("code"),Et.textContent="?>=",K=s(),ht=e("em"),ht.textContent="Any/At least one of",me=s(),bt=e("span"),bt.textContent="Greater than or equal",he=s(),x=e("li"),Nt=e("code"),Nt.textContent="?<",at=s(),qt=e("em"),qt.textContent="Any/At least one of",be=s(),Ht=e("span"),Ht.textContent="Less than",Wt=s(),Q=e("li"),gt=e("code"),gt.textContent="?<=",ge=s(),Mt=e("em"),Mt.textContent="Any/At least one of",_e=s(),_t=e("span"),_t.textContent="Less than or equal",we=s(),V=e("li"),wt=e("code"),wt.textContent="?~",xe=s(),xt=e("em"),xt.textContent="Any/At least one of",Xt=s(),W=e("span"),W.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for + wildcard match)`,Yt=s(),L=e("li"),X=e("code"),X.textContent="?!~",R=s(),Dt=e("em"),Dt.textContent="Any/At least one of",Ce=s(),Y=e("span"),Y.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for + wildcard match)`,v=s(),It=e("p"),It.innerHTML=`To group and combine several expressions you could use brackets + (...), && (AND) and || (OR) tokens.`,a(b,"class","txt-danger"),a(Ct,"class","filter-op svelte-1w7s5nw"),a(E,"class","txt"),a(it,"class","filter-op svelte-1w7s5nw"),a(tt,"class","txt"),a(U,"class","filter-op svelte-1w7s5nw"),a(rt,"class","txt"),a(kt,"class","filter-op svelte-1w7s5nw"),a(ct,"class","txt"),a(N,"class","filter-op svelte-1w7s5nw"),a(yt,"class","txt"),a(vt,"class","filter-op svelte-1w7s5nw"),a(Ft,"class","txt"),a(Lt,"class","filter-op svelte-1w7s5nw"),a(At,"class","txt"),a(Tt,"class","filter-op svelte-1w7s5nw"),a(ft,"class","txt"),a(Pt,"class","filter-op svelte-1w7s5nw"),a(St,"class","txt-hint"),a(ut,"class","txt"),a(Ot,"class","filter-op svelte-1w7s5nw"),a(Rt,"class","txt-hint"),a(q,"class","txt"),a(mt,"class","filter-op svelte-1w7s5nw"),a(I,"class","txt-hint"),a(B,"class","txt"),a(Et,"class","filter-op svelte-1w7s5nw"),a(ht,"class","txt-hint"),a(bt,"class","txt"),a(Nt,"class","filter-op svelte-1w7s5nw"),a(qt,"class","txt-hint"),a(Ht,"class","txt"),a(gt,"class","filter-op svelte-1w7s5nw"),a(Mt,"class","txt-hint"),a(_t,"class","txt"),a(wt,"class","filter-op svelte-1w7s5nw"),a(xt,"class","txt-hint"),a(W,"class","txt"),a(X,"class","filter-op svelte-1w7s5nw"),a(Dt,"class","txt-hint"),a(Y,"class","txt")},m(A,k){u(A,n,k),u(A,o,k),u(A,i,k),t(i,f),t(i,h),t(i,r),t(r,b),t(r,C),t(r,$),t(r,g),t(r,p),t(p,Z),t(Z,Ct),t(Z,Ut),t(Z,E),t(p,jt),t(p,M),t(M,it),t(M,S),t(M,tt),t(p,ne),t(p,G),t(G,U),t(G,oe),t(G,rt),t(p,$t),t(p,et),t(et,kt),t(et,ae),t(et,ct),t(p,dt),t(p,lt),t(lt,N),t(lt,zt),t(lt,yt),t(p,y),t(p,st),t(st,vt),t(st,Jt),t(st,Ft),t(p,j),t(p,nt),t(nt,Lt),t(nt,Kt),t(nt,At),t(p,F),t(p,pt),t(pt,Tt),t(pt,ie),t(pt,ft),t(p,re),t(p,D),t(D,Pt),t(D,ot),t(D,St),t(D,O),t(D,ut),t(p,ce),t(p,z),t(z,Ot),t(z,Qt),t(z,Rt),t(z,de),t(z,q),t(p,Vt),t(p,J),t(J,mt),t(J,pe),t(J,I),t(J,fe),t(J,B),t(p,ue),t(p,P),t(P,Et),t(P,K),t(P,ht),t(P,me),t(P,bt),t(p,he),t(p,x),t(x,Nt),t(x,at),t(x,qt),t(x,be),t(x,Ht),t(p,Wt),t(p,Q),t(Q,gt),t(Q,ge),t(Q,Mt),t(Q,_e),t(Q,_t),t(p,we),t(p,V),t(V,wt),t(V,xe),t(V,xt),t(V,Xt),t(V,W),t(p,Yt),t(p,L),t(L,X),t(L,R),t(L,Dt),t(L,Ce),t(L,Y),u(A,v,k),u(A,It,k)},d(A){A&&(m(n),m(o),m(i),m(v),m(It))}}}function ul(d){let n,o,i,f,h;function r(g,p){return g[0]?fl:pl}let b=r(d),C=b(d),$=d[0]&&ze();return{c(){n=e("button"),C.c(),o=s(),$&&$.c(),i=sl(),a(n,"class","btn btn-sm btn-secondary m-t-10")},m(g,p){u(g,n,p),C.m(n,null),u(g,o,p),$&&$.m(g,p),u(g,i,p),f||(h=ll(n,"click",d[1]),f=!0)},p(g,[p]){b!==(b=r(g))&&(C.d(1),C=b(g),C&&(C.c(),C.m(n,null))),g[0]?$||($=ze(),$.c(),$.m(i.parentNode,i)):$&&($.d(1),$=null)},i:Ue,o:Ue,d(g){g&&(m(n),m(o),m(i)),C.d(),$&&$.d(g),f=!1,h()}}}function ml(d,n,o){let i=!1;function f(){o(0,i=!i)}return[i,f]}class hl extends Ze{constructor(n){super(),tl(this,n,ml,ul,el,{})}}function Je(d,n,o){const i=d.slice();return i[7]=n[o],i}function Ke(d,n,o){const i=d.slice();return i[7]=n[o],i}function Qe(d,n,o){const i=d.slice();return i[12]=n[o],i[14]=o,i}function Ve(d){let n;return{c(){n=e("p"),n.innerHTML="Requires admin Authorization:TOKEN header",a(n,"class","txt-hint txt-sm txt-right")},m(o,i){u(o,n,i)},d(o){o&&m(n)}}}function We(d){let n,o=d[12]+"",i,f=d[14]= "2022-01-01 00:00:00" && someField1 != someField2', + }); + + // you can also fetch all records at once via getFullList + const records = await pb.collection('${(Se=d[0])==null?void 0:Se.name}').getFullList({ + sort: '-created', + }); + + // or fetch only the first record that matches the specified filter + const record = await pb.collection('${(Oe=d[0])==null?void 0:Oe.name}').getFirstListItem('someField="test"', { + expand: 'relField1,relField2.subRelField', + }); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${d[3]}'); + + ... + + // fetch a paginated records list + final resultList = await pb.collection('${(Re=d[0])==null?void 0:Re.name}').getList( + page: 1, + perPage: 50, + filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', + ); + + // you can also fetch all records at once via getFullList + final records = await pb.collection('${(Ee=d[0])==null?void 0:Ee.name}').getFullList( + sort: '-created', + ); + + // or fetch only the first record that matches the specified filter + final record = await pb.collection('${(Ne=d[0])==null?void 0:Ne.name}').getFirstListItem( + 'someField="test"', + expand: 'relField1,relField2.subRelField', + ); + `}});let k=d[1]&&Ve();ot=new Fe({props:{content:` + // DESC by created and ASC by id + ?sort=-created,id + `}});let Zt=te(d[4]),T=[];for(let l=0;l'2022-01-01') + `}}),P=new hl({}),at=new Fe({props:{content:"?expand=relField1,relField2.subRelField"}});let ye=te(d[5]);const Ae=l=>l[7].code;for(let l=0;ll[7].code;for(let l=0;l<$e.length;l+=1){let c=Je(d,$e,l),w=Te(c);It.set(w,v[l]=Ye(w,c))}return{c(){n=e("h3"),o=_("List/Search ("),f=_(i),h=_(")"),r=s(),b=e("div"),C=e("p"),$=_("Fetch a paginated "),g=e("strong"),Z=_(p),Ct=_(" records list, supporting sorting and filtering."),Ut=s(),ee(E.$$.fragment),jt=s(),M=e("h6"),M.textContent="API details",it=s(),S=e("div"),tt=e("strong"),tt.textContent="GET",ne=s(),G=e("div"),U=e("p"),oe=_("/api/collections/"),rt=e("strong"),et=_($t),kt=_("/records"),ae=s(),k&&k.c(),ct=s(),dt=e("div"),dt.textContent="Query parameters",lt=s(),N=e("table"),zt=e("thead"),zt.innerHTML='Param Type Description',yt=s(),y=e("tbody"),st=e("tr"),st.innerHTML='page Number The page (aka. offset) of the paginated list (default to 1).',vt=s(),Jt=e("tr"),Jt.innerHTML='perPage Number Specify the max returned records per page (default to 30).',Ft=s(),j=e("tr"),nt=e("td"),nt.textContent="sort",Lt=s(),Kt=e("td"),Kt.innerHTML='String',At=s(),F=e("td"),pt=_("Specify the records order attribute(s). "),Tt=e("br"),ie=_(` + Add `),ft=e("code"),ft.textContent="-",re=_(" / "),D=e("code"),D.textContent="+",Pt=_(` (default) in front of the attribute for DESC / ASC order. + Ex.: + `),ee(ot.$$.fragment),St=s(),O=e("p"),ut=e("strong"),ut.textContent="Supported record sort fields:",ce=s(),z=e("br"),Ot=s(),Qt=e("code"),Qt.textContent="@random",Rt=_(`, + `);for(let l=0;lString',pe=s(),I=e("td"),fe=_(`Filter the returned records. Ex.: + `),ee(B.$$.fragment),ue=s(),ee(P.$$.fragment),Et=s(),K=e("tr"),ht=e("td"),ht.textContent="expand",me=s(),bt=e("td"),bt.innerHTML='String',he=s(),x=e("td"),Nt=_(`Auto expand record relations. Ex.: + `),ee(at.$$.fragment),qt=_(` + Supports up to 6-levels depth nested relations expansion. `),be=e("br"),Ht=_(` + The expanded relations will be appended to each individual record under the + `),Wt=e("code"),Wt.textContent="expand",Q=_(" property (eg. "),gt=e("code"),gt.textContent='"expand": {"relField1": {...}, ...}',ge=_(`). + `),Mt=e("br"),_e=_(` + Only the relations to which the request user has permissions to `),_t=e("strong"),_t.textContent="view",we=_(" will be expanded."),V=s(),wt=e("tr"),wt.innerHTML=`fields String Comma separated string of the fields to return in the JSON response + (by default returns all fields).`,xe=s(),xt=e("tr"),xt.innerHTML=`skipTotal Boolean If it is set the total counts query will be skipped and the response fields + totalItems and totalPages will have -1 value. +
+ This could drastically speed up the search queries when the total counters are not needed or cursor + based pagination is used. +
+ For optimization purposes, it is set by default for the + getFirstListItem() + and + getFullList() SDKs methods.`,Xt=s(),W=e("div"),W.textContent="Responses",Yt=s(),L=e("div"),X=e("div");for(let l=0;l= "2022-01-01 00:00:00" && someField1 != someField2', + }); + + // you can also fetch all records at once via getFullList + const records = await pb.collection('${(He=l[0])==null?void 0:He.name}').getFullList({ + sort: '-created', + }); + + // or fetch only the first record that matches the specified filter + const record = await pb.collection('${(Me=l[0])==null?void 0:Me.name}').getFirstListItem('someField="test"', { + expand: 'relField1,relField2.subRelField', + }); + `),c&9&&(w.dart=` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${l[3]}'); + + ... + + // fetch a paginated records list + final resultList = await pb.collection('${(De=l[0])==null?void 0:De.name}').getList( + page: 1, + perPage: 50, + filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', + ); + + // you can also fetch all records at once via getFullList + final records = await pb.collection('${(Ie=l[0])==null?void 0:Ie.name}').getFullList( + sort: '-created', + ); + + // or fetch only the first record that matches the specified filter + final record = await pb.collection('${(Be=l[0])==null?void 0:Be.name}').getFirstListItem( + 'someField="test"', + expand: 'relField1,relField2.subRelField', + ); + `),E.$set(w),(!A||c&1)&&$t!==($t=l[0].name+"")&&ke(et,$t),l[1]?k||(k=Ve(),k.c(),k.m(S,null)):k&&(k.d(1),k=null),c&16){Zt=te(l[4]);let H;for(H=0;Ho(2,b=g.code);return d.$$set=g=>{"collection"in g&&o(0,r=g.collection)},d.$$.update=()=>{d.$$.dirty&1&&o(4,i=ve.getAllCollectionIdentifiers(r)),d.$$.dirty&1&&o(1,f=(r==null?void 0:r.listRule)===null),d.$$.dirty&3&&r!=null&&r.id&&(C.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ve.dummyCollectionRecord(r),ve.dummyCollectionRecord(r)]},null,2)}),C.push({code:400,body:` + { + "code": 400, + "message": "Something went wrong while processing your request. Invalid filter.", + "data": {} + } + `}),f&&C.push({code:403,body:` + { + "code": 403, + "message": "Only admins can access this action.", + "data": {} + } + `}))},o(3,h=ve.getApiExampleUrl(cl.baseUrl)),[r,f,b,h,i,C,$]}class xl extends Ze{constructor(n){super(),tl(this,n,gl,bl,el,{collection:0})}}export{xl as default}; diff --git a/ui/dist/assets/ListExternalAuthsDocs-8dcfc016.js b/ui/dist/assets/ListExternalAuthsDocs-8dcfc016.js deleted file mode 100644 index a0cb4bbf..00000000 --- a/ui/dist/assets/ListExternalAuthsDocs-8dcfc016.js +++ /dev/null @@ -1,95 +0,0 @@ -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-cc2b3041.js";import{S as Xe}from"./SdkTabs-cf23198f.js";import{F as Ye}from"./FieldsQueryParam-b174364f.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]}'); - - ... - - await pb.collection('${(Ce=a[0])==null?void 0:Ce.name}').authWithPassword('test@example.com', '123456'); - - const result = await pb.collection('${(ge=a[0])==null?void 0:ge.name}').listExternalAuths( - pb.authStore.model.id - ); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${a[3]}'); - - ... - - await pb.collection('${(Se=a[0])==null?void 0:Se.name}').authWithPassword('test@example.com', '123456'); - - final result = await pb.collection('${(Ee=a[0])==null?void 0:Ee.name}').listExternalAuths( - pb.authStore.model.id, - ); - `}}),E=new Ye({});let j=a[2];const Te=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",le=f(),B=n("div"),B.textContent="Path Parameters",se=f(),q=n("table"),q.innerHTML=`Param - Type - Description - id - String - ID of the auth record.`,oe=f(),L=n("div"),L.textContent="Query parameters",ae=f(),C=n("table"),ie=n("thead"),ie.innerHTML=`Param - Type - Description`,$e=f(),ne=n("tbody"),de(E.$$.fragment),re=f(),M=n("div"),M.textContent="Responses",ce=f(),g=n("div"),O=n("div");for(let e=0;e<$.length;e+=1)$[e].c();ye=f(),D=n("div");for(let e=0;es(1,_=h.code);return a.$$set=h=>{"collection"in h&&s(0,b=h.collection)},a.$$.update=()=>{a.$$.dirty&1&&s(2,d=[{code:200,body:` - [ - { - "id": "8171022dc95a4e8", - "created": "2022-09-01 10:24:18.434", - "updated": "2022-09-01 10:24:18.889", - "recordId": "e22581b6f1d44ea", - "collectionId": "${b.id}", - "provider": "google", - "providerId": "2da15468800514p", - }, - { - "id": "171022dc895a4e8", - "created": "2022-09-01 10:24:18.434", - "updated": "2022-09-01 10:24:18.889", - "recordId": "e22581b6f1d44ea", - "collectionId": "${b.id}", - "provider": "twitter", - "providerId": "720688005140514", - } - ] - `},{code:401,body:` - { - "code": 401, - "message": "The request requires valid record authorization token to be set.", - "data": {} - } - `},{code:403,body:` - { - "code": 403, - "message": "The authorized record model is not allowed to perform this action.", - "data": {} - } - `},{code:404,body:` - { - "code": 404, - "message": "The requested resource wasn't found.", - "data": {} - } - `}])},s(3,i=Ge.getApiExampleUrl(Ke.baseUrl)),[b,_,d,i,u]}class st extends ze{constructor(l){super(),Qe(this,l,xe,Ze,Re,{collection:0})}}export{st as default}; diff --git a/ui/dist/assets/ListExternalAuthsDocs-e65208fd.js b/ui/dist/assets/ListExternalAuthsDocs-e65208fd.js new file mode 100644 index 00000000..f57028d1 --- /dev/null +++ b/ui/dist/assets/ListExternalAuthsDocs-e65208fd.js @@ -0,0 +1,88 @@ +import{S as ze,i as Qe,s as Ue,O as F,e as i,w as v,b as m,c as pe,f as b,g as c,h as a,m as ue,x as N,P as Oe,Q as je,k as Fe,R as Ne,n as Ge,t as G,a as K,o as d,d as me,C as Ke,p as Je,r as J,u as Ve,N as Xe}from"./index-7d8498e9.js";import{S as Ye}from"./SdkTabs-36d454aa.js";import{F as Ze}from"./FieldsQueryParam-594c3384.js";function De(o,l,s){const n=o.slice();return n[5]=l[s],n}function He(o,l,s){const n=o.slice();return n[5]=l[s],n}function Re(o,l){let s,n=l[5].code+"",f,_,r,u;function h(){return l[4](l[5])}return{key:o,first:null,c(){s=i("button"),f=v(n),_=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(w,y){c(w,s,y),a(s,f),a(s,_),r||(u=Ve(s,"click",h),r=!0)},p(w,y){l=w,y&4&&n!==(n=l[5].code+"")&&N(f,n),y&6&&J(s,"active",l[1]===l[5].code)},d(w){w&&d(s),r=!1,u()}}}function We(o,l){let s,n,f,_;return n=new Xe({props:{content:l[5].body}}),{key:o,first:null,c(){s=i("div"),pe(n.$$.fragment),f=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(r,u){c(r,s,u),ue(n,s,null),a(s,f),_=!0},p(r,u){l=r;const h={};u&4&&(h.content=l[5].body),n.$set(h),(!_||u&6)&&J(s,"active",l[1]===l[5].code)},i(r){_||(G(n.$$.fragment,r),_=!0)},o(r){K(n.$$.fragment,r),_=!1},d(r){r&&d(s),me(n)}}}function xe(o){var Ce,Se,Ee,Ie;let l,s,n=o[0].name+"",f,_,r,u,h,w,y,R=o[0].name+"",V,be,fe,X,Y,P,Z,I,x,$,W,he,z,T,_e,ee,Q=o[0].name+"",te,ke,le,ve,ge,U,se,B,ae,q,oe,L,ne,A,ie,$e,ce,E,de,M,re,C,O,g=[],we=new Map,ye,D,k=[],Pe=new Map,S;P=new Ye({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${o[3]}'); + + ... + + await pb.collection('${(Ce=o[0])==null?void 0:Ce.name}').authWithPassword('test@example.com', '123456'); + + const result = await pb.collection('${(Se=o[0])==null?void 0:Se.name}').listExternalAuths( + pb.authStore.model.id + ); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${o[3]}'); + + ... + + await pb.collection('${(Ee=o[0])==null?void 0:Ee.name}').authWithPassword('test@example.com', '123456'); + + final result = await pb.collection('${(Ie=o[0])==null?void 0:Ie.name}').listExternalAuths( + pb.authStore.model.id, + ); + `}}),E=new Ze({});let j=F(o[2]);const Te=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",se=m(),B=i("div"),B.textContent="Path Parameters",ae=m(),q=i("table"),q.innerHTML='Param Type Description id String ID of the auth record.',oe=m(),L=i("div"),L.textContent="Query parameters",ne=m(),A=i("table"),ie=i("thead"),ie.innerHTML='Param Type Description',$e=m(),ce=i("tbody"),pe(E.$$.fragment),de=m(),M=i("div"),M.textContent="Responses",re=m(),C=i("div"),O=i("div");for(let e=0;es(1,_=h.code);return o.$$set=h=>{"collection"in h&&s(0,f=h.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(2,r=[{code:200,body:` + [ + { + "id": "8171022dc95a4e8", + "created": "2022-09-01 10:24:18.434", + "updated": "2022-09-01 10:24:18.889", + "recordId": "e22581b6f1d44ea", + "collectionId": "${f.id}", + "provider": "google", + "providerId": "2da15468800514p", + }, + { + "id": "171022dc895a4e8", + "created": "2022-09-01 10:24:18.434", + "updated": "2022-09-01 10:24:18.889", + "recordId": "e22581b6f1d44ea", + "collectionId": "${f.id}", + "provider": "twitter", + "providerId": "720688005140514", + } + ] + `},{code:401,body:` + { + "code": 401, + "message": "The request requires valid record authorization token to be set.", + "data": {} + } + `},{code:403,body:` + { + "code": 403, + "message": "The authorized record model is not allowed to perform this action.", + "data": {} + } + `},{code:404,body:` + { + "code": 404, + "message": "The requested resource wasn't found.", + "data": {} + } + `}])},s(3,n=Ke.getApiExampleUrl(Je.baseUrl)),[f,_,r,n,u]}class at extends ze{constructor(l){super(),Qe(this,l,et,xe,Ue,{collection:0})}}export{at as default}; diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-5156b185.js b/ui/dist/assets/PageAdminConfirmPasswordReset-5156b185.js new file mode 100644 index 00000000..7e890870 --- /dev/null +++ b/ui/dist/assets/PageAdminConfirmPasswordReset-5156b185.js @@ -0,0 +1,2 @@ +import{S as E,i as G,s as I,F as K,c as R,m as A,t as B,a as N,d as T,C as M,q as J,e as _,w as P,b as k,f,r as L,g as b,h as c,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 q}from"./index-7d8498e9.js";function y(i){let e,n,s;return{c(){e=P("for "),n=_("strong"),s=P(i[3]),f(n,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,n,t),c(n,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&(w(e),w(n))}}}function x(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0,t.autofocus=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[0]),t.focus(),p||(d=j(t,"input",i[6]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&1&&t.value!==r[0]&&q(t,r[0])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function ee(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password confirm"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[1]),p||(d=j(t,"input",i[7]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&2&&t.value!==r[1]&&q(t,r[1])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function te(i){let e,n,s,l,t,u,p,d,r,a,g,S,C,v,h,F,z,m=i[3]&&y(i);return u=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),{c(){e=_("form"),n=_("div"),s=_("h4"),l=P(`Reset your admin password + `),m&&m.c(),t=k(),R(u.$$.fragment),p=k(),R(d.$$.fragment),r=k(),a=_("button"),g=_("span"),g.textContent="Set new password",S=k(),C=_("div"),v=_("a"),v.textContent="Back to login",f(s,"class","m-b-xs"),f(n,"class","content txt-center m-b-sm"),f(g,"class","txt"),f(a,"type","submit"),f(a,"class","btn btn-lg btn-block"),a.disabled=i[2],L(a,"btn-loading",i[2]),f(e,"class","m-b-base"),f(v,"href","/login"),f(v,"class","link-hint"),f(C,"class","content txt-center")},m(o,$){b(o,e,$),c(e,n),c(n,s),c(s,l),m&&m.m(s,null),c(e,t),A(u,e,null),c(e,p),A(d,e,null),c(e,r),c(e,a),c(a,g),b(o,S,$),b(o,C,$),c(C,v),h=!0,F||(z=[j(e,"submit",O(i[4])),Q(U.call(null,v))],F=!0)},p(o,$){o[3]?m?m.p(o,$):(m=y(o),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const D={};$&769&&(D.$$scope={dirty:$,ctx:o}),u.$set(D);const H={};$&770&&(H.$$scope={dirty:$,ctx:o}),d.$set(H),(!h||$&4)&&(a.disabled=o[2]),(!h||$&4)&&L(a,"btn-loading",o[2])},i(o){h||(B(u.$$.fragment,o),B(d.$$.fragment,o),h=!0)},o(o){N(u.$$.fragment,o),N(d.$$.fragment,o),h=!1},d(o){o&&(w(e),w(S),w(C)),m&&m.d(),T(u),T(d),F=!1,V(z)}}}function se(i){let e,n;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:i}}}),{c(){R(e.$$.fragment)},m(s,l){A(e,s,l),n=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){n||(B(e.$$.fragment,s),n=!0)},o(s){N(e.$$.fragment,s),n=!1},d(s){T(e,s)}}}function le(i,e,n){let s,{params:l}=e,t="",u="",p=!1;async function d(){if(!p){n(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,u),X("Successfully set a new admin password."),Y("/")}catch(g){W.error(g)}n(2,p=!1)}}function r(){t=this.value,n(0,t)}function a(){u=this.value,n(1,u)}return i.$$set=g=>{"params"in g&&n(5,l=g.params)},i.$$.update=()=>{i.$$.dirty&32&&n(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,u,p,s,d,l,r,a]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-d17f2063.js b/ui/dist/assets/PageAdminConfirmPasswordReset-d17f2063.js deleted file mode 100644 index 6166b900..00000000 --- a/ui/dist/assets/PageAdminConfirmPasswordReset-d17f2063.js +++ /dev/null @@ -1,2 +0,0 @@ -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-cc2b3041.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}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset-52406f79.js b/ui/dist/assets/PageAdminRequestPasswordReset-52406f79.js deleted file mode 100644 index fbc2cb07..00000000 --- a/ui/dist/assets/PageAdminRequestPasswordReset-52406f79.js +++ /dev/null @@ -1,2 +0,0 @@ -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-cc2b3041.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=`

Forgotten admin password

-

Enter the email associated with your account and we’ll send you a recovery link:

`,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='',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}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset-d501ff16.js b/ui/dist/assets/PageAdminRequestPasswordReset-d501ff16.js new file mode 100644 index 00000000..0c8c8337 --- /dev/null +++ b/ui/dist/assets/PageAdminRequestPasswordReset-d501ff16.js @@ -0,0 +1 @@ +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 v,e as _,f as p,g,h as d,j as A,l as B,k as N,n as D,o as k,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-7d8498e9.js";function K(u){let e,s,n,l,t,o,c,m,r,a,b,f;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:i})=>({5:i}),({uniqueId:i})=>i?32:0]},$$scope:{ctx:u}}}),{c(){e=_("form"),s=_("div"),s.innerHTML='

Forgotten admin password

Enter the email associated with your account and we’ll send you a recovery link:

',n=v(),R(l.$$.fragment),t=v(),o=_("button"),c=_("i"),m=v(),r=_("span"),r.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(c,"class","ri-mail-send-line"),p(r,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=u[1],F(o,"btn-loading",u[1]),p(e,"class","m-b-base")},m(i,$){g(i,e,$),d(e,s),d(e,n),S(l,e,null),d(e,t),d(e,o),d(o,c),d(o,m),d(o,r),a=!0,b||(f=H(e,"submit",I(u[3])),b=!0)},p(i,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:i}),l.$set(q),(!a||$&2)&&(o.disabled=i[1]),(!a||$&2)&&F(o,"btn-loading",i[1])},i(i){a||(w(l.$$.fragment,i),a=!0)},o(i){y(l.$$.fragment,i),a=!1},d(i){i&&k(e),E(l),b=!1,f()}}}function O(u){let e,s,n,l,t,o,c,m,r;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=v(),l=_("div"),t=_("p"),o=h("Check "),c=_("strong"),m=h(u[0]),r=h(" for the recovery link."),p(s,"class","icon"),p(c,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){g(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,c),d(c,m),d(t,r)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&k(e)}}}function Q(u){let e,s,n,l,t,o,c,m;return{c(){e=_("label"),s=h("Email"),l=v(),t=_("input"),p(e,"for",n=u[5]),p(t,"type","email"),p(t,"id",o=u[5]),t.required=!0,t.autofocus=!0},m(r,a){g(r,e,a),d(e,s),g(r,l,a),g(r,t,a),L(t,u[0]),t.focus(),c||(m=H(t,"input",u[4]),c=!0)},p(r,a){a&32&&n!==(n=r[5])&&p(e,"for",n),a&32&&o!==(o=r[5])&&p(t,"id",o),a&1&&t.value!==r[0]&&L(t,r[0])},d(r){r&&(k(e),k(l),k(t)),c=!1,m()}}}function U(u){let e,s,n,l,t,o,c,m;const r=[O,K],a=[];function b(f,i){return f[2]?0:1}return e=b(u),s=a[e]=r[e](u),{c(){s.c(),n=v(),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(f,i){a[e].m(f,i),g(f,n,i),g(f,l,i),d(l,t),o=!0,c||(m=A(B.call(null,t)),c=!0)},p(f,i){let $=e;e=b(f),e===$?a[e].p(f,i):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(f,i):(s=a[e]=r[e](f),s.c()),w(s,1),s.m(n.parentNode,n))},i(f){o||(w(s),o=!0)},o(f){y(s),o=!1},d(f){f&&(k(n),k(l)),a[e].d(f),c=!1,m()}}}function V(u){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:u}}}),{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(u,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 c(){n=this.value,s(0,n)}return[n,l,t,o,c]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageOAuth2Redirect-02a51b28.js b/ui/dist/assets/PageOAuth2Redirect-02a51b28.js new file mode 100644 index 00000000..0d851b77 --- /dev/null +++ b/ui/dist/assets/PageOAuth2Redirect-02a51b28.js @@ -0,0 +1 @@ +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-7d8498e9.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML='

Auth completed.

You can go back to the app if this window is not automatically closed.
',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}; diff --git a/ui/dist/assets/PageOAuth2Redirect-aa540155.js b/ui/dist/assets/PageOAuth2Redirect-aa540155.js deleted file mode 100644 index 107befcb..00000000 --- a/ui/dist/assets/PageOAuth2Redirect-aa540155.js +++ /dev/null @@ -1,2 +0,0 @@ -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-cc2b3041.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML=`

Auth completed.

-
You can go back to the app if this window is not automatically closed.
`,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}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-6b1f497a.js b/ui/dist/assets/PageRecordConfirmEmailChange-6b1f497a.js deleted file mode 100644 index 1c859cc1..00000000 --- a/ui/dist/assets/PageRecordConfirmEmailChange-6b1f497a.js +++ /dev/null @@ -1,4 +0,0 @@ -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-cc2b3041.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=`
-

Successfully changed the user email address.

-

You can now sign in with your new email address.

`,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}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-aadb32e3.js b/ui/dist/assets/PageRecordConfirmEmailChange-aadb32e3.js new file mode 100644 index 00000000..dc6a757d --- /dev/null +++ b/ui/dist/assets/PageRecordConfirmEmailChange-aadb32e3.js @@ -0,0 +1,2 @@ +import{S as G,i as I,s as J,F as M,c as S,m as L,t as h,a as v,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 y,b as C,f as p,r as T,h as g,u as P,v as K,y as E,x as O,z as F}from"./index-7d8498e9.js";function Q(i){let e,t,n,l,s,o,f,a,r,u,k,$,d=i[3]&&H(i);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:c})=>({8:c}),({uniqueId:c})=>c?256:0]},$$scope:{ctx:i}}}),{c(){e=m("form"),t=m("div"),n=m("h5"),l=y(`Type your password to confirm changing your email address + `),d&&d.c(),s=C(),S(o.$$.fragment),f=C(),a=m("button"),r=m("span"),r.textContent="Confirm new email",p(t,"class","content txt-center m-b-base"),p(r,"class","txt"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block"),a.disabled=i[1],T(a,"btn-loading",i[1])},m(c,w){_(c,e,w),g(e,t),g(t,n),g(n,l),d&&d.m(n,null),g(e,s),L(o,e,null),g(e,f),g(e,a),g(a,r),u=!0,k||($=P(e,"submit",K(i[4])),k=!0)},p(c,w){c[3]?d?d.p(c,w):(d=H(c),d.c(),d.m(n,null)):d&&(d.d(1),d=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:c}),o.$set(q),(!u||w&2)&&(a.disabled=c[1]),(!u||w&2)&&T(a,"btn-loading",c[1])},i(c){u||(h(o.$$.fragment,c),u=!0)},o(c){v(o.$$.fragment,c),u=!1},d(c){c&&b(e),d&&d.d(),z(o),k=!1,$()}}}function U(i){let e,t,n,l,s;return{c(){e=m("div"),e.innerHTML='

Successfully changed the user email address.

You can now sign in with your new email address.

',t=C(),n=m("button"),n.textContent="Close",p(e,"class","alert alert-success"),p(n,"type","button"),p(n,"class","btn btn-transparent btn-block")},m(o,f){_(o,e,f),_(o,t,f),_(o,n,f),l||(s=P(n,"click",i[6]),l=!0)},p:E,i:E,o:E,d(o){o&&(b(e),b(t),b(n)),l=!1,s()}}}function H(i){let e,t,n;return{c(){e=y("to "),t=m("strong"),n=y(i[3]),p(t,"class","txt-nowrap")},m(l,s){_(l,e,s),_(l,t,s),g(t,n)},p(l,s){s&8&&O(n,l[3])},d(l){l&&(b(e),b(t))}}}function V(i){let e,t,n,l,s,o,f,a;return{c(){e=m("label"),t=y("Password"),l=C(),s=m("input"),p(e,"for",n=i[8]),p(s,"type","password"),p(s,"id",o=i[8]),s.required=!0,s.autofocus=!0},m(r,u){_(r,e,u),g(e,t),_(r,l,u),_(r,s,u),F(s,i[0]),s.focus(),f||(a=P(s,"input",i[7]),f=!0)},p(r,u){u&256&&n!==(n=r[8])&&p(e,"for",n),u&256&&o!==(o=r[8])&&p(s,"id",o),u&1&&s.value!==r[0]&&F(s,r[0])},d(r){r&&(b(e),b(l),b(s)),f=!1,a()}}}function X(i){let e,t,n,l;const s=[U,Q],o=[];function f(a,r){return a[2]?0:1}return e=f(i),t=o[e]=s[e](i),{c(){t.c(),n=R()},m(a,r){o[e].m(a,r),_(a,n,r),l=!0},p(a,r){let u=e;e=f(a),e===u?o[e].p(a,r):(W(),v(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,r):(t=o[e]=s[e](a),t.c()),h(t,1),t.m(n.parentNode,n))},i(a){l||(h(t),l=!0)},o(a){v(t),l=!1},d(a){a&&b(n),o[e].d(a)}}}function Z(i){let e,t;return e=new M({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:i}}}),{c(){S(e.$$.fragment)},m(n,l){L(e,n,l),t=!0},p(n,[l]){const s={};l&527&&(s.$$scope={dirty:l,ctx:n}),e.$set(s)},i(n){t||(h(e.$$.fragment,n),t=!0)},o(n){v(e.$$.fragment,n),t=!1},d(n){z(e,n)}}}function x(i,e,t){let n,{params:l}=e,s="",o=!1,f=!1;async function a(){if(o)return;t(1,o=!0);const k=new j("../");try{const $=A(l==null?void 0:l.token);await k.collection($.collectionId).confirmEmailChange(l==null?void 0:l.token,s),t(2,f=!0)}catch($){B.error($)}t(1,o=!1)}const r=()=>window.close();function u(){s=this.value,t(0,s)}return i.$$set=k=>{"params"in k&&t(5,l=k.params)},i.$$.update=()=>{i.$$.dirty&32&&t(3,n=N.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[s,o,f,n,a,l,r,u]}class te extends G{constructor(e){super(),I(this,e,x,Z,J,{params:5})}}export{te as default}; diff --git a/ui/dist/assets/PageRecordConfirmPasswordReset-73d1f6d0.js b/ui/dist/assets/PageRecordConfirmPasswordReset-73d1f6d0.js deleted file mode 100644 index 8aad5d71..00000000 --- a/ui/dist/assets/PageRecordConfirmPasswordReset-73d1f6d0.js +++ /dev/null @@ -1,4 +0,0 @@ -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-cc2b3041.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=`
-

Successfully changed the user password.

-

You can now sign in with your new password.

`,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}; diff --git a/ui/dist/assets/PageRecordConfirmPasswordReset-7ca6e881.js b/ui/dist/assets/PageRecordConfirmPasswordReset-7ca6e881.js new file mode 100644 index 00000000..a08a8ab6 --- /dev/null +++ b/ui/dist/assets/PageRecordConfirmPasswordReset-7ca6e881.js @@ -0,0 +1,2 @@ +import{S as J,i as M,s as W,F as Y,c as H,m as N,t as P,a as y,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 q,b as C,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-7d8498e9.js";function X(a){let e,l,s,n,t,o,c,r,i,u,v,g,k,h,d=a[4]&&I(a);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:a}}}),r=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:a}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=q(`Reset your user password + `),d&&d.c(),t=C(),H(o.$$.fragment),c=C(),H(r.$$.fragment),i=C(),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=a[2],G(u,"btn-loading",a[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(r,e,null),w(e,i),w(e,u),w(u,v),g=!0,k||(h=S(e,"submit",U(a[5])),k=!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}),r.$set(z),(!g||$&4)&&(u.disabled=f[2]),(!g||$&4)&&G(u,"btn-loading",f[2])},i(f){g||(P(o.$$.fragment,f),P(r.$$.fragment,f),g=!0)},o(f){y(o.$$.fragment,f),y(r.$$.fragment,f),g=!1},d(f){f&&m(e),d&&d.d(),T(o),T(r),k=!1,h()}}}function Z(a){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML='

Successfully changed the user password.

You can now sign in with your new password.

',l=C(),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",a[7]),n=!0)},p:F,i:F,o:F,d(o){o&&(m(e),m(l),m(s)),n=!1,t()}}}function I(a){let e,l,s;return{c(){e=q("for "),l=b("strong"),s=q(a[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),m(l))}}}function x(a){let e,l,s,n,t,o,c,r;return{c(){e=b("label"),l=q("New password"),n=C(),t=b("input"),p(e,"for",s=a[10]),p(t,"type","password"),p(t,"id",o=a[10]),t.required=!0,t.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),R(t,a[0]),t.focus(),c||(r=S(t,"input",a[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),m(n),m(t)),c=!1,r()}}}function ee(a){let e,l,s,n,t,o,c,r;return{c(){e=b("label"),l=q("New password confirm"),n=C(),t=b("input"),p(e,"for",s=a[10]),p(t,"type","password"),p(t,"id",o=a[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),R(t,a[1]),c||(r=S(t,"input",a[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),m(n),m(t)),c=!1,r()}}}function te(a){let e,l,s,n;const t=[Z,X],o=[];function c(r,i){return r[3]?0:1}return e=c(a),l=o[e]=t[e](a),{c(){l.c(),s=A()},m(r,i){o[e].m(r,i),_(r,s,i),n=!0},p(r,i){let u=e;e=c(r),e===u?o[e].p(r,i):(B(),y(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(r,i):(l=o[e]=t[e](r),l.c()),P(l,1),l.m(s.parentNode,s))},i(r){n||(P(l),n=!0)},o(r){y(l),n=!1},d(r){r&&m(s),o[e].d(r)}}}function se(a){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:a}}}),{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||(P(e.$$.fragment,s),l=!0)},o(s){y(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(a,e,l){let s,{params:n}=e,t="",o="",c=!1,r=!1;async function i(){if(c)return;l(2,c=!0);const k=new K("../");try{const h=O(n==null?void 0:n.token);await k.collection(h.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,r=!0)}catch(h){Q.error(h)}l(2,c=!1)}const u=()=>window.close();function v(){t=this.value,l(0,t)}function g(){o=this.value,l(1,o)}return a.$$set=k=>{"params"in k&&l(6,n=k.params)},a.$$.update=()=>{a.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,r,s,i,n,u,v,g]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default}; diff --git a/ui/dist/assets/PageRecordConfirmVerification-02960591.js b/ui/dist/assets/PageRecordConfirmVerification-02960591.js new file mode 100644 index 00000000..45ea670f --- /dev/null +++ b/ui/dist/assets/PageRecordConfirmVerification-02960591.js @@ -0,0 +1 @@ +import{S as v,i as y,s as g,F as w,c as C,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as a,o as r,e as f,b as _,f as d,u as b,y as p}from"./index-7d8498e9.js";function S(c){let t,s,e,n,l;return{c(){t=f("div"),t.innerHTML='

Invalid or expired verification token.

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

Successfully verified email address.

',s=_(),e=f("button"),e.textContent="Close",d(t,"class","alert alert-success"),d(e,"type","button"),d(e,"class","btn btn-transparent btn-block")},m(i,o){a(i,t,o),a(i,s,o),a(i,e,o),n||(l=b(e,"click",c[3]),n=!0)},p,d(i){i&&(r(t),r(s),r(e)),n=!1,l()}}}function F(c){let t;return{c(){t=f("div"),t.innerHTML='
Please wait...
',d(t,"class","txt-center")},m(s,e){a(s,t,e)},p,d(s){s&&r(t)}}}function I(c){let t;function s(l,i){return l[1]?F:l[0]?h:S}let e=s(c),n=e(c);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),a(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){l&&r(t),n.d(l)}}}function V(c){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[I]},$$scope:{ctx:c}}}),{c(){C(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 q(c,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const u=new P("../");try{const m=T(e==null?void 0:e.token);await u.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const o=()=>window.close(),k=()=>window.close();return c.$$set=u=>{"params"in u&&s(2,e=u.params)},[n,l,e,o,k]}class G extends v{constructor(t){super(),y(this,t,q,V,g,{params:2})}}export{G as default}; diff --git a/ui/dist/assets/PageRecordConfirmVerification-3c5a92b7.js b/ui/dist/assets/PageRecordConfirmVerification-3c5a92b7.js deleted file mode 100644 index 3f161087..00000000 --- a/ui/dist/assets/PageRecordConfirmVerification-3c5a92b7.js +++ /dev/null @@ -1,3 +0,0 @@ -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-cc2b3041.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`
-

Invalid or expired verification token.

`,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=`
-

Successfully verified email address.

`,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='
Please wait...
',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}; diff --git a/ui/dist/assets/RealtimeApiDocs-3da84741.js b/ui/dist/assets/RealtimeApiDocs-264e523b.js similarity index 58% rename from ui/dist/assets/RealtimeApiDocs-3da84741.js rename to ui/dist/assets/RealtimeApiDocs-264e523b.js index 7de7c470..1f80a648 100644 --- a/ui/dist/assets/RealtimeApiDocs-3da84741.js +++ b/ui/dist/assets/RealtimeApiDocs-264e523b.js @@ -1,66 +1,61 @@ -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-cc2b3041.js";import{S as de}from"./SdkTabs-cf23198f.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 se,f as u,g as s,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-7d8498e9.js";import{S as de}from"./SdkTabs-36d454aa.js";function fe(t){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,c=t[0].name+"",b,d,D,f,_,$,k,l,S,g,C,v,w,h,E,r,R;return l=new de({props:{js:` import PocketBase from 'pocketbase'; - const pb = new PocketBase('${s[1]}'); + const pb = new PocketBase('${t[1]}'); ... // (Optionally) authenticate await pb.collection('users').authWithPassword('test@example.com', '123456'); - // Subscribe to changes in any ${(B=s[0])==null?void 0:B.name} record - pb.collection('${(U=s[0])==null?void 0:U.name}').subscribe('*', function (e) { + // Subscribe to changes in any ${(B=t[0])==null?void 0:B.name} record + pb.collection('${(U=t[0])==null?void 0:U.name}').subscribe('*', function (e) { console.log(e.action); console.log(e.record); }); // Subscribe to changes only in the specified record - pb.collection('${(W=s[0])==null?void 0:W.name}').subscribe('RECORD_ID', function (e) { + pb.collection('${(W=t[0])==null?void 0:W.name}').subscribe('RECORD_ID', function (e) { console.log(e.action); console.log(e.record); }); // Unsubscribe - pb.collection('${(A=s[0])==null?void 0:A.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions - pb.collection('${(H=s[0])==null?void 0:H.name}').unsubscribe('*'); // remove all '*' topic subscriptions - pb.collection('${(L=s[0])==null?void 0:L.name}').unsubscribe(); // remove all subscriptions in the collection + pb.collection('${(A=t[0])==null?void 0:A.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions + pb.collection('${(H=t[0])==null?void 0:H.name}').unsubscribe('*'); // remove all '*' topic subscriptions + pb.collection('${(L=t[0])==null?void 0:L.name}').unsubscribe(); // remove all subscriptions in the collection `,dart:` import 'package:pocketbase/pocketbase.dart'; - final pb = PocketBase('${s[1]}'); + final pb = PocketBase('${t[1]}'); ... // (Optionally) authenticate await pb.collection('users').authWithPassword('test@example.com', '123456'); - // Subscribe to changes in any ${(T=s[0])==null?void 0:T.name} record - pb.collection('${(q=s[0])==null?void 0:q.name}').subscribe('*', (e) { + // Subscribe to changes in any ${(T=t[0])==null?void 0:T.name} record + pb.collection('${(q=t[0])==null?void 0:q.name}').subscribe('*', (e) { print(e.action); print(e.record); }); // Subscribe to changes only in the specified record - pb.collection('${(M=s[0])==null?void 0:M.name}').subscribe('RECORD_ID', (e) { + pb.collection('${(M=t[0])==null?void 0:M.name}').subscribe('RECORD_ID', (e) { print(e.action); print(e.record); }); // Unsubscribe - pb.collection('${(N=s[0])==null?void 0:N.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions - pb.collection('${(j=s[0])==null?void 0:j.name}').unsubscribe('*'); // remove all '*' topic subscriptions - pb.collection('${(J=s[0])==null?void 0:J.name}').unsubscribe(); // remove all subscriptions in the collection - `}}),r=new pe({props:{content:JSON.stringify({action:"create",record:P.dummyCollectionRecord(s[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){i=p("h3"),m=y("Realtime ("),b=y(c),d=y(")"),h=a(),f=p("div"),f.innerHTML=`

Subscribe to realtime changes via Server-Sent Events (SSE).

-

Events are sent for create, update - and delete record operations (see "Event data format" section below).

`,_=a(),$=p("div"),$.innerHTML=`
-

You could subscribe to a single record or to an entire collection.

-

When you subscribe to a single record, the collection's + pb.collection('${(N=t[0])==null?void 0:N.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions + pb.collection('${(j=t[0])==null?void 0:j.name}').unsubscribe('*'); // remove all '*' topic subscriptions + pb.collection('${(J=t[0])==null?void 0:J.name}').unsubscribe(); // remove all subscriptions in the collection + `}}),r=new pe({props:{content:JSON.stringify({action:"create",record:P.dummyCollectionRecord(t[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){i=p("h3"),m=y("Realtime ("),b=y(c),d=y(")"),D=a(),f=p("div"),f.innerHTML=`

Subscribe to realtime changes via Server-Sent Events (SSE).

Events are sent for create, update + and delete record operations (see "Event data format" section below).

`,_=a(),$=p("div"),$.innerHTML=`

You could subscribe to a single record or to an entire collection.

When you subscribe to a single record, the collection's ViewRule will be used to determine whether the subscriber has access to receive the - event message.

-

When you subscribe to an entire collection, the collection's + event message.

When you subscribe to an entire collection, the collection's ListRule will be used to determine whether the subscriber has access to receive the - event message.

`,k=a(),te(l.$$.fragment),S=a(),v=p("h6"),v.textContent="API details",C=a(),R=p("div"),R.innerHTML=`SSE -

/api/realtime

`,w=a(),g=p("div"),g.textContent="Event data format",E=a(),te(r.$$.fragment),u(i,"class","m-b-sm"),u(f,"class","content txt-lg m-b-sm"),u($,"class","alert alert-info m-t-10 m-b-sm"),u(v,"class","m-b-xs"),u(R,"class","alert"),u(g,"class","section-title")},m(e,o){t(e,i,o),I(i,m),I(i,b),I(i,d),t(e,h,o),t(e,f,o),t(e,_,o),t(e,$,o),t(e,k,o),ne(l,e,o),t(e,S,o),t(e,v,o),t(e,C,o),t(e,R,o),t(e,w,o),t(e,g,o),t(e,E,o),ne(r,e,o),D=!0},p(e,[o]){var Y,z,F,G,K,Q,X,Z,x,ee,oe,se;(!D||o&1)&&c!==(c=e[0].name+"")&&ue(b,c);const O={};o&3&&(O.js=` + event message.

`,k=a(),se(l.$$.fragment),S=a(),g=p("h6"),g.textContent="API details",C=a(),v=p("div"),v.innerHTML='SSE

/api/realtime

',w=a(),h=p("div"),h.textContent="Event data format",E=a(),se(r.$$.fragment),u(i,"class","m-b-sm"),u(f,"class","content txt-lg m-b-sm"),u($,"class","alert alert-info m-t-10 m-b-sm"),u(g,"class","m-b-xs"),u(v,"class","alert"),u(h,"class","section-title")},m(e,o){s(e,i,o),I(i,m),I(i,b),I(i,d),s(e,D,o),s(e,f,o),s(e,_,o),s(e,$,o),s(e,k,o),ne(l,e,o),s(e,S,o),s(e,g,o),s(e,C,o),s(e,v,o),s(e,w,o),s(e,h,o),s(e,E,o),ne(r,e,o),R=!0},p(e,[o]){var Y,z,F,G,K,Q,X,Z,x,ee,oe,te;(!R||o&1)&&c!==(c=e[0].name+"")&&ue(b,c);const O={};o&3&&(O.js=` import PocketBase from 'pocketbase'; const pb = new PocketBase('${e[1]}'); @@ -111,5 +106,5 @@ 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 // Unsubscribe pb.collection('${(ee=e[0])==null?void 0:ee.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions pb.collection('${(oe=e[0])==null?void 0:oe.name}').unsubscribe('*'); // remove all '*' topic subscriptions - pb.collection('${(se=e[0])==null?void 0:se.name}').unsubscribe(); // remove all subscriptions in the collection - `),l.$set(O);const V={};o&1&&(V.content=JSON.stringify({action:"create",record:P.dummyCollectionRecord(e[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),r.$set(V)},i(e){D||(ie(l.$$.fragment,e),ie(r.$$.fragment,e),D=!0)},o(e){ce(l.$$.fragment,e),ce(r.$$.fragment,e),D=!1},d(e){e&&n(i),e&&n(h),e&&n(f),e&&n(_),e&&n($),e&&n(k),le(l,e),e&&n(S),e&&n(v),e&&n(C),e&&n(R),e&&n(w),e&&n(g),e&&n(E),le(r,e)}}}function $e(s,i,m){let c,{collection:b}=i;return s.$$set=d=>{"collection"in d&&m(0,b=d.collection)},m(1,c=P.getApiExampleUrl(me.baseUrl)),[b,c]}class ge extends re{constructor(i){super(),ae(this,i,$e,fe,be,{collection:0})}}export{ge as default}; + pb.collection('${(te=e[0])==null?void 0:te.name}').unsubscribe(); // remove all subscriptions in the collection + `),l.$set(O);const V={};o&1&&(V.content=JSON.stringify({action:"create",record:P.dummyCollectionRecord(e[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),r.$set(V)},i(e){R||(ie(l.$$.fragment,e),ie(r.$$.fragment,e),R=!0)},o(e){ce(l.$$.fragment,e),ce(r.$$.fragment,e),R=!1},d(e){e&&(n(i),n(D),n(f),n(_),n($),n(k),n(S),n(g),n(C),n(v),n(w),n(h),n(E)),le(l,e),le(r,e)}}}function $e(t,i,m){let c,{collection:b}=i;return t.$$set=d=>{"collection"in d&&m(0,b=d.collection)},m(1,c=P.getApiExampleUrl(me.baseUrl)),[b,c]}class he extends re{constructor(i){super(),ae(this,i,$e,fe,be,{collection:0})}}export{he as default}; diff --git a/ui/dist/assets/RequestEmailChangeDocs-8fc3b91e.js b/ui/dist/assets/RequestEmailChangeDocs-8fc3b91e.js new file mode 100644 index 00000000..5f099c75 --- /dev/null +++ b/ui/dist/assets/RequestEmailChangeDocs-8fc3b91e.js @@ -0,0 +1,64 @@ +import{S as Ee,i as Be,s as Se,O as L,e as r,w as v,b as k,c as Ce,f as b,g as d,h as n,m as ye,x as N,P as ve,Q as Re,k as Me,R as Ae,n as We,t as ee,a as te,o as m,d as Te,C as ze,p as He,r as F,u as Oe,N as Ue}from"./index-7d8498e9.js";import{S as je}from"./SdkTabs-36d454aa.js";function we(o,l,a){const s=o.slice();return s[5]=l[a],s}function $e(o,l,a){const s=o.slice();return s[5]=l[a],s}function qe(o,l){let a,s=l[5].code+"",h,f,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){a=r("button"),h=v(s),f=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m($,q){d($,a,q),n(a,h),n(a,f),i||(p=Oe(a,"click",u),i=!0)},p($,q){l=$,q&4&&s!==(s=l[5].code+"")&&N(h,s),q&6&&F(a,"active",l[1]===l[5].code)},d($){$&&m(a),i=!1,p()}}}function Pe(o,l){let a,s,h,f;return s=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){a=r("div"),Ce(s.$$.fragment),h=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m(i,p){d(i,a,p),ye(s,a,null),n(a,h),f=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),s.$set(u),(!f||p&6)&&F(a,"active",l[1]===l[5].code)},i(i){f||(ee(s.$$.fragment,i),f=!0)},o(i){te(s.$$.fragment,i),f=!1},d(i){i&&m(a),Te(s)}}}function De(o){var pe,ue,be,fe;let l,a,s=o[0].name+"",h,f,i,p,u,$,q,z=o[0].name+"",I,le,K,P,Q,T,G,w,H,ae,O,E,se,J,U=o[0].name+"",V,oe,ne,j,X,B,Y,S,Z,R,x,C,M,g=[],ie=new Map,ce,A,_=[],re=new Map,y;P=new je({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${o[3]}'); + + ... + + await pb.collection('${(pe=o[0])==null?void 0:pe.name}').authWithPassword('test@example.com', '1234567890'); + + await pb.collection('${(ue=o[0])==null?void 0:ue.name}').requestEmailChange('new@example.com'); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${o[3]}'); + + ... + + await pb.collection('${(be=o[0])==null?void 0:be.name}').authWithPassword('test@example.com', '1234567890'); + + await pb.collection('${(fe=o[0])==null?void 0:fe.name}').requestEmailChange('new@example.com'); + `}});let D=L(o[2]);const de=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",X=k(),B=r("div"),B.textContent="Body Parameters",Y=k(),S=r("table"),S.innerHTML='Param Type Description
Required newEmail
String The new email address to send the change email request.',Z=k(),R=r("div"),R.textContent="Responses",x=k(),C=r("div"),M=r("div");for(let e=0;ea(1,f=u.code);return o.$$set=u=>{"collection"in u&&a(0,h=u.collection)},a(3,s=ze.getApiExampleUrl(He.baseUrl)),a(2,i=[{code:204,body:"null"},{code:400,body:` + { + "code": 400, + "message": "Failed to authenticate.", + "data": { + "newEmail": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `},{code:401,body:` + { + "code": 401, + "message": "The request requires valid record authorization token to be set.", + "data": {} + } + `},{code:403,body:` + { + "code": 403, + "message": "The authorized record model is not allowed to perform this action.", + "data": {} + } + `}]),[h,f,i,s,p]}class Ie extends Ee{constructor(l){super(),Be(this,l,Le,De,Se,{collection:0})}}export{Ie as default}; diff --git a/ui/dist/assets/RequestEmailChangeDocs-de51a89c.js b/ui/dist/assets/RequestEmailChangeDocs-de51a89c.js deleted file mode 100644 index 2ea6fcf7..00000000 --- a/ui/dist/assets/RequestEmailChangeDocs-de51a89c.js +++ /dev/null @@ -1,70 +0,0 @@ -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-cc2b3041.js";import{S as Ue}from"./SdkTabs-cf23198f.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]}'); - - ... - - await pb.collection('${(de=o[0])==null?void 0:de.name}').authWithPassword('test@example.com', '1234567890'); - - await pb.collection('${(pe=o[0])==null?void 0:pe.name}').requestEmailChange('new@example.com'); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${o[3]}'); - - ... - - await pb.collection('${(ue=o[0])==null?void 0:ue.name}').authWithPassword('test@example.com', '1234567890'); - - await pb.collection('${(fe=o[0])==null?void 0:fe.name}').requestEmailChange('new@example.com'); - `}});let D=o[2];const re=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",V=k(),B=r("div"),B.textContent="Body Parameters",X=k(),S=r("table"),S.innerHTML=`Param - Type - Description -
Required - newEmail
- String - The new email address to send the change email request.`,Y=k(),M=r("div"),M.textContent="Responses",Z=k(),C=r("div"),R=r("div");for(let e=0;es(1,b=u.code);return o.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,a=We.getApiExampleUrl(ze.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` - { - "code": 400, - "message": "Failed to authenticate.", - "data": { - "newEmail": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `},{code:401,body:` - { - "code": 401, - "message": "The request requires valid record authorization token to be set.", - "data": {} - } - `},{code:403,body:` - { - "code": 403, - "message": "The authorized record model is not allowed to perform this action.", - "data": {} - } - `}]),[_,b,i,a,p]}class Fe extends Te{constructor(l){super(),Ee(this,l,De,je,Be,{collection:0})}}export{Fe as default}; diff --git a/ui/dist/assets/RequestPasswordResetDocs-0cdf8259.js b/ui/dist/assets/RequestPasswordResetDocs-0cdf8259.js new file mode 100644 index 00000000..aec4a700 --- /dev/null +++ b/ui/dist/assets/RequestPasswordResetDocs-0cdf8259.js @@ -0,0 +1,44 @@ +import{S as Pe,i as $e,s as qe,O as I,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as L,P as fe,Q as ye,k as Re,R as Be,n as Ce,t as x,a as ee,o as p,d as we,C as Se,p as Te,r as N,u as Me,N as Ae}from"./index-7d8498e9.js";import{S as Ue}from"./SdkTabs-36d454aa.js";function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s,l){const a=o.slice();return a[5]=s[l],a}function ke(o,s){let l,a=s[5].code+"",_,f,i,u;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=g(a),f=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(w,P){d(w,l,P),n(l,_),n(l,f),i||(u=Me(l,"click",m),i=!0)},p(w,P){s=w,P&4&&a!==(a=s[5].code+"")&&L(_,a),P&6&&N(l,"active",s[1]===s[5].code)},d(w){w&&p(l),i=!1,u()}}}function he(o,s){let l,a,_,f;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,u){d(i,l,u),ge(a,l,null),n(l,_),f=!0},p(i,u){s=i;const m={};u&4&&(m.content=s[5].body),a.$set(m),(!f||u&6)&&N(l,"active",s[1]===s[5].code)},i(i){f||(x(a.$$.fragment,i),f=!0)},o(i){ee(a.$$.fragment,i),f=!1},d(i){i&&p(l),we(a)}}}function je(o){var de,pe;let s,l,a=o[0].name+"",_,f,i,u,m,w,P,D=o[0].name+"",Q,te,z,$,G,B,J,q,H,se,O,C,le,K,E=o[0].name+"",V,ae,W,S,X,T,Y,M,Z,y,A,v=[],oe=new Map,ne,U,k=[],ie=new Map,R;$=new Ue({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${o[3]}'); + + ... + + await pb.collection('${(de=o[0])==null?void 0:de.name}').requestPasswordReset('test@example.com'); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${o[3]}'); + + ... + + await pb.collection('${(pe=o[0])==null?void 0:pe.name}').requestPasswordReset('test@example.com'); + `}});let F=I(o[2]);const ce=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required email
String The auth record email address to send the password reset request (if exists).',Y=h(),M=r("div"),M.textContent="Responses",Z=h(),y=r("div"),A=r("div");for(let e=0;el(1,f=m.code);return o.$$set=m=>{"collection"in m&&l(0,_=m.collection)},l(3,a=Se.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` + { + "code": 400, + "message": "Failed to authenticate.", + "data": { + "email": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `}]),[_,f,i,a,u]}class Ee extends Pe{constructor(s){super(),$e(this,s,De,je,qe,{collection:0})}}export{Ee as default}; diff --git a/ui/dist/assets/RequestPasswordResetDocs-b384ed30.js b/ui/dist/assets/RequestPasswordResetDocs-b384ed30.js deleted file mode 100644 index 0eb827ac..00000000 --- a/ui/dist/assets/RequestPasswordResetDocs-b384ed30.js +++ /dev/null @@ -1,50 +0,0 @@ -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-cc2b3041.js";import{S as Ae}from"./SdkTabs-cf23198f.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]}'); - - ... - - await pb.collection('${(re=a[0])==null?void 0:re.name}').requestPasswordReset('test@example.com'); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${a[3]}'); - - ... - - await pb.collection('${(de=a[0])==null?void 0:de.name}').requestPasswordReset('test@example.com'); - `}});let F=a[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam - Type - Description -
Required - email
- String - The auth record email address to send the password reset request (if exists).`,X=v(),M=r("div"),M.textContent="Responses",Y=v(),y=r("div"),A=r("div");for(let e=0;el(1,m=u.code);return a.$$set=u=>{"collection"in u&&l(0,_=u.collection)},l(3,o=Ce.getApiExampleUrl(Se.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` - { - "code": 400, - "message": "Failed to authenticate.", - "data": { - "email": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `}]),[_,m,i,o,p]}class Oe extends Pe{constructor(s){super(),$e(this,s,je,Ue,qe,{collection:0})}}export{Oe as default}; diff --git a/ui/dist/assets/RequestVerificationDocs-761941b0.js b/ui/dist/assets/RequestVerificationDocs-761941b0.js deleted file mode 100644 index 11f502d0..00000000 --- a/ui/dist/assets/RequestVerificationDocs-761941b0.js +++ /dev/null @@ -1,50 +0,0 @@ -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-cc2b3041.js";import{S as Re}from"./SdkTabs-cf23198f.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]}'); - - ... - - await pb.collection('${(re=a[0])==null?void 0:re.name}').requestVerification('test@example.com'); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${a[3]}'); - - ... - - await pb.collection('${(fe=a[0])==null?void 0:fe.name}').requestVerification('test@example.com'); - `}});let E=a[2];const ne=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam - Type - Description -
Required - email
- String - The auth record email address to send the verification request (if exists).`,X=v(),M=r("div"),M.textContent="Responses",Y=v(),y=r("div"),R=r("div");for(let e=0;es(1,m=d.code);return a.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Se.getApiExampleUrl(Te.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:` - { - "code": 400, - "message": "Failed to authenticate.", - "data": { - "email": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `}]),[_,m,n,o,u]}class He extends qe{constructor(l){super(),we(this,l,Ue,Ae,Pe,{collection:0})}}export{He as default}; diff --git a/ui/dist/assets/RequestVerificationDocs-c525e5da.js b/ui/dist/assets/RequestVerificationDocs-c525e5da.js new file mode 100644 index 00000000..9b4a59d6 --- /dev/null +++ b/ui/dist/assets/RequestVerificationDocs-c525e5da.js @@ -0,0 +1,44 @@ +import{S as qe,i as we,s as Pe,O as F,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as I,P as me,Q as ye,k as Be,R as Ce,n as Se,t as x,a as ee,o as f,d as $e,C as Te,p as Re,r as L,u as Ve,N as Me}from"./index-7d8498e9.js";import{S as Ae}from"./SdkTabs-36d454aa.js";function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l,s){const a=o.slice();return a[5]=l[s],a}function ke(o,l){let s,a=l[5].code+"",_,m,i,u;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),m=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m($,q){d($,s,q),n(s,_),n(s,m),i||(u=Ve(s,"click",p),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&I(_,a),q&6&&L(s,"active",l[1]===l[5].code)},d($){$&&f(s),i=!1,u()}}}function he(o,l){let s,a,_,m;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ve(a.$$.fragment),_=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(i,u){d(i,s,u),ge(a,s,null),n(s,_),m=!0},p(i,u){l=i;const p={};u&4&&(p.content=l[5].body),a.$set(p),(!m||u&6)&&L(s,"active",l[1]===l[5].code)},i(i){m||(x(a.$$.fragment,i),m=!0)},o(i){ee(a.$$.fragment,i),m=!1},d(i){i&&f(s),$e(a)}}}function Ue(o){var de,fe;let l,s,a=o[0].name+"",_,m,i,u,p,$,q,j=o[0].name+"",N,te,Q,w,z,C,G,P,D,le,H,S,se,J,O=o[0].name+"",K,ae,W,T,X,R,Y,V,Z,y,M,v=[],oe=new Map,ne,A,k=[],ie=new Map,B;w=new Ae({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${o[3]}'); + + ... + + await pb.collection('${(de=o[0])==null?void 0:de.name}').requestVerification('test@example.com'); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${o[3]}'); + + ... + + await pb.collection('${(fe=o[0])==null?void 0:fe.name}').requestVerification('test@example.com'); + `}});let E=F(o[2]);const ce=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required email
String The auth record email address to send the verification request (if exists).',Y=h(),V=r("div"),V.textContent="Responses",Z=h(),y=r("div"),M=r("div");for(let e=0;es(1,m=p.code);return o.$$set=p=>{"collection"in p&&s(0,_=p.collection)},s(3,a=Te.getApiExampleUrl(Re.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` + { + "code": 400, + "message": "Failed to authenticate.", + "data": { + "email": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `}]),[_,m,i,a,u]}class Oe extends qe{constructor(l){super(),we(this,l,je,Ue,Pe,{collection:0})}}export{Oe as default}; diff --git a/ui/dist/assets/SdkTabs-36d454aa.js b/ui/dist/assets/SdkTabs-36d454aa.js new file mode 100644 index 00000000..badf70d9 --- /dev/null +++ b/ui/dist/assets/SdkTabs-36d454aa.js @@ -0,0 +1 @@ +import{S as B,i as F,s as J,O as j,e as v,b as S,f as h,g as w,h as k,P as D,Q as O,k as Q,R as Y,n as z,t as N,a as P,o as C,w as E,r as y,u as A,x as q,N as G,c as H,m as L,d as U}from"./index-7d8498e9.js";function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function R(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,m;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=S(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),y(l,"active",e[1]===e[6].language),this.first=l},m(_,f){w(_,l,f),k(l,s),k(s,r),k(l,i),n||(m=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&q(r,g),f&6&&y(l,"active",e[1]===e[6].language)},d(_){_&&C(l),n=!1,m()}}}function I(o,e){let l,s,g,r,i,n,m=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=S(),r=v("div"),i=v("em"),n=v("a"),c=E(m),_=E(" SDK"),p=S(),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"),y(l,"active",e[1]===e[6].language),this.first=l},m(b,t){w(b,l,t),L(s,l,null),k(l,g),k(l,r),k(r,i),k(i,n),k(n,c),k(n,_),k(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)&&m!==(m=e[6].title+"")&&q(c,m),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&y(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&&C(l),U(s)}}}function V(o){let e,l,s=[],g=new Map,r,i,n=[],m=new Map,c,_,f=j(o[2]);const p=t=>t[6].language;for(let t=0;tt[6].language;for(let t=0;tl(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,m]}class Z extends B{constructor(e){super(),F(this,e,W,V,J,{class:0,js:3,dart:4})}}export{Z as S}; diff --git a/ui/dist/assets/SdkTabs-cf23198f.js b/ui/dist/assets/SdkTabs-cf23198f.js deleted file mode 100644 index 425e2ca3..00000000 --- a/ui/dist/assets/SdkTabs-cf23198f.js +++ /dev/null @@ -1 +0,0 @@ -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-cc2b3041.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;tt[6].language;for(let t=0;tl(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}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs-217d7224.js b/ui/dist/assets/UnlinkExternalAuthDocs-217d7224.js new file mode 100644 index 00000000..ccabbb8f --- /dev/null +++ b/ui/dist/assets/UnlinkExternalAuthDocs-217d7224.js @@ -0,0 +1,72 @@ +import{S as Oe,i as De,s as Me,O as j,e as i,w as g,b as f,c as Be,f as h,g as d,h as a,m as Ue,x as I,P as Ae,Q as We,k as ze,R as He,n as Le,t as oe,a as ae,o as u,d as qe,C as Re,p as je,r as N,u as Ie,N as Ne}from"./index-7d8498e9.js";import{S as Ke}from"./SdkTabs-36d454aa.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Te(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ee(n,l){let o,s=l[5].code+"",_,b,c,p;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=g(s),b=f(),h(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),a(o,_),a(o,b),c||(p=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&s!==(s=l[5].code+"")&&I(_,s),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Se(n,l){let o,s,_,b;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Be(s.$$.fragment),_=f(),h(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ue(s,o,null),a(o,_),b=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),s.$set(m),(!b||p&6)&&N(o,"active",l[1]===l[5].code)},i(c){b||(oe(s.$$.fragment,c),b=!0)},o(c){ae(s.$$.fragment,c),b=!1},d(c){c&&u(o),qe(s)}}}function Qe(n){var _e,ke,ge,ve;let l,o,s=n[0].name+"",_,b,c,p,m,$,P,M=n[0].name+"",K,se,ne,Q,F,A,G,E,J,w,W,ie,z,y,ce,V,H=n[0].name+"",X,re,Y,de,Z,ue,L,x,S,ee,B,te,U,le,C,q,v=[],pe=new Map,me,O,k=[],he=new Map,T;A=new Ke({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${n[3]}'); + + ... + + await pb.collection('${(_e=n[0])==null?void 0:_e.name}').authWithPassword('test@example.com', '123456'); + + await pb.collection('${(ke=n[0])==null?void 0:ke.name}').unlinkExternalAuth( + pb.authStore.model.id, + 'google' + ); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${n[3]}'); + + ... + + await pb.collection('${(ge=n[0])==null?void 0:ge.name}').authWithPassword('test@example.com', '123456'); + + await pb.collection('${(ve=n[0])==null?void 0:ve.name}').unlinkExternalAuth( + pb.authStore.model.id, + 'google', + ); + `}});let R=j(n[2]);const be=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",x=f(),S=i("div"),S.textContent="Path Parameters",ee=f(),B=i("table"),B.innerHTML=`Param Type Description id String ID of the auth record. provider String The name of the auth provider to unlink, eg. google, twitter, + github, etc.`,te=f(),U=i("div"),U.textContent="Responses",le=f(),C=i("div"),q=i("div");for(let e=0;eo(1,b=m.code);return n.$$set=m=>{"collection"in m&&o(0,_=m.collection)},o(3,s=Re.getApiExampleUrl(je.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:` + { + "code": 401, + "message": "The request requires valid record authorization token to be set.", + "data": {} + } + `},{code:403,body:` + { + "code": 403, + "message": "The authorized record model is not allowed to perform this action.", + "data": {} + } + `},{code:404,body:` + { + "code": 404, + "message": "The requested resource wasn't found.", + "data": {} + } + `}]),[_,b,c,s,p]}class Ve extends Oe{constructor(l){super(),De(this,l,Fe,Qe,Me,{collection:0})}}export{Ve as default}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs-26f50166.js b/ui/dist/assets/UnlinkExternalAuthDocs-26f50166.js deleted file mode 100644 index 51add4f1..00000000 --- a/ui/dist/assets/UnlinkExternalAuthDocs-26f50166.js +++ /dev/null @@ -1,80 +0,0 @@ -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-cc2b3041.js";import{S as Re}from"./SdkTabs-cf23198f.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]}'); - - ... - - await pb.collection('${(he=n[0])==null?void 0:he.name}').authWithPassword('test@example.com', '123456'); - - await pb.collection('${(_e=n[0])==null?void 0:_e.name}').unlinkExternalAuth( - pb.authStore.model.id, - 'google' - ); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${n[3]}'); - - ... - - await pb.collection('${(ke=n[0])==null?void 0:ke.name}').authWithPassword('test@example.com', '123456'); - - await pb.collection('${(ve=n[0])==null?void 0:ve.name}').unlinkExternalAuth( - pb.authStore.model.id, - 'google', - ); - `}});let j=n[2];const me=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",Z=h(),S=i("div"),S.textContent="Path Parameters",x=h(),B=i("table"),B.innerHTML=`Param - Type - Description - id - String - ID of the auth record. - provider - String - The name of the auth provider to unlink, eg. google, twitter, - github, etc.`,ee=h(),U=i("div"),U.textContent="Responses",te=h(),C=i("div"),q=i("div");for(let e=0;eo(1,b=f.code);return n.$$set=f=>{"collection"in f&&o(0,_=f.collection)},o(3,a=Le.getApiExampleUrl(je.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:` - { - "code": 401, - "message": "The request requires valid record authorization token to be set.", - "data": {} - } - `},{code:403,body:` - { - "code": 403, - "message": "The authorized record model is not allowed to perform this action.", - "data": {} - } - `},{code:404,body:` - { - "code": 404, - "message": "The requested resource wasn't found.", - "data": {} - } - `}]),[_,b,c,a,p]}class Je extends qe{constructor(l){super(),Oe(this,l,Qe,Ke,De,{collection:0})}}export{Je as default}; diff --git a/ui/dist/assets/UpdateApiDocs-a0e02816.js b/ui/dist/assets/UpdateApiDocs-a0e02816.js deleted file mode 100644 index 3c375e7b..00000000 --- a/ui/dist/assets/UpdateApiDocs-a0e02816.js +++ /dev/null @@ -1,118 +0,0 @@ -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-cc2b3041.js";import{S as Pt}from"./SdkTabs-cf23198f.js";import{F as Rt}from"./FieldsQueryParam-b174364f.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 Authorization:TOKEN 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='Auth fields',l=b(),n=r("tr"),n.innerHTML=`
Optional - username
- String - The username of the auth record.`,u=b(),_=r("tr"),_.innerHTML=`
Optional - email
- String - The auth record email address. -
- This field can be updated only by admins or auth records with "Manage" access. -
- Regular accounts can update their email by calling "Request email change".`,s=b(),p=r("tr"),p.innerHTML=`
Optional - emailVisibility
- Boolean - Whether to show/hide the auth record email when fetching the record data.`,k=b(),C=r("tr"),C.innerHTML=`
Optional - oldPassword
- String - Old auth record password. -
- This field is required only when changing the record password. Admins and auth records with - "Manage" access can skip this field.`,S=b(),T=r("tr"),T.innerHTML=`
Optional - password
- String - New auth record password.`,$=b(),F=r("tr"),F.innerHTML=`
Optional - passwordConfirm
- String - New auth record password confirmation.`,A=b(),M=r("tr"),M.innerHTML=`
Optional - verified
- Boolean - Indicates whether the auth record is verified or not. -
- This field can be set only by admins or auth records with "Manage" access.`,g=b(),B=r("tr"),B.innerHTML='Schema fields'},m(c,m){o(c,t,m),o(c,l,m),o(c,n,m),o(c,u,m),o(c,_,m),o(c,s,m),o(c,p,m),o(c,k,m),o(c,C,m),o(c,S,m),o(c,T,m),o(c,$,m),o(c,F,m),o(c,A,m),o(c,M,m),o(c,g,m),o(c,B,m)},d(c){c&&d(t),c&&d(l),c&&d(n),c&&d(u),c&&d(_),c&&d(s),c&&d(p),c&&d(k),c&&d(C),c&&d(S),c&&d(T),c&&d($),c&&d(F),c&&d(A),c&&d(M),c&&d(g),c&&d(B)}}}function Lt(f){let t;return{c(){t=r("span"),t.textContent="Optional",w(t,"class","label label-warning")},m(l,n){o(l,t,n)},d(l){l&&d(t)}}}function Ft(f){let t;return{c(){t=r("span"),t.textContent="Required",w(t,"class","label label-success")},m(l,n){o(l,t,n)},d(l){l&&d(t)}}}function Bt(f){var _;let t,l=((_=f[13].options)==null?void 0:_.maxSelect)>1?"ids":"id",n,u;return{c(){t=y("User "),n=y(l),u=y(".")},m(s,p){o(s,t,p),o(s,n,p),o(s,u,p)},p(s,p){var k;p&1&&l!==(l=((k=s[13].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&U(n,l)},d(s){s&&d(t),s&&d(n),s&&d(u)}}}function Nt(f){var _;let t,l=((_=f[13].options)==null?void 0:_.maxSelect)>1?"ids":"id",n,u;return{c(){t=y("Relation record "),n=y(l),u=y(".")},m(s,p){o(s,t,p),o(s,n,p),o(s,u,p)},p(s,p){var k;p&1&&l!==(l=((k=s[13].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&U(n,l)},d(s){s&&d(t),s&&d(n),s&&d(u)}}}function jt(f){let t,l,n,u,_;return{c(){t=y("File object."),l=r("br"),n=y(` - Set to `),u=r("code"),u.textContent="null",_=y(" to delete already uploaded file(s).")},m(s,p){o(s,t,p),o(s,l,p),o(s,n,p),o(s,u,p),o(s,_,p)},p:X,d(s){s&&d(t),s&&d(l),s&&d(n),s&&d(u),s&&d(_)}}}function At(f){let t;return{c(){t=y("URL address.")},m(l,n){o(l,t,n)},p:X,d(l){l&&d(t)}}}function gt(f){let t;return{c(){t=y("Email address.")},m(l,n){o(l,t,n)},p:X,d(l){l&&d(t)}}}function Et(f){let t;return{c(){t=y("JSON array or object.")},m(l,n){o(l,t,n)},p:X,d(l){l&&d(t)}}}function Ut(f){let t;return{c(){t=y("Number value.")},m(l,n){o(l,t,n)},p:X,d(l){l&&d(t)}}}function It(f){let t;return{c(){t=y("Plain text value.")},m(l,n){o(l,t,n)},p:X,d(l){l&&d(t)}}}function ht(f,t){let l,n,u,_,s,p=t[13].name+"",k,C,S,T,$=E.getFieldValueType(t[13])+"",F,A,M,g;function B(h,L){return h[13].required?Ft:Lt}let c=B(t),m=c(t);function K(h,L){if(h[13].type==="text")return It;if(h[13].type==="number")return Ut;if(h[13].type==="json")return Et;if(h[13].type==="email")return gt;if(h[13].type==="url")return At;if(h[13].type==="file")return jt;if(h[13].type==="relation")return Nt;if(h[13].type==="user")return Bt}let R=K(t),O=R&&R(t);return{key:f,first:null,c(){l=r("tr"),n=r("td"),u=r("div"),m.c(),_=b(),s=r("span"),k=y(p),C=b(),S=r("td"),T=r("span"),F=y($),A=b(),M=r("td"),O&&O.c(),g=b(),w(u,"class","inline-flex"),w(T,"class","label"),this.first=l},m(h,L){o(h,l,L),a(l,n),a(n,u),m.m(u,null),a(u,_),a(u,s),a(s,k),a(l,C),a(l,S),a(S,T),a(T,F),a(l,A),a(l,M),O&&O.m(M,null),a(l,g)},p(h,L){t=h,c!==(c=B(t))&&(m.d(1),m=c(t),m&&(m.c(),m.m(u,_))),L&1&&p!==(p=t[13].name+"")&&U(k,p),L&1&&$!==($=E.getFieldValueType(t[13])+"")&&U(F,$),R===(R=K(t))&&O?O.p(t,L):(O&&O.d(1),O=R&&R(t),O&&(O.c(),O.m(M,null)))},d(h){h&&d(l),m.d(),O&&O.d()}}}function vt(f,t){let l,n=t[8].code+"",u,_,s,p;function k(){return t[7](t[8])}return{key:f,first:null,c(){l=r("button"),u=y(n),_=b(),w(l,"class","tab-item"),ye(l,"active",t[1]===t[8].code),this.first=l},m(C,S){o(C,l,S),a(l,u),a(l,_),s||(p=Ht(l,"click",k),s=!0)},p(C,S){t=C,S&4&&n!==(n=t[8].code+"")&&U(u,n),S&6&&ye(l,"active",t[1]===t[8].code)},d(C){C&&d(l),s=!1,p()}}}function wt(f,t){let l,n,u,_;return n=new Tt({props:{content:t[8].body}}),{key:f,first:null,c(){l=r("div"),be(n.$$.fragment),u=b(),w(l,"class","tab-item"),ye(l,"active",t[1]===t[8].code),this.first=l},m(s,p){o(s,l,p),me(n,l,null),a(l,u),_=!0},p(s,p){t=s;const k={};p&4&&(k.content=t[8].body),n.$set(k),(!_||p&6)&&ye(l,"active",t[1]===t[8].code)},i(s){_||(de(n.$$.fragment,s),_=!0)},o(s){re(n.$$.fragment,s),_=!1},d(s){s&&d(l),_e(n)}}}function Jt(f){var ot,dt,rt;let t,l,n=f[0].name+"",u,_,s,p,k,C,S,T=f[0].name+"",$,F,A,M,g,B,c,m,K,R,O,h,L,Ae,fe,W,ge,ke,pe=f[0].name+"",he,Ee,ve,Ue,we,Z,Te,ee,Ce,te,Se,I,Oe,Ie,J,$e,N=[],Je=new Map,Me,le,qe,V,De,Ve,se,x,He,xe,Pe,Qe,q,ze,Y,Ke,We,Ye,Re,Ge,Le,Xe,Fe,Ze,et,G,Be,ne,Ne,Q,ie,j=[],tt=new Map,lt,ae,D=[],st=new Map,z;m=new Pt({props:{js:` -import PocketBase from 'pocketbase'; - -const pb = new PocketBase('${f[4]}'); - -... - -// example update data -const data = ${JSON.stringify(Object.assign({},f[3],E.dummyCollectionSchemaData(f[0])),null,4)}; - -const record = await pb.collection('${(ot=f[0])==null?void 0:ot.name}').update('RECORD_ID', data); - `,dart:` -import 'package:pocketbase/pocketbase.dart'; - -final pb = PocketBase('${f[4]}'); - -... - -// example update body -final body = ${JSON.stringify(Object.assign({},f[3],E.dummyCollectionSchemaData(f[0])),null,2)}; - -final record = await pb.collection('${(dt=f[0])==null?void 0:dt.name}').update('RECORD_ID', body: body); - `}});let H=f[5]&&yt(),P=f[6]&&kt(),ce=(rt=f[0])==null?void 0:rt.schema;const nt=e=>e[13].name;for(let e=0;ee[8].code;for(let e=0;ee[8].code;for(let e=0;eapplication/json or - multipart/form-data.`,g=b(),B=r("p"),B.innerHTML=`File upload is supported only via multipart/form-data. -
- For more info and examples you could check the detailed - Files upload and handling docs - .`,c=b(),be(m.$$.fragment),K=b(),R=r("h6"),R.textContent="API details",O=b(),h=r("div"),L=r("strong"),L.textContent="PATCH",Ae=b(),fe=r("div"),W=r("p"),ge=y("/api/collections/"),ke=r("strong"),he=y(pe),Ee=y("/records/"),ve=r("strong"),ve.textContent=":id",Ue=b(),H&&H.c(),we=b(),Z=r("div"),Z.textContent="Path parameters",Te=b(),ee=r("table"),ee.innerHTML=`Param - Type - Description - id - String - ID of the record to update.`,Ce=b(),te=r("div"),te.textContent="Body Parameters",Se=b(),I=r("table"),Oe=r("thead"),Oe.innerHTML=`Param - Type - Description`,Ie=b(),J=r("tbody"),P&&P.c(),$e=b();for(let e=0;eParam - Type - Description`,Ve=b(),se=r("tbody"),x=r("tr"),He=r("td"),He.textContent="expand",xe=b(),Pe=r("td"),Pe.innerHTML='String',Qe=b(),q=r("td"),ze=y(`Auto expand relations when returning the updated record. Ex.: - `),be(Y.$$.fragment),Ke=y(` - Supports up to 6-levels depth nested relations expansion. `),We=r("br"),Ye=y(` - The expanded relations will be appended to the record under the - `),Re=r("code"),Re.textContent="expand",Ge=y(" property (eg. "),Le=r("code"),Le.textContent='"expand": {"relField1": {...}, ...}',Xe=y(`). Only - the relations that the user has permissions to `),Fe=r("strong"),Fe.textContent="view",Ze=y(" will be expanded."),et=b(),be(G.$$.fragment),Be=b(),ne=r("div"),ne.textContent="Responses",Ne=b(),Q=r("div"),ie=r("div");for(let e=0;e${JSON.stringify(Object.assign({},e[3],E.dummyCollectionSchemaData(e[0])),null,2)}; - -final record = await pb.collection('${(pt=e[0])==null?void 0:pt.name}').update('RECORD_ID', body: body); - `),m.$set(v),(!z||i&1)&&pe!==(pe=e[0].name+"")&&U(he,pe),e[5]?H||(H=yt(),H.c(),H.m(h,null)):H&&(H.d(1),H=null),e[6]?P||(P=kt(),P.c(),P.m(J,$e)):P&&(P.d(1),P=null),i&1&&(ce=(ct=e[0])==null?void 0:ct.schema,N=je(N,i,nt,1,e,ce,Je,J,ut,ht,null,_t)),i&6&&(ue=e[2],j=je(j,i,it,1,e,ue,tt,ie,ut,vt,null,mt)),i&6&&(oe=e[2],$t(),D=je(D,i,at,1,e,oe,st,ae,Mt,wt,null,bt),qt())},i(e){if(!z){de(m.$$.fragment,e),de(Y.$$.fragment,e),de(G.$$.fragment,e);for(let i=0;il(1,p=T.code);return f.$$set=T=>{"collection"in T&&l(0,s=T.collection)},f.$$.update=()=>{var T,$;f.$$.dirty&1&&l(6,n=(s==null?void 0:s.type)==="auth"),f.$$.dirty&1&&l(5,u=(s==null?void 0:s.updateRule)===null),f.$$.dirty&1&&l(2,k=[{code:200,body:JSON.stringify(E.dummyCollectionRecord(s),null,2)},{code:400,body:` - { - "code": 400, - "message": "Failed to update record.", - "data": { - "${($=(T=s==null?void 0:s.schema)==null?void 0:T[0])==null?void 0:$.name}": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `},{code:403,body:` - { - "code": 403, - "message": "You are not allowed to perform this request.", - "data": {} - } - `},{code:404,body:` - { - "code": 404, - "message": "The requested resource wasn't found.", - "data": {} - } - `}]),f.$$.dirty&1&&(s.type==="auth"?l(3,C={username:"test_username_update",emailVisibility:!1,password:"87654321",passwordConfirm:"87654321",oldPassword:"12345678"}):l(3,C={}))},l(4,_=E.getApiExampleUrl(Dt.baseUrl)),[s,p,k,C,_,u,n,S]}class Kt extends Ct{constructor(t){super(),St(this,t,Vt,Jt,Ot,{collection:0})}}export{Kt as default}; diff --git a/ui/dist/assets/UpdateApiDocs-f59c2a12.js b/ui/dist/assets/UpdateApiDocs-f59c2a12.js new file mode 100644 index 00000000..fe7f61d6 --- /dev/null +++ b/ui/dist/assets/UpdateApiDocs-f59c2a12.js @@ -0,0 +1,88 @@ +import{S as Ct,i as St,s as Ot,C as E,O as X,N as Tt,e as r,w as _,b as f,c as me,f as g,g as d,h as s,m as _e,x as U,P as je,Q as bt,k as $t,R as Mt,n as qt,t as re,a as ce,o,d as he,p as Rt,r as ye,u as Dt,y as Z}from"./index-7d8498e9.js";import{S as Ht}from"./SdkTabs-36d454aa.js";import{F as Pt}from"./FieldsQueryParam-594c3384.js";function mt(c,e,t){const n=c.slice();return n[8]=e[t],n}function _t(c,e,t){const n=c.slice();return n[8]=e[t],n}function ht(c,e,t){const n=c.slice();return n[13]=e[t],n}function yt(c){let e;return{c(){e=r("p"),e.innerHTML="Requires admin Authorization:TOKEN header",g(e,"class","txt-hint txt-sm txt-right")},m(t,n){d(t,e,n)},d(t){t&&o(e)}}}function kt(c){let e,t,n,u,m,i,p,y,T,C,w,O,L,j,$,A,F;return{c(){e=r("tr"),e.innerHTML='Auth fields',t=f(),n=r("tr"),n.innerHTML='
Optional username
String The username of the auth record.',u=f(),m=r("tr"),m.innerHTML=`
Optional email
String The auth record email address. +
+ This field can be updated only by admins or auth records with "Manage" access. +
+ Regular accounts can update their email by calling "Request email change".`,i=f(),p=r("tr"),p.innerHTML='
Optional emailVisibility
Boolean Whether to show/hide the auth record email when fetching the record data.',y=f(),T=r("tr"),T.innerHTML=`
Optional oldPassword
String Old auth record password. +
+ This field is required only when changing the record password. Admins and auth records with + "Manage" access can skip this field.`,C=f(),w=r("tr"),w.innerHTML='
Optional password
String New auth record password.',O=f(),L=r("tr"),L.innerHTML='
Optional passwordConfirm
String New auth record password confirmation.',j=f(),$=r("tr"),$.innerHTML=`
Optional verified
Boolean Indicates whether the auth record is verified or not. +
+ This field can be set only by admins or auth records with "Manage" access.`,A=f(),F=r("tr"),F.innerHTML='Schema fields'},m(h,b){d(h,e,b),d(h,t,b),d(h,n,b),d(h,u,b),d(h,m,b),d(h,i,b),d(h,p,b),d(h,y,b),d(h,T,b),d(h,C,b),d(h,w,b),d(h,O,b),d(h,L,b),d(h,j,b),d(h,$,b),d(h,A,b),d(h,F,b)},d(h){h&&(o(e),o(t),o(n),o(u),o(m),o(i),o(p),o(y),o(T),o(C),o(w),o(O),o(L),o(j),o($),o(A),o(F))}}}function Lt(c){let e;return{c(){e=r("span"),e.textContent="Optional",g(e,"class","label label-warning")},m(t,n){d(t,e,n)},d(t){t&&o(e)}}}function Ft(c){let e;return{c(){e=r("span"),e.textContent="Required",g(e,"class","label label-success")},m(t,n){d(t,e,n)},d(t){t&&o(e)}}}function Bt(c){var m;let e,t=((m=c[13].options)==null?void 0:m.maxSelect)>1?"ids":"id",n,u;return{c(){e=_("User "),n=_(t),u=_(".")},m(i,p){d(i,e,p),d(i,n,p),d(i,u,p)},p(i,p){var y;p&1&&t!==(t=((y=i[13].options)==null?void 0:y.maxSelect)>1?"ids":"id")&&U(n,t)},d(i){i&&(o(e),o(n),o(u))}}}function Nt(c){var m;let e,t=((m=c[13].options)==null?void 0:m.maxSelect)>1?"ids":"id",n,u;return{c(){e=_("Relation record "),n=_(t),u=_(".")},m(i,p){d(i,e,p),d(i,n,p),d(i,u,p)},p(i,p){var y;p&1&&t!==(t=((y=i[13].options)==null?void 0:y.maxSelect)>1?"ids":"id")&&U(n,t)},d(i){i&&(o(e),o(n),o(u))}}}function jt(c){let e,t,n,u,m;return{c(){e=_("File object."),t=r("br"),n=_(` + Set to `),u=r("code"),u.textContent="null",m=_(" to delete already uploaded file(s).")},m(i,p){d(i,e,p),d(i,t,p),d(i,n,p),d(i,u,p),d(i,m,p)},p:Z,d(i){i&&(o(e),o(t),o(n),o(u),o(m))}}}function At(c){let e;return{c(){e=_("URL address.")},m(t,n){d(t,e,n)},p:Z,d(t){t&&o(e)}}}function Et(c){let e;return{c(){e=_("Email address.")},m(t,n){d(t,e,n)},p:Z,d(t){t&&o(e)}}}function Ut(c){let e;return{c(){e=_("JSON array or object.")},m(t,n){d(t,e,n)},p:Z,d(t){t&&o(e)}}}function It(c){let e;return{c(){e=_("Number value.")},m(t,n){d(t,e,n)},p:Z,d(t){t&&o(e)}}}function Jt(c){let e;return{c(){e=_("Plain text value.")},m(t,n){d(t,e,n)},p:Z,d(t){t&&o(e)}}}function vt(c,e){let t,n,u,m,i,p=e[13].name+"",y,T,C,w,O=E.getFieldValueType(e[13])+"",L,j,$,A;function F(k,P){return k[13].required?Ft:Lt}let h=F(e),b=h(e);function K(k,P){if(k[13].type==="text")return Jt;if(k[13].type==="number")return It;if(k[13].type==="json")return Ut;if(k[13].type==="email")return Et;if(k[13].type==="url")return At;if(k[13].type==="file")return jt;if(k[13].type==="relation")return Nt;if(k[13].type==="user")return Bt}let H=K(e),S=H&&H(e);return{key:c,first:null,c(){t=r("tr"),n=r("td"),u=r("div"),b.c(),m=f(),i=r("span"),y=_(p),T=f(),C=r("td"),w=r("span"),L=_(O),j=f(),$=r("td"),S&&S.c(),A=f(),g(u,"class","inline-flex"),g(w,"class","label"),this.first=t},m(k,P){d(k,t,P),s(t,n),s(n,u),b.m(u,null),s(u,m),s(u,i),s(i,y),s(t,T),s(t,C),s(C,w),s(w,L),s(t,j),s(t,$),S&&S.m($,null),s(t,A)},p(k,P){e=k,h!==(h=F(e))&&(b.d(1),b=h(e),b&&(b.c(),b.m(u,m))),P&1&&p!==(p=e[13].name+"")&&U(y,p),P&1&&O!==(O=E.getFieldValueType(e[13])+"")&&U(L,O),H===(H=K(e))&&S?S.p(e,P):(S&&S.d(1),S=H&&H(e),S&&(S.c(),S.m($,null)))},d(k){k&&o(t),b.d(),S&&S.d()}}}function gt(c,e){let t,n=e[8].code+"",u,m,i,p;function y(){return e[7](e[8])}return{key:c,first:null,c(){t=r("button"),u=_(n),m=f(),g(t,"class","tab-item"),ye(t,"active",e[1]===e[8].code),this.first=t},m(T,C){d(T,t,C),s(t,u),s(t,m),i||(p=Dt(t,"click",y),i=!0)},p(T,C){e=T,C&4&&n!==(n=e[8].code+"")&&U(u,n),C&6&&ye(t,"active",e[1]===e[8].code)},d(T){T&&o(t),i=!1,p()}}}function wt(c,e){let t,n,u,m;return n=new Tt({props:{content:e[8].body}}),{key:c,first:null,c(){t=r("div"),me(n.$$.fragment),u=f(),g(t,"class","tab-item"),ye(t,"active",e[1]===e[8].code),this.first=t},m(i,p){d(i,t,p),_e(n,t,null),s(t,u),m=!0},p(i,p){e=i;const y={};p&4&&(y.content=e[8].body),n.$set(y),(!m||p&6)&&ye(t,"active",e[1]===e[8].code)},i(i){m||(re(n.$$.fragment,i),m=!0)},o(i){ce(n.$$.fragment,i),m=!1},d(i){i&&o(t),he(n)}}}function Vt(c){var ot,rt,ct;let e,t,n=c[0].name+"",u,m,i,p,y,T,C,w=c[0].name+"",O,L,j,$,A,F,h,b,K,H,S,k,P,Ae,pe,W,Ee,ke,ue=c[0].name+"",ve,Ue,ge,Ie,we,ee,Te,te,Ce,le,Se,I,Oe,Je,J,$e,B=[],Ve=new Map,Me,ne,qe,V,Re,xe,ae,x,De,Qe,He,ze,M,Ke,Y,We,Ye,Ge,Pe,Xe,Le,Ze,Fe,et,tt,G,Be,se,Ne,Q,ie,N=[],lt=new Map,nt,de,q=[],at=new Map,z;b=new Ht({props:{js:` +import PocketBase from 'pocketbase'; + +const pb = new PocketBase('${c[4]}'); + +... + +// example update data +const data = ${JSON.stringify(Object.assign({},c[3],E.dummyCollectionSchemaData(c[0])),null,4)}; + +const record = await pb.collection('${(ot=c[0])==null?void 0:ot.name}').update('RECORD_ID', data); + `,dart:` +import 'package:pocketbase/pocketbase.dart'; + +final pb = PocketBase('${c[4]}'); + +... + +// example update body +final body = ${JSON.stringify(Object.assign({},c[3],E.dummyCollectionSchemaData(c[0])),null,2)}; + +final record = await pb.collection('${(rt=c[0])==null?void 0:rt.name}').update('RECORD_ID', body: body); + `}});let R=c[5]&&yt(),D=c[6]&&kt(),fe=X((ct=c[0])==null?void 0:ct.schema);const st=l=>l[13].name;for(let l=0;ll[8].code;for(let l=0;ll[8].code;for(let l=0;lapplication/json or + multipart/form-data.`,A=f(),F=r("p"),F.innerHTML=`File upload is supported only via multipart/form-data. +
+ For more info and examples you could check the detailed + Files upload and handling docs + .`,h=f(),me(b.$$.fragment),K=f(),H=r("h6"),H.textContent="API details",S=f(),k=r("div"),P=r("strong"),P.textContent="PATCH",Ae=f(),pe=r("div"),W=r("p"),Ee=_("/api/collections/"),ke=r("strong"),ve=_(ue),Ue=_("/records/"),ge=r("strong"),ge.textContent=":id",Ie=f(),R&&R.c(),we=f(),ee=r("div"),ee.textContent="Path parameters",Te=f(),te=r("table"),te.innerHTML='Param Type Description id String ID of the record to update.',Ce=f(),le=r("div"),le.textContent="Body Parameters",Se=f(),I=r("table"),Oe=r("thead"),Oe.innerHTML='Param Type Description',Je=f(),J=r("tbody"),D&&D.c(),$e=f();for(let l=0;lParam Type Description',xe=f(),ae=r("tbody"),x=r("tr"),De=r("td"),De.textContent="expand",Qe=f(),He=r("td"),He.innerHTML='String',ze=f(),M=r("td"),Ke=_(`Auto expand relations when returning the updated record. Ex.: + `),me(Y.$$.fragment),We=_(` + Supports up to 6-levels depth nested relations expansion. `),Ye=r("br"),Ge=_(` + The expanded relations will be appended to the record under the + `),Pe=r("code"),Pe.textContent="expand",Xe=_(" property (eg. "),Le=r("code"),Le.textContent='"expand": {"relField1": {...}, ...}',Ze=_(`). Only + the relations that the user has permissions to `),Fe=r("strong"),Fe.textContent="view",et=_(" will be expanded."),tt=f(),me(G.$$.fragment),Be=f(),se=r("div"),se.textContent="Responses",Ne=f(),Q=r("div"),ie=r("div");for(let l=0;l${JSON.stringify(Object.assign({},l[3],E.dummyCollectionSchemaData(l[0])),null,2)}; + +final record = await pb.collection('${(ut=l[0])==null?void 0:ut.name}').update('RECORD_ID', body: body); + `),b.$set(v),(!z||a&1)&&ue!==(ue=l[0].name+"")&&U(ve,ue),l[5]?R||(R=yt(),R.c(),R.m(k,null)):R&&(R.d(1),R=null),l[6]?D||(D=kt(),D.c(),D.m(J,$e)):D&&(D.d(1),D=null),a&1&&(fe=X((ft=l[0])==null?void 0:ft.schema),B=je(B,a,st,1,l,fe,Ve,J,bt,vt,null,ht)),a&6&&(be=X(l[2]),N=je(N,a,it,1,l,be,lt,ie,bt,gt,null,_t)),a&6&&(oe=X(l[2]),$t(),q=je(q,a,dt,1,l,oe,at,de,Mt,wt,null,mt),qt())},i(l){if(!z){re(b.$$.fragment,l),re(Y.$$.fragment,l),re(G.$$.fragment,l);for(let a=0;at(1,p=w.code);return c.$$set=w=>{"collection"in w&&t(0,i=w.collection)},c.$$.update=()=>{var w,O;c.$$.dirty&1&&t(6,n=(i==null?void 0:i.type)==="auth"),c.$$.dirty&1&&t(5,u=(i==null?void 0:i.updateRule)===null),c.$$.dirty&1&&t(2,y=[{code:200,body:JSON.stringify(E.dummyCollectionRecord(i),null,2)},{code:400,body:` + { + "code": 400, + "message": "Failed to update record.", + "data": { + "${(O=(w=i==null?void 0:i.schema)==null?void 0:w[0])==null?void 0:O.name}": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `},{code:403,body:` + { + "code": 403, + "message": "You are not allowed to perform this request.", + "data": {} + } + `},{code:404,body:` + { + "code": 404, + "message": "The requested resource wasn't found.", + "data": {} + } + `}]),c.$$.dirty&1&&(i.type==="auth"?t(3,T={username:"test_username_update",emailVisibility:!1,password:"87654321",passwordConfirm:"87654321",oldPassword:"12345678"}):t(3,T={}))},t(4,m=E.getApiExampleUrl(Rt.baseUrl)),[i,p,y,T,m,u,n,C]}class Wt extends Ct{constructor(e){super(),St(this,e,xt,Vt,Ot,{collection:0})}}export{Wt as default}; diff --git a/ui/dist/assets/ViewApiDocs-82bf399d.js b/ui/dist/assets/ViewApiDocs-82bf399d.js deleted file mode 100644 index eb5cc633..00000000 --- a/ui/dist/assets/ViewApiDocs-82bf399d.js +++ /dev/null @@ -1,66 +0,0 @@ -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-cc2b3041.js";import{S as ct}from"./SdkTabs-cf23198f.js";import{F as ft}from"./FieldsQueryParam-b174364f.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 Authorization:TOKEN 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]}'); - - ... - - const record = await pb.collection('${(Ue=i[0])==null?void 0:Ue.name}').getOne('RECORD_ID', { - expand: 'relField1,relField2.subRelField', - }); - `,dart:` - import 'package:pocketbase/pocketbase.dart'; - - final pb = PocketBase('${i[3]}'); - - ... - - final record = await pb.collection('${(je=i[0])==null?void 0:je.name}').getOne('RECORD_ID', - expand: 'relField1,relField2.subRelField', - ); - `}});let $=i[1]&&Xe();S=new et({props:{content:"?expand=relField1,relField2.subRelField"}}),B=new ft({});let K=i[4];const Ne=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam - Type - Description - id - String - ID of the record to view.`,de=u(),M=o("div"),M.textContent="Query parameters",ce=u(),O=o("table"),fe=o("thead"),fe.innerHTML=`Param - Type - Description`,ge=u(),q=o("tbody"),P=o("tr"),pe=o("td"),pe.textContent="expand",Re=u(),ue=o("td"),ue.innerHTML='String',Oe=u(),k=o("td"),Pe=b(`Auto expand record relations. Ex.: - `),W(S.$$.fragment),De=b(` - Supports up to 6-levels depth nested relations expansion. `),Te=o("br"),Ee=b(` - The expanded relations will be appended to the record under the - `),me=o("code"),me.textContent="expand",Se=b(" property (eg. "),be=o("code"),be.textContent='"expand": {"relField1": {...}, ...}',Be=b(`). - `),xe=o("br"),Ae=b(` - Only the relations to which the request user has permissions to `),_e=o("strong"),_e.textContent="view",Ie=b(" will be expanded."),Me=u(),W(B.$$.fragment),ke=u(),H=o("div"),H.textContent="Responses",he=u(),D=o("div"),L=o("div");for(let e=0;en(2,f=h.code);return i.$$set=h=>{"collection"in h&&n(0,c=h.collection)},i.$$.update=()=>{i.$$.dirty&1&&n(1,a=(c==null?void 0:c.viewRule)===null),i.$$.dirty&3&&c!=null&&c.id&&(m.push({code:200,body:JSON.stringify(Je.dummyCollectionRecord(c),null,2)}),a&&m.push({code:403,body:` - { - "code": 403, - "message": "Only admins can access this action.", - "data": {} - } - `}),m.push({code:404,body:` - { - "code": 404, - "message": "The requested resource wasn't found.", - "data": {} - } - `}))},n(3,w=Je.getApiExampleUrl(rt.baseUrl)),[c,a,f,w,m,F]}class kt extends tt{constructor(s){super(),lt(this,s,ut,pt,st,{collection:0})}}export{kt as default}; diff --git a/ui/dist/assets/ViewApiDocs-c1c520bc.js b/ui/dist/assets/ViewApiDocs-c1c520bc.js new file mode 100644 index 00000000..5caff287 --- /dev/null +++ b/ui/dist/assets/ViewApiDocs-c1c520bc.js @@ -0,0 +1,59 @@ +import{S as lt,i as nt,s as st,N as tt,O as K,e as a,w as _,b as m,c as W,f as b,g as r,h as l,m as X,x as ve,P as Je,Q as at,k as ot,R as it,n as rt,t as Q,a as U,o as d,d as Y,C as Ke,p as dt,r as Z,u as ct}from"./index-7d8498e9.js";import{S as pt}from"./SdkTabs-36d454aa.js";import{F as ut}from"./FieldsQueryParam-594c3384.js";function We(o,n,s){const i=o.slice();return i[6]=n[s],i}function Xe(o,n,s){const i=o.slice();return i[6]=n[s],i}function Ye(o){let n;return{c(){n=a("p"),n.innerHTML="Requires admin Authorization:TOKEN header",b(n,"class","txt-hint txt-sm txt-right")},m(s,i){r(s,n,i)},d(s){s&&d(n)}}}function Ze(o,n){let s,i,v;function p(){return n[5](n[6])}return{key:o,first:null,c(){s=a("button"),s.textContent=`${n[6].code} `,b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),i||(v=ct(s,"click",p),i=!0)},p(c,f){n=c,f&20&&Z(s,"active",n[2]===n[6].code)},d(c){c&&d(s),i=!1,v()}}}function et(o,n){let s,i,v,p;return i=new tt({props:{content:n[6].body}}),{key:o,first:null,c(){s=a("div"),W(i.$$.fragment),v=m(),b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),X(i,s,null),l(s,v),p=!0},p(c,f){n=c,(!p||f&20)&&Z(s,"active",n[2]===n[6].code)},i(c){p||(Q(i.$$.fragment,c),p=!0)},o(c){U(i.$$.fragment,c),p=!1},d(c){c&&d(s),Y(i)}}}function ft(o){var je,Ve;let n,s,i=o[0].name+"",v,p,c,f,w,C,ee,j=o[0].name+"",te,$e,le,F,ne,x,se,$,V,ye,z,T,we,ae,G=o[0].name+"",oe,Ce,ie,Fe,re,B,de,A,ce,I,pe,R,ue,Re,M,O,fe,Oe,me,Pe,h,De,E,Te,Ee,Se,be,xe,_e,Be,Ae,Ie,he,Me,qe,S,ke,q,ge,P,H,y=[],He=new Map,Le,L,k=[],Ne=new Map,D;F=new pt({props:{js:` + import PocketBase from 'pocketbase'; + + const pb = new PocketBase('${o[3]}'); + + ... + + const record = await pb.collection('${(je=o[0])==null?void 0:je.name}').getOne('RECORD_ID', { + expand: 'relField1,relField2.subRelField', + }); + `,dart:` + import 'package:pocketbase/pocketbase.dart'; + + final pb = PocketBase('${o[3]}'); + + ... + + final record = await pb.collection('${(Ve=o[0])==null?void 0:Ve.name}').getOne('RECORD_ID', + expand: 'relField1,relField2.subRelField', + ); + `}});let g=o[1]&&Ye();E=new tt({props:{content:"?expand=relField1,relField2.subRelField"}}),S=new ut({});let J=K(o[4]);const Qe=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam Type Description id String ID of the record to view.',ce=m(),I=a("div"),I.textContent="Query parameters",pe=m(),R=a("table"),ue=a("thead"),ue.innerHTML='Param Type Description',Re=m(),M=a("tbody"),O=a("tr"),fe=a("td"),fe.textContent="expand",Oe=m(),me=a("td"),me.innerHTML='String',Pe=m(),h=a("td"),De=_(`Auto expand record relations. Ex.: + `),W(E.$$.fragment),Te=_(` + Supports up to 6-levels depth nested relations expansion. `),Ee=a("br"),Se=_(` + The expanded relations will be appended to the record under the + `),be=a("code"),be.textContent="expand",xe=_(" property (eg. "),_e=a("code"),_e.textContent='"expand": {"relField1": {...}, ...}',Be=_(`). + `),Ae=a("br"),Ie=_(` + Only the relations to which the request user has permissions to `),he=a("strong"),he.textContent="view",Me=_(" will be expanded."),qe=m(),W(S.$$.fragment),ke=m(),q=a("div"),q.textContent="Responses",ge=m(),P=a("div"),H=a("div");for(let e=0;es(2,c=C.code);return o.$$set=C=>{"collection"in C&&s(0,p=C.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(1,i=(p==null?void 0:p.viewRule)===null),o.$$.dirty&3&&p!=null&&p.id&&(f.push({code:200,body:JSON.stringify(Ke.dummyCollectionRecord(p),null,2)}),i&&f.push({code:403,body:` + { + "code": 403, + "message": "Only admins can access this action.", + "data": {} + } + `}),f.push({code:404,body:` + { + "code": 404, + "message": "The requested resource wasn't found.", + "data": {} + } + `}))},s(3,v=Ke.getApiExampleUrl(dt.baseUrl)),[p,i,c,v,f,w]}class kt extends lt{constructor(n){super(),nt(this,n,mt,ft,st,{collection:0})}}export{kt as default}; diff --git a/ui/dist/assets/index-7d8498e9.js b/ui/dist/assets/index-7d8498e9.js new file mode 100644 index 00000000..02a138ae --- /dev/null +++ b/ui/dist/assets/index-7d8498e9.js @@ -0,0 +1,152 @@ +var R1=Object.defineProperty;var q1=(n,e,t)=>e in n?R1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var tr=(n,e,t)=>(q1(n,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function x(){}const kl=n=>n;function je(n,e){for(const t in e)n[t]=e[t];return n}function j1(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function Gg(n){return n()}function au(){return Object.create(null)}function Ce(n){n.forEach(Gg)}function It(n){return typeof n=="function"}function he(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Pl;function _n(n,e){return n===e?!0:(Pl||(Pl=document.createElement("a")),Pl.href=e,n===Pl.href)}function H1(n){return Object.keys(n).length===0}function pa(n,...e){if(n==null){for(const i of e)i(void 0);return x}const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function V1(n){let e;return pa(n,t=>e=t)(),e}function Ye(n,e,t){n.$$.on_destroy.push(pa(e,t))}function Ct(n,e,t,i){if(n){const s=Xg(n,e,t,i);return n[0](s)}}function Xg(n,e,t,i){return n[1]&&i?je(t.ctx.slice(),n[1](i(e))):t.ctx}function Mt(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;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),ha=Qg?n=>requestAnimationFrame(n):x;const vs=new Set;function xg(n){vs.forEach(e=>{e.c(n)||(vs.delete(e),e.f())}),vs.size!==0&&ha(xg)}function No(n){let e;return vs.size===0&&ha(xg),{promise:new Promise(t=>{vs.add(e={c:n,f:t})}),abort(){vs.delete(e)}}}function b(n,e){n.appendChild(e)}function e_(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function z1(n){const e=v("style");return e.textContent="/* empty */",B1(e_(n),e),e.sheet}function B1(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;tn.removeEventListener(e,t,i)}function Qe(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Fn(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 U1=["width","height"];function ci(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&&U1.indexOf(i)===-1?n[i]=e[i]:p(n,i,e[i])}function W1(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 ht(n){return n===""?null:+n}function Y1(n){return Array.from(n.childNodes)}function se(n,e){e=""+e,n.data!==e&&(n.data=e)}function oe(n,e){n.value=e??""}function qr(n,e,t,i){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Q(n,e,t){n.classList.toggle(e,!!t)}function t_(n,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:i})}function Dt(n,e){return new n(e)}const po=new Map;let ho=0;function K1(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:z1(e),rules:{}};return po.set(n,t),t}function fl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ +`;for(let _=0;_<=1;_+=a){const y=e+(t-e)*l(_);u+=_*100+`%{${o(y,1-y)}} +`}const f=u+`100% {${o(t,1-t)}} +}`,c=`__svelte_${K1(f)}_${r}`,d=e_(n),{stylesheet:h,rules:g}=po.get(d)||J1(d,n);g[c]||(g[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const m=n.style.animation||"";return n.style.animation=`${m?`${m}, `:""}${c} ${i}ms linear ${s}ms 1 both`,ho+=1,c}function cl(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),ho-=s,ho||Z1())}function Z1(){ha(()=>{ho||(po.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&k(e)}),po.clear())})}function G1(n,e,t,i){if(!e)return x;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return x;const{delay:l=0,duration:o=300,easing:r=kl,start:a=Fo()+l,end:u=a+o,tick:f=x,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,g;function m(){c&&(g=fl(n,0,1,o,l,r,c)),l||(h=!0)}function _(){c&&cl(n,g),d=!1}return No(y=>{if(!h&&y>=a&&(h=!0),h&&y>=u&&(f(1,0),_()),!d)return!1;if(h){const S=y-a,T=0+1*r(S/o);f(T,1-T)}return!0}),m(),f(0,1),_}function X1(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,n_(n,s)}}function n_(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 dl;function yi(n){dl=n}function wl(){if(!dl)throw new Error("Function called outside component initialization");return dl}function Zt(n){wl().$$.on_mount.push(n)}function Q1(n){wl().$$.after_update.push(n)}function Is(n){wl().$$.on_destroy.push(n)}function wt(){const n=wl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=t_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Ne(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const bs=[],ne=[];let ys=[];const jr=[],i_=Promise.resolve();let Hr=!1;function s_(){Hr||(Hr=!0,i_.then(ma))}function ln(){return s_(),i_}function Xe(n){ys.push(n)}function _e(n){jr.push(n)}const nr=new Set;let ds=0;function ma(){if(ds!==0)return;const n=dl;do{try{for(;dsn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),ys=e}let Hs;function ga(){return Hs||(Hs=Promise.resolve(),Hs.then(()=>{Hs=null})),Hs}function ts(n,e,t){n.dispatchEvent(t_(`${e?"intro":"outro"}${t}`))}const io=new Set;let ai;function re(){ai={r:0,c:[],p:ai}}function ae(){ai.r||Ce(ai.c),ai=ai.p}function A(n,e){n&&n.i&&(io.delete(n),n.i(e))}function L(n,e,t,i){if(n&&n.o){if(io.has(n))return;io.add(n),ai.c.push(()=>{io.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const _a={duration:0};function l_(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&cl(n,o)}function f(){const{delay:d=0,duration:h=300,easing:g=kl,tick:m=x,css:_}=s||_a;_&&(o=fl(n,0,1,h,d,g,_,a++)),m(0,1);const y=Fo()+d,S=y+h;r&&r.abort(),l=!0,Xe(()=>ts(n,!0,"start")),r=No(T=>{if(l){if(T>=S)return m(1,0),ts(n,!0,"end"),u(),l=!1;if(T>=y){const $=g((T-y)/h);m($,1-$)}}return l})}let c=!1;return{start(){c||(c=!0,cl(n),It(s)?(s=s(i),ga().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function ba(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=ai;r.r+=1;let a;function u(){const{delay:f=0,duration:c=300,easing:d=kl,tick:h=x,css:g}=s||_a;g&&(o=fl(n,1,0,c,f,d,g));const m=Fo()+f,_=m+c;Xe(()=>ts(n,!1,"start")),"inert"in n&&(a=n.inert,n.inert=!0),No(y=>{if(l){if(y>=_)return h(0,1),ts(n,!1,"end"),--r.r||Ce(r.c),!1;if(y>=m){const S=d((y-m)/c);h(1-S,S)}}return l})}return It(s)?ga().then(()=>{s=s(i),u()}):u(),{end(f){f&&"inert"in n&&(n.inert=a),f&&s.tick&&s.tick(1,0),l&&(o&&cl(n,o),l=!1)}}}function qe(n,e,t,i){let l=e(n,t,{direction:"both"}),o=i?0:1,r=null,a=null,u=null,f;function c(){u&&cl(n,u)}function d(g,m){const _=g.b-o;return m*=Math.abs(_),{a:o,b:g.b,d:_,duration:m,start:g.start,end:g.start+m,group:g.group}}function h(g){const{delay:m=0,duration:_=300,easing:y=kl,tick:S=x,css:T}=l||_a,$={start:Fo()+m,b:g};g||($.group=ai,ai.r+=1),"inert"in n&&(g?f!==void 0&&(n.inert=f):(f=n.inert,n.inert=!0)),r||a?a=$:(T&&(c(),u=fl(n,o,g,_,m,y,T)),g&&S(0,1),r=d($,_),Xe(()=>ts(n,g,"start")),No(C=>{if(a&&C>a.start&&(r=d(a,_),a=null,ts(n,r.b,"start"),T&&(c(),u=fl(n,o,r.b,r.duration,0,y,l.css))),r){if(C>=r.end)S(o=r.b,1-o),ts(n,r.b,"end"),a||(r.b?c():--r.group.r||Ce(r.group.c)),r=null;else if(C>=r.start){const M=C-r.start;o=r.a+r.d*y(M/r.duration),S(o,1-o)}}return!!(r||a)}))}return{run(g){It(l)?ga().then(()=>{l=l({direction:g?"in":"out"}),h(g)}):h(g)},end(){c(),r=a=null}}}function fu(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(re(),L(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),ae())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ma()}if(j1(n)){const s=wl();if(n.then(l=>{yi(s),i(e.then,1,e.value,l),yi(null)},l=>{if(yi(s),i(e.catch,2,e.error,l),yi(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function t0(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function pe(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function rs(n,e){n.d(1),e.delete(n.key)}function Ut(n,e){L(n,1,1,()=>{e.delete(n.key)})}function n0(n,e){n.f(),Ut(n,e)}function yt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,h=l.length,g=d;const m={};for(;g--;)m[n[g].key]=g;const _=[],y=new Map,S=new Map,T=[];for(g=h;g--;){const E=c(s,l,g),D=t(E);let I=o.get(D);I?i&&T.push(()=>I.p(E,e)):(I=u(D,E),I.c()),y.set(D,_[g]=I),D in m&&S.set(D,Math.abs(g-m[D]))}const $=new Set,C=new Set;function M(E){A(E,1),E.m(r,f),o.set(E.key,E),f=E.first,h--}for(;d&&h;){const E=_[h-1],D=n[d-1],I=E.key,P=D.key;E===D?(f=E.first,d--,h--):y.has(P)?!o.has(I)||$.has(I)?M(E):C.has(P)?d--:S.get(I)>S.get(P)?(C.add(I),M(E)):($.add(P),d--):(a(D,o),d--)}for(;d--;){const E=n[d];y.has(E.key)||a(E,o)}for(;h;)M(_[h-1]);return Ce(T),_}function kt(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Pt(n){return typeof n=="object"&&n!==null?n:{}}function de(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function V(n){n&&n.c()}function j(n,e,t){const{fragment:i,after_update:s}=n.$$;i&&i.m(e,t),Xe(()=>{const l=n.$$.on_mount.map(Gg).filter(It);n.$$.on_destroy?n.$$.on_destroy.push(...l):Ce(l),n.$$.on_mount=[]}),s.forEach(Xe)}function H(n,e){const t=n.$$;t.fragment!==null&&(e0(t.after_update),Ce(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function i0(n,e){n.$$.dirty[0]===-1&&(bs.push(n),s_(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const g=h.length?h[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=g)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](g),f&&i0(n,c)),d}):[],u.update(),f=!0,Ce(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=Y1(e.target);u.fragment&&u.fragment.l(c),c.forEach(k)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),j(n,e.target,e.anchor),ma()}yi(a)}class ve{constructor(){tr(this,"$$");tr(this,"$$set")}$destroy(){H(this,1),this.$destroy=x}$on(e,t){if(!It(t))return x;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!H1(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const s0="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(s0);function Nt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&t&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function r_(n,e,t){const i=!Array.isArray(n),s=i?[n]:n;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=e.length<2;return o_(t,(o,r)=>{let a=!1;const u=[];let f=0,c=x;const d=()=>{if(f)return;c();const g=e(i?u[0]:u,o,r);l?o(g):c=It(g)?g:x},h=s.map((g,m)=>pa(g,_=>{u[m]=_,f&=~(1<{f|=1<{H(u,1)}),ae()}l?(e=Dt(l,o(r,a)),e.$on("routeEvent",r[7]),V(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else if(l){const u=a&4?kt(s,[Pt(r[2])]):{};e.$set(u)}},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&H(e,r)}}}function o0(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r,a){let u={};if(a!==void 0&&a&6)u=kt(s,[a&2&&{params:r[1]},a&4&&Pt(r[2])]);else for(let f=0;f{H(u,1)}),ae()}l?(e=Dt(l,o(r,a)),e.$on("routeEvent",r[6]),V(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else if(l){const u=a&6?kt(s,[a&2&&{params:r[1]},a&4&&Pt(r[2])]):{};e.$set(u)}},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&H(e,r)}}}function r0(n){let e,t,i,s;const l=[o0,l0],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ke()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),L(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){L(t),s=!1},d(a){a&&k(i),o[e].d(a)}}}function cu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Ro=o_(null,function(e){e(cu());const t=()=>{e(cu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});r_(Ro,n=>n.location);const va=r_(Ro,n=>n.querystring),du=Nn(void 0);async function Hi(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await ln();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function un(n,e){if(e=hu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return pu(n,e),{update(t){t=hu(t),pu(n,t)}}}function a0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function pu(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||u0(i.currentTarget.getAttribute("href"))})}function hu(n){return n&&typeof n=="string"?{href:n}:n||{}}function u0(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function f0(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(C,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!C||typeof C=="string"&&(C.length<1||C.charAt(0)!="/"&&C.charAt(0)!="*")||typeof C=="object"&&!(C instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:E,keys:D}=a_(C);this.path=C,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=E,this._keys=D}match(C){if(s){if(typeof s=="string")if(C.startsWith(s))C=C.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const I=C.match(s);if(I&&I[0])C=C.substr(I[0].length)||"/";else return null}}const M=this._pattern.exec(C);if(M===null)return null;if(this._keys===!1)return M;const E={};let D=0;for(;D{r.push(new o(C,$))}):Object.keys(i).forEach($=>{r.push(new o($,i[$]))});let a=null,u=null,f={};const c=wt();async function d($,C){await ln(),c($,C)}let h=null,g=null;l&&(g=$=>{$.state&&($.state.__svelte_spa_router_scrollY||$.state.__svelte_spa_router_scrollX)?h=$.state:h=null},window.addEventListener("popstate",g),Q1(()=>{a0(h)}));let m=null,_=null;const y=Ro.subscribe(async $=>{m=$;let C=0;for(;C{du.set(u)});return}t(0,a=null),_=null,du.set(void 0)});Is(()=>{y(),g&&window.removeEventListener("popstate",g)});function S($){Ne.call(this,n,$)}function T($){Ne.call(this,n,$)}return n.$$set=$=>{"routes"in $&&t(3,i=$.routes),"prefix"in $&&t(4,s=$.prefix),"restoreScrollState"in $&&t(5,l=$.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,S,T]}class c0 extends ve{constructor(e){super(),be(this,e,f0,r0,he,{routes:3,prefix:4,restoreScrollState:5})}}const so=[];let u_;function f_(n){const e=n.pattern.test(u_);mu(n,n.className,e),mu(n,n.inactiveClassName,!e)}function mu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Ro.subscribe(n=>{u_=n.location+(n.querystring?"?"+n.querystring:""),so.map(f_)});function zn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?a_(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return so.push(i),f_(i),{destroy(){so.splice(so.indexOf(i),1)}}}const d0="modulepreload",p0=function(n,e){return new URL(n,e).href},gu={},ot=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=p0(l,i),l in gu)return;gu[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":d0,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e()).catch(l=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l})};function en(n,e,t,i){return new(t||(t=Promise))(function(s,l){function o(u){try{a(i.next(u))}catch(f){l(f)}}function r(u){try{a(i.throw(u))}catch(f){l(f)}}function a(u){u.done?s(u.value):function(c){return c instanceof t?c:new t(function(d){d(c)})}(u.value).then(o,r)}a((i=i.apply(n,e||[])).next())})}class Kn extends Error{constructor(e){var t,i,s,l;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Kn.prototype),e!==null&&typeof e=="object"&&(this.url=typeof e.url=="string"?e.url:"",this.status=typeof e.status=="number"?e.status:0,this.isAbort=!!e.isAbort,this.originalError=e.originalError,e.response!==null&&typeof e.response=="object"?this.response=e.response:e.data!==null&&typeof e.data=="object"?this.response=e.data:this.response={}),this.originalError||e instanceof Kn||(this.originalError=e),typeof DOMException<"u"&&e instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(t=this.response)===null||t===void 0?void 0:t.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":!((l=(s=(i=this.originalError)===null||i===void 0?void 0:i.cause)===null||s===void 0?void 0:s.message)===null||l===void 0)&&l.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return Object.assign({},this)}}const Fl=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function h0(n,e){const t={};if(typeof n!="string")return t;const i=Object.assign({},e||{}).decode||m0;let s=0;for(;s0&&(!t.exp||t.exp-e>Date.now()/1e3))}c_=typeof atob=="function"?atob:n=>{let e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};const bu="pb_auth";class _0{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!d_(this.token)}get isAdmin(){return lo(this.token).type==="admin"}get isAuthRecord(){return lo(this.token).type==="authRecord"}save(e,t){this.baseToken=e||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(e,t=bu){const i=h0(e||"")[t]||"";let s={};try{s=JSON.parse(i),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(e,t=bu){var i,s;const l={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},o=lo(this.token);o!=null&&o.exp?l.expires=new Date(1e3*o.exp):l.expires=new Date("1970-01-01"),e=Object.assign({},l,e);const r={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let a=_u(t,JSON.stringify(r),e);const u=typeof Blob<"u"?new Blob([a]).size:a.length;if(r.model&&u>4096){r.model={id:(i=r==null?void 0:r.model)===null||i===void 0?void 0:i.id,email:(s=r==null?void 0:r.model)===null||s===void 0?void 0:s.email};const f=["collectionId","username","verified"];for(const c in this.model)f.includes(c)&&(r.model[c]=this.model[c]);a=_u(t,JSON.stringify(r),e)}return a}onChange(e,t=!1){return this._onChangeCallbacks.push(e),t&&e(this.token,this.model),()=>{for(let i=this._onChangeCallbacks.length-1;i>=0;i--)if(this._onChangeCallbacks[i]==e)return delete this._onChangeCallbacks[i],void this._onChangeCallbacks.splice(i,1)}}triggerChange(){for(const e of this._onChangeCallbacks)e&&e(this.token,this.model)}}class p_ extends _0{constructor(e="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=e,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(e,t){this._storageSet(this.storageKey,{token:e,model:t}),super.save(e,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(e){if(typeof window<"u"&&(window!=null&&window.localStorage)){const t=window.localStorage.getItem(e)||"";try{return JSON.parse(t)}catch{return t}}return this.storageFallback[e]}_storageSet(e,t){if(typeof window<"u"&&(window!=null&&window.localStorage)){let i=t;typeof t!="string"&&(i=JSON.stringify(t)),window.localStorage.setItem(e,i)}else this.storageFallback[e]=t}_storageRemove(e){var t;typeof window<"u"&&(window!=null&&window.localStorage)&&((t=window.localStorage)===null||t===void 0||t.removeItem(e)),delete this.storageFallback[e]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",e=>{if(e.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.model||null)})}}class as{constructor(e){this.client=e}}class b0 extends as{getAll(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/settings",e)}update(e,t){return t=Object.assign({method:"PATCH",body:e},t),this.client.send("/api/settings",t)}testS3(e="storage",t){return t=Object.assign({method:"POST",body:{filesystem:e}},t),this.client.send("/api/settings/test/s3",t).then(()=>!0)}testEmail(e,t,i){return i=Object.assign({method:"POST",body:{email:e,template:t}},i),this.client.send("/api/settings/test/email",i).then(()=>!0)}generateAppleClientSecret(e,t,i,s,l,o){return o=Object.assign({method:"POST",body:{clientId:e,teamId:t,keyId:i,privateKey:s,duration:l}},o),this.client.send("/api/settings/apple/generate-client-secret",o)}}class ya extends as{decode(e){return e}getFullList(e,t){if(typeof e=="number")return this._getFullList(e,t);let i=500;return(t=Object.assign({},e,t)).batch&&(i=t.batch,delete t.batch),this._getFullList(i,t)}getList(e=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:e,perPage:t},i.query),this.client.send(this.baseCrudPath,i).then(s=>{var l;return s.items=((l=s.items)===null||l===void 0?void 0:l.map(o=>this.decode(o)))||[],s})}getFirstListItem(e,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+e},t)).query=Object.assign({filter:e,skipTotal:1},t.query),this.getList(1,1,t).then(i=>{var s;if(!(!((s=i==null?void 0:i.items)===null||s===void 0)&&s.length))throw new Kn({status:404,data:{code:404,message:"The requested resource wasn't found.",data:{}}});return i.items[0]})}getOne(e,t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then(i=>this.decode(i))}create(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send(this.baseCrudPath,t).then(i=>this.decode(i))}update(e,t,i){return i=Object.assign({method:"PATCH",body:t},i),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),i).then(s=>this.decode(s))}delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then(()=>!0)}_getFullList(e=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let i=[],s=l=>en(this,void 0,void 0,function*(){return this.getList(l,e||500,t).then(o=>{const r=o.items;return i=i.concat(r),r.length==o.perPage?s(l+1):i})});return s(1)}}function An(n,e,t,i){const s=i!==void 0;return s||t!==void 0?s?(console.warn(n),e.body=Object.assign({},e.body,t),e.query=Object.assign({},e.query,i),e):e=Object.assign(e,t):e}class v0 extends ya{get baseCrudPath(){return"/api/admins"}update(e,t,i){return super.update(e,t,i).then(s=>{var l,o;return((l=this.client.authStore.model)===null||l===void 0?void 0:l.id)===s.id&&((o=this.client.authStore.model)===null||o===void 0?void 0:o.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}delete(e,t){return super.delete(e,t).then(i=>{var s,l;return i&&((s=this.client.authStore.model)===null||s===void 0?void 0:s.id)===e&&((l=this.client.authStore.model)===null||l===void 0?void 0:l.collectionId)===void 0&&this.client.authStore.clear(),i})}authResponse(e){const t=this.decode((e==null?void 0:e.admin)||{});return e!=null&&e.token&&(e!=null&&e.admin)&&this.client.authStore.save(e.token,t),Object.assign({},e,{token:(e==null?void 0:e.token)||"",admin:t})}authWithPassword(e,t,i,s){let l={method:"POST",body:{identity:e,password:t}};return l=An("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",l,i,s),this.client.send(this.baseCrudPath+"/auth-with-password",l).then(this.authResponse.bind(this))}authRefresh(e,t){let i={method:"POST"};return i=An("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",i,e,t),this.client.send(this.baseCrudPath+"/auth-refresh",i).then(this.authResponse.bind(this))}requestPasswordReset(e,t,i){let s={method:"POST",body:{email:e}};return s=An("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,t,i),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}confirmPasswordReset(e,t,i,s,l){let o={method:"POST",body:{token:e,password:t,passwordConfirm:i}};return o=An("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",o,s,l),this.client.send(this.baseCrudPath+"/confirm-password-reset",o).then(()=>!0)}}class h_ extends as{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentTopics=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}subscribe(e,t){var i;return en(this,void 0,void 0,function*(){if(!e)throw new Error("topic must be set.");const s=function(l){const o=l;let r;try{r=JSON.parse(o==null?void 0:o.data)}catch{}t(r||{})};return this.subscriptions[e]||(this.subscriptions[e]=[]),this.subscriptions[e].push(s),this.isConnected?this.subscriptions[e].length===1?yield this.submitSubscriptions():(i=this.eventSource)===null||i===void 0||i.addEventListener(e,s):yield this.connect(),()=>en(this,void 0,void 0,function*(){return this.unsubscribeByTopicAndListener(e,s)})})}unsubscribe(e){var t;return en(this,void 0,void 0,function*(){if(this.hasSubscriptionListeners(e)){if(e){for(let i of this.subscriptions[e])(t=this.eventSource)===null||t===void 0||t.removeEventListener(e,i);delete this.subscriptions[e]}else this.subscriptions={};this.hasSubscriptionListeners()?this.hasSubscriptionListeners(e)||(yield this.submitSubscriptions()):this.disconnect()}})}unsubscribeByPrefix(e){var t;return en(this,void 0,void 0,function*(){let i=!1;for(let s in this.subscriptions)if(s.startsWith(e)){i=!0;for(let l of this.subscriptions[s])(t=this.eventSource)===null||t===void 0||t.removeEventListener(s,l);delete this.subscriptions[s]}i&&(this.hasSubscriptionListeners()?yield this.submitSubscriptions():this.disconnect())})}unsubscribeByTopicAndListener(e,t){var i;return en(this,void 0,void 0,function*(){if(!Array.isArray(this.subscriptions[e])||!this.subscriptions[e].length)return;let s=!1;for(let l=this.subscriptions[e].length-1;l>=0;l--)this.subscriptions[e][l]===t&&(s=!0,delete this.subscriptions[e][l],this.subscriptions[e].splice(l,1),(i=this.eventSource)===null||i===void 0||i.removeEventListener(e,t));s&&(this.subscriptions[e].length||delete this.subscriptions[e],this.hasSubscriptionListeners()?this.hasSubscriptionListeners(e)||(yield this.submitSubscriptions()):this.disconnect())})}hasSubscriptionListeners(e){var t,i;if(this.subscriptions=this.subscriptions||{},e)return!!(!((t=this.subscriptions[e])===null||t===void 0)&&t.length);for(let s in this.subscriptions)if(!((i=this.subscriptions[s])===null||i===void 0)&&i.length)return!0;return!1}submitSubscriptions(){return en(this,void 0,void 0,function*(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},query:{requestKey:this.getSubscriptionsCancelKey()}}).catch(e=>{if(!(e!=null&&e.isAbort))throw e})})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getNonEmptySubscriptionTopics(){const e=[];for(let t in this.subscriptions)this.subscriptions[t].length&&e.push(t);return e}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.addEventListener(e,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.removeEventListener(e,t)}connect(){return en(this,void 0,void 0,function*(){if(!(this.reconnectAttempts>0))return new Promise((e,t)=>{this.pendingConnects.push({resolve:e,reject:t}),this.pendingConnects.length>1||this.initConnect()})})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=e=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",e=>{const t=e;this.clientId=t==null?void 0:t.lastEventId,this.submitSubscriptions().then(()=>en(this,void 0,void 0,function*(){let i=3;for(;this.hasUnsentSubscriptions()&&i>0;)i--,yield this.submitSubscriptions()})).then(()=>{for(let i of this.pendingConnects)i.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId)}).catch(i=>{this.clientId="",this.connectErrorHandler(i)})})}hasUnsentSubscriptions(){const e=this.getNonEmptySubscriptionTopics();if(e.length!=this.lastSentTopics.length)return!0;for(const t of e)if(!this.lastSentTopics.includes(t))return!0;return!1}connectErrorHandler(e){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let i of this.pendingConnects)i.reject(new Kn(e));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},t)}disconnect(e=!1){var t;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(t=this.eventSource)===null||t===void 0||t.close(),this.eventSource=null,this.clientId="",!e){this.reconnectAttempts=0;for(let i of this.pendingConnects)i.resolve();this.pendingConnects=[]}}}class y0 extends ya{constructor(e,t){super(e),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}subscribeOne(e,t){return en(this,void 0,void 0,function*(){return console.warn("PocketBase: subscribeOne(recordId, callback) is deprecated. Please replace it with subscribe(recordId, callback)."),this.client.realtime.subscribe(this.collectionIdOrName+"/"+e,t)})}subscribe(e,t){return en(this,void 0,void 0,function*(){if(typeof e=="function")return console.warn("PocketBase: subscribe(callback) is deprecated. Please replace it with subscribe('*', callback)."),this.client.realtime.subscribe(this.collectionIdOrName,e);if(!t)throw new Error("Missing subscription callback.");if(e==="")throw new Error("Missing topic.");let i=this.collectionIdOrName;return e!=="*"&&(i+="/"+e),this.client.realtime.subscribe(i,t)})}unsubscribe(e){return en(this,void 0,void 0,function*(){return e==="*"?this.client.realtime.unsubscribe(this.collectionIdOrName):e?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+e):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)})}getFullList(e,t){if(typeof e=="number")return super.getFullList(e,t);const i=Object.assign({},e,t);return super.getFullList(i)}getList(e=1,t=30,i){return super.getList(e,t,i)}getFirstListItem(e,t){return super.getFirstListItem(e,t)}getOne(e,t){return super.getOne(e,t)}create(e,t){return super.create(e,t)}update(e,t,i){return super.update(e,t,i).then(s=>{var l,o,r;return((l=this.client.authStore.model)===null||l===void 0?void 0:l.id)!==(s==null?void 0:s.id)||((o=this.client.authStore.model)===null||o===void 0?void 0:o.collectionId)!==this.collectionIdOrName&&((r=this.client.authStore.model)===null||r===void 0?void 0:r.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}delete(e,t){return super.delete(e,t).then(i=>{var s,l,o;return!i||((s=this.client.authStore.model)===null||s===void 0?void 0:s.id)!==e||((l=this.client.authStore.model)===null||l===void 0?void 0:l.collectionId)!==this.collectionIdOrName&&((o=this.client.authStore.model)===null||o===void 0?void 0:o.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),i})}authResponse(e){const t=this.decode((e==null?void 0:e.record)||{});return this.client.authStore.save(e==null?void 0:e.token,t),Object.assign({},e,{token:(e==null?void 0:e.token)||"",record:t})}listAuthMethods(e){return e=Object.assign({method:"GET"},e),this.client.send(this.baseCollectionPath+"/auth-methods",e).then(t=>Object.assign({},t,{usernamePassword:!!(t!=null&&t.usernamePassword),emailPassword:!!(t!=null&&t.emailPassword),authProviders:Array.isArray(t==null?void 0:t.authProviders)?t==null?void 0:t.authProviders:[]}))}authWithPassword(e,t,i,s){let l={method:"POST",body:{identity:e,password:t}};return l=An("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",l,i,s),this.client.send(this.baseCollectionPath+"/auth-with-password",l).then(o=>this.authResponse(o))}authWithOAuth2Code(e,t,i,s,l,o,r){let a={method:"POST",body:{provider:e,code:t,codeVerifier:i,redirectUrl:s,createData:l}};return a=An("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",a,o,r),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",a).then(u=>this.authResponse(u))}authWithOAuth2(...e){return en(this,void 0,void 0,function*(){if(e.length>1||typeof(e==null?void 0:e[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((e==null?void 0:e[0])||"",(e==null?void 0:e[1])||"",(e==null?void 0:e[2])||"",(e==null?void 0:e[3])||"",(e==null?void 0:e[4])||{},(e==null?void 0:e[5])||{},(e==null?void 0:e[6])||{});const t=(e==null?void 0:e[0])||{},i=(yield this.listAuthMethods()).authProviders.find(a=>a.name===t.provider);if(!i)throw new Kn(new Error(`Missing or invalid provider "${t.provider}".`));const s=this.client.buildUrl("/api/oauth2-redirect"),l=new h_(this.client);let o=null;function r(){o==null||o.close(),l.unsubscribe()}return t.urlCallback||(o=vu(void 0)),new Promise((a,u)=>en(this,void 0,void 0,function*(){var f;try{yield l.subscribe("@oauth2",g=>en(this,void 0,void 0,function*(){const m=l.clientId;try{if(!g.state||m!==g.state)throw new Error("State parameters don't match.");const _=Object.assign({},t);delete _.provider,delete _.scopes,delete _.createData,delete _.urlCallback;const y=yield this.authWithOAuth2Code(i.name,g.code,i.codeVerifier,s,t.createData,_);a(y)}catch(_){u(new Kn(_))}r()}));const c={state:l.clientId};!((f=t.scopes)===null||f===void 0)&&f.length&&(c.scope=t.scopes.join(" "));const d=this._replaceQueryParams(i.authUrl+s,c);yield(t.urlCallback||function(g){o?o.location.href=g:o=vu(g)})(d)}catch(c){r(),u(new Kn(c))}}))})}authRefresh(e,t){let i={method:"POST"};return i=An("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",i,e,t),this.client.send(this.baseCollectionPath+"/auth-refresh",i).then(s=>this.authResponse(s))}requestPasswordReset(e,t,i){let s={method:"POST",body:{email:e}};return s=An("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}confirmPasswordReset(e,t,i,s,l){let o={method:"POST",body:{token:e,password:t,passwordConfirm:i}};return o=An("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",o,s,l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",o).then(()=>!0)}requestVerification(e,t,i){let s={method:"POST",body:{email:e}};return s=An("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}confirmVerification(e,t,i){let s={method:"POST",body:{token:e}};return s=An("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>!0)}requestEmailChange(e,t,i){let s={method:"POST",body:{newEmail:e}};return s=An("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}confirmEmailChange(e,t,i,s){let l={method:"POST",body:{token:e,password:t}};return l=An("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",l,i,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",l).then(()=>!0)}listExternalAuths(e,t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/external-auths",t)}unlinkExternalAuth(e,t,i){return i=Object.assign({method:"DELETE"},i),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/external-auths/"+encodeURIComponent(t),i).then(()=>!0)}_replaceQueryParams(e,t={}){let i=e,s="";e.indexOf("?")>=0&&(i=e.substring(0,e.indexOf("?")),s=e.substring(e.indexOf("?")+1));const l={},o=s.split("&");for(const r of o){if(r=="")continue;const a=r.split("=");l[decodeURIComponent(a[0].replace(/\+/g," "))]=decodeURIComponent((a[1]||"").replace(/\+/g," "))}for(let r in t)t.hasOwnProperty(r)&&(t[r]==null?delete l[r]:l[r]=t[r]);s="";for(let r in l)l.hasOwnProperty(r)&&(s!=""&&(s+="&"),s+=encodeURIComponent(r.replace(/%20/g,"+"))+"="+encodeURIComponent(l[r].replace(/%20/g,"+")));return s!=""?i+"?"+s:i}}function vu(n){if(typeof window>"u"||!(window!=null&&window.open))throw new Kn(new Error("Not in a browser context - please pass a custom urlCallback function."));let e=1024,t=768,i=window.innerWidth,s=window.innerHeight;e=e>i?i:e,t=t>s?s:t;let l=i/2-e/2,o=s/2-t/2;return window.open(n,"popup_window","width="+e+",height="+t+",top="+o+",left="+l+",resizable,menubar=no")}class k0 extends ya{get baseCrudPath(){return"/api/collections"}import(e,t=!1,i){return en(this,void 0,void 0,function*(){return i=Object.assign({method:"PUT",body:{collections:e,deleteMissing:t}},i),this.client.send(this.baseCrudPath+"/import",i).then(()=>!0)})}}class w0 extends as{getRequestsList(e=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:e,perPage:t},i.query),this.client.send("/api/logs/requests",i)}getRequest(e,t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/requests/"+encodeURIComponent(e),t)}getRequestsStats(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/logs/requests/stats",e)}}class S0 extends as{check(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/health",e)}}class $0 extends as{getUrl(e,t,i={}){if(!t||!(e!=null&&e.id))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));let l=this.client.buildUrl(s.join("/"));if(Object.keys(i).length){i.download===!1&&delete i.download;const o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l}getToken(e){return e=Object.assign({method:"POST"},e),this.client.send("/api/files/token",e).then(t=>(t==null?void 0:t.token)||"")}}class T0 extends as{getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/backups",e)}create(e,t){return t=Object.assign({method:"POST",body:{name:e}},t),this.client.send("/api/backups",t).then(()=>!0)}upload(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send("/api/backups/upload",t).then(()=>!0)}delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}`,t).then(()=>!0)}restore(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}/restore`,t).then(()=>!0)}getDownloadUrl(e,t){return this.client.buildUrl(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(e)}`)}}const C0=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];class qo{constructor(e="/",t,i="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=e,this.lang=i,this.authStore=t||new p_,this.admins=new v0(this),this.collections=new k0(this),this.files=new $0(this),this.logs=new w0(this),this.settings=new b0(this),this.realtime=new h_(this),this.health=new S0(this),this.backups=new T0(this)}collection(e){return this.recordServices[e]||(this.recordServices[e]=new y0(this,e)),this.recordServices[e]}autoCancellation(e){return this.enableAutoCancellation=!!e,this}cancelRequest(e){return this.cancelControllers[e]&&(this.cancelControllers[e].abort(),delete this.cancelControllers[e]),this}cancelAllRequests(){for(let e in this.cancelControllers)this.cancelControllers[e].abort();return this.cancelControllers={},this}getFileUrl(e,t,i={}){return this.files.getUrl(e,t,i)}buildUrl(e){var t;let i=this.baseUrl;return typeof window>"u"||!window.location||i.startsWith("https://")||i.startsWith("http://")||(i=!((t=window.location.origin)===null||t===void 0)&&t.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(i+=window.location.pathname||"/",i+=i.endsWith("/")?"":"/"),i+=this.baseUrl),e&&(i+=i.endsWith("/")?"":"/",i+=e.startsWith("/")?e.substring(1):e),i}send(e,t){return en(this,void 0,void 0,function*(){t=this.initSendOptions(e,t);let i=this.buildUrl(e);if(t.query!==void 0){const s=this.serializeQueryParams(t.query);s&&(i+=(i.includes("?")?"&":"?")+s),delete t.query}if(this.beforeSend){const s=Object.assign({},yield this.beforeSend(i,t));s.url!==void 0||s.options!==void 0?(i=s.url||i,t=s.options||t):Object.keys(s).length&&(t=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}return this.getHeader(t.headers,"Content-Type")=="application/json"&&t.body&&typeof t.body!="string"&&(t.body=JSON.stringify(t.body)),(t.fetch||fetch)(i,t).then(s=>en(this,void 0,void 0,function*(){let l={};try{l=yield s.json()}catch{}if(this.afterSend&&(l=yield this.afterSend(s,l)),s.status>=400)throw new Kn({url:s.url,status:s.status,data:l});return l})).catch(s=>{throw new Kn(s)})})}initSendOptions(e,t){(t=Object.assign({method:"GET"},t)).query=t.query||{},t.body=this.convertToFormDataIfNeeded(t.body);for(let i in t)C0.includes(i)||(t.query[i]=t[i],delete t[i]);if(t.query=Object.assign({},t.params,t.query),t.requestKey===void 0&&(t.$autoCancel===!1||t.query.$autoCancel===!1?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,this.getHeader(t.headers,"Content-Type")!==null||this.isFormData(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),this.getHeader(t.headers,"Accept-Language")===null&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(t.headers,"Authorization")===null&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&t.requestKey!==null){const i=t.requestKey||(t.method||"GET")+e;delete t.requestKey,this.cancelRequest(i);const s=new AbortController;this.cancelControllers[i]=s,t.signal=s.signal}return t}convertToFormDataIfNeeded(e){if(typeof FormData>"u"||e===void 0||typeof e!="object"||e===null||this.isFormData(e)||!this.hasBlobField(e))return e;const t=new FormData;for(let i in e){const s=Array.isArray(e[i])?e[i]:[e[i]];for(let l of s)t.append(i,l)}return t}hasBlobField(e){for(let t in e){const i=Array.isArray(e[t])?e[t]:[e[t]];for(let s of i)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(e,t){e=e||{},t=t.toLowerCase();for(let i in e)if(i.toLowerCase()==t)return e[i];return null}isFormData(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)}serializeQueryParams(e){const t=[];for(const i in e){if(e[i]===null)continue;const s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(const o of s)t.push(l+"="+encodeURIComponent(o));else s instanceof Date?t.push(l+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?t.push(l+"="+encodeURIComponent(JSON.stringify(s))):t.push(l+"="+encodeURIComponent(s))}return t.join("&")}}class us extends Error{}class M0 extends us{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class O0 extends us{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class E0 extends us{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Qs extends us{}class m_ extends us{constructor(e){super(`Invalid unit ${e}`)}}class Un extends us{}class Ei extends us{constructor(){super("Zone is an abstract class")}}const Ie="numeric",ni="short",Pn="long",Vr={year:Ie,month:Ie,day:Ie},g_={year:Ie,month:ni,day:Ie},D0={year:Ie,month:ni,day:Ie,weekday:ni},__={year:Ie,month:Pn,day:Ie},b_={year:Ie,month:Pn,day:Ie,weekday:Pn},v_={hour:Ie,minute:Ie},y_={hour:Ie,minute:Ie,second:Ie},k_={hour:Ie,minute:Ie,second:Ie,timeZoneName:ni},w_={hour:Ie,minute:Ie,second:Ie,timeZoneName:Pn},S_={hour:Ie,minute:Ie,hourCycle:"h23"},$_={hour:Ie,minute:Ie,second:Ie,hourCycle:"h23"},T_={hour:Ie,minute:Ie,second:Ie,hourCycle:"h23",timeZoneName:ni},C_={hour:Ie,minute:Ie,second:Ie,hourCycle:"h23",timeZoneName:Pn},M_={year:Ie,month:Ie,day:Ie,hour:Ie,minute:Ie},O_={year:Ie,month:Ie,day:Ie,hour:Ie,minute:Ie,second:Ie},E_={year:Ie,month:ni,day:Ie,hour:Ie,minute:Ie},D_={year:Ie,month:ni,day:Ie,hour:Ie,minute:Ie,second:Ie},A0={year:Ie,month:ni,day:Ie,weekday:ni,hour:Ie,minute:Ie},A_={year:Ie,month:Pn,day:Ie,hour:Ie,minute:Ie,timeZoneName:ni},I_={year:Ie,month:Pn,day:Ie,hour:Ie,minute:Ie,second:Ie,timeZoneName:ni},L_={year:Ie,month:Pn,day:Ie,weekday:Pn,hour:Ie,minute:Ie,timeZoneName:Pn},P_={year:Ie,month:Pn,day:Ie,weekday:Pn,hour:Ie,minute:Ie,second:Ie,timeZoneName:Pn};function it(n){return typeof n>"u"}function ns(n){return typeof n=="number"}function jo(n){return typeof n=="number"&&n%1===0}function I0(n){return typeof n=="string"}function L0(n){return Object.prototype.toString.call(n)==="[object Date]"}function F_(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function P0(n){return Array.isArray(n)?n:[n]}function yu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function F0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Cs(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ki(n,e,t){return jo(n)&&n>=e&&n<=t}function N0(n,e){return n-e*Math.floor(n/e)}function Yt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ai(n){if(!(it(n)||n===null||n===""))return parseInt(n,10)}function Ui(n){if(!(it(n)||n===null||n===""))return parseFloat(n)}function ka(n){if(!(it(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function wa(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Sl(n){return n%4===0&&(n%100!==0||n%400===0)}function nl(n){return Sl(n)?366:365}function mo(n,e){const t=N0(e-1,12)+1,i=n+(e-t)/12;return t===2?Sl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Sa(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function go(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function zr(n){return n>99?n:n>60?1900+n:2e3+n}function N_(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Ho(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function R_(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Un(`Invalid unit value ${n}`);return e}function _o(n,e){const t={};for(const i in n)if(Cs(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=R_(s)}return t}function il(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Yt(t,2)}:${Yt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Yt(t,2)}${Yt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Vo(n){return F0(n,["hour","minute","second","millisecond"])}const q_=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,R0=["January","February","March","April","May","June","July","August","September","October","November","December"],j_=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],q0=["J","F","M","A","M","J","J","A","S","O","N","D"];function H_(n){switch(n){case"narrow":return[...q0];case"short":return[...j_];case"long":return[...R0];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const V_=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],z_=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],j0=["M","T","W","T","F","S","S"];function B_(n){switch(n){case"narrow":return[...j0];case"short":return[...z_];case"long":return[...V_];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const U_=["AM","PM"],H0=["Before Christ","Anno Domini"],V0=["BC","AD"],z0=["B","A"];function W_(n){switch(n){case"narrow":return[...z0];case"short":return[...V0];case"long":return[...H0];default:return null}}function B0(n){return U_[n.hour<12?0:1]}function U0(n,e){return B_(e)[n.weekday-1]}function W0(n,e){return H_(e)[n.month-1]}function Y0(n,e){return W_(e)[n.year<0?0:1]}function K0(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function ku(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const J0={D:Vr,DD:g_,DDD:__,DDDD:b_,t:v_,tt:y_,ttt:k_,tttt:w_,T:S_,TT:$_,TTT:T_,TTTT:C_,f:M_,ff:E_,fff:A_,ffff:L_,F:O_,FF:D_,FFF:I_,FFFF:P_};class wn{static create(e,t={}){return new wn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return J0[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Yt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(h,g)=>this.loc.extract(e,h,g),o=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",r=()=>i?B0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(h,g)=>i?W0(e,h):l(g?{month:h}:{month:h,day:"numeric"},"month"),u=(h,g)=>i?U0(e,h):l(g?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const g=wn.macroTokenToFormatOpts(h);return g?this.formatWithSystemDefault(e,g):h},c=h=>i?Y0(e,h):l({era:h},"era"),d=h=>{switch(h){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(h)}};return ku(wn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=wn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return ku(l,s(r))}}class ei{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class $l{get type(){throw new Ei}get name(){throw new Ei}get ianaName(){return this.name}get isUniversal(){throw new Ei}offsetName(e,t){throw new Ei}formatOffset(e,t){throw new Ei}offset(e){throw new Ei}equals(e){throw new Ei}get isValid(){throw new Ei}}let ir=null;class $a extends $l{static get instance(){return ir===null&&(ir=new $a),ir}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return N_(e,t,i)}formatOffset(e,t){return il(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let oo={};function Z0(n){return oo[n]||(oo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),oo[n]}const G0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function X0(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function Q0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?g:1e3+g,(d-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let sr=null;class gn extends $l{static get utcInstance(){return sr===null&&(sr=new gn(0)),sr}static instance(e){return e===0?gn.utcInstance:new gn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new gn(Ho(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${il(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${il(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return il(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class x0 extends $l{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ii(n,e){if(it(n)||n===null)return e;if(n instanceof $l)return n;if(I0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?gn.utcInstance:gn.parseSpecifier(t)||Si.create(n)}else return ns(n)?gn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new x0(n)}let wu=()=>Date.now(),Su="system",$u=null,Tu=null,Cu=null,Mu;class Qt{static get now(){return wu}static set now(e){wu=e}static set defaultZone(e){Su=e}static get defaultZone(){return Ii(Su,$a.instance)}static get defaultLocale(){return $u}static set defaultLocale(e){$u=e}static get defaultNumberingSystem(){return Tu}static set defaultNumberingSystem(e){Tu=e}static get defaultOutputCalendar(){return Cu}static set defaultOutputCalendar(e){Cu=e}static get throwOnInvalid(){return Mu}static set throwOnInvalid(e){Mu=e}static resetCaches(){Lt.resetCache(),Si.resetCache()}}let Ou={};function ev(n,e={}){const t=JSON.stringify([n,e]);let i=Ou[t];return i||(i=new Intl.ListFormat(n,e),Ou[t]=i),i}let Br={};function Ur(n,e={}){const t=JSON.stringify([n,e]);let i=Br[t];return i||(i=new Intl.DateTimeFormat(n,e),Br[t]=i),i}let Wr={};function tv(n,e={}){const t=JSON.stringify([n,e]);let i=Wr[t];return i||(i=new Intl.NumberFormat(n,e),Wr[t]=i),i}let Yr={};function nv(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Yr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Yr[s]=l),l}let xs=null;function iv(){return xs||(xs=new Intl.DateTimeFormat().resolvedOptions().locale,xs)}function sv(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Ur(n).resolvedOptions()}catch{t=Ur(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function lv(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function ov(n){const e=[];for(let t=1;t<=12;t++){const i=Be.utc(2016,t,1);e.push(n(i))}return e}function rv(n){const e=[];for(let t=1;t<=7;t++){const i=Be.utc(2016,11,13+t);e.push(n(i))}return e}function Rl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function av(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class uv{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=tv(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):wa(e,3);return Yt(t,this.padTo)}}}class fv{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&Si.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Be.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Ur(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class cv{constructor(e,t,i){this.opts={style:"long",...i},!t&&F_()&&(this.rtf=nv(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):K0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Lt{static fromOpts(e){return Lt.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Qt.defaultLocale,o=l||(s?"en-US":iv()),r=t||Qt.defaultNumberingSystem,a=i||Qt.defaultOutputCalendar;return new Lt(o,r,a,l)}static resetCache(){xs=null,Br={},Wr={},Yr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Lt.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=sv(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=lv(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=av(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Lt.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return Rl(this,e,i,H_,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=ov(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Rl(this,e,i,B_,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=rv(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Rl(this,void 0,e,()=>U_,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Be.utc(2016,11,13,9),Be.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Rl(this,e,t,W_,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Be.utc(-40,1,1),Be.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new uv(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new fv(e,this.intl,t)}relFormatter(e={}){return new cv(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ev(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Ls(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Ps(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function Fs(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function Y_(...n){return(e,t)=>{const i={};let s;for(s=0;sh!==void 0&&(g||h&&f)?-h:h;return[{years:d(Ui(t)),months:d(Ui(i)),weeks:d(Ui(s)),days:d(Ui(l)),hours:d(Ui(o)),minutes:d(Ui(r)),seconds:d(Ui(a),a==="-0"),milliseconds:d(ka(u),c)}]}const $v={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ma(n,e,t,i,s,l,o){const r={year:e.length===2?zr(Ai(e)):Ai(e),month:j_.indexOf(t)+1,day:Ai(i),hour:Ai(s),minute:Ai(l)};return o&&(r.second=Ai(o)),n&&(r.weekday=n.length>3?V_.indexOf(n)+1:z_.indexOf(n)+1),r}const Tv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Cv(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=Ma(e,s,i,t,l,o,r);let h;return a?h=$v[a]:u?h=0:h=Ho(f,c),[d,new gn(h)]}function Mv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Ov=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ev=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Dv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Eu(n){const[,e,t,i,s,l,o,r]=n;return[Ma(e,s,i,t,l,o,r),gn.utcInstance]}function Av(n){const[,e,t,i,s,l,o,r]=n;return[Ma(e,r,t,i,s,l,o),gn.utcInstance]}const Iv=Ls(pv,Ca),Lv=Ls(hv,Ca),Pv=Ls(mv,Ca),Fv=Ls(J_),G_=Ps(yv,Ns,Tl,Cl),Nv=Ps(gv,Ns,Tl,Cl),Rv=Ps(_v,Ns,Tl,Cl),qv=Ps(Ns,Tl,Cl);function jv(n){return Fs(n,[Iv,G_],[Lv,Nv],[Pv,Rv],[Fv,qv])}function Hv(n){return Fs(Mv(n),[Tv,Cv])}function Vv(n){return Fs(n,[Ov,Eu],[Ev,Eu],[Dv,Av])}function zv(n){return Fs(n,[wv,Sv])}const Bv=Ps(Ns);function Uv(n){return Fs(n,[kv,Bv])}const Wv=Ls(bv,vv),Yv=Ls(Z_),Kv=Ps(Ns,Tl,Cl);function Jv(n){return Fs(n,[Wv,G_],[Yv,Kv])}const Zv="Invalid Duration",X_={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Gv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...X_},qn=146097/400,hs=146097/4800,Xv={years:{quarters:4,months:12,weeks:qn/7,days:qn,hours:qn*24,minutes:qn*24*60,seconds:qn*24*60*60,milliseconds:qn*24*60*60*1e3},quarters:{months:3,weeks:qn/28,days:qn/4,hours:qn*24/4,minutes:qn*24*60/4,seconds:qn*24*60*60/4,milliseconds:qn*24*60*60*1e3/4},months:{weeks:hs/7,days:hs,hours:hs*24,minutes:hs*24*60,seconds:hs*24*60*60,milliseconds:hs*24*60*60*1e3},...X_},Gi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Qv=Gi.slice(0).reverse();function Wi(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new rt(i)}function xv(n){return n<0?Math.floor(n):Math.ceil(n)}function Q_(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?xv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function ey(n,e){Qv.reduce((t,i)=>it(e[i])?t:(t&&Q_(n,e,t,e,i),i),null)}class rt{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Lt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Xv:Gv,this.isLuxonDuration=!0}static fromMillis(e,t){return rt.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Un(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new rt({values:_o(e,rt.normalizeUnit),loc:Lt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ns(e))return rt.fromMillis(e);if(rt.isDuration(e))return e;if(typeof e=="object")return rt.fromObject(e);throw new Un(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=zv(e);return i?rt.fromObject(i,t):rt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Uv(e);return i?rt.fromObject(i,t):rt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Un("need to specify a reason the Duration is invalid");const i=e instanceof ei?e:new ei(e,t);if(Qt.throwOnInvalid)throw new E0(i);return new rt({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new m_(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?wn.create(this.loc,i).formatDurationFromString(this,e):Zv}toHuman(e={}){const t=Gi.map(i=>{const s=this.values[i];return it(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=wa(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e),i={};for(const s of Gi)(Cs(t.values,s)||Cs(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Wi(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=R_(e(this.values[i],i));return Wi(this,{values:t},!0)}get(e){return this[rt.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,..._o(e,rt.normalizeUnit)};return Wi(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Wi(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return ey(this.matrix,e),Wi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>rt.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Gi)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;ns(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)Gi.indexOf(u)>Gi.indexOf(o)&&Q_(this.matrix,s,u,t,o)}else ns(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Wi(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Wi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Gi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Vs="Invalid Interval";function ty(n,e){return!n||!n.isValid?Rt.invalid("missing or invalid start"):!e||!e.isValid?Rt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?Rt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Us).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(Rt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=rt.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(Rt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:Rt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Rt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(Rt.fromDateTimes(t,a.time)),t=null);return Rt.merge(s)}difference(...e){return Rt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Vs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Vs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Vs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Vs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Vs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):rt.invalid(this.invalidReason)}mapEndpoints(e){return Rt.fromDateTimes(e(this.s),e(this.e))}}class ql{static hasDST(e=Qt.defaultZone){const t=Be.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Si.isValidZone(e)}static normalizeZone(e){return Ii(e,Qt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Lt.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Lt.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Lt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Lt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Lt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Lt.create(t,null,"gregory").eras(e)}static features(){return{relative:F_()}}}function Du(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(rt.fromMillis(i).as("days"))}function ny(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=Du(r,a);return(u-u%7)/7}],["days",Du]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function iy(n,e,t,i){let[s,l,o,r]=ny(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?rt.fromMillis(a,i).shiftTo(...u).plus(f):f}const Oa={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Au={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},sy=Oa.hanidec.replace(/[\[|\]]/g,"").split("");function ly(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Qn({numberingSystem:n},e=""){return new RegExp(`${Oa[n||"latn"]}${e}`)}const oy="missing Intl.DateTimeFormat.formatToParts support";function ft(n,e=t=>t){return{regex:n,deser:([t])=>e(ly(t))}}const ry=String.fromCharCode(160),x_=`[ ${ry}]`,eb=new RegExp(x_,"g");function ay(n){return n.replace(/\./g,"\\.?").replace(eb,x_)}function Iu(n){return n.replace(/\./g,"").replace(eb," ").toLowerCase()}function xn(n,e){return n===null?null:{regex:RegExp(n.map(ay).join("|")),deser:([t])=>n.findIndex(i=>Iu(t)===Iu(i))+e}}function Lu(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function lr(n){return{regex:n,deser:([e])=>e}}function uy(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function fy(n,e){const t=Qn(e),i=Qn(e,"{2}"),s=Qn(e,"{3}"),l=Qn(e,"{4}"),o=Qn(e,"{6}"),r=Qn(e,"{1,2}"),a=Qn(e,"{1,3}"),u=Qn(e,"{1,6}"),f=Qn(e,"{1,9}"),c=Qn(e,"{2,4}"),d=Qn(e,"{4,6}"),h=_=>({regex:RegExp(uy(_.val)),deser:([y])=>y,literal:!0}),m=(_=>{if(n.literal)return h(_);switch(_.val){case"G":return xn(e.eras("short",!1),0);case"GG":return xn(e.eras("long",!1),0);case"y":return ft(u);case"yy":return ft(c,zr);case"yyyy":return ft(l);case"yyyyy":return ft(d);case"yyyyyy":return ft(o);case"M":return ft(r);case"MM":return ft(i);case"MMM":return xn(e.months("short",!0,!1),1);case"MMMM":return xn(e.months("long",!0,!1),1);case"L":return ft(r);case"LL":return ft(i);case"LLL":return xn(e.months("short",!1,!1),1);case"LLLL":return xn(e.months("long",!1,!1),1);case"d":return ft(r);case"dd":return ft(i);case"o":return ft(a);case"ooo":return ft(s);case"HH":return ft(i);case"H":return ft(r);case"hh":return ft(i);case"h":return ft(r);case"mm":return ft(i);case"m":return ft(r);case"q":return ft(r);case"qq":return ft(i);case"s":return ft(r);case"ss":return ft(i);case"S":return ft(a);case"SSS":return ft(s);case"u":return lr(f);case"uu":return lr(r);case"uuu":return ft(t);case"a":return xn(e.meridiems(),0);case"kkkk":return ft(l);case"kk":return ft(c,zr);case"W":return ft(r);case"WW":return ft(i);case"E":case"c":return ft(t);case"EEE":return xn(e.weekdays("short",!1,!1),1);case"EEEE":return xn(e.weekdays("long",!1,!1),1);case"ccc":return xn(e.weekdays("short",!0,!1),1);case"cccc":return xn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Lu(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return Lu(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return lr(/[a-z_+-/]{1,256}?/i);default:return h(_)}})(n)||{invalidReason:oy};return m.token=n,m}const cy={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function dy(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=cy[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function py(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function hy(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Cs(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function my(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return it(n.z)||(t=Si.create(n.z)),it(n.Z)||(t||(t=new gn(n.Z)),i=n.Z),it(n.q)||(n.M=(n.q-1)*3+1),it(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),it(n.u)||(n.S=ka(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let or=null;function gy(){return or||(or=Be.fromMillis(1555555555555)),or}function _y(n,e){if(n.literal)return n;const t=wn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=wn.create(e,t).formatDateTimeParts(gy()).map(o=>dy(o,e,t));return l.includes(void 0)?n:l}function by(n,e){return Array.prototype.concat(...n.map(t=>_y(t,e)))}function tb(n,e,t){const i=by(wn.parseFormat(t),n),s=i.map(o=>fy(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=py(s),a=RegExp(o,"i"),[u,f]=hy(e,a,r),[c,d,h]=f?my(f):[null,null,void 0];if(Cs(f,"a")&&Cs(f,"H"))throw new Qs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:h}}}function vy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=tb(n,e,t);return[i,s,l,o]}const nb=[0,31,59,90,120,151,181,212,243,273,304,334],ib=[0,31,60,91,121,152,182,213,244,274,305,335];function Yn(n,e){return new ei("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function sb(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function lb(n,e,t){return t+(Sl(n)?ib:nb)[e-1]}function ob(n,e){const t=Sl(n)?ib:nb,i=t.findIndex(l=>lgo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Vo(n)}}function Pu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=sb(e,1,4),l=nl(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=nl(r)):o>l?(r=e+1,o-=nl(e)):r=e;const{month:a,day:u}=ob(r,o);return{year:r,month:a,day:u,...Vo(n)}}function rr(n){const{year:e,month:t,day:i}=n,s=lb(e,t,i);return{year:e,ordinal:s,...Vo(n)}}function Fu(n){const{year:e,ordinal:t}=n,{month:i,day:s}=ob(e,t);return{year:e,month:i,day:s,...Vo(n)}}function yy(n){const e=jo(n.weekYear),t=ki(n.weekNumber,1,go(n.weekYear)),i=ki(n.weekday,1,7);return e?t?i?!1:Yn("weekday",n.weekday):Yn("week",n.week):Yn("weekYear",n.weekYear)}function ky(n){const e=jo(n.year),t=ki(n.ordinal,1,nl(n.year));return e?t?!1:Yn("ordinal",n.ordinal):Yn("year",n.year)}function rb(n){const e=jo(n.year),t=ki(n.month,1,12),i=ki(n.day,1,mo(n.year,n.month));return e?t?i?!1:Yn("day",n.day):Yn("month",n.month):Yn("year",n.year)}function ab(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=ki(e,0,23)||e===24&&t===0&&i===0&&s===0,o=ki(t,0,59),r=ki(i,0,59),a=ki(s,0,999);return l?o?r?a?!1:Yn("millisecond",s):Yn("second",i):Yn("minute",t):Yn("hour",e)}const ar="Invalid DateTime",Nu=864e13;function jl(n){return new ei("unsupported zone",`the zone "${n.name}" is not supported`)}function ur(n){return n.weekData===null&&(n.weekData=Kr(n.c)),n.weekData}function zs(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Be({...t,...e,old:t})}function ub(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Ru(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function ro(n,e,t){return ub(Sa(n),e,t)}function qu(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,mo(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=rt.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=Sa(l);let[a,u]=ub(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Bs(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Be.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Be.invalid(new ei("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Hl(n,e,t=!0){return n.isValid?wn.create(Lt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function fr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Yt(n.c.year,t?6:4),e?(i+="-",i+=Yt(n.c.month),i+="-",i+=Yt(n.c.day)):(i+=Yt(n.c.month),i+=Yt(n.c.day)),i}function ju(n,e,t,i,s,l){let o=Yt(n.c.hour);return e?(o+=":",o+=Yt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Yt(n.c.minute),(n.c.second!==0||!t)&&(o+=Yt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Yt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Yt(Math.trunc(-n.o/60)),o+=":",o+=Yt(Math.trunc(-n.o%60))):(o+="+",o+=Yt(Math.trunc(n.o/60)),o+=":",o+=Yt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const fb={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},wy={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Sy={ordinal:1,hour:0,minute:0,second:0,millisecond:0},cb=["year","month","day","hour","minute","second","millisecond"],$y=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ty=["year","ordinal","hour","minute","second","millisecond"];function Hu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new m_(n);return e}function Vu(n,e){const t=Ii(e.zone,Qt.defaultZone),i=Lt.fromObject(e),s=Qt.now();let l,o;if(it(n.year))l=s;else{for(const u of cb)it(n[u])&&(n[u]=fb[u]);const r=rb(n)||ab(n);if(r)return Be.invalid(r);const a=t.offset(s);[l,o]=ro(n,a,t)}return new Be({ts:l,zone:t,loc:i,o})}function zu(n,e,t){const i=it(t.round)?!0:t.round,s=(o,r)=>(o=wa(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Bu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class Be{constructor(e){const t=e.zone||Qt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new ei("invalid input"):null)||(t.isValid?null:jl(t));this.ts=it(e.ts)?Qt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Ru(this.ts,r),i=Number.isNaN(s.year)?new ei("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Lt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Be({})}static local(){const[e,t]=Bu(arguments),[i,s,l,o,r,a,u]=t;return Vu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Bu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=gn.utcInstance,Vu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=L0(e)?e.valueOf():NaN;if(Number.isNaN(i))return Be.invalid("invalid input");const s=Ii(t.zone,Qt.defaultZone);return s.isValid?new Be({ts:i,zone:s,loc:Lt.fromObject(t)}):Be.invalid(jl(s))}static fromMillis(e,t={}){if(ns(e))return e<-Nu||e>Nu?Be.invalid("Timestamp out of range"):new Be({ts:e,zone:Ii(t.zone,Qt.defaultZone),loc:Lt.fromObject(t)});throw new Un(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ns(e))return new Be({ts:e*1e3,zone:Ii(t.zone,Qt.defaultZone),loc:Lt.fromObject(t)});throw new Un("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Ii(t.zone,Qt.defaultZone);if(!i.isValid)return Be.invalid(jl(i));const s=Qt.now(),l=it(t.specificOffset)?i.offset(s):t.specificOffset,o=_o(e,Hu),r=!it(o.ordinal),a=!it(o.year),u=!it(o.month)||!it(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=Lt.fromObject(t);if((f||r)&&c)throw new Qs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Qs("Can't mix ordinal dates with month/day");const h=c||o.weekday&&!f;let g,m,_=Ru(s,l);h?(g=$y,m=wy,_=Kr(_)):r?(g=Ty,m=Sy,_=rr(_)):(g=cb,m=fb);let y=!1;for(const D of g){const I=o[D];it(I)?y?o[D]=m[D]:o[D]=_[D]:y=!0}const S=h?yy(o):r?ky(o):rb(o),T=S||ab(o);if(T)return Be.invalid(T);const $=h?Pu(o):r?Fu(o):o,[C,M]=ro($,l,i),E=new Be({ts:C,zone:i,o:M,loc:d});return o.weekday&&f&&e.weekday!==E.weekday?Be.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${E.toISO()}`):E}static fromISO(e,t={}){const[i,s]=jv(e);return Bs(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Hv(e);return Bs(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Vv(e);return Bs(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(it(e)||it(t))throw new Un("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Lt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=vy(o,e,t);return f?Be.invalid(f):Bs(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Be.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Jv(e);return Bs(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Un("need to specify a reason the DateTime is invalid");const i=e instanceof ei?e:new ei(e,t);if(Qt.throwOnInvalid)throw new M0(i);return new Be({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ur(this).weekYear:NaN}get weekNumber(){return this.isValid?ur(this).weekNumber:NaN}get weekday(){return this.isValid?ur(this).weekday:NaN}get ordinal(){return this.isValid?rr(this.c).ordinal:NaN}get monthShort(){return this.isValid?ql.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ql.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ql.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ql.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Sl(this.year)}get daysInMonth(){return mo(this.year,this.month)}get daysInYear(){return this.isValid?nl(this.year):NaN}get weeksInWeekYear(){return this.isValid?go(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=wn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(gn.instance(e),t)}toLocal(){return this.setZone(Qt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Ii(e,Qt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=ro(o,l,e)}return zs(this,{ts:s,zone:e})}else return Be.invalid(jl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return zs(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=_o(e,Hu),i=!it(t.weekYear)||!it(t.weekNumber)||!it(t.weekday),s=!it(t.ordinal),l=!it(t.year),o=!it(t.month)||!it(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Qs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Qs("Can't mix ordinal dates with month/day");let u;i?u=Pu({...Kr(this.c),...t}):it(t.ordinal)?(u={...this.toObject(),...t},it(t.day)&&(u.day=Math.min(mo(u.year,u.month),u.day))):u=Fu({...rr(this.c),...t});const[f,c]=ro(u,this.o,this.zone);return zs(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e);return zs(this,qu(this,t))}minus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e).negate();return zs(this,qu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=rt.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?wn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ar}toLocaleString(e=Vr,t={}){return this.isValid?wn.create(this.loc.clone(t),e).formatDateTime(this):ar}toLocaleParts(e={}){return this.isValid?wn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=fr(this,o);return r+="T",r+=ju(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?fr(this,e==="extended"):null}toISOWeekDate(){return Hl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+ju(this,o==="extended",t,e,i,l):null}toRFC2822(){return Hl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Hl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?fr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Hl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():ar}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return rt.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=P0(t).map(rt.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=iy(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Be.now(),e,t)}until(e){return this.isValid?Rt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Be.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Be.isDateTime))throw new Un("max requires all arguments be DateTimes");return yu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Lt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return tb(o,e,t)}static fromStringExplain(e,t,i={}){return Be.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Vr}static get DATE_MED(){return g_}static get DATE_MED_WITH_WEEKDAY(){return D0}static get DATE_FULL(){return __}static get DATE_HUGE(){return b_}static get TIME_SIMPLE(){return v_}static get TIME_WITH_SECONDS(){return y_}static get TIME_WITH_SHORT_OFFSET(){return k_}static get TIME_WITH_LONG_OFFSET(){return w_}static get TIME_24_SIMPLE(){return S_}static get TIME_24_WITH_SECONDS(){return $_}static get TIME_24_WITH_SHORT_OFFSET(){return T_}static get TIME_24_WITH_LONG_OFFSET(){return C_}static get DATETIME_SHORT(){return M_}static get DATETIME_SHORT_WITH_SECONDS(){return O_}static get DATETIME_MED(){return E_}static get DATETIME_MED_WITH_SECONDS(){return D_}static get DATETIME_MED_WITH_WEEKDAY(){return A0}static get DATETIME_FULL(){return A_}static get DATETIME_FULL_WITH_SECONDS(){return I_}static get DATETIME_HUGE(){return L_}static get DATETIME_HUGE_WITH_SECONDS(){return P_}}function Us(n){if(Be.isDateTime(n))return n;if(n&&n.valueOf&&ns(n.valueOf()))return Be.fromJSDate(n);if(n&&typeof n=="object")return Be.fromObject(n);throw new Un(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const Cy=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],My=[".mp4",".avi",".mov",".3gp",".wmv"],Oy=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],Ey=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class z{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||z.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return z.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!z.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!z.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){z.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=z.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!z.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!z.isObject(l)&&!Array.isArray(l)||!z.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!z.isObject(s)&&!Array.isArray(s)||!z.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):z.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||z.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||z.isObject(e)&&Object.keys(e).length>0)&&z.deleteByPath(e,l.join(i),i)}static randomString(e=10){let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s"u")return z.randomString(e);const t=new Uint8Array(e);crypto.getRandomValues(t);const i="-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";let s="";for(let l=0;l=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static formattedFileSize(e){const t=e?Math.floor(Math.log(e)/Math.log(1024)):0;return(e/Math.pow(1024,t)).toFixed(2)*1+" "+["B","KB","MB","GB","TB"][t]}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ss'Z'",24:"yyyy-MM-dd HH:mm:ss.SSS'Z'"},i=t[e.length]||t[19];return Be.fromFormat(e,i,{zone:"UTC"})}return Be.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return z.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return z.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{console.warn("Failed to copy.",i)})}static download(e,t){const i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download",t),i.click(),i.remove()}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2));t=t.endsWith(".json")?t:t+".json",z.download(i,t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!Cy.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!My.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!Oy.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!Ey.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return z.hasImageExtension(e)?"image":z.hasDocumentExtension(e)?"document":z.hasVideoExtension(e)?"video":z.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(z.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)z.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):z.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var a,u,f,c,d,h,g;const t=(e==null?void 0:e.schema)||[],i=(e==null?void 0:e.type)==="auth",s=(e==null?void 0:e.type)==="view",l={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name};i&&(l.username="username123",l.verified=!1,l.emailVisibility=!0,l.email="test@example.com"),(!s||z.extractColumnsFromQuery((a=e==null?void 0:e.options)==null?void 0:a.query).includes("created"))&&(l.created="2022-01-01 01:00:00.123Z"),(!s||z.extractColumnsFromQuery((u=e==null?void 0:e.options)==null?void 0:u.query).includes("updated"))&&(l.updated="2022-01-01 23:59:59.456Z");for(const m of t){let _=null;m.type==="number"?_=123:m.type==="date"?_="2022-01-01 10:00:00.123Z":m.type==="bool"?_=!0:m.type==="email"?_="test@example.com":m.type==="url"?_="https://example.com":m.type==="json"?_="JSON":m.type==="file"?(_="filename.jpg",((f=m.options)==null?void 0:f.maxSelect)!==1&&(_=[_])):m.type==="select"?(_=(d=(c=m.options)==null?void 0:c.values)==null?void 0:d[0],((h=m.options)==null?void 0:h.maxSelect)!==1&&(_=[_])):m.type==="relation"?(_="RELATION_RECORD_ID",((g=m.options)==null?void 0:g.maxSelect)!==1&&(_=[_])):_="test",l[m.name]=_}return l}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"view":return"ri-table-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!z.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!z.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=z.isObject(u)&&z.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const o of e)o.type==="auth"?t.push(o):o.type==="base"?i.push(o):s.push(o);function l(o,r){return o.name>r.name?1:o.name{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],c=u.create(a,o,f);u.add(c),e(c.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.code=="KeyS"&&e.formElement&&(i.preventDefault(),i.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",i)))});const t="tinymce_last_direction";e.on("init",()=>{var s;const i=(s=window==null?void 0:window.localStorage)==null?void 0:s.getItem(t);!e.isDirty()&&e.getContent()==""&&i=="rtl"&&e.execCommand("mceDirectionRTL")}),e.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:i=>{i([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"ltr"),tinymce.activeEditor.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTL content",icon:"rtl",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"rtl"),tinymce.activeEditor.execCommand("mceDirectionRTL")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(r=z.stringifyValue(r,i),s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","slug","email","username","nickname","label","heading","message","key","identifier","id"];for(const o of l){let r=z.stringifyValue(e[o],"");if(r)return r}return i}static stringifyValue(e,t="N/A"){if(z.isEmpty(e))return t;if(typeof e=="boolean")return e?"True":"False";if(typeof e=="string")return e=e.indexOf("<")>=0?z.plainText(e):e,z.truncate(e)||t;if(Array.isArray(e))return e.join(",");if(typeof e=="object")try{return z.truncate(JSON.stringify(e))||t}catch{return t}return""+e}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.type==="view")for(let l of z.extractColumnsFromQuery(e.options.query))z.pushUnique(i,t+l);else e.type==="auth"?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)z.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,c,d;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s*\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!z.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let h of r){h=h.trim().replaceAll("{PB_TEMP}",",");const m=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(h);if((m==null?void 0:m.length)!=4)continue;const _=(c=(f=m[1])==null?void 0:f.trim())==null?void 0:c.replace(l,"");_&&t.columns.push({name:_,collate:m[2]||"",sort:((d=m[3])==null?void 0:d.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+z.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` + `),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 zo=Nn([]);function bo(n,e=4e3){return Bo(n,"info",e)}function jt(n,e=3e3){return Bo(n,"success",e)}function ls(n,e=4500){return Bo(n,"error",e)}function Dy(n,e=4500){return Bo(n,"warning",e)}function Bo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{db(i)},t)};zo.update(s=>(Da(s,i.message),z.pushOrReplaceByKey(s,i,"message"),s))}function db(n){zo.update(e=>(Da(e,n),e))}function Ea(){zo.update(n=>{for(let e of n)Da(n,e);return[]})}function Da(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=Nn({});function tn(n){Ci.set(n||{})}function di(n){Ci.update(e=>(z.deleteByPath(e,n),e))}const Aa=Nn({});function Jr(n){Aa.set(n||{})}const ii=Nn([]),$i=Nn({}),vo=Nn(!1),pb=Nn({});function Ay(n){ii.update(e=>{const t=z.findByKey(e,"id",n);return t?$i.set(t):e.length&&$i.set(e[0]),e})}function Iy(n){$i.update(e=>z.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ii.update(e=>(z.pushOrReplaceByKey(e,n,"id"),Ia(),z.sortCollections(e)))}function Ly(n){ii.update(e=>(z.removeByKey(e,"id",n.id),$i.update(t=>t.id===n.id?e[0]:t),Ia(),e))}async function Py(n=null){vo.set(!0);try{let e=await fe.collections.getFullList(200,{sort:"+name"});e=z.sortCollections(e),ii.set(e);const t=n&&z.findByKey(e,"id",n);t?$i.set(t):e.length&&$i.set(e[0]),Ia()}catch(e){fe.error(e)}vo.set(!1)}function Ia(){pb.update(n=>(ii.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 cr="pb_admin_file_token";qo.prototype.logout=function(n=!0){this.authStore.clear(),n&&Hi("/login")};qo.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&&ls(l),z.isEmpty(s.data)||tn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Hi("/")};qo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=V1(pb);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(cr)||"";return(!t||d_(t,10))&&(t&&localStorage.removeItem(cr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(cr,t),this._adminFileTokenRequest=null),t};class Fy extends p_{save(e,t){super.save(e,t),t&&!t.collectionId&&Jr(t)}clear(){super.clear(),Jr(null)}}const fe=new qo("../",new Fy("pb_admin_auth"));fe.authStore.model&&!fe.authStore.model.collectionId&&Jr(fe.authStore.model);function Ny(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=n[3].default,g=Ct(h,n,n[2],null);return{c(){e=v("div"),t=v("main"),g&&g.c(),i=O(),s=v("footer"),l=v("a"),l.innerHTML=' Docs',o=O(),r=v("span"),r.textContent="|",a=O(),u=v("a"),f=v("span"),f.textContent="PocketBase v0.17.7",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(f,"class","txt"),p(u,"href","https://github.com/pocketbase/pocketbase/releases"),p(u,"target","_blank"),p(u,"rel","noopener noreferrer"),p(u,"title","Releases"),p(s,"class","page-footer"),p(e,"class",c="page-wrapper "+n[1]),Q(e,"center-content",n[0])},m(m,_){w(m,e,_),b(e,t),g&&g.m(t,null),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(u,f),d=!0},p(m,[_]){g&&g.p&&(!d||_&4)&&Ot(g,h,m,m[2],d?Mt(h,m[2],_,null):Et(m[2]),null),(!d||_&2&&c!==(c="page-wrapper "+m[1]))&&p(e,"class",c),(!d||_&3)&&Q(e,"center-content",m[0])},i(m){d||(A(g,m),d=!0)},o(m){L(g,m),d=!1},d(m){m&&k(e),g&&g.d(m)}}}function Ry(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 Sn extends ve{constructor(e){super(),be(this,e,Ry,Ny,he,{center:0,class:1})}}function Uu(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',t=O(),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),k(t),k(i))}}}function qy(n){let e,t,i,s=!n[0]&&Uu();const l=n[1].default,o=Ct(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=O(),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=Uu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&Ot(o,l,r,r[2],i?Mt(l,r[2],a,null):Et(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 jy(n){let e,t;return e=new Sn({props:{class:"full-page",center:!0,$$slots:{default:[qy]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Hy(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 hb extends ve{constructor(e){super(),be(this,e,Hy,jy,he,{nobranding:0})}}function Uo(n){const e=n-1;return e*e*e+1}function Zr(n,{delay:e=0,duration:t=400,easing:i=kl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function pi(n,{delay:e=0,duration:t=400,easing:i=Uo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o),[c,d]=uu(s),[h,g]=uu(l);return{delay:e,duration:t,easing:i,css:(m,_)=>` + transform: ${u} translate(${(1-m)*c}${d}, ${(1-m)*h}${g}); + opacity: ${a-f*_}`}}function nt(n,{delay:e=0,duration:t=400,easing:i=Uo,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),u=s==="y"?["top","bottom"]:["left","right"],f=u.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(l[`padding${f[0]}`]),d=parseFloat(l[`padding${f[1]}`]),h=parseFloat(l[`margin${f[0]}`]),g=parseFloat(l[`margin${f[1]}`]),m=parseFloat(l[`border${f[0]}Width`]),_=parseFloat(l[`border${f[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-${u[0]}: ${y*c}px;padding-${u[1]}: ${y*d}px;margin-${u[0]}: ${y*h}px;margin-${u[1]}: ${y*g}px;border-${u[0]}-width: ${y*m}px;border-${u[1]}-width: ${y*_}px;`}}function Jt(n,{delay:e=0,duration:t=400,easing:i=Uo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` + transform: ${a} scale(${1-u*d}); + opacity: ${r-f*d} + `}}let Gr,Yi;const Xr="app-tooltip";function Wu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ni(){return Yi=Yi||document.querySelector("."+Xr),Yi||(Yi=document.createElement("div"),Yi.classList.add(Xr),document.body.appendChild(Yi)),Yi}function mb(n,e){let t=Ni();if(!t.classList.contains("active")||!(e!=null&&e.text)){Qr();return}t.textContent=e.text,t.className=Xr+" 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 Qr(){clearTimeout(Gr),Ni().classList.remove("active"),Ni().activeNode=void 0}function Vy(n,e){Ni().activeNode=n,clearTimeout(Gr),Gr=setTimeout(()=>{Ni().classList.add("active"),mb(n,e)},isNaN(e.delay)?0:e.delay)}function He(n,e){let t=Wu(e);function i(){Vy(n,t)}function s(){Qr()}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),Ni(),{update(l){var o,r;t=Wu(l),(r=(o=Ni())==null?void 0:o.activeNode)!=null&&r.contains(n)&&mb(n,t)},destroy(){var l,o;(o=(l=Ni())==null?void 0:l.activeNode)!=null&&o.contains(n)&&Qr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Yu(n,e,t){const i=n.slice();return i[12]=e[t],i}const zy=n=>({}),Ku=n=>({uniqueId:n[4]});function By(n){let e,t,i=pe(n[3]),s=[];for(let o=0;oL(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=qe(t,Jt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=qe(t,Jt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&k(e),a&&s&&s.end(),o=!1,r()}}}function Ju(n){let e,t,i=yo(n[12])+"",s,l,o,r;return{c(){e=v("div"),t=v("pre"),s=U(i),l=O(),p(e,"class","help-block help-block-error")},m(a,u){w(a,e,u),b(e,t),b(t,s),b(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=yo(a[12])+"")&&se(s,i)},i(a){r||(a&&Xe(()=>{r&&(o||(o=qe(e,nt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=qe(e,nt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&k(e),a&&o&&o.end()}}}function Wy(n){let e,t,i,s,l,o,r;const a=n[9].default,u=Ct(a,n,n[8],Ku),f=[Uy,By],c=[];function d(h,g){return h[0]&&h[3].length?0:1}return i=d(n),s=c[i]=f[i](n),{c(){e=v("div"),u&&u.c(),t=O(),s.c(),p(e,"class",n[1]),Q(e,"error",n[3].length)},m(h,g){w(h,e,g),u&&u.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(h,[g]){u&&u.p&&(!l||g&256)&&Ot(u,a,h,h[8],l?Mt(a,h[8],g,zy):Et(h[8]),Ku);let m=i;i=d(h),i===m?c[i].p(h,g):(re(),L(c[m],1,1,()=>{c[m]=null}),ae(),s=c[i],s?s.p(h,g):(s=c[i]=f[i](h),s.c()),A(s,1),s.m(e,null)),(!l||g&2)&&p(e,"class",h[1]),(!l||g&10)&&Q(e,"error",h[3].length)},i(h){l||(A(u,h),A(s),l=!0)},o(h){L(u,h),L(s),l=!1},d(h){h&&k(e),u&&u.d(h),c[i].d(),n[11](null),o=!1,r()}}}const Zu="Invalid value";function yo(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||Zu:n||Zu}function Yy(n,e,t){let i;Ye(n,Ci,m=>t(7,i=m));let{$$slots:s={},$$scope:l}=e;const o="field_"+z.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,c=[];function d(){di(r)}Zt(()=>(f.addEventListener("input",d),f.addEventListener("change",d),()=>{f.removeEventListener("input",d),f.removeEventListener("change",d)}));function h(m){Ne.call(this,n,m)}function g(m){ne[m?"unshift":"push"](()=>{f=m,t(2,f)})}return n.$$set=m=>{"name"in m&&t(5,r=m.name),"inlineError"in m&&t(0,a=m.inlineError),"class"in m&&t(1,u=m.class),"$$scope"in m&&t(8,l=m.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,c=z.toArray(z.getNestedVal(i,r)))},[a,u,f,c,o,r,d,i,l,s,h,g]}class ce extends ve{constructor(e){super(),be(this,e,Yy,Wy,he,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function Ky(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0]),l.focus(),r||(a=Y(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&oe(l,u[0])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function Jy(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Password"),s=O(),l=v("input"),r=O(),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),oe(l,n[1]),w(c,r,d),w(c,a,d),u||(f=Y(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&oe(l,c[1])},d(c){c&&(k(e),k(s),k(l),k(r),k(a)),u=!1,f()}}}function Zy(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Password confirm"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[2]),r||(a=Y(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&oe(l,u[2])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function Gy(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return s=new ce({props:{class:"form-field required",name:"email",$$slots:{default:[Ky,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[Jy,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),a=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Zy,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=O(),V(s.$$.fragment),l=O(),V(o.$$.fragment),r=O(),V(a.$$.fragment),u=O(),f=v("button"),f.innerHTML='Create and login ',p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),Q(f,"btn-disabled",n[3]),Q(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(g,m){w(g,e,m),b(e,t),b(e,i),j(s,e,null),b(e,l),j(o,e,null),b(e,r),j(a,e,null),b(e,u),b(e,f),c=!0,d||(h=Y(e,"submit",Qe(n[4])),d=!0)},p(g,[m]){const _={};m&1537&&(_.$$scope={dirty:m,ctx:g}),s.$set(_);const y={};m&1538&&(y.$$scope={dirty:m,ctx:g}),o.$set(y);const S={};m&1540&&(S.$$scope={dirty:m,ctx:g}),a.$set(S),(!c||m&8)&&Q(f,"btn-disabled",g[3]),(!c||m&8)&&Q(f,"btn-loading",g[3])},i(g){c||(A(s.$$.fragment,g),A(o.$$.fragment,g),A(a.$$.fragment,g),c=!0)},o(g){L(s.$$.fragment,g),L(o.$$.fragment,g),L(a.$$.fragment,g),c=!1},d(g){g&&k(e),H(s),H(o),H(a),d=!1,h()}}}function Xy(n,e,t){const i=wt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await fe.admins.create({email:s,password:l,passwordConfirm:o}),await fe.admins.authWithPassword(s,l),i("submit")}catch(d){fe.error(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class Qy extends ve{constructor(e){super(),be(this,e,Xy,Gy,he,{})}}function Gu(n){let e,t;return e=new hb({props:{$$slots:{default:[xy]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function xy(n){let e,t;return e=new Qy({}),e.$on("submit",n[1]),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p:x,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function ek(n){let e,t,i=n[0]&&Gu(n);return{c(){i&&i.c(),e=ke()},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=Gu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(re(),L(i,1,1,()=>{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){s&&k(e),i&&i.d(s)}}}function tk(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){fe.logout(!1),t(0,i=!0);return}fe.authStore.isValid?Hi("/collections"):fe.logout()}return[i,async()=>{t(0,i=!1),await ln(),window.location.search=""}]}class nk extends ve{constructor(e){super(),be(this,e,tk,ek,he,{})}}const At=Nn(""),ko=Nn(""),Ms=Nn(!1);function ik(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),oe(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]&&oe(e,l[7])},i:x,o:x,d(l){l&&k(e),n[13](null),i=!1,s()}}}function sk(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a,u){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=Dt(o,r(n)),ne.push(()=>de(e,"value",l)),e.$on("submit",n[10])),{c(){e&&V(e.$$.fragment),i=ke()},m(a,u){e&&j(e,a,u),w(a,i,u),s=!0},p(a,u){if(u&16&&o!==(o=a[4])){if(e){re();const f=e;L(f.$$.fragment,1,0,()=>{H(f,1)}),ae()}o?(e=Dt(o,r(a)),ne.push(()=>de(e,"value",l)),e.$on("submit",a[10]),V(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else if(o){const f={};u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],_e(()=>t=!1)),e.$set(f)}},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 Xu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Xe(()=>{i&&(t||(t=qe(e,pi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=qe(e,pi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function Qu(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Clear',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:x,i(o){i||(o&&Xe(()=>{i&&(t||(t=qe(e,pi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=qe(e,pi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function lk(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[sk,ik],h=[];function g(y,S){return y[4]&&!y[5]?0:1}l=g(n),o=h[l]=d[l](n);let m=(n[0].length||n[7].length)&&n[7]!=n[0]&&Xu(),_=(n[0].length||n[7].length)&&Qu(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=O(),o.c(),r=O(),m&&m.c(),a=O(),_&&_.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),h[l].m(e,null),b(e,r),m&&m.m(e,null),b(e,a),_&&_.m(e,null),u=!0,f||(c=[Y(e,"click",Fn(n[11])),Y(e,"submit",Qe(n[10]))],f=!0)},p(y,[S]){let T=l;l=g(y),l===T?h[l].p(y,S):(re(),L(h[T],1,1,()=>{h[T]=null}),ae(),o=h[l],o?o.p(y,S):(o=h[l]=d[l](y),o.c()),A(o,1),o.m(e,r)),(y[0].length||y[7].length)&&y[7]!=y[0]?m?S&129&&A(m,1):(m=Xu(),m.c(),A(m,1),m.m(e,a)):m&&(re(),L(m,1,1,()=>{m=null}),ae()),y[0].length||y[7].length?_?(_.p(y,S),S&129&&A(_,1)):(_=Qu(y),_.c(),A(_,1),_.m(e,null)):_&&(re(),L(_,1,1,()=>{_=null}),ae())},i(y){u||(A(o),A(m),A(_),u=!0)},o(y){L(o),L(m),L(_),u=!1},d(y){y&&k(e),h[l].d(),m&&m.d(),_&&_.d(),f=!1,Ce(c)}}}function ok(n,e,t){const i=wt(),s="search_"+z.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=z.initCollection()}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(C=!0){t(7,d=""),C&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function m(){u||f||(t(5,f=!0),t(4,u=(await ot(()=>import("./FilterAutocompleteInput-d2bb33f8.js"),["./FilterAutocompleteInput-d2bb33f8.js","./index-4841d67b.js"],import.meta.url)).default),t(5,f=!1))}Zt(()=>{m()});function _(C){Ne.call(this,n,C)}function y(C){d=C,t(7,d),t(0,l)}function S(C){ne[C?"unshift":"push"](()=>{c=C,t(6,c)})}function T(){d=this.value,t(7,d),t(0,l)}const $=()=>{h(!1),g()};return n.$$set=C=>{"value"in C&&t(0,l=C.value),"placeholder"in C&&t(1,o=C.placeholder),"autocompleteCollection"in C&&t(2,r=C.autocompleteCollection),"extraAutocompleteKeys"in C&&t(3,a=C.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,g,_,y,S,T,$]}class Wo extends ve{constructor(e){super(),be(this,e,ok,lk,he,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function rk(n){let e,t,i,s,l,o;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-refresh-line svelte-1bvelc2"),p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class",i="btn btn-transparent btn-circle "+n[1]+" svelte-1bvelc2"),Q(e,"refreshing",n[2])},m(r,a){w(r,e,a),b(e,t),l||(o=[$e(s=He.call(null,e,n[0])),Y(e,"click",n[3])],l=!0)},p(r,[a]){a&2&&i!==(i="btn btn-transparent btn-circle "+r[1]+" svelte-1bvelc2")&&p(e,"class",i),s&&It(s.update)&&a&1&&s.update.call(null,r[0]),a&6&&Q(e,"refreshing",r[2])},i:x,o:x,d(r){r&&k(e),l=!1,Ce(o)}}}function ak(n,e,t){const i=wt();let{tooltip:s={text:"Refresh",position:"right"}}=e,{class:l=""}=e,o=null;function r(){i("refresh");const a=s;t(0,s=null),clearTimeout(o),t(2,o=setTimeout(()=>{t(2,o=null),t(0,s=a)},150))}return Zt(()=>()=>clearTimeout(o)),n.$$set=a=>{"tooltip"in a&&t(0,s=a.tooltip),"class"in a&&t(1,l=a.class)},[s,l,o,r]}class Yo extends ve{constructor(e){super(),be(this,e,ak,rk,he,{tooltip:0,class:1})}}function uk(n){let e,t,i,s,l;const o=n[6].default,r=Ct(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){w(a,e,u),r&&r.m(e,null),i=!0,s||(l=[Y(e,"click",n[7]),Y(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Ot(r,o,a,a[5],i?Mt(o,a[5],u,null):Et(a[5]),null),(!i||u&4)&&p(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&Q(e,"col-sort-disabled",a[3]),(!i||u&7)&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&Q(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&Q(e,"sort-asc",a[0]==="+"+a[2])},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,Ce(l)}}}function fk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class cn extends ve{constructor(e){super(),be(this,e,fk,uk,he,{class:1,name:2,sort:0,disable:3})}}function ck(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function dk(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=U(n[2]),s=O(),l=v("div"),o=U(n[1]),r=U(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){w(a,e,u),b(e,t),b(t,i),b(e,s),b(e,l),b(l,o),b(l,r)},p(a,u){u&4&&se(i,a[2]),u&2&&se(o,a[1])},d(a){a&&k(e)}}}function pk(n){let e;function t(l,o){return l[0]?dk:ck}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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:x,o:x,d(l){l&&k(e),s.d(l)}}}function hk(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Ti extends ve{constructor(e){super(),be(this,e,hk,pk,he,{date:0})}}const mk=n=>({}),xu=n=>({}),gk=n=>({}),ef=n=>({});function _k(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ct(u,n,n[4],ef),c=n[5].default,d=Ct(c,n,n[4],null),h=n[5].after,g=Ct(h,n,n[4],xu);return{c(){e=v("div"),f&&f.c(),t=O(),i=v("div"),d&&d.c(),l=O(),g&&g.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(m,_){w(m,e,_),f&&f.m(e,null),b(e,t),b(e,i),d&&d.m(i,null),n[6](i),b(e,l),g&&g.m(e,null),o=!0,r||(a=[Y(window,"resize",n[1]),Y(i,"scroll",n[1])],r=!0)},p(m,[_]){f&&f.p&&(!o||_&16)&&Ot(f,u,m,m[4],o?Mt(u,m[4],_,gk):Et(m[4]),ef),d&&d.p&&(!o||_&16)&&Ot(d,c,m,m[4],o?Mt(c,m[4],_,null):Et(m[4]),null),(!o||_&9&&s!==(s="horizontal-scroller "+m[0]+" "+m[3]+" svelte-wc2j9h"))&&p(i,"class",s),g&&g.p&&(!o||_&16)&&Ot(g,h,m,m[4],o?Mt(h,m[4],_,mk):Et(m[4]),xu)},i(m){o||(A(f,m),A(d,m),A(g,m),o=!0)},o(m){L(f,m),L(d,m),L(g,m),o=!1},d(m){m&&k(e),f&&f.d(m),d&&d.d(m),n[6](null),g&&g.d(m),r=!1,Ce(a)}}}function bk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,h=o.scrollWidth;h-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==h&&t(3,r+=" scroll-end")):t(3,r="")},100))}Zt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){ne[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class La extends ve{constructor(e){super(),be(this,e,bk,_k,he,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function tf(n,e,t){const i=n.slice();return i[23]=e[t],i}function vk(n){let e;return{c(){e=v("div"),e.innerHTML=' Method',p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function yk(n){let e;return{c(){e=v("div"),e.innerHTML=` URL`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function kk(n){let e;return{c(){e=v("div"),e.innerHTML=` Referer`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function wk(n){let e;return{c(){e=v("div"),e.innerHTML=` User IP`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Sk(n){let e;return{c(){e=v("div"),e.innerHTML=` Status`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function $k(n){let e;return{c(){e=v("div"),e.innerHTML=` Created`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function nf(n){let e;function t(l,o){return l[6]?Ck:Tk}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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){l&&k(e),s.d(l)}}}function Tk(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&sf(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=sf(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function Ck(n){let e;return{c(){e=v("tr"),e.innerHTML=' '},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function sf(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[19]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function lf(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 of(n,e){var Me,Ze,bt;let t,i,s,l=((Me=e[23].method)==null?void 0:Me.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,h,g,m,_,y,S=(e[23].referer||"N/A")+"",T,$,C,M,E,D=(e[23].userIp||"N/A")+"",I,P,F,N,R,q=e[23].status+"",B,K,J,X,G,ue,ee,te,Ee,Fe,Ve=(((Ze=e[23].meta)==null?void 0:Ze.errorMessage)||((bt=e[23].meta)==null?void 0:bt.errorData))&&lf();X=new Ti({props:{date:e[23].created}});function ze(){return e[17](e[23])}function Se(...Ge){return e[18](e[23],...Ge)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=U(l),a=O(),u=v("td"),f=v("span"),d=U(c),g=O(),Ve&&Ve.c(),m=O(),_=v("td"),y=v("span"),T=U(S),C=O(),M=v("td"),E=v("span"),I=U(D),F=O(),N=v("td"),R=v("span"),B=U(q),K=O(),J=v("td"),V(X.$$.fragment),G=O(),ue=v("td"),ue.innerHTML='',ee=O(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",$=e[23].referer),Q(y,"txt-hint",!e[23].referer),p(_,"class","col-type-text col-field-referer"),p(E,"class","txt txt-ellipsis"),p(E,"title",P=e[23].userIp),Q(E,"txt-hint",!e[23].userIp),p(M,"class","col-type-number col-field-userIp"),p(R,"class","label"),Q(R,"label-danger",e[23].status>=400),p(N,"class","col-type-number col-field-status"),p(J,"class","col-type-date col-field-created"),p(ue,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Ge,Ke){w(Ge,t,Ke),b(t,i),b(i,s),b(s,o),b(t,a),b(t,u),b(u,f),b(f,d),b(u,g),Ve&&Ve.m(u,null),b(t,m),b(t,_),b(_,y),b(y,T),b(t,C),b(t,M),b(M,E),b(E,I),b(t,F),b(t,N),b(N,R),b(R,B),b(t,K),b(t,J),j(X,J,null),b(t,G),b(t,ue),b(t,ee),te=!0,Ee||(Fe=[Y(t,"click",ze),Y(t,"keydown",Se)],Ee=!0)},p(Ge,Ke){var me,ye,Je;e=Ge,(!te||Ke&8)&&l!==(l=((me=e[23].method)==null?void 0:me.toUpperCase())+"")&&se(o,l),(!te||Ke&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!te||Ke&8)&&c!==(c=e[23].url+"")&&se(d,c),(!te||Ke&8&&h!==(h=e[23].url))&&p(f,"title",h),(ye=e[23].meta)!=null&&ye.errorMessage||(Je=e[23].meta)!=null&&Je.errorData?Ve||(Ve=lf(),Ve.c(),Ve.m(u,null)):Ve&&(Ve.d(1),Ve=null),(!te||Ke&8)&&S!==(S=(e[23].referer||"N/A")+"")&&se(T,S),(!te||Ke&8&&$!==($=e[23].referer))&&p(y,"title",$),(!te||Ke&8)&&Q(y,"txt-hint",!e[23].referer),(!te||Ke&8)&&D!==(D=(e[23].userIp||"N/A")+"")&&se(I,D),(!te||Ke&8&&P!==(P=e[23].userIp))&&p(E,"title",P),(!te||Ke&8)&&Q(E,"txt-hint",!e[23].userIp),(!te||Ke&8)&&q!==(q=e[23].status+"")&&se(B,q),(!te||Ke&8)&&Q(R,"label-danger",e[23].status>=400);const $t={};Ke&8&&($t.date=e[23].created),X.$set($t)},i(Ge){te||(A(X.$$.fragment,Ge),te=!0)},o(Ge){L(X.$$.fragment,Ge),te=!1},d(Ge){Ge&&k(t),Ve&&Ve.d(),H(X),Ee=!1,Ce(Fe)}}}function Mk(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M,E,D,I=[],P=new Map,F;function N(Se){n[11](Se)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[vk]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new cn({props:R}),ne.push(()=>de(s,"sort",N));function q(Se){n[12](Se)}let B={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[yk]},$$scope:{ctx:n}};n[1]!==void 0&&(B.sort=n[1]),r=new cn({props:B}),ne.push(()=>de(r,"sort",q));function K(Se){n[13](Se)}let J={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[kk]},$$scope:{ctx:n}};n[1]!==void 0&&(J.sort=n[1]),f=new cn({props:J}),ne.push(()=>de(f,"sort",K));function X(Se){n[14](Se)}let G={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[wk]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),h=new cn({props:G}),ne.push(()=>de(h,"sort",X));function ue(Se){n[15](Se)}let ee={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Sk]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),_=new cn({props:ee}),ne.push(()=>de(_,"sort",ue));function te(Se){n[16](Se)}let Ee={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[$k]},$$scope:{ctx:n}};n[1]!==void 0&&(Ee.sort=n[1]),T=new cn({props:Ee}),ne.push(()=>de(T,"sort",te));let Fe=pe(n[3]);const Ve=Se=>Se[23].id;for(let Se=0;Sel=!1)),s.$set(Ze);const bt={};Me&67108864&&(bt.$$scope={dirty:Me,ctx:Se}),!a&&Me&2&&(a=!0,bt.sort=Se[1],_e(()=>a=!1)),r.$set(bt);const Ge={};Me&67108864&&(Ge.$$scope={dirty:Me,ctx:Se}),!c&&Me&2&&(c=!0,Ge.sort=Se[1],_e(()=>c=!1)),f.$set(Ge);const Ke={};Me&67108864&&(Ke.$$scope={dirty:Me,ctx:Se}),!g&&Me&2&&(g=!0,Ke.sort=Se[1],_e(()=>g=!1)),h.$set(Ke);const $t={};Me&67108864&&($t.$$scope={dirty:Me,ctx:Se}),!y&&Me&2&&(y=!0,$t.sort=Se[1],_e(()=>y=!1)),_.$set($t);const me={};Me&67108864&&(me.$$scope={dirty:Me,ctx:Se}),!$&&Me&2&&($=!0,me.sort=Se[1],_e(()=>$=!1)),T.$set(me),Me&841&&(Fe=pe(Se[3]),re(),I=yt(I,Me,Ve,1,Se,Fe,P,D,Ut,of,null,tf),ae(),!Fe.length&&ze?ze.p(Se,Me):Fe.length?ze&&(ze.d(1),ze=null):(ze=nf(Se),ze.c(),ze.m(D,null))),(!F||Me&64)&&Q(e,"table-loading",Se[6])},i(Se){if(!F){A(s.$$.fragment,Se),A(r.$$.fragment,Se),A(f.$$.fragment,Se),A(h.$$.fragment,Se),A(_.$$.fragment,Se),A(T.$$.fragment,Se);for(let Me=0;Me{if(P<=1&&m(),t(6,d=!1),t(5,f=N.page),t(4,c=N.totalItems),s("load",u.concat(N.items)),F){const R=++h;for(;N.items.length&&h==R;)t(3,u=u.concat(N.items.splice(0,10))),await z.yieldToMain()}else t(3,u=u.concat(N.items))}).catch(N=>{N!=null&&N.isAbort||(t(6,d=!1),console.warn(N),m(),fe.error(N,(N==null?void 0:N.status)!=400))})}function m(){t(3,u=[]),t(5,f=1),t(4,c=0)}function _(P){a=P,t(1,a)}function y(P){a=P,t(1,a)}function S(P){a=P,t(1,a)}function T(P){a=P,t(1,a)}function $(P){a=P,t(1,a)}function C(P){a=P,t(1,a)}const M=P=>s("select",P),E=(P,F)=>{F.code==="Enter"&&(F.preventDefault(),s("select",P))},D=()=>t(0,o=""),I=()=>g(f+1);return n.$$set=P=>{"filter"in P&&t(0,o=P.filter),"presets"in P&&t(10,r=P.presets),"sort"in P&&t(1,a=P.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(m(),g(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,g,u,c,f,d,i,s,l,r,_,y,S,T,$,C,M,E,D,I]}class Dk extends ve{constructor(e){super(),be(this,e,Ek,Ok,he,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! + * Chart.js v3.9.1 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + */function gi(){}const Ak=function(){let n=0;return function(){return n++}}();function pt(n){return n===null||typeof n>"u"}function Tt(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function tt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Bt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function Hn(n,e){return Bt(n)?n:e}function st(n,e){return typeof n>"u"?e:n}const Ik=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,gb=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function qt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function gt(n,e,t,i){let s,l,o;if(Tt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function qi(n,e){return(uf[e]||(uf[e]=Fk(e)))(n)}function Fk(n){const e=Nk(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Nk(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function Pa(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Jn=n=>typeof n<"u",ji=n=>typeof n=="function",ff=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function Rk(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Vt=Math.PI,vt=2*Vt,qk=vt+Vt,$o=Number.POSITIVE_INFINITY,jk=Vt/180,Ht=Vt/2,Ws=Vt/4,cf=Vt*2/3,Wn=Math.log10,fi=Math.sign;function df(n){const e=Math.round(n);n=ll(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Wn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function Hk(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function Os(n){return!isNaN(parseFloat(n))&&isFinite(n)}function ll(n,e,t){return Math.abs(n-e)=n}function bb(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&u=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Na(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const es=(n,e,t,i)=>Na(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Na(n,t,i=>n[i][e]>=t);function Wk(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+Pa(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function hf(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(yb.forEach(l=>{delete n[l]}),delete n._chartjs)}function kb(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function Sb(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,wb.call(window,()=>{s=!1,n.apply(e,l)}))}}function Kk(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Jk=n=>n==="start"?"left":n==="end"?"right":"center",mf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function $b(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:u,max:f,minDefined:c,maxDefined:d}=o.getUserBounds();c&&(s=dn(Math.min(es(r,o.axis,u).lo,t?i:es(e,a,o.getPixelForValue(u)).lo),0,i-1)),d?l=dn(Math.max(es(r,o.axis,f,!0).hi+1,t?0:es(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function Tb(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Vl=n=>n===0||n===1,gf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*vt/t)),_f=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*vt/t)+1,ol={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Ht)+1,easeOutSine:n=>Math.sin(n*Ht),easeInOutSine:n=>-.5*(Math.cos(Vt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Vl(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Vl(n)?n:gf(n,.075,.3),easeOutElastic:n=>Vl(n)?n:_f(n,.075,.3),easeInOutElastic(n){return Vl(n)?n:n<.5?.5*gf(n*2,.1125,.45):.5+.5*_f(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-ol.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ol.easeInBounce(n*2)*.5:ol.easeOutBounce(n*2-1)*.5+.5};/*! + * @kurkle/color v0.2.1 + * https://github.com/kurkle/color#readme + * (c) 2022 Jukka Kurkela + * Released under the MIT License + */function Ml(n){return n+.5|0}const Li=(n,e,t)=>Math.max(Math.min(n,t),e);function el(n){return Li(Ml(n*2.55),0,255)}function Ri(n){return Li(Ml(n*255),0,255)}function vi(n){return Li(Ml(n/2.55)/100,0,1)}function bf(n){return Li(Ml(n*100),0,100)}const jn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ea=[..."0123456789ABCDEF"],Zk=n=>ea[n&15],Gk=n=>ea[(n&240)>>4]+ea[n&15],zl=n=>(n&240)>>4===(n&15),Xk=n=>zl(n.r)&&zl(n.g)&&zl(n.b)&&zl(n.a);function Qk(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&jn[n[1]]*17,g:255&jn[n[2]]*17,b:255&jn[n[3]]*17,a:e===5?jn[n[4]]*17:255}:(e===7||e===9)&&(t={r:jn[n[1]]<<4|jn[n[2]],g:jn[n[3]]<<4|jn[n[4]],b:jn[n[5]]<<4|jn[n[6]],a:e===9?jn[n[7]]<<4|jn[n[8]]:255})),t}const xk=(n,e)=>n<255?e(n):"";function e2(n){var e=Xk(n)?Zk:Gk;return n?"#"+e(n.r)+e(n.g)+e(n.b)+xk(n.a,e):void 0}const t2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Cb(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function n2(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function i2(n,e,t){const i=Cb(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function s2(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=s2(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function qa(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Ri)}function ja(n,e,t){return qa(Cb,n,e,t)}function l2(n,e,t){return qa(i2,n,e,t)}function o2(n,e,t){return qa(n2,n,e,t)}function Mb(n){return(n%360+360)%360}function r2(n){const e=t2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?el(+e[5]):Ri(+e[5]));const s=Mb(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=l2(s,l,o):e[1]==="hsv"?i=o2(s,l,o):i=ja(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function a2(n,e){var t=Ra(n);t[0]=Mb(t[0]+e),t=ja(t),n.r=t[0],n.g=t[1],n.b=t[2]}function u2(n){if(!n)return;const e=Ra(n),t=e[0],i=bf(e[1]),s=bf(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${vi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const vf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},yf={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function f2(){const n={},e=Object.keys(yf),t=Object.keys(vf);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Bl;function c2(n){Bl||(Bl=f2(),Bl.transparent=[0,0,0,0]);const e=Bl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const d2=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function p2(n){const e=d2.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?el(o):Li(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?el(i):Li(i,0,255)),s=255&(e[4]?el(s):Li(s,0,255)),l=255&(e[6]?el(l):Li(l,0,255)),{r:i,g:s,b:l,a:t}}}function h2(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${vi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const dr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,ms=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function m2(n,e,t){const i=ms(vi(n.r)),s=ms(vi(n.g)),l=ms(vi(n.b));return{r:Ri(dr(i+t*(ms(vi(e.r))-i))),g:Ri(dr(s+t*(ms(vi(e.g))-s))),b:Ri(dr(l+t*(ms(vi(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Ul(n,e,t){if(n){let i=Ra(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=ja(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Ob(n,e){return n&&Object.assign(e||{},n)}function kf(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=Ri(n[3]))):(e=Ob(n,{r:0,g:0,b:0,a:1}),e.a=Ri(e.a)),e}function g2(n){return n.charAt(0)==="r"?p2(n):r2(n)}class To{constructor(e){if(e instanceof To)return e;const t=typeof e;let i;t==="object"?i=kf(e):t==="string"&&(i=Qk(e)||c2(e)||g2(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Ob(this._rgb);return e&&(e.a=vi(e.a)),e}set rgb(e){this._rgb=kf(e)}rgbString(){return this._valid?h2(this._rgb):void 0}hexString(){return this._valid?e2(this._rgb):void 0}hslString(){return this._valid?u2(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,u=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-u,i.r=255&u*i.r+l*s.r+.5,i.g=255&u*i.g+l*s.g+.5,i.b=255&u*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=m2(this._rgb,e._rgb,t)),this}clone(){return new To(this.rgb)}alpha(e){return this._rgb.a=Ri(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Ml(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ul(this._rgb,2,e),this}darken(e){return Ul(this._rgb,2,-e),this}saturate(e){return Ul(this._rgb,1,e),this}desaturate(e){return Ul(this._rgb,1,-e),this}rotate(e){return a2(this._rgb,e),this}}function Eb(n){return new To(n)}function Db(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function wf(n){return Db(n)?n:Eb(n)}function pr(n){return Db(n)?n:Eb(n).saturate(.5).darken(.1).hexString()}const os=Object.create(null),ta=Object.create(null);function rl(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>pr(i.backgroundColor),this.hoverBorderColor=(t,i)=>pr(i.borderColor),this.hoverColor=(t,i)=>pr(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return hr(this,e,t)}get(e){return rl(this,e)}describe(e,t){return hr(ta,e,t)}override(e,t){return hr(os,e,t)}route(e,t,i,s){const l=rl(this,e),o=rl(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],u=o[s];return tt(a)?Object.assign({},u,a):st(a,u)},set(a){this[r]=a}}})}}var lt=new _2({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function b2(n){return!n||pt(n.size)||pt(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Co(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function v2(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,u,f,c,d;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function gl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,S2(n,l),a=0;a+n||0;function za(n,e){const t={},i=tt(e),s=i?Object.keys(e):e,l=tt(n)?i?o=>st(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=O2(l(o));return t}function Ab(n){return za(n,{top:"y",right:"x",bottom:"y",left:"x"})}function ws(n){return za(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Zn(n){const e=Ab(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ln(n,e){n=n||{},e=e||lt.font;let t=st(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=st(n.style,e.style);i&&!(""+i).match(C2)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:st(n.family,e.family),lineHeight:M2(st(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:st(n.weight,e.weight),string:""};return s.string=b2(s),s}function Wl(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function Vi(n,e){return Object.assign(Object.create(n),e)}function Ba(n,e=[""],t=n,i,s=()=>n[0]){Jn(i)||(i=Fb("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Ba([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return Lb(o,r,()=>R2(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return Tf(o).includes(r)},ownKeys(o){return Tf(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Es(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:Ib(n,i),setContext:l=>Es(n,l,t,i),override:l=>Es(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return Lb(l,o,()=>A2(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function Ib(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:ji(t)?t:()=>t,isIndexable:ji(i)?i:()=>i}}const D2=(n,e)=>n?n+Pa(e):e,Ua=(n,e)=>tt(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Lb(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function A2(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return ji(r)&&o.isScriptable(e)&&(r=I2(e,r,n,t)),Tt(r)&&r.length&&(r=L2(e,r,n,o.isIndexable)),Ua(e,r)&&(r=Es(r,s,l&&l[e],o)),r}function I2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),Ua(n,e)&&(e=Wa(s._scopes,s,n,e)),e}function L2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(Jn(l.index)&&i(n))e=e[l.index%e.length];else if(tt(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Wa(u,s,n,f);e.push(Es(c,l,o&&o[n],r))}}return e}function Pb(n,e,t){return ji(n)?n(e,t):n}const P2=(n,e)=>n===!0?e:typeof n=="string"?qi(e,n):void 0;function F2(n,e,t,i,s){for(const l of e){const o=P2(t,l);if(o){n.add(o);const r=Pb(o._fallback,t,s);if(Jn(r)&&r!==t&&r!==i)return r}else if(o===!1&&Jn(i)&&t!==i)return null}return!1}function Wa(n,e,t,i){const s=e._rootScopes,l=Pb(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=$f(r,o,t,l||t,i);return a===null||Jn(l)&&l!==t&&(a=$f(r,o,l,a,i),a===null)?!1:Ba(Array.from(r),[""],s,l,()=>N2(e,t,i))}function $f(n,e,t,i,s){for(;t;)t=F2(n,e,t,i,s);return t}function N2(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return Tt(s)&&tt(t)?t:s}function R2(n,e,t,i){let s;for(const l of e)if(s=Fb(D2(l,n),t),Jn(s))return Ua(n,s)?Wa(t,i,n,s):s}function Fb(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Jn(i))return i}}function Tf(n){let e=n._keys;return e||(e=n._keys=q2(n._scopes)),e}function q2(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function Nb(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,u,f;for(r=0,a=i;ren==="x"?"y":"x";function H2(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=xr(l,s),a=xr(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const c=i*u,d=i*f;return{previous:{x:l.x-c*(o.x-s.x),y:l.y-c*(o.y-s.y)},next:{x:l.x+d*(o.x-s.x),y:l.y+d*(o.y-s.y)}}}function V2(n,e,t){const i=n.length;let s,l,o,r,a,u=Ds(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")B2(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Y2(n,e){return Ko(n).getPropertyValue(e)}const K2=["top","right","bottom","left"];function is(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=K2[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const J2=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Z2(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(J2(s,l,n.target))r=s,a=l;else{const u=e.getBoundingClientRect();r=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:r,y:a,box:o}}function Xi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Ko(t),l=s.boxSizing==="border-box",o=is(s,"padding"),r=is(s,"border","width"),{x:a,y:u,box:f}=Z2(n,t),c=o.left+(f&&r.left),d=o.top+(f&&r.top);let{width:h,height:g}=e;return l&&(h-=o.width+r.width,g-=o.height+r.height),{x:Math.round((a-c)/h*t.width/i),y:Math.round((u-d)/g*t.height/i)}}function G2(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Ya(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Ko(l),a=is(r,"border","width"),u=is(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Eo(r.maxWidth,l,"clientWidth"),s=Eo(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||$o,maxHeight:s||$o}}const mr=n=>Math.round(n*10)/10;function X2(n,e,t,i){const s=Ko(n),l=is(s,"margin"),o=Eo(s.maxWidth,n,"clientWidth")||$o,r=Eo(s.maxHeight,n,"clientHeight")||$o,a=G2(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=is(s,"border","width"),d=is(s,"padding");u-=d.width+c.width,f-=d.height+c.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=mr(Math.min(u,o,a.maxWidth)),f=mr(Math.min(f,r,a.maxHeight)),u&&!f&&(f=mr(u/2)),{width:u,height:f}}function Cf(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Q2=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function Mf(n,e){const t=Y2(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Qi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function x2(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function ew(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=Qi(n,s,t),r=Qi(s,l,t),a=Qi(l,e,t),u=Qi(o,r,t),f=Qi(r,a,t);return Qi(u,f,t)}const Of=new Map;function tw(n,e){e=e||{};const t=n+JSON.stringify(e);let i=Of.get(t);return i||(i=new Intl.NumberFormat(n,e),Of.set(t,i)),i}function Ol(n,e,t){return tw(e,t).format(n)}const nw=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},iw=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function gr(n,e,t){return n?nw(e,t):iw()}function sw(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function lw(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function jb(n){return n==="angle"?{between:hl,compare:zk,normalize:In}:{between:ml,compare:(e,t)=>e-t,normalize:e=>e}}function Ef({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function ow(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=jb(i),a=e.length;let{start:u,end:f,loop:c}=n,d,h;if(c){for(u+=a,f+=a,d=0,h=a;da(s,T,y)&&r(s,T)!==0,C=()=>r(l,y)===0||a(l,T,y),M=()=>m||$(),E=()=>!m||C();for(let D=f,I=f;D<=c;++D)S=e[D%o],!S.skip&&(y=u(S[i]),y!==T&&(m=a(y,s,l),_===null&&M()&&(_=r(y,s)===0?D:I),_!==null&&E()&&(g.push(Ef({start:_,end:D,loop:d,count:o,style:h})),_=null),I=D,T=y));return _!==null&&g.push(Ef({start:_,end:c,loop:d,count:o,style:h})),g}function Vb(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function aw(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=u.stop?a:null):(o=a,r.skip&&(e=a)),r=u}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function uw(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=rw(t,s,l,i);if(i===!0)return Df(n,[{start:o,end:r,loop:l}],t,e);const a=rr({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=wb.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 dw;const If="transparent",pw={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=wf(n||If),s=i.valid&&wf(e||If);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class hw{constructor(e,t,i,s){const l=t[i];s=Wl([e.to,s,l,e.from]);const o=Wl([e.from,l,s]);this._active=!0,this._fn=e.fn||pw[e.type||typeof o],this._easing=ol[e.easing]||ol.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=Wl([e.to,t,s,e.from]),this._from=Wl([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||t1?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;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});lt.set("animations",{colors:{type:"color",properties:gw},numbers:{type:"number",properties:mw}});lt.describe("animations",{_fallback:"animation"});lt.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 zb{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!tt(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!tt(s))return;const l={};for(const o of _w)l[o]=s[o];(Tt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=vw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&bw(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new hw(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return _i.add(this._chart,i),!0}}function bw(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Rf(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,u=o.axis,f=Sw(l,o,i),c=e.length;let d;for(let h=0;ht[i].axis===e).shift()}function Cw(n,e){return Vi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Mw(n,e,t){return Vi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Ys(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const br=n=>n==="reset"||n==="none",qf=(n,e)=>e?n:Object.assign({},n),Ow=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:Bb(t,!0),values:null};class si{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Ff(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Ys(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,h,g)=>c==="x"?d:c==="r"?g:h,l=t.xAxisID=st(i.xAxisID,_r(e,"x")),o=t.yAxisID=st(i.yAxisID,_r(e,"y")),r=t.rAxisID=st(i.rAxisID,_r(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,o,r),f=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&hf(this._data,this),e._stacked&&Ys(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(tt(t))this._data=ww(t);else if(i!==t){if(i){hf(i,this);const s=this._cachedMeta;Ys(s),s._parsed=[]}t&&Object.isExtensible(t)&&Yk(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=Ff(t.vScale,t),t.stack!==i.stack&&(s=!0,Ys(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Rf(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,u=e>0&&i._parsed[e-1],f,c,d;if(this._parsing===!1)i._parsed=s,i._sorted=!0,d=s;else{Tt(s[e])?d=this.parseArrayData(i,s,e,t):tt(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const h=()=>c[r]===null||u&&c[r]m||c=0;--d)if(!g()){this.updateRangeFromParsed(u,e,h,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),m=u.resolveNamedOptions(d,h,g,c);return m.$shared&&(m.$shared=a,l[o]=Object.freeze(qf(m,a))),m}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const f=this.chart.config,c=f.datasetAnimationScopeKeys(this._type,t),d=f.getOptionScopes(this.getDataset(),c);a=f.createResolver(d,this.getContext(e,i,t))}const u=new zb(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||br(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){br(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!br(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,u]of this._syncList)this[r](a,u);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(u.length+=t,r=u.length-1;r>=o;r--)u[r]=u[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function Dw(n){const e=n.iScale,t=Ew(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(Jn(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,u=o),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:o,max:r}}function Ub(n,e,t,i){return Tt(n)?Lw(n,e,t,i):e[t.axis]=t.parse(n,i),e}function jf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,c,d;for(u=t,f=t+i;u=t?1:-1)}function Fw(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const u=a.controller.getParsed(t),f=u&&u[a.vScale.axis];if(pt(f)||isNaN(f))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:u}=this._getSharedOptions(t,s),f=o.axis,c=r.axis;for(let d=t;dhl(T,r,a,!0)?1:Math.max($,$*t,C,C*t),g=(T,$,C)=>hl(T,r,a,!0)?-1:Math.min($,$*t,C,C*t),m=h(0,u,c),_=h(Ht,f,d),y=g(Vt,u,c),S=g(Vt+Ht,f,d);i=(m-y)/2,s=(_-S)/2,l=-(m+y)/2,o=-(_+S)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class El extends si{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(tt(i[e])){const{key:a="value"}=this._parsing;l=u=>+qi(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?vt*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Ol(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};El.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return Tt(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Jo extends si{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=$b(t,s,o);this._drawStart=r,this._drawCount=a,Tb(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:c}=this._getSharedOptions(t,s),d=o.axis,h=r.axis,{spanGaps:g,segment:m}=this.options,_=Os(g)?g:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||l||s==="none";let S=t>0&&this.getParsed(t-1);for(let T=t;T0&&Math.abs(C[d]-S[d])>_,m&&(M.parsed=C,M.raw=u.data[T]),c&&(M.options=f||this.resolveDataElementOptions(T,$.active?"active":s)),y||this.updateElement($,T,M,s),S=C}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Jo.id="line";Jo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Jo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Za extends si{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Ol(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return Nb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,c=u.yCenter,d=u.getIndexAngle(0)-.5*Vt;let h=d,g;const m=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?ti(this.resolveDataElementOptions(e,t).angle||i):0}}Za.id="polarArea";Za.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Za.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Wb extends El{}Wb.id="pie";Wb.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Ga extends si{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return Nb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}};Mi.defaults={};Mi.defaultRoutes=void 0;const Yb={values(n){return Tt(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),l=Hw(n,t)}const o=Wn(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),Ol(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Wn(n)));return i===1||i===2||i===5?Yb.numeric.call(this,n,e,t):""}};function Hw(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Zo={formatters:Yb};lt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Zo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});lt.route("scale.ticks","color","","color");lt.route("scale.grid","color","","borderColor");lt.route("scale.grid","borderColor","","borderColor");lt.route("scale.title","color","","color");lt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});lt.describe("scales",{_fallback:"scale"});lt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function Vw(n,e){const t=n.options.ticks,i=t.maxTicksLimit||zw(n),s=t.major.enabled?Uw(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return Ww(e,a,s,l/i),a;const u=Bw(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Kl(e,a,u,pt(d)?0:o-d,o),f=0,c=l-1;fs)return a}return Math.max(s,1)}function Uw(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,zf=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Bf(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function Zw(n,e){gt(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:Hn(t,Hn(i,t)),max:Hn(i,Hn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){qt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=E2(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),c=f.widest.width,d=f.highest.height,h=dn(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:h/(i-1),c+6>r&&(r=h/(i-(e.offset?.5:1)),a=this.maxHeight-Ks(e.grid)-t.padding-Uf(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),o=Fa(Math.min(Math.asin(dn((f.highest.height+6)/r,-1,1)),Math.asin(dn(a/u,-1,1))-Math.asin(dn(d/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){qt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){qt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Uf(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Ks(l)+a):(e.height=this.maxHeight,e.width=Ks(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),h=i.padding*2,g=ti(this.labelRotation),m=Math.cos(g),_=Math.sin(g);if(r){const y=i.mirror?0:_*c.width+m*d.height;e.height=Math.min(this.maxHeight,e.height+y+h)}else{const y=i.mirror?0:m*c.width+_*d.height;e.width=Math.min(this.maxWidth,e.width+y+h)}this._calculatePadding(u,f,_,m)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,u=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;a?u?(d=s*e.width,h=i*t.height):(d=i*e.height,h=s*t.width):l==="start"?h=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,h=t.width/2),this.paddingLeft=Math.max((d-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((h-c+o)*this.width/(this.width-c),0)}else{let f=t.height/2,c=e.height/2;l==="start"?(f=0,c=e.height):l==="end"&&(f=t.height,c=0),this.paddingTop=f+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){qt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[E]||0,height:o[E]||0});return{first:M(0),last:M(t-1),widest:M($),highest:M(C),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Bk(this._alignToPixels?Ki(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),f=this.ticks.length+(r?1:0),c=Ks(l),d=[],h=l.setContext(this.getContext()),g=h.drawBorder?h.borderWidth:0,m=g/2,_=function(B){return Ki(i,B,g)};let y,S,T,$,C,M,E,D,I,P,F,N;if(o==="top")y=_(this.bottom),M=this.bottom-c,D=y-m,P=_(e.top)+m,N=e.bottom;else if(o==="bottom")y=_(this.top),P=e.top,N=_(e.bottom)-m,M=y+m,D=this.top+c;else if(o==="left")y=_(this.right),C=this.right-c,E=y-m,I=_(e.left)+m,F=e.right;else if(o==="right")y=_(this.left),I=e.left,F=_(e.right)-m,C=y+m,E=this.left+c;else if(t==="x"){if(o==="center")y=_((e.top+e.bottom)/2+.5);else if(tt(o)){const B=Object.keys(o)[0],K=o[B];y=_(this.chart.scales[B].getPixelForValue(K))}P=e.top,N=e.bottom,M=y+m,D=M+c}else if(t==="y"){if(o==="center")y=_((e.left+e.right)/2);else if(tt(o)){const B=Object.keys(o)[0],K=o[B];y=_(this.chart.scales[B].getPixelForValue(K))}C=y-m,E=C-c,I=e.left,F=e.right}const R=st(s.ticks.maxTicksLimit,f),q=Math.max(1,Math.ceil(f/R));for(S=0;Sl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");lt.route(l,s,a,r)})}function n3(n){return"id"in n&&"defaults"in n}class i3{constructor(){this.controllers=new Jl(si,"datasets",!0),this.elements=new Jl(Mi,"elements"),this.plugins=new Jl(Object,"plugins"),this.scales=new Jl(fs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):gt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=Pa(e);qt(i["before"+s],[],i),t[e](i),qt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let $=t;$0&&Math.abs(M[h]-T[h])>y,_&&(E.parsed=M,E.raw=u.data[$]),d&&(E.options=c||this.resolveDataElementOptions($,C.active?"active":s)),S||this.updateElement(C,$,E,s),T=M}this.updateSharedOptions(c,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}Xa.id="scatter";Xa.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Xa.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Ji(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ia{constructor(e){this.options=e||{}}init(e){}formats(){return Ji()}parse(e,t){return Ji()}format(e,t){return Ji()}add(e,t,i){return Ji()}diff(e,t,i){return Ji()}startOf(e,t,i){return Ji()}endOf(e,t){return Ji()}}ia.override=function(n){Object.assign(ia.prototype,n)};var Kb={_date:ia};function s3(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?Uk:es;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const c=a(l,e,t-f),d=a(l,e,t+f);return{lo:c.lo,hi:d.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Dl(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var a3={evaluateInteractionItems:Dl,modes:{index(n,e,t,i){const s=Xi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?yr(n,s,l,i,o):kr(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,c=u.data[f];c&&!c.skip&&a.push({element:c,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=Xi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?yr(n,s,l,i,o):kr(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,u=n.getDatasetMeta(a).data;r=[];for(let f=0;ft.pos===e)}function Yf(n,e){return n.filter(t=>Jb.indexOf(t.pos)===-1&&t.box.axis===e)}function Zs(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function u3(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Zs(Js(e,"left"),!0),s=Zs(Js(e,"right")),l=Zs(Js(e,"top"),!0),o=Zs(Js(e,"bottom")),r=Yf(e,"x"),a=Yf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Js(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Kf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function Zb(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function p3(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!tt(s)){t.size&&(n[s]-=t.size);const c=i[t.stack]||{size:0,count:1};c.size=Math.max(c.size,t.horizontal?l.height:l.width),t.size=c.size/c.count,n[s]+=t.size}l.getPadding&&Zb(o,l.getPadding());const r=Math.max(0,e.outerWidth-Kf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Kf(o,n,"top","bottom")),u=r!==n.w,f=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function h3(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function m3(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function tl(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof m.beforeLayout=="function"&&m.beforeLayout()});const f=a.reduce((m,_)=>_.box.options&&_.box.options.display===!1?m:m+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),d=Object.assign({},s);Zb(d,Zn(i));const h=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),g=c3(a.concat(u),c);tl(r.fullSize,h,c,g),tl(a,h,c,g),tl(u,h,c,g)&&tl(a,h,c,g),h3(h),Jf(r.leftAndTop,h,c,g),h.x+=h.w,h.y+=h.h,Jf(r.rightAndBottom,h,c,g),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},gt(r.chartArea,m=>{const _=m.box;Object.assign(_,n.chartArea),_.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Gb{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class g3 extends Gb{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ao="$chartjs",_3={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Zf=n=>n===null||n==="";function b3(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[ao]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Zf(s)){const l=Mf(n,"width");l!==void 0&&(n.width=l)}if(Zf(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=Mf(n,"height");l!==void 0&&(n.height=l)}return n}const Xb=Q2?{passive:!0}:!1;function v3(n,e,t){n.addEventListener(e,t,Xb)}function y3(n,e,t){n.canvas.removeEventListener(e,t,Xb)}function k3(n,e){const t=_3[n.type]||n.type,{x:i,y:s}=Xi(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Do(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function w3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Do(r.addedNodes,i),o=o&&!Do(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function S3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Do(r.removedNodes,i),o=o&&!Do(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const _l=new Map;let Gf=0;function Qb(){const n=window.devicePixelRatio;n!==Gf&&(Gf=n,_l.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function $3(n,e){_l.size||window.addEventListener("resize",Qb),_l.set(n,e)}function T3(n){_l.delete(n),_l.size||window.removeEventListener("resize",Qb)}function C3(n,e,t){const i=n.canvas,s=i&&Ya(i);if(!s)return;const l=Sb((r,a)=>{const u=s.clientWidth;t(r,a),u{const a=r[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return o.observe(s),$3(n,l),o}function wr(n,e,t){t&&t.disconnect(),e==="resize"&&T3(n)}function M3(n,e,t){const i=n.canvas,s=Sb(l=>{n.ctx!==null&&t(k3(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return v3(i,e,s),s}class O3 extends Gb{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(b3(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[ao])return!1;const i=t[ao].initial;["height","width"].forEach(l=>{const o=i[l];pt(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[ao],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:w3,detach:S3,resize:C3}[t]||M3;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:wr,detach:wr,resize:wr}[t]||y3)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return X2(e,t,i,s)}isAttached(e){const t=Ya(e);return!!(t&&t.isConnected)}}function E3(n){return!qb()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?g3:O3}class D3{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(qt(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){pt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=st(i.options&&i.options.plugins,{}),l=A3(i);return s===!1&&!t?[]:L3(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function A3(n){const e={},t=[],i=Object.keys(ui.plugins.items);for(let l=0;l{const a=i[r];if(!tt(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const u=la(r,a),f=N3(u,s),c=t.scales||{};l[u]=l[u]||r,o[r]=sl(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||sa(a,e),c=(os[a]||{}).scales||{};Object.keys(c).forEach(d=>{const h=F3(d,u),g=r[h+"AxisID"]||l[h]||h;o[g]=o[g]||Object.create(null),sl(o[g],[{axis:h},i[g],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];sl(a,[lt.scales[a.type],lt.scale])}),o}function xb(n){const e=n.options||(n.options={});e.plugins=st(e.plugins,{}),e.scales=q3(n,e)}function e1(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function j3(n){return n=n||{},n.data=e1(n.data),xb(n),n}const Xf=new Map,t1=new Set;function Xl(n,e){let t=Xf.get(n);return t||(t=e(),Xf.set(n,t),t1.add(t)),t}const Gs=(n,e,t)=>{const i=qi(e,t);i!==void 0&&n.add(i)};class H3{constructor(e){this._config=j3(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=e1(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),xb(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Xl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Xl(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Xl(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return Xl(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(c=>Gs(a,e,c))),f.forEach(c=>Gs(a,s,c)),f.forEach(c=>Gs(a,os[l]||{},c)),f.forEach(c=>Gs(a,lt,c)),f.forEach(c=>Gs(a,ta,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),t1.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,os[t]||{},lt.datasets[t]||{},{type:t},lt,ta]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=Qf(this._resolverCache,e,s);let a=o;if(z3(o,t)){l.$shared=!1,i=ji(i)?i():i;const u=this.createResolver(e,i,r);a=Es(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=Qf(this._resolverCache,e,i);return tt(t)?Es(l,t,void 0,s):l}}function Qf(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:Ba(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const V3=n=>tt(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||ji(n[t]),!1);function z3(n,e){const{isScriptable:t,isIndexable:i}=Ib(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(ji(r)||V3(r))||o&&Tt(r))return!0}return!1}var B3="3.9.1";const U3=["top","bottom","left","right","chartArea"];function xf(n,e){return n==="top"||n==="bottom"||U3.indexOf(n)===-1&&e==="x"}function ec(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function tc(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),qt(t&&t.onComplete,[n],e)}function W3(n){const e=n.chart,t=e.options.animation;qt(t&&t.onProgress,[n],e)}function n1(n){return qb()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Ao={},i1=n=>{const e=n1(n);return Object.values(Ao).filter(t=>t.canvas===e).pop()};function Y3(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function K3(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Io{constructor(e,t){const i=this.config=new H3(t),s=n1(e),l=i1(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||E3(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,u=a&&a.height,f=a&&a.width;if(this.id=Ak(),this.ctx=r,this.canvas=a,this.width=f,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new D3,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Kk(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Ao[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}_i.listen(this,"complete",tc),_i.listen(this,"progress",W3),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return pt(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Cf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Sf(this.canvas,this.ctx),this}stop(){return _i.stop(this),this}resize(e,t){_i.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Cf(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),qt(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};gt(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=la(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),gt(l,o=>{const r=o.options,a=r.id,u=la(a,r),f=st(r.type,o.dtype);(r.position===void 0||xf(r.position,u)!==xf(o.dposition))&&(r.position=o.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===f)c=i[a];else{const d=ui.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),gt(s,(o,r)=>{o||delete i[r]}),gt(i,o=>{Gl.configure(this,o,o.options),Gl.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,f=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(ec("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){gt(this.scales,e=>{Gl.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!ff(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;Y3(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Gl.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],gt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Ha(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&Va(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return gl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=a3.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Vi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);Jn(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),_i.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};gt(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,u)=>{t.addEventListener(this,a,u),e[a]=u},s=(a,u)=>{e[a]&&(t.removeEventListener(this,a,u),delete e[a])},l=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){gt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},gt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!wo(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,u)=>a.filter(f=>!u.some(c=>f.datasetIndex===c.datasetIndex&&f.index===c.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=Rk(e),u=K3(e,this._lastEvent,i,a);i&&(this._lastEvent=null,qt(l.onHover,[e,r,this],this),a&&qt(l.onClick,[e,r,this],this));const f=!wo(r,s);return(f||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=u,f}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const nc=()=>gt(Io.instances,n=>n._plugins.invalidate()),Di=!0;Object.defineProperties(Io,{defaults:{enumerable:Di,value:lt},instances:{enumerable:Di,value:Ao},overrides:{enumerable:Di,value:os},registry:{enumerable:Di,value:ui},version:{enumerable:Di,value:B3},getChart:{enumerable:Di,value:i1},register:{enumerable:Di,value:(...n)=>{ui.add(...n),nc()}},unregister:{enumerable:Di,value:(...n)=>{ui.remove(...n),nc()}}});function s1(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let u=s/r;n.beginPath(),n.arc(l,o,r,i-u,t+u),a>s?(u=s/a,n.arc(l,o,a,t+u,i-u,!0)):n.arc(l,o,s,t+Ht,i-Ht),n.closePath(),n.clip()}function J3(n){return za(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Z3(n,e,t,i){const s=J3(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const u=(t-Math.min(l,a))*i/2;return dn(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:dn(s.innerStart,0,o),innerEnd:dn(s.innerEnd,0,o)}}function gs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function oa(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,c=Math.max(e.outerRadius+i+t-u,0),d=f>0?f+i+t+u:0;let h=0;const g=s-a;if(i){const B=f>0?f-i:0,K=c>0?c-i:0,J=(B+K)/2,X=J!==0?g*J/(J+i):g;h=(g-X)/2}const m=Math.max(.001,g*c-t/Vt)/c,_=(g-m)/2,y=a+_+h,S=s-_-h,{outerStart:T,outerEnd:$,innerStart:C,innerEnd:M}=Z3(e,d,c,S-y),E=c-T,D=c-$,I=y+T/E,P=S-$/D,F=d+C,N=d+M,R=y+C/F,q=S-M/N;if(n.beginPath(),l){if(n.arc(o,r,c,I,P),$>0){const J=gs(D,P,o,r);n.arc(J.x,J.y,$,P,S+Ht)}const B=gs(N,S,o,r);if(n.lineTo(B.x,B.y),M>0){const J=gs(N,q,o,r);n.arc(J.x,J.y,M,S+Ht,q+Math.PI)}if(n.arc(o,r,d,S-M/d,y+C/d,!0),C>0){const J=gs(F,R,o,r);n.arc(J.x,J.y,C,R+Math.PI,y-Ht)}const K=gs(E,y,o,r);if(n.lineTo(K.x,K.y),T>0){const J=gs(E,I,o,r);n.arc(J.x,J.y,T,y-Ht,I)}}else{n.moveTo(o,r);const B=Math.cos(I)*c+o,K=Math.sin(I)*c+r;n.lineTo(B,K);const J=Math.cos(P)*c+o,X=Math.sin(P)*c+r;n.lineTo(J,X)}n.closePath()}function G3(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){oa(n,e,t,i,o+vt,s);for(let u=0;u=vt||hl(l,r,a),m=ml(o,u+d,f+d);return g&&m}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,c=(o+r+u+a)/2;return{x:t+Math.cos(f)*c,y:i+Math.sin(f)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>vt?Math.floor(i/vt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*r,Math.sin(u)*r),this.circumference>=Vt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=G3(e,this,r,l,o);Q3(e,this,r,l,a,o),e.restore()}}Qa.id="arc";Qa.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};Qa.defaultRoutes={backgroundColor:"backgroundColor"};function l1(n,e,t=e){n.lineCap=st(t.borderCapStyle,e.borderCapStyle),n.setLineDash(st(t.borderDash,e.borderDash)),n.lineDashOffset=st(t.borderDashOffset,e.borderDashOffset),n.lineJoin=st(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=st(t.borderWidth,e.borderWidth),n.strokeStyle=st(t.borderColor,e.borderColor)}function x3(n,e,t){n.lineTo(t.x,t.y)}function eS(n){return n.stepped?k2:n.tension||n.cubicInterpolationMode==="monotone"?w2:x3}function o1(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-$:$))%l,T=()=>{m!==_&&(n.lineTo(f,_),n.lineTo(f,m),n.lineTo(f,y))};for(a&&(h=s[S(0)],n.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=s[S(d)],h.skip)continue;const $=h.x,C=h.y,M=$|0;M===g?(C_&&(_=C),f=(c*f+$)/++c):(T(),n.lineTo($,C),g=M,c=0,m=_=C),y=C}T()}function ra(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?nS:tS}function iS(n){return n.stepped?x2:n.tension||n.cubicInterpolationMode==="monotone"?ew:Qi}function sS(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),l1(n,e.options),n.stroke(s)}function lS(n,e,t,i){const{segments:s,options:l}=e,o=ra(e);for(const r of s)l1(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const oS=typeof Path2D=="function";function rS(n,e,t,i){oS&&!e.options.segment?sS(n,e,t,i):lS(n,e,t,i)}class zi extends Mi{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;W2(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=uw(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=Vb(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=iS(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function ic(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=eu(o,r,s);const a=s[o],u=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:u.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:u.y}))}),l}function eu(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function sc(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function a1(n,e){let t=[],i=!1;return Tt(n)?(i=!0,t=n):t=hS(n,e),t.length?new zi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function lc(n){return n&&n.fill!==!1}function mS(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!Bt(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function gS(n,e,t){const i=yS(n);if(tt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Bt(s)&&Math.floor(s)===s?_S(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function _S(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function bS(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:tt(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function vS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:tt(n)?i=n.value:i=e.getBaseValue(),i}function yS(n){const e=n.options,t=e.fill;let i=st(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function kS(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=wS(e,t);r.push(a1({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;r&&(r.line.updateControlPoints(l,r.axis),i&&r.fill&&Tr(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;lc(l)&&Tr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!lc(i)||t.drawTime!=="beforeDatasetDraw"||Tr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const al={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e-1?n.split(` +`):n}function LS(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 uc(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=Ln(e.bodyFont),u=Ln(e.titleFont),f=Ln(e.footerFont),c=l.length,d=s.length,h=i.length,g=Zn(e.padding);let m=g.height,_=0,y=i.reduce(($,C)=>$+C.before.length+C.lines.length+C.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(m+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const $=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;m+=h*$+(y-h)*a.lineHeight+(y-1)*e.bodySpacing}d&&(m+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let S=0;const T=function($){_=Math.max(_,t.measureText($).width+S)};return t.save(),t.font=u.string,gt(n.title,T),t.font=a.string,gt(n.beforeBody.concat(n.afterBody),T),S=e.displayColors?o+2+e.boxPadding:0,gt(i,$=>{gt($.before,T),gt($.lines,T),gt($.after,T)}),S=0,t.font=f.string,gt(n.footer,T),t.restore(),_+=g.width,{width:_,height:m}}function PS(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function FS(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 NS(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),FS(u,n,e,t)&&(u="center"),u}function fc(n,e,t){const i=t.yAlign||e.yAlign||PS(n,t);return{xAlign:t.xAlign||e.xAlign||NS(n,e,t,i),yAlign:i}}function RS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function qS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function cc(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=ws(o);let g=RS(e,r);const m=qS(e,a,u);return a==="center"?r==="left"?g+=u:r==="right"&&(g-=u):r==="left"?g-=Math.max(f,d)+s:r==="right"&&(g+=Math.max(c,h)+s),{x:dn(g,0,i.width-e.width),y:dn(m,0,i.height-e.height)}}function Ql(n,e,t){const i=Zn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function dc(n){return ri([],bi(n))}function jS(n,e,t){return Vi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function pc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ua extends Mi{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 zb(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=jS(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=ri(r,bi(s)),r=ri(r,bi(l)),r=ri(r,bi(o)),r}getBeforeBody(e,t){return dc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return gt(e,l=>{const o={before:[],lines:[],after:[]},r=pc(i,l);ri(o.before,bi(r.beforeLabel.call(this,l))),ri(o.lines,r.label.call(this,l)),ri(o.after,bi(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return dc(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=ri(r,bi(s)),r=ri(r,bi(l)),r=ri(r,bi(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;ae.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),gt(r,f=>{const c=pc(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=al[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=uc(this,i),u=Object.assign({},r,a),f=fc(this.chart,i,u),c=cc(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:c.x,y:c.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:c}=ws(r),{x:d,y:h}=e,{width:g,height:m}=t;let _,y,S,T,$,C;return l==="center"?($=h+m/2,s==="left"?(_=d,y=_-o,T=$+o,C=$-o):(_=d+g,y=_+o,T=$-o,C=$+o),S=_):(s==="left"?y=d+Math.max(a,f)+o:s==="right"?y=d+g-Math.max(u,c)-o:y=this.caretX,l==="top"?(T=h,$=T-o,_=y-o,S=y+o):(T=h+m,$=T+o,_=y+o,S=y-o),C=T),{x1:_,x2:y,x3:S,y1:T,y2:$,y3:C}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=gr(i.rtl,this.x,this.width);for(e.x=Ql(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=Ln(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aT!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Oo(e,{x:_,y:m,w:u,h:a,radius:S}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Oo(e,{x:y,y:m+1,w:u-2,h:a-2,radius:S}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(_,m,u,a),e.strokeRect(_,m,u,a),e.fillStyle=o.backgroundColor,e.fillRect(y,m+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:u,boxPadding:f}=i,c=Ln(i.bodyFont);let d=c.lineHeight,h=0;const g=gr(i.rtl,this.x,this.width),m=function(D){t.fillText(D,g.x(e.x+h),e.y+d/2),e.y+=d+l},_=g.textAlign(o);let y,S,T,$,C,M,E;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=Ql(this,_,i),t.fillStyle=i.bodyColor,gt(this.beforeBody,m),h=r&&_!=="right"?o==="center"?u/2+f:u+2+f:0,$=0,M=s.length;$0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=al[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=uc(this,e),a=Object.assign({},o,this._size),u=fc(t,e,a),f=cc(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Zn(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),sw(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),lw(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const u=this.chart.getDatasetMeta(r);if(!u)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:u.data[a],index:a}}),l=!wo(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!wo(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=al[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}ua.positioners=al;var HS={id:"tooltip",_element:ua,positioners:al,afterInit(n,e,t){t&&(n.tooltip=new ua({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:gi,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const VS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function zS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return VS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const BS=(n,e)=>n===null?null:dn(Math.round(n),0,e);class fa extends fs{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(pt(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:zS(i,e,st(t,e),this._addedLabels),BS(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}fa.id="category";fa.defaults={ticks:{callback:fa.prototype.getLabelForValue}};function US(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,h=l||1,g=f-1,{min:m,max:_}=e,y=!pt(o),S=!pt(r),T=!pt(u),$=(_-m)/(c+1);let C=df((_-m)/g/h)*h,M,E,D,I;if(C<1e-14&&!y&&!S)return[{value:m},{value:_}];I=Math.ceil(_/C)-Math.floor(m/C),I>g&&(C=df(I*C/g/h)*h),pt(a)||(M=Math.pow(10,a),C=Math.ceil(C*M)/M),s==="ticks"?(E=Math.floor(m/C)*C,D=Math.ceil(_/C)*C):(E=m,D=_),y&&S&&l&&Vk((r-o)/l,C/1e3)?(I=Math.round(Math.min((r-o)/C,f)),C=(r-o)/I,E=o,D=r):T?(E=y?o:E,D=S?r:D,I=u-1,C=(D-E)/I):(I=(D-E)/C,ll(I,Math.round(I),C/1e3)?I=Math.round(I):I=Math.ceil(I));const P=Math.max(pf(C),pf(E));M=Math.pow(10,pt(a)?P:a),E=Math.round(E*M)/M,D=Math.round(D*M)/M;let F=0;for(y&&(d&&E!==o?(t.push({value:o}),Es=t?s:a,r=a=>l=i?l:a;if(e){const a=fi(s),u=fi(l);a<0&&u<0?r(0):a>0&&u>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=US(s,l);return e.bounds==="ticks"&&bb(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return Ol(e,this.chart.options.locale,this.options.ticks.format)}}class tu extends Lo{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Bt(e)?e:0,this.max=Bt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=ti(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}tu.id="linear";tu.defaults={ticks:{callback:Zo.formatters.numeric}};function mc(n){return n/Math.pow(10,Math.floor(Wn(n)))===1}function WS(n,e){const t=Math.floor(Wn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=Hn(n.min,Math.pow(10,Math.floor(Wn(e.min)))),o=Math.floor(Wn(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:mc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Bt(e)?Math.max(0,e):null,this.max=Bt(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(Wn(a))+u);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=WS(t,this);return e.bounds==="ticks"&&bb(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Ol(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Wn(e),this._valueRange=Wn(this.max)-Wn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Wn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}f1.id="logarithmic";f1.defaults={ticks:{callback:Zo.formatters.logarithmic,major:{enabled:!0}}};function ca(n){const e=n.ticks;if(e.display&&n.display){const t=Zn(e.backdropPadding);return st(e.font&&e.font.size,lt.font.size)+t.height}return 0}function YS(n,e,t){return t=Tt(t)?t:[t],{w:v2(n,e.string,t),h:t.length*e.lineHeight}}function gc(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function KS(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?Vt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function ZS(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ca(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?Vt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function xS(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=Ln(l.font),{x:r,y:a,textAlign:u,left:f,top:c,right:d,bottom:h}=n._pointLabelItems[s],{backdropColor:g}=l;if(!pt(g)){const m=ws(l.borderRadius),_=Zn(l.backdropPadding);t.fillStyle=g;const y=f-_.left,S=c-_.top,T=d-f+_.width,$=h-c+_.height;Object.values(m).some(C=>C!==0)?(t.beginPath(),Oo(t,{x:y,y:S,w:T,h:$,radius:m}),t.fill()):t.fillRect(y,S,T,$)}Mo(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function c1(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,vt);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=qt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?KS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=vt/(this._pointLabels.length||1),i=this.options.startAngle||0;return In(e*t+ti(i))}getDistanceFromCenterForValue(e){if(pt(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(pt(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(f!==0){r=this.getDistanceFromCenterForValue(u.value);const c=s.setContext(this.getContext(f-1));e4(this,c,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:c}=u;!c||!f||(e.lineWidth=c,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=Ln(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,o=e.measureText(r.label).width,e.fillStyle=u.backdropColor;const c=Zn(u.backdropPadding);e.fillRect(-o/2-c.left,-l-f.size/2-c.top,o+c.width,f.size+c.height)}Mo(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Xo.id="radialLinear";Xo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Zo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Xo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Xo.descriptors={angleLines:{_fallback:"grid"}};const Qo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},kn=Object.keys(Qo);function n4(n,e){return n-e}function _c(n,e){if(pt(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Bt(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(Os(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function bc(n,e,t,i){const s=kn.length;for(let l=kn.indexOf(n);l=kn.indexOf(t);l--){const o=kn[l];if(Qo[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return kn[t?kn.indexOf(t):0]}function s4(n){for(let e=kn.indexOf(n)+1,t=kn.length;e=e?t[i]:t[s];n[l]=!0}}function l4(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function yc(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=dn(t,0,o),i=dn(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||bc(l.minUnit,t,i,this._getLabelCapacity(t)),r=st(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=Os(a)||a===!0,f={};let c=t,d,h;if(u&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,u?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,h=0;dm-_).map(m=>+m)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,u=r&&o[r],f=a&&o[a],c=i[t],d=a&&f&&c&&c.major,h=this._adapter.format(e,s||(d?f:u)),g=l.ticks.callback;return g?qt(g,[h,t,i],this):h}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=es(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=es(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const u=o-l;return u?r+(a-r)*(e-l)/u:r}class d1 extends Al{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=xl(t,this.min),this._tableRange=xl(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o{i&&(t||(t=qe(e,Jt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=qe(e,Jt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function r4(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=U(n[1]),t=O(),s=U(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&se(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&se(s,i)},d(l){l&&(k(e),k(t),k(s))}}}function a4(n){let e;return{c(){e=U("Loading...")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function u4(n){let e,t,i,s,l,o=n[2]&&kc();function r(f,c){return f[2]?a4:r4}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=O(),i=v("canvas"),s=O(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),qr(i,"height","250px"),qr(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),Q(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){w(f,e,c),o&&o.m(e,null),b(e,t),b(e,i),n[8](i),w(f,s,c),w(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&A(o,1):(o=kc(),o.c(),A(o,1),o.m(e,t)):o&&(re(),L(o,1,1,()=>{o=null}),ae()),c&4&&Q(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(o)},o(f){L(o)},d(f){f&&(k(e),k(s),k(l)),o&&o.d(),n[8](null),u.d()}}}function f4(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),fe.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let g of h)r.push({x:new Date(g.date),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(c(),console.warn(h),fe.error(h,(h==null?void 0:h.status)!=400))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Zt(()=>(Io.register(zi,Go,Jo,tu,Al,IS,HS),t(6,o=new Io(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(h){ne[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class c4 extends ve{constructor(e){super(),be(this,e,f4,u4,he,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var wc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d4(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var p1={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @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(T){return T instanceof a?new a(T.type,S(T.content),T.alias):Array.isArray(T)?T.map(S):T.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(C){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(C.stack)||[])[1];if(S){var T=document.getElementsByTagName("script");for(var $ in T)if(T[$].src==S)return T[$]}return null}},isActive:function(S,T,$){for(var C="no-"+T;S;){var M=S.classList;if(M.contains(T))return!0;if(M.contains(C))return!1;S=S.parentElement}return!!$}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(S,T){var $=r.util.clone(r.languages[S]);for(var C in T)$[C]=T[C];return $},insertBefore:function(S,T,$,C){C=C||r.languages;var M=C[S],E={};for(var D in M)if(M.hasOwnProperty(D)){if(D==T)for(var I in $)$.hasOwnProperty(I)&&(E[I]=$[I]);$.hasOwnProperty(D)||(E[D]=M[D])}var P=C[S];return C[S]=E,r.languages.DFS(r.languages,function(F,N){N===P&&F!=S&&(this[F]=E)}),E},DFS:function S(T,$,C,M){M=M||{};var E=r.util.objId;for(var D in T)if(T.hasOwnProperty(D)){$.call(T,D,T[D],C||D);var I=T[D],P=r.util.type(I);P==="Object"&&!M[E(I)]?(M[E(I)]=!0,S(I,$,null,M)):P==="Array"&&!M[E(I)]&&(M[E(I)]=!0,S(I,$,D,M))}}},plugins:{},highlightAll:function(S,T){r.highlightAllUnder(document,S,T)},highlightAllUnder:function(S,T,$){var C={callback:$,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",C),C.elements=Array.prototype.slice.apply(C.container.querySelectorAll(C.selector)),r.hooks.run("before-all-elements-highlight",C);for(var M=0,E;E=C.elements[M++];)r.highlightElement(E,T===!0,C.callback)},highlightElement:function(S,T,$){var C=r.util.getLanguage(S),M=r.languages[C];r.util.setLanguage(S,C);var E=S.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(E,C);var D=S.textContent,I={element:S,language:C,grammar:M,code:D};function P(N){I.highlightedCode=N,r.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,r.hooks.run("after-highlight",I),r.hooks.run("complete",I),$&&$.call(I.element)}if(r.hooks.run("before-sanity-check",I),E=I.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!I.code){r.hooks.run("complete",I),$&&$.call(I.element);return}if(r.hooks.run("before-highlight",I),!I.grammar){P(r.util.encode(I.code));return}if(T&&i.Worker){var F=new Worker(r.filename);F.onmessage=function(N){P(N.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,T,$){var C={code:S,grammar:T,language:$};if(r.hooks.run("before-tokenize",C),!C.grammar)throw new Error('The language "'+C.language+'" has no grammar.');return C.tokens=r.tokenize(C.code,C.grammar),r.hooks.run("after-tokenize",C),a.stringify(r.util.encode(C.tokens),C.language)},tokenize:function(S,T){var $=T.rest;if($){for(var C in $)T[C]=$[C];delete T.rest}var M=new c;return d(M,M.head,S),f(S,M,T,M.head,0),g(M)},hooks:{all:{},add:function(S,T){var $=r.hooks.all;$[S]=$[S]||[],$[S].push(T)},run:function(S,T){var $=r.hooks.all[S];if(!(!$||!$.length))for(var C=0,M;M=$[C++];)M(T)}},Token:a};i.Prism=r;function a(S,T,$,C){this.type=S,this.content=T,this.alias=$,this.length=(C||"").length|0}a.stringify=function S(T,$){if(typeof T=="string")return T;if(Array.isArray(T)){var C="";return T.forEach(function(P){C+=S(P,$)}),C}var M={type:T.type,content:S(T.content,$),tag:"span",classes:["token",T.type],attributes:{},language:$},E=T.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(M.classes,E):M.classes.push(E)),r.hooks.run("wrap",M);var D="";for(var I in M.attributes)D+=" "+I+'="'+(M.attributes[I]||"").replace(/"/g,""")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+D+">"+M.content+""};function u(S,T,$,C){S.lastIndex=T;var M=S.exec($);if(M&&C&&M[1]){var E=M[1].length;M.index+=E,M[0]=M[0].slice(E)}return M}function f(S,T,$,C,M,E){for(var D in $)if(!(!$.hasOwnProperty(D)||!$[D])){var I=$[D];I=Array.isArray(I)?I:[I];for(var P=0;P=E.reach);G+=X.value.length,X=X.next){var ue=X.value;if(T.length>S.length)return;if(!(ue instanceof a)){var ee=1,te;if(q){if(te=u(J,G,S,R),!te||te.index>=S.length)break;var ze=te.index,Ee=te.index+te[0].length,Fe=G;for(Fe+=X.value.length;ze>=Fe;)X=X.next,Fe+=X.value.length;if(Fe-=X.value.length,G=Fe,X.value instanceof a)continue;for(var Ve=X;Ve!==T.tail&&(FeE.reach&&(E.reach=bt);var Ge=X.prev;Me&&(Ge=d(T,Ge,Me),G+=Me.length),h(T,Ge,ee);var Ke=new a(D,N?r.tokenize(Se,N):Se,B,Se);if(X=d(T,Ge,Ke),Ze&&d(T,X,Ze),ee>1){var $t={cause:D+","+P,reach:bt};f(S,T,$,X.prev,G,$t),E&&$t.reach>E.reach&&(E.reach=$t.reach)}}}}}}function c(){var S={value:null,prev:null,next:null},T={value:null,prev:S,next:null};S.next=T,this.head=S,this.tail=T,this.length=0}function d(S,T,$){var C=T.next,M={value:$,prev:T,next:C};return T.next=M,C.prev=M,S.length++,M}function h(S,T,$){for(var C=T.next,M=0;M<$&&C!==S.tail;M++)C=C.next;T.next=C,C.prev=T,S.length-=M}function g(S){for(var T=[],$=S.head.next;$!==S.tail;)T.push($.value),$=$.next;return T}if(!i.document)return i.addEventListener&&(r.disableWorkerMessageHandler||i.addEventListener("message",function(S){var T=JSON.parse(S.data),$=T.language,C=T.code,M=T.immediateClose;i.postMessage(r.highlight(C,r.languages[$],$)),M&&i.close()},!1)),r;var m=r.util.currentScript();m&&(r.filename=m.src,m.hasAttribute("data-manual")&&(r.manual=!0));function _(){r.manual||r.highlightAll()}if(!r.manual){var y=document.readyState;y==="loading"||y==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",_):window.requestAnimationFrame?window.requestAnimationFrame(_):window.setTimeout(_,16)}return r}(e);n.exports&&(n.exports=t),typeof wc<"u"&&(wc.Prism=t),t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",s=function(m,_){return"✖ Error "+m+" while fetching file: "+_},l="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",u="loaded",f="failed",c="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function d(m,_,y){var S=new XMLHttpRequest;S.open("GET",m,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?_(S.responseText):S.status>=400?y(s(S.status,S.statusText)):y(l))},S.send(null)}function h(m){var _=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(_){var y=Number(_[1]),S=_[2],T=_[3];return S?T?[y,Number(T)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(m){m.selector+=", "+c}),t.hooks.add("before-sanity-check",function(m){var _=m.element;if(_.matches(c)){m.code="",_.setAttribute(r,a);var y=_.appendChild(document.createElement("CODE"));y.textContent=i;var S=_.getAttribute("data-src"),T=m.language;if(T==="none"){var $=(/\.(\w+)$/.exec(S)||[,"none"])[1];T=o[$]||$}t.util.setLanguage(y,T),t.util.setLanguage(_,T);var C=t.plugins.autoloader;C&&C.loadLanguages(T),d(S,function(M){_.setAttribute(r,u);var E=h(_.getAttribute("data-range"));if(E){var D=M.split(/\r\n?|\n/g),I=E[0],P=E[1]==null?D.length:E[1];I<0&&(I+=D.length),I=Math.max(0,Math.min(I-1,D.length)),P<0&&(P+=D.length),P=Math.max(0,Math.min(P,D.length)),M=D.slice(I,P).join(` +`),_.hasAttribute("data-start")||_.setAttribute("data-start",String(I+1))}y.textContent=M,t.highlightElement(y)},function(M){_.setAttribute(r,f),y.textContent=M})}}),t.plugins.fileHighlight={highlight:function(_){for(var y=(_||document).querySelectorAll(c),S=0,T;T=y[S++];)t.highlightElement(T)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(p1);var p4=p1.exports;const Xs=d4(p4);var h4={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;ar&&(f[d]=` +`+f[d],c=h)}a[u]=f.join("")}return a.join(` +`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,h="",g="",m=!1,_=0;_>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 m4(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:x,o:x,d(s){s&&k(e)}}}function g4(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=Xs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Xs.highlight(a,Xs.languages[l]||Xs.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 Xs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class h1 extends ve{constructor(e){super(),be(this,e,g4,m4,he,{class:0,content:2,language:3})}}const _4=n=>({}),Sc=n=>({}),b4=n=>({}),$c=n=>({});function Tc(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T=n[4]&&!n[2]&&Cc(n);const $=n[19].header,C=Ct($,n,n[18],$c);let M=n[4]&&n[2]&&Mc(n);const E=n[19].default,D=Ct(E,n,n[18],null),I=n[19].footer,P=Ct(I,n,n[18],Sc);return{c(){e=v("div"),t=v("div"),s=O(),l=v("div"),o=v("div"),T&&T.c(),r=O(),C&&C.c(),a=O(),M&&M.c(),u=O(),f=v("div"),D&&D.c(),c=O(),d=v("div"),P&&P.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",h="overlay-panel "+n[1]+" "+n[8]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(F,N){w(F,e,N),b(e,t),b(e,s),b(e,l),b(l,o),T&&T.m(o,null),b(o,r),C&&C.m(o,null),b(o,a),M&&M.m(o,null),b(l,u),b(l,f),D&&D.m(f,null),n[21](f),b(l,c),b(l,d),P&&P.m(d,null),_=!0,y||(S=[Y(t,"click",Qe(n[20])),Y(f,"scroll",n[22])],y=!0)},p(F,N){n=F,n[4]&&!n[2]?T?T.p(n,N):(T=Cc(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),C&&C.p&&(!_||N[0]&262144)&&Ot(C,$,n,n[18],_?Mt($,n[18],N,b4):Et(n[18]),$c),n[4]&&n[2]?M?M.p(n,N):(M=Mc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),D&&D.p&&(!_||N[0]&262144)&&Ot(D,E,n,n[18],_?Mt(E,n[18],N,null):Et(n[18]),null),P&&P.p&&(!_||N[0]&262144)&&Ot(P,I,n,n[18],_?Mt(I,n[18],N,_4):Et(n[18]),Sc),(!_||N[0]&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),(!_||N[0]&262)&&Q(l,"popup",n[2]),(!_||N[0]&4)&&Q(e,"padded",n[2]),(!_||N[0]&1)&&Q(e,"active",n[0])},i(F){_||(F&&Xe(()=>{_&&(i||(i=qe(t,Zr,{duration:_s,opacity:0},!0)),i.run(1))}),A(C,F),A(D,F),A(P,F),F&&Xe(()=>{_&&(m&&m.end(1),g=l_(l,pi,n[2]?{duration:_s,y:-10}:{duration:_s,x:50}),g.start())}),_=!0)},o(F){F&&(i||(i=qe(t,Zr,{duration:_s,opacity:0},!1)),i.run(0)),L(C,F),L(D,F),L(P,F),g&&g.invalidate(),F&&(m=ba(l,pi,n[2]?{duration:_s,y:10}:{duration:_s,x:50})),_=!1},d(F){F&&k(e),F&&i&&i.end(),T&&T.d(),C&&C.d(F),M&&M.d(),D&&D.d(F),n[21](null),P&&P.d(F),F&&m&&m.end(),y=!1,Ce(S)}}}function Cc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Qe(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Mc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Qe(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function v4(n){let e,t,i,s,l=n[0]&&Tc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[Y(window,"resize",n[10]),Y(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Tc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){L(l),t=!1},d(o){o&&k(e),l&&l.d(),n[23](null),i=!1,Ce(s)}}}let Zi,Cr=[];function m1(){return Zi=Zi||document.querySelector(".overlays"),Zi||(Zi=document.createElement("div"),Zi.classList.add("overlays"),document.body.appendChild(Zi)),Zi}let _s=150;function Oc(){return 1e3+m1().querySelectorAll(".overlay-panel-container.active").length}function y4(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const h=wt(),g="op_"+z.randomString(10);let m,_,y,S,T="",$=o;function C(){typeof c=="function"&&c()===!1||t(0,o=!0)}function M(){typeof d=="function"&&d()===!1||t(0,o=!1)}function E(){return o}async function D(G){t(17,$=G),G?(y=document.activeElement,h("show"),m==null||m.focus()):(clearTimeout(S),h("hide"),y==null||y.focus()),await ln(),I()}function I(){m&&(o?t(6,m.style.zIndex=Oc(),m):t(6,m.style="",m))}function P(){z.pushUnique(Cr,g),document.body.classList.add("overlay-active")}function F(){z.removeByValue(Cr,g),Cr.length||document.body.classList.remove("overlay-active")}function N(G){o&&f&&G.code=="Escape"&&!z.isInput(G.target)&&m&&m.style.zIndex==Oc()&&(G.preventDefault(),M())}function R(G){o&&q(_)}function q(G,ue){ue&&t(8,T=""),G&&(S||(S=setTimeout(()=>{if(clearTimeout(S),S=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}G.scrollTop==0?t(8,T+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}Zt(()=>(m1().appendChild(m),()=>{var G;clearTimeout(S),F(),(G=m==null?void 0:m.classList)==null||G.add("hidden"),setTimeout(()=>{m==null||m.remove()},0)}));const B=()=>a?M():!0;function K(G){ne[G?"unshift":"push"](()=>{_=G,t(7,_)})}const J=G=>q(G.target);function X(G){ne[G?"unshift":"push"](()=>{m=G,t(6,m)})}return n.$$set=G=>{"class"in G&&t(1,l=G.class),"active"in G&&t(0,o=G.active),"popup"in G&&t(2,r=G.popup),"overlayClose"in G&&t(3,a=G.overlayClose),"btnClose"in G&&t(4,u=G.btnClose),"escClose"in G&&t(12,f=G.escClose),"beforeOpen"in G&&t(13,c=G.beforeOpen),"beforeHide"in G&&t(14,d=G.beforeHide),"$$scope"in G&&t(18,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&$!=o&&D(o),n.$$.dirty[0]&128&&q(_,!0),n.$$.dirty[0]&64&&m&&I(),n.$$.dirty[0]&1&&(o?P():F())},[o,l,r,a,u,M,m,_,T,N,R,q,f,c,d,C,E,$,s,i,B,K,J,X]}class on extends ve{constructor(e){super(),be(this,e,y4,v4,he,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function k4(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:x,d(t){t&&k(e)}}}function w4(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=U(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){w(l,e,o),b(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&se(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&k(e)}}}function S4(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:x,i:x,o:x,d(t){t&&k(e)}}}function $4(n){let e,t,i;return t=new h1({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","block")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),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 T4(n){var Le;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,h,g,m=n[2].status+"",_,y,S,T,$,C,M=((Le=n[2].method)==null?void 0:Le.toUpperCase())+"",E,D,I,P,F,N,R=n[2].auth+"",q,B,K,J,X,G,ue=n[2].url+"",ee,te,Ee,Fe,Ve,ze,Se,Me,Ze,bt,Ge,Ke=n[2].remoteIp+"",$t,me,ye,Je,Oe,mt,Ft=n[2].userIp+"",rn,Ae,at,bn,$n,Tn,li=n[2].userAgent+"",Gn,mi,Cn,dt,Mn,Gt,Xn,ge,we,ut,Wt,et,an,Xt,nn,pn;function Ll(Pe,De){return Pe[2].referer?w4:k4}let W=Ll(n),Z=W(n);const ie=[$4,S4],le=[];function Te(Pe,De){return De&4&&(Xn=null),Xn==null&&(Xn=!z.isEmpty(Pe[2].meta)),Xn?0:1}return ge=Te(n,-1),we=le[ge]=ie[ge](n),nn=new Ti({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=O(),o=v("td"),a=U(r),u=O(),f=v("tr"),c=v("td"),c.textContent="Status",d=O(),h=v("td"),g=v("span"),_=U(m),y=O(),S=v("tr"),T=v("td"),T.textContent="Method",$=O(),C=v("td"),E=U(M),D=O(),I=v("tr"),P=v("td"),P.textContent="Auth",F=O(),N=v("td"),q=U(R),B=O(),K=v("tr"),J=v("td"),J.textContent="URL",X=O(),G=v("td"),ee=U(ue),te=O(),Ee=v("tr"),Fe=v("td"),Fe.textContent="Referer",Ve=O(),ze=v("td"),Z.c(),Se=O(),Me=v("tr"),Ze=v("td"),Ze.textContent="Remote IP",bt=O(),Ge=v("td"),$t=U(Ke),me=O(),ye=v("tr"),Je=v("td"),Je.textContent="User IP",Oe=O(),mt=v("td"),rn=U(Ft),Ae=O(),at=v("tr"),bn=v("td"),bn.textContent="UserAgent",$n=O(),Tn=v("td"),Gn=U(li),mi=O(),Cn=v("tr"),dt=v("td"),dt.textContent="Meta",Mn=O(),Gt=v("td"),we.c(),ut=O(),Wt=v("tr"),et=v("td"),et.textContent="Created",an=O(),Xt=v("td"),V(nn.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(g,"class","label"),Q(g,"label-danger",n[2].status>=400),p(T,"class","min-width txt-hint txt-bold"),p(P,"class","min-width txt-hint txt-bold"),p(J,"class","min-width txt-hint txt-bold"),p(Fe,"class","min-width txt-hint txt-bold"),p(Ze,"class","min-width txt-hint txt-bold"),p(Je,"class","min-width txt-hint txt-bold"),p(bn,"class","min-width txt-hint txt-bold"),p(dt,"class","min-width txt-hint txt-bold"),p(et,"class","min-width txt-hint txt-bold"),p(e,"class","table-border")},m(Pe,De){w(Pe,e,De),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o),b(o,a),b(t,u),b(t,f),b(f,c),b(f,d),b(f,h),b(h,g),b(g,_),b(t,y),b(t,S),b(S,T),b(S,$),b(S,C),b(C,E),b(t,D),b(t,I),b(I,P),b(I,F),b(I,N),b(N,q),b(t,B),b(t,K),b(K,J),b(K,X),b(K,G),b(G,ee),b(t,te),b(t,Ee),b(Ee,Fe),b(Ee,Ve),b(Ee,ze),Z.m(ze,null),b(t,Se),b(t,Me),b(Me,Ze),b(Me,bt),b(Me,Ge),b(Ge,$t),b(t,me),b(t,ye),b(ye,Je),b(ye,Oe),b(ye,mt),b(mt,rn),b(t,Ae),b(t,at),b(at,bn),b(at,$n),b(at,Tn),b(Tn,Gn),b(t,mi),b(t,Cn),b(Cn,dt),b(Cn,Mn),b(Cn,Gt),le[ge].m(Gt,null),b(t,ut),b(t,Wt),b(Wt,et),b(Wt,an),b(Wt,Xt),j(nn,Xt,null),pn=!0},p(Pe,De){var Ue;(!pn||De&4)&&r!==(r=Pe[2].id+"")&&se(a,r),(!pn||De&4)&&m!==(m=Pe[2].status+"")&&se(_,m),(!pn||De&4)&&Q(g,"label-danger",Pe[2].status>=400),(!pn||De&4)&&M!==(M=((Ue=Pe[2].method)==null?void 0:Ue.toUpperCase())+"")&&se(E,M),(!pn||De&4)&&R!==(R=Pe[2].auth+"")&&se(q,R),(!pn||De&4)&&ue!==(ue=Pe[2].url+"")&&se(ee,ue),W===(W=Ll(Pe))&&Z?Z.p(Pe,De):(Z.d(1),Z=W(Pe),Z&&(Z.c(),Z.m(ze,null))),(!pn||De&4)&&Ke!==(Ke=Pe[2].remoteIp+"")&&se($t,Ke),(!pn||De&4)&&Ft!==(Ft=Pe[2].userIp+"")&&se(rn,Ft),(!pn||De&4)&&li!==(li=Pe[2].userAgent+"")&&se(Gn,li);let We=ge;ge=Te(Pe,De),ge===We?le[ge].p(Pe,De):(re(),L(le[We],1,1,()=>{le[We]=null}),ae(),we=le[ge],we?we.p(Pe,De):(we=le[ge]=ie[ge](Pe),we.c()),A(we,1),we.m(Gt,null));const Re={};De&4&&(Re.date=Pe[2].created),nn.$set(Re)},i(Pe){pn||(A(we),A(nn.$$.fragment,Pe),pn=!0)},o(Pe){L(we),L(nn.$$.fragment,Pe),pn=!1},d(Pe){Pe&&k(e),Z.d(),le[ge].d(),H(nn)}}}function C4(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function M4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[4]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function O4(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[M4],header:[C4],default:[T4]},$$scope:{ctx:n}};return e=new on({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(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[5](null),H(e,s)}}}function E4(n,e,t){let i,s={};function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){ne[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){Ne.call(this,n,c)}function f(c){Ne.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class D4 extends ve{constructor(e){super(),be(this,e,E4,O4,he,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function A4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){w(u,e,f),e.checked=n[1],w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Ec(n){let e,t;return e=new c4({props:{filter:n[4],presets:n[5]}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),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 Dc(n){let e,t;return e=new Dk({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),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 I4(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S=n[3],T,$=n[3],C,M;r=new Yo({}),r.$on("refresh",n[9]),d=new ce({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[A4,({uniqueId:I})=>({14:I}),({uniqueId:I})=>I?16384:0]},$$scope:{ctx:n}}}),g=new Wo({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),g.$on("submit",n[11]);let E=Ec(n),D=Dc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=U(n[6]),o=O(),V(r.$$.fragment),a=O(),u=v("div"),f=O(),c=v("div"),V(d.$$.fragment),h=O(),V(g.$$.fragment),m=O(),_=v("div"),y=O(),E.c(),T=O(),D.c(),C=ke(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(_,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(I,P){w(I,e,P),b(e,t),b(t,i),b(i,s),b(s,l),b(t,o),j(r,t,null),b(t,a),b(t,u),b(t,f),b(t,c),j(d,c,null),b(e,h),j(g,e,null),b(e,m),b(e,_),b(e,y),E.m(e,null),w(I,T,P),D.m(I,P),w(I,C,P),M=!0},p(I,P){(!M||P&64)&&se(l,I[6]);const F={};P&49154&&(F.$$scope={dirty:P,ctx:I}),d.$set(F);const N={};P&1&&(N.value=I[0]),g.$set(N),P&8&&he(S,S=I[3])?(re(),L(E,1,1,x),ae(),E=Ec(I),E.c(),A(E,1),E.m(e,null)):E.p(I,P),P&8&&he($,$=I[3])?(re(),L(D,1,1,x),ae(),D=Dc(I),D.c(),A(D,1),D.m(C.parentNode,C)):D.p(I,P)},i(I){M||(A(r.$$.fragment,I),A(d.$$.fragment,I),A(g.$$.fragment,I),A(E),A(D),M=!0)},o(I){L(r.$$.fragment,I),L(d.$$.fragment,I),L(g.$$.fragment,I),L(E),L(D),M=!1},d(I){I&&(k(e),k(T),k(C)),H(r),H(d),H(g),E.d(I),D.d(I)}}}function L4(n){let e,t,i,s;e=new Sn({props:{$$slots:{default:[I4]},$$scope:{ctx:n}}});let l={};return i=new D4({props:l}),n[13](i),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(o,r){j(e,o,r),w(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){L(e.$$.fragment,o),L(i.$$.fragment,o),s=!1},d(o){o&&k(t),H(e,o),n[13](null),H(i,o)}}}const Ac="includeAdminLogs";function P4(n,e,t){var y;let i,s,l;Ye(n,At,S=>t(6,l=S));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];sn(At,l="Request logs",l);let r,a="",u=((y=window.localStorage)==null?void 0:y.getItem(Ac))<<0,f=1;function c(){t(3,f++,f)}const d=()=>c();function h(){u=this.checked,t(1,u)}const g=S=>t(0,a=S.detail),m=S=>r==null?void 0:r.show(S==null?void 0:S.detail);function _(S){ne[S?"unshift":"push"](()=>{r=S,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Ac,u<<0),n.$$.dirty&1&&t(4,s=z.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,c,d,h,g,m,_]}class F4 extends ve{constructor(e){super(),be(this,e,P4,L4,he,{})}}const nu=Nn({});function mn(n,e,t){nu.set({text:n,yesCallback:e,noCallback:t})}function g1(){nu.set({})}function Ic(n){let e,t,i;const s=n[17].default,l=Ct(s,n,n[16],null);return{c(){e=v("div"),l&&l.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(o,r){w(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&Ot(l,s,o,o[16],i?Mt(s,o[16],r,null):Et(o[16]),null),(!i||r&2)&&p(e,"class",o[1]),(!i||r&3)&&Q(e,"active",o[0])},i(o){i||(A(l,o),o&&Xe(()=>{i&&(t||(t=qe(e,pi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){L(l,o),o&&(t||(t=qe(e,pi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function N4(n){let e,t,i,s,l=n[0]&&Ic(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[Y(window,"mousedown",n[5]),Y(window,"click",n[6]),Y(window,"keydown",n[4]),Y(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Ic(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){L(l),t=!1},d(o){o&&k(e),l&&l.d(),n[19](null),i=!1,Ce(s)}}}function R4(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,c,d,h,g,m=!1;const _=wt();function y(){t(0,o=!1),m=!1,clearTimeout(g)}function S(){t(0,o=!0),clearTimeout(g),g=setTimeout(()=>{a&&(d!=null&&d.scrollIntoViewIfNeeded?d==null||d.scrollIntoViewIfNeeded():d!=null&&d.scrollIntoView&&(d==null||d.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function T(){o?y():S()}function $(B){return!c||B.classList.contains(u)||(h==null?void 0:h.contains(B))&&!c.contains(B)||c.contains(B)&&B.closest&&B.closest("."+u)}function C(B){(!o||$(B.target))&&(B.preventDefault(),B.stopPropagation(),T())}function M(B){(B.code==="Enter"||B.code==="Space")&&(!o||$(B.target))&&(B.preventDefault(),B.stopPropagation(),T())}function E(B){o&&r&&B.code==="Escape"&&(B.preventDefault(),y())}function D(B){o&&!(c!=null&&c.contains(B.target))?m=!0:m&&(m=!1)}function I(B){var K;o&&m&&!(c!=null&&c.contains(B.target))&&!(h!=null&&h.contains(B.target))&&!((K=B.target)!=null&&K.closest(".flatpickr-calendar"))&&y()}function P(B){D(B),I(B)}function F(B){N(),c==null||c.addEventListener("click",C),t(15,h=B||(c==null?void 0:c.parentNode)),h==null||h.addEventListener("click",C),h==null||h.addEventListener("keydown",M)}function N(){clearTimeout(g),c==null||c.removeEventListener("click",C),h==null||h.removeEventListener("click",C),h==null||h.removeEventListener("keydown",M)}Zt(()=>(F(),()=>N()));function R(B){ne[B?"unshift":"push"](()=>{d=B,t(3,d)})}function q(B){ne[B?"unshift":"push"](()=>{c=B,t(2,c)})}return n.$$set=B=>{"trigger"in B&&t(8,l=B.trigger),"active"in B&&t(0,o=B.active),"escClose"in B&&t(9,r=B.escClose),"autoScroll"in B&&t(10,a=B.autoScroll),"closableClass"in B&&t(11,u=B.closableClass),"class"in B&&t(1,f=B.class),"$$scope"in B&&t(16,s=B.$$scope)},n.$$.update=()=>{var B,K;n.$$.dirty&260&&c&&F(l),n.$$.dirty&32769&&(o?((B=h==null?void 0:h.classList)==null||B.add("active"),_("show")):((K=h==null?void 0:h.classList)==null||K.remove("active"),_("hide")))},[o,f,c,d,E,D,I,P,l,r,a,u,y,S,T,h,s,i,R,q]}class Rn extends ve{constructor(e){super(),be(this,e,R4,N4,he,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function Lc(n,e,t){const i=n.slice();return i[27]=e[t],i}function q4(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("input"),s=O(),l=v("label"),o=U("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[30]),e.checked=i=n[3].unique,p(l,"for",r=n[30])},m(f,c){w(f,e,c),w(f,s,c),w(f,l,c),b(l,o),a||(u=Y(e,"change",n[19]),a=!0)},p(f,c){c[0]&1073741824&&t!==(t=f[30])&&p(e,"id",t),c[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),c[0]&1073741824&&r!==(r=f[30])&&p(l,"for",r)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function j4(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a,u){var c;let f={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(c=a[0])==null?void 0:c.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(f.value=a[2]),{props:f}}return o&&(e=Dt(o,r(n)),ne.push(()=>de(e,"value",l))),{c(){e&&V(e.$$.fragment),i=ke()},m(a,u){e&&j(e,a,u),w(a,i,u),s=!0},p(a,u){var f;if(u[0]&128&&o!==(o=a[7])){if(e){re();const c=e;L(c.$$.fragment,1,0,()=>{H(c,1)}),ae()}o?(e=Dt(o,r(a)),ne.push(()=>de(e,"value",l)),V(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else if(o){const c={};u[0]&1073741824&&(c.id=a[30]),u[0]&1&&(c.placeholder=`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`),!t&&u[0]&4&&(t=!0,c.value=a[2],_e(()=>t=!1)),e.$set(c)}},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 H4(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:x,i:x,o:x,d(t){t&&k(e)}}}function V4(n){let e,t,i,s;const l=[H4,j4],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ke()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),L(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){L(t),s=!1},d(a){a&&k(i),o[e].d(a)}}}function Pc(n){let e,t,i,s=pe(n[10]),l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new ce({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[V4,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Pc(n);return{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment),s=O(),r&&r.c(),l=ke()},m(a,u){j(e,a,u),w(a,t,u),j(i,a,u),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};u[0]&64&&(c.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(c.$$scope={dirty:u,ctx:a}),i.$set(c),a[10].length>0?r?r.p(a,u):(r=Pc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),o=!1},d(a){a&&(k(t),k(s),k(l)),H(e,a),H(i,a),r&&r.d(a)}}}function B4(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=v("h4"),i=U(t),s=U(" index")},m(l,o){w(l,e,o),b(e,i),b(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&se(i,t)},d(l){l&&k(e)}}}function Nc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){w(s,e,l),t||(i=[$e(He.call(null,e,{text:"Delete",position:"top"})),Y(e,"click",n[16])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ce(i)}}}function U4(n){let e,t,i,s,l,o,r=n[5]!=""&&Nc(n);return{c(){r&&r.c(),e=O(),t=v("button"),t.innerHTML='Cancel',i=O(),s=v("button"),s.innerHTML='Set index',p(t,"type","button"),p(t,"class","btn btn-transparent"),p(s,"type","button"),p(s,"class","btn"),Q(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),l||(o=[Y(t,"click",n[17]),Y(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Nc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&Q(s,"btn-disabled",a[9].length<=0)},d(a){a&&(k(e),k(t),k(i),k(s)),r&&r.d(a),l=!1,Ce(o)}}}function W4(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[U4],header:[B4],default:[z4]},$$scope:{ctx:n}};for(let l=0;lX.name==B);J?z.removeByValue(K.columns,J):z.pushUnique(K.columns,{name:B}),t(2,d=z.buildIndex(K))}Zt(async()=>{t(8,m=!0);try{t(7,g=(await ot(()=>import("./CodeEditor-d578f3b8.js"),["./CodeEditor-d578f3b8.js","./index-4841d67b.js"],import.meta.url)).default)}catch(B){console.warn(B)}t(8,m=!1)});const M=()=>T(),E=()=>y(),D=()=>$(),I=B=>{t(3,s.unique=B.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,d=z.buildIndex(s))};function P(B){d=B,t(2,d)}const F=B=>C(B);function N(B){ne[B?"unshift":"push"](()=>{f=B,t(4,f)})}function R(B){Ne.call(this,n,B)}function q(B){Ne.call(this,n,B)}return n.$$set=B=>{e=je(je({},e),xt(B)),t(14,r=xe(e,o)),"collection"in B&&t(0,u=B.collection)},n.$$.update=()=>{var B,K,J;n.$$.dirty[0]&1&&t(10,i=(((K=(B=u==null?void 0:u.schema)==null?void 0:B.filter(X=>!X.toDelete))==null?void 0:K.map(X=>X.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=z.parseIndex(d)),n.$$.dirty[0]&8&&t(9,l=((J=s.columns)==null?void 0:J.map(X=>X.name))||[])},[u,y,d,s,f,c,h,g,m,l,i,T,$,C,r,_,M,E,D,I,P,F,N,R,q]}class K4 extends ve{constructor(e){super(),be(this,e,Y4,W4,he,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Rc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=z.parseIndex(i[10]);return i[11]=s,i}function qc(n){let e;return{c(){e=v("strong"),e.textContent="Unique:"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function jc(n){var d;let e,t,i,s=((d=n[11].columns)==null?void 0:d.map(Hc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&qc();function c(){return n[4](n[10],n[13])}return{c(){var h,g;e=v("button"),f&&f.c(),t=O(),i=v("span"),l=U(s),p(i,"class","txt"),p(e,"type","button"),p(e,"class",o="label link-primary "+((g=(h=n[2].indexes)==null?void 0:h[n[13]])!=null&&g.message?"label-danger":"")+" svelte-167lbwu")},m(h,g){var m,_;w(h,e,g),f&&f.m(e,null),b(e,t),b(e,i),b(i,l),a||(u=[$e(r=He.call(null,e,((_=(m=n[2].indexes)==null?void 0:m[n[13]])==null?void 0:_.message)||"")),Y(e,"click",c)],a=!0)},p(h,g){var m,_,y,S,T;n=h,n[11].unique?f||(f=qc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),g&1&&s!==(s=((m=n[11].columns)==null?void 0:m.map(Hc).join(", "))+"")&&se(l,s),g&4&&o!==(o="label link-primary "+((y=(_=n[2].indexes)==null?void 0:_[n[13]])!=null&&y.message?"label-danger":"")+" svelte-167lbwu")&&p(e,"class",o),r&&It(r.update)&&g&4&&r.update.call(null,((T=(S=n[2].indexes)==null?void 0:S[n[13]])==null?void 0:T.message)||"")},d(h){h&&k(e),f&&f.d(),a=!1,Ce(u)}}}function J4(n){var $,C,M;let e,t,i=(((C=($=n[0])==null?void 0:$.indexes)==null?void 0:C.length)||0)+"",s,l,o,r,a,u,f,c,d,h,g,m,_=pe(((M=n[0])==null?void 0:M.indexes)||[]),y=[];for(let E=0;E<_.length;E+=1)y[E]=jc(Rc(n,_,E));function S(E){n[7](E)}let T={};return n[0]!==void 0&&(T.collection=n[0]),c=new K4({props:T}),n[6](c),ne.push(()=>de(c,"collection",S)),c.$on("remove",n[8]),c.$on("submit",n[9]),{c(){e=v("div"),t=U("Unique constraints and indexes ("),s=U(i),l=U(")"),o=O(),r=v("div");for(let E=0;E+ New index',f=O(),V(c.$$.fragment),p(e,"class","section-title"),p(u,"type","button"),p(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),p(r,"class","indexes-list svelte-167lbwu")},m(E,D){w(E,e,D),b(e,t),b(e,s),b(e,l),w(E,o,D),w(E,r,D);for(let I=0;Id=!1)),c.$set(I)},i(E){h||(A(c.$$.fragment,E),h=!0)},o(E){L(c.$$.fragment,E),h=!1},d(E){E&&(k(e),k(o),k(r),k(f)),_t(y,E),n[6](null),H(c,E),g=!1,m()}}}const Hc=n=>n.name;function Z4(n,e,t){let i;Ye(n,Ci,h=>t(2,i=h));let{collection:s}=e,l;function o(h,g){for(let m=0;ml==null?void 0:l.show(h,g),a=()=>l==null?void 0:l.show();function u(h){ne[h?"unshift":"push"](()=>{l=h,t(1,l)})}function f(h){s=h,t(0,s)}const c=h=>{for(let g=0;g{o(h.detail.old,h.detail.new)};return n.$$set=h=>{"collection"in h&&t(0,s=h.collection)},[s,l,i,o,r,a,u,f,c,d]}class G4 extends ve{constructor(e){super(),be(this,e,Z4,J4,he,{collection:0})}}function Vc(n,e,t){const i=n.slice();return i[6]=e[t],i}function zc(n){let e,t,i,s,l,o,r;function a(){return n[4](n[6])}function u(...f){return n[5](n[6],...f)}return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent=`${n[6].label}`,l=O(),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(f,c){w(f,e,c),b(e,t),b(e,i),b(e,s),b(e,l),o||(r=[Y(e,"click",Fn(a)),Y(e,"keydown",Fn(u))],o=!0)},p(f,c){n=f},d(f){f&&k(e),o=!1,Ce(r)}}}function X4(n){let e,t=pe(n[2]),i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class e$ extends ve{constructor(e){super(),be(this,e,x4,Q4,he,{class:0})}}const t$=n=>({interactive:n&64,hasErrors:n&32}),Bc=n=>({interactive:n[6],hasErrors:n[5]}),n$=n=>({interactive:n&64,hasErrors:n&32}),Uc=n=>({interactive:n[6],hasErrors:n[5]}),i$=n=>({interactive:n&64,hasErrors:n&32}),Wc=n=>({interactive:n[6],hasErrors:n[5]});function Yc(n){let e;return{c(){e=v("div"),e.innerHTML='',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 Kc(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=$e(t=He.call(null,e,n[4])),i=!0)},p(l,o){t&&It(t.update)&&o&16&&t.update.call(null,l[4])},d(l){l&&k(e),i=!1,s()}}}function s$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g=n[0].required&&Kc(n);return{c(){e=v("div"),g&&g.c(),t=O(),i=v("div"),s=v("i"),o=O(),r=v("input"),p(e,"class","markers"),p(s,"class",l=z.getFieldTypeIcon(n[0].type)),p(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),Q(i,"txt-disabled",!n[6]),p(r,"type","text"),r.required=!0,r.disabled=a=!n[6],r.readOnly=u=n[0].id&&n[0].system,p(r,"spellcheck","false"),r.autofocus=f=!n[0].id,p(r,"placeholder","Field name"),r.value=c=n[0].name},m(m,_){w(m,e,_),g&&g.m(e,null),w(m,t,_),w(m,i,_),b(i,s),w(m,o,_),w(m,r,_),n[14](r),n[0].id||r.focus(),d||(h=Y(r,"input",n[15]),d=!0)},p(m,_){m[0].required?g?g.p(m,_):(g=Kc(m),g.c(),g.m(e,null)):g&&(g.d(1),g=null),_&1&&l!==(l=z.getFieldTypeIcon(m[0].type))&&p(s,"class",l),_&64&&Q(i,"txt-disabled",!m[6]),_&64&&a!==(a=!m[6])&&(r.disabled=a),_&1&&u!==(u=m[0].id&&m[0].system)&&(r.readOnly=u),_&1&&f!==(f=!m[0].id)&&(r.autofocus=f),_&1&&c!==(c=m[0].name)&&r.value!==c&&(r.value=c)},d(m){m&&(k(e),k(t),k(i),k(o),k(r)),g&&g.d(),n[14](null),d=!1,h()}}}function l$(n){let e;return{c(){e=v("span"),p(e,"class","separator")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function o$(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-settings-3-line"),p(e,"type","button"),p(e,"aria-label","Toggle field options"),p(e,"class",i="btn btn-sm btn-circle options-trigger "+(n[3]?"btn-secondary":"btn-transparent")),Q(e,"btn-hint",!n[3]&&!n[5]),Q(e,"btn-danger",n[5])},m(o,r){w(o,e,r),b(e,t),s||(l=Y(e,"click",n[11]),s=!0)},p(o,r){r&8&&i!==(i="btn btn-sm btn-circle options-trigger "+(o[3]?"btn-secondary":"btn-transparent"))&&p(e,"class",i),r&40&&Q(e,"btn-hint",!o[3]&&!o[5]),r&40&&Q(e,"btn-danger",o[5])},d(o){o&&k(e),s=!1,l()}}}function r$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),p(e,"aria-label","Restore")},m(s,l){w(s,e,l),t||(i=[$e(He.call(null,e,"Restore")),Y(e,"click",n[9])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ce(i)}}}function Jc(n){let e,t,i,s,l,o,r,a,u,f,c;const d=n[13].options,h=Ct(d,n,n[18],Uc);l=new ce({props:{class:"form-field form-field-toggle",name:"requried",$$slots:{default:[a$,({uniqueId:y})=>({24:y}),({uniqueId:y})=>y?16777216:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field form-field-toggle",name:"presentable",$$slots:{default:[u$,({uniqueId:y})=>({24:y}),({uniqueId:y})=>y?16777216:0]},$$scope:{ctx:n}}});const g=n[13].optionsFooter,m=Ct(g,n,n[18],Bc);let _=!n[0].toDelete&&Zc(n);return{c(){e=v("div"),t=v("div"),h&&h.c(),i=O(),s=v("div"),V(l.$$.fragment),o=O(),V(r.$$.fragment),a=O(),m&&m.c(),u=O(),_&&_.c(),p(t,"class","hidden-empty m-b-sm"),p(s,"class","schema-field-options-footer"),p(e,"class","schema-field-options")},m(y,S){w(y,e,S),b(e,t),h&&h.m(t,null),b(e,i),b(e,s),j(l,s,null),b(s,o),j(r,s,null),b(s,a),m&&m.m(s,null),b(s,u),_&&_.m(s,null),c=!0},p(y,S){h&&h.p&&(!c||S&262240)&&Ot(h,d,y,y[18],c?Mt(d,y[18],S,n$):Et(y[18]),Uc);const T={};S&17039377&&(T.$$scope={dirty:S,ctx:y}),l.$set(T);const $={};S&17039361&&($.$$scope={dirty:S,ctx:y}),r.$set($),m&&m.p&&(!c||S&262240)&&Ot(m,g,y,y[18],c?Mt(g,y[18],S,t$):Et(y[18]),Bc),y[0].toDelete?_&&(re(),L(_,1,1,()=>{_=null}),ae()):_?(_.p(y,S),S&1&&A(_,1)):(_=Zc(y),_.c(),A(_,1),_.m(s,null))},i(y){c||(A(h,y),A(l.$$.fragment,y),A(r.$$.fragment,y),A(m,y),A(_),y&&Xe(()=>{c&&(f||(f=qe(e,nt,{duration:150},!0)),f.run(1))}),c=!0)},o(y){L(h,y),L(l.$$.fragment,y),L(r.$$.fragment,y),L(m,y),L(_),y&&(f||(f=qe(e,nt,{duration:150},!1)),f.run(0)),c=!1},d(y){y&&k(e),h&&h.d(y),H(l),H(r),m&&m.d(y),_&&_.d(),y&&f&&f.end()}}}function a$(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),o=U(n[4]),r=O(),a=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[24]),p(l,"class","txt"),p(a,"class","ri-information-line link-hint"),p(s,"for",f=n[24])},m(h,g){w(h,e,g),e.checked=n[0].required,w(h,i,g),w(h,s,g),b(s,l),b(l,o),b(s,r),b(s,a),c||(d=[Y(e,"change",n[16]),$e(u=He.call(null,a,{text:`Requires the field value NOT to be ${z.zeroDefaultStr(n[0])}.`}))],c=!0)},p(h,g){g&16777216&&t!==(t=h[24])&&p(e,"id",t),g&1&&(e.checked=h[0].required),g&16&&se(o,h[4]),u&&It(u.update)&&g&1&&u.update.call(null,{text:`Requires the field value NOT to be ${z.zeroDefaultStr(h[0])}.`}),g&16777216&&f!==(f=h[24])&&p(s,"for",f)},d(h){h&&(k(e),k(i),k(s)),c=!1,Ce(d)}}}function u$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Presentable",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[24]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[24])},m(c,d){w(c,e,d),e.checked=n[0].presentable,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[17]),$e(He.call(null,r,{text:"Whether the field should be preferred in the Admin UI relation listings (default to auto)."}))],u=!0)},p(c,d){d&16777216&&t!==(t=c[24])&&p(e,"id",t),d&1&&(e.checked=c[0].presentable),d&16777216&&a!==(a=c[24])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,Ce(f)}}}function Zc(n){let e,t,i,s,l,o,r,a,u;return a=new Rn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[f$]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),l=v("button"),o=v("i"),r=O(),V(a.$$.fragment),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","m-l-auto txt-right")},m(f,c){w(f,e,c),b(e,t),b(e,i),b(e,s),b(s,l),b(l,o),b(l,r),j(a,l,null),u=!0},p(f,c){const d={};c&262144&&(d.$$scope={dirty:c,ctx:f}),a.$set(d)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){L(a.$$.fragment,f),u=!1},d(f){f&&k(e),H(a)}}}function f$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function c$(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Yc();s=new ce({props:{class:"form-field required m-0 "+(n[6]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[s$]},$$scope:{ctx:n}}});const c=n[13].default,d=Ct(c,n,n[18],Wc),h=d||l$();function g(S,T){if(S[0].toDelete)return r$;if(S[6])return o$}let m=g(n),_=m&&m(n),y=n[6]&&n[3]&&Jc(n);return{c(){e=v("div"),t=v("div"),f&&f.c(),i=O(),V(s.$$.fragment),l=O(),h&&h.c(),o=O(),_&&_.c(),r=O(),y&&y.c(),p(t,"class","schema-field-header"),p(e,"class","schema-field"),Q(e,"required",n[0].required),Q(e,"expanded",n[6]&&n[3]),Q(e,"deleted",n[0].toDelete)},m(S,T){w(S,e,T),b(e,t),f&&f.m(t,null),b(t,i),j(s,t,null),b(t,l),h&&h.m(t,null),b(t,o),_&&_.m(t,null),b(e,r),y&&y.m(e,null),u=!0},p(S,[T]){S[6]?f||(f=Yc(),f.c(),f.m(t,i)):f&&(f.d(1),f=null);const $={};T&64&&($.class="form-field required m-0 "+(S[6]?"":"disabled")),T&2&&($.name="schema."+S[1]+".name"),T&262229&&($.$$scope={dirty:T,ctx:S}),s.$set($),d&&d.p&&(!u||T&262240)&&Ot(d,c,S,S[18],u?Mt(c,S[18],T,i$):Et(S[18]),Wc),m===(m=g(S))&&_?_.p(S,T):(_&&_.d(1),_=m&&m(S),_&&(_.c(),_.m(t,null))),S[6]&&S[3]?y?(y.p(S,T),T&72&&A(y,1)):(y=Jc(S),y.c(),A(y,1),y.m(e,null)):y&&(re(),L(y,1,1,()=>{y=null}),ae()),(!u||T&1)&&Q(e,"required",S[0].required),(!u||T&72)&&Q(e,"expanded",S[6]&&S[3]),(!u||T&1)&&Q(e,"deleted",S[0].toDelete)},i(S){u||(A(s.$$.fragment,S),A(h,S),A(y),S&&Xe(()=>{u&&(a||(a=qe(e,nt,{duration:150},!0)),a.run(1))}),u=!0)},o(S){L(s.$$.fragment,S),L(h,S),L(y),S&&(a||(a=qe(e,nt,{duration:150},!1)),a.run(0)),u=!1},d(S){S&&k(e),f&&f.d(),H(s),h&&h.d(S),_&&_.d(),y&&y.d(),S&&a&&a.end()}}}let Mr=[];function d$(n,e,t){let i,s,l,o;Ye(n,Ci,F=>t(12,o=F));let{$$slots:r={},$$scope:a}=e;const u="f_"+z.randomString(8),f=wt(),c={bool:"Nonfalsey",number:"Nonzero"};let{key:d=""}=e,{field:h=z.initSchemaField()}=e,g,m=!1;function _(){h.id?t(0,h.toDelete=!0,h):f("remove")}function y(){t(0,h.toDelete=!1,h),tn({})}function S(F){return z.slugify(F)}function T(){t(3,m=!0),M()}function $(){t(3,m=!1)}function C(){m?$():T()}function M(){for(let F of Mr)F.id!=u&&F.collapse()}Zt(()=>(Mr.push({id:u,collapse:$}),h.onMountSelect&&(t(0,h.onMountSelect=!1,h),g==null||g.select()),()=>{z.removeByKey(Mr,"id",u)}));function E(F){ne[F?"unshift":"push"](()=>{g=F,t(2,g)})}const D=F=>{const N=h.name;t(0,h.name=S(F.target.value),h),F.target.value=h.name,f("rename",{oldName:N,newName:h.name})};function I(){h.required=this.checked,t(0,h)}function P(){h.presentable=this.checked,t(0,h)}return n.$$set=F=>{"key"in F&&t(1,d=F.key),"field"in F&&t(0,h=F.field),"$$scope"in F&&t(18,a=F.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&h.toDelete&&h.originalName&&h.name!==h.originalName&&t(0,h.name=h.originalName,h),n.$$.dirty&1&&!h.originalName&&h.name&&t(0,h.originalName=h.name,h),n.$$.dirty&1&&typeof h.toDelete>"u"&&t(0,h.toDelete=!1,h),n.$$.dirty&1&&h.required&&t(0,h.nullable=!1,h),n.$$.dirty&1&&t(6,i=!h.toDelete&&!(h.id&&h.system)),n.$$.dirty&4098&&t(5,s=!z.isEmpty(z.getNestedVal(o,`schema.${d}`))),n.$$.dirty&1&&t(4,l=c[h==null?void 0:h.type]||"Nonempty")},[h,d,g,m,l,s,i,f,_,y,S,C,o,r,E,D,I,P,a]}class hi extends ve{constructor(e){super(),be(this,e,d$,c$,he,{key:1,field:0})}}function p$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min length"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min","0")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].options.min),r||(a=Y(l,"input",n[3]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.min&&oe(l,u[0].options.min)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function h$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Max length"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min",r=n[0].options.min||0)},m(f,c){w(f,e,c),b(e,t),w(f,s,c),w(f,l,c),oe(l,n[0].options.max),a||(u=Y(l,"input",n[4]),a=!0)},p(f,c){c&512&&i!==(i=f[9])&&p(e,"for",i),c&512&&o!==(o=f[9])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min||0)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].options.max&&oe(l,f[0].options.max)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function m$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Regex pattern"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","text"),p(l,"id",o=n[9]),p(l,"placeholder","Valid Go regular expression, eg. ^\\w+$")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].options.pattern),r||(a=Y(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0].options.pattern&&oe(l,u[0].options.pattern)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function g$(n){let e,t,i,s,l,o,r,a,u,f;return i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[p$,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[h$,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[m$,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),r=O(),a=v("div"),V(u.$$.fragment),p(t,"class","col-sm-3"),p(l,"class","col-sm-3"),p(a,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(c,d){w(c,e,d),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),f=!0},p(c,d){const h={};d&2&&(h.name="schema."+c[1]+".options.min"),d&1537&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const g={};d&2&&(g.name="schema."+c[1]+".options.max"),d&1537&&(g.$$scope={dirty:d,ctx:c}),o.$set(g);const m={};d&2&&(m.name="schema."+c[1]+".options.pattern"),d&1537&&(m.$$scope={dirty:d,ctx:c}),u.$set(m)},i(c){f||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){L(i.$$.fragment,c),L(o.$$.fragment,c),L(u.$$.fragment,c),f=!1},d(c){c&&k(e),H(i),H(o),H(u)}}}function _$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[g$]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?kt(s,[a&2&&{key:r[1]},a&4&&Pt(r[2])]):{};a&1027&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function b$(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=ht(this.value),t(0,l)}function a(){l.options.max=ht(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(h){l=h,t(0,l)}function c(h){Ne.call(this,n,h)}function d(h){Ne.call(this,n,h)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(2,s=xe(e,i)),"field"in h&&t(0,l=h.field),"key"in h&&t(1,o=h.key)},[l,o,s,r,a,u,f,c,d]}class v$ extends ve{constructor(e){super(),be(this,e,b$,_$,he,{field:0,key:1})}}function y$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9])},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].options.min),r||(a=Y(l,"input",n[4]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.min&&oe(l,u[0].options.min)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function k$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Max"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"min",r=n[0].options.min)},m(f,c){w(f,e,c),b(e,t),w(f,s,c),w(f,l,c),oe(l,n[0].options.max),a||(u=Y(l,"input",n[5]),a=!0)},p(f,c){c&512&&i!==(i=f[9])&&p(e,"for",i),c&512&&o!==(o=f[9])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].options.max&&oe(l,f[0].options.max)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function w$(n){let e,t,i,s,l,o,r;return i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[y$,({uniqueId:a})=>({9:a}),({uniqueId:a})=>a?512:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[k$,({uniqueId:a})=>({9:a}),({uniqueId:a})=>a?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&1537&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&1537&&(c.$$scope={dirty:u,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 S$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="No decimals",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[9]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[9])},m(c,d){w(c,e,d),e.checked=n[0].options.noDecimal,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[3]),$e(He.call(null,r,{text:"Existing decimal numbers will not be affected."}))],u=!0)},p(c,d){d&512&&t!==(t=c[9])&&p(e,"id",t),d&1&&(e.checked=c[0].options.noDecimal),d&512&&a!==(a=c[9])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,Ce(f)}}}function $$(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.noDecimal",$$slots:{default:[S$,({uniqueId:i})=>({9:i}),({uniqueId:i})=>i?512:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.noDecimal"),s&1537&&(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){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{optionsFooter:[$$],options:[w$]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?kt(s,[a&2&&{key:r[1]},a&4&&Pt(r[2])]):{};a&1027&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function C$(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.noDecimal=this.checked,t(0,l)}function a(){l.options.min=ht(this.value),t(0,l)}function u(){l.options.max=ht(this.value),t(0,l)}function f(h){l=h,t(0,l)}function c(h){Ne.call(this,n,h)}function d(h){Ne.call(this,n,h)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(2,s=xe(e,i)),"field"in h&&t(0,l=h.field),"key"in h&&t(1,o=h.key)},[l,o,s,r,a,u,f,c,d]}class M$ extends ve{constructor(e){super(),be(this,e,C$,T$,he,{field:0,key:1})}}function O$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?kt(s,[a&2&&{key:r[1]},a&4&&Pt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function E$(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Ne.call(this,n,f)}function u(f){Ne.call(this,n,f)}return n.$$set=f=>{e=je(je({},e),xt(f)),t(2,s=xe(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class D$ extends ve{constructor(e){super(),be(this,e,E$,O$,he,{field:0,key:1})}}function A$(n){let e,t,i,s,l=[{type:t=n[5].type||"text"},{value:n[4]},{disabled:n[3]},{readOnly:n[2]},n[5]],o={};for(let r=0;r{t(0,o=z.splitNonEmpty(c.target.value,r))};return n.$$set=c=>{e=je(je({},e),xt(c)),t(5,l=xe(e,s)),"value"in c&&t(0,o=c.value),"separator"in c&&t(1,r=c.separator),"readonly"in c&&t(2,a=c.readonly),"disabled"in c&&t(3,u=c.disabled)},n.$$.update=()=>{n.$$.dirty&1&&t(4,i=(o||[]).join(", "))},[o,r,a,u,i,l,f]}class Rs extends ve{constructor(e){super(),be(this,e,I$,A$,he,{value:0,separator:1,readonly:2,disabled:3})}}function L$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(_){n[3](_)}let m={id:n[8],disabled:!z.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(m.value=n[0].options.exceptDomains),r=new Rs({props:m}),ne.push(()=>de(r,"value",g)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),V(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),j(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=$e(He.call(null,s,{text:`List of domains that are NOT allowed. + This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&256&&l!==(l=_[8]))&&p(e,"for",l);const S={};y&256&&(S.id=_[8]),y&1&&(S.disabled=!z.isEmpty(_[0].options.onlyDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.exceptDomains,_e(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){L(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),H(r,_),d=!1,h()}}}function P$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(_){n[4](_)}let m={id:n[8]+".options.onlyDomains",disabled:!z.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(m.value=n[0].options.onlyDomains),r=new Rs({props:m}),ne.push(()=>de(r,"value",g)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),V(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]+".options.onlyDomains"),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),j(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=$e(He.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(_,y){(!c||y&256&&l!==(l=_[8]+".options.onlyDomains"))&&p(e,"for",l);const S={};y&256&&(S.id=_[8]+".options.onlyDomains"),y&1&&(S.disabled=!z.isEmpty(_[0].options.exceptDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.onlyDomains,_e(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){L(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),H(r,_),d=!1,h()}}}function F$(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:[L$,({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:[P$,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&769&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&769&&(c.$$scope={dirty:u,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 N$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[F$]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?kt(s,[a&2&&{key:r[1]},a&4&&Pt(r[2])]):{};a&515&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function R$(n,e,t){const i=["field","key"];let s=xe(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 u(d){l=d,t(0,l)}function f(d){Ne.call(this,n,d)}function c(d){Ne.call(this,n,d)}return n.$$set=d=>{e=je(je({},e),xt(d)),t(2,s=xe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,s,r,a,u,f,c]}class _1 extends ve{constructor(e){super(),be(this,e,R$,N$,he,{field:0,key:1})}}function q$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?kt(s,[a&2&&{key:r[1]},a&4&&Pt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function j$(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Ne.call(this,n,f)}function u(f){Ne.call(this,n,f)}return n.$$set=f=>{e=je(je({},e),xt(f)),t(2,s=xe(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class H$ extends ve{constructor(e){super(),be(this,e,j$,q$,he,{field:0,key:1})}}function V$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Strip urls domain",o=O(),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),u||(f=[Y(e,"change",n[3]),$e(He.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."}))],u=!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),k(i),k(s)),u=!1,Ce(f)}}}function z$(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.convertUrls",$$slots:{default:[V$,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(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 B$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[4](r)}let o={$$slots:{optionsFooter:[z$]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[5]),e.$on("remove",n[6]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?kt(s,[a&2&&{key:r[1]},a&4&&Pt(r[2])]):{};a&515&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function U$(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(){t(0,l.options={convertUrls:!1},l)}function a(){l.options.convertUrls=this.checked,t(0,l)}function u(d){l=d,t(0,l)}function f(d){Ne.call(this,n,d)}function c(d){Ne.call(this,n,d)}return n.$$set=d=>{e=je(je({},e),xt(d)),t(2,s=xe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},n.$$.update=()=>{n.$$.dirty&1&&z.isEmpty(l.options)&&r()},[l,o,s,a,u,f,c]}class W$ extends ve{constructor(e){super(),be(this,e,U$,B$,he,{field:0,key:1})}}var Or=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ss={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},bl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},vn=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Vn=function(n){return n===!0?1:0};function Gc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Er=function(n){return n instanceof Array?n:[n]};function hn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ct(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function eo(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function b1(n,e){if(e(n))return n;if(n.parentNode)return b1(n.parentNode,e)}function to(n,e){var t=ct("div","numInputWrapper"),i=ct("input","numInput "+n),s=ct("span","arrowUp"),l=ct("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function En(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Dr=function(){},Po=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},Y$={D:Dr,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*Vn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Dr,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Dr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},xi={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ul={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[ul.w(n,e,t)]},F:function(n,e,t){return Po(ul.n(n,e,t)-1,!1,e)},G:function(n,e,t){return vn(ul.h(n,e,t))},H:function(n){return vn(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[Vn(n.getHours()>11)]},M:function(n,e){return Po(n.getMonth(),!0,e)},S:function(n){return vn(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return vn(n.getFullYear(),4)},d:function(n){return vn(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return vn(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return vn(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},v1=function(n){var e=n.config,t=e===void 0?Ss:e,i=n.l10n,s=i===void 0?bl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,h){return ul[c]&&h[d-1]!=="\\"?ul[c](r,f,t):c!=="\\"?c:""}).join("")}},da=function(n){var e=n.config,t=e===void 0?Ss:e,i=n.l10n,s=i===void 0?bl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||Ss).dateFormat,h=String(l).trim();if(h==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(h)||/GMT$/.test(h))f=new Date(l);else{for(var g=void 0,m=[],_=0,y=0,S="";_Math.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ie=Ir(t.config);Z.setHours(ie.hours,ie.minutes,ie.seconds,Z.getMilliseconds()),t.selectedDates=[Z],t.latestSelectedDateObj=Z}W!==void 0&&W.type!=="blur"&&Ll(W);var le=t._input.value;c(),nn(),t._input.value!==le&&t._debouncedChange()}function u(W,Z){return W%12+12*Vn(Z===t.l10n.amPM[1])}function f(W){switch(W%24){case 0:case 12:return 12;default:return W%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var W=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,Z=(parseInt(t.minuteElement.value,10)||0)%60,ie=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(W=u(W,t.amPM.textContent));var le=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&Dn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Te=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&Dn(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Le=Ar(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Pe=Ar(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),De=Ar(W,Z,ie);if(De>Pe&&De=12)]),t.secondElement!==void 0&&(t.secondElement.value=vn(ie)))}function g(W){var Z=En(W),ie=parseInt(Z.value)+(W.delta||0);(ie/1e3>1||W.key==="Enter"&&!/[^\d]/.test(ie.toString()))&&Se(ie)}function m(W,Z,ie,le){if(Z instanceof Array)return Z.forEach(function(Te){return m(W,Te,ie,le)});if(W instanceof Array)return W.forEach(function(Te){return m(Te,Z,ie,le)});W.addEventListener(Z,ie,le),t._handlers.push({remove:function(){return W.removeEventListener(Z,ie,le)}})}function _(){we("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ie){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ie+"]"),function(le){return m(le,"click",t[ie])})}),t.isMobile){Xn();return}var W=Gc($t,50);if(t._debouncedChange=Gc(_,G$),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&m(t.daysContainer,"mouseover",function(ie){t.config.mode==="range"&&Ke(En(ie))}),m(t._input,"keydown",Ge),t.calendarContainer!==void 0&&m(t.calendarContainer,"keydown",Ge),!t.config.inline&&!t.config.static&&m(window,"resize",W),window.ontouchstart!==void 0?m(window.document,"touchstart",ze):m(window.document,"mousedown",ze),m(window.document,"focus",ze,{capture:!0}),t.config.clickOpens===!0&&(m(t._input,"focus",t.open),m(t._input,"click",t.open)),t.daysContainer!==void 0&&(m(t.monthNav,"click",pn),m(t.monthNav,["keyup","increment"],g),m(t.daysContainer,"click",$n)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var Z=function(ie){return En(ie).select()};m(t.timeContainer,["increment"],a),m(t.timeContainer,"blur",a,{capture:!0}),m(t.timeContainer,"click",T),m([t.hourElement,t.minuteElement],["focus","click"],Z),t.secondElement!==void 0&&m(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&m(t.amPM,"click",function(ie){a(ie)})}t.config.allowInput&&m(t._input,"blur",bt)}function S(W,Z){var ie=W!==void 0?t.parseDate(W):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(W);var Te=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Te&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Le=ct("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Le,t.element),Le.appendChild(t.element),t.altInput&&Le.appendChild(t.altInput),Le.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(W,Z,ie,le){var Te=Me(Z,!0),Le=ct("span",W,Z.getDate().toString());return Le.dateObj=Z,Le.$i=le,Le.setAttribute("aria-label",t.formatDate(Z,t.config.ariaDateFormat)),W.indexOf("hidden")===-1&&Dn(Z,t.now)===0&&(t.todayDateElem=Le,Le.classList.add("today"),Le.setAttribute("aria-current","date")),Te?(Le.tabIndex=-1,Wt(Z)&&(Le.classList.add("selected"),t.selectedDateElem=Le,t.config.mode==="range"&&(hn(Le,"startRange",t.selectedDates[0]&&Dn(Z,t.selectedDates[0],!0)===0),hn(Le,"endRange",t.selectedDates[1]&&Dn(Z,t.selectedDates[1],!0)===0),W==="nextMonthDay"&&Le.classList.add("inRange")))):Le.classList.add("flatpickr-disabled"),t.config.mode==="range"&&et(Z)&&!Wt(Z)&&Le.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&W!=="prevMonthDay"&&le%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(Z)+""),we("onDayCreate",Le),Le}function E(W){W.focus(),t.config.mode==="range"&&Ke(W)}function D(W){for(var Z=W>0?0:t.config.showMonths-1,ie=W>0?t.config.showMonths:-1,le=Z;le!=ie;le+=W)for(var Te=t.daysContainer.children[le],Le=W>0?0:Te.children.length-1,Pe=W>0?Te.children.length:-1,De=Le;De!=Pe;De+=W){var We=Te.children[De];if(We.className.indexOf("hidden")===-1&&Me(We.dateObj))return We}}function I(W,Z){for(var ie=W.className.indexOf("Month")===-1?W.dateObj.getMonth():t.currentMonth,le=Z>0?t.config.showMonths:-1,Te=Z>0?1:-1,Le=ie-t.currentMonth;Le!=le;Le+=Te)for(var Pe=t.daysContainer.children[Le],De=ie-t.currentMonth===Le?W.$i+Z:Z<0?Pe.children.length-1:0,We=Pe.children.length,Re=De;Re>=0&&Re0?We:-1);Re+=Te){var Ue=Pe.children[Re];if(Ue.className.indexOf("hidden")===-1&&Me(Ue.dateObj)&&Math.abs(W.$i-Re)>=Math.abs(Z))return E(Ue)}t.changeMonth(Te),P(D(Te),0)}function P(W,Z){var ie=l(),le=Ze(ie||document.body),Te=W!==void 0?W:le?ie:t.selectedDateElem!==void 0&&Ze(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ze(t.todayDateElem)?t.todayDateElem:D(Z>0?1:-1);Te===void 0?t._input.focus():le?I(Te,Z):E(Te)}function F(W,Z){for(var ie=(new Date(W,Z,1).getDay()-t.l10n.firstDayOfWeek+7)%7,le=t.utils.getDaysInMonth((Z-1+12)%12,W),Te=t.utils.getDaysInMonth(Z,W),Le=window.document.createDocumentFragment(),Pe=t.config.showMonths>1,De=Pe?"prevMonthDay hidden":"prevMonthDay",We=Pe?"nextMonthDay hidden":"nextMonthDay",Re=le+1-ie,Ue=0;Re<=le;Re++,Ue++)Le.appendChild(M("flatpickr-day "+De,new Date(W,Z-1,Re),Re,Ue));for(Re=1;Re<=Te;Re++,Ue++)Le.appendChild(M("flatpickr-day",new Date(W,Z,Re),Re,Ue));for(var St=Te+1;St<=42-ie&&(t.config.showMonths===1||Ue%7!==0);St++,Ue++)Le.appendChild(M("flatpickr-day "+We,new Date(W,Z+1,St%Te),St,Ue));var oi=ct("div","dayContainer");return oi.appendChild(Le),oi}function N(){if(t.daysContainer!==void 0){eo(t.daysContainer),t.weekNumbers&&eo(t.weekNumbers);for(var W=document.createDocumentFragment(),Z=0;Z1||t.config.monthSelectorType!=="dropdown")){var W=function(le){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&let.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var Z=0;Z<12;Z++)if(W(Z)){var ie=ct("option","flatpickr-monthDropdown-month");ie.value=new Date(t.currentYear,Z).getMonth().toString(),ie.textContent=Po(Z,t.config.shorthandCurrentMonth,t.l10n),ie.tabIndex=-1,t.currentMonth===Z&&(ie.selected=!0),t.monthsDropdownContainer.appendChild(ie)}}}function q(){var W=ct("div","flatpickr-month"),Z=window.document.createDocumentFragment(),ie;t.config.showMonths>1||t.config.monthSelectorType==="static"?ie=ct("span","cur-month"):(t.monthsDropdownContainer=ct("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),m(t.monthsDropdownContainer,"change",function(Pe){var De=En(Pe),We=parseInt(De.value,10);t.changeMonth(We-t.currentMonth),we("onMonthChange")}),R(),ie=t.monthsDropdownContainer);var le=to("cur-year",{tabindex:"-1"}),Te=le.getElementsByTagName("input")[0];Te.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Te.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Te.setAttribute("max",t.config.maxDate.getFullYear().toString()),Te.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Le=ct("div","flatpickr-current-month");return Le.appendChild(ie),Le.appendChild(le),Z.appendChild(Le),W.appendChild(Z),{container:W,yearElement:Te,monthElement:ie}}function B(){eo(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var W=t.config.showMonths;W--;){var Z=q();t.yearElements.push(Z.yearElement),t.monthElements.push(Z.monthElement),t.monthNav.appendChild(Z.container)}t.monthNav.appendChild(t.nextMonthNav)}function K(){return t.monthNav=ct("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ct("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ct("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,B(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(W){t.__hidePrevMonthArrow!==W&&(hn(t.prevMonthNav,"flatpickr-disabled",W),t.__hidePrevMonthArrow=W)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(W){t.__hideNextMonthArrow!==W&&(hn(t.nextMonthNav,"flatpickr-disabled",W),t.__hideNextMonthArrow=W)}}),t.currentYearElement=t.yearElements[0],an(),t.monthNav}function J(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var W=Ir(t.config);t.timeContainer=ct("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var Z=ct("span","flatpickr-time-separator",":"),ie=to("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ie.getElementsByTagName("input")[0];var le=to("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=le.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=vn(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?W.hours:f(W.hours)),t.minuteElement.value=vn(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():W.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ie),t.timeContainer.appendChild(Z),t.timeContainer.appendChild(le),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Te=to("flatpickr-second");t.secondElement=Te.getElementsByTagName("input")[0],t.secondElement.value=vn(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():W.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ct("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Te)}return t.config.time_24hr||(t.amPM=ct("span","flatpickr-am-pm",t.l10n.amPM[Vn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function X(){t.weekdayContainer?eo(t.weekdayContainer):t.weekdayContainer=ct("div","flatpickr-weekdays");for(var W=t.config.showMonths;W--;){var Z=ct("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(Z)}return G(),t.weekdayContainer}function G(){if(t.weekdayContainer){var W=t.l10n.firstDayOfWeek,Z=Xc(t.l10n.weekdays.shorthand);W>0&&W + `+Z.join("")+` + + `}}function ue(){t.calendarContainer.classList.add("hasWeeks");var W=ct("div","flatpickr-weekwrapper");W.appendChild(ct("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=ct("div","flatpickr-weeks");return W.appendChild(Z),{weekWrapper:W,weekNumbers:Z}}function ee(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"),R()),N(),we("onMonthChange"),an())}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=Ir(t.config),le=ie.hours,Te=ie.minutes,Le=ie.seconds;h(le,Te,Le)}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 Fe(){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 Ve(W){return t.calendarContainer.contains(W)}function ze(W){if(t.isOpen&&!t.config.inline){var Z=En(W),ie=Ve(Z),le=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)),Te=!le&&!ie&&!Ve(W.relatedTarget),Le=!t.config.ignoredFocusElements.some(function(Pe){return Pe.contains(Z)});Te&&Le&&(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 Se(W){if(!(!W||t.config.minDate&&Wt.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"),R())}}function Me(W,Z){var ie;Z===void 0&&(Z=!0);var le=t.parseDate(W,void 0,Z);if(t.config.minDate&&le&&Dn(le,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&le&&Dn(le,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(le===void 0)return!1;for(var Te=!!t.config.enable,Le=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,Pe=0,De=void 0;Pe=De.from.getTime()&&le.getTime()<=De.to.getTime())return Te}return!Te}function Ze(W){return t.daysContainer!==void 0?W.className.indexOf("hidden")===-1&&W.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(W):!1}function bt(W){var Z=W.target===t._input,ie=t._input.value.trimEnd()!==Xt();Z&&ie&&!(W.relatedTarget&&Ve(W.relatedTarget))&&t.setDate(t._input.value,!0,W.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ge(W){var Z=En(W),ie=t.config.wrap?n.contains(Z):Z===t._input,le=t.config.allowInput,Te=t.isOpen&&(!le||!ie),Le=t.config.inline&&ie&&!le;if(W.keyCode===13&&ie){if(le)return t.setDate(t._input.value,!0,Z===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),Z.blur();t.open()}else if(Ve(Z)||Te||Le){var Pe=!!t.timeContainer&&t.timeContainer.contains(Z);switch(W.keyCode){case 13:Pe?(W.preventDefault(),a(),bn()):$n(W);break;case 27:W.preventDefault(),bn();break;case 8:case 46:ie&&!t.config.allowInput&&(W.preventDefault(),t.clear());break;case 37:case 39:if(!Pe&&!ie){W.preventDefault();var De=l();if(t.daysContainer!==void 0&&(le===!1||De&&Ze(De))){var We=W.keyCode===39?1:-1;W.ctrlKey?(W.stopPropagation(),ee(We),P(D(1),0)):P(void 0,We)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:W.preventDefault();var Re=W.keyCode===40?1:-1;t.daysContainer&&Z.$i!==void 0||Z===t.input||Z===t.altInput?W.ctrlKey?(W.stopPropagation(),Se(t.currentYear-Re),P(D(1),0)):Pe||P(void 0,Re*7):Z===t.currentYearElement?Se(t.currentYear-Re):t.config.enableTime&&(!Pe&&t.hourElement&&t.hourElement.focus(),a(W),t._debouncedChange());break;case 9:if(Pe){var Ue=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(On){return On}),St=Ue.indexOf(Z);if(St!==-1){var oi=Ue[St+(W.shiftKey?-1:1)];W.preventDefault(),(oi||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(Z)&&W.shiftKey&&(W.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&Z===t.amPM)switch(W.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),nn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),nn();break}(ie||Ve(Z))&&we("onKeyDown",W)}function Ke(W,Z){if(Z===void 0&&(Z="flatpickr-day"),!(t.selectedDates.length!==1||W&&(!W.classList.contains(Z)||W.classList.contains("flatpickr-disabled")))){for(var ie=W?W.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),le=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Te=Math.min(ie,t.selectedDates[0].getTime()),Le=Math.max(ie,t.selectedDates[0].getTime()),Pe=!1,De=0,We=0,Re=Te;ReTe&&ReDe)?De=Re:Re>le&&(!We||Re ."+Z));Ue.forEach(function(St){var oi=St.dateObj,On=oi.getTime(),js=De>0&&On0&&On>We;if(js){St.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(cs){St.classList.remove(cs)});return}else if(Pe&&!js)return;["startRange","inRange","endRange","notAllowed"].forEach(function(cs){St.classList.remove(cs)}),W!==void 0&&(W.classList.add(ie<=t.selectedDates[0].getTime()?"startRange":"endRange"),leie&&On===le&&St.classList.add("endRange"),On>=De&&(We===0||On<=We)&&K$(On,le,ie)&&St.classList.add("inRange"))})}}function $t(){t.isOpen&&!t.config.static&&!t.config.inline&&Ft()}function me(W,Z){if(Z===void 0&&(Z=t._positionElement),t.isMobile===!0){if(W){W.preventDefault();var ie=En(W);ie&&ie.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),we("onOpen");return}else if(t._input.disabled||t.config.inline)return;var le=t.isOpen;t.isOpen=!0,le||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),we("onOpen"),Ft(Z)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(W===void 0||!t.timeContainer.contains(W.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function ye(W){return function(Z){var ie=t.config["_"+W+"Date"]=t.parseDate(Z,t.config.dateFormat),le=t.config["_"+(W==="min"?"max":"min")+"Date"];ie!==void 0&&(t[W==="min"?"minDateHasTime":"maxDateHasTime"]=ie.getHours()>0||ie.getMinutes()>0||ie.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Te){return Me(Te)}),!t.selectedDates.length&&W==="min"&&d(ie),nn()),t.daysContainer&&(at(),ie!==void 0?t.currentYearElement[W]=ie.getFullYear().toString():t.currentYearElement.removeAttribute(W),t.currentYearElement.disabled=!!le&&ie!==void 0&&le.getFullYear()===ie.getFullYear())}}function Je(){var W=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],Z=fn(fn({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ie={};t.config.parseDate=Z.parseDate,t.config.formatDate=Z.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Ue){t.config._enable=Cn(Ue)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Ue){t.config._disable=Cn(Ue)}});var le=Z.mode==="time";if(!Z.dateFormat&&(Z.enableTime||le)){var Te=Kt.defaultConfig.dateFormat||Ss.dateFormat;ie.dateFormat=Z.noCalendar||le?"H:i"+(Z.enableSeconds?":S":""):Te+" H:i"+(Z.enableSeconds?":S":"")}if(Z.altInput&&(Z.enableTime||le)&&!Z.altFormat){var Le=Kt.defaultConfig.altFormat||Ss.altFormat;ie.altFormat=Z.noCalendar||le?"h:i"+(Z.enableSeconds?":S K":" K"):Le+(" h:i"+(Z.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:ye("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:ye("max")});var Pe=function(Ue){return function(St){t.config[Ue==="min"?"_minTime":"_maxTime"]=t.parseDate(St,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Pe("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Pe("max")}),Z.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ie,Z);for(var De=0;De-1?t.config[Re]=Er(We[Re]).map(o).concat(t.config[Re]):typeof Z[Re]>"u"&&(t.config[Re]=We[Re])}Z.altInputClass||(t.config.altInputClass=Oe().className+" "+t.config.altInputClass),we("onParseConfig")}function Oe(){return t.config.wrap?n.querySelector("[data-input]"):n}function mt(){typeof t.config.locale!="object"&&typeof Kt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=fn(fn({},Kt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Kt.l10ns[t.config.locale]:void 0),xi.D="("+t.l10n.weekdays.shorthand.join("|")+")",xi.l="("+t.l10n.weekdays.longhand.join("|")+")",xi.M="("+t.l10n.months.shorthand.join("|")+")",xi.F="("+t.l10n.months.longhand.join("|")+")",xi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var W=fn(fn({},e),JSON.parse(JSON.stringify(n.dataset||{})));W.time_24hr===void 0&&Kt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=v1(t),t.parseDate=da({config:t.config,l10n:t.l10n})}function Ft(W){if(typeof t.config.position=="function")return void t.config.position(t,W);if(t.calendarContainer!==void 0){we("onPreCalendarPosition");var Z=W||t._positionElement,ie=Array.prototype.reduce.call(t.calendarContainer.children,function(F1,N1){return F1+N1.offsetHeight},0),le=t.calendarContainer.offsetWidth,Te=t.config.position.split(" "),Le=Te[0],Pe=Te.length>1?Te[1]:null,De=Z.getBoundingClientRect(),We=window.innerHeight-De.bottom,Re=Le==="above"||Le!=="below"&&Weie,Ue=window.pageYOffset+De.top+(Re?-ie-2:Z.offsetHeight+2);if(hn(t.calendarContainer,"arrowTop",!Re),hn(t.calendarContainer,"arrowBottom",Re),!t.config.inline){var St=window.pageXOffset+De.left,oi=!1,On=!1;Pe==="center"?(St-=(le-De.width)/2,oi=!0):Pe==="right"&&(St-=le-De.width,On=!0),hn(t.calendarContainer,"arrowLeft",!oi&&!On),hn(t.calendarContainer,"arrowCenter",oi),hn(t.calendarContainer,"arrowRight",On);var js=window.document.body.offsetWidth-(window.pageXOffset+De.right),cs=St+le>window.document.body.offsetWidth,O1=js+le>window.document.body.offsetWidth;if(hn(t.calendarContainer,"rightMost",cs),!t.config.static)if(t.calendarContainer.style.top=Ue+"px",!cs)t.calendarContainer.style.left=St+"px",t.calendarContainer.style.right="auto";else if(!O1)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=js+"px";else{var er=rn();if(er===void 0)return;var E1=window.document.body.offsetWidth,D1=Math.max(0,E1/2-le/2),A1=".flatpickr-calendar.centerMost:before",I1=".flatpickr-calendar.centerMost:after",L1=er.cssRules.length,P1="{left:"+De.left+"px;right:auto;}";hn(t.calendarContainer,"rightMost",!1),hn(t.calendarContainer,"centerMost",!0),er.insertRule(A1+","+I1+P1,L1),t.calendarContainer.style.left=D1+"px",t.calendarContainer.style.right="auto"}}}}function rn(){for(var W=null,Z=0;Zt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=le,t.config.mode==="single")t.selectedDates=[Te];else if(t.config.mode==="multiple"){var Pe=Wt(Te);Pe?t.selectedDates.splice(parseInt(Pe),1):t.selectedDates.push(Te)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Te,t.selectedDates.push(Te),Dn(Te,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Ue,St){return Ue.getTime()-St.getTime()}));if(c(),Le){var De=t.currentYear!==Te.getFullYear();t.currentYear=Te.getFullYear(),t.currentMonth=Te.getMonth(),De&&(we("onYearChange"),R()),we("onMonthChange")}if(an(),N(),nn(),!Le&&t.config.mode!=="range"&&t.config.showMonths===1?E(le):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var We=t.config.mode==="single"&&!t.config.enableTime,Re=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(We||Re)&&bn()}_()}}var Tn={locale:[mt,G],showMonths:[B,r,X],minDate:[S],maxDate:[S],positionElement:[Gt],clickOpens:[function(){t.config.clickOpens===!0?(m(t._input,"focus",t.open),m(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function li(W,Z){if(W!==null&&typeof W=="object"){Object.assign(t.config,W);for(var ie in W)Tn[ie]!==void 0&&Tn[ie].forEach(function(le){return le()})}else t.config[W]=Z,Tn[W]!==void 0?Tn[W].forEach(function(le){return le()}):Or.indexOf(W)>-1&&(t.config[W]=Er(Z));t.redraw(),nn(!0)}function Gn(W,Z){var ie=[];if(W instanceof Array)ie=W.map(function(le){return t.parseDate(le,Z)});else if(W instanceof Date||typeof W=="number")ie=[t.parseDate(W,Z)];else if(typeof W=="string")switch(t.config.mode){case"single":case"time":ie=[t.parseDate(W,Z)];break;case"multiple":ie=W.split(t.config.conjunction).map(function(le){return t.parseDate(le,Z)});break;case"range":ie=W.split(t.l10n.rangeSeparator).map(function(le){return t.parseDate(le,Z)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(W)));t.selectedDates=t.config.allowInvalidPreload?ie:ie.filter(function(le){return le instanceof Date&&Me(le,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(le,Te){return le.getTime()-Te.getTime()})}function mi(W,Z,ie){if(Z===void 0&&(Z=!1),ie===void 0&&(ie=t.config.dateFormat),W!==0&&!W||W instanceof Array&&W.length===0)return t.clear(Z);Gn(W,ie),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),S(void 0,Z),d(),t.selectedDates.length===0&&t.clear(!1),nn(Z),Z&&we("onChange")}function Cn(W){return W.slice().map(function(Z){return typeof Z=="string"||typeof Z=="number"||Z instanceof Date?t.parseDate(Z,void 0,!0):Z&&typeof Z=="object"&&Z.from&&Z.to?{from:t.parseDate(Z.from,void 0),to:t.parseDate(Z.to,void 0)}:Z}).filter(function(Z){return Z})}function dt(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var W=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);W&&Gn(W,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Mn(){if(t.input=Oe(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=ct(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Gt()}function Gt(){t._positionElement=t.config.positionElement||t._input}function Xn(){var W=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=ct("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=W,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=W==="datetime-local"?"Y-m-d\\TH:i:S":W==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}m(t.mobileInput,"change",function(Z){t.setDate(En(Z).value,!1,t.mobileFormatStr),we("onChange"),we("onClose")})}function ge(W){if(t.isOpen===!0)return t.close();t.open(W)}function we(W,Z){if(t.config!==void 0){var ie=t.config[W];if(ie!==void 0&&ie.length>0)for(var le=0;ie[le]&&le=0&&Dn(W,t.selectedDates[1])<=0}function an(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(W,Z){var ie=new Date(t.currentYear,t.currentMonth,1);ie.setMonth(t.currentMonth+Z),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[Z].textContent=Po(ie.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ie.getMonth().toString(),W.value=ie.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Xt(W){var Z=W||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ie){return t.formatDate(ie,Z)}).filter(function(ie,le,Te){return t.config.mode!=="range"||t.config.enableTime||Te.indexOf(ie)===le}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function nn(W){W===void 0&&(W=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Xt(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Xt(t.config.altFormat)),W!==!1&&we("onValueUpdate")}function pn(W){var Z=En(W),ie=t.prevMonthNav.contains(Z),le=t.nextMonthNav.contains(Z);ie||le?ee(ie?-1:1):t.yearElements.indexOf(Z)>=0?Z.select():Z.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):Z.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Ll(W){W.preventDefault();var Z=W.type==="keydown",ie=En(W),le=ie;t.amPM!==void 0&&ie===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]);var Te=parseFloat(le.getAttribute("min")),Le=parseFloat(le.getAttribute("max")),Pe=parseFloat(le.getAttribute("step")),De=parseInt(le.value,10),We=W.delta||(Z?W.which===38?1:-1:0),Re=De+Pe*We;if(typeof le.value<"u"&&le.value.length===2){var Ue=le===t.hourElement,St=le===t.minuteElement;ReLe&&(Re=le===t.hourElement?Re-Le-Vn(!t.amPM):Te,St&&$(void 0,1,t.hourElement)),t.amPM&&Ue&&(Pe===1?Re+De===23:Math.abs(Re-De)>Pe)&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]),le.value=vn(Re)}}return s(),t}function $s(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function tT(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=xe(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:u="",element:f=void 0,dateFormat:c=void 0}=e,{options:d={}}=e,h=!1,{input:g=void 0,flatpickr:m=void 0}=e;Zt(()=>{const $=f??g,C=y(d);return C.onReady.push((M,E,D)=>{a===void 0&&S(M,E,D),ln().then(()=>{t(8,h=!0)})}),t(3,m=Kt($,Object.assign(C,f?{wrap:!0}:{}))),()=>{m.destroy()}});const _=wt();function y($={}){$=Object.assign({},$);for(const C of r){const M=(E,D,I)=>{_(eT(C),[E,D,I])};C in $?(Array.isArray($[C])||($[C]=[$[C]]),$[C].push(M)):$[C]=[M]}return $.onChange&&!$.onChange.includes(S)&&$.onChange.push(S),$}function S($,C,M){const E=Qc(M,$);!xc(a,E)&&(a||E)&&t(2,a=E),t(4,u=C)}function T($){ne[$?"unshift":"push"](()=>{g=$,t(0,g)})}return n.$$set=$=>{e=je(je({},e),xt($)),t(1,s=xe(e,i)),"value"in $&&t(2,a=$.value),"formattedValue"in $&&t(4,u=$.formattedValue),"element"in $&&t(5,f=$.element),"dateFormat"in $&&t(6,c=$.dateFormat),"options"in $&&t(7,d=$.options),"input"in $&&t(0,g=$.input),"flatpickr"in $&&t(3,m=$.flatpickr),"$$scope"in $&&t(9,o=$.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&m&&h&&(xc(a,Qc(m,m.selectedDates))||m.setDate(a,!0,c)),n.$$.dirty&392&&m&&h)for(const[$,C]of Object.entries(y(d)))m.set($,C)},[g,s,a,m,u,f,c,d,h,o,l,T]}class iu extends ve{constructor(e){super(),be(this,e,tT,x$,he,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function nT(n){let e,t,i,s,l,o,r,a;function u(d){n[6](d)}function f(d){n[7](d)}let c={id:n[15],options:z.defaultFlatpickrOptions()};return n[2]!==void 0&&(c.value=n[2]),n[0].options.min!==void 0&&(c.formattedValue=n[0].options.min),l=new iu({props:c}),ne.push(()=>de(l,"value",u)),ne.push(()=>de(l,"formattedValue",f)),l.$on("close",n[8]),{c(){e=v("label"),t=U("Min date (UTC)"),s=O(),V(l.$$.fragment),p(e,"for",i=n[15])},m(d,h){w(d,e,h),b(e,t),w(d,s,h),j(l,d,h),a=!0},p(d,h){(!a||h&32768&&i!==(i=d[15]))&&p(e,"for",i);const g={};h&32768&&(g.id=d[15]),!o&&h&4&&(o=!0,g.value=d[2],_e(()=>o=!1)),!r&&h&1&&(r=!0,g.formattedValue=d[0].options.min,_e(()=>r=!1)),l.$set(g)},i(d){a||(A(l.$$.fragment,d),a=!0)},o(d){L(l.$$.fragment,d),a=!1},d(d){d&&(k(e),k(s)),H(l,d)}}}function iT(n){let e,t,i,s,l,o,r,a;function u(d){n[9](d)}function f(d){n[10](d)}let c={id:n[15],options:z.defaultFlatpickrOptions()};return n[3]!==void 0&&(c.value=n[3]),n[0].options.max!==void 0&&(c.formattedValue=n[0].options.max),l=new iu({props:c}),ne.push(()=>de(l,"value",u)),ne.push(()=>de(l,"formattedValue",f)),l.$on("close",n[11]),{c(){e=v("label"),t=U("Max date (UTC)"),s=O(),V(l.$$.fragment),p(e,"for",i=n[15])},m(d,h){w(d,e,h),b(e,t),w(d,s,h),j(l,d,h),a=!0},p(d,h){(!a||h&32768&&i!==(i=d[15]))&&p(e,"for",i);const g={};h&32768&&(g.id=d[15]),!o&&h&8&&(o=!0,g.value=d[3],_e(()=>o=!1)),!r&&h&1&&(r=!0,g.formattedValue=d[0].options.max,_e(()=>r=!1)),l.$set(g)},i(d){a||(A(l.$$.fragment,d),a=!0)},o(d){L(l.$$.fragment,d),a=!1},d(d){d&&(k(e),k(s)),H(l,d)}}}function sT(n){let e,t,i,s,l,o,r;return i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[nT,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[iT,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&98309&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&98313&&(c.$$scope={dirty:u,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 lT(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[12](r)}let o={$$slots:{options:[sT]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[13]),e.$on("remove",n[14]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&34?kt(s,[a&2&&{key:r[1]},a&32&&Pt(r[5])]):{};a&65551&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function oT(n,e,t){var T,$;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e,r=(T=l==null?void 0:l.options)==null?void 0:T.min,a=($=l==null?void 0:l.options)==null?void 0:$.max;function u(C,M){C.detail&&C.detail.length==3&&t(0,l.options[M]=C.detail[1],l)}function f(C){r=C,t(2,r),t(0,l)}function c(C){n.$$.not_equal(l.options.min,C)&&(l.options.min=C,t(0,l))}const d=C=>u(C,"min");function h(C){a=C,t(3,a),t(0,l)}function g(C){n.$$.not_equal(l.options.max,C)&&(l.options.max=C,t(0,l))}const m=C=>u(C,"max");function _(C){l=C,t(0,l)}function y(C){Ne.call(this,n,C)}function S(C){Ne.call(this,n,C)}return n.$$set=C=>{e=je(je({},e),xt(C)),t(5,s=xe(e,i)),"field"in C&&t(0,l=C.field),"key"in C&&t(1,o=C.key)},n.$$.update=()=>{var C,M,E,D;n.$$.dirty&5&&r!=((C=l==null?void 0:l.options)==null?void 0:C.min)&&t(2,r=(M=l==null?void 0:l.options)==null?void 0:M.min),n.$$.dirty&9&&a!=((E=l==null?void 0:l.options)==null?void 0:E.max)&&t(3,a=(D=l==null?void 0:l.options)==null?void 0:D.max)},[l,o,r,a,u,s,f,c,d,h,g,m,_,y,S]}class rT extends ve{constructor(e){super(),be(this,e,oT,lT,he,{field:0,key:1})}}const aT=n=>({}),ed=n=>({});function td(n,e,t){const i=n.slice();return i[47]=e[t],i}const uT=n=>({}),nd=n=>({});function id(n,e,t){const i=n.slice();return i[47]=e[t],i[51]=t,i}function sd(n){let e,t,i;return{c(){e=v("div"),t=U(n[2]),i=O(),p(e,"class","block txt-placeholder"),Q(e,"link-hint",!n[5]&&!n[6])},m(s,l){w(s,e,l),b(e,t),b(e,i)},p(s,l){l[0]&4&&se(t,s[2]),l[0]&96&&Q(e,"link-hint",!s[5]&&!s[6])},d(s){s&&k(e)}}}function fT(n){let e,t=n[47]+"",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt")},m(s,l){w(s,e,l),b(e,i)},p(s,l){l[0]&1&&t!==(t=s[47]+"")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function cT(n){let e,t,i;const s=[{item:n[47]},n[10]];var l=n[9];function o(r,a){let u={};if(a!==void 0&&a[0]&1025)u=kt(s,[a[0]&1&&{item:r[47]},a[0]&1024&&Pt(r[10])]);else for(let f=0;f{H(u,1)}),ae()}l?(e=Dt(l,o(r,a)),V(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else if(l){const u=a[0]&1025?kt(s,[a[0]&1&&{item:r[47]},a[0]&1024&&Pt(r[10])]):{};e.$set(u)}},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&H(e,r)}}}function ld(n){let e,t,i;function s(){return n[35](n[47])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){w(l,e,o),t||(i=[$e(He.call(null,e,"Clear")),Y(e,"click",Fn(Qe(s)))],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Ce(i)}}}function od(n){let e,t,i,s,l,o;const r=[cT,fT],a=[];function u(c,d){return c[9]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[7])&&ld(n);return{c(){e=v("div"),i.c(),s=O(),f&&f.c(),l=O(),p(e,"class","option")},m(c,d){w(c,e,d),a[t].m(e,null),b(e,s),f&&f.m(e,null),b(e,l),o=!0},p(c,d){let h=t;t=u(c),t===h?a[t].p(c,d):(re(),L(a[h],1,1,()=>{a[h]=null}),ae(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[7]?f?f.p(c,d):(f=ld(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(A(i),o=!0)},o(c){L(i),o=!1},d(c){c&&k(e),a[t].d(),f&&f.d()}}}function rd(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[19],$$slots:{default:[hT]},$$scope:{ctx:n}};return e=new Rn({props:i}),n[40](e),e.$on("show",n[25]),e.$on("hide",n[41]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&524288&&(o.trigger=s[19]),l[0]&3225866|l[1]&4096&&(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[40](null),H(e,s)}}}function ad(n){let e,t,i,s,l,o,r,a,u=n[16].length&&ud(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=O(),l=v("input"),o=O(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){w(f,e,c),b(e,t),b(t,i),b(t,s),b(t,l),oe(l,n[16]),b(t,o),u&&u.m(t,null),l.focus(),r||(a=Y(l,"input",n[37]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&65536&&l.value!==f[16]&&oe(l,f[16]),f[16].length?u?u.p(f,c):(u=ud(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&k(e),u&&u.d(),r=!1,a()}}}function ud(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent clear"),p(e,"class","addon suffix p-r-5")},m(l,o){w(l,e,o),b(e,t),i||(s=Y(t,"click",Fn(Qe(n[22]))),i=!0)},p:x,d(l){l&&k(e),i=!1,s()}}}function fd(n){let e,t=n[1]&&cd(n);return{c(){t&&t.c(),e=ke()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=cd(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){i&&k(e),t&&t.d(i)}}}function cd(n){let e,t;return{c(){e=v("div"),t=U(n[1]),p(e,"class","txt-missing")},m(i,s){w(i,e,s),b(e,t)},p(i,s){s[0]&2&&se(t,i[1])},d(i){i&&k(e)}}}function dT(n){let e=n[47]+"",t;return{c(){t=U(e)},m(i,s){w(i,t,s)},p(i,s){s[0]&2097152&&e!==(e=i[47]+"")&&se(t,e)},i:x,o:x,d(i){i&&k(t)}}}function pT(n){let e,t,i;const s=[{item:n[47]},n[12]];var l=n[11];function o(r,a){let u={};if(a!==void 0&&a[0]&2101248)u=kt(s,[a[0]&2097152&&{item:r[47]},a[0]&4096&&Pt(r[12])]);else for(let f=0;f{H(u,1)}),ae()}l?(e=Dt(l,o(r,a)),V(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else if(l){const u=a[0]&2101248?kt(s,[a[0]&2097152&&{item:r[47]},a[0]&4096&&Pt(r[12])]):{};e.$set(u)}},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&H(e,r)}}}function dd(n){let e,t,i,s,l,o,r;const a=[pT,dT],u=[];function f(h,g){return h[11]?0:1}t=f(n),i=u[t]=a[t](n);function c(...h){return n[38](n[47],...h)}function d(...h){return n[39](n[47],...h)}return{c(){e=v("div"),i.c(),s=O(),p(e,"tabindex","0"),p(e,"class","dropdown-item option"),Q(e,"closable",n[8]),Q(e,"selected",n[20](n[47]))},m(h,g){w(h,e,g),u[t].m(e,null),b(e,s),l=!0,o||(r=[Y(e,"click",c),Y(e,"keydown",d)],o=!0)},p(h,g){n=h;let m=t;t=f(n),t===m?u[t].p(n,g):(re(),L(u[m],1,1,()=>{u[m]=null}),ae(),i=u[t],i?i.p(n,g):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||g[0]&256)&&Q(e,"closable",n[8]),(!l||g[0]&3145728)&&Q(e,"selected",n[20](n[47]))},i(h){l||(A(i),l=!0)},o(h){L(i),l=!1},d(h){h&&k(e),u[t].d(),o=!1,Ce(r)}}}function hT(n){let e,t,i,s,l,o=n[13]&&ad(n);const r=n[34].beforeOptions,a=Ct(r,n,n[43],nd);let u=pe(n[21]),f=[];for(let m=0;mL(f[m],1,1,()=>{f[m]=null});let d=null;u.length||(d=fd(n));const h=n[34].afterOptions,g=Ct(h,n,n[43],ed);return{c(){o&&o.c(),e=O(),a&&a.c(),t=O(),i=v("div");for(let m=0;mL(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=sd(n));let c=!n[5]&&!n[6]&&rd(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),ae()),(!o||h[0]&16384&&l!==(l="select "+d[14]))&&p(e,"class",l),(!o||h[0]&16400)&&Q(e,"multiple",d[4]),(!o||h[0]&16416)&&Q(e,"disabled",d[5]),(!o||h[0]&16448)&&Q(e,"readonly",d[6])},i(d){if(!o){for(let h=0;hJe(Oe,ye))||[]}function te(me,ye){me.preventDefault(),_&&d?B(ye):q(ye)}function Ee(me,ye){(me.code==="Enter"||me.code==="Space")&&(te(me,ye),y&&X())}function Fe(){ue(),setTimeout(()=>{const me=F==null?void 0:F.querySelector(".dropdown-item.option.selected");me&&(me.focus(),me.scrollIntoView({block:"nearest"}))},0)}function Ve(me){me.stopPropagation(),!g&&!h&&(I==null||I.toggle())}Zt(()=>{const me=document.querySelectorAll(`label[for="${r}"]`);for(const ye of me)ye.addEventListener("click",Ve);return()=>{for(const ye of me)ye.removeEventListener("click",Ve)}});const ze=me=>R(me);function Se(me){ne[me?"unshift":"push"](()=>{N=me,t(19,N)})}function Me(){P=this.value,t(16,P)}const Ze=(me,ye)=>te(ye,me),bt=(me,ye)=>Ee(ye,me);function Ge(me){ne[me?"unshift":"push"](()=>{I=me,t(17,I)})}function Ke(me){Ne.call(this,n,me)}function $t(me){ne[me?"unshift":"push"](()=>{F=me,t(18,F)})}return n.$$set=me=>{"id"in me&&t(26,r=me.id),"noOptionsText"in me&&t(1,a=me.noOptionsText),"selectPlaceholder"in me&&t(2,u=me.selectPlaceholder),"searchPlaceholder"in me&&t(3,f=me.searchPlaceholder),"items"in me&&t(27,c=me.items),"multiple"in me&&t(4,d=me.multiple),"disabled"in me&&t(5,h=me.disabled),"readonly"in me&&t(6,g=me.readonly),"selected"in me&&t(0,m=me.selected),"toggle"in me&&t(7,_=me.toggle),"closable"in me&&t(8,y=me.closable),"labelComponent"in me&&t(9,S=me.labelComponent),"labelComponentProps"in me&&t(10,T=me.labelComponentProps),"optionComponent"in me&&t(11,$=me.optionComponent),"optionComponentProps"in me&&t(12,C=me.optionComponentProps),"searchable"in me&&t(13,M=me.searchable),"searchFunc"in me&&t(28,E=me.searchFunc),"class"in me&&t(14,D=me.class),"$$scope"in me&&t(43,o=me.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&134217728&&c&&(G(),ue()),n.$$.dirty[0]&134283264&&t(21,i=ee(c,P)),n.$$.dirty[0]&1&&t(20,s=function(me){const ye=z.toArray(m);return z.inArray(ye,me)})},[m,a,u,f,d,h,g,_,y,S,T,$,C,M,D,R,P,I,F,N,s,i,ue,te,Ee,Fe,r,c,E,q,B,K,J,X,l,ze,Se,Me,Ze,bt,Ge,Ke,$t,o]}class y1 extends ve{constructor(e){super(),be(this,e,_T,mT,he,{id:26,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:27,multiple:4,disabled:5,readonly:6,selected:0,toggle:7,closable:8,labelComponent:9,labelComponentProps:10,optionComponent:11,optionComponentProps:12,searchable:13,searchFunc:28,class:14,deselectItem:15,selectItem:29,toggleItem:30,reset:31,showDropdown:32,hideDropdown:33},null,[-1,-1])}get deselectItem(){return this.$$.ctx[15]}get selectItem(){return this.$$.ctx[29]}get toggleItem(){return this.$$.ctx[30]}get reset(){return this.$$.ctx[31]}get showDropdown(){return this.$$.ctx[32]}get hideDropdown(){return this.$$.ctx[33]}}function pd(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&k(e)}}}function bT(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&pd(n);return{c(){l&&l.c(),e=O(),t=v("span"),s=U(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),w(o,e,r),w(o,t,r),b(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=pd(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&se(s,i)},i:x,o:x,d(o){o&&(k(e),k(t)),l&&l.d(o)}}}function vT(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,vT,bT,he,{item:0})}}const yT=n=>({}),md=n=>({});function kT(n){let e;const t=n[8].afterOptions,i=Ct(t,n,n[12],md);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&Ot(i,t,s,s[12],e?Mt(t,s[12],l,yT):Et(s[12]),md)},i(s){e||(A(i,s),e=!0)},o(s){L(i,s),e=!1},d(s){i&&i.d(s)}}}function wT(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[kT]},$$scope:{ctx:n}};for(let r=0;rde(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&62?kt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Pt(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function ST(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=xe(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=hd}=e,{optionComponent:c=hd}=e,{selectionKey:d="value"}=e,{keyOfSelected:h=a?[]:void 0}=e;function g(T){T=z.toArray(T,!0);let $=[];for(let C of T){const M=z.findByKey(r,d,C);M&&$.push(M)}T.length&&!$.length||t(0,u=a?$:$[0])}async function m(T){let $=z.toArray(T,!0).map(C=>C[d]);r.length&&t(6,h=a?$:$[0])}function _(T){u=T,t(0,u)}function y(T){Ne.call(this,n,T)}function S(T){Ne.call(this,n,T)}return n.$$set=T=>{e=je(je({},e),xt(T)),t(5,s=xe(e,i)),"items"in T&&t(1,r=T.items),"multiple"in T&&t(2,a=T.multiple),"selected"in T&&t(0,u=T.selected),"labelComponent"in T&&t(3,f=T.labelComponent),"optionComponent"in T&&t(4,c=T.optionComponent),"selectionKey"in T&&t(7,d=T.selectionKey),"keyOfSelected"in T&&t(6,h=T.keyOfSelected),"$$scope"in T&&t(12,o=T.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&g(h),n.$$.dirty&1&&m(u)},[u,r,a,f,c,s,h,d,l,_,y,S,o]}class Bi extends ve{constructor(e){super(),be(this,e,ST,wT,he,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function $T(n){let e,t,i,s,l,o;function r(u){n[7](u)}let a={id:n[13],placeholder:"Choices: eg. optionA, optionB",required:!0,readonly:!n[14]};return n[0].options.values!==void 0&&(a.value=n[0].options.values),t=new Rs({props:a}),ne.push(()=>de(t,"value",r)),{c(){e=v("div"),V(t.$$.fragment)},m(u,f){w(u,e,f),j(t,e,null),s=!0,l||(o=$e(He.call(null,e,{text:"Choices (comma separated)",position:"top-left",delay:700})),l=!0)},p(u,f){const c={};f&8192&&(c.id=u[13]),f&16384&&(c.readonly=!u[14]),!i&&f&1&&(i=!0,c.value=u[0].options.values,_e(()=>i=!1)),t.$set(c)},i(u){s||(A(t.$$.fragment,u),s=!0)},o(u){L(t.$$.fragment,u),s=!1},d(u){u&&k(e),H(t),l=!1,o()}}}function TT(n){let e,t,i;function s(o){n[8](o)}let l={id:n[13],items:n[3],readonly:!n[14]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&8192&&(a.id=o[13]),r&16384&&(a.readonly=!o[14]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],_e(()=>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 CT(n){let e,t,i,s,l,o,r,a,u,f;return i=new ce({props:{class:"form-field required "+(n[14]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.values",$$slots:{default:[$T,({uniqueId:c})=>({13:c}),({uniqueId:c})=>c?8192:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field form-field-single-multiple-select "+(n[14]?"":"readonly"),inlineError:!0,$$slots:{default:[TT,({uniqueId:c})=>({13:c}),({uniqueId:c})=>c?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),V(i.$$.fragment),s=O(),l=v("div"),o=O(),V(r.$$.fragment),a=O(),u=v("div"),p(e,"class","separator"),p(l,"class","separator"),p(u,"class","separator")},m(c,d){w(c,e,d),w(c,t,d),j(i,c,d),w(c,s,d),w(c,l,d),w(c,o,d),j(r,c,d),w(c,a,d),w(c,u,d),f=!0},p(c,d){const h={};d&16384&&(h.class="form-field required "+(c[14]?"":"readonly")),d&2&&(h.name="schema."+c[1]+".options.values"),d&57345&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const g={};d&16384&&(g.class="form-field form-field-single-multiple-select "+(c[14]?"":"readonly")),d&57348&&(g.$$scope={dirty:d,ctx:c}),r.$set(g)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),f=!0)},o(c){L(i.$$.fragment,c),L(r.$$.fragment,c),f=!1},d(c){c&&(k(e),k(t),k(s),k(l),k(o),k(a),k(u)),H(i,c),H(r,c)}}}function gd(n){let e,t;return e=new ce({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[MT,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.maxSelect"),s&40961&&(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 MT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=O(),l=v("input"),p(e,"for",i=n[13]),p(l,"id",o=n[13]),p(l,"type","number"),p(l,"step","1"),p(l,"min","2"),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].options.maxSelect),r||(a=Y(l,"input",n[6]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&p(e,"for",i),f&8192&&o!==(o=u[13])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.maxSelect&&oe(l,u[0].options.maxSelect)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function OT(n){let e,t,i=!n[2]&&gd(n);return{c(){i&&i.c(),e=ke()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,l){s[2]?i&&(re(),L(i,1,1,()=>{i=null}),ae()):i?(i.p(s,l),l&4&&A(i,1)):(i=gd(s),i.c(),A(i,1),i.m(e.parentNode,e))},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){s&&k(e),i&&i.d(s)}}}function ET(n){let e,t,i;const s=[{key:n[1]},n[4]];function l(r){n[9](r)}let o={$$slots:{options:[OT],default:[CT,({interactive:r})=>({14:r}),({interactive:r})=>r?16384:0]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[10]),e.$on("remove",n[11]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&18?kt(s,[a&2&&{key:r[1]},a&16&&Pt(r[4])]):{};a&49159&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function DT(n,e,t){var y;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=((y=l.options)==null?void 0:y.maxSelect)<=1,u=a;function f(){t(0,l.options={maxSelect:1,values:[]},l),t(2,a=!0),t(5,u=a)}function c(){l.options.maxSelect=ht(this.value),t(0,l),t(5,u),t(2,a)}function d(S){n.$$.not_equal(l.options.values,S)&&(l.options.values=S,t(0,l),t(5,u),t(2,a))}function h(S){a=S,t(2,a)}function g(S){l=S,t(0,l),t(5,u),t(2,a)}function m(S){Ne.call(this,n,S)}function _(S){Ne.call(this,n,S)}return n.$$set=S=>{e=je(je({},e),xt(S)),t(4,s=xe(e,i)),"field"in S&&t(0,l=S.field),"key"in S&&t(1,o=S.key)},n.$$.update=()=>{var S,T;n.$$.dirty&37&&u!=a&&(t(5,u=a),a?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((T=(S=l.options)==null?void 0:S.values)==null?void 0:T.length)||2,l)),n.$$.dirty&1&&z.isEmpty(l.options)&&f()},[l,o,a,r,s,u,c,d,h,g,m,_]}class AT extends ve{constructor(e){super(),be(this,e,DT,ET,he,{field:0,key:1})}}function IT(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function LT(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function _d(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M,E='"{"a":1,"b":2}"',D,I,P,F,N,R,q,B,K,J,X,G,ue;return{c(){e=v("div"),t=v("div"),i=v("div"),s=U("In order to support seamlessly both "),l=v("code"),l.textContent="application/json",o=U(` and + `),r=v("code"),r.textContent="multipart/form-data",a=U(` + requests, the following normalization rules are applied if the `),u=v("code"),u.textContent="json",f=U(` field + is a + `),c=v("strong"),c.textContent="plain string",d=U(`: + `),h=v("ul"),g=v("li"),g.innerHTML=""true" is converted to the json true",m=O(),_=v("li"),_.innerHTML=""false" is converted to the json false",y=O(),S=v("li"),S.innerHTML=""null" is converted to the json null",T=O(),$=v("li"),$.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",C=O(),M=v("li"),D=U(E),I=U(" is converted to the json "),P=v("code"),P.textContent='{"a":1,"b":2}',F=O(),N=v("li"),N.textContent="numeric strings are converted to json number",R=O(),q=v("li"),q.textContent="double quoted strings are left as they are (aka. without normalizations)",B=O(),K=v("li"),K.textContent="any other string (empty string too) is double quoted",J=U(` + Alternatively, if you want to avoid the string value normalizations, you can wrap your + data inside an object, eg.`),X=v("code"),X.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(ee,te){w(ee,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,u),b(i,f),b(i,c),b(i,d),b(i,h),b(h,g),b(h,m),b(h,_),b(h,y),b(h,S),b(h,T),b(h,$),b(h,C),b(h,M),b(M,D),b(M,I),b(M,P),b(h,F),b(h,N),b(h,R),b(h,q),b(h,B),b(h,K),b(i,J),b(i,X),ue=!0},i(ee){ue||(ee&&Xe(()=>{ue&&(G||(G=qe(e,nt,{duration:150},!0)),G.run(1))}),ue=!0)},o(ee){ee&&(G||(G=qe(e,nt,{duration:150},!1)),G.run(0)),ue=!1},d(ee){ee&&k(e),ee&&G&&G.end()}}}function PT(n){let e,t,i,s,l,o,r;function a(d,h){return d[2]?LT:IT}let u=a(n),f=u(n),c=n[2]&&_d();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=O(),f.c(),s=O(),c&&c.c(),l=ke(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,h){w(d,e,h),b(e,t),b(e,i),f.m(e,null),w(d,s,h),c&&c.m(d,h),w(d,l,h),o||(r=Y(e,"click",n[4]),o=!0)},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(e,null))),d[2]?c?h&4&&A(c,1):(c=_d(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(re(),L(c,1,1,()=>{c=null}),ae())},d(d){d&&(k(e),k(s),k(l)),f.d(),c&&c.d(d),o=!1,r()}}}function FT(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[PT]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&10?kt(s,[a&2&&{key:r[1]},a&8&&Pt(r[3])]):{};a&260&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function NT(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function u(d){l=d,t(0,l)}function f(d){Ne.call(this,n,d)}function c(d){Ne.call(this,n,d)}return n.$$set=d=>{e=je(je({},e),xt(d)),t(3,s=xe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,r,s,a,u,f,c]}class RT extends ve{constructor(e){super(),be(this,e,NT,FT,he,{field:0,key:1})}}function qT(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=O(),l=v("small"),r=U(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){w(a,e,u),b(e,i),w(a,s,u),w(a,l,u),b(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&se(i,t),u&1&&o!==(o=a[0].mimeType+"")&&se(r,o)},i:x,o:x,d(a){a&&(k(e),k(s),k(l))}}}function jT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class bd extends ve{constructor(e){super(),be(this,e,jT,qT,he,{item:0})}}const HT=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function VT(n){let e,t,i;function s(o){n[16](o)}let l={id:n[22],items:n[4],readonly:!n[23]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&4194304&&(a.id=o[22]),r&8388608&&(a.readonly=!o[23]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],_e(()=>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 zT(n){let e,t,i,s,l,o;return i=new ce({props:{class:"form-field form-field-single-multiple-select "+(n[23]?"":"readonly"),inlineError:!0,$$slots:{default:[VT,({uniqueId:r})=>({22:r}),({uniqueId:r})=>r?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),V(i.$$.fragment),s=O(),l=v("div"),p(e,"class","separator"),p(l,"class","separator")},m(r,a){w(r,e,a),w(r,t,a),j(i,r,a),w(r,s,a),w(r,l,a),o=!0},p(r,a){const u={};a&8388608&&(u.class="form-field form-field-single-multiple-select "+(r[23]?"":"readonly")),a&29360132&&(u.$$scope={dirty:a,ctx:r}),i.$set(u)},i(r){o||(A(i.$$.fragment,r),o=!0)},o(r){L(i.$$.fragment,r),o=!1},d(r){r&&(k(e),k(t),k(s),k(l)),H(i,r)}}}function BT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=O(),i=v("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=O(),l=v("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=O(),r=v("button"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){w(f,e,c),w(f,t,c),w(f,i,c),w(f,s,c),w(f,l,c),w(f,o,c),w(f,r,c),a||(u=[Y(e,"click",n[9]),Y(i,"click",n[10]),Y(l,"click",n[11]),Y(r,"click",n[12])],a=!0)},p:x,d(f){f&&(k(e),k(t),k(i),k(s),k(l),k(o),k(r)),a=!1,Ce(u)}}}function UT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T;function $(M){n[8](M)}let C={id:n[22],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[3],labelComponent:bd,optionComponent:bd};return n[0].options.mimeTypes!==void 0&&(C.keyOfSelected=n[0].options.mimeTypes),r=new Bi({props:C}),ne.push(()=>de(r,"keyOfSelected",$)),_=new Rn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[BT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Allowed mime types",i=O(),s=v("i"),o=O(),V(r.$$.fragment),u=O(),f=v("div"),c=v("button"),d=v("span"),d.textContent="Choose presets",h=O(),g=v("i"),m=O(),V(_.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[22]),p(d,"class","txt link-primary"),p(g,"class","ri-arrow-drop-down-fill"),p(c,"type","button"),p(c,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(M,E){w(M,e,E),b(e,t),b(e,i),b(e,s),w(M,o,E),j(r,M,E),w(M,u,E),w(M,f,E),b(f,c),b(c,d),b(c,h),b(c,g),b(c,m),j(_,c,null),y=!0,S||(T=$e(He.call(null,s,{text:`Allow files ONLY with the listed mime types. + Leave empty for no restriction.`,position:"top"})),S=!0)},p(M,E){(!y||E&4194304&&l!==(l=M[22]))&&p(e,"for",l);const D={};E&4194304&&(D.id=M[22]),E&8&&(D.items=M[3]),!a&&E&1&&(a=!0,D.keyOfSelected=M[0].options.mimeTypes,_e(()=>a=!1)),r.$set(D);const I={};E&16777217&&(I.$$scope={dirty:E,ctx:M}),_.$set(I)},i(M){y||(A(r.$$.fragment,M),A(_.$$.fragment,M),y=!0)},o(M){L(r.$$.fragment,M),L(_.$$.fragment,M),y=!1},d(M){M&&(k(e),k(o),k(u),k(f)),H(r,M),H(_),S=!1,T()}}}function WT(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH + (eg. 100x50) - crop to WxH viewbox (from center)
  • WxHt + (eg. 100x50t) - crop to WxH viewbox (from top)
  • WxHb + (eg. 100x50b) - crop to WxH viewbox (from bottom)
  • WxHf + (eg. 100x50f) - fit inside a WxH viewbox (without cropping)
  • 0xH + (eg. 0x50) - resize to H height preserving the aspect ratio
  • Wx0 + (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,p(e,"class","m-0")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function YT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C;function M(D){n[13](D)}let E={id:n[22],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(E.value=n[0].options.thumbs),r=new Rs({props:E}),ne.push(()=>de(r,"value",M)),S=new Rn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[WT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=O(),s=v("i"),o=O(),V(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),h=v("button"),g=v("span"),g.textContent="Supported formats",m=O(),_=v("i"),y=O(),V(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(g,"class","txt link-primary"),p(_,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(D,I){w(D,e,I),b(e,t),b(e,i),b(e,s),w(D,o,I),j(r,D,I),w(D,u,I),w(D,f,I),b(f,c),b(f,d),b(f,h),b(h,g),b(h,m),b(h,_),b(h,y),j(S,h,null),T=!0,$||(C=$e(He.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"})),$=!0)},p(D,I){(!T||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,_e(()=>a=!1)),r.$set(P);const F={};I&16777216&&(F.$$scope={dirty:I,ctx:D}),S.$set(F)},i(D){T||(A(r.$$.fragment,D),A(S.$$.fragment,D),T=!0)},o(D){L(r.$$.fragment,D),L(S.$$.fragment,D),T=!1},d(D){D&&(k(e),k(o),k(u),k(f)),H(r,D),H(S),$=!1,C()}}}function KT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Max file size"),s=O(),l=v("input"),r=O(),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),oe(l,n[0].options.maxSize),w(c,r,d),w(c,a,d),u||(f=Y(l,"input",n[14]),u=!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&&ht(l.value)!==c[0].options.maxSize&&oe(l,c[0].options.maxSize)},d(c){c&&(k(e),k(s),k(l),k(r),k(a)),u=!1,f()}}}function vd(n){let e,t,i;return t=new ce({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[JT,({uniqueId:s})=>({22:s}),({uniqueId:s})=>s?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","col-sm-3")},m(s,l){w(s,e,l),j(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 JT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=O(),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(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].options.maxSelect),r||(a=Y(l,"input",n[15]),r=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&o!==(o=u[22])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.maxSelect&&oe(l,u[0].options.maxSelect)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function ZT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[UT,({uniqueId:m})=>({22:m}),({uniqueId:m})=>m?4194304:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[YT,({uniqueId:m})=>({22:m}),({uniqueId:m})=>m?4194304:0]},$$scope:{ctx:n}}}),f=new ce({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[KT,({uniqueId:m})=>({22:m}),({uniqueId:m})=>m?4194304:0]},$$scope:{ctx:n}}});let g=!n[2]&&vd(n);return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),a=O(),u=v("div"),V(f.$$.fragment),d=O(),g&&g.c(),p(t,"class","col-sm-12"),p(l,"class",r=n[2]?"col-sm-8":"col-sm-6"),p(u,"class",c=n[2]?"col-sm-4":"col-sm-3"),p(e,"class","grid grid-sm")},m(m,_){w(m,e,_),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,a),b(e,u),j(f,u,null),b(e,d),g&&g.m(e,null),h=!0},p(m,_){const y={};_&2&&(y.name="schema."+m[1]+".options.mimeTypes"),_&20971529&&(y.$$scope={dirty:_,ctx:m}),i.$set(y);const S={};_&2&&(S.name="schema."+m[1]+".options.thumbs"),_&20971521&&(S.$$scope={dirty:_,ctx:m}),o.$set(S),(!h||_&4&&r!==(r=m[2]?"col-sm-8":"col-sm-6"))&&p(l,"class",r);const T={};_&2&&(T.name="schema."+m[1]+".options.maxSize"),_&20971521&&(T.$$scope={dirty:_,ctx:m}),f.$set(T),(!h||_&4&&c!==(c=m[2]?"col-sm-4":"col-sm-3"))&&p(u,"class",c),m[2]?g&&(re(),L(g,1,1,()=>{g=null}),ae()):g?(g.p(m,_),_&4&&A(g,1)):(g=vd(m),g.c(),A(g,1),g.m(e,null))},i(m){h||(A(i.$$.fragment,m),A(o.$$.fragment,m),A(f.$$.fragment,m),A(g),h=!0)},o(m){L(i.$$.fragment,m),L(o.$$.fragment,m),L(f.$$.fragment,m),L(g),h=!1},d(m){m&&k(e),H(i),H(o),H(f),g&&g.d()}}}function GT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Protected",r=O(),a=v("a"),a.textContent="(Learn more)",p(e,"type","checkbox"),p(e,"id",t=n[22]),p(l,"class","txt"),p(s,"for",o=n[22]),p(a,"href","https://pocketbase.io/docs/files-handling/#protected-files"),p(a,"class","toggle-info txt-sm txt-hint m-l-5"),p(a,"target","_blank"),p(a,"rel","noopener")},m(c,d){w(c,e,d),e.checked=n[0].options.protected,w(c,i,d),w(c,s,d),b(s,l),w(c,r,d),w(c,a,d),u||(f=Y(e,"change",n[7]),u=!0)},p(c,d){d&4194304&&t!==(t=c[22])&&p(e,"id",t),d&1&&(e.checked=c[0].options.protected),d&4194304&&o!==(o=c[22])&&p(s,"for",o)},d(c){c&&(k(e),k(i),k(s),k(r),k(a)),u=!1,f()}}}function XT(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.protected",$$slots:{default:[GT,({uniqueId:i})=>({22:i}),({uniqueId:i})=>i?4194304:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.protected"),s&20971521&&(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 QT(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[17](r)}let o={$$slots:{optionsFooter:[XT],options:[ZT],default:[zT,({interactive:r})=>({23:r}),({interactive:r})=>r?8388608:0]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[18]),e.$on("remove",n[19]),{c(){V(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&34?kt(s,[a&2&&{key:r[1]},a&32&&Pt(r[5])]):{};a&25165839&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function xT(n,e,t){var P;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=HT.slice(),u=((P=l.options)==null?void 0:P.maxSelect)<=1,f=u;function c(){t(0,l.options={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]},l),t(2,u=!0),t(6,f=u)}function d(){if(z.isEmpty(l.options.mimeTypes))return;const F=[];for(const N of l.options.mimeTypes)a.find(R=>R.mimeType===N)||F.push({mimeType:N});F.length&&t(3,a=a.concat(F))}function h(){l.options.protected=this.checked,t(0,l),t(6,f),t(2,u)}function g(F){n.$$.not_equal(l.options.mimeTypes,F)&&(l.options.mimeTypes=F,t(0,l),t(6,f),t(2,u))}const m=()=>{t(0,l.options.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],l)},_=()=>{t(0,l.options.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],l)},y=()=>{t(0,l.options.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],l)},S=()=>{t(0,l.options.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],l)};function T(F){n.$$.not_equal(l.options.thumbs,F)&&(l.options.thumbs=F,t(0,l),t(6,f),t(2,u))}function $(){l.options.maxSize=ht(this.value),t(0,l),t(6,f),t(2,u)}function C(){l.options.maxSelect=ht(this.value),t(0,l),t(6,f),t(2,u)}function M(F){u=F,t(2,u)}function E(F){l=F,t(0,l),t(6,f),t(2,u)}function D(F){Ne.call(this,n,F)}function I(F){Ne.call(this,n,F)}return n.$$set=F=>{e=je(je({},e),xt(F)),t(5,s=xe(e,i)),"field"in F&&t(0,l=F.field),"key"in F&&t(1,o=F.key)},n.$$.update=()=>{var F,N;n.$$.dirty&69&&f!=u&&(t(6,f=u),u?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((N=(F=l.options)==null?void 0:F.values)==null?void 0:N.length)||99,l)),n.$$.dirty&1&&(z.isEmpty(l.options)?c():d())},[l,o,u,a,r,s,f,h,g,m,_,y,S,T,$,C,M,E,D,I]}class eC extends ve{constructor(e){super(),be(this,e,xT,QT,he,{field:0,key:1})}}function tC(n){let e,t,i,s,l;return{c(){e=v("hr"),t=O(),i=v("button"),i.innerHTML=' New collection',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:x,d(o){o&&(k(e),k(t),k(i)),s=!1,l()}}}function nC(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:[tC]},$$scope:{ctx:n}};return n[0].options.collectionId!==void 0&&(l.keyOfSelected=n[0].options.collectionId),e=new Bi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){V(e.$$.fragment)},m(o,r){j(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,_e(()=>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 iC(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 Bi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){V(e.$$.fragment)},m(o,r){j(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],_e(()=>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 sC(n){let e,t,i,s,l,o,r,a,u,f;return i=new ce({props:{class:"form-field required "+(n[24]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.collectionId",$$slots:{default:[nC,({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:[iC,({uniqueId:c})=>({23:c}),({uniqueId:c})=>c?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),V(i.$$.fragment),s=O(),l=v("div"),o=O(),V(r.$$.fragment),a=O(),u=v("div"),p(e,"class","separator"),p(l,"class","separator"),p(u,"class","separator")},m(c,d){w(c,e,d),w(c,t,d),j(i,c,d),w(c,s,d),w(c,l,d),w(c,o,d),j(r,c,d),w(c,a,d),w(c,u,d),f=!0},p(c,d){const h={};d&16777216&&(h.class="form-field required "+(c[24]?"":"readonly")),d&2&&(h.name="schema."+c[1]+".options.collectionId"),d&58720297&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const g={};d&16777216&&(g.class="form-field form-field-single-multiple-select "+(c[24]?"":"readonly")),d&58720260&&(g.$$scope={dirty:d,ctx:c}),r.$set(g)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),f=!0)},o(c){L(i.$$.fragment,c),L(r.$$.fragment,c),f=!1},d(c){c&&(k(e),k(t),k(s),k(l),k(o),k(a),k(u)),H(i,c),H(r,c)}}}function yd(n){let e,t,i,s,l,o;return t=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.minSelect",$$slots:{default:[lC,({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:[oC,({uniqueId:r})=>({23:r}),({uniqueId:r})=>r?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),V(t.$$.fragment),i=O(),s=v("div"),V(l.$$.fragment),p(e,"class","col-sm-6"),p(s,"class","col-sm-6")},m(r,a){w(r,e,a),j(t,e,null),w(r,i,a),w(r,s,a),j(l,s,null),o=!0},p(r,a){const u={};a&2&&(u.name="schema."+r[1]+".options.minSelect"),a&41943041&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a&2&&(f.name="schema."+r[1]+".options.maxSelect"),a&41943041&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},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),k(i),k(s)),H(t),H(l)}}}function lC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min select"),s=O(),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(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].options.minSelect),r||(a=Y(l,"input",n[11]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.minSelect&&oe(l,u[0].options.minSelect)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function oC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Max select"),s=O(),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(f,c){w(f,e,c),b(e,t),w(f,s,c),w(f,l,c),oe(l,n[0].options.maxSelect),a||(u=Y(l,"input",n[12]),a=!0)},p(f,c){c&8388608&&i!==(i=f[23])&&p(e,"for",i),c&8388608&&o!==(o=f[23])&&p(l,"id",o),c&1&&r!==(r=f[0].options.minSelect||2)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].options.maxSelect&&oe(l,f[0].options.maxSelect)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function rC(n){let e,t,i,s,l,o,r,a,u,f,c,d;function h(m){n[13](m)}let g={id:n[23],items:n[7]};return n[0].options.cascadeDelete!==void 0&&(g.keyOfSelected=n[0].options.cascadeDelete),a=new Bi({props:g}),ne.push(()=>de(a,"keyOfSelected",h)),{c(){e=v("label"),t=v("span"),t.textContent="Cascade delete",i=O(),s=v("i"),r=O(),V(a.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",o=n[23])},m(m,_){var y,S;w(m,e,_),b(e,t),b(e,i),b(e,s),w(m,r,_),j(a,m,_),f=!0,c||(d=$e(l=He.call(null,s,{text:[`Whether on ${((y=n[4])==null?void 0:y.name)||"relation"} record deletion to delete also the current corresponding collection record(s).`,n[2]?null:`For "Multiple" relation fields the cascade delete is triggered only when all ${((S=n[4])==null?void 0:S.name)||"relation"} ids are removed from the corresponding record.`].filter(Boolean).join(` + +`),position:"top"})),c=!0)},p(m,_){var S,T;l&&It(l.update)&&_&20&&l.update.call(null,{text:[`Whether on ${((S=m[4])==null?void 0:S.name)||"relation"} record deletion to delete also the current corresponding collection record(s).`,m[2]?null:`For "Multiple" relation fields the cascade delete is triggered only when all ${((T=m[4])==null?void 0:T.name)||"relation"} ids are removed from the corresponding record.`].filter(Boolean).join(` + +`),position:"top"}),(!f||_&8388608&&o!==(o=m[23]))&&p(e,"for",o);const y={};_&8388608&&(y.id=m[23]),!u&&_&1&&(u=!0,y.keyOfSelected=m[0].options.cascadeDelete,_e(()=>u=!1)),a.$set(y)},i(m){f||(A(a.$$.fragment,m),f=!0)},o(m){L(a.$$.fragment,m),f=!1},d(m){m&&(k(e),k(r)),H(a,m),c=!1,d()}}}function aC(n){let e,t,i,s,l,o=!n[2]&&yd(n);return s=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[rC,({uniqueId:r})=>({23:r}),({uniqueId:r})=>r?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),o&&o.c(),t=O(),i=v("div"),V(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),j(s,i,null),l=!0},p(r,a){r[2]?o&&(re(),L(o,1,1,()=>{o=null}),ae()):o?(o.p(r,a),a&4&&A(o,1)):(o=yd(r),o.c(),A(o,1),o.m(e,t));const u={};a&2&&(u.name="schema."+r[1]+".options.cascadeDelete"),a&41943061&&(u.$$scope={dirty:a,ctx:r}),s.$set(u)},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 uC(n){let e,t,i,s,l;const o=[{key:n[1]},n[8]];function r(f){n[17](f)}let a={$$slots:{options:[aC],default:[sC,({interactive:f})=>({24:f}),({interactive:f})=>f?16777216:0]},$$scope:{ctx:n}};for(let f=0;fde(e,"field",r)),e.$on("rename",n[18]),e.$on("remove",n[19]);let u={};return s=new su({props:u}),n[20](s),s.$on("save",n[21]),{c(){V(e.$$.fragment),i=O(),V(s.$$.fragment)},m(f,c){j(e,f,c),w(f,i,c),j(s,f,c),l=!0},p(f,[c]){const d=c&258?kt(o,[c&2&&{key:f[1]},c&256&&Pt(f[8])]):{};c&50331711&&(d.$$scope={dirty:c,ctx:f}),!t&&c&1&&(t=!0,d.field=f[0],_e(()=>t=!1)),e.$set(d);const h={};s.$set(h)},i(f){l||(A(e.$$.fragment,f),A(s.$$.fragment,f),l=!0)},o(f){L(e.$$.fragment,f),L(s.$$.fragment,f),l=!1},d(f){f&&k(i),H(e,f),n[20](null),H(s,f)}}}function fC(n,e,t){var F;let i,s;const l=["field","key"];let o=xe(e,l),r;Ye(n,ii,N=>t(10,r=N));let{field:a}=e,{key:u=""}=e;const f=[{label:"Single",value:!0},{label:"Multiple",value:!1}],c=[{label:"False",value:!1},{label:"True",value:!0}];let d=null,h=((F=a.options)==null?void 0:F.maxSelect)==1,g=h;function m(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1},a),t(2,h=!0),t(9,g=h)}function _(){a.options.minSelect=ht(this.value),t(0,a),t(9,g),t(2,h)}function y(){a.options.maxSelect=ht(this.value),t(0,a),t(9,g),t(2,h)}function S(N){n.$$.not_equal(a.options.cascadeDelete,N)&&(a.options.cascadeDelete=N,t(0,a),t(9,g),t(2,h))}const T=()=>d==null?void 0:d.show();function $(N){n.$$.not_equal(a.options.collectionId,N)&&(a.options.collectionId=N,t(0,a),t(9,g),t(2,h))}function C(N){h=N,t(2,h)}function M(N){a=N,t(0,a),t(9,g),t(2,h)}function E(N){Ne.call(this,n,N)}function D(N){Ne.call(this,n,N)}function I(N){ne[N?"unshift":"push"](()=>{d=N,t(3,d)})}const P=N=>{var R,q;(q=(R=N==null?void 0:N.detail)==null?void 0:R.collection)!=null&&q.id&&N.detail.collection.type!="view"&&t(0,a.options.collectionId=N.detail.collection.id,a)};return n.$$set=N=>{e=je(je({},e),xt(N)),t(8,o=xe(e,l)),"field"in N&&t(0,a=N.field),"key"in N&&t(1,u=N.key)},n.$$.update=()=>{n.$$.dirty&1024&&t(5,i=r.filter(N=>N.type!="view")),n.$$.dirty&516&&g!=h&&(t(9,g=h),h?(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)&&m(),n.$$.dirty&1025&&t(4,s=r.find(N=>N.id==a.options.collectionId)||null)},[a,u,h,d,s,i,f,c,o,g,r,_,y,S,T,$,C,M,E,D,I,P]}class cC extends ve{constructor(e){super(),be(this,e,fC,uC,he,{field:0,key:1})}}const dC=n=>({dragging:n&4,dragover:n&8}),kd=n=>({dragging:n[2],dragover:n[3]});function pC(n){let e,t,i,s,l;const o=n[10].default,r=Ct(o,n,n[9],kd);return{c(){e=v("div"),r&&r.c(),p(e,"draggable",t=!n[1]),p(e,"class","draggable svelte-28orm4"),Q(e,"dragging",n[2]),Q(e,"dragover",n[3])},m(a,u){w(a,e,u),r&&r.m(e,null),i=!0,s||(l=[Y(e,"dragover",Qe(n[11])),Y(e,"dragleave",Qe(n[12])),Y(e,"dragend",n[13]),Y(e,"dragstart",n[14]),Y(e,"drop",n[15])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&524)&&Ot(r,o,a,a[9],i?Mt(o,a[9],u,dC):Et(a[9]),kd),(!i||u&2&&t!==(t=!a[1]))&&p(e,"draggable",t),(!i||u&4)&&Q(e,"dragging",a[2]),(!i||u&8)&&Q(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,Ce(l)}}}function hC(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=wt();let{index:o}=e,{list:r=[]}=e,{group:a="default"}=e,{disabled:u=!1}=e,{dragHandleClass:f=""}=e,c=!1,d=!1;function h($,C){if(!(!$||u)){if(f&&!$.target.classList.contains(f)){t(3,d=!1),t(2,c=!1),$.preventDefault();return}t(2,c=!0),$.dataTransfer.effectAllowed="move",$.dataTransfer.dropEffect="move",$.dataTransfer.setData("text/plain",JSON.stringify({index:C,group:a})),l("drag",$)}}function g($,C){if(t(3,d=!1),t(2,c=!1),!$||u)return;$.dataTransfer.dropEffect="move";let M={};try{M=JSON.parse($.dataTransfer.getData("text/plain"))}catch{}if(M.group!=a)return;const E=M.index<<0;E{t(3,d=!0)},_=()=>{t(3,d=!1)},y=()=>{t(3,d=!1),t(2,c=!1)},S=$=>h($,o),T=$=>g($,o);return n.$$set=$=>{"index"in $&&t(0,o=$.index),"list"in $&&t(6,r=$.list),"group"in $&&t(7,a=$.group),"disabled"in $&&t(1,u=$.disabled),"dragHandleClass"in $&&t(8,f=$.dragHandleClass),"$$scope"in $&&t(9,s=$.$$scope)},[o,u,c,d,h,g,r,a,f,s,i,m,_,y,S,T]}class Il extends ve{constructor(e){super(),be(this,e,hC,pC,he,{index:0,list:6,group:7,disabled:1,dragHandleClass:8})}}function wd(n,e,t){const i=n.slice();return i[17]=e[t],i[18]=e,i[19]=t,i}function Sd(n){let e,t,i,s,l,o,r,a;return{c(){e=U(`, + `),t=v("code"),t.textContent="username",i=U(` , + `),s=v("code"),s.textContent="email",l=U(` , + `),o=v("code"),o.textContent="emailVisibility",r=U(` , + `),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),w(u,s,f),w(u,l,f),w(u,o,f),w(u,r,f),w(u,a,f)},d(u){u&&(k(e),k(t),k(i),k(s),k(l),k(o),k(r),k(a))}}}function mC(n){let e,t,i,s;function l(u){n[6](u,n[17],n[18],n[19])}function o(){return n[7](n[19])}var r=n[1][n[17].type];function a(u,f){let c={key:u[4](u[17])};return u[17]!==void 0&&(c.field=u[17]),{props:c}}return r&&(e=Dt(r,a(n)),ne.push(()=>de(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8])),{c(){e&&V(e.$$.fragment),i=O()},m(u,f){e&&j(e,u,f),w(u,i,f),s=!0},p(u,f){if(n=u,f&1&&r!==(r=n[1][n[17].type])){if(e){re();const c=e;L(c.$$.fragment,1,0,()=>{H(c,1)}),ae()}r?(e=Dt(r,a(n)),ne.push(()=>de(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8]),V(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else if(r){const c={};f&1&&(c.key=n[4](n[17])),!t&&f&1&&(t=!0,c.field=n[17],_e(()=>t=!1)),e.$set(c)}},i(u){s||(e&&A(e.$$.fragment,u),s=!0)},o(u){e&&L(e.$$.fragment,u),s=!1},d(u){u&&k(i),e&&H(e,u)}}}function $d(n,e){let t,i,s,l;function o(a){e[9](a)}let r={index:e[19],disabled:e[17].toDelete||e[17].id&&e[17].system,dragHandleClass:"drag-handle-wrapper",$$slots:{default:[mC]},$$scope:{ctx:e}};return e[0].schema!==void 0&&(r.list=e[0].schema),i=new Il({props:r}),ne.push(()=>de(i,"list",o)),i.$on("drag",e[10]),i.$on("sort",e[11]),{key:n,first:null,c(){t=ke(),V(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u&1&&(f.index=e[19]),u&1&&(f.disabled=e[17].toDelete||e[17].id&&e[17].system),u&1048577&&(f.$$scope={dirty:u,ctx:e}),!s&&u&1&&(s=!0,f.list=e[0].schema,_e(()=>s=!1)),i.$set(f)},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 gC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=[],g=new Map,m,_,y,S,T,$,C,M,E=n[0].type==="auth"&&Sd(),D=pe(n[0].schema);const I=N=>N[17];for(let N=0;Nde($,"collection",P)),{c(){e=v("div"),t=v("p"),i=U(`System fields: + `),s=v("code"),s.textContent="id",l=U(` , + `),o=v("code"),o.textContent="created",r=U(` , + `),a=v("code"),a.textContent="updated",u=O(),E&&E.c(),f=U(` + .`),c=O(),d=v("div");for(let N=0;NC=!1)),$.$set(q)},i(N){if(!M){for(let R=0;RM.name===$))}function f($){return i.findIndex(C=>C===$)}function c($,C){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||$===C||!C||t(0,s.indexes=s.indexes.map(E=>z.replaceIndexColumn(E,$,C)),s)}function d($,C,M,E){M[E]=$,t(0,s)}const h=$=>o($),g=$=>c($.detail.oldName,$.detail.newName);function m($){n.$$.not_equal(s.schema,$)&&(s.schema=$,t(0,s))}const _=$=>{if(!$.detail)return;const C=$.detail.target;C.style.opacity=0,setTimeout(()=>{var M;(M=C==null?void 0:C.style)==null||M.removeProperty("opacity")},0),$.detail.dataTransfer.setDragImage(C,0,0)},y=()=>{tn({})},S=$=>r($.detail);function T($){s=$,t(0,s)}return n.$$set=$=>{"collection"in $&&t(0,s=$.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&t(0,s.schema=[],s),n.$$.dirty&1&&(i=s.schema.filter($=>!$.toDelete)||[])},[s,l,o,r,f,c,d,h,g,m,_,y,S,T]}class bC extends ve{constructor(e){super(),be(this,e,_C,gC,he,{collection:0})}}const vC=n=>({isAdminOnly:n&512}),Td=n=>({isAdminOnly:n[9]}),yC=n=>({isAdminOnly:n&512}),Cd=n=>({isAdminOnly:n[9]}),kC=n=>({isAdminOnly:n&512}),Md=n=>({isAdminOnly:n[9]});function wC(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:[$C,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(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 SC(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Od(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' Set Admins only',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:x,d(s){s&&k(e),t=!1,i()}}}function Ed(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Unlock and set custom rule
    ',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:x,i(o){i||(o&&Xe(()=>{i&&(t||(t=qe(e,Jt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=qe(e,Jt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function $C(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,c,d,h,g,m,_,y,S;const T=n[12].beforeLabel,$=Ct(T,n,n[15],Md),C=n[12].afterLabel,M=Ct(C,n,n[15],Cd);let E=!n[9]&&Od(n);function D(q){n[14](q)}var I=n[7];function P(q,B){let K={id:q[18],baseCollection:q[1],disabled:q[9],placeholder:q[9]?"":q[5]};return q[0]!==void 0&&(K.value=q[0]),{props:K}}I&&(h=Dt(I,P(n)),n[13](h),ne.push(()=>de(h,"value",D)));let F=n[9]&&Ed(n);const N=n[12].default,R=Ct(N,n,n[15],Td);return{c(){e=v("div"),t=v("label"),$&&$.c(),i=O(),s=v("span"),l=U(n[2]),o=O(),a=U(r),u=O(),M&&M.c(),f=O(),E&&E.c(),d=O(),h&&V(h.$$.fragment),m=O(),F&&F.c(),_=O(),y=v("div"),R&&R.c(),p(s,"class","txt"),Q(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,B){w(q,e,B),b(e,t),$&&$.m(t,null),b(t,i),b(t,s),b(s,l),b(s,o),b(s,a),b(t,u),M&&M.m(t,null),b(t,f),E&&E.m(t,null),b(e,d),h&&j(h,e,null),b(e,m),F&&F.m(e,null),w(q,_,B),w(q,y,B),R&&R.m(y,null),S=!0},p(q,B){if($&&$.p&&(!S||B&33280)&&Ot($,T,q,q[15],S?Mt(T,q[15],B,kC):Et(q[15]),Md),(!S||B&4)&&se(l,q[2]),(!S||B&512)&&r!==(r=q[9]?"- Admins only":"")&&se(a,r),(!S||B&512)&&Q(s,"txt-hint",q[9]),M&&M.p&&(!S||B&33280)&&Ot(M,C,q,q[15],S?Mt(C,q[15],B,yC):Et(q[15]),Cd),q[9]?E&&(E.d(1),E=null):E?E.p(q,B):(E=Od(q),E.c(),E.m(t,null)),(!S||B&262144&&c!==(c=q[18]))&&p(t,"for",c),B&128&&I!==(I=q[7])){if(h){re();const K=h;L(K.$$.fragment,1,0,()=>{H(K,1)}),ae()}I?(h=Dt(I,P(q)),q[13](h),ne.push(()=>de(h,"value",D)),V(h.$$.fragment),A(h.$$.fragment,1),j(h,e,m)):h=null}else if(I){const K={};B&262144&&(K.id=q[18]),B&2&&(K.baseCollection=q[1]),B&512&&(K.disabled=q[9]),B&544&&(K.placeholder=q[9]?"":q[5]),!g&&B&1&&(g=!0,K.value=q[0],_e(()=>g=!1)),h.$set(K)}q[9]?F?(F.p(q,B),B&512&&A(F,1)):(F=Ed(q),F.c(),A(F,1),F.m(e,null)):F&&(re(),L(F,1,1,()=>{F=null}),ae()),R&&R.p&&(!S||B&33280)&&Ot(R,N,q,q[15],S?Mt(N,q[15],B,vC):Et(q[15]),Td)},i(q){S||(A($,q),A(M,q),h&&A(h.$$.fragment,q),A(F),A(R,q),S=!0)},o(q){L($,q),L(M,q),h&&L(h.$$.fragment,q),L(F),L(R,q),S=!1},d(q){q&&(k(e),k(_),k(y)),$&&$.d(q),M&&M.d(q),E&&E.d(),n[13](null),h&&H(h),F&&F.d(),R&&R.d(q)}}}function TC(n){let e,t,i,s;const l=[SC,wC],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ke()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),L(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){L(t),s=!1},d(a){a&&k(i),o[e].d(a)}}}let Dd;function CC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,{placeholder:c="Leave empty to grant everyone access..."}=e,d=null,h=null,g=Dd,m=!1;_();async function _(){g||m||(t(8,m=!0),t(7,g=(await ot(()=>import("./FilterAutocompleteInput-d2bb33f8.js"),["./FilterAutocompleteInput-d2bb33f8.js","./index-4841d67b.js"],import.meta.url)).default),Dd=g,t(8,m=!1))}async function y(){t(0,r=h||""),await ln(),d==null||d.focus()}async function S(){h=r,t(0,r=null)}function T(C){ne[C?"unshift":"push"](()=>{d=C,t(6,d)})}function $(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"placeholder"in C&&t(5,c=C.placeholder),"$$scope"in C&&t(15,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,g,m,i,y,S,s,T,$,l]}class Ts extends ve{constructor(e){super(),be(this,e,CC,TC,he,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Ad(n,e,t){const i=n.slice();return i[11]=e[t],i}function Id(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M,E,D,I=pe(n[2]),P=[];for(let F=0;F@request filter:",c=O(),d=v("div"),d.innerHTML="@request.headers.* @request.query.* @request.data.* @request.auth.*",h=O(),g=v("hr"),m=O(),_=v("p"),_.innerHTML="You could also add constraints and query other collections using the @collection filter:",y=O(),S=v("div"),S.innerHTML="@collection.ANY_COLLECTION_NAME.*",T=O(),$=v("hr"),C=O(),M=v("p"),M.innerHTML=`Example rule: +
    @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(a,"class","m-t-10 m-b-5"),p(f,"class","m-b-0"),p(d,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(_,"class","m-b-0"),p(S,"class","inline-flex flex-gap-5"),p($,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(F,N){w(F,e,N),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o);for(let R=0;R{D&&(E||(E=qe(e,nt,{duration:150},!0)),E.run(1))}),D=!0)},o(F){F&&(E||(E=qe(e,nt,{duration:150},!1)),E.run(0)),D=!1},d(F){F&&k(e),_t(P,F),F&&E&&E.end()}}}function Ld(n){let e,t=n[11]+"",i;return{c(){e=v("code"),i=U(t)},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&se(i,t)},d(s){s&&k(e)}}}function Pd(n){let e,t,i,s,l,o,r,a,u;function f(_){n[6](_)}let c={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[MC,({isAdminOnly:_})=>({10:_}),({isAdminOnly:_})=>_?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(c.rule=n[0].createRule),e=new Ts({props:c}),ne.push(()=>de(e,"rule",f));function d(_){n[7](_)}let h={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(h.rule=n[0].updateRule),s=new Ts({props:h}),ne.push(()=>de(s,"rule",d));function g(_){n[8](_)}let m={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(m.rule=n[0].deleteRule),r=new Ts({props:m}),ne.push(()=>de(r,"rule",g)),{c(){V(e.$$.fragment),i=O(),V(s.$$.fragment),o=O(),V(r.$$.fragment)},m(_,y){j(e,_,y),w(_,i,y),j(s,_,y),w(_,o,y),j(r,_,y),u=!0},p(_,y){const S={};y&1&&(S.collection=_[0]),y&17408&&(S.$$scope={dirty:y,ctx:_}),!t&&y&1&&(t=!0,S.rule=_[0].createRule,_e(()=>t=!1)),e.$set(S);const T={};y&1&&(T.collection=_[0]),!l&&y&1&&(l=!0,T.rule=_[0].updateRule,_e(()=>l=!1)),s.$set(T);const $={};y&1&&($.collection=_[0]),!a&&y&1&&(a=!0,$.rule=_[0].deleteRule,_e(()=>a=!1)),r.$set($)},i(_){u||(A(e.$$.fragment,_),A(s.$$.fragment,_),A(r.$$.fragment,_),u=!0)},o(_){L(e.$$.fragment,_),L(s.$$.fragment,_),L(r.$$.fragment,_),u=!1},d(_){_&&(k(i),k(o)),H(e,_),H(s,_),H(r,_)}}}function Fd(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-information-line link-hint")},m(s,l){w(s,e,l),t||(i=$e(He.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&k(e),t=!1,i()}}}function MC(n){let e,t=!n[10]&&Fd();return{c(){t&&t.c(),e=ke()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=Fd(),t.c(),t.m(e.parentNode,e))},d(i){i&&k(e),t&&t.d(i)}}}function Nd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[OC]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new Ts({props:l}),ne.push(()=>de(e,"rule",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,_e(()=>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 OC(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. + changing the password without requiring to enter the old one, directly updating the verified + state or email, etc.`,t=O(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},p:x,d(s){s&&(k(e),k(t),k(i))}}}function EC(n){var N,R;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,h,g,m,_,y,S,T,$,C=n[1]&&Id(n);function M(q){n[4](q)}let E={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(E.rule=n[0].listRule),f=new Ts({props:E}),ne.push(()=>de(f,"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),h=new Ts({props:I}),ne.push(()=>de(h,"rule",D));let P=((N=n[0])==null?void 0:N.type)!=="view"&&Pd(n),F=((R=n[0])==null?void 0:R.type)==="auth"&&Nd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the +
    PocketBase filter syntax and operators + .`,s=O(),l=v("button"),r=U(o),a=O(),C&&C.c(),u=O(),V(f.$$.fragment),d=O(),V(h.$$.fragment),m=O(),P&&P.c(),_=O(),F&&F.c(),y=ke(),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,B){w(q,e,B),b(e,t),b(t,i),b(t,s),b(t,l),b(l,r),b(e,a),C&&C.m(e,null),w(q,u,B),j(f,q,B),w(q,d,B),j(h,q,B),w(q,m,B),P&&P.m(q,B),w(q,_,B),F&&F.m(q,B),w(q,y,B),S=!0,T||($=Y(l,"click",n[3]),T=!0)},p(q,[B]){var X,G;(!S||B&2)&&o!==(o=q[1]?"Hide available fields":"Show available fields")&&se(r,o),q[1]?C?(C.p(q,B),B&2&&A(C,1)):(C=Id(q),C.c(),A(C,1),C.m(e,null)):C&&(re(),L(C,1,1,()=>{C=null}),ae());const K={};B&1&&(K.collection=q[0]),!c&&B&1&&(c=!0,K.rule=q[0].listRule,_e(()=>c=!1)),f.$set(K);const J={};B&1&&(J.collection=q[0]),!g&&B&1&&(g=!0,J.rule=q[0].viewRule,_e(()=>g=!1)),h.$set(J),((X=q[0])==null?void 0:X.type)!=="view"?P?(P.p(q,B),B&1&&A(P,1)):(P=Pd(q),P.c(),A(P,1),P.m(_.parentNode,_)):P&&(re(),L(P,1,1,()=>{P=null}),ae()),((G=q[0])==null?void 0:G.type)==="auth"?F?(F.p(q,B),B&1&&A(F,1)):(F=Nd(q),F.c(),A(F,1),F.m(y.parentNode,y)):F&&(re(),L(F,1,1,()=>{F=null}),ae())},i(q){S||(A(C),A(f.$$.fragment,q),A(h.$$.fragment,q),A(P),A(F),S=!0)},o(q){L(C),L(f.$$.fragment,q),L(h.$$.fragment,q),L(P),L(F),S=!1},d(q){q&&(k(e),k(u),k(d),k(m),k(_),k(y)),C&&C.d(),H(f,q),H(h,q),P&&P.d(q),F&&F.d(q),T=!1,$()}}}function DC(n,e,t){let i,{collection:s}=e,l=!1;const o=()=>t(1,l=!l);function r(h){n.$$.not_equal(s.listRule,h)&&(s.listRule=h,t(0,s))}function a(h){n.$$.not_equal(s.viewRule,h)&&(s.viewRule=h,t(0,s))}function u(h){n.$$.not_equal(s.createRule,h)&&(s.createRule=h,t(0,s))}function f(h){n.$$.not_equal(s.updateRule,h)&&(s.updateRule=h,t(0,s))}function c(h){n.$$.not_equal(s.deleteRule,h)&&(s.deleteRule=h,t(0,s))}function d(h){n.$$.not_equal(s.options.manageRule,h)&&(s.options.manageRule=h,t(0,s))}return n.$$set=h=>{"collection"in h&&t(0,s=h.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=z.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,u,f,c,d]}class AC extends ve{constructor(e){super(),be(this,e,DC,EC,he,{collection:0})}}function Rd(n,e,t){const i=n.slice();return i[9]=e[t],i}function IC(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a,u){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=Dt(o,r(n)),ne.push(()=>de(e,"value",l)),e.$on("change",n[6])),{c(){e&&V(e.$$.fragment),i=ke()},m(a,u){e&&j(e,a,u),w(a,i,u),s=!0},p(a,u){if(u&2&&o!==(o=a[1])){if(e){re();const f=e;L(f.$$.fragment,1,0,()=>{H(f,1)}),ae()}o?(e=Dt(o,r(a)),ne.push(()=>de(e,"value",l)),e.$on("change",a[6]),V(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else if(o){const f={};u&256&&(f.id=a[8]),!t&&u&1&&(t=!0,f.value=a[0].options.query,_e(()=>t=!1)),e.$set(f)}},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 LC(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:x,i:x,o:x,d(t){t&&k(e)}}}function qd(n){let e,t,i=pe(n[3]),s=[];for(let l=0;l
  • Wildcard columns (*) are not supported.
  • The query must have a unique id column. +
    + If your query doesn't have a suitable one, you can use the universal + (ROW_NUMBER() OVER()) as id.
  • Expressions must be aliased with a valid formatted field name (eg. + MAX(balance) as maxBalance).
  • `,u=O(),m&&m.c(),f=ke(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(_,y){w(_,e,y),b(e,t),w(_,s,y),h[l].m(_,y),w(_,r,y),w(_,a,y),w(_,u,y),m&&m.m(_,y),w(_,f,y),c=!0},p(_,y){(!c||y&256&&i!==(i=_[8]))&&p(e,"for",i);let S=l;l=g(_),l===S?h[l].p(_,y):(re(),L(h[S],1,1,()=>{h[S]=null}),ae(),o=h[l],o?o.p(_,y):(o=h[l]=d[l](_),o.c()),A(o,1),o.m(r.parentNode,r)),_[3].length?m?m.p(_,y):(m=qd(_),m.c(),m.m(f.parentNode,f)):m&&(m.d(1),m=null)},i(_){c||(A(o),c=!0)},o(_){L(o),c=!1},d(_){_&&(k(e),k(s),k(r),k(a),k(u),k(f)),h[l].d(_),m&&m.d(_)}}}function FC(n){let e,t;return e=new ce({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[PC,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field 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 NC(n,e,t){let i;Ye(n,Ci,c=>t(4,i=c));let{collection:s}=e,l,o=!1,r=[];function a(c){var g;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 h=z.extractColumnsFromQuery((g=s==null?void 0:s.options)==null?void 0:g.query);z.removeByValue(h,"id"),z.removeByValue(h,"created"),z.removeByValue(h,"updated");for(let m in d)for(let _ in d[m]){const y=d[m][_].message,S=h[m]||m;r.push(z.sentenize(S+": "+y))}}Zt(async()=>{t(2,o=!0);try{t(1,l=(await ot(()=>import("./CodeEditor-d578f3b8.js"),["./CodeEditor-d578f3b8.js","./index-4841d67b.js"],import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function u(c){n.$$.not_equal(s.options.query,c)&&(s.options.query=c,t(0,s))}const f=()=>{r.length&&di("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,u,f]}class RC extends ve{constructor(e){super(),be(this,e,NC,FC,he,{collection:0})}}const qC=n=>({active:n&1}),Hd=n=>({active:n[0]});function Vd(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)&&Ot(l,s,o,o[14],i?Mt(s,o[14],r,null):Et(o[14]),null)},i(o){i||(A(l,o),o&&Xe(()=>{i&&(t||(t=qe(e,nt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){L(l,o),o&&(t||(t=qe(e,nt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),o&&t&&t.end()}}}function jC(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Ct(a,n,n[14],Hd);let f=n[0]&&Vd(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=O(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){w(c,e,d),b(e,t),u&&u.m(t,null),b(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[Y(t,"click",Qe(n[17])),Y(t,"drop",Qe(n[18])),Y(t,"dragstart",n[19]),Y(t,"dragenter",n[20]),Y(t,"dragleave",n[21]),Y(t,"dragover",Qe(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&Ot(u,a,c,c[14],l?Mt(a,c[14],d,qC):Et(c[14]),Hd),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Vd(c),f.c(),A(f,1),f.m(e,null)):f&&(re(),L(f,1,1,()=>{f=null}),ae()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){L(u,c),L(f),l=!1},d(c){c&&k(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,Ce(r)}}}function HC(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=wt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,h=!1;function g(){return!!f}function m(){S(),t(0,f=!0),l("expand")}function _(){t(0,f=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),f?_():m()}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()}}Zt(()=>()=>clearTimeout(r));function T(P){Ne.call(this,n,P)}const $=()=>c&&y(),C=P=>{u&&(t(7,h=!1),S(),l("drop",P))},M=P=>u&&l("dragstart",P),E=P=>{u&&(t(7,h=!0),l("dragenter",P))},D=P=>{u&&(t(7,h=!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,u=P.draggable),"active"in P&&t(0,f=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&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,c,y,S,o,h,l,d,g,m,_,r,s,i,T,$,C,M,E,D,I]}class uo extends ve{constructor(e){super(),be(this,e,HC,jC,he,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function VC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowUsernameAuth,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function zC(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[VC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function BC(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 UC(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 zd(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=$e(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Xe(()=>{i&&(t||(t=qe(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=qe(e,Jt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function WC(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowUsernameAuth?UC:BC}let a=r(n),u=a(n),f=n[3]&&zd();return{c(){e=v("div"),e.innerHTML=' Username/Password',t=O(),i=v("div"),s=O(),u.c(),l=O(),f&&f.c(),o=ke(),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),u.m(c,d),w(c,l,d),f&&f.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(l.parentNode,l))),c[3]?f?d&8&&A(f,1):(f=zd(),f.c(),A(f,1),f.m(o.parentNode,o)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(s),k(l),k(o)),u.d(c),f&&f.d(c)}}}function YC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowEmailAuth,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Bd(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:[KC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field "+(z.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[JC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){w(u,e,f),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(z.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(z.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&Xe(()=>{a&&(r||(r=qe(e,nt,{duration:150},!0)),r.run(1))}),a=!0)},o(u){L(i.$$.fragment,u),L(o.$$.fragment,u),u&&(r||(r=qe(e,nt,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&k(e),H(i),H(o),u&&r&&r.end()}}}function KC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(_){n[7](_)}let m={id:n[12],disabled:!z.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(m.value=n[0].options.exceptEmailDomains),r=new Rs({props:m}),ne.push(()=>de(r,"value",g)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),V(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),j(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=$e(He.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(_,y){(!c||y&4096&&l!==(l=_[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=_[12]),y&1&&(S.disabled=!z.isEmpty(_[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.exceptEmailDomains,_e(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){L(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),H(r,_),d=!1,h()}}}function JC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(_){n[8](_)}let m={id:n[12],disabled:!z.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(m.value=n[0].options.onlyEmailDomains),r=new Rs({props:m}),ne.push(()=>de(r,"value",g)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),V(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),j(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=$e(He.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(_,y){(!c||y&4096&&l!==(l=_[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=_[12]),y&1&&(S.disabled=!z.isEmpty(_[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.onlyEmailDomains,_e(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){L(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),H(r,_),d=!1,h()}}}function ZC(n){let e,t,i,s;e=new ce({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[YC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Bd(n);return{c(){V(e.$$.fragment),t=O(),l&&l.c(),i=ke()},m(o,r){j(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=Bd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){o&&(k(t),k(i)),H(e,o),l&&l.d(o)}}}function GC(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 XC(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 Ud(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=$e(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Xe(()=>{i&&(t||(t=qe(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=qe(e,Jt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function QC(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowEmailAuth?XC:GC}let a=r(n),u=a(n),f=n[2]&&Ud();return{c(){e=v("div"),e.innerHTML=' Email/Password',t=O(),i=v("div"),s=O(),u.c(),l=O(),f&&f.c(),o=ke(),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),u.m(c,d),w(c,l,d),f&&f.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(l.parentNode,l))),c[2]?f?d&4&&A(f,1):(f=Ud(),f.c(),A(f,1),f.m(o.parentNode,o)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(s),k(l),k(o)),u.d(c),f&&f.d(c)}}}function xC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowOAuth2Auth,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Wd(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Xe(()=>{i&&(t||(t=qe(e,nt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=qe(e,nt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function eM(n){let e,t,i,s;e=new ce({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[xC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Wd();return{c(){V(e.$$.fragment),t=O(),l&&l.c(),i=ke()},m(o,r){j(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=Wd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){o&&(k(t),k(i)),H(e,o),l&&l.d(o)}}}function tM(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 nM(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 Yd(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=$e(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Xe(()=>{i&&(t||(t=qe(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=qe(e,Jt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function iM(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowOAuth2Auth?nM:tM}let a=r(n),u=a(n),f=n[1]&&Yd();return{c(){e=v("div"),e.innerHTML=' OAuth2',t=O(),i=v("div"),s=O(),u.c(),l=O(),f&&f.c(),o=ke(),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),u.m(c,d),w(c,l,d),f&&f.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(l.parentNode,l))),c[1]?f?d&2&&A(f,1):(f=Yd(),f.c(),A(f,1),f.m(o.parentNode,o)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(s),k(l),k(o)),u.d(c),f&&f.d(c)}}}function sM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Minimum password length"),s=O(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].options.minPasswordLength),r||(a=Y(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.minPasswordLength&&oe(l,u[0].options.minPasswordLength)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function lM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Always require email",o=O(),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),u||(f=[Y(e,"change",n[11]),$e(He.call(null,r,{text:`The constraint is applied only for new records. +Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,Ce(f)}}}function oM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y;return s=new uo({props:{single:!0,$$slots:{header:[WC],default:[zC]},$$scope:{ctx:n}}}),o=new uo({props:{single:!0,$$slots:{header:[QC],default:[ZC]},$$scope:{ctx:n}}}),a=new uo({props:{single:!0,$$slots:{header:[iM],default:[eM]},$$scope:{ctx:n}}}),g=new ce({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[sM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),_=new ce({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[lM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=O(),i=v("div"),V(s.$$.fragment),l=O(),V(o.$$.fragment),r=O(),V(a.$$.fragment),u=O(),f=v("hr"),c=O(),d=v("h4"),d.textContent="General",h=O(),V(g.$$.fragment),m=O(),V(_.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(S,T){w(S,e,T),w(S,t,T),w(S,i,T),j(s,i,null),b(i,l),j(o,i,null),b(i,r),j(a,i,null),w(S,u,T),w(S,f,T),w(S,c,T),w(S,d,T),w(S,h,T),j(g,S,T),w(S,m,T),j(_,S,T),y=!0},p(S,[T]){const $={};T&8201&&($.$$scope={dirty:T,ctx:S}),s.$set($);const C={};T&8197&&(C.$$scope={dirty:T,ctx:S}),o.$set(C);const M={};T&8195&&(M.$$scope={dirty:T,ctx:S}),a.$set(M);const E={};T&12289&&(E.$$scope={dirty:T,ctx:S}),g.$set(E);const D={};T&12289&&(D.$$scope={dirty:T,ctx:S}),_.$set(D)},i(S){y||(A(s.$$.fragment,S),A(o.$$.fragment,S),A(a.$$.fragment,S),A(g.$$.fragment,S),A(_.$$.fragment,S),y=!0)},o(S){L(s.$$.fragment,S),L(o.$$.fragment,S),L(a.$$.fragment,S),L(g.$$.fragment,S),L(_.$$.fragment,S),y=!1},d(S){S&&(k(e),k(t),k(i),k(u),k(f),k(c),k(d),k(h),k(m)),H(s),H(o),H(a),H(g,S),H(_,S)}}}function rM(n,e,t){let i,s,l,o;Ye(n,Ci,m=>t(4,o=m));let{collection:r}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(m){n.$$.not_equal(r.options.exceptEmailDomains,m)&&(r.options.exceptEmailDomains=m,t(0,r))}function c(m){n.$$.not_equal(r.options.onlyEmailDomains,m)&&(r.options.onlyEmailDomains=m,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function h(){r.options.minPasswordLength=ht(this.value),t(0,r)}function g(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=m=>{"collection"in m&&t(0,r=m.collection)},n.$$.update=()=>{var m,_,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((m=o==null?void 0:o.options)==null?void 0:m.allowEmailAuth)||!z.isEmpty((_=o==null?void 0:o.options)==null?void 0:_.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,u,f,c,d,h,g]}class aM extends ve{constructor(e){super(),be(this,e,rM,oM,he,{collection:0})}}function Kd(n,e,t){const i=n.slice();return i[18]=e[t],i}function Jd(n,e,t){const i=n.slice();return i[18]=e[t],i}function Zd(n,e,t){const i=n.slice();return i[18]=e[t],i}function Gd(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 Xd(n){let e,t,i,s,l=n[3]&&Qd(n),o=!n[4]&&xd(n);return{c(){e=v("h6"),e.textContent="Changes:",t=O(),i=v("ul"),l&&l.c(),s=O(),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=Qd(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=xd(r),o.c(),o.m(i,null))},d(r){r&&(k(e),k(t),k(i)),l&&l.d(),o&&o.d()}}}function Qd(n){var h,g;let e,t,i,s,l=((h=n[1])==null?void 0:h.name)+"",o,r,a,u,f,c=((g=n[2])==null?void 0:g.name)+"",d;return{c(){e=v("li"),t=v("div"),i=U(`Renamed collection + `),s=v("strong"),o=U(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=U(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex"),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,u),b(t,f),b(f,d)},p(m,_){var y,S;_&2&&l!==(l=((y=m[1])==null?void 0:y.name)+"")&&se(o,l),_&4&&c!==(c=((S=m[2])==null?void 0:S.name)+"")&&se(d,c)},d(m){m&&k(e)}}}function xd(n){let e,t,i,s=pe(n[6]),l=[];for(let f=0;f
    ',i=O(),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=O(),u&&u.c(),r=O(),f&&f.c(),a=ke(),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),u&&u.m(s,null),w(c,r,d),f&&f.m(c,d),w(c,a,d)},p(c,d){c[7].length?u||(u=Gd(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),c[9]?f?f.p(c,d):(f=Xd(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&(k(e),k(r),k(a)),u&&u.d(),f&&f.d(c)}}}function fM(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function cM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Cancel',t=O(),i=v("button"),i.innerHTML='Confirm',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:x,d(o){o&&(k(e),k(t),k(i)),s=!1,Ce(l)}}}function dM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[cM],header:[fM],default:[uM]},$$scope:{ctx:n}};return e=new on({props:i}),n[14](e),e.$on("hide",n[15]),e.$on("show",n[16]),{c(){V(e.$$.fragment)},m(s,l){j(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 pM(n,e,t){let i,s,l,o,r,a;const u=wt();let f,c,d;async function h(C,M){t(1,c=C),t(2,d=M),await ln(),i||l.length||o.length||r.length?f==null||f.show():m()}function g(){f==null||f.hide()}function m(){g(),u("confirm")}const _=()=>g(),y=()=>m();function S(C){ne[C?"unshift":"push"](()=>{f=C,t(5,f)})}function T(C){Ne.call(this,n,C)}function $(C){Ne.call(this,n,C)}return n.$$.update=()=>{var C,M,E;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=((C=d==null?void 0:d.schema)==null?void 0:C.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=((E=d==null?void 0:d.schema)==null?void 0:E.filter(D=>{var P,F,N;const I=(P=c==null?void 0:c.schema)==null?void 0:P.find(R=>R.id==D.id);return I?((F=I.options)==null?void 0:F.maxSelect)!=1&&((N=D.options)==null?void 0:N.maxSelect)==1:!1}))||[]),n.$$.dirty&24&&t(9,a=!s||i)},[g,c,d,i,s,f,r,o,l,a,m,h,_,y,S,T,$]}class hM extends ve{constructor(e){super(),be(this,e,pM,dM,he,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function ip(n,e,t){const i=n.slice();return i[49]=e[t][0],i[50]=e[t][1],i}function mM(n){let e,t,i;function s(o){n[35](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new bC({props:l}),ne.push(()=>de(e,"collection",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],_e(()=>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 gM(n){let e,t,i;function s(o){n[34](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new RC({props:l}),ne.push(()=>de(e,"collection",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],_e(()=>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 sp(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 AC({props:o}),ne.push(()=>de(t,"collection",l)),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){w(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],_e(()=>i=!1)),t.$set(u)},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 lp(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 aM({props:o}),ne.push(()=>de(t,"collection",l)),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===As)},m(r,a){w(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],_e(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&Q(e,"active",r[3]===As)},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 _M(n){let e,t,i,s,l,o,r;const a=[gM,mM],u=[];function f(h,g){return h[14]?0:1}i=f(n),s=u[i]=a[i](n);let c=n[3]===vl&&sp(n),d=n[15]&&lp(n);return{c(){e=v("div"),t=v("div"),s.c(),l=O(),c&&c.c(),o=O(),d&&d.c(),p(t,"class","tab-item"),Q(t,"active",n[3]===Fi),p(e,"class","tabs-content svelte-12y0yzb")},m(h,g){w(h,e,g),b(e,t),u[i].m(t,null),b(e,l),c&&c.m(e,null),b(e,o),d&&d.m(e,null),r=!0},p(h,g){let m=i;i=f(h),i===m?u[i].p(h,g):(re(),L(u[m],1,1,()=>{u[m]=null}),ae(),s=u[i],s?s.p(h,g):(s=u[i]=a[i](h),s.c()),A(s,1),s.m(t,null)),(!r||g[0]&8)&&Q(t,"active",h[3]===Fi),h[3]===vl?c?(c.p(h,g),g[0]&8&&A(c,1)):(c=sp(h),c.c(),A(c,1),c.m(e,o)):c&&(re(),L(c,1,1,()=>{c=null}),ae()),h[15]?d?(d.p(h,g),g[0]&32768&&A(d,1)):(d=lp(h),d.c(),A(d,1),d.m(e,null)):d&&(re(),L(d,1,1,()=>{d=null}),ae())},i(h){r||(A(s),A(c),A(d),r=!0)},o(h){L(s),L(c),L(d),r=!1},d(h){h&&k(e),u[i].d(),c&&c.d(),d&&d.d()}}}function op(n){let e,t,i,s,l,o,r;return o=new Rn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[bM]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),i=v("button"),s=v("i"),l=O(),V(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"aria-label","More"),p(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),b(i,s),b(i,l),j(o,i,null),r=!0},p(a,u){const f={};u[1]&4194304&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){L(o.$$.fragment,a),r=!1},d(a){a&&(k(e),k(t),k(i)),H(o)}}}function bM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=' Duplicate',t=O(),i=v("button"),i.innerHTML=' Delete',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",Fn(Qe(n[27])))],s=!0)},p:x,d(o){o&&(k(e),k(t),k(i)),s=!1,Ce(l)}}}function rp(n){let e,t,i,s;return i=new Rn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[vM]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=O(),V(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){w(l,e,o),w(l,t,o),j(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),k(t)),H(i,l)}}}function ap(n){let e,t,i,s,l,o=n[50]+"",r,a,u,f,c;function d(){return n[29](n[49])}return{c(){e=v("button"),t=v("i"),s=O(),l=v("span"),r=U(o),a=U(" collection"),u=O(),p(t,"class",i=wi(z.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),Q(e,"selected",n[49]==n[2].type)},m(h,g){w(h,e,g),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),b(e,u),f||(c=Y(e,"click",d),f=!0)},p(h,g){n=h,g[0]&64&&i!==(i=wi(z.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb")&&p(t,"class",i),g[0]&64&&o!==(o=n[50]+"")&&se(r,o),g[0]&68&&Q(e,"selected",n[49]==n[2].type)},d(h){h&&k(e),f=!1,c()}}}function vM(n){let e,t=pe(Object.entries(n[6])),i=[];for(let s=0;s{F=null}),ae()):F?(F.p(R,q),q[0]&4&&A(F,1)):(F=rp(R),F.c(),A(F,1),F.m(d,null)),(!D||q[0]&4&&$!==($="btn btn-sm p-r-10 p-l-10 "+(R[2].id?"btn-transparent":"btn-outline")))&&p(d,"class",$),(!D||q[0]&4&&C!==(C=!!R[2].id))&&(d.disabled=C),R[2].system?N||(N=up(),N.c(),N.m(E.parentNode,E)):N&&(N.d(1),N=null)},i(R){D||(A(F),D=!0)},o(R){L(F),D=!1},d(R){R&&(k(e),k(s),k(l),k(f),k(c),k(M),k(E)),F&&F.d(),N&&N.d(R),I=!1,P()}}}function fp(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=$e(t=He.call(null,e,n[11])),l=!0)},p(r,a){t&&It(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&Xe(()=>{s&&(i||(i=qe(e,Jt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=qe(e,Jt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function cp(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=$e(He.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Xe(()=>{i&&(t||(t=qe(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=qe(e,Jt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function dp(n){var a,u,f;let e,t,i,s=!z.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&pp();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=O(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),Q(e,"active",n[3]===As)},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 h,g,m;d[0]&32&&(s=!z.isEmpty((h=c[5])==null?void 0:h.options)&&!((m=(g=c[5])==null?void 0:g.options)!=null&&m.manageRule)),s?r?d[0]&32&&A(r,1):(r=pp(),r.c(),A(r,1),r.m(e,null)):r&&(re(),L(r,1,1,()=>{r=null}),ae()),d[0]&8&&Q(e,"active",c[3]===As)},d(c){c&&k(e),r&&r.d(),l=!1,o()}}}function pp(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=$e(He.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Xe(()=>{i&&(t||(t=qe(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=qe(e,Jt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function kM(n){var B,K,J,X,G,ue,ee;let e,t=n[2].id?"Edit collection":"New collection",i,s,l,o,r,a,u,f,c,d,h,g=n[14]?"Query":"Fields",m,_,y=!z.isEmpty(n[11]),S,T,$,C,M=!z.isEmpty((B=n[5])==null?void 0:B.listRule)||!z.isEmpty((K=n[5])==null?void 0:K.viewRule)||!z.isEmpty((J=n[5])==null?void 0:J.createRule)||!z.isEmpty((X=n[5])==null?void 0:X.updateRule)||!z.isEmpty((G=n[5])==null?void 0:G.deleteRule)||!z.isEmpty((ee=(ue=n[5])==null?void 0:ue.options)==null?void 0:ee.manageRule),E,D,I,P,F=!!n[2].id&&!n[2].system&&op(n);r=new ce({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[yM,({uniqueId:te})=>({48:te}),({uniqueId:te})=>[0,te?131072:0]]},$$scope:{ctx:n}}});let N=y&&fp(n),R=M&&cp(),q=n[15]&&dp(n);return{c(){e=v("h4"),i=U(t),s=O(),F&&F.c(),l=O(),o=v("form"),V(r.$$.fragment),a=O(),u=v("input"),f=O(),c=v("div"),d=v("button"),h=v("span"),m=U(g),_=O(),N&&N.c(),S=O(),T=v("button"),$=v("span"),$.textContent="API Rules",C=O(),R&&R.c(),E=O(),q&&q.c(),p(e,"class","upsert-panel-title svelte-12y0yzb"),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),Q(d,"active",n[3]===Fi),p($,"class","txt"),p(T,"type","button"),p(T,"class","tab-item"),Q(T,"active",n[3]===vl),p(c,"class","tabs-header stretched")},m(te,Ee){w(te,e,Ee),b(e,i),w(te,s,Ee),F&&F.m(te,Ee),w(te,l,Ee),w(te,o,Ee),j(r,o,null),b(o,a),b(o,u),w(te,f,Ee),w(te,c,Ee),b(c,d),b(d,h),b(h,m),b(d,_),N&&N.m(d,null),b(c,S),b(c,T),b(T,$),b(T,C),R&&R.m(T,null),b(c,E),q&&q.m(c,null),D=!0,I||(P=[Y(o,"submit",Qe(n[30])),Y(d,"click",n[31]),Y(T,"click",n[32])],I=!0)},p(te,Ee){var Ve,ze,Se,Me,Ze,bt,Ge;(!D||Ee[0]&4)&&t!==(t=te[2].id?"Edit collection":"New collection")&&se(i,t),te[2].id&&!te[2].system?F?(F.p(te,Ee),Ee[0]&4&&A(F,1)):(F=op(te),F.c(),A(F,1),F.m(l.parentNode,l)):F&&(re(),L(F,1,1,()=>{F=null}),ae());const Fe={};Ee[0]&8192&&(Fe.class="form-field collection-field-name required m-b-0 "+(te[13]?"disabled":"")),Ee[0]&41028|Ee[1]&4325376&&(Fe.$$scope={dirty:Ee,ctx:te}),r.$set(Fe),(!D||Ee[0]&16384)&&g!==(g=te[14]?"Query":"Fields")&&se(m,g),Ee[0]&2048&&(y=!z.isEmpty(te[11])),y?N?(N.p(te,Ee),Ee[0]&2048&&A(N,1)):(N=fp(te),N.c(),A(N,1),N.m(d,null)):N&&(re(),L(N,1,1,()=>{N=null}),ae()),(!D||Ee[0]&8)&&Q(d,"active",te[3]===Fi),Ee[0]&32&&(M=!z.isEmpty((Ve=te[5])==null?void 0:Ve.listRule)||!z.isEmpty((ze=te[5])==null?void 0:ze.viewRule)||!z.isEmpty((Se=te[5])==null?void 0:Se.createRule)||!z.isEmpty((Me=te[5])==null?void 0:Me.updateRule)||!z.isEmpty((Ze=te[5])==null?void 0:Ze.deleteRule)||!z.isEmpty((Ge=(bt=te[5])==null?void 0:bt.options)==null?void 0:Ge.manageRule)),M?R?Ee[0]&32&&A(R,1):(R=cp(),R.c(),A(R,1),R.m(T,null)):R&&(re(),L(R,1,1,()=>{R=null}),ae()),(!D||Ee[0]&8)&&Q(T,"active",te[3]===vl),te[15]?q?q.p(te,Ee):(q=dp(te),q.c(),q.m(c,null)):q&&(q.d(1),q=null)},i(te){D||(A(F),A(r.$$.fragment,te),A(N),A(R),D=!0)},o(te){L(F),L(r.$$.fragment,te),L(N),L(R),D=!1},d(te){te&&(k(e),k(s),k(l),k(o),k(f),k(c)),F&&F.d(te),H(r),N&&N.d(),R&&R.d(),q&&q.d(),I=!1,Ce(P)}}}function wM(n){let e,t,i,s,l,o=n[2].id?"Save changes":"Create",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=U(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],Q(s,"btn-loading",n[9])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(l,r),u||(f=[Y(e,"click",n[24]),Y(s,"click",n[25])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].id?"Save changes":"Create")&&se(r,o),d[0]&4608&&a!==(a=!c[12]||c[9])&&(s.disabled=a),d[0]&512&&Q(s,"btn-loading",c[9])},d(c){c&&(k(e),k(i),k(s)),u=!1,Ce(f)}}}function SM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[38],$$slots:{footer:[wM],header:[kM],default:[_M]},$$scope:{ctx:n}};e=new on({props:l}),n[39](e),e.$on("hide",n[40]),e.$on("show",n[41]);let o={};return i=new hM({props:o}),n[42](i),i.$on("confirm",n[43]),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(r,a){j(e,r,a),w(r,t,a),j(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[38]),a[0]&64108|a[1]&4194304&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},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){r&&k(t),n[39](null),H(e,r),n[42](null),H(i,r)}}}const Fi="schema",vl="api_rules",As="options",$M="base",hp="auth",mp="view";function Lr(n){return JSON.stringify(n)}function TM(n,e,t){let i,s,l,o,r,a;Ye(n,Ci,ye=>t(5,a=ye));const u={};u[$M]="Base",u[mp]="View",u[hp]="Auth";const f=wt();let c,d,h=null,g=z.initCollection(),m=!1,_=!1,y=Fi,S=Lr(g),T="";function $(ye){t(3,y=ye)}function C(ye){return E(ye),t(10,_=!0),$(Fi),c==null?void 0:c.show()}function M(){return c==null?void 0:c.hide()}async function E(ye){tn({}),typeof ye<"u"?(t(22,h=ye),t(2,g=structuredClone(ye))):(t(22,h=null),t(2,g=z.initCollection())),t(2,g.schema=g.schema||[],g),t(2,g.originalName=g.name||"",g),await ln(),t(23,S=Lr(g))}function D(){g.id?d==null||d.show(h,g):I()}function I(){if(m)return;t(9,m=!0);const ye=P();let Je;g.id?Je=fe.collections.update(g.id,ye):Je=fe.collections.create(ye),Je.then(Oe=>{Ea(),Iy(Oe),t(10,_=!1),M(),jt(g.id?"Successfully updated collection.":"Successfully created collection."),f("save",{isNew:!g.id,collection:Oe})}).catch(Oe=>{fe.error(Oe)}).finally(()=>{t(9,m=!1)})}function P(){const ye=Object.assign({},g);ye.schema=ye.schema.slice(0);for(let Je=ye.schema.length-1;Je>=0;Je--)ye.schema[Je].toDelete&&ye.schema.splice(Je,1);return ye}function F(){h!=null&&h.id&&mn(`Do you really want to delete collection "${h.name}" and all its records?`,()=>fe.collections.delete(h.id).then(()=>{M(),jt(`Successfully deleted collection "${h.name}".`),f("delete",h),Ly(h)}).catch(ye=>{fe.error(ye)}))}function N(ye){t(2,g.type=ye,g),di("schema")}function R(){o?mn("You have unsaved changes. Do you really want to discard them?",()=>{q()}):q()}async function q(){const ye=h?structuredClone(h):null;if(ye){if(ye.id="",ye.created="",ye.updated="",ye.name+="_duplicate",!z.isEmpty(ye.schema))for(const Je of ye.schema)Je.id="";if(!z.isEmpty(ye.indexes))for(let Je=0;JeM(),K=()=>D(),J=()=>R(),X=()=>F(),G=ye=>{t(2,g.name=z.slugify(ye.target.value),g),ye.target.value=g.name},ue=ye=>N(ye),ee=()=>{r&&D()},te=()=>$(Fi),Ee=()=>$(vl),Fe=()=>$(As);function Ve(ye){g=ye,t(2,g),t(22,h)}function ze(ye){g=ye,t(2,g),t(22,h)}function Se(ye){g=ye,t(2,g),t(22,h)}function Me(ye){g=ye,t(2,g),t(22,h)}const Ze=()=>o&&_?(mn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,_=!1),M()}),!1):!0;function bt(ye){ne[ye?"unshift":"push"](()=>{c=ye,t(7,c)})}function Ge(ye){Ne.call(this,n,ye)}function Ke(ye){Ne.call(this,n,ye)}function $t(ye){ne[ye?"unshift":"push"](()=>{d=ye,t(8,d)})}const me=()=>I();return n.$$.update=()=>{var ye,Je;n.$$.dirty[0]&4&&g.type==="view"&&(t(2,g.createRule=null,g),t(2,g.updateRule=null,g),t(2,g.deleteRule=null,g),t(2,g.indexes=[],g)),n.$$.dirty[0]&4194308&&g.name&&(h==null?void 0:h.name)!=g.name&&g.indexes.length>0&&t(2,g.indexes=(ye=g.indexes)==null?void 0:ye.map(Oe=>z.replaceIndexTableName(Oe,g.name)),g),n.$$.dirty[0]&4&&t(15,i=g.type===hp),n.$$.dirty[0]&4&&t(14,s=g.type===mp),n.$$.dirty[0]&32&&(a.schema||(Je=a.options)!=null&&Je.query?t(11,T=z.getNestedVal(a,"schema.message")||"Has errors"):t(11,T="")),n.$$.dirty[0]&4&&t(13,l=!!g.id&&g.system),n.$$.dirty[0]&8388612&&t(4,o=S!=Lr(g)),n.$$.dirty[0]&20&&t(12,r=!g.id||o),n.$$.dirty[0]&12&&y===As&&g.type!=="auth"&&$(Fi)},[$,M,g,y,o,a,u,c,d,m,_,T,r,l,s,i,D,I,F,N,R,C,h,S,B,K,J,X,G,ue,ee,te,Ee,Fe,Ve,ze,Se,Me,Ze,bt,Ge,Ke,$t,me]}class su extends ve{constructor(e){super(),be(this,e,TM,SM,he,{changeTab:0,show:21,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[21]}get hide(){return this.$$.ctx[1]}}function gp(n,e,t){const i=n.slice();return i[15]=e[t],i}function _p(n){let e,t=n[1].length&&bp();return{c(){t&&t.c(),e=ke()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1].length?t||(t=bp(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){i&&k(e),t&&t.d(i)}}}function bp(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function vp(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,c,d,h;return{key:n,first:null,c(){var g;t=v("a"),i=v("i"),l=O(),o=v("span"),a=U(r),u=O(),p(i,"class",s=z.getCollectionTypeIcon(e[15].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[15].id),p(t,"class","sidebar-list-item"),p(t,"title",c=e[15].name),Q(t,"active",((g=e[5])==null?void 0:g.id)===e[15].id),this.first=t},m(g,m){w(g,t,m),b(t,i),b(t,l),b(t,o),b(o,a),b(t,u),d||(h=$e(un.call(null,t)),d=!0)},p(g,m){var _;e=g,m&8&&s!==(s=z.getCollectionTypeIcon(e[15].type))&&p(i,"class",s),m&8&&r!==(r=e[15].name+"")&&se(a,r),m&8&&f!==(f="/collections?collectionId="+e[15].id)&&p(t,"href",f),m&8&&c!==(c=e[15].name)&&p(t,"title",c),m&40&&Q(t,"active",((_=e[5])==null?void 0:_.id)===e[15].id)},d(g){g&&k(t),d=!1,h()}}}function yp(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=' New collection',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:x,d(l){l&&k(e),i=!1,s()}}}function CM(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],h=new Map,g,m,_,y,S,T,$=pe(n[3]);const C=I=>I[15].id;for(let I=0;I<$.length;I+=1){let P=gp(n,$,I),F=C(P);h.set(F,d[I]=vp(F,P))}let M=null;$.length||(M=_p(n));let E=!n[7]&&yp(n),D={};return _=new su({props:D}),n[13](_),_.$on("save",n[14]),{c(){e=v("aside"),t=v("header"),i=v("div"),s=v("div"),l=v("button"),l.innerHTML='',o=O(),r=v("input"),a=O(),u=v("hr"),f=O(),c=v("div");for(let I=0;I20),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),oe(r,n[0]),b(e,a),b(e,u),b(e,f),b(e,c);for(let F=0;F20),I[7]?E&&(E.d(1),E=null):E?E.p(I,P):(E=yp(I),E.c(),E.m(e,null));const F={};_.$set(F)},i(I){y||(A(_.$$.fragment,I),y=!0)},o(I){L(_.$$.fragment,I),y=!1},d(I){I&&(k(e),k(m));for(let P=0;P{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function OM(n,e,t){let i,s,l,o,r,a,u;Ye(n,$i,S=>t(5,o=S)),Ye(n,ii,S=>t(9,r=S)),Ye(n,vo,S=>t(6,a=S)),Ye(n,Ms,S=>t(7,u=S));let f,c="";function d(S){sn($i,o=S,o)}const h=()=>t(0,c="");function g(){c=this.value,t(0,c)}const m=()=>f==null?void 0:f.show();function _(S){ne[S?"unshift":"push"](()=>{f=S,t(2,f)})}const y=S=>{var T;(T=S.detail)!=null&&T.isNew&&S.detail.collection&&d(S.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&MM(),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,f,l,s,o,a,u,d,r,h,g,m,_,y]}class EM extends ve{constructor(e){super(),be(this,e,OM,CM,he,{})}}function kp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function wp(n){n[18]=n[19].default}function Sp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function $p(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 Tp(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&$p();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ke(),c&&c.c(),s=O(),l=v("button"),r=U(o),a=O(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(l,"active",e[5]===e[14]),this.first=t},m(h,g){w(h,t,g),c&&c.m(h,g),w(h,s,g),w(h,l,g),b(l,r),b(l,a),u||(f=Y(l,"click",d),u=!0)},p(h,g){e=h,g&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=$p(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),g&8&&o!==(o=e[15].label+"")&&se(r,o),g&40&&Q(l,"active",e[5]===e[14])},d(h){h&&(k(t),k(s),k(l)),c&&c.d(h),u=!1,f()}}}function Cp(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:IM,then:AM,catch:DM,value:19,blocks:[,,,]};return fu(t=n[15].component,s),{c(){e=ke(),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)&&fu(t,s)||t0(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 DM(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function AM(n){wp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){V(e.$$.fragment),t=O()},m(s,l){j(e,s,l),w(s,t,l),i=!0},p(s,l){wp(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){s&&k(t),H(e,s)}}}function IM(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function Mp(n,e){let t,i,s,l=e[5]===e[14]&&Cp(e);return{key:n,first:null,c(){t=ke(),l&&l.c(),i=ke(),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=Cp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(l),s=!0)},o(o){L(l),s=!1},d(o){o&&(k(t),k(i)),l&&l.d(o)}}}function LM(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=pe(Object.entries(n[3]));const d=m=>m[14];for(let m=0;mm[14];for(let m=0;mClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function FM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[PM],default:[LM]},$$scope:{ctx:n}};return e=new on({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(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 NM(n,e,t){const i={list:{label:"List/Search",component:ot(()=>import("./ListApiDocs-b2735b9f.js"),["./ListApiDocs-b2735b9f.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:ot(()=>import("./ViewApiDocs-c1c520bc.js"),["./ViewApiDocs-c1c520bc.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-594c3384.js"],import.meta.url)},create:{label:"Create",component:ot(()=>import("./CreateApiDocs-75ddf886.js"),["./CreateApiDocs-75ddf886.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-594c3384.js"],import.meta.url)},update:{label:"Update",component:ot(()=>import("./UpdateApiDocs-f59c2a12.js"),["./UpdateApiDocs-f59c2a12.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-594c3384.js"],import.meta.url)},delete:{label:"Delete",component:ot(()=>import("./DeleteApiDocs-d3ab258e.js"),["./DeleteApiDocs-d3ab258e.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:ot(()=>import("./RealtimeApiDocs-264e523b.js"),["./RealtimeApiDocs-264e523b.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:ot(()=>import("./AuthWithPasswordDocs-78868ea3.js"),["./AuthWithPasswordDocs-78868ea3.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-594c3384.js"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:ot(()=>import("./AuthWithOAuth2Docs-e75369d5.js"),["./AuthWithOAuth2Docs-e75369d5.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-594c3384.js"],import.meta.url)},refresh:{label:"Auth refresh",component:ot(()=>import("./AuthRefreshDocs-e0c8945f.js"),["./AuthRefreshDocs-e0c8945f.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-594c3384.js"],import.meta.url)},"request-verification":{label:"Request verification",component:ot(()=>import("./RequestVerificationDocs-c525e5da.js"),["./RequestVerificationDocs-c525e5da.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:ot(()=>import("./ConfirmVerificationDocs-076a26a1.js"),["./ConfirmVerificationDocs-076a26a1.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:ot(()=>import("./RequestPasswordResetDocs-0cdf8259.js"),["./RequestPasswordResetDocs-0cdf8259.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:ot(()=>import("./ConfirmPasswordResetDocs-c1cf9a9f.js"),["./ConfirmPasswordResetDocs-c1cf9a9f.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:ot(()=>import("./RequestEmailChangeDocs-8fc3b91e.js"),["./RequestEmailChangeDocs-8fc3b91e.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:ot(()=>import("./ConfirmEmailChangeDocs-96c1f5c9.js"),["./ConfirmEmailChangeDocs-96c1f5c9.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:ot(()=>import("./AuthMethodsDocs-89c0a52a.js"),["./AuthMethodsDocs-89c0a52a.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-594c3384.js"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:ot(()=>import("./ListExternalAuthsDocs-e65208fd.js"),["./ListExternalAuthsDocs-e65208fd.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-594c3384.js"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:ot(()=>import("./UnlinkExternalAuthDocs-217d7224.js"),["./UnlinkExternalAuthDocs-217d7224.js","./SdkTabs-36d454aa.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o={},r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),h=y=>c(y);function g(y){ne[y?"unshift":"push"](()=>{l=y,t(4,l)})}function m(y){Ne.call(this,n,y)}function _(y){Ne.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.type==="auth"?(t(3,a=Object.assign({},i,s)),!o.options.allowUsernameAuth&&!o.options.allowEmailAuth&&delete a["auth-with-password"],o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):o.type==="view"?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,h,g,m,_]}class RM extends ve{constructor(e){super(),be(this,e,NM,FM,he,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function qM(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0]),p(e,"aria-label","Copy")},m(o,r){w(o,e,r),s||(l=[$e(i=He.call(null,e,n[2]?"":"Copy")),Y(e,"click",Fn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&It(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:x,o:x,d(o){o&&k(e),s=!1,Ce(l)}}}function jM(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(z.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return Zt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class qs extends ve{constructor(e){super(),be(this,e,jM,qM,he,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function HM(n){let e,t,i,s,l,o,r,a,u,f;return l=new qs({props:{value:n[1]}}),{c(){e=v("div"),t=v("span"),i=U(n[1]),s=O(),V(l.$$.fragment),o=O(),r=v("i"),p(t,"class","secret svelte-1md8247"),p(r,"class","ri-refresh-line txt-sm link-hint"),p(r,"aria-label","Refresh"),p(e,"class","flex flex-gap-5 p-5")},m(c,d){w(c,e,d),b(e,t),b(t,i),n[6](t),b(e,s),j(l,e,null),b(e,o),b(e,r),a=!0,u||(f=[$e(He.call(null,r,"Refresh")),Y(r,"click",n[4])],u=!0)},p(c,d){(!a||d&2)&&se(i,c[1]);const h={};d&2&&(h.value=c[1]),l.$set(h)},i(c){a||(A(l.$$.fragment,c),a=!0)},o(c){L(l.$$.fragment,c),a=!1},d(c){c&&k(e),n[6](null),H(l),u=!1,Ce(f)}}}function VM(n){let e,t,i,s,l,o,r,a,u,f;function c(h){n[7](h)}let d={class:"dropdown dropdown-upside dropdown-center dropdown-nowrap",$$slots:{default:[HM]},$$scope:{ctx:n}};return n[3]!==void 0&&(d.active=n[3]),s=new Rn({props:d}),ne.push(()=>de(s,"active",c)),s.$on("show",n[4]),{c(){e=v("button"),t=v("i"),i=O(),V(s.$$.fragment),p(t,"class","ri-sparkling-line"),p(e,"tabindex","-1"),p(e,"type","button"),p(e,"aria-label","Generate"),p(e,"class",o="btn btn-circle "+n[0]+" svelte-1md8247")},m(h,g){w(h,e,g),b(e,t),b(e,i),j(s,e,null),a=!0,u||(f=$e(r=He.call(null,e,n[3]?"":"Generate")),u=!0)},p(h,[g]){const m={};g&518&&(m.$$scope={dirty:g,ctx:h}),!l&&g&8&&(l=!0,m.active=h[3],_e(()=>l=!1)),s.$set(m),(!a||g&1&&o!==(o="btn btn-circle "+h[0]+" svelte-1md8247"))&&p(e,"class",o),r&&It(r.update)&&g&8&&r.update.call(null,h[3]?"":"Generate")},i(h){a||(A(s.$$.fragment,h),a=!0)},o(h){L(s.$$.fragment,h),a=!1},d(h){h&&k(e),H(s),u=!1,f()}}}function zM(n,e,t){const i=wt();let{class:s="btn-sm btn-hint btn-transparent"}=e,{length:l=32}=e,o="",r,a=!1;async function u(){if(t(1,o=z.randomSecret(l)),i("generate",o),await ln(),r){let d=document.createRange();d.selectNode(r),window.getSelection().removeAllRanges(),window.getSelection().addRange(d)}}function f(d){ne[d?"unshift":"push"](()=>{r=d,t(2,r)})}function c(d){a=d,t(3,a)}return n.$$set=d=>{"class"in d&&t(0,s=d.class),"length"in d&&t(5,l=d.length)},[s,o,r,a,u,l,f,c]}class k1 extends ve{constructor(e){super(),be(this,e,zM,VM,he,{class:0,length:5})}}function BM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Username",o=O(),r=v("input"),p(t,"class",z.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","text"),p(r,"requried",a=!n[2]),p(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),p(r,"id",f=n[13])},m(h,g){w(h,e,g),b(e,t),b(e,i),b(e,s),w(h,o,g),w(h,r,g),oe(r,n[0].username),c||(d=Y(r,"input",n[5]),c=!0)},p(h,g){g&8192&&l!==(l=h[13])&&p(e,"for",l),g&4&&a!==(a=!h[2])&&p(r,"requried",a),g&4&&u!==(u=h[2]?"Leave empty to auto generate...":h[4])&&p(r,"placeholder",u),g&8192&&f!==(f=h[13])&&p(r,"id",f),g&1&&r.value!==h[0].username&&oe(r,h[0].username)},d(h){h&&(k(e),k(o),k(r)),c=!1,d()}}}function UM(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,h,g,m,_,y,S,T;return{c(){var $;e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("div"),a=v("button"),u=v("span"),f=U("Public: "),d=U(c),g=O(),m=v("input"),p(t,"class",z.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[13]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",h="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(m,"type","email"),m.autofocus=n[2],p(m,"autocomplete","off"),p(m,"id",_=n[13]),m.required=y=($=n[1].options)==null?void 0:$.requireEmail,p(m,"class","svelte-1751a4d")},m($,C){w($,e,C),b(e,t),b(e,i),b(e,s),w($,o,C),w($,r,C),b(r,a),b(a,u),b(u,f),b(u,d),w($,g,C),w($,m,C),oe(m,n[0].email),n[2]&&m.focus(),S||(T=[$e(He.call(null,a,{text:"Make email public or private",position:"top-right"})),Y(a,"click",n[6]),Y(m,"input",n[7])],S=!0)},p($,C){var M;C&8192&&l!==(l=$[13])&&p(e,"for",l),C&1&&c!==(c=$[0].emailVisibility?"On":"Off")&&se(d,c),C&1&&h!==(h="btn btn-sm btn-transparent "+($[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",h),C&4&&(m.autofocus=$[2]),C&8192&&_!==(_=$[13])&&p(m,"id",_),C&2&&y!==(y=(M=$[1].options)==null?void 0:M.requireEmail)&&(m.required=y),C&1&&m.value!==$[0].email&&oe(m,$[0].email)},d($){$&&(k(e),k(o),k(r),k(g),k(m)),S=!1,Ce(T)}}}function Op(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[WM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&24584&&(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 WM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Ep(n){let e,t,i,s,l,o,r,a,u;return s=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[YM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[KM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),V(s.$$.fragment),l=O(),o=v("div"),V(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),Q(t,"p-t-xs",n[3]),p(e,"class","block")},m(f,c){w(f,e,c),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),u=!0},p(f,c){const d={};c&24577&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c&24577&&(h.$$scope={dirty:c,ctx:f}),r.$set(h),(!u||c&8)&&Q(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&Xe(()=>{u&&(a||(a=qe(e,nt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){L(s.$$.fragment,f),L(r.$$.fragment,f),f&&(a||(a=qe(e,nt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),H(s),H(r),f&&a&&a.end()}}}function YM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g;return c=new k1({}),{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),u=O(),f=v("div"),V(c.$$.fragment),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0,p(f,"class","form-field-addon")},m(m,_){w(m,e,_),b(e,t),b(e,i),b(e,s),w(m,o,_),w(m,r,_),oe(r,n[0].password),w(m,u,_),w(m,f,_),j(c,f,null),d=!0,h||(g=Y(r,"input",n[9]),h=!0)},p(m,_){(!d||_&8192&&l!==(l=m[13]))&&p(e,"for",l),(!d||_&8192&&a!==(a=m[13]))&&p(r,"id",a),_&1&&r.value!==m[0].password&&oe(r,m[0].password)},i(m){d||(A(c.$$.fragment,m),d=!0)},o(m){L(c.$$.fragment,m),d=!1},d(m){m&&(k(e),k(o),k(r),k(u),k(f)),H(c),h=!1,g()}}}function KM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),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),oe(r,n[0].passwordConfirm),u||(f=Y(r,"input",n[10]),u=!0)},p(c,d){d&8192&&l!==(l=c[13])&&p(e,"for",l),d&8192&&a!==(a=c[13])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&oe(r,c[0].passwordConfirm)},d(c){c&&(k(e),k(o),k(r)),u=!1,f()}}}function JM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[0].verified,w(u,i,f),w(u,s,f),b(s,l),r||(a=[Y(e,"change",n[11]),Y(e,"change",Qe(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,Ce(a)}}}function ZM(n){var _;let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new ce({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[BM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field "+((_=n[1].options)!=null&&_.requireEmail?"required":""),name:"email",$$slots:{default:[UM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}});let g=!n[2]&&Op(n),m=(n[2]||n[3])&&Ep(n);return d=new ce({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[JM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),r=O(),a=v("div"),g&&g.c(),u=O(),m&&m.c(),f=O(),c=v("div"),V(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,S){w(y,e,S),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),g&&g.m(a,null),b(a,u),m&&m.m(a,null),b(e,f),b(e,c),j(d,c,null),h=!0},p(y,[S]){var M;const T={};S&4&&(T.class="form-field "+(y[2]?"":"required")),S&24581&&(T.$$scope={dirty:S,ctx:y}),i.$set(T);const $={};S&2&&($.class="form-field "+((M=y[1].options)!=null&&M.requireEmail?"required":"")),S&24583&&($.$$scope={dirty:S,ctx:y}),o.$set($),y[2]?g&&(re(),L(g,1,1,()=>{g=null}),ae()):g?(g.p(y,S),S&4&&A(g,1)):(g=Op(y),g.c(),A(g,1),g.m(a,u)),y[2]||y[3]?m?(m.p(y,S),S&12&&A(m,1)):(m=Ep(y),m.c(),A(m,1),m.m(a,null)):m&&(re(),L(m,1,1,()=>{m=null}),ae());const C={};S&24581&&(C.$$scope={dirty:S,ctx:y}),d.$set(C)},i(y){h||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(g),A(m),A(d.$$.fragment,y),h=!0)},o(y){L(i.$$.fragment,y),L(o.$$.fragment,y),L(g),L(m),L(d.$$.fragment,y),h=!1},d(y){y&&k(e),H(i),H(o),g&&g.d(),m&&m.d(),H(d)}}}function GM(n,e,t){let{record:i}=e,{collection:s}=e,{isNew:l=!i.id}=e,o=i.username||null,r=!1;function a(){i.username=this.value,t(0,i),t(3,r)}const u=()=>t(0,i.emailVisibility=!i.emailVisibility,i);function f(){i.email=this.value,t(0,i),t(3,r)}function c(){r=this.checked,t(3,r)}function d(){i.password=this.value,t(0,i),t(3,r)}function h(){i.passwordConfirm=this.value,t(0,i),t(3,r)}function g(){i.verified=this.checked,t(0,i),t(3,r)}const m=_=>{l||mn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,i.verified=!_.target.checked,i)})};return n.$$set=_=>{"record"in _&&t(0,i=_.record),"collection"in _&&t(1,s=_.collection),"isNew"in _&&t(2,l=_.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!i.username&&i.username!==null&&t(0,i.username=null,i),n.$$.dirty&8&&(r||(t(0,i.password=null,i),t(0,i.passwordConfirm=null,i),di("password"),di("passwordConfirm")))},[i,s,l,r,o,a,u,f,c,d,h,g,m]}class XM extends ve{constructor(e){super(),be(this,e,GM,ZM,he,{record:0,collection:1,isNew:2})}}function QM(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)&&!(h!=null&&h.isComposing)){h.preventDefault();const g=r.closest("form");g!=null&&g.requestSubmit&&g.requestSubmit()}}Zt(()=>(u(),()=>clearTimeout(a)));function c(h){ne[h?"unshift":"push"](()=>{r=h,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(3,s=xe(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,o=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class e5 extends ve{constructor(e){super(),be(this,e,xM,QM,he,{value:0,maxHeight:4})}}function t5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(m){n[2](m)}let g={id:n[3],required:n[1].required};return n[0]!==void 0&&(g.value=n[0]),f=new e5({props:g}),ne.push(()=>de(f,"value",h)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),u=O(),V(f.$$.fragment),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(m,_){w(m,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(m,u,_),j(f,m,_),d=!0},p(m,_){(!d||_&2&&i!==(i=z.getFieldTypeIcon(m[1].type)))&&p(t,"class",i),(!d||_&2)&&o!==(o=m[1].name+"")&&se(r,o),(!d||_&8&&a!==(a=m[3]))&&p(e,"for",a);const y={};_&8&&(y.id=m[3]),_&2&&(y.required=m[1].required),!c&&_&1&&(c=!0,y.value=m[0],_e(()=>c=!1)),f.$set(y)},i(m){d||(A(f.$$.fragment,m),d=!0)},o(m){L(f.$$.fragment,m),d=!1},d(m){m&&(k(e),k(u)),H(f,m)}}}function n5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[t5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function i5(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class s5 extends ve{constructor(e){super(),be(this,e,i5,n5,he,{field:1,value:0})}}function l5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,g,m,_;return{c(){var y,S;e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),u=O(),f=v("input"),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",h=(y=n[1].options)==null?void 0:y.min),p(f,"max",g=(S=n[1].options)==null?void 0:S.max),p(f,"step","any")},m(y,S){w(y,e,S),b(e,t),b(e,s),b(e,l),b(l,r),w(y,u,S),w(y,f,S),oe(f,n[0]),m||(_=Y(f,"input",n[2]),m=!0)},p(y,S){var T,$;S&2&&i!==(i=z.getFieldTypeIcon(y[1].type))&&p(t,"class",i),S&2&&o!==(o=y[1].name+"")&&se(r,o),S&8&&a!==(a=y[3])&&p(e,"for",a),S&8&&c!==(c=y[3])&&p(f,"id",c),S&2&&d!==(d=y[1].required)&&(f.required=d),S&2&&h!==(h=(T=y[1].options)==null?void 0:T.min)&&p(f,"min",h),S&2&&g!==(g=($=y[1].options)==null?void 0:$.max)&&p(f,"max",g),S&1&&ht(f.value)!==y[0]&&oe(f,y[0])},d(y){y&&(k(e),k(u),k(f)),m=!1,_()}}}function o5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[l5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function r5(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=ht(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class a5 extends ve{constructor(e){super(),be(this,e,r5,o5,he,{field:1,value:0})}}function u5(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=O(),s=v("label"),o=U(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){w(f,e,c),e.checked=n[0],w(f,i,c),w(f,s,c),b(s,o),a||(u=Y(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&se(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&(k(e),k(i),k(s)),a=!1,u()}}}function f5(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[u5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function c5(n,e,t){let{field:i}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class d5 extends ve{constructor(e){super(),be(this,e,c5,f5,he,{field:1,value:0})}}function p5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,g;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),u=O(),f=v("input"),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(m,_){w(m,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(m,u,_),w(m,f,_),oe(f,n[0]),h||(g=Y(f,"input",n[2]),h=!0)},p(m,_){_&2&&i!==(i=z.getFieldTypeIcon(m[1].type))&&p(t,"class",i),_&2&&o!==(o=m[1].name+"")&&se(r,o),_&8&&a!==(a=m[3])&&p(e,"for",a),_&8&&c!==(c=m[3])&&p(f,"id",c),_&2&&d!==(d=m[1].required)&&(f.required=d),_&1&&f.value!==m[0]&&oe(f,m[0])},d(m){m&&(k(e),k(u),k(f)),h=!1,g()}}}function h5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[p5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function m5(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class g5 extends ve{constructor(e){super(),be(this,e,m5,h5,he,{field:1,value:0})}}function _5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,g;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),u=O(),f=v("input"),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(m,_){w(m,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(m,u,_),w(m,f,_),oe(f,n[0]),h||(g=Y(f,"input",n[2]),h=!0)},p(m,_){_&2&&i!==(i=z.getFieldTypeIcon(m[1].type))&&p(t,"class",i),_&2&&o!==(o=m[1].name+"")&&se(r,o),_&8&&a!==(a=m[3])&&p(e,"for",a),_&8&&c!==(c=m[3])&&p(f,"id",c),_&2&&d!==(d=m[1].required)&&(f.required=d),_&1&&f.value!==m[0]&&oe(f,m[0])},d(m){m&&(k(e),k(u),k(f)),h=!1,g()}}}function b5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[_5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function v5(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class y5 extends ve{constructor(e){super(),be(this,e,v5,b5,he,{field:1,value:0})}}function Dp(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){w(l,e,o),b(e,t),i||(s=[$e(He.call(null,t,"Clear")),Y(t,"click",n[5])],i=!0)},p:x,d(l){l&&k(e),i=!1,Ce(s)}}}function k5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,g,m,_=n[0]&&!n[1].required&&Dp(n);function y($){n[6]($)}function S($){n[7]($)}let T={id:n[8],options:z.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),d=new iu({props:T}),ne.push(()=>de(d,"value",y)),ne.push(()=>de(d,"formattedValue",S)),d.$on("close",n[3]),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),a=U(" (UTC)"),f=O(),_&&_.c(),c=O(),V(d.$$.fragment),p(t,"class",i=wi(z.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[8])},m($,C){w($,e,C),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),w($,f,C),_&&_.m($,C),w($,c,C),j(d,$,C),m=!0},p($,C){(!m||C&2&&i!==(i=wi(z.getFieldTypeIcon($[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!m||C&2)&&o!==(o=$[1].name+"")&&se(r,o),(!m||C&256&&u!==(u=$[8]))&&p(e,"for",u),$[0]&&!$[1].required?_?_.p($,C):(_=Dp($),_.c(),_.m(c.parentNode,c)):_&&(_.d(1),_=null);const M={};C&256&&(M.id=$[8]),!h&&C&4&&(h=!0,M.value=$[2],_e(()=>h=!1)),!g&&C&1&&(g=!0,M.formattedValue=$[0],_e(()=>g=!1)),d.$set(M)},i($){m||(A(d.$$.fragment,$),m=!0)},o($){L(d.$$.fragment,$),m=!1},d($){$&&(k(e),k(f),k(c)),_&&_.d($),H(d,$)}}}function w5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[k5,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(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 S5(n,e,t){let{field:i}=e,{value:s=void 0}=e,l=s;function o(c){c.detail&&c.detail.length==3&&t(0,s=c.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(c){l=c,t(2,l),t(0,s)}function f(c){s=c,t(0,s)}return n.$$set=c=>{"field"in c&&t(1,i=c.field),"value"in c&&t(0,s=c.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class $5 extends ve{constructor(e){super(),be(this,e,S5,w5,he,{field:1,value:0})}}function Ap(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=U("Select up to "),s=U(i),l=U(" items."),p(e,"class","help-block")},m(o,r){w(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&se(s,i)},d(o){o&&k(e)}}}function T5(n){var S,T,$,C,M,E;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,g;function m(D){n[3](D)}let _={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||((S=n[0])==null?void 0:S.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:($=n[1].options)==null?void 0:$.values,searchable:((M=(C=n[1].options)==null?void 0:C.values)==null?void 0:M.length)>5};n[0]!==void 0&&(_.selected=n[0]),f=new y1({props:_}),ne.push(()=>de(f,"selected",m));let y=((E=n[1].options)==null?void 0:E.maxSelect)>1&&Ap(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),u=O(),V(f.$$.fragment),d=O(),y&&y.c(),h=ke(),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(D,I){w(D,e,I),b(e,t),b(e,s),b(e,l),b(l,r),w(D,u,I),j(f,D,I),w(D,d,I),y&&y.m(D,I),w(D,h,I),g=!0},p(D,I){var F,N,R,q,B,K;(!g||I&2&&i!==(i=z.getFieldTypeIcon(D[1].type)))&&p(t,"class",i),(!g||I&2)&&o!==(o=D[1].name+"")&&se(r,o),(!g||I&16&&a!==(a=D[4]))&&p(e,"for",a);const P={};I&16&&(P.id=D[4]),I&6&&(P.toggle=!D[1].required||D[2]),I&4&&(P.multiple=D[2]),I&7&&(P.closable=!D[2]||((F=D[0])==null?void 0:F.length)>=((N=D[1].options)==null?void 0:N.maxSelect)),I&2&&(P.items=(R=D[1].options)==null?void 0:R.values),I&2&&(P.searchable=((B=(q=D[1].options)==null?void 0:q.values)==null?void 0:B.length)>5),!c&&I&1&&(c=!0,P.selected=D[0],_e(()=>c=!1)),f.$set(P),((K=D[1].options)==null?void 0:K.maxSelect)>1?y?y.p(D,I):(y=Ap(D),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(D){g||(A(f.$$.fragment,D),g=!0)},o(D){L(f.$$.fragment,D),g=!1},d(D){D&&(k(e),k(u),k(d),k(h)),H(f,D),y&&y.d(D)}}}function C5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[T5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function M5(n,e,t){let i,{field:s}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class O5 extends ve{constructor(e){super(),be(this,e,M5,C5,he,{field:1,value:0})}}function E5(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function D5(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function A5(n){let e;return{c(){e=v("input"),p(e,"type","text"),p(e,"class","txt-mono"),e.value="Loading...",e.disabled=!0},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function I5(n){let e,t,i;var s=n[3];function l(o,r){return{props:{id:o[6],maxHeight:"500",language:"json",value:o[2]}}}return s&&(e=Dt(s,l(n)),e.$on("change",n[5])),{c(){e&&V(e.$$.fragment),t=ke()},m(o,r){e&&j(e,o,r),w(o,t,r),i=!0},p(o,r){if(r&8&&s!==(s=o[3])){if(e){re();const a=e;L(a.$$.fragment,1,0,()=>{H(a,1)}),ae()}s?(e=Dt(s,l(o)),e.$on("change",o[5]),V(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else if(s){const a={};r&64&&(a.id=o[6]),r&4&&(a.value=o[2]),e.$set(a)}},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&L(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&H(e,o)}}}function L5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,g,m,_,y,S;function T(I,P){return I[4]?D5:E5}let $=T(n),C=$(n);const M=[I5,A5],E=[];function D(I,P){return I[3]?0:1}return h=D(n),g=E[h]=M[h](n),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),a=O(),u=v("span"),C.c(),d=O(),g.c(),m=ke(),p(t,"class",i=wi(z.getFieldTypeIcon(n[1].type))+" svelte-p6ecb8"),p(l,"class","txt"),p(u,"class","json-state svelte-p6ecb8"),p(e,"for",c=n[6])},m(I,P){w(I,e,P),b(e,t),b(e,s),b(e,l),b(l,r),b(e,a),b(e,u),C.m(u,null),w(I,d,P),E[h].m(I,P),w(I,m,P),_=!0,y||(S=$e(f=He.call(null,u,{position:"left",text:n[4]?"Valid JSON":"Invalid JSON"})),y=!0)},p(I,P){(!_||P&2&&i!==(i=wi(z.getFieldTypeIcon(I[1].type))+" svelte-p6ecb8"))&&p(t,"class",i),(!_||P&2)&&o!==(o=I[1].name+"")&&se(r,o),$!==($=T(I))&&(C.d(1),C=$(I),C&&(C.c(),C.m(u,null))),f&&It(f.update)&&P&16&&f.update.call(null,{position:"left",text:I[4]?"Valid JSON":"Invalid JSON"}),(!_||P&64&&c!==(c=I[6]))&&p(e,"for",c);let F=h;h=D(I),h===F?E[h].p(I,P):(re(),L(E[F],1,1,()=>{E[F]=null}),ae(),g=E[h],g?g.p(I,P):(g=E[h]=M[h](I),g.c()),A(g,1),g.m(m.parentNode,m))},i(I){_||(A(g),_=!0)},o(I){L(g),_=!1},d(I){I&&(k(e),k(d),k(m)),C.d(),E[h].d(I),y=!1,S()}}}function P5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[L5,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&223&&(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 Ip(n){return JSON.stringify(typeof n>"u"?null:n,null,2)}function F5(n){try{return JSON.parse(n===""?null:n),!0}catch{}return!1}function N5(n,e,t){let i,{field:s}=e,{value:l=void 0}=e,o,r=Ip(l);Zt(async()=>{try{t(3,o=(await ot(()=>import("./CodeEditor-d578f3b8.js"),["./CodeEditor-d578f3b8.js","./index-4841d67b.js"],import.meta.url)).default)}catch(u){console.warn(u)}});const a=u=>{t(2,r=u.detail),t(0,l=r.trim())};return n.$$set=u=>{"field"in u&&t(1,s=u.field),"value"in u&&t(0,l=u.value)},n.$$.update=()=>{n.$$.dirty&5&&l!==(r==null?void 0:r.trim())&&(t(2,r=Ip(l)),t(0,l=r)),n.$$.dirty&4&&t(4,i=F5(r))},[l,s,r,o,i,a]}class R5 extends ve{constructor(e){super(),be(this,e,N5,P5,he,{field:1,value:0})}}function q5(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function j5(n){let e,t,i;return{c(){e=v("img"),p(e,"draggable",!1),_n(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!_n(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function H5(n){let e;function t(l,o){return l[2]?j5:q5}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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:x,o:x,d(l){l&&k(e),s.d(l)}}}function V5(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){z.hasImageExtension(s==null?void 0:s.name)?z.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{t(2,i=""),console.warn("Unable to generate thumb: ",r)}):t(2,i="")}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class z5 extends ve{constructor(e){super(),be(this,e,V5,H5,he,{file:0,size:1})}}function Lp(n){let e;function t(l,o){return l[4]==="image"?U5:B5}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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){l&&k(e),s.d(l)}}}function B5(n){let e,t;return{c(){e=v("object"),t=U("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){w(i,e,s),b(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&k(e)}}}function U5(n){let e,t,i;return{c(){e=v("img"),_n(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){w(s,e,l)},p(s,l){l&2&&!_n(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&k(e)}}}function W5(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Lp(n);return{c(){i&&i.c(),t=ke()},m(l,o){i&&i.m(l,o),w(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Lp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){l&&k(t),i&&i.d(l)}}}function Y5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Qe(n[0])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function K5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("a"),t=U(n[2]),i=O(),s=v("i"),l=O(),o=v("div"),r=O(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,l,d),w(c,o,d),w(c,r,d),w(c,a,d),u||(f=Y(a,"click",n[0]),u=!0)},p(c,d){d&4&&se(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&(k(e),k(l),k(o),k(r),k(a)),u=!1,f()}}}function J5(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[K5],header:[Y5],default:[W5]},$$scope:{ctx:n}};return e=new on({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(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[7](null),H(e,s)}}}function Z5(n,e,t){let i,s,l,o,r="";function a(h){h!==""&&(t(1,r=h),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(h){ne[h?"unshift":"push"](()=>{o=h,t(3,o)})}function c(h){Ne.call(this,n,h)}function d(h){Ne.call(this,n,h)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=z.getFileType(s))},[u,r,s,o,l,a,i,f,c,d]}class G5 extends ve{constructor(e){super(),be(this,e,Z5,J5,he,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function X5(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?t6:u[3]==="video"||u[3]==="audio"?e6:x5}let r=o(n),a=r(n);return{c(){e=v("a"),a.c(),p(e,"draggable",!1),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){w(u,e,f),a.m(e,null),s||(l=Y(e,"click",Fn(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&p(e,"class",t),f&64&&p(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&p(e,"title",i)},d(u){u&&k(e),a.d(),s=!1,l()}}}function Q5(n){let e,t;return{c(){e=v("div"),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){w(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&p(e,"class",t)},d(i){i&&k(e)}}}function x5(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function e6(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function t6(n){let e,t,i,s,l;return{c(){e=v("img"),p(e,"draggable",!1),_n(e.src,t=n[5])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),p(e,"loading","lazy")},m(o,r){w(o,e,r),s||(l=Y(e,"error",n[8]),s=!0)},p(o,r){r&32&&!_n(e.src,t=o[5])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&k(e),s=!1,l()}}}function n6(n){let e,t,i;function s(a,u){return a[2]?Q5:X5}let l=s(n),o=l(n),r={};return t=new G5({props:r}),n[12](t),{c(){o.c(),e=O(),V(t.$$.fragment)},m(a,u){o.m(a,u),w(a,e,u),j(t,a,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const f={};t.$set(f)},i(a){i||(A(t.$$.fragment,a),i=!0)},o(a){L(t.$$.fragment,a),i=!1},d(a){a&&k(e),o.d(a),n[12](null),H(t,a)}}}function i6(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",c="",d=!1;h();async function h(){t(2,d=!0);try{t(10,c=await fe.getAdminFileToken(l.collectionId))}catch(y){console.warn("File token failure:",y)}t(2,d=!1)}function g(){t(5,u="")}const m=y=>{s&&(y.preventDefault(),a==null||a.show(f))};function _(y){ne[y?"unshift":"push"](()=>{a=y,t(4,a)})}return n.$$set=y=>{"record"in y&&t(9,l=y.record),"filename"in y&&t(0,o=y.filename),"size"in y&&t(1,r=y.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=z.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=d?"":fe.files.getUrl(l,o,{token:c})),n.$$.dirty&1541&&t(5,u=d?"":fe.files.getUrl(l,o,{thumb:"100x100",token:c}))},[o,r,d,i,a,u,f,s,g,l,c,m,_]}class lu extends ve{constructor(e){super(),be(this,e,i6,n6,he,{record:9,filename:0,size:1})}}function Pp(n,e,t){const i=n.slice();return i[29]=e[t],i[31]=t,i}function Fp(n,e,t){const i=n.slice();i[34]=e[t],i[31]=t;const s=i[2].includes(i[34]);return i[35]=s,i}function s6(n){let e,t,i;function s(){return n[17](n[34])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){w(l,e,o),t||(i=[$e(He.call(null,e,"Remove file")),Y(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Ce(i)}}}function l6(n){let e,t,i;function s(){return n[16](n[34])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){w(l,e,o),t||(i=Y(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,i()}}}function o6(n){let e,t,i,s,l,o,r=n[34]+"",a,u,f,c,d,h;i=new lu({props:{record:n[3],filename:n[34]}});function g(y,S){return y[35]?l6:s6}let m=g(n),_=m(n);return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),o=v("a"),a=U(r),c=O(),d=v("div"),_.c(),Q(t,"fade",n[35]),p(o,"draggable",!1),p(o,"href",u=fe.files.getUrl(n[3],n[34],{token:n[10]})),p(o,"class",f="txt-ellipsis "+(n[35]?"txt-strikethrough txt-hint":"link-primary")),p(o,"title","Download"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),p(l,"class","content"),p(d,"class","actions"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(y,S){w(y,e,S),b(e,t),j(i,t,null),b(e,s),b(e,l),b(l,o),b(o,a),b(e,c),b(e,d),_.m(d,null),h=!0},p(y,S){const T={};S[0]&8&&(T.record=y[3]),S[0]&32&&(T.filename=y[34]),i.$set(T),(!h||S[0]&36)&&Q(t,"fade",y[35]),(!h||S[0]&32)&&r!==(r=y[34]+"")&&se(a,r),(!h||S[0]&1064&&u!==(u=fe.files.getUrl(y[3],y[34],{token:y[10]})))&&p(o,"href",u),(!h||S[0]&36&&f!==(f="txt-ellipsis "+(y[35]?"txt-strikethrough txt-hint":"link-primary")))&&p(o,"class",f),m===(m=g(y))&&_?_.p(y,S):(_.d(1),_=m(y),_&&(_.c(),_.m(d,null))),(!h||S[1]&2)&&Q(e,"dragging",y[32]),(!h||S[1]&4)&&Q(e,"dragover",y[33])},i(y){h||(A(i.$$.fragment,y),h=!0)},o(y){L(i.$$.fragment,y),h=!1},d(y){y&&k(e),H(i),_.d()}}}function Np(n,e){let t,i,s,l;function o(a){e[18](a)}let r={group:e[4].name+"_uploaded",index:e[31],disabled:!e[6],$$slots:{default:[o6,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.list=e[0]),i=new Il({props:r}),ne.push(()=>de(i,"list",o)),{key:n,first:null,c(){t=ke(),V(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_uploaded"),u[0]&32&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&1068|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.list=e[0],_e(()=>s=!1)),i.$set(f)},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 r6(n){let e,t,i,s,l,o,r,a,u=n[29].name+"",f,c,d,h,g,m,_;i=new z5({props:{file:n[29]}});function y(){return n[19](n[31])}return{c(){e=v("div"),t=v("figure"),V(i.$$.fragment),s=O(),l=v("div"),o=v("small"),o.textContent="New",r=O(),a=v("span"),f=U(u),d=O(),h=v("button"),h.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename m-r-auto"),p(l,"title",c=n[29].name),p(h,"type","button"),p(h,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(S,T){w(S,e,T),b(e,t),j(i,t,null),b(e,s),b(e,l),b(l,o),b(l,r),b(l,a),b(a,f),b(e,d),b(e,h),g=!0,m||(_=[$e(He.call(null,h,"Remove file")),Y(h,"click",y)],m=!0)},p(S,T){n=S;const $={};T[0]&2&&($.file=n[29]),i.$set($),(!g||T[0]&2)&&u!==(u=n[29].name+"")&&se(f,u),(!g||T[0]&2&&c!==(c=n[29].name))&&p(l,"title",c),(!g||T[1]&2)&&Q(e,"dragging",n[32]),(!g||T[1]&4)&&Q(e,"dragover",n[33])},i(S){g||(A(i.$$.fragment,S),g=!0)},o(S){L(i.$$.fragment,S),g=!1},d(S){S&&k(e),H(i),m=!1,Ce(_)}}}function Rp(n,e){let t,i,s,l;function o(a){e[20](a)}let r={group:e[4].name+"_new",index:e[31],disabled:!e[6],$$slots:{default:[r6,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[1]!==void 0&&(r.list=e[1]),i=new Il({props:r}),ne.push(()=>de(i,"list",o)),{key:n,first:null,c(){t=ke(),V(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_new"),u[0]&2&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&2|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&2&&(s=!0,f.list=e[1],_e(()=>s=!1)),i.$set(f)},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 a6(n){let e,t,i,s,l,o=n[4].name+"",r,a,u,f,c=[],d=new Map,h,g=[],m=new Map,_,y,S,T,$,C,M,E,D,I,P,F,N=pe(n[5]);const R=K=>K[34]+K[3].id;for(let K=0;KK[29].name+K[31];for(let K=0;K({28:o}),({uniqueId:o})=>[o?268435456:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","block")},m(o,r){w(o,e,r),j(t,e,null),i=!0,s||(l=[Y(e,"dragover",Qe(n[25])),Y(e,"dragleave",n[26]),Y(e,"drop",n[15])],s=!0)},p(o,r){const a={};r[0]&528&&(a.class=` + 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,Ce(l)}}}function f6(n,e,t){let i,s,l,{record:o}=e,{field:r}=e,{value:a=""}=e,{uploadedFiles:u=[]}=e,{deletedFileNames:f=[]}=e,c,d,h=!1,g="";function m(B){z.removeByValue(f,B),t(2,f)}function _(B){z.pushUnique(f,B),t(2,f)}function y(B){z.isEmpty(u[B])||u.splice(B,1),t(1,u)}function S(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:a,uploadedFiles:u,deletedFileNames:f},bubbles:!0}))}function T(B){var J,X;B.preventDefault(),t(9,h=!1);const K=((J=B.dataTransfer)==null?void 0:J.files)||[];if(!(l||!K.length)){for(const G of K){const ue=s.length+u.length-f.length;if(((X=r.options)==null?void 0:X.maxSelect)<=ue)break;u.push(G)}t(1,u)}}Zt(async()=>{t(10,g=await fe.getAdminFileToken(o.collectionId))});const $=B=>m(B),C=B=>_(B);function M(B){a=B,t(0,a),t(6,i),t(4,r)}const E=B=>y(B);function D(B){u=B,t(1,u)}function I(B){ne[B?"unshift":"push"](()=>{c=B,t(7,c)})}const P=()=>{for(let B of c.files)u.push(B);t(1,u),t(7,c.value=null,c)},F=()=>c==null?void 0:c.click();function N(B){ne[B?"unshift":"push"](()=>{d=B,t(8,d)})}const R=()=>{t(9,h=!0)},q=()=>{t(9,h=!1)};return n.$$set=B=>{"record"in B&&t(3,o=B.record),"field"in B&&t(4,r=B.field),"value"in B&&t(0,a=B.value),"uploadedFiles"in B&&t(1,u=B.uploadedFiles),"deletedFileNames"in B&&t(2,f=B.deletedFileNames)},n.$$.update=()=>{var B,K;n.$$.dirty[0]&2&&(Array.isArray(u)||t(1,u=z.toArray(u))),n.$$.dirty[0]&4&&(Array.isArray(f)||t(2,f=z.toArray(f))),n.$$.dirty[0]&16&&t(6,i=((B=r.options)==null?void 0:B.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||u.length)&&((K=r.options)==null?void 0:K.maxSelect)<=s.length+u.length-f.length),n.$$.dirty[0]&6&&(u!==-1||f!==-1)&&S()},[a,u,f,o,r,s,i,c,d,h,g,l,m,_,y,T,$,C,M,E,D,I,P,F,N,R,q]}class c6 extends ve{constructor(e){super(),be(this,e,f6,u6,he,{record:3,field:4,value:0,uploadedFiles:1,deletedFileNames:2},null,[-1,-1])}}function qp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function d6(n,e){e=qp(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=qp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}function jp(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 Hp(n,e,t){const i=n.slice();return i[9]=e[t],i}function Vp(n){let e,t;return e=new lu({props:{record:n[0],filename:n[9],size:"xs"}}),{c(){V(e.$$.fragment)},m(i,s){j(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 zp(n){let e=!z.isEmpty(n[9]),t,i,s=e&&Vp(n);return{c(){s&&s.c(),t=ke()},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=Vp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(re(),L(s,1,1,()=>{s=null}),ae())},i(l){i||(A(s),i=!0)},o(l){L(s),i=!1},d(l){l&&k(t),s&&s.d(l)}}}function Bp(n){let e,t,i=pe(n[6]),s=[];for(let o=0;oL(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oL(h[m],1,1,()=>{h[m]=null});return{c(){e=v("div"),t=v("i"),s=O();for(let m=0;mt(4,o=a));let{record:r}=e;return n.$$set=a=>{"record"in a&&t(0,r=a.record)},n.$$.update=()=>{var a,u,f,c;n.$$.dirty&17&&t(3,i=o==null?void 0:o.find(d=>d.id==(r==null?void 0:r.collectionId))),n.$$.dirty&8&&t(2,s=((u=(a=i==null?void 0:i.schema)==null?void 0:a.filter(d=>d.presentable&&d.type=="file"))==null?void 0:u.map(d=>d.name))||[]),n.$$.dirty&8&&t(1,l=((c=(f=i==null?void 0:i.schema)==null?void 0:f.filter(d=>d.presentable&&d.type!="file"))==null?void 0:c.map(d=>d.name))||[])},[r,l,s,i,o]}class xo extends ve{constructor(e){super(),be(this,e,h6,p6,he,{record:0})}}function Up(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function Wp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[9](i[49]);return i[6]=s,i}function Yp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='
    New record
    ',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint p-l-sm p-r-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[31]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Kp(n){let e,t=!n[13]&&Jp(n);return{c(){t&&t.c(),e=ke()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[13]?t&&(t.d(1),t=null):t?t.p(i,s):(t=Jp(i),t.c(),t.m(e.parentNode,e))},d(i){i&&k(e),t&&t.d(i)}}}function Jp(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&Zp(n);return{c(){e=v("div"),t=v("span"),t.textContent="No records found.",i=O(),s&&s.c(),p(t,"class","txt txt-hint"),p(e,"class","list-item")},m(o,r){w(o,e,r),b(e,t),b(e,i),s&&s.m(e,null)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=Zp(o),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(o){o&&k(e),s&&s.d()}}}function Zp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[35]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function m6(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function g6(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Gp(n){let e,t,i,s;function l(){return n[32](n[49])}return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),p(e,"class","actions nonintrusive")},m(o,r){w(o,e,r),b(e,t),i||(s=[$e(He.call(null,t,"Edit")),Y(t,"keydown",Fn(n[27])),Y(t,"click",Fn(l))],i=!0)},p(o,r){n=o},d(o){o&&k(e),i=!1,Ce(s)}}}function Xp(n,e){let t,i,s,l,o,r,a,u;function f(_,y){return _[6]?g6:m6}let c=f(e),d=c(e);l=new xo({props:{record:e[49]}});let h=!e[11]&&Gp(e);function g(){return e[33](e[49])}function m(..._){return e[34](e[49],..._)}return{key:n,first:null,c(){t=v("div"),d.c(),i=O(),s=v("div"),V(l.$$.fragment),o=O(),h&&h.c(),p(s,"class","content"),p(t,"tabindex","0"),p(t,"class","list-item handle"),Q(t,"selected",e[6]),Q(t,"disabled",!e[6]&&e[4]>1&&!e[10]),this.first=t},m(_,y){w(_,t,y),d.m(t,null),b(t,i),b(t,s),j(l,s,null),b(t,o),h&&h.m(t,null),r=!0,a||(u=[Y(t,"click",g),Y(t,"keydown",m)],a=!0)},p(_,y){e=_,c!==(c=f(e))&&(d.d(1),d=c(e),d&&(d.c(),d.m(t,i)));const S={};y[0]&256&&(S.record=e[49]),l.$set(S),e[11]?h&&(h.d(1),h=null):h?h.p(e,y):(h=Gp(e),h.c(),h.m(t,null)),(!r||y[0]&768)&&Q(t,"selected",e[6]),(!r||y[0]&1808)&&Q(t,"disabled",!e[6]&&e[4]>1&&!e[10])},i(_){r||(A(l.$$.fragment,_),r=!0)},o(_){L(l.$$.fragment,_),r=!1},d(_){_&&k(t),d.d(),H(l),h&&h.d(),a=!1,Ce(u)}}}function Qp(n){let e;return{c(){e=v("div"),e.innerHTML='
    ',p(e,"class","list-item")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xp(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=U("("),i=U(t),s=U(" of MAX "),l=U(n[4]),o=U(")")},m(r,a){w(r,e,a),w(r,i,a),w(r,s,a),w(r,l,a),w(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&se(i,t),a[0]&16&&se(l,r[4])},d(r){r&&(k(e),k(i),k(s),k(l),k(o))}}}function _6(n){let e;return{c(){e=v("p"),e.textContent="No selected records.",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function b6(n){let e,t,i=pe(n[6]),s=[];for(let o=0;oL(s[o],1,1,()=>{s[o]=null});return{c(){e=v("div");for(let o=0;o',l=O(),p(s,"type","button"),p(s,"title","Remove"),p(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),p(e,"class","label"),Q(e,"label-danger",n[52]),Q(e,"label-warning",n[53])},m(f,c){w(f,e,c),j(t,e,null),b(e,i),b(e,s),w(f,l,c),o=!0,r||(a=Y(s,"click",u),r=!0)},p(f,c){n=f;const d={};c[0]&64&&(d.record=n[49]),t.$set(d),(!o||c[1]&2097152)&&Q(e,"label-danger",n[52]),(!o||c[1]&4194304)&&Q(e,"label-warning",n[53])},i(f){o||(A(t.$$.fragment,f),o=!0)},o(f){L(t.$$.fragment,f),o=!1},d(f){f&&(k(e),k(l)),H(t),r=!1,a()}}}function eh(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[v6,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new Il({props:l}),ne.push(()=>de(e,"list",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&64|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],_e(()=>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 y6(n){let e,t,i,s,l,o=[],r=new Map,a,u,f,c,d,h,g,m,_,y,S,T;t=new Wo({props:{value:n[2],autocompleteCollection:n[5]}}),t.$on("submit",n[30]);let $=!n[11]&&Yp(n),C=pe(n[8]);const M=R=>R[49].id;for(let R=0;R1&&xp(n);const P=[b6,_6],F=[];function N(R,q){return R[6].length?0:1}return g=N(n),m=F[g]=P[g](n),{c(){e=v("div"),V(t.$$.fragment),i=O(),$&&$.c(),s=O(),l=v("div");for(let R=0;R1?I?I.p(R,q):(I=xp(R),I.c(),I.m(c,null)):I&&(I.d(1),I=null);let K=g;g=N(R),g===K?F[g].p(R,q):(re(),L(F[K],1,1,()=>{F[K]=null}),ae(),m=F[g],m?m.p(R,q):(m=F[g]=P[g](R),m.c()),A(m,1),m.m(_.parentNode,_))},i(R){if(!y){A(t.$$.fragment,R);for(let q=0;qCancel',t=O(),i=v("button"),i.innerHTML='Set selection',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:x,d(o){o&&(k(e),k(t),k(i)),s=!1,Ce(l)}}}function S6(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[w6],header:[k6],default:[y6]},$$scope:{ctx:n}};for(let a=0;at(26,h=Oe));const g=wt(),m="picker_"+z.randomString(5);let{value:_}=e,{field:y}=e,S,T,$="",C=[],M=[],E=1,D=0,I=!1,P=!1;function F(){return t(2,$=""),t(8,C=[]),t(6,M=[]),R(),q(!0),S==null?void 0:S.show()}function N(){return S==null?void 0:S.hide()}async function R(){const Oe=z.toArray(_);if(!s||!Oe.length)return;t(24,P=!0);let mt=[];const Ft=Oe.slice(),rn=[];for(;Ft.length>0;){const Ae=[];for(const at of Ft.splice(0,no))Ae.push(`id="${at}"`);rn.push(fe.collection(s).getFullList(no,{filter:Ae.join("||"),$autoCancel:!1}))}try{await Promise.all(rn).then(Ae=>{mt=mt.concat(...Ae)}),t(6,M=[]);for(const Ae of Oe){const at=z.findByKey(mt,"id",Ae);at&&M.push(at)}$.trim()||t(8,C=z.filterDuplicatesByKey(M.concat(C))),t(24,P=!1)}catch(Ae){Ae.isAbort||(fe.error(Ae),t(24,P=!1))}}async function q(Oe=!1){if(s){t(3,I=!0),Oe&&($.trim()?t(8,C=[]):t(8,C=z.toArray(M).slice()));try{const mt=Oe?1:E+1,Ft=z.getAllCollectionIdentifiers(l),rn=await fe.collection(s).getList(mt,no,{filter:z.normalizeSearchFilter($,Ft),sort:o?"":"-created",skipTotal:1,$cancelKey:m+"loadList"});t(8,C=z.filterDuplicatesByKey(C.concat(rn.items))),E=rn.page,t(23,D=rn.items.length),t(3,I=!1)}catch(mt){mt.isAbort||(fe.error(mt),t(3,I=!1))}}}function B(Oe){i==1?t(6,M=[Oe]):u&&(z.pushOrReplaceByKey(M,Oe),t(6,M))}function K(Oe){z.removeByKey(M,"id",Oe.id),t(6,M)}function J(Oe){f(Oe)?K(Oe):B(Oe)}function X(){var Oe;i!=1?t(20,_=M.map(mt=>mt.id)):t(20,_=((Oe=M==null?void 0:M[0])==null?void 0:Oe.id)||""),g("save",M),N()}function G(Oe){Ne.call(this,n,Oe)}const ue=()=>N(),ee=()=>X(),te=Oe=>t(2,$=Oe.detail),Ee=()=>T==null?void 0:T.show(),Fe=Oe=>T==null?void 0:T.show(Oe),Ve=Oe=>J(Oe),ze=(Oe,mt)=>{(mt.code==="Enter"||mt.code==="Space")&&(mt.preventDefault(),mt.stopPropagation(),J(Oe))},Se=()=>t(2,$=""),Me=()=>{a&&!I&&q()},Ze=Oe=>K(Oe);function bt(Oe){M=Oe,t(6,M)}function Ge(Oe){ne[Oe?"unshift":"push"](()=>{S=Oe,t(1,S)})}function Ke(Oe){Ne.call(this,n,Oe)}function $t(Oe){Ne.call(this,n,Oe)}function me(Oe){ne[Oe?"unshift":"push"](()=>{T=Oe,t(7,T)})}const ye=Oe=>{z.removeByKey(C,"id",Oe.detail.id),C.unshift(Oe.detail),t(8,C),B(Oe.detail)},Je=Oe=>{z.removeByKey(C,"id",Oe.detail.id),t(8,C),K(Oe.detail)};return n.$$set=Oe=>{e=je(je({},e),xt(Oe)),t(19,d=xe(e,c)),"value"in Oe&&t(20,_=Oe.value),"field"in Oe&&t(21,y=Oe.field)},n.$$.update=()=>{var Oe,mt;n.$$.dirty[0]&2097152&&t(4,i=((Oe=y==null?void 0:y.options)==null?void 0:Oe.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=(mt=y==null?void 0:y.options)==null?void 0:mt.collectionId),n.$$.dirty[0]&100663296&&t(5,l=h.find(Ft=>Ft.id==s)||null),n.$$.dirty[0]&6&&typeof $<"u"&&S!=null&&S.isActive()&&q(!0),n.$$.dirty[0]&32&&t(11,o=(l==null?void 0:l.type)==="view"),n.$$.dirty[0]&16777224&&t(13,r=I||P),n.$$.dirty[0]&8388608&&t(12,a=D==no),n.$$.dirty[0]&80&&t(10,u=i===null||i>M.length),n.$$.dirty[0]&64&&t(9,f=function(Ft){return z.findByKey(M,"id",Ft.id)})},[N,S,$,I,i,l,M,T,C,f,u,o,a,r,q,B,K,J,X,d,_,y,F,D,P,s,h,G,ue,ee,te,Ee,Fe,Ve,ze,Se,Me,Ze,bt,Ge,Ke,$t,me,ye,Je]}class T6 extends ve{constructor(e){super(),be(this,e,$6,S6,he,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function th(n,e,t){const i=n.slice();return i[20]=e[t],i[22]=t,i}function nh(n,e,t){const i=n.slice();return i[25]=e[t],i}function ih(n){let e,t=n[5]&&sh(n);return{c(){t&&t.c(),e=ke()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[5]?t?t.p(i,s):(t=sh(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){i&&k(e),t&&t.d(i)}}}function sh(n){let e,t=pe(z.toArray(n[0]).slice(0,10)),i=[];for(let s=0;s ',p(e,"class","list-item")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function C6(n){let e,t,i,s,l,o,r,a,u,f;i=new xo({props:{record:n[20]}});function c(){return n[10](n[20])}return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),o=v("button"),o.innerHTML='',r=O(),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"),Q(e,"dragging",n[23]),Q(e,"dragover",n[24])},m(d,h){w(d,e,h),b(e,t),j(i,t,null),b(e,s),b(e,l),b(l,o),w(d,r,h),a=!0,u||(f=[$e(He.call(null,o,"Remove")),Y(o,"click",c)],u=!0)},p(d,h){n=d;const g={};h&16&&(g.record=n[20]),i.$set(g),(!a||h&8388608)&&Q(e,"dragging",n[23]),(!a||h&16777216)&&Q(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),k(r)),H(i),u=!1,Ce(f)}}}function oh(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:[C6,({dragging:a,dragover:u})=>({23:a,24:u}),({dragging:a,dragover:u})=>(a?8388608:0)|(u?16777216:0)]},$$scope:{ctx:e}};return e[4]!==void 0&&(r.list=e[4]),i=new Il({props:r}),ne.push(()=>de(i,"list",o)),i.$on("sort",e[12]),{key:n,first:null,c(){t=ke(),V(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u&4&&(f.group=e[2].name+"_relation"),u&16&&(f.index=e[22]),u&64&&(f.disabled=!e[6]),u&293601296&&(f.$$scope={dirty:u,ctx:e}),!s&&u&16&&(s=!0,f.list=e[4],_e(()=>s=!1)),i.$set(f)},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 M6(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d=[],h=new Map,g,m,_,y,S,T,$=pe(n[4]);const C=E=>E[20].id;for(let E=0;E<$.length;E+=1){let D=th(n,$,E),I=C(D);h.set(I,d[E]=oh(I,D))}let M=null;return $.length||(M=ih(n)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),u=O(),f=v("div"),c=v("div");for(let E=0;E Open picker',p(t,"class",i=wi(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(_,"type","button"),p(_,"class","btn btn-transparent btn-sm btn-block"),p(m,"class","list-item list-item-btn"),p(f,"class","list")},m(E,D){w(E,e,D),b(e,t),b(e,s),b(e,l),b(l,r),w(E,u,D),w(E,f,D),b(f,c);for(let I=0;I({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 T6({props:o}),n[15](i),i.$on("save",n[16]),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(r,a){j(e,r,a),w(r,t,a),j(i,r,a),s=!0},p(r,[a]){const u={};a&4&&(u.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(u.name=r[2].name),a&268959863&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&1&&(f.value=r[0]),a&4&&(f.field=r[2]),i.$set(f)},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){r&&k(t),n[14](null),H(e,r),n[15](null),H(i,r)}}}const rh=100;function E6(n,e,t){let i,{field:s}=e,{value:l}=e,{picker:o}=e,r,a=[],u=!1,f;function c(){if(u)return!1;const M=z.toArray(l);return t(4,a=a.filter(E=>M.includes(E.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,u=!1);return}t(5,u=!0);const E=M.slice(),D=[];for(;E.length>0;){const F=[];for(const N of E.splice(0,rh))F.push(`id="${N}"`);D.push(fe.collection((P=s==null?void 0:s.options)==null?void 0:P.collectionId).getFullList(rh,{filter:F.join("||"),$autoCancel:!1}))}try{let F=[];await Promise.all(D).then(N=>{F=F.concat(...N)});for(const N of M){const R=z.findByKey(F,"id",N);R&&a.push(R)}t(4,a),g()}catch(F){fe.error(F)}t(5,u=!1)}function h(M){z.removeByKey(a,"id",M.id),t(4,a),g()}function g(){var M;i?t(0,l=a.map(E=>E.id)):t(0,l=((M=a[0])==null?void 0:M.id)||"")}Is(()=>{clearTimeout(f)});const m=M=>h(M);function _(M){a=M,t(4,a)}const y=()=>{g()},S=()=>o==null?void 0:o.show();function T(M){ne[M?"unshift":"push"](()=>{r=M,t(3,r)})}function $(M){ne[M?"unshift":"push"](()=>{o=M,t(1,o)})}const C=M=>{var E;t(4,a=M.detail||[]),t(0,l=i?a.map(D=>D.id):((E=a[0])==null?void 0:E.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,u=!0),clearTimeout(f),t(9,f=setTimeout(d,0)))},[l,o,s,r,a,u,i,h,g,f,m,_,y,S,T,$,C]}class D6 extends ve{constructor(e){super(),be(this,e,E6,O6,he,{field:2,value:0,picker:1})}}const A6=["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"],I6=(n,e)=>{A6.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function L6(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),qr(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 F6(n){let e;function t(l,o){return l[1]?P6:L6}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:x,o:x,d(l){l&&k(e),s.d(),n[19](null)}}}const w1=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),N6=()=>{let n={listeners:[],scriptId:w1("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let R6=N6();function q6(n,e,t){var i;let{id:s=w1("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:c="change input undo redo"}=e,{value:d=""}=e,{text:h=""}=e,{cssClass:g="tinymce-wrapper"}=e,m,_,y,S=d,T=o;const $=wt(),C=()=>{const F=(()=>typeof window<"u"?window:global)();return F&&F.tinymce?F.tinymce:null},M=()=>{const P=Object.assign(Object.assign({},f),{target:_,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:F=>{t(14,y=F),F.on("init",()=>{F.setContent(d),F.on(c,()=>{t(15,S=F.getContent()),S!==d&&(t(5,d=S),t(6,h=F.getContent({format:"text"})))})}),I6(F,$),typeof f.setup=="function"&&f.setup(F)}});t(4,_.style.visibility="",_),C().init(P)};Zt(()=>{if(C()!==null)M();else{const P=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;R6.load(m.ownerDocument,P,()=>{M()})}}),Is(()=>{var P;y&&((P=C())===null||P===void 0||P.remove(y))});function E(P){ne[P?"unshift":"push"](()=>{_=P,t(4,_)})}function D(P){ne[P?"unshift":"push"](()=>{_=P,t(4,_)})}function I(P){ne[P?"unshift":"push"](()=>{m=P,t(3,m)})}return n.$$set=P=>{"id"in P&&t(0,s=P.id),"inline"in P&&t(1,l=P.inline),"disabled"in P&&t(7,o=P.disabled),"apiKey"in P&&t(8,r=P.apiKey),"channel"in P&&t(9,a=P.channel),"scriptSrc"in P&&t(10,u=P.scriptSrc),"conf"in P&&t(11,f=P.conf),"modelEvents"in P&&t(12,c=P.modelEvents),"value"in P&&t(5,d=P.value),"text"in P&&t(6,h=P.text),"cssClass"in P&&t(2,g=P.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(y&&S!==d&&(y.setContent(d),t(6,h=y.getContent({format:"text"}))),y&&o!==T&&(t(16,T=o),typeof(t(13,i=y.mode)===null||i===void 0?void 0:i.set)=="function"?y.mode.set(o?"readonly":"design"):y.setMode(o?"readonly":"design")))},[s,l,g,m,_,d,h,o,r,a,u,f,c,i,y,S,T,E,D,I]}class ou extends ve{constructor(e){super(),be(this,e,q6,F6,he,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function j6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(m){n[3](m)}let g={id:n[4],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:n[2]};return n[0]!==void 0&&(g.value=n[0]),f=new ou({props:g}),ne.push(()=>de(f,"value",h)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),u=O(),V(f.$$.fragment),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(m,_){w(m,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(m,u,_),j(f,m,_),d=!0},p(m,_){(!d||_&2&&i!==(i=z.getFieldTypeIcon(m[1].type)))&&p(t,"class",i),(!d||_&2)&&o!==(o=m[1].name+"")&&se(r,o),(!d||_&16&&a!==(a=m[4]))&&p(e,"for",a);const y={};_&16&&(y.id=m[4]),_&4&&(y.conf=m[2]),!c&&_&1&&(c=!0,y.value=m[0],_e(()=>c=!1)),f.$set(y)},i(m){d||(A(f.$$.fragment,m),d=!0)},o(m){L(f.$$.fragment,m),d=!1},d(m){m&&(k(e),k(u)),H(f,m)}}}function H6(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[j6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function V6(n,e,t){let i,{field:s}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=Object.assign(z.defaultEditorOptions(),{convert_urls:(r=s.options)==null?void 0:r.convertUrls,relative_urls:!1}))},[l,s,i,o]}class z6 extends ve{constructor(e){super(),be(this,e,V6,H6,he,{field:1,value:0})}}function B6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Auth URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].authUrl),r||(a=Y(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].authUrl&&oe(l,u[0].authUrl)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function U6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Token URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].tokenUrl),r||(a=Y(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&oe(l,u[0].tokenUrl)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function W6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("User API URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].userApiUrl),r||(a=Y(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&oe(l,u[0].userApiUrl)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function Y6(n){let e,t,i,s,l,o,r,a;return i=new ce({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[B6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new ce({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[U6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[W6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=O(),V(i.$$.fragment),s=O(),V(l.$$.fragment),o=O(),V(r.$$.fragment),p(e,"class","section-title")},m(u,f){w(u,e,f),w(u,t,f),j(i,u,f),w(u,s,f),j(l,u,f),w(u,o,f),j(r,u,f),a=!0},p(u,[f]){const c={};f&2&&(c.name=u[1]+".authUrl"),f&97&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&2&&(d.name=u[1]+".tokenUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),l.$set(d);const h={};f&2&&(h.name=u[1]+".userApiUrl"),f&97&&(h.$$scope={dirty:f,ctx:u}),r.$set(h)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){L(i.$$.fragment,u),L(l.$$.fragment,u),L(r.$$.fragment,u),a=!1},d(u){u&&(k(e),k(t),k(s),k(o)),H(i,u),H(l,u),H(r,u)}}}function K6(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class ah extends ve{constructor(e){super(),be(this,e,K6,Y6,he,{key:1,config:0})}}function J6(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Auth URL"),s=O(),l=v("input"),a=O(),u=v("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,h){w(d,e,h),b(e,t),w(d,s,h),w(d,l,h),oe(l,n[0].authUrl),w(d,a,h),w(d,u,h),f||(c=Y(l,"input",n[2]),f=!0)},p(d,h){h&16&&i!==(i=d[4])&&p(e,"for",i),h&16&&o!==(o=d[4])&&p(l,"id",o),h&1&&r!==(r=d[0].enabled)&&(l.required=r),h&1&&l.value!==d[0].authUrl&&oe(l,d[0].authUrl)},d(d){d&&(k(e),k(s),k(l),k(a),k(u)),f=!1,c()}}}function Z6(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Token URL"),s=O(),l=v("input"),a=O(),u=v("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,h){w(d,e,h),b(e,t),w(d,s,h),w(d,l,h),oe(l,n[0].tokenUrl),w(d,a,h),w(d,u,h),f||(c=Y(l,"input",n[3]),f=!0)},p(d,h){h&16&&i!==(i=d[4])&&p(e,"for",i),h&16&&o!==(o=d[4])&&p(l,"id",o),h&1&&r!==(r=d[0].enabled)&&(l.required=r),h&1&&l.value!==d[0].tokenUrl&&oe(l,d[0].tokenUrl)},d(d){d&&(k(e),k(s),k(l),k(a),k(u)),f=!1,c()}}}function G6(n){let e,t,i,s,l,o;return i=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[J6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),l=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[Z6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=O(),V(i.$$.fragment),s=O(),V(l.$$.fragment),p(e,"class","section-title")},m(r,a){w(r,e,a),w(r,t,a),j(i,r,a),w(r,s,a),j(l,r,a),o=!0},p(r,[a]){const u={};a&1&&(u.class="form-field "+(r[0].enabled?"required":"")),a&2&&(u.name=r[1]+".authUrl"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&1&&(f.class="form-field "+(r[0].enabled?"required":"")),a&2&&(f.name=r[1]+".tokenUrl"),a&49&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){L(i.$$.fragment,r),L(l.$$.fragment,r),o=!1},d(r){r&&(k(e),k(t),k(s)),H(i,r),H(l,r)}}}function X6(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class Q6 extends ve{constructor(e){super(),be(this,e,X6,G6,he,{key:1,config:0})}}function x6(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Auth URL"),s=O(),l=v("input"),a=O(),u=v("div"),u.textContent="Eg. https://example.com/authorize/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,h){w(d,e,h),b(e,t),w(d,s,h),w(d,l,h),oe(l,n[0].authUrl),w(d,a,h),w(d,u,h),f||(c=Y(l,"input",n[2]),f=!0)},p(d,h){h&32&&i!==(i=d[5])&&p(e,"for",i),h&32&&o!==(o=d[5])&&p(l,"id",o),h&1&&r!==(r=d[0].enabled)&&(l.required=r),h&1&&l.value!==d[0].authUrl&&oe(l,d[0].authUrl)},d(d){d&&(k(e),k(s),k(l),k(a),k(u)),f=!1,c()}}}function eO(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Token URL"),s=O(),l=v("input"),a=O(),u=v("div"),u.textContent="Eg. https://example.com/token/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,h){w(d,e,h),b(e,t),w(d,s,h),w(d,l,h),oe(l,n[0].tokenUrl),w(d,a,h),w(d,u,h),f||(c=Y(l,"input",n[3]),f=!0)},p(d,h){h&32&&i!==(i=d[5])&&p(e,"for",i),h&32&&o!==(o=d[5])&&p(l,"id",o),h&1&&r!==(r=d[0].enabled)&&(l.required=r),h&1&&l.value!==d[0].tokenUrl&&oe(l,d[0].tokenUrl)},d(d){d&&(k(e),k(s),k(l),k(a),k(u)),f=!1,c()}}}function tO(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("User API URL"),s=O(),l=v("input"),a=O(),u=v("div"),u.textContent="Eg. https://example.com/userinfo/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,h){w(d,e,h),b(e,t),w(d,s,h),w(d,l,h),oe(l,n[0].userApiUrl),w(d,a,h),w(d,u,h),f||(c=Y(l,"input",n[4]),f=!0)},p(d,h){h&32&&i!==(i=d[5])&&p(e,"for",i),h&32&&o!==(o=d[5])&&p(l,"id",o),h&1&&r!==(r=d[0].enabled)&&(l.required=r),h&1&&l.value!==d[0].userApiUrl&&oe(l,d[0].userApiUrl)},d(d){d&&(k(e),k(s),k(l),k(a),k(u)),f=!1,c()}}}function nO(n){let e,t,i,s,l,o,r,a;return i=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[x6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[eO,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".userApiUrl",$$slots:{default:[tO,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Endpoints",t=O(),V(i.$$.fragment),s=O(),V(l.$$.fragment),o=O(),V(r.$$.fragment),p(e,"class","section-title")},m(u,f){w(u,e,f),w(u,t,f),j(i,u,f),w(u,s,f),j(l,u,f),w(u,o,f),j(r,u,f),a=!0},p(u,[f]){const c={};f&1&&(c.class="form-field "+(u[0].enabled?"required":"")),f&2&&(c.name=u[1]+".authUrl"),f&97&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(u[0].enabled?"required":"")),f&2&&(d.name=u[1]+".tokenUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),l.$set(d);const h={};f&1&&(h.class="form-field "+(u[0].enabled?"required":"")),f&2&&(h.name=u[1]+".userApiUrl"),f&97&&(h.$$scope={dirty:f,ctx:u}),r.$set(h)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){L(i.$$.fragment,u),L(l.$$.fragment,u),L(r.$$.fragment,u),a=!1},d(u){u&&(k(e),k(t),k(s),k(o)),H(i,u),H(l,u),H(r,u)}}}function iO(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class Pr extends ve{constructor(e){super(),be(this,e,iO,nO,he,{key:1,config:0})}}function sO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Client ID"),s=O(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[2]),r||(a=Y(l,"input",n[12]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&4&&l.value!==u[2]&&oe(l,u[2])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function lO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Team ID"),s=O(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[3]),r||(a=Y(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&8&&l.value!==u[3]&&oe(l,u[3])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function oO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Key ID"),s=O(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[4]),r||(a=Y(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&16&&l.value!==u[4]&&oe(l,u[4])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function rO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Duration (in seconds)",i=O(),s=v("i"),o=O(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[23]),p(r,"type","text"),p(r,"id",a=n[23]),p(r,"max",fo),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),oe(r,n[6]),u||(f=[$e(He.call(null,s,{text:`Max ${fo} seconds (~${fo/(60*60*24*30)<<0} months).`,position:"top"})),Y(r,"input",n[15])],u=!0)},p(c,d){d&8388608&&l!==(l=c[23])&&p(e,"for",l),d&8388608&&a!==(a=c[23])&&p(r,"id",a),d&64&&r.value!==c[6]&&oe(r,c[6])},d(c){c&&(k(e),k(o),k(r)),u=!1,Ce(f)}}}function aO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Private key"),s=O(),l=v("textarea"),r=O(),a=v("div"),a.textContent="The key is not stored on the server and it is used only for generating the signed JWT.",p(e,"for",i=n[23]),p(l,"id",o=n[23]),l.required=!0,p(l,"rows","8"),p(l,"placeholder",`-----BEGIN PRIVATE KEY----- +... +-----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),oe(l,n[5]),w(c,r,d),w(c,a,d),u||(f=Y(l,"input",n[16]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&32&&oe(l,c[5])},d(c){c&&(k(e),k(s),k(l),k(r),k(a)),u=!1,f()}}}function uO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S;return s=new ce({props:{class:"form-field required",name:"clientId",$$slots:{default:[sO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"teamId",$$slots:{default:[lO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),f=new ce({props:{class:"form-field required",name:"keyId",$$slots:{default:[oO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),h=new ce({props:{class:"form-field required",name:"duration",$$slots:{default:[rO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),m=new ce({props:{class:"form-field required",name:"privateKey",$$slots:{default:[aO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),i=v("div"),V(s.$$.fragment),l=O(),o=v("div"),V(r.$$.fragment),a=O(),u=v("div"),V(f.$$.fragment),c=O(),d=v("div"),V(h.$$.fragment),g=O(),V(m.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(u,"class","col-lg-6"),p(d,"class","col-lg-6"),p(t,"class","grid"),p(e,"id",n[9]),p(e,"autocomplete","off")},m(T,$){w(T,e,$),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),b(t,a),b(t,u),j(f,u,null),b(t,c),b(t,d),j(h,d,null),b(t,g),j(m,t,null),_=!0,y||(S=Y(e,"submit",Qe(n[17])),y=!0)},p(T,$){const C={};$&25165828&&(C.$$scope={dirty:$,ctx:T}),s.$set(C);const M={};$&25165832&&(M.$$scope={dirty:$,ctx:T}),r.$set(M);const E={};$&25165840&&(E.$$scope={dirty:$,ctx:T}),f.$set(E);const D={};$&25165888&&(D.$$scope={dirty:$,ctx:T}),h.$set(D);const I={};$&25165856&&(I.$$scope={dirty:$,ctx:T}),m.$set(I)},i(T){_||(A(s.$$.fragment,T),A(r.$$.fragment,T),A(f.$$.fragment,T),A(h.$$.fragment,T),A(m.$$.fragment,T),_=!0)},o(T){L(s.$$.fragment,T),L(r.$$.fragment,T),L(f.$$.fragment,T),L(h.$$.fragment,T),L(m.$$.fragment,T),_=!1},d(T){T&&k(e),H(s),H(r),H(f),H(h),H(m),y=!1,S()}}}function fO(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:x,d(t){t&&k(e)}}}function cO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=U("Close"),i=O(),s=v("button"),l=v("i"),o=O(),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],Q(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),u||(f=Y(e,"click",n[0]),u=!0)},p(c,d){d&128&&(e.disabled=c[7]),d&384&&a!==(a=!c[8]||c[7])&&(s.disabled=a),d&128&&Q(s,"btn-loading",c[7])},d(c){c&&(k(e),k(i),k(s)),u=!1,f()}}}function dO(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[cO],header:[fO],default:[uO]},$$scope:{ctx:n}};return e=new on({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){V(e.$$.fragment)},m(s,l){j(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 fo=15777e3;function pO(n,e,t){let i;const s=wt(),l="apple_secret_"+z.randomString(5);let o,r,a,u,f,c,d=!1;function h(P={}){t(2,r=P.clientId||""),t(3,a=P.teamId||""),t(4,u=P.keyId||""),t(5,f=P.privateKey||""),t(6,c=P.duration||fo),tn({}),o==null||o.show()}function g(){return o==null?void 0:o.hide()}async function m(){t(7,d=!0);try{const P=await fe.settings.generateAppleClientSecret(r,a,u,f.trim(),c);t(7,d=!1),jt("Successfully generated client secret."),s("submit",P),o==null||o.hide()}catch(P){fe.error(P)}t(7,d=!1)}function _(){r=this.value,t(2,r)}function y(){a=this.value,t(3,a)}function S(){u=this.value,t(4,u)}function T(){c=this.value,t(6,c)}function $(){f=this.value,t(5,f)}const C=()=>m(),M=()=>!d;function E(P){ne[P?"unshift":"push"](()=>{o=P,t(1,o)})}function D(P){Ne.call(this,n,P)}function I(P){Ne.call(this,n,P)}return t(8,i=!0),[g,o,r,a,u,f,c,d,i,l,m,h,_,y,S,T,$,C,M,E,D,I]}class hO extends ve{constructor(e){super(),be(this,e,pO,dO,he,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function mO(n){let e,t,i,s,l,o,r,a,u,f,c={};return r=new hO({props:c}),n[4](r),r.$on("submit",n[5]),{c(){e=v("button"),t=v("i"),i=O(),s=v("span"),s.textContent="Generate secret",o=O(),V(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,h){w(d,e,h),b(e,t),b(e,i),b(e,s),w(d,o,h),j(r,d,h),a=!0,u||(f=Y(e,"click",n[3]),u=!0)},p(d,[h]){(!a||h&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+d[1]))&&p(e,"class",l);const g={};r.$set(g)},i(d){a||(A(r.$$.fragment,d),a=!0)},o(d){L(r.$$.fragment,d),a=!1},d(d){d&&(k(e),k(o)),n[4](null),H(r,d),u=!1,f()}}}function gO(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(u){ne[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{var f;t(0,s.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",s)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class _O extends ve{constructor(e){super(),be(this,e,gO,mO,he,{key:1,config:0})}}const co=[{key:"appleAuth",title:"Apple",logo:"apple.svg",optionsComponent:_O},{key:"googleAuth",title:"Google",logo:"google.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"microsoft.svg",optionsComponent:Q6},{key:"yandexAuth",title:"Yandex",logo:"yandex.svg"},{key:"facebookAuth",title:"Facebook",logo:"facebook.svg"},{key:"instagramAuth",title:"Instagram",logo:"instagram.svg"},{key:"githubAuth",title:"GitHub",logo:"github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"gitlab.svg",optionsComponent:ah},{key:"giteeAuth",title:"Gitee",logo:"gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"gitea.svg",optionsComponent:ah},{key:"discordAuth",title:"Discord",logo:"discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"kakao.svg"},{key:"vkAuth",title:"VK",logo:"vk.svg"},{key:"spotifyAuth",title:"Spotify",logo:"spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:Pr},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:Pr},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:Pr}];function uh(n,e,t){const i=n.slice();return i[9]=e[t],i}function bO(n){let e;return{c(){e=v("h6"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function vO(n){let e,t=pe(n[1]),i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function fh(n){let e,t,i,s,l,o,r=n[4](n[9].provider)+"",a,u,f,c,d=n[9].providerId+"",h,g,m,_,y,S;function T(){return n[6](n[9])}return{c(){var $;e=v("div"),t=v("figure"),i=v("img"),l=O(),o=v("span"),a=U(r),u=O(),f=v("div"),c=U("ID: "),h=U(d),g=O(),m=v("button"),m.innerHTML='',_=O(),_n(i.src,s="./images/oauth2/"+(($=n[3](n[9].provider))==null?void 0:$.logo))||p(i,"src",s),p(i,"alt","Provider logo"),p(t,"class","provider-logo"),p(o,"class","txt"),p(f,"class","txt-hint"),p(m,"type","button"),p(m,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m($,C){w($,e,C),b(e,t),b(t,i),b(e,l),b(e,o),b(o,a),b(e,u),b(e,f),b(f,c),b(f,h),b(e,g),b(e,m),b(e,_),y||(S=Y(m,"click",T),y=!0)},p($,C){var M;n=$,C&2&&!_n(i.src,s="./images/oauth2/"+((M=n[3](n[9].provider))==null?void 0:M.logo))&&p(i,"src",s),C&2&&r!==(r=n[4](n[9].provider)+"")&&se(a,r),C&2&&d!==(d=n[9].providerId+"")&&se(h,d)},d($){$&&k(e),y=!1,S()}}}function kO(n){let e;function t(l,o){var r;return l[2]?yO:(r=l[0])!=null&&r.id&&l[1].length?vO:bO}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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:x,o:x,d(l){l&&k(e),s.d(l)}}}function wO(n,e,t){const i=wt();let{record:s}=e,l=[],o=!1;function r(d){return co.find(h=>h.key==d+"Auth")||{}}function a(d){var h;return((h=r(d))==null?void 0:h.title)||z.sentenize(d,!1)}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await fe.collection(s.collectionId).listExternalAuths(s.id))}catch(d){fe.error(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||mn(`Do you really want to unlink the ${a(d)} provider?`,()=>fe.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{jt(`Successfully unlinked the ${a(d)} provider.`),i("unlink",d),u()}).catch(h=>{fe.error(h)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class SO extends ve{constructor(e){super(),be(this,e,wO,kO,he,{record:0})}}function ch(n,e,t){const i=n.slice();return i[67]=e[t],i[68]=e,i[69]=t,i}function dh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=U(`The record has previous unsaved changes. + `),r=v("button"),r.textContent="Restore draft",a=O(),u=v("button"),u.innerHTML='',f=O(),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(u,"type","button"),p(u,"class","close"),p(u,"aria-label","Discard draft"),p(t,"class","alert alert-info m-0"),p(c,"class","clearfix p-b-base"),p(e,"class","block")},m(_,y){w(_,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,u),b(e,f),b(e,c),h=!0,g||(m=[Y(r,"click",n[37]),$e(He.call(null,u,"Discard draft")),Y(u,"click",Qe(n[38]))],g=!0)},p:x,i(_){h||(d&&d.end(1),h=!0)},o(_){_&&(d=ba(e,nt,{duration:150})),h=!1},d(_){_&&k(e),_&&d&&d.end(),g=!1,Ce(m)}}}function ph(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=$e(i=He.call(null,t,{text:`Created: ${n[3].created} +Updated: ${n[3].updated}`,position:"left"})),s=!0)},p(o,r){i&&It(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 $O(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m=!n[6]&&ph(n);return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",l=O(),o=v("span"),a=O(),m&&m.c(),u=O(),f=v("input"),p(t,"class",wi(z.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[70]),p(f,"type","text"),p(f,"id",c=n[70]),p(f,"placeholder","Leave empty to auto generate..."),p(f,"minlength","15"),f.readOnly=d=!n[6]},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),w(_,a,y),m&&m.m(_,y),w(_,u,y),w(_,f,y),oe(f,n[3].id),h||(g=Y(f,"input",n[39]),h=!0)},p(_,y){y[2]&256&&r!==(r=_[70])&&p(e,"for",r),_[6]?m&&(m.d(1),m=null):m?m.p(_,y):(m=ph(_),m.c(),m.m(u.parentNode,u)),y[2]&256&&c!==(c=_[70])&&p(f,"id",c),y[0]&64&&d!==(d=!_[6])&&(f.readOnly=d),y[0]&8&&f.value!==_[3].id&&oe(f,_[3].id)},d(_){_&&(k(e),k(a),k(u),k(f)),m&&m.d(_),h=!1,g()}}}function hh(n){var u,f;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 XM({props:r}),ne.push(()=>de(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&mh();return{c(){V(e.$$.fragment),i=O(),a&&a.c(),s=ke()},m(c,d){j(e,c,d),w(c,i,d),a&&a.m(c,d),w(c,s,d),l=!0},p(c,d){var g,m;const h={};d[0]&64&&(h.isNew=c[6]),d[0]&1&&(h.collection=c[0]),!t&&d[0]&8&&(t=!0,h.record=c[3],_e(()=>t=!1)),e.$set(h),(m=(g=c[0])==null?void 0:g.schema)!=null&&m.length?a||(a=mh(),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){c&&(k(i),k(s)),H(e,c),a&&a.d(c)}}}function mh(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function TO(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 D6({props:l}),ne.push(()=>de(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 CO(n){let e,t,i,s,l;function o(f){n[50](f,n[67])}function r(f){n[51](f,n[67])}function a(f){n[52](f,n[67])}let u={field:n[67],record:n[3]};return n[3][n[67].name]!==void 0&&(u.value=n[3][n[67].name]),n[4][n[67].name]!==void 0&&(u.uploadedFiles=n[4][n[67].name]),n[5][n[67].name]!==void 0&&(u.deletedFileNames=n[5][n[67].name]),e=new c6({props:u}),ne.push(()=>de(e,"value",o)),ne.push(()=>de(e,"uploadedFiles",r)),ne.push(()=>de(e,"deletedFileNames",a)),{c(){V(e.$$.fragment)},m(f,c){j(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[67]),c[0]&8&&(d.record=n[3]),!t&&c[0]&9&&(t=!0,d.value=n[3][n[67].name],_e(()=>t=!1)),!i&&c[0]&17&&(i=!0,d.uploadedFiles=n[4][n[67].name],_e(()=>i=!1)),!s&&c[0]&33&&(s=!0,d.deletedFileNames=n[5][n[67].name],_e(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){L(e.$$.fragment,f),l=!1},d(f){H(e,f)}}}function MO(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 R5({props:l}),ne.push(()=>de(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 OO(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 O5({props:l}),ne.push(()=>de(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 EO(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 $5({props:l}),ne.push(()=>de(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 DO(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 z6({props:l}),ne.push(()=>de(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 AO(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 y5({props:l}),ne.push(()=>de(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 IO(n){let e,t,i;function s(o){n[44](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 g5({props:l}),ne.push(()=>de(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 LO(n){let e,t,i;function s(o){n[43](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(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 PO(n){let e,t,i;function s(o){n[42](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(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 FO(n){let e,t,i;function s(o){n[41](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(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[67]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[67].name],_e(()=>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 gh(n,e){let t,i,s,l,o;const r=[FO,PO,LO,IO,AO,DO,EO,OO,MO,CO,TO],a=[];function u(f,c){return f[67].type==="text"?0:f[67].type==="number"?1:f[67].type==="bool"?2:f[67].type==="email"?3:f[67].type==="url"?4:f[67].type==="editor"?5:f[67].type==="date"?6:f[67].type==="select"?7:f[67].type==="json"?8:f[67].type==="file"?9:f[67].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=ke(),s&&s.c(),l=ke(),this.first=t},m(f,c){w(f,t,c),~i&&a[i].m(f,c),w(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(re(),L(a[d],1,1,()=>{a[d]=null}),ae()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){L(s),o=!1},d(f){f&&(k(t),k(l)),~i&&a[i].d(f)}}}function _h(n){let e,t,i;return t=new SO({props:{record:n[3]}}),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[12]===yl)},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.record=s[3]),t.$set(o),(!i||l[0]&4096)&&Q(e,"active",s[12]===yl)},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 NO(n){var S;let e,t,i,s,l,o,r=[],a=new Map,u,f,c,d,h=!n[7]&&n[9]&&dh(n);s=new ce({props:{class:"form-field "+(n[6]?"":"readonly"),name:"id",$$slots:{default:[$O,({uniqueId:T})=>({70:T}),({uniqueId:T})=>[0,0,T?256:0]]},$$scope:{ctx:n}}});let g=n[13]&&hh(n),m=pe(((S=n[0])==null?void 0:S.schema)||[]);const _=T=>T[67].name;for(let T=0;T{h=null}),ae());const C={};$[0]&64&&(C.class="form-field "+(T[6]?"":"readonly")),$[0]&72|$[2]&768&&(C.$$scope={dirty:$,ctx:T}),s.$set(C),T[13]?g?(g.p(T,$),$[0]&8192&&A(g,1)):(g=hh(T),g.c(),A(g,1),g.m(t,o)):g&&(re(),L(g,1,1,()=>{g=null}),ae()),$[0]&57&&(m=pe(((M=T[0])==null?void 0:M.schema)||[]),re(),r=yt(r,$,_,1,T,m,a,t,Ut,gh,null,ch),ae()),(!f||$[0]&4096)&&Q(t,"active",T[12]===ss),T[13]&&!T[6]?y?(y.p(T,$),$[0]&8256&&A(y,1)):(y=_h(T),y.c(),A(y,1),y.m(e,null)):y&&(re(),L(y,1,1,()=>{y=null}),ae())},i(T){if(!f){A(h),A(s.$$.fragment,T),A(g);for(let $=0;$ Send verification email',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:x,d(s){s&&k(e),t=!1,i()}}}function yh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' Send password reset email',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:x,d(s){s&&k(e),t=!1,i()}}}function RO(n){let e,t,i,s,l,o,r,a=n[13]&&!n[2].verified&&n[2].email&&vh(n),u=n[13]&&n[2].email&&yh(n);return{c(){a&&a.c(),e=O(),u&&u.c(),t=O(),i=v("button"),i.innerHTML=' Duplicate',s=O(),l=v("button"),l.innerHTML=' Delete',p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item txt-danger closable")},m(f,c){a&&a.m(f,c),w(f,e,c),u&&u.m(f,c),w(f,t,c),w(f,i,c),w(f,s,c),w(f,l,c),o||(r=[Y(i,"click",n[33]),Y(l,"click",Fn(Qe(n[34])))],o=!0)},p(f,c){f[13]&&!f[2].verified&&f[2].email?a?a.p(f,c):(a=vh(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[13]&&f[2].email?u?u.p(f,c):(u=yh(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){f&&(k(e),k(t),k(i),k(s),k(l)),a&&a.d(f),u&&u.d(f),o=!1,Ce(r)}}}function kh(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=O(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),Q(t,"active",n[12]===ss),p(s,"type","button"),p(s,"class","tab-item"),Q(s,"active",n[12]===yl),p(e,"class","tabs-header stretched")},m(r,a){w(r,e,a),b(e,t),b(e,i),b(e,s),l||(o=[Y(t,"click",n[35]),Y(s,"click",n[36])],l=!0)},p(r,a){a[0]&4096&&Q(t,"active",r[12]===ss),a[0]&4096&&Q(s,"active",r[12]===yl)},d(r){r&&k(e),l=!1,Ce(o)}}}function qO(n){var m;let e,t=n[6]?"New":"Edit",i,s,l,o=((m=n[0])==null?void 0:m.name)+"",r,a,u,f,c,d,h=!n[6]&&bh(n),g=n[13]&&!n[6]&&kh(n);return{c(){e=v("h4"),i=U(t),s=O(),l=v("strong"),r=U(o),a=U(" record"),u=O(),h&&h.c(),f=O(),g&&g.c(),c=ke(),p(e,"class","panel-title svelte-qc5ngu")},m(_,y){w(_,e,y),b(e,i),b(e,s),b(e,l),b(l,r),b(e,a),w(_,u,y),h&&h.m(_,y),w(_,f,y),g&&g.m(_,y),w(_,c,y),d=!0},p(_,y){var S;(!d||y[0]&64)&&t!==(t=_[6]?"New":"Edit")&&se(i,t),(!d||y[0]&1)&&o!==(o=((S=_[0])==null?void 0:S.name)+"")&&se(r,o),_[6]?h&&(re(),L(h,1,1,()=>{h=null}),ae()):h?(h.p(_,y),y[0]&64&&A(h,1)):(h=bh(_),h.c(),A(h,1),h.m(f.parentNode,f)),_[13]&&!_[6]?g?g.p(_,y):(g=kh(_),g.c(),g.m(c.parentNode,c)):g&&(g.d(1),g=null)},i(_){d||(A(h),d=!0)},o(_){L(h),d=!1},d(_){_&&(k(e),k(u),k(f),k(c)),h&&h.d(_),g&&g.d(_)}}}function jO(n){let e,t,i,s,l,o=n[6]?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=U(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[10],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[16]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[14]||n[10],Q(s,"btn-loading",n[10])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(l,r),u||(f=Y(e,"click",n[30]),u=!0)},p(c,d){d[0]&1024&&(e.disabled=c[10]),d[0]&64&&o!==(o=c[6]?"Create":"Save changes")&&se(r,o),d[0]&17408&&a!==(a=!c[14]||c[10])&&(s.disabled=a),d[0]&1024&&Q(s,"btn-loading",c[10])},d(c){c&&(k(e),k(i),k(s)),u=!1,f()}}}function HO(n){let e,t,i={class:` + record-panel + `+(n[15]?"overlay-panel-xl":"overlay-panel-lg")+` + `+(n[13]&&!n[6]?"colored-header":"")+` + `,beforeHide:n[54],$$slots:{footer:[jO],header:[qO],default:[NO]},$$scope:{ctx:n}};return e=new on({props:i}),n[55](e),e.$on("hide",n[56]),e.$on("show",n[57]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&41024&&(o.class=` + 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 ss="form",yl="providers";function VO(n,e,t){let i,s,l,o,r;const a=wt(),u="record_"+z.randomString(5);let{collection:f}=e,c,d=null,h=null,g=null,m=!1,_=!1,y={},S={},T=JSON.stringify(null),$=T,C=ss,M=!0,E=!1;function D(ge){return P(ge),t(11,_=!0),t(12,C=ss),c==null?void 0:c.show()}function I(){return c==null?void 0:c.hide()}async function P(ge){t(28,E=!1),tn({}),t(2,d=ge||{}),t(3,h=structuredClone(d)),t(4,y={}),t(5,S={}),await ln(),t(9,g=R()),!g||K(h,g)?t(9,g=null):(delete g.password,delete g.passwordConfirm),t(26,T=JSON.stringify(h)),t(28,E=!0)}async function F(ge){var ut,Wt;tn({}),t(2,d=ge||{}),t(4,y={}),t(5,S={});const we=((Wt=(ut=f==null?void 0:f.schema)==null?void 0:ut.filter(et=>et.type!="file"))==null?void 0:Wt.map(et=>et.name))||[];for(let et in ge)we.includes(et)||t(3,h[et]=ge[et],h);await ln(),t(26,T=JSON.stringify(h)),J()}function N(){return"record_draft_"+((f==null?void 0:f.id)||"")+"_"+((d==null?void 0:d.id)||"")}function R(ge){try{const we=window.localStorage.getItem(N());if(we)return new Record(JSON.parse(we))}catch{}return ge}function q(ge){window.localStorage.setItem(N(),ge)}function B(){g&&(t(3,h=g),t(9,g=null))}function K(ge,we){var an;const ut=structuredClone(ge||{}),Wt=structuredClone(we||{}),et=(an=f==null?void 0:f.schema)==null?void 0:an.filter(Xt=>Xt.type==="file");for(let Xt of et)delete ut[Xt.name],delete Wt[Xt.name];return delete ut.password,delete ut.passwordConfirm,delete Wt.password,delete Wt.passwordConfirm,JSON.stringify(ut)==JSON.stringify(Wt)}function J(){t(9,g=null),window.localStorage.removeItem(N())}async function X(ge=!0){if(!(m||!r||!(f!=null&&f.id))){t(10,m=!0);try{const we=ue();let ut;M?ut=await fe.collection(f.id).create(we):ut=await fe.collection(f.id).update(h.id,we),jt(M?"Successfully created record.":"Successfully updated record."),J(),ge?(t(11,_=!1),I()):F(ut),a("save",ut)}catch(we){fe.error(we)}t(10,m=!1)}}function G(){d!=null&&d.id&&mn("Do you really want to delete the selected record?",()=>fe.collection(d.collectionId).delete(d.id).then(()=>{I(),jt("Successfully deleted record."),a("delete",d)}).catch(ge=>{fe.error(ge)}))}function ue(){const ge=structuredClone(h||{}),we=new FormData,ut={id:ge.id},Wt={};for(const et of(f==null?void 0:f.schema)||[])ut[et.name]=!0,et.type=="json"&&(Wt[et.name]=!0);i&&(ut.username=!0,ut.email=!0,ut.emailVisibility=!0,ut.password=!0,ut.passwordConfirm=!0,ut.verified=!0);for(const et in ge)if(ut[et]){if(typeof ge[et]>"u"&&(ge[et]=null),Wt[et]&&ge[et]!=="")try{JSON.parse(ge[et])}catch(an){const Xt={};throw Xt[et]={code:"invalid_json",message:an.toString()},new Kn({status:400,response:{data:Xt}})}z.addValueToFormData(we,et,ge[et])}for(const et in y){const an=z.toArray(y[et]);for(const Xt of an)we.append(et,Xt)}for(const et in S){const an=z.toArray(S[et]);for(const Xt of an)we.append(et+"."+Xt,"")}return we}function ee(){!(f!=null&&f.id)||!(d!=null&&d.email)||mn(`Do you really want to sent verification email to ${d.email}?`,()=>fe.collection(f.id).requestVerification(d.email).then(()=>{jt(`Successfully sent verification email to ${d.email}.`)}).catch(ge=>{fe.error(ge)}))}function te(){!(f!=null&&f.id)||!(d!=null&&d.email)||mn(`Do you really want to sent password reset email to ${d.email}?`,()=>fe.collection(f.id).requestPasswordReset(d.email).then(()=>{jt(`Successfully sent password reset email to ${d.email}.`)}).catch(ge=>{fe.error(ge)}))}function Ee(){o?mn("You have unsaved changes. Do you really want to discard them?",()=>{Fe()}):Fe()}async function Fe(){let ge=d?structuredClone(d):null;if(ge){ge.id="",ge.created="",ge.updated="";const we=(f==null?void 0:f.schema)||[];for(const ut of we)ut.type==="file"&&delete ge[ut.name]}J(),D(ge),await ln(),t(26,T="")}function Ve(ge){(ge.ctrlKey||ge.metaKey)&&ge.code=="KeyS"&&(ge.preventDefault(),ge.stopPropagation(),X(!1))}const ze=()=>I(),Se=()=>ee(),Me=()=>te(),Ze=()=>Ee(),bt=()=>G(),Ge=()=>t(12,C=ss),Ke=()=>t(12,C=yl),$t=()=>B(),me=()=>J();function ye(){h.id=this.value,t(3,h)}function Je(ge){h=ge,t(3,h)}function Oe(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function mt(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function Ft(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function rn(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function Ae(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function at(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function bn(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function $n(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function Tn(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function li(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}function Gn(ge,we){n.$$.not_equal(y[we.name],ge)&&(y[we.name]=ge,t(4,y))}function mi(ge,we){n.$$.not_equal(S[we.name],ge)&&(S[we.name]=ge,t(5,S))}function Cn(ge,we){n.$$.not_equal(h[we.name],ge)&&(h[we.name]=ge,t(3,h))}const dt=()=>o&&_?(mn("You have unsaved changes. Do you really want to close the panel?",()=>{t(11,_=!1),I()}),!1):(tn({}),J(),!0);function Mn(ge){ne[ge?"unshift":"push"](()=>{c=ge,t(8,c)})}function Gt(ge){Ne.call(this,n,ge)}function Xn(ge){Ne.call(this,n,ge)}return n.$$set=ge=>{"collection"in ge&&t(0,f=ge.collection)},n.$$.update=()=>{var ge;n.$$.dirty[0]&1&&t(13,i=(f==null?void 0:f.type)==="auth"),n.$$.dirty[0]&1&&t(15,s=!!((ge=f==null?void 0:f.schema)!=null&&ge.find(we=>we.type==="editor"))),n.$$.dirty[0]&48&&t(29,l=z.hasNonEmptyProps(y)||z.hasNonEmptyProps(S)),n.$$.dirty[0]&8&&t(27,$=JSON.stringify(h)),n.$$.dirty[0]&738197504&&t(7,o=l||T!=$),n.$$.dirty[0]&4&&t(6,M=!d||!d.id),n.$$.dirty[0]&192&&t(14,r=M||o),n.$$.dirty[0]&402653184&&E&&q($)},[f,I,d,h,y,S,M,o,c,g,m,_,C,i,r,s,u,B,J,X,G,ee,te,Ee,Ve,D,T,$,E,l,ze,Se,Me,Ze,bt,Ge,Ke,$t,me,ye,Je,Oe,mt,Ft,rn,Ae,at,bn,$n,Tn,li,Gn,mi,Cn,dt,Mn,Gt,Xn]}class S1 extends ve{constructor(e){super(),be(this,e,VO,HO,he,{collection:0,show:25,hide:1},null,[-1,-1,-1])}get show(){return this.$$.ctx[25]}get hide(){return this.$$.ctx[1]}}function wh(n,e,t){const i=n.slice();return i[18]=e[t],i[8]=t,i}function Sh(n,e,t){const i=n.slice();return i[13]=e[t],i}function $h(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function Th(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function zO(n){const e=n.slice(),t=z.toArray(e[3]);e[16]=t;const i=e[2]?10:500;return e[17]=i,e}function BO(n){const e=n.slice(),t=z.toArray(e[3]);e[9]=t;const i=z.toArray(e[0].expand[e[1].name]);e[10]=i;const s=e[2]?20:500;return e[11]=s,e}function UO(n){const e=n.slice(),t=z.trimQuotedValue(JSON.stringify(e[3]))||'""';return e[5]=t,e}function WO(n){let e,t;return{c(){e=v("div"),t=U(n[3]),p(e,"class","block txt-break fallback-block svelte-jdf51v")},m(i,s){w(i,e,s),b(e,t)},p(i,s){s&8&&se(t,i[3])},i:x,o:x,d(i){i&&k(e)}}}function YO(n){let e,t=z.truncate(n[3])+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=z.truncate(n[3]))},m(l,o){w(l,e,o),b(e,i)},p(l,o){o&8&&t!==(t=z.truncate(l[3])+"")&&se(i,t),o&8&&s!==(s=z.truncate(l[3]))&&p(e,"title",s)},i:x,o:x,d(l){l&&k(e)}}}function KO(n){let e,t=[],i=new Map,s,l,o=pe(n[16].slice(0,n[17]));const r=u=>u[8]+u[18];for(let u=0;un[17]&&Mh();return{c(){e=v("div");for(let u=0;uu[17]?a||(a=Mh(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(u){if(!l){for(let f=0;fn[11]&&Dh();return{c(){e=v("div"),i.c(),s=O(),u&&u.c(),p(e,"class","inline-flex")},m(f,c){w(f,e,c),r[t].m(e,null),b(e,s),u&&u.m(e,null),l=!0},p(f,c){let d=t;t=a(f),t===d?r[t].p(f,c):(re(),L(r[d],1,1,()=>{r[d]=null}),ae(),i=r[t],i?i.p(f,c):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[9].length>f[11]?u||(u=Dh(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){L(i),l=!1},d(f){f&&k(e),r[t].d(),u&&u.d()}}}function ZO(n){let e,t=[],i=new Map,s=pe(z.toArray(n[3]));const l=o=>o[8]+o[6];for(let o=0;o{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){L(t),s=!1},d(a){a&&k(i),o[e].d(a)}}}function QO(n){let e,t=z.truncate(n[3])+"",i,s,l;return{c(){e=v("a"),i=U(t),p(e,"class","txt-ellipsis"),p(e,"href",n[3]),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(o,r){w(o,e,r),b(e,i),s||(l=[$e(He.call(null,e,"Open in new tab")),Y(e,"click",Fn(n[4]))],s=!0)},p(o,r){r&8&&t!==(t=z.truncate(o[3])+"")&&se(i,t),r&8&&p(e,"href",o[3])},i:x,o:x,d(o){o&&k(e),s=!1,Ce(l)}}}function xO(n){let e,t;return{c(){e=v("span"),t=U(n[3]),p(e,"class","txt")},m(i,s){w(i,e,s),b(e,t)},p(i,s){s&8&&se(t,i[3])},i:x,o:x,d(i){i&&k(e)}}}function eE(n){let e,t=n[3]?"True":"False",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt")},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&8&&t!==(t=s[3]?"True":"False")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function tE(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:x,i:x,o:x,d(t){t&&k(e)}}}function nE(n){let e,t,i,s;const l=[aE,rE],o=[];function r(a,u){return a[2]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ke()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),L(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){L(t),s=!1},d(a){a&&k(i),o[e].d(a)}}}function Ch(n,e){let t,i,s;return i=new lu({props:{record:e[0],filename:e[18],size:"sm"}}),{key:n,first:null,c(){t=ke(),V(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o&1&&(r.record=e[0]),o&12&&(r.filename=e[18]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(t),H(i,l)}}}function Mh(n){let e;return{c(){e=U("...")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function iE(n){let e,t=pe(n[9].slice(0,n[11])),i=[];for(let s=0;sr[8]+r[6];for(let r=0;r500&&Ih(n);return{c(){e=v("span"),i=U(t),s=O(),r&&r.c(),l=ke(),p(e,"class","txt")},m(a,u){w(a,e,u),b(e,i),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){(!o||u&8)&&t!==(t=z.truncate(a[5],500,!0)+"")&&se(i,t),a[5].length>500?r?(r.p(a,u),u&8&&A(r,1)):(r=Ih(a),r.c(),A(r,1),r.m(l.parentNode,l)):r&&(re(),L(r,1,1,()=>{r=null}),ae())},i(a){o||(A(r),o=!0)},o(a){L(r),o=!1},d(a){a&&(k(e),k(s),k(l)),r&&r.d(a)}}}function aE(n){let e,t=z.truncate(n[5])+"",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis")},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&8&&t!==(t=z.truncate(s[5])+"")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function Ih(n){let e,t;return e=new qs({props:{value:JSON.stringify(n[3],null,2)}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.value=JSON.stringify(i[3],null,2)),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 uE(n){let e,t,i,s,l;const o=[nE,tE,eE,xO,QO,XO,GO,ZO,JO,KO,YO,WO],r=[];function a(f,c){return c&8&&(e=null),f[1].type==="json"?0:(e==null&&(e=!!z.isEmpty(f[3])),e?1:f[1].type==="bool"?2:f[1].type==="number"?3:f[1].type==="url"?4:f[1].type==="editor"?5:f[1].type==="date"?6:f[1].type==="select"?7:f[1].type==="relation"?8:f[1].type==="file"?9:f[2]?10:11)}function u(f,c){return c===0?UO(f):c===8?BO(f):c===9?zO(f):f}return t=a(n,-1),i=r[t]=o[t](u(n,t)),{c(){i.c(),s=ke()},m(f,c){r[t].m(f,c),w(f,s,c),l=!0},p(f,[c]){let d=t;t=a(f,c),t===d?r[t].p(u(f,t),c):(re(),L(r[d],1,1,()=>{r[d]=null}),ae(),i=r[t],i?i.p(u(f,t),c):(i=r[t]=o[t](u(f,t)),i.c()),A(i,1),i.m(s.parentNode,s))},i(f){l||(A(i),l=!0)},o(f){L(i),l=!1},d(f){f&&k(s),r[t].d(f)}}}function fE(n,e,t){let i,{record:s}=e,{field:l}=e,{short:o=!1}=e;function r(a){Ne.call(this,n,a)}return n.$$set=a=>{"record"in a&&t(0,s=a.record),"field"in a&&t(1,l=a.field),"short"in a&&t(2,o=a.short)},n.$$.update=()=>{n.$$.dirty&3&&t(3,i=s[l.name])},[s,l,o,i,r]}class $1 extends ve{constructor(e){super(),be(this,e,fE,uE,he,{record:0,field:1,short:2})}}function Lh(n,e,t){const i=n.slice();return i[10]=e[t],i}function Ph(n){let e,t,i=n[10].name+"",s,l,o,r,a;return r=new $1({props:{field:n[10],record:n[3]}}),{c(){e=v("tr"),t=v("td"),s=U(i),l=O(),o=v("td"),V(r.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(o,"class","col-field svelte-1nt58f7")},m(u,f){w(u,e,f),b(e,t),b(t,s),b(e,l),b(e,o),j(r,o,null),a=!0},p(u,f){(!a||f&1)&&i!==(i=u[10].name+"")&&se(s,i);const c={};f&1&&(c.field=u[10]),f&8&&(c.record=u[3]),r.$set(c)},i(u){a||(A(r.$$.fragment,u),a=!0)},o(u){L(r.$$.fragment,u),a=!1},d(u){u&&k(e),H(r)}}}function Fh(n){let e,t,i,s,l,o;return l=new Ti({props:{date:n[3].created}}),{c(){e=v("tr"),t=v("td"),t.textContent="created",i=O(),s=v("td"),V(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(s,"class","col-field svelte-1nt58f7")},m(r,a){w(r,e,a),b(e,t),b(e,i),b(e,s),j(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].created),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){L(l.$$.fragment,r),o=!1},d(r){r&&k(e),H(l)}}}function Nh(n){let e,t,i,s,l,o;return l=new Ti({props:{date:n[3].updated}}),{c(){e=v("tr"),t=v("td"),t.textContent="updated",i=O(),s=v("td"),V(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(s,"class","col-field svelte-1nt58f7")},m(r,a){w(r,e,a),b(e,t),b(e,i),b(e,s),j(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].updated),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){L(l.$$.fragment,r),o=!1},d(r){r&&k(e),H(l)}}}function cE(n){var M;let e,t,i,s,l,o,r,a,u,f,c=n[3].id+"",d,h,g,m,_;a=new qs({props:{value:n[3].id}});let y=pe((M=n[0])==null?void 0:M.schema),S=[];for(let E=0;EL(S[E],1,1,()=>{S[E]=null});let $=n[3].created&&Fh(n),C=n[3].updated&&Nh(n);return{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="id",l=O(),o=v("td"),r=v("div"),V(a.$$.fragment),u=O(),f=v("span"),d=U(c),h=O();for(let E=0;E{$=null}),ae()),E[3].updated?C?(C.p(E,D),D&8&&A(C,1)):(C=Nh(E),C.c(),A(C,1),C.m(t,null)):C&&(re(),L(C,1,1,()=>{C=null}),ae())},i(E){if(!_){A(a.$$.fragment,E);for(let D=0;DClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[6]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function hE(n){let e,t,i={class:"record-preview-panel "+(n[4]?"overlay-panel-xl":"overlay-panel-lg"),$$slots:{footer:[pE],header:[dE],default:[cE]},$$scope:{ctx:n}};return e=new on({props:i}),n[7](e),e.$on("hide",n[8]),e.$on("show",n[9]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="record-preview-panel "+(s[4]?"overlay-panel-xl":"overlay-panel-lg")),l&8201&&(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[7](null),H(e,s)}}}function mE(n,e,t){let i,{collection:s}=e,l,o={};function r(h){return t(3,o=h),l==null?void 0:l.show()}function a(){return l==null?void 0:l.hide()}const u=()=>a();function f(h){ne[h?"unshift":"push"](()=>{l=h,t(2,l)})}function c(h){Ne.call(this,n,h)}function d(h){Ne.call(this,n,h)}return n.$$set=h=>{"collection"in h&&t(0,s=h.collection)},n.$$.update=()=>{var h;n.$$.dirty&1&&t(4,i=!!((h=s==null?void 0:s.schema)!=null&&h.find(g=>g.type==="editor")))},[s,a,l,o,i,r,u,f,c,d]}class gE extends ve{constructor(e){super(),be(this,e,mE,hE,he,{collection:0,show:5,hide:1})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[1]}}function Rh(n,e,t){const i=n.slice();return i[58]=e[t],i}function qh(n,e,t){const i=n.slice();return i[61]=e[t],i}function jh(n,e,t){const i=n.slice();return i[61]=e[t],i}function Hh(n,e,t){const i=n.slice();return i[54]=e[t],i}function Vh(n){let e;function t(l,o){return l[13]?bE:_E}let i=t(n),s=i(n);return{c(){e=v("th"),s.c(),p(e,"class","bulk-select-col min-width")},m(l,o){w(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&k(e),s.d()}}}function _E(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=O(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[3].length,t.checked=n[17],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){w(a,e,u),b(e,t),b(e,s),b(e,l),o||(r=Y(t,"change",n[30]),o=!0)},p(a,u){u[0]&8&&i!==(i=!a[3].length)&&(t.disabled=i),u[0]&131072&&(t.checked=a[17])},d(a){a&&k(e),o=!1,r()}}}function bE(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function zh(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[vE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new cn({props:l}),ne.push(()=>de(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>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 vE(n){let e;return{c(){e=v("div"),e.innerHTML=` id`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Bh(n){let e=!n[6].includes("@username"),t,i=!n[6].includes("@email"),s,l,o=e&&Uh(n),r=i&&Wh(n);return{c(){o&&o.c(),t=O(),r&&r.c(),s=ke()},m(a,u){o&&o.m(a,u),w(a,t,u),r&&r.m(a,u),w(a,s,u),l=!0},p(a,u){u[0]&64&&(e=!a[6].includes("@username")),e?o?(o.p(a,u),u[0]&64&&A(o,1)):(o=Uh(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(re(),L(o,1,1,()=>{o=null}),ae()),u[0]&64&&(i=!a[6].includes("@email")),i?r?(r.p(a,u),u[0]&64&&A(r,1)):(r=Wh(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(re(),L(r,1,1,()=>{r=null}),ae())},i(a){l||(A(o),A(r),l=!0)},o(a){L(o),L(r),l=!1},d(a){a&&(k(t),k(s)),o&&o.d(a),r&&r.d(a)}}}function Uh(n){let e,t,i;function s(o){n[32](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[yE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new cn({props:l}),ne.push(()=>de(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>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 yE(n){let e;return{c(){e=v("div"),e.innerHTML=` username`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Wh(n){let e,t,i;function s(o){n[33](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[kE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new cn({props:l}),ne.push(()=>de(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>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 kE(n){let e;return{c(){e=v("div"),e.innerHTML=` email`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function wE(n){let e,t,i,s,l,o=n[61].name+"",r;return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=U(o),p(t,"class",i=z.getFieldTypeIcon(n[61].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){w(a,e,u),b(e,t),b(e,s),b(e,l),b(l,r)},p(a,u){u[0]&524288&&i!==(i=z.getFieldTypeIcon(a[61].type))&&p(t,"class",i),u[0]&524288&&o!==(o=a[61].name+"")&&se(r,o)},d(a){a&&k(e)}}}function Yh(n,e){let t,i,s,l;function o(a){e[34](a)}let r={class:"col-type-"+e[61].type+" col-field-"+e[61].name,name:e[61].name,$$slots:{default:[wE]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new cn({props:r}),ne.push(()=>de(i,"sort",o)),{key:n,first:null,c(){t=ke(),V(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&524288&&(f.class="col-type-"+e[61].type+" col-field-"+e[61].name),u[0]&524288&&(f.name=e[61].name),u[0]&524288|u[2]&16&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],_e(()=>s=!1)),i.$set(f)},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 Kh(n){let e,t,i;function s(o){n[35](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[SE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new cn({props:l}),ne.push(()=>de(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>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 SE(n){let e;return{c(){e=v("div"),e.innerHTML=` created`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Jh(n){let e,t,i;function s(o){n[36](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[$E]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new cn({props:l}),ne.push(()=>de(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>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 $E(n){let e;return{c(){e=v("div"),e.innerHTML=` updated`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Zh(n){let e;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Toggle columns"),p(e,"class","btn btn-sm btn-transparent p-0")},m(t,i){w(t,e,i),n[37](e)},p:x,d(t){t&&k(e),n[37](null)}}}function Gh(n){let e;function t(l,o){return l[13]?CE:TE}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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){l&&k(e),s.d(l)}}}function TE(n){let e,t,i,s,l;function o(u,f){var c;if((c=u[1])!=null&&c.length)return OE;if(!u[11])return ME}let r=o(n),a=r&&r(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=O(),a&&a.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(u,f){w(u,e,f),b(e,t),b(t,i),b(t,s),a&&a.m(t,null),b(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a&&a.d(1),a=r&&r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&k(e),a&&a.d()}}}function CE(n){let e;return{c(){e=v("tr"),e.innerHTML=' '},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function ME(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' New record',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:x,d(s){s&&k(e),t=!1,i()}}}function OE(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[41]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Xh(n){let e,t,i,s,l,o,r,a,u,f;function c(){return n[38](n[58])}return{c(){e=v("td"),t=v("div"),i=v("input"),o=O(),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,h){w(d,e,h),b(e,t),b(t,i),b(t,o),b(t,r),u||(f=[Y(i,"change",c),Y(t,"click",Fn(n[28]))],u=!0)},p(d,h){n=d,h[0]&8&&s!==(s="checkbox_"+n[58].id)&&p(i,"id",s),h[0]&40&&l!==(l=n[5][n[58].id])&&(i.checked=l),h[0]&8&&a!==(a="checkbox_"+n[58].id)&&p(r,"for",a)},d(d){d&&k(e),u=!1,Ce(f)}}}function Qh(n){let e,t,i,s,l,o,r=n[58].id+"",a,u,f;s=new qs({props:{value:n[58].id}});let c=n[10]&&xh(n);return{c(){e=v("td"),t=v("div"),i=v("div"),V(s.$$.fragment),l=O(),o=v("div"),a=U(r),u=O(),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,h){w(d,e,h),b(e,t),b(t,i),j(s,i,null),b(i,l),b(i,o),b(o,a),b(t,u),c&&c.m(t,null),f=!0},p(d,h){const g={};h[0]&8&&(g.value=d[58].id),s.$set(g),(!f||h[0]&8)&&r!==(r=d[58].id+"")&&se(a,r),d[10]?c?c.p(d,h):(c=xh(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){f||(A(s.$$.fragment,d),f=!0)},o(d){L(s.$$.fragment,d),f=!1},d(d){d&&k(e),H(s),c&&c.d()}}}function xh(n){let e;function t(l,o){return l[58].verified?DE:EE}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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){l&&k(e),s.d(l)}}}function EE(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=$e(He.call(null,e,"Unverified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function DE(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=$e(He.call(null,e,"Verified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function em(n){let e=!n[6].includes("@username"),t,i=!n[6].includes("@email"),s,l=e&&tm(n),o=i&&nm(n);return{c(){l&&l.c(),t=O(),o&&o.c(),s=ke()},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=tm(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=nm(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){r&&(k(t),k(s)),l&&l.d(r),o&&o.d(r)}}}function tm(n){let e,t;function i(o,r){return r[0]&8&&(t=null),t==null&&(t=!!z.isEmpty(o[58].username)),t?IE:AE}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 AE(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 IE(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:x,d(t){t&&k(e)}}}function nm(n){let e,t;function i(o,r){return r[0]&8&&(t=null),t==null&&(t=!!z.isEmpty(o[58].email)),t?PE:LE}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 LE(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 PE(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:x,d(t){t&&k(e)}}}function im(n,e){let t,i,s,l;return i=new $1({props:{short:!0,record:e[58],field:e[61]}}),{key:n,first:null,c(){t=v("td"),V(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),j(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 sm(n){let e,t,i;return t=new Ti({props:{date:n[58].created}}),{c(){e=v("td"),V(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.date=s[58].created),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 lm(n){let e,t,i;return t=new Ti({props:{date:n[58].updated}}),{c(){e=v("td"),V(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.date=s[58].updated),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 om(n,e){let t,i,s=!e[6].includes("@id"),l,o,r=[],a=new Map,u,f=e[9]&&!e[6].includes("@created"),c,d=e[8]&&!e[6].includes("@updated"),h,g,m,_,y,S,T=!e[11]&&Xh(e),$=s&&Qh(e),C=e[10]&&em(e),M=pe(e[19]);const E=N=>N[61].name;for(let N=0;N',m=O(),p(g,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(N,R){w(N,t,R),T&&T.m(t,null),b(t,i),$&&$.m(t,null),b(t,l),C&&C.m(t,null),b(t,o);for(let q=0;q{$=null}),ae()),e[10]?C?C.p(e,R):(C=em(e),C.c(),C.m(t,o)):C&&(C.d(1),C=null),R[0]&524296&&(M=pe(e[19]),re(),r=yt(r,R,E,1,e,M,a,t,Ut,im,u,qh),ae()),R[0]&576&&(f=e[9]&&!e[6].includes("@created")),f?D?(D.p(e,R),R[0]&576&&A(D,1)):(D=sm(e),D.c(),A(D,1),D.m(t,c)):D&&(re(),L(D,1,1,()=>{D=null}),ae()),R[0]&320&&(d=e[8]&&!e[6].includes("@updated")),d?I?(I.p(e,R),R[0]&320&&A(I,1)):(I=lm(e),I.c(),A(I,1),I.m(t,h)):I&&(re(),L(I,1,1,()=>{I=null}),ae())},i(N){if(!_){A($);for(let R=0;RK[61].name;for(let K=0;KK[11]?K[58]:K[58].id;for(let K=0;K{M=null}),ae()),K[10]?E?(E.p(K,J),J[0]&1024&&A(E,1)):(E=Bh(K),E.c(),A(E,1),E.m(i,r)):E&&(re(),L(E,1,1,()=>{E=null}),ae()),J[0]&524289&&(D=pe(K[19]),re(),a=yt(a,J,I,1,K,D,u,i,Ut,Yh,f,jh),ae()),J[0]&576&&(c=K[9]&&!K[6].includes("@created")),c?P?(P.p(K,J),J[0]&576&&A(P,1)):(P=Kh(K),P.c(),A(P,1),P.m(i,d)):P&&(re(),L(P,1,1,()=>{P=null}),ae()),J[0]&320&&(h=K[8]&&!K[6].includes("@updated")),h?F?(F.p(K,J),J[0]&320&&A(F,1)):(F=Jh(K),F.c(),A(F,1),F.m(i,g)):F&&(re(),L(F,1,1,()=>{F=null}),ae()),K[16].length?N?N.p(K,J):(N=Zh(K),N.c(),N.m(m,null)):N&&(N.d(1),N=null),J[0]&9973610&&(R=pe(K[3]),re(),S=yt(S,J,q,1,K,R,T,y,Ut,om,null,Rh),ae(),!R.length&&B?B.p(K,J):R.length?B&&(B.d(1),B=null):(B=Gh(K),B.c(),B.m(y,null))),(!$||J[0]&8192)&&Q(e,"table-loading",K[13])},i(K){if(!$){A(M),A(E);for(let J=0;J({57:l}),({uniqueId:l})=>[0,l?67108864:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=ke(),V(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&65600|o[1]&67108864|o[2]&16&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(t),H(i,l)}}}function RE(n){let e,t,i=[],s=new Map,l,o,r=pe(n[16]);const a=u=>u[54].id+u[54].name;for(let u=0;u{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){s&&k(e),i&&i.d(s)}}}function um(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=v("small"),t=U("Showing "),s=U(i),l=U(" of "),o=U(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),b(e,t),b(e,s),b(e,l),b(e,o)},p(r,a){a[0]&8&&i!==(i=r[3].length+"")&&se(s,i),a[0]&16&&se(o,r[4])},d(r){r&&k(e)}}}function fm(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=v("div"),t=v("button"),i=v("span"),s=U("Load more ("),o=U(l),r=U(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[13]),Q(t,"btn-disabled",n[13]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),b(e,t),b(t,i),b(i,s),b(i,o),b(i,r),a||(u=Y(t,"click",n[43]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&se(o,l),c[0]&8192&&Q(t,"btn-loading",f[13]),c[0]&8192&&Q(t,"btn-disabled",f[13])},d(f){f&&k(e),a=!1,u()}}}function cm(n){let e,t,i,s,l,o,r=n[7]===1?"record":"records",a,u,f,c,d,h,g,m,_,y,S;return{c(){e=v("div"),t=v("div"),i=U("Selected "),s=v("strong"),l=U(n[7]),o=O(),a=U(r),u=O(),f=v("button"),f.innerHTML='Reset',c=O(),d=v("div"),h=O(),g=v("button"),g.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),Q(f,"btn-disabled",n[14]),p(d,"class","flex-fill"),p(g,"type","button"),p(g,"class","btn btn-sm btn-transparent btn-danger"),Q(g,"btn-loading",n[14]),Q(g,"btn-disabled",n[14]),p(e,"class","bulkbar")},m(T,$){w(T,e,$),b(e,t),b(t,i),b(t,s),b(s,l),b(t,o),b(t,a),b(e,u),b(e,f),b(e,c),b(e,d),b(e,h),b(e,g),_=!0,y||(S=[Y(f,"click",n[44]),Y(g,"click",n[45])],y=!0)},p(T,$){(!_||$[0]&128)&&se(l,T[7]),(!_||$[0]&128)&&r!==(r=T[7]===1?"record":"records")&&se(a,r),(!_||$[0]&16384)&&Q(f,"btn-disabled",T[14]),(!_||$[0]&16384)&&Q(g,"btn-loading",T[14]),(!_||$[0]&16384)&&Q(g,"btn-disabled",T[14])},i(T){_||(T&&Xe(()=>{_&&(m||(m=qe(e,pi,{duration:150,y:5},!0)),m.run(1))}),_=!0)},o(T){T&&(m||(m=qe(e,pi,{duration:150,y:5},!1)),m.run(0)),_=!1},d(T){T&&k(e),T&&m&&m.end(),y=!1,Ce(S)}}}function jE(n){let e,t,i,s,l,o;e=new La({props:{class:"table-wrapper",$$slots:{before:[qE],default:[FE]},$$scope:{ctx:n}}});let r=n[3].length&&um(n),a=n[3].length&&n[18]&&fm(n),u=n[7]&&cm(n);return{c(){V(e.$$.fragment),t=O(),r&&r.c(),i=O(),a&&a.c(),s=O(),u&&u.c(),l=ke()},m(f,c){j(e,f,c),w(f,t,c),r&&r.m(f,c),w(f,i,c),a&&a.m(f,c),w(f,s,c),u&&u.m(f,c),w(f,l,c),o=!0},p(f,c){const d={};c[0]&765803|c[2]&16&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[3].length?r?r.p(f,c):(r=um(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[3].length&&f[18]?a?a.p(f,c):(a=fm(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[7]?u?(u.p(f,c),c[0]&128&&A(u,1)):(u=cm(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(re(),L(u,1,1,()=>{u=null}),ae())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){L(e.$$.fragment,f),L(u),o=!1},d(f){f&&(k(t),k(i),k(s),k(l)),H(e,f),r&&r.d(f),a&&a.d(f),u&&u.d(f)}}}const HE=/^([\+\-])?(\w+)$/;function VE(n,e,t){let i,s,l,o,r,a,u,f,c,d,h;Ye(n,ii,Ae=>t(48,h=Ae));const g=wt();let{collection:m}=e,{sort:_=""}=e,{filter:y=""}=e,S=[],T=1,$=0,C={},M=!0,E=!1,D=0,I,P=[],F=[];function N(){m!=null&&m.id&&localStorage.setItem((m==null?void 0:m.id)+"@hiddenCollumns",JSON.stringify(P))}function R(){if(t(6,P=[]),!!(m!=null&&m.id))try{const Ae=localStorage.getItem(m.id+"@hiddenCollumns");Ae&&t(6,P=JSON.parse(Ae)||[])}catch{}}async function q(){const Ae=T;for(let at=1;at<=Ae;at++)(at===1||a)&&await B(at,!1)}async function B(Ae=1,at=!0){var Gn,mi,Cn;if(!(m!=null&&m.id))return;t(13,M=!0);let bn=_;const $n=bn.match(HE),Tn=$n?o.find(dt=>dt.name===$n[2]):null;if($n&&Tn){const dt=((Cn=(mi=(Gn=h==null?void 0:h.find(Gt=>{var Xn;return Gt.id==((Xn=Tn.options)==null?void 0:Xn.collectionId)}))==null?void 0:Gn.schema)==null?void 0:mi.filter(Gt=>Gt.presentable))==null?void 0:Cn.map(Gt=>Gt.name))||[],Mn=[];for(const Gt of dt)Mn.push(($n[1]||"")+$n[2]+"."+Gt);Mn.length>0&&(bn=Mn.join(","))}const li=z.getAllCollectionIdentifiers(m);return fe.collection(m.id).getList(Ae,30,{sort:bn,filter:z.normalizeSearchFilter(y,li),expand:o.map(dt=>dt.name).join(","),$cancelKey:"records_list"}).then(async dt=>{var Mn;if(Ae<=1&&K(),t(13,M=!1),t(12,T=dt.page),t(4,$=dt.totalItems),g("load",S.concat(dt.items)),at){const Gt=++D;for(;(Mn=dt.items)!=null&&Mn.length&&D==Gt;)t(3,S=S.concat(dt.items.splice(0,15))),await z.yieldToMain()}else t(3,S=S.concat(dt.items))}).catch(dt=>{dt!=null&&dt.isAbort||(t(13,M=!1),console.warn(dt),K(),fe.error(dt,(dt==null?void 0:dt.status)!=400))})}function K(){t(3,S=[]),t(12,T=1),t(4,$=0),t(5,C={})}function J(){f?X():G()}function X(){t(5,C={})}function G(){for(const Ae of S)t(5,C[Ae.id]=Ae,C);t(5,C)}function ue(Ae){C[Ae.id]?delete C[Ae.id]:t(5,C[Ae.id]=Ae,C),t(5,C)}function ee(){mn(`Do you really want to delete the selected ${u===1?"record":"records"}?`,te)}async function te(){if(E||!u||!(m!=null&&m.id))return;let Ae=[];for(const at of Object.keys(C))Ae.push(fe.collection(m.id).delete(at));return t(14,E=!0),Promise.all(Ae).then(()=>{jt(`Successfully deleted the selected ${u===1?"record":"records"}.`),X()}).catch(at=>{fe.error(at)}).finally(()=>(t(14,E=!1),q()))}function Ee(Ae){Ne.call(this,n,Ae)}const Fe=(Ae,at)=>{at.target.checked?z.removeByValue(P,Ae.id):z.pushUnique(P,Ae.id),t(6,P)},Ve=()=>J();function ze(Ae){_=Ae,t(0,_)}function Se(Ae){_=Ae,t(0,_)}function Me(Ae){_=Ae,t(0,_)}function Ze(Ae){_=Ae,t(0,_)}function bt(Ae){_=Ae,t(0,_)}function Ge(Ae){_=Ae,t(0,_)}function Ke(Ae){ne[Ae?"unshift":"push"](()=>{I=Ae,t(15,I)})}const $t=Ae=>ue(Ae),me=Ae=>g("select",Ae),ye=(Ae,at)=>{at.code==="Enter"&&(at.preventDefault(),g("select",Ae))},Je=()=>t(1,y=""),Oe=()=>g("new"),mt=()=>B(T+1),Ft=()=>X(),rn=()=>ee();return n.$$set=Ae=>{"collection"in Ae&&t(25,m=Ae.collection),"sort"in Ae&&t(0,_=Ae.sort),"filter"in Ae&&t(1,y=Ae.filter)},n.$$.update=()=>{n.$$.dirty[0]&33554432&&m!=null&&m.id&&(R(),K()),n.$$.dirty[0]&33554432&&t(11,i=(m==null?void 0:m.type)==="view"),n.$$.dirty[0]&33554432&&t(10,s=(m==null?void 0:m.type)==="auth"),n.$$.dirty[0]&33554432&&t(27,l=(m==null?void 0:m.schema)||[]),n.$$.dirty[0]&134217728&&(o=l.filter(Ae=>Ae.type==="relation")),n.$$.dirty[0]&134217792&&t(19,r=l.filter(Ae=>!P.includes(Ae.id))),n.$$.dirty[0]&33554435&&m!=null&&m.id&&_!==-1&&y!==-1&&B(1),n.$$.dirty[0]&24&&t(18,a=$>S.length),n.$$.dirty[0]&32&&t(7,u=Object.keys(C).length),n.$$.dirty[0]&136&&t(17,f=S.length&&u===S.length),n.$$.dirty[0]&64&&P!==-1&&N(),n.$$.dirty[0]&2056&&t(9,c=!i||S.length>0&&S[0].created!=""),n.$$.dirty[0]&2056&&t(8,d=!i||S.length>0&&S[0].updated!=""),n.$$.dirty[0]&134219520&&t(16,F=[].concat(s?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],l.map(Ae=>({id:Ae.id,name:Ae.name})),c?{id:"@created",name:"created"}:[],d?{id:"@updated",name:"updated"}:[]))},[_,y,B,S,$,C,P,u,d,c,s,i,T,M,E,I,F,f,a,r,g,J,X,ue,ee,m,q,l,Ee,Fe,Ve,ze,Se,Me,Ze,bt,Ge,Ke,$t,me,ye,Je,Oe,mt,Ft,rn]}class zE extends ve{constructor(e){super(),be(this,e,VE,jE,he,{collection:25,sort:0,filter:1,reloadLoadedPages:26,load:2},null,[-1,-1,-1])}get reloadLoadedPages(){return this.$$.ctx[26]}get load(){return this.$$.ctx[2]}}function BE(n){let e,t,i,s;return e=new EM({}),i=new Sn({props:{$$slots:{default:[YE]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&1527|o[1]&16&&(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){l&&k(t),H(e,l),H(i,l)}}}function UE(n){let e,t;return e=new Sn({props:{center:!0,$$slots:{default:[ZE]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1040|s[1]&16&&(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 WE(n){let e,t;return e=new Sn({props:{center:!0,$$slots:{default:[GE]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[1]&16&&(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 dm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Edit collection"),p(e,"class","btn btn-transparent btn-circle")},m(s,l){w(s,e,l),t||(i=[$e(He.call(null,e,{text:"Edit collection",position:"right"})),Y(e,"click",n[15])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ce(i)}}}function pm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' New record',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:x,d(s){s&&k(e),t=!1,i()}}}function YE(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M,E,D,I,P,F=!n[10]&&dm(n);c=new Yo({}),c.$on("refresh",n[16]);let N=n[2].type!=="view"&&pm(n);y=new Wo({props:{value:n[0],autocompleteCollection:n[2]}}),y.$on("submit",n[19]);function R(K){n[21](K)}function q(K){n[22](K)}let B={collection:n[2]};return n[0]!==void 0&&(B.filter=n[0]),n[1]!==void 0&&(B.sort=n[1]),C=new zE({props:B}),n[20](C),ne.push(()=>de(C,"filter",R)),ne.push(()=>de(C,"sort",q)),C.$on("select",n[23]),C.$on("new",n[24]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=O(),l=v("div"),r=U(o),a=O(),u=v("div"),F&&F.c(),f=O(),V(c.$$.fragment),d=O(),h=v("div"),g=v("button"),g.innerHTML=' API Preview',m=O(),N&&N.c(),_=O(),V(y.$$.fragment),S=O(),T=v("div"),$=O(),V(C.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(g,"type","button"),p(g,"class","btn btn-outline"),p(h,"class","btns-group"),p(e,"class","page-header"),p(T,"class","clearfix m-b-base")},m(K,J){w(K,e,J),b(e,t),b(t,i),b(t,s),b(t,l),b(l,r),b(e,a),b(e,u),F&&F.m(u,null),b(u,f),j(c,u,null),b(e,d),b(e,h),b(h,g),b(h,m),N&&N.m(h,null),w(K,_,J),j(y,K,J),w(K,S,J),w(K,T,J),w(K,$,J),j(C,K,J),D=!0,I||(P=Y(g,"click",n[17]),I=!0)},p(K,J){(!D||J[0]&4)&&o!==(o=K[2].name+"")&&se(r,o),K[10]?F&&(F.d(1),F=null):F?F.p(K,J):(F=dm(K),F.c(),F.m(u,f)),K[2].type!=="view"?N?N.p(K,J):(N=pm(K),N.c(),N.m(h,null)):N&&(N.d(1),N=null);const X={};J[0]&1&&(X.value=K[0]),J[0]&4&&(X.autocompleteCollection=K[2]),y.$set(X);const G={};J[0]&4&&(G.collection=K[2]),!M&&J[0]&1&&(M=!0,G.filter=K[0],_e(()=>M=!1)),!E&&J[0]&2&&(E=!0,G.sort=K[1],_e(()=>E=!1)),C.$set(G)},i(K){D||(A(c.$$.fragment,K),A(y.$$.fragment,K),A(C.$$.fragment,K),D=!0)},o(K){L(c.$$.fragment,K),L(y.$$.fragment,K),L(C.$$.fragment,K),D=!1},d(K){K&&(k(e),k(_),k(S),k(T),k($)),F&&F.d(),H(c),N&&N.d(),H(y,K),n[20](null),H(C,K),I=!1,P()}}}function KE(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=O(),i=v("button"),i.innerHTML=' Create new collection',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:x,d(o){o&&(k(e),k(t),k(i)),s=!1,l()}}}function JE(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:x,d(t){t&&k(e)}}}function ZE(n){let e,t,i;function s(r,a){return r[10]?JE:KE}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=O(),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 GE(n){let e;return{c(){e=v("div"),e.innerHTML='

    Loading collections...

    ',p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function XE(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[WE,UE,BE],h=[];function g(T,$){return T[3]&&!T[9].length?0:T[9].length?2:1}e=g(n),t=h[e]=d[e](n);let m={};s=new su({props:m}),n[25](s);let _={};o=new RM({props:_}),n[26](o);let y={collection:n[2]};a=new S1({props:y}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let S={collection:n[2]};return f=new gE({props:S}),n[30](f),{c(){t.c(),i=O(),V(s.$$.fragment),l=O(),V(o.$$.fragment),r=O(),V(a.$$.fragment),u=O(),V(f.$$.fragment)},m(T,$){h[e].m(T,$),w(T,i,$),j(s,T,$),w(T,l,$),j(o,T,$),w(T,r,$),j(a,T,$),w(T,u,$),j(f,T,$),c=!0},p(T,$){let C=e;e=g(T),e===C?h[e].p(T,$):(re(),L(h[C],1,1,()=>{h[C]=null}),ae(),t=h[e],t?t.p(T,$):(t=h[e]=d[e](T),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const E={};o.$set(E);const D={};$[0]&4&&(D.collection=T[2]),a.$set(D);const I={};$[0]&4&&(I.collection=T[2]),f.$set(I)},i(T){c||(A(t),A(s.$$.fragment,T),A(o.$$.fragment,T),A(a.$$.fragment,T),A(f.$$.fragment,T),c=!0)},o(T){L(t),L(s.$$.fragment,T),L(o.$$.fragment,T),L(a.$$.fragment,T),L(f.$$.fragment,T),c=!1},d(T){T&&(k(i),k(l),k(r),k(u)),h[e].d(T),n[25](null),H(s,T),n[26](null),H(o,T),n[27](null),H(a,T),n[30](null),H(f,T)}}}function QE(n,e,t){let i,s,l,o,r,a,u;Ye(n,$i,te=>t(2,s=te)),Ye(n,At,te=>t(31,l=te)),Ye(n,vo,te=>t(3,o=te)),Ye(n,va,te=>t(13,r=te)),Ye(n,ii,te=>t(9,a=te)),Ye(n,Ms,te=>t(10,u=te));const f=new URLSearchParams(r);let c,d,h,g,m,_=f.get("filter")||"",y=f.get("sort")||"-created",S=f.get("collectionId")||(s==null?void 0:s.id);function T(){t(11,S=s==null?void 0:s.id),t(0,_=""),t(1,y="-created"),$()}async function $(){if(!y)return;const te=z.getAllCollectionIdentifiers(s),Ee=y.split(",").map(Fe=>Fe.startsWith("+")||Fe.startsWith("-")?Fe.substring(1):Fe);Ee.filter(Fe=>te.includes(Fe)).length!=Ee.length&&(te.includes("created")?t(1,y="-created"):t(1,y=""))}Py(S);const C=()=>c==null?void 0:c.show(),M=()=>c==null?void 0:c.show(s),E=()=>m==null?void 0:m.load(),D=()=>d==null?void 0:d.show(s),I=()=>h==null?void 0:h.show(),P=te=>t(0,_=te.detail);function F(te){ne[te?"unshift":"push"](()=>{m=te,t(8,m)})}function N(te){_=te,t(0,_)}function R(te){y=te,t(1,y)}const q=te=>{s.type==="view"?g.show(te==null?void 0:te.detail):h==null||h.show(te==null?void 0:te.detail)},B=()=>h==null?void 0:h.show();function K(te){ne[te?"unshift":"push"](()=>{c=te,t(4,c)})}function J(te){ne[te?"unshift":"push"](()=>{d=te,t(5,d)})}function X(te){ne[te?"unshift":"push"](()=>{h=te,t(6,h)})}const G=()=>m==null?void 0:m.reloadLoadedPages(),ue=()=>m==null?void 0:m.reloadLoadedPages();function ee(te){ne[te?"unshift":"push"](()=>{g=te,t(7,g)})}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&&Ay(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&S!=s.id&&T(),n.$$.dirty[0]&4&&s!=null&&s.id&&$(),n.$$.dirty[0]&7&&(y||_||s!=null&&s.id)){const te=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:_,sort:y}).toString();Hi("/collections?"+te)}n.$$.dirty[0]&4&&sn(At,l=(s==null?void 0:s.name)||"Collections",l)},[_,y,s,o,c,d,h,g,m,a,u,S,i,r,C,M,E,D,I,P,F,N,R,q,B,K,J,X,G,ue,ee]}class xE extends ve{constructor(e){super(),be(this,e,QE,XE,he,{},null,[-1,-1])}}function eD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M,E,D,I,P,F;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=O(),l=v("a"),l.innerHTML=' Application',o=O(),r=v("a"),r.innerHTML=' Mail settings',a=O(),u=v("a"),u.innerHTML=' Files storage',f=O(),c=v("a"),c.innerHTML=' Backups',d=O(),h=v("div"),h.innerHTML='Sync',g=O(),m=v("a"),m.innerHTML=' Export collections',_=O(),y=v("a"),y.innerHTML=' Import collections',S=O(),T=v("div"),T.textContent="Authentication",$=O(),C=v("a"),C.innerHTML=' Auth providers',M=O(),E=v("a"),E.innerHTML=' Token options',D=O(),I=v("a"),I.innerHTML=' Admins',p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"href","/settings/backups"),p(c,"class","sidebar-list-item"),p(h,"class","sidebar-title"),p(m,"href","/settings/export-collections"),p(m,"class","sidebar-list-item"),p(y,"href","/settings/import-collections"),p(y,"class","sidebar-list-item"),p(T,"class","sidebar-title"),p(C,"href","/settings/auth-providers"),p(C,"class","sidebar-list-item"),p(E,"href","/settings/tokens"),p(E,"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(N,R){w(N,e,R),b(e,t),b(t,i),b(t,s),b(t,l),b(t,o),b(t,r),b(t,a),b(t,u),b(t,f),b(t,c),b(t,d),b(t,h),b(t,g),b(t,m),b(t,_),b(t,y),b(t,S),b(t,T),b(t,$),b(t,C),b(t,M),b(t,E),b(t,D),b(t,I),P||(F=[$e(zn.call(null,l,{path:"/settings"})),$e(un.call(null,l)),$e(zn.call(null,r,{path:"/settings/mail/?.*"})),$e(un.call(null,r)),$e(zn.call(null,u,{path:"/settings/storage/?.*"})),$e(un.call(null,u)),$e(zn.call(null,c,{path:"/settings/backups/?.*"})),$e(un.call(null,c)),$e(zn.call(null,m,{path:"/settings/export-collections/?.*"})),$e(un.call(null,m)),$e(zn.call(null,y,{path:"/settings/import-collections/?.*"})),$e(un.call(null,y)),$e(zn.call(null,C,{path:"/settings/auth-providers/?.*"})),$e(un.call(null,C)),$e(zn.call(null,E,{path:"/settings/tokens/?.*"})),$e(un.call(null,E)),$e(zn.call(null,I,{path:"/settings/admins/?.*"})),$e(un.call(null,I))],P=!0)},p:x,i:x,o:x,d(N){N&&k(e),P=!1,Ce(F)}}}class Oi extends ve{constructor(e){super(),be(this,e,null,eD,he,{})}}function hm(n,e,t){const i=n.slice();return i[31]=e[t],i}function mm(n){let e,t;return e=new ce({props:{class:"form-field readonly",name:"id",$$slots:{default:[tD,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function tD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",o=O(),r=v("div"),a=v("i"),f=O(),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=h=n[1].id,c.readOnly=!0},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),w(_,r,y),b(r,a),w(_,f,y),w(_,c,y),g||(m=$e(u=He.call(null,a,{text:`Created: ${n[1].created} +Updated: ${n[1].updated}`,position:"left"})),g=!0)},p(_,y){y[0]&1073741824&&l!==(l=_[30])&&p(e,"for",l),u&&It(u.update)&&y[0]&2&&u.update.call(null,{text:`Created: ${_[1].created} +Updated: ${_[1].updated}`,position:"left"}),y[0]&1073741824&&d!==(d=_[30])&&p(c,"id",d),y[0]&2&&h!==(h=_[1].id)&&c.value!==h&&(c.value=h)},d(_){_&&(k(e),k(o),k(r),k(f),k(c)),g=!1,m()}}}function gm(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=O(),_n(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(u,f){w(u,e,f),b(e,t),b(e,s),o||(r=Y(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&k(e),o=!1,r()}}}function nD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),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),oe(r,n[3]),u||(f=Y(r,"input",n[19]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&oe(r,c[3])},d(c){c&&(k(e),k(o),k(r)),u=!1,f()}}}function _m(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",$$slots:{default:[iD,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function iD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[30]),p(s,"for",o=n[30])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[20]),r=!0)},p(u,f){f[0]&1073741824&&t!==(t=u[30])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&1073741824&&o!==(o=u[30])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function bm(n){let e,t,i,s,l,o,r,a,u;return s=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[sD,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[lD,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),V(s.$$.fragment),l=O(),o=v("div"),V(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){w(f,e,c),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),u=!0},p(f,c){const d={};c[0]&1073742336|c[1]&8&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&1073742848|c[1]&8&&(h.$$scope={dirty:c,ctx:f}),r.$set(h)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&Xe(()=>{u&&(a||(a=qe(t,nt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){L(s.$$.fragment,f),L(r.$$.fragment,f),f&&(a||(a=qe(t,nt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),H(s),H(r),f&&a&&a.end()}}}function sD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g;return c=new k1({}),{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),u=O(),f=v("div"),V(c.$$.fragment),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,p(f,"class","form-field-addon")},m(m,_){w(m,e,_),b(e,t),b(e,i),b(e,s),w(m,o,_),w(m,r,_),oe(r,n[9]),w(m,u,_),w(m,f,_),j(c,f,null),d=!0,h||(g=Y(r,"input",n[21]),h=!0)},p(m,_){(!d||_[0]&1073741824&&l!==(l=m[30]))&&p(e,"for",l),(!d||_[0]&1073741824&&a!==(a=m[30]))&&p(r,"id",a),_[0]&512&&r.value!==m[9]&&oe(r,m[9])},i(m){d||(A(c.$$.fragment,m),d=!0)},o(m){L(c.$$.fragment,m),d=!1},d(m){m&&(k(e),k(o),k(r),k(u),k(f)),H(c),h=!1,g()}}}function lD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),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),oe(r,n[10]),u||(f=Y(r,"input",n[22]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&1024&&r.value!==c[10]&&oe(r,c[10])},d(c){c&&(k(e),k(o),k(r)),u=!1,f()}}}function oD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g=!n[5]&&mm(n),m=pe([0,1,2,3,4,5,6,7,8,9]),_=[];for(let T=0;T<10;T+=1)_[T]=gm(hm(n,m,T));a=new ce({props:{class:"form-field required",name:"email",$$slots:{default:[nD,({uniqueId:T})=>({30:T}),({uniqueId:T})=>[T?1073741824:0]]},$$scope:{ctx:n}}});let y=!n[5]&&_m(n),S=(n[5]||n[4])&&bm(n);return{c(){e=v("form"),g&&g.c(),t=O(),i=v("div"),s=v("p"),s.textContent="Avatar",l=O(),o=v("div");for(let T=0;T<10;T+=1)_[T].c();r=O(),V(a.$$.fragment),u=O(),y&&y.c(),f=O(),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(T,$){w(T,e,$),g&&g.m(e,null),b(e,t),b(e,i),b(i,s),b(i,l),b(i,o);for(let C=0;C<10;C+=1)_[C]&&_[C].m(o,null);b(e,r),j(a,e,null),b(e,u),y&&y.m(e,null),b(e,f),S&&S.m(e,null),c=!0,d||(h=Y(e,"submit",Qe(n[13])),d=!0)},p(T,$){if(T[5]?g&&(re(),L(g,1,1,()=>{g=null}),ae()):g?(g.p(T,$),$[0]&32&&A(g,1)):(g=mm(T),g.c(),A(g,1),g.m(e,t)),$[0]&4){m=pe([0,1,2,3,4,5,6,7,8,9]);let M;for(M=0;M<10;M+=1){const E=hm(T,m,M);_[M]?_[M].p(E,$):(_[M]=gm(E),_[M].c(),_[M].m(o,null))}for(;M<10;M+=1)_[M].d(1)}const C={};$[0]&1073741832|$[1]&8&&(C.$$scope={dirty:$,ctx:T}),a.$set(C),T[5]?y&&(re(),L(y,1,1,()=>{y=null}),ae()):y?(y.p(T,$),$[0]&32&&A(y,1)):(y=_m(T),y.c(),A(y,1),y.m(e,f)),T[5]||T[4]?S?(S.p(T,$),$[0]&48&&A(S,1)):(S=bm(T),S.c(),A(S,1),S.m(e,null)):S&&(re(),L(S,1,1,()=>{S=null}),ae())},i(T){c||(A(g),A(a.$$.fragment,T),A(y),A(S),c=!0)},o(T){L(g),L(a.$$.fragment,T),L(y),L(S),c=!1},d(T){T&&k(e),g&&g.d(),_t(_,T),H(a),y&&y.d(),S&&S.d(),d=!1,h()}}}function rD(n){let e,t=n[5]?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=U(t)},m(s,l){w(s,e,l),b(e,i)},p(s,l){l[0]&32&&t!==(t=s[5]?"New admin":"Edit admin")&&se(i,t)},d(s){s&&k(e)}}}function vm(n){let e,t,i,s,l,o,r,a,u;return o=new Rn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[aD]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=O(),s=v("i"),l=O(),V(o.$$.fragment),r=O(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"aria-label","More"),p(e,"class","btn btn-sm btn-circle btn-transparent"),p(a,"class","flex-fill")},m(f,c){w(f,e,c),b(e,t),b(e,i),b(e,s),b(e,l),j(o,e,null),w(f,r,c),w(f,a,c),u=!0},p(f,c){const d={};c[1]&8&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){L(o.$$.fragment,f),u=!1},d(f){f&&(k(e),k(r),k(a)),H(o)}}}function aD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' Delete',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:x,d(s){s&&k(e),t=!1,i()}}}function uD(n){let e,t,i,s,l,o,r=n[5]?"Create":"Save changes",a,u,f,c,d,h=!n[5]&&vm(n);return{c(){h&&h.c(),e=O(),t=v("button"),i=v("span"),i.textContent="Cancel",s=O(),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=u=!n[11]||n[7],Q(l,"btn-loading",n[7])},m(g,m){h&&h.m(g,m),w(g,e,m),w(g,t,m),b(t,i),w(g,s,m),w(g,l,m),b(l,o),b(o,a),f=!0,c||(d=Y(t,"click",n[17]),c=!0)},p(g,m){g[5]?h&&(re(),L(h,1,1,()=>{h=null}),ae()):h?(h.p(g,m),m[0]&32&&A(h,1)):(h=vm(g),h.c(),A(h,1),h.m(e.parentNode,e)),(!f||m[0]&128)&&(t.disabled=g[7]),(!f||m[0]&32)&&r!==(r=g[5]?"Create":"Save changes")&&se(a,r),(!f||m[0]&2176&&u!==(u=!g[11]||g[7]))&&(l.disabled=u),(!f||m[0]&128)&&Q(l,"btn-loading",g[7])},i(g){f||(A(h),f=!0)},o(g){L(h),f=!1},d(g){g&&(k(e),k(t),k(s),k(l)),h&&h.d(g),c=!1,d()}}}function fD(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[uD],header:[rD],default:[oD]},$$scope:{ctx:n}};return e=new on({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&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 cD(n,e,t){let i,s;const l=wt(),o="admin_"+z.randomString(5);let r,a={},u=!1,f=!1,c=0,d="",h="",g="",m=!1;function _(J){return S(J),t(8,f=!0),r==null?void 0:r.show()}function y(){return r==null?void 0:r.hide()}function S(J){t(1,a=structuredClone(J||{})),T()}function T(){t(4,m=!1),t(3,d=(a==null?void 0:a.email)||""),t(2,c=(a==null?void 0:a.avatar)||0),t(9,h=""),t(10,g=""),tn({})}function $(){if(u||!s)return;t(7,u=!0);const J={email:d,avatar:c};(i||m)&&(J.password=h,J.passwordConfirm=g);let X;i?X=fe.admins.create(J):X=fe.admins.update(a.id,J),X.then(async G=>{var ue;t(8,f=!1),y(),jt(i?"Successfully created admin.":"Successfully updated admin."),((ue=fe.authStore.model)==null?void 0:ue.id)===G.id&&fe.authStore.save(fe.authStore.token,G),l("save",G)}).catch(G=>{fe.error(G)}).finally(()=>{t(7,u=!1)})}function C(){a!=null&&a.id&&mn("Do you really want to delete the selected admin?",()=>fe.admins.delete(a.id).then(()=>{t(8,f=!1),y(),jt("Successfully deleted admin."),l("delete",a)}).catch(J=>{fe.error(J)}))}const M=()=>C(),E=()=>y(),D=J=>t(2,c=J);function I(){d=this.value,t(3,d)}function P(){m=this.checked,t(4,m)}function F(){h=this.value,t(9,h)}function N(){g=this.value,t(10,g)}const R=()=>s&&f?(mn("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,f=!1),y()}),!1):!0;function q(J){ne[J?"unshift":"push"](()=>{r=J,t(6,r)})}function B(J){Ne.call(this,n,J)}function K(J){Ne.call(this,n,J)}return n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(a!=null&&a.id)),n.$$.dirty[0]&62&&t(11,s=i&&d!=""||m||d!==a.email||c!==a.avatar)},[y,a,c,d,m,i,r,u,f,h,g,s,o,$,C,_,M,E,D,I,P,F,N,R,q,B,K]}class dD extends ve{constructor(e){super(),be(this,e,cD,fD,he,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function ym(n,e,t){const i=n.slice();return i[24]=e[t],i}function pD(n){let e;return{c(){e=v("div"),e.innerHTML=` id`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function hD(n){let e;return{c(){e=v("div"),e.innerHTML=` email`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function mD(n){let e;return{c(){e=v("div"),e.innerHTML=` created`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function gD(n){let e;return{c(){e=v("div"),e.innerHTML=` updated`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function km(n){let e;function t(l,o){return l[5]?bD:_D}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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){l&&k(e),s.d(l)}}}function _D(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&wm(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=wm(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function bD(n){let e;return{c(){e=v("tr"),e.innerHTML=' '},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function wm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[17]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Sm(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 $m(n,e){let t,i,s,l,o,r,a,u,f,c,d,h=e[24].id+"",g,m,_,y,S,T=e[24].email+"",$,C,M,E,D,I,P,F,N,R,q,B,K,J;f=new qs({props:{value:e[24].id}});let X=e[24].id===e[7].id&&Sm();D=new Ti({props:{date:e[24].created}}),F=new Ti({props:{date:e[24].updated}});function G(){return e[15](e[24])}function ue(...ee){return e[16](e[24],...ee)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=O(),a=v("td"),u=v("div"),V(f.$$.fragment),c=O(),d=v("span"),g=U(h),m=O(),X&&X.c(),_=O(),y=v("td"),S=v("span"),$=U(T),M=O(),E=v("td"),V(D.$$.fragment),I=O(),P=v("td"),V(F.$$.fragment),N=O(),R=v("td"),R.innerHTML='',q=O(),_n(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(d,"class","txt"),p(u,"class","label"),p(a,"class","col-type-text col-field-id"),p(S,"class","txt txt-ellipsis"),p(S,"title",C=e[24].email),p(y,"class","col-type-email col-field-email"),p(E,"class","col-type-date col-field-created"),p(P,"class","col-type-date col-field-updated"),p(R,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ee,te){w(ee,t,te),b(t,i),b(i,s),b(s,l),b(t,r),b(t,a),b(a,u),j(f,u,null),b(u,c),b(u,d),b(d,g),b(a,m),X&&X.m(a,null),b(t,_),b(t,y),b(y,S),b(S,$),b(t,M),b(t,E),j(D,E,null),b(t,I),b(t,P),j(F,P,null),b(t,N),b(t,R),b(t,q),B=!0,K||(J=[Y(t,"click",G),Y(t,"keydown",ue)],K=!0)},p(ee,te){e=ee,(!B||te&16&&!_n(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const Ee={};te&16&&(Ee.value=e[24].id),f.$set(Ee),(!B||te&16)&&h!==(h=e[24].id+"")&&se(g,h),e[24].id===e[7].id?X||(X=Sm(),X.c(),X.m(a,null)):X&&(X.d(1),X=null),(!B||te&16)&&T!==(T=e[24].email+"")&&se($,T),(!B||te&16&&C!==(C=e[24].email))&&p(S,"title",C);const Fe={};te&16&&(Fe.date=e[24].created),D.$set(Fe);const Ve={};te&16&&(Ve.date=e[24].updated),F.$set(Ve)},i(ee){B||(A(f.$$.fragment,ee),A(D.$$.fragment,ee),A(F.$$.fragment,ee),B=!0)},o(ee){L(f.$$.fragment,ee),L(D.$$.fragment,ee),L(F.$$.fragment,ee),B=!1},d(ee){ee&&k(t),H(f),X&&X.d(),H(D),H(F),K=!1,Ce(J)}}}function vD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C=[],M=new Map,E;function D(G){n[11](G)}let I={class:"col-type-text",name:"id",$$slots:{default:[pD]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new cn({props:I}),ne.push(()=>de(o,"sort",D));function P(G){n[12](G)}let F={class:"col-type-email col-field-email",name:"email",$$slots:{default:[hD]},$$scope:{ctx:n}};n[2]!==void 0&&(F.sort=n[2]),u=new cn({props:F}),ne.push(()=>de(u,"sort",P));function N(G){n[13](G)}let R={class:"col-type-date col-field-created",name:"created",$$slots:{default:[mD]},$$scope:{ctx:n}};n[2]!==void 0&&(R.sort=n[2]),d=new cn({props:R}),ne.push(()=>de(d,"sort",N));function q(G){n[14](G)}let B={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[gD]},$$scope:{ctx:n}};n[2]!==void 0&&(B.sort=n[2]),m=new cn({props:B}),ne.push(()=>de(m,"sort",q));let K=pe(n[4]);const J=G=>G[24].id;for(let G=0;Gr=!1)),o.$set(ee);const te={};ue&134217728&&(te.$$scope={dirty:ue,ctx:G}),!f&&ue&4&&(f=!0,te.sort=G[2],_e(()=>f=!1)),u.$set(te);const Ee={};ue&134217728&&(Ee.$$scope={dirty:ue,ctx:G}),!h&&ue&4&&(h=!0,Ee.sort=G[2],_e(()=>h=!1)),d.$set(Ee);const Fe={};ue&134217728&&(Fe.$$scope={dirty:ue,ctx:G}),!_&&ue&4&&(_=!0,Fe.sort=G[2],_e(()=>_=!1)),m.$set(Fe),ue&186&&(K=pe(G[4]),re(),C=yt(C,ue,J,1,G,K,M,$,Ut,$m,null,ym),ae(),!K.length&&X?X.p(G,ue):K.length?X&&(X.d(1),X=null):(X=km(G),X.c(),X.m($,null))),(!E||ue&32)&&Q(e,"table-loading",G[5])},i(G){if(!E){A(o.$$.fragment,G),A(u.$$.fragment,G),A(d.$$.fragment,G),A(m.$$.fragment,G);for(let ue=0;ue New admin',g=O(),V(m.$$.fragment),_=O(),y=v("div"),S=O(),V(T.$$.fragment),$=O(),I&&I.c(),C=ke(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(h,"type","button"),p(h,"class","btn btn-expanded"),p(d,"class","btns-group"),p(e,"class","page-header"),p(y,"class","clearfix m-b-base")},m(P,F){w(P,e,F),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(e,r),j(a,e,null),b(e,u),b(e,f),b(e,c),b(e,d),b(d,h),w(P,g,F),j(m,P,F),w(P,_,F),w(P,y,F),w(P,S,F),j(T,P,F),w(P,$,F),I&&I.m(P,F),w(P,C,F),M=!0,E||(D=Y(h,"click",n[9]),E=!0)},p(P,F){(!M||F&64)&&se(o,P[6]);const N={};F&2&&(N.value=P[1]),m.$set(N);const R={};F&134217918&&(R.$$scope={dirty:F,ctx:P}),T.$set(R),P[4].length?I?I.p(P,F):(I=Tm(P),I.c(),I.m(C.parentNode,C)):I&&(I.d(1),I=null)},i(P){M||(A(a.$$.fragment,P),A(m.$$.fragment,P),A(T.$$.fragment,P),M=!0)},o(P){L(a.$$.fragment,P),L(m.$$.fragment,P),L(T.$$.fragment,P),M=!1},d(P){P&&(k(e),k(g),k(_),k(y),k(S),k($),k(C)),H(a),H(m,P),H(T,P),I&&I.d(P),E=!1,D()}}}function kD(n){let e,t,i,s,l,o;e=new Oi({}),i=new Sn({props:{$$slots:{default:[yD]},$$scope:{ctx:n}}});let r={};return l=new dD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment),s=O(),V(l.$$.fragment)},m(a,u){j(e,a,u),w(a,t,u),j(i,a,u),w(a,s,u),j(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){a&&(k(t),k(s)),H(e,a),H(i,a),n[18](null),H(l,a)}}}function wD(n,e,t){let i,s,l;Ye(n,va,F=>t(21,i=F)),Ye(n,At,F=>t(6,s=F)),Ye(n,Aa,F=>t(7,l=F)),sn(At,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){t(5,u=!0),t(4,a=[]);const F=z.normalizeSearchFilter(f,["id","email","created","updated"]);return fe.admins.getFullList(100,{sort:c||"-created",filter:F}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),h(),fe.error(N,(N==null?void 0:N.status)!=400))})}function h(){t(4,a=[])}const g=()=>d(),m=()=>r==null?void 0:r.show(),_=F=>t(1,f=F.detail);function y(F){c=F,t(2,c)}function S(F){c=F,t(2,c)}function T(F){c=F,t(2,c)}function $(F){c=F,t(2,c)}const C=F=>r==null?void 0:r.show(F),M=(F,N)=>{(N.code==="Enter"||N.code==="Space")&&(N.preventDefault(),r==null||r.show(F))},E=()=>t(1,f="");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&&f!==-1){const F=new URLSearchParams({filter:f,sort:c}).toString();Hi("/settings/admins?"+F),d()}},[d,f,c,r,a,u,s,l,g,m,_,y,S,T,$,C,M,E,D,I,P]}class SD extends ve{constructor(e){super(),be(this,e,wD,kD,he,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function $D(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=O(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0]),l.focus(),r||(a=Y(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&oe(l,u[0])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function TD(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Password"),s=O(),l=v("input"),r=O(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,h){w(d,e,h),b(e,t),w(d,s,h),w(d,l,h),oe(l,n[1]),w(d,r,h),w(d,a,h),b(a,u),f||(c=[Y(l,"input",n[5]),$e(un.call(null,u))],f=!0)},p(d,h){h&256&&i!==(i=d[8])&&p(e,"for",i),h&256&&o!==(o=d[8])&&p(l,"id",o),h&2&&l.value!==d[1]&&oe(l,d[1])},d(d){d&&(k(e),k(s),k(l),k(r),k(a)),f=!1,Ce(c)}}}function CD(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new ce({props:{class:"form-field required",name:"identity",$$slots:{default:[$D,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[TD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=O(),V(s.$$.fragment),l=O(),V(o.$$.fragment),r=O(),a=v("button"),a.innerHTML='Login ',p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),Q(a,"btn-disabled",n[2]),Q(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){w(d,e,h),b(e,t),b(e,i),j(s,e,null),b(e,l),j(o,e,null),b(e,r),b(e,a),u=!0,f||(c=Y(e,"submit",Qe(n[3])),f=!0)},p(d,h){const g={};h&769&&(g.$$scope={dirty:h,ctx:d}),s.$set(g);const m={};h&770&&(m.$$scope={dirty:h,ctx:d}),o.$set(m),(!u||h&4)&&Q(a,"btn-disabled",d[2]),(!u||h&4)&&Q(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){L(s.$$.fragment,d),L(o.$$.fragment,d),u=!1},d(d){d&&k(e),H(s),H(o),f=!1,c()}}}function MD(n){let e,t;return e=new hb({props:{$$slots:{default:[CD]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function OD(n,e,t){let i;Ye(n,va,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),fe.admins.authWithPassword(l,o).then(()=>{Ea(),Hi("/")}).catch(()=>{ls("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class ED extends ve{constructor(e){super(),be(this,e,OD,MD,he,{})}}function DD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C;i=new ce({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[ID,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[LD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),a=new ce({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[PD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),f=new ce({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[FD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&Cm(n);return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),r=O(),V(a.$$.fragment),u=O(),V(f.$$.fragment),c=O(),d=v("div"),h=v("div"),g=O(),M&&M.c(),m=O(),_=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(h,"class","flex-fill"),p(y,"class","txt"),p(_,"type","submit"),p(_,"class","btn btn-expanded"),_.disabled=S=!n[3]||n[2],Q(_,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(E,D){w(E,e,D),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),j(a,e,null),b(e,u),j(f,e,null),b(e,c),b(e,d),b(d,h),b(d,g),M&&M.m(d,null),b(d,m),b(d,_),b(_,y),T=!0,$||(C=Y(_,"click",n[13]),$=!0)},p(E,D){const I={};D&1572865&&(I.$$scope={dirty:D,ctx:E}),i.$set(I);const P={};D&1572865&&(P.$$scope={dirty:D,ctx:E}),o.$set(P);const F={};D&1572865&&(F.$$scope={dirty:D,ctx:E}),a.$set(F);const N={};D&1572865&&(N.$$scope={dirty:D,ctx:E}),f.$set(N),E[3]?M?M.p(E,D):(M=Cm(E),M.c(),M.m(d,m)):M&&(M.d(1),M=null),(!T||D&12&&S!==(S=!E[3]||E[2]))&&(_.disabled=S),(!T||D&4)&&Q(_,"btn-loading",E[2])},i(E){T||(A(i.$$.fragment,E),A(o.$$.fragment,E),A(a.$$.fragment,E),A(f.$$.fragment,E),T=!0)},o(E){L(i.$$.fragment,E),L(o.$$.fragment,E),L(a.$$.fragment,E),L(f.$$.fragment,E),T=!1},d(E){E&&k(e),H(i),H(o),H(a),H(f),M&&M.d(),$=!1,C()}}}function AD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function ID(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Application name"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].meta.appName),r||(a=Y(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&oe(l,u[0].meta.appName)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function LD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Application URL"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].meta.appUrl),r||(a=Y(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&oe(l,u[0].meta.appUrl)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function PD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Logs max days retention"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].logs.maxDays),r||(a=Y(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].logs.maxDays&&oe(l,u[0].logs.maxDays)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function FD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){w(c,e,d),e.checked=n[0].meta.hideControls,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[11]),$e(He.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,Ce(f)}}}function Cm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){w(l,e,o),b(e,t),i||(s=Y(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&k(e),i=!1,s()}}}function ND(n){let e,t,i,s,l,o,r,a,u;const f=[AD,DD],c=[];function d(h,g){return h[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML='',t=O(),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(h,g){w(h,e,g),w(h,t,g),w(h,i,g),b(i,s),c[l].m(s,null),r=!0,a||(u=Y(s,"submit",Qe(n[4])),a=!0)},p(h,g){let m=l;l=d(h),l===m?c[l].p(h,g):(re(),L(c[m],1,1,()=>{c[m]=null}),ae(),o=c[l],o?o.p(h,g):(o=c[l]=f[l](h),o.c()),A(o,1),o.m(s,null))},i(h){r||(A(o),r=!0)},o(h){L(o),r=!1},d(h){h&&(k(e),k(t),k(i)),c[l].d(),a=!1,u()}}}function RD(n){let e,t,i,s;return e=new Oi({}),i=new Sn({props:{$$slots:{default:[ND]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){l&&k(t),H(e,l),H(i,l)}}}function qD(n,e,t){let i,s,l,o;Ye(n,Ms,M=>t(14,s=M)),Ye(n,ko,M=>t(15,l=M)),Ye(n,At,M=>t(16,o=M)),sn(At,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const M=await fe.settings.getAll()||{};g(M)}catch(M){fe.error(M)}t(1,u=!1)}async function h(){if(!(f||!i)){t(2,f=!0);try{const M=await fe.settings.update(z.filterRedactedProps(a));g(M),jt("Successfully saved application settings.")}catch(M){fe.error(M)}t(2,f=!1)}}function g(M={}){var E,D;sn(ko,l=(E=M==null?void 0:M.meta)==null?void 0:E.appName,l),sn(Ms,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 m(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function _(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function S(){a.logs.maxDays=ht(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const $=()=>m(),C=()=>h();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,h,m,r,c,_,y,S,T,$,C]}class jD extends ve{constructor(e){super(),be(this,e,qD,RD,he,{})}}function HD(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=O(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),ci(s,a)},m(u,f){w(u,e,f),b(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(o=[$e(He.call(null,t,{position:"left",text:"Set new value"})),Y(t,"click",n[6])],l=!0)},p(u,f){ci(s,a=kt(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&(k(e),k(i),k(s)),l=!1,Ce(o)}}}function zD(n){let e;function t(l,o){return l[3]?VD:HD}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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:x,o:x,d(l){l&&k(e),s.d(l)}}}function BD(n,e,t){const i=["value","mask"];let s=xe(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await ln(),r==null||r.focus()}const f=()=>u();function c(h){ne[h?"unshift":"push"](()=>{r=h,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(5,s=xe(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,o=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&t(3,a=l===o)},[l,o,r,a,u,s,f,c,d]}class ru extends ve{constructor(e){super(),be(this,e,BD,zD,he,{value:0,mask:1})}}function UD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m;return{c(){e=v("label"),t=U("Subject"),s=O(),l=v("input"),r=O(),a=v("div"),u=U(`Available placeholder parameters: + `),f=v("button"),f.textContent="{APP_NAME} ",c=U(`, + `),d=v("button"),d.textContent="{APP_URL} ",h=U("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(_,y){w(_,e,y),b(e,t),w(_,s,y),w(_,l,y),oe(l,n[0].subject),w(_,r,y),w(_,a,y),b(a,u),b(a,f),b(a,c),b(a,d),b(a,h),g||(m=[Y(l,"input",n[13]),Y(f,"click",n[14]),Y(d,"click",n[15])],g=!0)},p(_,y){y[1]&1&&i!==(i=_[31])&&p(e,"for",i),y[1]&1&&o!==(o=_[31])&&p(l,"id",o),y[0]&1&&l.value!==_[0].subject&&oe(l,_[0].subject)},d(_){_&&(k(e),k(s),k(l),k(r),k(a)),g=!1,Ce(m)}}}function WD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y;return{c(){e=v("label"),t=U("Action URL"),s=O(),l=v("input"),r=O(),a=v("div"),u=U(`Available placeholder parameters: + `),f=v("button"),f.textContent="{APP_NAME} ",c=U(`, + `),d=v("button"),d.textContent="{APP_URL} ",h=U(`, + `),g=v("button"),g.textContent="{TOKEN} ",m=U("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(g,"type","button"),p(g,"class","label label-sm link-primary txt-mono"),p(g,"title","Required parameter"),p(a,"class","help-block")},m(S,T){w(S,e,T),b(e,t),w(S,s,T),w(S,l,T),oe(l,n[0].actionUrl),w(S,r,T),w(S,a,T),b(a,u),b(a,f),b(a,c),b(a,d),b(a,h),b(a,g),b(a,m),_||(y=[Y(l,"input",n[16]),Y(f,"click",n[17]),Y(d,"click",n[18]),Y(g,"click",n[19])],_=!0)},p(S,T){T[1]&1&&i!==(i=S[31])&&p(e,"for",i),T[1]&1&&o!==(o=S[31])&&p(l,"id",o),T[0]&1&&l.value!==S[0].actionUrl&&oe(l,S[0].actionUrl)},d(S){S&&(k(e),k(s),k(l),k(r),k(a)),_=!1,Ce(y)}}}function YD(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){w(l,e,o),oe(e,n[0].body),i||(s=Y(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&oe(e,l[0].body)},i:x,o:x,d(l){l&&k(e),i=!1,s()}}}function KD(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a,u){let f={id:a[31],language:"html"};return a[0].body!==void 0&&(f.value=a[0].body),{props:f}}return o&&(e=Dt(o,r(n)),ne.push(()=>de(e,"value",l))),{c(){e&&V(e.$$.fragment),i=ke()},m(a,u){e&&j(e,a,u),w(a,i,u),s=!0},p(a,u){if(u[0]&16&&o!==(o=a[4])){if(e){re();const f=e;L(f.$$.fragment,1,0,()=>{H(f,1)}),ae()}o?(e=Dt(o,r(a)),ne.push(()=>de(e,"value",l)),V(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else if(o){const f={};u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,_e(()=>t=!1)),e.$set(f)}},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 JD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$;const C=[KD,YD],M=[];function E(D,I){return D[4]&&!D[5]?0:1}return l=E(n),o=M[l]=C[l](n),{c(){e=v("label"),t=U("Body (HTML)"),s=O(),o.c(),r=O(),a=v("div"),u=U(`Available placeholder parameters: + `),f=v("button"),f.textContent="{APP_NAME} ",c=U(`, + `),d=v("button"),d.textContent="{APP_URL} ",h=U(`, + `),g=v("button"),g.textContent="{TOKEN} ",m=U(`, + `),_=v("button"),_.textContent="{ACTION_URL} ",y=U("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(g,"type","button"),p(g,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(_,"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,u),b(a,f),b(a,c),b(a,d),b(a,h),b(a,g),b(a,m),b(a,_),b(a,y),S=!0,T||($=[Y(f,"click",n[22]),Y(d,"click",n[23]),Y(g,"click",n[24]),Y(_,"click",n[25])],T=!0)},p(D,I){(!S||I[1]&1&&i!==(i=D[31]))&&p(e,"for",i);let P=l;l=E(D),l===P?M[l].p(D,I):(re(),L(M[P],1,1,()=>{M[P]=null}),ae(),o=M[l],o?o.p(D,I):(o=M[l]=C[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),k(s),k(r),k(a)),M[l].d(D),T=!1,Ce($)}}}function ZD(n){let e,t,i,s,l,o;return e=new ce({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[UD,({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:[WD,({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:[JD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment),s=O(),V(l.$$.fragment)},m(r,a){j(e,r,a),w(r,t,a),j(i,r,a),w(r,s,a),j(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){L(e.$$.fragment,r),L(i.$$.fragment,r),L(l.$$.fragment,r),o=!1},d(r){r&&(k(t),k(s)),H(e,r),H(i,r),H(l,r)}}}function Mm(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=$e(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Xe(()=>{i&&(t||(t=qe(e,Jt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=qe(e,Jt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function GD(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Mm();return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),l=U(n[2]),o=O(),r=v("div"),a=O(),f&&f.c(),u=ke(),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),f&&f.m(c,d),w(c,u,d)},p(c,d){d[0]&4&&se(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Mm(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(o),k(r),k(a),k(u)),f&&f.d(c)}}}function XD(n){let e,t;const i=[n[8]];let s={$$slots:{header:[GD],default:[ZD]},$$scope:{ctx:n}};for(let l=0;lt(12,o=G));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Om,d=!1;function h(){f==null||f.expand()}function g(){f==null||f.collapse()}function m(){f==null||f.collapseSiblings()}async function _(){c||d||(t(5,d=!0),t(4,c=(await ot(()=>import("./CodeEditor-d578f3b8.js"),["./CodeEditor-d578f3b8.js","./index-4841d67b.js"],import.meta.url)).default),Om=c,t(5,d=!1))}function y(G){z.copyToClipboard(G),bo(`Copied ${G} to clipboard`,2e3)}_();function S(){u.subject=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),$=()=>y("{APP_URL}");function C(){u.actionUrl=this.value,t(0,u)}const M=()=>y("{APP_NAME}"),E=()=>y("{APP_URL}"),D=()=>y("{TOKEN}");function I(G){n.$$.not_equal(u.body,G)&&(u.body=G,t(0,u))}function P(){u.body=this.value,t(0,u)}const F=()=>y("{APP_NAME}"),N=()=>y("{APP_URL}"),R=()=>y("{TOKEN}"),q=()=>y("{ACTION_URL}");function B(G){ne[G?"unshift":"push"](()=>{f=G,t(3,f)})}function K(G){Ne.call(this,n,G)}function J(G){Ne.call(this,n,G)}function X(G){Ne.call(this,n,G)}return n.$$set=G=>{e=je(je({},e),xt(G)),t(8,l=xe(e,s)),"key"in G&&t(1,r=G.key),"title"in G&&t(2,a=G.title),"config"in G&&t(0,u=G.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!z.isEmpty(z.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||di(r))},[u,r,a,f,c,d,i,y,l,h,g,m,o,S,T,$,C,M,E,D,I,P,F,N,R,q,B,K,J,X]}class Fr extends ve{constructor(e){super(),be(this,e,QD,XD,he,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Em(n,e,t){const i=n.slice();return i[21]=e[t],i}function Dm(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,c,d,h;return c=W1(e[11][0]),{key:n,first:null,c(){t=v("div"),i=v("input"),l=O(),o=v("label"),a=U(r),f=O(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,oe(i,i.__value),p(o,"for",u=e[20]+e[21].value),p(t,"class","form-field-block"),c.p(i),this.first=t},m(g,m){w(g,t,m),b(t,i),i.checked=i.__value===e[2],b(t,l),b(t,o),b(o,a),b(t,f),d||(h=Y(i,"change",e[10]),d=!0)},p(g,m){e=g,m&1048576&&s!==(s=e[20]+e[21].value)&&p(i,"id",s),m&4&&(i.checked=i.__value===e[2]),m&1048576&&u!==(u=e[20]+e[21].value)&&p(o,"for",u)},d(g){g&&k(t),c.r(),d=!1,h()}}}function xD(n){let e=[],t=new Map,i,s=pe(n[7]);const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new ce({props:{class:"form-field required m-0",name:"email",$$slots:{default:[eA,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),V(t.$$.fragment),i=O(),V(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){w(a,e,u),j(t,e,null),b(e,i),j(s,e,null),l=!0,o||(r=Y(e,"submit",Qe(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&17825794&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){L(t.$$.fragment,a),L(s.$$.fragment,a),l=!1},d(a){a&&k(e),H(t),H(s),o=!1,r()}}}function nA(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function iA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=U("Close"),i=O(),s=v("button"),l=v("i"),o=O(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],Q(s,"btn-loading",n[4])},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),u||(f=Y(e,"click",n[0]),u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&Q(s,"btn-loading",c[4])},d(c){c&&(k(e),k(i),k(s)),u=!1,f()}}}function sA(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[iA],header:[nA],default:[tA]},$$scope:{ctx:n}};return e=new on({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){V(e.$$.fragment)},m(s,l){j(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[14]),l&16777270&&(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[15](null),H(e,s)}}}const Nr="last_email_test",Am="email_test_request";function lA(n,e,t){let i;const s=wt(),l="email_test_"+z.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Nr),u=o[0].value,f=!1,c=null;function d(E="",D=""){t(1,a=E||localStorage.getItem(Nr)),t(2,u=D||o[0].value),tn({}),r==null||r.show()}function h(){return clearTimeout(c),r==null?void 0:r.hide()}async function g(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Nr,a),clearTimeout(c),c=setTimeout(()=>{fe.cancelRequest(Am),ls("Test email send timeout.")},3e4);try{await fe.settings.testEmail(a,u,{$cancelKey:Am}),jt("Successfully sent test email."),s("submit"),t(4,f=!1),await ln(),h()}catch(E){t(4,f=!1),fe.error(E)}clearTimeout(c)}}const m=[[]];function _(){u=this.__value,t(2,u)}function y(){a=this.value,t(1,a)}const S=()=>g(),T=()=>!f;function $(E){ne[E?"unshift":"push"](()=>{r=E,t(3,r)})}function C(E){Ne.call(this,n,E)}function M(E){Ne.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,g,d,_,m,y,S,T,$,C,M]}class oA extends ve{constructor(e){super(),be(this,e,lA,sA,he,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function rA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M,E,D,I,P;i=new ce({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[uA,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[fA,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}});function F(ee){n[15](ee)}let N={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(N.config=n[0].meta.verificationTemplate),u=new Fr({props:N}),ne.push(()=>de(u,"config",F));function R(ee){n[16](ee)}let q={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(q.config=n[0].meta.resetPasswordTemplate),d=new Fr({props:q}),ne.push(()=>de(d,"config",R));function B(ee){n[17](ee)}let K={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(K.config=n[0].meta.confirmEmailChangeTemplate),m=new Fr({props:K}),ne.push(()=>de(m,"config",B)),$=new ce({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[cA,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}});let J=n[0].smtp.enabled&&Im(n);function X(ee,te){return ee[5]?wA:kA}let G=X(n),ue=G(n);return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),r=O(),a=v("div"),V(u.$$.fragment),c=O(),V(d.$$.fragment),g=O(),V(m.$$.fragment),y=O(),S=v("hr"),T=O(),V($.$$.fragment),C=O(),J&&J.c(),M=O(),E=v("div"),D=v("div"),I=O(),ue.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(D,"class","flex-fill"),p(E,"class","flex")},m(ee,te){w(ee,e,te),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),w(ee,r,te),w(ee,a,te),j(u,a,null),b(a,c),j(d,a,null),b(a,g),j(m,a,null),w(ee,y,te),w(ee,S,te),w(ee,T,te),j($,ee,te),w(ee,C,te),J&&J.m(ee,te),w(ee,M,te),w(ee,E,te),b(E,D),b(E,I),ue.m(E,null),P=!0},p(ee,te){const Ee={};te[0]&1|te[1]&24&&(Ee.$$scope={dirty:te,ctx:ee}),i.$set(Ee);const Fe={};te[0]&1|te[1]&24&&(Fe.$$scope={dirty:te,ctx:ee}),o.$set(Fe);const Ve={};!f&&te[0]&1&&(f=!0,Ve.config=ee[0].meta.verificationTemplate,_e(()=>f=!1)),u.$set(Ve);const ze={};!h&&te[0]&1&&(h=!0,ze.config=ee[0].meta.resetPasswordTemplate,_e(()=>h=!1)),d.$set(ze);const Se={};!_&&te[0]&1&&(_=!0,Se.config=ee[0].meta.confirmEmailChangeTemplate,_e(()=>_=!1)),m.$set(Se);const Me={};te[0]&1|te[1]&24&&(Me.$$scope={dirty:te,ctx:ee}),$.$set(Me),ee[0].smtp.enabled?J?(J.p(ee,te),te[0]&1&&A(J,1)):(J=Im(ee),J.c(),A(J,1),J.m(M.parentNode,M)):J&&(re(),L(J,1,1,()=>{J=null}),ae()),G===(G=X(ee))&&ue?ue.p(ee,te):(ue.d(1),ue=G(ee),ue&&(ue.c(),ue.m(E,null)))},i(ee){P||(A(i.$$.fragment,ee),A(o.$$.fragment,ee),A(u.$$.fragment,ee),A(d.$$.fragment,ee),A(m.$$.fragment,ee),A($.$$.fragment,ee),A(J),P=!0)},o(ee){L(i.$$.fragment,ee),L(o.$$.fragment,ee),L(u.$$.fragment,ee),L(d.$$.fragment,ee),L(m.$$.fragment,ee),L($.$$.fragment,ee),L(J),P=!1},d(ee){ee&&(k(e),k(r),k(a),k(y),k(S),k(T),k(C),k(M),k(E)),H(i),H(o),H(u),H(d),H(m),H($,ee),J&&J.d(ee),ue.d()}}}function aA(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function uA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Sender name"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].meta.senderName),r||(a=Y(l,"input",n[13]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&oe(l,u[0].meta.senderName)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function fA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Sender address"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","email"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].meta.senderAddress),r||(a=Y(l,"input",n[14]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&oe(l,u[0].meta.senderAddress)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function cA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[34])},m(c,d){w(c,e,d),e.checked=n[0].smtp.enabled,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[18]),$e(He.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&8&&t!==(t=c[34])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&8&&a!==(a=c[34])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,Ce(f)}}}function Im(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$;s=new ce({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[dA,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[pA,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),f=new ce({props:{class:"form-field",name:"smtp.username",$$slots:{default:[hA,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),h=new ce({props:{class:"form-field",name:"smtp.password",$$slots:{default:[mA,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}});function C(I,P){return I[4]?_A:gA}let M=C(n),E=M(n),D=n[4]&&Lm(n);return{c(){e=v("div"),t=v("div"),i=v("div"),V(s.$$.fragment),l=O(),o=v("div"),V(r.$$.fragment),a=O(),u=v("div"),V(f.$$.fragment),c=O(),d=v("div"),V(h.$$.fragment),g=O(),m=v("button"),E.c(),_=O(),D&&D.c(),p(i,"class","col-lg-4"),p(o,"class","col-lg-2"),p(u,"class","col-lg-3"),p(d,"class","col-lg-3"),p(t,"class","grid"),p(m,"type","button"),p(m,"class","btn btn-sm btn-secondary m-t-sm m-b-sm")},m(I,P){w(I,e,P),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),b(t,a),b(t,u),j(f,u,null),b(t,c),b(t,d),j(h,d,null),b(e,g),b(e,m),E.m(m,null),b(e,_),D&&D.m(e,null),S=!0,T||($=Y(m,"click",Qe(n[23])),T=!0)},p(I,P){const F={};P[0]&1|P[1]&24&&(F.$$scope={dirty:P,ctx:I}),s.$set(F);const N={};P[0]&1|P[1]&24&&(N.$$scope={dirty:P,ctx:I}),r.$set(N);const R={};P[0]&1|P[1]&24&&(R.$$scope={dirty:P,ctx:I}),f.$set(R);const q={};P[0]&1|P[1]&24&&(q.$$scope={dirty:P,ctx:I}),h.$set(q),M!==(M=C(I))&&(E.d(1),E=M(I),E&&(E.c(),E.m(m,null))),I[4]?D?(D.p(I,P),P[0]&16&&A(D,1)):(D=Lm(I),D.c(),A(D,1),D.m(e,null)):D&&(re(),L(D,1,1,()=>{D=null}),ae())},i(I){S||(A(s.$$.fragment,I),A(r.$$.fragment,I),A(f.$$.fragment,I),A(h.$$.fragment,I),A(D),I&&Xe(()=>{S&&(y||(y=qe(e,nt,{duration:150},!0)),y.run(1))}),S=!0)},o(I){L(s.$$.fragment,I),L(r.$$.fragment,I),L(f.$$.fragment,I),L(h.$$.fragment,I),L(D),I&&(y||(y=qe(e,nt,{duration:150},!1)),y.run(0)),S=!1},d(I){I&&k(e),H(s),H(r),H(f),H(h),E.d(),D&&D.d(),I&&y&&y.end(),T=!1,$()}}}function dA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("SMTP server host"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].smtp.host),r||(a=Y(l,"input",n[19]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&oe(l,u[0].smtp.host)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function pA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Port"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","number"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].smtp.port),r||(a=Y(l,"input",n[20]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&ht(l.value)!==u[0].smtp.port&&oe(l,u[0].smtp.port)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function hA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Username"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34])},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].smtp.username),r||(a=Y(l,"input",n[21]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&oe(l,u[0].smtp.username)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function mA(n){let e,t,i,s,l,o,r;function a(f){n[22](f)}let u={id:n[34]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new ru({props:u}),ne.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Password"),s=O(),V(l.$$.fragment),p(e,"for",i=n[34])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&8&&i!==(i=f[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=f[34]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,_e(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),H(l,f)}}}function gA(n){let e,t,i;return{c(){e=v("span"),e.textContent="Show more options",t=O(),i=v("i"),p(e,"class","txt"),p(i,"class","ri-arrow-down-s-line")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&(k(e),k(t),k(i))}}}function _A(n){let e,t,i;return{c(){e=v("span"),e.textContent="Hide more options",t=O(),i=v("i"),p(e,"class","txt"),p(i,"class","ri-arrow-up-s-line")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&(k(e),k(t),k(i))}}}function Lm(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new ce({props:{class:"form-field",name:"smtp.tls",$$slots:{default:[bA,({uniqueId:g})=>({34:g}),({uniqueId:g})=>[0,g?8:0]]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[vA,({uniqueId:g})=>({34:g}),({uniqueId:g})=>[0,g?8:0]]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field",name:"smtp.localName",$$slots:{default:[yA,({uniqueId:g})=>({34:g}),({uniqueId:g})=>[0,g?8:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),r=O(),a=v("div"),V(u.$$.fragment),f=O(),c=v("div"),p(t,"class","col-lg-3"),p(l,"class","col-lg-3"),p(a,"class","col-lg-6"),p(c,"class","col-lg-12"),p(e,"class","grid")},m(g,m){w(g,e,m),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),b(e,f),b(e,c),h=!0},p(g,m){const _={};m[0]&1|m[1]&24&&(_.$$scope={dirty:m,ctx:g}),i.$set(_);const y={};m[0]&1|m[1]&24&&(y.$$scope={dirty:m,ctx:g}),o.$set(y);const S={};m[0]&1|m[1]&24&&(S.$$scope={dirty:m,ctx:g}),u.$set(S)},i(g){h||(A(i.$$.fragment,g),A(o.$$.fragment,g),A(u.$$.fragment,g),g&&Xe(()=>{h&&(d||(d=qe(e,nt,{duration:150},!0)),d.run(1))}),h=!0)},o(g){L(i.$$.fragment,g),L(o.$$.fragment,g),L(u.$$.fragment,g),g&&(d||(d=qe(e,nt,{duration:150},!1)),d.run(0)),h=!1},d(g){g&&k(e),H(i),H(o),H(u),g&&d&&d.end()}}}function bA(n){let e,t,i,s,l,o,r;function a(f){n[24](f)}let u={id:n[34],items:n[7]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Bi({props:u}),ne.push(()=>de(l,"keyOfSelected",a)),{c(){e=v("label"),t=U("TLS encryption"),s=O(),V(l.$$.fragment),p(e,"for",i=n[34])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&8&&i!==(i=f[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=f[34]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,_e(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),H(l,f)}}}function vA(n){let e,t,i,s,l,o,r;function a(f){n[25](f)}let u={id:n[34],items:n[8]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Bi({props:u}),ne.push(()=>de(l,"keyOfSelected",a)),{c(){e=v("label"),t=U("AUTH method"),s=O(),V(l.$$.fragment),p(e,"for",i=n[34])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&8&&i!==(i=f[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=f[34]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,_e(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),H(l,f)}}}function yA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="EHLO/HELO domain",i=O(),s=v("i"),o=O(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[34]),p(r,"type","text"),p(r,"id",a=n[34]),p(r,"placeholder","Default to localhost")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),oe(r,n[0].smtp.localName),u||(f=[$e(He.call(null,s,{text:"Some SMTP servers, such as the Gmail SMTP-relay, requires a proper domain name in the inital EHLO/HELO exchange and will reject attempts to use localhost.",position:"top"})),Y(r,"input",n[26])],u=!0)},p(c,d){d[1]&8&&l!==(l=c[34])&&p(e,"for",l),d[1]&8&&a!==(a=c[34])&&p(r,"id",a),d[0]&1&&r.value!==c[0].smtp.localName&&oe(r,c[0].smtp.localName)},d(c){c&&(k(e),k(o),k(r)),u=!1,Ce(f)}}}function kA(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' Send test email',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:x,d(s){s&&k(e),t=!1,i()}}}function wA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),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],Q(s,"btn-loading",n[3])},m(u,f){w(u,e,f),b(e,t),w(u,i,f),w(u,s,f),b(s,l),r||(a=[Y(e,"click",n[27]),Y(s,"click",n[28])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&40&&o!==(o=!u[5]||u[3])&&(s.disabled=o),f[0]&8&&Q(s,"btn-loading",u[3])},d(u){u&&(k(e),k(i),k(s)),r=!1,Ce(a)}}}function SA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_;const y=[aA,rA],S=[];function T($,C){return $[2]?0:1}return d=T(n),h=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[6]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,C){w($,e,C),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w($,r,C),w($,a,C),b(a,u),b(u,f),b(u,c),S[d].m(u,null),g=!0,m||(_=Y(u,"submit",Qe(n[30])),m=!0)},p($,C){(!g||C[0]&64)&&se(o,$[6]);let M=d;d=T($),d===M?S[d].p($,C):(re(),L(S[M],1,1,()=>{S[M]=null}),ae(),h=S[d],h?h.p($,C):(h=S[d]=y[d]($),h.c()),A(h,1),h.m(u,null))},i($){g||(A(h),g=!0)},o($){L(h),g=!1},d($){$&&(k(e),k(r),k(a)),S[d].d(),m=!1,_()}}}function $A(n){let e,t,i,s,l,o;e=new Oi({}),i=new Sn({props:{$$slots:{default:[SA]},$$scope:{ctx:n}}});let r={};return l=new oA({props:r}),n[31](l),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment),s=O(),V(l.$$.fragment)},m(a,u){j(e,a,u),w(a,t,u),j(i,a,u),w(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&127|u[1]&16&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){a&&(k(t),k(s)),H(e,a),H(i,a),n[31](null),H(l,a)}}}function TA(n,e,t){let i,s,l;Ye(n,At,ee=>t(6,l=ee));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];sn(At,l="Mail settings",l);let a,u={},f={},c=!1,d=!1,h=!1;g();async function g(){t(2,c=!0);try{const ee=await fe.settings.getAll()||{};_(ee)}catch(ee){fe.error(ee)}t(2,c=!1)}async function m(){if(!(d||!s)){t(3,d=!0);try{const ee=await fe.settings.update(z.filterRedactedProps(f));_(ee),tn({}),jt("Successfully saved mail settings.")}catch(ee){fe.error(ee)}t(3,d=!1)}}function _(ee={}){t(0,f={meta:(ee==null?void 0:ee.meta)||{},smtp:(ee==null?void 0:ee.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(11,u=JSON.parse(JSON.stringify(f)))}function y(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function S(){f.meta.senderName=this.value,t(0,f)}function T(){f.meta.senderAddress=this.value,t(0,f)}function $(ee){n.$$.not_equal(f.meta.verificationTemplate,ee)&&(f.meta.verificationTemplate=ee,t(0,f))}function C(ee){n.$$.not_equal(f.meta.resetPasswordTemplate,ee)&&(f.meta.resetPasswordTemplate=ee,t(0,f))}function M(ee){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,ee)&&(f.meta.confirmEmailChangeTemplate=ee,t(0,f))}function E(){f.smtp.enabled=this.checked,t(0,f)}function D(){f.smtp.host=this.value,t(0,f)}function I(){f.smtp.port=ht(this.value),t(0,f)}function P(){f.smtp.username=this.value,t(0,f)}function F(ee){n.$$.not_equal(f.smtp.password,ee)&&(f.smtp.password=ee,t(0,f))}const N=()=>{t(4,h=!h)};function R(ee){n.$$.not_equal(f.smtp.tls,ee)&&(f.smtp.tls=ee,t(0,f))}function q(ee){n.$$.not_equal(f.smtp.authMethod,ee)&&(f.smtp.authMethod=ee,t(0,f))}function B(){f.smtp.localName=this.value,t(0,f)}const K=()=>y(),J=()=>m(),X=()=>a==null?void 0:a.show(),G=()=>m();function ue(ee){ne[ee?"unshift":"push"](()=>{a=ee,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&2048&&t(12,i=JSON.stringify(u)),n.$$.dirty[0]&4097&&t(5,s=i!=JSON.stringify(f))},[f,a,c,d,h,s,l,o,r,m,y,u,i,S,T,$,C,M,E,D,I,P,F,N,R,q,B,K,J,X,G,ue]}class CA extends ve{constructor(e){super(),be(this,e,TA,$A,he,{},null,[-1,-1])}}const MA=n=>({isTesting:n&4,testError:n&2,enabled:n&1}),Pm=n=>({isTesting:n[2],testError:n[1],enabled:n[0].enabled});function OA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),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(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&16&&se(l,u[4]),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Fm(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M;return i=new ce({props:{class:"form-field required",name:n[3]+".endpoint",$$slots:{default:[EA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:n[3]+".bucket",$$slots:{default:[DA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field required",name:n[3]+".region",$$slots:{default:[AA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),d=new ce({props:{class:"form-field required",name:n[3]+".accessKey",$$slots:{default:[IA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),m=new ce({props:{class:"form-field required",name:n[3]+".secret",$$slots:{default:[LA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),S=new ce({props:{class:"form-field",name:n[3]+".forcePathStyle",$$slots:{default:[PA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=O(),l=v("div"),V(o.$$.fragment),r=O(),a=v("div"),V(u.$$.fragment),f=O(),c=v("div"),V(d.$$.fragment),h=O(),g=v("div"),V(m.$$.fragment),_=O(),y=v("div"),V(S.$$.fragment),T=O(),$=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(g,"class","col-lg-6"),p(y,"class","col-lg-12"),p($,"class","col-lg-12"),p(e,"class","grid")},m(E,D){w(E,e,D),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),b(e,f),b(e,c),j(d,c,null),b(e,h),b(e,g),j(m,g,null),b(e,_),b(e,y),j(S,y,null),b(e,T),b(e,$),M=!0},p(E,D){const I={};D&8&&(I.name=E[3]+".endpoint"),D&1081345&&(I.$$scope={dirty:D,ctx:E}),i.$set(I);const P={};D&8&&(P.name=E[3]+".bucket"),D&1081345&&(P.$$scope={dirty:D,ctx:E}),o.$set(P);const F={};D&8&&(F.name=E[3]+".region"),D&1081345&&(F.$$scope={dirty:D,ctx:E}),u.$set(F);const N={};D&8&&(N.name=E[3]+".accessKey"),D&1081345&&(N.$$scope={dirty:D,ctx:E}),d.$set(N);const R={};D&8&&(R.name=E[3]+".secret"),D&1081345&&(R.$$scope={dirty:D,ctx:E}),m.$set(R);const q={};D&8&&(q.name=E[3]+".forcePathStyle"),D&1081345&&(q.$$scope={dirty:D,ctx:E}),S.$set(q)},i(E){M||(A(i.$$.fragment,E),A(o.$$.fragment,E),A(u.$$.fragment,E),A(d.$$.fragment,E),A(m.$$.fragment,E),A(S.$$.fragment,E),E&&Xe(()=>{M&&(C||(C=qe(e,nt,{duration:150},!0)),C.run(1))}),M=!0)},o(E){L(i.$$.fragment,E),L(o.$$.fragment,E),L(u.$$.fragment,E),L(d.$$.fragment,E),L(m.$$.fragment,E),L(S.$$.fragment,E),E&&(C||(C=qe(e,nt,{duration:150},!1)),C.run(0)),M=!1},d(E){E&&k(e),H(i),H(o),H(u),H(d),H(m),H(S),E&&C&&C.end()}}}function EA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Endpoint"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].endpoint),r||(a=Y(l,"input",n[9]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].endpoint&&oe(l,u[0].endpoint)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function DA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Bucket"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].bucket),r||(a=Y(l,"input",n[10]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].bucket&&oe(l,u[0].bucket)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function AA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Region"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].region),r||(a=Y(l,"input",n[11]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].region&&oe(l,u[0].region)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function IA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Access key"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[0].accessKey),r||(a=Y(l,"input",n[12]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].accessKey&&oe(l,u[0].accessKey)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function LA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:!0};return n[0].secret!==void 0&&(u.value=n[0].secret),l=new ru({props:u}),ne.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Secret"),s=O(),V(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].secret,_e(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),H(l,f)}}}function PA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[20])},m(c,d){w(c,e,d),e.checked=n[0].forcePathStyle,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[14]),$e(He.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&1048576&&t!==(t=c[20])&&p(e,"id",t),d&1&&(e.checked=c[0].forcePathStyle),d&1048576&&a!==(a=c[20])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,Ce(f)}}}function FA(n){let e,t,i,s,l;e=new ce({props:{class:"form-field form-field-toggle",$$slots:{default:[OA,({uniqueId:u})=>({20:u}),({uniqueId:u})=>u?1048576:0]},$$scope:{ctx:n}}});const o=n[7].default,r=Ct(o,n,n[15],Pm);let a=n[0].enabled&&Fm(n);return{c(){V(e.$$.fragment),t=O(),r&&r.c(),i=O(),a&&a.c(),s=ke()},m(u,f){j(e,u,f),w(u,t,f),r&&r.m(u,f),w(u,i,f),a&&a.m(u,f),w(u,s,f),l=!0},p(u,[f]){const c={};f&1081361&&(c.$$scope={dirty:f,ctx:u}),e.$set(c),r&&r.p&&(!l||f&32775)&&Ot(r,o,u,u[15],l?Mt(o,u[15],f,MA):Et(u[15]),Pm),u[0].enabled?a?(a.p(u,f),f&1&&A(a,1)):(a=Fm(u),a.c(),A(a,1),a.m(s.parentNode,s)):a&&(re(),L(a,1,1,()=>{a=null}),ae())},i(u){l||(A(e.$$.fragment,u),A(r,u),A(a),l=!0)},o(u){L(e.$$.fragment,u),L(r,u),L(a),l=!1},d(u){u&&(k(t),k(i),k(s)),H(e,u),r&&r.d(u),a&&a.d(u)}}}const Rr="s3_test_request";function NA(n,e,t){let{$$slots:i={},$$scope:s}=e,{originalConfig:l={}}=e,{config:o={}}=e,{configKey:r="s3"}=e,{toggleLabel:a="Enable S3"}=e,{testFilesystem:u="storage"}=e,{testError:f=null}=e,{isTesting:c=!1}=e,d=null,h=null;function g(E){t(2,c=!0),clearTimeout(h),h=setTimeout(()=>{m()},E)}async function m(){if(t(1,f=null),!o.enabled)return t(2,c=!1),f;fe.cancelRequest(Rr),clearTimeout(d),d=setTimeout(()=>{fe.cancelRequest(Rr),t(1,f=new Error("S3 test connection timeout.")),t(2,c=!1)},3e4),t(2,c=!0);let E;try{await fe.settings.testS3(u,{$cancelKey:Rr})}catch(D){E=D}return E!=null&&E.isAbort||(t(1,f=E),t(2,c=!1),clearTimeout(d)),f}Zt(()=>()=>{clearTimeout(d),clearTimeout(h)});function _(){o.enabled=this.checked,t(0,o)}function y(){o.endpoint=this.value,t(0,o)}function S(){o.bucket=this.value,t(0,o)}function T(){o.region=this.value,t(0,o)}function $(){o.accessKey=this.value,t(0,o)}function C(E){n.$$.not_equal(o.secret,E)&&(o.secret=E,t(0,o))}function M(){o.forcePathStyle=this.checked,t(0,o)}return n.$$set=E=>{"originalConfig"in E&&t(5,l=E.originalConfig),"config"in E&&t(0,o=E.config),"configKey"in E&&t(3,r=E.configKey),"toggleLabel"in E&&t(4,a=E.toggleLabel),"testFilesystem"in E&&t(6,u=E.testFilesystem),"testError"in E&&t(1,f=E.testError),"isTesting"in E&&t(2,c=E.isTesting),"$$scope"in E&&t(15,s=E.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&l!=null&&l.enabled&&g(100),n.$$.dirty&9&&(o.enabled||di(r))},[o,f,c,r,a,l,u,i,_,y,S,T,$,C,M,s]}class T1 extends ve{constructor(e){super(),be(this,e,NA,FA,he,{originalConfig:5,config:0,configKey:3,toggleLabel:4,testFilesystem:6,testError:1,isTesting:2})}}function RA(n){var E;let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_;function y(D){n[11](D)}function S(D){n[12](D)}function T(D){n[13](D)}let $={toggleLabel:"Use S3 storage",originalConfig:n[0].s3,$$slots:{default:[jA]},$$scope:{ctx:n}};n[1].s3!==void 0&&($.config=n[1].s3),n[4]!==void 0&&($.isTesting=n[4]),n[5]!==void 0&&($.testError=n[5]),e=new T1({props:$}),ne.push(()=>de(e,"config",y)),ne.push(()=>de(e,"isTesting",S)),ne.push(()=>de(e,"testError",T));let C=((E=n[1].s3)==null?void 0:E.enabled)&&!n[6]&&!n[3]&&Rm(n),M=n[6]&&qm(n);return{c(){V(e.$$.fragment),l=O(),o=v("div"),r=v("div"),a=O(),C&&C.c(),u=O(),M&&M.c(),f=O(),c=v("button"),d=v("span"),d.textContent="Save changes",p(r,"class","flex-fill"),p(d,"class","txt"),p(c,"type","submit"),p(c,"class","btn btn-expanded"),c.disabled=h=!n[6]||n[3],Q(c,"btn-loading",n[3]),p(o,"class","flex")},m(D,I){j(e,D,I),w(D,l,I),w(D,o,I),b(o,r),b(o,a),C&&C.m(o,null),b(o,u),M&&M.m(o,null),b(o,f),b(o,c),b(c,d),g=!0,m||(_=Y(c,"click",n[15]),m=!0)},p(D,I){var F;const P={};I&1&&(P.originalConfig=D[0].s3),I&524291&&(P.$$scope={dirty:I,ctx:D}),!t&&I&2&&(t=!0,P.config=D[1].s3,_e(()=>t=!1)),!i&&I&16&&(i=!0,P.isTesting=D[4],_e(()=>i=!1)),!s&&I&32&&(s=!0,P.testError=D[5],_e(()=>s=!1)),e.$set(P),(F=D[1].s3)!=null&&F.enabled&&!D[6]&&!D[3]?C?C.p(D,I):(C=Rm(D),C.c(),C.m(o,u)):C&&(C.d(1),C=null),D[6]?M?M.p(D,I):(M=qm(D),M.c(),M.m(o,f)):M&&(M.d(1),M=null),(!g||I&72&&h!==(h=!D[6]||D[3]))&&(c.disabled=h),(!g||I&8)&&Q(c,"btn-loading",D[3])},i(D){g||(A(e.$$.fragment,D),g=!0)},o(D){L(e.$$.fragment,D),g=!1},d(D){D&&(k(l),k(o)),H(e,D),C&&C.d(),M&&M.d(),m=!1,_()}}}function qA(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Nm(n){var I;let e,t,i,s,l,o,r,a=(I=n[0].s3)!=null&&I.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",h,g,m,_,y,S,T,$,C,M,E,D;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=U(`If you have existing uploaded files, you'll have to migrate them manually + from the + `),r=v("strong"),u=U(a),f=U(` + to the + `),c=v("strong"),h=U(d),g=U(`. + `),m=v("br"),_=U(` + There are numerous command line tools that can help you, such as: + `),y=v("a"),y.textContent=`rclone + `,S=U(`, + `),T=v("a"),T.textContent=`s5cmd + `,$=U(", etc."),C=O(),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(T,"href","https://github.com/peak/s5cmd"),p(T,"target","_blank"),p(T,"rel","noopener noreferrer"),p(T,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(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,u),b(l,f),b(l,c),b(c,h),b(l,g),b(l,m),b(l,_),b(l,y),b(l,S),b(l,T),b(l,$),b(e,C),b(e,M),D=!0},p(P,F){var N;(!D||F&1)&&a!==(a=(N=P[0].s3)!=null&&N.enabled?"S3 storage":"local file system")&&se(u,a),(!D||F&2)&&d!==(d=P[1].s3.enabled?"S3 storage":"local file system")&&se(h,d)},i(P){D||(P&&Xe(()=>{D&&(E||(E=qe(e,nt,{duration:150},!0)),E.run(1))}),D=!0)},o(P){P&&(E||(E=qe(e,nt,{duration:150},!1)),E.run(0)),D=!1},d(P){P&&k(e),P&&E&&E.end()}}}function jA(n){var i;let e,t=((i=n[0].s3)==null?void 0:i.enabled)!=n[1].s3.enabled&&Nm(n);return{c(){t&&t.c(),e=ke()},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=Nm(s),t.c(),A(t,1),t.m(e.parentNode,e)):t&&(re(),L(t,1,1,()=>{t=null}),ae())},d(s){s&&k(e),t&&t.d(s)}}}function Rm(n){let e;function t(l,o){return l[4]?zA:l[5]?VA:HA}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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){l&&k(e),s.d(l)}}}function HA(n){let e;return{c(){e=v("div"),e.innerHTML=' S3 connected successfully',p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function VA(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=' Failed to establish S3 connection',p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=$e(t=He.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&It(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 zA(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function qm(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 BA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_;const y=[qA,RA],S=[];function T($,C){return $[2]?0:1}return d=T(n),h=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[7]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    By default PocketBase uses the local file system to store uploaded files.

    If you have limited disk space, you could optionally connect to an S3 compatible storage.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,C){w($,e,C),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w($,r,C),w($,a,C),b(a,u),b(u,f),b(u,c),S[d].m(u,null),g=!0,m||(_=Y(u,"submit",Qe(n[16])),m=!0)},p($,C){(!g||C&128)&&se(o,$[7]);let M=d;d=T($),d===M?S[d].p($,C):(re(),L(S[M],1,1,()=>{S[M]=null}),ae(),h=S[d],h?h.p($,C):(h=S[d]=y[d]($),h.c()),A(h,1),h.m(u,null))},i($){g||(A(h),g=!0)},o($){L(h),g=!1},d($){$&&(k(e),k(r),k(a)),S[d].d(),m=!1,_()}}}function UA(n){let e,t,i,s;return e=new Oi({}),i=new Sn({props:{$$slots:{default:[BA]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(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){l&&k(t),H(e,l),H(i,l)}}}const WA="s3_test_request";function YA(n,e,t){let i,s,l;Ye(n,At,M=>t(7,l=M)),sn(At,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null;d();async function d(){t(2,a=!0);try{const M=await fe.settings.getAll()||{};g(M)}catch(M){fe.error(M)}t(2,a=!1)}async function h(){if(!(u||!s)){t(3,u=!0);try{fe.cancelRequest(WA);const M=await fe.settings.update(z.filterRedactedProps(r));tn({}),await g(M),Ea(),c?Dy("Successfully saved but failed to establish S3 connection."):jt("Successfully saved files storage settings.")}catch(M){fe.error(M)}t(3,u=!1)}}async function g(M={}){t(1,r={s3:(M==null?void 0:M.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r)))}async function m(){t(1,r=JSON.parse(JSON.stringify(o||{})))}function _(M){n.$$.not_equal(r.s3,M)&&(r.s3=M,t(1,r))}function y(M){f=M,t(4,f)}function S(M){c=M,t(5,c)}const T=()=>m(),$=()=>h(),C=()=>h();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,h,m,i,_,y,S,T,$,C]}class KA extends ve{constructor(e){super(),be(this,e,YA,UA,he,{})}}function JA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){w(u,e,f),e.checked=n[1].enabled,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[11]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&2&&(e.checked=u[1].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function ZA(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Client ID"),s=O(),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(f,c){w(f,e,c),b(e,t),w(f,s,c),w(f,l,c),oe(l,n[1].clientId),a||(u=Y(l,"input",n[12]),a=!0)},p(f,c){c&1048576&&i!==(i=f[20])&&p(e,"for",i),c&1048576&&o!==(o=f[20])&&p(l,"id",o),c&2&&r!==(r=f[1].enabled)&&(l.required=r),c&2&&l.value!==f[1].clientId&&oe(l,f[1].clientId)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function GA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(u.value=n[1].clientSecret),l=new ru({props:u}),ne.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Client secret"),s=O(),V(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),c&2&&(d.required=f[1].enabled),!o&&c&2&&(o=!0,d.value=f[1].clientSecret,_e(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),H(l,f)}}}function jm(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a,u){let f={key:a[3].key};return a[1]!==void 0&&(f.config=a[1]),{props:f}}return o&&(t=Dt(o,r(n)),ne.push(()=>de(t,"config",l))),{c(){e=v("div"),t&&V(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){w(a,e,u),t&&j(t,e,null),s=!0},p(a,u){if(u&8&&o!==(o=a[3].optionsComponent)){if(t){re();const f=t;L(f.$$.fragment,1,0,()=>{H(f,1)}),ae()}o?(t=Dt(o,r(a)),ne.push(()=>de(t,"config",l)),V(t.$$.fragment),A(t.$$.fragment,1),j(t,e,null)):t=null}else if(o){const f={};u&8&&(f.key=a[3].key),!i&&u&2&&(i=!0,f.config=a[1],_e(()=>i=!1)),t.$set(f)}},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 XA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new ce({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[JA,({uniqueId:m})=>({20:m}),({uniqueId:m})=>m?1048576:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[ZA,({uniqueId:m})=>({20:m}),({uniqueId:m})=>m?1048576:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[GA,({uniqueId:m})=>({20:m}),({uniqueId:m})=>m?1048576:0]},$$scope:{ctx:n}}});let g=n[3].optionsComponent&&jm(n);return{c(){e=v("form"),t=v("div"),V(i.$$.fragment),s=O(),l=v("button"),l.innerHTML='Clear all fields',o=O(),V(r.$$.fragment),a=O(),V(u.$$.fragment),f=O(),g&&g.c(),p(l,"type","button"),p(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),p(t,"class","flex m-b-base"),p(e,"id",n[6]),p(e,"autocomplete","off")},m(m,_){w(m,e,_),b(e,t),j(i,t,null),b(t,s),b(t,l),b(e,o),j(r,e,null),b(e,a),j(u,e,null),b(e,f),g&&g.m(e,null),c=!0,d||(h=[Y(l,"click",n[8]),Y(e,"submit",Qe(n[15]))],d=!0)},p(m,_){const y={};_&8&&(y.name=m[3].key+".enabled"),_&3145730&&(y.$$scope={dirty:_,ctx:m}),i.$set(y);const S={};_&2&&(S.class="form-field "+(m[1].enabled?"required":"")),_&8&&(S.name=m[3].key+".clientId"),_&3145730&&(S.$$scope={dirty:_,ctx:m}),r.$set(S);const T={};_&2&&(T.class="form-field "+(m[1].enabled?"required":"")),_&8&&(T.name=m[3].key+".clientSecret"),_&3145730&&(T.$$scope={dirty:_,ctx:m}),u.$set(T),m[3].optionsComponent?g?(g.p(m,_),_&8&&A(g,1)):(g=jm(m),g.c(),A(g,1),g.m(e,null)):g&&(re(),L(g,1,1,()=>{g=null}),ae())},i(m){c||(A(i.$$.fragment,m),A(r.$$.fragment,m),A(u.$$.fragment,m),A(g),c=!0)},o(m){L(i.$$.fragment,m),L(r.$$.fragment,m),L(u.$$.fragment,m),L(g),c=!1},d(m){m&&k(e),H(i),H(r),H(u),g&&g.d(),d=!1,Ce(h)}}}function QA(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=v("h4"),i=U(t),s=U(" provider"),p(e,"class","center txt-break")},m(l,o){w(l,e,o),b(e,i),b(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&se(i,t)},d(l){l&&k(e)}}}function xA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Close"),i=O(),s=v("button"),l=v("span"),l.textContent="Save changes",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],Q(s,"btn-loading",n[4])},m(u,f){w(u,e,f),b(e,t),w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&Q(s,"btn-loading",u[4])},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function e8(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[xA],header:[QA],default:[XA]},$$scope:{ctx:n}};return e=new on({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(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[16](null),H(e,s)}}}function t8(n,e,t){let i;const s=wt(),l="provider_popup_"+z.randomString(5);let o,r={},a={},u=!1,f="";function c(E,D){tn({}),t(3,r=Object.assign({},E)),t(1,a=Object.assign({enabled:!0},D)),t(10,f=JSON.stringify(a)),o==null||o.show()}function d(){return o==null?void 0:o.hide()}async function h(){t(4,u=!0);try{const E={};E[r.key]=z.filterRedactedProps(a);const D=await fe.settings.update(E);tn({}),jt("Successfully updated provider settings."),s("submit",D),d()}catch(E){fe.error(E)}t(4,u=!1)}function g(){for(let E in a)t(1,a[E]="",a);t(1,a.enabled=!1,a)}function m(){a.enabled=this.checked,t(1,a)}function _(){a.clientId=this.value,t(1,a)}function y(E){n.$$.not_equal(a.clientSecret,E)&&(a.clientSecret=E,t(1,a))}function S(E){a=E,t(1,a)}const T=()=>h();function $(E){ne[E?"unshift":"push"](()=>{o=E,t(2,o)})}function C(E){Ne.call(this,n,E)}function M(E){Ne.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=f)},[d,a,o,r,u,i,l,h,g,c,f,m,_,y,S,T,$,C,M]}class n8 extends ve{constructor(e){super(),be(this,e,t8,e8,he,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Hm(n){let e,t,i;return{c(){e=v("img"),_n(e.src,t="./images/oauth2/"+n[1].logo)||p(e,"src",t),p(e,"alt",i=n[1].title+" logo")},m(s,l){w(s,e,l)},p(s,l){l&2&&!_n(e.src,t="./images/oauth2/"+s[1].logo)&&p(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&p(e,"alt",i)},d(s){s&&k(e)}}}function Vm(n){let e;return{c(){e=v("div"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function i8(n){let e,t,i,s,l=n[1].title+"",o,r,a,u,f=n[1].key.slice(0,-4)+"",c,d,h,g,m,_,y,S,T,$,C=n[1].logo&&Hm(n),M=n[0].enabled&&Vm(),E={};return y=new n8({props:E}),n[4](y),y.$on("submit",n[5]),{c(){e=v("div"),t=v("figure"),C&&C.c(),i=O(),s=v("div"),o=U(l),r=O(),a=v("em"),u=U("("),c=U(f),d=U(")"),h=O(),M&&M.c(),g=O(),m=v("button"),m.innerHTML='',_=O(),V(y.$$.fragment),p(t,"class","provider-logo"),p(s,"class","title"),p(a,"class","txt-hint txt-sm m-r-auto"),p(m,"type","button"),p(m,"class","btn btn-circle btn-hint btn-transparent"),p(m,"aria-label","Provider settings"),p(e,"class","provider-card")},m(D,I){w(D,e,I),b(e,t),C&&C.m(t,null),b(e,i),b(e,s),b(s,o),b(e,r),b(e,a),b(a,u),b(a,c),b(a,d),b(e,h),M&&M.m(e,null),b(e,g),b(e,m),w(D,_,I),j(y,D,I),S=!0,T||($=Y(m,"click",n[3]),T=!0)},p(D,[I]){D[1].logo?C?C.p(D,I):(C=Hm(D),C.c(),C.m(t,null)):C&&(C.d(1),C=null),(!S||I&2)&&l!==(l=D[1].title+"")&&se(o,l),(!S||I&2)&&f!==(f=D[1].key.slice(0,-4)+"")&&se(c,f),D[0].enabled?M||(M=Vm(),M.c(),M.m(e,g)):M&&(M.d(1),M=null);const P={};y.$set(P)},i(D){S||(A(y.$$.fragment,D),S=!0)},o(D){L(y.$$.fragment,D),S=!1},d(D){D&&(k(e),k(_)),C&&C.d(),M&&M.d(),n[4](null),H(y,D),T=!1,$()}}}function s8(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(u){ne[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{u.detail[i.key]&&t(0,s=u.detail[i.key])};return n.$$set=u=>{"provider"in u&&t(1,i=u.provider),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class C1 extends ve{constructor(e){super(),be(this,e,s8,i8,he,{provider:1,config:0})}}function zm(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Bm(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function l8(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,u,f=pe(n[3]);const c=m=>m[9].key;for(let m=0;m0&&n[2].length>0&&Wm(),h=pe(n[2]);const g=m=>m[9].key;for(let m=0;m0&&m[2].length>0?d||(d=Wm(),d.c(),d.m(l.parentNode,l)):d&&(d.d(1),d=null),_&5&&(h=pe(m[2]),re(),r=yt(r,_,g,1,m,h,a,o,Ut,Ym,null,zm),ae())},i(m){if(!u){for(let _=0;_de(i,"config",r)),{key:n,first:null,c(){t=v("div"),V(i.$$.fragment),l=O(),p(t,"class","col-lg-6"),this.first=t},m(u,f){w(u,t,f),j(i,t,null),b(t,l),o=!0},p(u,f){e=u;const c={};f&8&&(c.provider=e[9]),!s&&f&9&&(s=!0,c.config=e[0][e[9].key],_e(()=>s=!1)),i.$set(c)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){L(i.$$.fragment,u),o=!1},d(u){u&&k(t),H(i)}}}function Wm(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ym(n,e){let t,i,s,l,o;function r(u){e[6](u,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new C1({props:a}),ne.push(()=>de(i,"config",r)),{key:n,first:null,c(){t=v("div"),V(i.$$.fragment),l=O(),p(t,"class","col-lg-6"),this.first=t},m(u,f){w(u,t,f),j(i,t,null),b(t,l),o=!0},p(u,f){e=u;const c={};f&4&&(c.provider=e[9]),!s&&f&5&&(s=!0,c.config=e[0][e[9].key],_e(()=>s=!1)),i.$set(c)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){L(i.$$.fragment,u),o=!1},d(u){u&&k(t),H(i)}}}function r8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g;const m=[o8,l8],_=[];function y(S,T){return S[1]?0:1}return d=y(n),h=_[d]=m[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[4]),r=O(),a=v("div"),u=v("div"),f=v("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(a,"class","wrapper")},m(S,T){w(S,e,T),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(S,r,T),w(S,a,T),b(a,u),b(u,f),b(u,c),_[d].m(u,null),g=!0},p(S,T){(!g||T&16)&&se(o,S[4]);let $=d;d=y(S),d===$?_[d].p(S,T):(re(),L(_[$],1,1,()=>{_[$]=null}),ae(),h=_[d],h?h.p(S,T):(h=_[d]=m[d](S),h.c()),A(h,1),h.m(u,null))},i(S){g||(A(h),g=!0)},o(S){L(h),g=!1},d(S){S&&(k(e),k(r),k(a)),_[d].d()}}}function a8(n){let e,t,i,s;return e=new Oi({}),i=new Sn({props:{$$slots:{default:[r8]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(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){l&&k(t),H(e,l),H(i,l)}}}function u8(n,e,t){let i,s,l;Ye(n,At,d=>t(4,l=d)),sn(At,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const d=await fe.settings.getAll()||{};u(d)}catch(d){fe.error(d)}t(1,o=!1)}function u(d){d=d||{},t(0,r={});for(const h of co)t(0,r[h.key]=Object.assign({enabled:!1},d[h.key]),r)}function f(d,h){n.$$.not_equal(r[h.key],d)&&(r[h.key]=d,t(0,r))}function c(d,h){n.$$.not_equal(r[h.key],d)&&(r[h.key]=d,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=co.filter(d=>{var h;return(h=r[d.key])==null?void 0:h.enabled})),n.$$.dirty&1&&t(2,s=co.filter(d=>{var h;return!((h=r[d.key])!=null&&h.enabled)}))},[r,o,s,i,l,f,c]}class f8 extends ve{constructor(e){super(),be(this,e,u8,a8,he,{})}}function c8(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=U(n[3]),i=U(" duration (in seconds)"),l=O(),o=v("input"),a=O(),u=v("div"),f=v("span"),f.textContent="Invalidate all previously issued tokens",p(e,"for",s=n[6]),p(o,"type","number"),p(o,"id",r=n[6]),o.required=!0,p(f,"class","link-primary"),Q(f,"txt-success",!!n[1]),p(u,"class","help-block")},m(h,g){w(h,e,g),b(e,t),b(e,i),w(h,l,g),w(h,o,g),oe(o,n[0]),w(h,a,g),w(h,u,g),b(u,f),c||(d=[Y(o,"input",n[4]),Y(f,"click",n[5])],c=!0)},p(h,g){g&8&&se(t,h[3]),g&64&&s!==(s=h[6])&&p(e,"for",s),g&64&&r!==(r=h[6])&&p(o,"id",r),g&1&&ht(o.value)!==h[0]&&oe(o,h[0]),g&2&&Q(f,"txt-success",!!h[1])},d(h){h&&(k(e),k(l),k(o),k(a),k(u)),c=!1,Ce(d)}}}function d8(n){let e,t;return e=new ce({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[c8,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(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 p8(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=ht(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=z.randomSecret(50))};return n.$$set=u=>{"key"in u&&t(2,i=u.key),"label"in u&&t(3,s=u.label),"duration"in u&&t(0,l=u.duration),"secret"in u&&t(1,o=u.secret)},[l,o,i,s,r,a]}class M1 extends ve{constructor(e){super(),be(this,e,p8,d8,he,{key:2,label:3,duration:0,secret:1})}}function Km(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function Jm(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function h8(n){let e,t,i=[],s=new Map,l,o,r,a,u,f=[],c=new Map,d,h,g,m,_,y,S,T,$,C,M,E=pe(n[5]);const D=N=>N[19].key;for(let N=0;NN[19].key;for(let N=0;Nde(i,"duration",r)),ne.push(()=>de(i,"secret",a)),{key:n,first:null,c(){t=ke(),V(i.$$.fragment),this.first=t},m(f,c){w(f,t,c),j(i,f,c),o=!0},p(f,c){e=f;const d={};!s&&c&33&&(s=!0,d.duration=e[0][e[19].key].duration,_e(()=>s=!1)),!l&&c&33&&(l=!0,d.secret=e[0][e[19].key].secret,_e(()=>l=!1)),i.$set(d)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){L(i.$$.fragment,f),o=!1},d(f){f&&k(t),H(i,f)}}}function Gm(n,e){let t,i,s,l,o;function r(f){e[13](f,e[19])}function a(f){e[14](f,e[19])}let u={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(u.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(u.secret=e[0][e[19].key].secret),i=new M1({props:u}),ne.push(()=>de(i,"duration",r)),ne.push(()=>de(i,"secret",a)),{key:n,first:null,c(){t=ke(),V(i.$$.fragment),this.first=t},m(f,c){w(f,t,c),j(i,f,c),o=!0},p(f,c){e=f;const d={};!s&&c&65&&(s=!0,d.duration=e[0][e[19].key].duration,_e(()=>s=!1)),!l&&c&65&&(l=!0,d.secret=e[0][e[19].key].secret,_e(()=>l=!1)),i.$set(d)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){L(i.$$.fragment,f),o=!1},d(f){f&&k(t),H(i,f)}}}function Xm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){w(l,e,o),b(e,t),i||(s=Y(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&k(e),i=!1,s()}}}function g8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_;const y=[m8,h8],S=[];function T($,C){return $[1]?0:1}return d=T(n),h=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[4]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,C){w($,e,C),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w($,r,C),w($,a,C),b(a,u),b(u,f),b(u,c),S[d].m(u,null),g=!0,m||(_=Y(u,"submit",Qe(n[7])),m=!0)},p($,C){(!g||C&16)&&se(o,$[4]);let M=d;d=T($),d===M?S[d].p($,C):(re(),L(S[M],1,1,()=>{S[M]=null}),ae(),h=S[d],h?h.p($,C):(h=S[d]=y[d]($),h.c()),A(h,1),h.m(u,null))},i($){g||(A(h),g=!0)},o($){L(h),g=!1},d($){$&&(k(e),k(r),k(a)),S[d].d(),m=!1,_()}}}function _8(n){let e,t,i,s;return e=new Oi({}),i=new Sn({props:{$$slots:{default:[g8]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(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){l&&k(t),H(e,l),H(i,l)}}}function b8(n,e,t){let i,s,l;Ye(n,At,M=>t(4,l=M));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"recordFileToken",label:"Records protected file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins protected file access token"}];sn(At,l="Token options",l);let a={},u={},f=!1,c=!1;d();async function d(){t(1,f=!0);try{const M=await fe.settings.getAll()||{};g(M)}catch(M){fe.error(M)}t(1,f=!1)}async function h(){if(!(c||!s)){t(2,c=!0);try{const M=await fe.settings.update(z.filterRedactedProps(u));g(M),jt("Successfully saved tokens options.")}catch(M){fe.error(M)}t(2,c=!1)}}function g(M){var D;M=M||{},t(0,u={});const E=o.concat(r);for(const I of E)t(0,u[I.key]={duration:((D=M[I.key])==null?void 0:D.duration)||0},u);t(9,a=JSON.parse(JSON.stringify(u)))}function m(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function _(M,E){n.$$.not_equal(u[E.key].duration,M)&&(u[E.key].duration=M,t(0,u))}function y(M,E){n.$$.not_equal(u[E.key].secret,M)&&(u[E.key].secret=M,t(0,u))}function S(M,E){n.$$.not_equal(u[E.key].duration,M)&&(u[E.key].duration=M,t(0,u))}function T(M,E){n.$$.not_equal(u[E.key].secret,M)&&(u[E.key].secret=M,t(0,u))}const $=()=>m(),C=()=>h();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(u))},[u,f,c,s,l,o,r,h,m,a,i,_,y,S,T,$,C]}class v8 extends ve{constructor(e){super(),be(this,e,b8,_8,he,{})}}function y8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g;return o=new h1({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in + another PocketBase environment.

    `,t=O(),i=v("div"),s=v("button"),s.innerHTML='Copy',l=O(),V(o.$$.fragment),r=O(),a=v("div"),u=v("div"),f=O(),c=v("button"),c.innerHTML=' Download as JSON',p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(m,_){w(m,e,_),w(m,t,_),w(m,i,_),b(i,s),b(i,l),j(o,i,null),n[8](i),w(m,r,_),w(m,a,_),b(a,u),b(a,f),b(a,c),d=!0,h||(g=[Y(s,"click",n[7]),Y(i,"keydown",n[9]),Y(c,"click",n[10])],h=!0)},p(m,_){const y={};_&4&&(y.content=m[2]),o.$set(y)},i(m){d||(A(o.$$.fragment,m),d=!0)},o(m){L(o.$$.fragment,m),d=!1},d(m){m&&(k(e),k(t),k(i),k(r),k(a)),H(o),n[8](null),h=!1,Ce(g)}}}function k8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function w8(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[k8,y8],g=[];function m(_,y){return _[1]?0:1}return f=m(n),c=g[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[3]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(_,y){w(_,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(_,r,y),w(_,a,y),b(a,u),g[f].m(u,null),d=!0},p(_,y){(!d||y&8)&&se(o,_[3]);let S=f;f=m(_),f===S?g[f].p(_,y):(re(),L(g[S],1,1,()=>{g[S]=null}),ae(),c=g[f],c?c.p(_,y):(c=g[f]=h[f](_),c.c()),A(c,1),c.m(u,null))},i(_){d||(A(c),d=!0)},o(_){L(c),d=!1},d(_){_&&(k(e),k(r),k(a)),g[f].d()}}}function S8(n){let e,t,i,s;return e=new Oi({}),i=new Sn({props:{$$slots:{default:[w8]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){l&&k(t),H(e,l),H(i,l)}}}function $8(n,e,t){let i,s;Ye(n,At,_=>t(3,s=_)),sn(At,s="Export collections",s);const l="export_"+z.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await fe.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let _ of r)delete _.created,delete _.updated}catch(_){fe.error(_)}t(1,a=!1)}function f(){z.downloadJson(r,"pb_schema")}function c(){z.copyToClipboard(i),bo("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function h(_){ne[_?"unshift":"push"](()=>{o=_,t(0,o)})}const g=_=>{if(_.ctrlKey&&_.code==="KeyA"){_.preventDefault();const y=window.getSelection(),S=document.createRange();S.selectNodeContents(o),y.removeAllRanges(),y.addRange(S)}},m=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,h,g,m]}class T8 extends ve{constructor(e){super(),be(this,e,$8,S8,he,{})}}function Qm(n,e,t){const i=n.slice();return i[14]=e[t],i}function xm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function eg(n,e,t){const i=n.slice();return i[14]=e[t],i}function tg(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function ng(n,e,t){const i=n.slice();return i[14]=e[t],i}function ig(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function sg(n,e,t){const i=n.slice();return i[30]=e[t],i}function C8(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&lg(),a=n[0].name!==n[1].name&&og(n);return{c(){e=v("div"),r&&r.c(),t=O(),a&&a.c(),i=O(),s=v("strong"),o=U(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){w(u,e,f),r&&r.m(e,null),b(e,t),a&&a.m(e,null),b(e,i),b(e,s),b(s,o)},p(u,f){u[9]?r||(r=lg(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=og(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&se(o,l)},d(u){u&&k(e),r&&r.d(),a&&a.d()}}}function M8(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=O(),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 u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&se(l,s)},d(r){r&&(k(e),k(t),k(i))}}}function O8(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=O(),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 u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&se(l,s)},d(r){r&&(k(e),k(t),k(i))}}}function lg(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 og(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=U(t),s=O(),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),k(s),k(l))}}}function rg(n){var g,m;let e,t,i,s,l,o,r=n[12]((g=n[0])==null?void 0:g[n[30]])+"",a,u,f,c,d=n[12]((m=n[1])==null?void 0:m[n[30]])+"",h;return{c(){var _,y,S,T,$,C;e=v("tr"),t=v("td"),i=v("span"),i.textContent=`${n[30]}`,s=O(),l=v("td"),o=v("pre"),a=U(r),u=O(),f=v("td"),c=v("pre"),h=U(d),p(t,"class","min-width svelte-lmkr38"),p(o,"class","txt"),p(l,"class","svelte-lmkr38"),Q(l,"changed-old-col",!n[10]&&yn((_=n[0])==null?void 0:_[n[30]],(y=n[1])==null?void 0:y[n[30]])),Q(l,"changed-none-col",n[10]),p(c,"class","txt"),p(f,"class","svelte-lmkr38"),Q(f,"changed-new-col",!n[5]&&yn((S=n[0])==null?void 0:S[n[30]],(T=n[1])==null?void 0:T[n[30]])),Q(f,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),Q(e,"txt-primary",yn(($=n[0])==null?void 0:$[n[30]],(C=n[1])==null?void 0:C[n[30]]))},m(_,y){w(_,e,y),b(e,t),b(t,i),b(e,s),b(e,l),b(l,o),b(o,a),b(e,u),b(e,f),b(f,c),b(c,h)},p(_,y){var S,T,$,C,M,E,D,I;y[0]&1&&r!==(r=_[12]((S=_[0])==null?void 0:S[_[30]])+"")&&se(a,r),y[0]&3075&&Q(l,"changed-old-col",!_[10]&&yn((T=_[0])==null?void 0:T[_[30]],($=_[1])==null?void 0:$[_[30]])),y[0]&1024&&Q(l,"changed-none-col",_[10]),y[0]&2&&d!==(d=_[12]((C=_[1])==null?void 0:C[_[30]])+"")&&se(h,d),y[0]&2083&&Q(f,"changed-new-col",!_[5]&&yn((M=_[0])==null?void 0:M[_[30]],(E=_[1])==null?void 0:E[_[30]])),y[0]&32&&Q(f,"changed-none-col",_[5]),y[0]&2051&&Q(e,"txt-primary",yn((D=_[0])==null?void 0:D[_[30]],(I=_[1])==null?void 0:I[_[30]]))},d(_){_&&k(e)}}}function ag(n){let e,t=pe(n[6]),i=[];for(let s=0;sProps Old New',l=O(),o=v("tbody");for(let $=0;$!["schema","created","updated"].includes(y));function m(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(S=>y.id==S.id))))}function _(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,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&m(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(S=>y.id==S.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(S=>S.id==y.id))),n.$$.dirty[0]&24&&t(8,h=f.filter(y=>!u.find(S=>S.id==y.id))),n.$$.dirty[0]&7&&t(9,l=z.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,h,l,s,g,_]}class A8 extends ve{constructor(e){super(),be(this,e,D8,E8,he,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function gg(n,e,t){const i=n.slice();return i[17]=e[t],i}function _g(n){let e,t;return e=new A8({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){V(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function I8(n){let e,t,i=pe(n[2]),s=[];for(let o=0;oL(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{g()}):g()}async function g(){if(!u){t(4,u=!0);try{await fe.collections.import(o,a),jt("Successfully imported collections configuration."),i("submit")}catch($){fe.error($)}t(4,u=!1),c()}}const m=()=>h(),_=()=>!u;function y($){ne[$?"unshift":"push"](()=>{s=$,t(1,s)})}function S($){Ne.call(this,n,$)}function T($){Ne.call(this,n,$)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,h,f,l,o,m,_,y,S,T]}class R8 extends ve{constructor(e){super(),be(this,e,N8,F8,he,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function bg(n,e,t){const i=n.slice();return i[32]=e[t],i}function vg(n,e,t){const i=n.slice();return i[35]=e[t],i}function yg(n,e,t){const i=n.slice();return i[32]=e[t],i}function q8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M,E;a=new ce({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[H8,({uniqueId:R})=>({40:R}),({uniqueId:R})=>[0,R?512:0]]},$$scope:{ctx:n}}});let D=!1,I=n[6]&&n[1].length&&!n[7]&&wg(),P=n[6]&&n[1].length&&n[7]&&Sg(n),F=n[13].length&&Pg(n),N=!!n[0]&&Fg(n);return{c(){e=v("input"),t=O(),i=v("div"),s=v("p"),l=U(`Paste below the collections configuration you want to import or + `),o=v("button"),o.innerHTML='Load from JSON file',r=O(),V(a.$$.fragment),u=O(),f=O(),I&&I.c(),c=O(),P&&P.c(),d=O(),F&&F.c(),h=O(),g=v("div"),N&&N.c(),m=O(),_=v("div"),y=O(),S=v("button"),T=v("span"),T.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),Q(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(_,"class","flex-fill"),p(T,"class","txt"),p(S,"type","button"),p(S,"class","btn btn-expanded btn-warning m-l-auto"),S.disabled=$=!n[14],p(g,"class","flex m-t-base")},m(R,q){w(R,e,q),n[19](e),w(R,t,q),w(R,i,q),b(i,s),b(s,l),b(s,o),w(R,r,q),j(a,R,q),w(R,u,q),w(R,f,q),I&&I.m(R,q),w(R,c,q),P&&P.m(R,q),w(R,d,q),F&&F.m(R,q),w(R,h,q),w(R,g,q),N&&N.m(g,null),b(g,m),b(g,_),b(g,y),b(g,S),b(S,T),C=!0,M||(E=[Y(e,"change",n[20]),Y(o,"click",n[21]),Y(S,"click",n[26])],M=!0)},p(R,q){(!C||q[0]&4096)&&Q(o,"btn-loading",R[12]);const B={};q[0]&64&&(B.class="form-field "+(R[6]?"":"field-error")),q[0]&65|q[1]&1536&&(B.$$scope={dirty:q,ctx:R}),a.$set(B),R[6]&&R[1].length&&!R[7]?I||(I=wg(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),R[6]&&R[1].length&&R[7]?P?P.p(R,q):(P=Sg(R),P.c(),P.m(d.parentNode,d)):P&&(P.d(1),P=null),R[13].length?F?F.p(R,q):(F=Pg(R),F.c(),F.m(h.parentNode,h)):F&&(F.d(1),F=null),R[0]?N?N.p(R,q):(N=Fg(R),N.c(),N.m(g,m)):N&&(N.d(1),N=null),(!C||q[0]&16384&&$!==($=!R[14]))&&(S.disabled=$)},i(R){C||(A(a.$$.fragment,R),A(D),C=!0)},o(R){L(a.$$.fragment,R),L(D),C=!1},d(R){R&&(k(e),k(t),k(i),k(r),k(u),k(f),k(c),k(d),k(h),k(g)),n[19](null),H(a,R),I&&I.d(R),P&&P.d(R),F&&F.d(R),N&&N.d(),M=!1,Ce(E)}}}function j8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function kg(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 H8(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&kg();return{c(){e=v("label"),t=U("Collections"),s=O(),l=v("textarea"),r=O(),c&&c.c(),a=ke(),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,h){w(d,e,h),b(e,t),w(d,s,h),w(d,l,h),oe(l,n[0]),w(d,r,h),c&&c.m(d,h),w(d,a,h),u||(f=Y(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&oe(l,d[0]),d[0]&&!d[6]?c||(c=kg(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&(k(e),k(s),k(l),k(r),k(a)),c&&c.d(d),u=!1,f()}}}function wg(n){let e;return{c(){e=v("div"),e.innerHTML='
    Your collections configuration is already up-to-date!
    ',p(e,"class","alert alert-info")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Sg(n){let e,t,i,s,l,o=n[9].length&&$g(n),r=n[4].length&&Mg(n),a=n[8].length&&Ag(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=O(),i=v("div"),o&&o.c(),s=O(),r&&r.c(),l=O(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),o&&o.m(i,null),b(i,s),r&&r.m(i,null),b(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=$g(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=Mg(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=Ag(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&(k(e),k(t),k(i)),o&&o.d(),r&&r.d(),a&&a.d()}}}function $g(n){let e=[],t=new Map,i,s=pe(n[9]);const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=O(),s=v("div"),s.innerHTML=`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.`,l=O(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){w(u,e,f),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:x,d(u){u&&k(e),r=!1,a()}}}function Fg(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',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:x,d(s){s&&k(e),t=!1,i()}}}function V8(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[j8,q8],g=[];function m(_,y){return _[5]?0:1}return f=m(n),c=g[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[15]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(_,y){w(_,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(_,r,y),w(_,a,y),b(a,u),g[f].m(u,null),d=!0},p(_,y){(!d||y[0]&32768)&&se(o,_[15]);let S=f;f=m(_),f===S?g[f].p(_,y):(re(),L(g[S],1,1,()=>{g[S]=null}),ae(),c=g[f],c?c.p(_,y):(c=g[f]=h[f](_),c.c()),A(c,1),c.m(u,null))},i(_){d||(A(c),d=!0)},o(_){L(c),d=!1},d(_){_&&(k(e),k(r),k(a)),g[f].d()}}}function z8(n){let e,t,i,s,l,o;e=new Oi({}),i=new Sn({props:{$$slots:{default:[V8]},$$scope:{ctx:n}}});let r={};return l=new R8({props:r}),n[27](l),l.$on("submit",n[28]),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment),s=O(),V(l.$$.fragment)},m(a,u){j(e,a,u),w(a,t,u),j(i,a,u),w(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){a&&(k(t),k(s)),H(e,a),H(i,a),n[27](null),H(l,a)}}}function B8(n,e,t){let i,s,l,o,r,a,u;Ye(n,At,G=>t(15,u=G)),sn(At,u="Import collections",u);let f,c,d="",h=!1,g=[],m=[],_=!0,y=[],S=!1;T();async function T(){t(5,S=!0);try{t(2,m=await fe.collections.getFullList(200));for(let G of m)delete G.created,delete G.updated}catch(G){fe.error(G)}t(5,S=!1)}function $(){if(t(4,y=[]),!!i)for(let G of g){const ue=z.findByKey(m,"id",G.id);!(ue!=null&&ue.id)||!z.hasCollectionChanges(ue,G,_)||y.push({new:G,old:ue})}}function C(){t(1,g=[]);try{t(1,g=JSON.parse(d))}catch{}Array.isArray(g)?t(1,g=z.filterDuplicatesByKey(g)):t(1,g=[]);for(let G of g)delete G.created,delete G.updated,G.schema=z.filterDuplicatesByKey(G.schema)}function M(){var G,ue;for(let ee of g){const te=z.findByKey(m,"name",ee.name)||z.findByKey(m,"id",ee.id);if(!te)continue;const Ee=ee.id,Fe=te.id;ee.id=Fe;const Ve=Array.isArray(te.schema)?te.schema:[],ze=Array.isArray(ee.schema)?ee.schema:[];for(const Se of ze){const Me=z.findByKey(Ve,"name",Se.name);Me&&Me.id&&(Se.id=Me.id)}for(let Se of g)if(Array.isArray(Se.schema))for(let Me of Se.schema)(G=Me.options)!=null&&G.collectionId&&((ue=Me.options)==null?void 0:ue.collectionId)===Ee&&(Me.options.collectionId=Fe)}t(0,d=JSON.stringify(g,null,4))}function E(G){t(12,h=!0);const ue=new FileReader;ue.onload=async ee=>{t(12,h=!1),t(10,f.value="",f),t(0,d=ee.target.result),await ln(),g.length||(ls("Invalid collections configuration."),D())},ue.onerror=ee=>{console.warn(ee),ls("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},ue.readAsText(G)}function D(){t(0,d=""),t(10,f.value="",f),tn({})}function I(G){ne[G?"unshift":"push"](()=>{f=G,t(10,f)})}const P=()=>{f.files.length&&E(f.files[0])},F=()=>{f.click()};function N(){d=this.value,t(0,d)}function R(){_=this.checked,t(3,_)}const q=()=>M(),B=()=>D(),K=()=>c==null?void 0:c.show(m,g,_);function J(G){ne[G?"unshift":"push"](()=>{c=G,t(11,c)})}const X=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&C(),n.$$.dirty[0]&3&&t(6,i=!!d&&g.length&&g.length===g.filter(G=>!!G.id&&!!G.name).length),n.$$.dirty[0]&78&&t(9,s=m.filter(G=>i&&_&&!z.findByKey(g,"id",G.id))),n.$$.dirty[0]&70&&t(8,l=g.filter(G=>i&&!z.findByKey(m,"id",G.id))),n.$$.dirty[0]&10&&(typeof g<"u"||typeof _<"u")&&$(),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=g.filter(G=>{let ue=z.findByKey(m,"name",G.name)||z.findByKey(m,"id",G.id);if(!ue)return!1;if(ue.id!=G.id)return!0;const ee=Array.isArray(ue.schema)?ue.schema:[],te=Array.isArray(G.schema)?G.schema:[];for(const Ee of te){if(z.findByKey(ee,"id",Ee.id))continue;const Ve=z.findByKey(ee,"name",Ee.name);if(Ve&&Ee.id!=Ve.id)return!0}return!1}))},[d,g,m,_,y,S,i,o,l,s,f,c,h,a,r,u,M,E,D,I,P,F,N,R,q,B,K,J,X]}class U8 extends ve{constructor(e){super(),be(this,e,B8,z8,he,{},null,[-1,-1])}}function W8(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Backup name"),s=O(),l=v("input"),r=O(),a=v("em"),a.textContent="Must be in the format [a-z0-9_-].zip",p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",o=n[15]),p(l,"placeholder","Leave empty to autogenerate"),p(l,"pattern","^[a-z0-9_-]+\\.zip$"),p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),oe(l,n[2]),w(c,r,d),w(c,a,d),u||(f=Y(l,"input",n[7]),u=!0)},p(c,d){d&32768&&i!==(i=c[15])&&p(e,"for",i),d&32768&&o!==(o=c[15])&&p(l,"id",o),d&4&&l.value!==c[2]&&oe(l,c[2])},d(c){c&&(k(e),k(s),k(l),k(r),k(a)),u=!1,f()}}}function Y8(n){let e,t,i,s,l,o,r;return s=new ce({props:{class:"form-field m-0",name:"name",$$slots:{default:[W8,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`

    Please note that during the backup other concurrent write requests may fail since the + database will be temporary "locked" (this usually happens only during the ZIP generation).

    If you are using S3 storage for the collections file upload, you'll have to backup them + separately since they are not locally stored and will not be included in the final backup!

    `,t=O(),i=v("form"),V(s.$$.fragment),p(e,"class","alert alert-info"),p(i,"id",n[4]),p(i,"autocomplete","off")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),j(s,i,null),l=!0,o||(r=Y(i,"submit",Qe(n[5])),o=!0)},p(a,u){const f={};u&98308&&(f.$$scope={dirty:u,ctx:a}),s.$set(f)},i(a){l||(A(s.$$.fragment,a),l=!0)},o(a){L(s.$$.fragment,a),l=!1},d(a){a&&(k(e),k(t),k(i)),H(s),o=!1,r()}}}function K8(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:x,d(t){t&&k(e)}}}function J8(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),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],Q(s,"btn-loading",n[3])},m(a,u){w(a,e,u),b(e,t),w(a,i,u),w(a,s,u),b(s,l),o||(r=Y(e,"click",n[0]),o=!0)},p(a,u){u&8&&(e.disabled=a[3]),u&8&&(s.disabled=a[3]),u&8&&Q(s,"btn-loading",a[3])},d(a){a&&(k(e),k(i),k(s)),o=!1,r()}}}function Z8(n){let e,t,i={class:"backup-create-panel",beforeOpen:n[8],beforeHide:n[9],popup:!0,$$slots:{footer:[J8],header:[K8],default:[Y8]},$$scope:{ctx:n}};return e=new on({props:i}),n[10](e),e.$on("show",n[11]),e.$on("hide",n[12]),{c(){V(e.$$.fragment)},m(s,l){j(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 G8(n,e,t){const i=wt(),s="backup_create_"+z.randomString(5);let l,o="",r=!1,a;function u(S){tn({}),t(3,r=!1),t(2,o=S||""),l==null||l.show()}function f(){return l==null?void 0:l.hide()}async function c(){if(!r){t(3,r=!0),clearTimeout(a),a=setTimeout(()=>{f()},1500);try{await fe.backups.create(o,{$cancelKey:s}),t(3,r=!1),f(),i("submit"),jt("Successfully generated new backup.")}catch(S){S.isAbort||fe.error(S)}clearTimeout(a),t(3,r=!1)}}Is(()=>{clearTimeout(a)});function d(){o=this.value,t(2,o)}const h=()=>r?(bo("A backup has already been started, please wait."),!1):!0,g=()=>(r&&bo("The backup was started but may take a while to complete. You can come back later.",4500),!0);function m(S){ne[S?"unshift":"push"](()=>{l=S,t(1,l)})}function _(S){Ne.call(this,n,S)}function y(S){Ne.call(this,n,S)}return[f,l,o,r,s,c,u,d,h,g,m,_,y]}class X8 extends ve{constructor(e){super(),be(this,e,G8,Z8,he,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function Q8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Backup name"),s=O(),l=v("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",o=n[15]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[2]),r||(a=Y(l,"input",n[9]),r=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&o!==(o=u[15])&&p(l,"id",o),f&4&&l.value!==u[2]&&oe(l,u[2])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function x8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_;return u=new qs({props:{value:n[1]}}),h=new ce({props:{class:"form-field required m-0",name:"name",$$slots:{default:[Q8,({uniqueId:y})=>({15:y}),({uniqueId:y})=>y?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`

    Please proceed with caution. +
    + Backup restore is still experimental and currently works only on UNIX based systems.

    The restore operation will attempt to replace your existing pb_data with the one from + the backup and will restart the application process.

    Nothing will happen if the backup file is invalid or incompatible.

    `,t=O(),i=v("div"),s=U(`Type the backup name + `),l=v("div"),o=v("span"),r=U(n[1]),a=O(),V(u.$$.fragment),f=U(` + to confirm:`),c=O(),d=v("form"),V(h.$$.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),j(u,l,null),b(i,f),w(y,c,S),w(y,d,S),j(h,d,null),g=!0,m||(_=Y(d,"submit",Qe(n[7])),m=!0)},p(y,S){(!g||S&2)&&se(r,y[1]);const T={};S&2&&(T.value=y[1]),u.$set(T);const $={};S&98308&&($.$$scope={dirty:S,ctx:y}),h.$set($)},i(y){g||(A(u.$$.fragment,y),A(h.$$.fragment,y),g=!0)},o(y){L(u.$$.fragment,y),L(h.$$.fragment,y),g=!1},d(y){y&&(k(e),k(t),k(i),k(c),k(d)),H(u),H(h),m=!1,_()}}}function eI(n){let e,t,i,s;return{c(){e=v("h4"),t=U("Restore "),i=v("strong"),s=U(n[1]),p(e,"class","popup-title txt-ellipsis svelte-1fcgldh")},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 tI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Cancel"),i=O(),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],Q(s,"btn-loading",n[4])},m(u,f){w(u,e,f),b(e,t),w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&Q(s,"btn-loading",u[4])},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function nI(n){let e,t,i={class:"backup-restore-panel",overlayClose:!n[4],escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[tI],header:[eI],default:[x8]},$$scope:{ctx:n}};return e=new on({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){V(e.$$.fragment)},m(s,l){j(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&65590&&(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 iI(n,e,t){let i;const s="backup_restore_"+z.randomString(5);let l,o="",r="",a=!1,u=null;function f(S){tn({}),t(2,r=""),t(1,o=S),t(4,a=!1),l==null||l.show()}function c(){return l==null?void 0:l.hide()}async function d(){var S;if(!(!i||a)){clearTimeout(u),t(4,a=!0);try{await fe.backups.restore(o),u=setTimeout(()=>{window.location.reload()},2e3)}catch(T){clearTimeout(u),T!=null&&T.isAbort||(t(4,a=!1),ls(((S=T.response)==null?void 0:S.message)||T.message))}}}Is(()=>{clearTimeout(u)});function h(){r=this.value,t(2,r)}const g=()=>!a;function m(S){ne[S?"unshift":"push"](()=>{l=S,t(3,l)})}function _(S){Ne.call(this,n,S)}function y(S){Ne.call(this,n,S)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=r!=""&&o==r)},[c,o,r,l,a,i,s,d,f,h,g,m,_,y]}class sI extends ve{constructor(e){super(),be(this,e,iI,nI,he,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function Ng(n,e,t){const i=n.slice();return i[22]=e[t],i}function Rg(n,e,t){const i=n.slice();return i[19]=e[t],i}function lI(n){let e=[],t=new Map,i,s,l=pe(n[3]);const o=a=>a[22].key;for(let a=0;aNo backups yet. ',p(e,"class","list-item list-item-placeholder svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function jg(n,e){let t,i,s,l,o,r=e[22].key+"",a,u,f,c,d,h=z.formattedFileSize(e[22].size)+"",g,m,_,y,S,T,$,C,M,E,D,I,P,F,N,R,q,B,K,J;function X(){return e[10](e[22])}function G(){return e[11](e[22])}function ue(){return e[12](e[22])}return{key:n,first:null,c(){t=v("div"),i=v("i"),s=O(),l=v("div"),o=v("span"),a=U(r),f=O(),c=v("span"),d=U("("),g=U(h),m=U(")"),_=O(),y=v("div"),S=v("button"),T=v("i"),C=O(),M=v("button"),E=v("i"),I=O(),P=v("button"),F=v("i"),R=O(),p(i,"class","ri-folder-zip-line"),p(o,"class","name backup-name svelte-1ulbkf5"),p(o,"title",u=e[22].key),p(c,"class","size txt-hint txt-nowrap"),p(l,"class","content"),p(T,"class","ri-download-line"),p(S,"type","button"),p(S,"class","btn btn-sm btn-circle btn-hint btn-transparent"),S.disabled=$=e[6][e[22].key]||e[5][e[22].key],p(S,"aria-label","Download"),Q(S,"btn-loading",e[5][e[22].key]),p(E,"class","ri-restart-line"),p(M,"type","button"),p(M,"class","btn btn-sm btn-circle btn-hint btn-transparent"),M.disabled=D=e[6][e[22].key],p(M,"aria-label","Restore"),p(F,"class","ri-delete-bin-7-line"),p(P,"type","button"),p(P,"class","btn btn-sm btn-circle btn-hint btn-transparent"),P.disabled=N=e[6][e[22].key],p(P,"aria-label","Delete"),Q(P,"btn-loading",e[6][e[22].key]),p(y,"class","actions nonintrusive"),p(t,"class","list-item svelte-1ulbkf5"),this.first=t},m(ee,te){w(ee,t,te),b(t,i),b(t,s),b(t,l),b(l,o),b(o,a),b(l,f),b(l,c),b(c,d),b(c,g),b(c,m),b(t,_),b(t,y),b(y,S),b(S,T),b(y,C),b(y,M),b(M,E),b(y,I),b(y,P),b(P,F),b(t,R),B=!0,K||(J=[$e(He.call(null,S,"Download")),Y(S,"click",Qe(X)),$e(He.call(null,M,"Restore")),Y(M,"click",Qe(G)),$e(He.call(null,P,"Delete")),Y(P,"click",Qe(ue))],K=!0)},p(ee,te){e=ee,(!B||te&8)&&r!==(r=e[22].key+"")&&se(a,r),(!B||te&8&&u!==(u=e[22].key))&&p(o,"title",u),(!B||te&8)&&h!==(h=z.formattedFileSize(e[22].size)+"")&&se(g,h),(!B||te&104&&$!==($=e[6][e[22].key]||e[5][e[22].key]))&&(S.disabled=$),(!B||te&40)&&Q(S,"btn-loading",e[5][e[22].key]),(!B||te&72&&D!==(D=e[6][e[22].key]))&&(M.disabled=D),(!B||te&72&&N!==(N=e[6][e[22].key]))&&(P.disabled=N),(!B||te&72)&&Q(P,"btn-loading",e[6][e[22].key])},i(ee){B||(ee&&Xe(()=>{B&&(q||(q=qe(t,nt,{duration:150},!0)),q.run(1))}),B=!0)},o(ee){ee&&(q||(q=qe(t,nt,{duration:150},!1)),q.run(0)),B=!1},d(ee){ee&&k(t),ee&&q&&q.end(),K=!1,Ce(J)}}}function Hg(n){let e;return{c(){e=v("div"),e.innerHTML=' ',p(e,"class","list-item list-item-loader svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function rI(n){let e,t,i;return{c(){e=v("span"),t=O(),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),k(t),k(i))}}}function aI(n){let e,t,i;return{c(){e=v("i"),t=O(),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),k(t),k(i))}}}function uI(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m;const _=[oI,lI],y=[];function S(D,I){return D[4]?0:1}i=S(n),s=y[i]=_[i](n);function T(D,I){return D[7]?aI:rI}let $=T(n),C=$(n),M={};f=new X8({props:M}),n[14](f),f.$on("submit",n[15]);let E={};return d=new sI({props:E}),n[16](d),{c(){e=v("div"),t=v("div"),s.c(),l=O(),o=v("div"),r=v("button"),C.c(),u=O(),V(f.$$.fragment),c=O(),V(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),C.m(r,null),w(D,u,I),j(f,D,I),w(D,c,I),j(d,D,I),h=!0,g||(m=Y(r,"click",n[13]),g=!0)},p(D,[I]){let P=i;i=S(D),i===P?y[i].p(D,I):(re(),L(y[P],1,1,()=>{y[P]=null}),ae(),s=y[i],s?s.p(D,I):(s=y[i]=_[i](D),s.c()),A(s,1),s.m(t,null)),$!==($=T(D))&&(C.d(1),C=$(D),C&&(C.c(),C.m(r,null))),(!h||I&144&&a!==(a=D[4]||!D[7]))&&(r.disabled=a);const F={};f.$set(F);const N={};d.$set(N)},i(D){h||(A(s),A(f.$$.fragment,D),A(d.$$.fragment,D),h=!0)},o(D){L(s),L(f.$$.fragment,D),L(d.$$.fragment,D),h=!1},d(D){D&&(k(e),k(u),k(c)),y[i].d(),C.d(),n[14](null),H(f,D),n[16](null),H(d,D),g=!1,m()}}}function fI(n,e,t){let i,s,l=[],o=!1,r={},a={},u=!0;f(),g();async function f(){t(4,o=!0);try{t(3,l=await fe.backups.getFullList()),l.sort((M,E)=>M.modifiedE.modified?-1:0),t(4,o=!1)}catch(M){M.isAbort||(fe.error(M),t(4,o=!1))}}async function c(M){if(!r[M]){t(5,r[M]=!0,r);try{const E=await fe.getAdminFileToken(),D=fe.backups.getDownloadUrl(E,M);z.download(D)}catch(E){E.isAbort||fe.error(E)}delete r[M],t(5,r)}}function d(M){mn(`Do you really want to delete ${M}?`,()=>h(M))}async function h(M){if(!a[M]){t(6,a[M]=!0,a);try{await fe.backups.delete(M),z.removeByKey(l,"name",M),f(),jt(`Successfully deleted ${M}.`)}catch(E){E.isAbort||fe.error(E)}delete a[M],t(6,a)}}async function g(){var M;try{const E=await fe.health.check({$autoCancel:!1}),D=u;t(7,u=((M=E==null?void 0:E.data)==null?void 0:M.canBackup)||!1),D!=u&&u&&f()}catch{}}Zt(()=>{let M=setInterval(()=>{g()},3e3);return()=>{clearInterval(M)}});const m=M=>c(M.key),_=M=>s.show(M.key),y=M=>d(M.key),S=()=>i==null?void 0:i.show();function T(M){ne[M?"unshift":"push"](()=>{i=M,t(1,i)})}const $=()=>{f()};function C(M){ne[M?"unshift":"push"](()=>{s=M,t(2,s)})}return[f,i,s,l,o,r,a,u,c,d,m,_,y,S,T,$,C]}class cI extends ve{constructor(e){super(),be(this,e,fI,uI,he,{loadBackups:0})}get loadBackups(){return this.$$.ctx[0]}}function dI(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("i"),s=O(),l=v("input"),p(t,"class","ri-upload-cloud-line"),p(e,"type","button"),p(e,"class",i="btn btn-circle btn-transparent "+n[0]),p(e,"aria-label","Upload backup"),Q(e,"btn-loading",n[2]),Q(e,"btn-disabled",n[2]),p(l,"type","file"),p(l,"accept","application/zip"),p(l,"class","hidden")},m(a,u){w(a,e,u),b(e,t),w(a,s,u),w(a,l,u),n[5](l),o||(r=[$e(He.call(null,e,"Upload backup")),Y(e,"click",n[4]),Y(l,"change",n[3])],o=!0)},p(a,[u]){u&1&&i!==(i="btn btn-circle btn-transparent "+a[0])&&p(e,"class",i),u&5&&Q(e,"btn-loading",a[2]),u&5&&Q(e,"btn-disabled",a[2])},i:x,o:x,d(a){a&&(k(e),k(s),k(l)),n[5](null),o=!1,Ce(r)}}}const Vg="upload_backup";function pI(n,e,t){const i=wt();let{class:s=""}=e,l,o=!1;async function r(f){var d,h,g,m,_;if(o||!((h=(d=f==null?void 0:f.target)==null?void 0:d.files)!=null&&h.length))return;t(2,o=!0);const c=new FormData;c.set("file",f.target.files[0]);try{await fe.backups.upload(c,{requestKey:Vg}),t(2,o=!1),i("success"),jt("Successfully uploaded a new backup.")}catch(y){y.isAbort||(t(2,o=!1),(_=(m=(g=y.response)==null?void 0:g.data)==null?void 0:m.file)!=null&&_.message?ls(y.response.data.file.message):fe.error(y))}}Is(()=>{fe.cancelRequest(Vg)});const a=()=>l==null?void 0:l.click();function u(f){ne[f?"unshift":"push"](()=>{l=f,t(1,l)})}return n.$$set=f=>{"class"in f&&t(0,s=f.class)},[s,l,o,r,a,u]}class hI extends ve{constructor(e){super(),be(this,e,pI,dI,he,{class:0})}}function mI(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 gI(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 zg(n){var B,K,J;let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M,E;t=new ce({props:{class:"form-field form-field-toggle m-t-base m-b-0",$$slots:{default:[_I,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});let D=n[2]&&Bg(n);function I(X){n[24](X)}function P(X){n[25](X)}function F(X){n[26](X)}let N={toggleLabel:"Store backups in S3 storage",testFilesystem:"backups",configKey:"backups.s3",originalConfig:(B=n[0].backups)==null?void 0:B.s3};n[1].backups.s3!==void 0&&(N.config=n[1].backups.s3),n[7]!==void 0&&(N.isTesting=n[7]),n[8]!==void 0&&(N.testError=n[8]),r=new T1({props:N}),ne.push(()=>de(r,"config",I)),ne.push(()=>de(r,"isTesting",P)),ne.push(()=>de(r,"testError",F));let R=((J=(K=n[1].backups)==null?void 0:K.s3)==null?void 0:J.enabled)&&!n[9]&&!n[5]&&Ug(n),q=n[9]&&Wg(n);return{c(){e=v("form"),V(t.$$.fragment),i=O(),D&&D.c(),s=O(),l=v("div"),o=O(),V(r.$$.fragment),c=O(),d=v("div"),h=v("div"),g=O(),R&&R.c(),m=O(),q&&q.c(),_=O(),y=v("button"),S=v("span"),S.textContent="Save changes",p(l,"class","clearfix m-b-base"),p(h,"class","flex-fill"),p(S,"class","txt"),p(y,"type","submit"),p(y,"class","btn btn-expanded"),y.disabled=T=!n[9]||n[5],Q(y,"btn-loading",n[5]),p(d,"class","flex"),p(e,"class","block"),p(e,"autocomplete","off")},m(X,G){w(X,e,G),j(t,e,null),b(e,i),D&&D.m(e,null),b(e,s),b(e,l),b(e,o),j(r,e,null),b(e,c),b(e,d),b(d,h),b(d,g),R&&R.m(d,null),b(d,m),q&&q.m(d,null),b(d,_),b(d,y),b(y,S),C=!0,M||(E=[Y(y,"click",n[28]),Y(e,"submit",Qe(n[11]))],M=!0)},p(X,G){var te,Ee,Fe;const ue={};G[0]&4|G[1]&3&&(ue.$$scope={dirty:G,ctx:X}),t.$set(ue),X[2]?D?(D.p(X,G),G[0]&4&&A(D,1)):(D=Bg(X),D.c(),A(D,1),D.m(e,s)):D&&(re(),L(D,1,1,()=>{D=null}),ae());const ee={};G[0]&1&&(ee.originalConfig=(te=X[0].backups)==null?void 0:te.s3),!a&&G[0]&2&&(a=!0,ee.config=X[1].backups.s3,_e(()=>a=!1)),!u&&G[0]&128&&(u=!0,ee.isTesting=X[7],_e(()=>u=!1)),!f&&G[0]&256&&(f=!0,ee.testError=X[8],_e(()=>f=!1)),r.$set(ee),(Fe=(Ee=X[1].backups)==null?void 0:Ee.s3)!=null&&Fe.enabled&&!X[9]&&!X[5]?R?R.p(X,G):(R=Ug(X),R.c(),R.m(d,m)):R&&(R.d(1),R=null),X[9]?q?q.p(X,G):(q=Wg(X),q.c(),q.m(d,_)):q&&(q.d(1),q=null),(!C||G[0]&544&&T!==(T=!X[9]||X[5]))&&(y.disabled=T),(!C||G[0]&32)&&Q(y,"btn-loading",X[5])},i(X){C||(A(t.$$.fragment,X),A(D),A(r.$$.fragment,X),X&&Xe(()=>{C&&($||($=qe(e,nt,{duration:150},!0)),$.run(1))}),C=!0)},o(X){L(t.$$.fragment,X),L(D),L(r.$$.fragment,X),X&&($||($=qe(e,nt,{duration:150},!1)),$.run(0)),C=!1},d(X){X&&k(e),H(t),D&&D.d(),H(r),R&&R.d(),q&&q.d(),X&&$&&$.end(),M=!1,Ce(E)}}}function _I(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Enable auto backups"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(s,"for",o=n[31])},m(u,f){w(u,e,f),e.checked=n[2],w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[17]),r=!0)},p(u,f){f[1]&1&&t!==(t=u[31])&&p(e,"id",t),f[0]&4&&(e.checked=u[2]),f[1]&1&&o!==(o=u[31])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Bg(n){let e,t,i,s,l,o,r,a,u;return s=new ce({props:{class:"form-field required",name:"backups.cron",$$slots:{default:[vI,({uniqueId:f})=>({31:f}),({uniqueId:f})=>[0,f?1:0]]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"backups.cronMaxKeep",$$slots:{default:[yI,({uniqueId:f})=>({31:f}),({uniqueId:f})=>[0,f?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),V(s.$$.fragment),l=O(),o=v("div"),V(r.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(t,"class","grid p-t-base p-b-sm"),p(e,"class","block")},m(f,c){w(f,e,c),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),u=!0},p(f,c){const d={};c[0]&3|c[1]&3&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&2|c[1]&3&&(h.$$scope={dirty:c,ctx:f}),r.$set(h)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&Xe(()=>{u&&(a||(a=qe(e,nt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){L(s.$$.fragment,f),L(r.$$.fragment,f),f&&(a||(a=qe(e,nt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),H(s),H(r),f&&a&&a.end()}}}function bI(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Every day at 00:00h',t=O(),i=v("button"),i.innerHTML='Every sunday at 00:00h',s=O(),l=v("button"),l.innerHTML='Every Mon and Wed at 00:00h',o=O(),r=v("button"),r.innerHTML='Every first day of the month at 00:00h',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){w(f,e,c),w(f,t,c),w(f,i,c),w(f,s,c),w(f,l,c),w(f,o,c),w(f,r,c),a||(u=[Y(e,"click",n[19]),Y(i,"click",n[20]),Y(l,"click",n[21]),Y(r,"click",n[22])],a=!0)},p:x,d(f){f&&(k(e),k(t),k(i),k(s),k(l),k(o),k(r)),a=!1,Ce(u)}}}function vI(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$;return m=new Rn({props:{class:"dropdown dropdown-nowrap dropdown-right",$$slots:{default:[bI]},$$scope:{ctx:n}}}),{c(){var C,M;e=v("label"),t=U("Cron expression"),s=O(),l=v("input"),a=O(),u=v("div"),f=v("button"),c=v("span"),c.textContent="Presets",d=O(),h=v("i"),g=O(),V(m.$$.fragment),_=O(),y=v("div"),y.innerHTML=`

    Supports numeric list, steps and ranges. The timezone is in + UTC.

    `,p(e,"for",i=n[31]),l.required=!0,p(l,"type","text"),p(l,"id",o=n[31]),p(l,"class","txt-lg txt-mono"),p(l,"placeholder","* * * * *"),l.autofocus=r=!((M=(C=n[0])==null?void 0:C.backups)!=null&&M.cron),p(c,"class","txt"),p(h,"class","ri-arrow-drop-down-fill"),p(f,"type","button"),p(f,"class","btn btn-sm btn-outline p-r-0"),p(u,"class","form-field-addon"),p(y,"class","help-block")},m(C,M){var E,D;w(C,e,M),b(e,t),w(C,s,M),w(C,l,M),oe(l,n[1].backups.cron),w(C,a,M),w(C,u,M),b(u,f),b(f,c),b(f,d),b(f,h),b(f,g),j(m,f,null),w(C,_,M),w(C,y,M),S=!0,(D=(E=n[0])==null?void 0:E.backups)!=null&&D.cron||l.focus(),T||($=Y(l,"input",n[18]),T=!0)},p(C,M){var D,I;(!S||M[1]&1&&i!==(i=C[31]))&&p(e,"for",i),(!S||M[1]&1&&o!==(o=C[31]))&&p(l,"id",o),(!S||M[0]&1&&r!==(r=!((I=(D=C[0])==null?void 0:D.backups)!=null&&I.cron)))&&(l.autofocus=r),M[0]&2&&l.value!==C[1].backups.cron&&oe(l,C[1].backups.cron);const E={};M[0]&2|M[1]&2&&(E.$$scope={dirty:M,ctx:C}),m.$set(E)},i(C){S||(A(m.$$.fragment,C),S=!0)},o(C){L(m.$$.fragment,C),S=!1},d(C){C&&(k(e),k(s),k(l),k(a),k(u),k(_),k(y)),H(m),T=!1,$()}}}function yI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max @auto backups to keep"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),p(l,"min","1")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),oe(l,n[1].backups.cronMaxKeep),r||(a=Y(l,"input",n[23]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&2&&ht(l.value)!==u[1].backups.cronMaxKeep&&oe(l,u[1].backups.cronMaxKeep)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function Ug(n){let e;function t(l,o){return l[7]?SI:l[8]?wI:kI}let i=t(n),s=i(n);return{c(){s.c(),e=ke()},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){l&&k(e),s.d(l)}}}function kI(n){let e;return{c(){e=v("div"),e.innerHTML=' S3 connected successfully',p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function wI(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=' Failed to establish S3 connection',p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=$e(t=He.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&It(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 SI(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Wg(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[27]),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 $I(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,T,$,C,M,E,D,I,P,F;h=new Yo({props:{class:"btn-sm",tooltip:"Refresh"}}),h.$on("refresh",n[13]),m=new hI({props:{class:"btn-sm"}}),m.$on("success",n[13]);let N={};y=new cI({props:N}),n[15](y);function R(J,X){return J[6]?gI:mI}let q=R(n),B=q(n),K=n[6]&&!n[4]&&zg(n);return{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[10]),r=O(),a=v("div"),u=v("div"),f=v("div"),c=v("span"),c.textContent="Backup and restore your PocketBase data",d=O(),V(h.$$.fragment),g=O(),V(m.$$.fragment),_=O(),V(y.$$.fragment),S=O(),T=v("hr"),$=O(),C=v("button"),M=v("span"),M.textContent="Backups options",E=O(),B.c(),D=O(),K&&K.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(f,"class","flex m-b-sm flex-gap-10"),p(M,"class","txt"),p(C,"type","button"),p(C,"class","btn btn-secondary"),C.disabled=n[4],Q(C,"btn-loading",n[4]),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(J,X){w(J,e,X),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(J,r,X),w(J,a,X),b(a,u),b(u,f),b(f,c),b(f,d),j(h,f,null),b(f,g),j(m,f,null),b(u,_),j(y,u,null),b(u,S),b(u,T),b(u,$),b(u,C),b(C,M),b(C,E),B.m(C,null),b(u,D),K&&K.m(u,null),I=!0,P||(F=[Y(C,"click",n[16]),Y(u,"submit",Qe(n[11]))],P=!0)},p(J,X){(!I||X[0]&1024)&&se(o,J[10]);const G={};y.$set(G),q!==(q=R(J))&&(B.d(1),B=q(J),B&&(B.c(),B.m(C,null))),(!I||X[0]&16)&&(C.disabled=J[4]),(!I||X[0]&16)&&Q(C,"btn-loading",J[4]),J[6]&&!J[4]?K?(K.p(J,X),X[0]&80&&A(K,1)):(K=zg(J),K.c(),A(K,1),K.m(u,null)):K&&(re(),L(K,1,1,()=>{K=null}),ae())},i(J){I||(A(h.$$.fragment,J),A(m.$$.fragment,J),A(y.$$.fragment,J),A(K),I=!0)},o(J){L(h.$$.fragment,J),L(m.$$.fragment,J),L(y.$$.fragment,J),L(K),I=!1},d(J){J&&(k(e),k(r),k(a)),H(h),H(m),n[15](null),H(y),B.d(),K&&K.d(),P=!1,Ce(F)}}}function TI(n){let e,t,i,s;return e=new Oi({}),i=new Sn({props:{$$slots:{default:[$I]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=O(),V(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&2047|o[1]&2&&(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){l&&k(t),H(e,l),H(i,l)}}}function CI(n,e,t){let i,s;Ye(n,At,X=>t(10,s=X)),sn(At,s="Backups",s);let l,o={},r={},a=!1,u=!1,f="",c=!1,d=!1,h=!1,g=null;m();async function m(){t(4,a=!0);try{const X=await fe.settings.getAll()||{};y(X)}catch(X){fe.error(X)}t(4,a=!1)}async function _(){if(!(u||!i)){t(5,u=!0);try{const X=await fe.settings.update(z.filterRedactedProps(r));await T(),y(X),jt("Successfully saved application settings.")}catch(X){fe.error(X)}t(5,u=!1)}}function y(X={}){t(1,r={backups:(X==null?void 0:X.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 T(){return l==null?void 0:l.loadBackups()}function $(X){ne[X?"unshift":"push"](()=>{l=X,t(3,l)})}const C=()=>t(6,d=!d);function M(){c=this.checked,t(2,c)}function E(){r.backups.cron=this.value,t(1,r),t(2,c)}const D=()=>{t(1,r.backups.cron="0 0 * * *",r)},I=()=>{t(1,r.backups.cron="0 0 * * 0",r)},P=()=>{t(1,r.backups.cron="0 0 * * 1,3",r)},F=()=>{t(1,r.backups.cron="0 0 1 * *",r)};function N(){r.backups.cronMaxKeep=ht(this.value),t(1,r),t(2,c)}function R(X){n.$$.not_equal(r.backups.s3,X)&&(r.backups.s3=X,t(1,r),t(2,c))}function q(X){h=X,t(7,h)}function B(X){g=X,t(8,g)}const K=()=>S(),J=()=>_();return n.$$.update=()=>{var X;n.$$.dirty[0]&1&&t(14,f=JSON.stringify(o)),n.$$.dirty[0]&6&&!c&&(X=r==null?void 0:r.backups)!=null&&X.cron&&(di("backups.cron"),t(1,r.backups.cron="",r)),n.$$.dirty[0]&16386&&t(9,i=f!=JSON.stringify(r))},[o,r,c,l,a,u,d,h,g,i,s,_,S,T,f,$,C,M,E,D,I,P,F,N,R,q,B,K,J]}class MI extends ve{constructor(e){super(),be(this,e,CI,TI,he,{},null,[-1,-1])}}const zt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Hi("/"):!0}],OI={"/login":Nt({component:ED,conditions:zt.concat([n=>!fe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Nt({asyncComponent:()=>ot(()=>import("./PageAdminRequestPasswordReset-d501ff16.js"),[],import.meta.url),conditions:zt.concat([n=>!fe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Nt({asyncComponent:()=>ot(()=>import("./PageAdminConfirmPasswordReset-5156b185.js"),[],import.meta.url),conditions:zt.concat([n=>!fe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Nt({component:xE,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Nt({component:F4,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Nt({component:jD,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Nt({component:SD,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Nt({component:CA,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Nt({component:KA,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Nt({component:f8,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Nt({component:v8,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Nt({component:T8,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Nt({component:U8,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/backups":Nt({component:MI,conditions:zt.concat([n=>fe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Nt({asyncComponent:()=>ot(()=>import("./PageRecordConfirmPasswordReset-7ca6e881.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Nt({asyncComponent:()=>ot(()=>import("./PageRecordConfirmPasswordReset-7ca6e881.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Nt({asyncComponent:()=>ot(()=>import("./PageRecordConfirmVerification-02960591.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Nt({asyncComponent:()=>ot(()=>import("./PageRecordConfirmVerification-02960591.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Nt({asyncComponent:()=>ot(()=>import("./PageRecordConfirmEmailChange-aadb32e3.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Nt({asyncComponent:()=>ot(()=>import("./PageRecordConfirmEmailChange-aadb32e3.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":Nt({asyncComponent:()=>ot(()=>import("./PageOAuth2Redirect-02a51b28.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"*":Nt({component:nk,userData:{showAppSidebar:!1}})};function EI(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=Uo}=i;return{delay:f,duration:It(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,g)=>{const m=g*a,_=g*u,y=h+g*e.width/t.width,S=h+g*e.height/t.height;return`transform: ${l} translate(${m}px, ${_}px) scale(${y}, ${S});`}}}function Yg(n,e,t){const i=n.slice();return i[2]=e[t],i}function DI(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function AI(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function II(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function LI(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Kg(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,h,g=x,m,_,y;function S(M,E){return M[2].type==="info"?LI:M[2].type==="success"?II:M[2].type==="warning"?AI:DI}let T=S(e),$=T(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),$.c(),s=O(),l=v("div"),r=U(o),a=O(),u=v("button"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,E){w(M,t,E),b(t,i),$.m(i,null),b(t,s),b(t,l),b(l,r),b(t,a),b(t,u),b(t,f),m=!0,_||(y=Y(u,"click",Qe(C)),_=!0)},p(M,E){e=M,T!==(T=S(e))&&($.d(1),$=T(e),$&&($.c(),$.m(i,null))),(!m||E&1)&&o!==(o=e[2].message+"")&&se(r,o),(!m||E&1)&&Q(t,"alert-info",e[2].type=="info"),(!m||E&1)&&Q(t,"alert-success",e[2].type=="success"),(!m||E&1)&&Q(t,"alert-danger",e[2].type=="error"),(!m||E&1)&&Q(t,"alert-warning",e[2].type=="warning")},r(){h=t.getBoundingClientRect()},f(){X1(t),g(),n_(t,h)},a(){g(),g=G1(t,h,EI,{duration:150})},i(M){m||(M&&Xe(()=>{m&&(d&&d.end(1),c=l_(t,nt,{duration:150}),c.start())}),m=!0)},o(M){c&&c.invalidate(),M&&(d=ba(t,Zr,{duration:150})),m=!1},d(M){M&&k(t),$.d(),M&&d&&d.end(),_=!1,y()}}}function PI(n){let e,t=[],i=new Map,s,l=pe(n[0]);const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>db(l)]}class NI extends ve{constructor(e){super(),be(this,e,FI,PI,he,{})}}function RI(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=U(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){w(l,e,o),b(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&se(i,t)},d(l){l&&k(e)}}}function qI(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=O(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],Q(s,"btn-loading",n[2])},m(a,u){w(a,e,u),b(e,t),w(a,i,u),w(a,s,u),b(s,l),e.focus(),o||(r=[Y(e,"click",n[4]),Y(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&Q(s,"btn-loading",a[2])},d(a){a&&(k(e),k(i),k(s)),o=!1,Ce(r)}}}function jI(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[qI],header:[RI]},$$scope:{ctx:n}};return e=new on({props:i}),n[6](e),e.$on("hide",n[7]),{c(){V(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(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[6](null),H(e,s)}}}function HI(n,e,t){let i;Ye(n,nu,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){ne[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await ln(),t(3,o=!1),g1()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class VI extends ve{constructor(e){super(),be(this,e,HI,jI,he,{})}}function Jg(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S;return m=new Rn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[zI]},$$scope:{ctx:n}}}),{c(){var T;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=O(),s=v("nav"),l=v("a"),l.innerHTML='',o=O(),r=v("a"),r.innerHTML='',a=O(),u=v("a"),u.innerHTML='',f=O(),c=v("figure"),d=v("img"),g=O(),V(m.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),_n(d.src,h="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||p(d,"src",h),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(T,$){w(T,e,$),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(e,f),b(e,c),b(c,d),b(c,g),j(m,c,null),_=!0,y||(S=[$e(un.call(null,t)),$e(un.call(null,l)),$e(zn.call(null,l,{path:"/collections/?.*",className:"current-route"})),$e(He.call(null,l,{text:"Collections",position:"right"})),$e(un.call(null,r)),$e(zn.call(null,r,{path:"/logs/?.*",className:"current-route"})),$e(He.call(null,r,{text:"Logs",position:"right"})),$e(un.call(null,u)),$e(zn.call(null,u,{path:"/settings/?.*",className:"current-route"})),$e(He.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p(T,$){var M;(!_||$&1&&!_n(d.src,h="./images/avatars/avatar"+(((M=T[0])==null?void 0:M.avatar)||0)+".svg"))&&p(d,"src",h);const C={};$&4096&&(C.$$scope={dirty:$,ctx:T}),m.$set(C)},i(T){_||(A(m.$$.fragment,T),_=!0)},o(T){L(m.$$.fragment,T),_=!1},d(T){T&&k(e),H(m),y=!1,Ce(S)}}}function zI(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=' Manage admins',t=O(),i=v("hr"),s=O(),l=v("button"),l.innerHTML=' Logout',p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),o||(r=[$e(un.call(null,e)),Y(l,"click",n[7])],o=!0)},p:x,d(a){a&&(k(e),k(t),k(i),k(s),k(l)),o=!1,Ce(r)}}}function Zg(n){let e,t,i;return t=new ou({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:z.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p:x,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 BI(n){var _;let e,t,i,s,l,o,r,a,u,f,c,d,h;document.title=e=z.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let g=((_=n[0])==null?void 0:_.id)&&n[1]&&Jg(n);o=new c0({props:{routes:OI}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new NI({}),f=new VI({});let m=n[1]&&!n[2]&&Zg(n);return{c(){t=O(),i=v("div"),g&&g.c(),s=O(),l=v("div"),V(o.$$.fragment),r=O(),V(a.$$.fragment),u=O(),V(f.$$.fragment),c=O(),m&&m.c(),d=ke(),p(l,"class","app-body"),p(i,"class","app-layout")},m(y,S){w(y,t,S),w(y,i,S),g&&g.m(i,null),b(i,s),b(i,l),j(o,l,null),b(l,r),j(a,l,null),w(y,u,S),j(f,y,S),w(y,c,S),m&&m.m(y,S),w(y,d,S),h=!0},p(y,[S]){var T;(!h||S&24)&&e!==(e=z.joinNonEmpty([y[4],y[3],"PocketBase"]," - "))&&(document.title=e),(T=y[0])!=null&&T.id&&y[1]?g?(g.p(y,S),S&3&&A(g,1)):(g=Jg(y),g.c(),A(g,1),g.m(i,s)):g&&(re(),L(g,1,1,()=>{g=null}),ae()),y[1]&&!y[2]?m?(m.p(y,S),S&6&&A(m,1)):(m=Zg(y),m.c(),A(m,1),m.m(d.parentNode,d)):m&&(re(),L(m,1,1,()=>{m=null}),ae())},i(y){h||(A(g),A(o.$$.fragment,y),A(a.$$.fragment,y),A(f.$$.fragment,y),A(m),h=!0)},o(y){L(g),L(o.$$.fragment,y),L(a.$$.fragment,y),L(f.$$.fragment,y),L(m),h=!1},d(y){y&&(k(t),k(i),k(u),k(c),k(d)),g&&g.d(),H(o),H(a),H(f,y),m&&m.d(y)}}}function UI(n,e,t){let i,s,l,o;Ye(n,Ms,m=>t(10,i=m)),Ye(n,ko,m=>t(3,s=m)),Ye(n,Aa,m=>t(0,l=m)),Ye(n,At,m=>t(4,o=m));let r,a=!1,u=!1;function f(m){var _,y,S,T;((_=m==null?void 0:m.detail)==null?void 0:_.location)!==r&&(t(1,a=!!((S=(y=m==null?void 0:m.detail)==null?void 0:y.userData)!=null&&S.showAppSidebar)),r=(T=m==null?void 0:m.detail)==null?void 0:T.location,sn(At,o="",o),tn({}),g1())}function c(){Hi("/")}async function d(){var m,_;if(l!=null&&l.id)try{const y=await fe.settings.getAll({$cancelKey:"initialAppSettings"});sn(ko,s=((m=y==null?void 0:y.meta)==null?void 0:m.appName)||"",s),sn(Ms,i=!!((_=y==null?void 0:y.meta)!=null&&_.hideControls),i)}catch(y){y!=null&&y.isAbort||console.warn("Failed to load app settings.",y)}}function h(){fe.logout()}const g=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&d()},[l,a,u,s,o,f,c,h,g]}class WI extends ve{constructor(e){super(),be(this,e,UI,BI,he,{})}}new WI({target:document.getElementById("app")});export{Ce as A,jt as B,z as C,Hi as D,ke as E,hb as F,qo as G,lo as H,Zt as I,Ye as J,ii as K,wt as L,ne as M,h1 as N,pe as O,yt as P,rs as Q,Ut as R,ve as S,_t as T,qr as U,L as a,O as b,V as c,H as d,v as e,p as f,w as g,b as h,be as i,$e as j,re as k,un as l,j as m,ae as n,k as o,fe as p,ce as q,Q as r,he as s,A as t,Y as u,Qe as v,U as w,se as x,x as y,oe as z}; diff --git a/ui/dist/assets/index-cc2b3041.js b/ui/dist/assets/index-cc2b3041.js deleted file mode 100644 index f0d32a65..00000000 --- a/ui/dist/assets/index-cc2b3041.js +++ /dev/null @@ -1,233 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function x(){}const yl=n=>n;function qe(n,e){for(const t in e)n[t]=e[t];return n}function F1(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function J_(n){return n()}function rf(){return Object.create(null)}function Ce(n){n.forEach(J_)}function Dt(n){return typeof n=="function"}function pe(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Ll;function _n(n,e){return Ll||(Ll=document.createElement("a")),Ll.href=e,n===Ll.href}function N1(n){return Object.keys(n).length===0}function ca(n,...e){if(n==null)return x;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function R1(n){let e;return ca(n,t=>e=t)(),e}function We(n,e,t){n.$$.on_destroy.push(ca(e,t))}function $t(n,e,t,i){if(n){const s=Z_(n,e,t,i);return n[0](s)}}function Z_(n,e,t,i){return n[1]&&i?qe(t.ctx.slice(),n[1](i(e))):t.ctx}function Ct(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;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),da=G_?n=>requestAnimationFrame(n):x;const bs=new Set;function X_(n){bs.forEach(e=>{e.c(n)||(bs.delete(e),e.f())}),bs.size!==0&&da(X_)}function Fo(n){let e;return bs.size===0&&da(X_),{promise:new Promise(t=>{bs.add(e={c:n,f:t})}),abort(){bs.delete(e)}}}function b(n,e){n.appendChild(e)}function Q_(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function q1(n){const e=v("style");return j1(Q_(n),e),e.sheet}function j1(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;tn.removeEventListener(e,t,i)}function Xe(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Pn(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 V1=["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&&V1.indexOf(i)===-1?n[i]=e[i]:p(n,i,e[i])}function z1(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 H1(n){return Array.from(n.childNodes)}function se(n,e){e=""+e,n.data!==e&&(n.data=e)}function oe(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 Q(n,e,t){n.classList[t?"add":"remove"](e)}function x_(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Ot(n,e){return new n(e)}const co=new Map;let po=0;function B1(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function U1(n,e){const t={stylesheet:q1(e),rules:{}};return co.set(n,t),t}function fl(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_${B1(u)}_${r}`,d=Q_(n),{stylesheet:m,rules:_}=co.get(d)||U1(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`,po+=1,c}function ul(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(", "),po-=s,po||W1())}function W1(){da(()=>{po||(co.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&k(e)}),co.clear())})}function Y1(n,e,t,i){if(!e)return x;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return x;const{delay:l=0,duration:o=300,easing:r=yl,start:a=Po()+l,end:f=a+o,tick:u=x,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,_;function h(){c&&(_=fl(n,0,1,o,l,r,c)),l||(m=!0)}function g(){c&&ul(n,_),d=!1}return Fo(y=>{if(!m&&y>=a&&(m=!0),m&&y>=f&&(u(1,0),g()),!d)return!1;if(m){const S=y-a,C=0+1*r(S/o);u(C,1-C)}return!0}),h(),u(0,1),g}function K1(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,eg(n,s)}}function eg(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 cl;function vi(n){cl=n}function kl(){if(!cl)throw new Error("Function called outside component initialization");return cl}function Kt(n){kl().$$.on_mount.push(n)}function J1(n){kl().$$.after_update.push(n)}function As(n){kl().$$.on_destroy.push(n)}function yt(){const n=kl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=x_(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 gs=[],ne=[];let vs=[];const Rr=[],tg=Promise.resolve();let qr=!1;function ng(){qr||(qr=!0,tg.then(pa))}function sn(){return ng(),tg}function Ge(n){vs.push(n)}function _e(n){Rr.push(n)}const er=new Set;let cs=0;function pa(){if(cs!==0)return;const n=cl;do{try{for(;csn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),vs=e}let js;function ma(){return js||(js=Promise.resolve(),js.then(()=>{js=null})),js}function es(n,e,t){n.dispatchEvent(x_(`${e?"intro":"outro"}${t}`))}const no=new Set;let ri;function re(){ri={r:0,c:[],p:ri}}function ae(){ri.r||Ce(ri.c),ri=ri.p}function A(n,e){n&&n.i&&(no.delete(n),n.i(e))}function L(n,e,t,i){if(n&&n.o){if(no.has(n))return;no.add(n),ri.c.push(()=>{no.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ha={duration:0};function ig(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function f(){o&&ul(n,o)}function u(){const{delay:d=0,duration:m=300,easing:_=yl,tick:h=x,css:g}=s||ha;g&&(o=fl(n,0,1,m,d,_,g,a++)),h(0,1);const y=Po()+d,S=y+m;r&&r.abort(),l=!0,Ge(()=>es(n,!0,"start")),r=Fo(C=>{if(l){if(C>=S)return h(1,0),es(n,!0,"end"),f(),l=!1;if(C>=y){const $=_((C-y)/m);h($,1-$)}}return l})}let c=!1;return{start(){c||(c=!0,ul(n),Dt(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=yl,tick:d=x,css:m}=s||ha;m&&(o=fl(n,1,0,u,f,c,m));const _=Po()+f,h=_+u;Ge(()=>es(n,!1,"start")),Fo(g=>{if(l){if(g>=h)return d(0,1),es(n,!1,"end"),--r.r||Ce(r.c),!1;if(g>=_){const y=c((g-_)/u);d(1-y,y)}}return l})}return Dt(s)?ma().then(()=>{s=s(i),a()}):a(),{end(f){f&&s.tick&&s.tick(1,0),l&&(o&&ul(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&&ul(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=yl,tick:y=x,css:S}=l||ha,C={start:Po()+_,b:m};m||(C.group=ri,ri.r+=1),r||a?a=C:(S&&(u(),f=fl(n,o,m,h,_,g,S)),m&&y(0,1),r=c(C,h),Ge(()=>es(n,m,"start")),Fo($=>{if(a&&$>a.start&&(r=c(a,h),a=null,es(n,r.b,"start"),S&&(u(),f=fl(n,o,r.b,r.duration,0,g,l.css))),r){if($>=r.end)y(o=r.b,1-o),es(n,r.b,"end"),a||(r.b?u():--r.group.r||Ce(r.group.c)),r=null;else if($>=r.start){const T=$-r.start;o=r.a+r.d*g(T/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){Dt(l)?ma().then(()=>{l=l(s),d(m)}):d(m)},end(){u(),r=a=null}}}function ff(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const f=s&&(e.current=s)(a);let u=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(re(),L(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),ae())}):e.block.d(1),f.c(),A(f,1),f.m(e.mount(),e.anchor),u=!0),e.block=f,e.blocks&&(e.blocks[l]=f),u&&pa()}if(F1(n)){const s=kl();if(n.then(l=>{vi(s),i(e.then,1,e.value,l),vi(null)},l=>{if(vi(s),i(e.catch,2,e.error,l),vi(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function X1(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function os(n,e){n.d(1),e.delete(n.key)}function Ht(n,e){L(n,1,1,()=>{e.delete(n.key)})}function Q1(n,e){n.f(),Ht(n,e)}function vt(n,e,t,i,s,l,o,r,a,f,u,c){let d=n.length,m=l.length,_=d;const h={};for(;_--;)h[n[_].key]=_;const g=[],y=new Map,S=new Map,C=[];for(_=m;_--;){const E=c(s,l,_),D=t(E);let I=o.get(D);I?i&&C.push(()=>I.p(E,e)):(I=f(D,E),I.c()),y.set(D,g[_]=I),D in h&&S.set(D,Math.abs(_-h[D]))}const $=new Set,T=new Set;function M(E){A(E,1),E.m(r,u),o.set(E.key,E),u=E.first,m--}for(;d&&m;){const E=g[m-1],D=n[d-1],I=E.key,P=D.key;E===D?(u=E.first,d--,m--):y.has(P)?!o.has(I)||$.has(I)?M(E):T.has(P)?d--:S.get(I)>S.get(P)?(T.add(I),M(E)):($.add(P),d--):(a(D,o),d--)}for(;d--;){const E=n[d];y.has(E.key)||a(E,o)}for(;m;)M(g[m-1]);return Ce(C),g}function At(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Qt(n){return typeof n=="object"&&n!==null?n:{}}function de(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function z(n){n&&n.c()}function j(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||Ge(()=>{const o=n.$$.on_mount.map(J_).filter(Dt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Ce(o),n.$$.on_mount=[]}),l.forEach(Ge)}function V(n,e){const t=n.$$;t.fragment!==null&&(G1(t.after_update),Ce(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function x1(n,e){n.$$.dirty[0]===-1&&(gs.push(n),ng(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const _=m.length?m[0]:d;return f.ctx&&s(f.ctx[c],f.ctx[c]=_)&&(!f.skip_bound&&f.bound[c]&&f.bound[c](_),u&&x1(n,c)),d}):[],f.update(),u=!0,Ce(f.before_update),f.fragment=i?i(f.ctx):!1,e.target){if(e.hydrate){const c=H1(e.target);f.fragment&&f.fragment.l(c),c.forEach(k)}else f.fragment&&f.fragment.c();e.intro&&A(n.$$.fragment),j(n,e.target,e.anchor,e.customElement),pa()}vi(a)}class be{$destroy(){V(this,1),this.$destroy=x}$on(e,t){if(!Dt(t))return x;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!N1(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Pt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(f),i.size===0&&t&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function lg(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return sg(t,o=>{let r=!1;const a=[];let f=0,u=x;const c=()=>{if(f)return;u();const m=e(i?a[0]:a,o);l?o(m):u=Dt(m)?m:x},d=s.map((m,_)=>ca(m,h=>{a[_]=h,f&=~(1<<_),r&&c()},()=>{f|=1<<_}));return r=!0,c(),function(){Ce(d),u(),r=!1}})}function og(n,e){if(n instanceof RegExp)return{keys:!1,pattern:n};var t,i,s,l,o=[],r="",a=n.split("/");for(a[0]||a.shift();s=a.shift();)t=s[0],t==="*"?(o.push("wild"),r+="/(.*)"):t===":"?(i=s.indexOf("?",1),l=s.indexOf(".",1),o.push(s.substring(1,~i?i:~l?l:s.length)),r+=~i&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(r+=(~i?"?":"")+"\\"+s.substring(l))):r+="/"+s;return{keys:o,pattern:new RegExp("^"+r+(e?"(?=$|/)":"/?$"),"i")}}function e0(n){let e,t,i;const s=[n[2]];var l=n[0];function o(r){let a={};for(let f=0;f{V(u,1)}),ae()}l?(e=Ot(l,o()),e.$on("routeEvent",r[7]),z(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(f)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function t0(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let f=0;f{V(u,1)}),ae()}l?(e=Ot(l,o()),e.$on("routeEvent",r[6]),z(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(f)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function n0(n){let e,t,i,s;const l=[t0,e0],o=[];function r(a,f){return a[1]?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):(re(),L(o[u],1,1,()=>{o[u]=null}),ae(),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)}}}function uf(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const No=sg(null,function(e){e(uf());const t=()=>{e(uf())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});lg(No,n=>n.location);const ga=lg(No,n=>n.querystring),cf=Fn(void 0);async function ji(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await sn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function an(n,e){if(e=pf(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return df(n,e),{update(t){t=pf(t),df(n,t)}}}function i0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function df(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||s0(i.currentTarget.getAttribute("href"))})}function pf(n){return n&&typeof n=="string"?{href:n}:n||{}}function s0(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function l0(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(T,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!T||typeof T=="string"&&(T.length<1||T.charAt(0)!="/"&&T.charAt(0)!="*")||typeof T=="object"&&!(T instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:E,keys:D}=og(T);this.path=T,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=E,this._keys=D}match(T){if(s){if(typeof s=="string")if(T.startsWith(s))T=T.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const I=T.match(s);if(I&&I[0])T=T.substr(I[0].length)||"/";else return null}}const M=this._pattern.exec(T);if(M===null)return null;if(this._keys===!1)return M;const E={};let D=0;for(;D{r.push(new o(T,$))}):Object.keys(i).forEach($=>{r.push(new o($,i[$]))});let a=null,f=null,u={};const c=yt();async function d($,T){await sn(),c($,T)}let m=null,_=null;l&&(_=$=>{$.state&&($.state.__svelte_spa_router_scrollY||$.state.__svelte_spa_router_scrollX)?m=$.state:m=null},window.addEventListener("popstate",_),J1(()=>{i0(m)}));let h=null,g=null;const y=No.subscribe(async $=>{h=$;let T=0;for(;T{cf.set(f)});return}t(0,a=null),g=null,cf.set(void 0)});As(()=>{y(),_&&window.removeEventListener("popstate",_)});function S($){Fe.call(this,n,$)}function C($){Fe.call(this,n,$)}return n.$$set=$=>{"routes"in $&&t(3,i=$.routes),"prefix"in $&&t(4,s=$.prefix),"restoreScrollState"in $&&t(5,l=$.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,f,u,i,s,l,S,C]}class o0 extends be{constructor(e){super(),ge(this,e,l0,n0,pe,{routes:3,prefix:4,restoreScrollState:5})}}const io=[];let rg;function ag(n){const e=n.pattern.test(rg);mf(n,n.className,e),mf(n,n.inactiveClassName,!e)}function mf(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}No.subscribe(n=>{rg=n.location+(n.querystring?"?"+n.querystring:""),io.map(ag)});function zn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?og(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return io.push(i),ag(i),{destroy(){io.splice(io.indexOf(i),1)}}}const r0="modulepreload",a0=function(n,e){return new URL(n,e).href},hf={},lt=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=a0(l,i),l in hf)return;hf[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let u=s.length-1;u>=0;u--){const c=s[u];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const f=document.createElement("link");if(f.rel=o?"stylesheet":r0,o||(f.as="script",f.crossOrigin=""),f.href=l,document.head.appendChild(f),o)return new Promise((u,c)=>{f.addEventListener("load",u),f.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e()).catch(l=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l})};function xt(n,e,t,i){return new(t||(t=Promise))(function(s,l){function o(f){try{a(i.next(f))}catch(u){l(u)}}function r(f){try{a(i.throw(f))}catch(u){l(u)}}function a(f){f.done?s(f.value):function(c){return c instanceof t?c:new t(function(d){d(c)})}(f.value).then(o,r)}a((i=i.apply(n,e||[])).next())})}class Yn extends Error{constructor(e){var t,i,s,l;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Yn.prototype),e!==null&&typeof e=="object"&&(this.url=typeof e.url=="string"?e.url:"",this.status=typeof e.status=="number"?e.status:0,this.isAbort=!!e.isAbort,this.originalError=e.originalError,e.response!==null&&typeof e.response=="object"?this.response=e.response:e.data!==null&&typeof e.data=="object"?this.response=e.data:this.response={}),this.originalError||e instanceof Yn||(this.originalError=e),typeof DOMException<"u"&&e instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(t=this.response)===null||t===void 0?void 0:t.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":!((l=(s=(i=this.originalError)===null||i===void 0?void 0:i.cause)===null||s===void 0?void 0:s.message)===null||l===void 0)&&l.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return Object.assign({},this)}}const Pl=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function f0(n,e){const t={};if(typeof n!="string")return t;const i=Object.assign({},e||{}).decode||u0;let s=0;for(;s0&&(!t.exp||t.exp-e>Date.now()/1e3))}fg=typeof atob=="function"?atob:n=>{let e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};const gf="pb_auth";class d0{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!ug(this.token)}get isAdmin(){return so(this.token).type==="admin"}get isAuthRecord(){return so(this.token).type==="authRecord"}save(e,t){this.baseToken=e||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(e,t=gf){const i=f0(e||"")[t]||"";let s={};try{s=JSON.parse(i),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(e,t=gf){var i,s;const l={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},o=so(this.token);o!=null&&o.exp?l.expires=new Date(1e3*o.exp):l.expires=new Date("1970-01-01"),e=Object.assign({},l,e);const r={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let a=_f(t,JSON.stringify(r),e);const f=typeof Blob<"u"?new Blob([a]).size:a.length;if(r.model&&f>4096){r.model={id:(i=r==null?void 0:r.model)===null||i===void 0?void 0:i.id,email:(s=r==null?void 0:r.model)===null||s===void 0?void 0:s.email};const u=["collectionId","username","verified"];for(const c in this.model)u.includes(c)&&(r.model[c]=this.model[c]);a=_f(t,JSON.stringify(r),e)}return a}onChange(e,t=!1){return this._onChangeCallbacks.push(e),t&&e(this.token,this.model),()=>{for(let i=this._onChangeCallbacks.length-1;i>=0;i--)if(this._onChangeCallbacks[i]==e)return delete this._onChangeCallbacks[i],void this._onChangeCallbacks.splice(i,1)}}triggerChange(){for(const e of this._onChangeCallbacks)e&&e(this.token,this.model)}}class cg extends d0{constructor(e="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=e,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(e,t){this._storageSet(this.storageKey,{token:e,model:t}),super.save(e,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(e){if(typeof window<"u"&&(window!=null&&window.localStorage)){const t=window.localStorage.getItem(e)||"";try{return JSON.parse(t)}catch{return t}}return this.storageFallback[e]}_storageSet(e,t){if(typeof window<"u"&&(window!=null&&window.localStorage)){let i=t;typeof t!="string"&&(i=JSON.stringify(t)),window.localStorage.setItem(e,i)}else this.storageFallback[e]=t}_storageRemove(e){var t;typeof window<"u"&&(window!=null&&window.localStorage)&&((t=window.localStorage)===null||t===void 0||t.removeItem(e)),delete this.storageFallback[e]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",e=>{if(e.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.model||null)})}}class rs{constructor(e){this.client=e}}class p0 extends rs{getAll(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/settings",e)}update(e,t){return t=Object.assign({method:"PATCH",body:e},t),this.client.send("/api/settings",t)}testS3(e="storage",t){return t=Object.assign({method:"POST",body:{filesystem:e}},t),this.client.send("/api/settings/test/s3",t).then(()=>!0)}testEmail(e,t,i){return i=Object.assign({method:"POST",body:{email:e,template:t}},i),this.client.send("/api/settings/test/email",i).then(()=>!0)}generateAppleClientSecret(e,t,i,s,l,o){return o=Object.assign({method:"POST",body:{clientId:e,teamId:t,keyId:i,privateKey:s,duration:l}},o),this.client.send("/api/settings/apple/generate-client-secret",o)}}class ba extends rs{decode(e){return e}getFullList(e,t){if(typeof e=="number")return this._getFullList(e,t);let i=500;return(t=Object.assign({},e,t)).batch&&(i=t.batch,delete t.batch),this._getFullList(i,t)}getList(e=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:e,perPage:t},i.query),this.client.send(this.baseCrudPath,i).then(s=>{var l;return s.items=((l=s.items)===null||l===void 0?void 0:l.map(o=>this.decode(o)))||[],s})}getFirstListItem(e,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+e},t)).query=Object.assign({filter:e,skipTotal:1},t.query),this.getList(1,1,t).then(i=>{var s;if(!(!((s=i==null?void 0:i.items)===null||s===void 0)&&s.length))throw new Yn({status:404,data:{code:404,message:"The requested resource wasn't found.",data:{}}});return i.items[0]})}getOne(e,t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then(i=>this.decode(i))}create(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send(this.baseCrudPath,t).then(i=>this.decode(i))}update(e,t,i){return i=Object.assign({method:"PATCH",body:t},i),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),i).then(s=>this.decode(s))}delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then(()=>!0)}_getFullList(e=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let i=[],s=l=>xt(this,void 0,void 0,function*(){return this.getList(l,e||500,t).then(o=>{const r=o.items;return i=i.concat(r),r.length==o.perPage?s(l+1):i})});return s(1)}}function Dn(n,e,t,i){const s=i!==void 0;return s||t!==void 0?s?(console.warn(n),e.body=Object.assign({},e.body,t),e.query=Object.assign({},e.query,i),e):e=Object.assign(e,t):e}class m0 extends ba{get baseCrudPath(){return"/api/admins"}update(e,t,i){return super.update(e,t,i).then(s=>{var l,o;return((l=this.client.authStore.model)===null||l===void 0?void 0:l.id)===s.id&&((o=this.client.authStore.model)===null||o===void 0?void 0:o.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}delete(e,t){return super.delete(e,t).then(i=>{var s,l;return i&&((s=this.client.authStore.model)===null||s===void 0?void 0:s.id)===e&&((l=this.client.authStore.model)===null||l===void 0?void 0:l.collectionId)===void 0&&this.client.authStore.clear(),i})}authResponse(e){const t=this.decode((e==null?void 0:e.admin)||{});return e!=null&&e.token&&(e!=null&&e.admin)&&this.client.authStore.save(e.token,t),Object.assign({},e,{token:(e==null?void 0:e.token)||"",admin:t})}authWithPassword(e,t,i,s){let l={method:"POST",body:{identity:e,password:t}};return l=Dn("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",l,i,s),this.client.send(this.baseCrudPath+"/auth-with-password",l).then(this.authResponse.bind(this))}authRefresh(e,t){let i={method:"POST"};return i=Dn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",i,e,t),this.client.send(this.baseCrudPath+"/auth-refresh",i).then(this.authResponse.bind(this))}requestPasswordReset(e,t,i){let s={method:"POST",body:{email:e}};return s=Dn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,t,i),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}confirmPasswordReset(e,t,i,s,l){let o={method:"POST",body:{token:e,password:t,passwordConfirm:i}};return o=Dn("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",o,s,l),this.client.send(this.baseCrudPath+"/confirm-password-reset",o).then(()=>!0)}}class dg extends rs{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentTopics=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}subscribe(e,t){var i;return xt(this,void 0,void 0,function*(){if(!e)throw new Error("topic must be set.");const s=function(l){const o=l;let r;try{r=JSON.parse(o==null?void 0:o.data)}catch{}t(r||{})};return this.subscriptions[e]||(this.subscriptions[e]=[]),this.subscriptions[e].push(s),this.isConnected?this.subscriptions[e].length===1?yield this.submitSubscriptions():(i=this.eventSource)===null||i===void 0||i.addEventListener(e,s):yield this.connect(),()=>xt(this,void 0,void 0,function*(){return this.unsubscribeByTopicAndListener(e,s)})})}unsubscribe(e){var t;return xt(this,void 0,void 0,function*(){if(this.hasSubscriptionListeners(e)){if(e){for(let i of this.subscriptions[e])(t=this.eventSource)===null||t===void 0||t.removeEventListener(e,i);delete this.subscriptions[e]}else this.subscriptions={};this.hasSubscriptionListeners()?this.hasSubscriptionListeners(e)||(yield this.submitSubscriptions()):this.disconnect()}})}unsubscribeByPrefix(e){var t;return xt(this,void 0,void 0,function*(){let i=!1;for(let s in this.subscriptions)if(s.startsWith(e)){i=!0;for(let l of this.subscriptions[s])(t=this.eventSource)===null||t===void 0||t.removeEventListener(s,l);delete this.subscriptions[s]}i&&(this.hasSubscriptionListeners()?yield this.submitSubscriptions():this.disconnect())})}unsubscribeByTopicAndListener(e,t){var i;return xt(this,void 0,void 0,function*(){if(!Array.isArray(this.subscriptions[e])||!this.subscriptions[e].length)return;let s=!1;for(let l=this.subscriptions[e].length-1;l>=0;l--)this.subscriptions[e][l]===t&&(s=!0,delete this.subscriptions[e][l],this.subscriptions[e].splice(l,1),(i=this.eventSource)===null||i===void 0||i.removeEventListener(e,t));s&&(this.subscriptions[e].length||delete this.subscriptions[e],this.hasSubscriptionListeners()?this.hasSubscriptionListeners(e)||(yield this.submitSubscriptions()):this.disconnect())})}hasSubscriptionListeners(e){var t,i;if(this.subscriptions=this.subscriptions||{},e)return!!(!((t=this.subscriptions[e])===null||t===void 0)&&t.length);for(let s in this.subscriptions)if(!((i=this.subscriptions[s])===null||i===void 0)&&i.length)return!0;return!1}submitSubscriptions(){return xt(this,void 0,void 0,function*(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},query:{requestKey:this.getSubscriptionsCancelKey()}}).catch(e=>{if(!(e!=null&&e.isAbort))throw e})})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getNonEmptySubscriptionTopics(){const e=[];for(let t in this.subscriptions)this.subscriptions[t].length&&e.push(t);return e}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.addEventListener(e,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.removeEventListener(e,t)}connect(){return xt(this,void 0,void 0,function*(){if(!(this.reconnectAttempts>0))return new Promise((e,t)=>{this.pendingConnects.push({resolve:e,reject:t}),this.pendingConnects.length>1||this.initConnect()})})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=e=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",e=>{const t=e;this.clientId=t==null?void 0:t.lastEventId,this.submitSubscriptions().then(()=>xt(this,void 0,void 0,function*(){let i=3;for(;this.hasUnsentSubscriptions()&&i>0;)i--,yield this.submitSubscriptions()})).then(()=>{for(let i of this.pendingConnects)i.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId)}).catch(i=>{this.clientId="",this.connectErrorHandler(i)})})}hasUnsentSubscriptions(){const e=this.getNonEmptySubscriptionTopics();if(e.length!=this.lastSentTopics.length)return!0;for(const t of e)if(!this.lastSentTopics.includes(t))return!0;return!1}connectErrorHandler(e){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let i of this.pendingConnects)i.reject(new Yn(e));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},t)}disconnect(e=!1){var t;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(t=this.eventSource)===null||t===void 0||t.close(),this.eventSource=null,this.clientId="",!e){this.reconnectAttempts=0;for(let i of this.pendingConnects)i.resolve();this.pendingConnects=[]}}}class h0 extends ba{constructor(e,t){super(e),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}subscribeOne(e,t){return xt(this,void 0,void 0,function*(){return console.warn("PocketBase: subscribeOne(recordId, callback) is deprecated. Please replace it with subscribe(recordId, callback)."),this.client.realtime.subscribe(this.collectionIdOrName+"/"+e,t)})}subscribe(e,t){return xt(this,void 0,void 0,function*(){if(typeof e=="function")return console.warn("PocketBase: subscribe(callback) is deprecated. Please replace it with subscribe('*', callback)."),this.client.realtime.subscribe(this.collectionIdOrName,e);if(!t)throw new Error("Missing subscription callback.");if(e==="")throw new Error("Missing topic.");let i=this.collectionIdOrName;return e!=="*"&&(i+="/"+e),this.client.realtime.subscribe(i,t)})}unsubscribe(e){return xt(this,void 0,void 0,function*(){return e==="*"?this.client.realtime.unsubscribe(this.collectionIdOrName):e?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+e):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)})}getFullList(e,t){if(typeof e=="number")return super.getFullList(e,t);const i=Object.assign({},e,t);return super.getFullList(i)}getList(e=1,t=30,i){return super.getList(e,t,i)}getFirstListItem(e,t){return super.getFirstListItem(e,t)}getOne(e,t){return super.getOne(e,t)}create(e,t){return super.create(e,t)}update(e,t,i){return super.update(e,t,i).then(s=>{var l,o,r;return((l=this.client.authStore.model)===null||l===void 0?void 0:l.id)!==(s==null?void 0:s.id)||((o=this.client.authStore.model)===null||o===void 0?void 0:o.collectionId)!==this.collectionIdOrName&&((r=this.client.authStore.model)===null||r===void 0?void 0:r.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}delete(e,t){return super.delete(e,t).then(i=>{var s,l,o;return!i||((s=this.client.authStore.model)===null||s===void 0?void 0:s.id)!==e||((l=this.client.authStore.model)===null||l===void 0?void 0:l.collectionId)!==this.collectionIdOrName&&((o=this.client.authStore.model)===null||o===void 0?void 0:o.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),i})}authResponse(e){const t=this.decode((e==null?void 0:e.record)||{});return this.client.authStore.save(e==null?void 0:e.token,t),Object.assign({},e,{token:(e==null?void 0:e.token)||"",record:t})}listAuthMethods(e){return e=Object.assign({method:"GET"},e),this.client.send(this.baseCollectionPath+"/auth-methods",e).then(t=>Object.assign({},t,{usernamePassword:!!(t!=null&&t.usernamePassword),emailPassword:!!(t!=null&&t.emailPassword),authProviders:Array.isArray(t==null?void 0:t.authProviders)?t==null?void 0:t.authProviders:[]}))}authWithPassword(e,t,i,s){let l={method:"POST",body:{identity:e,password:t}};return l=Dn("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",l,i,s),this.client.send(this.baseCollectionPath+"/auth-with-password",l).then(o=>this.authResponse(o))}authWithOAuth2Code(e,t,i,s,l,o,r){let a={method:"POST",body:{provider:e,code:t,codeVerifier:i,redirectUrl:s,createData:l}};return a=Dn("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",a,o,r),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",a).then(f=>this.authResponse(f))}authWithOAuth2(...e){return xt(this,void 0,void 0,function*(){if(e.length>1||typeof(e==null?void 0:e[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((e==null?void 0:e[0])||"",(e==null?void 0:e[1])||"",(e==null?void 0:e[2])||"",(e==null?void 0:e[3])||"",(e==null?void 0:e[4])||{},(e==null?void 0:e[5])||{},(e==null?void 0:e[6])||{});const t=(e==null?void 0:e[0])||{},i=(yield this.listAuthMethods()).authProviders.find(a=>a.name===t.provider);if(!i)throw new Yn(new Error(`Missing or invalid provider "${t.provider}".`));const s=this.client.buildUrl("/api/oauth2-redirect"),l=new dg(this.client);let o=null;function r(){o==null||o.close(),l.unsubscribe()}return t.urlCallback||(o=bf(void 0)),new Promise((a,f)=>xt(this,void 0,void 0,function*(){var u;try{yield l.subscribe("@oauth2",_=>xt(this,void 0,void 0,function*(){const h=l.clientId;try{if(!_.state||h!==_.state)throw new Error("State parameters don't match.");const g=Object.assign({},t);delete g.provider,delete g.scopes,delete g.createData,delete g.urlCallback;const y=yield this.authWithOAuth2Code(i.name,_.code,i.codeVerifier,s,t.createData,g);a(y)}catch(g){f(new Yn(g))}r()}));const c={state:l.clientId};!((u=t.scopes)===null||u===void 0)&&u.length&&(c.scope=t.scopes.join(" "));const d=this._replaceQueryParams(i.authUrl+s,c);yield(t.urlCallback||function(_){o?o.location.href=_:o=bf(_)})(d)}catch(c){r(),f(new Yn(c))}}))})}authRefresh(e,t){let i={method:"POST"};return i=Dn("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",i,e,t),this.client.send(this.baseCollectionPath+"/auth-refresh",i).then(s=>this.authResponse(s))}requestPasswordReset(e,t,i){let s={method:"POST",body:{email:e}};return s=Dn("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}confirmPasswordReset(e,t,i,s,l){let o={method:"POST",body:{token:e,password:t,passwordConfirm:i}};return o=Dn("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",o,s,l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",o).then(()=>!0)}requestVerification(e,t,i){let s={method:"POST",body:{email:e}};return s=Dn("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}confirmVerification(e,t,i){let s={method:"POST",body:{token:e}};return s=Dn("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>!0)}requestEmailChange(e,t,i){let s={method:"POST",body:{newEmail:e}};return s=Dn("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}confirmEmailChange(e,t,i,s){let l={method:"POST",body:{token:e,password:t}};return l=Dn("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",l,i,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",l).then(()=>!0)}listExternalAuths(e,t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/external-auths",t)}unlinkExternalAuth(e,t,i){return i=Object.assign({method:"DELETE"},i),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/external-auths/"+encodeURIComponent(t),i).then(()=>!0)}_replaceQueryParams(e,t={}){let i=e,s="";e.indexOf("?")>=0&&(i=e.substring(0,e.indexOf("?")),s=e.substring(e.indexOf("?")+1));const l={},o=s.split("&");for(const r of o){if(r=="")continue;const a=r.split("=");l[decodeURIComponent(a[0].replace(/\+/g," "))]=decodeURIComponent((a[1]||"").replace(/\+/g," "))}for(let r in t)t.hasOwnProperty(r)&&(t[r]==null?delete l[r]:l[r]=t[r]);s="";for(let r in l)l.hasOwnProperty(r)&&(s!=""&&(s+="&"),s+=encodeURIComponent(r.replace(/%20/g,"+"))+"="+encodeURIComponent(l[r].replace(/%20/g,"+")));return s!=""?i+"?"+s:i}}function bf(n){if(typeof window>"u"||!(window!=null&&window.open))throw new Yn(new Error("Not in a browser context - please pass a custom urlCallback function."));let e=1024,t=768,i=window.innerWidth,s=window.innerHeight;e=e>i?i:e,t=t>s?s:t;let l=i/2-e/2,o=s/2-t/2;return window.open(n,"popup_window","width="+e+",height="+t+",top="+o+",left="+l+",resizable,menubar=no")}class _0 extends ba{get baseCrudPath(){return"/api/collections"}import(e,t=!1,i){return xt(this,void 0,void 0,function*(){return i=Object.assign({method:"PUT",body:{collections:e,deleteMissing:t}},i),this.client.send(this.baseCrudPath+"/import",i).then(()=>!0)})}}class g0 extends rs{getRequestsList(e=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:e,perPage:t},i.query),this.client.send("/api/logs/requests",i)}getRequest(e,t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/requests/"+encodeURIComponent(e),t)}getRequestsStats(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/logs/requests/stats",e)}}class b0 extends rs{check(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/health",e)}}class v0 extends rs{getUrl(e,t,i={}){if(!t||!(e!=null&&e.id))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));let l=this.client.buildUrl(s.join("/"));if(Object.keys(i).length){i.download===!1&&delete i.download;const o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l}getToken(e){return e=Object.assign({method:"POST"},e),this.client.send("/api/files/token",e).then(t=>(t==null?void 0:t.token)||"")}}class y0 extends rs{getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/backups",e)}create(e,t){return t=Object.assign({method:"POST",body:{name:e}},t),this.client.send("/api/backups",t).then(()=>!0)}upload(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send("/api/backups/upload",t).then(()=>!0)}delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}`,t).then(()=>!0)}restore(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}/restore`,t).then(()=>!0)}getDownloadUrl(e,t){return this.client.buildUrl(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(e)}`)}}const k0=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];class Ro{constructor(e="/",t,i="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=e,this.lang=i,this.authStore=t||new cg,this.admins=new m0(this),this.collections=new _0(this),this.files=new v0(this),this.logs=new g0(this),this.settings=new p0(this),this.realtime=new dg(this),this.health=new b0(this),this.backups=new y0(this)}collection(e){return this.recordServices[e]||(this.recordServices[e]=new h0(this,e)),this.recordServices[e]}autoCancellation(e){return this.enableAutoCancellation=!!e,this}cancelRequest(e){return this.cancelControllers[e]&&(this.cancelControllers[e].abort(),delete this.cancelControllers[e]),this}cancelAllRequests(){for(let e in this.cancelControllers)this.cancelControllers[e].abort();return this.cancelControllers={},this}getFileUrl(e,t,i={}){return this.files.getUrl(e,t,i)}buildUrl(e){var t;let i=this.baseUrl;return typeof window>"u"||!window.location||i.startsWith("https://")||i.startsWith("http://")||(i=!((t=window.location.origin)===null||t===void 0)&&t.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(i+=window.location.pathname||"/",i+=i.endsWith("/")?"":"/"),i+=this.baseUrl),e&&(i+=i.endsWith("/")?"":"/",i+=e.startsWith("/")?e.substring(1):e),i}send(e,t){return xt(this,void 0,void 0,function*(){t=this.initSendOptions(e,t);let i=this.buildUrl(e);if(t.query!==void 0){const s=this.serializeQueryParams(t.query);s&&(i+=(i.includes("?")?"&":"?")+s),delete t.query}if(this.beforeSend){const s=Object.assign({},yield this.beforeSend(i,t));s.url!==void 0||s.options!==void 0?(i=s.url||i,t=s.options||t):Object.keys(s).length&&(t=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}return this.getHeader(t.headers,"Content-Type")=="application/json"&&t.body&&typeof t.body!="string"&&(t.body=JSON.stringify(t.body)),(t.fetch||fetch)(i,t).then(s=>xt(this,void 0,void 0,function*(){let l={};try{l=yield s.json()}catch{}if(this.afterSend&&(l=yield this.afterSend(s,l)),s.status>=400)throw new Yn({url:s.url,status:s.status,data:l});return l})).catch(s=>{throw new Yn(s)})})}initSendOptions(e,t){(t=Object.assign({method:"GET"},t)).query=t.query||{},t.body=this.convertToFormDataIfNeeded(t.body);for(let i in t)k0.includes(i)||(t.query[i]=t[i],delete t[i]);if(t.query=Object.assign({},t.params,t.query),t.requestKey===void 0&&(t.$autoCancel===!1||t.query.$autoCancel===!1?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,this.getHeader(t.headers,"Content-Type")!==null||this.isFormData(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),this.getHeader(t.headers,"Accept-Language")===null&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(t.headers,"Authorization")===null&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&t.requestKey!==null){const i=t.requestKey||(t.method||"GET")+e;delete t.requestKey,this.cancelRequest(i);const s=new AbortController;this.cancelControllers[i]=s,t.signal=s.signal}return t}convertToFormDataIfNeeded(e){if(typeof FormData>"u"||e===void 0||typeof e!="object"||e===null||this.isFormData(e)||!this.hasBlobField(e))return e;const t=new FormData;for(let i in e){const s=Array.isArray(e[i])?e[i]:[e[i]];for(let l of s)t.append(i,l)}return t}hasBlobField(e){for(let t in e){const i=Array.isArray(e[t])?e[t]:[e[t]];for(let s of i)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(e,t){e=e||{},t=t.toLowerCase();for(let i in e)if(i.toLowerCase()==t)return e[i];return null}isFormData(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)}serializeQueryParams(e){const t=[];for(const i in e){if(e[i]===null)continue;const s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(const o of s)t.push(l+"="+encodeURIComponent(o));else s instanceof Date?t.push(l+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?t.push(l+"="+encodeURIComponent(JSON.stringify(s))):t.push(l+"="+encodeURIComponent(s))}return t.join("&")}}class as extends Error{}class w0 extends as{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class S0 extends as{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class $0 extends as{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Xs extends as{}class pg extends as{constructor(e){super(`Invalid unit ${e}`)}}class Bn extends as{}class Oi extends as{constructor(){super("Zone is an abstract class")}}const Ae="numeric",ti="short",Ln="long",jr={year:Ae,month:Ae,day:Ae},mg={year:Ae,month:ti,day:Ae},C0={year:Ae,month:ti,day:Ae,weekday:ti},hg={year:Ae,month:Ln,day:Ae},_g={year:Ae,month:Ln,day:Ae,weekday:Ln},gg={hour:Ae,minute:Ae},bg={hour:Ae,minute:Ae,second:Ae},vg={hour:Ae,minute:Ae,second:Ae,timeZoneName:ti},yg={hour:Ae,minute:Ae,second:Ae,timeZoneName:Ln},kg={hour:Ae,minute:Ae,hourCycle:"h23"},wg={hour:Ae,minute:Ae,second:Ae,hourCycle:"h23"},Sg={hour:Ae,minute:Ae,second:Ae,hourCycle:"h23",timeZoneName:ti},$g={hour:Ae,minute:Ae,second:Ae,hourCycle:"h23",timeZoneName:Ln},Cg={year:Ae,month:Ae,day:Ae,hour:Ae,minute:Ae},Tg={year:Ae,month:Ae,day:Ae,hour:Ae,minute:Ae,second:Ae},Mg={year:Ae,month:ti,day:Ae,hour:Ae,minute:Ae},Og={year:Ae,month:ti,day:Ae,hour:Ae,minute:Ae,second:Ae},T0={year:Ae,month:ti,day:Ae,weekday:ti,hour:Ae,minute:Ae},Eg={year:Ae,month:Ln,day:Ae,hour:Ae,minute:Ae,timeZoneName:ti},Dg={year:Ae,month:Ln,day:Ae,hour:Ae,minute:Ae,second:Ae,timeZoneName:ti},Ag={year:Ae,month:Ln,day:Ae,weekday:Ln,hour:Ae,minute:Ae,timeZoneName:Ln},Ig={year:Ae,month:Ln,day:Ae,weekday:Ln,hour:Ae,minute:Ae,second:Ae,timeZoneName:Ln};function nt(n){return typeof n>"u"}function ts(n){return typeof n=="number"}function qo(n){return typeof n=="number"&&n%1===0}function M0(n){return typeof n=="string"}function O0(n){return Object.prototype.toString.call(n)==="[object Date]"}function Lg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function E0(n){return Array.isArray(n)?n:[n]}function vf(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function D0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Cs(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function yi(n,e,t){return qo(n)&&n>=e&&n<=t}function A0(n,e){return n-e*Math.floor(n/e)}function Ut(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Di(n){if(!(nt(n)||n===null||n===""))return parseInt(n,10)}function Bi(n){if(!(nt(n)||n===null||n===""))return parseFloat(n)}function va(n){if(!(nt(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function ya(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function wl(n){return n%4===0&&(n%100!==0||n%400===0)}function tl(n){return wl(n)?366:365}function mo(n,e){const t=A0(e-1,12)+1,i=n+(e-t)/12;return t===2?wl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function ka(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function ho(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function Vr(n){return n>99?n:n>60?1900+n:2e3+n}function Pg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function jo(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function Fg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Bn(`Invalid unit value ${n}`);return e}function _o(n,e){const t={};for(const i in n)if(Cs(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Fg(s)}return t}function nl(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Ut(t,2)}:${Ut(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ut(t,2)}${Ut(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Vo(n){return D0(n,["hour","minute","second","millisecond"])}const Ng=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,I0=["January","February","March","April","May","June","July","August","September","October","November","December"],Rg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],L0=["J","F","M","A","M","J","J","A","S","O","N","D"];function qg(n){switch(n){case"narrow":return[...L0];case"short":return[...Rg];case"long":return[...I0];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const jg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Vg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],P0=["M","T","W","T","F","S","S"];function zg(n){switch(n){case"narrow":return[...P0];case"short":return[...Vg];case"long":return[...jg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Hg=["AM","PM"],F0=["Before Christ","Anno Domini"],N0=["BC","AD"],R0=["B","A"];function Bg(n){switch(n){case"narrow":return[...R0];case"short":return[...N0];case"long":return[...F0];default:return null}}function q0(n){return Hg[n.hour<12?0:1]}function j0(n,e){return zg(e)[n.weekday-1]}function V0(n,e){return qg(e)[n.month-1]}function z0(n,e){return Bg(e)[n.year<0?0:1]}function H0(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,f=s[n],u=i?a?f[1]:f[2]||f[1]:a?s[n][0]:n;return o?`${r} ${u} ago`:`in ${r} ${u}`}function yf(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const B0={D:jr,DD:mg,DDD:hg,DDDD:_g,t:gg,tt:bg,ttt:vg,tttt:yg,T:kg,TT:wg,TTT:Sg,TTTT:$g,f:Cg,ff:Mg,fff:Eg,ffff:Ag,F:Tg,FF:Og,FFF:Dg,FFFF:Ig};class kn{static create(e,t={}){return new kn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return B0[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Ut(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(m,_)=>this.loc.extract(e,m,_),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?q0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,_)=>i?V0(e,m):l(_?{month:m}:{month:m,day:"numeric"},"month"),f=(m,_)=>i?j0(e,m):l(_?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),u=m=>{const _=kn.macroTokenToFormatOpts(m);return _?this.formatWithSystemDefault(e,_):m},c=m=>i?z0(e,m):l({era:m},"era"),d=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return f("short",!0);case"cccc":return f("long",!0);case"ccccc":return f("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return f("short",!1);case"EEEE":return f("long",!1);case"EEEEE":return f("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(m)}};return yf(kn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>f=>{const u=i(f);return u?this.num(a.get(u),f.length):f},l=kn.parseFormat(t),o=l.reduce((a,{literal:f,val:u})=>f?a:a.concat(u),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return yf(l,s(r))}}class xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Sl{get type(){throw new Oi}get name(){throw new Oi}get ianaName(){return this.name}get isUniversal(){throw new Oi}offsetName(e,t){throw new Oi}formatOffset(e,t){throw new Oi}offset(e){throw new Oi}equals(e){throw new Oi}get isValid(){throw new Oi}}let tr=null;class wa extends Sl{static get instance(){return tr===null&&(tr=new wa),tr}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Pg(e,t,i)}formatOffset(e,t){return nl(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let lo={};function U0(n){return lo[n]||(lo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),lo[n]}const W0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Y0(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,f,u]=i;return[o,s,l,r,a,f,u]}function K0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?_:1e3+_,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let nr=null;class hn extends Sl{static get utcInstance(){return nr===null&&(nr=new hn(0)),nr}static instance(e){return e===0?hn.utcInstance:new hn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new hn(jo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${nl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${nl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return nl(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class J0 extends Sl{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ai(n,e){if(nt(n)||n===null)return e;if(n instanceof Sl)return n;if(M0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?hn.utcInstance:hn.parseSpecifier(t)||wi.create(n)}else return ts(n)?hn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new J0(n)}let kf=()=>Date.now(),wf="system",Sf=null,$f=null,Cf=null,Tf;class Gt{static get now(){return kf}static set now(e){kf=e}static set defaultZone(e){wf=e}static get defaultZone(){return Ai(wf,wa.instance)}static get defaultLocale(){return Sf}static set defaultLocale(e){Sf=e}static get defaultNumberingSystem(){return $f}static set defaultNumberingSystem(e){$f=e}static get defaultOutputCalendar(){return Cf}static set defaultOutputCalendar(e){Cf=e}static get throwOnInvalid(){return Tf}static set throwOnInvalid(e){Tf=e}static resetCaches(){It.resetCache(),wi.resetCache()}}let Mf={};function Z0(n,e={}){const t=JSON.stringify([n,e]);let i=Mf[t];return i||(i=new Intl.ListFormat(n,e),Mf[t]=i),i}let zr={};function Hr(n,e={}){const t=JSON.stringify([n,e]);let i=zr[t];return i||(i=new Intl.DateTimeFormat(n,e),zr[t]=i),i}let Br={};function G0(n,e={}){const t=JSON.stringify([n,e]);let i=Br[t];return i||(i=new Intl.NumberFormat(n,e),Br[t]=i),i}let Ur={};function X0(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Ur[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Ur[s]=l),l}let Qs=null;function Q0(){return Qs||(Qs=new Intl.DateTimeFormat().resolvedOptions().locale,Qs)}function x0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Hr(n).resolvedOptions()}catch{t=Hr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function ev(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function tv(n){const e=[];for(let t=1;t<=12;t++){const i=He.utc(2016,t,1);e.push(n(i))}return e}function nv(n){const e=[];for(let t=1;t<=7;t++){const i=He.utc(2016,11,13+t);e.push(n(i))}return e}function Nl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function iv(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class sv{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=G0(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):ya(e,3);return Ut(t,this.padTo)}}}class lv{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&wi.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:He.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Hr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class ov{constructor(e,t,i){this.opts={style:"long",...i},!t&&Lg()&&(this.rtf=X0(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):H0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class It{static fromOpts(e){return It.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Gt.defaultLocale,o=l||(s?"en-US":Q0()),r=t||Gt.defaultNumberingSystem,a=i||Gt.defaultOutputCalendar;return new It(o,r,a,l)}static resetCache(){Qs=null,zr={},Br={},Ur={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return It.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=x0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=ev(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=iv(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:It.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return Nl(this,e,i,qg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=tv(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Nl(this,e,i,zg,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=nv(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Nl(this,void 0,e,()=>Hg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[He.utc(2016,11,13,9),He.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Nl(this,e,t,Bg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[He.utc(-40,1,1),He.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new sv(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new lv(e,this.intl,t)}relFormatter(e={}){return new ov(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Z0(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Is(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Ls(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function Ps(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function Ug(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(_||m&&u)?-m:m;return[{years:d(Bi(t)),months:d(Bi(i)),weeks:d(Bi(s)),days:d(Bi(l)),hours:d(Bi(o)),minutes:d(Bi(r)),seconds:d(Bi(a),a==="-0"),milliseconds:d(va(f),c)}]}const vv={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ca(n,e,t,i,s,l,o){const r={year:e.length===2?Vr(Di(e)):Di(e),month:Rg.indexOf(t)+1,day:Di(i),hour:Di(s),minute:Di(l)};return o&&(r.second=Di(o)),n&&(r.weekday=n.length>3?jg.indexOf(n)+1:Vg.indexOf(n)+1),r}const yv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function kv(n){const[,e,t,i,s,l,o,r,a,f,u,c]=n,d=Ca(e,s,i,t,l,o,r);let m;return a?m=vv[a]:f?m=0:m=jo(u,c),[d,new hn(m)]}function wv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Sv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,$v=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Cv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Of(n){const[,e,t,i,s,l,o,r]=n;return[Ca(e,s,i,t,l,o,r),hn.utcInstance]}function Tv(n){const[,e,t,i,s,l,o,r]=n;return[Ca(e,r,t,i,s,l,o),hn.utcInstance]}const Mv=Is(av,$a),Ov=Is(fv,$a),Ev=Is(uv,$a),Dv=Is(Yg),Jg=Ls(hv,Fs,$l,Cl),Av=Ls(cv,Fs,$l,Cl),Iv=Ls(dv,Fs,$l,Cl),Lv=Ls(Fs,$l,Cl);function Pv(n){return Ps(n,[Mv,Jg],[Ov,Av],[Ev,Iv],[Dv,Lv])}function Fv(n){return Ps(wv(n),[yv,kv])}function Nv(n){return Ps(n,[Sv,Of],[$v,Of],[Cv,Tv])}function Rv(n){return Ps(n,[gv,bv])}const qv=Ls(Fs);function jv(n){return Ps(n,[_v,qv])}const Vv=Is(pv,mv),zv=Is(Kg),Hv=Ls(Fs,$l,Cl);function Bv(n){return Ps(n,[Vv,Jg],[zv,Hv])}const Uv="Invalid Duration",Zg={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Wv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Zg},Rn=146097/400,ps=146097/4800,Yv={years:{quarters:4,months:12,weeks:Rn/7,days:Rn,hours:Rn*24,minutes:Rn*24*60,seconds:Rn*24*60*60,milliseconds:Rn*24*60*60*1e3},quarters:{months:3,weeks:Rn/28,days:Rn/4,hours:Rn*24/4,minutes:Rn*24*60/4,seconds:Rn*24*60*60/4,milliseconds:Rn*24*60*60*1e3/4},months:{weeks:ps/7,days:ps,hours:ps*24,minutes:ps*24*60,seconds:ps*24*60*60,milliseconds:ps*24*60*60*1e3},...Zg},Zi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Kv=Zi.slice(0).reverse();function Ui(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new ot(i)}function Jv(n){return n<0?Math.floor(n):Math.ceil(n)}function Gg(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?Jv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function Zv(n,e){Kv.reduce((t,i)=>nt(e[i])?t:(t&&Gg(n,e,t,e,i),i),null)}class ot{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||It.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Yv:Wv,this.isLuxonDuration=!0}static fromMillis(e,t){return ot.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Bn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ot({values:_o(e,ot.normalizeUnit),loc:It.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ts(e))return ot.fromMillis(e);if(ot.isDuration(e))return e;if(typeof e=="object")return ot.fromObject(e);throw new Bn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Rv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=jv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Bn("need to specify a reason the Duration is invalid");const i=e instanceof xn?e:new xn(e,t);if(Gt.throwOnInvalid)throw new $0(i);return new ot({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new pg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?kn.create(this.loc,i).formatDurationFromString(this,e):Uv}toHuman(e={}){const t=Zi.map(i=>{const s=this.values[i];return nt(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=ya(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e),i={};for(const s of Zi)(Cs(t.values,s)||Cs(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ui(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Fg(e(this.values[i],i));return Ui(this,{values:t},!0)}get(e){return this[ot.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,..._o(e,ot.normalizeUnit)};return Ui(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Ui(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Zv(this.matrix,e),Ui(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>ot.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Zi)if(e.indexOf(o)>=0){l=o;let r=0;for(const f in i)r+=this.matrix[f][o]*i[f],i[f]=0;ts(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const f in s)Zi.indexOf(f)>Zi.indexOf(o)&&Gg(this.matrix,s,f,t,o)}else ts(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Ui(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Ui(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Zi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Vs="Invalid Interval";function Gv(n,e){return!n||!n.isValid?Ft.invalid("missing or invalid start"):!e||!e.isValid?Ft.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?Ft.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Bs).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(Ft.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=ot.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(Ft.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:Ft.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Ft.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,f)=>a.time-f.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(Ft.fromDateTimes(t,a.time)),t=null);return Ft.merge(s)}difference(...e){return Ft.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Vs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Vs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Vs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Vs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Vs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ot.invalid(this.invalidReason)}mapEndpoints(e){return Ft.fromDateTimes(e(this.s),e(this.e))}}class Rl{static hasDST(e=Gt.defaultZone){const t=He.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return wi.isValidZone(e)}static normalizeZone(e){return Ai(e,Gt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||It.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||It.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||It.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||It.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return It.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return It.create(t,null,"gregory").eras(e)}static features(){return{relative:Lg()}}}function Ef(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(ot.fromMillis(i).as("days"))}function Xv(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const f=Ef(r,a);return(f-f%7)/7}],["days",Ef]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let f=a(n,e);o=n.plus({[r]:f}),o>e?(n=n.plus({[r]:f-1}),f-=1):n=o,s[r]=f}return[n,s,o,l]}function Qv(n,e,t,i){let[s,l,o,r]=Xv(n,e,t);const a=e-s,f=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);f.length===0&&(o0?ot.fromMillis(a,i).shiftTo(...f).plus(u):u}const Ta={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Df={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},xv=Ta.hanidec.replace(/[\[|\]]/g,"").split("");function ey(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Xn({numberingSystem:n},e=""){return new RegExp(`${Ta[n||"latn"]}${e}`)}const ty="missing Intl.DateTimeFormat.formatToParts support";function ft(n,e=t=>t){return{regex:n,deser:([t])=>e(ey(t))}}const ny=String.fromCharCode(160),Xg=`[ ${ny}]`,Qg=new RegExp(Xg,"g");function iy(n){return n.replace(/\./g,"\\.?").replace(Qg,Xg)}function Af(n){return n.replace(/\./g,"").replace(Qg," ").toLowerCase()}function Qn(n,e){return n===null?null:{regex:RegExp(n.map(iy).join("|")),deser:([t])=>n.findIndex(i=>Af(t)===Af(i))+e}}function If(n,e){return{regex:n,deser:([,t,i])=>jo(t,i),groups:e}}function ir(n){return{regex:n,deser:([e])=>e}}function sy(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ly(n,e){const t=Xn(e),i=Xn(e,"{2}"),s=Xn(e,"{3}"),l=Xn(e,"{4}"),o=Xn(e,"{6}"),r=Xn(e,"{1,2}"),a=Xn(e,"{1,3}"),f=Xn(e,"{1,6}"),u=Xn(e,"{1,9}"),c=Xn(e,"{2,4}"),d=Xn(e,"{4,6}"),m=g=>({regex:RegExp(sy(g.val)),deser:([y])=>y,literal:!0}),h=(g=>{if(n.literal)return m(g);switch(g.val){case"G":return Qn(e.eras("short",!1),0);case"GG":return Qn(e.eras("long",!1),0);case"y":return ft(f);case"yy":return ft(c,Vr);case"yyyy":return ft(l);case"yyyyy":return ft(d);case"yyyyyy":return ft(o);case"M":return ft(r);case"MM":return ft(i);case"MMM":return Qn(e.months("short",!0,!1),1);case"MMMM":return Qn(e.months("long",!0,!1),1);case"L":return ft(r);case"LL":return ft(i);case"LLL":return Qn(e.months("short",!1,!1),1);case"LLLL":return Qn(e.months("long",!1,!1),1);case"d":return ft(r);case"dd":return ft(i);case"o":return ft(a);case"ooo":return ft(s);case"HH":return ft(i);case"H":return ft(r);case"hh":return ft(i);case"h":return ft(r);case"mm":return ft(i);case"m":return ft(r);case"q":return ft(r);case"qq":return ft(i);case"s":return ft(r);case"ss":return ft(i);case"S":return ft(a);case"SSS":return ft(s);case"u":return ir(u);case"uu":return ir(r);case"uuu":return ft(t);case"a":return Qn(e.meridiems(),0);case"kkkk":return ft(l);case"kk":return ft(c,Vr);case"W":return ft(r);case"WW":return ft(i);case"E":case"c":return ft(t);case"EEE":return Qn(e.weekdays("short",!1,!1),1);case"EEEE":return Qn(e.weekdays("long",!1,!1),1);case"ccc":return Qn(e.weekdays("short",!0,!1),1);case"cccc":return Qn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return If(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return If(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return ir(/[a-z_+-/]{1,256}?/i);default:return m(g)}})(n)||{invalidReason:ty};return h.token=n,h}const oy={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function ry(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=oy[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function ay(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function fy(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Cs(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function uy(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return nt(n.z)||(t=wi.create(n.z)),nt(n.Z)||(t||(t=new hn(n.Z)),i=n.Z),nt(n.q)||(n.M=(n.q-1)*3+1),nt(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),nt(n.u)||(n.S=va(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let sr=null;function cy(){return sr||(sr=He.fromMillis(1555555555555)),sr}function dy(n,e){if(n.literal)return n;const t=kn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=kn.create(e,t).formatDateTimeParts(cy()).map(o=>ry(o,e,t));return l.includes(void 0)?n:l}function py(n,e){return Array.prototype.concat(...n.map(t=>dy(t,e)))}function xg(n,e,t){const i=py(kn.parseFormat(t),n),s=i.map(o=>ly(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=ay(s),a=RegExp(o,"i"),[f,u]=fy(e,a,r),[c,d,m]=u?uy(u):[null,null,void 0];if(Cs(u,"a")&&Cs(u,"H"))throw new Xs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:f,matches:u,result:c,zone:d,specificOffset:m}}}function my(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=xg(n,e,t);return[i,s,l,o]}const eb=[0,31,59,90,120,151,181,212,243,273,304,334],tb=[0,31,60,91,121,152,182,213,244,274,305,335];function Wn(n,e){return new xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function nb(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function ib(n,e,t){return t+(wl(n)?tb:eb)[e-1]}function sb(n,e){const t=wl(n)?tb:eb,i=t.findIndex(l=>lho(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Vo(n)}}function Lf(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=nb(e,1,4),l=tl(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=tl(r)):o>l?(r=e+1,o-=tl(e)):r=e;const{month:a,day:f}=sb(r,o);return{year:r,month:a,day:f,...Vo(n)}}function lr(n){const{year:e,month:t,day:i}=n,s=ib(e,t,i);return{year:e,ordinal:s,...Vo(n)}}function Pf(n){const{year:e,ordinal:t}=n,{month:i,day:s}=sb(e,t);return{year:e,month:i,day:s,...Vo(n)}}function hy(n){const e=qo(n.weekYear),t=yi(n.weekNumber,1,ho(n.weekYear)),i=yi(n.weekday,1,7);return e?t?i?!1:Wn("weekday",n.weekday):Wn("week",n.week):Wn("weekYear",n.weekYear)}function _y(n){const e=qo(n.year),t=yi(n.ordinal,1,tl(n.year));return e?t?!1:Wn("ordinal",n.ordinal):Wn("year",n.year)}function lb(n){const e=qo(n.year),t=yi(n.month,1,12),i=yi(n.day,1,mo(n.year,n.month));return e?t?i?!1:Wn("day",n.day):Wn("month",n.month):Wn("year",n.year)}function ob(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=yi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=yi(t,0,59),r=yi(i,0,59),a=yi(s,0,999);return l?o?r?a?!1:Wn("millisecond",s):Wn("second",i):Wn("minute",t):Wn("hour",e)}const or="Invalid DateTime",Ff=864e13;function ql(n){return new xn("unsupported zone",`the zone "${n.name}" is not supported`)}function rr(n){return n.weekData===null&&(n.weekData=Wr(n.c)),n.weekData}function zs(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new He({...t,...e,old:t})}function rb(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Nf(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function oo(n,e,t){return rb(ka(n),e,t)}function Rf(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,mo(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=ot.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=ka(l);let[a,f]=rb(r,t,n.zone);return o!==0&&(a+=o,f=n.zone.offset(a)),{ts:a,o:f}}function Hs(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,f=He.fromObject(n,{...t,zone:a,specificOffset:l});return o?f:f.setZone(r)}else return He.invalid(new xn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function jl(n,e,t=!0){return n.isValid?kn.create(It.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function ar(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Ut(n.c.year,t?6:4),e?(i+="-",i+=Ut(n.c.month),i+="-",i+=Ut(n.c.day)):(i+=Ut(n.c.month),i+=Ut(n.c.day)),i}function qf(n,e,t,i,s,l){let o=Ut(n.c.hour);return e?(o+=":",o+=Ut(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Ut(n.c.minute),(n.c.second!==0||!t)&&(o+=Ut(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Ut(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Ut(Math.trunc(-n.o/60)),o+=":",o+=Ut(Math.trunc(-n.o%60))):(o+="+",o+=Ut(Math.trunc(n.o/60)),o+=":",o+=Ut(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const ab={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},gy={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},by={ordinal:1,hour:0,minute:0,second:0,millisecond:0},fb=["year","month","day","hour","minute","second","millisecond"],vy=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],yy=["year","ordinal","hour","minute","second","millisecond"];function jf(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new pg(n);return e}function Vf(n,e){const t=Ai(e.zone,Gt.defaultZone),i=It.fromObject(e),s=Gt.now();let l,o;if(nt(n.year))l=s;else{for(const f of fb)nt(n[f])&&(n[f]=ab[f]);const r=lb(n)||ob(n);if(r)return He.invalid(r);const a=t.offset(s);[l,o]=oo(n,a,t)}return new He({ts:l,zone:t,loc:i,o})}function zf(n,e,t){const i=nt(t.round)?!0:t.round,s=(o,r)=>(o=ya(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Hf(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class He{constructor(e){const t=e.zone||Gt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new xn("invalid input"):null)||(t.isValid?null:ql(t));this.ts=nt(e.ts)?Gt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Nf(this.ts,r),i=Number.isNaN(s.year)?new xn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||It.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new He({})}static local(){const[e,t]=Hf(arguments),[i,s,l,o,r,a,f]=t;return Vf({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:f},e)}static utc(){const[e,t]=Hf(arguments),[i,s,l,o,r,a,f]=t;return e.zone=hn.utcInstance,Vf({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:f},e)}static fromJSDate(e,t={}){const i=O0(e)?e.valueOf():NaN;if(Number.isNaN(i))return He.invalid("invalid input");const s=Ai(t.zone,Gt.defaultZone);return s.isValid?new He({ts:i,zone:s,loc:It.fromObject(t)}):He.invalid(ql(s))}static fromMillis(e,t={}){if(ts(e))return e<-Ff||e>Ff?He.invalid("Timestamp out of range"):new He({ts:e,zone:Ai(t.zone,Gt.defaultZone),loc:It.fromObject(t)});throw new Bn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ts(e))return new He({ts:e*1e3,zone:Ai(t.zone,Gt.defaultZone),loc:It.fromObject(t)});throw new Bn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Ai(t.zone,Gt.defaultZone);if(!i.isValid)return He.invalid(ql(i));const s=Gt.now(),l=nt(t.specificOffset)?i.offset(s):t.specificOffset,o=_o(e,jf),r=!nt(o.ordinal),a=!nt(o.year),f=!nt(o.month)||!nt(o.day),u=a||f,c=o.weekYear||o.weekNumber,d=It.fromObject(t);if((u||r)&&c)throw new Xs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&r)throw new Xs("Can't mix ordinal dates with month/day");const m=c||o.weekday&&!u;let _,h,g=Nf(s,l);m?(_=vy,h=gy,g=Wr(g)):r?(_=yy,h=by,g=lr(g)):(_=fb,h=ab);let y=!1;for(const D of _){const I=o[D];nt(I)?y?o[D]=h[D]:o[D]=g[D]:y=!0}const S=m?hy(o):r?_y(o):lb(o),C=S||ob(o);if(C)return He.invalid(C);const $=m?Lf(o):r?Pf(o):o,[T,M]=oo($,l,i),E=new He({ts:T,zone:i,o:M,loc:d});return o.weekday&&u&&e.weekday!==E.weekday?He.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${E.toISO()}`):E}static fromISO(e,t={}){const[i,s]=Pv(e);return Hs(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Fv(e);return Hs(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Nv(e);return Hs(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(nt(e)||nt(t))throw new Bn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=It.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,f,u]=my(o,e,t);return u?He.invalid(u):Hs(r,a,i,`format ${t}`,e,f)}static fromString(e,t,i={}){return He.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Bv(e);return Hs(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Bn("need to specify a reason the DateTime is invalid");const i=e instanceof xn?e:new xn(e,t);if(Gt.throwOnInvalid)throw new w0(i);return new He({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?rr(this).weekYear:NaN}get weekNumber(){return this.isValid?rr(this).weekNumber:NaN}get weekday(){return this.isValid?rr(this).weekday:NaN}get ordinal(){return this.isValid?lr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Rl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Rl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Rl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Rl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return wl(this.year)}get daysInMonth(){return mo(this.year,this.month)}get daysInYear(){return this.isValid?tl(this.year):NaN}get weeksInWeekYear(){return this.isValid?ho(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=kn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(hn.instance(e),t)}toLocal(){return this.setZone(Gt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Ai(e,Gt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=oo(o,l,e)}return zs(this,{ts:s,zone:e})}else return He.invalid(ql(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return zs(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=_o(e,jf),i=!nt(t.weekYear)||!nt(t.weekNumber)||!nt(t.weekday),s=!nt(t.ordinal),l=!nt(t.year),o=!nt(t.month)||!nt(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Xs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Xs("Can't mix ordinal dates with month/day");let f;i?f=Lf({...Wr(this.c),...t}):nt(t.ordinal)?(f={...this.toObject(),...t},nt(t.day)&&(f.day=Math.min(mo(f.year,f.month),f.day))):f=Pf({...lr(this.c),...t});const[u,c]=oo(f,this.o,this.zone);return zs(this,{ts:u,o:c})}plus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e);return zs(this,Rf(this,t))}minus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e).negate();return zs(this,Rf(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=ot.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?kn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):or}toLocaleString(e=jr,t={}){return this.isValid?kn.create(this.loc.clone(t),e).formatDateTime(this):or}toLocaleParts(e={}){return this.isValid?kn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=ar(this,o);return r+="T",r+=qf(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?ar(this,e==="extended"):null}toISOWeekDate(){return jl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+qf(this,o==="extended",t,e,i,l):null}toRFC2822(){return jl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return jl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ar(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),jl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():or}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return ot.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=E0(t).map(ot.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,f=Qv(r,a,l,s);return o?f.negate():f}diffNow(e="milliseconds",t={}){return this.diff(He.now(),e,t)}until(e){return this.isValid?Ft.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||He.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(He.isDateTime))throw new Bn("max requires all arguments be DateTimes");return vf(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=It.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return xg(o,e,t)}static fromStringExplain(e,t,i={}){return He.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return jr}static get DATE_MED(){return mg}static get DATE_MED_WITH_WEEKDAY(){return C0}static get DATE_FULL(){return hg}static get DATE_HUGE(){return _g}static get TIME_SIMPLE(){return gg}static get TIME_WITH_SECONDS(){return bg}static get TIME_WITH_SHORT_OFFSET(){return vg}static get TIME_WITH_LONG_OFFSET(){return yg}static get TIME_24_SIMPLE(){return kg}static get TIME_24_WITH_SECONDS(){return wg}static get TIME_24_WITH_SHORT_OFFSET(){return Sg}static get TIME_24_WITH_LONG_OFFSET(){return $g}static get DATETIME_SHORT(){return Cg}static get DATETIME_SHORT_WITH_SECONDS(){return Tg}static get DATETIME_MED(){return Mg}static get DATETIME_MED_WITH_SECONDS(){return Og}static get DATETIME_MED_WITH_WEEKDAY(){return T0}static get DATETIME_FULL(){return Eg}static get DATETIME_FULL_WITH_SECONDS(){return Dg}static get DATETIME_HUGE(){return Ag}static get DATETIME_HUGE_WITH_SECONDS(){return Ig}}function Bs(n){if(He.isDateTime(n))return n;if(n&&n.valueOf&&ts(n.valueOf()))return He.fromJSDate(n);if(n&&typeof n=="object")return He.fromObject(n);throw new Bn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const ky=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],wy=[".mp4",".avi",".mov",".3gp",".wmv"],Sy=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],$y=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class H{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||H.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return H.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!H.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!H.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){H.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=H.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!H.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!H.isObject(l)&&!Array.isArray(l)||!H.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!H.isObject(s)&&!Array.isArray(s)||!H.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):H.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||H.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||H.isObject(e)&&Object.keys(e).length>0)&&H.deleteByPath(e,l.join(i),i)}static randomString(e=10){let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s"u")return H.randomString(e);const t=new Uint8Array(e);crypto.getRandomValues(t);const i="-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";let s="";for(let l=0;l=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static formattedFileSize(e){const t=e?Math.floor(Math.log(e)/Math.log(1024)):0;return(e/Math.pow(1024,t)).toFixed(2)*1+" "+["B","KB","MB","GB","TB"][t]}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ss'Z'",24:"yyyy-MM-dd HH:mm:ss.SSS'Z'"},i=t[e.length]||t[19];return He.fromFormat(e,i,{zone:"UTC"})}return He.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{console.warn("Failed to copy.",i)})}static download(e,t){const i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download",t),i.click(),i.remove()}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2));t=t.endsWith(".json")?t:t+".json",H.download(i,t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!ky.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!wy.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!Sy.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!$y.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return H.hasImageExtension(e)?"image":H.hasDocumentExtension(e)?"document":H.hasVideoExtension(e)?"video":H.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),f=a.getContext("2d"),u=r.width,c=r.height;return a.width=t,a.height=i,f.drawImage(r,u>c?(u-c)/2:0,0,u>c?c:u,u>c?c:u,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(H.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)H.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):H.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var a,f,u,c,d,m,_;const t=(e==null?void 0:e.schema)||[],i=(e==null?void 0:e.type)==="auth",s=(e==null?void 0:e.type)==="view",l={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name};i&&(l.username="username123",l.verified=!1,l.emailVisibility=!0,l.email="test@example.com"),(!s||H.extractColumnsFromQuery((a=e==null?void 0:e.options)==null?void 0:a.query).includes("created"))&&(l.created="2022-01-01 01:00:00.123Z"),(!s||H.extractColumnsFromQuery((f=e==null?void 0:e.options)==null?void 0:f.query).includes("updated"))&&(l.updated="2022-01-01 23:59:59.456Z");for(const h of t){let g=null;h.type==="number"?g=123:h.type==="date"?g="2022-01-01 10:00:00.123Z":h.type==="bool"?g=!0:h.type==="email"?g="test@example.com":h.type==="url"?g="https://example.com":h.type==="json"?g="JSON":h.type==="file"?(g="filename.jpg",((u=h.options)==null?void 0:u.maxSelect)!==1&&(g=[g])):h.type==="select"?(g=(d=(c=h.options)==null?void 0:c.values)==null?void 0:d[0],((m=h.options)==null?void 0:m.maxSelect)!==1&&(g=[g])):h.type==="relation"?(g="RELATION_RECORD_ID",((_=h.options)==null?void 0:_.maxSelect)!==1&&(g=[g])):g="test",l[h.name]=g}return l}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let f=null;if(a.type==="number")f=123;else if(a.type==="date")f="2022-01-01 10:00:00.123Z";else if(a.type==="bool")f=!0;else if(a.type==="email")f="test@example.com";else if(a.type==="url")f="https://example.com";else if(a.type==="json")f="JSON";else{if(a.type==="file")continue;a.type==="select"?(f=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(f=[f])):a.type==="relation"?(f="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(f=[f])):f="test"}i[a.name]=f}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"view":return"ri-table-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let f in e)if(f!=="schema"&&JSON.stringify(e[f])!==JSON.stringify(t[f]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(f=>(f==null?void 0:f.id)&&!H.findByKey(l,"id",f.id)),r=l.filter(f=>(f==null?void 0:f.id)&&!H.findByKey(s,"id",f.id)),a=l.filter(f=>{const u=H.isObject(f)&&H.findByKey(s,"id",f.id);if(!u)return!1;for(let c in u)if(JSON.stringify(f[c])!=JSON.stringify(u[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const o of e)o.type==="auth"?t.push(o):o.type==="base"?i.push(o):s.push(o);function l(o,r){return o.name>r.name?1:o.name{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),f=tinymce.activeEditor.editorUpload.blobCache,u=r.result.split(",")[1],c=f.create(a,o,u);f.add(c),e(c.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.code=="KeyS"&&e.formElement&&(i.preventDefault(),i.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",i)))});const t="tinymce_last_direction";e.on("init",()=>{var s;const i=(s=window==null?void 0:window.localStorage)==null?void 0:s.getItem(t);!e.isDirty()&&e.getContent()==""&&i=="rtl"&&e.execCommand("mceDirectionRTL")}),e.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:i=>{i([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"ltr"),tinymce.activeEditor.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTL content",icon:"rtl",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"rtl"),tinymce.activeEditor.execCommand("mceDirectionRTL")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(r=H.stringifyValue(r,i),s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","slug","email","username","nickname","label","heading","message","key","identifier","id"];for(const o of l){let r=H.stringifyValue(e[o],"");if(r)return r}return i}static stringifyValue(e,t="N/A"){if(H.isEmpty(e))return t;if(typeof e=="boolean")return e?"True":"False";if(typeof e=="string")return e=e.indexOf("<")>=0?H.plainText(e):e,H.truncate(e)||t;if(Array.isArray(e))return e.join(",");if(typeof e=="object")try{return H.truncate(JSON.stringify(e))||t}catch{return t}return""+e}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.type==="view")for(let l of H.extractColumnsFromQuery(e.options.query))H.pushUnique(i,t+l);else e.type==="auth"?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)H.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,f,u,c,d;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s*\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!H.isEmpty((f=s[2])==null?void 0:f.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let m of r){m=m.trim().replaceAll("{PB_TEMP}",",");const h=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(m);if((h==null?void 0:h.length)!=4)continue;const g=(c=(u=h[1])==null?void 0:u.trim())==null?void 0:c.replace(l,"");g&&t.columns.push({name:g,collate:h[2]||"",sort:((d=h[3])==null?void 0:d.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+H.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` - `),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=H.parseIndex(e);return i.tableName=t,H.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=H.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?H.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 zo=Fn([]);function go(n,e=4e3){return Ho(n,"info",e)}function Rt(n,e=3e3){return Ho(n,"success",e)}function ss(n,e=4500){return Ho(n,"error",e)}function Cy(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(()=>{ub(i)},t)};zo.update(s=>(Oa(s,i.message),H.pushOrReplaceByKey(s,i,"message"),s))}function ub(n){zo.update(e=>(Oa(e,n),e))}function Ma(){zo.update(n=>{for(let e of n)Oa(n,e);return[]})}function Oa(n,e){let t;typeof e=="string"?t=H.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),H.removeByKey(n,"message",t.message))}const Ci=Fn({});function en(n){Ci.set(n||{})}function ci(n){Ci.update(e=>(H.deleteByPath(e,n),e))}const Ea=Fn({});function Yr(n){Ea.set(n||{})}const ni=Fn([]),Si=Fn({}),bo=Fn(!1),cb=Fn({});function Ty(n){ni.update(e=>{const t=H.findByKey(e,"id",n);return t?Si.set(t):e.length&&Si.set(e[0]),e})}function My(n){Si.update(e=>H.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ni.update(e=>(H.pushOrReplaceByKey(e,n,"id"),Da(),H.sortCollections(e)))}function Oy(n){ni.update(e=>(H.removeByKey(e,"id",n.id),Si.update(t=>t.id===n.id?e[0]:t),Da(),e))}async function Ey(n=null){bo.set(!0);try{let e=await ue.collections.getFullList(200,{sort:"+name"});e=H.sortCollections(e),ni.set(e);const t=n&&H.findByKey(e,"id",n);t?Si.set(t):e.length&&Si.set(e[0]),Da()}catch(e){ue.error(e)}bo.set(!1)}function Da(){cb.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&&ji("/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&&ss(l),H.isEmpty(s.data)||en(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),ji("/")};Ro.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=R1(cb);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(fr)||"";return(!t||ug(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 Dy extends cg{save(e,t){super.save(e,t),t&&!t.collectionId&&Yr(t)}clear(){super.clear(),Yr(null)}}const ue=new Ro("../",new Dy("pb_admin_auth"));ue.authStore.model&&!ue.authStore.model.collectionId&&Yr(ue.authStore.model);function Ay(n){let e,t,i,s,l,o,r,a,f,u,c,d;const m=n[3].default,_=$t(m,n,n[2],null);return{c(){e=v("div"),t=v("main"),_&&_.c(),i=O(),s=v("footer"),l=v("a"),l.innerHTML=` - Docs`,o=O(),r=v("span"),r.textContent="|",a=O(),f=v("a"),u=v("span"),u.textContent="PocketBase v0.17.7",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]),Q(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?Ct(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)&&Q(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 Iy(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 wn extends be{constructor(e){super(),ge(this,e,Iy,Ay,pe,{center:0,class:1})}}function Bf(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=O(),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 Ly(n){let e,t,i,s=!n[0]&&Bf();const l=n[1].default,o=$t(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=O(),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=Bf(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&Tt(o,l,r,r[2],i?Ct(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 Py(n){let e,t;return e=new wn({props:{class:"full-page",center:!0,$$slots:{default:[Ly]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Fy(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 db extends be{constructor(e){super(),ge(this,e,Fy,Py,pe,{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=yl}={}){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,Wi;const Zr="app-tooltip";function Uf(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Fi(){return Wi=Wi||document.querySelector("."+Zr),Wi||(Wi=document.createElement("div"),Wi.classList.add(Zr),document.body.appendChild(Wi)),Wi}function pb(n,e){let t=Fi();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),Fi().classList.remove("active"),Fi().activeNode=void 0}function Ny(n,e){Fi().activeNode=n,clearTimeout(Jr),Jr=setTimeout(()=>{Fi().classList.add("active"),pb(n,e)},isNaN(e.delay)?0:e.delay)}function je(n,e){let t=Uf(e);function i(){Ny(n,t)}function s(){Gr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&H.isFocusable(n))&&n.addEventListener("click",s),Fi(),{update(l){var o,r;t=Uf(l),(r=(o=Fi())==null?void 0:o.activeNode)!=null&&r.contains(n)&&pb(n,t)},destroy(){var l,o;(o=(l=Fi())==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 Wf(n,e,t){const i=n.slice();return i[12]=e[t],i}const Ry=n=>({}),Yf=n=>({uniqueId:n[4]});function qy(n){let e,t,i=n[3],s=[];for(let o=0;oL(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{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 Kf(n){let e,t,i=vo(n[12])+"",s,l,o,r;return{c(){e=v("div"),t=v("pre"),s=U(i),l=O(),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=vo(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 Vy(n){let e,t,i,s,l,o,r;const a=n[9].default,f=$t(a,n,n[8],Yf),u=[jy,qy],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=O(),s.c(),p(e,"class",n[1]),Q(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?Ct(a,m[8],_,Ry):Mt(m[8]),Yf);let h=i;i=d(m),i===h?c[i].p(m,_):(re(),L(c[h],1,1,()=>{c[h]=null}),ae(),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)&&Q(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 Jf="Invalid value";function vo(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||Jf:n||Jf}function zy(n,e,t){let i;We(n,Ci,h=>t(7,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+H.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:f=void 0}=e,u,c=[];function d(){ci(r)}Kt(()=>(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=H.toArray(H.getNestedVal(i,r)))},[a,f,u,c,o,r,d,i,l,s,m,_]}class ce extends be{constructor(e){super(),ge(this,e,zy,Vy,pe,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function Hy(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=O(),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),oe(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]&&oe(l,f[0])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function By(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Password"),s=O(),l=v("input"),r=O(),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),oe(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]&&oe(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),f=!1,u()}}}function Uy(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Password confirm"),s=O(),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),oe(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]&&oe(l,f[2])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function Wy(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:[Hy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[By,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),a=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Uy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Create your first admin account in order to continue

    ",i=O(),z(s.$$.fragment),l=O(),z(o.$$.fragment),r=O(),z(a.$$.fragment),f=O(),u=v("button"),u.innerHTML=`Create and login - `,p(t,"class","content txt-center m-b-base"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block btn-next"),Q(u,"btn-disabled",n[3]),Q(u,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(_,h){w(_,e,h),b(e,t),b(e,i),j(s,e,null),b(e,l),j(o,e,null),b(e,r),j(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)&&Q(u,"btn-disabled",_[3]),(!c||h&8)&&Q(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),V(s),V(o),V(a),d=!1,m()}}}function Yy(n,e,t){const i=yt();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 Ky extends be{constructor(e){super(),ge(this,e,Yy,Wy,pe,{})}}function Zf(n){let e,t;return e=new db({props:{$$slots:{default:[Jy]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Jy(n){let e,t;return e=new Ky({}),e.$on("submit",n[1]),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p:x,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Zy(n){let e,t,i=n[0]&&Zf(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=Zf(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(re(),L(i,1,1,()=>{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function Gy(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?ji("/collections"):ue.logout()}return[i,async()=>{t(0,i=!1),await sn(),window.location.search=""}]}class Xy extends be{constructor(e){super(),ge(this,e,Gy,Zy,pe,{})}}const Et=Fn(""),yo=Fn(""),Ts=Fn(!1);function Qy(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),oe(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]&&oe(e,l[7])},i:x,o:x,d(l){l&&k(e),n[13](null),i=!1,s()}}}function xy(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=Ot(o,r(n)),ne.push(()=>de(e,"value",l)),e.$on("submit",n[10])),{c(){e&&z(e.$$.fragment),i=ye()},m(a,f){e&&j(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],_e(()=>t=!1)),f&16&&o!==(o=a[4])){if(e){re();const c=e;L(c.$$.fragment,1,0,()=>{V(c,1)}),ae()}o?(e=Ot(o,r(a)),ne.push(()=>de(e,"value",l)),e.$on("submit",a[10]),z(e.$$.fragment),A(e.$$.fragment,1),j(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&&V(e,a)}}}function Gf(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(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 Xf(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Clear',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:x,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 ek(n){let e,t,i,s,l,o,r,a,f,u,c;const d=[xy,Qy],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]&&Gf(),g=(n[0].length||n[7].length)&&Xf(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=O(),o.c(),r=O(),h&&h.c(),a=O(),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",Pn(n[11])),Y(e,"submit",Xe(n[10]))],u=!0)},p(y,[S]){let C=l;l=_(y),l===C?m[l].p(y,S):(re(),L(m[C],1,1,()=>{m[C]=null}),ae(),o=m[l],o?o.p(y,S):(o=m[l]=d[l](y),o.c()),A(o,1),o.m(e,r)),(y[0].length||y[7].length)&&y[7]!=y[0]?h?S&129&&A(h,1):(h=Gf(),h.c(),A(h,1),h.m(e,a)):h&&(re(),L(h,1,1,()=>{h=null}),ae()),y[0].length||y[7].length?g?(g.p(y,S),S&129&&A(g,1)):(g=Xf(y),g.c(),A(g,1),g.m(e,null)):g&&(re(),L(g,1,1,()=>{g=null}),ae())},i(y){f||(A(o),A(h),A(g),f=!0)},o(y){L(o),L(h),L(g),f=!1},d(y){y&&k(e),m[l].d(),h&&h.d(),g&&g.d(),u=!1,Ce(c)}}}function tk(n,e,t){const i=yt(),s="search_"+H.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=H.initCollection()}=e,{extraAutocompleteKeys:a=[]}=e,f,u=!1,c,d="";function m(T=!0){t(7,d=""),T&&(c==null||c.focus()),i("clear")}function _(){t(0,l=d),i("submit",l)}async function h(){f||u||(t(5,u=!0),t(4,f=(await lt(()=>import("./FilterAutocompleteInput-8ec993bb.js"),["./FilterAutocompleteInput-8ec993bb.js","./index-4841d67b.js"],import.meta.url)).default),t(5,u=!1))}Kt(()=>{h()});function g(T){Fe.call(this,n,T)}function y(T){d=T,t(7,d),t(0,l)}function S(T){ne[T?"unshift":"push"](()=>{c=T,t(6,c)})}function C(){d=this.value,t(7,d),t(0,l)}const $=()=>{m(!1),_()};return n.$$set=T=>{"value"in T&&t(0,l=T.value),"placeholder"in T&&t(1,o=T.placeholder),"autocompleteCollection"in T&&t(2,r=T.autocompleteCollection),"extraAutocompleteKeys"in T&&t(3,a=T.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,f,u,c,d,s,m,_,g,y,S,C,$]}class Uo extends be{constructor(e){super(),ge(this,e,tk,ek,pe,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function nk(n){let e,t,i,s,l,o;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-refresh-line svelte-1bvelc2"),p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class",i="btn btn-transparent btn-circle "+n[1]+" svelte-1bvelc2"),Q(e,"refreshing",n[2])},m(r,a){w(r,e,a),b(e,t),l||(o=[Se(s=je.call(null,e,n[0])),Y(e,"click",n[3])],l=!0)},p(r,[a]){a&2&&i!==(i="btn btn-transparent btn-circle "+r[1]+" svelte-1bvelc2")&&p(e,"class",i),s&&Dt(s.update)&&a&1&&s.update.call(null,r[0]),a&6&&Q(e,"refreshing",r[2])},i:x,o:x,d(r){r&&k(e),l=!1,Ce(o)}}}function ik(n,e,t){const i=yt();let{tooltip:s={text:"Refresh",position:"right"}}=e,{class:l=""}=e,o=null;function r(){i("refresh");const a=s;t(0,s=null),clearTimeout(o),t(2,o=setTimeout(()=>{t(2,o=null),t(0,s=a)},150))}return Kt(()=>()=>clearTimeout(o)),n.$$set=a=>{"tooltip"in a&&t(0,s=a.tooltip),"class"in a&&t(1,l=a.class)},[s,l,o,r]}class Wo extends be{constructor(e){super(),ge(this,e,ik,nk,pe,{tooltip:0,class:1})}}function sk(n){let e,t,i,s,l;const o=n[6].default,r=$t(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,f){w(a,e,f),r&&r.m(e,null),i=!0,s||(l=[Y(e,"click",n[7]),Y(e,"keydown",n[8])],s=!0)},p(a,[f]){r&&r.p&&(!i||f&32)&&Tt(r,o,a,a[5],i?Ct(o,a[5],f,null):Mt(a[5]),null),(!i||f&4)&&p(e,"title",a[2]),(!i||f&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||f&10)&&Q(e,"col-sort-disabled",a[3]),(!i||f&7)&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||f&7)&&Q(e,"sort-desc",a[0]==="-"+a[2]),(!i||f&7)&&Q(e,"sort-asc",a[0]==="+"+a[2])},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,Ce(l)}}}function lk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function f(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const u=()=>f(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),f())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,f,s,i,u,c]}class un extends be{constructor(e){super(),ge(this,e,lk,sk,pe,{class:1,name:2,sort:0,disable:3})}}function ok(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function rk(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=U(n[2]),s=O(),l=v("div"),o=U(n[1]),r=U(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,f){w(a,e,f),b(e,t),b(t,i),b(e,s),b(e,l),b(l,o),b(l,r)},p(a,f){f&4&&se(i,a[2]),f&2&&se(o,a[1])},d(a){a&&k(e)}}}function ak(n){let e;function t(l,o){return l[0]?rk:ok}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:x,o:x,d(l){s.d(l),l&&k(e)}}}function fk(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class $i extends be{constructor(e){super(),ge(this,e,fk,ak,pe,{date:0})}}const uk=n=>({}),Qf=n=>({}),ck=n=>({}),xf=n=>({});function dk(n){let e,t,i,s,l,o,r,a;const f=n[5].before,u=$t(f,n,n[4],xf),c=n[5].default,d=$t(c,n,n[4],null),m=n[5].after,_=$t(m,n,n[4],Qf);return{c(){e=v("div"),u&&u.c(),t=O(),i=v("div"),d&&d.c(),l=O(),_&&_.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(h,g){w(h,e,g),u&&u.m(e,null),b(e,t),b(e,i),d&&d.m(i,null),n[6](i),b(e,l),_&&_.m(e,null),o=!0,r||(a=[Y(window,"resize",n[1]),Y(i,"scroll",n[1])],r=!0)},p(h,[g]){u&&u.p&&(!o||g&16)&&Tt(u,f,h,h[4],o?Ct(f,h[4],g,ck):Mt(h[4]),xf),d&&d.p&&(!o||g&16)&&Tt(d,c,h,h[4],o?Ct(c,h[4],g,null):Mt(h[4]),null),(!o||g&9&&s!==(s="horizontal-scroller "+h[0]+" "+h[3]+" svelte-wc2j9h"))&&p(i,"class",s),_&&_.p&&(!o||g&16)&&Tt(_,m,h,h[4],o?Ct(m,h[4],g,uk):Mt(h[4]),Qf)},i(h){o||(A(u,h),A(d,h),A(_,h),o=!0)},o(h){L(u,h),L(d,h),L(_,h),o=!1},d(h){h&&k(e),u&&u.d(h),d&&d.d(h),n[6](null),_&&_.d(h),r=!1,Ce(a)}}}function pk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,f;function u(){o&&(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,m=o.scrollWidth;m-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}Kt(()=>(u(),f=new MutationObserver(()=>{u()}),f.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{f==null||f.disconnect(),clearTimeout(a)}));function c(d){ne[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,u,o,r,s,i,c]}class Aa extends be{constructor(e){super(),ge(this,e,pk,dk,pe,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function eu(n,e,t){const i=n.slice();return i[23]=e[t],i}function mk(n){let e;return{c(){e=v("div"),e.innerHTML=` - Method`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function hk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="URL",p(t,"class",H.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:x,d(l){l&&k(e)}}}function _k(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="Referer",p(t,"class",H.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:x,d(l){l&&k(e)}}}function gk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="User IP",p(t,"class",H.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:x,d(l){l&&k(e)}}}function bk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="Status",p(t,"class",H.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:x,d(l){l&&k(e)}}}function vk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="Created",p(t,"class",H.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:x,d(l){l&&k(e)}}}function tu(n){let e;function t(l,o){return l[6]?kk:yk}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 yk(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&nu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=O(),o&&o.c(),l=O(),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=nu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function kk(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function nu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[19]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function iu(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 su(n,e){var Te,Je,gt;let t,i,s,l=((Te=e[23].method)==null?void 0:Te.toUpperCase())+"",o,r,a,f,u,c=e[23].url+"",d,m,_,h,g,y,S=(e[23].referer||"N/A")+"",C,$,T,M,E,D=(e[23].userIp||"N/A")+"",I,P,F,N,R,q=e[23].status+"",B,K,J,X,G,fe,ee,te,Oe,Pe,Ve=(((Je=e[23].meta)==null?void 0:Je.errorMessage)||((gt=e[23].meta)==null?void 0:gt.errorData))&&iu();X=new $i({props:{date:e[23].created}});function ze(){return e[17](e[23])}function we(...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=O(),f=v("td"),u=v("span"),d=U(c),_=O(),Ve&&Ve.c(),h=O(),g=v("td"),y=v("span"),C=U(S),T=O(),M=v("td"),E=v("span"),I=U(D),F=O(),N=v("td"),R=v("span"),B=U(q),K=O(),J=v("td"),z(X.$$.fragment),G=O(),fe=v("td"),fe.innerHTML='',ee=O(),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",$=e[23].referer),Q(y,"txt-hint",!e[23].referer),p(g,"class","col-type-text col-field-referer"),p(E,"class","txt txt-ellipsis"),p(E,"title",P=e[23].userIp),Q(E,"txt-hint",!e[23].userIp),p(M,"class","col-type-number col-field-userIp"),p(R,"class","label"),Q(R,"label-danger",e[23].status>=400),p(N,"class","col-type-number col-field-status"),p(J,"class","col-type-date col-field-created"),p(fe,"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,_),Ve&&Ve.m(f,null),b(t,h),b(t,g),b(g,y),b(y,C),b(t,T),b(t,M),b(M,E),b(E,I),b(t,F),b(t,N),b(N,R),b(R,B),b(t,K),b(t,J),j(X,J,null),b(t,G),b(t,fe),b(t,ee),te=!0,Oe||(Pe=[Y(t,"click",ze),Y(t,"keydown",we)],Oe=!0)},p(Ze,Ye){var me,ve,Ke;e=Ze,(!te||Ye&8)&&l!==(l=((me=e[23].method)==null?void 0:me.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),(ve=e[23].meta)!=null&&ve.errorMessage||(Ke=e[23].meta)!=null&&Ke.errorData?Ve||(Ve=iu(),Ve.c(),Ve.m(f,null)):Ve&&(Ve.d(1),Ve=null),(!te||Ye&8)&&S!==(S=(e[23].referer||"N/A")+"")&&se(C,S),(!te||Ye&8&&$!==($=e[23].referer))&&p(y,"title",$),(!te||Ye&8)&&Q(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(E,"title",P),(!te||Ye&8)&&Q(E,"txt-hint",!e[23].userIp),(!te||Ye&8)&&q!==(q=e[23].status+"")&&se(B,q),(!te||Ye&8)&&Q(R,"label-danger",e[23].status>=400);const wt={};Ye&8&&(wt.date=e[23].created),X.$set(wt)},i(Ze){te||(A(X.$$.fragment,Ze),te=!0)},o(Ze){L(X.$$.fragment,Ze),te=!1},d(Ze){Ze&&k(t),Ve&&Ve.d(),V(X),Oe=!1,Ce(Pe)}}}function wk(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T,M,E,D,I=[],P=new Map,F;function N(we){n[11](we)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[mk]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new un({props:R}),ne.push(()=>de(s,"sort",N));function q(we){n[12](we)}let B={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[hk]},$$scope:{ctx:n}};n[1]!==void 0&&(B.sort=n[1]),r=new un({props:B}),ne.push(()=>de(r,"sort",q));function K(we){n[13](we)}let J={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[_k]},$$scope:{ctx:n}};n[1]!==void 0&&(J.sort=n[1]),u=new un({props:J}),ne.push(()=>de(u,"sort",K));function X(we){n[14](we)}let G={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[gk]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),m=new un({props:G}),ne.push(()=>de(m,"sort",X));function fe(we){n[15](we)}let ee={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[bk]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),g=new un({props:ee}),ne.push(()=>de(g,"sort",fe));function te(we){n[16](we)}let Oe={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[vk]},$$scope:{ctx:n}};n[1]!==void 0&&(Oe.sort=n[1]),C=new un({props:Oe}),ne.push(()=>de(C,"sort",te));let Pe=n[3];const Ve=we=>we[23].id;for(let we=0;wel=!1)),s.$set(Je);const gt={};Te&67108864&&(gt.$$scope={dirty:Te,ctx:we}),!a&&Te&2&&(a=!0,gt.sort=we[1],_e(()=>a=!1)),r.$set(gt);const Ze={};Te&67108864&&(Ze.$$scope={dirty:Te,ctx:we}),!c&&Te&2&&(c=!0,Ze.sort=we[1],_e(()=>c=!1)),u.$set(Ze);const Ye={};Te&67108864&&(Ye.$$scope={dirty:Te,ctx:we}),!_&&Te&2&&(_=!0,Ye.sort=we[1],_e(()=>_=!1)),m.$set(Ye);const wt={};Te&67108864&&(wt.$$scope={dirty:Te,ctx:we}),!y&&Te&2&&(y=!0,wt.sort=we[1],_e(()=>y=!1)),g.$set(wt);const me={};Te&67108864&&(me.$$scope={dirty:Te,ctx:we}),!$&&Te&2&&($=!0,me.sort=we[1],_e(()=>$=!1)),C.$set(me),Te&841&&(Pe=we[3],re(),I=vt(I,Te,Ve,1,we,Pe,P,D,Ht,su,null,eu),ae(),!Pe.length&&ze?ze.p(we,Te):Pe.length?ze&&(ze.d(1),ze=null):(ze=tu(we),ze.c(),ze.m(D,null))),(!F||Te&64)&&Q(e,"table-loading",we[6])},i(we){if(!F){A(s.$$.fragment,we),A(r.$$.fragment,we),A(u.$$.fragment,we),A(m.$$.fragment,we),A(g.$$.fragment,we),A(C.$$.fragment,we);for(let Te=0;Te{if(P<=1&&h(),t(6,d=!1),t(5,u=N.page),t(4,c=N.totalItems),s("load",f.concat(N.items)),F){const R=++m;for(;N.items.length&&m==R;)t(3,f=f.concat(N.items.splice(0,10))),await H.yieldToMain()}else t(3,f=f.concat(N.items))}).catch(N=>{N!=null&&N.isAbort||(t(6,d=!1),console.warn(N),h(),ue.error(N,(N==null?void 0:N.status)!=400))})}function h(){t(3,f=[]),t(5,u=1),t(4,c=0)}function g(P){a=P,t(1,a)}function y(P){a=P,t(1,a)}function S(P){a=P,t(1,a)}function C(P){a=P,t(1,a)}function $(P){a=P,t(1,a)}function T(P){a=P,t(1,a)}const M=P=>s("select",P),E=(P,F)=>{F.code==="Enter"&&(F.preventDefault(),s("select",P))},D=()=>t(0,o=""),I=()=>_(u+1);return n.$$set=P=>{"filter"in P&&t(0,o=P.filter),"presets"in P&&t(10,r=P.presets),"sort"in P&&t(1,a=P.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(h(),_(1)),n.$$.dirty&24&&t(7,i=c>f.length)},[o,a,_,f,c,u,d,i,s,l,r,g,y,S,C,$,T,M,E,D,I]}class Ck extends be{constructor(e){super(),ge(this,e,$k,Sk,pe,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! - * Chart.js v3.9.1 - * https://www.chartjs.org - * (c) 2022 Chart.js Contributors - * Released under the MIT License - */function hi(){}const Tk=function(){let n=0;return function(){return n++}}();function dt(n){return n===null||typeof n>"u"}function St(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function et(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const zt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function jn(n,e){return zt(n)?n:e}function it(n,e){return typeof n>"u"?e:n}const Mk=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,mb=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Nt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function ht(n,e,t,i){let s,l,o;if(St(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function Ri(n,e){return(ru[e]||(ru[e]=Dk(e)))(n)}function Dk(n){const e=Ak(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Ak(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function Ia(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Kn=n=>typeof n<"u",qi=n=>typeof n=="function",au=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function Ik(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const jt=Math.PI,bt=2*jt,Lk=bt+jt,So=Number.POSITIVE_INFINITY,Pk=jt/180,qt=jt/2,Us=jt/4,fu=jt*2/3,Un=Math.log10,fi=Math.sign;function uu(n){const e=Math.round(n);n=sl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Un(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function Fk(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function Ms(n){return!isNaN(parseFloat(n))&&isFinite(n)}function sl(n,e,t){return Math.abs(n-e)=n}function _b(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&f=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Pa(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const xi=(n,e,t,i)=>Pa(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Pa(n,t,i=>n[i][e]>=t);function Vk(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+Ia(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function du(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(bb.forEach(l=>{delete n[l]}),delete n._chartjs)}function vb(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function kb(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,yb.call(window,()=>{s=!1,n.apply(e,l)}))}}function Hk(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Bk=n=>n==="start"?"left":n==="end"?"right":"center",pu=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function wb(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:f,max:u,minDefined:c,maxDefined:d}=o.getUserBounds();c&&(s=cn(Math.min(xi(r,o.axis,f).lo,t?i:xi(e,a,o.getPixelForValue(f)).lo),0,i-1)),d?l=cn(Math.max(xi(r,o.axis,u,!0).hi+1,t?0:xi(e,a,o.getPixelForValue(u),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function Sb(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Vl=n=>n===0||n===1,mu=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*bt/t)),hu=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*bt/t)+1,ll={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*qt)+1,easeOutSine:n=>Math.sin(n*qt),easeInOutSine:n=>-.5*(Math.cos(jt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Vl(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Vl(n)?n:mu(n,.075,.3),easeOutElastic:n=>Vl(n)?n:hu(n,.075,.3),easeInOutElastic(n){return Vl(n)?n:n<.5?.5*mu(n*2,.1125,.45):.5+.5*hu(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-ll.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ll.easeInBounce(n*2)*.5:ll.easeOutBounce(n*2-1)*.5+.5};/*! - * @kurkle/color v0.2.1 - * https://github.com/kurkle/color#readme - * (c) 2022 Jukka Kurkela - * Released under the MIT License - */function Tl(n){return n+.5|0}const Ii=(n,e,t)=>Math.max(Math.min(n,t),e);function xs(n){return Ii(Tl(n*2.55),0,255)}function Ni(n){return Ii(Tl(n*255),0,255)}function bi(n){return Ii(Tl(n/2.55)/100,0,1)}function _u(n){return Ii(Tl(n*100),0,100)}const qn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Qr=[..."0123456789ABCDEF"],Uk=n=>Qr[n&15],Wk=n=>Qr[(n&240)>>4]+Qr[n&15],zl=n=>(n&240)>>4===(n&15),Yk=n=>zl(n.r)&&zl(n.g)&&zl(n.b)&&zl(n.a);function Kk(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&qn[n[1]]*17,g:255&qn[n[2]]*17,b:255&qn[n[3]]*17,a:e===5?qn[n[4]]*17:255}:(e===7||e===9)&&(t={r:qn[n[1]]<<4|qn[n[2]],g:qn[n[3]]<<4|qn[n[4]],b:qn[n[5]]<<4|qn[n[6]],a:e===9?qn[n[7]]<<4|qn[n[8]]:255})),t}const Jk=(n,e)=>n<255?e(n):"";function Zk(n){var e=Yk(n)?Uk:Wk;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Jk(n.a,e):void 0}const Gk=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function $b(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function Xk(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function Qk(n,e,t){const i=$b(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function xk(n,e,t,i,s){return n===s?(e-t)/i+(e.5?u/(2-l-o):u/(l+o),a=xk(t,i,s,u,l),a=a*60+.5),[a|0,f||0,r]}function Na(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Ni)}function Ra(n,e,t){return Na($b,n,e,t)}function e2(n,e,t){return Na(Qk,n,e,t)}function t2(n,e,t){return Na(Xk,n,e,t)}function Cb(n){return(n%360+360)%360}function n2(n){const e=Gk.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?xs(+e[5]):Ni(+e[5]));const s=Cb(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=e2(s,l,o):e[1]==="hsv"?i=t2(s,l,o):i=Ra(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function i2(n,e){var t=Fa(n);t[0]=Cb(t[0]+e),t=Ra(t),n.r=t[0],n.g=t[1],n.b=t[2]}function s2(n){if(!n)return;const e=Fa(n),t=e[0],i=_u(e[1]),s=_u(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${bi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const gu={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},bu={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function l2(){const n={},e=Object.keys(bu),t=Object.keys(gu);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Hl;function o2(n){Hl||(Hl=l2(),Hl.transparent=[0,0,0,0]);const e=Hl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const r2=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function a2(n){const e=r2.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?xs(o):Ii(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?xs(i):Ii(i,0,255)),s=255&(e[4]?xs(s):Ii(s,0,255)),l=255&(e[6]?xs(l):Ii(l,0,255)),{r:i,g:s,b:l,a:t}}}function f2(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${bi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const ur=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,ms=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function u2(n,e,t){const i=ms(bi(n.r)),s=ms(bi(n.g)),l=ms(bi(n.b));return{r:Ni(ur(i+t*(ms(bi(e.r))-i))),g:Ni(ur(s+t*(ms(bi(e.g))-s))),b:Ni(ur(l+t*(ms(bi(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Bl(n,e,t){if(n){let i=Fa(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Ra(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Tb(n,e){return n&&Object.assign(e||{},n)}function vu(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=Ni(n[3]))):(e=Tb(n,{r:0,g:0,b:0,a:1}),e.a=Ni(e.a)),e}function c2(n){return n.charAt(0)==="r"?a2(n):n2(n)}class $o{constructor(e){if(e instanceof $o)return e;const t=typeof e;let i;t==="object"?i=vu(e):t==="string"&&(i=Kk(e)||o2(e)||c2(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Tb(this._rgb);return e&&(e.a=bi(e.a)),e}set rgb(e){this._rgb=vu(e)}rgbString(){return this._valid?f2(this._rgb):void 0}hexString(){return this._valid?Zk(this._rgb):void 0}hslString(){return this._valid?s2(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,f=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-f,i.r=255&f*i.r+l*s.r+.5,i.g=255&f*i.g+l*s.g+.5,i.b=255&f*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=u2(this._rgb,e._rgb,t)),this}clone(){return new $o(this.rgb)}alpha(e){return this._rgb.a=Ni(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Tl(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Bl(this._rgb,2,e),this}darken(e){return Bl(this._rgb,2,-e),this}saturate(e){return Bl(this._rgb,1,e),this}desaturate(e){return Bl(this._rgb,1,-e),this}rotate(e){return i2(this._rgb,e),this}}function Mb(n){return new $o(n)}function Ob(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function yu(n){return Ob(n)?n:Mb(n)}function cr(n){return Ob(n)?n:Mb(n).saturate(.5).darken(.1).hexString()}const ls=Object.create(null),xr=Object.create(null);function ol(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>cr(i.backgroundColor),this.hoverBorderColor=(t,i)=>cr(i.borderColor),this.hoverColor=(t,i)=>cr(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return dr(this,e,t)}get(e){return ol(this,e)}describe(e,t){return dr(xr,e,t)}override(e,t){return dr(ls,e,t)}route(e,t,i,s){const l=ol(this,e),o=ol(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],f=o[s];return et(a)?Object.assign({},f,a):it(a,f)},set(a){this[r]=a}}})}}var st=new d2({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function p2(n){return!n||dt(n.size)||dt(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Co(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function m2(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,f,u,c,d;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function hl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,f;for(n.save(),n.font=s.string,b2(n,l),a=0;a+n||0;function Va(n,e){const t={},i=et(e),s=i?Object.keys(e):e,l=et(n)?i?o=>it(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=S2(l(o));return t}function Eb(n){return Va(n,{top:"y",right:"x",bottom:"y",left:"x"})}function ks(n){return Va(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Jn(n){const e=Eb(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function In(n,e){n=n||{},e=e||st.font;let t=it(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=it(n.style,e.style);i&&!(""+i).match(k2)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:it(n.family,e.family),lineHeight:w2(it(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:it(n.weight,e.weight),string:""};return s.string=p2(s),s}function Ul(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function Vi(n,e){return Object.assign(Object.create(n),e)}function za(n,e=[""],t=n,i,s=()=>n[0]){Kn(i)||(i=Lb("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>za([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return Ab(o,r,()=>I2(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return Su(o).includes(r)},ownKeys(o){return Su(o)},set(o,r,a){const f=o._storage||(o._storage=s());return o[r]=f[r]=a,delete o._keys,!0}})}function Os(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:Db(n,i),setContext:l=>Os(n,l,t,i),override:l=>Os(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return Ab(l,o,()=>T2(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function Db(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:qi(t)?t:()=>t,isIndexable:qi(i)?i:()=>i}}const C2=(n,e)=>n?n+Ia(e):e,Ha=(n,e)=>et(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Ab(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function T2(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return qi(r)&&o.isScriptable(e)&&(r=M2(e,r,n,t)),St(r)&&r.length&&(r=O2(e,r,n,o.isIndexable)),Ha(e,r)&&(r=Os(r,s,l&&l[e],o)),r}function M2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),Ha(n,e)&&(e=Ba(s._scopes,s,n,e)),e}function O2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(Kn(l.index)&&i(n))e=e[l.index%e.length];else if(et(e[0])){const a=e,f=s._scopes.filter(u=>u!==a);e=[];for(const u of a){const c=Ba(f,s,n,u);e.push(Os(c,l,o&&o[n],r))}}return e}function Ib(n,e,t){return qi(n)?n(e,t):n}const E2=(n,e)=>n===!0?e:typeof n=="string"?Ri(e,n):void 0;function D2(n,e,t,i,s){for(const l of e){const o=E2(t,l);if(o){n.add(o);const r=Ib(o._fallback,t,s);if(Kn(r)&&r!==t&&r!==i)return r}else if(o===!1&&Kn(i)&&t!==i)return null}return!1}function Ba(n,e,t,i){const s=e._rootScopes,l=Ib(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=wu(r,o,t,l||t,i);return a===null||Kn(l)&&l!==t&&(a=wu(r,o,l,a,i),a===null)?!1:za(Array.from(r),[""],s,l,()=>A2(e,t,i))}function wu(n,e,t,i,s){for(;t;)t=D2(n,e,t,i,s);return t}function A2(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return St(s)&&et(t)?t:s}function I2(n,e,t,i){let s;for(const l of e)if(s=Lb(C2(l,n),t),Kn(s))return Ha(n,s)?Ba(t,i,n,s):s}function Lb(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Kn(i))return i}}function Su(n){let e=n._keys;return e||(e=n._keys=L2(n._scopes)),e}function L2(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function Pb(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,f,u;for(r=0,a=i;ren==="x"?"y":"x";function F2(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=Xr(l,s),a=Xr(o,l);let f=r/(r+a),u=a/(r+a);f=isNaN(f)?0:f,u=isNaN(u)?0:u;const c=i*f,d=i*u;return{previous:{x:l.x-c*(o.x-s.x),y:l.y-c*(o.y-s.y)},next:{x:l.x+d*(o.x-s.x),y:l.y+d*(o.y-s.y)}}}function N2(n,e,t){const i=n.length;let s,l,o,r,a,f=Es(n,0);for(let u=0;u!f.skip)),e.cubicInterpolationMode==="monotone")q2(n,s);else{let f=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function z2(n,e){return Yo(n).getPropertyValue(e)}const H2=["top","right","bottom","left"];function ns(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=H2[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const B2=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function U2(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(B2(s,l,n.target))r=s,a=l;else{const f=e.getBoundingClientRect();r=i.clientX-f.left,a=i.clientY-f.top,o=!0}return{x:r,y:a,box:o}}function Gi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Yo(t),l=s.boxSizing==="border-box",o=ns(s,"padding"),r=ns(s,"border","width"),{x:a,y:f,box:u}=U2(n,t),c=o.left+(u&&r.left),d=o.top+(u&&r.top);let{width:m,height:_}=e;return l&&(m-=o.width+r.width,_-=o.height+r.height),{x:Math.round((a-c)/m*t.width/i),y:Math.round((f-d)/_*t.height/i)}}function W2(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Ua(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Yo(l),a=ns(r,"border","width"),f=ns(r,"padding");e=o.width-f.width-a.width,t=o.height-f.height-a.height,i=Oo(r.maxWidth,l,"clientWidth"),s=Oo(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||So,maxHeight:s||So}}const pr=n=>Math.round(n*10)/10;function Y2(n,e,t,i){const s=Yo(n),l=ns(s,"margin"),o=Oo(s.maxWidth,n,"clientWidth")||So,r=Oo(s.maxHeight,n,"clientHeight")||So,a=W2(n,e,t);let{width:f,height:u}=a;if(s.boxSizing==="content-box"){const c=ns(s,"border","width"),d=ns(s,"padding");f-=d.width+c.width,u-=d.height+c.height}return f=Math.max(0,f-l.width),u=Math.max(0,i?Math.floor(f/i):u-l.height),f=pr(Math.min(f,o,a.maxWidth)),u=pr(Math.min(u,r,a.maxHeight)),f&&!u&&(u=pr(f/2)),{width:f,height:u}}function $u(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const K2=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function Cu(n,e){const t=z2(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Xi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function J2(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function Z2(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=Xi(n,s,t),r=Xi(s,l,t),a=Xi(l,e,t),f=Xi(o,r,t),u=Xi(r,a,t);return Xi(f,u,t)}const Tu=new Map;function G2(n,e){e=e||{};const t=n+JSON.stringify(e);let i=Tu.get(t);return i||(i=new Intl.NumberFormat(n,e),Tu.set(t,i)),i}function Ml(n,e,t){return G2(e,t).format(n)}const X2=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},Q2=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function mr(n,e,t){return n?X2(e,t):Q2()}function x2(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function ew(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function Rb(n){return n==="angle"?{between:pl,compare:Rk,normalize:An}:{between:ml,compare:(e,t)=>e-t,normalize:e=>e}}function Mu({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function tw(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=Rb(i),a=e.length;let{start:f,end:u,loop:c}=n,d,m;if(c){for(f+=a,u+=a,d=0,m=a;da(s,C,y)&&r(s,C)!==0,T=()=>r(l,y)===0||a(l,C,y),M=()=>h||$(),E=()=>!h||T();for(let D=u,I=u;D<=c;++D)S=e[D%o],!S.skip&&(y=f(S[i]),y!==C&&(h=a(y,s,l),g===null&&M()&&(g=r(y,s)===0?D:I),g!==null&&E()&&(_.push(Mu({start:g,end:D,loop:d,count:o,style:m})),g=null),I=D,C=y));return g!==null&&_.push(Mu({start:g,end:c,loop:d,count:o,style:m})),_}function jb(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function iw(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const f=n[a%s];f.skip||f.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=f.stop?a:null):(o=a,r.skip&&(e=a)),r=f}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function sw(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=nw(t,s,l,i);if(i===!0)return Ou(n,[{start:o,end:r,loop:l}],t,e);const a=rr({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=yb.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 rw;const Du="transparent",aw={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=yu(n||Du),s=i.valid&&yu(e||Du);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class fw{constructor(e,t,i,s){const l=t[i];s=Ul([e.to,s,l,e.from]);const o=Ul([e.from,l,s]);this._active=!0,this._fn=e.fn||aw[e.type||typeof o],this._easing=ll[e.easing]||ll.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=Ul([e.to,t,s,e.from]),this._from=Ul([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||t1?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;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});st.set("animations",{colors:{type:"color",properties:cw},numbers:{type:"number",properties:uw}});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 Vb{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 dw)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=mw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&pw(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 fw(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 pw(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Fu(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,f=o.axis,u=bw(l,o,i),c=e.length;let d;for(let m=0;mt[i].axis===e).shift()}function kw(n,e){return Vi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function ww(n,e,t){return Vi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Ws(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const _r=n=>n==="reset"||n==="none",Nu=(n,e)=>e?n:Object.assign({},n),Sw=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:zb(t,!0),values:null};class ii{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Lu(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Ws(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,m,_)=>c==="x"?d:c==="r"?_:m,l=t.xAxisID=it(i.xAxisID,hr(e,"x")),o=t.yAxisID=it(i.yAxisID,hr(e,"y")),r=t.rAxisID=it(i.rAxisID,hr(e,"r")),a=t.indexAxis,f=t.iAxisID=s(a,l,o,r),u=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(f),t.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&du(this._data,this),e._stacked&&Ws(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(et(t))this._data=gw(t);else if(i!==t){if(i){du(i,this);const s=this._cachedMeta;Ws(s),s._parsed=[]}t&&Object.isExtensible(t)&&zk(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=Lu(t.vScale,t),t.stack!==i.stack&&(s=!0,Ws(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Fu(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,f=e>0&&i._parsed[e-1],u,c,d;if(this._parsing===!1)i._parsed=s,i._sorted=!0,d=s;else{St(s[e])?d=this.parseArrayData(i,s,e,t):et(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const m=()=>c[r]===null||f&&c[r]h||c=0;--d)if(!_()){this.updateRangeFromParsed(f,e,m,a);break}}return f}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),h=f.resolveNamedOptions(d,m,_,c);return h.$shared&&(h.$shared=a,l[o]=Object.freeze(Nu(h,a))),h}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const u=this.chart.config,c=u.datasetAnimationScopeKeys(this._type,t),d=u.getOptionScopes(this.getDataset(),c);a=u.createResolver(d,this.getContext(e,i,t))}const f=new Vb(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(f)),f}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||_r(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){_r(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!_r(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,f]of this._syncList)this[r](a,f);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(f.length+=t,r=f.length-1;r>=o;r--)f[r]=f[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function Cw(n){const e=n.iScale,t=$w(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(Kn(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,f=o),e[t.axis]=f,e._custom={barStart:a,barEnd:f,start:s,end:l,min:o,max:r}}function Hb(n,e,t,i){return St(n)?Ow(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Ru(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let f,u,c,d;for(f=t,u=t+i;f=t?1:-1)}function Dw(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const f=a.controller.getParsed(t),u=f&&f[a.vScale.axis];if(dt(u)||isNaN(u))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:f}=this._getSharedOptions(t,s),u=o.axis,c=r.axis;for(let d=t;dpl(C,r,a,!0)?1:Math.max($,$*t,T,T*t),_=(C,$,T)=>pl(C,r,a,!0)?-1:Math.min($,$*t,T,T*t),h=m(0,f,c),g=m(qt,u,d),y=_(jt,f,c),S=_(jt+qt,u,d);i=(h-y)/2,s=(g-S)/2,l=-(h+y)/2,o=-(g+S)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Ol extends ii{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(et(i[e])){const{key:a="value"}=this._parsing;l=f=>+Ri(i[f],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?bt*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Ml(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};Ol.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return St(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Ko extends ii{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=wb(t,s,o);this._drawStart=r,this._drawCount=a,Sb(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const f=this.resolveDatasetElementOptions(e);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:f},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:f}=this._cachedMeta,{sharedOptions:u,includeOptions:c}=this._getSharedOptions(t,s),d=o.axis,m=r.axis,{spanGaps:_,segment:h}=this.options,g=Ms(_)?_:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||l||s==="none";let S=t>0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs(T[d]-S[d])>g,h&&(M.parsed=T,M.raw=f.data[C]),c&&(M.options=u||this.resolveDataElementOptions(C,$.active?"active":s)),y||this.updateElement($,C,M,s),S=T}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Ko.id="line";Ko.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Ko.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Ka extends ii{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Ml(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return Pb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,f=this._cachedMeta.rScale,u=f.xCenter,c=f.yCenter,d=f.getIndexAngle(0)-.5*jt;let m=d,_;const h=360/this.countVisibleElements();for(_=0;_{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?ei(this.resolveDataElementOptions(e,t).angle||i):0}}Ka.id="polarArea";Ka.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Ka.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Bb extends Ol{}Bb.id="pie";Bb.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Ja extends ii{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return Pb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}};Ti.defaults={};Ti.defaultRoutes=void 0;const Ub={values(n){return St(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const f=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(f<1e-4||f>1e15)&&(s="scientific"),l=Fw(n,t)}const o=Un(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),Ml(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Un(n)));return i===1||i===2||i===5?Ub.numeric.call(this,n,e,t):""}};function Fw(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Jo={formatters:Ub};st.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Jo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});st.route("scale.ticks","color","","color");st.route("scale.grid","color","","borderColor");st.route("scale.grid","borderColor","","borderColor");st.route("scale.title","color","","color");st.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});st.describe("scales",{_fallback:"scale"});st.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function Nw(n,e){const t=n.options.ticks,i=t.maxTicksLimit||Rw(n),s=t.major.enabled?jw(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return Vw(e,a,s,l/i),a;const f=qw(s,e,i);if(l>0){let u,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Yl(e,a,f,dt(d)?0:o-d,o),u=0,c=l-1;us)return a}return Math.max(s,1)}function jw(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Vu=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function zu(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function Uw(n,e){ht(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:jn(t,jn(i,t)),max:jn(i,jn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Nt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=$2(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),c=u.widest.width,d=u.highest.height,m=cn(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:m/(i-1),c+6>r&&(r=m/(i-(e.offset?.5:1)),a=this.maxHeight-Ys(e.grid)-t.padding-Hu(e.title,this.chart.options.font),f=Math.sqrt(c*c+d*d),o=La(Math.min(Math.asin(cn((u.highest.height+6)/r,-1,1)),Math.asin(cn(a/f,-1,1))-Math.asin(cn(d/f,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){Nt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Nt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Hu(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Ys(l)+a):(e.height=this.maxHeight,e.width=Ys(l)+a),i.display&&this.ticks.length){const{first:f,last:u,widest:c,highest:d}=this._getLabelSizes(),m=i.padding*2,_=ei(this.labelRotation),h=Math.cos(_),g=Math.sin(_);if(r){const y=i.mirror?0:g*c.width+h*d.height;e.height=Math.min(this.maxHeight,e.height+y+m)}else{const y=i.mirror?0:h*c.width+g*d.height;e.width=Math.min(this.maxWidth,e.width+y+m)}this._calculatePadding(f,u,g,h)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,f=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,m=0;a?f?(d=s*e.width,m=i*t.height):(d=i*e.height,m=s*t.width):l==="start"?m=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,m=t.width/2),this.paddingLeft=Math.max((d-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-c+o)*this.width/(this.width-c),0)}else{let u=t.height/2,c=e.height/2;l==="start"?(u=0,c=e.height):l==="end"&&(u=t.height,c=0),this.paddingTop=u+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Nt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[E]||0,height:o[E]||0});return{first:M(0),last:M(t-1),widest:M($),highest:M(T),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return qk(this._alignToPixels?Yi(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),u=this.ticks.length+(r?1:0),c=Ys(l),d=[],m=l.setContext(this.getContext()),_=m.drawBorder?m.borderWidth:0,h=_/2,g=function(B){return Yi(i,B,_)};let y,S,C,$,T,M,E,D,I,P,F,N;if(o==="top")y=g(this.bottom),M=this.bottom-c,D=y-h,P=g(e.top)+h,N=e.bottom;else if(o==="bottom")y=g(this.top),P=e.top,N=g(e.bottom)-h,M=y+h,D=this.top+c;else if(o==="left")y=g(this.right),T=this.right-c,E=y-h,I=g(e.left)+h,F=e.right;else if(o==="right")y=g(this.left),I=e.left,F=g(e.right)-h,T=y+h,E=this.left+c;else if(t==="x"){if(o==="center")y=g((e.top+e.bottom)/2+.5);else if(et(o)){const B=Object.keys(o)[0],K=o[B];y=g(this.chart.scales[B].getPixelForValue(K))}P=e.top,N=e.bottom,M=y+h,D=M+c}else if(t==="y"){if(o==="center")y=g((e.left+e.right)/2);else if(et(o)){const B=Object.keys(o)[0],K=o[B];y=g(this.chart.scales[B].getPixelForValue(K))}T=y-h,E=T-c,I=e.left,F=e.right}const R=it(s.ticks.maxTicksLimit,u),q=Math.max(1,Math.ceil(u/R));for(S=0;Sl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,f,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(f.x,f.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");st.route(l,s,a,r)})}function Xw(n){return"id"in n&&"defaults"in n}class Qw{constructor(){this.controllers=new Kl(ii,"datasets",!0),this.elements=new Kl(Ti,"elements"),this.plugins=new Kl(Object,"plugins"),this.scales=new Kl(fs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):ht(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=Ia(e);Nt(i["before"+s],[],i),t[e](i),Nt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let $=t;$0&&Math.abs(M[m]-C[m])>y,g&&(E.parsed=M,E.raw=f.data[$]),d&&(E.options=c||this.resolveDataElementOptions($,T.active?"active":s)),S||this.updateElement(T,$,E,s),C=M}this.updateSharedOptions(c,s,u)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}Za.id="scatter";Za.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Za.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Ki(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ta{constructor(e){this.options=e||{}}init(e){}formats(){return Ki()}parse(e,t){return Ki()}format(e,t){return Ki()}add(e,t,i){return Ki()}diff(e,t,i){return Ki()}startOf(e,t,i){return Ki()}endOf(e,t){return Ki()}}ta.override=function(n){Object.assign(ta.prototype,n)};var Wb={_date:ta};function xw(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?jk:xi;if(i){if(s._sharedOptions){const f=l[0],u=typeof f.getRange=="function"&&f.getRange(e);if(u){const c=a(l,e,t-u),d=a(l,e,t+u);return{lo:c.lo,hi:d.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function El(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:f,index:u}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var i3={evaluateInteractionItems:El,modes:{index(n,e,t,i){const s=Gi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?br(n,s,l,i,o):vr(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(f=>{const u=r[0].index,c=f.data[u];c&&!c.skip&&a.push({element:c,datasetIndex:f.index,index:u})}),a):[]},dataset(n,e,t,i){const s=Gi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?br(n,s,l,i,o):vr(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,f=n.getDatasetMeta(a).data;r=[];for(let u=0;ut.pos===e)}function Uu(n,e){return n.filter(t=>Yb.indexOf(t.pos)===-1&&t.box.axis===e)}function Js(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function s3(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tf.box.fullSize),!0),i=Js(Ks(e,"left"),!0),s=Js(Ks(e,"right")),l=Js(Ks(e,"top"),!0),o=Js(Ks(e,"bottom")),r=Uu(e,"x"),a=Uu(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Ks(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Wu(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function Kb(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function a3(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!et(s)){t.size&&(n[s]-=t.size);const c=i[t.stack]||{size:0,count:1};c.size=Math.max(c.size,t.horizontal?l.height:l.width),t.size=c.size/c.count,n[s]+=t.size}l.getPadding&&Kb(o,l.getPadding());const r=Math.max(0,e.outerWidth-Wu(o,n,"left","right")),a=Math.max(0,e.outerHeight-Wu(o,n,"top","bottom")),f=r!==n.w,u=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:f,other:u}:{same:u,other:f}}function f3(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function u3(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function el(n,e,t,i){const s=[];let l,o,r,a,f,u;for(l=0,o=n.length,f=0;l{typeof h.beforeLayout=="function"&&h.beforeLayout()});const u=a.reduce((h,g)=>g.box.options&&g.box.options.display===!1?h:h+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/u,hBoxMaxHeight:o/2}),d=Object.assign({},s);Kb(d,Jn(i));const m=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),_=o3(a.concat(f),c);el(r.fullSize,m,c,_),el(a,m,c,_),el(f,m,c,_)&&el(a,m,c,_),f3(m),Yu(r.leftAndTop,m,c,_),m.x+=m.w,m.y+=m.h,Yu(r.rightAndBottom,m,c,_),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},ht(r.chartArea,h=>{const g=h.box;Object.assign(g,n.chartArea),g.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class Jb{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class c3 extends Jb{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ro="$chartjs",d3={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ku=n=>n===null||n==="";function p3(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[ro]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Ku(s)){const l=Cu(n,"width");l!==void 0&&(n.width=l)}if(Ku(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=Cu(n,"height");l!==void 0&&(n.height=l)}return n}const Zb=K2?{passive:!0}:!1;function m3(n,e,t){n.addEventListener(e,t,Zb)}function h3(n,e,t){n.canvas.removeEventListener(e,t,Zb)}function _3(n,e){const t=d3[n.type]||n.type,{x:i,y:s}=Gi(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Eo(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function g3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Eo(r.addedNodes,i),o=o&&!Eo(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function b3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Eo(r.removedNodes,i),o=o&&!Eo(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const _l=new Map;let Ju=0;function Gb(){const n=window.devicePixelRatio;n!==Ju&&(Ju=n,_l.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function v3(n,e){_l.size||window.addEventListener("resize",Gb),_l.set(n,e)}function y3(n){_l.delete(n),_l.size||window.removeEventListener("resize",Gb)}function k3(n,e,t){const i=n.canvas,s=i&&Ua(i);if(!s)return;const l=kb((r,a)=>{const f=s.clientWidth;t(r,a),f{const a=r[0],f=a.contentRect.width,u=a.contentRect.height;f===0&&u===0||l(f,u)});return o.observe(s),v3(n,l),o}function yr(n,e,t){t&&t.disconnect(),e==="resize"&&y3(n)}function w3(n,e,t){const i=n.canvas,s=kb(l=>{n.ctx!==null&&t(_3(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return m3(i,e,s),s}class S3 extends Jb{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(p3(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[ro])return!1;const i=t[ro].initial;["height","width"].forEach(l=>{const o=i[l];dt(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[ro],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:g3,detach:b3,resize:k3}[t]||w3;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:yr,detach:yr,resize:yr}[t]||h3)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Y2(e,t,i,s)}isAttached(e){const t=Ua(e);return!!(t&&t.isConnected)}}function $3(n){return!Nb()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?c3:S3}class C3{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(Nt(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){dt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=it(i.options&&i.options.plugins,{}),l=T3(i);return s===!1&&!t?[]:O3(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function T3(n){const e={},t=[],i=Object.keys(ai.plugins.items);for(let l=0;l{const a=i[r];if(!et(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const f=ia(r,a),u=A3(f,s),c=t.scales||{};l[f]=l[f]||r,o[r]=il(Object.create(null),[{axis:f},a,c[f],c[u]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,f=r.indexAxis||na(a,e),c=(ls[a]||{}).scales||{};Object.keys(c).forEach(d=>{const m=D3(d,f),_=r[m+"AxisID"]||l[m]||m;o[_]=o[_]||Object.create(null),il(o[_],[{axis:m},i[_],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];il(a,[st.scales[a.type],st.scale])}),o}function Xb(n){const e=n.options||(n.options={});e.plugins=it(e.plugins,{}),e.scales=L3(n,e)}function Qb(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function P3(n){return n=n||{},n.data=Qb(n.data),Xb(n),n}const Zu=new Map,xb=new Set;function Gl(n,e){let t=Zu.get(n);return t||(t=e(),Zu.set(n,t),xb.add(t)),t}const Zs=(n,e,t)=>{const i=Ri(e,t);i!==void 0&&n.add(i)};class F3{constructor(e){this._config=P3(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Qb(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Xb(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Gl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Gl(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Gl(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return Gl(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(u=>{e&&(a.add(e),u.forEach(c=>Zs(a,e,c))),u.forEach(c=>Zs(a,s,c)),u.forEach(c=>Zs(a,ls[l]||{},c)),u.forEach(c=>Zs(a,st,c)),u.forEach(c=>Zs(a,xr,c))});const f=Array.from(a);return f.length===0&&f.push(Object.create(null)),xb.has(t)&&o.set(t,f),f}chartOptionScopes(){const{options:e,type:t}=this;return[e,ls[t]||{},st.datasets[t]||{},{type:t},st,xr]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=Gu(this._resolverCache,e,s);let a=o;if(R3(o,t)){l.$shared=!1,i=qi(i)?i():i;const f=this.createResolver(e,i,r);a=Os(o,i,f)}for(const f of t)l[f]=a[f];return l}createResolver(e,t,i=[""],s){const{resolver:l}=Gu(this._resolverCache,e,i);return et(t)?Os(l,t,void 0,s):l}}function Gu(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:za(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const N3=n=>et(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||qi(n[t]),!1);function R3(n,e){const{isScriptable:t,isIndexable:i}=Db(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(qi(r)||N3(r))||o&&St(r))return!0}return!1}var q3="3.9.1";const j3=["top","bottom","left","right","chartArea"];function Xu(n,e){return n==="top"||n==="bottom"||j3.indexOf(n)===-1&&e==="x"}function Qu(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function xu(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Nt(t&&t.onComplete,[n],e)}function V3(n){const e=n.chart,t=e.options.animation;Nt(t&&t.onProgress,[n],e)}function e1(n){return Nb()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Do={},t1=n=>{const e=e1(n);return Object.values(Do).filter(t=>t.canvas===e).pop()};function z3(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function H3(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Ao{constructor(e,t){const i=this.config=new F3(t),s=e1(e),l=t1(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||$3(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,f=a&&a.height,u=a&&a.width;if(this.id=Tk(),this.ctx=r,this.canvas=a,this.width=u,this.height=f,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new C3,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Hk(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Do[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}_i.listen(this,"complete",xu),_i.listen(this,"progress",V3),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return dt(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():$u(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ku(this.canvas,this.ctx),this}stop(){return _i.stop(this),this}resize(e,t){_i.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,$u(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),Nt(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};ht(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=ia(o,r),f=a==="r",u=a==="x";return{options:r,dposition:f?"chartArea":u?"bottom":"left",dtype:f?"radialLinear":u?"category":"linear"}}))),ht(l,o=>{const r=o.options,a=r.id,f=ia(a,r),u=it(r.type,o.dtype);(r.position===void 0||Xu(r.position,f)!==Xu(o.dposition))&&(r.position=o.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===u)c=i[a];else{const d=ai.getScale(u);c=new d({id:a,type:u,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),ht(s,(o,r)=>{o||delete i[r]}),ht(i,o=>{Zl.configure(this,o,o.options),Zl.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let f=0,u=this.data.datasets.length;f{f.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Qu("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){ht(this.scales,e=>{Zl.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!au(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;z3(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Zl.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],ht(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&qa(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&ja(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return hl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=i3.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Vi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);Kn(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),_i.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};ht(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,f)=>{t.addEventListener(this,a,f),e[a]=f},s=(a,f)=>{e[a]&&(t.removeEventListener(this,a,f),delete e[a])},l=(a,f)=>{this.canvas&&this.resize(a,f)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){ht(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},ht(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!ko(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,f)=>a.filter(u=>!f.some(c=>u.datasetIndex===c.datasetIndex&&u.index===c.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=Ik(e),f=H3(e,this._lastEvent,i,a);i&&(this._lastEvent=null,Nt(l.onHover,[e,r,this],this),a&&Nt(l.onClick,[e,r,this],this));const u=!ko(r,s);return(u||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=f,u}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const ec=()=>ht(Ao.instances,n=>n._plugins.invalidate()),Ei=!0;Object.defineProperties(Ao,{defaults:{enumerable:Ei,value:st},instances:{enumerable:Ei,value:Do},overrides:{enumerable:Ei,value:ls},registry:{enumerable:Ei,value:ai},version:{enumerable:Ei,value:q3},getChart:{enumerable:Ei,value:t1},register:{enumerable:Ei,value:(...n)=>{ai.add(...n),ec()}},unregister:{enumerable:Ei,value:(...n)=>{ai.remove(...n),ec()}}});function n1(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let f=s/r;n.beginPath(),n.arc(l,o,r,i-f,t+f),a>s?(f=s/a,n.arc(l,o,a,t+f,i-f,!0)):n.arc(l,o,s,t+qt,i-qt),n.closePath(),n.clip()}function B3(n){return Va(n,["outerStart","outerEnd","innerStart","innerEnd"])}function U3(n,e,t,i){const s=B3(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const f=(t-Math.min(l,a))*i/2;return cn(a,0,Math.min(l,f))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:cn(s.innerStart,0,o),innerEnd:cn(s.innerEnd,0,o)}}function hs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function sa(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:f,innerRadius:u}=e,c=Math.max(e.outerRadius+i+t-f,0),d=u>0?u+i+t+f:0;let m=0;const _=s-a;if(i){const B=u>0?u-i:0,K=c>0?c-i:0,J=(B+K)/2,X=J!==0?_*J/(J+i):_;m=(_-X)/2}const h=Math.max(.001,_*c-t/jt)/c,g=(_-h)/2,y=a+g+m,S=s-g-m,{outerStart:C,outerEnd:$,innerStart:T,innerEnd:M}=U3(e,d,c,S-y),E=c-C,D=c-$,I=y+C/E,P=S-$/D,F=d+T,N=d+M,R=y+T/F,q=S-M/N;if(n.beginPath(),l){if(n.arc(o,r,c,I,P),$>0){const J=hs(D,P,o,r);n.arc(J.x,J.y,$,P,S+qt)}const B=hs(N,S,o,r);if(n.lineTo(B.x,B.y),M>0){const J=hs(N,q,o,r);n.arc(J.x,J.y,M,S+qt,q+Math.PI)}if(n.arc(o,r,d,S-M/d,y+T/d,!0),T>0){const J=hs(F,R,o,r);n.arc(J.x,J.y,T,R+Math.PI,y-qt)}const K=hs(E,y,o,r);if(n.lineTo(K.x,K.y),C>0){const J=hs(E,I,o,r);n.arc(J.x,J.y,C,y-qt,I)}}else{n.moveTo(o,r);const B=Math.cos(I)*c+o,K=Math.sin(I)*c+r;n.lineTo(B,K);const J=Math.cos(P)*c+o,X=Math.sin(P)*c+r;n.lineTo(J,X)}n.closePath()}function W3(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){sa(n,e,t,i,o+bt,s);for(let f=0;f=bt||pl(l,r,a),h=ml(o,f+d,u+d);return _&&h}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:f}=this.options,u=(s+l)/2,c=(o+r+f+a)/2;return{x:t+Math.cos(u)*c,y:i+Math.sin(u)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>bt?Math.floor(i/bt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const f=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(f)*r,Math.sin(f)*r),this.circumference>=jt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=W3(e,this,r,l,o);K3(e,this,r,l,a,o),e.restore()}}Ga.id="arc";Ga.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};Ga.defaultRoutes={backgroundColor:"backgroundColor"};function i1(n,e,t=e){n.lineCap=it(t.borderCapStyle,e.borderCapStyle),n.setLineDash(it(t.borderDash,e.borderDash)),n.lineDashOffset=it(t.borderDashOffset,e.borderDashOffset),n.lineJoin=it(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=it(t.borderWidth,e.borderWidth),n.strokeStyle=it(t.borderColor,e.borderColor)}function J3(n,e,t){n.lineTo(t.x,t.y)}function Z3(n){return n.stepped?_2:n.tension||n.cubicInterpolationMode==="monotone"?g2:J3}function s1(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),f=Math.min(l,r),u=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:f(o+(f?r-$:$))%l,C=()=>{h!==g&&(n.lineTo(u,g),n.lineTo(u,h),n.lineTo(u,y))};for(a&&(m=s[S(0)],n.moveTo(m.x,m.y)),d=0;d<=r;++d){if(m=s[S(d)],m.skip)continue;const $=m.x,T=m.y,M=$|0;M===_?(Tg&&(g=T),u=(c*u+$)/++c):(C(),n.lineTo($,T),_=M,c=0,h=g=T),y=T}C()}function la(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?X3:G3}function Q3(n){return n.stepped?J2:n.tension||n.cubicInterpolationMode==="monotone"?Z2:Xi}function x3(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),i1(n,e.options),n.stroke(s)}function eS(n,e,t,i){const{segments:s,options:l}=e,o=la(e);for(const r of s)i1(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const tS=typeof Path2D=="function";function nS(n,e,t,i){tS&&!e.options.segment?x3(n,e,t,i):eS(n,e,t,i)}class zi extends Ti{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;V2(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=sw(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=jb(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=Q3(i);let f,u;for(f=0,u=o.length;fn!=="borderDash"&&n!=="fill"};function tc(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=Qa(o,r,s);const a=s[o],f=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:f.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:f.y}))}),l}function Qa(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function nc(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function o1(n,e){let t=[],i=!1;return St(n)?(i=!0,t=n):t=fS(n,e),t.length?new zi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function ic(n){return n&&n.fill!==!1}function uS(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!zt(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function cS(n,e,t){const i=hS(n);if(et(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return zt(s)&&Math.floor(s)===s?dS(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function dS(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function pS(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:et(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function mS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:et(n)?i=n.value:i=e.getBaseValue(),i}function hS(n){const e=n.options,t=e.fill;let i=it(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function _S(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=gS(e,t);r.push(o1({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;r&&(r.line.updateControlPoints(l,r.axis),i&&r.fill&&Sr(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;ic(l)&&Sr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!ic(i)||t.drawTime!=="beforeDatasetDraw"||Sr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const rl={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e-1?n.split(` -`):n}function OS(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 rc(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=In(e.bodyFont),f=In(e.titleFont),u=In(e.footerFont),c=l.length,d=s.length,m=i.length,_=Jn(e.padding);let h=_.height,g=0,y=i.reduce(($,T)=>$+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 $=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;h+=m*$+(y-m)*a.lineHeight+(y-1)*e.bodySpacing}d&&(h+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let S=0;const C=function($){g=Math.max(g,t.measureText($).width+S)};return t.save(),t.font=f.string,ht(n.title,C),t.font=a.string,ht(n.beforeBody.concat(n.afterBody),C),S=e.displayColors?o+2+e.boxPadding:0,ht(i,$=>{ht($.before,C),ht($.lines,C),ht($.after,C)}),S=0,t.font=u.string,ht(n.footer,C),t.restore(),g+=_.width,{width:g,height:h}}function ES(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function DS(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 AS(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"),DS(f,n,e,t)&&(f="center"),f}function ac(n,e,t){const i=t.yAlign||e.yAlign||ES(n,t);return{xAlign:t.xAlign||e.xAlign||AS(n,e,t,i),yAlign:i}}function IS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function LS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function fc(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}=ks(o);let _=IS(e,r);const h=LS(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:cn(_,0,i.width-e.width),y:cn(h,0,i.height-e.height)}}function Xl(n,e,t){const i=Jn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function uc(n){return oi([],gi(n))}function PS(n,e,t){return Vi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function cc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ra extends Ti{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 Vb(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=PS(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 uc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return ht(e,l=>{const o={before:[],lines:[],after:[]},r=cc(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 uc(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;ae.filter(u,c,d,i))),e.itemSort&&(r=r.sort((u,c)=>e.itemSort(u,c,i))),ht(r,u=>{const c=cc(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;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=rl[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=rc(this,i),f=Object.assign({},r,a),u=ac(this.chart,i,f),c=fc(i,f,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,l={opacity:1,x:c.x,y:c.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:f,bottomLeft:u,bottomRight:c}=ks(r),{x:d,y:m}=e,{width:_,height:h}=t;let g,y,S,C,$,T;return l==="center"?($=m+h/2,s==="left"?(g=d,y=g-o,C=$+o,T=$-o):(g=d+_,y=g+o,C=$-o,T=$+o),S=g):(s==="left"?y=d+Math.max(a,u)+o:s==="right"?y=d+_-Math.max(f,c)-o:y=this.caretX,l==="top"?(C=m,$=C-o,g=y-o,S=y+o):(C=m+h,$=C+o,g=y+o,S=y-o),T=C),{x1:g,x2:y,x3:S,y1:C,y2:$,y3:T}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const f=mr(i.rtl,this.x,this.width);for(e.x=Xl(this,i.titleAlign,i),t.textAlign=f.textAlign(i.titleAlign),t.textBaseline="middle",o=In(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aC!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Mo(e,{x:g,y:h,w:f,h:a,radius:S}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Mo(e,{x:y,y:h+1,w:f-2,h:a-2,radius:S}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(g,h,f,a),e.strokeRect(g,h,f,a),e.fillStyle=o.backgroundColor,e.fillRect(y,h+1,f-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:f,boxPadding:u}=i,c=In(i.bodyFont);let d=c.lineHeight,m=0;const _=mr(i.rtl,this.x,this.width),h=function(D){t.fillText(D,_.x(e.x+m),e.y+d/2),e.y+=d+l},g=_.textAlign(o);let y,S,C,$,T,M,E;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=Xl(this,g,i),t.fillStyle=i.bodyColor,ht(this.beforeBody,h),m=r&&g!=="right"?o==="center"?f/2+u:f+2+u:0,$=0,M=s.length;$0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=rl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=rc(this,e),a=Object.assign({},o,this._size),f=ac(t,e,a),u=fc(e,a,f,t);(s._to!==u.x||l._to!==u.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Jn(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),x2(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),ew(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const f=this.chart.getDatasetMeta(r);if(!f)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:f.data[a],index:a}}),l=!ko(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!ko(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=rl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}ra.positioners=rl;var FS={id:"tooltip",_element:ra,positioners:rl,afterInit(n,e,t){t&&(n.tooltip=new ra({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:hi,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const NS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function RS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return NS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const qS=(n,e)=>n===null?null:cn(Math.round(n),0,e);class aa extends fs{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(dt(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:RS(i,e,it(t,e),this._addedLabels),qS(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}aa.id="category";aa.defaults={ticks:{callback:aa.prototype.getLabelForValue}};function jS(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:f,maxTicks:u,maxDigits:c,includeBounds:d}=n,m=l||1,_=u-1,{min:h,max:g}=e,y=!dt(o),S=!dt(r),C=!dt(f),$=(g-h)/(c+1);let T=uu((g-h)/_/m)*m,M,E,D,I;if(T<1e-14&&!y&&!S)return[{value:h},{value:g}];I=Math.ceil(g/T)-Math.floor(h/T),I>_&&(T=uu(I*T/_/m)*m),dt(a)||(M=Math.pow(10,a),T=Math.ceil(T*M)/M),s==="ticks"?(E=Math.floor(h/T)*T,D=Math.ceil(g/T)*T):(E=h,D=g),y&&S&&l&&Nk((r-o)/l,T/1e3)?(I=Math.round(Math.min((r-o)/T,u)),T=(r-o)/I,E=o,D=r):C?(E=y?o:E,D=S?r:D,I=f-1,T=(D-E)/I):(I=(D-E)/T,sl(I,Math.round(I),T/1e3)?I=Math.round(I):I=Math.ceil(I));const P=Math.max(cu(T),cu(E));M=Math.pow(10,dt(a)?P:a),E=Math.round(E*M)/M,D=Math.round(D*M)/M;let F=0;for(y&&(d&&E!==o?(t.push({value:o}),Es=t?s:a,r=a=>l=i?l:a;if(e){const a=fi(s),f=fi(l);a<0&&f<0?r(0):a>0&&f>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=jS(s,l);return e.bounds==="ticks"&&_b(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return Ml(e,this.chart.options.locale,this.options.ticks.format)}}class xa extends Io{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=zt(e)?e:0,this.max=zt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=ei(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}xa.id="linear";xa.defaults={ticks:{callback:Jo.formatters.numeric}};function pc(n){return n/Math.pow(10,Math.floor(Un(n)))===1}function VS(n,e){const t=Math.floor(Un(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=jn(n.min,Math.pow(10,Math.floor(Un(e.min)))),o=Math.floor(Un(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:pc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=zt(e)?Math.max(0,e):null,this.max=zt(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,f)=>Math.pow(10,Math.floor(Un(a))+f);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=VS(t,this);return e.bounds==="ticks"&&_b(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Ml(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Un(e),this._valueRange=Un(this.max)-Un(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Un(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}a1.id="logarithmic";a1.defaults={ticks:{callback:Jo.formatters.logarithmic,major:{enabled:!0}}};function fa(n){const e=n.ticks;if(e.display&&n.display){const t=Jn(e.backdropPadding);return it(e.font&&e.font.size,st.font.size)+t.height}return 0}function zS(n,e,t){return t=St(t)?t:[t],{w:m2(n,e.string,t),h:t.length*e.lineHeight}}function mc(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function HS(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?jt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function US(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=fa(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?jt/s:0;for(let f=0;f270||t<90)&&(n-=e),n}function JS(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=In(l.font),{x:r,y:a,textAlign:f,left:u,top:c,right:d,bottom:m}=n._pointLabelItems[s],{backdropColor:_}=l;if(!dt(_)){const h=ks(l.borderRadius),g=Jn(l.backdropPadding);t.fillStyle=_;const y=u-g.left,S=c-g.top,C=d-u+g.width,$=m-c+g.height;Object.values(h).some(T=>T!==0)?(t.beginPath(),Mo(t,{x:y,y:S,w:C,h:$,radius:h}),t.fill()):t.fillRect(y,S,C,$)}To(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:f,textBaseline:"middle"})}}function f1(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,bt);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=Nt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?HS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=bt/(this._pointLabels.length||1),i=this.options.startAngle||0;return An(e*t+ei(i))}getDistanceFromCenterForValue(e){if(dt(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(dt(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(u!==0){r=this.getDistanceFromCenterForValue(f.value);const c=s.setContext(this.getContext(u-1));ZS(this,c,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const f=i.setContext(this.getPointLabelContext(o)),{color:u,lineWidth:c}=f;!c||!u||(e.lineWidth=c,e.strokeStyle=u,e.setLineDash(f.borderDash),e.lineDashOffset=f.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const f=i.setContext(this.getContext(a)),u=In(f.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),f.showLabelBackdrop){e.font=u.string,o=e.measureText(r.label).width,e.fillStyle=f.backdropColor;const c=Jn(f.backdropPadding);e.fillRect(-o/2-c.left,-l-u.size/2-c.top,o+c.width,u.size+c.height)}To(e,r.label,0,-l,u,{color:f.color})}),e.restore()}drawTitle(){}}Go.id="radialLinear";Go.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Jo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Go.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Go.descriptors={angleLines:{_fallback:"grid"}};const Xo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},yn=Object.keys(Xo);function XS(n,e){return n-e}function hc(n,e){if(dt(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),zt(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(Ms(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function _c(n,e,t,i){const s=yn.length;for(let l=yn.indexOf(n);l=yn.indexOf(t);l--){const o=yn[l];if(Xo[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return yn[t?yn.indexOf(t):0]}function xS(n){for(let e=yn.indexOf(n)+1,t=yn.length;e=e?t[i]:t[s];n[l]=!0}}function e4(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function bc(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=cn(t,0,o),i=cn(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||_c(l.minUnit,t,i,this._getLabelCapacity(t)),r=it(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,f=Ms(a)||a===!0,u={};let c=t,d,m;if(f&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,f?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const _=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,m=0;dh-g).map(h=>+h)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,f=r&&o[r],u=a&&o[a],c=i[t],d=a&&u&&c&&c.major,m=this._adapter.format(e,s||(d?u:f)),_=l.ticks.callback;return _?Nt(_,[m,t,i],this):m}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=xi(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=xi(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const f=o-l;return f?r+(a-r)*(e-l)/f:r}class u1 extends Dl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Ql(t,this.min),this._tableRange=Ql(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,f,u;for(o=0,r=e.length;o=t&&f<=i&&s.push(f);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o{i&&(t||(t=Re(e,Yt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=Re(e,Yt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function n4(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=U(n[1]),t=O(),s=U(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&se(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&se(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function i4(n){let e;return{c(){e=U("Loading...")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function s4(n){let e,t,i,s,l,o=n[2]&&vc();function r(u,c){return u[2]?i4:n4}let a=r(n),f=a(n);return{c(){e=v("div"),o&&o.c(),t=O(),i=v("canvas"),s=O(),l=v("div"),f.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Nr(i,"height","250px"),Nr(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),Q(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(u,c){w(u,e,c),o&&o.m(e,null),b(e,t),b(e,i),n[8](i),w(u,s,c),w(u,l,c),f.m(l,null)},p(u,[c]){u[2]?o?c&4&&A(o,1):(o=vc(),o.c(),A(o,1),o.m(e,t)):o&&(re(),L(o,1,1,()=>{o=null}),ae()),c&4&&Q(e,"loading",u[2]),a===(a=r(u))&&f?f.p(u,c):(f.d(1),f=a(u),f&&(f.c(),f.m(l,null)))},i(u){A(o)},o(u){L(o)},d(u){u&&k(e),o&&o.d(),n[8](null),u&&k(s),u&&k(l),f.d()}}}function l4(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,f=!1;async function u(){return t(2,f=!0),ue.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{c();for(let _ of m)r.push({x:new Date(_.date),y:_.total}),t(1,a+=_.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(c(),console.warn(m),ue.error(m,(m==null?void 0:m.status)!=400))}).finally(()=>{t(2,f=!1)})}function c(){t(1,a=0),t(7,r=[])}Kt(()=>(Ao.register(zi,Zo,Ko,xa,Dl,MS,FS),t(6,o=new Ao(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:m=>m.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:m=>m.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(m){ne[m?"unshift":"push"](()=>{l=m,t(0,l)})}return n.$$set=m=>{"filter"in m&&t(3,i=m.filter),"presets"in m&&t(4,s=m.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&u(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,f,i,s,u,o,r,d]}class o4 extends be{constructor(e){super(),ge(this,e,l4,s4,pe,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var yc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function r4(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var c1={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** - * Prism: Lightweight, robust, elegant syntax highlighting - * - * @license MIT - * @author Lea Verou - * @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(C){return C instanceof a?new a(C.type,S(C.content),C.alias):Array.isArray(C)?C.map(S):C.replace(/&/g,"&").replace(/"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 C=document.getElementsByTagName("script");for(var $ in C)if(C[$].src==S)return C[$]}return null}},isActive:function(S,C,$){for(var T="no-"+C;S;){var M=S.classList;if(M.contains(C))return!0;if(M.contains(T))return!1;S=S.parentElement}return!!$}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(S,C){var $=r.util.clone(r.languages[S]);for(var T in C)$[T]=C[T];return $},insertBefore:function(S,C,$,T){T=T||r.languages;var M=T[S],E={};for(var D in M)if(M.hasOwnProperty(D)){if(D==C)for(var I in $)$.hasOwnProperty(I)&&(E[I]=$[I]);$.hasOwnProperty(D)||(E[D]=M[D])}var P=T[S];return T[S]=E,r.languages.DFS(r.languages,function(F,N){N===P&&F!=S&&(this[F]=E)}),E},DFS:function S(C,$,T,M){M=M||{};var E=r.util.objId;for(var D in C)if(C.hasOwnProperty(D)){$.call(C,D,C[D],T||D);var I=C[D],P=r.util.type(I);P==="Object"&&!M[E(I)]?(M[E(I)]=!0,S(I,$,null,M)):P==="Array"&&!M[E(I)]&&(M[E(I)]=!0,S(I,$,D,M))}}},plugins:{},highlightAll:function(S,C){r.highlightAllUnder(document,S,C)},highlightAllUnder:function(S,C,$){var T={callback:$,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,E;E=T.elements[M++];)r.highlightElement(E,C===!0,T.callback)},highlightElement:function(S,C,$){var T=r.util.getLanguage(S),M=r.languages[T];r.util.setLanguage(S,T);var E=S.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(E,T);var D=S.textContent,I={element:S,language:T,grammar:M,code:D};function P(N){I.highlightedCode=N,r.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,r.hooks.run("after-highlight",I),r.hooks.run("complete",I),$&&$.call(I.element)}if(r.hooks.run("before-sanity-check",I),E=I.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!I.code){r.hooks.run("complete",I),$&&$.call(I.element);return}if(r.hooks.run("before-highlight",I),!I.grammar){P(r.util.encode(I.code));return}if(C&&i.Worker){var F=new Worker(r.filename);F.onmessage=function(N){P(N.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:C,language:$};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,C){var $=C.rest;if($){for(var T in $)C[T]=$[T];delete C.rest}var M=new c;return d(M,M.head,S),u(S,M,C,M.head,0),_(M)},hooks:{all:{},add:function(S,C){var $=r.hooks.all;$[S]=$[S]||[],$[S].push(C)},run:function(S,C){var $=r.hooks.all[S];if(!(!$||!$.length))for(var T=0,M;M=$[T++];)M(C)}},Token:a};i.Prism=r;function a(S,C,$,T){this.type=S,this.content=C,this.alias=$,this.length=(T||"").length|0}a.stringify=function S(C,$){if(typeof C=="string")return C;if(Array.isArray(C)){var T="";return C.forEach(function(P){T+=S(P,$)}),T}var M={type:C.type,content:S(C.content,$),tag:"span",classes:["token",C.type],attributes:{},language:$},E=C.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(M.classes,E):M.classes.push(E)),r.hooks.run("wrap",M);var D="";for(var I in M.attributes)D+=" "+I+'="'+(M.attributes[I]||"").replace(/"/g,""")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+D+">"+M.content+""};function f(S,C,$,T){S.lastIndex=C;var M=S.exec($);if(M&&T&&M[1]){var E=M[1].length;M.index+=E,M[0]=M[0].slice(E)}return M}function u(S,C,$,T,M,E){for(var D in $)if(!(!$.hasOwnProperty(D)||!$[D])){var I=$[D];I=Array.isArray(I)?I:[I];for(var P=0;P=E.reach);G+=X.value.length,X=X.next){var fe=X.value;if(C.length>S.length)return;if(!(fe instanceof a)){var ee=1,te;if(q){if(te=f(J,G,S,R),!te||te.index>=S.length)break;var ze=te.index,Oe=te.index+te[0].length,Pe=G;for(Pe+=X.value.length;ze>=Pe;)X=X.next,Pe+=X.value.length;if(Pe-=X.value.length,G=Pe,X.value instanceof a)continue;for(var Ve=X;Ve!==C.tail&&(PeE.reach&&(E.reach=gt);var Ze=X.prev;Te&&(Ze=d(C,Ze,Te),G+=Te.length),m(C,Ze,ee);var Ye=new a(D,N?r.tokenize(we,N):we,B,we);if(X=d(C,Ze,Ye),Je&&d(C,X,Je),ee>1){var wt={cause:D+","+P,reach:gt};u(S,C,$,X.prev,G,wt),E&&wt.reach>E.reach&&(E.reach=wt.reach)}}}}}}function c(){var S={value:null,prev:null,next:null},C={value:null,prev:S,next:null};S.next=C,this.head=S,this.tail=C,this.length=0}function d(S,C,$){var T=C.next,M={value:$,prev:C,next:T};return C.next=M,T.prev=M,S.length++,M}function m(S,C,$){for(var T=C.next,M=0;M<$&&T!==S.tail;M++)T=T.next;C.next=T,T.prev=C,S.length-=M}function _(S){for(var C=[],$=S.head.next;$!==S.tail;)C.push($.value),$=$.next;return C}if(!i.document)return i.addEventListener&&(r.disableWorkerMessageHandler||i.addEventListener("message",function(S){var C=JSON.parse(S.data),$=C.language,T=C.code,M=C.immediateClose;i.postMessage(r.highlight(T,r.languages[$],$)),M&&i.close()},!1)),r;var h=r.util.currentScript();h&&(r.filename=h.src,h.hasAttribute("data-manual")&&(r.manual=!0));function g(){r.manual||r.highlightAll()}if(!r.manual){var y=document.readyState;y==="loading"||y==="interactive"&&h&&h.defer?document.addEventListener("DOMContentLoaded",g):window.requestAnimationFrame?window.requestAnimationFrame(g):window.setTimeout(g,16)}return r}(e);n.exports&&(n.exports=t),typeof yc<"u"&&(yc.Prism=t),t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",s=function(h,g){return"✖ Error "+h+" while fetching file: "+g},l="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",f="loaded",u="failed",c="pre[data-src]:not(["+r+'="'+f+'"]):not(['+r+'="'+a+'"])';function d(h,g,y){var S=new XMLHttpRequest;S.open("GET",h,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?g(S.responseText):S.status>=400?y(s(S.status,S.statusText)):y(l))},S.send(null)}function m(h){var g=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(h||"");if(g){var y=Number(g[1]),S=g[2],C=g[3];return S?C?[y,Number(C)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(h){h.selector+=", "+c}),t.hooks.add("before-sanity-check",function(h){var g=h.element;if(g.matches(c)){h.code="",g.setAttribute(r,a);var y=g.appendChild(document.createElement("CODE"));y.textContent=i;var S=g.getAttribute("data-src"),C=h.language;if(C==="none"){var $=(/\.(\w+)$/.exec(S)||[,"none"])[1];C=o[$]||$}t.util.setLanguage(y,C),t.util.setLanguage(g,C);var T=t.plugins.autoloader;T&&T.loadLanguages(C),d(S,function(M){g.setAttribute(r,f);var E=m(g.getAttribute("data-range"));if(E){var D=M.split(/\r\n?|\n/g),I=E[0],P=E[1]==null?D.length:E[1];I<0&&(I+=D.length),I=Math.max(0,Math.min(I-1,D.length)),P<0&&(P+=D.length),P=Math.max(0,Math.min(P,D.length)),M=D.slice(I,P).join(` -`),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,C;C=y[S++];)t.highlightElement(C)}};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)}}()})(c1);var a4=c1.exports;const Gs=r4(a4);var f4={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;ar&&(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>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 u4(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:x,o:x,d(s){s&&k(e)}}}function c4(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=Gs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Gs.highlight(a,Gs.languages[l]||Gs.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 Gs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class d1 extends be{constructor(e){super(),ge(this,e,c4,u4,pe,{class:0,content:2,language:3})}}const d4=n=>({}),kc=n=>({}),p4=n=>({}),wc=n=>({});function Sc(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C=n[4]&&!n[2]&&$c(n);const $=n[19].header,T=$t($,n,n[18],wc);let M=n[4]&&n[2]&&Cc(n);const E=n[19].default,D=$t(E,n,n[18],null),I=n[19].footer,P=$t(I,n,n[18],kc);return{c(){e=v("div"),t=v("div"),s=O(),l=v("div"),o=v("div"),C&&C.c(),r=O(),T&&T.c(),a=O(),M&&M.c(),f=O(),u=v("div"),D&&D.c(),c=O(),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]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(F,N){w(F,e,N),b(e,t),b(e,s),b(e,l),b(l,o),C&&C.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,N){n=F,n[4]&&!n[2]?C?C.p(n,N):(C=$c(n),C.c(),C.m(o,r)):C&&(C.d(1),C=null),T&&T.p&&(!g||N[0]&262144)&&Tt(T,$,n,n[18],g?Ct($,n[18],N,p4):Mt(n[18]),wc),n[4]&&n[2]?M?M.p(n,N):(M=Cc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),D&&D.p&&(!g||N[0]&262144)&&Tt(D,E,n,n[18],g?Ct(E,n[18],N,null):Mt(n[18]),null),P&&P.p&&(!g||N[0]&262144)&&Tt(P,I,n,n[18],g?Ct(I,n[18],N,d4):Mt(n[18]),kc),(!g||N[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",m),(!g||N[0]&262)&&Q(l,"popup",n[2]),(!g||N[0]&4)&&Q(e,"padded",n[2]),(!g||N[0]&1)&&Q(e,"active",n[0])},i(F){g||(F&&Ge(()=>{g&&(i||(i=Re(t,Kr,{duration:_s,opacity:0},!0)),i.run(1))}),A(T,F),A(D,F),A(P,F),Ge(()=>{g&&(h&&h.end(1),_=ig(l,di,n[2]?{duration:_s,y:-10}:{duration:_s,x:50}),_.start())}),g=!0)},o(F){F&&(i||(i=Re(t,Kr,{duration:_s,opacity:0},!1)),i.run(0)),L(T,F),L(D,F),L(P,F),_&&_.invalidate(),h=_a(l,di,n[2]?{duration:_s,y:10}:{duration:_s,x:50}),g=!1},d(F){F&&k(e),F&&i&&i.end(),C&&C.d(),T&&T.d(F),M&&M.d(),D&&D.d(F),n[21](null),P&&P.d(F),F&&h&&h.end(),y=!1,Ce(S)}}}function $c(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Xe(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Cc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Xe(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function m4(n){let e,t,i,s,l=n[0]&&Sc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[Y(window,"resize",n[10]),Y(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Sc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){L(l),t=!1},d(o){o&&k(e),l&&l.d(),n[23](null),i=!1,Ce(s)}}}let Ji,$r=[];function p1(){return Ji=Ji||document.querySelector(".overlays"),Ji||(Ji=document.createElement("div"),Ji.classList.add("overlays"),document.body.appendChild(Ji)),Ji}let _s=150;function Tc(){return 1e3+p1().querySelectorAll(".overlay-panel-container.active").length}function h4(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:f=!0}=e,{escClose:u=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const m=yt(),_="op_"+H.randomString(10);let h,g,y,S,C="",$=o;function T(){typeof c=="function"&&c()===!1||t(0,o=!0)}function M(){typeof d=="function"&&d()===!1||t(0,o=!1)}function E(){return o}async function D(G){t(17,$=G),G?(y=document.activeElement,m("show"),h==null||h.focus()):(clearTimeout(S),m("hide"),y==null||y.focus()),await sn(),I()}function I(){h&&(o?t(6,h.style.zIndex=Tc(),h):t(6,h.style="",h))}function P(){H.pushUnique($r,_),document.body.classList.add("overlay-active")}function F(){H.removeByValue($r,_),$r.length||document.body.classList.remove("overlay-active")}function N(G){o&&u&&G.code=="Escape"&&!H.isInput(G.target)&&h&&h.style.zIndex==Tc()&&(G.preventDefault(),M())}function R(G){o&&q(g)}function q(G,fe){fe&&t(8,C=""),G&&(S||(S=setTimeout(()=>{if(clearTimeout(S),S=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,C="scrollable");else{t(8,C="");return}G.scrollTop==0?t(8,C+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,C+=" scroll-bottom-reached")},100)))}Kt(()=>(p1().appendChild(h),()=>{var G;clearTimeout(S),F(),(G=h==null?void 0:h.classList)==null||G.add("hidden"),setTimeout(()=>{h==null||h.remove()},0)}));const B=()=>a?M():!0;function K(G){ne[G?"unshift":"push"](()=>{g=G,t(7,g)})}const J=G=>q(G.target);function X(G){ne[G?"unshift":"push"](()=>{h=G,t(6,h)})}return n.$$set=G=>{"class"in G&&t(1,l=G.class),"active"in G&&t(0,o=G.active),"popup"in G&&t(2,r=G.popup),"overlayClose"in G&&t(3,a=G.overlayClose),"btnClose"in G&&t(4,f=G.btnClose),"escClose"in G&&t(12,u=G.escClose),"beforeOpen"in G&&t(13,c=G.beforeOpen),"beforeHide"in G&&t(14,d=G.beforeHide),"$$scope"in G&&t(18,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&$!=o&&D(o),n.$$.dirty[0]&128&&q(g,!0),n.$$.dirty[0]&64&&h&&I(),n.$$.dirty[0]&1&&(o?P():F())},[o,l,r,a,f,M,h,g,C,N,R,q,u,c,d,T,E,$,s,i,B,K,J,X]}class ln extends be{constructor(e){super(),ge(this,e,h4,m4,pe,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function _4(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:x,d(t){t&&k(e)}}}function g4(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=U(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){w(l,e,o),b(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&se(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&k(e)}}}function b4(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:x,i:x,o:x,d(t){t&&k(e)}}}function v4(n){let e,t,i;return t=new d1({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","block")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),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),V(t)}}}function y4(n){var Ie;let e,t,i,s,l,o,r=n[2].id+"",a,f,u,c,d,m,_,h=n[2].status+"",g,y,S,C,$,T,M=((Ie=n[2].method)==null?void 0:Ie.toUpperCase())+"",E,D,I,P,F,N,R=n[2].auth+"",q,B,K,J,X,G,fe=n[2].url+"",ee,te,Oe,Pe,Ve,ze,we,Te,Je,gt,Ze,Ye=n[2].remoteIp+"",wt,me,ve,Ke,Me,mt,Lt=n[2].userIp+"",on,De,rt,gn,Sn,$n,si=n[2].userAgent+"",Zn,mi,Cn,ct,Tn,Jt,Gn,he,ke,at,Bt,xe,rn,Zt,tn,dn;function Il(Le,Ee){return Le[2].referer?g4:_4}let W=Il(n),Z=W(n);const ie=[v4,b4],le=[];function $e(Le,Ee){return Ee&4&&(Gn=null),Gn==null&&(Gn=!H.isEmpty(Le[2].meta)),Gn?0:1}return he=$e(n,-1),ke=le[he]=ie[he](n),tn=new $i({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=O(),o=v("td"),a=U(r),f=O(),u=v("tr"),c=v("td"),c.textContent="Status",d=O(),m=v("td"),_=v("span"),g=U(h),y=O(),S=v("tr"),C=v("td"),C.textContent="Method",$=O(),T=v("td"),E=U(M),D=O(),I=v("tr"),P=v("td"),P.textContent="Auth",F=O(),N=v("td"),q=U(R),B=O(),K=v("tr"),J=v("td"),J.textContent="URL",X=O(),G=v("td"),ee=U(fe),te=O(),Oe=v("tr"),Pe=v("td"),Pe.textContent="Referer",Ve=O(),ze=v("td"),Z.c(),we=O(),Te=v("tr"),Je=v("td"),Je.textContent="Remote IP",gt=O(),Ze=v("td"),wt=U(Ye),me=O(),ve=v("tr"),Ke=v("td"),Ke.textContent="User IP",Me=O(),mt=v("td"),on=U(Lt),De=O(),rt=v("tr"),gn=v("td"),gn.textContent="UserAgent",Sn=O(),$n=v("td"),Zn=U(si),mi=O(),Cn=v("tr"),ct=v("td"),ct.textContent="Meta",Tn=O(),Jt=v("td"),ke.c(),at=O(),Bt=v("tr"),xe=v("td"),xe.textContent="Created",rn=O(),Zt=v("td"),z(tn.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(_,"class","label"),Q(_,"label-danger",n[2].status>=400),p(C,"class","min-width txt-hint txt-bold"),p(P,"class","min-width txt-hint txt-bold"),p(J,"class","min-width txt-hint txt-bold"),p(Pe,"class","min-width txt-hint txt-bold"),p(Je,"class","min-width txt-hint txt-bold"),p(Ke,"class","min-width txt-hint txt-bold"),p(gn,"class","min-width txt-hint txt-bold"),p(ct,"class","min-width txt-hint txt-bold"),p(xe,"class","min-width txt-hint txt-bold"),p(e,"class","table-border")},m(Le,Ee){w(Le,e,Ee),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o),b(o,a),b(t,f),b(t,u),b(u,c),b(u,d),b(u,m),b(m,_),b(_,g),b(t,y),b(t,S),b(S,C),b(S,$),b(S,T),b(T,E),b(t,D),b(t,I),b(I,P),b(I,F),b(I,N),b(N,q),b(t,B),b(t,K),b(K,J),b(K,X),b(K,G),b(G,ee),b(t,te),b(t,Oe),b(Oe,Pe),b(Oe,Ve),b(Oe,ze),Z.m(ze,null),b(t,we),b(t,Te),b(Te,Je),b(Te,gt),b(Te,Ze),b(Ze,wt),b(t,me),b(t,ve),b(ve,Ke),b(ve,Me),b(ve,mt),b(mt,on),b(t,De),b(t,rt),b(rt,gn),b(rt,Sn),b(rt,$n),b($n,Zn),b(t,mi),b(t,Cn),b(Cn,ct),b(Cn,Tn),b(Cn,Jt),le[he].m(Jt,null),b(t,at),b(t,Bt),b(Bt,xe),b(Bt,rn),b(Bt,Zt),j(tn,Zt,null),dn=!0},p(Le,Ee){var Be;(!dn||Ee&4)&&r!==(r=Le[2].id+"")&&se(a,r),(!dn||Ee&4)&&h!==(h=Le[2].status+"")&&se(g,h),(!dn||Ee&4)&&Q(_,"label-danger",Le[2].status>=400),(!dn||Ee&4)&&M!==(M=((Be=Le[2].method)==null?void 0:Be.toUpperCase())+"")&&se(E,M),(!dn||Ee&4)&&R!==(R=Le[2].auth+"")&&se(q,R),(!dn||Ee&4)&&fe!==(fe=Le[2].url+"")&&se(ee,fe),W===(W=Il(Le))&&Z?Z.p(Le,Ee):(Z.d(1),Z=W(Le),Z&&(Z.c(),Z.m(ze,null))),(!dn||Ee&4)&&Ye!==(Ye=Le[2].remoteIp+"")&&se(wt,Ye),(!dn||Ee&4)&&Lt!==(Lt=Le[2].userIp+"")&&se(on,Lt),(!dn||Ee&4)&&si!==(si=Le[2].userAgent+"")&&se(Zn,si);let Ue=he;he=$e(Le,Ee),he===Ue?le[he].p(Le,Ee):(re(),L(le[Ue],1,1,()=>{le[Ue]=null}),ae(),ke=le[he],ke?ke.p(Le,Ee):(ke=le[he]=ie[he](Le),ke.c()),A(ke,1),ke.m(Jt,null));const Ne={};Ee&4&&(Ne.date=Le[2].created),tn.$set(Ne)},i(Le){dn||(A(ke),A(tn.$$.fragment,Le),dn=!0)},o(Le){L(ke),L(tn.$$.fragment,Le),dn=!1},d(Le){Le&&k(e),Z.d(),le[he].d(),V(tn)}}}function k4(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function w4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[4]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function S4(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[w4],header:[k4],default:[y4]},$$scope:{ctx:n}};return e=new ln({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(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[5](null),V(e,s)}}}function $4(n,e,t){let i,s={};function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){ne[c?"unshift":"push"](()=>{i=c,t(1,i)})}function f(c){Fe.call(this,n,c)}function u(c){Fe.call(this,n,c)}return[o,i,s,l,r,a,f,u]}class C4 extends be{constructor(e){super(),ge(this,e,$4,S4,pe,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function T4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(f,u){w(f,e,u),e.checked=n[1],w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[10]),r=!0)},p(f,u){u&16384&&t!==(t=f[14])&&p(e,"id",t),u&2&&(e.checked=f[1]),u&16384&&o!==(o=f[14])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function Mc(n){let e,t;return e=new o4({props:{filter:n[4],presets:n[5]}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Oc(n){let e,t;return e=new Ck({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function M4(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S=n[3],C,$=n[3],T,M;r=new Wo({}),r.$on("refresh",n[9]),d=new ce({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[T4,({uniqueId:I})=>({14:I}),({uniqueId:I})=>I?16384:0]},$$scope:{ctx:n}}}),_=new Uo({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),_.$on("submit",n[11]);let E=Mc(n),D=Oc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=U(n[6]),o=O(),z(r.$$.fragment),a=O(),f=v("div"),u=O(),c=v("div"),z(d.$$.fragment),m=O(),z(_.$$.fragment),h=O(),g=v("div"),y=O(),E.c(),C=O(),D.c(),T=ye(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(f,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(g,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(I,P){w(I,e,P),b(e,t),b(t,i),b(i,s),b(s,l),b(t,o),j(r,t,null),b(t,a),b(t,f),b(t,u),b(t,c),j(d,c,null),b(e,m),j(_,e,null),b(e,h),b(e,g),b(e,y),E.m(e,null),w(I,C,P),D.m(I,P),w(I,T,P),M=!0},p(I,P){(!M||P&64)&&se(l,I[6]);const F={};P&49154&&(F.$$scope={dirty:P,ctx:I}),d.$set(F);const N={};P&1&&(N.value=I[0]),_.$set(N),P&8&&pe(S,S=I[3])?(re(),L(E,1,1,x),ae(),E=Mc(I),E.c(),A(E,1),E.m(e,null)):E.p(I,P),P&8&&pe($,$=I[3])?(re(),L(D,1,1,x),ae(),D=Oc(I),D.c(),A(D,1),D.m(T.parentNode,T)):D.p(I,P)},i(I){M||(A(r.$$.fragment,I),A(d.$$.fragment,I),A(_.$$.fragment,I),A(E),A(D),M=!0)},o(I){L(r.$$.fragment,I),L(d.$$.fragment,I),L(_.$$.fragment,I),L(E),L(D),M=!1},d(I){I&&k(e),V(r),V(d),V(_),E.d(I),I&&k(C),I&&k(T),D.d(I)}}}function O4(n){let e,t,i,s;e=new wn({props:{$$slots:{default:[M4]},$$scope:{ctx:n}}});let l={};return i=new C4({props:l}),n[13](i),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(o,r){j(e,o,r),w(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const f={};i.$set(f)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){L(e.$$.fragment,o),L(i.$$.fragment,o),s=!1},d(o){V(e,o),o&&k(t),n[13](null),V(i,o)}}}const Ec="includeAdminLogs";function E4(n,e,t){var y;let i,s,l;We(n,Et,S=>t(6,l=S));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];nn(Et,l="Request logs",l);let r,a="",f=((y=window.localStorage)==null?void 0:y.getItem(Ec))<<0,u=1;function c(){t(3,u++,u)}const d=()=>c();function m(){f=this.checked,t(1,f)}const _=S=>t(0,a=S.detail),h=S=>r==null?void 0:r.show(S==null?void 0:S.detail);function g(S){ne[S?"unshift":"push"](()=>{r=S,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=f?"":'auth!="admin"'),n.$$.dirty&2&&typeof f<"u"&&window.localStorage&&window.localStorage.setItem(Ec,f<<0),n.$$.dirty&1&&t(4,s=H.normalizeSearchFilter(a,o))},[a,f,r,u,s,i,l,o,c,d,m,_,h,g]}class D4 extends be{constructor(e){super(),ge(this,e,E4,O4,pe,{})}}const ef=Fn({});function mn(n,e,t){ef.set({text:n,yesCallback:e,noCallback:t})}function m1(){ef.set({})}function Dc(n){let e,t,i;const s=n[17].default,l=$t(s,n,n[16],null);return{c(){e=v("div"),l&&l.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(o,r){w(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&Tt(l,s,o,o[16],i?Ct(s,o[16],r,null):Mt(o[16]),null),(!i||r&2)&&p(e,"class",o[1]),(!i||r&3)&&Q(e,"active",o[0])},i(o){i||(A(l,o),o&&Ge(()=>{i&&(t||(t=Re(e,di,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){L(l,o),o&&(t||(t=Re(e,di,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function A4(n){let e,t,i,s,l=n[0]&&Dc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[Y(window,"mousedown",n[5]),Y(window,"click",n[6]),Y(window,"keydown",n[4]),Y(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Dc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){L(l),t=!1},d(o){o&&k(e),l&&l.d(),n[19](null),i=!1,Ce(s)}}}function I4(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:f="closable"}=e,{class:u=""}=e,c,d,m,_,h=!1;const g=yt();function y(){t(0,o=!1),h=!1,clearTimeout(_)}function S(){t(0,o=!0),clearTimeout(_),_=setTimeout(()=>{a&&(d!=null&&d.scrollIntoViewIfNeeded?d==null||d.scrollIntoViewIfNeeded():d!=null&&d.scrollIntoView&&(d==null||d.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function C(){o?y():S()}function $(B){return!c||B.classList.contains(f)||(m==null?void 0:m.contains(B))&&!c.contains(B)||c.contains(B)&&B.closest&&B.closest("."+f)}function T(B){(!o||$(B.target))&&(B.preventDefault(),B.stopPropagation(),C())}function M(B){(B.code==="Enter"||B.code==="Space")&&(!o||$(B.target))&&(B.preventDefault(),B.stopPropagation(),C())}function E(B){o&&r&&B.code==="Escape"&&(B.preventDefault(),y())}function D(B){o&&!(c!=null&&c.contains(B.target))?h=!0:h&&(h=!1)}function I(B){var K;o&&h&&!(c!=null&&c.contains(B.target))&&!(m!=null&&m.contains(B.target))&&!((K=B.target)!=null&&K.closest(".flatpickr-calendar"))&&y()}function P(B){D(B),I(B)}function F(B){N(),c==null||c.addEventListener("click",T),t(15,m=B||(c==null?void 0:c.parentNode)),m==null||m.addEventListener("click",T),m==null||m.addEventListener("keydown",M)}function N(){clearTimeout(_),c==null||c.removeEventListener("click",T),m==null||m.removeEventListener("click",T),m==null||m.removeEventListener("keydown",M)}Kt(()=>(F(),()=>N()));function R(B){ne[B?"unshift":"push"](()=>{d=B,t(3,d)})}function q(B){ne[B?"unshift":"push"](()=>{c=B,t(2,c)})}return n.$$set=B=>{"trigger"in B&&t(8,l=B.trigger),"active"in B&&t(0,o=B.active),"escClose"in B&&t(9,r=B.escClose),"autoScroll"in B&&t(10,a=B.autoScroll),"closableClass"in B&&t(11,f=B.closableClass),"class"in B&&t(1,u=B.class),"$$scope"in B&&t(16,s=B.$$scope)},n.$$.update=()=>{var B,K;n.$$.dirty&260&&c&&F(l),n.$$.dirty&32769&&(o?((B=m==null?void 0:m.classList)==null||B.add("active"),g("show")):((K=m==null?void 0:m.classList)==null||K.remove("active"),g("hide")))},[o,u,c,d,E,D,I,P,l,r,a,f,y,S,C,m,s,i,R,q]}class Nn extends be{constructor(e){super(),ge(this,e,I4,A4,pe,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function Ac(n,e,t){const i=n.slice();return i[27]=e[t],i}function L4(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("input"),s=O(),l=v("label"),o=U("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[30]),e.checked=i=n[3].unique,p(l,"for",r=n[30])},m(u,c){w(u,e,c),w(u,s,c),w(u,l,c),b(l,o),a||(f=Y(e,"change",n[19]),a=!0)},p(u,c){c[0]&1073741824&&t!==(t=u[30])&&p(e,"id",t),c[0]&8&&i!==(i=u[3].unique)&&(e.checked=i),c[0]&1073741824&&r!==(r=u[30])&&p(l,"for",r)},d(u){u&&k(e),u&&k(s),u&&k(l),a=!1,f()}}}function P4(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var u;let f={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(u=a[0])==null?void 0:u.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(f.value=a[2]),{props:f}}return o&&(e=Ot(o,r(n)),ne.push(()=>de(e,"value",l))),{c(){e&&z(e.$$.fragment),i=ye()},m(a,f){e&&j(e,a,f),w(a,i,f),s=!0},p(a,f){var c;const u={};if(f[0]&1073741824&&(u.id=a[30]),f[0]&1&&(u.placeholder=`eg. CREATE INDEX idx_test on ${(c=a[0])==null?void 0:c.name} (created)`),!t&&f[0]&4&&(t=!0,u.value=a[2],_e(()=>t=!1)),f[0]&128&&o!==(o=a[7])){if(e){re();const d=e;L(d.$$.fragment,1,0,()=>{V(d,1)}),ae()}o?(e=Ot(o,r(a)),ne.push(()=>de(e,"value",l)),z(e.$$.fragment),A(e.$$.fragment,1),j(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&&V(e,a)}}}function F4(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:x,i:x,o:x,d(t){t&&k(e)}}}function N4(n){let e,t,i,s;const l=[F4,P4],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):(re(),L(o[u],1,1,()=>{o[u]=null}),ae(),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)}}}function Ic(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new ce({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[N4,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Ic(n);return{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment),s=O(),r&&r.c(),l=ye()},m(a,f){j(e,a,f),w(a,t,f),j(i,a,f),w(a,s,f),r&&r.m(a,f),w(a,l,f),o=!0},p(a,f){const u={};f[0]&1073741837|f[1]&1&&(u.$$scope={dirty:f,ctx:a}),e.$set(u);const c={};f[0]&64&&(c.name=`indexes.${a[6]||""}`),f[0]&1073742213|f[1]&1&&(c.$$scope={dirty:f,ctx:a}),i.$set(c),a[10].length>0?r?r.p(a,f):(r=Ic(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),o=!1},d(a){V(e,a),a&&k(t),V(i,a),a&&k(s),r&&r.d(a),a&&k(l)}}}function q4(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=v("h4"),i=U(t),s=U(" index")},m(l,o){w(l,e,o),b(e,i),b(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&se(i,t)},d(l){l&&k(e)}}}function Pc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){w(s,e,l),t||(i=[Se(je.call(null,e,{text:"Delete",position:"top"})),Y(e,"click",n[16])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ce(i)}}}function j4(n){let e,t,i,s,l,o,r=n[5]!=""&&Pc(n);return{c(){r&&r.c(),e=O(),t=v("button"),t.innerHTML='Cancel',i=O(),s=v("button"),s.innerHTML='Set index',p(t,"type","button"),p(t,"class","btn btn-transparent"),p(s,"type","button"),p(s,"class","btn"),Q(s,"btn-disabled",n[9].length<=0)},m(a,f){r&&r.m(a,f),w(a,e,f),w(a,t,f),w(a,i,f),w(a,s,f),l||(o=[Y(t,"click",n[17]),Y(s,"click",n[18])],l=!0)},p(a,f){a[5]!=""?r?r.p(a,f):(r=Pc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),f[0]&512&&Q(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&k(e),a&&k(t),a&&k(i),a&&k(s),l=!1,Ce(o)}}}function V4(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[j4],header:[q4],default:[R4]},$$scope:{ctx:n}};for(let l=0;lX.name==B);J?H.removeByValue(K.columns,J):H.pushUnique(K.columns,{name:B}),t(2,d=H.buildIndex(K))}Kt(async()=>{t(8,h=!0);try{t(7,_=(await lt(()=>import("./CodeEditor-7fe9ddeb.js"),["./CodeEditor-7fe9ddeb.js","./index-4841d67b.js"],import.meta.url)).default)}catch(B){console.warn(B)}t(8,h=!1)});const M=()=>C(),E=()=>y(),D=()=>$(),I=B=>{t(3,s.unique=B.target.checked,s),t(3,s.tableName=s.tableName||(f==null?void 0:f.name),s),t(2,d=H.buildIndex(s))};function P(B){d=B,t(2,d)}const F=B=>T(B);function N(B){ne[B?"unshift":"push"](()=>{u=B,t(4,u)})}function R(B){Fe.call(this,n,B)}function q(B){Fe.call(this,n,B)}return n.$$set=B=>{e=qe(qe({},e),Xt(B)),t(14,r=Qe(e,o)),"collection"in B&&t(0,f=B.collection)},n.$$.update=()=>{var B,K,J;n.$$.dirty[0]&1&&t(10,i=(((K=(B=f==null?void 0:f.schema)==null?void 0:B.filter(X=>!X.toDelete))==null?void 0:K.map(X=>X.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=H.parseIndex(d)),n.$$.dirty[0]&8&&t(9,l=((J=s.columns)==null?void 0:J.map(X=>X.name))||[])},[f,y,d,s,u,c,m,_,h,l,i,C,$,T,r,g,M,E,D,I,P,F,N,R,q]}class H4 extends be{constructor(e){super(),ge(this,e,z4,V4,pe,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Fc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=H.parseIndex(i[10]);return i[11]=s,i}function Nc(n){let e;return{c(){e=v("strong"),e.textContent="Unique:"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Rc(n){var d;let e,t,i,s=((d=n[11].columns)==null?void 0:d.map(qc).join(", "))+"",l,o,r,a,f,u=n[11].unique&&Nc();function c(){return n[4](n[10],n[13])}return{c(){var m,_;e=v("button"),u&&u.c(),t=O(),i=v("span"),l=U(s),p(i,"class","txt"),p(e,"type","button"),p(e,"class",o="label link-primary "+((_=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&_.message?"label-danger":"")+" svelte-167lbwu")},m(m,_){var h,g;w(m,e,_),u&&u.m(e,null),b(e,t),b(e,i),b(i,l),a||(f=[Se(r=je.call(null,e,((g=(h=n[2].indexes)==null?void 0:h[n[13]])==null?void 0:g.message)||"")),Y(e,"click",c)],a=!0)},p(m,_){var h,g,y,S,C;n=m,n[11].unique?u||(u=Nc(),u.c(),u.m(e,t)):u&&(u.d(1),u=null),_&1&&s!==(s=((h=n[11].columns)==null?void 0:h.map(qc).join(", "))+"")&&se(l,s),_&4&&o!==(o="label link-primary "+((y=(g=n[2].indexes)==null?void 0:g[n[13]])!=null&&y.message?"label-danger":"")+" svelte-167lbwu")&&p(e,"class",o),r&&Dt(r.update)&&_&4&&r.update.call(null,((C=(S=n[2].indexes)==null?void 0:S[n[13]])==null?void 0:C.message)||"")},d(m){m&&k(e),u&&u.d(),a=!1,Ce(f)}}}function B4(n){var $,T,M;let e,t,i=(((T=($=n[0])==null?void 0:$.indexes)==null?void 0:T.length)||0)+"",s,l,o,r,a,f,u,c,d,m,_,h,g=((M=n[0])==null?void 0:M.indexes)||[],y=[];for(let E=0;Ede(c,"collection",S)),c.$on("remove",n[8]),c.$on("submit",n[9]),{c(){e=v("div"),t=U("Unique constraints and indexes ("),s=U(i),l=U(")"),o=O(),r=v("div");for(let E=0;E+ - New index`,u=O(),z(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(E,D){w(E,e,D),b(e,t),b(e,s),b(e,l),w(E,o,D),w(E,r,D);for(let I=0;Id=!1)),c.$set(I)},i(E){m||(A(c.$$.fragment,E),m=!0)},o(E){L(c.$$.fragment,E),m=!1},d(E){E&&k(e),E&&k(o),E&&k(r),_t(y,E),E&&k(u),n[6](null),V(c,E),_=!1,h()}}}const qc=n=>n.name;function U4(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;hl==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;_{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 W4 extends be{constructor(e){super(),ge(this,e,U4,B4,pe,{collection:0})}}function jc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Vc(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=O(),s=v("span"),o=U(l),r=O(),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",Pn(u)),Y(e,"keydown",Pn(c))],a=!0)},p(d,m){n=d},d(d){d&&k(e),a=!1,Ce(f)}}}function Y4(n){let e,t=n[2],i=[];for(let s=0;s{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 Z4 extends be{constructor(e){super(),ge(this,e,J4,K4,pe,{class:0})}}const G4=n=>({interactive:n&64,hasErrors:n&32}),zc=n=>({interactive:n[6],hasErrors:n[5]}),X4=n=>({interactive:n&64,hasErrors:n&32}),Hc=n=>({interactive:n[6],hasErrors:n[5]}),Q4=n=>({interactive:n&64,hasErrors:n&32}),Bc=n=>({interactive:n[6],hasErrors:n[5]});function Uc(n){let e;return{c(){e=v("div"),e.innerHTML='',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 Wc(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=Se(t=je.call(null,e,n[4])),i=!0)},p(l,o){t&&Dt(t.update)&&o&16&&t.update.call(null,l[4])},d(l){l&&k(e),i=!1,s()}}}function x4(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_=n[0].required&&Wc(n);return{c(){e=v("div"),_&&_.c(),t=O(),i=v("div"),s=v("i"),o=O(),r=v("input"),p(e,"class","markers"),p(s,"class",l=H.getFieldTypeIcon(n[0].type)),p(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),Q(i,"txt-disabled",!n[6]),p(r,"type","text"),r.required=!0,r.disabled=a=!n[6],r.readOnly=f=n[0].id&&n[0].system,p(r,"spellcheck","false"),r.autofocus=u=!n[0].id,p(r,"placeholder","Field name"),r.value=c=n[0].name},m(h,g){w(h,e,g),_&&_.m(e,null),w(h,t,g),w(h,i,g),b(i,s),w(h,o,g),w(h,r,g),n[14](r),n[0].id||r.focus(),d||(m=Y(r,"input",n[15]),d=!0)},p(h,g){h[0].required?_?_.p(h,g):(_=Wc(h),_.c(),_.m(e,null)):_&&(_.d(1),_=null),g&1&&l!==(l=H.getFieldTypeIcon(h[0].type))&&p(s,"class",l),g&64&&Q(i,"txt-disabled",!h[6]),g&64&&a!==(a=!h[6])&&(r.disabled=a),g&1&&f!==(f=h[0].id&&h[0].system)&&(r.readOnly=f),g&1&&u!==(u=!h[0].id)&&(r.autofocus=u),g&1&&c!==(c=h[0].name)&&r.value!==c&&(r.value=c)},d(h){h&&k(e),_&&_.d(),h&&k(t),h&&k(i),h&&k(o),h&&k(r),n[14](null),d=!1,m()}}}function e$(n){let e;return{c(){e=v("span"),p(e,"class","separator")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function t$(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-settings-3-line"),p(e,"type","button"),p(e,"aria-label","Toggle field options"),p(e,"class",i="btn btn-sm btn-circle options-trigger "+(n[3]?"btn-secondary":"btn-transparent")),Q(e,"btn-hint",!n[3]&&!n[5]),Q(e,"btn-danger",n[5])},m(o,r){w(o,e,r),b(e,t),s||(l=Y(e,"click",n[11]),s=!0)},p(o,r){r&8&&i!==(i="btn btn-sm btn-circle options-trigger "+(o[3]?"btn-secondary":"btn-transparent"))&&p(e,"class",i),r&40&&Q(e,"btn-hint",!o[3]&&!o[5]),r&40&&Q(e,"btn-danger",o[5])},d(o){o&&k(e),s=!1,l()}}}function n$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),p(e,"aria-label","Restore")},m(s,l){w(s,e,l),t||(i=[Se(je.call(null,e,"Restore")),Y(e,"click",n[9])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ce(i)}}}function Yc(n){let e,t,i,s,l,o,r,a,f,u,c;const d=n[13].options,m=$t(d,n,n[18],Hc);l=new ce({props:{class:"form-field form-field-toggle",name:"requried",$$slots:{default:[i$,({uniqueId:y})=>({24:y}),({uniqueId:y})=>y?16777216:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field form-field-toggle",name:"presentable",$$slots:{default:[s$,({uniqueId:y})=>({24:y}),({uniqueId:y})=>y?16777216:0]},$$scope:{ctx:n}}});const _=n[13].optionsFooter,h=$t(_,n,n[18],zc);let g=!n[0].toDelete&&Kc(n);return{c(){e=v("div"),t=v("div"),m&&m.c(),i=O(),s=v("div"),z(l.$$.fragment),o=O(),z(r.$$.fragment),a=O(),h&&h.c(),f=O(),g&&g.c(),p(t,"class","hidden-empty m-b-sm"),p(s,"class","schema-field-options-footer"),p(e,"class","schema-field-options")},m(y,S){w(y,e,S),b(e,t),m&&m.m(t,null),b(e,i),b(e,s),j(l,s,null),b(s,o),j(r,s,null),b(s,a),h&&h.m(s,null),b(s,f),g&&g.m(s,null),c=!0},p(y,S){m&&m.p&&(!c||S&262240)&&Tt(m,d,y,y[18],c?Ct(d,y[18],S,X4):Mt(y[18]),Hc);const C={};S&17039377&&(C.$$scope={dirty:S,ctx:y}),l.$set(C);const $={};S&17039361&&($.$$scope={dirty:S,ctx:y}),r.$set($),h&&h.p&&(!c||S&262240)&&Tt(h,_,y,y[18],c?Ct(_,y[18],S,G4):Mt(y[18]),zc),y[0].toDelete?g&&(re(),L(g,1,1,()=>{g=null}),ae()):g?(g.p(y,S),S&1&&A(g,1)):(g=Kc(y),g.c(),A(g,1),g.m(s,null))},i(y){c||(A(m,y),A(l.$$.fragment,y),A(r.$$.fragment,y),A(h,y),A(g),y&&Ge(()=>{c&&(u||(u=Re(e,tt,{duration:150},!0)),u.run(1))}),c=!0)},o(y){L(m,y),L(l.$$.fragment,y),L(r.$$.fragment,y),L(h,y),L(g),y&&(u||(u=Re(e,tt,{duration:150},!1)),u.run(0)),c=!1},d(y){y&&k(e),m&&m.d(y),V(l),V(r),h&&h.d(y),g&&g.d(),y&&u&&u.end()}}}function i$(n){let e,t,i,s,l,o,r,a,f,u,c,d;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),o=U(n[4]),r=O(),a=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[24]),p(l,"class","txt"),p(a,"class","ri-information-line link-hint"),p(s,"for",u=n[24])},m(m,_){w(m,e,_),e.checked=n[0].required,w(m,i,_),w(m,s,_),b(s,l),b(l,o),b(s,r),b(s,a),c||(d=[Y(e,"change",n[16]),Se(f=je.call(null,a,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(n[0])}.`}))],c=!0)},p(m,_){_&16777216&&t!==(t=m[24])&&p(e,"id",t),_&1&&(e.checked=m[0].required),_&16&&se(o,m[4]),f&&Dt(f.update)&&_&1&&f.update.call(null,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(m[0])}.`}),_&16777216&&u!==(u=m[24])&&p(s,"for",u)},d(m){m&&k(e),m&&k(i),m&&k(s),c=!1,Ce(d)}}}function s$(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Presentable",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[24]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[24])},m(c,d){w(c,e,d),e.checked=n[0].presentable,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=[Y(e,"change",n[17]),Se(je.call(null,r,{text:"Whether the field should be preferred in the Admin UI relation listings (default to auto)."}))],f=!0)},p(c,d){d&16777216&&t!==(t=c[24])&&p(e,"id",t),d&1&&(e.checked=c[0].presentable),d&16777216&&a!==(a=c[24])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,Ce(u)}}}function Kc(n){let e,t,i,s,l,o,r,a,f;return a=new Nn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[l$]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),l=v("button"),o=v("i"),r=O(),z(a.$$.fragment),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","m-l-auto txt-right")},m(u,c){w(u,e,c),b(e,t),b(e,i),b(e,s),b(s,l),b(l,o),b(l,r),j(a,l,null),f=!0},p(u,c){const d={};c&262144&&(d.$$scope={dirty:c,ctx:u}),a.$set(d)},i(u){f||(A(a.$$.fragment,u),f=!0)},o(u){L(a.$$.fragment,u),f=!1},d(u){u&&k(e),V(a)}}}function l$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function o$(n){let e,t,i,s,l,o,r,a,f,u=n[6]&&Uc();s=new ce({props:{class:"form-field required m-0 "+(n[6]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[x4]},$$scope:{ctx:n}}});const c=n[13].default,d=$t(c,n,n[18],Bc),m=d||e$();function _(S,C){if(S[0].toDelete)return n$;if(S[6])return t$}let h=_(n),g=h&&h(n),y=n[6]&&n[3]&&Yc(n);return{c(){e=v("div"),t=v("div"),u&&u.c(),i=O(),z(s.$$.fragment),l=O(),m&&m.c(),o=O(),g&&g.c(),r=O(),y&&y.c(),p(t,"class","schema-field-header"),p(e,"class","schema-field"),Q(e,"required",n[0].required),Q(e,"expanded",n[6]&&n[3]),Q(e,"deleted",n[0].toDelete)},m(S,C){w(S,e,C),b(e,t),u&&u.m(t,null),b(t,i),j(s,t,null),b(t,l),m&&m.m(t,null),b(t,o),g&&g.m(t,null),b(e,r),y&&y.m(e,null),f=!0},p(S,[C]){S[6]?u||(u=Uc(),u.c(),u.m(t,i)):u&&(u.d(1),u=null);const $={};C&64&&($.class="form-field required m-0 "+(S[6]?"":"disabled")),C&2&&($.name="schema."+S[1]+".name"),C&262229&&($.$$scope={dirty:C,ctx:S}),s.$set($),d&&d.p&&(!f||C&262240)&&Tt(d,c,S,S[18],f?Ct(c,S[18],C,Q4):Mt(S[18]),Bc),h===(h=_(S))&&g?g.p(S,C):(g&&g.d(1),g=h&&h(S),g&&(g.c(),g.m(t,null))),S[6]&&S[3]?y?(y.p(S,C),C&72&&A(y,1)):(y=Yc(S),y.c(),A(y,1),y.m(e,null)):y&&(re(),L(y,1,1,()=>{y=null}),ae()),(!f||C&1)&&Q(e,"required",S[0].required),(!f||C&72)&&Q(e,"expanded",S[6]&&S[3]),(!f||C&1)&&Q(e,"deleted",S[0].toDelete)},i(S){f||(A(s.$$.fragment,S),A(m,S),A(y),S&&Ge(()=>{f&&(a||(a=Re(e,tt,{duration:150},!0)),a.run(1))}),f=!0)},o(S){L(s.$$.fragment,S),L(m,S),L(y),S&&(a||(a=Re(e,tt,{duration:150},!1)),a.run(0)),f=!1},d(S){S&&k(e),u&&u.d(),V(s),m&&m.d(S),g&&g.d(),y&&y.d(),S&&a&&a.end()}}}let Cr=[];function r$(n,e,t){let i,s,l,o;We(n,Ci,F=>t(12,o=F));let{$$slots:r={},$$scope:a}=e;const f="f_"+H.randomString(8),u=yt(),c={bool:"Nonfalsey",number:"Nonzero"};let{key:d=""}=e,{field:m=H.initSchemaField()}=e,_,h=!1;function g(){m.id?t(0,m.toDelete=!0,m):u("remove")}function y(){t(0,m.toDelete=!1,m),en({})}function S(F){return H.slugify(F)}function C(){t(3,h=!0),M()}function $(){t(3,h=!1)}function T(){h?$():C()}function M(){for(let F of Cr)F.id!=f&&F.collapse()}Kt(()=>(Cr.push({id:f,collapse:$}),m.onMountSelect&&(t(0,m.onMountSelect=!1,m),_==null||_.select()),()=>{H.removeByKey(Cr,"id",f)}));function E(F){ne[F?"unshift":"push"](()=>{_=F,t(2,_)})}const D=F=>{const N=m.name;t(0,m.name=S(F.target.value),m),F.target.value=m.name,u("rename",{oldName:N,newName:m.name})};function I(){m.required=this.checked,t(0,m)}function P(){m.presentable=this.checked,t(0,m)}return n.$$set=F=>{"key"in F&&t(1,d=F.key),"field"in F&&t(0,m=F.field),"$$scope"in F&&t(18,a=F.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&m.toDelete&&m.originalName&&m.name!==m.originalName&&t(0,m.name=m.originalName,m),n.$$.dirty&1&&!m.originalName&&m.name&&t(0,m.originalName=m.name,m),n.$$.dirty&1&&typeof m.toDelete>"u"&&t(0,m.toDelete=!1,m),n.$$.dirty&1&&m.required&&t(0,m.nullable=!1,m),n.$$.dirty&1&&t(6,i=!m.toDelete&&!(m.id&&m.system)),n.$$.dirty&4098&&t(5,s=!H.isEmpty(H.getNestedVal(o,`schema.${d}`))),n.$$.dirty&1&&t(4,l=c[m==null?void 0:m.type]||"Nonempty")},[m,d,_,h,l,s,i,u,g,y,S,T,o,r,E,D,I,P,a]}class pi extends be{constructor(e){super(),ge(this,e,r$,o$,pe,{key:1,field:0})}}function a$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min length"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min","0")},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].options.min),r||(a=Y(l,"input",n[3]),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&&pt(l.value)!==f[0].options.min&&oe(l,f[0].options.min)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function f$(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("label"),t=U("Max length"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min",r=n[0].options.min||0)},m(u,c){w(u,e,c),b(e,t),w(u,s,c),w(u,l,c),oe(l,n[0].options.max),a||(f=Y(l,"input",n[4]),a=!0)},p(u,c){c&512&&i!==(i=u[9])&&p(e,"for",i),c&512&&o!==(o=u[9])&&p(l,"id",o),c&1&&r!==(r=u[0].options.min||0)&&p(l,"min",r),c&1&&pt(l.value)!==u[0].options.max&&oe(l,u[0].options.max)},d(u){u&&k(e),u&&k(s),u&&k(l),a=!1,f()}}}function u$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Regex pattern"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","text"),p(l,"id",o=n[9]),p(l,"placeholder","Valid Go regular expression, eg. ^\\w+$")},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].options.pattern),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].options.pattern&&oe(l,f[0].options.pattern)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function c$(n){let e,t,i,s,l,o,r,a,f,u;return i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[a$,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[f$,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),f=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[u$,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(o.$$.fragment),r=O(),a=v("div"),z(f.$$.fragment),p(t,"class","col-sm-3"),p(l,"class","col-sm-3"),p(a,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(c,d){w(c,e,d),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(f,a,null),u=!0},p(c,d){const m={};d&2&&(m.name="schema."+c[1]+".options.min"),d&1537&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const _={};d&2&&(_.name="schema."+c[1]+".options.max"),d&1537&&(_.$$scope={dirty:d,ctx:c}),o.$set(_);const h={};d&2&&(h.name="schema."+c[1]+".options.pattern"),d&1537&&(h.$$scope={dirty:d,ctx:c}),f.$set(h)},i(c){u||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(f.$$.fragment,c),u=!0)},o(c){L(i.$$.fragment,c),L(o.$$.fragment,c),L(f.$$.fragment,c),u=!1},d(c){c&&k(e),V(i),V(o),V(f)}}}function d$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[c$]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&6?At(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};a&1027&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function p$(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=pt(this.value),t(0,l)}function a(){l.options.max=pt(this.value),t(0,l)}function f(){l.options.pattern=this.value,t(0,l)}function u(m){l=m,t(0,l)}function c(m){Fe.call(this,n,m)}function d(m){Fe.call(this,n,m)}return n.$$set=m=>{e=qe(qe({},e),Xt(m)),t(2,s=Qe(e,i)),"field"in m&&t(0,l=m.field),"key"in m&&t(1,o=m.key)},[l,o,s,r,a,f,u,c,d]}class m$ extends be{constructor(e){super(),ge(this,e,p$,d$,pe,{field:0,key:1})}}function h$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9])},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].options.min),r||(a=Y(l,"input",n[4]),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&&pt(l.value)!==f[0].options.min&&oe(l,f[0].options.min)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function _$(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("label"),t=U("Max"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"min",r=n[0].options.min)},m(u,c){w(u,e,c),b(e,t),w(u,s,c),w(u,l,c),oe(l,n[0].options.max),a||(f=Y(l,"input",n[5]),a=!0)},p(u,c){c&512&&i!==(i=u[9])&&p(e,"for",i),c&512&&o!==(o=u[9])&&p(l,"id",o),c&1&&r!==(r=u[0].options.min)&&p(l,"min",r),c&1&&pt(l.value)!==u[0].options.max&&oe(l,u[0].options.max)},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;return i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[h$,({uniqueId:a})=>({9:a}),({uniqueId:a})=>a?512:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[_$,({uniqueId:a})=>({9:a}),({uniqueId:a})=>a?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(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),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,f){const u={};f&2&&(u.name="schema."+a[1]+".options.min"),f&1537&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};f&2&&(c.name="schema."+a[1]+".options.max"),f&1537&&(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),V(i),V(o)}}}function b$(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="No decimals",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[9]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[9])},m(c,d){w(c,e,d),e.checked=n[0].options.noDecimal,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=[Y(e,"change",n[3]),Se(je.call(null,r,{text:"Existing decimal numbers will not be affected."}))],f=!0)},p(c,d){d&512&&t!==(t=c[9])&&p(e,"id",t),d&1&&(e.checked=c[0].options.noDecimal),d&512&&a!==(a=c[9])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,Ce(u)}}}function v$(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.noDecimal",$$slots:{default:[b$,({uniqueId:i})=>({9:i}),({uniqueId:i})=>i?512:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.noDecimal"),s&1537&&(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){V(e,i)}}}function y$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{optionsFooter:[v$],options:[g$]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&6?At(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};a&1027&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function k$(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.noDecimal=this.checked,t(0,l)}function a(){l.options.min=pt(this.value),t(0,l)}function f(){l.options.max=pt(this.value),t(0,l)}function u(m){l=m,t(0,l)}function c(m){Fe.call(this,n,m)}function d(m){Fe.call(this,n,m)}return n.$$set=m=>{e=qe(qe({},e),Xt(m)),t(2,s=Qe(e,i)),"field"in m&&t(0,l=m.field),"key"in m&&t(1,o=m.key)},[l,o,s,r,a,f,u,c,d]}class w$ extends be{constructor(e){super(),ge(this,e,k$,y$,pe,{field:0,key:1})}}function S$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&6?At(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function $$(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),Xt(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 C$ extends be{constructor(e){super(),ge(this,e,$$,S$,pe,{field:0,key:1})}}function T$(n){let e,t,i,s,l=[{type:t=n[5].type||"text"},{value:n[4]},{disabled:n[3]},{readOnly:n[2]},n[5]],o={};for(let r=0;r{t(0,o=H.splitNonEmpty(c.target.value,r))};return n.$$set=c=>{e=qe(qe({},e),Xt(c)),t(5,l=Qe(e,s)),"value"in c&&t(0,o=c.value),"separator"in c&&t(1,r=c.separator),"readonly"in c&&t(2,a=c.readonly),"disabled"in c&&t(3,f=c.disabled)},n.$$.update=()=>{n.$$.dirty&1&&t(4,i=(o||[]).join(", "))},[o,r,a,f,i,l,u]}class Ns extends be{constructor(e){super(),ge(this,e,M$,T$,pe,{value:0,separator:1,readonly:2,disabled:3})}}function O$(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;function _(g){n[3](g)}let h={id:n[8],disabled:!H.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(h.value=n[0].options.exceptDomains),r=new Ns({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),z(r.$$.fragment),f=O(),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]),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),j(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Se(je.call(null,s,{text:`List of domains that are NOT allowed. - 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=!H.isEmpty(g[0].options.onlyDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.exceptDomains,_e(()=>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),V(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function E$(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:!H.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(h.value=n[0].options.onlyDomains),r=new Ns({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),z(r.$$.fragment),f=O(),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),j(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Se(je.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=!H.isEmpty(g[0].options.exceptDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.onlyDomains,_e(()=>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),V(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function D$(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:[O$,({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:[E$,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(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),j(i,t,null),b(e,s),b(e,l),j(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),V(i),V(o)}}}function A$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[D$]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&6?At(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};a&515&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function I$(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),Xt(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 h1 extends be{constructor(e){super(),ge(this,e,I$,A$,pe,{field:0,key:1})}}function L$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&6?At(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function P$(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),Xt(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 F$ extends be{constructor(e){super(),ge(this,e,P$,L$,pe,{field:0,key:1})}}function N$(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Strip urls domain",o=O(),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]),Se(je.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,Ce(u)}}}function R$(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.convertUrls",$$slots:{default:[N$,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(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){V(e,i)}}}function q$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[4](r)}let o={$$slots:{optionsFooter:[R$]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[5]),e.$on("remove",n[6]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&6?At(s,[a&2&&{key:r[1]},a&4&&Qt(r[2])]):{};a&515&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function j$(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(){t(0,l.options={convertUrls:!1},l)}function a(){l.options.convertUrls=this.checked,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),Xt(d)),t(2,s=Qe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},n.$$.update=()=>{n.$$.dirty&1&&H.isEmpty(l.options)&&r()},[l,o,s,a,f,u,c]}class V$ extends be{constructor(e){super(),ge(this,e,j$,q$,pe,{field:0,key:1})}}var Tr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ws={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},gl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},bn=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Vn=function(n){return n===!0?1:0};function Jc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Mr=function(n){return n instanceof Array?n:[n]};function pn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ut(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function xl(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function _1(n,e){if(e(n))return n;if(n.parentNode)return _1(n.parentNode,e)}function eo(n,e){var t=ut("div","numInputWrapper"),i=ut("input","numInput "+n),s=ut("span","arrowUp"),l=ut("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function On(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Or=function(){},Lo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},z$={D:Or,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*Vn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Or,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Or,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},Qi={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},al={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[al.w(n,e,t)]},F:function(n,e,t){return Lo(al.n(n,e,t)-1,!1,e)},G:function(n,e,t){return bn(al.h(n,e,t))},H:function(n){return bn(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[Vn(n.getHours()>11)]},M:function(n,e){return Lo(n.getMonth(),!0,e)},S:function(n){return bn(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return bn(n.getFullYear(),4)},d:function(n){return bn(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return bn(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return bn(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},g1=function(n){var e=n.config,t=e===void 0?ws:e,i=n.l10n,s=i===void 0?gl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,f){var u=f||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,u):a.split("").map(function(c,d,m){return al[c]&&m[d-1]!=="\\"?al[c](r,u,t):c!=="\\"?c:""}).join("")}},ua=function(n){var e=n.config,t=e===void 0?ws:e,i=n.l10n,s=i===void 0?gl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var f=a||s,u,c=l;if(l instanceof Date)u=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)u=new Date(l);else if(typeof l=="string"){var d=o||(t||ws).dateFormat,m=String(l).trim();if(m==="today")u=new Date,r=!0;else if(t&&t.parseDate)u=t.parseDate(l,d);else if(/Z$/.test(m)||/GMT$/.test(m))u=new Date(l);else{for(var _=void 0,h=[],g=0,y=0,S="";gMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ie=Dr(t.config);Z.setHours(ie.hours,ie.minutes,ie.seconds,Z.getMilliseconds()),t.selectedDates=[Z],t.latestSelectedDateObj=Z}W!==void 0&&W.type!=="blur"&&Il(W);var le=t._input.value;c(),tn(),t._input.value!==le&&t._debouncedChange()}function f(W,Z){return W%12+12*Vn(Z===t.l10n.amPM[1])}function u(W){switch(W%24){case 0:case 12:return 12;default:return W%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var W=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,Z=(parseInt(t.minuteElement.value,10)||0)%60,ie=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(W=f(W,t.amPM.textContent));var le=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&En(t.latestSelectedDateObj,t.config.minDate,!0)===0,$e=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&En(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Ie=Er(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Le=Er(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Ee=Er(W,Z,ie);if(Ee>Le&&Ee=12)]),t.secondElement!==void 0&&(t.secondElement.value=bn(ie)))}function _(W){var Z=On(W),ie=parseInt(Z.value)+(W.delta||0);(ie/1e3>1||W.key==="Enter"&&!/[^\d]/.test(ie.toString()))&&we(ie)}function h(W,Z,ie,le){if(Z instanceof Array)return Z.forEach(function($e){return h(W,$e,ie,le)});if(W instanceof Array)return W.forEach(function($e){return h($e,Z,ie,le)});W.addEventListener(Z,ie,le),t._handlers.push({remove:function(){return W.removeEventListener(Z,ie,le)}})}function g(){ke("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ie){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ie+"]"),function(le){return h(le,"click",t[ie])})}),t.isMobile){Gn();return}var W=Jc(wt,50);if(t._debouncedChange=Jc(g,W$),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&h(t.daysContainer,"mouseover",function(ie){t.config.mode==="range"&&Ye(On(ie))}),h(t._input,"keydown",Ze),t.calendarContainer!==void 0&&h(t.calendarContainer,"keydown",Ze),!t.config.inline&&!t.config.static&&h(window,"resize",W),window.ontouchstart!==void 0?h(window.document,"touchstart",ze):h(window.document,"mousedown",ze),h(window.document,"focus",ze,{capture:!0}),t.config.clickOpens===!0&&(h(t._input,"focus",t.open),h(t._input,"click",t.open)),t.daysContainer!==void 0&&(h(t.monthNav,"click",dn),h(t.monthNav,["keyup","increment"],_),h(t.daysContainer,"click",Sn)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var Z=function(ie){return On(ie).select()};h(t.timeContainer,["increment"],a),h(t.timeContainer,"blur",a,{capture:!0}),h(t.timeContainer,"click",C),h([t.hourElement,t.minuteElement],["focus","click"],Z),t.secondElement!==void 0&&h(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&h(t.amPM,"click",function(ie){a(ie)})}t.config.allowInput&&h(t._input,"blur",gt)}function S(W,Z){var ie=W!==void 0?t.parseDate(W):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(W);var $e=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!$e&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Ie=ut("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Ie,t.element),Ie.appendChild(t.element),t.altInput&&Ie.appendChild(t.altInput),Ie.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(W,Z,ie,le){var $e=Te(Z,!0),Ie=ut("span",W,Z.getDate().toString());return Ie.dateObj=Z,Ie.$i=le,Ie.setAttribute("aria-label",t.formatDate(Z,t.config.ariaDateFormat)),W.indexOf("hidden")===-1&&En(Z,t.now)===0&&(t.todayDateElem=Ie,Ie.classList.add("today"),Ie.setAttribute("aria-current","date")),$e?(Ie.tabIndex=-1,Bt(Z)&&(Ie.classList.add("selected"),t.selectedDateElem=Ie,t.config.mode==="range"&&(pn(Ie,"startRange",t.selectedDates[0]&&En(Z,t.selectedDates[0],!0)===0),pn(Ie,"endRange",t.selectedDates[1]&&En(Z,t.selectedDates[1],!0)===0),W==="nextMonthDay"&&Ie.classList.add("inRange")))):Ie.classList.add("flatpickr-disabled"),t.config.mode==="range"&&xe(Z)&&!Bt(Z)&&Ie.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&W!=="prevMonthDay"&&le%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(Z)+""),ke("onDayCreate",Ie),Ie}function E(W){W.focus(),t.config.mode==="range"&&Ye(W)}function D(W){for(var Z=W>0?0:t.config.showMonths-1,ie=W>0?t.config.showMonths:-1,le=Z;le!=ie;le+=W)for(var $e=t.daysContainer.children[le],Ie=W>0?0:$e.children.length-1,Le=W>0?$e.children.length:-1,Ee=Ie;Ee!=Le;Ee+=W){var Ue=$e.children[Ee];if(Ue.className.indexOf("hidden")===-1&&Te(Ue.dateObj))return Ue}}function I(W,Z){for(var ie=W.className.indexOf("Month")===-1?W.dateObj.getMonth():t.currentMonth,le=Z>0?t.config.showMonths:-1,$e=Z>0?1:-1,Ie=ie-t.currentMonth;Ie!=le;Ie+=$e)for(var Le=t.daysContainer.children[Ie],Ee=ie-t.currentMonth===Ie?W.$i+Z:Z<0?Le.children.length-1:0,Ue=Le.children.length,Ne=Ee;Ne>=0&&Ne0?Ue:-1);Ne+=$e){var Be=Le.children[Ne];if(Be.className.indexOf("hidden")===-1&&Te(Be.dateObj)&&Math.abs(W.$i-Ne)>=Math.abs(Z))return E(Be)}t.changeMonth($e),P(D($e),0)}function P(W,Z){var ie=l(),le=Je(ie||document.body),$e=W!==void 0?W:le?ie:t.selectedDateElem!==void 0&&Je(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Je(t.todayDateElem)?t.todayDateElem:D(Z>0?1:-1);$e===void 0?t._input.focus():le?I($e,Z):E($e)}function F(W,Z){for(var ie=(new Date(W,Z,1).getDay()-t.l10n.firstDayOfWeek+7)%7,le=t.utils.getDaysInMonth((Z-1+12)%12,W),$e=t.utils.getDaysInMonth(Z,W),Ie=window.document.createDocumentFragment(),Le=t.config.showMonths>1,Ee=Le?"prevMonthDay hidden":"prevMonthDay",Ue=Le?"nextMonthDay hidden":"nextMonthDay",Ne=le+1-ie,Be=0;Ne<=le;Ne++,Be++)Ie.appendChild(M("flatpickr-day "+Ee,new Date(W,Z-1,Ne),Ne,Be));for(Ne=1;Ne<=$e;Ne++,Be++)Ie.appendChild(M("flatpickr-day",new Date(W,Z,Ne),Ne,Be));for(var kt=$e+1;kt<=42-ie&&(t.config.showMonths===1||Be%7!==0);kt++,Be++)Ie.appendChild(M("flatpickr-day "+Ue,new Date(W,Z+1,kt%$e),kt,Be));var li=ut("div","dayContainer");return li.appendChild(Ie),li}function N(){if(t.daysContainer!==void 0){xl(t.daysContainer),t.weekNumbers&&xl(t.weekNumbers);for(var W=document.createDocumentFragment(),Z=0;Z1||t.config.monthSelectorType!=="dropdown")){var W=function(le){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&let.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var Z=0;Z<12;Z++)if(W(Z)){var ie=ut("option","flatpickr-monthDropdown-month");ie.value=new Date(t.currentYear,Z).getMonth().toString(),ie.textContent=Lo(Z,t.config.shorthandCurrentMonth,t.l10n),ie.tabIndex=-1,t.currentMonth===Z&&(ie.selected=!0),t.monthsDropdownContainer.appendChild(ie)}}}function q(){var W=ut("div","flatpickr-month"),Z=window.document.createDocumentFragment(),ie;t.config.showMonths>1||t.config.monthSelectorType==="static"?ie=ut("span","cur-month"):(t.monthsDropdownContainer=ut("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),h(t.monthsDropdownContainer,"change",function(Le){var Ee=On(Le),Ue=parseInt(Ee.value,10);t.changeMonth(Ue-t.currentMonth),ke("onMonthChange")}),R(),ie=t.monthsDropdownContainer);var le=eo("cur-year",{tabindex:"-1"}),$e=le.getElementsByTagName("input")[0];$e.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&$e.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&($e.setAttribute("max",t.config.maxDate.getFullYear().toString()),$e.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Ie=ut("div","flatpickr-current-month");return Ie.appendChild(ie),Ie.appendChild(le),Z.appendChild(Ie),W.appendChild(Z),{container:W,yearElement:$e,monthElement:ie}}function B(){xl(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var W=t.config.showMonths;W--;){var Z=q();t.yearElements.push(Z.yearElement),t.monthElements.push(Z.monthElement),t.monthNav.appendChild(Z.container)}t.monthNav.appendChild(t.nextMonthNav)}function K(){return t.monthNav=ut("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ut("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ut("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,B(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(W){t.__hidePrevMonthArrow!==W&&(pn(t.prevMonthNav,"flatpickr-disabled",W),t.__hidePrevMonthArrow=W)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(W){t.__hideNextMonthArrow!==W&&(pn(t.nextMonthNav,"flatpickr-disabled",W),t.__hideNextMonthArrow=W)}}),t.currentYearElement=t.yearElements[0],rn(),t.monthNav}function J(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var W=Dr(t.config);t.timeContainer=ut("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var Z=ut("span","flatpickr-time-separator",":"),ie=eo("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ie.getElementsByTagName("input")[0];var le=eo("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=le.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=bn(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?W.hours:u(W.hours)),t.minuteElement.value=bn(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():W.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ie),t.timeContainer.appendChild(Z),t.timeContainer.appendChild(le),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var $e=eo("flatpickr-second");t.secondElement=$e.getElementsByTagName("input")[0],t.secondElement.value=bn(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():W.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ut("span","flatpickr-time-separator",":")),t.timeContainer.appendChild($e)}return t.config.time_24hr||(t.amPM=ut("span","flatpickr-am-pm",t.l10n.amPM[Vn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function X(){t.weekdayContainer?xl(t.weekdayContainer):t.weekdayContainer=ut("div","flatpickr-weekdays");for(var W=t.config.showMonths;W--;){var Z=ut("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(Z)}return G(),t.weekdayContainer}function G(){if(t.weekdayContainer){var W=t.l10n.firstDayOfWeek,Z=Zc(t.l10n.weekdays.shorthand);W>0&&W - `+Z.join("")+` - - `}}function fe(){t.calendarContainer.classList.add("hasWeeks");var W=ut("div","flatpickr-weekwrapper");W.appendChild(ut("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=ut("div","flatpickr-weeks");return W.appendChild(Z),{weekWrapper:W,weekNumbers:Z}}function ee(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,ke("onYearChange"),R()),N(),ke("onMonthChange"),rn())}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),le=ie.hours,$e=ie.minutes,Ie=ie.seconds;m(le,$e,Ie)}t.redraw(),W&&ke("onChange")}function Oe(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),ke("onClose")}function Pe(){t.config!==void 0&&ke("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 Ve(W){return t.calendarContainer.contains(W)}function ze(W){if(t.isOpen&&!t.config.inline){var Z=On(W),ie=Ve(Z),le=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)),$e=!le&&!ie&&!Ve(W.relatedTarget),Ie=!t.config.ignoredFocusElements.some(function(Le){return Le.contains(Z)});$e&&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 we(W){if(!(!W||t.config.minDate&&Wt.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(),ke("onYearChange"),R())}}function Te(W,Z){var ie;Z===void 0&&(Z=!0);var le=t.parseDate(W,void 0,Z);if(t.config.minDate&&le&&En(le,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&le&&En(le,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(le===void 0)return!1;for(var $e=!!t.config.enable,Ie=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,Le=0,Ee=void 0;Le=Ee.from.getTime()&&le.getTime()<=Ee.to.getTime())return $e}return!$e}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()!==Zt();Z&&ie&&!(W.relatedTarget&&Ve(W.relatedTarget))&&t.setDate(t._input.value,!0,W.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ze(W){var Z=On(W),ie=t.config.wrap?n.contains(Z):Z===t._input,le=t.config.allowInput,$e=t.isOpen&&(!le||!ie),Ie=t.config.inline&&ie&&!le;if(W.keyCode===13&&ie){if(le)return t.setDate(t._input.value,!0,Z===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),Z.blur();t.open()}else if(Ve(Z)||$e||Ie){var Le=!!t.timeContainer&&t.timeContainer.contains(Z);switch(W.keyCode){case 13:Le?(W.preventDefault(),a(),gn()):Sn(W);break;case 27:W.preventDefault(),gn();break;case 8:case 46:ie&&!t.config.allowInput&&(W.preventDefault(),t.clear());break;case 37:case 39:if(!Le&&!ie){W.preventDefault();var Ee=l();if(t.daysContainer!==void 0&&(le===!1||Ee&&Je(Ee))){var Ue=W.keyCode===39?1:-1;W.ctrlKey?(W.stopPropagation(),ee(Ue),P(D(1),0)):P(void 0,Ue)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:W.preventDefault();var Ne=W.keyCode===40?1:-1;t.daysContainer&&Z.$i!==void 0||Z===t.input||Z===t.altInput?W.ctrlKey?(W.stopPropagation(),we(t.currentYear-Ne),P(D(1),0)):Le||P(void 0,Ne*7):Z===t.currentYearElement?we(t.currentYear-Ne):t.config.enableTime&&(!Le&&t.hourElement&&t.hourElement.focus(),a(W),t._debouncedChange());break;case 9:if(Le){var Be=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Mn){return Mn}),kt=Be.indexOf(Z);if(kt!==-1){var li=Be[kt+(W.shiftKey?-1:1)];W.preventDefault(),(li||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(Z)&&W.shiftKey&&(W.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&Z===t.amPM)switch(W.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),tn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),tn();break}(ie||Ve(Z))&&ke("onKeyDown",W)}function Ye(W,Z){if(Z===void 0&&(Z="flatpickr-day"),!(t.selectedDates.length!==1||W&&(!W.classList.contains(Z)||W.classList.contains("flatpickr-disabled")))){for(var ie=W?W.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),le=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),$e=Math.min(ie,t.selectedDates[0].getTime()),Ie=Math.max(ie,t.selectedDates[0].getTime()),Le=!1,Ee=0,Ue=0,Ne=$e;Ne$e&&NeEe)?Ee=Ne:Ne>le&&(!Ue||Ne ."+Z));Be.forEach(function(kt){var li=kt.dateObj,Mn=li.getTime(),qs=Ee>0&&Mn0&&Mn>Ue;if(qs){kt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(us){kt.classList.remove(us)});return}else if(Le&&!qs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(us){kt.classList.remove(us)}),W!==void 0&&(W.classList.add(ie<=t.selectedDates[0].getTime()?"startRange":"endRange"),leie&&Mn===le&&kt.classList.add("endRange"),Mn>=Ee&&(Ue===0||Mn<=Ue)&&H$(Mn,le,ie)&&kt.classList.add("inRange"))})}}function wt(){t.isOpen&&!t.config.static&&!t.config.inline&&Lt()}function me(W,Z){if(Z===void 0&&(Z=t._positionElement),t.isMobile===!0){if(W){W.preventDefault();var ie=On(W);ie&&ie.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),ke("onOpen");return}else if(t._input.disabled||t.config.inline)return;var le=t.isOpen;t.isOpen=!0,le||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),ke("onOpen"),Lt(Z)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(W===void 0||!t.timeContainer.contains(W.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function ve(W){return function(Z){var ie=t.config["_"+W+"Date"]=t.parseDate(Z,t.config.dateFormat),le=t.config["_"+(W==="min"?"max":"min")+"Date"];ie!==void 0&&(t[W==="min"?"minDateHasTime":"maxDateHasTime"]=ie.getHours()>0||ie.getMinutes()>0||ie.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function($e){return Te($e)}),!t.selectedDates.length&&W==="min"&&d(ie),tn()),t.daysContainer&&(rt(),ie!==void 0?t.currentYearElement[W]=ie.getFullYear().toString():t.currentYearElement.removeAttribute(W),t.currentYearElement.disabled=!!le&&ie!==void 0&&le.getFullYear()===ie.getFullYear())}}function Ke(){var W=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],Z=fn(fn({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ie={};t.config.parseDate=Z.parseDate,t.config.formatDate=Z.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Be){t.config._enable=Cn(Be)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Be){t.config._disable=Cn(Be)}});var le=Z.mode==="time";if(!Z.dateFormat&&(Z.enableTime||le)){var $e=Wt.defaultConfig.dateFormat||ws.dateFormat;ie.dateFormat=Z.noCalendar||le?"H:i"+(Z.enableSeconds?":S":""):$e+" H:i"+(Z.enableSeconds?":S":"")}if(Z.altInput&&(Z.enableTime||le)&&!Z.altFormat){var Ie=Wt.defaultConfig.altFormat||ws.altFormat;ie.altFormat=Z.noCalendar||le?"h:i"+(Z.enableSeconds?":S K":" K"):Ie+(" h:i"+(Z.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:ve("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:ve("max")});var Le=function(Be){return function(kt){t.config[Be==="min"?"_minTime":"_maxTime"]=t.parseDate(kt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Le("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Le("max")}),Z.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ie,Z);for(var Ee=0;Ee-1?t.config[Ne]=Mr(Ue[Ne]).map(o).concat(t.config[Ne]):typeof Z[Ne]>"u"&&(t.config[Ne]=Ue[Ne])}Z.altInputClass||(t.config.altInputClass=Me().className+" "+t.config.altInputClass),ke("onParseConfig")}function Me(){return t.config.wrap?n.querySelector("[data-input]"):n}function mt(){typeof t.config.locale!="object"&&typeof Wt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=fn(fn({},Wt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Wt.l10ns[t.config.locale]:void 0),Qi.D="("+t.l10n.weekdays.shorthand.join("|")+")",Qi.l="("+t.l10n.weekdays.longhand.join("|")+")",Qi.M="("+t.l10n.months.shorthand.join("|")+")",Qi.F="("+t.l10n.months.longhand.join("|")+")",Qi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var W=fn(fn({},e),JSON.parse(JSON.stringify(n.dataset||{})));W.time_24hr===void 0&&Wt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=g1(t),t.parseDate=ua({config:t.config,l10n:t.l10n})}function Lt(W){if(typeof t.config.position=="function")return void t.config.position(t,W);if(t.calendarContainer!==void 0){ke("onPreCalendarPosition");var Z=W||t._positionElement,ie=Array.prototype.reduce.call(t.calendarContainer.children,function(L1,P1){return L1+P1.offsetHeight},0),le=t.calendarContainer.offsetWidth,$e=t.config.position.split(" "),Ie=$e[0],Le=$e.length>1?$e[1]:null,Ee=Z.getBoundingClientRect(),Ue=window.innerHeight-Ee.bottom,Ne=Ie==="above"||Ie!=="below"&&Ueie,Be=window.pageYOffset+Ee.top+(Ne?-ie-2:Z.offsetHeight+2);if(pn(t.calendarContainer,"arrowTop",!Ne),pn(t.calendarContainer,"arrowBottom",Ne),!t.config.inline){var kt=window.pageXOffset+Ee.left,li=!1,Mn=!1;Le==="center"?(kt-=(le-Ee.width)/2,li=!0):Le==="right"&&(kt-=le-Ee.width,Mn=!0),pn(t.calendarContainer,"arrowLeft",!li&&!Mn),pn(t.calendarContainer,"arrowCenter",li),pn(t.calendarContainer,"arrowRight",Mn);var qs=window.document.body.offsetWidth-(window.pageXOffset+Ee.right),us=kt+le>window.document.body.offsetWidth,T1=qs+le>window.document.body.offsetWidth;if(pn(t.calendarContainer,"rightMost",us),!t.config.static)if(t.calendarContainer.style.top=Be+"px",!us)t.calendarContainer.style.left=kt+"px",t.calendarContainer.style.right="auto";else if(!T1)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=qs+"px";else{var xo=on();if(xo===void 0)return;var M1=window.document.body.offsetWidth,O1=Math.max(0,M1/2-le/2),E1=".flatpickr-calendar.centerMost:before",D1=".flatpickr-calendar.centerMost:after",A1=xo.cssRules.length,I1="{left:"+Ee.left+"px;right:auto;}";pn(t.calendarContainer,"rightMost",!1),pn(t.calendarContainer,"centerMost",!0),xo.insertRule(E1+","+D1+I1,A1),t.calendarContainer.style.left=O1+"px",t.calendarContainer.style.right="auto"}}}}function on(){for(var W=null,Z=0;Zt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=le,t.config.mode==="single")t.selectedDates=[$e];else if(t.config.mode==="multiple"){var Le=Bt($e);Le?t.selectedDates.splice(parseInt(Le),1):t.selectedDates.push($e)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=$e,t.selectedDates.push($e),En($e,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Be,kt){return Be.getTime()-kt.getTime()}));if(c(),Ie){var Ee=t.currentYear!==$e.getFullYear();t.currentYear=$e.getFullYear(),t.currentMonth=$e.getMonth(),Ee&&(ke("onYearChange"),R()),ke("onMonthChange")}if(rn(),N(),tn(),!Ie&&t.config.mode!=="range"&&t.config.showMonths===1?E(le):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ue=t.config.mode==="single"&&!t.config.enableTime,Ne=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ue||Ne)&&gn()}g()}}var $n={locale:[mt,G],showMonths:[B,r,X],minDate:[S],maxDate:[S],positionElement:[Jt],clickOpens:[function(){t.config.clickOpens===!0?(h(t._input,"focus",t.open),h(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function si(W,Z){if(W!==null&&typeof W=="object"){Object.assign(t.config,W);for(var ie in W)$n[ie]!==void 0&&$n[ie].forEach(function(le){return le()})}else t.config[W]=Z,$n[W]!==void 0?$n[W].forEach(function(le){return le()}):Tr.indexOf(W)>-1&&(t.config[W]=Mr(Z));t.redraw(),tn(!0)}function Zn(W,Z){var ie=[];if(W instanceof Array)ie=W.map(function(le){return t.parseDate(le,Z)});else if(W instanceof Date||typeof W=="number")ie=[t.parseDate(W,Z)];else if(typeof W=="string")switch(t.config.mode){case"single":case"time":ie=[t.parseDate(W,Z)];break;case"multiple":ie=W.split(t.config.conjunction).map(function(le){return t.parseDate(le,Z)});break;case"range":ie=W.split(t.l10n.rangeSeparator).map(function(le){return t.parseDate(le,Z)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(W)));t.selectedDates=t.config.allowInvalidPreload?ie:ie.filter(function(le){return le instanceof Date&&Te(le,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(le,$e){return le.getTime()-$e.getTime()})}function mi(W,Z,ie){if(Z===void 0&&(Z=!1),ie===void 0&&(ie=t.config.dateFormat),W!==0&&!W||W instanceof Array&&W.length===0)return t.clear(Z);Zn(W,ie),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),S(void 0,Z),d(),t.selectedDates.length===0&&t.clear(!1),tn(Z),Z&&ke("onChange")}function Cn(W){return W.slice().map(function(Z){return typeof Z=="string"||typeof Z=="number"||Z instanceof Date?t.parseDate(Z,void 0,!0):Z&&typeof Z=="object"&&Z.from&&Z.to?{from:t.parseDate(Z.from,void 0),to:t.parseDate(Z.to,void 0)}:Z}).filter(function(Z){return Z})}function ct(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var W=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);W&&Zn(W,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Tn(){if(t.input=Me(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=ut(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Jt()}function Jt(){t._positionElement=t.config.positionElement||t._input}function Gn(){var W=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=ut("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=W,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=W==="datetime-local"?"Y-m-d\\TH:i:S":W==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}h(t.mobileInput,"change",function(Z){t.setDate(On(Z).value,!1,t.mobileFormatStr),ke("onChange"),ke("onClose")})}function he(W){if(t.isOpen===!0)return t.close();t.open(W)}function ke(W,Z){if(t.config!==void 0){var ie=t.config[W];if(ie!==void 0&&ie.length>0)for(var le=0;ie[le]&&le=0&&En(W,t.selectedDates[1])<=0}function rn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(W,Z){var ie=new Date(t.currentYear,t.currentMonth,1);ie.setMonth(t.currentMonth+Z),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[Z].textContent=Lo(ie.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ie.getMonth().toString(),W.value=ie.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Zt(W){var Z=W||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ie){return t.formatDate(ie,Z)}).filter(function(ie,le,$e){return t.config.mode!=="range"||t.config.enableTime||$e.indexOf(ie)===le}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function tn(W){W===void 0&&(W=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Zt(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Zt(t.config.altFormat)),W!==!1&&ke("onValueUpdate")}function dn(W){var Z=On(W),ie=t.prevMonthNav.contains(Z),le=t.nextMonthNav.contains(Z);ie||le?ee(ie?-1:1):t.yearElements.indexOf(Z)>=0?Z.select():Z.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):Z.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Il(W){W.preventDefault();var Z=W.type==="keydown",ie=On(W),le=ie;t.amPM!==void 0&&ie===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]);var $e=parseFloat(le.getAttribute("min")),Ie=parseFloat(le.getAttribute("max")),Le=parseFloat(le.getAttribute("step")),Ee=parseInt(le.value,10),Ue=W.delta||(Z?W.which===38?1:-1:0),Ne=Ee+Le*Ue;if(typeof le.value<"u"&&le.value.length===2){var Be=le===t.hourElement,kt=le===t.minuteElement;Ne<$e?(Ne=Ie+Ne+Vn(!Be)+(Vn(Be)&&Vn(!t.amPM)),kt&&$(void 0,-1,t.hourElement)):Ne>Ie&&(Ne=le===t.hourElement?Ne-Ie-Vn(!t.amPM):$e,kt&&$(void 0,1,t.hourElement)),t.amPM&&Be&&(Le===1?Ne+Ee===23:Math.abs(Ne-Ee)>Le)&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]),le.value=bn(Ne)}}return s(),t}function Ss(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function G$(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=Qe(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:f="",element:u=void 0,dateFormat:c=void 0}=e,{options:d={}}=e,m=!1,{input:_=void 0,flatpickr:h=void 0}=e;Kt(()=>{const $=u??_,T=y(d);return T.onReady.push((M,E,D)=>{a===void 0&&S(M,E,D),sn().then(()=>{t(8,m=!0)})}),t(3,h=Wt($,Object.assign(T,u?{wrap:!0}:{}))),()=>{h.destroy()}});const g=yt();function y($={}){$=Object.assign({},$);for(const T of r){const M=(E,D,I)=>{g(Z$(T),[E,D,I])};T in $?(Array.isArray($[T])||($[T]=[$[T]]),$[T].push(M)):$[T]=[M]}return $.onChange&&!$.onChange.includes(S)&&$.onChange.push(S),$}function S($,T,M){const E=Gc(M,$);!Xc(a,E)&&(a||E)&&t(2,a=E),t(4,f=T)}function C($){ne[$?"unshift":"push"](()=>{_=$,t(0,_)})}return n.$$set=$=>{e=qe(qe({},e),Xt($)),t(1,s=Qe(e,i)),"value"in $&&t(2,a=$.value),"formattedValue"in $&&t(4,f=$.formattedValue),"element"in $&&t(5,u=$.element),"dateFormat"in $&&t(6,c=$.dateFormat),"options"in $&&t(7,d=$.options),"input"in $&&t(0,_=$.input),"flatpickr"in $&&t(3,h=$.flatpickr),"$$scope"in $&&t(9,o=$.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&h&&m&&(Xc(a,Gc(h,h.selectedDates))||h.setDate(a,!0,c)),n.$$.dirty&392&&h&&m)for(const[$,T]of Object.entries(y(d)))h.set($,T)},[_,s,a,h,f,u,c,d,m,o,l,C]}class tf extends be{constructor(e){super(),ge(this,e,G$,J$,pe,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function X$(n){let e,t,i,s,l,o,r,a;function f(d){n[6](d)}function u(d){n[7](d)}let c={id:n[15],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(c.value=n[2]),n[0].options.min!==void 0&&(c.formattedValue=n[0].options.min),l=new tf({props:c}),ne.push(()=>de(l,"value",f)),ne.push(()=>de(l,"formattedValue",u)),l.$on("close",n[8]),{c(){e=v("label"),t=U("Min date (UTC)"),s=O(),z(l.$$.fragment),p(e,"for",i=n[15])},m(d,m){w(d,e,m),b(e,t),w(d,s,m),j(l,d,m),a=!0},p(d,m){(!a||m&32768&&i!==(i=d[15]))&&p(e,"for",i);const _={};m&32768&&(_.id=d[15]),!o&&m&4&&(o=!0,_.value=d[2],_e(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=d[0].options.min,_e(()=>r=!1)),l.$set(_)},i(d){a||(A(l.$$.fragment,d),a=!0)},o(d){L(l.$$.fragment,d),a=!1},d(d){d&&k(e),d&&k(s),V(l,d)}}}function Q$(n){let e,t,i,s,l,o,r,a;function f(d){n[9](d)}function u(d){n[10](d)}let c={id:n[15],options:H.defaultFlatpickrOptions()};return n[3]!==void 0&&(c.value=n[3]),n[0].options.max!==void 0&&(c.formattedValue=n[0].options.max),l=new tf({props:c}),ne.push(()=>de(l,"value",f)),ne.push(()=>de(l,"formattedValue",u)),l.$on("close",n[11]),{c(){e=v("label"),t=U("Max date (UTC)"),s=O(),z(l.$$.fragment),p(e,"for",i=n[15])},m(d,m){w(d,e,m),b(e,t),w(d,s,m),j(l,d,m),a=!0},p(d,m){(!a||m&32768&&i!==(i=d[15]))&&p(e,"for",i);const _={};m&32768&&(_.id=d[15]),!o&&m&8&&(o=!0,_.value=d[3],_e(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=d[0].options.max,_e(()=>r=!1)),l.$set(_)},i(d){a||(A(l.$$.fragment,d),a=!0)},o(d){L(l.$$.fragment,d),a=!1},d(d){d&&k(e),d&&k(s),V(l,d)}}}function x$(n){let e,t,i,s,l,o,r;return i=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[X$,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[Q$,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(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),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,f){const u={};f&2&&(u.name="schema."+a[1]+".options.min"),f&98309&&(u.$$scope={dirty:f,ctx:a}),i.$set(u);const c={};f&2&&(c.name="schema."+a[1]+".options.max"),f&98313&&(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),V(i),V(o)}}}function eC(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[12](r)}let o={$$slots:{options:[x$]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[13]),e.$on("remove",n[14]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&34?At(s,[a&2&&{key:r[1]},a&32&&Qt(r[5])]):{};a&65551&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function tC(n,e,t){var C,$;const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e,r=(C=l==null?void 0:l.options)==null?void 0:C.min,a=($=l==null?void 0:l.options)==null?void 0:$.max;function f(T,M){T.detail&&T.detail.length==3&&t(0,l.options[M]=T.detail[1],l)}function u(T){r=T,t(2,r),t(0,l)}function c(T){n.$$.not_equal(l.options.min,T)&&(l.options.min=T,t(0,l))}const d=T=>f(T,"min");function m(T){a=T,t(3,a),t(0,l)}function _(T){n.$$.not_equal(l.options.max,T)&&(l.options.max=T,t(0,l))}const h=T=>f(T,"max");function g(T){l=T,t(0,l)}function y(T){Fe.call(this,n,T)}function S(T){Fe.call(this,n,T)}return n.$$set=T=>{e=qe(qe({},e),Xt(T)),t(5,s=Qe(e,i)),"field"in T&&t(0,l=T.field),"key"in T&&t(1,o=T.key)},n.$$.update=()=>{var T,M,E,D;n.$$.dirty&5&&r!=((T=l==null?void 0:l.options)==null?void 0:T.min)&&t(2,r=(M=l==null?void 0:l.options)==null?void 0:M.min),n.$$.dirty&9&&a!=((E=l==null?void 0:l.options)==null?void 0:E.max)&&t(3,a=(D=l==null?void 0:l.options)==null?void 0:D.max)},[l,o,r,a,f,s,u,c,d,m,_,h,g,y,S]}class nC extends be{constructor(e){super(),ge(this,e,tC,eC,pe,{field:0,key:1})}}const iC=n=>({}),Qc=n=>({});function xc(n,e,t){const i=n.slice();return i[47]=e[t],i}const sC=n=>({}),ed=n=>({});function td(n,e,t){const i=n.slice();return i[47]=e[t],i[51]=t,i}function nd(n){let e,t,i;return{c(){e=v("div"),t=U(n[2]),i=O(),p(e,"class","block txt-placeholder"),Q(e,"link-hint",!n[5]&&!n[6])},m(s,l){w(s,e,l),b(e,t),b(e,i)},p(s,l){l[0]&4&&se(t,s[2]),l[0]&96&&Q(e,"link-hint",!s[5]&&!s[6])},d(s){s&&k(e)}}}function lC(n){let e,t=n[47]+"",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt")},m(s,l){w(s,e,l),b(e,i)},p(s,l){l[0]&1&&t!==(t=s[47]+"")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function oC(n){let e,t,i;const s=[{item:n[47]},n[10]];var l=n[9];function o(r){let a={};for(let f=0;f{V(u,1)}),ae()}l?(e=Ot(l,o()),z(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(f)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function id(n){let e,t,i;function s(){return n[35](n[47])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){w(l,e,o),t||(i=[Se(je.call(null,e,"Clear")),Y(e,"click",Pn(Xe(s)))],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Ce(i)}}}function sd(n){let e,t,i,s,l,o;const r=[oC,lC],a=[];function f(c,d){return c[9]?0:1}t=f(n),i=a[t]=r[t](n);let u=(n[4]||n[7])&&id(n);return{c(){e=v("div"),i.c(),s=O(),u&&u.c(),l=O(),p(e,"class","option")},m(c,d){w(c,e,d),a[t].m(e,null),b(e,s),u&&u.m(e,null),b(e,l),o=!0},p(c,d){let m=t;t=f(c),t===m?a[t].p(c,d):(re(),L(a[m],1,1,()=>{a[m]=null}),ae(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[7]?u?u.p(c,d):(u=id(c),u.c(),u.m(e,l)):u&&(u.d(1),u=null)},i(c){o||(A(i),o=!0)},o(c){L(i),o=!1},d(c){c&&k(e),a[t].d(),u&&u.d()}}}function ld(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[19],$$slots:{default:[fC]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[40](e),e.$on("show",n[25]),e.$on("hide",n[41]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&524288&&(o.trigger=s[19]),l[0]&3225866|l[1]&4096&&(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[40](null),V(e,s)}}}function od(n){let e,t,i,s,l,o,r,a,f=n[16].length&&rd(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=O(),l=v("input"),o=O(),f&&f.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(u,c){w(u,e,c),b(e,t),b(t,i),b(t,s),b(t,l),oe(l,n[16]),b(t,o),f&&f.m(t,null),l.focus(),r||(a=Y(l,"input",n[37]),r=!0)},p(u,c){c[0]&8&&p(l,"placeholder",u[3]),c[0]&65536&&l.value!==u[16]&&oe(l,u[16]),u[16].length?f?f.p(u,c):(f=rd(u),f.c(),f.m(t,null)):f&&(f.d(1),f=null)},d(u){u&&k(e),f&&f.d(),r=!1,a()}}}function rd(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent clear"),p(e,"class","addon suffix p-r-5")},m(l,o){w(l,e,o),b(e,t),i||(s=Y(t,"click",Pn(Xe(n[22]))),i=!0)},p:x,d(l){l&&k(e),i=!1,s()}}}function ad(n){let e,t=n[1]&&fd(n);return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=fd(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function fd(n){let e,t;return{c(){e=v("div"),t=U(n[1]),p(e,"class","txt-missing")},m(i,s){w(i,e,s),b(e,t)},p(i,s){s[0]&2&&se(t,i[1])},d(i){i&&k(e)}}}function rC(n){let e=n[47]+"",t;return{c(){t=U(e)},m(i,s){w(i,t,s)},p(i,s){s[0]&2097152&&e!==(e=i[47]+"")&&se(t,e)},i:x,o:x,d(i){i&&k(t)}}}function aC(n){let e,t,i;const s=[{item:n[47]},n[12]];var l=n[11];function o(r){let a={};for(let f=0;f{V(u,1)}),ae()}l?(e=Ot(l,o()),z(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(f)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function ud(n){let e,t,i,s,l,o,r;const a=[aC,rC],f=[];function u(m,_){return m[11]?0:1}t=u(n),i=f[t]=a[t](n);function c(...m){return n[38](n[47],...m)}function d(...m){return n[39](n[47],...m)}return{c(){e=v("div"),i.c(),s=O(),p(e,"tabindex","0"),p(e,"class","dropdown-item option"),Q(e,"closable",n[8]),Q(e,"selected",n[20](n[47]))},m(m,_){w(m,e,_),f[t].m(e,null),b(e,s),l=!0,o||(r=[Y(e,"click",c),Y(e,"keydown",d)],o=!0)},p(m,_){n=m;let h=t;t=u(n),t===h?f[t].p(n,_):(re(),L(f[h],1,1,()=>{f[h]=null}),ae(),i=f[t],i?i.p(n,_):(i=f[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||_[0]&256)&&Q(e,"closable",n[8]),(!l||_[0]&3145728)&&Q(e,"selected",n[20](n[47]))},i(m){l||(A(i),l=!0)},o(m){L(i),l=!1},d(m){m&&k(e),f[t].d(),o=!1,Ce(r)}}}function fC(n){let e,t,i,s,l,o=n[13]&&od(n);const r=n[34].beforeOptions,a=$t(r,n,n[43],ed);let f=n[21],u=[];for(let h=0;hL(u[h],1,1,()=>{u[h]=null});let d=null;f.length||(d=ad(n));const m=n[34].afterOptions,_=$t(m,n,n[43],Qc);return{c(){o&&o.c(),e=O(),a&&a.c(),t=O(),i=v("div");for(let h=0;hL(a[d],1,1,()=>{a[d]=null});let u=null;r.length||(u=nd(n));let c=!n[5]&&!n[6]&&ld(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),ae()),(!o||m[0]&16384&&l!==(l="select "+d[14]))&&p(e,"class",l),(!o||m[0]&16400)&&Q(e,"multiple",d[4]),(!o||m[0]&16416)&&Q(e,"disabled",d[5]),(!o||m[0]&16448)&&Q(e,"readonly",d[6])},i(d){if(!o){for(let m=0;mKe(Me,ve))||[]}function te(me,ve){me.preventDefault(),g&&d?B(ve):q(ve)}function Oe(me,ve){(me.code==="Enter"||me.code==="Space")&&(te(me,ve),y&&X())}function Pe(){fe(),setTimeout(()=>{const me=F==null?void 0:F.querySelector(".dropdown-item.option.selected");me&&(me.focus(),me.scrollIntoView({block:"nearest"}))},0)}function Ve(me){me.stopPropagation(),!_&&!m&&(I==null||I.toggle())}Kt(()=>{const me=document.querySelectorAll(`label[for="${r}"]`);for(const ve of me)ve.addEventListener("click",Ve);return()=>{for(const ve of me)ve.removeEventListener("click",Ve)}});const ze=me=>R(me);function we(me){ne[me?"unshift":"push"](()=>{N=me,t(19,N)})}function Te(){P=this.value,t(16,P)}const Je=(me,ve)=>te(ve,me),gt=(me,ve)=>Oe(ve,me);function Ze(me){ne[me?"unshift":"push"](()=>{I=me,t(17,I)})}function Ye(me){Fe.call(this,n,me)}function wt(me){ne[me?"unshift":"push"](()=>{F=me,t(18,F)})}return n.$$set=me=>{"id"in me&&t(26,r=me.id),"noOptionsText"in me&&t(1,a=me.noOptionsText),"selectPlaceholder"in me&&t(2,f=me.selectPlaceholder),"searchPlaceholder"in me&&t(3,u=me.searchPlaceholder),"items"in me&&t(27,c=me.items),"multiple"in me&&t(4,d=me.multiple),"disabled"in me&&t(5,m=me.disabled),"readonly"in me&&t(6,_=me.readonly),"selected"in me&&t(0,h=me.selected),"toggle"in me&&t(7,g=me.toggle),"closable"in me&&t(8,y=me.closable),"labelComponent"in me&&t(9,S=me.labelComponent),"labelComponentProps"in me&&t(10,C=me.labelComponentProps),"optionComponent"in me&&t(11,$=me.optionComponent),"optionComponentProps"in me&&t(12,T=me.optionComponentProps),"searchable"in me&&t(13,M=me.searchable),"searchFunc"in me&&t(28,E=me.searchFunc),"class"in me&&t(14,D=me.class),"$$scope"in me&&t(43,o=me.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&134217728&&c&&(G(),fe()),n.$$.dirty[0]&134283264&&t(21,i=ee(c,P)),n.$$.dirty[0]&1&&t(20,s=function(me){const ve=H.toArray(h);return H.inArray(ve,me)})},[h,a,f,u,d,m,_,g,y,S,C,$,T,M,D,R,P,I,F,N,s,i,fe,te,Oe,Pe,r,c,E,q,B,K,J,X,l,ze,we,Te,Je,gt,Ze,Ye,wt,o]}class b1 extends be{constructor(e){super(),ge(this,e,dC,uC,pe,{id:26,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:27,multiple:4,disabled:5,readonly:6,selected:0,toggle:7,closable:8,labelComponent:9,labelComponentProps:10,optionComponent:11,optionComponentProps:12,searchable:13,searchFunc:28,class:14,deselectItem:15,selectItem:29,toggleItem:30,reset:31,showDropdown:32,hideDropdown:33},null,[-1,-1])}get deselectItem(){return this.$$.ctx[15]}get selectItem(){return this.$$.ctx[29]}get toggleItem(){return this.$$.ctx[30]}get reset(){return this.$$.ctx[31]}get showDropdown(){return this.$$.ctx[32]}get hideDropdown(){return this.$$.ctx[33]}}function cd(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&k(e)}}}function pC(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&cd(n);return{c(){l&&l.c(),e=O(),t=v("span"),s=U(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),w(o,e,r),w(o,t,r),b(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=cd(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&se(s,i)},i:x,o:x,d(o){l&&l.d(o),o&&k(e),o&&k(t)}}}function mC(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class dd extends be{constructor(e){super(),ge(this,e,mC,pC,pe,{item:0})}}const hC=n=>({}),pd=n=>({});function _C(n){let e;const t=n[8].afterOptions,i=$t(t,n,n[12],pd);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&Tt(i,t,s,s[12],e?Ct(t,s[12],l,hC):Mt(s[12]),pd)},i(s){e||(A(i,s),e=!0)},o(s){L(i,s),e=!1},d(s){i&&i.d(s)}}}function gC(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[_C]},$$scope:{ctx:n}};for(let r=0;rde(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&62?At(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Qt(r[5])]):{};a&4096&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.selected=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function bC(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=Qe(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:f=a?[]:void 0}=e,{labelComponent:u=dd}=e,{optionComponent:c=dd}=e,{selectionKey:d="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function _(C){C=H.toArray(C,!0);let $=[];for(let T of C){const M=H.findByKey(r,d,T);M&&$.push(M)}C.length&&!$.length||t(0,f=a?$:$[0])}async function h(C){let $=H.toArray(C,!0).map(T=>T[d]);r.length&&t(6,m=a?$:$[0])}function g(C){f=C,t(0,f)}function y(C){Fe.call(this,n,C)}function S(C){Fe.call(this,n,C)}return n.$$set=C=>{e=qe(qe({},e),Xt(C)),t(5,s=Qe(e,i)),"items"in C&&t(1,r=C.items),"multiple"in C&&t(2,a=C.multiple),"selected"in C&&t(0,f=C.selected),"labelComponent"in C&&t(3,u=C.labelComponent),"optionComponent"in C&&t(4,c=C.optionComponent),"selectionKey"in C&&t(7,d=C.selectionKey),"keyOfSelected"in C&&t(6,m=C.keyOfSelected),"$$scope"in C&&t(12,o=C.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&_(m),n.$$.dirty&1&&h(f)},[f,r,a,u,c,s,m,d,l,g,y,S,o]}class Hi extends be{constructor(e){super(),ge(this,e,bC,gC,pe,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function vC(n){let e,t,i,s,l,o;function r(f){n[7](f)}let a={id:n[13],placeholder:"Choices: eg. optionA, optionB",required:!0,readonly:!n[14]};return n[0].options.values!==void 0&&(a.value=n[0].options.values),t=new Ns({props:a}),ne.push(()=>de(t,"value",r)),{c(){e=v("div"),z(t.$$.fragment)},m(f,u){w(f,e,u),j(t,e,null),s=!0,l||(o=Se(je.call(null,e,{text:"Choices (comma separated)",position:"top-left",delay:700})),l=!0)},p(f,u){const c={};u&8192&&(c.id=f[13]),u&16384&&(c.readonly=!f[14]),!i&&u&1&&(i=!0,c.value=f[0].options.values,_e(()=>i=!1)),t.$set(c)},i(f){s||(A(t.$$.fragment,f),s=!0)},o(f){L(t.$$.fragment,f),s=!1},d(f){f&&k(e),V(t),l=!1,o()}}}function yC(n){let e,t,i;function s(o){n[8](o)}let l={id:n[13],items:n[3],readonly:!n[14]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Hi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&8192&&(a.id=o[13]),r&16384&&(a.readonly=!o[14]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function kC(n){let e,t,i,s,l,o,r,a,f,u;return i=new ce({props:{class:"form-field required "+(n[14]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.values",$$slots:{default:[vC,({uniqueId:c})=>({13:c}),({uniqueId:c})=>c?8192:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field form-field-single-multiple-select "+(n[14]?"":"readonly"),inlineError:!0,$$slots:{default:[yC,({uniqueId:c})=>({13:c}),({uniqueId:c})=>c?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),z(i.$$.fragment),s=O(),l=v("div"),o=O(),z(r.$$.fragment),a=O(),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),j(i,c,d),w(c,s,d),w(c,l,d),w(c,o,d),j(r,c,d),w(c,a,d),w(c,f,d),u=!0},p(c,d){const m={};d&16384&&(m.class="form-field required "+(c[14]?"":"readonly")),d&2&&(m.name="schema."+c[1]+".options.values"),d&57345&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const _={};d&16384&&(_.class="form-field form-field-single-multiple-select "+(c[14]?"":"readonly")),d&57348&&(_.$$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),V(i,c),c&&k(s),c&&k(l),c&&k(o),V(r,c),c&&k(a),c&&k(f)}}}function md(n){let e,t;return e=new ce({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[wC,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.maxSelect"),s&40961&&(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){V(e,i)}}}function wC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=O(),l=v("input"),p(e,"for",i=n[13]),p(l,"id",o=n[13]),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),oe(l,n[0].options.maxSelect),r||(a=Y(l,"input",n[6]),r=!0)},p(f,u){u&8192&&i!==(i=f[13])&&p(e,"for",i),u&8192&&o!==(o=f[13])&&p(l,"id",o),u&1&&pt(l.value)!==f[0].options.maxSelect&&oe(l,f[0].options.maxSelect)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function SC(n){let e,t,i=!n[2]&&md(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[2]?i&&(re(),L(i,1,1,()=>{i=null}),ae()):i?(i.p(s,l),l&4&&A(i,1)):(i=md(s),i.c(),A(i,1),i.m(e.parentNode,e))},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function $C(n){let e,t,i;const s=[{key:n[1]},n[4]];function l(r){n[9](r)}let o={$$slots:{options:[SC],default:[kC,({interactive:r})=>({14:r}),({interactive:r})=>r?16384:0]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[10]),e.$on("remove",n[11]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&18?At(s,[a&2&&{key:r[1]},a&16&&Qt(r[4])]):{};a&49159&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function CC(n,e,t){var y;const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=((y=l.options)==null?void 0:y.maxSelect)<=1,f=a;function u(){t(0,l.options={maxSelect:1,values:[]},l),t(2,a=!0),t(5,f=a)}function c(){l.options.maxSelect=pt(this.value),t(0,l),t(5,f),t(2,a)}function d(S){n.$$.not_equal(l.options.values,S)&&(l.options.values=S,t(0,l),t(5,f),t(2,a))}function m(S){a=S,t(2,a)}function _(S){l=S,t(0,l),t(5,f),t(2,a)}function h(S){Fe.call(this,n,S)}function g(S){Fe.call(this,n,S)}return n.$$set=S=>{e=qe(qe({},e),Xt(S)),t(4,s=Qe(e,i)),"field"in S&&t(0,l=S.field),"key"in S&&t(1,o=S.key)},n.$$.update=()=>{var S,C;n.$$.dirty&37&&f!=a&&(t(5,f=a),a?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((C=(S=l.options)==null?void 0:S.values)==null?void 0:C.length)||2,l)),n.$$.dirty&1&&H.isEmpty(l.options)&&u()},[l,o,a,r,s,f,c,d,m,_,h,g]}class TC extends be{constructor(e){super(),ge(this,e,CC,$C,pe,{field:0,key:1})}}function MC(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function OC(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function hd(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T,M,E='"{"a":1,"b":2}"',D,I,P,F,N,R,q,B,K,J,X,G,fe;return{c(){e=v("div"),t=v("div"),i=v("div"),s=U("In order to support seamlessly both "),l=v("code"),l.textContent="application/json",o=U(` and - `),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=""true" is converted to the json true",h=O(),g=v("li"),g.innerHTML=""false" is converted to the json false",y=O(),S=v("li"),S.innerHTML=""null" is converted to the json null",C=O(),$=v("li"),$.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",T=O(),M=v("li"),D=U(E),I=U(" is converted to the json "),P=v("code"),P.textContent='{"a":1,"b":2}',F=O(),N=v("li"),N.textContent="numeric strings are converted to json number",R=O(),q=v("li"),q.textContent="double quoted strings are left as they are (aka. without normalizations)",B=O(),K=v("li"),K.textContent="any other string (empty string too) is double quoted",J=U(` - Alternatively, if you want to avoid the string value normalizations, you can wrap your - data inside an object, eg.`),X=v("code"),X.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(ee,te){w(ee,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,C),b(m,$),b(m,T),b(m,M),b(M,D),b(M,I),b(M,P),b(m,F),b(m,N),b(m,R),b(m,q),b(m,B),b(m,K),b(i,J),b(i,X),fe=!0},i(ee){fe||(ee&&Ge(()=>{fe&&(G||(G=Re(e,tt,{duration:150},!0)),G.run(1))}),fe=!0)},o(ee){ee&&(G||(G=Re(e,tt,{duration:150},!1)),G.run(0)),fe=!1},d(ee){ee&&k(e),ee&&G&&G.end()}}}function EC(n){let e,t,i,s,l,o,r;function a(d,m){return d[2]?OC:MC}let f=a(n),u=f(n),c=n[2]&&hd();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=O(),u.c(),s=O(),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=hd(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(re(),L(c,1,1,()=>{c=null}),ae())},d(d){d&&k(e),u.d(),d&&k(s),c&&c.d(d),d&&k(l),o=!1,r()}}}function DC(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[EC]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&10?At(s,[a&2&&{key:r[1]},a&8&&Qt(r[3])]):{};a&260&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function AC(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),Xt(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 IC extends be{constructor(e){super(),ge(this,e,AC,DC,pe,{field:0,key:1})}}function LC(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=O(),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:x,o:x,d(a){a&&k(e),a&&k(s),a&&k(l)}}}function PC(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class _d extends be{constructor(e){super(),ge(this,e,PC,LC,pe,{item:0})}}const FC=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function NC(n){let e,t,i;function s(o){n[16](o)}let l={id:n[22],items:n[4],readonly:!n[23]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Hi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&4194304&&(a.id=o[22]),r&8388608&&(a.readonly=!o[23]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function RC(n){let e,t,i,s,l,o;return i=new ce({props:{class:"form-field form-field-single-multiple-select "+(n[23]?"":"readonly"),inlineError:!0,$$slots:{default:[NC,({uniqueId:r})=>({22:r}),({uniqueId:r})=>r?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),z(i.$$.fragment),s=O(),l=v("div"),p(e,"class","separator"),p(l,"class","separator")},m(r,a){w(r,e,a),w(r,t,a),j(i,r,a),w(r,s,a),w(r,l,a),o=!0},p(r,a){const f={};a&8388608&&(f.class="form-field form-field-single-multiple-select "+(r[23]?"":"readonly")),a&29360132&&(f.$$scope={dirty:a,ctx:r}),i.$set(f)},i(r){o||(A(i.$$.fragment,r),o=!0)},o(r){L(i.$$.fragment,r),o=!1},d(r){r&&k(e),r&&k(t),V(i,r),r&&k(s),r&&k(l)}}}function qC(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=O(),i=v("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=O(),l=v("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=O(),r=v("button"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(u,c){w(u,e,c),w(u,t,c),w(u,i,c),w(u,s,c),w(u,l,c),w(u,o,c),w(u,r,c),a||(f=[Y(e,"click",n[9]),Y(i,"click",n[10]),Y(l,"click",n[11]),Y(r,"click",n[12])],a=!0)},p:x,d(u){u&&k(e),u&&k(t),u&&k(i),u&&k(s),u&&k(l),u&&k(o),u&&k(r),a=!1,Ce(f)}}}function jC(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C;function $(M){n[8](M)}let T={id:n[22],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[3],labelComponent:_d,optionComponent:_d};return n[0].options.mimeTypes!==void 0&&(T.keyOfSelected=n[0].options.mimeTypes),r=new Hi({props:T}),ne.push(()=>de(r,"keyOfSelected",$)),g=new Nn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[qC]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Allowed mime types",i=O(),s=v("i"),o=O(),z(r.$$.fragment),f=O(),u=v("div"),c=v("button"),d=v("span"),d.textContent="Choose presets",m=O(),_=v("i"),h=O(),z(g.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[22]),p(d,"class","txt link-primary"),p(_,"class","ri-arrow-drop-down-fill"),p(c,"type","button"),p(c,"class","inline-flex flex-gap-0"),p(u,"class","help-block")},m(M,E){w(M,e,E),b(e,t),b(e,i),b(e,s),w(M,o,E),j(r,M,E),w(M,f,E),w(M,u,E),b(u,c),b(c,d),b(c,m),b(c,_),b(c,h),j(g,c,null),y=!0,S||(C=Se(je.call(null,s,{text:`Allow files ONLY with the listed mime types. - Leave empty for no restriction.`,position:"top"})),S=!0)},p(M,E){(!y||E&4194304&&l!==(l=M[22]))&&p(e,"for",l);const D={};E&4194304&&(D.id=M[22]),E&8&&(D.items=M[3]),!a&&E&1&&(a=!0,D.keyOfSelected=M[0].options.mimeTypes,_e(()=>a=!1)),r.$set(D);const I={};E&16777217&&(I.$$scope={dirty:E,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),V(r,M),M&&k(f),M&&k(u),V(g),S=!1,C()}}}function VC(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH - (eg. 100x50) - crop to WxH viewbox (from center)
  • -
  • WxHt - (eg. 100x50t) - crop to WxH viewbox (from top)
  • -
  • WxHb - (eg. 100x50b) - crop to WxH viewbox (from bottom)
  • -
  • WxHf - (eg. 100x50f) - fit inside a WxH viewbox (without cropping)
  • -
  • 0xH - (eg. 0x50) - resize to H height preserving the aspect ratio
  • -
  • Wx0 - (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,p(e,"class","m-0")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function zC(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 E={id:n[22],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(E.value=n[0].options.thumbs),r=new Ns({props:E}),ne.push(()=>de(r,"value",M)),S=new Nn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[VC]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=O(),s=v("i"),o=O(),z(r.$$.fragment),f=O(),u=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),m=v("button"),_=v("span"),_.textContent="Supported formats",h=O(),g=v("i"),y=O(),z(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),j(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),j(S,m,null),C=!0,$||(T=Se(je.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"})),$=!0)},p(D,I){(!C||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,_e(()=>a=!1)),r.$set(P);const F={};I&16777216&&(F.$$scope={dirty:I,ctx:D}),S.$set(F)},i(D){C||(A(r.$$.fragment,D),A(S.$$.fragment,D),C=!0)},o(D){L(r.$$.fragment,D),L(S.$$.fragment,D),C=!1},d(D){D&&k(e),D&&k(o),V(r,D),D&&k(f),D&&k(u),V(S),$=!1,T()}}}function HC(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Max file size"),s=O(),l=v("input"),r=O(),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),oe(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&&oe(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 gd(n){let e,t,i;return t=new ce({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[BC,({uniqueId:s})=>({22:s}),({uniqueId:s})=>s?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","col-sm-3")},m(s,l){w(s,e,l),j(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),V(t)}}}function BC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=O(),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),oe(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&&oe(l,f[0].options.maxSelect)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function UC(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:[jC,({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:[zC,({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:[HC,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}});let _=!n[2]&&gd(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(o.$$.fragment),a=O(),f=v("div"),z(u.$$.fragment),d=O(),_&&_.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),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,a),b(e,f),j(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 C={};g&2&&(C.name="schema."+h[1]+".options.maxSize"),g&20971521&&(C.$$scope={dirty:g,ctx:h}),u.$set(C),(!m||g&4&&c!==(c=h[2]?"col-sm-4":"col-sm-3"))&&p(f,"class",c),h[2]?_&&(re(),L(_,1,1,()=>{_=null}),ae()):_?(_.p(h,g),g&4&&A(_,1)):(_=gd(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)},o(h){L(i.$$.fragment,h),L(o.$$.fragment,h),L(u.$$.fragment,h),L(_),m=!1},d(h){h&&k(e),V(i),V(o),V(u),_&&_.d()}}}function WC(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Protected",r=O(),a=v("a"),a.textContent="(Learn more)",p(e,"type","checkbox"),p(e,"id",t=n[22]),p(l,"class","txt"),p(s,"for",o=n[22]),p(a,"href","https://pocketbase.io/docs/files-handling/#protected-files"),p(a,"class","toggle-info txt-sm txt-hint m-l-5"),p(a,"target","_blank"),p(a,"rel","noopener")},m(c,d){w(c,e,d),e.checked=n[0].options.protected,w(c,i,d),w(c,s,d),b(s,l),w(c,r,d),w(c,a,d),f||(u=Y(e,"change",n[7]),f=!0)},p(c,d){d&4194304&&t!==(t=c[22])&&p(e,"id",t),d&1&&(e.checked=c[0].options.protected),d&4194304&&o!==(o=c[22])&&p(s,"for",o)},d(c){c&&k(e),c&&k(i),c&&k(s),c&&k(r),c&&k(a),f=!1,u()}}}function YC(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.protected",$$slots:{default:[WC,({uniqueId:i})=>({22:i}),({uniqueId:i})=>i?4194304:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.protected"),s&20971521&&(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){V(e,i)}}}function KC(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[17](r)}let o={$$slots:{optionsFooter:[YC],options:[UC],default:[RC,({interactive:r})=>({23:r}),({interactive:r})=>r?8388608:0]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[18]),e.$on("remove",n[19]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const f=a&34?At(s,[a&2&&{key:r[1]},a&32&&Qt(r[5])]):{};a&25165839&&(f.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,f.field=r[0],_e(()=>t=!1)),e.$set(f)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function JC(n,e,t){var P;const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=FC.slice(),f=((P=l.options)==null?void 0:P.maxSelect)<=1,u=f;function c(){t(0,l.options={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]},l),t(2,f=!0),t(6,u=f)}function d(){if(H.isEmpty(l.options.mimeTypes))return;const F=[];for(const N of l.options.mimeTypes)a.find(R=>R.mimeType===N)||F.push({mimeType:N});F.length&&t(3,a=a.concat(F))}function m(){l.options.protected=this.checked,t(0,l),t(6,u),t(2,f)}function _(F){n.$$.not_equal(l.options.mimeTypes,F)&&(l.options.mimeTypes=F,t(0,l),t(6,u),t(2,f))}const h=()=>{t(0,l.options.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],l)},g=()=>{t(0,l.options.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],l)},y=()=>{t(0,l.options.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],l)},S=()=>{t(0,l.options.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],l)};function C(F){n.$$.not_equal(l.options.thumbs,F)&&(l.options.thumbs=F,t(0,l),t(6,u),t(2,f))}function $(){l.options.maxSize=pt(this.value),t(0,l),t(6,u),t(2,f)}function T(){l.options.maxSelect=pt(this.value),t(0,l),t(6,u),t(2,f)}function M(F){f=F,t(2,f)}function E(F){l=F,t(0,l),t(6,u),t(2,f)}function D(F){Fe.call(this,n,F)}function I(F){Fe.call(this,n,F)}return n.$$set=F=>{e=qe(qe({},e),Xt(F)),t(5,s=Qe(e,i)),"field"in F&&t(0,l=F.field),"key"in F&&t(1,o=F.key)},n.$$.update=()=>{var F,N;n.$$.dirty&69&&u!=f&&(t(6,u=f),f?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((N=(F=l.options)==null?void 0:F.values)==null?void 0:N.length)||99,l)),n.$$.dirty&1&&(H.isEmpty(l.options)?c():d())},[l,o,f,a,r,s,u,m,_,h,g,y,S,C,$,T,M,E,D,I]}class ZC extends be{constructor(e){super(),ge(this,e,JC,KC,pe,{field:0,key:1})}}function GC(n){let e,t,i,s,l;return{c(){e=v("hr"),t=O(),i=v("button"),i.innerHTML=` - New collection`,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:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,l()}}}function XC(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:[GC]},$$scope:{ctx:n}};return n[0].options.collectionId!==void 0&&(l.keyOfSelected=n[0].options.collectionId),e=new Hi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){z(e.$$.fragment)},m(o,r){j(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,_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function QC(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 Hi({props:l}),ne.push(()=>de(e,"keyOfSelected",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function xC(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:[XC,({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:[QC,({uniqueId:c})=>({23:c}),({uniqueId:c})=>c?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),z(i.$$.fragment),s=O(),l=v("div"),o=O(),z(r.$$.fragment),a=O(),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),j(i,c,d),w(c,s,d),w(c,l,d),w(c,o,d),j(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),V(i,c),c&&k(s),c&&k(l),c&&k(o),V(r,c),c&&k(a),c&&k(f)}}}function bd(n){let e,t,i,s,l,o;return t=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.minSelect",$$slots:{default:[eT,({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:[tT,({uniqueId:r})=>({23:r}),({uniqueId:r})=>r?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),z(t.$$.fragment),i=O(),s=v("div"),z(l.$$.fragment),p(e,"class","col-sm-6"),p(s,"class","col-sm-6")},m(r,a){w(r,e,a),j(t,e,null),w(r,i,a),w(r,s,a),j(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),V(t),r&&k(i),r&&k(s),V(l)}}}function eT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min select"),s=O(),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),oe(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&&oe(l,f[0].options.minSelect)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function tT(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("label"),t=U("Max select"),s=O(),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),oe(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&&oe(l,u[0].options.maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),a=!1,f()}}}function nT(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 Hi({props:_}),ne.push(()=>de(a,"keyOfSelected",m)),{c(){e=v("label"),t=v("span"),t.textContent="Cascade delete",i=O(),s=v("i"),r=O(),z(a.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",o=n[23])},m(h,g){var y,S;w(h,e,g),b(e,t),b(e,i),b(e,s),w(h,r,g),j(a,h,g),u=!0,c||(d=Se(l=je.call(null,s,{text:[`Whether on ${((y=n[4])==null?void 0:y.name)||"relation"} record deletion to delete also the current corresponding collection record(s).`,n[2]?null:`For "Multiple" relation fields the cascade delete is triggered only when all ${((S=n[4])==null?void 0:S.name)||"relation"} ids are removed from the corresponding record.`].filter(Boolean).join(` - -`),position:"top"})),c=!0)},p(h,g){var S,C;l&&Dt(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 ${((C=h[4])==null?void 0:C.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,_e(()=>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),V(a,h),c=!1,d()}}}function iT(n){let e,t,i,s,l,o=!n[2]&&bd(n);return s=new ce({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[nT,({uniqueId:r})=>({23:r}),({uniqueId:r})=>r?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),o&&o.c(),t=O(),i=v("div"),z(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),j(s,i,null),l=!0},p(r,a){r[2]?o&&(re(),L(o,1,1,()=>{o=null}),ae()):o?(o.p(r,a),a&4&&A(o,1)):(o=bd(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(),V(s)}}}function sT(n){let e,t,i,s,l;const o=[{key:n[1]},n[8]];function r(u){n[17](u)}let a={$$slots:{options:[iT],default:[xC,({interactive:u})=>({24:u}),({interactive:u})=>u?16777216:0]},$$scope:{ctx:n}};for(let u=0;ude(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(){z(e.$$.fragment),i=O(),z(s.$$.fragment)},m(u,c){j(e,u,c),w(u,i,c),j(s,u,c),l=!0},p(u,[c]){const d=c&258?At(o,[c&2&&{key:u[1]},c&256&&Qt(u[8])]):{};c&50331711&&(d.$$scope={dirty:c,ctx:u}),!t&&c&1&&(t=!0,d.field=u[0],_e(()=>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){V(e,u),u&&k(i),n[20](null),V(s,u)}}}function lT(n,e,t){var F;let i,s;const l=["field","key"];let o=Qe(e,l),r;We(n,ni,N=>t(10,r=N));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(N){n.$$.not_equal(a.options.cascadeDelete,N)&&(a.options.cascadeDelete=N,t(0,a),t(9,_),t(2,m))}const C=()=>d==null?void 0:d.show();function $(N){n.$$.not_equal(a.options.collectionId,N)&&(a.options.collectionId=N,t(0,a),t(9,_),t(2,m))}function T(N){m=N,t(2,m)}function M(N){a=N,t(0,a),t(9,_),t(2,m)}function E(N){Fe.call(this,n,N)}function D(N){Fe.call(this,n,N)}function I(N){ne[N?"unshift":"push"](()=>{d=N,t(3,d)})}const P=N=>{var R,q;(q=(R=N==null?void 0:N.detail)==null?void 0:R.collection)!=null&&q.id&&N.detail.collection.type!="view"&&t(0,a.options.collectionId=N.detail.collection.id,a)};return n.$$set=N=>{e=qe(qe({},e),Xt(N)),t(8,o=Qe(e,l)),"field"in N&&t(0,a=N.field),"key"in N&&t(1,f=N.key)},n.$$.update=()=>{n.$$.dirty&1024&&t(5,i=r.filter(N=>N.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&&H.isEmpty(a.options)&&h(),n.$$.dirty&1025&&t(4,s=r.find(N=>N.id==a.options.collectionId)||null)},[a,f,m,d,s,i,u,c,o,_,r,g,y,S,C,$,T,M,E,D,I,P]}class oT extends be{constructor(e){super(),ge(this,e,lT,sT,pe,{field:0,key:1})}}const rT=n=>({dragging:n&4,dragover:n&8}),vd=n=>({dragging:n[2],dragover:n[3]});function aT(n){let e,t,i,s,l;const o=n[10].default,r=$t(o,n,n[9],vd);return{c(){e=v("div"),r&&r.c(),p(e,"draggable",t=!n[1]),p(e,"class","draggable svelte-28orm4"),Q(e,"dragging",n[2]),Q(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?Ct(o,a[9],f,rT):Mt(a[9]),vd),(!i||f&2&&t!==(t=!a[1]))&&p(e,"draggable",t),(!i||f&4)&&Q(e,"dragging",a[2]),(!i||f&8)&&Q(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,Ce(l)}}}function fT(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=yt();let{index:o}=e,{list:r=[]}=e,{group:a="default"}=e,{disabled:f=!1}=e,{dragHandleClass:u=""}=e,c=!1,d=!1;function m($,T){if(!(!$||f)){if(u&&!$.target.classList.contains(u)){t(3,d=!1),t(2,c=!1),$.preventDefault();return}t(2,c=!0),$.dataTransfer.effectAllowed="move",$.dataTransfer.dropEffect="move",$.dataTransfer.setData("text/plain",JSON.stringify({index:T,group:a})),l("drag",$)}}function _($,T){if(t(3,d=!1),t(2,c=!1),!$||f)return;$.dataTransfer.dropEffect="move";let M={};try{M=JSON.parse($.dataTransfer.getData("text/plain"))}catch{}if(M.group!=a)return;const E=M.index<<0;E{t(3,d=!0)},g=()=>{t(3,d=!1)},y=()=>{t(3,d=!1),t(2,c=!1)},S=$=>m($,o),C=$=>_($,o);return n.$$set=$=>{"index"in $&&t(0,o=$.index),"list"in $&&t(6,r=$.list),"group"in $&&t(7,a=$.group),"disabled"in $&&t(1,f=$.disabled),"dragHandleClass"in $&&t(8,u=$.dragHandleClass),"$$scope"in $&&t(9,s=$.$$scope)},[o,f,c,d,m,_,r,a,u,s,i,h,g,y,S,C]}class Al extends be{constructor(e){super(),ge(this,e,fT,aT,pe,{index:0,list:6,group:7,disabled:1,dragHandleClass:8})}}function yd(n,e,t){const i=n.slice();return i[17]=e[t],i[18]=e,i[19]=t,i}function kd(n){let e,t,i,s,l,o,r,a;return{c(){e=U(`, - `),t=v("code"),t.textContent="username",i=U(` , - `),s=v("code"),s.textContent="email",l=U(` , - `),o=v("code"),o.textContent="emailVisibility",r=U(` , - `),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(f,u){w(f,e,u),w(f,t,u),w(f,i,u),w(f,s,u),w(f,l,u),w(f,o,u),w(f,r,u),w(f,a,u)},d(f){f&&k(e),f&&k(t),f&&k(i),f&&k(s),f&&k(l),f&&k(o),f&&k(r),f&&k(a)}}}function uT(n){let e,t,i,s;function l(f){n[6](f,n[17],n[18],n[19])}function o(){return n[7](n[19])}var r=n[1][n[17].type];function a(f){let u={key:f[4](f[17])};return f[17]!==void 0&&(u.field=f[17]),{props:u}}return r&&(e=Ot(r,a(n)),ne.push(()=>de(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8])),{c(){e&&z(e.$$.fragment),i=O()},m(f,u){e&&j(e,f,u),w(f,i,u),s=!0},p(f,u){n=f;const c={};if(u&1&&(c.key=n[4](n[17])),!t&&u&1&&(t=!0,c.field=n[17],_e(()=>t=!1)),u&1&&r!==(r=n[1][n[17].type])){if(e){re();const d=e;L(d.$$.fragment,1,0,()=>{V(d,1)}),ae()}r?(e=Ot(r,a(n)),ne.push(()=>de(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8]),z(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else r&&e.$set(c)},i(f){s||(e&&A(e.$$.fragment,f),s=!0)},o(f){e&&L(e.$$.fragment,f),s=!1},d(f){e&&V(e,f),f&&k(i)}}}function wd(n,e){let t,i,s,l;function o(a){e[9](a)}let r={index:e[19],disabled:e[17].toDelete||e[17].id&&e[17].system,dragHandleClass:"drag-handle-wrapper",$$slots:{default:[uT]},$$scope:{ctx:e}};return e[0].schema!==void 0&&(r.list=e[0].schema),i=new Al({props:r}),ne.push(()=>de(i,"list",o)),i.$on("drag",e[10]),i.$on("sort",e[11]),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,f){w(a,t,f),j(i,a,f),l=!0},p(a,f){e=a;const u={};f&1&&(u.index=e[19]),f&1&&(u.disabled=e[17].toDelete||e[17].id&&e[17].system),f&1048577&&(u.$$scope={dirty:f,ctx:e}),!s&&f&1&&(s=!0,u.list=e[0].schema,_e(()=>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),V(i,a)}}}function cT(n){let e,t,i,s,l,o,r,a,f,u,c,d,m=[],_=new Map,h,g,y,S,C,$,T,M,E=n[0].type==="auth"&&kd(),D=n[0].schema;const I=N=>N[17];for(let N=0;Nde($,"collection",P)),{c(){e=v("div"),t=v("p"),i=U(`System fields: - `),s=v("code"),s.textContent="id",l=U(` , - `),o=v("code"),o.textContent="created",r=U(` , - `),a=v("code"),a.textContent="updated",f=O(),E&&E.c(),u=U(` - .`),c=O(),d=v("div");for(let N=0;NT=!1)),$.$set(q)},i(N){if(!M){for(let R=0;RM.name===$))}function u($){return i.findIndex(T=>T===$)}function c($,T){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||$===T||!T||t(0,s.indexes=s.indexes.map(E=>H.replaceIndexColumn(E,$,T)),s)}function d($,T,M,E){M[E]=$,t(0,s)}const m=$=>o($),_=$=>c($.detail.oldName,$.detail.newName);function h($){n.$$.not_equal(s.schema,$)&&(s.schema=$,t(0,s))}const g=$=>{if(!$.detail)return;const T=$.detail.target;T.style.opacity=0,setTimeout(()=>{var M;(M=T==null?void 0:T.style)==null||M.removeProperty("opacity")},0),$.detail.dataTransfer.setDragImage(T,0,0)},y=()=>{en({})},S=$=>r($.detail);function C($){s=$,t(0,s)}return n.$$set=$=>{"collection"in $&&t(0,s=$.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&t(0,s.schema=[],s),n.$$.dirty&1&&(i=s.schema.filter($=>!$.toDelete)||[])},[s,l,o,r,u,c,d,m,_,h,g,y,S,C]}class pT extends be{constructor(e){super(),ge(this,e,dT,cT,pe,{collection:0})}}const mT=n=>({isAdminOnly:n&512}),Sd=n=>({isAdminOnly:n[9]}),hT=n=>({isAdminOnly:n&512}),$d=n=>({isAdminOnly:n[9]}),_T=n=>({isAdminOnly:n&512}),Cd=n=>({isAdminOnly:n[9]});function gT(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:[vT,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(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){V(e,i)}}}function bT(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Td(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Set Admins only`,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:x,d(s){s&&k(e),t=!1,i()}}}function Md(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=`Unlock and set custom rule -
    `,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:x,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 vT(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,f,u,c,d,m,_,h,g,y,S;const C=n[12].beforeLabel,$=$t(C,n,n[15],Cd),T=n[12].afterLabel,M=$t(T,n,n[15],$d);let E=!n[9]&&Td(n);function D(q){n[14](q)}var I=n[7];function P(q){let B={id:q[18],baseCollection:q[1],disabled:q[9],placeholder:q[9]?"":q[5]};return q[0]!==void 0&&(B.value=q[0]),{props:B}}I&&(m=Ot(I,P(n)),n[13](m),ne.push(()=>de(m,"value",D)));let F=n[9]&&Md(n);const N=n[12].default,R=$t(N,n,n[15],Sd);return{c(){e=v("div"),t=v("label"),$&&$.c(),i=O(),s=v("span"),l=U(n[2]),o=O(),a=U(r),f=O(),M&&M.c(),u=O(),E&&E.c(),d=O(),m&&z(m.$$.fragment),h=O(),F&&F.c(),g=O(),y=v("div"),R&&R.c(),p(s,"class","txt"),Q(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,B){w(q,e,B),b(e,t),$&&$.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),E&&E.m(t,null),b(e,d),m&&j(m,e,null),b(e,h),F&&F.m(e,null),w(q,g,B),w(q,y,B),R&&R.m(y,null),S=!0},p(q,B){$&&$.p&&(!S||B&33280)&&Tt($,C,q,q[15],S?Ct(C,q[15],B,_T):Mt(q[15]),Cd),(!S||B&4)&&se(l,q[2]),(!S||B&512)&&r!==(r=q[9]?"- Admins only":"")&&se(a,r),(!S||B&512)&&Q(s,"txt-hint",q[9]),M&&M.p&&(!S||B&33280)&&Tt(M,T,q,q[15],S?Ct(T,q[15],B,hT):Mt(q[15]),$d),q[9]?E&&(E.d(1),E=null):E?E.p(q,B):(E=Td(q),E.c(),E.m(t,null)),(!S||B&262144&&c!==(c=q[18]))&&p(t,"for",c);const K={};if(B&262144&&(K.id=q[18]),B&2&&(K.baseCollection=q[1]),B&512&&(K.disabled=q[9]),B&544&&(K.placeholder=q[9]?"":q[5]),!_&&B&1&&(_=!0,K.value=q[0],_e(()=>_=!1)),B&128&&I!==(I=q[7])){if(m){re();const J=m;L(J.$$.fragment,1,0,()=>{V(J,1)}),ae()}I?(m=Ot(I,P(q)),q[13](m),ne.push(()=>de(m,"value",D)),z(m.$$.fragment),A(m.$$.fragment,1),j(m,e,h)):m=null}else I&&m.$set(K);q[9]?F?(F.p(q,B),B&512&&A(F,1)):(F=Md(q),F.c(),A(F,1),F.m(e,null)):F&&(re(),L(F,1,1,()=>{F=null}),ae()),R&&R.p&&(!S||B&33280)&&Tt(R,N,q,q[15],S?Ct(N,q[15],B,mT):Mt(q[15]),Sd)},i(q){S||(A($,q),A(M,q),m&&A(m.$$.fragment,q),A(F),A(R,q),S=!0)},o(q){L($,q),L(M,q),m&&L(m.$$.fragment,q),L(F),L(R,q),S=!1},d(q){q&&k(e),$&&$.d(q),M&&M.d(q),E&&E.d(),n[13](null),m&&V(m),F&&F.d(),q&&k(g),q&&k(y),R&&R.d(q)}}}function yT(n){let e,t,i,s;const l=[bT,gT],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):(re(),L(o[u],1,1,()=>{o[u]=null}),ae(),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 Od;function kT(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,_=Od,h=!1;g();async function g(){_||h||(t(8,h=!0),t(7,_=(await lt(()=>import("./FilterAutocompleteInput-8ec993bb.js"),["./FilterAutocompleteInput-8ec993bb.js","./index-4841d67b.js"],import.meta.url)).default),Od=_,t(8,h=!1))}async function y(){t(0,r=m||""),await sn(),d==null||d.focus()}async function S(){m=r,t(0,r=null)}function C(T){ne[T?"unshift":"push"](()=>{d=T,t(6,d)})}function $(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 $s extends be{constructor(e){super(),ge(this,e,kT,yT,pe,{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 Dd(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T,M,E,D,I=n[2],P=[];for(let F=0;F@request filter:",c=O(),d=v("div"),d.innerHTML=`@request.headers.* - @request.query.* - @request.data.* - @request.auth.*`,m=O(),_=v("hr"),h=O(),g=v("p"),g.innerHTML="You could also add constraints and query other collections using the @collection filter:",y=O(),S=v("div"),S.innerHTML="@collection.ANY_COLLECTION_NAME.*",C=O(),$=v("hr"),T=O(),M=v("p"),M.innerHTML=`Example rule: -
    - @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(a,"class","m-t-10 m-b-5"),p(u,"class","m-b-0"),p(d,"class","inline-flex flex-gap-5"),p(_,"class","m-t-10 m-b-5"),p(g,"class","m-b-0"),p(S,"class","inline-flex flex-gap-5"),p($,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(F,N){w(F,e,N),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o);for(let R=0;R{D&&(E||(E=Re(e,tt,{duration:150},!0)),E.run(1))}),D=!0)},o(F){F&&(E||(E=Re(e,tt,{duration:150},!1)),E.run(0)),D=!1},d(F){F&&k(e),_t(P,F),F&&E&&E.end()}}}function Ad(n){let e,t=n[11]+"",i;return{c(){e=v("code"),i=U(t)},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&se(i,t)},d(s){s&&k(e)}}}function Id(n){let e,t,i,s,l,o,r,a,f;function u(g){n[6](g)}let c={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[wT,({isAdminOnly:g})=>({10:g}),({isAdminOnly:g})=>g?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(c.rule=n[0].createRule),e=new $s({props:c}),ne.push(()=>de(e,"rule",u));function d(g){n[7](g)}let m={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(m.rule=n[0].updateRule),s=new $s({props:m}),ne.push(()=>de(s,"rule",d));function _(g){n[8](g)}let h={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(h.rule=n[0].deleteRule),r=new $s({props:h}),ne.push(()=>de(r,"rule",_)),{c(){z(e.$$.fragment),i=O(),z(s.$$.fragment),o=O(),z(r.$$.fragment)},m(g,y){j(e,g,y),w(g,i,y),j(s,g,y),w(g,o,y),j(r,g,y),f=!0},p(g,y){const S={};y&1&&(S.collection=g[0]),y&17408&&(S.$$scope={dirty:y,ctx:g}),!t&&y&1&&(t=!0,S.rule=g[0].createRule,_e(()=>t=!1)),e.$set(S);const C={};y&1&&(C.collection=g[0]),!l&&y&1&&(l=!0,C.rule=g[0].updateRule,_e(()=>l=!1)),s.$set(C);const $={};y&1&&($.collection=g[0]),!a&&y&1&&(a=!0,$.rule=g[0].deleteRule,_e(()=>a=!1)),r.$set($)},i(g){f||(A(e.$$.fragment,g),A(s.$$.fragment,g),A(r.$$.fragment,g),f=!0)},o(g){L(e.$$.fragment,g),L(s.$$.fragment,g),L(r.$$.fragment,g),f=!1},d(g){V(e,g),g&&k(i),V(s,g),g&&k(o),V(r,g)}}}function Ld(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-information-line link-hint")},m(s,l){w(s,e,l),t||(i=Se(je.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&k(e),t=!1,i()}}}function wT(n){let e,t=!n[10]&&Ld();return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=Ld(),t.c(),t.m(e.parentNode,e))},d(i){t&&t.d(i),i&&k(e)}}}function Pd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[ST]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new $s({props:l}),ne.push(()=>de(e,"rule",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function ST(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. - changing the password without requiring to enter the old one, directly updating the verified - state or email, etc.`,t=O(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},p:x,d(s){s&&k(e),s&&k(t),s&&k(i)}}}function $T(n){var N,R;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]&&Dd(n);function M(q){n[4](q)}let E={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(E.rule=n[0].listRule),u=new $s({props:E}),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 $s({props:I}),ne.push(()=>de(m,"rule",D));let P=((N=n[0])==null?void 0:N.type)!=="view"&&Id(n),F=((R=n[0])==null?void 0:R.type)==="auth"&&Pd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the -
    PocketBase filter syntax and operators - .`,s=O(),l=v("button"),r=U(o),a=O(),T&&T.c(),f=O(),z(u.$$.fragment),d=O(),z(m.$$.fragment),h=O(),P&&P.c(),g=O(),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,B){w(q,e,B),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,B),j(u,q,B),w(q,d,B),j(m,q,B),w(q,h,B),P&&P.m(q,B),w(q,g,B),F&&F.m(q,B),w(q,y,B),S=!0,C||($=Y(l,"click",n[3]),C=!0)},p(q,[B]){var X,G;(!S||B&2)&&o!==(o=q[1]?"Hide available fields":"Show available fields")&&se(r,o),q[1]?T?(T.p(q,B),B&2&&A(T,1)):(T=Dd(q),T.c(),A(T,1),T.m(e,null)):T&&(re(),L(T,1,1,()=>{T=null}),ae());const K={};B&1&&(K.collection=q[0]),!c&&B&1&&(c=!0,K.rule=q[0].listRule,_e(()=>c=!1)),u.$set(K);const J={};B&1&&(J.collection=q[0]),!_&&B&1&&(_=!0,J.rule=q[0].viewRule,_e(()=>_=!1)),m.$set(J),((X=q[0])==null?void 0:X.type)!=="view"?P?(P.p(q,B),B&1&&A(P,1)):(P=Id(q),P.c(),A(P,1),P.m(g.parentNode,g)):P&&(re(),L(P,1,1,()=>{P=null}),ae()),((G=q[0])==null?void 0:G.type)==="auth"?F?(F.p(q,B),B&1&&A(F,1)):(F=Pd(q),F.c(),A(F,1),F.m(y.parentNode,y)):F&&(re(),L(F,1,1,()=>{F=null}),ae())},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),V(u,q),q&&k(d),V(m,q),q&&k(h),P&&P.d(q),q&&k(g),F&&F.d(q),q&&k(y),C=!1,$()}}}function CT(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=H.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,f,u,c,d]}class TT extends be{constructor(e){super(),ge(this,e,CT,$T,pe,{collection:0})}}function Fd(n,e,t){const i=n.slice();return i[9]=e[t],i}function MT(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=Ot(o,r(n)),ne.push(()=>de(e,"value",l)),e.$on("change",n[6])),{c(){e&&z(e.$$.fragment),i=ye()},m(a,f){e&&j(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,_e(()=>t=!1)),f&2&&o!==(o=a[1])){if(e){re();const c=e;L(c.$$.fragment,1,0,()=>{V(c,1)}),ae()}o?(e=Ot(o,r(a)),ne.push(()=>de(e,"value",l)),e.$on("change",a[6]),z(e.$$.fragment),A(e.$$.fragment,1),j(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&&V(e,a)}}}function OT(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:x,i:x,o:x,d(t){t&&k(e)}}}function Nd(n){let e,t,i=n[3],s=[];for(let l=0;l
  • Wildcard columns (*) are not supported.
  • -
  • The query must have a unique id column. -
    - If your query doesn't have a suitable one, you can use the universal - (ROW_NUMBER() OVER()) as id.
  • -
  • Expressions must be aliased with a valid formatted field name (eg. - MAX(balance) as maxBalance).
  • `,f=O(),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):(re(),L(m[S],1,1,()=>{m[S]=null}),ae(),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=Nd(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 DT(n){let e,t;return e=new ce({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[ET,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(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){V(e,i)}}}function AT(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=H.getNestedVal(c,"schema",null);if(H.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const m=H.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);H.removeByValue(m,"id"),H.removeByValue(m,"created"),H.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(H.sentenize(S+": "+y))}}Kt(async()=>{t(2,o=!0);try{t(1,l=(await lt(()=>import("./CodeEditor-7fe9ddeb.js"),["./CodeEditor-7fe9ddeb.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 IT extends be{constructor(e){super(),ge(this,e,AT,DT,pe,{collection:0})}}const LT=n=>({active:n&1}),qd=n=>({active:n[0]});function jd(n){let e,t,i;const s=n[15].default,l=$t(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?Ct(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 PT(n){let e,t,i,s,l,o,r;const a=n[15].header,f=$t(a,n,n[14],qd);let u=n[0]&&jd(n);return{c(){e=v("div"),t=v("button"),f&&f.c(),i=O(),u&&u.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(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?Ct(a,c[14],d,LT):Mt(c[14]),qd),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?u?(u.p(c,d),d&1&&A(u,1)):(u=jd(c),u.c(),A(u,1),u.m(e,null)):u&&(re(),L(u,1,1,()=>{u=null}),ae()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(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,Ce(r)}}}function FT(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=yt();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()}}Kt(()=>()=>clearTimeout(r));function C(P){Fe.call(this,n,P)}const $=()=>c&&y(),T=P=>{f&&(t(7,m=!1),S(),l("drop",P))},M=P=>f&&l("dragstart",P),E=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,E,D,I]}class ao extends be{constructor(e){super(),ge(this,e,FT,PT,pe,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function NT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),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.allowUsernameAuth,w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[5]),r=!0)},p(f,u){u&4096&&t!==(t=f[12])&&p(e,"id",t),u&1&&(e.checked=f[0].options.allowUsernameAuth),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 RT(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[NT,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function qT(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 jT(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=Se(je.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.allowUsernameAuth?jT:qT}let a=r(n),f=a(n),u=n[3]&&Vd();return{c(){e=v("div"),e.innerHTML=` - Username/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),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=Vd(),u.c(),A(u,1),u.m(o.parentNode,o)):u&&(re(),L(u,1,1,()=>{u=null}),ae())},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 zT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),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 "+(H.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[HT,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field "+(H.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[BT,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(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),j(i,t,null),b(e,s),b(e,l),j(o,l,null),a=!0},p(f,u){const c={};u&1&&(c.class="form-field "+(H.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 "+(H.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),V(i),V(o),f&&r&&r.end()}}}function HT(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:!H.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(h.value=n[0].options.exceptEmailDomains),r=new Ns({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),z(r.$$.fragment),f=O(),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),j(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Se(je.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=!H.isEmpty(g[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.exceptEmailDomains,_e(()=>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),V(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function BT(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:!H.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(h.value=n[0].options.onlyEmailDomains),r=new Ns({props:h}),ne.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),z(r.$$.fragment),f=O(),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),j(r,g,y),w(g,f,y),w(g,u,y),c=!0,d||(m=Se(je.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=!H.isEmpty(g[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,S.value=g[0].options.onlyEmailDomains,_e(()=>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),V(r,g),g&&k(f),g&&k(u),d=!1,m()}}}function UT(n){let e,t,i,s;e=new ce({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[zT,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&zd(n);return{c(){z(e.$$.fragment),t=O(),l&&l.c(),i=ye()},m(o,r){j(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&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){V(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function WT(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 YT(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 Hd(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=Se(je.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 KT(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowEmailAuth?YT:WT}let a=r(n),f=a(n),u=n[2]&&Hd();return{c(){e=v("div"),e.innerHTML=` - Email/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),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=Hd(),u.c(),A(u,1),u.m(o.parentNode,o)):u&&(re(),L(u,1,1,()=>{u=null}),ae())},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 JT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),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 Bd(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',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 ZT(n){let e,t,i,s;e=new ce({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[JT,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Bd();return{c(){z(e.$$.fragment),t=O(),l&&l.c(),i=ye()},m(o,r){j(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=Bd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){V(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function GT(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 XT(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 Ud(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=Se(je.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 QT(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowOAuth2Auth?XT:GT}let a=r(n),f=a(n),u=n[1]&&Ud();return{c(){e=v("div"),e.innerHTML=` - OAuth2`,t=O(),i=v("div"),s=O(),f.c(),l=O(),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=Ud(),u.c(),A(u,1),u.m(o.parentNode,o)):u&&(re(),L(u,1,1,()=>{u=null}),ae())},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 xT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Minimum password length"),s=O(),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),oe(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&&oe(l,f[0].options.minPasswordLength)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function eM(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Always require email",o=O(),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]),Se(je.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,Ce(u)}}}function tM(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y;return s=new ao({props:{single:!0,$$slots:{header:[VT],default:[RT]},$$scope:{ctx:n}}}),o=new ao({props:{single:!0,$$slots:{header:[KT],default:[UT]},$$scope:{ctx:n}}}),a=new ao({props:{single:!0,$$slots:{header:[QT],default:[ZT]},$$scope:{ctx:n}}}),_=new ce({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[xT,({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:[eM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=O(),i=v("div"),z(s.$$.fragment),l=O(),z(o.$$.fragment),r=O(),z(a.$$.fragment),f=O(),u=v("hr"),c=O(),d=v("h4"),d.textContent="General",m=O(),z(_.$$.fragment),h=O(),z(g.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(S,C){w(S,e,C),w(S,t,C),w(S,i,C),j(s,i,null),b(i,l),j(o,i,null),b(i,r),j(a,i,null),w(S,f,C),w(S,u,C),w(S,c,C),w(S,d,C),w(S,m,C),j(_,S,C),w(S,h,C),j(g,S,C),y=!0},p(S,[C]){const $={};C&8201&&($.$$scope={dirty:C,ctx:S}),s.$set($);const T={};C&8197&&(T.$$scope={dirty:C,ctx:S}),o.$set(T);const M={};C&8195&&(M.$$scope={dirty:C,ctx:S}),a.$set(M);const E={};C&12289&&(E.$$scope={dirty:C,ctx:S}),_.$set(E);const D={};C&12289&&(D.$$scope={dirty:C,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),V(s),V(o),V(a),S&&k(f),S&&k(u),S&&k(c),S&&k(d),S&&k(m),V(_,S),S&&k(h),V(g,S)}}}function nM(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"&&H.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!H.isEmpty((h=o==null?void 0:o.options)==null?void 0:h.allowEmailAuth)||!H.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.onlyEmailDomains)||!H.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!H.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 iM extends be{constructor(e){super(),ge(this,e,nM,tM,pe,{collection:0})}}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,e,t){const i=n.slice();return i[18]=e[t],i}function Jd(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 Zd(n){let e,t,i,s,l=n[3]&&Gd(n),o=!n[4]&&Xd(n);return{c(){e=v("h6"),e.textContent="Changes:",t=O(),i=v("ul"),l&&l.c(),s=O(),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=Gd(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=Xd(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 Gd(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=O(),a=v("i"),f=O(),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 Xd(n){let e,t,i,s=n[6],l=[];for(let u=0;u
    ',i=O(),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=O(),f&&f.c(),r=O(),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=Jd(),f.c(),f.m(s,null)):f&&(f.d(1),f=null),c[9]?u?u.p(c,d):(u=Zd(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 lM(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function oM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Cancel',t=O(),i=v("button"),i.innerHTML='Confirm',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:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Ce(l)}}}function rM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[oM],header:[lM],default:[sM]},$$scope:{ctx:n}};return e=new ln({props:i}),n[14](e),e.$on("hide",n[15]),e.$on("show",n[16]),{c(){z(e.$$.fragment)},m(s,l){j(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),V(e,s)}}}function aM(n,e,t){let i,s,l,o,r,a;const f=yt();let u,c,d;async function m(T,M){t(1,c=T),t(2,d=M),await sn(),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 C(T){Fe.call(this,n,T)}function $(T){Fe.call(this,n,T)}return n.$$.update=()=>{var T,M,E;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=((E=d==null?void 0:d.schema)==null?void 0:E.filter(D=>{var P,F,N;const I=(P=c==null?void 0:c.schema)==null?void 0:P.find(R=>R.id==D.id);return I?((F=I.options)==null?void 0:F.maxSelect)!=1&&((N=D.options)==null?void 0:N.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 fM extends be{constructor(e){super(),ge(this,e,aM,rM,pe,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function tp(n,e,t){const i=n.slice();return i[49]=e[t][0],i[50]=e[t][1],i}function uM(n){let e,t,i;function s(o){n[35](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new pT({props:l}),ne.push(()=>de(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function cM(n){let e,t,i;function s(o){n[34](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new IT({props:l}),ne.push(()=>de(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function np(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 TT({props:o}),ne.push(()=>de(t,"collection",l)),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){w(r,e,a),j(t,e,null),s=!0},p(r,a){const f={};!i&&a[0]&4&&(i=!0,f.collection=r[2],_e(()=>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),V(t)}}}function ip(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 iM({props:o}),ne.push(()=>de(t,"collection",l)),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===Ds)},m(r,a){w(r,e,a),j(t,e,null),s=!0},p(r,a){const f={};!i&&a[0]&4&&(i=!0,f.collection=r[2],_e(()=>i=!1)),t.$set(f),(!s||a[0]&8)&&Q(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),V(t)}}}function dM(n){let e,t,i,s,l,o,r;const a=[cM,uM],f=[];function u(m,_){return m[14]?0:1}i=u(n),s=f[i]=a[i](n);let c=n[3]===bl&&np(n),d=n[15]&&ip(n);return{c(){e=v("div"),t=v("div"),s.c(),l=O(),c&&c.c(),o=O(),d&&d.c(),p(t,"class","tab-item"),Q(t,"active",n[3]===Pi),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,_):(re(),L(f[h],1,1,()=>{f[h]=null}),ae(),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)&&Q(t,"active",m[3]===Pi),m[3]===bl?c?(c.p(m,_),_[0]&8&&A(c,1)):(c=np(m),c.c(),A(c,1),c.m(e,o)):c&&(re(),L(c,1,1,()=>{c=null}),ae()),m[15]?d?(d.p(m,_),_[0]&32768&&A(d,1)):(d=ip(m),d.c(),A(d,1),d.m(e,null)):d&&(re(),L(d,1,1,()=>{d=null}),ae())},i(m){r||(A(s),A(c),A(d),r=!0)},o(m){L(s),L(c),L(d),r=!1},d(m){m&&k(e),f[i].d(),c&&c.d(),d&&d.d()}}}function sp(n){let e,t,i,s,l,o,r;return o=new Nn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[pM]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),i=v("button"),s=v("i"),l=O(),z(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"aria-label","More"),p(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,f){w(a,e,f),w(a,t,f),w(a,i,f),b(i,s),b(i,l),j(o,i,null),r=!0},p(a,f){const u={};f[1]&4194304&&(u.$$scope={dirty:f,ctx:a}),o.$set(u)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){L(o.$$.fragment,a),r=!1},d(a){a&&k(e),a&&k(t),a&&k(i),V(o)}}}function pM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=` - Duplicate`,t=O(),i=v("button"),i.innerHTML=` - Delete`,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",Pn(Xe(n[27])))],s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Ce(l)}}}function lp(n){let e,t,i,s;return i=new Nn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[mM]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=O(),z(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){w(l,e,o),w(l,t,o),j(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),V(i,l)}}}function op(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=O(),l=v("span"),r=U(o),a=U(" collection"),f=O(),p(t,"class",i=ki(H.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),Q(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=ki(H.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb")&&p(t,"class",i),_[0]&64&&o!==(o=n[50]+"")&&se(r,o),_[0]&68&&Q(e,"selected",n[49]==n[2].type)},d(m){m&&k(e),u=!1,c()}}}function mM(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{F=null}),ae()):F?(F.p(R,q),q[0]&4&&A(F,1)):(F=lp(R),F.c(),A(F,1),F.m(d,null)),(!D||q[0]&4&&$!==($="btn btn-sm p-r-10 p-l-10 "+(R[2].id?"btn-transparent":"btn-outline")))&&p(d,"class",$),(!D||q[0]&4&&T!==(T=!!R[2].id))&&(d.disabled=T),R[2].system?N||(N=rp(),N.c(),N.m(E.parentNode,E)):N&&(N.d(1),N=null)},i(R){D||(A(F),D=!0)},o(R){L(F),D=!1},d(R){R&&k(e),R&&k(s),R&&k(l),R&&k(u),R&&k(c),F&&F.d(),R&&k(M),N&&N.d(R),R&&k(E),I=!1,P()}}}function ap(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=Se(t=je.call(null,e,n[11])),l=!0)},p(r,a){t&&Dt(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 fp(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=Se(je.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 up(n){var a,f,u;let e,t,i,s=!H.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&&cp();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=O(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),Q(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=!H.isEmpty((m=c[5])==null?void 0:m.options)&&!((h=(_=c[5])==null?void 0:_.options)!=null&&h.manageRule)),s?r?d[0]&32&&A(r,1):(r=cp(),r.c(),A(r,1),r.m(e,null)):r&&(re(),L(r,1,1,()=>{r=null}),ae()),d[0]&8&&Q(e,"active",c[3]===Ds)},d(c){c&&k(e),r&&r.d(),l=!1,o()}}}function cp(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=Se(je.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 _M(n){var B,K,J,X,G,fe,ee;let e,t=n[2].id?"Edit collection":"New collection",i,s,l,o,r,a,f,u,c,d,m,_=n[14]?"Query":"Fields",h,g,y=!H.isEmpty(n[11]),S,C,$,T,M=!H.isEmpty((B=n[5])==null?void 0:B.listRule)||!H.isEmpty((K=n[5])==null?void 0:K.viewRule)||!H.isEmpty((J=n[5])==null?void 0:J.createRule)||!H.isEmpty((X=n[5])==null?void 0:X.updateRule)||!H.isEmpty((G=n[5])==null?void 0:G.deleteRule)||!H.isEmpty((ee=(fe=n[5])==null?void 0:fe.options)==null?void 0:ee.manageRule),E,D,I,P,F=!!n[2].id&&!n[2].system&&sp(n);r=new ce({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[hM,({uniqueId:te})=>({48:te}),({uniqueId:te})=>[0,te?131072:0]]},$$scope:{ctx:n}}});let N=y&&ap(n),R=M&&fp(),q=n[15]&&up(n);return{c(){e=v("h4"),i=U(t),s=O(),F&&F.c(),l=O(),o=v("form"),z(r.$$.fragment),a=O(),f=v("input"),u=O(),c=v("div"),d=v("button"),m=v("span"),h=U(_),g=O(),N&&N.c(),S=O(),C=v("button"),$=v("span"),$.textContent="API Rules",T=O(),R&&R.c(),E=O(),q&&q.c(),p(e,"class","upsert-panel-title svelte-12y0yzb"),p(f,"type","submit"),p(f,"class","hidden"),p(f,"tabindex","-1"),p(o,"class","block"),p(m,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),Q(d,"active",n[3]===Pi),p($,"class","txt"),p(C,"type","button"),p(C,"class","tab-item"),Q(C,"active",n[3]===bl),p(c,"class","tabs-header stretched")},m(te,Oe){w(te,e,Oe),b(e,i),w(te,s,Oe),F&&F.m(te,Oe),w(te,l,Oe),w(te,o,Oe),j(r,o,null),b(o,a),b(o,f),w(te,u,Oe),w(te,c,Oe),b(c,d),b(d,m),b(m,h),b(d,g),N&&N.m(d,null),b(c,S),b(c,C),b(C,$),b(C,T),R&&R.m(C,null),b(c,E),q&&q.m(c,null),D=!0,I||(P=[Y(o,"submit",Xe(n[30])),Y(d,"click",n[31]),Y(C,"click",n[32])],I=!0)},p(te,Oe){var Ve,ze,we,Te,Je,gt,Ze;(!D||Oe[0]&4)&&t!==(t=te[2].id?"Edit collection":"New collection")&&se(i,t),te[2].id&&!te[2].system?F?(F.p(te,Oe),Oe[0]&4&&A(F,1)):(F=sp(te),F.c(),A(F,1),F.m(l.parentNode,l)):F&&(re(),L(F,1,1,()=>{F=null}),ae());const Pe={};Oe[0]&8192&&(Pe.class="form-field collection-field-name required m-b-0 "+(te[13]?"disabled":"")),Oe[0]&41028|Oe[1]&4325376&&(Pe.$$scope={dirty:Oe,ctx:te}),r.$set(Pe),(!D||Oe[0]&16384)&&_!==(_=te[14]?"Query":"Fields")&&se(h,_),Oe[0]&2048&&(y=!H.isEmpty(te[11])),y?N?(N.p(te,Oe),Oe[0]&2048&&A(N,1)):(N=ap(te),N.c(),A(N,1),N.m(d,null)):N&&(re(),L(N,1,1,()=>{N=null}),ae()),(!D||Oe[0]&8)&&Q(d,"active",te[3]===Pi),Oe[0]&32&&(M=!H.isEmpty((Ve=te[5])==null?void 0:Ve.listRule)||!H.isEmpty((ze=te[5])==null?void 0:ze.viewRule)||!H.isEmpty((we=te[5])==null?void 0:we.createRule)||!H.isEmpty((Te=te[5])==null?void 0:Te.updateRule)||!H.isEmpty((Je=te[5])==null?void 0:Je.deleteRule)||!H.isEmpty((Ze=(gt=te[5])==null?void 0:gt.options)==null?void 0:Ze.manageRule)),M?R?Oe[0]&32&&A(R,1):(R=fp(),R.c(),A(R,1),R.m(C,null)):R&&(re(),L(R,1,1,()=>{R=null}),ae()),(!D||Oe[0]&8)&&Q(C,"active",te[3]===bl),te[15]?q?q.p(te,Oe):(q=up(te),q.c(),q.m(c,null)):q&&(q.d(1),q=null)},i(te){D||(A(F),A(r.$$.fragment,te),A(N),A(R),D=!0)},o(te){L(F),L(r.$$.fragment,te),L(N),L(R),D=!1},d(te){te&&k(e),te&&k(s),F&&F.d(te),te&&k(l),te&&k(o),V(r),te&&k(u),te&&k(c),N&&N.d(),R&&R.d(),q&&q.d(),I=!1,Ce(P)}}}function gM(n){let e,t,i,s,l,o=n[2].id?"Save changes":"Create",r,a,f,u;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=U(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],Q(s,"btn-loading",n[9])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(l,r),f||(u=[Y(e,"click",n[24]),Y(s,"click",n[25])],f=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].id?"Save changes":"Create")&&se(r,o),d[0]&4608&&a!==(a=!c[12]||c[9])&&(s.disabled=a),d[0]&512&&Q(s,"btn-loading",c[9])},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,Ce(u)}}}function bM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[38],$$slots:{footer:[gM],header:[_M],default:[dM]},$$scope:{ctx:n}};e=new ln({props:l}),n[39](e),e.$on("hide",n[40]),e.$on("show",n[41]);let o={};return i=new fM({props:o}),n[42](i),i.$on("confirm",n[43]),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(r,a){j(e,r,a),w(r,t,a),j(i,r,a),s=!0},p(r,a){const f={};a[0]&512&&(f.overlayClose=!r[9]),a[0]&1040&&(f.beforeHide=r[38]),a[0]&64108|a[1]&4194304&&(f.$$scope={dirty:a,ctx:r}),e.$set(f);const u={};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[39](null),V(e,r),r&&k(t),n[42](null),V(i,r)}}}const Pi="schema",bl="api_rules",Ds="options",vM="base",dp="auth",pp="view";function Ar(n){return JSON.stringify(n)}function yM(n,e,t){let i,s,l,o,r,a;We(n,Ci,ve=>t(5,a=ve));const f={};f[vM]="Base",f[pp]="View",f[dp]="Auth";const u=yt();let c,d,m=null,_=H.initCollection(),h=!1,g=!1,y=Pi,S=Ar(_),C="";function $(ve){t(3,y=ve)}function T(ve){return E(ve),t(10,g=!0),$(Pi),c==null?void 0:c.show()}function M(){return c==null?void 0:c.hide()}async function E(ve){en({}),typeof ve<"u"?(t(22,m=ve),t(2,_=structuredClone(ve))):(t(22,m=null),t(2,_=H.initCollection())),t(2,_.schema=_.schema||[],_),t(2,_.originalName=_.name||"",_),await sn(),t(23,S=Ar(_))}function D(){_.id?d==null||d.show(m,_):I()}function I(){if(h)return;t(9,h=!0);const ve=P();let Ke;_.id?Ke=ue.collections.update(_.id,ve):Ke=ue.collections.create(ve),Ke.then(Me=>{Ma(),My(Me),t(10,g=!1),M(),Rt(_.id?"Successfully updated collection.":"Successfully created collection."),u("save",{isNew:!_.id,collection:Me})}).catch(Me=>{ue.error(Me)}).finally(()=>{t(9,h=!1)})}function P(){const ve=Object.assign({},_);ve.schema=ve.schema.slice(0);for(let Ke=ve.schema.length-1;Ke>=0;Ke--)ve.schema[Ke].toDelete&&ve.schema.splice(Ke,1);return ve}function F(){m!=null&&m.id&&mn(`Do you really want to delete collection "${m.name}" and all its records?`,()=>ue.collections.delete(m.id).then(()=>{M(),Rt(`Successfully deleted collection "${m.name}".`),u("delete",m),Oy(m)}).catch(ve=>{ue.error(ve)}))}function N(ve){t(2,_.type=ve,_),ci("schema")}function R(){o?mn("You have unsaved changes. Do you really want to discard them?",()=>{q()}):q()}async function q(){const ve=m?structuredClone(m):null;if(ve){if(ve.id="",ve.created="",ve.updated="",ve.name+="_duplicate",!H.isEmpty(ve.schema))for(const Ke of ve.schema)Ke.id="";if(!H.isEmpty(ve.indexes))for(let Ke=0;KeM(),K=()=>D(),J=()=>R(),X=()=>F(),G=ve=>{t(2,_.name=H.slugify(ve.target.value),_),ve.target.value=_.name},fe=ve=>N(ve),ee=()=>{r&&D()},te=()=>$(Pi),Oe=()=>$(bl),Pe=()=>$(Ds);function Ve(ve){_=ve,t(2,_),t(22,m)}function ze(ve){_=ve,t(2,_),t(22,m)}function we(ve){_=ve,t(2,_),t(22,m)}function Te(ve){_=ve,t(2,_),t(22,m)}const Je=()=>o&&g?(mn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,g=!1),M()}),!1):!0;function gt(ve){ne[ve?"unshift":"push"](()=>{c=ve,t(7,c)})}function Ze(ve){Fe.call(this,n,ve)}function Ye(ve){Fe.call(this,n,ve)}function wt(ve){ne[ve?"unshift":"push"](()=>{d=ve,t(8,d)})}const me=()=>I();return n.$$.update=()=>{var ve,Ke;n.$$.dirty[0]&4&&_.type==="view"&&(t(2,_.createRule=null,_),t(2,_.updateRule=null,_),t(2,_.deleteRule=null,_),t(2,_.indexes=[],_)),n.$$.dirty[0]&4194308&&_.name&&(m==null?void 0:m.name)!=_.name&&_.indexes.length>0&&t(2,_.indexes=(ve=_.indexes)==null?void 0:ve.map(Me=>H.replaceIndexTableName(Me,_.name)),_),n.$$.dirty[0]&4&&t(15,i=_.type===dp),n.$$.dirty[0]&4&&t(14,s=_.type===pp),n.$$.dirty[0]&32&&(a.schema||(Ke=a.options)!=null&&Ke.query?t(11,C=H.getNestedVal(a,"schema.message")||"Has errors"):t(11,C="")),n.$$.dirty[0]&4&&t(13,l=!!_.id&&_.system),n.$$.dirty[0]&8388612&&t(4,o=S!=Ar(_)),n.$$.dirty[0]&20&&t(12,r=!_.id||o),n.$$.dirty[0]&12&&y===Ds&&_.type!=="auth"&&$(Pi)},[$,M,_,y,o,a,f,c,d,h,g,C,r,l,s,i,D,I,F,N,R,T,m,S,B,K,J,X,G,fe,ee,te,Oe,Pe,Ve,ze,we,Te,Je,gt,Ze,Ye,wt,me]}class nf extends be{constructor(e){super(),ge(this,e,yM,bM,pe,{changeTab:0,show:21,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[21]}get hide(){return this.$$.ctx[1]}}function mp(n,e,t){const i=n.slice();return i[15]=e[t],i}function hp(n){let e,t=n[1].length&&_p();return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1].length?t||(t=_p(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function _p(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function gp(n,e){let t,i,s,l,o,r=e[15].name+"",a,f,u,c,d,m;return{key:n,first:null,c(){var _;t=v("a"),i=v("i"),l=O(),o=v("span"),a=U(r),f=O(),p(i,"class",s=H.getCollectionTypeIcon(e[15].type)),p(o,"class","txt"),p(t,"href",u="/collections?collectionId="+e[15].id),p(t,"class","sidebar-list-item"),p(t,"title",c=e[15].name),Q(t,"active",((_=e[5])==null?void 0:_.id)===e[15].id),this.first=t},m(_,h){w(_,t,h),b(t,i),b(t,l),b(t,o),b(o,a),b(t,f),d||(m=Se(an.call(null,t)),d=!0)},p(_,h){var g;e=_,h&8&&s!==(s=H.getCollectionTypeIcon(e[15].type))&&p(i,"class",s),h&8&&r!==(r=e[15].name+"")&&se(a,r),h&8&&u!==(u="/collections?collectionId="+e[15].id)&&p(t,"href",u),h&8&&c!==(c=e[15].name)&&p(t,"title",c),h&40&&Q(t,"active",((g=e[5])==null?void 0:g.id)===e[15].id)},d(_){_&&k(t),d=!1,m()}}}function bp(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` - New collection`,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:x,d(l){l&&k(e),i=!1,s()}}}function kM(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<$.length;I+=1){let P=mp(n,$,I),F=T(P);m.set(F,d[I]=gp(F,P))}let M=null;$.length||(M=hp(n));let E=!n[7]&&bp(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='',o=O(),r=v("input"),a=O(),f=v("hr"),u=O(),c=v("div");for(let I=0;I20),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),oe(r,n[0]),b(e,a),b(e,f),b(e,u),b(e,c);for(let F=0;F20),I[7]?E&&(E.d(1),E=null):E?E.p(I,P):(E=bp(I),E.c(),E.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{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function SM(n,e,t){let i,s,l,o,r,a,f;We(n,Si,S=>t(5,o=S)),We(n,ni,S=>t(9,r=S)),We(n,bo,S=>t(6,a=S)),We(n,Ts,S=>t(7,f=S));let u,c="";function d(S){nn(Si,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 C;(C=S.detail)!=null&&C.isNew&&S.detail.collection&&d(S.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&wM(),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 $M extends be{constructor(e){super(),ge(this,e,SM,kM,pe,{})}}function vp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function yp(n){n[18]=n[19].default}function kp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function wp(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 Sp(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,f,u,c=i&&wp();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ye(),c&&c.c(),s=O(),l=v("button"),r=U(o),a=O(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(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=wp(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),_&8&&o!==(o=e[15].label+"")&&se(r,o),_&40&&Q(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 $p(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:MM,then:TM,catch:CM,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)||X1(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 CM(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function TM(n){yp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){z(e.$$.fragment),t=O()},m(s,l){j(e,s,l),w(s,t,l),i=!0},p(s,l){yp(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){V(e,s),s&&k(t)}}}function MM(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function Cp(n,e){let t,i,s,l=e[5]===e[14]&&$p(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=$p(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(l),s=!0)},o(o){L(l),s=!1},d(o){o&&k(t),l&&l.d(o),o&&k(i)}}}function OM(n){let e,t,i,s=[],l=new Map,o,r,a=[],f=new Map,u,c=Object.entries(n[3]);const d=h=>h[14];for(let h=0;hh[14];for(let h=0;hClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function DM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[EM],default:[OM]},$$scope:{ctx:n}};return e=new ln({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(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),V(e,s)}}}function AM(n,e,t){const i={list:{label:"List/Search",component:lt(()=>import("./ListApiDocs-8cb2691d.js"),["./ListApiDocs-8cb2691d.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:lt(()=>import("./ViewApiDocs-82bf399d.js"),["./ViewApiDocs-82bf399d.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b174364f.js"],import.meta.url)},create:{label:"Create",component:lt(()=>import("./CreateApiDocs-8ef601e2.js"),["./CreateApiDocs-8ef601e2.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b174364f.js"],import.meta.url)},update:{label:"Update",component:lt(()=>import("./UpdateApiDocs-a0e02816.js"),["./UpdateApiDocs-a0e02816.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b174364f.js"],import.meta.url)},delete:{label:"Delete",component:lt(()=>import("./DeleteApiDocs-830e0b27.js"),["./DeleteApiDocs-830e0b27.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:lt(()=>import("./RealtimeApiDocs-3da84741.js"),["./RealtimeApiDocs-3da84741.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:lt(()=>import("./AuthWithPasswordDocs-9be87c66.js"),["./AuthWithPasswordDocs-9be87c66.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b174364f.js"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:lt(()=>import("./AuthWithOAuth2Docs-3045a640.js"),["./AuthWithOAuth2Docs-3045a640.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b174364f.js"],import.meta.url)},refresh:{label:"Auth refresh",component:lt(()=>import("./AuthRefreshDocs-76212dfb.js"),["./AuthRefreshDocs-76212dfb.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b174364f.js"],import.meta.url)},"request-verification":{label:"Request verification",component:lt(()=>import("./RequestVerificationDocs-761941b0.js"),["./RequestVerificationDocs-761941b0.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:lt(()=>import("./ConfirmVerificationDocs-a85ed388.js"),["./ConfirmVerificationDocs-a85ed388.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:lt(()=>import("./RequestPasswordResetDocs-b384ed30.js"),["./RequestPasswordResetDocs-b384ed30.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:lt(()=>import("./ConfirmPasswordResetDocs-0f92024f.js"),["./ConfirmPasswordResetDocs-0f92024f.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:lt(()=>import("./RequestEmailChangeDocs-de51a89c.js"),["./RequestEmailChangeDocs-de51a89c.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:lt(()=>import("./ConfirmEmailChangeDocs-0832d705.js"),["./ConfirmEmailChangeDocs-0832d705.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:lt(()=>import("./AuthMethodsDocs-bf9bb316.js"),["./AuthMethodsDocs-bf9bb316.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b174364f.js"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:lt(()=>import("./ListExternalAuthsDocs-8dcfc016.js"),["./ListExternalAuthsDocs-8dcfc016.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b174364f.js"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:lt(()=>import("./UnlinkExternalAuthDocs-26f50166.js"),["./UnlinkExternalAuthDocs-26f50166.js","./SdkTabs-cf23198f.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o={},r,a=[];a.length&&(r=Object.keys(a)[0]);function f(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function u(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>u(),m=y=>c(y);function _(y){ne[y?"unshift":"push"](()=>{l=y,t(4,l)})}function h(y){Fe.call(this,n,y)}function g(y){Fe.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.type==="auth"?(t(3,a=Object.assign({},i,s)),!o.options.allowUsernameAuth&&!o.options.allowEmailAuth&&delete a["auth-with-password"],o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):o.type==="view"?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[u,c,o,a,l,r,i,f,d,m,_,h,g]}class IM extends be{constructor(e){super(),ge(this,e,AM,DM,pe,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function LM(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0]),p(e,"aria-label","Copy")},m(o,r){w(o,e,r),s||(l=[Se(i=je.call(null,e,n[2]?"":"Copy")),Y(e,"click",Pn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&Dt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:x,o:x,d(o){o&&k(e),s=!1,Ce(l)}}}function PM(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(H.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return Kt(()=>()=>{r&&clearTimeout(r)}),n.$$set=f=>{"value"in f&&t(4,i=f.value),"idleClasses"in f&&t(0,s=f.idleClasses),"successClasses"in f&&t(1,l=f.successClasses),"successDuration"in f&&t(5,o=f.successDuration)},[s,l,r,a,i,o]}class Rs extends be{constructor(e){super(),ge(this,e,PM,LM,pe,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function FM(n){let e,t,i,s,l,o,r,a,f,u;return l=new Rs({props:{value:n[1]}}),{c(){e=v("div"),t=v("span"),i=U(n[1]),s=O(),z(l.$$.fragment),o=O(),r=v("i"),p(t,"class","secret svelte-1md8247"),p(r,"class","ri-refresh-line txt-sm link-hint"),p(r,"aria-label","Refresh"),p(e,"class","flex flex-gap-5 p-5")},m(c,d){w(c,e,d),b(e,t),b(t,i),n[6](t),b(e,s),j(l,e,null),b(e,o),b(e,r),a=!0,f||(u=[Se(je.call(null,r,"Refresh")),Y(r,"click",n[4])],f=!0)},p(c,d){(!a||d&2)&&se(i,c[1]);const m={};d&2&&(m.value=c[1]),l.$set(m)},i(c){a||(A(l.$$.fragment,c),a=!0)},o(c){L(l.$$.fragment,c),a=!1},d(c){c&&k(e),n[6](null),V(l),f=!1,Ce(u)}}}function NM(n){let e,t,i,s,l,o,r,a,f,u;function c(m){n[7](m)}let d={class:"dropdown dropdown-upside dropdown-center dropdown-nowrap",$$slots:{default:[FM]},$$scope:{ctx:n}};return n[3]!==void 0&&(d.active=n[3]),s=new Nn({props:d}),ne.push(()=>de(s,"active",c)),s.$on("show",n[4]),{c(){e=v("button"),t=v("i"),i=O(),z(s.$$.fragment),p(t,"class","ri-sparkling-line"),p(e,"tabindex","-1"),p(e,"type","button"),p(e,"aria-label","Generate"),p(e,"class",o="btn btn-circle "+n[0]+" svelte-1md8247")},m(m,_){w(m,e,_),b(e,t),b(e,i),j(s,e,null),a=!0,f||(u=Se(r=je.call(null,e,n[3]?"":"Generate")),f=!0)},p(m,[_]){const h={};_&518&&(h.$$scope={dirty:_,ctx:m}),!l&&_&8&&(l=!0,h.active=m[3],_e(()=>l=!1)),s.$set(h),(!a||_&1&&o!==(o="btn btn-circle "+m[0]+" svelte-1md8247"))&&p(e,"class",o),r&&Dt(r.update)&&_&8&&r.update.call(null,m[3]?"":"Generate")},i(m){a||(A(s.$$.fragment,m),a=!0)},o(m){L(s.$$.fragment,m),a=!1},d(m){m&&k(e),V(s),f=!1,u()}}}function RM(n,e,t){const i=yt();let{class:s="btn-sm btn-hint btn-transparent"}=e,{length:l=32}=e,o="",r,a=!1;async function f(){if(t(1,o=H.randomSecret(l)),i("generate",o),await sn(),r){let d=document.createRange();d.selectNode(r),window.getSelection().removeAllRanges(),window.getSelection().addRange(d)}}function u(d){ne[d?"unshift":"push"](()=>{r=d,t(2,r)})}function c(d){a=d,t(3,a)}return n.$$set=d=>{"class"in d&&t(0,s=d.class),"length"in d&&t(5,l=d.length)},[s,o,r,a,f,l,u,c]}class v1 extends be{constructor(e){super(),ge(this,e,RM,NM,pe,{class:0,length:5})}}function qM(n){let e,t,i,s,l,o,r,a,f,u,c,d;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Username",o=O(),r=v("input"),p(t,"class",H.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","text"),p(r,"requried",a=!n[2]),p(r,"placeholder",f=n[2]?"Leave empty to auto generate...":n[4]),p(r,"id",u=n[13])},m(m,_){w(m,e,_),b(e,t),b(e,i),b(e,s),w(m,o,_),w(m,r,_),oe(r,n[0].username),c||(d=Y(r,"input",n[5]),c=!0)},p(m,_){_&8192&&l!==(l=m[13])&&p(e,"for",l),_&4&&a!==(a=!m[2])&&p(r,"requried",a),_&4&&f!==(f=m[2]?"Leave empty to auto generate...":m[4])&&p(r,"placeholder",f),_&8192&&u!==(u=m[13])&&p(r,"id",u),_&1&&r.value!==m[0].username&&oe(r,m[0].username)},d(m){m&&k(e),m&&k(o),m&&k(r),c=!1,d()}}}function jM(n){let e,t,i,s,l,o,r,a,f,u,c=n[0].emailVisibility?"On":"Off",d,m,_,h,g,y,S,C;return{c(){var $;e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("div"),a=v("button"),f=v("span"),u=U("Public: "),d=U(c),_=O(),h=v("input"),p(t,"class",H.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[13]),p(f,"class","txt"),p(a,"type","button"),p(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(h,"type","email"),h.autofocus=n[2],p(h,"autocomplete","off"),p(h,"id",g=n[13]),h.required=y=($=n[1].options)==null?void 0:$.requireEmail,p(h,"class","svelte-1751a4d")},m($,T){w($,e,T),b(e,t),b(e,i),b(e,s),w($,o,T),w($,r,T),b(r,a),b(a,f),b(f,u),b(f,d),w($,_,T),w($,h,T),oe(h,n[0].email),n[2]&&h.focus(),S||(C=[Se(je.call(null,a,{text:"Make email public or private",position:"top-right"})),Y(a,"click",n[6]),Y(h,"input",n[7])],S=!0)},p($,T){var M;T&8192&&l!==(l=$[13])&&p(e,"for",l),T&1&&c!==(c=$[0].emailVisibility?"On":"Off")&&se(d,c),T&1&&m!==(m="btn btn-sm btn-transparent "+($[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",m),T&4&&(h.autofocus=$[2]),T&8192&&g!==(g=$[13])&&p(h,"id",g),T&2&&y!==(y=(M=$[1].options)==null?void 0:M.requireEmail)&&(h.required=y),T&1&&h.value!==$[0].email&&oe(h,$[0].email)},d($){$&&k(e),$&&k(o),$&&k(r),$&&k(_),$&&k(h),S=!1,Ce(C)}}}function Tp(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[VM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&24584&&(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){V(e,i)}}}function VM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(f,u){w(f,e,u),e.checked=n[3],w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(f,u){u&8192&&t!==(t=f[13])&&p(e,"id",t),u&8&&(e.checked=f[3]),u&8192&&o!==(o=f[13])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function Mp(n){let e,t,i,s,l,o,r,a,f;return s=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[zM,({uniqueId:u})=>({13:u}),({uniqueId:u})=>u?8192:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[HM,({uniqueId:u})=>({13:u}),({uniqueId:u})=>u?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=O(),o=v("div"),z(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),Q(t,"p-t-xs",n[3]),p(e,"class","block")},m(u,c){w(u,e,c),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),f=!0},p(u,c){const d={};c&24577&&(d.$$scope={dirty:c,ctx:u}),s.$set(d);const m={};c&24577&&(m.$$scope={dirty:c,ctx:u}),r.$set(m),(!f||c&8)&&Q(t,"p-t-xs",u[3])},i(u){f||(A(s.$$.fragment,u),A(r.$$.fragment,u),u&&Ge(()=>{f&&(a||(a=Re(e,tt,{duration:150},!0)),a.run(1))}),f=!0)},o(u){L(s.$$.fragment,u),L(r.$$.fragment,u),u&&(a||(a=Re(e,tt,{duration:150},!1)),a.run(0)),f=!1},d(u){u&&k(e),V(s),V(r),u&&a&&a.end()}}}function zM(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_;return c=new v1({}),{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),f=O(),u=v("div"),z(c.$$.fragment),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0,p(u,"class","form-field-addon")},m(h,g){w(h,e,g),b(e,t),b(e,i),b(e,s),w(h,o,g),w(h,r,g),oe(r,n[0].password),w(h,f,g),w(h,u,g),j(c,u,null),d=!0,m||(_=Y(r,"input",n[9]),m=!0)},p(h,g){(!d||g&8192&&l!==(l=h[13]))&&p(e,"for",l),(!d||g&8192&&a!==(a=h[13]))&&p(r,"id",a),g&1&&r.value!==h[0].password&&oe(r,h[0].password)},i(h){d||(A(c.$$.fragment,h),d=!0)},o(h){L(c.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(o),h&&k(r),h&&k(f),h&&k(u),V(c),m=!1,_()}}}function HM(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),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),oe(r,n[0].passwordConfirm),f||(u=Y(r,"input",n[10]),f=!0)},p(c,d){d&8192&&l!==(l=c[13])&&p(e,"for",l),d&8192&&a!==(a=c[13])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&oe(r,c[0].passwordConfirm)},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,u()}}}function BM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(f,u){w(f,e,u),e.checked=n[0].verified,w(f,i,u),w(f,s,u),b(s,l),r||(a=[Y(e,"change",n[11]),Y(e,"change",Xe(n[12]))],r=!0)},p(f,u){u&8192&&t!==(t=f[13])&&p(e,"id",t),u&1&&(e.checked=f[0].verified),u&8192&&o!==(o=f[13])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,Ce(a)}}}function UM(n){var g;let e,t,i,s,l,o,r,a,f,u,c,d,m;i=new ce({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[qM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field "+((g=n[1].options)!=null&&g.requireEmail?"required":""),name:"email",$$slots:{default:[jM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}});let _=!n[2]&&Tp(n),h=(n[2]||n[3])&&Mp(n);return d=new ce({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[BM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(o.$$.fragment),r=O(),a=v("div"),_&&_.c(),f=O(),h&&h.c(),u=O(),c=v("div"),z(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,S){w(y,e,S),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),_&&_.m(a,null),b(a,f),h&&h.m(a,null),b(e,u),b(e,c),j(d,c,null),m=!0},p(y,[S]){var M;const C={};S&4&&(C.class="form-field "+(y[2]?"":"required")),S&24581&&(C.$$scope={dirty:S,ctx:y}),i.$set(C);const $={};S&2&&($.class="form-field "+((M=y[1].options)!=null&&M.requireEmail?"required":"")),S&24583&&($.$$scope={dirty:S,ctx:y}),o.$set($),y[2]?_&&(re(),L(_,1,1,()=>{_=null}),ae()):_?(_.p(y,S),S&4&&A(_,1)):(_=Tp(y),_.c(),A(_,1),_.m(a,f)),y[2]||y[3]?h?(h.p(y,S),S&12&&A(h,1)):(h=Mp(y),h.c(),A(h,1),h.m(a,null)):h&&(re(),L(h,1,1,()=>{h=null}),ae());const T={};S&24581&&(T.$$scope={dirty:S,ctx:y}),d.$set(T)},i(y){m||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(_),A(h),A(d.$$.fragment,y),m=!0)},o(y){L(i.$$.fragment,y),L(o.$$.fragment,y),L(_),L(h),L(d.$$.fragment,y),m=!1},d(y){y&&k(e),V(i),V(o),_&&_.d(),h&&h.d(),V(d)}}}function WM(n,e,t){let{record:i}=e,{collection:s}=e,{isNew:l=!i.id}=e,o=i.username||null,r=!1;function a(){i.username=this.value,t(0,i),t(3,r)}const f=()=>t(0,i.emailVisibility=!i.emailVisibility,i);function u(){i.email=this.value,t(0,i),t(3,r)}function c(){r=this.checked,t(3,r)}function d(){i.password=this.value,t(0,i),t(3,r)}function m(){i.passwordConfirm=this.value,t(0,i),t(3,r)}function _(){i.verified=this.checked,t(0,i),t(3,r)}const h=g=>{l||mn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,i.verified=!g.target.checked,i)})};return n.$$set=g=>{"record"in g&&t(0,i=g.record),"collection"in g&&t(1,s=g.collection),"isNew"in g&&t(2,l=g.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!i.username&&i.username!==null&&t(0,i.username=null,i),n.$$.dirty&8&&(r||(t(0,i.password=null,i),t(0,i.passwordConfirm=null,i),ci("password"),ci("passwordConfirm")))},[i,s,l,r,o,a,f,u,c,d,m,_,h]}class YM extends be{constructor(e){super(),ge(this,e,WM,UM,pe,{record:0,collection:1,isNew:2})}}function KM(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight,o)+"px",r))},0)}function u(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const _=r.closest("form");_!=null&&_.requestSubmit&&_.requestSubmit()}}Kt(()=>(f(),()=>clearTimeout(a)));function c(m){ne[m?"unshift":"push"](()=>{r=m,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=qe(qe({},e),Xt(m)),t(3,s=Qe(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&f()},[l,r,u,s,o,c,d]}class ZM extends be{constructor(e){super(),ge(this,e,JM,KM,pe,{value:0,maxHeight:4})}}function GM(n){let e,t,i,s,l,o=n[1].name+"",r,a,f,u,c,d;function m(h){n[2](h)}let _={id:n[3],required:n[1].required};return n[0]!==void 0&&(_.value=n[0]),u=new ZM({props:_}),ne.push(()=>de(u,"value",m)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),f=O(),z(u.$$.fragment),p(t,"class",i=H.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(h,g){w(h,e,g),b(e,t),b(e,s),b(e,l),b(l,r),w(h,f,g),j(u,h,g),d=!0},p(h,g){(!d||g&2&&i!==(i=H.getFieldTypeIcon(h[1].type)))&&p(t,"class",i),(!d||g&2)&&o!==(o=h[1].name+"")&&se(r,o),(!d||g&8&&a!==(a=h[3]))&&p(e,"for",a);const y={};g&8&&(y.id=h[3]),g&2&&(y.required=h[1].required),!c&&g&1&&(c=!0,y.value=h[0],_e(()=>c=!1)),u.$set(y)},i(h){d||(A(u.$$.fragment,h),d=!0)},o(h){L(u.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(f),V(u,h)}}}function XM(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[GM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function QM(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class xM extends be{constructor(e){super(),ge(this,e,QM,XM,pe,{field:1,value:0})}}function e5(n){let e,t,i,s,l,o=n[1].name+"",r,a,f,u,c,d,m,_,h,g;return{c(){var y,S;e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),f=O(),u=v("input"),p(t,"class",i=H.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(u,"type","number"),p(u,"id",c=n[3]),u.required=d=n[1].required,p(u,"min",m=(y=n[1].options)==null?void 0:y.min),p(u,"max",_=(S=n[1].options)==null?void 0:S.max),p(u,"step","any")},m(y,S){w(y,e,S),b(e,t),b(e,s),b(e,l),b(l,r),w(y,f,S),w(y,u,S),oe(u,n[0]),h||(g=Y(u,"input",n[2]),h=!0)},p(y,S){var C,$;S&2&&i!==(i=H.getFieldTypeIcon(y[1].type))&&p(t,"class",i),S&2&&o!==(o=y[1].name+"")&&se(r,o),S&8&&a!==(a=y[3])&&p(e,"for",a),S&8&&c!==(c=y[3])&&p(u,"id",c),S&2&&d!==(d=y[1].required)&&(u.required=d),S&2&&m!==(m=(C=y[1].options)==null?void 0:C.min)&&p(u,"min",m),S&2&&_!==(_=($=y[1].options)==null?void 0:$.max)&&p(u,"max",_),S&1&&pt(u.value)!==y[0]&&oe(u,y[0])},d(y){y&&k(e),y&&k(f),y&&k(u),h=!1,g()}}}function t5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[e5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function n5(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=pt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class i5 extends be{constructor(e){super(),ge(this,e,n5,t5,pe,{field:1,value:0})}}function s5(n){let e,t,i,s,l=n[1].name+"",o,r,a,f;return{c(){e=v("input"),i=O(),s=v("label"),o=U(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(u,c){w(u,e,c),e.checked=n[0],w(u,i,c),w(u,s,c),b(s,o),a||(f=Y(e,"change",n[2]),a=!0)},p(u,c){c&8&&t!==(t=u[3])&&p(e,"id",t),c&1&&(e.checked=u[0]),c&2&&l!==(l=u[1].name+"")&&se(o,l),c&8&&r!==(r=u[3])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),a=!1,f()}}}function l5(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[s5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function o5(n,e,t){let{field:i}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class r5 extends be{constructor(e){super(),ge(this,e,o5,l5,pe,{field:1,value:0})}}function a5(n){let e,t,i,s,l,o=n[1].name+"",r,a,f,u,c,d,m,_;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),f=O(),u=v("input"),p(t,"class",i=H.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(u,"type","email"),p(u,"id",c=n[3]),u.required=d=n[1].required},m(h,g){w(h,e,g),b(e,t),b(e,s),b(e,l),b(l,r),w(h,f,g),w(h,u,g),oe(u,n[0]),m||(_=Y(u,"input",n[2]),m=!0)},p(h,g){g&2&&i!==(i=H.getFieldTypeIcon(h[1].type))&&p(t,"class",i),g&2&&o!==(o=h[1].name+"")&&se(r,o),g&8&&a!==(a=h[3])&&p(e,"for",a),g&8&&c!==(c=h[3])&&p(u,"id",c),g&2&&d!==(d=h[1].required)&&(u.required=d),g&1&&u.value!==h[0]&&oe(u,h[0])},d(h){h&&k(e),h&&k(f),h&&k(u),m=!1,_()}}}function f5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[a5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function u5(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class c5 extends be{constructor(e){super(),ge(this,e,u5,f5,pe,{field:1,value:0})}}function d5(n){let e,t,i,s,l,o=n[1].name+"",r,a,f,u,c,d,m,_;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),f=O(),u=v("input"),p(t,"class",i=H.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(u,"type","url"),p(u,"id",c=n[3]),u.required=d=n[1].required},m(h,g){w(h,e,g),b(e,t),b(e,s),b(e,l),b(l,r),w(h,f,g),w(h,u,g),oe(u,n[0]),m||(_=Y(u,"input",n[2]),m=!0)},p(h,g){g&2&&i!==(i=H.getFieldTypeIcon(h[1].type))&&p(t,"class",i),g&2&&o!==(o=h[1].name+"")&&se(r,o),g&8&&a!==(a=h[3])&&p(e,"for",a),g&8&&c!==(c=h[3])&&p(u,"id",c),g&2&&d!==(d=h[1].required)&&(u.required=d),g&1&&u.value!==h[0]&&oe(u,h[0])},d(h){h&&k(e),h&&k(f),h&&k(u),m=!1,_()}}}function p5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[d5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function m5(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class h5 extends be{constructor(e){super(),ge(this,e,m5,p5,pe,{field:1,value:0})}}function Op(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){w(l,e,o),b(e,t),i||(s=[Se(je.call(null,t,"Clear")),Y(t,"click",n[5])],i=!0)},p:x,d(l){l&&k(e),i=!1,Ce(s)}}}function _5(n){let e,t,i,s,l,o=n[1].name+"",r,a,f,u,c,d,m,_,h,g=n[0]&&!n[1].required&&Op(n);function y($){n[6]($)}function S($){n[7]($)}let C={id:n[8],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(C.value=n[2]),n[0]!==void 0&&(C.formattedValue=n[0]),d=new tf({props:C}),ne.push(()=>de(d,"value",y)),ne.push(()=>de(d,"formattedValue",S)),d.$on("close",n[3]),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),a=U(" (UTC)"),u=O(),g&&g.c(),c=O(),z(d.$$.fragment),p(t,"class",i=ki(H.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",f=n[8])},m($,T){w($,e,T),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),w($,u,T),g&&g.m($,T),w($,c,T),j(d,$,T),h=!0},p($,T){(!h||T&2&&i!==(i=ki(H.getFieldTypeIcon($[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!h||T&2)&&o!==(o=$[1].name+"")&&se(r,o),(!h||T&256&&f!==(f=$[8]))&&p(e,"for",f),$[0]&&!$[1].required?g?g.p($,T):(g=Op($),g.c(),g.m(c.parentNode,c)):g&&(g.d(1),g=null);const M={};T&256&&(M.id=$[8]),!m&&T&4&&(m=!0,M.value=$[2],_e(()=>m=!1)),!_&&T&1&&(_=!0,M.formattedValue=$[0],_e(()=>_=!1)),d.$set(M)},i($){h||(A(d.$$.fragment,$),h=!0)},o($){L(d.$$.fragment,$),h=!1},d($){$&&k(e),$&&k(u),g&&g.d($),$&&k(c),V(d,$)}}}function g5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[_5,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(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){V(e,i)}}}function b5(n,e,t){let{field:i}=e,{value:s=void 0}=e,l=s;function o(c){c.detail&&c.detail.length==3&&t(0,s=c.detail[1])}function r(){t(0,s="")}const a=()=>r();function f(c){l=c,t(2,l),t(0,s)}function u(c){s=c,t(0,s)}return n.$$set=c=>{"field"in c&&t(1,i=c.field),"value"in c&&t(0,s=c.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,f,u]}class v5 extends be{constructor(e){super(),ge(this,e,b5,g5,pe,{field:1,value:0})}}function Ep(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=U("Select up to "),s=U(i),l=U(" items."),p(e,"class","help-block")},m(o,r){w(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&se(s,i)},d(o){o&&k(e)}}}function y5(n){var S,C,$,T,M,E;let e,t,i,s,l,o=n[1].name+"",r,a,f,u,c,d,m,_;function h(D){n[3](D)}let g={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||((S=n[0])==null?void 0:S.length)>=((C=n[1].options)==null?void 0:C.maxSelect),items:($=n[1].options)==null?void 0:$.values,searchable:((M=(T=n[1].options)==null?void 0:T.values)==null?void 0:M.length)>5};n[0]!==void 0&&(g.selected=n[0]),u=new b1({props:g}),ne.push(()=>de(u,"selected",h));let y=((E=n[1].options)==null?void 0:E.maxSelect)>1&&Ep(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),f=O(),z(u.$$.fragment),d=O(),y&&y.c(),m=ye(),p(t,"class",i=H.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(D,I){w(D,e,I),b(e,t),b(e,s),b(e,l),b(l,r),w(D,f,I),j(u,D,I),w(D,d,I),y&&y.m(D,I),w(D,m,I),_=!0},p(D,I){var F,N,R,q,B,K;(!_||I&2&&i!==(i=H.getFieldTypeIcon(D[1].type)))&&p(t,"class",i),(!_||I&2)&&o!==(o=D[1].name+"")&&se(r,o),(!_||I&16&&a!==(a=D[4]))&&p(e,"for",a);const P={};I&16&&(P.id=D[4]),I&6&&(P.toggle=!D[1].required||D[2]),I&4&&(P.multiple=D[2]),I&7&&(P.closable=!D[2]||((F=D[0])==null?void 0:F.length)>=((N=D[1].options)==null?void 0:N.maxSelect)),I&2&&(P.items=(R=D[1].options)==null?void 0:R.values),I&2&&(P.searchable=((B=(q=D[1].options)==null?void 0:q.values)==null?void 0:B.length)>5),!c&&I&1&&(c=!0,P.selected=D[0],_e(()=>c=!1)),u.$set(P),((K=D[1].options)==null?void 0:K.maxSelect)>1?y?y.p(D,I):(y=Ep(D),y.c(),y.m(m.parentNode,m)):y&&(y.d(1),y=null)},i(D){_||(A(u.$$.fragment,D),_=!0)},o(D){L(u.$$.fragment,D),_=!1},d(D){D&&k(e),D&&k(f),V(u,D),D&&k(d),y&&y.d(D),D&&k(m)}}}function k5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[y5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function w5(n,e,t){let i,{field:s}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class S5 extends be{constructor(e){super(),ge(this,e,w5,k5,pe,{field:1,value:0})}}function $5(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function C5(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function T5(n){let e;return{c(){e=v("input"),p(e,"type","text"),p(e,"class","txt-mono"),e.value="Loading...",e.disabled=!0},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function M5(n){let e,t,i;var s=n[3];function l(o){return{props:{id:o[6],maxHeight:"500",language:"json",value:o[2]}}}return s&&(e=Ot(s,l(n)),e.$on("change",n[5])),{c(){e&&z(e.$$.fragment),t=ye()},m(o,r){e&&j(e,o,r),w(o,t,r),i=!0},p(o,r){const a={};if(r&64&&(a.id=o[6]),r&4&&(a.value=o[2]),r&8&&s!==(s=o[3])){if(e){re();const f=e;L(f.$$.fragment,1,0,()=>{V(f,1)}),ae()}s?(e=Ot(s,l(o)),e.$on("change",o[5]),z(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else s&&e.$set(a)},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&L(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&V(e,o)}}}function O5(n){let e,t,i,s,l,o=n[1].name+"",r,a,f,u,c,d,m,_,h,g,y,S;function C(I,P){return I[4]?C5:$5}let $=C(n),T=$(n);const M=[M5,T5],E=[];function D(I,P){return I[3]?0:1}return m=D(n),_=E[m]=M[m](n),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),a=O(),f=v("span"),T.c(),d=O(),_.c(),h=ye(),p(t,"class",i=ki(H.getFieldTypeIcon(n[1].type))+" svelte-p6ecb8"),p(l,"class","txt"),p(f,"class","json-state svelte-p6ecb8"),p(e,"for",c=n[6])},m(I,P){w(I,e,P),b(e,t),b(e,s),b(e,l),b(l,r),b(e,a),b(e,f),T.m(f,null),w(I,d,P),E[m].m(I,P),w(I,h,P),g=!0,y||(S=Se(u=je.call(null,f,{position:"left",text:n[4]?"Valid JSON":"Invalid JSON"})),y=!0)},p(I,P){(!g||P&2&&i!==(i=ki(H.getFieldTypeIcon(I[1].type))+" svelte-p6ecb8"))&&p(t,"class",i),(!g||P&2)&&o!==(o=I[1].name+"")&&se(r,o),$!==($=C(I))&&(T.d(1),T=$(I),T&&(T.c(),T.m(f,null))),u&&Dt(u.update)&&P&16&&u.update.call(null,{position:"left",text:I[4]?"Valid JSON":"Invalid JSON"}),(!g||P&64&&c!==(c=I[6]))&&p(e,"for",c);let F=m;m=D(I),m===F?E[m].p(I,P):(re(),L(E[F],1,1,()=>{E[F]=null}),ae(),_=E[m],_?_.p(I,P):(_=E[m]=M[m](I),_.c()),A(_,1),_.m(h.parentNode,h))},i(I){g||(A(_),g=!0)},o(I){L(_),g=!1},d(I){I&&k(e),T.d(),I&&k(d),E[m].d(I),I&&k(h),y=!1,S()}}}function E5(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[O5,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&223&&(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){V(e,i)}}}function Dp(n){return JSON.stringify(typeof n>"u"?null:n,null,2)}function D5(n){try{return JSON.parse(n===""?null:n),!0}catch{}return!1}function A5(n,e,t){let i,{field:s}=e,{value:l=void 0}=e,o,r=Dp(l);Kt(async()=>{try{t(3,o=(await lt(()=>import("./CodeEditor-7fe9ddeb.js"),["./CodeEditor-7fe9ddeb.js","./index-4841d67b.js"],import.meta.url)).default)}catch(f){console.warn(f)}});const a=f=>{t(2,r=f.detail),t(0,l=r.trim())};return n.$$set=f=>{"field"in f&&t(1,s=f.field),"value"in f&&t(0,l=f.value)},n.$$.update=()=>{n.$$.dirty&5&&l!==(r==null?void 0:r.trim())&&(t(2,r=Dp(l)),t(0,l=r)),n.$$.dirty&4&&t(4,i=D5(r))},[l,s,r,o,i,a]}class I5 extends be{constructor(e){super(),ge(this,e,A5,E5,pe,{field:1,value:0})}}function L5(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function P5(n){let e,t,i;return{c(){e=v("img"),p(e,"draggable",!1),_n(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!_n(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function F5(n){let e;function t(l,o){return l[2]?P5:L5}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:x,o:x,d(l){s.d(l),l&&k(e)}}}function N5(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){H.hasImageExtension(s==null?void 0:s.name)?H.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{t(2,i=""),console.warn("Unable to generate thumb: ",r)}):t(2,i="")}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class R5 extends be{constructor(e){super(),ge(this,e,N5,F5,pe,{file:0,size:1})}}function Ap(n){let e;function t(l,o){return l[4]==="image"?j5:q5}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 q5(n){let e,t;return{c(){e=v("object"),t=U("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){w(i,e,s),b(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&k(e)}}}function j5(n){let e,t,i;return{c(){e=v("img"),_n(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){w(s,e,l)},p(s,l){l&2&&!_n(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&k(e)}}}function V5(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Ap(n);return{c(){i&&i.c(),t=ye()},m(l,o){i&&i.m(l,o),w(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Ap(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&k(t)}}}function z5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Xe(n[0])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function H5(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("a"),t=U(n[2]),i=O(),s=v("i"),l=O(),o=v("div"),r=O(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,l,d),w(c,o,d),w(c,r,d),w(c,a,d),f||(u=Y(a,"click",n[0]),f=!0)},p(c,d){d&4&&se(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&k(e),c&&k(l),c&&k(o),c&&k(r),c&&k(a),f=!1,u()}}}function B5(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[H5],header:[z5],default:[V5]},$$scope:{ctx:n}};return e=new ln({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(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[7](null),V(e,s)}}}function U5(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function f(){return o==null?void 0:o.hide()}function u(m){ne[m?"unshift":"push"](()=>{o=m,t(3,o)})}function c(m){Fe.call(this,n,m)}function d(m){Fe.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=H.getFileType(s))},[f,r,s,o,l,a,i,u,c,d]}class W5 extends be{constructor(e){super(),ge(this,e,U5,B5,pe,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function Y5(n){let e,t,i,s,l;function o(f,u){return f[3]==="image"?G5:f[3]==="video"||f[3]==="audio"?Z5:J5}let r=o(n),a=r(n);return{c(){e=v("a"),a.c(),p(e,"draggable",!1),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(f,u){w(f,e,u),a.m(e,null),s||(l=Y(e,"click",Pn(n[11])),s=!0)},p(f,u){r===(r=o(f))&&a?a.p(f,u):(a.d(1),a=r(f),a&&(a.c(),a.m(e,null))),u&2&&t!==(t="thumb "+(f[1]?`thumb-${f[1]}`:""))&&p(e,"class",t),u&64&&p(e,"href",f[6]),u&129&&i!==(i=(f[7]?"Preview":"Download")+" "+f[0])&&p(e,"title",i)},d(f){f&&k(e),a.d(),s=!1,l()}}}function K5(n){let e,t;return{c(){e=v("div"),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){w(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&p(e,"class",t)},d(i){i&&k(e)}}}function J5(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Z5(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function G5(n){let e,t,i,s,l;return{c(){e=v("img"),p(e,"draggable",!1),_n(e.src,t=n[5])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),p(e,"loading","lazy")},m(o,r){w(o,e,r),s||(l=Y(e,"error",n[8]),s=!0)},p(o,r){r&32&&!_n(e.src,t=o[5])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&k(e),s=!1,l()}}}function X5(n){let e,t,i;function s(a,f){return a[2]?K5:Y5}let l=s(n),o=l(n),r={};return t=new W5({props:r}),n[12](t),{c(){o.c(),e=O(),z(t.$$.fragment)},m(a,f){o.m(a,f),w(a,e,f),j(t,a,f),i=!0},p(a,[f]){l===(l=s(a))&&o?o.p(a,f):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const u={};t.$set(u)},i(a){i||(A(t.$$.fragment,a),i=!0)},o(a){L(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&k(e),n[12](null),V(t,a)}}}function Q5(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,f="",u="",c="",d=!1;m();async function m(){t(2,d=!0);try{t(10,c=await ue.getAdminFileToken(l.collectionId))}catch(y){console.warn("File token failure:",y)}t(2,d=!1)}function _(){t(5,f="")}const h=y=>{s&&(y.preventDefault(),a==null||a.show(u))};function g(y){ne[y?"unshift":"push"](()=>{a=y,t(4,a)})}return n.$$set=y=>{"record"in y&&t(9,l=y.record),"filename"in y&&t(0,o=y.filename),"size"in y&&t(1,r=y.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=H.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,u=d?"":ue.files.getUrl(l,o,{token:c})),n.$$.dirty&1541&&t(5,f=d?"":ue.files.getUrl(l,o,{thumb:"100x100",token:c}))},[o,r,d,i,a,f,u,s,_,l,c,h,g]}class sf extends be{constructor(e){super(),ge(this,e,Q5,X5,pe,{record:9,filename:0,size:1})}}function Ip(n,e,t){const i=n.slice();return i[29]=e[t],i[31]=t,i}function Lp(n,e,t){const i=n.slice();i[34]=e[t],i[31]=t;const s=i[2].includes(i[34]);return i[35]=s,i}function x5(n){let e,t,i;function s(){return n[17](n[34])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){w(l,e,o),t||(i=[Se(je.call(null,e,"Remove file")),Y(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Ce(i)}}}function e6(n){let e,t,i;function s(){return n[16](n[34])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){w(l,e,o),t||(i=Y(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,i()}}}function t6(n){let e,t,i,s,l,o,r=n[34]+"",a,f,u,c,d,m;i=new sf({props:{record:n[3],filename:n[34]}});function _(y,S){return y[35]?e6:x5}let h=_(n),g=h(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),o=v("a"),a=U(r),c=O(),d=v("div"),g.c(),Q(t,"fade",n[35]),p(o,"draggable",!1),p(o,"href",f=ue.files.getUrl(n[3],n[34],{token:n[10]})),p(o,"class",u="txt-ellipsis "+(n[35]?"txt-strikethrough txt-hint":"link-primary")),p(o,"title","Download"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),p(l,"class","content"),p(d,"class","actions"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(y,S){w(y,e,S),b(e,t),j(i,t,null),b(e,s),b(e,l),b(l,o),b(o,a),b(e,c),b(e,d),g.m(d,null),m=!0},p(y,S){const C={};S[0]&8&&(C.record=y[3]),S[0]&32&&(C.filename=y[34]),i.$set(C),(!m||S[0]&36)&&Q(t,"fade",y[35]),(!m||S[0]&32)&&r!==(r=y[34]+"")&&se(a,r),(!m||S[0]&1064&&f!==(f=ue.files.getUrl(y[3],y[34],{token:y[10]})))&&p(o,"href",f),(!m||S[0]&36&&u!==(u="txt-ellipsis "+(y[35]?"txt-strikethrough txt-hint":"link-primary")))&&p(o,"class",u),h===(h=_(y))&&g?g.p(y,S):(g.d(1),g=h(y),g&&(g.c(),g.m(d,null))),(!m||S[1]&2)&&Q(e,"dragging",y[32]),(!m||S[1]&4)&&Q(e,"dragover",y[33])},i(y){m||(A(i.$$.fragment,y),m=!0)},o(y){L(i.$$.fragment,y),m=!1},d(y){y&&k(e),V(i),g.d()}}}function Pp(n,e){let t,i,s,l;function o(a){e[18](a)}let r={group:e[4].name+"_uploaded",index:e[31],disabled:!e[6],$$slots:{default:[t6,({dragging:a,dragover:f})=>({32:a,33:f}),({dragging:a,dragover:f})=>[0,(a?2:0)|(f?4:0)]]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.list=e[0]),i=new Al({props:r}),ne.push(()=>de(i,"list",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,f){w(a,t,f),j(i,a,f),l=!0},p(a,f){e=a;const u={};f[0]&16&&(u.group=e[4].name+"_uploaded"),f[0]&32&&(u.index=e[31]),f[0]&64&&(u.disabled=!e[6]),f[0]&1068|f[1]&70&&(u.$$scope={dirty:f,ctx:e}),!s&&f[0]&1&&(s=!0,u.list=e[0],_e(()=>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),V(i,a)}}}function n6(n){let e,t,i,s,l,o,r,a,f=n[29].name+"",u,c,d,m,_,h,g;i=new R5({props:{file:n[29]}});function y(){return n[19](n[31])}return{c(){e=v("div"),t=v("figure"),z(i.$$.fragment),s=O(),l=v("div"),o=v("small"),o.textContent="New",r=O(),a=v("span"),u=U(f),d=O(),m=v("button"),m.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename m-r-auto"),p(l,"title",c=n[29].name),p(m,"type","button"),p(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(S,C){w(S,e,C),b(e,t),j(i,t,null),b(e,s),b(e,l),b(l,o),b(l,r),b(l,a),b(a,u),b(e,d),b(e,m),_=!0,h||(g=[Se(je.call(null,m,"Remove file")),Y(m,"click",y)],h=!0)},p(S,C){n=S;const $={};C[0]&2&&($.file=n[29]),i.$set($),(!_||C[0]&2)&&f!==(f=n[29].name+"")&&se(u,f),(!_||C[0]&2&&c!==(c=n[29].name))&&p(l,"title",c),(!_||C[1]&2)&&Q(e,"dragging",n[32]),(!_||C[1]&4)&&Q(e,"dragover",n[33])},i(S){_||(A(i.$$.fragment,S),_=!0)},o(S){L(i.$$.fragment,S),_=!1},d(S){S&&k(e),V(i),h=!1,Ce(g)}}}function Fp(n,e){let t,i,s,l;function o(a){e[20](a)}let r={group:e[4].name+"_new",index:e[31],disabled:!e[6],$$slots:{default:[n6,({dragging:a,dragover:f})=>({32:a,33:f}),({dragging:a,dragover:f})=>[0,(a?2:0)|(f?4:0)]]},$$scope:{ctx:e}};return e[1]!==void 0&&(r.list=e[1]),i=new Al({props:r}),ne.push(()=>de(i,"list",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,f){w(a,t,f),j(i,a,f),l=!0},p(a,f){e=a;const u={};f[0]&16&&(u.group=e[4].name+"_new"),f[0]&2&&(u.index=e[31]),f[0]&64&&(u.disabled=!e[6]),f[0]&2|f[1]&70&&(u.$$scope={dirty:f,ctx:e}),!s&&f[0]&2&&(s=!0,u.list=e[1],_e(()=>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),V(i,a)}}}function i6(n){let e,t,i,s,l,o=n[4].name+"",r,a,f,u,c=[],d=new Map,m,_=[],h=new Map,g,y,S,C,$,T,M,E,D,I,P,F,N=n[5];const R=K=>K[34]+K[3].id;for(let K=0;KK[29].name+K[31];for(let K=0;K({28:o}),({uniqueId:o})=>[o?268435456:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","block")},m(o,r){w(o,e,r),j(t,e,null),i=!0,s||(l=[Y(e,"dragover",Xe(n[25])),Y(e,"dragleave",n[26]),Y(e,"drop",n[15])],s=!0)},p(o,r){const a={};r[0]&528&&(a.class=` - 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),V(t),s=!1,Ce(l)}}}function l6(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(B){H.removeByValue(u,B),t(2,u)}function g(B){H.pushUnique(u,B),t(2,u)}function y(B){H.isEmpty(f[B])||f.splice(B,1),t(1,f)}function S(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:a,uploadedFiles:f,deletedFileNames:u},bubbles:!0}))}function C(B){var J,X;B.preventDefault(),t(9,m=!1);const K=((J=B.dataTransfer)==null?void 0:J.files)||[];if(!(l||!K.length)){for(const G of K){const fe=s.length+f.length-u.length;if(((X=r.options)==null?void 0:X.maxSelect)<=fe)break;f.push(G)}t(1,f)}}Kt(async()=>{t(10,_=await ue.getAdminFileToken(o.collectionId))});const $=B=>h(B),T=B=>g(B);function M(B){a=B,t(0,a),t(6,i),t(4,r)}const E=B=>y(B);function D(B){f=B,t(1,f)}function I(B){ne[B?"unshift":"push"](()=>{c=B,t(7,c)})}const P=()=>{for(let B of c.files)f.push(B);t(1,f),t(7,c.value=null,c)},F=()=>c==null?void 0:c.click();function N(B){ne[B?"unshift":"push"](()=>{d=B,t(8,d)})}const R=()=>{t(9,m=!0)},q=()=>{t(9,m=!1)};return n.$$set=B=>{"record"in B&&t(3,o=B.record),"field"in B&&t(4,r=B.field),"value"in B&&t(0,a=B.value),"uploadedFiles"in B&&t(1,f=B.uploadedFiles),"deletedFileNames"in B&&t(2,u=B.deletedFileNames)},n.$$.update=()=>{var B,K;n.$$.dirty[0]&2&&(Array.isArray(f)||t(1,f=H.toArray(f))),n.$$.dirty[0]&4&&(Array.isArray(u)||t(2,u=H.toArray(u))),n.$$.dirty[0]&16&&t(6,i=((B=r.options)==null?void 0:B.maxSelect)>1),n.$$.dirty[0]&65&&H.isEmpty(a)&&t(0,a=i?[]:""),n.$$.dirty[0]&1&&t(5,s=H.toArray(a)),n.$$.dirty[0]&54&&t(11,l=(s.length||f.length)&&((K=r.options)==null?void 0:K.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,E,D,I,P,F,N,R,q]}class o6 extends be{constructor(e){super(),ge(this,e,l6,s6,pe,{record:3,field:4,value:0,uploadedFiles:1,deletedFileNames:2},null,[-1,-1])}}function Np(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function r6(n,e){e=Np(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=Np(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}function Rp(n,e,t){const i=n.slice();i[5]=e[t];const s=H.toArray(i[0][i[5]]).slice(0,5);return i[6]=s,i}function qp(n,e,t){const i=n.slice();return i[9]=e[t],i}function jp(n){let e,t;return e=new sf({props:{record:n[0],filename:n[9],size:"xs"}}),{c(){z(e.$$.fragment)},m(i,s){j(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){V(e,i)}}}function Vp(n){let e=!H.isEmpty(n[9]),t,i,s=e&&jp(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=!H.isEmpty(l[9])),e?s?(s.p(l,o),o&5&&A(s,1)):(s=jp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(re(),L(s,1,1,()=>{s=null}),ae())},i(l){i||(A(s),i=!0)},o(l){L(s),i=!1},d(l){s&&s.d(l),l&&k(t)}}}function zp(n){let e,t,i=n[6],s=[];for(let o=0;oL(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oL(m[h],1,1,()=>{m[h]=null});return{c(){e=v("div"),t=v("i"),s=O();for(let h=0;ht(4,o=a));let{record:r}=e;return n.$$set=a=>{"record"in a&&t(0,r=a.record)},n.$$.update=()=>{var a,f,u,c;n.$$.dirty&17&&t(3,i=o==null?void 0:o.find(d=>d.id==(r==null?void 0:r.collectionId))),n.$$.dirty&8&&t(2,s=((f=(a=i==null?void 0:i.schema)==null?void 0:a.filter(d=>d.presentable&&d.type=="file"))==null?void 0:f.map(d=>d.name))||[]),n.$$.dirty&8&&t(1,l=((c=(u=i==null?void 0:i.schema)==null?void 0:u.filter(d=>d.presentable&&d.type!="file"))==null?void 0:c.map(d=>d.name))||[])},[r,l,s,i,o]}class Qo extends be{constructor(e){super(),ge(this,e,f6,a6,pe,{record:0})}}function Hp(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function Bp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[9](i[49]);return i[6]=s,i}function Up(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='
    New record
    ',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint p-l-sm p-r-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[31]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Wp(n){let e,t=!n[13]&&Yp(n);return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[13]?t&&(t.d(1),t=null):t?t.p(i,s):(t=Yp(i),t.c(),t.m(e.parentNode,e))},d(i){t&&t.d(i),i&&k(e)}}}function Yp(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&Kp(n);return{c(){e=v("div"),t=v("span"),t.textContent="No records found.",i=O(),s&&s.c(),p(t,"class","txt txt-hint"),p(e,"class","list-item")},m(o,r){w(o,e,r),b(e,t),b(e,i),s&&s.m(e,null)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=Kp(o),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(o){o&&k(e),s&&s.d()}}}function Kp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[35]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function u6(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function c6(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Jp(n){let e,t,i,s;function l(){return n[32](n[49])}return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),p(e,"class","actions nonintrusive")},m(o,r){w(o,e,r),b(e,t),i||(s=[Se(je.call(null,t,"Edit")),Y(t,"keydown",Pn(n[27])),Y(t,"click",Pn(l))],i=!0)},p(o,r){n=o},d(o){o&&k(e),i=!1,Ce(s)}}}function Zp(n,e){let t,i,s,l,o,r,a,f;function u(g,y){return g[6]?c6:u6}let c=u(e),d=c(e);l=new Qo({props:{record:e[49]}});let m=!e[11]&&Jp(e);function _(){return e[33](e[49])}function h(...g){return e[34](e[49],...g)}return{key:n,first:null,c(){t=v("div"),d.c(),i=O(),s=v("div"),z(l.$$.fragment),o=O(),m&&m.c(),p(s,"class","content"),p(t,"tabindex","0"),p(t,"class","list-item handle"),Q(t,"selected",e[6]),Q(t,"disabled",!e[6]&&e[4]>1&&!e[10]),this.first=t},m(g,y){w(g,t,y),d.m(t,null),b(t,i),b(t,s),j(l,s,null),b(t,o),m&&m.m(t,null),r=!0,a||(f=[Y(t,"click",_),Y(t,"keydown",h)],a=!0)},p(g,y){e=g,c!==(c=u(e))&&(d.d(1),d=c(e),d&&(d.c(),d.m(t,i)));const S={};y[0]&256&&(S.record=e[49]),l.$set(S),e[11]?m&&(m.d(1),m=null):m?m.p(e,y):(m=Jp(e),m.c(),m.m(t,null)),(!r||y[0]&768)&&Q(t,"selected",e[6]),(!r||y[0]&1808)&&Q(t,"disabled",!e[6]&&e[4]>1&&!e[10])},i(g){r||(A(l.$$.fragment,g),r=!0)},o(g){L(l.$$.fragment,g),r=!1},d(g){g&&k(t),d.d(),V(l),m&&m.d(),a=!1,Ce(f)}}}function Gp(n){let e;return{c(){e=v("div"),e.innerHTML='
    ',p(e,"class","list-item")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Xp(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=U("("),i=U(t),s=U(" of MAX "),l=U(n[4]),o=U(")")},m(r,a){w(r,e,a),w(r,i,a),w(r,s,a),w(r,l,a),w(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&se(i,t),a[0]&16&&se(l,r[4])},d(r){r&&k(e),r&&k(i),r&&k(s),r&&k(l),r&&k(o)}}}function d6(n){let e;return{c(){e=v("p"),e.textContent="No selected records.",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function p6(n){let e,t,i=n[6],s=[];for(let o=0;oL(s[o],1,1,()=>{s[o]=null});return{c(){e=v("div");for(let o=0;o',l=O(),p(s,"type","button"),p(s,"title","Remove"),p(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),p(e,"class","label"),Q(e,"label-danger",n[52]),Q(e,"label-warning",n[53])},m(u,c){w(u,e,c),j(t,e,null),b(e,i),b(e,s),w(u,l,c),o=!0,r||(a=Y(s,"click",f),r=!0)},p(u,c){n=u;const d={};c[0]&64&&(d.record=n[49]),t.$set(d),(!o||c[1]&2097152)&&Q(e,"label-danger",n[52]),(!o||c[1]&4194304)&&Q(e,"label-warning",n[53])},i(u){o||(A(t.$$.fragment,u),o=!0)},o(u){L(t.$$.fragment,u),o=!1},d(u){u&&k(e),V(t),u&&k(l),r=!1,a()}}}function Qp(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[m6,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new Al({props:l}),ne.push(()=>de(e,"list",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&64|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function h6(n){let e,t,i,s,l,o=[],r=new Map,a,f,u,c,d,m,_,h,g,y,S,C;t=new Uo({props:{value:n[2],autocompleteCollection:n[5]}}),t.$on("submit",n[30]);let $=!n[11]&&Up(n),T=n[8];const M=R=>R[49].id;for(let R=0;R1&&Xp(n);const P=[p6,d6],F=[];function N(R,q){return R[6].length?0:1}return _=N(n),h=F[_]=P[_](n),{c(){e=v("div"),z(t.$$.fragment),i=O(),$&&$.c(),s=O(),l=v("div");for(let R=0;R1?I?I.p(R,q):(I=Xp(R),I.c(),I.m(c,null)):I&&(I.d(1),I=null);let K=_;_=N(R),_===K?F[_].p(R,q):(re(),L(F[K],1,1,()=>{F[K]=null}),ae(),h=F[_],h?h.p(R,q):(h=F[_]=P[_](R),h.c()),A(h,1),h.m(g.parentNode,g))},i(R){if(!y){A(t.$$.fragment,R);for(let q=0;qCancel',t=O(),i=v("button"),i.innerHTML='Set selection',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:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Ce(l)}}}function b6(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[g6],header:[_6],default:[h6]},$$scope:{ctx:n}};for(let a=0;at(26,m=Me));const _=yt(),h="picker_"+H.randomString(5);let{value:g}=e,{field:y}=e,S,C,$="",T=[],M=[],E=1,D=0,I=!1,P=!1;function F(){return t(2,$=""),t(8,T=[]),t(6,M=[]),R(),q(!0),S==null?void 0:S.show()}function N(){return S==null?void 0:S.hide()}async function R(){const Me=H.toArray(g);if(!s||!Me.length)return;t(24,P=!0);let mt=[];const Lt=Me.slice(),on=[];for(;Lt.length>0;){const De=[];for(const rt of Lt.splice(0,to))De.push(`id="${rt}"`);on.push(ue.collection(s).getFullList(to,{filter:De.join("||"),$autoCancel:!1}))}try{await Promise.all(on).then(De=>{mt=mt.concat(...De)}),t(6,M=[]);for(const De of Me){const rt=H.findByKey(mt,"id",De);rt&&M.push(rt)}$.trim()||t(8,T=H.filterDuplicatesByKey(M.concat(T))),t(24,P=!1)}catch(De){De.isAbort||(ue.error(De),t(24,P=!1))}}async function q(Me=!1){if(s){t(3,I=!0),Me&&($.trim()?t(8,T=[]):t(8,T=H.toArray(M).slice()));try{const mt=Me?1:E+1,Lt=H.getAllCollectionIdentifiers(l),on=await ue.collection(s).getList(mt,to,{filter:H.normalizeSearchFilter($,Lt),sort:o?"":"-created",skipTotal:1,$cancelKey:h+"loadList"});t(8,T=H.filterDuplicatesByKey(T.concat(on.items))),E=on.page,t(23,D=on.items.length),t(3,I=!1)}catch(mt){mt.isAbort||(ue.error(mt),t(3,I=!1))}}}function B(Me){i==1?t(6,M=[Me]):f&&(H.pushOrReplaceByKey(M,Me),t(6,M))}function K(Me){H.removeByKey(M,"id",Me.id),t(6,M)}function J(Me){u(Me)?K(Me):B(Me)}function X(){var Me;i!=1?t(20,g=M.map(mt=>mt.id)):t(20,g=((Me=M==null?void 0:M[0])==null?void 0:Me.id)||""),_("save",M),N()}function G(Me){Fe.call(this,n,Me)}const fe=()=>N(),ee=()=>X(),te=Me=>t(2,$=Me.detail),Oe=()=>C==null?void 0:C.show(),Pe=Me=>C==null?void 0:C.show(Me),Ve=Me=>J(Me),ze=(Me,mt)=>{(mt.code==="Enter"||mt.code==="Space")&&(mt.preventDefault(),mt.stopPropagation(),J(Me))},we=()=>t(2,$=""),Te=()=>{a&&!I&&q()},Je=Me=>K(Me);function gt(Me){M=Me,t(6,M)}function Ze(Me){ne[Me?"unshift":"push"](()=>{S=Me,t(1,S)})}function Ye(Me){Fe.call(this,n,Me)}function wt(Me){Fe.call(this,n,Me)}function me(Me){ne[Me?"unshift":"push"](()=>{C=Me,t(7,C)})}const ve=Me=>{H.removeByKey(T,"id",Me.detail.id),T.unshift(Me.detail),t(8,T),B(Me.detail)},Ke=Me=>{H.removeByKey(T,"id",Me.detail.id),t(8,T),K(Me.detail)};return n.$$set=Me=>{e=qe(qe({},e),Xt(Me)),t(19,d=Qe(e,c)),"value"in Me&&t(20,g=Me.value),"field"in Me&&t(21,y=Me.field)},n.$$.update=()=>{var Me,mt;n.$$.dirty[0]&2097152&&t(4,i=((Me=y==null?void 0:y.options)==null?void 0:Me.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=(mt=y==null?void 0:y.options)==null?void 0:mt.collectionId),n.$$.dirty[0]&100663296&&t(5,l=m.find(Lt=>Lt.id==s)||null),n.$$.dirty[0]&6&&typeof $<"u"&&S!=null&&S.isActive()&&q(!0),n.$$.dirty[0]&32&&t(11,o=(l==null?void 0:l.type)==="view"),n.$$.dirty[0]&16777224&&t(13,r=I||P),n.$$.dirty[0]&8388608&&t(12,a=D==to),n.$$.dirty[0]&80&&t(10,f=i===null||i>M.length),n.$$.dirty[0]&64&&t(9,u=function(Lt){return H.findByKey(M,"id",Lt.id)})},[N,S,$,I,i,l,M,C,T,u,f,o,a,r,q,B,K,J,X,d,g,y,F,D,P,s,m,G,fe,ee,te,Oe,Pe,Ve,ze,we,Te,Je,gt,Ze,Ye,wt,me,ve,Ke]}class y6 extends be{constructor(e){super(),ge(this,e,v6,b6,pe,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function xp(n,e,t){const i=n.slice();return i[20]=e[t],i[22]=t,i}function em(n,e,t){const i=n.slice();return i[25]=e[t],i}function tm(n){let e,t=n[5]&&nm(n);return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[5]?t?t.p(i,s):(t=nm(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function nm(n){let e,t=H.toArray(n[0]).slice(0,10),i=[];for(let s=0;s - `,p(e,"class","list-item")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function k6(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"),z(i.$$.fragment),s=O(),l=v("div"),o=v("button"),o.innerHTML='',r=O(),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"),Q(e,"dragging",n[23]),Q(e,"dragover",n[24])},m(d,m){w(d,e,m),b(e,t),j(i,t,null),b(e,s),b(e,l),b(l,o),w(d,r,m),a=!0,f||(u=[Se(je.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)&&Q(e,"dragging",n[23]),(!a||m&16777216)&&Q(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),V(i),d&&k(r),f=!1,Ce(u)}}}function sm(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:[k6,({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 Al({props:r}),ne.push(()=>de(i,"list",o)),i.$on("sort",e[12]),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,f){w(a,t,f),j(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],_e(()=>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),V(i,a)}}}function w6(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=E=>E[20].id;for(let E=0;E<$.length;E+=1){let D=xp(n,$,E),I=T(D);m.set(I,d[E]=sm(I,D))}let M=null;return $.length||(M=tm(n)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),f=O(),u=v("div"),c=v("div");for(let E=0;E - - Open picker`,p(t,"class",i=ki(H.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(E,D){w(E,e,D),b(e,t),b(e,s),b(e,l),b(l,r),w(E,f,D),w(E,u,D),b(u,c);for(let I=0;I({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 y6({props:o}),n[15](i),i.$on("save",n[16]),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(r,a){j(e,r,a),w(r,t,a),j(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),V(e,r),r&&k(t),n[15](null),V(i,r)}}}const lm=100;function $6(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=H.toArray(l);return t(4,a=a.filter(E=>M.includes(E.id))),M.length!=a.length}async function d(){var I,P;const M=H.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 E=M.slice(),D=[];for(;E.length>0;){const F=[];for(const N of E.splice(0,lm))F.push(`id="${N}"`);D.push(ue.collection((P=s==null?void 0:s.options)==null?void 0:P.collectionId).getFullList(lm,{filter:F.join("||"),$autoCancel:!1}))}try{let F=[];await Promise.all(D).then(N=>{F=F.concat(...N)});for(const N of M){const R=H.findByKey(F,"id",N);R&&a.push(R)}t(4,a),_()}catch(F){ue.error(F)}t(5,f=!1)}function m(M){H.removeByKey(a,"id",M.id),t(4,a),_()}function _(){var M;i?t(0,l=a.map(E=>E.id)):t(0,l=((M=a[0])==null?void 0:M.id)||"")}As(()=>{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 C(M){ne[M?"unshift":"push"](()=>{r=M,t(3,r)})}function $(M){ne[M?"unshift":"push"](()=>{o=M,t(1,o)})}const T=M=>{var E;t(4,a=M.detail||[]),t(0,l=i?a.map(D=>D.id):((E=a[0])==null?void 0:E.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 C6 extends be{constructor(e){super(),ge(this,e,$6,S6,pe,{field:2,value:0,picker:1})}}const T6=["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"],M6=(n,e)=>{T6.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function O6(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 E6(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 D6(n){let e;function t(l,o){return l[1]?E6:O6}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:x,o:x,d(l){l&&k(e),s.d(),n[19](null)}}}const y1=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),A6=()=>{let n={listeners:[],scriptId:y1("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let I6=A6();function L6(n,e,t){var i;let{id:s=y1("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:f=void 0}=e,{conf:u={}}=e,{modelEvents:c="change input undo redo"}=e,{value:d=""}=e,{text:m=""}=e,{cssClass:_="tinymce-wrapper"}=e,h,g,y,S=d,C=o;const $=yt(),T=()=>{const F=(()=>typeof window<"u"?window:global)();return F&&F.tinymce?F.tinymce:null},M=()=>{const P=Object.assign(Object.assign({},u),{target:g,inline:l!==void 0?l:u.inline!==void 0?u.inline:!1,readonly:o,setup:F=>{t(14,y=F),F.on("init",()=>{F.setContent(d),F.on(c,()=>{t(15,S=F.getContent()),S!==d&&(t(5,d=S),t(6,m=F.getContent({format:"text"})))})}),M6(F,$),typeof u.setup=="function"&&u.setup(F)}});t(4,g.style.visibility="",g),T().init(P)};Kt(()=>{if(T()!==null)M();else{const P=f||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;I6.load(h.ownerDocument,P,()=>{M()})}}),As(()=>{var P;y&&((P=T())===null||P===void 0||P.remove(y))});function E(P){ne[P?"unshift":"push"](()=>{g=P,t(4,g)})}function D(P){ne[P?"unshift":"push"](()=>{g=P,t(4,g)})}function I(P){ne[P?"unshift":"push"](()=>{h=P,t(3,h)})}return n.$$set=P=>{"id"in P&&t(0,s=P.id),"inline"in P&&t(1,l=P.inline),"disabled"in P&&t(7,o=P.disabled),"apiKey"in P&&t(8,r=P.apiKey),"channel"in P&&t(9,a=P.channel),"scriptSrc"in P&&t(10,f=P.scriptSrc),"conf"in P&&t(11,u=P.conf),"modelEvents"in P&&t(12,c=P.modelEvents),"value"in P&&t(5,d=P.value),"text"in P&&t(6,m=P.text),"cssClass"in P&&t(2,_=P.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(y&&S!==d&&(y.setContent(d),t(6,m=y.getContent({format:"text"}))),y&&o!==C&&(t(16,C=o),typeof(t(13,i=y.mode)===null||i===void 0?void 0:i.set)=="function"?y.mode.set(o?"readonly":"design"):y.setMode(o?"readonly":"design")))},[s,l,_,h,g,d,m,o,r,a,f,u,c,i,y,S,C,E,D,I]}class lf extends be{constructor(e){super(),ge(this,e,L6,D6,pe,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function P6(n){let e,t,i,s,l,o=n[1].name+"",r,a,f,u,c,d;function m(h){n[3](h)}let _={id:n[4],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:n[2]};return n[0]!==void 0&&(_.value=n[0]),u=new lf({props:_}),ne.push(()=>de(u,"value",m)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=U(o),f=O(),z(u.$$.fragment),p(t,"class",i=H.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(h,g){w(h,e,g),b(e,t),b(e,s),b(e,l),b(l,r),w(h,f,g),j(u,h,g),d=!0},p(h,g){(!d||g&2&&i!==(i=H.getFieldTypeIcon(h[1].type)))&&p(t,"class",i),(!d||g&2)&&o!==(o=h[1].name+"")&&se(r,o),(!d||g&16&&a!==(a=h[4]))&&p(e,"for",a);const y={};g&16&&(y.id=h[4]),g&4&&(y.conf=h[2]),!c&&g&1&&(c=!0,y.value=h[0],_e(()=>c=!1)),u.$set(y)},i(h){d||(A(u.$$.fragment,h),d=!0)},o(h){L(u.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(f),V(u,h)}}}function F6(n){let e,t;return e=new ce({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[P6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function N6(n,e,t){let i,{field:s}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=Object.assign(H.defaultEditorOptions(),{convert_urls:(r=s.options)==null?void 0:r.convertUrls,relative_urls:!1}))},[l,s,i,o]}class R6 extends be{constructor(e){super(),ge(this,e,N6,F6,pe,{field:1,value:0})}}function q6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Auth URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].authUrl),r||(a=Y(l,"input",n[2]),r=!0)},p(f,u){u&32&&i!==(i=f[5])&&p(e,"for",i),u&32&&o!==(o=f[5])&&p(l,"id",o),u&1&&l.value!==f[0].authUrl&&oe(l,f[0].authUrl)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function j6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Token URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].tokenUrl),r||(a=Y(l,"input",n[3]),r=!0)},p(f,u){u&32&&i!==(i=f[5])&&p(e,"for",i),u&32&&o!==(o=f[5])&&p(l,"id",o),u&1&&l.value!==f[0].tokenUrl&&oe(l,f[0].tokenUrl)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function V6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("User API URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].userApiUrl),r||(a=Y(l,"input",n[4]),r=!0)},p(f,u){u&32&&i!==(i=f[5])&&p(e,"for",i),u&32&&o!==(o=f[5])&&p(l,"id",o),u&1&&l.value!==f[0].userApiUrl&&oe(l,f[0].userApiUrl)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function z6(n){let e,t,i,s,l,o,r,a;return i=new ce({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[q6,({uniqueId:f})=>({5:f}),({uniqueId:f})=>f?32:0]},$$scope:{ctx:n}}}),l=new ce({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[j6,({uniqueId:f})=>({5:f}),({uniqueId:f})=>f?32:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[V6,({uniqueId:f})=>({5:f}),({uniqueId:f})=>f?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=O(),z(i.$$.fragment),s=O(),z(l.$$.fragment),o=O(),z(r.$$.fragment),p(e,"class","section-title")},m(f,u){w(f,e,u),w(f,t,u),j(i,f,u),w(f,s,u),j(l,f,u),w(f,o,u),j(r,f,u),a=!0},p(f,[u]){const c={};u&2&&(c.name=f[1]+".authUrl"),u&97&&(c.$$scope={dirty:u,ctx:f}),i.$set(c);const d={};u&2&&(d.name=f[1]+".tokenUrl"),u&97&&(d.$$scope={dirty:u,ctx:f}),l.$set(d);const m={};u&2&&(m.name=f[1]+".userApiUrl"),u&97&&(m.$$scope={dirty:u,ctx:f}),r.$set(m)},i(f){a||(A(i.$$.fragment,f),A(l.$$.fragment,f),A(r.$$.fragment,f),a=!0)},o(f){L(i.$$.fragment,f),L(l.$$.fragment,f),L(r.$$.fragment,f),a=!1},d(f){f&&k(e),f&&k(t),V(i,f),f&&k(s),V(l,f),f&&k(o),V(r,f)}}}function H6(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class om extends be{constructor(e){super(),ge(this,e,H6,z6,pe,{key:1,config:0})}}function B6(n){let e,t,i,s,l,o,r,a,f,u,c;return{c(){e=v("label"),t=U("Auth URL"),s=O(),l=v("input"),a=O(),f=v("div"),f.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=r=n[0].enabled,p(f,"class","help-block")},m(d,m){w(d,e,m),b(e,t),w(d,s,m),w(d,l,m),oe(l,n[0].authUrl),w(d,a,m),w(d,f,m),u||(c=Y(l,"input",n[2]),u=!0)},p(d,m){m&16&&i!==(i=d[4])&&p(e,"for",i),m&16&&o!==(o=d[4])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].authUrl&&oe(l,d[0].authUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(f),u=!1,c()}}}function U6(n){let e,t,i,s,l,o,r,a,f,u,c;return{c(){e=v("label"),t=U("Token URL"),s=O(),l=v("input"),a=O(),f=v("div"),f.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=r=n[0].enabled,p(f,"class","help-block")},m(d,m){w(d,e,m),b(e,t),w(d,s,m),w(d,l,m),oe(l,n[0].tokenUrl),w(d,a,m),w(d,f,m),u||(c=Y(l,"input",n[3]),u=!0)},p(d,m){m&16&&i!==(i=d[4])&&p(e,"for",i),m&16&&o!==(o=d[4])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].tokenUrl&&oe(l,d[0].tokenUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(f),u=!1,c()}}}function W6(n){let e,t,i,s,l,o;return i=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[B6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),l=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[U6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=O(),z(i.$$.fragment),s=O(),z(l.$$.fragment),p(e,"class","section-title")},m(r,a){w(r,e,a),w(r,t,a),j(i,r,a),w(r,s,a),j(l,r,a),o=!0},p(r,[a]){const f={};a&1&&(f.class="form-field "+(r[0].enabled?"required":"")),a&2&&(f.name=r[1]+".authUrl"),a&49&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const u={};a&1&&(u.class="form-field "+(r[0].enabled?"required":"")),a&2&&(u.name=r[1]+".tokenUrl"),a&49&&(u.$$scope={dirty:a,ctx:r}),l.$set(u)},i(r){o||(A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){L(i.$$.fragment,r),L(l.$$.fragment,r),o=!1},d(r){r&&k(e),r&&k(t),V(i,r),r&&k(s),V(l,r)}}}function Y6(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class K6 extends be{constructor(e){super(),ge(this,e,Y6,W6,pe,{key:1,config:0})}}function J6(n){let e,t,i,s,l,o,r,a,f,u,c;return{c(){e=v("label"),t=U("Auth URL"),s=O(),l=v("input"),a=O(),f=v("div"),f.textContent="Eg. https://example.com/authorize/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(f,"class","help-block")},m(d,m){w(d,e,m),b(e,t),w(d,s,m),w(d,l,m),oe(l,n[0].authUrl),w(d,a,m),w(d,f,m),u||(c=Y(l,"input",n[2]),u=!0)},p(d,m){m&32&&i!==(i=d[5])&&p(e,"for",i),m&32&&o!==(o=d[5])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].authUrl&&oe(l,d[0].authUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(f),u=!1,c()}}}function Z6(n){let e,t,i,s,l,o,r,a,f,u,c;return{c(){e=v("label"),t=U("Token URL"),s=O(),l=v("input"),a=O(),f=v("div"),f.textContent="Eg. https://example.com/token/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(f,"class","help-block")},m(d,m){w(d,e,m),b(e,t),w(d,s,m),w(d,l,m),oe(l,n[0].tokenUrl),w(d,a,m),w(d,f,m),u||(c=Y(l,"input",n[3]),u=!0)},p(d,m){m&32&&i!==(i=d[5])&&p(e,"for",i),m&32&&o!==(o=d[5])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].tokenUrl&&oe(l,d[0].tokenUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(f),u=!1,c()}}}function G6(n){let e,t,i,s,l,o,r,a,f,u,c;return{c(){e=v("label"),t=U("User API URL"),s=O(),l=v("input"),a=O(),f=v("div"),f.textContent="Eg. https://example.com/userinfo/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(f,"class","help-block")},m(d,m){w(d,e,m),b(e,t),w(d,s,m),w(d,l,m),oe(l,n[0].userApiUrl),w(d,a,m),w(d,f,m),u||(c=Y(l,"input",n[4]),u=!0)},p(d,m){m&32&&i!==(i=d[5])&&p(e,"for",i),m&32&&o!==(o=d[5])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].userApiUrl&&oe(l,d[0].userApiUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(f),u=!1,c()}}}function X6(n){let e,t,i,s,l,o,r,a;return i=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[J6,({uniqueId:f})=>({5:f}),({uniqueId:f})=>f?32:0]},$$scope:{ctx:n}}}),l=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[Z6,({uniqueId:f})=>({5:f}),({uniqueId:f})=>f?32:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".userApiUrl",$$slots:{default:[G6,({uniqueId:f})=>({5:f}),({uniqueId:f})=>f?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Endpoints",t=O(),z(i.$$.fragment),s=O(),z(l.$$.fragment),o=O(),z(r.$$.fragment),p(e,"class","section-title")},m(f,u){w(f,e,u),w(f,t,u),j(i,f,u),w(f,s,u),j(l,f,u),w(f,o,u),j(r,f,u),a=!0},p(f,[u]){const c={};u&1&&(c.class="form-field "+(f[0].enabled?"required":"")),u&2&&(c.name=f[1]+".authUrl"),u&97&&(c.$$scope={dirty:u,ctx:f}),i.$set(c);const d={};u&1&&(d.class="form-field "+(f[0].enabled?"required":"")),u&2&&(d.name=f[1]+".tokenUrl"),u&97&&(d.$$scope={dirty:u,ctx:f}),l.$set(d);const m={};u&1&&(m.class="form-field "+(f[0].enabled?"required":"")),u&2&&(m.name=f[1]+".userApiUrl"),u&97&&(m.$$scope={dirty:u,ctx:f}),r.$set(m)},i(f){a||(A(i.$$.fragment,f),A(l.$$.fragment,f),A(r.$$.fragment,f),a=!0)},o(f){L(i.$$.fragment,f),L(l.$$.fragment,f),L(r.$$.fragment,f),a=!1},d(f){f&&k(e),f&&k(t),V(i,f),f&&k(s),V(l,f),f&&k(o),V(r,f)}}}function Q6(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class Ir extends be{constructor(e){super(),ge(this,e,Q6,X6,pe,{key:1,config:0})}}function x6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Client ID"),s=O(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[2]),r||(a=Y(l,"input",n[12]),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&4&&l.value!==f[2]&&oe(l,f[2])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function eO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Team ID"),s=O(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[3]),r||(a=Y(l,"input",n[13]),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&8&&l.value!==f[3]&&oe(l,f[3])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function tO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Key ID"),s=O(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[4]),r||(a=Y(l,"input",n[14]),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&16&&l.value!==f[4]&&oe(l,f[4])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function nO(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("span"),t.textContent="Duration (in seconds)",i=O(),s=v("i"),o=O(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[23]),p(r,"type","text"),p(r,"id",a=n[23]),p(r,"max",fo),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),oe(r,n[6]),f||(u=[Se(je.call(null,s,{text:`Max ${fo} seconds (~${fo/(60*60*24*30)<<0} months).`,position:"top"})),Y(r,"input",n[15])],f=!0)},p(c,d){d&8388608&&l!==(l=c[23])&&p(e,"for",l),d&8388608&&a!==(a=c[23])&&p(r,"id",a),d&64&&r.value!==c[6]&&oe(r,c[6])},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,Ce(u)}}}function iO(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Private key"),s=O(),l=v("textarea"),r=O(),a=v("div"),a.textContent="The key is not stored on the server and it is used only for generating the signed JWT.",p(e,"for",i=n[23]),p(l,"id",o=n[23]),l.required=!0,p(l,"rows","8"),p(l,"placeholder",`-----BEGIN PRIVATE KEY----- -... ------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),oe(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&&oe(l,c[5])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),f=!1,u()}}}function sO(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:[x6,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"teamId",$$slots:{default:[eO,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field required",name:"keyId",$$slots:{default:[tO,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),m=new ce({props:{class:"form-field required",name:"duration",$$slots:{default:[nO,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),h=new ce({props:{class:"form-field required",name:"privateKey",$$slots:{default:[iO,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),i=v("div"),z(s.$$.fragment),l=O(),o=v("div"),z(r.$$.fragment),a=O(),f=v("div"),z(u.$$.fragment),c=O(),d=v("div"),z(m.$$.fragment),_=O(),z(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(C,e,$),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),b(t,a),b(t,f),j(u,f,null),b(t,c),b(t,d),j(m,d,null),b(t,_),j(h,t,null),g=!0,y||(S=Y(e,"submit",Xe(n[17])),y=!0)},p(C,$){const T={};$&25165828&&(T.$$scope={dirty:$,ctx:C}),s.$set(T);const M={};$&25165832&&(M.$$scope={dirty:$,ctx:C}),r.$set(M);const E={};$&25165840&&(E.$$scope={dirty:$,ctx:C}),u.$set(E);const D={};$&25165888&&(D.$$scope={dirty:$,ctx:C}),m.$set(D);const I={};$&25165856&&(I.$$scope={dirty:$,ctx:C}),h.$set(I)},i(C){g||(A(s.$$.fragment,C),A(r.$$.fragment,C),A(u.$$.fragment,C),A(m.$$.fragment,C),A(h.$$.fragment,C),g=!0)},o(C){L(s.$$.fragment,C),L(r.$$.fragment,C),L(u.$$.fragment,C),L(m.$$.fragment,C),L(h.$$.fragment,C),g=!1},d(C){C&&k(e),V(s),V(r),V(u),V(m),V(h),y=!1,S()}}}function lO(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:x,d(t){t&&k(e)}}}function oO(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("button"),t=U("Close"),i=O(),s=v("button"),l=v("i"),o=O(),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],Q(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&&Q(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,u()}}}function rO(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[oO],header:[lO],default:[sO]},$$scope:{ctx:n}};return e=new ln({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){z(e.$$.fragment)},m(s,l){j(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),V(e,s)}}}const fo=15777e3;function aO(n,e,t){let i;const s=yt(),l="apple_secret_"+H.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||fo),en({}),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),Rt("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(){c=this.value,t(6,c)}function $(){u=this.value,t(5,u)}const T=()=>h(),M=()=>!d;function E(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,E,D,I]}class fO extends be{constructor(e){super(),ge(this,e,aO,rO,pe,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function uO(n){let e,t,i,s,l,o,r,a,f,u,c={};return r=new fO({props:c}),n[4](r),r.$on("submit",n[5]),{c(){e=v("button"),t=v("i"),i=O(),s=v("span"),s.textContent="Generate secret",o=O(),z(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),j(r,d,m),a=!0,f||(u=Y(e,"click",n[3]),f=!0)},p(d,[m]){(!a||m&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+d[1]))&&p(e,"class",l);const _={};r.$set(_)},i(d){a||(A(r.$$.fragment,d),a=!0)},o(d){L(r.$$.fragment,d),a=!1},d(d){d&&k(e),d&&k(o),n[4](null),V(r,d),f=!1,u()}}}function cO(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(f){ne[f?"unshift":"push"](()=>{l=f,t(2,l)})}const a=f=>{var u;t(0,s.clientSecret=((u=f.detail)==null?void 0:u.secret)||"",s)};return n.$$set=f=>{"key"in f&&t(1,i=f.key),"config"in f&&t(0,s=f.config)},[s,i,l,o,r,a]}class dO extends be{constructor(e){super(),ge(this,e,cO,uO,pe,{key:1,config:0})}}const uo=[{key:"appleAuth",title:"Apple",logo:"apple.svg",optionsComponent:dO},{key:"googleAuth",title:"Google",logo:"google.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"microsoft.svg",optionsComponent:K6},{key:"yandexAuth",title:"Yandex",logo:"yandex.svg"},{key:"facebookAuth",title:"Facebook",logo:"facebook.svg"},{key:"instagramAuth",title:"Instagram",logo:"instagram.svg"},{key:"githubAuth",title:"GitHub",logo:"github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"gitlab.svg",optionsComponent:om},{key:"giteeAuth",title:"Gitee",logo:"gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"gitea.svg",optionsComponent:om},{key:"discordAuth",title:"Discord",logo:"discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"kakao.svg"},{key:"vkAuth",title:"VK",logo:"vk.svg"},{key:"spotifyAuth",title:"Spotify",logo:"spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:Ir},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:Ir},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:Ir}];function rm(n,e,t){const i=n.slice();return i[9]=e[t],i}function pO(n){let e;return{c(){e=v("h6"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function mO(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function am(n){let e,t,i,s,l,o,r=n[4](n[9].provider)+"",a,f,u,c,d=n[9].providerId+"",m,_,h,g,y,S;function C(){return n[6](n[9])}return{c(){var $;e=v("div"),t=v("figure"),i=v("img"),l=O(),o=v("span"),a=U(r),f=O(),u=v("div"),c=U("ID: "),m=U(d),_=O(),h=v("button"),h.innerHTML='',g=O(),_n(i.src,s="./images/oauth2/"+(($=n[3](n[9].provider))==null?void 0:$.logo))||p(i,"src",s),p(i,"alt","Provider logo"),p(t,"class","provider-logo"),p(o,"class","txt"),p(u,"class","txt-hint"),p(h,"type","button"),p(h,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m($,T){w($,e,T),b(e,t),b(t,i),b(e,l),b(e,o),b(o,a),b(e,f),b(e,u),b(u,c),b(u,m),b(e,_),b(e,h),b(e,g),y||(S=Y(h,"click",C),y=!0)},p($,T){var M;n=$,T&2&&!_n(i.src,s="./images/oauth2/"+((M=n[3](n[9].provider))==null?void 0:M.logo))&&p(i,"src",s),T&2&&r!==(r=n[4](n[9].provider)+"")&&se(a,r),T&2&&d!==(d=n[9].providerId+"")&&se(m,d)},d($){$&&k(e),y=!1,S()}}}function _O(n){let e;function t(l,o){var r;return l[2]?hO:(r=l[0])!=null&&r.id&&l[1].length?mO:pO}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:x,o:x,d(l){s.d(l),l&&k(e)}}}function gO(n,e,t){const i=yt();let{record:s}=e,l=[],o=!1;function r(d){return uo.find(m=>m.key==d+"Auth")||{}}function a(d){var m;return((m=r(d))==null?void 0:m.title)||H.sentenize(d,!1)}async function f(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await ue.collection(s.collectionId).listExternalAuths(s.id))}catch(d){ue.error(d)}t(2,o=!1)}function u(d){!(s!=null&&s.id)||!d||mn(`Do you really want to unlink the ${a(d)} provider?`,()=>ue.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{Rt(`Successfully unlinked the ${a(d)} provider.`),i("unlink",d),f()}).catch(m=>{ue.error(m)}))}f();const c=d=>u(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,u,c]}class bO extends be{constructor(e){super(),ge(this,e,gO,_O,pe,{record:0})}}function fm(n,e,t){const i=n.slice();return i[67]=e[t],i[68]=e,i[69]=t,i}function um(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=U(`The record has previous unsaved changes. - `),r=v("button"),r.textContent="Restore draft",a=O(),f=v("button"),f.innerHTML='',u=O(),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]),Se(je.call(null,f,"Discard draft")),Y(f,"click",Xe(n[38]))],_=!0)},p:x,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,Ce(h)}}}function cm(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=Se(i=je.call(null,t,{text:`Created: ${n[3].created} -Updated: ${n[3].updated}`,position:"left"})),s=!0)},p(o,r){i&&Dt(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 vO(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h=!n[6]&&cm(n);return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",l=O(),o=v("span"),a=O(),h&&h.c(),f=O(),u=v("input"),p(t,"class",ki(H.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),oe(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=cm(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&&oe(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 dm(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 YM({props:r}),ne.push(()=>de(e,"record",o));let a=((u=(f=n[0])==null?void 0:f.schema)==null?void 0:u.length)&&pm();return{c(){z(e.$$.fragment),i=O(),a&&a.c(),s=ye()},m(c,d){j(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],_e(()=>t=!1)),e.$set(m),(h=(_=c[0])==null?void 0:_.schema)!=null&&h.length?a||(a=pm(),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){V(e,c),c&&k(i),a&&a.d(c),c&&k(s)}}}function pm(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function yO(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 C6({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function kO(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 o6({props:f}),ne.push(()=>de(e,"value",o)),ne.push(()=>de(e,"uploadedFiles",r)),ne.push(()=>de(e,"deletedFileNames",a)),{c(){z(e.$$.fragment)},m(u,c){j(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],_e(()=>t=!1)),!i&&c[0]&17&&(i=!0,d.uploadedFiles=n[4][n[67].name],_e(()=>i=!1)),!s&&c[0]&33&&(s=!0,d.deletedFileNames=n[5][n[67].name],_e(()=>s=!1)),e.$set(d)},i(u){l||(A(e.$$.fragment,u),l=!0)},o(u){L(e.$$.fragment,u),l=!1},d(u){V(e,u)}}}function wO(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 I5({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function SO(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 S5({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function $O(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 v5({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function CO(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 R6({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function TO(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 h5({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function MO(n){let e,t,i;function s(o){n[44](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 c5({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function OO(n){let e,t,i;function s(o){n[43](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 r5({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function EO(n){let e,t,i;function s(o){n[42](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 i5({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function DO(n){let e,t,i;function s(o){n[41](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 xM({props:l}),ne.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(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],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function mm(n,e){let t,i,s,l,o;const r=[DO,EO,OO,MO,TO,CO,$O,SO,wO,kO,yO],a=[];function f(u,c){return u[67].type==="text"?0:u[67].type==="number"?1:u[67].type==="bool"?2:u[67].type==="email"?3:u[67].type==="url"?4:u[67].type==="editor"?5:u[67].type==="date"?6:u[67].type==="select"?7:u[67].type==="json"?8:u[67].type==="file"?9:u[67].type==="relation"?10:-1}return~(i=f(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=ye(),s&&s.c(),l=ye(),this.first=t},m(u,c){w(u,t,c),~i&&a[i].m(u,c),w(u,l,c),o=!0},p(u,c){e=u;let d=i;i=f(e),i===d?~i&&a[i].p(e,c):(s&&(re(),L(a[d],1,1,()=>{a[d]=null}),ae()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(u){o||(A(s),o=!0)},o(u){L(s),o=!1},d(u){u&&k(t),~i&&a[i].d(u),u&&k(l)}}}function hm(n){let e,t,i;return t=new bO({props:{record:n[3]}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[12]===vl)},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.record=s[3]),t.$set(o),(!i||l[0]&4096)&&Q(e,"active",s[12]===vl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function AO(n){var S;let e,t,i,s,l,o,r=[],a=new Map,f,u,c,d,m=!n[7]&&n[9]&&um(n);s=new ce({props:{class:"form-field "+(n[6]?"":"readonly"),name:"id",$$slots:{default:[vO,({uniqueId:C})=>({70:C}),({uniqueId:C})=>[0,0,C?256:0]]},$$scope:{ctx:n}}});let _=n[13]&&dm(n),h=((S=n[0])==null?void 0:S.schema)||[];const g=C=>C[67].name;for(let C=0;C{m=null}),ae());const T={};$[0]&64&&(T.class="form-field "+(C[6]?"":"readonly")),$[0]&72|$[2]&768&&(T.$$scope={dirty:$,ctx:C}),s.$set(T),C[13]?_?(_.p(C,$),$[0]&8192&&A(_,1)):(_=dm(C),_.c(),A(_,1),_.m(t,o)):_&&(re(),L(_,1,1,()=>{_=null}),ae()),$[0]&57&&(h=((M=C[0])==null?void 0:M.schema)||[],re(),r=vt(r,$,g,1,C,h,a,t,Ht,mm,null,fm),ae()),(!u||$[0]&4096)&&Q(t,"active",C[12]===is),C[13]&&!C[6]?y?(y.p(C,$),$[0]&8256&&A(y,1)):(y=hm(C),y.c(),A(y,1),y.m(e,null)):y&&(re(),L(y,1,1,()=>{y=null}),ae())},i(C){if(!u){A(m),A(s.$$.fragment,C),A(_);for(let $=0;$ - Send verification email`,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:x,d(s){s&&k(e),t=!1,i()}}}function bm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send password reset email`,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:x,d(s){s&&k(e),t=!1,i()}}}function IO(n){let e,t,i,s,l,o,r,a=n[13]&&!n[2].verified&&n[2].email&&gm(n),f=n[13]&&n[2].email&&bm(n);return{c(){a&&a.c(),e=O(),f&&f.c(),t=O(),i=v("button"),i.innerHTML=` - Duplicate`,s=O(),l=v("button"),l.innerHTML=` - Delete`,p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item txt-danger closable")},m(u,c){a&&a.m(u,c),w(u,e,c),f&&f.m(u,c),w(u,t,c),w(u,i,c),w(u,s,c),w(u,l,c),o||(r=[Y(i,"click",n[33]),Y(l,"click",Pn(Xe(n[34])))],o=!0)},p(u,c){u[13]&&!u[2].verified&&u[2].email?a?a.p(u,c):(a=gm(u),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),u[13]&&u[2].email?f?f.p(u,c):(f=bm(u),f.c(),f.m(t.parentNode,t)):f&&(f.d(1),f=null)},d(u){a&&a.d(u),u&&k(e),f&&f.d(u),u&&k(t),u&&k(i),u&&k(s),u&&k(l),o=!1,Ce(r)}}}function vm(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=O(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),Q(t,"active",n[12]===is),p(s,"type","button"),p(s,"class","tab-item"),Q(s,"active",n[12]===vl),p(e,"class","tabs-header stretched")},m(r,a){w(r,e,a),b(e,t),b(e,i),b(e,s),l||(o=[Y(t,"click",n[35]),Y(s,"click",n[36])],l=!0)},p(r,a){a[0]&4096&&Q(t,"active",r[12]===is),a[0]&4096&&Q(s,"active",r[12]===vl)},d(r){r&&k(e),l=!1,Ce(o)}}}function LO(n){var h;let e,t=n[6]?"New":"Edit",i,s,l,o=((h=n[0])==null?void 0:h.name)+"",r,a,f,u,c,d,m=!n[6]&&_m(n),_=n[13]&&!n[6]&&vm(n);return{c(){e=v("h4"),i=U(t),s=O(),l=v("strong"),r=U(o),a=U(" record"),f=O(),m&&m.c(),u=O(),_&&_.c(),c=ye(),p(e,"class","panel-title svelte-qc5ngu")},m(g,y){w(g,e,y),b(e,i),b(e,s),b(e,l),b(l,r),b(e,a),w(g,f,y),m&&m.m(g,y),w(g,u,y),_&&_.m(g,y),w(g,c,y),d=!0},p(g,y){var S;(!d||y[0]&64)&&t!==(t=g[6]?"New":"Edit")&&se(i,t),(!d||y[0]&1)&&o!==(o=((S=g[0])==null?void 0:S.name)+"")&&se(r,o),g[6]?m&&(re(),L(m,1,1,()=>{m=null}),ae()):m?(m.p(g,y),y[0]&64&&A(m,1)):(m=_m(g),m.c(),A(m,1),m.m(u.parentNode,u)),g[13]&&!g[6]?_?_.p(g,y):(_=vm(g),_.c(),_.m(c.parentNode,c)):_&&(_.d(1),_=null)},i(g){d||(A(m),d=!0)},o(g){L(m),d=!1},d(g){g&&k(e),g&&k(f),m&&m.d(g),g&&k(u),_&&_.d(g),g&&k(c)}}}function PO(n){let e,t,i,s,l,o=n[6]?"Create":"Save changes",r,a,f,u;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=U(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[10],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[16]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[14]||n[10],Q(s,"btn-loading",n[10])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(l,r),f||(u=Y(e,"click",n[30]),f=!0)},p(c,d){d[0]&1024&&(e.disabled=c[10]),d[0]&64&&o!==(o=c[6]?"Create":"Save changes")&&se(r,o),d[0]&17408&&a!==(a=!c[14]||c[10])&&(s.disabled=a),d[0]&1024&&Q(s,"btn-loading",c[10])},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,u()}}}function FO(n){let e,t,i={class:` - record-panel - `+(n[15]?"overlay-panel-xl":"overlay-panel-lg")+` - `+(n[13]&&!n[6]?"colored-header":"")+` - `,beforeHide:n[54],$$slots:{footer:[PO],header:[LO],default:[AO]},$$scope:{ctx:n}};return e=new ln({props:i}),n[55](e),e.$on("hide",n[56]),e.$on("show",n[57]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&41024&&(o.class=` - 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),V(e,s)}}}const is="form",vl="providers";function NO(n,e,t){let i,s,l,o,r;const a=yt(),f="record_"+H.randomString(5);let{collection:u}=e,c,d=null,m=null,_=null,h=!1,g=!1,y={},S={},C=JSON.stringify(null),$=C,T=is,M=!0,E=!1;function D(he){return P(he),t(11,g=!0),t(12,T=is),c==null?void 0:c.show()}function I(){return c==null?void 0:c.hide()}async function P(he){t(28,E=!1),en({}),t(2,d=he||{}),t(3,m=structuredClone(d)),t(4,y={}),t(5,S={}),await sn(),t(9,_=R()),!_||K(m,_)?t(9,_=null):(delete _.password,delete _.passwordConfirm),t(26,C=JSON.stringify(m)),t(28,E=!0)}async function F(he){var at,Bt;en({}),t(2,d=he||{}),t(4,y={}),t(5,S={});const ke=((Bt=(at=u==null?void 0:u.schema)==null?void 0:at.filter(xe=>xe.type!="file"))==null?void 0:Bt.map(xe=>xe.name))||[];for(let xe in he)ke.includes(xe)||t(3,m[xe]=he[xe],m);await sn(),t(26,C=JSON.stringify(m)),J()}function N(){return"record_draft_"+((u==null?void 0:u.id)||"")+"_"+((d==null?void 0:d.id)||"")}function R(he){try{const ke=window.localStorage.getItem(N());if(ke)return new Record(JSON.parse(ke))}catch{}return he}function q(he){window.localStorage.setItem(N(),he)}function B(){_&&(t(3,m=_),t(9,_=null))}function K(he,ke){var rn;const at=structuredClone(he||{}),Bt=structuredClone(ke||{}),xe=(rn=u==null?void 0:u.schema)==null?void 0:rn.filter(Zt=>Zt.type==="file");for(let Zt of xe)delete at[Zt.name],delete Bt[Zt.name];return delete at.password,delete at.passwordConfirm,delete Bt.password,delete Bt.passwordConfirm,JSON.stringify(at)==JSON.stringify(Bt)}function J(){t(9,_=null),window.localStorage.removeItem(N())}async function X(he=!0){if(!(h||!r||!(u!=null&&u.id))){t(10,h=!0);try{const ke=fe();let at;M?at=await ue.collection(u.id).create(ke):at=await ue.collection(u.id).update(m.id,ke),Rt(M?"Successfully created record.":"Successfully updated record."),J(),he?(t(11,g=!1),I()):F(at),a("save",at)}catch(ke){ue.error(ke)}t(10,h=!1)}}function G(){d!=null&&d.id&&mn("Do you really want to delete the selected record?",()=>ue.collection(d.collectionId).delete(d.id).then(()=>{I(),Rt("Successfully deleted record."),a("delete",d)}).catch(he=>{ue.error(he)}))}function fe(){const he=structuredClone(m||{}),ke=new FormData,at={id:he.id},Bt={};for(const xe of(u==null?void 0:u.schema)||[])at[xe.name]=!0,xe.type=="json"&&(Bt[xe.name]=!0);i&&(at.username=!0,at.email=!0,at.emailVisibility=!0,at.password=!0,at.passwordConfirm=!0,at.verified=!0);for(const xe in he)if(at[xe]){if(typeof he[xe]>"u"&&(he[xe]=null),Bt[xe]&&he[xe]!=="")try{JSON.parse(he[xe])}catch(rn){const Zt={};throw Zt[xe]={code:"invalid_json",message:rn.toString()},new Yn({status:400,response:{data:Zt}})}H.addValueToFormData(ke,xe,he[xe])}for(const xe in y){const rn=H.toArray(y[xe]);for(const Zt of rn)ke.append(xe,Zt)}for(const xe in S){const rn=H.toArray(S[xe]);for(const Zt of rn)ke.append(xe+"."+Zt,"")}return ke}function ee(){!(u!=null&&u.id)||!(d!=null&&d.email)||mn(`Do you really want to sent verification email to ${d.email}?`,()=>ue.collection(u.id).requestVerification(d.email).then(()=>{Rt(`Successfully sent verification email to ${d.email}.`)}).catch(he=>{ue.error(he)}))}function te(){!(u!=null&&u.id)||!(d!=null&&d.email)||mn(`Do you really want to sent password reset email to ${d.email}?`,()=>ue.collection(u.id).requestPasswordReset(d.email).then(()=>{Rt(`Successfully sent password reset email to ${d.email}.`)}).catch(he=>{ue.error(he)}))}function Oe(){o?mn("You have unsaved changes. Do you really want to discard them?",()=>{Pe()}):Pe()}async function Pe(){let he=d?structuredClone(d):null;if(he){he.id="",he.created="",he.updated="";const ke=(u==null?void 0:u.schema)||[];for(const at of ke)at.type==="file"&&delete he[at.name]}J(),D(he),await sn(),t(26,C="")}function Ve(he){(he.ctrlKey||he.metaKey)&&he.code=="KeyS"&&(he.preventDefault(),he.stopPropagation(),X(!1))}const ze=()=>I(),we=()=>ee(),Te=()=>te(),Je=()=>Oe(),gt=()=>G(),Ze=()=>t(12,T=is),Ye=()=>t(12,T=vl),wt=()=>B(),me=()=>J();function ve(){m.id=this.value,t(3,m)}function Ke(he){m=he,t(3,m)}function Me(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function mt(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function Lt(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function on(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function De(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function rt(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function gn(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function Sn(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function $n(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function si(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}function Zn(he,ke){n.$$.not_equal(y[ke.name],he)&&(y[ke.name]=he,t(4,y))}function mi(he,ke){n.$$.not_equal(S[ke.name],he)&&(S[ke.name]=he,t(5,S))}function Cn(he,ke){n.$$.not_equal(m[ke.name],he)&&(m[ke.name]=he,t(3,m))}const ct=()=>o&&g?(mn("You have unsaved changes. Do you really want to close the panel?",()=>{t(11,g=!1),I()}),!1):(en({}),J(),!0);function Tn(he){ne[he?"unshift":"push"](()=>{c=he,t(8,c)})}function Jt(he){Fe.call(this,n,he)}function Gn(he){Fe.call(this,n,he)}return n.$$set=he=>{"collection"in he&&t(0,u=he.collection)},n.$$.update=()=>{var he;n.$$.dirty[0]&1&&t(13,i=(u==null?void 0:u.type)==="auth"),n.$$.dirty[0]&1&&t(15,s=!!((he=u==null?void 0:u.schema)!=null&&he.find(ke=>ke.type==="editor"))),n.$$.dirty[0]&48&&t(29,l=H.hasNonEmptyProps(y)||H.hasNonEmptyProps(S)),n.$$.dirty[0]&8&&t(27,$=JSON.stringify(m)),n.$$.dirty[0]&738197504&&t(7,o=l||C!=$),n.$$.dirty[0]&4&&t(6,M=!d||!d.id),n.$$.dirty[0]&192&&t(14,r=M||o),n.$$.dirty[0]&402653184&&E&&q($)},[u,I,d,m,y,S,M,o,c,_,h,g,T,i,r,s,f,B,J,X,G,ee,te,Oe,Ve,D,C,$,E,l,ze,we,Te,Je,gt,Ze,Ye,wt,me,ve,Ke,Me,mt,Lt,on,De,rt,gn,Sn,$n,si,Zn,mi,Cn,ct,Tn,Jt,Gn]}class k1 extends be{constructor(e){super(),ge(this,e,NO,FO,pe,{collection:0,show:25,hide:1},null,[-1,-1,-1])}get show(){return this.$$.ctx[25]}get hide(){return this.$$.ctx[1]}}function ym(n,e,t){const i=n.slice();return i[18]=e[t],i[8]=t,i}function km(n,e,t){const i=n.slice();return i[13]=e[t],i}function wm(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function Sm(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function RO(n){const e=n.slice(),t=H.toArray(e[3]);e[16]=t;const i=e[2]?10:500;return e[17]=i,e}function qO(n){const e=n.slice(),t=H.toArray(e[3]);e[9]=t;const i=H.toArray(e[0].expand[e[1].name]);e[10]=i;const s=e[2]?20:500;return e[11]=s,e}function jO(n){const e=n.slice(),t=H.trimQuotedValue(JSON.stringify(e[3]))||'""';return e[5]=t,e}function VO(n){let e,t;return{c(){e=v("div"),t=U(n[3]),p(e,"class","block txt-break fallback-block svelte-jdf51v")},m(i,s){w(i,e,s),b(e,t)},p(i,s){s&8&&se(t,i[3])},i:x,o:x,d(i){i&&k(e)}}}function zO(n){let e,t=H.truncate(n[3])+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=H.truncate(n[3]))},m(l,o){w(l,e,o),b(e,i)},p(l,o){o&8&&t!==(t=H.truncate(l[3])+"")&&se(i,t),o&8&&s!==(s=H.truncate(l[3]))&&p(e,"title",s)},i:x,o:x,d(l){l&&k(e)}}}function HO(n){let e,t=[],i=new Map,s,l,o=n[16].slice(0,n[17]);const r=f=>f[8]+f[18];for(let f=0;fn[17]&&Cm();return{c(){e=v("div");for(let f=0;ff[17]?a||(a=Cm(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(f){if(!l){for(let u=0;un[11]&&Om();return{c(){e=v("div"),i.c(),s=O(),f&&f.c(),p(e,"class","inline-flex")},m(u,c){w(u,e,c),r[t].m(e,null),b(e,s),f&&f.m(e,null),l=!0},p(u,c){let d=t;t=a(u),t===d?r[t].p(u,c):(re(),L(r[d],1,1,()=>{r[d]=null}),ae(),i=r[t],i?i.p(u,c):(i=r[t]=o[t](u),i.c()),A(i,1),i.m(e,s)),u[9].length>u[11]?f||(f=Om(),f.c(),f.m(e,null)):f&&(f.d(1),f=null)},i(u){l||(A(i),l=!0)},o(u){L(i),l=!1},d(u){u&&k(e),r[t].d(),f&&f.d()}}}function UO(n){let e,t=[],i=new Map,s=H.toArray(n[3]);const l=o=>o[8]+o[6];for(let o=0;o{o[u]=null}),ae(),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)}}}function KO(n){let e,t=H.truncate(n[3])+"",i,s,l;return{c(){e=v("a"),i=U(t),p(e,"class","txt-ellipsis"),p(e,"href",n[3]),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(o,r){w(o,e,r),b(e,i),s||(l=[Se(je.call(null,e,"Open in new tab")),Y(e,"click",Pn(n[4]))],s=!0)},p(o,r){r&8&&t!==(t=H.truncate(o[3])+"")&&se(i,t),r&8&&p(e,"href",o[3])},i:x,o:x,d(o){o&&k(e),s=!1,Ce(l)}}}function JO(n){let e,t;return{c(){e=v("span"),t=U(n[3]),p(e,"class","txt")},m(i,s){w(i,e,s),b(e,t)},p(i,s){s&8&&se(t,i[3])},i:x,o:x,d(i){i&&k(e)}}}function ZO(n){let e,t=n[3]?"True":"False",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt")},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&8&&t!==(t=s[3]?"True":"False")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function GO(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:x,i:x,o:x,d(t){t&&k(e)}}}function XO(n){let e,t,i,s;const l=[iE,nE],o=[];function r(a,f){return a[2]?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):(re(),L(o[u],1,1,()=>{o[u]=null}),ae(),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)}}}function $m(n,e){let t,i,s;return i=new sf({props:{record:e[0],filename:e[18],size:"sm"}}),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o&1&&(r.record=e[0]),o&12&&(r.filename=e[18]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(t),V(i,l)}}}function Cm(n){let e;return{c(){e=U("...")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function QO(n){let e,t=n[9].slice(0,n[11]),i=[];for(let s=0;sr[8]+r[6];for(let r=0;r500&&Dm(n);return{c(){e=v("span"),i=U(t),s=O(),r&&r.c(),l=ye(),p(e,"class","txt")},m(a,f){w(a,e,f),b(e,i),w(a,s,f),r&&r.m(a,f),w(a,l,f),o=!0},p(a,f){(!o||f&8)&&t!==(t=H.truncate(a[5],500,!0)+"")&&se(i,t),a[5].length>500?r?(r.p(a,f),f&8&&A(r,1)):(r=Dm(a),r.c(),A(r,1),r.m(l.parentNode,l)):r&&(re(),L(r,1,1,()=>{r=null}),ae())},i(a){o||(A(r),o=!0)},o(a){L(r),o=!1},d(a){a&&k(e),a&&k(s),r&&r.d(a),a&&k(l)}}}function iE(n){let e,t=H.truncate(n[5])+"",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis")},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&8&&t!==(t=H.truncate(s[5])+"")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function Dm(n){let e,t;return e=new Rs({props:{value:JSON.stringify(n[3],null,2)}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.value=JSON.stringify(i[3],null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function sE(n){let e,t,i,s,l;const o=[XO,GO,ZO,JO,KO,YO,WO,UO,BO,HO,zO,VO],r=[];function a(u,c){return c&8&&(e=null),u[1].type==="json"?0:(e==null&&(e=!!H.isEmpty(u[3])),e?1:u[1].type==="bool"?2:u[1].type==="number"?3:u[1].type==="url"?4:u[1].type==="editor"?5:u[1].type==="date"?6:u[1].type==="select"?7:u[1].type==="relation"?8:u[1].type==="file"?9:u[2]?10:11)}function f(u,c){return c===0?jO(u):c===8?qO(u):c===9?RO(u):u}return t=a(n,-1),i=r[t]=o[t](f(n,t)),{c(){i.c(),s=ye()},m(u,c){r[t].m(u,c),w(u,s,c),l=!0},p(u,[c]){let d=t;t=a(u,c),t===d?r[t].p(f(u,t),c):(re(),L(r[d],1,1,()=>{r[d]=null}),ae(),i=r[t],i?i.p(f(u,t),c):(i=r[t]=o[t](f(u,t)),i.c()),A(i,1),i.m(s.parentNode,s))},i(u){l||(A(i),l=!0)},o(u){L(i),l=!1},d(u){r[t].d(u),u&&k(s)}}}function lE(n,e,t){let i,{record:s}=e,{field:l}=e,{short:o=!1}=e;function r(a){Fe.call(this,n,a)}return n.$$set=a=>{"record"in a&&t(0,s=a.record),"field"in a&&t(1,l=a.field),"short"in a&&t(2,o=a.short)},n.$$.update=()=>{n.$$.dirty&3&&t(3,i=s[l.name])},[s,l,o,i,r]}class w1 extends be{constructor(e){super(),ge(this,e,lE,sE,pe,{record:0,field:1,short:2})}}function Am(n,e,t){const i=n.slice();return i[10]=e[t],i}function Im(n){let e,t,i=n[10].name+"",s,l,o,r,a;return r=new w1({props:{field:n[10],record:n[3]}}),{c(){e=v("tr"),t=v("td"),s=U(i),l=O(),o=v("td"),z(r.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(o,"class","col-field svelte-1nt58f7")},m(f,u){w(f,e,u),b(e,t),b(t,s),b(e,l),b(e,o),j(r,o,null),a=!0},p(f,u){(!a||u&1)&&i!==(i=f[10].name+"")&&se(s,i);const c={};u&1&&(c.field=f[10]),u&8&&(c.record=f[3]),r.$set(c)},i(f){a||(A(r.$$.fragment,f),a=!0)},o(f){L(r.$$.fragment,f),a=!1},d(f){f&&k(e),V(r)}}}function Lm(n){let e,t,i,s,l,o;return l=new $i({props:{date:n[3].created}}),{c(){e=v("tr"),t=v("td"),t.textContent="created",i=O(),s=v("td"),z(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(s,"class","col-field svelte-1nt58f7")},m(r,a){w(r,e,a),b(e,t),b(e,i),b(e,s),j(l,s,null),o=!0},p(r,a){const f={};a&8&&(f.date=r[3].created),l.$set(f)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){L(l.$$.fragment,r),o=!1},d(r){r&&k(e),V(l)}}}function Pm(n){let e,t,i,s,l,o;return l=new $i({props:{date:n[3].updated}}),{c(){e=v("tr"),t=v("td"),t.textContent="updated",i=O(),s=v("td"),z(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(s,"class","col-field svelte-1nt58f7")},m(r,a){w(r,e,a),b(e,t),b(e,i),b(e,s),j(l,s,null),o=!0},p(r,a){const f={};a&8&&(f.date=r[3].updated),l.$set(f)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){L(l.$$.fragment,r),o=!1},d(r){r&&k(e),V(l)}}}function oE(n){var M;let e,t,i,s,l,o,r,a,f,u,c=n[3].id+"",d,m,_,h,g;a=new Rs({props:{value:n[3].id}});let y=(M=n[0])==null?void 0:M.schema,S=[];for(let E=0;EL(S[E],1,1,()=>{S[E]=null});let $=n[3].created&&Lm(n),T=n[3].updated&&Pm(n);return{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="id",l=O(),o=v("td"),r=v("div"),z(a.$$.fragment),f=O(),u=v("span"),d=U(c),m=O();for(let E=0;E{$=null}),ae()),E[3].updated?T?(T.p(E,D),D&8&&A(T,1)):(T=Pm(E),T.c(),A(T,1),T.m(t,null)):T&&(re(),L(T,1,1,()=>{T=null}),ae())},i(E){if(!g){A(a.$$.fragment,E);for(let D=0;DClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[6]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function fE(n){let e,t,i={class:"record-preview-panel "+(n[4]?"overlay-panel-xl":"overlay-panel-lg"),$$slots:{footer:[aE],header:[rE],default:[oE]},$$scope:{ctx:n}};return e=new ln({props:i}),n[7](e),e.$on("hide",n[8]),e.$on("show",n[9]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="record-preview-panel "+(s[4]?"overlay-panel-xl":"overlay-panel-lg")),l&8201&&(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[7](null),V(e,s)}}}function uE(n,e,t){let i,{collection:s}=e,l,o={};function r(m){return t(3,o=m),l==null?void 0:l.show()}function a(){return l==null?void 0:l.hide()}const f=()=>a();function u(m){ne[m?"unshift":"push"](()=>{l=m,t(2,l)})}function c(m){Fe.call(this,n,m)}function d(m){Fe.call(this,n,m)}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{var m;n.$$.dirty&1&&t(4,i=!!((m=s==null?void 0:s.schema)!=null&&m.find(_=>_.type==="editor")))},[s,a,l,o,i,r,f,u,c,d]}class cE extends be{constructor(e){super(),ge(this,e,uE,fE,pe,{collection:0,show:5,hide:1})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[1]}}function Fm(n,e,t){const i=n.slice();return i[58]=e[t],i}function Nm(n,e,t){const i=n.slice();return i[61]=e[t],i}function Rm(n,e,t){const i=n.slice();return i[61]=e[t],i}function qm(n,e,t){const i=n.slice();return i[54]=e[t],i}function jm(n){let e;function t(l,o){return l[13]?pE:dE}let i=t(n),s=i(n);return{c(){e=v("th"),s.c(),p(e,"class","bulk-select-col min-width")},m(l,o){w(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&k(e),s.d()}}}function dE(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=O(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[3].length,t.checked=n[17],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,f){w(a,e,f),b(e,t),b(e,s),b(e,l),o||(r=Y(t,"change",n[30]),o=!0)},p(a,f){f[0]&8&&i!==(i=!a[3].length)&&(t.disabled=i),f[0]&131072&&(t.checked=a[17])},d(a){a&&k(e),o=!1,r()}}}function pE(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Vm(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[mE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function mE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",H.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:x,d(l){l&&k(e)}}}function zm(n){let e=!n[6].includes("@username"),t,i=!n[6].includes("@email"),s,l,o=e&&Hm(n),r=i&&Bm(n);return{c(){o&&o.c(),t=O(),r&&r.c(),s=ye()},m(a,f){o&&o.m(a,f),w(a,t,f),r&&r.m(a,f),w(a,s,f),l=!0},p(a,f){f[0]&64&&(e=!a[6].includes("@username")),e?o?(o.p(a,f),f[0]&64&&A(o,1)):(o=Hm(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(re(),L(o,1,1,()=>{o=null}),ae()),f[0]&64&&(i=!a[6].includes("@email")),i?r?(r.p(a,f),f[0]&64&&A(r,1)):(r=Bm(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(re(),L(r,1,1,()=>{r=null}),ae())},i(a){l||(A(o),A(r),l=!0)},o(a){L(o),L(r),l=!1},d(a){o&&o.d(a),a&&k(t),r&&r.d(a),a&&k(s)}}}function Hm(n){let e,t,i;function s(o){n[32](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[hE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function hE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="username",p(t,"class",H.getFieldTypeIcon("user")),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:x,d(l){l&&k(e)}}}function Bm(n){let e,t,i;function s(o){n[33](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[_E]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function _E(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",H.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:x,d(l){l&&k(e)}}}function gE(n){let e,t,i,s,l,o=n[61].name+"",r;return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=U(o),p(t,"class",i=H.getFieldTypeIcon(n[61].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,f){w(a,e,f),b(e,t),b(e,s),b(e,l),b(l,r)},p(a,f){f[0]&524288&&i!==(i=H.getFieldTypeIcon(a[61].type))&&p(t,"class",i),f[0]&524288&&o!==(o=a[61].name+"")&&se(r,o)},d(a){a&&k(e)}}}function Um(n,e){let t,i,s,l;function o(a){e[34](a)}let r={class:"col-type-"+e[61].type+" col-field-"+e[61].name,name:e[61].name,$$slots:{default:[gE]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new un({props:r}),ne.push(()=>de(i,"sort",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,f){w(a,t,f),j(i,a,f),l=!0},p(a,f){e=a;const u={};f[0]&524288&&(u.class="col-type-"+e[61].type+" col-field-"+e[61].name),f[0]&524288&&(u.name=e[61].name),f[0]&524288|f[2]&16&&(u.$$scope={dirty:f,ctx:e}),!s&&f[0]&1&&(s=!0,u.sort=e[0],_e(()=>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),V(i,a)}}}function Wm(n){let e,t,i;function s(o){n[35](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[bE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function bE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",H.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:x,d(l){l&&k(e)}}}function Ym(n){let e,t,i;function s(o){n[36](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[vE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new un({props:l}),ne.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function vE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",H.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:x,d(l){l&&k(e)}}}function Km(n){let e;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Toggle columns"),p(e,"class","btn btn-sm btn-transparent p-0")},m(t,i){w(t,e,i),n[37](e)},p:x,d(t){t&&k(e),n[37](null)}}}function Jm(n){let e;function t(l,o){return l[13]?kE:yE}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 yE(n){let e,t,i,s,l;function o(f,u){var c;if((c=f[1])!=null&&c.length)return SE;if(!f[11])return wE}let r=o(n),a=r&&r(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=O(),a&&a.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(f,u){w(f,e,u),b(e,t),b(t,i),b(t,s),a&&a.m(t,null),b(e,l)},p(f,u){r===(r=o(f))&&a?a.p(f,u):(a&&a.d(1),a=r&&r(f),a&&(a.c(),a.m(t,null)))},d(f){f&&k(e),a&&a.d()}}}function kE(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function wE(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - New record`,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:x,d(s){s&&k(e),t=!1,i()}}}function SE(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[41]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Zm(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=O(),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",Pn(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,Ce(u)}}}function Gm(n){let e,t,i,s,l,o,r=n[58].id+"",a,f,u;s=new Rs({props:{value:n[58].id}});let c=n[10]&&Xm(n);return{c(){e=v("td"),t=v("div"),i=v("div"),z(s.$$.fragment),l=O(),o=v("div"),a=U(r),f=O(),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),j(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=Xm(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),V(s),c&&c.d()}}}function Xm(n){let e;function t(l,o){return l[58].verified?CE:$E}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 $E(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=Se(je.call(null,e,"Unverified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function CE(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=Se(je.call(null,e,"Verified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function Qm(n){let e=!n[6].includes("@username"),t,i=!n[6].includes("@email"),s,l=e&&xm(n),o=i&&eh(n);return{c(){l&&l.c(),t=O(),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=eh(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=!!H.isEmpty(o[58].username)),t?ME:TE}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 TE(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 ME(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:x,d(t){t&&k(e)}}}function eh(n){let e,t;function i(o,r){return r[0]&8&&(t=null),t==null&&(t=!!H.isEmpty(o[58].email)),t?EE:OE}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 OE(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 EE(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:x,d(t){t&&k(e)}}}function th(n,e){let t,i,s,l;return i=new w1({props:{short:!0,record:e[58],field:e[61]}}),{key:n,first:null,c(){t=v("td"),z(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),j(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),V(i)}}}function nh(n){let e,t,i;return t=new $i({props:{date:n[58].created}}),{c(){e=v("td"),z(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.date=s[58].created),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),V(t)}}}function ih(n){let e,t,i;return t=new $i({props:{date:n[58].updated}}),{c(){e=v("td"),z(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.date=s[58].updated),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),V(t)}}}function sh(n,e){let t,i,s=!e[6].includes("@id"),l,o,r=[],a=new Map,f,u=e[9]&&!e[6].includes("@created"),c,d=e[8]&&!e[6].includes("@updated"),m,_,h,g,y,S,C=!e[11]&&Zm(e),$=s&&Gm(e),T=e[10]&&Qm(e),M=e[19];const E=N=>N[61].name;for(let N=0;N',h=O(),p(_,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(N,R){w(N,t,R),C&&C.m(t,null),b(t,i),$&&$.m(t,null),b(t,l),T&&T.m(t,null),b(t,o);for(let q=0;q{$=null}),ae()),e[10]?T?T.p(e,R):(T=Qm(e),T.c(),T.m(t,o)):T&&(T.d(1),T=null),R[0]&524296&&(M=e[19],re(),r=vt(r,R,E,1,e,M,a,t,Ht,th,f,Nm),ae()),R[0]&576&&(u=e[9]&&!e[6].includes("@created")),u?D?(D.p(e,R),R[0]&576&&A(D,1)):(D=nh(e),D.c(),A(D,1),D.m(t,c)):D&&(re(),L(D,1,1,()=>{D=null}),ae()),R[0]&320&&(d=e[8]&&!e[6].includes("@updated")),d?I?(I.p(e,R),R[0]&320&&A(I,1)):(I=ih(e),I.c(),A(I,1),I.m(t,m)):I&&(re(),L(I,1,1,()=>{I=null}),ae())},i(N){if(!g){A($);for(let R=0;RK[61].name;for(let K=0;KK[11]?K[58]:K[58].id;for(let K=0;K{M=null}),ae()),K[10]?E?(E.p(K,J),J[0]&1024&&A(E,1)):(E=zm(K),E.c(),A(E,1),E.m(i,r)):E&&(re(),L(E,1,1,()=>{E=null}),ae()),J[0]&524289&&(D=K[19],re(),a=vt(a,J,I,1,K,D,f,i,Ht,Um,u,Rm),ae()),J[0]&576&&(c=K[9]&&!K[6].includes("@created")),c?P?(P.p(K,J),J[0]&576&&A(P,1)):(P=Wm(K),P.c(),A(P,1),P.m(i,d)):P&&(re(),L(P,1,1,()=>{P=null}),ae()),J[0]&320&&(m=K[8]&&!K[6].includes("@updated")),m?F?(F.p(K,J),J[0]&320&&A(F,1)):(F=Ym(K),F.c(),A(F,1),F.m(i,_)):F&&(re(),L(F,1,1,()=>{F=null}),ae()),K[16].length?N?N.p(K,J):(N=Km(K),N.c(),N.m(h,null)):N&&(N.d(1),N=null),J[0]&9973610&&(R=K[3],re(),S=vt(S,J,q,1,K,R,C,y,Ht,sh,null,Fm),ae(),!R.length&&B?B.p(K,J):R.length?B&&(B.d(1),B=null):(B=Jm(K),B.c(),B.m(y,null))),(!$||J[0]&8192)&&Q(e,"table-loading",K[13])},i(K){if(!$){A(M),A(E);for(let J=0;J({57:l}),({uniqueId:l})=>[0,l?67108864:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&65600|o[1]&67108864|o[2]&16&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(t),V(i,l)}}}function IE(n){let e,t,i=[],s=new Map,l,o,r=n[16];const a=f=>f[54].id+f[54].name;for(let f=0;f{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function rh(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=v("small"),t=U("Showing "),s=U(i),l=U(" of "),o=U(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),b(e,t),b(e,s),b(e,l),b(e,o)},p(r,a){a[0]&8&&i!==(i=r[3].length+"")&&se(s,i),a[0]&16&&se(o,r[4])},d(r){r&&k(e)}}}function ah(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,f;return{c(){e=v("div"),t=v("button"),i=v("span"),s=U("Load more ("),o=U(l),r=U(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[13]),Q(t,"btn-disabled",n[13]),p(e,"class","block txt-center m-t-xs")},m(u,c){w(u,e,c),b(e,t),b(t,i),b(i,s),b(i,o),b(i,r),a||(f=Y(t,"click",n[43]),a=!0)},p(u,c){c[0]&24&&l!==(l=u[4]-u[3].length+"")&&se(o,l),c[0]&8192&&Q(t,"btn-loading",u[13]),c[0]&8192&&Q(t,"btn-disabled",u[13])},d(u){u&&k(e),a=!1,f()}}}function fh(n){let e,t,i,s,l,o,r=n[7]===1?"record":"records",a,f,u,c,d,m,_,h,g,y,S;return{c(){e=v("div"),t=v("div"),i=U("Selected "),s=v("strong"),l=U(n[7]),o=O(),a=U(r),f=O(),u=v("button"),u.innerHTML='Reset',c=O(),d=v("div"),m=O(),_=v("button"),_.innerHTML='Delete selected',p(t,"class","txt"),p(u,"type","button"),p(u,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),Q(u,"btn-disabled",n[14]),p(d,"class","flex-fill"),p(_,"type","button"),p(_,"class","btn btn-sm btn-transparent btn-danger"),Q(_,"btn-loading",n[14]),Q(_,"btn-disabled",n[14]),p(e,"class","bulkbar")},m(C,$){w(C,e,$),b(e,t),b(t,i),b(t,s),b(s,l),b(t,o),b(t,a),b(e,f),b(e,u),b(e,c),b(e,d),b(e,m),b(e,_),g=!0,y||(S=[Y(u,"click",n[44]),Y(_,"click",n[45])],y=!0)},p(C,$){(!g||$[0]&128)&&se(l,C[7]),(!g||$[0]&128)&&r!==(r=C[7]===1?"record":"records")&&se(a,r),(!g||$[0]&16384)&&Q(u,"btn-disabled",C[14]),(!g||$[0]&16384)&&Q(_,"btn-loading",C[14]),(!g||$[0]&16384)&&Q(_,"btn-disabled",C[14])},i(C){g||(C&&Ge(()=>{g&&(h||(h=Re(e,di,{duration:150,y:5},!0)),h.run(1))}),g=!0)},o(C){C&&(h||(h=Re(e,di,{duration:150,y:5},!1)),h.run(0)),g=!1},d(C){C&&k(e),C&&h&&h.end(),y=!1,Ce(S)}}}function PE(n){let e,t,i,s,l,o;e=new Aa({props:{class:"table-wrapper",$$slots:{before:[LE],default:[DE]},$$scope:{ctx:n}}});let r=n[3].length&&rh(n),a=n[3].length&&n[18]&&ah(n),f=n[7]&&fh(n);return{c(){z(e.$$.fragment),t=O(),r&&r.c(),i=O(),a&&a.c(),s=O(),f&&f.c(),l=ye()},m(u,c){j(e,u,c),w(u,t,c),r&&r.m(u,c),w(u,i,c),a&&a.m(u,c),w(u,s,c),f&&f.m(u,c),w(u,l,c),o=!0},p(u,c){const d={};c[0]&765803|c[2]&16&&(d.$$scope={dirty:c,ctx:u}),e.$set(d),u[3].length?r?r.p(u,c):(r=rh(u),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),u[3].length&&u[18]?a?a.p(u,c):(a=ah(u),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),u[7]?f?(f.p(u,c),c[0]&128&&A(f,1)):(f=fh(u),f.c(),A(f,1),f.m(l.parentNode,l)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},i(u){o||(A(e.$$.fragment,u),A(f),o=!0)},o(u){L(e.$$.fragment,u),L(f),o=!1},d(u){V(e,u),u&&k(t),r&&r.d(u),u&&k(i),a&&a.d(u),u&&k(s),f&&f.d(u),u&&k(l)}}}const FE=/^([\+\-])?(\w+)$/;function NE(n,e,t){let i,s,l,o,r,a,f,u,c,d,m;We(n,ni,De=>t(48,m=De));const _=yt();let{collection:h}=e,{sort:g=""}=e,{filter:y=""}=e,S=[],C=1,$=0,T={},M=!0,E=!1,D=0,I,P=[],F=[];function N(){h!=null&&h.id&&localStorage.setItem((h==null?void 0:h.id)+"@hiddenCollumns",JSON.stringify(P))}function R(){if(t(6,P=[]),!!(h!=null&&h.id))try{const De=localStorage.getItem(h.id+"@hiddenCollumns");De&&t(6,P=JSON.parse(De)||[])}catch{}}async function q(){const De=C;for(let rt=1;rt<=De;rt++)(rt===1||a)&&await B(rt,!1)}async function B(De=1,rt=!0){var Zn,mi,Cn;if(!(h!=null&&h.id))return;t(13,M=!0);let gn=g;const Sn=gn.match(FE),$n=Sn?o.find(ct=>ct.name===Sn[2]):null;if(Sn&&$n){const ct=((Cn=(mi=(Zn=m==null?void 0:m.find(Jt=>{var Gn;return Jt.id==((Gn=$n.options)==null?void 0:Gn.collectionId)}))==null?void 0:Zn.schema)==null?void 0:mi.filter(Jt=>Jt.presentable))==null?void 0:Cn.map(Jt=>Jt.name))||[],Tn=[];for(const Jt of ct)Tn.push((Sn[1]||"")+Sn[2]+"."+Jt);Tn.length>0&&(gn=Tn.join(","))}const si=H.getAllCollectionIdentifiers(h);return ue.collection(h.id).getList(De,30,{sort:gn,filter:H.normalizeSearchFilter(y,si),expand:o.map(ct=>ct.name).join(","),$cancelKey:"records_list"}).then(async ct=>{var Tn;if(De<=1&&K(),t(13,M=!1),t(12,C=ct.page),t(4,$=ct.totalItems),_("load",S.concat(ct.items)),rt){const Jt=++D;for(;(Tn=ct.items)!=null&&Tn.length&&D==Jt;)t(3,S=S.concat(ct.items.splice(0,15))),await H.yieldToMain()}else t(3,S=S.concat(ct.items))}).catch(ct=>{ct!=null&&ct.isAbort||(t(13,M=!1),console.warn(ct),K(),ue.error(ct,(ct==null?void 0:ct.status)!=400))})}function K(){t(3,S=[]),t(12,C=1),t(4,$=0),t(5,T={})}function J(){u?X():G()}function X(){t(5,T={})}function G(){for(const De of S)t(5,T[De.id]=De,T);t(5,T)}function fe(De){T[De.id]?delete T[De.id]:t(5,T[De.id]=De,T),t(5,T)}function ee(){mn(`Do you really want to delete the selected ${f===1?"record":"records"}?`,te)}async function te(){if(E||!f||!(h!=null&&h.id))return;let De=[];for(const rt of Object.keys(T))De.push(ue.collection(h.id).delete(rt));return t(14,E=!0),Promise.all(De).then(()=>{Rt(`Successfully deleted the selected ${f===1?"record":"records"}.`),X()}).catch(rt=>{ue.error(rt)}).finally(()=>(t(14,E=!1),q()))}function Oe(De){Fe.call(this,n,De)}const Pe=(De,rt)=>{rt.target.checked?H.removeByValue(P,De.id):H.pushUnique(P,De.id),t(6,P)},Ve=()=>J();function ze(De){g=De,t(0,g)}function we(De){g=De,t(0,g)}function Te(De){g=De,t(0,g)}function Je(De){g=De,t(0,g)}function gt(De){g=De,t(0,g)}function Ze(De){g=De,t(0,g)}function Ye(De){ne[De?"unshift":"push"](()=>{I=De,t(15,I)})}const wt=De=>fe(De),me=De=>_("select",De),ve=(De,rt)=>{rt.code==="Enter"&&(rt.preventDefault(),_("select",De))},Ke=()=>t(1,y=""),Me=()=>_("new"),mt=()=>B(C+1),Lt=()=>X(),on=()=>ee();return n.$$set=De=>{"collection"in De&&t(25,h=De.collection),"sort"in De&&t(0,g=De.sort),"filter"in De&&t(1,y=De.filter)},n.$$.update=()=>{n.$$.dirty[0]&33554432&&h!=null&&h.id&&(R(),K()),n.$$.dirty[0]&33554432&&t(11,i=(h==null?void 0:h.type)==="view"),n.$$.dirty[0]&33554432&&t(10,s=(h==null?void 0:h.type)==="auth"),n.$$.dirty[0]&33554432&&t(27,l=(h==null?void 0:h.schema)||[]),n.$$.dirty[0]&134217728&&(o=l.filter(De=>De.type==="relation")),n.$$.dirty[0]&134217792&&t(19,r=l.filter(De=>!P.includes(De.id))),n.$$.dirty[0]&33554435&&h!=null&&h.id&&g!==-1&&y!==-1&&B(1),n.$$.dirty[0]&24&&t(18,a=$>S.length),n.$$.dirty[0]&32&&t(7,f=Object.keys(T).length),n.$$.dirty[0]&136&&t(17,u=S.length&&f===S.length),n.$$.dirty[0]&64&&P!==-1&&N(),n.$$.dirty[0]&2056&&t(9,c=!i||S.length>0&&S[0].created!=""),n.$$.dirty[0]&2056&&t(8,d=!i||S.length>0&&S[0].updated!=""),n.$$.dirty[0]&134219520&&t(16,F=[].concat(s?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],l.map(De=>({id:De.id,name:De.name})),c?{id:"@created",name:"created"}:[],d?{id:"@updated",name:"updated"}:[]))},[g,y,B,S,$,T,P,f,d,c,s,i,C,M,E,I,F,u,a,r,_,J,X,fe,ee,h,q,l,Oe,Pe,Ve,ze,we,Te,Je,gt,Ze,Ye,wt,me,ve,Ke,Me,mt,Lt,on]}class RE extends be{constructor(e){super(),ge(this,e,NE,PE,pe,{collection:25,sort:0,filter:1,reloadLoadedPages:26,load:2},null,[-1,-1,-1])}get reloadLoadedPages(){return this.$$.ctx[26]}get load(){return this.$$.ctx[2]}}function qE(n){let e,t,i,s;return e=new $M({}),i=new wn({props:{$$slots:{default:[zE]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&1527|o[1]&16&&(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){V(e,l),l&&k(t),V(i,l)}}}function jE(n){let e,t;return e=new wn({props:{center:!0,$$slots:{default:[UE]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1040|s[1]&16&&(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){V(e,i)}}}function VE(n){let e,t;return e=new wn({props:{center:!0,$$slots:{default:[WE]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[1]&16&&(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){V(e,i)}}}function uh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Edit collection"),p(e,"class","btn btn-transparent btn-circle")},m(s,l){w(s,e,l),t||(i=[Se(je.call(null,e,{text:"Edit collection",position:"right"})),Y(e,"click",n[15])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ce(i)}}}function ch(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - New record`,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:x,d(s){s&&k(e),t=!1,i()}}}function zE(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,E,D,I,P,F=!n[10]&&uh(n);c=new Wo({}),c.$on("refresh",n[16]);let N=n[2].type!=="view"&&ch(n);y=new Uo({props:{value:n[0],autocompleteCollection:n[2]}}),y.$on("submit",n[19]);function R(K){n[21](K)}function q(K){n[22](K)}let B={collection:n[2]};return n[0]!==void 0&&(B.filter=n[0]),n[1]!==void 0&&(B.sort=n[1]),T=new RE({props:B}),n[20](T),ne.push(()=>de(T,"filter",R)),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=O(),l=v("div"),r=U(o),a=O(),f=v("div"),F&&F.c(),u=O(),z(c.$$.fragment),d=O(),m=v("div"),_=v("button"),_.innerHTML=` - API Preview`,h=O(),N&&N.c(),g=O(),z(y.$$.fragment),S=O(),C=v("div"),$=O(),z(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(C,"class","clearfix m-b-base")},m(K,J){w(K,e,J),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),j(c,f,null),b(e,d),b(e,m),b(m,_),b(m,h),N&&N.m(m,null),w(K,g,J),j(y,K,J),w(K,S,J),w(K,C,J),w(K,$,J),j(T,K,J),D=!0,I||(P=Y(_,"click",n[17]),I=!0)},p(K,J){(!D||J[0]&4)&&o!==(o=K[2].name+"")&&se(r,o),K[10]?F&&(F.d(1),F=null):F?F.p(K,J):(F=uh(K),F.c(),F.m(f,u)),K[2].type!=="view"?N?N.p(K,J):(N=ch(K),N.c(),N.m(m,null)):N&&(N.d(1),N=null);const X={};J[0]&1&&(X.value=K[0]),J[0]&4&&(X.autocompleteCollection=K[2]),y.$set(X);const G={};J[0]&4&&(G.collection=K[2]),!M&&J[0]&1&&(M=!0,G.filter=K[0],_e(()=>M=!1)),!E&&J[0]&2&&(E=!0,G.sort=K[1],_e(()=>E=!1)),T.$set(G)},i(K){D||(A(c.$$.fragment,K),A(y.$$.fragment,K),A(T.$$.fragment,K),D=!0)},o(K){L(c.$$.fragment,K),L(y.$$.fragment,K),L(T.$$.fragment,K),D=!1},d(K){K&&k(e),F&&F.d(),V(c),N&&N.d(),K&&k(g),V(y,K),K&&k(S),K&&k(C),K&&k($),n[20](null),V(T,K),I=!1,P()}}}function HE(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=O(),i=v("button"),i.innerHTML=` - Create new collection`,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:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,l()}}}function BE(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:x,d(t){t&&k(e)}}}function UE(n){let e,t,i;function s(r,a){return r[10]?BE:HE}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=O(),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 WE(n){let e;return{c(){e=v("div"),e.innerHTML=` -

    Loading collections...

    `,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function YE(n){let e,t,i,s,l,o,r,a,f,u,c;const d=[VE,jE,qE],m=[];function _(C,$){return C[3]&&!C[9].length?0:C[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 IM({props:g}),n[26](o);let y={collection:n[2]};a=new k1({props:y}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let S={collection:n[2]};return u=new cE({props:S}),n[30](u),{c(){t.c(),i=O(),z(s.$$.fragment),l=O(),z(o.$$.fragment),r=O(),z(a.$$.fragment),f=O(),z(u.$$.fragment)},m(C,$){m[e].m(C,$),w(C,i,$),j(s,C,$),w(C,l,$),j(o,C,$),w(C,r,$),j(a,C,$),w(C,f,$),j(u,C,$),c=!0},p(C,$){let T=e;e=_(C),e===T?m[e].p(C,$):(re(),L(m[T],1,1,()=>{m[T]=null}),ae(),t=m[e],t?t.p(C,$):(t=m[e]=d[e](C),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const E={};o.$set(E);const D={};$[0]&4&&(D.collection=C[2]),a.$set(D);const I={};$[0]&4&&(I.collection=C[2]),u.$set(I)},i(C){c||(A(t),A(s.$$.fragment,C),A(o.$$.fragment,C),A(a.$$.fragment,C),A(u.$$.fragment,C),c=!0)},o(C){L(t),L(s.$$.fragment,C),L(o.$$.fragment,C),L(a.$$.fragment,C),L(u.$$.fragment,C),c=!1},d(C){m[e].d(C),C&&k(i),n[25](null),V(s,C),C&&k(l),n[26](null),V(o,C),C&&k(r),n[27](null),V(a,C),C&&k(f),n[30](null),V(u,C)}}}function KE(n,e,t){let i,s,l,o,r,a,f;We(n,Si,te=>t(2,s=te)),We(n,Et,te=>t(31,l=te)),We(n,bo,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 C(){t(11,S=s==null?void 0:s.id),t(0,g=""),t(1,y="-created"),$()}async function $(){if(!y)return;const te=H.getAllCollectionIdentifiers(s),Oe=y.split(",").map(Pe=>Pe.startsWith("+")||Pe.startsWith("-")?Pe.substring(1):Pe);Oe.filter(Pe=>te.includes(Pe)).length!=Oe.length&&(te.includes("created")?t(1,y="-created"):t(1,y=""))}Ey(S);const T=()=>c==null?void 0:c.show(),M=()=>c==null?void 0:c.show(s),E=()=>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 N(te){g=te,t(0,g)}function R(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)},B=()=>m==null?void 0:m.show();function K(te){ne[te?"unshift":"push"](()=>{c=te,t(4,c)})}function J(te){ne[te?"unshift":"push"](()=>{d=te,t(5,d)})}function X(te){ne[te?"unshift":"push"](()=>{m=te,t(6,m)})}const G=()=>h==null?void 0:h.reloadLoadedPages(),fe=()=>h==null?void 0:h.reloadLoadedPages();function ee(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&&Ty(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&S!=s.id&&C(),n.$$.dirty[0]&4&&s!=null&&s.id&&$(),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();ji("/collections?"+te)}n.$$.dirty[0]&4&&nn(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,E,D,I,P,F,N,R,q,B,K,J,X,G,fe,ee]}class JE extends be{constructor(e){super(),ge(this,e,KE,YE,pe,{},null,[-1,-1])}}function ZE(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T,M,E,D,I,P,F;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=O(),l=v("a"),l.innerHTML=` - Application`,o=O(),r=v("a"),r.innerHTML=` - Mail settings`,a=O(),f=v("a"),f.innerHTML=` - Files storage`,u=O(),c=v("a"),c.innerHTML=` - Backups`,d=O(),m=v("div"),m.innerHTML='Sync',_=O(),h=v("a"),h.innerHTML=` - Export collections`,g=O(),y=v("a"),y.innerHTML=` - Import collections`,S=O(),C=v("div"),C.textContent="Authentication",$=O(),T=v("a"),T.innerHTML=` - Auth providers`,M=O(),E=v("a"),E.innerHTML=` - Token options`,D=O(),I=v("a"),I.innerHTML=` - Admins`,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(C,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"class","sidebar-list-item"),p(E,"href","/settings/tokens"),p(E,"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(N,R){w(N,e,R),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,C),b(t,$),b(t,T),b(t,M),b(t,E),b(t,D),b(t,I),P||(F=[Se(zn.call(null,l,{path:"/settings"})),Se(an.call(null,l)),Se(zn.call(null,r,{path:"/settings/mail/?.*"})),Se(an.call(null,r)),Se(zn.call(null,f,{path:"/settings/storage/?.*"})),Se(an.call(null,f)),Se(zn.call(null,c,{path:"/settings/backups/?.*"})),Se(an.call(null,c)),Se(zn.call(null,h,{path:"/settings/export-collections/?.*"})),Se(an.call(null,h)),Se(zn.call(null,y,{path:"/settings/import-collections/?.*"})),Se(an.call(null,y)),Se(zn.call(null,T,{path:"/settings/auth-providers/?.*"})),Se(an.call(null,T)),Se(zn.call(null,E,{path:"/settings/tokens/?.*"})),Se(an.call(null,E)),Se(zn.call(null,I,{path:"/settings/admins/?.*"})),Se(an.call(null,I))],P=!0)},p:x,i:x,o:x,d(N){N&&k(e),P=!1,Ce(F)}}}class Mi extends be{constructor(e){super(),ge(this,e,null,ZE,pe,{})}}function dh(n,e,t){const i=n.slice();return i[31]=e[t],i}function ph(n){let e,t;return e=new ce({props:{class:"form-field readonly",name:"id",$$slots:{default:[GE,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function GE(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=O(),s=v("span"),s.textContent="id",o=O(),r=v("div"),a=v("i"),u=O(),c=v("input"),p(t,"class",H.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=Se(f=je.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&&Dt(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 mh(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=O(),_n(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 XE(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("input"),p(t,"class",H.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),oe(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]&&oe(r,c[3])},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,u()}}}function hh(n){let e,t;return e=new ce({props:{class:"form-field form-field-toggle",$$slots:{default:[QE,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function QE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),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 _h(n){let e,t,i,s,l,o,r,a,f;return s=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[xE,({uniqueId:u})=>({30:u}),({uniqueId:u})=>[u?1073741824:0]]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[eD,({uniqueId:u})=>({30:u}),({uniqueId:u})=>[u?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=O(),o=v("div"),z(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),j(s,i,null),b(t,l),b(t,o),j(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),V(s),V(r),u&&a&&a.end()}}}function xE(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_;return c=new v1({}),{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),f=O(),u=v("div"),z(c.$$.fragment),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,p(u,"class","form-field-addon")},m(h,g){w(h,e,g),b(e,t),b(e,i),b(e,s),w(h,o,g),w(h,r,g),oe(r,n[9]),w(h,f,g),w(h,u,g),j(c,u,null),d=!0,m||(_=Y(r,"input",n[21]),m=!0)},p(h,g){(!d||g[0]&1073741824&&l!==(l=h[30]))&&p(e,"for",l),(!d||g[0]&1073741824&&a!==(a=h[30]))&&p(r,"id",a),g[0]&512&&r.value!==h[9]&&oe(r,h[9])},i(h){d||(A(c.$$.fragment,h),d=!0)},o(h){L(c.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(o),h&&k(r),h&&k(f),h&&k(u),V(c),m=!1,_()}}}function eD(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),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),oe(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]&&oe(r,c[10])},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,u()}}}function tD(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_=!n[5]&&ph(n),h=[0,1,2,3,4,5,6,7,8,9],g=[];for(let C=0;C<10;C+=1)g[C]=mh(dh(n,h,C));a=new ce({props:{class:"form-field required",name:"email",$$slots:{default:[XE,({uniqueId:C})=>({30:C}),({uniqueId:C})=>[C?1073741824:0]]},$$scope:{ctx:n}}});let y=!n[5]&&hh(n),S=(n[5]||n[4])&&_h(n);return{c(){e=v("form"),_&&_.c(),t=O(),i=v("div"),s=v("p"),s.textContent="Avatar",l=O(),o=v("div");for(let C=0;C<10;C+=1)g[C].c();r=O(),z(a.$$.fragment),f=O(),y&&y.c(),u=O(),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(C,e,$),_&&_.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].m(o,null);b(e,r),j(a,e,null),b(e,f),y&&y.m(e,null),b(e,u),S&&S.m(e,null),c=!0,d||(m=Y(e,"submit",Xe(n[13])),d=!0)},p(C,$){if(C[5]?_&&(re(),L(_,1,1,()=>{_=null}),ae()):_?(_.p(C,$),$[0]&32&&A(_,1)):(_=ph(C),_.c(),A(_,1),_.m(e,t)),$[0]&4){h=[0,1,2,3,4,5,6,7,8,9];let M;for(M=0;M<10;M+=1){const E=dh(C,h,M);g[M]?g[M].p(E,$):(g[M]=mh(E),g[M].c(),g[M].m(o,null))}for(;M<10;M+=1)g[M].d(1)}const T={};$[0]&1073741832|$[1]&8&&(T.$$scope={dirty:$,ctx:C}),a.$set(T),C[5]?y&&(re(),L(y,1,1,()=>{y=null}),ae()):y?(y.p(C,$),$[0]&32&&A(y,1)):(y=hh(C),y.c(),A(y,1),y.m(e,u)),C[5]||C[4]?S?(S.p(C,$),$[0]&48&&A(S,1)):(S=_h(C),S.c(),A(S,1),S.m(e,null)):S&&(re(),L(S,1,1,()=>{S=null}),ae())},i(C){c||(A(_),A(a.$$.fragment,C),A(y),A(S),c=!0)},o(C){L(_),L(a.$$.fragment,C),L(y),L(S),c=!1},d(C){C&&k(e),_&&_.d(),_t(g,C),V(a),y&&y.d(),S&&S.d(),d=!1,m()}}}function nD(n){let e,t=n[5]?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=U(t)},m(s,l){w(s,e,l),b(e,i)},p(s,l){l[0]&32&&t!==(t=s[5]?"New admin":"Edit admin")&&se(i,t)},d(s){s&&k(e)}}}function gh(n){let e,t,i,s,l,o,r,a,f;return o=new Nn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[iD]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=O(),s=v("i"),l=O(),z(o.$$.fragment),r=O(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"aria-label","More"),p(e,"class","btn btn-sm btn-circle btn-transparent"),p(a,"class","flex-fill")},m(u,c){w(u,e,c),b(e,t),b(e,i),b(e,s),b(e,l),j(o,e,null),w(u,r,c),w(u,a,c),f=!0},p(u,c){const d={};c[1]&8&&(d.$$scope={dirty:c,ctx:u}),o.$set(d)},i(u){f||(A(o.$$.fragment,u),f=!0)},o(u){L(o.$$.fragment,u),f=!1},d(u){u&&k(e),V(o),u&&k(r),u&&k(a)}}}function iD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Delete`,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:x,d(s){s&&k(e),t=!1,i()}}}function sD(n){let e,t,i,s,l,o,r=n[5]?"Create":"Save changes",a,f,u,c,d,m=!n[5]&&gh(n);return{c(){m&&m.c(),e=O(),t=v("button"),i=v("span"),i.textContent="Cancel",s=O(),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],Q(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&&(re(),L(m,1,1,()=>{m=null}),ae()):m?(m.p(_,h),h[0]&32&&A(m,1)):(m=gh(_),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)&&Q(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 lD(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[sD],header:[nD],default:[tD]},$$scope:{ctx:n}};return e=new ln({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){z(e.$$.fragment)},m(s,l){j(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),V(e,s)}}}function oD(n,e,t){let i,s;const l=yt(),o="admin_"+H.randomString(5);let r,a={},f=!1,u=!1,c=0,d="",m="",_="",h=!1;function g(J){return S(J),t(8,u=!0),r==null?void 0:r.show()}function y(){return r==null?void 0:r.hide()}function S(J){t(1,a=structuredClone(J||{})),C()}function C(){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,_=""),en({})}function $(){if(f||!s)return;t(7,f=!0);const J={email:d,avatar:c};(i||h)&&(J.password=m,J.passwordConfirm=_);let X;i?X=ue.admins.create(J):X=ue.admins.update(a.id,J),X.then(async G=>{var fe;t(8,u=!1),y(),Rt(i?"Successfully created admin.":"Successfully updated admin."),((fe=ue.authStore.model)==null?void 0:fe.id)===G.id&&ue.authStore.save(ue.authStore.token,G),l("save",G)}).catch(G=>{ue.error(G)}).finally(()=>{t(7,f=!1)})}function T(){a!=null&&a.id&&mn("Do you really want to delete the selected admin?",()=>ue.admins.delete(a.id).then(()=>{t(8,u=!1),y(),Rt("Successfully deleted admin."),l("delete",a)}).catch(J=>{ue.error(J)}))}const M=()=>T(),E=()=>y(),D=J=>t(2,c=J);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 N(){_=this.value,t(10,_)}const R=()=>s&&u?(mn("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,u=!1),y()}),!1):!0;function q(J){ne[J?"unshift":"push"](()=>{r=J,t(6,r)})}function B(J){Fe.call(this,n,J)}function K(J){Fe.call(this,n,J)}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,$,T,g,M,E,D,I,P,F,N,R,q,B,K]}class rD extends be{constructor(e){super(),ge(this,e,oD,lD,pe,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function bh(n,e,t){const i=n.slice();return i[24]=e[t],i}function aD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",H.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:x,d(l){l&&k(e)}}}function fD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",H.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:x,d(l){l&&k(e)}}}function uD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",H.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:x,d(l){l&&k(e)}}}function cD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",H.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:x,d(l){l&&k(e)}}}function vh(n){let e;function t(l,o){return l[5]?pD:dD}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 dD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&yh(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=O(),o&&o.c(),l=O(),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.length?o?o.p(a,f):(o=yh(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function pD(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function yh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[17]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function kh(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 wh(n,e){let t,i,s,l,o,r,a,f,u,c,d,m=e[24].id+"",_,h,g,y,S,C=e[24].email+"",$,T,M,E,D,I,P,F,N,R,q,B,K,J;u=new Rs({props:{value:e[24].id}});let X=e[24].id===e[7].id&&kh();D=new $i({props:{date:e[24].created}}),F=new $i({props:{date:e[24].updated}});function G(){return e[15](e[24])}function fe(...ee){return e[16](e[24],...ee)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=O(),a=v("td"),f=v("div"),z(u.$$.fragment),c=O(),d=v("span"),_=U(m),h=O(),X&&X.c(),g=O(),y=v("td"),S=v("span"),$=U(C),M=O(),E=v("td"),z(D.$$.fragment),I=O(),P=v("td"),z(F.$$.fragment),N=O(),R=v("td"),R.innerHTML='',q=O(),_n(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(E,"class","col-type-date col-field-created"),p(P,"class","col-type-date col-field-updated"),p(R,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ee,te){w(ee,t,te),b(t,i),b(i,s),b(s,l),b(t,r),b(t,a),b(a,f),j(u,f,null),b(f,c),b(f,d),b(d,_),b(a,h),X&&X.m(a,null),b(t,g),b(t,y),b(y,S),b(S,$),b(t,M),b(t,E),j(D,E,null),b(t,I),b(t,P),j(F,P,null),b(t,N),b(t,R),b(t,q),B=!0,K||(J=[Y(t,"click",G),Y(t,"keydown",fe)],K=!0)},p(ee,te){e=ee,(!B||te&16&&!_n(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const Oe={};te&16&&(Oe.value=e[24].id),u.$set(Oe),(!B||te&16)&&m!==(m=e[24].id+"")&&se(_,m),e[24].id===e[7].id?X||(X=kh(),X.c(),X.m(a,null)):X&&(X.d(1),X=null),(!B||te&16)&&C!==(C=e[24].email+"")&&se($,C),(!B||te&16&&T!==(T=e[24].email))&&p(S,"title",T);const Pe={};te&16&&(Pe.date=e[24].created),D.$set(Pe);const Ve={};te&16&&(Ve.date=e[24].updated),F.$set(Ve)},i(ee){B||(A(u.$$.fragment,ee),A(D.$$.fragment,ee),A(F.$$.fragment,ee),B=!0)},o(ee){L(u.$$.fragment,ee),L(D.$$.fragment,ee),L(F.$$.fragment,ee),B=!1},d(ee){ee&&k(t),V(u),X&&X.d(),V(D),V(F),K=!1,Ce(J)}}}function mD(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T=[],M=new Map,E;function D(G){n[11](G)}let I={class:"col-type-text",name:"id",$$slots:{default:[aD]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new un({props:I}),ne.push(()=>de(o,"sort",D));function P(G){n[12](G)}let F={class:"col-type-email col-field-email",name:"email",$$slots:{default:[fD]},$$scope:{ctx:n}};n[2]!==void 0&&(F.sort=n[2]),f=new un({props:F}),ne.push(()=>de(f,"sort",P));function N(G){n[13](G)}let R={class:"col-type-date col-field-created",name:"created",$$slots:{default:[uD]},$$scope:{ctx:n}};n[2]!==void 0&&(R.sort=n[2]),d=new un({props:R}),ne.push(()=>de(d,"sort",N));function q(G){n[14](G)}let B={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[cD]},$$scope:{ctx:n}};n[2]!==void 0&&(B.sort=n[2]),h=new un({props:B}),ne.push(()=>de(h,"sort",q));let K=n[4];const J=G=>G[24].id;for(let G=0;Gr=!1)),o.$set(ee);const te={};fe&134217728&&(te.$$scope={dirty:fe,ctx:G}),!u&&fe&4&&(u=!0,te.sort=G[2],_e(()=>u=!1)),f.$set(te);const Oe={};fe&134217728&&(Oe.$$scope={dirty:fe,ctx:G}),!m&&fe&4&&(m=!0,Oe.sort=G[2],_e(()=>m=!1)),d.$set(Oe);const Pe={};fe&134217728&&(Pe.$$scope={dirty:fe,ctx:G}),!g&&fe&4&&(g=!0,Pe.sort=G[2],_e(()=>g=!1)),h.$set(Pe),fe&186&&(K=G[4],re(),T=vt(T,fe,J,1,G,K,M,$,Ht,wh,null,bh),ae(),!K.length&&X?X.p(G,fe):K.length?X&&(X.d(1),X=null):(X=vh(G),X.c(),X.m($,null))),(!E||fe&32)&&Q(e,"table-loading",G[5])},i(G){if(!E){A(o.$$.fragment,G),A(f.$$.fragment,G),A(d.$$.fragment,G),A(h.$$.fragment,G);for(let fe=0;fe - New admin`,_=O(),z(h.$$.fragment),g=O(),y=v("div"),S=O(),z(C.$$.fragment),$=O(),I&&I.c(),T=ye(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","flex-fill"),p(m,"type","button"),p(m,"class","btn btn-expanded"),p(d,"class","btns-group"),p(e,"class","page-header"),p(y,"class","clearfix m-b-base")},m(P,F){w(P,e,F),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(e,r),j(a,e,null),b(e,f),b(e,u),b(e,c),b(e,d),b(d,m),w(P,_,F),j(h,P,F),w(P,g,F),w(P,y,F),w(P,S,F),j(C,P,F),w(P,$,F),I&&I.m(P,F),w(P,T,F),M=!0,E||(D=Y(m,"click",n[9]),E=!0)},p(P,F){(!M||F&64)&&se(o,P[6]);const N={};F&2&&(N.value=P[1]),h.$set(N);const R={};F&134217918&&(R.$$scope={dirty:F,ctx:P}),C.$set(R),P[4].length?I?I.p(P,F):(I=Sh(P),I.c(),I.m(T.parentNode,T)):I&&(I.d(1),I=null)},i(P){M||(A(a.$$.fragment,P),A(h.$$.fragment,P),A(C.$$.fragment,P),M=!0)},o(P){L(a.$$.fragment,P),L(h.$$.fragment,P),L(C.$$.fragment,P),M=!1},d(P){P&&k(e),V(a),P&&k(_),V(h,P),P&&k(g),P&&k(y),P&&k(S),V(C,P),P&&k($),I&&I.d(P),P&&k(T),E=!1,D()}}}function _D(n){let e,t,i,s,l,o;e=new Mi({}),i=new wn({props:{$$slots:{default:[hD]},$$scope:{ctx:n}}});let r={};return l=new rD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment),s=O(),z(l.$$.fragment)},m(a,f){j(e,a,f),w(a,t,f),j(i,a,f),w(a,s,f),j(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){V(e,a),a&&k(t),V(i,a),a&&k(s),n[18](null),V(l,a)}}}function gD(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,Ea,F=>t(7,l=F)),nn(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=H.normalizeSearchFilter(u,["id","email","created","updated"]);return ue.admins.getFullList(100,{sort:c||"-created",filter:F}).then(N=>{t(4,a=N),t(5,f=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,f=!1),console.warn(N),m(),ue.error(N,(N==null?void 0:N.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 C(F){c=F,t(2,c)}function $(F){c=F,t(2,c)}const T=F=>r==null?void 0:r.show(F),M=(F,N)=>{(N.code==="Enter"||N.code==="Space")&&(N.preventDefault(),r==null||r.show(F))},E=()=>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();ji("/settings/admins?"+F),d()}},[d,u,c,r,a,f,s,l,_,h,g,y,S,C,$,T,M,E,D,I,P]}class bD extends be{constructor(e){super(),ge(this,e,gD,_D,pe,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function vD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=O(),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),oe(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]&&oe(l,f[0])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function yD(n){let e,t,i,s,l,o,r,a,f,u,c;return{c(){e=v("label"),t=U("Password"),s=O(),l=v("input"),r=O(),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),oe(l,n[1]),w(d,r,m),w(d,a,m),b(a,f),u||(c=[Y(l,"input",n[5]),Se(an.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]&&oe(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),d&&k(a),u=!1,Ce(c)}}}function kD(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:[vD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"password",$$slots:{default:[yD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=O(),z(s.$$.fragment),l=O(),z(o.$$.fragment),r=O(),a=v("button"),a.innerHTML=`Login - `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),Q(a,"btn-disabled",n[2]),Q(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){w(d,e,m),b(e,t),b(e,i),j(s,e,null),b(e,l),j(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)&&Q(a,"btn-disabled",d[2]),(!f||m&4)&&Q(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),V(s),V(o),u=!1,c()}}}function wD(n){let e,t;return e=new db({props:{$$slots:{default:[kD]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function SD(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(),ji("/")}).catch(()=>{ss("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 $D extends be{constructor(e){super(),ge(this,e,SD,wD,pe,{})}}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:[MD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[OD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),a=new ce({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[ED,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[DD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&$h(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(o.$$.fragment),r=O(),z(a.$$.fragment),f=O(),z(u.$$.fragment),c=O(),d=v("div"),m=v("div"),_=O(),M&&M.c(),h=O(),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],Q(g,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(E,D){w(E,e,D),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),j(a,e,null),b(e,f),j(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),C=!0,$||(T=Y(g,"click",n[13]),$=!0)},p(E,D){const I={};D&1572865&&(I.$$scope={dirty:D,ctx:E}),i.$set(I);const P={};D&1572865&&(P.$$scope={dirty:D,ctx:E}),o.$set(P);const F={};D&1572865&&(F.$$scope={dirty:D,ctx:E}),a.$set(F);const N={};D&1572865&&(N.$$scope={dirty:D,ctx:E}),u.$set(N),E[3]?M?M.p(E,D):(M=$h(E),M.c(),M.m(d,h)):M&&(M.d(1),M=null),(!C||D&12&&S!==(S=!E[3]||E[2]))&&(g.disabled=S),(!C||D&4)&&Q(g,"btn-loading",E[2])},i(E){C||(A(i.$$.fragment,E),A(o.$$.fragment,E),A(a.$$.fragment,E),A(u.$$.fragment,E),C=!0)},o(E){L(i.$$.fragment,E),L(o.$$.fragment,E),L(a.$$.fragment,E),L(u.$$.fragment,E),C=!1},d(E){E&&k(e),V(i),V(o),V(a),V(u),M&&M.d(),$=!1,T()}}}function TD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function MD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Application name"),s=O(),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),oe(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&&oe(l,f[0].meta.appName)},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;return{c(){e=v("label"),t=U("Application URL"),s=O(),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),oe(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&&oe(l,f[0].meta.appUrl)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function ED(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Logs max days retention"),s=O(),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),oe(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&&oe(l,f[0].logs.maxDays)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function DD(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){w(c,e,d),e.checked=n[0].meta.hideControls,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=[Y(e,"change",n[11]),Se(je.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],f=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,Ce(u)}}}function $h(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){w(l,e,o),b(e,t),i||(s=Y(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&k(e),i=!1,s()}}}function AD(n){let e,t,i,s,l,o,r,a,f;const u=[TD,CD],c=[];function d(m,_){return m[1]?0:1}return l=d(n),o=c[l]=u[l](n),{c(){e=v("header"),e.innerHTML=``,t=O(),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,_):(re(),L(c[h],1,1,()=>{c[h]=null}),ae(),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 ID(n){let e,t,i,s;return e=new Mi({}),i=new wn({props:{$$slots:{default:[AD]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&k(t),V(i,l)}}}function LD(n,e,t){let i,s,l,o;We(n,Ts,M=>t(14,s=M)),We(n,yo,M=>t(15,l=M)),We(n,Et,M=>t(16,o=M)),nn(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(H.filterRedactedProps(a));_(M),Rt("Successfully saved application settings.")}catch(M){ue.error(M)}t(2,u=!1)}}function _(M={}){var E,D;nn(yo,l=(E=M==null?void 0:M.meta)==null?void 0:E.appName,l),nn(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 C(){a.meta.hideControls=this.checked,t(0,a)}const $=()=>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 PD extends be{constructor(e){super(),ge(this,e,LD,ID,pe,{})}}function FD(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=O(),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=[Se(je.call(null,t,{position:"left",text:"Set new value"})),Y(t,"click",n[6])],l=!0)},p(f,u){ui(s,a=At(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,Ce(o)}}}function RD(n){let e;function t(l,o){return l[3]?ND:FD}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:x,o:x,d(l){s.d(l),l&&k(e)}}}function qD(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 sn(),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),Xt(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 be{constructor(e){super(),ge(this,e,qD,RD,pe,{value:0,mask:1})}}function jD(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=O(),l=v("input"),r=O(),a=v("div"),f=U(`Available placeholder parameters: - `),u=v("button"),u.textContent=`{APP_NAME} - `,c=U(`, - `),d=v("button"),d.textContent=`{APP_URL} - `,m=U("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,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(a,"class","help-block")},m(g,y){w(g,e,y),b(e,t),w(g,s,y),w(g,l,y),oe(l,n[0].subject),w(g,r,y),w(g,a,y),b(a,f),b(a,u),b(a,c),b(a,d),b(a,m),_||(h=[Y(l,"input",n[13]),Y(u,"click",n[14]),Y(d,"click",n[15])],_=!0)},p(g,y){y[1]&1&&i!==(i=g[31])&&p(e,"for",i),y[1]&1&&o!==(o=g[31])&&p(l,"id",o),y[0]&1&&l.value!==g[0].subject&&oe(l,g[0].subject)},d(g){g&&k(e),g&&k(s),g&&k(l),g&&k(r),g&&k(a),_=!1,Ce(h)}}}function VD(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y;return{c(){e=v("label"),t=U("Action URL"),s=O(),l=v("input"),r=O(),a=v("div"),f=U(`Available placeholder parameters: - `),u=v("button"),u.textContent=`{APP_NAME} - `,c=U(`, - `),d=v("button"),d.textContent=`{APP_URL} - `,m=U(`, - `),_=v("button"),_.textContent=`{TOKEN} - `,h=U("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,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(_,"title","Required parameter"),p(a,"class","help-block")},m(S,C){w(S,e,C),b(e,t),w(S,s,C),w(S,l,C),oe(l,n[0].actionUrl),w(S,r,C),w(S,a,C),b(a,f),b(a,u),b(a,c),b(a,d),b(a,m),b(a,_),b(a,h),g||(y=[Y(l,"input",n[16]),Y(u,"click",n[17]),Y(d,"click",n[18]),Y(_,"click",n[19])],g=!0)},p(S,C){C[1]&1&&i!==(i=S[31])&&p(e,"for",i),C[1]&1&&o!==(o=S[31])&&p(l,"id",o),C[0]&1&&l.value!==S[0].actionUrl&&oe(l,S[0].actionUrl)},d(S){S&&k(e),S&&k(s),S&&k(l),S&&k(r),S&&k(a),g=!1,Ce(y)}}}function zD(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){w(l,e,o),oe(e,n[0].body),i||(s=Y(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&oe(e,l[0].body)},i:x,o:x,d(l){l&&k(e),i=!1,s()}}}function HD(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let f={id:a[31],language:"html"};return a[0].body!==void 0&&(f.value=a[0].body),{props:f}}return o&&(e=Ot(o,r(n)),ne.push(()=>de(e,"value",l))),{c(){e&&z(e.$$.fragment),i=ye()},m(a,f){e&&j(e,a,f),w(a,i,f),s=!0},p(a,f){const u={};if(f[1]&1&&(u.id=a[31]),!t&&f[0]&1&&(t=!0,u.value=a[0].body,_e(()=>t=!1)),f[0]&16&&o!==(o=a[4])){if(e){re();const c=e;L(c.$$.fragment,1,0,()=>{V(c,1)}),ae()}o?(e=Ot(o,r(a)),ne.push(()=>de(e,"value",l)),z(e.$$.fragment),A(e.$$.fragment,1),j(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&&V(e,a)}}}function BD(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$;const T=[HD,zD],M=[];function E(D,I){return D[4]&&!D[5]?0:1}return l=E(n),o=M[l]=T[l](n),{c(){e=v("label"),t=U("Body (HTML)"),s=O(),o.c(),r=O(),a=v("div"),f=U(`Available placeholder parameters: - `),u=v("button"),u.textContent=`{APP_NAME} - `,c=U(`, - `),d=v("button"),d.textContent=`{APP_URL} - `,m=U(`, - `),_=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])],C=!0)},p(D,I){(!S||I[1]&1&&i!==(i=D[31]))&&p(e,"for",i);let P=l;l=E(D),l===P?M[l].p(D,I):(re(),L(M[P],1,1,()=>{M[P]=null}),ae(),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),C=!1,Ce($)}}}function UD(n){let e,t,i,s,l,o;return e=new ce({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[jD,({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:[VD,({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:[BD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment),s=O(),z(l.$$.fragment)},m(r,a){j(e,r,a),w(r,t,a),j(i,r,a),w(r,s,a),j(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){V(e,r),r&&k(t),V(i,r),r&&k(s),V(l,r)}}}function Ch(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=Se(je.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 WD(n){let e,t,i,s,l,o,r,a,f,u=n[6]&&Ch();return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),l=U(n[2]),o=O(),r=v("div"),a=O(),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=Ch(),u.c(),A(u,1),u.m(f.parentNode,f)):u&&(re(),L(u,1,1,()=>{u=null}),ae())},d(c){c&&k(e),c&&k(o),c&&k(r),c&&k(a),u&&u.d(c),c&&k(f)}}}function YD(n){let e,t;const i=[n[8]];let s={$$slots:{header:[WD],default:[UD]},$$scope:{ctx:n}};for(let l=0;lt(12,o=G));let{key:r}=e,{title:a}=e,{config:f={}}=e,u,c=Th,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 lt(()=>import("./CodeEditor-7fe9ddeb.js"),["./CodeEditor-7fe9ddeb.js","./index-4841d67b.js"],import.meta.url)).default),Th=c,t(5,d=!1))}function y(G){H.copyToClipboard(G),go(`Copied ${G} to clipboard`,2e3)}g();function S(){f.subject=this.value,t(0,f)}const C=()=>y("{APP_NAME}"),$=()=>y("{APP_URL}");function T(){f.actionUrl=this.value,t(0,f)}const M=()=>y("{APP_NAME}"),E=()=>y("{APP_URL}"),D=()=>y("{TOKEN}");function I(G){n.$$.not_equal(f.body,G)&&(f.body=G,t(0,f))}function P(){f.body=this.value,t(0,f)}const F=()=>y("{APP_NAME}"),N=()=>y("{APP_URL}"),R=()=>y("{TOKEN}"),q=()=>y("{ACTION_URL}");function B(G){ne[G?"unshift":"push"](()=>{u=G,t(3,u)})}function K(G){Fe.call(this,n,G)}function J(G){Fe.call(this,n,G)}function X(G){Fe.call(this,n,G)}return n.$$set=G=>{e=qe(qe({},e),Xt(G)),t(8,l=Qe(e,s)),"key"in G&&t(1,r=G.key),"title"in G&&t(2,a=G.title),"config"in G&&t(0,f=G.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!H.isEmpty(H.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,E,D,I,P,F,N,R,q,B,K,J,X]}class Lr extends be{constructor(e){super(),ge(this,e,KD,YD,pe,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Mh(n,e,t){const i=n.slice();return i[21]=e[t],i}function Oh(n,e){let t,i,s,l,o,r=e[21].label+"",a,f,u,c,d,m;return c=z1(e[11][0]),{key:n,first:null,c(){t=v("div"),i=v("input"),l=O(),o=v("label"),a=U(r),u=O(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,p(o,"for",f=e[20]+e[21].value),p(t,"class","form-field-block"),c.p(i),this.first=t},m(_,h){w(_,t,h),b(t,i),i.checked=i.__value===e[2],b(t,l),b(t,o),b(o,a),b(t,u),d||(m=Y(i,"change",e[10]),d=!0)},p(_,h){e=_,h&1048576&&s!==(s=e[20]+e[21].value)&&p(i,"id",s),h&4&&(i.checked=i.__value===e[2]),h&1048576&&f!==(f=e[20]+e[21].value)&&p(o,"for",f)},d(_){_&&k(t),c.r(),d=!1,m()}}}function JD(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new ce({props:{class:"form-field required m-0",name:"email",$$slots:{default:[ZD,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),z(t.$$.fragment),i=O(),z(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,f){w(a,e,f),j(t,e,null),b(e,i),j(s,e,null),l=!0,o||(r=Y(e,"submit",Xe(n[13])),o=!0)},p(a,f){const u={};f&17825796&&(u.$$scope={dirty:f,ctx:a}),t.$set(u);const c={};f&17825794&&(c.$$scope={dirty:f,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){L(t.$$.fragment,a),L(s.$$.fragment,a),l=!1},d(a){a&&k(e),V(t),V(s),o=!1,r()}}}function XD(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function QD(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("button"),t=U("Close"),i=O(),s=v("button"),l=v("i"),o=O(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],Q(s,"btn-loading",n[4])},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&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&Q(s,"btn-loading",c[4])},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,u()}}}function xD(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[QD],header:[XD],default:[GD]},$$scope:{ctx:n}};return e=new ln({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){z(e.$$.fragment)},m(s,l){j(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[14]),l&16777270&&(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[15](null),V(e,s)}}}const Pr="last_email_test",Eh="email_test_request";function eA(n,e,t){let i;const s=yt(),l="email_test_"+H.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Pr),f=o[0].value,u=!1,c=null;function d(E="",D=""){t(1,a=E||localStorage.getItem(Pr)),t(2,f=D||o[0].value),en({}),r==null||r.show()}function m(){return clearTimeout(c),r==null?void 0:r.hide()}async function _(){if(!(!i||u)){t(4,u=!0),localStorage==null||localStorage.setItem(Pr,a),clearTimeout(c),c=setTimeout(()=>{ue.cancelRequest(Eh),ss("Test email send timeout.")},3e4);try{await ue.settings.testEmail(a,f,{$cancelKey:Eh}),Rt("Successfully sent test email."),s("submit"),t(4,u=!1),await sn(),m()}catch(E){t(4,u=!1),ue.error(E)}clearTimeout(c)}}const h=[[]];function g(){f=this.__value,t(2,f)}function y(){a=this.value,t(1,a)}const S=()=>_(),C=()=>!u;function $(E){ne[E?"unshift":"push"](()=>{r=E,t(3,r)})}function T(E){Fe.call(this,n,E)}function M(E){Fe.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!f)},[m,a,f,r,u,i,l,o,_,d,g,h,y,S,C,$,T,M]}class tA extends be{constructor(e){super(),ge(this,e,eA,xD,pe,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function nA(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T,M,E,D,I,P;i=new ce({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[sA,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[lA,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}});function F(ee){n[15](ee)}let N={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(N.config=n[0].meta.verificationTemplate),f=new Lr({props:N}),ne.push(()=>de(f,"config",F));function R(ee){n[16](ee)}let q={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(q.config=n[0].meta.resetPasswordTemplate),d=new Lr({props:q}),ne.push(()=>de(d,"config",R));function B(ee){n[17](ee)}let K={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(K.config=n[0].meta.confirmEmailChangeTemplate),h=new Lr({props:K}),ne.push(()=>de(h,"config",B)),$=new ce({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[oA,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}});let J=n[0].smtp.enabled&&Dh(n);function X(ee,te){return ee[5]?gA:_A}let G=X(n),fe=G(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(o.$$.fragment),r=O(),a=v("div"),z(f.$$.fragment),c=O(),z(d.$$.fragment),_=O(),z(h.$$.fragment),y=O(),S=v("hr"),C=O(),z($.$$.fragment),T=O(),J&&J.c(),M=O(),E=v("div"),D=v("div"),I=O(),fe.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(D,"class","flex-fill"),p(E,"class","flex")},m(ee,te){w(ee,e,te),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),w(ee,r,te),w(ee,a,te),j(f,a,null),b(a,c),j(d,a,null),b(a,_),j(h,a,null),w(ee,y,te),w(ee,S,te),w(ee,C,te),j($,ee,te),w(ee,T,te),J&&J.m(ee,te),w(ee,M,te),w(ee,E,te),b(E,D),b(E,I),fe.m(E,null),P=!0},p(ee,te){const Oe={};te[0]&1|te[1]&24&&(Oe.$$scope={dirty:te,ctx:ee}),i.$set(Oe);const Pe={};te[0]&1|te[1]&24&&(Pe.$$scope={dirty:te,ctx:ee}),o.$set(Pe);const Ve={};!u&&te[0]&1&&(u=!0,Ve.config=ee[0].meta.verificationTemplate,_e(()=>u=!1)),f.$set(Ve);const ze={};!m&&te[0]&1&&(m=!0,ze.config=ee[0].meta.resetPasswordTemplate,_e(()=>m=!1)),d.$set(ze);const we={};!g&&te[0]&1&&(g=!0,we.config=ee[0].meta.confirmEmailChangeTemplate,_e(()=>g=!1)),h.$set(we);const Te={};te[0]&1|te[1]&24&&(Te.$$scope={dirty:te,ctx:ee}),$.$set(Te),ee[0].smtp.enabled?J?(J.p(ee,te),te[0]&1&&A(J,1)):(J=Dh(ee),J.c(),A(J,1),J.m(M.parentNode,M)):J&&(re(),L(J,1,1,()=>{J=null}),ae()),G===(G=X(ee))&&fe?fe.p(ee,te):(fe.d(1),fe=G(ee),fe&&(fe.c(),fe.m(E,null)))},i(ee){P||(A(i.$$.fragment,ee),A(o.$$.fragment,ee),A(f.$$.fragment,ee),A(d.$$.fragment,ee),A(h.$$.fragment,ee),A($.$$.fragment,ee),A(J),P=!0)},o(ee){L(i.$$.fragment,ee),L(o.$$.fragment,ee),L(f.$$.fragment,ee),L(d.$$.fragment,ee),L(h.$$.fragment,ee),L($.$$.fragment,ee),L(J),P=!1},d(ee){ee&&k(e),V(i),V(o),ee&&k(r),ee&&k(a),V(f),V(d),V(h),ee&&k(y),ee&&k(S),ee&&k(C),V($,ee),ee&&k(T),J&&J.d(ee),ee&&k(M),ee&&k(E),fe.d()}}}function iA(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function sA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Sender name"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].meta.senderName),r||(a=Y(l,"input",n[13]),r=!0)},p(f,u){u[1]&8&&i!==(i=f[34])&&p(e,"for",i),u[1]&8&&o!==(o=f[34])&&p(l,"id",o),u[0]&1&&l.value!==f[0].meta.senderName&&oe(l,f[0].meta.senderName)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function lA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Sender address"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","email"),p(l,"id",o=n[34]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].meta.senderAddress),r||(a=Y(l,"input",n[14]),r=!0)},p(f,u){u[1]&8&&i!==(i=f[34])&&p(e,"for",i),u[1]&8&&o!==(o=f[34])&&p(l,"id",o),u[0]&1&&l.value!==f[0].meta.senderAddress&&oe(l,f[0].meta.senderAddress)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function oA(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[34])},m(c,d){w(c,e,d),e.checked=n[0].smtp.enabled,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=[Y(e,"change",n[18]),Se(je.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],f=!0)},p(c,d){d[1]&8&&t!==(t=c[34])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&8&&a!==(a=c[34])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,Ce(u)}}}function Dh(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$;s=new ce({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[rA,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[aA,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),u=new ce({props:{class:"form-field",name:"smtp.username",$$slots:{default:[fA,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),m=new ce({props:{class:"form-field",name:"smtp.password",$$slots:{default:[uA,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}});function T(I,P){return I[4]?dA:cA}let M=T(n),E=M(n),D=n[4]&&Ah(n);return{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=O(),o=v("div"),z(r.$$.fragment),a=O(),f=v("div"),z(u.$$.fragment),c=O(),d=v("div"),z(m.$$.fragment),_=O(),h=v("button"),E.c(),g=O(),D&&D.c(),p(i,"class","col-lg-4"),p(o,"class","col-lg-2"),p(f,"class","col-lg-3"),p(d,"class","col-lg-3"),p(t,"class","grid"),p(h,"type","button"),p(h,"class","btn btn-sm btn-secondary m-t-sm m-b-sm")},m(I,P){w(I,e,P),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),b(t,a),b(t,f),j(u,f,null),b(t,c),b(t,d),j(m,d,null),b(e,_),b(e,h),E.m(h,null),b(e,g),D&&D.m(e,null),S=!0,C||($=Y(h,"click",Xe(n[23])),C=!0)},p(I,P){const F={};P[0]&1|P[1]&24&&(F.$$scope={dirty:P,ctx:I}),s.$set(F);const N={};P[0]&1|P[1]&24&&(N.$$scope={dirty:P,ctx:I}),r.$set(N);const R={};P[0]&1|P[1]&24&&(R.$$scope={dirty:P,ctx:I}),u.$set(R);const q={};P[0]&1|P[1]&24&&(q.$$scope={dirty:P,ctx:I}),m.$set(q),M!==(M=T(I))&&(E.d(1),E=M(I),E&&(E.c(),E.m(h,null))),I[4]?D?(D.p(I,P),P[0]&16&&A(D,1)):(D=Ah(I),D.c(),A(D,1),D.m(e,null)):D&&(re(),L(D,1,1,()=>{D=null}),ae())},i(I){S||(A(s.$$.fragment,I),A(r.$$.fragment,I),A(u.$$.fragment,I),A(m.$$.fragment,I),A(D),I&&Ge(()=>{S&&(y||(y=Re(e,tt,{duration:150},!0)),y.run(1))}),S=!0)},o(I){L(s.$$.fragment,I),L(r.$$.fragment,I),L(u.$$.fragment,I),L(m.$$.fragment,I),L(D),I&&(y||(y=Re(e,tt,{duration:150},!1)),y.run(0)),S=!1},d(I){I&&k(e),V(s),V(r),V(u),V(m),E.d(),D&&D.d(),I&&y&&y.end(),C=!1,$()}}}function rA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("SMTP server host"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].smtp.host),r||(a=Y(l,"input",n[19]),r=!0)},p(f,u){u[1]&8&&i!==(i=f[34])&&p(e,"for",i),u[1]&8&&o!==(o=f[34])&&p(l,"id",o),u[0]&1&&l.value!==f[0].smtp.host&&oe(l,f[0].smtp.host)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function aA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Port"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","number"),p(l,"id",o=n[34]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].smtp.port),r||(a=Y(l,"input",n[20]),r=!0)},p(f,u){u[1]&8&&i!==(i=f[34])&&p(e,"for",i),u[1]&8&&o!==(o=f[34])&&p(l,"id",o),u[0]&1&&pt(l.value)!==f[0].smtp.port&&oe(l,f[0].smtp.port)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function fA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Username"),s=O(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34])},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].smtp.username),r||(a=Y(l,"input",n[21]),r=!0)},p(f,u){u[1]&8&&i!==(i=f[34])&&p(e,"for",i),u[1]&8&&o!==(o=f[34])&&p(l,"id",o),u[0]&1&&l.value!==f[0].smtp.username&&oe(l,f[0].smtp.username)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function uA(n){let e,t,i,s,l,o,r;function a(u){n[22](u)}let f={id:n[34]};return n[0].smtp.password!==void 0&&(f.value=n[0].smtp.password),l=new of({props:f}),ne.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Password"),s=O(),z(l.$$.fragment),p(e,"for",i=n[34])},m(u,c){w(u,e,c),b(e,t),w(u,s,c),j(l,u,c),r=!0},p(u,c){(!r||c[1]&8&&i!==(i=u[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=u[34]),!o&&c[0]&1&&(o=!0,d.value=u[0].smtp.password,_e(()=>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),V(l,u)}}}function cA(n){let e,t,i;return{c(){e=v("span"),e.textContent="Show more options",t=O(),i=v("i"),p(e,"class","txt"),p(i,"class","ri-arrow-down-s-line")},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 dA(n){let e,t,i;return{c(){e=v("span"),e.textContent="Hide more options",t=O(),i=v("i"),p(e,"class","txt"),p(i,"class","ri-arrow-up-s-line")},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 Ah(n){let e,t,i,s,l,o,r,a,f,u,c,d,m;return i=new ce({props:{class:"form-field",name:"smtp.tls",$$slots:{default:[pA,({uniqueId:_})=>({34:_}),({uniqueId:_})=>[0,_?8:0]]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[mA,({uniqueId:_})=>({34:_}),({uniqueId:_})=>[0,_?8:0]]},$$scope:{ctx:n}}}),f=new ce({props:{class:"form-field",name:"smtp.localName",$$slots:{default:[hA,({uniqueId:_})=>({34:_}),({uniqueId:_})=>[0,_?8:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(o.$$.fragment),r=O(),a=v("div"),z(f.$$.fragment),u=O(),c=v("div"),p(t,"class","col-lg-3"),p(l,"class","col-lg-3"),p(a,"class","col-lg-6"),p(c,"class","col-lg-12"),p(e,"class","grid")},m(_,h){w(_,e,h),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(f,a,null),b(e,u),b(e,c),m=!0},p(_,h){const g={};h[0]&1|h[1]&24&&(g.$$scope={dirty:h,ctx:_}),i.$set(g);const y={};h[0]&1|h[1]&24&&(y.$$scope={dirty:h,ctx:_}),o.$set(y);const S={};h[0]&1|h[1]&24&&(S.$$scope={dirty:h,ctx:_}),f.$set(S)},i(_){m||(A(i.$$.fragment,_),A(o.$$.fragment,_),A(f.$$.fragment,_),_&&Ge(()=>{m&&(d||(d=Re(e,tt,{duration:150},!0)),d.run(1))}),m=!0)},o(_){L(i.$$.fragment,_),L(o.$$.fragment,_),L(f.$$.fragment,_),_&&(d||(d=Re(e,tt,{duration:150},!1)),d.run(0)),m=!1},d(_){_&&k(e),V(i),V(o),V(f),_&&d&&d.end()}}}function pA(n){let e,t,i,s,l,o,r;function a(u){n[24](u)}let f={id:n[34],items:n[7]};return n[0].smtp.tls!==void 0&&(f.keyOfSelected=n[0].smtp.tls),l=new Hi({props:f}),ne.push(()=>de(l,"keyOfSelected",a)),{c(){e=v("label"),t=U("TLS encryption"),s=O(),z(l.$$.fragment),p(e,"for",i=n[34])},m(u,c){w(u,e,c),b(e,t),w(u,s,c),j(l,u,c),r=!0},p(u,c){(!r||c[1]&8&&i!==(i=u[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=u[34]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=u[0].smtp.tls,_e(()=>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),V(l,u)}}}function mA(n){let e,t,i,s,l,o,r;function a(u){n[25](u)}let f={id:n[34],items:n[8]};return n[0].smtp.authMethod!==void 0&&(f.keyOfSelected=n[0].smtp.authMethod),l=new Hi({props:f}),ne.push(()=>de(l,"keyOfSelected",a)),{c(){e=v("label"),t=U("AUTH method"),s=O(),z(l.$$.fragment),p(e,"for",i=n[34])},m(u,c){w(u,e,c),b(e,t),w(u,s,c),j(l,u,c),r=!0},p(u,c){(!r||c[1]&8&&i!==(i=u[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=u[34]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=u[0].smtp.authMethod,_e(()=>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),V(l,u)}}}function hA(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=v("span"),t.textContent="EHLO/HELO domain",i=O(),s=v("i"),o=O(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[34]),p(r,"type","text"),p(r,"id",a=n[34]),p(r,"placeholder","Default to localhost")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),oe(r,n[0].smtp.localName),f||(u=[Se(je.call(null,s,{text:"Some SMTP servers, such as the Gmail SMTP-relay, requires a proper domain name in the inital EHLO/HELO exchange and will reject attempts to use localhost.",position:"top"})),Y(r,"input",n[26])],f=!0)},p(c,d){d[1]&8&&l!==(l=c[34])&&p(e,"for",l),d[1]&8&&a!==(a=c[34])&&p(r,"id",a),d[0]&1&&r.value!==c[0].smtp.localName&&oe(r,c[0].smtp.localName)},d(c){c&&k(e),c&&k(o),c&&k(r),f=!1,Ce(u)}}}function _A(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send test email`,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:x,d(s){s&&k(e),t=!1,i()}}}function gA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),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],Q(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&&Q(s,"btn-loading",f[3])},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,Ce(a)}}}function bA(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;const y=[iA,nA],S=[];function C($,T){return $[2]?0:1}return d=C(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[6]),r=O(),a=v("div"),f=v("form"),u=v("div"),u.innerHTML="

    Configure common settings for sending emails.

    ",c=O(),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($,T){w($,e,T),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w($,r,T),w($,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($,T){(!_||T[0]&64)&&se(o,$[6]);let M=d;d=C($),d===M?S[d].p($,T):(re(),L(S[M],1,1,()=>{S[M]=null}),ae(),m=S[d],m?m.p($,T):(m=S[d]=y[d]($),m.c()),A(m,1),m.m(f,null))},i($){_||(A(m),_=!0)},o($){L(m),_=!1},d($){$&&k(e),$&&k(r),$&&k(a),S[d].d(),h=!1,g()}}}function vA(n){let e,t,i,s,l,o;e=new Mi({}),i=new wn({props:{$$slots:{default:[bA]},$$scope:{ctx:n}}});let r={};return l=new tA({props:r}),n[31](l),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment),s=O(),z(l.$$.fragment)},m(a,f){j(e,a,f),w(a,t,f),j(i,a,f),w(a,s,f),j(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){V(e,a),a&&k(t),V(i,a),a&&k(s),n[31](null),V(l,a)}}}function yA(n,e,t){let i,s,l;We(n,Et,ee=>t(6,l=ee));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];nn(Et,l="Mail settings",l);let a,f={},u={},c=!1,d=!1,m=!1;_();async function _(){t(2,c=!0);try{const ee=await ue.settings.getAll()||{};g(ee)}catch(ee){ue.error(ee)}t(2,c=!1)}async function h(){if(!(d||!s)){t(3,d=!0);try{const ee=await ue.settings.update(H.filterRedactedProps(u));g(ee),en({}),Rt("Successfully saved mail settings.")}catch(ee){ue.error(ee)}t(3,d=!1)}}function g(ee={}){t(0,u={meta:(ee==null?void 0:ee.meta)||{},smtp:(ee==null?void 0:ee.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 C(){u.meta.senderAddress=this.value,t(0,u)}function $(ee){n.$$.not_equal(u.meta.verificationTemplate,ee)&&(u.meta.verificationTemplate=ee,t(0,u))}function T(ee){n.$$.not_equal(u.meta.resetPasswordTemplate,ee)&&(u.meta.resetPasswordTemplate=ee,t(0,u))}function M(ee){n.$$.not_equal(u.meta.confirmEmailChangeTemplate,ee)&&(u.meta.confirmEmailChangeTemplate=ee,t(0,u))}function E(){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(ee){n.$$.not_equal(u.smtp.password,ee)&&(u.smtp.password=ee,t(0,u))}const N=()=>{t(4,m=!m)};function R(ee){n.$$.not_equal(u.smtp.tls,ee)&&(u.smtp.tls=ee,t(0,u))}function q(ee){n.$$.not_equal(u.smtp.authMethod,ee)&&(u.smtp.authMethod=ee,t(0,u))}function B(){u.smtp.localName=this.value,t(0,u)}const K=()=>y(),J=()=>h(),X=()=>a==null?void 0:a.show(),G=()=>h();function fe(ee){ne[ee?"unshift":"push"](()=>{a=ee,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,E,D,I,P,F,N,R,q,B,K,J,X,G,fe]}class kA extends be{constructor(e){super(),ge(this,e,yA,vA,pe,{},null,[-1,-1])}}const wA=n=>({isTesting:n&4,testError:n&2,enabled:n&1}),Ih=n=>({isTesting:n[2],testError:n[1],enabled:n[0].enabled});function SA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),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=!1,a()}}}function Lh(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T,M;return i=new ce({props:{class:"form-field required",name:n[3]+".endpoint",$$slots:{default:[$A,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),o=new ce({props:{class:"form-field required",name:n[3]+".bucket",$$slots:{default:[CA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),f=new ce({props:{class:"form-field required",name:n[3]+".region",$$slots:{default:[TA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),d=new ce({props:{class:"form-field required",name:n[3]+".accessKey",$$slots:{default:[MA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),h=new ce({props:{class:"form-field required",name:n[3]+".secret",$$slots:{default:[OA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),S=new ce({props:{class:"form-field",name:n[3]+".forcePathStyle",$$slots:{default:[EA,({uniqueId:E})=>({20:E}),({uniqueId:E})=>E?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=O(),l=v("div"),z(o.$$.fragment),r=O(),a=v("div"),z(f.$$.fragment),u=O(),c=v("div"),z(d.$$.fragment),m=O(),_=v("div"),z(h.$$.fragment),g=O(),y=v("div"),z(S.$$.fragment),C=O(),$=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(_,"class","col-lg-6"),p(y,"class","col-lg-12"),p($,"class","col-lg-12"),p(e,"class","grid")},m(E,D){w(E,e,D),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(f,a,null),b(e,u),b(e,c),j(d,c,null),b(e,m),b(e,_),j(h,_,null),b(e,g),b(e,y),j(S,y,null),b(e,C),b(e,$),M=!0},p(E,D){const I={};D&8&&(I.name=E[3]+".endpoint"),D&1081345&&(I.$$scope={dirty:D,ctx:E}),i.$set(I);const P={};D&8&&(P.name=E[3]+".bucket"),D&1081345&&(P.$$scope={dirty:D,ctx:E}),o.$set(P);const F={};D&8&&(F.name=E[3]+".region"),D&1081345&&(F.$$scope={dirty:D,ctx:E}),f.$set(F);const N={};D&8&&(N.name=E[3]+".accessKey"),D&1081345&&(N.$$scope={dirty:D,ctx:E}),d.$set(N);const R={};D&8&&(R.name=E[3]+".secret"),D&1081345&&(R.$$scope={dirty:D,ctx:E}),h.$set(R);const q={};D&8&&(q.name=E[3]+".forcePathStyle"),D&1081345&&(q.$$scope={dirty:D,ctx:E}),S.$set(q)},i(E){M||(A(i.$$.fragment,E),A(o.$$.fragment,E),A(f.$$.fragment,E),A(d.$$.fragment,E),A(h.$$.fragment,E),A(S.$$.fragment,E),E&&Ge(()=>{M&&(T||(T=Re(e,tt,{duration:150},!0)),T.run(1))}),M=!0)},o(E){L(i.$$.fragment,E),L(o.$$.fragment,E),L(f.$$.fragment,E),L(d.$$.fragment,E),L(h.$$.fragment,E),L(S.$$.fragment,E),E&&(T||(T=Re(e,tt,{duration:150},!1)),T.run(0)),M=!1},d(E){E&&k(e),V(i),V(o),V(f),V(d),V(h),V(S),E&&T&&T.end()}}}function $A(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Endpoint"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].endpoint),r||(a=Y(l,"input",n[9]),r=!0)},p(f,u){u&1048576&&i!==(i=f[20])&&p(e,"for",i),u&1048576&&o!==(o=f[20])&&p(l,"id",o),u&1&&l.value!==f[0].endpoint&&oe(l,f[0].endpoint)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function CA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Bucket"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].bucket),r||(a=Y(l,"input",n[10]),r=!0)},p(f,u){u&1048576&&i!==(i=f[20])&&p(e,"for",i),u&1048576&&o!==(o=f[20])&&p(l,"id",o),u&1&&l.value!==f[0].bucket&&oe(l,f[0].bucket)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function TA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Region"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].region),r||(a=Y(l,"input",n[11]),r=!0)},p(f,u){u&1048576&&i!==(i=f[20])&&p(e,"for",i),u&1048576&&o!==(o=f[20])&&p(l,"id",o),u&1&&l.value!==f[0].region&&oe(l,f[0].region)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function MA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Access key"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[0].accessKey),r||(a=Y(l,"input",n[12]),r=!0)},p(f,u){u&1048576&&i!==(i=f[20])&&p(e,"for",i),u&1048576&&o!==(o=f[20])&&p(l,"id",o),u&1&&l.value!==f[0].accessKey&&oe(l,f[0].accessKey)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function OA(n){let e,t,i,s,l,o,r;function a(u){n[13](u)}let f={id:n[20],required:!0};return n[0].secret!==void 0&&(f.value=n[0].secret),l=new of({props:f}),ne.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Secret"),s=O(),z(l.$$.fragment),p(e,"for",i=n[20])},m(u,c){w(u,e,c),b(e,t),w(u,s,c),j(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]),!o&&c&1&&(o=!0,d.value=u[0].secret,_e(()=>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),V(l,u)}}}function EA(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[20])},m(c,d){w(c,e,d),e.checked=n[0].forcePathStyle,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),f||(u=[Y(e,"change",n[14]),Se(je.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],f=!0)},p(c,d){d&1048576&&t!==(t=c[20])&&p(e,"id",t),d&1&&(e.checked=c[0].forcePathStyle),d&1048576&&a!==(a=c[20])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),f=!1,Ce(u)}}}function DA(n){let e,t,i,s,l;e=new ce({props:{class:"form-field form-field-toggle",$$slots:{default:[SA,({uniqueId:f})=>({20:f}),({uniqueId:f})=>f?1048576:0]},$$scope:{ctx:n}}});const o=n[7].default,r=$t(o,n,n[15],Ih);let a=n[0].enabled&&Lh(n);return{c(){z(e.$$.fragment),t=O(),r&&r.c(),i=O(),a&&a.c(),s=ye()},m(f,u){j(e,f,u),w(f,t,u),r&&r.m(f,u),w(f,i,u),a&&a.m(f,u),w(f,s,u),l=!0},p(f,[u]){const c={};u&1081361&&(c.$$scope={dirty:u,ctx:f}),e.$set(c),r&&r.p&&(!l||u&32775)&&Tt(r,o,f,f[15],l?Ct(o,f[15],u,wA):Mt(f[15]),Ih),f[0].enabled?a?(a.p(f,u),u&1&&A(a,1)):(a=Lh(f),a.c(),A(a,1),a.m(s.parentNode,s)):a&&(re(),L(a,1,1,()=>{a=null}),ae())},i(f){l||(A(e.$$.fragment,f),A(r,f),A(a),l=!0)},o(f){L(e.$$.fragment,f),L(r,f),L(a),l=!1},d(f){V(e,f),f&&k(t),r&&r.d(f),f&&k(i),a&&a.d(f),f&&k(s)}}}const Fr="s3_test_request";function AA(n,e,t){let{$$slots:i={},$$scope:s}=e,{originalConfig:l={}}=e,{config:o={}}=e,{configKey:r="s3"}=e,{toggleLabel:a="Enable S3"}=e,{testFilesystem:f="storage"}=e,{testError:u=null}=e,{isTesting:c=!1}=e,d=null,m=null;function _(E){t(2,c=!0),clearTimeout(m),m=setTimeout(()=>{h()},E)}async function h(){if(t(1,u=null),!o.enabled)return t(2,c=!1),u;ue.cancelRequest(Fr),clearTimeout(d),d=setTimeout(()=>{ue.cancelRequest(Fr),t(1,u=new Error("S3 test connection timeout.")),t(2,c=!1)},3e4),t(2,c=!0);let E;try{await ue.settings.testS3(f,{$cancelKey:Fr})}catch(D){E=D}return E!=null&&E.isAbort||(t(1,u=E),t(2,c=!1),clearTimeout(d)),u}Kt(()=>()=>{clearTimeout(d),clearTimeout(m)});function g(){o.enabled=this.checked,t(0,o)}function y(){o.endpoint=this.value,t(0,o)}function S(){o.bucket=this.value,t(0,o)}function C(){o.region=this.value,t(0,o)}function $(){o.accessKey=this.value,t(0,o)}function T(E){n.$$.not_equal(o.secret,E)&&(o.secret=E,t(0,o))}function M(){o.forcePathStyle=this.checked,t(0,o)}return n.$$set=E=>{"originalConfig"in E&&t(5,l=E.originalConfig),"config"in E&&t(0,o=E.config),"configKey"in E&&t(3,r=E.configKey),"toggleLabel"in E&&t(4,a=E.toggleLabel),"testFilesystem"in E&&t(6,f=E.testFilesystem),"testError"in E&&t(1,u=E.testError),"isTesting"in E&&t(2,c=E.isTesting),"$$scope"in E&&t(15,s=E.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&l!=null&&l.enabled&&_(100),n.$$.dirty&9&&(o.enabled||ci(r))},[o,u,c,r,a,l,f,i,g,y,S,C,$,T,M,s]}class S1 extends be{constructor(e){super(),ge(this,e,AA,DA,pe,{originalConfig:5,config:0,configKey:3,toggleLabel:4,testFilesystem:6,testError:1,isTesting:2})}}function IA(n){var E;let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;function y(D){n[11](D)}function S(D){n[12](D)}function C(D){n[13](D)}let $={toggleLabel:"Use S3 storage",originalConfig:n[0].s3,$$slots:{default:[PA]},$$scope:{ctx:n}};n[1].s3!==void 0&&($.config=n[1].s3),n[4]!==void 0&&($.isTesting=n[4]),n[5]!==void 0&&($.testError=n[5]),e=new S1({props:$}),ne.push(()=>de(e,"config",y)),ne.push(()=>de(e,"isTesting",S)),ne.push(()=>de(e,"testError",C));let T=((E=n[1].s3)==null?void 0:E.enabled)&&!n[6]&&!n[3]&&Fh(n),M=n[6]&&Nh(n);return{c(){z(e.$$.fragment),l=O(),o=v("div"),r=v("div"),a=O(),T&&T.c(),f=O(),M&&M.c(),u=O(),c=v("button"),d=v("span"),d.textContent="Save changes",p(r,"class","flex-fill"),p(d,"class","txt"),p(c,"type","submit"),p(c,"class","btn btn-expanded"),c.disabled=m=!n[6]||n[3],Q(c,"btn-loading",n[3]),p(o,"class","flex")},m(D,I){j(e,D,I),w(D,l,I),w(D,o,I),b(o,r),b(o,a),T&&T.m(o,null),b(o,f),M&&M.m(o,null),b(o,u),b(o,c),b(c,d),_=!0,h||(g=Y(c,"click",n[15]),h=!0)},p(D,I){var F;const P={};I&1&&(P.originalConfig=D[0].s3),I&524291&&(P.$$scope={dirty:I,ctx:D}),!t&&I&2&&(t=!0,P.config=D[1].s3,_e(()=>t=!1)),!i&&I&16&&(i=!0,P.isTesting=D[4],_e(()=>i=!1)),!s&&I&32&&(s=!0,P.testError=D[5],_e(()=>s=!1)),e.$set(P),(F=D[1].s3)!=null&&F.enabled&&!D[6]&&!D[3]?T?T.p(D,I):(T=Fh(D),T.c(),T.m(o,f)):T&&(T.d(1),T=null),D[6]?M?M.p(D,I):(M=Nh(D),M.c(),M.m(o,u)):M&&(M.d(1),M=null),(!_||I&72&&m!==(m=!D[6]||D[3]))&&(c.disabled=m),(!_||I&8)&&Q(c,"btn-loading",D[3])},i(D){_||(A(e.$$.fragment,D),_=!0)},o(D){L(e.$$.fragment,D),_=!1},d(D){V(e,D),D&&k(l),D&&k(o),T&&T.d(),M&&M.d(),h=!1,g()}}}function LA(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Ph(n){var I;let e,t,i,s,l,o,r,a=(I=n[0].s3)!=null&&I.enabled?"S3 storage":"local file system",f,u,c,d=n[1].s3.enabled?"S3 storage":"local file system",m,_,h,g,y,S,C,$,T,M,E,D;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=U(`If you have existing uploaded files, you'll have to migrate them manually - from the - `),r=v("strong"),f=U(a),u=U(` - to the - `),c=v("strong"),m=U(d),_=U(`. - `),h=v("br"),g=U(` - There are numerous command line tools that can help you, such as: - `),y=v("a"),y.textContent=`rclone - `,S=U(`, - `),C=v("a"),C.textContent=`s5cmd - `,$=U(", etc."),T=O(),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(C,"href","https://github.com/peak/s5cmd"),p(C,"target","_blank"),p(C,"rel","noopener noreferrer"),p(C,"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,C),b(l,$),b(e,T),b(e,M),D=!0},p(P,F){var N;(!D||F&1)&&a!==(a=(N=P[0].s3)!=null&&N.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&&(E||(E=Re(e,tt,{duration:150},!0)),E.run(1))}),D=!0)},o(P){P&&(E||(E=Re(e,tt,{duration:150},!1)),E.run(0)),D=!1},d(P){P&&k(e),P&&E&&E.end()}}}function PA(n){var i;let e,t=((i=n[0].s3)==null?void 0:i.enabled)!=n[1].s3.enabled&&Ph(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=Ph(s),t.c(),A(t,1),t.m(e.parentNode,e)):t&&(re(),L(t,1,1,()=>{t=null}),ae())},d(s){t&&t.d(s),s&&k(e)}}}function Fh(n){let e;function t(l,o){return l[4]?RA:l[5]?NA:FA}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 FA(n){let e;return{c(){e=v("div"),e.innerHTML=` - S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function NA(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` - Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Se(t=je.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Dt(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 RA(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Nh(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 qA(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;const y=[LA,IA],S=[];function C($,T){return $[2]?0:1}return d=C(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[7]),r=O(),a=v("div"),f=v("form"),u=v("div"),u.innerHTML=`

    By default PocketBase uses the local file system to store uploaded files.

    -

    If you have limited disk space, you could optionally connect to an S3 compatible storage.

    `,c=O(),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($,T){w($,e,T),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w($,r,T),w($,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($,T){(!_||T&128)&&se(o,$[7]);let M=d;d=C($),d===M?S[d].p($,T):(re(),L(S[M],1,1,()=>{S[M]=null}),ae(),m=S[d],m?m.p($,T):(m=S[d]=y[d]($),m.c()),A(m,1),m.m(f,null))},i($){_||(A(m),_=!0)},o($){L(m),_=!1},d($){$&&k(e),$&&k(r),$&&k(a),S[d].d(),h=!1,g()}}}function jA(n){let e,t,i,s;return e=new Mi({}),i=new wn({props:{$$slots:{default:[qA]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(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){V(e,l),l&&k(t),V(i,l)}}}const VA="s3_test_request";function zA(n,e,t){let i,s,l;We(n,Et,M=>t(7,l=M)),nn(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(VA);const M=await ue.settings.update(H.filterRedactedProps(r));en({}),await _(M),Ma(),c?Cy("Successfully saved but failed to establish S3 connection."):Rt("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 C=()=>h(),$=()=>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 HA extends be{constructor(e){super(),ge(this,e,zA,jA,pe,{})}}function BA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),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 UA(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("label"),t=U("Client ID"),s=O(),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),oe(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&&oe(l,u[1].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),a=!1,f()}}}function WA(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=O(),z(l.$$.fragment),p(e,"for",i=n[20])},m(u,c){w(u,e,c),b(e,t),w(u,s,c),j(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,_e(()=>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),V(l,u)}}}function Rh(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=Ot(o,r(n)),ne.push(()=>de(t,"config",l))),{c(){e=v("div"),t&&z(t.$$.fragment),p(e,"class","col-lg-12")},m(a,f){w(a,e,f),t&&j(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],_e(()=>i=!1)),f&8&&o!==(o=a[3].optionsComponent)){if(t){re();const c=t;L(c.$$.fragment,1,0,()=>{V(c,1)}),ae()}o?(t=Ot(o,r(a)),ne.push(()=>de(t,"config",l)),z(t.$$.fragment),A(t.$$.fragment,1),j(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&&V(t)}}}function YA(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:[BA,({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:[UA,({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:[WA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let _=n[3].optionsComponent&&Rh(n);return{c(){e=v("form"),t=v("div"),z(i.$$.fragment),s=O(),l=v("button"),l.innerHTML='Clear all fields',o=O(),z(r.$$.fragment),a=O(),z(f.$$.fragment),u=O(),_&&_.c(),p(l,"type","button"),p(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),p(t,"class","flex m-b-base"),p(e,"id",n[6]),p(e,"autocomplete","off")},m(h,g){w(h,e,g),b(e,t),j(i,t,null),b(t,s),b(t,l),b(e,o),j(r,e,null),b(e,a),j(f,e,null),b(e,u),_&&_.m(e,null),c=!0,d||(m=[Y(l,"click",n[8]),Y(e,"submit",Xe(n[15]))],d=!0)},p(h,g){const y={};g&8&&(y.name=h[3].key+".enabled"),g&3145730&&(y.$$scope={dirty:g,ctx:h}),i.$set(y);const S={};g&2&&(S.class="form-field "+(h[1].enabled?"required":"")),g&8&&(S.name=h[3].key+".clientId"),g&3145730&&(S.$$scope={dirty:g,ctx:h}),r.$set(S);const C={};g&2&&(C.class="form-field "+(h[1].enabled?"required":"")),g&8&&(C.name=h[3].key+".clientSecret"),g&3145730&&(C.$$scope={dirty:g,ctx:h}),f.$set(C),h[3].optionsComponent?_?(_.p(h,g),g&8&&A(_,1)):(_=Rh(h),_.c(),A(_,1),_.m(e,null)):_&&(re(),L(_,1,1,()=>{_=null}),ae())},i(h){c||(A(i.$$.fragment,h),A(r.$$.fragment,h),A(f.$$.fragment,h),A(_),c=!0)},o(h){L(i.$$.fragment,h),L(r.$$.fragment,h),L(f.$$.fragment,h),L(_),c=!1},d(h){h&&k(e),V(i),V(r),V(f),_&&_.d(),d=!1,Ce(m)}}}function KA(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=v("h4"),i=U(t),s=U(" provider"),p(e,"class","center txt-break")},m(l,o){w(l,e,o),b(e,i),b(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&se(i,t)},d(l){l&&k(e)}}}function JA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Close"),i=O(),s=v("button"),l=v("span"),l.textContent="Save changes",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],Q(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&&Q(s,"btn-loading",f[4])},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function ZA(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[JA],header:[KA],default:[YA]},$$scope:{ctx:n}};return e=new ln({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(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[16](null),V(e,s)}}}function GA(n,e,t){let i;const s=yt(),l="provider_popup_"+H.randomString(5);let o,r={},a={},f=!1,u="";function c(E,D){en({}),t(3,r=Object.assign({},E)),t(1,a=Object.assign({enabled:!0},D)),t(10,u=JSON.stringify(a)),o==null||o.show()}function d(){return o==null?void 0:o.hide()}async function m(){t(4,f=!0);try{const E={};E[r.key]=H.filterRedactedProps(a);const D=await ue.settings.update(E);en({}),Rt("Successfully updated provider settings."),s("submit",D),d()}catch(E){ue.error(E)}t(4,f=!1)}function _(){for(let E in a)t(1,a[E]="",a);t(1,a.enabled=!1,a)}function h(){a.enabled=this.checked,t(1,a)}function g(){a.clientId=this.value,t(1,a)}function y(E){n.$$.not_equal(a.clientSecret,E)&&(a.clientSecret=E,t(1,a))}function S(E){a=E,t(1,a)}const C=()=>m();function $(E){ne[E?"unshift":"push"](()=>{o=E,t(2,o)})}function T(E){Fe.call(this,n,E)}function M(E){Fe.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=u)},[d,a,o,r,f,i,l,m,_,c,u,h,g,y,S,C,$,T,M]}class XA extends be{constructor(e){super(),ge(this,e,GA,ZA,pe,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function qh(n){let e,t,i;return{c(){e=v("img"),_n(e.src,t="./images/oauth2/"+n[1].logo)||p(e,"src",t),p(e,"alt",i=n[1].title+" logo")},m(s,l){w(s,e,l)},p(s,l){l&2&&!_n(e.src,t="./images/oauth2/"+s[1].logo)&&p(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&p(e,"alt",i)},d(s){s&&k(e)}}}function jh(n){let e;return{c(){e=v("div"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function QA(n){let e,t,i,s,l=n[1].title+"",o,r,a,f,u=n[1].key.slice(0,-4)+"",c,d,m,_,h,g,y,S,C,$,T=n[1].logo&&qh(n),M=n[0].enabled&&jh(),E={};return y=new XA({props:E}),n[4](y),y.$on("submit",n[5]),{c(){e=v("div"),t=v("figure"),T&&T.c(),i=O(),s=v("div"),o=U(l),r=O(),a=v("em"),f=U("("),c=U(u),d=U(")"),m=O(),M&&M.c(),_=O(),h=v("button"),h.innerHTML='',g=O(),z(y.$$.fragment),p(t,"class","provider-logo"),p(s,"class","title"),p(a,"class","txt-hint txt-sm m-r-auto"),p(h,"type","button"),p(h,"class","btn btn-circle btn-hint btn-transparent"),p(h,"aria-label","Provider settings"),p(e,"class","provider-card")},m(D,I){w(D,e,I),b(e,t),T&&T.m(t,null),b(e,i),b(e,s),b(s,o),b(e,r),b(e,a),b(a,f),b(a,c),b(a,d),b(e,m),M&&M.m(e,null),b(e,_),b(e,h),w(D,g,I),j(y,D,I),S=!0,C||($=Y(h,"click",n[3]),C=!0)},p(D,[I]){D[1].logo?T?T.p(D,I):(T=qh(D),T.c(),T.m(t,null)):T&&(T.d(1),T=null),(!S||I&2)&&l!==(l=D[1].title+"")&&se(o,l),(!S||I&2)&&u!==(u=D[1].key.slice(0,-4)+"")&&se(c,u),D[0].enabled?M||(M=jh(),M.c(),M.m(e,_)):M&&(M.d(1),M=null);const P={};y.$set(P)},i(D){S||(A(y.$$.fragment,D),S=!0)},o(D){L(y.$$.fragment,D),S=!1},d(D){D&&k(e),T&&T.d(),M&&M.d(),D&&k(g),n[4](null),V(y,D),C=!1,$()}}}function xA(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(f){ne[f?"unshift":"push"](()=>{l=f,t(2,l)})}const a=f=>{f.detail[i.key]&&t(0,s=f.detail[i.key])};return n.$$set=f=>{"provider"in f&&t(1,i=f.provider),"config"in f&&t(0,s=f.config)},[s,i,l,o,r,a]}class $1 extends be{constructor(e){super(),ge(this,e,xA,QA,pe,{provider:1,config:0})}}function Vh(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function zh(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function e8(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,f,u=n[3];const c=h=>h[9].key;for(let h=0;h0&&n[2].length>0&&Bh(),m=n[2];const _=h=>h[9].key;for(let h=0;h0&&h[2].length>0?d||(d=Bh(),d.c(),d.m(l.parentNode,l)):d&&(d.d(1),d=null),g&5&&(m=h[2],re(),r=vt(r,g,_,1,h,m,a,o,Ht,Uh,null,Vh),ae())},i(h){if(!f){for(let g=0;gde(i,"config",r)),{key:n,first:null,c(){t=v("div"),z(i.$$.fragment),l=O(),p(t,"class","col-lg-6"),this.first=t},m(f,u){w(f,t,u),j(i,t,null),b(t,l),o=!0},p(f,u){e=f;const c={};u&8&&(c.provider=e[9]),!s&&u&9&&(s=!0,c.config=e[0][e[9].key],_e(()=>s=!1)),i.$set(c)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){L(i.$$.fragment,f),o=!1},d(f){f&&k(t),V(i)}}}function Bh(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Uh(n,e){let t,i,s,l,o;function r(f){e[6](f,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new $1({props:a}),ne.push(()=>de(i,"config",r)),{key:n,first:null,c(){t=v("div"),z(i.$$.fragment),l=O(),p(t,"class","col-lg-6"),this.first=t},m(f,u){w(f,t,u),j(i,t,null),b(t,l),o=!0},p(f,u){e=f;const c={};u&4&&(c.provider=e[9]),!s&&u&5&&(s=!0,c.config=e[0][e[9].key],_e(()=>s=!1)),i.$set(c)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){L(i.$$.fragment,f),o=!1},d(f){f&&k(t),V(i)}}}function n8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_;const h=[t8,e8],g=[];function y(S,C){return S[1]?0:1}return d=y(n),m=g[d]=h[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[4]),r=O(),a=v("div"),f=v("div"),u=v("h6"),u.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",c=O(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","m-b-base"),p(f,"class","panel"),p(a,"class","wrapper")},m(S,C){w(S,e,C),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(S,r,C),w(S,a,C),b(a,f),b(f,u),b(f,c),g[d].m(f,null),_=!0},p(S,C){(!_||C&16)&&se(o,S[4]);let $=d;d=y(S),d===$?g[d].p(S,C):(re(),L(g[$],1,1,()=>{g[$]=null}),ae(),m=g[d],m?m.p(S,C):(m=g[d]=h[d](S),m.c()),A(m,1),m.m(f,null))},i(S){_||(A(m),_=!0)},o(S){L(m),_=!1},d(S){S&&k(e),S&&k(r),S&&k(a),g[d].d()}}}function i8(n){let e,t,i,s;return e=new Mi({}),i=new wn({props:{$$slots:{default:[n8]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(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){V(e,l),l&&k(t),V(i,l)}}}function s8(n,e,t){let i,s,l;We(n,Et,d=>t(4,l=d)),nn(Et,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const d=await ue.settings.getAll()||{};f(d)}catch(d){ue.error(d)}t(1,o=!1)}function f(d){d=d||{},t(0,r={});for(const m of uo)t(0,r[m.key]=Object.assign({enabled:!1},d[m.key]),r)}function u(d,m){n.$$.not_equal(r[m.key],d)&&(r[m.key]=d,t(0,r))}function c(d,m){n.$$.not_equal(r[m.key],d)&&(r[m.key]=d,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=uo.filter(d=>{var m;return(m=r[d.key])==null?void 0:m.enabled})),n.$$.dirty&1&&t(2,s=uo.filter(d=>{var m;return!((m=r[d.key])!=null&&m.enabled)}))},[r,o,s,i,l,u,c]}class l8 extends be{constructor(e){super(),ge(this,e,s8,i8,pe,{})}}function o8(n){let e,t,i,s,l,o,r,a,f,u,c,d;return{c(){e=v("label"),t=U(n[3]),i=U(" duration (in seconds)"),l=O(),o=v("input"),a=O(),f=v("div"),u=v("span"),u.textContent="Invalidate all previously issued tokens",p(e,"for",s=n[6]),p(o,"type","number"),p(o,"id",r=n[6]),o.required=!0,p(u,"class","link-primary"),Q(u,"txt-success",!!n[1]),p(f,"class","help-block")},m(m,_){w(m,e,_),b(e,t),b(e,i),w(m,l,_),w(m,o,_),oe(o,n[0]),w(m,a,_),w(m,f,_),b(f,u),c||(d=[Y(o,"input",n[4]),Y(u,"click",n[5])],c=!0)},p(m,_){_&8&&se(t,m[3]),_&64&&s!==(s=m[6])&&p(e,"for",s),_&64&&r!==(r=m[6])&&p(o,"id",r),_&1&&pt(o.value)!==m[0]&&oe(o,m[0]),_&2&&Q(u,"txt-success",!!m[1])},d(m){m&&k(e),m&&k(l),m&&k(o),m&&k(a),m&&k(f),c=!1,Ce(d)}}}function r8(n){let e,t;return e=new ce({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[o8,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(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){V(e,i)}}}function a8(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=pt(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=H.randomSecret(50))};return n.$$set=f=>{"key"in f&&t(2,i=f.key),"label"in f&&t(3,s=f.label),"duration"in f&&t(0,l=f.duration),"secret"in f&&t(1,o=f.secret)},[l,o,i,s,r,a]}class C1 extends be{constructor(e){super(),ge(this,e,a8,r8,pe,{key:2,label:3,duration:0,secret:1})}}function Wh(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function Yh(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function f8(n){let e,t,i=[],s=new Map,l,o,r,a,f,u=[],c=new Map,d,m,_,h,g,y,S,C,$,T,M,E=n[5];const D=N=>N[19].key;for(let N=0;NN[19].key;for(let N=0;Nde(i,"duration",r)),ne.push(()=>de(i,"secret",a)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(u,c){w(u,t,c),j(i,u,c),o=!0},p(u,c){e=u;const d={};!s&&c&33&&(s=!0,d.duration=e[0][e[19].key].duration,_e(()=>s=!1)),!l&&c&33&&(l=!0,d.secret=e[0][e[19].key].secret,_e(()=>l=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){L(i.$$.fragment,u),o=!1},d(u){u&&k(t),V(i,u)}}}function Jh(n,e){let t,i,s,l,o;function r(u){e[13](u,e[19])}function a(u){e[14](u,e[19])}let f={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(f.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(f.secret=e[0][e[19].key].secret),i=new C1({props:f}),ne.push(()=>de(i,"duration",r)),ne.push(()=>de(i,"secret",a)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(u,c){w(u,t,c),j(i,u,c),o=!0},p(u,c){e=u;const d={};!s&&c&65&&(s=!0,d.duration=e[0][e[19].key].duration,_e(()=>s=!1)),!l&&c&65&&(l=!0,d.secret=e[0][e[19].key].secret,_e(()=>l=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){L(i.$$.fragment,u),o=!1},d(u){u&&k(t),V(i,u)}}}function Zh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){w(l,e,o),b(e,t),i||(s=Y(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&k(e),i=!1,s()}}}function c8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;const y=[u8,f8],S=[];function C($,T){return $[1]?0:1}return d=C(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[4]),r=O(),a=v("div"),f=v("form"),u=v("div"),u.innerHTML="

    Adjust common token options.

    ",c=O(),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 m-b-sm txt-xl"),p(f,"class","panel"),p(f,"autocomplete","off"),p(a,"class","wrapper")},m($,T){w($,e,T),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w($,r,T),w($,a,T),b(a,f),b(f,u),b(f,c),S[d].m(f,null),_=!0,h||(g=Y(f,"submit",Xe(n[7])),h=!0)},p($,T){(!_||T&16)&&se(o,$[4]);let M=d;d=C($),d===M?S[d].p($,T):(re(),L(S[M],1,1,()=>{S[M]=null}),ae(),m=S[d],m?m.p($,T):(m=S[d]=y[d]($),m.c()),A(m,1),m.m(f,null))},i($){_||(A(m),_=!0)},o($){L(m),_=!1},d($){$&&k(e),$&&k(r),$&&k(a),S[d].d(),h=!1,g()}}}function d8(n){let e,t,i,s;return e=new Mi({}),i=new wn({props:{$$slots:{default:[c8]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(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){V(e,l),l&&k(t),V(i,l)}}}function p8(n,e,t){let i,s,l;We(n,Et,M=>t(4,l=M));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"recordFileToken",label:"Records protected file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins protected file access token"}];nn(Et,l="Token options",l);let a={},f={},u=!1,c=!1;d();async function d(){t(1,u=!0);try{const M=await ue.settings.getAll()||{};_(M)}catch(M){ue.error(M)}t(1,u=!1)}async function m(){if(!(c||!s)){t(2,c=!0);try{const M=await ue.settings.update(H.filterRedactedProps(f));_(M),Rt("Successfully saved tokens options.")}catch(M){ue.error(M)}t(2,c=!1)}}function _(M){var D;M=M||{},t(0,f={});const E=o.concat(r);for(const I of E)t(0,f[I.key]={duration:((D=M[I.key])==null?void 0:D.duration)||0},f);t(9,a=JSON.parse(JSON.stringify(f)))}function h(){t(0,f=JSON.parse(JSON.stringify(a||{})))}function g(M,E){n.$$.not_equal(f[E.key].duration,M)&&(f[E.key].duration=M,t(0,f))}function y(M,E){n.$$.not_equal(f[E.key].secret,M)&&(f[E.key].secret=M,t(0,f))}function S(M,E){n.$$.not_equal(f[E.key].duration,M)&&(f[E.key].duration=M,t(0,f))}function C(M,E){n.$$.not_equal(f[E.key].secret,M)&&(f[E.key].secret=M,t(0,f))}const $=()=>h(),T=()=>m();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(f))},[f,u,c,s,l,o,r,m,h,a,i,g,y,S,C,$,T]}class m8 extends be{constructor(e){super(),ge(this,e,p8,d8,pe,{})}}function h8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_;return o=new d1({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in - another PocketBase environment.

    `,t=O(),i=v("div"),s=v("button"),s.innerHTML='Copy',l=O(),z(o.$$.fragment),r=O(),a=v("div"),f=v("div"),u=O(),c=v("button"),c.innerHTML=` - Download as JSON`,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),j(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),V(o),n[8](null),h&&k(r),h&&k(a),m=!1,Ce(_)}}}function _8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function g8(n){let e,t,i,s,l,o,r,a,f,u,c,d;const m=[_8,h8],_=[];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=O(),l=v("div"),o=U(n[3]),r=O(),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):(re(),L(_[S],1,1,()=>{_[S]=null}),ae(),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 b8(n){let e,t,i,s;return e=new Mi({}),i=new wn({props:{$$slots:{default:[g8]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&k(t),V(i,l)}}}function v8(n,e,t){let i,s;We(n,Et,g=>t(3,s=g)),nn(Et,s="Export collections",s);const l="export_"+H.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(){H.downloadJson(r,"pb_schema")}function c(){H.copyToClipboard(i),go("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 y8 extends be{constructor(e){super(),ge(this,e,v8,b8,pe,{})}}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[18]=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[23]=e[t][1],i}function e_(n,e,t){const i=n.slice();return i[14]=e[t],i}function t_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function n_(n,e,t){const i=n.slice();return i[30]=e[t],i}function k8(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&i_(),a=n[0].name!==n[1].name&&s_(n);return{c(){e=v("div"),r&&r.c(),t=O(),a&&a.c(),i=O(),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=i_(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),f[0].name!==f[1].name?a?a.p(f,u):(a=s_(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 w8(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=O(),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 S8(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=O(),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 i_(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 s_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=U(t),s=O(),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 l_(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]])+"",u,c,d,m,_=n[12]((y=n[1])==null?void 0:y[n[30]])+"",h;return{c(){var S,C,$,T,M,E;e=v("tr"),t=v("td"),i=v("span"),l=U(s),o=O(),r=v("td"),a=v("pre"),u=U(f),c=O(),d=v("td"),m=v("pre"),h=U(_),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),Q(r,"changed-old-col",!n[10]&&vn((S=n[0])==null?void 0:S[n[30]],(C=n[1])==null?void 0:C[n[30]])),Q(r,"changed-none-col",n[10]),p(m,"class","txt"),p(d,"class","svelte-lmkr38"),Q(d,"changed-new-col",!n[5]&&vn(($=n[0])==null?void 0:$[n[30]],(T=n[1])==null?void 0:T[n[30]])),Q(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),Q(e,"txt-primary",vn((M=n[0])==null?void 0:M[n[30]],(E=n[1])==null?void 0:E[n[30]]))},m(S,C){w(S,e,C),b(e,t),b(t,i),b(i,l),b(e,o),b(e,r),b(r,a),b(a,u),b(e,c),b(e,d),b(d,m),b(m,h)},p(S,C){var $,T,M,E,D,I,P,F;C[0]&1&&f!==(f=S[12](($=S[0])==null?void 0:$[S[30]])+"")&&se(u,f),C[0]&3075&&Q(r,"changed-old-col",!S[10]&&vn((T=S[0])==null?void 0:T[S[30]],(M=S[1])==null?void 0:M[S[30]])),C[0]&1024&&Q(r,"changed-none-col",S[10]),C[0]&2&&_!==(_=S[12]((E=S[1])==null?void 0:E[S[30]])+"")&&se(h,_),C[0]&2083&&Q(d,"changed-new-col",!S[5]&&vn((D=S[0])==null?void 0:D[S[30]],(I=S[1])==null?void 0:I[S[30]])),C[0]&32&&Q(d,"changed-none-col",S[5]),C[0]&2051&&Q(e,"txt-primary",vn((P=S[0])==null?void 0:P[S[30]],(F=S[1])==null?void 0:F[S[30]]))},d(S){S&&k(e)}}}function o_(n){let e,t=n[6],i=[];for(let s=0;sProps - Old - New`,l=O(),o=v("tbody");for(let $=0;$<_.length;$+=1)_[$].c();r=O(),h&&h.c(),a=O();for(let $=0;$!["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"?"":H.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=H.hasCollectionChanges(o,r,a))},[o,r,a,f,u,i,c,d,m,l,s,_,g]}class T8 extends be{constructor(e){super(),ge(this,e,C8,$8,pe,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function m_(n,e,t){const i=n.slice();return i[17]=e[t],i}function h_(n){let e,t;return e=new T8({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function M8(n){let e,t,i=n[2],s=[];for(let o=0;oL(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{_()}):_()}async function _(){if(!f){t(4,f=!0);try{await ue.collections.import(o,a),Rt("Successfully imported collections configuration."),i("submit")}catch($){ue.error($)}t(4,f=!1),c()}}const h=()=>m(),g=()=>!f;function y($){ne[$?"unshift":"push"](()=>{s=$,t(1,s)})}function S($){Fe.call(this,n,$)}function C($){Fe.call(this,n,$)}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,C]}class I8 extends be{constructor(e){super(),ge(this,e,A8,D8,pe,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function __(n,e,t){const i=n.slice();return i[32]=e[t],i}function g_(n,e,t){const i=n.slice();return i[35]=e[t],i}function b_(n,e,t){const i=n.slice();return i[32]=e[t],i}function L8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T,M,E;a=new ce({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[F8,({uniqueId:R})=>({40:R}),({uniqueId:R})=>[0,R?512:0]]},$$scope:{ctx:n}}});let D=!1,I=n[6]&&n[1].length&&!n[7]&&y_(),P=n[6]&&n[1].length&&n[7]&&k_(n),F=n[13].length&&I_(n),N=!!n[0]&&L_(n);return{c(){e=v("input"),t=O(),i=v("div"),s=v("p"),l=U(`Paste below the collections configuration you want to import or - `),o=v("button"),o.innerHTML='Load from JSON file',r=O(),z(a.$$.fragment),f=O(),u=O(),I&&I.c(),c=O(),P&&P.c(),d=O(),F&&F.c(),m=O(),_=v("div"),N&&N.c(),h=O(),g=v("div"),y=O(),S=v("button"),C=v("span"),C.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),Q(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(g,"class","flex-fill"),p(C,"class","txt"),p(S,"type","button"),p(S,"class","btn btn-expanded btn-warning m-l-auto"),S.disabled=$=!n[14],p(_,"class","flex m-t-base")},m(R,q){w(R,e,q),n[19](e),w(R,t,q),w(R,i,q),b(i,s),b(s,l),b(s,o),w(R,r,q),j(a,R,q),w(R,f,q),w(R,u,q),I&&I.m(R,q),w(R,c,q),P&&P.m(R,q),w(R,d,q),F&&F.m(R,q),w(R,m,q),w(R,_,q),N&&N.m(_,null),b(_,h),b(_,g),b(_,y),b(_,S),b(S,C),T=!0,M||(E=[Y(e,"change",n[20]),Y(o,"click",n[21]),Y(S,"click",n[26])],M=!0)},p(R,q){(!T||q[0]&4096)&&Q(o,"btn-loading",R[12]);const B={};q[0]&64&&(B.class="form-field "+(R[6]?"":"field-error")),q[0]&65|q[1]&1536&&(B.$$scope={dirty:q,ctx:R}),a.$set(B),R[6]&&R[1].length&&!R[7]?I||(I=y_(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),R[6]&&R[1].length&&R[7]?P?P.p(R,q):(P=k_(R),P.c(),P.m(d.parentNode,d)):P&&(P.d(1),P=null),R[13].length?F?F.p(R,q):(F=I_(R),F.c(),F.m(m.parentNode,m)):F&&(F.d(1),F=null),R[0]?N?N.p(R,q):(N=L_(R),N.c(),N.m(_,h)):N&&(N.d(1),N=null),(!T||q[0]&16384&&$!==($=!R[14]))&&(S.disabled=$)},i(R){T||(A(a.$$.fragment,R),A(D),T=!0)},o(R){L(a.$$.fragment,R),L(D),T=!1},d(R){R&&k(e),n[19](null),R&&k(t),R&&k(i),R&&k(r),V(a,R),R&&k(f),R&&k(u),I&&I.d(R),R&&k(c),P&&P.d(R),R&&k(d),F&&F.d(R),R&&k(m),R&&k(_),N&&N.d(),M=!1,Ce(E)}}}function P8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function v_(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 F8(n){let e,t,i,s,l,o,r,a,f,u,c=!!n[0]&&!n[6]&&v_();return{c(){e=v("label"),t=U("Collections"),s=O(),l=v("textarea"),r=O(),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),oe(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&&oe(l,d[0]),d[0]&&!d[6]?c||(c=v_(),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 y_(n){let e;return{c(){e=v("div"),e.innerHTML=`
    -
    Your collections configuration is already up-to-date!
    `,p(e,"class","alert alert-info")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function k_(n){let e,t,i,s,l,o=n[9].length&&w_(n),r=n[4].length&&C_(n),a=n[8].length&&E_(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=O(),i=v("div"),o&&o.c(),s=O(),r&&r.c(),l=O(),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=w_(f),o.c(),o.m(i,s)):o&&(o.d(1),o=null),f[4].length?r?r.p(f,u):(r=C_(f),r.c(),r.m(i,l)):r&&(r.d(1),r=null),f[8].length?a?a.p(f,u):(a=E_(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 w_(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=O(),s=v("div"),s.innerHTML=`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.`,l=O(),o=v("button"),o.innerHTML='Replace with original ids',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:x,d(f){f&&k(e),r=!1,a()}}}function L_(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',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:x,d(s){s&&k(e),t=!1,i()}}}function N8(n){let e,t,i,s,l,o,r,a,f,u,c,d;const m=[P8,L8],_=[];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=O(),l=v("div"),o=U(n[15]),r=O(),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):(re(),L(_[S],1,1,()=>{_[S]=null}),ae(),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 R8(n){let e,t,i,s,l,o;e=new Mi({}),i=new wn({props:{$$slots:{default:[N8]},$$scope:{ctx:n}}});let r={};return l=new I8({props:r}),n[27](l),l.$on("submit",n[28]),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment),s=O(),z(l.$$.fragment)},m(a,f){j(e,a,f),w(a,t,f),j(i,a,f),w(a,s,f),j(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){V(e,a),a&&k(t),V(i,a),a&&k(s),n[27](null),V(l,a)}}}function q8(n,e,t){let i,s,l,o,r,a,f;We(n,Et,G=>t(15,f=G)),nn(Et,f="Import collections",f);let u,c,d="",m=!1,_=[],h=[],g=!0,y=[],S=!1;C();async function C(){t(5,S=!0);try{t(2,h=await ue.collections.getFullList(200));for(let G of h)delete G.created,delete G.updated}catch(G){ue.error(G)}t(5,S=!1)}function $(){if(t(4,y=[]),!!i)for(let G of _){const fe=H.findByKey(h,"id",G.id);!(fe!=null&&fe.id)||!H.hasCollectionChanges(fe,G,g)||y.push({new:G,old:fe})}}function T(){t(1,_=[]);try{t(1,_=JSON.parse(d))}catch{}Array.isArray(_)?t(1,_=H.filterDuplicatesByKey(_)):t(1,_=[]);for(let G of _)delete G.created,delete G.updated,G.schema=H.filterDuplicatesByKey(G.schema)}function M(){var G,fe;for(let ee of _){const te=H.findByKey(h,"name",ee.name)||H.findByKey(h,"id",ee.id);if(!te)continue;const Oe=ee.id,Pe=te.id;ee.id=Pe;const Ve=Array.isArray(te.schema)?te.schema:[],ze=Array.isArray(ee.schema)?ee.schema:[];for(const we of ze){const Te=H.findByKey(Ve,"name",we.name);Te&&Te.id&&(we.id=Te.id)}for(let we of _)if(Array.isArray(we.schema))for(let Te of we.schema)(G=Te.options)!=null&&G.collectionId&&((fe=Te.options)==null?void 0:fe.collectionId)===Oe&&(Te.options.collectionId=Pe)}t(0,d=JSON.stringify(_,null,4))}function E(G){t(12,m=!0);const fe=new FileReader;fe.onload=async ee=>{t(12,m=!1),t(10,u.value="",u),t(0,d=ee.target.result),await sn(),_.length||(ss("Invalid collections configuration."),D())},fe.onerror=ee=>{console.warn(ee),ss("Failed to load the imported JSON."),t(12,m=!1),t(10,u.value="",u)},fe.readAsText(G)}function D(){t(0,d=""),t(10,u.value="",u),en({})}function I(G){ne[G?"unshift":"push"](()=>{u=G,t(10,u)})}const P=()=>{u.files.length&&E(u.files[0])},F=()=>{u.click()};function N(){d=this.value,t(0,d)}function R(){g=this.checked,t(3,g)}const q=()=>M(),B=()=>D(),K=()=>c==null?void 0:c.show(h,_,g);function J(G){ne[G?"unshift":"push"](()=>{c=G,t(11,c)})}const X=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&T(),n.$$.dirty[0]&3&&t(6,i=!!d&&_.length&&_.length===_.filter(G=>!!G.id&&!!G.name).length),n.$$.dirty[0]&78&&t(9,s=h.filter(G=>i&&g&&!H.findByKey(_,"id",G.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(G=>i&&!H.findByKey(h,"id",G.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof g<"u")&&$(),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(G=>{let fe=H.findByKey(h,"name",G.name)||H.findByKey(h,"id",G.id);if(!fe)return!1;if(fe.id!=G.id)return!0;const ee=Array.isArray(fe.schema)?fe.schema:[],te=Array.isArray(G.schema)?G.schema:[];for(const Oe of te){if(H.findByKey(ee,"id",Oe.id))continue;const Ve=H.findByKey(ee,"name",Oe.name);if(Ve&&Oe.id!=Ve.id)return!0}return!1}))},[d,_,h,g,y,S,i,o,l,s,u,c,m,a,r,f,M,E,D,I,P,F,N,R,q,B,K,J,X]}class j8 extends be{constructor(e){super(),ge(this,e,q8,R8,pe,{},null,[-1,-1])}}function V8(n){let e,t,i,s,l,o,r,a,f,u;return{c(){e=v("label"),t=U("Backup name"),s=O(),l=v("input"),r=O(),a=v("em"),a.textContent="Must be in the format [a-z0-9_-].zip",p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",o=n[15]),p(l,"placeholder","Leave empty to autogenerate"),p(l,"pattern","^[a-z0-9_-]+\\.zip$"),p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),oe(l,n[2]),w(c,r,d),w(c,a,d),f||(u=Y(l,"input",n[7]),f=!0)},p(c,d){d&32768&&i!==(i=c[15])&&p(e,"for",i),d&32768&&o!==(o=c[15])&&p(l,"id",o),d&4&&l.value!==c[2]&&oe(l,c[2])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),f=!1,u()}}}function z8(n){let e,t,i,s,l,o,r;return s=new ce({props:{class:"form-field m-0",name:"name",$$slots:{default:[V8,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`
    -

    Please note that during the backup other concurrent write requests may fail since the - database will be temporary "locked" (this usually happens only during the ZIP generation).

    -

    If you are using S3 storage for the collections file upload, you'll have to backup them - separately since they are not locally stored and will not be included in the final backup!

    `,t=O(),i=v("form"),z(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),j(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),V(s),o=!1,r()}}}function H8(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:x,d(t){t&&k(e)}}}function B8(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),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],Q(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&&Q(s,"btn-loading",a[3])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,r()}}}function U8(n){let e,t,i={class:"backup-create-panel",beforeOpen:n[8],beforeHide:n[9],popup:!0,$$slots:{footer:[B8],header:[H8],default:[z8]},$$scope:{ctx:n}};return e=new ln({props:i}),n[10](e),e.$on("show",n[11]),e.$on("hide",n[12]),{c(){z(e.$$.fragment)},m(s,l){j(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),V(e,s)}}}function W8(n,e,t){const i=yt(),s="backup_create_"+H.randomString(5);let l,o="",r=!1,a;function f(S){en({}),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"),Rt("Successfully generated new backup.")}catch(S){S.isAbort||ue.error(S)}clearTimeout(a),t(3,r=!1)}}As(()=>{clearTimeout(a)});function d(){o=this.value,t(2,o)}const m=()=>r?(go("A backup has already been started, please wait."),!1):!0,_=()=>(r&&go("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 Y8 extends be{constructor(e){super(),ge(this,e,W8,U8,pe,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function K8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Backup name"),s=O(),l=v("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",o=n[15]),l.required=!0},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[2]),r||(a=Y(l,"input",n[9]),r=!0)},p(f,u){u&32768&&i!==(i=f[15])&&p(e,"for",i),u&32768&&o!==(o=f[15])&&p(l,"id",o),u&4&&l.value!==f[2]&&oe(l,f[2])},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function J8(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g;return f=new Rs({props:{value:n[1]}}),m=new ce({props:{class:"form-field required m-0",name:"name",$$slots:{default:[K8,({uniqueId:y})=>({15:y}),({uniqueId:y})=>y?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`
    -

    Please proceed with caution. -
    - Backup restore is still experimental and currently works only on UNIX based systems.

    -

    The restore operation will attempt to replace your existing pb_data with the one from - the backup and will restart the application process.

    -

    Nothing will happen if the backup file is invalid or incompatible.

    `,t=O(),i=v("div"),s=U(`Type the backup name - `),l=v("div"),o=v("span"),r=U(n[1]),a=O(),z(f.$$.fragment),u=U(` - to confirm:`),c=O(),d=v("form"),z(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),j(f,l,null),b(i,u),w(y,c,S),w(y,d,S),j(m,d,null),_=!0,h||(g=Y(d,"submit",Xe(n[7])),h=!0)},p(y,S){(!_||S&2)&&se(r,y[1]);const C={};S&2&&(C.value=y[1]),f.$set(C);const $={};S&98308&&($.$$scope={dirty:S,ctx:y}),m.$set($)},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),V(f),y&&k(c),y&&k(d),V(m),h=!1,g()}}}function Z8(n){let e,t,i,s;return{c(){e=v("h4"),t=U("Restore "),i=v("strong"),s=U(n[1]),p(e,"class","popup-title txt-ellipsis svelte-1fcgldh")},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 G8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Cancel"),i=O(),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],Q(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&&Q(s,"btn-loading",f[4])},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function X8(n){let e,t,i={class:"backup-restore-panel",overlayClose:!n[4],escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[G8],header:[Z8],default:[J8]},$$scope:{ctx:n}};return e=new ln({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){z(e.$$.fragment)},m(s,l){j(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&65590&&(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),V(e,s)}}}function Q8(n,e,t){let i;const s="backup_restore_"+H.randomString(5);let l,o="",r="",a=!1,f=null;function u(S){en({}),t(2,r=""),t(1,o=S),t(4,a=!1),l==null||l.show()}function c(){return l==null?void 0:l.hide()}async function d(){var S;if(!(!i||a)){clearTimeout(f),t(4,a=!0);try{await ue.backups.restore(o),f=setTimeout(()=>{window.location.reload()},2e3)}catch(C){clearTimeout(f),C!=null&&C.isAbort||(t(4,a=!1),ss(((S=C.response)==null?void 0:S.message)||C.message))}}}As(()=>{clearTimeout(f)});function m(){r=this.value,t(2,r)}const _=()=>!a;function h(S){ne[S?"unshift":"push"](()=>{l=S,t(3,l)})}function g(S){Fe.call(this,n,S)}function y(S){Fe.call(this,n,S)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=r!=""&&o==r)},[c,o,r,l,a,i,s,d,u,m,_,h,g,y]}class x8 extends be{constructor(e){super(),ge(this,e,Q8,X8,pe,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function P_(n,e,t){const i=n.slice();return i[22]=e[t],i}function F_(n,e,t){const i=n.slice();return i[19]=e[t],i}function eI(n){let e=[],t=new Map,i,s,l=n[3];const o=a=>a[22].key;for(let a=0;aNo backups yet. - `,p(e,"class","list-item list-item-placeholder svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function R_(n,e){let t,i,s,l,o,r=e[22].key+"",a,f,u,c,d,m=H.formattedFileSize(e[22].size)+"",_,h,g,y,S,C,$,T,M,E,D,I,P,F,N,R,q,B,K,J;function X(){return e[10](e[22])}function G(){return e[11](e[22])}function fe(){return e[12](e[22])}return{key:n,first:null,c(){t=v("div"),i=v("i"),s=O(),l=v("div"),o=v("span"),a=U(r),u=O(),c=v("span"),d=U("("),_=U(m),h=U(")"),g=O(),y=v("div"),S=v("button"),C=v("i"),T=O(),M=v("button"),E=v("i"),I=O(),P=v("button"),F=v("i"),R=O(),p(i,"class","ri-folder-zip-line"),p(o,"class","name backup-name svelte-1ulbkf5"),p(o,"title",f=e[22].key),p(c,"class","size txt-hint txt-nowrap"),p(l,"class","content"),p(C,"class","ri-download-line"),p(S,"type","button"),p(S,"class","btn btn-sm btn-circle btn-hint btn-transparent"),S.disabled=$=e[6][e[22].key]||e[5][e[22].key],p(S,"aria-label","Download"),Q(S,"btn-loading",e[5][e[22].key]),p(E,"class","ri-restart-line"),p(M,"type","button"),p(M,"class","btn btn-sm btn-circle btn-hint btn-transparent"),M.disabled=D=e[6][e[22].key],p(M,"aria-label","Restore"),p(F,"class","ri-delete-bin-7-line"),p(P,"type","button"),p(P,"class","btn btn-sm btn-circle btn-hint btn-transparent"),P.disabled=N=e[6][e[22].key],p(P,"aria-label","Delete"),Q(P,"btn-loading",e[6][e[22].key]),p(y,"class","actions nonintrusive"),p(t,"class","list-item svelte-1ulbkf5"),this.first=t},m(ee,te){w(ee,t,te),b(t,i),b(t,s),b(t,l),b(l,o),b(o,a),b(l,u),b(l,c),b(c,d),b(c,_),b(c,h),b(t,g),b(t,y),b(y,S),b(S,C),b(y,T),b(y,M),b(M,E),b(y,I),b(y,P),b(P,F),b(t,R),B=!0,K||(J=[Se(je.call(null,S,"Download")),Y(S,"click",Xe(X)),Se(je.call(null,M,"Restore")),Y(M,"click",Xe(G)),Se(je.call(null,P,"Delete")),Y(P,"click",Xe(fe))],K=!0)},p(ee,te){e=ee,(!B||te&8)&&r!==(r=e[22].key+"")&&se(a,r),(!B||te&8&&f!==(f=e[22].key))&&p(o,"title",f),(!B||te&8)&&m!==(m=H.formattedFileSize(e[22].size)+"")&&se(_,m),(!B||te&104&&$!==($=e[6][e[22].key]||e[5][e[22].key]))&&(S.disabled=$),(!B||te&40)&&Q(S,"btn-loading",e[5][e[22].key]),(!B||te&72&&D!==(D=e[6][e[22].key]))&&(M.disabled=D),(!B||te&72&&N!==(N=e[6][e[22].key]))&&(P.disabled=N),(!B||te&72)&&Q(P,"btn-loading",e[6][e[22].key])},i(ee){B||(ee&&Ge(()=>{B&&(q||(q=Re(t,tt,{duration:150},!0)),q.run(1))}),B=!0)},o(ee){ee&&(q||(q=Re(t,tt,{duration:150},!1)),q.run(0)),B=!1},d(ee){ee&&k(t),ee&&q&&q.end(),K=!1,Ce(J)}}}function q_(n){let e;return{c(){e=v("div"),e.innerHTML=` - `,p(e,"class","list-item list-item-loader svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function nI(n){let e,t,i;return{c(){e=v("span"),t=O(),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 iI(n){let e,t,i;return{c(){e=v("i"),t=O(),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 sI(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h;const g=[tI,eI],y=[];function S(D,I){return D[4]?0:1}i=S(n),s=y[i]=g[i](n);function C(D,I){return D[7]?iI:nI}let $=C(n),T=$(n),M={};u=new Y8({props:M}),n[14](u),u.$on("submit",n[15]);let E={};return d=new x8({props:E}),n[16](d),{c(){e=v("div"),t=v("div"),s.c(),l=O(),o=v("div"),r=v("button"),T.c(),f=O(),z(u.$$.fragment),c=O(),z(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),j(u,D,I),w(D,c,I),j(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):(re(),L(y[P],1,1,()=>{y[P]=null}),ae(),s=y[i],s?s.p(D,I):(s=y[i]=g[i](D),s.c()),A(s,1),s.m(t,null)),$!==($=C(D))&&(T.d(1),T=$(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 N={};d.$set(N)},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),V(u,D),D&&k(c),n[16](null),V(d,D),_=!1,h()}}}function lI(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,E)=>M.modifiedE.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 E=await ue.getAdminFileToken(),D=ue.backups.getDownloadUrl(E,M);H.download(D)}catch(E){E.isAbort||ue.error(E)}delete r[M],t(5,r)}}function d(M){mn(`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),H.removeByKey(l,"name",M),u(),Rt(`Successfully deleted ${M}.`)}catch(E){E.isAbort||ue.error(E)}delete a[M],t(6,a)}}async function _(){var M;try{const E=await ue.health.check({$autoCancel:!1}),D=f;t(7,f=((M=E==null?void 0:E.data)==null?void 0:M.canBackup)||!1),D!=f&&f&&u()}catch{}}Kt(()=>{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 C(M){ne[M?"unshift":"push"](()=>{i=M,t(1,i)})}const $=()=>{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 oI extends be{constructor(e){super(),ge(this,e,lI,sI,pe,{loadBackups:0})}get loadBackups(){return this.$$.ctx[0]}}function rI(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("i"),s=O(),l=v("input"),p(t,"class","ri-upload-cloud-line"),p(e,"type","button"),p(e,"class",i="btn btn-circle btn-transparent "+n[0]),p(e,"aria-label","Upload backup"),Q(e,"btn-loading",n[2]),Q(e,"btn-disabled",n[2]),p(l,"type","file"),p(l,"accept","application/zip"),p(l,"class","hidden")},m(a,f){w(a,e,f),b(e,t),w(a,s,f),w(a,l,f),n[5](l),o||(r=[Se(je.call(null,e,"Upload backup")),Y(e,"click",n[4]),Y(l,"change",n[3])],o=!0)},p(a,[f]){f&1&&i!==(i="btn btn-circle btn-transparent "+a[0])&&p(e,"class",i),f&5&&Q(e,"btn-loading",a[2]),f&5&&Q(e,"btn-disabled",a[2])},i:x,o:x,d(a){a&&k(e),a&&k(s),a&&k(l),n[5](null),o=!1,Ce(r)}}}const j_="upload_backup";function aI(n,e,t){const i=yt();let{class:s=""}=e,l,o=!1;async function r(u){var d,m,_,h,g;if(o||!((m=(d=u==null?void 0:u.target)==null?void 0:d.files)!=null&&m.length))return;t(2,o=!0);const c=new FormData;c.set("file",u.target.files[0]);try{await ue.backups.upload(c,{requestKey:j_}),t(2,o=!1),i("success"),Rt("Successfully uploaded a new backup.")}catch(y){y.isAbort||(t(2,o=!1),(g=(h=(_=y.response)==null?void 0:_.data)==null?void 0:h.file)!=null&&g.message?ss(y.response.data.file.message):ue.error(y))}}As(()=>{ue.cancelRequest(j_)});const a=()=>l==null?void 0:l.click();function f(u){ne[u?"unshift":"push"](()=>{l=u,t(1,l)})}return n.$$set=u=>{"class"in u&&t(0,s=u.class)},[s,l,o,r,a,f]}class fI extends be{constructor(e){super(),ge(this,e,aI,rI,pe,{class:0})}}function uI(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 cI(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 V_(n){var B,K,J;let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T,M,E;t=new ce({props:{class:"form-field form-field-toggle m-t-base m-b-0",$$slots:{default:[dI,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});let D=n[2]&&z_(n);function I(X){n[24](X)}function P(X){n[25](X)}function F(X){n[26](X)}let N={toggleLabel:"Store backups in S3 storage",testFilesystem:"backups",configKey:"backups.s3",originalConfig:(B=n[0].backups)==null?void 0:B.s3};n[1].backups.s3!==void 0&&(N.config=n[1].backups.s3),n[7]!==void 0&&(N.isTesting=n[7]),n[8]!==void 0&&(N.testError=n[8]),r=new S1({props:N}),ne.push(()=>de(r,"config",I)),ne.push(()=>de(r,"isTesting",P)),ne.push(()=>de(r,"testError",F));let R=((J=(K=n[1].backups)==null?void 0:K.s3)==null?void 0:J.enabled)&&!n[9]&&!n[5]&&H_(n),q=n[9]&&B_(n);return{c(){e=v("form"),z(t.$$.fragment),i=O(),D&&D.c(),s=O(),l=v("div"),o=O(),z(r.$$.fragment),c=O(),d=v("div"),m=v("div"),_=O(),R&&R.c(),h=O(),q&&q.c(),g=O(),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=C=!n[9]||n[5],Q(y,"btn-loading",n[5]),p(d,"class","flex"),p(e,"class","block"),p(e,"autocomplete","off")},m(X,G){w(X,e,G),j(t,e,null),b(e,i),D&&D.m(e,null),b(e,s),b(e,l),b(e,o),j(r,e,null),b(e,c),b(e,d),b(d,m),b(d,_),R&&R.m(d,null),b(d,h),q&&q.m(d,null),b(d,g),b(d,y),b(y,S),T=!0,M||(E=[Y(y,"click",n[28]),Y(e,"submit",Xe(n[11]))],M=!0)},p(X,G){var te,Oe,Pe;const fe={};G[0]&4|G[1]&3&&(fe.$$scope={dirty:G,ctx:X}),t.$set(fe),X[2]?D?(D.p(X,G),G[0]&4&&A(D,1)):(D=z_(X),D.c(),A(D,1),D.m(e,s)):D&&(re(),L(D,1,1,()=>{D=null}),ae());const ee={};G[0]&1&&(ee.originalConfig=(te=X[0].backups)==null?void 0:te.s3),!a&&G[0]&2&&(a=!0,ee.config=X[1].backups.s3,_e(()=>a=!1)),!f&&G[0]&128&&(f=!0,ee.isTesting=X[7],_e(()=>f=!1)),!u&&G[0]&256&&(u=!0,ee.testError=X[8],_e(()=>u=!1)),r.$set(ee),(Pe=(Oe=X[1].backups)==null?void 0:Oe.s3)!=null&&Pe.enabled&&!X[9]&&!X[5]?R?R.p(X,G):(R=H_(X),R.c(),R.m(d,h)):R&&(R.d(1),R=null),X[9]?q?q.p(X,G):(q=B_(X),q.c(),q.m(d,g)):q&&(q.d(1),q=null),(!T||G[0]&544&&C!==(C=!X[9]||X[5]))&&(y.disabled=C),(!T||G[0]&32)&&Q(y,"btn-loading",X[5])},i(X){T||(A(t.$$.fragment,X),A(D),A(r.$$.fragment,X),X&&Ge(()=>{T&&($||($=Re(e,tt,{duration:150},!0)),$.run(1))}),T=!0)},o(X){L(t.$$.fragment,X),L(D),L(r.$$.fragment,X),X&&($||($=Re(e,tt,{duration:150},!1)),$.run(0)),T=!1},d(X){X&&k(e),V(t),D&&D.d(),V(r),R&&R.d(),q&&q.d(),X&&$&&$.end(),M=!1,Ce(E)}}}function dI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=U("Enable auto backups"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(s,"for",o=n[31])},m(f,u){w(f,e,u),e.checked=n[2],w(f,i,u),w(f,s,u),b(s,l),r||(a=Y(e,"change",n[17]),r=!0)},p(f,u){u[1]&1&&t!==(t=f[31])&&p(e,"id",t),u[0]&4&&(e.checked=f[2]),u[1]&1&&o!==(o=f[31])&&p(s,"for",o)},d(f){f&&k(e),f&&k(i),f&&k(s),r=!1,a()}}}function z_(n){let e,t,i,s,l,o,r,a,f;return s=new ce({props:{class:"form-field required",name:"backups.cron",$$slots:{default:[mI,({uniqueId:u})=>({31:u}),({uniqueId:u})=>[0,u?1:0]]},$$scope:{ctx:n}}}),r=new ce({props:{class:"form-field required",name:"backups.cronMaxKeep",$$slots:{default:[hI,({uniqueId:u})=>({31:u}),({uniqueId:u})=>[0,u?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=O(),o=v("div"),z(r.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(t,"class","grid p-t-base p-b-sm"),p(e,"class","block")},m(u,c){w(u,e,c),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),f=!0},p(u,c){const d={};c[0]&3|c[1]&3&&(d.$$scope={dirty:c,ctx:u}),s.$set(d);const m={};c[0]&2|c[1]&3&&(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(e,tt,{duration:150},!0)),a.run(1))}),f=!0)},o(u){L(s.$$.fragment,u),L(r.$$.fragment,u),u&&(a||(a=Re(e,tt,{duration:150},!1)),a.run(0)),f=!1},d(u){u&&k(e),V(s),V(r),u&&a&&a.end()}}}function pI(n){let e,t,i,s,l,o,r,a,f;return{c(){e=v("button"),e.innerHTML='Every day at 00:00h',t=O(),i=v("button"),i.innerHTML='Every sunday at 00:00h',s=O(),l=v("button"),l.innerHTML='Every Mon and Wed at 00:00h',o=O(),r=v("button"),r.innerHTML='Every first day of the month at 00:00h',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(u,c){w(u,e,c),w(u,t,c),w(u,i,c),w(u,s,c),w(u,l,c),w(u,o,c),w(u,r,c),a||(f=[Y(e,"click",n[19]),Y(i,"click",n[20]),Y(l,"click",n[21]),Y(r,"click",n[22])],a=!0)},p:x,d(u){u&&k(e),u&&k(t),u&&k(i),u&&k(s),u&&k(l),u&&k(o),u&&k(r),a=!1,Ce(f)}}}function mI(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$;return h=new Nn({props:{class:"dropdown dropdown-nowrap dropdown-right",$$slots:{default:[pI]},$$scope:{ctx:n}}}),{c(){var T,M;e=v("label"),t=U("Cron expression"),s=O(),l=v("input"),a=O(),f=v("div"),u=v("button"),c=v("span"),c.textContent="Presets",d=O(),m=v("i"),_=O(),z(h.$$.fragment),g=O(),y=v("div"),y.innerHTML=`

    Supports numeric list, steps and ranges. The timezone is in - UTC.

    `,p(e,"for",i=n[31]),l.required=!0,p(l,"type","text"),p(l,"id",o=n[31]),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 E,D;w(T,e,M),b(e,t),w(T,s,M),w(T,l,M),oe(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,_),j(h,u,null),w(T,g,M),w(T,y,M),S=!0,(D=(E=n[0])==null?void 0:E.backups)!=null&&D.cron||l.focus(),C||($=Y(l,"input",n[18]),C=!0)},p(T,M){var D,I;(!S||M[1]&1&&i!==(i=T[31]))&&p(e,"for",i),(!S||M[1]&1&&o!==(o=T[31]))&&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&&oe(l,T[1].backups.cron);const E={};M[0]&2|M[1]&2&&(E.$$scope={dirty:M,ctx:T}),h.$set(E)},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),V(h),T&&k(g),T&&k(y),C=!1,$()}}}function hI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max @auto backups to keep"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),p(l,"min","1")},m(f,u){w(f,e,u),b(e,t),w(f,s,u),w(f,l,u),oe(l,n[1].backups.cronMaxKeep),r||(a=Y(l,"input",n[23]),r=!0)},p(f,u){u[1]&1&&i!==(i=f[31])&&p(e,"for",i),u[1]&1&&o!==(o=f[31])&&p(l,"id",o),u[0]&2&&pt(l.value)!==f[1].backups.cronMaxKeep&&oe(l,f[1].backups.cronMaxKeep)},d(f){f&&k(e),f&&k(s),f&&k(l),r=!1,a()}}}function H_(n){let e;function t(l,o){return l[7]?bI:l[8]?gI:_I}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 _I(n){let e;return{c(){e=v("div"),e.innerHTML=` - S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function gI(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` - Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Se(t=je.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Dt(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 bI(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function B_(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[27]),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 vI(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S,C,$,T,M,E,D,I,P,F;m=new Wo({props:{class:"btn-sm",tooltip:"Refresh"}}),m.$on("refresh",n[13]),h=new fI({props:{class:"btn-sm"}}),h.$on("success",n[13]);let N={};y=new oI({props:N}),n[15](y);function R(J,X){return J[6]?cI:uI}let q=R(n),B=q(n),K=n[6]&&!n[4]&&V_(n);return{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=U(n[10]),r=O(),a=v("div"),f=v("div"),u=v("div"),c=v("span"),c.textContent="Backup and restore your PocketBase data",d=O(),z(m.$$.fragment),_=O(),z(h.$$.fragment),g=O(),z(y.$$.fragment),S=O(),C=v("hr"),$=O(),T=v("button"),M=v("span"),M.textContent="Backups options",E=O(),B.c(),D=O(),K&&K.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-10"),p(M,"class","txt"),p(T,"type","button"),p(T,"class","btn btn-secondary"),T.disabled=n[4],Q(T,"btn-loading",n[4]),p(f,"class","panel"),p(f,"autocomplete","off"),p(a,"class","wrapper")},m(J,X){w(J,e,X),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(J,r,X),w(J,a,X),b(a,f),b(f,u),b(u,c),b(u,d),j(m,u,null),b(u,_),j(h,u,null),b(f,g),j(y,f,null),b(f,S),b(f,C),b(f,$),b(f,T),b(T,M),b(T,E),B.m(T,null),b(f,D),K&&K.m(f,null),I=!0,P||(F=[Y(T,"click",n[16]),Y(f,"submit",Xe(n[11]))],P=!0)},p(J,X){(!I||X[0]&1024)&&se(o,J[10]);const G={};y.$set(G),q!==(q=R(J))&&(B.d(1),B=q(J),B&&(B.c(),B.m(T,null))),(!I||X[0]&16)&&(T.disabled=J[4]),(!I||X[0]&16)&&Q(T,"btn-loading",J[4]),J[6]&&!J[4]?K?(K.p(J,X),X[0]&80&&A(K,1)):(K=V_(J),K.c(),A(K,1),K.m(f,null)):K&&(re(),L(K,1,1,()=>{K=null}),ae())},i(J){I||(A(m.$$.fragment,J),A(h.$$.fragment,J),A(y.$$.fragment,J),A(K),I=!0)},o(J){L(m.$$.fragment,J),L(h.$$.fragment,J),L(y.$$.fragment,J),L(K),I=!1},d(J){J&&k(e),J&&k(r),J&&k(a),V(m),V(h),n[15](null),V(y),B.d(),K&&K.d(),P=!1,Ce(F)}}}function yI(n){let e,t,i,s;return e=new Mi({}),i=new wn({props:{$$slots:{default:[vI]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=O(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&2047|o[1]&2&&(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){V(e,l),l&&k(t),V(i,l)}}}function kI(n,e,t){let i,s;We(n,Et,X=>t(10,s=X)),nn(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 X=await ue.settings.getAll()||{};y(X)}catch(X){ue.error(X)}t(4,a=!1)}async function g(){if(!(f||!i)){t(5,f=!0);try{const X=await ue.settings.update(H.filterRedactedProps(r));await C(),y(X),Rt("Successfully saved application settings.")}catch(X){ue.error(X)}t(5,f=!1)}}function y(X={}){t(1,r={backups:(X==null?void 0:X.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 C(){return l==null?void 0:l.loadBackups()}function $(X){ne[X?"unshift":"push"](()=>{l=X,t(3,l)})}const T=()=>t(6,d=!d);function M(){c=this.checked,t(2,c)}function E(){r.backups.cron=this.value,t(1,r),t(2,c)}const D=()=>{t(1,r.backups.cron="0 0 * * *",r)},I=()=>{t(1,r.backups.cron="0 0 * * 0",r)},P=()=>{t(1,r.backups.cron="0 0 * * 1,3",r)},F=()=>{t(1,r.backups.cron="0 0 1 * *",r)};function N(){r.backups.cronMaxKeep=pt(this.value),t(1,r),t(2,c)}function R(X){n.$$.not_equal(r.backups.s3,X)&&(r.backups.s3=X,t(1,r),t(2,c))}function q(X){m=X,t(7,m)}function B(X){_=X,t(8,_)}const K=()=>S(),J=()=>g();return n.$$.update=()=>{var X;n.$$.dirty[0]&1&&t(14,u=JSON.stringify(o)),n.$$.dirty[0]&6&&!c&&(X=r==null?void 0:r.backups)!=null&&X.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,C,u,$,T,M,E,D,I,P,F,N,R,q,B,K,J]}class wI extends be{constructor(e){super(),ge(this,e,kI,yI,pe,{},null,[-1,-1])}}const Vt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ji("/"):!0}],SI={"/login":Pt({component:$D,conditions:Vt.concat([n=>!ue.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Pt({asyncComponent:()=>lt(()=>import("./PageAdminRequestPasswordReset-52406f79.js"),[],import.meta.url),conditions:Vt.concat([n=>!ue.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Pt({asyncComponent:()=>lt(()=>import("./PageAdminConfirmPasswordReset-d17f2063.js"),[],import.meta.url),conditions:Vt.concat([n=>!ue.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Pt({component:JE,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Pt({component:D4,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Pt({component:PD,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Pt({component:bD,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Pt({component:kA,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Pt({component:HA,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Pt({component:l8,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Pt({component:m8,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Pt({component:y8,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Pt({component:j8,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/backups":Pt({component:wI,conditions:Vt.concat([n=>ue.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Pt({asyncComponent:()=>lt(()=>import("./PageRecordConfirmPasswordReset-73d1f6d0.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Pt({asyncComponent:()=>lt(()=>import("./PageRecordConfirmPasswordReset-73d1f6d0.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Pt({asyncComponent:()=>lt(()=>import("./PageRecordConfirmVerification-3c5a92b7.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Pt({asyncComponent:()=>lt(()=>import("./PageRecordConfirmVerification-3c5a92b7.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Pt({asyncComponent:()=>lt(()=>import("./PageRecordConfirmEmailChange-6b1f497a.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Pt({asyncComponent:()=>lt(()=>import("./PageRecordConfirmEmailChange-6b1f497a.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":Pt({asyncComponent:()=>lt(()=>import("./PageOAuth2Redirect-aa540155.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"*":Pt({component:Xy,userData:{showAppSidebar:!1}})};function $I(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),f=e.top+e.height*r/t.height-(t.top+r),{delay:u=0,duration:c=m=>Math.sqrt(m)*120,easing:d=Bo}=i;return{delay:u,duration:Dt(c)?c(Math.sqrt(a*a+f*f)):c,easing:d,css:(m,_)=>{const h=_*a,g=_*f,y=m+_*e.width/t.width,S=m+_*e.height/t.height;return`transform: ${l} translate(${h}px, ${g}px) scale(${y}, ${S});`}}}function U_(n,e,t){const i=n.slice();return i[2]=e[t],i}function CI(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function TI(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function MI(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function OI(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function W_(n,e){let t,i,s,l,o=e[2].message+"",r,a,f,u,c,d,m,_=x,h,g,y;function S(M,E){return M[2].type==="info"?OI:M[2].type==="success"?MI:M[2].type==="warning"?TI:CI}let C=S(e),$=C(e);function T(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),$.c(),s=O(),l=v("div"),r=U(o),a=O(),f=v("button"),f.innerHTML='',u=O(),p(i,"class","icon"),p(l,"class","content"),p(f,"type","button"),p(f,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,E){w(M,t,E),b(t,i),$.m(i,null),b(t,s),b(t,l),b(l,r),b(t,a),b(t,f),b(t,u),h=!0,g||(y=Y(f,"click",Xe(T)),g=!0)},p(M,E){e=M,C!==(C=S(e))&&($.d(1),$=C(e),$&&($.c(),$.m(i,null))),(!h||E&1)&&o!==(o=e[2].message+"")&&se(r,o),(!h||E&1)&&Q(t,"alert-info",e[2].type=="info"),(!h||E&1)&&Q(t,"alert-success",e[2].type=="success"),(!h||E&1)&&Q(t,"alert-danger",e[2].type=="error"),(!h||E&1)&&Q(t,"alert-warning",e[2].type=="warning")},r(){m=t.getBoundingClientRect()},f(){K1(t),_(),eg(t,m)},a(){_(),_=Y1(t,m,$I,{duration:150})},i(M){h||(Ge(()=>{h&&(d&&d.end(1),c=ig(t,tt,{duration:150}),c.start())}),h=!0)},o(M){c&&c.invalidate(),d=_a(t,Kr,{duration:150}),h=!1},d(M){M&&k(t),$.d(),M&&d&&d.end(),g=!1,y()}}}function EI(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>ub(l)]}class AI extends be{constructor(e){super(),ge(this,e,DI,EI,pe,{})}}function II(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=U(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){w(l,e,o),b(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&se(i,t)},d(l){l&&k(e)}}}function LI(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=O(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],Q(s,"btn-loading",n[2])},m(a,f){w(a,e,f),b(e,t),w(a,i,f),w(a,s,f),b(s,l),e.focus(),o||(r=[Y(e,"click",n[4]),Y(s,"click",n[5])],o=!0)},p(a,f){f&4&&(e.disabled=a[2]),f&4&&(s.disabled=a[2]),f&4&&Q(s,"btn-loading",a[2])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,Ce(r)}}}function PI(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[LI],header:[II]},$$scope:{ctx:n}};return e=new ln({props:i}),n[6](e),e.$on("hide",n[7]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(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[6](null),V(e,s)}}}function FI(n,e,t){let i;We(n,ef,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function f(c){ne[c?"unshift":"push"](()=>{s=c,t(0,s)})}const u=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await sn(),t(3,o=!1),m1()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,f,u]}class NI extends be{constructor(e){super(),ge(this,e,FI,PI,pe,{})}}function Y_(n){let e,t,i,s,l,o,r,a,f,u,c,d,m,_,h,g,y,S;return h=new Nn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[RI]},$$scope:{ctx:n}}}),{c(){var C;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=O(),s=v("nav"),l=v("a"),l.innerHTML='',o=O(),r=v("a"),r.innerHTML='',a=O(),f=v("a"),f.innerHTML='',u=O(),c=v("figure"),d=v("img"),_=O(),z(h.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(f,"href","/settings"),p(f,"class","menu-item"),p(f,"aria-label","Settings"),p(s,"class","main-menu"),_n(d.src,m="./images/avatars/avatar"+(((C=n[0])==null?void 0:C.avatar)||0)+".svg")||p(d,"src",m),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(C,$){w(C,e,$),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,f),b(e,u),b(e,c),b(c,d),b(c,_),j(h,c,null),g=!0,y||(S=[Se(an.call(null,t)),Se(an.call(null,l)),Se(zn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Se(je.call(null,l,{text:"Collections",position:"right"})),Se(an.call(null,r)),Se(zn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Se(je.call(null,r,{text:"Logs",position:"right"})),Se(an.call(null,f)),Se(zn.call(null,f,{path:"/settings/?.*",className:"current-route"})),Se(je.call(null,f,{text:"Settings",position:"right"}))],y=!0)},p(C,$){var M;(!g||$&1&&!_n(d.src,m="./images/avatars/avatar"+(((M=C[0])==null?void 0:M.avatar)||0)+".svg"))&&p(d,"src",m);const T={};$&4096&&(T.$$scope={dirty:$,ctx:C}),h.$set(T)},i(C){g||(A(h.$$.fragment,C),g=!0)},o(C){L(h.$$.fragment,C),g=!1},d(C){C&&k(e),V(h),y=!1,Ce(S)}}}function RI(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` - Manage admins`,t=O(),i=v("hr"),s=O(),l=v("button"),l.innerHTML=` - Logout`,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=[Se(an.call(null,e)),Y(l,"click",n[7])],o=!0)},p:x,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,Ce(r)}}}function K_(n){let e,t,i;return t=new lf({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:H.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p:x,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function qI(n){var g;let e,t,i,s,l,o,r,a,f,u,c,d,m;document.title=e=H.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let _=((g=n[0])==null?void 0:g.id)&&n[1]&&Y_(n);o=new o0({props:{routes:SI}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new AI({}),u=new NI({});let h=n[1]&&!n[2]&&K_(n);return{c(){t=O(),i=v("div"),_&&_.c(),s=O(),l=v("div"),z(o.$$.fragment),r=O(),z(a.$$.fragment),f=O(),z(u.$$.fragment),c=O(),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),j(o,l,null),b(l,r),j(a,l,null),w(y,f,S),j(u,y,S),w(y,c,S),h&&h.m(y,S),w(y,d,S),m=!0},p(y,[S]){var C;(!m||S&24)&&e!==(e=H.joinNonEmpty([y[4],y[3],"PocketBase"]," - "))&&(document.title=e),(C=y[0])!=null&&C.id&&y[1]?_?(_.p(y,S),S&3&&A(_,1)):(_=Y_(y),_.c(),A(_,1),_.m(i,s)):_&&(re(),L(_,1,1,()=>{_=null}),ae()),y[1]&&!y[2]?h?(h.p(y,S),S&6&&A(h,1)):(h=K_(y),h.c(),A(h,1),h.m(d.parentNode,d)):h&&(re(),L(h,1,1,()=>{h=null}),ae())},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(),V(o),V(a),y&&k(f),V(u,y),y&&k(c),h&&h.d(y),y&&k(d)}}}function jI(n,e,t){let i,s,l,o;We(n,Ts,h=>t(10,i=h)),We(n,yo,h=>t(3,s=h)),We(n,Ea,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,C;((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=(C=h==null?void 0:h.detail)==null?void 0:C.location,nn(Et,o="",o),en({}),m1())}function c(){ji("/")}async function d(){var h,g;if(l!=null&&l.id)try{const y=await ue.settings.getAll({$cancelKey:"initialAppSettings"});nn(yo,s=((h=y==null?void 0:y.meta)==null?void 0:h.appName)||"",s),nn(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 VI extends be{constructor(e){super(),ge(this,e,jI,qI,pe,{})}}new VI({target:document.getElementById("app")});export{Ce as A,Rt as B,H as C,ji as D,ye as E,db as F,Ro as G,so as H,Kt as I,We as J,ni as K,yt as L,ne as M,d1 as N,vt as O,os as P,Ht as Q,_t as R,be as S,Nr as T,L as a,O as b,z as c,V as d,v as e,p as f,w as g,b as h,ge as i,Se as j,re as k,an as l,j as m,ae as n,k as o,ue as p,ce as q,Q as r,pe as s,A as t,Y as u,Xe as v,U as w,se as x,x as y,oe as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 39ecf66e..0bf3fa44 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -45,7 +45,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/package-lock.json b/ui/package-lock.json index 6145e74d..5d8e56c1 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -25,12 +25,25 @@ "pocketbase": "0.18.0-rc", "prismjs": "^1.28.0", "sass": "^1.45.0", - "svelte": "^3.44.0", - "svelte-flatpickr": "^3.2.6", + "svelte": "^4.0.0", + "svelte-flatpickr": "^3.3.3", "svelte-spa-router": "^3.2.0", "vite": "^4.0.4" } }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@codemirror/autocomplete": { "version": "6.9.0", "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.9.0.tgz", @@ -50,9 +63,9 @@ } }, "node_modules/@codemirror/commands": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.2.4.tgz", - "integrity": "sha512-42lmDqVH0ttfilLShReLXsDfASKLXzfyC36bzwcqzox9PlHulMcsUOfHXNo2X2aFMVNUoQ7j+d4q5bnfseYoOA==", + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.2.5.tgz", + "integrity": "sha512-dSi7ow2P2YgPBZflR9AJoaTHvqmeGIgkhignYMd5zK5y6DANTvxKxp6eMEpIDUJkRAaOY/TFZ4jP1ADIO/GLVA==", "dev": true, "dependencies": { "@codemirror/language": "^6.0.0", @@ -75,9 +88,9 @@ } }, "node_modules/@codemirror/lang-html": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.5.tgz", - "integrity": "sha512-dUCSxkIw2G+chaUfw3Gfu5kkN83vJQN8gfQDp9iEHsIZluMJA0YJveT12zg/28BJx+uPsbQ6VimKCgx3oJrZxA==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.6.tgz", + "integrity": "sha512-E4C8CVupBksXvgLSme/zv31x91g06eZHSph7NczVxZW+/K+3XgJGWNT//2WLzaKSBoxpAjaOi5ZnPU1SHhjh3A==", "dev": true, "dependencies": { "@codemirror/autocomplete": "^6.0.0", @@ -85,23 +98,23 @@ "@codemirror/lang-javascript": "^6.0.0", "@codemirror/language": "^6.4.0", "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.2.2", + "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/css": "^1.1.0", "@lezer/html": "^1.3.0" } }, "node_modules/@codemirror/lang-javascript": { - "version": "6.1.9", - "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.1.9.tgz", - "integrity": "sha512-z3jdkcqOEBT2txn2a87A0jSy6Te3679wg/U8QzMeftFt+4KA6QooMwfdFzJiuC3L6fXKfTXZcDocoaxMYfGz0w==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.1.tgz", + "integrity": "sha512-jlFOXTejVyiQCW3EQwvKH0m99bUYIw40oPmFjSX2VS78yzfe0HELZ+NEo9Yfo1MkGRpGlj3Gnu4rdxV1EnAs5A==", "dev": true, "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.6.0", "@codemirror/lint": "^6.0.0", "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", + "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/javascript": "^1.0.0" } @@ -153,9 +166,9 @@ } }, "node_modules/@codemirror/lint": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.4.0.tgz", - "integrity": "sha512-6VZ44Ysh/Zn07xrGkdtNfmHCbGSHZzFBdzWi0pbd7chAQ/iUcpLGX99NYRZTa7Ugqg4kEHCqiHhcZnH0gLIgSg==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.4.1.tgz", + "integrity": "sha512-2Hx945qKX7FBan5/gUdTM8fsMYrNG9clIgEcPXestbLVFAUyQYFAuju/5BMNf/PwgpVaX5pvRm4+ovjbp9D9gQ==", "dev": true, "dependencies": { "@codemirror/state": "^6.0.0", @@ -164,9 +177,9 @@ } }, "node_modules/@codemirror/search": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.1.tgz", - "integrity": "sha512-4jupk4JwkeVbrN2pStY74q6OJEYqwosB4koA66nyLeVedadtX9MHI38j2vbYmnfDGurDApP3OZO46MrWalcjiQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.2.tgz", + "integrity": "sha512-WRihpqd0l9cEh9J3IZe45Yi+Z5MfTsEXnyc3V7qXHP4ZYtIYpGOn+EJ7fyLIkyAm/8S6QIr7/mMISfAadf8zCg==", "dev": true, "dependencies": { "@codemirror/state": "^6.0.0", @@ -181,13 +194,13 @@ "dev": true }, "node_modules/@codemirror/view": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.16.0.tgz", - "integrity": "sha512-1Z2HkvkC3KR/oEZVuW9Ivmp8TWLzGEd8T8TA04TTwPvqogfkHBdYSlflytDOqmkUxM2d1ywTg7X2dU5mC+SXvg==", + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.17.1.tgz", + "integrity": "sha512-I5KVxsLbm1f56n9SUajLW0/AzMXYEZVvkiYahMw/yGl5gUjT2WquuKO39xUtiT4z/hNhGD7YuAEVPI8u0mncaQ==", "dev": true, "dependencies": { "@codemirror/state": "^6.1.4", - "style-mod": "^4.0.0", + "style-mod": "^4.1.0", "w3c-keyname": "^2.2.4" } }, @@ -543,12 +556,54 @@ "node": ">=12" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@lezer/common": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.4.tgz", @@ -586,9 +641,9 @@ } }, "node_modules/@lezer/javascript": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.5.tgz", - "integrity": "sha512-FmBUHz8K1V22DgjTd6SrIG9owbzOYZ1t3rY6vGEmw+e2RVBd7sqjM8uXEVRFmfxKFn1Mx2ABJehHjrN3G2ZpmA==", + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.7.tgz", + "integrity": "sha512-OVWlK0YEi7HM+9JRWtRkir8qvcg0/kVYg2TAMHlVtl6DU1C9yK1waEOLBMztZsV/axRJxsqfJKhzYz+bxZme5g==", "dev": true, "dependencies": { "@lezer/highlight": "^1.1.3", @@ -662,6 +717,24 @@ "rollup-plugin-execute": "^1.1.1" } }, + "node_modules/@types/estree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", + "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -675,6 +748,24 @@ "node": ">= 8" } }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/axobject-query": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", + "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -739,12 +830,38 @@ "fsevents": "~2.3.2" } }, + "node_modules/code-red": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", + "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15", + "@types/estree": "^1.0.1", + "acorn": "^8.10.0", + "estree-walker": "^3.0.3", + "periscopic": "^3.1.0" + } + }, "node_modules/crelt": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", "dev": true }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -771,6 +888,15 @@ "node": ">=0.10.0" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/esbuild": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", @@ -808,6 +934,15 @@ "@esbuild/win32-x64": "0.18.20" } }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -853,9 +988,9 @@ } }, "node_modules/immutable": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.2.tgz", - "integrity": "sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", "dev": true }, "node_modules/is-binary-path": { @@ -900,6 +1035,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-reference": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.1.tgz", + "integrity": "sha512-baJJdQLiYaJdvFbJqXrcGv3WU3QCzBlUcI5QhbesIm6/xPsvmO+2CDoi/GMOFBQEQm+PXkwOPrp9KK5ozZsp2w==", + "dev": true, + "dependencies": { + "@types/estree": "*" + } + }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -909,6 +1053,12 @@ "node": ">=6" } }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "dev": true + }, "node_modules/luxon": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/luxon/-/luxon-2.5.2.tgz", @@ -930,6 +1080,12 @@ "node": ">=12" } }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -963,6 +1119,17 @@ "node": ">=0.10.0" } }, + "node_modules/periscopic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", + "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^3.0.0", + "is-reference": "^3.0.0" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -988,9 +1155,9 @@ "dev": true }, "node_modules/postcss": { - "version": "8.4.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", - "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", + "version": "8.4.29", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", + "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", "dev": true, "funding": [ { @@ -1094,30 +1261,45 @@ } }, "node_modules/style-mod": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.3.tgz", - "integrity": "sha512-78Jv8kYJdjbvRwwijtCevYADfsI0lGzYJe4mMFdceO8l75DFFDoqBhR1jVDicDRRaX4//g1u9wKeo+ztc2h1Rw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.0.tgz", + "integrity": "sha512-Ca5ib8HrFn+f+0n4N4ScTIA9iTOQ7MaGS1ylHcoVqW9J7w2w8PzN6g9gKmTYgGEBH8e120+RCmhpje6jC5uGWA==", "dev": true }, "node_modules/svelte": { - "version": "3.59.2", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz", - "integrity": "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.0.tgz", + "integrity": "sha512-kVsdPjDbLrv74SmLSUzAsBGquMs4MPgWGkGLpH+PjOYnFOziAvENVzgJmyOCV2gntxE32aNm8/sqNKD6LbIpeQ==", "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.1", + "@jridgewell/sourcemap-codec": "^1.4.15", + "@jridgewell/trace-mapping": "^0.3.18", + "acorn": "^8.9.0", + "aria-query": "^5.3.0", + "axobject-query": "^3.2.1", + "code-red": "^1.0.3", + "css-tree": "^2.3.1", + "estree-walker": "^3.0.3", + "is-reference": "^3.0.1", + "locate-character": "^3.0.0", + "magic-string": "^0.30.0", + "periscopic": "^3.1.0" + }, "engines": { - "node": ">= 8" + "node": ">=16" } }, "node_modules/svelte-flatpickr": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/svelte-flatpickr/-/svelte-flatpickr-3.3.2.tgz", - "integrity": "sha512-VNJLYyLRDplI63oWX5hJylzAJc2VhTh3z9SNecfjtuPZmP6FZPpg9Fw7rXpkEV2DPovIWj2PtaVxB6Kp9r423w==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/svelte-flatpickr/-/svelte-flatpickr-3.3.3.tgz", + "integrity": "sha512-ZollniPUOXyRrY+ZMJvp8yovYExOuPed5bDx4fG0SRwAaQ88o9PP/CiW21PR3ndt4qDvu/LMpxkaSbp2obD0tg==", "dev": true, "dependencies": { "flatpickr": "^4.5.2" }, "peerDependencies": { - "svelte": "^3.31.0" + "svelte": ">= 3.31.0 < 5.0" } }, "node_modules/svelte-hmr": { @@ -1233,6 +1415,16 @@ } }, "dependencies": { + "@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, "@codemirror/autocomplete": { "version": "6.9.0", "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.9.0.tgz", @@ -1246,9 +1438,9 @@ } }, "@codemirror/commands": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.2.4.tgz", - "integrity": "sha512-42lmDqVH0ttfilLShReLXsDfASKLXzfyC36bzwcqzox9PlHulMcsUOfHXNo2X2aFMVNUoQ7j+d4q5bnfseYoOA==", + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.2.5.tgz", + "integrity": "sha512-dSi7ow2P2YgPBZflR9AJoaTHvqmeGIgkhignYMd5zK5y6DANTvxKxp6eMEpIDUJkRAaOY/TFZ4jP1ADIO/GLVA==", "dev": true, "requires": { "@codemirror/language": "^6.0.0", @@ -1271,9 +1463,9 @@ } }, "@codemirror/lang-html": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.5.tgz", - "integrity": "sha512-dUCSxkIw2G+chaUfw3Gfu5kkN83vJQN8gfQDp9iEHsIZluMJA0YJveT12zg/28BJx+uPsbQ6VimKCgx3oJrZxA==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.6.tgz", + "integrity": "sha512-E4C8CVupBksXvgLSme/zv31x91g06eZHSph7NczVxZW+/K+3XgJGWNT//2WLzaKSBoxpAjaOi5ZnPU1SHhjh3A==", "dev": true, "requires": { "@codemirror/autocomplete": "^6.0.0", @@ -1281,23 +1473,23 @@ "@codemirror/lang-javascript": "^6.0.0", "@codemirror/language": "^6.4.0", "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.2.2", + "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/css": "^1.1.0", "@lezer/html": "^1.3.0" } }, "@codemirror/lang-javascript": { - "version": "6.1.9", - "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.1.9.tgz", - "integrity": "sha512-z3jdkcqOEBT2txn2a87A0jSy6Te3679wg/U8QzMeftFt+4KA6QooMwfdFzJiuC3L6fXKfTXZcDocoaxMYfGz0w==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.1.tgz", + "integrity": "sha512-jlFOXTejVyiQCW3EQwvKH0m99bUYIw40oPmFjSX2VS78yzfe0HELZ+NEo9Yfo1MkGRpGlj3Gnu4rdxV1EnAs5A==", "dev": true, "requires": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.6.0", "@codemirror/lint": "^6.0.0", "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", + "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/javascript": "^1.0.0" } @@ -1349,9 +1541,9 @@ } }, "@codemirror/lint": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.4.0.tgz", - "integrity": "sha512-6VZ44Ysh/Zn07xrGkdtNfmHCbGSHZzFBdzWi0pbd7chAQ/iUcpLGX99NYRZTa7Ugqg4kEHCqiHhcZnH0gLIgSg==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.4.1.tgz", + "integrity": "sha512-2Hx945qKX7FBan5/gUdTM8fsMYrNG9clIgEcPXestbLVFAUyQYFAuju/5BMNf/PwgpVaX5pvRm4+ovjbp9D9gQ==", "dev": true, "requires": { "@codemirror/state": "^6.0.0", @@ -1360,9 +1552,9 @@ } }, "@codemirror/search": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.1.tgz", - "integrity": "sha512-4jupk4JwkeVbrN2pStY74q6OJEYqwosB4koA66nyLeVedadtX9MHI38j2vbYmnfDGurDApP3OZO46MrWalcjiQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.2.tgz", + "integrity": "sha512-WRihpqd0l9cEh9J3IZe45Yi+Z5MfTsEXnyc3V7qXHP4ZYtIYpGOn+EJ7fyLIkyAm/8S6QIr7/mMISfAadf8zCg==", "dev": true, "requires": { "@codemirror/state": "^6.0.0", @@ -1377,13 +1569,13 @@ "dev": true }, "@codemirror/view": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.16.0.tgz", - "integrity": "sha512-1Z2HkvkC3KR/oEZVuW9Ivmp8TWLzGEd8T8TA04TTwPvqogfkHBdYSlflytDOqmkUxM2d1ywTg7X2dU5mC+SXvg==", + "version": "6.17.1", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.17.1.tgz", + "integrity": "sha512-I5KVxsLbm1f56n9SUajLW0/AzMXYEZVvkiYahMw/yGl5gUjT2WquuKO39xUtiT4z/hNhGD7YuAEVPI8u0mncaQ==", "dev": true, "requires": { "@codemirror/state": "^6.1.4", - "style-mod": "^4.0.0", + "style-mod": "^4.1.0", "w3c-keyname": "^2.2.4" } }, @@ -1541,12 +1733,45 @@ "dev": true, "optional": true }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, "@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, + "@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "@lezer/common": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.4.tgz", @@ -1584,9 +1809,9 @@ } }, "@lezer/javascript": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.5.tgz", - "integrity": "sha512-FmBUHz8K1V22DgjTd6SrIG9owbzOYZ1t3rY6vGEmw+e2RVBd7sqjM8uXEVRFmfxKFn1Mx2ABJehHjrN3G2ZpmA==", + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.7.tgz", + "integrity": "sha512-OVWlK0YEi7HM+9JRWtRkir8qvcg0/kVYg2TAMHlVtl6DU1C9yK1waEOLBMztZsV/axRJxsqfJKhzYz+bxZme5g==", "dev": true, "requires": { "@lezer/highlight": "^1.1.3", @@ -1645,6 +1870,18 @@ "rollup-plugin-execute": "^1.1.1" } }, + "@types/estree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", + "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", + "dev": true + }, + "acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true + }, "anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -1655,6 +1892,24 @@ "picomatch": "^2.0.4" } }, + "aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "requires": { + "dequal": "^2.0.3" + } + }, + "axobject-query": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", + "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", + "dev": true, + "requires": { + "dequal": "^2.0.3" + } + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1699,12 +1954,35 @@ "readdirp": "~3.6.0" } }, + "code-red": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", + "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.15", + "@types/estree": "^1.0.1", + "acorn": "^8.10.0", + "estree-walker": "^3.0.3", + "periscopic": "^3.1.0" + } + }, "crelt": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", "dev": true }, + "css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dev": true, + "requires": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1720,6 +1998,12 @@ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, + "dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true + }, "esbuild": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", @@ -1750,6 +2034,15 @@ "@esbuild/win32-x64": "0.18.20" } }, + "estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "requires": { + "@types/estree": "^1.0.0" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -1782,9 +2075,9 @@ } }, "immutable": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.2.tgz", - "integrity": "sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", "dev": true }, "is-binary-path": { @@ -1817,12 +2110,27 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-reference": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.1.tgz", + "integrity": "sha512-baJJdQLiYaJdvFbJqXrcGv3WU3QCzBlUcI5QhbesIm6/xPsvmO+2CDoi/GMOFBQEQm+PXkwOPrp9KK5ozZsp2w==", + "dev": true, + "requires": { + "@types/estree": "*" + } + }, "kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true }, + "locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "dev": true + }, "luxon": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/luxon/-/luxon-2.5.2.tgz", @@ -1838,6 +2146,12 @@ "@jridgewell/sourcemap-codec": "^1.4.15" } }, + "mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1856,6 +2170,17 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "periscopic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", + "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", + "dev": true, + "requires": { + "@types/estree": "^1.0.0", + "estree-walker": "^3.0.0", + "is-reference": "^3.0.0" + } + }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -1875,9 +2200,9 @@ "dev": true }, "postcss": { - "version": "8.4.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", - "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", + "version": "8.4.29", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", + "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", "dev": true, "requires": { "nanoid": "^3.3.6", @@ -1939,21 +2264,36 @@ "dev": true }, "style-mod": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.3.tgz", - "integrity": "sha512-78Jv8kYJdjbvRwwijtCevYADfsI0lGzYJe4mMFdceO8l75DFFDoqBhR1jVDicDRRaX4//g1u9wKeo+ztc2h1Rw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.0.tgz", + "integrity": "sha512-Ca5ib8HrFn+f+0n4N4ScTIA9iTOQ7MaGS1ylHcoVqW9J7w2w8PzN6g9gKmTYgGEBH8e120+RCmhpje6jC5uGWA==", "dev": true }, "svelte": { - "version": "3.59.2", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.59.2.tgz", - "integrity": "sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==", - "dev": true + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.0.tgz", + "integrity": "sha512-kVsdPjDbLrv74SmLSUzAsBGquMs4MPgWGkGLpH+PjOYnFOziAvENVzgJmyOCV2gntxE32aNm8/sqNKD6LbIpeQ==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.1", + "@jridgewell/sourcemap-codec": "^1.4.15", + "@jridgewell/trace-mapping": "^0.3.18", + "acorn": "^8.9.0", + "aria-query": "^5.3.0", + "axobject-query": "^3.2.1", + "code-red": "^1.0.3", + "css-tree": "^2.3.1", + "estree-walker": "^3.0.3", + "is-reference": "^3.0.1", + "locate-character": "^3.0.0", + "magic-string": "^0.30.0", + "periscopic": "^3.1.0" + } }, "svelte-flatpickr": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/svelte-flatpickr/-/svelte-flatpickr-3.3.2.tgz", - "integrity": "sha512-VNJLYyLRDplI63oWX5hJylzAJc2VhTh3z9SNecfjtuPZmP6FZPpg9Fw7rXpkEV2DPovIWj2PtaVxB6Kp9r423w==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/svelte-flatpickr/-/svelte-flatpickr-3.3.3.tgz", + "integrity": "sha512-ZollniPUOXyRrY+ZMJvp8yovYExOuPed5bDx4fG0SRwAaQ88o9PP/CiW21PR3ndt4qDvu/LMpxkaSbp2obD0tg==", "dev": true, "requires": { "flatpickr": "^4.5.2" diff --git a/ui/package.json b/ui/package.json index 45c6787d..70afa903 100644 --- a/ui/package.json +++ b/ui/package.json @@ -32,8 +32,8 @@ "pocketbase": "0.18.0-rc", "prismjs": "^1.28.0", "sass": "^1.45.0", - "svelte": "^3.44.0", - "svelte-flatpickr": "^3.2.6", + "svelte": "^4.0.0", + "svelte-flatpickr": "^3.3.3", "svelte-spa-router": "^3.2.0", "vite": "^4.0.4" } diff --git a/ui/src/components/admins/AdminUpsertPanel.svelte b/ui/src/components/admins/AdminUpsertPanel.svelte index a4274cec..eacfab6f 100644 --- a/ui/src/components/admins/AdminUpsertPanel.svelte +++ b/ui/src/components/admins/AdminUpsertPanel.svelte @@ -195,7 +195,7 @@ {#if isNew || changePasswordToggle}
    -
    +