diff --git a/ui/dist/assets/AuthMethodsDocs-0sXZLdUz.js b/ui/dist/assets/AuthMethodsDocs-ftvbZDKw.js similarity index 97% rename from ui/dist/assets/AuthMethodsDocs-0sXZLdUz.js rename to ui/dist/assets/AuthMethodsDocs-ftvbZDKw.js index 6e014989..96749d75 100644 --- a/ui/dist/assets/AuthMethodsDocs-0sXZLdUz.js +++ b/ui/dist/assets/AuthMethodsDocs-ftvbZDKw.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Be,s as Te,Q as Le,T as G,e as c,w as y,b as k,c as ae,f as h,g as u,h as a,m as ne,x as I,U as $e,V as Re,k as Se,W as Ue,n as Qe,t as J,a as N,o as d,d as ie,p as oe,C as je,r as O,u as qe,R as De}from"./index-C6KFFkct.js";import{F as Ee}from"./FieldsQueryParam-9HzYyPBO.js";function ye(n,s,l){const o=n.slice();return o[8]=s[l],o}function Me(n,s,l){const o=n.slice();return o[8]=s[l],o}function Ae(n,s){let l,o=s[8].code+"",p,b,i,f;function m(){return s[6](s[8])}return{key:n,first:null,c(){l=c("button"),p=y(o),b=k(),h(l,"class","tab-item"),O(l,"active",s[1]===s[8].code),this.first=l},m(v,w){u(v,l,w),a(l,p),a(l,b),i||(f=qe(l,"click",m),i=!0)},p(v,w){s=v,w&4&&o!==(o=s[8].code+"")&&I(p,o),w&6&&O(l,"active",s[1]===s[8].code)},d(v){v&&d(l),i=!1,f()}}}function Pe(n,s){let l,o,p,b;return o=new De({props:{content:s[8].body}}),{key:n,first:null,c(){l=c("div"),ae(o.$$.fragment),p=k(),h(l,"class","tab-item"),O(l,"active",s[1]===s[8].code),this.first=l},m(i,f){u(i,l,f),ne(o,l,null),a(l,p),b=!0},p(i,f){s=i;const m={};f&4&&(m.content=s[8].body),o.$set(m),(!b||f&6)&&O(l,"active",s[1]===s[8].code)},i(i){b||(J(o.$$.fragment,i),b=!0)},o(i){N(o.$$.fragment,i),b=!1},d(i){i&&d(l),ie(o)}}}function Fe(n){var ke,ge;let s,l,o=n[0].name+"",p,b,i,f,m,v,w,g=n[0].name+"",V,ce,W,M,z,L,K,A,D,re,E,R,ue,X,F=n[0].name+"",Y,de,Z,S,x,P,ee,fe,te,T,le,U,se,C,Q,$=[],me=new Map,pe,j,_=[],be=new Map,B;M=new Le({props:{js:` +import{S as Ce,i as Be,s as Te,Q as Le,T as G,e as c,w as y,b as k,c as ae,f as h,g as u,h as a,m as ne,x as I,U as $e,V as Re,k as Se,W as Ue,n as Qe,t as J,a as N,o as d,d as ie,p as oe,C as je,r as O,u as qe,R as De}from"./index-DzzLh2vW.js";import{F as Ee}from"./FieldsQueryParam-Rko0bQqM.js";function ye(n,s,l){const o=n.slice();return o[8]=s[l],o}function Me(n,s,l){const o=n.slice();return o[8]=s[l],o}function Ae(n,s){let l,o=s[8].code+"",p,b,i,f;function m(){return s[6](s[8])}return{key:n,first:null,c(){l=c("button"),p=y(o),b=k(),h(l,"class","tab-item"),O(l,"active",s[1]===s[8].code),this.first=l},m(v,w){u(v,l,w),a(l,p),a(l,b),i||(f=qe(l,"click",m),i=!0)},p(v,w){s=v,w&4&&o!==(o=s[8].code+"")&&I(p,o),w&6&&O(l,"active",s[1]===s[8].code)},d(v){v&&d(l),i=!1,f()}}}function Pe(n,s){let l,o,p,b;return o=new De({props:{content:s[8].body}}),{key:n,first:null,c(){l=c("div"),ae(o.$$.fragment),p=k(),h(l,"class","tab-item"),O(l,"active",s[1]===s[8].code),this.first=l},m(i,f){u(i,l,f),ne(o,l,null),a(l,p),b=!0},p(i,f){s=i;const m={};f&4&&(m.content=s[8].body),o.$set(m),(!b||f&6)&&O(l,"active",s[1]===s[8].code)},i(i){b||(J(o.$$.fragment,i),b=!0)},o(i){N(o.$$.fragment,i),b=!1},d(i){i&&d(l),ie(o)}}}function Fe(n){var ke,ge;let s,l,o=n[0].name+"",p,b,i,f,m,v,w,g=n[0].name+"",V,ce,W,M,z,L,K,A,D,re,E,R,ue,X,F=n[0].name+"",Y,de,Z,S,x,P,ee,fe,te,T,le,U,se,C,Q,$=[],me=new Map,pe,j,_=[],be=new Map,B;M=new Le({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/AuthRefreshDocs-BDIR7TiC.js b/ui/dist/assets/AuthRefreshDocs-iVy1WmRW.js similarity index 98% rename from ui/dist/assets/AuthRefreshDocs-BDIR7TiC.js rename to ui/dist/assets/AuthRefreshDocs-iVy1WmRW.js index 960a401c..414b402a 100644 --- a/ui/dist/assets/AuthRefreshDocs-BDIR7TiC.js +++ b/ui/dist/assets/AuthRefreshDocs-iVy1WmRW.js @@ -1,4 +1,4 @@ -import{S as Qe,i as je,s as Je,Q as Ke,R as Ne,T 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 W,x as de,U as Oe,V as We,k as Ie,W as Ge,n as Xe,t as E,a as U,o as u,d as I,C as Ve,p as Ye,r as G,u as Ze}from"./index-C6KFFkct.js";import{F as et}from"./FieldsQueryParam-9HzYyPBO.js";function Ee(r,a,l){const n=r.slice();return n[5]=a[l],n}function Ue(r,a,l){const n=r.slice();return n[5]=a[l],n}function xe(r,a){let l,n=a[5].code+"",m,_,i,h;function g(){return a[4](a[5])}return{key:r,first:null,c(){l=s("button"),m=k(n),_=p(),b(l,"class","tab-item"),G(l,"active",a[1]===a[5].code),this.first=l},m(v,w){d(v,l,w),o(l,m),o(l,_),i||(h=Ze(l,"click",g),i=!0)},p(v,w){a=v,w&4&&n!==(n=a[5].code+"")&&de(m,n),w&6&&G(l,"active",a[1]===a[5].code)},d(v){v&&u(l),i=!1,h()}}}function ze(r,a){let l,n,m,_;return n=new Ne({props:{content:a[5].body}}),{key:r,first:null,c(){l=s("div"),K(n.$$.fragment),m=p(),b(l,"class","tab-item"),G(l,"active",a[1]===a[5].code),this.first=l},m(i,h){d(i,l,h),W(n,l,null),o(l,m),_=!0},p(i,h){a=i;const g={};h&4&&(g.content=a[5].body),n.$set(g),(!_||h&6)&&G(l,"active",a[1]===a[5].code)},i(i){_||(E(n.$$.fragment,i),_=!0)},o(i){U(n.$$.fragment,i),_=!1},d(i){i&&u(l),I(n)}}}function tt(r){var De,Fe;let a,l,n=r[0].name+"",m,_,i,h,g,v,w,M,X,S,x,ue,z,q,pe,Y,N=r[0].name+"",Z,he,fe,Q,ee,D,te,T,oe,be,F,C,ae,me,le,_e,f,ke,P,ge,ve,$e,se,ye,ne,Se,we,Te,re,Ce,Re,A,ie,H,ce,R,L,y=[],Pe=new Map,Ae,O,$=[],Be=new Map,B;v=new Ke({props:{js:` +import{S as Qe,i as je,s as Je,Q as Ke,R as Ne,T 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 W,x as de,U as Oe,V as We,k as Ie,W as Ge,n as Xe,t as E,a as U,o as u,d as I,C as Ve,p as Ye,r as G,u as Ze}from"./index-DzzLh2vW.js";import{F as et}from"./FieldsQueryParam-Rko0bQqM.js";function Ee(r,a,l){const n=r.slice();return n[5]=a[l],n}function Ue(r,a,l){const n=r.slice();return n[5]=a[l],n}function xe(r,a){let l,n=a[5].code+"",m,_,i,h;function g(){return a[4](a[5])}return{key:r,first:null,c(){l=s("button"),m=k(n),_=p(),b(l,"class","tab-item"),G(l,"active",a[1]===a[5].code),this.first=l},m(v,w){d(v,l,w),o(l,m),o(l,_),i||(h=Ze(l,"click",g),i=!0)},p(v,w){a=v,w&4&&n!==(n=a[5].code+"")&&de(m,n),w&6&&G(l,"active",a[1]===a[5].code)},d(v){v&&u(l),i=!1,h()}}}function ze(r,a){let l,n,m,_;return n=new Ne({props:{content:a[5].body}}),{key:r,first:null,c(){l=s("div"),K(n.$$.fragment),m=p(),b(l,"class","tab-item"),G(l,"active",a[1]===a[5].code),this.first=l},m(i,h){d(i,l,h),W(n,l,null),o(l,m),_=!0},p(i,h){a=i;const g={};h&4&&(g.content=a[5].body),n.$set(g),(!_||h&6)&&G(l,"active",a[1]===a[5].code)},i(i){_||(E(n.$$.fragment,i),_=!0)},o(i){U(n.$$.fragment,i),_=!1},d(i){i&&u(l),I(n)}}}function tt(r){var De,Fe;let a,l,n=r[0].name+"",m,_,i,h,g,v,w,M,X,S,x,ue,z,q,pe,Y,N=r[0].name+"",Z,he,fe,Q,ee,D,te,T,oe,be,F,C,ae,me,le,_e,f,ke,P,ge,ve,$e,se,ye,ne,Se,we,Te,re,Ce,Re,A,ie,H,ce,R,L,y=[],Pe=new Map,Ae,O,$=[],Be=new Map,B;v=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs-BrCCD3wB.js b/ui/dist/assets/AuthWithOAuth2Docs-ColozBPV.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs-BrCCD3wB.js rename to ui/dist/assets/AuthWithOAuth2Docs-ColozBPV.js index c2919604..79484c84 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs-BrCCD3wB.js +++ b/ui/dist/assets/AuthWithOAuth2Docs-ColozBPV.js @@ -1,4 +1,4 @@ -import{S as xe,i as Ee,s as Je,Q as Qe,R as je,T 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,U as Ue,V as Ne,k as ze,W as Ie,n as Ke,t as j,a as x,o as c,d as G,C as Be,p as Ge,r as X,u as Xe}from"./index-C6KFFkct.js";import{F as Ye}from"./FieldsQueryParam-9HzYyPBO.js";function Fe(s,l,n){const i=s.slice();return i[5]=l[n],i}function Le(s,l,n){const i=s.slice();return i[5]=l[n],i}function He(s,l){let n,i=l[5].code+"",f,g,d,b;function _(){return l[4](l[5])}return{key:s,first:null,c(){n=o("button"),f=k(i),g=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(v,O){r(v,n,O),a(n,f),a(n,g),d||(b=Xe(n,"click",_),d=!0)},p(v,O){l=v,O&4&&i!==(i=l[5].code+"")&&pe(f,i),O&6&&X(n,"active",l[1]===l[5].code)},d(v){v&&c(n),d=!1,b()}}}function Ve(s,l){let n,i,f,g;return i=new je({props:{content:l[5].body}}),{key:s,first:null,c(){n=o("div"),I(i.$$.fragment),f=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(d,b){r(d,n,b),K(i,n,null),a(n,f),g=!0},p(d,b){l=d;const _={};b&4&&(_.content=l[5].body),i.$set(_),(!g||b&6)&&X(n,"active",l[1]===l[5].code)},i(d){g||(j(i.$$.fragment,d),g=!0)},o(d){x(i.$$.fragment,d),g=!1},d(d){d&&c(n),G(i)}}}function Ze(s){let l,n,i=s[0].name+"",f,g,d,b,_,v,O,D,Y,A,E,be,J,P,me,Z,Q=s[0].name+"",ee,fe,te,M,ae,W,le,U,ne,y,oe,ge,B,S,se,ke,ie,_e,m,ve,C,we,$e,Oe,re,Ae,ce,ye,Se,Te,de,Ce,qe,q,ue,F,he,T,L,$=[],Re=new Map,De,H,w=[],Pe=new Map,R;v=new Qe({props:{js:` +import{S as xe,i as Ee,s as Je,Q as Qe,R as je,T 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,U as Ue,V as Ne,k as ze,W as Ie,n as Ke,t as j,a as x,o as c,d as G,C as Be,p as Ge,r as X,u as Xe}from"./index-DzzLh2vW.js";import{F as Ye}from"./FieldsQueryParam-Rko0bQqM.js";function Fe(s,l,n){const i=s.slice();return i[5]=l[n],i}function Le(s,l,n){const i=s.slice();return i[5]=l[n],i}function He(s,l){let n,i=l[5].code+"",f,g,d,b;function _(){return l[4](l[5])}return{key:s,first:null,c(){n=o("button"),f=k(i),g=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(v,O){r(v,n,O),a(n,f),a(n,g),d||(b=Xe(n,"click",_),d=!0)},p(v,O){l=v,O&4&&i!==(i=l[5].code+"")&&pe(f,i),O&6&&X(n,"active",l[1]===l[5].code)},d(v){v&&c(n),d=!1,b()}}}function Ve(s,l){let n,i,f,g;return i=new je({props:{content:l[5].body}}),{key:s,first:null,c(){n=o("div"),I(i.$$.fragment),f=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(d,b){r(d,n,b),K(i,n,null),a(n,f),g=!0},p(d,b){l=d;const _={};b&4&&(_.content=l[5].body),i.$set(_),(!g||b&6)&&X(n,"active",l[1]===l[5].code)},i(d){g||(j(i.$$.fragment,d),g=!0)},o(d){x(i.$$.fragment,d),g=!1},d(d){d&&c(n),G(i)}}}function Ze(s){let l,n,i=s[0].name+"",f,g,d,b,_,v,O,D,Y,A,E,be,J,P,me,Z,Q=s[0].name+"",ee,fe,te,M,ae,W,le,U,ne,y,oe,ge,B,S,se,ke,ie,_e,m,ve,C,we,$e,Oe,re,Ae,ce,ye,Se,Te,de,Ce,qe,q,ue,F,he,T,L,$=[],Re=new Map,De,H,w=[],Pe=new Map,R;v=new Qe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${s[3]}'); diff --git a/ui/dist/assets/AuthWithOtpDocs-CqMdM2jt.js b/ui/dist/assets/AuthWithOtpDocs-CFGZEyRU.js similarity index 99% rename from ui/dist/assets/AuthWithOtpDocs-CqMdM2jt.js rename to ui/dist/assets/AuthWithOtpDocs-CFGZEyRU.js index 460ecbb8..aa34404a 100644 --- a/ui/dist/assets/AuthWithOtpDocs-CqMdM2jt.js +++ b/ui/dist/assets/AuthWithOtpDocs-CFGZEyRU.js @@ -1,4 +1,4 @@ -import{S as ee,i as te,s as le,T as U,e as p,b as S,w as V,f as g,g as b,h,x as z,U as G,V as ge,k as Z,W as ke,n as x,t as L,a as J,o as _,C as oe,r as Y,u as ae,R as we,c as K,m as Q,d as X,Q as $e,X as se,p as Te,Y as ne}from"./index-C6KFFkct.js";function ie(s,t,e){const a=s.slice();return a[4]=t[e],a}function ce(s,t,e){const a=s.slice();return a[4]=t[e],a}function re(s,t){let e,a=t[4].code+"",d,c,r,n;function u(){return t[3](t[4])}return{key:s,first:null,c(){e=p("button"),d=V(a),c=S(),g(e,"class","tab-item"),Y(e,"active",t[1]===t[4].code),this.first=e},m(m,q){b(m,e,q),h(e,d),h(e,c),r||(n=ae(e,"click",u),r=!0)},p(m,q){t=m,q&4&&a!==(a=t[4].code+"")&&z(d,a),q&6&&Y(e,"active",t[1]===t[4].code)},d(m){m&&_(e),r=!1,n()}}}function de(s,t){let e,a,d,c;return a=new we({props:{content:t[4].body}}),{key:s,first:null,c(){e=p("div"),K(a.$$.fragment),d=S(),g(e,"class","tab-item"),Y(e,"active",t[1]===t[4].code),this.first=e},m(r,n){b(r,e,n),Q(a,e,null),h(e,d),c=!0},p(r,n){t=r;const u={};n&4&&(u.content=t[4].body),a.$set(u),(!c||n&6)&&Y(e,"active",t[1]===t[4].code)},i(r){c||(L(a.$$.fragment,r),c=!0)},o(r){J(a.$$.fragment,r),c=!1},d(r){r&&_(e),X(a)}}}function Pe(s){let t,e,a,d,c,r,n,u=s[0].name+"",m,q,W,C,B,A,H,R,I,y,P,w=[],$=new Map,E,D,k=[],N=new Map,M,i=U(s[2]);const v=l=>l[4].code;for(let l=0;ll[4].code;for(let l=0;lParam Type Description
Required otpId
String The id of the OTP request.
Required password
String The one-time password.',H=S(),R=p("div"),R.textContent="Responses",I=S(),y=p("div"),P=p("div");for(let l=0;le(1,d=n.code);return s.$$set=n=>{"collection"in n&&e(0,a=n.collection)},s.$$.update=()=>{s.$$.dirty&1&&e(2,c=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:oe.dummyCollectionRecord(a)},null,2)},{code:400,body:` +import{S as ee,i as te,s as le,T as U,e as p,b as S,w as V,f as g,g as b,h,x as z,U as G,V as ge,k as Z,W as ke,n as x,t as L,a as J,o as _,C as oe,r as Y,u as ae,R as we,c as K,m as Q,d as X,Q as $e,X as se,p as Te,Y as ne}from"./index-DzzLh2vW.js";function ie(s,t,e){const a=s.slice();return a[4]=t[e],a}function ce(s,t,e){const a=s.slice();return a[4]=t[e],a}function re(s,t){let e,a=t[4].code+"",d,c,r,n;function u(){return t[3](t[4])}return{key:s,first:null,c(){e=p("button"),d=V(a),c=S(),g(e,"class","tab-item"),Y(e,"active",t[1]===t[4].code),this.first=e},m(m,q){b(m,e,q),h(e,d),h(e,c),r||(n=ae(e,"click",u),r=!0)},p(m,q){t=m,q&4&&a!==(a=t[4].code+"")&&z(d,a),q&6&&Y(e,"active",t[1]===t[4].code)},d(m){m&&_(e),r=!1,n()}}}function de(s,t){let e,a,d,c;return a=new we({props:{content:t[4].body}}),{key:s,first:null,c(){e=p("div"),K(a.$$.fragment),d=S(),g(e,"class","tab-item"),Y(e,"active",t[1]===t[4].code),this.first=e},m(r,n){b(r,e,n),Q(a,e,null),h(e,d),c=!0},p(r,n){t=r;const u={};n&4&&(u.content=t[4].body),a.$set(u),(!c||n&6)&&Y(e,"active",t[1]===t[4].code)},i(r){c||(L(a.$$.fragment,r),c=!0)},o(r){J(a.$$.fragment,r),c=!1},d(r){r&&_(e),X(a)}}}function Pe(s){let t,e,a,d,c,r,n,u=s[0].name+"",m,q,W,C,B,A,H,R,I,y,P,w=[],$=new Map,E,D,k=[],N=new Map,M,i=U(s[2]);const v=l=>l[4].code;for(let l=0;ll[4].code;for(let l=0;lParam Type Description
Required otpId
String The id of the OTP request.
Required password
String The one-time password.',H=S(),R=p("div"),R.textContent="Responses",I=S(),y=p("div"),P=p("div");for(let l=0;le(1,d=n.code);return s.$$set=n=>{"collection"in n&&e(0,a=n.collection)},s.$$.update=()=>{s.$$.dirty&1&&e(2,c=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:oe.dummyCollectionRecord(a)},null,2)},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/AuthWithPasswordDocs-CYL6rtF4.js b/ui/dist/assets/AuthWithPasswordDocs-ADzrUx-V.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs-CYL6rtF4.js rename to ui/dist/assets/AuthWithPasswordDocs-ADzrUx-V.js index 7b3db1f0..6064cd09 100644 --- a/ui/dist/assets/AuthWithPasswordDocs-CYL6rtF4.js +++ b/ui/dist/assets/AuthWithPasswordDocs-ADzrUx-V.js @@ -1,4 +1,4 @@ -import{S as kt,i as gt,s as vt,Q as St,T as L,R as _t,e as s,w as f,b as u,c as ae,f as k,g as c,h as t,m as oe,x as G,U as ct,V as wt,k as yt,W as $t,n as Pt,t as X,a as z,o as d,d as se,X as Rt,C as dt,p as Ct,r as ne,u as Tt}from"./index-C6KFFkct.js";import{F as Ot}from"./FieldsQueryParam-9HzYyPBO.js";function pt(i,o,a){const n=i.slice();return n[7]=o[a],n}function ut(i,o,a){const n=i.slice();return n[7]=o[a],n}function ht(i,o,a){const n=i.slice();return n[12]=o[a],n[14]=a,n}function At(i){let o;return{c(){o=f("or")},m(a,n){c(a,o,n)},d(a){a&&d(o)}}}function bt(i){let o,a,n=i[12]+"",m,b=i[14]>0&&At();return{c(){b&&b.c(),o=u(),a=s("strong"),m=f(n)},m(r,h){b&&b.m(r,h),c(r,o,h),c(r,a,h),t(a,m)},p(r,h){h&2&&n!==(n=r[12]+"")&&G(m,n)},d(r){r&&(d(o),d(a)),b&&b.d(r)}}}function ft(i,o){let a,n=o[7].code+"",m,b,r,h;function g(){return o[6](o[7])}return{key:i,first:null,c(){a=s("button"),m=f(n),b=u(),k(a,"class","tab-item"),ne(a,"active",o[2]===o[7].code),this.first=a},m($,_){c($,a,_),t(a,m),t(a,b),r||(h=Tt(a,"click",g),r=!0)},p($,_){o=$,_&8&&n!==(n=o[7].code+"")&&G(m,n),_&12&&ne(a,"active",o[2]===o[7].code)},d($){$&&d(a),r=!1,h()}}}function mt(i,o){let a,n,m,b;return n=new _t({props:{content:o[7].body}}),{key:i,first:null,c(){a=s("div"),ae(n.$$.fragment),m=u(),k(a,"class","tab-item"),ne(a,"active",o[2]===o[7].code),this.first=a},m(r,h){c(r,a,h),oe(n,a,null),t(a,m),b=!0},p(r,h){o=r;const g={};h&8&&(g.content=o[7].body),n.$set(g),(!b||h&12)&&ne(a,"active",o[2]===o[7].code)},i(r){b||(X(n.$$.fragment,r),b=!0)},o(r){z(n.$$.fragment,r),b=!1},d(r){r&&d(a),se(n)}}}function Dt(i){var ot,st;let o,a,n=i[0].name+"",m,b,r,h,g,$,_,Z=i[1].join("/")+"",ie,De,re,We,ce,R,de,q,pe,C,x,Ue,ee,H,Fe,ue,te=i[0].name+"",he,Me,be,j,fe,T,me,Be,V,O,_e,Le,ke,qe,Y,ge,He,ve,Se,E,we,A,ye,je,N,D,$e,Ve,Pe,Ye,v,Ee,F,Ne,Qe,Ie,Re,Je,Ce,Ke,Xe,ze,Te,Ge,Ze,M,Oe,Q,Ae,W,I,P=[],xe=new Map,et,J,w=[],tt=new Map,U;R=new St({props:{js:` +import{S as kt,i as gt,s as vt,Q as St,T as L,R as _t,e as s,w as f,b as u,c as ae,f as k,g as c,h as t,m as oe,x as G,U as ct,V as wt,k as yt,W as $t,n as Pt,t as X,a as z,o as d,d as se,X as Rt,C as dt,p as Ct,r as ne,u as Tt}from"./index-DzzLh2vW.js";import{F as Ot}from"./FieldsQueryParam-Rko0bQqM.js";function pt(i,o,a){const n=i.slice();return n[7]=o[a],n}function ut(i,o,a){const n=i.slice();return n[7]=o[a],n}function ht(i,o,a){const n=i.slice();return n[12]=o[a],n[14]=a,n}function At(i){let o;return{c(){o=f("or")},m(a,n){c(a,o,n)},d(a){a&&d(o)}}}function bt(i){let o,a,n=i[12]+"",m,b=i[14]>0&&At();return{c(){b&&b.c(),o=u(),a=s("strong"),m=f(n)},m(r,h){b&&b.m(r,h),c(r,o,h),c(r,a,h),t(a,m)},p(r,h){h&2&&n!==(n=r[12]+"")&&G(m,n)},d(r){r&&(d(o),d(a)),b&&b.d(r)}}}function ft(i,o){let a,n=o[7].code+"",m,b,r,h;function g(){return o[6](o[7])}return{key:i,first:null,c(){a=s("button"),m=f(n),b=u(),k(a,"class","tab-item"),ne(a,"active",o[2]===o[7].code),this.first=a},m($,_){c($,a,_),t(a,m),t(a,b),r||(h=Tt(a,"click",g),r=!0)},p($,_){o=$,_&8&&n!==(n=o[7].code+"")&&G(m,n),_&12&&ne(a,"active",o[2]===o[7].code)},d($){$&&d(a),r=!1,h()}}}function mt(i,o){let a,n,m,b;return n=new _t({props:{content:o[7].body}}),{key:i,first:null,c(){a=s("div"),ae(n.$$.fragment),m=u(),k(a,"class","tab-item"),ne(a,"active",o[2]===o[7].code),this.first=a},m(r,h){c(r,a,h),oe(n,a,null),t(a,m),b=!0},p(r,h){o=r;const g={};h&8&&(g.content=o[7].body),n.$set(g),(!b||h&12)&&ne(a,"active",o[2]===o[7].code)},i(r){b||(X(n.$$.fragment,r),b=!0)},o(r){z(n.$$.fragment,r),b=!1},d(r){r&&d(a),se(n)}}}function Dt(i){var ot,st;let o,a,n=i[0].name+"",m,b,r,h,g,$,_,Z=i[1].join("/")+"",ie,De,re,We,ce,R,de,q,pe,C,x,Ue,ee,H,Fe,ue,te=i[0].name+"",he,Me,be,j,fe,T,me,Be,V,O,_e,Le,ke,qe,Y,ge,He,ve,Se,E,we,A,ye,je,N,D,$e,Ve,Pe,Ye,v,Ee,F,Ne,Qe,Ie,Re,Je,Ce,Ke,Xe,ze,Te,Ge,Ze,M,Oe,Q,Ae,W,I,P=[],xe=new Map,et,J,w=[],tt=new Map,U;R=new St({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[5]}'); diff --git a/ui/dist/assets/CodeEditor-D4uJdbuC.js b/ui/dist/assets/CodeEditor-wsjRtoGt.js similarity index 99% rename from ui/dist/assets/CodeEditor-D4uJdbuC.js rename to ui/dist/assets/CodeEditor-wsjRtoGt.js index 02f31e8f..edb5f992 100644 --- a/ui/dist/assets/CodeEditor-D4uJdbuC.js +++ b/ui/dist/assets/CodeEditor-wsjRtoGt.js @@ -1,4 +1,4 @@ -import{S as wt,i as Rt,s as Yt,e as Tt,f as Wt,Z as OO,g as _t,y as BO,o as qt,J as vt,N as Ut,O as zt,L as Vt,C as jt,P as Gt}from"./index-C6KFFkct.js";import{P as Ct,N as At,w as Et,D as Nt,x as qO,T as tO,I as vO,y as B,z as l,A as Mt,L as J,B as L,F as v,G as K,H as UO,J as F,v as G,K as _e,M as It,O as Dt,Q as qe,R as ve,U as Ue,E as q,V as ze,W as S,X as Bt,Y as Jt,b as C,e as Lt,f as Kt,g as Ft,i as Ht,j as Oa,k as ea,u as ta,l as aa,m as ra,r as ia,n as sa,o as oa,c as la,d as na,s as ca,h as Qa,a as ha,p as ua,q as JO,C as eO}from"./index-B5ReTu-C.js";var LO={};class sO{constructor(O,a,t,r,s,i,o,n,Q,u=0,c){this.p=O,this.stack=a,this.state=t,this.reducePos=r,this.pos=s,this.score=i,this.buffer=o,this.bufferBase=n,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((O,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,a,t=0){let r=O.parser.context;return new sO(O,[],a,t,t,0,[],0,r?new KO(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var a;let t=O>>19,r=O&65535,{parser:s}=this.p,i=this.reducePos=2e3&&!(!((a=this.p.parser.nodeSet.types[r])===null||a===void 0)&&a.isAnonymous)&&(Q==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(r,Q)}storeNode(O,a,t,r=4,s=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&i.buffer[o-4]==0&&i.buffer[o-1]>-1){if(a==t)return;if(i.buffer[o-2]>=a){i.buffer[o-2]=t;return}}}if(!s||this.pos==t)this.buffer.push(O,a,t,r);else{let i=this.buffer.length;if(i>0&&this.buffer[i-4]!=0){let o=!1;for(let n=i;n>0&&this.buffer[n-2]>t;n-=4)if(this.buffer[n-1]>=0){o=!0;break}if(o)for(;i>0&&this.buffer[i-2]>t;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=O,this.buffer[i+1]=a,this.buffer[i+2]=t,this.buffer[i+3]=r}}shift(O,a,t,r){if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=r,this.shiftContext(a,t),a<=this.p.parser.maxNode&&this.buffer.push(a,t,r,4);else{let s=O,{parser:i}=this.p;(r>this.pos||a<=i.maxNode)&&(this.pos=r,i.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,t),this.shiftContext(a,t),a<=i.maxNode&&this.buffer.push(a,t,r,4)}}apply(O,a,t,r){O&65536?this.reduce(O):this.shift(O,a,t,r)}useNode(O,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let r=this.pos;this.reducePos=this.pos=r+O.length,this.pushState(a,r),this.buffer.push(t,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,a=O.buffer.length;for(;a>0&&O.buffer[a-2]>O.reducePos;)a-=4;let t=O.buffer.slice(a),r=O.bufferBase+a;for(;O&&r==O.bufferBase;)O=O.parent;return new sO(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,r,this.curContext,this.lookAhead,O)}recoverByDelete(O,a){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(O){for(let a=new pa(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,O);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>8||this.stack.length>=120){let r=[];for(let s=0,i;sn&1&&o==i)||r.push(a[s],i)}a=r}let t=[];for(let r=0;r>19,r=a&65535,s=this.stack.length-t*3;if(s<0||O.getGoto(this.stack[s],r,!1)<0){let i=this.findForcedReduction();if(i==null)return!1;a=i}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(a),!0}findForcedReduction(){let{parser:O}=this.p,a=[],t=(r,s)=>{if(!a.includes(r))return a.push(r),O.allActions(r,i=>{if(!(i&393216))if(i&65536){let o=(i>>19)-s;if(o>1){let n=i&65535,Q=this.stack.length-o*3;if(Q>=0&&O.getGoto(this.stack[Q],n,!1)>=0)return o<<19|65536|n}}else{let o=t(i,s+1);if(o!=null)return o}})};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:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class KO{constructor(O,a){this.tracker=O,this.context=a,this.hash=O.strict?O.hash(a):0}}class pa{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let a=O&65535,t=O>>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 r=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=r}}class oO{constructor(O,a,t){this.stack=O,this.pos=a,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,a=O.bufferBase+O.buffer.length){return new oO(O,a,a-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.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 oO(this.stack,this.pos,this.index)}}function N(e,O=Uint16Array){if(typeof e!="string")return e;let a=null;for(let t=0,r=0;t=92&&i--,i>=34&&i--;let n=i-32;if(n>=46&&(n-=46,o=!0),s+=n,o)break;s*=46}a?a[r++]=s:a=new O(s)}return a}class aO{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FO=new aO;class da{constructor(O,a){this.input=O,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FO,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(O,a){let t=this.range,r=this.rangeIndex,s=this.pos+O;for(;st.to:s>=t.to;){if(r==this.ranges.length-1)return null;let i=this.ranges[++r];s+=i.from-t.to,t=i}return s}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,a.from);return this.end}peek(O){let a=this.chunkOff+O,t,r;if(a>=0&&a=this.chunk2Pos&&to.to&&(this.chunk2=this.chunk2.slice(0,o.to-t)),r=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),r}acceptToken(O,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,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(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,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(O,a){if(a?(this.token=a,a.start=O,a.lookAhead=O+1,a.value=a.extended=-1):this.token=FO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,a-this.chunkPos);if(O>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,a-this.chunk2Pos);if(O>=this.range.from&&a<=this.range.to)return this.input.read(O,a);let t="";for(let r of this.ranges){if(r.from>=a)break;r.to>O&&(t+=this.input.read(Math.max(r.from,O),Math.min(r.to,a)))}return t}}class z{constructor(O,a){this.data=O,this.id=a}token(O,a){let{parser:t}=a.p;Ve(this.data,O,a,this.id,t.data,t.tokenPrecTable)}}z.prototype.contextual=z.prototype.fallback=z.prototype.extend=!1;class lO{constructor(O,a,t){this.precTable=a,this.elseToken=t,this.data=typeof O=="string"?N(O):O}token(O,a){let t=O.pos,r=0;for(;;){let s=O.next<0,i=O.resolveOffset(1,1);if(Ve(this.data,O,a,0,this.data,this.precTable),O.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,i==null)break;O.reset(i,O.token)}r&&(O.reset(t,O.token),O.acceptToken(this.elseToken,r))}}lO.prototype.contextual=z.prototype.fallback=z.prototype.extend=!1;class k{constructor(O,a={}){this.token=O,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function Ve(e,O,a,t,r,s){let i=0,o=1<0){let d=e[h];if(n.allows(d)&&(O.token.value==-1||O.token.value==d||fa(d,O.token.value,r,s))){O.acceptToken(d);break}}let u=O.next,c=0,f=e[i+2];if(O.next<0&&f>c&&e[Q+f*3-3]==65535){i=e[Q+f*3-1];continue O}for(;c>1,d=Q+h+(h<<1),P=e[d],m=e[d+1]||65536;if(u=m)c=h+1;else{i=e[d+2],O.advance();continue O}}break}}function HO(e,O,a){for(let t=O,r;(r=e[t])!=65535;t++)if(r==a)return t-O;return-1}function fa(e,O,a,t){let r=HO(a,t,O);return r<0||HO(a,t,e)O)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(e.length,Math.max(t.from+1,O+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:e.length}}class $a{constructor(O,a){this.fragments=O,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 O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?Oe(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?Oe(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=i,null;if(s instanceof tO){if(i==O){if(i=Math.max(this.safeFrom,O)&&(this.trees.push(s),this.start.push(i),this.index.push(0))}else this.index[a]++,this.nextStart=i+s.length}}}class Pa{constructor(O,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new aO)}getActions(O){let a=0,t=null,{parser:r}=O.p,{tokenizers:s}=r,i=r.stateSlot(O.state,3),o=O.curContext?O.curContext.hash:0,n=0;for(let Q=0;Qc.end+25&&(n=Math.max(c.lookAhead,n)),c.value!=0)){let f=a;if(c.extended>-1&&(a=this.addActions(O,c.extended,c.end,a)),a=this.addActions(O,c.value,c.end,a),!u.extend&&(t=c,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return n&&O.setLookAhead(n),!t&&O.pos==this.stream.end&&(t=new aO,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,a=this.addActions(O,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let a=new aO,{pos:t,p:r}=O;return a.start=t,a.end=Math.min(t+1,r.stream.end),a.value=t==r.stream.end?r.parser.eofTerm:0,a}updateCachedToken(O,a,t){let r=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(r,O),t),O.value>-1){let{parser:s}=t.p;for(let i=0;i=0&&t.p.parser.dialect.allows(o>>1)){o&1?O.extended=o>>1:O.value=o>>1;break}}}else O.value=0,O.end=this.stream.clipPos(r+1)}putAction(O,a,t,r){for(let s=0;sO.bufferLength*4?new $a(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,a=this.minStackPos,t=this.stacks=[],r,s;if(this.bigReductionCount>300&&O.length==1){let[i]=O;for(;i.forceReduce()&&i.stack.length&&i.stack[i.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;ia)t.push(o);else{if(this.advanceStack(o,t,O))continue;{r||(r=[],s=[]),r.push(o);let n=this.tokens.getMainToken(o);s.push(n.value,n.end)}}break}}if(!t.length){let i=r&&Sa(r);if(i)return Z&&console.log("Finish with "+this.stackID(i)),this.stackToTree(i);if(this.parser.strict)throw Z&&r&&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&&r){let i=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,t);if(i)return Z&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let i=this.recovering==1?1:this.recovering*3;if(t.length>i)for(t.sort((o,n)=>n.score-o.score);t.length>i;)t.pop();t.some(o=>o.reducePos>a)&&this.recovering--}else if(t.length>1){O:for(let i=0;i500&&Q.buffer.length>500)if((o.score-Q.score||o.buffer.length-Q.buffer.length)>0)t.splice(n--,1);else{t.splice(i--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let i=1;i ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let Q=O.curContext&&O.curContext.tracker.strict,u=Q?O.curContext.hash:0;for(let c=this.fragments.nodeAt(r);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?s.getGoto(O.state,c.type.id):-1;if(f>-1&&c.length&&(!Q||(c.prop(qO.contextHash)||0)==u))return O.useNode(c,f),Z&&console.log(i+this.stackID(O)+` (via reuse of ${s.getName(c.type.id)})`),!0;if(!(c instanceof tO)||c.children.length==0||c.positions[0]>0)break;let h=c.children[0];if(h instanceof tO&&c.positions[0]==0)c=h;else break}}let o=s.stateSlot(O.state,4);if(o>0)return O.reduce(o),Z&&console.log(i+this.stackID(O)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(O.stack.length>=8400)for(;O.stack.length>6e3&&O.forceReduce(););let n=this.tokens.getActions(O);for(let Q=0;Qr?a.push(d):t.push(d)}return!1}advanceFully(O,a){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return ee(O,a),!0}}runRecovery(O,a,t){let r=null,s=!1;for(let i=0;i ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),Z&&console.log(u+this.stackID(o)+" (restarted)"),this.advanceFully(o,t))))continue;let c=o.split(),f=u;for(let h=0;c.forceReduce()&&h<10&&(Z&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));h++)Z&&(f=this.stackID(c)+" -> ");for(let h of o.recoverByInsert(n))Z&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,t);this.stream.end>o.pos?(Q==o.pos&&(Q++,n=0),o.recoverByDelete(n,Q),Z&&console.log(u+this.stackID(o)+` (via recover-delete ${this.parser.getName(n)})`),ee(o,t)):(!r||r.scoree;class je{constructor(O){this.start=O.start,this.shift=O.shift||dO,this.reduce=O.reduce||dO,this.reuse=O.reuse||dO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class T extends Ct{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (14)`);let a=O.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let o=0;oO.topRules[o][1]),r=[];for(let o=0;o=0)s(u,n,o[Q++]);else{let c=o[Q+-u];for(let f=-u;f>0;f--)s(o[Q++],n,c);Q++}}}this.nodeSet=new At(a.map((o,n)=>Et.define({name:n>=this.minRepeatTerm?void 0:o,id:n,props:r[n],top:t.indexOf(n)>-1,error:n==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(n)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Nt;let i=N(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;otypeof o=="number"?new z(i,o):o),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,a,t){let r=new ma(this,O,a,t);for(let s of this.wrappers)r=s(r,O,a,t);return r}getGoto(O,a,t=!1){let r=this.goto;if(a>=r[0])return-1;for(let s=r[a+1];;){let i=r[s++],o=i&1,n=r[s++];if(o&&t)return n;for(let Q=s+(i>>1);s0}validAction(O,a){return!!this.allActions(O,t=>t==a?!0:null)}allActions(O,a){let t=this.stateSlot(O,4),r=t?a(t):void 0;for(let s=this.stateSlot(O,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=R(this.data,s+2);else break;r=a(R(this.data,s+1))}return r}nextStates(O){let a=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=R(this.data,t+2);else break;if(!(this.data[t+2]&1)){let r=this.data[t+1];a.some((s,i)=>i&1&&s==r)||a.push(this.data[t],r)}}return a}configure(O){let a=Object.assign(Object.create(T.prototype),this);if(O.props&&(a.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);a.top=t}return O.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let r=O.tokenizers.find(s=>s.from==t);return r?r.to:t})),O.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,r)=>{let s=O.specializers.find(o=>o.from==t.external);if(!s)return t;let i=Object.assign(Object.assign({},t),{external:s.to});return a.specializers[r]=te(i),i})),O.contextTracker&&(a.context=O.contextTracker),O.dialect&&(a.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(a.strict=O.strict),O.wrap&&(a.wrappers=a.wrappers.concat(O.wrap)),O.bufferLength!=null&&(a.bufferLength=O.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let a=this.dynamicPrecedences;return a==null?0:a[O]||0}parseDialect(O){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(O)for(let s of O.split(" ")){let i=a.indexOf(s);i>=0&&(t[i]=!0)}let r=null;for(let s=0;st)&&a.p.parser.stateFlag(a.state,2)&&(!O||O.scoree.external(a,t)<<1|O}return e.get}const Za=54,ba=1,ka=55,xa=2,Xa=56,ya=3,ae=4,wa=5,nO=6,Ge=7,Ce=8,Ae=9,Ee=10,Ra=11,Ya=12,Ta=13,fO=57,Wa=14,re=58,Ne=20,_a=22,Me=23,qa=24,XO=26,Ie=27,va=28,Ua=31,za=34,Va=36,ja=37,Ga=0,Ca=1,Aa={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},Ea={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},ie={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 Na(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function De(e){return e==9||e==10||e==13||e==32}let se=null,oe=null,le=0;function yO(e,O){let a=e.pos+O;if(le==a&&oe==e)return se;let t=e.peek(O);for(;De(t);)t=e.peek(++O);let r="";for(;Na(t);)r+=String.fromCharCode(t),t=e.peek(++O);return oe=e,le=a,se=r?r.toLowerCase():t==Ma||t==Ia?void 0:null}const Be=60,cO=62,zO=47,Ma=63,Ia=33,Da=45;function ne(e,O){this.name=e,this.parent=O}const Ba=[nO,Ee,Ge,Ce,Ae],Ja=new je({start:null,shift(e,O,a,t){return Ba.indexOf(O)>-1?new ne(yO(t,1)||"",e):e},reduce(e,O){return O==Ne&&e?e.parent:e},reuse(e,O,a,t){let r=O.type.id;return r==nO||r==Va?new ne(yO(t,1)||"",e):e},strict:!1}),La=new k((e,O)=>{if(e.next!=Be){e.next<0&&O.context&&e.acceptToken(fO);return}e.advance();let a=e.next==zO;a&&e.advance();let t=yO(e,0);if(t===void 0)return;if(!t)return e.acceptToken(a?Wa:nO);let r=O.context?O.context.name:null;if(a){if(t==r)return e.acceptToken(Ra);if(r&&Ea[r])return e.acceptToken(fO,-2);if(O.dialectEnabled(Ga))return e.acceptToken(Ya);for(let s=O.context;s;s=s.parent)if(s.name==t)return;e.acceptToken(Ta)}else{if(t=="script")return e.acceptToken(Ge);if(t=="style")return e.acceptToken(Ce);if(t=="textarea")return e.acceptToken(Ae);if(Aa.hasOwnProperty(t))return e.acceptToken(Ee);r&&ie[r]&&ie[r][t]?e.acceptToken(fO,-1):e.acceptToken(nO)}},{contextual:!0}),Ka=new k(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(re);break}if(e.next==Da)O++;else if(e.next==cO&&O>=2){a>=3&&e.acceptToken(re,-2);break}else O=0;e.advance()}});function Fa(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Ha=new k((e,O)=>{if(e.next==zO&&e.peek(1)==cO){let a=O.dialectEnabled(Ca)||Fa(O.context);e.acceptToken(a?wa:ae,2)}else e.next==cO&&e.acceptToken(ae,1)});function VO(e,O,a){let t=2+e.length;return new k(r=>{for(let s=0,i=0,o=0;;o++){if(r.next<0){o&&r.acceptToken(O);break}if(s==0&&r.next==Be||s==1&&r.next==zO||s>=2&&si?r.acceptToken(O,-i):r.acceptToken(a,-(i-2));break}else if((r.next==10||r.next==13)&&o){r.acceptToken(O,1);break}else s=i=0;r.advance()}})}const Or=VO("script",Za,ba),er=VO("style",ka,xa),tr=VO("textarea",Xa,ya),ar=B({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),rr=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%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~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|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~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!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~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{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!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:Ja,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"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[ar],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=o.type.id;if(Q==va)return $O(o,n,a);if(Q==Ua)return $O(o,n,t);if(Q==za)return $O(o,n,r);if(Q==Ne&&s.length){let u=o.node,c=u.firstChild,f=c&&ce(c,n),h;if(f){for(let d of s)if(d.tag==f&&(!d.attrs||d.attrs(h||(h=Je(c,n))))){let P=u.lastChild,m=P.type.id==ja?P.from:u.to;if(m>c.to)return{parser:d.parser,overlay:[{from:c.to,to:m}]}}}}if(i&&Q==Me){let u=o.node,c;if(c=u.firstChild){let f=i[n.read(c.from,c.to)];if(f)for(let h of f){if(h.tagName&&h.tagName!=ce(u.parent,n))continue;let d=u.lastChild;if(d.type.id==XO){let P=d.from+1,m=d.lastChild,x=d.to-(m&&m.isError?0:1);if(x>P)return{parser:h.parser,overlay:[{from:P,to:x}]}}else if(d.type.id==Ie)return{parser:h.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}const ir=99,Qe=1,sr=100,or=101,he=2,Ke=[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],lr=58,nr=40,Fe=95,cr=91,rO=45,Qr=46,hr=35,ur=37,pr=38,dr=92,fr=10;function M(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function He(e){return e>=48&&e<=57}const $r=new k((e,O)=>{for(let a=!1,t=0,r=0;;r++){let{next:s}=e;if(M(s)||s==rO||s==Fe||a&&He(s))!a&&(s!=rO||r>0)&&(a=!0),t===r&&s==rO&&t++,e.advance();else if(s==dr&&e.peek(1)!=fr)e.advance(),e.next>-1&&e.advance(),a=!0;else{a&&e.acceptToken(s==nr?sr:t==2&&O.canShift(he)?he:or);break}}}),Pr=new k(e=>{if(Ke.includes(e.peek(-1))){let{next:O}=e;(M(O)||O==Fe||O==hr||O==Qr||O==cr||O==lr&&M(e.peek(1))||O==rO||O==pr)&&e.acceptToken(ir)}}),mr=new k(e=>{if(!Ke.includes(e.peek(-1))){let{next:O}=e;if(O==ur&&(e.advance(),e.acceptToken(Qe)),M(O)){do e.advance();while(M(e.next)||He(e.next));e.acceptToken(Qe)}}}),gr=B({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,KeyframeRangeName:l.operatorKeyword,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ColorLiteral:l.color,"ParenthesizedContent StringLiteral":l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Sr={__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:138},Zr={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},br={__proto__:null,not:132,only:132},kr=T.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO-kQdO,59}O-{Q[O'#E^O.YQWO,5;_O.YQWO,5;_POOO'#EV'#EVP.eO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO/[QXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/iQ`O1G/^O0SQXO1G/aO0jQXO1G/cO1QQXO1G/dO1hQWO,59|O1mQ[O'#DSO1tQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1{QpO,59]OOQS,59_,59_O${QdO,59aO2TQWO1G/mOOQS,59c,59cO2YQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2eQ[O,59jOOQS,59j,59jO2mQWO'#DjO2xQWO,5:VO2}QWO,5:]O&`Q[O,5:XO&`Q[O'#E_O3VQWO,5;`O3bQWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3sQWO1G0OO3xQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO4TQtO1G/iOOQO1G/i1G/iOOQO,5:x,5:xO4kQ[O,5:xOOQO-E8[-E8[O4xQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO5TQXO'#ErO5[QWO,59nO5aQtO'#EXO6XQdO'#EoO6cQWO,59ZO6hQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XOOQS1G/P1G/PO6pQWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6uQWO,5:yOOQO-E8]-E8]O7TQXO1G/xOOQS7+%j7+%jO7[QYO'#CsOOQO'#EQ'#EQO7gQ`O'#EPOOQO'#EP'#EPO7rQWO'#E`O7zQdO,5:jOOQS,5:j,5:jO8VQtO'#E]O${QdO'#E]O9WQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9kQpO<OAN>OO;]QdO,5:uOOQO-E8X-E8XOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[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!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^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!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[Pr,mr,$r,1,2,3,4,new lO("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:e=>Sr[e]||-1},{term:58,get:e=>Zr[e]||-1},{term:101,get:e=>br[e]||-1}],tokenPrec:1219});let PO=null;function mO(){if(!PO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],a=new Set;for(let t in e)t!="cssText"&&t!="cssFloat"&&typeof e[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),a.has(t)||(O.push(t),a.add(t)));PO=O.sort().map(t=>({type:"property",label:t}))}return PO||[]}const ue=["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(e=>({type:"class",label:e})),pe=["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(e=>({type:"keyword",label:e})).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(e=>({type:"constant",label:e}))),xr=["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(e=>({type:"type",label:e})),Xr=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),w=/^(\w[\w-]*|-\w[\w-]*|)$/,yr=/^-(-[\w-]*)?$/;function wr(e,O){var a;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let t=(a=e.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:O.sliceString(t.from,t.to)=="var"}const de=new _e,Rr=["Declaration"];function Yr(e){for(let O=e;;){if(O.type.isTop)return O;if(!(O=O.parent))return e}}function Ot(e,O,a){if(O.to-O.from>4096){let t=de.get(O);if(t)return t;let r=[],s=new Set,i=O.cursor(vO.IncludeAnonymous);if(i.firstChild())do for(let o of Ot(e,i.node,a))s.has(o.label)||(s.add(o.label),r.push(o));while(i.nextSibling());return de.set(O,r),r}else{let t=[],r=new Set;return O.cursor().iterate(s=>{var i;if(a(s)&&s.matchContext(Rr)&&((i=s.node.nextSibling)===null||i===void 0?void 0:i.name)==":"){let o=e.sliceString(s.from,s.to);r.has(o)||(r.add(o),t.push({label:o,type:"variable"}))}}),t}}const Tr=e=>O=>{let{state:a,pos:t}=O,r=G(a).resolveInner(t,-1),s=r.type.isError&&r.from==r.to-1&&a.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:mO(),validFor:w};if(r.name=="ValueName")return{from:r.from,options:pe,validFor:w};if(r.name=="PseudoClassName")return{from:r.from,options:ue,validFor:w};if(e(r)||(O.explicit||s)&&wr(r,a.doc))return{from:e(r)||s?r.from:t,options:Ot(a.doc,Yr(r),e),validFor:yr};if(r.name=="TagName"){for(let{parent:n}=r;n;n=n.parent)if(n.name=="Block")return{from:r.from,options:mO(),validFor:w};return{from:r.from,options:xr,validFor:w}}if(r.name=="AtKeyword")return{from:r.from,options:Xr,validFor:w};if(!O.explicit)return null;let i=r.resolve(t),o=i.childBefore(t);return o&&o.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:ue,validFor:w}:o&&o.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:pe,validFor:w}:i.name=="Block"||i.name=="Styles"?{from:t,options:mO(),validFor:w}:null},Wr=Tr(e=>e.name=="VariableName"),QO=J.define({name:"css",parser:kr.configure({props:[L.add({Declaration:v()}),K.add({"Block KeyframeList":UO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function _r(){return new F(QO,QO.data.of({autocomplete:Wr}))}const qr=312,fe=1,vr=2,Ur=3,zr=4,Vr=313,jr=315,Gr=316,Cr=5,Ar=6,Er=0,wO=[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],et=125,Nr=59,RO=47,Mr=42,Ir=43,Dr=45,Br=60,Jr=44,Lr=63,Kr=46,Fr=new je({start:!1,shift(e,O){return O==Cr||O==Ar||O==jr?e:O==Gr},strict:!1}),Hr=new k((e,O)=>{let{next:a}=e;(a==et||a==-1||O.context)&&e.acceptToken(Vr)},{contextual:!0,fallback:!0}),Oi=new k((e,O)=>{let{next:a}=e,t;wO.indexOf(a)>-1||a==RO&&((t=e.peek(1))==RO||t==Mr)||a!=et&&a!=Nr&&a!=-1&&!O.context&&e.acceptToken(qr)},{contextual:!0}),ei=new k((e,O)=>{let{next:a}=e;if(a==Ir||a==Dr){if(e.advance(),a==e.next){e.advance();let t=!O.context&&O.canShift(fe);e.acceptToken(t?fe:vr)}}else a==Lr&&e.peek(1)==Kr&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(Ur))},{contextual:!0});function gO(e,O){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!O&&e>=48&&e<=57}const ti=new k((e,O)=>{if(e.next!=Br||!O.dialectEnabled(Er)||(e.advance(),e.next==RO))return;let a=0;for(;wO.indexOf(e.next)>-1;)e.advance(),a++;if(gO(e.next,!0)){for(e.advance(),a++;gO(e.next,!1);)e.advance(),a++;for(;wO.indexOf(e.next)>-1;)e.advance(),a++;if(e.next==Jr)return;for(let t=0;;t++){if(t==7){if(!gO(e.next,!0))return;break}if(e.next!="extends".charCodeAt(t))break;e.advance(),a++}}e.acceptToken(zr,-a)}),ai=B({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const using function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,"LineComment Hashbang":l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),ri={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},ii={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},si={__proto__:null,"<":187},oi=T.deserialize({version:14,states:"$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOOVQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-EpOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-EtQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-EzO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-EuQ?NdO1G0|O#>|Q?NdO1G0|O#AZQ07bO'#CiO#CUQ07bO1G1_O#C]Q07bO'#JnO#CpQ?NdO,5?WOOQ?Mp-EoQWO1G3oO$3VQ^O1G3qO$7ZQ^O'#HpOOQU1G3t1G3tO$7hQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$7pQ^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$;wQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$;|Q07bO,5:UOOQO,5;],5;]O$tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$=aQ?MxO1G0jO$=lQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$=zQ?MxO1G0jOOQO1G0Z1G0ZO$>`Q?NdO1G0jPOOO-EjQpO,5rQrO1G4fOOQO1G4l1G4lO%[Q^O,5>zO$>|QWO1G5uO$?UQWO1G6TO$?^QrO1G6UO9WQWO,5?QO$?hQ?NdO1G6RO%[Q^O1G6RO$?xQ?MxO1G6RO$@ZQWO1G6QO$@ZQWO1G6QO9WQWO1G6QO$@cQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$@wQWO,5?TO$(PQWO,5?TOOQO-E[OOQU,5>[,5>[O%[Q^O'#HqO%8mQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%8rQ`O1G5wO%9WQ07bO1G0wO%9bQWO1G0wOOQO1G/p1G/pO%9mQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$>`Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%9wQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%:SQ?MxO7+&UO%:bQ?NdO7++mO%[Q^O7++mO%:rQWO7++lO%:rQWO7++lOOQO1G4o1G4oO9WQWO1G4oO%:zQWO1G4oOOQQ7+%z7+%zO#&wQWO<|O%[Q^O,5>|OOQO-E<`-E<`O%FwQWO1G5xOOQ?Mr<]OOQU,5>_,5>_O&8uQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&8zQ07bO1G6UO>tQWO7+%[OOQ?Mr<tQWO<`Q?NdO<pQ?NdO,5?_O&@xQ?NdO7+'zO&CWQrO1G4hO&CbQ07bO7+&^O&EcQ07bO,5=UO&GgQ07bO,5=WO&GwQ07bO,5=UO&HXQ07bO,5=WO&HiQ07bO,59rO&JlQ07bO,5tQWO7+)hO'(OQWO<`Q?NdOAN?[OOQOAN>{AN>{O%[Q^OAN?[OOQO<`Q?NdOG24vO#&wQWOLD,nOOQULD,nLD,nO!&_Q7[OLD,nO'5TQrOLD,nO'5[Q07bO7+'xO'6}Q07bO,5?]O'8}Q07bO,5?_O':}Q07bO7+'zO'kOh%VOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%VO!i%cO~Oh%VO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%VO#]+zO~Oh%VOk+}O![$|O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%VO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP;POQ;POSfOdkOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO})zO!P){O(u%POk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%)nO})zO!P){Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%*aO(m$YO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(OQ#>g#@V#@e#@l#BR#Ba#C|#D[#Db#Dh#Dn#Dx#EO#EU#E`#Er#ExPPPPPPPPPP#FOPPPPPPP#Fs#Iz#KZ#Kb#KjPPP$!sP$!|$%t$,^$,a$,d$-P$-S$-Z$-cP$-i$-lP$.Y$.^$/U$0d$0i$1PPP$1U$1[$1`P$1c$1g$1k$2a$2x$3a$3e$3h$3k$3q$3t$3x$3|R!|RoqOXst!Z#d%k&o&q&r&t,k,p1|2PY!vQ']-]1a5eQ%rvQ%zyQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{ < 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 : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < 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 InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression 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:376,context:Fr,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[ai],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!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$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(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(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%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%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%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)3p/x`$h&j!m),Q(Rp(U!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(KW1V`#u(Ch$h&j(Rp(U!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(KW2d_#u(Ch$h&j(Rp(U!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'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%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'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!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)[#Jv_al$h&j(Rp(U!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%Z04f#LS^h#)`#O-ri[e]||-1},{term:338,get:e=>ii[e]||-1},{term:92,get:e=>si[e]||-1}],tokenPrec:14749}),tt=[S("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),S("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),S("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),S("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),S("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),S(`try { +import{S as wt,i as Rt,s as Yt,e as Tt,f as Wt,Z as OO,g as _t,y as BO,o as qt,J as vt,N as Ut,O as zt,L as Vt,C as jt,P as Gt}from"./index-DzzLh2vW.js";import{P as Ct,N as At,w as Et,D as Nt,x as qO,T as tO,I as vO,y as B,z as l,A as Mt,L as J,B as L,F as v,G as K,H as UO,J as F,v as G,K as _e,M as It,O as Dt,Q as qe,R as ve,U as Ue,E as q,V as ze,W as S,X as Bt,Y as Jt,b as C,e as Lt,f as Kt,g as Ft,i as Ht,j as Oa,k as ea,u as ta,l as aa,m as ra,r as ia,n as sa,o as oa,c as la,d as na,s as ca,h as Qa,a as ha,p as ua,q as JO,C as eO}from"./index-B5ReTu-C.js";var LO={};class sO{constructor(O,a,t,r,s,i,o,n,Q,u=0,c){this.p=O,this.stack=a,this.state=t,this.reducePos=r,this.pos=s,this.score=i,this.buffer=o,this.bufferBase=n,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((O,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,a,t=0){let r=O.parser.context;return new sO(O,[],a,t,t,0,[],0,r?new KO(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var a;let t=O>>19,r=O&65535,{parser:s}=this.p,i=this.reducePos=2e3&&!(!((a=this.p.parser.nodeSet.types[r])===null||a===void 0)&&a.isAnonymous)&&(Q==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(r,Q)}storeNode(O,a,t,r=4,s=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&i.buffer[o-4]==0&&i.buffer[o-1]>-1){if(a==t)return;if(i.buffer[o-2]>=a){i.buffer[o-2]=t;return}}}if(!s||this.pos==t)this.buffer.push(O,a,t,r);else{let i=this.buffer.length;if(i>0&&this.buffer[i-4]!=0){let o=!1;for(let n=i;n>0&&this.buffer[n-2]>t;n-=4)if(this.buffer[n-1]>=0){o=!0;break}if(o)for(;i>0&&this.buffer[i-2]>t;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=O,this.buffer[i+1]=a,this.buffer[i+2]=t,this.buffer[i+3]=r}}shift(O,a,t,r){if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=r,this.shiftContext(a,t),a<=this.p.parser.maxNode&&this.buffer.push(a,t,r,4);else{let s=O,{parser:i}=this.p;(r>this.pos||a<=i.maxNode)&&(this.pos=r,i.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,t),this.shiftContext(a,t),a<=i.maxNode&&this.buffer.push(a,t,r,4)}}apply(O,a,t,r){O&65536?this.reduce(O):this.shift(O,a,t,r)}useNode(O,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let r=this.pos;this.reducePos=this.pos=r+O.length,this.pushState(a,r),this.buffer.push(t,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,a=O.buffer.length;for(;a>0&&O.buffer[a-2]>O.reducePos;)a-=4;let t=O.buffer.slice(a),r=O.bufferBase+a;for(;O&&r==O.bufferBase;)O=O.parent;return new sO(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,r,this.curContext,this.lookAhead,O)}recoverByDelete(O,a){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(O){for(let a=new pa(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,O);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>8||this.stack.length>=120){let r=[];for(let s=0,i;sn&1&&o==i)||r.push(a[s],i)}a=r}let t=[];for(let r=0;r>19,r=a&65535,s=this.stack.length-t*3;if(s<0||O.getGoto(this.stack[s],r,!1)<0){let i=this.findForcedReduction();if(i==null)return!1;a=i}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(a),!0}findForcedReduction(){let{parser:O}=this.p,a=[],t=(r,s)=>{if(!a.includes(r))return a.push(r),O.allActions(r,i=>{if(!(i&393216))if(i&65536){let o=(i>>19)-s;if(o>1){let n=i&65535,Q=this.stack.length-o*3;if(Q>=0&&O.getGoto(this.stack[Q],n,!1)>=0)return o<<19|65536|n}}else{let o=t(i,s+1);if(o!=null)return o}})};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:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class KO{constructor(O,a){this.tracker=O,this.context=a,this.hash=O.strict?O.hash(a):0}}class pa{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let a=O&65535,t=O>>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 r=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=r}}class oO{constructor(O,a,t){this.stack=O,this.pos=a,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,a=O.bufferBase+O.buffer.length){return new oO(O,a,a-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.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 oO(this.stack,this.pos,this.index)}}function N(e,O=Uint16Array){if(typeof e!="string")return e;let a=null;for(let t=0,r=0;t=92&&i--,i>=34&&i--;let n=i-32;if(n>=46&&(n-=46,o=!0),s+=n,o)break;s*=46}a?a[r++]=s:a=new O(s)}return a}class aO{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const FO=new aO;class da{constructor(O,a){this.input=O,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=FO,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(O,a){let t=this.range,r=this.rangeIndex,s=this.pos+O;for(;st.to:s>=t.to;){if(r==this.ranges.length-1)return null;let i=this.ranges[++r];s+=i.from-t.to,t=i}return s}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,a.from);return this.end}peek(O){let a=this.chunkOff+O,t,r;if(a>=0&&a=this.chunk2Pos&&to.to&&(this.chunk2=this.chunk2.slice(0,o.to-t)),r=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),r}acceptToken(O,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,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(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,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(O,a){if(a?(this.token=a,a.start=O,a.lookAhead=O+1,a.value=a.extended=-1):this.token=FO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,a-this.chunkPos);if(O>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,a-this.chunk2Pos);if(O>=this.range.from&&a<=this.range.to)return this.input.read(O,a);let t="";for(let r of this.ranges){if(r.from>=a)break;r.to>O&&(t+=this.input.read(Math.max(r.from,O),Math.min(r.to,a)))}return t}}class z{constructor(O,a){this.data=O,this.id=a}token(O,a){let{parser:t}=a.p;Ve(this.data,O,a,this.id,t.data,t.tokenPrecTable)}}z.prototype.contextual=z.prototype.fallback=z.prototype.extend=!1;class lO{constructor(O,a,t){this.precTable=a,this.elseToken=t,this.data=typeof O=="string"?N(O):O}token(O,a){let t=O.pos,r=0;for(;;){let s=O.next<0,i=O.resolveOffset(1,1);if(Ve(this.data,O,a,0,this.data,this.precTable),O.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,i==null)break;O.reset(i,O.token)}r&&(O.reset(t,O.token),O.acceptToken(this.elseToken,r))}}lO.prototype.contextual=z.prototype.fallback=z.prototype.extend=!1;class k{constructor(O,a={}){this.token=O,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function Ve(e,O,a,t,r,s){let i=0,o=1<0){let d=e[h];if(n.allows(d)&&(O.token.value==-1||O.token.value==d||fa(d,O.token.value,r,s))){O.acceptToken(d);break}}let u=O.next,c=0,f=e[i+2];if(O.next<0&&f>c&&e[Q+f*3-3]==65535){i=e[Q+f*3-1];continue O}for(;c>1,d=Q+h+(h<<1),P=e[d],m=e[d+1]||65536;if(u=m)c=h+1;else{i=e[d+2],O.advance();continue O}}break}}function HO(e,O,a){for(let t=O,r;(r=e[t])!=65535;t++)if(r==a)return t-O;return-1}function fa(e,O,a,t){let r=HO(a,t,O);return r<0||HO(a,t,e)O)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(e.length,Math.max(t.from+1,O+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:e.length}}class $a{constructor(O,a){this.fragments=O,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 O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?Oe(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?Oe(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=i,null;if(s instanceof tO){if(i==O){if(i=Math.max(this.safeFrom,O)&&(this.trees.push(s),this.start.push(i),this.index.push(0))}else this.index[a]++,this.nextStart=i+s.length}}}class Pa{constructor(O,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new aO)}getActions(O){let a=0,t=null,{parser:r}=O.p,{tokenizers:s}=r,i=r.stateSlot(O.state,3),o=O.curContext?O.curContext.hash:0,n=0;for(let Q=0;Qc.end+25&&(n=Math.max(c.lookAhead,n)),c.value!=0)){let f=a;if(c.extended>-1&&(a=this.addActions(O,c.extended,c.end,a)),a=this.addActions(O,c.value,c.end,a),!u.extend&&(t=c,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return n&&O.setLookAhead(n),!t&&O.pos==this.stream.end&&(t=new aO,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,a=this.addActions(O,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let a=new aO,{pos:t,p:r}=O;return a.start=t,a.end=Math.min(t+1,r.stream.end),a.value=t==r.stream.end?r.parser.eofTerm:0,a}updateCachedToken(O,a,t){let r=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(r,O),t),O.value>-1){let{parser:s}=t.p;for(let i=0;i=0&&t.p.parser.dialect.allows(o>>1)){o&1?O.extended=o>>1:O.value=o>>1;break}}}else O.value=0,O.end=this.stream.clipPos(r+1)}putAction(O,a,t,r){for(let s=0;sO.bufferLength*4?new $a(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,a=this.minStackPos,t=this.stacks=[],r,s;if(this.bigReductionCount>300&&O.length==1){let[i]=O;for(;i.forceReduce()&&i.stack.length&&i.stack[i.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;ia)t.push(o);else{if(this.advanceStack(o,t,O))continue;{r||(r=[],s=[]),r.push(o);let n=this.tokens.getMainToken(o);s.push(n.value,n.end)}}break}}if(!t.length){let i=r&&Sa(r);if(i)return Z&&console.log("Finish with "+this.stackID(i)),this.stackToTree(i);if(this.parser.strict)throw Z&&r&&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&&r){let i=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,t);if(i)return Z&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let i=this.recovering==1?1:this.recovering*3;if(t.length>i)for(t.sort((o,n)=>n.score-o.score);t.length>i;)t.pop();t.some(o=>o.reducePos>a)&&this.recovering--}else if(t.length>1){O:for(let i=0;i500&&Q.buffer.length>500)if((o.score-Q.score||o.buffer.length-Q.buffer.length)>0)t.splice(n--,1);else{t.splice(i--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let i=1;i ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let Q=O.curContext&&O.curContext.tracker.strict,u=Q?O.curContext.hash:0;for(let c=this.fragments.nodeAt(r);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?s.getGoto(O.state,c.type.id):-1;if(f>-1&&c.length&&(!Q||(c.prop(qO.contextHash)||0)==u))return O.useNode(c,f),Z&&console.log(i+this.stackID(O)+` (via reuse of ${s.getName(c.type.id)})`),!0;if(!(c instanceof tO)||c.children.length==0||c.positions[0]>0)break;let h=c.children[0];if(h instanceof tO&&c.positions[0]==0)c=h;else break}}let o=s.stateSlot(O.state,4);if(o>0)return O.reduce(o),Z&&console.log(i+this.stackID(O)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(O.stack.length>=8400)for(;O.stack.length>6e3&&O.forceReduce(););let n=this.tokens.getActions(O);for(let Q=0;Qr?a.push(d):t.push(d)}return!1}advanceFully(O,a){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return ee(O,a),!0}}runRecovery(O,a,t){let r=null,s=!1;for(let i=0;i ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),Z&&console.log(u+this.stackID(o)+" (restarted)"),this.advanceFully(o,t))))continue;let c=o.split(),f=u;for(let h=0;c.forceReduce()&&h<10&&(Z&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));h++)Z&&(f=this.stackID(c)+" -> ");for(let h of o.recoverByInsert(n))Z&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,t);this.stream.end>o.pos?(Q==o.pos&&(Q++,n=0),o.recoverByDelete(n,Q),Z&&console.log(u+this.stackID(o)+` (via recover-delete ${this.parser.getName(n)})`),ee(o,t)):(!r||r.scoree;class je{constructor(O){this.start=O.start,this.shift=O.shift||dO,this.reduce=O.reduce||dO,this.reuse=O.reuse||dO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class T extends Ct{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (14)`);let a=O.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let o=0;oO.topRules[o][1]),r=[];for(let o=0;o=0)s(u,n,o[Q++]);else{let c=o[Q+-u];for(let f=-u;f>0;f--)s(o[Q++],n,c);Q++}}}this.nodeSet=new At(a.map((o,n)=>Et.define({name:n>=this.minRepeatTerm?void 0:o,id:n,props:r[n],top:t.indexOf(n)>-1,error:n==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(n)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Nt;let i=N(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;otypeof o=="number"?new z(i,o):o),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,a,t){let r=new ma(this,O,a,t);for(let s of this.wrappers)r=s(r,O,a,t);return r}getGoto(O,a,t=!1){let r=this.goto;if(a>=r[0])return-1;for(let s=r[a+1];;){let i=r[s++],o=i&1,n=r[s++];if(o&&t)return n;for(let Q=s+(i>>1);s0}validAction(O,a){return!!this.allActions(O,t=>t==a?!0:null)}allActions(O,a){let t=this.stateSlot(O,4),r=t?a(t):void 0;for(let s=this.stateSlot(O,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=R(this.data,s+2);else break;r=a(R(this.data,s+1))}return r}nextStates(O){let a=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=R(this.data,t+2);else break;if(!(this.data[t+2]&1)){let r=this.data[t+1];a.some((s,i)=>i&1&&s==r)||a.push(this.data[t],r)}}return a}configure(O){let a=Object.assign(Object.create(T.prototype),this);if(O.props&&(a.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);a.top=t}return O.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let r=O.tokenizers.find(s=>s.from==t);return r?r.to:t})),O.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,r)=>{let s=O.specializers.find(o=>o.from==t.external);if(!s)return t;let i=Object.assign(Object.assign({},t),{external:s.to});return a.specializers[r]=te(i),i})),O.contextTracker&&(a.context=O.contextTracker),O.dialect&&(a.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(a.strict=O.strict),O.wrap&&(a.wrappers=a.wrappers.concat(O.wrap)),O.bufferLength!=null&&(a.bufferLength=O.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let a=this.dynamicPrecedences;return a==null?0:a[O]||0}parseDialect(O){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(O)for(let s of O.split(" ")){let i=a.indexOf(s);i>=0&&(t[i]=!0)}let r=null;for(let s=0;st)&&a.p.parser.stateFlag(a.state,2)&&(!O||O.scoree.external(a,t)<<1|O}return e.get}const Za=54,ba=1,ka=55,xa=2,Xa=56,ya=3,ae=4,wa=5,nO=6,Ge=7,Ce=8,Ae=9,Ee=10,Ra=11,Ya=12,Ta=13,fO=57,Wa=14,re=58,Ne=20,_a=22,Me=23,qa=24,XO=26,Ie=27,va=28,Ua=31,za=34,Va=36,ja=37,Ga=0,Ca=1,Aa={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},Ea={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},ie={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 Na(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function De(e){return e==9||e==10||e==13||e==32}let se=null,oe=null,le=0;function yO(e,O){let a=e.pos+O;if(le==a&&oe==e)return se;let t=e.peek(O);for(;De(t);)t=e.peek(++O);let r="";for(;Na(t);)r+=String.fromCharCode(t),t=e.peek(++O);return oe=e,le=a,se=r?r.toLowerCase():t==Ma||t==Ia?void 0:null}const Be=60,cO=62,zO=47,Ma=63,Ia=33,Da=45;function ne(e,O){this.name=e,this.parent=O}const Ba=[nO,Ee,Ge,Ce,Ae],Ja=new je({start:null,shift(e,O,a,t){return Ba.indexOf(O)>-1?new ne(yO(t,1)||"",e):e},reduce(e,O){return O==Ne&&e?e.parent:e},reuse(e,O,a,t){let r=O.type.id;return r==nO||r==Va?new ne(yO(t,1)||"",e):e},strict:!1}),La=new k((e,O)=>{if(e.next!=Be){e.next<0&&O.context&&e.acceptToken(fO);return}e.advance();let a=e.next==zO;a&&e.advance();let t=yO(e,0);if(t===void 0)return;if(!t)return e.acceptToken(a?Wa:nO);let r=O.context?O.context.name:null;if(a){if(t==r)return e.acceptToken(Ra);if(r&&Ea[r])return e.acceptToken(fO,-2);if(O.dialectEnabled(Ga))return e.acceptToken(Ya);for(let s=O.context;s;s=s.parent)if(s.name==t)return;e.acceptToken(Ta)}else{if(t=="script")return e.acceptToken(Ge);if(t=="style")return e.acceptToken(Ce);if(t=="textarea")return e.acceptToken(Ae);if(Aa.hasOwnProperty(t))return e.acceptToken(Ee);r&&ie[r]&&ie[r][t]?e.acceptToken(fO,-1):e.acceptToken(nO)}},{contextual:!0}),Ka=new k(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(re);break}if(e.next==Da)O++;else if(e.next==cO&&O>=2){a>=3&&e.acceptToken(re,-2);break}else O=0;e.advance()}});function Fa(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Ha=new k((e,O)=>{if(e.next==zO&&e.peek(1)==cO){let a=O.dialectEnabled(Ca)||Fa(O.context);e.acceptToken(a?wa:ae,2)}else e.next==cO&&e.acceptToken(ae,1)});function VO(e,O,a){let t=2+e.length;return new k(r=>{for(let s=0,i=0,o=0;;o++){if(r.next<0){o&&r.acceptToken(O);break}if(s==0&&r.next==Be||s==1&&r.next==zO||s>=2&&si?r.acceptToken(O,-i):r.acceptToken(a,-(i-2));break}else if((r.next==10||r.next==13)&&o){r.acceptToken(O,1);break}else s=i=0;r.advance()}})}const Or=VO("script",Za,ba),er=VO("style",ka,xa),tr=VO("textarea",Xa,ya),ar=B({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),rr=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%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#CxO&dOaO,59[OOOb'#D_'#D_O&lObO'#C{O&wObO,59[OOOd'#D`'#D`O'POdO'#DOO'[OdO,59[OOO`'#Da'#DaO'dO!rO,59[O'kQ#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'pO$fO,59oOOO`,59o,59oO'xQ#|O,59qO'}Q#|O,59rOOO`-E7W-E7WO(SQ&rO'#CsOOQW'#DZ'#DZO(bQ&rO1G.wOOOa1G.w1G.wOOO`1G/Y1G/YO(mQ&rO1G/QOOOb1G/Q1G/QO(xQ&rO1G/TOOOd1G/T1G/TO)TQ&rO1G/WOOO`1G/W1G/WO)`Q&rO1G/YOOOa-E7[-E7[O)kQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)pQ#tO'#C|OOOd-E7^-E7^O)uQ#tO'#DPOOO`-E7_-E7_O)zQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O*PQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOO`7+$t7+$tOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rO*[Q#|O,59eO*aQ#|O,59hO*fQ#|O,59kOOO`1G/X1G/XO*kO7[O'#CvO*|OMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O+_O7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+pOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:",]~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|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~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!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~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{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!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:Ja,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"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[ar],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=o.type.id;if(Q==va)return $O(o,n,a);if(Q==Ua)return $O(o,n,t);if(Q==za)return $O(o,n,r);if(Q==Ne&&s.length){let u=o.node,c=u.firstChild,f=c&&ce(c,n),h;if(f){for(let d of s)if(d.tag==f&&(!d.attrs||d.attrs(h||(h=Je(c,n))))){let P=u.lastChild,m=P.type.id==ja?P.from:u.to;if(m>c.to)return{parser:d.parser,overlay:[{from:c.to,to:m}]}}}}if(i&&Q==Me){let u=o.node,c;if(c=u.firstChild){let f=i[n.read(c.from,c.to)];if(f)for(let h of f){if(h.tagName&&h.tagName!=ce(u.parent,n))continue;let d=u.lastChild;if(d.type.id==XO){let P=d.from+1,m=d.lastChild,x=d.to-(m&&m.isError?0:1);if(x>P)return{parser:h.parser,overlay:[{from:P,to:x}]}}else if(d.type.id==Ie)return{parser:h.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}const ir=99,Qe=1,sr=100,or=101,he=2,Ke=[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],lr=58,nr=40,Fe=95,cr=91,rO=45,Qr=46,hr=35,ur=37,pr=38,dr=92,fr=10;function M(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function He(e){return e>=48&&e<=57}const $r=new k((e,O)=>{for(let a=!1,t=0,r=0;;r++){let{next:s}=e;if(M(s)||s==rO||s==Fe||a&&He(s))!a&&(s!=rO||r>0)&&(a=!0),t===r&&s==rO&&t++,e.advance();else if(s==dr&&e.peek(1)!=fr)e.advance(),e.next>-1&&e.advance(),a=!0;else{a&&e.acceptToken(s==nr?sr:t==2&&O.canShift(he)?he:or);break}}}),Pr=new k(e=>{if(Ke.includes(e.peek(-1))){let{next:O}=e;(M(O)||O==Fe||O==hr||O==Qr||O==cr||O==lr&&M(e.peek(1))||O==rO||O==pr)&&e.acceptToken(ir)}}),mr=new k(e=>{if(!Ke.includes(e.peek(-1))){let{next:O}=e;if(O==ur&&(e.advance(),e.acceptToken(Qe)),M(O)){do e.advance();while(M(e.next)||He(e.next));e.acceptToken(Qe)}}}),gr=B({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,KeyframeRangeName:l.operatorKeyword,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ColorLiteral:l.color,"ParenthesizedContent StringLiteral":l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Sr={__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:138},Zr={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},br={__proto__:null,not:132,only:132},kr=T.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,59rO(aQ[O,59uO(aQ[O,59wO(aQ[O,59xO)`Q[O'#DbOOQS,58{,58{OOQP'#Ck'#CkOOQO'#DR'#DROOQP,59S,59SO)gQWO,59SO)lQWO,59SOOQP'#DV'#DVOOQP,59o,59oOOQO'#DX'#DXO)qQ`O,59rOOQS'#Cp'#CpO${QdO'#CqO)yQvO'#CsO+ZQtO,5:ROOQO'#Cx'#CxO)lQWO'#CwO+oQWO'#CyO+tQ[O'#DOOOQS'#Ep'#EpOOQO'#Dj'#DjO+|Q[O'#DqO,[QWO'#EtO&`Q[O'#DoO,jQWO'#DrOOQO'#Eu'#EuO)OQWO,5:`O,oQpO,5:bOOQS'#Dz'#DzO,wQWO,5:dO,|Q[O,5:dOOQO'#D}'#D}O-UQWO,5:gO-ZQWO,5:mO-cQWO,5:oOOQS-E8U-E8UO-kQdO,59}O-{Q[O'#E^O.YQWO,5;_O.YQWO,5;_POOO'#EV'#EVP.eO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO/[QXO,5:vOOQO-E8Y-E8YOOQS1G.g1G.gOOQP1G.n1G.nO)gQWO1G.nO)lQWO1G.nOOQP1G/Z1G/ZO/iQ`O1G/^O0SQXO1G/aO0jQXO1G/cO1QQXO1G/dO1hQWO,59|O1mQ[O'#DSO1tQdO'#CoOOQP1G/^1G/^O${QdO1G/^O1{QpO,59]OOQS,59_,59_O${QdO,59aO2TQWO1G/mOOQS,59c,59cO2YQ!bO,59eOOQS'#DP'#DPOOQS'#EY'#EYO2eQ[O,59jOOQS,59j,59jO2mQWO'#DjO2xQWO,5:VO2}QWO,5:]O&`Q[O,5:XO&`Q[O'#E_O3VQWO,5;`O3bQWO,5:ZO(aQ[O,5:^OOQS1G/z1G/zOOQS1G/|1G/|OOQS1G0O1G0OO3sQWO1G0OO3xQdO'#EOOOQS1G0R1G0ROOQS1G0X1G0XOOQS1G0Z1G0ZO4TQtO1G/iOOQO1G/i1G/iOOQO,5:x,5:xO4kQ[O,5:xOOQO-E8[-E8[O4xQWO1G0yPOOO-E8T-E8TPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$x7+$xO${QdO7+$xOOQS1G/h1G/hO5TQXO'#ErO5[QWO,59nO5aQtO'#EXO6XQdO'#EoO6cQWO,59ZO6hQpO7+$xOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%X7+%XOOQS1G/P1G/PO6pQWO1G/POOQS-E8W-E8WOOQS1G/U1G/UO${QdO1G/qOOQO1G/w1G/wOOQO1G/s1G/sO6uQWO,5:yOOQO-E8]-E8]O7TQXO1G/xOOQS7+%j7+%jO7[QYO'#CsOOQO'#EQ'#EQO7gQ`O'#EPOOQO'#EP'#EPO7rQWO'#E`O7zQdO,5:jOOQS,5:j,5:jO8VQtO'#E]O${QdO'#E]O9WQdO7+%TOOQO7+%T7+%TOOQO1G0d1G0dO9kQpO<OAN>OO;]QdO,5:uOOQO-E8X-E8XOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSt^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#bQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#[~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[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!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^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!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[Pr,mr,$r,1,2,3,4,new lO("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:e=>Sr[e]||-1},{term:58,get:e=>Zr[e]||-1},{term:101,get:e=>br[e]||-1}],tokenPrec:1219});let PO=null;function mO(){if(!PO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],a=new Set;for(let t in e)t!="cssText"&&t!="cssFloat"&&typeof e[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),a.has(t)||(O.push(t),a.add(t)));PO=O.sort().map(t=>({type:"property",label:t}))}return PO||[]}const ue=["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(e=>({type:"class",label:e})),pe=["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(e=>({type:"keyword",label:e})).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(e=>({type:"constant",label:e}))),xr=["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(e=>({type:"type",label:e})),Xr=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),w=/^(\w[\w-]*|-\w[\w-]*|)$/,yr=/^-(-[\w-]*)?$/;function wr(e,O){var a;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let t=(a=e.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:O.sliceString(t.from,t.to)=="var"}const de=new _e,Rr=["Declaration"];function Yr(e){for(let O=e;;){if(O.type.isTop)return O;if(!(O=O.parent))return e}}function Ot(e,O,a){if(O.to-O.from>4096){let t=de.get(O);if(t)return t;let r=[],s=new Set,i=O.cursor(vO.IncludeAnonymous);if(i.firstChild())do for(let o of Ot(e,i.node,a))s.has(o.label)||(s.add(o.label),r.push(o));while(i.nextSibling());return de.set(O,r),r}else{let t=[],r=new Set;return O.cursor().iterate(s=>{var i;if(a(s)&&s.matchContext(Rr)&&((i=s.node.nextSibling)===null||i===void 0?void 0:i.name)==":"){let o=e.sliceString(s.from,s.to);r.has(o)||(r.add(o),t.push({label:o,type:"variable"}))}}),t}}const Tr=e=>O=>{let{state:a,pos:t}=O,r=G(a).resolveInner(t,-1),s=r.type.isError&&r.from==r.to-1&&a.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:mO(),validFor:w};if(r.name=="ValueName")return{from:r.from,options:pe,validFor:w};if(r.name=="PseudoClassName")return{from:r.from,options:ue,validFor:w};if(e(r)||(O.explicit||s)&&wr(r,a.doc))return{from:e(r)||s?r.from:t,options:Ot(a.doc,Yr(r),e),validFor:yr};if(r.name=="TagName"){for(let{parent:n}=r;n;n=n.parent)if(n.name=="Block")return{from:r.from,options:mO(),validFor:w};return{from:r.from,options:xr,validFor:w}}if(r.name=="AtKeyword")return{from:r.from,options:Xr,validFor:w};if(!O.explicit)return null;let i=r.resolve(t),o=i.childBefore(t);return o&&o.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:ue,validFor:w}:o&&o.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:pe,validFor:w}:i.name=="Block"||i.name=="Styles"?{from:t,options:mO(),validFor:w}:null},Wr=Tr(e=>e.name=="VariableName"),QO=J.define({name:"css",parser:kr.configure({props:[L.add({Declaration:v()}),K.add({"Block KeyframeList":UO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function _r(){return new F(QO,QO.data.of({autocomplete:Wr}))}const qr=312,fe=1,vr=2,Ur=3,zr=4,Vr=313,jr=315,Gr=316,Cr=5,Ar=6,Er=0,wO=[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],et=125,Nr=59,RO=47,Mr=42,Ir=43,Dr=45,Br=60,Jr=44,Lr=63,Kr=46,Fr=new je({start:!1,shift(e,O){return O==Cr||O==Ar||O==jr?e:O==Gr},strict:!1}),Hr=new k((e,O)=>{let{next:a}=e;(a==et||a==-1||O.context)&&e.acceptToken(Vr)},{contextual:!0,fallback:!0}),Oi=new k((e,O)=>{let{next:a}=e,t;wO.indexOf(a)>-1||a==RO&&((t=e.peek(1))==RO||t==Mr)||a!=et&&a!=Nr&&a!=-1&&!O.context&&e.acceptToken(qr)},{contextual:!0}),ei=new k((e,O)=>{let{next:a}=e;if(a==Ir||a==Dr){if(e.advance(),a==e.next){e.advance();let t=!O.context&&O.canShift(fe);e.acceptToken(t?fe:vr)}}else a==Lr&&e.peek(1)==Kr&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(Ur))},{contextual:!0});function gO(e,O){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!O&&e>=48&&e<=57}const ti=new k((e,O)=>{if(e.next!=Br||!O.dialectEnabled(Er)||(e.advance(),e.next==RO))return;let a=0;for(;wO.indexOf(e.next)>-1;)e.advance(),a++;if(gO(e.next,!0)){for(e.advance(),a++;gO(e.next,!1);)e.advance(),a++;for(;wO.indexOf(e.next)>-1;)e.advance(),a++;if(e.next==Jr)return;for(let t=0;;t++){if(t==7){if(!gO(e.next,!0))return;break}if(e.next!="extends".charCodeAt(t))break;e.advance(),a++}}e.acceptToken(zr,-a)}),ai=B({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const using function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,"LineComment Hashbang":l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),ri={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},ii={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},si={__proto__:null,"<":187},oi=T.deserialize({version:14,states:"$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOOVQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-EpOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-EtQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-EzO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-EuQ?NdO1G0|O#>|Q?NdO1G0|O#AZQ07bO'#CiO#CUQ07bO1G1_O#C]Q07bO'#JnO#CpQ?NdO,5?WOOQ?Mp-EoQWO1G3oO$3VQ^O1G3qO$7ZQ^O'#HpOOQU1G3t1G3tO$7hQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$7pQ^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$;wQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$;|Q07bO,5:UOOQO,5;],5;]O$tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$=aQ?MxO1G0jO$=lQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$=zQ?MxO1G0jOOQO1G0Z1G0ZO$>`Q?NdO1G0jPOOO-EjQpO,5rQrO1G4fOOQO1G4l1G4lO%[Q^O,5>zO$>|QWO1G5uO$?UQWO1G6TO$?^QrO1G6UO9WQWO,5?QO$?hQ?NdO1G6RO%[Q^O1G6RO$?xQ?MxO1G6RO$@ZQWO1G6QO$@ZQWO1G6QO9WQWO1G6QO$@cQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$@wQWO,5?TO$(PQWO,5?TOOQO-E[OOQU,5>[,5>[O%[Q^O'#HqO%8mQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%8rQ`O1G5wO%9WQ07bO1G0wO%9bQWO1G0wOOQO1G/p1G/pO%9mQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$>`Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%9wQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%:SQ?MxO7+&UO%:bQ?NdO7++mO%[Q^O7++mO%:rQWO7++lO%:rQWO7++lOOQO1G4o1G4oO9WQWO1G4oO%:zQWO1G4oOOQQ7+%z7+%zO#&wQWO<|O%[Q^O,5>|OOQO-E<`-E<`O%FwQWO1G5xOOQ?Mr<]OOQU,5>_,5>_O&8uQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&8zQ07bO1G6UO>tQWO7+%[OOQ?Mr<tQWO<`Q?NdO<pQ?NdO,5?_O&@xQ?NdO7+'zO&CWQrO1G4hO&CbQ07bO7+&^O&EcQ07bO,5=UO&GgQ07bO,5=WO&GwQ07bO,5=UO&HXQ07bO,5=WO&HiQ07bO,59rO&JlQ07bO,5tQWO7+)hO'(OQWO<`Q?NdOAN?[OOQOAN>{AN>{O%[Q^OAN?[OOQO<`Q?NdOG24vO#&wQWOLD,nOOQULD,nLD,nO!&_Q7[OLD,nO'5TQrOLD,nO'5[Q07bO7+'xO'6}Q07bO,5?]O'8}Q07bO,5?_O':}Q07bO7+'zO'kOh%VOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%VO!i%cO~Oh%VO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%VO#]+zO~Oh%VOk+}O![$|O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%VO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP;POQ;POSfOdkOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO})zO!P){O(u%POk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%)nO})zO!P){Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%*aO(m$YO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(OQ#>g#@V#@e#@l#BR#Ba#C|#D[#Db#Dh#Dn#Dx#EO#EU#E`#Er#ExPPPPPPPPPP#FOPPPPPPP#Fs#Iz#KZ#Kb#KjPPP$!sP$!|$%t$,^$,a$,d$-P$-S$-Z$-cP$-i$-lP$.Y$.^$/U$0d$0i$1PPP$1U$1[$1`P$1c$1g$1k$2a$2x$3a$3e$3h$3k$3q$3t$3x$3|R!|RoqOXst!Z#d%k&o&q&r&t,k,p1|2PY!vQ']-]1a5eQ%rvQ%zyQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{ < 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 : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < 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 InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression 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:376,context:Fr,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[ai],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!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$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(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(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%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%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%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)3p/x`$h&j!m),Q(Rp(U!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(KW1V`#u(Ch$h&j(Rp(U!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(KW2d_#u(Ch$h&j(Rp(U!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'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%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'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!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)[#Jv_al$h&j(Rp(U!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%Z04f#LS^h#)`#O-ri[e]||-1},{term:338,get:e=>ii[e]||-1},{term:92,get:e=>si[e]||-1}],tokenPrec:14749}),tt=[S("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),S("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),S("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),S("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),S("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),S(`try { \${} } catch (\${error}) { \${} diff --git a/ui/dist/assets/CreateApiDocs-CSumiDHV.js b/ui/dist/assets/CreateApiDocs-Bwq-g1yE.js similarity index 99% rename from ui/dist/assets/CreateApiDocs-CSumiDHV.js rename to ui/dist/assets/CreateApiDocs-Bwq-g1yE.js index 1b5ae30e..a98f1b50 100644 --- a/ui/dist/assets/CreateApiDocs-CSumiDHV.js +++ b/ui/dist/assets/CreateApiDocs-Bwq-g1yE.js @@ -1,4 +1,4 @@ -import{S as $t,i as qt,s as Tt,Q as St,C as ee,T as ue,R as Ct,e as s,w as _,b as p,c as $e,f as w,g as r,h as i,m as qe,x as oe,U as Ve,V as pt,k as Ot,W as Mt,n as Pt,t as ye,a as ve,o as d,d as Te,p as Ft,r as Se,u as Lt,y as we,E as Ht}from"./index-C6KFFkct.js";import{F as Rt}from"./FieldsQueryParam-9HzYyPBO.js";function mt(a,e,t){const l=a.slice();return l[10]=e[t],l}function bt(a,e,t){const l=a.slice();return l[10]=e[t],l}function _t(a,e,t){const l=a.slice();return l[15]=e[t],l}function kt(a){let e;return{c(){e=s("p"),e.innerHTML="Requires superuser Authorization:TOKEN header",w(e,"class","txt-hint txt-sm txt-right")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function ht(a){let e,t,l,u,c,f,b,m,$,h,g,B,S,O,R,M,U,J,T,W,P,q,k,F,te,K,I,re,Y,x,G;function fe(y,C){var V,z,H;return C&1&&(f=null),f==null&&(f=!!((H=(z=(V=y[0])==null?void 0:V.fields)==null?void 0:z.find(xt))!=null&&H.required)),f?Bt:At}let le=fe(a,-1),E=le(a);function X(y,C){var V,z,H;return C&1&&(U=null),U==null&&(U=!!((H=(z=(V=y[0])==null?void 0:V.fields)==null?void 0:z.find(Yt))!=null&&H.required)),U?Vt:jt}let Z=X(a,-1),L=Z(a);return{c(){e=s("tr"),e.innerHTML='Auth specific fields',t=p(),l=s("tr"),u=s("td"),c=s("div"),E.c(),b=p(),m=s("span"),m.textContent="email",$=p(),h=s("td"),h.innerHTML='String',g=p(),B=s("td"),B.textContent="Auth record email address.",S=p(),O=s("tr"),R=s("td"),M=s("div"),L.c(),J=p(),T=s("span"),T.textContent="emailVisibility",W=p(),P=s("td"),P.innerHTML='Boolean',q=p(),k=s("td"),k.textContent="Whether to show/hide the auth record email when fetching the record data.",F=p(),te=s("tr"),te.innerHTML='
Required password
String Auth record password.',K=p(),I=s("tr"),I.innerHTML='
Required passwordConfirm
String Auth record password confirmation.',re=p(),Y=s("tr"),Y.innerHTML=`
Optional verified
Boolean Indicates whether the auth record is verified or not. +import{S as $t,i as qt,s as Tt,Q as St,C as ee,T as ue,R as Ct,e as s,w as _,b as p,c as $e,f as w,g as r,h as i,m as qe,x as oe,U as Ve,V as pt,k as Ot,W as Mt,n as Pt,t as ye,a as ve,o as d,d as Te,p as Ft,r as Se,u as Lt,y as we,E as Ht}from"./index-DzzLh2vW.js";import{F as Rt}from"./FieldsQueryParam-Rko0bQqM.js";function mt(a,e,t){const l=a.slice();return l[10]=e[t],l}function bt(a,e,t){const l=a.slice();return l[10]=e[t],l}function _t(a,e,t){const l=a.slice();return l[15]=e[t],l}function kt(a){let e;return{c(){e=s("p"),e.innerHTML="Requires superuser Authorization:TOKEN header",w(e,"class","txt-hint txt-sm txt-right")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function ht(a){let e,t,l,u,c,f,b,m,$,h,g,B,S,O,R,M,U,J,T,W,P,q,k,F,te,K,I,re,Y,x,G;function fe(y,C){var V,z,H;return C&1&&(f=null),f==null&&(f=!!((H=(z=(V=y[0])==null?void 0:V.fields)==null?void 0:z.find(xt))!=null&&H.required)),f?Bt:At}let le=fe(a,-1),E=le(a);function X(y,C){var V,z,H;return C&1&&(U=null),U==null&&(U=!!((H=(z=(V=y[0])==null?void 0:V.fields)==null?void 0:z.find(Yt))!=null&&H.required)),U?Vt:jt}let Z=X(a,-1),L=Z(a);return{c(){e=s("tr"),e.innerHTML='Auth specific fields',t=p(),l=s("tr"),u=s("td"),c=s("div"),E.c(),b=p(),m=s("span"),m.textContent="email",$=p(),h=s("td"),h.innerHTML='String',g=p(),B=s("td"),B.textContent="Auth record email address.",S=p(),O=s("tr"),R=s("td"),M=s("div"),L.c(),J=p(),T=s("span"),T.textContent="emailVisibility",W=p(),P=s("td"),P.innerHTML='Boolean',q=p(),k=s("td"),k.textContent="Whether to show/hide the auth record email when fetching the record data.",F=p(),te=s("tr"),te.innerHTML='
Required password
String Auth record password.',K=p(),I=s("tr"),I.innerHTML='
Required passwordConfirm
String Auth record password confirmation.',re=p(),Y=s("tr"),Y.innerHTML=`
Optional verified
Boolean Indicates whether the auth record is verified or not.
This field can be set only by superusers or auth records with "Manage" access.`,x=p(),G=s("tr"),G.innerHTML='Other fields',w(c,"class","inline-flex"),w(M,"class","inline-flex")},m(y,C){r(y,e,C),r(y,t,C),r(y,l,C),i(l,u),i(u,c),E.m(c,null),i(c,b),i(c,m),i(l,$),i(l,h),i(l,g),i(l,B),r(y,S,C),r(y,O,C),i(O,R),i(R,M),L.m(M,null),i(M,J),i(M,T),i(O,W),i(O,P),i(O,q),i(O,k),r(y,F,C),r(y,te,C),r(y,K,C),r(y,I,C),r(y,re,C),r(y,Y,C),r(y,x,C),r(y,G,C)},p(y,C){le!==(le=fe(y,C))&&(E.d(1),E=le(y),E&&(E.c(),E.m(c,b))),Z!==(Z=X(y,C))&&(L.d(1),L=Z(y),L&&(L.c(),L.m(M,J)))},d(y){y&&(d(e),d(t),d(l),d(S),d(O),d(F),d(te),d(K),d(I),d(re),d(Y),d(x),d(G)),E.d(),L.d()}}}function At(a){let e;return{c(){e=s("span"),e.textContent="Optional",w(e,"class","label label-warning")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Bt(a){let e;return{c(){e=s("span"),e.textContent="Required",w(e,"class","label label-success")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function jt(a){let e;return{c(){e=s("span"),e.textContent="Optional",w(e,"class","label label-warning")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Vt(a){let e;return{c(){e=s("span"),e.textContent="Required",w(e,"class","label label-success")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Nt(a){let e;return{c(){e=s("span"),e.textContent="Required",w(e,"class","label label-success")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Dt(a){let e;return{c(){e=s("span"),e.textContent="Optional",w(e,"class","label label-warning")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Jt(a){let e,t=a[15].maxSelect===1?"id":"ids",l,u;return{c(){e=_("Relation record "),l=_(t),u=_(".")},m(c,f){r(c,e,f),r(c,l,f),r(c,u,f)},p(c,f){f&64&&t!==(t=c[15].maxSelect===1?"id":"ids")&&oe(l,t)},d(c){c&&(d(e),d(l),d(u))}}}function Et(a){let e,t,l,u,c,f,b,m,$;return{c(){e=_("File object."),t=s("br"),l=_(` Set to empty value (`),u=s("code"),u.textContent="null",c=_(", "),f=s("code"),f.textContent='""',b=_(" or "),m=s("code"),m.textContent="[]",$=_(`) to delete diff --git a/ui/dist/assets/DeleteApiDocs-CADk0j75.js b/ui/dist/assets/DeleteApiDocs-rj6WzdCt.js similarity index 98% rename from ui/dist/assets/DeleteApiDocs-CADk0j75.js rename to ui/dist/assets/DeleteApiDocs-rj6WzdCt.js index 333373ae..1f659321 100644 --- a/ui/dist/assets/DeleteApiDocs-CADk0j75.js +++ b/ui/dist/assets/DeleteApiDocs-rj6WzdCt.js @@ -1,4 +1,4 @@ -import{S as Re,i as Ee,s as Pe,Q as Te,T 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,U as he,V as Be,k as Oe,W as Ie,n as Ae,t as te,a as le,o as f,d as we,C as Me,p as qe,r as z,u as Le,R as Se}from"./index-C6KFFkct.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 superuser Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,o){p(s,l,o)},d(s){s&&f(l)}}}function ye(a,l){let s,o,h;function r(){return l[5](l[6])}return{key:a,first:null,c(){s=c("button"),s.textContent=`${l[6].code} `,m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(n,d){p(n,s,d),o||(h=Le(s,"click",r),o=!0)},p(n,d){l=n,d&20&&z(s,"active",l[2]===l[6].code)},d(n){n&&f(s),o=!1,h()}}}function $e(a,l){let s,o,h,r;return o=new Se({props:{content:l[6].body}}),{key:a,first:null,c(){s=c("div"),De(o.$$.fragment),h=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(n,d){p(n,s,d),Ce(o,s,null),i(s,h),r=!0},p(n,d){l=n,(!r||d&20)&&z(s,"active",l[2]===l[6].code)},i(n){r||(te(o.$$.fragment,n),r=!0)},o(n){le(o.$$.fragment,n),r=!1},d(n){n&&f(s),we(o)}}}function Ue(a){var fe,me;let l,s,o=a[0].name+"",h,r,n,d,$,D,F,q=a[0].name+"",K,se,N,C,Q,P,V,g,L,ae,S,E,oe,W,U=a[0].name+"",G,ne,J,ie,X,T,Y,B,Z,O,x,w,I,v=[],ce=new Map,re,A,b=[],de=new Map,R;C=new Te({props:{js:` +import{S as Re,i as Ee,s as Pe,Q as Te,T 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,U as he,V as Be,k as Oe,W as Ie,n as Ae,t as te,a as le,o as f,d as we,C as Me,p as qe,r as z,u as Le,R as Se}from"./index-DzzLh2vW.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 superuser Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,o){p(s,l,o)},d(s){s&&f(l)}}}function ye(a,l){let s,o,h;function r(){return l[5](l[6])}return{key:a,first:null,c(){s=c("button"),s.textContent=`${l[6].code} `,m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(n,d){p(n,s,d),o||(h=Le(s,"click",r),o=!0)},p(n,d){l=n,d&20&&z(s,"active",l[2]===l[6].code)},d(n){n&&f(s),o=!1,h()}}}function $e(a,l){let s,o,h,r;return o=new Se({props:{content:l[6].body}}),{key:a,first:null,c(){s=c("div"),De(o.$$.fragment),h=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(n,d){p(n,s,d),Ce(o,s,null),i(s,h),r=!0},p(n,d){l=n,(!r||d&20)&&z(s,"active",l[2]===l[6].code)},i(n){r||(te(o.$$.fragment,n),r=!0)},o(n){le(o.$$.fragment,n),r=!1},d(n){n&&f(s),we(o)}}}function Ue(a){var fe,me;let l,s,o=a[0].name+"",h,r,n,d,$,D,F,q=a[0].name+"",K,se,N,C,Q,P,V,g,L,ae,S,E,oe,W,U=a[0].name+"",G,ne,J,ie,X,T,Y,B,Z,O,x,w,I,v=[],ce=new Map,re,A,b=[],de=new Map,R;C=new Te({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/EmailChangeDocs-DcXreM6e.js b/ui/dist/assets/EmailChangeDocs-DKtNxGwa.js similarity index 99% rename from ui/dist/assets/EmailChangeDocs-DcXreM6e.js rename to ui/dist/assets/EmailChangeDocs-DKtNxGwa.js index 1de940d0..b7725897 100644 --- a/ui/dist/assets/EmailChangeDocs-DcXreM6e.js +++ b/ui/dist/assets/EmailChangeDocs-DKtNxGwa.js @@ -1,4 +1,4 @@ -import{S as se,i as oe,s as ie,T as K,e as p,b as y,w as U,f as b,g,h as u,x as J,U as le,V as Re,k as ne,W as Se,n as ae,t as Q,a as V,o as v,r as Y,u as ce,R as Oe,c as x,m as ee,d as te,Q as Me,X as _e,C as Be,p as De,Y as be}from"./index-C6KFFkct.js";function ge(n,e,t){const l=n.slice();return l[4]=e[t],l}function ve(n,e,t){const l=n.slice();return l[4]=e[t],l}function ke(n,e){let t,l=e[4].code+"",d,i,r,a;function m(){return e[3](e[4])}return{key:n,first:null,c(){t=p("button"),d=U(l),i=y(),b(t,"class","tab-item"),Y(t,"active",e[1]===e[4].code),this.first=t},m(k,P){g(k,t,P),u(t,d),u(t,i),r||(a=ce(t,"click",m),r=!0)},p(k,P){e=k,P&4&&l!==(l=e[4].code+"")&&J(d,l),P&6&&Y(t,"active",e[1]===e[4].code)},d(k){k&&v(t),r=!1,a()}}}function $e(n,e){let t,l,d,i;return l=new Oe({props:{content:e[4].body}}),{key:n,first:null,c(){t=p("div"),x(l.$$.fragment),d=y(),b(t,"class","tab-item"),Y(t,"active",e[1]===e[4].code),this.first=t},m(r,a){g(r,t,a),ee(l,t,null),u(t,d),i=!0},p(r,a){e=r;const m={};a&4&&(m.content=e[4].body),l.$set(m),(!i||a&6)&&Y(t,"active",e[1]===e[4].code)},i(r){i||(Q(l.$$.fragment,r),i=!0)},o(r){V(l.$$.fragment,r),i=!1},d(r){r&&v(t),te(l)}}}function Ne(n){let e,t,l,d,i,r,a,m=n[0].name+"",k,P,G,H,F,L,z,B,D,S,N,T=[],O=new Map,A,j,q=[],W=new Map,w,E=K(n[2]);const M=c=>c[4].code;for(let c=0;cc[4].code;for(let c=0;c<_.length;c+=1){let f=ge(n,_,c),s=X(f);W.set(s,q[c]=$e(s,f))}return{c(){e=p("div"),t=p("strong"),t.textContent="POST",l=y(),d=p("div"),i=p("p"),r=U("/api/collections/"),a=p("strong"),k=U(m),P=U("/confirm-email-change"),G=y(),H=p("div"),H.textContent="Body Parameters",F=y(),L=p("table"),L.innerHTML='Param Type Description
Required token
String The token from the change email request email.
Required password
String The account password to confirm the email change.',z=y(),B=p("div"),B.textContent="Responses",D=y(),S=p("div"),N=p("div");for(let c=0;ct(1,d=a.code);return n.$$set=a=>{"collection"in a&&t(0,l=a.collection)},t(2,i=[{code:204,body:"null"},{code:400,body:` +import{S as se,i as oe,s as ie,T as K,e as p,b as y,w as U,f as b,g,h as u,x as J,U as le,V as Re,k as ne,W as Se,n as ae,t as Q,a as V,o as v,r as Y,u as ce,R as Oe,c as x,m as ee,d as te,Q as Me,X as _e,C as Be,p as De,Y as be}from"./index-DzzLh2vW.js";function ge(n,e,t){const l=n.slice();return l[4]=e[t],l}function ve(n,e,t){const l=n.slice();return l[4]=e[t],l}function ke(n,e){let t,l=e[4].code+"",d,i,r,a;function m(){return e[3](e[4])}return{key:n,first:null,c(){t=p("button"),d=U(l),i=y(),b(t,"class","tab-item"),Y(t,"active",e[1]===e[4].code),this.first=t},m(k,P){g(k,t,P),u(t,d),u(t,i),r||(a=ce(t,"click",m),r=!0)},p(k,P){e=k,P&4&&l!==(l=e[4].code+"")&&J(d,l),P&6&&Y(t,"active",e[1]===e[4].code)},d(k){k&&v(t),r=!1,a()}}}function $e(n,e){let t,l,d,i;return l=new Oe({props:{content:e[4].body}}),{key:n,first:null,c(){t=p("div"),x(l.$$.fragment),d=y(),b(t,"class","tab-item"),Y(t,"active",e[1]===e[4].code),this.first=t},m(r,a){g(r,t,a),ee(l,t,null),u(t,d),i=!0},p(r,a){e=r;const m={};a&4&&(m.content=e[4].body),l.$set(m),(!i||a&6)&&Y(t,"active",e[1]===e[4].code)},i(r){i||(Q(l.$$.fragment,r),i=!0)},o(r){V(l.$$.fragment,r),i=!1},d(r){r&&v(t),te(l)}}}function Ne(n){let e,t,l,d,i,r,a,m=n[0].name+"",k,P,G,H,F,L,z,B,D,S,N,T=[],O=new Map,A,j,q=[],W=new Map,w,E=K(n[2]);const M=c=>c[4].code;for(let c=0;cc[4].code;for(let c=0;c<_.length;c+=1){let f=ge(n,_,c),s=X(f);W.set(s,q[c]=$e(s,f))}return{c(){e=p("div"),t=p("strong"),t.textContent="POST",l=y(),d=p("div"),i=p("p"),r=U("/api/collections/"),a=p("strong"),k=U(m),P=U("/confirm-email-change"),G=y(),H=p("div"),H.textContent="Body Parameters",F=y(),L=p("table"),L.innerHTML='Param Type Description
Required token
String The token from the change email request email.
Required password
String The account password to confirm the email change.',z=y(),B=p("div"),B.textContent="Responses",D=y(),S=p("div"),N=p("div");for(let c=0;ct(1,d=a.code);return n.$$set=a=>{"collection"in a&&t(0,l=a.collection)},t(2,i=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/FieldsQueryParam-9HzYyPBO.js b/ui/dist/assets/FieldsQueryParam-Rko0bQqM.js similarity index 96% rename from ui/dist/assets/FieldsQueryParam-9HzYyPBO.js rename to ui/dist/assets/FieldsQueryParam-Rko0bQqM.js index 7ed76d4e..7608d63c 100644 --- a/ui/dist/assets/FieldsQueryParam-9HzYyPBO.js +++ b/ui/dist/assets/FieldsQueryParam-Rko0bQqM.js @@ -1,4 +1,4 @@ -import{S as J,i as N,s as O,R as P,e as t,b as c,w as i,c as Q,f as j,g as z,h as e,m as A,x as D,t as G,a as K,o as U,d as V}from"./index-C6KFFkct.js";function W(f){let n,o,u,d,v,s,p,w,h,y,r,F,_,S,b,E,C,a,$,L,q,H,M,R,m,T,k,B,x;return r=new P({props:{content:"?fields=*,"+f[0]+"expand.relField.name"}}),{c(){n=t("tr"),o=t("td"),o.textContent="fields",u=c(),d=t("td"),d.innerHTML='String',v=c(),s=t("td"),p=t("p"),w=i(`Comma separated string of the fields to return in the JSON response +import{S as J,i as N,s as O,R as P,e as t,b as c,w as i,c as Q,f as j,g as z,h as e,m as A,x as D,t as G,a as K,o as U,d as V}from"./index-DzzLh2vW.js";function W(f){let n,o,u,d,v,s,p,w,h,y,r,F,_,S,b,E,C,a,$,L,q,H,M,R,m,T,k,B,x;return r=new P({props:{content:"?fields=*,"+f[0]+"expand.relField.name"}}),{c(){n=t("tr"),o=t("td"),o.textContent="fields",u=c(),d=t("td"),d.innerHTML='String',v=c(),s=t("td"),p=t("p"),w=i(`Comma separated string of the fields to return in the JSON response `),h=t("em"),h.textContent="(by default returns all fields)",y=i(`. Ex.: `),Q(r.$$.fragment),F=c(),_=t("p"),_.innerHTML="* targets all keys from the specific depth level.",S=c(),b=t("p"),b.textContent="In addition, the following field modifiers are also supported:",E=c(),C=t("ul"),a=t("li"),$=t("code"),$.textContent=":excerpt(maxLength, withEllipsis?)",L=c(),q=t("br"),H=i(` Returns a short plain text version of the field string value. diff --git a/ui/dist/assets/FilterAutocompleteInput-BVhhliH4.js b/ui/dist/assets/FilterAutocompleteInput-C5u5J0Yo.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput-BVhhliH4.js rename to ui/dist/assets/FilterAutocompleteInput-C5u5J0Yo.js index 891c309c..d56e7b76 100644 --- a/ui/dist/assets/FilterAutocompleteInput-BVhhliH4.js +++ b/ui/dist/assets/FilterAutocompleteInput-C5u5J0Yo.js @@ -1 +1 @@ -import{S as $,i as ee,s as te,e as ne,f as re,g as ie,y as D,o as ae,J as oe,N as le,O as se,L as de,C as u,P as ce}from"./index-C6KFFkct.js";import{c as fe,d as ue,s as ge,h as he,a as ye,E,b as S,e as pe,f as ke,g as me,i as xe,j as be,k as we,l as Ee,m as Se,r as Ce,n as Ke,o as Re,p as Le,q as G,C as R,S as qe,t as ve,u as Oe,v as We}from"./index-B5ReTu-C.js";function _e(e){return new Worker(""+new URL("autocomplete.worker-Br7MPIGR.js",import.meta.url).href,{name:e==null?void 0:e.name})}function De(e){V(e,"start");var r={},t=e.languageData||{},g=!1;for(var h in e)if(h!=t&&e.hasOwnProperty(h))for(var f=r[h]=[],a=e[h],i=0;i2&&a.token&&typeof a.token!="string"){t.pending=[];for(var s=2;s-1)return null;var h=t.indent.length-1,f=e[t.state];e:for(;;){for(var a=0;at(21,g=n));const h=se();let{id:f=""}=r,{value:a=""}=r,{disabled:i=!1}=r,{placeholder:o=""}=r,{baseCollection:s=null}=r,{singleLine:y=!1}=r,{extraAutocompleteKeys:L=[]}=r,{disableRequestKeys:b=!1}=r,{disableCollectionJoinKeys:m=!1}=r,d,p,q=i,I=new R,J=new R,M=new R,A=new R,v=new _e,B=[],H=[],T=[],C="",O="";function W(){d==null||d.focus()}let _=null;v.onmessage=n=>{T=n.data.baseKeys||[],B=n.data.requestKeys||[],H=n.data.collectionJoinKeys||[]};function j(){clearTimeout(_),_=setTimeout(()=>{v.postMessage({baseCollection:s,collections:z(g),disableRequestKeys:b,disableCollectionJoinKeys:m})},250)}function z(n){let c=n.slice();return s&&u.pushOrReplaceByKey(c,s,"id"),c}function F(){p==null||p.dispatchEvent(new CustomEvent("change",{detail:{value:a},bubbles:!0}))}function P(){if(!f)return;const n=document.querySelectorAll('[for="'+f+'"]');for(let c of n)c.removeEventListener("click",W)}function U(){if(!f)return;P();const n=document.querySelectorAll('[for="'+f+'"]');for(let c of n)c.addEventListener("click",W)}function Q(n=!0,c=!0){let l=[].concat(L);return l=l.concat(T||[]),n&&(l=l.concat(B||[])),c&&(l=l.concat(H||[])),l}function X(n){var w;let c=n.matchBefore(/[\'\"\@\w\.]*/);if(c&&c.from==c.to&&!n.explicit)return null;let l=We(n.state).resolveInner(n.pos,-1);if(((w=l==null?void 0:l.type)==null?void 0:w.name)=="comment")return null;let x=[{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"}];m||x.push({label:"@collection.*",apply:"@collection."});let K=Q(!b&&c.text.startsWith("@r"),!m&&c.text.startsWith("@c"));for(const k of K)x.push({label:k.endsWith(".")?k+"*":k,apply:k,boost:k.indexOf("_via_")>0?-1:0});return{from:c.from,options:x}}function N(){return qe.define(De({start:[{regex:/true|false|null/,token:"atom"},{regex:/\/\/.*/,token:"comment"},{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:u.escapeRegExp("@now"),token:"keyword"},{regex:u.escapeRegExp("@second"),token:"keyword"},{regex:u.escapeRegExp("@minute"),token:"keyword"},{regex:u.escapeRegExp("@hour"),token:"keyword"},{regex:u.escapeRegExp("@year"),token:"keyword"},{regex:u.escapeRegExp("@day"),token:"keyword"},{regex:u.escapeRegExp("@month"),token:"keyword"},{regex:u.escapeRegExp("@weekday"),token:"keyword"},{regex:u.escapeRegExp("@todayStart"),token:"keyword"},{regex:u.escapeRegExp("@todayEnd"),token:"keyword"},{regex:u.escapeRegExp("@monthStart"),token:"keyword"},{regex:u.escapeRegExp("@monthEnd"),token:"keyword"},{regex:u.escapeRegExp("@yearStart"),token:"keyword"},{regex:u.escapeRegExp("@yearEnd"),token:"keyword"},{regex:u.escapeRegExp("@request.method"),token:"keyword"}],meta:{lineComment:"//"}}))}de(()=>{const n={key:"Enter",run:l=>{y&&h("submit",a)}};U();let c=[n,...fe,...ue,ge.find(l=>l.key==="Mod-d"),...he,...ye];return y||c.push(ve),t(11,d=new E({parent:p,state:S.create({doc:a,extensions:[pe(),ke(),me(),xe(),be(),S.allowMultipleSelections.of(!0),we(Oe,{fallback:!0}),Ee(),Se(),Ce(),Ke(),Re.of(c),E.lineWrapping,Le({override:[X],icons:!1}),A.of(G(o)),J.of(E.editable.of(!i)),M.of(S.readOnly.of(i)),I.of(N()),S.transactionFilter.of(l=>{var x,K,w;if(y&&l.newDoc.lines>1){if(!((w=(K=(x=l.changes)==null?void 0:x.inserted)==null?void 0:K.filter(k=>!!k.text.find(Z=>Z)))!=null&&w.length))return[];l.newDoc.text=[l.newDoc.text.join(" ")]}return l}),E.updateListener.of(l=>{!l.docChanged||i||(t(1,a=l.state.doc.toString()),F())})]})})),()=>{clearTimeout(_),P(),d==null||d.destroy(),v.terminate()}});function Y(n){ce[n?"unshift":"push"](()=>{p=n,t(0,p)})}return e.$$set=n=>{"id"in n&&t(2,f=n.id),"value"in n&&t(1,a=n.value),"disabled"in n&&t(3,i=n.disabled),"placeholder"in n&&t(4,o=n.placeholder),"baseCollection"in n&&t(5,s=n.baseCollection),"singleLine"in n&&t(6,y=n.singleLine),"extraAutocompleteKeys"in n&&t(7,L=n.extraAutocompleteKeys),"disableRequestKeys"in n&&t(8,b=n.disableRequestKeys),"disableCollectionJoinKeys"in n&&t(9,m=n.disableCollectionJoinKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&t(13,C=Te(s)),e.$$.dirty[0]&25352&&!i&&(O!=C||b!==-1||m!==-1)&&(t(14,O=C),j()),e.$$.dirty[0]&4&&f&&U(),e.$$.dirty[0]&2080&&d&&s!=null&&s.fields&&d.dispatch({effects:[I.reconfigure(N())]}),e.$$.dirty[0]&6152&&d&&q!=i&&(d.dispatch({effects:[J.reconfigure(E.editable.of(!i)),M.reconfigure(S.readOnly.of(i))]}),t(12,q=i),F()),e.$$.dirty[0]&2050&&d&&a!=d.state.doc.toString()&&d.dispatch({changes:{from:0,to:d.state.doc.length,insert:a}}),e.$$.dirty[0]&2064&&d&&typeof o<"u"&&d.dispatch({effects:[A.reconfigure(G(o))]})},[p,a,f,i,o,s,y,L,b,m,W,d,q,C,O,Y]}class Ne extends ${constructor(r){super(),ee(this,r,Fe,He,te,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableCollectionJoinKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Ne as default}; +import{S as $,i as ee,s as te,e as ne,f as re,g as ie,y as D,o as ae,J as oe,N as le,O as se,L as de,C as u,P as ce}from"./index-DzzLh2vW.js";import{c as fe,d as ue,s as ge,h as he,a as ye,E,b as S,e as pe,f as ke,g as me,i as xe,j as be,k as we,l as Ee,m as Se,r as Ce,n as Ke,o as Re,p as Le,q as G,C as R,S as qe,t as ve,u as Oe,v as We}from"./index-B5ReTu-C.js";function _e(e){return new Worker(""+new URL("autocomplete.worker-Br7MPIGR.js",import.meta.url).href,{name:e==null?void 0:e.name})}function De(e){V(e,"start");var r={},t=e.languageData||{},g=!1;for(var h in e)if(h!=t&&e.hasOwnProperty(h))for(var f=r[h]=[],a=e[h],i=0;i2&&a.token&&typeof a.token!="string"){t.pending=[];for(var s=2;s-1)return null;var h=t.indent.length-1,f=e[t.state];e:for(;;){for(var a=0;at(21,g=n));const h=se();let{id:f=""}=r,{value:a=""}=r,{disabled:i=!1}=r,{placeholder:o=""}=r,{baseCollection:s=null}=r,{singleLine:y=!1}=r,{extraAutocompleteKeys:L=[]}=r,{disableRequestKeys:b=!1}=r,{disableCollectionJoinKeys:m=!1}=r,d,p,q=i,I=new R,J=new R,M=new R,A=new R,v=new _e,B=[],H=[],T=[],C="",O="";function W(){d==null||d.focus()}let _=null;v.onmessage=n=>{T=n.data.baseKeys||[],B=n.data.requestKeys||[],H=n.data.collectionJoinKeys||[]};function j(){clearTimeout(_),_=setTimeout(()=>{v.postMessage({baseCollection:s,collections:z(g),disableRequestKeys:b,disableCollectionJoinKeys:m})},250)}function z(n){let c=n.slice();return s&&u.pushOrReplaceByKey(c,s,"id"),c}function F(){p==null||p.dispatchEvent(new CustomEvent("change",{detail:{value:a},bubbles:!0}))}function P(){if(!f)return;const n=document.querySelectorAll('[for="'+f+'"]');for(let c of n)c.removeEventListener("click",W)}function U(){if(!f)return;P();const n=document.querySelectorAll('[for="'+f+'"]');for(let c of n)c.addEventListener("click",W)}function Q(n=!0,c=!0){let l=[].concat(L);return l=l.concat(T||[]),n&&(l=l.concat(B||[])),c&&(l=l.concat(H||[])),l}function X(n){var w;let c=n.matchBefore(/[\'\"\@\w\.]*/);if(c&&c.from==c.to&&!n.explicit)return null;let l=We(n.state).resolveInner(n.pos,-1);if(((w=l==null?void 0:l.type)==null?void 0:w.name)=="comment")return null;let x=[{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"}];m||x.push({label:"@collection.*",apply:"@collection."});let K=Q(!b&&c.text.startsWith("@r"),!m&&c.text.startsWith("@c"));for(const k of K)x.push({label:k.endsWith(".")?k+"*":k,apply:k,boost:k.indexOf("_via_")>0?-1:0});return{from:c.from,options:x}}function N(){return qe.define(De({start:[{regex:/true|false|null/,token:"atom"},{regex:/\/\/.*/,token:"comment"},{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:u.escapeRegExp("@now"),token:"keyword"},{regex:u.escapeRegExp("@second"),token:"keyword"},{regex:u.escapeRegExp("@minute"),token:"keyword"},{regex:u.escapeRegExp("@hour"),token:"keyword"},{regex:u.escapeRegExp("@year"),token:"keyword"},{regex:u.escapeRegExp("@day"),token:"keyword"},{regex:u.escapeRegExp("@month"),token:"keyword"},{regex:u.escapeRegExp("@weekday"),token:"keyword"},{regex:u.escapeRegExp("@todayStart"),token:"keyword"},{regex:u.escapeRegExp("@todayEnd"),token:"keyword"},{regex:u.escapeRegExp("@monthStart"),token:"keyword"},{regex:u.escapeRegExp("@monthEnd"),token:"keyword"},{regex:u.escapeRegExp("@yearStart"),token:"keyword"},{regex:u.escapeRegExp("@yearEnd"),token:"keyword"},{regex:u.escapeRegExp("@request.method"),token:"keyword"}],meta:{lineComment:"//"}}))}de(()=>{const n={key:"Enter",run:l=>{y&&h("submit",a)}};U();let c=[n,...fe,...ue,ge.find(l=>l.key==="Mod-d"),...he,...ye];return y||c.push(ve),t(11,d=new E({parent:p,state:S.create({doc:a,extensions:[pe(),ke(),me(),xe(),be(),S.allowMultipleSelections.of(!0),we(Oe,{fallback:!0}),Ee(),Se(),Ce(),Ke(),Re.of(c),E.lineWrapping,Le({override:[X],icons:!1}),A.of(G(o)),J.of(E.editable.of(!i)),M.of(S.readOnly.of(i)),I.of(N()),S.transactionFilter.of(l=>{var x,K,w;if(y&&l.newDoc.lines>1){if(!((w=(K=(x=l.changes)==null?void 0:x.inserted)==null?void 0:K.filter(k=>!!k.text.find(Z=>Z)))!=null&&w.length))return[];l.newDoc.text=[l.newDoc.text.join(" ")]}return l}),E.updateListener.of(l=>{!l.docChanged||i||(t(1,a=l.state.doc.toString()),F())})]})})),()=>{clearTimeout(_),P(),d==null||d.destroy(),v.terminate()}});function Y(n){ce[n?"unshift":"push"](()=>{p=n,t(0,p)})}return e.$$set=n=>{"id"in n&&t(2,f=n.id),"value"in n&&t(1,a=n.value),"disabled"in n&&t(3,i=n.disabled),"placeholder"in n&&t(4,o=n.placeholder),"baseCollection"in n&&t(5,s=n.baseCollection),"singleLine"in n&&t(6,y=n.singleLine),"extraAutocompleteKeys"in n&&t(7,L=n.extraAutocompleteKeys),"disableRequestKeys"in n&&t(8,b=n.disableRequestKeys),"disableCollectionJoinKeys"in n&&t(9,m=n.disableCollectionJoinKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&t(13,C=Te(s)),e.$$.dirty[0]&25352&&!i&&(O!=C||b!==-1||m!==-1)&&(t(14,O=C),j()),e.$$.dirty[0]&4&&f&&U(),e.$$.dirty[0]&2080&&d&&s!=null&&s.fields&&d.dispatch({effects:[I.reconfigure(N())]}),e.$$.dirty[0]&6152&&d&&q!=i&&(d.dispatch({effects:[J.reconfigure(E.editable.of(!i)),M.reconfigure(S.readOnly.of(i))]}),t(12,q=i),F()),e.$$.dirty[0]&2050&&d&&a!=d.state.doc.toString()&&d.dispatch({changes:{from:0,to:d.state.doc.length,insert:a}}),e.$$.dirty[0]&2064&&d&&typeof o<"u"&&d.dispatch({effects:[A.reconfigure(G(o))]})},[p,a,f,i,o,s,y,L,b,m,W,d,q,C,O,Y]}class Ne extends ${constructor(r){super(),ee(this,r,Fe,He,te,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableCollectionJoinKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Ne as default}; diff --git a/ui/dist/assets/ListApiDocs-MoPZqRTR.js b/ui/dist/assets/ListApiDocs-zvKNcpnx.js similarity index 99% rename from ui/dist/assets/ListApiDocs-MoPZqRTR.js rename to ui/dist/assets/ListApiDocs-zvKNcpnx.js index 7dbbc2ff..5ffdfdce 100644 --- a/ui/dist/assets/ListApiDocs-MoPZqRTR.js +++ b/ui/dist/assets/ListApiDocs-zvKNcpnx.js @@ -1,4 +1,4 @@ -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,Q as nl,R as Fe,T as se,c as Ut,m as Qt,x as ke,U as Qe,V as ol,k as al,W as il,n as rl,t as $t,a as Ct,d as jt,X as cl,C as ve,p as dl,r as Le}from"./index-C6KFFkct.js";import{F as pl}from"./FieldsQueryParam-9HzYyPBO.js";function fl(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 ul(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 je(d){let n,o,i,f,h,r,b,$,C,g,p,tt,kt,zt,S,Kt,H,rt,R,et,ne,U,Q,oe,ct,yt,lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,Et,O,mt,ce,z,St,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,E,Bt,$e,Z,v,Gt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format +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,Q as nl,R as Fe,T as se,c as Ut,m as Qt,x as ke,U as Qe,V as ol,k as al,W as il,n as rl,t as $t,a as Ct,d as jt,X as cl,C as ve,p as dl,r as Le}from"./index-DzzLh2vW.js";import{F as pl}from"./FieldsQueryParam-Rko0bQqM.js";function fl(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 ul(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 je(d){let n,o,i,f,h,r,b,$,C,g,p,tt,kt,zt,S,Kt,H,rt,R,et,ne,U,Q,oe,ct,yt,lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,Et,O,mt,ce,z,St,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,E,Bt,$e,Z,v,Gt;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",$=_(` - is one of: `),C=e("br"),g=s(),p=e("ul"),tt=e("li"),kt=e("code"),kt.textContent="=",zt=s(),S=e("span"),S.textContent="Equal",Kt=s(),H=e("li"),rt=e("code"),rt.textContent="!=",R=s(),et=e("span"),et.textContent="NOT equal",ne=s(),U=e("li"),Q=e("code"),Q.textContent=">",oe=s(),ct=e("span"),ct.textContent="Greater than",yt=s(),lt=e("li"),vt=e("code"),vt.textContent=">=",ae=s(),dt=e("span"),dt.textContent="Greater than or equal",pt=s(),st=e("li"),N=e("code"),N.textContent="<",Jt=s(),Ft=e("span"),Ft.textContent="Less than",y=s(),nt=e("li"),Lt=e("code"),Lt.textContent="<=",Vt=s(),At=e("span"),At.textContent="Less than or equal",j=s(),ot=e("li"),Tt=e("code"),Tt.textContent="~",Wt=s(),Pt=e("span"),Pt.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for diff --git a/ui/dist/assets/PageOAuth2RedirectFailure-CsvBf-xw.js b/ui/dist/assets/PageOAuth2RedirectFailure-CGfeZrvO.js similarity index 88% rename from ui/dist/assets/PageOAuth2RedirectFailure-CsvBf-xw.js rename to ui/dist/assets/PageOAuth2RedirectFailure-CGfeZrvO.js index 9db774ed..6ee136af 100644 --- a/ui/dist/assets/PageOAuth2RedirectFailure-CsvBf-xw.js +++ b/ui/dist/assets/PageOAuth2RedirectFailure-CGfeZrvO.js @@ -1 +1 @@ -import{S as r,i as c,s as l,e as u,f as p,g as h,y as n,o as d,J as f,K as m,L as g,M as o}from"./index-C6KFFkct.js";function _(s){let t;return{c(){t=u("div"),t.innerHTML='

Auth failed.

You can close this window and go back to the app to try again.
',p(t,"class","content txt-hint txt-center p-base")},m(e,a){h(e,t,a)},p:n,i:n,o:n,d(e){e&&d(t)}}}function b(s,t,e){let a;return f(s,o,i=>e(0,a=i)),m(o,a="OAuth2 auth failed",a),g(()=>{window.close()}),[]}class v extends r{constructor(t){super(),c(this,t,b,_,l,{})}}export{v as default}; +import{S as r,i as c,s as l,e as u,f as p,g as h,y as n,o as d,J as f,K as m,L as g,M as o}from"./index-DzzLh2vW.js";function _(s){let t;return{c(){t=u("div"),t.innerHTML='

Auth failed.

You can close this window and go back to the app to try again.
',p(t,"class","content txt-hint txt-center p-base")},m(e,a){h(e,t,a)},p:n,i:n,o:n,d(e){e&&d(t)}}}function b(s,t,e){let a;return f(s,o,i=>e(0,a=i)),m(o,a="OAuth2 auth failed",a),g(()=>{window.close()}),[]}class v extends r{constructor(t){super(),c(this,t,b,_,l,{})}}export{v as default}; diff --git a/ui/dist/assets/PageOAuth2RedirectSuccess-B2_MFcf4.js b/ui/dist/assets/PageOAuth2RedirectSuccess-DKf1ubte.js similarity index 88% rename from ui/dist/assets/PageOAuth2RedirectSuccess-B2_MFcf4.js rename to ui/dist/assets/PageOAuth2RedirectSuccess-DKf1ubte.js index a574c749..6462fb5d 100644 --- a/ui/dist/assets/PageOAuth2RedirectSuccess-B2_MFcf4.js +++ b/ui/dist/assets/PageOAuth2RedirectSuccess-DKf1ubte.js @@ -1 +1 @@ -import{S as i,i as r,s as u,e as l,f as p,g as h,y as n,o as d,J as m,K as f,L as g,M as o}from"./index-C6KFFkct.js";function _(a){let t;return{c(){t=l("div"),t.innerHTML='

Auth completed.

You can close this window and go back to the app.
',p(t,"class","content txt-hint txt-center p-base")},m(e,s){h(e,t,s)},p:n,i:n,o:n,d(e){e&&d(t)}}}function b(a,t,e){let s;return m(a,o,c=>e(0,s=c)),f(o,s="OAuth2 auth completed",s),g(()=>{window.close()}),[]}class v extends i{constructor(t){super(),r(this,t,b,_,u,{})}}export{v as default}; +import{S as i,i as r,s as u,e as l,f as p,g as h,y as n,o as d,J as m,K as f,L as g,M as o}from"./index-DzzLh2vW.js";function _(a){let t;return{c(){t=l("div"),t.innerHTML='

Auth completed.

You can close this window and go back to the app.
',p(t,"class","content txt-hint txt-center p-base")},m(e,s){h(e,t,s)},p:n,i:n,o:n,d(e){e&&d(t)}}}function b(a,t,e){let s;return m(a,o,c=>e(0,s=c)),f(o,s="OAuth2 auth completed",s),g(()=>{window.close()}),[]}class v extends i{constructor(t){super(),r(this,t,b,_,u,{})}}export{v as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-2xgz6XzW.js b/ui/dist/assets/PageRecordConfirmEmailChange-7Dltd5FX.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmEmailChange-2xgz6XzW.js rename to ui/dist/assets/PageRecordConfirmEmailChange-7Dltd5FX.js index 21da97df..ff0e72b8 100644 --- a/ui/dist/assets/PageRecordConfirmEmailChange-2xgz6XzW.js +++ b/ui/dist/assets/PageRecordConfirmEmailChange-7Dltd5FX.js @@ -1,2 +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-C6KFFkct.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 +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-DzzLh2vW.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-C0yys8jP.js b/ui/dist/assets/PageRecordConfirmPasswordReset-D8TJqUdu.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmPasswordReset-C0yys8jP.js rename to ui/dist/assets/PageRecordConfirmPasswordReset-D8TJqUdu.js index 8e4194f6..eb782dc5 100644 --- a/ui/dist/assets/PageRecordConfirmPasswordReset-C0yys8jP.js +++ b/ui/dist/assets/PageRecordConfirmPasswordReset-D8TJqUdu.js @@ -1,2 +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-C6KFFkct.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 +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-DzzLh2vW.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-023ljtqb.js b/ui/dist/assets/PageRecordConfirmVerification-MDOT1GKu.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmVerification-023ljtqb.js rename to ui/dist/assets/PageRecordConfirmVerification-MDOT1GKu.js index 0e5eaff3..ee05f03e 100644 --- a/ui/dist/assets/PageRecordConfirmVerification-023ljtqb.js +++ b/ui/dist/assets/PageRecordConfirmVerification-MDOT1GKu.js @@ -1 +1 @@ -import{S as P,i as R,s as L,F as M,c as S,m as V,t as q,a as E,d as F,G as w,H as y,I as N,E as g,g as r,o as a,p as G,e as u,b as v,f,u as k,y as m,r as C,h as j}from"./index-C6KFFkct.js";function z(o){let e,l,n;function t(i,d){return i[4]?K:J}let s=t(o),c=s(o);return{c(){e=u("div"),e.innerHTML='

Invalid or expired verification token.

',l=v(),c.c(),n=g(),f(e,"class","alert alert-danger")},m(i,d){r(i,e,d),r(i,l,d),c.m(i,d),r(i,n,d)},p(i,d){s===(s=t(i))&&c?c.p(i,d):(c.d(1),c=s(i),c&&(c.c(),c.m(n.parentNode,n)))},d(i){i&&(a(e),a(l),a(n)),c.d(i)}}}function A(o){let e,l,n,t,s;return{c(){e=u("div"),e.innerHTML='

Please check your email for the new verification link.

',l=v(),n=u("button"),n.textContent="Close",f(e,"class","alert alert-success"),f(n,"type","button"),f(n,"class","btn btn-transparent btn-block")},m(c,i){r(c,e,i),r(c,l,i),r(c,n,i),t||(s=k(n,"click",o[8]),t=!0)},p:m,d(c){c&&(a(e),a(l),a(n)),t=!1,s()}}}function B(o){let e,l,n,t,s;return{c(){e=u("div"),e.innerHTML='

Successfully verified email address.

',l=v(),n=u("button"),n.textContent="Close",f(e,"class","alert alert-success"),f(n,"type","button"),f(n,"class","btn btn-transparent btn-block")},m(c,i){r(c,e,i),r(c,l,i),r(c,n,i),t||(s=k(n,"click",o[7]),t=!0)},p:m,d(c){c&&(a(e),a(l),a(n)),t=!1,s()}}}function D(o){let e;return{c(){e=u("div"),e.innerHTML='
Please wait...
',f(e,"class","txt-center")},m(l,n){r(l,e,n)},p:m,d(l){l&&a(e)}}}function J(o){let e,l,n;return{c(){e=u("button"),e.textContent="Close",f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(t,s){r(t,e,s),l||(n=k(e,"click",o[9]),l=!0)},p:m,d(t){t&&a(e),l=!1,n()}}}function K(o){let e,l,n,t;return{c(){e=u("button"),l=u("span"),l.textContent="Resend",f(l,"class","txt"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block"),e.disabled=o[3],C(e,"btn-loading",o[3])},m(s,c){r(s,e,c),j(e,l),n||(t=k(e,"click",o[5]),n=!0)},p(s,c){c&8&&(e.disabled=s[3]),c&8&&C(e,"btn-loading",s[3])},d(s){s&&a(e),n=!1,t()}}}function O(o){let e;function l(s,c){return s[1]?D:s[0]?B:s[2]?A:z}let n=l(o),t=n(o);return{c(){t.c(),e=g()},m(s,c){t.m(s,c),r(s,e,c)},p(s,c){n===(n=l(s))&&t?t.p(s,c):(t.d(1),t=n(s),t&&(t.c(),t.m(e.parentNode,e)))},d(s){s&&a(e),t.d(s)}}}function Q(o){let e,l;return e=new M({props:{nobranding:!0,$$slots:{default:[O]},$$scope:{ctx:o}}}),{c(){S(e.$$.fragment)},m(n,t){V(e,n,t),l=!0},p(n,[t]){const s={};t&2079&&(s.$$scope={dirty:t,ctx:n}),e.$set(s)},i(n){l||(q(e.$$.fragment,n),l=!0)},o(n){E(e.$$.fragment,n),l=!1},d(n){F(e,n)}}}function U(o,e,l){let n,{params:t}=e,s=!1,c=!1,i=!1,d=!1;x();async function x(){if(c)return;l(1,c=!0);const b=new w("../");try{const p=y(t==null?void 0:t.token);await b.collection(p.collectionId).confirmVerification(t==null?void 0:t.token),l(0,s=!0)}catch{l(0,s=!1)}l(1,c=!1)}async function T(){const b=y(t==null?void 0:t.token);if(d||!b.collectionId||!b.email)return;l(3,d=!0);const p=new w("../");try{const _=y(t==null?void 0:t.token);await p.collection(_.collectionId).requestVerification(_.email),l(2,i=!0)}catch(_){G.error(_),l(2,i=!1)}l(3,d=!1)}const h=()=>window.close(),H=()=>window.close(),I=()=>window.close();return o.$$set=b=>{"params"in b&&l(6,t=b.params)},o.$$.update=()=>{o.$$.dirty&64&&l(4,n=(t==null?void 0:t.token)&&N(t.token))},[s,c,i,d,n,T,t,h,H,I]}class X extends P{constructor(e){super(),R(this,e,U,Q,L,{params:6})}}export{X as default}; +import{S as P,i as R,s as L,F as M,c as S,m as V,t as q,a as E,d as F,G as w,H as y,I as N,E as g,g as r,o as a,p as G,e as u,b as v,f,u as k,y as m,r as C,h as j}from"./index-DzzLh2vW.js";function z(o){let e,l,n;function t(i,d){return i[4]?K:J}let s=t(o),c=s(o);return{c(){e=u("div"),e.innerHTML='

Invalid or expired verification token.

',l=v(),c.c(),n=g(),f(e,"class","alert alert-danger")},m(i,d){r(i,e,d),r(i,l,d),c.m(i,d),r(i,n,d)},p(i,d){s===(s=t(i))&&c?c.p(i,d):(c.d(1),c=s(i),c&&(c.c(),c.m(n.parentNode,n)))},d(i){i&&(a(e),a(l),a(n)),c.d(i)}}}function A(o){let e,l,n,t,s;return{c(){e=u("div"),e.innerHTML='

Please check your email for the new verification link.

',l=v(),n=u("button"),n.textContent="Close",f(e,"class","alert alert-success"),f(n,"type","button"),f(n,"class","btn btn-transparent btn-block")},m(c,i){r(c,e,i),r(c,l,i),r(c,n,i),t||(s=k(n,"click",o[8]),t=!0)},p:m,d(c){c&&(a(e),a(l),a(n)),t=!1,s()}}}function B(o){let e,l,n,t,s;return{c(){e=u("div"),e.innerHTML='

Successfully verified email address.

',l=v(),n=u("button"),n.textContent="Close",f(e,"class","alert alert-success"),f(n,"type","button"),f(n,"class","btn btn-transparent btn-block")},m(c,i){r(c,e,i),r(c,l,i),r(c,n,i),t||(s=k(n,"click",o[7]),t=!0)},p:m,d(c){c&&(a(e),a(l),a(n)),t=!1,s()}}}function D(o){let e;return{c(){e=u("div"),e.innerHTML='
Please wait...
',f(e,"class","txt-center")},m(l,n){r(l,e,n)},p:m,d(l){l&&a(e)}}}function J(o){let e,l,n;return{c(){e=u("button"),e.textContent="Close",f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(t,s){r(t,e,s),l||(n=k(e,"click",o[9]),l=!0)},p:m,d(t){t&&a(e),l=!1,n()}}}function K(o){let e,l,n,t;return{c(){e=u("button"),l=u("span"),l.textContent="Resend",f(l,"class","txt"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block"),e.disabled=o[3],C(e,"btn-loading",o[3])},m(s,c){r(s,e,c),j(e,l),n||(t=k(e,"click",o[5]),n=!0)},p(s,c){c&8&&(e.disabled=s[3]),c&8&&C(e,"btn-loading",s[3])},d(s){s&&a(e),n=!1,t()}}}function O(o){let e;function l(s,c){return s[1]?D:s[0]?B:s[2]?A:z}let n=l(o),t=n(o);return{c(){t.c(),e=g()},m(s,c){t.m(s,c),r(s,e,c)},p(s,c){n===(n=l(s))&&t?t.p(s,c):(t.d(1),t=n(s),t&&(t.c(),t.m(e.parentNode,e)))},d(s){s&&a(e),t.d(s)}}}function Q(o){let e,l;return e=new M({props:{nobranding:!0,$$slots:{default:[O]},$$scope:{ctx:o}}}),{c(){S(e.$$.fragment)},m(n,t){V(e,n,t),l=!0},p(n,[t]){const s={};t&2079&&(s.$$scope={dirty:t,ctx:n}),e.$set(s)},i(n){l||(q(e.$$.fragment,n),l=!0)},o(n){E(e.$$.fragment,n),l=!1},d(n){F(e,n)}}}function U(o,e,l){let n,{params:t}=e,s=!1,c=!1,i=!1,d=!1;x();async function x(){if(c)return;l(1,c=!0);const b=new w("../");try{const p=y(t==null?void 0:t.token);await b.collection(p.collectionId).confirmVerification(t==null?void 0:t.token),l(0,s=!0)}catch{l(0,s=!1)}l(1,c=!1)}async function T(){const b=y(t==null?void 0:t.token);if(d||!b.collectionId||!b.email)return;l(3,d=!0);const p=new w("../");try{const _=y(t==null?void 0:t.token);await p.collection(_.collectionId).requestVerification(_.email),l(2,i=!0)}catch(_){G.error(_),l(2,i=!1)}l(3,d=!1)}const h=()=>window.close(),H=()=>window.close(),I=()=>window.close();return o.$$set=b=>{"params"in b&&l(6,t=b.params)},o.$$.update=()=>{o.$$.dirty&64&&l(4,n=(t==null?void 0:t.token)&&N(t.token))},[s,c,i,d,n,T,t,h,H,I]}class X extends P{constructor(e){super(),R(this,e,U,Q,L,{params:6})}}export{X as default}; diff --git a/ui/dist/assets/PageSuperuserConfirmPasswordReset-SPZ-Z11R.js b/ui/dist/assets/PageSuperuserConfirmPasswordReset-BE5k30ZL.js similarity index 98% rename from ui/dist/assets/PageSuperuserConfirmPasswordReset-SPZ-Z11R.js rename to ui/dist/assets/PageSuperuserConfirmPasswordReset-BE5k30ZL.js index 49b9bb38..1cd2ead5 100644 --- a/ui/dist/assets/PageSuperuserConfirmPasswordReset-SPZ-Z11R.js +++ b/ui/dist/assets/PageSuperuserConfirmPasswordReset-BE5k30ZL.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as R,m as B,t as N,a as T,d as j,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 z,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-C6KFFkct.js";function y(r){let e,n,s;return{c(){e=P("for "),n=_("strong"),s=P(r[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(r){let e,n,s,l,t,i,p,d;return{c(){e=_("label"),n=P("New password"),l=k(),t=_("input"),f(e,"for",s=r[8]),f(t,"type","password"),f(t,"id",i=r[8]),t.required=!0,t.autofocus=!0},m(u,a){b(u,e,a),c(e,n),b(u,l,a),b(u,t,a),q(t,r[0]),t.focus(),p||(d=z(t,"input",r[6]),p=!0)},p(u,a){a&256&&s!==(s=u[8])&&f(e,"for",s),a&256&&i!==(i=u[8])&&f(t,"id",i),a&1&&t.value!==u[0]&&q(t,u[0])},d(u){u&&(w(e),w(l),w(t)),p=!1,d()}}}function ee(r){let e,n,s,l,t,i,p,d;return{c(){e=_("label"),n=P("New password confirm"),l=k(),t=_("input"),f(e,"for",s=r[8]),f(t,"type","password"),f(t,"id",i=r[8]),t.required=!0},m(u,a){b(u,e,a),c(e,n),b(u,l,a),b(u,t,a),q(t,r[1]),p||(d=z(t,"input",r[7]),p=!0)},p(u,a){a&256&&s!==(s=u[8])&&f(e,"for",s),a&256&&i!==(i=u[8])&&f(t,"id",i),a&2&&t.value!==u[1]&&q(t,u[1])},d(u){u&&(w(e),w(l),w(t)),p=!1,d()}}}function te(r){let e,n,s,l,t,i,p,d,u,a,g,S,C,v,h,F,A,m=r[3]&&y(r);return i=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:r}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:r}}}),{c(){e=_("form"),n=_("div"),s=_("h4"),l=P(`Reset your superuser password +import{S as E,i as G,s as I,F as K,c as R,m as B,t as N,a as T,d as j,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 z,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-DzzLh2vW.js";function y(r){let e,n,s;return{c(){e=P("for "),n=_("strong"),s=P(r[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(r){let e,n,s,l,t,i,p,d;return{c(){e=_("label"),n=P("New password"),l=k(),t=_("input"),f(e,"for",s=r[8]),f(t,"type","password"),f(t,"id",i=r[8]),t.required=!0,t.autofocus=!0},m(u,a){b(u,e,a),c(e,n),b(u,l,a),b(u,t,a),q(t,r[0]),t.focus(),p||(d=z(t,"input",r[6]),p=!0)},p(u,a){a&256&&s!==(s=u[8])&&f(e,"for",s),a&256&&i!==(i=u[8])&&f(t,"id",i),a&1&&t.value!==u[0]&&q(t,u[0])},d(u){u&&(w(e),w(l),w(t)),p=!1,d()}}}function ee(r){let e,n,s,l,t,i,p,d;return{c(){e=_("label"),n=P("New password confirm"),l=k(),t=_("input"),f(e,"for",s=r[8]),f(t,"type","password"),f(t,"id",i=r[8]),t.required=!0},m(u,a){b(u,e,a),c(e,n),b(u,l,a),b(u,t,a),q(t,r[1]),p||(d=z(t,"input",r[7]),p=!0)},p(u,a){a&256&&s!==(s=u[8])&&f(e,"for",s),a&256&&i!==(i=u[8])&&f(t,"id",i),a&2&&t.value!==u[1]&&q(t,u[1])},d(u){u&&(w(e),w(l),w(t)),p=!1,d()}}}function te(r){let e,n,s,l,t,i,p,d,u,a,g,S,C,v,h,F,A,m=r[3]&&y(r);return i=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:r}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:r}}}),{c(){e=_("form"),n=_("div"),s=_("h4"),l=P(`Reset your superuser password `),m&&m.c(),t=k(),R(i.$$.fragment),p=k(),R(d.$$.fragment),u=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=r[2],L(a,"btn-loading",r[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),B(i,e,null),c(e,p),B(d,e,null),c(e,u),c(e,a),c(a,g),b(o,S,$),b(o,C,$),c(C,v),h=!0,F||(A=[z(e,"submit",O(r[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}),i.$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||(N(i.$$.fragment,o),N(d.$$.fragment,o),h=!0)},o(o){T(i.$$.fragment,o),T(d.$$.fragment,o),h=!1},d(o){o&&(w(e),w(S),w(C)),m&&m.d(),j(i),j(d),F=!1,V(A)}}}function se(r){let e,n;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){R(e.$$.fragment)},m(s,l){B(e,s,l),n=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){n||(N(e.$$.fragment,s),n=!0)},o(s){T(e.$$.fragment,s),n=!1},d(s){j(e,s)}}}function le(r,e,n){let s,{params:l}=e,t="",i="",p=!1;async function d(){if(!p){n(2,p=!0);try{await W.collection("_superusers").confirmPasswordReset(l==null?void 0:l.token,t,i),X("Successfully set a new superuser password."),Y("/")}catch(g){W.error(g)}n(2,p=!1)}}function u(){t=this.value,n(0,t)}function a(){i=this.value,n(1,i)}return r.$$set=g=>{"params"in g&&n(5,l=g.params)},r.$$.update=()=>{r.$$.dirty&32&&n(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,i,p,s,d,l,u,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/PageSuperuserRequestPasswordReset-iIU1ycYV.js b/ui/dist/assets/PageSuperuserRequestPasswordReset-De00w0tH.js similarity index 98% rename from ui/dist/assets/PageSuperuserRequestPasswordReset-iIU1ycYV.js rename to ui/dist/assets/PageSuperuserRequestPasswordReset-De00w0tH.js index 129b6cb9..9a6a5197 100644 --- a/ui/dist/assets/PageSuperuserRequestPasswordReset-iIU1ycYV.js +++ b/ui/dist/assets/PageSuperuserRequestPasswordReset-De00w0tH.js @@ -1 +1 @@ -import{S as M,i as T,s as j,F as z,c as L,m as R,t as w,a as y,d as E,b as v,e as m,f as p,g,h as d,j as B,l as N,k as A,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 S}from"./index-C6KFFkct.js";function K(u){let e,s,n,l,t,r,c,_,i,a,b,f;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:o})=>({5:o}),({uniqueId:o})=>o?32:0]},$$scope:{ctx:u}}}),{c(){e=m("form"),s=m("div"),s.innerHTML='

Forgotten superuser password

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

',n=v(),L(l.$$.fragment),t=v(),r=m("button"),c=m("i"),_=v(),i=m("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(c,"class","ri-mail-send-line"),p(i,"class","txt"),p(r,"type","submit"),p(r,"class","btn btn-lg btn-block"),r.disabled=u[1],F(r,"btn-loading",u[1]),p(e,"class","m-b-base")},m(o,$){g(o,e,$),d(e,s),d(e,n),R(l,e,null),d(e,t),d(e,r),d(r,c),d(r,_),d(r,i),a=!0,b||(f=H(e,"submit",I(u[3])),b=!0)},p(o,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:o}),l.$set(q),(!a||$&2)&&(r.disabled=o[1]),(!a||$&2)&&F(r,"btn-loading",o[1])},i(o){a||(w(l.$$.fragment,o),a=!0)},o(o){y(l.$$.fragment,o),a=!1},d(o){o&&k(e),E(l),b=!1,f()}}}function O(u){let e,s,n,l,t,r,c,_,i;return{c(){e=m("div"),s=m("div"),s.innerHTML='',n=v(),l=m("div"),t=m("p"),r=h("Check "),c=m("strong"),_=h(u[0]),i=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,r),d(t,c),d(c,_),d(t,i)},p(a,b){b&1&&J(_,a[0])},i:P,o:P,d(a){a&&k(e)}}}function Q(u){let e,s,n,l,t,r,c,_;return{c(){e=m("label"),s=h("Email"),l=v(),t=m("input"),p(e,"for",n=u[5]),p(t,"type","email"),p(t,"id",r=u[5]),t.required=!0,t.autofocus=!0},m(i,a){g(i,e,a),d(e,s),g(i,l,a),g(i,t,a),S(t,u[0]),t.focus(),c||(_=H(t,"input",u[4]),c=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&r!==(r=i[5])&&p(t,"id",r),a&1&&t.value!==i[0]&&S(t,i[0])},d(i){i&&(k(e),k(l),k(t)),c=!1,_()}}}function U(u){let e,s,n,l,t,r,c,_;const i=[O,K],a=[];function b(f,o){return f[2]?0:1}return e=b(u),s=a[e]=i[e](u),{c(){s.c(),n=v(),l=m("div"),t=m("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(f,o){a[e].m(f,o),g(f,n,o),g(f,l,o),d(l,t),r=!0,c||(_=B(N.call(null,t)),c=!0)},p(f,o){let $=e;e=b(f),e===$?a[e].p(f,o):(A(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(f,o):(s=a[e]=i[e](f),s.c()),w(s,1),s.m(n.parentNode,n))},i(f){r||(w(s),r=!0)},o(f){y(s),r=!1},d(f){f&&(k(n),k(l)),a[e].d(f),c=!1,_()}}}function V(u){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:u}}}),{c(){L(e.$$.fragment)},m(n,l){R(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 r(){if(!l){s(1,l=!0);try{await C.collection("_superusers").requestPasswordReset(n),s(2,t=!0)}catch(_){C.error(_)}s(1,l=!1)}}function c(){n=this.value,s(0,n)}return[n,l,t,r,c]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; +import{S as M,i as T,s as j,F as z,c as L,m as R,t as w,a as y,d as E,b as v,e as m,f as p,g,h as d,j as B,l as N,k as A,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 S}from"./index-DzzLh2vW.js";function K(u){let e,s,n,l,t,r,c,_,i,a,b,f;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:o})=>({5:o}),({uniqueId:o})=>o?32:0]},$$scope:{ctx:u}}}),{c(){e=m("form"),s=m("div"),s.innerHTML='

Forgotten superuser password

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

',n=v(),L(l.$$.fragment),t=v(),r=m("button"),c=m("i"),_=v(),i=m("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(c,"class","ri-mail-send-line"),p(i,"class","txt"),p(r,"type","submit"),p(r,"class","btn btn-lg btn-block"),r.disabled=u[1],F(r,"btn-loading",u[1]),p(e,"class","m-b-base")},m(o,$){g(o,e,$),d(e,s),d(e,n),R(l,e,null),d(e,t),d(e,r),d(r,c),d(r,_),d(r,i),a=!0,b||(f=H(e,"submit",I(u[3])),b=!0)},p(o,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:o}),l.$set(q),(!a||$&2)&&(r.disabled=o[1]),(!a||$&2)&&F(r,"btn-loading",o[1])},i(o){a||(w(l.$$.fragment,o),a=!0)},o(o){y(l.$$.fragment,o),a=!1},d(o){o&&k(e),E(l),b=!1,f()}}}function O(u){let e,s,n,l,t,r,c,_,i;return{c(){e=m("div"),s=m("div"),s.innerHTML='',n=v(),l=m("div"),t=m("p"),r=h("Check "),c=m("strong"),_=h(u[0]),i=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,r),d(t,c),d(c,_),d(t,i)},p(a,b){b&1&&J(_,a[0])},i:P,o:P,d(a){a&&k(e)}}}function Q(u){let e,s,n,l,t,r,c,_;return{c(){e=m("label"),s=h("Email"),l=v(),t=m("input"),p(e,"for",n=u[5]),p(t,"type","email"),p(t,"id",r=u[5]),t.required=!0,t.autofocus=!0},m(i,a){g(i,e,a),d(e,s),g(i,l,a),g(i,t,a),S(t,u[0]),t.focus(),c||(_=H(t,"input",u[4]),c=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&r!==(r=i[5])&&p(t,"id",r),a&1&&t.value!==i[0]&&S(t,i[0])},d(i){i&&(k(e),k(l),k(t)),c=!1,_()}}}function U(u){let e,s,n,l,t,r,c,_;const i=[O,K],a=[];function b(f,o){return f[2]?0:1}return e=b(u),s=a[e]=i[e](u),{c(){s.c(),n=v(),l=m("div"),t=m("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(f,o){a[e].m(f,o),g(f,n,o),g(f,l,o),d(l,t),r=!0,c||(_=B(N.call(null,t)),c=!0)},p(f,o){let $=e;e=b(f),e===$?a[e].p(f,o):(A(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(f,o):(s=a[e]=i[e](f),s.c()),w(s,1),s.m(n.parentNode,n))},i(f){r||(w(s),r=!0)},o(f){y(s),r=!1},d(f){f&&(k(n),k(l)),a[e].d(f),c=!1,_()}}}function V(u){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:u}}}),{c(){L(e.$$.fragment)},m(n,l){R(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 r(){if(!l){s(1,l=!0);try{await C.collection("_superusers").requestPasswordReset(n),s(2,t=!0)}catch(_){C.error(_)}s(1,l=!1)}}function c(){n=this.value,s(0,n)}return[n,l,t,r,c]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PasswordResetDocs-BgeHIRsi.js b/ui/dist/assets/PasswordResetDocs-14TDtoHE.js similarity index 99% rename from ui/dist/assets/PasswordResetDocs-BgeHIRsi.js rename to ui/dist/assets/PasswordResetDocs-14TDtoHE.js index 3aa652d3..84f89dff 100644 --- a/ui/dist/assets/PasswordResetDocs-BgeHIRsi.js +++ b/ui/dist/assets/PasswordResetDocs-14TDtoHE.js @@ -1,4 +1,4 @@ -import{S as se,i as ne,s as oe,T as U,e as p,b as S,w as D,f as k,g as b,h as u,x as z,U as ee,V as ye,k as te,W as Te,n as le,t as V,a as X,o as v,r as H,u as ae,R as Ee,c as J,m as Z,d as x,Q as Ce,X as fe,C as qe,p as Oe,Y as pe}from"./index-C6KFFkct.js";function me(o,t,e){const n=o.slice();return n[4]=t[e],n}function _e(o,t,e){const n=o.slice();return n[4]=t[e],n}function he(o,t){let e,n=t[4].code+"",d,c,r,a;function f(){return t[3](t[4])}return{key:o,first:null,c(){e=p("button"),d=D(n),c=S(),k(e,"class","tab-item"),H(e,"active",t[1]===t[4].code),this.first=e},m(g,y){b(g,e,y),u(e,d),u(e,c),r||(a=ae(e,"click",f),r=!0)},p(g,y){t=g,y&4&&n!==(n=t[4].code+"")&&z(d,n),y&6&&H(e,"active",t[1]===t[4].code)},d(g){g&&v(e),r=!1,a()}}}function be(o,t){let e,n,d,c;return n=new Ee({props:{content:t[4].body}}),{key:o,first:null,c(){e=p("div"),J(n.$$.fragment),d=S(),k(e,"class","tab-item"),H(e,"active",t[1]===t[4].code),this.first=e},m(r,a){b(r,e,a),Z(n,e,null),u(e,d),c=!0},p(r,a){t=r;const f={};a&4&&(f.content=t[4].body),n.$set(f),(!c||a&6)&&H(e,"active",t[1]===t[4].code)},i(r){c||(V(n.$$.fragment,r),c=!0)},o(r){X(n.$$.fragment,r),c=!1},d(r){r&&v(e),x(n)}}}function We(o){let t,e,n,d,c,r,a,f=o[0].name+"",g,y,I,q,Q,N,L,O,W,T,C,R=[],M=new Map,j,A,h=[],K=new Map,E,P=U(o[2]);const B=l=>l[4].code;for(let l=0;ll[4].code;for(let l=0;lParam 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.',L=S(),O=p("div"),O.textContent="Responses",W=S(),T=p("div"),C=p("div");for(let l=0;le(1,d=a.code);return o.$$set=a=>{"collection"in a&&e(0,n=a.collection)},e(2,c=[{code:204,body:"null"},{code:400,body:` +import{S as se,i as ne,s as oe,T as U,e as p,b as S,w as D,f as k,g as b,h as u,x as z,U as ee,V as ye,k as te,W as Te,n as le,t as V,a as X,o as v,r as H,u as ae,R as Ee,c as J,m as Z,d as x,Q as Ce,X as fe,C as qe,p as Oe,Y as pe}from"./index-DzzLh2vW.js";function me(o,t,e){const n=o.slice();return n[4]=t[e],n}function _e(o,t,e){const n=o.slice();return n[4]=t[e],n}function he(o,t){let e,n=t[4].code+"",d,c,r,a;function f(){return t[3](t[4])}return{key:o,first:null,c(){e=p("button"),d=D(n),c=S(),k(e,"class","tab-item"),H(e,"active",t[1]===t[4].code),this.first=e},m(g,y){b(g,e,y),u(e,d),u(e,c),r||(a=ae(e,"click",f),r=!0)},p(g,y){t=g,y&4&&n!==(n=t[4].code+"")&&z(d,n),y&6&&H(e,"active",t[1]===t[4].code)},d(g){g&&v(e),r=!1,a()}}}function be(o,t){let e,n,d,c;return n=new Ee({props:{content:t[4].body}}),{key:o,first:null,c(){e=p("div"),J(n.$$.fragment),d=S(),k(e,"class","tab-item"),H(e,"active",t[1]===t[4].code),this.first=e},m(r,a){b(r,e,a),Z(n,e,null),u(e,d),c=!0},p(r,a){t=r;const f={};a&4&&(f.content=t[4].body),n.$set(f),(!c||a&6)&&H(e,"active",t[1]===t[4].code)},i(r){c||(V(n.$$.fragment,r),c=!0)},o(r){X(n.$$.fragment,r),c=!1},d(r){r&&v(e),x(n)}}}function We(o){let t,e,n,d,c,r,a,f=o[0].name+"",g,y,I,q,Q,N,L,O,W,T,C,R=[],M=new Map,j,A,h=[],K=new Map,E,P=U(o[2]);const B=l=>l[4].code;for(let l=0;ll[4].code;for(let l=0;lParam 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.',L=S(),O=p("div"),O.textContent="Responses",W=S(),T=p("div"),C=p("div");for(let l=0;le(1,d=a.code);return o.$$set=a=>{"collection"in a&&e(0,n=a.collection)},e(2,c=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/RealtimeApiDocs-DyrElwZG.js b/ui/dist/assets/RealtimeApiDocs-C93atddx.js similarity index 99% rename from ui/dist/assets/RealtimeApiDocs-DyrElwZG.js rename to ui/dist/assets/RealtimeApiDocs-C93atddx.js index 4e5ed53c..8e88c8be 100644 --- a/ui/dist/assets/RealtimeApiDocs-DyrElwZG.js +++ b/ui/dist/assets/RealtimeApiDocs-C93atddx.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,Q as pe,R as ue,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 me,t as ie,a as ce,o as n,d as le,p as de}from"./index-C6KFFkct.js";function he(o){var B,U,W,L,A,H,T,q,M,j,J,N;let i,m,c=o[0].name+"",b,d,k,h,D,f,_,l,C,$,S,g,w,v,E,r,R;return l=new pe({props:{js:` +import{S as re,i as ae,s as be,Q as pe,R as ue,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 me,t as ie,a as ce,o as n,d as le,p as de}from"./index-DzzLh2vW.js";function he(o){var B,U,W,L,A,H,T,q,M,j,J,N;let i,m,c=o[0].name+"",b,d,k,h,D,f,_,l,C,$,S,g,w,v,E,r,R;return l=new pe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[1]}'); diff --git a/ui/dist/assets/UpdateApiDocs-D-6a8mlA.js b/ui/dist/assets/UpdateApiDocs-BR1hkPYP.js similarity index 99% rename from ui/dist/assets/UpdateApiDocs-D-6a8mlA.js rename to ui/dist/assets/UpdateApiDocs-BR1hkPYP.js index a32e618a..9835ead2 100644 --- a/ui/dist/assets/UpdateApiDocs-D-6a8mlA.js +++ b/ui/dist/assets/UpdateApiDocs-BR1hkPYP.js @@ -1,4 +1,4 @@ -import{S as Ot,i as St,s as Mt,Q as $t,C as x,T as ie,R as Tt,e as i,w as h,b as f,c as we,f as k,g as o,h as n,m as ve,x as te,U as Ie,V as bt,k as qt,W as Rt,n as Dt,t as he,a as ye,o as r,d as Ce,p as Ht,r as Te,u as Lt,y as de}from"./index-C6KFFkct.js";import{F as Pt}from"./FieldsQueryParam-9HzYyPBO.js";function mt(d,e,t){const a=d.slice();return a[10]=e[t],a}function _t(d,e,t){const a=d.slice();return a[10]=e[t],a}function ht(d,e,t){const a=d.slice();return a[15]=e[t],a}function yt(d){let e;return{c(){e=i("p"),e.innerHTML=`Note that in case of a password change all previously issued tokens for the current record +import{S as Ot,i as St,s as Mt,Q as $t,C as x,T as ie,R as Tt,e as i,w as h,b as f,c as we,f as k,g as o,h as n,m as ve,x as te,U as Ie,V as bt,k as qt,W as Rt,n as Dt,t as he,a as ye,o as r,d as Ce,p as Ht,r as Te,u as Lt,y as de}from"./index-DzzLh2vW.js";import{F as Pt}from"./FieldsQueryParam-Rko0bQqM.js";function mt(d,e,t){const a=d.slice();return a[10]=e[t],a}function _t(d,e,t){const a=d.slice();return a[10]=e[t],a}function ht(d,e,t){const a=d.slice();return a[15]=e[t],a}function yt(d){let e;return{c(){e=i("p"),e.innerHTML=`Note that in case of a password change all previously issued tokens for the current record will be automatically invalidated and if you want your user to remain signed in you need to reauthenticate manually after the update call.`},m(t,a){o(t,e,a)},d(t){t&&r(e)}}}function kt(d){let e;return{c(){e=i("p"),e.innerHTML="Requires superuser Authorization:TOKEN header",k(e,"class","txt-hint txt-sm txt-right")},m(t,a){o(t,e,a)},d(t){t&&r(e)}}}function gt(d){let e,t,a,m,p,c,u,b,O,T,M,D,S,E,q,H,I,U,$,R,L,g,w,v;function Q(_,C){var le,z,ne;return C&1&&(b=null),b==null&&(b=!!((ne=(z=(le=_[0])==null?void 0:le.fields)==null?void 0:z.find(Wt))!=null&&ne.required)),b?Bt:Ft}let W=Q(d,-1),F=W(d);return{c(){e=i("tr"),e.innerHTML='Auth specific fields',t=f(),a=i("tr"),a.innerHTML=`
Optional email
String The auth record email address.
diff --git a/ui/dist/assets/VerificationDocs-C__mAvFL.js b/ui/dist/assets/VerificationDocs-BZmrIhkV.js similarity index 99% rename from ui/dist/assets/VerificationDocs-C__mAvFL.js rename to ui/dist/assets/VerificationDocs-BZmrIhkV.js index b75b3184..0f60cca1 100644 --- a/ui/dist/assets/VerificationDocs-C__mAvFL.js +++ b/ui/dist/assets/VerificationDocs-BZmrIhkV.js @@ -1,4 +1,4 @@ -import{S as le,i as ne,s as ie,T as D,e as m,b as T,w as M,f as v,g as b,h as u,x as Y,U as x,V as ye,k as ee,W as Ce,n as te,t as L,a as j,o as h,r as K,u as oe,R as qe,c as G,m as J,d as Z,Q as Ve,X as fe,C as Ie,p as Pe,Y as ue}from"./index-C6KFFkct.js";function de(s,t,e){const o=s.slice();return o[4]=t[e],o}function me(s,t,e){const o=s.slice();return o[4]=t[e],o}function pe(s,t){let e,o=t[4].code+"",f,c,r,a;function d(){return t[3](t[4])}return{key:s,first:null,c(){e=m("button"),f=M(o),c=T(),v(e,"class","tab-item"),K(e,"active",t[1]===t[4].code),this.first=e},m(g,C){b(g,e,C),u(e,f),u(e,c),r||(a=oe(e,"click",d),r=!0)},p(g,C){t=g,C&4&&o!==(o=t[4].code+"")&&Y(f,o),C&6&&K(e,"active",t[1]===t[4].code)},d(g){g&&h(e),r=!1,a()}}}function _e(s,t){let e,o,f,c;return o=new qe({props:{content:t[4].body}}),{key:s,first:null,c(){e=m("div"),G(o.$$.fragment),f=T(),v(e,"class","tab-item"),K(e,"active",t[1]===t[4].code),this.first=e},m(r,a){b(r,e,a),J(o,e,null),u(e,f),c=!0},p(r,a){t=r;const d={};a&4&&(d.content=t[4].body),o.$set(d),(!c||a&6)&&K(e,"active",t[1]===t[4].code)},i(r){c||(L(o.$$.fragment,r),c=!0)},o(r){j(o.$$.fragment,r),c=!1},d(r){r&&h(e),Z(o)}}}function Re(s){let t,e,o,f,c,r,a,d=s[0].name+"",g,C,F,R,H,A,B,O,N,q,V,$=[],Q=new Map,U,P,p=[],y=new Map,I,_=D(s[2]);const X=l=>l[4].code;for(let l=0;l<_.length;l+=1){let i=me(s,_,l),n=X(i);Q.set(n,$[l]=pe(n,i))}let E=D(s[2]);const W=l=>l[4].code;for(let l=0;lParam Type Description
Required token
String The token from the verification request email.',B=T(),O=m("div"),O.textContent="Responses",N=T(),q=m("div"),V=m("div");for(let l=0;l<$.length;l+=1)$[l].c();U=T(),P=m("div");for(let l=0;le(1,f=a.code);return s.$$set=a=>{"collection"in a&&e(0,o=a.collection)},e(2,c=[{code:204,body:"null"},{code:400,body:` +import{S as le,i as ne,s as ie,T as D,e as m,b as T,w as M,f as v,g as b,h as u,x as Y,U as x,V as ye,k as ee,W as Ce,n as te,t as L,a as j,o as h,r as K,u as oe,R as qe,c as G,m as J,d as Z,Q as Ve,X as fe,C as Ie,p as Pe,Y as ue}from"./index-DzzLh2vW.js";function de(s,t,e){const o=s.slice();return o[4]=t[e],o}function me(s,t,e){const o=s.slice();return o[4]=t[e],o}function pe(s,t){let e,o=t[4].code+"",f,c,r,a;function d(){return t[3](t[4])}return{key:s,first:null,c(){e=m("button"),f=M(o),c=T(),v(e,"class","tab-item"),K(e,"active",t[1]===t[4].code),this.first=e},m(g,C){b(g,e,C),u(e,f),u(e,c),r||(a=oe(e,"click",d),r=!0)},p(g,C){t=g,C&4&&o!==(o=t[4].code+"")&&Y(f,o),C&6&&K(e,"active",t[1]===t[4].code)},d(g){g&&h(e),r=!1,a()}}}function _e(s,t){let e,o,f,c;return o=new qe({props:{content:t[4].body}}),{key:s,first:null,c(){e=m("div"),G(o.$$.fragment),f=T(),v(e,"class","tab-item"),K(e,"active",t[1]===t[4].code),this.first=e},m(r,a){b(r,e,a),J(o,e,null),u(e,f),c=!0},p(r,a){t=r;const d={};a&4&&(d.content=t[4].body),o.$set(d),(!c||a&6)&&K(e,"active",t[1]===t[4].code)},i(r){c||(L(o.$$.fragment,r),c=!0)},o(r){j(o.$$.fragment,r),c=!1},d(r){r&&h(e),Z(o)}}}function Re(s){let t,e,o,f,c,r,a,d=s[0].name+"",g,C,F,R,H,A,B,O,N,q,V,$=[],Q=new Map,U,P,p=[],y=new Map,I,_=D(s[2]);const X=l=>l[4].code;for(let l=0;l<_.length;l+=1){let i=me(s,_,l),n=X(i);Q.set(n,$[l]=pe(n,i))}let E=D(s[2]);const W=l=>l[4].code;for(let l=0;lParam Type Description
Required token
String The token from the verification request email.',B=T(),O=m("div"),O.textContent="Responses",N=T(),q=m("div"),V=m("div");for(let l=0;l<$.length;l+=1)$[l].c();U=T(),P=m("div");for(let l=0;le(1,f=a.code);return s.$$set=a=>{"collection"in a&&e(0,o=a.collection)},e(2,c=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/ViewApiDocs-BJ5aAhNM.js b/ui/dist/assets/ViewApiDocs-CrMm4zxc.js similarity index 98% rename from ui/dist/assets/ViewApiDocs-BJ5aAhNM.js rename to ui/dist/assets/ViewApiDocs-CrMm4zxc.js index 8d14e7ec..a73b951d 100644 --- a/ui/dist/assets/ViewApiDocs-BJ5aAhNM.js +++ b/ui/dist/assets/ViewApiDocs-CrMm4zxc.js @@ -1,4 +1,4 @@ -import{S as lt,i as st,s as nt,Q as ot,R as tt,T as K,e as o,w as _,b,c as W,f as m,g as r,h as l,m as X,x as ve,U as Je,V as at,k as it,W as rt,n as dt,t as Q,a as V,o as d,d as Y,C as Ke,p as ct,r as Z,u as pt}from"./index-C6KFFkct.js";import{F as ut}from"./FieldsQueryParam-9HzYyPBO.js";function We(a,s,n){const i=a.slice();return i[6]=s[n],i}function Xe(a,s,n){const i=a.slice();return i[6]=s[n],i}function Ye(a){let s;return{c(){s=o("p"),s.innerHTML="Requires superuser Authorization:TOKEN header",m(s,"class","txt-hint txt-sm txt-right")},m(n,i){r(n,s,i)},d(n){n&&d(s)}}}function Ze(a,s){let n,i,v;function p(){return s[5](s[6])}return{key:a,first:null,c(){n=o("button"),n.textContent=`${s[6].code} `,m(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(c,f){r(c,n,f),i||(v=pt(n,"click",p),i=!0)},p(c,f){s=c,f&20&&Z(n,"active",s[2]===s[6].code)},d(c){c&&d(n),i=!1,v()}}}function et(a,s){let n,i,v,p;return i=new tt({props:{content:s[6].body}}),{key:a,first:null,c(){n=o("div"),W(i.$$.fragment),v=b(),m(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(c,f){r(c,n,f),X(i,n,null),l(n,v),p=!0},p(c,f){s=c,(!p||f&20)&&Z(n,"active",s[2]===s[6].code)},i(c){p||(Q(i.$$.fragment,c),p=!0)},o(c){V(i.$$.fragment,c),p=!1},d(c){c&&d(n),Y(i)}}}function ft(a){var je,Ne;let s,n,i=a[0].name+"",v,p,c,f,w,C,ee,j=a[0].name+"",te,$e,le,F,se,B,ne,$,N,ye,z,P,we,oe,G=a[0].name+"",ae,Ce,ie,Fe,re,S,de,A,ce,I,pe,R,ue,Re,M,O,fe,Oe,be,Te,h,De,E,Pe,Ee,xe,me,Be,_e,Se,Ae,Ie,he,Me,qe,x,ke,q,ge,T,H,y=[],He=new Map,Le,L,k=[],Ue=new Map,D;F=new ot({props:{js:` +import{S as lt,i as st,s as nt,Q as ot,R as tt,T as K,e as o,w as _,b,c as W,f as m,g as r,h as l,m as X,x as ve,U as Je,V as at,k as it,W as rt,n as dt,t as Q,a as V,o as d,d as Y,C as Ke,p as ct,r as Z,u as pt}from"./index-DzzLh2vW.js";import{F as ut}from"./FieldsQueryParam-Rko0bQqM.js";function We(a,s,n){const i=a.slice();return i[6]=s[n],i}function Xe(a,s,n){const i=a.slice();return i[6]=s[n],i}function Ye(a){let s;return{c(){s=o("p"),s.innerHTML="Requires superuser Authorization:TOKEN header",m(s,"class","txt-hint txt-sm txt-right")},m(n,i){r(n,s,i)},d(n){n&&d(s)}}}function Ze(a,s){let n,i,v;function p(){return s[5](s[6])}return{key:a,first:null,c(){n=o("button"),n.textContent=`${s[6].code} `,m(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(c,f){r(c,n,f),i||(v=pt(n,"click",p),i=!0)},p(c,f){s=c,f&20&&Z(n,"active",s[2]===s[6].code)},d(c){c&&d(n),i=!1,v()}}}function et(a,s){let n,i,v,p;return i=new tt({props:{content:s[6].body}}),{key:a,first:null,c(){n=o("div"),W(i.$$.fragment),v=b(),m(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(c,f){r(c,n,f),X(i,n,null),l(n,v),p=!0},p(c,f){s=c,(!p||f&20)&&Z(n,"active",s[2]===s[6].code)},i(c){p||(Q(i.$$.fragment,c),p=!0)},o(c){V(i.$$.fragment,c),p=!1},d(c){c&&d(n),Y(i)}}}function ft(a){var je,Ne;let s,n,i=a[0].name+"",v,p,c,f,w,C,ee,j=a[0].name+"",te,$e,le,F,se,B,ne,$,N,ye,z,P,we,oe,G=a[0].name+"",ae,Ce,ie,Fe,re,S,de,A,ce,I,pe,R,ue,Re,M,O,fe,Oe,be,Te,h,De,E,Pe,Ee,xe,me,Be,_e,Se,Ae,Ie,he,Me,qe,x,ke,q,ge,T,H,y=[],He=new Map,Le,L,k=[],Ue=new Map,D;F=new ot({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/index-C6KFFkct.js b/ui/dist/assets/index-DzzLh2vW.js similarity index 98% rename from ui/dist/assets/index-C6KFFkct.js rename to ui/dist/assets/index-DzzLh2vW.js index 3c910189..13e871b5 100644 --- a/ui/dist/assets/index-C6KFFkct.js +++ b/ui/dist/assets/index-DzzLh2vW.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./FilterAutocompleteInput-BVhhliH4.js","./index-B5ReTu-C.js","./ListApiDocs-MoPZqRTR.js","./FieldsQueryParam-9HzYyPBO.js","./ListApiDocs-DhdAtA7Y.css","./ViewApiDocs-BJ5aAhNM.js","./CreateApiDocs-CSumiDHV.js","./UpdateApiDocs-D-6a8mlA.js","./AuthMethodsDocs-0sXZLdUz.js","./AuthRefreshDocs-BDIR7TiC.js","./AuthWithPasswordDocs-CYL6rtF4.js","./AuthWithOAuth2Docs-BrCCD3wB.js","./CodeEditor-D4uJdbuC.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./FilterAutocompleteInput-C5u5J0Yo.js","./index-B5ReTu-C.js","./ListApiDocs-zvKNcpnx.js","./FieldsQueryParam-Rko0bQqM.js","./ListApiDocs-DhdAtA7Y.css","./ViewApiDocs-CrMm4zxc.js","./CreateApiDocs-Bwq-g1yE.js","./UpdateApiDocs-BR1hkPYP.js","./AuthMethodsDocs-ftvbZDKw.js","./AuthRefreshDocs-iVy1WmRW.js","./AuthWithPasswordDocs-ADzrUx-V.js","./AuthWithOAuth2Docs-ColozBPV.js","./CodeEditor-wsjRtoGt.js"])))=>i.map(i=>d[i]); var hk=Object.defineProperty;var _k=(n,e,t)=>e in n?hk(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ct=(n,e,t)=>_k(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(l){if(l.ep)return;l.ep=!0;const s=t(l);fetch(l.href,s)}})();function te(){}const io=n=>n;function je(n,e){for(const t in e)n[t]=e[t];return n}function gk(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function Eb(n){return n()}function df(){return Object.create(null)}function De(n){n.forEach(Eb)}function Rt(n){return typeof n=="function"}function _e(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let So;function vn(n,e){return n===e?!0:(So||(So=document.createElement("a")),So.href=e,n===So.href)}function bk(n){return Object.keys(n).length===0}function uu(n,...e){if(n==null){for(const i of e)i(void 0);return te}const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Mb(n){let e;return uu(n,t=>e=t)(),e}function Qe(n,e,t){n.$$.on_destroy.push(uu(e,t))}function Lt(n,e,t,i){if(n){const l=Db(n,e,t,i);return n[0](l)}}function Db(n,e,t,i){return n[1]&&i?je(t.ctx.slice(),n[1](i(e))):t.ctx}function At(n,e,t,i){if(n[2]&&i){const l=n[2](i(t));if(e.dirty===void 0)return l;if(typeof l=="object"){const s=[],o=Math.max(e.dirty.length,l.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),fu=Ib?n=>requestAnimationFrame(n):te;const Zl=new Set;function Lb(n){Zl.forEach(e=>{e.c(n)||(Zl.delete(e),e.f())}),Zl.size!==0&&fu(Lb)}function Er(n){let e;return Zl.size===0&&fu(Lb),{promise:new Promise(t=>{Zl.add(e={c:n,f:t})}),abort(){Zl.delete(e)}}}function w(n,e){n.appendChild(e)}function Ab(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function yk(n){const e=b("style");return e.textContent="/* empty */",kk(Ab(n),e),e.sheet}function kk(n,e){return w(n.head||n,e),e.sheet}function v(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode&&n.parentNode.removeChild(n)}function pt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function tt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function On(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 vk=["width","height"];function Xn(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&&vk.indexOf(i)===-1?n[i]=e[i]:p(n,i,e[i])}function wk(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 _t(n){return n===""?null:+n}function Sk(n){return Array.from(n.childNodes)}function ue(n,e){e=""+e,n.data!==e&&(n.data=e)}function ce(n,e){n.value=e??""}function Tk(n,e,t,i){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,"")}function Q(n,e,t){n.classList.toggle(e,!!t)}function Pb(n,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:i})}function jt(n,e){return new n(e)}const fr=new Map;let cr=0;function $k(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Ck(n,e){const t={stylesheet:yk(e),rules:{}};return fr.set(n,t),t}function zs(n,e,t,i,l,s,o,r=0){const a=16.666/i;let u=`{ `;for(let _=0;_<=1;_+=a){const y=e+(t-e)*s(_);u+=_*100+`%{${o(y,1-y)}} `}const f=u+`100% {${o(t,1-t)}} @@ -14,7 +14,7 @@ var hk=Object.defineProperty;var _k=(n,e,t)=>e in n?hk(n,e,{enumerable:!0,config `)})),o=!0)},p(a,u){i&&Rt(i.update)&&u&8&&i.update.call(null,{position:"left",text:a[3].map(br).join(` `)})},i(a){s||(a&&nt(()=>{s&&(l||(l=ze(t,Mt,{duration:150,start:.7},!0)),l.run(1))}),s=!0)},o(a){a&&(l||(l=ze(t,Mt,{duration:150,start:.7},!1)),l.run(0)),s=!1},d(a){a&&k(e),a&&l&&l.end(),o=!1,r()}}}function bc(n){let e,t,i=br(n[12])+"",l,s,o,r;return{c(){e=b("div"),t=b("pre"),l=Y(i),s=C(),p(e,"class","help-block help-block-error")},m(a,u){v(a,e,u),w(e,t),w(t,l),w(e,s),r=!0},p(a,u){(!r||u&8)&&i!==(i=br(a[12])+"")&&ue(l,i)},i(a){r||(a&&nt(()=>{r&&(o||(o=ze(e,wt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=ze(e,wt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&k(e),a&&o&&o.end()}}}function Xw(n){let e,t,i,l,s,o,r;const a=n[9].default,u=Lt(a,n,n[8],gc),f=[Gw,Zw],c=[];function d(m,h){return m[0]&&m[3].length?0:1}return i=d(n),l=c[i]=f[i](n),{c(){e=b("div"),u&&u.c(),t=C(),l.c(),p(e,"class",n[1]),Q(e,"error",n[3].length)},m(m,h){v(m,e,h),u&&u.m(e,null),w(e,t),c[i].m(e,null),n[11](e),s=!0,o||(r=B(e,"click",n[10]),o=!0)},p(m,[h]){u&&u.p&&(!s||h&256)&&Pt(u,a,m,m[8],s?At(a,m[8],h,Jw):Nt(m[8]),gc);let g=i;i=d(m),i===g?c[i].p(m,h):(re(),D(c[g],1,1,()=>{c[g]=null}),ae(),l=c[i],l?l.p(m,h):(l=c[i]=f[i](m),l.c()),O(l,1),l.m(e,null)),(!s||h&2)&&p(e,"class",m[1]),(!s||h&10)&&Q(e,"error",m[3].length)},i(m){s||(O(u,m),O(l),s=!0)},o(m){D(u,m),D(l),s=!1},d(m){m&&k(e),u&&u.d(m),c[i].d(),n[11](null),o=!1,r()}}}const yc="Invalid value";function br(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||yc:n||yc}function Qw(n,e,t){let i;Qe(n,Sn,g=>t(7,i=g));let{$$slots:l={},$$scope:s}=e;const o="field_"+z.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,c=[];function d(){fi(r)}Yt(()=>(f.addEventListener("input",d),f.addEventListener("change",d),()=>{f.removeEventListener("input",d),f.removeEventListener("change",d)}));function m(g){Pe.call(this,n,g)}function h(g){ie[g?"unshift":"push"](()=>{f=g,t(2,f)})}return n.$$set=g=>{"name"in g&&t(5,r=g.name),"inlineError"in g&&t(0,a=g.inlineError),"class"in g&&t(1,u=g.class),"$$scope"in g&&t(8,s=g.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,c=z.toArray(z.getNestedVal(i,r)))},[a,u,f,c,o,r,d,i,s,l,m,h]}class fe extends ye{constructor(e){super(),be(this,e,Qw,Xw,_e,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function xw(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Email"),l=C(),s=b("input"),p(e,"for",i=n[17]),p(s,"type","email"),p(s,"autocomplete","off"),p(s,"id",o=n[17]),s.required=!0,s.autofocus=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[2]),s.focus(),r||(a=B(s,"input",n[9]),r=!0)},p(u,f){f&131072&&i!==(i=u[17])&&p(e,"for",i),f&131072&&o!==(o=u[17])&&p(s,"id",o),f&4&&s.value!==u[2]&&ce(s,u[2])},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function e3(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("label"),t=Y("Password"),l=C(),s=b("input"),r=C(),a=b("div"),a.textContent="Recommended at least 10 characters.",p(e,"for",i=n[17]),p(s,"type","password"),p(s,"autocomplete","new-password"),p(s,"minlength","10"),p(s,"id",o=n[17]),s.required=!0,p(a,"class","help-block")},m(c,d){v(c,e,d),w(e,t),v(c,l,d),v(c,s,d),ce(s,n[3]),v(c,r,d),v(c,a,d),u||(f=B(s,"input",n[10]),u=!0)},p(c,d){d&131072&&i!==(i=c[17])&&p(e,"for",i),d&131072&&o!==(o=c[17])&&p(s,"id",o),d&8&&s.value!==c[3]&&ce(s,c[3])},d(c){c&&(k(e),k(l),k(s),k(r),k(a)),u=!1,f()}}}function t3(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Password confirm"),l=C(),s=b("input"),p(e,"for",i=n[17]),p(s,"type","password"),p(s,"minlength","10"),p(s,"id",o=n[17]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[4]),r||(a=B(s,"input",n[11]),r=!0)},p(u,f){f&131072&&i!==(i=u[17])&&p(e,"for",i),f&131072&&o!==(o=u[17])&&p(s,"id",o),f&16&&s.value!==u[4]&&ce(s,u[4])},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function n3(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S,T;return l=new fe({props:{class:"form-field required",name:"email",$$slots:{default:[xw,({uniqueId:$})=>({17:$}),({uniqueId:$})=>$?131072:0]},$$scope:{ctx:n}}}),o=new fe({props:{class:"form-field required",name:"password",$$slots:{default:[e3,({uniqueId:$})=>({17:$}),({uniqueId:$})=>$?131072:0]},$$scope:{ctx:n}}}),a=new fe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[t3,({uniqueId:$})=>({17:$}),({uniqueId:$})=>$?131072:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),t=b("div"),t.innerHTML="

Create your first superuser account in order to continue

",i=C(),H(l.$$.fragment),s=C(),H(o.$$.fragment),r=C(),H(a.$$.fragment),u=C(),f=b("button"),f.innerHTML='Create superuser and login ',c=C(),d=b("hr"),m=C(),h=b("label"),h.innerHTML=' Or initialize from backup',g=C(),_=b("input"),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[6]),Q(f,"btn-loading",n[0]),p(e,"class","block"),p(e,"autocomplete","off"),p(h,"for","backupFileInput"),p(h,"class","btn btn-lg btn-hint btn-transparent btn-block"),Q(h,"btn-disabled",n[6]),Q(h,"btn-loading",n[1]),p(_,"id","backupFileInput"),p(_,"type","file"),p(_,"class","hidden"),p(_,"accept",".zip")},m($,E){v($,e,E),w(e,t),w(e,i),F(l,e,null),w(e,s),F(o,e,null),w(e,r),F(a,e,null),w(e,u),w(e,f),v($,c,E),v($,d,E),v($,m,E),v($,h,E),v($,g,E),v($,_,E),n[12](_),y=!0,S||(T=[B(e,"submit",tt(n[7])),B(_,"change",n[13])],S=!0)},p($,[E]){const M={};E&393220&&(M.$$scope={dirty:E,ctx:$}),l.$set(M);const L={};E&393224&&(L.$$scope={dirty:E,ctx:$}),o.$set(L);const I={};E&393232&&(I.$$scope={dirty:E,ctx:$}),a.$set(I),(!y||E&64)&&Q(f,"btn-disabled",$[6]),(!y||E&1)&&Q(f,"btn-loading",$[0]),(!y||E&64)&&Q(h,"btn-disabled",$[6]),(!y||E&2)&&Q(h,"btn-loading",$[1])},i($){y||(O(l.$$.fragment,$),O(o.$$.fragment,$),O(a.$$.fragment,$),y=!0)},o($){D(l.$$.fragment,$),D(o.$$.fragment,$),D(a.$$.fragment,$),y=!1},d($){$&&(k(e),k(c),k(d),k(m),k(h),k(g),k(_)),q(l),q(o),q(a),n[12](null),S=!1,De(T)}}}function i3(n,e,t){let i;const l=gt();let s="",o="",r="",a=!1,u=!1,f;async function c(){if(!i){t(0,a=!0);try{await me.collection("_superusers").create({email:s,password:o,passwordConfirm:r}),await me.collection("_superusers").authWithPassword(s,o),l("submit")}catch($){me.error($)}t(0,a=!1)}}function d(){f&&t(5,f.value="",f)}function m($){$&&pn(`Note that we don't perform validations for the uploaded backup files. Proceed with caution and only if you trust the file source. -Do you really want to upload and initialize "${$.name}"?`,()=>{h($)},()=>{d()})}async function h($){if(!(!$||i)){t(1,u=!0);try{await me.backups.upload({file:$}),await me.backups.restore($.name),Ys("Please wait while extracting the uploaded archive!"),await new Promise(E=>setTimeout(E,2e3)),l("submit")}catch(E){me.error(E)}d(),t(1,u=!1)}}function g(){s=this.value,t(2,s)}function _(){o=this.value,t(3,o)}function y(){r=this.value,t(4,r)}function S($){ie[$?"unshift":"push"](()=>{f=$,t(5,f)})}const T=$=>{var E,M;m((M=(E=$.target)==null?void 0:E.files)==null?void 0:M[0])};return n.$$.update=()=>{n.$$.dirty&3&&t(6,i=a||u)},[a,u,s,o,r,f,i,c,m,g,_,y,S,T]}class l3 extends ye{constructor(e){super(),be(this,e,i3,n3,_e,{})}}function kc(n){let e,t;return e=new ny({props:{$$slots:{default:[s3]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l&9&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function s3(n){let e,t;return e=new l3({}),e.$on("submit",n[1]),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p:te,i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function o3(n){let e,t,i=n[0]&&kc(n);return{c(){i&&i.c(),e=ge()},m(l,s){i&&i.m(l,s),v(l,e,s),t=!0},p(l,[s]){l[0]?i?(i.p(l,s),s&1&&O(i,1)):(i=kc(l),i.c(),O(i,1),i.m(e.parentNode,e)):i&&(re(),D(i,1,1,()=>{i=null}),ae())},i(l){t||(O(i),t=!0)},o(l){D(i),t=!1},d(l){l&&k(e),i&&i.d(l)}}}function r3(n,e,t){let i=!1;l();function l(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("pbinstal")){me.logout(!1),t(0,i=!0);return}me.authStore.isValid?Il("/collections"):me.logout()}return[i,async()=>{t(0,i=!1),await fn(),window.location.search=""}]}class a3 extends ye{constructor(e){super(),be(this,e,r3,o3,_e,{})}}function u3(n){let e,t,i,l;return{c(){e=b("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(s,o){v(s,e,o),n[13](e),ce(e,n[7]),i||(l=B(e,"input",n[14]),i=!0)},p(s,o){o&3&&t!==(t=s[0]||s[1])&&p(e,"placeholder",t),o&128&&e.value!==s[7]&&ce(e,s[7])},i:te,o:te,d(s){s&&k(e),n[13](null),i=!1,l()}}}function f3(n){let e,t,i,l;function s(a){n[12](a)}var o=n[4];function r(a,u){let f={id:a[8],singleLine:!0,disableRequestKeys:!0,disableCollectionJoinKeys:!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=jt(o,r(n)),ie.push(()=>ve(e,"value",s)),e.$on("submit",n[10])),{c(){e&&H(e.$$.fragment),i=ge()},m(a,u){e&&F(e,a,u),v(a,i,u),l=!0},p(a,u){if(u&16&&o!==(o=a[4])){if(e){re();const f=e;D(f.$$.fragment,1,0,()=>{q(f,1)}),ae()}o?(e=jt(o,r(a)),ie.push(()=>ve(e,"value",s)),e.$on("submit",a[10]),H(e.$$.fragment),O(e.$$.fragment,1),F(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){l||(e&&O(e.$$.fragment,a),l=!0)},o(a){e&&D(e.$$.fragment,a),l=!1},d(a){a&&k(i),e&&q(e,a)}}}function vc(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded-sm btn-sm btn-warning")},m(l,s){v(l,e,s),i=!0},i(l){i||(l&&nt(()=>{i&&(t||(t=ze(e,Fn,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(l){l&&(t||(t=ze(e,Fn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(l){l&&k(e),l&&t&&t.end()}}}function wc(n){let e,t,i,l,s;return{c(){e=b("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){v(o,e,r),i=!0,l||(s=B(e,"click",n[15]),l=!0)},p:te,i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Fn,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Fn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function c3(n){let e,t,i,l,s,o,r,a,u,f,c;const d=[f3,u3],m=[];function h(y,S){return y[4]&&!y[5]?0:1}s=h(n),o=m[s]=d[s](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&vc(),_=(n[0].length||n[7].length)&&wc(n);return{c(){e=b("form"),t=b("label"),i=b("i"),l=C(),o.c(),r=C(),g&&g.c(),a=C(),_&&_.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){v(y,e,S),w(e,t),w(t,i),w(e,l),m[s].m(e,null),w(e,r),g&&g.m(e,null),w(e,a),_&&_.m(e,null),u=!0,f||(c=[B(e,"click",On(n[11])),B(e,"submit",tt(n[10]))],f=!0)},p(y,[S]){let T=s;s=h(y),s===T?m[s].p(y,S):(re(),D(m[T],1,1,()=>{m[T]=null}),ae(),o=m[s],o?o.p(y,S):(o=m[s]=d[s](y),o.c()),O(o,1),o.m(e,r)),(y[0].length||y[7].length)&&y[7]!=y[0]?g?S&129&&O(g,1):(g=vc(),g.c(),O(g,1),g.m(e,a)):g&&(re(),D(g,1,1,()=>{g=null}),ae()),y[0].length||y[7].length?_?(_.p(y,S),S&129&&O(_,1)):(_=wc(y),_.c(),O(_,1),_.m(e,null)):_&&(re(),D(_,1,1,()=>{_=null}),ae())},i(y){u||(O(o),O(g),O(_),u=!0)},o(y){D(o),D(g),D(_),u=!1},d(y){y&&k(e),m[s].d(),g&&g.d(),_&&_.d(),f=!1,De(c)}}}function d3(n,e,t){const i=gt(),l="search_"+z.randomString(7);let{value:s=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=null}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(E=!0){t(7,d=""),E&&(c==null||c.focus()),i("clear")}function h(){t(0,s=d),i("submit",s)}async function g(){u||f||(t(5,f=!0),t(4,u=(await Ot(async()=>{const{default:E}=await import("./FilterAutocompleteInput-BVhhliH4.js");return{default:E}},__vite__mapDeps([0,1]),import.meta.url)).default),t(5,f=!1))}Yt(()=>{g()});function _(E){Pe.call(this,n,E)}function y(E){d=E,t(7,d),t(0,s)}function S(E){ie[E?"unshift":"push"](()=>{c=E,t(6,c)})}function T(){d=this.value,t(7,d),t(0,s)}const $=()=>{m(!1),h()};return n.$$set=E=>{"value"in E&&t(0,s=E.value),"placeholder"in E&&t(1,o=E.placeholder),"autocompleteCollection"in E&&t(2,r=E.autocompleteCollection),"extraAutocompleteKeys"in E&&t(3,a=E.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof s=="string"&&t(7,d=s)},[s,o,r,a,u,f,c,d,l,m,h,_,y,S,T,$]}class Hr extends ye{constructor(e){super(),be(this,e,d3,c3,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function p3(n){let e,t,i,l,s,o;return{c(){e=b("button"),t=b("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){v(r,e,a),w(e,t),s||(o=[Me(l=He.call(null,e,n[0])),B(e,"click",n[3])],s=!0)},p(r,[a]){a&2&&i!==(i="btn btn-transparent btn-circle "+r[1]+" svelte-1bvelc2")&&p(e,"class",i),l&&Rt(l.update)&&a&1&&l.update.call(null,r[0]),a&6&&Q(e,"refreshing",r[2])},i:te,o:te,d(r){r&&k(e),s=!1,De(o)}}}function m3(n,e,t){const i=gt();let{tooltip:l={text:"Refresh",position:"right"}}=e,{class:s=""}=e,o=null;function r(){i("refresh");const a=l;t(0,l=null),clearTimeout(o),t(2,o=setTimeout(()=>{t(2,o=null),t(0,l=a)},150))}return Yt(()=>()=>clearTimeout(o)),n.$$set=a=>{"tooltip"in a&&t(0,l=a.tooltip),"class"in a&&t(1,s=a.class)},[l,s,o,r]}class Au extends ye{constructor(e){super(),be(this,e,m3,p3,_e,{tooltip:0,class:1})}}const h3=n=>({}),Sc=n=>({}),_3=n=>({}),Tc=n=>({});function g3(n){let e,t,i,l,s,o,r,a;const u=n[11].before,f=Lt(u,n,n[10],Tc),c=n[11].default,d=Lt(c,n,n[10],null),m=n[11].after,h=Lt(m,n,n[10],Sc);return{c(){e=b("div"),f&&f.c(),t=C(),i=b("div"),d&&d.c(),s=C(),h&&h.c(),p(i,"class",l="scroller "+n[0]+" "+n[3]+" svelte-3a0gfs"),p(e,"class","scroller-wrapper svelte-3a0gfs")},m(g,_){v(g,e,_),f&&f.m(e,null),w(e,t),w(e,i),d&&d.m(i,null),n[12](i),w(e,s),h&&h.m(e,null),o=!0,r||(a=[B(window,"resize",n[1]),B(i,"scroll",n[1])],r=!0)},p(g,[_]){f&&f.p&&(!o||_&1024)&&Pt(f,u,g,g[10],o?At(u,g[10],_,_3):Nt(g[10]),Tc),d&&d.p&&(!o||_&1024)&&Pt(d,c,g,g[10],o?At(c,g[10],_,null):Nt(g[10]),null),(!o||_&9&&l!==(l="scroller "+g[0]+" "+g[3]+" svelte-3a0gfs"))&&p(i,"class",l),h&&h.p&&(!o||_&1024)&&Pt(h,m,g,g[10],o?At(m,g[10],_,h3):Nt(g[10]),Sc)},i(g){o||(O(f,g),O(d,g),O(h,g),o=!0)},o(g){D(f,g),D(d,g),D(h,g),o=!1},d(g){g&&k(e),f&&f.d(g),d&&d.d(g),n[12](null),h&&h.d(g),r=!1,De(a)}}}function b3(n,e,t){let{$$slots:i={},$$scope:l}=e;const s=gt();let{class:o=""}=e,{vThreshold:r=0}=e,{hThreshold:a=0}=e,{dispatchOnNoScroll:u=!0}=e,f=null,c="",d=null,m,h,g,_,y;function S(){f&&t(2,f.scrollTop=0,f)}function T(){f&&t(2,f.scrollLeft=0,f)}function $(){f&&(t(3,c=""),g=f.clientWidth+2,_=f.clientHeight+2,m=f.scrollWidth-g,h=f.scrollHeight-_,h>0?(t(3,c+=" v-scroll"),r>=_&&t(4,r=0),f.scrollTop-r<=0&&(t(3,c+=" v-scroll-start"),s("vScrollStart")),f.scrollTop+r>=h&&(t(3,c+=" v-scroll-end"),s("vScrollEnd"))):u&&s("vScrollEnd"),m>0?(t(3,c+=" h-scroll"),a>=g&&t(5,a=0),f.scrollLeft-a<=0&&(t(3,c+=" h-scroll-start"),s("hScrollStart")),f.scrollLeft+a>=m&&(t(3,c+=" h-scroll-end"),s("hScrollEnd"))):u&&s("hScrollEnd"))}function E(){d||(d=setTimeout(()=>{$(),d=null},150))}Yt(()=>(E(),y=new MutationObserver(E),y.observe(f,{attributeFilter:["width","height"],childList:!0,subtree:!0}),()=>{y==null||y.disconnect(),clearTimeout(d)}));function M(L){ie[L?"unshift":"push"](()=>{f=L,t(2,f)})}return n.$$set=L=>{"class"in L&&t(0,o=L.class),"vThreshold"in L&&t(4,r=L.vThreshold),"hThreshold"in L&&t(5,a=L.hThreshold),"dispatchOnNoScroll"in L&&t(6,u=L.dispatchOnNoScroll),"$$scope"in L&&t(10,l=L.$$scope)},[o,E,f,c,r,a,u,S,T,$,l,i,M]}class Pu extends ye{constructor(e){super(),be(this,e,b3,g3,_e,{class:0,vThreshold:4,hThreshold:5,dispatchOnNoScroll:6,resetVerticalScroll:7,resetHorizontalScroll:8,refresh:9,throttleRefresh:1})}get resetVerticalScroll(){return this.$$.ctx[7]}get resetHorizontalScroll(){return this.$$.ctx[8]}get refresh(){return this.$$.ctx[9]}get throttleRefresh(){return this.$$.ctx[1]}}function y3(n){let e,t,i,l,s;const o=n[6].default,r=Lt(o,n,n[5],null);return{c(){e=b("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){v(a,e,u),r&&r.m(e,null),i=!0,l||(s=[B(e,"click",n[7]),B(e,"keydown",n[8])],l=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Pt(r,o,a,a[5],i?At(o,a[5],u,null):Nt(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||(O(r,a),i=!0)},o(a){D(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),l=!1,De(s)}}}function k3(n,e,t){let{$$slots:i={},$$scope:l}=e,{class:s=""}=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,s=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,l=d.$$scope)},[r,s,o,a,u,l,i,f,c]}class ir extends ye{constructor(e){super(),be(this,e,k3,y3,_e,{class:1,name:2,sort:0,disable:3})}}function v3(n){let e,t=n[0].replace("Z"," UTC")+"",i,l,s;return{c(){e=b("span"),i=Y(t),p(e,"class","txt-nowrap")},m(o,r){v(o,e,r),w(e,i),l||(s=Me(He.call(null,e,n[1])),l=!0)},p(o,[r]){r&1&&t!==(t=o[0].replace("Z"," UTC")+"")&&ue(i,t)},i:te,o:te,d(o){o&&k(e),l=!1,s()}}}function w3(n,e,t){let{date:i}=e;const l={get text(){return z.formatToLocalDate(i,"yyyy-MM-dd HH:mm:ss.SSS")+" Local"}};return n.$$set=s=>{"date"in s&&t(0,i=s.date)},[i,l]}class iy extends ye{constructor(e){super(),be(this,e,w3,v3,_e,{date:0})}}function S3(n){let e,t,i=(n[1]||"UNKN")+"",l,s,o,r,a;return{c(){e=b("div"),t=b("span"),l=Y(i),s=Y(" ("),o=Y(n[0]),r=Y(")"),p(t,"class","txt"),p(e,"class",a="label log-level-label level-"+n[0]+" svelte-ha6hme")},m(u,f){v(u,e,f),w(e,t),w(t,l),w(t,s),w(t,o),w(t,r)},p(u,[f]){f&2&&i!==(i=(u[1]||"UNKN")+"")&&ue(l,i),f&1&&ue(o,u[0]),f&1&&a!==(a="label log-level-label level-"+u[0]+" svelte-ha6hme")&&p(e,"class",a)},i:te,o:te,d(u){u&&k(e)}}}function T3(n,e,t){let i,{level:l}=e;return n.$$set=s=>{"level"in s&&t(0,l=s.level)},n.$$.update=()=>{var s;n.$$.dirty&1&&t(1,i=(s=H0.find(o=>o.level==l))==null?void 0:s.label)},[l,i]}class ly extends ye{constructor(e){super(),be(this,e,T3,S3,_e,{level:0})}}function $c(n,e,t){var o;const i=n.slice();i[32]=e[t];const l=((o=i[32].data)==null?void 0:o.type)=="request";i[33]=l;const s=R3(i[32]);return i[34]=s,i}function Cc(n,e,t){const i=n.slice();return i[37]=e[t],i}function $3(n){let e,t,i,l,s,o,r;return{c(){e=b("div"),t=b("input"),l=C(),s=b("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[3].length,t.checked=n[8],p(s,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){v(a,e,u),w(e,t),w(e,l),w(e,s),o||(r=B(t,"change",n[19]),o=!0)},p(a,u){u[0]&8&&i!==(i=!a[3].length)&&(t.disabled=i),u[0]&256&&(t.checked=a[8])},d(a){a&&k(e),o=!1,r()}}}function C3(n){let e;return{c(){e=b("span"),p(e,"class","loader loader-sm")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function O3(n){let e;return{c(){e=b("div"),e.innerHTML=' level',p(e,"class","col-header-content")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function E3(n){let e;return{c(){e=b("div"),e.innerHTML=' message',p(e,"class","col-header-content")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function M3(n){let e;return{c(){e=b("div"),e.innerHTML=` created`,p(e,"class","col-header-content")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function Oc(n){let e;function t(s,o){return s[7]?I3:D3}let i=t(n),l=i(n);return{c(){l.c(),e=ge()},m(s,o){l.m(s,o),v(s,e,o)},p(s,o){i===(i=t(s))&&l?l.p(s,o):(l.d(1),l=i(s),l&&(l.c(),l.m(e.parentNode,e)))},d(s){s&&k(e),l.d(s)}}}function D3(n){var r;let e,t,i,l,s,o=((r=n[0])==null?void 0:r.length)&&Ec(n);return{c(){e=b("tr"),t=b("td"),i=b("h6"),i.textContent="No logs found.",l=C(),o&&o.c(),s=C(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){v(a,e,u),w(e,t),w(t,i),w(t,l),o&&o.m(t,null),w(e,s)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Ec(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function I3(n){let e;return{c(){e=b("tr"),e.innerHTML=' '},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function Ec(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[26]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function Mc(n){let e,t=pe(n[34]),i=[];for(let l=0;l',P=C(),p(s,"type","checkbox"),p(s,"id",o="checkbox_"+e[32].id),s.checked=r=e[4][e[32].id],p(u,"for",f="checkbox_"+e[32].id),p(l,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(d,"class","col-type-text col-field-level min-width svelte-91v05h"),p(y,"class","txt-ellipsis"),p(_,"class","flex flex-gap-10"),p(g,"class","col-type-text col-field-message svelte-91v05h"),p(M,"class","col-type-date col-field-created"),p(A,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ee,X){v(ee,t,X),w(t,i),w(i,l),w(l,s),w(l,a),w(l,u),w(t,c),w(t,d),F(m,d,null),w(t,h),w(t,g),w(g,_),w(_,y),w(y,T),w(g,$),V&&V.m(g,null),w(t,E),w(t,M),F(L,M,null),w(t,I),w(t,A),w(t,P),R=!0,N||(U=[B(s,"change",j),B(l,"click",On(e[18])),B(t,"click",K),B(t,"keydown",J)],N=!0)},p(ee,X){e=ee,(!R||X[0]&8&&o!==(o="checkbox_"+e[32].id))&&p(s,"id",o),(!R||X[0]&24&&r!==(r=e[4][e[32].id]))&&(s.checked=r),(!R||X[0]&8&&f!==(f="checkbox_"+e[32].id))&&p(u,"for",f);const oe={};X[0]&8&&(oe.level=e[32].level),m.$set(oe),(!R||X[0]&8)&&S!==(S=e[32].message+"")&&ue(T,S),e[34].length?V?V.p(e,X):(V=Mc(e),V.c(),V.m(g,null)):V&&(V.d(1),V=null);const Se={};X[0]&8&&(Se.date=e[32].created),L.$set(Se)},i(ee){R||(O(m.$$.fragment,ee),O(L.$$.fragment,ee),R=!0)},o(ee){D(m.$$.fragment,ee),D(L.$$.fragment,ee),R=!1},d(ee){ee&&k(t),q(m),V&&V.d(),q(L),N=!1,De(U)}}}function P3(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S=[],T=new Map,$;function E(J,ee){return J[7]?C3:$3}let M=E(n),L=M(n);function I(J){n[20](J)}let A={disable:!0,class:"col-field-level min-width",name:"level",$$slots:{default:[O3]},$$scope:{ctx:n}};n[1]!==void 0&&(A.sort=n[1]),o=new ir({props:A}),ie.push(()=>ve(o,"sort",I));function P(J){n[21](J)}let R={disable:!0,class:"col-type-text col-field-message",name:"data",$$slots:{default:[E3]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),u=new ir({props:R}),ie.push(()=>ve(u,"sort",P));function N(J){n[22](J)}let U={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[M3]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),d=new ir({props:U}),ie.push(()=>ve(d,"sort",N));let j=pe(n[3]);const V=J=>J[32].id;for(let J=0;Jr=!1)),o.$set(X);const oe={};ee[1]&512&&(oe.$$scope={dirty:ee,ctx:J}),!f&&ee[0]&2&&(f=!0,oe.sort=J[1],$e(()=>f=!1)),u.$set(oe);const Se={};ee[1]&512&&(Se.$$scope={dirty:ee,ctx:J}),!m&&ee[0]&2&&(m=!0,Se.sort=J[1],$e(()=>m=!1)),d.$set(Se),ee[0]&9369&&(j=pe(J[3]),re(),S=kt(S,ee,V,1,J,j,T,y,zt,Ic,null,$c),ae(),!j.length&&K?K.p(J,ee):j.length?K&&(K.d(1),K=null):(K=Oc(J),K.c(),K.m(y,null))),(!$||ee[0]&128)&&Q(e,"table-loading",J[7])},i(J){if(!$){O(o.$$.fragment,J),O(u.$$.fragment,J),O(d.$$.fragment,J);for(let ee=0;eeLoad more',p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[7]),Q(t,"btn-disabled",n[7]),p(e,"class","block txt-center m-t-sm")},m(s,o){v(s,e,o),w(e,t),i||(l=B(t,"click",n[27]),i=!0)},p(s,o){o[0]&128&&Q(t,"btn-loading",s[7]),o[0]&128&&Q(t,"btn-disabled",s[7])},d(s){s&&k(e),i=!1,l()}}}function Ac(n){let e,t,i,l,s,o,r=n[5]===1?"log":"logs",a,u,f,c,d,m,h,g,_,y,S;return{c(){e=b("div"),t=b("div"),i=Y("Selected "),l=b("strong"),s=Y(n[5]),o=C(),a=Y(r),u=C(),f=b("button"),f.innerHTML='Reset',c=C(),d=b("div"),m=C(),h=b("button"),h.innerHTML='Download as JSON',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),p(d,"class","flex-fill"),p(h,"type","button"),p(h,"class","btn btn-sm"),p(e,"class","bulkbar svelte-91v05h")},m(T,$){v(T,e,$),w(e,t),w(t,i),w(t,l),w(l,s),w(t,o),w(t,a),w(e,u),w(e,f),w(e,c),w(e,d),w(e,m),w(e,h),_=!0,y||(S=[B(f,"click",n[28]),B(h,"click",n[14])],y=!0)},p(T,$){(!_||$[0]&32)&&ue(s,T[5]),(!_||$[0]&32)&&r!==(r=T[5]===1?"log":"logs")&&ue(a,r)},i(T){_||(T&&nt(()=>{_&&(g||(g=ze(e,Fn,{duration:150,y:5},!0)),g.run(1))}),_=!0)},o(T){T&&(g||(g=ze(e,Fn,{duration:150,y:5},!1)),g.run(0)),_=!1},d(T){T&&k(e),T&&g&&g.end(),y=!1,De(S)}}}function N3(n){let e,t,i,l,s;e=new Pu({props:{class:"table-wrapper",$$slots:{default:[P3]},$$scope:{ctx:n}}});let o=n[3].length&&n[9]&&Lc(n),r=n[5]&&Ac(n);return{c(){H(e.$$.fragment),t=C(),o&&o.c(),i=C(),r&&r.c(),l=ge()},m(a,u){F(e,a,u),v(a,t,u),o&&o.m(a,u),v(a,i,u),r&&r.m(a,u),v(a,l,u),s=!0},p(a,u){const f={};u[0]&411|u[1]&512&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),a[3].length&&a[9]?o?o.p(a,u):(o=Lc(a),o.c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null),a[5]?r?(r.p(a,u),u[0]&32&&O(r,1)):(r=Ac(a),r.c(),O(r,1),r.m(l.parentNode,l)):r&&(re(),D(r,1,1,()=>{r=null}),ae())},i(a){s||(O(e.$$.fragment,a),O(r),s=!0)},o(a){D(e.$$.fragment,a),D(r),s=!1},d(a){a&&(k(t),k(i),k(l)),q(e,a),o&&o.d(a),r&&r.d(a)}}}const Pc=50,aa=/[-:\. ]/gi;function R3(n){let e=[];if(!n.data)return e;if(n.data.type=="request"){const t=["status","execTime","auth","authId","userIP"];for(let i of t)typeof n.data[i]<"u"&&e.push({key:i});n.data.referer&&!n.data.referer.includes(window.location.host)&&e.push({key:"referer"})}else{const t=Object.keys(n.data);for(const i of t)i!="error"&&i!="details"&&e.length<6&&e.push({key:i})}return n.data.error&&e.push({key:"error",label:"label-danger"}),n.data.details&&e.push({key:"details",label:"label-warning"}),e}function F3(n,e,t){let i,l,s;const o=gt();let{filter:r=""}=e,{presets:a=""}=e,{zoom:u={}}=e,{sort:f="-@rowid"}=e,c=[],d=1,m=0,h=!1,g=0,_={};async function y(X=1,oe=!0){t(7,h=!0);const Se=[a,z.normalizeLogsFilter(r)];return u.min&&u.max&&Se.push(`created >= "${u.min}" && created <= "${u.max}"`),me.logs.getList(X,Pc,{sort:f,skipTotal:1,filter:Se.filter(Boolean).join("&&")}).then(async ke=>{var We;X<=1&&S();const Ce=z.toArray(ke.items);if(t(7,h=!1),t(6,d=ke.page),t(17,m=((We=ke.items)==null?void 0:We.length)||0),o("load",c.concat(Ce)),oe){const st=++g;for(;Ce.length&&g==st;){const et=Ce.splice(0,10);for(let Be of et)z.pushOrReplaceByKey(c,Be);t(3,c),await z.yieldToMain()}}else{for(let st of Ce)z.pushOrReplaceByKey(c,st);t(3,c)}}).catch(ke=>{ke!=null&&ke.isAbort||(t(7,h=!1),console.warn(ke),S(),me.error(ke,!Se||(ke==null?void 0:ke.status)!=400))})}function S(){t(3,c=[]),t(4,_={}),t(6,d=1),t(17,m=0)}function T(){s?$():E()}function $(){t(4,_={})}function E(){for(const X of c)t(4,_[X.id]=X,_);t(4,_)}function M(X){_[X.id]?delete _[X.id]:t(4,_[X.id]=X,_),t(4,_)}function L(){const X=Object.values(_).sort((ke,Ce)=>ke.createdCe.created?-1:0);if(!X.length)return;if(X.length==1)return z.downloadJson(X[0],"log_"+X[0].created.replaceAll(aa,"")+".json");const oe=X[0].created.replaceAll(aa,""),Se=X[X.length-1].created.replaceAll(aa,"");return z.downloadJson(X,`${X.length}_logs_${Se}_to_${oe}.json`)}function I(X){Pe.call(this,n,X)}const A=()=>T();function P(X){f=X,t(1,f)}function R(X){f=X,t(1,f)}function N(X){f=X,t(1,f)}const U=X=>M(X),j=X=>o("select",X),V=(X,oe)=>{oe.code==="Enter"&&(oe.preventDefault(),o("select",X))},K=()=>t(0,r=""),J=()=>y(d+1),ee=()=>$();return n.$$set=X=>{"filter"in X&&t(0,r=X.filter),"presets"in X&&t(15,a=X.presets),"zoom"in X&&t(16,u=X.zoom),"sort"in X&&t(1,f=X.sort)},n.$$.update=()=>{n.$$.dirty[0]&98307&&(typeof f<"u"||typeof r<"u"||typeof a<"u"||typeof u<"u")&&(S(),y(1)),n.$$.dirty[0]&131072&&t(9,i=m>=Pc),n.$$.dirty[0]&16&&t(5,l=Object.keys(_).length),n.$$.dirty[0]&40&&t(8,s=c.length&&l===c.length)},[r,f,y,c,_,l,d,h,s,i,o,T,$,M,L,a,u,m,I,A,P,R,N,U,j,V,K,J,ee]}class q3 extends ye{constructor(e){super(),be(this,e,F3,N3,_e,{filter:0,presets:15,zoom:16,sort:1,load:2},null,[-1,-1])}get load(){return this.$$.ctx[2]}}/*! +Do you really want to upload and initialize "${$.name}"?`,()=>{h($)},()=>{d()})}async function h($){if(!(!$||i)){t(1,u=!0);try{await me.backups.upload({file:$}),await me.backups.restore($.name),Ys("Please wait while extracting the uploaded archive!"),await new Promise(E=>setTimeout(E,2e3)),l("submit")}catch(E){me.error(E)}d(),t(1,u=!1)}}function g(){s=this.value,t(2,s)}function _(){o=this.value,t(3,o)}function y(){r=this.value,t(4,r)}function S($){ie[$?"unshift":"push"](()=>{f=$,t(5,f)})}const T=$=>{var E,M;m((M=(E=$.target)==null?void 0:E.files)==null?void 0:M[0])};return n.$$.update=()=>{n.$$.dirty&3&&t(6,i=a||u)},[a,u,s,o,r,f,i,c,m,g,_,y,S,T]}class l3 extends ye{constructor(e){super(),be(this,e,i3,n3,_e,{})}}function kc(n){let e,t;return e=new ny({props:{$$slots:{default:[s3]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l&9&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function s3(n){let e,t;return e=new l3({}),e.$on("submit",n[1]),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p:te,i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function o3(n){let e,t,i=n[0]&&kc(n);return{c(){i&&i.c(),e=ge()},m(l,s){i&&i.m(l,s),v(l,e,s),t=!0},p(l,[s]){l[0]?i?(i.p(l,s),s&1&&O(i,1)):(i=kc(l),i.c(),O(i,1),i.m(e.parentNode,e)):i&&(re(),D(i,1,1,()=>{i=null}),ae())},i(l){t||(O(i),t=!0)},o(l){D(i),t=!1},d(l){l&&k(e),i&&i.d(l)}}}function r3(n,e,t){let i=!1;l();function l(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("pbinstal")){me.logout(!1),t(0,i=!0);return}me.authStore.isValid?Il("/collections"):me.logout()}return[i,async()=>{t(0,i=!1),await fn(),window.location.search=""}]}class a3 extends ye{constructor(e){super(),be(this,e,r3,o3,_e,{})}}function u3(n){let e,t,i,l;return{c(){e=b("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(s,o){v(s,e,o),n[13](e),ce(e,n[7]),i||(l=B(e,"input",n[14]),i=!0)},p(s,o){o&3&&t!==(t=s[0]||s[1])&&p(e,"placeholder",t),o&128&&e.value!==s[7]&&ce(e,s[7])},i:te,o:te,d(s){s&&k(e),n[13](null),i=!1,l()}}}function f3(n){let e,t,i,l;function s(a){n[12](a)}var o=n[4];function r(a,u){let f={id:a[8],singleLine:!0,disableRequestKeys:!0,disableCollectionJoinKeys:!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=jt(o,r(n)),ie.push(()=>ve(e,"value",s)),e.$on("submit",n[10])),{c(){e&&H(e.$$.fragment),i=ge()},m(a,u){e&&F(e,a,u),v(a,i,u),l=!0},p(a,u){if(u&16&&o!==(o=a[4])){if(e){re();const f=e;D(f.$$.fragment,1,0,()=>{q(f,1)}),ae()}o?(e=jt(o,r(a)),ie.push(()=>ve(e,"value",s)),e.$on("submit",a[10]),H(e.$$.fragment),O(e.$$.fragment,1),F(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){l||(e&&O(e.$$.fragment,a),l=!0)},o(a){e&&D(e.$$.fragment,a),l=!1},d(a){a&&k(i),e&&q(e,a)}}}function vc(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded-sm btn-sm btn-warning")},m(l,s){v(l,e,s),i=!0},i(l){i||(l&&nt(()=>{i&&(t||(t=ze(e,Fn,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(l){l&&(t||(t=ze(e,Fn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(l){l&&k(e),l&&t&&t.end()}}}function wc(n){let e,t,i,l,s;return{c(){e=b("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){v(o,e,r),i=!0,l||(s=B(e,"click",n[15]),l=!0)},p:te,i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Fn,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Fn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function c3(n){let e,t,i,l,s,o,r,a,u,f,c;const d=[f3,u3],m=[];function h(y,S){return y[4]&&!y[5]?0:1}s=h(n),o=m[s]=d[s](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&vc(),_=(n[0].length||n[7].length)&&wc(n);return{c(){e=b("form"),t=b("label"),i=b("i"),l=C(),o.c(),r=C(),g&&g.c(),a=C(),_&&_.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){v(y,e,S),w(e,t),w(t,i),w(e,l),m[s].m(e,null),w(e,r),g&&g.m(e,null),w(e,a),_&&_.m(e,null),u=!0,f||(c=[B(e,"click",On(n[11])),B(e,"submit",tt(n[10]))],f=!0)},p(y,[S]){let T=s;s=h(y),s===T?m[s].p(y,S):(re(),D(m[T],1,1,()=>{m[T]=null}),ae(),o=m[s],o?o.p(y,S):(o=m[s]=d[s](y),o.c()),O(o,1),o.m(e,r)),(y[0].length||y[7].length)&&y[7]!=y[0]?g?S&129&&O(g,1):(g=vc(),g.c(),O(g,1),g.m(e,a)):g&&(re(),D(g,1,1,()=>{g=null}),ae()),y[0].length||y[7].length?_?(_.p(y,S),S&129&&O(_,1)):(_=wc(y),_.c(),O(_,1),_.m(e,null)):_&&(re(),D(_,1,1,()=>{_=null}),ae())},i(y){u||(O(o),O(g),O(_),u=!0)},o(y){D(o),D(g),D(_),u=!1},d(y){y&&k(e),m[s].d(),g&&g.d(),_&&_.d(),f=!1,De(c)}}}function d3(n,e,t){const i=gt(),l="search_"+z.randomString(7);let{value:s=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=null}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(E=!0){t(7,d=""),E&&(c==null||c.focus()),i("clear")}function h(){t(0,s=d),i("submit",s)}async function g(){u||f||(t(5,f=!0),t(4,u=(await Ot(async()=>{const{default:E}=await import("./FilterAutocompleteInput-C5u5J0Yo.js");return{default:E}},__vite__mapDeps([0,1]),import.meta.url)).default),t(5,f=!1))}Yt(()=>{g()});function _(E){Pe.call(this,n,E)}function y(E){d=E,t(7,d),t(0,s)}function S(E){ie[E?"unshift":"push"](()=>{c=E,t(6,c)})}function T(){d=this.value,t(7,d),t(0,s)}const $=()=>{m(!1),h()};return n.$$set=E=>{"value"in E&&t(0,s=E.value),"placeholder"in E&&t(1,o=E.placeholder),"autocompleteCollection"in E&&t(2,r=E.autocompleteCollection),"extraAutocompleteKeys"in E&&t(3,a=E.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof s=="string"&&t(7,d=s)},[s,o,r,a,u,f,c,d,l,m,h,_,y,S,T,$]}class Hr extends ye{constructor(e){super(),be(this,e,d3,c3,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function p3(n){let e,t,i,l,s,o;return{c(){e=b("button"),t=b("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){v(r,e,a),w(e,t),s||(o=[Me(l=He.call(null,e,n[0])),B(e,"click",n[3])],s=!0)},p(r,[a]){a&2&&i!==(i="btn btn-transparent btn-circle "+r[1]+" svelte-1bvelc2")&&p(e,"class",i),l&&Rt(l.update)&&a&1&&l.update.call(null,r[0]),a&6&&Q(e,"refreshing",r[2])},i:te,o:te,d(r){r&&k(e),s=!1,De(o)}}}function m3(n,e,t){const i=gt();let{tooltip:l={text:"Refresh",position:"right"}}=e,{class:s=""}=e,o=null;function r(){i("refresh");const a=l;t(0,l=null),clearTimeout(o),t(2,o=setTimeout(()=>{t(2,o=null),t(0,l=a)},150))}return Yt(()=>()=>clearTimeout(o)),n.$$set=a=>{"tooltip"in a&&t(0,l=a.tooltip),"class"in a&&t(1,s=a.class)},[l,s,o,r]}class Au extends ye{constructor(e){super(),be(this,e,m3,p3,_e,{tooltip:0,class:1})}}const h3=n=>({}),Sc=n=>({}),_3=n=>({}),Tc=n=>({});function g3(n){let e,t,i,l,s,o,r,a;const u=n[11].before,f=Lt(u,n,n[10],Tc),c=n[11].default,d=Lt(c,n,n[10],null),m=n[11].after,h=Lt(m,n,n[10],Sc);return{c(){e=b("div"),f&&f.c(),t=C(),i=b("div"),d&&d.c(),s=C(),h&&h.c(),p(i,"class",l="scroller "+n[0]+" "+n[3]+" svelte-3a0gfs"),p(e,"class","scroller-wrapper svelte-3a0gfs")},m(g,_){v(g,e,_),f&&f.m(e,null),w(e,t),w(e,i),d&&d.m(i,null),n[12](i),w(e,s),h&&h.m(e,null),o=!0,r||(a=[B(window,"resize",n[1]),B(i,"scroll",n[1])],r=!0)},p(g,[_]){f&&f.p&&(!o||_&1024)&&Pt(f,u,g,g[10],o?At(u,g[10],_,_3):Nt(g[10]),Tc),d&&d.p&&(!o||_&1024)&&Pt(d,c,g,g[10],o?At(c,g[10],_,null):Nt(g[10]),null),(!o||_&9&&l!==(l="scroller "+g[0]+" "+g[3]+" svelte-3a0gfs"))&&p(i,"class",l),h&&h.p&&(!o||_&1024)&&Pt(h,m,g,g[10],o?At(m,g[10],_,h3):Nt(g[10]),Sc)},i(g){o||(O(f,g),O(d,g),O(h,g),o=!0)},o(g){D(f,g),D(d,g),D(h,g),o=!1},d(g){g&&k(e),f&&f.d(g),d&&d.d(g),n[12](null),h&&h.d(g),r=!1,De(a)}}}function b3(n,e,t){let{$$slots:i={},$$scope:l}=e;const s=gt();let{class:o=""}=e,{vThreshold:r=0}=e,{hThreshold:a=0}=e,{dispatchOnNoScroll:u=!0}=e,f=null,c="",d=null,m,h,g,_,y;function S(){f&&t(2,f.scrollTop=0,f)}function T(){f&&t(2,f.scrollLeft=0,f)}function $(){f&&(t(3,c=""),g=f.clientWidth+2,_=f.clientHeight+2,m=f.scrollWidth-g,h=f.scrollHeight-_,h>0?(t(3,c+=" v-scroll"),r>=_&&t(4,r=0),f.scrollTop-r<=0&&(t(3,c+=" v-scroll-start"),s("vScrollStart")),f.scrollTop+r>=h&&(t(3,c+=" v-scroll-end"),s("vScrollEnd"))):u&&s("vScrollEnd"),m>0?(t(3,c+=" h-scroll"),a>=g&&t(5,a=0),f.scrollLeft-a<=0&&(t(3,c+=" h-scroll-start"),s("hScrollStart")),f.scrollLeft+a>=m&&(t(3,c+=" h-scroll-end"),s("hScrollEnd"))):u&&s("hScrollEnd"))}function E(){d||(d=setTimeout(()=>{$(),d=null},150))}Yt(()=>(E(),y=new MutationObserver(E),y.observe(f,{attributeFilter:["width","height"],childList:!0,subtree:!0}),()=>{y==null||y.disconnect(),clearTimeout(d)}));function M(L){ie[L?"unshift":"push"](()=>{f=L,t(2,f)})}return n.$$set=L=>{"class"in L&&t(0,o=L.class),"vThreshold"in L&&t(4,r=L.vThreshold),"hThreshold"in L&&t(5,a=L.hThreshold),"dispatchOnNoScroll"in L&&t(6,u=L.dispatchOnNoScroll),"$$scope"in L&&t(10,l=L.$$scope)},[o,E,f,c,r,a,u,S,T,$,l,i,M]}class Pu extends ye{constructor(e){super(),be(this,e,b3,g3,_e,{class:0,vThreshold:4,hThreshold:5,dispatchOnNoScroll:6,resetVerticalScroll:7,resetHorizontalScroll:8,refresh:9,throttleRefresh:1})}get resetVerticalScroll(){return this.$$.ctx[7]}get resetHorizontalScroll(){return this.$$.ctx[8]}get refresh(){return this.$$.ctx[9]}get throttleRefresh(){return this.$$.ctx[1]}}function y3(n){let e,t,i,l,s;const o=n[6].default,r=Lt(o,n,n[5],null);return{c(){e=b("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){v(a,e,u),r&&r.m(e,null),i=!0,l||(s=[B(e,"click",n[7]),B(e,"keydown",n[8])],l=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Pt(r,o,a,a[5],i?At(o,a[5],u,null):Nt(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||(O(r,a),i=!0)},o(a){D(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),l=!1,De(s)}}}function k3(n,e,t){let{$$slots:i={},$$scope:l}=e,{class:s=""}=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,s=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,l=d.$$scope)},[r,s,o,a,u,l,i,f,c]}class ir extends ye{constructor(e){super(),be(this,e,k3,y3,_e,{class:1,name:2,sort:0,disable:3})}}function v3(n){let e,t=n[0].replace("Z"," UTC")+"",i,l,s;return{c(){e=b("span"),i=Y(t),p(e,"class","txt-nowrap")},m(o,r){v(o,e,r),w(e,i),l||(s=Me(He.call(null,e,n[1])),l=!0)},p(o,[r]){r&1&&t!==(t=o[0].replace("Z"," UTC")+"")&&ue(i,t)},i:te,o:te,d(o){o&&k(e),l=!1,s()}}}function w3(n,e,t){let{date:i}=e;const l={get text(){return z.formatToLocalDate(i,"yyyy-MM-dd HH:mm:ss.SSS")+" Local"}};return n.$$set=s=>{"date"in s&&t(0,i=s.date)},[i,l]}class iy extends ye{constructor(e){super(),be(this,e,w3,v3,_e,{date:0})}}function S3(n){let e,t,i=(n[1]||"UNKN")+"",l,s,o,r,a;return{c(){e=b("div"),t=b("span"),l=Y(i),s=Y(" ("),o=Y(n[0]),r=Y(")"),p(t,"class","txt"),p(e,"class",a="label log-level-label level-"+n[0]+" svelte-ha6hme")},m(u,f){v(u,e,f),w(e,t),w(t,l),w(t,s),w(t,o),w(t,r)},p(u,[f]){f&2&&i!==(i=(u[1]||"UNKN")+"")&&ue(l,i),f&1&&ue(o,u[0]),f&1&&a!==(a="label log-level-label level-"+u[0]+" svelte-ha6hme")&&p(e,"class",a)},i:te,o:te,d(u){u&&k(e)}}}function T3(n,e,t){let i,{level:l}=e;return n.$$set=s=>{"level"in s&&t(0,l=s.level)},n.$$.update=()=>{var s;n.$$.dirty&1&&t(1,i=(s=H0.find(o=>o.level==l))==null?void 0:s.label)},[l,i]}class ly extends ye{constructor(e){super(),be(this,e,T3,S3,_e,{level:0})}}function $c(n,e,t){var o;const i=n.slice();i[32]=e[t];const l=((o=i[32].data)==null?void 0:o.type)=="request";i[33]=l;const s=R3(i[32]);return i[34]=s,i}function Cc(n,e,t){const i=n.slice();return i[37]=e[t],i}function $3(n){let e,t,i,l,s,o,r;return{c(){e=b("div"),t=b("input"),l=C(),s=b("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[3].length,t.checked=n[8],p(s,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){v(a,e,u),w(e,t),w(e,l),w(e,s),o||(r=B(t,"change",n[19]),o=!0)},p(a,u){u[0]&8&&i!==(i=!a[3].length)&&(t.disabled=i),u[0]&256&&(t.checked=a[8])},d(a){a&&k(e),o=!1,r()}}}function C3(n){let e;return{c(){e=b("span"),p(e,"class","loader loader-sm")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function O3(n){let e;return{c(){e=b("div"),e.innerHTML=' level',p(e,"class","col-header-content")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function E3(n){let e;return{c(){e=b("div"),e.innerHTML=' message',p(e,"class","col-header-content")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function M3(n){let e;return{c(){e=b("div"),e.innerHTML=` created`,p(e,"class","col-header-content")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function Oc(n){let e;function t(s,o){return s[7]?I3:D3}let i=t(n),l=i(n);return{c(){l.c(),e=ge()},m(s,o){l.m(s,o),v(s,e,o)},p(s,o){i===(i=t(s))&&l?l.p(s,o):(l.d(1),l=i(s),l&&(l.c(),l.m(e.parentNode,e)))},d(s){s&&k(e),l.d(s)}}}function D3(n){var r;let e,t,i,l,s,o=((r=n[0])==null?void 0:r.length)&&Ec(n);return{c(){e=b("tr"),t=b("td"),i=b("h6"),i.textContent="No logs found.",l=C(),o&&o.c(),s=C(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){v(a,e,u),w(e,t),w(t,i),w(t,l),o&&o.m(t,null),w(e,s)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Ec(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function I3(n){let e;return{c(){e=b("tr"),e.innerHTML=' '},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function Ec(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[26]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function Mc(n){let e,t=pe(n[34]),i=[];for(let l=0;l',P=C(),p(s,"type","checkbox"),p(s,"id",o="checkbox_"+e[32].id),s.checked=r=e[4][e[32].id],p(u,"for",f="checkbox_"+e[32].id),p(l,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(d,"class","col-type-text col-field-level min-width svelte-91v05h"),p(y,"class","txt-ellipsis"),p(_,"class","flex flex-gap-10"),p(g,"class","col-type-text col-field-message svelte-91v05h"),p(M,"class","col-type-date col-field-created"),p(A,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ee,X){v(ee,t,X),w(t,i),w(i,l),w(l,s),w(l,a),w(l,u),w(t,c),w(t,d),F(m,d,null),w(t,h),w(t,g),w(g,_),w(_,y),w(y,T),w(g,$),V&&V.m(g,null),w(t,E),w(t,M),F(L,M,null),w(t,I),w(t,A),w(t,P),R=!0,N||(U=[B(s,"change",j),B(l,"click",On(e[18])),B(t,"click",K),B(t,"keydown",J)],N=!0)},p(ee,X){e=ee,(!R||X[0]&8&&o!==(o="checkbox_"+e[32].id))&&p(s,"id",o),(!R||X[0]&24&&r!==(r=e[4][e[32].id]))&&(s.checked=r),(!R||X[0]&8&&f!==(f="checkbox_"+e[32].id))&&p(u,"for",f);const oe={};X[0]&8&&(oe.level=e[32].level),m.$set(oe),(!R||X[0]&8)&&S!==(S=e[32].message+"")&&ue(T,S),e[34].length?V?V.p(e,X):(V=Mc(e),V.c(),V.m(g,null)):V&&(V.d(1),V=null);const Se={};X[0]&8&&(Se.date=e[32].created),L.$set(Se)},i(ee){R||(O(m.$$.fragment,ee),O(L.$$.fragment,ee),R=!0)},o(ee){D(m.$$.fragment,ee),D(L.$$.fragment,ee),R=!1},d(ee){ee&&k(t),q(m),V&&V.d(),q(L),N=!1,De(U)}}}function P3(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S=[],T=new Map,$;function E(J,ee){return J[7]?C3:$3}let M=E(n),L=M(n);function I(J){n[20](J)}let A={disable:!0,class:"col-field-level min-width",name:"level",$$slots:{default:[O3]},$$scope:{ctx:n}};n[1]!==void 0&&(A.sort=n[1]),o=new ir({props:A}),ie.push(()=>ve(o,"sort",I));function P(J){n[21](J)}let R={disable:!0,class:"col-type-text col-field-message",name:"data",$$slots:{default:[E3]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),u=new ir({props:R}),ie.push(()=>ve(u,"sort",P));function N(J){n[22](J)}let U={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[M3]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),d=new ir({props:U}),ie.push(()=>ve(d,"sort",N));let j=pe(n[3]);const V=J=>J[32].id;for(let J=0;Jr=!1)),o.$set(X);const oe={};ee[1]&512&&(oe.$$scope={dirty:ee,ctx:J}),!f&&ee[0]&2&&(f=!0,oe.sort=J[1],$e(()=>f=!1)),u.$set(oe);const Se={};ee[1]&512&&(Se.$$scope={dirty:ee,ctx:J}),!m&&ee[0]&2&&(m=!0,Se.sort=J[1],$e(()=>m=!1)),d.$set(Se),ee[0]&9369&&(j=pe(J[3]),re(),S=kt(S,ee,V,1,J,j,T,y,zt,Ic,null,$c),ae(),!j.length&&K?K.p(J,ee):j.length?K&&(K.d(1),K=null):(K=Oc(J),K.c(),K.m(y,null))),(!$||ee[0]&128)&&Q(e,"table-loading",J[7])},i(J){if(!$){O(o.$$.fragment,J),O(u.$$.fragment,J),O(d.$$.fragment,J);for(let ee=0;eeLoad more',p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[7]),Q(t,"btn-disabled",n[7]),p(e,"class","block txt-center m-t-sm")},m(s,o){v(s,e,o),w(e,t),i||(l=B(t,"click",n[27]),i=!0)},p(s,o){o[0]&128&&Q(t,"btn-loading",s[7]),o[0]&128&&Q(t,"btn-disabled",s[7])},d(s){s&&k(e),i=!1,l()}}}function Ac(n){let e,t,i,l,s,o,r=n[5]===1?"log":"logs",a,u,f,c,d,m,h,g,_,y,S;return{c(){e=b("div"),t=b("div"),i=Y("Selected "),l=b("strong"),s=Y(n[5]),o=C(),a=Y(r),u=C(),f=b("button"),f.innerHTML='Reset',c=C(),d=b("div"),m=C(),h=b("button"),h.innerHTML='Download as JSON',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),p(d,"class","flex-fill"),p(h,"type","button"),p(h,"class","btn btn-sm"),p(e,"class","bulkbar svelte-91v05h")},m(T,$){v(T,e,$),w(e,t),w(t,i),w(t,l),w(l,s),w(t,o),w(t,a),w(e,u),w(e,f),w(e,c),w(e,d),w(e,m),w(e,h),_=!0,y||(S=[B(f,"click",n[28]),B(h,"click",n[14])],y=!0)},p(T,$){(!_||$[0]&32)&&ue(s,T[5]),(!_||$[0]&32)&&r!==(r=T[5]===1?"log":"logs")&&ue(a,r)},i(T){_||(T&&nt(()=>{_&&(g||(g=ze(e,Fn,{duration:150,y:5},!0)),g.run(1))}),_=!0)},o(T){T&&(g||(g=ze(e,Fn,{duration:150,y:5},!1)),g.run(0)),_=!1},d(T){T&&k(e),T&&g&&g.end(),y=!1,De(S)}}}function N3(n){let e,t,i,l,s;e=new Pu({props:{class:"table-wrapper",$$slots:{default:[P3]},$$scope:{ctx:n}}});let o=n[3].length&&n[9]&&Lc(n),r=n[5]&&Ac(n);return{c(){H(e.$$.fragment),t=C(),o&&o.c(),i=C(),r&&r.c(),l=ge()},m(a,u){F(e,a,u),v(a,t,u),o&&o.m(a,u),v(a,i,u),r&&r.m(a,u),v(a,l,u),s=!0},p(a,u){const f={};u[0]&411|u[1]&512&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),a[3].length&&a[9]?o?o.p(a,u):(o=Lc(a),o.c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null),a[5]?r?(r.p(a,u),u[0]&32&&O(r,1)):(r=Ac(a),r.c(),O(r,1),r.m(l.parentNode,l)):r&&(re(),D(r,1,1,()=>{r=null}),ae())},i(a){s||(O(e.$$.fragment,a),O(r),s=!0)},o(a){D(e.$$.fragment,a),D(r),s=!1},d(a){a&&(k(t),k(i),k(l)),q(e,a),o&&o.d(a),r&&r.d(a)}}}const Pc=50,aa=/[-:\. ]/gi;function R3(n){let e=[];if(!n.data)return e;if(n.data.type=="request"){const t=["status","execTime","auth","authId","userIP"];for(let i of t)typeof n.data[i]<"u"&&e.push({key:i});n.data.referer&&!n.data.referer.includes(window.location.host)&&e.push({key:"referer"})}else{const t=Object.keys(n.data);for(const i of t)i!="error"&&i!="details"&&e.length<6&&e.push({key:i})}return n.data.error&&e.push({key:"error",label:"label-danger"}),n.data.details&&e.push({key:"details",label:"label-warning"}),e}function F3(n,e,t){let i,l,s;const o=gt();let{filter:r=""}=e,{presets:a=""}=e,{zoom:u={}}=e,{sort:f="-@rowid"}=e,c=[],d=1,m=0,h=!1,g=0,_={};async function y(X=1,oe=!0){t(7,h=!0);const Se=[a,z.normalizeLogsFilter(r)];return u.min&&u.max&&Se.push(`created >= "${u.min}" && created <= "${u.max}"`),me.logs.getList(X,Pc,{sort:f,skipTotal:1,filter:Se.filter(Boolean).join("&&")}).then(async ke=>{var We;X<=1&&S();const Ce=z.toArray(ke.items);if(t(7,h=!1),t(6,d=ke.page),t(17,m=((We=ke.items)==null?void 0:We.length)||0),o("load",c.concat(Ce)),oe){const st=++g;for(;Ce.length&&g==st;){const et=Ce.splice(0,10);for(let Be of et)z.pushOrReplaceByKey(c,Be);t(3,c),await z.yieldToMain()}}else{for(let st of Ce)z.pushOrReplaceByKey(c,st);t(3,c)}}).catch(ke=>{ke!=null&&ke.isAbort||(t(7,h=!1),console.warn(ke),S(),me.error(ke,!Se||(ke==null?void 0:ke.status)!=400))})}function S(){t(3,c=[]),t(4,_={}),t(6,d=1),t(17,m=0)}function T(){s?$():E()}function $(){t(4,_={})}function E(){for(const X of c)t(4,_[X.id]=X,_);t(4,_)}function M(X){_[X.id]?delete _[X.id]:t(4,_[X.id]=X,_),t(4,_)}function L(){const X=Object.values(_).sort((ke,Ce)=>ke.createdCe.created?-1:0);if(!X.length)return;if(X.length==1)return z.downloadJson(X[0],"log_"+X[0].created.replaceAll(aa,"")+".json");const oe=X[0].created.replaceAll(aa,""),Se=X[X.length-1].created.replaceAll(aa,"");return z.downloadJson(X,`${X.length}_logs_${Se}_to_${oe}.json`)}function I(X){Pe.call(this,n,X)}const A=()=>T();function P(X){f=X,t(1,f)}function R(X){f=X,t(1,f)}function N(X){f=X,t(1,f)}const U=X=>M(X),j=X=>o("select",X),V=(X,oe)=>{oe.code==="Enter"&&(oe.preventDefault(),o("select",X))},K=()=>t(0,r=""),J=()=>y(d+1),ee=()=>$();return n.$$set=X=>{"filter"in X&&t(0,r=X.filter),"presets"in X&&t(15,a=X.presets),"zoom"in X&&t(16,u=X.zoom),"sort"in X&&t(1,f=X.sort)},n.$$.update=()=>{n.$$.dirty[0]&98307&&(typeof f<"u"||typeof r<"u"||typeof a<"u"||typeof u<"u")&&(S(),y(1)),n.$$.dirty[0]&131072&&t(9,i=m>=Pc),n.$$.dirty[0]&16&&t(5,l=Object.keys(_).length),n.$$.dirty[0]&40&&t(8,s=c.length&&l===c.length)},[r,f,y,c,_,l,d,h,s,i,o,T,$,M,L,a,u,m,I,A,P,R,N,U,j,V,K,J,ee]}class q3 extends ye{constructor(e){super(),be(this,e,F3,N3,_e,{filter:0,presets:15,zoom:16,sort:1,load:2},null,[-1,-1])}get load(){return this.$$.ctx[2]}}/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela @@ -47,15 +47,15 @@ Do you really want to upload and initialize "${$.name}"?`,()=>{h($)},()=>{d()})} * undefined * (c) 2016-2023 chartjs-plugin-zoom Contributors * Released under the MIT License - */const xs=n=>n&&n.enabled&&n.modifierKey,By=(n,e)=>n&&e[n+"Key"],Gu=(n,e)=>n&&!e[n+"Key"];function sl(n,e,t){return n===void 0?!0:typeof n=="string"?n.indexOf(e)!==-1:typeof n=="function"?n({chart:t}).indexOf(e)!==-1:!1}function ya(n,e){return typeof n=="function"&&(n=n({chart:e})),typeof n=="string"?{x:n.indexOf("x")!==-1,y:n.indexOf("y")!==-1}:{x:!1,y:!1}}function K$(n,e){let t;return function(){return clearTimeout(t),t=setTimeout(n,e),e}}function J$({x:n,y:e},t){const i=t.scales,l=Object.keys(i);for(let s=0;s=o.top&&e<=o.bottom&&n>=o.left&&n<=o.right)return o}return null}function Wy(n,e,t){const{mode:i="xy",scaleMode:l,overScaleMode:s}=n||{},o=J$(e,t),r=ya(i,t),a=ya(l,t);if(s){const f=ya(s,t);for(const c of["x","y"])f[c]&&(a[c]=r[c],r[c]=!1)}if(o&&a[o.axis])return[o];const u=[];return ht(t.scales,function(f){r[f.axis]&&u.push(f)}),u}const iu=new WeakMap;function Jt(n){let e=iu.get(n);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{}},iu.set(n,e)),e}function Z$(n){iu.delete(n)}function Yy(n,e,t){const i=n.max-n.min,l=i*(e-1),s=n.isHorizontal()?t.x:t.y,o=Math.max(0,Math.min(1,(n.getValueForPixel(s)-n.min)/i||0)),r=1-o;return{min:l*o,max:l*r}}function Xd(n,e,t,i,l){let s=t[i];if(s==="original"){const o=n.originalScaleLimits[e.id][i];s=Ct(o.options,o.scale)}return Ct(s,l)}function G$(n,e,t){const i=n.getValueForPixel(e),l=n.getValueForPixel(t);return{min:Math.min(i,l),max:Math.max(i,l)}}function fs(n,{min:e,max:t},i,l=!1){const s=Jt(n.chart),{id:o,axis:r,options:a}=n,u=i&&(i[o]||i[r])||{},{minRange:f=0}=u,c=Xd(s,n,u,"min",-1/0),d=Xd(s,n,u,"max",1/0),m=l?Math.max(t-e,f):n.max-n.min,h=(m-t+e)/2;return e-=h,t+=h,ed&&(t=d,e=Math.max(d-m,c)),a.min=e,a.max=t,s.updatedScaleLimits[n.id]={min:e,max:t},n.parse(e)!==n.min||n.parse(t)!==n.max}function X$(n,e,t,i){const l=Yy(n,e,t),s={min:n.min+l.min,max:n.max-l.max};return fs(n,s,i,!0)}function Q$(n,e,t,i){fs(n,G$(n,e,t),i,!0)}const Qd=n=>n===0||isNaN(n)?0:n<0?Math.min(Math.round(n),-1):Math.max(Math.round(n),1);function x$(n){const t=n.getLabels().length-1;n.min>0&&(n.min-=1),n.maxa&&(s=Math.max(0,s-u),o=r===1?s:s+r,f=s===0),fs(n,{min:s,max:o},t)||f}const iC={second:500,minute:30*1e3,hour:30*60*1e3,day:12*60*60*1e3,week:3.5*24*60*60*1e3,month:15*24*60*60*1e3,quarter:60*24*60*60*1e3,year:182*24*60*60*1e3};function Ky(n,e,t,i=!1){const{min:l,max:s,options:o}=n,r=o.time&&o.time.round,a=iC[r]||0,u=n.getValueForPixel(n.getPixelForValue(l+a)-e),f=n.getValueForPixel(n.getPixelForValue(s+a)-e),{min:c=-1/0,max:d=1/0}=i&&t&&t[n.axis]||{};return isNaN(u)||isNaN(f)||ud?!0:fs(n,{min:u,max:f},t,i)}function xd(n,e,t){return Ky(n,e,t,!0)}const lu={category:eC,default:X$},su={default:Q$},ou={category:nC,default:Ky,logarithmic:xd,timeseries:xd};function lC(n,e,t){const{id:i,options:{min:l,max:s}}=n;if(!e[i]||!t[i])return!0;const o=t[i];return o.min!==l||o.max!==s}function ep(n,e){ht(n,(t,i)=>{e[i]||delete n[i]})}function cs(n,e){const{scales:t}=n,{originalScaleLimits:i,updatedScaleLimits:l}=e;return ht(t,function(s){lC(s,i,l)&&(i[s.id]={min:{scale:s.min,options:s.options.min},max:{scale:s.max,options:s.options.max}})}),ep(i,t),ep(l,t),i}function tp(n,e,t,i){const l=lu[n.type]||lu.default;dt(l,[n,e,t,i])}function np(n,e,t,i,l){const s=su[n.type]||su.default;dt(s,[n,e,t,i,l])}function sC(n){const e=n.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function Xu(n,e,t="none"){const{x:i=1,y:l=1,focalPoint:s=sC(n)}=typeof e=="number"?{x:e,y:e}:e,o=Jt(n),{options:{limits:r,zoom:a}}=o;cs(n,o);const u=i!==1,f=l!==1,c=Wy(a,s,n);ht(c||n.scales,function(d){d.isHorizontal()&&u?tp(d,i,s,r):!d.isHorizontal()&&f&&tp(d,l,s,r)}),n.update(t),dt(a.onZoom,[{chart:n}])}function Jy(n,e,t,i="none"){const l=Jt(n),{options:{limits:s,zoom:o}}=l,{mode:r="xy"}=o;cs(n,l);const a=sl(r,"x",n),u=sl(r,"y",n);ht(n.scales,function(f){f.isHorizontal()&&a?np(f,e.x,t.x,s):!f.isHorizontal()&&u&&np(f,e.y,t.y,s)}),n.update(i),dt(o.onZoom,[{chart:n}])}function oC(n,e,t,i="none"){cs(n,Jt(n));const l=n.scales[e];fs(l,t,void 0,!0),n.update(i)}function rC(n,e="default"){const t=Jt(n),i=cs(n,t);ht(n.scales,function(l){const s=l.options;i[l.id]?(s.min=i[l.id].min.options,s.max=i[l.id].max.options):(delete s.min,delete s.max)}),n.update(e),dt(t.options.zoom.onZoomComplete,[{chart:n}])}function aC(n,e){const t=n.originalScaleLimits[e];if(!t)return;const{min:i,max:l}=t;return Ct(l.options,l.scale)-Ct(i.options,i.scale)}function uC(n){const e=Jt(n);let t=1,i=1;return ht(n.scales,function(l){const s=aC(e,l.id);if(s){const o=Math.round(s/(l.max-l.min)*100)/100;t=Math.min(t,o),i=Math.max(i,o)}}),t<1?t:i}function ip(n,e,t,i){const{panDelta:l}=i,s=l[n.id]||0;il(s)===il(e)&&(e+=s);const o=ou[n.type]||ou.default;dt(o,[n,e,t])?l[n.id]=0:l[n.id]=e}function Zy(n,e,t,i="none"){const{x:l=0,y:s=0}=typeof e=="number"?{x:e,y:e}:e,o=Jt(n),{options:{pan:r,limits:a}}=o,{onPan:u}=r||{};cs(n,o);const f=l!==0,c=s!==0;ht(t||n.scales,function(d){d.isHorizontal()&&f?ip(d,l,a,o):!d.isHorizontal()&&c&&ip(d,s,a,o)}),n.update(i),dt(u,[{chart:n}])}function Gy(n){const e=Jt(n);cs(n,e);const t={};for(const i of Object.keys(n.scales)){const{min:l,max:s}=e.originalScaleLimits[i]||{min:{},max:{}};t[i]={min:l.scale,max:s.scale}}return t}function fC(n){const e=Gy(n);for(const t of Object.keys(n.scales)){const{min:i,max:l}=e[t];if(i!==void 0&&n.scales[t].min!==i||l!==void 0&&n.scales[t].max!==l)return!0}return!1}function Ln(n,e){const{handlers:t}=Jt(n),i=t[e];i&&i.target&&(i.target.removeEventListener(e,i),delete t[e])}function qs(n,e,t,i){const{handlers:l,options:s}=Jt(n),o=l[t];o&&o.target===e||(Ln(n,t),l[t]=r=>i(n,r,s),l[t].target=e,e.addEventListener(t,l[t]))}function cC(n,e){const t=Jt(n);t.dragStart&&(t.dragging=!0,t.dragEnd=e,n.update("none"))}function dC(n,e){const t=Jt(n);!t.dragStart||e.key!=="Escape"||(Ln(n,"keydown"),t.dragging=!1,t.dragStart=t.dragEnd=null,n.update("none"))}function Xy(n,e,t){const{onZoomStart:i,onZoomRejected:l}=t;if(i){const s=ki(e,n);if(dt(i,[{chart:n,event:e,point:s}])===!1)return dt(l,[{chart:n,event:e}]),!1}}function pC(n,e){const t=Jt(n),{pan:i,zoom:l={}}=t.options;if(e.button!==0||By(xs(i),e)||Gu(xs(l.drag),e))return dt(l.onZoomRejected,[{chart:n,event:e}]);Xy(n,e,l)!==!1&&(t.dragStart=e,qs(n,n.canvas,"mousemove",cC),qs(n,window.document,"keydown",dC))}function Qy(n,e,t,i){const l=sl(e,"x",n),s=sl(e,"y",n);let{top:o,left:r,right:a,bottom:u,width:f,height:c}=n.chartArea;const d=ki(t,n),m=ki(i,n);l&&(r=Math.min(d.x,m.x),a=Math.max(d.x,m.x)),s&&(o=Math.min(d.y,m.y),u=Math.max(d.y,m.y));const h=a-r,g=u-o;return{left:r,top:o,right:a,bottom:u,width:h,height:g,zoomX:l&&h?1+(f-h)/f:1,zoomY:s&&g?1+(c-g)/c:1}}function mC(n,e){const t=Jt(n);if(!t.dragStart)return;Ln(n,"mousemove");const{mode:i,onZoomComplete:l,drag:{threshold:s=0}}=t.options.zoom,o=Qy(n,i,t.dragStart,e),r=sl(i,"x",n)?o.width:0,a=sl(i,"y",n)?o.height:0,u=Math.sqrt(r*r+a*a);if(t.dragStart=t.dragEnd=null,u<=s){t.dragging=!1,n.update("none");return}Jy(n,{x:o.left,y:o.top},{x:o.right,y:o.bottom},"zoom"),setTimeout(()=>t.dragging=!1,500),dt(l,[{chart:n}])}function hC(n,e,t){if(Gu(xs(t.wheel),e)){dt(t.onZoomRejected,[{chart:n,event:e}]);return}if(Xy(n,e,t)!==!1&&(e.cancelable&&e.preventDefault(),e.deltaY!==void 0))return!0}function _C(n,e){const{handlers:{onZoomComplete:t},options:{zoom:i}}=Jt(n);if(!hC(n,e,i))return;const l=e.target.getBoundingClientRect(),s=1+(e.deltaY>=0?-i.wheel.speed:i.wheel.speed),o={x:s,y:s,focalPoint:{x:e.clientX-l.left,y:e.clientY-l.top}};Xu(n,o),t&&t()}function gC(n,e,t,i){t&&(Jt(n).handlers[e]=K$(()=>dt(t,[{chart:n}]),i))}function bC(n,e){const t=n.canvas,{wheel:i,drag:l,onZoomComplete:s}=e.zoom;i.enabled?(qs(n,t,"wheel",_C),gC(n,"onZoomComplete",s,250)):Ln(n,"wheel"),l.enabled?(qs(n,t,"mousedown",pC),qs(n,t.ownerDocument,"mouseup",mC)):(Ln(n,"mousedown"),Ln(n,"mousemove"),Ln(n,"mouseup"),Ln(n,"keydown"))}function yC(n){Ln(n,"mousedown"),Ln(n,"mousemove"),Ln(n,"mouseup"),Ln(n,"wheel"),Ln(n,"click"),Ln(n,"keydown")}function kC(n,e){return function(t,i){const{pan:l,zoom:s={}}=e.options;if(!l||!l.enabled)return!1;const o=i&&i.srcEvent;return o&&!e.panning&&i.pointerType==="mouse"&&(Gu(xs(l),o)||By(xs(s.drag),o))?(dt(l.onPanRejected,[{chart:n,event:i}]),!1):!0}}function vC(n,e){const t=Math.abs(n.clientX-e.clientX),i=Math.abs(n.clientY-e.clientY),l=t/i;let s,o;return l>.3&&l<1.7?s=o=!0:t>i?s=!0:o=!0,{x:s,y:o}}function xy(n,e,t){if(e.scale){const{center:i,pointers:l}=t,s=1/e.scale*t.scale,o=t.target.getBoundingClientRect(),r=vC(l[0],l[1]),a=e.options.zoom.mode,u={x:r.x&&sl(a,"x",n)?s:1,y:r.y&&sl(a,"y",n)?s:1,focalPoint:{x:i.x-o.left,y:i.y-o.top}};Xu(n,u),e.scale=t.scale}}function wC(n,e){e.options.zoom.pinch.enabled&&(e.scale=1)}function SC(n,e,t){e.scale&&(xy(n,e,t),e.scale=null,dt(e.options.zoom.onZoomComplete,[{chart:n}]))}function ek(n,e,t){const i=e.delta;i&&(e.panning=!0,Zy(n,{x:t.deltaX-i.x,y:t.deltaY-i.y},e.panScales),e.delta={x:t.deltaX,y:t.deltaY})}function TC(n,e,t){const{enabled:i,onPanStart:l,onPanRejected:s}=e.options.pan;if(!i)return;const o=t.target.getBoundingClientRect(),r={x:t.center.x-o.left,y:t.center.y-o.top};if(dt(l,[{chart:n,event:t,point:r}])===!1)return dt(s,[{chart:n,event:t}]);e.panScales=Wy(e.options.pan,r,n),e.delta={x:0,y:0},clearTimeout(e.panEndTimeout),ek(n,e,t)}function $C(n,e){e.delta=null,e.panning&&(e.panEndTimeout=setTimeout(()=>e.panning=!1,500),dt(e.options.pan.onPanComplete,[{chart:n}]))}const ru=new WeakMap;function CC(n,e){const t=Jt(n),i=n.canvas,{pan:l,zoom:s}=e,o=new Fs.Manager(i);s&&s.pinch.enabled&&(o.add(new Fs.Pinch),o.on("pinchstart",()=>wC(n,t)),o.on("pinch",r=>xy(n,t,r)),o.on("pinchend",r=>SC(n,t,r))),l&&l.enabled&&(o.add(new Fs.Pan({threshold:l.threshold,enable:kC(n,t)})),o.on("panstart",r=>TC(n,t,r)),o.on("panmove",r=>ek(n,t,r)),o.on("panend",()=>$C(n,t))),ru.set(n,o)}function OC(n){const e=ru.get(n);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),ru.delete(n))}var EC="2.0.1";function Yo(n,e,t){const i=t.zoom.drag,{dragStart:l,dragEnd:s}=Jt(n);if(i.drawTime!==e||!s)return;const{left:o,top:r,width:a,height:u}=Qy(n,t.zoom.mode,l,s),f=n.ctx;f.save(),f.beginPath(),f.fillStyle=i.backgroundColor||"rgba(225,225,225,0.3)",f.fillRect(o,r,a,u),i.borderWidth>0&&(f.lineWidth=i.borderWidth,f.strokeStyle=i.borderColor||"rgba(225,225,225)",f.strokeRect(o,r,a,u)),f.restore()}var MC={id:"zoom",version:EC,defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(n,e,t){const i=Jt(n);i.options=t,Object.prototype.hasOwnProperty.call(t.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(t.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(t.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),Fs&&CC(n,t),n.pan=(l,s,o)=>Zy(n,l,s,o),n.zoom=(l,s)=>Xu(n,l,s),n.zoomRect=(l,s,o)=>Jy(n,l,s,o),n.zoomScale=(l,s,o)=>oC(n,l,s,o),n.resetZoom=l=>rC(n,l),n.getZoomLevel=()=>uC(n),n.getInitialScaleBounds=()=>Gy(n),n.isZoomedOrPanned=()=>fC(n)},beforeEvent(n){const e=Jt(n);if(e.panning||e.dragging)return!1},beforeUpdate:function(n,e,t){const i=Jt(n);i.options=t,bC(n,t)},beforeDatasetsDraw(n,e,t){Yo(n,"beforeDatasetsDraw",t)},afterDatasetsDraw(n,e,t){Yo(n,"afterDatasetsDraw",t)},beforeDraw(n,e,t){Yo(n,"beforeDraw",t)},afterDraw(n,e,t){Yo(n,"afterDraw",t)},stop:function(n){yC(n),Fs&&OC(n),Z$(n)},panFunctions:ou,zoomFunctions:lu,zoomRectFunctions:su};function lp(n){let e,t,i;return{c(){e=b("div"),p(e,"class","chart-loader loader svelte-kfnurg")},m(l,s){v(l,e,s),i=!0},i(l){i||(l&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150},!0)),t.run(1))}),i=!0)},o(l){l&&(t||(t=ze(e,Mt,{duration:150},!1)),t.run(0)),i=!1},d(l){l&&k(e),l&&t&&t.end()}}}function sp(n){let e,t,i;return{c(){e=b("button"),e.textContent="Reset zoom",p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-chart-zoom svelte-kfnurg")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[4]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function DC(n){let e,t,i,l,s,o=n[1]==1?"log":"logs",r,a,u,f,c,d,m,h=n[2]&&lp(),g=n[3]&&sp(n);return{c(){e=b("div"),t=b("div"),i=Y("Found "),l=Y(n[1]),s=C(),r=Y(o),a=C(),h&&h.c(),u=C(),f=b("canvas"),c=C(),g&&g.c(),p(t,"class","total-logs entrance-right svelte-kfnurg"),Q(t,"hidden",n[2]),p(f,"class","chart-canvas svelte-kfnurg"),p(e,"class","chart-wrapper svelte-kfnurg"),Q(e,"loading",n[2])},m(_,y){v(_,e,y),w(e,t),w(t,i),w(t,l),w(t,s),w(t,r),w(e,a),h&&h.m(e,null),w(e,u),w(e,f),n[11](f),w(e,c),g&&g.m(e,null),d||(m=B(f,"dblclick",n[4]),d=!0)},p(_,[y]){y&2&&ue(l,_[1]),y&2&&o!==(o=_[1]==1?"log":"logs")&&ue(r,o),y&4&&Q(t,"hidden",_[2]),_[2]?h?y&4&&O(h,1):(h=lp(),h.c(),O(h,1),h.m(e,u)):h&&(re(),D(h,1,1,()=>{h=null}),ae()),_[3]?g?g.p(_,y):(g=sp(_),g.c(),g.m(e,null)):g&&(g.d(1),g=null),y&4&&Q(e,"loading",_[2])},i(_){O(h)},o(_){D(h)},d(_){_&&k(e),h&&h.d(),n[11](null),g&&g.d(),d=!1,m()}}}function IC(n,e,t){let{filter:i=""}=e,{zoom:l={}}=e,{presets:s=""}=e,o,r,a=[],u=0,f=!1,c=!1;async function d(){t(2,f=!0);const _=[s,z.normalizeLogsFilter(i)].filter(Boolean).join("&&");return me.logs.getStats({filter:_}).then(y=>{m(),y=z.toArray(y);for(let S of y)a.push({x:new Date(S.date),y:S.total}),t(1,u+=S.total)}).catch(y=>{y!=null&&y.isAbort||(m(),console.warn(y),me.error(y,!_||(y==null?void 0:y.status)!=400))}).finally(()=>{t(2,f=!1)})}function m(){t(10,a=[]),t(1,u=0)}function h(){r==null||r.resetZoom()}Yt(()=>(vi.register(Gi,ar,sr,nu,Qs,D$,q$),vi.register(MC),t(9,r=new vi(o,{type:"line",data:{datasets:[{label:"Total requests",data:a,borderColor:"#e34562",pointBackgroundColor:"#e34562",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{resizeDelay:250,maintainAspectRatio:!1,animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3"},border:{color:"#e4e9ec"},ticks:{precision:0,maxTicksLimit:4,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{color:_=>{var y;return(y=_.tick)!=null&&y.major?"#edf0f3":""}},color:"#e4e9ec",ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:_=>{var y;return(y=_.tick)!=null&&y.major?"#16161a":"#666f75"}}}},plugins:{legend:{display:!1},zoom:{enabled:!0,zoom:{mode:"x",pinch:{enabled:!0},drag:{enabled:!0,backgroundColor:"rgba(255, 99, 132, 0.2)",borderWidth:0,threshold:10},limits:{x:{minRange:1e8},y:{minRange:1e8}},onZoomComplete:({chart:_})=>{t(3,c=_.isZoomedOrPanned()),c?(t(5,l.min=z.formatToUTCDate(_.scales.x.min,"yyyy-MM-dd HH")+":00:00.000Z",l),t(5,l.max=z.formatToUTCDate(_.scales.x.max,"yyyy-MM-dd HH")+":59:59.999Z",l)):(l.min||l.max)&&t(5,l={})}}}}}})),()=>r==null?void 0:r.destroy()));function g(_){ie[_?"unshift":"push"](()=>{o=_,t(0,o)})}return n.$$set=_=>{"filter"in _&&t(6,i=_.filter),"zoom"in _&&t(5,l=_.zoom),"presets"in _&&t(7,s=_.presets)},n.$$.update=()=>{n.$$.dirty&192&&(typeof i<"u"||typeof s<"u")&&d(),n.$$.dirty&1536&&typeof a<"u"&&r&&(t(9,r.data.datasets[0].data=a,r),r.update())},[o,u,f,c,h,l,i,s,d,r,a,g]}class LC extends ye{constructor(e){super(),be(this,e,IC,DC,_e,{filter:6,zoom:5,presets:7,load:8})}get load(){return this.$$.ctx[8]}}function AC(n){let e,t,i;return{c(){e=b("div"),t=b("code"),p(t,"class","svelte-s3jkbp"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-s3jkbp")},m(l,s){v(l,e,s),w(e,t),t.innerHTML=n[1]},p(l,[s]){s&2&&(t.innerHTML=l[1]),s&1&&i!==(i="code-wrapper prism-light "+l[0]+" svelte-s3jkbp")&&p(e,"class",i)},i:te,o:te,d(l){l&&k(e)}}}function PC(n,e,t){let{content:i=""}=e,{language:l="javascript"}=e,{class:s=""}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Prism.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.highlight(a,Prism.languages[l]||Prism.languages.javascript,l)}return n.$$set=a=>{"content"in a&&t(2,i=a.content),"language"in a&&t(3,l=a.language),"class"in a&&t(0,s=a.class)},n.$$.update=()=>{n.$$.dirty&4&&typeof Prism<"u"&&i&&t(1,o=r(i))},[s,o,i,l]}class Qu extends ye{constructor(e){super(),be(this,e,PC,AC,_e,{content:2,language:3,class:0})}}function NC(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"tabindex","-1"),p(e,"role","button"),p(e,"class",t=n[3]?n[2]:n[1]),p(e,"aria-label","Copy to clipboard")},m(o,r){v(o,e,r),l||(s=[Me(i=He.call(null,e,n[3]?void 0:n[0])),B(e,"click",On(n[4]))],l=!0)},p(o,[r]){r&14&&t!==(t=o[3]?o[2]:o[1])&&p(e,"class",t),i&&Rt(i.update)&&r&9&&i.update.call(null,o[3]?void 0:o[0])},i:te,o:te,d(o){o&&k(e),l=!1,De(s)}}}function RC(n,e,t){let{value:i=""}=e,{tooltip:l="Copy"}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:o="ri-check-line txt-sm txt-success"}=e,{successDuration:r=500}=e,a;function u(){i&&(z.copyToClipboard(i),clearTimeout(a),t(3,a=setTimeout(()=>{clearTimeout(a),t(3,a=null)},r)))}return Yt(()=>()=>{a&&clearTimeout(a)}),n.$$set=f=>{"value"in f&&t(5,i=f.value),"tooltip"in f&&t(0,l=f.tooltip),"idleClasses"in f&&t(1,s=f.idleClasses),"successClasses"in f&&t(2,o=f.successClasses),"successDuration"in f&&t(6,r=f.successDuration)},[l,s,o,a,u,i,r]}class ai extends ye{constructor(e){super(),be(this,e,RC,NC,_e,{value:5,tooltip:0,idleClasses:1,successClasses:2,successDuration:6})}}function op(n,e,t){const i=n.slice();i[16]=e[t];const l=i[1].data[i[16]];i[17]=l;const s=z.isEmpty(i[17]);i[18]=s;const o=!i[18]&&i[17]!==null&&typeof i[17]=="object";return i[19]=o,i}function FC(n){let e,t,i,l,s,o,r,a=n[1].id+"",u,f,c,d,m,h,g,_,y,S,T,$,E,M,L,I,A,P,R,N,U,j,V,K,J;d=new ai({props:{value:n[1].id}}),S=new ly({props:{level:n[1].level}}),E=new ai({props:{value:n[1].level}}),R=new iy({props:{date:n[1].created}}),j=new ai({props:{value:n[1].created}});let ee=!n[4]&&rp(n),X=pe(n[5](n[1].data)),oe=[];for(let ke=0;keD(oe[ke],1,1,()=>{oe[ke]=null});return{c(){e=b("table"),t=b("tbody"),i=b("tr"),l=b("td"),l.textContent="id",s=C(),o=b("td"),r=b("span"),u=Y(a),f=C(),c=b("div"),H(d.$$.fragment),m=C(),h=b("tr"),g=b("td"),g.textContent="level",_=C(),y=b("td"),H(S.$$.fragment),T=C(),$=b("div"),H(E.$$.fragment),M=C(),L=b("tr"),I=b("td"),I.textContent="created",A=C(),P=b("td"),H(R.$$.fragment),N=C(),U=b("div"),H(j.$$.fragment),V=C(),ee&&ee.c(),K=C();for(let ke=0;ke{ee=null}),ae()):ee?(ee.p(ke,Ce),Ce&16&&O(ee,1)):(ee=rp(ke),ee.c(),O(ee,1),ee.m(t,K)),Ce&50){X=pe(ke[5](ke[1].data));let Je;for(Je=0;Je',p(e,"class","block txt-center")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function rp(n){let e,t,i,l,s,o,r;const a=[jC,HC],u=[];function f(c,d){return c[1].message?0:1}return s=f(n),o=u[s]=a[s](n),{c(){e=b("tr"),t=b("td"),t.textContent="message",i=C(),l=b("td"),o.c(),p(t,"class","min-width txt-hint txt-bold svelte-1c23bpt"),p(l,"class","svelte-1c23bpt"),p(e,"class","svelte-1c23bpt")},m(c,d){v(c,e,d),w(e,t),w(e,i),w(e,l),u[s].m(l,null),r=!0},p(c,d){let m=s;s=f(c),s===m?u[s].p(c,d):(re(),D(u[m],1,1,()=>{u[m]=null}),ae(),o=u[s],o?o.p(c,d):(o=u[s]=a[s](c),o.c()),O(o,1),o.m(l,null))},i(c){r||(O(o),r=!0)},o(c){D(o),r=!1},d(c){c&&k(e),u[s].d()}}}function HC(n){let e;return{c(){e=b("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function jC(n){let e,t=n[1].message+"",i,l,s,o,r;return o=new ai({props:{value:n[1].message}}),{c(){e=b("span"),i=Y(t),l=C(),s=b("div"),H(o.$$.fragment),p(e,"class","txt"),p(s,"class","copy-icon-wrapper svelte-1c23bpt")},m(a,u){v(a,e,u),w(e,i),v(a,l,u),v(a,s,u),F(o,s,null),r=!0},p(a,u){(!r||u&2)&&t!==(t=a[1].message+"")&&ue(i,t);const f={};u&2&&(f.value=a[1].message),o.$set(f)},i(a){r||(O(o.$$.fragment,a),r=!0)},o(a){D(o.$$.fragment,a),r=!1},d(a){a&&(k(e),k(l),k(s)),q(o)}}}function zC(n){let e,t=n[17]+"",i,l=n[4]&&n[16]=="execTime"?"ms":"",s;return{c(){e=b("span"),i=Y(t),s=Y(l),p(e,"class","txt")},m(o,r){v(o,e,r),w(e,i),w(e,s)},p(o,r){r&2&&t!==(t=o[17]+"")&&ue(i,t),r&18&&l!==(l=o[4]&&o[16]=="execTime"?"ms":"")&&ue(s,l)},i:te,o:te,d(o){o&&k(e)}}}function UC(n){let e,t;return e=new Qu({props:{content:n[17],language:"html"}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l&2&&(s.content=i[17]),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function VC(n){let e,t=n[17]+"",i;return{c(){e=b("span"),i=Y(t),p(e,"class","label label-danger log-error-label svelte-1c23bpt")},m(l,s){v(l,e,s),w(e,i)},p(l,s){s&2&&t!==(t=l[17]+"")&&ue(i,t)},i:te,o:te,d(l){l&&k(e)}}}function BC(n){let e,t;return e=new Qu({props:{content:JSON.stringify(n[17],null,2)}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l&2&&(s.content=JSON.stringify(i[17],null,2)),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function WC(n){let e;return{c(){e=b("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function ap(n){let e,t,i;return t=new ai({props:{value:n[17]}}),{c(){e=b("div"),H(t.$$.fragment),p(e,"class","copy-icon-wrapper svelte-1c23bpt")},m(l,s){v(l,e,s),F(t,e,null),i=!0},p(l,s){const o={};s&2&&(o.value=l[17]),t.$set(o)},i(l){i||(O(t.$$.fragment,l),i=!0)},o(l){D(t.$$.fragment,l),i=!1},d(l){l&&k(e),q(t)}}}function up(n){let e,t,i,l=n[16]+"",s,o,r,a,u,f,c,d;const m=[WC,BC,VC,UC,zC],h=[];function g(y,S){return y[18]?0:y[19]?1:y[16]=="error"?2:y[16]=="details"?3:4}a=g(n),u=h[a]=m[a](n);let _=!n[18]&&ap(n);return{c(){e=b("tr"),t=b("td"),i=Y("data."),s=Y(l),o=C(),r=b("td"),u.c(),f=C(),_&&_.c(),c=C(),p(t,"class","min-width txt-hint txt-bold svelte-1c23bpt"),Q(t,"v-align-top",n[19]),p(r,"class","svelte-1c23bpt"),p(e,"class","svelte-1c23bpt")},m(y,S){v(y,e,S),w(e,t),w(t,i),w(t,s),w(e,o),w(e,r),h[a].m(r,null),w(r,f),_&&_.m(r,null),w(e,c),d=!0},p(y,S){(!d||S&2)&&l!==(l=y[16]+"")&&ue(s,l),(!d||S&34)&&Q(t,"v-align-top",y[19]);let T=a;a=g(y),a===T?h[a].p(y,S):(re(),D(h[T],1,1,()=>{h[T]=null}),ae(),u=h[a],u?u.p(y,S):(u=h[a]=m[a](y),u.c()),O(u,1),u.m(r,f)),y[18]?_&&(re(),D(_,1,1,()=>{_=null}),ae()):_?(_.p(y,S),S&2&&O(_,1)):(_=ap(y),_.c(),O(_,1),_.m(r,null))},i(y){d||(O(u),O(_),d=!0)},o(y){D(u),D(_),d=!1},d(y){y&&k(e),h[a].d(),_&&_.d()}}}function YC(n){let e,t,i,l;const s=[qC,FC],o=[];function r(a,u){var f;return a[3]?0:(f=a[1])!=null&&f.id?1:-1}return~(e=r(n))&&(t=o[e]=s[e](n)),{c(){t&&t.c(),i=ge()},m(a,u){~e&&o[e].m(a,u),v(a,i,u),l=!0},p(a,u){let f=e;e=r(a),e===f?~e&&o[e].p(a,u):(t&&(re(),D(o[f],1,1,()=>{o[f]=null}),ae()),~e?(t=o[e],t?t.p(a,u):(t=o[e]=s[e](a),t.c()),O(t,1),t.m(i.parentNode,i)):t=null)},i(a){l||(O(t),l=!0)},o(a){D(t),l=!1},d(a){a&&k(i),~e&&o[e].d(a)}}}function KC(n){let e;return{c(){e=b("h4"),e.textContent="Request log"},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function JC(n){let e,t,i,l,s,o,r,a;return{c(){e=b("button"),e.innerHTML='Close',t=C(),i=b("button"),l=b("i"),s=C(),o=b("span"),o.textContent="Download as JSON",p(e,"type","button"),p(e,"class","btn btn-transparent"),p(l,"class","ri-download-line"),p(o,"class","txt"),p(i,"type","button"),p(i,"class","btn btn-primary"),i.disabled=n[3]},m(u,f){v(u,e,f),v(u,t,f),v(u,i,f),w(i,l),w(i,s),w(i,o),r||(a=[B(e,"click",n[9]),B(i,"click",n[10])],r=!0)},p(u,f){f&8&&(i.disabled=u[3])},d(u){u&&(k(e),k(t),k(i)),r=!1,De(a)}}}function ZC(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[JC],header:[KC],default:[YC]},$$scope:{ctx:n}};return e=new ln({props:i}),n[11](e),e.$on("hide",n[7]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&4194330&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[11](null),q(e,l)}}}const fp="log_view";function GC(n,e,t){let i;const l=gt();let s,o={},r=!1;function a(T){return f(T).then($=>{t(1,o=$),h()}),s==null?void 0:s.show()}function u(){return me.cancelRequest(fp),s==null?void 0:s.hide()}async function f(T){if(T&&typeof T!="string")return t(3,r=!1),T;t(3,r=!0);let $={};try{$=await me.logs.getOne(T,{requestKey:fp})}catch(E){E.isAbort||(u(),console.warn("resolveModel:",E),$i(`Unable to load log with id "${T}"`))}return t(3,r=!1),$}const c=["execTime","type","auth","authId","status","method","url","referer","remoteIP","userIP","userAgent","error","details"];function d(T){if(!T)return[];let $=[];for(let M of c)typeof T[M]<"u"&&$.push(M);const E=Object.keys(T);for(let M of E)$.includes(M)||$.push(M);return $}function m(){z.downloadJson(o,"log_"+o.created.replaceAll(/[-:\. ]/gi,"")+".json")}function h(){l("show",o)}function g(){l("hide",o),t(1,o={})}const _=()=>u(),y=()=>m();function S(T){ie[T?"unshift":"push"](()=>{s=T,t(2,s)})}return n.$$.update=()=>{var T;n.$$.dirty&2&&t(4,i=((T=o.data)==null?void 0:T.type)=="request")},[u,o,s,r,i,d,m,g,a,_,y,S]}class XC extends ye{constructor(e){super(),be(this,e,GC,ZC,_e,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function QC(n,e,t){const i=n.slice();return i[1]=e[t],i}function xC(n){let e;return{c(){e=b("code"),e.textContent=`${n[1].level}:${n[1].label}`,p(e,"class","txt-xs")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function e5(n){let e,t,i,l=pe(H0),s=[];for(let o=0;o{"class"in l&&t(0,i=l.class)},[i]}class tk extends ye{constructor(e){super(),be(this,e,t5,e5,_e,{class:0})}}function n5(n){let e,t,i,l,s,o,r,a,u,f,c;return t=new fe({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[l5,({uniqueId:d})=>({23:d}),({uniqueId:d})=>d?8388608:0]},$$scope:{ctx:n}}}),l=new fe({props:{class:"form-field",name:"logs.minLevel",$$slots:{default:[s5,({uniqueId:d})=>({23:d}),({uniqueId:d})=>d?8388608:0]},$$scope:{ctx:n}}}),o=new fe({props:{class:"form-field form-field-toggle",name:"logs.logIP",$$slots:{default:[o5,({uniqueId:d})=>({23:d}),({uniqueId:d})=>d?8388608:0]},$$scope:{ctx:n}}}),a=new fe({props:{class:"form-field form-field-toggle",name:"logs.logAuthId",$$slots:{default:[r5,({uniqueId:d})=>({23:d}),({uniqueId:d})=>d?8388608:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),H(t.$$.fragment),i=C(),H(l.$$.fragment),s=C(),H(o.$$.fragment),r=C(),H(a.$$.fragment),p(e,"id",n[6]),p(e,"class","grid"),p(e,"autocomplete","off")},m(d,m){v(d,e,m),F(t,e,null),w(e,i),F(l,e,null),w(e,s),F(o,e,null),w(e,r),F(a,e,null),u=!0,f||(c=B(e,"submit",tt(n[7])),f=!0)},p(d,m){const h={};m&25165826&&(h.$$scope={dirty:m,ctx:d}),t.$set(h);const g={};m&25165826&&(g.$$scope={dirty:m,ctx:d}),l.$set(g);const _={};m&25165826&&(_.$$scope={dirty:m,ctx:d}),o.$set(_);const y={};m&25165826&&(y.$$scope={dirty:m,ctx:d}),a.$set(y)},i(d){u||(O(t.$$.fragment,d),O(l.$$.fragment,d),O(o.$$.fragment,d),O(a.$$.fragment,d),u=!0)},o(d){D(t.$$.fragment,d),D(l.$$.fragment,d),D(o.$$.fragment,d),D(a.$$.fragment,d),u=!1},d(d){d&&k(e),q(t),q(l),q(o),q(a),f=!1,c()}}}function i5(n){let e;return{c(){e=b("div"),e.innerHTML='
',p(e,"class","block txt-center")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function l5(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("label"),t=Y("Max days retention"),l=C(),s=b("input"),r=C(),a=b("div"),a.innerHTML="Set to 0 to disable logs persistence.",p(e,"for",i=n[23]),p(s,"type","number"),p(s,"id",o=n[23]),s.required=!0,p(a,"class","help-block")},m(c,d){v(c,e,d),w(e,t),v(c,l,d),v(c,s,d),ce(s,n[1].logs.maxDays),v(c,r,d),v(c,a,d),u||(f=B(s,"input",n[11]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(s,"id",o),d&2&&_t(s.value)!==c[1].logs.maxDays&&ce(s,c[1].logs.maxDays)},d(c){c&&(k(e),k(l),k(s),k(r),k(a)),u=!1,f()}}}function s5(n){let e,t,i,l,s,o,r,a,u,f,c,d,m;return f=new tk({}),{c(){e=b("label"),t=Y("Min log level"),l=C(),s=b("input"),o=C(),r=b("div"),a=b("p"),a.textContent="Logs with level below the minimum will be ignored.",u=C(),H(f.$$.fragment),p(e,"for",i=n[23]),p(s,"type","number"),s.required=!0,p(s,"min","-100"),p(s,"max","100"),p(r,"class","help-block")},m(h,g){v(h,e,g),w(e,t),v(h,l,g),v(h,s,g),ce(s,n[1].logs.minLevel),v(h,o,g),v(h,r,g),w(r,a),w(r,u),F(f,r,null),c=!0,d||(m=B(s,"input",n[12]),d=!0)},p(h,g){(!c||g&8388608&&i!==(i=h[23]))&&p(e,"for",i),g&2&&_t(s.value)!==h[1].logs.minLevel&&ce(s,h[1].logs.minLevel)},i(h){c||(O(f.$$.fragment,h),c=!0)},o(h){D(f.$$.fragment,h),c=!1},d(h){h&&(k(e),k(l),k(s),k(o),k(r)),q(f),d=!1,m()}}}function o5(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable IP logging"),p(e,"type","checkbox"),p(e,"id",t=n[23]),p(l,"for",o=n[23])},m(u,f){v(u,e,f),e.checked=n[1].logs.logIP,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[13]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&p(e,"id",t),f&2&&(e.checked=u[1].logs.logIP),f&8388608&&o!==(o=u[23])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function r5(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable Auth Id logging"),p(e,"type","checkbox"),p(e,"id",t=n[23]),p(l,"for",o=n[23])},m(u,f){v(u,e,f),e.checked=n[1].logs.logAuthId,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[14]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&p(e,"id",t),f&2&&(e.checked=u[1].logs.logAuthId),f&8388608&&o!==(o=u[23])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function a5(n){let e,t,i,l;const s=[i5,n5],o=[];function r(a,u){return a[4]?0:1}return e=r(n),t=o[e]=s[e](n),{c(){t.c(),i=ge()},m(a,u){o[e].m(a,u),v(a,i,u),l=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),D(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=s[e](a),t.c()),O(t,1),t.m(i.parentNode,i))},i(a){l||(O(t),l=!0)},o(a){D(t),l=!1},d(a){a&&k(i),o[e].d(a)}}}function u5(n){let e;return{c(){e=b("h4"),e.textContent="Logs settings"},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function f5(n){let e,t,i,l,s,o,r,a;return{c(){e=b("button"),t=b("span"),t.textContent="Cancel",i=C(),l=b("button"),s=b("span"),s.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[3],p(s,"class","txt"),p(l,"type","submit"),p(l,"form",n[6]),p(l,"class","btn btn-expanded"),l.disabled=o=!n[5]||n[3],Q(l,"btn-loading",n[3])},m(u,f){v(u,e,f),w(e,t),v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"click",n[0]),r=!0)},p(u,f){f&8&&(e.disabled=u[3]),f&40&&o!==(o=!u[5]||u[3])&&(l.disabled=o),f&8&&Q(l,"btn-loading",u[3])},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function c5(n){let e,t,i={popup:!0,class:"superuser-panel",beforeHide:n[15],$$slots:{footer:[f5],header:[u5],default:[a5]},$$scope:{ctx:n}};return e=new ln({props:i}),n[16](e),e.$on("hide",n[17]),e.$on("show",n[18]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&8&&(o.beforeHide=l[15]),s&16777274&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[16](null),q(e,l)}}}function d5(n,e,t){let i,l;const s=gt(),o="logs_settings_"+z.randomString(3);let r,a=!1,u=!1,f={},c={};function d(){return h(),g(),r==null?void 0:r.show()}function m(){return r==null?void 0:r.hide()}function h(){Wt(),t(9,f={}),t(1,c=JSON.parse(JSON.stringify(f||{})))}async function g(){t(4,u=!0);try{const P=await me.settings.getAll()||{};y(P)}catch(P){me.error(P)}t(4,u=!1)}async function _(){if(l){t(3,a=!0);try{const P=await me.settings.update(z.filterRedactedProps(c));y(P),t(3,a=!1),m(),tn("Successfully saved logs settings."),s("save",P)}catch(P){t(3,a=!1),me.error(P)}}}function y(P={}){t(1,c={logs:(P==null?void 0:P.logs)||{}}),t(9,f=JSON.parse(JSON.stringify(c)))}function S(){c.logs.maxDays=_t(this.value),t(1,c)}function T(){c.logs.minLevel=_t(this.value),t(1,c)}function $(){c.logs.logIP=this.checked,t(1,c)}function E(){c.logs.logAuthId=this.checked,t(1,c)}const M=()=>!a;function L(P){ie[P?"unshift":"push"](()=>{r=P,t(2,r)})}function I(P){Pe.call(this,n,P)}function A(P){Pe.call(this,n,P)}return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(f)),n.$$.dirty&1026&&t(5,l=i!=JSON.stringify(c))},[m,c,r,a,u,l,o,_,d,f,i,S,T,$,E,M,L,I,A]}class p5 extends ye{constructor(e){super(),be(this,e,d5,c5,_e,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function m5(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Include requests by superusers"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"for",o=n[25])},m(u,f){v(u,e,f),e.checked=n[2],v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[12]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&33554432&&o!==(o=u[25])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function cp(n){let e,t,i;function l(o){n[14](o)}let s={filter:n[1],presets:n[6]};return n[5]!==void 0&&(s.zoom=n[5]),e=new LC({props:s}),ie.push(()=>ve(e,"zoom",l)),{c(){H(e.$$.fragment)},m(o,r){F(e,o,r),i=!0},p(o,r){const a={};r&2&&(a.filter=o[1]),r&64&&(a.presets=o[6]),!t&&r&32&&(t=!0,a.zoom=o[5],$e(()=>t=!1)),e.$set(a)},i(o){i||(O(e.$$.fragment,o),i=!0)},o(o){D(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function dp(n){let e,t,i,l;function s(a){n[15](a)}function o(a){n[16](a)}let r={presets:n[6]};return n[1]!==void 0&&(r.filter=n[1]),n[5]!==void 0&&(r.zoom=n[5]),e=new q3({props:r}),ie.push(()=>ve(e,"filter",s)),ie.push(()=>ve(e,"zoom",o)),e.$on("select",n[17]),{c(){H(e.$$.fragment)},m(a,u){F(e,a,u),l=!0},p(a,u){const f={};u&64&&(f.presets=a[6]),!t&&u&2&&(t=!0,f.filter=a[1],$e(()=>t=!1)),!i&&u&32&&(i=!0,f.zoom=a[5],$e(()=>i=!1)),e.$set(f)},i(a){l||(O(e.$$.fragment,a),l=!0)},o(a){D(e.$$.fragment,a),l=!1},d(a){q(e,a)}}}function h5(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S,T,$=n[4],E,M=n[4],L,I,A,P;u=new Au({}),u.$on("refresh",n[11]),h=new fe({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[m5,({uniqueId:U})=>({25:U}),({uniqueId:U})=>U?33554432:0]},$$scope:{ctx:n}}}),_=new Hr({props:{value:n[1],placeholder:"Search term or filter like `level > 0 && data.auth = 'guest'`",extraAutocompleteKeys:["level","message","data."]}}),_.$on("submit",n[13]),S=new tk({props:{class:"block txt-sm txt-hint m-t-xs m-b-base"}});let R=cp(n),N=dp(n);return{c(){e=b("div"),t=b("header"),i=b("nav"),l=b("div"),s=Y(n[7]),o=C(),r=b("button"),r.innerHTML='',a=C(),H(u.$$.fragment),f=C(),c=b("div"),d=C(),m=b("div"),H(h.$$.fragment),g=C(),H(_.$$.fragment),y=C(),H(S.$$.fragment),T=C(),R.c(),E=C(),N.c(),L=ge(),p(l,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(r,"type","button"),p(r,"aria-label","Logs settings"),p(r,"class","btn btn-transparent btn-circle"),p(c,"class","flex-fill"),p(m,"class","inline-flex"),p(t,"class","page-header"),p(e,"class","page-header-wrapper m-b-0")},m(U,j){v(U,e,j),w(e,t),w(t,i),w(i,l),w(l,s),w(t,o),w(t,r),w(t,a),F(u,t,null),w(t,f),w(t,c),w(t,d),w(t,m),F(h,m,null),w(e,g),F(_,e,null),w(e,y),F(S,e,null),w(e,T),R.m(e,null),v(U,E,j),N.m(U,j),v(U,L,j),I=!0,A||(P=[Me(He.call(null,r,{text:"Logs settings",position:"right"})),B(r,"click",n[10])],A=!0)},p(U,j){(!I||j&128)&&ue(s,U[7]);const V={};j&100663300&&(V.$$scope={dirty:j,ctx:U}),h.$set(V);const K={};j&2&&(K.value=U[1]),_.$set(K),j&16&&_e($,$=U[4])?(re(),D(R,1,1,te),ae(),R=cp(U),R.c(),O(R,1),R.m(e,null)):R.p(U,j),j&16&&_e(M,M=U[4])?(re(),D(N,1,1,te),ae(),N=dp(U),N.c(),O(N,1),N.m(L.parentNode,L)):N.p(U,j)},i(U){I||(O(u.$$.fragment,U),O(h.$$.fragment,U),O(_.$$.fragment,U),O(S.$$.fragment,U),O(R),O(N),I=!0)},o(U){D(u.$$.fragment,U),D(h.$$.fragment,U),D(_.$$.fragment,U),D(S.$$.fragment,U),D(R),D(N),I=!1},d(U){U&&(k(e),k(E),k(L)),q(u),q(h),q(_),q(S),R.d(U),N.d(U),A=!1,De(P)}}}function _5(n){let e,t,i,l,s,o;e=new di({props:{$$slots:{default:[h5]},$$scope:{ctx:n}}});let r={};i=new XC({props:r}),n[18](i),i.$on("show",n[19]),i.$on("hide",n[20]);let a={};return s=new p5({props:a}),n[21](s),s.$on("save",n[8]),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment),l=C(),H(s.$$.fragment)},m(u,f){F(e,u,f),v(u,t,f),F(i,u,f),v(u,l,f),F(s,u,f),o=!0},p(u,[f]){const c={};f&67109119&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const d={};i.$set(d);const m={};s.$set(m)},i(u){o||(O(e.$$.fragment,u),O(i.$$.fragment,u),O(s.$$.fragment,u),o=!0)},o(u){D(e.$$.fragment,u),D(i.$$.fragment,u),D(s.$$.fragment,u),o=!1},d(u){u&&(k(t),k(l)),q(e,u),n[18](null),q(i,u),n[21](null),q(s,u)}}}const Ko="logId",pp="superuserRequests",mp="superuserLogRequests";function g5(n,e,t){var N;let i,l,s;Qe(n,Lu,U=>t(22,l=U)),Qe(n,cn,U=>t(7,s=U)),Nn(cn,s="Logs",s);const o=new URLSearchParams(l);let r,a,u=1,f=o.get("filter")||"",c={},d=(o.get(pp)||((N=window.localStorage)==null?void 0:N.getItem(mp)))<<0,m=d;function h(){t(4,u++,u)}function g(U={}){let j={};j.filter=f||null,j[pp]=d<<0||null,z.replaceHashQueryParams(Object.assign(j,U))}const _=()=>a==null?void 0:a.show(),y=()=>h();function S(){d=this.checked,t(2,d)}const T=U=>t(1,f=U.detail);function $(U){c=U,t(5,c)}function E(U){f=U,t(1,f)}function M(U){c=U,t(5,c)}const L=U=>r==null?void 0:r.show(U==null?void 0:U.detail);function I(U){ie[U?"unshift":"push"](()=>{r=U,t(0,r)})}const A=U=>{var V;let j={};j[Ko]=((V=U.detail)==null?void 0:V.id)||null,z.replaceHashQueryParams(j)},P=()=>{let U={};U[Ko]=null,z.replaceHashQueryParams(U)};function R(U){ie[U?"unshift":"push"](()=>{a=U,t(3,a)})}return n.$$.update=()=>{var U;n.$$.dirty&1&&o.get(Ko)&&r&&r.show(o.get(Ko)),n.$$.dirty&4&&t(6,i=d?"":'data.auth!="_superusers"'),n.$$.dirty&516&&m!=d&&(t(9,m=d),(U=window.localStorage)==null||U.setItem(mp,d<<0),g()),n.$$.dirty&2&&typeof f<"u"&&g()},[r,f,d,a,u,c,i,s,h,m,_,y,S,T,$,E,M,L,I,A,P,R]}class b5 extends ye{constructor(e){super(),be(this,e,g5,_5,_e,{})}}function hp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function _p(n){n[18]=n[19].default}function gp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function bp(n){let e;return{c(){e=b("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function yp(n,e){let t,i=e[21]===Object.keys(e[6]).length,l,s,o=e[15].label+"",r,a,u,f,c=i&&bp();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ge(),c&&c.c(),l=C(),s=b("button"),r=Y(o),a=C(),p(s,"type","button"),p(s,"class","sidebar-item"),Q(s,"active",e[5]===e[14]),this.first=t},m(m,h){v(m,t,h),c&&c.m(m,h),v(m,l,h),v(m,s,h),w(s,r),w(s,a),u||(f=B(s,"click",d),u=!0)},p(m,h){e=m,h&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=bp(),c.c(),c.m(l.parentNode,l)):c&&(c.d(1),c=null),h&8&&o!==(o=e[15].label+"")&&ue(r,o),h&40&&Q(s,"active",e[5]===e[14])},d(m){m&&(k(t),k(l),k(s)),c&&c.d(m),u=!1,f()}}}function kp(n){let e,t,i,l={ctx:n,current:null,token:null,hasCatch:!1,pending:v5,then:k5,catch:y5,value:19,blocks:[,,,]};return mf(t=n[15].component,l),{c(){e=ge(),l.block.c()},m(s,o){v(s,e,o),l.block.m(s,l.anchor=o),l.mount=()=>e.parentNode,l.anchor=e,i=!0},p(s,o){n=s,l.ctx=n,o&8&&t!==(t=n[15].component)&&mf(t,l)||Ak(l,n,o)},i(s){i||(O(l.block),i=!0)},o(s){for(let o=0;o<3;o+=1){const r=l.blocks[o];D(r)}i=!1},d(s){s&&k(e),l.block.d(s),l.token=null,l=null}}}function y5(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function k5(n){_p(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){H(e.$$.fragment),t=C()},m(l,s){F(e,l,s),v(l,t,s),i=!0},p(l,s){_p(l);const o={};s&4&&(o.collection=l[2]),e.$set(o)},i(l){i||(O(e.$$.fragment,l),i=!0)},o(l){D(e.$$.fragment,l),i=!1},d(l){l&&k(t),q(e,l)}}}function v5(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function vp(n,e){let t,i,l,s=e[5]===e[14]&&kp(e);return{key:n,first:null,c(){t=ge(),s&&s.c(),i=ge(),this.first=t},m(o,r){v(o,t,r),s&&s.m(o,r),v(o,i,r),l=!0},p(o,r){e=o,e[5]===e[14]?s?(s.p(e,r),r&40&&O(s,1)):(s=kp(e),s.c(),O(s,1),s.m(i.parentNode,i)):s&&(re(),D(s,1,1,()=>{s=null}),ae())},i(o){l||(O(s),l=!0)},o(o){D(s),l=!1},d(o){o&&(k(t),k(i)),s&&s.d(o)}}}function w5(n){let e,t,i,l=[],s=new Map,o,r,a=[],u=new Map,f,c=pe(Object.entries(n[3]));const d=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[8]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function T5(n){let e,t,i={class:"docs-panel",$$slots:{footer:[S5],default:[w5]},$$scope:{ctx:n}};return e=new ln({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&4194348&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[10](null),q(e,l)}}}function $5(n,e,t){const i={list:{label:"List/Search",component:Ot(()=>import("./ListApiDocs-MoPZqRTR.js"),__vite__mapDeps([2,3,4]),import.meta.url)},view:{label:"View",component:Ot(()=>import("./ViewApiDocs-BJ5aAhNM.js"),__vite__mapDeps([5,3]),import.meta.url)},create:{label:"Create",component:Ot(()=>import("./CreateApiDocs-CSumiDHV.js"),__vite__mapDeps([6,3]),import.meta.url)},update:{label:"Update",component:Ot(()=>import("./UpdateApiDocs-D-6a8mlA.js"),__vite__mapDeps([7,3]),import.meta.url)},delete:{label:"Delete",component:Ot(()=>import("./DeleteApiDocs-CADk0j75.js"),[],import.meta.url)},realtime:{label:"Realtime",component:Ot(()=>import("./RealtimeApiDocs-DyrElwZG.js"),[],import.meta.url)}},l={"list-auth-methods":{label:"List auth methods",component:Ot(()=>import("./AuthMethodsDocs-0sXZLdUz.js"),__vite__mapDeps([8,3]),import.meta.url)},refresh:{label:"Auth refresh",component:Ot(()=>import("./AuthRefreshDocs-BDIR7TiC.js"),__vite__mapDeps([9,3]),import.meta.url)},"auth-with-password":{label:"Auth with password",component:Ot(()=>import("./AuthWithPasswordDocs-CYL6rtF4.js"),__vite__mapDeps([10,3]),import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:Ot(()=>import("./AuthWithOAuth2Docs-BrCCD3wB.js"),__vite__mapDeps([11,3]),import.meta.url)},"auth-with-otp":{label:"Auth with OTP",component:Ot(()=>import("./AuthWithOtpDocs-CqMdM2jt.js"),[],import.meta.url)},verification:{label:"Verification",component:Ot(()=>import("./VerificationDocs-C__mAvFL.js"),[],import.meta.url)},"password-reset":{label:"Password reset",component:Ot(()=>import("./PasswordResetDocs-BgeHIRsi.js"),[],import.meta.url)},"email-change":{label:"Email change",component:Ot(()=>import("./EmailChangeDocs-DcXreM6e.js"),[],import.meta.url)}};let s,o={},r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),s==null?void 0:s.show()}function f(){return s==null?void 0:s.hide()}function c(y){t(5,r=y)}const d=()=>f(),m=y=>c(y);function h(y){ie[y?"unshift":"push"](()=>{s=y,t(4,s)})}function g(y){Pe.call(this,n,y)}function _(y){Pe.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.type==="auth"?(t(3,a=Object.assign({},i,l)),o.passwordAuth.enabled||delete a["auth-with-password"],o.oauth2.enabled||delete a["auth-with-oauth2"],o.otp.enabled||delete a["auth-with-otp"]):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,s,r,i,u,d,m,h,g,_]}class C5 extends ye{constructor(e){super(),be(this,e,$5,T5,_e,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}const O5=n=>({active:n&1}),wp=n=>({active:n[0]});function Sp(n){let e,t,i;const l=n[15].default,s=Lt(l,n,n[14],null);return{c(){e=b("div"),s&&s.c(),p(e,"class","accordion-content")},m(o,r){v(o,e,r),s&&s.m(e,null),i=!0},p(o,r){s&&s.p&&(!i||r&16384)&&Pt(s,l,o,o[14],i?At(l,o[14],r,null):Nt(o[14]),null)},i(o){i||(O(s,o),o&&nt(()=>{i&&(t||(t=ze(e,wt,{delay:10,duration:150},!0)),t.run(1))}),i=!0)},o(o){D(s,o),o&&(t||(t=ze(e,wt,{delay:10,duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),s&&s.d(o),o&&t&&t.end()}}}function E5(n){let e,t,i,l,s,o,r;const a=n[15].header,u=Lt(a,n,n[14],wp);let f=n[0]&&Sp(n);return{c(){e=b("div"),t=b("button"),u&&u.c(),i=C(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),p(t,"aria-expanded",n[0]),Q(t,"interactive",n[3]),p(e,"class",l="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){v(c,e,d),w(e,t),u&&u.m(t,null),w(e,i),f&&f.m(e,null),n[22](e),s=!0,o||(r=[B(t,"click",tt(n[17])),B(t,"drop",tt(n[18])),B(t,"dragstart",n[19]),B(t,"dragenter",n[20]),B(t,"dragleave",n[21]),B(t,"dragover",tt(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!s||d&16385)&&Pt(u,a,c,c[14],s?At(a,c[14],d,O5):Nt(c[14]),wp),(!s||d&4)&&p(t,"draggable",c[2]),(!s||d&1)&&p(t,"aria-expanded",c[0]),(!s||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&O(f,1)):(f=Sp(c),f.c(),O(f,1),f.m(e,null)):f&&(re(),D(f,1,1,()=>{f=null}),ae()),(!s||d&130&&l!==(l="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",l),(!s||d&131)&&Q(e,"active",c[0])},i(c){s||(O(u,c),O(f),s=!0)},o(c){D(u,c),D(f),s=!1},d(c){c&&k(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,De(r)}}}function M5(n,e,t){let{$$slots:i={},$$scope:l}=e;const s=gt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,m=!1;function h(){return!!f}function g(){S(),t(0,f=!0),s("expand")}function _(){t(0,f=!1),clearTimeout(r),s("collapse")}function y(){s("toggle"),f?_():g()}function S(){if(d&&o.closest(".accordions")){const P=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const R of P)R.click()}}Yt(()=>()=>clearTimeout(r));function T(P){Pe.call(this,n,P)}const $=()=>c&&y(),E=P=>{u&&(t(7,m=!1),S(),s("drop",P))},M=P=>u&&s("dragstart",P),L=P=>{u&&(t(7,m=!0),s("dragenter",P))},I=P=>{u&&(t(7,m=!1),s("dragleave",P))};function A(P){ie[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,l=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,m,s,d,h,g,_,r,l,i,T,$,E,M,L,I,A]}class qi extends ye{constructor(e){super(),be(this,e,M5,E5,_e,{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 Tp(n,e,t){const i=n.slice();return i[25]=e[t],i}function $p(n,e,t){const i=n.slice();return i[25]=e[t],i}function Cp(n){let e,t,i=pe(n[3]),l=[];for(let s=0;sn&&n.enabled&&n.modifierKey,By=(n,e)=>n&&e[n+"Key"],Gu=(n,e)=>n&&!e[n+"Key"];function sl(n,e,t){return n===void 0?!0:typeof n=="string"?n.indexOf(e)!==-1:typeof n=="function"?n({chart:t}).indexOf(e)!==-1:!1}function ya(n,e){return typeof n=="function"&&(n=n({chart:e})),typeof n=="string"?{x:n.indexOf("x")!==-1,y:n.indexOf("y")!==-1}:{x:!1,y:!1}}function K$(n,e){let t;return function(){return clearTimeout(t),t=setTimeout(n,e),e}}function J$({x:n,y:e},t){const i=t.scales,l=Object.keys(i);for(let s=0;s=o.top&&e<=o.bottom&&n>=o.left&&n<=o.right)return o}return null}function Wy(n,e,t){const{mode:i="xy",scaleMode:l,overScaleMode:s}=n||{},o=J$(e,t),r=ya(i,t),a=ya(l,t);if(s){const f=ya(s,t);for(const c of["x","y"])f[c]&&(a[c]=r[c],r[c]=!1)}if(o&&a[o.axis])return[o];const u=[];return ht(t.scales,function(f){r[f.axis]&&u.push(f)}),u}const iu=new WeakMap;function Jt(n){let e=iu.get(n);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{}},iu.set(n,e)),e}function Z$(n){iu.delete(n)}function Yy(n,e,t){const i=n.max-n.min,l=i*(e-1),s=n.isHorizontal()?t.x:t.y,o=Math.max(0,Math.min(1,(n.getValueForPixel(s)-n.min)/i||0)),r=1-o;return{min:l*o,max:l*r}}function Xd(n,e,t,i,l){let s=t[i];if(s==="original"){const o=n.originalScaleLimits[e.id][i];s=Ct(o.options,o.scale)}return Ct(s,l)}function G$(n,e,t){const i=n.getValueForPixel(e),l=n.getValueForPixel(t);return{min:Math.min(i,l),max:Math.max(i,l)}}function fs(n,{min:e,max:t},i,l=!1){const s=Jt(n.chart),{id:o,axis:r,options:a}=n,u=i&&(i[o]||i[r])||{},{minRange:f=0}=u,c=Xd(s,n,u,"min",-1/0),d=Xd(s,n,u,"max",1/0),m=l?Math.max(t-e,f):n.max-n.min,h=(m-t+e)/2;return e-=h,t+=h,ed&&(t=d,e=Math.max(d-m,c)),a.min=e,a.max=t,s.updatedScaleLimits[n.id]={min:e,max:t},n.parse(e)!==n.min||n.parse(t)!==n.max}function X$(n,e,t,i){const l=Yy(n,e,t),s={min:n.min+l.min,max:n.max-l.max};return fs(n,s,i,!0)}function Q$(n,e,t,i){fs(n,G$(n,e,t),i,!0)}const Qd=n=>n===0||isNaN(n)?0:n<0?Math.min(Math.round(n),-1):Math.max(Math.round(n),1);function x$(n){const t=n.getLabels().length-1;n.min>0&&(n.min-=1),n.maxa&&(s=Math.max(0,s-u),o=r===1?s:s+r,f=s===0),fs(n,{min:s,max:o},t)||f}const iC={second:500,minute:30*1e3,hour:30*60*1e3,day:12*60*60*1e3,week:3.5*24*60*60*1e3,month:15*24*60*60*1e3,quarter:60*24*60*60*1e3,year:182*24*60*60*1e3};function Ky(n,e,t,i=!1){const{min:l,max:s,options:o}=n,r=o.time&&o.time.round,a=iC[r]||0,u=n.getValueForPixel(n.getPixelForValue(l+a)-e),f=n.getValueForPixel(n.getPixelForValue(s+a)-e),{min:c=-1/0,max:d=1/0}=i&&t&&t[n.axis]||{};return isNaN(u)||isNaN(f)||ud?!0:fs(n,{min:u,max:f},t,i)}function xd(n,e,t){return Ky(n,e,t,!0)}const lu={category:eC,default:X$},su={default:Q$},ou={category:nC,default:Ky,logarithmic:xd,timeseries:xd};function lC(n,e,t){const{id:i,options:{min:l,max:s}}=n;if(!e[i]||!t[i])return!0;const o=t[i];return o.min!==l||o.max!==s}function ep(n,e){ht(n,(t,i)=>{e[i]||delete n[i]})}function cs(n,e){const{scales:t}=n,{originalScaleLimits:i,updatedScaleLimits:l}=e;return ht(t,function(s){lC(s,i,l)&&(i[s.id]={min:{scale:s.min,options:s.options.min},max:{scale:s.max,options:s.options.max}})}),ep(i,t),ep(l,t),i}function tp(n,e,t,i){const l=lu[n.type]||lu.default;dt(l,[n,e,t,i])}function np(n,e,t,i,l){const s=su[n.type]||su.default;dt(s,[n,e,t,i,l])}function sC(n){const e=n.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function Xu(n,e,t="none"){const{x:i=1,y:l=1,focalPoint:s=sC(n)}=typeof e=="number"?{x:e,y:e}:e,o=Jt(n),{options:{limits:r,zoom:a}}=o;cs(n,o);const u=i!==1,f=l!==1,c=Wy(a,s,n);ht(c||n.scales,function(d){d.isHorizontal()&&u?tp(d,i,s,r):!d.isHorizontal()&&f&&tp(d,l,s,r)}),n.update(t),dt(a.onZoom,[{chart:n}])}function Jy(n,e,t,i="none"){const l=Jt(n),{options:{limits:s,zoom:o}}=l,{mode:r="xy"}=o;cs(n,l);const a=sl(r,"x",n),u=sl(r,"y",n);ht(n.scales,function(f){f.isHorizontal()&&a?np(f,e.x,t.x,s):!f.isHorizontal()&&u&&np(f,e.y,t.y,s)}),n.update(i),dt(o.onZoom,[{chart:n}])}function oC(n,e,t,i="none"){cs(n,Jt(n));const l=n.scales[e];fs(l,t,void 0,!0),n.update(i)}function rC(n,e="default"){const t=Jt(n),i=cs(n,t);ht(n.scales,function(l){const s=l.options;i[l.id]?(s.min=i[l.id].min.options,s.max=i[l.id].max.options):(delete s.min,delete s.max)}),n.update(e),dt(t.options.zoom.onZoomComplete,[{chart:n}])}function aC(n,e){const t=n.originalScaleLimits[e];if(!t)return;const{min:i,max:l}=t;return Ct(l.options,l.scale)-Ct(i.options,i.scale)}function uC(n){const e=Jt(n);let t=1,i=1;return ht(n.scales,function(l){const s=aC(e,l.id);if(s){const o=Math.round(s/(l.max-l.min)*100)/100;t=Math.min(t,o),i=Math.max(i,o)}}),t<1?t:i}function ip(n,e,t,i){const{panDelta:l}=i,s=l[n.id]||0;il(s)===il(e)&&(e+=s);const o=ou[n.type]||ou.default;dt(o,[n,e,t])?l[n.id]=0:l[n.id]=e}function Zy(n,e,t,i="none"){const{x:l=0,y:s=0}=typeof e=="number"?{x:e,y:e}:e,o=Jt(n),{options:{pan:r,limits:a}}=o,{onPan:u}=r||{};cs(n,o);const f=l!==0,c=s!==0;ht(t||n.scales,function(d){d.isHorizontal()&&f?ip(d,l,a,o):!d.isHorizontal()&&c&&ip(d,s,a,o)}),n.update(i),dt(u,[{chart:n}])}function Gy(n){const e=Jt(n);cs(n,e);const t={};for(const i of Object.keys(n.scales)){const{min:l,max:s}=e.originalScaleLimits[i]||{min:{},max:{}};t[i]={min:l.scale,max:s.scale}}return t}function fC(n){const e=Gy(n);for(const t of Object.keys(n.scales)){const{min:i,max:l}=e[t];if(i!==void 0&&n.scales[t].min!==i||l!==void 0&&n.scales[t].max!==l)return!0}return!1}function Ln(n,e){const{handlers:t}=Jt(n),i=t[e];i&&i.target&&(i.target.removeEventListener(e,i),delete t[e])}function qs(n,e,t,i){const{handlers:l,options:s}=Jt(n),o=l[t];o&&o.target===e||(Ln(n,t),l[t]=r=>i(n,r,s),l[t].target=e,e.addEventListener(t,l[t]))}function cC(n,e){const t=Jt(n);t.dragStart&&(t.dragging=!0,t.dragEnd=e,n.update("none"))}function dC(n,e){const t=Jt(n);!t.dragStart||e.key!=="Escape"||(Ln(n,"keydown"),t.dragging=!1,t.dragStart=t.dragEnd=null,n.update("none"))}function Xy(n,e,t){const{onZoomStart:i,onZoomRejected:l}=t;if(i){const s=ki(e,n);if(dt(i,[{chart:n,event:e,point:s}])===!1)return dt(l,[{chart:n,event:e}]),!1}}function pC(n,e){const t=Jt(n),{pan:i,zoom:l={}}=t.options;if(e.button!==0||By(xs(i),e)||Gu(xs(l.drag),e))return dt(l.onZoomRejected,[{chart:n,event:e}]);Xy(n,e,l)!==!1&&(t.dragStart=e,qs(n,n.canvas,"mousemove",cC),qs(n,window.document,"keydown",dC))}function Qy(n,e,t,i){const l=sl(e,"x",n),s=sl(e,"y",n);let{top:o,left:r,right:a,bottom:u,width:f,height:c}=n.chartArea;const d=ki(t,n),m=ki(i,n);l&&(r=Math.min(d.x,m.x),a=Math.max(d.x,m.x)),s&&(o=Math.min(d.y,m.y),u=Math.max(d.y,m.y));const h=a-r,g=u-o;return{left:r,top:o,right:a,bottom:u,width:h,height:g,zoomX:l&&h?1+(f-h)/f:1,zoomY:s&&g?1+(c-g)/c:1}}function mC(n,e){const t=Jt(n);if(!t.dragStart)return;Ln(n,"mousemove");const{mode:i,onZoomComplete:l,drag:{threshold:s=0}}=t.options.zoom,o=Qy(n,i,t.dragStart,e),r=sl(i,"x",n)?o.width:0,a=sl(i,"y",n)?o.height:0,u=Math.sqrt(r*r+a*a);if(t.dragStart=t.dragEnd=null,u<=s){t.dragging=!1,n.update("none");return}Jy(n,{x:o.left,y:o.top},{x:o.right,y:o.bottom},"zoom"),setTimeout(()=>t.dragging=!1,500),dt(l,[{chart:n}])}function hC(n,e,t){if(Gu(xs(t.wheel),e)){dt(t.onZoomRejected,[{chart:n,event:e}]);return}if(Xy(n,e,t)!==!1&&(e.cancelable&&e.preventDefault(),e.deltaY!==void 0))return!0}function _C(n,e){const{handlers:{onZoomComplete:t},options:{zoom:i}}=Jt(n);if(!hC(n,e,i))return;const l=e.target.getBoundingClientRect(),s=1+(e.deltaY>=0?-i.wheel.speed:i.wheel.speed),o={x:s,y:s,focalPoint:{x:e.clientX-l.left,y:e.clientY-l.top}};Xu(n,o),t&&t()}function gC(n,e,t,i){t&&(Jt(n).handlers[e]=K$(()=>dt(t,[{chart:n}]),i))}function bC(n,e){const t=n.canvas,{wheel:i,drag:l,onZoomComplete:s}=e.zoom;i.enabled?(qs(n,t,"wheel",_C),gC(n,"onZoomComplete",s,250)):Ln(n,"wheel"),l.enabled?(qs(n,t,"mousedown",pC),qs(n,t.ownerDocument,"mouseup",mC)):(Ln(n,"mousedown"),Ln(n,"mousemove"),Ln(n,"mouseup"),Ln(n,"keydown"))}function yC(n){Ln(n,"mousedown"),Ln(n,"mousemove"),Ln(n,"mouseup"),Ln(n,"wheel"),Ln(n,"click"),Ln(n,"keydown")}function kC(n,e){return function(t,i){const{pan:l,zoom:s={}}=e.options;if(!l||!l.enabled)return!1;const o=i&&i.srcEvent;return o&&!e.panning&&i.pointerType==="mouse"&&(Gu(xs(l),o)||By(xs(s.drag),o))?(dt(l.onPanRejected,[{chart:n,event:i}]),!1):!0}}function vC(n,e){const t=Math.abs(n.clientX-e.clientX),i=Math.abs(n.clientY-e.clientY),l=t/i;let s,o;return l>.3&&l<1.7?s=o=!0:t>i?s=!0:o=!0,{x:s,y:o}}function xy(n,e,t){if(e.scale){const{center:i,pointers:l}=t,s=1/e.scale*t.scale,o=t.target.getBoundingClientRect(),r=vC(l[0],l[1]),a=e.options.zoom.mode,u={x:r.x&&sl(a,"x",n)?s:1,y:r.y&&sl(a,"y",n)?s:1,focalPoint:{x:i.x-o.left,y:i.y-o.top}};Xu(n,u),e.scale=t.scale}}function wC(n,e){e.options.zoom.pinch.enabled&&(e.scale=1)}function SC(n,e,t){e.scale&&(xy(n,e,t),e.scale=null,dt(e.options.zoom.onZoomComplete,[{chart:n}]))}function ek(n,e,t){const i=e.delta;i&&(e.panning=!0,Zy(n,{x:t.deltaX-i.x,y:t.deltaY-i.y},e.panScales),e.delta={x:t.deltaX,y:t.deltaY})}function TC(n,e,t){const{enabled:i,onPanStart:l,onPanRejected:s}=e.options.pan;if(!i)return;const o=t.target.getBoundingClientRect(),r={x:t.center.x-o.left,y:t.center.y-o.top};if(dt(l,[{chart:n,event:t,point:r}])===!1)return dt(s,[{chart:n,event:t}]);e.panScales=Wy(e.options.pan,r,n),e.delta={x:0,y:0},clearTimeout(e.panEndTimeout),ek(n,e,t)}function $C(n,e){e.delta=null,e.panning&&(e.panEndTimeout=setTimeout(()=>e.panning=!1,500),dt(e.options.pan.onPanComplete,[{chart:n}]))}const ru=new WeakMap;function CC(n,e){const t=Jt(n),i=n.canvas,{pan:l,zoom:s}=e,o=new Fs.Manager(i);s&&s.pinch.enabled&&(o.add(new Fs.Pinch),o.on("pinchstart",()=>wC(n,t)),o.on("pinch",r=>xy(n,t,r)),o.on("pinchend",r=>SC(n,t,r))),l&&l.enabled&&(o.add(new Fs.Pan({threshold:l.threshold,enable:kC(n,t)})),o.on("panstart",r=>TC(n,t,r)),o.on("panmove",r=>ek(n,t,r)),o.on("panend",()=>$C(n,t))),ru.set(n,o)}function OC(n){const e=ru.get(n);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),ru.delete(n))}var EC="2.0.1";function Yo(n,e,t){const i=t.zoom.drag,{dragStart:l,dragEnd:s}=Jt(n);if(i.drawTime!==e||!s)return;const{left:o,top:r,width:a,height:u}=Qy(n,t.zoom.mode,l,s),f=n.ctx;f.save(),f.beginPath(),f.fillStyle=i.backgroundColor||"rgba(225,225,225,0.3)",f.fillRect(o,r,a,u),i.borderWidth>0&&(f.lineWidth=i.borderWidth,f.strokeStyle=i.borderColor||"rgba(225,225,225)",f.strokeRect(o,r,a,u)),f.restore()}var MC={id:"zoom",version:EC,defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(n,e,t){const i=Jt(n);i.options=t,Object.prototype.hasOwnProperty.call(t.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(t.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(t.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),Fs&&CC(n,t),n.pan=(l,s,o)=>Zy(n,l,s,o),n.zoom=(l,s)=>Xu(n,l,s),n.zoomRect=(l,s,o)=>Jy(n,l,s,o),n.zoomScale=(l,s,o)=>oC(n,l,s,o),n.resetZoom=l=>rC(n,l),n.getZoomLevel=()=>uC(n),n.getInitialScaleBounds=()=>Gy(n),n.isZoomedOrPanned=()=>fC(n)},beforeEvent(n){const e=Jt(n);if(e.panning||e.dragging)return!1},beforeUpdate:function(n,e,t){const i=Jt(n);i.options=t,bC(n,t)},beforeDatasetsDraw(n,e,t){Yo(n,"beforeDatasetsDraw",t)},afterDatasetsDraw(n,e,t){Yo(n,"afterDatasetsDraw",t)},beforeDraw(n,e,t){Yo(n,"beforeDraw",t)},afterDraw(n,e,t){Yo(n,"afterDraw",t)},stop:function(n){yC(n),Fs&&OC(n),Z$(n)},panFunctions:ou,zoomFunctions:lu,zoomRectFunctions:su};function lp(n){let e,t,i;return{c(){e=b("div"),p(e,"class","chart-loader loader svelte-kfnurg")},m(l,s){v(l,e,s),i=!0},i(l){i||(l&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150},!0)),t.run(1))}),i=!0)},o(l){l&&(t||(t=ze(e,Mt,{duration:150},!1)),t.run(0)),i=!1},d(l){l&&k(e),l&&t&&t.end()}}}function sp(n){let e,t,i;return{c(){e=b("button"),e.textContent="Reset zoom",p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-chart-zoom svelte-kfnurg")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[4]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function DC(n){let e,t,i,l,s,o=n[1]==1?"log":"logs",r,a,u,f,c,d,m,h=n[2]&&lp(),g=n[3]&&sp(n);return{c(){e=b("div"),t=b("div"),i=Y("Found "),l=Y(n[1]),s=C(),r=Y(o),a=C(),h&&h.c(),u=C(),f=b("canvas"),c=C(),g&&g.c(),p(t,"class","total-logs entrance-right svelte-kfnurg"),Q(t,"hidden",n[2]),p(f,"class","chart-canvas svelte-kfnurg"),p(e,"class","chart-wrapper svelte-kfnurg"),Q(e,"loading",n[2])},m(_,y){v(_,e,y),w(e,t),w(t,i),w(t,l),w(t,s),w(t,r),w(e,a),h&&h.m(e,null),w(e,u),w(e,f),n[11](f),w(e,c),g&&g.m(e,null),d||(m=B(f,"dblclick",n[4]),d=!0)},p(_,[y]){y&2&&ue(l,_[1]),y&2&&o!==(o=_[1]==1?"log":"logs")&&ue(r,o),y&4&&Q(t,"hidden",_[2]),_[2]?h?y&4&&O(h,1):(h=lp(),h.c(),O(h,1),h.m(e,u)):h&&(re(),D(h,1,1,()=>{h=null}),ae()),_[3]?g?g.p(_,y):(g=sp(_),g.c(),g.m(e,null)):g&&(g.d(1),g=null),y&4&&Q(e,"loading",_[2])},i(_){O(h)},o(_){D(h)},d(_){_&&k(e),h&&h.d(),n[11](null),g&&g.d(),d=!1,m()}}}function IC(n,e,t){let{filter:i=""}=e,{zoom:l={}}=e,{presets:s=""}=e,o,r,a=[],u=0,f=!1,c=!1;async function d(){t(2,f=!0);const _=[s,z.normalizeLogsFilter(i)].filter(Boolean).join("&&");return me.logs.getStats({filter:_}).then(y=>{m(),y=z.toArray(y);for(let S of y)a.push({x:new Date(S.date),y:S.total}),t(1,u+=S.total)}).catch(y=>{y!=null&&y.isAbort||(m(),console.warn(y),me.error(y,!_||(y==null?void 0:y.status)!=400))}).finally(()=>{t(2,f=!1)})}function m(){t(10,a=[]),t(1,u=0)}function h(){r==null||r.resetZoom()}Yt(()=>(vi.register(Gi,ar,sr,nu,Qs,D$,q$),vi.register(MC),t(9,r=new vi(o,{type:"line",data:{datasets:[{label:"Total requests",data:a,borderColor:"#e34562",pointBackgroundColor:"#e34562",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{resizeDelay:250,maintainAspectRatio:!1,animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3"},border:{color:"#e4e9ec"},ticks:{precision:0,maxTicksLimit:4,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{color:_=>{var y;return(y=_.tick)!=null&&y.major?"#edf0f3":""}},color:"#e4e9ec",ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:_=>{var y;return(y=_.tick)!=null&&y.major?"#16161a":"#666f75"}}}},plugins:{legend:{display:!1},zoom:{enabled:!0,zoom:{mode:"x",pinch:{enabled:!0},drag:{enabled:!0,backgroundColor:"rgba(255, 99, 132, 0.2)",borderWidth:0,threshold:10},limits:{x:{minRange:1e8},y:{minRange:1e8}},onZoomComplete:({chart:_})=>{t(3,c=_.isZoomedOrPanned()),c?(t(5,l.min=z.formatToUTCDate(_.scales.x.min,"yyyy-MM-dd HH")+":00:00.000Z",l),t(5,l.max=z.formatToUTCDate(_.scales.x.max,"yyyy-MM-dd HH")+":59:59.999Z",l)):(l.min||l.max)&&t(5,l={})}}}}}})),()=>r==null?void 0:r.destroy()));function g(_){ie[_?"unshift":"push"](()=>{o=_,t(0,o)})}return n.$$set=_=>{"filter"in _&&t(6,i=_.filter),"zoom"in _&&t(5,l=_.zoom),"presets"in _&&t(7,s=_.presets)},n.$$.update=()=>{n.$$.dirty&192&&(typeof i<"u"||typeof s<"u")&&d(),n.$$.dirty&1536&&typeof a<"u"&&r&&(t(9,r.data.datasets[0].data=a,r),r.update())},[o,u,f,c,h,l,i,s,d,r,a,g]}class LC extends ye{constructor(e){super(),be(this,e,IC,DC,_e,{filter:6,zoom:5,presets:7,load:8})}get load(){return this.$$.ctx[8]}}function AC(n){let e,t,i;return{c(){e=b("div"),t=b("code"),p(t,"class","svelte-s3jkbp"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-s3jkbp")},m(l,s){v(l,e,s),w(e,t),t.innerHTML=n[1]},p(l,[s]){s&2&&(t.innerHTML=l[1]),s&1&&i!==(i="code-wrapper prism-light "+l[0]+" svelte-s3jkbp")&&p(e,"class",i)},i:te,o:te,d(l){l&&k(e)}}}function PC(n,e,t){let{content:i=""}=e,{language:l="javascript"}=e,{class:s=""}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Prism.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.highlight(a,Prism.languages[l]||Prism.languages.javascript,l)}return n.$$set=a=>{"content"in a&&t(2,i=a.content),"language"in a&&t(3,l=a.language),"class"in a&&t(0,s=a.class)},n.$$.update=()=>{n.$$.dirty&4&&typeof Prism<"u"&&i&&t(1,o=r(i))},[s,o,i,l]}class Qu extends ye{constructor(e){super(),be(this,e,PC,AC,_e,{content:2,language:3,class:0})}}function NC(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"tabindex","-1"),p(e,"role","button"),p(e,"class",t=n[3]?n[2]:n[1]),p(e,"aria-label","Copy to clipboard")},m(o,r){v(o,e,r),l||(s=[Me(i=He.call(null,e,n[3]?void 0:n[0])),B(e,"click",On(n[4]))],l=!0)},p(o,[r]){r&14&&t!==(t=o[3]?o[2]:o[1])&&p(e,"class",t),i&&Rt(i.update)&&r&9&&i.update.call(null,o[3]?void 0:o[0])},i:te,o:te,d(o){o&&k(e),l=!1,De(s)}}}function RC(n,e,t){let{value:i=""}=e,{tooltip:l="Copy"}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:o="ri-check-line txt-sm txt-success"}=e,{successDuration:r=500}=e,a;function u(){z.isEmpty(i)||(z.copyToClipboard(i),clearTimeout(a),t(3,a=setTimeout(()=>{clearTimeout(a),t(3,a=null)},r)))}return Yt(()=>()=>{a&&clearTimeout(a)}),n.$$set=f=>{"value"in f&&t(5,i=f.value),"tooltip"in f&&t(0,l=f.tooltip),"idleClasses"in f&&t(1,s=f.idleClasses),"successClasses"in f&&t(2,o=f.successClasses),"successDuration"in f&&t(6,r=f.successDuration)},[l,s,o,a,u,i,r]}class ai extends ye{constructor(e){super(),be(this,e,RC,NC,_e,{value:5,tooltip:0,idleClasses:1,successClasses:2,successDuration:6})}}function op(n,e,t){const i=n.slice();i[16]=e[t];const l=i[1].data[i[16]];i[17]=l;const s=z.isEmpty(i[17]);i[18]=s;const o=!i[18]&&i[17]!==null&&typeof i[17]=="object";return i[19]=o,i}function FC(n){let e,t,i,l,s,o,r,a=n[1].id+"",u,f,c,d,m,h,g,_,y,S,T,$,E,M,L,I,A,P,R,N,U,j,V,K,J;d=new ai({props:{value:n[1].id}}),S=new ly({props:{level:n[1].level}}),E=new ai({props:{value:n[1].level}}),R=new iy({props:{date:n[1].created}}),j=new ai({props:{value:n[1].created}});let ee=!n[4]&&rp(n),X=pe(n[5](n[1].data)),oe=[];for(let ke=0;keD(oe[ke],1,1,()=>{oe[ke]=null});return{c(){e=b("table"),t=b("tbody"),i=b("tr"),l=b("td"),l.textContent="id",s=C(),o=b("td"),r=b("span"),u=Y(a),f=C(),c=b("div"),H(d.$$.fragment),m=C(),h=b("tr"),g=b("td"),g.textContent="level",_=C(),y=b("td"),H(S.$$.fragment),T=C(),$=b("div"),H(E.$$.fragment),M=C(),L=b("tr"),I=b("td"),I.textContent="created",A=C(),P=b("td"),H(R.$$.fragment),N=C(),U=b("div"),H(j.$$.fragment),V=C(),ee&&ee.c(),K=C();for(let ke=0;ke{ee=null}),ae()):ee?(ee.p(ke,Ce),Ce&16&&O(ee,1)):(ee=rp(ke),ee.c(),O(ee,1),ee.m(t,K)),Ce&50){X=pe(ke[5](ke[1].data));let Je;for(Je=0;Je',p(e,"class","block txt-center")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function rp(n){let e,t,i,l,s,o,r;const a=[jC,HC],u=[];function f(c,d){return c[1].message?0:1}return s=f(n),o=u[s]=a[s](n),{c(){e=b("tr"),t=b("td"),t.textContent="message",i=C(),l=b("td"),o.c(),p(t,"class","min-width txt-hint txt-bold svelte-1c23bpt"),p(l,"class","svelte-1c23bpt"),p(e,"class","svelte-1c23bpt")},m(c,d){v(c,e,d),w(e,t),w(e,i),w(e,l),u[s].m(l,null),r=!0},p(c,d){let m=s;s=f(c),s===m?u[s].p(c,d):(re(),D(u[m],1,1,()=>{u[m]=null}),ae(),o=u[s],o?o.p(c,d):(o=u[s]=a[s](c),o.c()),O(o,1),o.m(l,null))},i(c){r||(O(o),r=!0)},o(c){D(o),r=!1},d(c){c&&k(e),u[s].d()}}}function HC(n){let e;return{c(){e=b("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function jC(n){let e,t=n[1].message+"",i,l,s,o,r;return o=new ai({props:{value:n[1].message}}),{c(){e=b("span"),i=Y(t),l=C(),s=b("div"),H(o.$$.fragment),p(e,"class","txt"),p(s,"class","copy-icon-wrapper svelte-1c23bpt")},m(a,u){v(a,e,u),w(e,i),v(a,l,u),v(a,s,u),F(o,s,null),r=!0},p(a,u){(!r||u&2)&&t!==(t=a[1].message+"")&&ue(i,t);const f={};u&2&&(f.value=a[1].message),o.$set(f)},i(a){r||(O(o.$$.fragment,a),r=!0)},o(a){D(o.$$.fragment,a),r=!1},d(a){a&&(k(e),k(l),k(s)),q(o)}}}function zC(n){let e,t=n[17]+"",i,l=n[4]&&n[16]=="execTime"?"ms":"",s;return{c(){e=b("span"),i=Y(t),s=Y(l),p(e,"class","txt")},m(o,r){v(o,e,r),w(e,i),w(e,s)},p(o,r){r&2&&t!==(t=o[17]+"")&&ue(i,t),r&18&&l!==(l=o[4]&&o[16]=="execTime"?"ms":"")&&ue(s,l)},i:te,o:te,d(o){o&&k(e)}}}function UC(n){let e,t;return e=new Qu({props:{content:n[17],language:"html"}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l&2&&(s.content=i[17]),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function VC(n){let e,t=n[17]+"",i;return{c(){e=b("span"),i=Y(t),p(e,"class","label label-danger log-error-label svelte-1c23bpt")},m(l,s){v(l,e,s),w(e,i)},p(l,s){s&2&&t!==(t=l[17]+"")&&ue(i,t)},i:te,o:te,d(l){l&&k(e)}}}function BC(n){let e,t;return e=new Qu({props:{content:JSON.stringify(n[17],null,2)}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l&2&&(s.content=JSON.stringify(i[17],null,2)),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function WC(n){let e;return{c(){e=b("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function ap(n){let e,t,i;return t=new ai({props:{value:n[17]}}),{c(){e=b("div"),H(t.$$.fragment),p(e,"class","copy-icon-wrapper svelte-1c23bpt")},m(l,s){v(l,e,s),F(t,e,null),i=!0},p(l,s){const o={};s&2&&(o.value=l[17]),t.$set(o)},i(l){i||(O(t.$$.fragment,l),i=!0)},o(l){D(t.$$.fragment,l),i=!1},d(l){l&&k(e),q(t)}}}function up(n){let e,t,i,l=n[16]+"",s,o,r,a,u,f,c,d;const m=[WC,BC,VC,UC,zC],h=[];function g(y,S){return y[18]?0:y[19]?1:y[16]=="error"?2:y[16]=="details"?3:4}a=g(n),u=h[a]=m[a](n);let _=!n[18]&&ap(n);return{c(){e=b("tr"),t=b("td"),i=Y("data."),s=Y(l),o=C(),r=b("td"),u.c(),f=C(),_&&_.c(),c=C(),p(t,"class","min-width txt-hint txt-bold svelte-1c23bpt"),Q(t,"v-align-top",n[19]),p(r,"class","svelte-1c23bpt"),p(e,"class","svelte-1c23bpt")},m(y,S){v(y,e,S),w(e,t),w(t,i),w(t,s),w(e,o),w(e,r),h[a].m(r,null),w(r,f),_&&_.m(r,null),w(e,c),d=!0},p(y,S){(!d||S&2)&&l!==(l=y[16]+"")&&ue(s,l),(!d||S&34)&&Q(t,"v-align-top",y[19]);let T=a;a=g(y),a===T?h[a].p(y,S):(re(),D(h[T],1,1,()=>{h[T]=null}),ae(),u=h[a],u?u.p(y,S):(u=h[a]=m[a](y),u.c()),O(u,1),u.m(r,f)),y[18]?_&&(re(),D(_,1,1,()=>{_=null}),ae()):_?(_.p(y,S),S&2&&O(_,1)):(_=ap(y),_.c(),O(_,1),_.m(r,null))},i(y){d||(O(u),O(_),d=!0)},o(y){D(u),D(_),d=!1},d(y){y&&k(e),h[a].d(),_&&_.d()}}}function YC(n){let e,t,i,l;const s=[qC,FC],o=[];function r(a,u){var f;return a[3]?0:(f=a[1])!=null&&f.id?1:-1}return~(e=r(n))&&(t=o[e]=s[e](n)),{c(){t&&t.c(),i=ge()},m(a,u){~e&&o[e].m(a,u),v(a,i,u),l=!0},p(a,u){let f=e;e=r(a),e===f?~e&&o[e].p(a,u):(t&&(re(),D(o[f],1,1,()=>{o[f]=null}),ae()),~e?(t=o[e],t?t.p(a,u):(t=o[e]=s[e](a),t.c()),O(t,1),t.m(i.parentNode,i)):t=null)},i(a){l||(O(t),l=!0)},o(a){D(t),l=!1},d(a){a&&k(i),~e&&o[e].d(a)}}}function KC(n){let e;return{c(){e=b("h4"),e.textContent="Request log"},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function JC(n){let e,t,i,l,s,o,r,a;return{c(){e=b("button"),e.innerHTML='Close',t=C(),i=b("button"),l=b("i"),s=C(),o=b("span"),o.textContent="Download as JSON",p(e,"type","button"),p(e,"class","btn btn-transparent"),p(l,"class","ri-download-line"),p(o,"class","txt"),p(i,"type","button"),p(i,"class","btn btn-primary"),i.disabled=n[3]},m(u,f){v(u,e,f),v(u,t,f),v(u,i,f),w(i,l),w(i,s),w(i,o),r||(a=[B(e,"click",n[9]),B(i,"click",n[10])],r=!0)},p(u,f){f&8&&(i.disabled=u[3])},d(u){u&&(k(e),k(t),k(i)),r=!1,De(a)}}}function ZC(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[JC],header:[KC],default:[YC]},$$scope:{ctx:n}};return e=new ln({props:i}),n[11](e),e.$on("hide",n[7]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&4194330&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[11](null),q(e,l)}}}const fp="log_view";function GC(n,e,t){let i;const l=gt();let s,o={},r=!1;function a(T){return f(T).then($=>{t(1,o=$),h()}),s==null?void 0:s.show()}function u(){return me.cancelRequest(fp),s==null?void 0:s.hide()}async function f(T){if(T&&typeof T!="string")return t(3,r=!1),T;t(3,r=!0);let $={};try{$=await me.logs.getOne(T,{requestKey:fp})}catch(E){E.isAbort||(u(),console.warn("resolveModel:",E),$i(`Unable to load log with id "${T}"`))}return t(3,r=!1),$}const c=["execTime","type","auth","authId","status","method","url","referer","remoteIP","userIP","userAgent","error","details"];function d(T){if(!T)return[];let $=[];for(let M of c)typeof T[M]<"u"&&$.push(M);const E=Object.keys(T);for(let M of E)$.includes(M)||$.push(M);return $}function m(){z.downloadJson(o,"log_"+o.created.replaceAll(/[-:\. ]/gi,"")+".json")}function h(){l("show",o)}function g(){l("hide",o),t(1,o={})}const _=()=>u(),y=()=>m();function S(T){ie[T?"unshift":"push"](()=>{s=T,t(2,s)})}return n.$$.update=()=>{var T;n.$$.dirty&2&&t(4,i=((T=o.data)==null?void 0:T.type)=="request")},[u,o,s,r,i,d,m,g,a,_,y,S]}class XC extends ye{constructor(e){super(),be(this,e,GC,ZC,_e,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function QC(n,e,t){const i=n.slice();return i[1]=e[t],i}function xC(n){let e;return{c(){e=b("code"),e.textContent=`${n[1].level}:${n[1].label}`,p(e,"class","txt-xs")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function e5(n){let e,t,i,l=pe(H0),s=[];for(let o=0;o{"class"in l&&t(0,i=l.class)},[i]}class tk extends ye{constructor(e){super(),be(this,e,t5,e5,_e,{class:0})}}function n5(n){let e,t,i,l,s,o,r,a,u,f,c;return t=new fe({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[l5,({uniqueId:d})=>({23:d}),({uniqueId:d})=>d?8388608:0]},$$scope:{ctx:n}}}),l=new fe({props:{class:"form-field",name:"logs.minLevel",$$slots:{default:[s5,({uniqueId:d})=>({23:d}),({uniqueId:d})=>d?8388608:0]},$$scope:{ctx:n}}}),o=new fe({props:{class:"form-field form-field-toggle",name:"logs.logIP",$$slots:{default:[o5,({uniqueId:d})=>({23:d}),({uniqueId:d})=>d?8388608:0]},$$scope:{ctx:n}}}),a=new fe({props:{class:"form-field form-field-toggle",name:"logs.logAuthId",$$slots:{default:[r5,({uniqueId:d})=>({23:d}),({uniqueId:d})=>d?8388608:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),H(t.$$.fragment),i=C(),H(l.$$.fragment),s=C(),H(o.$$.fragment),r=C(),H(a.$$.fragment),p(e,"id",n[6]),p(e,"class","grid"),p(e,"autocomplete","off")},m(d,m){v(d,e,m),F(t,e,null),w(e,i),F(l,e,null),w(e,s),F(o,e,null),w(e,r),F(a,e,null),u=!0,f||(c=B(e,"submit",tt(n[7])),f=!0)},p(d,m){const h={};m&25165826&&(h.$$scope={dirty:m,ctx:d}),t.$set(h);const g={};m&25165826&&(g.$$scope={dirty:m,ctx:d}),l.$set(g);const _={};m&25165826&&(_.$$scope={dirty:m,ctx:d}),o.$set(_);const y={};m&25165826&&(y.$$scope={dirty:m,ctx:d}),a.$set(y)},i(d){u||(O(t.$$.fragment,d),O(l.$$.fragment,d),O(o.$$.fragment,d),O(a.$$.fragment,d),u=!0)},o(d){D(t.$$.fragment,d),D(l.$$.fragment,d),D(o.$$.fragment,d),D(a.$$.fragment,d),u=!1},d(d){d&&k(e),q(t),q(l),q(o),q(a),f=!1,c()}}}function i5(n){let e;return{c(){e=b("div"),e.innerHTML='
',p(e,"class","block txt-center")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function l5(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("label"),t=Y("Max days retention"),l=C(),s=b("input"),r=C(),a=b("div"),a.innerHTML="Set to 0 to disable logs persistence.",p(e,"for",i=n[23]),p(s,"type","number"),p(s,"id",o=n[23]),s.required=!0,p(a,"class","help-block")},m(c,d){v(c,e,d),w(e,t),v(c,l,d),v(c,s,d),ce(s,n[1].logs.maxDays),v(c,r,d),v(c,a,d),u||(f=B(s,"input",n[11]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(s,"id",o),d&2&&_t(s.value)!==c[1].logs.maxDays&&ce(s,c[1].logs.maxDays)},d(c){c&&(k(e),k(l),k(s),k(r),k(a)),u=!1,f()}}}function s5(n){let e,t,i,l,s,o,r,a,u,f,c,d,m;return f=new tk({}),{c(){e=b("label"),t=Y("Min log level"),l=C(),s=b("input"),o=C(),r=b("div"),a=b("p"),a.textContent="Logs with level below the minimum will be ignored.",u=C(),H(f.$$.fragment),p(e,"for",i=n[23]),p(s,"type","number"),s.required=!0,p(s,"min","-100"),p(s,"max","100"),p(r,"class","help-block")},m(h,g){v(h,e,g),w(e,t),v(h,l,g),v(h,s,g),ce(s,n[1].logs.minLevel),v(h,o,g),v(h,r,g),w(r,a),w(r,u),F(f,r,null),c=!0,d||(m=B(s,"input",n[12]),d=!0)},p(h,g){(!c||g&8388608&&i!==(i=h[23]))&&p(e,"for",i),g&2&&_t(s.value)!==h[1].logs.minLevel&&ce(s,h[1].logs.minLevel)},i(h){c||(O(f.$$.fragment,h),c=!0)},o(h){D(f.$$.fragment,h),c=!1},d(h){h&&(k(e),k(l),k(s),k(o),k(r)),q(f),d=!1,m()}}}function o5(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable IP logging"),p(e,"type","checkbox"),p(e,"id",t=n[23]),p(l,"for",o=n[23])},m(u,f){v(u,e,f),e.checked=n[1].logs.logIP,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[13]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&p(e,"id",t),f&2&&(e.checked=u[1].logs.logIP),f&8388608&&o!==(o=u[23])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function r5(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable Auth Id logging"),p(e,"type","checkbox"),p(e,"id",t=n[23]),p(l,"for",o=n[23])},m(u,f){v(u,e,f),e.checked=n[1].logs.logAuthId,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[14]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&p(e,"id",t),f&2&&(e.checked=u[1].logs.logAuthId),f&8388608&&o!==(o=u[23])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function a5(n){let e,t,i,l;const s=[i5,n5],o=[];function r(a,u){return a[4]?0:1}return e=r(n),t=o[e]=s[e](n),{c(){t.c(),i=ge()},m(a,u){o[e].m(a,u),v(a,i,u),l=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),D(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=s[e](a),t.c()),O(t,1),t.m(i.parentNode,i))},i(a){l||(O(t),l=!0)},o(a){D(t),l=!1},d(a){a&&k(i),o[e].d(a)}}}function u5(n){let e;return{c(){e=b("h4"),e.textContent="Logs settings"},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function f5(n){let e,t,i,l,s,o,r,a;return{c(){e=b("button"),t=b("span"),t.textContent="Cancel",i=C(),l=b("button"),s=b("span"),s.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[3],p(s,"class","txt"),p(l,"type","submit"),p(l,"form",n[6]),p(l,"class","btn btn-expanded"),l.disabled=o=!n[5]||n[3],Q(l,"btn-loading",n[3])},m(u,f){v(u,e,f),w(e,t),v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"click",n[0]),r=!0)},p(u,f){f&8&&(e.disabled=u[3]),f&40&&o!==(o=!u[5]||u[3])&&(l.disabled=o),f&8&&Q(l,"btn-loading",u[3])},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function c5(n){let e,t,i={popup:!0,class:"superuser-panel",beforeHide:n[15],$$slots:{footer:[f5],header:[u5],default:[a5]},$$scope:{ctx:n}};return e=new ln({props:i}),n[16](e),e.$on("hide",n[17]),e.$on("show",n[18]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&8&&(o.beforeHide=l[15]),s&16777274&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[16](null),q(e,l)}}}function d5(n,e,t){let i,l;const s=gt(),o="logs_settings_"+z.randomString(3);let r,a=!1,u=!1,f={},c={};function d(){return h(),g(),r==null?void 0:r.show()}function m(){return r==null?void 0:r.hide()}function h(){Wt(),t(9,f={}),t(1,c=JSON.parse(JSON.stringify(f||{})))}async function g(){t(4,u=!0);try{const P=await me.settings.getAll()||{};y(P)}catch(P){me.error(P)}t(4,u=!1)}async function _(){if(l){t(3,a=!0);try{const P=await me.settings.update(z.filterRedactedProps(c));y(P),t(3,a=!1),m(),tn("Successfully saved logs settings."),s("save",P)}catch(P){t(3,a=!1),me.error(P)}}}function y(P={}){t(1,c={logs:(P==null?void 0:P.logs)||{}}),t(9,f=JSON.parse(JSON.stringify(c)))}function S(){c.logs.maxDays=_t(this.value),t(1,c)}function T(){c.logs.minLevel=_t(this.value),t(1,c)}function $(){c.logs.logIP=this.checked,t(1,c)}function E(){c.logs.logAuthId=this.checked,t(1,c)}const M=()=>!a;function L(P){ie[P?"unshift":"push"](()=>{r=P,t(2,r)})}function I(P){Pe.call(this,n,P)}function A(P){Pe.call(this,n,P)}return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(f)),n.$$.dirty&1026&&t(5,l=i!=JSON.stringify(c))},[m,c,r,a,u,l,o,_,d,f,i,S,T,$,E,M,L,I,A]}class p5 extends ye{constructor(e){super(),be(this,e,d5,c5,_e,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function m5(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Include requests by superusers"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"for",o=n[25])},m(u,f){v(u,e,f),e.checked=n[2],v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[12]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&33554432&&o!==(o=u[25])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function cp(n){let e,t,i;function l(o){n[14](o)}let s={filter:n[1],presets:n[6]};return n[5]!==void 0&&(s.zoom=n[5]),e=new LC({props:s}),ie.push(()=>ve(e,"zoom",l)),{c(){H(e.$$.fragment)},m(o,r){F(e,o,r),i=!0},p(o,r){const a={};r&2&&(a.filter=o[1]),r&64&&(a.presets=o[6]),!t&&r&32&&(t=!0,a.zoom=o[5],$e(()=>t=!1)),e.$set(a)},i(o){i||(O(e.$$.fragment,o),i=!0)},o(o){D(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function dp(n){let e,t,i,l;function s(a){n[15](a)}function o(a){n[16](a)}let r={presets:n[6]};return n[1]!==void 0&&(r.filter=n[1]),n[5]!==void 0&&(r.zoom=n[5]),e=new q3({props:r}),ie.push(()=>ve(e,"filter",s)),ie.push(()=>ve(e,"zoom",o)),e.$on("select",n[17]),{c(){H(e.$$.fragment)},m(a,u){F(e,a,u),l=!0},p(a,u){const f={};u&64&&(f.presets=a[6]),!t&&u&2&&(t=!0,f.filter=a[1],$e(()=>t=!1)),!i&&u&32&&(i=!0,f.zoom=a[5],$e(()=>i=!1)),e.$set(f)},i(a){l||(O(e.$$.fragment,a),l=!0)},o(a){D(e.$$.fragment,a),l=!1},d(a){q(e,a)}}}function h5(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S,T,$=n[4],E,M=n[4],L,I,A,P;u=new Au({}),u.$on("refresh",n[11]),h=new fe({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[m5,({uniqueId:U})=>({25:U}),({uniqueId:U})=>U?33554432:0]},$$scope:{ctx:n}}}),_=new Hr({props:{value:n[1],placeholder:"Search term or filter like `level > 0 && data.auth = 'guest'`",extraAutocompleteKeys:["level","message","data."]}}),_.$on("submit",n[13]),S=new tk({props:{class:"block txt-sm txt-hint m-t-xs m-b-base"}});let R=cp(n),N=dp(n);return{c(){e=b("div"),t=b("header"),i=b("nav"),l=b("div"),s=Y(n[7]),o=C(),r=b("button"),r.innerHTML='',a=C(),H(u.$$.fragment),f=C(),c=b("div"),d=C(),m=b("div"),H(h.$$.fragment),g=C(),H(_.$$.fragment),y=C(),H(S.$$.fragment),T=C(),R.c(),E=C(),N.c(),L=ge(),p(l,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(r,"type","button"),p(r,"aria-label","Logs settings"),p(r,"class","btn btn-transparent btn-circle"),p(c,"class","flex-fill"),p(m,"class","inline-flex"),p(t,"class","page-header"),p(e,"class","page-header-wrapper m-b-0")},m(U,j){v(U,e,j),w(e,t),w(t,i),w(i,l),w(l,s),w(t,o),w(t,r),w(t,a),F(u,t,null),w(t,f),w(t,c),w(t,d),w(t,m),F(h,m,null),w(e,g),F(_,e,null),w(e,y),F(S,e,null),w(e,T),R.m(e,null),v(U,E,j),N.m(U,j),v(U,L,j),I=!0,A||(P=[Me(He.call(null,r,{text:"Logs settings",position:"right"})),B(r,"click",n[10])],A=!0)},p(U,j){(!I||j&128)&&ue(s,U[7]);const V={};j&100663300&&(V.$$scope={dirty:j,ctx:U}),h.$set(V);const K={};j&2&&(K.value=U[1]),_.$set(K),j&16&&_e($,$=U[4])?(re(),D(R,1,1,te),ae(),R=cp(U),R.c(),O(R,1),R.m(e,null)):R.p(U,j),j&16&&_e(M,M=U[4])?(re(),D(N,1,1,te),ae(),N=dp(U),N.c(),O(N,1),N.m(L.parentNode,L)):N.p(U,j)},i(U){I||(O(u.$$.fragment,U),O(h.$$.fragment,U),O(_.$$.fragment,U),O(S.$$.fragment,U),O(R),O(N),I=!0)},o(U){D(u.$$.fragment,U),D(h.$$.fragment,U),D(_.$$.fragment,U),D(S.$$.fragment,U),D(R),D(N),I=!1},d(U){U&&(k(e),k(E),k(L)),q(u),q(h),q(_),q(S),R.d(U),N.d(U),A=!1,De(P)}}}function _5(n){let e,t,i,l,s,o;e=new di({props:{$$slots:{default:[h5]},$$scope:{ctx:n}}});let r={};i=new XC({props:r}),n[18](i),i.$on("show",n[19]),i.$on("hide",n[20]);let a={};return s=new p5({props:a}),n[21](s),s.$on("save",n[8]),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment),l=C(),H(s.$$.fragment)},m(u,f){F(e,u,f),v(u,t,f),F(i,u,f),v(u,l,f),F(s,u,f),o=!0},p(u,[f]){const c={};f&67109119&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const d={};i.$set(d);const m={};s.$set(m)},i(u){o||(O(e.$$.fragment,u),O(i.$$.fragment,u),O(s.$$.fragment,u),o=!0)},o(u){D(e.$$.fragment,u),D(i.$$.fragment,u),D(s.$$.fragment,u),o=!1},d(u){u&&(k(t),k(l)),q(e,u),n[18](null),q(i,u),n[21](null),q(s,u)}}}const Ko="logId",pp="superuserRequests",mp="superuserLogRequests";function g5(n,e,t){var N;let i,l,s;Qe(n,Lu,U=>t(22,l=U)),Qe(n,cn,U=>t(7,s=U)),Nn(cn,s="Logs",s);const o=new URLSearchParams(l);let r,a,u=1,f=o.get("filter")||"",c={},d=(o.get(pp)||((N=window.localStorage)==null?void 0:N.getItem(mp)))<<0,m=d;function h(){t(4,u++,u)}function g(U={}){let j={};j.filter=f||null,j[pp]=d<<0||null,z.replaceHashQueryParams(Object.assign(j,U))}const _=()=>a==null?void 0:a.show(),y=()=>h();function S(){d=this.checked,t(2,d)}const T=U=>t(1,f=U.detail);function $(U){c=U,t(5,c)}function E(U){f=U,t(1,f)}function M(U){c=U,t(5,c)}const L=U=>r==null?void 0:r.show(U==null?void 0:U.detail);function I(U){ie[U?"unshift":"push"](()=>{r=U,t(0,r)})}const A=U=>{var V;let j={};j[Ko]=((V=U.detail)==null?void 0:V.id)||null,z.replaceHashQueryParams(j)},P=()=>{let U={};U[Ko]=null,z.replaceHashQueryParams(U)};function R(U){ie[U?"unshift":"push"](()=>{a=U,t(3,a)})}return n.$$.update=()=>{var U;n.$$.dirty&1&&o.get(Ko)&&r&&r.show(o.get(Ko)),n.$$.dirty&4&&t(6,i=d?"":'data.auth!="_superusers"'),n.$$.dirty&516&&m!=d&&(t(9,m=d),(U=window.localStorage)==null||U.setItem(mp,d<<0),g()),n.$$.dirty&2&&typeof f<"u"&&g()},[r,f,d,a,u,c,i,s,h,m,_,y,S,T,$,E,M,L,I,A,P,R]}class b5 extends ye{constructor(e){super(),be(this,e,g5,_5,_e,{})}}function hp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function _p(n){n[18]=n[19].default}function gp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function bp(n){let e;return{c(){e=b("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function yp(n,e){let t,i=e[21]===Object.keys(e[6]).length,l,s,o=e[15].label+"",r,a,u,f,c=i&&bp();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ge(),c&&c.c(),l=C(),s=b("button"),r=Y(o),a=C(),p(s,"type","button"),p(s,"class","sidebar-item"),Q(s,"active",e[5]===e[14]),this.first=t},m(m,h){v(m,t,h),c&&c.m(m,h),v(m,l,h),v(m,s,h),w(s,r),w(s,a),u||(f=B(s,"click",d),u=!0)},p(m,h){e=m,h&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=bp(),c.c(),c.m(l.parentNode,l)):c&&(c.d(1),c=null),h&8&&o!==(o=e[15].label+"")&&ue(r,o),h&40&&Q(s,"active",e[5]===e[14])},d(m){m&&(k(t),k(l),k(s)),c&&c.d(m),u=!1,f()}}}function kp(n){let e,t,i,l={ctx:n,current:null,token:null,hasCatch:!1,pending:v5,then:k5,catch:y5,value:19,blocks:[,,,]};return mf(t=n[15].component,l),{c(){e=ge(),l.block.c()},m(s,o){v(s,e,o),l.block.m(s,l.anchor=o),l.mount=()=>e.parentNode,l.anchor=e,i=!0},p(s,o){n=s,l.ctx=n,o&8&&t!==(t=n[15].component)&&mf(t,l)||Ak(l,n,o)},i(s){i||(O(l.block),i=!0)},o(s){for(let o=0;o<3;o+=1){const r=l.blocks[o];D(r)}i=!1},d(s){s&&k(e),l.block.d(s),l.token=null,l=null}}}function y5(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function k5(n){_p(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){H(e.$$.fragment),t=C()},m(l,s){F(e,l,s),v(l,t,s),i=!0},p(l,s){_p(l);const o={};s&4&&(o.collection=l[2]),e.$set(o)},i(l){i||(O(e.$$.fragment,l),i=!0)},o(l){D(e.$$.fragment,l),i=!1},d(l){l&&k(t),q(e,l)}}}function v5(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function vp(n,e){let t,i,l,s=e[5]===e[14]&&kp(e);return{key:n,first:null,c(){t=ge(),s&&s.c(),i=ge(),this.first=t},m(o,r){v(o,t,r),s&&s.m(o,r),v(o,i,r),l=!0},p(o,r){e=o,e[5]===e[14]?s?(s.p(e,r),r&40&&O(s,1)):(s=kp(e),s.c(),O(s,1),s.m(i.parentNode,i)):s&&(re(),D(s,1,1,()=>{s=null}),ae())},i(o){l||(O(s),l=!0)},o(o){D(s),l=!1},d(o){o&&(k(t),k(i)),s&&s.d(o)}}}function w5(n){let e,t,i,l=[],s=new Map,o,r,a=[],u=new Map,f,c=pe(Object.entries(n[3]));const d=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[8]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function T5(n){let e,t,i={class:"docs-panel",$$slots:{footer:[S5],default:[w5]},$$scope:{ctx:n}};return e=new ln({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&4194348&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[10](null),q(e,l)}}}function $5(n,e,t){const i={list:{label:"List/Search",component:Ot(()=>import("./ListApiDocs-zvKNcpnx.js"),__vite__mapDeps([2,3,4]),import.meta.url)},view:{label:"View",component:Ot(()=>import("./ViewApiDocs-CrMm4zxc.js"),__vite__mapDeps([5,3]),import.meta.url)},create:{label:"Create",component:Ot(()=>import("./CreateApiDocs-Bwq-g1yE.js"),__vite__mapDeps([6,3]),import.meta.url)},update:{label:"Update",component:Ot(()=>import("./UpdateApiDocs-BR1hkPYP.js"),__vite__mapDeps([7,3]),import.meta.url)},delete:{label:"Delete",component:Ot(()=>import("./DeleteApiDocs-rj6WzdCt.js"),[],import.meta.url)},realtime:{label:"Realtime",component:Ot(()=>import("./RealtimeApiDocs-C93atddx.js"),[],import.meta.url)}},l={"list-auth-methods":{label:"List auth methods",component:Ot(()=>import("./AuthMethodsDocs-ftvbZDKw.js"),__vite__mapDeps([8,3]),import.meta.url)},refresh:{label:"Auth refresh",component:Ot(()=>import("./AuthRefreshDocs-iVy1WmRW.js"),__vite__mapDeps([9,3]),import.meta.url)},"auth-with-password":{label:"Auth with password",component:Ot(()=>import("./AuthWithPasswordDocs-ADzrUx-V.js"),__vite__mapDeps([10,3]),import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:Ot(()=>import("./AuthWithOAuth2Docs-ColozBPV.js"),__vite__mapDeps([11,3]),import.meta.url)},"auth-with-otp":{label:"Auth with OTP",component:Ot(()=>import("./AuthWithOtpDocs-CFGZEyRU.js"),[],import.meta.url)},verification:{label:"Verification",component:Ot(()=>import("./VerificationDocs-BZmrIhkV.js"),[],import.meta.url)},"password-reset":{label:"Password reset",component:Ot(()=>import("./PasswordResetDocs-14TDtoHE.js"),[],import.meta.url)},"email-change":{label:"Email change",component:Ot(()=>import("./EmailChangeDocs-DKtNxGwa.js"),[],import.meta.url)}};let s,o={},r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),s==null?void 0:s.show()}function f(){return s==null?void 0:s.hide()}function c(y){t(5,r=y)}const d=()=>f(),m=y=>c(y);function h(y){ie[y?"unshift":"push"](()=>{s=y,t(4,s)})}function g(y){Pe.call(this,n,y)}function _(y){Pe.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.type==="auth"?(t(3,a=Object.assign({},i,l)),o.passwordAuth.enabled||delete a["auth-with-password"],o.oauth2.enabled||delete a["auth-with-oauth2"],o.otp.enabled||delete a["auth-with-otp"]):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,s,r,i,u,d,m,h,g,_]}class C5 extends ye{constructor(e){super(),be(this,e,$5,T5,_e,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}const O5=n=>({active:n&1}),wp=n=>({active:n[0]});function Sp(n){let e,t,i;const l=n[15].default,s=Lt(l,n,n[14],null);return{c(){e=b("div"),s&&s.c(),p(e,"class","accordion-content")},m(o,r){v(o,e,r),s&&s.m(e,null),i=!0},p(o,r){s&&s.p&&(!i||r&16384)&&Pt(s,l,o,o[14],i?At(l,o[14],r,null):Nt(o[14]),null)},i(o){i||(O(s,o),o&&nt(()=>{i&&(t||(t=ze(e,wt,{delay:10,duration:150},!0)),t.run(1))}),i=!0)},o(o){D(s,o),o&&(t||(t=ze(e,wt,{delay:10,duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),s&&s.d(o),o&&t&&t.end()}}}function E5(n){let e,t,i,l,s,o,r;const a=n[15].header,u=Lt(a,n,n[14],wp);let f=n[0]&&Sp(n);return{c(){e=b("div"),t=b("button"),u&&u.c(),i=C(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),p(t,"aria-expanded",n[0]),Q(t,"interactive",n[3]),p(e,"class",l="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){v(c,e,d),w(e,t),u&&u.m(t,null),w(e,i),f&&f.m(e,null),n[22](e),s=!0,o||(r=[B(t,"click",tt(n[17])),B(t,"drop",tt(n[18])),B(t,"dragstart",n[19]),B(t,"dragenter",n[20]),B(t,"dragleave",n[21]),B(t,"dragover",tt(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!s||d&16385)&&Pt(u,a,c,c[14],s?At(a,c[14],d,O5):Nt(c[14]),wp),(!s||d&4)&&p(t,"draggable",c[2]),(!s||d&1)&&p(t,"aria-expanded",c[0]),(!s||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&O(f,1)):(f=Sp(c),f.c(),O(f,1),f.m(e,null)):f&&(re(),D(f,1,1,()=>{f=null}),ae()),(!s||d&130&&l!==(l="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",l),(!s||d&131)&&Q(e,"active",c[0])},i(c){s||(O(u,c),O(f),s=!0)},o(c){D(u,c),D(f),s=!1},d(c){c&&k(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,De(r)}}}function M5(n,e,t){let{$$slots:i={},$$scope:l}=e;const s=gt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,m=!1;function h(){return!!f}function g(){S(),t(0,f=!0),s("expand")}function _(){t(0,f=!1),clearTimeout(r),s("collapse")}function y(){s("toggle"),f?_():g()}function S(){if(d&&o.closest(".accordions")){const P=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const R of P)R.click()}}Yt(()=>()=>clearTimeout(r));function T(P){Pe.call(this,n,P)}const $=()=>c&&y(),E=P=>{u&&(t(7,m=!1),S(),s("drop",P))},M=P=>u&&s("dragstart",P),L=P=>{u&&(t(7,m=!0),s("dragenter",P))},I=P=>{u&&(t(7,m=!1),s("dragleave",P))};function A(P){ie[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,l=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,m,s,d,h,g,_,r,l,i,T,$,E,M,L,I,A]}class qi extends ye{constructor(e){super(),be(this,e,M5,E5,_e,{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 Tp(n,e,t){const i=n.slice();return i[25]=e[t],i}function $p(n,e,t){const i=n.slice();return i[25]=e[t],i}function Cp(n){let e,t,i=pe(n[3]),l=[];for(let s=0;s0&&Cp(n);return{c(){e=b("label"),t=Y("Subject"),l=C(),s=b("input"),r=C(),c&&c.c(),a=ge(),p(e,"for",i=n[24]),p(s,"type","text"),p(s,"id",o=n[24]),p(s,"spellcheck","false"),s.required=!0},m(m,h){v(m,e,h),w(e,t),v(m,l,h),v(m,s,h),ce(s,n[0].subject),v(m,r,h),c&&c.m(m,h),v(m,a,h),u||(f=B(s,"input",n[14]),u=!0)},p(m,h){var g;h&16777216&&i!==(i=m[24])&&p(e,"for",i),h&16777216&&o!==(o=m[24])&&p(s,"id",o),h&1&&s.value!==m[0].subject&&ce(s,m[0].subject),((g=m[3])==null?void 0:g.length)>0?c?c.p(m,h):(c=Cp(m),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(m){m&&(k(e),k(l),k(s),k(r),k(a)),c&&c.d(m),u=!1,f()}}}function I5(n){let e,t,i,l;return{c(){e=b("textarea"),p(e,"id",t=n[24]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(s,o){v(s,e,o),ce(e,n[0].body),i||(l=B(e,"input",n[17]),i=!0)},p(s,o){o&16777216&&t!==(t=s[24])&&p(e,"id",t),o&1&&ce(e,s[0].body)},i:te,o:te,d(s){s&&k(e),i=!1,l()}}}function L5(n){let e,t,i,l;function s(a){n[16](a)}var o=n[5];function r(a,u){let f={id:a[24],language:"html"};return a[0].body!==void 0&&(f.value=a[0].body),{props:f}}return o&&(e=jt(o,r(n)),ie.push(()=>ve(e,"value",s))),{c(){e&&H(e.$$.fragment),i=ge()},m(a,u){e&&F(e,a,u),v(a,i,u),l=!0},p(a,u){if(u&32&&o!==(o=a[5])){if(e){re();const f=e;D(f.$$.fragment,1,0,()=>{q(f,1)}),ae()}o?(e=jt(o,r(a)),ie.push(()=>ve(e,"value",s)),H(e.$$.fragment),O(e.$$.fragment,1),F(e,i.parentNode,i)):e=null}else if(o){const f={};u&16777216&&(f.id=a[24]),!t&&u&1&&(t=!0,f.value=a[0].body,$e(()=>t=!1)),e.$set(f)}},i(a){l||(e&&O(e.$$.fragment,a),l=!0)},o(a){e&&D(e.$$.fragment,a),l=!1},d(a){a&&k(i),e&&q(e,a)}}}function Ep(n){let e,t,i=pe(n[3]),l=[];for(let s=0;s0&&Ep(n);return{c(){e=b("label"),t=Y("Body (HTML)"),l=C(),o.c(),r=C(),m&&m.c(),a=ge(),p(e,"for",i=n[24])},m(g,_){v(g,e,_),w(e,t),v(g,l,_),c[s].m(g,_),v(g,r,_),m&&m.m(g,_),v(g,a,_),u=!0},p(g,_){var S;(!u||_&16777216&&i!==(i=g[24]))&&p(e,"for",i);let y=s;s=d(g),s===y?c[s].p(g,_):(re(),D(c[y],1,1,()=>{c[y]=null}),ae(),o=c[s],o?o.p(g,_):(o=c[s]=f[s](g),o.c()),O(o,1),o.m(r.parentNode,r)),((S=g[3])==null?void 0:S.length)>0?m?m.p(g,_):(m=Ep(g),m.c(),m.m(a.parentNode,a)):m&&(m.d(1),m=null)},i(g){u||(O(o),u=!0)},o(g){D(o),u=!1},d(g){g&&(k(e),k(l),k(r),k(a)),c[s].d(g),m&&m.d(g)}}}function P5(n){let e,t,i,l;return e=new fe({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[D5,({uniqueId:s})=>({24:s}),({uniqueId:s})=>s?16777216:0]},$$scope:{ctx:n}}}),i=new fe({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[A5,({uniqueId:s})=>({24:s}),({uniqueId:s})=>s?16777216:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment)},m(s,o){F(e,s,o),v(s,t,o),F(i,s,o),l=!0},p(s,o){const r={};o&2&&(r.name=s[1]+".subject"),o&1090519049&&(r.$$scope={dirty:o,ctx:s}),e.$set(r);const a={};o&2&&(a.name=s[1]+".body"),o&1090519145&&(a.$$scope={dirty:o,ctx:s}),i.$set(a)},i(s){l||(O(e.$$.fragment,s),O(i.$$.fragment,s),l=!0)},o(s){D(e.$$.fragment,s),D(i.$$.fragment,s),l=!1},d(s){s&&k(t),q(e,s),q(i,s)}}}function Dp(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){v(o,e,r),i=!0,l||(s=Me(He.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function N5(n){let e,t,i,l,s,o,r,a,u,f=n[7]&&Dp();return{c(){e=b("div"),t=b("i"),i=C(),l=b("span"),s=Y(n[2]),o=C(),r=b("div"),a=C(),f&&f.c(),u=ge(),p(t,"class","ri-draft-line"),p(l,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){v(c,e,d),w(e,t),w(e,i),w(e,l),w(l,s),v(c,o,d),v(c,r,d),v(c,a,d),f&&f.m(c,d),v(c,u,d)},p(c,d){d&4&&ue(s,c[2]),c[7]?f?d&128&&O(f,1):(f=Dp(),f.c(),O(f,1),f.m(u.parentNode,u)):f&&(re(),D(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(o),k(r),k(a),k(u)),f&&f.d(c)}}}function R5(n){let e,t;const i=[n[9]];let l={$$slots:{header:[N5],default:[P5]},$$scope:{ctx:n}};for(let s=0;st(13,o=N));let{key:r}=e,{title:a}=e,{config:u={}}=e,{placeholders:f=[]}=e,c,d=Ip,m=!1;function h(){c==null||c.expand()}function g(){c==null||c.collapse()}function _(){c==null||c.collapseSiblings()}async function y(){d||m||(t(6,m=!0),t(5,d=(await Ot(async()=>{const{default:N}=await import("./CodeEditor-D4uJdbuC.js");return{default:N}},__vite__mapDeps([12,1]),import.meta.url)).default),Ip=d,t(6,m=!1))}function S(N){N=N.replace("*",""),z.copyToClipboard(N),Ys(`Copied ${N} to clipboard`,2e3)}y();function T(){u.subject=this.value,t(0,u)}const $=N=>S("{"+N+"}");function E(N){n.$$.not_equal(u.body,N)&&(u.body=N,t(0,u))}function M(){u.body=this.value,t(0,u)}const L=N=>S("{"+N+"}");function I(N){ie[N?"unshift":"push"](()=>{c=N,t(4,c)})}function A(N){Pe.call(this,n,N)}function P(N){Pe.call(this,n,N)}function R(N){Pe.call(this,n,N)}return n.$$set=N=>{e=je(je({},e),Ut(N)),t(9,s=lt(e,l)),"key"in N&&t(1,r=N.key),"title"in N&&t(2,a=N.title),"config"in N&&t(0,u=N.config),"placeholders"in N&&t(3,f=N.placeholders)},n.$$.update=()=>{n.$$.dirty&8194&&t(7,i=!z.isEmpty(z.getNestedVal(o,r))),n.$$.dirty&3&&(u.enabled||fi(r))},[u,r,a,f,c,d,m,i,S,s,h,g,_,o,T,$,E,M,L,I,A,P,R]}class q5 extends ye{constructor(e){super(),be(this,e,F5,R5,_e,{key:1,title:2,config:0,placeholders:3,expand:10,collapse:11,collapseSiblings:12})}get expand(){return this.$$.ctx[10]}get collapse(){return this.$$.ctx[11]}get collapseSiblings(){return this.$$.ctx[12]}}function H5(n){let e,t,i,l,s,o,r,a,u,f,c,d;return{c(){e=b("label"),t=Y(n[3]),i=Y(" duration (in seconds)"),s=C(),o=b("input"),a=C(),u=b("div"),f=b("span"),f.textContent="Invalidate all previously issued tokens",p(e,"for",l=n[6]),p(o,"type","number"),p(o,"id",r=n[6]),o.required=!0,p(o,"placeholder","No change"),p(f,"class","link-primary"),Q(f,"txt-success",!!n[1]),p(u,"class","help-block")},m(m,h){v(m,e,h),w(e,t),w(e,i),v(m,s,h),v(m,o,h),ce(o,n[0]),v(m,a,h),v(m,u,h),w(u,f),c||(d=[B(o,"input",n[4]),B(f,"click",n[5])],c=!0)},p(m,h){h&8&&ue(t,m[3]),h&64&&l!==(l=m[6])&&p(e,"for",l),h&64&&r!==(r=m[6])&&p(o,"id",r),h&1&&_t(o.value)!==m[0]&&ce(o,m[0]),h&2&&Q(f,"txt-success",!!m[1])},d(m){m&&(k(e),k(s),k(o),k(a),k(u)),c=!1,De(d)}}}function j5(n){let e,t;return e=new fe({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[H5,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&4&&(s.name=i[2]+".duration"),l&203&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function z5(n,e,t){let{key:i}=e,{label:l}=e,{duration:s}=e,{secret:o}=e;function r(){s=_t(this.value),t(0,s)}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,l=u.label),"duration"in u&&t(0,s=u.duration),"secret"in u&&t(1,o=u.secret)},[s,o,i,l,r,a]}class U5 extends ye{constructor(e){super(),be(this,e,z5,j5,_e,{key:2,label:3,duration:0,secret:1})}}function Lp(n,e,t){const i=n.slice();return i[8]=e[t],i[9]=e,i[10]=t,i}function Ap(n,e){let t,i,l,s,o,r;function a(c){e[5](c,e[8])}function u(c){e[6](c,e[8])}let f={key:e[8].key,label:e[8].label};return e[0][e[8].key].duration!==void 0&&(f.duration=e[0][e[8].key].duration),e[0][e[8].key].secret!==void 0&&(f.secret=e[0][e[8].key].secret),i=new U5({props:f}),ie.push(()=>ve(i,"duration",a)),ie.push(()=>ve(i,"secret",u)),{key:n,first:null,c(){t=b("div"),H(i.$$.fragment),o=C(),p(t,"class","col-sm-6"),this.first=t},m(c,d){v(c,t,d),F(i,t,null),w(t,o),r=!0},p(c,d){e=c;const m={};d&2&&(m.key=e[8].key),d&2&&(m.label=e[8].label),!l&&d&3&&(l=!0,m.duration=e[0][e[8].key].duration,$e(()=>l=!1)),!s&&d&3&&(s=!0,m.secret=e[0][e[8].key].secret,$e(()=>s=!1)),i.$set(m)},i(c){r||(O(i.$$.fragment,c),r=!0)},o(c){D(i.$$.fragment,c),r=!1},d(c){c&&k(t),q(i)}}}function V5(n){let e,t=[],i=new Map,l,s=pe(n[1]);const o=r=>r[8].key;for(let r=0;r{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function B5(n){let e,t,i,l,s,o=n[2]&&Pp();return{c(){e=b("div"),e.innerHTML=' Tokens options (invalidate, duration)',t=C(),i=b("div"),l=C(),o&&o.c(),s=ge(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(r,a){v(r,e,a),v(r,t,a),v(r,i,a),v(r,l,a),o&&o.m(r,a),v(r,s,a)},p(r,a){r[2]?o?a&4&&O(o,1):(o=Pp(),o.c(),O(o,1),o.m(s.parentNode,s)):o&&(re(),D(o,1,1,()=>{o=null}),ae())},d(r){r&&(k(e),k(t),k(i),k(l),k(s)),o&&o.d(r)}}}function W5(n){let e,t;return e=new qi({props:{single:!0,$$slots:{header:[B5],default:[V5]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2055&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Y5(n,e,t){let i,l,s;Qe(n,Sn,c=>t(4,s=c));let{collection:o}=e,r=[];function a(c){if(z.isEmpty(c))return!1;for(let d of r)if(c[d.key])return!0;return!1}function u(c,d){n.$$.not_equal(o[d.key].duration,c)&&(o[d.key].duration=c,t(0,o))}function f(c,d){n.$$.not_equal(o[d.key].secret,c)&&(o[d.key].secret=c,t(0,o))}return n.$$set=c=>{"collection"in c&&t(0,o=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=(o==null?void 0:o.system)&&(o==null?void 0:o.name)==="_superusers"),n.$$.dirty&8&&t(1,r=i?[{key:"authToken",label:"Auth"},{key:"passwordResetToken",label:"Password reset"},{key:"fileToken",label:"Protected file access"}]:[{key:"authToken",label:"Auth"},{key:"verificationToken",label:"Email verification"},{key:"passwordResetToken",label:"Password reset"},{key:"emailChangeToken",label:"Email change"},{key:"fileToken",label:"Protected file access"}]),n.$$.dirty&16&&t(2,l=a(s))},[o,r,l,i,s,u,f]}class K5 extends ye{constructor(e){super(),be(this,e,Y5,W5,_e,{collection:0})}}const J5=n=>({isSuperuserOnly:n&2048}),Np=n=>({isSuperuserOnly:n[11]}),Z5=n=>({isSuperuserOnly:n&2048}),Rp=n=>({isSuperuserOnly:n[11]}),G5=n=>({isSuperuserOnly:n&2048}),Fp=n=>({isSuperuserOnly:n[11]});function X5(n){let e,t;return e=new fe({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[11]?"disabled":""),name:n[3],$$slots:{default:[x5,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l&2064&&(s.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[11]?"disabled":"")),l&8&&(s.name=i[3]),l&2362855&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Q5(n){let e;return{c(){e=b("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function qp(n){let e,t,i,l,s,o;return{c(){e=b("button"),t=b("i"),i=C(),l=b("span"),l.textContent="Set Superusers only",p(t,"class","ri-lock-line"),p(t,"aria-hidden","true"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-dnx4io"),p(e,"aria-hidden",n[10]),e.disabled=n[10]},m(r,a){v(r,e,a),w(e,t),w(e,i),w(e,l),s||(o=B(e,"click",n[13]),s=!0)},p(r,a){a&1024&&p(e,"aria-hidden",r[10]),a&1024&&(e.disabled=r[10])},d(r){r&&k(e),s=!1,o()}}}function Hp(n){let e,t,i,l,s,o,r,a=!n[10]&&jp();return{c(){e=b("button"),a&&a.c(),t=C(),i=b("div"),i.innerHTML='',p(i,"class","icon svelte-dnx4io"),p(i,"aria-hidden","true"),p(e,"type","button"),p(e,"class","unlock-overlay svelte-dnx4io"),e.disabled=n[10],p(e,"aria-hidden",n[10])},m(u,f){v(u,e,f),a&&a.m(e,null),w(e,t),w(e,i),s=!0,o||(r=B(e,"click",n[12]),o=!0)},p(u,f){u[10]?a&&(a.d(1),a=null):a||(a=jp(),a.c(),a.m(e,t)),(!s||f&1024)&&(e.disabled=u[10]),(!s||f&1024)&&p(e,"aria-hidden",u[10])},i(u){s||(u&&nt(()=>{s&&(l||(l=ze(e,Mt,{duration:150,start:.98},!0)),l.run(1))}),s=!0)},o(u){u&&(l||(l=ze(e,Mt,{duration:150,start:.98},!1)),l.run(0)),s=!1},d(u){u&&k(e),a&&a.d(),u&&l&&l.end(),o=!1,r()}}}function jp(n){let e;return{c(){e=b("small"),e.textContent="Unlock and set custom rule",p(e,"class","txt svelte-dnx4io")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function x5(n){let e,t,i,l,s,o,r=n[11]?"- Superusers only":"",a,u,f,c,d,m,h,g,_,y,S,T,$,E;const M=n[15].beforeLabel,L=Lt(M,n,n[18],Fp),I=n[15].afterLabel,A=Lt(I,n,n[18],Rp);let P=n[5]&&!n[11]&&qp(n);function R(J){n[17](J)}var N=n[8];function U(J,ee){let X={id:J[21],baseCollection:J[1],disabled:J[10],placeholder:J[11]?"":J[6]};return J[0]!==void 0&&(X.value=J[0]),{props:X}}N&&(m=jt(N,U(n)),n[16](m),ie.push(()=>ve(m,"value",R)));let j=n[5]&&n[11]&&Hp(n);const V=n[15].default,K=Lt(V,n,n[18],Np);return{c(){e=b("div"),t=b("label"),L&&L.c(),i=C(),l=b("span"),s=Y(n[2]),o=C(),a=Y(r),u=C(),A&&A.c(),f=C(),P&&P.c(),d=C(),m&&H(m.$$.fragment),g=C(),j&&j.c(),y=C(),S=b("div"),K&&K.c(),p(l,"class","txt"),Q(l,"txt-hint",n[11]),p(t,"for",c=n[21]),p(e,"class","input-wrapper svelte-dnx4io"),p(S,"class","help-block")},m(J,ee){v(J,e,ee),w(e,t),L&&L.m(t,null),w(t,i),w(t,l),w(l,s),w(l,o),w(l,a),w(t,u),A&&A.m(t,null),w(t,f),P&&P.m(t,null),w(e,d),m&&F(m,e,null),w(e,g),j&&j.m(e,null),v(J,y,ee),v(J,S,ee),K&&K.m(S,null),T=!0,$||(E=Me(_=He.call(null,e,n[1].system?{text:"System collection rule cannot be changed.",position:"top"}:void 0)),$=!0)},p(J,ee){if(L&&L.p&&(!T||ee&264192)&&Pt(L,M,J,J[18],T?At(M,J[18],ee,G5):Nt(J[18]),Fp),(!T||ee&4)&&ue(s,J[2]),(!T||ee&2048)&&r!==(r=J[11]?"- Superusers only":"")&&ue(a,r),(!T||ee&2048)&&Q(l,"txt-hint",J[11]),A&&A.p&&(!T||ee&264192)&&Pt(A,I,J,J[18],T?At(I,J[18],ee,Z5):Nt(J[18]),Rp),J[5]&&!J[11]?P?P.p(J,ee):(P=qp(J),P.c(),P.m(t,null)):P&&(P.d(1),P=null),(!T||ee&2097152&&c!==(c=J[21]))&&p(t,"for",c),ee&256&&N!==(N=J[8])){if(m){re();const X=m;D(X.$$.fragment,1,0,()=>{q(X,1)}),ae()}N?(m=jt(N,U(J)),J[16](m),ie.push(()=>ve(m,"value",R)),H(m.$$.fragment),O(m.$$.fragment,1),F(m,e,g)):m=null}else if(N){const X={};ee&2097152&&(X.id=J[21]),ee&2&&(X.baseCollection=J[1]),ee&1024&&(X.disabled=J[10]),ee&2112&&(X.placeholder=J[11]?"":J[6]),!h&&ee&1&&(h=!0,X.value=J[0],$e(()=>h=!1)),m.$set(X)}J[5]&&J[11]?j?(j.p(J,ee),ee&2080&&O(j,1)):(j=Hp(J),j.c(),O(j,1),j.m(e,null)):j&&(re(),D(j,1,1,()=>{j=null}),ae()),_&&Rt(_.update)&&ee&2&&_.update.call(null,J[1].system?{text:"System collection rule cannot be changed.",position:"top"}:void 0),K&&K.p&&(!T||ee&264192)&&Pt(K,V,J,J[18],T?At(V,J[18],ee,J5):Nt(J[18]),Np)},i(J){T||(O(L,J),O(A,J),m&&O(m.$$.fragment,J),O(j),O(K,J),T=!0)},o(J){D(L,J),D(A,J),m&&D(m.$$.fragment,J),D(j),D(K,J),T=!1},d(J){J&&(k(e),k(y),k(S)),L&&L.d(J),A&&A.d(J),P&&P.d(),n[16](null),m&&q(m),j&&j.d(),K&&K.d(J),$=!1,E()}}}function e6(n){let e,t,i,l;const s=[Q5,X5],o=[];function r(a,u){return a[9]?0:1}return e=r(n),t=o[e]=s[e](n),{c(){t.c(),i=ge()},m(a,u){o[e].m(a,u),v(a,i,u),l=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),D(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=s[e](a),t.c()),O(t,1),t.m(i.parentNode,i))},i(a){l||(O(t),l=!0)},o(a){D(t),l=!1},d(a){a&&k(i),o[e].d(a)}}}let zp;function t6(n,e,t){let i,l,{$$slots:s={},$$scope:o}=e,{collection:r=null}=e,{rule:a=null}=e,{label:u="Rule"}=e,{formKey:f="rule"}=e,{required:c=!1}=e,{disabled:d=!1}=e,{superuserToggle:m=!0}=e,{placeholder:h="Leave empty to grant everyone access..."}=e,g=null,_=null,y=zp,S=!1;T();async function T(){y||S||(t(9,S=!0),t(8,y=(await Ot(async()=>{const{default:I}=await import("./FilterAutocompleteInput-BVhhliH4.js");return{default:I}},__vite__mapDeps([0,1]),import.meta.url)).default),zp=y,t(9,S=!1))}async function $(){t(0,a=_||""),await fn(),g==null||g.focus()}async function E(){_=a,t(0,a=null)}function M(I){ie[I?"unshift":"push"](()=>{g=I,t(7,g)})}function L(I){a=I,t(0,a)}return n.$$set=I=>{"collection"in I&&t(1,r=I.collection),"rule"in I&&t(0,a=I.rule),"label"in I&&t(2,u=I.label),"formKey"in I&&t(3,f=I.formKey),"required"in I&&t(4,c=I.required),"disabled"in I&&t(14,d=I.disabled),"superuserToggle"in I&&t(5,m=I.superuserToggle),"placeholder"in I&&t(6,h=I.placeholder),"$$scope"in I&&t(18,o=I.$$scope)},n.$$.update=()=>{n.$$.dirty&33&&t(11,i=m&&a===null),n.$$.dirty&16386&&t(10,l=d||r.system)},[a,r,u,f,c,m,h,g,y,S,l,i,$,E,d,s,M,L,o]}class tl extends ye{constructor(e){super(),be(this,e,t6,e6,_e,{collection:1,rule:0,label:2,formKey:3,required:4,disabled:14,superuserToggle:5,placeholder:6})}}function n6(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=b("span"),s.textContent="Enable",p(e,"type","checkbox"),p(e,"id",t=n[5]),p(s,"class","txt"),p(l,"for",o=n[5])},m(u,f){v(u,e,f),e.checked=n[0].mfa.enabled,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[3]),r=!0)},p(u,f){f&32&&t!==(t=u[5])&&p(e,"id",t),f&1&&(e.checked=u[0].mfa.enabled),f&32&&o!==(o=u[5])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function i6(n){let e,t,i,l,s;return{c(){e=b("p"),e.textContent="This optional rule could be used to enable/disable MFA per account basis.",t=C(),i=b("p"),i.innerHTML=`For example, to require MFA only for accounts with non-empty email you can set it to + `);for(let s=0;s0&&Ep(n);return{c(){e=b("label"),t=Y("Body (HTML)"),l=C(),o.c(),r=C(),m&&m.c(),a=ge(),p(e,"for",i=n[24])},m(g,_){v(g,e,_),w(e,t),v(g,l,_),c[s].m(g,_),v(g,r,_),m&&m.m(g,_),v(g,a,_),u=!0},p(g,_){var S;(!u||_&16777216&&i!==(i=g[24]))&&p(e,"for",i);let y=s;s=d(g),s===y?c[s].p(g,_):(re(),D(c[y],1,1,()=>{c[y]=null}),ae(),o=c[s],o?o.p(g,_):(o=c[s]=f[s](g),o.c()),O(o,1),o.m(r.parentNode,r)),((S=g[3])==null?void 0:S.length)>0?m?m.p(g,_):(m=Ep(g),m.c(),m.m(a.parentNode,a)):m&&(m.d(1),m=null)},i(g){u||(O(o),u=!0)},o(g){D(o),u=!1},d(g){g&&(k(e),k(l),k(r),k(a)),c[s].d(g),m&&m.d(g)}}}function P5(n){let e,t,i,l;return e=new fe({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[D5,({uniqueId:s})=>({24:s}),({uniqueId:s})=>s?16777216:0]},$$scope:{ctx:n}}}),i=new fe({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[A5,({uniqueId:s})=>({24:s}),({uniqueId:s})=>s?16777216:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment)},m(s,o){F(e,s,o),v(s,t,o),F(i,s,o),l=!0},p(s,o){const r={};o&2&&(r.name=s[1]+".subject"),o&1090519049&&(r.$$scope={dirty:o,ctx:s}),e.$set(r);const a={};o&2&&(a.name=s[1]+".body"),o&1090519145&&(a.$$scope={dirty:o,ctx:s}),i.$set(a)},i(s){l||(O(e.$$.fragment,s),O(i.$$.fragment,s),l=!0)},o(s){D(e.$$.fragment,s),D(i.$$.fragment,s),l=!1},d(s){s&&k(t),q(e,s),q(i,s)}}}function Dp(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){v(o,e,r),i=!0,l||(s=Me(He.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function N5(n){let e,t,i,l,s,o,r,a,u,f=n[7]&&Dp();return{c(){e=b("div"),t=b("i"),i=C(),l=b("span"),s=Y(n[2]),o=C(),r=b("div"),a=C(),f&&f.c(),u=ge(),p(t,"class","ri-draft-line"),p(l,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){v(c,e,d),w(e,t),w(e,i),w(e,l),w(l,s),v(c,o,d),v(c,r,d),v(c,a,d),f&&f.m(c,d),v(c,u,d)},p(c,d){d&4&&ue(s,c[2]),c[7]?f?d&128&&O(f,1):(f=Dp(),f.c(),O(f,1),f.m(u.parentNode,u)):f&&(re(),D(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(o),k(r),k(a),k(u)),f&&f.d(c)}}}function R5(n){let e,t;const i=[n[9]];let l={$$slots:{header:[N5],default:[P5]},$$scope:{ctx:n}};for(let s=0;st(13,o=N));let{key:r}=e,{title:a}=e,{config:u={}}=e,{placeholders:f=[]}=e,c,d=Ip,m=!1;function h(){c==null||c.expand()}function g(){c==null||c.collapse()}function _(){c==null||c.collapseSiblings()}async function y(){d||m||(t(6,m=!0),t(5,d=(await Ot(async()=>{const{default:N}=await import("./CodeEditor-wsjRtoGt.js");return{default:N}},__vite__mapDeps([12,1]),import.meta.url)).default),Ip=d,t(6,m=!1))}function S(N){N=N.replace("*",""),z.copyToClipboard(N),Ys(`Copied ${N} to clipboard`,2e3)}y();function T(){u.subject=this.value,t(0,u)}const $=N=>S("{"+N+"}");function E(N){n.$$.not_equal(u.body,N)&&(u.body=N,t(0,u))}function M(){u.body=this.value,t(0,u)}const L=N=>S("{"+N+"}");function I(N){ie[N?"unshift":"push"](()=>{c=N,t(4,c)})}function A(N){Pe.call(this,n,N)}function P(N){Pe.call(this,n,N)}function R(N){Pe.call(this,n,N)}return n.$$set=N=>{e=je(je({},e),Ut(N)),t(9,s=lt(e,l)),"key"in N&&t(1,r=N.key),"title"in N&&t(2,a=N.title),"config"in N&&t(0,u=N.config),"placeholders"in N&&t(3,f=N.placeholders)},n.$$.update=()=>{n.$$.dirty&8194&&t(7,i=!z.isEmpty(z.getNestedVal(o,r))),n.$$.dirty&3&&(u.enabled||fi(r))},[u,r,a,f,c,d,m,i,S,s,h,g,_,o,T,$,E,M,L,I,A,P,R]}class q5 extends ye{constructor(e){super(),be(this,e,F5,R5,_e,{key:1,title:2,config:0,placeholders:3,expand:10,collapse:11,collapseSiblings:12})}get expand(){return this.$$.ctx[10]}get collapse(){return this.$$.ctx[11]}get collapseSiblings(){return this.$$.ctx[12]}}function H5(n){let e,t,i,l,s,o,r,a,u,f,c,d;return{c(){e=b("label"),t=Y(n[3]),i=Y(" duration (in seconds)"),s=C(),o=b("input"),a=C(),u=b("div"),f=b("span"),f.textContent="Invalidate all previously issued tokens",p(e,"for",l=n[6]),p(o,"type","number"),p(o,"id",r=n[6]),o.required=!0,p(o,"placeholder","No change"),p(f,"class","link-primary"),Q(f,"txt-success",!!n[1]),p(u,"class","help-block")},m(m,h){v(m,e,h),w(e,t),w(e,i),v(m,s,h),v(m,o,h),ce(o,n[0]),v(m,a,h),v(m,u,h),w(u,f),c||(d=[B(o,"input",n[4]),B(f,"click",n[5])],c=!0)},p(m,h){h&8&&ue(t,m[3]),h&64&&l!==(l=m[6])&&p(e,"for",l),h&64&&r!==(r=m[6])&&p(o,"id",r),h&1&&_t(o.value)!==m[0]&&ce(o,m[0]),h&2&&Q(f,"txt-success",!!m[1])},d(m){m&&(k(e),k(s),k(o),k(a),k(u)),c=!1,De(d)}}}function j5(n){let e,t;return e=new fe({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[H5,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&4&&(s.name=i[2]+".duration"),l&203&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function z5(n,e,t){let{key:i}=e,{label:l}=e,{duration:s}=e,{secret:o}=e;function r(){s=_t(this.value),t(0,s)}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,l=u.label),"duration"in u&&t(0,s=u.duration),"secret"in u&&t(1,o=u.secret)},[s,o,i,l,r,a]}class U5 extends ye{constructor(e){super(),be(this,e,z5,j5,_e,{key:2,label:3,duration:0,secret:1})}}function Lp(n,e,t){const i=n.slice();return i[8]=e[t],i[9]=e,i[10]=t,i}function Ap(n,e){let t,i,l,s,o,r;function a(c){e[5](c,e[8])}function u(c){e[6](c,e[8])}let f={key:e[8].key,label:e[8].label};return e[0][e[8].key].duration!==void 0&&(f.duration=e[0][e[8].key].duration),e[0][e[8].key].secret!==void 0&&(f.secret=e[0][e[8].key].secret),i=new U5({props:f}),ie.push(()=>ve(i,"duration",a)),ie.push(()=>ve(i,"secret",u)),{key:n,first:null,c(){t=b("div"),H(i.$$.fragment),o=C(),p(t,"class","col-sm-6"),this.first=t},m(c,d){v(c,t,d),F(i,t,null),w(t,o),r=!0},p(c,d){e=c;const m={};d&2&&(m.key=e[8].key),d&2&&(m.label=e[8].label),!l&&d&3&&(l=!0,m.duration=e[0][e[8].key].duration,$e(()=>l=!1)),!s&&d&3&&(s=!0,m.secret=e[0][e[8].key].secret,$e(()=>s=!1)),i.$set(m)},i(c){r||(O(i.$$.fragment,c),r=!0)},o(c){D(i.$$.fragment,c),r=!1},d(c){c&&k(t),q(i)}}}function V5(n){let e,t=[],i=new Map,l,s=pe(n[1]);const o=r=>r[8].key;for(let r=0;r{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function B5(n){let e,t,i,l,s,o=n[2]&&Pp();return{c(){e=b("div"),e.innerHTML=' Tokens options (invalidate, duration)',t=C(),i=b("div"),l=C(),o&&o.c(),s=ge(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(r,a){v(r,e,a),v(r,t,a),v(r,i,a),v(r,l,a),o&&o.m(r,a),v(r,s,a)},p(r,a){r[2]?o?a&4&&O(o,1):(o=Pp(),o.c(),O(o,1),o.m(s.parentNode,s)):o&&(re(),D(o,1,1,()=>{o=null}),ae())},d(r){r&&(k(e),k(t),k(i),k(l),k(s)),o&&o.d(r)}}}function W5(n){let e,t;return e=new qi({props:{single:!0,$$slots:{header:[B5],default:[V5]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2055&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Y5(n,e,t){let i,l,s;Qe(n,Sn,c=>t(4,s=c));let{collection:o}=e,r=[];function a(c){if(z.isEmpty(c))return!1;for(let d of r)if(c[d.key])return!0;return!1}function u(c,d){n.$$.not_equal(o[d.key].duration,c)&&(o[d.key].duration=c,t(0,o))}function f(c,d){n.$$.not_equal(o[d.key].secret,c)&&(o[d.key].secret=c,t(0,o))}return n.$$set=c=>{"collection"in c&&t(0,o=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=(o==null?void 0:o.system)&&(o==null?void 0:o.name)==="_superusers"),n.$$.dirty&8&&t(1,r=i?[{key:"authToken",label:"Auth"},{key:"passwordResetToken",label:"Password reset"},{key:"fileToken",label:"Protected file access"}]:[{key:"authToken",label:"Auth"},{key:"verificationToken",label:"Email verification"},{key:"passwordResetToken",label:"Password reset"},{key:"emailChangeToken",label:"Email change"},{key:"fileToken",label:"Protected file access"}]),n.$$.dirty&16&&t(2,l=a(s))},[o,r,l,i,s,u,f]}class K5 extends ye{constructor(e){super(),be(this,e,Y5,W5,_e,{collection:0})}}const J5=n=>({isSuperuserOnly:n&2048}),Np=n=>({isSuperuserOnly:n[11]}),Z5=n=>({isSuperuserOnly:n&2048}),Rp=n=>({isSuperuserOnly:n[11]}),G5=n=>({isSuperuserOnly:n&2048}),Fp=n=>({isSuperuserOnly:n[11]});function X5(n){let e,t;return e=new fe({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[11]?"disabled":""),name:n[3],$$slots:{default:[x5,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l&2064&&(s.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[11]?"disabled":"")),l&8&&(s.name=i[3]),l&2362855&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Q5(n){let e;return{c(){e=b("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function qp(n){let e,t,i,l,s,o;return{c(){e=b("button"),t=b("i"),i=C(),l=b("span"),l.textContent="Set Superusers only",p(t,"class","ri-lock-line"),p(t,"aria-hidden","true"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-dnx4io"),p(e,"aria-hidden",n[10]),e.disabled=n[10]},m(r,a){v(r,e,a),w(e,t),w(e,i),w(e,l),s||(o=B(e,"click",n[13]),s=!0)},p(r,a){a&1024&&p(e,"aria-hidden",r[10]),a&1024&&(e.disabled=r[10])},d(r){r&&k(e),s=!1,o()}}}function Hp(n){let e,t,i,l,s,o,r,a=!n[10]&&jp();return{c(){e=b("button"),a&&a.c(),t=C(),i=b("div"),i.innerHTML='',p(i,"class","icon svelte-dnx4io"),p(i,"aria-hidden","true"),p(e,"type","button"),p(e,"class","unlock-overlay svelte-dnx4io"),e.disabled=n[10],p(e,"aria-hidden",n[10])},m(u,f){v(u,e,f),a&&a.m(e,null),w(e,t),w(e,i),s=!0,o||(r=B(e,"click",n[12]),o=!0)},p(u,f){u[10]?a&&(a.d(1),a=null):a||(a=jp(),a.c(),a.m(e,t)),(!s||f&1024)&&(e.disabled=u[10]),(!s||f&1024)&&p(e,"aria-hidden",u[10])},i(u){s||(u&&nt(()=>{s&&(l||(l=ze(e,Mt,{duration:150,start:.98},!0)),l.run(1))}),s=!0)},o(u){u&&(l||(l=ze(e,Mt,{duration:150,start:.98},!1)),l.run(0)),s=!1},d(u){u&&k(e),a&&a.d(),u&&l&&l.end(),o=!1,r()}}}function jp(n){let e;return{c(){e=b("small"),e.textContent="Unlock and set custom rule",p(e,"class","txt svelte-dnx4io")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function x5(n){let e,t,i,l,s,o,r=n[11]?"- Superusers only":"",a,u,f,c,d,m,h,g,_,y,S,T,$,E;const M=n[15].beforeLabel,L=Lt(M,n,n[18],Fp),I=n[15].afterLabel,A=Lt(I,n,n[18],Rp);let P=n[5]&&!n[11]&&qp(n);function R(J){n[17](J)}var N=n[8];function U(J,ee){let X={id:J[21],baseCollection:J[1],disabled:J[10],placeholder:J[11]?"":J[6]};return J[0]!==void 0&&(X.value=J[0]),{props:X}}N&&(m=jt(N,U(n)),n[16](m),ie.push(()=>ve(m,"value",R)));let j=n[5]&&n[11]&&Hp(n);const V=n[15].default,K=Lt(V,n,n[18],Np);return{c(){e=b("div"),t=b("label"),L&&L.c(),i=C(),l=b("span"),s=Y(n[2]),o=C(),a=Y(r),u=C(),A&&A.c(),f=C(),P&&P.c(),d=C(),m&&H(m.$$.fragment),g=C(),j&&j.c(),y=C(),S=b("div"),K&&K.c(),p(l,"class","txt"),Q(l,"txt-hint",n[11]),p(t,"for",c=n[21]),p(e,"class","input-wrapper svelte-dnx4io"),p(S,"class","help-block")},m(J,ee){v(J,e,ee),w(e,t),L&&L.m(t,null),w(t,i),w(t,l),w(l,s),w(l,o),w(l,a),w(t,u),A&&A.m(t,null),w(t,f),P&&P.m(t,null),w(e,d),m&&F(m,e,null),w(e,g),j&&j.m(e,null),v(J,y,ee),v(J,S,ee),K&&K.m(S,null),T=!0,$||(E=Me(_=He.call(null,e,n[1].system?{text:"System collection rule cannot be changed.",position:"top"}:void 0)),$=!0)},p(J,ee){if(L&&L.p&&(!T||ee&264192)&&Pt(L,M,J,J[18],T?At(M,J[18],ee,G5):Nt(J[18]),Fp),(!T||ee&4)&&ue(s,J[2]),(!T||ee&2048)&&r!==(r=J[11]?"- Superusers only":"")&&ue(a,r),(!T||ee&2048)&&Q(l,"txt-hint",J[11]),A&&A.p&&(!T||ee&264192)&&Pt(A,I,J,J[18],T?At(I,J[18],ee,Z5):Nt(J[18]),Rp),J[5]&&!J[11]?P?P.p(J,ee):(P=qp(J),P.c(),P.m(t,null)):P&&(P.d(1),P=null),(!T||ee&2097152&&c!==(c=J[21]))&&p(t,"for",c),ee&256&&N!==(N=J[8])){if(m){re();const X=m;D(X.$$.fragment,1,0,()=>{q(X,1)}),ae()}N?(m=jt(N,U(J)),J[16](m),ie.push(()=>ve(m,"value",R)),H(m.$$.fragment),O(m.$$.fragment,1),F(m,e,g)):m=null}else if(N){const X={};ee&2097152&&(X.id=J[21]),ee&2&&(X.baseCollection=J[1]),ee&1024&&(X.disabled=J[10]),ee&2112&&(X.placeholder=J[11]?"":J[6]),!h&&ee&1&&(h=!0,X.value=J[0],$e(()=>h=!1)),m.$set(X)}J[5]&&J[11]?j?(j.p(J,ee),ee&2080&&O(j,1)):(j=Hp(J),j.c(),O(j,1),j.m(e,null)):j&&(re(),D(j,1,1,()=>{j=null}),ae()),_&&Rt(_.update)&&ee&2&&_.update.call(null,J[1].system?{text:"System collection rule cannot be changed.",position:"top"}:void 0),K&&K.p&&(!T||ee&264192)&&Pt(K,V,J,J[18],T?At(V,J[18],ee,J5):Nt(J[18]),Np)},i(J){T||(O(L,J),O(A,J),m&&O(m.$$.fragment,J),O(j),O(K,J),T=!0)},o(J){D(L,J),D(A,J),m&&D(m.$$.fragment,J),D(j),D(K,J),T=!1},d(J){J&&(k(e),k(y),k(S)),L&&L.d(J),A&&A.d(J),P&&P.d(),n[16](null),m&&q(m),j&&j.d(),K&&K.d(J),$=!1,E()}}}function e6(n){let e,t,i,l;const s=[Q5,X5],o=[];function r(a,u){return a[9]?0:1}return e=r(n),t=o[e]=s[e](n),{c(){t.c(),i=ge()},m(a,u){o[e].m(a,u),v(a,i,u),l=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),D(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=s[e](a),t.c()),O(t,1),t.m(i.parentNode,i))},i(a){l||(O(t),l=!0)},o(a){D(t),l=!1},d(a){a&&k(i),o[e].d(a)}}}let zp;function t6(n,e,t){let i,l,{$$slots:s={},$$scope:o}=e,{collection:r=null}=e,{rule:a=null}=e,{label:u="Rule"}=e,{formKey:f="rule"}=e,{required:c=!1}=e,{disabled:d=!1}=e,{superuserToggle:m=!0}=e,{placeholder:h="Leave empty to grant everyone access..."}=e,g=null,_=null,y=zp,S=!1;T();async function T(){y||S||(t(9,S=!0),t(8,y=(await Ot(async()=>{const{default:I}=await import("./FilterAutocompleteInput-C5u5J0Yo.js");return{default:I}},__vite__mapDeps([0,1]),import.meta.url)).default),zp=y,t(9,S=!1))}async function $(){t(0,a=_||""),await fn(),g==null||g.focus()}async function E(){_=a,t(0,a=null)}function M(I){ie[I?"unshift":"push"](()=>{g=I,t(7,g)})}function L(I){a=I,t(0,a)}return n.$$set=I=>{"collection"in I&&t(1,r=I.collection),"rule"in I&&t(0,a=I.rule),"label"in I&&t(2,u=I.label),"formKey"in I&&t(3,f=I.formKey),"required"in I&&t(4,c=I.required),"disabled"in I&&t(14,d=I.disabled),"superuserToggle"in I&&t(5,m=I.superuserToggle),"placeholder"in I&&t(6,h=I.placeholder),"$$scope"in I&&t(18,o=I.$$scope)},n.$$.update=()=>{n.$$.dirty&33&&t(11,i=m&&a===null),n.$$.dirty&16386&&t(10,l=d||r.system)},[a,r,u,f,c,m,h,g,y,S,l,i,$,E,d,s,M,L,o]}class tl extends ye{constructor(e){super(),be(this,e,t6,e6,_e,{collection:1,rule:0,label:2,formKey:3,required:4,disabled:14,superuserToggle:5,placeholder:6})}}function n6(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=b("span"),s.textContent="Enable",p(e,"type","checkbox"),p(e,"id",t=n[5]),p(s,"class","txt"),p(l,"for",o=n[5])},m(u,f){v(u,e,f),e.checked=n[0].mfa.enabled,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[3]),r=!0)},p(u,f){f&32&&t!==(t=u[5])&&p(e,"id",t),f&1&&(e.checked=u[0].mfa.enabled),f&32&&o!==(o=u[5])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function i6(n){let e,t,i,l,s;return{c(){e=b("p"),e.textContent="This optional rule could be used to enable/disable MFA per account basis.",t=C(),i=b("p"),i.innerHTML=`For example, to require MFA only for accounts with non-empty email you can set it to email != ''.`,l=C(),s=b("p"),s.textContent="Leave the rule empty to require MFA for everyone."},m(o,r){v(o,e,r),v(o,t,r),v(o,i,r),v(o,l,r),v(o,s,r)},p:te,d(o){o&&(k(e),k(t),k(i),k(l),k(s))}}}function l6(n){let e,t,i,l,s,o,r,a,u;l=new fe({props:{class:"form-field form-field-toggle",name:"mfa.enabled",$$slots:{default:[n6,({uniqueId:d})=>({5:d}),({uniqueId:d})=>d?32:0]},$$scope:{ctx:n}}});function f(d){n[4](d)}let c={label:"MFA rule",formKey:"mfa.rule",superuserToggle:!1,disabled:!n[0].mfa.enabled,placeholder:"Leave empty to require MFA for everyone",collection:n[0],$$slots:{default:[i6]},$$scope:{ctx:n}};return n[0].mfa.rule!==void 0&&(c.rule=n[0].mfa.rule),r=new tl({props:c}),ie.push(()=>ve(r,"rule",f)),{c(){e=b("div"),e.innerHTML=`

This feature is experimental and may change in the future.

Multi-factor authentication (MFA) requires the user to authenticate with any 2 different auth methods (otp, identity/password, oauth2) before issuing an auth token. (Learn more) .

`,t=C(),i=b("div"),H(l.$$.fragment),s=C(),o=b("div"),H(r.$$.fragment),p(e,"class","content m-b-sm"),p(o,"class","content"),Q(o,"fade",!n[0].mfa.enabled),p(i,"class","grid")},m(d,m){v(d,e,m),v(d,t,m),v(d,i,m),F(l,i,null),w(i,s),w(i,o),F(r,o,null),u=!0},p(d,m){const h={};m&97&&(h.$$scope={dirty:m,ctx:d}),l.$set(h);const g={};m&1&&(g.disabled=!d[0].mfa.enabled),m&1&&(g.collection=d[0]),m&64&&(g.$$scope={dirty:m,ctx:d}),!a&&m&1&&(a=!0,g.rule=d[0].mfa.rule,$e(()=>a=!1)),r.$set(g),(!u||m&1)&&Q(o,"fade",!d[0].mfa.enabled)},i(d){u||(O(l.$$.fragment,d),O(r.$$.fragment,d),u=!0)},o(d){D(l.$$.fragment,d),D(r.$$.fragment,d),u=!1},d(d){d&&(k(e),k(t),k(i)),q(l),q(r)}}}function s6(n){let e;return{c(){e=b("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function o6(n){let e;return{c(){e=b("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function Up(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){v(o,e,r),i=!0,l||(s=Me(He.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function r6(n){let e,t,i,l,s,o;function r(c,d){return c[0].mfa.enabled?o6:s6}let a=r(n),u=a(n),f=n[1]&&Up();return{c(){e=b("div"),e.innerHTML=' Multi-factor authentication (MFA)',t=C(),i=b("div"),l=C(),u.c(),s=C(),f&&f.c(),o=ge(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){v(c,e,d),v(c,t,d),v(c,i,d),v(c,l,d),u.m(c,d),v(c,s,d),f&&f.m(c,d),v(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(s.parentNode,s))),c[1]?f?d&2&&O(f,1):(f=Up(),f.c(),O(f,1),f.m(o.parentNode,o)):f&&(re(),D(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(l),k(s),k(o)),u.d(c),f&&f.d(c)}}}function a6(n){let e,t;return e=new qi({props:{single:!0,$$slots:{header:[r6],default:[l6]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&67&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function u6(n,e,t){let i,l;Qe(n,Sn,a=>t(2,l=a));let{collection:s}=e;function o(){s.mfa.enabled=this.checked,t(0,s)}function r(a){n.$$.not_equal(s.mfa.rule,a)&&(s.mfa.rule=a,t(0,s))}return n.$$set=a=>{"collection"in a&&t(0,s=a.collection)},n.$$.update=()=>{n.$$.dirty&4&&t(1,i=!z.isEmpty(l==null?void 0:l.mfa))},[s,i,l,o,r]}class f6 extends ye{constructor(e){super(),be(this,e,u6,a6,_e,{collection:0})}}const c6=n=>({}),Vp=n=>({});function Bp(n,e,t){const i=n.slice();return i[50]=e[t],i}const d6=n=>({}),Wp=n=>({});function Yp(n,e,t){const i=n.slice();return i[50]=e[t],i[54]=t,i}function Kp(n){let e,t,i;return{c(){e=b("div"),t=Y(n[2]),i=C(),p(e,"class","block txt-placeholder"),Q(e,"link-hint",!n[5]&&!n[6])},m(l,s){v(l,e,s),w(e,t),w(e,i)},p(l,s){s[0]&4&&ue(t,l[2]),s[0]&96&&Q(e,"link-hint",!l[5]&&!l[6])},d(l){l&&k(e)}}}function p6(n){let e,t=n[50]+"",i;return{c(){e=b("span"),i=Y(t),p(e,"class","txt")},m(l,s){v(l,e,s),w(e,i)},p(l,s){s[0]&1&&t!==(t=l[50]+"")&&ue(i,t)},i:te,o:te,d(l){l&&k(e)}}}function m6(n){let e,t,i;const l=[{item:n[50]},n[11]];var s=n[10];function o(r,a){let u={};for(let f=0;f{q(u,1)}),ae()}s?(e=jt(s,o(r,a)),H(e.$$.fragment),O(e.$$.fragment,1),F(e,t.parentNode,t)):e=null}else if(s){const u=a[0]&2049?vt(l,[a[0]&1&&{item:r[50]},a[0]&2048&&Ft(r[11])]):{};e.$set(u)}},i(r){i||(e&&O(e.$$.fragment,r),i=!0)},o(r){e&&D(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&q(e,r)}}}function Jp(n){let e,t,i;function l(){return n[37](n[50])}return{c(){e=b("span"),e.innerHTML='',p(e,"class","clear")},m(s,o){v(s,e,o),t||(i=[Me(He.call(null,e,"Clear")),B(e,"click",On(tt(l)))],t=!0)},p(s,o){n=s},d(s){s&&k(e),t=!1,De(i)}}}function Zp(n){let e,t,i,l,s,o;const r=[m6,p6],a=[];function u(c,d){return c[10]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[8])&&Jp(n);return{c(){e=b("div"),i.c(),l=C(),f&&f.c(),s=C(),p(e,"class","option")},m(c,d){v(c,e,d),a[t].m(e,null),w(e,l),f&&f.m(e,null),w(e,s),o=!0},p(c,d){let m=t;t=u(c),t===m?a[t].p(c,d):(re(),D(a[m],1,1,()=>{a[m]=null}),ae(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),O(i,1),i.m(e,l)),c[4]||c[8]?f?f.p(c,d):(f=Jp(c),f.c(),f.m(e,s)):f&&(f.d(1),f=null)},i(c){o||(O(i),o=!0)},o(c){D(i),o=!1},d(c){c&&k(e),a[t].d(),f&&f.d()}}}function Gp(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left "+(n[7]?"dropdown-upside":""),trigger:n[20],$$slots:{default:[g6]},$$scope:{ctx:n}};return e=new Hn({props:i}),n[42](e),e.$on("show",n[26]),e.$on("hide",n[43]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,s){const o={};s[0]&128&&(o.class="dropdown dropdown-block options-dropdown dropdown-left "+(l[7]?"dropdown-upside":"")),s[0]&1048576&&(o.trigger=l[20]),s[0]&6451722|s[1]&16384&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[42](null),q(e,l)}}}function Xp(n){let e,t,i,l,s,o,r,a,u=n[17].length&&Qp(n);return{c(){e=b("div"),t=b("label"),i=b("div"),i.innerHTML='',l=C(),s=b("input"),o=C(),u&&u.c(),p(i,"class","addon p-r-0"),s.autofocus=!0,p(s,"type","text"),p(s,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){v(f,e,c),w(e,t),w(t,i),w(t,l),w(t,s),ce(s,n[17]),w(t,o),u&&u.m(t,null),s.focus(),r||(a=B(s,"input",n[39]),r=!0)},p(f,c){c[0]&8&&p(s,"placeholder",f[3]),c[0]&131072&&s.value!==f[17]&&ce(s,f[17]),f[17].length?u?u.p(f,c):(u=Qp(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 Qp(n){let e,t,i,l;return{c(){e=b("div"),t=b("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(s,o){v(s,e,o),w(e,t),i||(l=B(t,"click",On(tt(n[23]))),i=!0)},p:te,d(s){s&&k(e),i=!1,l()}}}function xp(n){let e,t=n[1]&&em(n);return{c(){t&&t.c(),e=ge()},m(i,l){t&&t.m(i,l),v(i,e,l)},p(i,l){i[1]?t?t.p(i,l):(t=em(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){i&&k(e),t&&t.d(i)}}}function em(n){let e,t;return{c(){e=b("div"),t=Y(n[1]),p(e,"class","txt-missing")},m(i,l){v(i,e,l),w(e,t)},p(i,l){l[0]&2&&ue(t,i[1])},d(i){i&&k(e)}}}function h6(n){let e=n[50]+"",t;return{c(){t=Y(e)},m(i,l){v(i,t,l)},p(i,l){l[0]&4194304&&e!==(e=i[50]+"")&&ue(t,e)},i:te,o:te,d(i){i&&k(t)}}}function _6(n){let e,t,i;const l=[{item:n[50]},n[13]];var s=n[12];function o(r,a){let u={};for(let f=0;f{q(u,1)}),ae()}s?(e=jt(s,o(r,a)),H(e.$$.fragment),O(e.$$.fragment,1),F(e,t.parentNode,t)):e=null}else if(s){const u=a[0]&4202496?vt(l,[a[0]&4194304&&{item:r[50]},a[0]&8192&&Ft(r[13])]):{};e.$set(u)}},i(r){i||(e&&O(e.$$.fragment,r),i=!0)},o(r){e&&D(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&q(e,r)}}}function tm(n){let e,t,i,l,s,o,r;const a=[_6,h6],u=[];function f(m,h){return m[12]?0:1}t=f(n),i=u[t]=a[t](n);function c(...m){return n[40](n[50],...m)}function d(...m){return n[41](n[50],...m)}return{c(){e=b("div"),i.c(),l=C(),p(e,"tabindex","0"),p(e,"class","dropdown-item option"),p(e,"role","menuitem"),Q(e,"closable",n[9]),Q(e,"selected",n[21](n[50]))},m(m,h){v(m,e,h),u[t].m(e,null),w(e,l),s=!0,o||(r=[B(e,"click",c),B(e,"keydown",d)],o=!0)},p(m,h){n=m;let g=t;t=f(n),t===g?u[t].p(n,h):(re(),D(u[g],1,1,()=>{u[g]=null}),ae(),i=u[t],i?i.p(n,h):(i=u[t]=a[t](n),i.c()),O(i,1),i.m(e,l)),(!s||h[0]&512)&&Q(e,"closable",n[9]),(!s||h[0]&6291456)&&Q(e,"selected",n[21](n[50]))},i(m){s||(O(i),s=!0)},o(m){D(i),s=!1},d(m){m&&k(e),u[t].d(),o=!1,De(r)}}}function g6(n){let e,t,i,l,s,o=n[14]&&Xp(n);const r=n[36].beforeOptions,a=Lt(r,n,n[45],Wp);let u=pe(n[22]),f=[];for(let g=0;gD(f[g],1,1,()=>{f[g]=null});let d=null;u.length||(d=xp(n));const m=n[36].afterOptions,h=Lt(m,n,n[45],Vp);return{c(){o&&o.c(),e=C(),a&&a.c(),t=C(),i=b("div");for(let g=0;gD(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=Kp(n));let c=!n[5]&&!n[6]&&Gp(n);return{c(){e=b("div"),t=b("div");for(let d=0;d{c=null}),ae()),(!o||m[0]&32768&&s!==(s="select "+d[15]))&&p(e,"class",s),(!o||m[0]&32896)&&Q(e,"upside",d[7]),(!o||m[0]&32784)&&Q(e,"multiple",d[4]),(!o||m[0]&32800)&&Q(e,"disabled",d[5]),(!o||m[0]&32832)&&Q(e,"readonly",d[6])},i(d){if(!o){for(let m=0;md?[]:void 0}=e,{selected:y=_()}=e,{toggle:S=d}=e,{closable:T=!0}=e,{labelComponent:$=void 0}=e,{labelComponentProps:E={}}=e,{optionComponent:M=void 0}=e,{optionComponentProps:L={}}=e,{searchable:I=!1}=e,{searchFunc:A=void 0}=e;const P=gt();let{class:R=""}=e,N,U="",j,V;function K(we){if(z.isEmpty(y))return;let Oe=z.toArray(y);z.inArray(Oe,we)&&(z.removeByValue(Oe,we),t(0,y=d?Oe:(Oe==null?void 0:Oe[0])||_())),P("change",{selected:y}),j==null||j.dispatchEvent(new CustomEvent("change",{detail:y,bubbles:!0}))}function J(we){if(d){let Oe=z.toArray(y);z.inArray(Oe,we)||t(0,y=[...Oe,we])}else t(0,y=we);P("change",{selected:y}),j==null||j.dispatchEvent(new CustomEvent("change",{detail:y,bubbles:!0}))}function ee(we){return l(we)?K(we):J(we)}function X(){t(0,y=_()),P("change",{selected:y}),j==null||j.dispatchEvent(new CustomEvent("change",{detail:y,bubbles:!0}))}function oe(){N!=null&&N.show&&(N==null||N.show())}function Se(){N!=null&&N.hide&&(N==null||N.hide())}function ke(){if(z.isEmpty(y)||z.isEmpty(c))return;let we=z.toArray(y),Oe=[];for(const ut of we)z.inArray(c,ut)||Oe.push(ut);if(Oe.length){for(const ut of Oe)z.removeByValue(we,ut);t(0,y=d?we:we[0])}}function Ce(){t(17,U="")}function We(we,Oe){we=we||[];const ut=A||y6;return we.filter(Ne=>ut(Ne,Oe))||[]}function st(we,Oe){we.preventDefault(),S&&d?ee(Oe):J(Oe)}function et(we,Oe){(we.code==="Enter"||we.code==="Space")&&(st(we,Oe),T&&Se())}function Be(){Ce(),setTimeout(()=>{const we=j==null?void 0:j.querySelector(".dropdown-item.option.selected");we&&(we.focus(),we.scrollIntoView({block:"nearest"}))},0)}function rt(we){we.stopPropagation(),!h&&!m&&(N==null||N.toggle())}Yt(()=>{const we=document.querySelectorAll(`label[for="${r}"]`);for(const Oe of we)Oe.addEventListener("click",rt);return()=>{for(const Oe of we)Oe.removeEventListener("click",rt)}});const Je=we=>K(we);function at(we){ie[we?"unshift":"push"](()=>{V=we,t(20,V)})}function Ht(){U=this.value,t(17,U)}const Te=(we,Oe)=>st(Oe,we),Ze=(we,Oe)=>et(Oe,we);function ot(we){ie[we?"unshift":"push"](()=>{N=we,t(18,N)})}function Le(we){Pe.call(this,n,we)}function Ve(we){ie[we?"unshift":"push"](()=>{j=we,t(19,j)})}return n.$$set=we=>{"id"in we&&t(27,r=we.id),"noOptionsText"in we&&t(1,a=we.noOptionsText),"selectPlaceholder"in we&&t(2,u=we.selectPlaceholder),"searchPlaceholder"in we&&t(3,f=we.searchPlaceholder),"items"in we&&t(28,c=we.items),"multiple"in we&&t(4,d=we.multiple),"disabled"in we&&t(5,m=we.disabled),"readonly"in we&&t(6,h=we.readonly),"upside"in we&&t(7,g=we.upside),"zeroFunc"in we&&t(29,_=we.zeroFunc),"selected"in we&&t(0,y=we.selected),"toggle"in we&&t(8,S=we.toggle),"closable"in we&&t(9,T=we.closable),"labelComponent"in we&&t(10,$=we.labelComponent),"labelComponentProps"in we&&t(11,E=we.labelComponentProps),"optionComponent"in we&&t(12,M=we.optionComponent),"optionComponentProps"in we&&t(13,L=we.optionComponentProps),"searchable"in we&&t(14,I=we.searchable),"searchFunc"in we&&t(30,A=we.searchFunc),"class"in we&&t(15,R=we.class),"$$scope"in we&&t(45,o=we.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&268435456&&c&&(ke(),Ce()),n.$$.dirty[0]&268566528&&t(22,i=We(c,U)),n.$$.dirty[0]&1&&t(21,l=function(we){const Oe=z.toArray(y);return z.inArray(Oe,we)})},[y,a,u,f,d,m,h,g,S,T,$,E,M,L,I,R,K,U,N,j,V,l,i,Ce,st,et,Be,r,c,_,A,J,ee,X,oe,Se,s,Je,at,Ht,Te,Ze,ot,Le,Ve,o]}class ds extends ye{constructor(e){super(),be(this,e,k6,b6,_e,{id:27,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:28,multiple:4,disabled:5,readonly:6,upside:7,zeroFunc:29,selected:0,toggle:8,closable:9,labelComponent:10,labelComponentProps:11,optionComponent:12,optionComponentProps:13,searchable:14,searchFunc:30,class:15,deselectItem:16,selectItem:31,toggleItem:32,reset:33,showDropdown:34,hideDropdown:35},null,[-1,-1])}get deselectItem(){return this.$$.ctx[16]}get selectItem(){return this.$$.ctx[31]}get toggleItem(){return this.$$.ctx[32]}get reset(){return this.$$.ctx[33]}get showDropdown(){return this.$$.ctx[34]}get hideDropdown(){return this.$$.ctx[35]}}function v6(n){let e,t,i,l=[{type:"password"},{autocomplete:"new-password"},n[4]],s={};for(let o=0;o',i=C(),l=b("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),Xn(l,a)},m(u,f){v(u,e,f),w(e,t),v(u,i,f),v(u,l,f),l.autofocus&&l.focus(),s||(o=[Me(He.call(null,t,{position:"left",text:"Set new value"})),B(t,"click",tt(n[3]))],s=!0)},p(u,f){Xn(l,a=vt(r,[{disabled:!0},{type:"text"},{placeholder:"******"},f&16&&u[4]]))},d(u){u&&(k(e),k(i),k(l)),s=!1,De(o)}}}function S6(n){let e;function t(s,o){return s[1]?w6:v6}let i=t(n),l=i(n);return{c(){l.c(),e=ge()},m(s,o){l.m(s,o),v(s,e,o)},p(s,[o]){i===(i=t(s))&&l?l.p(s,o):(l.d(1),l=i(s),l&&(l.c(),l.m(e.parentNode,e)))},i:te,o:te,d(s){s&&k(e),l.d(s)}}}function T6(n,e,t){const i=["value","mask"];let l=lt(e,i),{value:s=void 0}=e,{mask:o=!1}=e,r;async function a(){t(0,s=""),t(1,o=!1),await fn(),r==null||r.focus()}function u(c){ie[c?"unshift":"push"](()=>{r=c,t(2,r)})}function f(){s=this.value,t(0,s)}return n.$$set=c=>{e=je(je({},e),Ut(c)),t(4,l=lt(e,i)),"value"in c&&t(0,s=c.value),"mask"in c&&t(1,o=c.mask)},[s,o,r,a,l,u,f]}class xu extends ye{constructor(e){super(),be(this,e,T6,S6,_e,{value:0,mask:1})}}function $6(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Client ID"),l=C(),s=b("input"),p(e,"for",i=n[23]),p(s,"type","text"),p(s,"id",o=n[23])},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[1].clientId),r||(a=B(s,"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(s,"id",o),f&2&&s.value!==u[1].clientId&&ce(s,u[1].clientId)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function C6(n){let e,t,i,l,s,o,r,a;function u(d){n[15](d)}function f(d){n[16](d)}let c={id:n[23]};return n[5]!==void 0&&(c.mask=n[5]),n[1].clientSecret!==void 0&&(c.value=n[1].clientSecret),s=new xu({props:c}),ie.push(()=>ve(s,"mask",u)),ie.push(()=>ve(s,"value",f)),{c(){e=b("label"),t=Y("Client secret"),l=C(),H(s.$$.fragment),p(e,"for",i=n[23])},m(d,m){v(d,e,m),w(e,t),v(d,l,m),F(s,d,m),a=!0},p(d,m){(!a||m&8388608&&i!==(i=d[23]))&&p(e,"for",i);const h={};m&8388608&&(h.id=d[23]),!o&&m&32&&(o=!0,h.mask=d[5],$e(()=>o=!1)),!r&&m&2&&(r=!0,h.value=d[1].clientSecret,$e(()=>r=!1)),s.$set(h)},i(d){a||(O(s.$$.fragment,d),a=!0)},o(d){D(s.$$.fragment,d),a=!1},d(d){d&&(k(e),k(l)),q(s,d)}}}function nm(n){let e,t,i,l;const s=[{key:n[6]},n[3].optionsComponentProps||{}];function o(u){n[17](u)}var r=n[3].optionsComponent;function a(u,f){let c={};for(let d=0;dve(t,"config",o))),{c(){e=b("div"),t&&H(t.$$.fragment),p(e,"class","col-lg-12")},m(u,f){v(u,e,f),t&&F(t,e,null),l=!0},p(u,f){if(f&8&&r!==(r=u[3].optionsComponent)){if(t){re();const c=t;D(c.$$.fragment,1,0,()=>{q(c,1)}),ae()}r?(t=jt(r,a(u,f)),ie.push(()=>ve(t,"config",o)),H(t.$$.fragment),O(t.$$.fragment,1),F(t,e,null)):t=null}else if(r){const c=f&72?vt(s,[f&64&&{key:u[6]},f&8&&Ft(u[3].optionsComponentProps||{})]):{};!i&&f&2&&(i=!0,c.config=u[1],$e(()=>i=!1)),t.$set(c)}},i(u){l||(t&&O(t.$$.fragment,u),l=!0)},o(u){t&&D(t.$$.fragment,u),l=!1},d(u){u&&k(e),t&&q(t)}}}function O6(n){let e,t,i,l,s,o,r,a;t=new fe({props:{class:"form-field required",name:n[6]+".clientId",$$slots:{default:[$6,({uniqueId:f})=>({23:f}),({uniqueId:f})=>f?8388608:0]},$$scope:{ctx:n}}}),l=new fe({props:{class:"form-field required",name:n[6]+".clientSecret",$$slots:{default:[C6,({uniqueId:f})=>({23:f}),({uniqueId:f})=>f?8388608:0]},$$scope:{ctx:n}}});let u=n[3].optionsComponent&&nm(n);return{c(){e=b("form"),H(t.$$.fragment),i=C(),H(l.$$.fragment),s=C(),u&&u.c(),p(e,"id",n[8]),p(e,"autocomplete","off")},m(f,c){v(f,e,c),F(t,e,null),w(e,i),F(l,e,null),w(e,s),u&&u.m(e,null),o=!0,r||(a=B(e,"submit",tt(n[18])),r=!0)},p(f,c){const d={};c&64&&(d.name=f[6]+".clientId"),c&25165826&&(d.$$scope={dirty:c,ctx:f}),t.$set(d);const m={};c&64&&(m.name=f[6]+".clientSecret"),c&25165858&&(m.$$scope={dirty:c,ctx:f}),l.$set(m),f[3].optionsComponent?u?(u.p(f,c),c&8&&O(u,1)):(u=nm(f),u.c(),O(u,1),u.m(e,null)):u&&(re(),D(u,1,1,()=>{u=null}),ae())},i(f){o||(O(t.$$.fragment,f),O(l.$$.fragment,f),O(u),o=!0)},o(f){D(t.$$.fragment,f),D(l.$$.fragment,f),D(u),o=!1},d(f){f&&k(e),q(t),q(l),u&&u.d(),r=!1,a()}}}function E6(n){let e;return{c(){e=b("i"),p(e,"class","ri-puzzle-line txt-sm txt-hint")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function M6(n){let e,t,i;return{c(){e=b("img"),vn(e.src,t="./images/oauth2/"+n[3].logo)||p(e,"src",t),p(e,"alt",i=n[3].title+" logo")},m(l,s){v(l,e,s)},p(l,s){s&8&&!vn(e.src,t="./images/oauth2/"+l[3].logo)&&p(e,"src",t),s&8&&i!==(i=l[3].title+" logo")&&p(e,"alt",i)},d(l){l&&k(e)}}}function D6(n){let e,t,i,l=n[3].title+"",s,o,r,a,u=n[3].key+"",f,c;function d(g,_){return g[3].logo?M6:E6}let m=d(n),h=m(n);return{c(){e=b("figure"),h.c(),t=C(),i=b("h4"),s=Y(l),o=C(),r=b("small"),a=Y("("),f=Y(u),c=Y(")"),p(e,"class","provider-logo"),p(r,"class","txt-hint"),p(i,"class","center txt-break")},m(g,_){v(g,e,_),h.m(e,null),v(g,t,_),v(g,i,_),w(i,s),w(i,o),w(i,r),w(r,a),w(r,f),w(r,c)},p(g,_){m===(m=d(g))&&h?h.p(g,_):(h.d(1),h=m(g),h&&(h.c(),h.m(e,null))),_&8&&l!==(l=g[3].title+"")&&ue(s,l),_&8&&u!==(u=g[3].key+"")&&ue(f,u)},d(g){g&&(k(e),k(t),k(i)),h.d()}}}function im(n){let e,t,i,l,s;return{c(){e=b("button"),e.innerHTML='',t=C(),i=b("div"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-circle btn-hint btn-sm"),p(e,"aria-label","Remove provider"),p(i,"class","flex-fill")},m(o,r){v(o,e,r),v(o,t,r),v(o,i,r),l||(s=[Me(He.call(null,e,{text:"Remove provider",position:"right"})),B(e,"click",n[10])],l=!0)},p:te,d(o){o&&(k(e),k(t),k(i)),l=!1,De(s)}}}function I6(n){let e,t,i,l,s,o,r,a,u=!n[4]&&im(n);return{c(){u&&u.c(),e=C(),t=b("button"),t.textContent="Cancel",i=C(),l=b("button"),s=b("span"),s.textContent="Set provider config",p(t,"type","button"),p(t,"class","btn btn-transparent"),p(s,"class","txt"),p(l,"type","submit"),p(l,"form",n[8]),p(l,"class","btn btn-expanded"),l.disabled=o=!n[7]},m(f,c){u&&u.m(f,c),v(f,e,c),v(f,t,c),v(f,i,c),v(f,l,c),w(l,s),r||(a=B(t,"click",n[0]),r=!0)},p(f,c){f[4]?u&&(u.d(1),u=null):u?u.p(f,c):(u=im(f),u.c(),u.m(e.parentNode,e)),c&128&&o!==(o=!f[7])&&(l.disabled=o)},d(f){f&&(k(e),k(t),k(i),k(l)),u&&u.d(f),r=!1,a()}}}function L6(n){let e,t,i={btnClose:!1,$$slots:{footer:[I6],header:[D6],default:[O6]},$$scope:{ctx:n}};return e=new ln({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&16777466&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[19](null),q(e,l)}}}function A6(n,e,t){let i,l;const s=gt(),o="provider_popup_"+z.randomString(5);let r,a={},u={},f=!1,c="",d=!1,m=0;function h(P,R,N){t(13,m=N||0),t(4,f=z.isEmpty(R)),t(3,a=Object.assign({},P)),t(1,u=Object.assign({},R)),t(5,d=!!u.clientId),t(12,c=JSON.stringify(u)),r==null||r.show()}function g(){fi(l),r==null||r.hide()}async function _(){s("submit",{uiOptions:a,config:u}),g()}async function y(){pn(`Do you really want to remove the "${a.title}" OAuth2 provider from the collection?`,()=>{s("remove",{uiOptions:a}),g()})}function S(){u.clientId=this.value,t(1,u)}function T(P){d=P,t(5,d)}function $(P){n.$$.not_equal(u.clientSecret,P)&&(u.clientSecret=P,t(1,u))}function E(P){u=P,t(1,u)}const M=()=>_();function L(P){ie[P?"unshift":"push"](()=>{r=P,t(2,r)})}function I(P){Pe.call(this,n,P)}function A(P){Pe.call(this,n,P)}return n.$$.update=()=>{n.$$.dirty&4098&&t(7,i=JSON.stringify(u)!=c),n.$$.dirty&8192&&t(6,l="oauth2.providers."+m)},[g,u,r,a,f,d,l,i,o,_,y,h,c,m,S,T,$,E,M,L,I,A]}class P6 extends ye{constructor(e){super(),be(this,e,A6,L6,_e,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function N6(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Client ID"),l=C(),s=b("input"),p(e,"for",i=n[23]),p(s,"type","text"),p(s,"id",o=n[23]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[2]),r||(a=B(s,"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(s,"id",o),f&4&&s.value!==u[2]&&ce(s,u[2])},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function R6(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Team ID"),l=C(),s=b("input"),p(e,"for",i=n[23]),p(s,"type","text"),p(s,"id",o=n[23]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[3]),r||(a=B(s,"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(s,"id",o),f&8&&s.value!==u[3]&&ce(s,u[3])},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function F6(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Key ID"),l=C(),s=b("input"),p(e,"for",i=n[23]),p(s,"type","text"),p(s,"id",o=n[23]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[4]),r||(a=B(s,"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(s,"id",o),f&16&&s.value!==u[4]&&ce(s,u[4])},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function q6(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("label"),t=b("span"),t.textContent="Duration (in seconds)",i=C(),l=b("i"),o=C(),r=b("input"),p(t,"class","txt"),p(l,"class","ri-information-line link-hint"),p(e,"for",s=n[23]),p(r,"type","number"),p(r,"id",a=n[23]),p(r,"max",ur),r.required=!0},m(c,d){v(c,e,d),w(e,t),w(e,i),w(e,l),v(c,o,d),v(c,r,d),ce(r,n[6]),u||(f=[Me(He.call(null,l,{text:`Max ${ur} seconds (~${ur/(60*60*24*30)<<0} months).`,position:"top"})),B(r,"input",n[15])],u=!0)},p(c,d){d&8388608&&s!==(s=c[23])&&p(e,"for",s),d&8388608&&a!==(a=c[23])&&p(r,"id",a),d&64&&_t(r.value)!==c[6]&&ce(r,c[6])},d(c){c&&(k(e),k(o),k(r)),u=!1,De(f)}}}function H6(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("label"),t=Y("Private key"),l=C(),s=b("textarea"),r=C(),a=b("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(s,"id",o=n[23]),s.required=!0,p(s,"rows","8"),p(s,"placeholder",`-----BEGIN PRIVATE KEY----- ... ------END PRIVATE KEY-----`),p(a,"class","help-block")},m(c,d){v(c,e,d),w(e,t),v(c,l,d),v(c,s,d),ce(s,n[5]),v(c,r,d),v(c,a,d),u||(f=B(s,"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(s,"id",o),d&32&&ce(s,c[5])},d(c){c&&(k(e),k(l),k(s),k(r),k(a)),u=!1,f()}}}function j6(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S;return l=new fe({props:{class:"form-field required",name:"clientId",$$slots:{default:[N6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),r=new fe({props:{class:"form-field required",name:"teamId",$$slots:{default:[R6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),f=new fe({props:{class:"form-field required",name:"keyId",$$slots:{default:[F6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),m=new fe({props:{class:"form-field required",name:"duration",$$slots:{default:[q6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),g=new fe({props:{class:"form-field required",name:"privateKey",$$slots:{default:[H6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),t=b("div"),i=b("div"),H(l.$$.fragment),s=C(),o=b("div"),H(r.$$.fragment),a=C(),u=b("div"),H(f.$$.fragment),c=C(),d=b("div"),H(m.$$.fragment),h=C(),H(g.$$.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,$){v(T,e,$),w(e,t),w(t,i),F(l,i,null),w(t,s),w(t,o),F(r,o,null),w(t,a),w(t,u),F(f,u,null),w(t,c),w(t,d),F(m,d,null),w(t,h),F(g,t,null),_=!0,y||(S=B(e,"submit",tt(n[17])),y=!0)},p(T,$){const E={};$&25165828&&(E.$$scope={dirty:$,ctx:T}),l.$set(E);const M={};$&25165832&&(M.$$scope={dirty:$,ctx:T}),r.$set(M);const L={};$&25165840&&(L.$$scope={dirty:$,ctx:T}),f.$set(L);const I={};$&25165888&&(I.$$scope={dirty:$,ctx:T}),m.$set(I);const A={};$&25165856&&(A.$$scope={dirty:$,ctx:T}),g.$set(A)},i(T){_||(O(l.$$.fragment,T),O(r.$$.fragment,T),O(f.$$.fragment,T),O(m.$$.fragment,T),O(g.$$.fragment,T),_=!0)},o(T){D(l.$$.fragment,T),D(r.$$.fragment,T),D(f.$$.fragment,T),D(m.$$.fragment,T),D(g.$$.fragment,T),_=!1},d(T){T&&k(e),q(l),q(r),q(f),q(m),q(g),y=!1,S()}}}function z6(n){let e;return{c(){e=b("h4"),e.textContent="Generate Apple client secret",p(e,"class","center txt-break")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function U6(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("button"),t=Y("Close"),i=C(),l=b("button"),s=b("i"),o=C(),r=b("span"),r.textContent="Generate and set secret",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[7],p(s,"class","ri-key-line"),p(r,"class","txt"),p(l,"type","submit"),p(l,"form",n[9]),p(l,"class","btn btn-expanded"),l.disabled=a=!n[8]||n[7],Q(l,"btn-loading",n[7])},m(c,d){v(c,e,d),w(e,t),v(c,i,d),v(c,l,d),w(l,s),w(l,o),w(l,r),u||(f=B(e,"click",n[0]),u=!0)},p(c,d){d&128&&(e.disabled=c[7]),d&384&&a!==(a=!c[8]||c[7])&&(l.disabled=a),d&128&&Q(l,"btn-loading",c[7])},d(c){c&&(k(e),k(i),k(l)),u=!1,f()}}}function V6(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[U6],header:[z6],default:[j6]},$$scope:{ctx:n}};return e=new ln({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&128&&(o.overlayClose=!l[7]),s&128&&(o.escClose=!l[7]),s&128&&(o.beforeHide=l[18]),s&16777724&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[19](null),q(e,l)}}}const ur=15777e3;function B6(n,e,t){let i;const l=gt(),s="apple_secret_"+z.randomString(5);let o,r,a,u,f,c,d=!1;function m(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||ur),Wt({}),o==null||o.show()}function h(){return o==null?void 0:o.hide()}async function g(){t(7,d=!0);try{const P=await me.settings.generateAppleClientSecret(r,a,u,f.trim(),c);t(7,d=!1),tn("Successfully generated client secret."),l("submit",P),o==null||o.hide()}catch(P){me.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=_t(this.value),t(6,c)}function $(){f=this.value,t(5,f)}const E=()=>g(),M=()=>!d;function L(P){ie[P?"unshift":"push"](()=>{o=P,t(1,o)})}function I(P){Pe.call(this,n,P)}function A(P){Pe.call(this,n,P)}return t(8,i=!0),[h,o,r,a,u,f,c,d,i,s,g,m,_,y,S,T,$,E,M,L,I,A]}class W6 extends ye{constructor(e){super(),be(this,e,B6,V6,_e,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function Y6(n){let e,t,i,l,s,o,r,a,u,f,c={};return r=new W6({props:c}),n[4](r),r.$on("submit",n[5]),{c(){e=b("button"),t=b("i"),i=C(),l=b("span"),l.textContent="Generate secret",o=C(),H(r.$$.fragment),p(t,"class","ri-key-line"),p(l,"class","txt"),p(e,"type","button"),p(e,"class",s="btn btn-sm btn-secondary btn-provider-"+n[1])},m(d,m){v(d,e,m),w(e,t),w(e,i),w(e,l),v(d,o,m),F(r,d,m),a=!0,u||(f=B(e,"click",n[3]),u=!0)},p(d,[m]){(!a||m&2&&s!==(s="btn btn-sm btn-secondary btn-provider-"+d[1]))&&p(e,"class",s);const h={};r.$set(h)},i(d){a||(O(r.$$.fragment,d),a=!0)},o(d){D(r.$$.fragment,d),a=!1},d(d){d&&(k(e),k(o)),n[4](null),q(r,d),u=!1,f()}}}function K6(n,e,t){let{key:i=""}=e,{config:l={}}=e,s;const o=()=>s==null?void 0:s.show({clientId:l.clientId});function r(u){ie[u?"unshift":"push"](()=>{s=u,t(2,s)})}const a=u=>{var f;t(0,l.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",l)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,l=u.config)},[l,i,s,o,r,a]}class J6 extends ye{constructor(e){super(),be(this,e,K6,Y6,_e,{key:1,config:0})}}function Z6(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("label"),t=Y("Auth URL"),l=C(),s=b("input"),r=C(),a=b("div"),a.textContent="Ex. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(s,"type","url"),p(s,"id",o=n[4]),s.required=!0,p(a,"class","help-block")},m(c,d){v(c,e,d),w(e,t),v(c,l,d),v(c,s,d),ce(s,n[0].authURL),v(c,r,d),v(c,a,d),u||(f=B(s,"input",n[2]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(s,"id",o),d&1&&s.value!==c[0].authURL&&ce(s,c[0].authURL)},d(c){c&&(k(e),k(l),k(s),k(r),k(a)),u=!1,f()}}}function G6(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("label"),t=Y("Token URL"),l=C(),s=b("input"),r=C(),a=b("div"),a.textContent="Ex. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(s,"type","url"),p(s,"id",o=n[4]),s.required=!0,p(a,"class","help-block")},m(c,d){v(c,e,d),w(e,t),v(c,l,d),v(c,s,d),ce(s,n[0].tokenURL),v(c,r,d),v(c,a,d),u||(f=B(s,"input",n[3]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(s,"id",o),d&1&&s.value!==c[0].tokenURL&&ce(s,c[0].tokenURL)},d(c){c&&(k(e),k(l),k(s),k(r),k(a)),u=!1,f()}}}function X6(n){let e,t,i,l,s,o;return i=new fe({props:{class:"form-field required",name:n[1]+".authURL",$$slots:{default:[Z6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),s=new fe({props:{class:"form-field required",name:n[1]+".tokenURL",$$slots:{default:[G6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),e.textContent="Azure AD endpoints",t=C(),H(i.$$.fragment),l=C(),H(s.$$.fragment),p(e,"class","section-title")},m(r,a){v(r,e,a),v(r,t,a),F(i,r,a),v(r,l,a),F(s,r,a),o=!0},p(r,[a]){const u={};a&2&&(u.name=r[1]+".authURL"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&2&&(f.name=r[1]+".tokenURL"),a&49&&(f.$$scope={dirty:a,ctx:r}),s.$set(f)},i(r){o||(O(i.$$.fragment,r),O(s.$$.fragment,r),o=!0)},o(r){D(i.$$.fragment,r),D(s.$$.fragment,r),o=!1},d(r){r&&(k(e),k(t),k(l)),q(i,r),q(s,r)}}}function Q6(n,e,t){let{key:i=""}=e,{config:l={}}=e;function s(){l.authURL=this.value,t(0,l)}function o(){l.tokenURL=this.value,t(0,l)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,l=r.config)},[l,i,s,o]}class x6 extends ye{constructor(e){super(),be(this,e,Q6,X6,_e,{key:1,config:0})}}function e8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Display name"),l=C(),s=b("input"),p(e,"for",i=n[7]),p(s,"type","text"),p(s,"id",o=n[7]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].displayName),r||(a=B(s,"input",n[2]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&o!==(o=u[7])&&p(s,"id",o),f&1&&s.value!==u[0].displayName&&ce(s,u[0].displayName)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function t8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Auth URL"),l=C(),s=b("input"),p(e,"for",i=n[7]),p(s,"type","url"),p(s,"id",o=n[7]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].authURL),r||(a=B(s,"input",n[3]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&o!==(o=u[7])&&p(s,"id",o),f&1&&s.value!==u[0].authURL&&ce(s,u[0].authURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function n8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Token URL"),l=C(),s=b("input"),p(e,"for",i=n[7]),p(s,"type","url"),p(s,"id",o=n[7]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].tokenURL),r||(a=B(s,"input",n[4]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&o!==(o=u[7])&&p(s,"id",o),f&1&&s.value!==u[0].tokenURL&&ce(s,u[0].tokenURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function i8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("User info URL"),l=C(),s=b("input"),p(e,"for",i=n[7]),p(s,"type","url"),p(s,"id",o=n[7]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].userInfoURL),r||(a=B(s,"input",n[5]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&o!==(o=u[7])&&p(s,"id",o),f&1&&s.value!==u[0].userInfoURL&&ce(s,u[0].userInfoURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function l8(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("input"),i=C(),l=b("label"),s=b("span"),s.textContent="Support PKCE",o=C(),r=b("i"),p(e,"type","checkbox"),p(e,"id",t=n[7]),p(s,"class","txt"),p(r,"class","ri-information-line link-hint"),p(l,"for",a=n[7])},m(c,d){v(c,e,d),e.checked=n[0].pkce,v(c,i,d),v(c,l,d),w(l,s),w(l,o),w(l,r),u||(f=[B(e,"change",n[6]),Me(He.call(null,r,{text:"Usually it should be safe to be always enabled as most providers will just ignore the extra query parameters if they don't support PKCE.",position:"right"}))],u=!0)},p(c,d){d&128&&t!==(t=c[7])&&p(e,"id",t),d&1&&(e.checked=c[0].pkce),d&128&&a!==(a=c[7])&&p(l,"for",a)},d(c){c&&(k(e),k(i),k(l)),u=!1,De(f)}}}function s8(n){let e,t,i,l,s,o,r,a,u,f,c,d;return e=new fe({props:{class:"form-field required",name:n[1]+".displayName",$$slots:{default:[e8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),s=new fe({props:{class:"form-field required",name:n[1]+".authURL",$$slots:{default:[t8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),r=new fe({props:{class:"form-field required",name:n[1]+".tokenURL",$$slots:{default:[n8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),u=new fe({props:{class:"form-field required",name:n[1]+".userInfoURL",$$slots:{default:[i8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),c=new fe({props:{class:"form-field",name:n[1]+".pkce",$$slots:{default:[l8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=C(),i=b("div"),i.textContent="Endpoints",l=C(),H(s.$$.fragment),o=C(),H(r.$$.fragment),a=C(),H(u.$$.fragment),f=C(),H(c.$$.fragment),p(i,"class","section-title")},m(m,h){F(e,m,h),v(m,t,h),v(m,i,h),v(m,l,h),F(s,m,h),v(m,o,h),F(r,m,h),v(m,a,h),F(u,m,h),v(m,f,h),F(c,m,h),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".displayName"),h&385&&(g.$$scope={dirty:h,ctx:m}),e.$set(g);const _={};h&2&&(_.name=m[1]+".authURL"),h&385&&(_.$$scope={dirty:h,ctx:m}),s.$set(_);const y={};h&2&&(y.name=m[1]+".tokenURL"),h&385&&(y.$$scope={dirty:h,ctx:m}),r.$set(y);const S={};h&2&&(S.name=m[1]+".userInfoURL"),h&385&&(S.$$scope={dirty:h,ctx:m}),u.$set(S);const T={};h&2&&(T.name=m[1]+".pkce"),h&385&&(T.$$scope={dirty:h,ctx:m}),c.$set(T)},i(m){d||(O(e.$$.fragment,m),O(s.$$.fragment,m),O(r.$$.fragment,m),O(u.$$.fragment,m),O(c.$$.fragment,m),d=!0)},o(m){D(e.$$.fragment,m),D(s.$$.fragment,m),D(r.$$.fragment,m),D(u.$$.fragment,m),D(c.$$.fragment,m),d=!1},d(m){m&&(k(t),k(i),k(l),k(o),k(a),k(f)),q(e,m),q(s,m),q(r,m),q(u,m),q(c,m)}}}function o8(n,e,t){let{key:i=""}=e,{config:l={}}=e;z.isEmpty(l.pkce)&&(l.pkce=!0),l.displayName||(l.displayName="OIDC");function s(){l.displayName=this.value,t(0,l)}function o(){l.authURL=this.value,t(0,l)}function r(){l.tokenURL=this.value,t(0,l)}function a(){l.userInfoURL=this.value,t(0,l)}function u(){l.pkce=this.checked,t(0,l)}return n.$$set=f=>{"key"in f&&t(1,i=f.key),"config"in f&&t(0,l=f.config)},[l,i,s,o,r,a,u]}class ka extends ye{constructor(e){super(),be(this,e,o8,s8,_e,{key:1,config:0})}}function r8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Auth URL"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","url"),p(s,"id",o=n[8]),s.required=n[3]},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].authURL),r||(a=B(s,"input",n[5]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&8&&(s.required=u[3]),f&1&&s.value!==u[0].authURL&&ce(s,u[0].authURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function a8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Token URL"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","url"),p(s,"id",o=n[8]),s.required=n[3]},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].tokenURL),r||(a=B(s,"input",n[6]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&8&&(s.required=u[3]),f&1&&s.value!==u[0].tokenURL&&ce(s,u[0].tokenURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function u8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("User info URL"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","url"),p(s,"id",o=n[8]),s.required=n[3]},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].userInfoURL),r||(a=B(s,"input",n[7]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&8&&(s.required=u[3]),f&1&&s.value!==u[0].userInfoURL&&ce(s,u[0].userInfoURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function f8(n){let e,t,i,l,s,o,r,a,u;return l=new fe({props:{class:"form-field "+(n[3]?"required":""),name:n[1]+".authURL",$$slots:{default:[r8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),o=new fe({props:{class:"form-field "+(n[3]?"required":""),name:n[1]+".tokenURL",$$slots:{default:[a8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),a=new fe({props:{class:"form-field "+(n[3]?"required":""),name:n[1]+".userInfoURL",$$slots:{default:[u8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=Y(n[2]),i=C(),H(l.$$.fragment),s=C(),H(o.$$.fragment),r=C(),H(a.$$.fragment),p(e,"class","section-title")},m(f,c){v(f,e,c),w(e,t),v(f,i,c),F(l,f,c),v(f,s,c),F(o,f,c),v(f,r,c),F(a,f,c),u=!0},p(f,[c]){(!u||c&4)&&ue(t,f[2]);const d={};c&8&&(d.class="form-field "+(f[3]?"required":"")),c&2&&(d.name=f[1]+".authURL"),c&777&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const m={};c&8&&(m.class="form-field "+(f[3]?"required":"")),c&2&&(m.name=f[1]+".tokenURL"),c&777&&(m.$$scope={dirty:c,ctx:f}),o.$set(m);const h={};c&8&&(h.class="form-field "+(f[3]?"required":"")),c&2&&(h.name=f[1]+".userInfoURL"),c&777&&(h.$$scope={dirty:c,ctx:f}),a.$set(h)},i(f){u||(O(l.$$.fragment,f),O(o.$$.fragment,f),O(a.$$.fragment,f),u=!0)},o(f){D(l.$$.fragment,f),D(o.$$.fragment,f),D(a.$$.fragment,f),u=!1},d(f){f&&(k(e),k(i),k(s),k(r)),q(l,f),q(o,f),q(a,f)}}}function c8(n,e,t){let i,{key:l=""}=e,{config:s={}}=e,{required:o=!1}=e,{title:r="Provider endpoints"}=e;function a(){s.authURL=this.value,t(0,s)}function u(){s.tokenURL=this.value,t(0,s)}function f(){s.userInfoURL=this.value,t(0,s)}return n.$$set=c=>{"key"in c&&t(1,l=c.key),"config"in c&&t(0,s=c.config),"required"in c&&t(4,o=c.required),"title"in c&&t(2,r=c.title)},n.$$.update=()=>{n.$$.dirty&17&&t(3,i=o&&(s==null?void 0:s.enabled))},[s,l,r,i,o,a,u,f]}class va extends ye{constructor(e){super(),be(this,e,c8,f8,_e,{key:1,config:0,required:4,title:2})}}const ef=[{key:"apple",title:"Apple",logo:"apple.svg",optionsComponent:J6},{key:"google",title:"Google",logo:"google.svg"},{key:"microsoft",title:"Microsoft",logo:"microsoft.svg",optionsComponent:x6},{key:"yandex",title:"Yandex",logo:"yandex.svg"},{key:"facebook",title:"Facebook",logo:"facebook.svg"},{key:"instagram",title:"Instagram",logo:"instagram.svg"},{key:"github",title:"GitHub",logo:"github.svg"},{key:"gitlab",title:"GitLab",logo:"gitlab.svg",optionsComponent:va,optionsComponentProps:{title:"Self-hosted endpoints (optional)"}},{key:"bitbucket",title:"Bitbucket",logo:"bitbucket.svg"},{key:"gitee",title:"Gitee",logo:"gitee.svg"},{key:"gitea",title:"Gitea",logo:"gitea.svg",optionsComponent:va,optionsComponentProps:{title:"Self-hosted endpoints (optional)"}},{key:"discord",title:"Discord",logo:"discord.svg"},{key:"twitter",title:"Twitter",logo:"twitter.svg"},{key:"kakao",title:"Kakao",logo:"kakao.svg"},{key:"vk",title:"VK",logo:"vk.svg"},{key:"spotify",title:"Spotify",logo:"spotify.svg"},{key:"twitch",title:"Twitch",logo:"twitch.svg"},{key:"patreon",title:"Patreon (v2)",logo:"patreon.svg"},{key:"strava",title:"Strava",logo:"strava.svg"},{key:"livechat",title:"LiveChat",logo:"livechat.svg"},{key:"mailcow",title:"mailcow",logo:"mailcow.svg",optionsComponent:va,optionsComponentProps:{required:!0}},{key:"planningcenter",title:"Planning Center",logo:"planningcenter.svg"},{key:"oidc",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:ka},{key:"oidc2",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:ka},{key:"oidc3",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:ka}];function lm(n,e,t){const i=n.slice();return i[16]=e[t],i}function sm(n){let e,t,i,l,s;return{c(){e=b("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){v(o,e,r),i=!0,l||(s=B(e,"click",n[9]),l=!0)},p:te,i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Fn,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Fn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function d8(n){let e,t,i,l,s,o,r,a,u,f,c=n[1]!=""&&sm(n);return{c(){e=b("label"),t=b("i"),l=C(),s=b("input"),r=C(),c&&c.c(),a=ge(),p(t,"class","ri-search-line"),p(e,"for",i=n[19]),p(e,"class","m-l-10 txt-xl"),p(s,"id",o=n[19]),p(s,"type","text"),p(s,"placeholder","Search provider")},m(d,m){v(d,e,m),w(e,t),v(d,l,m),v(d,s,m),ce(s,n[1]),v(d,r,m),c&&c.m(d,m),v(d,a,m),u||(f=B(s,"input",n[8]),u=!0)},p(d,m){m&524288&&i!==(i=d[19])&&p(e,"for",i),m&524288&&o!==(o=d[19])&&p(s,"id",o),m&2&&s.value!==d[1]&&ce(s,d[1]),d[1]!=""?c?(c.p(d,m),m&2&&O(c,1)):(c=sm(d),c.c(),O(c,1),c.m(a.parentNode,a)):c&&(re(),D(c,1,1,()=>{c=null}),ae())},d(d){d&&(k(e),k(l),k(s),k(r),k(a)),c&&c.d(d),u=!1,f()}}}function om(n){let e,t,i,l,s=n[1]!=""&&rm(n);return{c(){e=b("div"),t=b("span"),t.textContent="No providers to select.",i=C(),s&&s.c(),l=C(),p(t,"class","txt-hint"),p(e,"class","flex inline-flex")},m(o,r){v(o,e,r),w(e,t),w(e,i),s&&s.m(e,null),w(e,l)},p(o,r){o[1]!=""?s?s.p(o,r):(s=rm(o),s.c(),s.m(e,l)):s&&(s.d(1),s=null)},d(o){o&&k(e),s&&s.d()}}}function rm(n){let e,t,i;return{c(){e=b("button"),e.textContent="Clear filter",p(e,"type","button"),p(e,"class","btn btn-sm btn-secondary")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[5]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function am(n){let e,t,i;return{c(){e=b("img"),vn(e.src,t="./images/oauth2/"+n[16].logo)||p(e,"src",t),p(e,"alt",i=n[16].title+" logo")},m(l,s){v(l,e,s)},p(l,s){s&8&&!vn(e.src,t="./images/oauth2/"+l[16].logo)&&p(e,"src",t),s&8&&i!==(i=l[16].title+" logo")&&p(e,"alt",i)},d(l){l&&k(e)}}}function um(n,e){let t,i,l,s,o,r,a=e[16].title+"",u,f,c,d=e[16].key+"",m,h,g,_,y=e[16].logo&&am(e);function S(){return e[10](e[16])}return{key:n,first:null,c(){t=b("div"),i=b("button"),l=b("figure"),y&&y.c(),s=C(),o=b("div"),r=b("div"),u=Y(a),f=C(),c=b("em"),m=Y(d),h=C(),p(l,"class","provider-logo"),p(r,"class","title"),p(c,"class","txt-hint txt-sm m-r-auto"),p(o,"class","content"),p(i,"type","button"),p(i,"class","provider-card handle"),p(t,"class","col-lg-6"),this.first=t},m(T,$){v(T,t,$),w(t,i),w(i,l),y&&y.m(l,null),w(i,s),w(i,o),w(o,r),w(r,u),w(o,f),w(o,c),w(c,m),w(t,h),g||(_=B(i,"click",S),g=!0)},p(T,$){e=T,e[16].logo?y?y.p(e,$):(y=am(e),y.c(),y.m(l,null)):y&&(y.d(1),y=null),$&8&&a!==(a=e[16].title+"")&&ue(u,a),$&8&&d!==(d=e[16].key+"")&&ue(m,d)},d(T){T&&k(t),y&&y.d(),g=!1,_()}}}function p8(n){let e,t,i,l=[],s=new Map,o;e=new fe({props:{class:"searchbar m-b-sm",$$slots:{default:[d8,({uniqueId:f})=>({19:f}),({uniqueId:f})=>f?524288:0]},$$scope:{ctx:n}}});let r=pe(n[3]);const a=f=>f[16].key;for(let f=0;f!l.includes($.key)&&(T==""||$.key.toLowerCase().includes(T)||$.title.toLowerCase().includes(T)))}function d(){t(1,o="")}function m(){o=this.value,t(1,o)}const h=()=>t(1,o=""),g=T=>f(T);function _(T){ie[T?"unshift":"push"](()=>{s=T,t(2,s)})}function y(T){Pe.call(this,n,T)}function S(T){Pe.call(this,n,T)}return n.$$set=T=>{"disabled"in T&&t(6,l=T.disabled)},n.$$.update=()=>{n.$$.dirty&66&&(o!==-1||l!==-1)&&t(3,r=c())},[u,o,s,r,f,d,l,a,m,h,g,_,y,S]}class b8 extends ye{constructor(e){super(),be(this,e,g8,_8,_e,{disabled:6,show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function fm(n,e,t){const i=n.slice();i[28]=e[t],i[31]=t;const l=i[9](i[28].name);return i[29]=l,i}function y8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[27]),p(l,"for",o=n[27])},m(u,f){v(u,e,f),e.checked=n[0].oauth2.enabled,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[10]),r=!0)},p(u,f){f[0]&134217728&&t!==(t=u[27])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].oauth2.enabled),f[0]&134217728&&o!==(o=u[27])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function k8(n){let e;return{c(){e=b("i"),p(e,"class","ri-puzzle-line txt-sm txt-hint")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function v8(n){let e,t,i;return{c(){e=b("img"),vn(e.src,t="./images/oauth2/"+n[29].logo)||p(e,"src",t),p(e,"alt",i=n[29].title+" logo")},m(l,s){v(l,e,s)},p(l,s){s[0]&1&&!vn(e.src,t="./images/oauth2/"+l[29].logo)&&p(e,"src",t),s[0]&1&&i!==(i=l[29].title+" logo")&&p(e,"alt",i)},d(l){l&&k(e)}}}function cm(n){let e,t,i;function l(){return n[11](n[29],n[28],n[31])}return{c(){e=b("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-circle btn-hint btn-transparent"),p(e,"aria-label","Provider settings")},m(s,o){v(s,e,o),t||(i=[Me(He.call(null,e,{text:"Edit config",position:"left"})),B(e,"click",l)],t=!0)},p(s,o){n=s},d(s){s&&k(e),t=!1,De(i)}}}function dm(n,e){var T;let t,i,l,s,o,r,a=(e[28].displayName||((T=e[29])==null?void 0:T.title)||"Custom")+"",u,f,c,d=e[28].name+"",m,h;function g($,E){var M;return(M=$[29])!=null&&M.logo?v8:k8}let _=g(e),y=_(e),S=e[29]&&cm(e);return{key:n,first:null,c(){var $,E,M;t=b("div"),i=b("div"),l=b("figure"),y.c(),s=C(),o=b("div"),r=b("div"),u=Y(a),f=C(),c=b("em"),m=Y(d),h=C(),S&&S.c(),p(l,"class","provider-logo"),p(r,"class","title"),p(c,"class","txt-hint txt-sm m-r-auto"),p(o,"class","content"),p(i,"class","provider-card"),Q(i,"error",!z.isEmpty((M=(E=($=e[1])==null?void 0:$.oauth2)==null?void 0:E.providers)==null?void 0:M[e[31]])),p(t,"class","col-lg-6"),this.first=t},m($,E){v($,t,E),w(t,i),w(i,l),y.m(l,null),w(i,s),w(i,o),w(o,r),w(r,u),w(o,f),w(o,c),w(c,m),w(i,h),S&&S.m(i,null)},p($,E){var M,L,I,A;e=$,_===(_=g(e))&&y?y.p(e,E):(y.d(1),y=_(e),y&&(y.c(),y.m(l,null))),E[0]&1&&a!==(a=(e[28].displayName||((M=e[29])==null?void 0:M.title)||"Custom")+"")&&ue(u,a),E[0]&1&&d!==(d=e[28].name+"")&&ue(m,d),e[29]?S?S.p(e,E):(S=cm(e),S.c(),S.m(i,null)):S&&(S.d(1),S=null),E[0]&3&&Q(i,"error",!z.isEmpty((A=(I=(L=e[1])==null?void 0:L.oauth2)==null?void 0:I.providers)==null?void 0:A[e[31]]))},d($){$&&k(t),y.d(),S&&S.d()}}}function w8(n){let e;return{c(){e=b("i"),p(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function S8(n){let e;return{c(){e=b("i"),p(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function pm(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g;return l=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.mappedFields.name",$$slots:{default:[T8,({uniqueId:_})=>({27:_}),({uniqueId:_})=>[_?134217728:0]]},$$scope:{ctx:n}}}),r=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.mappedFields.avatarURL",$$slots:{default:[$8,({uniqueId:_})=>({27:_}),({uniqueId:_})=>[_?134217728:0]]},$$scope:{ctx:n}}}),f=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.mappedFields.id",$$slots:{default:[C8,({uniqueId:_})=>({27:_}),({uniqueId:_})=>[_?134217728:0]]},$$scope:{ctx:n}}}),m=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.mappedFields.username",$$slots:{default:[O8,({uniqueId:_})=>({27:_}),({uniqueId:_})=>[_?134217728:0]]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),i=b("div"),H(l.$$.fragment),s=C(),o=b("div"),H(r.$$.fragment),a=C(),u=b("div"),H(f.$$.fragment),c=C(),d=b("div"),H(m.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-6"),p(d,"class","col-sm-6"),p(t,"class","grid grid-sm p-t-xs"),p(e,"class","block")},m(_,y){v(_,e,y),w(e,t),w(t,i),F(l,i,null),w(t,s),w(t,o),F(r,o,null),w(t,a),w(t,u),F(f,u,null),w(t,c),w(t,d),F(m,d,null),g=!0},p(_,y){const S={};y[0]&134217761|y[1]&2&&(S.$$scope={dirty:y,ctx:_}),l.$set(S);const T={};y[0]&134217793|y[1]&2&&(T.$$scope={dirty:y,ctx:_}),r.$set(T);const $={};y[0]&134217761|y[1]&2&&($.$$scope={dirty:y,ctx:_}),f.$set($);const E={};y[0]&134217761|y[1]&2&&(E.$$scope={dirty:y,ctx:_}),m.$set(E)},i(_){g||(O(l.$$.fragment,_),O(r.$$.fragment,_),O(f.$$.fragment,_),O(m.$$.fragment,_),_&&nt(()=>{g&&(h||(h=ze(e,wt,{duration:150},!0)),h.run(1))}),g=!0)},o(_){D(l.$$.fragment,_),D(r.$$.fragment,_),D(f.$$.fragment,_),D(m.$$.fragment,_),_&&(h||(h=ze(e,wt,{duration:150},!1)),h.run(0)),g=!1},d(_){_&&k(e),q(l),q(r),q(f),q(m),_&&h&&h.end()}}}function T8(n){let e,t,i,l,s,o,r;function a(f){n[14](f)}let u={id:n[27],items:n[5],toggle:!0,zeroFunc:A8,selectPlaceholder:"Select field"};return n[0].oauth2.mappedFields.name!==void 0&&(u.selected=n[0].oauth2.mappedFields.name),s=new ds({props:u}),ie.push(()=>ve(s,"selected",a)),{c(){e=b("label"),t=Y("OAuth2 full name"),l=C(),H(s.$$.fragment),p(e,"for",i=n[27])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c[0]&134217728&&i!==(i=f[27]))&&p(e,"for",i);const d={};c[0]&134217728&&(d.id=f[27]),c[0]&32&&(d.items=f[5]),!o&&c[0]&1&&(o=!0,d.selected=f[0].oauth2.mappedFields.name,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function $8(n){let e,t,i,l,s,o,r;function a(f){n[15](f)}let u={id:n[27],items:n[6],toggle:!0,zeroFunc:P8,selectPlaceholder:"Select field"};return n[0].oauth2.mappedFields.avatarURL!==void 0&&(u.selected=n[0].oauth2.mappedFields.avatarURL),s=new ds({props:u}),ie.push(()=>ve(s,"selected",a)),{c(){e=b("label"),t=Y("OAuth2 avatar"),l=C(),H(s.$$.fragment),p(e,"for",i=n[27])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c[0]&134217728&&i!==(i=f[27]))&&p(e,"for",i);const d={};c[0]&134217728&&(d.id=f[27]),c[0]&64&&(d.items=f[6]),!o&&c[0]&1&&(o=!0,d.selected=f[0].oauth2.mappedFields.avatarURL,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function C8(n){let e,t,i,l,s,o,r;function a(f){n[16](f)}let u={id:n[27],items:n[5],toggle:!0,zeroFunc:N8,selectPlaceholder:"Select field"};return n[0].oauth2.mappedFields.id!==void 0&&(u.selected=n[0].oauth2.mappedFields.id),s=new ds({props:u}),ie.push(()=>ve(s,"selected",a)),{c(){e=b("label"),t=Y("OAuth2 id"),l=C(),H(s.$$.fragment),p(e,"for",i=n[27])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c[0]&134217728&&i!==(i=f[27]))&&p(e,"for",i);const d={};c[0]&134217728&&(d.id=f[27]),c[0]&32&&(d.items=f[5]),!o&&c[0]&1&&(o=!0,d.selected=f[0].oauth2.mappedFields.id,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function O8(n){let e,t,i,l,s,o,r;function a(f){n[17](f)}let u={id:n[27],items:n[5],toggle:!0,zeroFunc:R8,selectPlaceholder:"Select field"};return n[0].oauth2.mappedFields.username!==void 0&&(u.selected=n[0].oauth2.mappedFields.username),s=new ds({props:u}),ie.push(()=>ve(s,"selected",a)),{c(){e=b("label"),t=Y("OAuth2 username"),l=C(),H(s.$$.fragment),p(e,"for",i=n[27])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c[0]&134217728&&i!==(i=f[27]))&&p(e,"for",i);const d={};c[0]&134217728&&(d.id=f[27]),c[0]&32&&(d.items=f[5]),!o&&c[0]&1&&(o=!0,d.selected=f[0].oauth2.mappedFields.username,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function E8(n){let e,t,i,l=[],s=new Map,o,r,a,u,f,c,d,m=n[0].name+"",h,g,_,y,S,T,$,E,M;e=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.enabled",$$slots:{default:[y8,({uniqueId:U})=>({27:U}),({uniqueId:U})=>[U?134217728:0]]},$$scope:{ctx:n}}});let L=pe(n[0].oauth2.providers);const I=U=>U[28].name;for(let U=0;U Add provider',u=C(),f=b("button"),c=b("strong"),d=Y("Optional "),h=Y(m),g=Y(" create fields map"),_=C(),R.c(),S=C(),N&&N.c(),T=ge(),p(a,"class","btn btn-block btn-lg btn-secondary txt-base"),p(r,"class","col-lg-6"),p(i,"class","grid grid-sm"),p(c,"class","txt"),p(f,"type","button"),p(f,"class",y="m-t-25 btn btn-sm "+(n[4]?"btn-secondary":"btn-hint btn-transparent"))},m(U,j){F(e,U,j),v(U,t,j),v(U,i,j);for(let V=0;V{N=null}),ae())},i(U){$||(O(e.$$.fragment,U),O(N),$=!0)},o(U){D(e.$$.fragment,U),D(N),$=!1},d(U){U&&(k(t),k(i),k(u),k(f),k(S),k(T)),q(e,U);for(let j=0;j0),p(r,"class","label label-success")},m(a,u){v(a,e,u),w(e,t),w(e,i),w(e,s),v(a,o,u),v(a,r,u)},p(a,u){u[0]&128&&ue(t,a[7]),u[0]&128&&l!==(l=a[7]==1?"provider":"providers")&&ue(s,l),u[0]&128&&Q(e,"label-warning",!a[7]),u[0]&128&&Q(e,"label-info",a[7]>0)},d(a){a&&(k(e),k(o),k(r))}}}function mm(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){v(o,e,r),i=!0,l||(s=Me(He.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function I8(n){let e,t,i,l,s,o;function r(c,d){return c[0].oauth2.enabled?D8:M8}let a=r(n),u=a(n),f=n[8]&&mm();return{c(){e=b("div"),e.innerHTML=' OAuth2',t=C(),i=b("div"),l=C(),u.c(),s=C(),f&&f.c(),o=ge(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){v(c,e,d),v(c,t,d),v(c,i,d),v(c,l,d),u.m(c,d),v(c,s,d),f&&f.m(c,d),v(c,o,d)},p(c,d){a===(a=r(c))&&u?u.p(c,d):(u.d(1),u=a(c),u&&(u.c(),u.m(s.parentNode,s))),c[8]?f?d[0]&256&&O(f,1):(f=mm(),f.c(),O(f,1),f.m(o.parentNode,o)):f&&(re(),D(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(l),k(s),k(o)),u.d(c),f&&f.d(c)}}}function L8(n){var u,f;let e,t,i,l,s,o;e=new qi({props:{single:!0,$$slots:{header:[I8],default:[E8]},$$scope:{ctx:n}}});let r={disabled:((f=(u=n[0].oauth2)==null?void 0:u.providers)==null?void 0:f.map(hm))||[]};i=new b8({props:r}),n[18](i),i.$on("select",n[19]);let a={};return s=new P6({props:a}),n[20](s),s.$on("remove",n[21]),s.$on("submit",n[22]),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment),l=C(),H(s.$$.fragment)},m(c,d){F(e,c,d),v(c,t,d),F(i,c,d),v(c,l,d),F(s,c,d),o=!0},p(c,d){var _,y;const m={};d[0]&511|d[1]&2&&(m.$$scope={dirty:d,ctx:c}),e.$set(m);const h={};d[0]&1&&(h.disabled=((y=(_=c[0].oauth2)==null?void 0:_.providers)==null?void 0:y.map(hm))||[]),i.$set(h);const g={};s.$set(g)},i(c){o||(O(e.$$.fragment,c),O(i.$$.fragment,c),O(s.$$.fragment,c),o=!0)},o(c){D(e.$$.fragment,c),D(i.$$.fragment,c),D(s.$$.fragment,c),o=!1},d(c){c&&(k(t),k(l)),q(e,c),n[18](null),q(i,c),n[20](null),q(s,c)}}}const A8=()=>"",P8=()=>"",N8=()=>"",R8=()=>"",hm=n=>n.name;function F8(n,e,t){let i,l,s;Qe(n,Sn,j=>t(1,s=j));let{collection:o}=e;const r=["id","email","emailVisibility","verified","tokenKey","password"],a=["text","editor","url","email","json"],u=a.concat("file");let f,c,d=!1,m=[],h=[];function g(j=[]){var V,K;t(5,m=((V=j==null?void 0:j.filter(J=>a.includes(J.type)&&!r.includes(J.name)))==null?void 0:V.map(J=>J.name))||[]),t(6,h=((K=j==null?void 0:j.filter(J=>u.includes(J.type)&&!r.includes(J.name)))==null?void 0:K.map(J=>J.name))||[])}function _(j){for(let V of ef)if(V.key==j)return V;return null}function y(){o.oauth2.enabled=this.checked,t(0,o)}const S=(j,V,K)=>{c==null||c.show(j,V,K)},T=()=>f==null?void 0:f.show(),$=()=>t(4,d=!d);function E(j){n.$$.not_equal(o.oauth2.mappedFields.name,j)&&(o.oauth2.mappedFields.name=j,t(0,o))}function M(j){n.$$.not_equal(o.oauth2.mappedFields.avatarURL,j)&&(o.oauth2.mappedFields.avatarURL=j,t(0,o))}function L(j){n.$$.not_equal(o.oauth2.mappedFields.id,j)&&(o.oauth2.mappedFields.id=j,t(0,o))}function I(j){n.$$.not_equal(o.oauth2.mappedFields.username,j)&&(o.oauth2.mappedFields.username=j,t(0,o))}function A(j){ie[j?"unshift":"push"](()=>{f=j,t(2,f)})}const P=j=>{var V,K;c.show(j.detail,{},((K=(V=o.oauth2)==null?void 0:V.providers)==null?void 0:K.length)||0)};function R(j){ie[j?"unshift":"push"](()=>{c=j,t(3,c)})}const N=j=>{const V=j.detail.uiOptions;z.removeByKey(o.oauth2.providers,"name",V.key),t(0,o)},U=j=>{const V=j.detail.uiOptions,K=j.detail.config;t(0,o.oauth2.providers=o.oauth2.providers||[],o),z.pushOrReplaceByKey(o.oauth2.providers,Object.assign({name:V.key},K),"name"),t(0,o)};return n.$$set=j=>{"collection"in j&&t(0,o=j.collection)},n.$$.update=()=>{var j,V;n.$$.dirty[0]&1&&z.isEmpty(o.oauth2)&&t(0,o.oauth2={enabled:!1,mappedFields:{},providers:[]},o),n.$$.dirty[0]&1&&g(o.fields),n.$$.dirty[0]&2&&t(8,i=!z.isEmpty(s==null?void 0:s.oauth2)),n.$$.dirty[0]&1&&t(7,l=((V=(j=o.oauth2)==null?void 0:j.providers)==null?void 0:V.length)||0)},[o,s,f,c,d,m,h,l,i,_,y,S,T,$,E,M,L,I,A,P,R,N,U]}class q8 extends ye{constructor(e){super(),be(this,e,F8,L8,_e,{collection:0},null,[-1,-1])}}function _m(n){let e,t,i;return{c(){e=b("i"),p(e,"class","ri-information-line link-hint")},m(l,s){v(l,e,s),t||(i=Me(He.call(null,e,{text:"Superusers can have OTP only as part of Two-factor authentication.",position:"right"})),t=!0)},d(l){l&&k(e),t=!1,i()}}}function H8(n){let e,t,i,l,s,o,r,a,u,f,c=n[2]&&_m();return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable"),r=C(),c&&c.c(),a=ge(),p(e,"type","checkbox"),p(e,"id",t=n[8]),p(l,"for",o=n[8])},m(d,m){v(d,e,m),e.checked=n[0].otp.enabled,v(d,i,m),v(d,l,m),w(l,s),v(d,r,m),c&&c.m(d,m),v(d,a,m),u||(f=[B(e,"change",n[4]),B(e,"change",n[5])],u=!0)},p(d,m){m&256&&t!==(t=d[8])&&p(e,"id",t),m&1&&(e.checked=d[0].otp.enabled),m&256&&o!==(o=d[8])&&p(l,"for",o),d[2]?c||(c=_m(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&(k(e),k(i),k(l),k(r),k(a)),c&&c.d(d),u=!1,De(f)}}}function j8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Duration (in seconds)"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","number"),p(s,"min","0"),p(s,"step","1"),p(s,"id",o=n[8]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].otp.duration),r||(a=B(s,"input",n[6]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&1&&_t(s.value)!==u[0].otp.duration&&ce(s,u[0].otp.duration)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function z8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Generated password length"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","number"),p(s,"min","0"),p(s,"step","1"),p(s,"id",o=n[8]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].otp.length),r||(a=B(s,"input",n[7]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&1&&_t(s.value)!==u[0].otp.length&&ce(s,u[0].otp.length)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function U8(n){let e,t,i,l,s,o,r,a,u;return e=new fe({props:{class:"form-field form-field-toggle",name:"otp.enabled",$$slots:{default:[H8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),s=new fe({props:{class:"form-field form-field-toggle required",name:"otp.duration",$$slots:{default:[j8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),a=new fe({props:{class:"form-field form-field-toggle required",name:"otp.length",$$slots:{default:[z8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=C(),i=b("div"),l=b("div"),H(s.$$.fragment),o=C(),r=b("div"),H(a.$$.fragment),p(l,"class","col-sm-6"),p(r,"class","col-sm-6"),p(i,"class","grid grid-sm")},m(f,c){F(e,f,c),v(f,t,c),v(f,i,c),w(i,l),F(s,l,null),w(i,o),w(i,r),F(a,r,null),u=!0},p(f,c){const d={};c&773&&(d.$$scope={dirty:c,ctx:f}),e.$set(d);const m={};c&769&&(m.$$scope={dirty:c,ctx:f}),s.$set(m);const h={};c&769&&(h.$$scope={dirty:c,ctx:f}),a.$set(h)},i(f){u||(O(e.$$.fragment,f),O(s.$$.fragment,f),O(a.$$.fragment,f),u=!0)},o(f){D(e.$$.fragment,f),D(s.$$.fragment,f),D(a.$$.fragment,f),u=!1},d(f){f&&(k(t),k(i)),q(e,f),q(s),q(a)}}}function V8(n){let e;return{c(){e=b("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function B8(n){let e;return{c(){e=b("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function gm(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){v(o,e,r),i=!0,l||(s=Me(He.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function W8(n){let e,t,i,l,s,o;function r(c,d){return c[0].otp.enabled?B8:V8}let a=r(n),u=a(n),f=n[1]&&gm();return{c(){e=b("div"),e.innerHTML=' One-time password (OTP)',t=C(),i=b("div"),l=C(),u.c(),s=C(),f&&f.c(),o=ge(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){v(c,e,d),v(c,t,d),v(c,i,d),v(c,l,d),u.m(c,d),v(c,s,d),f&&f.m(c,d),v(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(s.parentNode,s))),c[1]?f?d&2&&O(f,1):(f=gm(),f.c(),O(f,1),f.m(o.parentNode,o)):f&&(re(),D(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(l),k(s),k(o)),u.d(c),f&&f.d(c)}}}function Y8(n){let e,t;return e=new qi({props:{single:!0,$$slots:{header:[W8],default:[U8]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&519&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function K8(n,e,t){let i,l,s;Qe(n,Sn,c=>t(3,s=c));let{collection:o}=e;function r(){o.otp.enabled=this.checked,t(0,o)}const a=c=>{i&&t(0,o.mfa.enabled=c.target.checked,o)};function u(){o.otp.duration=_t(this.value),t(0,o)}function f(){o.otp.length=_t(this.value),t(0,o)}return n.$$set=c=>{"collection"in c&&t(0,o=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&z.isEmpty(o.otp)&&t(0,o.otp={enabled:!0,duration:300,length:8},o),n.$$.dirty&1&&t(2,i=(o==null?void 0:o.system)&&(o==null?void 0:o.name)==="_superusers"),n.$$.dirty&8&&t(1,l=!z.isEmpty(s==null?void 0:s.otp))},[o,l,i,s,r,a,u,f]}class J8 extends ye{constructor(e){super(),be(this,e,K8,Y8,_e,{collection:0})}}function bm(n){let e,t;return{c(){e=b("i"),p(e,"class",t="icon "+n[0].icon)},m(i,l){v(i,e,l)},p(i,l){l&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&k(e)}}}function Z8(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",l,s=n[0].icon&&bm(n);return{c(){s&&s.c(),e=C(),t=b("span"),l=Y(i),p(t,"class","txt")},m(o,r){s&&s.m(o,r),v(o,e,r),v(o,t,r),w(t,l)},p(o,[r]){o[0].icon?s?s.p(o,r):(s=bm(o),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&ue(l,i)},i:te,o:te,d(o){o&&(k(e),k(t)),s&&s.d(o)}}}function G8(n,e,t){let{item:i={}}=e;return n.$$set=l=>{"item"in l&&t(0,i=l.item)},[i]}class ym extends ye{constructor(e){super(),be(this,e,G8,Z8,_e,{item:0})}}const X8=n=>({}),km=n=>({});function Q8(n){let e;const t=n[8].afterOptions,i=Lt(t,n,n[12],km);return{c(){i&&i.c()},m(l,s){i&&i.m(l,s),e=!0},p(l,s){i&&i.p&&(!e||s&4096)&&Pt(i,t,l,l[12],e?At(t,l[12],s,X8):Nt(l[12]),km)},i(l){e||(O(i,l),e=!0)},o(l){D(i,l),e=!1},d(l){i&&i.d(l)}}}function x8(n){let e,t,i;const l=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function s(r){n[9](r)}let o={$$slots:{afterOptions:[Q8]},$$scope:{ctx:n}};for(let r=0;rve(e,"selected",s)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){H(e.$$.fragment)},m(r,a){F(e,r,a),i=!0},p(r,[a]){const u=a&62?vt(l,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Ft(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||(O(e.$$.fragment,r),i=!0)},o(r){D(e.$$.fragment,r),i=!1},d(r){q(e,r)}}}function eO(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let l=lt(e,i),{$$slots:s={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=ym}=e,{optionComponent:c=ym}=e,{selectionKey:d="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function h(T){T=z.toArray(T,!0);let $=[];for(let E of T){const M=z.findByKey(r,d,E);M&&$.push(M)}T.length&&!$.length||t(0,u=a?$:$[0])}async function g(T){let $=z.toArray(T,!0).map(E=>E[d]);r.length&&t(6,m=a?$:$[0])}function _(T){u=T,t(0,u)}function y(T){Pe.call(this,n,T)}function S(T){Pe.call(this,n,T)}return n.$$set=T=>{e=je(je({},e),Ut(T)),t(5,l=lt(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,m=T.keyOfSelected),"$$scope"in T&&t(12,o=T.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&h(m),n.$$.dirty&1&&g(u)},[u,r,a,f,c,l,m,d,s,_,y,S,o]}class xn extends ye{constructor(e){super(),be(this,e,eO,x8,_e,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function vm(n){let e,t,i;return{c(){e=b("i"),p(e,"class","ri-information-line link-hint")},m(l,s){v(l,e,s),t||(i=Me(He.call(null,e,{text:"Superusers are required to have password auth enabled.",position:"right"})),t=!0)},d(l){l&&k(e),t=!1,i()}}}function tO(n){let e,t,i,l,s,o,r,a,u,f,c=n[3]&&vm();return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable"),r=C(),c&&c.c(),a=ge(),p(e,"type","checkbox"),p(e,"id",t=n[8]),e.disabled=n[3],p(l,"for",o=n[8])},m(d,m){v(d,e,m),e.checked=n[0].passwordAuth.enabled,v(d,i,m),v(d,l,m),w(l,s),v(d,r,m),c&&c.m(d,m),v(d,a,m),u||(f=B(e,"change",n[5]),u=!0)},p(d,m){m&256&&t!==(t=d[8])&&p(e,"id",t),m&8&&(e.disabled=d[3]),m&1&&(e.checked=d[0].passwordAuth.enabled),m&256&&o!==(o=d[8])&&p(l,"for",o),d[3]?c||(c=vm(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&(k(e),k(i),k(l),k(r),k(a)),c&&c.d(d),u=!1,f()}}}function nO(n){let e,t,i,l,s,o,r;function a(f){n[6](f)}let u={items:n[1],multiple:!0};return n[0].passwordAuth.identityFields!==void 0&&(u.keyOfSelected=n[0].passwordAuth.identityFields),s=new xn({props:u}),ie.push(()=>ve(s,"keyOfSelected",a)),{c(){e=b("label"),t=b("span"),t.textContent="Unique identity fields",l=C(),H(s.$$.fragment),p(t,"class","txt"),p(e,"for",i=n[8])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c&256&&i!==(i=f[8]))&&p(e,"for",i);const d={};c&2&&(d.items=f[1]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].passwordAuth.identityFields,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function iO(n){let e,t,i,l;return e=new fe({props:{class:"form-field form-field-toggle",name:"passwordAuth.enabled",$$slots:{default:[tO,({uniqueId:s})=>({8:s}),({uniqueId:s})=>s?256:0]},$$scope:{ctx:n}}}),i=new fe({props:{class:"form-field required m-0",name:"passwordAuth.identityFields",$$slots:{default:[nO,({uniqueId:s})=>({8:s}),({uniqueId:s})=>s?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment)},m(s,o){F(e,s,o),v(s,t,o),F(i,s,o),l=!0},p(s,o){const r={};o&777&&(r.$$scope={dirty:o,ctx:s}),e.$set(r);const a={};o&771&&(a.$$scope={dirty:o,ctx:s}),i.$set(a)},i(s){l||(O(e.$$.fragment,s),O(i.$$.fragment,s),l=!0)},o(s){D(e.$$.fragment,s),D(i.$$.fragment,s),l=!1},d(s){s&&k(t),q(e,s),q(i,s)}}}function lO(n){let e;return{c(){e=b("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function sO(n){let e;return{c(){e=b("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function wm(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){v(o,e,r),i=!0,l||(s=Me(He.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function oO(n){let e,t,i,l,s,o;function r(c,d){return c[0].passwordAuth.enabled?sO:lO}let a=r(n),u=a(n),f=n[2]&&wm();return{c(){e=b("div"),e.innerHTML=' Identity/Password',t=C(),i=b("div"),l=C(),u.c(),s=C(),f&&f.c(),o=ge(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){v(c,e,d),v(c,t,d),v(c,i,d),v(c,l,d),u.m(c,d),v(c,s,d),f&&f.m(c,d),v(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(s.parentNode,s))),c[2]?f?d&4&&O(f,1):(f=wm(),f.c(),O(f,1),f.m(o.parentNode,o)):f&&(re(),D(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(l),k(s),k(o)),u.d(c),f&&f.d(c)}}}function rO(n){let e,t;return e=new qi({props:{single:!0,$$slots:{header:[oO],default:[iO]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&527&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function aO(n,e,t){let i,l,s;Qe(n,Sn,c=>t(4,s=c));let{collection:o}=e,r=[];function a(c){const d=[{value:"email"}],m=(c==null?void 0:c.fields)||[],h=(c==null?void 0:c.indexes)||[];for(let g of h){const _=z.parseIndex(g);if(!_.unique||_.columns.length!=1||_.columns[0].name=="email")continue;const y=m.find(S=>!S.hidden&&S.name.toLowerCase()==_.columns[0].name.toLowerCase());y&&d.push({value:y.name})}return d}Yt(()=>{t(1,r=a(o))});function u(){o.passwordAuth.enabled=this.checked,t(0,o)}function f(c){n.$$.not_equal(o.passwordAuth.identityFields,c)&&(o.passwordAuth.identityFields=c,t(0,o))}return n.$$set=c=>{"collection"in c&&t(0,o=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&z.isEmpty(o.passwordAuth)&&t(0,o.passwordAuth={enabled:!0,identityFields:["email"]},o),n.$$.dirty&1&&t(3,i=(o==null?void 0:o.system)&&(o==null?void 0:o.name)==="_superusers"),n.$$.dirty&16&&t(2,l=!z.isEmpty(s==null?void 0:s.passwordAuth))},[o,r,l,i,s,u,f]}class uO extends ye{constructor(e){super(),be(this,e,aO,rO,_e,{collection:0})}}function Sm(n,e,t){const i=n.slice();return i[22]=e[t],i}function Tm(n,e){let t,i,l,s,o,r=e[22].label+"",a,u,f,c,d,m;return c=wk(e[11][0]),{key:n,first:null,c(){t=b("div"),i=b("input"),s=C(),o=b("label"),a=Y(r),f=C(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",l=e[21]+e[22].value),i.__value=e[22].value,ce(i,i.__value),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),c.p(i),this.first=t},m(h,g){v(h,t,g),w(t,i),i.checked=i.__value===e[2],w(t,s),w(t,o),w(o,a),w(t,f),d||(m=B(i,"change",e[10]),d=!0)},p(h,g){e=h,g&2097152&&l!==(l=e[21]+e[22].value)&&p(i,"id",l),g&4&&(i.checked=i.__value===e[2]),g&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(h){h&&k(t),c.r(),d=!1,m()}}}function fO(n){let e=[],t=new Map,i,l=pe(n[7]);const s=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),l=new fe({props:{class:"form-field required m-0",name:"email",$$slots:{default:[cO,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),H(t.$$.fragment),i=C(),H(l.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){v(a,e,u),F(t,e,null),w(e,i),F(l,e,null),s=!0,o||(r=B(e,"submit",tt(n[13])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),l.$set(c)},i(a){s||(O(t.$$.fragment,a),O(l.$$.fragment,a),s=!0)},o(a){D(t.$$.fragment,a),D(l.$$.fragment,a),s=!1},d(a){a&&k(e),q(t),q(l),o=!1,r()}}}function pO(n){let e;return{c(){e=b("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function mO(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("button"),t=Y("Close"),i=C(),l=b("button"),s=b("i"),o=C(),r=b("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(s,"class","ri-mail-send-line"),p(r,"class","txt"),p(l,"type","submit"),p(l,"form",n[6]),p(l,"class","btn btn-expanded"),l.disabled=a=!n[5]||n[4],Q(l,"btn-loading",n[4])},m(c,d){v(c,e,d),w(e,t),v(c,i,d),v(c,l,d),w(l,s),w(l,o),w(l,r),u||(f=B(e,"click",n[0]),u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(l.disabled=a),d&16&&Q(l,"btn-loading",c[4])},d(c){c&&(k(e),k(i),k(l)),u=!1,f()}}}function hO(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:[mO],header:[pO],default:[dO]},$$scope:{ctx:n}};return e=new ln({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&16&&(o.overlayClose=!l[4]),s&16&&(o.escClose=!l[4]),s&16&&(o.beforeHide=l[14]),s&33554486&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[15](null),q(e,l)}}}const wa="last_email_test",$m="email_test_request";function _O(n,e,t){let i;const l=gt(),s="email_test_"+z.randomString(5),o=[{label:"Verification",value:"verification"},{label:"Password reset",value:"password-reset"},{label:"Confirm email change",value:"email-change"},{label:"OTP",value:"otp"},{label:"Login alert",value:"login-alert"}];let r,a="",u=localStorage.getItem(wa),f=o[0].value,c=!1,d=null;function m(I="",A="",P=""){a=I||"_superusers",t(1,u=A||localStorage.getItem(wa)),t(2,f=P||o[0].value),Wt({}),r==null||r.show()}function h(){return clearTimeout(d),r==null?void 0:r.hide()}async function g(){if(!(!i||c)){t(4,c=!0),localStorage==null||localStorage.setItem(wa,u),clearTimeout(d),d=setTimeout(()=>{me.cancelRequest($m),$i("Test email send timeout.")},3e4);try{await me.settings.testEmail(a,u,f,{$cancelKey:$m}),tn("Successfully sent test email."),l("submit"),t(4,c=!1),await fn(),h()}catch(I){t(4,c=!1),me.error(I)}clearTimeout(d)}}const _=[[]];function y(){f=this.__value,t(2,f)}function S(){u=this.value,t(1,u)}const T=()=>g(),$=()=>!c;function E(I){ie[I?"unshift":"push"](()=>{r=I,t(3,r)})}function M(I){Pe.call(this,n,I)}function L(I){Pe.call(this,n,I)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!u&&!!f)},[h,u,f,r,c,i,s,o,g,m,y,_,S,T,$,E,M,L]}class nk extends ye{constructor(e){super(),be(this,e,_O,hO,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Cm(n,e,t){const i=n.slice();return i[18]=e[t],i[19]=e,i[20]=t,i}function gO(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Send email alert for new logins"),p(e,"type","checkbox"),p(e,"id",t=n[21]),p(l,"for",o=n[21])},m(u,f){v(u,e,f),e.checked=n[0].authAlert.enabled,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[9]),r=!0)},p(u,f){f&2097152&&t!==(t=u[21])&&p(e,"id",t),f&1&&(e.checked=u[0].authAlert.enabled),f&2097152&&o!==(o=u[21])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function Om(n){let e,t,i;function l(o){n[12](o)}let s={};return n[0]!==void 0&&(s.collection=n[0]),e=new q8({props:s}),ie.push(()=>ve(e,"collection",l)),{c(){H(e.$$.fragment)},m(o,r){F(e,o,r),i=!0},p(o,r){const a={};!t&&r&1&&(t=!0,a.collection=o[0],$e(()=>t=!1)),e.$set(a)},i(o){i||(O(e.$$.fragment,o),i=!0)},o(o){D(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function Em(n,e){var a;let t,i,l,s;function o(u){e[15](u,e[18])}let r={single:!0,key:e[18].key,title:e[18].label,placeholders:(a=e[18])==null?void 0:a.placeholders};return e[18].config!==void 0&&(r.config=e[18].config),i=new q5({props:r}),ie.push(()=>ve(i,"config",o)),{key:n,first:null,c(){t=ge(),H(i.$$.fragment),this.first=t},m(u,f){v(u,t,f),F(i,u,f),s=!0},p(u,f){var d;e=u;const c={};f&4&&(c.key=e[18].key),f&4&&(c.title=e[18].label),f&4&&(c.placeholders=(d=e[18])==null?void 0:d.placeholders),!l&&f&4&&(l=!0,c.config=e[18].config,$e(()=>l=!1)),i.$set(c)},i(u){s||(O(i.$$.fragment,u),s=!0)},o(u){D(i.$$.fragment,u),s=!1},d(u){u&&k(t),q(i,u)}}}function bO(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S,T,$,E,M,L,I,A,P=[],R=new Map,N,U,j,V,K,J,ee,X,oe,Se,ke;o=new fe({props:{class:"form-field form-field-sm form-field-toggle m-0",name:"authAlert.enabled",inlineError:!0,$$slots:{default:[gO,({uniqueId:Le})=>({21:Le}),({uniqueId:Le})=>Le?2097152:0]},$$scope:{ctx:n}}});function Ce(Le){n[10](Le)}let We={};n[0]!==void 0&&(We.collection=n[0]),u=new J8({props:We}),ie.push(()=>ve(u,"collection",Ce));function st(Le){n[11](Le)}let et={};n[0]!==void 0&&(et.collection=n[0]),d=new uO({props:et}),ie.push(()=>ve(d,"collection",st));let Be=!n[1]&&Om(n);function rt(Le){n[13](Le)}let Je={};n[0]!==void 0&&(Je.collection=n[0]),_=new f6({props:Je}),ie.push(()=>ve(_,"collection",rt));let at=pe(n[2]);const Ht=Le=>Le[18].key;for(let Le=0;Leve(K,"collection",Te));let ot={};return X=new nk({props:ot}),n[17](X),{c(){e=b("h4"),t=b("div"),i=b("span"),i.textContent="Auth methods",l=C(),s=b("div"),H(o.$$.fragment),r=C(),a=b("div"),H(u.$$.fragment),c=C(),H(d.$$.fragment),h=C(),Be&&Be.c(),g=C(),H(_.$$.fragment),S=C(),T=b("h4"),$=b("span"),$.textContent="Mail templates",E=C(),M=b("button"),M.textContent="Send test email",L=C(),I=b("div"),A=b("div");for(let Le=0;Lef=!1)),u.$set(Oe);const ut={};!m&&Ve&1&&(m=!0,ut.collection=Le[0],$e(()=>m=!1)),d.$set(ut),Le[1]?Be&&(re(),D(Be,1,1,()=>{Be=null}),ae()):Be?(Be.p(Le,Ve),Ve&2&&O(Be,1)):(Be=Om(Le),Be.c(),O(Be,1),Be.m(a,g));const Ne={};!y&&Ve&1&&(y=!0,Ne.collection=Le[0],$e(()=>y=!1)),_.$set(Ne),Ve&4&&(at=pe(Le[2]),re(),P=kt(P,Ve,Ht,1,Le,at,R,A,zt,Em,null,Cm),ae());const xe={};!J&&Ve&1&&(J=!0,xe.collection=Le[0],$e(()=>J=!1)),K.$set(xe);const qt={};X.$set(qt)},i(Le){if(!oe){O(o.$$.fragment,Le),O(u.$$.fragment,Le),O(d.$$.fragment,Le),O(Be),O(_.$$.fragment,Le);for(let Ve=0;Vec==null?void 0:c.show(u.id);function S(E,M){n.$$.not_equal(M.config,E)&&(M.config=E,t(2,f),t(1,i),t(7,l),t(5,r),t(4,a),t(8,s),t(6,o),t(0,u))}function T(E){u=E,t(0,u)}function $(E){ie[E?"unshift":"push"](()=>{c=E,t(3,c)})}return n.$$set=E=>{"collection"in E&&t(0,u=E.collection)},n.$$.update=()=>{var E,M;n.$$.dirty&1&&typeof((E=u.otp)==null?void 0:E.emailTemplate)>"u"&&(t(0,u.otp=u.otp||{},u),t(0,u.otp.emailTemplate={},u)),n.$$.dirty&1&&typeof((M=u.authAlert)==null?void 0:M.emailTemplate)>"u"&&(t(0,u.authAlert=u.authAlert||{},u),t(0,u.authAlert.emailTemplate={},u)),n.$$.dirty&1&&t(1,i=u.system&&u.name==="_superusers"),n.$$.dirty&1&&t(7,l={key:"resetPasswordTemplate",label:"Default Password reset email template",placeholders:["APP_NAME","APP_URL","RECORD:*","TOKEN"],config:u.resetPasswordTemplate}),n.$$.dirty&1&&t(8,s={key:"verificationTemplate",label:"Default Verification email template",placeholders:["APP_NAME","APP_URL","RECORD:*","TOKEN"],config:u.verificationTemplate}),n.$$.dirty&1&&t(6,o={key:"confirmEmailChangeTemplate",label:"Default Confirm email change email template",placeholders:["APP_NAME","APP_URL","RECORD:*","TOKEN"],config:u.confirmEmailChangeTemplate}),n.$$.dirty&1&&t(5,r={key:"otp.emailTemplate",label:"Default OTP email template",placeholders:["APP_NAME","APP_URL","RECORD:*","OTP","OTP_ID"],config:u.otp.emailTemplate}),n.$$.dirty&1&&t(4,a={key:"authAlert.emailTemplate",label:"Default Login alert email template",placeholders:["APP_NAME","APP_URL","RECORD:*"],config:u.authAlert.emailTemplate}),n.$$.dirty&498&&t(2,f=i?[l,r,a]:[s,l,o,r,a])},[u,i,f,c,a,r,o,l,s,d,m,h,g,_,y,S,T,$]}class kO extends ye{constructor(e){super(),be(this,e,yO,bO,_e,{collection:0})}}const vO=n=>({dragging:n&4,dragover:n&8}),Mm=n=>({dragging:n[2],dragover:n[3]});function wO(n){let e,t,i,l,s;const o=n[10].default,r=Lt(o,n,n[9],Mm);return{c(){e=b("div"),r&&r.c(),p(e,"draggable",t=!n[1]),p(e,"class","draggable svelte-19c69j7"),Q(e,"dragging",n[2]),Q(e,"dragover",n[3])},m(a,u){v(a,e,u),r&&r.m(e,null),i=!0,l||(s=[B(e,"dragover",tt(n[11])),B(e,"dragleave",tt(n[12])),B(e,"dragend",n[13]),B(e,"dragstart",n[14]),B(e,"drop",n[15])],l=!0)},p(a,[u]){r&&r.p&&(!i||u&524)&&Pt(r,o,a,a[9],i?At(o,a[9],u,vO):Nt(a[9]),Mm),(!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||(O(r,a),i=!0)},o(a){D(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),l=!1,De(s)}}}function SO(n,e,t){let{$$slots:i={},$$scope:l}=e;const s=gt();let{index:o}=e,{list:r=[]}=e,{group:a="default"}=e,{disabled:u=!1}=e,{dragHandleClass:f=""}=e,c=!1,d=!1;function m($,E){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:E,group:a})),s("drag",$)}}function h($,E){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 L=M.index<<0;L{t(3,d=!0)},_=()=>{t(3,d=!1)},y=()=>{t(3,d=!1),t(2,c=!1)},S=$=>m($,o),T=$=>h($,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,l=$.$$scope)},[o,u,c,d,m,h,r,a,f,l,i,g,_,y,S,T]}class ho extends ye{constructor(e){super(),be(this,e,SO,wO,_e,{index:0,list:6,group:7,disabled:1,dragHandleClass:8})}}function Dm(n,e,t){const i=n.slice();return i[27]=e[t],i}function TO(n){let e,t,i,l,s,o,r,a,u;return{c(){e=b("input"),l=C(),s=b("label"),o=Y("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[30]),e.checked=i=n[3].unique,p(s,"for",r=n[30])},m(f,c){v(f,e,c),v(f,l,c),v(f,s,c),w(s,o),a||(u=B(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(s,"for",r)},d(f){f&&(k(e),k(l),k(s)),a=!1,u()}}}function $O(n){let e,t,i,l;function s(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=jt(o,r(n)),ie.push(()=>ve(e,"value",s))),{c(){e&&H(e.$$.fragment),i=ge()},m(a,u){e&&F(e,a,u),v(a,i,u),l=!0},p(a,u){var f;if(u[0]&128&&o!==(o=a[7])){if(e){re();const c=e;D(c.$$.fragment,1,0,()=>{q(c,1)}),ae()}o?(e=jt(o,r(a)),ie.push(()=>ve(e,"value",s)),H(e.$$.fragment),O(e.$$.fragment,1),F(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){l||(e&&O(e.$$.fragment,a),l=!0)},o(a){e&&D(e.$$.fragment,a),l=!1},d(a){a&&k(i),e&&q(e,a)}}}function CO(n){let e;return{c(){e=b("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function OO(n){let e,t,i,l;const s=[CO,$O],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=s[e](n),{c(){t.c(),i=ge()},m(a,u){o[e].m(a,u),v(a,i,u),l=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),D(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=s[e](a),t.c()),O(t,1),t.m(i.parentNode,i))},i(a){l||(O(t),l=!0)},o(a){D(t),l=!1},d(a){a&&k(i),o[e].d(a)}}}function Im(n){let e,t,i,l=pe(n[10]),s=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new fe({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[OO,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Im(n);return{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment),l=C(),r&&r.c(),s=ge()},m(a,u){F(e,a,u),v(a,t,u),F(i,a,u),v(a,l,u),r&&r.m(a,u),v(a,s,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=Im(a),r.c(),r.m(s.parentNode,s)):r&&(r.d(1),r=null)},i(a){o||(O(e.$$.fragment,a),O(i.$$.fragment,a),o=!0)},o(a){D(e.$$.fragment,a),D(i.$$.fragment,a),o=!1},d(a){a&&(k(t),k(l),k(s)),q(e,a),q(i,a),r&&r.d(a)}}}function MO(n){let e,t=n[5]?"Update":"Create",i,l;return{c(){e=b("h4"),i=Y(t),l=Y(" index")},m(s,o){v(s,e,o),w(e,i),w(e,l)},p(s,o){o[0]&32&&t!==(t=s[5]?"Update":"Create")&&ue(i,t)},d(s){s&&k(e)}}}function Am(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(l,s){v(l,e,s),t||(i=[Me(He.call(null,e,{text:"Delete",position:"top"})),B(e,"click",n[16])],t=!0)},p:te,d(l){l&&k(e),t=!1,De(i)}}}function DO(n){let e,t,i,l,s,o,r=n[5]!=""&&Am(n);return{c(){r&&r.c(),e=C(),t=b("button"),t.innerHTML='Cancel',i=C(),l=b("button"),l.innerHTML='Set index',p(t,"type","button"),p(t,"class","btn btn-transparent"),p(l,"type","button"),p(l,"class","btn"),Q(l,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),v(a,e,u),v(a,t,u),v(a,i,u),v(a,l,u),s||(o=[B(t,"click",n[17]),B(l,"click",n[18])],s=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Am(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&Q(l,"btn-disabled",a[9].length<=0)},d(a){a&&(k(e),k(t),k(i),k(l)),r&&r.d(a),s=!1,De(o)}}}function IO(n){let e,t;const i=[{popup:!0},n[14]];let l={$$slots:{footer:[DO],header:[MO],default:[EO]},$$scope:{ctx:n}};for(let s=0;see.name==V);J?z.removeByValue(K.columns,J):z.pushUnique(K.columns,{name:V}),t(2,d=z.buildIndex(K))}Yt(async()=>{t(8,g=!0);try{t(7,h=(await Ot(async()=>{const{default:V}=await import("./CodeEditor-D4uJdbuC.js");return{default:V}},__vite__mapDeps([12,1]),import.meta.url)).default)}catch(V){console.warn(V)}t(8,g=!1)});const M=()=>T(),L=()=>y(),I=()=>$(),A=V=>{t(3,l.unique=V.target.checked,l),t(3,l.tableName=l.tableName||(u==null?void 0:u.name),l),t(2,d=z.buildIndex(l))};function P(V){d=V,t(2,d)}const R=V=>E(V);function N(V){ie[V?"unshift":"push"](()=>{f=V,t(4,f)})}function U(V){Pe.call(this,n,V)}function j(V){Pe.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Ut(V)),t(14,r=lt(e,o)),"collection"in V&&t(0,u=V.collection)},n.$$.update=()=>{var V,K,J;n.$$.dirty[0]&1&&t(10,i=((K=(V=u==null?void 0:u.fields)==null?void 0:V.filter(ee=>!ee.toDelete&&ee.name!="id"))==null?void 0:K.map(ee=>ee.name))||[]),n.$$.dirty[0]&4&&t(3,l=z.parseIndex(d)),n.$$.dirty[0]&8&&t(9,s=((J=l.columns)==null?void 0:J.map(ee=>ee.name))||[])},[u,y,d,l,f,c,m,h,g,s,i,T,$,E,r,_,M,L,I,A,P,R,N,U,j]}class AO extends ye{constructor(e){super(),be(this,e,LO,IO,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Pm(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const l=z.parseIndex(i[10]);return i[11]=l,i}function Nm(n){let e;return{c(){e=b("strong"),e.textContent="Unique:"},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function Rm(n){var d;let e,t,i,l=((d=n[11].columns)==null?void 0:d.map(Fm).join(", "))+"",s,o,r,a,u,f=n[11].unique&&Nm();function c(){return n[4](n[10],n[13])}return{c(){var m,h;e=b("button"),f&&f.c(),t=C(),i=b("span"),s=Y(l),p(i,"class","txt"),p(e,"type","button"),p(e,"class",o="label link-primary "+((h=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&h.message?"label-danger":"")+" svelte-167lbwu")},m(m,h){var g,_;v(m,e,h),f&&f.m(e,null),w(e,t),w(e,i),w(i,s),a||(u=[Me(r=He.call(null,e,((_=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:_.message)||"")),B(e,"click",c)],a=!0)},p(m,h){var g,_,y,S,T;n=m,n[11].unique?f||(f=Nm(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),h&1&&l!==(l=((g=n[11].columns)==null?void 0:g.map(Fm).join(", "))+"")&&ue(s,l),h&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&&Rt(r.update)&&h&4&&r.update.call(null,((T=(S=n[2].indexes)==null?void 0:S[n[13]])==null?void 0:T.message)||"")},d(m){m&&k(e),f&&f.d(),a=!1,De(u)}}}function PO(n){var $,E,M;let e,t,i=(((E=($=n[0])==null?void 0:$.indexes)==null?void 0:E.length)||0)+"",l,s,o,r,a,u,f,c,d,m,h,g,_=pe(((M=n[0])==null?void 0:M.indexes)||[]),y=[];for(let L=0;L<_.length;L+=1)y[L]=Rm(Pm(n,_,L));function S(L){n[7](L)}let T={};return n[0]!==void 0&&(T.collection=n[0]),c=new AO({props:T}),n[6](c),ie.push(()=>ve(c,"collection",S)),c.$on("remove",n[8]),c.$on("submit",n[9]),{c(){e=b("div"),t=Y("Unique constraints and indexes ("),l=Y(i),s=Y(")"),o=C(),r=b("div");for(let L=0;L+ New index',f=C(),H(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(L,I){v(L,e,I),w(e,t),w(e,l),w(e,s),v(L,o,I),v(L,r,I);for(let A=0;Ad=!1)),c.$set(A)},i(L){m||(O(c.$$.fragment,L),m=!0)},o(L){D(c.$$.fragment,L),m=!1},d(L){L&&(k(e),k(o),k(r),k(f)),pt(y,L),n[6](null),q(c,L),h=!1,g()}}}const Fm=n=>n.name;function NO(n,e,t){let i;Qe(n,Sn,m=>t(2,i=m));let{collection:l}=e,s;function o(m,h){for(let g=0;gs==null?void 0:s.show(m,h),a=()=>s==null?void 0:s.show();function u(m){ie[m?"unshift":"push"](()=>{s=m,t(1,s)})}function f(m){l=m,t(0,l)}const c=m=>{for(let h=0;h{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,l=m.collection)},[l,s,i,o,r,a,u,f,c,d]}class RO extends ye{constructor(e){super(),be(this,e,NO,PO,_e,{collection:0})}}function qm(n,e,t){const i=n.slice();return i[5]=e[t],i}function Hm(n){let e,t,i,l,s,o,r;function a(){return n[3](n[5])}return{c(){e=b("button"),t=b("i"),i=C(),l=b("span"),l.textContent=`${n[5].label}`,s=C(),p(t,"class","icon "+n[5].icon+" svelte-1gz9b6p"),p(t,"aria-hidden","true"),p(l,"class","txt"),p(e,"type","button"),p(e,"role","menuitem"),p(e,"class","dropdown-item svelte-1gz9b6p")},m(u,f){v(u,e,f),w(e,t),w(e,i),w(e,l),w(e,s),o||(r=B(e,"click",a),o=!0)},p(u,f){n=u},d(u){u&&k(e),o=!1,r()}}}function FO(n){let e,t=pe(n[1]),i=[];for(let l=0;lo(a.value);return n.$$set=a=>{"class"in a&&t(0,i=a.class)},[i,s,o,r]}class jO extends ye{constructor(e){super(),be(this,e,HO,qO,_e,{class:0})}}const zO=n=>({interactive:n[0]&128,hasErrors:n[0]&64}),jm=n=>({interactive:n[7],hasErrors:n[6]}),UO=n=>({interactive:n[0]&128,hasErrors:n[0]&64}),zm=n=>({interactive:n[7],hasErrors:n[6]}),VO=n=>({interactive:n[0]&128,hasErrors:n[0]&64}),Um=n=>({interactive:n[7],hasErrors:n[6]});function Vm(n){let e;return{c(){e=b("div"),e.innerHTML='',p(e,"class","drag-handle-wrapper"),p(e,"draggable",!0),p(e,"aria-label","Sort")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function Bm(n){let e,t;return{c(){e=b("span"),t=Y(n[5]),p(e,"class","label label-success")},m(i,l){v(i,e,l),w(e,t)},p(i,l){l[0]&32&&ue(t,i[5])},d(i){i&&k(e)}}}function Wm(n){let e;return{c(){e=b("span"),e.textContent="Hidden",p(e,"class","label label-danger")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function BO(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h=n[0].required&&Bm(n),g=n[0].hidden&&Wm();return{c(){e=b("div"),h&&h.c(),t=C(),g&&g.c(),i=C(),l=b("div"),s=b("i"),a=C(),u=b("input"),p(e,"class","field-labels"),p(s,"class",o=z.getFieldTypeIcon(n[0].type)),p(l,"class","form-field-addon prefix field-type-icon"),Q(l,"txt-disabled",!n[7]||n[0].system),p(u,"type","text"),u.required=!0,u.disabled=f=!n[7]||n[0].system,p(u,"spellcheck","false"),p(u,"placeholder","Field name"),u.value=c=n[0].name,p(u,"title","System field")},m(_,y){v(_,e,y),h&&h.m(e,null),w(e,t),g&&g.m(e,null),v(_,i,y),v(_,l,y),w(l,s),v(_,a,y),v(_,u,y),n[22](u),d||(m=[Me(r=He.call(null,l,n[0].type+(n[0].system?" (system)":""))),B(l,"click",n[21]),B(u,"input",n[23])],d=!0)},p(_,y){_[0].required?h?h.p(_,y):(h=Bm(_),h.c(),h.m(e,t)):h&&(h.d(1),h=null),_[0].hidden?g||(g=Wm(),g.c(),g.m(e,null)):g&&(g.d(1),g=null),y[0]&1&&o!==(o=z.getFieldTypeIcon(_[0].type))&&p(s,"class",o),r&&Rt(r.update)&&y[0]&1&&r.update.call(null,_[0].type+(_[0].system?" (system)":"")),y[0]&129&&Q(l,"txt-disabled",!_[7]||_[0].system),y[0]&129&&f!==(f=!_[7]||_[0].system)&&(u.disabled=f),y[0]&1&&c!==(c=_[0].name)&&u.value!==c&&(u.value=c)},d(_){_&&(k(e),k(i),k(l),k(a),k(u)),h&&h.d(),g&&g.d(),n[22](null),d=!1,De(m)}}}function WO(n){let e;return{c(){e=b("span"),p(e,"class","separator")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function YO(n){let e,t,i,l,s,o;return{c(){e=b("button"),t=b("i"),p(t,"class","ri-settings-3-line"),p(e,"type","button"),p(e,"aria-label",i="Toggle "+n[0].name+" field options"),p(e,"class",l="btn btn-sm btn-circle options-trigger "+(n[4]?"btn-secondary":"btn-transparent")),p(e,"aria-expanded",n[4]),Q(e,"btn-hint",!n[4]&&!n[6]),Q(e,"btn-danger",n[6])},m(r,a){v(r,e,a),w(e,t),s||(o=B(e,"click",n[17]),s=!0)},p(r,a){a[0]&1&&i!==(i="Toggle "+r[0].name+" field options")&&p(e,"aria-label",i),a[0]&16&&l!==(l="btn btn-sm btn-circle options-trigger "+(r[4]?"btn-secondary":"btn-transparent"))&&p(e,"class",l),a[0]&16&&p(e,"aria-expanded",r[4]),a[0]&80&&Q(e,"btn-hint",!r[4]&&!r[6]),a[0]&80&&Q(e,"btn-danger",r[6])},d(r){r&&k(e),s=!1,o()}}}function KO(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-success btn-transparent options-trigger"),p(e,"aria-label","Restore")},m(l,s){v(l,e,s),t||(i=[Me(He.call(null,e,"Restore")),B(e,"click",n[14])],t=!0)},p:te,d(l){l&&k(e),t=!1,De(i)}}}function Ym(n){let e,t,i,l,s=!n[0].primaryKey&&n[0].type!="autodate"&&(!n[8]||!n[10].includes(n[0].name)),o,r=!n[0].primaryKey&&(!n[8]||!n[11].includes(n[0].name)),a,u=!n[8]||!n[12].includes(n[0].name),f,c,d,m;const h=n[20].options,g=Lt(h,n,n[28],zm);let _=s&&Km(n),y=r&&Jm(n),S=u&&Zm(n);const T=n[20].optionsFooter,$=Lt(T,n,n[28],jm);let E=!n[0]._toDelete&&!n[0].primaryKey&&Gm(n);return{c(){e=b("div"),t=b("div"),g&&g.c(),i=C(),l=b("div"),_&&_.c(),o=C(),y&&y.c(),a=C(),S&&S.c(),f=C(),$&&$.c(),c=C(),E&&E.c(),p(t,"class","hidden-empty m-b-sm"),p(l,"class","schema-field-options-footer"),p(e,"class","schema-field-options")},m(M,L){v(M,e,L),w(e,t),g&&g.m(t,null),w(e,i),w(e,l),_&&_.m(l,null),w(l,o),y&&y.m(l,null),w(l,a),S&&S.m(l,null),w(l,f),$&&$.m(l,null),w(l,c),E&&E.m(l,null),m=!0},p(M,L){g&&g.p&&(!m||L[0]&268435648)&&Pt(g,h,M,M[28],m?At(h,M[28],L,UO):Nt(M[28]),zm),L[0]&257&&(s=!M[0].primaryKey&&M[0].type!="autodate"&&(!M[8]||!M[10].includes(M[0].name))),s?_?(_.p(M,L),L[0]&257&&O(_,1)):(_=Km(M),_.c(),O(_,1),_.m(l,o)):_&&(re(),D(_,1,1,()=>{_=null}),ae()),L[0]&257&&(r=!M[0].primaryKey&&(!M[8]||!M[11].includes(M[0].name))),r?y?(y.p(M,L),L[0]&257&&O(y,1)):(y=Jm(M),y.c(),O(y,1),y.m(l,a)):y&&(re(),D(y,1,1,()=>{y=null}),ae()),L[0]&257&&(u=!M[8]||!M[12].includes(M[0].name)),u?S?(S.p(M,L),L[0]&257&&O(S,1)):(S=Zm(M),S.c(),O(S,1),S.m(l,f)):S&&(re(),D(S,1,1,()=>{S=null}),ae()),$&&$.p&&(!m||L[0]&268435648)&&Pt($,T,M,M[28],m?At(T,M[28],L,zO):Nt(M[28]),jm),!M[0]._toDelete&&!M[0].primaryKey?E?(E.p(M,L),L[0]&1&&O(E,1)):(E=Gm(M),E.c(),O(E,1),E.m(l,null)):E&&(re(),D(E,1,1,()=>{E=null}),ae())},i(M){m||(O(g,M),O(_),O(y),O(S),O($,M),O(E),M&&nt(()=>{m&&(d||(d=ze(e,wt,{delay:10,duration:150},!0)),d.run(1))}),m=!0)},o(M){D(g,M),D(_),D(y),D(S),D($,M),D(E),M&&(d||(d=ze(e,wt,{delay:10,duration:150},!1)),d.run(0)),m=!1},d(M){M&&k(e),g&&g.d(M),_&&_.d(),y&&y.d(),S&&S.d(),$&&$.d(M),E&&E.d(),M&&d&&d.end()}}}function Km(n){let e,t;return e=new fe({props:{class:"form-field form-field-toggle",name:"requried",$$slots:{default:[JO,({uniqueId:i})=>({34:i}),({uniqueId:i})=>[0,i?8:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l[0]&268435489|l[1]&8&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function JO(n){let e,t,i,l,s,o,r,a,u,f,c,d;return{c(){e=b("input"),i=C(),l=b("label"),s=b("span"),o=Y(n[5]),r=C(),a=b("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),p(s,"class","txt"),p(a,"class","ri-information-line link-hint"),p(l,"for",f=n[34])},m(m,h){v(m,e,h),e.checked=n[0].required,v(m,i,h),v(m,l,h),w(l,s),w(s,o),w(l,r),w(l,a),c||(d=[B(e,"change",n[24]),Me(u=He.call(null,a,{text:`Requires the field value NOT to be ${z.zeroDefaultStr(n[0])}.`}))],c=!0)},p(m,h){h[1]&8&&t!==(t=m[34])&&p(e,"id",t),h[0]&1&&(e.checked=m[0].required),h[0]&32&&ue(o,m[5]),u&&Rt(u.update)&&h[0]&1&&u.update.call(null,{text:`Requires the field value NOT to be ${z.zeroDefaultStr(m[0])}.`}),h[1]&8&&f!==(f=m[34])&&p(l,"for",f)},d(m){m&&(k(e),k(i),k(l)),c=!1,De(d)}}}function Jm(n){let e,t;return e=new fe({props:{class:"form-field form-field-toggle",name:"hidden",$$slots:{default:[ZO,({uniqueId:i})=>({34:i}),({uniqueId:i})=>[0,i?8:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l[0]&268435457|l[1]&8&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function ZO(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("input"),i=C(),l=b("label"),s=b("span"),s.textContent="Hidden",o=C(),r=b("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),p(s,"class","txt"),p(r,"class","ri-information-line link-hint"),p(l,"for",a=n[34])},m(c,d){v(c,e,d),e.checked=n[0].hidden,v(c,i,d),v(c,l,d),w(l,s),w(l,o),w(l,r),u||(f=[B(e,"change",n[25]),B(e,"change",n[26]),Me(He.call(null,r,{text:"Hide from the JSON API response and filters."}))],u=!0)},p(c,d){d[1]&8&&t!==(t=c[34])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].hidden),d[1]&8&&a!==(a=c[34])&&p(l,"for",a)},d(c){c&&(k(e),k(i),k(l)),u=!1,De(f)}}}function Zm(n){let e,t;return e=new fe({props:{class:"form-field form-field-toggle m-0",name:"presentable",$$slots:{default:[GO,({uniqueId:i})=>({34:i}),({uniqueId:i})=>[0,i?8:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l[0]&268435457|l[1]&8&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function GO(n){let e,t,i,l,s,o,r,a,u,f,c,d;return{c(){e=b("input"),l=C(),s=b("label"),o=b("span"),o.textContent="Presentable",r=C(),a=b("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),e.disabled=i=n[0].hidden,p(o,"class","txt"),p(a,"class",u="ri-information-line "+(n[0].hidden?"txt-disabled":"link-hint")),p(s,"for",f=n[34])},m(m,h){v(m,e,h),e.checked=n[0].presentable,v(m,l,h),v(m,s,h),w(s,o),w(s,r),w(s,a),c||(d=[B(e,"change",n[27]),Me(He.call(null,a,{text:"Whether the field should be preferred in the Superuser UI relation listings (default to auto)."}))],c=!0)},p(m,h){h[1]&8&&t!==(t=m[34])&&p(e,"id",t),h[0]&1&&i!==(i=m[0].hidden)&&(e.disabled=i),h[0]&1&&(e.checked=m[0].presentable),h[0]&1&&u!==(u="ri-information-line "+(m[0].hidden?"txt-disabled":"link-hint"))&&p(a,"class",u),h[1]&8&&f!==(f=m[34])&&p(s,"for",f)},d(m){m&&(k(e),k(l),k(s)),c=!1,De(d)}}}function Gm(n){let e,t,i,l,s,o,r;return o=new Hn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[XO]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),i=b("div"),l=b("i"),s=C(),H(o.$$.fragment),p(l,"class","ri-more-line"),p(l,"aria-hidden","true"),p(i,"tabindex","0"),p(i,"role","button"),p(i,"title","More field options"),p(i,"class","btn btn-circle btn-sm btn-transparent"),p(t,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","m-l-auto txt-right")},m(a,u){v(a,e,u),w(e,t),w(t,i),w(i,l),w(i,s),F(o,i,null),r=!0},p(a,u){const f={};u[0]&268435457&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(O(o.$$.fragment,a),r=!0)},o(a){D(o.$$.fragment,a),r=!1},d(a){a&&k(e),q(o)}}}function Xm(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item"),p(e,"role","menuitem")},m(l,s){v(l,e,s),t||(i=B(e,"click",tt(n[13])),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function XO(n){let e,t,i,l,s,o=!n[0].system&&Xm(n);return{c(){e=b("button"),e.innerHTML='Duplicate',t=C(),o&&o.c(),i=ge(),p(e,"type","button"),p(e,"class","dropdown-item"),p(e,"role","menuitem")},m(r,a){v(r,e,a),v(r,t,a),o&&o.m(r,a),v(r,i,a),l||(s=B(e,"click",tt(n[15])),l=!0)},p(r,a){r[0].system?o&&(o.d(1),o=null):o?o.p(r,a):(o=Xm(r),o.c(),o.m(i.parentNode,i))},d(r){r&&(k(e),k(t),k(i)),o&&o.d(r),l=!1,s()}}}function QO(n){let e,t,i,l,s,o,r,a,u,f=n[7]&&n[2]&&Vm();l=new fe({props:{class:"form-field required m-0 "+(n[7]?"":"disabled"),name:"fields."+n[1]+".name",inlineError:!0,$$slots:{default:[BO]},$$scope:{ctx:n}}});const c=n[20].default,d=Lt(c,n,n[28],Um),m=d||WO();function h(S,T){if(S[0]._toDelete)return KO;if(S[7])return YO}let g=h(n),_=g&&g(n),y=n[7]&&n[4]&&Ym(n);return{c(){e=b("div"),t=b("div"),f&&f.c(),i=C(),H(l.$$.fragment),s=C(),m&&m.c(),o=C(),_&&_.c(),r=C(),y&&y.c(),p(t,"class","schema-field-header"),p(e,"class","schema-field"),Q(e,"required",n[0].required),Q(e,"expanded",n[7]&&n[4]),Q(e,"deleted",n[0]._toDelete)},m(S,T){v(S,e,T),w(e,t),f&&f.m(t,null),w(t,i),F(l,t,null),w(t,s),m&&m.m(t,null),w(t,o),_&&_.m(t,null),w(e,r),y&&y.m(e,null),u=!0},p(S,T){S[7]&&S[2]?f||(f=Vm(),f.c(),f.m(t,i)):f&&(f.d(1),f=null);const $={};T[0]&128&&($.class="form-field required m-0 "+(S[7]?"":"disabled")),T[0]&2&&($.name="fields."+S[1]+".name"),T[0]&268435625&&($.$$scope={dirty:T,ctx:S}),l.$set($),d&&d.p&&(!u||T[0]&268435648)&&Pt(d,c,S,S[28],u?At(c,S[28],T,VO):Nt(S[28]),Um),g===(g=h(S))&&_?_.p(S,T):(_&&_.d(1),_=g&&g(S),_&&(_.c(),_.m(t,null))),S[7]&&S[4]?y?(y.p(S,T),T[0]&144&&O(y,1)):(y=Ym(S),y.c(),O(y,1),y.m(e,null)):y&&(re(),D(y,1,1,()=>{y=null}),ae()),(!u||T[0]&1)&&Q(e,"required",S[0].required),(!u||T[0]&144)&&Q(e,"expanded",S[7]&&S[4]),(!u||T[0]&1)&&Q(e,"deleted",S[0]._toDelete)},i(S){u||(O(l.$$.fragment,S),O(m,S),O(y),S&&nt(()=>{u&&(a||(a=ze(e,wt,{duration:150},!0)),a.run(1))}),u=!0)},o(S){D(l.$$.fragment,S),D(m,S),D(y),S&&(a||(a=ze(e,wt,{duration:150},!1)),a.run(0)),u=!1},d(S){S&&k(e),f&&f.d(),q(l),m&&m.d(S),_&&_.d(),y&&y.d(),S&&a&&a.end()}}}let Sa=[];function xO(n,e,t){let i,l,s,o,r;Qe(n,Sn,Se=>t(19,r=Se));let{$$slots:a={},$$scope:u}=e;const f="f_"+z.randomString(8),c=gt(),d={bool:"Nonfalsey",number:"Nonzero"},m=["password","tokenKey","id","autodate"],h=["password","tokenKey","id","email"],g=["password","tokenKey"];let{key:_=""}=e,{field:y=z.initSchemaField()}=e,{draggable:S=!0}=e,{collection:T={}}=e,$,E=!1;function M(){y.id?t(0,y._toDelete=!0,y):(R(),c("remove"))}function L(){t(0,y._toDelete=!1,y),Wt({})}function I(){y._toDelete||(R(),c("duplicate"))}function A(Se){return z.slugify(Se)}function P(){t(4,E=!0),U()}function R(){t(4,E=!1)}function N(){E?R():P()}function U(){for(let Se of Sa)Se.id!=f&&Se.collapse()}Yt(()=>(Sa.push({id:f,collapse:R}),y.onMountSelect&&(t(0,y.onMountSelect=!1,y),$==null||$.select()),()=>{z.removeByKey(Sa,"id",f)}));const j=()=>$==null?void 0:$.focus();function V(Se){ie[Se?"unshift":"push"](()=>{$=Se,t(3,$)})}const K=Se=>{const ke=y.name;t(0,y.name=A(Se.target.value),y),Se.target.value=y.name,c("rename",{oldName:ke,newName:y.name})};function J(){y.required=this.checked,t(0,y)}function ee(){y.hidden=this.checked,t(0,y)}const X=Se=>{Se.target.checked&&t(0,y.presentable=!1,y)};function oe(){y.presentable=this.checked,t(0,y)}return n.$$set=Se=>{"key"in Se&&t(1,_=Se.key),"field"in Se&&t(0,y=Se.field),"draggable"in Se&&t(2,S=Se.draggable),"collection"in Se&&t(18,T=Se.collection),"$$scope"in Se&&t(28,u=Se.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&262144&&t(8,i=(T==null?void 0:T.type)=="auth"),n.$$.dirty[0]&1&&y._toDelete&&y._originalName&&y.name!==y._originalName&&t(0,y.name=y._originalName,y),n.$$.dirty[0]&1&&!y._originalName&&y.name&&t(0,y._originalName=y.name,y),n.$$.dirty[0]&1&&typeof y._toDelete>"u"&&t(0,y._toDelete=!1,y),n.$$.dirty[0]&1&&y.required&&t(0,y.nullable=!1,y),n.$$.dirty[0]&1&&t(7,l=!y._toDelete),n.$$.dirty[0]&524290&&t(6,s=!z.isEmpty(z.getNestedVal(r,`fields.${_}`))),n.$$.dirty[0]&1&&t(5,o=d[y==null?void 0:y.type]||"Nonempty")},[y,_,S,$,E,o,s,l,i,c,m,h,g,M,L,I,A,N,T,r,a,j,V,K,J,ee,X,oe,u]}class ei extends ye{constructor(e){super(),be(this,e,xO,QO,_e,{key:1,field:0,draggable:2,collection:18},null,[-1,-1])}}function eE(n){let e,t,i,l,s,o;function r(u){n[5](u)}let a={id:n[13],items:n[3],disabled:n[0].system,readonly:!n[12]};return n[2]!==void 0&&(a.keyOfSelected=n[2]),t=new xn({props:a}),ie.push(()=>ve(t,"keyOfSelected",r)),{c(){e=b("div"),H(t.$$.fragment)},m(u,f){v(u,e,f),F(t,e,null),l=!0,s||(o=Me(He.call(null,e,{text:"Auto set on:",position:"top"})),s=!0)},p(u,f){const c={};f&8192&&(c.id=u[13]),f&1&&(c.disabled=u[0].system),f&4096&&(c.readonly=!u[12]),!i&&f&4&&(i=!0,c.keyOfSelected=u[2],$e(()=>i=!1)),t.$set(c)},i(u){l||(O(t.$$.fragment,u),l=!0)},o(u){D(t.$$.fragment,u),l=!1},d(u){u&&k(e),q(t),s=!1,o()}}}function tE(n){let e,t,i,l,s,o;return i=new fe({props:{class:"form-field form-field-single-multiple-select form-field-autodate-select "+(n[12]?"":"readonly"),inlineError:!0,$$slots:{default:[eE,({uniqueId:r})=>({13:r}),({uniqueId:r})=>r?8192:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=C(),H(i.$$.fragment),l=C(),s=b("div"),p(e,"class","separator"),p(s,"class","separator")},m(r,a){v(r,e,a),v(r,t,a),F(i,r,a),v(r,l,a),v(r,s,a),o=!0},p(r,a){const u={};a&4096&&(u.class="form-field form-field-single-multiple-select form-field-autodate-select "+(r[12]?"":"readonly")),a&28677&&(u.$$scope={dirty:a,ctx:r}),i.$set(u)},i(r){o||(O(i.$$.fragment,r),o=!0)},o(r){D(i.$$.fragment,r),o=!1},d(r){r&&(k(e),k(t),k(l),k(s)),q(i,r)}}}function nE(n){let e,t,i;const l=[{key:n[1]},n[4]];function s(r){n[6](r)}let o={$$slots:{default:[tE,({interactive:r})=>({12:r}),({interactive:r})=>r?4096:0]},$$scope:{ctx:n}};for(let r=0;rve(e,"field",s)),e.$on("rename",n[7]),e.$on("remove",n[8]),e.$on("duplicate",n[9]),{c(){H(e.$$.fragment)},m(r,a){F(e,r,a),i=!0},p(r,[a]){const u=a&18?vt(l,[a&2&&{key:r[1]},a&16&&Ft(r[4])]):{};a&20485&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],$e(()=>t=!1)),e.$set(u)},i(r){i||(O(e.$$.fragment,r),i=!0)},o(r){D(e.$$.fragment,r),i=!1},d(r){q(e,r)}}}const Ta=1,$a=2,Ca=3;function iE(n,e,t){const i=["field","key"];let l=lt(e,i);const s=[{label:"Create",value:Ta},{label:"Update",value:$a},{label:"Create/Update",value:Ca}];let{field:o}=e,{key:r=""}=e,a=u();function u(){return o.onCreate&&o.onUpdate?Ca:o.onUpdate?$a:Ta}function f(_){switch(_){case Ta:t(0,o.onCreate=!0,o),t(0,o.onUpdate=!1,o);break;case $a:t(0,o.onCreate=!1,o),t(0,o.onUpdate=!0,o);break;case Ca:t(0,o.onCreate=!0,o),t(0,o.onUpdate=!0,o);break}}function c(_){a=_,t(2,a)}function d(_){o=_,t(0,o)}function m(_){Pe.call(this,n,_)}function h(_){Pe.call(this,n,_)}function g(_){Pe.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Ut(_)),t(4,l=lt(e,i)),"field"in _&&t(0,o=_.field),"key"in _&&t(1,r=_.key)},n.$$.update=()=>{n.$$.dirty&4&&f(a)},[o,r,a,s,l,c,d,m,h,g]}class lE extends ye{constructor(e){super(),be(this,e,iE,nE,_e,{field:0,key:1})}}function sE(n){let e,t,i;const l=[{key:n[1]},n[2]];function s(r){n[3](r)}let o={};for(let r=0;rve(e,"field",s)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("duplicate",n[6]),{c(){H(e.$$.fragment)},m(r,a){F(e,r,a),i=!0},p(r,[a]){const u=a&6?vt(l,[a&2&&{key:r[1]},a&4&&Ft(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],$e(()=>t=!1)),e.$set(u)},i(r){i||(O(e.$$.fragment,r),i=!0)},o(r){D(e.$$.fragment,r),i=!1},d(r){q(e,r)}}}function oE(n,e,t){const i=["field","key"];let l=lt(e,i),{field:s}=e,{key:o=""}=e;function r(c){s=c,t(0,s)}function a(c){Pe.call(this,n,c)}function u(c){Pe.call(this,n,c)}function f(c){Pe.call(this,n,c)}return n.$$set=c=>{e=je(je({},e),Ut(c)),t(2,l=lt(e,i)),"field"in c&&t(0,s=c.field),"key"in c&&t(1,o=c.key)},[s,o,l,r,a,u,f]}class rE extends ye{constructor(e){super(),be(this,e,oE,sE,_e,{field:0,key:1})}}var Oa=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],es={_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},eo={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},In=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Kn=function(n){return n===!0?1:0};function Qm(n,e){var t;return function(){var i=this,l=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,l)},e)}}var Ea=function(n){return n instanceof Array?n:[n]};function $n(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function $t(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 Jo(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function ik(n,e){if(e(n))return n;if(n.parentNode)return ik(n.parentNode,e)}function Zo(n,e){var t=$t("div","numInputWrapper"),i=$t("input","numInput "+n),l=$t("span","arrowUp"),s=$t("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(l),t.appendChild(s),t}function jn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Ma=function(){},Cr=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},aE={D:Ma,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*Kn(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),l=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return l.setDate(l.getDate()-l.getDay()+t.firstDayOfWeek),l},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:Ma,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:Ma,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},Sl={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})"},Hs={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[Hs.w(n,e,t)]},F:function(n,e,t){return Cr(Hs.n(n,e,t)-1,!1,e)},G:function(n,e,t){return In(Hs.h(n,e,t))},H:function(n){return In(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[Kn(n.getHours()>11)]},M:function(n,e){return Cr(n.getMonth(),!0,e)},S:function(n){return In(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return In(n.getFullYear(),4)},d:function(n){return In(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return In(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return In(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)}},lk=function(n){var e=n.config,t=e===void 0?es:e,i=n.l10n,l=i===void 0?eo:i,s=n.isMobile,o=s===void 0?!1:s;return function(r,a,u){var f=u||l;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,m){return Hs[c]&&m[d-1]!=="\\"?Hs[c](r,f,t):c!=="\\"?c:""}).join("")}},au=function(n){var e=n.config,t=e===void 0?es:e,i=n.l10n,l=i===void 0?eo:i;return function(s,o,r,a){if(!(s!==0&&!s)){var u=a||l,f,c=s;if(s instanceof Date)f=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)f=new Date(s);else if(typeof s=="string"){var d=o||(t||es).dateFormat,m=String(s).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(s,d);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(s);else{for(var h=void 0,g=[],_=0,y=0,S="";_Math.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),se=Ia(t.config);x.setHours(se.hours,se.minutes,se.seconds,x.getMilliseconds()),t.selectedDates=[x],t.latestSelectedDateObj=x}Z!==void 0&&Z.type!=="blur"&&cl(Z);var he=t._input.value;c(),Mn(),t._input.value!==he&&t._debouncedChange()}function u(Z,x){return Z%12+12*Kn(x===t.l10n.amPM[1])}function f(Z){switch(Z%24){case 0:case 12:return 12;default:return Z%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var Z=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,x=(parseInt(t.minuteElement.value,10)||0)%60,se=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(Z=u(Z,t.amPM.textContent));var he=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&zn(t.latestSelectedDateObj,t.config.minDate,!0)===0,qe=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&zn(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=Da(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Ee=Da(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Re=Da(Z,x,se);if(Re>Ee&&Re=12)]),t.secondElement!==void 0&&(t.secondElement.value=In(se)))}function h(Z){var x=jn(Z),se=parseInt(x.value)+(Z.delta||0);(se/1e3>1||Z.key==="Enter"&&!/[^\d]/.test(se.toString()))&&Be(se)}function g(Z,x,se,he){if(x instanceof Array)return x.forEach(function(qe){return g(Z,qe,se,he)});if(Z instanceof Array)return Z.forEach(function(qe){return g(qe,x,se,he)});Z.addEventListener(x,se,he),t._handlers.push({remove:function(){return Z.removeEventListener(x,se,he)}})}function _(){It("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(se){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+se+"]"),function(he){return g(he,"click",t[se])})}),t.isMobile){sn();return}var Z=Qm(Ze,50);if(t._debouncedChange=Qm(_,dE),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(se){t.config.mode==="range"&&Te(jn(se))}),g(t._input,"keydown",Ht),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",Ht),!t.config.inline&&!t.config.static&&g(window,"resize",Z),window.ontouchstart!==void 0?g(window.document,"touchstart",et):g(window.document,"mousedown",et),g(window.document,"focus",et,{capture:!0}),t.config.clickOpens===!0&&(g(t._input,"focus",t.open),g(t._input,"click",t.open)),t.daysContainer!==void 0&&(g(t.monthNav,"click",Rl),g(t.monthNav,["keyup","increment"],h),g(t.daysContainer,"click",Fe)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var x=function(se){return jn(se).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",T),g([t.hourElement,t.minuteElement],["focus","click"],x),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(se){a(se)})}t.config.allowInput&&g(t._input,"blur",at)}function S(Z,x){var se=Z!==void 0?t.parseDate(Z):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(Z);var qe=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&&(!qe&&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=$t("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(Z,x,se,he){var qe=rt(x,!0),le=$t("span",Z,x.getDate().toString());return le.dateObj=x,le.$i=he,le.setAttribute("aria-label",t.formatDate(x,t.config.ariaDateFormat)),Z.indexOf("hidden")===-1&&zn(x,t.now)===0&&(t.todayDateElem=le,le.classList.add("today"),le.setAttribute("aria-current","date")),qe?(le.tabIndex=-1,ul(x)&&(le.classList.add("selected"),t.selectedDateElem=le,t.config.mode==="range"&&($n(le,"startRange",t.selectedDates[0]&&zn(x,t.selectedDates[0],!0)===0),$n(le,"endRange",t.selectedDates[1]&&zn(x,t.selectedDates[1],!0)===0),Z==="nextMonthDay"&&le.classList.add("inRange")))):le.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Hi(x)&&!ul(x)&&le.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&Z!=="prevMonthDay"&&he%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(x)+""),It("onDayCreate",le),le}function L(Z){Z.focus(),t.config.mode==="range"&&Te(Z)}function I(Z){for(var x=Z>0?0:t.config.showMonths-1,se=Z>0?t.config.showMonths:-1,he=x;he!=se;he+=Z)for(var qe=t.daysContainer.children[he],le=Z>0?0:qe.children.length-1,Ee=Z>0?qe.children.length:-1,Re=le;Re!=Ee;Re+=Z){var Ke=qe.children[Re];if(Ke.className.indexOf("hidden")===-1&&rt(Ke.dateObj))return Ke}}function A(Z,x){for(var se=Z.className.indexOf("Month")===-1?Z.dateObj.getMonth():t.currentMonth,he=x>0?t.config.showMonths:-1,qe=x>0?1:-1,le=se-t.currentMonth;le!=he;le+=qe)for(var Ee=t.daysContainer.children[le],Re=se-t.currentMonth===le?Z.$i+x:x<0?Ee.children.length-1:0,Ke=Ee.children.length,Ae=Re;Ae>=0&&Ae0?Ke:-1);Ae+=qe){var Ge=Ee.children[Ae];if(Ge.className.indexOf("hidden")===-1&&rt(Ge.dateObj)&&Math.abs(Z.$i-Ae)>=Math.abs(x))return L(Ge)}t.changeMonth(qe),P(I(qe),0)}function P(Z,x){var se=s(),he=Je(se||document.body),qe=Z!==void 0?Z:he?se:t.selectedDateElem!==void 0&&Je(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Je(t.todayDateElem)?t.todayDateElem:I(x>0?1:-1);qe===void 0?t._input.focus():he?A(qe,x):L(qe)}function R(Z,x){for(var se=(new Date(Z,x,1).getDay()-t.l10n.firstDayOfWeek+7)%7,he=t.utils.getDaysInMonth((x-1+12)%12,Z),qe=t.utils.getDaysInMonth(x,Z),le=window.document.createDocumentFragment(),Ee=t.config.showMonths>1,Re=Ee?"prevMonthDay hidden":"prevMonthDay",Ke=Ee?"nextMonthDay hidden":"nextMonthDay",Ae=he+1-se,Ge=0;Ae<=he;Ae++,Ge++)le.appendChild(M("flatpickr-day "+Re,new Date(Z,x-1,Ae),Ae,Ge));for(Ae=1;Ae<=qe;Ae++,Ge++)le.appendChild(M("flatpickr-day",new Date(Z,x,Ae),Ae,Ge));for(var ft=qe+1;ft<=42-se&&(t.config.showMonths===1||Ge%7!==0);ft++,Ge++)le.appendChild(M("flatpickr-day "+Ke,new Date(Z,x+1,ft%qe),ft,Ge));var Xt=$t("div","dayContainer");return Xt.appendChild(le),Xt}function N(){if(t.daysContainer!==void 0){Jo(t.daysContainer),t.weekNumbers&&Jo(t.weekNumbers);for(var Z=document.createDocumentFragment(),x=0;x1||t.config.monthSelectorType!=="dropdown")){var Z=function(he){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&het.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var x=0;x<12;x++)if(Z(x)){var se=$t("option","flatpickr-monthDropdown-month");se.value=new Date(t.currentYear,x).getMonth().toString(),se.textContent=Cr(x,t.config.shorthandCurrentMonth,t.l10n),se.tabIndex=-1,t.currentMonth===x&&(se.selected=!0),t.monthsDropdownContainer.appendChild(se)}}}function j(){var Z=$t("div","flatpickr-month"),x=window.document.createDocumentFragment(),se;t.config.showMonths>1||t.config.monthSelectorType==="static"?se=$t("span","cur-month"):(t.monthsDropdownContainer=$t("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Ee){var Re=jn(Ee),Ke=parseInt(Re.value,10);t.changeMonth(Ke-t.currentMonth),It("onMonthChange")}),U(),se=t.monthsDropdownContainer);var he=Zo("cur-year",{tabindex:"-1"}),qe=he.getElementsByTagName("input")[0];qe.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&qe.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(qe.setAttribute("max",t.config.maxDate.getFullYear().toString()),qe.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var le=$t("div","flatpickr-current-month");return le.appendChild(se),le.appendChild(he),x.appendChild(le),Z.appendChild(x),{container:Z,yearElement:qe,monthElement:se}}function V(){Jo(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var Z=t.config.showMonths;Z--;){var x=j();t.yearElements.push(x.yearElement),t.monthElements.push(x.monthElement),t.monthNav.appendChild(x.container)}t.monthNav.appendChild(t.nextMonthNav)}function K(){return t.monthNav=$t("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=$t("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=$t("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,V(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(Z){t.__hidePrevMonthArrow!==Z&&($n(t.prevMonthNav,"flatpickr-disabled",Z),t.__hidePrevMonthArrow=Z)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(Z){t.__hideNextMonthArrow!==Z&&($n(t.nextMonthNav,"flatpickr-disabled",Z),t.__hideNextMonthArrow=Z)}}),t.currentYearElement=t.yearElements[0],ji(),t.monthNav}function J(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var Z=Ia(t.config);t.timeContainer=$t("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var x=$t("span","flatpickr-time-separator",":"),se=Zo("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=se.getElementsByTagName("input")[0];var he=Zo("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=he.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=In(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?Z.hours:f(Z.hours)),t.minuteElement.value=In(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():Z.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(se),t.timeContainer.appendChild(x),t.timeContainer.appendChild(he),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var qe=Zo("flatpickr-second");t.secondElement=qe.getElementsByTagName("input")[0],t.secondElement.value=In(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():Z.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($t("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(qe)}return t.config.time_24hr||(t.amPM=$t("span","flatpickr-am-pm",t.l10n.amPM[Kn((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 ee(){t.weekdayContainer?Jo(t.weekdayContainer):t.weekdayContainer=$t("div","flatpickr-weekdays");for(var Z=t.config.showMonths;Z--;){var x=$t("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(x)}return X(),t.weekdayContainer}function X(){if(t.weekdayContainer){var Z=t.l10n.firstDayOfWeek,x=xm(t.l10n.weekdays.shorthand);Z>0&&Z({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),r=new fe({props:{class:"form-field required",name:"teamId",$$slots:{default:[R6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),f=new fe({props:{class:"form-field required",name:"keyId",$$slots:{default:[F6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),m=new fe({props:{class:"form-field required",name:"duration",$$slots:{default:[q6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),g=new fe({props:{class:"form-field required",name:"privateKey",$$slots:{default:[H6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),t=b("div"),i=b("div"),H(l.$$.fragment),s=C(),o=b("div"),H(r.$$.fragment),a=C(),u=b("div"),H(f.$$.fragment),c=C(),d=b("div"),H(m.$$.fragment),h=C(),H(g.$$.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,$){v(T,e,$),w(e,t),w(t,i),F(l,i,null),w(t,s),w(t,o),F(r,o,null),w(t,a),w(t,u),F(f,u,null),w(t,c),w(t,d),F(m,d,null),w(t,h),F(g,t,null),_=!0,y||(S=B(e,"submit",tt(n[17])),y=!0)},p(T,$){const E={};$&25165828&&(E.$$scope={dirty:$,ctx:T}),l.$set(E);const M={};$&25165832&&(M.$$scope={dirty:$,ctx:T}),r.$set(M);const L={};$&25165840&&(L.$$scope={dirty:$,ctx:T}),f.$set(L);const I={};$&25165888&&(I.$$scope={dirty:$,ctx:T}),m.$set(I);const A={};$&25165856&&(A.$$scope={dirty:$,ctx:T}),g.$set(A)},i(T){_||(O(l.$$.fragment,T),O(r.$$.fragment,T),O(f.$$.fragment,T),O(m.$$.fragment,T),O(g.$$.fragment,T),_=!0)},o(T){D(l.$$.fragment,T),D(r.$$.fragment,T),D(f.$$.fragment,T),D(m.$$.fragment,T),D(g.$$.fragment,T),_=!1},d(T){T&&k(e),q(l),q(r),q(f),q(m),q(g),y=!1,S()}}}function z6(n){let e;return{c(){e=b("h4"),e.textContent="Generate Apple client secret",p(e,"class","center txt-break")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function U6(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("button"),t=Y("Close"),i=C(),l=b("button"),s=b("i"),o=C(),r=b("span"),r.textContent="Generate and set secret",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[7],p(s,"class","ri-key-line"),p(r,"class","txt"),p(l,"type","submit"),p(l,"form",n[9]),p(l,"class","btn btn-expanded"),l.disabled=a=!n[8]||n[7],Q(l,"btn-loading",n[7])},m(c,d){v(c,e,d),w(e,t),v(c,i,d),v(c,l,d),w(l,s),w(l,o),w(l,r),u||(f=B(e,"click",n[0]),u=!0)},p(c,d){d&128&&(e.disabled=c[7]),d&384&&a!==(a=!c[8]||c[7])&&(l.disabled=a),d&128&&Q(l,"btn-loading",c[7])},d(c){c&&(k(e),k(i),k(l)),u=!1,f()}}}function V6(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[U6],header:[z6],default:[j6]},$$scope:{ctx:n}};return e=new ln({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&128&&(o.overlayClose=!l[7]),s&128&&(o.escClose=!l[7]),s&128&&(o.beforeHide=l[18]),s&16777724&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[19](null),q(e,l)}}}const ur=15777e3;function B6(n,e,t){let i;const l=gt(),s="apple_secret_"+z.randomString(5);let o,r,a,u,f,c,d=!1;function m(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||ur),Wt({}),o==null||o.show()}function h(){return o==null?void 0:o.hide()}async function g(){t(7,d=!0);try{const P=await me.settings.generateAppleClientSecret(r,a,u,f.trim(),c);t(7,d=!1),tn("Successfully generated client secret."),l("submit",P),o==null||o.hide()}catch(P){me.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=_t(this.value),t(6,c)}function $(){f=this.value,t(5,f)}const E=()=>g(),M=()=>!d;function L(P){ie[P?"unshift":"push"](()=>{o=P,t(1,o)})}function I(P){Pe.call(this,n,P)}function A(P){Pe.call(this,n,P)}return t(8,i=!0),[h,o,r,a,u,f,c,d,i,s,g,m,_,y,S,T,$,E,M,L,I,A]}class W6 extends ye{constructor(e){super(),be(this,e,B6,V6,_e,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function Y6(n){let e,t,i,l,s,o,r,a,u,f,c={};return r=new W6({props:c}),n[4](r),r.$on("submit",n[5]),{c(){e=b("button"),t=b("i"),i=C(),l=b("span"),l.textContent="Generate secret",o=C(),H(r.$$.fragment),p(t,"class","ri-key-line"),p(l,"class","txt"),p(e,"type","button"),p(e,"class",s="btn btn-sm btn-secondary btn-provider-"+n[1])},m(d,m){v(d,e,m),w(e,t),w(e,i),w(e,l),v(d,o,m),F(r,d,m),a=!0,u||(f=B(e,"click",n[3]),u=!0)},p(d,[m]){(!a||m&2&&s!==(s="btn btn-sm btn-secondary btn-provider-"+d[1]))&&p(e,"class",s);const h={};r.$set(h)},i(d){a||(O(r.$$.fragment,d),a=!0)},o(d){D(r.$$.fragment,d),a=!1},d(d){d&&(k(e),k(o)),n[4](null),q(r,d),u=!1,f()}}}function K6(n,e,t){let{key:i=""}=e,{config:l={}}=e,s;const o=()=>s==null?void 0:s.show({clientId:l.clientId});function r(u){ie[u?"unshift":"push"](()=>{s=u,t(2,s)})}const a=u=>{var f;t(0,l.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",l)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,l=u.config)},[l,i,s,o,r,a]}class J6 extends ye{constructor(e){super(),be(this,e,K6,Y6,_e,{key:1,config:0})}}function Z6(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("label"),t=Y("Auth URL"),l=C(),s=b("input"),r=C(),a=b("div"),a.textContent="Ex. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(s,"type","url"),p(s,"id",o=n[4]),s.required=!0,p(a,"class","help-block")},m(c,d){v(c,e,d),w(e,t),v(c,l,d),v(c,s,d),ce(s,n[0].authURL),v(c,r,d),v(c,a,d),u||(f=B(s,"input",n[2]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(s,"id",o),d&1&&s.value!==c[0].authURL&&ce(s,c[0].authURL)},d(c){c&&(k(e),k(l),k(s),k(r),k(a)),u=!1,f()}}}function G6(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("label"),t=Y("Token URL"),l=C(),s=b("input"),r=C(),a=b("div"),a.textContent="Ex. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(s,"type","url"),p(s,"id",o=n[4]),s.required=!0,p(a,"class","help-block")},m(c,d){v(c,e,d),w(e,t),v(c,l,d),v(c,s,d),ce(s,n[0].tokenURL),v(c,r,d),v(c,a,d),u||(f=B(s,"input",n[3]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(s,"id",o),d&1&&s.value!==c[0].tokenURL&&ce(s,c[0].tokenURL)},d(c){c&&(k(e),k(l),k(s),k(r),k(a)),u=!1,f()}}}function X6(n){let e,t,i,l,s,o;return i=new fe({props:{class:"form-field required",name:n[1]+".authURL",$$slots:{default:[Z6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),s=new fe({props:{class:"form-field required",name:n[1]+".tokenURL",$$slots:{default:[G6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),e.textContent="Azure AD endpoints",t=C(),H(i.$$.fragment),l=C(),H(s.$$.fragment),p(e,"class","section-title")},m(r,a){v(r,e,a),v(r,t,a),F(i,r,a),v(r,l,a),F(s,r,a),o=!0},p(r,[a]){const u={};a&2&&(u.name=r[1]+".authURL"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&2&&(f.name=r[1]+".tokenURL"),a&49&&(f.$$scope={dirty:a,ctx:r}),s.$set(f)},i(r){o||(O(i.$$.fragment,r),O(s.$$.fragment,r),o=!0)},o(r){D(i.$$.fragment,r),D(s.$$.fragment,r),o=!1},d(r){r&&(k(e),k(t),k(l)),q(i,r),q(s,r)}}}function Q6(n,e,t){let{key:i=""}=e,{config:l={}}=e;function s(){l.authURL=this.value,t(0,l)}function o(){l.tokenURL=this.value,t(0,l)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,l=r.config)},[l,i,s,o]}class x6 extends ye{constructor(e){super(),be(this,e,Q6,X6,_e,{key:1,config:0})}}function e8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Display name"),l=C(),s=b("input"),p(e,"for",i=n[7]),p(s,"type","text"),p(s,"id",o=n[7]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].displayName),r||(a=B(s,"input",n[2]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&o!==(o=u[7])&&p(s,"id",o),f&1&&s.value!==u[0].displayName&&ce(s,u[0].displayName)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function t8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Auth URL"),l=C(),s=b("input"),p(e,"for",i=n[7]),p(s,"type","url"),p(s,"id",o=n[7]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].authURL),r||(a=B(s,"input",n[3]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&o!==(o=u[7])&&p(s,"id",o),f&1&&s.value!==u[0].authURL&&ce(s,u[0].authURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function n8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Token URL"),l=C(),s=b("input"),p(e,"for",i=n[7]),p(s,"type","url"),p(s,"id",o=n[7]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].tokenURL),r||(a=B(s,"input",n[4]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&o!==(o=u[7])&&p(s,"id",o),f&1&&s.value!==u[0].tokenURL&&ce(s,u[0].tokenURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function i8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("User info URL"),l=C(),s=b("input"),p(e,"for",i=n[7]),p(s,"type","url"),p(s,"id",o=n[7]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].userInfoURL),r||(a=B(s,"input",n[5]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&o!==(o=u[7])&&p(s,"id",o),f&1&&s.value!==u[0].userInfoURL&&ce(s,u[0].userInfoURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function l8(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("input"),i=C(),l=b("label"),s=b("span"),s.textContent="Support PKCE",o=C(),r=b("i"),p(e,"type","checkbox"),p(e,"id",t=n[7]),p(s,"class","txt"),p(r,"class","ri-information-line link-hint"),p(l,"for",a=n[7])},m(c,d){v(c,e,d),e.checked=n[0].pkce,v(c,i,d),v(c,l,d),w(l,s),w(l,o),w(l,r),u||(f=[B(e,"change",n[6]),Me(He.call(null,r,{text:"Usually it should be safe to be always enabled as most providers will just ignore the extra query parameters if they don't support PKCE.",position:"right"}))],u=!0)},p(c,d){d&128&&t!==(t=c[7])&&p(e,"id",t),d&1&&(e.checked=c[0].pkce),d&128&&a!==(a=c[7])&&p(l,"for",a)},d(c){c&&(k(e),k(i),k(l)),u=!1,De(f)}}}function s8(n){let e,t,i,l,s,o,r,a,u,f,c,d;return e=new fe({props:{class:"form-field required",name:n[1]+".displayName",$$slots:{default:[e8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),s=new fe({props:{class:"form-field required",name:n[1]+".authURL",$$slots:{default:[t8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),r=new fe({props:{class:"form-field required",name:n[1]+".tokenURL",$$slots:{default:[n8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),u=new fe({props:{class:"form-field required",name:n[1]+".userInfoURL",$$slots:{default:[i8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),c=new fe({props:{class:"form-field",name:n[1]+".pkce",$$slots:{default:[l8,({uniqueId:m})=>({7:m}),({uniqueId:m})=>m?128:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=C(),i=b("div"),i.textContent="Endpoints",l=C(),H(s.$$.fragment),o=C(),H(r.$$.fragment),a=C(),H(u.$$.fragment),f=C(),H(c.$$.fragment),p(i,"class","section-title")},m(m,h){F(e,m,h),v(m,t,h),v(m,i,h),v(m,l,h),F(s,m,h),v(m,o,h),F(r,m,h),v(m,a,h),F(u,m,h),v(m,f,h),F(c,m,h),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".displayName"),h&385&&(g.$$scope={dirty:h,ctx:m}),e.$set(g);const _={};h&2&&(_.name=m[1]+".authURL"),h&385&&(_.$$scope={dirty:h,ctx:m}),s.$set(_);const y={};h&2&&(y.name=m[1]+".tokenURL"),h&385&&(y.$$scope={dirty:h,ctx:m}),r.$set(y);const S={};h&2&&(S.name=m[1]+".userInfoURL"),h&385&&(S.$$scope={dirty:h,ctx:m}),u.$set(S);const T={};h&2&&(T.name=m[1]+".pkce"),h&385&&(T.$$scope={dirty:h,ctx:m}),c.$set(T)},i(m){d||(O(e.$$.fragment,m),O(s.$$.fragment,m),O(r.$$.fragment,m),O(u.$$.fragment,m),O(c.$$.fragment,m),d=!0)},o(m){D(e.$$.fragment,m),D(s.$$.fragment,m),D(r.$$.fragment,m),D(u.$$.fragment,m),D(c.$$.fragment,m),d=!1},d(m){m&&(k(t),k(i),k(l),k(o),k(a),k(f)),q(e,m),q(s,m),q(r,m),q(u,m),q(c,m)}}}function o8(n,e,t){let{key:i=""}=e,{config:l={}}=e;z.isEmpty(l.pkce)&&(l.pkce=!0),l.displayName||(l.displayName="OIDC");function s(){l.displayName=this.value,t(0,l)}function o(){l.authURL=this.value,t(0,l)}function r(){l.tokenURL=this.value,t(0,l)}function a(){l.userInfoURL=this.value,t(0,l)}function u(){l.pkce=this.checked,t(0,l)}return n.$$set=f=>{"key"in f&&t(1,i=f.key),"config"in f&&t(0,l=f.config)},[l,i,s,o,r,a,u]}class ka extends ye{constructor(e){super(),be(this,e,o8,s8,_e,{key:1,config:0})}}function r8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Auth URL"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","url"),p(s,"id",o=n[8]),s.required=n[3]},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].authURL),r||(a=B(s,"input",n[5]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&8&&(s.required=u[3]),f&1&&s.value!==u[0].authURL&&ce(s,u[0].authURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function a8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Token URL"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","url"),p(s,"id",o=n[8]),s.required=n[3]},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].tokenURL),r||(a=B(s,"input",n[6]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&8&&(s.required=u[3]),f&1&&s.value!==u[0].tokenURL&&ce(s,u[0].tokenURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function u8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("User info URL"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","url"),p(s,"id",o=n[8]),s.required=n[3]},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].userInfoURL),r||(a=B(s,"input",n[7]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&8&&(s.required=u[3]),f&1&&s.value!==u[0].userInfoURL&&ce(s,u[0].userInfoURL)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function f8(n){let e,t,i,l,s,o,r,a,u;return l=new fe({props:{class:"form-field "+(n[3]?"required":""),name:n[1]+".authURL",$$slots:{default:[r8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),o=new fe({props:{class:"form-field "+(n[3]?"required":""),name:n[1]+".tokenURL",$$slots:{default:[a8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),a=new fe({props:{class:"form-field "+(n[3]?"required":""),name:n[1]+".userInfoURL",$$slots:{default:[u8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=Y(n[2]),i=C(),H(l.$$.fragment),s=C(),H(o.$$.fragment),r=C(),H(a.$$.fragment),p(e,"class","section-title")},m(f,c){v(f,e,c),w(e,t),v(f,i,c),F(l,f,c),v(f,s,c),F(o,f,c),v(f,r,c),F(a,f,c),u=!0},p(f,[c]){(!u||c&4)&&ue(t,f[2]);const d={};c&8&&(d.class="form-field "+(f[3]?"required":"")),c&2&&(d.name=f[1]+".authURL"),c&777&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const m={};c&8&&(m.class="form-field "+(f[3]?"required":"")),c&2&&(m.name=f[1]+".tokenURL"),c&777&&(m.$$scope={dirty:c,ctx:f}),o.$set(m);const h={};c&8&&(h.class="form-field "+(f[3]?"required":"")),c&2&&(h.name=f[1]+".userInfoURL"),c&777&&(h.$$scope={dirty:c,ctx:f}),a.$set(h)},i(f){u||(O(l.$$.fragment,f),O(o.$$.fragment,f),O(a.$$.fragment,f),u=!0)},o(f){D(l.$$.fragment,f),D(o.$$.fragment,f),D(a.$$.fragment,f),u=!1},d(f){f&&(k(e),k(i),k(s),k(r)),q(l,f),q(o,f),q(a,f)}}}function c8(n,e,t){let i,{key:l=""}=e,{config:s={}}=e,{required:o=!1}=e,{title:r="Provider endpoints"}=e;function a(){s.authURL=this.value,t(0,s)}function u(){s.tokenURL=this.value,t(0,s)}function f(){s.userInfoURL=this.value,t(0,s)}return n.$$set=c=>{"key"in c&&t(1,l=c.key),"config"in c&&t(0,s=c.config),"required"in c&&t(4,o=c.required),"title"in c&&t(2,r=c.title)},n.$$.update=()=>{n.$$.dirty&17&&t(3,i=o&&(s==null?void 0:s.enabled))},[s,l,r,i,o,a,u,f]}class va extends ye{constructor(e){super(),be(this,e,c8,f8,_e,{key:1,config:0,required:4,title:2})}}const ef=[{key:"apple",title:"Apple",logo:"apple.svg",optionsComponent:J6},{key:"google",title:"Google",logo:"google.svg"},{key:"microsoft",title:"Microsoft",logo:"microsoft.svg",optionsComponent:x6},{key:"yandex",title:"Yandex",logo:"yandex.svg"},{key:"facebook",title:"Facebook",logo:"facebook.svg"},{key:"instagram",title:"Instagram",logo:"instagram.svg"},{key:"github",title:"GitHub",logo:"github.svg"},{key:"gitlab",title:"GitLab",logo:"gitlab.svg",optionsComponent:va,optionsComponentProps:{title:"Self-hosted endpoints (optional)"}},{key:"bitbucket",title:"Bitbucket",logo:"bitbucket.svg"},{key:"gitee",title:"Gitee",logo:"gitee.svg"},{key:"gitea",title:"Gitea",logo:"gitea.svg",optionsComponent:va,optionsComponentProps:{title:"Self-hosted endpoints (optional)"}},{key:"discord",title:"Discord",logo:"discord.svg"},{key:"twitter",title:"Twitter",logo:"twitter.svg"},{key:"kakao",title:"Kakao",logo:"kakao.svg"},{key:"vk",title:"VK",logo:"vk.svg"},{key:"spotify",title:"Spotify",logo:"spotify.svg"},{key:"twitch",title:"Twitch",logo:"twitch.svg"},{key:"patreon",title:"Patreon (v2)",logo:"patreon.svg"},{key:"strava",title:"Strava",logo:"strava.svg"},{key:"livechat",title:"LiveChat",logo:"livechat.svg"},{key:"mailcow",title:"mailcow",logo:"mailcow.svg",optionsComponent:va,optionsComponentProps:{required:!0}},{key:"planningcenter",title:"Planning Center",logo:"planningcenter.svg"},{key:"oidc",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:ka},{key:"oidc2",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:ka},{key:"oidc3",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:ka}];function lm(n,e,t){const i=n.slice();return i[16]=e[t],i}function sm(n){let e,t,i,l,s;return{c(){e=b("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){v(o,e,r),i=!0,l||(s=B(e,"click",n[9]),l=!0)},p:te,i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Fn,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Fn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function d8(n){let e,t,i,l,s,o,r,a,u,f,c=n[1]!=""&&sm(n);return{c(){e=b("label"),t=b("i"),l=C(),s=b("input"),r=C(),c&&c.c(),a=ge(),p(t,"class","ri-search-line"),p(e,"for",i=n[19]),p(e,"class","m-l-10 txt-xl"),p(s,"id",o=n[19]),p(s,"type","text"),p(s,"placeholder","Search provider")},m(d,m){v(d,e,m),w(e,t),v(d,l,m),v(d,s,m),ce(s,n[1]),v(d,r,m),c&&c.m(d,m),v(d,a,m),u||(f=B(s,"input",n[8]),u=!0)},p(d,m){m&524288&&i!==(i=d[19])&&p(e,"for",i),m&524288&&o!==(o=d[19])&&p(s,"id",o),m&2&&s.value!==d[1]&&ce(s,d[1]),d[1]!=""?c?(c.p(d,m),m&2&&O(c,1)):(c=sm(d),c.c(),O(c,1),c.m(a.parentNode,a)):c&&(re(),D(c,1,1,()=>{c=null}),ae())},d(d){d&&(k(e),k(l),k(s),k(r),k(a)),c&&c.d(d),u=!1,f()}}}function om(n){let e,t,i,l,s=n[1]!=""&&rm(n);return{c(){e=b("div"),t=b("span"),t.textContent="No providers to select.",i=C(),s&&s.c(),l=C(),p(t,"class","txt-hint"),p(e,"class","flex inline-flex")},m(o,r){v(o,e,r),w(e,t),w(e,i),s&&s.m(e,null),w(e,l)},p(o,r){o[1]!=""?s?s.p(o,r):(s=rm(o),s.c(),s.m(e,l)):s&&(s.d(1),s=null)},d(o){o&&k(e),s&&s.d()}}}function rm(n){let e,t,i;return{c(){e=b("button"),e.textContent="Clear filter",p(e,"type","button"),p(e,"class","btn btn-sm btn-secondary")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[5]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function am(n){let e,t,i;return{c(){e=b("img"),vn(e.src,t="./images/oauth2/"+n[16].logo)||p(e,"src",t),p(e,"alt",i=n[16].title+" logo")},m(l,s){v(l,e,s)},p(l,s){s&8&&!vn(e.src,t="./images/oauth2/"+l[16].logo)&&p(e,"src",t),s&8&&i!==(i=l[16].title+" logo")&&p(e,"alt",i)},d(l){l&&k(e)}}}function um(n,e){let t,i,l,s,o,r,a=e[16].title+"",u,f,c,d=e[16].key+"",m,h,g,_,y=e[16].logo&&am(e);function S(){return e[10](e[16])}return{key:n,first:null,c(){t=b("div"),i=b("button"),l=b("figure"),y&&y.c(),s=C(),o=b("div"),r=b("div"),u=Y(a),f=C(),c=b("em"),m=Y(d),h=C(),p(l,"class","provider-logo"),p(r,"class","title"),p(c,"class","txt-hint txt-sm m-r-auto"),p(o,"class","content"),p(i,"type","button"),p(i,"class","provider-card handle"),p(t,"class","col-lg-6"),this.first=t},m(T,$){v(T,t,$),w(t,i),w(i,l),y&&y.m(l,null),w(i,s),w(i,o),w(o,r),w(r,u),w(o,f),w(o,c),w(c,m),w(t,h),g||(_=B(i,"click",S),g=!0)},p(T,$){e=T,e[16].logo?y?y.p(e,$):(y=am(e),y.c(),y.m(l,null)):y&&(y.d(1),y=null),$&8&&a!==(a=e[16].title+"")&&ue(u,a),$&8&&d!==(d=e[16].key+"")&&ue(m,d)},d(T){T&&k(t),y&&y.d(),g=!1,_()}}}function p8(n){let e,t,i,l=[],s=new Map,o;e=new fe({props:{class:"searchbar m-b-sm",$$slots:{default:[d8,({uniqueId:f})=>({19:f}),({uniqueId:f})=>f?524288:0]},$$scope:{ctx:n}}});let r=pe(n[3]);const a=f=>f[16].key;for(let f=0;f!l.includes($.key)&&(T==""||$.key.toLowerCase().includes(T)||$.title.toLowerCase().includes(T)))}function d(){t(1,o="")}function m(){o=this.value,t(1,o)}const h=()=>t(1,o=""),g=T=>f(T);function _(T){ie[T?"unshift":"push"](()=>{s=T,t(2,s)})}function y(T){Pe.call(this,n,T)}function S(T){Pe.call(this,n,T)}return n.$$set=T=>{"disabled"in T&&t(6,l=T.disabled)},n.$$.update=()=>{n.$$.dirty&66&&(o!==-1||l!==-1)&&t(3,r=c())},[u,o,s,r,f,d,l,a,m,h,g,_,y,S]}class b8 extends ye{constructor(e){super(),be(this,e,g8,_8,_e,{disabled:6,show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function fm(n,e,t){const i=n.slice();i[28]=e[t],i[31]=t;const l=i[9](i[28].name);return i[29]=l,i}function y8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[27]),p(l,"for",o=n[27])},m(u,f){v(u,e,f),e.checked=n[0].oauth2.enabled,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[10]),r=!0)},p(u,f){f[0]&134217728&&t!==(t=u[27])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].oauth2.enabled),f[0]&134217728&&o!==(o=u[27])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function k8(n){let e;return{c(){e=b("i"),p(e,"class","ri-puzzle-line txt-sm txt-hint")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function v8(n){let e,t,i;return{c(){e=b("img"),vn(e.src,t="./images/oauth2/"+n[29].logo)||p(e,"src",t),p(e,"alt",i=n[29].title+" logo")},m(l,s){v(l,e,s)},p(l,s){s[0]&1&&!vn(e.src,t="./images/oauth2/"+l[29].logo)&&p(e,"src",t),s[0]&1&&i!==(i=l[29].title+" logo")&&p(e,"alt",i)},d(l){l&&k(e)}}}function cm(n){let e,t,i;function l(){return n[11](n[29],n[28],n[31])}return{c(){e=b("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-circle btn-hint btn-transparent"),p(e,"aria-label","Provider settings")},m(s,o){v(s,e,o),t||(i=[Me(He.call(null,e,{text:"Edit config",position:"left"})),B(e,"click",l)],t=!0)},p(s,o){n=s},d(s){s&&k(e),t=!1,De(i)}}}function dm(n,e){var T;let t,i,l,s,o,r,a=(e[28].displayName||((T=e[29])==null?void 0:T.title)||"Custom")+"",u,f,c,d=e[28].name+"",m,h;function g($,E){var M;return(M=$[29])!=null&&M.logo?v8:k8}let _=g(e),y=_(e),S=e[29]&&cm(e);return{key:n,first:null,c(){var $,E,M;t=b("div"),i=b("div"),l=b("figure"),y.c(),s=C(),o=b("div"),r=b("div"),u=Y(a),f=C(),c=b("em"),m=Y(d),h=C(),S&&S.c(),p(l,"class","provider-logo"),p(r,"class","title"),p(c,"class","txt-hint txt-sm m-r-auto"),p(o,"class","content"),p(i,"class","provider-card"),Q(i,"error",!z.isEmpty((M=(E=($=e[1])==null?void 0:$.oauth2)==null?void 0:E.providers)==null?void 0:M[e[31]])),p(t,"class","col-lg-6"),this.first=t},m($,E){v($,t,E),w(t,i),w(i,l),y.m(l,null),w(i,s),w(i,o),w(o,r),w(r,u),w(o,f),w(o,c),w(c,m),w(i,h),S&&S.m(i,null)},p($,E){var M,L,I,A;e=$,_===(_=g(e))&&y?y.p(e,E):(y.d(1),y=_(e),y&&(y.c(),y.m(l,null))),E[0]&1&&a!==(a=(e[28].displayName||((M=e[29])==null?void 0:M.title)||"Custom")+"")&&ue(u,a),E[0]&1&&d!==(d=e[28].name+"")&&ue(m,d),e[29]?S?S.p(e,E):(S=cm(e),S.c(),S.m(i,null)):S&&(S.d(1),S=null),E[0]&3&&Q(i,"error",!z.isEmpty((A=(I=(L=e[1])==null?void 0:L.oauth2)==null?void 0:I.providers)==null?void 0:A[e[31]]))},d($){$&&k(t),y.d(),S&&S.d()}}}function w8(n){let e;return{c(){e=b("i"),p(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function S8(n){let e;return{c(){e=b("i"),p(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function pm(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g;return l=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.mappedFields.name",$$slots:{default:[T8,({uniqueId:_})=>({27:_}),({uniqueId:_})=>[_?134217728:0]]},$$scope:{ctx:n}}}),r=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.mappedFields.avatarURL",$$slots:{default:[$8,({uniqueId:_})=>({27:_}),({uniqueId:_})=>[_?134217728:0]]},$$scope:{ctx:n}}}),f=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.mappedFields.id",$$slots:{default:[C8,({uniqueId:_})=>({27:_}),({uniqueId:_})=>[_?134217728:0]]},$$scope:{ctx:n}}}),m=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.mappedFields.username",$$slots:{default:[O8,({uniqueId:_})=>({27:_}),({uniqueId:_})=>[_?134217728:0]]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),i=b("div"),H(l.$$.fragment),s=C(),o=b("div"),H(r.$$.fragment),a=C(),u=b("div"),H(f.$$.fragment),c=C(),d=b("div"),H(m.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-6"),p(d,"class","col-sm-6"),p(t,"class","grid grid-sm p-t-xs"),p(e,"class","block")},m(_,y){v(_,e,y),w(e,t),w(t,i),F(l,i,null),w(t,s),w(t,o),F(r,o,null),w(t,a),w(t,u),F(f,u,null),w(t,c),w(t,d),F(m,d,null),g=!0},p(_,y){const S={};y[0]&134217761|y[1]&2&&(S.$$scope={dirty:y,ctx:_}),l.$set(S);const T={};y[0]&134217793|y[1]&2&&(T.$$scope={dirty:y,ctx:_}),r.$set(T);const $={};y[0]&134217761|y[1]&2&&($.$$scope={dirty:y,ctx:_}),f.$set($);const E={};y[0]&134217761|y[1]&2&&(E.$$scope={dirty:y,ctx:_}),m.$set(E)},i(_){g||(O(l.$$.fragment,_),O(r.$$.fragment,_),O(f.$$.fragment,_),O(m.$$.fragment,_),_&&nt(()=>{g&&(h||(h=ze(e,wt,{duration:150},!0)),h.run(1))}),g=!0)},o(_){D(l.$$.fragment,_),D(r.$$.fragment,_),D(f.$$.fragment,_),D(m.$$.fragment,_),_&&(h||(h=ze(e,wt,{duration:150},!1)),h.run(0)),g=!1},d(_){_&&k(e),q(l),q(r),q(f),q(m),_&&h&&h.end()}}}function T8(n){let e,t,i,l,s,o,r;function a(f){n[14](f)}let u={id:n[27],items:n[5],toggle:!0,zeroFunc:A8,selectPlaceholder:"Select field"};return n[0].oauth2.mappedFields.name!==void 0&&(u.selected=n[0].oauth2.mappedFields.name),s=new ds({props:u}),ie.push(()=>ve(s,"selected",a)),{c(){e=b("label"),t=Y("OAuth2 full name"),l=C(),H(s.$$.fragment),p(e,"for",i=n[27])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c[0]&134217728&&i!==(i=f[27]))&&p(e,"for",i);const d={};c[0]&134217728&&(d.id=f[27]),c[0]&32&&(d.items=f[5]),!o&&c[0]&1&&(o=!0,d.selected=f[0].oauth2.mappedFields.name,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function $8(n){let e,t,i,l,s,o,r;function a(f){n[15](f)}let u={id:n[27],items:n[6],toggle:!0,zeroFunc:P8,selectPlaceholder:"Select field"};return n[0].oauth2.mappedFields.avatarURL!==void 0&&(u.selected=n[0].oauth2.mappedFields.avatarURL),s=new ds({props:u}),ie.push(()=>ve(s,"selected",a)),{c(){e=b("label"),t=Y("OAuth2 avatar"),l=C(),H(s.$$.fragment),p(e,"for",i=n[27])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c[0]&134217728&&i!==(i=f[27]))&&p(e,"for",i);const d={};c[0]&134217728&&(d.id=f[27]),c[0]&64&&(d.items=f[6]),!o&&c[0]&1&&(o=!0,d.selected=f[0].oauth2.mappedFields.avatarURL,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function C8(n){let e,t,i,l,s,o,r;function a(f){n[16](f)}let u={id:n[27],items:n[5],toggle:!0,zeroFunc:N8,selectPlaceholder:"Select field"};return n[0].oauth2.mappedFields.id!==void 0&&(u.selected=n[0].oauth2.mappedFields.id),s=new ds({props:u}),ie.push(()=>ve(s,"selected",a)),{c(){e=b("label"),t=Y("OAuth2 id"),l=C(),H(s.$$.fragment),p(e,"for",i=n[27])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c[0]&134217728&&i!==(i=f[27]))&&p(e,"for",i);const d={};c[0]&134217728&&(d.id=f[27]),c[0]&32&&(d.items=f[5]),!o&&c[0]&1&&(o=!0,d.selected=f[0].oauth2.mappedFields.id,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function O8(n){let e,t,i,l,s,o,r;function a(f){n[17](f)}let u={id:n[27],items:n[5],toggle:!0,zeroFunc:R8,selectPlaceholder:"Select field"};return n[0].oauth2.mappedFields.username!==void 0&&(u.selected=n[0].oauth2.mappedFields.username),s=new ds({props:u}),ie.push(()=>ve(s,"selected",a)),{c(){e=b("label"),t=Y("OAuth2 username"),l=C(),H(s.$$.fragment),p(e,"for",i=n[27])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c[0]&134217728&&i!==(i=f[27]))&&p(e,"for",i);const d={};c[0]&134217728&&(d.id=f[27]),c[0]&32&&(d.items=f[5]),!o&&c[0]&1&&(o=!0,d.selected=f[0].oauth2.mappedFields.username,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function E8(n){let e,t,i,l=[],s=new Map,o,r,a,u,f,c,d,m=n[0].name+"",h,g,_,y,S,T,$,E,M;e=new fe({props:{class:"form-field form-field-toggle",name:"oauth2.enabled",$$slots:{default:[y8,({uniqueId:U})=>({27:U}),({uniqueId:U})=>[U?134217728:0]]},$$scope:{ctx:n}}});let L=pe(n[0].oauth2.providers);const I=U=>U[28].name;for(let U=0;U Add provider',u=C(),f=b("button"),c=b("strong"),d=Y("Optional "),h=Y(m),g=Y(" create fields map"),_=C(),R.c(),S=C(),N&&N.c(),T=ge(),p(a,"class","btn btn-block btn-lg btn-secondary txt-base"),p(r,"class","col-lg-6"),p(i,"class","grid grid-sm"),p(c,"class","txt"),p(f,"type","button"),p(f,"class",y="m-t-25 btn btn-sm "+(n[4]?"btn-secondary":"btn-hint btn-transparent"))},m(U,j){F(e,U,j),v(U,t,j),v(U,i,j);for(let V=0;V{N=null}),ae())},i(U){$||(O(e.$$.fragment,U),O(N),$=!0)},o(U){D(e.$$.fragment,U),D(N),$=!1},d(U){U&&(k(t),k(i),k(u),k(f),k(S),k(T)),q(e,U);for(let j=0;j0),p(r,"class","label label-success")},m(a,u){v(a,e,u),w(e,t),w(e,i),w(e,s),v(a,o,u),v(a,r,u)},p(a,u){u[0]&128&&ue(t,a[7]),u[0]&128&&l!==(l=a[7]==1?"provider":"providers")&&ue(s,l),u[0]&128&&Q(e,"label-warning",!a[7]),u[0]&128&&Q(e,"label-info",a[7]>0)},d(a){a&&(k(e),k(o),k(r))}}}function mm(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){v(o,e,r),i=!0,l||(s=Me(He.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function I8(n){let e,t,i,l,s,o;function r(c,d){return c[0].oauth2.enabled?D8:M8}let a=r(n),u=a(n),f=n[8]&&mm();return{c(){e=b("div"),e.innerHTML=' OAuth2',t=C(),i=b("div"),l=C(),u.c(),s=C(),f&&f.c(),o=ge(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){v(c,e,d),v(c,t,d),v(c,i,d),v(c,l,d),u.m(c,d),v(c,s,d),f&&f.m(c,d),v(c,o,d)},p(c,d){a===(a=r(c))&&u?u.p(c,d):(u.d(1),u=a(c),u&&(u.c(),u.m(s.parentNode,s))),c[8]?f?d[0]&256&&O(f,1):(f=mm(),f.c(),O(f,1),f.m(o.parentNode,o)):f&&(re(),D(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(l),k(s),k(o)),u.d(c),f&&f.d(c)}}}function L8(n){var u,f;let e,t,i,l,s,o;e=new qi({props:{single:!0,$$slots:{header:[I8],default:[E8]},$$scope:{ctx:n}}});let r={disabled:((f=(u=n[0].oauth2)==null?void 0:u.providers)==null?void 0:f.map(hm))||[]};i=new b8({props:r}),n[18](i),i.$on("select",n[19]);let a={};return s=new P6({props:a}),n[20](s),s.$on("remove",n[21]),s.$on("submit",n[22]),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment),l=C(),H(s.$$.fragment)},m(c,d){F(e,c,d),v(c,t,d),F(i,c,d),v(c,l,d),F(s,c,d),o=!0},p(c,d){var _,y;const m={};d[0]&511|d[1]&2&&(m.$$scope={dirty:d,ctx:c}),e.$set(m);const h={};d[0]&1&&(h.disabled=((y=(_=c[0].oauth2)==null?void 0:_.providers)==null?void 0:y.map(hm))||[]),i.$set(h);const g={};s.$set(g)},i(c){o||(O(e.$$.fragment,c),O(i.$$.fragment,c),O(s.$$.fragment,c),o=!0)},o(c){D(e.$$.fragment,c),D(i.$$.fragment,c),D(s.$$.fragment,c),o=!1},d(c){c&&(k(t),k(l)),q(e,c),n[18](null),q(i,c),n[20](null),q(s,c)}}}const A8=()=>"",P8=()=>"",N8=()=>"",R8=()=>"",hm=n=>n.name;function F8(n,e,t){let i,l,s;Qe(n,Sn,j=>t(1,s=j));let{collection:o}=e;const r=["id","email","emailVisibility","verified","tokenKey","password"],a=["text","editor","url","email","json"],u=a.concat("file");let f,c,d=!1,m=[],h=[];function g(j=[]){var V,K;t(5,m=((V=j==null?void 0:j.filter(J=>a.includes(J.type)&&!r.includes(J.name)))==null?void 0:V.map(J=>J.name))||[]),t(6,h=((K=j==null?void 0:j.filter(J=>u.includes(J.type)&&!r.includes(J.name)))==null?void 0:K.map(J=>J.name))||[])}function _(j){for(let V of ef)if(V.key==j)return V;return null}function y(){o.oauth2.enabled=this.checked,t(0,o)}const S=(j,V,K)=>{c==null||c.show(j,V,K)},T=()=>f==null?void 0:f.show(),$=()=>t(4,d=!d);function E(j){n.$$.not_equal(o.oauth2.mappedFields.name,j)&&(o.oauth2.mappedFields.name=j,t(0,o))}function M(j){n.$$.not_equal(o.oauth2.mappedFields.avatarURL,j)&&(o.oauth2.mappedFields.avatarURL=j,t(0,o))}function L(j){n.$$.not_equal(o.oauth2.mappedFields.id,j)&&(o.oauth2.mappedFields.id=j,t(0,o))}function I(j){n.$$.not_equal(o.oauth2.mappedFields.username,j)&&(o.oauth2.mappedFields.username=j,t(0,o))}function A(j){ie[j?"unshift":"push"](()=>{f=j,t(2,f)})}const P=j=>{var V,K;c.show(j.detail,{},((K=(V=o.oauth2)==null?void 0:V.providers)==null?void 0:K.length)||0)};function R(j){ie[j?"unshift":"push"](()=>{c=j,t(3,c)})}const N=j=>{const V=j.detail.uiOptions;z.removeByKey(o.oauth2.providers,"name",V.key),t(0,o)},U=j=>{const V=j.detail.uiOptions,K=j.detail.config;t(0,o.oauth2.providers=o.oauth2.providers||[],o),z.pushOrReplaceByKey(o.oauth2.providers,Object.assign({name:V.key},K),"name"),t(0,o)};return n.$$set=j=>{"collection"in j&&t(0,o=j.collection)},n.$$.update=()=>{var j,V;n.$$.dirty[0]&1&&z.isEmpty(o.oauth2)&&t(0,o.oauth2={enabled:!1,mappedFields:{},providers:[]},o),n.$$.dirty[0]&1&&g(o.fields),n.$$.dirty[0]&2&&t(8,i=!z.isEmpty(s==null?void 0:s.oauth2)),n.$$.dirty[0]&1&&t(7,l=((V=(j=o.oauth2)==null?void 0:j.providers)==null?void 0:V.length)||0)},[o,s,f,c,d,m,h,l,i,_,y,S,T,$,E,M,L,I,A,P,R,N,U]}class q8 extends ye{constructor(e){super(),be(this,e,F8,L8,_e,{collection:0},null,[-1,-1])}}function _m(n){let e,t,i;return{c(){e=b("i"),p(e,"class","ri-information-line link-hint")},m(l,s){v(l,e,s),t||(i=Me(He.call(null,e,{text:"Superusers can have OTP only as part of Two-factor authentication.",position:"right"})),t=!0)},d(l){l&&k(e),t=!1,i()}}}function H8(n){let e,t,i,l,s,o,r,a,u,f,c=n[2]&&_m();return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable"),r=C(),c&&c.c(),a=ge(),p(e,"type","checkbox"),p(e,"id",t=n[8]),p(l,"for",o=n[8])},m(d,m){v(d,e,m),e.checked=n[0].otp.enabled,v(d,i,m),v(d,l,m),w(l,s),v(d,r,m),c&&c.m(d,m),v(d,a,m),u||(f=[B(e,"change",n[4]),B(e,"change",n[5])],u=!0)},p(d,m){m&256&&t!==(t=d[8])&&p(e,"id",t),m&1&&(e.checked=d[0].otp.enabled),m&256&&o!==(o=d[8])&&p(l,"for",o),d[2]?c||(c=_m(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&(k(e),k(i),k(l),k(r),k(a)),c&&c.d(d),u=!1,De(f)}}}function j8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Duration (in seconds)"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","number"),p(s,"min","0"),p(s,"step","1"),p(s,"id",o=n[8]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].otp.duration),r||(a=B(s,"input",n[6]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&1&&_t(s.value)!==u[0].otp.duration&&ce(s,u[0].otp.duration)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function z8(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Generated password length"),l=C(),s=b("input"),p(e,"for",i=n[8]),p(s,"type","number"),p(s,"min","0"),p(s,"step","1"),p(s,"id",o=n[8]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[0].otp.length),r||(a=B(s,"input",n[7]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(s,"id",o),f&1&&_t(s.value)!==u[0].otp.length&&ce(s,u[0].otp.length)},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function U8(n){let e,t,i,l,s,o,r,a,u;return e=new fe({props:{class:"form-field form-field-toggle",name:"otp.enabled",$$slots:{default:[H8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),s=new fe({props:{class:"form-field form-field-toggle required",name:"otp.duration",$$slots:{default:[j8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),a=new fe({props:{class:"form-field form-field-toggle required",name:"otp.length",$$slots:{default:[z8,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=C(),i=b("div"),l=b("div"),H(s.$$.fragment),o=C(),r=b("div"),H(a.$$.fragment),p(l,"class","col-sm-6"),p(r,"class","col-sm-6"),p(i,"class","grid grid-sm")},m(f,c){F(e,f,c),v(f,t,c),v(f,i,c),w(i,l),F(s,l,null),w(i,o),w(i,r),F(a,r,null),u=!0},p(f,c){const d={};c&773&&(d.$$scope={dirty:c,ctx:f}),e.$set(d);const m={};c&769&&(m.$$scope={dirty:c,ctx:f}),s.$set(m);const h={};c&769&&(h.$$scope={dirty:c,ctx:f}),a.$set(h)},i(f){u||(O(e.$$.fragment,f),O(s.$$.fragment,f),O(a.$$.fragment,f),u=!0)},o(f){D(e.$$.fragment,f),D(s.$$.fragment,f),D(a.$$.fragment,f),u=!1},d(f){f&&(k(t),k(i)),q(e,f),q(s),q(a)}}}function V8(n){let e;return{c(){e=b("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function B8(n){let e;return{c(){e=b("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function gm(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){v(o,e,r),i=!0,l||(s=Me(He.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function W8(n){let e,t,i,l,s,o;function r(c,d){return c[0].otp.enabled?B8:V8}let a=r(n),u=a(n),f=n[1]&&gm();return{c(){e=b("div"),e.innerHTML=' One-time password (OTP)',t=C(),i=b("div"),l=C(),u.c(),s=C(),f&&f.c(),o=ge(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){v(c,e,d),v(c,t,d),v(c,i,d),v(c,l,d),u.m(c,d),v(c,s,d),f&&f.m(c,d),v(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(s.parentNode,s))),c[1]?f?d&2&&O(f,1):(f=gm(),f.c(),O(f,1),f.m(o.parentNode,o)):f&&(re(),D(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(l),k(s),k(o)),u.d(c),f&&f.d(c)}}}function Y8(n){let e,t;return e=new qi({props:{single:!0,$$slots:{header:[W8],default:[U8]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&519&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function K8(n,e,t){let i,l,s;Qe(n,Sn,c=>t(3,s=c));let{collection:o}=e;function r(){o.otp.enabled=this.checked,t(0,o)}const a=c=>{i&&t(0,o.mfa.enabled=c.target.checked,o)};function u(){o.otp.duration=_t(this.value),t(0,o)}function f(){o.otp.length=_t(this.value),t(0,o)}return n.$$set=c=>{"collection"in c&&t(0,o=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&z.isEmpty(o.otp)&&t(0,o.otp={enabled:!0,duration:300,length:8},o),n.$$.dirty&1&&t(2,i=(o==null?void 0:o.system)&&(o==null?void 0:o.name)==="_superusers"),n.$$.dirty&8&&t(1,l=!z.isEmpty(s==null?void 0:s.otp))},[o,l,i,s,r,a,u,f]}class J8 extends ye{constructor(e){super(),be(this,e,K8,Y8,_e,{collection:0})}}function bm(n){let e,t;return{c(){e=b("i"),p(e,"class",t="icon "+n[0].icon)},m(i,l){v(i,e,l)},p(i,l){l&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&k(e)}}}function Z8(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",l,s=n[0].icon&&bm(n);return{c(){s&&s.c(),e=C(),t=b("span"),l=Y(i),p(t,"class","txt")},m(o,r){s&&s.m(o,r),v(o,e,r),v(o,t,r),w(t,l)},p(o,[r]){o[0].icon?s?s.p(o,r):(s=bm(o),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&ue(l,i)},i:te,o:te,d(o){o&&(k(e),k(t)),s&&s.d(o)}}}function G8(n,e,t){let{item:i={}}=e;return n.$$set=l=>{"item"in l&&t(0,i=l.item)},[i]}class ym extends ye{constructor(e){super(),be(this,e,G8,Z8,_e,{item:0})}}const X8=n=>({}),km=n=>({});function Q8(n){let e;const t=n[8].afterOptions,i=Lt(t,n,n[12],km);return{c(){i&&i.c()},m(l,s){i&&i.m(l,s),e=!0},p(l,s){i&&i.p&&(!e||s&4096)&&Pt(i,t,l,l[12],e?At(t,l[12],s,X8):Nt(l[12]),km)},i(l){e||(O(i,l),e=!0)},o(l){D(i,l),e=!1},d(l){i&&i.d(l)}}}function x8(n){let e,t,i;const l=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function s(r){n[9](r)}let o={$$slots:{afterOptions:[Q8]},$$scope:{ctx:n}};for(let r=0;rve(e,"selected",s)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){H(e.$$.fragment)},m(r,a){F(e,r,a),i=!0},p(r,[a]){const u=a&62?vt(l,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Ft(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||(O(e.$$.fragment,r),i=!0)},o(r){D(e.$$.fragment,r),i=!1},d(r){q(e,r)}}}function eO(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let l=lt(e,i),{$$slots:s={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=ym}=e,{optionComponent:c=ym}=e,{selectionKey:d="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function h(T){T=z.toArray(T,!0);let $=[];for(let E of T){const M=z.findByKey(r,d,E);M&&$.push(M)}T.length&&!$.length||t(0,u=a?$:$[0])}async function g(T){let $=z.toArray(T,!0).map(E=>E[d]);r.length&&t(6,m=a?$:$[0])}function _(T){u=T,t(0,u)}function y(T){Pe.call(this,n,T)}function S(T){Pe.call(this,n,T)}return n.$$set=T=>{e=je(je({},e),Ut(T)),t(5,l=lt(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,m=T.keyOfSelected),"$$scope"in T&&t(12,o=T.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&h(m),n.$$.dirty&1&&g(u)},[u,r,a,f,c,l,m,d,s,_,y,S,o]}class xn extends ye{constructor(e){super(),be(this,e,eO,x8,_e,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function vm(n){let e,t,i;return{c(){e=b("i"),p(e,"class","ri-information-line link-hint")},m(l,s){v(l,e,s),t||(i=Me(He.call(null,e,{text:"Superusers are required to have password auth enabled.",position:"right"})),t=!0)},d(l){l&&k(e),t=!1,i()}}}function tO(n){let e,t,i,l,s,o,r,a,u,f,c=n[3]&&vm();return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Enable"),r=C(),c&&c.c(),a=ge(),p(e,"type","checkbox"),p(e,"id",t=n[8]),e.disabled=n[3],p(l,"for",o=n[8])},m(d,m){v(d,e,m),e.checked=n[0].passwordAuth.enabled,v(d,i,m),v(d,l,m),w(l,s),v(d,r,m),c&&c.m(d,m),v(d,a,m),u||(f=B(e,"change",n[5]),u=!0)},p(d,m){m&256&&t!==(t=d[8])&&p(e,"id",t),m&8&&(e.disabled=d[3]),m&1&&(e.checked=d[0].passwordAuth.enabled),m&256&&o!==(o=d[8])&&p(l,"for",o),d[3]?c||(c=vm(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&(k(e),k(i),k(l),k(r),k(a)),c&&c.d(d),u=!1,f()}}}function nO(n){let e,t,i,l,s,o,r;function a(f){n[6](f)}let u={items:n[1],multiple:!0};return n[0].passwordAuth.identityFields!==void 0&&(u.keyOfSelected=n[0].passwordAuth.identityFields),s=new xn({props:u}),ie.push(()=>ve(s,"keyOfSelected",a)),{c(){e=b("label"),t=b("span"),t.textContent="Unique identity fields",l=C(),H(s.$$.fragment),p(t,"class","txt"),p(e,"for",i=n[8])},m(f,c){v(f,e,c),w(e,t),v(f,l,c),F(s,f,c),r=!0},p(f,c){(!r||c&256&&i!==(i=f[8]))&&p(e,"for",i);const d={};c&2&&(d.items=f[1]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].passwordAuth.identityFields,$e(()=>o=!1)),s.$set(d)},i(f){r||(O(s.$$.fragment,f),r=!0)},o(f){D(s.$$.fragment,f),r=!1},d(f){f&&(k(e),k(l)),q(s,f)}}}function iO(n){let e,t,i,l;return e=new fe({props:{class:"form-field form-field-toggle",name:"passwordAuth.enabled",$$slots:{default:[tO,({uniqueId:s})=>({8:s}),({uniqueId:s})=>s?256:0]},$$scope:{ctx:n}}}),i=new fe({props:{class:"form-field required m-0",name:"passwordAuth.identityFields",$$slots:{default:[nO,({uniqueId:s})=>({8:s}),({uniqueId:s})=>s?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment)},m(s,o){F(e,s,o),v(s,t,o),F(i,s,o),l=!0},p(s,o){const r={};o&777&&(r.$$scope={dirty:o,ctx:s}),e.$set(r);const a={};o&771&&(a.$$scope={dirty:o,ctx:s}),i.$set(a)},i(s){l||(O(e.$$.fragment,s),O(i.$$.fragment,s),l=!0)},o(s){D(e.$$.fragment,s),D(i.$$.fragment,s),l=!1},d(s){s&&k(t),q(e,s),q(i,s)}}}function lO(n){let e;return{c(){e=b("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function sO(n){let e;return{c(){e=b("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function wm(n){let e,t,i,l,s;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){v(o,e,r),i=!0,l||(s=Me(He.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=ze(e,Mt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=ze(e,Mt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),l=!1,s()}}}function oO(n){let e,t,i,l,s,o;function r(c,d){return c[0].passwordAuth.enabled?sO:lO}let a=r(n),u=a(n),f=n[2]&&wm();return{c(){e=b("div"),e.innerHTML=' Identity/Password',t=C(),i=b("div"),l=C(),u.c(),s=C(),f&&f.c(),o=ge(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){v(c,e,d),v(c,t,d),v(c,i,d),v(c,l,d),u.m(c,d),v(c,s,d),f&&f.m(c,d),v(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(s.parentNode,s))),c[2]?f?d&4&&O(f,1):(f=wm(),f.c(),O(f,1),f.m(o.parentNode,o)):f&&(re(),D(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(l),k(s),k(o)),u.d(c),f&&f.d(c)}}}function rO(n){let e,t;return e=new qi({props:{single:!0,$$slots:{header:[oO],default:[iO]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&527&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function aO(n,e,t){let i,l,s;Qe(n,Sn,c=>t(4,s=c));let{collection:o}=e,r=[];function a(c){const d=[{value:"email"}],m=(c==null?void 0:c.fields)||[],h=(c==null?void 0:c.indexes)||[];for(let g of h){const _=z.parseIndex(g);if(!_.unique||_.columns.length!=1||_.columns[0].name=="email")continue;const y=m.find(S=>!S.hidden&&S.name.toLowerCase()==_.columns[0].name.toLowerCase());y&&d.push({value:y.name})}return d}Yt(()=>{t(1,r=a(o))});function u(){o.passwordAuth.enabled=this.checked,t(0,o)}function f(c){n.$$.not_equal(o.passwordAuth.identityFields,c)&&(o.passwordAuth.identityFields=c,t(0,o))}return n.$$set=c=>{"collection"in c&&t(0,o=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&z.isEmpty(o.passwordAuth)&&t(0,o.passwordAuth={enabled:!0,identityFields:["email"]},o),n.$$.dirty&1&&t(3,i=(o==null?void 0:o.system)&&(o==null?void 0:o.name)==="_superusers"),n.$$.dirty&16&&t(2,l=!z.isEmpty(s==null?void 0:s.passwordAuth))},[o,r,l,i,s,u,f]}class uO extends ye{constructor(e){super(),be(this,e,aO,rO,_e,{collection:0})}}function Sm(n,e,t){const i=n.slice();return i[22]=e[t],i}function Tm(n,e){let t,i,l,s,o,r=e[22].label+"",a,u,f,c,d,m;return c=wk(e[11][0]),{key:n,first:null,c(){t=b("div"),i=b("input"),s=C(),o=b("label"),a=Y(r),f=C(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",l=e[21]+e[22].value),i.__value=e[22].value,ce(i,i.__value),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),c.p(i),this.first=t},m(h,g){v(h,t,g),w(t,i),i.checked=i.__value===e[2],w(t,s),w(t,o),w(o,a),w(t,f),d||(m=B(i,"change",e[10]),d=!0)},p(h,g){e=h,g&2097152&&l!==(l=e[21]+e[22].value)&&p(i,"id",l),g&4&&(i.checked=i.__value===e[2]),g&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(h){h&&k(t),c.r(),d=!1,m()}}}function fO(n){let e=[],t=new Map,i,l=pe(n[7]);const s=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),l=new fe({props:{class:"form-field required m-0",name:"email",$$slots:{default:[cO,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),H(t.$$.fragment),i=C(),H(l.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){v(a,e,u),F(t,e,null),w(e,i),F(l,e,null),s=!0,o||(r=B(e,"submit",tt(n[13])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),l.$set(c)},i(a){s||(O(t.$$.fragment,a),O(l.$$.fragment,a),s=!0)},o(a){D(t.$$.fragment,a),D(l.$$.fragment,a),s=!1},d(a){a&&k(e),q(t),q(l),o=!1,r()}}}function pO(n){let e;return{c(){e=b("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function mO(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("button"),t=Y("Close"),i=C(),l=b("button"),s=b("i"),o=C(),r=b("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(s,"class","ri-mail-send-line"),p(r,"class","txt"),p(l,"type","submit"),p(l,"form",n[6]),p(l,"class","btn btn-expanded"),l.disabled=a=!n[5]||n[4],Q(l,"btn-loading",n[4])},m(c,d){v(c,e,d),w(e,t),v(c,i,d),v(c,l,d),w(l,s),w(l,o),w(l,r),u||(f=B(e,"click",n[0]),u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(l.disabled=a),d&16&&Q(l,"btn-loading",c[4])},d(c){c&&(k(e),k(i),k(l)),u=!1,f()}}}function hO(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:[mO],header:[pO],default:[dO]},$$scope:{ctx:n}};return e=new ln({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){H(e.$$.fragment)},m(l,s){F(e,l,s),t=!0},p(l,[s]){const o={};s&16&&(o.overlayClose=!l[4]),s&16&&(o.escClose=!l[4]),s&16&&(o.beforeHide=l[14]),s&33554486&&(o.$$scope={dirty:s,ctx:l}),e.$set(o)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){D(e.$$.fragment,l),t=!1},d(l){n[15](null),q(e,l)}}}const wa="last_email_test",$m="email_test_request";function _O(n,e,t){let i;const l=gt(),s="email_test_"+z.randomString(5),o=[{label:"Verification",value:"verification"},{label:"Password reset",value:"password-reset"},{label:"Confirm email change",value:"email-change"},{label:"OTP",value:"otp"},{label:"Login alert",value:"login-alert"}];let r,a="",u=localStorage.getItem(wa),f=o[0].value,c=!1,d=null;function m(I="",A="",P=""){a=I||"_superusers",t(1,u=A||localStorage.getItem(wa)),t(2,f=P||o[0].value),Wt({}),r==null||r.show()}function h(){return clearTimeout(d),r==null?void 0:r.hide()}async function g(){if(!(!i||c)){t(4,c=!0),localStorage==null||localStorage.setItem(wa,u),clearTimeout(d),d=setTimeout(()=>{me.cancelRequest($m),$i("Test email send timeout.")},3e4);try{await me.settings.testEmail(a,u,f,{$cancelKey:$m}),tn("Successfully sent test email."),l("submit"),t(4,c=!1),await fn(),h()}catch(I){t(4,c=!1),me.error(I)}clearTimeout(d)}}const _=[[]];function y(){f=this.__value,t(2,f)}function S(){u=this.value,t(1,u)}const T=()=>g(),$=()=>!c;function E(I){ie[I?"unshift":"push"](()=>{r=I,t(3,r)})}function M(I){Pe.call(this,n,I)}function L(I){Pe.call(this,n,I)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!u&&!!f)},[h,u,f,r,c,i,s,o,g,m,y,_,S,T,$,E,M,L]}class nk extends ye{constructor(e){super(),be(this,e,_O,hO,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Cm(n,e,t){const i=n.slice();return i[18]=e[t],i[19]=e,i[20]=t,i}function gO(n){let e,t,i,l,s,o,r,a;return{c(){e=b("input"),i=C(),l=b("label"),s=Y("Send email alert for new logins"),p(e,"type","checkbox"),p(e,"id",t=n[21]),p(l,"for",o=n[21])},m(u,f){v(u,e,f),e.checked=n[0].authAlert.enabled,v(u,i,f),v(u,l,f),w(l,s),r||(a=B(e,"change",n[9]),r=!0)},p(u,f){f&2097152&&t!==(t=u[21])&&p(e,"id",t),f&1&&(e.checked=u[0].authAlert.enabled),f&2097152&&o!==(o=u[21])&&p(l,"for",o)},d(u){u&&(k(e),k(i),k(l)),r=!1,a()}}}function Om(n){let e,t,i;function l(o){n[12](o)}let s={};return n[0]!==void 0&&(s.collection=n[0]),e=new q8({props:s}),ie.push(()=>ve(e,"collection",l)),{c(){H(e.$$.fragment)},m(o,r){F(e,o,r),i=!0},p(o,r){const a={};!t&&r&1&&(t=!0,a.collection=o[0],$e(()=>t=!1)),e.$set(a)},i(o){i||(O(e.$$.fragment,o),i=!0)},o(o){D(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function Em(n,e){var a;let t,i,l,s;function o(u){e[15](u,e[18])}let r={single:!0,key:e[18].key,title:e[18].label,placeholders:(a=e[18])==null?void 0:a.placeholders};return e[18].config!==void 0&&(r.config=e[18].config),i=new q5({props:r}),ie.push(()=>ve(i,"config",o)),{key:n,first:null,c(){t=ge(),H(i.$$.fragment),this.first=t},m(u,f){v(u,t,f),F(i,u,f),s=!0},p(u,f){var d;e=u;const c={};f&4&&(c.key=e[18].key),f&4&&(c.title=e[18].label),f&4&&(c.placeholders=(d=e[18])==null?void 0:d.placeholders),!l&&f&4&&(l=!0,c.config=e[18].config,$e(()=>l=!1)),i.$set(c)},i(u){s||(O(i.$$.fragment,u),s=!0)},o(u){D(i.$$.fragment,u),s=!1},d(u){u&&k(t),q(i,u)}}}function bO(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S,T,$,E,M,L,I,A,P=[],R=new Map,N,U,j,V,K,J,ee,X,oe,Se,ke;o=new fe({props:{class:"form-field form-field-sm form-field-toggle m-0",name:"authAlert.enabled",inlineError:!0,$$slots:{default:[gO,({uniqueId:Le})=>({21:Le}),({uniqueId:Le})=>Le?2097152:0]},$$scope:{ctx:n}}});function Ce(Le){n[10](Le)}let We={};n[0]!==void 0&&(We.collection=n[0]),u=new J8({props:We}),ie.push(()=>ve(u,"collection",Ce));function st(Le){n[11](Le)}let et={};n[0]!==void 0&&(et.collection=n[0]),d=new uO({props:et}),ie.push(()=>ve(d,"collection",st));let Be=!n[1]&&Om(n);function rt(Le){n[13](Le)}let Je={};n[0]!==void 0&&(Je.collection=n[0]),_=new f6({props:Je}),ie.push(()=>ve(_,"collection",rt));let at=pe(n[2]);const Ht=Le=>Le[18].key;for(let Le=0;Leve(K,"collection",Te));let ot={};return X=new nk({props:ot}),n[17](X),{c(){e=b("h4"),t=b("div"),i=b("span"),i.textContent="Auth methods",l=C(),s=b("div"),H(o.$$.fragment),r=C(),a=b("div"),H(u.$$.fragment),c=C(),H(d.$$.fragment),h=C(),Be&&Be.c(),g=C(),H(_.$$.fragment),S=C(),T=b("h4"),$=b("span"),$.textContent="Mail templates",E=C(),M=b("button"),M.textContent="Send test email",L=C(),I=b("div"),A=b("div");for(let Le=0;Lef=!1)),u.$set(Oe);const ut={};!m&&Ve&1&&(m=!0,ut.collection=Le[0],$e(()=>m=!1)),d.$set(ut),Le[1]?Be&&(re(),D(Be,1,1,()=>{Be=null}),ae()):Be?(Be.p(Le,Ve),Ve&2&&O(Be,1)):(Be=Om(Le),Be.c(),O(Be,1),Be.m(a,g));const Ne={};!y&&Ve&1&&(y=!0,Ne.collection=Le[0],$e(()=>y=!1)),_.$set(Ne),Ve&4&&(at=pe(Le[2]),re(),P=kt(P,Ve,Ht,1,Le,at,R,A,zt,Em,null,Cm),ae());const xe={};!J&&Ve&1&&(J=!0,xe.collection=Le[0],$e(()=>J=!1)),K.$set(xe);const qt={};X.$set(qt)},i(Le){if(!oe){O(o.$$.fragment,Le),O(u.$$.fragment,Le),O(d.$$.fragment,Le),O(Be),O(_.$$.fragment,Le);for(let Ve=0;Vec==null?void 0:c.show(u.id);function S(E,M){n.$$.not_equal(M.config,E)&&(M.config=E,t(2,f),t(1,i),t(7,l),t(5,r),t(4,a),t(8,s),t(6,o),t(0,u))}function T(E){u=E,t(0,u)}function $(E){ie[E?"unshift":"push"](()=>{c=E,t(3,c)})}return n.$$set=E=>{"collection"in E&&t(0,u=E.collection)},n.$$.update=()=>{var E,M;n.$$.dirty&1&&typeof((E=u.otp)==null?void 0:E.emailTemplate)>"u"&&(t(0,u.otp=u.otp||{},u),t(0,u.otp.emailTemplate={},u)),n.$$.dirty&1&&typeof((M=u.authAlert)==null?void 0:M.emailTemplate)>"u"&&(t(0,u.authAlert=u.authAlert||{},u),t(0,u.authAlert.emailTemplate={},u)),n.$$.dirty&1&&t(1,i=u.system&&u.name==="_superusers"),n.$$.dirty&1&&t(7,l={key:"resetPasswordTemplate",label:"Default Password reset email template",placeholders:["APP_NAME","APP_URL","RECORD:*","TOKEN"],config:u.resetPasswordTemplate}),n.$$.dirty&1&&t(8,s={key:"verificationTemplate",label:"Default Verification email template",placeholders:["APP_NAME","APP_URL","RECORD:*","TOKEN"],config:u.verificationTemplate}),n.$$.dirty&1&&t(6,o={key:"confirmEmailChangeTemplate",label:"Default Confirm email change email template",placeholders:["APP_NAME","APP_URL","RECORD:*","TOKEN"],config:u.confirmEmailChangeTemplate}),n.$$.dirty&1&&t(5,r={key:"otp.emailTemplate",label:"Default OTP email template",placeholders:["APP_NAME","APP_URL","RECORD:*","OTP","OTP_ID"],config:u.otp.emailTemplate}),n.$$.dirty&1&&t(4,a={key:"authAlert.emailTemplate",label:"Default Login alert email template",placeholders:["APP_NAME","APP_URL","RECORD:*"],config:u.authAlert.emailTemplate}),n.$$.dirty&498&&t(2,f=i?[l,r,a]:[s,l,o,r,a])},[u,i,f,c,a,r,o,l,s,d,m,h,g,_,y,S,T,$]}class kO extends ye{constructor(e){super(),be(this,e,yO,bO,_e,{collection:0})}}const vO=n=>({dragging:n&4,dragover:n&8}),Mm=n=>({dragging:n[2],dragover:n[3]});function wO(n){let e,t,i,l,s;const o=n[10].default,r=Lt(o,n,n[9],Mm);return{c(){e=b("div"),r&&r.c(),p(e,"draggable",t=!n[1]),p(e,"class","draggable svelte-19c69j7"),Q(e,"dragging",n[2]),Q(e,"dragover",n[3])},m(a,u){v(a,e,u),r&&r.m(e,null),i=!0,l||(s=[B(e,"dragover",tt(n[11])),B(e,"dragleave",tt(n[12])),B(e,"dragend",n[13]),B(e,"dragstart",n[14]),B(e,"drop",n[15])],l=!0)},p(a,[u]){r&&r.p&&(!i||u&524)&&Pt(r,o,a,a[9],i?At(o,a[9],u,vO):Nt(a[9]),Mm),(!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||(O(r,a),i=!0)},o(a){D(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),l=!1,De(s)}}}function SO(n,e,t){let{$$slots:i={},$$scope:l}=e;const s=gt();let{index:o}=e,{list:r=[]}=e,{group:a="default"}=e,{disabled:u=!1}=e,{dragHandleClass:f=""}=e,c=!1,d=!1;function m($,E){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:E,group:a})),s("drag",$)}}function h($,E){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 L=M.index<<0;L{t(3,d=!0)},_=()=>{t(3,d=!1)},y=()=>{t(3,d=!1),t(2,c=!1)},S=$=>m($,o),T=$=>h($,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,l=$.$$scope)},[o,u,c,d,m,h,r,a,f,l,i,g,_,y,S,T]}class ho extends ye{constructor(e){super(),be(this,e,SO,wO,_e,{index:0,list:6,group:7,disabled:1,dragHandleClass:8})}}function Dm(n,e,t){const i=n.slice();return i[27]=e[t],i}function TO(n){let e,t,i,l,s,o,r,a,u;return{c(){e=b("input"),l=C(),s=b("label"),o=Y("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[30]),e.checked=i=n[3].unique,p(s,"for",r=n[30])},m(f,c){v(f,e,c),v(f,l,c),v(f,s,c),w(s,o),a||(u=B(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(s,"for",r)},d(f){f&&(k(e),k(l),k(s)),a=!1,u()}}}function $O(n){let e,t,i,l;function s(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=jt(o,r(n)),ie.push(()=>ve(e,"value",s))),{c(){e&&H(e.$$.fragment),i=ge()},m(a,u){e&&F(e,a,u),v(a,i,u),l=!0},p(a,u){var f;if(u[0]&128&&o!==(o=a[7])){if(e){re();const c=e;D(c.$$.fragment,1,0,()=>{q(c,1)}),ae()}o?(e=jt(o,r(a)),ie.push(()=>ve(e,"value",s)),H(e.$$.fragment),O(e.$$.fragment,1),F(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){l||(e&&O(e.$$.fragment,a),l=!0)},o(a){e&&D(e.$$.fragment,a),l=!1},d(a){a&&k(i),e&&q(e,a)}}}function CO(n){let e;return{c(){e=b("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function OO(n){let e,t,i,l;const s=[CO,$O],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=s[e](n),{c(){t.c(),i=ge()},m(a,u){o[e].m(a,u),v(a,i,u),l=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),D(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=s[e](a),t.c()),O(t,1),t.m(i.parentNode,i))},i(a){l||(O(t),l=!0)},o(a){D(t),l=!1},d(a){a&&k(i),o[e].d(a)}}}function Im(n){let e,t,i,l=pe(n[10]),s=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new fe({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[OO,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Im(n);return{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment),l=C(),r&&r.c(),s=ge()},m(a,u){F(e,a,u),v(a,t,u),F(i,a,u),v(a,l,u),r&&r.m(a,u),v(a,s,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=Im(a),r.c(),r.m(s.parentNode,s)):r&&(r.d(1),r=null)},i(a){o||(O(e.$$.fragment,a),O(i.$$.fragment,a),o=!0)},o(a){D(e.$$.fragment,a),D(i.$$.fragment,a),o=!1},d(a){a&&(k(t),k(l),k(s)),q(e,a),q(i,a),r&&r.d(a)}}}function MO(n){let e,t=n[5]?"Update":"Create",i,l;return{c(){e=b("h4"),i=Y(t),l=Y(" index")},m(s,o){v(s,e,o),w(e,i),w(e,l)},p(s,o){o[0]&32&&t!==(t=s[5]?"Update":"Create")&&ue(i,t)},d(s){s&&k(e)}}}function Am(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(l,s){v(l,e,s),t||(i=[Me(He.call(null,e,{text:"Delete",position:"top"})),B(e,"click",n[16])],t=!0)},p:te,d(l){l&&k(e),t=!1,De(i)}}}function DO(n){let e,t,i,l,s,o,r=n[5]!=""&&Am(n);return{c(){r&&r.c(),e=C(),t=b("button"),t.innerHTML='Cancel',i=C(),l=b("button"),l.innerHTML='Set index',p(t,"type","button"),p(t,"class","btn btn-transparent"),p(l,"type","button"),p(l,"class","btn"),Q(l,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),v(a,e,u),v(a,t,u),v(a,i,u),v(a,l,u),s||(o=[B(t,"click",n[17]),B(l,"click",n[18])],s=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Am(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&Q(l,"btn-disabled",a[9].length<=0)},d(a){a&&(k(e),k(t),k(i),k(l)),r&&r.d(a),s=!1,De(o)}}}function IO(n){let e,t;const i=[{popup:!0},n[14]];let l={$$slots:{footer:[DO],header:[MO],default:[EO]},$$scope:{ctx:n}};for(let s=0;see.name==V);J?z.removeByValue(K.columns,J):z.pushUnique(K.columns,{name:V}),t(2,d=z.buildIndex(K))}Yt(async()=>{t(8,g=!0);try{t(7,h=(await Ot(async()=>{const{default:V}=await import("./CodeEditor-wsjRtoGt.js");return{default:V}},__vite__mapDeps([12,1]),import.meta.url)).default)}catch(V){console.warn(V)}t(8,g=!1)});const M=()=>T(),L=()=>y(),I=()=>$(),A=V=>{t(3,l.unique=V.target.checked,l),t(3,l.tableName=l.tableName||(u==null?void 0:u.name),l),t(2,d=z.buildIndex(l))};function P(V){d=V,t(2,d)}const R=V=>E(V);function N(V){ie[V?"unshift":"push"](()=>{f=V,t(4,f)})}function U(V){Pe.call(this,n,V)}function j(V){Pe.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Ut(V)),t(14,r=lt(e,o)),"collection"in V&&t(0,u=V.collection)},n.$$.update=()=>{var V,K,J;n.$$.dirty[0]&1&&t(10,i=((K=(V=u==null?void 0:u.fields)==null?void 0:V.filter(ee=>!ee.toDelete&&ee.name!="id"))==null?void 0:K.map(ee=>ee.name))||[]),n.$$.dirty[0]&4&&t(3,l=z.parseIndex(d)),n.$$.dirty[0]&8&&t(9,s=((J=l.columns)==null?void 0:J.map(ee=>ee.name))||[])},[u,y,d,l,f,c,m,h,g,s,i,T,$,E,r,_,M,L,I,A,P,R,N,U,j]}class AO extends ye{constructor(e){super(),be(this,e,LO,IO,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Pm(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const l=z.parseIndex(i[10]);return i[11]=l,i}function Nm(n){let e;return{c(){e=b("strong"),e.textContent="Unique:"},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function Rm(n){var d;let e,t,i,l=((d=n[11].columns)==null?void 0:d.map(Fm).join(", "))+"",s,o,r,a,u,f=n[11].unique&&Nm();function c(){return n[4](n[10],n[13])}return{c(){var m,h;e=b("button"),f&&f.c(),t=C(),i=b("span"),s=Y(l),p(i,"class","txt"),p(e,"type","button"),p(e,"class",o="label link-primary "+((h=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&h.message?"label-danger":"")+" svelte-167lbwu")},m(m,h){var g,_;v(m,e,h),f&&f.m(e,null),w(e,t),w(e,i),w(i,s),a||(u=[Me(r=He.call(null,e,((_=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:_.message)||"")),B(e,"click",c)],a=!0)},p(m,h){var g,_,y,S,T;n=m,n[11].unique?f||(f=Nm(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),h&1&&l!==(l=((g=n[11].columns)==null?void 0:g.map(Fm).join(", "))+"")&&ue(s,l),h&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&&Rt(r.update)&&h&4&&r.update.call(null,((T=(S=n[2].indexes)==null?void 0:S[n[13]])==null?void 0:T.message)||"")},d(m){m&&k(e),f&&f.d(),a=!1,De(u)}}}function PO(n){var $,E,M;let e,t,i=(((E=($=n[0])==null?void 0:$.indexes)==null?void 0:E.length)||0)+"",l,s,o,r,a,u,f,c,d,m,h,g,_=pe(((M=n[0])==null?void 0:M.indexes)||[]),y=[];for(let L=0;L<_.length;L+=1)y[L]=Rm(Pm(n,_,L));function S(L){n[7](L)}let T={};return n[0]!==void 0&&(T.collection=n[0]),c=new AO({props:T}),n[6](c),ie.push(()=>ve(c,"collection",S)),c.$on("remove",n[8]),c.$on("submit",n[9]),{c(){e=b("div"),t=Y("Unique constraints and indexes ("),l=Y(i),s=Y(")"),o=C(),r=b("div");for(let L=0;L+ New index',f=C(),H(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(L,I){v(L,e,I),w(e,t),w(e,l),w(e,s),v(L,o,I),v(L,r,I);for(let A=0;Ad=!1)),c.$set(A)},i(L){m||(O(c.$$.fragment,L),m=!0)},o(L){D(c.$$.fragment,L),m=!1},d(L){L&&(k(e),k(o),k(r),k(f)),pt(y,L),n[6](null),q(c,L),h=!1,g()}}}const Fm=n=>n.name;function NO(n,e,t){let i;Qe(n,Sn,m=>t(2,i=m));let{collection:l}=e,s;function o(m,h){for(let g=0;gs==null?void 0:s.show(m,h),a=()=>s==null?void 0:s.show();function u(m){ie[m?"unshift":"push"](()=>{s=m,t(1,s)})}function f(m){l=m,t(0,l)}const c=m=>{for(let h=0;h{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,l=m.collection)},[l,s,i,o,r,a,u,f,c,d]}class RO extends ye{constructor(e){super(),be(this,e,NO,PO,_e,{collection:0})}}function qm(n,e,t){const i=n.slice();return i[5]=e[t],i}function Hm(n){let e,t,i,l,s,o,r;function a(){return n[3](n[5])}return{c(){e=b("button"),t=b("i"),i=C(),l=b("span"),l.textContent=`${n[5].label}`,s=C(),p(t,"class","icon "+n[5].icon+" svelte-1gz9b6p"),p(t,"aria-hidden","true"),p(l,"class","txt"),p(e,"type","button"),p(e,"role","menuitem"),p(e,"class","dropdown-item svelte-1gz9b6p")},m(u,f){v(u,e,f),w(e,t),w(e,i),w(e,l),w(e,s),o||(r=B(e,"click",a),o=!0)},p(u,f){n=u},d(u){u&&k(e),o=!1,r()}}}function FO(n){let e,t=pe(n[1]),i=[];for(let l=0;lo(a.value);return n.$$set=a=>{"class"in a&&t(0,i=a.class)},[i,s,o,r]}class jO extends ye{constructor(e){super(),be(this,e,HO,qO,_e,{class:0})}}const zO=n=>({interactive:n[0]&128,hasErrors:n[0]&64}),jm=n=>({interactive:n[7],hasErrors:n[6]}),UO=n=>({interactive:n[0]&128,hasErrors:n[0]&64}),zm=n=>({interactive:n[7],hasErrors:n[6]}),VO=n=>({interactive:n[0]&128,hasErrors:n[0]&64}),Um=n=>({interactive:n[7],hasErrors:n[6]});function Vm(n){let e;return{c(){e=b("div"),e.innerHTML='',p(e,"class","drag-handle-wrapper"),p(e,"draggable",!0),p(e,"aria-label","Sort")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function Bm(n){let e,t;return{c(){e=b("span"),t=Y(n[5]),p(e,"class","label label-success")},m(i,l){v(i,e,l),w(e,t)},p(i,l){l[0]&32&&ue(t,i[5])},d(i){i&&k(e)}}}function Wm(n){let e;return{c(){e=b("span"),e.textContent="Hidden",p(e,"class","label label-danger")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function BO(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h=n[0].required&&Bm(n),g=n[0].hidden&&Wm();return{c(){e=b("div"),h&&h.c(),t=C(),g&&g.c(),i=C(),l=b("div"),s=b("i"),a=C(),u=b("input"),p(e,"class","field-labels"),p(s,"class",o=z.getFieldTypeIcon(n[0].type)),p(l,"class","form-field-addon prefix field-type-icon"),Q(l,"txt-disabled",!n[7]||n[0].system),p(u,"type","text"),u.required=!0,u.disabled=f=!n[7]||n[0].system,p(u,"spellcheck","false"),p(u,"placeholder","Field name"),u.value=c=n[0].name,p(u,"title","System field")},m(_,y){v(_,e,y),h&&h.m(e,null),w(e,t),g&&g.m(e,null),v(_,i,y),v(_,l,y),w(l,s),v(_,a,y),v(_,u,y),n[22](u),d||(m=[Me(r=He.call(null,l,n[0].type+(n[0].system?" (system)":""))),B(l,"click",n[21]),B(u,"input",n[23])],d=!0)},p(_,y){_[0].required?h?h.p(_,y):(h=Bm(_),h.c(),h.m(e,t)):h&&(h.d(1),h=null),_[0].hidden?g||(g=Wm(),g.c(),g.m(e,null)):g&&(g.d(1),g=null),y[0]&1&&o!==(o=z.getFieldTypeIcon(_[0].type))&&p(s,"class",o),r&&Rt(r.update)&&y[0]&1&&r.update.call(null,_[0].type+(_[0].system?" (system)":"")),y[0]&129&&Q(l,"txt-disabled",!_[7]||_[0].system),y[0]&129&&f!==(f=!_[7]||_[0].system)&&(u.disabled=f),y[0]&1&&c!==(c=_[0].name)&&u.value!==c&&(u.value=c)},d(_){_&&(k(e),k(i),k(l),k(a),k(u)),h&&h.d(),g&&g.d(),n[22](null),d=!1,De(m)}}}function WO(n){let e;return{c(){e=b("span"),p(e,"class","separator")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function YO(n){let e,t,i,l,s,o;return{c(){e=b("button"),t=b("i"),p(t,"class","ri-settings-3-line"),p(e,"type","button"),p(e,"aria-label",i="Toggle "+n[0].name+" field options"),p(e,"class",l="btn btn-sm btn-circle options-trigger "+(n[4]?"btn-secondary":"btn-transparent")),p(e,"aria-expanded",n[4]),Q(e,"btn-hint",!n[4]&&!n[6]),Q(e,"btn-danger",n[6])},m(r,a){v(r,e,a),w(e,t),s||(o=B(e,"click",n[17]),s=!0)},p(r,a){a[0]&1&&i!==(i="Toggle "+r[0].name+" field options")&&p(e,"aria-label",i),a[0]&16&&l!==(l="btn btn-sm btn-circle options-trigger "+(r[4]?"btn-secondary":"btn-transparent"))&&p(e,"class",l),a[0]&16&&p(e,"aria-expanded",r[4]),a[0]&80&&Q(e,"btn-hint",!r[4]&&!r[6]),a[0]&80&&Q(e,"btn-danger",r[6])},d(r){r&&k(e),s=!1,o()}}}function KO(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-success btn-transparent options-trigger"),p(e,"aria-label","Restore")},m(l,s){v(l,e,s),t||(i=[Me(He.call(null,e,"Restore")),B(e,"click",n[14])],t=!0)},p:te,d(l){l&&k(e),t=!1,De(i)}}}function Ym(n){let e,t,i,l,s=!n[0].primaryKey&&n[0].type!="autodate"&&(!n[8]||!n[10].includes(n[0].name)),o,r=!n[0].primaryKey&&(!n[8]||!n[11].includes(n[0].name)),a,u=!n[8]||!n[12].includes(n[0].name),f,c,d,m;const h=n[20].options,g=Lt(h,n,n[28],zm);let _=s&&Km(n),y=r&&Jm(n),S=u&&Zm(n);const T=n[20].optionsFooter,$=Lt(T,n,n[28],jm);let E=!n[0]._toDelete&&!n[0].primaryKey&&Gm(n);return{c(){e=b("div"),t=b("div"),g&&g.c(),i=C(),l=b("div"),_&&_.c(),o=C(),y&&y.c(),a=C(),S&&S.c(),f=C(),$&&$.c(),c=C(),E&&E.c(),p(t,"class","hidden-empty m-b-sm"),p(l,"class","schema-field-options-footer"),p(e,"class","schema-field-options")},m(M,L){v(M,e,L),w(e,t),g&&g.m(t,null),w(e,i),w(e,l),_&&_.m(l,null),w(l,o),y&&y.m(l,null),w(l,a),S&&S.m(l,null),w(l,f),$&&$.m(l,null),w(l,c),E&&E.m(l,null),m=!0},p(M,L){g&&g.p&&(!m||L[0]&268435648)&&Pt(g,h,M,M[28],m?At(h,M[28],L,UO):Nt(M[28]),zm),L[0]&257&&(s=!M[0].primaryKey&&M[0].type!="autodate"&&(!M[8]||!M[10].includes(M[0].name))),s?_?(_.p(M,L),L[0]&257&&O(_,1)):(_=Km(M),_.c(),O(_,1),_.m(l,o)):_&&(re(),D(_,1,1,()=>{_=null}),ae()),L[0]&257&&(r=!M[0].primaryKey&&(!M[8]||!M[11].includes(M[0].name))),r?y?(y.p(M,L),L[0]&257&&O(y,1)):(y=Jm(M),y.c(),O(y,1),y.m(l,a)):y&&(re(),D(y,1,1,()=>{y=null}),ae()),L[0]&257&&(u=!M[8]||!M[12].includes(M[0].name)),u?S?(S.p(M,L),L[0]&257&&O(S,1)):(S=Zm(M),S.c(),O(S,1),S.m(l,f)):S&&(re(),D(S,1,1,()=>{S=null}),ae()),$&&$.p&&(!m||L[0]&268435648)&&Pt($,T,M,M[28],m?At(T,M[28],L,zO):Nt(M[28]),jm),!M[0]._toDelete&&!M[0].primaryKey?E?(E.p(M,L),L[0]&1&&O(E,1)):(E=Gm(M),E.c(),O(E,1),E.m(l,null)):E&&(re(),D(E,1,1,()=>{E=null}),ae())},i(M){m||(O(g,M),O(_),O(y),O(S),O($,M),O(E),M&&nt(()=>{m&&(d||(d=ze(e,wt,{delay:10,duration:150},!0)),d.run(1))}),m=!0)},o(M){D(g,M),D(_),D(y),D(S),D($,M),D(E),M&&(d||(d=ze(e,wt,{delay:10,duration:150},!1)),d.run(0)),m=!1},d(M){M&&k(e),g&&g.d(M),_&&_.d(),y&&y.d(),S&&S.d(),$&&$.d(M),E&&E.d(),M&&d&&d.end()}}}function Km(n){let e,t;return e=new fe({props:{class:"form-field form-field-toggle",name:"requried",$$slots:{default:[JO,({uniqueId:i})=>({34:i}),({uniqueId:i})=>[0,i?8:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l[0]&268435489|l[1]&8&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function JO(n){let e,t,i,l,s,o,r,a,u,f,c,d;return{c(){e=b("input"),i=C(),l=b("label"),s=b("span"),o=Y(n[5]),r=C(),a=b("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),p(s,"class","txt"),p(a,"class","ri-information-line link-hint"),p(l,"for",f=n[34])},m(m,h){v(m,e,h),e.checked=n[0].required,v(m,i,h),v(m,l,h),w(l,s),w(s,o),w(l,r),w(l,a),c||(d=[B(e,"change",n[24]),Me(u=He.call(null,a,{text:`Requires the field value NOT to be ${z.zeroDefaultStr(n[0])}.`}))],c=!0)},p(m,h){h[1]&8&&t!==(t=m[34])&&p(e,"id",t),h[0]&1&&(e.checked=m[0].required),h[0]&32&&ue(o,m[5]),u&&Rt(u.update)&&h[0]&1&&u.update.call(null,{text:`Requires the field value NOT to be ${z.zeroDefaultStr(m[0])}.`}),h[1]&8&&f!==(f=m[34])&&p(l,"for",f)},d(m){m&&(k(e),k(i),k(l)),c=!1,De(d)}}}function Jm(n){let e,t;return e=new fe({props:{class:"form-field form-field-toggle",name:"hidden",$$slots:{default:[ZO,({uniqueId:i})=>({34:i}),({uniqueId:i})=>[0,i?8:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l[0]&268435457|l[1]&8&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function ZO(n){let e,t,i,l,s,o,r,a,u,f;return{c(){e=b("input"),i=C(),l=b("label"),s=b("span"),s.textContent="Hidden",o=C(),r=b("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),p(s,"class","txt"),p(r,"class","ri-information-line link-hint"),p(l,"for",a=n[34])},m(c,d){v(c,e,d),e.checked=n[0].hidden,v(c,i,d),v(c,l,d),w(l,s),w(l,o),w(l,r),u||(f=[B(e,"change",n[25]),B(e,"change",n[26]),Me(He.call(null,r,{text:"Hide from the JSON API response and filters."}))],u=!0)},p(c,d){d[1]&8&&t!==(t=c[34])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].hidden),d[1]&8&&a!==(a=c[34])&&p(l,"for",a)},d(c){c&&(k(e),k(i),k(l)),u=!1,De(f)}}}function Zm(n){let e,t;return e=new fe({props:{class:"form-field form-field-toggle m-0",name:"presentable",$$slots:{default:[GO,({uniqueId:i})=>({34:i}),({uniqueId:i})=>[0,i?8:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,l){const s={};l[0]&268435457|l[1]&8&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function GO(n){let e,t,i,l,s,o,r,a,u,f,c,d;return{c(){e=b("input"),l=C(),s=b("label"),o=b("span"),o.textContent="Presentable",r=C(),a=b("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),e.disabled=i=n[0].hidden,p(o,"class","txt"),p(a,"class",u="ri-information-line "+(n[0].hidden?"txt-disabled":"link-hint")),p(s,"for",f=n[34])},m(m,h){v(m,e,h),e.checked=n[0].presentable,v(m,l,h),v(m,s,h),w(s,o),w(s,r),w(s,a),c||(d=[B(e,"change",n[27]),Me(He.call(null,a,{text:"Whether the field should be preferred in the Superuser UI relation listings (default to auto)."}))],c=!0)},p(m,h){h[1]&8&&t!==(t=m[34])&&p(e,"id",t),h[0]&1&&i!==(i=m[0].hidden)&&(e.disabled=i),h[0]&1&&(e.checked=m[0].presentable),h[0]&1&&u!==(u="ri-information-line "+(m[0].hidden?"txt-disabled":"link-hint"))&&p(a,"class",u),h[1]&8&&f!==(f=m[34])&&p(s,"for",f)},d(m){m&&(k(e),k(l),k(s)),c=!1,De(d)}}}function Gm(n){let e,t,i,l,s,o,r;return o=new Hn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[XO]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),i=b("div"),l=b("i"),s=C(),H(o.$$.fragment),p(l,"class","ri-more-line"),p(l,"aria-hidden","true"),p(i,"tabindex","0"),p(i,"role","button"),p(i,"title","More field options"),p(i,"class","btn btn-circle btn-sm btn-transparent"),p(t,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","m-l-auto txt-right")},m(a,u){v(a,e,u),w(e,t),w(t,i),w(i,l),w(i,s),F(o,i,null),r=!0},p(a,u){const f={};u[0]&268435457&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(O(o.$$.fragment,a),r=!0)},o(a){D(o.$$.fragment,a),r=!1},d(a){a&&k(e),q(o)}}}function Xm(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item"),p(e,"role","menuitem")},m(l,s){v(l,e,s),t||(i=B(e,"click",tt(n[13])),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function XO(n){let e,t,i,l,s,o=!n[0].system&&Xm(n);return{c(){e=b("button"),e.innerHTML='Duplicate',t=C(),o&&o.c(),i=ge(),p(e,"type","button"),p(e,"class","dropdown-item"),p(e,"role","menuitem")},m(r,a){v(r,e,a),v(r,t,a),o&&o.m(r,a),v(r,i,a),l||(s=B(e,"click",tt(n[15])),l=!0)},p(r,a){r[0].system?o&&(o.d(1),o=null):o?o.p(r,a):(o=Xm(r),o.c(),o.m(i.parentNode,i))},d(r){r&&(k(e),k(t),k(i)),o&&o.d(r),l=!1,s()}}}function QO(n){let e,t,i,l,s,o,r,a,u,f=n[7]&&n[2]&&Vm();l=new fe({props:{class:"form-field required m-0 "+(n[7]?"":"disabled"),name:"fields."+n[1]+".name",inlineError:!0,$$slots:{default:[BO]},$$scope:{ctx:n}}});const c=n[20].default,d=Lt(c,n,n[28],Um),m=d||WO();function h(S,T){if(S[0]._toDelete)return KO;if(S[7])return YO}let g=h(n),_=g&&g(n),y=n[7]&&n[4]&&Ym(n);return{c(){e=b("div"),t=b("div"),f&&f.c(),i=C(),H(l.$$.fragment),s=C(),m&&m.c(),o=C(),_&&_.c(),r=C(),y&&y.c(),p(t,"class","schema-field-header"),p(e,"class","schema-field"),Q(e,"required",n[0].required),Q(e,"expanded",n[7]&&n[4]),Q(e,"deleted",n[0]._toDelete)},m(S,T){v(S,e,T),w(e,t),f&&f.m(t,null),w(t,i),F(l,t,null),w(t,s),m&&m.m(t,null),w(t,o),_&&_.m(t,null),w(e,r),y&&y.m(e,null),u=!0},p(S,T){S[7]&&S[2]?f||(f=Vm(),f.c(),f.m(t,i)):f&&(f.d(1),f=null);const $={};T[0]&128&&($.class="form-field required m-0 "+(S[7]?"":"disabled")),T[0]&2&&($.name="fields."+S[1]+".name"),T[0]&268435625&&($.$$scope={dirty:T,ctx:S}),l.$set($),d&&d.p&&(!u||T[0]&268435648)&&Pt(d,c,S,S[28],u?At(c,S[28],T,VO):Nt(S[28]),Um),g===(g=h(S))&&_?_.p(S,T):(_&&_.d(1),_=g&&g(S),_&&(_.c(),_.m(t,null))),S[7]&&S[4]?y?(y.p(S,T),T[0]&144&&O(y,1)):(y=Ym(S),y.c(),O(y,1),y.m(e,null)):y&&(re(),D(y,1,1,()=>{y=null}),ae()),(!u||T[0]&1)&&Q(e,"required",S[0].required),(!u||T[0]&144)&&Q(e,"expanded",S[7]&&S[4]),(!u||T[0]&1)&&Q(e,"deleted",S[0]._toDelete)},i(S){u||(O(l.$$.fragment,S),O(m,S),O(y),S&&nt(()=>{u&&(a||(a=ze(e,wt,{duration:150},!0)),a.run(1))}),u=!0)},o(S){D(l.$$.fragment,S),D(m,S),D(y),S&&(a||(a=ze(e,wt,{duration:150},!1)),a.run(0)),u=!1},d(S){S&&k(e),f&&f.d(),q(l),m&&m.d(S),_&&_.d(),y&&y.d(),S&&a&&a.end()}}}let Sa=[];function xO(n,e,t){let i,l,s,o,r;Qe(n,Sn,Se=>t(19,r=Se));let{$$slots:a={},$$scope:u}=e;const f="f_"+z.randomString(8),c=gt(),d={bool:"Nonfalsey",number:"Nonzero"},m=["password","tokenKey","id","autodate"],h=["password","tokenKey","id","email"],g=["password","tokenKey"];let{key:_=""}=e,{field:y=z.initSchemaField()}=e,{draggable:S=!0}=e,{collection:T={}}=e,$,E=!1;function M(){y.id?t(0,y._toDelete=!0,y):(R(),c("remove"))}function L(){t(0,y._toDelete=!1,y),Wt({})}function I(){y._toDelete||(R(),c("duplicate"))}function A(Se){return z.slugify(Se)}function P(){t(4,E=!0),U()}function R(){t(4,E=!1)}function N(){E?R():P()}function U(){for(let Se of Sa)Se.id!=f&&Se.collapse()}Yt(()=>(Sa.push({id:f,collapse:R}),y.onMountSelect&&(t(0,y.onMountSelect=!1,y),$==null||$.select()),()=>{z.removeByKey(Sa,"id",f)}));const j=()=>$==null?void 0:$.focus();function V(Se){ie[Se?"unshift":"push"](()=>{$=Se,t(3,$)})}const K=Se=>{const ke=y.name;t(0,y.name=A(Se.target.value),y),Se.target.value=y.name,c("rename",{oldName:ke,newName:y.name})};function J(){y.required=this.checked,t(0,y)}function ee(){y.hidden=this.checked,t(0,y)}const X=Se=>{Se.target.checked&&t(0,y.presentable=!1,y)};function oe(){y.presentable=this.checked,t(0,y)}return n.$$set=Se=>{"key"in Se&&t(1,_=Se.key),"field"in Se&&t(0,y=Se.field),"draggable"in Se&&t(2,S=Se.draggable),"collection"in Se&&t(18,T=Se.collection),"$$scope"in Se&&t(28,u=Se.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&262144&&t(8,i=(T==null?void 0:T.type)=="auth"),n.$$.dirty[0]&1&&y._toDelete&&y._originalName&&y.name!==y._originalName&&t(0,y.name=y._originalName,y),n.$$.dirty[0]&1&&!y._originalName&&y.name&&t(0,y._originalName=y.name,y),n.$$.dirty[0]&1&&typeof y._toDelete>"u"&&t(0,y._toDelete=!1,y),n.$$.dirty[0]&1&&y.required&&t(0,y.nullable=!1,y),n.$$.dirty[0]&1&&t(7,l=!y._toDelete),n.$$.dirty[0]&524290&&t(6,s=!z.isEmpty(z.getNestedVal(r,`fields.${_}`))),n.$$.dirty[0]&1&&t(5,o=d[y==null?void 0:y.type]||"Nonempty")},[y,_,S,$,E,o,s,l,i,c,m,h,g,M,L,I,A,N,T,r,a,j,V,K,J,ee,X,oe,u]}class ei extends ye{constructor(e){super(),be(this,e,xO,QO,_e,{key:1,field:0,draggable:2,collection:18},null,[-1,-1])}}function eE(n){let e,t,i,l,s,o;function r(u){n[5](u)}let a={id:n[13],items:n[3],disabled:n[0].system,readonly:!n[12]};return n[2]!==void 0&&(a.keyOfSelected=n[2]),t=new xn({props:a}),ie.push(()=>ve(t,"keyOfSelected",r)),{c(){e=b("div"),H(t.$$.fragment)},m(u,f){v(u,e,f),F(t,e,null),l=!0,s||(o=Me(He.call(null,e,{text:"Auto set on:",position:"top"})),s=!0)},p(u,f){const c={};f&8192&&(c.id=u[13]),f&1&&(c.disabled=u[0].system),f&4096&&(c.readonly=!u[12]),!i&&f&4&&(i=!0,c.keyOfSelected=u[2],$e(()=>i=!1)),t.$set(c)},i(u){l||(O(t.$$.fragment,u),l=!0)},o(u){D(t.$$.fragment,u),l=!1},d(u){u&&k(e),q(t),s=!1,o()}}}function tE(n){let e,t,i,l,s,o;return i=new fe({props:{class:"form-field form-field-single-multiple-select form-field-autodate-select "+(n[12]?"":"readonly"),inlineError:!0,$$slots:{default:[eE,({uniqueId:r})=>({13:r}),({uniqueId:r})=>r?8192:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=C(),H(i.$$.fragment),l=C(),s=b("div"),p(e,"class","separator"),p(s,"class","separator")},m(r,a){v(r,e,a),v(r,t,a),F(i,r,a),v(r,l,a),v(r,s,a),o=!0},p(r,a){const u={};a&4096&&(u.class="form-field form-field-single-multiple-select form-field-autodate-select "+(r[12]?"":"readonly")),a&28677&&(u.$$scope={dirty:a,ctx:r}),i.$set(u)},i(r){o||(O(i.$$.fragment,r),o=!0)},o(r){D(i.$$.fragment,r),o=!1},d(r){r&&(k(e),k(t),k(l),k(s)),q(i,r)}}}function nE(n){let e,t,i;const l=[{key:n[1]},n[4]];function s(r){n[6](r)}let o={$$slots:{default:[tE,({interactive:r})=>({12:r}),({interactive:r})=>r?4096:0]},$$scope:{ctx:n}};for(let r=0;rve(e,"field",s)),e.$on("rename",n[7]),e.$on("remove",n[8]),e.$on("duplicate",n[9]),{c(){H(e.$$.fragment)},m(r,a){F(e,r,a),i=!0},p(r,[a]){const u=a&18?vt(l,[a&2&&{key:r[1]},a&16&&Ft(r[4])]):{};a&20485&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],$e(()=>t=!1)),e.$set(u)},i(r){i||(O(e.$$.fragment,r),i=!0)},o(r){D(e.$$.fragment,r),i=!1},d(r){q(e,r)}}}const Ta=1,$a=2,Ca=3;function iE(n,e,t){const i=["field","key"];let l=lt(e,i);const s=[{label:"Create",value:Ta},{label:"Update",value:$a},{label:"Create/Update",value:Ca}];let{field:o}=e,{key:r=""}=e,a=u();function u(){return o.onCreate&&o.onUpdate?Ca:o.onUpdate?$a:Ta}function f(_){switch(_){case Ta:t(0,o.onCreate=!0,o),t(0,o.onUpdate=!1,o);break;case $a:t(0,o.onCreate=!1,o),t(0,o.onUpdate=!0,o);break;case Ca:t(0,o.onCreate=!0,o),t(0,o.onUpdate=!0,o);break}}function c(_){a=_,t(2,a)}function d(_){o=_,t(0,o)}function m(_){Pe.call(this,n,_)}function h(_){Pe.call(this,n,_)}function g(_){Pe.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Ut(_)),t(4,l=lt(e,i)),"field"in _&&t(0,o=_.field),"key"in _&&t(1,r=_.key)},n.$$.update=()=>{n.$$.dirty&4&&f(a)},[o,r,a,s,l,c,d,m,h,g]}class lE extends ye{constructor(e){super(),be(this,e,iE,nE,_e,{field:0,key:1})}}function sE(n){let e,t,i;const l=[{key:n[1]},n[2]];function s(r){n[3](r)}let o={};for(let r=0;rve(e,"field",s)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("duplicate",n[6]),{c(){H(e.$$.fragment)},m(r,a){F(e,r,a),i=!0},p(r,[a]){const u=a&6?vt(l,[a&2&&{key:r[1]},a&4&&Ft(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],$e(()=>t=!1)),e.$set(u)},i(r){i||(O(e.$$.fragment,r),i=!0)},o(r){D(e.$$.fragment,r),i=!1},d(r){q(e,r)}}}function oE(n,e,t){const i=["field","key"];let l=lt(e,i),{field:s}=e,{key:o=""}=e;function r(c){s=c,t(0,s)}function a(c){Pe.call(this,n,c)}function u(c){Pe.call(this,n,c)}function f(c){Pe.call(this,n,c)}return n.$$set=c=>{e=je(je({},e),Ut(c)),t(2,l=lt(e,i)),"field"in c&&t(0,s=c.field),"key"in c&&t(1,o=c.key)},[s,o,l,r,a,u,f]}class rE extends ye{constructor(e){super(),be(this,e,oE,sE,_e,{field:0,key:1})}}var Oa=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],es={_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},eo={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},In=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Kn=function(n){return n===!0?1:0};function Qm(n,e){var t;return function(){var i=this,l=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,l)},e)}}var Ea=function(n){return n instanceof Array?n:[n]};function $n(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function $t(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 Jo(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function ik(n,e){if(e(n))return n;if(n.parentNode)return ik(n.parentNode,e)}function Zo(n,e){var t=$t("div","numInputWrapper"),i=$t("input","numInput "+n),l=$t("span","arrowUp"),s=$t("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(l),t.appendChild(s),t}function jn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Ma=function(){},Cr=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},aE={D:Ma,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*Kn(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),l=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return l.setDate(l.getDate()-l.getDay()+t.firstDayOfWeek),l},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:Ma,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:Ma,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},Sl={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})"},Hs={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[Hs.w(n,e,t)]},F:function(n,e,t){return Cr(Hs.n(n,e,t)-1,!1,e)},G:function(n,e,t){return In(Hs.h(n,e,t))},H:function(n){return In(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[Kn(n.getHours()>11)]},M:function(n,e){return Cr(n.getMonth(),!0,e)},S:function(n){return In(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return In(n.getFullYear(),4)},d:function(n){return In(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return In(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return In(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)}},lk=function(n){var e=n.config,t=e===void 0?es:e,i=n.l10n,l=i===void 0?eo:i,s=n.isMobile,o=s===void 0?!1:s;return function(r,a,u){var f=u||l;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,m){return Hs[c]&&m[d-1]!=="\\"?Hs[c](r,f,t):c!=="\\"?c:""}).join("")}},au=function(n){var e=n.config,t=e===void 0?es:e,i=n.l10n,l=i===void 0?eo:i;return function(s,o,r,a){if(!(s!==0&&!s)){var u=a||l,f,c=s;if(s instanceof Date)f=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)f=new Date(s);else if(typeof s=="string"){var d=o||(t||es).dateFormat,m=String(s).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(s,d);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(s);else{for(var h=void 0,g=[],_=0,y=0,S="";_Math.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),se=Ia(t.config);x.setHours(se.hours,se.minutes,se.seconds,x.getMilliseconds()),t.selectedDates=[x],t.latestSelectedDateObj=x}Z!==void 0&&Z.type!=="blur"&&cl(Z);var he=t._input.value;c(),Mn(),t._input.value!==he&&t._debouncedChange()}function u(Z,x){return Z%12+12*Kn(x===t.l10n.amPM[1])}function f(Z){switch(Z%24){case 0:case 12:return 12;default:return Z%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var Z=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,x=(parseInt(t.minuteElement.value,10)||0)%60,se=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(Z=u(Z,t.amPM.textContent));var he=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&zn(t.latestSelectedDateObj,t.config.minDate,!0)===0,qe=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&zn(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=Da(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Ee=Da(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Re=Da(Z,x,se);if(Re>Ee&&Re=12)]),t.secondElement!==void 0&&(t.secondElement.value=In(se)))}function h(Z){var x=jn(Z),se=parseInt(x.value)+(Z.delta||0);(se/1e3>1||Z.key==="Enter"&&!/[^\d]/.test(se.toString()))&&Be(se)}function g(Z,x,se,he){if(x instanceof Array)return x.forEach(function(qe){return g(Z,qe,se,he)});if(Z instanceof Array)return Z.forEach(function(qe){return g(qe,x,se,he)});Z.addEventListener(x,se,he),t._handlers.push({remove:function(){return Z.removeEventListener(x,se,he)}})}function _(){It("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(se){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+se+"]"),function(he){return g(he,"click",t[se])})}),t.isMobile){sn();return}var Z=Qm(Ze,50);if(t._debouncedChange=Qm(_,dE),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(se){t.config.mode==="range"&&Te(jn(se))}),g(t._input,"keydown",Ht),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",Ht),!t.config.inline&&!t.config.static&&g(window,"resize",Z),window.ontouchstart!==void 0?g(window.document,"touchstart",et):g(window.document,"mousedown",et),g(window.document,"focus",et,{capture:!0}),t.config.clickOpens===!0&&(g(t._input,"focus",t.open),g(t._input,"click",t.open)),t.daysContainer!==void 0&&(g(t.monthNav,"click",Rl),g(t.monthNav,["keyup","increment"],h),g(t.daysContainer,"click",Fe)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var x=function(se){return jn(se).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",T),g([t.hourElement,t.minuteElement],["focus","click"],x),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(se){a(se)})}t.config.allowInput&&g(t._input,"blur",at)}function S(Z,x){var se=Z!==void 0?t.parseDate(Z):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(Z);var qe=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&&(!qe&&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=$t("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(Z,x,se,he){var qe=rt(x,!0),le=$t("span",Z,x.getDate().toString());return le.dateObj=x,le.$i=he,le.setAttribute("aria-label",t.formatDate(x,t.config.ariaDateFormat)),Z.indexOf("hidden")===-1&&zn(x,t.now)===0&&(t.todayDateElem=le,le.classList.add("today"),le.setAttribute("aria-current","date")),qe?(le.tabIndex=-1,ul(x)&&(le.classList.add("selected"),t.selectedDateElem=le,t.config.mode==="range"&&($n(le,"startRange",t.selectedDates[0]&&zn(x,t.selectedDates[0],!0)===0),$n(le,"endRange",t.selectedDates[1]&&zn(x,t.selectedDates[1],!0)===0),Z==="nextMonthDay"&&le.classList.add("inRange")))):le.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Hi(x)&&!ul(x)&&le.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&Z!=="prevMonthDay"&&he%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(x)+""),It("onDayCreate",le),le}function L(Z){Z.focus(),t.config.mode==="range"&&Te(Z)}function I(Z){for(var x=Z>0?0:t.config.showMonths-1,se=Z>0?t.config.showMonths:-1,he=x;he!=se;he+=Z)for(var qe=t.daysContainer.children[he],le=Z>0?0:qe.children.length-1,Ee=Z>0?qe.children.length:-1,Re=le;Re!=Ee;Re+=Z){var Ke=qe.children[Re];if(Ke.className.indexOf("hidden")===-1&&rt(Ke.dateObj))return Ke}}function A(Z,x){for(var se=Z.className.indexOf("Month")===-1?Z.dateObj.getMonth():t.currentMonth,he=x>0?t.config.showMonths:-1,qe=x>0?1:-1,le=se-t.currentMonth;le!=he;le+=qe)for(var Ee=t.daysContainer.children[le],Re=se-t.currentMonth===le?Z.$i+x:x<0?Ee.children.length-1:0,Ke=Ee.children.length,Ae=Re;Ae>=0&&Ae0?Ke:-1);Ae+=qe){var Ge=Ee.children[Ae];if(Ge.className.indexOf("hidden")===-1&&rt(Ge.dateObj)&&Math.abs(Z.$i-Ae)>=Math.abs(x))return L(Ge)}t.changeMonth(qe),P(I(qe),0)}function P(Z,x){var se=s(),he=Je(se||document.body),qe=Z!==void 0?Z:he?se:t.selectedDateElem!==void 0&&Je(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Je(t.todayDateElem)?t.todayDateElem:I(x>0?1:-1);qe===void 0?t._input.focus():he?A(qe,x):L(qe)}function R(Z,x){for(var se=(new Date(Z,x,1).getDay()-t.l10n.firstDayOfWeek+7)%7,he=t.utils.getDaysInMonth((x-1+12)%12,Z),qe=t.utils.getDaysInMonth(x,Z),le=window.document.createDocumentFragment(),Ee=t.config.showMonths>1,Re=Ee?"prevMonthDay hidden":"prevMonthDay",Ke=Ee?"nextMonthDay hidden":"nextMonthDay",Ae=he+1-se,Ge=0;Ae<=he;Ae++,Ge++)le.appendChild(M("flatpickr-day "+Re,new Date(Z,x-1,Ae),Ae,Ge));for(Ae=1;Ae<=qe;Ae++,Ge++)le.appendChild(M("flatpickr-day",new Date(Z,x,Ae),Ae,Ge));for(var ft=qe+1;ft<=42-se&&(t.config.showMonths===1||Ge%7!==0);ft++,Ge++)le.appendChild(M("flatpickr-day "+Ke,new Date(Z,x+1,ft%qe),ft,Ge));var Xt=$t("div","dayContainer");return Xt.appendChild(le),Xt}function N(){if(t.daysContainer!==void 0){Jo(t.daysContainer),t.weekNumbers&&Jo(t.weekNumbers);for(var Z=document.createDocumentFragment(),x=0;x1||t.config.monthSelectorType!=="dropdown")){var Z=function(he){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&het.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var x=0;x<12;x++)if(Z(x)){var se=$t("option","flatpickr-monthDropdown-month");se.value=new Date(t.currentYear,x).getMonth().toString(),se.textContent=Cr(x,t.config.shorthandCurrentMonth,t.l10n),se.tabIndex=-1,t.currentMonth===x&&(se.selected=!0),t.monthsDropdownContainer.appendChild(se)}}}function j(){var Z=$t("div","flatpickr-month"),x=window.document.createDocumentFragment(),se;t.config.showMonths>1||t.config.monthSelectorType==="static"?se=$t("span","cur-month"):(t.monthsDropdownContainer=$t("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Ee){var Re=jn(Ee),Ke=parseInt(Re.value,10);t.changeMonth(Ke-t.currentMonth),It("onMonthChange")}),U(),se=t.monthsDropdownContainer);var he=Zo("cur-year",{tabindex:"-1"}),qe=he.getElementsByTagName("input")[0];qe.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&qe.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(qe.setAttribute("max",t.config.maxDate.getFullYear().toString()),qe.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var le=$t("div","flatpickr-current-month");return le.appendChild(se),le.appendChild(he),x.appendChild(le),Z.appendChild(x),{container:Z,yearElement:qe,monthElement:se}}function V(){Jo(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var Z=t.config.showMonths;Z--;){var x=j();t.yearElements.push(x.yearElement),t.monthElements.push(x.monthElement),t.monthNav.appendChild(x.container)}t.monthNav.appendChild(t.nextMonthNav)}function K(){return t.monthNav=$t("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=$t("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=$t("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,V(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(Z){t.__hidePrevMonthArrow!==Z&&($n(t.prevMonthNav,"flatpickr-disabled",Z),t.__hidePrevMonthArrow=Z)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(Z){t.__hideNextMonthArrow!==Z&&($n(t.nextMonthNav,"flatpickr-disabled",Z),t.__hideNextMonthArrow=Z)}}),t.currentYearElement=t.yearElements[0],ji(),t.monthNav}function J(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var Z=Ia(t.config);t.timeContainer=$t("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var x=$t("span","flatpickr-time-separator",":"),se=Zo("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=se.getElementsByTagName("input")[0];var he=Zo("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=he.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=In(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?Z.hours:f(Z.hours)),t.minuteElement.value=In(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():Z.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(se),t.timeContainer.appendChild(x),t.timeContainer.appendChild(he),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var qe=Zo("flatpickr-second");t.secondElement=qe.getElementsByTagName("input")[0],t.secondElement.value=In(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():Z.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($t("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(qe)}return t.config.time_24hr||(t.amPM=$t("span","flatpickr-am-pm",t.l10n.amPM[Kn((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 ee(){t.weekdayContainer?Jo(t.weekdayContainer):t.weekdayContainer=$t("div","flatpickr-weekdays");for(var Z=t.config.showMonths;Z--;){var x=$t("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(x)}return X(),t.weekdayContainer}function X(){if(t.weekdayContainer){var Z=t.l10n.firstDayOfWeek,x=xm(t.l10n.weekdays.shorthand);Z>0&&Z `+x.join("")+` @@ -85,7 +85,7 @@ Do you really want to upload and initialize "${$.name}"?`,()=>{h($)},()=>{d()})} 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, e.g. MAX(balance) as maxBalance.
  • Combined/multi-spaced expressions must be wrapped in parenthesis, e.g. - (MAX(balance) + 1) as maxBalance.
  • `,u=C(),g&&g.c(),f=ge(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(_,y){v(_,e,y),w(e,t),v(_,l,y),m[s].m(_,y),v(_,r,y),v(_,a,y),v(_,u,y),g&&g.m(_,y),v(_,f,y),c=!0},p(_,y){(!c||y&256&&i!==(i=_[8]))&&p(e,"for",i);let S=s;s=h(_),s===S?m[s].p(_,y):(re(),D(m[S],1,1,()=>{m[S]=null}),ae(),o=m[s],o?o.p(_,y):(o=m[s]=d[s](_),o.c()),O(o,1),o.m(r.parentNode,r)),_[3].length?g?g.p(_,y):(g=fh(_),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(_){c||(O(o),c=!0)},o(_){D(o),c=!1},d(_){_&&(k(e),k(l),k(r),k(a),k(u),k(f)),m[s].d(_),g&&g.d(_)}}}function sD(n){let e,t;return e=new fe({props:{class:"form-field required "+(n[3].length?"error":""),name:"viewQuery",$$slots:{default:[lD,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&8&&(s.class="form-field required "+(i[3].length?"error":"")),l&4367&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function oD(n,e,t){let i;Qe(n,Sn,c=>t(4,i=c));let{collection:l}=e,s,o=!1,r=[];function a(c){t(3,r=[]);const d=z.getNestedVal(c,"fields",null);if(z.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const m=z.extractColumnsFromQuery(l==null?void 0:l.viewQuery);z.removeByValue(m,"id"),z.removeByValue(m,"created"),z.removeByValue(m,"updated");for(let h in d)for(let g in d[h]){const _=d[h][g].message,y=m[h]||h;r.push(z.sentenize(y+": "+_))}}Yt(async()=>{t(2,o=!0);try{t(1,s=(await Ot(async()=>{const{default:c}=await import("./CodeEditor-D4uJdbuC.js");return{default:c}},__vite__mapDeps([12,1]),import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function u(c){n.$$.not_equal(l.viewQuery,c)&&(l.viewQuery=c,t(0,l))}const f=()=>{r.length&&fi("fields")};return n.$$set=c=>{"collection"in c&&t(0,l=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[l,s,o,r,i,u,f]}class rD extends ye{constructor(e){super(),be(this,e,oD,sD,_e,{collection:0})}}function dh(n,e,t){const i=n.slice();return i[15]=e[t],i}function ph(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S,T,$,E,M,L,I,A=pe(n[4]),P=[];for(let R=0;R@request
    filter:",c=C(),d=b("div"),d.innerHTML="@request.headers.* @request.query.* @request.body.* @request.auth.*",m=C(),h=b("hr"),g=C(),_=b("p"),_.innerHTML=`You could also add constraints and query other collections using the + (MAX(balance) + 1) as maxBalance.`,u=C(),g&&g.c(),f=ge(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(_,y){v(_,e,y),w(e,t),v(_,l,y),m[s].m(_,y),v(_,r,y),v(_,a,y),v(_,u,y),g&&g.m(_,y),v(_,f,y),c=!0},p(_,y){(!c||y&256&&i!==(i=_[8]))&&p(e,"for",i);let S=s;s=h(_),s===S?m[s].p(_,y):(re(),D(m[S],1,1,()=>{m[S]=null}),ae(),o=m[s],o?o.p(_,y):(o=m[s]=d[s](_),o.c()),O(o,1),o.m(r.parentNode,r)),_[3].length?g?g.p(_,y):(g=fh(_),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(_){c||(O(o),c=!0)},o(_){D(o),c=!1},d(_){_&&(k(e),k(l),k(r),k(a),k(u),k(f)),m[s].d(_),g&&g.d(_)}}}function sD(n){let e,t;return e=new fe({props:{class:"form-field required "+(n[3].length?"error":""),name:"viewQuery",$$slots:{default:[lD,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&8&&(s.class="form-field required "+(i[3].length?"error":"")),l&4367&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function oD(n,e,t){let i;Qe(n,Sn,c=>t(4,i=c));let{collection:l}=e,s,o=!1,r=[];function a(c){t(3,r=[]);const d=z.getNestedVal(c,"fields",null);if(z.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const m=z.extractColumnsFromQuery(l==null?void 0:l.viewQuery);z.removeByValue(m,"id"),z.removeByValue(m,"created"),z.removeByValue(m,"updated");for(let h in d)for(let g in d[h]){const _=d[h][g].message,y=m[h]||h;r.push(z.sentenize(y+": "+_))}}Yt(async()=>{t(2,o=!0);try{t(1,s=(await Ot(async()=>{const{default:c}=await import("./CodeEditor-wsjRtoGt.js");return{default:c}},__vite__mapDeps([12,1]),import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function u(c){n.$$.not_equal(l.viewQuery,c)&&(l.viewQuery=c,t(0,l))}const f=()=>{r.length&&fi("fields")};return n.$$set=c=>{"collection"in c&&t(0,l=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[l,s,o,r,i,u,f]}class rD extends ye{constructor(e){super(),be(this,e,oD,sD,_e,{collection:0})}}function dh(n,e,t){const i=n.slice();return i[15]=e[t],i}function ph(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_,y,S,T,$,E,M,L,I,A=pe(n[4]),P=[];for(let R=0;R@request filter:",c=C(),d=b("div"),d.innerHTML="@request.headers.* @request.query.* @request.body.* @request.auth.*",m=C(),h=b("hr"),g=C(),_=b("p"),_.innerHTML=`You could also add constraints and query other collections using the @collection filter:`,y=C(),S=b("div"),S.innerHTML="@collection.ANY_COLLECTION_NAME.*",T=C(),$=b("hr"),E=C(),M=b("p"),M.innerHTML=`Example rule:
    @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(l,"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(h,"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(R,N){v(R,e,N),w(e,t),w(t,i),w(i,l),w(i,s),w(i,o);for(let U=0;U{I&&(L||(L=ze(e,wt,{duration:150},!0)),L.run(1))}),I=!0)},o(R){R&&(L||(L=ze(e,wt,{duration:150},!1)),L.run(0)),I=!1},d(R){R&&k(e),pt(P,R),R&&L&&L.end()}}}function mh(n){let e,t=n[15]+"",i;return{c(){e=b("code"),i=Y(t)},m(l,s){v(l,e,s),w(e,i)},p(l,s){s&16&&t!==(t=l[15]+"")&&ue(i,t)},d(l){l&&k(e)}}}function hh(n){let e=!n[3].includes(n[15]),t,i=e&&mh(n);return{c(){i&&i.c(),t=ge()},m(l,s){i&&i.m(l,s),v(l,t,s)},p(l,s){s&24&&(e=!l[3].includes(l[15])),e?i?i.p(l,s):(i=mh(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){l&&k(t),i&&i.d(l)}}}function _h(n){let e,t,i,l,s,o,r,a,u;function f(_){n[8](_)}let c={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[aD,({isSuperuserOnly:_})=>({14:_}),({isSuperuserOnly:_})=>_?16384:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(c.rule=n[0].createRule),e=new tl({props:c}),ie.push(()=>ve(e,"rule",f));function d(_){n[9](_)}let m={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(m.rule=n[0].updateRule),l=new tl({props:m}),ie.push(()=>ve(l,"rule",d));function h(_){n[10](_)}let g={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(g.rule=n[0].deleteRule),r=new tl({props:g}),ie.push(()=>ve(r,"rule",h)),{c(){H(e.$$.fragment),i=C(),H(l.$$.fragment),o=C(),H(r.$$.fragment)},m(_,y){F(e,_,y),v(_,i,y),F(l,_,y),v(_,o,y),F(r,_,y),u=!0},p(_,y){const S={};y&1&&(S.collection=_[0]),y&278528&&(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]),!s&&y&1&&(s=!0,T.rule=_[0].updateRule,$e(()=>s=!1)),l.$set(T);const $={};y&1&&($.collection=_[0]),!a&&y&1&&(a=!0,$.rule=_[0].deleteRule,$e(()=>a=!1)),r.$set($)},i(_){u||(O(e.$$.fragment,_),O(l.$$.fragment,_),O(r.$$.fragment,_),u=!0)},o(_){D(e.$$.fragment,_),D(l.$$.fragment,_),D(r.$$.fragment,_),u=!1},d(_){_&&(k(i),k(o)),q(e,_),q(l,_),q(r,_)}}}function gh(n){let e,t,i;return{c(){e=b("i"),p(e,"class","ri-information-line link-hint")},m(l,s){v(l,e,s),t||(i=Me(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(l){l&&k(e),t=!1,i()}}}function aD(n){let e,t=!n[14]&&gh();return{c(){t&&t.c(),e=ge()},m(i,l){t&&t.m(i,l),v(i,e,l)},p(i,l){i[14]?t&&(t.d(1),t=null):t||(t=gh(),t.c(),t.m(e.parentNode,e))},d(i){i&&k(e),t&&t.d(i)}}}function bh(n){let e,t,i,l,s,o,r,a,u,f,c;function d(_,y){return _[2]?fD:uD}let m=d(n),h=m(n),g=n[2]&&yh(n);return{c(){e=b("hr"),t=C(),i=b("button"),l=b("strong"),l.textContent="Additional auth collection rules",s=C(),h.c(),r=C(),g&&g.c(),a=ge(),p(l,"class","txt"),p(i,"type","button"),p(i,"class",o="btn btn-sm m-b-sm "+(n[2]?"btn-secondary":"btn-hint btn-transparent"))},m(_,y){v(_,e,y),v(_,t,y),v(_,i,y),w(i,l),w(i,s),h.m(i,null),v(_,r,y),g&&g.m(_,y),v(_,a,y),u=!0,f||(c=B(i,"click",n[11]),f=!0)},p(_,y){m!==(m=d(_))&&(h.d(1),h=m(_),h&&(h.c(),h.m(i,null))),(!u||y&4&&o!==(o="btn btn-sm m-b-sm "+(_[2]?"btn-secondary":"btn-hint btn-transparent")))&&p(i,"class",o),_[2]?g?(g.p(_,y),y&4&&O(g,1)):(g=yh(_),g.c(),O(g,1),g.m(a.parentNode,a)):g&&(re(),D(g,1,1,()=>{g=null}),ae())},i(_){u||(O(g),u=!0)},o(_){D(g),u=!1},d(_){_&&(k(e),k(t),k(i),k(r),k(a)),h.d(),g&&g.d(_),f=!1,c()}}}function uD(n){let e;return{c(){e=b("i"),p(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function fD(n){let e;return{c(){e=b("i"),p(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function yh(n){let e,t,i,l,s,o,r,a;function u(m){n[12](m)}let f={label:"Authentication rule",formKey:"authRule",placeholder:"",collection:n[0],$$slots:{default:[cD]},$$scope:{ctx:n}};n[0].authRule!==void 0&&(f.rule=n[0].authRule),t=new tl({props:f}),ie.push(()=>ve(t,"rule",u));function c(m){n[13](m)}let d={label:"Manage rule",formKey:"manageRule",placeholder:"",required:n[0].manageRule!==null,collection:n[0],$$slots:{default:[dD]},$$scope:{ctx:n}};return n[0].manageRule!==void 0&&(d.rule=n[0].manageRule),s=new tl({props:d}),ie.push(()=>ve(s,"rule",c)),{c(){e=b("div"),H(t.$$.fragment),l=C(),H(s.$$.fragment),p(e,"class","block")},m(m,h){v(m,e,h),F(t,e,null),w(e,l),F(s,e,null),a=!0},p(m,h){const g={};h&1&&(g.collection=m[0]),h&262144&&(g.$$scope={dirty:h,ctx:m}),!i&&h&1&&(i=!0,g.rule=m[0].authRule,$e(()=>i=!1)),t.$set(g);const _={};h&1&&(_.required=m[0].manageRule!==null),h&1&&(_.collection=m[0]),h&262144&&(_.$$scope={dirty:h,ctx:m}),!o&&h&1&&(o=!0,_.rule=m[0].manageRule,$e(()=>o=!1)),s.$set(_)},i(m){a||(O(t.$$.fragment,m),O(s.$$.fragment,m),m&&nt(()=>{a&&(r||(r=ze(e,wt,{duration:150},!0)),r.run(1))}),a=!0)},o(m){D(t.$$.fragment,m),D(s.$$.fragment,m),m&&(r||(r=ze(e,wt,{duration:150},!1)),r.run(0)),a=!1},d(m){m&&k(e),q(t),q(s),m&&r&&r.end()}}}function cD(n){let e,t,i,l,s,o,r;return{c(){e=b("p"),e.textContent=`This rule is executed every time before authentication allowing you to restrict who can authenticate.`,t=C(),i=b("p"),i.innerHTML=`For example, to allow only verified users you can set it to @@ -112,7 +112,7 @@ Do you really want to upload and initialize "${$.name}"?`,()=>{h($)},()=>{d()})} 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||(O(t.$$.fragment,o),i=!0)},o(o){D(t.$$.fragment,o),i=!1},d(o){o&&k(e),q(t),l=!1,De(s)}}}function cA(n,e,t){let i,l,s,{record:o}=e,{field:r}=e,{value:a=""}=e,{uploadedFiles:u=[]}=e,{deletedFileNames:f=[]}=e,c,d,m=!1,h="";function g(V){z.removeByValue(f,V),t(2,f)}function _(V){z.pushUnique(f,V),t(2,f)}function y(V){z.isEmpty(u[V])||u.splice(V,1),t(1,u)}function S(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:a,uploadedFiles:u,deletedFileNames:f},bubbles:!0}))}function T(V){var J;V.preventDefault(),t(9,m=!1);const K=((J=V.dataTransfer)==null?void 0:J.files)||[];if(!(s||!K.length)){for(const ee of K){const X=l.length+u.length-f.length;if(r.maxSelect<=X)break;u.push(ee)}t(1,u)}}Yt(async()=>{t(10,h=await me.getSuperuserFileToken(o.collectionId))});const $=V=>g(V),E=V=>_(V);function M(V){a=V,t(0,a),t(6,i),t(4,r)}const L=V=>y(V);function I(V){u=V,t(1,u)}function A(V){ie[V?"unshift":"push"](()=>{c=V,t(7,c)})}const P=()=>{for(let V of c.files)u.push(V);t(1,u),t(7,c.value=null,c)},R=()=>c==null?void 0:c.click();function N(V){ie[V?"unshift":"push"](()=>{d=V,t(8,d)})}const U=()=>{t(9,m=!0)},j=()=>{t(9,m=!1)};return n.$$set=V=>{"record"in V&&t(3,o=V.record),"field"in V&&t(4,r=V.field),"value"in V&&t(0,a=V.value),"uploadedFiles"in V&&t(1,u=V.uploadedFiles),"deletedFileNames"in V&&t(2,f=V.deletedFileNames)},n.$$.update=()=>{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=r.maxSelect!=1),n.$$.dirty[0]&65&&z.isEmpty(a)&&t(0,a=i?[]:""),n.$$.dirty[0]&1&&t(5,l=z.toArray(a)),n.$$.dirty[0]&54&&t(11,s=(l.length||u.length)&&r.maxSelect<=l.length+u.length-f.length),n.$$.dirty[0]&6&&(u!==-1||f!==-1)&&S()},[a,u,f,o,r,l,i,c,d,m,h,s,g,_,y,T,$,E,M,L,I,A,P,R,N,U,j]}class dA extends ye{constructor(e){super(),be(this,e,cA,fA,_e,{record:3,field:4,value:0,uploadedFiles:1,deletedFileNames:2},null,[-1,-1])}}function pA(n){let e;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function mA(n){let e;return{c(){e=b("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function hA(n){let e,t,i,l;function s(a,u){return a[4]?mA:pA}let o=s(n),r=o(n);return{c(){e=b("span"),r.c(),p(e,"class","json-state svelte-p6ecb8")},m(a,u){v(a,e,u),r.m(e,null),i||(l=Me(t=He.call(null,e,{position:"left",text:n[4]?"Valid JSON":"Invalid JSON"})),i=!0)},p(a,u){o!==(o=s(a))&&(r.d(1),r=o(a),r&&(r.c(),r.m(e,null))),t&&Rt(t.update)&&u&16&&t.update.call(null,{position:"left",text:a[4]?"Valid JSON":"Invalid JSON"})},d(a){a&&k(e),r.d(),i=!1,l()}}}function _A(n){let e;return{c(){e=b("input"),p(e,"type","text"),p(e,"class","txt-mono"),e.value="Loading...",e.disabled=!0},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function gA(n){let e,t,i;var l=n[3];function s(o,r){return{props:{id:o[6],maxHeight:"500",language:"json",value:o[2]}}}return l&&(e=jt(l,s(n)),e.$on("change",n[5])),{c(){e&&H(e.$$.fragment),t=ge()},m(o,r){e&&F(e,o,r),v(o,t,r),i=!0},p(o,r){if(r&8&&l!==(l=o[3])){if(e){re();const a=e;D(a.$$.fragment,1,0,()=>{q(a,1)}),ae()}l?(e=jt(l,s(o)),e.$on("change",o[5]),H(e.$$.fragment),O(e.$$.fragment,1),F(e,t.parentNode,t)):e=null}else if(l){const a={};r&64&&(a.id=o[6]),r&4&&(a.value=o[2]),e.$set(a)}},i(o){i||(e&&O(e.$$.fragment,o),i=!0)},o(o){e&&D(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&q(e,o)}}}function bA(n){let e,t,i,l,s,o;e=new ti({props:{uniqueId:n[6],field:n[1],$$slots:{default:[hA]},$$scope:{ctx:n}}});const r=[gA,_A],a=[];function u(f,c){return f[3]?0:1}return i=u(n),l=a[i]=r[i](n),{c(){H(e.$$.fragment),t=C(),l.c(),s=ge()},m(f,c){F(e,f,c),v(f,t,c),a[i].m(f,c),v(f,s,c),o=!0},p(f,c){const d={};c&64&&(d.uniqueId=f[6]),c&2&&(d.field=f[1]),c&144&&(d.$$scope={dirty:c,ctx:f}),e.$set(d);let m=i;i=u(f),i===m?a[i].p(f,c):(re(),D(a[m],1,1,()=>{a[m]=null}),ae(),l=a[i],l?l.p(f,c):(l=a[i]=r[i](f),l.c()),O(l,1),l.m(s.parentNode,s))},i(f){o||(O(e.$$.fragment,f),O(l),o=!0)},o(f){D(e.$$.fragment,f),D(l),o=!1},d(f){f&&(k(t),k(s)),q(e,f),a[i].d(f)}}}function yA(n){let e,t;return e=new fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[bA,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2&&(s.class="form-field "+(i[1].required?"required":"")),l&2&&(s.name=i[1].name),l&223&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function sg(n){return typeof n=="string"&&uk(n)?n:JSON.stringify(typeof n>"u"?null:n,null,2)}function uk(n){try{return JSON.parse(n===""?null:n),!0}catch{}return!1}function kA(n,e,t){let i,{field:l}=e,{value:s=void 0}=e,o,r=sg(s);Yt(async()=>{try{t(3,o=(await Ot(async()=>{const{default:u}=await import("./CodeEditor-D4uJdbuC.js");return{default:u}},__vite__mapDeps([12,1]),import.meta.url)).default)}catch(u){console.warn(u)}});const a=u=>{t(2,r=u.detail),t(0,s=r.trim())};return n.$$set=u=>{"field"in u&&t(1,l=u.field),"value"in u&&t(0,s=u.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(r==null?void 0:r.trim())&&(t(2,r=sg(s)),t(0,s=r)),n.$$.dirty&4&&t(4,i=uk(r))},[s,l,r,o,i,a]}class vA extends ye{constructor(e){super(),be(this,e,kA,yA,_e,{field:1,value:0})}}function wA(n){let e,t,i,l,s,o,r,a,u,f;return e=new ti({props:{uniqueId:n[3],field:n[1]}}),{c(){H(e.$$.fragment),t=C(),i=b("input"),p(i,"type","number"),p(i,"id",l=n[3]),i.required=s=n[1].required,p(i,"min",o=n[1].min),p(i,"max",r=n[1].max),p(i,"step","any")},m(c,d){F(e,c,d),v(c,t,d),v(c,i,d),ce(i,n[0]),a=!0,u||(f=B(i,"input",n[2]),u=!0)},p(c,d){const m={};d&8&&(m.uniqueId=c[3]),d&2&&(m.field=c[1]),e.$set(m),(!a||d&8&&l!==(l=c[3]))&&p(i,"id",l),(!a||d&2&&s!==(s=c[1].required))&&(i.required=s),(!a||d&2&&o!==(o=c[1].min))&&p(i,"min",o),(!a||d&2&&r!==(r=c[1].max))&&p(i,"max",r),d&1&&_t(i.value)!==c[0]&&ce(i,c[0])},i(c){a||(O(e.$$.fragment,c),a=!0)},o(c){D(e.$$.fragment,c),a=!1},d(c){c&&(k(t),k(i)),q(e,c),u=!1,f()}}}function SA(n){let e,t;return e=new fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[wA,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2&&(s.class="form-field "+(i[1].required?"required":"")),l&2&&(s.name=i[1].name),l&27&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function TA(n,e,t){let{field:i}=e,{value:l=void 0}=e;function s(){l=_t(this.value),t(0,l)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,l=o.value)},[l,i,s]}class $A extends ye{constructor(e){super(),be(this,e,TA,SA,_e,{field:1,value:0})}}function CA(n){let e,t,i,l,s,o,r,a;return e=new ti({props:{uniqueId:n[3],field:n[1]}}),{c(){H(e.$$.fragment),t=C(),i=b("input"),p(i,"type","password"),p(i,"id",l=n[3]),p(i,"autocomplete","new-password"),i.required=s=n[1].required},m(u,f){F(e,u,f),v(u,t,f),v(u,i,f),ce(i,n[0]),o=!0,r||(a=B(i,"input",n[2]),r=!0)},p(u,f){const c={};f&8&&(c.uniqueId=u[3]),f&2&&(c.field=u[1]),e.$set(c),(!o||f&8&&l!==(l=u[3]))&&p(i,"id",l),(!o||f&2&&s!==(s=u[1].required))&&(i.required=s),f&1&&i.value!==u[0]&&ce(i,u[0])},i(u){o||(O(e.$$.fragment,u),o=!0)},o(u){D(e.$$.fragment,u),o=!1},d(u){u&&(k(t),k(i)),q(e,u),r=!1,a()}}}function OA(n){let e,t;return e=new fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[CA,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2&&(s.class="form-field "+(i[1].required?"required":"")),l&2&&(s.name=i[1].name),l&27&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function EA(n,e,t){let{field:i}=e,{value:l=void 0}=e;function s(){l=this.value,t(0,l)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,l=o.value)},[l,i,s]}class MA extends ye{constructor(e){super(),be(this,e,EA,OA,_e,{field:1,value:0})}}function og(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function DA(n,e){e=og(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=og(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}function rg(n,e,t){const i=n.slice();return i[50]=e[t],i[52]=t,i}function ag(n,e,t){const i=n.slice();i[50]=e[t];const l=i[9](i[50]);return i[6]=l,i}function ug(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='
    New record
    ',p(e,"type","button"),p(e,"class","btn btn-pill btn-transparent btn-hint p-l-xs p-r-xs")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[31]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function fg(n){let e,t=!n[13]&&cg(n);return{c(){t&&t.c(),e=ge()},m(i,l){t&&t.m(i,l),v(i,e,l)},p(i,l){i[13]?t&&(t.d(1),t=null):t?t.p(i,l):(t=cg(i),t.c(),t.m(e.parentNode,e))},d(i){i&&k(e),t&&t.d(i)}}}function cg(n){var s;let e,t,i,l=((s=n[2])==null?void 0:s.length)&&dg(n);return{c(){e=b("div"),t=b("span"),t.textContent="No records found.",i=C(),l&&l.c(),p(t,"class","txt txt-hint"),p(e,"class","list-item")},m(o,r){v(o,e,r),w(e,t),w(e,i),l&&l.m(e,null)},p(o,r){var a;(a=o[2])!=null&&a.length?l?l.p(o,r):(l=dg(o),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},d(o){o&&k(e),l&&l.d()}}}function dg(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-sm")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[35]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function IA(n){let e;return{c(){e=b("i"),p(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function LA(n){let e;return{c(){e=b("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function pg(n){let e,t,i,l;function s(){return n[32](n[50])}return{c(){e=b("div"),t=b("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){v(o,e,r),w(e,t),i||(l=[Me(He.call(null,t,"Edit")),B(t,"keydown",On(n[27])),B(t,"click",On(s))],i=!0)},p(o,r){n=o},d(o){o&&k(e),i=!1,De(l)}}}function mg(n,e){let t,i,l,s,o,r,a,u;function f(_,y){return _[6]?LA:IA}let c=f(e),d=c(e);s=new Ur({props:{record:e[50]}});let m=!e[11]&&pg(e);function h(){return e[33](e[50])}function g(..._){return e[34](e[50],..._)}return{key:n,first:null,c(){t=b("div"),d.c(),i=C(),l=b("div"),H(s.$$.fragment),o=C(),m&&m.c(),p(l,"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){v(_,t,y),d.m(t,null),w(t,i),w(t,l),F(s,l,null),w(t,o),m&&m.m(t,null),r=!0,a||(u=[B(t,"click",h),B(t,"keydown",g)],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[50]),s.$set(S),e[11]?m&&(m.d(1),m=null):m?m.p(e,y):(m=pg(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(_){r||(O(s.$$.fragment,_),r=!0)},o(_){D(s.$$.fragment,_),r=!1},d(_){_&&k(t),d.d(),q(s),m&&m.d(),a=!1,De(u)}}}function hg(n){let e;return{c(){e=b("div"),e.innerHTML='
    ',p(e,"class","list-item")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function _g(n){let e,t=n[6].length+"",i,l,s,o;return{c(){e=Y("("),i=Y(t),l=Y(" of MAX "),s=Y(n[4]),o=Y(")")},m(r,a){v(r,e,a),v(r,i,a),v(r,l,a),v(r,s,a),v(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&ue(i,t),a[0]&16&&ue(s,r[4])},d(r){r&&(k(e),k(i),k(l),k(s),k(o))}}}function AA(n){let e;return{c(){e=b("p"),e.textContent="No selected records.",p(e,"class","txt-hint")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function PA(n){let e,t,i=pe(n[6]),l=[];for(let o=0;oD(l[o],1,1,()=>{l[o]=null});return{c(){e=b("div");for(let o=0;o',s=C(),p(l,"type","button"),p(l,"title","Remove"),p(l,"class","btn btn-circle btn-transparent btn-hint btn-xs"),p(e,"class","label"),Q(e,"label-danger",n[53]),Q(e,"label-warning",n[54])},m(f,c){v(f,e,c),F(t,e,null),w(e,i),w(e,l),v(f,s,c),o=!0,r||(a=B(l,"click",u),r=!0)},p(f,c){n=f;const d={};c[0]&64&&(d.record=n[50]),t.$set(d),(!o||c[1]&4194304)&&Q(e,"label-danger",n[53]),(!o||c[1]&8388608)&&Q(e,"label-warning",n[54])},i(f){o||(O(t.$$.fragment,f),o=!0)},o(f){D(t.$$.fragment,f),o=!1},d(f){f&&(k(e),k(s)),q(t),r=!1,a()}}}function gg(n){let e,t,i;function l(o){n[38](o)}let s={index:n[52],$$slots:{default:[NA,({dragging:o,dragover:r})=>({53:o,54:r}),({dragging:o,dragover:r})=>[0,(o?4194304:0)|(r?8388608:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(s.list=n[6]),e=new ho({props:s}),ie.push(()=>ve(e,"list",l)),{c(){H(e.$$.fragment)},m(o,r){F(e,o,r),i=!0},p(o,r){const a={};r[0]&64|r[1]&79691776&&(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||(O(e.$$.fragment,o),i=!0)},o(o){D(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function RA(n){let e,t,i,l,s,o=[],r=new Map,a,u,f,c,d,m,h,g,_,y,S,T;t=new Hr({props:{value:n[2],autocompleteCollection:n[5]}}),t.$on("submit",n[30]);let $=!n[11]&&ug(n),E=pe(n[8]);const M=U=>U[50].id;for(let U=0;U1&&_g(n);const P=[PA,AA],R=[];function N(U,j){return U[6].length?0:1}return h=N(n),g=R[h]=P[h](n),{c(){e=b("div"),H(t.$$.fragment),i=C(),$&&$.c(),l=C(),s=b("div");for(let U=0;U{t(10,h=await me.getSuperuserFileToken(o.collectionId))});const $=V=>g(V),E=V=>_(V);function M(V){a=V,t(0,a),t(6,i),t(4,r)}const L=V=>y(V);function I(V){u=V,t(1,u)}function A(V){ie[V?"unshift":"push"](()=>{c=V,t(7,c)})}const P=()=>{for(let V of c.files)u.push(V);t(1,u),t(7,c.value=null,c)},R=()=>c==null?void 0:c.click();function N(V){ie[V?"unshift":"push"](()=>{d=V,t(8,d)})}const U=()=>{t(9,m=!0)},j=()=>{t(9,m=!1)};return n.$$set=V=>{"record"in V&&t(3,o=V.record),"field"in V&&t(4,r=V.field),"value"in V&&t(0,a=V.value),"uploadedFiles"in V&&t(1,u=V.uploadedFiles),"deletedFileNames"in V&&t(2,f=V.deletedFileNames)},n.$$.update=()=>{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=r.maxSelect!=1),n.$$.dirty[0]&65&&z.isEmpty(a)&&t(0,a=i?[]:""),n.$$.dirty[0]&1&&t(5,l=z.toArray(a)),n.$$.dirty[0]&54&&t(11,s=(l.length||u.length)&&r.maxSelect<=l.length+u.length-f.length),n.$$.dirty[0]&6&&(u!==-1||f!==-1)&&S()},[a,u,f,o,r,l,i,c,d,m,h,s,g,_,y,T,$,E,M,L,I,A,P,R,N,U,j]}class dA extends ye{constructor(e){super(),be(this,e,cA,fA,_e,{record:3,field:4,value:0,uploadedFiles:1,deletedFileNames:2},null,[-1,-1])}}function pA(n){let e;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function mA(n){let e;return{c(){e=b("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function hA(n){let e,t,i,l;function s(a,u){return a[4]?mA:pA}let o=s(n),r=o(n);return{c(){e=b("span"),r.c(),p(e,"class","json-state svelte-p6ecb8")},m(a,u){v(a,e,u),r.m(e,null),i||(l=Me(t=He.call(null,e,{position:"left",text:n[4]?"Valid JSON":"Invalid JSON"})),i=!0)},p(a,u){o!==(o=s(a))&&(r.d(1),r=o(a),r&&(r.c(),r.m(e,null))),t&&Rt(t.update)&&u&16&&t.update.call(null,{position:"left",text:a[4]?"Valid JSON":"Invalid JSON"})},d(a){a&&k(e),r.d(),i=!1,l()}}}function _A(n){let e;return{c(){e=b("input"),p(e,"type","text"),p(e,"class","txt-mono"),e.value="Loading...",e.disabled=!0},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function gA(n){let e,t,i;var l=n[3];function s(o,r){return{props:{id:o[6],maxHeight:"500",language:"json",value:o[2]}}}return l&&(e=jt(l,s(n)),e.$on("change",n[5])),{c(){e&&H(e.$$.fragment),t=ge()},m(o,r){e&&F(e,o,r),v(o,t,r),i=!0},p(o,r){if(r&8&&l!==(l=o[3])){if(e){re();const a=e;D(a.$$.fragment,1,0,()=>{q(a,1)}),ae()}l?(e=jt(l,s(o)),e.$on("change",o[5]),H(e.$$.fragment),O(e.$$.fragment,1),F(e,t.parentNode,t)):e=null}else if(l){const a={};r&64&&(a.id=o[6]),r&4&&(a.value=o[2]),e.$set(a)}},i(o){i||(e&&O(e.$$.fragment,o),i=!0)},o(o){e&&D(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&q(e,o)}}}function bA(n){let e,t,i,l,s,o;e=new ti({props:{uniqueId:n[6],field:n[1],$$slots:{default:[hA]},$$scope:{ctx:n}}});const r=[gA,_A],a=[];function u(f,c){return f[3]?0:1}return i=u(n),l=a[i]=r[i](n),{c(){H(e.$$.fragment),t=C(),l.c(),s=ge()},m(f,c){F(e,f,c),v(f,t,c),a[i].m(f,c),v(f,s,c),o=!0},p(f,c){const d={};c&64&&(d.uniqueId=f[6]),c&2&&(d.field=f[1]),c&144&&(d.$$scope={dirty:c,ctx:f}),e.$set(d);let m=i;i=u(f),i===m?a[i].p(f,c):(re(),D(a[m],1,1,()=>{a[m]=null}),ae(),l=a[i],l?l.p(f,c):(l=a[i]=r[i](f),l.c()),O(l,1),l.m(s.parentNode,s))},i(f){o||(O(e.$$.fragment,f),O(l),o=!0)},o(f){D(e.$$.fragment,f),D(l),o=!1},d(f){f&&(k(t),k(s)),q(e,f),a[i].d(f)}}}function yA(n){let e,t;return e=new fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[bA,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2&&(s.class="form-field "+(i[1].required?"required":"")),l&2&&(s.name=i[1].name),l&223&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function sg(n){return typeof n=="string"&&uk(n)?n:JSON.stringify(typeof n>"u"?null:n,null,2)}function uk(n){try{return JSON.parse(n===""?null:n),!0}catch{}return!1}function kA(n,e,t){let i,{field:l}=e,{value:s=void 0}=e,o,r=sg(s);Yt(async()=>{try{t(3,o=(await Ot(async()=>{const{default:u}=await import("./CodeEditor-wsjRtoGt.js");return{default:u}},__vite__mapDeps([12,1]),import.meta.url)).default)}catch(u){console.warn(u)}});const a=u=>{t(2,r=u.detail),t(0,s=r.trim())};return n.$$set=u=>{"field"in u&&t(1,l=u.field),"value"in u&&t(0,s=u.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(r==null?void 0:r.trim())&&(t(2,r=sg(s)),t(0,s=r)),n.$$.dirty&4&&t(4,i=uk(r))},[s,l,r,o,i,a]}class vA extends ye{constructor(e){super(),be(this,e,kA,yA,_e,{field:1,value:0})}}function wA(n){let e,t,i,l,s,o,r,a,u,f;return e=new ti({props:{uniqueId:n[3],field:n[1]}}),{c(){H(e.$$.fragment),t=C(),i=b("input"),p(i,"type","number"),p(i,"id",l=n[3]),i.required=s=n[1].required,p(i,"min",o=n[1].min),p(i,"max",r=n[1].max),p(i,"step","any")},m(c,d){F(e,c,d),v(c,t,d),v(c,i,d),ce(i,n[0]),a=!0,u||(f=B(i,"input",n[2]),u=!0)},p(c,d){const m={};d&8&&(m.uniqueId=c[3]),d&2&&(m.field=c[1]),e.$set(m),(!a||d&8&&l!==(l=c[3]))&&p(i,"id",l),(!a||d&2&&s!==(s=c[1].required))&&(i.required=s),(!a||d&2&&o!==(o=c[1].min))&&p(i,"min",o),(!a||d&2&&r!==(r=c[1].max))&&p(i,"max",r),d&1&&_t(i.value)!==c[0]&&ce(i,c[0])},i(c){a||(O(e.$$.fragment,c),a=!0)},o(c){D(e.$$.fragment,c),a=!1},d(c){c&&(k(t),k(i)),q(e,c),u=!1,f()}}}function SA(n){let e,t;return e=new fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[wA,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2&&(s.class="form-field "+(i[1].required?"required":"")),l&2&&(s.name=i[1].name),l&27&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function TA(n,e,t){let{field:i}=e,{value:l=void 0}=e;function s(){l=_t(this.value),t(0,l)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,l=o.value)},[l,i,s]}class $A extends ye{constructor(e){super(),be(this,e,TA,SA,_e,{field:1,value:0})}}function CA(n){let e,t,i,l,s,o,r,a;return e=new ti({props:{uniqueId:n[3],field:n[1]}}),{c(){H(e.$$.fragment),t=C(),i=b("input"),p(i,"type","password"),p(i,"id",l=n[3]),p(i,"autocomplete","new-password"),i.required=s=n[1].required},m(u,f){F(e,u,f),v(u,t,f),v(u,i,f),ce(i,n[0]),o=!0,r||(a=B(i,"input",n[2]),r=!0)},p(u,f){const c={};f&8&&(c.uniqueId=u[3]),f&2&&(c.field=u[1]),e.$set(c),(!o||f&8&&l!==(l=u[3]))&&p(i,"id",l),(!o||f&2&&s!==(s=u[1].required))&&(i.required=s),f&1&&i.value!==u[0]&&ce(i,u[0])},i(u){o||(O(e.$$.fragment,u),o=!0)},o(u){D(e.$$.fragment,u),o=!1},d(u){u&&(k(t),k(i)),q(e,u),r=!1,a()}}}function OA(n){let e,t;return e=new fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[CA,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2&&(s.class="form-field "+(i[1].required?"required":"")),l&2&&(s.name=i[1].name),l&27&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function EA(n,e,t){let{field:i}=e,{value:l=void 0}=e;function s(){l=this.value,t(0,l)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,l=o.value)},[l,i,s]}class MA extends ye{constructor(e){super(),be(this,e,EA,OA,_e,{field:1,value:0})}}function og(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function DA(n,e){e=og(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=og(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}function rg(n,e,t){const i=n.slice();return i[50]=e[t],i[52]=t,i}function ag(n,e,t){const i=n.slice();i[50]=e[t];const l=i[9](i[50]);return i[6]=l,i}function ug(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='
    New record
    ',p(e,"type","button"),p(e,"class","btn btn-pill btn-transparent btn-hint p-l-xs p-r-xs")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[31]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function fg(n){let e,t=!n[13]&&cg(n);return{c(){t&&t.c(),e=ge()},m(i,l){t&&t.m(i,l),v(i,e,l)},p(i,l){i[13]?t&&(t.d(1),t=null):t?t.p(i,l):(t=cg(i),t.c(),t.m(e.parentNode,e))},d(i){i&&k(e),t&&t.d(i)}}}function cg(n){var s;let e,t,i,l=((s=n[2])==null?void 0:s.length)&&dg(n);return{c(){e=b("div"),t=b("span"),t.textContent="No records found.",i=C(),l&&l.c(),p(t,"class","txt txt-hint"),p(e,"class","list-item")},m(o,r){v(o,e,r),w(e,t),w(e,i),l&&l.m(e,null)},p(o,r){var a;(a=o[2])!=null&&a.length?l?l.p(o,r):(l=dg(o),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},d(o){o&&k(e),l&&l.d()}}}function dg(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-sm")},m(l,s){v(l,e,s),t||(i=B(e,"click",n[35]),t=!0)},p:te,d(l){l&&k(e),t=!1,i()}}}function IA(n){let e;return{c(){e=b("i"),p(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function LA(n){let e;return{c(){e=b("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function pg(n){let e,t,i,l;function s(){return n[32](n[50])}return{c(){e=b("div"),t=b("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){v(o,e,r),w(e,t),i||(l=[Me(He.call(null,t,"Edit")),B(t,"keydown",On(n[27])),B(t,"click",On(s))],i=!0)},p(o,r){n=o},d(o){o&&k(e),i=!1,De(l)}}}function mg(n,e){let t,i,l,s,o,r,a,u;function f(_,y){return _[6]?LA:IA}let c=f(e),d=c(e);s=new Ur({props:{record:e[50]}});let m=!e[11]&&pg(e);function h(){return e[33](e[50])}function g(..._){return e[34](e[50],..._)}return{key:n,first:null,c(){t=b("div"),d.c(),i=C(),l=b("div"),H(s.$$.fragment),o=C(),m&&m.c(),p(l,"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){v(_,t,y),d.m(t,null),w(t,i),w(t,l),F(s,l,null),w(t,o),m&&m.m(t,null),r=!0,a||(u=[B(t,"click",h),B(t,"keydown",g)],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[50]),s.$set(S),e[11]?m&&(m.d(1),m=null):m?m.p(e,y):(m=pg(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(_){r||(O(s.$$.fragment,_),r=!0)},o(_){D(s.$$.fragment,_),r=!1},d(_){_&&k(t),d.d(),q(s),m&&m.d(),a=!1,De(u)}}}function hg(n){let e;return{c(){e=b("div"),e.innerHTML='
    ',p(e,"class","list-item")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function _g(n){let e,t=n[6].length+"",i,l,s,o;return{c(){e=Y("("),i=Y(t),l=Y(" of MAX "),s=Y(n[4]),o=Y(")")},m(r,a){v(r,e,a),v(r,i,a),v(r,l,a),v(r,s,a),v(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&ue(i,t),a[0]&16&&ue(s,r[4])},d(r){r&&(k(e),k(i),k(l),k(s),k(o))}}}function AA(n){let e;return{c(){e=b("p"),e.textContent="No selected records.",p(e,"class","txt-hint")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function PA(n){let e,t,i=pe(n[6]),l=[];for(let o=0;oD(l[o],1,1,()=>{l[o]=null});return{c(){e=b("div");for(let o=0;o',s=C(),p(l,"type","button"),p(l,"title","Remove"),p(l,"class","btn btn-circle btn-transparent btn-hint btn-xs"),p(e,"class","label"),Q(e,"label-danger",n[53]),Q(e,"label-warning",n[54])},m(f,c){v(f,e,c),F(t,e,null),w(e,i),w(e,l),v(f,s,c),o=!0,r||(a=B(l,"click",u),r=!0)},p(f,c){n=f;const d={};c[0]&64&&(d.record=n[50]),t.$set(d),(!o||c[1]&4194304)&&Q(e,"label-danger",n[53]),(!o||c[1]&8388608)&&Q(e,"label-warning",n[54])},i(f){o||(O(t.$$.fragment,f),o=!0)},o(f){D(t.$$.fragment,f),o=!1},d(f){f&&(k(e),k(s)),q(t),r=!1,a()}}}function gg(n){let e,t,i;function l(o){n[38](o)}let s={index:n[52],$$slots:{default:[NA,({dragging:o,dragover:r})=>({53:o,54:r}),({dragging:o,dragover:r})=>[0,(o?4194304:0)|(r?8388608:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(s.list=n[6]),e=new ho({props:s}),ie.push(()=>ve(e,"list",l)),{c(){H(e.$$.fragment)},m(o,r){F(e,o,r),i=!0},p(o,r){const a={};r[0]&64|r[1]&79691776&&(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||(O(e.$$.fragment,o),i=!0)},o(o){D(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function RA(n){let e,t,i,l,s,o=[],r=new Map,a,u,f,c,d,m,h,g,_,y,S,T;t=new Hr({props:{value:n[2],autocompleteCollection:n[5]}}),t.$on("submit",n[30]);let $=!n[11]&&ug(n),E=pe(n[8]);const M=U=>U[50].id;for(let U=0;U1&&_g(n);const P=[PA,AA],R=[];function N(U,j){return U[6].length?0:1}return h=N(n),g=R[h]=P[h](n),{c(){e=b("div"),H(t.$$.fragment),i=C(),$&&$.c(),l=C(),s=b("div");for(let U=0;U1?A?A.p(U,j):(A=_g(U),A.c(),A.m(c,null)):A&&(A.d(1),A=null);let K=h;h=N(U),h===K?R[h].p(U,j):(re(),D(R[K],1,1,()=>{R[K]=null}),ae(),g=R[h],g?g.p(U,j):(g=R[h]=P[h](U),g.c()),O(g,1),g.m(_.parentNode,_))},i(U){if(!y){O(t.$$.fragment,U);for(let j=0;jCancel',t=C(),i=b("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){v(o,e,r),v(o,t,r),v(o,i,r),l||(s=[B(e,"click",n[28]),B(i,"click",n[29])],l=!0)},p:te,d(o){o&&(k(e),k(t),k(i)),l=!1,De(s)}}}function HA(n){let e,t,i,l;const s=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[qA],header:[FA],default:[RA]},$$scope:{ctx:n}};for(let a=0;at(26,m=Oe));const h=gt(),g="picker_"+z.randomString(5);let{value:_}=e,{field:y}=e,S,T,$="",E=[],M=[],L=1,I=0,A=!1,P=!1;function R(){return t(2,$=""),t(8,E=[]),t(6,M=[]),j(),V(!0),S==null?void 0:S.show()}function N(){return S==null?void 0:S.hide()}function U(){var Ne;let Oe="";const ut=(Ne=s==null?void 0:s.fields)==null?void 0:Ne.filter(xe=>!xe.hidden&&xe.presentable&&xe.type=="relation");for(const xe of ut){const qt=z.getExpandPresentableRelField(xe,m,2);qt&&(Oe!=""&&(Oe+=","),Oe+=qt)}return Oe}async function j(){const Oe=z.toArray(_);if(!l||!Oe.length)return;t(24,P=!0);let ut=[];const Ne=Oe.slice(),xe=[];for(;Ne.length>0;){const qt=[];for(const Zt of Ne.splice(0,Go))qt.push(`id="${Zt}"`);xe.push(me.collection(l).getFullList({batch:Go,filter:qt.join("||"),fields:"*:excerpt(200)",expand:U(),requestKey:null}))}try{await Promise.all(xe).then(qt=>{ut=ut.concat(...qt)}),t(6,M=[]);for(const qt of Oe){const Zt=z.findByKey(ut,"id",qt);Zt&&M.push(Zt)}$.trim()||t(8,E=z.filterDuplicatesByKey(M.concat(E))),t(24,P=!1)}catch(qt){qt.isAbort||(me.error(qt),t(24,P=!1))}}async function V(Oe=!1){if(l){t(3,A=!0),Oe&&($.trim()?t(8,E=[]):t(8,E=z.toArray(M).slice()));try{const ut=Oe?1:L+1,Ne=z.getAllCollectionIdentifiers(s),xe=await me.collection(l).getList(ut,Go,{filter:z.normalizeSearchFilter($,Ne),sort:o?"":"-created",fields:"*:excerpt(200)",skipTotal:1,expand:U(),requestKey:g+"loadList"});t(8,E=z.filterDuplicatesByKey(E.concat(xe.items))),L=xe.page,t(23,I=xe.items.length),t(3,A=!1)}catch(ut){ut.isAbort||(me.error(ut),t(3,A=!1))}}}function K(Oe){i==1?t(6,M=[Oe]):u&&(z.pushOrReplaceByKey(M,Oe),t(6,M))}function J(Oe){z.removeByKey(M,"id",Oe.id),t(6,M)}function ee(Oe){f(Oe)?J(Oe):K(Oe)}function X(){var Oe;i!=1?t(20,_=M.map(ut=>ut.id)):t(20,_=((Oe=M==null?void 0:M[0])==null?void 0:Oe.id)||""),h("save",M),N()}function oe(Oe){Pe.call(this,n,Oe)}const Se=()=>N(),ke=()=>X(),Ce=Oe=>t(2,$=Oe.detail),We=()=>T==null?void 0:T.show(),st=Oe=>T==null?void 0:T.show(Oe.id),et=Oe=>ee(Oe),Be=(Oe,ut)=>{(ut.code==="Enter"||ut.code==="Space")&&(ut.preventDefault(),ut.stopPropagation(),ee(Oe))},rt=()=>t(2,$=""),Je=()=>{a&&!A&&V()},at=Oe=>J(Oe);function Ht(Oe){M=Oe,t(6,M)}function Te(Oe){ie[Oe?"unshift":"push"](()=>{S=Oe,t(1,S)})}function Ze(Oe){Pe.call(this,n,Oe)}function ot(Oe){Pe.call(this,n,Oe)}function Le(Oe){ie[Oe?"unshift":"push"](()=>{T=Oe,t(7,T)})}const Ve=Oe=>{z.removeByKey(E,"id",Oe.detail.record.id),E.unshift(Oe.detail.record),t(8,E),K(Oe.detail.record)},we=Oe=>{z.removeByKey(E,"id",Oe.detail.id),t(8,E),J(Oe.detail)};return n.$$set=Oe=>{e=je(je({},e),Ut(Oe)),t(19,d=lt(e,c)),"value"in Oe&&t(20,_=Oe.value),"field"in Oe&&t(21,y=Oe.field)},n.$$.update=()=>{n.$$.dirty[0]&2097152&&t(4,i=(y==null?void 0:y.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,l=y==null?void 0:y.collectionId),n.$$.dirty[0]&100663296&&t(5,s=m.find(Oe=>Oe.id==l)||null),n.$$.dirty[0]&6&&typeof $<"u"&&S!=null&&S.isActive()&&V(!0),n.$$.dirty[0]&32&&t(11,o=(s==null?void 0:s.type)==="view"),n.$$.dirty[0]&16777224&&t(13,r=A||P),n.$$.dirty[0]&8388608&&t(12,a=I==Go),n.$$.dirty[0]&80&&t(10,u=i<=0||i>M.length),n.$$.dirty[0]&64&&t(9,f=function(Oe){return z.findByKey(M,"id",Oe.id)})},[N,S,$,A,i,s,M,T,E,f,u,o,a,r,V,K,J,ee,X,d,_,y,R,I,P,l,m,oe,Se,ke,Ce,We,st,et,Be,rt,Je,at,Ht,Te,Ze,ot,Le,Ve,we]}class zA extends ye{constructor(e){super(),be(this,e,jA,HA,_e,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function bg(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function yg(n,e,t){const i=n.slice();return i[27]=e[t],i}function kg(n){let e,t,i,l;return{c(){e=b("i"),p(e,"class","ri-error-warning-line link-hint m-l-auto flex-order-10")},m(s,o){v(s,e,o),i||(l=Me(t=He.call(null,e,{position:"left",text:"The following relation ids were removed from the list because they are missing or invalid: "+n[6].join(", ")})),i=!0)},p(s,o){t&&Rt(t.update)&&o&64&&t.update.call(null,{position:"left",text:"The following relation ids were removed from the list because they are missing or invalid: "+s[6].join(", ")})},d(s){s&&k(e),i=!1,l()}}}function UA(n){let e,t=n[6].length&&kg(n);return{c(){t&&t.c(),e=ge()},m(i,l){t&&t.m(i,l),v(i,e,l)},p(i,l){i[6].length?t?t.p(i,l):(t=kg(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){i&&k(e),t&&t.d(i)}}}function vg(n){let e,t=n[5]&&wg(n);return{c(){t&&t.c(),e=ge()},m(i,l){t&&t.m(i,l),v(i,e,l)},p(i,l){i[5]?t?t.p(i,l):(t=wg(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){i&&k(e),t&&t.d(i)}}}function wg(n){let e,t=pe(z.toArray(n[0]).slice(0,10)),i=[];for(let l=0;l ',p(e,"class","list-item")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function VA(n){let e,t,i,l,s,o,r,a,u,f;i=new Ur({props:{record:n[22]}});function c(){return n[11](n[22])}return{c(){e=b("div"),t=b("div"),H(i.$$.fragment),l=C(),s=b("div"),o=b("button"),o.innerHTML='',r=C(),p(t,"class","content"),p(o,"type","button"),p(o,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(s,"class","actions"),p(e,"class","list-item"),Q(e,"dragging",n[25]),Q(e,"dragover",n[26])},m(d,m){v(d,e,m),w(e,t),F(i,t,null),w(e,l),w(e,s),w(s,o),v(d,r,m),a=!0,u||(f=[Me(He.call(null,o,"Remove")),B(o,"click",c)],u=!0)},p(d,m){n=d;const h={};m&16&&(h.record=n[22]),i.$set(h),(!a||m&33554432)&&Q(e,"dragging",n[25]),(!a||m&67108864)&&Q(e,"dragover",n[26])},i(d){a||(O(i.$$.fragment,d),a=!0)},o(d){D(i.$$.fragment,d),a=!1},d(d){d&&(k(e),k(r)),q(i),u=!1,De(f)}}}function Tg(n,e){let t,i,l,s;function o(a){e[12](a)}let r={group:e[2].name+"_relation",index:e[24],disabled:!e[7],$$slots:{default:[VA,({dragging:a,dragover:u})=>({25:a,26:u}),({dragging:a,dragover:u})=>(a?33554432:0)|(u?67108864:0)]},$$scope:{ctx:e}};return e[4]!==void 0&&(r.list=e[4]),i=new ho({props:r}),ie.push(()=>ve(i,"list",o)),i.$on("sort",e[13]),{key:n,first:null,c(){t=ge(),H(i.$$.fragment),this.first=t},m(a,u){v(a,t,u),F(i,a,u),s=!0},p(a,u){e=a;const f={};u&4&&(f.group=e[2].name+"_relation"),u&16&&(f.index=e[24]),u&128&&(f.disabled=!e[7]),u&1174405136&&(f.$$scope={dirty:u,ctx:e}),!l&&u&16&&(l=!0,f.list=e[4],$e(()=>l=!1)),i.$set(f)},i(a){s||(O(i.$$.fragment,a),s=!0)},o(a){D(i.$$.fragment,a),s=!1},d(a){a&&k(t),q(i,a)}}}function BA(n){let e,t,i,l,s=[],o=new Map,r,a,u,f,c,d;e=new ti({props:{uniqueId:n[21],field:n[2],$$slots:{default:[UA]},$$scope:{ctx:n}}});let m=pe(n[4]);const h=_=>_[22].id;for(let _=0;_ Open picker',p(l,"class","relations-list svelte-1ynw0pc"),p(u,"type","button"),p(u,"class","btn btn-transparent btn-sm btn-block"),p(a,"class","list-item list-item-btn"),p(i,"class","list")},m(_,y){F(e,_,y),v(_,t,y),v(_,i,y),w(i,l);for(let S=0;S({21:r}),({uniqueId:r})=>r?2097152:0]},$$scope:{ctx:n}};e=new fe({props:s}),n[15](e);let o={value:n[0],field:n[2]};return i=new zA({props:o}),n[16](i),i.$on("save",n[17]),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment)},m(r,a){F(e,r,a),v(r,t,a),F(i,r,a),l=!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&1075839223&&(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){l||(O(e.$$.fragment,r),O(i.$$.fragment,r),l=!0)},o(r){D(e.$$.fragment,r),D(i.$$.fragment,r),l=!1},d(r){r&&k(t),n[15](null),q(e,r),n[16](null),q(i,r)}}}const $g=100;function YA(n,e,t){let i,l;Qe(n,En,I=>t(18,l=I));let{field:s}=e,{value:o}=e,{picker:r}=e,a,u=[],f=!1,c,d=[];function m(){if(f)return!1;const I=z.toArray(o);return t(4,u=u.filter(A=>I.includes(A.id))),I.length!=u.length}async function h(){var U,j;const I=z.toArray(o);if(t(4,u=[]),t(6,d=[]),!(s!=null&&s.collectionId)||!I.length){t(5,f=!1);return}t(5,f=!0);let A="";const P=(j=(U=l.find(V=>V.id==s.collectionId))==null?void 0:U.fields)==null?void 0:j.filter(V=>!V.hidden&&V.presentable&&V.type=="relation");for(const V of P){const K=z.getExpandPresentableRelField(V,l,2);K&&(A!=""&&(A+=","),A+=K)}const R=I.slice(),N=[];for(;R.length>0;){const V=[];for(const K of R.splice(0,$g))V.push(`id="${K}"`);N.push(me.collection(s.collectionId).getFullList($g,{filter:V.join("||"),fields:"*:excerpt(200)",expand:A,requestKey:null}))}try{let V=[];await Promise.all(N).then(K=>{V=V.concat(...K)});for(const K of I){const J=z.findByKey(V,"id",K);J?u.push(J):d.push(K)}t(4,u),_()}catch(V){me.error(V)}t(5,f=!1)}function g(I){z.removeByKey(u,"id",I.id),t(4,u),_()}function _(){var I;i?t(0,o=u.map(A=>A.id)):t(0,o=((I=u[0])==null?void 0:I.id)||"")}so(()=>{clearTimeout(c)});const y=I=>g(I);function S(I){u=I,t(4,u)}const T=()=>{_()},$=()=>r==null?void 0:r.show();function E(I){ie[I?"unshift":"push"](()=>{a=I,t(3,a)})}function M(I){ie[I?"unshift":"push"](()=>{r=I,t(1,r)})}const L=I=>{var A;t(4,u=I.detail||[]),t(0,o=i?u.map(P=>P.id):((A=u[0])==null?void 0:A.id)||"")};return n.$$set=I=>{"field"in I&&t(2,s=I.field),"value"in I&&t(0,o=I.value),"picker"in I&&t(1,r=I.picker)},n.$$.update=()=>{n.$$.dirty&4&&t(7,i=s.maxSelect!=1),n.$$.dirty&9&&typeof o<"u"&&(a==null||a.changed()),n.$$.dirty&1041&&m()&&(t(5,f=!0),clearTimeout(c),t(10,c=setTimeout(h,0)))},[o,r,s,a,u,f,d,i,g,_,c,y,S,T,$,E,M,L]}class KA extends ye{constructor(e){super(),be(this,e,YA,WA,_e,{field:2,value:0,picker:1})}}function Cg(n){let e,t,i,l;return{c(){e=b("div"),t=Y("Select up to "),i=Y(n[2]),l=Y(" items."),p(e,"class","help-block")},m(s,o){v(s,e,o),w(e,t),w(e,i),w(e,l)},p(s,o){o&4&&ue(i,s[2])},d(s){s&&k(e)}}}function JA(n){var c,d;let e,t,i,l,s,o,r;e=new ti({props:{uniqueId:n[5],field:n[1]}});function a(m){n[4](m)}let u={id:n[5],toggle:!n[1].required||n[3],multiple:n[3],closable:!n[3]||((c=n[0])==null?void 0:c.length)>=n[1].maxSelect,items:n[1].values,searchable:((d=n[1].values)==null?void 0:d.length)>5};n[0]!==void 0&&(u.selected=n[0]),i=new ds({props:u}),ie.push(()=>ve(i,"selected",a));let f=n[1].maxSelect!=1&&Cg(n);return{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment),s=C(),f&&f.c(),o=ge()},m(m,h){F(e,m,h),v(m,t,h),F(i,m,h),v(m,s,h),f&&f.m(m,h),v(m,o,h),r=!0},p(m,h){var y,S;const g={};h&32&&(g.uniqueId=m[5]),h&2&&(g.field=m[1]),e.$set(g);const _={};h&32&&(_.id=m[5]),h&10&&(_.toggle=!m[1].required||m[3]),h&8&&(_.multiple=m[3]),h&11&&(_.closable=!m[3]||((y=m[0])==null?void 0:y.length)>=m[1].maxSelect),h&2&&(_.items=m[1].values),h&2&&(_.searchable=((S=m[1].values)==null?void 0:S.length)>5),!l&&h&1&&(l=!0,_.selected=m[0],$e(()=>l=!1)),i.$set(_),m[1].maxSelect!=1?f?f.p(m,h):(f=Cg(m),f.c(),f.m(o.parentNode,o)):f&&(f.d(1),f=null)},i(m){r||(O(e.$$.fragment,m),O(i.$$.fragment,m),r=!0)},o(m){D(e.$$.fragment,m),D(i.$$.fragment,m),r=!1},d(m){m&&(k(t),k(s),k(o)),q(e,m),q(i,m),f&&f.d(m)}}}function ZA(n){let e,t;return e=new fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[JA,({uniqueId:i})=>({5:i}),({uniqueId:i})=>i?32:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2&&(s.class="form-field "+(i[1].required?"required":"")),l&2&&(s.name=i[1].name),l&111&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function GA(n,e,t){let i,l,{field:s}=e,{value:o=void 0}=e;function r(a){o=a,t(0,o),t(3,i),t(1,s),t(2,l)}return n.$$set=a=>{"field"in a&&t(1,s=a.field),"value"in a&&t(0,o=a.value)},n.$$.update=()=>{n.$$.dirty&2&&t(3,i=s.maxSelect!=1),n.$$.dirty&9&&typeof o>"u"&&t(0,o=i?[]:""),n.$$.dirty&2&&t(2,l=s.maxSelect||s.values.length),n.$$.dirty&15&&i&&Array.isArray(o)&&(t(0,o=o.filter(a=>s.values.includes(a))),o.length>l&&t(0,o=o.slice(o.length-l)))},[o,s,l,i,r]}class XA extends ye{constructor(e){super(),be(this,e,GA,ZA,_e,{field:1,value:0})}}function QA(n){let e,t,i,l=[n[3]],s={};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(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const h=r.closest("form");h!=null&&h.requestSubmit&&h.requestSubmit()}}Yt(()=>(u(),()=>clearTimeout(a)));function c(m){ie[m?"unshift":"push"](()=>{r=m,t(1,r)})}function d(){s=this.value,t(0,s)}return n.$$set=m=>{e=je(je({},e),Ut(m)),t(3,l=lt(e,i)),"value"in m&&t(0,s=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof s!==void 0&&u()},[s,r,f,l,o,c,d]}class eP extends ye{constructor(e){super(),be(this,e,xA,QA,_e,{value:0,maxHeight:4})}}function tP(n){let e,t,i,l,s;e=new ti({props:{uniqueId:n[6],field:n[1]}});function o(a){n[5](a)}let r={id:n[6],required:n[3],placeholder:n[2]?"Leave empty to autogenerate...":""};return n[0]!==void 0&&(r.value=n[0]),i=new eP({props:r}),ie.push(()=>ve(i,"value",o)),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment)},m(a,u){F(e,a,u),v(a,t,u),F(i,a,u),s=!0},p(a,u){const f={};u&64&&(f.uniqueId=a[6]),u&2&&(f.field=a[1]),e.$set(f);const c={};u&64&&(c.id=a[6]),u&8&&(c.required=a[3]),u&4&&(c.placeholder=a[2]?"Leave empty to autogenerate...":""),!l&&u&1&&(l=!0,c.value=a[0],$e(()=>l=!1)),i.$set(c)},i(a){s||(O(e.$$.fragment,a),O(i.$$.fragment,a),s=!0)},o(a){D(e.$$.fragment,a),D(i.$$.fragment,a),s=!1},d(a){a&&k(t),q(e,a),q(i,a)}}}function nP(n){let e,t;return e=new fe({props:{class:"form-field "+(n[3]?"required":""),name:n[1].name,$$slots:{default:[tP,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&8&&(s.class="form-field "+(i[3]?"required":"")),l&2&&(s.name=i[1].name),l&207&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function iP(n,e,t){let i,l,{original:s}=e,{field:o}=e,{value:r=void 0}=e;function a(u){r=u,t(0,r)}return n.$$set=u=>{"original"in u&&t(4,s=u.original),"field"in u&&t(1,o=u.field),"value"in u&&t(0,r=u.value)},n.$$.update=()=>{n.$$.dirty&18&&t(2,i=!z.isEmpty(o.autogeneratePattern)&&!(s!=null&&s.id)),n.$$.dirty&6&&t(3,l=o.required&&!i)},[r,o,i,l,s,a]}class lP extends ye{constructor(e){super(),be(this,e,iP,nP,_e,{original:4,field:1,value:0})}}function sP(n){let e,t,i,l,s,o,r,a;return e=new ti({props:{uniqueId:n[3],field:n[1]}}),{c(){H(e.$$.fragment),t=C(),i=b("input"),p(i,"type","url"),p(i,"id",l=n[3]),i.required=s=n[1].required},m(u,f){F(e,u,f),v(u,t,f),v(u,i,f),ce(i,n[0]),o=!0,r||(a=B(i,"input",n[2]),r=!0)},p(u,f){const c={};f&8&&(c.uniqueId=u[3]),f&2&&(c.field=u[1]),e.$set(c),(!o||f&8&&l!==(l=u[3]))&&p(i,"id",l),(!o||f&2&&s!==(s=u[1].required))&&(i.required=s),f&1&&i.value!==u[0]&&ce(i,u[0])},i(u){o||(O(e.$$.fragment,u),o=!0)},o(u){D(e.$$.fragment,u),o=!1},d(u){u&&(k(t),k(i)),q(e,u),r=!1,a()}}}function oP(n){let e,t;return e=new fe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[sP,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&2&&(s.class="form-field "+(i[1].required?"required":"")),l&2&&(s.name=i[1].name),l&27&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function rP(n,e,t){let{field:i}=e,{value:l=void 0}=e;function s(){l=this.value,t(0,l)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,l=o.value)},[l,i,s]}class aP extends ye{constructor(e){super(),be(this,e,rP,oP,_e,{field:1,value:0})}}function Og(n,e,t){const i=n.slice();return i[6]=e[t],i}function Eg(n,e,t){const i=n.slice();return i[6]=e[t],i}function Mg(n,e){let t,i,l=e[6].title+"",s,o,r,a;function u(){return e[5](e[6])}return{key:n,first:null,c(){t=b("button"),i=b("div"),s=Y(l),o=C(),p(i,"class","txt"),p(t,"class","tab-item svelte-1maocj6"),Q(t,"active",e[1]===e[6].language),this.first=t},m(f,c){v(f,t,c),w(t,i),w(i,s),w(t,o),r||(a=B(t,"click",u),r=!0)},p(f,c){e=f,c&4&&l!==(l=e[6].title+"")&&ue(s,l),c&6&&Q(t,"active",e[1]===e[6].language)},d(f){f&&k(t),r=!1,a()}}}function Dg(n,e){let t,i,l,s,o,r,a=e[6].title+"",u,f,c,d,m;return i=new Qu({props:{language:e[6].language,content:e[6].content}}),{key:n,first:null,c(){t=b("div"),H(i.$$.fragment),l=C(),s=b("div"),o=b("em"),r=b("a"),u=Y(a),f=Y(" SDK"),d=C(),p(r,"href",c=e[6].url),p(r,"target","_blank"),p(r,"rel","noopener noreferrer"),p(o,"class","txt-sm txt-hint"),p(s,"class","txt-right"),p(t,"class","tab-item svelte-1maocj6"),Q(t,"active",e[1]===e[6].language),this.first=t},m(h,g){v(h,t,g),F(i,t,null),w(t,l),w(t,s),w(s,o),w(o,r),w(r,u),w(r,f),w(t,d),m=!0},p(h,g){e=h;const _={};g&4&&(_.language=e[6].language),g&4&&(_.content=e[6].content),i.$set(_),(!m||g&4)&&a!==(a=e[6].title+"")&&ue(u,a),(!m||g&4&&c!==(c=e[6].url))&&p(r,"href",c),(!m||g&6)&&Q(t,"active",e[1]===e[6].language)},i(h){m||(O(i.$$.fragment,h),m=!0)},o(h){D(i.$$.fragment,h),m=!1},d(h){h&&k(t),q(i)}}}function uP(n){let e,t,i=[],l=new Map,s,o,r=[],a=new Map,u,f,c=pe(n[2]);const d=g=>g[6].language;for(let g=0;gg[6].language;for(let g=0;gt(1,r=u.language);return n.$$set=u=>{"class"in u&&t(0,l=u.class),"js"in u&&t(3,s=u.js),"dart"in u&&t(4,o=u.dart)},n.$$.update=()=>{n.$$.dirty&2&&r&&localStorage.setItem(Ig,r),n.$$.dirty&24&&t(2,i=[{title:"JavaScript",language:"javascript",content:s,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:o,url:"https://github.com/pocketbase/dart-sdk"}])},[l,r,i,s,o,a]}class cP extends ye{constructor(e){super(),be(this,e,fP,uP,_e,{class:0,js:3,dart:4})}}function dP(n){let e,t,i,l,s=z.displayValue(n[1])+"",o,r,a,u,f,c,d;return u=new fe({props:{class:"form-field m-b-0 m-t-sm",name:"duration",$$slots:{default:[mP,({uniqueId:m})=>({20:m}),({uniqueId:m})=>m?1048576:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),t=b("p"),i=Y(`Generate a non-refreshable auth token for `),l=b("strong"),o=Y(s),r=Y(":"),a=C(),H(u.$$.fragment),p(e,"id",n[8])},m(m,h){v(m,e,h),w(e,t),w(t,i),w(t,l),w(l,o),w(l,r),w(e,a),F(u,e,null),f=!0,c||(d=B(e,"submit",tt(n[9])),c=!0)},p(m,h){(!f||h&2)&&s!==(s=z.displayValue(m[1])+"")&&ue(o,s);const g={};h&3145761&&(g.$$scope={dirty:h,ctx:m}),u.$set(g)},i(m){f||(O(u.$$.fragment,m),f=!0)},o(m){D(u.$$.fragment,m),f=!1},d(m){m&&k(e),q(u),c=!1,d()}}}function pP(n){let e,t,i,l=n[3].authStore.token+"",s,o,r,a,u,f;return r=new ai({props:{value:n[3].authStore.token}}),u=new cP({props:{js:` import PocketBase from 'pocketbase'; @@ -198,4 +198,4 @@ Do you really want to upload "${m.name}"?`,()=>{u(m)},()=>{r()})}async function `),T=b("a"),T.textContent=`s5cmd `,$=Y(", etc."),E=C(),M=b("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(s,"class","content"),p(t,"class","alert alert-warning m-0"),p(M,"class","clearfix m-t-base")},m(P,R){v(P,e,R),w(e,t),w(t,i),w(t,l),w(t,s),w(s,o),w(s,r),w(r,u),w(s,f),w(s,c),w(c,m),w(s,h),w(s,g),w(s,_),w(s,y),w(s,S),w(s,T),w(s,$),w(e,E),w(e,M),I=!0},p(P,R){var N;(!I||R&1)&&a!==(a=(N=P[0].s3)!=null&&N.enabled?"S3 storage":"local file system")&&ue(u,a),(!I||R&2)&&d!==(d=P[1].s3.enabled?"S3 storage":"local file system")&&ue(m,d)},i(P){I||(P&&nt(()=>{I&&(L||(L=ze(e,wt,{duration:150},!0)),L.run(1))}),I=!0)},o(P){P&&(L||(L=ze(e,wt,{duration:150},!1)),L.run(0)),I=!1},d(P){P&&k(e),P&&L&&L.end()}}}function oF(n){var i;let e,t=((i=n[0].s3)==null?void 0:i.enabled)!=n[1].s3.enabled&&vb(n);return{c(){t&&t.c(),e=ge()},m(l,s){t&&t.m(l,s),v(l,e,s)},p(l,s){var o;((o=l[0].s3)==null?void 0:o.enabled)!=l[1].s3.enabled?t?(t.p(l,s),s&3&&O(t,1)):(t=vb(l),t.c(),O(t,1),t.m(e.parentNode,e)):t&&(re(),D(t,1,1,()=>{t=null}),ae())},d(l){l&&k(e),t&&t.d(l)}}}function wb(n){let e;function t(s,o){return s[4]?uF:s[5]?aF:rF}let i=t(n),l=i(n);return{c(){l.c(),e=ge()},m(s,o){l.m(s,o),v(s,e,o)},p(s,o){i===(i=t(s))&&l?l.p(s,o):(l.d(1),l=i(s),l&&(l.c(),l.m(e.parentNode,e)))},d(s){s&&k(e),l.d(s)}}}function rF(n){let e;return{c(){e=b("div"),e.innerHTML=' S3 connected successfully',p(e,"class","label label-sm label-success entrance-right")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function aF(n){let e,t,i,l;return{c(){e=b("div"),e.innerHTML=' Failed to establish S3 connection',p(e,"class","label label-sm label-warning entrance-right")},m(s,o){var r;v(s,e,o),i||(l=Me(t=He.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(s,o){var r;t&&Rt(t.update)&&o&32&&t.update.call(null,(r=s[5].data)==null?void 0:r.message)},d(s){s&&k(e),i=!1,l()}}}function uF(n){let e;return{c(){e=b("span"),p(e,"class","loader loader-sm")},m(t,i){v(t,e,i)},p:te,d(t){t&&k(e)}}}function Sb(n){let e,t,i,l;return{c(){e=b("button"),t=b("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(s,o){v(s,e,o),w(e,t),i||(l=B(e,"click",n[14]),i=!0)},p(s,o){o&8&&(e.disabled=s[3])},d(s){s&&k(e),i=!1,l()}}}function fF(n){let e,t,i,l,s,o,r,a,u,f,c,d,m,h,g,_;const y=[sF,lF],S=[];function T($,E){return $[2]?0:1}return d=T(n),m=S[d]=y[d](n),{c(){e=b("header"),t=b("nav"),i=b("div"),i.textContent="Settings",l=C(),s=b("div"),o=Y(n[7]),r=C(),a=b("div"),u=b("form"),f=b("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=C(),m.c(),p(i,"class","breadcrumb-item"),p(s,"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($,E){v($,e,E),w(e,t),w(t,i),w(t,l),w(t,s),w(s,o),v($,r,E),v($,a,E),w(a,u),w(u,f),w(u,c),S[d].m(u,null),h=!0,g||(_=B(u,"submit",tt(n[16])),g=!0)},p($,E){(!h||E&128)&&ue(o,$[7]);let M=d;d=T($),d===M?S[d].p($,E):(re(),D(S[M],1,1,()=>{S[M]=null}),ae(),m=S[d],m?m.p($,E):(m=S[d]=y[d]($),m.c()),O(m,1),m.m(u,null))},i($){h||(O(m),h=!0)},o($){D(m),h=!1},d($){$&&(k(e),k(r),k(a)),S[d].d(),g=!1,_()}}}function cF(n){let e,t,i,l;return e=new ps({}),i=new di({props:{$$slots:{default:[fF]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=C(),H(i.$$.fragment)},m(s,o){F(e,s,o),v(s,t,o),F(i,s,o),l=!0},p(s,[o]){const r={};o&524543&&(r.$$scope={dirty:o,ctx:s}),i.$set(r)},i(s){l||(O(e.$$.fragment,s),O(i.$$.fragment,s),l=!0)},o(s){D(e.$$.fragment,s),D(i.$$.fragment,s),l=!1},d(s){s&&k(t),q(e,s),q(i,s)}}}const dF="s3_test_request";function pF(n,e,t){let i,l,s;Qe(n,cn,M=>t(7,s=M)),Nn(cn,s="Files storage",s);let o={},r={},a=!1,u=!1,f=!1,c=null;d();async function d(){t(2,a=!0);try{const M=await me.settings.getAll()||{};h(M)}catch(M){me.error(M)}t(2,a=!1)}async function m(){if(!(u||!l)){t(3,u=!0);try{me.cancelRequest(dF);const M=await me.settings.update(z.filterRedactedProps(r));Wt({}),await h(M),Ds(),c?sw("Successfully saved but failed to establish S3 connection."):tn("Successfully saved files storage settings.")}catch(M){me.error(M)}t(3,u=!1)}}async function h(M={}){t(1,r={s3:(M==null?void 0:M.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r)))}async function g(){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=()=>g(),$=()=>m(),E=()=>m();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,l=i!=JSON.stringify(r))},[o,r,a,u,f,c,l,s,m,g,i,_,y,S,T,$,E]}class mF extends ye{constructor(e){super(),be(this,e,pF,cF,_e,{})}}function Tb(n){let e,t,i,l,s;return{c(){e=Y("("),t=Y(n[1]),i=Y("/"),l=Y(n[2]),s=Y(")")},m(o,r){v(o,e,r),v(o,t,r),v(o,i,r),v(o,l,r),v(o,s,r)},p(o,r){r&2&&ue(t,o[1]),r&4&&ue(l,o[2])},d(o){o&&(k(e),k(t),k(i),k(l),k(s))}}}function hF(n){let e,t,i,l;const s=[yF,bF],o=[];function r(a,u){return a[4]?1:0}return e=r(n),t=o[e]=s[e](n),{c(){t.c(),i=ge()},m(a,u){o[e].m(a,u),v(a,i,u),l=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),D(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=s[e](a),t.c()),O(t,1),t.m(i.parentNode,i))},i(a){l||(O(t),l=!0)},o(a){D(t),l=!1},d(a){a&&k(i),o[e].d(a)}}}function _F(n){let e,t,i,l,s,o,r,a=n[2]>1?"Next":"Login",u,f,c,d,m,h;return t=new fe({props:{class:"form-field required",name:"identity",$$slots:{default:[wF,({uniqueId:g})=>({25:g}),({uniqueId:g})=>g?33554432:0]},$$scope:{ctx:n}}}),l=new fe({props:{class:"form-field required",name:"password",$$slots:{default:[SF,({uniqueId:g})=>({25:g}),({uniqueId:g})=>g?33554432:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),H(t.$$.fragment),i=C(),H(l.$$.fragment),s=C(),o=b("button"),r=b("span"),u=Y(a),f=C(),c=b("i"),p(r,"class","txt"),p(c,"class","ri-arrow-right-line"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block btn-next"),Q(o,"btn-disabled",n[7]),Q(o,"btn-loading",n[7]),p(e,"class","block")},m(g,_){v(g,e,_),F(t,e,null),w(e,i),F(l,e,null),w(e,s),w(e,o),w(o,r),w(r,u),w(o,f),w(o,c),d=!0,m||(h=B(e,"submit",tt(n[13])),m=!0)},p(g,_){const y={};_&100663329&&(y.$$scope={dirty:_,ctx:g}),t.$set(y);const S={};_&100663360&&(S.$$scope={dirty:_,ctx:g}),l.$set(S),(!d||_&4)&&a!==(a=g[2]>1?"Next":"Login")&&ue(u,a),(!d||_&128)&&Q(o,"btn-disabled",g[7]),(!d||_&128)&&Q(o,"btn-loading",g[7])},i(g){d||(O(t.$$.fragment,g),O(l.$$.fragment,g),d=!0)},o(g){D(t.$$.fragment,g),D(l.$$.fragment,g),d=!1},d(g){g&&k(e),q(t),q(l),m=!1,h()}}}function gF(n){let e;return{c(){e=b("div"),e.innerHTML='',p(e,"class","block txt-center")},m(t,i){v(t,e,i)},p:te,i:te,o:te,d(t){t&&k(e)}}}function bF(n){let e,t,i,l,s,o,r,a,u,f,c,d,m=n[11]&&$b(n);return i=new fe({props:{class:"form-field required",name:"password",$$slots:{default:[kF,({uniqueId:h})=>({25:h}),({uniqueId:h})=>h?33554432:0]},$$scope:{ctx:n}}}),{c(){m&&m.c(),e=C(),t=b("form"),H(i.$$.fragment),l=C(),s=b("button"),s.innerHTML='Login ',o=C(),r=b("div"),a=b("button"),u=Y("Request another OTP"),p(s,"type","submit"),p(s,"class","btn btn-lg btn-block btn-next"),Q(s,"btn-disabled",n[9]),Q(s,"btn-loading",n[9]),p(t,"class","block"),p(a,"type","button"),p(a,"class","link-hint"),a.disabled=n[9],p(r,"class","content txt-center m-t-sm")},m(h,g){m&&m.m(h,g),v(h,e,g),v(h,t,g),F(i,t,null),w(t,l),w(t,s),v(h,o,g),v(h,r,g),w(r,a),w(a,u),f=!0,c||(d=[B(t,"submit",tt(n[15])),B(a,"click",n[20])],c=!0)},p(h,g){h[11]?m?m.p(h,g):(m=$b(h),m.c(),m.m(e.parentNode,e)):m&&(m.d(1),m=null);const _={};g&100667392&&(_.$$scope={dirty:g,ctx:h}),i.$set(_),(!f||g&512)&&Q(s,"btn-disabled",h[9]),(!f||g&512)&&Q(s,"btn-loading",h[9]),(!f||g&512)&&(a.disabled=h[9])},i(h){f||(O(i.$$.fragment,h),f=!0)},o(h){D(i.$$.fragment,h),f=!1},d(h){h&&(k(e),k(t),k(o),k(r)),m&&m.d(h),q(i),c=!1,De(d)}}}function yF(n){let e,t,i,l,s,o,r;return t=new fe({props:{class:"form-field required",name:"email",$$slots:{default:[vF,({uniqueId:a})=>({25:a}),({uniqueId:a})=>a?33554432:0]},$$scope:{ctx:n}}}),{c(){e=b("form"),H(t.$$.fragment),i=C(),l=b("button"),l.innerHTML=' Send OTP',p(l,"type","submit"),p(l,"class","btn btn-lg btn-block btn-next"),Q(l,"btn-disabled",n[8]),Q(l,"btn-loading",n[8]),p(e,"class","block")},m(a,u){v(a,e,u),F(t,e,null),w(e,i),w(e,l),s=!0,o||(r=B(e,"submit",tt(n[14])),o=!0)},p(a,u){const f={};u&100665344&&(f.$$scope={dirty:u,ctx:a}),t.$set(f),(!s||u&256)&&Q(l,"btn-disabled",a[8]),(!s||u&256)&&Q(l,"btn-loading",a[8])},i(a){s||(O(t.$$.fragment,a),s=!0)},o(a){D(t.$$.fragment,a),s=!1},d(a){a&&k(e),q(t),o=!1,r()}}}function $b(n){let e,t,i,l,s,o;return{c(){e=b("div"),t=b("p"),i=Y("Check your "),l=b("strong"),s=Y(n[11]),o=Y(` inbox and enter in the input below the received One-time password (OTP).`),p(e,"class","content txt-center m-b-sm")},m(r,a){v(r,e,a),w(e,t),w(t,i),w(t,l),w(l,s),w(t,o)},p(r,a){a&2048&&ue(s,r[11])},d(r){r&&k(e)}}}function kF(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("One-time password"),l=C(),s=b("input"),p(e,"for",i=n[25]),p(s,"type","password"),p(s,"id",o=n[25]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[12]),r||(a=B(s,"input",n[19]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(s,"id",o),f&4096&&s.value!==u[12]&&ce(s,u[12])},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function vF(n){let e,t,i,l,s,o,r,a;return{c(){e=b("label"),t=Y("Email"),l=C(),s=b("input"),p(e,"for",i=n[25]),p(s,"type","email"),p(s,"id",o=n[25]),s.required=!0},m(u,f){v(u,e,f),w(e,t),v(u,l,f),v(u,s,f),ce(s,n[11]),r||(a=B(s,"input",n[18]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(s,"id",o),f&2048&&s.value!==u[11]&&ce(s,u[11])},d(u){u&&(k(e),k(l),k(s)),r=!1,a()}}}function wF(n){let e,t=z.sentenize(n[0].password.identityFields.join(" or "),!1)+"",i,l,s,o,r,a,u,f;return{c(){e=b("label"),i=Y(t),s=C(),o=b("input"),p(e,"for",l=n[25]),p(o,"id",r=n[25]),p(o,"type",a=n[0].password.identityFields.length==1&&n[0].password.identityFields[0]=="email"?"email":"text"),o.value=n[5],o.required=!0,o.autofocus=!0},m(c,d){v(c,e,d),w(e,i),v(c,s,d),v(c,o,d),o.focus(),u||(f=B(o,"input",n[16]),u=!0)},p(c,d){d&1&&t!==(t=z.sentenize(c[0].password.identityFields.join(" or "),!1)+"")&&ue(i,t),d&33554432&&l!==(l=c[25])&&p(e,"for",l),d&33554432&&r!==(r=c[25])&&p(o,"id",r),d&1&&a!==(a=c[0].password.identityFields.length==1&&c[0].password.identityFields[0]=="email"?"email":"text")&&p(o,"type",a),d&32&&o.value!==c[5]&&(o.value=c[5])},d(c){c&&(k(e),k(s),k(o)),u=!1,f()}}}function SF(n){let e,t,i,l,s,o,r,a,u,f,c;return{c(){e=b("label"),t=Y("Password"),l=C(),s=b("input"),r=C(),a=b("div"),u=b("a"),u.textContent="Forgotten password?",p(e,"for",i=n[25]),p(s,"type","password"),p(s,"id",o=n[25]),s.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,m){v(d,e,m),w(e,t),v(d,l,m),v(d,s,m),ce(s,n[6]),v(d,r,m),v(d,a,m),w(a,u),f||(c=[B(s,"input",n[17]),Me(Un.call(null,u))],f=!0)},p(d,m){m&33554432&&i!==(i=d[25])&&p(e,"for",i),m&33554432&&o!==(o=d[25])&&p(s,"id",o),m&64&&s.value!==d[6]&&ce(s,d[6])},d(d){d&&(k(e),k(l),k(s),k(r),k(a)),f=!1,De(c)}}}function TF(n){let e,t,i,l,s,o,r,a,u=n[2]>1&&Tb(n);const f=[gF,_F,hF],c=[];function d(m,h){return m[10]?0:m[0].password.enabled&&!m[3]?1:m[0].otp.enabled?2:-1}return~(s=d(n))&&(o=c[s]=f[s](n)),{c(){e=b("div"),t=b("h4"),i=Y(`Superuser login - `),u&&u.c(),l=C(),o&&o.c(),r=ge(),p(e,"class","content txt-center m-b-base")},m(m,h){v(m,e,h),w(e,t),w(t,i),u&&u.m(t,null),v(m,l,h),~s&&c[s].m(m,h),v(m,r,h),a=!0},p(m,h){m[2]>1?u?u.p(m,h):(u=Tb(m),u.c(),u.m(t,null)):u&&(u.d(1),u=null);let g=s;s=d(m),s===g?~s&&c[s].p(m,h):(o&&(re(),D(c[g],1,1,()=>{c[g]=null}),ae()),~s?(o=c[s],o?o.p(m,h):(o=c[s]=f[s](m),o.c()),O(o,1),o.m(r.parentNode,r)):o=null)},i(m){a||(O(o),a=!0)},o(m){D(o),a=!1},d(m){m&&(k(e),k(l),k(r)),u&&u.d(),~s&&c[s].d(m)}}}function $F(n){let e,t;return e=new ny({props:{$$slots:{default:[TF]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&67117055&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function CF(n,e,t){let i;Qe(n,Lu,N=>t(22,i=N));const l=new URLSearchParams(i);let s=l.get("demoEmail")||"",o=l.get("demoPassword")||"",r={},a=1,u=1,f=!1,c=!1,d=!1,m=!1,h="",g="",_="",y="",S="";T();async function T(){if(!m){t(10,m=!0);try{t(0,r=await me.collection("_superusers").listAuthMethods())}catch(N){me.error(N)}t(10,m=!1)}}async function $(){var N,U;if(!f){t(7,f=!0);try{await me.collection("_superusers").authWithPassword(s,o),Ds(),Wt({}),Il("/")}catch(j){j.status==401?(t(3,h=j.response.mfaId),((U=(N=r==null?void 0:r.password)==null?void 0:N.identityFields)==null?void 0:U.length)==1&&r.password.identityFields[0]=="email"?(t(11,y=s),await E()):/^[^@\s]+@[^@\s]+$/.test(s)&&t(11,y=s)):j.status!=400?me.error(j):$i("Invalid login credentials.")}t(7,f=!1)}}async function E(){if(!c){t(8,c=!0);try{const N=await me.collection("_superusers").requestOTP(y);t(4,g=N.otpId),_=g,Ds(),Wt({})}catch(N){N.status==429&&t(4,g=_),me.error(N)}t(8,c=!1)}}async function M(){if(!d){t(9,d=!0);try{await me.collection("_superusers").authWithOTP(g,S,{mfaId:h}),Ds(),Wt({}),Il("/")}catch(N){me.error(N)}t(9,d=!1)}}const L=N=>{t(5,s=N.target.value)};function I(){o=this.value,t(6,o)}function A(){y=this.value,t(11,y)}function P(){S=this.value,t(12,S)}const R=()=>{t(4,g="")};return n.$$.update=()=>{var N,U;n.$$.dirty&31&&(t(2,u=1),t(1,a=1),(N=r==null?void 0:r.mfa)!=null&&N.enabled&&t(2,u++,u),(U=r==null?void 0:r.otp)!=null&&U.enabled&&t(2,u++,u),h!=""&&t(1,a++,a),g!=""&&t(1,a++,a))},[r,a,u,h,g,s,o,f,c,d,m,y,S,$,E,M,L,I,A,P,R]}class OF extends ye{constructor(e){super(),be(this,e,CF,$F,_e,{})}}function Qt(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{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("pbinstal")?Il("/"):!0}],EF={"/login":Qt({component:OF,conditions:on.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Qt({asyncComponent:()=>Ot(()=>import("./PageSuperuserRequestPasswordReset-iIU1ycYV.js"),[],import.meta.url),conditions:on.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageSuperuserConfirmPasswordReset-SPZ-Z11R.js"),[],import.meta.url),conditions:on.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Qt({component:wN,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Qt({component:b5,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Qt({component:_7,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Qt({component:iF,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Qt({component:mF,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Qt({component:gR,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Qt({component:FR,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/backups":Qt({component:uR,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmPasswordReset-C0yys8jP.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmPasswordReset-C0yys8jP.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmVerification-023ljtqb.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmVerification-023ljtqb.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmEmailChange-2xgz6XzW.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmEmailChange-2xgz6XzW.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect-success":Qt({asyncComponent:()=>Ot(()=>import("./PageOAuth2RedirectSuccess-B2_MFcf4.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect-failure":Qt({asyncComponent:()=>Ot(()=>import("./PageOAuth2RedirectFailure-CsvBf-xw.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"*":Qt({component:a3,userData:{showAppSidebar:!1}})};function MF(n){let e;return{c(){e=b("link"),p(e,"rel","shortcut icon"),p(e,"type","image/png"),p(e,"href","./images/favicon/favicon_prod.png")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function Cb(n){let e,t,i,l,s,o,r,a,u,f,c,d,m=z.getInitials(n[0].email)+"",h,g,_,y,S,T,$;return _=new Hn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[DF]},$$scope:{ctx:n}}}),{c(){e=b("aside"),t=b("a"),t.innerHTML='PocketBase logo',i=C(),l=b("nav"),s=b("a"),s.innerHTML='',o=C(),r=b("a"),r.innerHTML='',a=C(),u=b("a"),u.innerHTML='',f=C(),c=b("div"),d=b("span"),h=Y(m),g=C(),H(_.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(s,"href","/collections"),p(s,"class","menu-item"),p(s,"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(l,"class","main-menu"),p(d,"class","initials"),p(c,"tabindex","0"),p(c,"role","button"),p(c,"aria-label","Logged superuser menu"),p(c,"class","thumb thumb-circle link-hint"),p(c,"title",y=n[0].email),p(e,"class","app-sidebar")},m(E,M){v(E,e,M),w(e,t),w(e,i),w(e,l),w(l,s),w(l,o),w(l,r),w(l,a),w(l,u),w(e,f),w(e,c),w(c,d),w(d,h),w(c,g),F(_,c,null),S=!0,T||($=[Me(Un.call(null,t)),Me(Un.call(null,s)),Me(Ri.call(null,s,{path:"/collections/?.*",className:"current-route"})),Me(He.call(null,s,{text:"Collections",position:"right"})),Me(Un.call(null,r)),Me(Ri.call(null,r,{path:"/logs/?.*",className:"current-route"})),Me(He.call(null,r,{text:"Logs",position:"right"})),Me(Un.call(null,u)),Me(Ri.call(null,u,{path:"/settings/?.*",className:"current-route"})),Me(He.call(null,u,{text:"Settings",position:"right"}))],T=!0)},p(E,M){(!S||M&1)&&m!==(m=z.getInitials(E[0].email)+"")&&ue(h,m);const L={};M&4097&&(L.$$scope={dirty:M,ctx:E}),_.$set(L),(!S||M&1&&y!==(y=E[0].email))&&p(c,"title",y)},i(E){S||(O(_.$$.fragment,E),S=!0)},o(E){D(_.$$.fragment,E),S=!1},d(E){E&&k(e),q(_),T=!1,De($)}}}function DF(n){let e,t=n[0].email+"",i,l,s,o,r,a,u,f,c,d;return{c(){e=b("div"),i=Y(t),s=C(),o=b("hr"),r=C(),a=b("a"),a.innerHTML=' Manage superusers',u=C(),f=b("button"),f.innerHTML=' Logout',p(e,"class","txt-ellipsis current-superuser svelte-1ahgi3o"),p(e,"title",l=n[0].email),p(a,"href","/collections?collectionId=_pbc_3323866339"),p(a,"class","dropdown-item closable"),p(a,"role","menuitem"),p(f,"type","button"),p(f,"class","dropdown-item closable"),p(f,"role","menuitem")},m(m,h){v(m,e,h),w(e,i),v(m,s,h),v(m,o,h),v(m,r,h),v(m,a,h),v(m,u,h),v(m,f,h),c||(d=[Me(Un.call(null,a)),B(f,"click",n[7])],c=!0)},p(m,h){h&1&&t!==(t=m[0].email+"")&&ue(i,t),h&1&&l!==(l=m[0].email)&&p(e,"title",l)},d(m){m&&(k(e),k(s),k(o),k(r),k(a),k(u),k(f)),c=!1,De(d)}}}function Ob(n){let e,t,i;return t=new Tu({props:{conf:z.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=b("div"),H(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(l,s){v(l,e,s),F(t,e,null),i=!0},p:te,i(l){i||(O(t.$$.fragment,l),i=!0)},o(l){D(t.$$.fragment,l),i=!1},d(l){l&&k(e),q(t)}}}function IF(n){var S;let e,t,i,l,s,o,r,a,u,f,c,d,m,h;document.title=e=z.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let g=window.location.protocol=="https:"&&MF(),_=((S=n[0])==null?void 0:S.id)&&n[1]&&Cb(n);r=new qw({props:{routes:EF}}),r.$on("routeLoading",n[5]),r.$on("conditionsFailed",n[6]),u=new dw({}),c=new X2({});let y=n[1]&&!n[2]&&Ob(n);return{c(){g&&g.c(),t=ge(),i=C(),l=b("div"),_&&_.c(),s=C(),o=b("div"),H(r.$$.fragment),a=C(),H(u.$$.fragment),f=C(),H(c.$$.fragment),d=C(),y&&y.c(),m=ge(),p(o,"class","app-body"),p(l,"class","app-layout")},m(T,$){g&&g.m(document.head,null),w(document.head,t),v(T,i,$),v(T,l,$),_&&_.m(l,null),w(l,s),w(l,o),F(r,o,null),w(o,a),F(u,o,null),v(T,f,$),F(c,T,$),v(T,d,$),y&&y.m(T,$),v(T,m,$),h=!0},p(T,[$]){var E;(!h||$&24)&&e!==(e=z.joinNonEmpty([T[4],T[3],"PocketBase"]," - "))&&(document.title=e),(E=T[0])!=null&&E.id&&T[1]?_?(_.p(T,$),$&3&&O(_,1)):(_=Cb(T),_.c(),O(_,1),_.m(l,s)):_&&(re(),D(_,1,1,()=>{_=null}),ae()),T[1]&&!T[2]?y?(y.p(T,$),$&6&&O(y,1)):(y=Ob(T),y.c(),O(y,1),y.m(m.parentNode,m)):y&&(re(),D(y,1,1,()=>{y=null}),ae())},i(T){h||(O(_),O(r.$$.fragment,T),O(u.$$.fragment,T),O(c.$$.fragment,T),O(y),h=!0)},o(T){D(_),D(r.$$.fragment,T),D(u.$$.fragment,T),D(c.$$.fragment,T),D(y),h=!1},d(T){T&&(k(i),k(l),k(f),k(d),k(m)),g&&g.d(T),k(t),_&&_.d(),q(r),q(u),q(c,T),y&&y.d(T)}}}function LF(n,e,t){let i,l,s,o;Qe(n,Dl,g=>t(10,i=g)),Qe(n,_r,g=>t(3,l=g)),Qe(n,Fr,g=>t(0,s=g)),Qe(n,cn,g=>t(4,o=g));let r,a=!1,u=!1;function f(g){var _,y,S,T;((_=g==null?void 0:g.detail)==null?void 0:_.location)!==r&&(t(1,a=!!((S=(y=g==null?void 0:g.detail)==null?void 0:y.userData)!=null&&S.showAppSidebar)),r=(T=g==null?void 0:g.detail)==null?void 0:T.location,Nn(cn,o="",o),Wt({}),B0())}function c(){Il("/")}async function d(){var g,_;if(s!=null&&s.id)try{const y=await me.settings.getAll({$cancelKey:"initialAppSettings"});Nn(_r,l=((g=y==null?void 0:y.meta)==null?void 0:g.appName)||"",l),Nn(Dl,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 m(){me.logout()}const h=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&s!=null&&s.id&&d()},[s,a,u,l,o,f,c,m,h]}class AF extends ye{constructor(e){super(),be(this,e,LF,IF,_e,{})}}new AF({target:document.getElementById("app")});export{De as A,tn as B,z as C,Il as D,ge as E,ny as F,fo as G,xl as H,Cu as I,Qe as J,Nn as K,Yt as L,cn as M,En as N,gt as O,ie as P,cP as Q,Qu as R,ye as S,pe as T,kt as U,ci as V,zt as W,pt as X,jt as Y,Tk as Z,D as a,C as b,H as c,q as d,b as e,p as f,v as g,w as h,be as i,Me as j,re as k,Un as l,F as m,ae as n,k as o,me as p,fe as q,Q as r,_e as s,O as t,B as u,tt as v,Y as w,ue as x,te as y,ce as z}; + `),u&&u.c(),l=C(),o&&o.c(),r=ge(),p(e,"class","content txt-center m-b-base")},m(m,h){v(m,e,h),w(e,t),w(t,i),u&&u.m(t,null),v(m,l,h),~s&&c[s].m(m,h),v(m,r,h),a=!0},p(m,h){m[2]>1?u?u.p(m,h):(u=Tb(m),u.c(),u.m(t,null)):u&&(u.d(1),u=null);let g=s;s=d(m),s===g?~s&&c[s].p(m,h):(o&&(re(),D(c[g],1,1,()=>{c[g]=null}),ae()),~s?(o=c[s],o?o.p(m,h):(o=c[s]=f[s](m),o.c()),O(o,1),o.m(r.parentNode,r)):o=null)},i(m){a||(O(o),a=!0)},o(m){D(o),a=!1},d(m){m&&(k(e),k(l),k(r)),u&&u.d(),~s&&c[s].d(m)}}}function $F(n){let e,t;return e=new ny({props:{$$slots:{default:[TF]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,l){F(e,i,l),t=!0},p(i,[l]){const s={};l&67117055&&(s.$$scope={dirty:l,ctx:i}),e.$set(s)},i(i){t||(O(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function CF(n,e,t){let i;Qe(n,Lu,N=>t(22,i=N));const l=new URLSearchParams(i);let s=l.get("demoEmail")||"",o=l.get("demoPassword")||"",r={},a=1,u=1,f=!1,c=!1,d=!1,m=!1,h="",g="",_="",y="",S="";T();async function T(){if(!m){t(10,m=!0);try{t(0,r=await me.collection("_superusers").listAuthMethods())}catch(N){me.error(N)}t(10,m=!1)}}async function $(){var N,U;if(!f){t(7,f=!0);try{await me.collection("_superusers").authWithPassword(s,o),Ds(),Wt({}),Il("/")}catch(j){j.status==401?(t(3,h=j.response.mfaId),((U=(N=r==null?void 0:r.password)==null?void 0:N.identityFields)==null?void 0:U.length)==1&&r.password.identityFields[0]=="email"?(t(11,y=s),await E()):/^[^@\s]+@[^@\s]+$/.test(s)&&t(11,y=s)):j.status!=400?me.error(j):$i("Invalid login credentials.")}t(7,f=!1)}}async function E(){if(!c){t(8,c=!0);try{const N=await me.collection("_superusers").requestOTP(y);t(4,g=N.otpId),_=g,Ds(),Wt({})}catch(N){N.status==429&&t(4,g=_),me.error(N)}t(8,c=!1)}}async function M(){if(!d){t(9,d=!0);try{await me.collection("_superusers").authWithOTP(g,S,{mfaId:h}),Ds(),Wt({}),Il("/")}catch(N){me.error(N)}t(9,d=!1)}}const L=N=>{t(5,s=N.target.value)};function I(){o=this.value,t(6,o)}function A(){y=this.value,t(11,y)}function P(){S=this.value,t(12,S)}const R=()=>{t(4,g="")};return n.$$.update=()=>{var N,U;n.$$.dirty&31&&(t(2,u=1),t(1,a=1),(N=r==null?void 0:r.mfa)!=null&&N.enabled&&t(2,u++,u),(U=r==null?void 0:r.otp)!=null&&U.enabled&&t(2,u++,u),h!=""&&t(1,a++,a),g!=""&&t(1,a++,a))},[r,a,u,h,g,s,o,f,c,d,m,y,S,$,E,M,L,I,A,P,R]}class OF extends ye{constructor(e){super(),be(this,e,CF,$F,_e,{})}}function Qt(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{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("pbinstal")?Il("/"):!0}],EF={"/login":Qt({component:OF,conditions:on.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Qt({asyncComponent:()=>Ot(()=>import("./PageSuperuserRequestPasswordReset-De00w0tH.js"),[],import.meta.url),conditions:on.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageSuperuserConfirmPasswordReset-BE5k30ZL.js"),[],import.meta.url),conditions:on.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Qt({component:wN,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Qt({component:b5,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Qt({component:_7,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Qt({component:iF,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Qt({component:mF,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Qt({component:gR,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Qt({component:FR,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/backups":Qt({component:uR,conditions:on.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmPasswordReset-D8TJqUdu.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmPasswordReset-D8TJqUdu.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmVerification-MDOT1GKu.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmVerification-MDOT1GKu.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmEmailChange-7Dltd5FX.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Qt({asyncComponent:()=>Ot(()=>import("./PageRecordConfirmEmailChange-7Dltd5FX.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect-success":Qt({asyncComponent:()=>Ot(()=>import("./PageOAuth2RedirectSuccess-DKf1ubte.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect-failure":Qt({asyncComponent:()=>Ot(()=>import("./PageOAuth2RedirectFailure-CGfeZrvO.js"),[],import.meta.url),conditions:on,userData:{showAppSidebar:!1}}),"*":Qt({component:a3,userData:{showAppSidebar:!1}})};function MF(n){let e;return{c(){e=b("link"),p(e,"rel","shortcut icon"),p(e,"type","image/png"),p(e,"href","./images/favicon/favicon_prod.png")},m(t,i){v(t,e,i)},d(t){t&&k(e)}}}function Cb(n){let e,t,i,l,s,o,r,a,u,f,c,d,m=z.getInitials(n[0].email)+"",h,g,_,y,S,T,$;return _=new Hn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[DF]},$$scope:{ctx:n}}}),{c(){e=b("aside"),t=b("a"),t.innerHTML='PocketBase logo',i=C(),l=b("nav"),s=b("a"),s.innerHTML='',o=C(),r=b("a"),r.innerHTML='',a=C(),u=b("a"),u.innerHTML='',f=C(),c=b("div"),d=b("span"),h=Y(m),g=C(),H(_.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(s,"href","/collections"),p(s,"class","menu-item"),p(s,"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(l,"class","main-menu"),p(d,"class","initials"),p(c,"tabindex","0"),p(c,"role","button"),p(c,"aria-label","Logged superuser menu"),p(c,"class","thumb thumb-circle link-hint"),p(c,"title",y=n[0].email),p(e,"class","app-sidebar")},m(E,M){v(E,e,M),w(e,t),w(e,i),w(e,l),w(l,s),w(l,o),w(l,r),w(l,a),w(l,u),w(e,f),w(e,c),w(c,d),w(d,h),w(c,g),F(_,c,null),S=!0,T||($=[Me(Un.call(null,t)),Me(Un.call(null,s)),Me(Ri.call(null,s,{path:"/collections/?.*",className:"current-route"})),Me(He.call(null,s,{text:"Collections",position:"right"})),Me(Un.call(null,r)),Me(Ri.call(null,r,{path:"/logs/?.*",className:"current-route"})),Me(He.call(null,r,{text:"Logs",position:"right"})),Me(Un.call(null,u)),Me(Ri.call(null,u,{path:"/settings/?.*",className:"current-route"})),Me(He.call(null,u,{text:"Settings",position:"right"}))],T=!0)},p(E,M){(!S||M&1)&&m!==(m=z.getInitials(E[0].email)+"")&&ue(h,m);const L={};M&4097&&(L.$$scope={dirty:M,ctx:E}),_.$set(L),(!S||M&1&&y!==(y=E[0].email))&&p(c,"title",y)},i(E){S||(O(_.$$.fragment,E),S=!0)},o(E){D(_.$$.fragment,E),S=!1},d(E){E&&k(e),q(_),T=!1,De($)}}}function DF(n){let e,t=n[0].email+"",i,l,s,o,r,a,u,f,c,d;return{c(){e=b("div"),i=Y(t),s=C(),o=b("hr"),r=C(),a=b("a"),a.innerHTML=' Manage superusers',u=C(),f=b("button"),f.innerHTML=' Logout',p(e,"class","txt-ellipsis current-superuser svelte-1ahgi3o"),p(e,"title",l=n[0].email),p(a,"href","/collections?collectionId=_pbc_3323866339"),p(a,"class","dropdown-item closable"),p(a,"role","menuitem"),p(f,"type","button"),p(f,"class","dropdown-item closable"),p(f,"role","menuitem")},m(m,h){v(m,e,h),w(e,i),v(m,s,h),v(m,o,h),v(m,r,h),v(m,a,h),v(m,u,h),v(m,f,h),c||(d=[Me(Un.call(null,a)),B(f,"click",n[7])],c=!0)},p(m,h){h&1&&t!==(t=m[0].email+"")&&ue(i,t),h&1&&l!==(l=m[0].email)&&p(e,"title",l)},d(m){m&&(k(e),k(s),k(o),k(r),k(a),k(u),k(f)),c=!1,De(d)}}}function Ob(n){let e,t,i;return t=new Tu({props:{conf:z.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=b("div"),H(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(l,s){v(l,e,s),F(t,e,null),i=!0},p:te,i(l){i||(O(t.$$.fragment,l),i=!0)},o(l){D(t.$$.fragment,l),i=!1},d(l){l&&k(e),q(t)}}}function IF(n){var S;let e,t,i,l,s,o,r,a,u,f,c,d,m,h;document.title=e=z.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let g=window.location.protocol=="https:"&&MF(),_=((S=n[0])==null?void 0:S.id)&&n[1]&&Cb(n);r=new qw({props:{routes:EF}}),r.$on("routeLoading",n[5]),r.$on("conditionsFailed",n[6]),u=new dw({}),c=new X2({});let y=n[1]&&!n[2]&&Ob(n);return{c(){g&&g.c(),t=ge(),i=C(),l=b("div"),_&&_.c(),s=C(),o=b("div"),H(r.$$.fragment),a=C(),H(u.$$.fragment),f=C(),H(c.$$.fragment),d=C(),y&&y.c(),m=ge(),p(o,"class","app-body"),p(l,"class","app-layout")},m(T,$){g&&g.m(document.head,null),w(document.head,t),v(T,i,$),v(T,l,$),_&&_.m(l,null),w(l,s),w(l,o),F(r,o,null),w(o,a),F(u,o,null),v(T,f,$),F(c,T,$),v(T,d,$),y&&y.m(T,$),v(T,m,$),h=!0},p(T,[$]){var E;(!h||$&24)&&e!==(e=z.joinNonEmpty([T[4],T[3],"PocketBase"]," - "))&&(document.title=e),(E=T[0])!=null&&E.id&&T[1]?_?(_.p(T,$),$&3&&O(_,1)):(_=Cb(T),_.c(),O(_,1),_.m(l,s)):_&&(re(),D(_,1,1,()=>{_=null}),ae()),T[1]&&!T[2]?y?(y.p(T,$),$&6&&O(y,1)):(y=Ob(T),y.c(),O(y,1),y.m(m.parentNode,m)):y&&(re(),D(y,1,1,()=>{y=null}),ae())},i(T){h||(O(_),O(r.$$.fragment,T),O(u.$$.fragment,T),O(c.$$.fragment,T),O(y),h=!0)},o(T){D(_),D(r.$$.fragment,T),D(u.$$.fragment,T),D(c.$$.fragment,T),D(y),h=!1},d(T){T&&(k(i),k(l),k(f),k(d),k(m)),g&&g.d(T),k(t),_&&_.d(),q(r),q(u),q(c,T),y&&y.d(T)}}}function LF(n,e,t){let i,l,s,o;Qe(n,Dl,g=>t(10,i=g)),Qe(n,_r,g=>t(3,l=g)),Qe(n,Fr,g=>t(0,s=g)),Qe(n,cn,g=>t(4,o=g));let r,a=!1,u=!1;function f(g){var _,y,S,T;((_=g==null?void 0:g.detail)==null?void 0:_.location)!==r&&(t(1,a=!!((S=(y=g==null?void 0:g.detail)==null?void 0:y.userData)!=null&&S.showAppSidebar)),r=(T=g==null?void 0:g.detail)==null?void 0:T.location,Nn(cn,o="",o),Wt({}),B0())}function c(){Il("/")}async function d(){var g,_;if(s!=null&&s.id)try{const y=await me.settings.getAll({$cancelKey:"initialAppSettings"});Nn(_r,l=((g=y==null?void 0:y.meta)==null?void 0:g.appName)||"",l),Nn(Dl,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 m(){me.logout()}const h=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&s!=null&&s.id&&d()},[s,a,u,l,o,f,c,m,h]}class AF extends ye{constructor(e){super(),be(this,e,LF,IF,_e,{})}}new AF({target:document.getElementById("app")});export{De as A,tn as B,z as C,Il as D,ge as E,ny as F,fo as G,xl as H,Cu as I,Qe as J,Nn as K,Yt as L,cn as M,En as N,gt as O,ie as P,cP as Q,Qu as R,ye as S,pe as T,kt as U,ci as V,zt as W,pt as X,jt as Y,Tk as Z,D as a,C as b,H as c,q as d,b as e,p as f,v as g,w as h,be as i,Me as j,re as k,Un as l,F as m,ae as n,k as o,me as p,fe as q,Q as r,_e as s,O as t,B as u,tt as v,Y as w,ue as x,te as y,ce as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 2bd382e3..3551611b 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -41,7 +41,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/src/components/base/CopyIcon.svelte b/ui/src/components/base/CopyIcon.svelte index 0584e6ed..795314cf 100644 --- a/ui/src/components/base/CopyIcon.svelte +++ b/ui/src/components/base/CopyIcon.svelte @@ -12,7 +12,7 @@ let copyTimeout; function copy() { - if (!value) { + if (CommonHelper.isEmpty(value)) { return; }