diff --git a/CHANGELOG.md b/CHANGELOG.md index e2540810..3f9226c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,21 @@ - Added `aria-label` to some of the buttons in the Admin UI for better accessibility ([#1702](https://github.com/pocketbase/pocketbase/pull/1702); thanks @ndarilek). +- Fixed `json` field plain string data normalizations and vizualization in the Admin UI ([#1703](https://github.com/pocketbase/pocketbase/issues/1703)). + + In order to support seamlessly both json and multipart/form-data request bodies, + the following normalization rules are applied for plain `json` field string values: + - "true" is converted to the json `true` + - "false" is converted to the json `false` + - "null" is converted to the json `null` + - "[1,2,3]" is converted to the json `[1,2,3]` + - "{\"a\":1,\"b\":2}" is converted to the json `{"a":1,"b":2}` + - numeric strings are converted to json number + - double quoted strings are left as they are (aka. without normalizations) + - any other string (empty string too) is double quoted + + Additionally, the "Nonempty" `json` field constraint now checks for `null`, `[]`, `{}` and `""` (empty string). + ## v0.11.4 diff --git a/forms/validators/record_data.go b/forms/validators/record_data.go index b867ac8e..feb60018 100644 --- a/forms/validators/record_data.go +++ b/forms/validators/record_data.go @@ -23,6 +23,7 @@ var requiredErr = validation.NewError("validation_required", "Missing required v // using the provided record constraints and schema. // // Example: +// // validator := NewRecordDataValidator(app.Dao(), record, nil) // err := validator.Validate(map[string]any{"test":123}) func NewRecordDataValidator( @@ -294,16 +295,22 @@ func (validator *RecordDataValidator) checkSelectValue(field *schema.SchemaField return nil } -func (validator *RecordDataValidator) checkJsonValue(field *schema.SchemaField, value any) error { - raw, _ := types.ParseJsonRaw(value) - if len(raw) == 0 { - return nil // nothing to check - } +var emptyJsonValues = []string{ + "null", `""`, "[]", "{}", +} +func (validator *RecordDataValidator) checkJsonValue(field *schema.SchemaField, value any) error { if is.JSON.Validate(value) != nil { return validation.NewError("validation_invalid_json", "Must be a valid json value") } + raw, _ := types.ParseJsonRaw(value) + rawStr := strings.TrimSpace(raw.String()) + + if field.Required && list.ExistInSlice(rawStr, emptyJsonValues) { + return requiredErr + } + return nil } diff --git a/forms/validators/record_data_test.go b/forms/validators/record_data_test.go index 204e9096..4820204f 100644 --- a/forms/validators/record_data_test.go +++ b/forms/validators/record_data_test.go @@ -965,7 +965,7 @@ func TestRecordDataValidatorValidateJson(t *testing.T) { "field3": []string{}, }, nil, - []string{}, + []string{"field2"}, }, { "(json) check required constraint - zero map", @@ -975,7 +975,7 @@ func TestRecordDataValidatorValidateJson(t *testing.T) { "field3": map[string]string{}, }, nil, - []string{}, + []string{"field2"}, }, { "(json) check unique constraint", @@ -988,14 +988,24 @@ func TestRecordDataValidatorValidateJson(t *testing.T) { []string{"field3"}, }, { - "(json) check json text validator", + "(json) check json text invalid obj, array and number normalizations", map[string]any{ - "field1": `[1, 2, 3`, - "field2": `invalid`, - "field3": `null`, // valid + "field1": `[1 2 3]`, + "field2": `{a: 123}`, + "field3": `123.456 abc`, }, nil, - []string{"field1", "field2"}, + []string{}, + }, + { + "(json) check json text reserved literals normalizations", + map[string]any{ + "field1": `true`, + "field2": `false`, + "field3": `null`, + }, + nil, + []string{}, }, { "(json) valid data - only required fields", diff --git a/models/record_test.go b/models/record_test.go index aa06b6d9..3cbe0740 100644 --- a/models/record_test.go +++ b/models/record_test.go @@ -961,7 +961,7 @@ func TestRecordUnmarshalJSONField(t *testing.T) { expectedJson string }{ {nil, testStr, true, `""`}, - {"", testStr, true, `""`}, + {"", testStr, false, `""`}, {1, testInt, false, `1`}, {true, testBool, false, `true`}, {[]int{1, 2, 3}, testSlice, false, `[1,2,3]`}, diff --git a/models/schema/schema_field.go b/models/schema/schema_field.go index 83bff77e..840402da 100644 --- a/models/schema/schema_field.go +++ b/models/schema/schema_field.go @@ -4,6 +4,7 @@ import ( "encoding/json" "errors" "regexp" + "strconv" validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" @@ -279,7 +280,35 @@ func (f *SchemaField) PrepareValue(value any) any { case FieldTypeText, FieldTypeEmail, FieldTypeUrl, FieldTypeEditor: return cast.ToString(value) case FieldTypeJson: - val, _ := types.ParseJsonRaw(value) + val := value + + if str, ok := val.(string); ok { + // in order to support seamlessly both json and multipart/form-data requests, + // the following normalization rules are applied for plain string values: + // - "true" is converted to the json `true` + // - "false" is converted to the json `false` + // - "null" is converted to the json `null` + // - "[1,2,3]" is converted to the json `[1,2,3]` + // - "{\"a\":1,\"b\":2}" is converted to the json `{"a":1,"b":2}` + // - numeric strings are converted to json number + // - double quoted strings are left as they are (aka. without normalizations) + // - any other string (empty string too) is double quoted + if str == "" { + val = strconv.Quote(str) + } else if str == "null" || str == "true" || str == "false" { + val = str + } else if ((str[0] >= '0' && str[0] <= '9') || + str[0] == '"' || + str[0] == '[' || + str[0] == '{') && + is.JSON.Validate(str) == nil { + val = str + } else { + val = strconv.Quote(str) + } + } + + val, _ = types.ParseJsonRaw(val) return val case FieldTypeNumber: return cast.ToFloat64(value) diff --git a/models/schema/schema_field_test.go b/models/schema/schema_field_test.go index eb50dcbe..4f10a503 100644 --- a/models/schema/schema_field_test.go +++ b/models/schema/schema_field_test.go @@ -571,7 +571,7 @@ func TestSchemaFieldPrepareValue(t *testing.T) { {schema.SchemaField{Type: schema.FieldTypeUrl}, "test", `"test"`}, {schema.SchemaField{Type: schema.FieldTypeUrl}, 123, `"123"`}, - // text + // editor {schema.SchemaField{Type: schema.FieldTypeEditor}, nil, `""`}, {schema.SchemaField{Type: schema.FieldTypeEditor}, "", `""`}, {schema.SchemaField{Type: schema.FieldTypeEditor}, []int{1, 2}, `""`}, @@ -580,10 +580,29 @@ func TestSchemaFieldPrepareValue(t *testing.T) { // json {schema.SchemaField{Type: schema.FieldTypeJson}, nil, "null"}, + {schema.SchemaField{Type: schema.FieldTypeJson}, "null", "null"}, {schema.SchemaField{Type: schema.FieldTypeJson}, 123, "123"}, + {schema.SchemaField{Type: schema.FieldTypeJson}, "123", "123"}, + {schema.SchemaField{Type: schema.FieldTypeJson}, 123.456, "123.456"}, + {schema.SchemaField{Type: schema.FieldTypeJson}, "123.456", "123.456"}, + {schema.SchemaField{Type: schema.FieldTypeJson}, "123.456 abc", `"123.456 abc"`}, // invalid numeric string + {schema.SchemaField{Type: schema.FieldTypeJson}, true, "true"}, + {schema.SchemaField{Type: schema.FieldTypeJson}, "true", "true"}, + {schema.SchemaField{Type: schema.FieldTypeJson}, false, "false"}, + {schema.SchemaField{Type: schema.FieldTypeJson}, "false", "false"}, + {schema.SchemaField{Type: schema.FieldTypeJson}, "", `""`}, + {schema.SchemaField{Type: schema.FieldTypeJson}, `test`, `"test"`}, {schema.SchemaField{Type: schema.FieldTypeJson}, `"test"`, `"test"`}, + {schema.SchemaField{Type: schema.FieldTypeJson}, `{test":1}`, `"{test\":1}"`}, // invalid object string + {schema.SchemaField{Type: schema.FieldTypeJson}, `[1 2 3]`, `"[1 2 3]"`}, // invalid array string + {schema.SchemaField{Type: schema.FieldTypeJson}, map[string]int{}, `{}`}, + {schema.SchemaField{Type: schema.FieldTypeJson}, `{}`, `{}`}, {schema.SchemaField{Type: schema.FieldTypeJson}, map[string]int{"test": 123}, `{"test":123}`}, + {schema.SchemaField{Type: schema.FieldTypeJson}, `{"test":123}`, `{"test":123}`}, + {schema.SchemaField{Type: schema.FieldTypeJson}, []int{}, `[]`}, + {schema.SchemaField{Type: schema.FieldTypeJson}, `[]`, `[]`}, {schema.SchemaField{Type: schema.FieldTypeJson}, []int{1, 2, 1}, `[1,2,1]`}, + {schema.SchemaField{Type: schema.FieldTypeJson}, `[1,2,1]`, `[1,2,1]`}, // number {schema.SchemaField{Type: schema.FieldTypeNumber}, nil, "0"}, diff --git a/ui/dist/assets/AuthMethodsDocs-73a44ae0.js b/ui/dist/assets/AuthMethodsDocs-dd62877b.js similarity index 98% rename from ui/dist/assets/AuthMethodsDocs-73a44ae0.js rename to ui/dist/assets/AuthMethodsDocs-dd62877b.js index cac3ea13..565f9ed7 100644 --- a/ui/dist/assets/AuthMethodsDocs-73a44ae0.js +++ b/ui/dist/assets/AuthMethodsDocs-dd62877b.js @@ -1,4 +1,4 @@ -import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as me,f as k,g as h,h as n,m as _e,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as m,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index-f60bef8b.js";import{S as Be}from"./SdkTabs-699e9ba9.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",_,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),_=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,_),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&m(o),i=!1,u()}}}function he(a,l){let o,s,_,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),me(s.$$.fragment),_=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),_e(s,o,null),n(o,_),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&m(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",_,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",E,x,I,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` +import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as me,f as k,g as h,h as n,m as _e,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as m,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index-353b753a.js";import{S as Be}from"./SdkTabs-ce9e2768.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",_,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),_=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,_),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&m(o),i=!1,u()}}}function he(a,l){let o,s,_,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),me(s.$$.fragment),_=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),_e(s,o,null),n(o,_),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&m(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",_,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",E,x,I,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/AuthRefreshDocs-9e893681.js b/ui/dist/assets/AuthRefreshDocs-8be41da1.js similarity index 98% rename from ui/dist/assets/AuthRefreshDocs-9e893681.js rename to ui/dist/assets/AuthRefreshDocs-8be41da1.js index 430aef75..6891cab7 100644 --- a/ui/dist/assets/AuthRefreshDocs-9e893681.js +++ b/ui/dist/assets/AuthRefreshDocs-8be41da1.js @@ -1,4 +1,4 @@ -import{S as ze,i as Ue,s as je,N as Ve,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,O as qe,P as xe,k as Je,Q as Ke,n as Qe,t as U,a as j,o as d,d as ie,R as Ie,C as He,p as We,r as x,u as Ge}from"./index-f60bef8b.js";import{S as Xe}from"./SdkTabs-699e9ba9.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,J,S,F,ce,L,M,de,K,N=r[0].name+"",Q,ue,pe,V,I,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:` +import{S as ze,i as Ue,s as je,N as Ve,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,O as qe,P as xe,k as Je,Q as Ke,n as Qe,t as U,a as j,o as d,d as ie,R as Ie,C as He,p as We,r as x,u as Ge}from"./index-353b753a.js";import{S as Xe}from"./SdkTabs-ce9e2768.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,J,S,F,ce,L,M,de,K,N=r[0].name+"",Q,ue,pe,V,I,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs-72588ee1.js b/ui/dist/assets/AuthWithOAuth2Docs-453f4216.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs-72588ee1.js rename to ui/dist/assets/AuthWithOAuth2Docs-453f4216.js index dadd5205..57af3785 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs-72588ee1.js +++ b/ui/dist/assets/AuthWithOAuth2Docs-453f4216.js @@ -1,4 +1,4 @@ -import{S as je,i as He,s as Je,N as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,O as Ve,P as Ne,k as Qe,Q as ze,n as Ke,t as j,a as H,o as c,d as ue,R as Ye,C as Be,p as Ge,r as J,u as Xe}from"./index-f60bef8b.js";import{S as Ze}from"./SdkTabs-699e9ba9.js";function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function Le(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,L,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,U,ie,A,V,S=[],Ae=new Map,Ee,B,w=[],Te=new Map,T;k=new Ze({props:{js:` +import{S as je,i as He,s as Je,N as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,O as Ve,P as Ne,k as Qe,Q as ze,n as Ke,t as j,a as H,o as c,d as ue,R as Ye,C as Be,p as Ge,r as J,u as Xe}from"./index-353b753a.js";import{S as Ze}from"./SdkTabs-ce9e2768.js";function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function Le(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,L,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,U,ie,A,V,S=[],Ae=new Map,Ee,B,w=[],Te=new Map,T;k=new Ze({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/AuthWithPasswordDocs-4c5271a0.js b/ui/dist/assets/AuthWithPasswordDocs-c74f48b9.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs-4c5271a0.js rename to ui/dist/assets/AuthWithPasswordDocs-c74f48b9.js index a1aa418e..df0f80a2 100644 --- a/ui/dist/assets/AuthWithPasswordDocs-4c5271a0.js +++ b/ui/dist/assets/AuthWithPasswordDocs-c74f48b9.js @@ -1,4 +1,4 @@ -import{S as Se,i as ve,s as we,N as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,O as ce,P as ye,k as ge,Q as Pe,n as Re,t as tt,a as et,o as c,d as Ut,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index-f60bef8b.js";import{S as Ae}from"./SdkTabs-699e9ba9.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,M,dt,Lt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` +import{S as Se,i as ve,s as we,N as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,O as ce,P as ye,k as ge,Q as Pe,n as Re,t as tt,a as et,o as c,d as Ut,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index-353b753a.js";import{S as Ae}from"./SdkTabs-ce9e2768.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,M,dt,Lt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); diff --git a/ui/dist/assets/CodeEditor-aa39fcd2.js b/ui/dist/assets/CodeEditor-a70b05e8.js similarity index 99% rename from ui/dist/assets/CodeEditor-aa39fcd2.js rename to ui/dist/assets/CodeEditor-a70b05e8.js index f7dc78fe..2c6846de 100644 --- a/ui/dist/assets/CodeEditor-aa39fcd2.js +++ b/ui/dist/assets/CodeEditor-a70b05e8.js @@ -1,4 +1,4 @@ -import{S as Ue,i as _e,s as qe,e as je,f as Ce,T as XO,g as Ge,y as ZO,o as Re,K as ze,L as Ae,M as Ie}from"./index-f60bef8b.js";import{P as Ee,N as Ne,u as Be,D as De,v as QO,T as R,I as Oe,w as cO,x as l,y as Me,L as hO,z as pO,A as z,B as uO,F as ee,G as SO,H as C,J as Je,K as Le,E as k,M as j,O as Ke,Q as He,R as g,U as Fe,V as Ot,a as V,h as et,b as tt,c as at,d as it,e as rt,s as st,f as nt,g as lt,i as ot,r as Qt,j as ct,k as ht,l as pt,m as ut,n as St,o as $t,p as ft,q as dt,t as bO,C as G}from"./index-0935db40.js";class N{constructor(O,t,a,i,s,r,n,o,c,h=0,Q){this.p=O,this.stack=t,this.state=a,this.reducePos=i,this.pos=s,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=c,this.lookAhead=h,this.parent=Q}toString(){return`[${this.stack.filter((O,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,t,a=0){let i=O.parser.context;return new N(O,[],t,a,a,0,[],0,i?new xO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let t=O>>19,a=O&65535,{parser:i}=this.p,s=i.dynamicPrecedence(a);if(s&&(this.score+=s),t==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),a=2e3&&(n==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=o):this.p.lastBigReductionSizer;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,t,a,i=4,s=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&r.buffer[n-4]==0&&r.buffer[n-1]>-1){if(t==a)return;if(r.buffer[n-2]>=t){r.buffer[n-2]=a;return}}}if(!s||this.pos==a)this.buffer.push(O,t,a,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0)for(;r>0&&this.buffer[r-2]>a;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4);this.buffer[r]=O,this.buffer[r+1]=t,this.buffer[r+2]=a,this.buffer[r+3]=i}}shift(O,t,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=a,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,a,4);else{let s=O,{parser:r}=this.p;(a>this.pos||t<=r.maxNode)&&(this.pos=a,r.stateFlag(s,1)||(this.reducePos=a)),this.pushState(s,i),this.shiftContext(t,i),t<=r.maxNode&&this.buffer.push(t,i,a,4)}}apply(O,t,a){O&65536?this.reduce(O):this.shift(O,t,a)}useNode(O,t){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(t,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,t=O.buffer.length;for(;t>0&&O.buffer[t-2]>O.reducePos;)t-=4;let a=O.buffer.slice(t),i=O.bufferBase+t;for(;O&&i==O.bufferBase;)O=O.parent;return new N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,t){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,t,4),this.storeNode(0,this.pos,t,a?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(O){for(let t=new Pt(this);;){let a=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,O);if(a==0)return!1;if(!(a&65536))return!0;t.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let s=0,r;so&1&&n==r)||i.push(t[s],r)}t=i}let a=[];for(let i=0;i>19,i=O&65535,s=this.stack.length-a*3;if(s<0||t.getGoto(this.stack[s],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!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.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 t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class xO{constructor(O,t){this.tracker=O,this.context=t,this.hash=O.strict?O.hash(t):0}}var yO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth",e[e.MinBigReduction=2e3]="MinBigReduction"})(yO||(yO={}));class Pt{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let t=O&65535,a=O>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class B{constructor(O,t,a){this.stack=O,this.pos=t,this.index=a,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,t=O.bufferBase+O.buffer.length){return new B(O,t,t-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 B(this.stack,this.pos,this.index)}}function q(e,O=Uint16Array){if(typeof e!="string")return e;let t=null;for(let a=0,i=0;a=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),s+=o,n)break;s*=46}t?t[i++]=s:t=new O(s)}return t}class A{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const YO=new A;class gt{constructor(O,t){this.input=O,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=YO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(O,t){let a=this.range,i=this.rangeIndex,s=this.pos+O;for(;sa.to:s>=a.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];s+=r.from-a.to,a=r}return s}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,t.from);return this.end}peek(O){let t=this.chunkOff+O,a,i;if(t>=0&&t=this.chunk2Pos&&an.to&&(this.chunk2=this.chunk2.slice(0,n.to-a)),i=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),i}acceptToken(O,t=0){let a=t?this.resolveOffset(t,-1):this.pos;if(a==null||a=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,t){if(t?(this.token=t,t.start=O,t.lookAhead=O+1,t.value=t.extended=-1):this.token=YO,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&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,t-this.chunkPos);if(O>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,t-this.chunk2Pos);if(O>=this.range.from&&t<=this.range.to)return this.input.read(O,t);let a="";for(let i of this.ranges){if(i.from>=t)break;i.to>O&&(a+=this.input.read(Math.max(i.from,O),Math.min(i.to,t)))}return a}}class v{constructor(O,t){this.data=O,this.id=t}token(O,t){let{parser:a}=t.p;te(this.data,O,t,this.id,a.data,a.tokenPrecTable)}}v.prototype.contextual=v.prototype.fallback=v.prototype.extend=!1;class nO{constructor(O,t,a){this.precTable=t,this.elseToken=a,this.data=typeof O=="string"?q(O):O}token(O,t){let a=O.pos,i;for(;i=O.pos,te(this.data,O,t,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(i+1,O.token)}i>a&&(O.reset(a,O.token),O.acceptToken(this.elseToken,i-a))}}nO.prototype.contextual=v.prototype.fallback=v.prototype.extend=!1;class b{constructor(O,t={}){this.token=O,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function te(e,O,t,a,i,s){let r=0,n=1<0){let $=e[S];if(o.allows($)&&(O.token.value==-1||O.token.value==$||mt($,O.token.value,i,s))){O.acceptToken($);break}}let h=O.next,Q=0,u=e[r+2];if(O.next<0&&u>Q&&e[c+u*3-3]==65535&&e[c+u*3-3]==65535){r=e[c+u*3-1];continue O}for(;Q>1,$=c+S+(S<<1),y=e[$],Y=e[$+1]||65536;if(h=Y)Q=S+1;else{r=e[$+2],O.advance();continue O}}break}}function kO(e,O,t){for(let a=O,i;(i=e[a])!=65535;a++)if(i==t)return a-O;return-1}function mt(e,O,t,a){let i=kO(t,a,O);return i<0||kO(t,a,e)O)&&!a.type.isError)return t<0?Math.max(0,Math.min(a.to-1,O-25)):Math.min(e.length,Math.max(a.from+1,O+25));if(t<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return t<0?0:e.length}}class Xt{constructor(O,t){this.fragments=O,this.nodeSet=t,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?wO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?wO(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=r,null;if(s instanceof R){if(r==O){if(r=Math.max(this.safeFrom,O)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[t]++,this.nextStart=r+s.length}}}class Zt{constructor(O,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(a=>new A)}getActions(O){let t=0,a=null,{parser:i}=O.p,{tokenizers:s}=i,r=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let c=0;cQ.end+25&&(o=Math.max(Q.lookAhead,o)),Q.value!=0)){let u=t;if(Q.extended>-1&&(t=this.addActions(O,Q.extended,Q.end,t)),t=this.addActions(O,Q.value,Q.end,t),!h.extend&&(a=Q,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return o&&O.setLookAhead(o),!a&&O.pos==this.stream.end&&(a=new A,a.value=O.p.parser.eofTerm,a.start=a.end=O.pos,t=this.addActions(O,a.value,a.end,t)),this.mainToken=a,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let t=new A,{pos:a,p:i}=O;return t.start=a,t.end=Math.min(a+1,i.stream.end),t.value=a==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(O,t,a){let i=this.stream.clipPos(a.pos);if(t.token(this.stream.reset(i,O),a),O.value>-1){let{parser:s}=a.p;for(let r=0;r=0&&a.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,t,a,i){for(let s=0;sO.bufferLength*4?new Xt(a,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,t=this.minStackPos,a=this.stacks=[],i,s;if(this.bigReductionCount>1e3&&O.length==1){let[r]=O;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;rt)a.push(n);else{if(this.advanceStack(n,a,O))continue;{i||(i=[],s=[]),i.push(n);let o=this.tokens.getMainToken(n);s.push(o.value,o.end)}}break}}if(!a.length){let r=i&&yt(i);if(r)return this.stackToTree(r);if(this.parser.strict)throw m&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,a);if(r)return this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(a.length>r)for(a.sort((n,o)=>o.score-n.score);a.length>r;)a.pop();a.some(n=>n.reducePos>t)&&this.recovering--}else if(a.length>1){O:for(let r=0;r500&&c.buffer.length>500)if((n.score-c.score||n.buffer.length-c.buffer.length)>0)a.splice(o--,1);else{a.splice(r--,1);continue O}}}}this.minStackPos=a[0].pos;for(let r=1;r ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let c=O.curContext&&O.curContext.tracker.strict,h=c?O.curContext.hash:0;for(let Q=this.fragments.nodeAt(i);Q;){let u=this.parser.nodeSet.types[Q.type.id]==Q.type?s.getGoto(O.state,Q.type.id):-1;if(u>-1&&Q.length&&(!c||(Q.prop(QO.contextHash)||0)==h))return O.useNode(Q,u),m&&console.log(r+this.stackID(O)+` (via reuse of ${s.getName(Q.type.id)})`),!0;if(!(Q instanceof R)||Q.children.length==0||Q.positions[0]>0)break;let S=Q.children[0];if(S instanceof R&&Q.positions[0]==0)Q=S;else break}}let n=s.stateSlot(O.state,4);if(n>0)return O.reduce(n),m&&console.log(r+this.stackID(O)+` (via always-reduce ${s.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let c=0;ci?t.push($):a.push($)}return!1}advanceFully(O,t){let a=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>a)return TO(O,t),!0}}runRecovery(O,t,a){let i=null,s=!1;for(let r=0;r ":"";if(n.deadEnd&&(s||(s=!0,n.restart(),m&&console.log(h+this.stackID(n)+" (restarted)"),this.advanceFully(n,a))))continue;let Q=n.split(),u=h;for(let S=0;Q.forceReduce()&&S<10&&(m&&console.log(u+this.stackID(Q)+" (via force-reduce)"),!this.advanceFully(Q,a));S++)m&&(u=this.stackID(Q)+" -> ");for(let S of n.recoverByInsert(o))m&&console.log(h+this.stackID(S)+" (via recover-insert)"),this.advanceFully(S,a);this.stream.end>n.pos?(c==n.pos&&(c++,o=0),n.recoverByDelete(o,c),m&&console.log(h+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),TO(n,a)):(!i||i.scoree;class ae{constructor(O){this.start=O.start,this.shift=O.shift||F,this.reduce=O.reduce||F,this.reuse=O.reuse||F,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class w extends Ee{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let t=O.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)s(h,o,n[c++]);else{let Q=n[c+-h];for(let u=-h;u>0;u--)s(n[c++],o,Q);c++}}}this.nodeSet=new Ne(t.map((n,o)=>Be.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:a.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=De;let r=q(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new v(r,n):n),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,t,a){let i=new bt(this,O,t,a);for(let s of this.wrappers)i=s(i,O,t,a);return i}getGoto(O,t,a=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let r=i[s++],n=r&1,o=i[s++];if(n&&a)return o;for(let c=s+(r>>1);s0}validAction(O,t){if(t==this.stateSlot(O,4))return!0;for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else return!1;if(t==X(this.data,a+1))return!0}}nextStates(O){let t=[];for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else break;if(!(this.data[a+2]&1)){let i=this.data[a+1];t.some((s,r)=>r&1&&s==i)||t.push(this.data[a],i)}}return t}configure(O){let t=Object.assign(Object.create(w.prototype),this);if(O.props&&(t.nodeSet=this.nodeSet.extend(...O.props)),O.top){let a=this.topRules[O.top];if(!a)throw new RangeError(`Invalid top rule name ${O.top}`);t.top=a}return O.tokenizers&&(t.tokenizers=this.tokenizers.map(a=>{let i=O.tokenizers.find(s=>s.from==a);return i?i.to:a})),O.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((a,i)=>{let s=O.specializers.find(n=>n.from==a.external);if(!s)return a;let r=Object.assign(Object.assign({},a),{external:s.to});return t.specializers[i]=VO(r),r})),O.contextTracker&&(t.context=O.contextTracker),O.dialect&&(t.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(t.strict=O.strict),O.wrap&&(t.wrappers=t.wrappers.concat(O.wrap)),O.bufferLength!=null&&(t.bufferLength=O.bufferLength),t}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 t=this.dynamicPrecedences;return t==null?0:t[O]||0}parseDialect(O){let t=Object.keys(this.dialects),a=t.map(()=>!1);if(O)for(let s of O.split(" ")){let r=t.indexOf(s);r>=0&&(a[r]=!0)}let i=null;for(let s=0;sa)&&t.p.parser.stateFlag(t.state,2)&&(!O||O.scoree.external(t,a)<<1|O}return e.get}const Yt=54,kt=1,vt=55,wt=2,Wt=56,Tt=3,D=4,ie=5,re=6,se=7,ne=8,Vt=9,Ut=10,_t=11,OO=57,qt=12,UO=58,jt=18,Ct=20,le=21,Gt=22,lO=24,oe=25,Rt=27,zt=30,At=33,Qe=35,It=36,Et=0,Nt={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},Bt={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},_O={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 Dt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function ce(e){return e==9||e==10||e==13||e==32}let qO=null,jO=null,CO=0;function oO(e,O){let t=e.pos+O;if(CO==t&&jO==e)return qO;let a=e.peek(O);for(;ce(a);)a=e.peek(++O);let i="";for(;Dt(a);)i+=String.fromCharCode(a),a=e.peek(++O);return jO=e,CO=t,qO=i?i.toLowerCase():a==Mt||a==Jt?void 0:null}const he=60,pe=62,ue=47,Mt=63,Jt=33,Lt=45;function GO(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let t=0;t-1?new GO(oO(a,1)||"",e):e},reduce(e,O){return O==jt&&e?e.parent:e},reuse(e,O,t,a){let i=O.type.id;return i==D||i==Qe?new GO(oO(a,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Ft=new b((e,O)=>{if(e.next!=he){e.next<0&&O.context&&e.acceptToken(OO);return}e.advance();let t=e.next==ue;t&&e.advance();let a=oO(e,0);if(a===void 0)return;if(!a)return e.acceptToken(t?qt:D);let i=O.context?O.context.name:null;if(t){if(a==i)return e.acceptToken(Vt);if(i&&Bt[i])return e.acceptToken(OO,-2);if(O.dialectEnabled(Et))return e.acceptToken(Ut);for(let s=O.context;s;s=s.parent)if(s.name==a)return;e.acceptToken(_t)}else{if(a=="script")return e.acceptToken(ie);if(a=="style")return e.acceptToken(re);if(a=="textarea")return e.acceptToken(se);if(Nt.hasOwnProperty(a))return e.acceptToken(ne);i&&_O[i]&&_O[i][a]?e.acceptToken(OO,-1):e.acceptToken(D)}},{contextual:!0}),Oa=new b(e=>{for(let O=0,t=0;;t++){if(e.next<0){t&&e.acceptToken(UO);break}if(e.next==Lt)O++;else if(e.next==pe&&O>=2){t>3&&e.acceptToken(UO,-2);break}else O=0;e.advance()}});function $O(e,O,t){let a=2+e.length;return new b(i=>{for(let s=0,r=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(s==0&&i.next==he||s==1&&i.next==ue||s>=2&&sr?i.acceptToken(O,-r):i.acceptToken(t,-(r-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else s=r=0;i.advance()}})}const ea=$O("script",Yt,kt),ta=$O("style",vt,wt),aa=$O("textarea",Wt,Tt),ia=cO({"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}),ra=w.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DTO$tQ!bO'#DVO$yQ!bO'#DWOOOW'#Dk'#DkOOOW'#DY'#DYQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%sQ#tO,59mOOOX'#D^'#D^O%{OXO'#CwO&WOXO,59YOOOY'#D_'#D_O&`OYO'#CzO&kOYO,59YOOO['#D`'#D`O&sO[O'#C}O'OO[O,59YOOOW'#Da'#DaO'WOxO,59YO'_Q!bO'#DQOOOW,59Y,59YOOO`'#Db'#DbO'dO!rO,59oOOOW,59o,59oO'lQ!bO,59qO'qQ!bO,59rOOOW-E7W-E7WO'vQ#tO'#CqOOQO'#DZ'#DZO(UQ#tO1G.uOOOX1G.u1G.uO(^Q#tO1G/POOOY1G/P1G/PO(fQ#tO1G/SOOO[1G/S1G/SO(nQ#tO1G/VOOOW1G/V1G/VOOOW1G/X1G/XO(yQ#tO1G/XOOOX-E7[-E7[O)RQ!bO'#CxOOOW1G.t1G.tOOOY-E7]-E7]O)WQ!bO'#C{OOO[-E7^-E7^O)]Q!bO'#DOOOOW-E7_-E7_O)bQ!bO,59lOOO`-E7`-E7`OOOW1G/Z1G/ZOOOW1G/]1G/]OOOW1G/^1G/^O)gQ&jO,59]OOQO-E7X-E7XOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$qOOOW7+$s7+$sO)rQ!bO,59dO)wQ!bO,59gO)|Q!bO,59jOOOW1G/W1G/WO*RO,UO'#CtO*dO7[O'#CtOOQO1G.w1G.wOOOW1G/O1G/OOOOW1G/R1G/ROOOW1G/U1G/UOOOO'#D['#D[O*uO,UO,59`OOQO,59`,59`OOOO'#D]'#D]O+WO7[O,59`OOOO-E7Y-E7YOOQO1G.z1G.zOOOO-E7Z-E7Z",stateData:"+u~O!^OS~OSSOTPOUQOVROWTOY]OZ[O[^O^^O_^O`^Oa^Ox^O{_O!dZO~OdaO~OdbO~OdcO~OddO~OdeO~O!WfOPkP!ZkP~O!XiOQnP!ZnP~O!YlORqP!ZqP~OSSOTPOUQOVROWTOXqOY]OZ[O[^O^^O_^O`^Oa^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OdvO~OdwO~OfyOj|O~OfyOj!OO~OfyOj!QO~OfyOj!SOv!TO~OfyOj!TO~O!WfOPkX!ZkX~OP!WO!Z!XO~O!XiOQnX!ZnX~OQ!ZO!Z!XO~O!YlORqX!ZqX~OR!]O!Z!XO~O!Z!XO~P#dOd!_O~O![sO!e!aO~Oj!bO~Oj!cO~Og!dOfeXjeXveX~OfyOj!fO~OfyOj!gO~OfyOj!hO~OfyOj!iOv!jO~OfyOj!jO~Od!kO~Od!lO~Od!mO~Oj!nO~Oi!qO!`!oO!b!pO~Oj!rO~Oj!sO~Oj!tO~O_!uO`!uOa!uO!`!wO!a!uO~O_!xO`!xOa!xO!b!wO!c!xO~O_!uO`!uOa!uO!`!{O!a!uO~O_!xO`!xOa!xO!b!{O!c!xO~Ov~vj`!dx{_a_~",goto:"%p!`PPPPPPPPPPPPPPPPPP!a!gP!mPP!yPP!|#P#S#Y#]#`#f#i#l#r#xP!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ht,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,39,40,41,42,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag",38,"StartTag"]],propSources:[ia],skippedNodes:[0],repeatNodeCount:9,tokenData:"#(r!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q!!O!Q![-_![!]!$c!]!^-_!^!_!(k!_!`#'S!`!a#'z!a!c-_!c!}!$c!}#R-_#R#S!$c#S#T3V#T#o!$c#o#s-_#s$f$q$f%W-_%W%o!$c%o%p-_%p&a!$c&a&b-_&b1p!$c1p4U-_4U4d!$c4d4e-_4e$IS!$c$IS$I`-_$I`$Ib!$c$Ib$Kh-_$Kh%#t!$c%#t&/x-_&/x&Et!$c&Et&FV-_&FV;'S!$c;'S;:j!(e;:j;=`4s<%l?&r-_?&r?Ah!$c?Ah?BY$q?BY?Mn!$c?MnO$q!Z$|c^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX^P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT^POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W^P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYiWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`^P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljfS^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ecfSiWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXfSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbfS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bcfS^P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjfSiWa!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibiWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`O_!R!R9cP;=`<%l8q!Z9mYiW_!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjfSiWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_{let c=n.type.id;if(c==Rt)return eO(n,o,t);if(c==zt)return eO(n,o,a);if(c==At)return eO(n,o,i);if(c==Qe&&s.length){let h=n.node,Q=RO(h,o),u;for(let S of s)if(S.tag==Q&&(!S.attrs||S.attrs(u||(u=Se(h,o))))){let $=h.parent.lastChild;return{parser:S.parser,overlay:[{from:n.to,to:$.type.id==It?$.from:h.parent.to}]}}}if(r&&c==le){let h=n.node,Q;if(Q=h.firstChild){let u=r[o.read(Q.from,Q.to)];if(u)for(let S of u){if(S.tagName&&S.tagName!=RO(h.parent,o))continue;let $=h.lastChild;if($.type.id==lO)return{parser:S.parser,overlay:[{from:$.from+1,to:$.to-1}]};if($.type.id==oe)return{parser:S.parser,overlay:[{from:$.from,to:$.to}]}}}}return null})}const sa=94,zO=1,na=95,la=96,AO=2,fe=[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],oa=58,Qa=40,de=95,ca=91,I=45,ha=46,pa=35,ua=37;function M(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function Sa(e){return e>=48&&e<=57}const $a=new b((e,O)=>{for(let t=!1,a=0,i=0;;i++){let{next:s}=e;if(M(s)||s==I||s==de||t&&Sa(s))!t&&(s!=I||i>0)&&(t=!0),a===i&&s==I&&a++,e.advance();else{t&&e.acceptToken(s==Qa?na:a==2&&O.canShift(AO)?AO:la);break}}}),fa=new b(e=>{if(fe.includes(e.peek(-1))){let{next:O}=e;(M(O)||O==de||O==pa||O==ha||O==ca||O==oa||O==I)&&e.acceptToken(sa)}}),da=new b(e=>{if(!fe.includes(e.peek(-1))){let{next:O}=e;if(O==ua&&(e.advance(),e.acceptToken(zO)),M(O)){do e.advance();while(M(e.next));e.acceptToken(zO)}}}),Pa=cO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,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,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),ga={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},ma={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},Xa={__proto__:null,not:128,only:128,from:158,to:160},Za=w.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[fa,da,$a,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>ga[e]||-1},{term:56,get:e=>ma[e]||-1},{term:96,get:e=>Xa[e]||-1}],tokenPrec:1123});let tO=null;function aO(){if(!tO&&typeof document=="object"&&document.body){let e=[];for(let O in document.body.style)/[A-Z]|^-|^(item|length)$/.test(O)||e.push(O);tO=e.sort().map(O=>({type:"property",label:O}))}return tO||[]}const IO=["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})),EO=["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}))),ba=["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})),x=/^[\w-]*/,xa=e=>{let{state:O,pos:t}=e,a=C(O).resolveInner(t,-1);if(a.name=="PropertyName")return{from:a.from,options:aO(),validFor:x};if(a.name=="ValueName")return{from:a.from,options:EO,validFor:x};if(a.name=="PseudoClassName")return{from:a.from,options:IO,validFor:x};if(a.name=="TagName"){for(let{parent:r}=a;r;r=r.parent)if(r.name=="Block")return{from:a.from,options:aO(),validFor:x};return{from:a.from,options:ba,validFor:x}}if(!e.explicit)return null;let i=a.resolve(t),s=i.childBefore(t);return s&&s.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:IO,validFor:x}:s&&s.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:EO,validFor:x}:i.name=="Block"?{from:t,options:aO(),validFor:x}:null},J=hO.define({name:"css",parser:Za.configure({props:[pO.add({Declaration:z()}),uO.add({Block:ee})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ya(){return new SO(J,J.data.of({autocomplete:xa}))}const NO=301,BO=1,Ya=2,DO=302,ka=304,va=305,wa=3,Wa=4,Ta=[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],Pe=125,Va=59,MO=47,Ua=42,_a=43,qa=45,ja=new ae({start:!1,shift(e,O){return O==wa||O==Wa||O==ka?e:O==va},strict:!1}),Ca=new b((e,O)=>{let{next:t}=e;(t==Pe||t==-1||O.context)&&O.canShift(DO)&&e.acceptToken(DO)},{contextual:!0,fallback:!0}),Ga=new b((e,O)=>{let{next:t}=e,a;Ta.indexOf(t)>-1||t==MO&&((a=e.peek(1))==MO||a==Ua)||t!=Pe&&t!=Va&&t!=-1&&!O.context&&O.canShift(NO)&&e.acceptToken(NO)},{contextual:!0}),Ra=new b((e,O)=>{let{next:t}=e;if((t==_a||t==qa)&&(e.advance(),t==e.next)){e.advance();let a=!O.context&&O.canShift(BO);e.acceptToken(a?BO:Ya)}},{contextual:!0}),za=cO({"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 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: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)}),Aa={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:219,private:219,protected:219,readonly:221,instanceof:240,satisfies:243,in:244,const:246,import:278,keyof:333,unique:337,infer:343,is:379,abstract:399,implements:401,type:403,let:406,var:408,interface:415,enum:419,namespace:425,module:427,declare:431,global:435,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},Ia={__proto__:null,async:117,get:119,set:121,public:181,private:181,protected:181,static:183,abstract:185,override:187,readonly:193,accessor:195,new:383},Ea={__proto__:null,"<":137},Na=w.deserialize({version:14,states:"$BhO`QUOOO%QQUOOO'TQWOOP(_OSOOO*mQ(CjO'#CfO*tOpO'#CgO+SO!bO'#CgO+bO07`O'#DZO-sQUO'#DaO.TQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0rQSO'#ETOOQO'#I_'#I_O0zQSO'#GjOOQO'#Eh'#EhO1VQSO'#EgO1[QSO'#EgO3^Q(CjO'#JbO5}Q(CjO'#JcO6kQSO'#FVO6pQ#tO'#FnOOQ(CY'#F_'#F_O6{O&jO'#F_O7ZQ,UO'#FuO8qQSO'#FtOOQ(CY'#Jc'#JcOOQ(CW'#Jb'#JbOOQQ'#J|'#J|O8vQSO'#IOO8{Q(C[O'#IPOOQQ'#JO'#JOOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9TQUO'#DzO%QQUO'#D|O9[QSO'#GjO9aQ,UO'#ClO9oQSO'#EfO9zQSO'#EqO:PQ,UO'#F^O:nQSO'#GjO:sQSO'#GnO;OQSO'#GnO;^QSO'#GqO;^QSO'#GrO;^QSO'#GtO9[QSO'#GwO;}QSO'#GzO=`QSO'#CbO=pQSO'#HXO=xQSO'#H_O=xQSO'#HaO`QUO'#HcO=xQSO'#HeO=xQSO'#HhO=}QSO'#HnO>SQ(C]O'#HtO%QQUO'#HvO>_Q(C]O'#HxO>jQ(C]O'#HzO8{Q(C[O'#H|O>uQ(CjO'#CfO?wQWO'#DfQOQSOOO@_QSO'#EPO9aQ,UO'#EfO@jQSO'#EfO@uQ`O'#F^OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jf'#JfO%QQUO'#JfOBOQWO'#E_OOQ(CW'#E^'#E^OBYQ(C`O'#E_OBtQWO'#ESOOQO'#Ji'#JiOCYQWO'#ESOCgQWO'#E_OC}QWO'#EeODQQWO'#E_O@}QWO'#E_OBtQWO'#E_PDkO?MpO'#C`POOO)CDm)CDmOOOO'#IU'#IUODvOpO,59ROOQ(CY,59R,59ROOOO'#IV'#IVOEUO!bO,59RO%QQUO'#D]OOOO'#IX'#IXOEdO07`O,59uOOQ(CY,59u,59uOErQUO'#IYOFVQSO'#JdOHXQbO'#JdO+pQUO'#JdOH`QSO,59{OHvQSO'#EhOITQSO'#JqOI`QSO'#JpOI`QSO'#JpOIhQSO,5;UOImQSO'#JoOOQ(CY,5:W,5:WOItQUO,5:WOKuQ(CjO,5:bOLfQSO,5:jOLkQSO'#JmOMeQ(C[O'#JnO:sQSO'#JmOMlQSO'#JmOMtQSO,5;TOMyQSO'#JmOOQ(CY'#Cf'#CfO%QQUO'#EOONmQ`O,5:oOOQO'#Jj'#JjOOQO-E<]-E<]O9[QSO,5=UO! TQSO,5=UO! YQUO,5;RO!#]Q,UO'#EcO!$pQSO,5;RO!&YQ,UO'#DpO!&aQUO'#DuO!&kQWO,5;[O!&sQWO,5;[O%QQUO,5;[OOQQ'#E}'#E}OOQQ'#FP'#FPO%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]OOQQ'#FT'#FTO!'RQUO,5;nOOQ(CY,5;s,5;sOOQ(CY,5;t,5;tO!)UQSO,5;tOOQ(CY,5;u,5;uO%QQUO'#IeO!)^Q(C[O,5jOOQQ'#JW'#JWOOQQ,5>k,5>kOOQQ-EgQWO'#EkOOQ(CW'#Jo'#JoO!>nQ(C[O'#J}O8{Q(C[O,5=YO;^QSO,5=`OOQO'#Cr'#CrO!>yQWO,5=]O!?RQ,UO,5=^O!?^QSO,5=`O!?cQ`O,5=cO=}QSO'#G|O9[QSO'#HOO!?kQSO'#HOO9aQ,UO'#HRO!?pQSO'#HROOQQ,5=f,5=fO!?uQSO'#HSO!?}QSO'#ClO!@SQSO,58|O!@^QSO,58|O!BfQUO,58|OOQQ,58|,58|O!BsQ(C[O,58|O%QQUO,58|O!COQUO'#HZOOQQ'#H['#H[OOQQ'#H]'#H]O`QUO,5=sO!C`QSO,5=sO`QUO,5=yO`QUO,5={O!CeQSO,5=}O`QUO,5>PO!CjQSO,5>SO!CoQUO,5>YOOQQ,5>`,5>`O%QQUO,5>`O8{Q(C[O,5>bOOQQ,5>d,5>dO!GvQSO,5>dOOQQ,5>f,5>fO!GvQSO,5>fOOQQ,5>h,5>hO!G{QWO'#DXO%QQUO'#JfO!HjQWO'#JfO!IXQWO'#DgO!IjQWO'#DgO!K{QUO'#DgO!LSQSO'#JeO!L[QSO,5:QO!LaQSO'#ElO!LoQSO'#JrO!LwQSO,5;VO!L|QWO'#DgO!MZQWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!MbQSO,5:kO=}QSO,5;QO!;xQWO,5;QO!tO+pQUO,5>tOOQO,5>z,5>zO#$vQUO'#IYOOQO-EtO$8XQSO1G5jO$8aQSO1G5vO$8iQbO1G5wO:sQSO,5>zO$8sQSO1G5sO$8sQSO1G5sO:sQSO1G5sO$8{Q(CjO1G5tO%QQUO1G5tO$9]Q(C[O1G5tO$9nQSO,5>|O:sQSO,5>|OOQO,5>|,5>|O$:SQSO,5>|OOQO-E<`-E<`OOQO1G0]1G0]OOQO1G0_1G0_O!)XQSO1G0_OOQQ7+([7+([O!#]Q,UO7+([O%QQUO7+([O$:bQSO7+([O$:mQ,UO7+([O$:{Q(CjO,59nO$=TQ(CjO,5UOOQQ,5>U,5>UO%QQUO'#HkO%&qQSO'#HmOOQQ,5>[,5>[O:sQSO,5>[OOQQ,5>^,5>^OOQQ7+)`7+)`OOQQ7+)f7+)fOOQQ7+)j7+)jOOQQ7+)l7+)lO%&vQWO1G5lO%'[Q$IUO1G0rO%'fQSO1G0rOOQO1G/m1G/mO%'qQ$IUO1G/mO=}QSO1G/mO!'RQUO'#DgOOQO,5>u,5>uOOQO-E{,5>{OOQO-E<_-E<_O!;xQWO1G/mOOQO-E<[-E<[OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO!MeQSO7+%qOOQ(CY7+&W7+&WO=}QSO7+&WO!;xQWO7+&WOOQO7+%t7+%tO$7kQ(CjO7+&POOQO7+&P7+&PO%QQUO7+&PO%'{Q(C[O7+&PO=}QSO7+%tO!;xQWO7+%tO%(WQ(C[O7+&POBtQWO7+%tO%(fQ(C[O7+&PO%(zQ(C`O7+&PO%)UQWO7+%tOBtQWO7+&PO%)cQWO7+&PO%)yQSO7++_O%)yQSO7++_O%*RQ(CjO7++`O%QQUO7++`OOQO1G4h1G4hO:sQSO1G4hO%*cQSO1G4hOOQO7+%y7+%yO!MeQSO<vOOQO-EwO%QQUO,5>wOOQO-ESQ$IUO1G0wO%>ZQ$IUO1G0wO%@RQ$IUO1G0wO%@fQ(CjO<VOOQQ,5>X,5>XO&#WQSO1G3vO:sQSO7+&^O!'RQUO7+&^OOQO7+%X7+%XO&#]Q$IUO1G5wO=}QSO7+%XOOQ(CY<zAN>zO%QQUOAN?VO=}QSOAN>zO&<^Q(C[OAN?VO!;xQWOAN>zO&zO&RO!V+iO^(qX'j(qX~O#W+mO'|%OO~Og+pO!X$yO'|%OO~O!X+rO~Oy+tO!XXO~O!t+yO~Ob,OO~O's#jO!W(sP~Ob%lO~O%a!OO's%|O~PRO!V,yO!W(fa~O!W2SO~P'TO^%^O#W2]O'j%^O~O^%^O!a#rO#W2]O'j%^O~O^%^O!a#rO!h%ZO!l2aO#W2]O'j%^O'|%OO(`'dO~O!]2bO!^2bO't!iO~PBtO![2eO!]2bO!^2bO#S2fO#T2fO't!iO~PBtO![2eO!]2bO!^2bO#P2gO#S2fO#T2fO't!iO~PBtO^%^O!a#rO!l2aO#W2]O'j%^O(`'dO~O^%^O'j%^O~P!3jO!V$^Oo$ja~O!S&|i!V&|i~P!3jO!V'xO!S(Wi~O!V(PO!S(di~O!S(ei!V(ei~P!3jO!V(]O!g(ai~O!V(bi!g(bi^(bi'j(bi~P!3jO#W2kO!V(bi!g(bi^(bi'j(bi~O|%vO!X%wO!x]O#a2nO#b2mO's%eO~O|%vO!X%wO#b2mO's%eO~Og2uO!X'QO%`2tO~Og2uO!X'QO%`2tO'|%OO~O#cvaPvaXva^vakva!eva!fva!hva!lva#fva#gva#hva#iva#jva#kva#lva#mva#nva#pva#rva#tva#uva'jva(Qva(`va!gva!Sva'hvaova!Xva%`va!ava~P#M{O#c$kaP$kaX$ka^$kak$kaz$ka!e$ka!f$ka!h$ka!l$ka#f$ka#g$ka#h$ka#i$ka#j$ka#k$ka#l$ka#m$ka#n$ka#p$ka#r$ka#t$ka#u$ka'j$ka(Q$ka(`$ka!g$ka!S$ka'h$kao$ka!X$ka%`$ka!a$ka~P#NqO#c$maP$maX$ma^$mak$maz$ma!e$ma!f$ma!h$ma!l$ma#f$ma#g$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#p$ma#r$ma#t$ma#u$ma'j$ma(Q$ma(`$ma!g$ma!S$ma'h$mao$ma!X$ma%`$ma!a$ma~P$ dO#c${aP${aX${a^${ak${az${a!V${a!e${a!f${a!h${a!l${a#f${a#g${a#h${a#i${a#j${a#k${a#l${a#m${a#n${a#p${a#r${a#t${a#u${a'j${a(Q${a(`${a!g${a!S${a'h${a#W${ao${a!X${a%`${a!a${a~P#(yO^#Zq!V#Zq'j#Zq'h#Zq!S#Zq!g#Zqo#Zq!X#Zq%`#Zq!a#Zq~P!3jOd'OX!V'OX~P!$uO!V._Od(Za~O!U2}O!V'PX!g'PX~P%QO!V.bO!g([a~O!V.bO!g([a~P!3jO!S3QO~O#x!ja!W!ja~PI{O#x!ba!V!ba!W!ba~P#?dO#x!na!W!na~P!6TO#x!pa!W!pa~P!8nO!X3dO$TfO$^3eO~O!W3iO~Oo3jO~P#(yO^$gq!V$gq'j$gq'h$gq!S$gq!g$gqo$gq!X$gq%`$gq!a$gq~P!3jO!S3kO~Ol.}O'uTO'xUO~Oy)sO|)tO(h)xOg%Wi(g%Wi!V%Wi#W%Wi~Od%Wi#x%Wi~P$HbOy)sO|)tOg%Yi(g%Yi(h%Yi!V%Yi#W%Yi~Od%Yi#x%Yi~P$ITO(`$WO~P#(yO!U3nO's%eO!V'YX!g'YX~O!V/VO!g(ma~O!V/VO!a#rO!g(ma~O!V/VO!a#rO(`'dO!g(ma~Od$ti!V$ti#W$ti#x$ti~P!-jO!U3vO's*UO!S'[X!V'[X~P!.XO!V/_O!S(na~O!V/_O!S(na~P#(yO!a#rO~O!a#rO#n4OO~Ok4RO!a#rO(`'dO~Od(Oi!V(Oi~P!-jO#W4UOd(Oi!V(Oi~P!-jO!g4XO~O^$hq!V$hq'j$hq'h$hq!S$hq!g$hqo$hq!X$hq%`$hq!a$hq~P!3jO!V4]O!X(oX~P#(yO!f#tO~P3zO!X$rX%TYX^$rX!V$rX'j$rX~P!,aO%T4_OghXyhX|hX!XhX(ghX(hhX^hX!VhX'jhX~O%T4_O~O%a4fO's+WO'uTO'xUO!V'eX!W'eX~O!V0_O!W(ua~OX4jO~O]4kO~O!S4oO~O^%^O'j%^O~P#(yO!X$yO~P#(yO!V4tO#W4vO!W(rX~O!W4wO~Ol!kO|4yO![5WO!]4}O!^4}O!x;oO!|5VO!}5UO#O5UO#P5TO#S5SO#T!wO't!iO'uTO'xUO(T!jO(_!nO~O!W5RO~P%#XOg5]O!X0zO%`5[O~Og5]O!X0zO%`5[O'|%OO~O's#jO!V'dX!W'dX~O!V1VO!W(sa~O'uTO'xUO(T5fO~O]5jO~O!g5mO~P%QO^5oO~O^5oO~P%QO#n5qO&Q5rO~PMPO_1mO!W5vO&`1lO~P`O!a5xO~O!a5zO!V(Yi!W(Yi!a(Yi!h(Yi'|(Yi~O!V#`i!W#`i~P#?dO#W5{O!V#`i!W#`i~O!V!Zi!W!Zi~P#?dO^%^O#W6UO'j%^O~O^%^O!a#rO#W6UO'j%^O~O^%^O!a#rO!l6ZO#W6UO'j%^O(`'dO~O!h%ZO'|%OO~P%(fO!]6[O!^6[O't!iO~PBtO![6_O!]6[O!^6[O#S6`O#T6`O't!iO~PBtO!V(]O!g(aq~O!V(bq!g(bq^(bq'j(bq~P!3jO|%vO!X%wO#b6dO's%eO~O!X'QO%`6gO~Og6jO!X'QO%`6gO~O#c%WiP%WiX%Wi^%Wik%Wiz%Wi!e%Wi!f%Wi!h%Wi!l%Wi#f%Wi#g%Wi#h%Wi#i%Wi#j%Wi#k%Wi#l%Wi#m%Wi#n%Wi#p%Wi#r%Wi#t%Wi#u%Wi'j%Wi(Q%Wi(`%Wi!g%Wi!S%Wi'h%Wio%Wi!X%Wi%`%Wi!a%Wi~P$HbO#c%YiP%YiX%Yi^%Yik%Yiz%Yi!e%Yi!f%Yi!h%Yi!l%Yi#f%Yi#g%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#p%Yi#r%Yi#t%Yi#u%Yi'j%Yi(Q%Yi(`%Yi!g%Yi!S%Yi'h%Yio%Yi!X%Yi%`%Yi!a%Yi~P$ITO#c$tiP$tiX$ti^$tik$tiz$ti!V$ti!e$ti!f$ti!h$ti!l$ti#f$ti#g$ti#h$ti#i$ti#j$ti#k$ti#l$ti#m$ti#n$ti#p$ti#r$ti#t$ti#u$ti'j$ti(Q$ti(`$ti!g$ti!S$ti'h$ti#W$tio$ti!X$ti%`$ti!a$ti~P#(yOd'Oa!V'Oa~P!-jO!V'Pa!g'Pa~P!3jO!V.bO!g([i~O#x#Zi!V#Zi!W#Zi~P#?dOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO(QVOX#eik#ei!e#ei#g#ei#h#ei#i#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~O#f#ei~P%2xO#f;wO~P%2xOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO#f;wO#g;xO#h;xO#i;xO(QVOX#ei!e#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~Ok#ei~P%5TOk;yO~P%5TOP$YOk;yOy#vOz#wO|#xO!f#tO!h#uO!l$YO#f;wO#g;xO#h;xO#i;xO#j;zO(QVO#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~OX#ei!e#ei#k#ei#l#ei#m#ei#n#ei~P%7`OXbO^#vy!V#vy'j#vy'h#vy!S#vy!g#vyo#vy!X#vy%`#vy!a#vy~P!3jOg=jOy)sO|)tO(g)vO(h)xO~OP#eiX#eik#eiz#ei!e#ei!f#ei!h#ei!l#ei#f#ei#g#ei#h#ei#i#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(Q#ei(`#ei!V#ei!W#ei~P%AYO!f#tOP(PXX(PXg(PXk(PXy(PXz(PX|(PX!e(PX!h(PX!l(PX#f(PX#g(PX#h(PX#i(PX#j(PX#k(PX#l(PX#m(PX#n(PX#p(PX#r(PX#t(PX#u(PX#x(PX(Q(PX(`(PX(g(PX(h(PX!V(PX!W(PX~O#x#yi!V#yi!W#yi~P#?dO#x!ni!W!ni~P$!qO!W6vO~O!V'Xa!W'Xa~P#?dO!a#rO(`'dO!V'Ya!g'Ya~O!V/VO!g(mi~O!V/VO!a#rO!g(mi~Od$tq!V$tq#W$tq#x$tq~P!-jO!S'[a!V'[a~P#(yO!a6}O~O!V/_O!S(ni~P#(yO!V/_O!S(ni~O!S7RO~O!a#rO#n7WO~Ok7XO!a#rO(`'dO~O!S7ZO~Od$vq!V$vq#W$vq#x$vq~P!-jO^$hy!V$hy'j$hy'h$hy!S$hy!g$hyo$hy!X$hy%`$hy!a$hy~P!3jO!V4]O!X(oa~O^#Zy!V#Zy'j#Zy'h#Zy!S#Zy!g#Zyo#Zy!X#Zy%`#Zy!a#Zy~P!3jOX7`O~O!V0_O!W(ui~O]7fO~O!a5zO~O(T(qO!V'aX!W'aX~O!V4tO!W(ra~O!h%ZO'|%OO^(YX!a(YX!l(YX#W(YX'j(YX(`(YX~O's7oO~P.[O!x;oO!|7rO!}7qO#O7qO#P7pO#S'bO#T'bO~PBtO^%^O!a#rO!l'hO#W'fO'j%^O(`'dO~O!W7vO~P%#XOl!kO'uTO'xUO(T!jO(_!nO~O|7wO~P%MdO![7{O!]7zO!^7zO#P7pO#S'bO#T'bO't!iO~PBtO![7{O!]7zO!^7zO!}7|O#O7|O#P7pO#S'bO#T'bO't!iO~PBtO!]7zO!^7zO't!iO(T!jO(_!nO~O!X0zO~O!X0zO%`8OO~Og8RO!X0zO%`8OO~OX8WO!V'da!W'da~O!V1VO!W(si~O!g8[O~O!g8]O~O!g8^O~O!g8^O~P%QO^8`O~O!a8cO~O!g8dO~O!V(ei!W(ei~P#?dO^%^O#W8lO'j%^O~O^%^O!a#rO#W8lO'j%^O~O^%^O!a#rO!l8pO#W8lO'j%^O(`'dO~O!h%ZO'|%OO~P&$QO!]8qO!^8qO't!iO~PBtO!V(]O!g(ay~O!V(by!g(by^(by'j(by~P!3jO!X'QO%`8uO~O#c$tqP$tqX$tq^$tqk$tqz$tq!V$tq!e$tq!f$tq!h$tq!l$tq#f$tq#g$tq#h$tq#i$tq#j$tq#k$tq#l$tq#m$tq#n$tq#p$tq#r$tq#t$tq#u$tq'j$tq(Q$tq(`$tq!g$tq!S$tq'h$tq#W$tqo$tq!X$tq%`$tq!a$tq~P#(yO#c$vqP$vqX$vq^$vqk$vqz$vq!V$vq!e$vq!f$vq!h$vq!l$vq#f$vq#g$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#p$vq#r$vq#t$vq#u$vq'j$vq(Q$vq(`$vq!g$vq!S$vq'h$vq#W$vqo$vq!X$vq%`$vq!a$vq~P#(yO!V'Pi!g'Pi~P!3jO#x#Zq!V#Zq!W#Zq~P#?dOy/yOz/yO|/zOPvaXvagvakva!eva!fva!hva!lva#fva#gva#hva#iva#jva#kva#lva#mva#nva#pva#rva#tva#uva#xva(Qva(`va(gva(hva!Vva!Wva~Oy)sO|)tOP$kaX$kag$kak$kaz$ka!e$ka!f$ka!h$ka!l$ka#f$ka#g$ka#h$ka#i$ka#j$ka#k$ka#l$ka#m$ka#n$ka#p$ka#r$ka#t$ka#u$ka#x$ka(Q$ka(`$ka(g$ka(h$ka!V$ka!W$ka~Oy)sO|)tOP$maX$mag$mak$maz$ma!e$ma!f$ma!h$ma!l$ma#f$ma#g$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#p$ma#r$ma#t$ma#u$ma#x$ma(Q$ma(`$ma(g$ma(h$ma!V$ma!W$ma~OP${aX${ak${az${a!e${a!f${a!h${a!l${a#f${a#g${a#h${a#i${a#j${a#k${a#l${a#m${a#n${a#p${a#r${a#t${a#u${a#x${a(Q${a(`${a!V${a!W${a~P%AYO#x$gq!V$gq!W$gq~P#?dO#x$hq!V$hq!W$hq~P#?dO!W9PO~O#x9QO~P!-jO!a#rO!V'Yi!g'Yi~O!a#rO(`'dO!V'Yi!g'Yi~O!V/VO!g(mq~O!S'[i!V'[i~P#(yO!V/_O!S(nq~O!S9WO~P#(yO!S9WO~Od(Oy!V(Oy~P!-jO!V'_a!X'_a~P#(yO!X%Sq^%Sq!V%Sq'j%Sq~P#(yOX9]O~O!V0_O!W(uq~O#W9aO!V'aa!W'aa~O!V4tO!W(ri~P#?dOPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#WYX#ccX#fYX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#pYX#rYX#tYX#uYX#zYX(QYX(`YX(gYX(hYX~O!a%QX#n%QX~P&6lO#S-cO#T-cO~PBtO#P9eO#S-cO#T-cO~PBtO!}9fO#O9fO#P9eO#S-cO#T-cO~PBtO!]9iO!^9iO't!iO(T!jO(_!nO~O![9lO!]9iO!^9iO#P9eO#S-cO#T-cO't!iO~PBtO!X0zO%`9oO~O'uTO'xUO(T9tO~O!V1VO!W(sq~O!g9wO~O!g9wO~P%QO!g9yO~O!g9zO~O#W9|O!V#`y!W#`y~O!V#`y!W#`y~P#?dO^%^O#W:QO'j%^O~O^%^O!a#rO#W:QO'j%^O~O^%^O!a#rO!l:UO#W:QO'j%^O(`'dO~O!X'QO%`:XO~O#x#vy!V#vy!W#vy~P#?dOP$tiX$tik$tiz$ti!e$ti!f$ti!h$ti!l$ti#f$ti#g$ti#h$ti#i$ti#j$ti#k$ti#l$ti#m$ti#n$ti#p$ti#r$ti#t$ti#u$ti#x$ti(Q$ti(`$ti!V$ti!W$ti~P%AYOy)sO|)tO(h)xOP%WiX%Wig%Wik%Wiz%Wi!e%Wi!f%Wi!h%Wi!l%Wi#f%Wi#g%Wi#h%Wi#i%Wi#j%Wi#k%Wi#l%Wi#m%Wi#n%Wi#p%Wi#r%Wi#t%Wi#u%Wi#x%Wi(Q%Wi(`%Wi(g%Wi!V%Wi!W%Wi~Oy)sO|)tOP%YiX%Yig%Yik%Yiz%Yi!e%Yi!f%Yi!h%Yi!l%Yi#f%Yi#g%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#p%Yi#r%Yi#t%Yi#u%Yi#x%Yi(Q%Yi(`%Yi(g%Yi(h%Yi!V%Yi!W%Yi~O#x$hy!V$hy!W$hy~P#?dO#x#Zy!V#Zy!W#Zy~P#?dO!a#rO!V'Yq!g'Yq~O!V/VO!g(my~O!S'[q!V'[q~P#(yO!S:`O~P#(yO!V0_O!W(uy~O!V4tO!W(rq~O#S2fO#T2fO~PBtO#P:gO#S2fO#T2fO~PBtO!]:kO!^:kO't!iO(T!jO(_!nO~O!X0zO%`:nO~O!g:qO~O^%^O#W:vO'j%^O~O^%^O!a#rO#W:vO'j%^O~O!X'QO%`:{O~OP$tqX$tqk$tqz$tq!e$tq!f$tq!h$tq!l$tq#f$tq#g$tq#h$tq#i$tq#j$tq#k$tq#l$tq#m$tq#n$tq#p$tq#r$tq#t$tq#u$tq#x$tq(Q$tq(`$tq!V$tq!W$tq~P%AYOP$vqX$vqk$vqz$vq!e$vq!f$vq!h$vq!l$vq#f$vq#g$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#p$vq#r$vq#t$vq#u$vq#x$vq(Q$vq(`$vq!V$vq!W$vq~P%AYOd%[!Z!V%[!Z#W%[!Z#x%[!Z~P!-jO!V'aq!W'aq~P#?dO#S6`O#T6`O~PBtO!V#`!Z!W#`!Z~P#?dO^%^O#W;ZO'j%^O~O#c%[!ZP%[!ZX%[!Z^%[!Zk%[!Zz%[!Z!V%[!Z!e%[!Z!f%[!Z!h%[!Z!l%[!Z#f%[!Z#g%[!Z#h%[!Z#i%[!Z#j%[!Z#k%[!Z#l%[!Z#m%[!Z#n%[!Z#p%[!Z#r%[!Z#t%[!Z#u%[!Z'j%[!Z(Q%[!Z(`%[!Z!g%[!Z!S%[!Z'h%[!Z#W%[!Zo%[!Z!X%[!Z%`%[!Z!a%[!Z~P#(yOP%[!ZX%[!Zk%[!Zz%[!Z!e%[!Z!f%[!Z!h%[!Z!l%[!Z#f%[!Z#g%[!Z#h%[!Z#i%[!Z#j%[!Z#k%[!Z#l%[!Z#m%[!Z#n%[!Z#p%[!Z#r%[!Z#t%[!Z#u%[!Z#x%[!Z(Q%[!Z(`%[!Z!V%[!Z!W%[!Z~P%AYOo(UX~P1dO't!iO~P!'RO!ScX!VcX#WcX~P&6lOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#WYX#WcX#ccX#fYX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#pYX#rYX#tYX#uYX#zYX(QYX(`YX(gYX(hYX~O!acX!gYX!gcX(`cX~P'!sOP;nOQ;nOa=_Ob!fOikOk;nOlkOmkOskOu;nOw;nO|WO!QkO!RkO!XXO!c;qO!hZO!k;nO!l;nO!m;nO!o;rO!q;sO!t!eO$P!hO$TfO's)RO'uTO'xUO(QVO(_[O(l=]O~O!Vv!>v!BnPPP!BuHdPPPPPPPPPPP!FTP!GiPPHd!HyPHdPHdHdHdHdPHd!J`PP!MiP#!nP#!r#!|##Q##QP!MfP##U##UP#&ZP#&_HdHd#&e#)iAQPAQPAQAQP#*sAQAQ#,mAQ#.zAQ#0nAQAQ#1[#3W#3W#3[#3d#3W#3lP#3WPAQ#4hAQ#5pAQAQ6iPPP#6{PP#7e#7eP#7eP#7z#7ePP#8QP#7wP#7w#8d!1p#7w#9O#9U6f(}#9X(}P#9`#9`#9`P(}P(}P(}P(}PP(}P#9f#9iP#9i(}P#9mP#9pP(}P(}P(}P(}P(}P(}(}PP#9v#9|#:W#:^#:d#:j#:p#;O#;U#;[#;f#;l#b#?r#@Q#@W#@^#@d#@j#@t#@z#AQ#A[#An#AtPPPPPPPPPP#AzPPPPPPP#Bn#FYP#Gu#G|#HUPPPP#L`$ U$'t$'w$'z$)w$)z$)}$*UPP$*[$*`$+X$,X$,]$,qPP$,u$,{$-PP$-S$-W$-Z$.P$.g$.l$.o$.r$.x$.{$/P$/TR!yRmpOXr!X#a%]&d&f&g&i,^,c1g1jU!pQ'Q-OQ%ctQ%kwQ%rzQ&[!TS&x!c,vQ'W!f[']!m!r!s!t!u!vS*[$y*aQ+U%lQ+c%tQ+}&UQ,|'PQ-W'XW-`'^'_'`'aQ/p*cQ1U,OU2b-b-d-eS4}0z5QS6[2e2gU7z5U5V5WQ8q6_S9i7{7|Q:k9lR TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration 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:362,context:ja,nodeProps:[["group",-26,6,14,16,62,198,202,205,206,208,211,214,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,102,103,112,113,130,133,135,136,137,138,140,141,161,162,164,"Expression",-23,24,26,30,34,36,38,165,167,169,170,172,173,174,176,177,178,180,181,182,192,194,196,197,"Type",-3,84,95,101,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",142,"JSXStartTag",154,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",143,"JSXSelfCloseEndTag JSXEndTag",159,"JSXEndTag"]],propSources:[za],skippedNodes:[0,3,4,268],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$c&j'vp'y!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$c&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$c&j'y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$c&j'vpOY(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'vpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'vp'y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$c&j'vp'y!b'l(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'w#S$c&j'm(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$c&j'vp'y!b'm(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$c&j!l$Ip'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#p$Id$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#p$Id$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'u$(n$c&j'y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$c&j'y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$c&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$^#t$c&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$^#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$^#t$c&j'y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'y!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$^#t'y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$c&j'vp'y!b(T!LY's&;d$V#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$c&j'vp'y!b$V#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$c&j'vp'y!b#h$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$c&j#z$Id'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(h%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$c&j'vp'y!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$c&j#x%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$c&j'vp'y!b'm(;d(T!LY's&;d$V#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Ga,Ra,2,3,4,5,6,7,8,9,10,11,12,13,Ca,new nO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(S~~",141,325),new nO("j~RQYZXz{^~^O'p~~aP!P!Qd~iO'q~~",25,307)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:13213,ts:13215},dynamicPrecedences:{76:1,78:1,162:1,190:1},specialized:[{term:311,get:e=>Aa[e]||-1},{term:327,get:e=>Ia[e]||-1},{term:67,get:e=>Ea[e]||-1}],tokenPrec:13238}),Ba=[g("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),g("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),g("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),g("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),g("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),g(`try { +import{S as Ue,i as _e,s as qe,e as je,f as Ce,T as XO,g as Ge,y as ZO,o as Re,K as ze,L as Ae,M as Ie}from"./index-353b753a.js";import{P as Ee,N as Ne,u as Be,D as De,v as QO,T as R,I as Oe,w as cO,x as l,y as Me,L as hO,z as pO,A as z,B as uO,F as ee,G as SO,H as C,J as Je,K as Le,E as k,M as j,O as Ke,Q as He,R as g,U as Fe,V as Ot,a as V,h as et,b as tt,c as at,d as it,e as rt,s as st,f as nt,g as lt,i as ot,r as Qt,j as ct,k as ht,l as pt,m as ut,n as St,o as $t,p as ft,q as dt,t as bO,C as G}from"./index-0935db40.js";class N{constructor(O,t,a,i,s,r,n,o,c,h=0,Q){this.p=O,this.stack=t,this.state=a,this.reducePos=i,this.pos=s,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=c,this.lookAhead=h,this.parent=Q}toString(){return`[${this.stack.filter((O,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,t,a=0){let i=O.parser.context;return new N(O,[],t,a,a,0,[],0,i?new xO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let t=O>>19,a=O&65535,{parser:i}=this.p,s=i.dynamicPrecedence(a);if(s&&(this.score+=s),t==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),a=2e3&&(n==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=o):this.p.lastBigReductionSizer;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,t,a,i=4,s=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&r.buffer[n-4]==0&&r.buffer[n-1]>-1){if(t==a)return;if(r.buffer[n-2]>=t){r.buffer[n-2]=a;return}}}if(!s||this.pos==a)this.buffer.push(O,t,a,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0)for(;r>0&&this.buffer[r-2]>a;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4);this.buffer[r]=O,this.buffer[r+1]=t,this.buffer[r+2]=a,this.buffer[r+3]=i}}shift(O,t,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=a,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,a,4);else{let s=O,{parser:r}=this.p;(a>this.pos||t<=r.maxNode)&&(this.pos=a,r.stateFlag(s,1)||(this.reducePos=a)),this.pushState(s,i),this.shiftContext(t,i),t<=r.maxNode&&this.buffer.push(t,i,a,4)}}apply(O,t,a){O&65536?this.reduce(O):this.shift(O,t,a)}useNode(O,t){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(t,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,t=O.buffer.length;for(;t>0&&O.buffer[t-2]>O.reducePos;)t-=4;let a=O.buffer.slice(t),i=O.bufferBase+t;for(;O&&i==O.bufferBase;)O=O.parent;return new N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,t){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,t,4),this.storeNode(0,this.pos,t,a?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(O){for(let t=new Pt(this);;){let a=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,O);if(a==0)return!1;if(!(a&65536))return!0;t.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let s=0,r;so&1&&n==r)||i.push(t[s],r)}t=i}let a=[];for(let i=0;i>19,i=O&65535,s=this.stack.length-a*3;if(s<0||t.getGoto(this.stack[s],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!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.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 t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class xO{constructor(O,t){this.tracker=O,this.context=t,this.hash=O.strict?O.hash(t):0}}var yO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth",e[e.MinBigReduction=2e3]="MinBigReduction"})(yO||(yO={}));class Pt{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let t=O&65535,a=O>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class B{constructor(O,t,a){this.stack=O,this.pos=t,this.index=a,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,t=O.bufferBase+O.buffer.length){return new B(O,t,t-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 B(this.stack,this.pos,this.index)}}function q(e,O=Uint16Array){if(typeof e!="string")return e;let t=null;for(let a=0,i=0;a=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),s+=o,n)break;s*=46}t?t[i++]=s:t=new O(s)}return t}class A{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const YO=new A;class gt{constructor(O,t){this.input=O,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=YO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(O,t){let a=this.range,i=this.rangeIndex,s=this.pos+O;for(;sa.to:s>=a.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];s+=r.from-a.to,a=r}return s}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,t.from);return this.end}peek(O){let t=this.chunkOff+O,a,i;if(t>=0&&t=this.chunk2Pos&&an.to&&(this.chunk2=this.chunk2.slice(0,n.to-a)),i=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),i}acceptToken(O,t=0){let a=t?this.resolveOffset(t,-1):this.pos;if(a==null||a=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,t){if(t?(this.token=t,t.start=O,t.lookAhead=O+1,t.value=t.extended=-1):this.token=YO,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&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,t-this.chunkPos);if(O>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,t-this.chunk2Pos);if(O>=this.range.from&&t<=this.range.to)return this.input.read(O,t);let a="";for(let i of this.ranges){if(i.from>=t)break;i.to>O&&(a+=this.input.read(Math.max(i.from,O),Math.min(i.to,t)))}return a}}class v{constructor(O,t){this.data=O,this.id=t}token(O,t){let{parser:a}=t.p;te(this.data,O,t,this.id,a.data,a.tokenPrecTable)}}v.prototype.contextual=v.prototype.fallback=v.prototype.extend=!1;class nO{constructor(O,t,a){this.precTable=t,this.elseToken=a,this.data=typeof O=="string"?q(O):O}token(O,t){let a=O.pos,i;for(;i=O.pos,te(this.data,O,t,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(i+1,O.token)}i>a&&(O.reset(a,O.token),O.acceptToken(this.elseToken,i-a))}}nO.prototype.contextual=v.prototype.fallback=v.prototype.extend=!1;class b{constructor(O,t={}){this.token=O,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function te(e,O,t,a,i,s){let r=0,n=1<0){let $=e[S];if(o.allows($)&&(O.token.value==-1||O.token.value==$||mt($,O.token.value,i,s))){O.acceptToken($);break}}let h=O.next,Q=0,u=e[r+2];if(O.next<0&&u>Q&&e[c+u*3-3]==65535&&e[c+u*3-3]==65535){r=e[c+u*3-1];continue O}for(;Q>1,$=c+S+(S<<1),y=e[$],Y=e[$+1]||65536;if(h=Y)Q=S+1;else{r=e[$+2],O.advance();continue O}}break}}function kO(e,O,t){for(let a=O,i;(i=e[a])!=65535;a++)if(i==t)return a-O;return-1}function mt(e,O,t,a){let i=kO(t,a,O);return i<0||kO(t,a,e)O)&&!a.type.isError)return t<0?Math.max(0,Math.min(a.to-1,O-25)):Math.min(e.length,Math.max(a.from+1,O+25));if(t<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return t<0?0:e.length}}class Xt{constructor(O,t){this.fragments=O,this.nodeSet=t,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?wO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?wO(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=r,null;if(s instanceof R){if(r==O){if(r=Math.max(this.safeFrom,O)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[t]++,this.nextStart=r+s.length}}}class Zt{constructor(O,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(a=>new A)}getActions(O){let t=0,a=null,{parser:i}=O.p,{tokenizers:s}=i,r=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let c=0;cQ.end+25&&(o=Math.max(Q.lookAhead,o)),Q.value!=0)){let u=t;if(Q.extended>-1&&(t=this.addActions(O,Q.extended,Q.end,t)),t=this.addActions(O,Q.value,Q.end,t),!h.extend&&(a=Q,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return o&&O.setLookAhead(o),!a&&O.pos==this.stream.end&&(a=new A,a.value=O.p.parser.eofTerm,a.start=a.end=O.pos,t=this.addActions(O,a.value,a.end,t)),this.mainToken=a,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let t=new A,{pos:a,p:i}=O;return t.start=a,t.end=Math.min(a+1,i.stream.end),t.value=a==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(O,t,a){let i=this.stream.clipPos(a.pos);if(t.token(this.stream.reset(i,O),a),O.value>-1){let{parser:s}=a.p;for(let r=0;r=0&&a.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,t,a,i){for(let s=0;sO.bufferLength*4?new Xt(a,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,t=this.minStackPos,a=this.stacks=[],i,s;if(this.bigReductionCount>1e3&&O.length==1){let[r]=O;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;rt)a.push(n);else{if(this.advanceStack(n,a,O))continue;{i||(i=[],s=[]),i.push(n);let o=this.tokens.getMainToken(n);s.push(o.value,o.end)}}break}}if(!a.length){let r=i&&yt(i);if(r)return this.stackToTree(r);if(this.parser.strict)throw m&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,a);if(r)return this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(a.length>r)for(a.sort((n,o)=>o.score-n.score);a.length>r;)a.pop();a.some(n=>n.reducePos>t)&&this.recovering--}else if(a.length>1){O:for(let r=0;r500&&c.buffer.length>500)if((n.score-c.score||n.buffer.length-c.buffer.length)>0)a.splice(o--,1);else{a.splice(r--,1);continue O}}}}this.minStackPos=a[0].pos;for(let r=1;r ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let c=O.curContext&&O.curContext.tracker.strict,h=c?O.curContext.hash:0;for(let Q=this.fragments.nodeAt(i);Q;){let u=this.parser.nodeSet.types[Q.type.id]==Q.type?s.getGoto(O.state,Q.type.id):-1;if(u>-1&&Q.length&&(!c||(Q.prop(QO.contextHash)||0)==h))return O.useNode(Q,u),m&&console.log(r+this.stackID(O)+` (via reuse of ${s.getName(Q.type.id)})`),!0;if(!(Q instanceof R)||Q.children.length==0||Q.positions[0]>0)break;let S=Q.children[0];if(S instanceof R&&Q.positions[0]==0)Q=S;else break}}let n=s.stateSlot(O.state,4);if(n>0)return O.reduce(n),m&&console.log(r+this.stackID(O)+` (via always-reduce ${s.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let c=0;ci?t.push($):a.push($)}return!1}advanceFully(O,t){let a=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>a)return TO(O,t),!0}}runRecovery(O,t,a){let i=null,s=!1;for(let r=0;r ":"";if(n.deadEnd&&(s||(s=!0,n.restart(),m&&console.log(h+this.stackID(n)+" (restarted)"),this.advanceFully(n,a))))continue;let Q=n.split(),u=h;for(let S=0;Q.forceReduce()&&S<10&&(m&&console.log(u+this.stackID(Q)+" (via force-reduce)"),!this.advanceFully(Q,a));S++)m&&(u=this.stackID(Q)+" -> ");for(let S of n.recoverByInsert(o))m&&console.log(h+this.stackID(S)+" (via recover-insert)"),this.advanceFully(S,a);this.stream.end>n.pos?(c==n.pos&&(c++,o=0),n.recoverByDelete(o,c),m&&console.log(h+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),TO(n,a)):(!i||i.scoree;class ae{constructor(O){this.start=O.start,this.shift=O.shift||F,this.reduce=O.reduce||F,this.reuse=O.reuse||F,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class w extends Ee{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let t=O.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)s(h,o,n[c++]);else{let Q=n[c+-h];for(let u=-h;u>0;u--)s(n[c++],o,Q);c++}}}this.nodeSet=new Ne(t.map((n,o)=>Be.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:a.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=De;let r=q(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new v(r,n):n),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,t,a){let i=new bt(this,O,t,a);for(let s of this.wrappers)i=s(i,O,t,a);return i}getGoto(O,t,a=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let r=i[s++],n=r&1,o=i[s++];if(n&&a)return o;for(let c=s+(r>>1);s0}validAction(O,t){if(t==this.stateSlot(O,4))return!0;for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else return!1;if(t==X(this.data,a+1))return!0}}nextStates(O){let t=[];for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else break;if(!(this.data[a+2]&1)){let i=this.data[a+1];t.some((s,r)=>r&1&&s==i)||t.push(this.data[a],i)}}return t}configure(O){let t=Object.assign(Object.create(w.prototype),this);if(O.props&&(t.nodeSet=this.nodeSet.extend(...O.props)),O.top){let a=this.topRules[O.top];if(!a)throw new RangeError(`Invalid top rule name ${O.top}`);t.top=a}return O.tokenizers&&(t.tokenizers=this.tokenizers.map(a=>{let i=O.tokenizers.find(s=>s.from==a);return i?i.to:a})),O.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((a,i)=>{let s=O.specializers.find(n=>n.from==a.external);if(!s)return a;let r=Object.assign(Object.assign({},a),{external:s.to});return t.specializers[i]=VO(r),r})),O.contextTracker&&(t.context=O.contextTracker),O.dialect&&(t.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(t.strict=O.strict),O.wrap&&(t.wrappers=t.wrappers.concat(O.wrap)),O.bufferLength!=null&&(t.bufferLength=O.bufferLength),t}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 t=this.dynamicPrecedences;return t==null?0:t[O]||0}parseDialect(O){let t=Object.keys(this.dialects),a=t.map(()=>!1);if(O)for(let s of O.split(" ")){let r=t.indexOf(s);r>=0&&(a[r]=!0)}let i=null;for(let s=0;sa)&&t.p.parser.stateFlag(t.state,2)&&(!O||O.scoree.external(t,a)<<1|O}return e.get}const Yt=54,kt=1,vt=55,wt=2,Wt=56,Tt=3,D=4,ie=5,re=6,se=7,ne=8,Vt=9,Ut=10,_t=11,OO=57,qt=12,UO=58,jt=18,Ct=20,le=21,Gt=22,lO=24,oe=25,Rt=27,zt=30,At=33,Qe=35,It=36,Et=0,Nt={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},Bt={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},_O={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 Dt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function ce(e){return e==9||e==10||e==13||e==32}let qO=null,jO=null,CO=0;function oO(e,O){let t=e.pos+O;if(CO==t&&jO==e)return qO;let a=e.peek(O);for(;ce(a);)a=e.peek(++O);let i="";for(;Dt(a);)i+=String.fromCharCode(a),a=e.peek(++O);return jO=e,CO=t,qO=i?i.toLowerCase():a==Mt||a==Jt?void 0:null}const he=60,pe=62,ue=47,Mt=63,Jt=33,Lt=45;function GO(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let t=0;t-1?new GO(oO(a,1)||"",e):e},reduce(e,O){return O==jt&&e?e.parent:e},reuse(e,O,t,a){let i=O.type.id;return i==D||i==Qe?new GO(oO(a,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Ft=new b((e,O)=>{if(e.next!=he){e.next<0&&O.context&&e.acceptToken(OO);return}e.advance();let t=e.next==ue;t&&e.advance();let a=oO(e,0);if(a===void 0)return;if(!a)return e.acceptToken(t?qt:D);let i=O.context?O.context.name:null;if(t){if(a==i)return e.acceptToken(Vt);if(i&&Bt[i])return e.acceptToken(OO,-2);if(O.dialectEnabled(Et))return e.acceptToken(Ut);for(let s=O.context;s;s=s.parent)if(s.name==a)return;e.acceptToken(_t)}else{if(a=="script")return e.acceptToken(ie);if(a=="style")return e.acceptToken(re);if(a=="textarea")return e.acceptToken(se);if(Nt.hasOwnProperty(a))return e.acceptToken(ne);i&&_O[i]&&_O[i][a]?e.acceptToken(OO,-1):e.acceptToken(D)}},{contextual:!0}),Oa=new b(e=>{for(let O=0,t=0;;t++){if(e.next<0){t&&e.acceptToken(UO);break}if(e.next==Lt)O++;else if(e.next==pe&&O>=2){t>3&&e.acceptToken(UO,-2);break}else O=0;e.advance()}});function $O(e,O,t){let a=2+e.length;return new b(i=>{for(let s=0,r=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(s==0&&i.next==he||s==1&&i.next==ue||s>=2&&sr?i.acceptToken(O,-r):i.acceptToken(t,-(r-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else s=r=0;i.advance()}})}const ea=$O("script",Yt,kt),ta=$O("style",vt,wt),aa=$O("textarea",Wt,Tt),ia=cO({"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}),ra=w.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DTO$tQ!bO'#DVO$yQ!bO'#DWOOOW'#Dk'#DkOOOW'#DY'#DYQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%sQ#tO,59mOOOX'#D^'#D^O%{OXO'#CwO&WOXO,59YOOOY'#D_'#D_O&`OYO'#CzO&kOYO,59YOOO['#D`'#D`O&sO[O'#C}O'OO[O,59YOOOW'#Da'#DaO'WOxO,59YO'_Q!bO'#DQOOOW,59Y,59YOOO`'#Db'#DbO'dO!rO,59oOOOW,59o,59oO'lQ!bO,59qO'qQ!bO,59rOOOW-E7W-E7WO'vQ#tO'#CqOOQO'#DZ'#DZO(UQ#tO1G.uOOOX1G.u1G.uO(^Q#tO1G/POOOY1G/P1G/PO(fQ#tO1G/SOOO[1G/S1G/SO(nQ#tO1G/VOOOW1G/V1G/VOOOW1G/X1G/XO(yQ#tO1G/XOOOX-E7[-E7[O)RQ!bO'#CxOOOW1G.t1G.tOOOY-E7]-E7]O)WQ!bO'#C{OOO[-E7^-E7^O)]Q!bO'#DOOOOW-E7_-E7_O)bQ!bO,59lOOO`-E7`-E7`OOOW1G/Z1G/ZOOOW1G/]1G/]OOOW1G/^1G/^O)gQ&jO,59]OOQO-E7X-E7XOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$qOOOW7+$s7+$sO)rQ!bO,59dO)wQ!bO,59gO)|Q!bO,59jOOOW1G/W1G/WO*RO,UO'#CtO*dO7[O'#CtOOQO1G.w1G.wOOOW1G/O1G/OOOOW1G/R1G/ROOOW1G/U1G/UOOOO'#D['#D[O*uO,UO,59`OOQO,59`,59`OOOO'#D]'#D]O+WO7[O,59`OOOO-E7Y-E7YOOQO1G.z1G.zOOOO-E7Z-E7Z",stateData:"+u~O!^OS~OSSOTPOUQOVROWTOY]OZ[O[^O^^O_^O`^Oa^Ox^O{_O!dZO~OdaO~OdbO~OdcO~OddO~OdeO~O!WfOPkP!ZkP~O!XiOQnP!ZnP~O!YlORqP!ZqP~OSSOTPOUQOVROWTOXqOY]OZ[O[^O^^O_^O`^Oa^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OdvO~OdwO~OfyOj|O~OfyOj!OO~OfyOj!QO~OfyOj!SOv!TO~OfyOj!TO~O!WfOPkX!ZkX~OP!WO!Z!XO~O!XiOQnX!ZnX~OQ!ZO!Z!XO~O!YlORqX!ZqX~OR!]O!Z!XO~O!Z!XO~P#dOd!_O~O![sO!e!aO~Oj!bO~Oj!cO~Og!dOfeXjeXveX~OfyOj!fO~OfyOj!gO~OfyOj!hO~OfyOj!iOv!jO~OfyOj!jO~Od!kO~Od!lO~Od!mO~Oj!nO~Oi!qO!`!oO!b!pO~Oj!rO~Oj!sO~Oj!tO~O_!uO`!uOa!uO!`!wO!a!uO~O_!xO`!xOa!xO!b!wO!c!xO~O_!uO`!uOa!uO!`!{O!a!uO~O_!xO`!xOa!xO!b!{O!c!xO~Ov~vj`!dx{_a_~",goto:"%p!`PPPPPPPPPPPPPPPPPP!a!gP!mPP!yPP!|#P#S#Y#]#`#f#i#l#r#xP!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ht,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,39,40,41,42,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag",38,"StartTag"]],propSources:[ia],skippedNodes:[0],repeatNodeCount:9,tokenData:"#(r!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q!!O!Q![-_![!]!$c!]!^-_!^!_!(k!_!`#'S!`!a#'z!a!c-_!c!}!$c!}#R-_#R#S!$c#S#T3V#T#o!$c#o#s-_#s$f$q$f%W-_%W%o!$c%o%p-_%p&a!$c&a&b-_&b1p!$c1p4U-_4U4d!$c4d4e-_4e$IS!$c$IS$I`-_$I`$Ib!$c$Ib$Kh-_$Kh%#t!$c%#t&/x-_&/x&Et!$c&Et&FV-_&FV;'S!$c;'S;:j!(e;:j;=`4s<%l?&r-_?&r?Ah!$c?Ah?BY$q?BY?Mn!$c?MnO$q!Z$|c^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX^P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT^POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W^P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYiWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`^P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljfS^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ecfSiWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXfSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbfS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bcfS^P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjfSiWa!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibiWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`O_!R!R9cP;=`<%l8q!Z9mYiW_!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjfSiWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_{let c=n.type.id;if(c==Rt)return eO(n,o,t);if(c==zt)return eO(n,o,a);if(c==At)return eO(n,o,i);if(c==Qe&&s.length){let h=n.node,Q=RO(h,o),u;for(let S of s)if(S.tag==Q&&(!S.attrs||S.attrs(u||(u=Se(h,o))))){let $=h.parent.lastChild;return{parser:S.parser,overlay:[{from:n.to,to:$.type.id==It?$.from:h.parent.to}]}}}if(r&&c==le){let h=n.node,Q;if(Q=h.firstChild){let u=r[o.read(Q.from,Q.to)];if(u)for(let S of u){if(S.tagName&&S.tagName!=RO(h.parent,o))continue;let $=h.lastChild;if($.type.id==lO)return{parser:S.parser,overlay:[{from:$.from+1,to:$.to-1}]};if($.type.id==oe)return{parser:S.parser,overlay:[{from:$.from,to:$.to}]}}}}return null})}const sa=94,zO=1,na=95,la=96,AO=2,fe=[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],oa=58,Qa=40,de=95,ca=91,I=45,ha=46,pa=35,ua=37;function M(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function Sa(e){return e>=48&&e<=57}const $a=new b((e,O)=>{for(let t=!1,a=0,i=0;;i++){let{next:s}=e;if(M(s)||s==I||s==de||t&&Sa(s))!t&&(s!=I||i>0)&&(t=!0),a===i&&s==I&&a++,e.advance();else{t&&e.acceptToken(s==Qa?na:a==2&&O.canShift(AO)?AO:la);break}}}),fa=new b(e=>{if(fe.includes(e.peek(-1))){let{next:O}=e;(M(O)||O==de||O==pa||O==ha||O==ca||O==oa||O==I)&&e.acceptToken(sa)}}),da=new b(e=>{if(!fe.includes(e.peek(-1))){let{next:O}=e;if(O==ua&&(e.advance(),e.acceptToken(zO)),M(O)){do e.advance();while(M(e.next));e.acceptToken(zO)}}}),Pa=cO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,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,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),ga={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},ma={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},Xa={__proto__:null,not:128,only:128,from:158,to:160},Za=w.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[fa,da,$a,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>ga[e]||-1},{term:56,get:e=>ma[e]||-1},{term:96,get:e=>Xa[e]||-1}],tokenPrec:1123});let tO=null;function aO(){if(!tO&&typeof document=="object"&&document.body){let e=[];for(let O in document.body.style)/[A-Z]|^-|^(item|length)$/.test(O)||e.push(O);tO=e.sort().map(O=>({type:"property",label:O}))}return tO||[]}const IO=["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})),EO=["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}))),ba=["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})),x=/^[\w-]*/,xa=e=>{let{state:O,pos:t}=e,a=C(O).resolveInner(t,-1);if(a.name=="PropertyName")return{from:a.from,options:aO(),validFor:x};if(a.name=="ValueName")return{from:a.from,options:EO,validFor:x};if(a.name=="PseudoClassName")return{from:a.from,options:IO,validFor:x};if(a.name=="TagName"){for(let{parent:r}=a;r;r=r.parent)if(r.name=="Block")return{from:a.from,options:aO(),validFor:x};return{from:a.from,options:ba,validFor:x}}if(!e.explicit)return null;let i=a.resolve(t),s=i.childBefore(t);return s&&s.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:IO,validFor:x}:s&&s.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:EO,validFor:x}:i.name=="Block"?{from:t,options:aO(),validFor:x}:null},J=hO.define({name:"css",parser:Za.configure({props:[pO.add({Declaration:z()}),uO.add({Block:ee})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ya(){return new SO(J,J.data.of({autocomplete:xa}))}const NO=301,BO=1,Ya=2,DO=302,ka=304,va=305,wa=3,Wa=4,Ta=[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],Pe=125,Va=59,MO=47,Ua=42,_a=43,qa=45,ja=new ae({start:!1,shift(e,O){return O==wa||O==Wa||O==ka?e:O==va},strict:!1}),Ca=new b((e,O)=>{let{next:t}=e;(t==Pe||t==-1||O.context)&&O.canShift(DO)&&e.acceptToken(DO)},{contextual:!0,fallback:!0}),Ga=new b((e,O)=>{let{next:t}=e,a;Ta.indexOf(t)>-1||t==MO&&((a=e.peek(1))==MO||a==Ua)||t!=Pe&&t!=Va&&t!=-1&&!O.context&&O.canShift(NO)&&e.acceptToken(NO)},{contextual:!0}),Ra=new b((e,O)=>{let{next:t}=e;if((t==_a||t==qa)&&(e.advance(),t==e.next)){e.advance();let a=!O.context&&O.canShift(BO);e.acceptToken(a?BO:Ya)}},{contextual:!0}),za=cO({"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 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: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)}),Aa={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:219,private:219,protected:219,readonly:221,instanceof:240,satisfies:243,in:244,const:246,import:278,keyof:333,unique:337,infer:343,is:379,abstract:399,implements:401,type:403,let:406,var:408,interface:415,enum:419,namespace:425,module:427,declare:431,global:435,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},Ia={__proto__:null,async:117,get:119,set:121,public:181,private:181,protected:181,static:183,abstract:185,override:187,readonly:193,accessor:195,new:383},Ea={__proto__:null,"<":137},Na=w.deserialize({version:14,states:"$BhO`QUOOO%QQUOOO'TQWOOP(_OSOOO*mQ(CjO'#CfO*tOpO'#CgO+SO!bO'#CgO+bO07`O'#DZO-sQUO'#DaO.TQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0rQSO'#ETOOQO'#I_'#I_O0zQSO'#GjOOQO'#Eh'#EhO1VQSO'#EgO1[QSO'#EgO3^Q(CjO'#JbO5}Q(CjO'#JcO6kQSO'#FVO6pQ#tO'#FnOOQ(CY'#F_'#F_O6{O&jO'#F_O7ZQ,UO'#FuO8qQSO'#FtOOQ(CY'#Jc'#JcOOQ(CW'#Jb'#JbOOQQ'#J|'#J|O8vQSO'#IOO8{Q(C[O'#IPOOQQ'#JO'#JOOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9TQUO'#DzO%QQUO'#D|O9[QSO'#GjO9aQ,UO'#ClO9oQSO'#EfO9zQSO'#EqO:PQ,UO'#F^O:nQSO'#GjO:sQSO'#GnO;OQSO'#GnO;^QSO'#GqO;^QSO'#GrO;^QSO'#GtO9[QSO'#GwO;}QSO'#GzO=`QSO'#CbO=pQSO'#HXO=xQSO'#H_O=xQSO'#HaO`QUO'#HcO=xQSO'#HeO=xQSO'#HhO=}QSO'#HnO>SQ(C]O'#HtO%QQUO'#HvO>_Q(C]O'#HxO>jQ(C]O'#HzO8{Q(C[O'#H|O>uQ(CjO'#CfO?wQWO'#DfQOQSOOO@_QSO'#EPO9aQ,UO'#EfO@jQSO'#EfO@uQ`O'#F^OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jf'#JfO%QQUO'#JfOBOQWO'#E_OOQ(CW'#E^'#E^OBYQ(C`O'#E_OBtQWO'#ESOOQO'#Ji'#JiOCYQWO'#ESOCgQWO'#E_OC}QWO'#EeODQQWO'#E_O@}QWO'#E_OBtQWO'#E_PDkO?MpO'#C`POOO)CDm)CDmOOOO'#IU'#IUODvOpO,59ROOQ(CY,59R,59ROOOO'#IV'#IVOEUO!bO,59RO%QQUO'#D]OOOO'#IX'#IXOEdO07`O,59uOOQ(CY,59u,59uOErQUO'#IYOFVQSO'#JdOHXQbO'#JdO+pQUO'#JdOH`QSO,59{OHvQSO'#EhOITQSO'#JqOI`QSO'#JpOI`QSO'#JpOIhQSO,5;UOImQSO'#JoOOQ(CY,5:W,5:WOItQUO,5:WOKuQ(CjO,5:bOLfQSO,5:jOLkQSO'#JmOMeQ(C[O'#JnO:sQSO'#JmOMlQSO'#JmOMtQSO,5;TOMyQSO'#JmOOQ(CY'#Cf'#CfO%QQUO'#EOONmQ`O,5:oOOQO'#Jj'#JjOOQO-E<]-E<]O9[QSO,5=UO! TQSO,5=UO! YQUO,5;RO!#]Q,UO'#EcO!$pQSO,5;RO!&YQ,UO'#DpO!&aQUO'#DuO!&kQWO,5;[O!&sQWO,5;[O%QQUO,5;[OOQQ'#E}'#E}OOQQ'#FP'#FPO%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]OOQQ'#FT'#FTO!'RQUO,5;nOOQ(CY,5;s,5;sOOQ(CY,5;t,5;tO!)UQSO,5;tOOQ(CY,5;u,5;uO%QQUO'#IeO!)^Q(C[O,5jOOQQ'#JW'#JWOOQQ,5>k,5>kOOQQ-EgQWO'#EkOOQ(CW'#Jo'#JoO!>nQ(C[O'#J}O8{Q(C[O,5=YO;^QSO,5=`OOQO'#Cr'#CrO!>yQWO,5=]O!?RQ,UO,5=^O!?^QSO,5=`O!?cQ`O,5=cO=}QSO'#G|O9[QSO'#HOO!?kQSO'#HOO9aQ,UO'#HRO!?pQSO'#HROOQQ,5=f,5=fO!?uQSO'#HSO!?}QSO'#ClO!@SQSO,58|O!@^QSO,58|O!BfQUO,58|OOQQ,58|,58|O!BsQ(C[O,58|O%QQUO,58|O!COQUO'#HZOOQQ'#H['#H[OOQQ'#H]'#H]O`QUO,5=sO!C`QSO,5=sO`QUO,5=yO`QUO,5={O!CeQSO,5=}O`QUO,5>PO!CjQSO,5>SO!CoQUO,5>YOOQQ,5>`,5>`O%QQUO,5>`O8{Q(C[O,5>bOOQQ,5>d,5>dO!GvQSO,5>dOOQQ,5>f,5>fO!GvQSO,5>fOOQQ,5>h,5>hO!G{QWO'#DXO%QQUO'#JfO!HjQWO'#JfO!IXQWO'#DgO!IjQWO'#DgO!K{QUO'#DgO!LSQSO'#JeO!L[QSO,5:QO!LaQSO'#ElO!LoQSO'#JrO!LwQSO,5;VO!L|QWO'#DgO!MZQWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!MbQSO,5:kO=}QSO,5;QO!;xQWO,5;QO!tO+pQUO,5>tOOQO,5>z,5>zO#$vQUO'#IYOOQO-EtO$8XQSO1G5jO$8aQSO1G5vO$8iQbO1G5wO:sQSO,5>zO$8sQSO1G5sO$8sQSO1G5sO:sQSO1G5sO$8{Q(CjO1G5tO%QQUO1G5tO$9]Q(C[O1G5tO$9nQSO,5>|O:sQSO,5>|OOQO,5>|,5>|O$:SQSO,5>|OOQO-E<`-E<`OOQO1G0]1G0]OOQO1G0_1G0_O!)XQSO1G0_OOQQ7+([7+([O!#]Q,UO7+([O%QQUO7+([O$:bQSO7+([O$:mQ,UO7+([O$:{Q(CjO,59nO$=TQ(CjO,5UOOQQ,5>U,5>UO%QQUO'#HkO%&qQSO'#HmOOQQ,5>[,5>[O:sQSO,5>[OOQQ,5>^,5>^OOQQ7+)`7+)`OOQQ7+)f7+)fOOQQ7+)j7+)jOOQQ7+)l7+)lO%&vQWO1G5lO%'[Q$IUO1G0rO%'fQSO1G0rOOQO1G/m1G/mO%'qQ$IUO1G/mO=}QSO1G/mO!'RQUO'#DgOOQO,5>u,5>uOOQO-E{,5>{OOQO-E<_-E<_O!;xQWO1G/mOOQO-E<[-E<[OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO!MeQSO7+%qOOQ(CY7+&W7+&WO=}QSO7+&WO!;xQWO7+&WOOQO7+%t7+%tO$7kQ(CjO7+&POOQO7+&P7+&PO%QQUO7+&PO%'{Q(C[O7+&PO=}QSO7+%tO!;xQWO7+%tO%(WQ(C[O7+&POBtQWO7+%tO%(fQ(C[O7+&PO%(zQ(C`O7+&PO%)UQWO7+%tOBtQWO7+&PO%)cQWO7+&PO%)yQSO7++_O%)yQSO7++_O%*RQ(CjO7++`O%QQUO7++`OOQO1G4h1G4hO:sQSO1G4hO%*cQSO1G4hOOQO7+%y7+%yO!MeQSO<vOOQO-EwO%QQUO,5>wOOQO-ESQ$IUO1G0wO%>ZQ$IUO1G0wO%@RQ$IUO1G0wO%@fQ(CjO<VOOQQ,5>X,5>XO&#WQSO1G3vO:sQSO7+&^O!'RQUO7+&^OOQO7+%X7+%XO&#]Q$IUO1G5wO=}QSO7+%XOOQ(CY<zAN>zO%QQUOAN?VO=}QSOAN>zO&<^Q(C[OAN?VO!;xQWOAN>zO&zO&RO!V+iO^(qX'j(qX~O#W+mO'|%OO~Og+pO!X$yO'|%OO~O!X+rO~Oy+tO!XXO~O!t+yO~Ob,OO~O's#jO!W(sP~Ob%lO~O%a!OO's%|O~PRO!V,yO!W(fa~O!W2SO~P'TO^%^O#W2]O'j%^O~O^%^O!a#rO#W2]O'j%^O~O^%^O!a#rO!h%ZO!l2aO#W2]O'j%^O'|%OO(`'dO~O!]2bO!^2bO't!iO~PBtO![2eO!]2bO!^2bO#S2fO#T2fO't!iO~PBtO![2eO!]2bO!^2bO#P2gO#S2fO#T2fO't!iO~PBtO^%^O!a#rO!l2aO#W2]O'j%^O(`'dO~O^%^O'j%^O~P!3jO!V$^Oo$ja~O!S&|i!V&|i~P!3jO!V'xO!S(Wi~O!V(PO!S(di~O!S(ei!V(ei~P!3jO!V(]O!g(ai~O!V(bi!g(bi^(bi'j(bi~P!3jO#W2kO!V(bi!g(bi^(bi'j(bi~O|%vO!X%wO!x]O#a2nO#b2mO's%eO~O|%vO!X%wO#b2mO's%eO~Og2uO!X'QO%`2tO~Og2uO!X'QO%`2tO'|%OO~O#cvaPvaXva^vakva!eva!fva!hva!lva#fva#gva#hva#iva#jva#kva#lva#mva#nva#pva#rva#tva#uva'jva(Qva(`va!gva!Sva'hvaova!Xva%`va!ava~P#M{O#c$kaP$kaX$ka^$kak$kaz$ka!e$ka!f$ka!h$ka!l$ka#f$ka#g$ka#h$ka#i$ka#j$ka#k$ka#l$ka#m$ka#n$ka#p$ka#r$ka#t$ka#u$ka'j$ka(Q$ka(`$ka!g$ka!S$ka'h$kao$ka!X$ka%`$ka!a$ka~P#NqO#c$maP$maX$ma^$mak$maz$ma!e$ma!f$ma!h$ma!l$ma#f$ma#g$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#p$ma#r$ma#t$ma#u$ma'j$ma(Q$ma(`$ma!g$ma!S$ma'h$mao$ma!X$ma%`$ma!a$ma~P$ dO#c${aP${aX${a^${ak${az${a!V${a!e${a!f${a!h${a!l${a#f${a#g${a#h${a#i${a#j${a#k${a#l${a#m${a#n${a#p${a#r${a#t${a#u${a'j${a(Q${a(`${a!g${a!S${a'h${a#W${ao${a!X${a%`${a!a${a~P#(yO^#Zq!V#Zq'j#Zq'h#Zq!S#Zq!g#Zqo#Zq!X#Zq%`#Zq!a#Zq~P!3jOd'OX!V'OX~P!$uO!V._Od(Za~O!U2}O!V'PX!g'PX~P%QO!V.bO!g([a~O!V.bO!g([a~P!3jO!S3QO~O#x!ja!W!ja~PI{O#x!ba!V!ba!W!ba~P#?dO#x!na!W!na~P!6TO#x!pa!W!pa~P!8nO!X3dO$TfO$^3eO~O!W3iO~Oo3jO~P#(yO^$gq!V$gq'j$gq'h$gq!S$gq!g$gqo$gq!X$gq%`$gq!a$gq~P!3jO!S3kO~Ol.}O'uTO'xUO~Oy)sO|)tO(h)xOg%Wi(g%Wi!V%Wi#W%Wi~Od%Wi#x%Wi~P$HbOy)sO|)tOg%Yi(g%Yi(h%Yi!V%Yi#W%Yi~Od%Yi#x%Yi~P$ITO(`$WO~P#(yO!U3nO's%eO!V'YX!g'YX~O!V/VO!g(ma~O!V/VO!a#rO!g(ma~O!V/VO!a#rO(`'dO!g(ma~Od$ti!V$ti#W$ti#x$ti~P!-jO!U3vO's*UO!S'[X!V'[X~P!.XO!V/_O!S(na~O!V/_O!S(na~P#(yO!a#rO~O!a#rO#n4OO~Ok4RO!a#rO(`'dO~Od(Oi!V(Oi~P!-jO#W4UOd(Oi!V(Oi~P!-jO!g4XO~O^$hq!V$hq'j$hq'h$hq!S$hq!g$hqo$hq!X$hq%`$hq!a$hq~P!3jO!V4]O!X(oX~P#(yO!f#tO~P3zO!X$rX%TYX^$rX!V$rX'j$rX~P!,aO%T4_OghXyhX|hX!XhX(ghX(hhX^hX!VhX'jhX~O%T4_O~O%a4fO's+WO'uTO'xUO!V'eX!W'eX~O!V0_O!W(ua~OX4jO~O]4kO~O!S4oO~O^%^O'j%^O~P#(yO!X$yO~P#(yO!V4tO#W4vO!W(rX~O!W4wO~Ol!kO|4yO![5WO!]4}O!^4}O!x;oO!|5VO!}5UO#O5UO#P5TO#S5SO#T!wO't!iO'uTO'xUO(T!jO(_!nO~O!W5RO~P%#XOg5]O!X0zO%`5[O~Og5]O!X0zO%`5[O'|%OO~O's#jO!V'dX!W'dX~O!V1VO!W(sa~O'uTO'xUO(T5fO~O]5jO~O!g5mO~P%QO^5oO~O^5oO~P%QO#n5qO&Q5rO~PMPO_1mO!W5vO&`1lO~P`O!a5xO~O!a5zO!V(Yi!W(Yi!a(Yi!h(Yi'|(Yi~O!V#`i!W#`i~P#?dO#W5{O!V#`i!W#`i~O!V!Zi!W!Zi~P#?dO^%^O#W6UO'j%^O~O^%^O!a#rO#W6UO'j%^O~O^%^O!a#rO!l6ZO#W6UO'j%^O(`'dO~O!h%ZO'|%OO~P%(fO!]6[O!^6[O't!iO~PBtO![6_O!]6[O!^6[O#S6`O#T6`O't!iO~PBtO!V(]O!g(aq~O!V(bq!g(bq^(bq'j(bq~P!3jO|%vO!X%wO#b6dO's%eO~O!X'QO%`6gO~Og6jO!X'QO%`6gO~O#c%WiP%WiX%Wi^%Wik%Wiz%Wi!e%Wi!f%Wi!h%Wi!l%Wi#f%Wi#g%Wi#h%Wi#i%Wi#j%Wi#k%Wi#l%Wi#m%Wi#n%Wi#p%Wi#r%Wi#t%Wi#u%Wi'j%Wi(Q%Wi(`%Wi!g%Wi!S%Wi'h%Wio%Wi!X%Wi%`%Wi!a%Wi~P$HbO#c%YiP%YiX%Yi^%Yik%Yiz%Yi!e%Yi!f%Yi!h%Yi!l%Yi#f%Yi#g%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#p%Yi#r%Yi#t%Yi#u%Yi'j%Yi(Q%Yi(`%Yi!g%Yi!S%Yi'h%Yio%Yi!X%Yi%`%Yi!a%Yi~P$ITO#c$tiP$tiX$ti^$tik$tiz$ti!V$ti!e$ti!f$ti!h$ti!l$ti#f$ti#g$ti#h$ti#i$ti#j$ti#k$ti#l$ti#m$ti#n$ti#p$ti#r$ti#t$ti#u$ti'j$ti(Q$ti(`$ti!g$ti!S$ti'h$ti#W$tio$ti!X$ti%`$ti!a$ti~P#(yOd'Oa!V'Oa~P!-jO!V'Pa!g'Pa~P!3jO!V.bO!g([i~O#x#Zi!V#Zi!W#Zi~P#?dOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO(QVOX#eik#ei!e#ei#g#ei#h#ei#i#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~O#f#ei~P%2xO#f;wO~P%2xOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO#f;wO#g;xO#h;xO#i;xO(QVOX#ei!e#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~Ok#ei~P%5TOk;yO~P%5TOP$YOk;yOy#vOz#wO|#xO!f#tO!h#uO!l$YO#f;wO#g;xO#h;xO#i;xO#j;zO(QVO#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~OX#ei!e#ei#k#ei#l#ei#m#ei#n#ei~P%7`OXbO^#vy!V#vy'j#vy'h#vy!S#vy!g#vyo#vy!X#vy%`#vy!a#vy~P!3jOg=jOy)sO|)tO(g)vO(h)xO~OP#eiX#eik#eiz#ei!e#ei!f#ei!h#ei!l#ei#f#ei#g#ei#h#ei#i#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(Q#ei(`#ei!V#ei!W#ei~P%AYO!f#tOP(PXX(PXg(PXk(PXy(PXz(PX|(PX!e(PX!h(PX!l(PX#f(PX#g(PX#h(PX#i(PX#j(PX#k(PX#l(PX#m(PX#n(PX#p(PX#r(PX#t(PX#u(PX#x(PX(Q(PX(`(PX(g(PX(h(PX!V(PX!W(PX~O#x#yi!V#yi!W#yi~P#?dO#x!ni!W!ni~P$!qO!W6vO~O!V'Xa!W'Xa~P#?dO!a#rO(`'dO!V'Ya!g'Ya~O!V/VO!g(mi~O!V/VO!a#rO!g(mi~Od$tq!V$tq#W$tq#x$tq~P!-jO!S'[a!V'[a~P#(yO!a6}O~O!V/_O!S(ni~P#(yO!V/_O!S(ni~O!S7RO~O!a#rO#n7WO~Ok7XO!a#rO(`'dO~O!S7ZO~Od$vq!V$vq#W$vq#x$vq~P!-jO^$hy!V$hy'j$hy'h$hy!S$hy!g$hyo$hy!X$hy%`$hy!a$hy~P!3jO!V4]O!X(oa~O^#Zy!V#Zy'j#Zy'h#Zy!S#Zy!g#Zyo#Zy!X#Zy%`#Zy!a#Zy~P!3jOX7`O~O!V0_O!W(ui~O]7fO~O!a5zO~O(T(qO!V'aX!W'aX~O!V4tO!W(ra~O!h%ZO'|%OO^(YX!a(YX!l(YX#W(YX'j(YX(`(YX~O's7oO~P.[O!x;oO!|7rO!}7qO#O7qO#P7pO#S'bO#T'bO~PBtO^%^O!a#rO!l'hO#W'fO'j%^O(`'dO~O!W7vO~P%#XOl!kO'uTO'xUO(T!jO(_!nO~O|7wO~P%MdO![7{O!]7zO!^7zO#P7pO#S'bO#T'bO't!iO~PBtO![7{O!]7zO!^7zO!}7|O#O7|O#P7pO#S'bO#T'bO't!iO~PBtO!]7zO!^7zO't!iO(T!jO(_!nO~O!X0zO~O!X0zO%`8OO~Og8RO!X0zO%`8OO~OX8WO!V'da!W'da~O!V1VO!W(si~O!g8[O~O!g8]O~O!g8^O~O!g8^O~P%QO^8`O~O!a8cO~O!g8dO~O!V(ei!W(ei~P#?dO^%^O#W8lO'j%^O~O^%^O!a#rO#W8lO'j%^O~O^%^O!a#rO!l8pO#W8lO'j%^O(`'dO~O!h%ZO'|%OO~P&$QO!]8qO!^8qO't!iO~PBtO!V(]O!g(ay~O!V(by!g(by^(by'j(by~P!3jO!X'QO%`8uO~O#c$tqP$tqX$tq^$tqk$tqz$tq!V$tq!e$tq!f$tq!h$tq!l$tq#f$tq#g$tq#h$tq#i$tq#j$tq#k$tq#l$tq#m$tq#n$tq#p$tq#r$tq#t$tq#u$tq'j$tq(Q$tq(`$tq!g$tq!S$tq'h$tq#W$tqo$tq!X$tq%`$tq!a$tq~P#(yO#c$vqP$vqX$vq^$vqk$vqz$vq!V$vq!e$vq!f$vq!h$vq!l$vq#f$vq#g$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#p$vq#r$vq#t$vq#u$vq'j$vq(Q$vq(`$vq!g$vq!S$vq'h$vq#W$vqo$vq!X$vq%`$vq!a$vq~P#(yO!V'Pi!g'Pi~P!3jO#x#Zq!V#Zq!W#Zq~P#?dOy/yOz/yO|/zOPvaXvagvakva!eva!fva!hva!lva#fva#gva#hva#iva#jva#kva#lva#mva#nva#pva#rva#tva#uva#xva(Qva(`va(gva(hva!Vva!Wva~Oy)sO|)tOP$kaX$kag$kak$kaz$ka!e$ka!f$ka!h$ka!l$ka#f$ka#g$ka#h$ka#i$ka#j$ka#k$ka#l$ka#m$ka#n$ka#p$ka#r$ka#t$ka#u$ka#x$ka(Q$ka(`$ka(g$ka(h$ka!V$ka!W$ka~Oy)sO|)tOP$maX$mag$mak$maz$ma!e$ma!f$ma!h$ma!l$ma#f$ma#g$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#p$ma#r$ma#t$ma#u$ma#x$ma(Q$ma(`$ma(g$ma(h$ma!V$ma!W$ma~OP${aX${ak${az${a!e${a!f${a!h${a!l${a#f${a#g${a#h${a#i${a#j${a#k${a#l${a#m${a#n${a#p${a#r${a#t${a#u${a#x${a(Q${a(`${a!V${a!W${a~P%AYO#x$gq!V$gq!W$gq~P#?dO#x$hq!V$hq!W$hq~P#?dO!W9PO~O#x9QO~P!-jO!a#rO!V'Yi!g'Yi~O!a#rO(`'dO!V'Yi!g'Yi~O!V/VO!g(mq~O!S'[i!V'[i~P#(yO!V/_O!S(nq~O!S9WO~P#(yO!S9WO~Od(Oy!V(Oy~P!-jO!V'_a!X'_a~P#(yO!X%Sq^%Sq!V%Sq'j%Sq~P#(yOX9]O~O!V0_O!W(uq~O#W9aO!V'aa!W'aa~O!V4tO!W(ri~P#?dOPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#WYX#ccX#fYX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#pYX#rYX#tYX#uYX#zYX(QYX(`YX(gYX(hYX~O!a%QX#n%QX~P&6lO#S-cO#T-cO~PBtO#P9eO#S-cO#T-cO~PBtO!}9fO#O9fO#P9eO#S-cO#T-cO~PBtO!]9iO!^9iO't!iO(T!jO(_!nO~O![9lO!]9iO!^9iO#P9eO#S-cO#T-cO't!iO~PBtO!X0zO%`9oO~O'uTO'xUO(T9tO~O!V1VO!W(sq~O!g9wO~O!g9wO~P%QO!g9yO~O!g9zO~O#W9|O!V#`y!W#`y~O!V#`y!W#`y~P#?dO^%^O#W:QO'j%^O~O^%^O!a#rO#W:QO'j%^O~O^%^O!a#rO!l:UO#W:QO'j%^O(`'dO~O!X'QO%`:XO~O#x#vy!V#vy!W#vy~P#?dOP$tiX$tik$tiz$ti!e$ti!f$ti!h$ti!l$ti#f$ti#g$ti#h$ti#i$ti#j$ti#k$ti#l$ti#m$ti#n$ti#p$ti#r$ti#t$ti#u$ti#x$ti(Q$ti(`$ti!V$ti!W$ti~P%AYOy)sO|)tO(h)xOP%WiX%Wig%Wik%Wiz%Wi!e%Wi!f%Wi!h%Wi!l%Wi#f%Wi#g%Wi#h%Wi#i%Wi#j%Wi#k%Wi#l%Wi#m%Wi#n%Wi#p%Wi#r%Wi#t%Wi#u%Wi#x%Wi(Q%Wi(`%Wi(g%Wi!V%Wi!W%Wi~Oy)sO|)tOP%YiX%Yig%Yik%Yiz%Yi!e%Yi!f%Yi!h%Yi!l%Yi#f%Yi#g%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#p%Yi#r%Yi#t%Yi#u%Yi#x%Yi(Q%Yi(`%Yi(g%Yi(h%Yi!V%Yi!W%Yi~O#x$hy!V$hy!W$hy~P#?dO#x#Zy!V#Zy!W#Zy~P#?dO!a#rO!V'Yq!g'Yq~O!V/VO!g(my~O!S'[q!V'[q~P#(yO!S:`O~P#(yO!V0_O!W(uy~O!V4tO!W(rq~O#S2fO#T2fO~PBtO#P:gO#S2fO#T2fO~PBtO!]:kO!^:kO't!iO(T!jO(_!nO~O!X0zO%`:nO~O!g:qO~O^%^O#W:vO'j%^O~O^%^O!a#rO#W:vO'j%^O~O!X'QO%`:{O~OP$tqX$tqk$tqz$tq!e$tq!f$tq!h$tq!l$tq#f$tq#g$tq#h$tq#i$tq#j$tq#k$tq#l$tq#m$tq#n$tq#p$tq#r$tq#t$tq#u$tq#x$tq(Q$tq(`$tq!V$tq!W$tq~P%AYOP$vqX$vqk$vqz$vq!e$vq!f$vq!h$vq!l$vq#f$vq#g$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#p$vq#r$vq#t$vq#u$vq#x$vq(Q$vq(`$vq!V$vq!W$vq~P%AYOd%[!Z!V%[!Z#W%[!Z#x%[!Z~P!-jO!V'aq!W'aq~P#?dO#S6`O#T6`O~PBtO!V#`!Z!W#`!Z~P#?dO^%^O#W;ZO'j%^O~O#c%[!ZP%[!ZX%[!Z^%[!Zk%[!Zz%[!Z!V%[!Z!e%[!Z!f%[!Z!h%[!Z!l%[!Z#f%[!Z#g%[!Z#h%[!Z#i%[!Z#j%[!Z#k%[!Z#l%[!Z#m%[!Z#n%[!Z#p%[!Z#r%[!Z#t%[!Z#u%[!Z'j%[!Z(Q%[!Z(`%[!Z!g%[!Z!S%[!Z'h%[!Z#W%[!Zo%[!Z!X%[!Z%`%[!Z!a%[!Z~P#(yOP%[!ZX%[!Zk%[!Zz%[!Z!e%[!Z!f%[!Z!h%[!Z!l%[!Z#f%[!Z#g%[!Z#h%[!Z#i%[!Z#j%[!Z#k%[!Z#l%[!Z#m%[!Z#n%[!Z#p%[!Z#r%[!Z#t%[!Z#u%[!Z#x%[!Z(Q%[!Z(`%[!Z!V%[!Z!W%[!Z~P%AYOo(UX~P1dO't!iO~P!'RO!ScX!VcX#WcX~P&6lOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#WYX#WcX#ccX#fYX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#pYX#rYX#tYX#uYX#zYX(QYX(`YX(gYX(hYX~O!acX!gYX!gcX(`cX~P'!sOP;nOQ;nOa=_Ob!fOikOk;nOlkOmkOskOu;nOw;nO|WO!QkO!RkO!XXO!c;qO!hZO!k;nO!l;nO!m;nO!o;rO!q;sO!t!eO$P!hO$TfO's)RO'uTO'xUO(QVO(_[O(l=]O~O!Vv!>v!BnPPP!BuHdPPPPPPPPPPP!FTP!GiPPHd!HyPHdPHdHdHdHdPHd!J`PP!MiP#!nP#!r#!|##Q##QP!MfP##U##UP#&ZP#&_HdHd#&e#)iAQPAQPAQAQP#*sAQAQ#,mAQ#.zAQ#0nAQAQ#1[#3W#3W#3[#3d#3W#3lP#3WPAQ#4hAQ#5pAQAQ6iPPP#6{PP#7e#7eP#7eP#7z#7ePP#8QP#7wP#7w#8d!1p#7w#9O#9U6f(}#9X(}P#9`#9`#9`P(}P(}P(}P(}PP(}P#9f#9iP#9i(}P#9mP#9pP(}P(}P(}P(}P(}P(}(}PP#9v#9|#:W#:^#:d#:j#:p#;O#;U#;[#;f#;l#b#?r#@Q#@W#@^#@d#@j#@t#@z#AQ#A[#An#AtPPPPPPPPPP#AzPPPPPPP#Bn#FYP#Gu#G|#HUPPPP#L`$ U$'t$'w$'z$)w$)z$)}$*UPP$*[$*`$+X$,X$,]$,qPP$,u$,{$-PP$-S$-W$-Z$.P$.g$.l$.o$.r$.x$.{$/P$/TR!yRmpOXr!X#a%]&d&f&g&i,^,c1g1jU!pQ'Q-OQ%ctQ%kwQ%rzQ&[!TS&x!c,vQ'W!f[']!m!r!s!t!u!vS*[$y*aQ+U%lQ+c%tQ+}&UQ,|'PQ-W'XW-`'^'_'`'aQ/p*cQ1U,OU2b-b-d-eS4}0z5QS6[2e2gU7z5U5V5WQ8q6_S9i7{7|Q:k9lR TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration 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:362,context:ja,nodeProps:[["group",-26,6,14,16,62,198,202,205,206,208,211,214,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,102,103,112,113,130,133,135,136,137,138,140,141,161,162,164,"Expression",-23,24,26,30,34,36,38,165,167,169,170,172,173,174,176,177,178,180,181,182,192,194,196,197,"Type",-3,84,95,101,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",142,"JSXStartTag",154,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",143,"JSXSelfCloseEndTag JSXEndTag",159,"JSXEndTag"]],propSources:[za],skippedNodes:[0,3,4,268],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$c&j'vp'y!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$c&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$c&j'y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$c&j'vpOY(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'vpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'vp'y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$c&j'vp'y!b'l(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'w#S$c&j'm(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$c&j'vp'y!b'm(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$c&j!l$Ip'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#p$Id$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#p$Id$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'u$(n$c&j'y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$c&j'y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$c&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$^#t$c&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$^#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$^#t$c&j'y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'y!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$^#t'y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$c&j'vp'y!b(T!LY's&;d$V#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$c&j'vp'y!b$V#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$c&j'vp'y!b#h$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$c&j#z$Id'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(h%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$c&j'vp'y!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$c&j#x%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$c&j'vp'y!b'm(;d(T!LY's&;d$V#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Ga,Ra,2,3,4,5,6,7,8,9,10,11,12,13,Ca,new nO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(S~~",141,325),new nO("j~RQYZXz{^~^O'p~~aP!P!Qd~iO'q~~",25,307)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:13213,ts:13215},dynamicPrecedences:{76:1,78:1,162:1,190:1},specialized:[{term:311,get:e=>Aa[e]||-1},{term:327,get:e=>Ia[e]||-1},{term:67,get:e=>Ea[e]||-1}],tokenPrec:13238}),Ba=[g("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),g("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),g("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),g("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),g("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),g(`try { \${} } catch (\${error}) { \${} diff --git a/ui/dist/assets/ConfirmEmailChangeDocs-57b55c8b.js b/ui/dist/assets/ConfirmEmailChangeDocs-c7942b1c.js similarity index 97% rename from ui/dist/assets/ConfirmEmailChangeDocs-57b55c8b.js rename to ui/dist/assets/ConfirmEmailChangeDocs-c7942b1c.js index b4705706..54b666c7 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs-57b55c8b.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs-c7942b1c.js @@ -1,4 +1,4 @@ -import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,O as pe,P as Pe,k as Se,Q as Oe,n as Re,t as Z,a as x,o as f,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,N as qe}from"./index-f60bef8b.js";import{S as Ae}from"./SdkTabs-699e9ba9.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,R,L,P,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` +import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,O as pe,P as Pe,k as Se,Q as Oe,n as Re,t as Z,a as x,o as f,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,N as qe}from"./index-353b753a.js";import{S as Ae}from"./SdkTabs-ce9e2768.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,R,L,P,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmPasswordResetDocs-3c02bf13.js b/ui/dist/assets/ConfirmPasswordResetDocs-31519d08.js similarity index 98% rename from ui/dist/assets/ConfirmPasswordResetDocs-3c02bf13.js rename to ui/dist/assets/ConfirmPasswordResetDocs-31519d08.js index 1c58c651..5b8aa06e 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs-3c02bf13.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs-31519d08.js @@ -1,4 +1,4 @@ -import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as d,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,N as Ae}from"./index-f60bef8b.js";import{S as De}from"./SdkTabs-699e9ba9.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` +import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as d,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,N as Ae}from"./index-353b753a.js";import{S as De}from"./SdkTabs-ce9e2768.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmVerificationDocs-3a63c081.js b/ui/dist/assets/ConfirmVerificationDocs-14171a15.js similarity index 97% rename from ui/dist/assets/ConfirmVerificationDocs-3a63c081.js rename to ui/dist/assets/ConfirmVerificationDocs-14171a15.js index 5e0d586c..a5ba8d91 100644 --- a/ui/dist/assets/ConfirmVerificationDocs-3a63c081.js +++ b/ui/dist/assets/ConfirmVerificationDocs-14171a15.js @@ -1,4 +1,4 @@ -import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,O as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as f,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,N as Ne}from"./index-f60bef8b.js";import{S as Ve}from"./SdkTabs-699e9ba9.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Ke(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,M=i[0].name+"",F,ee,I,P,L,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,N,$=[],oe=new Map,ie,V,k=[],ne=new Map,y;P=new Ve({props:{js:` +import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,O as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as f,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,N as Ne}from"./index-353b753a.js";import{S as Ve}from"./SdkTabs-ce9e2768.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Ke(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,M=i[0].name+"",F,ee,I,P,L,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,N,$=[],oe=new Map,ie,V,k=[],ne=new Map,y;P=new Ve({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/CreateApiDocs-6d4181ae.js b/ui/dist/assets/CreateApiDocs-c6c95be3.js similarity index 99% rename from ui/dist/assets/CreateApiDocs-6d4181ae.js rename to ui/dist/assets/CreateApiDocs-c6c95be3.js index cec9115d..94127c7c 100644 --- a/ui/dist/assets/CreateApiDocs-6d4181ae.js +++ b/ui/dist/assets/CreateApiDocs-c6c95be3.js @@ -1,4 +1,4 @@ -import{S as Ht,i as Lt,s as Pt,C as Q,N as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,O as Le,P as ht,k as Rt,Q as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index-f60bef8b.js";import{S as Nt}from"./SdkTabs-699e9ba9.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,g,D,V,L,J,j,B,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?Jt:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional +import{S as Ht,i as Lt,s as Pt,C as Q,N as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,O as Le,P as ht,k as Rt,Q as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index-353b753a.js";import{S as Nt}from"./SdkTabs-ce9e2768.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,g,D,V,L,J,j,B,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?Jt:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional username
String The username of the auth record. diff --git a/ui/dist/assets/DeleteApiDocs-cc2105a6.js b/ui/dist/assets/DeleteApiDocs-21f3fd52.js similarity index 97% rename from ui/dist/assets/DeleteApiDocs-cc2105a6.js rename to ui/dist/assets/DeleteApiDocs-21f3fd52.js index 01f60269..de90deeb 100644 --- a/ui/dist/assets/DeleteApiDocs-cc2105a6.js +++ b/ui/dist/assets/DeleteApiDocs-21f3fd52.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-f60bef8b.js";import{S as He}from"./SdkTabs-699e9ba9.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-353b753a.js";import{S as He}from"./SdkTabs-ce9e2768.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/FilterAutocompleteInput-cac0f0ad.js b/ui/dist/assets/FilterAutocompleteInput-47d03028.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput-cac0f0ad.js rename to ui/dist/assets/FilterAutocompleteInput-47d03028.js index c291df17..1011ca36 100644 --- a/ui/dist/assets/FilterAutocompleteInput-cac0f0ad.js +++ b/ui/dist/assets/FilterAutocompleteInput-47d03028.js @@ -1 +1 @@ -import{S as oe,i as ae,s as ue,e as le,f as ce,g as fe,y as M,o as de,I as he,J as ge,K as pe,L as ye,C as I,M as me}from"./index-f60bef8b.js";import{C as R,E as S,a as q,h as be,b as ke,c as xe,d as Ke,e as Ce,s as Se,f as qe,g as we,i as Le,r as Ee,j as Ie,k as Re,l as Ae,m as ve,n as Be,o as Oe,p as _e,q as Me,t as Y,S as De}from"./index-0935db40.js";function He(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],r=0;r2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:r=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:A=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,v=r,D=new R,H=new R,F=new R,T=new R,w=[],U=[],W=[],N=[],L="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{w=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let s=t.slice();return a&&I.pushOrReplaceByKey(s,a,"id"),s}function V(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function J(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.removeEventListener("click",O)}function P(){if(!d)return;J();const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.addEventListener("click",O)}function C(t,s="",c=0){var m,z,Q;let h=w.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=[s+"id",s+"created",s+"updated"];h.isAuth&&(u.push(s+"username"),u.push(s+"email"),u.push(s+"emailVisibility"),u.push(s+"verified"));for(const y of h.schema){const E=s+y.name;if(u.push(E),y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,E+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(E+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(E+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const s=w.filter(h=>h.isAuth);for(const h of s){const u=C(h.id,"@request.auth.");for(const m of u)I.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const s of w){const c="@collection."+s.name+".",h=C(s.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,s=!0){let c=[].concat(A);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),s&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let s=t.matchBefore(/[\'\"\@\w\.]*/);if(s&&s.from==s.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&s.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:s.from,options:c}}function G(){return De.define(He({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:I.escapeRegExp("@now"),token:"keyword"},{regex:I.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:s=>{b&&p("submit",o)}};return P(),n(11,f=new S({parent:k,state:q.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),q.allowMultipleSelections.of(!0),Se(qe,{fallback:!0}),we(),Le(),Ee(),Ie(),Re.of([t,...Ae,...ve,Be.find(s=>s.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,Me({override:[se],icons:!1}),T.of(Y(l)),H.of(S.editable.of(!r)),F.of(q.readOnly.of(r)),D.of(G()),q.transactionFilter.of(s=>b&&s.newDoc.lines>1?[]:s),S.updateListener.of(s=>{!s.docChanged||r||(n(1,o=s.state.doc.toString()),V())})]})})),()=>{clearTimeout(_),J(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,r=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,A=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,L=Je(a)),e.$$.dirty[0]&25352&&!r&&(B!=L||x!==-1||K!==-1)&&(n(14,B=L),j()),e.$$.dirty[0]&4&&d&&P(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&v!=r&&(f.dispatch({effects:[H.reconfigure(S.editable.of(!r)),F.reconfigure(q.readOnly.of(r))]}),n(12,v=r),V()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,r,l,a,b,A,x,K,O,f,v,L,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Pe,Ve,ue,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; +import{S as oe,i as ae,s as ue,e as le,f as ce,g as fe,y as M,o as de,I as he,J as ge,K as pe,L as ye,C as I,M as me}from"./index-353b753a.js";import{C as R,E as S,a as q,h as be,b as ke,c as xe,d as Ke,e as Ce,s as Se,f as qe,g as we,i as Le,r as Ee,j as Ie,k as Re,l as Ae,m as ve,n as Be,o as Oe,p as _e,q as Me,t as Y,S as De}from"./index-0935db40.js";function He(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],r=0;r2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:r=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:A=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,v=r,D=new R,H=new R,F=new R,T=new R,w=[],U=[],W=[],N=[],L="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{w=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let s=t.slice();return a&&I.pushOrReplaceByKey(s,a,"id"),s}function V(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function J(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.removeEventListener("click",O)}function P(){if(!d)return;J();const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.addEventListener("click",O)}function C(t,s="",c=0){var m,z,Q;let h=w.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=[s+"id",s+"created",s+"updated"];h.isAuth&&(u.push(s+"username"),u.push(s+"email"),u.push(s+"emailVisibility"),u.push(s+"verified"));for(const y of h.schema){const E=s+y.name;if(u.push(E),y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,E+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(E+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(E+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const s=w.filter(h=>h.isAuth);for(const h of s){const u=C(h.id,"@request.auth.");for(const m of u)I.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const s of w){const c="@collection."+s.name+".",h=C(s.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,s=!0){let c=[].concat(A);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),s&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let s=t.matchBefore(/[\'\"\@\w\.]*/);if(s&&s.from==s.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&s.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:s.from,options:c}}function G(){return De.define(He({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:I.escapeRegExp("@now"),token:"keyword"},{regex:I.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:s=>{b&&p("submit",o)}};return P(),n(11,f=new S({parent:k,state:q.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),q.allowMultipleSelections.of(!0),Se(qe,{fallback:!0}),we(),Le(),Ee(),Ie(),Re.of([t,...Ae,...ve,Be.find(s=>s.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,Me({override:[se],icons:!1}),T.of(Y(l)),H.of(S.editable.of(!r)),F.of(q.readOnly.of(r)),D.of(G()),q.transactionFilter.of(s=>b&&s.newDoc.lines>1?[]:s),S.updateListener.of(s=>{!s.docChanged||r||(n(1,o=s.state.doc.toString()),V())})]})})),()=>{clearTimeout(_),J(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,r=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,A=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,L=Je(a)),e.$$.dirty[0]&25352&&!r&&(B!=L||x!==-1||K!==-1)&&(n(14,B=L),j()),e.$$.dirty[0]&4&&d&&P(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&v!=r&&(f.dispatch({effects:[H.reconfigure(S.editable.of(!r)),F.reconfigure(q.readOnly.of(r))]}),n(12,v=r),V()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,r,l,a,b,A,x,K,O,f,v,L,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Pe,Ve,ue,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; diff --git a/ui/dist/assets/ListApiDocs-0a35ed31.js b/ui/dist/assets/ListApiDocs-b3b84ba9.js similarity index 99% rename from ui/dist/assets/ListApiDocs-0a35ed31.js rename to ui/dist/assets/ListApiDocs-b3b84ba9.js index 9820b112..e504638f 100644 --- a/ui/dist/assets/ListApiDocs-0a35ed31.js +++ b/ui/dist/assets/ListApiDocs-b3b84ba9.js @@ -1,4 +1,4 @@ -import{S as Se,i as Ne,s as qe,e,b as s,E as He,f as o,g as u,u as De,y as Fe,o as m,w as _,h as t,N as he,c as Yt,m as Zt,x as we,O as Le,P as Me,k as Be,Q as Ie,n as Ge,t as Bt,a as It,d as te,R as ze,C as _e,p as Ue,r as xe}from"./index-f60bef8b.js";import{S as je}from"./SdkTabs-699e9ba9.js";function Qe(d){let n,a,r;return{c(){n=e("span"),n.textContent="Show details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-down-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Je(d){let n,a,r;return{c(){n=e("span"),n.textContent="Hide details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-up-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Ae(d){let n,a,r,f,p,b,x,$,h,w,c,V,bt,Gt,R,zt,q,it,F,W,ee,I,G,le,at,ht,X,xt,se,rt,ct,Y,O,Ut,wt,y,Z,_t,jt,$t,z,tt,Ct,Qt,kt,L,dt,gt,ne,ft,oe,D,vt,et,yt,U,pt,ie,H,Ft,lt,Lt,st,At,nt,j,E,Jt,Tt,Kt,Pt,C,Q,M,ae,Rt,re,ut,ce,B,Ot,de,Et,Vt,St,Wt,A,mt,J,K,S,Nt,fe,T,k,pe,N,v,ot,ue,P,qt,me,Dt,be,Ht,Xt,Mt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format +import{S as Se,i as Ne,s as qe,e,b as s,E as He,f as o,g as u,u as De,y as Fe,o as m,w as _,h as t,N as he,c as Yt,m as Zt,x as we,O as Le,P as Me,k as Be,Q as Ie,n as Ge,t as Bt,a as It,d as te,R as ze,C as _e,p as Ue,r as xe}from"./index-353b753a.js";import{S as je}from"./SdkTabs-ce9e2768.js";function Qe(d){let n,a,r;return{c(){n=e("span"),n.textContent="Show details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-down-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Je(d){let n,a,r;return{c(){n=e("span"),n.textContent="Hide details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-up-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Ae(d){let n,a,r,f,p,b,x,$,h,w,c,V,bt,Gt,R,zt,q,it,F,W,ee,I,G,le,at,ht,X,xt,se,rt,ct,Y,O,Ut,wt,y,Z,_t,jt,$t,z,tt,Ct,Qt,kt,L,dt,gt,ne,ft,oe,D,vt,et,yt,U,pt,ie,H,Ft,lt,Lt,st,At,nt,j,E,Jt,Tt,Kt,Pt,C,Q,M,ae,Rt,re,ut,ce,B,Ot,de,Et,Vt,St,Wt,A,mt,J,K,S,Nt,fe,T,k,pe,N,v,ot,ue,P,qt,me,Dt,be,Ht,Xt,Mt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,a=s(),r=e("ul"),f=e("li"),f.innerHTML=`OPERAND - could be any of the above field literal, string (single diff --git a/ui/dist/assets/ListExternalAuthsDocs-d76d338d.js b/ui/dist/assets/ListExternalAuthsDocs-323ad017.js similarity index 98% rename from ui/dist/assets/ListExternalAuthsDocs-d76d338d.js rename to ui/dist/assets/ListExternalAuthsDocs-323ad017.js index a8af3928..eb804883 100644 --- a/ui/dist/assets/ListExternalAuthsDocs-d76d338d.js +++ b/ui/dist/assets/ListExternalAuthsDocs-323ad017.js @@ -1,4 +1,4 @@ -import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Se,f as b,g as r,h as s,m as Ee,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ie,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index-f60bef8b.js";import{S as Ne}from"./SdkTabs-699e9ba9.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Ee(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,S,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,E,Z,I,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:` +import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Se,f as b,g as r,h as s,m as Ee,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ie,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index-353b753a.js";import{S as Ne}from"./SdkTabs-ce9e2768.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Ee(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,S,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,E,Z,I,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-22a6879c.js b/ui/dist/assets/PageAdminConfirmPasswordReset-b8522733.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset-22a6879c.js rename to ui/dist/assets/PageAdminConfirmPasswordReset-b8522733.js index 6cabfa2c..b505b380 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset-22a6879c.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset-b8522733.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-f60bef8b.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password +import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-353b753a.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password `),m&&m.c(),t=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",R=C(),P=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(P,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,P,$),_(P,v),k=!0,F||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],F=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(H(r.$$.fragment,a),H(d.$$.fragment,a),k=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(P),F=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(H(e.$$.fragment,s),o=!0)},o(s){N(e.$$.fragment,s),o=!1},d(s){T(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.errorResponseHandler(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset-6f4498c0.js b/ui/dist/assets/PageAdminRequestPasswordReset-58584d43.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset-6f4498c0.js rename to ui/dist/assets/PageAdminRequestPasswordReset-58584d43.js index bc1fa528..3661f168 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset-6f4498c0.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset-58584d43.js @@ -1,2 +1,2 @@ -import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index-f60bef8b.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

+import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index-353b753a.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

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

`,n=g(),H(l.$$.fragment),t=g(),o=_("button"),f=_("i"),m=g(),i=_("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(i,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=c[1],F(o,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),L(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=E(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(o.disabled=r[1]),(!a||$&2)&&F(o,"btn-loading",r[1])},i(r){a||(w(l.$$.fragment,r),a=!0)},o(r){y(l.$$.fragment,r),a=!1},d(r){r&&v(e),S(l),b=!1,u()}}}function O(c){let e,s,n,l,t,o,f,m,i;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=g(),l=_("div"),t=_("p"),o=h("Check "),f=_("strong"),m=h(c[0]),i=h(" for the recovery link."),p(s,"class","icon"),p(f,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){k(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,f),d(f,m),d(t,i)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&v(e)}}}function Q(c){let e,s,n,l,t,o,f,m;return{c(){e=_("label"),s=h("Email"),l=g(),t=_("input"),p(e,"for",n=c[5]),p(t,"type","email"),p(t,"id",o=c[5]),t.required=!0,t.autofocus=!0},m(i,a){k(i,e,a),d(e,s),k(i,l,a),k(i,t,a),R(t,c[0]),t.focus(),f||(m=E(t,"input",c[4]),f=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&o!==(o=i[5])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&v(e),i&&v(l),i&&v(t),f=!1,m()}}}function U(c){let e,s,n,l,t,o,f,m;const i=[O,K],a=[];function b(u,r){return u[2]?0:1}return e=b(c),s=a[e]=i[e](c),{c(){s.c(),n=g(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(u,r){a[e].m(u,r),k(u,n,r),k(u,l,r),d(l,t),o=!0,f||(m=A(B.call(null,t)),f=!0)},p(u,r){let $=e;e=b(u),e===$?a[e].p(u,r):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(u,r):(s=a[e]=i[e](u),s.c()),w(s,1),s.m(n.parentNode,n))},i(u){o||(w(s),o=!0)},o(u){y(s),o=!1},d(u){a[e].d(u),u&&v(n),u&&v(l),f=!1,m()}}}function V(c){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:c}}}),{c(){H(e.$$.fragment)},m(n,l){L(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){S(e,n)}}}function W(c,e,s){let n="",l=!1,t=!1;async function o(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.errorResponseHandler(m)}s(1,l=!1)}}function f(){n=this.value,s(0,n)}return[n,l,t,o,f]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-6bf0e478.js b/ui/dist/assets/PageRecordConfirmEmailChange-04cf4a7a.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmEmailChange-6bf0e478.js rename to ui/dist/assets/PageRecordConfirmEmailChange-04cf4a7a.js index ca3a8408..4cf4d33b 100644 --- a/ui/dist/assets/PageRecordConfirmEmailChange-6bf0e478.js +++ b/ui/dist/assets/PageRecordConfirmEmailChange-04cf4a7a.js @@ -1,4 +1,4 @@ -import{S as z,i as G,s as I,F as J,c as S,m as L,t as v,a as y,d as R,C as M,E as N,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as C,b as h,f as d,r as H,h as k,u as P,v as K,y as E,x as O,z as T}from"./index-f60bef8b.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&F(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),l=m("h5"),s=C(`Type your password to confirm changing your email address +import{S as z,i as G,s as I,F as J,c as S,m as L,t as v,a as y,d as R,C as M,E as N,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as C,b as h,f as d,r as H,h as k,u as P,v as K,y as E,x as O,z as T}from"./index-353b753a.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&F(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),l=m("h5"),s=C(`Type your password to confirm changing your email address `),p&&p.c(),n=h(),S(o.$$.fragment),c=h(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],H(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,l),k(l,s),p&&p.m(l,null),k(e,n),L(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=P(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=F(f),p.c(),p.m(l,null)):p&&(p.d(1),p=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:f}),o.$set(q),(!u||w&2)&&(a.disabled=f[1]),(!u||w&2)&&H(a,"btn-loading",f[1])},i(f){u||(v(o.$$.fragment,f),u=!0)},o(f){y(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),R(o),g=!1,$()}}}function U(r){let e,t,l,s,n;return{c(){e=m("div"),e.innerHTML=`

Successfully changed the user email address.

You can now sign in with your new email address.

`,t=h(),l=m("button"),l.textContent="Close",d(e,"class","alert alert-success"),d(l,"type","button"),d(l,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,l,c),s||(n=P(l,"click",r[6]),s=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(l),s=!1,n()}}}function F(r){let e,t,l;return{c(){e=C("to "),t=m("strong"),l=C(r[3]),d(t,"class","txt-nowrap")},m(s,n){_(s,e,n),_(s,t,n),k(t,l)},p(s,n){n&8&&O(l,s[3])},d(s){s&&b(e),s&&b(t)}}}function V(r){let e,t,l,s,n,o,c,a;return{c(){e=m("label"),t=C("Password"),s=h(),n=m("input"),d(e,"for",l=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(i,u){_(i,e,u),k(e,t),_(i,s,u),_(i,n,u),T(n,r[0]),n.focus(),c||(a=P(n,"input",r[7]),c=!0)},p(i,u){u&256&&l!==(l=i[8])&&d(e,"for",l),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&T(n,i[0])},d(i){i&&b(e),i&&b(s),i&&b(n),c=!1,a()}}}function X(r){let e,t,l,s;const n=[U,Q],o=[];function c(a,i){return a[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),l=N()},m(a,i){o[e].m(a,i),_(a,l,i),s=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(W(),y(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,i):(t=o[e]=n[e](a),t.c()),v(t,1),t.m(l.parentNode,l))},i(a){s||(v(t),s=!0)},o(a){y(t),s=!1},d(a){o[e].d(a),a&&b(l)}}}function Z(r){let e,t;return e=new J({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(l,s){L(e,l,s),t=!0},p(l,[s]){const n={};s&527&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){R(e,l)}}}function x(r,e,t){let l,{params:s}=e,n="",o=!1,c=!1;async function a(){if(o)return;t(1,o=!0);const g=new j("../");try{const $=A(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){B.errorResponseHandler($)}t(1,o=!1)}const i=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,s=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,l=M.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends z{constructor(e){super(),G(this,e,x,Z,I,{params:5})}}export{te as default}; diff --git a/ui/dist/assets/PageRecordConfirmPasswordReset-e8d3b713.js b/ui/dist/assets/PageRecordConfirmPasswordReset-91aee058.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmPasswordReset-e8d3b713.js rename to ui/dist/assets/PageRecordConfirmPasswordReset-91aee058.js index c302fe79..da6f2b4e 100644 --- a/ui/dist/assets/PageRecordConfirmPasswordReset-e8d3b713.js +++ b/ui/dist/assets/PageRecordConfirmPasswordReset-91aee058.js @@ -1,4 +1,4 @@ -import{S as J,i as M,s as W,F as Y,c as F,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as H,v as U,y as S,x as V,z as h}from"./index-f60bef8b.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=R(`Reset your user password +import{S as J,i as M,s as W,F as Y,c as F,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as H,v as U,y as S,x as V,z as h}from"./index-353b753a.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=R(`Reset your user password `),d&&d.c(),t=P(),F(o.$$.fragment),c=P(),F(a.$$.fragment),i=P(),u=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block"),u.disabled=r[2],G(u,"btn-loading",r[2])},m(f,$){_(f,e,$),w(e,l),w(l,s),w(s,n),d&&d.m(s,null),w(e,t),N(o,e,null),w(e,c),N(a,e,null),w(e,i),w(e,u),w(u,v),k=!0,g||(C=H(e,"submit",U(r[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=I(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const L={};$&3073&&(L.$$scope={dirty:$,ctx:f}),o.$set(L);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),a.$set(z),(!k||$&4)&&(u.disabled=f[2]),(!k||$&4)&&G(u,"btn-loading",f[2])},i(f){k||(y(o.$$.fragment,f),y(a.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),T(o),T(a),g=!1,C()}}}function Z(r){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML=`

Successfully changed the user password.

You can now sign in with your new password.

`,l=P(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=H(s,"click",r[7]),n=!0)},p:S,i:S,o:S,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function I(r){let e,l,s;return{c(){e=R("for "),l=b("strong"),s=R(r[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&V(s,n[4])},d(n){n&&m(e),n&&m(l)}}}function x(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0,t.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[0]),t.focus(),c||(a=H(t,"input",r[8]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&1&&t.value!==i[0]&&h(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function ee(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password confirm"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[1]),c||(a=H(t,"input",r[9]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&2&&t.value!==i[1]&&h(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(a,i){return a[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=A()},m(a,i){o[e].m(a,i),_(a,s,i),n=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(B(),q(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(a,i):(l=o[e]=t[e](a),l.c()),y(l,1),l.m(s.parentNode,s))},i(a){n||(y(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(s)}}}function se(r){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){F(e.$$.fragment)},m(s,n){N(e,s,n),l=!0},p(s,[n]){const t={};n&2079&&(t.$$scope={dirty:n,ctx:s}),e.$set(t)},i(s){l||(y(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,a=!1;async function i(){if(c)return;l(2,c=!0);const g=new K("../");try{const C=O(n==null?void 0:n.token);await g.collection(C.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,a=!0)}catch(C){Q.errorResponseHandler(C)}l(2,c=!1)}const u=()=>window.close();function v(){t=this.value,l(0,t)}function k(){o=this.value,l(1,o)}return r.$$set=g=>{"params"in g&&l(6,n=g.params)},r.$$.update=()=>{r.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,a,s,i,n,u,v,k]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default}; diff --git a/ui/dist/assets/PageRecordConfirmVerification-7da4beac.js b/ui/dist/assets/PageRecordConfirmVerification-ccc59c33.js similarity index 97% rename from ui/dist/assets/PageRecordConfirmVerification-7da4beac.js rename to ui/dist/assets/PageRecordConfirmVerification-ccc59c33.js index d002f96c..79af2c89 100644 --- a/ui/dist/assets/PageRecordConfirmVerification-7da4beac.js +++ b/ui/dist/assets/PageRecordConfirmVerification-ccc59c33.js @@ -1,3 +1,3 @@ -import{S as v,i as y,s as w,F as C,c as g,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-f60bef8b.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`
+import{S as v,i as y,s as w,F as C,c as g,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-353b753a.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`

Invalid or expired verification token.

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

Successfully verified email address.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function V(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function q(o){let t,s;return t=new C({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:o}}}),{c(){g(t.$$.fragment)},m(e,n){x(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function E(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new P("../");try{const m=T(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class N extends v{constructor(t){super(),y(this,t,E,q,w,{params:2})}}export{N as default}; diff --git a/ui/dist/assets/RealtimeApiDocs-44be40bb.js b/ui/dist/assets/RealtimeApiDocs-92f0bf85.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs-44be40bb.js rename to ui/dist/assets/RealtimeApiDocs-92f0bf85.js index bb5436d1..ac09bc5a 100644 --- a/ui/dist/assets/RealtimeApiDocs-44be40bb.js +++ b/ui/dist/assets/RealtimeApiDocs-92f0bf85.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,N as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index-f60bef8b.js";import{S as fe}from"./SdkTabs-699e9ba9.js";function $e(o){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` +import{S as re,i as ae,s as be,N as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index-353b753a.js";import{S as fe}from"./SdkTabs-ce9e2768.js";function $e(o){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[1]}'); diff --git a/ui/dist/assets/RequestEmailChangeDocs-a9558318.js b/ui/dist/assets/RequestEmailChangeDocs-43173b3c.js similarity index 98% rename from ui/dist/assets/RequestEmailChangeDocs-a9558318.js rename to ui/dist/assets/RequestEmailChangeDocs-43173b3c.js index d90cca2d..75b6a73e 100644 --- a/ui/dist/assets/RequestEmailChangeDocs-a9558318.js +++ b/ui/dist/assets/RequestEmailChangeDocs-43173b3c.js @@ -1,4 +1,4 @@ -import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as L,O as ve,P as Se,k as Re,Q as Me,n as Ae,t as x,a as ee,o as m,d as ye,R as We,C as ze,p as He,r as N,u as Oe,N as Ue}from"./index-f60bef8b.js";import{S as je}from"./SdkTabs-699e9ba9.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,Q,w,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new je({props:{js:` +import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as L,O as ve,P as Se,k as Re,Q as Me,n as Ae,t as x,a as ee,o as m,d as ye,R as We,C as ze,p as He,r as N,u as Oe,N as Ue}from"./index-353b753a.js";import{S as je}from"./SdkTabs-ce9e2768.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,Q,w,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new je({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/RequestPasswordResetDocs-65a2d4bd.js b/ui/dist/assets/RequestPasswordResetDocs-c6df1adb.js similarity index 97% rename from ui/dist/assets/RequestPasswordResetDocs-65a2d4bd.js rename to ui/dist/assets/RequestPasswordResetDocs-c6df1adb.js index 9335fc96..1d0d5be6 100644 --- a/ui/dist/assets/RequestPasswordResetDocs-65a2d4bd.js +++ b/ui/dist/assets/RequestPasswordResetDocs-c6df1adb.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as I,O as me,P as Re,k as ge,Q as ye,n as Be,t as Z,a as x,o as d,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,N as Ae}from"./index-f60bef8b.js";import{S as Ue}from"./SdkTabs-699e9ba9.js";function ue(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),u=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,u),i||(p=Me(l,"click",m),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,u;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),o.$set(m),(!u||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){u||(Z(o.$$.fragment,i),u=!0)},o(i){x(o.$$.fragment,i),u=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,u,i,p,m,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,R,H,te,O,C,se,J,E=a[0].name+"",K,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as I,O as me,P as Re,k as ge,Q as ye,n as Be,t as Z,a as x,o as d,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,N as Ae}from"./index-353b753a.js";import{S as Ue}from"./SdkTabs-ce9e2768.js";function ue(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),u=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,u),i||(p=Me(l,"click",m),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,u;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),o.$set(m),(!u||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){u||(Z(o.$$.fragment,i),u=!0)},o(i){x(o.$$.fragment,i),u=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,u,i,p,m,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,R,H,te,O,C,se,J,E=a[0].name+"",K,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/RequestVerificationDocs-b8cf6549.js b/ui/dist/assets/RequestVerificationDocs-e7e96782.js similarity index 97% rename from ui/dist/assets/RequestVerificationDocs-b8cf6549.js rename to ui/dist/assets/RequestVerificationDocs-e7e96782.js index 772f1345..8eecaeb3 100644 --- a/ui/dist/assets/RequestVerificationDocs-b8cf6549.js +++ b/ui/dist/assets/RequestVerificationDocs-e7e96782.js @@ -1,4 +1,4 @@ -import{S as qe,i as we,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as F,O as de,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as f,d as $e,R as Se,C as Te,p as Re,r as I,u as Ve,N as Me}from"./index-f60bef8b.js";import{S as Ae}from"./SdkTabs-699e9ba9.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){r(q,s,w),i(s,_),i(s,p),n||(u=Ve(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&f(s),n=!1,u()}}}function ke(a,l){let s,o,_,p;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){r(n,s,u),he(o,s,null),i(s,_),p=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!p||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,O=a[0].name+"",J,se,K,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` +import{S as qe,i as we,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as F,O as de,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as f,d as $e,R as Se,C as Te,p as Re,r as I,u as Ve,N as Me}from"./index-353b753a.js";import{S as Ae}from"./SdkTabs-ce9e2768.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){r(q,s,w),i(s,_),i(s,p),n||(u=Ve(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&f(s),n=!1,u()}}}function ke(a,l){let s,o,_,p;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){r(n,s,u),he(o,s,null),i(s,_),p=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!p||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,O=a[0].name+"",J,se,K,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/SdkTabs-699e9ba9.js b/ui/dist/assets/SdkTabs-ce9e2768.js similarity index 98% rename from ui/dist/assets/SdkTabs-699e9ba9.js rename to ui/dist/assets/SdkTabs-ce9e2768.js index ea7af617..e8a4f253 100644 --- a/ui/dist/assets/SdkTabs-699e9ba9.js +++ b/ui/dist/assets/SdkTabs-ce9e2768.js @@ -1 +1 @@ -import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index-f60bef8b.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&R(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(N(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,u,_=o[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(o,_,t),d=p(a);g.set(d,s[t]=T(d,a))}let f=o[2];const b=t=>t[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; +import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index-353b753a.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&R(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(N(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,u,_=o[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(o,_,t),d=p(a);g.set(d,s[t]=T(d,a))}let f=o[2];const b=t=>t[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs-c1a0d883.js b/ui/dist/assets/UnlinkExternalAuthDocs-8afb383d.js similarity index 98% rename from ui/dist/assets/UnlinkExternalAuthDocs-c1a0d883.js rename to ui/dist/assets/UnlinkExternalAuthDocs-8afb383d.js index 7239e5a2..9ed00f51 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs-c1a0d883.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs-8afb383d.js @@ -1,4 +1,4 @@ -import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as j,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as d,d as Ue,R as Le,C as Re,p as je,r as I,u as Ie,N as Ne}from"./index-f60bef8b.js";import{S as Ke}from"./SdkTabs-699e9ba9.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&j(_,a),P&6&&I(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&I(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,M=n[0].name+"",N,se,ae,K,Q,A,F,E,G,g,W,ne,z,y,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ke({props:{js:` +import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as j,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as d,d as Ue,R as Le,C as Re,p as je,r as I,u as Ie,N as Ne}from"./index-353b753a.js";import{S as Ke}from"./SdkTabs-ce9e2768.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&j(_,a),P&6&&I(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&I(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,M=n[0].name+"",N,se,ae,K,Q,A,F,E,G,g,W,ne,z,y,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/UpdateApiDocs-dc390706.js b/ui/dist/assets/UpdateApiDocs-a89f8bed.js similarity index 99% rename from ui/dist/assets/UpdateApiDocs-dc390706.js rename to ui/dist/assets/UpdateApiDocs-a89f8bed.js index e650f86a..66cc159d 100644 --- a/ui/dist/assets/UpdateApiDocs-dc390706.js +++ b/ui/dist/assets/UpdateApiDocs-a89f8bed.js @@ -1,4 +1,4 @@ -import{S as Ct,i as St,s as Ot,C as U,N as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,O as Pe,P as ut,k as Mt,Q as $t,n as Rt,t as pe,a as fe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index-f60bef8b.js";import{S as Lt}from"./SdkTabs-699e9ba9.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional +import{S as Ct,i as St,s as Ot,C as U,N as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,O as Pe,P as ut,k as Mt,Q as $t,n as Rt,t as pe,a as fe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index-353b753a.js";import{S as Lt}from"./SdkTabs-ce9e2768.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional username
String The username of the auth record.`,b=m(),u=r("tr"),u.innerHTML=`
Optional diff --git a/ui/dist/assets/ViewApiDocs-866b52bc.js b/ui/dist/assets/ViewApiDocs-4a555ff5.js similarity index 98% rename from ui/dist/assets/ViewApiDocs-866b52bc.js rename to ui/dist/assets/ViewApiDocs-4a555ff5.js index 022bf8dd..ef4483d4 100644 --- a/ui/dist/assets/ViewApiDocs-866b52bc.js +++ b/ui/dist/assets/ViewApiDocs-4a555ff5.js @@ -1,4 +1,4 @@ -import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index-f60bef8b.js";import{S as dt}from"./SdkTabs-699e9ba9.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,x,se,A,ne,I,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,xe,fe,Ae,ue,M,be,P,H,R=[],Ie=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:` +import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index-353b753a.js";import{S as dt}from"./SdkTabs-ce9e2768.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,x,se,A,ne,I,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,xe,fe,Ae,ue,M,be,P,H,R=[],Ie=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/index-f60bef8b.js b/ui/dist/assets/index-353b753a.js similarity index 95% rename from ui/dist/assets/index-f60bef8b.js rename to ui/dist/assets/index-353b753a.js index 7265506f..da105155 100644 --- a/ui/dist/assets/index-f60bef8b.js +++ b/ui/dist/assets/index-353b753a.js @@ -1,14 +1,14 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function G(){}const kl=n=>n;function Xe(n,e){for(const t in e)n[t]=e[t];return n}function bb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function Lh(n){return n()}function iu(){return Object.create(null)}function Le(n){n.forEach(Lh)}function zt(n){return typeof n=="function"}function be(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function Hn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function vb(n){return Object.keys(n).length===0}function Nh(n,...e){if(n==null)return G;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Je(n,e,t){n.$$.on_destroy.push(Nh(e,t))}function Nt(n,e,t,i){if(n){const s=Fh(n,e,t,i);return n[0](s)}}function Fh(n,e,t,i){return n[1]&&i?Xe(t.ctx.slice(),n[1](i(e))):t.ctx}function Ft(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),fa=Rh?n=>requestAnimationFrame(n):G;const _s=new Set;function jh(n){_s.forEach(e=>{e.c(n)||(_s.delete(e),e.f())}),_s.size!==0&&fa(jh)}function Fo(n){let e;return _s.size===0&&fa(jh),{promise:new Promise(t=>{_s.add(e={c:n,f:t})}),abort(){_s.delete(e)}}}function b(n,e){n.appendChild(e)}function Hh(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function yb(n){const e=v("style");return kb(Hh(n),e),e.sheet}function kb(n,e){return b(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function bt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function pt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function yn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Zn(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function ht(n){return n===""?null:+n}function wb(n){return Array.from(n.childNodes)}function re(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function ce(n,e){n.value=e??""}function Ar(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Q(n,e,t){n.classList[t?"add":"remove"](e)}function qh(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Kt(n,e){return new n(e)}const po=new Map;let mo=0;function Sb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Tb(n,e){const t={stylesheet:yb(e),rules:{}};return po.set(n,t),t}function rl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function G(){}const kl=n=>n;function Xe(n,e){for(const t in e)n[t]=e[t];return n}function bb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function Lh(n){return n()}function iu(){return Object.create(null)}function Le(n){n.forEach(Lh)}function zt(n){return typeof n=="function"}function be(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function Hn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function vb(n){return Object.keys(n).length===0}function Nh(n,...e){if(n==null)return G;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Je(n,e,t){n.$$.on_destroy.push(Nh(e,t))}function Nt(n,e,t,i){if(n){const s=Fh(n,e,t,i);return n[0](s)}}function Fh(n,e,t,i){return n[1]&&i?Xe(t.ctx.slice(),n[1](i(e))):t.ctx}function Ft(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),fa=Rh?n=>requestAnimationFrame(n):G;const _s=new Set;function jh(n){_s.forEach(e=>{e.c(n)||(_s.delete(e),e.f())}),_s.size!==0&&fa(jh)}function Fo(n){let e;return _s.size===0&&fa(jh),{promise:new Promise(t=>{_s.add(e={c:n,f:t})}),abort(){_s.delete(e)}}}function b(n,e){n.appendChild(e)}function Hh(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function yb(n){const e=v("style");return kb(Hh(n),e),e.sheet}function kb(n,e){return b(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function bt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function pt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function yn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Zn(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function ht(n){return n===""?null:+n}function wb(n){return Array.from(n.childNodes)}function re(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function de(n,e){n.value=e??""}function Ar(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Q(n,e,t){n.classList[t?"add":"remove"](e)}function qh(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Kt(n,e){return new n(e)}const po=new Map;let mo=0;function Sb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Tb(n,e){const t={stylesheet:yb(e),rules:{}};return po.set(n,t),t}function rl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ `;for(let _=0;_<=1;_+=a){const y=e+(t-e)*l(_);u+=_*100+`%{${o(y,1-y)}} `}const f=u+`100% {${o(t,1-t)}} -}`,c=`__svelte_${Sb(f)}_${r}`,d=Hh(n),{stylesheet:m,rules:h}=po.get(d)||Tb(d,n);h[c]||(h[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${c} ${i}ms linear ${s}ms 1 both`,mo+=1,c}function al(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),mo-=s,mo||Cb())}function Cb(){fa(()=>{mo||(po.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),po.clear())})}function $b(n,e,t,i){if(!e)return G;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return G;const{delay:l=0,duration:o=300,easing:r=kl,start:a=No()+l,end:u=a+o,tick:f=G,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,h;function g(){c&&(h=rl(n,0,1,o,l,r,c)),l||(m=!0)}function _(){c&&al(n,h),d=!1}return Fo(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),_()),!d)return!1;if(m){const k=y-a,T=0+1*r(k/o);f(T,1-T)}return!0}),g(),f(0,1),_}function Mb(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,Vh(n,s)}}function Vh(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ul;function li(n){ul=n}function wl(){if(!ul)throw new Error("Function called outside component initialization");return ul}function nn(n){wl().$$.on_mount.push(n)}function Db(n){wl().$$.after_update.push(n)}function zh(n){wl().$$.on_destroy.push(n)}function $t(){const n=wl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=qh(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function We(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ms=[],ie=[],oo=[],Ir=[],Bh=Promise.resolve();let Pr=!1;function Uh(){Pr||(Pr=!0,Bh.then(ca))}function cn(){return Uh(),Bh}function st(n){oo.push(n)}function we(n){Ir.push(n)}const xo=new Set;let as=0;function ca(){if(as!==0)return;const n=ul;do{try{for(;as{Rs=null})),Rs}function Bi(n,e,t){n.dispatchEvent(qh(`${e?"intro":"outro"}${t}`))}const ro=new Set;let Yn;function pe(){Yn={r:0,c:[],p:Yn}}function me(){Yn.r||Le(Yn.c),Yn=Yn.p}function A(n,e){n&&n.i&&(ro.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(ro.has(n))return;ro.add(n),Yn.c.push(()=>{ro.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const pa={duration:0};function Wh(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&al(n,o)}function f(){const{delay:d=0,duration:m=300,easing:h=kl,tick:g=G,css:_}=s||pa;_&&(o=rl(n,0,1,m,d,h,_,a++)),g(0,1);const y=No()+d,k=y+m;r&&r.abort(),l=!0,st(()=>Bi(n,!0,"start")),r=Fo(T=>{if(l){if(T>=k)return g(1,0),Bi(n,!0,"end"),u(),l=!1;if(T>=y){const C=h((T-y)/m);g(C,1-C)}}return l})}let c=!1;return{start(){c||(c=!0,al(n),zt(s)?(s=s(i),da().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function Yh(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=Yn;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:c=kl,tick:d=G,css:m}=s||pa;m&&(o=rl(n,1,0,f,u,c,m));const h=No()+u,g=h+f;st(()=>Bi(n,!1,"start")),Fo(_=>{if(l){if(_>=g)return d(0,1),Bi(n,!1,"end"),--r.r||Le(r.c),!1;if(_>=h){const y=c((_-h)/f);d(1-y,y)}}return l})}return zt(s)?da().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&al(n,o),l=!1)}}}function Be(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&al(n,u)}function c(m,h){const g=m.b-o;return h*=Math.abs(g),{a:o,b:m.b,d:g,duration:h,start:m.start,end:m.start+h,group:m.group}}function d(m){const{delay:h=0,duration:g=300,easing:_=kl,tick:y=G,css:k}=l||pa,T={start:No()+h,b:m};m||(T.group=Yn,Yn.r+=1),r||a?a=T:(k&&(f(),u=rl(n,o,m,g,h,_,k)),m&&y(0,1),r=c(T,g),st(()=>Bi(n,m,"start")),Fo(C=>{if(a&&C>a.start&&(r=c(a,g),a=null,Bi(n,r.b,"start"),k&&(f(),u=rl(n,o,r.b,r.duration,0,_,l.css))),r){if(C>=r.end)y(o=r.b,1-o),Bi(n,r.b,"end"),a||(r.b?f():--r.group.r||Le(r.group.c)),r=null;else if(C>=r.start){const M=C-r.start;o=r.a+r.d*_(M/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){zt(l)?da().then(()=>{l=l(s),d(m)}):d(m)},end(){f(),r=a=null}}}function su(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(pe(),P(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),me())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ca()}if(bb(n)){const s=wl();if(n.then(l=>{li(s),i(e.then,1,e.value,l),li(null)},l=>{if(li(s),i(e.catch,2,e.error,l),li(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function Eb(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function Xi(n,e){n.d(1),e.delete(n.key)}function tn(n,e){P(n,1,1,()=>{e.delete(n.key)})}function Ab(n,e){n.f(),tn(n,e)}function wt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,m=l.length,h=d;const g={};for(;h--;)g[n[h].key]=h;const _=[],y=new Map,k=new Map;for(h=m;h--;){const $=c(s,l,h),O=t($);let E=o.get(O);E?i&&E.p($,e):(E=u(O,$),E.c()),y.set(O,_[h]=E),O in g&&k.set(O,Math.abs(h-g[O]))}const T=new Set,C=new Set;function M($){A($,1),$.m(r,f),o.set($.key,$),f=$.first,m--}for(;d&&m;){const $=_[m-1],O=n[d-1],E=$.key,I=O.key;$===O?(f=$.first,d--,m--):y.has(I)?!o.has(E)||T.has(E)?M($):C.has(I)?d--:k.get(E)>k.get(I)?(C.add(E),M($)):(T.add(I),d--):(a(O,o),d--)}for(;d--;){const $=n[d];y.has($.key)||a($,o)}for(;m;)M(_[m-1]);return _}function sn(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Xn(n){return typeof n=="object"&&n!==null?n:{}}function ke(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function q(n){n&&n.c()}function j(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||st(()=>{const o=n.$$.on_mount.map(Lh).filter(zt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Le(o),n.$$.on_mount=[]}),l.forEach(st)}function H(n,e){const t=n.$$;t.fragment!==null&&(Le(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ib(n,e){n.$$.dirty[0]===-1&&(ms.push(n),Uh(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const h=m.length?m[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=h)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](h),f&&Ib(n,c)),d}):[],u.update(),f=!0,Le(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=wb(e.target);u.fragment&&u.fragment.l(c),c.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),j(n,e.target,e.anchor,e.customElement),ca()}li(a)}class ye{$destroy(){H(this,1),this.$destroy=G}$on(e,t){if(!zt(t))return G;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!vb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Dt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function Jh(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return Kh(t,o=>{let r=!1;const a=[];let u=0,f=G;const c=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=zt(m)?m:G},d=s.map((m,h)=>Nh(m,g=>{a[h]=g,u&=~(1<{u|=1<{H(f,1)}),me()}l?(e=Kt(l,o()),e.$on("routeEvent",r[7]),q(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Lb(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{H(f,1)}),me()}l?(e=Kt(l,o()),e.$on("routeEvent",r[6]),q(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Nb(n){let e,t,i,s;const l=[Lb,Pb],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),me(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function lu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Ro=Kh(null,function(e){e(lu());const t=()=>{e(lu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});Jh(Ro,n=>n.location);const ma=Jh(Ro,n=>n.querystring),ou=Pn(void 0);async function Ti(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await cn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function Xt(n,e){if(e=au(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return ru(n,e),{update(t){t=au(t),ru(n,t)}}}function Fb(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function ru(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||Rb(i.currentTarget.getAttribute("href"))})}function au(n){return n&&typeof n=="string"?{href:n}:n||{}}function Rb(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function jb(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(M,$){if(!$||typeof $!="function"&&(typeof $!="object"||$._sveltesparouter!==!0))throw Error("Invalid component object");if(!M||typeof M=="string"&&(M.length<1||M.charAt(0)!="/"&&M.charAt(0)!="*")||typeof M=="object"&&!(M instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:E}=Zh(M);this.path=M,typeof $=="object"&&$._sveltesparouter===!0?(this.component=$.component,this.conditions=$.conditions||[],this.userData=$.userData,this.props=$.props||{}):(this.component=()=>Promise.resolve($),this.conditions=[],this.props={}),this._pattern=O,this._keys=E}match(M){if(s){if(typeof s=="string")if(M.startsWith(s))M=M.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const I=M.match(s);if(I&&I[0])M=M.substr(I[0].length)||"/";else return null}}const $=this._pattern.exec(M);if($===null)return null;if(this._keys===!1)return $;const O={};let E=0;for(;E{r.push(new o(M,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const c=$t();async function d(C,M){await cn(),c(C,M)}let m=null,h=null;l&&(h=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?m=C.state:m=null},window.addEventListener("popstate",h),Db(()=>{Fb(m)}));let g=null,_=null;const y=Ro.subscribe(async C=>{g=C;let M=0;for(;M{ou.set(u)});return}t(0,a=null),_=null,ou.set(void 0)});zh(()=>{y(),h&&window.removeEventListener("popstate",h)});function k(C){We.call(this,n,C)}function T(C){We.call(this,n,C)}return n.$$set=C=>{"routes"in C&&t(3,i=C.routes),"prefix"in C&&t(4,s=C.prefix),"restoreScrollState"in C&&t(5,l=C.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,k,T]}class Hb extends ye{constructor(e){super(),ve(this,e,jb,Nb,be,{routes:3,prefix:4,restoreScrollState:5})}}const ao=[];let Gh;function Xh(n){const e=n.pattern.test(Gh);uu(n,n.className,e),uu(n,n.inactiveClassName,!e)}function uu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Ro.subscribe(n=>{Gh=n.location+(n.querystring?"?"+n.querystring:""),ao.map(Xh)});function Fn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?Zh(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ao.push(i),Xh(i),{destroy(){ao.splice(ao.indexOf(i),1)}}}const qb="modulepreload",Vb=function(n,e){return new URL(n,e).href},fu={},ft=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=Vb(l,i),l in fu)return;fu[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":qb,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Lr=function(n,e){return Lr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Lr(n,e)};function Jt(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Lr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Nr=function(){return Nr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Sl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){for(var t=0,i=Object.entries(e);t0&&(!s.exp||s.exp-i>Date.now()/1e3))}(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this.baseToken=e||"",this.baseModel=t!==null&&typeof t=="object"?t.collectionId!==void 0?new Ki(t):new Ji(t):null,this.triggerChange()},n.prototype.clear=function(){this.baseToken="",this.baseModel=null,this.triggerChange()},n.prototype.loadFromCookie=function(e,t){t===void 0&&(t="pb_auth");var i=function(o,r){var a={};if(typeof o!="string")return a;for(var u=Object.assign({},r||{}).decode||zb,f=0;f4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof Ki&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=cu(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},ha=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Jt(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=200),i===void 0&&(i={}),this._getFullList(this.baseCrudPath,t,i)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Jt(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var o=[],r=function(a){return Qt(l,void 0,void 0,function(){return xt(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,m=c.totalItems;return o=o.concat(d),d.length&&m>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return Qt(this,void 0,void 0,function(){return xt(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:"realtime_"+this.clientId}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return Qt(t,void 0,void 0,function(){var l;return xt(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new fl({url:k.url,status:k.status,data:T});return[2,T]}})})}).catch(function(k){throw new fl(k)})]})})},n.prototype.getFileUrl=function(e,t,i){i===void 0&&(i={});var s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));var l=this.buildUrl(s.join("/"));if(Object.keys(i).length){var o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function Ui(n){return typeof n=="number"}function jo(n){return typeof n=="number"&&n%1===0}function s1(n){return typeof n=="string"}function l1(n){return Object.prototype.toString.call(n)==="[object Date]"}function kg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function o1(n){return Array.isArray(n)?n:[n]}function pu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function r1(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ss(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function oi(n,e,t){return jo(n)&&n>=e&&n<=t}function a1(n,e){return n-e*Math.floor(n/e)}function Ot(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function pi(n){if(!(xe(n)||n===null||n===""))return parseInt(n,10)}function Ii(n){if(!(xe(n)||n===null||n===""))return parseFloat(n)}function _a(n){if(!(xe(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function ba(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Cl(n){return n%4===0&&(n%100!==0||n%400===0)}function xs(n){return Cl(n)?366:365}function ho(n,e){const t=a1(e-1,12)+1,i=n+(e-t)/12;return t===2?Cl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function va(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function go(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function jr(n){return n>99?n:n>60?1900+n:2e3+n}function wg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Ho(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function Sg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Mn(`Invalid unit value ${n}`);return e}function _o(n,e){const t={};for(const i in n)if(Ss(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Sg(s)}return t}function el(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Ot(t,2)}:${Ot(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ot(t,2)}${Ot(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function qo(n){return r1(n,["hour","minute","second","millisecond"])}const Tg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,u1=["January","February","March","April","May","June","July","August","September","October","November","December"],Cg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f1=["J","F","M","A","M","J","J","A","S","O","N","D"];function $g(n){switch(n){case"narrow":return[...f1];case"short":return[...Cg];case"long":return[...u1];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Mg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Dg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],c1=["M","T","W","T","F","S","S"];function Og(n){switch(n){case"narrow":return[...c1];case"short":return[...Dg];case"long":return[...Mg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Eg=["AM","PM"],d1=["Before Christ","Anno Domini"],p1=["BC","AD"],m1=["B","A"];function Ag(n){switch(n){case"narrow":return[...m1];case"short":return[...p1];case"long":return[...d1];default:return null}}function h1(n){return Eg[n.hour<12?0:1]}function g1(n,e){return Og(e)[n.weekday-1]}function _1(n,e){return $g(e)[n.month-1]}function b1(n,e){return Ag(e)[n.year<0?0:1]}function v1(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function mu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const y1={D:Rr,DD:ng,DDD:ig,DDDD:sg,t:lg,tt:og,ttt:rg,tttt:ag,T:ug,TT:fg,TTT:cg,TTTT:dg,f:pg,ff:hg,fff:_g,ffff:vg,F:mg,FF:gg,FFF:bg,FFFF:yg};class fn{static create(e,t={}){return new fn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return y1[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Ot(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(m,h)=>this.loc.extract(e,m,h),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?h1(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,h)=>i?_1(e,m):l(h?{month:m}:{month:m,day:"numeric"},"month"),u=(m,h)=>i?g1(e,m):l(h?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const h=fn.macroTokenToFormatOpts(m);return h?this.formatWithSystemDefault(e,h):m},c=m=>i?b1(e,m):l({era:m},"era"),d=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return mu(fn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=fn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return mu(l,s(r))}}class Rn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class $l{get type(){throw new ci}get name(){throw new ci}get ianaName(){return this.name}get isUniversal(){throw new ci}offsetName(e,t){throw new ci}formatOffset(e,t){throw new ci}offset(e){throw new ci}equals(e){throw new ci}get isValid(){throw new ci}}let er=null;class ya extends $l{static get instance(){return er===null&&(er=new ya),er}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return wg(e,t,i)}formatOffset(e,t){return el(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let uo={};function k1(n){return uo[n]||(uo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),uo[n]}const w1={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function S1(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function T1(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?h:1e3+h,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let tr=null;class en extends $l{static get utcInstance(){return tr===null&&(tr=new en(0)),tr}static instance(e){return e===0?en.utcInstance:new en(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new en(Ho(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${el(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${el(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return el(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class C1 extends $l{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function mi(n,e){if(xe(n)||n===null)return e;if(n instanceof $l)return n;if(s1(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?en.utcInstance:en.parseSpecifier(t)||ri.create(n)}else return Ui(n)?en.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new C1(n)}let hu=()=>Date.now(),gu="system",_u=null,bu=null,vu=null,yu;class Lt{static get now(){return hu}static set now(e){hu=e}static set defaultZone(e){gu=e}static get defaultZone(){return mi(gu,ya.instance)}static get defaultLocale(){return _u}static set defaultLocale(e){_u=e}static get defaultNumberingSystem(){return bu}static set defaultNumberingSystem(e){bu=e}static get defaultOutputCalendar(){return vu}static set defaultOutputCalendar(e){vu=e}static get throwOnInvalid(){return yu}static set throwOnInvalid(e){yu=e}static resetCaches(){_t.resetCache(),ri.resetCache()}}let ku={};function $1(n,e={}){const t=JSON.stringify([n,e]);let i=ku[t];return i||(i=new Intl.ListFormat(n,e),ku[t]=i),i}let Hr={};function qr(n,e={}){const t=JSON.stringify([n,e]);let i=Hr[t];return i||(i=new Intl.DateTimeFormat(n,e),Hr[t]=i),i}let Vr={};function M1(n,e={}){const t=JSON.stringify([n,e]);let i=Vr[t];return i||(i=new Intl.NumberFormat(n,e),Vr[t]=i),i}let zr={};function D1(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=zr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),zr[s]=l),l}let Gs=null;function O1(){return Gs||(Gs=new Intl.DateTimeFormat().resolvedOptions().locale,Gs)}function E1(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=qr(n).resolvedOptions()}catch{t=qr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function A1(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function I1(n){const e=[];for(let t=1;t<=12;t++){const i=Ve.utc(2016,t,1);e.push(n(i))}return e}function P1(n){const e=[];for(let t=1;t<=7;t++){const i=Ve.utc(2016,11,13+t);e.push(n(i))}return e}function ql(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function L1(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class N1{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=M1(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):ba(e,3);return Ot(t,this.padTo)}}}class F1{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ri.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Ve.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=qr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class R1{constructor(e,t,i){this.opts={style:"long",...i},!t&&kg()&&(this.rtf=D1(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):v1(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class _t{static fromOpts(e){return _t.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Lt.defaultLocale,o=l||(s?"en-US":O1()),r=t||Lt.defaultNumberingSystem,a=i||Lt.defaultOutputCalendar;return new _t(o,r,a,l)}static resetCache(){Gs=null,Hr={},Vr={},zr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return _t.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=E1(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=A1(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=L1(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:_t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return ql(this,e,i,$g,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=I1(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return ql(this,e,i,Og,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=P1(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return ql(this,void 0,e,()=>Eg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ve.utc(2016,11,13,9),Ve.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return ql(this,e,t,Ag,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ve.utc(-40,1,1),Ve.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new N1(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new F1(e,this.intl,t)}relFormatter(e={}){return new R1(this.intl,this.isEnglish(),e)}listFormatter(e={}){return $1(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Es(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function As(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function Is(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function Ig(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(h||m&&f)?-m:m;return[{years:d(Ii(t)),months:d(Ii(i)),weeks:d(Ii(s)),days:d(Ii(l)),hours:d(Ii(o)),minutes:d(Ii(r)),seconds:d(Ii(a),a==="-0"),milliseconds:d(_a(u),c)}]}const G1={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Sa(n,e,t,i,s,l,o){const r={year:e.length===2?jr(pi(e)):pi(e),month:Cg.indexOf(t)+1,day:pi(i),hour:pi(s),minute:pi(l)};return o&&(r.second=pi(o)),n&&(r.weekday=n.length>3?Mg.indexOf(n)+1:Dg.indexOf(n)+1),r}const X1=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Q1(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=Sa(e,s,i,t,l,o,r);let m;return a?m=G1[a]:u?m=0:m=Ho(f,c),[d,new en(m)]}function x1(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const e0=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,t0=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,n0=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function wu(n){const[,e,t,i,s,l,o,r]=n;return[Sa(e,s,i,t,l,o,r),en.utcInstance]}function i0(n){const[,e,t,i,s,l,o,r]=n;return[Sa(e,r,t,i,s,l,o),en.utcInstance]}const s0=Es(H1,wa),l0=Es(q1,wa),o0=Es(V1,wa),r0=Es(Lg),Fg=As(Y1,Ps,Ml,Dl),a0=As(z1,Ps,Ml,Dl),u0=As(B1,Ps,Ml,Dl),f0=As(Ps,Ml,Dl);function c0(n){return Is(n,[s0,Fg],[l0,a0],[o0,u0],[r0,f0])}function d0(n){return Is(x1(n),[X1,Q1])}function p0(n){return Is(n,[e0,wu],[t0,wu],[n0,i0])}function m0(n){return Is(n,[J1,Z1])}const h0=As(Ps);function g0(n){return Is(n,[K1,h0])}const _0=Es(U1,W1),b0=Es(Ng),v0=As(Ps,Ml,Dl);function y0(n){return Is(n,[_0,Fg],[b0,v0])}const k0="Invalid Duration",Rg={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},w0={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Rg},wn=146097/400,fs=146097/4800,S0={years:{quarters:4,months:12,weeks:wn/7,days:wn,hours:wn*24,minutes:wn*24*60,seconds:wn*24*60*60,milliseconds:wn*24*60*60*1e3},quarters:{months:3,weeks:wn/28,days:wn/4,hours:wn*24/4,minutes:wn*24*60/4,seconds:wn*24*60*60/4,milliseconds:wn*24*60*60*1e3/4},months:{weeks:fs/7,days:fs,hours:fs*24,minutes:fs*24*60,seconds:fs*24*60*60,milliseconds:fs*24*60*60*1e3},...Rg},ji=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],T0=ji.slice(0).reverse();function Pi(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new it(i)}function C0(n){return n<0?Math.floor(n):Math.ceil(n)}function jg(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?C0(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function $0(n,e){T0.reduce((t,i)=>xe(e[i])?t:(t&&jg(n,e,t,e,i),i),null)}class it{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||_t.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?S0:w0,this.isLuxonDuration=!0}static fromMillis(e,t){return it.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Mn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new it({values:_o(e,it.normalizeUnit),loc:_t.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(Ui(e))return it.fromMillis(e);if(it.isDuration(e))return e;if(typeof e=="object")return it.fromObject(e);throw new Mn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=m0(e);return i?it.fromObject(i,t):it.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=g0(e);return i?it.fromObject(i,t):it.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Mn("need to specify a reason the Duration is invalid");const i=e instanceof Rn?e:new Rn(e,t);if(Lt.throwOnInvalid)throw new t1(i);return new it({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new tg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?fn.create(this.loc,i).formatDurationFromString(this,e):k0}toHuman(e={}){const t=ji.map(i=>{const s=this.values[i];return xe(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=ba(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=it.fromDurationLike(e),i={};for(const s of ji)(Ss(t.values,s)||Ss(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Pi(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=it.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Sg(e(this.values[i],i));return Pi(this,{values:t},!0)}get(e){return this[it.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,..._o(e,it.normalizeUnit)};return Pi(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Pi(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return $0(this.matrix,e),Pi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>it.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of ji)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;Ui(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)ji.indexOf(u)>ji.indexOf(o)&&jg(this.matrix,s,u,t,o)}else Ui(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Pi(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Pi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of ji)if(!t(this.values[i],e.values[i]))return!1;return!0}}const js="Invalid Interval";function M0(n,e){return!n||!n.isValid?vt.invalid("missing or invalid start"):!e||!e.isValid?vt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?vt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Vs).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(vt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=it.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(vt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:vt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return vt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(vt.fromDateTimes(t,a.time)),t=null);return vt.merge(s)}difference(...e){return vt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:js}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:js}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:js}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:js}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:js}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):it.invalid(this.invalidReason)}mapEndpoints(e){return vt.fromDateTimes(e(this.s),e(this.e))}}class Vl{static hasDST(e=Lt.defaultZone){const t=Ve.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ri.isValidZone(e)}static normalizeZone(e){return mi(e,Lt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||_t.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||_t.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||_t.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||_t.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return _t.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return _t.create(t,null,"gregory").eras(e)}static features(){return{relative:kg()}}}function Su(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(it.fromMillis(i).as("days"))}function D0(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=Su(r,a);return(u-u%7)/7}],["days",Su]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function O0(n,e,t,i){let[s,l,o,r]=D0(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?it.fromMillis(a,i).shiftTo(...u).plus(f):f}const Ta={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Tu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},E0=Ta.hanidec.replace(/[\[|\]]/g,"").split("");function A0(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Ln({numberingSystem:n},e=""){return new RegExp(`${Ta[n||"latn"]}${e}`)}const I0="missing Intl.DateTimeFormat.formatToParts support";function rt(n,e=t=>t){return{regex:n,deser:([t])=>e(A0(t))}}const P0=String.fromCharCode(160),Hg=`[ ${P0}]`,qg=new RegExp(Hg,"g");function L0(n){return n.replace(/\./g,"\\.?").replace(qg,Hg)}function Cu(n){return n.replace(/\./g,"").replace(qg," ").toLowerCase()}function Nn(n,e){return n===null?null:{regex:RegExp(n.map(L0).join("|")),deser:([t])=>n.findIndex(i=>Cu(t)===Cu(i))+e}}function $u(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function nr(n){return{regex:n,deser:([e])=>e}}function N0(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function F0(n,e){const t=Ln(e),i=Ln(e,"{2}"),s=Ln(e,"{3}"),l=Ln(e,"{4}"),o=Ln(e,"{6}"),r=Ln(e,"{1,2}"),a=Ln(e,"{1,3}"),u=Ln(e,"{1,6}"),f=Ln(e,"{1,9}"),c=Ln(e,"{2,4}"),d=Ln(e,"{4,6}"),m=_=>({regex:RegExp(N0(_.val)),deser:([y])=>y,literal:!0}),g=(_=>{if(n.literal)return m(_);switch(_.val){case"G":return Nn(e.eras("short",!1),0);case"GG":return Nn(e.eras("long",!1),0);case"y":return rt(u);case"yy":return rt(c,jr);case"yyyy":return rt(l);case"yyyyy":return rt(d);case"yyyyyy":return rt(o);case"M":return rt(r);case"MM":return rt(i);case"MMM":return Nn(e.months("short",!0,!1),1);case"MMMM":return Nn(e.months("long",!0,!1),1);case"L":return rt(r);case"LL":return rt(i);case"LLL":return Nn(e.months("short",!1,!1),1);case"LLLL":return Nn(e.months("long",!1,!1),1);case"d":return rt(r);case"dd":return rt(i);case"o":return rt(a);case"ooo":return rt(s);case"HH":return rt(i);case"H":return rt(r);case"hh":return rt(i);case"h":return rt(r);case"mm":return rt(i);case"m":return rt(r);case"q":return rt(r);case"qq":return rt(i);case"s":return rt(r);case"ss":return rt(i);case"S":return rt(a);case"SSS":return rt(s);case"u":return nr(f);case"uu":return nr(r);case"uuu":return rt(t);case"a":return Nn(e.meridiems(),0);case"kkkk":return rt(l);case"kk":return rt(c,jr);case"W":return rt(r);case"WW":return rt(i);case"E":case"c":return rt(t);case"EEE":return Nn(e.weekdays("short",!1,!1),1);case"EEEE":return Nn(e.weekdays("long",!1,!1),1);case"ccc":return Nn(e.weekdays("short",!0,!1),1);case"cccc":return Nn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return $u(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return $u(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return nr(/[a-z_+-/]{1,256}?/i);default:return m(_)}})(n)||{invalidReason:I0};return g.token=n,g}const R0={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function j0(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=R0[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function H0(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function q0(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ss(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function V0(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return xe(n.z)||(t=ri.create(n.z)),xe(n.Z)||(t||(t=new en(n.Z)),i=n.Z),xe(n.q)||(n.M=(n.q-1)*3+1),xe(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),xe(n.u)||(n.S=_a(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let ir=null;function z0(){return ir||(ir=Ve.fromMillis(1555555555555)),ir}function B0(n,e){if(n.literal)return n;const t=fn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=fn.create(e,t).formatDateTimeParts(z0()).map(o=>j0(o,e,t));return l.includes(void 0)?n:l}function U0(n,e){return Array.prototype.concat(...n.map(t=>B0(t,e)))}function Vg(n,e,t){const i=U0(fn.parseFormat(t),n),s=i.map(o=>F0(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=H0(s),a=RegExp(o,"i"),[u,f]=q0(e,a,r),[c,d,m]=f?V0(f):[null,null,void 0];if(Ss(f,"a")&&Ss(f,"H"))throw new Zs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:m}}}function W0(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=Vg(n,e,t);return[i,s,l,o]}const zg=[0,31,59,90,120,151,181,212,243,273,304,334],Bg=[0,31,60,91,121,152,182,213,244,274,305,335];function On(n,e){return new Rn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Ug(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function Wg(n,e,t){return t+(Cl(n)?Bg:zg)[e-1]}function Yg(n,e){const t=Cl(n)?Bg:zg,i=t.findIndex(l=>lgo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...qo(n)}}function Mu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Ug(e,1,4),l=xs(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=xs(r)):o>l?(r=e+1,o-=xs(e)):r=e;const{month:a,day:u}=Yg(r,o);return{year:r,month:a,day:u,...qo(n)}}function sr(n){const{year:e,month:t,day:i}=n,s=Wg(e,t,i);return{year:e,ordinal:s,...qo(n)}}function Du(n){const{year:e,ordinal:t}=n,{month:i,day:s}=Yg(e,t);return{year:e,month:i,day:s,...qo(n)}}function Y0(n){const e=jo(n.weekYear),t=oi(n.weekNumber,1,go(n.weekYear)),i=oi(n.weekday,1,7);return e?t?i?!1:On("weekday",n.weekday):On("week",n.week):On("weekYear",n.weekYear)}function K0(n){const e=jo(n.year),t=oi(n.ordinal,1,xs(n.year));return e?t?!1:On("ordinal",n.ordinal):On("year",n.year)}function Kg(n){const e=jo(n.year),t=oi(n.month,1,12),i=oi(n.day,1,ho(n.year,n.month));return e?t?i?!1:On("day",n.day):On("month",n.month):On("year",n.year)}function Jg(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=oi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=oi(t,0,59),r=oi(i,0,59),a=oi(s,0,999);return l?o?r?a?!1:On("millisecond",s):On("second",i):On("minute",t):On("hour",e)}const lr="Invalid DateTime",Ou=864e13;function zl(n){return new Rn("unsupported zone",`the zone "${n.name}" is not supported`)}function or(n){return n.weekData===null&&(n.weekData=Br(n.c)),n.weekData}function Hs(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Ve({...t,...e,old:t})}function Zg(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Eu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function fo(n,e,t){return Zg(va(n),e,t)}function Au(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,ho(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=it.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=va(l);let[a,u]=Zg(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function qs(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Ve.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Ve.invalid(new Rn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?fn.create(_t.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function rr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Ot(n.c.year,t?6:4),e?(i+="-",i+=Ot(n.c.month),i+="-",i+=Ot(n.c.day)):(i+=Ot(n.c.month),i+=Ot(n.c.day)),i}function Iu(n,e,t,i,s,l){let o=Ot(n.c.hour);return e?(o+=":",o+=Ot(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Ot(n.c.minute),(n.c.second!==0||!t)&&(o+=Ot(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Ot(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Ot(Math.trunc(-n.o/60)),o+=":",o+=Ot(Math.trunc(-n.o%60))):(o+="+",o+=Ot(Math.trunc(n.o/60)),o+=":",o+=Ot(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const Gg={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},J0={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Z0={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Xg=["year","month","day","hour","minute","second","millisecond"],G0=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],X0=["year","ordinal","hour","minute","second","millisecond"];function Pu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new tg(n);return e}function Lu(n,e){const t=mi(e.zone,Lt.defaultZone),i=_t.fromObject(e),s=Lt.now();let l,o;if(xe(n.year))l=s;else{for(const u of Xg)xe(n[u])&&(n[u]=Gg[u]);const r=Kg(n)||Jg(n);if(r)return Ve.invalid(r);const a=t.offset(s);[l,o]=fo(n,a,t)}return new Ve({ts:l,zone:t,loc:i,o})}function Nu(n,e,t){const i=xe(t.round)?!0:t.round,s=(o,r)=>(o=ba(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Fu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class Ve{constructor(e){const t=e.zone||Lt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Rn("invalid input"):null)||(t.isValid?null:zl(t));this.ts=xe(e.ts)?Lt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Eu(this.ts,r),i=Number.isNaN(s.year)?new Rn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||_t.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Ve({})}static local(){const[e,t]=Fu(arguments),[i,s,l,o,r,a,u]=t;return Lu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Fu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=en.utcInstance,Lu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=l1(e)?e.valueOf():NaN;if(Number.isNaN(i))return Ve.invalid("invalid input");const s=mi(t.zone,Lt.defaultZone);return s.isValid?new Ve({ts:i,zone:s,loc:_t.fromObject(t)}):Ve.invalid(zl(s))}static fromMillis(e,t={}){if(Ui(e))return e<-Ou||e>Ou?Ve.invalid("Timestamp out of range"):new Ve({ts:e,zone:mi(t.zone,Lt.defaultZone),loc:_t.fromObject(t)});throw new Mn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ui(e))return new Ve({ts:e*1e3,zone:mi(t.zone,Lt.defaultZone),loc:_t.fromObject(t)});throw new Mn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=mi(t.zone,Lt.defaultZone);if(!i.isValid)return Ve.invalid(zl(i));const s=Lt.now(),l=xe(t.specificOffset)?i.offset(s):t.specificOffset,o=_o(e,Pu),r=!xe(o.ordinal),a=!xe(o.year),u=!xe(o.month)||!xe(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=_t.fromObject(t);if((f||r)&&c)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Zs("Can't mix ordinal dates with month/day");const m=c||o.weekday&&!f;let h,g,_=Eu(s,l);m?(h=G0,g=J0,_=Br(_)):r?(h=X0,g=Z0,_=sr(_)):(h=Xg,g=Gg);let y=!1;for(const E of h){const I=o[E];xe(I)?y?o[E]=g[E]:o[E]=_[E]:y=!0}const k=m?Y0(o):r?K0(o):Kg(o),T=k||Jg(o);if(T)return Ve.invalid(T);const C=m?Mu(o):r?Du(o):o,[M,$]=fo(C,l,i),O=new Ve({ts:M,zone:i,o:$,loc:d});return o.weekday&&f&&e.weekday!==O.weekday?Ve.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=c0(e);return qs(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=d0(e);return qs(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=p0(e);return qs(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(xe(e)||xe(t))throw new Mn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=_t.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=W0(o,e,t);return f?Ve.invalid(f):qs(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Ve.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=y0(e);return qs(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Mn("need to specify a reason the DateTime is invalid");const i=e instanceof Rn?e:new Rn(e,t);if(Lt.throwOnInvalid)throw new xb(i);return new Ve({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?or(this).weekYear:NaN}get weekNumber(){return this.isValid?or(this).weekNumber:NaN}get weekday(){return this.isValid?or(this).weekday:NaN}get ordinal(){return this.isValid?sr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Vl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Vl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Vl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Vl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Cl(this.year)}get daysInMonth(){return ho(this.year,this.month)}get daysInYear(){return this.isValid?xs(this.year):NaN}get weeksInWeekYear(){return this.isValid?go(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=fn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(en.instance(e),t)}toLocal(){return this.setZone(Lt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=mi(e,Lt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=fo(o,l,e)}return Hs(this,{ts:s,zone:e})}else return Ve.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Hs(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=_o(e,Pu),i=!xe(t.weekYear)||!xe(t.weekNumber)||!xe(t.weekday),s=!xe(t.ordinal),l=!xe(t.year),o=!xe(t.month)||!xe(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Zs("Can't mix ordinal dates with month/day");let u;i?u=Mu({...Br(this.c),...t}):xe(t.ordinal)?(u={...this.toObject(),...t},xe(t.day)&&(u.day=Math.min(ho(u.year,u.month),u.day))):u=Du({...sr(this.c),...t});const[f,c]=fo(u,this.o,this.zone);return Hs(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=it.fromDurationLike(e);return Hs(this,Au(this,t))}minus(e){if(!this.isValid)return this;const t=it.fromDurationLike(e).negate();return Hs(this,Au(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=it.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?fn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):lr}toLocaleString(e=Rr,t={}){return this.isValid?fn.create(this.loc.clone(t),e).formatDateTime(this):lr}toLocaleParts(e={}){return this.isValid?fn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=rr(this,o);return r+="T",r+=Iu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?rr(this,e==="extended"):null}toISOWeekDate(){return Bl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Iu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Bl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Bl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?rr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Bl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():lr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return it.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=o1(t).map(it.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=O0(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Ve.now(),e,t)}until(e){return this.isValid?vt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Ve.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Ve.isDateTime))throw new Mn("max requires all arguments be DateTimes");return pu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=_t.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return Vg(o,e,t)}static fromStringExplain(e,t,i={}){return Ve.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Rr}static get DATE_MED(){return ng}static get DATE_MED_WITH_WEEKDAY(){return n1}static get DATE_FULL(){return ig}static get DATE_HUGE(){return sg}static get TIME_SIMPLE(){return lg}static get TIME_WITH_SECONDS(){return og}static get TIME_WITH_SHORT_OFFSET(){return rg}static get TIME_WITH_LONG_OFFSET(){return ag}static get TIME_24_SIMPLE(){return ug}static get TIME_24_WITH_SECONDS(){return fg}static get TIME_24_WITH_SHORT_OFFSET(){return cg}static get TIME_24_WITH_LONG_OFFSET(){return dg}static get DATETIME_SHORT(){return pg}static get DATETIME_SHORT_WITH_SECONDS(){return mg}static get DATETIME_MED(){return hg}static get DATETIME_MED_WITH_SECONDS(){return gg}static get DATETIME_MED_WITH_WEEKDAY(){return i1}static get DATETIME_FULL(){return _g}static get DATETIME_FULL_WITH_SECONDS(){return bg}static get DATETIME_HUGE(){return vg}static get DATETIME_HUGE_WITH_SECONDS(){return yg}}function Vs(n){if(Ve.isDateTime(n))return n;if(n&&n.valueOf&&Ui(n.valueOf()))return Ve.fromJSDate(n);if(n&&typeof n=="object")return Ve.fromObject(n);throw new Mn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const Q0=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],x0=[".mp4",".avi",".mov",".3gp",".wmv"],ev=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],tv=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class V{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||V.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return V.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!V.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!V.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){V.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=V.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!V.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!V.isObject(l)&&!Array.isArray(l)||!V.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!V.isObject(s)&&!Array.isArray(s)||!V.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):V.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||V.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||V.isObject(e)&&Object.keys(e).length>0)&&V.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s{console.warn("Failed to copy.",i)})}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",t+".json"),s.click(),s.remove()}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!Q0.find(t=>e.endsWith(t))}static hasVideoExtension(e){return!!x0.find(t=>e.endsWith(t))}static hasAudioExtension(e){return!!ev.find(t=>e.endsWith(t))}static hasDocumentExtension(e){return!!tv.find(t=>e.endsWith(t))}static getFileType(e){return V.hasImageExtension(e)?"image":V.hasDocumentExtension(e)?"document":V.hasVideoExtension(e)?"video":V.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(V.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)V.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):V.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var s,l,o,r,a;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name,created:"2022-01-01 01:00:00.123Z",updated:"2022-01-01 23:59:59.456Z"};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com");for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00.123Z":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)!==1&&(f=[f])):u.type==="select"?(f=(o=(l=u.options)==null?void 0:l.values)==null?void 0:o[0],((r=u.options)==null?void 0:r.maxSelect)!==1&&(f=[f])):u.type==="relation"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)!==1&&(f=[f])):f="test",i[u.name]=f}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"single":return"ri-file-list-2-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!V.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!V.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=V.isObject(u)&&V.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type==="auth"?t.push(l):l.type==="single"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_css:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","insertdatetime","media","table","code","codesample"],toolbar:"undo redo | styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],c=u.create(a,o,f);u.add(c),e(c.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(V.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?V.plainText(r):r,s.push(V.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!V.isEmpty(e[o]))return e[o];return i}}const Vo=Pn([]);function Qg(n,e=4e3){return zo(n,"info",e)}function Vt(n,e=3e3){return zo(n,"success",e)}function cl(n,e=4500){return zo(n,"error",e)}function nv(n,e=4500){return zo(n,"warning",e)}function zo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{xg(i)},t)};Vo.update(s=>($a(s,i.message),V.pushOrReplaceByKey(s,i,"message"),s))}function xg(n){Vo.update(e=>($a(e,n),e))}function Ca(){Vo.update(n=>{for(let e of n)$a(n,e);return[]})}function $a(n,e){let t;typeof e=="string"?t=V.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),V.removeByKey(n,"message",t.message))}const Ci=Pn({});function Vn(n){Ci.set(n||{})}function Ts(n){Ci.update(e=>(V.deleteByPath(e,n),e))}const Ma=Pn({});function Ur(n){Ma.set(n||{})}ga.prototype.logout=function(n=!0){this.authStore.clear(),n&&Ti("/login")};ga.prototype.errorResponseHandler=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&cl(l)}if(V.isEmpty(s.data)||Vn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Ti("/")};class iv extends xh{save(e,t){super.save(e,t),t instanceof Ji&&Ur(t)}clear(){super.clear(),Ur(null)}}const he=new ga("../",new iv("pb_admin_auth"));he.authStore.model instanceof Ji&&Ur(he.authStore.model);function sv(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=n[3].default,h=Nt(m,n,n[2],null);return{c(){e=v("div"),t=v("main"),h&&h.c(),i=D(),s=v("footer"),l=v("a"),l.innerHTML='Docs',o=D(),r=v("span"),r.textContent="|",a=D(),u=v("a"),f=v("span"),f.textContent="PocketBase v0.12.0",p(t,"class","page-content"),p(l,"href","https://pocketbase.io/docs/"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(r,"class","delimiter"),p(f,"class","txt"),p(u,"href","https://github.com/pocketbase/pocketbase/releases"),p(u,"target","_blank"),p(u,"rel","noopener noreferrer"),p(u,"title","Releases"),p(s,"class","page-footer"),p(e,"class",c="page-wrapper "+n[1]),Q(e,"center-content",n[0])},m(g,_){S(g,e,_),b(e,t),h&&h.m(t,null),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(u,f),d=!0},p(g,[_]){h&&h.p&&(!d||_&4)&&Rt(h,m,g,g[2],d?Ft(m,g[2],_,null):jt(g[2]),null),(!d||_&2&&c!==(c="page-wrapper "+g[1]))&&p(e,"class",c),(!d||_&3)&&Q(e,"center-content",g[0])},i(g){d||(A(h,g),d=!0)},o(g){P(h,g),d=!1},d(g){g&&w(e),h&&h.d(g)}}}function lv(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class kn extends ye{constructor(e){super(),ve(this,e,lv,sv,be,{center:0,class:1})}}function Ru(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=D(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function ov(n){let e,t,i,s=!n[0]&&Ru();const l=n[1].default,o=Nt(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=D(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),b(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Ru(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&Rt(o,l,r,r[2],i?Ft(l,r[2],a,null):jt(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function rv(n){let e,t;return e=new kn({props:{class:"full-page",center:!0,$$slots:{default:[ov]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function av(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class e_ extends ye{constructor(e){super(),ve(this,e,av,rv,be,{nobranding:0})}}function ju(n,e,t){const i=n.slice();return i[11]=e[t],i}const uv=n=>({}),Hu=n=>({uniqueId:n[3]});function fv(n){let e=(n[11]||bo)+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||bo)+"")&&re(t,e)},d(i){i&&w(t)}}}function cv(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||bo)+"",i;return{c(){e=v("pre"),i=B(t)},m(o,r){S(o,e,r),b(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||bo)+"")&&re(i,t)},d(o){o&&w(e)}}}function qu(n){let e,t;function i(o,r){return typeof o[11]=="object"?cv:fv}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=D(),p(e,"class","help-block help-block-error")},m(o,r){S(o,e,r),l.m(e,null),b(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function dv(n){let e,t,i,s,l;const o=n[7].default,r=Nt(o,n,n[6],Hu);let a=n[2],u=[];for(let f=0;ft(5,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+V.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){Ts(r)}nn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(h){We.call(this,n,h)}function m(h){ie[h?"unshift":"push"](()=>{u=h,t(1,u)})}return n.$$set=h=>{"name"in h&&t(4,r=h.name),"class"in h&&t(0,a=h.class),"$$scope"in h&&t(6,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=V.toArray(V.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,m]}class _e extends ye{constructor(e){super(),ve(this,e,pv,dv,be,{name:4,class:0})}}function mv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=D(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0]),l.focus(),r||(a=K(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&ce(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function hv(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Password"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),ce(l,n[1]),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&ce(l,c[1])},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function gv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Password confirm"),s=D(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[2]),r||(a=K(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&ce(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _v(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return s=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[mv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[hv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[gv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=D(),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),f=v("button"),f.innerHTML=`Create and login +}`,c=`__svelte_${Sb(f)}_${r}`,d=Hh(n),{stylesheet:m,rules:h}=po.get(d)||Tb(d,n);h[c]||(h[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${c} ${i}ms linear ${s}ms 1 both`,mo+=1,c}function al(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),mo-=s,mo||Cb())}function Cb(){fa(()=>{mo||(po.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),po.clear())})}function $b(n,e,t,i){if(!e)return G;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return G;const{delay:l=0,duration:o=300,easing:r=kl,start:a=No()+l,end:u=a+o,tick:f=G,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,h;function g(){c&&(h=rl(n,0,1,o,l,r,c)),l||(m=!0)}function _(){c&&al(n,h),d=!1}return Fo(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),_()),!d)return!1;if(m){const k=y-a,T=0+1*r(k/o);f(T,1-T)}return!0}),g(),f(0,1),_}function Mb(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,Vh(n,s)}}function Vh(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ul;function li(n){ul=n}function wl(){if(!ul)throw new Error("Function called outside component initialization");return ul}function nn(n){wl().$$.on_mount.push(n)}function Db(n){wl().$$.after_update.push(n)}function zh(n){wl().$$.on_destroy.push(n)}function $t(){const n=wl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=qh(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function We(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ms=[],ie=[],oo=[],Ir=[],Bh=Promise.resolve();let Pr=!1;function Uh(){Pr||(Pr=!0,Bh.then(ca))}function cn(){return Uh(),Bh}function st(n){oo.push(n)}function we(n){Ir.push(n)}const xo=new Set;let as=0;function ca(){if(as!==0)return;const n=ul;do{try{for(;as{Rs=null})),Rs}function Bi(n,e,t){n.dispatchEvent(qh(`${e?"intro":"outro"}${t}`))}const ro=new Set;let Yn;function pe(){Yn={r:0,c:[],p:Yn}}function me(){Yn.r||Le(Yn.c),Yn=Yn.p}function A(n,e){n&&n.i&&(ro.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(ro.has(n))return;ro.add(n),Yn.c.push(()=>{ro.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const pa={duration:0};function Wh(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&al(n,o)}function f(){const{delay:d=0,duration:m=300,easing:h=kl,tick:g=G,css:_}=s||pa;_&&(o=rl(n,0,1,m,d,h,_,a++)),g(0,1);const y=No()+d,k=y+m;r&&r.abort(),l=!0,st(()=>Bi(n,!0,"start")),r=Fo(T=>{if(l){if(T>=k)return g(1,0),Bi(n,!0,"end"),u(),l=!1;if(T>=y){const C=h((T-y)/m);g(C,1-C)}}return l})}let c=!1;return{start(){c||(c=!0,al(n),zt(s)?(s=s(i),da().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function Yh(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=Yn;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:c=kl,tick:d=G,css:m}=s||pa;m&&(o=rl(n,1,0,f,u,c,m));const h=No()+u,g=h+f;st(()=>Bi(n,!1,"start")),Fo(_=>{if(l){if(_>=g)return d(0,1),Bi(n,!1,"end"),--r.r||Le(r.c),!1;if(_>=h){const y=c((_-h)/f);d(1-y,y)}}return l})}return zt(s)?da().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&al(n,o),l=!1)}}}function Be(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&al(n,u)}function c(m,h){const g=m.b-o;return h*=Math.abs(g),{a:o,b:m.b,d:g,duration:h,start:m.start,end:m.start+h,group:m.group}}function d(m){const{delay:h=0,duration:g=300,easing:_=kl,tick:y=G,css:k}=l||pa,T={start:No()+h,b:m};m||(T.group=Yn,Yn.r+=1),r||a?a=T:(k&&(f(),u=rl(n,o,m,g,h,_,k)),m&&y(0,1),r=c(T,g),st(()=>Bi(n,m,"start")),Fo(C=>{if(a&&C>a.start&&(r=c(a,g),a=null,Bi(n,r.b,"start"),k&&(f(),u=rl(n,o,r.b,r.duration,0,_,l.css))),r){if(C>=r.end)y(o=r.b,1-o),Bi(n,r.b,"end"),a||(r.b?f():--r.group.r||Le(r.group.c)),r=null;else if(C>=r.start){const M=C-r.start;o=r.a+r.d*_(M/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){zt(l)?da().then(()=>{l=l(s),d(m)}):d(m)},end(){f(),r=a=null}}}function su(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(pe(),P(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),me())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ca()}if(bb(n)){const s=wl();if(n.then(l=>{li(s),i(e.then,1,e.value,l),li(null)},l=>{if(li(s),i(e.catch,2,e.error,l),li(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function Eb(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function Xi(n,e){n.d(1),e.delete(n.key)}function tn(n,e){P(n,1,1,()=>{e.delete(n.key)})}function Ab(n,e){n.f(),tn(n,e)}function wt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,m=l.length,h=d;const g={};for(;h--;)g[n[h].key]=h;const _=[],y=new Map,k=new Map;for(h=m;h--;){const $=c(s,l,h),O=t($);let E=o.get(O);E?i&&E.p($,e):(E=u(O,$),E.c()),y.set(O,_[h]=E),O in g&&k.set(O,Math.abs(h-g[O]))}const T=new Set,C=new Set;function M($){A($,1),$.m(r,f),o.set($.key,$),f=$.first,m--}for(;d&&m;){const $=_[m-1],O=n[d-1],E=$.key,I=O.key;$===O?(f=$.first,d--,m--):y.has(I)?!o.has(E)||T.has(E)?M($):C.has(I)?d--:k.get(E)>k.get(I)?(C.add(E),M($)):(T.add(I),d--):(a(O,o),d--)}for(;d--;){const $=n[d];y.has($.key)||a($,o)}for(;m;)M(_[m-1]);return _}function sn(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Xn(n){return typeof n=="object"&&n!==null?n:{}}function ke(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function q(n){n&&n.c()}function j(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||st(()=>{const o=n.$$.on_mount.map(Lh).filter(zt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Le(o),n.$$.on_mount=[]}),l.forEach(st)}function H(n,e){const t=n.$$;t.fragment!==null&&(Le(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ib(n,e){n.$$.dirty[0]===-1&&(ms.push(n),Uh(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const h=m.length?m[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=h)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](h),f&&Ib(n,c)),d}):[],u.update(),f=!0,Le(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=wb(e.target);u.fragment&&u.fragment.l(c),c.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),j(n,e.target,e.anchor,e.customElement),ca()}li(a)}class ye{$destroy(){H(this,1),this.$destroy=G}$on(e,t){if(!zt(t))return G;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!vb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Dt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function Jh(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return Kh(t,o=>{let r=!1;const a=[];let u=0,f=G;const c=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=zt(m)?m:G},d=s.map((m,h)=>Nh(m,g=>{a[h]=g,u&=~(1<{u|=1<{H(f,1)}),me()}l?(e=Kt(l,o()),e.$on("routeEvent",r[7]),q(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Lb(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{H(f,1)}),me()}l?(e=Kt(l,o()),e.$on("routeEvent",r[6]),q(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Nb(n){let e,t,i,s;const l=[Lb,Pb],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),me(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function lu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Ro=Kh(null,function(e){e(lu());const t=()=>{e(lu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});Jh(Ro,n=>n.location);const ma=Jh(Ro,n=>n.querystring),ou=Pn(void 0);async function Ti(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await cn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function Xt(n,e){if(e=au(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with
tags');return ru(n,e),{update(t){t=au(t),ru(n,t)}}}function Fb(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function ru(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||Rb(i.currentTarget.getAttribute("href"))})}function au(n){return n&&typeof n=="string"?{href:n}:n||{}}function Rb(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function jb(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(M,$){if(!$||typeof $!="function"&&(typeof $!="object"||$._sveltesparouter!==!0))throw Error("Invalid component object");if(!M||typeof M=="string"&&(M.length<1||M.charAt(0)!="/"&&M.charAt(0)!="*")||typeof M=="object"&&!(M instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:E}=Zh(M);this.path=M,typeof $=="object"&&$._sveltesparouter===!0?(this.component=$.component,this.conditions=$.conditions||[],this.userData=$.userData,this.props=$.props||{}):(this.component=()=>Promise.resolve($),this.conditions=[],this.props={}),this._pattern=O,this._keys=E}match(M){if(s){if(typeof s=="string")if(M.startsWith(s))M=M.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const I=M.match(s);if(I&&I[0])M=M.substr(I[0].length)||"/";else return null}}const $=this._pattern.exec(M);if($===null)return null;if(this._keys===!1)return $;const O={};let E=0;for(;E{r.push(new o(M,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const c=$t();async function d(C,M){await cn(),c(C,M)}let m=null,h=null;l&&(h=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?m=C.state:m=null},window.addEventListener("popstate",h),Db(()=>{Fb(m)}));let g=null,_=null;const y=Ro.subscribe(async C=>{g=C;let M=0;for(;M{ou.set(u)});return}t(0,a=null),_=null,ou.set(void 0)});zh(()=>{y(),h&&window.removeEventListener("popstate",h)});function k(C){We.call(this,n,C)}function T(C){We.call(this,n,C)}return n.$$set=C=>{"routes"in C&&t(3,i=C.routes),"prefix"in C&&t(4,s=C.prefix),"restoreScrollState"in C&&t(5,l=C.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,k,T]}class Hb extends ye{constructor(e){super(),ve(this,e,jb,Nb,be,{routes:3,prefix:4,restoreScrollState:5})}}const ao=[];let Gh;function Xh(n){const e=n.pattern.test(Gh);uu(n,n.className,e),uu(n,n.inactiveClassName,!e)}function uu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Ro.subscribe(n=>{Gh=n.location+(n.querystring?"?"+n.querystring:""),ao.map(Xh)});function Fn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?Zh(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ao.push(i),Xh(i),{destroy(){ao.splice(ao.indexOf(i),1)}}}const qb="modulepreload",Vb=function(n,e){return new URL(n,e).href},fu={},ft=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=Vb(l,i),l in fu)return;fu[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":qb,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Lr=function(n,e){return Lr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Lr(n,e)};function Jt(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Lr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Nr=function(){return Nr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Sl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){for(var t=0,i=Object.entries(e);t0&&(!s.exp||s.exp-i>Date.now()/1e3))}(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this.baseToken=e||"",this.baseModel=t!==null&&typeof t=="object"?t.collectionId!==void 0?new Ki(t):new Ji(t):null,this.triggerChange()},n.prototype.clear=function(){this.baseToken="",this.baseModel=null,this.triggerChange()},n.prototype.loadFromCookie=function(e,t){t===void 0&&(t="pb_auth");var i=function(o,r){var a={};if(typeof o!="string")return a;for(var u=Object.assign({},r||{}).decode||zb,f=0;f4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof Ki&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=cu(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},ha=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Jt(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=200),i===void 0&&(i={}),this._getFullList(this.baseCrudPath,t,i)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Jt(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var o=[],r=function(a){return Qt(l,void 0,void 0,function(){return xt(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,m=c.totalItems;return o=o.concat(d),d.length&&m>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return Qt(this,void 0,void 0,function(){return xt(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:"realtime_"+this.clientId}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return Qt(t,void 0,void 0,function(){var l;return xt(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new fl({url:k.url,status:k.status,data:T});return[2,T]}})})}).catch(function(k){throw new fl(k)})]})})},n.prototype.getFileUrl=function(e,t,i){i===void 0&&(i={});var s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));var l=this.buildUrl(s.join("/"));if(Object.keys(i).length){var o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function Ui(n){return typeof n=="number"}function jo(n){return typeof n=="number"&&n%1===0}function s1(n){return typeof n=="string"}function l1(n){return Object.prototype.toString.call(n)==="[object Date]"}function kg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function o1(n){return Array.isArray(n)?n:[n]}function pu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function r1(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ss(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function oi(n,e,t){return jo(n)&&n>=e&&n<=t}function a1(n,e){return n-e*Math.floor(n/e)}function Ot(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function pi(n){if(!(xe(n)||n===null||n===""))return parseInt(n,10)}function Ii(n){if(!(xe(n)||n===null||n===""))return parseFloat(n)}function _a(n){if(!(xe(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function ba(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Cl(n){return n%4===0&&(n%100!==0||n%400===0)}function xs(n){return Cl(n)?366:365}function ho(n,e){const t=a1(e-1,12)+1,i=n+(e-t)/12;return t===2?Cl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function va(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function go(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function jr(n){return n>99?n:n>60?1900+n:2e3+n}function wg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Ho(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function Sg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Mn(`Invalid unit value ${n}`);return e}function _o(n,e){const t={};for(const i in n)if(Ss(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Sg(s)}return t}function el(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Ot(t,2)}:${Ot(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ot(t,2)}${Ot(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function qo(n){return r1(n,["hour","minute","second","millisecond"])}const Tg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,u1=["January","February","March","April","May","June","July","August","September","October","November","December"],Cg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f1=["J","F","M","A","M","J","J","A","S","O","N","D"];function $g(n){switch(n){case"narrow":return[...f1];case"short":return[...Cg];case"long":return[...u1];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Mg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Dg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],c1=["M","T","W","T","F","S","S"];function Og(n){switch(n){case"narrow":return[...c1];case"short":return[...Dg];case"long":return[...Mg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Eg=["AM","PM"],d1=["Before Christ","Anno Domini"],p1=["BC","AD"],m1=["B","A"];function Ag(n){switch(n){case"narrow":return[...m1];case"short":return[...p1];case"long":return[...d1];default:return null}}function h1(n){return Eg[n.hour<12?0:1]}function g1(n,e){return Og(e)[n.weekday-1]}function _1(n,e){return $g(e)[n.month-1]}function b1(n,e){return Ag(e)[n.year<0?0:1]}function v1(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function mu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const y1={D:Rr,DD:ng,DDD:ig,DDDD:sg,t:lg,tt:og,ttt:rg,tttt:ag,T:ug,TT:fg,TTT:cg,TTTT:dg,f:pg,ff:hg,fff:_g,ffff:vg,F:mg,FF:gg,FFF:bg,FFFF:yg};class fn{static create(e,t={}){return new fn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return y1[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Ot(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(m,h)=>this.loc.extract(e,m,h),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?h1(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,h)=>i?_1(e,m):l(h?{month:m}:{month:m,day:"numeric"},"month"),u=(m,h)=>i?g1(e,m):l(h?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const h=fn.macroTokenToFormatOpts(m);return h?this.formatWithSystemDefault(e,h):m},c=m=>i?b1(e,m):l({era:m},"era"),d=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return mu(fn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=fn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return mu(l,s(r))}}class Rn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class $l{get type(){throw new ci}get name(){throw new ci}get ianaName(){return this.name}get isUniversal(){throw new ci}offsetName(e,t){throw new ci}formatOffset(e,t){throw new ci}offset(e){throw new ci}equals(e){throw new ci}get isValid(){throw new ci}}let er=null;class ya extends $l{static get instance(){return er===null&&(er=new ya),er}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return wg(e,t,i)}formatOffset(e,t){return el(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let uo={};function k1(n){return uo[n]||(uo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),uo[n]}const w1={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function S1(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function T1(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?h:1e3+h,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let tr=null;class en extends $l{static get utcInstance(){return tr===null&&(tr=new en(0)),tr}static instance(e){return e===0?en.utcInstance:new en(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new en(Ho(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${el(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${el(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return el(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class C1 extends $l{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function mi(n,e){if(xe(n)||n===null)return e;if(n instanceof $l)return n;if(s1(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?en.utcInstance:en.parseSpecifier(t)||ri.create(n)}else return Ui(n)?en.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new C1(n)}let hu=()=>Date.now(),gu="system",_u=null,bu=null,vu=null,yu;class Lt{static get now(){return hu}static set now(e){hu=e}static set defaultZone(e){gu=e}static get defaultZone(){return mi(gu,ya.instance)}static get defaultLocale(){return _u}static set defaultLocale(e){_u=e}static get defaultNumberingSystem(){return bu}static set defaultNumberingSystem(e){bu=e}static get defaultOutputCalendar(){return vu}static set defaultOutputCalendar(e){vu=e}static get throwOnInvalid(){return yu}static set throwOnInvalid(e){yu=e}static resetCaches(){_t.resetCache(),ri.resetCache()}}let ku={};function $1(n,e={}){const t=JSON.stringify([n,e]);let i=ku[t];return i||(i=new Intl.ListFormat(n,e),ku[t]=i),i}let Hr={};function qr(n,e={}){const t=JSON.stringify([n,e]);let i=Hr[t];return i||(i=new Intl.DateTimeFormat(n,e),Hr[t]=i),i}let Vr={};function M1(n,e={}){const t=JSON.stringify([n,e]);let i=Vr[t];return i||(i=new Intl.NumberFormat(n,e),Vr[t]=i),i}let zr={};function D1(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=zr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),zr[s]=l),l}let Gs=null;function O1(){return Gs||(Gs=new Intl.DateTimeFormat().resolvedOptions().locale,Gs)}function E1(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=qr(n).resolvedOptions()}catch{t=qr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function A1(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function I1(n){const e=[];for(let t=1;t<=12;t++){const i=Ve.utc(2016,t,1);e.push(n(i))}return e}function P1(n){const e=[];for(let t=1;t<=7;t++){const i=Ve.utc(2016,11,13+t);e.push(n(i))}return e}function ql(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function L1(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class N1{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=M1(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):ba(e,3);return Ot(t,this.padTo)}}}class F1{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ri.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Ve.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=qr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class R1{constructor(e,t,i){this.opts={style:"long",...i},!t&&kg()&&(this.rtf=D1(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):v1(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class _t{static fromOpts(e){return _t.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Lt.defaultLocale,o=l||(s?"en-US":O1()),r=t||Lt.defaultNumberingSystem,a=i||Lt.defaultOutputCalendar;return new _t(o,r,a,l)}static resetCache(){Gs=null,Hr={},Vr={},zr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return _t.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=E1(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=A1(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=L1(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:_t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return ql(this,e,i,$g,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=I1(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return ql(this,e,i,Og,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=P1(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return ql(this,void 0,e,()=>Eg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ve.utc(2016,11,13,9),Ve.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return ql(this,e,t,Ag,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ve.utc(-40,1,1),Ve.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new N1(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new F1(e,this.intl,t)}relFormatter(e={}){return new R1(this.intl,this.isEnglish(),e)}listFormatter(e={}){return $1(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Es(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function As(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function Is(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function Ig(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(h||m&&f)?-m:m;return[{years:d(Ii(t)),months:d(Ii(i)),weeks:d(Ii(s)),days:d(Ii(l)),hours:d(Ii(o)),minutes:d(Ii(r)),seconds:d(Ii(a),a==="-0"),milliseconds:d(_a(u),c)}]}const G1={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Sa(n,e,t,i,s,l,o){const r={year:e.length===2?jr(pi(e)):pi(e),month:Cg.indexOf(t)+1,day:pi(i),hour:pi(s),minute:pi(l)};return o&&(r.second=pi(o)),n&&(r.weekday=n.length>3?Mg.indexOf(n)+1:Dg.indexOf(n)+1),r}const X1=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Q1(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=Sa(e,s,i,t,l,o,r);let m;return a?m=G1[a]:u?m=0:m=Ho(f,c),[d,new en(m)]}function x1(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const e0=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,t0=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,n0=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function wu(n){const[,e,t,i,s,l,o,r]=n;return[Sa(e,s,i,t,l,o,r),en.utcInstance]}function i0(n){const[,e,t,i,s,l,o,r]=n;return[Sa(e,r,t,i,s,l,o),en.utcInstance]}const s0=Es(H1,wa),l0=Es(q1,wa),o0=Es(V1,wa),r0=Es(Lg),Fg=As(Y1,Ps,Ml,Dl),a0=As(z1,Ps,Ml,Dl),u0=As(B1,Ps,Ml,Dl),f0=As(Ps,Ml,Dl);function c0(n){return Is(n,[s0,Fg],[l0,a0],[o0,u0],[r0,f0])}function d0(n){return Is(x1(n),[X1,Q1])}function p0(n){return Is(n,[e0,wu],[t0,wu],[n0,i0])}function m0(n){return Is(n,[J1,Z1])}const h0=As(Ps);function g0(n){return Is(n,[K1,h0])}const _0=Es(U1,W1),b0=Es(Ng),v0=As(Ps,Ml,Dl);function y0(n){return Is(n,[_0,Fg],[b0,v0])}const k0="Invalid Duration",Rg={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},w0={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Rg},wn=146097/400,fs=146097/4800,S0={years:{quarters:4,months:12,weeks:wn/7,days:wn,hours:wn*24,minutes:wn*24*60,seconds:wn*24*60*60,milliseconds:wn*24*60*60*1e3},quarters:{months:3,weeks:wn/28,days:wn/4,hours:wn*24/4,minutes:wn*24*60/4,seconds:wn*24*60*60/4,milliseconds:wn*24*60*60*1e3/4},months:{weeks:fs/7,days:fs,hours:fs*24,minutes:fs*24*60,seconds:fs*24*60*60,milliseconds:fs*24*60*60*1e3},...Rg},ji=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],T0=ji.slice(0).reverse();function Pi(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new it(i)}function C0(n){return n<0?Math.floor(n):Math.ceil(n)}function jg(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?C0(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function $0(n,e){T0.reduce((t,i)=>xe(e[i])?t:(t&&jg(n,e,t,e,i),i),null)}class it{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||_t.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?S0:w0,this.isLuxonDuration=!0}static fromMillis(e,t){return it.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Mn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new it({values:_o(e,it.normalizeUnit),loc:_t.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(Ui(e))return it.fromMillis(e);if(it.isDuration(e))return e;if(typeof e=="object")return it.fromObject(e);throw new Mn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=m0(e);return i?it.fromObject(i,t):it.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=g0(e);return i?it.fromObject(i,t):it.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Mn("need to specify a reason the Duration is invalid");const i=e instanceof Rn?e:new Rn(e,t);if(Lt.throwOnInvalid)throw new t1(i);return new it({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new tg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?fn.create(this.loc,i).formatDurationFromString(this,e):k0}toHuman(e={}){const t=ji.map(i=>{const s=this.values[i];return xe(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=ba(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=it.fromDurationLike(e),i={};for(const s of ji)(Ss(t.values,s)||Ss(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Pi(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=it.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Sg(e(this.values[i],i));return Pi(this,{values:t},!0)}get(e){return this[it.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,..._o(e,it.normalizeUnit)};return Pi(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Pi(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return $0(this.matrix,e),Pi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>it.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of ji)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;Ui(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)ji.indexOf(u)>ji.indexOf(o)&&jg(this.matrix,s,u,t,o)}else Ui(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Pi(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Pi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of ji)if(!t(this.values[i],e.values[i]))return!1;return!0}}const js="Invalid Interval";function M0(n,e){return!n||!n.isValid?vt.invalid("missing or invalid start"):!e||!e.isValid?vt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?vt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Vs).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(vt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=it.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(vt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:vt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return vt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(vt.fromDateTimes(t,a.time)),t=null);return vt.merge(s)}difference(...e){return vt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:js}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:js}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:js}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:js}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:js}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):it.invalid(this.invalidReason)}mapEndpoints(e){return vt.fromDateTimes(e(this.s),e(this.e))}}class Vl{static hasDST(e=Lt.defaultZone){const t=Ve.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ri.isValidZone(e)}static normalizeZone(e){return mi(e,Lt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||_t.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||_t.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||_t.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||_t.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return _t.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return _t.create(t,null,"gregory").eras(e)}static features(){return{relative:kg()}}}function Su(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(it.fromMillis(i).as("days"))}function D0(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=Su(r,a);return(u-u%7)/7}],["days",Su]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function O0(n,e,t,i){let[s,l,o,r]=D0(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?it.fromMillis(a,i).shiftTo(...u).plus(f):f}const Ta={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Tu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},E0=Ta.hanidec.replace(/[\[|\]]/g,"").split("");function A0(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Ln({numberingSystem:n},e=""){return new RegExp(`${Ta[n||"latn"]}${e}`)}const I0="missing Intl.DateTimeFormat.formatToParts support";function rt(n,e=t=>t){return{regex:n,deser:([t])=>e(A0(t))}}const P0=String.fromCharCode(160),Hg=`[ ${P0}]`,qg=new RegExp(Hg,"g");function L0(n){return n.replace(/\./g,"\\.?").replace(qg,Hg)}function Cu(n){return n.replace(/\./g,"").replace(qg," ").toLowerCase()}function Nn(n,e){return n===null?null:{regex:RegExp(n.map(L0).join("|")),deser:([t])=>n.findIndex(i=>Cu(t)===Cu(i))+e}}function $u(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function nr(n){return{regex:n,deser:([e])=>e}}function N0(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function F0(n,e){const t=Ln(e),i=Ln(e,"{2}"),s=Ln(e,"{3}"),l=Ln(e,"{4}"),o=Ln(e,"{6}"),r=Ln(e,"{1,2}"),a=Ln(e,"{1,3}"),u=Ln(e,"{1,6}"),f=Ln(e,"{1,9}"),c=Ln(e,"{2,4}"),d=Ln(e,"{4,6}"),m=_=>({regex:RegExp(N0(_.val)),deser:([y])=>y,literal:!0}),g=(_=>{if(n.literal)return m(_);switch(_.val){case"G":return Nn(e.eras("short",!1),0);case"GG":return Nn(e.eras("long",!1),0);case"y":return rt(u);case"yy":return rt(c,jr);case"yyyy":return rt(l);case"yyyyy":return rt(d);case"yyyyyy":return rt(o);case"M":return rt(r);case"MM":return rt(i);case"MMM":return Nn(e.months("short",!0,!1),1);case"MMMM":return Nn(e.months("long",!0,!1),1);case"L":return rt(r);case"LL":return rt(i);case"LLL":return Nn(e.months("short",!1,!1),1);case"LLLL":return Nn(e.months("long",!1,!1),1);case"d":return rt(r);case"dd":return rt(i);case"o":return rt(a);case"ooo":return rt(s);case"HH":return rt(i);case"H":return rt(r);case"hh":return rt(i);case"h":return rt(r);case"mm":return rt(i);case"m":return rt(r);case"q":return rt(r);case"qq":return rt(i);case"s":return rt(r);case"ss":return rt(i);case"S":return rt(a);case"SSS":return rt(s);case"u":return nr(f);case"uu":return nr(r);case"uuu":return rt(t);case"a":return Nn(e.meridiems(),0);case"kkkk":return rt(l);case"kk":return rt(c,jr);case"W":return rt(r);case"WW":return rt(i);case"E":case"c":return rt(t);case"EEE":return Nn(e.weekdays("short",!1,!1),1);case"EEEE":return Nn(e.weekdays("long",!1,!1),1);case"ccc":return Nn(e.weekdays("short",!0,!1),1);case"cccc":return Nn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return $u(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return $u(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return nr(/[a-z_+-/]{1,256}?/i);default:return m(_)}})(n)||{invalidReason:I0};return g.token=n,g}const R0={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function j0(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=R0[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function H0(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function q0(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ss(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function V0(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return xe(n.z)||(t=ri.create(n.z)),xe(n.Z)||(t||(t=new en(n.Z)),i=n.Z),xe(n.q)||(n.M=(n.q-1)*3+1),xe(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),xe(n.u)||(n.S=_a(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let ir=null;function z0(){return ir||(ir=Ve.fromMillis(1555555555555)),ir}function B0(n,e){if(n.literal)return n;const t=fn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=fn.create(e,t).formatDateTimeParts(z0()).map(o=>j0(o,e,t));return l.includes(void 0)?n:l}function U0(n,e){return Array.prototype.concat(...n.map(t=>B0(t,e)))}function Vg(n,e,t){const i=U0(fn.parseFormat(t),n),s=i.map(o=>F0(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=H0(s),a=RegExp(o,"i"),[u,f]=q0(e,a,r),[c,d,m]=f?V0(f):[null,null,void 0];if(Ss(f,"a")&&Ss(f,"H"))throw new Zs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:m}}}function W0(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=Vg(n,e,t);return[i,s,l,o]}const zg=[0,31,59,90,120,151,181,212,243,273,304,334],Bg=[0,31,60,91,121,152,182,213,244,274,305,335];function On(n,e){return new Rn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Ug(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function Wg(n,e,t){return t+(Cl(n)?Bg:zg)[e-1]}function Yg(n,e){const t=Cl(n)?Bg:zg,i=t.findIndex(l=>lgo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...qo(n)}}function Mu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Ug(e,1,4),l=xs(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=xs(r)):o>l?(r=e+1,o-=xs(e)):r=e;const{month:a,day:u}=Yg(r,o);return{year:r,month:a,day:u,...qo(n)}}function sr(n){const{year:e,month:t,day:i}=n,s=Wg(e,t,i);return{year:e,ordinal:s,...qo(n)}}function Du(n){const{year:e,ordinal:t}=n,{month:i,day:s}=Yg(e,t);return{year:e,month:i,day:s,...qo(n)}}function Y0(n){const e=jo(n.weekYear),t=oi(n.weekNumber,1,go(n.weekYear)),i=oi(n.weekday,1,7);return e?t?i?!1:On("weekday",n.weekday):On("week",n.week):On("weekYear",n.weekYear)}function K0(n){const e=jo(n.year),t=oi(n.ordinal,1,xs(n.year));return e?t?!1:On("ordinal",n.ordinal):On("year",n.year)}function Kg(n){const e=jo(n.year),t=oi(n.month,1,12),i=oi(n.day,1,ho(n.year,n.month));return e?t?i?!1:On("day",n.day):On("month",n.month):On("year",n.year)}function Jg(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=oi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=oi(t,0,59),r=oi(i,0,59),a=oi(s,0,999);return l?o?r?a?!1:On("millisecond",s):On("second",i):On("minute",t):On("hour",e)}const lr="Invalid DateTime",Ou=864e13;function zl(n){return new Rn("unsupported zone",`the zone "${n.name}" is not supported`)}function or(n){return n.weekData===null&&(n.weekData=Br(n.c)),n.weekData}function Hs(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Ve({...t,...e,old:t})}function Zg(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Eu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function fo(n,e,t){return Zg(va(n),e,t)}function Au(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,ho(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=it.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=va(l);let[a,u]=Zg(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function qs(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Ve.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Ve.invalid(new Rn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?fn.create(_t.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function rr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Ot(n.c.year,t?6:4),e?(i+="-",i+=Ot(n.c.month),i+="-",i+=Ot(n.c.day)):(i+=Ot(n.c.month),i+=Ot(n.c.day)),i}function Iu(n,e,t,i,s,l){let o=Ot(n.c.hour);return e?(o+=":",o+=Ot(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Ot(n.c.minute),(n.c.second!==0||!t)&&(o+=Ot(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Ot(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Ot(Math.trunc(-n.o/60)),o+=":",o+=Ot(Math.trunc(-n.o%60))):(o+="+",o+=Ot(Math.trunc(n.o/60)),o+=":",o+=Ot(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const Gg={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},J0={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Z0={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Xg=["year","month","day","hour","minute","second","millisecond"],G0=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],X0=["year","ordinal","hour","minute","second","millisecond"];function Pu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new tg(n);return e}function Lu(n,e){const t=mi(e.zone,Lt.defaultZone),i=_t.fromObject(e),s=Lt.now();let l,o;if(xe(n.year))l=s;else{for(const u of Xg)xe(n[u])&&(n[u]=Gg[u]);const r=Kg(n)||Jg(n);if(r)return Ve.invalid(r);const a=t.offset(s);[l,o]=fo(n,a,t)}return new Ve({ts:l,zone:t,loc:i,o})}function Nu(n,e,t){const i=xe(t.round)?!0:t.round,s=(o,r)=>(o=ba(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Fu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class Ve{constructor(e){const t=e.zone||Lt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Rn("invalid input"):null)||(t.isValid?null:zl(t));this.ts=xe(e.ts)?Lt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Eu(this.ts,r),i=Number.isNaN(s.year)?new Rn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||_t.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Ve({})}static local(){const[e,t]=Fu(arguments),[i,s,l,o,r,a,u]=t;return Lu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Fu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=en.utcInstance,Lu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=l1(e)?e.valueOf():NaN;if(Number.isNaN(i))return Ve.invalid("invalid input");const s=mi(t.zone,Lt.defaultZone);return s.isValid?new Ve({ts:i,zone:s,loc:_t.fromObject(t)}):Ve.invalid(zl(s))}static fromMillis(e,t={}){if(Ui(e))return e<-Ou||e>Ou?Ve.invalid("Timestamp out of range"):new Ve({ts:e,zone:mi(t.zone,Lt.defaultZone),loc:_t.fromObject(t)});throw new Mn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ui(e))return new Ve({ts:e*1e3,zone:mi(t.zone,Lt.defaultZone),loc:_t.fromObject(t)});throw new Mn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=mi(t.zone,Lt.defaultZone);if(!i.isValid)return Ve.invalid(zl(i));const s=Lt.now(),l=xe(t.specificOffset)?i.offset(s):t.specificOffset,o=_o(e,Pu),r=!xe(o.ordinal),a=!xe(o.year),u=!xe(o.month)||!xe(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=_t.fromObject(t);if((f||r)&&c)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Zs("Can't mix ordinal dates with month/day");const m=c||o.weekday&&!f;let h,g,_=Eu(s,l);m?(h=G0,g=J0,_=Br(_)):r?(h=X0,g=Z0,_=sr(_)):(h=Xg,g=Gg);let y=!1;for(const E of h){const I=o[E];xe(I)?y?o[E]=g[E]:o[E]=_[E]:y=!0}const k=m?Y0(o):r?K0(o):Kg(o),T=k||Jg(o);if(T)return Ve.invalid(T);const C=m?Mu(o):r?Du(o):o,[M,$]=fo(C,l,i),O=new Ve({ts:M,zone:i,o:$,loc:d});return o.weekday&&f&&e.weekday!==O.weekday?Ve.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=c0(e);return qs(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=d0(e);return qs(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=p0(e);return qs(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(xe(e)||xe(t))throw new Mn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=_t.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=W0(o,e,t);return f?Ve.invalid(f):qs(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Ve.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=y0(e);return qs(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Mn("need to specify a reason the DateTime is invalid");const i=e instanceof Rn?e:new Rn(e,t);if(Lt.throwOnInvalid)throw new xb(i);return new Ve({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?or(this).weekYear:NaN}get weekNumber(){return this.isValid?or(this).weekNumber:NaN}get weekday(){return this.isValid?or(this).weekday:NaN}get ordinal(){return this.isValid?sr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Vl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Vl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Vl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Vl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Cl(this.year)}get daysInMonth(){return ho(this.year,this.month)}get daysInYear(){return this.isValid?xs(this.year):NaN}get weeksInWeekYear(){return this.isValid?go(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=fn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(en.instance(e),t)}toLocal(){return this.setZone(Lt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=mi(e,Lt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=fo(o,l,e)}return Hs(this,{ts:s,zone:e})}else return Ve.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Hs(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=_o(e,Pu),i=!xe(t.weekYear)||!xe(t.weekNumber)||!xe(t.weekday),s=!xe(t.ordinal),l=!xe(t.year),o=!xe(t.month)||!xe(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Zs("Can't mix ordinal dates with month/day");let u;i?u=Mu({...Br(this.c),...t}):xe(t.ordinal)?(u={...this.toObject(),...t},xe(t.day)&&(u.day=Math.min(ho(u.year,u.month),u.day))):u=Du({...sr(this.c),...t});const[f,c]=fo(u,this.o,this.zone);return Hs(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=it.fromDurationLike(e);return Hs(this,Au(this,t))}minus(e){if(!this.isValid)return this;const t=it.fromDurationLike(e).negate();return Hs(this,Au(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=it.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?fn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):lr}toLocaleString(e=Rr,t={}){return this.isValid?fn.create(this.loc.clone(t),e).formatDateTime(this):lr}toLocaleParts(e={}){return this.isValid?fn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=rr(this,o);return r+="T",r+=Iu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?rr(this,e==="extended"):null}toISOWeekDate(){return Bl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Iu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Bl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Bl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?rr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Bl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():lr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return it.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=o1(t).map(it.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=O0(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Ve.now(),e,t)}until(e){return this.isValid?vt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Ve.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Ve.isDateTime))throw new Mn("max requires all arguments be DateTimes");return pu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=_t.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return Vg(o,e,t)}static fromStringExplain(e,t,i={}){return Ve.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Rr}static get DATE_MED(){return ng}static get DATE_MED_WITH_WEEKDAY(){return n1}static get DATE_FULL(){return ig}static get DATE_HUGE(){return sg}static get TIME_SIMPLE(){return lg}static get TIME_WITH_SECONDS(){return og}static get TIME_WITH_SHORT_OFFSET(){return rg}static get TIME_WITH_LONG_OFFSET(){return ag}static get TIME_24_SIMPLE(){return ug}static get TIME_24_WITH_SECONDS(){return fg}static get TIME_24_WITH_SHORT_OFFSET(){return cg}static get TIME_24_WITH_LONG_OFFSET(){return dg}static get DATETIME_SHORT(){return pg}static get DATETIME_SHORT_WITH_SECONDS(){return mg}static get DATETIME_MED(){return hg}static get DATETIME_MED_WITH_SECONDS(){return gg}static get DATETIME_MED_WITH_WEEKDAY(){return i1}static get DATETIME_FULL(){return _g}static get DATETIME_FULL_WITH_SECONDS(){return bg}static get DATETIME_HUGE(){return vg}static get DATETIME_HUGE_WITH_SECONDS(){return yg}}function Vs(n){if(Ve.isDateTime(n))return n;if(n&&n.valueOf&&Ui(n.valueOf()))return Ve.fromJSDate(n);if(n&&typeof n=="object")return Ve.fromObject(n);throw new Mn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const Q0=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],x0=[".mp4",".avi",".mov",".3gp",".wmv"],ev=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],tv=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class V{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||V.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return V.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!V.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!V.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){V.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=V.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!V.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!V.isObject(l)&&!Array.isArray(l)||!V.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!V.isObject(s)&&!Array.isArray(s)||!V.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):V.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||V.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||V.isObject(e)&&Object.keys(e).length>0)&&V.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s{console.warn("Failed to copy.",i)})}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",t+".json"),s.click(),s.remove()}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!Q0.find(t=>e.endsWith(t))}static hasVideoExtension(e){return!!x0.find(t=>e.endsWith(t))}static hasAudioExtension(e){return!!ev.find(t=>e.endsWith(t))}static hasDocumentExtension(e){return!!tv.find(t=>e.endsWith(t))}static getFileType(e){return V.hasImageExtension(e)?"image":V.hasDocumentExtension(e)?"document":V.hasVideoExtension(e)?"video":V.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(V.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)V.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):V.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var s,l,o,r,a;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name,created:"2022-01-01 01:00:00.123Z",updated:"2022-01-01 23:59:59.456Z"};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com");for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00.123Z":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)!==1&&(f=[f])):u.type==="select"?(f=(o=(l=u.options)==null?void 0:l.values)==null?void 0:o[0],((r=u.options)==null?void 0:r.maxSelect)!==1&&(f=[f])):u.type==="relation"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)!==1&&(f=[f])):f="test",i[u.name]=f}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"single":return"ri-file-list-2-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!V.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!V.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=V.isObject(u)&&V.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type==="auth"?t.push(l):l.type==="single"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_css:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","insertdatetime","media","table","code","codesample"],toolbar:"undo redo | styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],c=u.create(a,o,f);u.add(c),e(c.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(V.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?V.plainText(r):r,s.push(V.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!V.isEmpty(e[o]))return e[o];return i}}const Vo=Pn([]);function Qg(n,e=4e3){return zo(n,"info",e)}function Vt(n,e=3e3){return zo(n,"success",e)}function cl(n,e=4500){return zo(n,"error",e)}function nv(n,e=4500){return zo(n,"warning",e)}function zo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{xg(i)},t)};Vo.update(s=>($a(s,i.message),V.pushOrReplaceByKey(s,i,"message"),s))}function xg(n){Vo.update(e=>($a(e,n),e))}function Ca(){Vo.update(n=>{for(let e of n)$a(n,e);return[]})}function $a(n,e){let t;typeof e=="string"?t=V.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),V.removeByKey(n,"message",t.message))}const Ci=Pn({});function Vn(n){Ci.set(n||{})}function Ts(n){Ci.update(e=>(V.deleteByPath(e,n),e))}const Ma=Pn({});function Ur(n){Ma.set(n||{})}ga.prototype.logout=function(n=!0){this.authStore.clear(),n&&Ti("/login")};ga.prototype.errorResponseHandler=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&cl(l)}if(V.isEmpty(s.data)||Vn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Ti("/")};class iv extends xh{save(e,t){super.save(e,t),t instanceof Ji&&Ur(t)}clear(){super.clear(),Ur(null)}}const he=new ga("../",new iv("pb_admin_auth"));he.authStore.model instanceof Ji&&Ur(he.authStore.model);function sv(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=n[3].default,h=Nt(m,n,n[2],null);return{c(){e=v("div"),t=v("main"),h&&h.c(),i=D(),s=v("footer"),l=v("a"),l.innerHTML='Docs',o=D(),r=v("span"),r.textContent="|",a=D(),u=v("a"),f=v("span"),f.textContent="PocketBase v0.12.0",p(t,"class","page-content"),p(l,"href","https://pocketbase.io/docs/"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(r,"class","delimiter"),p(f,"class","txt"),p(u,"href","https://github.com/pocketbase/pocketbase/releases"),p(u,"target","_blank"),p(u,"rel","noopener noreferrer"),p(u,"title","Releases"),p(s,"class","page-footer"),p(e,"class",c="page-wrapper "+n[1]),Q(e,"center-content",n[0])},m(g,_){S(g,e,_),b(e,t),h&&h.m(t,null),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(u,f),d=!0},p(g,[_]){h&&h.p&&(!d||_&4)&&Rt(h,m,g,g[2],d?Ft(m,g[2],_,null):jt(g[2]),null),(!d||_&2&&c!==(c="page-wrapper "+g[1]))&&p(e,"class",c),(!d||_&3)&&Q(e,"center-content",g[0])},i(g){d||(A(h,g),d=!0)},o(g){P(h,g),d=!1},d(g){g&&w(e),h&&h.d(g)}}}function lv(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class kn extends ye{constructor(e){super(),ve(this,e,lv,sv,be,{center:0,class:1})}}function Ru(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=D(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function ov(n){let e,t,i,s=!n[0]&&Ru();const l=n[1].default,o=Nt(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=D(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),b(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Ru(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&Rt(o,l,r,r[2],i?Ft(l,r[2],a,null):jt(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function rv(n){let e,t;return e=new kn({props:{class:"full-page",center:!0,$$slots:{default:[ov]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function av(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class e_ extends ye{constructor(e){super(),ve(this,e,av,rv,be,{nobranding:0})}}function ju(n,e,t){const i=n.slice();return i[11]=e[t],i}const uv=n=>({}),Hu=n=>({uniqueId:n[3]});function fv(n){let e=(n[11]||bo)+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||bo)+"")&&re(t,e)},d(i){i&&w(t)}}}function cv(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||bo)+"",i;return{c(){e=v("pre"),i=B(t)},m(o,r){S(o,e,r),b(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||bo)+"")&&re(i,t)},d(o){o&&w(e)}}}function qu(n){let e,t;function i(o,r){return typeof o[11]=="object"?cv:fv}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=D(),p(e,"class","help-block help-block-error")},m(o,r){S(o,e,r),l.m(e,null),b(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function dv(n){let e,t,i,s,l;const o=n[7].default,r=Nt(o,n,n[6],Hu);let a=n[2],u=[];for(let f=0;ft(5,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+V.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){Ts(r)}nn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(h){We.call(this,n,h)}function m(h){ie[h?"unshift":"push"](()=>{u=h,t(1,u)})}return n.$$set=h=>{"name"in h&&t(4,r=h.name),"class"in h&&t(0,a=h.class),"$$scope"in h&&t(6,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=V.toArray(V.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,m]}class _e extends ye{constructor(e){super(),ve(this,e,pv,dv,be,{name:4,class:0})}}function mv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=D(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0]),l.focus(),r||(a=K(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&de(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function hv(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Password"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),de(l,n[1]),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&de(l,c[1])},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function gv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Password confirm"),s=D(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[2]),r||(a=K(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&de(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _v(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return s=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[mv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[hv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[gv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=D(),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),f=v("button"),f.innerHTML=`Create and login `,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),Q(f,"btn-disabled",n[3]),Q(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(h,g){S(h,e,g),b(e,t),b(e,i),j(s,e,null),b(e,l),j(o,e,null),b(e,r),j(a,e,null),b(e,u),b(e,f),c=!0,d||(m=K(e,"submit",pt(n[4])),d=!0)},p(h,[g]){const _={};g&1537&&(_.$$scope={dirty:g,ctx:h}),s.$set(_);const y={};g&1538&&(y.$$scope={dirty:g,ctx:h}),o.$set(y);const k={};g&1540&&(k.$$scope={dirty:g,ctx:h}),a.$set(k),(!c||g&8)&&Q(f,"btn-disabled",h[3]),(!c||g&8)&&Q(f,"btn-loading",h[3])},i(h){c||(A(s.$$.fragment,h),A(o.$$.fragment,h),A(a.$$.fragment,h),c=!0)},o(h){P(s.$$.fragment,h),P(o.$$.fragment,h),P(a.$$.fragment,h),c=!1},d(h){h&&w(e),H(s),H(o),H(a),d=!1,m()}}}function bv(n,e,t){const i=$t();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await he.admins.create({email:s,password:l,passwordConfirm:o}),await he.admins.authWithPassword(s,l),i("submit")}catch(d){he.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class vv extends ye{constructor(e){super(),ve(this,e,bv,_v,be,{})}}function Vu(n){let e,t;return e=new e_({props:{$$slots:{default:[yv]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function yv(n){let e,t;return e=new vv({}),e.$on("submit",n[1]),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p:G,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function kv(n){let e,t,i=n[0]&&Vu(n);return{c(){i&&i.c(),e=Ae()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Vu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(pe(),P(i,1,1,()=>{i=null}),me())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function wv(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){he.logout(!1),t(0,i=!0);return}he.authStore.isValid?Ti("/collections"):he.logout()}return[i,async()=>{t(0,i=!1),await cn(),window.location.search=""}]}class Sv extends ye{constructor(e){super(),ve(this,e,wv,kv,be,{})}}const St=Pn(""),vo=Pn(""),Cs=Pn(!1);function Bo(n){const e=n-1;return e*e*e+1}function yo(n,{delay:e=0,duration:t=400,easing:i=kl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function En(n,{delay:e=0,duration:t=400,easing:i=Bo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>` transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px); opacity: ${a-f*d}`}}function Ht(n,{delay:e=0,duration:t=400,easing:i=Bo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:m=>`overflow: hidden;opacity: ${Math.min(m*20,1)*l};height: ${m*o}px;padding-top: ${m*r}px;padding-bottom: ${m*a}px;margin-top: ${m*u}px;margin-bottom: ${m*f}px;border-top-width: ${m*c}px;border-bottom-width: ${m*d}px;`}}function It(n,{delay:e=0,duration:t=400,easing:i=Bo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` transform: ${a} scale(${1-u*d}); opacity: ${r-f*d} - `}}function Tv(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),ce(e,n[7]),i||(s=K(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&ce(e,l[7])},i:G,o:G,d(l){l&&w(e),n[13](null),i=!1,s()}}}function Cv(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=Kt(o,r(n)),ie.push(()=>ke(e,"value",l)),e.$on("submit",n[10])),{c(){e&&q(e.$$.fragment),i=Ae()},m(a,u){e&&j(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ke(e,"value",l)),e.$on("submit",a[10]),q(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function zu(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Bu();return{c(){r&&r.c(),e=D(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=K(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Bu(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(pe(),P(r,1,1,()=>{r=null}),me())},i(a){s||(A(r),a&&st(()=>{i||(i=Be(t,En,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=Be(t,En,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Bu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&st(()=>{t||(t=Be(e,En,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=Be(e,En,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function $v(n){let e,t,i,s,l,o,r,a,u,f;const c=[Cv,Tv],d=[];function m(g,_){return g[4]&&!g[5]?0:1}l=m(n),o=d[l]=c[l](n);let h=(n[0].length||n[7].length)&&zu(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=D(),o.c(),r=D(),h&&h.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(g,_){S(g,e,_),b(e,t),b(t,i),b(e,s),d[l].m(e,null),b(e,r),h&&h.m(e,null),a=!0,u||(f=[K(e,"click",yn(n[11])),K(e,"submit",pt(n[10]))],u=!0)},p(g,[_]){let y=l;l=m(g),l===y?d[l].p(g,_):(pe(),P(d[y],1,1,()=>{d[y]=null}),me(),o=d[l],o?o.p(g,_):(o=d[l]=c[l](g),o.c()),A(o,1),o.m(e,r)),g[0].length||g[7].length?h?(h.p(g,_),_&129&&A(h,1)):(h=zu(g),h.c(),A(h,1),h.m(e,null)):h&&(pe(),P(h,1,1,()=>{h=null}),me())},i(g){a||(A(o),A(h),a=!0)},o(g){P(o),P(h),a=!1},d(g){g&&w(e),d[l].d(),h&&h.d(),u=!1,Le(f)}}}function Mv(n,e,t){const i=$t(),s="search_"+V.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new bn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function h(){t(0,l=d),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await ft(()=>import("./FilterAutocompleteInput-cac0f0ad.js"),["./FilterAutocompleteInput-cac0f0ad.js","./index-0935db40.js"],import.meta.url)).default),t(5,f=!1))}nn(()=>{g()});function _(M){We.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){ie[M?"unshift":"push"](()=>{c=M,t(6,c)})}function T(){d=this.value,t(7,d),t(0,l)}const C=()=>{m(!1),h()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,m,h,_,y,k,T,C]}class Uo extends ye{constructor(e){super(),ve(this,e,Mv,$v,be,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Wr,Li;const Yr="app-tooltip";function Uu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function bi(){return Li=Li||document.querySelector("."+Yr),Li||(Li=document.createElement("div"),Li.classList.add(Yr),document.body.appendChild(Li)),Li}function t_(n,e){let t=bi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Kr();return}t.textContent=e.text,t.className=Yr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function Kr(){clearTimeout(Wr),bi().classList.remove("active"),bi().activeNode=void 0}function Dv(n,e){bi().activeNode=n,clearTimeout(Wr),Wr=setTimeout(()=>{bi().classList.add("active"),t_(n,e)},isNaN(e.delay)?0:e.delay)}function Ye(n,e){let t=Uu(e);function i(){Dv(n,t)}function s(){Kr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&V.isFocusable(n))&&n.addEventListener("click",s),bi(),{update(l){var o,r;t=Uu(l),(r=(o=bi())==null?void 0:o.activeNode)!=null&&r.contains(n)&&t_(n,t)},destroy(){var l,o;(o=(l=bi())==null?void 0:l.activeNode)!=null&&o.contains(n)&&Kr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Ov(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),Q(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Pe(t=Ye.call(null,e,n[0])),K(e,"click",n[2])],i=!0)},p(l,[o]){t&&zt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&Q(e,"refreshing",l[1])},i:G,o:G,d(l){l&&w(e),i=!1,Le(s)}}}function Ev(n,e,t){const i=$t();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return nn(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Da extends ye{constructor(e){super(),ve(this,e,Ev,Ov,be,{tooltip:0})}}function Av(n){let e,t,i,s,l;const o=n[6].default,r=Nt(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[K(e,"click",n[7]),K(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Rt(r,o,a,a[5],i?Ft(o,a[5],u,null):jt(a[5]),null),(!i||u&4)&&p(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&Q(e,"col-sort-disabled",a[3]),(!i||u&7)&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&Q(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&Q(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Le(l)}}}function Iv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class Ut extends ye{constructor(e){super(),ve(this,e,Iv,Av,be,{class:1,name:2,sort:0,disable:3})}}function Pv(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Lv(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=B(n[2]),s=D(),l=v("div"),o=B(n[1]),r=B(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),b(e,t),b(t,i),b(e,s),b(e,l),b(l,o),b(l,r)},p(a,u){u&4&&re(i,a[2]),u&2&&re(o,a[1])},d(a){a&&w(e)}}}function Nv(n){let e;function t(l,o){return l[0]?Lv:Pv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function Fv(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Zi extends ye{constructor(e){super(),ve(this,e,Fv,Nv,be,{date:0})}}const Rv=n=>({}),Wu=n=>({}),jv=n=>({}),Yu=n=>({});function Hv(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Nt(u,n,n[4],Yu),c=n[5].default,d=Nt(c,n,n[4],null),m=n[5].after,h=Nt(m,n,n[4],Wu);return{c(){e=v("div"),f&&f.c(),t=D(),i=v("div"),d&&d.c(),l=D(),h&&h.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,_){S(g,e,_),f&&f.m(e,null),b(e,t),b(e,i),d&&d.m(i,null),n[6](i),b(e,l),h&&h.m(e,null),o=!0,r||(a=[K(window,"resize",n[1]),K(i,"scroll",n[1])],r=!0)},p(g,[_]){f&&f.p&&(!o||_&16)&&Rt(f,u,g,g[4],o?Ft(u,g[4],_,jv):jt(g[4]),Yu),d&&d.p&&(!o||_&16)&&Rt(d,c,g,g[4],o?Ft(c,g[4],_,null):jt(g[4]),null),(!o||_&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&p(i,"class",s),h&&h.p&&(!o||_&16)&&Rt(h,m,g,g[4],o?Ft(m,g[4],_,Rv):jt(g[4]),Wu)},i(g){o||(A(f,g),A(d,g),A(h,g),o=!0)},o(g){P(f,g),P(d,g),P(h,g),o=!1},d(g){g&&w(e),f&&f.d(g),d&&d.d(g),n[6](null),h&&h.d(g),r=!1,Le(a)}}}function qv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,m=o.scrollWidth;m-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}nn(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){ie[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class Oa extends ye{constructor(e){super(),ve(this,e,qv,Hv,be,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function Ku(n,e,t){const i=n.slice();return i[23]=e[t],i}function Vv(n){let e;return{c(){e=v("div"),e.innerHTML=` + `}}function Tv(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),de(e,n[7]),i||(s=K(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&de(e,l[7])},i:G,o:G,d(l){l&&w(e),n[13](null),i=!1,s()}}}function Cv(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=Kt(o,r(n)),ie.push(()=>ke(e,"value",l)),e.$on("submit",n[10])),{c(){e&&q(e.$$.fragment),i=Ae()},m(a,u){e&&j(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ke(e,"value",l)),e.$on("submit",a[10]),q(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function zu(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Bu();return{c(){r&&r.c(),e=D(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=K(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Bu(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(pe(),P(r,1,1,()=>{r=null}),me())},i(a){s||(A(r),a&&st(()=>{i||(i=Be(t,En,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=Be(t,En,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Bu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&st(()=>{t||(t=Be(e,En,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=Be(e,En,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function $v(n){let e,t,i,s,l,o,r,a,u,f;const c=[Cv,Tv],d=[];function m(g,_){return g[4]&&!g[5]?0:1}l=m(n),o=d[l]=c[l](n);let h=(n[0].length||n[7].length)&&zu(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=D(),o.c(),r=D(),h&&h.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(g,_){S(g,e,_),b(e,t),b(t,i),b(e,s),d[l].m(e,null),b(e,r),h&&h.m(e,null),a=!0,u||(f=[K(e,"click",yn(n[11])),K(e,"submit",pt(n[10]))],u=!0)},p(g,[_]){let y=l;l=m(g),l===y?d[l].p(g,_):(pe(),P(d[y],1,1,()=>{d[y]=null}),me(),o=d[l],o?o.p(g,_):(o=d[l]=c[l](g),o.c()),A(o,1),o.m(e,r)),g[0].length||g[7].length?h?(h.p(g,_),_&129&&A(h,1)):(h=zu(g),h.c(),A(h,1),h.m(e,null)):h&&(pe(),P(h,1,1,()=>{h=null}),me())},i(g){a||(A(o),A(h),a=!0)},o(g){P(o),P(h),a=!1},d(g){g&&w(e),d[l].d(),h&&h.d(),u=!1,Le(f)}}}function Mv(n,e,t){const i=$t(),s="search_"+V.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new bn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function h(){t(0,l=d),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await ft(()=>import("./FilterAutocompleteInput-47d03028.js"),["./FilterAutocompleteInput-47d03028.js","./index-0935db40.js"],import.meta.url)).default),t(5,f=!1))}nn(()=>{g()});function _(M){We.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){ie[M?"unshift":"push"](()=>{c=M,t(6,c)})}function T(){d=this.value,t(7,d),t(0,l)}const C=()=>{m(!1),h()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,m,h,_,y,k,T,C]}class Uo extends ye{constructor(e){super(),ve(this,e,Mv,$v,be,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Wr,Li;const Yr="app-tooltip";function Uu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function bi(){return Li=Li||document.querySelector("."+Yr),Li||(Li=document.createElement("div"),Li.classList.add(Yr),document.body.appendChild(Li)),Li}function t_(n,e){let t=bi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Kr();return}t.textContent=e.text,t.className=Yr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function Kr(){clearTimeout(Wr),bi().classList.remove("active"),bi().activeNode=void 0}function Dv(n,e){bi().activeNode=n,clearTimeout(Wr),Wr=setTimeout(()=>{bi().classList.add("active"),t_(n,e)},isNaN(e.delay)?0:e.delay)}function Ye(n,e){let t=Uu(e);function i(){Dv(n,t)}function s(){Kr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&V.isFocusable(n))&&n.addEventListener("click",s),bi(),{update(l){var o,r;t=Uu(l),(r=(o=bi())==null?void 0:o.activeNode)!=null&&r.contains(n)&&t_(n,t)},destroy(){var l,o;(o=(l=bi())==null?void 0:l.activeNode)!=null&&o.contains(n)&&Kr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Ov(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),Q(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Pe(t=Ye.call(null,e,n[0])),K(e,"click",n[2])],i=!0)},p(l,[o]){t&&zt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&Q(e,"refreshing",l[1])},i:G,o:G,d(l){l&&w(e),i=!1,Le(s)}}}function Ev(n,e,t){const i=$t();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return nn(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Da extends ye{constructor(e){super(),ve(this,e,Ev,Ov,be,{tooltip:0})}}function Av(n){let e,t,i,s,l;const o=n[6].default,r=Nt(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[K(e,"click",n[7]),K(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Rt(r,o,a,a[5],i?Ft(o,a[5],u,null):jt(a[5]),null),(!i||u&4)&&p(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&Q(e,"col-sort-disabled",a[3]),(!i||u&7)&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&Q(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&Q(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Le(l)}}}function Iv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class Ut extends ye{constructor(e){super(),ve(this,e,Iv,Av,be,{class:1,name:2,sort:0,disable:3})}}function Pv(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Lv(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=B(n[2]),s=D(),l=v("div"),o=B(n[1]),r=B(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),b(e,t),b(t,i),b(e,s),b(e,l),b(l,o),b(l,r)},p(a,u){u&4&&re(i,a[2]),u&2&&re(o,a[1])},d(a){a&&w(e)}}}function Nv(n){let e;function t(l,o){return l[0]?Lv:Pv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function Fv(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Zi extends ye{constructor(e){super(),ve(this,e,Fv,Nv,be,{date:0})}}const Rv=n=>({}),Wu=n=>({}),jv=n=>({}),Yu=n=>({});function Hv(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Nt(u,n,n[4],Yu),c=n[5].default,d=Nt(c,n,n[4],null),m=n[5].after,h=Nt(m,n,n[4],Wu);return{c(){e=v("div"),f&&f.c(),t=D(),i=v("div"),d&&d.c(),l=D(),h&&h.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,_){S(g,e,_),f&&f.m(e,null),b(e,t),b(e,i),d&&d.m(i,null),n[6](i),b(e,l),h&&h.m(e,null),o=!0,r||(a=[K(window,"resize",n[1]),K(i,"scroll",n[1])],r=!0)},p(g,[_]){f&&f.p&&(!o||_&16)&&Rt(f,u,g,g[4],o?Ft(u,g[4],_,jv):jt(g[4]),Yu),d&&d.p&&(!o||_&16)&&Rt(d,c,g,g[4],o?Ft(c,g[4],_,null):jt(g[4]),null),(!o||_&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&p(i,"class",s),h&&h.p&&(!o||_&16)&&Rt(h,m,g,g[4],o?Ft(m,g[4],_,Rv):jt(g[4]),Wu)},i(g){o||(A(f,g),A(d,g),A(h,g),o=!0)},o(g){P(f,g),P(d,g),P(h,g),o=!1},d(g){g&&w(e),f&&f.d(g),d&&d.d(g),n[6](null),h&&h.d(g),r=!1,Le(a)}}}function qv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,m=o.scrollWidth;m-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}nn(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){ie[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class Oa extends ye{constructor(e){super(),ve(this,e,qv,Hv,be,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function Ku(n,e,t){const i=n.slice();return i[23]=e[t],i}function Vv(n){let e;return{c(){e=v("div"),e.innerHTML=` method`,p(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function zv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="url",p(t,"class",V.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function Bv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="referer",p(t,"class",V.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function Uv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="User IP",p(t,"class",V.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function Wv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="status",p(t,"class",V.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function Yv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",V.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function Ju(n){let e;function t(l,o){return l[6]?Jv:Kv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function Kv(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Zu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Zu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function Jv(n){let e;return{c(){e=v("tr"),e.innerHTML=` `},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Zu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[19]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Gu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Xu(n,e){var Se,Ue,lt;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,m,h,g,_,y,k=(e[23].referer||"N/A")+"",T,C,M,$,O,E=(e[23].userIp||"N/A")+"",I,L,N,F,W,Z=e[23].status+"",ne,J,te,ee,z,X,Y,le,He,Re,Fe=(((Ue=e[23].meta)==null?void 0:Ue.errorMessage)||((lt=e[23].meta)==null?void 0:lt.errorData))&&Gu();ee=new Zi({props:{date:e[23].created}});function qe(){return e[17](e[23])}function ge(...ue){return e[18](e[23],...ue)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=B(l),a=D(),u=v("td"),f=v("span"),d=B(c),h=D(),Fe&&Fe.c(),g=D(),_=v("td"),y=v("span"),T=B(k),M=D(),$=v("td"),O=v("span"),I=B(E),N=D(),F=v("td"),W=v("span"),ne=B(Z),J=D(),te=v("td"),q(ee.$$.fragment),z=D(),X=v("td"),X.innerHTML='',Y=D(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",m=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[23].referer),Q(y,"txt-hint",!e[23].referer),p(_,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",L=e[23].userIp),Q(O,"txt-hint",!e[23].userIp),p($,"class","col-type-number col-field-userIp"),p(W,"class","label"),Q(W,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(te,"class","col-type-date col-field-created"),p(X,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ue,fe){S(ue,t,fe),b(t,i),b(i,s),b(s,o),b(t,a),b(t,u),b(u,f),b(f,d),b(u,h),Fe&&Fe.m(u,null),b(t,g),b(t,_),b(_,y),b(y,T),b(t,M),b(t,$),b($,O),b(O,I),b(t,N),b(t,F),b(F,W),b(W,ne),b(t,J),b(t,te),j(ee,te,null),b(t,z),b(t,X),b(t,Y),le=!0,He||(Re=[K(t,"click",qe),K(t,"keydown",ge)],He=!0)},p(ue,fe){var oe,je,Me;e=ue,(!le||fe&8)&&l!==(l=((oe=e[23].method)==null?void 0:oe.toUpperCase())+"")&&re(o,l),(!le||fe&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!le||fe&8)&&c!==(c=e[23].url+"")&&re(d,c),(!le||fe&8&&m!==(m=e[23].url))&&p(f,"title",m),(je=e[23].meta)!=null&&je.errorMessage||(Me=e[23].meta)!=null&&Me.errorData?Fe||(Fe=Gu(),Fe.c(),Fe.m(u,null)):Fe&&(Fe.d(1),Fe=null),(!le||fe&8)&&k!==(k=(e[23].referer||"N/A")+"")&&re(T,k),(!le||fe&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!le||fe&8)&&Q(y,"txt-hint",!e[23].referer),(!le||fe&8)&&E!==(E=(e[23].userIp||"N/A")+"")&&re(I,E),(!le||fe&8&&L!==(L=e[23].userIp))&&p(O,"title",L),(!le||fe&8)&&Q(O,"txt-hint",!e[23].userIp),(!le||fe&8)&&Z!==(Z=e[23].status+"")&&re(ne,Z),(!le||fe&8)&&Q(W,"label-danger",e[23].status>=400);const ae={};fe&8&&(ae.date=e[23].created),ee.$set(ae)},i(ue){le||(A(ee.$$.fragment,ue),le=!0)},o(ue){P(ee.$$.fragment,ue),le=!1},d(ue){ue&&w(t),Fe&&Fe.d(),H(ee),He=!1,Le(Re)}}}function Zv(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$,O,E,I=[],L=new Map,N;function F(ge){n[11](ge)}let W={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[Vv]},$$scope:{ctx:n}};n[1]!==void 0&&(W.sort=n[1]),s=new Ut({props:W}),ie.push(()=>ke(s,"sort",F));function Z(ge){n[12](ge)}let ne={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[zv]},$$scope:{ctx:n}};n[1]!==void 0&&(ne.sort=n[1]),r=new Ut({props:ne}),ie.push(()=>ke(r,"sort",Z));function J(ge){n[13](ge)}let te={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[Bv]},$$scope:{ctx:n}};n[1]!==void 0&&(te.sort=n[1]),f=new Ut({props:te}),ie.push(()=>ke(f,"sort",J));function ee(ge){n[14](ge)}let z={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[Uv]},$$scope:{ctx:n}};n[1]!==void 0&&(z.sort=n[1]),m=new Ut({props:z}),ie.push(()=>ke(m,"sort",ee));function X(ge){n[15](ge)}let Y={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Wv]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),_=new Ut({props:Y}),ie.push(()=>ke(_,"sort",X));function le(ge){n[16](ge)}let He={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[Yv]},$$scope:{ctx:n}};n[1]!==void 0&&(He.sort=n[1]),T=new Ut({props:He}),ie.push(()=>ke(T,"sort",le));let Re=n[3];const Fe=ge=>ge[23].id;for(let ge=0;gel=!1)),s.$set(Ue);const lt={};Se&67108864&&(lt.$$scope={dirty:Se,ctx:ge}),!a&&Se&2&&(a=!0,lt.sort=ge[1],we(()=>a=!1)),r.$set(lt);const ue={};Se&67108864&&(ue.$$scope={dirty:Se,ctx:ge}),!c&&Se&2&&(c=!0,ue.sort=ge[1],we(()=>c=!1)),f.$set(ue);const fe={};Se&67108864&&(fe.$$scope={dirty:Se,ctx:ge}),!h&&Se&2&&(h=!0,fe.sort=ge[1],we(()=>h=!1)),m.$set(fe);const ae={};Se&67108864&&(ae.$$scope={dirty:Se,ctx:ge}),!y&&Se&2&&(y=!0,ae.sort=ge[1],we(()=>y=!1)),_.$set(ae);const oe={};Se&67108864&&(oe.$$scope={dirty:Se,ctx:ge}),!C&&Se&2&&(C=!0,oe.sort=ge[1],we(()=>C=!1)),T.$set(oe),Se&841&&(Re=ge[3],pe(),I=wt(I,Se,Fe,1,ge,Re,L,E,tn,Xu,null,Ku),me(),!Re.length&&qe?qe.p(ge,Se):Re.length?qe&&(qe.d(1),qe=null):(qe=Ju(ge),qe.c(),qe.m(E,null))),(!N||Se&64)&&Q(e,"table-loading",ge[6])},i(ge){if(!N){A(s.$$.fragment,ge),A(r.$$.fragment,ge),A(f.$$.fragment,ge),A(m.$$.fragment,ge),A(_.$$.fragment,ge),A(T.$$.fragment,ge);for(let Se=0;Se{if(L<=1&&g(),t(6,d=!1),t(5,f=F.page),t(4,c=F.totalItems),s("load",u.concat(F.items)),N){const W=++m;for(;F.items.length&&m==W;)t(3,u=u.concat(F.items.splice(0,10))),await V.yieldToMain()}else t(3,u=u.concat(F.items))}).catch(F=>{F!=null&&F.isAbort||(t(6,d=!1),console.warn(F),g(),he.errorResponseHandler(F,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,c=0)}function _(L){a=L,t(1,a)}function y(L){a=L,t(1,a)}function k(L){a=L,t(1,a)}function T(L){a=L,t(1,a)}function C(L){a=L,t(1,a)}function M(L){a=L,t(1,a)}const $=L=>s("select",L),O=(L,N)=>{N.code==="Enter"&&(N.preventDefault(),s("select",L))},E=()=>t(0,o=""),I=()=>h(f+1);return n.$$set=L=>{"filter"in L&&t(0,o=L.filter),"presets"in L&&t(10,r=L.presets),"sort"in L&&t(1,a=L.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),h(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,h,u,c,f,d,i,s,l,r,_,y,k,T,C,M,$,O,E,I]}class Qv extends ye{constructor(e){super(),ve(this,e,Xv,Gv,be,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! * Chart.js v3.9.1 @@ -43,13 +43,13 @@ `),_.hasAttribute("data-start")||_.setAttribute("data-start",String(I+1))}y.textContent=$,t.highlightElement(y)},function($){_.setAttribute(r,f),y.textContent=$})}}),t.plugins.fileHighlight={highlight:function(_){for(var y=(_||document).querySelectorAll(c),k=0,T;T=y[k++];)t.highlightElement(T)}};var h=!1;t.fileHighlight=function(){h||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),h=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(LS);const Js=ra;var hc={},NS={get exports(){return hc},set exports(n){hc=n}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;ar&&(f[d]=` `+f[d],c=m)}a[u]=f.join("")}return a.join(` -`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,m="",h="",g=!1,_=0;_>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function FS(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),b(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:G,o:G,d(s){s&&w(e)}}}function RS(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Js.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Js.highlight(a,Js.languages[l]||Js.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof Js<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class x_ extends ye{constructor(e){super(),ve(this,e,RS,FS,be,{class:0,content:2,language:3})}}const jS=n=>({}),gc=n=>({}),HS=n=>({}),_c=n=>({});function bc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T=n[4]&&!n[2]&&vc(n);const C=n[19].header,M=Nt(C,n,n[18],_c);let $=n[4]&&n[2]&&yc(n);const O=n[19].default,E=Nt(O,n,n[18],null),I=n[19].footer,L=Nt(I,n,n[18],gc);return{c(){e=v("div"),t=v("div"),s=D(),l=v("div"),o=v("div"),T&&T.c(),r=D(),M&&M.c(),a=D(),$&&$.c(),u=D(),f=v("div"),E&&E.c(),c=D(),d=v("div"),L&&L.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",m="overlay-panel "+n[1]+" "+n[8]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(N,F){S(N,e,F),b(e,t),b(e,s),b(e,l),b(l,o),T&&T.m(o,null),b(o,r),M&&M.m(o,null),b(o,a),$&&$.m(o,null),b(l,u),b(l,f),E&&E.m(f,null),n[21](f),b(l,c),b(l,d),L&&L.m(d,null),_=!0,y||(k=[K(t,"click",pt(n[20])),K(f,"scroll",n[22])],y=!0)},p(N,F){n=N,n[4]&&!n[2]?T?T.p(n,F):(T=vc(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),M&&M.p&&(!_||F&262144)&&Rt(M,C,n,n[18],_?Ft(C,n[18],F,HS):jt(n[18]),_c),n[4]&&n[2]?$?$.p(n,F):($=yc(n),$.c(),$.m(o,null)):$&&($.d(1),$=null),E&&E.p&&(!_||F&262144)&&Rt(E,O,n,n[18],_?Ft(O,n[18],F,null):jt(n[18]),null),L&&L.p&&(!_||F&262144)&&Rt(L,I,n,n[18],_?Ft(I,n[18],F,jS):jt(n[18]),gc),(!_||F&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",m),(!_||F&262)&&Q(l,"popup",n[2]),(!_||F&4)&&Q(e,"padded",n[2]),(!_||F&1)&&Q(e,"active",n[0])},i(N){_||(st(()=>{i||(i=Be(t,yo,{duration:ps,opacity:0},!0)),i.run(1)}),A(M,N),A(E,N),A(L,N),st(()=>{g&&g.end(1),h=Wh(l,En,n[2]?{duration:ps,y:-10}:{duration:ps,x:50}),h.start()}),_=!0)},o(N){i||(i=Be(t,yo,{duration:ps,opacity:0},!1)),i.run(0),P(M,N),P(E,N),P(L,N),h&&h.invalidate(),g=Yh(l,En,n[2]?{duration:ps,y:10}:{duration:ps,x:50}),_=!1},d(N){N&&w(e),N&&i&&i.end(),T&&T.d(),M&&M.d(N),$&&$.d(),E&&E.d(N),n[21](null),L&&L.d(N),N&&g&&g.end(),y=!1,Le(k)}}}function vc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",pt(n[5])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function yc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=K(e,"click",pt(n[5])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function qS(n){let e,t,i,s,l=n[0]&&bc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[K(window,"resize",n[10]),K(window,"keydown",n[9])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=bc(o),l.c(),A(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,Le(s)}}}let Ri;function aa(){return Ri=Ri||document.querySelector(".overlays"),Ri||(Ri=document.createElement("div"),Ri.classList.add("overlays"),document.body.appendChild(Ri)),Ri}let ps=150;function kc(){return 1e3+aa().querySelectorAll(".overlay-panel-container.active").length}function VS(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const m=$t();let h,g,_,y,k="",T=o;function C(){typeof c=="function"&&c()===!1||t(0,o=!0)}function M(){typeof d=="function"&&d()===!1||t(0,o=!1)}function $(){return o}async function O(J){t(17,T=J),J?(_=document.activeElement,h==null||h.focus(),m("show"),document.body.classList.add("overlay-active")):(aa().querySelectorAll(".overlay-panel-container.active").length<=1&&document.body.classList.remove("overlay-active"),clearTimeout(y),_==null||_.focus(),m("hide")),await cn(),E()}function E(){h&&(o?t(6,h.style.zIndex=kc(),h):t(6,h.style="",h))}function I(J){o&&f&&J.code=="Escape"&&!V.isInput(J.target)&&h&&h.style.zIndex==kc()&&(J.preventDefault(),M())}function L(J){o&&N(g)}function N(J,te){te&&t(8,k=""),J&&(y||(y=setTimeout(()=>{if(clearTimeout(y),y=null,!J)return;if(J.scrollHeight-J.offsetHeight>0)t(8,k="scrollable");else{t(8,k="");return}J.scrollTop==0?t(8,k+=" scroll-top-reached"):J.scrollTop+J.offsetHeight==J.scrollHeight&&t(8,k+=" scroll-bottom-reached")},100)))}nn(()=>(aa().appendChild(h),()=>{var J;clearTimeout(y),(J=h==null?void 0:h.classList)==null||J.add("hidden"),setTimeout(()=>{h==null||h.remove()},0)}));const F=()=>a?M():!0;function W(J){ie[J?"unshift":"push"](()=>{g=J,t(7,g)})}const Z=J=>N(J.target);function ne(J){ie[J?"unshift":"push"](()=>{h=J,t(6,h)})}return n.$$set=J=>{"class"in J&&t(1,l=J.class),"active"in J&&t(0,o=J.active),"popup"in J&&t(2,r=J.popup),"overlayClose"in J&&t(3,a=J.overlayClose),"btnClose"in J&&t(4,u=J.btnClose),"escClose"in J&&t(12,f=J.escClose),"beforeOpen"in J&&t(13,c=J.beforeOpen),"beforeHide"in J&&t(14,d=J.beforeHide),"$$scope"in J&&t(18,s=J.$$scope)},n.$$.update=()=>{n.$$.dirty&131073&&T!=o&&O(o),n.$$.dirty&128&&N(g,!0),n.$$.dirty&64&&h&&E()},[o,l,r,a,u,M,h,g,k,I,L,N,f,c,d,C,$,T,s,i,F,W,Z,ne]}class Bn extends ye{constructor(e){super(),ve(this,e,VS,qS,be,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16})}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function zS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function BS(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=B(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),b(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&re(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&w(e)}}}function US(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function WS(n){let e,t;return e=new x_({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.content=JSON.stringify(i[2].meta,null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function YS(n){var Ee;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,m,h,g=n[2].status+"",_,y,k,T,C,M,$=((Ee=n[2].method)==null?void 0:Ee.toUpperCase())+"",O,E,I,L,N,F,W=n[2].auth+"",Z,ne,J,te,ee,z,X=n[2].url+"",Y,le,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe=n[2].remoteIp+"",ae,oe,je,Me,Te,de,$e=n[2].userIp+"",Ze,nt,Mt,ot,xn,ui,ts=n[2].userAgent+"",ns,Ll,fi,is,Nl,Oi,ss,ln,Qe,ls,ei,os,Ei,Ai,qt,Zt;function Fl(Ie,De){return Ie[2].referer?BS:zS}let R=Fl(n),U=R(n);const x=[WS,US],se=[];function Ce(Ie,De){return De&4&&(ss=null),ss==null&&(ss=!V.isEmpty(Ie[2].meta)),ss?0:1}return ln=Ce(n,-1),Qe=se[ln]=x[ln](n),qt=new Zi({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=D(),o=v("td"),a=B(r),u=D(),f=v("tr"),c=v("td"),c.textContent="Status",d=D(),m=v("td"),h=v("span"),_=B(g),y=D(),k=v("tr"),T=v("td"),T.textContent="Method",C=D(),M=v("td"),O=B($),E=D(),I=v("tr"),L=v("td"),L.textContent="Auth",N=D(),F=v("td"),Z=B(W),ne=D(),J=v("tr"),te=v("td"),te.textContent="URL",ee=D(),z=v("td"),Y=B(X),le=D(),He=v("tr"),Re=v("td"),Re.textContent="Referer",Fe=D(),qe=v("td"),U.c(),ge=D(),Se=v("tr"),Ue=v("td"),Ue.textContent="Remote IP",lt=D(),ue=v("td"),ae=B(fe),oe=D(),je=v("tr"),Me=v("td"),Me.textContent="User IP",Te=D(),de=v("td"),Ze=B($e),nt=D(),Mt=v("tr"),ot=v("td"),ot.textContent="UserAgent",xn=D(),ui=v("td"),ns=B(ts),Ll=D(),fi=v("tr"),is=v("td"),is.textContent="Meta",Nl=D(),Oi=v("td"),Qe.c(),ls=D(),ei=v("tr"),os=v("td"),os.textContent="Created",Ei=D(),Ai=v("td"),q(qt.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(h,"class","label"),Q(h,"label-danger",n[2].status>=400),p(T,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(te,"class","min-width txt-hint txt-bold"),p(Re,"class","min-width txt-hint txt-bold"),p(Ue,"class","min-width txt-hint txt-bold"),p(Me,"class","min-width txt-hint txt-bold"),p(ot,"class","min-width txt-hint txt-bold"),p(is,"class","min-width txt-hint txt-bold"),p(os,"class","min-width txt-hint txt-bold"),p(e,"class","table-compact table-border")},m(Ie,De){S(Ie,e,De),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o),b(o,a),b(t,u),b(t,f),b(f,c),b(f,d),b(f,m),b(m,h),b(h,_),b(t,y),b(t,k),b(k,T),b(k,C),b(k,M),b(M,O),b(t,E),b(t,I),b(I,L),b(I,N),b(I,F),b(F,Z),b(t,ne),b(t,J),b(J,te),b(J,ee),b(J,z),b(z,Y),b(t,le),b(t,He),b(He,Re),b(He,Fe),b(He,qe),U.m(qe,null),b(t,ge),b(t,Se),b(Se,Ue),b(Se,lt),b(Se,ue),b(ue,ae),b(t,oe),b(t,je),b(je,Me),b(je,Te),b(je,de),b(de,Ze),b(t,nt),b(t,Mt),b(Mt,ot),b(Mt,xn),b(Mt,ui),b(ui,ns),b(t,Ll),b(t,fi),b(fi,is),b(fi,Nl),b(fi,Oi),se[ln].m(Oi,null),b(t,ls),b(t,ei),b(ei,os),b(ei,Ei),b(ei,Ai),j(qt,Ai,null),Zt=!0},p(Ie,De){var ze;(!Zt||De&4)&&r!==(r=Ie[2].id+"")&&re(a,r),(!Zt||De&4)&&g!==(g=Ie[2].status+"")&&re(_,g),(!Zt||De&4)&&Q(h,"label-danger",Ie[2].status>=400),(!Zt||De&4)&&$!==($=((ze=Ie[2].method)==null?void 0:ze.toUpperCase())+"")&&re(O,$),(!Zt||De&4)&&W!==(W=Ie[2].auth+"")&&re(Z,W),(!Zt||De&4)&&X!==(X=Ie[2].url+"")&&re(Y,X),R===(R=Fl(Ie))&&U?U.p(Ie,De):(U.d(1),U=R(Ie),U&&(U.c(),U.m(qe,null))),(!Zt||De&4)&&fe!==(fe=Ie[2].remoteIp+"")&&re(ae,fe),(!Zt||De&4)&&$e!==($e=Ie[2].userIp+"")&&re(Ze,$e),(!Zt||De&4)&&ts!==(ts=Ie[2].userAgent+"")&&re(ns,ts);let Ke=ln;ln=Ce(Ie,De),ln===Ke?se[ln].p(Ie,De):(pe(),P(se[Ke],1,1,()=>{se[Ke]=null}),me(),Qe=se[ln],Qe?Qe.p(Ie,De):(Qe=se[ln]=x[ln](Ie),Qe.c()),A(Qe,1),Qe.m(Oi,null));const Ne={};De&4&&(Ne.date=Ie[2].created),qt.$set(Ne)},i(Ie){Zt||(A(Qe),A(qt.$$.fragment,Ie),Zt=!0)},o(Ie){P(Qe),P(qt.$$.fragment,Ie),Zt=!1},d(Ie){Ie&&w(e),U.d(),se[ln].d(),H(qt)}}}function KS(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function JS(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[4]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function ZS(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[JS],header:[KS],default:[YS]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),H(e,s)}}}function GS(n,e,t){let i,s=new Fr;function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){ie[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){We.call(this,n,c)}function f(c){We.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class XS extends ye{constructor(e){super(),ve(this,e,GS,ZS,be,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function QS(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[0],S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function wc(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new PS({props:l}),ie.push(()=>ke(e,"filter",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function Sc(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new Qv({props:l}),ie.push(()=>ke(e,"filter",s)),e.$on("select",n[12]),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function xS(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k=n[3],T,C=n[3],M,$;r=new Da({}),r.$on("refresh",n[7]),d=new _e({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[QS,({uniqueId:I})=>({14:I}),({uniqueId:I})=>I?16384:0]},$$scope:{ctx:n}}}),h=new Uo({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),h.$on("submit",n[9]);let O=wc(n),E=Sc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=B(n[5]),o=D(),q(r.$$.fragment),a=D(),u=v("div"),f=D(),c=v("div"),q(d.$$.fragment),m=D(),q(h.$$.fragment),g=D(),_=v("div"),y=D(),O.c(),T=D(),E.c(),M=Ae(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(_,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(I,L){S(I,e,L),b(e,t),b(t,i),b(i,s),b(s,l),b(t,o),j(r,t,null),b(t,a),b(t,u),b(t,f),b(t,c),j(d,c,null),b(e,m),j(h,e,null),b(e,g),b(e,_),b(e,y),O.m(e,null),S(I,T,L),E.m(I,L),S(I,M,L),$=!0},p(I,L){(!$||L&32)&&re(l,I[5]);const N={};L&49153&&(N.$$scope={dirty:L,ctx:I}),d.$set(N);const F={};L&4&&(F.value=I[2]),h.$set(F),L&8&&be(k,k=I[3])?(pe(),P(O,1,1,G),me(),O=wc(I),O.c(),A(O,1),O.m(e,null)):O.p(I,L),L&8&&be(C,C=I[3])?(pe(),P(E,1,1,G),me(),E=Sc(I),E.c(),A(E,1),E.m(M.parentNode,M)):E.p(I,L)},i(I){$||(A(r.$$.fragment,I),A(d.$$.fragment,I),A(h.$$.fragment,I),A(O),A(E),$=!0)},o(I){P(r.$$.fragment,I),P(d.$$.fragment,I),P(h.$$.fragment,I),P(O),P(E),$=!1},d(I){I&&w(e),H(r),H(d),H(h),O.d(I),I&&w(T),I&&w(M),E.d(I)}}}function e3(n){let e,t,i,s;e=new kn({props:{$$slots:{default:[xS]},$$scope:{ctx:n}}});let l={};return i=new XS({props:l}),n[13](i),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(o,r){j(e,o,r),S(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&w(t),n[13](null),H(i,o)}}}const Tc="includeAdminLogs";function t3(n,e,t){var y;let i,s;Je(n,St,k=>t(5,s=k)),Yt(St,s="Request logs",s);let l,o="",r=((y=window.localStorage)==null?void 0:y.getItem(Tc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function c(){r=this.checked,t(0,r)}const d=k=>t(2,o=k.detail);function m(k){o=k,t(2,o)}function h(k){o=k,t(2,o)}const g=k=>l==null?void 0:l.show(k==null?void 0:k.detail);function _(k){ie[k?"unshift":"push"](()=>{l=k,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(Tc,r<<0)},[r,l,o,a,i,s,u,f,c,d,m,h,g,_]}class n3 extends ye{constructor(e){super(),ve(this,e,t3,e3,be,{})}}const es=Pn([]),Si=Pn({}),Po=Pn(!1);function i3(n){es.update(e=>{const t=V.findByKey(e,"id",n);return t?Si.set(t):e.length&&Si.set(e[0]),e})}function s3(n){es.update(e=>(V.removeByKey(e,"id",n.id),Si.update(t=>t.id===n.id?e[0]:t),e))}async function eb(n=null){Po.set(!0);try{let e=await he.collections.getFullList(200,{sort:"+created"});e=V.sortCollections(e),es.set(e);const t=n&&V.findByKey(e,"id",n);t?Si.set(t):e.length&&Si.set(e[0])}catch(e){he.errorResponseHandler(e)}Po.set(!1)}const Qa=Pn({});function un(n,e,t){Qa.set({text:n,yesCallback:e,noCallback:t})}function tb(){Qa.set({})}function Cc(n){let e,t,i,s;const l=n[14].default,o=Nt(l,n,n[13],null);return{c(){e=v("div"),o&&o.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(r,a){S(r,e,a),o&&o.m(e,null),s=!0},p(r,a){o&&o.p&&(!s||a&8192)&&Rt(o,l,r,r[13],s?Ft(l,r[13],a,null):jt(r[13]),null),(!s||a&2)&&p(e,"class",r[1]),(!s||a&3)&&Q(e,"active",r[0])},i(r){s||(A(o,r),r&&st(()=>{i&&i.end(1),t=Wh(e,En,{duration:150,y:-5}),t.start()}),s=!0)},o(r){P(o,r),t&&t.invalidate(),r&&(i=Yh(e,En,{duration:150,y:2})),s=!1},d(r){r&&w(e),o&&o.d(r),r&&i&&i.end()}}}function l3(n){let e,t,i,s,l=n[0]&&Cc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container")},m(o,r){S(o,e,r),l&&l.m(e,null),n[15](e),t=!0,i||(s=[K(window,"click",n[3]),K(window,"keydown",n[4]),K(window,"focusin",n[5])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Cc(o),l.c(),A(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[15](null),i=!1,Le(s)}}}function o3(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f,c;const d=$t();function m(){t(0,o=!1)}function h(){t(0,o=!0)}function g(){o?m():h()}function _(I){return!f||I.classList.contains(a)||(c==null?void 0:c.contains(I))&&!f.contains(I)||f.contains(I)&&I.closest&&I.closest("."+a)}function y(I){(!o||_(I.target))&&(I.preventDefault(),I.stopPropagation(),g())}function k(I){(I.code==="Enter"||I.code==="Space")&&(!o||_(I.target))&&(I.preventDefault(),I.stopPropagation(),g())}function T(I){o&&!(f!=null&&f.contains(I.target))&&!(c!=null&&c.contains(I.target))&&m()}function C(I){o&&r&&I.code==="Escape"&&(I.preventDefault(),m())}function M(I){return T(I)}function $(I){O(),t(12,c=I||(f==null?void 0:f.parentNode)),c&&(f==null||f.addEventListener("click",y),c.addEventListener("click",y),c.addEventListener("keydown",k))}function O(){c&&(f==null||f.removeEventListener("click",y),c.removeEventListener("click",y),c.removeEventListener("keydown",k))}nn(()=>($(),()=>O()));function E(I){ie[I?"unshift":"push"](()=>{f=I,t(2,f)})}return n.$$set=I=>{"trigger"in I&&t(6,l=I.trigger),"active"in I&&t(0,o=I.active),"escClose"in I&&t(7,r=I.escClose),"closableClass"in I&&t(8,a=I.closableClass),"class"in I&&t(1,u=I.class),"$$scope"in I&&t(13,s=I.$$scope)},n.$$.update=()=>{var I,L;n.$$.dirty&68&&f&&$(l),n.$$.dirty&4097&&(o?((I=c==null?void 0:c.classList)==null||I.add("active"),d("show")):((L=c==null?void 0:c.classList)==null||L.remove("active"),d("hide")))},[o,u,f,T,C,M,l,r,a,m,h,g,c,s,i,E]}class Qn extends ye{constructor(e){super(),ve(this,e,o3,l3,be,{trigger:6,active:0,escClose:7,closableClass:8,class:1,hide:9,show:10,toggle:11})}get hide(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}get toggle(){return this.$$.ctx[11]}}const r3=n=>({active:n&1}),$c=n=>({active:n[0]});function Mc(n){let e,t,i;const s=n[15].default,l=Nt(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Rt(l,s,o,o[14],i?Ft(s,o[14],r,null):jt(o[14]),null)},i(o){i||(A(l,o),o&&st(()=>{t||(t=Be(e,Ht,{duration:150},!0)),t.run(1)}),i=!0)},o(o){P(l,o),o&&(t||(t=Be(e,Ht,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function a3(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Nt(a,n,n[14],$c);let f=n[0]&&Mc(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=D(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){S(c,e,d),b(e,t),u&&u.m(t,null),b(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[K(t,"click",pt(n[17])),K(t,"drop",pt(n[18])),K(t,"dragstart",n[19]),K(t,"dragenter",n[20]),K(t,"dragleave",n[21]),K(t,"dragover",pt(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&Rt(u,a,c,c[14],l?Ft(a,c[14],d,r3):jt(c[14]),$c),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Mc(c),f.c(),A(f,1),f.m(e,null)):f&&(pe(),P(f,1,1,()=>{f=null}),me()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){P(u,c),P(f),l=!1},d(c){c&&w(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,Le(r)}}}function u3(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=$t();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(){k(),t(0,f=!0),l("expand")}function _(){t(0,f=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),f?_():g()}function k(){if(d&&o.closest(".accordions")){const L=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const N of L)N.click()}}nn(()=>()=>clearTimeout(r));function T(L){We.call(this,n,L)}const C=()=>c&&y(),M=L=>{u&&(t(7,m=!1),k(),l("drop",L))},$=L=>u&&l("dragstart",L),O=L=>{u&&(t(7,m=!0),l("dragenter",L))},E=L=>{u&&(t(7,m=!1),l("dragleave",L))};function I(L){ie[L?"unshift":"push"](()=>{o=L,t(6,o)})}return n.$$set=L=>{"class"in L&&t(1,a=L.class),"draggable"in L&&t(2,u=L.draggable),"active"in L&&t(0,f=L.active),"interactive"in L&&t(3,c=L.interactive),"single"in L&&t(9,d=L.single),"$$scope"in L&&t(14,s=L.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o==null||o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&(o==null||o.scrollIntoView({behavior:"smooth",block:"nearest"}))},200)))},[f,a,u,c,y,k,o,m,l,d,h,g,_,r,s,i,T,C,M,$,O,E,I]}class ys extends ye{constructor(e){super(),ve(this,e,u3,a3,be,{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]}}const f3=n=>({}),Dc=n=>({});function Oc(n,e,t){const i=n.slice();return i[46]=e[t],i}const c3=n=>({}),Ec=n=>({});function Ac(n,e,t){const i=n.slice();return i[46]=e[t],i[50]=t,i}function Ic(n){let e,t,i;return{c(){e=v("div"),t=B(n[2]),i=D(),p(e,"class","block txt-placeholder"),Q(e,"link-hint",!n[5])},m(s,l){S(s,e,l),b(e,t),b(e,i)},p(s,l){l[0]&4&&re(t,s[2]),l[0]&32&&Q(e,"link-hint",!s[5])},d(s){s&&w(e)}}}function d3(n){let e,t=n[46]+"",i;return{c(){e=v("span"),i=B(t),p(e,"class","txt")},m(s,l){S(s,e,l),b(e,i)},p(s,l){l[0]&1&&t!==(t=s[46]+"")&&re(i,t)},i:G,o:G,d(s){s&&w(e)}}}function p3(n){let e,t,i;const s=[{item:n[46]},n[9]];var l=n[8];function o(r){let a={};for(let u=0;u{H(f,1)}),me()}l?(e=Kt(l,o()),q(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Pc(n){let e,t,i;function s(){return n[34](n[46])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[Pe(Ye.call(null,e,"Clear")),K(e,"click",yn(pt(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Le(i)}}}function Lc(n){let e,t,i,s,l,o;const r=[p3,d3],a=[];function u(c,d){return c[8]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&Pc(n);return{c(){e=v("div"),i.c(),s=D(),f&&f.c(),l=D(),p(e,"class","option")},m(c,d){S(c,e,d),a[t].m(e,null),b(e,s),f&&f.m(e,null),b(e,l),o=!0},p(c,d){let m=t;t=u(c),t===m?a[t].p(c,d):(pe(),P(a[m],1,1,()=>{a[m]=null}),me(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=Pc(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(A(i),o=!0)},o(c){P(i),o=!1},d(c){c&&w(e),a[t].d(),f&&f.d()}}}function Nc(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[18],$$slots:{default:[g3]},$$scope:{ctx:n}};return e=new Qn({props:i}),n[39](e),e.$on("show",n[24]),e.$on("hide",n[40]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&262144&&(o.trigger=s[18]),l[0]&1612938|l[1]&2048&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[39](null),H(e,s)}}}function Fc(n){let e,t,i,s,l,o,r,a,u=n[15].length&&Rc(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=D(),l=v("input"),o=D(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){S(f,e,c),b(e,t),b(t,i),b(t,s),b(t,l),ce(l,n[15]),b(t,o),u&&u.m(t,null),l.focus(),r||(a=K(l,"input",n[36]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&32768&&l.value!==f[15]&&ce(l,f[15]),f[15].length?u?u.p(f,c):(u=Rc(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&w(e),u&&u.d(),r=!1,a()}}}function Rc(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent clear"),p(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),b(e,t),i||(s=K(t,"click",yn(pt(n[21]))),i=!0)},p:G,d(l){l&&w(e),i=!1,s()}}}function jc(n){let e,t=n[1]&&Hc(n);return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=Hc(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Hc(n){let e,t;return{c(){e=v("div"),t=B(n[1]),p(e,"class","txt-missing")},m(i,s){S(i,e,s),b(e,t)},p(i,s){s[0]&2&&re(t,i[1])},d(i){i&&w(e)}}}function m3(n){let e=n[46]+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&1048576&&e!==(e=i[46]+"")&&re(t,e)},i:G,o:G,d(i){i&&w(t)}}}function h3(n){let e,t,i;const s=[{item:n[46]},n[11]];var l=n[10];function o(r){let a={};for(let u=0;u{H(f,1)}),me()}l?(e=Kt(l,o()),q(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function qc(n){let e,t,i,s,l,o,r;const a=[h3,m3],u=[];function f(m,h){return m[10]?0:1}t=f(n),i=u[t]=a[t](n);function c(...m){return n[37](n[46],...m)}function d(...m){return n[38](n[46],...m)}return{c(){e=v("div"),i.c(),s=D(),p(e,"tabindex","0"),p(e,"class","dropdown-item option"),Q(e,"closable",n[7]),Q(e,"selected",n[19](n[46]))},m(m,h){S(m,e,h),u[t].m(e,null),b(e,s),l=!0,o||(r=[K(e,"click",c),K(e,"keydown",d)],o=!0)},p(m,h){n=m;let g=t;t=f(n),t===g?u[t].p(n,h):(pe(),P(u[g],1,1,()=>{u[g]=null}),me(),i=u[t],i?i.p(n,h):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||h[0]&128)&&Q(e,"closable",n[7]),(!l||h[0]&1572864)&&Q(e,"selected",n[19](n[46]))},i(m){l||(A(i),l=!0)},o(m){P(i),l=!1},d(m){m&&w(e),u[t].d(),o=!1,Le(r)}}}function g3(n){let e,t,i,s,l,o=n[12]&&Fc(n);const r=n[33].beforeOptions,a=Nt(r,n,n[42],Ec);let u=n[20],f=[];for(let g=0;gP(f[g],1,1,()=>{f[g]=null});let d=null;u.length||(d=jc(n));const m=n[33].afterOptions,h=Nt(m,n,n[42],Dc);return{c(){o&&o.c(),e=D(),a&&a.c(),t=D(),i=v("div");for(let g=0;gP(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=Ic(n));let c=!n[5]&&Nc(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),me()):c?(c.p(d,m),m[0]&32&&A(c,1)):(c=Nc(d),c.c(),A(c,1),c.m(e,null)),(!o||m[0]&8192&&l!==(l="select "+d[13]))&&p(e,"class",l),(!o||m[0]&8208)&&Q(e,"multiple",d[4]),(!o||m[0]&8224)&&Q(e,"disabled",d[5])},i(d){if(!o){for(let m=0;mje(Me,oe))||[]}function Y(ae,oe){ae.preventDefault(),g&&d?Z(oe):W(oe)}function le(ae,oe){(ae.code==="Enter"||ae.code==="Space")&&Y(ae,oe)}function He(){z(),setTimeout(()=>{const ae=L==null?void 0:L.querySelector(".dropdown-item.option.selected");ae&&(ae.focus(),ae.scrollIntoView({block:"nearest"}))},0)}function Re(ae){ae.stopPropagation(),!m&&(E==null||E.toggle())}nn(()=>{const ae=document.querySelectorAll(`label[for="${r}"]`);for(const oe of ae)oe.addEventListener("click",Re);return()=>{for(const oe of ae)oe.removeEventListener("click",Re)}});const Fe=ae=>F(ae);function qe(ae){ie[ae?"unshift":"push"](()=>{N=ae,t(18,N)})}function ge(){I=this.value,t(15,I)}const Se=(ae,oe)=>Y(oe,ae),Ue=(ae,oe)=>le(oe,ae);function lt(ae){ie[ae?"unshift":"push"](()=>{E=ae,t(16,E)})}function ue(ae){We.call(this,n,ae)}function fe(ae){ie[ae?"unshift":"push"](()=>{L=ae,t(17,L)})}return n.$$set=ae=>{"id"in ae&&t(25,r=ae.id),"noOptionsText"in ae&&t(1,a=ae.noOptionsText),"selectPlaceholder"in ae&&t(2,u=ae.selectPlaceholder),"searchPlaceholder"in ae&&t(3,f=ae.searchPlaceholder),"items"in ae&&t(26,c=ae.items),"multiple"in ae&&t(4,d=ae.multiple),"disabled"in ae&&t(5,m=ae.disabled),"selected"in ae&&t(0,h=ae.selected),"toggle"in ae&&t(6,g=ae.toggle),"closable"in ae&&t(7,_=ae.closable),"labelComponent"in ae&&t(8,y=ae.labelComponent),"labelComponentProps"in ae&&t(9,k=ae.labelComponentProps),"optionComponent"in ae&&t(10,T=ae.optionComponent),"optionComponentProps"in ae&&t(11,C=ae.optionComponentProps),"searchable"in ae&&t(12,M=ae.searchable),"searchFunc"in ae&&t(27,$=ae.searchFunc),"class"in ae&&t(13,O=ae.class),"$$scope"in ae&&t(42,o=ae.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&67108864&&c&&(ee(),z()),n.$$.dirty[0]&67141632&&t(20,i=X(c,I)),n.$$.dirty[0]&1&&t(19,s=function(ae){const oe=V.toArray(h);return V.inArray(oe,ae)})},[h,a,u,f,d,m,g,_,y,k,T,C,M,O,F,I,E,L,N,s,i,z,Y,le,He,r,c,$,W,Z,ne,J,te,l,Fe,qe,ge,Se,Ue,lt,ue,fe,o]}class xa extends ye{constructor(e){super(),ve(this,e,v3,_3,be,{id:25,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:26,multiple:4,disabled:5,selected:0,toggle:6,closable:7,labelComponent:8,labelComponentProps:9,optionComponent:10,optionComponentProps:11,searchable:12,searchFunc:27,class:13,deselectItem:14,selectItem:28,toggleItem:29,reset:30,showDropdown:31,hideDropdown:32},null,[-1,-1])}get deselectItem(){return this.$$.ctx[14]}get selectItem(){return this.$$.ctx[28]}get toggleItem(){return this.$$.ctx[29]}get reset(){return this.$$.ctx[30]}get showDropdown(){return this.$$.ctx[31]}get hideDropdown(){return this.$$.ctx[32]}}function Vc(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&w(e)}}}function y3(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&Vc(n);return{c(){l&&l.c(),e=D(),t=v("span"),s=B(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),b(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=Vc(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&re(s,i)},i:G,o:G,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function k3(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class zc extends ye{constructor(e){super(),ve(this,e,k3,y3,be,{item:0})}}const w3=n=>({}),Bc=n=>({});function S3(n){let e;const t=n[8].afterOptions,i=Nt(t,n,n[12],Bc);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&Rt(i,t,s,s[12],e?Ft(t,s[12],l,w3):jt(s[12]),Bc)},i(s){e||(A(i,s),e=!0)},o(s){P(i,s),e=!1},d(s){i&&i.d(s)}}}function T3(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[S3]},$$scope:{ctx:n}};for(let r=0;rke(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){q(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&62?sn(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Xn(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],we(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function C3(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=At(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=zc}=e,{optionComponent:c=zc}=e,{selectionKey:d="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function h(T){T=V.toArray(T,!0);let C=[];for(let M of T){const $=V.findByKey(r,d,M);$&&C.push($)}T.length&&!C.length||t(0,u=a?C:C[0])}async function g(T){let C=V.toArray(T,!0).map(M=>M[d]);r.length&&t(6,m=a?C:C[0])}function _(T){u=T,t(0,u)}function y(T){We.call(this,n,T)}function k(T){We.call(this,n,T)}return n.$$set=T=>{e=Xe(Xe({},e),Gn(T)),t(5,s=At(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,s,m,d,l,_,y,k,o]}class Ls extends ye{constructor(e){super(),ve(this,e,C3,T3,be,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function $3(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{items:n[2]},n[3]];function l(r){n[4](r)}let o={};for(let r=0;rke(e,"keyOfSelected",l)),{c(){q(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&14?sn(s,[a&2&&{class:"field-type-select "+r[1]},a&4&&{items:r[2]},a&8&&Xn(r[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=r[0],we(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function M3(n,e,t){const i=["value","class"];let s=At(e,i),{value:l="text"}=e,{class:o=""}=e;const r=[{label:"Plain text",value:"text",icon:V.getFieldTypeIcon("text")},{label:"Rich editor",value:"editor",icon:V.getFieldTypeIcon("editor")},{label:"Number",value:"number",icon:V.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:V.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:V.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:V.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:V.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:V.getFieldTypeIcon("select")},{label:"File",value:"file",icon:V.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:V.getFieldTypeIcon("relation")},{label:"JSON",value:"json",icon:V.getFieldTypeIcon("json")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=Xe(Xe({},e),Gn(u)),t(3,s=At(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,o=u.class)},[l,o,r,s,a]}class D3 extends ye{constructor(e){super(),ve(this,e,M3,$3,be,{value:0,class:1})}}function O3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min length"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].min&&ce(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function E3(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max length"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min",r=n[0].min||0)},m(f,c){S(f,e,c),b(e,t),S(f,s,c),S(f,l,c),ce(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&o!==(o=f[5])&&p(l,"id",o),c&1&&r!==(r=f[0].min||0)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].max&&ce(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function A3(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Regex pattern"),s=D(),l=v("input"),r=D(),a=v("div"),a.innerHTML="Valid Go regular expression, eg. ^\\w+$.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].pattern),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].pattern&&ce(l,c[0].pattern)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function I3(n){let e,t,i,s,l,o,r,a,u,f;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[O3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[E3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[A3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){S(c,e,d),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),f=!0},p(c,[d]){const m={};d&2&&(m.name="schema."+c[1]+".options.min"),d&97&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const h={};d&2&&(h.name="schema."+c[1]+".options.max"),d&97&&(h.$$scope={dirty:d,ctx:c}),o.$set(h);const g={};d&2&&(g.name="schema."+c[1]+".options.pattern"),d&97&&(g.$$scope={dirty:d,ctx:c}),u.$set(g)},i(c){f||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){P(i.$$.fragment,c),P(o.$$.fragment,c),P(u.$$.fragment,c),f=!1},d(c){c&&w(e),H(i),H(o),H(u)}}}function P3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=ht(this.value),t(0,s)}function o(){s.max=ht(this.value),t(0,s)}function r(){s.pattern=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"options"in a&&t(0,s=a.options)},[s,i,l,o,r]}class L3 extends ye{constructor(e){super(),ve(this,e,P3,I3,be,{key:1,options:0})}}function N3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min"),s=D(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].min&&ce(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function F3(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max"),s=D(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"min",r=n[0].min)},m(f,c){S(f,e,c),b(e,t),S(f,s,c),S(f,l,c),ce(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&o!==(o=f[4])&&p(l,"id",o),c&1&&r!==(r=f[0].min)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].max&&ce(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function R3(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[N3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[F3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function j3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=ht(this.value),t(0,s)}function o(){s.max=ht(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class H3 extends ye{constructor(e){super(),ve(this,e,j3,R3,be,{key:1,options:0})}}function q3(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class V3 extends ye{constructor(e){super(),ve(this,e,q3,null,be,{key:0,options:1})}}function z3(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],o={};for(let r=0;r{t(0,o=V.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=Xe(Xe({},e),Gn(u)),t(3,l=At(e,s)),"value"in u&&t(0,o=u.value),"separator"in u&&t(1,r=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(o||[]).join(", "))},[o,r,i,l,a]}class Ns extends ye{constructor(e){super(),ve(this,e,B3,z3,be,{value:0,separator:1})}}function U3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(_){n[2](_)}let g={id:n[4],disabled:!V.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(g.value=n[0].exceptDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(_,y){S(_,e,y),b(e,t),b(e,i),b(e,s),S(_,o,y),j(r,_,y),S(_,u,y),S(_,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`List of domains that are NOT allowed. +`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,m="",h="",g=!1,_=0;_>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function FS(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),b(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:G,o:G,d(s){s&&w(e)}}}function RS(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Js.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Js.highlight(a,Js.languages[l]||Js.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof Js<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class x_ extends ye{constructor(e){super(),ve(this,e,RS,FS,be,{class:0,content:2,language:3})}}const jS=n=>({}),gc=n=>({}),HS=n=>({}),_c=n=>({});function bc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T=n[4]&&!n[2]&&vc(n);const C=n[19].header,M=Nt(C,n,n[18],_c);let $=n[4]&&n[2]&&yc(n);const O=n[19].default,E=Nt(O,n,n[18],null),I=n[19].footer,L=Nt(I,n,n[18],gc);return{c(){e=v("div"),t=v("div"),s=D(),l=v("div"),o=v("div"),T&&T.c(),r=D(),M&&M.c(),a=D(),$&&$.c(),u=D(),f=v("div"),E&&E.c(),c=D(),d=v("div"),L&&L.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",m="overlay-panel "+n[1]+" "+n[8]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(N,F){S(N,e,F),b(e,t),b(e,s),b(e,l),b(l,o),T&&T.m(o,null),b(o,r),M&&M.m(o,null),b(o,a),$&&$.m(o,null),b(l,u),b(l,f),E&&E.m(f,null),n[21](f),b(l,c),b(l,d),L&&L.m(d,null),_=!0,y||(k=[K(t,"click",pt(n[20])),K(f,"scroll",n[22])],y=!0)},p(N,F){n=N,n[4]&&!n[2]?T?T.p(n,F):(T=vc(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),M&&M.p&&(!_||F&262144)&&Rt(M,C,n,n[18],_?Ft(C,n[18],F,HS):jt(n[18]),_c),n[4]&&n[2]?$?$.p(n,F):($=yc(n),$.c(),$.m(o,null)):$&&($.d(1),$=null),E&&E.p&&(!_||F&262144)&&Rt(E,O,n,n[18],_?Ft(O,n[18],F,null):jt(n[18]),null),L&&L.p&&(!_||F&262144)&&Rt(L,I,n,n[18],_?Ft(I,n[18],F,jS):jt(n[18]),gc),(!_||F&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",m),(!_||F&262)&&Q(l,"popup",n[2]),(!_||F&4)&&Q(e,"padded",n[2]),(!_||F&1)&&Q(e,"active",n[0])},i(N){_||(st(()=>{i||(i=Be(t,yo,{duration:ps,opacity:0},!0)),i.run(1)}),A(M,N),A(E,N),A(L,N),st(()=>{g&&g.end(1),h=Wh(l,En,n[2]?{duration:ps,y:-10}:{duration:ps,x:50}),h.start()}),_=!0)},o(N){i||(i=Be(t,yo,{duration:ps,opacity:0},!1)),i.run(0),P(M,N),P(E,N),P(L,N),h&&h.invalidate(),g=Yh(l,En,n[2]?{duration:ps,y:10}:{duration:ps,x:50}),_=!1},d(N){N&&w(e),N&&i&&i.end(),T&&T.d(),M&&M.d(N),$&&$.d(),E&&E.d(N),n[21](null),L&&L.d(N),N&&g&&g.end(),y=!1,Le(k)}}}function vc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",pt(n[5])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function yc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=K(e,"click",pt(n[5])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function qS(n){let e,t,i,s,l=n[0]&&bc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[K(window,"resize",n[10]),K(window,"keydown",n[9])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=bc(o),l.c(),A(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,Le(s)}}}let Ri;function aa(){return Ri=Ri||document.querySelector(".overlays"),Ri||(Ri=document.createElement("div"),Ri.classList.add("overlays"),document.body.appendChild(Ri)),Ri}let ps=150;function kc(){return 1e3+aa().querySelectorAll(".overlay-panel-container.active").length}function VS(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const m=$t();let h,g,_,y,k="",T=o;function C(){typeof c=="function"&&c()===!1||t(0,o=!0)}function M(){typeof d=="function"&&d()===!1||t(0,o=!1)}function $(){return o}async function O(J){t(17,T=J),J?(_=document.activeElement,h==null||h.focus(),m("show"),document.body.classList.add("overlay-active")):(aa().querySelectorAll(".overlay-panel-container.active").length<=1&&document.body.classList.remove("overlay-active"),clearTimeout(y),_==null||_.focus(),m("hide")),await cn(),E()}function E(){h&&(o?t(6,h.style.zIndex=kc(),h):t(6,h.style="",h))}function I(J){o&&f&&J.code=="Escape"&&!V.isInput(J.target)&&h&&h.style.zIndex==kc()&&(J.preventDefault(),M())}function L(J){o&&N(g)}function N(J,te){te&&t(8,k=""),J&&(y||(y=setTimeout(()=>{if(clearTimeout(y),y=null,!J)return;if(J.scrollHeight-J.offsetHeight>0)t(8,k="scrollable");else{t(8,k="");return}J.scrollTop==0?t(8,k+=" scroll-top-reached"):J.scrollTop+J.offsetHeight==J.scrollHeight&&t(8,k+=" scroll-bottom-reached")},100)))}nn(()=>(aa().appendChild(h),()=>{var J;clearTimeout(y),(J=h==null?void 0:h.classList)==null||J.add("hidden"),setTimeout(()=>{h==null||h.remove()},0)}));const F=()=>a?M():!0;function W(J){ie[J?"unshift":"push"](()=>{g=J,t(7,g)})}const Z=J=>N(J.target);function ne(J){ie[J?"unshift":"push"](()=>{h=J,t(6,h)})}return n.$$set=J=>{"class"in J&&t(1,l=J.class),"active"in J&&t(0,o=J.active),"popup"in J&&t(2,r=J.popup),"overlayClose"in J&&t(3,a=J.overlayClose),"btnClose"in J&&t(4,u=J.btnClose),"escClose"in J&&t(12,f=J.escClose),"beforeOpen"in J&&t(13,c=J.beforeOpen),"beforeHide"in J&&t(14,d=J.beforeHide),"$$scope"in J&&t(18,s=J.$$scope)},n.$$.update=()=>{n.$$.dirty&131073&&T!=o&&O(o),n.$$.dirty&128&&N(g,!0),n.$$.dirty&64&&h&&E()},[o,l,r,a,u,M,h,g,k,I,L,N,f,c,d,C,$,T,s,i,F,W,Z,ne]}class Bn extends ye{constructor(e){super(),ve(this,e,VS,qS,be,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16})}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function zS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function BS(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=B(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),b(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&re(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&w(e)}}}function US(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function WS(n){let e,t;return e=new x_({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.content=JSON.stringify(i[2].meta,null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function YS(n){var Ee;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,m,h,g=n[2].status+"",_,y,k,T,C,M,$=((Ee=n[2].method)==null?void 0:Ee.toUpperCase())+"",O,E,I,L,N,F,W=n[2].auth+"",Z,ne,J,te,ee,z,X=n[2].url+"",Y,le,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe=n[2].remoteIp+"",ae,oe,je,Me,Te,ce,$e=n[2].userIp+"",Ze,nt,Mt,ot,xn,ui,ts=n[2].userAgent+"",ns,Ll,fi,is,Nl,Oi,ss,ln,Qe,ls,ei,os,Ei,Ai,qt,Zt;function Fl(Ie,De){return Ie[2].referer?BS:zS}let R=Fl(n),U=R(n);const x=[WS,US],se=[];function Ce(Ie,De){return De&4&&(ss=null),ss==null&&(ss=!V.isEmpty(Ie[2].meta)),ss?0:1}return ln=Ce(n,-1),Qe=se[ln]=x[ln](n),qt=new Zi({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=D(),o=v("td"),a=B(r),u=D(),f=v("tr"),c=v("td"),c.textContent="Status",d=D(),m=v("td"),h=v("span"),_=B(g),y=D(),k=v("tr"),T=v("td"),T.textContent="Method",C=D(),M=v("td"),O=B($),E=D(),I=v("tr"),L=v("td"),L.textContent="Auth",N=D(),F=v("td"),Z=B(W),ne=D(),J=v("tr"),te=v("td"),te.textContent="URL",ee=D(),z=v("td"),Y=B(X),le=D(),He=v("tr"),Re=v("td"),Re.textContent="Referer",Fe=D(),qe=v("td"),U.c(),ge=D(),Se=v("tr"),Ue=v("td"),Ue.textContent="Remote IP",lt=D(),ue=v("td"),ae=B(fe),oe=D(),je=v("tr"),Me=v("td"),Me.textContent="User IP",Te=D(),ce=v("td"),Ze=B($e),nt=D(),Mt=v("tr"),ot=v("td"),ot.textContent="UserAgent",xn=D(),ui=v("td"),ns=B(ts),Ll=D(),fi=v("tr"),is=v("td"),is.textContent="Meta",Nl=D(),Oi=v("td"),Qe.c(),ls=D(),ei=v("tr"),os=v("td"),os.textContent="Created",Ei=D(),Ai=v("td"),q(qt.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(h,"class","label"),Q(h,"label-danger",n[2].status>=400),p(T,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(te,"class","min-width txt-hint txt-bold"),p(Re,"class","min-width txt-hint txt-bold"),p(Ue,"class","min-width txt-hint txt-bold"),p(Me,"class","min-width txt-hint txt-bold"),p(ot,"class","min-width txt-hint txt-bold"),p(is,"class","min-width txt-hint txt-bold"),p(os,"class","min-width txt-hint txt-bold"),p(e,"class","table-compact table-border")},m(Ie,De){S(Ie,e,De),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o),b(o,a),b(t,u),b(t,f),b(f,c),b(f,d),b(f,m),b(m,h),b(h,_),b(t,y),b(t,k),b(k,T),b(k,C),b(k,M),b(M,O),b(t,E),b(t,I),b(I,L),b(I,N),b(I,F),b(F,Z),b(t,ne),b(t,J),b(J,te),b(J,ee),b(J,z),b(z,Y),b(t,le),b(t,He),b(He,Re),b(He,Fe),b(He,qe),U.m(qe,null),b(t,ge),b(t,Se),b(Se,Ue),b(Se,lt),b(Se,ue),b(ue,ae),b(t,oe),b(t,je),b(je,Me),b(je,Te),b(je,ce),b(ce,Ze),b(t,nt),b(t,Mt),b(Mt,ot),b(Mt,xn),b(Mt,ui),b(ui,ns),b(t,Ll),b(t,fi),b(fi,is),b(fi,Nl),b(fi,Oi),se[ln].m(Oi,null),b(t,ls),b(t,ei),b(ei,os),b(ei,Ei),b(ei,Ai),j(qt,Ai,null),Zt=!0},p(Ie,De){var ze;(!Zt||De&4)&&r!==(r=Ie[2].id+"")&&re(a,r),(!Zt||De&4)&&g!==(g=Ie[2].status+"")&&re(_,g),(!Zt||De&4)&&Q(h,"label-danger",Ie[2].status>=400),(!Zt||De&4)&&$!==($=((ze=Ie[2].method)==null?void 0:ze.toUpperCase())+"")&&re(O,$),(!Zt||De&4)&&W!==(W=Ie[2].auth+"")&&re(Z,W),(!Zt||De&4)&&X!==(X=Ie[2].url+"")&&re(Y,X),R===(R=Fl(Ie))&&U?U.p(Ie,De):(U.d(1),U=R(Ie),U&&(U.c(),U.m(qe,null))),(!Zt||De&4)&&fe!==(fe=Ie[2].remoteIp+"")&&re(ae,fe),(!Zt||De&4)&&$e!==($e=Ie[2].userIp+"")&&re(Ze,$e),(!Zt||De&4)&&ts!==(ts=Ie[2].userAgent+"")&&re(ns,ts);let Ke=ln;ln=Ce(Ie,De),ln===Ke?se[ln].p(Ie,De):(pe(),P(se[Ke],1,1,()=>{se[Ke]=null}),me(),Qe=se[ln],Qe?Qe.p(Ie,De):(Qe=se[ln]=x[ln](Ie),Qe.c()),A(Qe,1),Qe.m(Oi,null));const Ne={};De&4&&(Ne.date=Ie[2].created),qt.$set(Ne)},i(Ie){Zt||(A(Qe),A(qt.$$.fragment,Ie),Zt=!0)},o(Ie){P(Qe),P(qt.$$.fragment,Ie),Zt=!1},d(Ie){Ie&&w(e),U.d(),se[ln].d(),H(qt)}}}function KS(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function JS(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[4]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function ZS(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[JS],header:[KS],default:[YS]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),H(e,s)}}}function GS(n,e,t){let i,s=new Fr;function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){ie[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){We.call(this,n,c)}function f(c){We.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class XS extends ye{constructor(e){super(),ve(this,e,GS,ZS,be,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function QS(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[0],S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function wc(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new PS({props:l}),ie.push(()=>ke(e,"filter",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function Sc(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new Qv({props:l}),ie.push(()=>ke(e,"filter",s)),e.$on("select",n[12]),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function xS(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k=n[3],T,C=n[3],M,$;r=new Da({}),r.$on("refresh",n[7]),d=new _e({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[QS,({uniqueId:I})=>({14:I}),({uniqueId:I})=>I?16384:0]},$$scope:{ctx:n}}}),h=new Uo({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),h.$on("submit",n[9]);let O=wc(n),E=Sc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=B(n[5]),o=D(),q(r.$$.fragment),a=D(),u=v("div"),f=D(),c=v("div"),q(d.$$.fragment),m=D(),q(h.$$.fragment),g=D(),_=v("div"),y=D(),O.c(),T=D(),E.c(),M=Ae(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(_,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(I,L){S(I,e,L),b(e,t),b(t,i),b(i,s),b(s,l),b(t,o),j(r,t,null),b(t,a),b(t,u),b(t,f),b(t,c),j(d,c,null),b(e,m),j(h,e,null),b(e,g),b(e,_),b(e,y),O.m(e,null),S(I,T,L),E.m(I,L),S(I,M,L),$=!0},p(I,L){(!$||L&32)&&re(l,I[5]);const N={};L&49153&&(N.$$scope={dirty:L,ctx:I}),d.$set(N);const F={};L&4&&(F.value=I[2]),h.$set(F),L&8&&be(k,k=I[3])?(pe(),P(O,1,1,G),me(),O=wc(I),O.c(),A(O,1),O.m(e,null)):O.p(I,L),L&8&&be(C,C=I[3])?(pe(),P(E,1,1,G),me(),E=Sc(I),E.c(),A(E,1),E.m(M.parentNode,M)):E.p(I,L)},i(I){$||(A(r.$$.fragment,I),A(d.$$.fragment,I),A(h.$$.fragment,I),A(O),A(E),$=!0)},o(I){P(r.$$.fragment,I),P(d.$$.fragment,I),P(h.$$.fragment,I),P(O),P(E),$=!1},d(I){I&&w(e),H(r),H(d),H(h),O.d(I),I&&w(T),I&&w(M),E.d(I)}}}function e3(n){let e,t,i,s;e=new kn({props:{$$slots:{default:[xS]},$$scope:{ctx:n}}});let l={};return i=new XS({props:l}),n[13](i),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(o,r){j(e,o,r),S(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&w(t),n[13](null),H(i,o)}}}const Tc="includeAdminLogs";function t3(n,e,t){var y;let i,s;Je(n,St,k=>t(5,s=k)),Yt(St,s="Request logs",s);let l,o="",r=((y=window.localStorage)==null?void 0:y.getItem(Tc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function c(){r=this.checked,t(0,r)}const d=k=>t(2,o=k.detail);function m(k){o=k,t(2,o)}function h(k){o=k,t(2,o)}const g=k=>l==null?void 0:l.show(k==null?void 0:k.detail);function _(k){ie[k?"unshift":"push"](()=>{l=k,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(Tc,r<<0)},[r,l,o,a,i,s,u,f,c,d,m,h,g,_]}class n3 extends ye{constructor(e){super(),ve(this,e,t3,e3,be,{})}}const es=Pn([]),Si=Pn({}),Po=Pn(!1);function i3(n){es.update(e=>{const t=V.findByKey(e,"id",n);return t?Si.set(t):e.length&&Si.set(e[0]),e})}function s3(n){es.update(e=>(V.removeByKey(e,"id",n.id),Si.update(t=>t.id===n.id?e[0]:t),e))}async function eb(n=null){Po.set(!0);try{let e=await he.collections.getFullList(200,{sort:"+created"});e=V.sortCollections(e),es.set(e);const t=n&&V.findByKey(e,"id",n);t?Si.set(t):e.length&&Si.set(e[0])}catch(e){he.errorResponseHandler(e)}Po.set(!1)}const Qa=Pn({});function un(n,e,t){Qa.set({text:n,yesCallback:e,noCallback:t})}function tb(){Qa.set({})}function Cc(n){let e,t,i,s;const l=n[14].default,o=Nt(l,n,n[13],null);return{c(){e=v("div"),o&&o.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(r,a){S(r,e,a),o&&o.m(e,null),s=!0},p(r,a){o&&o.p&&(!s||a&8192)&&Rt(o,l,r,r[13],s?Ft(l,r[13],a,null):jt(r[13]),null),(!s||a&2)&&p(e,"class",r[1]),(!s||a&3)&&Q(e,"active",r[0])},i(r){s||(A(o,r),r&&st(()=>{i&&i.end(1),t=Wh(e,En,{duration:150,y:-5}),t.start()}),s=!0)},o(r){P(o,r),t&&t.invalidate(),r&&(i=Yh(e,En,{duration:150,y:2})),s=!1},d(r){r&&w(e),o&&o.d(r),r&&i&&i.end()}}}function l3(n){let e,t,i,s,l=n[0]&&Cc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container")},m(o,r){S(o,e,r),l&&l.m(e,null),n[15](e),t=!0,i||(s=[K(window,"click",n[3]),K(window,"keydown",n[4]),K(window,"focusin",n[5])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Cc(o),l.c(),A(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[15](null),i=!1,Le(s)}}}function o3(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f,c;const d=$t();function m(){t(0,o=!1)}function h(){t(0,o=!0)}function g(){o?m():h()}function _(I){return!f||I.classList.contains(a)||(c==null?void 0:c.contains(I))&&!f.contains(I)||f.contains(I)&&I.closest&&I.closest("."+a)}function y(I){(!o||_(I.target))&&(I.preventDefault(),I.stopPropagation(),g())}function k(I){(I.code==="Enter"||I.code==="Space")&&(!o||_(I.target))&&(I.preventDefault(),I.stopPropagation(),g())}function T(I){o&&!(f!=null&&f.contains(I.target))&&!(c!=null&&c.contains(I.target))&&m()}function C(I){o&&r&&I.code==="Escape"&&(I.preventDefault(),m())}function M(I){return T(I)}function $(I){O(),t(12,c=I||(f==null?void 0:f.parentNode)),c&&(f==null||f.addEventListener("click",y),c.addEventListener("click",y),c.addEventListener("keydown",k))}function O(){c&&(f==null||f.removeEventListener("click",y),c.removeEventListener("click",y),c.removeEventListener("keydown",k))}nn(()=>($(),()=>O()));function E(I){ie[I?"unshift":"push"](()=>{f=I,t(2,f)})}return n.$$set=I=>{"trigger"in I&&t(6,l=I.trigger),"active"in I&&t(0,o=I.active),"escClose"in I&&t(7,r=I.escClose),"closableClass"in I&&t(8,a=I.closableClass),"class"in I&&t(1,u=I.class),"$$scope"in I&&t(13,s=I.$$scope)},n.$$.update=()=>{var I,L;n.$$.dirty&68&&f&&$(l),n.$$.dirty&4097&&(o?((I=c==null?void 0:c.classList)==null||I.add("active"),d("show")):((L=c==null?void 0:c.classList)==null||L.remove("active"),d("hide")))},[o,u,f,T,C,M,l,r,a,m,h,g,c,s,i,E]}class Qn extends ye{constructor(e){super(),ve(this,e,o3,l3,be,{trigger:6,active:0,escClose:7,closableClass:8,class:1,hide:9,show:10,toggle:11})}get hide(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}get toggle(){return this.$$.ctx[11]}}const r3=n=>({active:n&1}),$c=n=>({active:n[0]});function Mc(n){let e,t,i;const s=n[15].default,l=Nt(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Rt(l,s,o,o[14],i?Ft(s,o[14],r,null):jt(o[14]),null)},i(o){i||(A(l,o),o&&st(()=>{t||(t=Be(e,Ht,{duration:150},!0)),t.run(1)}),i=!0)},o(o){P(l,o),o&&(t||(t=Be(e,Ht,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function a3(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Nt(a,n,n[14],$c);let f=n[0]&&Mc(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=D(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){S(c,e,d),b(e,t),u&&u.m(t,null),b(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[K(t,"click",pt(n[17])),K(t,"drop",pt(n[18])),K(t,"dragstart",n[19]),K(t,"dragenter",n[20]),K(t,"dragleave",n[21]),K(t,"dragover",pt(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&Rt(u,a,c,c[14],l?Ft(a,c[14],d,r3):jt(c[14]),$c),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Mc(c),f.c(),A(f,1),f.m(e,null)):f&&(pe(),P(f,1,1,()=>{f=null}),me()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){P(u,c),P(f),l=!1},d(c){c&&w(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,Le(r)}}}function u3(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=$t();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(){k(),t(0,f=!0),l("expand")}function _(){t(0,f=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),f?_():g()}function k(){if(d&&o.closest(".accordions")){const L=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const N of L)N.click()}}nn(()=>()=>clearTimeout(r));function T(L){We.call(this,n,L)}const C=()=>c&&y(),M=L=>{u&&(t(7,m=!1),k(),l("drop",L))},$=L=>u&&l("dragstart",L),O=L=>{u&&(t(7,m=!0),l("dragenter",L))},E=L=>{u&&(t(7,m=!1),l("dragleave",L))};function I(L){ie[L?"unshift":"push"](()=>{o=L,t(6,o)})}return n.$$set=L=>{"class"in L&&t(1,a=L.class),"draggable"in L&&t(2,u=L.draggable),"active"in L&&t(0,f=L.active),"interactive"in L&&t(3,c=L.interactive),"single"in L&&t(9,d=L.single),"$$scope"in L&&t(14,s=L.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o==null||o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&(o==null||o.scrollIntoView({behavior:"smooth",block:"nearest"}))},200)))},[f,a,u,c,y,k,o,m,l,d,h,g,_,r,s,i,T,C,M,$,O,E,I]}class ys extends ye{constructor(e){super(),ve(this,e,u3,a3,be,{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]}}const f3=n=>({}),Dc=n=>({});function Oc(n,e,t){const i=n.slice();return i[46]=e[t],i}const c3=n=>({}),Ec=n=>({});function Ac(n,e,t){const i=n.slice();return i[46]=e[t],i[50]=t,i}function Ic(n){let e,t,i;return{c(){e=v("div"),t=B(n[2]),i=D(),p(e,"class","block txt-placeholder"),Q(e,"link-hint",!n[5])},m(s,l){S(s,e,l),b(e,t),b(e,i)},p(s,l){l[0]&4&&re(t,s[2]),l[0]&32&&Q(e,"link-hint",!s[5])},d(s){s&&w(e)}}}function d3(n){let e,t=n[46]+"",i;return{c(){e=v("span"),i=B(t),p(e,"class","txt")},m(s,l){S(s,e,l),b(e,i)},p(s,l){l[0]&1&&t!==(t=s[46]+"")&&re(i,t)},i:G,o:G,d(s){s&&w(e)}}}function p3(n){let e,t,i;const s=[{item:n[46]},n[9]];var l=n[8];function o(r){let a={};for(let u=0;u{H(f,1)}),me()}l?(e=Kt(l,o()),q(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Pc(n){let e,t,i;function s(){return n[34](n[46])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[Pe(Ye.call(null,e,"Clear")),K(e,"click",yn(pt(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Le(i)}}}function Lc(n){let e,t,i,s,l,o;const r=[p3,d3],a=[];function u(c,d){return c[8]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&Pc(n);return{c(){e=v("div"),i.c(),s=D(),f&&f.c(),l=D(),p(e,"class","option")},m(c,d){S(c,e,d),a[t].m(e,null),b(e,s),f&&f.m(e,null),b(e,l),o=!0},p(c,d){let m=t;t=u(c),t===m?a[t].p(c,d):(pe(),P(a[m],1,1,()=>{a[m]=null}),me(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=Pc(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(A(i),o=!0)},o(c){P(i),o=!1},d(c){c&&w(e),a[t].d(),f&&f.d()}}}function Nc(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[18],$$slots:{default:[g3]},$$scope:{ctx:n}};return e=new Qn({props:i}),n[39](e),e.$on("show",n[24]),e.$on("hide",n[40]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&262144&&(o.trigger=s[18]),l[0]&1612938|l[1]&2048&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[39](null),H(e,s)}}}function Fc(n){let e,t,i,s,l,o,r,a,u=n[15].length&&Rc(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=D(),l=v("input"),o=D(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){S(f,e,c),b(e,t),b(t,i),b(t,s),b(t,l),de(l,n[15]),b(t,o),u&&u.m(t,null),l.focus(),r||(a=K(l,"input",n[36]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&32768&&l.value!==f[15]&&de(l,f[15]),f[15].length?u?u.p(f,c):(u=Rc(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&w(e),u&&u.d(),r=!1,a()}}}function Rc(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent clear"),p(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),b(e,t),i||(s=K(t,"click",yn(pt(n[21]))),i=!0)},p:G,d(l){l&&w(e),i=!1,s()}}}function jc(n){let e,t=n[1]&&Hc(n);return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=Hc(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Hc(n){let e,t;return{c(){e=v("div"),t=B(n[1]),p(e,"class","txt-missing")},m(i,s){S(i,e,s),b(e,t)},p(i,s){s[0]&2&&re(t,i[1])},d(i){i&&w(e)}}}function m3(n){let e=n[46]+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&1048576&&e!==(e=i[46]+"")&&re(t,e)},i:G,o:G,d(i){i&&w(t)}}}function h3(n){let e,t,i;const s=[{item:n[46]},n[11]];var l=n[10];function o(r){let a={};for(let u=0;u{H(f,1)}),me()}l?(e=Kt(l,o()),q(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function qc(n){let e,t,i,s,l,o,r;const a=[h3,m3],u=[];function f(m,h){return m[10]?0:1}t=f(n),i=u[t]=a[t](n);function c(...m){return n[37](n[46],...m)}function d(...m){return n[38](n[46],...m)}return{c(){e=v("div"),i.c(),s=D(),p(e,"tabindex","0"),p(e,"class","dropdown-item option"),Q(e,"closable",n[7]),Q(e,"selected",n[19](n[46]))},m(m,h){S(m,e,h),u[t].m(e,null),b(e,s),l=!0,o||(r=[K(e,"click",c),K(e,"keydown",d)],o=!0)},p(m,h){n=m;let g=t;t=f(n),t===g?u[t].p(n,h):(pe(),P(u[g],1,1,()=>{u[g]=null}),me(),i=u[t],i?i.p(n,h):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||h[0]&128)&&Q(e,"closable",n[7]),(!l||h[0]&1572864)&&Q(e,"selected",n[19](n[46]))},i(m){l||(A(i),l=!0)},o(m){P(i),l=!1},d(m){m&&w(e),u[t].d(),o=!1,Le(r)}}}function g3(n){let e,t,i,s,l,o=n[12]&&Fc(n);const r=n[33].beforeOptions,a=Nt(r,n,n[42],Ec);let u=n[20],f=[];for(let g=0;gP(f[g],1,1,()=>{f[g]=null});let d=null;u.length||(d=jc(n));const m=n[33].afterOptions,h=Nt(m,n,n[42],Dc);return{c(){o&&o.c(),e=D(),a&&a.c(),t=D(),i=v("div");for(let g=0;gP(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=Ic(n));let c=!n[5]&&Nc(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),me()):c?(c.p(d,m),m[0]&32&&A(c,1)):(c=Nc(d),c.c(),A(c,1),c.m(e,null)),(!o||m[0]&8192&&l!==(l="select "+d[13]))&&p(e,"class",l),(!o||m[0]&8208)&&Q(e,"multiple",d[4]),(!o||m[0]&8224)&&Q(e,"disabled",d[5])},i(d){if(!o){for(let m=0;mje(Me,oe))||[]}function Y(ae,oe){ae.preventDefault(),g&&d?Z(oe):W(oe)}function le(ae,oe){(ae.code==="Enter"||ae.code==="Space")&&Y(ae,oe)}function He(){z(),setTimeout(()=>{const ae=L==null?void 0:L.querySelector(".dropdown-item.option.selected");ae&&(ae.focus(),ae.scrollIntoView({block:"nearest"}))},0)}function Re(ae){ae.stopPropagation(),!m&&(E==null||E.toggle())}nn(()=>{const ae=document.querySelectorAll(`label[for="${r}"]`);for(const oe of ae)oe.addEventListener("click",Re);return()=>{for(const oe of ae)oe.removeEventListener("click",Re)}});const Fe=ae=>F(ae);function qe(ae){ie[ae?"unshift":"push"](()=>{N=ae,t(18,N)})}function ge(){I=this.value,t(15,I)}const Se=(ae,oe)=>Y(oe,ae),Ue=(ae,oe)=>le(oe,ae);function lt(ae){ie[ae?"unshift":"push"](()=>{E=ae,t(16,E)})}function ue(ae){We.call(this,n,ae)}function fe(ae){ie[ae?"unshift":"push"](()=>{L=ae,t(17,L)})}return n.$$set=ae=>{"id"in ae&&t(25,r=ae.id),"noOptionsText"in ae&&t(1,a=ae.noOptionsText),"selectPlaceholder"in ae&&t(2,u=ae.selectPlaceholder),"searchPlaceholder"in ae&&t(3,f=ae.searchPlaceholder),"items"in ae&&t(26,c=ae.items),"multiple"in ae&&t(4,d=ae.multiple),"disabled"in ae&&t(5,m=ae.disabled),"selected"in ae&&t(0,h=ae.selected),"toggle"in ae&&t(6,g=ae.toggle),"closable"in ae&&t(7,_=ae.closable),"labelComponent"in ae&&t(8,y=ae.labelComponent),"labelComponentProps"in ae&&t(9,k=ae.labelComponentProps),"optionComponent"in ae&&t(10,T=ae.optionComponent),"optionComponentProps"in ae&&t(11,C=ae.optionComponentProps),"searchable"in ae&&t(12,M=ae.searchable),"searchFunc"in ae&&t(27,$=ae.searchFunc),"class"in ae&&t(13,O=ae.class),"$$scope"in ae&&t(42,o=ae.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&67108864&&c&&(ee(),z()),n.$$.dirty[0]&67141632&&t(20,i=X(c,I)),n.$$.dirty[0]&1&&t(19,s=function(ae){const oe=V.toArray(h);return V.inArray(oe,ae)})},[h,a,u,f,d,m,g,_,y,k,T,C,M,O,F,I,E,L,N,s,i,z,Y,le,He,r,c,$,W,Z,ne,J,te,l,Fe,qe,ge,Se,Ue,lt,ue,fe,o]}class xa extends ye{constructor(e){super(),ve(this,e,v3,_3,be,{id:25,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:26,multiple:4,disabled:5,selected:0,toggle:6,closable:7,labelComponent:8,labelComponentProps:9,optionComponent:10,optionComponentProps:11,searchable:12,searchFunc:27,class:13,deselectItem:14,selectItem:28,toggleItem:29,reset:30,showDropdown:31,hideDropdown:32},null,[-1,-1])}get deselectItem(){return this.$$.ctx[14]}get selectItem(){return this.$$.ctx[28]}get toggleItem(){return this.$$.ctx[29]}get reset(){return this.$$.ctx[30]}get showDropdown(){return this.$$.ctx[31]}get hideDropdown(){return this.$$.ctx[32]}}function Vc(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&w(e)}}}function y3(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&Vc(n);return{c(){l&&l.c(),e=D(),t=v("span"),s=B(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),b(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=Vc(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&re(s,i)},i:G,o:G,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function k3(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class zc extends ye{constructor(e){super(),ve(this,e,k3,y3,be,{item:0})}}const w3=n=>({}),Bc=n=>({});function S3(n){let e;const t=n[8].afterOptions,i=Nt(t,n,n[12],Bc);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&Rt(i,t,s,s[12],e?Ft(t,s[12],l,w3):jt(s[12]),Bc)},i(s){e||(A(i,s),e=!0)},o(s){P(i,s),e=!1},d(s){i&&i.d(s)}}}function T3(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[S3]},$$scope:{ctx:n}};for(let r=0;rke(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){q(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&62?sn(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Xn(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],we(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function C3(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=At(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=zc}=e,{optionComponent:c=zc}=e,{selectionKey:d="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function h(T){T=V.toArray(T,!0);let C=[];for(let M of T){const $=V.findByKey(r,d,M);$&&C.push($)}T.length&&!C.length||t(0,u=a?C:C[0])}async function g(T){let C=V.toArray(T,!0).map(M=>M[d]);r.length&&t(6,m=a?C:C[0])}function _(T){u=T,t(0,u)}function y(T){We.call(this,n,T)}function k(T){We.call(this,n,T)}return n.$$set=T=>{e=Xe(Xe({},e),Gn(T)),t(5,s=At(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,s,m,d,l,_,y,k,o]}class Ls extends ye{constructor(e){super(),ve(this,e,C3,T3,be,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function $3(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{items:n[2]},n[3]];function l(r){n[4](r)}let o={};for(let r=0;rke(e,"keyOfSelected",l)),{c(){q(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&14?sn(s,[a&2&&{class:"field-type-select "+r[1]},a&4&&{items:r[2]},a&8&&Xn(r[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=r[0],we(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function M3(n,e,t){const i=["value","class"];let s=At(e,i),{value:l="text"}=e,{class:o=""}=e;const r=[{label:"Plain text",value:"text",icon:V.getFieldTypeIcon("text")},{label:"Rich editor",value:"editor",icon:V.getFieldTypeIcon("editor")},{label:"Number",value:"number",icon:V.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:V.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:V.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:V.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:V.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:V.getFieldTypeIcon("select")},{label:"File",value:"file",icon:V.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:V.getFieldTypeIcon("relation")},{label:"JSON",value:"json",icon:V.getFieldTypeIcon("json")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=Xe(Xe({},e),Gn(u)),t(3,s=At(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,o=u.class)},[l,o,r,s,a]}class D3 extends ye{constructor(e){super(),ve(this,e,M3,$3,be,{value:0,class:1})}}function O3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min length"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].min&&de(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function E3(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max length"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min",r=n[0].min||0)},m(f,c){S(f,e,c),b(e,t),S(f,s,c),S(f,l,c),de(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&o!==(o=f[5])&&p(l,"id",o),c&1&&r!==(r=f[0].min||0)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].max&&de(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function A3(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Regex pattern"),s=D(),l=v("input"),r=D(),a=v("div"),a.innerHTML="Valid Go regular expression, eg. ^\\w+$.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),de(l,n[0].pattern),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].pattern&&de(l,c[0].pattern)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function I3(n){let e,t,i,s,l,o,r,a,u,f;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[O3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[E3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[A3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){S(c,e,d),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),f=!0},p(c,[d]){const m={};d&2&&(m.name="schema."+c[1]+".options.min"),d&97&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const h={};d&2&&(h.name="schema."+c[1]+".options.max"),d&97&&(h.$$scope={dirty:d,ctx:c}),o.$set(h);const g={};d&2&&(g.name="schema."+c[1]+".options.pattern"),d&97&&(g.$$scope={dirty:d,ctx:c}),u.$set(g)},i(c){f||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){P(i.$$.fragment,c),P(o.$$.fragment,c),P(u.$$.fragment,c),f=!1},d(c){c&&w(e),H(i),H(o),H(u)}}}function P3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=ht(this.value),t(0,s)}function o(){s.max=ht(this.value),t(0,s)}function r(){s.pattern=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"options"in a&&t(0,s=a.options)},[s,i,l,o,r]}class L3 extends ye{constructor(e){super(),ve(this,e,P3,I3,be,{key:1,options:0})}}function N3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min"),s=D(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].min&&de(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function F3(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max"),s=D(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"min",r=n[0].min)},m(f,c){S(f,e,c),b(e,t),S(f,s,c),S(f,l,c),de(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&o!==(o=f[4])&&p(l,"id",o),c&1&&r!==(r=f[0].min)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].max&&de(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function R3(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[N3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[F3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function j3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=ht(this.value),t(0,s)}function o(){s.max=ht(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class H3 extends ye{constructor(e){super(),ve(this,e,j3,R3,be,{key:1,options:0})}}function q3(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class V3 extends ye{constructor(e){super(),ve(this,e,q3,null,be,{key:0,options:1})}}function z3(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],o={};for(let r=0;r{t(0,o=V.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=Xe(Xe({},e),Gn(u)),t(3,l=At(e,s)),"value"in u&&t(0,o=u.value),"separator"in u&&t(1,r=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(o||[]).join(", "))},[o,r,i,l,a]}class Ns extends ye{constructor(e){super(),ve(this,e,B3,z3,be,{value:0,separator:1})}}function U3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(_){n[2](_)}let g={id:n[4],disabled:!V.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(g.value=n[0].exceptDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(_,y){S(_,e,y),b(e,t),b(e,i),b(e,s),S(_,o,y),j(r,_,y),S(_,u,y),S(_,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`List of domains that are NOT allowed. This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&16&&l!==(l=_[4]))&&p(e,"for",l);const k={};y&16&&(k.id=_[4]),y&1&&(k.disabled=!V.isEmpty(_[0].onlyDomains)),!a&&y&1&&(a=!0,k.value=_[0].exceptDomains,we(()=>a=!1)),r.$set(k)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){P(r.$$.fragment,_),c=!1},d(_){_&&w(e),_&&w(o),H(r,_),_&&w(u),_&&w(f),d=!1,m()}}}function W3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(_){n[3](_)}let g={id:n[4]+".options.onlyDomains",disabled:!V.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(g.value=n[0].onlyDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(_,y){S(_,e,y),b(e,t),b(e,i),b(e,s),S(_,o,y),j(r,_,y),S(_,u,y),S(_,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`List of domains that are ONLY allowed. - This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&16&&l!==(l=_[4]+".options.onlyDomains"))&&p(e,"for",l);const k={};y&16&&(k.id=_[4]+".options.onlyDomains"),y&1&&(k.disabled=!V.isEmpty(_[0].exceptDomains)),!a&&y&1&&(a=!0,k.value=_[0].onlyDomains,we(()=>a=!1)),r.$set(k)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){P(r.$$.fragment,_),c=!1},d(_){_&&w(e),_&&w(o),H(r,_),_&&w(u),_&&w(f),d=!1,m()}}}function Y3(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[U3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[W3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function K3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class nb extends ye{constructor(e){super(),ve(this,e,K3,Y3,be,{key:1,options:0})}}function J3(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new nb({props:r}),ie.push(()=>ke(e,"key",l)),ie.push(()=>ke(e,"options",o)),{c(){q(e.$$.fragment)},m(a,u){j(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],we(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],we(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){H(e,a)}}}function Z3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class G3 extends ye{constructor(e){super(),ve(this,e,Z3,J3,be,{key:0,options:1})}}function X3(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class Q3 extends ye{constructor(e){super(),ve(this,e,X3,null,be,{key:0,options:1})}}var wr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ks={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",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},_l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%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},on=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Cn=function(n){return n===!0?1:0};function Uc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Sr=function(n){return n instanceof Array?n:[n]};function Gt(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function at(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 io(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function ib(n,e){if(e(n))return n;if(n.parentNode)return ib(n.parentNode,e)}function so(n,e){var t=at("div","numInputWrapper"),i=at("input","numInput "+n),s=at("span","arrowUp"),l=at("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function mn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Tr=function(){},Lo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},x3={D:Tr,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*Cn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Tr,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:Tr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},Vi={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})"},ol={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[ol.w(n,e,t)]},F:function(n,e,t){return Lo(ol.n(n,e,t)-1,!1,e)},G:function(n,e,t){return on(ol.h(n,e,t))},H:function(n){return on(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[Cn(n.getHours()>11)]},M:function(n,e){return Lo(n.getMonth(),!0,e)},S:function(n){return on(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return on(n.getFullYear(),4)},d:function(n){return on(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return on(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return on(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)}},sb=function(n){var e=n.config,t=e===void 0?ks:e,i=n.l10n,s=i===void 0?_l:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,m){return ol[c]&&m[d-1]!=="\\"?ol[c](r,f,t):c!=="\\"?c:""}).join("")}},ua=function(n){var e=n.config,t=e===void 0?ks:e,i=n.l10n,s=i===void 0?_l:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||ks).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var h=void 0,g=[],_=0,y=0,k="";_Math.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),x=$r(t.config);U.setHours(x.hours,x.minutes,x.seconds,U.getMilliseconds()),t.selectedDates=[U],t.latestSelectedDateObj=U}R!==void 0&&R.type!=="blur"&&Fl(R);var se=t._input.value;c(),qt(),t._input.value!==se&&t._debouncedChange()}function u(R,U){return R%12+12*Cn(U===t.l10n.amPM[1])}function f(R){switch(R%24){case 0:case 12:return 12;default:return R%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var R=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,U=(parseInt(t.minuteElement.value,10)||0)%60,x=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(R=u(R,t.amPM.textContent));var se=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&hn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Ce=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&hn(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 Ee=Cr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Ie=Cr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),De=Cr(R,U,x);if(De>Ie&&De=12)]),t.secondElement!==void 0&&(t.secondElement.value=on(x)))}function h(R){var U=mn(R),x=parseInt(U.value)+(R.delta||0);(x/1e3>1||R.key==="Enter"&&!/[^\d]/.test(x.toString()))&&ge(x)}function g(R,U,x,se){if(U instanceof Array)return U.forEach(function(Ce){return g(R,Ce,x,se)});if(R instanceof Array)return R.forEach(function(Ce){return g(Ce,U,x,se)});R.addEventListener(U,x,se),t._handlers.push({remove:function(){return R.removeEventListener(U,x,se)}})}function _(){Qe("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(x){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+x+"]"),function(se){return g(se,"click",t[x])})}),t.isMobile){ss();return}var R=Uc(ae,50);if(t._debouncedChange=Uc(_,iT),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(x){t.config.mode==="range"&&fe(mn(x))}),g(t._input,"keydown",ue),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",ue),!t.config.inline&&!t.config.static&&g(window,"resize",R),window.ontouchstart!==void 0?g(window.document,"touchstart",qe):g(window.document,"mousedown",qe),g(window.document,"focus",qe,{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",Zt),g(t.monthNav,["keyup","increment"],h),g(t.daysContainer,"click",xn)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var U=function(x){return mn(x).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"],U),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(x){a(x)})}t.config.allowInput&&g(t._input,"blur",lt)}function k(R,U){var x=R!==void 0?t.parseDate(R):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(R);var Ce=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&&(!Ce&&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 Ee=at("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Ee,t.element),Ee.appendChild(t.element),t.altInput&&Ee.appendChild(t.altInput),Ee.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function $(R,U,x,se){var Ce=Se(U,!0),Ee=at("span",R,U.getDate().toString());return Ee.dateObj=U,Ee.$i=se,Ee.setAttribute("aria-label",t.formatDate(U,t.config.ariaDateFormat)),R.indexOf("hidden")===-1&&hn(U,t.now)===0&&(t.todayDateElem=Ee,Ee.classList.add("today"),Ee.setAttribute("aria-current","date")),Ce?(Ee.tabIndex=-1,ei(U)&&(Ee.classList.add("selected"),t.selectedDateElem=Ee,t.config.mode==="range"&&(Gt(Ee,"startRange",t.selectedDates[0]&&hn(U,t.selectedDates[0],!0)===0),Gt(Ee,"endRange",t.selectedDates[1]&&hn(U,t.selectedDates[1],!0)===0),R==="nextMonthDay"&&Ee.classList.add("inRange")))):Ee.classList.add("flatpickr-disabled"),t.config.mode==="range"&&os(U)&&!ei(U)&&Ee.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&R!=="prevMonthDay"&&se%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(U)+""),Qe("onDayCreate",Ee),Ee}function O(R){R.focus(),t.config.mode==="range"&&fe(R)}function E(R){for(var U=R>0?0:t.config.showMonths-1,x=R>0?t.config.showMonths:-1,se=U;se!=x;se+=R)for(var Ce=t.daysContainer.children[se],Ee=R>0?0:Ce.children.length-1,Ie=R>0?Ce.children.length:-1,De=Ee;De!=Ie;De+=R){var Ke=Ce.children[De];if(Ke.className.indexOf("hidden")===-1&&Se(Ke.dateObj))return Ke}}function I(R,U){for(var x=R.className.indexOf("Month")===-1?R.dateObj.getMonth():t.currentMonth,se=U>0?t.config.showMonths:-1,Ce=U>0?1:-1,Ee=x-t.currentMonth;Ee!=se;Ee+=Ce)for(var Ie=t.daysContainer.children[Ee],De=x-t.currentMonth===Ee?R.$i+U:U<0?Ie.children.length-1:0,Ke=Ie.children.length,Ne=De;Ne>=0&&Ne0?Ke:-1);Ne+=Ce){var ze=Ie.children[Ne];if(ze.className.indexOf("hidden")===-1&&Se(ze.dateObj)&&Math.abs(R.$i-Ne)>=Math.abs(U))return O(ze)}t.changeMonth(Ce),L(E(Ce),0)}function L(R,U){var x=l(),se=Ue(x||document.body),Ce=R!==void 0?R:se?x:t.selectedDateElem!==void 0&&Ue(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ue(t.todayDateElem)?t.todayDateElem:E(U>0?1:-1);Ce===void 0?t._input.focus():se?I(Ce,U):O(Ce)}function N(R,U){for(var x=(new Date(R,U,1).getDay()-t.l10n.firstDayOfWeek+7)%7,se=t.utils.getDaysInMonth((U-1+12)%12,R),Ce=t.utils.getDaysInMonth(U,R),Ee=window.document.createDocumentFragment(),Ie=t.config.showMonths>1,De=Ie?"prevMonthDay hidden":"prevMonthDay",Ke=Ie?"nextMonthDay hidden":"nextMonthDay",Ne=se+1-x,ze=0;Ne<=se;Ne++,ze++)Ee.appendChild($("flatpickr-day "+De,new Date(R,U-1,Ne),Ne,ze));for(Ne=1;Ne<=Ce;Ne++,ze++)Ee.appendChild($("flatpickr-day",new Date(R,U,Ne),Ne,ze));for(var mt=Ce+1;mt<=42-x&&(t.config.showMonths===1||ze%7!==0);mt++,ze++)Ee.appendChild($("flatpickr-day "+Ke,new Date(R,U+1,mt%Ce),mt,ze));var Un=at("div","dayContainer");return Un.appendChild(Ee),Un}function F(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var R=document.createDocumentFragment(),U=0;U1||t.config.monthSelectorType!=="dropdown")){var R=function(se){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&set.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var U=0;U<12;U++)if(R(U)){var x=at("option","flatpickr-monthDropdown-month");x.value=new Date(t.currentYear,U).getMonth().toString(),x.textContent=Lo(U,t.config.shorthandCurrentMonth,t.l10n),x.tabIndex=-1,t.currentMonth===U&&(x.selected=!0),t.monthsDropdownContainer.appendChild(x)}}}function Z(){var R=at("div","flatpickr-month"),U=window.document.createDocumentFragment(),x;t.config.showMonths>1||t.config.monthSelectorType==="static"?x=at("span","cur-month"):(t.monthsDropdownContainer=at("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Ie){var De=mn(Ie),Ke=parseInt(De.value,10);t.changeMonth(Ke-t.currentMonth),Qe("onMonthChange")}),W(),x=t.monthsDropdownContainer);var se=so("cur-year",{tabindex:"-1"}),Ce=se.getElementsByTagName("input")[0];Ce.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Ce.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Ce.setAttribute("max",t.config.maxDate.getFullYear().toString()),Ce.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Ee=at("div","flatpickr-current-month");return Ee.appendChild(x),Ee.appendChild(se),U.appendChild(Ee),R.appendChild(U),{container:R,yearElement:Ce,monthElement:x}}function ne(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var R=t.config.showMonths;R--;){var U=Z();t.yearElements.push(U.yearElement),t.monthElements.push(U.monthElement),t.monthNav.appendChild(U.container)}t.monthNav.appendChild(t.nextMonthNav)}function J(){return t.monthNav=at("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=at("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=at("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,ne(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(R){t.__hidePrevMonthArrow!==R&&(Gt(t.prevMonthNav,"flatpickr-disabled",R),t.__hidePrevMonthArrow=R)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(R){t.__hideNextMonthArrow!==R&&(Gt(t.nextMonthNav,"flatpickr-disabled",R),t.__hideNextMonthArrow=R)}}),t.currentYearElement=t.yearElements[0],Ei(),t.monthNav}function te(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var R=$r(t.config);t.timeContainer=at("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var U=at("span","flatpickr-time-separator",":"),x=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=x.getElementsByTagName("input")[0];var se=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=se.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=on(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?R.hours:f(R.hours)),t.minuteElement.value=on(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():R.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(x),t.timeContainer.appendChild(U),t.timeContainer.appendChild(se),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Ce=so("flatpickr-second");t.secondElement=Ce.getElementsByTagName("input")[0],t.secondElement.value=on(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():R.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(at("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Ce)}return t.config.time_24hr||(t.amPM=at("span","flatpickr-am-pm",t.l10n.amPM[Cn((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?io(t.weekdayContainer):t.weekdayContainer=at("div","flatpickr-weekdays");for(var R=t.config.showMonths;R--;){var U=at("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(U)}return z(),t.weekdayContainer}function z(){if(t.weekdayContainer){var R=t.l10n.firstDayOfWeek,U=Wc(t.l10n.weekdays.shorthand);R>0&&Ra=!1)),r.$set(k)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){P(r.$$.fragment,_),c=!1},d(_){_&&w(e),_&&w(o),H(r,_),_&&w(u),_&&w(f),d=!1,m()}}}function Y3(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[U3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[W3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function K3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class nb extends ye{constructor(e){super(),ve(this,e,K3,Y3,be,{key:1,options:0})}}function J3(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new nb({props:r}),ie.push(()=>ke(e,"key",l)),ie.push(()=>ke(e,"options",o)),{c(){q(e.$$.fragment)},m(a,u){j(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],we(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],we(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){H(e,a)}}}function Z3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class G3 extends ye{constructor(e){super(),ve(this,e,Z3,J3,be,{key:0,options:1})}}function X3(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class Q3 extends ye{constructor(e){super(),ve(this,e,X3,null,be,{key:0,options:1})}}var wr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ks={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",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},_l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%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},on=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Cn=function(n){return n===!0?1:0};function Uc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Sr=function(n){return n instanceof Array?n:[n]};function Gt(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function at(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 io(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function ib(n,e){if(e(n))return n;if(n.parentNode)return ib(n.parentNode,e)}function so(n,e){var t=at("div","numInputWrapper"),i=at("input","numInput "+n),s=at("span","arrowUp"),l=at("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function mn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Tr=function(){},Lo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},x3={D:Tr,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*Cn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Tr,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:Tr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},Vi={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})"},ol={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[ol.w(n,e,t)]},F:function(n,e,t){return Lo(ol.n(n,e,t)-1,!1,e)},G:function(n,e,t){return on(ol.h(n,e,t))},H:function(n){return on(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[Cn(n.getHours()>11)]},M:function(n,e){return Lo(n.getMonth(),!0,e)},S:function(n){return on(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return on(n.getFullYear(),4)},d:function(n){return on(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return on(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return on(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)}},sb=function(n){var e=n.config,t=e===void 0?ks:e,i=n.l10n,s=i===void 0?_l:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,m){return ol[c]&&m[d-1]!=="\\"?ol[c](r,f,t):c!=="\\"?c:""}).join("")}},ua=function(n){var e=n.config,t=e===void 0?ks:e,i=n.l10n,s=i===void 0?_l:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||ks).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var h=void 0,g=[],_=0,y=0,k="";_Math.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),x=$r(t.config);U.setHours(x.hours,x.minutes,x.seconds,U.getMilliseconds()),t.selectedDates=[U],t.latestSelectedDateObj=U}R!==void 0&&R.type!=="blur"&&Fl(R);var se=t._input.value;c(),qt(),t._input.value!==se&&t._debouncedChange()}function u(R,U){return R%12+12*Cn(U===t.l10n.amPM[1])}function f(R){switch(R%24){case 0:case 12:return 12;default:return R%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var R=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,U=(parseInt(t.minuteElement.value,10)||0)%60,x=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(R=u(R,t.amPM.textContent));var se=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&hn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Ce=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&hn(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 Ee=Cr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Ie=Cr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),De=Cr(R,U,x);if(De>Ie&&De=12)]),t.secondElement!==void 0&&(t.secondElement.value=on(x)))}function h(R){var U=mn(R),x=parseInt(U.value)+(R.delta||0);(x/1e3>1||R.key==="Enter"&&!/[^\d]/.test(x.toString()))&&ge(x)}function g(R,U,x,se){if(U instanceof Array)return U.forEach(function(Ce){return g(R,Ce,x,se)});if(R instanceof Array)return R.forEach(function(Ce){return g(Ce,U,x,se)});R.addEventListener(U,x,se),t._handlers.push({remove:function(){return R.removeEventListener(U,x,se)}})}function _(){Qe("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(x){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+x+"]"),function(se){return g(se,"click",t[x])})}),t.isMobile){ss();return}var R=Uc(ae,50);if(t._debouncedChange=Uc(_,iT),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(x){t.config.mode==="range"&&fe(mn(x))}),g(t._input,"keydown",ue),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",ue),!t.config.inline&&!t.config.static&&g(window,"resize",R),window.ontouchstart!==void 0?g(window.document,"touchstart",qe):g(window.document,"mousedown",qe),g(window.document,"focus",qe,{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",Zt),g(t.monthNav,["keyup","increment"],h),g(t.daysContainer,"click",xn)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var U=function(x){return mn(x).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"],U),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(x){a(x)})}t.config.allowInput&&g(t._input,"blur",lt)}function k(R,U){var x=R!==void 0?t.parseDate(R):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(R);var Ce=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&&(!Ce&&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 Ee=at("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Ee,t.element),Ee.appendChild(t.element),t.altInput&&Ee.appendChild(t.altInput),Ee.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function $(R,U,x,se){var Ce=Se(U,!0),Ee=at("span",R,U.getDate().toString());return Ee.dateObj=U,Ee.$i=se,Ee.setAttribute("aria-label",t.formatDate(U,t.config.ariaDateFormat)),R.indexOf("hidden")===-1&&hn(U,t.now)===0&&(t.todayDateElem=Ee,Ee.classList.add("today"),Ee.setAttribute("aria-current","date")),Ce?(Ee.tabIndex=-1,ei(U)&&(Ee.classList.add("selected"),t.selectedDateElem=Ee,t.config.mode==="range"&&(Gt(Ee,"startRange",t.selectedDates[0]&&hn(U,t.selectedDates[0],!0)===0),Gt(Ee,"endRange",t.selectedDates[1]&&hn(U,t.selectedDates[1],!0)===0),R==="nextMonthDay"&&Ee.classList.add("inRange")))):Ee.classList.add("flatpickr-disabled"),t.config.mode==="range"&&os(U)&&!ei(U)&&Ee.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&R!=="prevMonthDay"&&se%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(U)+""),Qe("onDayCreate",Ee),Ee}function O(R){R.focus(),t.config.mode==="range"&&fe(R)}function E(R){for(var U=R>0?0:t.config.showMonths-1,x=R>0?t.config.showMonths:-1,se=U;se!=x;se+=R)for(var Ce=t.daysContainer.children[se],Ee=R>0?0:Ce.children.length-1,Ie=R>0?Ce.children.length:-1,De=Ee;De!=Ie;De+=R){var Ke=Ce.children[De];if(Ke.className.indexOf("hidden")===-1&&Se(Ke.dateObj))return Ke}}function I(R,U){for(var x=R.className.indexOf("Month")===-1?R.dateObj.getMonth():t.currentMonth,se=U>0?t.config.showMonths:-1,Ce=U>0?1:-1,Ee=x-t.currentMonth;Ee!=se;Ee+=Ce)for(var Ie=t.daysContainer.children[Ee],De=x-t.currentMonth===Ee?R.$i+U:U<0?Ie.children.length-1:0,Ke=Ie.children.length,Ne=De;Ne>=0&&Ne0?Ke:-1);Ne+=Ce){var ze=Ie.children[Ne];if(ze.className.indexOf("hidden")===-1&&Se(ze.dateObj)&&Math.abs(R.$i-Ne)>=Math.abs(U))return O(ze)}t.changeMonth(Ce),L(E(Ce),0)}function L(R,U){var x=l(),se=Ue(x||document.body),Ce=R!==void 0?R:se?x:t.selectedDateElem!==void 0&&Ue(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ue(t.todayDateElem)?t.todayDateElem:E(U>0?1:-1);Ce===void 0?t._input.focus():se?I(Ce,U):O(Ce)}function N(R,U){for(var x=(new Date(R,U,1).getDay()-t.l10n.firstDayOfWeek+7)%7,se=t.utils.getDaysInMonth((U-1+12)%12,R),Ce=t.utils.getDaysInMonth(U,R),Ee=window.document.createDocumentFragment(),Ie=t.config.showMonths>1,De=Ie?"prevMonthDay hidden":"prevMonthDay",Ke=Ie?"nextMonthDay hidden":"nextMonthDay",Ne=se+1-x,ze=0;Ne<=se;Ne++,ze++)Ee.appendChild($("flatpickr-day "+De,new Date(R,U-1,Ne),Ne,ze));for(Ne=1;Ne<=Ce;Ne++,ze++)Ee.appendChild($("flatpickr-day",new Date(R,U,Ne),Ne,ze));for(var mt=Ce+1;mt<=42-x&&(t.config.showMonths===1||ze%7!==0);mt++,ze++)Ee.appendChild($("flatpickr-day "+Ke,new Date(R,U+1,mt%Ce),mt,ze));var Un=at("div","dayContainer");return Un.appendChild(Ee),Un}function F(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var R=document.createDocumentFragment(),U=0;U1||t.config.monthSelectorType!=="dropdown")){var R=function(se){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&set.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var U=0;U<12;U++)if(R(U)){var x=at("option","flatpickr-monthDropdown-month");x.value=new Date(t.currentYear,U).getMonth().toString(),x.textContent=Lo(U,t.config.shorthandCurrentMonth,t.l10n),x.tabIndex=-1,t.currentMonth===U&&(x.selected=!0),t.monthsDropdownContainer.appendChild(x)}}}function Z(){var R=at("div","flatpickr-month"),U=window.document.createDocumentFragment(),x;t.config.showMonths>1||t.config.monthSelectorType==="static"?x=at("span","cur-month"):(t.monthsDropdownContainer=at("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Ie){var De=mn(Ie),Ke=parseInt(De.value,10);t.changeMonth(Ke-t.currentMonth),Qe("onMonthChange")}),W(),x=t.monthsDropdownContainer);var se=so("cur-year",{tabindex:"-1"}),Ce=se.getElementsByTagName("input")[0];Ce.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Ce.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Ce.setAttribute("max",t.config.maxDate.getFullYear().toString()),Ce.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Ee=at("div","flatpickr-current-month");return Ee.appendChild(x),Ee.appendChild(se),U.appendChild(Ee),R.appendChild(U),{container:R,yearElement:Ce,monthElement:x}}function ne(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var R=t.config.showMonths;R--;){var U=Z();t.yearElements.push(U.yearElement),t.monthElements.push(U.monthElement),t.monthNav.appendChild(U.container)}t.monthNav.appendChild(t.nextMonthNav)}function J(){return t.monthNav=at("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=at("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=at("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,ne(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(R){t.__hidePrevMonthArrow!==R&&(Gt(t.prevMonthNav,"flatpickr-disabled",R),t.__hidePrevMonthArrow=R)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(R){t.__hideNextMonthArrow!==R&&(Gt(t.nextMonthNav,"flatpickr-disabled",R),t.__hideNextMonthArrow=R)}}),t.currentYearElement=t.yearElements[0],Ei(),t.monthNav}function te(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var R=$r(t.config);t.timeContainer=at("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var U=at("span","flatpickr-time-separator",":"),x=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=x.getElementsByTagName("input")[0];var se=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=se.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=on(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?R.hours:f(R.hours)),t.minuteElement.value=on(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():R.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(x),t.timeContainer.appendChild(U),t.timeContainer.appendChild(se),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Ce=so("flatpickr-second");t.secondElement=Ce.getElementsByTagName("input")[0],t.secondElement.value=on(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():R.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(at("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Ce)}return t.config.time_24hr||(t.amPM=at("span","flatpickr-am-pm",t.l10n.amPM[Cn((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?io(t.weekdayContainer):t.weekdayContainer=at("div","flatpickr-weekdays");for(var R=t.config.showMonths;R--;){var U=at("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(U)}return z(),t.weekdayContainer}function z(){if(t.weekdayContainer){var R=t.l10n.firstDayOfWeek,U=Wc(t.l10n.weekdays.shorthand);R>0&&R `+U.join("")+` - `}}function X(){t.calendarContainer.classList.add("hasWeeks");var R=at("div","flatpickr-weekwrapper");R.appendChild(at("span","flatpickr-weekday",t.l10n.weekAbbreviation));var U=at("div","flatpickr-weeks");return R.appendChild(U),{weekWrapper:R,weekNumbers:U}}function Y(R,U){U===void 0&&(U=!0);var x=U?R:R-t.currentMonth;x<0&&t._hidePrevMonthArrow===!0||x>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=x,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Qe("onYearChange"),W()),F(),Qe("onMonthChange"),Ei())}function le(R,U){if(R===void 0&&(R=!0),U===void 0&&(U=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,U===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var x=$r(t.config),se=x.hours,Ce=x.minutes,Ee=x.seconds;m(se,Ce,Ee)}t.redraw(),R&&Qe("onChange")}function He(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Qe("onClose")}function Re(){t.config!==void 0&&Qe("onDestroy");for(var R=t._handlers.length;R--;)t._handlers[R].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var U=t.calendarContainer.parentNode;if(U.lastChild&&U.removeChild(U.lastChild),U.parentNode){for(;U.firstChild;)U.parentNode.insertBefore(U.firstChild,U);U.parentNode.removeChild(U)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(x){try{delete t[x]}catch{}})}function Fe(R){return t.calendarContainer.contains(R)}function qe(R){if(t.isOpen&&!t.config.inline){var U=mn(R),x=Fe(U),se=U===t.input||U===t.altInput||t.element.contains(U)||R.path&&R.path.indexOf&&(~R.path.indexOf(t.input)||~R.path.indexOf(t.altInput)),Ce=!se&&!x&&!Fe(R.relatedTarget),Ee=!t.config.ignoredFocusElements.some(function(Ie){return Ie.contains(U)});Ce&&Ee&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ge(R){if(!(!R||t.config.minDate&&Rt.config.maxDate.getFullYear())){var U=R,x=t.currentYear!==U;t.currentYear=U||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),x&&(t.redraw(),Qe("onYearChange"),W())}}function Se(R,U){var x;U===void 0&&(U=!0);var se=t.parseDate(R,void 0,U);if(t.config.minDate&&se&&hn(se,t.config.minDate,U!==void 0?U:!t.minDateHasTime)<0||t.config.maxDate&&se&&hn(se,t.config.maxDate,U!==void 0?U:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(se===void 0)return!1;for(var Ce=!!t.config.enable,Ee=(x=t.config.enable)!==null&&x!==void 0?x:t.config.disable,Ie=0,De=void 0;Ie=De.from.getTime()&&se.getTime()<=De.to.getTime())return Ce}return!Ce}function Ue(R){return t.daysContainer!==void 0?R.className.indexOf("hidden")===-1&&R.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(R):!1}function lt(R){var U=R.target===t._input,x=t._input.value.trimEnd()!==Ai();U&&x&&!(R.relatedTarget&&Fe(R.relatedTarget))&&t.setDate(t._input.value,!0,R.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ue(R){var U=mn(R),x=t.config.wrap?n.contains(U):U===t._input,se=t.config.allowInput,Ce=t.isOpen&&(!se||!x),Ee=t.config.inline&&x&&!se;if(R.keyCode===13&&x){if(se)return t.setDate(t._input.value,!0,U===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),U.blur();t.open()}else if(Fe(U)||Ce||Ee){var Ie=!!t.timeContainer&&t.timeContainer.contains(U);switch(R.keyCode){case 13:Ie?(R.preventDefault(),a(),ot()):xn(R);break;case 27:R.preventDefault(),ot();break;case 8:case 46:x&&!t.config.allowInput&&(R.preventDefault(),t.clear());break;case 37:case 39:if(!Ie&&!x){R.preventDefault();var De=l();if(t.daysContainer!==void 0&&(se===!1||De&&Ue(De))){var Ke=R.keyCode===39?1:-1;R.ctrlKey?(R.stopPropagation(),Y(Ke),L(E(1),0)):L(void 0,Ke)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:R.preventDefault();var Ne=R.keyCode===40?1:-1;t.daysContainer&&U.$i!==void 0||U===t.input||U===t.altInput?R.ctrlKey?(R.stopPropagation(),ge(t.currentYear-Ne),L(E(1),0)):Ie||L(void 0,Ne*7):U===t.currentYearElement?ge(t.currentYear-Ne):t.config.enableTime&&(!Ie&&t.hourElement&&t.hourElement.focus(),a(R),t._debouncedChange());break;case 9:if(Ie){var ze=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(pn){return pn}),mt=ze.indexOf(U);if(mt!==-1){var Un=ze[mt+(R.shiftKey?-1:1)];R.preventDefault(),(Un||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(U)&&R.shiftKey&&(R.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&U===t.amPM)switch(R.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),qt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),qt();break}(x||Fe(U))&&Qe("onKeyDown",R)}function fe(R,U){if(U===void 0&&(U="flatpickr-day"),!(t.selectedDates.length!==1||R&&(!R.classList.contains(U)||R.classList.contains("flatpickr-disabled")))){for(var x=R?R.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),se=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Ce=Math.min(x,t.selectedDates[0].getTime()),Ee=Math.max(x,t.selectedDates[0].getTime()),Ie=!1,De=0,Ke=0,Ne=Ce;NeCe&&NeDe)?De=Ne:Ne>se&&(!Ke||Ne ."+U));ze.forEach(function(mt){var Un=mt.dateObj,pn=Un.getTime(),Fs=De>0&&pn0&&pn>Ke;if(Fs){mt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(rs){mt.classList.remove(rs)});return}else if(Ie&&!Fs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(rs){mt.classList.remove(rs)}),R!==void 0&&(R.classList.add(x<=t.selectedDates[0].getTime()?"startRange":"endRange"),sex&&pn===se&&mt.classList.add("endRange"),pn>=De&&(Ke===0||pn<=Ke)&&eT(pn,se,x)&&mt.classList.add("inRange"))})}}function ae(){t.isOpen&&!t.config.static&&!t.config.inline&&$e()}function oe(R,U){if(U===void 0&&(U=t._positionElement),t.isMobile===!0){if(R){R.preventDefault();var x=mn(R);x&&x.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Qe("onOpen");return}else if(t._input.disabled||t.config.inline)return;var se=t.isOpen;t.isOpen=!0,se||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Qe("onOpen"),$e(U)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(R===void 0||!t.timeContainer.contains(R.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function je(R){return function(U){var x=t.config["_"+R+"Date"]=t.parseDate(U,t.config.dateFormat),se=t.config["_"+(R==="min"?"max":"min")+"Date"];x!==void 0&&(t[R==="min"?"minDateHasTime":"maxDateHasTime"]=x.getHours()>0||x.getMinutes()>0||x.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Ce){return Se(Ce)}),!t.selectedDates.length&&R==="min"&&d(x),qt()),t.daysContainer&&(Mt(),x!==void 0?t.currentYearElement[R]=x.getFullYear().toString():t.currentYearElement.removeAttribute(R),t.currentYearElement.disabled=!!se&&x!==void 0&&se.getFullYear()===x.getFullYear())}}function Me(){var R=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],U=Bt(Bt({},JSON.parse(JSON.stringify(n.dataset||{}))),e),x={};t.config.parseDate=U.parseDate,t.config.formatDate=U.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(ze){t.config._enable=fi(ze)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(ze){t.config._disable=fi(ze)}});var se=U.mode==="time";if(!U.dateFormat&&(U.enableTime||se)){var Ce=Et.defaultConfig.dateFormat||ks.dateFormat;x.dateFormat=U.noCalendar||se?"H:i"+(U.enableSeconds?":S":""):Ce+" H:i"+(U.enableSeconds?":S":"")}if(U.altInput&&(U.enableTime||se)&&!U.altFormat){var Ee=Et.defaultConfig.altFormat||ks.altFormat;x.altFormat=U.noCalendar||se?"h:i"+(U.enableSeconds?":S K":" K"):Ee+(" h:i"+(U.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:je("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:je("max")});var Ie=function(ze){return function(mt){t.config[ze==="min"?"_minTime":"_maxTime"]=t.parseDate(mt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Ie("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Ie("max")}),U.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,x,U);for(var De=0;De-1?t.config[Ne]=Sr(Ke[Ne]).map(o).concat(t.config[Ne]):typeof U[Ne]>"u"&&(t.config[Ne]=Ke[Ne])}U.altInputClass||(t.config.altInputClass=Te().className+" "+t.config.altInputClass),Qe("onParseConfig")}function Te(){return t.config.wrap?n.querySelector("[data-input]"):n}function de(){typeof t.config.locale!="object"&&typeof Et.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Bt(Bt({},Et.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Et.l10ns[t.config.locale]:void 0),Vi.D="("+t.l10n.weekdays.shorthand.join("|")+")",Vi.l="("+t.l10n.weekdays.longhand.join("|")+")",Vi.M="("+t.l10n.months.shorthand.join("|")+")",Vi.F="("+t.l10n.months.longhand.join("|")+")",Vi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var R=Bt(Bt({},e),JSON.parse(JSON.stringify(n.dataset||{})));R.time_24hr===void 0&&Et.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=sb(t),t.parseDate=ua({config:t.config,l10n:t.l10n})}function $e(R){if(typeof t.config.position=="function")return void t.config.position(t,R);if(t.calendarContainer!==void 0){Qe("onPreCalendarPosition");var U=R||t._positionElement,x=Array.prototype.reduce.call(t.calendarContainer.children,function(gb,_b){return gb+_b.offsetHeight},0),se=t.calendarContainer.offsetWidth,Ce=t.config.position.split(" "),Ee=Ce[0],Ie=Ce.length>1?Ce[1]:null,De=U.getBoundingClientRect(),Ke=window.innerHeight-De.bottom,Ne=Ee==="above"||Ee!=="below"&&Kex,ze=window.pageYOffset+De.top+(Ne?-x-2:U.offsetHeight+2);if(Gt(t.calendarContainer,"arrowTop",!Ne),Gt(t.calendarContainer,"arrowBottom",Ne),!t.config.inline){var mt=window.pageXOffset+De.left,Un=!1,pn=!1;Ie==="center"?(mt-=(se-De.width)/2,Un=!0):Ie==="right"&&(mt-=se-De.width,pn=!0),Gt(t.calendarContainer,"arrowLeft",!Un&&!pn),Gt(t.calendarContainer,"arrowCenter",Un),Gt(t.calendarContainer,"arrowRight",pn);var Fs=window.document.body.offsetWidth-(window.pageXOffset+De.right),rs=mt+se>window.document.body.offsetWidth,ub=Fs+se>window.document.body.offsetWidth;if(Gt(t.calendarContainer,"rightMost",rs),!t.config.static)if(t.calendarContainer.style.top=ze+"px",!rs)t.calendarContainer.style.left=mt+"px",t.calendarContainer.style.right="auto";else if(!ub)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Fs+"px";else{var Qo=Ze();if(Qo===void 0)return;var fb=window.document.body.offsetWidth,cb=Math.max(0,fb/2-se/2),db=".flatpickr-calendar.centerMost:before",pb=".flatpickr-calendar.centerMost:after",mb=Qo.cssRules.length,hb="{left:"+De.left+"px;right:auto;}";Gt(t.calendarContainer,"rightMost",!1),Gt(t.calendarContainer,"centerMost",!0),Qo.insertRule(db+","+pb+hb,mb),t.calendarContainer.style.left=cb+"px",t.calendarContainer.style.right="auto"}}}}function Ze(){for(var R=null,U=0;Ut.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=se,t.config.mode==="single")t.selectedDates=[Ce];else if(t.config.mode==="multiple"){var Ie=ei(Ce);Ie?t.selectedDates.splice(parseInt(Ie),1):t.selectedDates.push(Ce)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Ce,t.selectedDates.push(Ce),hn(Ce,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(ze,mt){return ze.getTime()-mt.getTime()}));if(c(),Ee){var De=t.currentYear!==Ce.getFullYear();t.currentYear=Ce.getFullYear(),t.currentMonth=Ce.getMonth(),De&&(Qe("onYearChange"),W()),Qe("onMonthChange")}if(Ei(),F(),qt(),!Ee&&t.config.mode!=="range"&&t.config.showMonths===1?O(se):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ke=t.config.mode==="single"&&!t.config.enableTime,Ne=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ke||Ne)&&ot()}_()}}var ui={locale:[de,z],showMonths:[ne,r,ee],minDate:[k],maxDate:[k],positionElement:[Oi],clickOpens:[function(){t.config.clickOpens===!0?(g(t._input,"focus",t.open),g(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function ts(R,U){if(R!==null&&typeof R=="object"){Object.assign(t.config,R);for(var x in R)ui[x]!==void 0&&ui[x].forEach(function(se){return se()})}else t.config[R]=U,ui[R]!==void 0?ui[R].forEach(function(se){return se()}):wr.indexOf(R)>-1&&(t.config[R]=Sr(U));t.redraw(),qt(!0)}function ns(R,U){var x=[];if(R instanceof Array)x=R.map(function(se){return t.parseDate(se,U)});else if(R instanceof Date||typeof R=="number")x=[t.parseDate(R,U)];else if(typeof R=="string")switch(t.config.mode){case"single":case"time":x=[t.parseDate(R,U)];break;case"multiple":x=R.split(t.config.conjunction).map(function(se){return t.parseDate(se,U)});break;case"range":x=R.split(t.l10n.rangeSeparator).map(function(se){return t.parseDate(se,U)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(R)));t.selectedDates=t.config.allowInvalidPreload?x:x.filter(function(se){return se instanceof Date&&Se(se,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(se,Ce){return se.getTime()-Ce.getTime()})}function Ll(R,U,x){if(U===void 0&&(U=!1),x===void 0&&(x=t.config.dateFormat),R!==0&&!R||R instanceof Array&&R.length===0)return t.clear(U);ns(R,x),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),k(void 0,U),d(),t.selectedDates.length===0&&t.clear(!1),qt(U),U&&Qe("onChange")}function fi(R){return R.slice().map(function(U){return typeof U=="string"||typeof U=="number"||U instanceof Date?t.parseDate(U,void 0,!0):U&&typeof U=="object"&&U.from&&U.to?{from:t.parseDate(U.from,void 0),to:t.parseDate(U.to,void 0)}:U}).filter(function(U){return U})}function is(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var R=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);R&&ns(R,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Nl(){if(t.input=Te(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=at(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Oi()}function Oi(){t._positionElement=t.config.positionElement||t._input}function ss(){var R=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=at("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=R,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=R==="datetime-local"?"Y-m-d\\TH:i:S":R==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}g(t.mobileInput,"change",function(U){t.setDate(mn(U).value,!1,t.mobileFormatStr),Qe("onChange"),Qe("onClose")})}function ln(R){if(t.isOpen===!0)return t.close();t.open(R)}function Qe(R,U){if(t.config!==void 0){var x=t.config[R];if(x!==void 0&&x.length>0)for(var se=0;x[se]&&se=0&&hn(R,t.selectedDates[1])<=0}function Ei(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(R,U){var x=new Date(t.currentYear,t.currentMonth,1);x.setMonth(t.currentMonth+U),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[U].textContent=Lo(x.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=x.getMonth().toString(),R.value=x.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Ai(R){var U=R||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(x){return t.formatDate(x,U)}).filter(function(x,se,Ce){return t.config.mode!=="range"||t.config.enableTime||Ce.indexOf(x)===se}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function qt(R){R===void 0&&(R=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Ai(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Ai(t.config.altFormat)),R!==!1&&Qe("onValueUpdate")}function Zt(R){var U=mn(R),x=t.prevMonthNav.contains(U),se=t.nextMonthNav.contains(U);x||se?Y(x?-1:1):t.yearElements.indexOf(U)>=0?U.select():U.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):U.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Fl(R){R.preventDefault();var U=R.type==="keydown",x=mn(R),se=x;t.amPM!==void 0&&x===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Cn(t.amPM.textContent===t.l10n.amPM[0])]);var Ce=parseFloat(se.getAttribute("min")),Ee=parseFloat(se.getAttribute("max")),Ie=parseFloat(se.getAttribute("step")),De=parseInt(se.value,10),Ke=R.delta||(U?R.which===38?1:-1:0),Ne=De+Ie*Ke;if(typeof se.value<"u"&&se.value.length===2){var ze=se===t.hourElement,mt=se===t.minuteElement;NeEe&&(Ne=se===t.hourElement?Ne-Ee-Cn(!t.amPM):Ce,mt&&C(void 0,1,t.hourElement)),t.amPM&&ze&&(Ie===1?Ne+De===23:Math.abs(Ne-De)>Ie)&&(t.amPM.textContent=t.l10n.amPM[Cn(t.amPM.textContent===t.l10n.amPM[0])]),se.value=on(Ne)}}return s(),t}function ws(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;s{const C=f??h,M=y(d);return M.onReady.push(()=>{t(8,m=!0)}),t(3,g=Et(C,Object.assign(M,f?{wrap:!0}:{}))),()=>{g.destroy()}});const _=$t();function y(C={}){C=Object.assign({},C);for(const M of r){const $=(O,E,I)=>{_(rT(M),[O,E,I])};M in C?(Array.isArray(C[M])||(C[M]=[C[M]]),C[M].push($)):C[M]=[$]}return C.onChange&&!C.onChange.includes(k)&&C.onChange.push(k),C}function k(C,M,$){var E;const O=((E=$==null?void 0:$.config)==null?void 0:E.mode)??"single";t(2,a=O==="single"?C[0]:C),t(4,u=M)}function T(C){ie[C?"unshift":"push"](()=>{h=C,t(0,h)})}return n.$$set=C=>{e=Xe(Xe({},e),Gn(C)),t(1,s=At(e,i)),"value"in C&&t(2,a=C.value),"formattedValue"in C&&t(4,u=C.formattedValue),"element"in C&&t(5,f=C.element),"dateFormat"in C&&t(6,c=C.dateFormat),"options"in C&&t(7,d=C.options),"input"in C&&t(0,h=C.input),"flatpickr"in C&&t(3,g=C.flatpickr),"$$scope"in C&&t(9,o=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&g&&m&&(a?g.setDate(a,!1,c):a===null&&g.clear(!1)),n.$$.dirty&392&&g&&m)for(const[C,M]of Object.entries(y(d)))g.set(C,M)},[h,s,a,g,u,f,c,d,m,o,l,T]}class eu extends ye{constructor(e){super(),ve(this,e,aT,oT,be,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function uT(n){let e,t,i,s,l,o,r;function a(f){n[2](f)}let u={id:n[4],options:V.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new eu({props:u}),ie.push(()=>ke(l,"formattedValue",a)),{c(){e=v("label"),t=B("Min date (UTC)"),s=D(),q(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].min),!o&&c&1&&(o=!0,d.formattedValue=f[0].min,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function fT(n){let e,t,i,s,l,o,r;function a(f){n[3](f)}let u={id:n[4],options:V.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new eu({props:u}),ie.push(()=>ke(l,"formattedValue",a)),{c(){e=v("label"),t=B("Max date (UTC)"),s=D(),q(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].max),!o&&c&1&&(o=!0,d.formattedValue=f[0].max,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function cT(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[uT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[fT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function dT(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.min,r)&&(s.min=r,t(0,s))}function o(r){n.$$.not_equal(s.max,r)&&(s.max=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class pT extends ye{constructor(e){super(),ve(this,e,dT,cT,be,{key:1,options:0})}}function mT(n){let e,t,i,s,l,o,r,a,u;function f(d){n[2](d)}let c={id:n[4],placeholder:"eg. optionA, optionB",required:!0};return n[0].values!==void 0&&(c.value=n[0].values),l=new Ns({props:c}),ie.push(()=>ke(l,"value",f)),{c(){e=v("label"),t=B("Choices"),s=D(),q(l.$$.fragment),r=D(),a=v("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,m){S(d,e,m),b(e,t),S(d,s,m),j(l,d,m),S(d,r,m),S(d,a,m),u=!0},p(d,m){(!u||m&16&&i!==(i=d[4]))&&p(e,"for",i);const h={};m&16&&(h.id=d[4]),!o&&m&1&&(o=!0,h.value=d[0].values,we(()=>o=!1)),l.$set(h)},i(d){u||(A(l.$$.fragment,d),u=!0)},o(d){P(l.$$.fragment,d),u=!1},d(d){d&&w(e),d&&w(s),H(l,d),d&&w(r),d&&w(a)}}}function hT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max select"),s=D(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function gT(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[mT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[hT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){S(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.values"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.maxSelect"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function _T(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.values,r)&&(s.values=r,t(0,s))}function o(){s.maxSelect=ht(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},n.$$.update=()=>{n.$$.dirty&1&&V.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,o]}class bT extends ye{constructor(e){super(),ve(this,e,_T,gT,be,{key:1,options:0})}}function vT(n,e,t){return["",{}]}class yT extends ye{constructor(e){super(),ve(this,e,vT,null,be,{key:0,options:1})}get key(){return this.$$.ctx[0]}get options(){return this.$$.ctx[1]}}function kT(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=B(t),s=D(),l=v("small"),r=B(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){S(a,e,u),b(e,i),S(a,s,u),S(a,l,u),b(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&re(i,t),u&1&&o!==(o=a[0].mimeType+"")&&re(r,o)},i:G,o:G,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function wT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Yc extends ye{constructor(e){super(),ve(this,e,wT,kT,be,{item:0})}}const ST=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function TT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max file size (bytes)"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSize),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSize&&ce(l,u[0].maxSize)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function CT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max files"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function $T(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=D(),i=v("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=D(),l=v("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=D(),r=v("button"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=[K(e,"click",n[6]),K(i,"click",n[7]),K(l,"click",n[8]),K(r,"click",n[9])],a=!0)},p:G,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,Le(u)}}}function MT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T;function C($){n[5]($)}let M={id:n[12],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[2],labelComponent:Yc,optionComponent:Yc};return n[0].mimeTypes!==void 0&&(M.keyOfSelected=n[0].mimeTypes),r=new Ls({props:M}),ie.push(()=>ke(r,"keyOfSelected",C)),_=new Qn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[$T]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Allowed mime types",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),c=v("button"),d=v("span"),d.textContent="Choose presets",m=D(),h=v("i"),g=D(),q(_.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(d,"class","txt link-primary"),p(h,"class","ri-arrow-drop-down-fill"),p(c,"type","button"),p(c,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m($,O){S($,e,O),b(e,t),b(e,i),b(e,s),S($,o,O),j(r,$,O),S($,u,O),S($,f,O),b(f,c),b(c,d),b(c,m),b(c,h),b(c,g),j(_,c,null),y=!0,k||(T=Pe(Ye.call(null,s,{text:`Allow files ONLY with the listed mime types. + `}}function X(){t.calendarContainer.classList.add("hasWeeks");var R=at("div","flatpickr-weekwrapper");R.appendChild(at("span","flatpickr-weekday",t.l10n.weekAbbreviation));var U=at("div","flatpickr-weeks");return R.appendChild(U),{weekWrapper:R,weekNumbers:U}}function Y(R,U){U===void 0&&(U=!0);var x=U?R:R-t.currentMonth;x<0&&t._hidePrevMonthArrow===!0||x>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=x,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Qe("onYearChange"),W()),F(),Qe("onMonthChange"),Ei())}function le(R,U){if(R===void 0&&(R=!0),U===void 0&&(U=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,U===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var x=$r(t.config),se=x.hours,Ce=x.minutes,Ee=x.seconds;m(se,Ce,Ee)}t.redraw(),R&&Qe("onChange")}function He(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Qe("onClose")}function Re(){t.config!==void 0&&Qe("onDestroy");for(var R=t._handlers.length;R--;)t._handlers[R].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var U=t.calendarContainer.parentNode;if(U.lastChild&&U.removeChild(U.lastChild),U.parentNode){for(;U.firstChild;)U.parentNode.insertBefore(U.firstChild,U);U.parentNode.removeChild(U)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(x){try{delete t[x]}catch{}})}function Fe(R){return t.calendarContainer.contains(R)}function qe(R){if(t.isOpen&&!t.config.inline){var U=mn(R),x=Fe(U),se=U===t.input||U===t.altInput||t.element.contains(U)||R.path&&R.path.indexOf&&(~R.path.indexOf(t.input)||~R.path.indexOf(t.altInput)),Ce=!se&&!x&&!Fe(R.relatedTarget),Ee=!t.config.ignoredFocusElements.some(function(Ie){return Ie.contains(U)});Ce&&Ee&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ge(R){if(!(!R||t.config.minDate&&Rt.config.maxDate.getFullYear())){var U=R,x=t.currentYear!==U;t.currentYear=U||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),x&&(t.redraw(),Qe("onYearChange"),W())}}function Se(R,U){var x;U===void 0&&(U=!0);var se=t.parseDate(R,void 0,U);if(t.config.minDate&&se&&hn(se,t.config.minDate,U!==void 0?U:!t.minDateHasTime)<0||t.config.maxDate&&se&&hn(se,t.config.maxDate,U!==void 0?U:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(se===void 0)return!1;for(var Ce=!!t.config.enable,Ee=(x=t.config.enable)!==null&&x!==void 0?x:t.config.disable,Ie=0,De=void 0;Ie=De.from.getTime()&&se.getTime()<=De.to.getTime())return Ce}return!Ce}function Ue(R){return t.daysContainer!==void 0?R.className.indexOf("hidden")===-1&&R.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(R):!1}function lt(R){var U=R.target===t._input,x=t._input.value.trimEnd()!==Ai();U&&x&&!(R.relatedTarget&&Fe(R.relatedTarget))&&t.setDate(t._input.value,!0,R.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ue(R){var U=mn(R),x=t.config.wrap?n.contains(U):U===t._input,se=t.config.allowInput,Ce=t.isOpen&&(!se||!x),Ee=t.config.inline&&x&&!se;if(R.keyCode===13&&x){if(se)return t.setDate(t._input.value,!0,U===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),U.blur();t.open()}else if(Fe(U)||Ce||Ee){var Ie=!!t.timeContainer&&t.timeContainer.contains(U);switch(R.keyCode){case 13:Ie?(R.preventDefault(),a(),ot()):xn(R);break;case 27:R.preventDefault(),ot();break;case 8:case 46:x&&!t.config.allowInput&&(R.preventDefault(),t.clear());break;case 37:case 39:if(!Ie&&!x){R.preventDefault();var De=l();if(t.daysContainer!==void 0&&(se===!1||De&&Ue(De))){var Ke=R.keyCode===39?1:-1;R.ctrlKey?(R.stopPropagation(),Y(Ke),L(E(1),0)):L(void 0,Ke)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:R.preventDefault();var Ne=R.keyCode===40?1:-1;t.daysContainer&&U.$i!==void 0||U===t.input||U===t.altInput?R.ctrlKey?(R.stopPropagation(),ge(t.currentYear-Ne),L(E(1),0)):Ie||L(void 0,Ne*7):U===t.currentYearElement?ge(t.currentYear-Ne):t.config.enableTime&&(!Ie&&t.hourElement&&t.hourElement.focus(),a(R),t._debouncedChange());break;case 9:if(Ie){var ze=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(pn){return pn}),mt=ze.indexOf(U);if(mt!==-1){var Un=ze[mt+(R.shiftKey?-1:1)];R.preventDefault(),(Un||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(U)&&R.shiftKey&&(R.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&U===t.amPM)switch(R.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),qt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),qt();break}(x||Fe(U))&&Qe("onKeyDown",R)}function fe(R,U){if(U===void 0&&(U="flatpickr-day"),!(t.selectedDates.length!==1||R&&(!R.classList.contains(U)||R.classList.contains("flatpickr-disabled")))){for(var x=R?R.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),se=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Ce=Math.min(x,t.selectedDates[0].getTime()),Ee=Math.max(x,t.selectedDates[0].getTime()),Ie=!1,De=0,Ke=0,Ne=Ce;NeCe&&NeDe)?De=Ne:Ne>se&&(!Ke||Ne ."+U));ze.forEach(function(mt){var Un=mt.dateObj,pn=Un.getTime(),Fs=De>0&&pn0&&pn>Ke;if(Fs){mt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(rs){mt.classList.remove(rs)});return}else if(Ie&&!Fs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(rs){mt.classList.remove(rs)}),R!==void 0&&(R.classList.add(x<=t.selectedDates[0].getTime()?"startRange":"endRange"),sex&&pn===se&&mt.classList.add("endRange"),pn>=De&&(Ke===0||pn<=Ke)&&eT(pn,se,x)&&mt.classList.add("inRange"))})}}function ae(){t.isOpen&&!t.config.static&&!t.config.inline&&$e()}function oe(R,U){if(U===void 0&&(U=t._positionElement),t.isMobile===!0){if(R){R.preventDefault();var x=mn(R);x&&x.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Qe("onOpen");return}else if(t._input.disabled||t.config.inline)return;var se=t.isOpen;t.isOpen=!0,se||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Qe("onOpen"),$e(U)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(R===void 0||!t.timeContainer.contains(R.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function je(R){return function(U){var x=t.config["_"+R+"Date"]=t.parseDate(U,t.config.dateFormat),se=t.config["_"+(R==="min"?"max":"min")+"Date"];x!==void 0&&(t[R==="min"?"minDateHasTime":"maxDateHasTime"]=x.getHours()>0||x.getMinutes()>0||x.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Ce){return Se(Ce)}),!t.selectedDates.length&&R==="min"&&d(x),qt()),t.daysContainer&&(Mt(),x!==void 0?t.currentYearElement[R]=x.getFullYear().toString():t.currentYearElement.removeAttribute(R),t.currentYearElement.disabled=!!se&&x!==void 0&&se.getFullYear()===x.getFullYear())}}function Me(){var R=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],U=Bt(Bt({},JSON.parse(JSON.stringify(n.dataset||{}))),e),x={};t.config.parseDate=U.parseDate,t.config.formatDate=U.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(ze){t.config._enable=fi(ze)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(ze){t.config._disable=fi(ze)}});var se=U.mode==="time";if(!U.dateFormat&&(U.enableTime||se)){var Ce=Et.defaultConfig.dateFormat||ks.dateFormat;x.dateFormat=U.noCalendar||se?"H:i"+(U.enableSeconds?":S":""):Ce+" H:i"+(U.enableSeconds?":S":"")}if(U.altInput&&(U.enableTime||se)&&!U.altFormat){var Ee=Et.defaultConfig.altFormat||ks.altFormat;x.altFormat=U.noCalendar||se?"h:i"+(U.enableSeconds?":S K":" K"):Ee+(" h:i"+(U.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:je("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:je("max")});var Ie=function(ze){return function(mt){t.config[ze==="min"?"_minTime":"_maxTime"]=t.parseDate(mt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Ie("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Ie("max")}),U.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,x,U);for(var De=0;De-1?t.config[Ne]=Sr(Ke[Ne]).map(o).concat(t.config[Ne]):typeof U[Ne]>"u"&&(t.config[Ne]=Ke[Ne])}U.altInputClass||(t.config.altInputClass=Te().className+" "+t.config.altInputClass),Qe("onParseConfig")}function Te(){return t.config.wrap?n.querySelector("[data-input]"):n}function ce(){typeof t.config.locale!="object"&&typeof Et.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Bt(Bt({},Et.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Et.l10ns[t.config.locale]:void 0),Vi.D="("+t.l10n.weekdays.shorthand.join("|")+")",Vi.l="("+t.l10n.weekdays.longhand.join("|")+")",Vi.M="("+t.l10n.months.shorthand.join("|")+")",Vi.F="("+t.l10n.months.longhand.join("|")+")",Vi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var R=Bt(Bt({},e),JSON.parse(JSON.stringify(n.dataset||{})));R.time_24hr===void 0&&Et.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=sb(t),t.parseDate=ua({config:t.config,l10n:t.l10n})}function $e(R){if(typeof t.config.position=="function")return void t.config.position(t,R);if(t.calendarContainer!==void 0){Qe("onPreCalendarPosition");var U=R||t._positionElement,x=Array.prototype.reduce.call(t.calendarContainer.children,function(gb,_b){return gb+_b.offsetHeight},0),se=t.calendarContainer.offsetWidth,Ce=t.config.position.split(" "),Ee=Ce[0],Ie=Ce.length>1?Ce[1]:null,De=U.getBoundingClientRect(),Ke=window.innerHeight-De.bottom,Ne=Ee==="above"||Ee!=="below"&&Kex,ze=window.pageYOffset+De.top+(Ne?-x-2:U.offsetHeight+2);if(Gt(t.calendarContainer,"arrowTop",!Ne),Gt(t.calendarContainer,"arrowBottom",Ne),!t.config.inline){var mt=window.pageXOffset+De.left,Un=!1,pn=!1;Ie==="center"?(mt-=(se-De.width)/2,Un=!0):Ie==="right"&&(mt-=se-De.width,pn=!0),Gt(t.calendarContainer,"arrowLeft",!Un&&!pn),Gt(t.calendarContainer,"arrowCenter",Un),Gt(t.calendarContainer,"arrowRight",pn);var Fs=window.document.body.offsetWidth-(window.pageXOffset+De.right),rs=mt+se>window.document.body.offsetWidth,ub=Fs+se>window.document.body.offsetWidth;if(Gt(t.calendarContainer,"rightMost",rs),!t.config.static)if(t.calendarContainer.style.top=ze+"px",!rs)t.calendarContainer.style.left=mt+"px",t.calendarContainer.style.right="auto";else if(!ub)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Fs+"px";else{var Qo=Ze();if(Qo===void 0)return;var fb=window.document.body.offsetWidth,cb=Math.max(0,fb/2-se/2),db=".flatpickr-calendar.centerMost:before",pb=".flatpickr-calendar.centerMost:after",mb=Qo.cssRules.length,hb="{left:"+De.left+"px;right:auto;}";Gt(t.calendarContainer,"rightMost",!1),Gt(t.calendarContainer,"centerMost",!0),Qo.insertRule(db+","+pb+hb,mb),t.calendarContainer.style.left=cb+"px",t.calendarContainer.style.right="auto"}}}}function Ze(){for(var R=null,U=0;Ut.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=se,t.config.mode==="single")t.selectedDates=[Ce];else if(t.config.mode==="multiple"){var Ie=ei(Ce);Ie?t.selectedDates.splice(parseInt(Ie),1):t.selectedDates.push(Ce)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Ce,t.selectedDates.push(Ce),hn(Ce,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(ze,mt){return ze.getTime()-mt.getTime()}));if(c(),Ee){var De=t.currentYear!==Ce.getFullYear();t.currentYear=Ce.getFullYear(),t.currentMonth=Ce.getMonth(),De&&(Qe("onYearChange"),W()),Qe("onMonthChange")}if(Ei(),F(),qt(),!Ee&&t.config.mode!=="range"&&t.config.showMonths===1?O(se):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ke=t.config.mode==="single"&&!t.config.enableTime,Ne=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ke||Ne)&&ot()}_()}}var ui={locale:[ce,z],showMonths:[ne,r,ee],minDate:[k],maxDate:[k],positionElement:[Oi],clickOpens:[function(){t.config.clickOpens===!0?(g(t._input,"focus",t.open),g(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function ts(R,U){if(R!==null&&typeof R=="object"){Object.assign(t.config,R);for(var x in R)ui[x]!==void 0&&ui[x].forEach(function(se){return se()})}else t.config[R]=U,ui[R]!==void 0?ui[R].forEach(function(se){return se()}):wr.indexOf(R)>-1&&(t.config[R]=Sr(U));t.redraw(),qt(!0)}function ns(R,U){var x=[];if(R instanceof Array)x=R.map(function(se){return t.parseDate(se,U)});else if(R instanceof Date||typeof R=="number")x=[t.parseDate(R,U)];else if(typeof R=="string")switch(t.config.mode){case"single":case"time":x=[t.parseDate(R,U)];break;case"multiple":x=R.split(t.config.conjunction).map(function(se){return t.parseDate(se,U)});break;case"range":x=R.split(t.l10n.rangeSeparator).map(function(se){return t.parseDate(se,U)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(R)));t.selectedDates=t.config.allowInvalidPreload?x:x.filter(function(se){return se instanceof Date&&Se(se,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(se,Ce){return se.getTime()-Ce.getTime()})}function Ll(R,U,x){if(U===void 0&&(U=!1),x===void 0&&(x=t.config.dateFormat),R!==0&&!R||R instanceof Array&&R.length===0)return t.clear(U);ns(R,x),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),k(void 0,U),d(),t.selectedDates.length===0&&t.clear(!1),qt(U),U&&Qe("onChange")}function fi(R){return R.slice().map(function(U){return typeof U=="string"||typeof U=="number"||U instanceof Date?t.parseDate(U,void 0,!0):U&&typeof U=="object"&&U.from&&U.to?{from:t.parseDate(U.from,void 0),to:t.parseDate(U.to,void 0)}:U}).filter(function(U){return U})}function is(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var R=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);R&&ns(R,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Nl(){if(t.input=Te(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=at(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Oi()}function Oi(){t._positionElement=t.config.positionElement||t._input}function ss(){var R=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=at("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=R,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=R==="datetime-local"?"Y-m-d\\TH:i:S":R==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}g(t.mobileInput,"change",function(U){t.setDate(mn(U).value,!1,t.mobileFormatStr),Qe("onChange"),Qe("onClose")})}function ln(R){if(t.isOpen===!0)return t.close();t.open(R)}function Qe(R,U){if(t.config!==void 0){var x=t.config[R];if(x!==void 0&&x.length>0)for(var se=0;x[se]&&se=0&&hn(R,t.selectedDates[1])<=0}function Ei(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(R,U){var x=new Date(t.currentYear,t.currentMonth,1);x.setMonth(t.currentMonth+U),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[U].textContent=Lo(x.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=x.getMonth().toString(),R.value=x.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Ai(R){var U=R||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(x){return t.formatDate(x,U)}).filter(function(x,se,Ce){return t.config.mode!=="range"||t.config.enableTime||Ce.indexOf(x)===se}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function qt(R){R===void 0&&(R=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Ai(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Ai(t.config.altFormat)),R!==!1&&Qe("onValueUpdate")}function Zt(R){var U=mn(R),x=t.prevMonthNav.contains(U),se=t.nextMonthNav.contains(U);x||se?Y(x?-1:1):t.yearElements.indexOf(U)>=0?U.select():U.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):U.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Fl(R){R.preventDefault();var U=R.type==="keydown",x=mn(R),se=x;t.amPM!==void 0&&x===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Cn(t.amPM.textContent===t.l10n.amPM[0])]);var Ce=parseFloat(se.getAttribute("min")),Ee=parseFloat(se.getAttribute("max")),Ie=parseFloat(se.getAttribute("step")),De=parseInt(se.value,10),Ke=R.delta||(U?R.which===38?1:-1:0),Ne=De+Ie*Ke;if(typeof se.value<"u"&&se.value.length===2){var ze=se===t.hourElement,mt=se===t.minuteElement;NeEe&&(Ne=se===t.hourElement?Ne-Ee-Cn(!t.amPM):Ce,mt&&C(void 0,1,t.hourElement)),t.amPM&&ze&&(Ie===1?Ne+De===23:Math.abs(Ne-De)>Ie)&&(t.amPM.textContent=t.l10n.amPM[Cn(t.amPM.textContent===t.l10n.amPM[0])]),se.value=on(Ne)}}return s(),t}function ws(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;s{const C=f??h,M=y(d);return M.onReady.push(()=>{t(8,m=!0)}),t(3,g=Et(C,Object.assign(M,f?{wrap:!0}:{}))),()=>{g.destroy()}});const _=$t();function y(C={}){C=Object.assign({},C);for(const M of r){const $=(O,E,I)=>{_(rT(M),[O,E,I])};M in C?(Array.isArray(C[M])||(C[M]=[C[M]]),C[M].push($)):C[M]=[$]}return C.onChange&&!C.onChange.includes(k)&&C.onChange.push(k),C}function k(C,M,$){var E;const O=((E=$==null?void 0:$.config)==null?void 0:E.mode)??"single";t(2,a=O==="single"?C[0]:C),t(4,u=M)}function T(C){ie[C?"unshift":"push"](()=>{h=C,t(0,h)})}return n.$$set=C=>{e=Xe(Xe({},e),Gn(C)),t(1,s=At(e,i)),"value"in C&&t(2,a=C.value),"formattedValue"in C&&t(4,u=C.formattedValue),"element"in C&&t(5,f=C.element),"dateFormat"in C&&t(6,c=C.dateFormat),"options"in C&&t(7,d=C.options),"input"in C&&t(0,h=C.input),"flatpickr"in C&&t(3,g=C.flatpickr),"$$scope"in C&&t(9,o=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&g&&m&&(a?g.setDate(a,!1,c):a===null&&g.clear(!1)),n.$$.dirty&392&&g&&m)for(const[C,M]of Object.entries(y(d)))g.set(C,M)},[h,s,a,g,u,f,c,d,m,o,l,T]}class eu extends ye{constructor(e){super(),ve(this,e,aT,oT,be,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function uT(n){let e,t,i,s,l,o,r;function a(f){n[2](f)}let u={id:n[4],options:V.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new eu({props:u}),ie.push(()=>ke(l,"formattedValue",a)),{c(){e=v("label"),t=B("Min date (UTC)"),s=D(),q(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].min),!o&&c&1&&(o=!0,d.formattedValue=f[0].min,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function fT(n){let e,t,i,s,l,o,r;function a(f){n[3](f)}let u={id:n[4],options:V.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new eu({props:u}),ie.push(()=>ke(l,"formattedValue",a)),{c(){e=v("label"),t=B("Max date (UTC)"),s=D(),q(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].max),!o&&c&1&&(o=!0,d.formattedValue=f[0].max,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function cT(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[uT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[fT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function dT(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.min,r)&&(s.min=r,t(0,s))}function o(r){n.$$.not_equal(s.max,r)&&(s.max=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class pT extends ye{constructor(e){super(),ve(this,e,dT,cT,be,{key:1,options:0})}}function mT(n){let e,t,i,s,l,o,r,a,u;function f(d){n[2](d)}let c={id:n[4],placeholder:"eg. optionA, optionB",required:!0};return n[0].values!==void 0&&(c.value=n[0].values),l=new Ns({props:c}),ie.push(()=>ke(l,"value",f)),{c(){e=v("label"),t=B("Choices"),s=D(),q(l.$$.fragment),r=D(),a=v("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,m){S(d,e,m),b(e,t),S(d,s,m),j(l,d,m),S(d,r,m),S(d,a,m),u=!0},p(d,m){(!u||m&16&&i!==(i=d[4]))&&p(e,"for",i);const h={};m&16&&(h.id=d[4]),!o&&m&1&&(o=!0,h.value=d[0].values,we(()=>o=!1)),l.$set(h)},i(d){u||(A(l.$$.fragment,d),u=!0)},o(d){P(l.$$.fragment,d),u=!1},d(d){d&&w(e),d&&w(s),H(l,d),d&&w(r),d&&w(a)}}}function hT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max select"),s=D(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].maxSelect),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSelect&&de(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function gT(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[mT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[hT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){S(a,e,u),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.values"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.maxSelect"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function _T(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.values,r)&&(s.values=r,t(0,s))}function o(){s.maxSelect=ht(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},n.$$.update=()=>{n.$$.dirty&1&&V.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,o]}class bT extends ye{constructor(e){super(),ve(this,e,_T,gT,be,{key:1,options:0})}}function vT(n,e,t){return["",{}]}class yT extends ye{constructor(e){super(),ve(this,e,vT,null,be,{key:0,options:1})}get key(){return this.$$.ctx[0]}get options(){return this.$$.ctx[1]}}function kT(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=B(t),s=D(),l=v("small"),r=B(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){S(a,e,u),b(e,i),S(a,s,u),S(a,l,u),b(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&re(i,t),u&1&&o!==(o=a[0].mimeType+"")&&re(r,o)},i:G,o:G,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function wT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Yc extends ye{constructor(e){super(),ve(this,e,wT,kT,be,{item:0})}}const ST=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function TT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max file size (bytes)"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].maxSize),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSize&&de(l,u[0].maxSize)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function CT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max files"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].maxSelect),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSelect&&de(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function $T(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=D(),i=v("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=D(),l=v("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=D(),r=v("button"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=[K(e,"click",n[6]),K(i,"click",n[7]),K(l,"click",n[8]),K(r,"click",n[9])],a=!0)},p:G,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,Le(u)}}}function MT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T;function C($){n[5]($)}let M={id:n[12],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[2],labelComponent:Yc,optionComponent:Yc};return n[0].mimeTypes!==void 0&&(M.keyOfSelected=n[0].mimeTypes),r=new Ls({props:M}),ie.push(()=>ke(r,"keyOfSelected",C)),_=new Qn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[$T]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Allowed mime types",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),c=v("button"),d=v("span"),d.textContent="Choose presets",m=D(),h=v("i"),g=D(),q(_.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(d,"class","txt link-primary"),p(h,"class","ri-arrow-drop-down-fill"),p(c,"type","button"),p(c,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m($,O){S($,e,O),b(e,t),b(e,i),b(e,s),S($,o,O),j(r,$,O),S($,u,O),S($,f,O),b(f,c),b(c,d),b(c,m),b(c,h),b(c,g),j(_,c,null),y=!0,k||(T=Pe(Ye.call(null,s,{text:`Allow files ONLY with the listed mime types. Leave empty for no restriction.`,position:"top"})),k=!0)},p($,O){(!y||O&4096&&l!==(l=$[12]))&&p(e,"for",l);const E={};O&4096&&(E.id=$[12]),O&4&&(E.items=$[2]),!a&&O&1&&(a=!0,E.keyOfSelected=$[0].mimeTypes,we(()=>a=!1)),r.$set(E);const I={};O&8193&&(I.$$scope={dirty:O,ctx:$}),_.$set(I)},i($){y||(A(r.$$.fragment,$),A(_.$$.fragment,$),y=!0)},o($){P(r.$$.fragment,$),P(_.$$.fragment,$),y=!1},d($){$&&w(e),$&&w(o),H(r,$),$&&w(u),$&&w(f),H(_),k=!1,T()}}}function DT(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH (eg. 100x50) - crop to WxH viewbox (from center)
  • WxHt @@ -62,7 +62,7 @@ (eg. 0x50) - resize to H height preserving the aspect ratio
  • Wx0 (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,p(e,"class","m-0")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function OT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M;function $(E){n[10](E)}let O={id:n[12],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(O.value=n[0].thumbs),r=new Ns({props:O}),ie.push(()=>ke(r,"value",$)),k=new Qn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[DT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=D(),m=v("button"),h=v("span"),h.textContent="Supported formats",g=D(),_=v("i"),y=D(),q(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(c,"class","txt"),p(h,"class","txt link-primary"),p(_,"class","ri-arrow-drop-down-fill"),p(m,"type","button"),p(m,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(E,I){S(E,e,I),b(e,t),b(e,i),b(e,s),S(E,o,I),j(r,E,I),S(E,u,I),S(E,f,I),b(f,c),b(f,d),b(f,m),b(m,h),b(m,g),b(m,_),b(m,y),j(k,m,null),T=!0,C||(M=Pe(Ye.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),C=!0)},p(E,I){(!T||I&4096&&l!==(l=E[12]))&&p(e,"for",l);const L={};I&4096&&(L.id=E[12]),!a&&I&1&&(a=!0,L.value=E[0].thumbs,we(()=>a=!1)),r.$set(L);const N={};I&8192&&(N.$$scope={dirty:I,ctx:E}),k.$set(N)},i(E){T||(A(r.$$.fragment,E),A(k.$$.fragment,E),T=!0)},o(E){P(r.$$.fragment,E),P(k.$$.fragment,E),T=!1},d(E){E&&w(e),E&&w(o),H(r,E),E&&w(u),E&&w(f),H(k),C=!1,M()}}}function ET(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[TT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[CT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[MT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[OT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(h,g){S(h,e,g),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),b(e,f),b(e,c),j(d,c,null),m=!0},p(h,[g]){const _={};g&2&&(_.name="schema."+h[1]+".options.maxSize"),g&12289&&(_.$$scope={dirty:g,ctx:h}),i.$set(_);const y={};g&2&&(y.name="schema."+h[1]+".options.maxSelect"),g&12289&&(y.$$scope={dirty:g,ctx:h}),o.$set(y);const k={};g&2&&(k.name="schema."+h[1]+".options.mimeTypes"),g&12293&&(k.$$scope={dirty:g,ctx:h}),u.$set(k);const T={};g&2&&(T.name="schema."+h[1]+".options.thumbs"),g&12289&&(T.$$scope={dirty:g,ctx:h}),d.$set(T)},i(h){m||(A(i.$$.fragment,h),A(o.$$.fragment,h),A(u.$$.fragment,h),A(d.$$.fragment,h),m=!0)},o(h){P(i.$$.fragment,h),P(o.$$.fragment,h),P(u.$$.fragment,h),P(d.$$.fragment,h),m=!1},d(h){h&&w(e),H(i),H(o),H(u),H(d)}}}function AT(n,e,t){let{key:i=""}=e,{options:s={}}=e,l=ST.slice();function o(){if(V.isEmpty(s.mimeTypes))return;const g=[];for(const _ of s.mimeTypes)l.find(y=>y.mimeType===_)||g.push({mimeType:_});g.length&&t(2,l=l.concat(g))}function r(){s.maxSize=ht(this.value),t(0,s)}function a(){s.maxSelect=ht(this.value),t(0,s)}function u(g){n.$$.not_equal(s.mimeTypes,g)&&(s.mimeTypes=g,t(0,s))}const f=()=>{t(0,s.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],s)},c=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},d=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},m=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function h(g){n.$$.not_equal(s.thumbs,g)&&(s.thumbs=g,t(0,s))}return n.$$set=g=>{"key"in g&&t(1,i=g.key),"options"in g&&t(0,s=g.options)},n.$$.update=()=>{n.$$.dirty&1&&(V.isEmpty(s)?t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]}):o())},[s,i,l,r,a,u,f,c,d,m,h]}class IT extends ye{constructor(e){super(),ve(this,e,AT,ET,be,{key:1,options:0})}}function PT(n){let e,t,i,s,l;return{c(){e=v("hr"),t=D(),i=v("button"),i.innerHTML=` - New collection`,p(i,"type","button"),p(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[7]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function LT(n){let e,t,i,s,l,o,r;function a(f){n[8](f)}let u={searchable:n[2].length>5,selectPlaceholder:"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[2],$$slots:{afterOptions:[PT]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Collection"),s=D(),q(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&4&&(d.searchable=f[2].length>5),c&4&&(d.items=f[2]),c&524296&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function NT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=D(),s=v("i"),o=D(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18]),p(r,"type","number"),p(r,"id",a=n[18]),p(r,"step","1"),p(r,"min","1")},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].maxSelect),u||(f=[Pe(Ye.call(null,s,{text:"Leave empty for no limit.",position:"top"})),K(r,"input",n[9])],u=!0)},p(c,d){d&262144&&l!==(l=c[18])&&p(e,"for",l),d&262144&&a!==(a=c[18])&&p(r,"id",a),d&1&&ht(r.value)!==c[0].maxSelect&&ce(r,c[0].maxSelect)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,Le(f)}}}function FT(n){let e,t,i,s,l,o,r,a,u,f,c;function d(h){n[10](h)}let m={multiple:!0,searchable:!0,id:n[18],selectPlaceholder:"Auto",items:n[4]};return n[0].displayFields!==void 0&&(m.selected=n[0].displayFields),r=new xa({props:m}),ie.push(()=>ke(r,"selected",d)),{c(){e=v("label"),t=v("span"),t.textContent="Display fields",i=D(),s=v("i"),o=D(),q(r.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18])},m(h,g){S(h,e,g),b(e,t),b(e,i),b(e,s),S(h,o,g),j(r,h,g),u=!0,f||(c=Pe(Ye.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(h,g){(!u||g&262144&&l!==(l=h[18]))&&p(e,"for",l);const _={};g&262144&&(_.id=h[18]),g&16&&(_.items=h[4]),!a&&g&1&&(a=!0,_.selected=h[0].displayFields,we(()=>a=!1)),r.$set(_)},i(h){u||(A(r.$$.fragment,h),u=!0)},o(h){P(r.$$.fragment,h),u=!1},d(h){h&&w(e),h&&w(o),H(r,h),f=!1,c()}}}function RT(n){let e,t,i,s,l,o,r;function a(f){n[11](f)}let u={id:n[18],items:n[5]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Cascade delete"),s=D(),q(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&262144&&(d.id=f[18]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function jT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[LT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[NT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[FT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[RT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}});let _={};return h=new tu({props:_}),n[12](h),h.$on("save",n[13]),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(d.$$.fragment),m=D(),q(h.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-9"),p(c,"class","col-sm-3"),p(e,"class","grid")},m(y,k){S(y,e,k),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),b(e,f),b(e,c),j(d,c,null),S(y,m,k),j(h,y,k),g=!0},p(y,[k]){const T={};k&2&&(T.name="schema."+y[1]+".options.collectionId"),k&786445&&(T.$$scope={dirty:k,ctx:y}),i.$set(T);const C={};k&2&&(C.name="schema."+y[1]+".options.maxSelect"),k&786433&&(C.$$scope={dirty:k,ctx:y}),o.$set(C);const M={};k&2&&(M.name="schema."+y[1]+".options.displayFields"),k&786449&&(M.$$scope={dirty:k,ctx:y}),u.$set(M);const $={};k&2&&($.name="schema."+y[1]+".options.cascadeDelete"),k&786433&&($.$$scope={dirty:k,ctx:y}),d.$set($);const O={};h.$set(O)},i(y){g||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(u.$$.fragment,y),A(d.$$.fragment,y),A(h.$$.fragment,y),g=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(u.$$.fragment,y),P(d.$$.fragment,y),P(h.$$.fragment,y),g=!1},d(y){y&&w(e),H(i),H(o),H(u),H(d),y&&w(m),n[12](null),H(h,y)}}}function HT(n,e,t){let i,s;Je(n,es,M=>t(2,s=M));let{key:l=""}=e,{options:o={}}=e;const r=[{label:"False",value:!1},{label:"True",value:!0}],a=["id","created","updated"],u=["username","email","emailVisibility","verified"];let f=null,c=[],d=null;function m(){var M;if(t(4,c=a.slice(0)),!!i){i.isAuth&&t(4,c=c.concat(u));for(const $ of i.schema)c.push($.name);if(((M=o==null?void 0:o.displayFields)==null?void 0:M.length)>0)for(let $=o.displayFields.length-1;$>=0;$--)c.includes(o.displayFields[$])||o.displayFields.splice($,1)}}const h=()=>f==null?void 0:f.show();function g(M){n.$$.not_equal(o.collectionId,M)&&(o.collectionId=M,t(0,o))}function _(){o.maxSelect=ht(this.value),t(0,o)}function y(M){n.$$.not_equal(o.displayFields,M)&&(o.displayFields=M,t(0,o))}function k(M){n.$$.not_equal(o.cascadeDelete,M)&&(o.cascadeDelete=M,t(0,o))}function T(M){ie[M?"unshift":"push"](()=>{f=M,t(3,f)})}const C=M=>{var $,O;(O=($=M==null?void 0:M.detail)==null?void 0:$.collection)!=null&&O.id&&t(0,o.collectionId=M.detail.collection.id,o)};return n.$$set=M=>{"key"in M&&t(1,l=M.key),"options"in M&&t(0,o=M.options)},n.$$.update=()=>{n.$$.dirty&1&&V.isEmpty(o)&&t(0,o={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]}),n.$$.dirty&5&&(i=s.find(M=>M.id==o.collectionId)||null),n.$$.dirty&65&&d!=o.collectionId&&(t(6,d=o.collectionId),m())},[o,l,s,f,c,r,d,h,g,_,y,k,T,C]}class qT extends ye{constructor(e){super(),ve(this,e,HT,jT,be,{key:1,options:0})}}function VT(n){let e,t,i,s,l,o,r;function a(f){n[17](f)}let u={id:n[43],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new D3({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=B("Type"),s=D(),q(l.$$.fragment),p(e,"for",i=n[43])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&4096&&i!==(i=f[43]))&&p(e,"for",i);const d={};c[1]&4096&&(d.id=f[43]),c[0]&1&&(d.disabled=f[0].id),!o&&c[0]&1&&(o=!0,d.value=f[0].type,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function Kc(n){let e,t,i;return{c(){e=v("span"),e.textContent="Duplicated or invalid name",p(e,"class","txt invalid-name-note svelte-1tpxlm5")},m(s,l){S(s,e,l),i=!0},i(s){i||(st(()=>{t||(t=Be(e,En,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=Be(e,En,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function zT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[5]&&Kc();return{c(){e=v("label"),t=v("span"),t.textContent="Name",i=D(),h&&h.c(),l=D(),o=v("input"),p(t,"class","txt"),p(e,"for",s=n[43]),p(o,"type","text"),p(o,"id",r=n[43]),o.required=!0,o.disabled=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,o.value=f=n[0].name},m(g,_){S(g,e,_),b(e,t),b(e,i),h&&h.m(e,null),S(g,l,_),S(g,o,_),c=!0,n[0].id||o.focus(),d||(m=K(o,"input",n[18]),d=!0)},p(g,_){g[5]?h&&(pe(),P(h,1,1,()=>{h=null}),me()):h?_[0]&32&&A(h,1):(h=Kc(),h.c(),A(h,1),h.m(e,null)),(!c||_[1]&4096&&s!==(s=g[43]))&&p(e,"for",s),(!c||_[1]&4096&&r!==(r=g[43]))&&p(o,"id",r),(!c||_[0]&1&&a!==(a=g[0].id&&g[0].system))&&(o.disabled=a),(!c||_[0]&1&&u!==(u=!g[0].id))&&(o.autofocus=u),(!c||_[0]&1&&f!==(f=g[0].name)&&o.value!==f)&&(o.value=f)},i(g){c||(A(h),c=!0)},o(g){P(h),c=!1},d(g){g&&w(e),h&&h.d(),g&&w(l),g&&w(o),d=!1,m()}}}function BT(n){let e,t,i;function s(o){n[29](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new qT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function UT(n){let e,t,i;function s(o){n[28](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new IT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function WT(n){let e,t,i;function s(o){n[27](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new yT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function YT(n){let e,t,i;function s(o){n[26](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new bT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function KT(n){let e,t,i;function s(o){n[25](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new pT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function JT(n){let e,t,i;function s(o){n[24](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new Q3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function ZT(n){let e,t,i;function s(o){n[23](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new G3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function GT(n){let e,t,i;function s(o){n[22](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new nb({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function XT(n){let e,t,i;function s(o){n[21](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new V3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function QT(n){let e,t,i;function s(o){n[20](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new H3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function xT(n){let e,t,i;function s(o){n[19](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new L3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function eC(n){let e,t,i,s,l,o=gs(n[0])+"",r,a,u,f,c,d,m;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),r=B(o),a=D(),u=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(l,"class","txt"),p(u,"class","ri-information-line link-hint"),p(s,"for",c=n[43])},m(h,g){S(h,e,g),e.checked=n[0].required,S(h,i,g),S(h,s,g),b(s,l),b(l,r),b(s,a),b(s,u),d||(m=[K(e,"change",n[30]),Pe(f=Ye.call(null,u,{text:`Requires the field value to be ${gs(n[0])} + New collection`,p(i,"type","button"),p(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[7]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function LT(n){let e,t,i,s,l,o,r;function a(f){n[8](f)}let u={searchable:n[2].length>5,selectPlaceholder:"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[2],$$slots:{afterOptions:[PT]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Collection"),s=D(),q(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&4&&(d.searchable=f[2].length>5),c&4&&(d.items=f[2]),c&524296&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function NT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=D(),s=v("i"),o=D(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18]),p(r,"type","number"),p(r,"id",a=n[18]),p(r,"step","1"),p(r,"min","1")},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),de(r,n[0].maxSelect),u||(f=[Pe(Ye.call(null,s,{text:"Leave empty for no limit.",position:"top"})),K(r,"input",n[9])],u=!0)},p(c,d){d&262144&&l!==(l=c[18])&&p(e,"for",l),d&262144&&a!==(a=c[18])&&p(r,"id",a),d&1&&ht(r.value)!==c[0].maxSelect&&de(r,c[0].maxSelect)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,Le(f)}}}function FT(n){let e,t,i,s,l,o,r,a,u,f,c;function d(h){n[10](h)}let m={multiple:!0,searchable:!0,id:n[18],selectPlaceholder:"Auto",items:n[4]};return n[0].displayFields!==void 0&&(m.selected=n[0].displayFields),r=new xa({props:m}),ie.push(()=>ke(r,"selected",d)),{c(){e=v("label"),t=v("span"),t.textContent="Display fields",i=D(),s=v("i"),o=D(),q(r.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18])},m(h,g){S(h,e,g),b(e,t),b(e,i),b(e,s),S(h,o,g),j(r,h,g),u=!0,f||(c=Pe(Ye.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(h,g){(!u||g&262144&&l!==(l=h[18]))&&p(e,"for",l);const _={};g&262144&&(_.id=h[18]),g&16&&(_.items=h[4]),!a&&g&1&&(a=!0,_.selected=h[0].displayFields,we(()=>a=!1)),r.$set(_)},i(h){u||(A(r.$$.fragment,h),u=!0)},o(h){P(r.$$.fragment,h),u=!1},d(h){h&&w(e),h&&w(o),H(r,h),f=!1,c()}}}function RT(n){let e,t,i,s,l,o,r;function a(f){n[11](f)}let u={id:n[18],items:n[5]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Cascade delete"),s=D(),q(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&262144&&(d.id=f[18]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function jT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[LT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[NT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[FT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[RT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}});let _={};return h=new tu({props:_}),n[12](h),h.$on("save",n[13]),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(d.$$.fragment),m=D(),q(h.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-9"),p(c,"class","col-sm-3"),p(e,"class","grid")},m(y,k){S(y,e,k),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),b(e,f),b(e,c),j(d,c,null),S(y,m,k),j(h,y,k),g=!0},p(y,[k]){const T={};k&2&&(T.name="schema."+y[1]+".options.collectionId"),k&786445&&(T.$$scope={dirty:k,ctx:y}),i.$set(T);const C={};k&2&&(C.name="schema."+y[1]+".options.maxSelect"),k&786433&&(C.$$scope={dirty:k,ctx:y}),o.$set(C);const M={};k&2&&(M.name="schema."+y[1]+".options.displayFields"),k&786449&&(M.$$scope={dirty:k,ctx:y}),u.$set(M);const $={};k&2&&($.name="schema."+y[1]+".options.cascadeDelete"),k&786433&&($.$$scope={dirty:k,ctx:y}),d.$set($);const O={};h.$set(O)},i(y){g||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(u.$$.fragment,y),A(d.$$.fragment,y),A(h.$$.fragment,y),g=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(u.$$.fragment,y),P(d.$$.fragment,y),P(h.$$.fragment,y),g=!1},d(y){y&&w(e),H(i),H(o),H(u),H(d),y&&w(m),n[12](null),H(h,y)}}}function HT(n,e,t){let i,s;Je(n,es,M=>t(2,s=M));let{key:l=""}=e,{options:o={}}=e;const r=[{label:"False",value:!1},{label:"True",value:!0}],a=["id","created","updated"],u=["username","email","emailVisibility","verified"];let f=null,c=[],d=null;function m(){var M;if(t(4,c=a.slice(0)),!!i){i.isAuth&&t(4,c=c.concat(u));for(const $ of i.schema)c.push($.name);if(((M=o==null?void 0:o.displayFields)==null?void 0:M.length)>0)for(let $=o.displayFields.length-1;$>=0;$--)c.includes(o.displayFields[$])||o.displayFields.splice($,1)}}const h=()=>f==null?void 0:f.show();function g(M){n.$$.not_equal(o.collectionId,M)&&(o.collectionId=M,t(0,o))}function _(){o.maxSelect=ht(this.value),t(0,o)}function y(M){n.$$.not_equal(o.displayFields,M)&&(o.displayFields=M,t(0,o))}function k(M){n.$$.not_equal(o.cascadeDelete,M)&&(o.cascadeDelete=M,t(0,o))}function T(M){ie[M?"unshift":"push"](()=>{f=M,t(3,f)})}const C=M=>{var $,O;(O=($=M==null?void 0:M.detail)==null?void 0:$.collection)!=null&&O.id&&t(0,o.collectionId=M.detail.collection.id,o)};return n.$$set=M=>{"key"in M&&t(1,l=M.key),"options"in M&&t(0,o=M.options)},n.$$.update=()=>{n.$$.dirty&1&&V.isEmpty(o)&&t(0,o={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]}),n.$$.dirty&5&&(i=s.find(M=>M.id==o.collectionId)||null),n.$$.dirty&65&&d!=o.collectionId&&(t(6,d=o.collectionId),m())},[o,l,s,f,c,r,d,h,g,_,y,k,T,C]}class qT extends ye{constructor(e){super(),ve(this,e,HT,jT,be,{key:1,options:0})}}function VT(n){let e,t,i,s,l,o,r;function a(f){n[17](f)}let u={id:n[43],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new D3({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=B("Type"),s=D(),q(l.$$.fragment),p(e,"for",i=n[43])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&4096&&i!==(i=f[43]))&&p(e,"for",i);const d={};c[1]&4096&&(d.id=f[43]),c[0]&1&&(d.disabled=f[0].id),!o&&c[0]&1&&(o=!0,d.value=f[0].type,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function Kc(n){let e,t,i;return{c(){e=v("span"),e.textContent="Duplicated or invalid name",p(e,"class","txt invalid-name-note svelte-1tpxlm5")},m(s,l){S(s,e,l),i=!0},i(s){i||(st(()=>{t||(t=Be(e,En,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=Be(e,En,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function zT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[5]&&Kc();return{c(){e=v("label"),t=v("span"),t.textContent="Name",i=D(),h&&h.c(),l=D(),o=v("input"),p(t,"class","txt"),p(e,"for",s=n[43]),p(o,"type","text"),p(o,"id",r=n[43]),o.required=!0,o.disabled=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,o.value=f=n[0].name},m(g,_){S(g,e,_),b(e,t),b(e,i),h&&h.m(e,null),S(g,l,_),S(g,o,_),c=!0,n[0].id||o.focus(),d||(m=K(o,"input",n[18]),d=!0)},p(g,_){g[5]?h&&(pe(),P(h,1,1,()=>{h=null}),me()):h?_[0]&32&&A(h,1):(h=Kc(),h.c(),A(h,1),h.m(e,null)),(!c||_[1]&4096&&s!==(s=g[43]))&&p(e,"for",s),(!c||_[1]&4096&&r!==(r=g[43]))&&p(o,"id",r),(!c||_[0]&1&&a!==(a=g[0].id&&g[0].system))&&(o.disabled=a),(!c||_[0]&1&&u!==(u=!g[0].id))&&(o.autofocus=u),(!c||_[0]&1&&f!==(f=g[0].name)&&o.value!==f)&&(o.value=f)},i(g){c||(A(h),c=!0)},o(g){P(h),c=!1},d(g){g&&w(e),h&&h.d(),g&&w(l),g&&w(o),d=!1,m()}}}function BT(n){let e,t,i;function s(o){n[29](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new qT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function UT(n){let e,t,i;function s(o){n[28](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new IT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function WT(n){let e,t,i;function s(o){n[27](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new yT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function YT(n){let e,t,i;function s(o){n[26](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new bT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function KT(n){let e,t,i;function s(o){n[25](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new pT({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function JT(n){let e,t,i;function s(o){n[24](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new Q3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function ZT(n){let e,t,i;function s(o){n[23](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new G3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function GT(n){let e,t,i;function s(o){n[22](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new nb({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function XT(n){let e,t,i;function s(o){n[21](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new V3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function QT(n){let e,t,i;function s(o){n[20](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new H3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function xT(n){let e,t,i;function s(o){n[19](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new L3({props:l}),ie.push(()=>ke(e,"options",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function eC(n){let e,t,i,s,l,o=gs(n[0])+"",r,a,u,f,c,d,m;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),r=B(o),a=D(),u=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(l,"class","txt"),p(u,"class","ri-information-line link-hint"),p(s,"for",c=n[43])},m(h,g){S(h,e,g),e.checked=n[0].required,S(h,i,g),S(h,s,g),b(s,l),b(l,r),b(s,a),b(s,u),d||(m=[K(e,"change",n[30]),Pe(f=Ye.call(null,u,{text:`Requires the field value to be ${gs(n[0])} (aka. not ${V.zeroDefaultStr(n[0])}).`,position:"right"}))],d=!0)},p(h,g){g[1]&4096&&t!==(t=h[43])&&p(e,"id",t),g[0]&1&&(e.checked=h[0].required),g[0]&1&&o!==(o=gs(h[0])+"")&&re(r,o),f&&zt(f.update)&&g[0]&1&&f.update.call(null,{text:`Requires the field value to be ${gs(h[0])} (aka. not ${V.zeroDefaultStr(h[0])}).`,position:"right"}),g[1]&4096&&c!==(c=h[43])&&p(s,"for",c)},d(h){h&&w(e),h&&w(i),h&&w(s),d=!1,Le(m)}}}function Jc(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[tC,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function tC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(s,"for",o=n[43])},m(u,f){S(u,e,f),e.checked=n[0].unique,S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[31]),r=!0)},p(u,f){f[1]&4096&&t!==(t=u[43])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&4096&&o!==(o=u[43])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Zc(n){let e,t,i,s,l,o,r,a,u,f;a=new Qn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[nC]},$$scope:{ctx:n}}});let c=n[8]&&Gc(n);return{c(){e=v("div"),t=v("div"),i=D(),s=v("div"),l=v("button"),o=v("i"),r=D(),q(a.$$.fragment),u=D(),c&&c.c(),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 txt-right")},m(d,m){S(d,e,m),b(e,t),b(e,i),b(e,s),b(s,l),b(l,o),b(l,r),j(a,l,null),b(s,u),c&&c.m(s,null),f=!0},p(d,m){const h={};m[1]&8192&&(h.$$scope={dirty:m,ctx:d}),a.$set(h),d[8]?c?c.p(d,m):(c=Gc(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i(d){f||(A(a.$$.fragment,d),f=!0)},o(d){P(a.$$.fragment,d),f=!1},d(d){d&&w(e),H(a),c&&c.d()}}}function nC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Gc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Done',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",yn(n[3])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function iC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$;s=new _e({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[VT,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:` form-field @@ -86,7 +86,7 @@ Set Admins only`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1walzui")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[10]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function _C(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` Set custom rule`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-success lock-toggle svelte-1walzui")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function bC(n){let e;return{c(){e=B("Leave empty to grant everyone access.")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function vC(n){let e,t,i,s,l;return{c(){e=B(`Only admins will be able to perform this action ( `),t=v("button"),t.textContent="unlock to change",i=B(` - ).`),p(t,"type","button"),p(t,"class","link-hint")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(t,"click",n[9]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function yC(n){let e;function t(l,o){return l[8]?vC:bC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function kC(n){let e,t,i,s,l=n[8]?"Admins only":"Custom rule",o,r,a,u,f,c,d,m,h;function g(E,I){return E[8]?_C:gC}let _=g(n),y=_(n);function k(E){n[13](E)}var T=n[6];function C(E){let I={id:E[17],baseCollection:E[1],disabled:E[8]};return E[0]!==void 0&&(I.value=E[0]),{props:I}}T&&(f=Kt(T,C(n)),n[12](f),ie.push(()=>ke(f,"value",k)));const M=n[11].default,$=Nt(M,n,n[14],rd),O=$||yC(n);return{c(){e=v("label"),t=v("span"),i=B(n[2]),s=B(" - "),o=B(l),r=D(),y.c(),u=D(),f&&q(f.$$.fragment),d=D(),m=v("div"),O&&O.c(),p(t,"class","txt"),p(e,"for",a=n[17]),p(m,"class","help-block")},m(E,I){S(E,e,I),b(e,t),b(t,i),b(t,s),b(t,o),b(e,r),y.m(e,null),S(E,u,I),f&&j(f,E,I),S(E,d,I),S(E,m,I),O&&O.m(m,null),h=!0},p(E,I){(!h||I&4)&&re(i,E[2]),(!h||I&256)&&l!==(l=E[8]?"Admins only":"Custom rule")&&re(o,l),_===(_=g(E))&&y?y.p(E,I):(y.d(1),y=_(E),y&&(y.c(),y.m(e,null))),(!h||I&131072&&a!==(a=E[17]))&&p(e,"for",a);const L={};if(I&131072&&(L.id=E[17]),I&2&&(L.baseCollection=E[1]),I&256&&(L.disabled=E[8]),!c&&I&1&&(c=!0,L.value=E[0],we(()=>c=!1)),T!==(T=E[6])){if(f){pe();const N=f;P(N.$$.fragment,1,0,()=>{H(N,1)}),me()}T?(f=Kt(T,C(E)),E[12](f),ie.push(()=>ke(f,"value",k)),q(f.$$.fragment),A(f.$$.fragment,1),j(f,d.parentNode,d)):f=null}else T&&f.$set(L);$?$.p&&(!h||I&16640)&&Rt($,M,E,E[14],h?Ft(M,E[14],I,pC):jt(E[14]),rd):O&&O.p&&(!h||I&256)&&O.p(E,h?I:-1)},i(E){h||(f&&A(f.$$.fragment,E),A(O,E),h=!0)},o(E){f&&P(f.$$.fragment,E),P(O,E),h=!1},d(E){E&&w(e),y.d(),E&&w(u),n[12](null),f&&H(f,E),E&&w(d),E&&w(m),O&&O.d(E)}}}function wC(n){let e,t,i,s;const l=[hC,mC],o=[];function r(a,u){return a[7]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),me(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let ad;function SC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,m=ad,h=!1;g();async function g(){m||h||(t(7,h=!0),t(6,m=(await ft(()=>import("./FilterAutocompleteInput-cac0f0ad.js"),["./FilterAutocompleteInput-cac0f0ad.js","./index-0935db40.js"],import.meta.url)).default),ad=m,t(7,h=!1))}async function _(){t(0,r=d||""),await cn(),c==null||c.focus()}async function y(){d=r,t(0,r=null)}function k(C){ie[C?"unshift":"push"](()=>{c=C,t(5,c)})}function T(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(14,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(8,i=r===null)},[r,o,a,u,f,c,m,h,i,_,y,s,k,T,l]}class hs extends ye{constructor(e){super(),ve(this,e,SC,wC,be,{collection:1,rule:0,label:2,formKey:3,required:4})}}function ud(n,e,t){const i=n.slice();return i[9]=e[t],i}function fd(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$,O,E,I,L,N,F,W,Z,ne=n[0].schema,J=[];for(let te=0;te@request filter:",y=D(),k=v("div"),k.innerHTML=`@request.method + ).`),p(t,"type","button"),p(t,"class","link-hint")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(t,"click",n[9]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function yC(n){let e;function t(l,o){return l[8]?vC:bC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function kC(n){let e,t,i,s,l=n[8]?"Admins only":"Custom rule",o,r,a,u,f,c,d,m,h;function g(E,I){return E[8]?_C:gC}let _=g(n),y=_(n);function k(E){n[13](E)}var T=n[6];function C(E){let I={id:E[17],baseCollection:E[1],disabled:E[8]};return E[0]!==void 0&&(I.value=E[0]),{props:I}}T&&(f=Kt(T,C(n)),n[12](f),ie.push(()=>ke(f,"value",k)));const M=n[11].default,$=Nt(M,n,n[14],rd),O=$||yC(n);return{c(){e=v("label"),t=v("span"),i=B(n[2]),s=B(" - "),o=B(l),r=D(),y.c(),u=D(),f&&q(f.$$.fragment),d=D(),m=v("div"),O&&O.c(),p(t,"class","txt"),p(e,"for",a=n[17]),p(m,"class","help-block")},m(E,I){S(E,e,I),b(e,t),b(t,i),b(t,s),b(t,o),b(e,r),y.m(e,null),S(E,u,I),f&&j(f,E,I),S(E,d,I),S(E,m,I),O&&O.m(m,null),h=!0},p(E,I){(!h||I&4)&&re(i,E[2]),(!h||I&256)&&l!==(l=E[8]?"Admins only":"Custom rule")&&re(o,l),_===(_=g(E))&&y?y.p(E,I):(y.d(1),y=_(E),y&&(y.c(),y.m(e,null))),(!h||I&131072&&a!==(a=E[17]))&&p(e,"for",a);const L={};if(I&131072&&(L.id=E[17]),I&2&&(L.baseCollection=E[1]),I&256&&(L.disabled=E[8]),!c&&I&1&&(c=!0,L.value=E[0],we(()=>c=!1)),T!==(T=E[6])){if(f){pe();const N=f;P(N.$$.fragment,1,0,()=>{H(N,1)}),me()}T?(f=Kt(T,C(E)),E[12](f),ie.push(()=>ke(f,"value",k)),q(f.$$.fragment),A(f.$$.fragment,1),j(f,d.parentNode,d)):f=null}else T&&f.$set(L);$?$.p&&(!h||I&16640)&&Rt($,M,E,E[14],h?Ft(M,E[14],I,pC):jt(E[14]),rd):O&&O.p&&(!h||I&256)&&O.p(E,h?I:-1)},i(E){h||(f&&A(f.$$.fragment,E),A(O,E),h=!0)},o(E){f&&P(f.$$.fragment,E),P(O,E),h=!1},d(E){E&&w(e),y.d(),E&&w(u),n[12](null),f&&H(f,E),E&&w(d),E&&w(m),O&&O.d(E)}}}function wC(n){let e,t,i,s;const l=[hC,mC],o=[];function r(a,u){return a[7]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),me(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let ad;function SC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,m=ad,h=!1;g();async function g(){m||h||(t(7,h=!0),t(6,m=(await ft(()=>import("./FilterAutocompleteInput-47d03028.js"),["./FilterAutocompleteInput-47d03028.js","./index-0935db40.js"],import.meta.url)).default),ad=m,t(7,h=!1))}async function _(){t(0,r=d||""),await cn(),c==null||c.focus()}async function y(){d=r,t(0,r=null)}function k(C){ie[C?"unshift":"push"](()=>{c=C,t(5,c)})}function T(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(14,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(8,i=r===null)},[r,o,a,u,f,c,m,h,i,_,y,s,k,T,l]}class hs extends ye{constructor(e){super(),ve(this,e,SC,wC,be,{collection:1,rule:0,label:2,formKey:3,required:4})}}function ud(n,e,t){const i=n.slice();return i[9]=e[t],i}function fd(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$,O,E,I,L,N,F,W,Z,ne=n[0].schema,J=[];for(let te=0;te@request filter:",y=D(),k=v("div"),k.innerHTML=`@request.method @request.query.* @request.data.* @request.auth.*`,T=D(),C=v("hr"),M=D(),$=v("p"),$.innerHTML="You could also add constraints and query other collections using the @collection filter:",O=D(),E=v("div"),E.innerHTML="@collection.ANY_COLLECTION_NAME.*",I=D(),L=v("hr"),N=D(),F=v("p"),F.innerHTML=`Example rule: @@ -95,24 +95,24 @@ changing the password without requiring to enter the old one, directly updating the verified state or email, etc.`,t=D(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:G,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function MC(n){var ae;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$,O,E,I,L,N,F,W,Z,ne,J,te,ee,z,X,Y=n[1]&&fd(n);function le(oe){n[3](oe)}let He={label:"List/Search action",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(He.rule=n[0].listRule),f=new hs({props:He}),ie.push(()=>ke(f,"rule",le));function Re(oe){n[4](oe)}let Fe={label:"View action",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(Fe.rule=n[0].viewRule),g=new hs({props:Fe}),ie.push(()=>ke(g,"rule",Re));function qe(oe){n[5](oe)}let ge={label:"Create action",formKey:"createRule",collection:n[0]};n[0].createRule!==void 0&&(ge.rule=n[0].createRule),C=new hs({props:ge}),ie.push(()=>ke(C,"rule",qe));function Se(oe){n[6](oe)}let Ue={label:"Update action",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(Ue.rule=n[0].updateRule),I=new hs({props:Ue}),ie.push(()=>ke(I,"rule",Se));function lt(oe){n[7](oe)}let ue={label:"Delete action",formKey:"deleteRule",collection:n[0]};n[0].deleteRule!==void 0&&(ue.rule=n[0].deleteRule),Z=new hs({props:ue}),ie.push(()=>ke(Z,"rule",lt));let fe=((ae=n[0])==null?void 0:ae.isAuth)&&dd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the
    PocketBase filter syntax and operators - .`,s=D(),l=v("button"),r=B(o),a=D(),Y&&Y.c(),u=D(),q(f.$$.fragment),d=D(),m=v("hr"),h=D(),q(g.$$.fragment),y=D(),k=v("hr"),T=D(),q(C.$$.fragment),$=D(),O=v("hr"),E=D(),q(I.$$.fragment),N=D(),F=v("hr"),W=D(),q(Z.$$.fragment),J=D(),fe&&fe.c(),te=Ae(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-base"),p(m,"class","m-t-sm m-b-sm"),p(k,"class","m-t-sm m-b-sm"),p(O,"class","m-t-sm m-b-sm"),p(F,"class","m-t-sm m-b-sm")},m(oe,je){S(oe,e,je),b(e,t),b(t,i),b(t,s),b(t,l),b(l,r),b(e,a),Y&&Y.m(e,null),S(oe,u,je),j(f,oe,je),S(oe,d,je),S(oe,m,je),S(oe,h,je),j(g,oe,je),S(oe,y,je),S(oe,k,je),S(oe,T,je),j(C,oe,je),S(oe,$,je),S(oe,O,je),S(oe,E,je),j(I,oe,je),S(oe,N,je),S(oe,F,je),S(oe,W,je),j(Z,oe,je),S(oe,J,je),fe&&fe.m(oe,je),S(oe,te,je),ee=!0,z||(X=K(l,"click",n[2]),z=!0)},p(oe,[je]){var nt;(!ee||je&2)&&o!==(o=oe[1]?"Hide available fields":"Show available fields")&&re(r,o),oe[1]?Y?(Y.p(oe,je),je&2&&A(Y,1)):(Y=fd(oe),Y.c(),A(Y,1),Y.m(e,null)):Y&&(pe(),P(Y,1,1,()=>{Y=null}),me());const Me={};je&1&&(Me.collection=oe[0]),!c&&je&1&&(c=!0,Me.rule=oe[0].listRule,we(()=>c=!1)),f.$set(Me);const Te={};je&1&&(Te.collection=oe[0]),!_&&je&1&&(_=!0,Te.rule=oe[0].viewRule,we(()=>_=!1)),g.$set(Te);const de={};je&1&&(de.collection=oe[0]),!M&&je&1&&(M=!0,de.rule=oe[0].createRule,we(()=>M=!1)),C.$set(de);const $e={};je&1&&($e.collection=oe[0]),!L&&je&1&&(L=!0,$e.rule=oe[0].updateRule,we(()=>L=!1)),I.$set($e);const Ze={};je&1&&(Ze.collection=oe[0]),!ne&&je&1&&(ne=!0,Ze.rule=oe[0].deleteRule,we(()=>ne=!1)),Z.$set(Ze),(nt=oe[0])!=null&&nt.isAuth?fe?(fe.p(oe,je),je&1&&A(fe,1)):(fe=dd(oe),fe.c(),A(fe,1),fe.m(te.parentNode,te)):fe&&(pe(),P(fe,1,1,()=>{fe=null}),me())},i(oe){ee||(A(Y),A(f.$$.fragment,oe),A(g.$$.fragment,oe),A(C.$$.fragment,oe),A(I.$$.fragment,oe),A(Z.$$.fragment,oe),A(fe),ee=!0)},o(oe){P(Y),P(f.$$.fragment,oe),P(g.$$.fragment,oe),P(C.$$.fragment,oe),P(I.$$.fragment,oe),P(Z.$$.fragment,oe),P(fe),ee=!1},d(oe){oe&&w(e),Y&&Y.d(),oe&&w(u),H(f,oe),oe&&w(d),oe&&w(m),oe&&w(h),H(g,oe),oe&&w(y),oe&&w(k),oe&&w(T),H(C,oe),oe&&w($),oe&&w(O),oe&&w(E),H(I,oe),oe&&w(N),oe&&w(F),oe&&w(W),H(Z,oe),oe&&w(J),fe&&fe.d(oe),oe&&w(te),z=!1,X()}}}function DC(n,e,t){let{collection:i=new bn}=e,s=!1;const l=()=>t(1,s=!s);function o(d){n.$$.not_equal(i.listRule,d)&&(i.listRule=d,t(0,i))}function r(d){n.$$.not_equal(i.viewRule,d)&&(i.viewRule=d,t(0,i))}function a(d){n.$$.not_equal(i.createRule,d)&&(i.createRule=d,t(0,i))}function u(d){n.$$.not_equal(i.updateRule,d)&&(i.updateRule=d,t(0,i))}function f(d){n.$$.not_equal(i.deleteRule,d)&&(i.deleteRule=d,t(0,i))}function c(d){n.$$.not_equal(i.options.manageRule,d)&&(i.options.manageRule=d,t(0,i))}return n.$$set=d=>{"collection"in d&&t(0,i=d.collection)},[i,s,l,o,r,a,u,f,c]}class OC extends ye{constructor(e){super(),ve(this,e,DC,MC,be,{collection:0})}}function EC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function AC(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[EC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function IC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function PC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function pd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function LC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowUsernameAuth?PC:IC}let u=a(n),f=u(n),c=n[3]&&pd();return{c(){e=v("div"),e.innerHTML=` + .`,s=D(),l=v("button"),r=B(o),a=D(),Y&&Y.c(),u=D(),q(f.$$.fragment),d=D(),m=v("hr"),h=D(),q(g.$$.fragment),y=D(),k=v("hr"),T=D(),q(C.$$.fragment),$=D(),O=v("hr"),E=D(),q(I.$$.fragment),N=D(),F=v("hr"),W=D(),q(Z.$$.fragment),J=D(),fe&&fe.c(),te=Ae(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-base"),p(m,"class","m-t-sm m-b-sm"),p(k,"class","m-t-sm m-b-sm"),p(O,"class","m-t-sm m-b-sm"),p(F,"class","m-t-sm m-b-sm")},m(oe,je){S(oe,e,je),b(e,t),b(t,i),b(t,s),b(t,l),b(l,r),b(e,a),Y&&Y.m(e,null),S(oe,u,je),j(f,oe,je),S(oe,d,je),S(oe,m,je),S(oe,h,je),j(g,oe,je),S(oe,y,je),S(oe,k,je),S(oe,T,je),j(C,oe,je),S(oe,$,je),S(oe,O,je),S(oe,E,je),j(I,oe,je),S(oe,N,je),S(oe,F,je),S(oe,W,je),j(Z,oe,je),S(oe,J,je),fe&&fe.m(oe,je),S(oe,te,je),ee=!0,z||(X=K(l,"click",n[2]),z=!0)},p(oe,[je]){var nt;(!ee||je&2)&&o!==(o=oe[1]?"Hide available fields":"Show available fields")&&re(r,o),oe[1]?Y?(Y.p(oe,je),je&2&&A(Y,1)):(Y=fd(oe),Y.c(),A(Y,1),Y.m(e,null)):Y&&(pe(),P(Y,1,1,()=>{Y=null}),me());const Me={};je&1&&(Me.collection=oe[0]),!c&&je&1&&(c=!0,Me.rule=oe[0].listRule,we(()=>c=!1)),f.$set(Me);const Te={};je&1&&(Te.collection=oe[0]),!_&&je&1&&(_=!0,Te.rule=oe[0].viewRule,we(()=>_=!1)),g.$set(Te);const ce={};je&1&&(ce.collection=oe[0]),!M&&je&1&&(M=!0,ce.rule=oe[0].createRule,we(()=>M=!1)),C.$set(ce);const $e={};je&1&&($e.collection=oe[0]),!L&&je&1&&(L=!0,$e.rule=oe[0].updateRule,we(()=>L=!1)),I.$set($e);const Ze={};je&1&&(Ze.collection=oe[0]),!ne&&je&1&&(ne=!0,Ze.rule=oe[0].deleteRule,we(()=>ne=!1)),Z.$set(Ze),(nt=oe[0])!=null&&nt.isAuth?fe?(fe.p(oe,je),je&1&&A(fe,1)):(fe=dd(oe),fe.c(),A(fe,1),fe.m(te.parentNode,te)):fe&&(pe(),P(fe,1,1,()=>{fe=null}),me())},i(oe){ee||(A(Y),A(f.$$.fragment,oe),A(g.$$.fragment,oe),A(C.$$.fragment,oe),A(I.$$.fragment,oe),A(Z.$$.fragment,oe),A(fe),ee=!0)},o(oe){P(Y),P(f.$$.fragment,oe),P(g.$$.fragment,oe),P(C.$$.fragment,oe),P(I.$$.fragment,oe),P(Z.$$.fragment,oe),P(fe),ee=!1},d(oe){oe&&w(e),Y&&Y.d(),oe&&w(u),H(f,oe),oe&&w(d),oe&&w(m),oe&&w(h),H(g,oe),oe&&w(y),oe&&w(k),oe&&w(T),H(C,oe),oe&&w($),oe&&w(O),oe&&w(E),H(I,oe),oe&&w(N),oe&&w(F),oe&&w(W),H(Z,oe),oe&&w(J),fe&&fe.d(oe),oe&&w(te),z=!1,X()}}}function DC(n,e,t){let{collection:i=new bn}=e,s=!1;const l=()=>t(1,s=!s);function o(d){n.$$.not_equal(i.listRule,d)&&(i.listRule=d,t(0,i))}function r(d){n.$$.not_equal(i.viewRule,d)&&(i.viewRule=d,t(0,i))}function a(d){n.$$.not_equal(i.createRule,d)&&(i.createRule=d,t(0,i))}function u(d){n.$$.not_equal(i.updateRule,d)&&(i.updateRule=d,t(0,i))}function f(d){n.$$.not_equal(i.deleteRule,d)&&(i.deleteRule=d,t(0,i))}function c(d){n.$$.not_equal(i.options.manageRule,d)&&(i.options.manageRule=d,t(0,i))}return n.$$set=d=>{"collection"in d&&t(0,i=d.collection)},[i,s,l,o,r,a,u,f,c]}class OC extends ye{constructor(e){super(),ve(this,e,DC,MC,be,{collection:0})}}function EC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function AC(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[EC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function IC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function PC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function pd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function LC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowUsernameAuth?PC:IC}let u=a(n),f=u(n),c=n[3]&&pd();return{c(){e=v("div"),e.innerHTML=` Username/Password`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?m&8&&A(c,1):(c=pd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function NC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function md(n){let e,t,i,s,l,o,r,a;return i=new _e({props:{class:"form-field "+(V.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[FC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+(V.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[RC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(V.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(V.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&st(()=>{r||(r=Be(e,Ht,{duration:150},!0)),r.run(1)}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=Be(e,Ht,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),H(i),H(o),u&&r&&r.end()}}}function FC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(_){n[7](_)}let g={id:n[12],disabled:!V.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(_,y){S(_,e,y),b(e,t),b(e,i),b(e,s),S(_,o,y),j(r,_,y),S(_,u,y),S(_,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`Email domains that are NOT allowed to sign up. This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&4096&&l!==(l=_[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=_[12]),y&1&&(k.disabled=!V.isEmpty(_[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,k.value=_[0].options.exceptEmailDomains,we(()=>a=!1)),r.$set(k)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){P(r.$$.fragment,_),c=!1},d(_){_&&w(e),_&&w(o),H(r,_),_&&w(u),_&&w(f),d=!1,m()}}}function RC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(_){n[8](_)}let g={id:n[12],disabled:!V.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new Ns({props:g}),ie.push(()=>ke(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=D(),s=v("i"),o=D(),q(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(_,y){S(_,e,y),b(e,t),b(e,i),b(e,s),S(_,o,y),j(r,_,y),S(_,u,y),S(_,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`Email domains that are ONLY allowed to sign up. This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&4096&&l!==(l=_[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=_[12]),y&1&&(k.disabled=!V.isEmpty(_[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,k.value=_[0].options.onlyEmailDomains,we(()=>a=!1)),r.$set(k)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){P(r.$$.fragment,_),c=!1},d(_){_&&w(e),_&&w(o),H(r,_),_&&w(u),_&&w(f),d=!1,m()}}}function jC(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[NC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&md(n);return{c(){q(e.$$.fragment),t=D(),l&&l.c(),i=Ae()},m(o,r){j(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=md(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function HC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function qC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function hd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function VC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowEmailAuth?qC:HC}let u=a(n),f=u(n),c=n[2]&&hd();return{c(){e=v("div"),e.innerHTML=` Email/Password`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?m&4&&A(c,1):(c=hd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function zC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function gd(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&st(()=>{t||(t=Be(e,Ht,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=Be(e,Ht,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function BC(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[zC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&gd();return{c(){q(e.$$.fragment),t=D(),l&&l.c(),i=Ae()},m(o,r){j(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=gd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function UC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function WC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function _d(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function YC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowOAuth2Auth?WC:UC}let u=a(n),f=u(n),c=n[1]&&_d();return{c(){e=v("div"),e.innerHTML=` - OAuth2`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?m&2&&A(c,1):(c=_d(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function KC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Minimum password length"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].options.minPasswordLength),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.minPasswordLength&&ce(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function JC(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Always require email",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){S(c,e,d),e.checked=n[0].options.requireEmail,S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"change",n[11]),Pe(Ye.call(null,r,{text:`The constraint is applied only for new records. + OAuth2`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?m&2&&A(c,1):(c=_d(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function KC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Minimum password length"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].options.minPasswordLength),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.minPasswordLength&&de(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function JC(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Always require email",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){S(c,e,d),e.checked=n[0].options.requireEmail,S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"change",n[11]),Pe(Ye.call(null,r,{text:`The constraint is applied only for new records. Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function ZC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y;return s=new ys({props:{single:!0,$$slots:{header:[LC],default:[AC]},$$scope:{ctx:n}}}),o=new ys({props:{single:!0,$$slots:{header:[VC],default:[jC]},$$scope:{ctx:n}}}),a=new ys({props:{single:!0,$$slots:{header:[YC],default:[BC]},$$scope:{ctx:n}}}),h=new _e({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[KC,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),_=new _e({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[JC,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=D(),i=v("div"),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),f=v("hr"),c=D(),d=v("h4"),d.textContent="General",m=D(),q(h.$$.fragment),g=D(),q(_.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(k,T){S(k,e,T),S(k,t,T),S(k,i,T),j(s,i,null),b(i,l),j(o,i,null),b(i,r),j(a,i,null),S(k,u,T),S(k,f,T),S(k,c,T),S(k,d,T),S(k,m,T),j(h,k,T),S(k,g,T),j(_,k,T),y=!0},p(k,[T]){const C={};T&8201&&(C.$$scope={dirty:T,ctx:k}),s.$set(C);const M={};T&8197&&(M.$$scope={dirty:T,ctx:k}),o.$set(M);const $={};T&8195&&($.$$scope={dirty:T,ctx:k}),a.$set($);const O={};T&12289&&(O.$$scope={dirty:T,ctx:k}),h.$set(O);const E={};T&12289&&(E.$$scope={dirty:T,ctx:k}),_.$set(E)},i(k){y||(A(s.$$.fragment,k),A(o.$$.fragment,k),A(a.$$.fragment,k),A(h.$$.fragment,k),A(_.$$.fragment,k),y=!0)},o(k){P(s.$$.fragment,k),P(o.$$.fragment,k),P(a.$$.fragment,k),P(h.$$.fragment,k),P(_.$$.fragment,k),y=!1},d(k){k&&w(e),k&&w(t),k&&w(i),H(s),H(o),H(a),k&&w(u),k&&w(f),k&&w(c),k&&w(d),k&&w(m),H(h,k),k&&w(g),H(_,k)}}}function GC(n,e,t){let i,s,l,o;Je(n,Ci,g=>t(4,o=g));let{collection:r=new bn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(g){n.$$.not_equal(r.options.exceptEmailDomains,g)&&(r.options.exceptEmailDomains=g,t(0,r))}function c(g){n.$$.not_equal(r.options.onlyEmailDomains,g)&&(r.options.onlyEmailDomains=g,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=ht(this.value),t(0,r)}function h(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=g=>{"collection"in g&&t(0,r=g.collection)},n.$$.update=()=>{var g,_,y,k;n.$$.dirty&1&&r.isAuth&&V.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!V.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.allowEmailAuth)||!V.isEmpty((_=o==null?void 0:o.options)==null?void 0:_.onlyEmailDomains)||!V.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!V.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,m,h]}class XC extends ye{constructor(e){super(),ve(this,e,GC,ZC,be,{collection:0})}}function bd(n,e,t){const i=n.slice();return i[14]=e[t],i}function vd(n,e,t){const i=n.slice();return i[14]=e[t],i}function yd(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function kd(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=v("li"),t=v("div"),i=B(`Renamed collection `),s=v("strong"),o=B(l),r=D(),a=v("i"),u=D(),f=v("strong"),d=B(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(m,h){S(m,e,h),b(e,t),b(t,i),b(t,s),b(s,o),b(t,r),b(t,a),b(t,u),b(t,f),b(f,d)},p(m,h){h&2&&l!==(l=m[1].originalName+"")&&re(o,l),h&2&&c!==(c=m[1].name+"")&&re(d,c)},d(m){m&&w(e)}}}function wd(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=v("li"),t=v("div"),i=B(`Renamed field `),s=v("strong"),o=B(l),r=D(),a=v("i"),u=D(),f=v("strong"),d=B(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(m,h){S(m,e,h),b(e,t),b(t,i),b(t,s),b(s,o),b(t,r),b(t,a),b(t,u),b(t,f),b(f,d)},p(m,h){h&16&&l!==(l=m[14].originalName+"")&&re(o,l),h&16&&c!==(c=m[14].name+"")&&re(d,c)},d(m){m&&w(e)}}}function Sd(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=v("li"),t=B("Removed field "),i=v("span"),l=B(s),o=D(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){S(r,e,a),b(e,t),b(e,i),b(i,l),b(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&re(l,s)},d(r){r&&w(e)}}}function QC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=n[3].length&&yd(),h=n[5]&&kd(n),g=n[4],_=[];for(let T=0;T',i=D(),s=v("div"),l=v("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to update it manually!`,o=D(),m&&m.c(),r=D(),a=v("h6"),a.textContent="Changes:",u=D(),f=v("ul"),h&&h.c(),c=D();for(let T=0;T<_.length;T+=1)_[T].c();d=D();for(let T=0;TCancel',t=D(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[K(e,"click",n[8]),K(i,"click",n[9])],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function t$(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[e$],header:[xC],default:[QC]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function n$(n,e,t){let i,s,l;const o=$t();let r,a;async function u(y){t(1,a=y),await cn(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),m=()=>c();function h(y){ie[y?"unshift":"push"](()=>{r=y,t(2,r)})}function g(y){We.call(this,n,y)}function _(y){We.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,m,h,g,_]}class i$ extends ye{constructor(e){super(),ve(this,e,n$,t$,be,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function Td(n,e,t){const i=n.slice();return i[46]=e[t][0],i[47]=e[t][1],i}function Cd(n){let e,t,i,s;function l(r){n[32](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new OC({props:o}),ie.push(()=>ke(t,"collection",l)),{c(){e=v("div"),q(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){S(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],we(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function $d(n){let e,t,i,s;function l(r){n[33](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new XC({props:o}),ie.push(()=>ke(t,"collection",l)),{c(){e=v("div"),q(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===Os)},m(r,a){S(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],we(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&Q(e,"active",r[3]===Os)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function s$(n){let e,t,i,s,l,o,r;function a(d){n[31](d)}let u={};n[2]!==void 0&&(u.collection=n[2]),i=new dC({props:u}),ie.push(()=>ke(i,"collection",a));let f=n[3]===bl&&Cd(n),c=n[2].isAuth&&$d(n);return{c(){e=v("div"),t=v("div"),q(i.$$.fragment),l=D(),f&&f.c(),o=D(),c&&c.c(),p(t,"class","tab-item"),Q(t,"active",n[3]===_i),p(e,"class","tabs-content svelte-1yfp6mj")},m(d,m){S(d,e,m),b(e,t),j(i,t,null),b(e,l),f&&f.m(e,null),b(e,o),c&&c.m(e,null),r=!0},p(d,m){const h={};!s&&m[0]&4&&(s=!0,h.collection=d[2],we(()=>s=!1)),i.$set(h),(!r||m[0]&8)&&Q(t,"active",d[3]===_i),d[3]===bl?f?(f.p(d,m),m[0]&8&&A(f,1)):(f=Cd(d),f.c(),A(f,1),f.m(e,o)):f&&(pe(),P(f,1,1,()=>{f=null}),me()),d[2].isAuth?c?(c.p(d,m),m[0]&4&&A(c,1)):(c=$d(d),c.c(),A(c,1),c.m(e,null)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(i.$$.fragment,d),A(f),A(c),r=!0)},o(d){P(i.$$.fragment,d),P(f),P(c),r=!1},d(d){d&&w(e),H(i),f&&f.d(),c&&c.d()}}}function Md(n){let e,t,i,s,l,o,r;return o=new Qn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[l$]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=D(),i=v("button"),s=v("i"),l=D(),q(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"aria-label","More"),p(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),b(i,s),b(i,l),j(o,i,null),r=!0},p(a,u){const f={};u[1]&524288&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),H(o)}}}function l$(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=` Duplicate`,t=D(),i=v("button"),i.innerHTML=` Delete`,p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[K(e,"click",n[23]),K(i,"click",yn(pt(n[24])))],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function Dd(n){let e,t,i,s;return i=new Qn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[o$]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=D(),q(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&524288&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),H(i,l)}}}function Od(n){let e,t,i,s,l,o=n[47]+"",r,a,u,f,c;function d(){return n[26](n[46])}return{c(){e=v("button"),t=v("i"),s=D(),l=v("span"),r=B(o),a=B(" collection"),u=D(),p(t,"class",i=yi(V.getCollectionTypeIcon(n[46]))+" svelte-1yfp6mj"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),Q(e,"selected",n[46]==n[2].type)},m(m,h){S(m,e,h),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),b(e,u),f||(c=K(e,"click",d),f=!0)},p(m,h){n=m,h[0]&64&&i!==(i=yi(V.getCollectionTypeIcon(n[46]))+" svelte-1yfp6mj")&&p(t,"class",i),h[0]&64&&o!==(o=n[47]+"")&&re(r,o),h[0]&68&&Q(e,"selected",n[46]==n[2].type)},d(m){m&&w(e),f=!1,c()}}}function o$(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{N=null}),me()),(!E||Z[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(W[2].isNew?"btn-hint":"btn-transparent")))&&p(d,"class",C),(!E||Z[0]&4&&M!==(M=!W[2].isNew))&&(d.disabled=M),W[2].system?F||(F=Ed(),F.c(),F.m(O.parentNode,O)):F&&(F.d(1),F=null)},i(W){E||(A(N),E=!0)},o(W){P(N),E=!1},d(W){W&&w(e),W&&w(s),W&&w(l),W&&w(f),W&&w(c),N&&N.d(),W&&w($),F&&F.d(W),W&&w(O),I=!1,L()}}}function Ad(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Pe(t=Ye.call(null,e,n[13])),l=!0)},p(r,a){t&&zt(t.update)&&a[0]&8192&&t.update.call(null,r[13])},i(r){s||(r&&st(()=>{i||(i=Be(e,It,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=Be(e,It,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function Id(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Pd(n){var a,u,f;let e,t,i,s=!V.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&Ld();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=D(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),Q(e,"active",n[3]===Os)},m(c,d){S(c,e,d),b(e,t),b(e,i),r&&r.m(e,null),l||(o=K(e,"click",n[30]),l=!0)},p(c,d){var m,h,g;d[0]&32&&(s=!V.isEmpty((m=c[5])==null?void 0:m.options)&&!((g=(h=c[5])==null?void 0:h.options)!=null&&g.manageRule)),s?r?d[0]&32&&A(r,1):(r=Ld(),r.c(),A(r,1),r.m(e,null)):r&&(pe(),P(r,1,1,()=>{r=null}),me()),d[0]&8&&Q(e,"active",c[3]===Os)},d(c){c&&w(e),r&&r.d(),l=!1,o()}}}function Ld(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function a$(n){var W,Z,ne,J,te,ee,z,X;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,m,h,g=!V.isEmpty((W=n[5])==null?void 0:W.schema),_,y,k,T,C=!V.isEmpty((Z=n[5])==null?void 0:Z.listRule)||!V.isEmpty((ne=n[5])==null?void 0:ne.viewRule)||!V.isEmpty((J=n[5])==null?void 0:J.createRule)||!V.isEmpty((te=n[5])==null?void 0:te.updateRule)||!V.isEmpty((ee=n[5])==null?void 0:ee.deleteRule)||!V.isEmpty((X=(z=n[5])==null?void 0:z.options)==null?void 0:X.manageRule),M,$,O,E,I=!n[2].isNew&&!n[2].system&&Md(n);r=new _e({props:{class:"form-field collection-field-name required m-b-0 "+(n[12]?"disabled":""),name:"name",$$slots:{default:[r$,({uniqueId:Y})=>({45:Y}),({uniqueId:Y})=>[0,Y?16384:0]]},$$scope:{ctx:n}}});let L=g&&Ad(n),N=C&&Id(),F=n[2].isAuth&&Pd(n);return{c(){e=v("h4"),i=B(t),s=D(),I&&I.c(),l=D(),o=v("form"),q(r.$$.fragment),a=D(),u=v("input"),f=D(),c=v("div"),d=v("button"),m=v("span"),m.textContent="Fields",h=D(),L&&L.c(),_=D(),y=v("button"),k=v("span"),k.textContent="API Rules",T=D(),N&&N.c(),M=D(),F&&F.c(),p(e,"class","upsert-panel-title svelte-1yfp6mj"),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(m,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),Q(d,"active",n[3]===_i),p(k,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),Q(y,"active",n[3]===bl),p(c,"class","tabs-header stretched")},m(Y,le){S(Y,e,le),b(e,i),S(Y,s,le),I&&I.m(Y,le),S(Y,l,le),S(Y,o,le),j(r,o,null),b(o,a),b(o,u),S(Y,f,le),S(Y,c,le),b(c,d),b(d,m),b(d,h),L&&L.m(d,null),b(c,_),b(c,y),b(y,k),b(y,T),N&&N.m(y,null),b(c,M),F&&F.m(c,null),$=!0,O||(E=[K(o,"submit",pt(n[27])),K(d,"click",n[28]),K(y,"click",n[29])],O=!0)},p(Y,le){var Re,Fe,qe,ge,Se,Ue,lt,ue;(!$||le[0]&4)&&t!==(t=Y[2].isNew?"New collection":"Edit collection")&&re(i,t),!Y[2].isNew&&!Y[2].system?I?(I.p(Y,le),le[0]&4&&A(I,1)):(I=Md(Y),I.c(),A(I,1),I.m(l.parentNode,l)):I&&(pe(),P(I,1,1,()=>{I=null}),me());const He={};le[0]&4096&&(He.class="form-field collection-field-name required m-b-0 "+(Y[12]?"disabled":"")),le[0]&4164|le[1]&540672&&(He.$$scope={dirty:le,ctx:Y}),r.$set(He),le[0]&32&&(g=!V.isEmpty((Re=Y[5])==null?void 0:Re.schema)),g?L?(L.p(Y,le),le[0]&32&&A(L,1)):(L=Ad(Y),L.c(),A(L,1),L.m(d,null)):L&&(pe(),P(L,1,1,()=>{L=null}),me()),(!$||le[0]&8)&&Q(d,"active",Y[3]===_i),le[0]&32&&(C=!V.isEmpty((Fe=Y[5])==null?void 0:Fe.listRule)||!V.isEmpty((qe=Y[5])==null?void 0:qe.viewRule)||!V.isEmpty((ge=Y[5])==null?void 0:ge.createRule)||!V.isEmpty((Se=Y[5])==null?void 0:Se.updateRule)||!V.isEmpty((Ue=Y[5])==null?void 0:Ue.deleteRule)||!V.isEmpty((ue=(lt=Y[5])==null?void 0:lt.options)==null?void 0:ue.manageRule)),C?N?le[0]&32&&A(N,1):(N=Id(),N.c(),A(N,1),N.m(y,null)):N&&(pe(),P(N,1,1,()=>{N=null}),me()),(!$||le[0]&8)&&Q(y,"active",Y[3]===bl),Y[2].isAuth?F?F.p(Y,le):(F=Pd(Y),F.c(),F.m(c,null)):F&&(F.d(1),F=null)},i(Y){$||(A(I),A(r.$$.fragment,Y),A(L),A(N),$=!0)},o(Y){P(I),P(r.$$.fragment,Y),P(L),P(N),$=!1},d(Y){Y&&w(e),Y&&w(s),I&&I.d(Y),Y&&w(l),Y&&w(o),H(r),Y&&w(f),Y&&w(c),L&&L.d(),N&&N.d(),F&&F.d(),O=!1,Le(E)}}}function u$(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=D(),s=v("button"),l=v("span"),r=B(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[9],Q(s,"btn-loading",n[9])},m(c,d){S(c,e,d),b(e,t),S(c,i,d),S(c,s,d),b(s,l),b(l,r),u||(f=[K(e,"click",n[21]),K(s,"click",n[22])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&re(r,o),d[0]&2560&&a!==(a=!c[11]||c[9])&&(s.disabled=a),d[0]&512&&Q(s,"btn-loading",c[9])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function f$(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[34],$$slots:{footer:[u$],header:[a$],default:[s$]},$$scope:{ctx:n}};e=new Bn({props:l}),n[35](e),e.$on("hide",n[36]),e.$on("show",n[37]);let o={};return i=new i$({props:o}),n[38](i),i.$on("confirm",n[39]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(r,a){j(e,r,a),S(r,t,a),j(i,r,a),s=!0},p(r,a){const u={};a[0]&1040&&(u.beforeHide=r[34]),a[0]&14956|a[1]&524288&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[35](null),H(e,r),r&&w(t),n[38](null),H(i,r)}}}const _i="fields",bl="api_rules",Os="options",c$="base",Nd="auth";function Mr(n){return JSON.stringify(n)}function d$(n,e,t){let i,s,l,o,r;Je(n,Ci,fe=>t(5,r=fe));const a={};a[c$]="Base",a[Nd]="Auth";const u=$t();let f,c,d=null,m=new bn,h=!1,g=!1,_=_i,y=Mr(m);function k(fe){t(3,_=fe)}function T(fe){return M(fe),t(10,g=!0),k(_i),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(fe){Vn({}),typeof fe<"u"?(d=fe,t(2,m=fe==null?void 0:fe.clone())):(d=null,t(2,m=new bn)),t(2,m.schema=m.schema||[],m),t(2,m.originalName=m.name||"",m),await cn(),t(20,y=Mr(m))}function $(){if(m.isNew)return O();c==null||c.show(m)}function O(){if(h)return;t(9,h=!0);const fe=E();let ae;m.isNew?ae=he.collections.create(fe):ae=he.collections.update(m.id,fe),ae.then(oe=>{Ca(),eb(oe.id),t(10,g=!1),C(),Vt(m.isNew?"Successfully created collection.":"Successfully updated collection."),u("save",{isNew:m.isNew,collection:oe})}).catch(oe=>{he.errorResponseHandler(oe)}).finally(()=>{t(9,h=!1)})}function E(){const fe=m.export();fe.schema=fe.schema.slice(0);for(let ae=fe.schema.length-1;ae>=0;ae--)fe.schema[ae].toDelete&&fe.schema.splice(ae,1);return fe}function I(){d!=null&&d.id&&un(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>he.collections.delete(d==null?void 0:d.id).then(()=>{C(),Vt(`Successfully deleted collection "${d==null?void 0:d.name}".`),u("delete",d),s3(d)}).catch(fe=>{he.errorResponseHandler(fe)}))}function L(fe){t(2,m.type=fe,m),Ts("schema")}function N(){l?un("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const fe=d==null?void 0:d.clone();if(fe&&(fe.id="",fe.created="",fe.updated="",fe.name+="_duplicate",!V.isEmpty(fe.schema)))for(const ae of fe.schema)ae.id="";T(fe),await cn(),t(20,y="")}const W=()=>C(),Z=()=>$(),ne=()=>N(),J=()=>I(),te=fe=>{t(2,m.name=V.slugify(fe.target.value),m),fe.target.value=m.name},ee=fe=>L(fe),z=()=>{o&&$()},X=()=>k(_i),Y=()=>k(bl),le=()=>k(Os);function He(fe){m=fe,t(2,m)}function Re(fe){m=fe,t(2,m)}function Fe(fe){m=fe,t(2,m)}const qe=()=>l&&g?(un("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,g=!1),C()}),!1):!0;function ge(fe){ie[fe?"unshift":"push"](()=>{f=fe,t(7,f)})}function Se(fe){We.call(this,n,fe)}function Ue(fe){We.call(this,n,fe)}function lt(fe){ie[fe?"unshift":"push"](()=>{c=fe,t(8,c)})}const ue=()=>O();return n.$$.update=()=>{n.$$.dirty[0]&32&&t(13,i=typeof V.getNestedVal(r,"schema.message",null)=="string"?V.getNestedVal(r,"schema.message"):"Has errors"),n.$$.dirty[0]&4&&t(12,s=!m.isNew&&m.system),n.$$.dirty[0]&1048580&&t(4,l=y!=Mr(m)),n.$$.dirty[0]&20&&t(11,o=m.isNew||l),n.$$.dirty[0]&12&&_===Os&&m.type!==Nd&&k(_i)},[k,C,m,_,l,r,a,f,c,h,g,o,s,i,$,O,I,L,N,T,y,W,Z,ne,J,te,ee,z,X,Y,le,He,Re,Fe,qe,ge,Se,Ue,lt,ue]}class tu extends ye{constructor(e){super(),ve(this,e,d$,f$,be,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function Fd(n,e,t){const i=n.slice();return i[15]=e[t],i}function Rd(n){let e,t=n[1].length&&jd();return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=jd(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function jd(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Hd(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,c,d;return{key:n,first:null,c(){var m;t=v("a"),i=v("i"),l=D(),o=v("span"),a=B(r),u=D(),p(i,"class",s=V.getCollectionTypeIcon(e[15].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[15].id),p(t,"class","sidebar-list-item"),Q(t,"active",((m=e[5])==null?void 0:m.id)===e[15].id),this.first=t},m(m,h){S(m,t,h),b(t,i),b(t,l),b(t,o),b(o,a),b(t,u),c||(d=Pe(Xt.call(null,t)),c=!0)},p(m,h){var g;e=m,h&8&&s!==(s=V.getCollectionTypeIcon(e[15].type))&&p(i,"class",s),h&8&&r!==(r=e[15].name+"")&&re(a,r),h&8&&f!==(f="/collections?collectionId="+e[15].id)&&p(t,"href",f),h&40&&Q(t,"active",((g=e[5])==null?void 0:g.id)===e[15].id)},d(m){m&&w(t),c=!1,d()}}}function qd(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` - New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),b(e,t),i||(s=K(t,"click",n[12]),i=!0)},p:G,d(l){l&&w(e),i=!1,s()}}}function p$(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],m=new Map,h,g,_,y,k,T,C=n[3];const M=I=>I[15].id;for(let I=0;I',o=D(),r=v("input"),a=D(),u=v("hr"),f=D(),c=v("div");for(let I=0;I20),p(e,"class","page-sidebar collection-sidebar")},m(I,L){S(I,e,L),b(e,t),b(t,i),b(i,s),b(s,l),b(i,o),b(i,r),ce(r,n[0]),b(e,a),b(e,u),b(e,f),b(e,c);for(let N=0;N20),I[7]?O&&(O.d(1),O=null):O?O.p(I,L):(O=qd(I),O.c(),O.m(e,null));const N={};_.$set(N)},i(I){y||(A(_.$$.fragment,I),y=!0)},o(I){P(_.$$.fragment,I),y=!1},d(I){I&&w(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function h$(n,e,t){let i,s,l,o,r,a,u;Je(n,Si,k=>t(5,o=k)),Je(n,es,k=>t(9,r=k)),Je(n,Po,k=>t(6,a=k)),Je(n,Cs,k=>t(7,u=k));let f,c="";function d(k){Yt(Si,o=k,o)}const m=()=>t(0,c="");function h(){c=this.value,t(0,c)}const g=()=>f==null?void 0:f.show();function _(k){ie[k?"unshift":"push"](()=>{f=k,t(2,f)})}const y=k=>{var T;(T=k.detail)!=null&&T.isNew&&k.detail.collection&&d(k.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=c.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=c!==""),n.$$.dirty&515&&t(3,l=r.filter(k=>k.id==c||k.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&512&&r&&m$()},[c,i,f,l,s,o,a,u,d,r,m,h,g,_,y]}class g$ extends ye{constructor(e){super(),ve(this,e,h$,p$,be,{})}}function Vd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function zd(n){n[18]=n[19].default}function Bd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Ud(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Wd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Ud();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Ae(),c&&c.c(),s=D(),l=v("button"),r=B(o),a=D(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(l,"active",e[5]===e[14]),this.first=t},m(m,h){S(m,t,h),c&&c.m(m,h),S(m,s,h),S(m,l,h),b(l,r),b(l,a),u||(f=K(l,"click",d),u=!0)},p(m,h){e=m,h&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Ud(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),h&8&&o!==(o=e[15].label+"")&&re(r,o),h&40&&Q(l,"active",e[5]===e[14])},d(m){m&&w(t),c&&c.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Yd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:v$,then:b$,catch:_$,value:19,blocks:[,,,]};return su(t=n[15].component,s),{c(){e=Ae(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&su(t,s)||Eb(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function _$(n){return{c:G,m:G,p:G,i:G,o:G,d:G}}function b$(n){zd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){q(e.$$.fragment),t=D()},m(s,l){j(e,s,l),S(s,t,l),i=!0},p(s,l){zd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&w(t)}}}function v$(n){return{c:G,m:G,p:G,i:G,o:G,d:G}}function Kd(n,e){let t,i,s,l=e[5]===e[14]&&Yd(e);return{key:n,first:null,c(){t=Ae(),l&&l.c(),i=Ae(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Yd(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function y$(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=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(s,l){S(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function w$(n){let e,t,i={class:"docs-panel",$$slots:{footer:[k$],default:[y$]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function S$(n,e,t){const i={list:{label:"List/Search",component:ft(()=>import("./ListApiDocs-0a35ed31.js"),["./ListApiDocs-0a35ed31.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:ft(()=>import("./ViewApiDocs-866b52bc.js"),["./ViewApiDocs-866b52bc.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:ft(()=>import("./CreateApiDocs-6d4181ae.js"),["./CreateApiDocs-6d4181ae.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:ft(()=>import("./UpdateApiDocs-dc390706.js"),["./UpdateApiDocs-dc390706.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:ft(()=>import("./DeleteApiDocs-cc2105a6.js"),["./DeleteApiDocs-cc2105a6.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:ft(()=>import("./RealtimeApiDocs-44be40bb.js"),["./RealtimeApiDocs-44be40bb.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:ft(()=>import("./AuthWithPasswordDocs-4c5271a0.js"),["./AuthWithPasswordDocs-4c5271a0.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:ft(()=>import("./AuthWithOAuth2Docs-72588ee1.js"),["./AuthWithOAuth2Docs-72588ee1.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:ft(()=>import("./AuthRefreshDocs-9e893681.js"),["./AuthRefreshDocs-9e893681.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:ft(()=>import("./RequestVerificationDocs-b8cf6549.js"),["./RequestVerificationDocs-b8cf6549.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:ft(()=>import("./ConfirmVerificationDocs-3a63c081.js"),["./ConfirmVerificationDocs-3a63c081.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:ft(()=>import("./RequestPasswordResetDocs-65a2d4bd.js"),["./RequestPasswordResetDocs-65a2d4bd.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:ft(()=>import("./ConfirmPasswordResetDocs-3c02bf13.js"),["./ConfirmPasswordResetDocs-3c02bf13.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:ft(()=>import("./RequestEmailChangeDocs-a9558318.js"),["./RequestEmailChangeDocs-a9558318.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:ft(()=>import("./ConfirmEmailChangeDocs-57b55c8b.js"),["./ConfirmEmailChangeDocs-57b55c8b.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:ft(()=>import("./AuthMethodsDocs-73a44ae0.js"),["./AuthMethodsDocs-73a44ae0.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:ft(()=>import("./ListExternalAuthsDocs-d76d338d.js"),["./ListExternalAuthsDocs-d76d338d.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:ft(()=>import("./UnlinkExternalAuthDocs-c1a0d883.js"),["./UnlinkExternalAuthDocs-c1a0d883.js","./SdkTabs-699e9ba9.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new bn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),m=y=>c(y);function h(y){ie[y?"unshift":"push"](()=>{l=y,t(4,l)})}function g(y){We.call(this,n,y)}function _(y){We.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,m,h,g,_]}class T$ extends ye{constructor(e){super(),ve(this,e,S$,w$,be,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function C$(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Username",o=D(),r=v("input"),p(t,"class",V.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(m,h){S(m,e,h),b(e,t),b(e,i),b(e,s),S(m,o,h),S(m,r,h),ce(r,n[0].username),c||(d=K(r,"input",n[4]),c=!0)},p(m,h){h&4096&&l!==(l=m[12])&&p(e,"for",l),h&1&&a!==(a=!m[0].isNew)&&p(r,"requried",a),h&1&&u!==(u=m[0].isNew?"Leave empty to auto generate...":m[3])&&p(r,"placeholder",u),h&4096&&f!==(f=m[12])&&p(r,"id",f),h&1&&r.value!==m[0].username&&ce(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),c=!1,d()}}}function $$(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,m,h,g,_,y,k,T,C;return{c(){var M;e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Email",o=D(),r=v("div"),a=v("button"),u=v("span"),f=B("Public: "),d=B(c),h=D(),g=v("input"),p(t,"class",V.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(g,"type","email"),g.autofocus=_=n[0].isNew,p(g,"autocomplete","off"),p(g,"id",y=n[12]),g.required=k=(M=n[1].options)==null?void 0:M.requireEmail,p(g,"class","svelte-1751a4d")},m(M,$){S(M,e,$),b(e,t),b(e,i),b(e,s),S(M,o,$),S(M,r,$),b(r,a),b(a,u),b(u,f),b(u,d),S(M,h,$),S(M,g,$),ce(g,n[0].email),n[0].isNew&&g.focus(),T||(C=[Pe(Ye.call(null,a,{text:"Make email public or private",position:"top-right"})),K(a,"click",n[5]),K(g,"input",n[6])],T=!0)},p(M,$){var O;$&4096&&l!==(l=M[12])&&p(e,"for",l),$&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&re(d,c),$&1&&m!==(m="btn btn-sm btn-transparent "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",m),$&1&&_!==(_=M[0].isNew)&&(g.autofocus=_),$&4096&&y!==(y=M[12])&&p(g,"id",y),$&2&&k!==(k=(O=M[1].options)==null?void 0:O.requireEmail)&&(g.required=k),$&1&&g.value!==M[0].email&&ce(g,M[0].email)},d(M){M&&w(e),M&&w(o),M&&w(r),M&&w(h),M&&w(g),T=!1,Le(C)}}}function Jd(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[M$,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function M$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Zd(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[D$,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[O$,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),q(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),Q(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){S(f,e,c),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c&12289&&(m.$$scope={dirty:c,ctx:f}),r.$set(m),(!u||c&4)&&Q(t,"p-t-xs",f[2])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&st(()=>{a||(a=Be(e,Ht,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=Be(e,Ht,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function D$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].password),u||(f=K(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&ce(r,c[0].password)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function O$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password confirm",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].passwordConfirm),u||(f=K(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&ce(r,c[0].passwordConfirm)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function E$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),b(s,l),r||(a=[K(e,"change",n[10]),K(e,"change",pt(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Le(a)}}}function A$(n){var _;let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new _e({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[C$,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+((_=n[1].options)!=null&&_.requireEmail?"required":""),name:"email",$$slots:{default:[$$,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}});let h=!n[0].isNew&&Jd(n),g=(n[0].isNew||n[2])&&Zd(n);return d=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[E$,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),h&&h.c(),u=D(),g&&g.c(),f=D(),c=v("div"),q(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,k){S(y,e,k),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),h&&h.m(a,null),b(a,u),g&&g.m(a,null),b(e,f),b(e,c),j(d,c,null),m=!0},p(y,[k]){var $;const T={};k&1&&(T.class="form-field "+(y[0].isNew?"":"required")),k&12289&&(T.$$scope={dirty:k,ctx:y}),i.$set(T);const C={};k&2&&(C.class="form-field "+(($=y[1].options)!=null&&$.requireEmail?"required":"")),k&12291&&(C.$$scope={dirty:k,ctx:y}),o.$set(C),y[0].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),me()):h?(h.p(y,k),k&1&&A(h,1)):(h=Jd(y),h.c(),A(h,1),h.m(a,u)),y[0].isNew||y[2]?g?(g.p(y,k),k&5&&A(g,1)):(g=Zd(y),g.c(),A(g,1),g.m(a,null)):g&&(pe(),P(g,1,1,()=>{g=null}),me());const M={};k&12289&&(M.$$scope={dirty:k,ctx:y}),d.$set(M)},i(y){m||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(h),A(g),A(d.$$.fragment,y),m=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(h),P(g),P(d.$$.fragment,y),m=!1},d(y){y&&w(e),H(i),H(o),h&&h.d(),g&&g.d(),H(d)}}}function I$(n,e,t){let{collection:i=new bn}=e,{record:s=new Ki}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function m(){s.verified=this.checked,t(0,s),t(2,o)}const h=g=>{s.isNew||un("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!g.target.checked,s)})};return n.$$set=g=>{"collection"in g&&t(1,i=g.collection),"record"in g&&t(0,s=g.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Ts("password"),Ts("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,m,h]}class P$ extends ye{constructor(e){super(),ve(this,e,I$,A$,be,{collection:1,record:0})}}function L$(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,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()}}nn(()=>(u(),()=>clearTimeout(a)));function c(m){ie[m?"unshift":"push"](()=>{r=m,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Xe(Xe({},e),Gn(m)),t(3,s=At(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class F$ extends ye{constructor(e){super(),ve(this,e,N$,L$,be,{value:0,maxHeight:4})}}function R$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(g){n[2](g)}let h={id:n[3],required:n[1].required};return n[0]!==void 0&&(h.value=n[0]),f=new F$({props:h}),ie.push(()=>ke(f,"value",m)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),q(f.$$.fragment),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),j(f,g,_),d=!0},p(g,_){(!d||_&2&&i!==(i=V.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||_&2)&&o!==(o=g[1].name+"")&&re(r,o),(!d||_&8&&a!==(a=g[3]))&&p(e,"for",a);const y={};_&8&&(y.id=g[3]),_&2&&(y.required=g[1].required),!c&&_&1&&(c=!0,y.value=g[0],we(()=>c=!1)),f.$set(y)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){P(f.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(u),H(f,g)}}}function j$(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[R$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function H$(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class q$ extends ye{constructor(e){super(),ve(this,e,H$,j$,be,{field:1,value:0})}}function V$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h,g,_;return{c(){var y,k;e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("input"),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",m=(y=n[1].options)==null?void 0:y.min),p(f,"max",h=(k=n[1].options)==null?void 0:k.max),p(f,"step","any")},m(y,k){S(y,e,k),b(e,t),b(e,s),b(e,l),b(l,r),S(y,u,k),S(y,f,k),ce(f,n[0]),g||(_=K(f,"input",n[2]),g=!0)},p(y,k){var T,C;k&2&&i!==(i=V.getFieldTypeIcon(y[1].type))&&p(t,"class",i),k&2&&o!==(o=y[1].name+"")&&re(r,o),k&8&&a!==(a=y[3])&&p(e,"for",a),k&8&&c!==(c=y[3])&&p(f,"id",c),k&2&&d!==(d=y[1].required)&&(f.required=d),k&2&&m!==(m=(T=y[1].options)==null?void 0:T.min)&&p(f,"min",m),k&2&&h!==(h=(C=y[1].options)==null?void 0:C.max)&&p(f,"max",h),k&1&&ht(f.value)!==y[0]&&ce(f,y[0])},d(y){y&&w(e),y&&w(u),y&&w(f),g=!1,_()}}}function z$(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[V$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function B$(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=ht(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class U$ extends ye{constructor(e){super(),ve(this,e,B$,z$,be,{field:1,value:0})}}function W$(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=D(),s=v("label"),o=B(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){S(f,e,c),e.checked=n[0],S(f,i,c),S(f,s,c),b(s,o),a||(u=K(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&re(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function Y$(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[W$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function K$(n,e,t){let{field:i=new dn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class J$ extends ye{constructor(e){super(),ve(this,e,K$,Y$,be,{field:1,value:0})}}function Z$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("input"),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),S(g,f,_),ce(f,n[0]),m||(h=K(f,"input",n[2]),m=!0)},p(g,_){_&2&&i!==(i=V.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&re(r,o),_&8&&a!==(a=g[3])&&p(e,"for",a),_&8&&c!==(c=g[3])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&1&&f.value!==g[0]&&ce(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function G$(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[Z$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function X$(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class Q$ extends ye{constructor(e){super(),ve(this,e,X$,G$,be,{field:1,value:0})}}function x$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("input"),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),S(g,f,_),ce(f,n[0]),m||(h=K(f,"input",n[2]),m=!0)},p(g,_){_&2&&i!==(i=V.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&re(r,o),_&8&&a!==(a=g[3])&&p(e,"for",a),_&8&&c!==(c=g[3])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&1&&ce(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function e4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[x$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function t4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class n4 extends ye{constructor(e){super(),ve(this,e,t4,e4,be,{field:1,value:0})}}function Gd(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){S(l,e,o),b(e,t),i||(s=[Pe(Ye.call(null,t,"Clear")),K(t,"click",n[4])],i=!0)},p:G,d(l){l&&w(e),i=!1,Le(s)}}}function i4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h,g=n[0]&&!n[1].required&&Gd(n);function _(k){n[5](k)}let y={id:n[6],options:V.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(y.formattedValue=n[0]),d=new eu({props:y}),ie.push(()=>ke(d,"formattedValue",_)),d.$on("close",n[2]),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),a=B(" (UTC)"),f=D(),g&&g.c(),c=D(),q(d.$$.fragment),p(t,"class",i=yi(V.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[6])},m(k,T){S(k,e,T),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),S(k,f,T),g&&g.m(k,T),S(k,c,T),j(d,k,T),h=!0},p(k,T){(!h||T&2&&i!==(i=yi(V.getFieldTypeIcon(k[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!h||T&2)&&o!==(o=k[1].name+"")&&re(r,o),(!h||T&64&&u!==(u=k[6]))&&p(e,"for",u),k[0]&&!k[1].required?g?g.p(k,T):(g=Gd(k),g.c(),g.m(c.parentNode,c)):g&&(g.d(1),g=null);const C={};T&64&&(C.id=k[6]),T&1&&(C.value=k[0]),!m&&T&1&&(m=!0,C.formattedValue=k[0],we(()=>m=!1)),d.$set(C)},i(k){h||(A(d.$$.fragment,k),h=!0)},o(k){P(d.$$.fragment,k),h=!1},d(k){k&&w(e),k&&w(f),g&&g.d(k),k&&w(c),H(d,k)}}}function s4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[i4,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&195&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function l4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(u){u.detail&&u.detail.length==3&&t(0,s=u.detail[1])}function o(){t(0,s="")}const r=()=>o();function a(u){s=u,t(0,s)}return n.$$set=u=>{"field"in u&&t(1,i=u.field),"value"in u&&t(0,s=u.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19))},[s,i,l,o,r,a]}class o4 extends ye{constructor(e){super(),ve(this,e,l4,s4,be,{field:1,value:0})}}function Xd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&re(s,i)},d(o){o&&w(e)}}}function r4(n){var k,T,C;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;function g(M){n[3](M)}let _={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2],items:(k=n[1].options)==null?void 0:k.values,searchable:((T=n[1].options)==null?void 0:T.values)>5};n[0]!==void 0&&(_.selected=n[0]),f=new xa({props:_}),ie.push(()=>ke(f,"selected",g));let y=((C=n[1].options)==null?void 0:C.maxSelect)>1&&Xd(n);return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),q(f.$$.fragment),d=D(),y&&y.c(),m=Ae(),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,$){S(M,e,$),b(e,t),b(e,s),b(e,l),b(l,r),S(M,u,$),j(f,M,$),S(M,d,$),y&&y.m(M,$),S(M,m,$),h=!0},p(M,$){var E,I,L;(!h||$&2&&i!==(i=V.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!h||$&2)&&o!==(o=M[1].name+"")&&re(r,o),(!h||$&16&&a!==(a=M[4]))&&p(e,"for",a);const O={};$&16&&(O.id=M[4]),$&6&&(O.toggle=!M[1].required||M[2]),$&4&&(O.multiple=M[2]),$&4&&(O.closable=!M[2]),$&2&&(O.items=(E=M[1].options)==null?void 0:E.values),$&2&&(O.searchable=((I=M[1].options)==null?void 0:I.values)>5),!c&&$&1&&(c=!0,O.selected=M[0],we(()=>c=!1)),f.$set(O),((L=M[1].options)==null?void 0:L.maxSelect)>1?y?y.p(M,$):(y=Xd(M),y.c(),y.m(m.parentNode,m)):y&&(y.d(1),y=null)},i(M){h||(A(f.$$.fragment,M),h=!0)},o(M){P(f.$$.fragment,M),h=!1},d(M){M&&w(e),M&&w(u),H(f,M),M&&w(d),y&&y.d(M),M&&w(m)}}}function a4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[r4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function u4(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class f4 extends ye{constructor(e){super(),ve(this,e,u4,a4,be,{field:1,value:0})}}function c4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("textarea"),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono")},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),S(g,f,_),ce(f,n[0]),m||(h=K(f,"input",n[2]),m=!0)},p(g,_){_&2&&i!==(i=V.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&re(r,o),_&8&&a!==(a=g[3])&&p(e,"for",a),_&8&&c!==(c=g[3])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&1&&ce(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function d4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[c4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function p4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class m4 extends ye{constructor(e){super(),ve(this,e,p4,d4,be,{field:1,value:0})}}function h4(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&w(e)}}}function g4(n){let e,t,i;return{c(){e=v("img"),Hn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Hn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&w(e)}}}function _4(n){let e;function t(l,o){return l[2]?g4:h4}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function b4(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),V.hasImageExtension(s==null?void 0:s.name)&&V.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class v4 extends ye{constructor(e){super(),ve(this,e,b4,_4,be,{file:0,size:1})}}function Qd(n){let e;function t(l,o){return l[4]==="image"?k4:y4}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function y4(n){let e,t;return{c(){e=v("object"),t=B("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){S(i,e,s),b(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&w(e)}}}function k4(n){let e,t,i;return{c(){e=v("img"),Hn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!Hn(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&w(e)}}}function w4(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Qd(n);return{c(){i&&i.c(),t=Ae()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Qd(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function S4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",pt(n[0])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function T4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("a"),t=B(n[2]),i=D(),s=v("i"),l=D(),o=v("div"),r=D(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,l,d),S(c,o,d),S(c,r,d),S(c,a,d),u||(f=K(a,"click",n[0]),u=!0)},p(c,d){d&4&&re(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&w(e),c&&w(l),c&&w(o),c&&w(r),c&&w(a),u=!1,f()}}}function C4(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[T4],header:[S4],default:[w4]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[6](e),e.$on("show",n[7]),e.$on("hide",n[8]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&542&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function $4(n,e,t){let i,s,l,o="";function r(d){d!==""&&(t(1,o=d),l==null||l.show())}function a(){return l==null?void 0:l.hide()}function u(d){ie[d?"unshift":"push"](()=>{l=d,t(3,l)})}function f(d){We.call(this,n,d)}function c(d){We.call(this,n,d)}return n.$$.update=()=>{n.$$.dirty&2&&t(2,i=o.substring(o.lastIndexOf("/")+1)),n.$$.dirty&4&&t(4,s=V.getFileType(i))},[a,o,i,l,s,r,u,f,c]}class M4 extends ye{constructor(e){super(),ve(this,e,$4,C4,be,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function D4(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function O4(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function E4(n){let e,t,i,s,l;return{c(){e=v("img"),Hn(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=K(e,"error",n[7]),s=!0)},p(o,r){r&16&&!Hn(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function A4(n){let e,t,i,s,l,o,r,a;function u(m,h){return m[2]==="image"?E4:m[2]==="video"||m[2]==="audio"?O4:D4}let f=u(n),c=f(n),d={};return l=new M4({props:d}),n[10](l),{c(){e=v("a"),c.c(),s=D(),q(l.$$.fragment),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[5]?"Preview":"Download")+" "+n[0])},m(m,h){S(m,e,h),c.m(e,null),S(m,s,h),j(l,m,h),o=!0,r||(a=K(e,"click",yn(n[9])),r=!0)},p(m,[h]){f===(f=u(m))&&c?c.p(m,h):(c.d(1),c=f(m),c&&(c.c(),c.m(e,null))),(!o||h&2&&t!==(t="thumb "+(m[1]?`thumb-${m[1]}`:"")))&&p(e,"class",t),(!o||h&33&&i!==(i=(m[5]?"Preview":"Download")+" "+m[0]))&&p(e,"title",i);const g={};l.$set(g)},i(m){o||(A(l.$$.fragment,m),o=!0)},o(m){P(l.$$.fragment,m),o=!1},d(m){m&&w(e),c.d(),m&&w(s),n[10](null),H(l,m),r=!1,a()}}}function I4(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f=he.getFileUrl(l,o);function c(){t(4,u="")}const d=h=>{s&&(h.preventDefault(),a==null||a.show(f))};function m(h){ie[h?"unshift":"push"](()=>{a=h,t(3,a)})}return n.$$set=h=>{"record"in h&&t(8,l=h.record),"filename"in h&&t(0,o=h.filename),"size"in h&&t(1,r=h.size)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=V.getFileType(o)),n.$$.dirty&5&&t(5,s=["image","audio","video"].includes(i)||o.endsWith(".pdf"))},t(4,u=f?f+"?thumb=100x100":""),[o,r,i,a,u,s,f,c,l,d,m]}class lb extends ye{constructor(e){super(),ve(this,e,I4,A4,be,{record:8,filename:0,size:1})}}function xd(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function ep(n,e,t){const i=n.slice();i[25]=e[t],i[24]=t;const s=i[1].includes(i[24]);return i[26]=s,i}function P4(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[Pe(Ye.call(null,e,"Remove file")),K(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Le(i)}}}function L4(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=K(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function tp(n,e){let t,i,s,l,o,r,a=e[25]+"",u,f,c,d,m,h,g;s=new lb({props:{record:e[2],filename:e[25]}});function _(T,C){return C&18&&(h=null),h==null&&(h=!!T[1].includes(T[24])),h?L4:P4}let y=_(e,-1),k=y(e);return{key:n,first:null,c(){t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),r=v("a"),u=B(a),d=D(),m=v("div"),k.c(),Q(i,"fade",e[1].includes(e[24])),p(r,"href",f=he.getFileUrl(e[2],e[25])),p(r,"class",c="txt-ellipsis "+(e[26]?"txt-strikethrough txt-hint":"link-primary")),p(r,"title","Download"),p(r,"target","_blank"),p(r,"rel","noopener noreferrer"),p(o,"class","content"),p(m,"class","actions"),p(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),b(t,i),j(s,i,null),b(t,l),b(t,o),b(o,r),b(r,u),b(t,d),b(t,m),k.m(m,null),g=!0},p(T,C){e=T;const M={};C&4&&(M.record=e[2]),C&16&&(M.filename=e[25]),s.$set(M),(!g||C&18)&&Q(i,"fade",e[1].includes(e[24])),(!g||C&16)&&a!==(a=e[25]+"")&&re(u,a),(!g||C&20&&f!==(f=he.getFileUrl(e[2],e[25])))&&p(r,"href",f),(!g||C&18&&c!==(c="txt-ellipsis "+(e[26]?"txt-strikethrough txt-hint":"link-primary")))&&p(r,"class",c),y===(y=_(e,C))&&k?k.p(e,C):(k.d(1),k=y(e),k&&(k.c(),k.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){P(s.$$.fragment,T),g=!1},d(T){T&&w(t),H(s),k.d()}}}function np(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,m,h,g,_;i=new v4({props:{file:n[22]}});function y(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),q(i.$$.fragment),s=D(),l=v("div"),o=v("small"),o.textContent="New",r=D(),a=v("span"),f=B(u),d=D(),m=v("button"),m.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[22].name),p(m,"type","button"),p(m,"class","btn btn-transparent btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(k,T){S(k,e,T),b(e,t),j(i,t,null),b(e,s),b(e,l),b(l,o),b(l,r),b(l,a),b(a,f),b(e,d),b(e,m),h=!0,g||(_=[Pe(Ye.call(null,m,"Remove file")),K(m,"click",y)],g=!0)},p(k,T){n=k;const C={};T&1&&(C.file=n[22]),i.$set(C),(!h||T&1)&&u!==(u=n[22].name+"")&&re(f,u),(!h||T&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(k){h||(A(i.$$.fragment,k),h=!0)},o(k){P(i.$$.fragment,k),h=!1},d(k){k&&w(e),H(i),g=!1,Le(_)}}}function ip(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=D(),s=v("button"),s.innerHTML=` + New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),b(e,t),i||(s=K(t,"click",n[12]),i=!0)},p:G,d(l){l&&w(e),i=!1,s()}}}function p$(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],m=new Map,h,g,_,y,k,T,C=n[3];const M=I=>I[15].id;for(let I=0;I',o=D(),r=v("input"),a=D(),u=v("hr"),f=D(),c=v("div");for(let I=0;I20),p(e,"class","page-sidebar collection-sidebar")},m(I,L){S(I,e,L),b(e,t),b(t,i),b(i,s),b(s,l),b(i,o),b(i,r),de(r,n[0]),b(e,a),b(e,u),b(e,f),b(e,c);for(let N=0;N20),I[7]?O&&(O.d(1),O=null):O?O.p(I,L):(O=qd(I),O.c(),O.m(e,null));const N={};_.$set(N)},i(I){y||(A(_.$$.fragment,I),y=!0)},o(I){P(_.$$.fragment,I),y=!1},d(I){I&&w(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function h$(n,e,t){let i,s,l,o,r,a,u;Je(n,Si,k=>t(5,o=k)),Je(n,es,k=>t(9,r=k)),Je(n,Po,k=>t(6,a=k)),Je(n,Cs,k=>t(7,u=k));let f,c="";function d(k){Yt(Si,o=k,o)}const m=()=>t(0,c="");function h(){c=this.value,t(0,c)}const g=()=>f==null?void 0:f.show();function _(k){ie[k?"unshift":"push"](()=>{f=k,t(2,f)})}const y=k=>{var T;(T=k.detail)!=null&&T.isNew&&k.detail.collection&&d(k.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=c.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=c!==""),n.$$.dirty&515&&t(3,l=r.filter(k=>k.id==c||k.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&512&&r&&m$()},[c,i,f,l,s,o,a,u,d,r,m,h,g,_,y]}class g$ extends ye{constructor(e){super(),ve(this,e,h$,p$,be,{})}}function Vd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function zd(n){n[18]=n[19].default}function Bd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Ud(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Wd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Ud();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Ae(),c&&c.c(),s=D(),l=v("button"),r=B(o),a=D(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(l,"active",e[5]===e[14]),this.first=t},m(m,h){S(m,t,h),c&&c.m(m,h),S(m,s,h),S(m,l,h),b(l,r),b(l,a),u||(f=K(l,"click",d),u=!0)},p(m,h){e=m,h&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Ud(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),h&8&&o!==(o=e[15].label+"")&&re(r,o),h&40&&Q(l,"active",e[5]===e[14])},d(m){m&&w(t),c&&c.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Yd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:v$,then:b$,catch:_$,value:19,blocks:[,,,]};return su(t=n[15].component,s),{c(){e=Ae(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&su(t,s)||Eb(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function _$(n){return{c:G,m:G,p:G,i:G,o:G,d:G}}function b$(n){zd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){q(e.$$.fragment),t=D()},m(s,l){j(e,s,l),S(s,t,l),i=!0},p(s,l){zd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&w(t)}}}function v$(n){return{c:G,m:G,p:G,i:G,o:G,d:G}}function Kd(n,e){let t,i,s,l=e[5]===e[14]&&Yd(e);return{key:n,first:null,c(){t=Ae(),l&&l.c(),i=Ae(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Yd(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function y$(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=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(s,l){S(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function w$(n){let e,t,i={class:"docs-panel",$$slots:{footer:[k$],default:[y$]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function S$(n,e,t){const i={list:{label:"List/Search",component:ft(()=>import("./ListApiDocs-b3b84ba9.js"),["./ListApiDocs-b3b84ba9.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:ft(()=>import("./ViewApiDocs-4a555ff5.js"),["./ViewApiDocs-4a555ff5.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:ft(()=>import("./CreateApiDocs-c6c95be3.js"),["./CreateApiDocs-c6c95be3.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:ft(()=>import("./UpdateApiDocs-a89f8bed.js"),["./UpdateApiDocs-a89f8bed.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:ft(()=>import("./DeleteApiDocs-21f3fd52.js"),["./DeleteApiDocs-21f3fd52.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:ft(()=>import("./RealtimeApiDocs-92f0bf85.js"),["./RealtimeApiDocs-92f0bf85.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:ft(()=>import("./AuthWithPasswordDocs-c74f48b9.js"),["./AuthWithPasswordDocs-c74f48b9.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:ft(()=>import("./AuthWithOAuth2Docs-453f4216.js"),["./AuthWithOAuth2Docs-453f4216.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:ft(()=>import("./AuthRefreshDocs-8be41da1.js"),["./AuthRefreshDocs-8be41da1.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:ft(()=>import("./RequestVerificationDocs-e7e96782.js"),["./RequestVerificationDocs-e7e96782.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:ft(()=>import("./ConfirmVerificationDocs-14171a15.js"),["./ConfirmVerificationDocs-14171a15.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:ft(()=>import("./RequestPasswordResetDocs-c6df1adb.js"),["./RequestPasswordResetDocs-c6df1adb.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:ft(()=>import("./ConfirmPasswordResetDocs-31519d08.js"),["./ConfirmPasswordResetDocs-31519d08.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:ft(()=>import("./RequestEmailChangeDocs-43173b3c.js"),["./RequestEmailChangeDocs-43173b3c.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:ft(()=>import("./ConfirmEmailChangeDocs-c7942b1c.js"),["./ConfirmEmailChangeDocs-c7942b1c.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:ft(()=>import("./AuthMethodsDocs-dd62877b.js"),["./AuthMethodsDocs-dd62877b.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:ft(()=>import("./ListExternalAuthsDocs-323ad017.js"),["./ListExternalAuthsDocs-323ad017.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:ft(()=>import("./UnlinkExternalAuthDocs-8afb383d.js"),["./UnlinkExternalAuthDocs-8afb383d.js","./SdkTabs-ce9e2768.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new bn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),m=y=>c(y);function h(y){ie[y?"unshift":"push"](()=>{l=y,t(4,l)})}function g(y){We.call(this,n,y)}function _(y){We.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,m,h,g,_]}class T$ extends ye{constructor(e){super(),ve(this,e,S$,w$,be,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function C$(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Username",o=D(),r=v("input"),p(t,"class",V.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(m,h){S(m,e,h),b(e,t),b(e,i),b(e,s),S(m,o,h),S(m,r,h),de(r,n[0].username),c||(d=K(r,"input",n[4]),c=!0)},p(m,h){h&4096&&l!==(l=m[12])&&p(e,"for",l),h&1&&a!==(a=!m[0].isNew)&&p(r,"requried",a),h&1&&u!==(u=m[0].isNew?"Leave empty to auto generate...":m[3])&&p(r,"placeholder",u),h&4096&&f!==(f=m[12])&&p(r,"id",f),h&1&&r.value!==m[0].username&&de(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),c=!1,d()}}}function $$(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,m,h,g,_,y,k,T,C;return{c(){var M;e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Email",o=D(),r=v("div"),a=v("button"),u=v("span"),f=B("Public: "),d=B(c),h=D(),g=v("input"),p(t,"class",V.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(g,"type","email"),g.autofocus=_=n[0].isNew,p(g,"autocomplete","off"),p(g,"id",y=n[12]),g.required=k=(M=n[1].options)==null?void 0:M.requireEmail,p(g,"class","svelte-1751a4d")},m(M,$){S(M,e,$),b(e,t),b(e,i),b(e,s),S(M,o,$),S(M,r,$),b(r,a),b(a,u),b(u,f),b(u,d),S(M,h,$),S(M,g,$),de(g,n[0].email),n[0].isNew&&g.focus(),T||(C=[Pe(Ye.call(null,a,{text:"Make email public or private",position:"top-right"})),K(a,"click",n[5]),K(g,"input",n[6])],T=!0)},p(M,$){var O;$&4096&&l!==(l=M[12])&&p(e,"for",l),$&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&re(d,c),$&1&&m!==(m="btn btn-sm btn-transparent "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",m),$&1&&_!==(_=M[0].isNew)&&(g.autofocus=_),$&4096&&y!==(y=M[12])&&p(g,"id",y),$&2&&k!==(k=(O=M[1].options)==null?void 0:O.requireEmail)&&(g.required=k),$&1&&g.value!==M[0].email&&de(g,M[0].email)},d(M){M&&w(e),M&&w(o),M&&w(r),M&&w(h),M&&w(g),T=!1,Le(C)}}}function Jd(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[M$,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function M$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Zd(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[D$,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[O$,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),q(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),Q(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){S(f,e,c),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c&12289&&(m.$$scope={dirty:c,ctx:f}),r.$set(m),(!u||c&4)&&Q(t,"p-t-xs",f[2])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&st(()=>{a||(a=Be(e,Ht,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=Be(e,Ht,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function D$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),de(r,n[0].password),u||(f=K(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&de(r,c[0].password)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function O$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password confirm",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),de(r,n[0].passwordConfirm),u||(f=K(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&de(r,c[0].passwordConfirm)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function E$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),b(s,l),r||(a=[K(e,"change",n[10]),K(e,"change",pt(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Le(a)}}}function A$(n){var _;let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new _e({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[C$,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+((_=n[1].options)!=null&&_.requireEmail?"required":""),name:"email",$$slots:{default:[$$,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}});let h=!n[0].isNew&&Jd(n),g=(n[0].isNew||n[2])&&Zd(n);return d=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[E$,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),h&&h.c(),u=D(),g&&g.c(),f=D(),c=v("div"),q(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,k){S(y,e,k),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),h&&h.m(a,null),b(a,u),g&&g.m(a,null),b(e,f),b(e,c),j(d,c,null),m=!0},p(y,[k]){var $;const T={};k&1&&(T.class="form-field "+(y[0].isNew?"":"required")),k&12289&&(T.$$scope={dirty:k,ctx:y}),i.$set(T);const C={};k&2&&(C.class="form-field "+(($=y[1].options)!=null&&$.requireEmail?"required":"")),k&12291&&(C.$$scope={dirty:k,ctx:y}),o.$set(C),y[0].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),me()):h?(h.p(y,k),k&1&&A(h,1)):(h=Jd(y),h.c(),A(h,1),h.m(a,u)),y[0].isNew||y[2]?g?(g.p(y,k),k&5&&A(g,1)):(g=Zd(y),g.c(),A(g,1),g.m(a,null)):g&&(pe(),P(g,1,1,()=>{g=null}),me());const M={};k&12289&&(M.$$scope={dirty:k,ctx:y}),d.$set(M)},i(y){m||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(h),A(g),A(d.$$.fragment,y),m=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(h),P(g),P(d.$$.fragment,y),m=!1},d(y){y&&w(e),H(i),H(o),h&&h.d(),g&&g.d(),H(d)}}}function I$(n,e,t){let{collection:i=new bn}=e,{record:s=new Ki}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function m(){s.verified=this.checked,t(0,s),t(2,o)}const h=g=>{s.isNew||un("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!g.target.checked,s)})};return n.$$set=g=>{"collection"in g&&t(1,i=g.collection),"record"in g&&t(0,s=g.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Ts("password"),Ts("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,m,h]}class P$ extends ye{constructor(e){super(),ve(this,e,I$,A$,be,{collection:1,record:0})}}function L$(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,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()}}nn(()=>(u(),()=>clearTimeout(a)));function c(m){ie[m?"unshift":"push"](()=>{r=m,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Xe(Xe({},e),Gn(m)),t(3,s=At(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class F$ extends ye{constructor(e){super(),ve(this,e,N$,L$,be,{value:0,maxHeight:4})}}function R$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(g){n[2](g)}let h={id:n[3],required:n[1].required};return n[0]!==void 0&&(h.value=n[0]),f=new F$({props:h}),ie.push(()=>ke(f,"value",m)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),q(f.$$.fragment),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),j(f,g,_),d=!0},p(g,_){(!d||_&2&&i!==(i=V.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||_&2)&&o!==(o=g[1].name+"")&&re(r,o),(!d||_&8&&a!==(a=g[3]))&&p(e,"for",a);const y={};_&8&&(y.id=g[3]),_&2&&(y.required=g[1].required),!c&&_&1&&(c=!0,y.value=g[0],we(()=>c=!1)),f.$set(y)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){P(f.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(u),H(f,g)}}}function j$(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[R$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function H$(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class q$ extends ye{constructor(e){super(),ve(this,e,H$,j$,be,{field:1,value:0})}}function V$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h,g,_;return{c(){var y,k;e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("input"),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",m=(y=n[1].options)==null?void 0:y.min),p(f,"max",h=(k=n[1].options)==null?void 0:k.max),p(f,"step","any")},m(y,k){S(y,e,k),b(e,t),b(e,s),b(e,l),b(l,r),S(y,u,k),S(y,f,k),de(f,n[0]),g||(_=K(f,"input",n[2]),g=!0)},p(y,k){var T,C;k&2&&i!==(i=V.getFieldTypeIcon(y[1].type))&&p(t,"class",i),k&2&&o!==(o=y[1].name+"")&&re(r,o),k&8&&a!==(a=y[3])&&p(e,"for",a),k&8&&c!==(c=y[3])&&p(f,"id",c),k&2&&d!==(d=y[1].required)&&(f.required=d),k&2&&m!==(m=(T=y[1].options)==null?void 0:T.min)&&p(f,"min",m),k&2&&h!==(h=(C=y[1].options)==null?void 0:C.max)&&p(f,"max",h),k&1&&ht(f.value)!==y[0]&&de(f,y[0])},d(y){y&&w(e),y&&w(u),y&&w(f),g=!1,_()}}}function z$(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[V$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function B$(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=ht(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class U$ extends ye{constructor(e){super(),ve(this,e,B$,z$,be,{field:1,value:0})}}function W$(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=D(),s=v("label"),o=B(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){S(f,e,c),e.checked=n[0],S(f,i,c),S(f,s,c),b(s,o),a||(u=K(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&re(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function Y$(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[W$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function K$(n,e,t){let{field:i=new dn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class J$ extends ye{constructor(e){super(),ve(this,e,K$,Y$,be,{field:1,value:0})}}function Z$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("input"),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),S(g,f,_),de(f,n[0]),m||(h=K(f,"input",n[2]),m=!0)},p(g,_){_&2&&i!==(i=V.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&re(r,o),_&8&&a!==(a=g[3])&&p(e,"for",a),_&8&&c!==(c=g[3])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&1&&f.value!==g[0]&&de(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function G$(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[Z$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function X$(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class Q$ extends ye{constructor(e){super(),ve(this,e,X$,G$,be,{field:1,value:0})}}function x$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("input"),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),S(g,f,_),de(f,n[0]),m||(h=K(f,"input",n[2]),m=!0)},p(g,_){_&2&&i!==(i=V.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&re(r,o),_&8&&a!==(a=g[3])&&p(e,"for",a),_&8&&c!==(c=g[3])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&1&&de(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function e4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[x$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function t4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class n4 extends ye{constructor(e){super(),ve(this,e,t4,e4,be,{field:1,value:0})}}function Gd(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){S(l,e,o),b(e,t),i||(s=[Pe(Ye.call(null,t,"Clear")),K(t,"click",n[4])],i=!0)},p:G,d(l){l&&w(e),i=!1,Le(s)}}}function i4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h,g=n[0]&&!n[1].required&&Gd(n);function _(k){n[5](k)}let y={id:n[6],options:V.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(y.formattedValue=n[0]),d=new eu({props:y}),ie.push(()=>ke(d,"formattedValue",_)),d.$on("close",n[2]),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),a=B(" (UTC)"),f=D(),g&&g.c(),c=D(),q(d.$$.fragment),p(t,"class",i=yi(V.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[6])},m(k,T){S(k,e,T),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),S(k,f,T),g&&g.m(k,T),S(k,c,T),j(d,k,T),h=!0},p(k,T){(!h||T&2&&i!==(i=yi(V.getFieldTypeIcon(k[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!h||T&2)&&o!==(o=k[1].name+"")&&re(r,o),(!h||T&64&&u!==(u=k[6]))&&p(e,"for",u),k[0]&&!k[1].required?g?g.p(k,T):(g=Gd(k),g.c(),g.m(c.parentNode,c)):g&&(g.d(1),g=null);const C={};T&64&&(C.id=k[6]),T&1&&(C.value=k[0]),!m&&T&1&&(m=!0,C.formattedValue=k[0],we(()=>m=!1)),d.$set(C)},i(k){h||(A(d.$$.fragment,k),h=!0)},o(k){P(d.$$.fragment,k),h=!1},d(k){k&&w(e),k&&w(f),g&&g.d(k),k&&w(c),H(d,k)}}}function s4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[i4,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&195&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function l4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(u){u.detail&&u.detail.length==3&&t(0,s=u.detail[1])}function o(){t(0,s="")}const r=()=>o();function a(u){s=u,t(0,s)}return n.$$set=u=>{"field"in u&&t(1,i=u.field),"value"in u&&t(0,s=u.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19))},[s,i,l,o,r,a]}class o4 extends ye{constructor(e){super(),ve(this,e,l4,s4,be,{field:1,value:0})}}function Xd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&re(s,i)},d(o){o&&w(e)}}}function r4(n){var k,T,C;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;function g(M){n[3](M)}let _={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2],items:(k=n[1].options)==null?void 0:k.values,searchable:((T=n[1].options)==null?void 0:T.values)>5};n[0]!==void 0&&(_.selected=n[0]),f=new xa({props:_}),ie.push(()=>ke(f,"selected",g));let y=((C=n[1].options)==null?void 0:C.maxSelect)>1&&Xd(n);return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),q(f.$$.fragment),d=D(),y&&y.c(),m=Ae(),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,$){S(M,e,$),b(e,t),b(e,s),b(e,l),b(l,r),S(M,u,$),j(f,M,$),S(M,d,$),y&&y.m(M,$),S(M,m,$),h=!0},p(M,$){var E,I,L;(!h||$&2&&i!==(i=V.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!h||$&2)&&o!==(o=M[1].name+"")&&re(r,o),(!h||$&16&&a!==(a=M[4]))&&p(e,"for",a);const O={};$&16&&(O.id=M[4]),$&6&&(O.toggle=!M[1].required||M[2]),$&4&&(O.multiple=M[2]),$&4&&(O.closable=!M[2]),$&2&&(O.items=(E=M[1].options)==null?void 0:E.values),$&2&&(O.searchable=((I=M[1].options)==null?void 0:I.values)>5),!c&&$&1&&(c=!0,O.selected=M[0],we(()=>c=!1)),f.$set(O),((L=M[1].options)==null?void 0:L.maxSelect)>1?y?y.p(M,$):(y=Xd(M),y.c(),y.m(m.parentNode,m)):y&&(y.d(1),y=null)},i(M){h||(A(f.$$.fragment,M),h=!0)},o(M){P(f.$$.fragment,M),h=!1},d(M){M&&w(e),M&&w(u),H(f,M),M&&w(d),y&&y.d(M),M&&w(m)}}}function a4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[r4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function u4(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class f4 extends ye{constructor(e){super(),ve(this,e,u4,a4,be,{field:1,value:0})}}function c4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("textarea"),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4]),p(f,"id",c=n[4]),p(f,"class","txt-mono"),f.required=d=n[1].required,f.value=n[2]},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),S(g,f,_),m||(h=K(f,"input",n[3]),m=!0)},p(g,_){_&2&&i!==(i=V.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&re(r,o),_&16&&a!==(a=g[4])&&p(e,"for",a),_&16&&c!==(c=g[4])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&4&&(f.value=g[2])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function d4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[c4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function p4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e,l;const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&t(2,l=JSON.stringify(s,null,2))},[s,i,l,o]}class m4 extends ye{constructor(e){super(),ve(this,e,p4,d4,be,{field:1,value:0})}}function h4(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&w(e)}}}function g4(n){let e,t,i;return{c(){e=v("img"),Hn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Hn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&w(e)}}}function _4(n){let e;function t(l,o){return l[2]?g4:h4}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function b4(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),V.hasImageExtension(s==null?void 0:s.name)&&V.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class v4 extends ye{constructor(e){super(),ve(this,e,b4,_4,be,{file:0,size:1})}}function Qd(n){let e;function t(l,o){return l[4]==="image"?k4:y4}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function y4(n){let e,t;return{c(){e=v("object"),t=B("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){S(i,e,s),b(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&w(e)}}}function k4(n){let e,t,i;return{c(){e=v("img"),Hn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!Hn(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&w(e)}}}function w4(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Qd(n);return{c(){i&&i.c(),t=Ae()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Qd(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function S4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",pt(n[0])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function T4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("a"),t=B(n[2]),i=D(),s=v("i"),l=D(),o=v("div"),r=D(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,l,d),S(c,o,d),S(c,r,d),S(c,a,d),u||(f=K(a,"click",n[0]),u=!0)},p(c,d){d&4&&re(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&w(e),c&&w(l),c&&w(o),c&&w(r),c&&w(a),u=!1,f()}}}function C4(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[T4],header:[S4],default:[w4]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[6](e),e.$on("show",n[7]),e.$on("hide",n[8]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&542&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function $4(n,e,t){let i,s,l,o="";function r(d){d!==""&&(t(1,o=d),l==null||l.show())}function a(){return l==null?void 0:l.hide()}function u(d){ie[d?"unshift":"push"](()=>{l=d,t(3,l)})}function f(d){We.call(this,n,d)}function c(d){We.call(this,n,d)}return n.$$.update=()=>{n.$$.dirty&2&&t(2,i=o.substring(o.lastIndexOf("/")+1)),n.$$.dirty&4&&t(4,s=V.getFileType(i))},[a,o,i,l,s,r,u,f,c]}class M4 extends ye{constructor(e){super(),ve(this,e,$4,C4,be,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function D4(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function O4(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function E4(n){let e,t,i,s,l;return{c(){e=v("img"),Hn(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=K(e,"error",n[7]),s=!0)},p(o,r){r&16&&!Hn(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function A4(n){let e,t,i,s,l,o,r,a;function u(m,h){return m[2]==="image"?E4:m[2]==="video"||m[2]==="audio"?O4:D4}let f=u(n),c=f(n),d={};return l=new M4({props:d}),n[10](l),{c(){e=v("a"),c.c(),s=D(),q(l.$$.fragment),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[5]?"Preview":"Download")+" "+n[0])},m(m,h){S(m,e,h),c.m(e,null),S(m,s,h),j(l,m,h),o=!0,r||(a=K(e,"click",yn(n[9])),r=!0)},p(m,[h]){f===(f=u(m))&&c?c.p(m,h):(c.d(1),c=f(m),c&&(c.c(),c.m(e,null))),(!o||h&2&&t!==(t="thumb "+(m[1]?`thumb-${m[1]}`:"")))&&p(e,"class",t),(!o||h&33&&i!==(i=(m[5]?"Preview":"Download")+" "+m[0]))&&p(e,"title",i);const g={};l.$set(g)},i(m){o||(A(l.$$.fragment,m),o=!0)},o(m){P(l.$$.fragment,m),o=!1},d(m){m&&w(e),c.d(),m&&w(s),n[10](null),H(l,m),r=!1,a()}}}function I4(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f=he.getFileUrl(l,o);function c(){t(4,u="")}const d=h=>{s&&(h.preventDefault(),a==null||a.show(f))};function m(h){ie[h?"unshift":"push"](()=>{a=h,t(3,a)})}return n.$$set=h=>{"record"in h&&t(8,l=h.record),"filename"in h&&t(0,o=h.filename),"size"in h&&t(1,r=h.size)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=V.getFileType(o)),n.$$.dirty&5&&t(5,s=["image","audio","video"].includes(i)||o.endsWith(".pdf"))},t(4,u=f?f+"?thumb=100x100":""),[o,r,i,a,u,s,f,c,l,d,m]}class lb extends ye{constructor(e){super(),ve(this,e,I4,A4,be,{record:8,filename:0,size:1})}}function xd(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function ep(n,e,t){const i=n.slice();i[25]=e[t],i[24]=t;const s=i[1].includes(i[24]);return i[26]=s,i}function P4(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[Pe(Ye.call(null,e,"Remove file")),K(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Le(i)}}}function L4(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=K(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function tp(n,e){let t,i,s,l,o,r,a=e[25]+"",u,f,c,d,m,h,g;s=new lb({props:{record:e[2],filename:e[25]}});function _(T,C){return C&18&&(h=null),h==null&&(h=!!T[1].includes(T[24])),h?L4:P4}let y=_(e,-1),k=y(e);return{key:n,first:null,c(){t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),r=v("a"),u=B(a),d=D(),m=v("div"),k.c(),Q(i,"fade",e[1].includes(e[24])),p(r,"href",f=he.getFileUrl(e[2],e[25])),p(r,"class",c="txt-ellipsis "+(e[26]?"txt-strikethrough txt-hint":"link-primary")),p(r,"title","Download"),p(r,"target","_blank"),p(r,"rel","noopener noreferrer"),p(o,"class","content"),p(m,"class","actions"),p(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),b(t,i),j(s,i,null),b(t,l),b(t,o),b(o,r),b(r,u),b(t,d),b(t,m),k.m(m,null),g=!0},p(T,C){e=T;const M={};C&4&&(M.record=e[2]),C&16&&(M.filename=e[25]),s.$set(M),(!g||C&18)&&Q(i,"fade",e[1].includes(e[24])),(!g||C&16)&&a!==(a=e[25]+"")&&re(u,a),(!g||C&20&&f!==(f=he.getFileUrl(e[2],e[25])))&&p(r,"href",f),(!g||C&18&&c!==(c="txt-ellipsis "+(e[26]?"txt-strikethrough txt-hint":"link-primary")))&&p(r,"class",c),y===(y=_(e,C))&&k?k.p(e,C):(k.d(1),k=y(e),k&&(k.c(),k.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){P(s.$$.fragment,T),g=!1},d(T){T&&w(t),H(s),k.d()}}}function np(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,m,h,g,_;i=new v4({props:{file:n[22]}});function y(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),q(i.$$.fragment),s=D(),l=v("div"),o=v("small"),o.textContent="New",r=D(),a=v("span"),f=B(u),d=D(),m=v("button"),m.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[22].name),p(m,"type","button"),p(m,"class","btn btn-transparent btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(k,T){S(k,e,T),b(e,t),j(i,t,null),b(e,s),b(e,l),b(l,o),b(l,r),b(l,a),b(a,f),b(e,d),b(e,m),h=!0,g||(_=[Pe(Ye.call(null,m,"Remove file")),K(m,"click",y)],g=!0)},p(k,T){n=k;const C={};T&1&&(C.file=n[22]),i.$set(C),(!h||T&1)&&u!==(u=n[22].name+"")&&re(f,u),(!h||T&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(k){h||(A(i.$$.fragment,k),h=!0)},o(k){P(i.$$.fragment,k),h=!1},d(k){k&&w(e),H(i),g=!1,Le(_)}}}function ip(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=D(),s=v("button"),s.innerHTML=` Upload new file`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-transparent btn-sm btn-block"),p(e,"class","list-item list-item-btn")},m(r,a){S(r,e,a),b(e,t),n[16](t),b(e,i),b(e,s),l||(o=[K(t,"change",n[17]),K(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&w(e),n[16](null),l=!1,Le(o)}}}function N4(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,m,h,g,_=n[4];const y=$=>$[25]+$[2].id;for(let $=0;$<_.length;$+=1){let O=ep(n,_,$),E=y(O);d.set(E,c[$]=tp(E,O))}let k=n[0],T=[];for(let $=0;$P(T[$],1,1,()=>{T[$]=null});let M=!n[8]&&ip(n);return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("div");for(let $=0;$({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-list form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&270533119&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function R4(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new dn}=e,c,d;function m(E){V.removeByValue(u,E),t(1,u)}function h(E){V.pushUnique(u,E),t(1,u)}function g(E){V.isEmpty(a[E])||a.splice(E,1),t(0,a)}function _(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=E=>m(E),k=E=>h(E),T=E=>g(E);function C(E){ie[E?"unshift":"push"](()=>{c=E,t(6,c)})}const M=()=>{for(let E of c.files)a.push(E);t(0,a),t(6,c.value=null,c)},$=()=>c==null?void 0:c.click();function O(E){ie[E?"unshift":"push"](()=>{d=E,t(7,d)})}return n.$$set=E=>{"record"in E&&t(2,o=E.record),"value"in E&&t(12,r=E.value),"uploadedFiles"in E&&t(0,a=E.uploadedFiles),"deletedFileIndexes"in E&&t(1,u=E.deletedFileIndexes),"field"in E&&t(3,f=E.field)},n.$$.update=()=>{var E,I;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=V.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=V.toArray(u))),n.$$.dirty&8&&t(5,i=((E=f.options)==null?void 0:E.maxSelect)>1),n.$$.dirty&4128&&V.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=V.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((I=f.options)==null?void 0:I.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&_()},[a,u,o,f,s,i,c,d,l,m,h,g,r,y,k,T,C,M,$,O]}class j4 extends ye{constructor(e){super(),ve(this,e,R4,F4,be,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function sp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function H4(n,e){e=sp(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=sp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}const q4=n=>({dragging:n&2,dragover:n&4}),lp=n=>({dragging:n[1],dragover:n[2]});function V4(n){let e,t,i,s;const l=n[8].default,o=Nt(l,n,n[7],lp);return{c(){e=v("div"),o&&o.c(),p(e,"draggable",!0),p(e,"class","draggable svelte-28orm4"),Q(e,"dragging",n[1]),Q(e,"dragover",n[2])},m(r,a){S(r,e,a),o&&o.m(e,null),t=!0,i||(s=[K(e,"dragover",pt(n[9])),K(e,"dragleave",pt(n[10])),K(e,"dragend",n[11]),K(e,"dragstart",n[12]),K(e,"drop",n[13])],i=!0)},p(r,[a]){o&&o.p&&(!t||a&134)&&Rt(o,l,r,r[7],t?Ft(l,r[7],a,q4):jt(r[7]),lp),(!t||a&2)&&Q(e,"dragging",r[1]),(!t||a&4)&&Q(e,"dragover",r[2])},i(r){t||(A(o,r),t=!0)},o(r){P(o,r),t=!1},d(r){r&&w(e),o&&o.d(r),i=!1,Le(s)}}}function z4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=$t();let{index:o}=e,{list:r=[]}=e,{disabled:a=!1}=e,u=!1,f=!1;function c(k,T){!k&&!a||(t(1,u=!0),k.dataTransfer.effectAllowed="move",k.dataTransfer.dropEffect="move",k.dataTransfer.setData("text/plain",T))}function d(k,T){if(!k&&!a)return;t(2,f=!1),t(1,u=!1),k.dataTransfer.dropEffect="move";const C=parseInt(k.dataTransfer.getData("text/plain"));C{t(2,f=!0)},h=()=>{t(2,f=!1)},g=()=>{t(2,f=!1),t(1,u=!1)},_=k=>c(k,o),y=k=>d(k,o);return n.$$set=k=>{"index"in k&&t(0,o=k.index),"list"in k&&t(5,r=k.list),"disabled"in k&&t(6,a=k.disabled),"$$scope"in k&&t(7,s=k.$$scope)},[o,u,f,c,d,r,a,s,i,m,h,g,_,y]}class B4 extends ye{constructor(e){super(),ve(this,e,z4,V4,be,{index:0,list:5,disabled:6})}}function U4(n){let e,t,i,s,l,o=V.truncate(n[1],150)+"",r,a,u;return{c(){e=v("div"),t=v("i"),s=D(),l=v("span"),r=B(o),p(t,"class","link-hint txt-sm ri-information-line svelte-1v6tn2p"),p(l,"class","txt txt-ellipsis svelte-1v6tn2p"),p(e,"class","record-info svelte-1v6tn2p")},m(f,c){S(f,e,c),b(e,t),b(e,s),b(e,l),b(l,r),a||(u=Pe(i=Ye.call(null,t,{text:V.truncate(JSON.stringify(V.truncateObject(n[0]),null,2),800,!0),class:"code",position:"left"})),a=!0)},p(f,[c]){i&&zt(i.update)&&c&1&&i.update.call(null,{text:V.truncate(JSON.stringify(V.truncateObject(f[0]),null,2),800,!0),class:"code",position:"left"}),c&2&&o!==(o=V.truncate(f[1],150)+"")&&re(r,o)},i:G,o:G,d(f){f&&w(e),a=!1,u()}}}function W4(n,e,t){let i,{record:s}=e,{displayFields:l=[]}=e;return n.$$set=o=>{"record"in o&&t(0,s=o.record),"displayFields"in o&&t(2,l=o.displayFields)},n.$$.update=()=>{n.$$.dirty&5&&t(1,i=V.displayValue(s,l))},[s,i,l]}class Xo extends ye{constructor(e){super(),ve(this,e,W4,U4,be,{record:0,displayFields:2})}}function op(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function rp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[8](i[49]);return i[6]=s,i}function ap(n){let e,t;function i(o,r){return o[11]?K4:Y4}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=D(),p(e,"class","list-item")},m(o,r){S(o,e,r),l.m(e,null),b(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function Y4(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&up(n);return{c(){e=v("span"),e.textContent="No records found.",t=D(),s&&s.c(),i=Ae(),p(e,"class","txt txt-hint")},m(o,r){S(o,e,r),S(o,t,r),s&&s.m(o,r),S(o,i,r)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=up(o),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&w(e),o&&w(t),s&&s.d(o),o&&w(i)}}}function K4(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function up(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[34]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function J4(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Z4(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function fp(n,e){let t,i,s,l,o,r,a,u,f,c,d;function m(T,C){return T[6]?Z4:J4}let h=m(e),g=h(e);l=new Xo({props:{record:e[49],displayFields:e[13]}});function _(){return e[31](e[49])}function y(){return e[32](e[49])}function k(...T){return e[33](e[49],...T)}return{key:n,first:null,c(){t=v("div"),g.c(),i=D(),s=v("div"),q(l.$$.fragment),o=D(),r=v("div"),a=v("button"),a.innerHTML='',u=D(),p(s,"class","content"),p(a,"type","button"),p(a,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),p(r,"class","actions nonintrusive"),p(t,"tabindex","0"),p(t,"class","list-item handle"),Q(t,"selected",e[6]),Q(t,"disabled",!e[6]&&e[5]>1&&!e[9]),this.first=t},m(T,C){S(T,t,C),g.m(t,null),b(t,i),b(t,s),j(l,s,null),b(t,o),b(t,r),b(r,a),b(t,u),f=!0,c||(d=[Pe(Ye.call(null,a,"Edit")),K(a,"keydown",yn(e[26])),K(a,"click",yn(_)),K(t,"click",y),K(t,"keydown",k)],c=!0)},p(T,C){e=T,h!==(h=m(e))&&(g.d(1),g=h(e),g&&(g.c(),g.m(t,i)));const M={};C[0]&8&&(M.record=e[49]),C[0]&8192&&(M.displayFields=e[13]),l.$set(M),(!f||C[0]&264)&&Q(t,"selected",e[6]),(!f||C[0]&808)&&Q(t,"disabled",!e[6]&&e[5]>1&&!e[9])},i(T){f||(A(l.$$.fragment,T),f=!0)},o(T){P(l.$$.fragment,T),f=!1},d(T){T&&w(t),g.d(),H(l),c=!1,Le(d)}}}function cp(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=B("("),i=B(t),s=B(" of MAX "),l=B(n[5]),o=B(")")},m(r,a){S(r,e,a),S(r,i,a),S(r,s,a),S(r,l,a),S(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&re(i,t),a[0]&32&&re(l,r[5])},d(r){r&&w(e),r&&w(i),r&&w(s),r&&w(l),r&&w(o)}}}function G4(n){let e;return{c(){e=v("p"),e.textContent="No selected records.",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function X4(n){let e,t,i=n[6],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){e=v("div");for(let o=0;o',l=D(),p(s,"type","button"),p(s,"title","Remove"),p(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),p(e,"class","label"),Q(e,"label-danger",n[52]),Q(e,"label-warning",n[53])},m(f,c){S(f,e,c),j(t,e,null),b(e,i),b(e,s),S(f,l,c),o=!0,r||(a=K(s,"click",u),r=!0)},p(f,c){n=f;const d={};c[0]&64&&(d.record=n[49]),c[0]&8192&&(d.displayFields=n[13]),t.$set(d),(!o||c[1]&2097152)&&Q(e,"label-danger",n[52]),(!o||c[1]&4194304)&&Q(e,"label-warning",n[53])},i(f){o||(A(t.$$.fragment,f),o=!0)},o(f){P(t.$$.fragment,f),o=!1},d(f){f&&w(e),H(t),f&&w(l),r=!1,a()}}}function dp(n){let e,t,i;function s(o){n[37](o)}let l={index:n[51],$$slots:{default:[Q4,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new B4({props:l}),ie.push(()=>ke(e,"list",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&8256|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function x4(n){let e,t,i,s,l,o,r=[],a=new Map,u,f,c,d,m,h,g,_,y,k,T;t=new Uo({props:{value:n[2],autocompleteCollection:n[12]}}),t.$on("submit",n[29]);let C=n[3];const M=N=>N[49].id;for(let N=0;N1&&cp(n);const E=[X4,G4],I=[];function L(N,F){return N[6].length?0:1}return h=L(n),g=I[h]=E[h](n),{c(){e=v("div"),q(t.$$.fragment),i=D(),s=v("button"),s.innerHTML='
    New record
    ',l=D(),o=v("div");for(let N=0;N1?O?O.p(N,F):(O=cp(N),O.c(),O.m(c,null)):O&&(O.d(1),O=null);let Z=h;h=L(N),h===Z?I[h].p(N,F):(pe(),P(I[Z],1,1,()=>{I[Z]=null}),me(),g=I[h],g?g.p(N,F):(g=I[h]=E[h](N),g.c()),A(g,1),g.m(_.parentNode,_))},i(N){if(!y){A(t.$$.fragment,N);for(let F=0;FCancel',t=D(),i=v("button"),i.innerHTML='Save selection',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[K(e,"click",n[27]),K(i,"click",n[28])],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function nM(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[18]];let o={$$slots:{footer:[tM],header:[eM],default:[x4]},$$scope:{ctx:n}};for(let a=0;at(25,m=Te));const h=$t(),g="picker_"+V.randomString(5);let{value:_}=e,{field:y}=e,k,T,C="",M=[],$=[],O=1,E=0,I=!1,L=!1;function N(){return t(2,C=""),t(3,M=[]),t(6,$=[]),W(),Z(!0),k==null?void 0:k.show()}function F(){return k==null?void 0:k.hide()}async function W(){const Te=V.toArray(_);if(!s||!Te.length)return;t(23,L=!0);let de=[];const $e=Te.slice(),Ze=[];for(;$e.length>0;){const nt=[];for(const Mt of $e.splice(0,Dr))nt.push(`id="${Mt}"`);Ze.push(he.collection(s).getFullList(Dr,{filter:nt.join("||"),$autoCancel:!1}))}try{await Promise.all(Ze).then(nt=>{de=de.concat(...nt)}),t(6,$=[]);for(const nt of Te){const Mt=V.findByKey(de,"id",nt);Mt&&$.push(Mt)}C.trim()||t(3,M=V.filterDuplicatesByKey($.concat(M)))}catch(nt){he.errorResponseHandler(nt)}t(23,L=!1)}async function Z(Te=!1){if(s){t(4,I=!0),Te&&(C.trim()?t(3,M=[]):t(3,M=V.toArray($).slice()));try{const de=Te?1:O+1,$e=await he.collection(s).getList(de,Dr,{filter:C,sort:"-created",$cancelKey:g+"loadList"});t(3,M=V.filterDuplicatesByKey(M.concat($e.items))),O=$e.page,t(22,E=$e.totalItems)}catch(de){he.errorResponseHandler(de)}t(4,I=!1)}}function ne(Te){i==1?t(6,$=[Te]):u&&(V.pushUnique($,Te),t(6,$))}function J(Te){V.removeByKey($,"id",Te.id),t(6,$)}function te(Te){f(Te)?J(Te):ne(Te)}function ee(){var Te;i!=1?t(19,_=$.map(de=>de.id)):t(19,_=((Te=$==null?void 0:$[0])==null?void 0:Te.id)||""),h("save",$),F()}function z(Te){We.call(this,n,Te)}const X=()=>F(),Y=()=>ee(),le=Te=>t(2,C=Te.detail),He=()=>T==null?void 0:T.show(),Re=Te=>T==null?void 0:T.show(Te),Fe=Te=>te(Te),qe=(Te,de)=>{(de.code==="Enter"||de.code==="Space")&&(de.preventDefault(),de.stopPropagation(),te(Te))},ge=()=>t(2,C=""),Se=()=>{a&&!I&&Z()},Ue=Te=>J(Te);function lt(Te){$=Te,t(6,$)}function ue(Te){ie[Te?"unshift":"push"](()=>{k=Te,t(1,k)})}function fe(Te){We.call(this,n,Te)}function ae(Te){We.call(this,n,Te)}function oe(Te){ie[Te?"unshift":"push"](()=>{T=Te,t(7,T)})}const je=Te=>{V.removeByKey(M,"id",Te.detail.id),M.unshift(Te.detail),t(3,M),V.pushOrReplaceByKey($,Te.detail),t(6,$)},Me=Te=>{V.removeByKey(M,"id",Te.detail.id),t(3,M),V.removeByKey($,"id",Te.detail.id),t(6,$)};return n.$$set=Te=>{e=Xe(Xe({},e),Gn(Te)),t(18,d=At(e,c)),"value"in Te&&t(19,_=Te.value),"field"in Te&&t(20,y=Te.field)},n.$$.update=()=>{var Te,de,$e;n.$$.dirty[0]&1048576&&t(5,i=((Te=y==null?void 0:y.options)==null?void 0:Te.maxSelect)||null),n.$$.dirty[0]&1048576&&t(24,s=(de=y==null?void 0:y.options)==null?void 0:de.collectionId),n.$$.dirty[0]&1048576&&t(13,l=($e=y==null?void 0:y.options)==null?void 0:$e.displayFields),n.$$.dirty[0]&50331648&&t(12,o=m.find(Ze=>Ze.id==s)||null),n.$$.dirty[0]&8388614&&typeof C<"u"&&!L&&k!=null&&k.isActive()&&Z(!0),n.$$.dirty[0]&8388624&&t(11,r=I||L),n.$$.dirty[0]&4194312&&t(10,a=E>M.length),n.$$.dirty[0]&96&&t(9,u=i===null||i>$.length),n.$$.dirty[0]&64&&t(8,f=function(Ze){return V.findByKey($,"id",Ze.id)})},[F,k,C,M,I,i,$,T,f,u,a,r,o,l,Z,J,te,ee,d,_,y,N,E,L,s,m,z,X,Y,le,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je,Me]}class sM extends ye{constructor(e){super(),ve(this,e,iM,nM,be,{value:19,field:20,show:21,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[21]}get hide(){return this.$$.ctx[0]}}function pp(n,e,t){const i=n.slice();return i[13]=e[t],i}function mp(n,e,t){const i=n.slice();return i[16]=e[t],i}function hp(n){let e,t=n[4]&&gp(n);return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[4]?t?t.p(i,s):(t=gp(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function gp(n){let e,t=V.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    + `),O&&O.c(),m=D(),g.c(),_=Ae(),p(s,"type","button"),p(s,"class","btn btn-transparent btn-hint p-l-sm p-r-sm"),p(e,"class","flex m-b-base flex-gap-10"),p(o,"class","list picker-list m-b-base svelte-1u8jhky"),p(c,"class","section-title")},m(N,F){S(N,e,F),j(t,e,null),b(e,i),b(e,s),S(N,l,F),S(N,o,F);for(let W=0;W1?O?O.p(N,F):(O=cp(N),O.c(),O.m(c,null)):O&&(O.d(1),O=null);let Z=h;h=L(N),h===Z?I[h].p(N,F):(pe(),P(I[Z],1,1,()=>{I[Z]=null}),me(),g=I[h],g?g.p(N,F):(g=I[h]=E[h](N),g.c()),A(g,1),g.m(_.parentNode,_))},i(N){if(!y){A(t.$$.fragment,N);for(let F=0;FCancel',t=D(),i=v("button"),i.innerHTML='Save selection',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[K(e,"click",n[27]),K(i,"click",n[28])],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function nM(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[18]];let o={$$slots:{footer:[tM],header:[eM],default:[x4]},$$scope:{ctx:n}};for(let a=0;at(25,m=Te));const h=$t(),g="picker_"+V.randomString(5);let{value:_}=e,{field:y}=e,k,T,C="",M=[],$=[],O=1,E=0,I=!1,L=!1;function N(){return t(2,C=""),t(3,M=[]),t(6,$=[]),W(),Z(!0),k==null?void 0:k.show()}function F(){return k==null?void 0:k.hide()}async function W(){const Te=V.toArray(_);if(!s||!Te.length)return;t(23,L=!0);let ce=[];const $e=Te.slice(),Ze=[];for(;$e.length>0;){const nt=[];for(const Mt of $e.splice(0,Dr))nt.push(`id="${Mt}"`);Ze.push(he.collection(s).getFullList(Dr,{filter:nt.join("||"),$autoCancel:!1}))}try{await Promise.all(Ze).then(nt=>{ce=ce.concat(...nt)}),t(6,$=[]);for(const nt of Te){const Mt=V.findByKey(ce,"id",nt);Mt&&$.push(Mt)}C.trim()||t(3,M=V.filterDuplicatesByKey($.concat(M)))}catch(nt){he.errorResponseHandler(nt)}t(23,L=!1)}async function Z(Te=!1){if(s){t(4,I=!0),Te&&(C.trim()?t(3,M=[]):t(3,M=V.toArray($).slice()));try{const ce=Te?1:O+1,$e=await he.collection(s).getList(ce,Dr,{filter:C,sort:"-created",$cancelKey:g+"loadList"});t(3,M=V.filterDuplicatesByKey(M.concat($e.items))),O=$e.page,t(22,E=$e.totalItems)}catch(ce){he.errorResponseHandler(ce)}t(4,I=!1)}}function ne(Te){i==1?t(6,$=[Te]):u&&(V.pushUnique($,Te),t(6,$))}function J(Te){V.removeByKey($,"id",Te.id),t(6,$)}function te(Te){f(Te)?J(Te):ne(Te)}function ee(){var Te;i!=1?t(19,_=$.map(ce=>ce.id)):t(19,_=((Te=$==null?void 0:$[0])==null?void 0:Te.id)||""),h("save",$),F()}function z(Te){We.call(this,n,Te)}const X=()=>F(),Y=()=>ee(),le=Te=>t(2,C=Te.detail),He=()=>T==null?void 0:T.show(),Re=Te=>T==null?void 0:T.show(Te),Fe=Te=>te(Te),qe=(Te,ce)=>{(ce.code==="Enter"||ce.code==="Space")&&(ce.preventDefault(),ce.stopPropagation(),te(Te))},ge=()=>t(2,C=""),Se=()=>{a&&!I&&Z()},Ue=Te=>J(Te);function lt(Te){$=Te,t(6,$)}function ue(Te){ie[Te?"unshift":"push"](()=>{k=Te,t(1,k)})}function fe(Te){We.call(this,n,Te)}function ae(Te){We.call(this,n,Te)}function oe(Te){ie[Te?"unshift":"push"](()=>{T=Te,t(7,T)})}const je=Te=>{V.removeByKey(M,"id",Te.detail.id),M.unshift(Te.detail),t(3,M),V.pushOrReplaceByKey($,Te.detail),t(6,$)},Me=Te=>{V.removeByKey(M,"id",Te.detail.id),t(3,M),V.removeByKey($,"id",Te.detail.id),t(6,$)};return n.$$set=Te=>{e=Xe(Xe({},e),Gn(Te)),t(18,d=At(e,c)),"value"in Te&&t(19,_=Te.value),"field"in Te&&t(20,y=Te.field)},n.$$.update=()=>{var Te,ce,$e;n.$$.dirty[0]&1048576&&t(5,i=((Te=y==null?void 0:y.options)==null?void 0:Te.maxSelect)||null),n.$$.dirty[0]&1048576&&t(24,s=(ce=y==null?void 0:y.options)==null?void 0:ce.collectionId),n.$$.dirty[0]&1048576&&t(13,l=($e=y==null?void 0:y.options)==null?void 0:$e.displayFields),n.$$.dirty[0]&50331648&&t(12,o=m.find(Ze=>Ze.id==s)||null),n.$$.dirty[0]&8388614&&typeof C<"u"&&!L&&k!=null&&k.isActive()&&Z(!0),n.$$.dirty[0]&8388624&&t(11,r=I||L),n.$$.dirty[0]&4194312&&t(10,a=E>M.length),n.$$.dirty[0]&96&&t(9,u=i===null||i>$.length),n.$$.dirty[0]&64&&t(8,f=function(Ze){return V.findByKey($,"id",Ze.id)})},[F,k,C,M,I,i,$,T,f,u,a,r,o,l,Z,J,te,ee,d,_,y,N,E,L,s,m,z,X,Y,le,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je,Me]}class sM extends ye{constructor(e){super(),ve(this,e,iM,nM,be,{value:19,field:20,show:21,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[21]}get hide(){return this.$$.ctx[0]}}function pp(n,e,t){const i=n.slice();return i[13]=e[t],i}function mp(n,e,t){const i=n.slice();return i[16]=e[t],i}function hp(n){let e,t=n[4]&&gp(n);return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[4]?t?t.p(i,s):(t=gp(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function gp(n){let e,t=V.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    `,p(e,"class","list-item")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function bp(n){var d;let e,t,i,s,l,o,r,a,u,f;i=new Xo({props:{record:n[13],displayFields:(d=n[2].options)==null?void 0:d.displayFields}});function c(){return n[7](n[13])}return{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),o=v("button"),o.innerHTML='',r=D(),p(t,"class","content"),p(o,"type","button"),p(o,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(l,"class","actions"),p(e,"class","list-item")},m(m,h){S(m,e,h),b(e,t),j(i,t,null),b(e,s),b(e,l),b(l,o),b(e,r),a=!0,u||(f=[Pe(Ye.call(null,o,"Remove")),K(o,"click",c)],u=!0)},p(m,h){var _;n=m;const g={};h&8&&(g.record=n[13]),h&4&&(g.displayFields=(_=n[2].options)==null?void 0:_.displayFields),i.$set(g)},i(m){a||(A(i.$$.fragment,m),a=!0)},o(m){P(i.$$.fragment,m),a=!1},d(m){m&&w(e),H(i),u=!1,Le(f)}}}function lM(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,h,g,_,y,k=n[3],T=[];for(let $=0;$P(T[$],1,1,()=>{T[$]=null});let M=null;return k.length||(M=hp(n)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),f=v("div"),c=v("div");for(let $=0;$ - Open picker`,p(t,"class",i=yi(V.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[12]),p(c,"class","relations-list svelte-1ynw0pc"),p(h,"type","button"),p(h,"class","btn btn-transparent btn-sm btn-block"),p(m,"class","list-item list-item-btn"),p(f,"class","list")},m($,O){S($,e,O),b(e,t),b(e,s),b(e,l),b(l,r),S($,u,O),S($,f,O),b(f,c);for(let E=0;E({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l={value:n[0],field:n[2]};return i=new sM({props:l}),n[9](i),i.$on("save",n[10]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(o,r){j(e,o,r),S(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&4&&(a.class="form-field form-field-list "+(o[2].required?"required":"")),r&4&&(a.name=o[2].name),r&528415&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};r&1&&(u.value=o[0]),r&4&&(u.field=o[2]),i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&w(t),n[9](null),H(i,o)}}}const vp=100;function rM(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new dn}=e,r=[],a=!1;u();async function u(){var k,T;const g=V.toArray(s);if(!((k=o==null?void 0:o.options)!=null&&k.collectionId)||!g.length){t(3,r=[]),t(4,a=!1);return}t(4,a=!0);const _=g.slice(),y=[];for(;_.length>0;){const C=[];for(const M of _.splice(0,vp))C.push(`id="${M}"`);y.push(he.collection((T=o==null?void 0:o.options)==null?void 0:T.collectionId).getFullList(vp,{filter:C.join("||"),$autoCancel:!1}))}try{let C=[];await Promise.all(y).then(M=>{C=C.concat(...M)});for(const M of g){const $=V.findByKey(C,"id",M);$&&r.push($)}t(3,r)}catch(C){he.errorResponseHandler(C)}t(4,a=!1)}function f(g){var _;V.removeByKey(r,"id",g.id),t(3,r),i?t(0,s=r.map(y=>y.id)):t(0,s=((_=r[0])==null?void 0:_.id)||"")}const c=g=>f(g),d=()=>l==null?void 0:l.show();function m(g){ie[g?"unshift":"push"](()=>{l=g,t(1,l)})}const h=g=>{t(3,r=g.detail||[]),t(0,s=i?r.map(_=>_.id):r[0].id||"")};return n.$$set=g=>{"value"in g&&t(0,s=g.value),"picker"in g&&t(1,l=g.picker),"field"in g&&t(2,o=g.field)},n.$$.update=()=>{var g;n.$$.dirty&4&&t(5,i=((g=o.options)==null?void 0:g.maxSelect)!=1)},[s,l,o,r,a,i,f,c,d,m,h]}class aM extends ye{constructor(e){super(),ve(this,e,rM,oM,be,{value:0,picker:1,field:2})}}const uM=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],fM=(n,e)=>{uM.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function cM(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),Ar(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function dM(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function pM(n){let e;function t(l,o){return l[1]?dM:cM}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&p(e,"class",l[2])},i:G,o:G,d(l){l&&w(e),s.d(),n[19](null)}}}const ob=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),mM=()=>{let n={listeners:[],scriptId:ob("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let hM=mM();function gM(n,e,t){var i;let{id:s=ob("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:c="change input undo redo"}=e,{value:d=""}=e,{text:m=""}=e,{cssClass:h="tinymce-wrapper"}=e,g,_,y,k="",T=o;const C=$t(),M=()=>{const N=(()=>typeof window<"u"?window:global)();return N&&N.tinymce?N.tinymce:null},$=()=>{const L=Object.assign(Object.assign({},f),{target:_,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:N=>{t(14,y=N),N.on("init",()=>{N.setContent(d),N.on(c,()=>{t(15,k=N.getContent()),k!==d&&(t(5,d=k),t(6,m=N.getContent({format:"text"})))})}),fM(N,C),typeof f.setup=="function"&&f.setup(N)}});t(4,_.style.visibility="",_),M().init(L)};nn(()=>{if(M()!==null)$();else{const L=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;hM.load(g.ownerDocument,L,()=>{$()})}}),zh(()=>{var L;y&&((L=M())===null||L===void 0||L.remove(y))});function O(L){ie[L?"unshift":"push"](()=>{_=L,t(4,_)})}function E(L){ie[L?"unshift":"push"](()=>{_=L,t(4,_)})}function I(L){ie[L?"unshift":"push"](()=>{g=L,t(3,g)})}return n.$$set=L=>{"id"in L&&t(0,s=L.id),"inline"in L&&t(1,l=L.inline),"disabled"in L&&t(7,o=L.disabled),"apiKey"in L&&t(8,r=L.apiKey),"channel"in L&&t(9,a=L.channel),"scriptSrc"in L&&t(10,u=L.scriptSrc),"conf"in L&&t(11,f=L.conf),"modelEvents"in L&&t(12,c=L.modelEvents),"value"in L&&t(5,d=L.value),"text"in L&&t(6,m=L.text),"cssClass"in L&&t(2,h=L.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(y&&k!==d&&(y.setContent(d),t(6,m=y.getContent({format:"text"}))),y&&o!==T&&(t(16,T=o),typeof(t(13,i=y.mode)===null||i===void 0?void 0:i.set)=="function"?y.mode.set(o?"readonly":"design"):y.setMode(o?"readonly":"design")))},[s,l,h,g,_,d,m,o,r,a,u,f,c,i,y,k,T,O,E,I]}class _M extends ye{constructor(e){super(),ve(this,e,gM,pM,be,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function bM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(g){n[2](g)}let h={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:V.defaultEditorOptions()};return n[0]!==void 0&&(h.value=n[0]),f=new _M({props:h}),ie.push(()=>ke(f,"value",m)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),q(f.$$.fragment),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),j(f,g,_),d=!0},p(g,_){(!d||_&2&&i!==(i=V.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||_&2)&&o!==(o=g[1].name+"")&&re(r,o),(!d||_&8&&a!==(a=g[3]))&&p(e,"for",a);const y={};_&8&&(y.id=g[3]),!c&&_&1&&(c=!0,y.value=g[0],we(()=>c=!1)),f.$set(y)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){P(f.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(u),H(f,g)}}}function vM(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[bM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function yM(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class kM extends ye{constructor(e){super(),ve(this,e,yM,vM,be,{field:1,value:0})}}function wM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Auth URL"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].authUrl),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&ce(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function SM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Token URL"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].tokenUrl),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&ce(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function TM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("User API URL"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].userApiUrl),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&ce(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function CM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new _e({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[wM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[SM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),c=new _e({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[TM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=D(),i=v("div"),s=v("div"),q(l.$$.fragment),o=D(),r=v("div"),q(a.$$.fragment),u=D(),f=v("div"),q(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-4"),p(r,"class","col-lg-4"),p(f,"class","col-lg-4"),p(i,"class","grid")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),b(i,s),j(l,s,null),b(i,o),b(i,r),j(a,r,null),b(i,u),b(i,f),j(c,f,null),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".authUrl"),h&97&&(g.$$scope={dirty:h,ctx:m}),l.$set(g);const _={};h&2&&(_.name=m[1]+".tokenUrl"),h&97&&(_.$$scope={dirty:h,ctx:m}),a.$set(_);const y={};h&2&&(y.name=m[1]+".userApiUrl"),h&97&&(y.$$scope={dirty:h,ctx:m}),c.$set(y)},i(m){d||(A(l.$$.fragment,m),A(a.$$.fragment,m),A(c.$$.fragment,m),d=!0)},o(m){P(l.$$.fragment,m),P(a.$$.fragment,m),P(c.$$.fragment,m),d=!1},d(m){m&&w(e),m&&w(t),m&&w(i),H(l),H(a),H(c)}}}function $M(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class yp extends ye{constructor(e){super(),ve(this,e,$M,CM,be,{key:1,config:0})}}function MM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Auth URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"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(l,"id",o),d&1&&ce(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function DM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Token URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","text"),p(l,"id",o=n[4]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"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(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&ce(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function OM(n){let e,t,i,s,l,o,r,a,u;return l=new _e({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[MM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[DM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=D(),i=v("div"),s=v("div"),q(l.$$.fragment),o=D(),r=v("div"),q(a.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(i,"class","grid")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),b(i,s),j(l,s,null),b(i,o),b(i,r),j(a,r,null),u=!0},p(f,[c]){const d={};c&2&&(d.name=f[1]+".authUrl"),c&49&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const m={};c&2&&(m.name=f[1]+".tokenUrl"),c&49&&(m.$$scope={dirty:c,ctx:f}),a.$set(m)},i(f){u||(A(l.$$.fragment,f),A(a.$$.fragment,f),u=!0)},o(f){P(l.$$.fragment,f),P(a.$$.fragment,f),u=!1},d(f){f&&w(e),f&&w(t),f&&w(i),H(l),H(a)}}}function EM(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class AM extends ye{constructor(e){super(),ve(this,e,EM,OM,be,{key:1,config:0})}}function IM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Auth URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/authorize/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[2]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&ce(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function PM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Token URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/token/",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[3]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&ce(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function LM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("User API URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/userinfo/",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].userApiUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].userApiUrl&&ce(l,c[0].userApiUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function NM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new _e({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[IM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[PM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),c=new _e({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[LM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Authentik endpoints",t=D(),i=v("div"),s=v("div"),q(l.$$.fragment),o=D(),r=v("div"),q(a.$$.fragment),u=D(),f=v("div"),q(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(f,"class","col-lg-12"),p(i,"class","grid")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),b(i,s),j(l,s,null),b(i,o),b(i,r),j(a,r,null),b(i,u),b(i,f),j(c,f,null),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".authUrl"),h&97&&(g.$$scope={dirty:h,ctx:m}),l.$set(g);const _={};h&2&&(_.name=m[1]+".tokenUrl"),h&97&&(_.$$scope={dirty:h,ctx:m}),a.$set(_);const y={};h&2&&(y.name=m[1]+".userApiUrl"),h&97&&(y.$$scope={dirty:h,ctx:m}),c.$set(y)},i(m){d||(A(l.$$.fragment,m),A(a.$$.fragment,m),A(c.$$.fragment,m),d=!0)},o(m){P(l.$$.fragment,m),P(a.$$.fragment,m),P(c.$$.fragment,m),d=!1},d(m){m&&w(e),m&&w(t),m&&w(i),H(l),H(a),H(c)}}}function FM(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class RM extends ye{constructor(e){super(),ve(this,e,FM,NM,be,{key:1,config:0})}}const vl={googleAuth:{title:"Google",icon:"ri-google-fill"},facebookAuth:{title:"Facebook",icon:"ri-facebook-fill"},twitterAuth:{title:"Twitter",icon:"ri-twitter-fill"},githubAuth:{title:"GitHub",icon:"ri-github-fill"},gitlabAuth:{title:"GitLab",icon:"ri-gitlab-fill",optionsComponent:yp},discordAuth:{title:"Discord",icon:"ri-discord-fill"},microsoftAuth:{title:"Microsoft",icon:"ri-microsoft-fill",optionsComponent:AM},spotifyAuth:{title:"Spotify",icon:"ri-spotify-fill"},kakaoAuth:{title:"Kakao",icon:"ri-kakao-talk-fill"},twitchAuth:{title:"Twitch",icon:"ri-twitch-fill"},stravaAuth:{title:"Strava",icon:"ri-riding-fill"},giteeAuth:{title:"Gitee",icon:"ri-git-repository-fill"},giteaAuth:{title:"Gitea",icon:"ri-cup-fill",optionsComponent:yp},livechatAuth:{title:"LiveChat",icon:"ri-chat-1-fill"},authentikAuth:{title:"Authentik",icon:"ri-lock-fill",optionsComponent:RM}};function kp(n,e,t){const i=n.slice();return i[9]=e[t],i}function jM(n){let e;return{c(){e=v("p"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function HM(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function wp(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,m,h,g,_,y;function k(){return n[6](n[9])}return{c(){e=v("div"),t=v("i"),s=D(),l=v("span"),r=B(o),a=D(),u=v("div"),f=B("ID: "),d=B(c),m=D(),h=v("button"),h.innerHTML='',g=D(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(h,"type","button"),p(h,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m(T,C){S(T,e,C),b(e,t),b(e,s),b(e,l),b(l,r),b(e,a),b(e,u),b(u,f),b(u,d),b(e,m),b(e,h),b(e,g),_||(y=K(h,"click",k),_=!0)},p(T,C){n=T,C&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&re(r,o),C&2&&c!==(c=n[9].providerId+"")&&re(d,c)},d(T){T&&w(e),_=!1,y()}}}function VM(n){let e;function t(l,o){var r;return l[2]?qM:(r=l[0])!=null&&r.id&&l[1].length?HM:jM}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function zM(n,e,t){const i=$t();let{record:s}=e,l=[],o=!1;function r(d){var m;return((m=vl[d+"Auth"])==null?void 0:m.title)||V.sentenize(d,!1)}function a(d){var m;return((m=vl[d+"Auth"])==null?void 0:m.icon)||`ri-${d}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await he.collection(s.collectionId).listExternalAuths(s.id))}catch(d){he.errorResponseHandler(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||un(`Do you really want to unlink the ${r(d)} provider?`,()=>he.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{Vt(`Successfully unlinked the ${r(d)} provider.`),i("unlink",d),u()}).catch(m=>{he.errorResponseHandler(m)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class BM extends ye{constructor(e){super(),ve(this,e,zM,VM,be,{record:0})}}function Sp(n,e,t){const i=n.slice();return i[51]=e[t],i[52]=e,i[53]=t,i}function Tp(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[UM,({uniqueId:i})=>({54:i}),({uniqueId:i})=>[0,i?8388608:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&25165824&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function UM(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="id",l=D(),o=v("span"),a=D(),u=v("div"),f=v("i"),d=D(),m=v("input"),p(t,"class",V.getFieldTypeIcon("primary")),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[54]),p(f,"class","ri-calendar-event-line txt-disabled"),p(u,"class","form-field-addon"),p(m,"type","text"),p(m,"id",h=n[54]),m.value=g=n[2].id,m.readOnly=!0},m(k,T){S(k,e,T),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),S(k,a,T),S(k,u,T),b(u,f),S(k,d,T),S(k,m,T),_||(y=Pe(c=Ye.call(null,f,{text:`Created: ${n[2].created} + Open picker`,p(t,"class",i=yi(V.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[12]),p(c,"class","relations-list svelte-1ynw0pc"),p(h,"type","button"),p(h,"class","btn btn-transparent btn-sm btn-block"),p(m,"class","list-item list-item-btn"),p(f,"class","list")},m($,O){S($,e,O),b(e,t),b(e,s),b(e,l),b(l,r),S($,u,O),S($,f,O),b(f,c);for(let E=0;E({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l={value:n[0],field:n[2]};return i=new sM({props:l}),n[9](i),i.$on("save",n[10]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(o,r){j(e,o,r),S(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&4&&(a.class="form-field form-field-list "+(o[2].required?"required":"")),r&4&&(a.name=o[2].name),r&528415&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};r&1&&(u.value=o[0]),r&4&&(u.field=o[2]),i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&w(t),n[9](null),H(i,o)}}}const vp=100;function rM(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new dn}=e,r=[],a=!1;u();async function u(){var k,T;const g=V.toArray(s);if(!((k=o==null?void 0:o.options)!=null&&k.collectionId)||!g.length){t(3,r=[]),t(4,a=!1);return}t(4,a=!0);const _=g.slice(),y=[];for(;_.length>0;){const C=[];for(const M of _.splice(0,vp))C.push(`id="${M}"`);y.push(he.collection((T=o==null?void 0:o.options)==null?void 0:T.collectionId).getFullList(vp,{filter:C.join("||"),$autoCancel:!1}))}try{let C=[];await Promise.all(y).then(M=>{C=C.concat(...M)});for(const M of g){const $=V.findByKey(C,"id",M);$&&r.push($)}t(3,r)}catch(C){he.errorResponseHandler(C)}t(4,a=!1)}function f(g){var _;V.removeByKey(r,"id",g.id),t(3,r),i?t(0,s=r.map(y=>y.id)):t(0,s=((_=r[0])==null?void 0:_.id)||"")}const c=g=>f(g),d=()=>l==null?void 0:l.show();function m(g){ie[g?"unshift":"push"](()=>{l=g,t(1,l)})}const h=g=>{t(3,r=g.detail||[]),t(0,s=i?r.map(_=>_.id):r[0].id||"")};return n.$$set=g=>{"value"in g&&t(0,s=g.value),"picker"in g&&t(1,l=g.picker),"field"in g&&t(2,o=g.field)},n.$$.update=()=>{var g;n.$$.dirty&4&&t(5,i=((g=o.options)==null?void 0:g.maxSelect)!=1)},[s,l,o,r,a,i,f,c,d,m,h]}class aM extends ye{constructor(e){super(),ve(this,e,rM,oM,be,{value:0,picker:1,field:2})}}const uM=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],fM=(n,e)=>{uM.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function cM(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),Ar(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function dM(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function pM(n){let e;function t(l,o){return l[1]?dM:cM}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&p(e,"class",l[2])},i:G,o:G,d(l){l&&w(e),s.d(),n[19](null)}}}const ob=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),mM=()=>{let n={listeners:[],scriptId:ob("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let hM=mM();function gM(n,e,t){var i;let{id:s=ob("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:c="change input undo redo"}=e,{value:d=""}=e,{text:m=""}=e,{cssClass:h="tinymce-wrapper"}=e,g,_,y,k="",T=o;const C=$t(),M=()=>{const N=(()=>typeof window<"u"?window:global)();return N&&N.tinymce?N.tinymce:null},$=()=>{const L=Object.assign(Object.assign({},f),{target:_,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:N=>{t(14,y=N),N.on("init",()=>{N.setContent(d),N.on(c,()=>{t(15,k=N.getContent()),k!==d&&(t(5,d=k),t(6,m=N.getContent({format:"text"})))})}),fM(N,C),typeof f.setup=="function"&&f.setup(N)}});t(4,_.style.visibility="",_),M().init(L)};nn(()=>{if(M()!==null)$();else{const L=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;hM.load(g.ownerDocument,L,()=>{$()})}}),zh(()=>{var L;y&&((L=M())===null||L===void 0||L.remove(y))});function O(L){ie[L?"unshift":"push"](()=>{_=L,t(4,_)})}function E(L){ie[L?"unshift":"push"](()=>{_=L,t(4,_)})}function I(L){ie[L?"unshift":"push"](()=>{g=L,t(3,g)})}return n.$$set=L=>{"id"in L&&t(0,s=L.id),"inline"in L&&t(1,l=L.inline),"disabled"in L&&t(7,o=L.disabled),"apiKey"in L&&t(8,r=L.apiKey),"channel"in L&&t(9,a=L.channel),"scriptSrc"in L&&t(10,u=L.scriptSrc),"conf"in L&&t(11,f=L.conf),"modelEvents"in L&&t(12,c=L.modelEvents),"value"in L&&t(5,d=L.value),"text"in L&&t(6,m=L.text),"cssClass"in L&&t(2,h=L.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(y&&k!==d&&(y.setContent(d),t(6,m=y.getContent({format:"text"}))),y&&o!==T&&(t(16,T=o),typeof(t(13,i=y.mode)===null||i===void 0?void 0:i.set)=="function"?y.mode.set(o?"readonly":"design"):y.setMode(o?"readonly":"design")))},[s,l,h,g,_,d,m,o,r,a,u,f,c,i,y,k,T,O,E,I]}class _M extends ye{constructor(e){super(),ve(this,e,gM,pM,be,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function bM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(g){n[2](g)}let h={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:V.defaultEditorOptions()};return n[0]!==void 0&&(h.value=n[0]),f=new _M({props:h}),ie.push(()=>ke(f,"value",m)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=B(o),u=D(),q(f.$$.fragment),p(t,"class",i=V.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,_){S(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),S(g,u,_),j(f,g,_),d=!0},p(g,_){(!d||_&2&&i!==(i=V.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||_&2)&&o!==(o=g[1].name+"")&&re(r,o),(!d||_&8&&a!==(a=g[3]))&&p(e,"for",a);const y={};_&8&&(y.id=g[3]),!c&&_&1&&(c=!0,y.value=g[0],we(()=>c=!1)),f.$set(y)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){P(f.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(u),H(f,g)}}}function vM(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[bM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function yM(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class kM extends ye{constructor(e){super(),ve(this,e,yM,vM,be,{field:1,value:0})}}function wM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Auth URL"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].authUrl),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&de(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function SM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Token URL"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].tokenUrl),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&de(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function TM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("User API URL"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].userApiUrl),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&de(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function CM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new _e({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[wM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[SM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),c=new _e({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[TM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=D(),i=v("div"),s=v("div"),q(l.$$.fragment),o=D(),r=v("div"),q(a.$$.fragment),u=D(),f=v("div"),q(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-4"),p(r,"class","col-lg-4"),p(f,"class","col-lg-4"),p(i,"class","grid")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),b(i,s),j(l,s,null),b(i,o),b(i,r),j(a,r,null),b(i,u),b(i,f),j(c,f,null),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".authUrl"),h&97&&(g.$$scope={dirty:h,ctx:m}),l.$set(g);const _={};h&2&&(_.name=m[1]+".tokenUrl"),h&97&&(_.$$scope={dirty:h,ctx:m}),a.$set(_);const y={};h&2&&(y.name=m[1]+".userApiUrl"),h&97&&(y.$$scope={dirty:h,ctx:m}),c.$set(y)},i(m){d||(A(l.$$.fragment,m),A(a.$$.fragment,m),A(c.$$.fragment,m),d=!0)},o(m){P(l.$$.fragment,m),P(a.$$.fragment,m),P(c.$$.fragment,m),d=!1},d(m){m&&w(e),m&&w(t),m&&w(i),H(l),H(a),H(c)}}}function $M(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class yp extends ye{constructor(e){super(),ve(this,e,$M,CM,be,{key:1,config:0})}}function MM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Auth URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),de(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"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(l,"id",o),d&1&&de(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function DM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Token URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","text"),p(l,"id",o=n[4]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),de(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"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(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&de(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function OM(n){let e,t,i,s,l,o,r,a,u;return l=new _e({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[MM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[DM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=D(),i=v("div"),s=v("div"),q(l.$$.fragment),o=D(),r=v("div"),q(a.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(i,"class","grid")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),b(i,s),j(l,s,null),b(i,o),b(i,r),j(a,r,null),u=!0},p(f,[c]){const d={};c&2&&(d.name=f[1]+".authUrl"),c&49&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const m={};c&2&&(m.name=f[1]+".tokenUrl"),c&49&&(m.$$scope={dirty:c,ctx:f}),a.$set(m)},i(f){u||(A(l.$$.fragment,f),A(a.$$.fragment,f),u=!0)},o(f){P(l.$$.fragment,f),P(a.$$.fragment,f),u=!1},d(f){f&&w(e),f&&w(t),f&&w(i),H(l),H(a)}}}function EM(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class AM extends ye{constructor(e){super(),ve(this,e,EM,OM,be,{key:1,config:0})}}function IM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Auth URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/authorize/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),de(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[2]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&de(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function PM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Token URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/token/",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),de(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[3]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&de(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function LM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("User API URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/userinfo/",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),b(e,t),S(c,s,d),S(c,l,d),de(l,n[0].userApiUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].userApiUrl&&de(l,c[0].userApiUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function NM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new _e({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[IM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[PM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),c=new _e({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[LM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Authentik endpoints",t=D(),i=v("div"),s=v("div"),q(l.$$.fragment),o=D(),r=v("div"),q(a.$$.fragment),u=D(),f=v("div"),q(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(f,"class","col-lg-12"),p(i,"class","grid")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),b(i,s),j(l,s,null),b(i,o),b(i,r),j(a,r,null),b(i,u),b(i,f),j(c,f,null),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".authUrl"),h&97&&(g.$$scope={dirty:h,ctx:m}),l.$set(g);const _={};h&2&&(_.name=m[1]+".tokenUrl"),h&97&&(_.$$scope={dirty:h,ctx:m}),a.$set(_);const y={};h&2&&(y.name=m[1]+".userApiUrl"),h&97&&(y.$$scope={dirty:h,ctx:m}),c.$set(y)},i(m){d||(A(l.$$.fragment,m),A(a.$$.fragment,m),A(c.$$.fragment,m),d=!0)},o(m){P(l.$$.fragment,m),P(a.$$.fragment,m),P(c.$$.fragment,m),d=!1},d(m){m&&w(e),m&&w(t),m&&w(i),H(l),H(a),H(c)}}}function FM(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class RM extends ye{constructor(e){super(),ve(this,e,FM,NM,be,{key:1,config:0})}}const vl={googleAuth:{title:"Google",icon:"ri-google-fill"},facebookAuth:{title:"Facebook",icon:"ri-facebook-fill"},twitterAuth:{title:"Twitter",icon:"ri-twitter-fill"},githubAuth:{title:"GitHub",icon:"ri-github-fill"},gitlabAuth:{title:"GitLab",icon:"ri-gitlab-fill",optionsComponent:yp},discordAuth:{title:"Discord",icon:"ri-discord-fill"},microsoftAuth:{title:"Microsoft",icon:"ri-microsoft-fill",optionsComponent:AM},spotifyAuth:{title:"Spotify",icon:"ri-spotify-fill"},kakaoAuth:{title:"Kakao",icon:"ri-kakao-talk-fill"},twitchAuth:{title:"Twitch",icon:"ri-twitch-fill"},stravaAuth:{title:"Strava",icon:"ri-riding-fill"},giteeAuth:{title:"Gitee",icon:"ri-git-repository-fill"},giteaAuth:{title:"Gitea",icon:"ri-cup-fill",optionsComponent:yp},livechatAuth:{title:"LiveChat",icon:"ri-chat-1-fill"},authentikAuth:{title:"Authentik",icon:"ri-lock-fill",optionsComponent:RM}};function kp(n,e,t){const i=n.slice();return i[9]=e[t],i}function jM(n){let e;return{c(){e=v("p"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function HM(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function wp(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,m,h,g,_,y;function k(){return n[6](n[9])}return{c(){e=v("div"),t=v("i"),s=D(),l=v("span"),r=B(o),a=D(),u=v("div"),f=B("ID: "),d=B(c),m=D(),h=v("button"),h.innerHTML='',g=D(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(h,"type","button"),p(h,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m(T,C){S(T,e,C),b(e,t),b(e,s),b(e,l),b(l,r),b(e,a),b(e,u),b(u,f),b(u,d),b(e,m),b(e,h),b(e,g),_||(y=K(h,"click",k),_=!0)},p(T,C){n=T,C&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&re(r,o),C&2&&c!==(c=n[9].providerId+"")&&re(d,c)},d(T){T&&w(e),_=!1,y()}}}function VM(n){let e;function t(l,o){var r;return l[2]?qM:(r=l[0])!=null&&r.id&&l[1].length?HM:jM}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function zM(n,e,t){const i=$t();let{record:s}=e,l=[],o=!1;function r(d){var m;return((m=vl[d+"Auth"])==null?void 0:m.title)||V.sentenize(d,!1)}function a(d){var m;return((m=vl[d+"Auth"])==null?void 0:m.icon)||`ri-${d}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await he.collection(s.collectionId).listExternalAuths(s.id))}catch(d){he.errorResponseHandler(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||un(`Do you really want to unlink the ${r(d)} provider?`,()=>he.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{Vt(`Successfully unlinked the ${r(d)} provider.`),i("unlink",d),u()}).catch(m=>{he.errorResponseHandler(m)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class BM extends ye{constructor(e){super(),ve(this,e,zM,VM,be,{record:0})}}function Sp(n,e,t){const i=n.slice();return i[51]=e[t],i[52]=e,i[53]=t,i}function Tp(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[UM,({uniqueId:i})=>({54:i}),({uniqueId:i})=>[0,i?8388608:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&25165824&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function UM(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="id",l=D(),o=v("span"),a=D(),u=v("div"),f=v("i"),d=D(),m=v("input"),p(t,"class",V.getFieldTypeIcon("primary")),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[54]),p(f,"class","ri-calendar-event-line txt-disabled"),p(u,"class","form-field-addon"),p(m,"type","text"),p(m,"id",h=n[54]),m.value=g=n[2].id,m.readOnly=!0},m(k,T){S(k,e,T),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),S(k,a,T),S(k,u,T),b(u,f),S(k,d,T),S(k,m,T),_||(y=Pe(c=Ye.call(null,f,{text:`Created: ${n[2].created} Updated: ${n[2].updated}`,position:"left"})),_=!0)},p(k,T){T[1]&8388608&&r!==(r=k[54])&&p(e,"for",r),c&&zt(c.update)&&T[0]&4&&c.update.call(null,{text:`Created: ${k[2].created} Updated: ${k[2].updated}`,position:"left"}),T[1]&8388608&&h!==(h=k[54])&&p(m,"id",h),T[0]&4&&g!==(g=k[2].id)&&m.value!==g&&(m.value=g)},d(k){k&&w(e),k&&w(a),k&&w(u),k&&w(d),k&&w(m),_=!1,y()}}}function Cp(n){var u,f;let e,t,i,s,l;function o(c){n[29](c)}let r={collection:n[0]};n[2]!==void 0&&(r.record=n[2]),e=new P$({props:r}),ie.push(()=>ke(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&$p();return{c(){q(e.$$.fragment),i=D(),a&&a.c(),s=Ae()},m(c,d){j(e,c,d),S(c,i,d),a&&a.m(c,d),S(c,s,d),l=!0},p(c,d){var h,g;const m={};d[0]&1&&(m.collection=c[0]),!t&&d[0]&4&&(t=!0,m.record=c[2],we(()=>t=!1)),e.$set(m),(g=(h=c[0])==null?void 0:h.schema)!=null&&g.length?a||(a=$p(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){P(e.$$.fragment,c),l=!1},d(c){H(e,c),c&&w(i),a&&a.d(c),c&&w(s)}}}function $p(n){let e;return{c(){e=v("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function WM(n){let e,t,i;function s(o){n[42](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new aM({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function YM(n){let e,t,i,s,l;function o(f){n[39](f,n[51])}function r(f){n[40](f,n[51])}function a(f){n[41](f,n[51])}let u={field:n[51],record:n[2]};return n[2][n[51].name]!==void 0&&(u.value=n[2][n[51].name]),n[3][n[51].name]!==void 0&&(u.uploadedFiles=n[3][n[51].name]),n[4][n[51].name]!==void 0&&(u.deletedFileIndexes=n[4][n[51].name]),e=new j4({props:u}),ie.push(()=>ke(e,"value",o)),ie.push(()=>ke(e,"uploadedFiles",r)),ie.push(()=>ke(e,"deletedFileIndexes",a)),{c(){q(e.$$.fragment)},m(f,c){j(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[51]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[51].name],we(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[51].name],we(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[51].name],we(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){H(e,f)}}}function KM(n){let e,t,i;function s(o){n[38](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new m4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function JM(n){let e,t,i;function s(o){n[37](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new f4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function ZM(n){let e,t,i;function s(o){n[36](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new o4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function GM(n){let e,t,i;function s(o){n[35](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new kM({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function XM(n){let e,t,i;function s(o){n[34](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new n4({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function QM(n){let e,t,i;function s(o){n[33](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new Q$({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function xM(n){let e,t,i;function s(o){n[32](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new J$({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function e5(n){let e,t,i;function s(o){n[31](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new U$({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function t5(n){let e,t,i;function s(o){n[30](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new q$({props:l}),ie.push(()=>ke(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function Mp(n,e){let t,i,s,l,o;const r=[t5,e5,xM,QM,XM,GM,ZM,JM,KM,YM,WM],a=[];function u(f,c){return f[51].type==="text"?0:f[51].type==="number"?1:f[51].type==="bool"?2:f[51].type==="email"?3:f[51].type==="url"?4:f[51].type==="editor"?5:f[51].type==="date"?6:f[51].type==="select"?7:f[51].type==="json"?8:f[51].type==="file"?9:f[51].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Ae(),s&&s.c(),l=Ae(),this.first=t},m(f,c){S(f,t,c),~i&&a[i].m(f,c),S(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(pe(),P(a[d],1,1,()=>{a[d]=null}),me()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function Dp(n){let e,t,i;return t=new BM({props:{record:n[2]}}),{c(){e=v("div"),q(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[10]===yl)},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&4&&(o.record=s[2]),t.$set(o),(!i||l[0]&1024)&&Q(e,"active",s[10]===yl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function n5(n){var _,y;let e,t,i,s,l=[],o=new Map,r,a,u,f,c=!n[2].isNew&&Tp(n),d=((_=n[0])==null?void 0:_.isAuth)&&Cp(n),m=((y=n[0])==null?void 0:y.schema)||[];const h=k=>k[51].name;for(let k=0;k{c=null}),me()):c?(c.p(k,T),T[0]&4&&A(c,1)):(c=Tp(k),c.c(),A(c,1),c.m(t,i)),(C=k[0])!=null&&C.isAuth?d?(d.p(k,T),T[0]&1&&A(d,1)):(d=Cp(k),d.c(),A(d,1),d.m(t,s)):d&&(pe(),P(d,1,1,()=>{d=null}),me()),T[0]&29&&(m=((M=k[0])==null?void 0:M.schema)||[],pe(),l=wt(l,T,h,1,k,m,o,t,tn,Mp,null,Sp),me()),(!a||T[0]&1024)&&Q(t,"active",k[10]===Yi),k[0].isAuth&&!k[2].isNew?g?(g.p(k,T),T[0]&5&&A(g,1)):(g=Dp(k),g.c(),A(g,1),g.m(e,null)):g&&(pe(),P(g,1,1,()=>{g=null}),me())},i(k){if(!a){A(c),A(d);for(let T=0;T Send verification email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[23]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Ap(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` @@ -126,9 +126,9 @@ Updated: ${k[2].updated}`,position:"left"}),T[1]&8388608&&h!==(h=k[54])&&p(m,"id record-panel `+(l[12]?"overlay-panel-xl":"overlay-panel-lg")+` `+((a=l[0])!=null&&a.isAuth&&!l[2].isNew?"colored-header":"")+` - `),o[0]&544&&(r.beforeHide=l[43]),o[0]&3485|o[1]&16777216&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[44](null),H(e,l)}}}const Yi="form",yl="providers";function Pp(n){return JSON.stringify(n)}function r5(n,e,t){let i,s,l,o;const r=$t(),a="record_"+V.randomString(5);let{collection:u}=e,f,c=null,d=new Ki,m=!1,h=!1,g={},_={},y="",k=Yi;function T(de){return M(de),t(9,h=!0),t(10,k=Yi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(de){Vn({}),t(7,c=de||{}),de!=null&&de.clone?t(2,d=de.clone()):t(2,d=new Ki),t(3,g={}),t(4,_={}),await cn(),t(20,y=Pp(d))}function $(){if(m||!o||!(u!=null&&u.id))return;t(8,m=!0);const de=E();let $e;d.isNew?$e=he.collection(u.id).create(de):$e=he.collection(u.id).update(d.id,de),$e.then(Ze=>{Vt(d.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),C(),r("save",Ze)}).catch(Ze=>{he.errorResponseHandler(Ze)}).finally(()=>{t(8,m=!1)})}function O(){c!=null&&c.id&&un("Do you really want to delete the selected record?",()=>he.collection(c.collectionId).delete(c.id).then(()=>{C(),Vt("Successfully deleted record."),r("delete",c)}).catch(de=>{he.errorResponseHandler(de)}))}function E(){const de=(d==null?void 0:d.export())||{},$e=new FormData,Ze={};for(const nt of(u==null?void 0:u.schema)||[])Ze[nt.name]=!0;u!=null&&u.isAuth&&(Ze.username=!0,Ze.email=!0,Ze.emailVisibility=!0,Ze.password=!0,Ze.passwordConfirm=!0,Ze.verified=!0);for(const nt in de)Ze[nt]&&(typeof de[nt]>"u"&&(de[nt]=null),V.addValueToFormData($e,nt,de[nt]));for(const nt in g){const Mt=V.toArray(g[nt]);for(const ot of Mt)$e.append(nt,ot)}for(const nt in _){const Mt=V.toArray(_[nt]);for(const ot of Mt)$e.append(nt+"."+ot,"")}return $e}function I(){!(u!=null&&u.id)||!(c!=null&&c.email)||un(`Do you really want to sent verification email to ${c.email}?`,()=>he.collection(u.id).requestVerification(c.email).then(()=>{Vt(`Successfully sent verification email to ${c.email}.`)}).catch(de=>{he.errorResponseHandler(de)}))}function L(){!(u!=null&&u.id)||!(c!=null&&c.email)||un(`Do you really want to sent password reset email to ${c.email}?`,()=>he.collection(u.id).requestPasswordReset(c.email).then(()=>{Vt(`Successfully sent password reset email to ${c.email}.`)}).catch(de=>{he.errorResponseHandler(de)}))}function N(){l?un("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const de=c==null?void 0:c.clone();if(de){de.id="",de.created="",de.updated="";const $e=(u==null?void 0:u.schema)||[];for(const Ze of $e)Ze.type==="file"&&delete de[Ze.name]}T(de),await cn(),t(20,y="")}const W=()=>C(),Z=()=>I(),ne=()=>L(),J=()=>N(),te=()=>O(),ee=()=>t(10,k=Yi),z=()=>t(10,k=yl);function X(de){d=de,t(2,d)}function Y(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function le(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function He(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function Re(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function Fe(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function qe(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function ge(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function Se(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function Ue(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function lt(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}function ue(de,$e){n.$$.not_equal(g[$e.name],de)&&(g[$e.name]=de,t(3,g))}function fe(de,$e){n.$$.not_equal(_[$e.name],de)&&(_[$e.name]=de,t(4,_))}function ae(de,$e){n.$$.not_equal(d[$e.name],de)&&(d[$e.name]=de,t(2,d))}const oe=()=>l&&h?(un("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),C()}),!1):(Vn({}),!0);function je(de){ie[de?"unshift":"push"](()=>{f=de,t(6,f)})}function Me(de){We.call(this,n,de)}function Te(de){We.call(this,n,de)}return n.$$set=de=>{"collection"in de&&t(0,u=de.collection)},n.$$.update=()=>{var de;n.$$.dirty[0]&1&&t(12,i=!!((de=u==null?void 0:u.schema)!=null&&de.find($e=>$e.type==="editor"))),n.$$.dirty[0]&24&&t(21,s=V.hasNonEmptyProps(g)||V.hasNonEmptyProps(_)),n.$$.dirty[0]&3145732&&t(5,l=s||y!=Pp(d)),n.$$.dirty[0]&36&&t(11,o=d.isNew||l)},[u,C,d,g,_,l,f,c,m,h,k,o,i,a,$,O,I,L,N,T,y,s,W,Z,ne,J,te,ee,z,X,Y,le,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je,Me,Te]}class rb extends ye{constructor(e){super(),ve(this,e,r5,o5,be,{collection:0,show:19,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function a5(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[Pe(i=Ye.call(null,e,n[2]?"":"Copy")),K(e,"click",yn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&zt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:G,o:G,d(o){o&&w(e),s=!1,Le(l)}}}function u5(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(V.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return nn(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class ab extends ye{constructor(e){super(),ve(this,e,u5,a5,be,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function Lp(n,e,t){const i=n.slice();return i[12]=e[t],i[5]=t,i}function Np(n,e,t){const i=n.slice();return i[9]=e[t],i}function Fp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function Rp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function f5(n){const e=n.slice(),t=V.toArray(e[0][e[1].name]);e[6]=t;const i=V.toArray(e[0].expand[e[1].name]);return e[7]=i,e}function c5(n){let e,t=V.truncate(n[0][n[1].name])+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=V.truncate(n[0][n[1].name]))},m(l,o){S(l,e,o),b(e,i)},p(l,o){o&3&&t!==(t=V.truncate(l[0][l[1].name])+"")&&re(i,t),o&3&&s!==(s=V.truncate(l[0][l[1].name]))&&p(e,"title",s)},i:G,o:G,d(l){l&&w(e)}}}function d5(n){let e,t=[],i=new Map,s,l=V.toArray(n[0][n[1].name]);const o=r=>r[5]+r[12];for(let r=0;r20&&Vp();return{c(){e=v("div"),i.c(),s=D(),u&&u.c(),p(e,"class","inline-flex")},m(f,c){S(f,e,c),r[t].m(e,null),b(e,s),u&&u.m(e,null),l=!0},p(f,c){let d=t;t=a(f),t===d?r[t].p(f,c):(pe(),P(r[d],1,1,()=>{r[d]=null}),me(),i=r[t],i?i.p(f,c):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[6].length>20?u||(u=Vp(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){P(i),l=!1},d(f){f&&w(e),r[t].d(),u&&u.d()}}}function m5(n){let e,t=[],i=new Map,s=V.toArray(n[0][n[1].name]);const l=o=>o[5]+o[3];for(let o=0;or[5]+r[3];for(let r=0;r{a[m]=null}),me(),s=a[i],s?s.p(f(c,i),d):(s=a[i]=r[i](f(c,i)),s.c()),A(s,1),s.m(e,null)),(!o||d&2&&l!==(l="col-type-"+c[1].type+" col-field-"+c[1].name+" svelte-4cdww"))&&p(e,"class",l)},i(c){o||(A(s),o=!0)},o(c){P(s),o=!1},d(c){c&&w(e),a[i].d()}}}function C5(n,e,t){let{record:i}=e,{field:s}=e;function l(o){We.call(this,n,o)}return n.$$set=o=>{"record"in o&&t(0,i=o.record),"field"in o&&t(1,s=o.field)},[i,s,l]}class $5 extends ye{constructor(e){super(),ve(this,e,C5,T5,be,{record:0,field:1})}}function Bp(n,e,t){const i=n.slice();return i[53]=e[t],i}function Up(n,e,t){const i=n.slice();return i[56]=e[t],i}function Wp(n,e,t){const i=n.slice();return i[56]=e[t],i}function Yp(n,e,t){const i=n.slice();return i[49]=e[t],i}function M5(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=D(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[14],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){S(a,e,u),b(e,t),b(e,s),b(e,l),o||(r=K(t,"change",n[26]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&16384&&(t.checked=a[14])},d(a){a&&w(e),o=!1,r()}}}function D5(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Kp(n){let e,t,i;function s(o){n[27](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[O5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function O5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="id",p(t,"class",V.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function Jp(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Zp(n),r=i&&Gp(n);return{c(){o&&o.c(),t=D(),r&&r.c(),s=Ae()},m(a,u){o&&o.m(a,u),S(a,t,u),r&&r.m(a,u),S(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&A(o,1)):(o=Zp(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(pe(),P(o,1,1,()=>{o=null}),me()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&A(r,1)):(r=Gp(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(pe(),P(r,1,1,()=>{r=null}),me())},i(a){l||(A(o),A(r),l=!0)},o(a){P(o),P(r),l=!1},d(a){o&&o.d(a),a&&w(t),r&&r.d(a),a&&w(s)}}}function Zp(n){let e,t,i;function s(o){n[28](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[E5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function E5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="username",p(t,"class",V.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function Gp(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[A5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function A5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="email",p(t,"class",V.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function I5(n){let e,t,i,s,l,o=n[56].name+"",r;return{c(){e=v("div"),t=v("i"),s=D(),l=v("span"),r=B(o),p(t,"class",i=V.getFieldTypeIcon(n[56].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){S(a,e,u),b(e,t),b(e,s),b(e,l),b(l,r)},p(a,u){u[0]&65536&&i!==(i=V.getFieldTypeIcon(a[56].type))&&p(t,"class",i),u[0]&65536&&o!==(o=a[56].name+"")&&re(r,o)},d(a){a&&w(e)}}}function Xp(n,e){let t,i,s,l;function o(a){e[30](a)}let r={class:"col-type-"+e[56].type+" col-field-"+e[56].name,name:e[56].name,$$slots:{default:[I5]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new Ut({props:r}),ie.push(()=>ke(i,"sort",o)),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&65536&&(f.class="col-type-"+e[56].type+" col-field-"+e[56].name),u[0]&65536&&(f.name=e[56].name),u[0]&65536|u[1]&1073741824&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],we(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(t),H(i,a)}}}function Qp(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[P5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function P5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",V.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function xp(n){let e,t,i;function s(o){n[32](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[L5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function L5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="updated",p(t,"class",V.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function em(n){let e;function t(l,o){return l[10]?F5:N5}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function N5(n){let e,t,i,s,l;function o(u,f){var c;return(c=u[1])!=null&&c.length?j5:R5}let r=o(n),a=r(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=D(),a.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(u,f){S(u,e,f),b(e,t),b(t,i),b(t,s),a.m(t,null),b(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&w(e),a.d()}}}function F5(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `),o[0]&544&&(r.beforeHide=l[43]),o[0]&3485|o[1]&16777216&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[44](null),H(e,l)}}}const Yi="form",yl="providers";function Pp(n){return JSON.stringify(n)}function r5(n,e,t){let i,s,l,o;const r=$t(),a="record_"+V.randomString(5);let{collection:u}=e,f,c=null,d=new Ki,m=!1,h=!1,g={},_={},y="",k=Yi;function T(ce){return M(ce),t(9,h=!0),t(10,k=Yi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(ce){Vn({}),t(7,c=ce||{}),ce!=null&&ce.clone?t(2,d=ce.clone()):t(2,d=new Ki),t(3,g={}),t(4,_={}),await cn(),t(20,y=Pp(d))}function $(){if(m||!o||!(u!=null&&u.id))return;t(8,m=!0);const ce=E();let $e;d.isNew?$e=he.collection(u.id).create(ce):$e=he.collection(u.id).update(d.id,ce),$e.then(Ze=>{Vt(d.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),C(),r("save",Ze)}).catch(Ze=>{he.errorResponseHandler(Ze)}).finally(()=>{t(8,m=!1)})}function O(){c!=null&&c.id&&un("Do you really want to delete the selected record?",()=>he.collection(c.collectionId).delete(c.id).then(()=>{C(),Vt("Successfully deleted record."),r("delete",c)}).catch(ce=>{he.errorResponseHandler(ce)}))}function E(){const ce=(d==null?void 0:d.export())||{},$e=new FormData,Ze={};for(const nt of(u==null?void 0:u.schema)||[])Ze[nt.name]=!0;u!=null&&u.isAuth&&(Ze.username=!0,Ze.email=!0,Ze.emailVisibility=!0,Ze.password=!0,Ze.passwordConfirm=!0,Ze.verified=!0);for(const nt in ce)Ze[nt]&&(typeof ce[nt]>"u"&&(ce[nt]=null),V.addValueToFormData($e,nt,ce[nt]));for(const nt in g){const Mt=V.toArray(g[nt]);for(const ot of Mt)$e.append(nt,ot)}for(const nt in _){const Mt=V.toArray(_[nt]);for(const ot of Mt)$e.append(nt+"."+ot,"")}return $e}function I(){!(u!=null&&u.id)||!(c!=null&&c.email)||un(`Do you really want to sent verification email to ${c.email}?`,()=>he.collection(u.id).requestVerification(c.email).then(()=>{Vt(`Successfully sent verification email to ${c.email}.`)}).catch(ce=>{he.errorResponseHandler(ce)}))}function L(){!(u!=null&&u.id)||!(c!=null&&c.email)||un(`Do you really want to sent password reset email to ${c.email}?`,()=>he.collection(u.id).requestPasswordReset(c.email).then(()=>{Vt(`Successfully sent password reset email to ${c.email}.`)}).catch(ce=>{he.errorResponseHandler(ce)}))}function N(){l?un("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const ce=c==null?void 0:c.clone();if(ce){ce.id="",ce.created="",ce.updated="";const $e=(u==null?void 0:u.schema)||[];for(const Ze of $e)Ze.type==="file"&&delete ce[Ze.name]}T(ce),await cn(),t(20,y="")}const W=()=>C(),Z=()=>I(),ne=()=>L(),J=()=>N(),te=()=>O(),ee=()=>t(10,k=Yi),z=()=>t(10,k=yl);function X(ce){d=ce,t(2,d)}function Y(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function le(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function He(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Re(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Fe(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function qe(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function ge(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Se(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Ue(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function lt(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function ue(ce,$e){n.$$.not_equal(g[$e.name],ce)&&(g[$e.name]=ce,t(3,g))}function fe(ce,$e){n.$$.not_equal(_[$e.name],ce)&&(_[$e.name]=ce,t(4,_))}function ae(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}const oe=()=>l&&h?(un("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),C()}),!1):(Vn({}),!0);function je(ce){ie[ce?"unshift":"push"](()=>{f=ce,t(6,f)})}function Me(ce){We.call(this,n,ce)}function Te(ce){We.call(this,n,ce)}return n.$$set=ce=>{"collection"in ce&&t(0,u=ce.collection)},n.$$.update=()=>{var ce;n.$$.dirty[0]&1&&t(12,i=!!((ce=u==null?void 0:u.schema)!=null&&ce.find($e=>$e.type==="editor"))),n.$$.dirty[0]&24&&t(21,s=V.hasNonEmptyProps(g)||V.hasNonEmptyProps(_)),n.$$.dirty[0]&3145732&&t(5,l=s||y!=Pp(d)),n.$$.dirty[0]&36&&t(11,o=d.isNew||l)},[u,C,d,g,_,l,f,c,m,h,k,o,i,a,$,O,I,L,N,T,y,s,W,Z,ne,J,te,ee,z,X,Y,le,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je,Me,Te]}class rb extends ye{constructor(e){super(),ve(this,e,r5,o5,be,{collection:0,show:19,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function a5(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[Pe(i=Ye.call(null,e,n[2]?"":"Copy")),K(e,"click",yn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&zt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:G,o:G,d(o){o&&w(e),s=!1,Le(l)}}}function u5(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(V.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return nn(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class ab extends ye{constructor(e){super(),ve(this,e,u5,a5,be,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function Lp(n,e,t){const i=n.slice();return i[12]=e[t],i[5]=t,i}function Np(n,e,t){const i=n.slice();return i[9]=e[t],i}function Fp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function Rp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function f5(n){const e=n.slice(),t=V.toArray(e[0][e[1].name]);e[6]=t;const i=V.toArray(e[0].expand[e[1].name]);return e[7]=i,e}function c5(n){let e,t=V.truncate(n[0][n[1].name])+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=V.truncate(n[0][n[1].name]))},m(l,o){S(l,e,o),b(e,i)},p(l,o){o&3&&t!==(t=V.truncate(l[0][l[1].name])+"")&&re(i,t),o&3&&s!==(s=V.truncate(l[0][l[1].name]))&&p(e,"title",s)},i:G,o:G,d(l){l&&w(e)}}}function d5(n){let e,t=[],i=new Map,s,l=V.toArray(n[0][n[1].name]);const o=r=>r[5]+r[12];for(let r=0;r20&&Vp();return{c(){e=v("div"),i.c(),s=D(),u&&u.c(),p(e,"class","inline-flex")},m(f,c){S(f,e,c),r[t].m(e,null),b(e,s),u&&u.m(e,null),l=!0},p(f,c){let d=t;t=a(f),t===d?r[t].p(f,c):(pe(),P(r[d],1,1,()=>{r[d]=null}),me(),i=r[t],i?i.p(f,c):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[6].length>20?u||(u=Vp(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){P(i),l=!1},d(f){f&&w(e),r[t].d(),u&&u.d()}}}function m5(n){let e,t=[],i=new Map,s=V.toArray(n[0][n[1].name]);const l=o=>o[5]+o[3];for(let o=0;or[5]+r[3];for(let r=0;r{a[m]=null}),me(),s=a[i],s?s.p(f(c,i),d):(s=a[i]=r[i](f(c,i)),s.c()),A(s,1),s.m(e,null)),(!o||d&2&&l!==(l="col-type-"+c[1].type+" col-field-"+c[1].name+" svelte-4cdww"))&&p(e,"class",l)},i(c){o||(A(s),o=!0)},o(c){P(s),o=!1},d(c){c&&w(e),a[i].d()}}}function C5(n,e,t){let{record:i}=e,{field:s}=e;function l(o){We.call(this,n,o)}return n.$$set=o=>{"record"in o&&t(0,i=o.record),"field"in o&&t(1,s=o.field)},[i,s,l]}class $5 extends ye{constructor(e){super(),ve(this,e,C5,T5,be,{record:0,field:1})}}function Bp(n,e,t){const i=n.slice();return i[53]=e[t],i}function Up(n,e,t){const i=n.slice();return i[56]=e[t],i}function Wp(n,e,t){const i=n.slice();return i[56]=e[t],i}function Yp(n,e,t){const i=n.slice();return i[49]=e[t],i}function M5(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=D(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[14],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){S(a,e,u),b(e,t),b(e,s),b(e,l),o||(r=K(t,"change",n[26]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&16384&&(t.checked=a[14])},d(a){a&&w(e),o=!1,r()}}}function D5(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Kp(n){let e,t,i;function s(o){n[27](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[O5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function O5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="id",p(t,"class",V.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function Jp(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Zp(n),r=i&&Gp(n);return{c(){o&&o.c(),t=D(),r&&r.c(),s=Ae()},m(a,u){o&&o.m(a,u),S(a,t,u),r&&r.m(a,u),S(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&A(o,1)):(o=Zp(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(pe(),P(o,1,1,()=>{o=null}),me()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&A(r,1)):(r=Gp(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(pe(),P(r,1,1,()=>{r=null}),me())},i(a){l||(A(o),A(r),l=!0)},o(a){P(o),P(r),l=!1},d(a){o&&o.d(a),a&&w(t),r&&r.d(a),a&&w(s)}}}function Zp(n){let e,t,i;function s(o){n[28](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[E5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function E5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="username",p(t,"class",V.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function Gp(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[A5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function A5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="email",p(t,"class",V.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function I5(n){let e,t,i,s,l,o=n[56].name+"",r;return{c(){e=v("div"),t=v("i"),s=D(),l=v("span"),r=B(o),p(t,"class",i=V.getFieldTypeIcon(n[56].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){S(a,e,u),b(e,t),b(e,s),b(e,l),b(l,r)},p(a,u){u[0]&65536&&i!==(i=V.getFieldTypeIcon(a[56].type))&&p(t,"class",i),u[0]&65536&&o!==(o=a[56].name+"")&&re(r,o)},d(a){a&&w(e)}}}function Xp(n,e){let t,i,s,l;function o(a){e[30](a)}let r={class:"col-type-"+e[56].type+" col-field-"+e[56].name,name:e[56].name,$$slots:{default:[I5]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new Ut({props:r}),ie.push(()=>ke(i,"sort",o)),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&65536&&(f.class="col-type-"+e[56].type+" col-field-"+e[56].name),u[0]&65536&&(f.name=e[56].name),u[0]&65536|u[1]&1073741824&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],we(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(t),H(i,a)}}}function Qp(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[P5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function P5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",V.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function xp(n){let e,t,i;function s(o){n[32](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[L5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ke(e,"sort",s)),{c(){q(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function L5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="updated",p(t,"class",V.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function em(n){let e;function t(l,o){return l[10]?F5:N5}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function N5(n){let e,t,i,s,l;function o(u,f){var c;return(c=u[1])!=null&&c.length?j5:R5}let r=o(n),a=r(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=D(),a.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(u,f){S(u,e,f),b(e,t),b(t,i),b(t,s),a.m(t,null),b(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&w(e),a.d()}}}function F5(n){let e;return{c(){e=v("tr"),e.innerHTML=` `},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function R5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - New record`,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[38]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function j5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[37]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function tm(n){let e,t,i,s,l,o,r=n[53].id+"",a,u,f;s=new ab({props:{value:n[53].id}});let c=n[2].isAuth&&nm(n);return{c(){e=v("td"),t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),a=B(r),u=D(),c&&c.c(),p(o,"class","txt"),p(i,"class","label"),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(d,m){S(d,e,m),b(e,t),b(t,i),j(s,i,null),b(i,l),b(i,o),b(o,a),b(t,u),c&&c.m(t,null),f=!0},p(d,m){const h={};m[0]&16&&(h.value=d[53].id),s.$set(h),(!f||m[0]&16)&&r!==(r=d[53].id+"")&&re(a,r),d[2].isAuth?c?c.p(d,m):(c=nm(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){f||(A(s.$$.fragment,d),f=!0)},o(d){P(s.$$.fragment,d),f=!1},d(d){d&&w(e),H(s),c&&c.d()}}}function nm(n){let e;function t(l,o){return l[53].verified?q5:H5}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function H5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function q5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function im(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&sm(n),o=i&&lm(n);return{c(){l&&l.c(),t=D(),o&&o.c(),s=Ae()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=sm(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=lm(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function sm(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!V.isEmpty(o[53].username)),t?z5:V5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function V5(n){let e,t=n[53].username+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].username)},m(l,o){S(l,e,o),b(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].username+"")&&re(i,t),o[0]&16&&s!==(s=l[53].username)&&p(e,"title",s)},d(l){l&&w(e)}}}function z5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function lm(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!V.isEmpty(o[53].email)),t?U5:B5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function B5(n){let e,t=n[53].email+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].email)},m(l,o){S(l,e,o),b(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].email+"")&&re(i,t),o[0]&16&&s!==(s=l[53].email)&&p(e,"title",s)},d(l){l&&w(e)}}}function U5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function om(n,e){let t,i,s;return i=new $5({props:{record:e[53],field:e[56]}}),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&16&&(r.record=e[53]),o[0]&65536&&(r.field=e[56]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function rm(n){let e,t,i;return t=new Zi({props:{date:n[53].created}}),{c(){e=v("td"),q(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function am(n){let e,t,i;return t=new Zi({props:{date:n[53].updated}}),{c(){e=v("td"),q(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function um(n,e){let t,i,s,l,o,r,a,u,f,c,d=!e[7].includes("@id"),m,h,g=[],_=new Map,y,k=!e[7].includes("@created"),T,C=!e[7].includes("@updated"),M,$,O,E,I,L;function N(){return e[34](e[53])}let F=d&&tm(e),W=e[2].isAuth&&im(e),Z=e[16];const ne=X=>X[56].name;for(let X=0;X',O=D(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[53].id),l.checked=r=e[6][e[53].id],p(u,"for",f="checkbox_"+e[53].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p($,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(X,Y){S(X,t,Y),b(t,i),b(i,s),b(s,l),b(s,a),b(s,u),b(t,c),F&&F.m(t,null),b(t,m),W&&W.m(t,null),b(t,h);for(let le=0;le{F=null}),me()),e[2].isAuth?W?W.p(e,Y):(W=im(e),W.c(),W.m(t,h)):W&&(W.d(1),W=null),Y[0]&65552&&(Z=e[16],pe(),g=wt(g,Y,ne,1,e,Z,_,t,tn,om,y,Up),me()),Y[0]&128&&(k=!e[7].includes("@created")),k?J?(J.p(e,Y),Y[0]&128&&A(J,1)):(J=rm(e),J.c(),A(J,1),J.m(t,T)):J&&(pe(),P(J,1,1,()=>{J=null}),me()),Y[0]&128&&(C=!e[7].includes("@updated")),C?te?(te.p(e,Y),Y[0]&128&&A(te,1)):(te=am(e),te.c(),A(te,1),te.m(t,M)):te&&(pe(),P(te,1,1,()=>{te=null}),me())},i(X){if(!E){A(F);for(let Y=0;Yz[56].name;for(let z=0;zz[53].id;for(let z=0;z',k=D(),T=v("tbody");for(let z=0;z{L=null}),me()),z[2].isAuth?N?(N.p(z,X),X[0]&4&&A(N,1)):(N=Jp(z),N.c(),A(N,1),N.m(i,a)):N&&(pe(),P(N,1,1,()=>{N=null}),me()),X[0]&65537&&(F=z[16],pe(),u=wt(u,X,W,1,z,F,f,i,tn,Xp,c,Wp),me()),X[0]&128&&(d=!z[7].includes("@created")),d?Z?(Z.p(z,X),X[0]&128&&A(Z,1)):(Z=Qp(z),Z.c(),A(Z,1),Z.m(i,m)):Z&&(pe(),P(Z,1,1,()=>{Z=null}),me()),X[0]&128&&(h=!z[7].includes("@updated")),h?ne?(ne.p(z,X),X[0]&128&&A(ne,1)):(ne=xp(z),ne.c(),A(ne,1),ne.m(i,g)):ne&&(pe(),P(ne,1,1,()=>{ne=null}),me()),X[0]&1246422&&(J=z[4],pe(),C=wt(C,X,te,1,z,J,M,T,tn,um,null,Bp),me(),!J.length&&ee?ee.p(z,X):J.length?ee&&(ee.d(1),ee=null):(ee=em(z),ee.c(),ee.m(T,null))),(!$||X[0]&1024)&&Q(e,"table-loading",z[10])},i(z){if(!$){A(L),A(N);for(let X=0;X({52:l}),({uniqueId:l})=>[0,l?2097152:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8320|o[1]&1075838976&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function K5(n){let e,t,i=[],s=new Map,l,o,r=n[13];const a=u=>u[49].id+u[49].name;for(let u=0;uReset',c=D(),d=v("div"),m=D(),h=v("button"),h.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),Q(f,"btn-disabled",n[11]),p(d,"class","flex-fill"),p(h,"type","button"),p(h,"class","btn btn-sm btn-transparent btn-danger"),Q(h,"btn-loading",n[11]),Q(h,"btn-disabled",n[11]),p(e,"class","bulkbar")},m(T,C){S(T,e,C),b(e,t),b(t,i),b(t,s),b(s,l),b(t,o),b(t,a),b(e,u),b(e,f),b(e,c),b(e,d),b(e,m),b(e,h),_=!0,y||(k=[K(f,"click",n[40]),K(h,"click",n[41])],y=!0)},p(T,C){(!_||C[0]&256)&&re(l,T[8]),(!_||C[0]&256)&&r!==(r=T[8]===1?"record":"records")&&re(a,r),(!_||C[0]&2048)&&Q(f,"btn-disabled",T[11]),(!_||C[0]&2048)&&Q(h,"btn-loading",T[11]),(!_||C[0]&2048)&&Q(h,"btn-disabled",T[11])},i(T){_||(T&&st(()=>{g||(g=Be(e,En,{duration:150,y:5},!0)),g.run(1)}),_=!0)},o(T){T&&(g||(g=Be(e,En,{duration:150,y:5},!1)),g.run(0)),_=!1},d(T){T&&w(e),T&&g&&g.end(),y=!1,Le(k)}}}function Z5(n){let e,t,i,s,l,o;e=new Oa({props:{class:"table-wrapper",$$slots:{before:[J5],default:[W5]},$$scope:{ctx:n}}});let r=n[4].length&&cm(n),a=n[4].length&&n[15]&&dm(n),u=n[8]&&pm(n);return{c(){q(e.$$.fragment),t=D(),r&&r.c(),i=D(),a&&a.c(),s=D(),u&&u.c(),l=Ae()},m(f,c){j(e,f,c),S(f,t,c),r&&r.m(f,c),S(f,i,c),a&&a.m(f,c),S(f,s,c),u&&u.m(f,c),S(f,l,c),o=!0},p(f,c){const d={};c[0]&95447|c[1]&1073741824&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=cm(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[15]?a?a.p(f,c):(a=dm(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&A(u,1)):(u=pm(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(pe(),P(u,1,1,()=>{u=null}),me())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){P(e.$$.fragment,f),P(u),o=!1},d(f){H(e,f),f&&w(t),r&&r.d(f),f&&w(i),a&&a.d(f),f&&w(s),u&&u.d(f),f&&w(l)}}}const G5=/^([\+\-])?(\w+)$/;function X5(n,e,t){let i,s,l,o,r,a;const u=$t();let{collection:f}=e,{sort:c=""}=e,{filter:d=""}=e,m=[],h=1,g=0,_={},y=!0,k=!1,T=0,C,M=[],$=[];function O(){f!=null&&f.id&&localStorage.setItem((f==null?void 0:f.id)+"@hiddenCollumns",JSON.stringify(M))}function E(){if(t(7,M=[]),!!(f!=null&&f.id))try{const Me=localStorage.getItem(f.id+"@hiddenCollumns");Me&&t(7,M=JSON.parse(Me)||[])}catch{}}async function I(){const Me=h;for(let Te=1;Te<=Me;Te++)(Te===1||o)&&await L(Te,!1)}async function L(Me=1,Te=!0){var nt,Mt;if(!(f!=null&&f.id))return;t(10,y=!0);let de=c;const $e=de.match(G5),Ze=$e?s.find(ot=>ot.name===$e[2]):null;if($e&&((Mt=(nt=Ze==null?void 0:Ze.options)==null?void 0:nt.displayFields)==null?void 0:Mt.length)>0){const ot=[];for(const xn of Ze.options.displayFields)ot.push(($e[1]||"")+$e[2]+"."+xn);de=ot.join(",")}return he.collection(f.id).getList(Me,30,{sort:de,filter:d,expand:s.map(ot=>ot.name).join(",")}).then(async ot=>{if(Me<=1&&N(),t(10,y=!1),t(9,h=ot.page),t(5,g=ot.totalItems),u("load",m.concat(ot.items)),Te){const xn=++T;for(;ot.items.length&&T==xn;)t(4,m=m.concat(ot.items.splice(0,15))),await V.yieldToMain()}else t(4,m=m.concat(ot.items))}).catch(ot=>{ot!=null&&ot.isAbort||(t(10,y=!1),console.warn(ot),N(),he.errorResponseHandler(ot,!1))})}function N(){t(4,m=[]),t(9,h=1),t(5,g=0),t(6,_={})}function F(){a?W():Z()}function W(){t(6,_={})}function Z(){for(const Me of m)t(6,_[Me.id]=Me,_);t(6,_)}function ne(Me){_[Me.id]?delete _[Me.id]:t(6,_[Me.id]=Me,_),t(6,_)}function J(){un(`Do you really want to delete the selected ${r===1?"record":"records"}?`,te)}async function te(){if(k||!r||!(f!=null&&f.id))return;let Me=[];for(const Te of Object.keys(_))Me.push(he.collection(f.id).delete(Te));return t(11,k=!0),Promise.all(Me).then(()=>{Vt(`Successfully deleted the selected ${r===1?"record":"records"}.`),W()}).catch(Te=>{he.errorResponseHandler(Te)}).finally(()=>(t(11,k=!1),I()))}function ee(Me){We.call(this,n,Me)}const z=(Me,Te)=>{Te.target.checked?V.removeByValue(M,Me.id):V.pushUnique(M,Me.id),t(7,M)},X=()=>F();function Y(Me){c=Me,t(0,c)}function le(Me){c=Me,t(0,c)}function He(Me){c=Me,t(0,c)}function Re(Me){c=Me,t(0,c)}function Fe(Me){c=Me,t(0,c)}function qe(Me){c=Me,t(0,c)}function ge(Me){ie[Me?"unshift":"push"](()=>{C=Me,t(12,C)})}const Se=Me=>ne(Me),Ue=Me=>u("select",Me),lt=(Me,Te)=>{Te.code==="Enter"&&(Te.preventDefault(),u("select",Me))},ue=()=>t(1,d=""),fe=()=>u("new"),ae=()=>L(h+1),oe=()=>W(),je=()=>J();return n.$$set=Me=>{"collection"in Me&&t(2,f=Me.collection),"sort"in Me&&t(0,c=Me.sort),"filter"in Me&&t(1,d=Me.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&t(23,i=(f==null?void 0:f.schema)||[]),n.$$.dirty[0]&8388608&&(s=i.filter(Me=>Me.type==="relation")),n.$$.dirty[0]&8388736&&t(16,l=i.filter(Me=>!M.includes(Me.id))),n.$$.dirty[0]&4&&f!=null&&f.id&&(E(),N()),n.$$.dirty[0]&7&&f!=null&&f.id&&c!==-1&&d!==-1&&L(1),n.$$.dirty[0]&48&&t(15,o=g>m.length),n.$$.dirty[0]&64&&t(8,r=Object.keys(_).length),n.$$.dirty[0]&272&&t(14,a=m.length&&r===m.length),n.$$.dirty[0]&128&&M!==-1&&O(),n.$$.dirty[0]&8388612&&t(13,$=[].concat(f.isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map(Me=>({id:Me.id,name:Me.name})),[{id:"@created",name:"created"},{id:"@updated",name:"updated"}]))},[c,d,f,L,m,g,_,M,r,h,y,k,C,$,a,o,l,u,F,W,ne,J,I,i,ee,z,X,Y,le,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je]}class Q5 extends ye{constructor(e){super(),ve(this,e,X5,Z5,be,{collection:2,sort:0,filter:1,reloadLoadedPages:22,load:3},null,[-1,-1])}get reloadLoadedPages(){return this.$$.ctx[22]}get load(){return this.$$.ctx[3]}}function x5(n){let e,t,i,s;return e=new g$({}),i=new kn({props:{$$slots:{default:[nD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&759|o[1]&2&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function eD(n){let e,t;return e=new kn({props:{center:!0,$$slots:{default:[lD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&528|s[1]&2&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function tD(n){let e,t;return e=new kn({props:{center:!0,$$slots:{default:[oD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[1]&2&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function mm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Edit collection"),p(e,"class","btn btn-transparent btn-circle")},m(s,l){S(s,e,l),t||(i=[Pe(Ye.call(null,e,{text:"Edit collection",position:"right"})),K(e,"click",n[14])],t=!0)},p:G,d(s){s&&w(e),t=!1,Le(i)}}}function nD(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$,O,E,I,L,N,F=!n[9]&&mm(n);c=new Da({}),c.$on("refresh",n[15]),k=new Uo({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[18]);function W(J){n[20](J)}function Z(J){n[21](J)}let ne={collection:n[2]};return n[0]!==void 0&&(ne.filter=n[0]),n[1]!==void 0&&(ne.sort=n[1]),$=new Q5({props:ne}),n[19]($),ie.push(()=>ke($,"filter",W)),ie.push(()=>ke($,"sort",Z)),$.$on("select",n[22]),$.$on("new",n[23]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=D(),l=v("div"),r=B(o),a=D(),u=v("div"),F&&F.c(),f=D(),q(c.$$.fragment),d=D(),m=v("div"),h=v("button"),h.innerHTML=` + New record`,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[38]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function j5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[37]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function tm(n){let e,t,i,s,l,o,r=n[53].id+"",a,u,f;s=new ab({props:{value:n[53].id}});let c=n[2].isAuth&&nm(n);return{c(){e=v("td"),t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),a=B(r),u=D(),c&&c.c(),p(o,"class","txt"),p(i,"class","label"),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(d,m){S(d,e,m),b(e,t),b(t,i),j(s,i,null),b(i,l),b(i,o),b(o,a),b(t,u),c&&c.m(t,null),f=!0},p(d,m){const h={};m[0]&16&&(h.value=d[53].id),s.$set(h),(!f||m[0]&16)&&r!==(r=d[53].id+"")&&re(a,r),d[2].isAuth?c?c.p(d,m):(c=nm(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){f||(A(s.$$.fragment,d),f=!0)},o(d){P(s.$$.fragment,d),f=!1},d(d){d&&w(e),H(s),c&&c.d()}}}function nm(n){let e;function t(l,o){return l[53].verified?q5:H5}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function H5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function q5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function im(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&sm(n),o=i&&lm(n);return{c(){l&&l.c(),t=D(),o&&o.c(),s=Ae()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=sm(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=lm(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function sm(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!V.isEmpty(o[53].username)),t?z5:V5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function V5(n){let e,t=n[53].username+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].username)},m(l,o){S(l,e,o),b(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].username+"")&&re(i,t),o[0]&16&&s!==(s=l[53].username)&&p(e,"title",s)},d(l){l&&w(e)}}}function z5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function lm(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!V.isEmpty(o[53].email)),t?U5:B5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function B5(n){let e,t=n[53].email+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].email)},m(l,o){S(l,e,o),b(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].email+"")&&re(i,t),o[0]&16&&s!==(s=l[53].email)&&p(e,"title",s)},d(l){l&&w(e)}}}function U5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function om(n,e){let t,i,s;return i=new $5({props:{record:e[53],field:e[56]}}),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&16&&(r.record=e[53]),o[0]&65536&&(r.field=e[56]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function rm(n){let e,t,i;return t=new Zi({props:{date:n[53].created}}),{c(){e=v("td"),q(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function am(n){let e,t,i;return t=new Zi({props:{date:n[53].updated}}),{c(){e=v("td"),q(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function um(n,e){let t,i,s,l,o,r,a,u,f,c,d=!e[7].includes("@id"),m,h,g=[],_=new Map,y,k=!e[7].includes("@created"),T,C=!e[7].includes("@updated"),M,$,O,E,I,L;function N(){return e[34](e[53])}let F=d&&tm(e),W=e[2].isAuth&&im(e),Z=e[16];const ne=X=>X[56].name;for(let X=0;X',O=D(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[53].id),l.checked=r=e[6][e[53].id],p(u,"for",f="checkbox_"+e[53].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p($,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(X,Y){S(X,t,Y),b(t,i),b(i,s),b(s,l),b(s,a),b(s,u),b(t,c),F&&F.m(t,null),b(t,m),W&&W.m(t,null),b(t,h);for(let le=0;le{F=null}),me()),e[2].isAuth?W?W.p(e,Y):(W=im(e),W.c(),W.m(t,h)):W&&(W.d(1),W=null),Y[0]&65552&&(Z=e[16],pe(),g=wt(g,Y,ne,1,e,Z,_,t,tn,om,y,Up),me()),Y[0]&128&&(k=!e[7].includes("@created")),k?J?(J.p(e,Y),Y[0]&128&&A(J,1)):(J=rm(e),J.c(),A(J,1),J.m(t,T)):J&&(pe(),P(J,1,1,()=>{J=null}),me()),Y[0]&128&&(C=!e[7].includes("@updated")),C?te?(te.p(e,Y),Y[0]&128&&A(te,1)):(te=am(e),te.c(),A(te,1),te.m(t,M)):te&&(pe(),P(te,1,1,()=>{te=null}),me())},i(X){if(!E){A(F);for(let Y=0;Yz[56].name;for(let z=0;zz[53].id;for(let z=0;z',k=D(),T=v("tbody");for(let z=0;z{L=null}),me()),z[2].isAuth?N?(N.p(z,X),X[0]&4&&A(N,1)):(N=Jp(z),N.c(),A(N,1),N.m(i,a)):N&&(pe(),P(N,1,1,()=>{N=null}),me()),X[0]&65537&&(F=z[16],pe(),u=wt(u,X,W,1,z,F,f,i,tn,Xp,c,Wp),me()),X[0]&128&&(d=!z[7].includes("@created")),d?Z?(Z.p(z,X),X[0]&128&&A(Z,1)):(Z=Qp(z),Z.c(),A(Z,1),Z.m(i,m)):Z&&(pe(),P(Z,1,1,()=>{Z=null}),me()),X[0]&128&&(h=!z[7].includes("@updated")),h?ne?(ne.p(z,X),X[0]&128&&A(ne,1)):(ne=xp(z),ne.c(),A(ne,1),ne.m(i,g)):ne&&(pe(),P(ne,1,1,()=>{ne=null}),me()),X[0]&1246422&&(J=z[4],pe(),C=wt(C,X,te,1,z,J,M,T,tn,um,null,Bp),me(),!J.length&&ee?ee.p(z,X):J.length?ee&&(ee.d(1),ee=null):(ee=em(z),ee.c(),ee.m(T,null))),(!$||X[0]&1024)&&Q(e,"table-loading",z[10])},i(z){if(!$){A(L),A(N);for(let X=0;X({52:l}),({uniqueId:l})=>[0,l?2097152:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8320|o[1]&1075838976&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function K5(n){let e,t,i=[],s=new Map,l,o,r=n[13];const a=u=>u[49].id+u[49].name;for(let u=0;uReset',c=D(),d=v("div"),m=D(),h=v("button"),h.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),Q(f,"btn-disabled",n[11]),p(d,"class","flex-fill"),p(h,"type","button"),p(h,"class","btn btn-sm btn-transparent btn-danger"),Q(h,"btn-loading",n[11]),Q(h,"btn-disabled",n[11]),p(e,"class","bulkbar")},m(T,C){S(T,e,C),b(e,t),b(t,i),b(t,s),b(s,l),b(t,o),b(t,a),b(e,u),b(e,f),b(e,c),b(e,d),b(e,m),b(e,h),_=!0,y||(k=[K(f,"click",n[40]),K(h,"click",n[41])],y=!0)},p(T,C){(!_||C[0]&256)&&re(l,T[8]),(!_||C[0]&256)&&r!==(r=T[8]===1?"record":"records")&&re(a,r),(!_||C[0]&2048)&&Q(f,"btn-disabled",T[11]),(!_||C[0]&2048)&&Q(h,"btn-loading",T[11]),(!_||C[0]&2048)&&Q(h,"btn-disabled",T[11])},i(T){_||(T&&st(()=>{g||(g=Be(e,En,{duration:150,y:5},!0)),g.run(1)}),_=!0)},o(T){T&&(g||(g=Be(e,En,{duration:150,y:5},!1)),g.run(0)),_=!1},d(T){T&&w(e),T&&g&&g.end(),y=!1,Le(k)}}}function Z5(n){let e,t,i,s,l,o;e=new Oa({props:{class:"table-wrapper",$$slots:{before:[J5],default:[W5]},$$scope:{ctx:n}}});let r=n[4].length&&cm(n),a=n[4].length&&n[15]&&dm(n),u=n[8]&&pm(n);return{c(){q(e.$$.fragment),t=D(),r&&r.c(),i=D(),a&&a.c(),s=D(),u&&u.c(),l=Ae()},m(f,c){j(e,f,c),S(f,t,c),r&&r.m(f,c),S(f,i,c),a&&a.m(f,c),S(f,s,c),u&&u.m(f,c),S(f,l,c),o=!0},p(f,c){const d={};c[0]&95447|c[1]&1073741824&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=cm(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[15]?a?a.p(f,c):(a=dm(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&A(u,1)):(u=pm(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(pe(),P(u,1,1,()=>{u=null}),me())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){P(e.$$.fragment,f),P(u),o=!1},d(f){H(e,f),f&&w(t),r&&r.d(f),f&&w(i),a&&a.d(f),f&&w(s),u&&u.d(f),f&&w(l)}}}const G5=/^([\+\-])?(\w+)$/;function X5(n,e,t){let i,s,l,o,r,a;const u=$t();let{collection:f}=e,{sort:c=""}=e,{filter:d=""}=e,m=[],h=1,g=0,_={},y=!0,k=!1,T=0,C,M=[],$=[];function O(){f!=null&&f.id&&localStorage.setItem((f==null?void 0:f.id)+"@hiddenCollumns",JSON.stringify(M))}function E(){if(t(7,M=[]),!!(f!=null&&f.id))try{const Me=localStorage.getItem(f.id+"@hiddenCollumns");Me&&t(7,M=JSON.parse(Me)||[])}catch{}}async function I(){const Me=h;for(let Te=1;Te<=Me;Te++)(Te===1||o)&&await L(Te,!1)}async function L(Me=1,Te=!0){var nt,Mt;if(!(f!=null&&f.id))return;t(10,y=!0);let ce=c;const $e=ce.match(G5),Ze=$e?s.find(ot=>ot.name===$e[2]):null;if($e&&((Mt=(nt=Ze==null?void 0:Ze.options)==null?void 0:nt.displayFields)==null?void 0:Mt.length)>0){const ot=[];for(const xn of Ze.options.displayFields)ot.push(($e[1]||"")+$e[2]+"."+xn);ce=ot.join(",")}return he.collection(f.id).getList(Me,30,{sort:ce,filter:d,expand:s.map(ot=>ot.name).join(",")}).then(async ot=>{if(Me<=1&&N(),t(10,y=!1),t(9,h=ot.page),t(5,g=ot.totalItems),u("load",m.concat(ot.items)),Te){const xn=++T;for(;ot.items.length&&T==xn;)t(4,m=m.concat(ot.items.splice(0,15))),await V.yieldToMain()}else t(4,m=m.concat(ot.items))}).catch(ot=>{ot!=null&&ot.isAbort||(t(10,y=!1),console.warn(ot),N(),he.errorResponseHandler(ot,!1))})}function N(){t(4,m=[]),t(9,h=1),t(5,g=0),t(6,_={})}function F(){a?W():Z()}function W(){t(6,_={})}function Z(){for(const Me of m)t(6,_[Me.id]=Me,_);t(6,_)}function ne(Me){_[Me.id]?delete _[Me.id]:t(6,_[Me.id]=Me,_),t(6,_)}function J(){un(`Do you really want to delete the selected ${r===1?"record":"records"}?`,te)}async function te(){if(k||!r||!(f!=null&&f.id))return;let Me=[];for(const Te of Object.keys(_))Me.push(he.collection(f.id).delete(Te));return t(11,k=!0),Promise.all(Me).then(()=>{Vt(`Successfully deleted the selected ${r===1?"record":"records"}.`),W()}).catch(Te=>{he.errorResponseHandler(Te)}).finally(()=>(t(11,k=!1),I()))}function ee(Me){We.call(this,n,Me)}const z=(Me,Te)=>{Te.target.checked?V.removeByValue(M,Me.id):V.pushUnique(M,Me.id),t(7,M)},X=()=>F();function Y(Me){c=Me,t(0,c)}function le(Me){c=Me,t(0,c)}function He(Me){c=Me,t(0,c)}function Re(Me){c=Me,t(0,c)}function Fe(Me){c=Me,t(0,c)}function qe(Me){c=Me,t(0,c)}function ge(Me){ie[Me?"unshift":"push"](()=>{C=Me,t(12,C)})}const Se=Me=>ne(Me),Ue=Me=>u("select",Me),lt=(Me,Te)=>{Te.code==="Enter"&&(Te.preventDefault(),u("select",Me))},ue=()=>t(1,d=""),fe=()=>u("new"),ae=()=>L(h+1),oe=()=>W(),je=()=>J();return n.$$set=Me=>{"collection"in Me&&t(2,f=Me.collection),"sort"in Me&&t(0,c=Me.sort),"filter"in Me&&t(1,d=Me.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&t(23,i=(f==null?void 0:f.schema)||[]),n.$$.dirty[0]&8388608&&(s=i.filter(Me=>Me.type==="relation")),n.$$.dirty[0]&8388736&&t(16,l=i.filter(Me=>!M.includes(Me.id))),n.$$.dirty[0]&4&&f!=null&&f.id&&(E(),N()),n.$$.dirty[0]&7&&f!=null&&f.id&&c!==-1&&d!==-1&&L(1),n.$$.dirty[0]&48&&t(15,o=g>m.length),n.$$.dirty[0]&64&&t(8,r=Object.keys(_).length),n.$$.dirty[0]&272&&t(14,a=m.length&&r===m.length),n.$$.dirty[0]&128&&M!==-1&&O(),n.$$.dirty[0]&8388612&&t(13,$=[].concat(f.isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map(Me=>({id:Me.id,name:Me.name})),[{id:"@created",name:"created"},{id:"@updated",name:"updated"}]))},[c,d,f,L,m,g,_,M,r,h,y,k,C,$,a,o,l,u,F,W,ne,J,I,i,ee,z,X,Y,le,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je]}class Q5 extends ye{constructor(e){super(),ve(this,e,X5,Z5,be,{collection:2,sort:0,filter:1,reloadLoadedPages:22,load:3},null,[-1,-1])}get reloadLoadedPages(){return this.$$.ctx[22]}get load(){return this.$$.ctx[3]}}function x5(n){let e,t,i,s;return e=new g$({}),i=new kn({props:{$$slots:{default:[nD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&759|o[1]&2&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function eD(n){let e,t;return e=new kn({props:{center:!0,$$slots:{default:[lD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&528|s[1]&2&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function tD(n){let e,t;return e=new kn({props:{center:!0,$$slots:{default:[oD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[1]&2&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function mm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Edit collection"),p(e,"class","btn btn-transparent btn-circle")},m(s,l){S(s,e,l),t||(i=[Pe(Ye.call(null,e,{text:"Edit collection",position:"right"})),K(e,"click",n[14])],t=!0)},p:G,d(s){s&&w(e),t=!1,Le(i)}}}function nD(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$,O,E,I,L,N,F=!n[9]&&mm(n);c=new Da({}),c.$on("refresh",n[15]),k=new Uo({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[18]);function W(J){n[20](J)}function Z(J){n[21](J)}let ne={collection:n[2]};return n[0]!==void 0&&(ne.filter=n[0]),n[1]!==void 0&&(ne.sort=n[1]),$=new Q5({props:ne}),n[19]($),ie.push(()=>ke($,"filter",W)),ie.push(()=>ke($,"sort",Z)),$.$on("select",n[22]),$.$on("new",n[23]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=D(),l=v("div"),r=B(o),a=D(),u=v("div"),F&&F.c(),f=D(),q(c.$$.fragment),d=D(),m=v("div"),h=v("button"),h.innerHTML=` API Preview`,g=D(),_=v("button"),_.innerHTML=` New record`,y=D(),q(k.$$.fragment),T=D(),C=v("div"),M=D(),q($.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(h,"type","button"),p(h,"class","btn btn-outline"),p(_,"type","button"),p(_,"class","btn btn-expanded"),p(m,"class","btns-group"),p(e,"class","page-header"),p(C,"class","clearfix m-b-base")},m(J,te){S(J,e,te),b(e,t),b(t,i),b(t,s),b(t,l),b(l,r),b(e,a),b(e,u),F&&F.m(u,null),b(u,f),j(c,u,null),b(e,d),b(e,m),b(m,h),b(m,g),b(m,_),S(J,y,te),j(k,J,te),S(J,T,te),S(J,C,te),S(J,M,te),j($,J,te),I=!0,L||(N=[K(h,"click",n[16]),K(_,"click",n[17])],L=!0)},p(J,te){(!I||te[0]&4)&&o!==(o=J[2].name+"")&&re(r,o),J[9]?F&&(F.d(1),F=null):F?F.p(J,te):(F=mm(J),F.c(),F.m(u,f));const ee={};te[0]&1&&(ee.value=J[0]),te[0]&4&&(ee.autocompleteCollection=J[2]),k.$set(ee);const z={};te[0]&4&&(z.collection=J[2]),!O&&te[0]&1&&(O=!0,z.filter=J[0],we(()=>O=!1)),!E&&te[0]&2&&(E=!0,z.sort=J[1],we(()=>E=!1)),$.$set(z)},i(J){I||(A(c.$$.fragment,J),A(k.$$.fragment,J),A($.$$.fragment,J),I=!0)},o(J){P(c.$$.fragment,J),P(k.$$.fragment,J),P($.$$.fragment,J),I=!1},d(J){J&&w(e),F&&F.d(),H(c),J&&w(y),H(k,J),J&&w(T),J&&w(C),J&&w(M),n[19](null),H($,J),L=!1,Le(N)}}}function iD(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=D(),i=v("button"),i.innerHTML=` Create new collection`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[13]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function sD(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function lD(n){let e,t,i;function s(r,a){return r[9]?sD:iD}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=D(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),b(e,t),b(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function oD(n){let e;return{c(){e=v("div"),e.innerHTML=` @@ -142,22 +142,22 @@ Updated: ${k[2].updated}`,position:"left"}),T[1]&8388608&&h!==(h=k[54])&&p(m,"id Token options`,$=D(),O=v("a"),O.innerHTML=` Admins`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(m,"href","/settings/export-collections"),p(m,"class","sidebar-list-item"),p(g,"href","/settings/import-collections"),p(g,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"class","sidebar-list-item"),p(M,"href","/settings/tokens"),p(M,"class","sidebar-list-item"),p(O,"href","/settings/admins"),p(O,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(L,N){S(L,e,N),b(e,t),b(t,i),b(t,s),b(t,l),b(t,o),b(t,r),b(t,a),b(t,u),b(t,f),b(t,c),b(t,d),b(t,m),b(t,h),b(t,g),b(t,_),b(t,y),b(t,k),b(t,T),b(t,C),b(t,M),b(t,$),b(t,O),E||(I=[Pe(Fn.call(null,l,{path:"/settings"})),Pe(Xt.call(null,l)),Pe(Fn.call(null,r,{path:"/settings/mail/?.*"})),Pe(Xt.call(null,r)),Pe(Fn.call(null,u,{path:"/settings/storage/?.*"})),Pe(Xt.call(null,u)),Pe(Fn.call(null,m,{path:"/settings/export-collections/?.*"})),Pe(Xt.call(null,m)),Pe(Fn.call(null,g,{path:"/settings/import-collections/?.*"})),Pe(Xt.call(null,g)),Pe(Fn.call(null,T,{path:"/settings/auth-providers/?.*"})),Pe(Xt.call(null,T)),Pe(Fn.call(null,M,{path:"/settings/tokens/?.*"})),Pe(Xt.call(null,M)),Pe(Fn.call(null,O,{path:"/settings/admins/?.*"})),Pe(Xt.call(null,O))],E=!0)},p:G,i:G,o:G,d(L){L&&w(e),E=!1,Le(I)}}}class Di extends ye{constructor(e){super(),ve(this,e,null,fD,be,{})}}function hm(n,e,t){const i=n.slice();return i[30]=e[t],i}function gm(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[cD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function cD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="ID",o=D(),r=v("div"),a=v("i"),f=D(),c=v("input"),p(t,"class",V.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[29]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[29]),c.value=m=n[1].id,c.disabled=!0},m(_,y){S(_,e,y),b(e,t),b(e,i),b(e,s),S(_,o,y),S(_,r,y),b(r,a),S(_,f,y),S(_,c,y),h||(g=Pe(u=Ye.call(null,a,{text:`Created: ${n[1].created} Updated: ${n[1].updated}`,position:"left"})),h=!0)},p(_,y){y[0]&536870912&&l!==(l=_[29])&&p(e,"for",l),u&&zt(u.update)&&y[0]&2&&u.update.call(null,{text:`Created: ${_[1].created} -Updated: ${_[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=_[29])&&p(c,"id",d),y[0]&2&&m!==(m=_[1].id)&&c.value!==m&&(c.value=m)},d(_){_&&w(e),_&&w(o),_&&w(r),_&&w(f),_&&w(c),h=!1,g()}}}function _m(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=D(),Hn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),b(e,t),b(e,s),o||(r=K(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function dD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Email",o=D(),r=v("input"),p(t,"class",V.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),ce(r,n[3]),u||(f=K(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&ce(r,c[3])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function bm(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[pD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function vm(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[mD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[hD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),q(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){S(f,e,c),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&536871424|c[1]&4&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&st(()=>{a||(a=Be(t,Ht,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=Be(t,Ht,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function mD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),ce(r,n[8]),u||(f=K(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&ce(r,c[8])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function hD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password confirm",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),ce(r,n[9]),u||(f=K(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&ce(r,c[9])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function gD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[1].isNew&&gm(n),g=[0,1,2,3,4,5,6,7,8,9],_=[];for(let T=0;T<10;T+=1)_[T]=_m(hm(n,g,T));a=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[dD,({uniqueId:T})=>({29:T}),({uniqueId:T})=>[T?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].isNew&&bm(n),k=(n[1].isNew||n[4])&&vm(n);return{c(){e=v("form"),h&&h.c(),t=D(),i=v("div"),s=v("p"),s.textContent="Avatar",l=D(),o=v("div");for(let T=0;T<10;T+=1)_[T].c();r=D(),q(a.$$.fragment),u=D(),y&&y.c(),f=D(),k&&k.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(T,C){S(T,e,C),h&&h.m(e,null),b(e,t),b(e,i),b(i,s),b(i,l),b(i,o);for(let M=0;M<10;M+=1)_[M].m(o,null);b(e,r),j(a,e,null),b(e,u),y&&y.m(e,null),b(e,f),k&&k.m(e,null),c=!0,d||(m=K(e,"submit",pt(n[12])),d=!0)},p(T,C){if(T[1].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),me()):h?(h.p(T,C),C[0]&2&&A(h,1)):(h=gm(T),h.c(),A(h,1),h.m(e,t)),C[0]&4){g=[0,1,2,3,4,5,6,7,8,9];let $;for($=0;$<10;$+=1){const O=hm(T,g,$);_[$]?_[$].p(O,C):(_[$]=_m(O),_[$].c(),_[$].m(o,null))}for(;$<10;$+=1)_[$].d(1)}const M={};C[0]&536870920|C[1]&4&&(M.$$scope={dirty:C,ctx:T}),a.$set(M),T[1].isNew?y&&(pe(),P(y,1,1,()=>{y=null}),me()):y?(y.p(T,C),C[0]&2&&A(y,1)):(y=bm(T),y.c(),A(y,1),y.m(e,f)),T[1].isNew||T[4]?k?(k.p(T,C),C[0]&18&&A(k,1)):(k=vm(T),k.c(),A(k,1),k.m(e,null)):k&&(pe(),P(k,1,1,()=>{k=null}),me())},i(T){c||(A(h),A(a.$$.fragment,T),A(y),A(k),c=!0)},o(T){P(h),P(a.$$.fragment,T),P(y),P(k),c=!1},d(T){T&&w(e),h&&h.d(),bt(_,T),H(a),y&&y.d(),k&&k.d(),d=!1,m()}}}function _D(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=B(t)},m(s,l){S(s,e,l),b(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&re(i,t)},d(s){s&&w(e)}}}function ym(n){let e,t,i,s,l,o,r,a,u;return o=new Qn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[bD]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=D(),s=v("i"),l=D(),q(o.$$.fragment),r=D(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"aria-label","More"),p(e,"class","btn btn-sm btn-circle btn-transparent"),p(a,"class","flex-fill")},m(f,c){S(f,e,c),b(e,t),b(e,i),b(e,s),b(e,l),j(o,e,null),S(f,r,c),S(f,a,c),u=!0},p(f,c){const d={};c[1]&4&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){P(o.$$.fragment,f),u=!1},d(f){f&&w(e),H(o),f&&w(r),f&&w(a)}}}function bD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` +Updated: ${_[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=_[29])&&p(c,"id",d),y[0]&2&&m!==(m=_[1].id)&&c.value!==m&&(c.value=m)},d(_){_&&w(e),_&&w(o),_&&w(r),_&&w(f),_&&w(c),h=!1,g()}}}function _m(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=D(),Hn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),b(e,t),b(e,s),o||(r=K(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function dD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Email",o=D(),r=v("input"),p(t,"class",V.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),de(r,n[3]),u||(f=K(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&de(r,c[3])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function bm(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[pD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function vm(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[mD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[hD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),q(s.$$.fragment),l=D(),o=v("div"),q(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){S(f,e,c),b(e,t),b(t,i),j(s,i,null),b(t,l),b(t,o),j(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&536871424|c[1]&4&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&st(()=>{a||(a=Be(t,Ht,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=Be(t,Ht,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function mD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),de(r,n[8]),u||(f=K(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&de(r,c[8])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function hD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password confirm",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),S(c,o,d),S(c,r,d),de(r,n[9]),u||(f=K(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&de(r,c[9])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function gD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[1].isNew&&gm(n),g=[0,1,2,3,4,5,6,7,8,9],_=[];for(let T=0;T<10;T+=1)_[T]=_m(hm(n,g,T));a=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[dD,({uniqueId:T})=>({29:T}),({uniqueId:T})=>[T?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].isNew&&bm(n),k=(n[1].isNew||n[4])&&vm(n);return{c(){e=v("form"),h&&h.c(),t=D(),i=v("div"),s=v("p"),s.textContent="Avatar",l=D(),o=v("div");for(let T=0;T<10;T+=1)_[T].c();r=D(),q(a.$$.fragment),u=D(),y&&y.c(),f=D(),k&&k.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(T,C){S(T,e,C),h&&h.m(e,null),b(e,t),b(e,i),b(i,s),b(i,l),b(i,o);for(let M=0;M<10;M+=1)_[M].m(o,null);b(e,r),j(a,e,null),b(e,u),y&&y.m(e,null),b(e,f),k&&k.m(e,null),c=!0,d||(m=K(e,"submit",pt(n[12])),d=!0)},p(T,C){if(T[1].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),me()):h?(h.p(T,C),C[0]&2&&A(h,1)):(h=gm(T),h.c(),A(h,1),h.m(e,t)),C[0]&4){g=[0,1,2,3,4,5,6,7,8,9];let $;for($=0;$<10;$+=1){const O=hm(T,g,$);_[$]?_[$].p(O,C):(_[$]=_m(O),_[$].c(),_[$].m(o,null))}for(;$<10;$+=1)_[$].d(1)}const M={};C[0]&536870920|C[1]&4&&(M.$$scope={dirty:C,ctx:T}),a.$set(M),T[1].isNew?y&&(pe(),P(y,1,1,()=>{y=null}),me()):y?(y.p(T,C),C[0]&2&&A(y,1)):(y=bm(T),y.c(),A(y,1),y.m(e,f)),T[1].isNew||T[4]?k?(k.p(T,C),C[0]&18&&A(k,1)):(k=vm(T),k.c(),A(k,1),k.m(e,null)):k&&(pe(),P(k,1,1,()=>{k=null}),me())},i(T){c||(A(h),A(a.$$.fragment,T),A(y),A(k),c=!0)},o(T){P(h),P(a.$$.fragment,T),P(y),P(k),c=!1},d(T){T&&w(e),h&&h.d(),bt(_,T),H(a),y&&y.d(),k&&k.d(),d=!1,m()}}}function _D(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=B(t)},m(s,l){S(s,e,l),b(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&re(i,t)},d(s){s&&w(e)}}}function ym(n){let e,t,i,s,l,o,r,a,u;return o=new Qn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[bD]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=D(),s=v("i"),l=D(),q(o.$$.fragment),r=D(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"aria-label","More"),p(e,"class","btn btn-sm btn-circle btn-transparent"),p(a,"class","flex-fill")},m(f,c){S(f,e,c),b(e,t),b(e,i),b(e,s),b(e,l),j(o,e,null),S(f,r,c),S(f,a,c),u=!0},p(f,c){const d={};c[1]&4&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){P(o.$$.fragment,f),u=!1},d(f){f&&w(e),H(o),f&&w(r),f&&w(a)}}}function bD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[15]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function vD(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].isNew&&ym(n);return{c(){m&&m.c(),e=D(),t=v("button"),i=v("span"),i.textContent="Cancel",s=D(),l=v("button"),o=v("span"),a=B(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-transparent"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],Q(l,"btn-loading",n[6])},m(h,g){m&&m.m(h,g),S(h,e,g),S(h,t,g),b(t,i),S(h,s,g),S(h,l,g),b(l,o),b(o,a),f=!0,c||(d=K(t,"click",n[16]),c=!0)},p(h,g){h[1].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),me()):m?(m.p(h,g),g[0]&2&&A(m,1)):(m=ym(h),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||g[0]&64)&&(t.disabled=h[6]),(!f||g[0]&2)&&r!==(r=h[1].isNew?"Create":"Save changes")&&re(a,r),(!f||g[0]&1088&&u!==(u=!h[10]||h[6]))&&(l.disabled=u),(!f||g[0]&64)&&Q(l,"btn-loading",h[6])},i(h){f||(A(m),f=!0)},o(h){P(m),f=!1},d(h){m&&m.d(h),h&&w(e),h&&w(t),h&&w(s),h&&w(l),c=!1,d()}}}function yD(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[vD],header:[_D],default:[gD]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[23](null),H(e,s)}}}function kD(n,e,t){let i;const s=$t(),l="admin_"+V.randomString(5);let o,r=new Ji,a=!1,u=!1,f=0,c="",d="",m="",h=!1;function g(J){return y(J),t(7,u=!0),o==null?void 0:o.show()}function _(){return o==null?void 0:o.hide()}function y(J){t(1,r=J!=null&&J.clone?J.clone():new Ji),k()}function k(){t(4,h=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,m=""),Vn({})}function T(){if(a||!i)return;t(6,a=!0);const J={email:c,avatar:f};(r.isNew||h)&&(J.password=d,J.passwordConfirm=m);let te;r.isNew?te=he.admins.create(J):te=he.admins.update(r.id,J),te.then(async ee=>{var z;t(7,u=!1),_(),Vt(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",ee),((z=he.authStore.model)==null?void 0:z.id)===ee.id&&he.authStore.save(he.authStore.token,ee)}).catch(ee=>{he.errorResponseHandler(ee)}).finally(()=>{t(6,a=!1)})}function C(){r!=null&&r.id&&un("Do you really want to delete the selected admin?",()=>he.admins.delete(r.id).then(()=>{t(7,u=!1),_(),Vt("Successfully deleted admin."),s("delete",r)}).catch(J=>{he.errorResponseHandler(J)}))}const M=()=>C(),$=()=>_(),O=J=>t(2,f=J);function E(){c=this.value,t(3,c)}function I(){h=this.checked,t(4,h)}function L(){d=this.value,t(8,d)}function N(){m=this.value,t(9,m)}const F=()=>i&&u?(un("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),_()}),!1):!0;function W(J){ie[J?"unshift":"push"](()=>{o=J,t(5,o)})}function Z(J){We.call(this,n,J)}function ne(J){We.call(this,n,J)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||h||c!==r.email||f!==r.avatar)},[_,r,f,c,h,o,a,u,d,m,i,l,T,C,g,M,$,O,E,I,L,N,F,W,Z,ne]}class wD extends ye{constructor(e){super(),ve(this,e,kD,yD,be,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function km(n,e,t){const i=n.slice();return i[24]=e[t],i}function SD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="id",p(t,"class",V.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function TD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="email",p(t,"class",V.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function CD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",V.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function $D(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="updated",p(t,"class",V.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),b(e,t),b(e,i),b(e,s)},p:G,d(l){l&&w(e)}}}function wm(n){let e;function t(l,o){return l[5]?DD:MD}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function MD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Sm(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Sm(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function DD(n){let e;return{c(){e=v("tr"),e.innerHTML=` `},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Sm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Tm(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Cm(n,e){let t,i,s,l,o,r,a,u,f,c,d,m=e[24].id+"",h,g,_,y,k,T=e[24].email+"",C,M,$,O,E,I,L,N,F,W,Z,ne,J,te;f=new ab({props:{value:e[24].id}});let ee=e[24].id===e[7].id&&Tm();E=new Zi({props:{date:e[24].created}}),N=new Zi({props:{date:e[24].updated}});function z(){return e[15](e[24])}function X(...Y){return e[16](e[24],...Y)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=D(),a=v("td"),u=v("div"),q(f.$$.fragment),c=D(),d=v("span"),h=B(m),g=D(),ee&&ee.c(),_=D(),y=v("td"),k=v("span"),C=B(T),$=D(),O=v("td"),q(E.$$.fragment),I=D(),L=v("td"),q(N.$$.fragment),F=D(),W=v("td"),W.innerHTML='',Z=D(),Hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(d,"class","txt"),p(u,"class","label"),p(a,"class","col-type-text col-field-id"),p(k,"class","txt txt-ellipsis"),p(k,"title",M=e[24].email),p(y,"class","col-type-email col-field-email"),p(O,"class","col-type-date col-field-created"),p(L,"class","col-type-date col-field-updated"),p(W,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Y,le){S(Y,t,le),b(t,i),b(i,s),b(s,l),b(t,r),b(t,a),b(a,u),j(f,u,null),b(u,c),b(u,d),b(d,h),b(a,g),ee&&ee.m(a,null),b(t,_),b(t,y),b(y,k),b(k,C),b(t,$),b(t,O),j(E,O,null),b(t,I),b(t,L),j(N,L,null),b(t,F),b(t,W),b(t,Z),ne=!0,J||(te=[K(t,"click",z),K(t,"keydown",X)],J=!0)},p(Y,le){e=Y,(!ne||le&16&&!Hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const He={};le&16&&(He.value=e[24].id),f.$set(He),(!ne||le&16)&&m!==(m=e[24].id+"")&&re(h,m),e[24].id===e[7].id?ee||(ee=Tm(),ee.c(),ee.m(a,null)):ee&&(ee.d(1),ee=null),(!ne||le&16)&&T!==(T=e[24].email+"")&&re(C,T),(!ne||le&16&&M!==(M=e[24].email))&&p(k,"title",M);const Re={};le&16&&(Re.date=e[24].created),E.$set(Re);const Fe={};le&16&&(Fe.date=e[24].updated),N.$set(Fe)},i(Y){ne||(A(f.$$.fragment,Y),A(E.$$.fragment,Y),A(N.$$.fragment,Y),ne=!0)},o(Y){P(f.$$.fragment,Y),P(E.$$.fragment,Y),P(N.$$.fragment,Y),ne=!1},d(Y){Y&&w(t),H(f),ee&&ee.d(),H(E),H(N),J=!1,Le(te)}}}function OD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M=[],$=new Map,O;function E(z){n[11](z)}let I={class:"col-type-text",name:"id",$$slots:{default:[SD]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new Ut({props:I}),ie.push(()=>ke(o,"sort",E));function L(z){n[12](z)}let N={class:"col-type-email col-field-email",name:"email",$$slots:{default:[TD]},$$scope:{ctx:n}};n[2]!==void 0&&(N.sort=n[2]),u=new Ut({props:N}),ie.push(()=>ke(u,"sort",L));function F(z){n[13](z)}let W={class:"col-type-date col-field-created",name:"created",$$slots:{default:[CD]},$$scope:{ctx:n}};n[2]!==void 0&&(W.sort=n[2]),d=new Ut({props:W}),ie.push(()=>ke(d,"sort",F));function Z(z){n[14](z)}let ne={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[$D]},$$scope:{ctx:n}};n[2]!==void 0&&(ne.sort=n[2]),g=new Ut({props:ne}),ie.push(()=>ke(g,"sort",Z));let J=n[4];const te=z=>z[24].id;for(let z=0;zr=!1)),o.$set(Y);const le={};X&134217728&&(le.$$scope={dirty:X,ctx:z}),!f&&X&4&&(f=!0,le.sort=z[2],we(()=>f=!1)),u.$set(le);const He={};X&134217728&&(He.$$scope={dirty:X,ctx:z}),!m&&X&4&&(m=!0,He.sort=z[2],we(()=>m=!1)),d.$set(He);const Re={};X&134217728&&(Re.$$scope={dirty:X,ctx:z}),!_&&X&4&&(_=!0,Re.sort=z[2],we(()=>_=!1)),g.$set(Re),X&186&&(J=z[4],pe(),M=wt(M,X,te,1,z,J,$,C,tn,Cm,null,km),me(),!J.length&&ee?ee.p(z,X):J.length?ee&&(ee.d(1),ee=null):(ee=wm(z),ee.c(),ee.m(C,null))),(!O||X&32)&&Q(e,"table-loading",z[5])},i(z){if(!O){A(o.$$.fragment,z),A(u.$$.fragment,z),A(d.$$.fragment,z),A(g.$$.fragment,z);for(let X=0;X - New admin`,m=D(),q(h.$$.fragment),g=D(),_=v("div"),y=D(),q(k.$$.fragment),T=D(),E&&E.c(),C=Ae(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p(_,"class","clearfix m-b-base")},m(I,L){S(I,e,L),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(e,r),j(a,e,null),b(e,u),b(e,f),b(e,c),b(e,d),S(I,m,L),j(h,I,L),S(I,g,L),S(I,_,L),S(I,y,L),j(k,I,L),S(I,T,L),E&&E.m(I,L),S(I,C,L),M=!0,$||(O=K(d,"click",n[9]),$=!0)},p(I,L){(!M||L&64)&&re(o,I[6]);const N={};L&2&&(N.value=I[1]),h.$set(N);const F={};L&134217918&&(F.$$scope={dirty:L,ctx:I}),k.$set(F),I[4].length?E?E.p(I,L):(E=$m(I),E.c(),E.m(C.parentNode,C)):E&&(E.d(1),E=null)},i(I){M||(A(a.$$.fragment,I),A(h.$$.fragment,I),A(k.$$.fragment,I),M=!0)},o(I){P(a.$$.fragment,I),P(h.$$.fragment,I),P(k.$$.fragment,I),M=!1},d(I){I&&w(e),H(a),I&&w(m),H(h,I),I&&w(g),I&&w(_),I&&w(y),H(k,I),I&&w(T),E&&E.d(I),I&&w(C),$=!1,O()}}}function AD(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[ED]},$$scope:{ctx:n}}});let r={};return l=new wD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[18](null),H(l,a)}}}function ID(n,e,t){let i,s,l;Je(n,ma,N=>t(21,i=N)),Je(n,St,N=>t(6,s=N)),Je(n,Ma,N=>t(7,l=N)),Yt(St,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),he.admins.getFullList(100,{sort:c||"-created",filter:f}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),m(),he.errorResponseHandler(N,!1))})}function m(){t(4,a=[])}const h=()=>d(),g=()=>r==null?void 0:r.show(),_=N=>t(1,f=N.detail);function y(N){c=N,t(2,c)}function k(N){c=N,t(2,c)}function T(N){c=N,t(2,c)}function C(N){c=N,t(2,c)}const M=N=>r==null?void 0:r.show(N),$=(N,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(N))},O=()=>t(1,f="");function E(N){ie[N?"unshift":"push"](()=>{r=N,t(3,r)})}const I=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const N=new URLSearchParams({filter:f,sort:c}).toString();Ti("/settings/admins?"+N),d()}},[d,f,c,r,a,u,s,l,h,g,_,y,k,T,C,M,$,O,E,I,L]}class PD extends ye{constructor(e){super(),ve(this,e,ID,AD,be,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function LD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=D(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0]),l.focus(),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&ce(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function ND(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=B("Password"),s=D(),l=v("input"),r=D(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,m){S(d,e,m),b(e,t),S(d,s,m),S(d,l,m),ce(l,n[1]),S(d,r,m),S(d,a,m),b(a,u),f||(c=[K(l,"input",n[5]),Pe(Xt.call(null,u))],f=!0)},p(d,m){m&256&&i!==(i=d[8])&&p(e,"for",i),m&256&&o!==(o=d[8])&&p(l,"id",o),m&2&&l.value!==d[1]&&ce(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),f=!1,Le(c)}}}function FD(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new _e({props:{class:"form-field required",name:"identity",$$slots:{default:[LD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[ND,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=D(),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),a=v("button"),a.innerHTML=`Login - `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),Q(a,"btn-disabled",n[2]),Q(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){S(d,e,m),b(e,t),b(e,i),j(s,e,null),b(e,l),j(o,e,null),b(e,r),b(e,a),u=!0,f||(c=K(e,"submit",pt(n[3])),f=!0)},p(d,m){const h={};m&769&&(h.$$scope={dirty:m,ctx:d}),s.$set(h);const g={};m&770&&(g.$$scope={dirty:m,ctx:d}),o.$set(g),(!u||m&4)&&Q(a,"btn-disabled",d[2]),(!u||m&4)&&Q(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){P(s.$$.fragment,d),P(o.$$.fragment,d),u=!1},d(d){d&&w(e),H(s),H(o),f=!1,c()}}}function RD(n){let e,t;return e=new e_({props:{$$slots:{default:[FD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function jD(n,e,t){let i;Je(n,ma,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),he.admins.authWithPassword(l,o).then(()=>{Ca(),Ti("/")}).catch(()=>{cl("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class HD extends ye{constructor(e){super(),ve(this,e,jD,RD,be,{})}}function qD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M;i=new _e({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[zD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[BD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[UD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[WD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let $=n[3]&&Mm(n);return{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),c=D(),d=v("div"),m=v("div"),h=D(),$&&$.c(),g=D(),_=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(m,"class","flex-fill"),p(y,"class","txt"),p(_,"type","submit"),p(_,"class","btn btn-expanded"),_.disabled=k=!n[3]||n[2],Q(_,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,E){S(O,e,E),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),j(a,e,null),b(e,u),j(f,e,null),b(e,c),b(e,d),b(d,m),b(d,h),$&&$.m(d,null),b(d,g),b(d,_),b(_,y),T=!0,C||(M=K(_,"click",n[13]),C=!0)},p(O,E){const I={};E&1572865&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&1572865&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&1572865&&(N.$$scope={dirty:E,ctx:O}),a.$set(N);const F={};E&1572865&&(F.$$scope={dirty:E,ctx:O}),f.$set(F),O[3]?$?$.p(O,E):($=Mm(O),$.c(),$.m(d,g)):$&&($.d(1),$=null),(!T||E&12&&k!==(k=!O[3]||O[2]))&&(_.disabled=k),(!T||E&4)&&Q(_,"btn-loading",O[2])},i(O){T||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),T=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(a.$$.fragment,O),P(f.$$.fragment,O),T=!1},d(O){O&&w(e),H(i),H(o),H(a),H(f),$&&$.d(),C=!1,M()}}}function VD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function zD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application name"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.appName),r||(a=K(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&ce(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function BD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application url"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.appUrl),r||(a=K(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&ce(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function UD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Logs max days retention"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].logs.maxDays),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].logs.maxDays&&ce(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function WD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){S(c,e,d),e.checked=n[0].meta.hideControls,S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"change",n[11]),Pe(Ye.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function Mm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),b(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function YD(n){let e,t,i,s,l,o,r,a,u;const f=[VD,qD],c=[];function d(m,h){return m[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=D(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),b(i,s),c[l].m(s,null),r=!0,a||(u=K(s,"submit",pt(n[4])),a=!0)},p(m,h){let g=l;l=d(m),l===g?c[l].p(m,h):(pe(),P(c[g],1,1,()=>{c[g]=null}),me(),o=c[l],o?o.p(m,h):(o=c[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){P(o),r=!1},d(m){m&&w(e),m&&w(t),m&&w(i),c[l].d(),a=!1,u()}}}function KD(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[YD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function JD(n,e,t){let i,s,l,o;Je(n,Cs,$=>t(14,s=$)),Je(n,vo,$=>t(15,l=$)),Je(n,St,$=>t(16,o=$)),Yt(St,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const $=await he.settings.getAll()||{};h($)}catch($){he.errorResponseHandler($)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const $=await he.settings.update(V.filterRedactedProps(a));h($),Vt("Successfully saved application settings.")}catch($){he.errorResponseHandler($)}t(2,f=!1)}}function h($={}){var O,E;Yt(vo,l=(O=$==null?void 0:$.meta)==null?void 0:O.appName,l),Yt(Cs,s=!!((E=$==null?void 0:$.meta)!=null&&E.hideControls),s),t(0,a={meta:($==null?void 0:$.meta)||{},logs:($==null?void 0:$.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function g(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function _(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function k(){a.logs.maxDays=ht(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>g(),M=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,m,g,r,c,_,y,k,T,C,M]}class ZD extends ye{constructor(e){super(),ve(this,e,JD,KD,be,{})}}function GD(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=D(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),Zn(s,a)},m(u,f){S(u,e,f),b(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Pe(Ye.call(null,t,{position:"left",text:"Set new value"})),K(t,"click",n[6])],l=!0)},p(u,f){Zn(s,a=sn(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Le(o)}}}function QD(n){let e;function t(l,o){return l[3]?XD:GD}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function xD(n,e,t){const i=["value","mask"];let s=At(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await cn(),r==null||r.focus()}const f=()=>u();function c(m){ie[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Xe(Xe({},e),Gn(m)),t(5,s=At(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class nu extends ye{constructor(e){super(),ve(this,e,xD,QD,be,{value:0,mask:1})}}function eO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=B("Subject"),s=D(),l=v("input"),r=D(),a=v("div"),u=B(`Available placeholder parameters: + New admin`,m=D(),q(h.$$.fragment),g=D(),_=v("div"),y=D(),q(k.$$.fragment),T=D(),E&&E.c(),C=Ae(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p(_,"class","clearfix m-b-base")},m(I,L){S(I,e,L),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(e,r),j(a,e,null),b(e,u),b(e,f),b(e,c),b(e,d),S(I,m,L),j(h,I,L),S(I,g,L),S(I,_,L),S(I,y,L),j(k,I,L),S(I,T,L),E&&E.m(I,L),S(I,C,L),M=!0,$||(O=K(d,"click",n[9]),$=!0)},p(I,L){(!M||L&64)&&re(o,I[6]);const N={};L&2&&(N.value=I[1]),h.$set(N);const F={};L&134217918&&(F.$$scope={dirty:L,ctx:I}),k.$set(F),I[4].length?E?E.p(I,L):(E=$m(I),E.c(),E.m(C.parentNode,C)):E&&(E.d(1),E=null)},i(I){M||(A(a.$$.fragment,I),A(h.$$.fragment,I),A(k.$$.fragment,I),M=!0)},o(I){P(a.$$.fragment,I),P(h.$$.fragment,I),P(k.$$.fragment,I),M=!1},d(I){I&&w(e),H(a),I&&w(m),H(h,I),I&&w(g),I&&w(_),I&&w(y),H(k,I),I&&w(T),E&&E.d(I),I&&w(C),$=!1,O()}}}function AD(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[ED]},$$scope:{ctx:n}}});let r={};return l=new wD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[18](null),H(l,a)}}}function ID(n,e,t){let i,s,l;Je(n,ma,N=>t(21,i=N)),Je(n,St,N=>t(6,s=N)),Je(n,Ma,N=>t(7,l=N)),Yt(St,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),he.admins.getFullList(100,{sort:c||"-created",filter:f}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),m(),he.errorResponseHandler(N,!1))})}function m(){t(4,a=[])}const h=()=>d(),g=()=>r==null?void 0:r.show(),_=N=>t(1,f=N.detail);function y(N){c=N,t(2,c)}function k(N){c=N,t(2,c)}function T(N){c=N,t(2,c)}function C(N){c=N,t(2,c)}const M=N=>r==null?void 0:r.show(N),$=(N,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(N))},O=()=>t(1,f="");function E(N){ie[N?"unshift":"push"](()=>{r=N,t(3,r)})}const I=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const N=new URLSearchParams({filter:f,sort:c}).toString();Ti("/settings/admins?"+N),d()}},[d,f,c,r,a,u,s,l,h,g,_,y,k,T,C,M,$,O,E,I,L]}class PD extends ye{constructor(e){super(),ve(this,e,ID,AD,be,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function LD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=D(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0]),l.focus(),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&de(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function ND(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=B("Password"),s=D(),l=v("input"),r=D(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,m){S(d,e,m),b(e,t),S(d,s,m),S(d,l,m),de(l,n[1]),S(d,r,m),S(d,a,m),b(a,u),f||(c=[K(l,"input",n[5]),Pe(Xt.call(null,u))],f=!0)},p(d,m){m&256&&i!==(i=d[8])&&p(e,"for",i),m&256&&o!==(o=d[8])&&p(l,"id",o),m&2&&l.value!==d[1]&&de(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),f=!1,Le(c)}}}function FD(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new _e({props:{class:"form-field required",name:"identity",$$slots:{default:[LD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[ND,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=D(),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),a=v("button"),a.innerHTML=`Login + `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),Q(a,"btn-disabled",n[2]),Q(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){S(d,e,m),b(e,t),b(e,i),j(s,e,null),b(e,l),j(o,e,null),b(e,r),b(e,a),u=!0,f||(c=K(e,"submit",pt(n[3])),f=!0)},p(d,m){const h={};m&769&&(h.$$scope={dirty:m,ctx:d}),s.$set(h);const g={};m&770&&(g.$$scope={dirty:m,ctx:d}),o.$set(g),(!u||m&4)&&Q(a,"btn-disabled",d[2]),(!u||m&4)&&Q(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){P(s.$$.fragment,d),P(o.$$.fragment,d),u=!1},d(d){d&&w(e),H(s),H(o),f=!1,c()}}}function RD(n){let e,t;return e=new e_({props:{$$slots:{default:[FD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function jD(n,e,t){let i;Je(n,ma,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),he.admins.authWithPassword(l,o).then(()=>{Ca(),Ti("/")}).catch(()=>{cl("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class HD extends ye{constructor(e){super(),ve(this,e,jD,RD,be,{})}}function qD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M;i=new _e({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[zD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[BD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[UD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[WD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let $=n[3]&&Mm(n);return{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),c=D(),d=v("div"),m=v("div"),h=D(),$&&$.c(),g=D(),_=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(m,"class","flex-fill"),p(y,"class","txt"),p(_,"type","submit"),p(_,"class","btn btn-expanded"),_.disabled=k=!n[3]||n[2],Q(_,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,E){S(O,e,E),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),j(a,e,null),b(e,u),j(f,e,null),b(e,c),b(e,d),b(d,m),b(d,h),$&&$.m(d,null),b(d,g),b(d,_),b(_,y),T=!0,C||(M=K(_,"click",n[13]),C=!0)},p(O,E){const I={};E&1572865&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&1572865&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&1572865&&(N.$$scope={dirty:E,ctx:O}),a.$set(N);const F={};E&1572865&&(F.$$scope={dirty:E,ctx:O}),f.$set(F),O[3]?$?$.p(O,E):($=Mm(O),$.c(),$.m(d,g)):$&&($.d(1),$=null),(!T||E&12&&k!==(k=!O[3]||O[2]))&&(_.disabled=k),(!T||E&4)&&Q(_,"btn-loading",O[2])},i(O){T||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),T=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(a.$$.fragment,O),P(f.$$.fragment,O),T=!1},d(O){O&&w(e),H(i),H(o),H(a),H(f),$&&$.d(),C=!1,M()}}}function VD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function zD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application name"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.appName),r||(a=K(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&de(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function BD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application url"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.appUrl),r||(a=K(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&de(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function UD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Logs max days retention"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].logs.maxDays),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].logs.maxDays&&de(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function WD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){S(c,e,d),e.checked=n[0].meta.hideControls,S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"change",n[11]),Pe(Ye.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function Mm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),b(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function YD(n){let e,t,i,s,l,o,r,a,u;const f=[VD,qD],c=[];function d(m,h){return m[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=D(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),b(i,s),c[l].m(s,null),r=!0,a||(u=K(s,"submit",pt(n[4])),a=!0)},p(m,h){let g=l;l=d(m),l===g?c[l].p(m,h):(pe(),P(c[g],1,1,()=>{c[g]=null}),me(),o=c[l],o?o.p(m,h):(o=c[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){P(o),r=!1},d(m){m&&w(e),m&&w(t),m&&w(i),c[l].d(),a=!1,u()}}}function KD(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[YD]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function JD(n,e,t){let i,s,l,o;Je(n,Cs,$=>t(14,s=$)),Je(n,vo,$=>t(15,l=$)),Je(n,St,$=>t(16,o=$)),Yt(St,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const $=await he.settings.getAll()||{};h($)}catch($){he.errorResponseHandler($)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const $=await he.settings.update(V.filterRedactedProps(a));h($),Vt("Successfully saved application settings.")}catch($){he.errorResponseHandler($)}t(2,f=!1)}}function h($={}){var O,E;Yt(vo,l=(O=$==null?void 0:$.meta)==null?void 0:O.appName,l),Yt(Cs,s=!!((E=$==null?void 0:$.meta)!=null&&E.hideControls),s),t(0,a={meta:($==null?void 0:$.meta)||{},logs:($==null?void 0:$.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function g(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function _(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function k(){a.logs.maxDays=ht(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>g(),M=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,m,g,r,c,_,y,k,T,C,M]}class ZD extends ye{constructor(e){super(),ve(this,e,JD,KD,be,{})}}function GD(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=D(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),Zn(s,a)},m(u,f){S(u,e,f),b(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Pe(Ye.call(null,t,{position:"left",text:"Set new value"})),K(t,"click",n[6])],l=!0)},p(u,f){Zn(s,a=sn(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Le(o)}}}function QD(n){let e;function t(l,o){return l[3]?XD:GD}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function xD(n,e,t){const i=["value","mask"];let s=At(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await cn(),r==null||r.focus()}const f=()=>u();function c(m){ie[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Xe(Xe({},e),Gn(m)),t(5,s=At(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class nu extends ye{constructor(e){super(),ve(this,e,xD,QD,be,{value:0,mask:1})}}function eO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=B("Subject"),s=D(),l=v("input"),r=D(),a=v("div"),u=B(`Available placeholder parameters: `),f=v("button"),f.textContent=`{APP_NAME} `,c=B(`, `),d=v("button"),d.textContent=`{APP_URL} - `,m=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(_,y){S(_,e,y),b(e,t),S(_,s,y),S(_,l,y),ce(l,n[0].subject),S(_,r,y),S(_,a,y),b(a,u),b(a,f),b(a,c),b(a,d),b(a,m),h||(g=[K(l,"input",n[13]),K(f,"click",n[14]),K(d,"click",n[15])],h=!0)},p(_,y){y[1]&1&&i!==(i=_[31])&&p(e,"for",i),y[1]&1&&o!==(o=_[31])&&p(l,"id",o),y[0]&1&&l.value!==_[0].subject&&ce(l,_[0].subject)},d(_){_&&w(e),_&&w(s),_&&w(l),_&&w(r),_&&w(a),h=!1,Le(g)}}}function tO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y;return{c(){e=v("label"),t=B("Action URL"),s=D(),l=v("input"),r=D(),a=v("div"),u=B(`Available placeholder parameters: + `,m=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(_,y){S(_,e,y),b(e,t),S(_,s,y),S(_,l,y),de(l,n[0].subject),S(_,r,y),S(_,a,y),b(a,u),b(a,f),b(a,c),b(a,d),b(a,m),h||(g=[K(l,"input",n[13]),K(f,"click",n[14]),K(d,"click",n[15])],h=!0)},p(_,y){y[1]&1&&i!==(i=_[31])&&p(e,"for",i),y[1]&1&&o!==(o=_[31])&&p(l,"id",o),y[0]&1&&l.value!==_[0].subject&&de(l,_[0].subject)},d(_){_&&w(e),_&&w(s),_&&w(l),_&&w(r),_&&w(a),h=!1,Le(g)}}}function tO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y;return{c(){e=v("label"),t=B("Action URL"),s=D(),l=v("input"),r=D(),a=v("div"),u=B(`Available placeholder parameters: `),f=v("button"),f.textContent=`{APP_NAME} `,c=B(`, `),d=v("button"),d.textContent=`{APP_URL} `,m=B(`, `),h=v("button"),h.textContent=`{TOKEN} - `,g=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(h,"title","Required parameter"),p(a,"class","help-block")},m(k,T){S(k,e,T),b(e,t),S(k,s,T),S(k,l,T),ce(l,n[0].actionUrl),S(k,r,T),S(k,a,T),b(a,u),b(a,f),b(a,c),b(a,d),b(a,m),b(a,h),b(a,g),_||(y=[K(l,"input",n[16]),K(f,"click",n[17]),K(d,"click",n[18]),K(h,"click",n[19])],_=!0)},p(k,T){T[1]&1&&i!==(i=k[31])&&p(e,"for",i),T[1]&1&&o!==(o=k[31])&&p(l,"id",o),T[0]&1&&l.value!==k[0].actionUrl&&ce(l,k[0].actionUrl)},d(k){k&&w(e),k&&w(s),k&&w(l),k&&w(r),k&&w(a),_=!1,Le(y)}}}function nO(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),ce(e,n[0].body),i||(s=K(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&ce(e,l[0].body)},i:G,o:G,d(l){l&&w(e),i=!1,s()}}}function iO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=Kt(o,r(n)),ie.push(()=>ke(e,"value",l))),{c(){e&&q(e.$$.fragment),i=Ae()},m(a,u){e&&j(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ke(e,"value",l)),q(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function sO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C;const M=[iO,nO],$=[];function O(E,I){return E[4]&&!E[5]?0:1}return l=O(n),o=$[l]=M[l](n),{c(){e=v("label"),t=B("Body (HTML)"),s=D(),o.c(),r=D(),a=v("div"),u=B(`Available placeholder parameters: + `,g=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(h,"title","Required parameter"),p(a,"class","help-block")},m(k,T){S(k,e,T),b(e,t),S(k,s,T),S(k,l,T),de(l,n[0].actionUrl),S(k,r,T),S(k,a,T),b(a,u),b(a,f),b(a,c),b(a,d),b(a,m),b(a,h),b(a,g),_||(y=[K(l,"input",n[16]),K(f,"click",n[17]),K(d,"click",n[18]),K(h,"click",n[19])],_=!0)},p(k,T){T[1]&1&&i!==(i=k[31])&&p(e,"for",i),T[1]&1&&o!==(o=k[31])&&p(l,"id",o),T[0]&1&&l.value!==k[0].actionUrl&&de(l,k[0].actionUrl)},d(k){k&&w(e),k&&w(s),k&&w(l),k&&w(r),k&&w(a),_=!1,Le(y)}}}function nO(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),de(e,n[0].body),i||(s=K(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&de(e,l[0].body)},i:G,o:G,d(l){l&&w(e),i=!1,s()}}}function iO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=Kt(o,r(n)),ie.push(()=>ke(e,"value",l))),{c(){e&&q(e.$$.fragment),i=Ae()},m(a,u){e&&j(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ke(e,"value",l)),q(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function sO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C;const M=[iO,nO],$=[];function O(E,I){return E[4]&&!E[5]?0:1}return l=O(n),o=$[l]=M[l](n),{c(){e=v("label"),t=B("Body (HTML)"),s=D(),o.c(),r=D(),a=v("div"),u=B(`Available placeholder parameters: `),f=v("button"),f.textContent=`{APP_NAME} `,c=B(`, `),d=v("button"),d.textContent=`{APP_URL} @@ -165,7 +165,7 @@ Updated: ${_[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=_[29])&&p(c," `),h=v("button"),h.textContent=`{TOKEN} `,g=B(`, `),_=v("button"),_.textContent=`{ACTION_URL} - `,y=B("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(_,"title","Required parameter"),p(a,"class","help-block")},m(E,I){S(E,e,I),b(e,t),S(E,s,I),$[l].m(E,I),S(E,r,I),S(E,a,I),b(a,u),b(a,f),b(a,c),b(a,d),b(a,m),b(a,h),b(a,g),b(a,_),b(a,y),k=!0,T||(C=[K(f,"click",n[22]),K(d,"click",n[23]),K(h,"click",n[24]),K(_,"click",n[25])],T=!0)},p(E,I){(!k||I[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let L=l;l=O(E),l===L?$[l].p(E,I):(pe(),P($[L],1,1,()=>{$[L]=null}),me(),o=$[l],o?o.p(E,I):(o=$[l]=M[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){k||(A(o),k=!0)},o(E){P(o),k=!1},d(E){E&&w(e),E&&w(s),$[l].d(E),E&&w(r),E&&w(a),T=!1,Le(C)}}}function lO(n){let e,t,i,s,l,o;return e=new _e({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[eO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new _e({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[tO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new _e({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[sO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(r,a){j(e,r,a),S(r,t,a),j(i,r,a),S(r,s,a),j(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function Dm(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function oO(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Dm();return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),l=B(n[2]),o=D(),r=v("div"),a=D(),f&&f.c(),u=Ae(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),S(c,o,d),S(c,r,d),S(c,a,d),f&&f.m(c,d),S(c,u,d)},p(c,d){d[0]&4&&re(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Dm(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(pe(),P(f,1,1,()=>{f=null}),me())},d(c){c&&w(e),c&&w(o),c&&w(r),c&&w(a),f&&f.d(c),c&&w(u)}}}function rO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[oO],default:[lO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=z));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Om,d=!1;function m(){f==null||f.expand()}function h(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function _(){c||d||(t(5,d=!0),t(4,c=(await ft(()=>import("./CodeEditor-aa39fcd2.js"),["./CodeEditor-aa39fcd2.js","./index-0935db40.js"],import.meta.url)).default),Om=c,t(5,d=!1))}function y(z){V.copyToClipboard(z),Qg(`Copied ${z} to clipboard`,2e3)}_();function k(){u.subject=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),E=()=>y("{TOKEN}");function I(z){n.$$.not_equal(u.body,z)&&(u.body=z,t(0,u))}function L(){u.body=this.value,t(0,u)}const N=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),W=()=>y("{TOKEN}"),Z=()=>y("{ACTION_URL}");function ne(z){ie[z?"unshift":"push"](()=>{f=z,t(3,f)})}function J(z){We.call(this,n,z)}function te(z){We.call(this,n,z)}function ee(z){We.call(this,n,z)}return n.$$set=z=>{e=Xe(Xe({},e),Gn(z)),t(8,l=At(e,s)),"key"in z&&t(1,r=z.key),"title"in z&&t(2,a=z.title),"config"in z&&t(0,u=z.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!V.isEmpty(V.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ts(r))},[u,r,a,f,c,d,i,y,l,m,h,g,o,k,T,C,M,$,O,E,I,L,N,F,W,Z,ne,J,te,ee]}class Or extends ye{constructor(e){super(),ve(this,e,aO,rO,be,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Em(n,e,t){const i=n.slice();return i[22]=e[t],i}function Am(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=D(),o=v("label"),a=B(r),f=D(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(m,h){S(m,t,h),b(t,i),i.checked=i.__value===e[2],b(t,l),b(t,o),b(o,a),b(t,f),c||(d=K(i,"change",e[11]),c=!0)},p(m,h){e=m,h&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),h&4&&(i.checked=i.__value===e[2]),h&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(m){m&&w(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function uO(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new _e({props:{class:"form-field required m-0",name:"email",$$slots:{default:[fO,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),q(t.$$.fragment),i=D(),q(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){S(a,e,u),j(t,e,null),b(e,i),j(s,e,null),l=!0,o||(r=K(e,"submit",pt(n[14])),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}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),H(t),H(s),o=!1,r()}}}function dO(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function pO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=B("Close"),i=D(),s=v("button"),l=v("i"),o=D(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(c,d){S(c,e,d),b(e,t),S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"click",n[0]),K(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&Q(s,"btn-loading",c[4])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function mO(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[pO],header:[dO],default:[cO]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),H(e,s)}}}const Er="last_email_test",Im="email_test_request";function hO(n,e,t){let i;const s=$t(),l="email_test_"+V.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Er),u=o[0].value,f=!1,c=null;function d(E="",I=""){t(1,a=E||localStorage.getItem(Er)),t(2,u=I||o[0].value),Vn({}),r==null||r.show()}function m(){return clearTimeout(c),r==null?void 0:r.hide()}async function h(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Er,a),clearTimeout(c),c=setTimeout(()=>{he.cancelRequest(Im),cl("Test email send timeout.")},3e4);try{await he.settings.testEmail(a,u,{$cancelKey:Im}),Vt("Successfully sent test email."),s("submit"),t(4,f=!1),await cn(),m()}catch(E){t(4,f=!1),he.errorResponseHandler(E)}clearTimeout(c)}}const g=[[]],_=()=>h();function y(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const T=()=>h(),C=()=>!f;function M(E){ie[E?"unshift":"push"](()=>{r=E,t(3,r)})}function $(E){We.call(this,n,E)}function O(E){We.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,h,d,_,y,g,k,T,C,M,$,O]}class gO extends ye{constructor(e){super(),ve(this,e,hO,mO,be,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function _O(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$,O,E,I,L;i=new _e({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[vO,({uniqueId:Y})=>({31:Y}),({uniqueId:Y})=>[0,Y?1:0]]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[yO,({uniqueId:Y})=>({31:Y}),({uniqueId:Y})=>[0,Y?1:0]]},$$scope:{ctx:n}}});function N(Y){n[14](Y)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new Or({props:F}),ie.push(()=>ke(u,"config",N));function W(Y){n[15](Y)}let Z={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(Z.config=n[0].meta.resetPasswordTemplate),d=new Or({props:Z}),ie.push(()=>ke(d,"config",W));function ne(Y){n[16](Y)}let J={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(J.config=n[0].meta.confirmEmailChangeTemplate),g=new Or({props:J}),ie.push(()=>ke(g,"config",ne)),C=new _e({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[kO,({uniqueId:Y})=>({31:Y}),({uniqueId:Y})=>[0,Y?1:0]]},$$scope:{ctx:n}}});let te=n[0].smtp.enabled&&Pm(n);function ee(Y,le){return Y[4]?OO:DO}let z=ee(n),X=z(n);return{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),c=D(),q(d.$$.fragment),h=D(),q(g.$$.fragment),y=D(),k=v("hr"),T=D(),q(C.$$.fragment),M=D(),te&&te.c(),$=D(),O=v("div"),E=v("div"),I=D(),X.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(E,"class","flex-fill"),p(O,"class","flex")},m(Y,le){S(Y,e,le),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),S(Y,r,le),S(Y,a,le),j(u,a,null),b(a,c),j(d,a,null),b(a,h),j(g,a,null),S(Y,y,le),S(Y,k,le),S(Y,T,le),j(C,Y,le),S(Y,M,le),te&&te.m(Y,le),S(Y,$,le),S(Y,O,le),b(O,E),b(O,I),X.m(O,null),L=!0},p(Y,le){const He={};le[0]&1|le[1]&3&&(He.$$scope={dirty:le,ctx:Y}),i.$set(He);const Re={};le[0]&1|le[1]&3&&(Re.$$scope={dirty:le,ctx:Y}),o.$set(Re);const Fe={};!f&&le[0]&1&&(f=!0,Fe.config=Y[0].meta.verificationTemplate,we(()=>f=!1)),u.$set(Fe);const qe={};!m&&le[0]&1&&(m=!0,qe.config=Y[0].meta.resetPasswordTemplate,we(()=>m=!1)),d.$set(qe);const ge={};!_&&le[0]&1&&(_=!0,ge.config=Y[0].meta.confirmEmailChangeTemplate,we(()=>_=!1)),g.$set(ge);const Se={};le[0]&1|le[1]&3&&(Se.$$scope={dirty:le,ctx:Y}),C.$set(Se),Y[0].smtp.enabled?te?(te.p(Y,le),le[0]&1&&A(te,1)):(te=Pm(Y),te.c(),A(te,1),te.m($.parentNode,$)):te&&(pe(),P(te,1,1,()=>{te=null}),me()),z===(z=ee(Y))&&X?X.p(Y,le):(X.d(1),X=z(Y),X&&(X.c(),X.m(O,null)))},i(Y){L||(A(i.$$.fragment,Y),A(o.$$.fragment,Y),A(u.$$.fragment,Y),A(d.$$.fragment,Y),A(g.$$.fragment,Y),A(C.$$.fragment,Y),A(te),L=!0)},o(Y){P(i.$$.fragment,Y),P(o.$$.fragment,Y),P(u.$$.fragment,Y),P(d.$$.fragment,Y),P(g.$$.fragment,Y),P(C.$$.fragment,Y),P(te),L=!1},d(Y){Y&&w(e),H(i),H(o),Y&&w(r),Y&&w(a),H(u),H(d),H(g),Y&&w(y),Y&&w(k),Y&&w(T),H(C,Y),Y&&w(M),te&&te.d(Y),Y&&w($),Y&&w(O),X.d()}}}function bO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function vO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender name"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderName),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&ce(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function yO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender address"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","email"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderAddress),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&ce(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function kO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[31])},m(c,d){S(c,e,d),e.checked=n[0].smtp.enabled,S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"change",n[17]),Pe(Ye.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&1&&t!==(t=c[31])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&1&&a!==(a=c[31])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function Pm(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$;return i=new _e({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[wO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[SO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[TO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[CO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field",name:"smtp.username",$$slots:{default:[$O,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"smtp.password",$$slots:{default:[MO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(d.$$.fragment),m=D(),h=v("div"),q(g.$$.fragment),_=D(),y=v("div"),q(k.$$.fragment),T=D(),C=v("div"),p(t,"class","col-lg-4"),p(l,"class","col-lg-2"),p(a,"class","col-lg-3"),p(c,"class","col-lg-3"),p(h,"class","col-lg-6"),p(y,"class","col-lg-6"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(O,E){S(O,e,E),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),b(e,f),b(e,c),j(d,c,null),b(e,m),b(e,h),j(g,h,null),b(e,_),b(e,y),j(k,y,null),b(e,T),b(e,C),$=!0},p(O,E){const I={};E[0]&1|E[1]&3&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E[0]&1|E[1]&3&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E[0]&1|E[1]&3&&(N.$$scope={dirty:E,ctx:O}),u.$set(N);const F={};E[0]&1|E[1]&3&&(F.$$scope={dirty:E,ctx:O}),d.$set(F);const W={};E[0]&1|E[1]&3&&(W.$$scope={dirty:E,ctx:O}),g.$set(W);const Z={};E[0]&1|E[1]&3&&(Z.$$scope={dirty:E,ctx:O}),k.$set(Z)},i(O){$||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(k.$$.fragment,O),O&&st(()=>{M||(M=Be(e,Ht,{duration:150},!0)),M.run(1)}),$=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(g.$$.fragment,O),P(k.$$.fragment,O),O&&(M||(M=Be(e,Ht,{duration:150},!1)),M.run(0)),$=!1},d(O){O&&w(e),H(i),H(o),H(u),H(d),H(g),H(k),O&&M&&M.end()}}}function wO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("SMTP server host"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.host),r||(a=K(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&ce(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function SO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Port"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.port),r||(a=K(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&ht(l.value)!==u[0].smtp.port&&ce(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function TO(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("TLS Encryption"),s=D(),q(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function CO(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("AUTH Method"),s=D(),q(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function $O(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Username"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.username),r||(a=K(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&ce(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function MO(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new nu({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=B("Password"),s=D(),q(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function DO(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + `,y=B("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(_,"title","Required parameter"),p(a,"class","help-block")},m(E,I){S(E,e,I),b(e,t),S(E,s,I),$[l].m(E,I),S(E,r,I),S(E,a,I),b(a,u),b(a,f),b(a,c),b(a,d),b(a,m),b(a,h),b(a,g),b(a,_),b(a,y),k=!0,T||(C=[K(f,"click",n[22]),K(d,"click",n[23]),K(h,"click",n[24]),K(_,"click",n[25])],T=!0)},p(E,I){(!k||I[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let L=l;l=O(E),l===L?$[l].p(E,I):(pe(),P($[L],1,1,()=>{$[L]=null}),me(),o=$[l],o?o.p(E,I):(o=$[l]=M[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){k||(A(o),k=!0)},o(E){P(o),k=!1},d(E){E&&w(e),E&&w(s),$[l].d(E),E&&w(r),E&&w(a),T=!1,Le(C)}}}function lO(n){let e,t,i,s,l,o;return e=new _e({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[eO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new _e({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[tO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new _e({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[sO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(r,a){j(e,r,a),S(r,t,a),j(i,r,a),S(r,s,a),j(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function Dm(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function oO(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Dm();return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),l=B(n[2]),o=D(),r=v("div"),a=D(),f&&f.c(),u=Ae(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){S(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),S(c,o,d),S(c,r,d),S(c,a,d),f&&f.m(c,d),S(c,u,d)},p(c,d){d[0]&4&&re(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Dm(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(pe(),P(f,1,1,()=>{f=null}),me())},d(c){c&&w(e),c&&w(o),c&&w(r),c&&w(a),f&&f.d(c),c&&w(u)}}}function rO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[oO],default:[lO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=z));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Om,d=!1;function m(){f==null||f.expand()}function h(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function _(){c||d||(t(5,d=!0),t(4,c=(await ft(()=>import("./CodeEditor-a70b05e8.js"),["./CodeEditor-a70b05e8.js","./index-0935db40.js"],import.meta.url)).default),Om=c,t(5,d=!1))}function y(z){V.copyToClipboard(z),Qg(`Copied ${z} to clipboard`,2e3)}_();function k(){u.subject=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),E=()=>y("{TOKEN}");function I(z){n.$$.not_equal(u.body,z)&&(u.body=z,t(0,u))}function L(){u.body=this.value,t(0,u)}const N=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),W=()=>y("{TOKEN}"),Z=()=>y("{ACTION_URL}");function ne(z){ie[z?"unshift":"push"](()=>{f=z,t(3,f)})}function J(z){We.call(this,n,z)}function te(z){We.call(this,n,z)}function ee(z){We.call(this,n,z)}return n.$$set=z=>{e=Xe(Xe({},e),Gn(z)),t(8,l=At(e,s)),"key"in z&&t(1,r=z.key),"title"in z&&t(2,a=z.title),"config"in z&&t(0,u=z.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!V.isEmpty(V.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ts(r))},[u,r,a,f,c,d,i,y,l,m,h,g,o,k,T,C,M,$,O,E,I,L,N,F,W,Z,ne,J,te,ee]}class Or extends ye{constructor(e){super(),ve(this,e,aO,rO,be,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Em(n,e,t){const i=n.slice();return i[22]=e[t],i}function Am(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=D(),o=v("label"),a=B(r),f=D(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(m,h){S(m,t,h),b(t,i),i.checked=i.__value===e[2],b(t,l),b(t,o),b(o,a),b(t,f),c||(d=K(i,"change",e[11]),c=!0)},p(m,h){e=m,h&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),h&4&&(i.checked=i.__value===e[2]),h&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(m){m&&w(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function uO(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new _e({props:{class:"form-field required m-0",name:"email",$$slots:{default:[fO,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),q(t.$$.fragment),i=D(),q(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){S(a,e,u),j(t,e,null),b(e,i),j(s,e,null),l=!0,o||(r=K(e,"submit",pt(n[14])),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}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),H(t),H(s),o=!1,r()}}}function dO(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function pO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=B("Close"),i=D(),s=v("button"),l=v("i"),o=D(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(c,d){S(c,e,d),b(e,t),S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"click",n[0]),K(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&Q(s,"btn-loading",c[4])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function mO(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[pO],header:[dO],default:[cO]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),H(e,s)}}}const Er="last_email_test",Im="email_test_request";function hO(n,e,t){let i;const s=$t(),l="email_test_"+V.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Er),u=o[0].value,f=!1,c=null;function d(E="",I=""){t(1,a=E||localStorage.getItem(Er)),t(2,u=I||o[0].value),Vn({}),r==null||r.show()}function m(){return clearTimeout(c),r==null?void 0:r.hide()}async function h(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Er,a),clearTimeout(c),c=setTimeout(()=>{he.cancelRequest(Im),cl("Test email send timeout.")},3e4);try{await he.settings.testEmail(a,u,{$cancelKey:Im}),Vt("Successfully sent test email."),s("submit"),t(4,f=!1),await cn(),m()}catch(E){t(4,f=!1),he.errorResponseHandler(E)}clearTimeout(c)}}const g=[[]],_=()=>h();function y(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const T=()=>h(),C=()=>!f;function M(E){ie[E?"unshift":"push"](()=>{r=E,t(3,r)})}function $(E){We.call(this,n,E)}function O(E){We.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,h,d,_,y,g,k,T,C,M,$,O]}class gO extends ye{constructor(e){super(),ve(this,e,hO,mO,be,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function _O(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$,O,E,I,L;i=new _e({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[vO,({uniqueId:Y})=>({31:Y}),({uniqueId:Y})=>[0,Y?1:0]]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[yO,({uniqueId:Y})=>({31:Y}),({uniqueId:Y})=>[0,Y?1:0]]},$$scope:{ctx:n}}});function N(Y){n[14](Y)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new Or({props:F}),ie.push(()=>ke(u,"config",N));function W(Y){n[15](Y)}let Z={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(Z.config=n[0].meta.resetPasswordTemplate),d=new Or({props:Z}),ie.push(()=>ke(d,"config",W));function ne(Y){n[16](Y)}let J={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(J.config=n[0].meta.confirmEmailChangeTemplate),g=new Or({props:J}),ie.push(()=>ke(g,"config",ne)),C=new _e({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[kO,({uniqueId:Y})=>({31:Y}),({uniqueId:Y})=>[0,Y?1:0]]},$$scope:{ctx:n}}});let te=n[0].smtp.enabled&&Pm(n);function ee(Y,le){return Y[4]?OO:DO}let z=ee(n),X=z(n);return{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),c=D(),q(d.$$.fragment),h=D(),q(g.$$.fragment),y=D(),k=v("hr"),T=D(),q(C.$$.fragment),M=D(),te&&te.c(),$=D(),O=v("div"),E=v("div"),I=D(),X.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(E,"class","flex-fill"),p(O,"class","flex")},m(Y,le){S(Y,e,le),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),S(Y,r,le),S(Y,a,le),j(u,a,null),b(a,c),j(d,a,null),b(a,h),j(g,a,null),S(Y,y,le),S(Y,k,le),S(Y,T,le),j(C,Y,le),S(Y,M,le),te&&te.m(Y,le),S(Y,$,le),S(Y,O,le),b(O,E),b(O,I),X.m(O,null),L=!0},p(Y,le){const He={};le[0]&1|le[1]&3&&(He.$$scope={dirty:le,ctx:Y}),i.$set(He);const Re={};le[0]&1|le[1]&3&&(Re.$$scope={dirty:le,ctx:Y}),o.$set(Re);const Fe={};!f&&le[0]&1&&(f=!0,Fe.config=Y[0].meta.verificationTemplate,we(()=>f=!1)),u.$set(Fe);const qe={};!m&&le[0]&1&&(m=!0,qe.config=Y[0].meta.resetPasswordTemplate,we(()=>m=!1)),d.$set(qe);const ge={};!_&&le[0]&1&&(_=!0,ge.config=Y[0].meta.confirmEmailChangeTemplate,we(()=>_=!1)),g.$set(ge);const Se={};le[0]&1|le[1]&3&&(Se.$$scope={dirty:le,ctx:Y}),C.$set(Se),Y[0].smtp.enabled?te?(te.p(Y,le),le[0]&1&&A(te,1)):(te=Pm(Y),te.c(),A(te,1),te.m($.parentNode,$)):te&&(pe(),P(te,1,1,()=>{te=null}),me()),z===(z=ee(Y))&&X?X.p(Y,le):(X.d(1),X=z(Y),X&&(X.c(),X.m(O,null)))},i(Y){L||(A(i.$$.fragment,Y),A(o.$$.fragment,Y),A(u.$$.fragment,Y),A(d.$$.fragment,Y),A(g.$$.fragment,Y),A(C.$$.fragment,Y),A(te),L=!0)},o(Y){P(i.$$.fragment,Y),P(o.$$.fragment,Y),P(u.$$.fragment,Y),P(d.$$.fragment,Y),P(g.$$.fragment,Y),P(C.$$.fragment,Y),P(te),L=!1},d(Y){Y&&w(e),H(i),H(o),Y&&w(r),Y&&w(a),H(u),H(d),H(g),Y&&w(y),Y&&w(k),Y&&w(T),H(C,Y),Y&&w(M),te&&te.d(Y),Y&&w($),Y&&w(O),X.d()}}}function bO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function vO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender name"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.senderName),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&de(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function yO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender address"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","email"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.senderAddress),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&de(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function kO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[31])},m(c,d){S(c,e,d),e.checked=n[0].smtp.enabled,S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"change",n[17]),Pe(Ye.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&1&&t!==(t=c[31])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&1&&a!==(a=c[31])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function Pm(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$;return i=new _e({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[wO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[SO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[TO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[CO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field",name:"smtp.username",$$slots:{default:[$O,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"smtp.password",$$slots:{default:[MO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(d.$$.fragment),m=D(),h=v("div"),q(g.$$.fragment),_=D(),y=v("div"),q(k.$$.fragment),T=D(),C=v("div"),p(t,"class","col-lg-4"),p(l,"class","col-lg-2"),p(a,"class","col-lg-3"),p(c,"class","col-lg-3"),p(h,"class","col-lg-6"),p(y,"class","col-lg-6"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(O,E){S(O,e,E),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),b(e,f),b(e,c),j(d,c,null),b(e,m),b(e,h),j(g,h,null),b(e,_),b(e,y),j(k,y,null),b(e,T),b(e,C),$=!0},p(O,E){const I={};E[0]&1|E[1]&3&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E[0]&1|E[1]&3&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E[0]&1|E[1]&3&&(N.$$scope={dirty:E,ctx:O}),u.$set(N);const F={};E[0]&1|E[1]&3&&(F.$$scope={dirty:E,ctx:O}),d.$set(F);const W={};E[0]&1|E[1]&3&&(W.$$scope={dirty:E,ctx:O}),g.$set(W);const Z={};E[0]&1|E[1]&3&&(Z.$$scope={dirty:E,ctx:O}),k.$set(Z)},i(O){$||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(k.$$.fragment,O),O&&st(()=>{M||(M=Be(e,Ht,{duration:150},!0)),M.run(1)}),$=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(g.$$.fragment,O),P(k.$$.fragment,O),O&&(M||(M=Be(e,Ht,{duration:150},!1)),M.run(0)),$=!1},d(O){O&&w(e),H(i),H(o),H(u),H(d),H(g),H(k),O&&M&&M.end()}}}function wO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("SMTP server host"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].smtp.host),r||(a=K(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&de(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function SO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Port"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].smtp.port),r||(a=K(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&ht(l.value)!==u[0].smtp.port&&de(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function TO(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("TLS Encryption"),s=D(),q(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function CO(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Ls({props:u}),ie.push(()=>ke(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("AUTH Method"),s=D(),q(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function $O(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Username"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31])},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].smtp.username),r||(a=K(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&de(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function MO(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new nu({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=B("Password"),s=D(),q(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function DO(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[26]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function OO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=D(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],Q(s,"btn-loading",n[3])},m(u,f){S(u,e,f),b(e,t),S(u,i,f),S(u,s,f),b(s,l),r||(a=[K(e,"click",n[24]),K(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&Q(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Le(a)}}}function EO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_;const y=[bO,_O],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=B(n[5]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(C,r,M),S(C,a,M),b(a,u),b(u,f),b(u,c),k[d].m(u,null),h=!0,g||(_=K(u,"submit",pt(n[27])),g=!0)},p(C,M){(!h||M[0]&32)&&re(o,C[5]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,_()}}}function AO(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[EO]},$$scope:{ctx:n}}});let r={};return l=new gO({props:r}),n[28](l),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[28](null),H(l,a)}}}function IO(n,e,t){let i,s,l;Je(n,St,ee=>t(5,l=ee));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];Yt(St,l="Mail settings",l);let a,u={},f={},c=!1,d=!1;m();async function m(){t(2,c=!0);try{const ee=await he.settings.getAll()||{};g(ee)}catch(ee){he.errorResponseHandler(ee)}t(2,c=!1)}async function h(){if(!(d||!s)){t(3,d=!0);try{const ee=await he.settings.update(V.filterRedactedProps(f));g(ee),Vn({}),Vt("Successfully saved mail settings.")}catch(ee){he.errorResponseHandler(ee)}t(3,d=!1)}}function g(ee={}){t(0,f={meta:(ee==null?void 0:ee.meta)||{},smtp:(ee==null?void 0:ee.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function _(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function y(){f.meta.senderName=this.value,t(0,f)}function k(){f.meta.senderAddress=this.value,t(0,f)}function T(ee){n.$$.not_equal(f.meta.verificationTemplate,ee)&&(f.meta.verificationTemplate=ee,t(0,f))}function C(ee){n.$$.not_equal(f.meta.resetPasswordTemplate,ee)&&(f.meta.resetPasswordTemplate=ee,t(0,f))}function M(ee){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,ee)&&(f.meta.confirmEmailChangeTemplate=ee,t(0,f))}function $(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function E(){f.smtp.port=ht(this.value),t(0,f)}function I(ee){n.$$.not_equal(f.smtp.tls,ee)&&(f.smtp.tls=ee,t(0,f))}function L(ee){n.$$.not_equal(f.smtp.authMethod,ee)&&(f.smtp.authMethod=ee,t(0,f))}function N(){f.smtp.username=this.value,t(0,f)}function F(ee){n.$$.not_equal(f.smtp.password,ee)&&(f.smtp.password=ee,t(0,f))}const W=()=>_(),Z=()=>h(),ne=()=>a==null?void 0:a.show(),J=()=>h();function te(ee){ie[ee?"unshift":"push"](()=>{a=ee,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,c,d,s,l,o,r,h,_,u,i,y,k,T,C,M,$,O,E,I,L,N,F,W,Z,ne,J,te]}class PO extends ye{constructor(e){super(),ve(this,e,IO,AO,be,{},null,[-1,-1])}}function LO(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[FO,({uniqueId:$})=>({25:$}),({uniqueId:$})=>$?33554432:0]},$$scope:{ctx:n}}});let _=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&Lm(n),y=n[1].s3.enabled&&Nm(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&Fm(n),T=n[6]&&Rm(n);return{c(){q(e.$$.fragment),t=D(),_&&_.c(),i=D(),y&&y.c(),s=D(),l=v("div"),o=v("div"),r=D(),k&&k.c(),a=D(),T&&T.c(),u=D(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"class","flex-fill"),p(c,"class","txt"),p(f,"type","submit"),p(f,"class","btn btn-expanded"),f.disabled=d=!n[6]||n[3],Q(f,"btn-loading",n[3]),p(l,"class","flex")},m($,O){j(e,$,O),S($,t,O),_&&_.m($,O),S($,i,O),y&&y.m($,O),S($,s,O),S($,l,O),b(l,o),b(l,r),k&&k.m(l,null),b(l,a),T&&T.m(l,null),b(l,u),b(l,f),b(f,c),m=!0,h||(g=K(f,"click",n[19]),h=!0)},p($,O){var I,L;const E={};O&100663298&&(E.$$scope={dirty:O,ctx:$}),e.$set(E),((I=$[0].s3)==null?void 0:I.enabled)!=$[1].s3.enabled?_?(_.p($,O),O&3&&A(_,1)):(_=Lm($),_.c(),A(_,1),_.m(i.parentNode,i)):_&&(pe(),P(_,1,1,()=>{_=null}),me()),$[1].s3.enabled?y?(y.p($,O),O&2&&A(y,1)):(y=Nm($),y.c(),A(y,1),y.m(s.parentNode,s)):y&&(pe(),P(y,1,1,()=>{y=null}),me()),(L=$[1].s3)!=null&&L.enabled&&!$[6]&&!$[3]?k?k.p($,O):(k=Fm($),k.c(),k.m(l,a)):k&&(k.d(1),k=null),$[6]?T?T.p($,O):(T=Rm($),T.c(),T.m(l,u)):T&&(T.d(1),T=null),(!m||O&72&&d!==(d=!$[6]||$[3]))&&(f.disabled=d),(!m||O&8)&&Q(f,"btn-loading",$[3])},i($){m||(A(e.$$.fragment,$),A(_),A(y),m=!0)},o($){P(e.$$.fragment,$),P(_),P(y),m=!1},d($){H(e,$),$&&w(t),_&&_.d($),$&&w(i),y&&y.d($),$&&w(s),$&&w(l),k&&k.d(),T&&T.d(),h=!1,g()}}}function NO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function FO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[25]),e.required=!0,p(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Lm(n){var I;let e,t,i,s,l,o,r,a=(I=n[0].s3)!=null&&I.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",m,h,g,_,y,k,T,C,M,$,O,E;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=D(),l=v("div"),o=B(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=v("strong"),u=B(a),f=B(` @@ -176,19 +176,19 @@ Updated: ${_[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=_[29])&&p(c," `),y=v("a"),y.textContent=`rclone `,k=B(`, `),T=v("a"),T.textContent=`s5cmd - `,C=B(", etc."),M=D(),$=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p(T,"href","https://github.com/peak/s5cmd"),p(T,"target","_blank"),p(T,"rel","noopener noreferrer"),p(T,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p($,"class","clearfix m-t-base")},m(L,N){S(L,e,N),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(l,r),b(r,u),b(l,f),b(l,c),b(c,m),b(l,h),b(l,g),b(l,_),b(l,y),b(l,k),b(l,T),b(l,C),b(e,M),b(e,$),E=!0},p(L,N){var F;(!E||N&1)&&a!==(a=(F=L[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&re(u,a),(!E||N&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&re(m,d)},i(L){E||(L&&st(()=>{O||(O=Be(e,Ht,{duration:150},!0)),O.run(1)}),E=!0)},o(L){L&&(O||(O=Be(e,Ht,{duration:150},!1)),O.run(0)),E=!1},d(L){L&&w(e),L&&O&&O.end()}}}function Nm(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$;return i=new _e({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[RO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[jO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"s3.region",$$slots:{default:[HO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[qO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[VO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[zO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(d.$$.fragment),m=D(),h=v("div"),q(g.$$.fragment),_=D(),y=v("div"),q(k.$$.fragment),T=D(),C=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(h,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(O,E){S(O,e,E),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),b(e,f),b(e,c),j(d,c,null),b(e,m),b(e,h),j(g,h,null),b(e,_),b(e,y),j(k,y,null),b(e,T),b(e,C),$=!0},p(O,E){const I={};E&100663298&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&100663298&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&100663298&&(N.$$scope={dirty:E,ctx:O}),u.$set(N);const F={};E&100663298&&(F.$$scope={dirty:E,ctx:O}),d.$set(F);const W={};E&100663298&&(W.$$scope={dirty:E,ctx:O}),g.$set(W);const Z={};E&100663298&&(Z.$$scope={dirty:E,ctx:O}),k.$set(Z)},i(O){$||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(k.$$.fragment,O),O&&st(()=>{M||(M=Be(e,Ht,{duration:150},!0)),M.run(1)}),$=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(g.$$.fragment,O),P(k.$$.fragment,O),O&&(M||(M=Be(e,Ht,{duration:150},!1)),M.run(0)),$=!1},d(O){O&&w(e),H(i),H(o),H(u),H(d),H(g),H(k),O&&M&&M.end()}}}function RO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Endpoint"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.endpoint),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&ce(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function jO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Bucket"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.bucket),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&ce(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function HO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Region"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.region),r||(a=K(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&ce(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function qO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Access key"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.accessKey),r||(a=K(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&ce(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function VO(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new nu({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=B("Secret"),s=D(),q(l.$$.fragment),p(e,"for",i=n[25])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&33554432&&i!==(i=f[25]))&&p(e,"for",i);const d={};c&33554432&&(d.id=f[25]),!o&&c&2&&(o=!0,d.value=f[1].s3.secret,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function zO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[25])},m(c,d){S(c,e,d),e.checked=n[1].s3.forcePathStyle,S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"change",n[17]),Pe(Ye.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&33554432&&t!==(t=c[25])&&p(e,"id",t),d&2&&(e.checked=c[1].s3.forcePathStyle),d&33554432&&a!==(a=c[25])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function Fm(n){let e;function t(l,o){return l[4]?WO:l[5]?UO:BO}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function BO(n){let e;return{c(){e=v("div"),e.innerHTML=` + `,C=B(", etc."),M=D(),$=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p(T,"href","https://github.com/peak/s5cmd"),p(T,"target","_blank"),p(T,"rel","noopener noreferrer"),p(T,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p($,"class","clearfix m-t-base")},m(L,N){S(L,e,N),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(l,r),b(r,u),b(l,f),b(l,c),b(c,m),b(l,h),b(l,g),b(l,_),b(l,y),b(l,k),b(l,T),b(l,C),b(e,M),b(e,$),E=!0},p(L,N){var F;(!E||N&1)&&a!==(a=(F=L[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&re(u,a),(!E||N&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&re(m,d)},i(L){E||(L&&st(()=>{O||(O=Be(e,Ht,{duration:150},!0)),O.run(1)}),E=!0)},o(L){L&&(O||(O=Be(e,Ht,{duration:150},!1)),O.run(0)),E=!1},d(L){L&&w(e),L&&O&&O.end()}}}function Nm(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$;return i=new _e({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[RO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[jO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"s3.region",$$slots:{default:[HO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[qO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[VO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[zO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),q(i.$$.fragment),s=D(),l=v("div"),q(o.$$.fragment),r=D(),a=v("div"),q(u.$$.fragment),f=D(),c=v("div"),q(d.$$.fragment),m=D(),h=v("div"),q(g.$$.fragment),_=D(),y=v("div"),q(k.$$.fragment),T=D(),C=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(h,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(O,E){S(O,e,E),b(e,t),j(i,t,null),b(e,s),b(e,l),j(o,l,null),b(e,r),b(e,a),j(u,a,null),b(e,f),b(e,c),j(d,c,null),b(e,m),b(e,h),j(g,h,null),b(e,_),b(e,y),j(k,y,null),b(e,T),b(e,C),$=!0},p(O,E){const I={};E&100663298&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&100663298&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&100663298&&(N.$$scope={dirty:E,ctx:O}),u.$set(N);const F={};E&100663298&&(F.$$scope={dirty:E,ctx:O}),d.$set(F);const W={};E&100663298&&(W.$$scope={dirty:E,ctx:O}),g.$set(W);const Z={};E&100663298&&(Z.$$scope={dirty:E,ctx:O}),k.$set(Z)},i(O){$||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(k.$$.fragment,O),O&&st(()=>{M||(M=Be(e,Ht,{duration:150},!0)),M.run(1)}),$=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(g.$$.fragment,O),P(k.$$.fragment,O),O&&(M||(M=Be(e,Ht,{duration:150},!1)),M.run(0)),$=!1},d(O){O&&w(e),H(i),H(o),H(u),H(d),H(g),H(k),O&&M&&M.end()}}}function RO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Endpoint"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.endpoint),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&de(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function jO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Bucket"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.bucket),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&de(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function HO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Region"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.region),r||(a=K(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&de(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function qO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Access key"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.accessKey),r||(a=K(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&de(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function VO(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new nu({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=B("Secret"),s=D(),q(l.$$.fragment),p(e,"for",i=n[25])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&33554432&&i!==(i=f[25]))&&p(e,"for",i);const d={};c&33554432&&(d.id=f[25]),!o&&c&2&&(o=!0,d.value=f[1].s3.secret,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function zO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[25])},m(c,d){S(c,e,d),e.checked=n[1].s3.forcePathStyle,S(c,i,d),S(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[K(e,"change",n[17]),Pe(Ye.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&33554432&&t!==(t=c[25])&&p(e,"id",t),d&2&&(e.checked=c[1].s3.forcePathStyle),d&33554432&&a!==(a=c[25])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function Fm(n){let e;function t(l,o){return l[4]?WO:l[5]?UO:BO}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function BO(n){let e;return{c(){e=v("div"),e.innerHTML=` S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function UO(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Pe(t=Ye.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&zt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function WO(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Rm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),b(e,t),i||(s=K(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function YO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_;const y=[NO,LO],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=B(n[7]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`

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

    -

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

    `,c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(C,r,M),S(C,a,M),b(a,u),b(u,f),b(u,c),k[d].m(u,null),h=!0,g||(_=K(u,"submit",pt(n[20])),g=!0)},p(C,M){(!h||M&128)&&re(o,C[7]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,_()}}}function KO(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[YO]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}const lo="s3_test_request";function JO(n,e,t){let i,s,l;Je(n,St,F=>t(7,l=F)),Yt(St,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;m();async function m(){t(2,a=!0);try{const F=await he.settings.getAll()||{};g(F)}catch(F){he.errorResponseHandler(F)}t(2,a=!1)}async function h(){if(!(u||!s)){t(3,u=!0);try{he.cancelRequest(lo);const F=await he.settings.update(V.filterRedactedProps(r));Vn({}),await g(F),Ca(),c?nv("Successfully saved but failed to establish S3 connection."):Vt("Successfully saved files storage settings.")}catch(F){he.errorResponseHandler(F)}t(3,u=!1)}}async function g(F={}){t(1,r={s3:(F==null?void 0:F.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await y()}async function _(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await y()}async function y(){if(t(5,c=null),!!r.s3.enabled){he.cancelRequest(lo),clearTimeout(d),d=setTimeout(()=>{he.cancelRequest(lo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await he.settings.testS3({$cancelKey:lo})}catch(F){t(5,c=F)}t(4,f=!1),clearTimeout(d)}}nn(()=>()=>{clearTimeout(d)});function k(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function $(){r.s3.accessKey=this.value,t(1,r)}function O(F){n.$$.not_equal(r.s3.secret,F)&&(r.s3.secret=F,t(1,r))}function E(){r.s3.forcePathStyle=this.checked,t(1,r)}const I=()=>_(),L=()=>h(),N=()=>h();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,h,_,i,k,T,C,M,$,O,E,I,L,N]}class ZO extends ye{constructor(e){super(),ve(this,e,JO,KO,be,{})}}function GO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function XO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Client ID"),s=D(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].clientId),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&ce(l,u[0].clientId)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function QO(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new nu({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=B("Client Secret"),s=D(),q(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function jm(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=Kt(o,r(n)),ie.push(()=>ke(t,"config",l))),{c(){e=v("div"),t&&q(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&j(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],we(()=>i=!1)),o!==(o=a[4])){if(t){pe();const c=t;P(c.$$.fragment,1,0,()=>{H(c,1)}),me()}o?(t=Kt(o,r(a)),ie.push(()=>ke(t,"config",l)),q(t.$$.fragment),A(t.$$.fragment,1),j(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&H(t)}}}function xO(n){let e,t,i,s,l,o,r,a,u,f,c,d;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[GO,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[XO,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[QO,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let m=n[4]&&jm(n);return{c(){q(e.$$.fragment),t=D(),i=v("div"),s=v("div"),l=D(),o=v("div"),q(r.$$.fragment),a=D(),u=v("div"),q(f.$$.fragment),c=D(),m&&m.c(),p(s,"class","col-12 spacing"),p(o,"class","col-lg-6"),p(u,"class","col-lg-6"),p(i,"class","grid")},m(h,g){j(e,h,g),S(h,t,g),S(h,i,g),b(i,s),b(i,l),b(i,o),j(r,o,null),b(i,a),b(i,u),j(f,u,null),b(i,c),m&&m.m(i,null),d=!0},p(h,g){const _={};g&2&&(_.name=h[1]+".enabled"),g&3145729&&(_.$$scope={dirty:g,ctx:h}),e.$set(_);const y={};g&2&&(y.name=h[1]+".clientId"),g&3145729&&(y.$$scope={dirty:g,ctx:h}),r.$set(y);const k={};g&2&&(k.name=h[1]+".clientSecret"),g&3145729&&(k.$$scope={dirty:g,ctx:h}),f.$set(k),h[4]?m?(m.p(h,g),g&16&&A(m,1)):(m=jm(h),m.c(),A(m,1),m.m(i,null)):m&&(pe(),P(m,1,1,()=>{m=null}),me())},i(h){d||(A(e.$$.fragment,h),A(r.$$.fragment,h),A(f.$$.fragment,h),A(m),d=!0)},o(h){P(e.$$.fragment,h),P(r.$$.fragment,h),P(f.$$.fragment,h),P(m),d=!1},d(h){H(e,h),h&&w(t),h&&w(i),H(r),H(f),m&&m.d()}}}function Hm(n){let e;return{c(){e=v("i"),p(e,"class",n[3])},m(t,i){S(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&w(e)}}}function qm(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function eE(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function tE(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function nE(n){let e,t,i,s,l,o,r,a,u,f=n[3]&&Hm(n),c=n[6]&&qm();function d(g,_){return g[0].enabled?tE:eE}let m=d(n),h=m(n);return{c(){e=v("div"),f&&f.c(),t=D(),i=v("span"),s=B(n[2]),l=D(),o=v("div"),r=D(),c&&c.c(),a=D(),h.c(),u=Ae(),p(i,"class","txt"),p(e,"class","inline-flex"),p(o,"class","flex-fill")},m(g,_){S(g,e,_),f&&f.m(e,null),b(e,t),b(e,i),b(i,s),S(g,l,_),S(g,o,_),S(g,r,_),c&&c.m(g,_),S(g,a,_),h.m(g,_),S(g,u,_)},p(g,_){g[3]?f?f.p(g,_):(f=Hm(g),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&4&&re(s,g[2]),g[6]?c?_&64&&A(c,1):(c=qm(),c.c(),A(c,1),c.m(a.parentNode,a)):c&&(pe(),P(c,1,1,()=>{c=null}),me()),m!==(m=d(g))&&(h.d(1),h=m(g),h&&(h.c(),h.m(u.parentNode,u)))},d(g){g&&w(e),f&&f.d(),g&&w(l),g&&w(o),g&&w(r),c&&c.d(g),g&&w(a),h.d(g),g&&w(u)}}}function iE(n){let e,t;const i=[n[7]];let s={$$slots:{header:[nE],default:[xO]},$$scope:{ctx:n}};for(let l=0;lt(11,o=E));let{key:r}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{optionsComponent:c}=e,d;function m(){d==null||d.expand()}function h(){d==null||d.collapse()}function g(){d==null||d.collapseSiblings()}function _(){f.enabled=this.checked,t(0,f)}function y(){f.clientId=this.value,t(0,f)}function k(E){n.$$.not_equal(f.clientSecret,E)&&(f.clientSecret=E,t(0,f))}function T(E){f=E,t(0,f)}function C(E){ie[E?"unshift":"push"](()=>{d=E,t(5,d)})}function M(E){We.call(this,n,E)}function $(E){We.call(this,n,E)}function O(E){We.call(this,n,E)}return n.$$set=E=>{e=Xe(Xe({},e),Gn(E)),t(7,l=At(e,s)),"key"in E&&t(1,r=E.key),"title"in E&&t(2,a=E.title),"icon"in E&&t(3,u=E.icon),"config"in E&&t(0,f=E.config),"optionsComponent"in E&&t(4,c=E.optionsComponent)},n.$$.update=()=>{n.$$.dirty&2050&&t(6,i=!V.isEmpty(V.getNestedVal(o,r))),n.$$.dirty&3&&(f.enabled||Ts(r))},[f,r,a,u,c,d,i,l,m,h,g,o,_,y,k,T,C,M,$,O]}class lE extends ye{constructor(e){super(),ve(this,e,sE,iE,be,{key:1,title:2,icon:3,config:0,optionsComponent:4,expand:8,collapse:9,collapseSiblings:10})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}get collapseSiblings(){return this.$$.ctx[10]}}function Vm(n,e,t){const i=n.slice();return i[15]=e[t][0],i[16]=e[t][1],i[17]=e,i[18]=t,i}function oE(n){let e,t,i,s,l,o,r,a,u,f,c=Object.entries(vl),d=[];for(let g=0;gP(d[g],1,1,()=>{d[g]=null});let h=n[4]&&Bm(n);return{c(){e=v("div");for(let g=0;gn[10](e,t),o=()=>n[10](null,t);function r(u){n[11](u,n[15])}let a={single:!0,key:n[15],title:n[16].title,icon:n[16].icon||"ri-fingerprint-line",optionsComponent:n[16].optionsComponent};return n[0][n[15]]!==void 0&&(a.config=n[0][n[15]]),e=new lE({props:a}),l(),ie.push(()=>ke(e,"config",r)),{c(){q(e.$$.fragment)},m(u,f){j(e,u,f),s=!0},p(u,f){n=u,t!==n[15]&&(o(),t=n[15],l());const c={};!i&&f&1&&(i=!0,c.config=n[0][n[15]],we(()=>i=!1)),e.$set(c)},i(u){s||(A(e.$$.fragment,u),s=!0)},o(u){P(e.$$.fragment,u),s=!1},d(u){o(),H(e,u)}}}function Bm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),b(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function aE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_;const y=[rE,oE],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=B(n[5]),r=D(),a=v("div"),u=v("form"),f=v("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(C,r,M),S(C,a,M),b(a,u),b(u,f),b(u,c),k[d].m(u,null),h=!0,g||(_=K(u,"submit",pt(n[6])),g=!0)},p(C,M){(!h||M&32)&&re(o,C[5]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,_()}}}function uE(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[aE]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&524351&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function fE(n,e,t){let i,s,l;Je(n,St,k=>t(5,l=k)),Yt(St,l="Auth providers",l);let o={},r={},a={},u=!1,f=!1;c();async function c(){t(2,u=!0);try{const k=await he.settings.getAll()||{};m(k)}catch(k){he.errorResponseHandler(k)}t(2,u=!1)}async function d(){var k;if(!(f||!s)){t(3,f=!0);try{const T=await he.settings.update(V.filterRedactedProps(a));m(T),Vn({}),(k=o[Object.keys(o)[0]])==null||k.collapseSiblings(),Vt("Successfully updated auth providers.")}catch(T){he.errorResponseHandler(T)}t(3,f=!1)}}function m(k){k=k||{},t(0,a={});for(const T in vl)t(0,a[T]=Object.assign({enabled:!1},k[T]),a);t(8,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(k,T){ie[k?"unshift":"push"](()=>{o[T]=k,t(1,o)})}function _(k,T){n.$$.not_equal(a[T],k)&&(a[T]=k,t(0,a))}const y=()=>h();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(4,s=i!=JSON.stringify(a))},[a,o,u,f,s,l,d,h,r,i,g,_,y]}class cE extends ye{constructor(e){super(),ve(this,e,fE,uE,be,{})}}function Um(n,e,t){const i=n.slice();return i[16]=e[t],i[17]=e,i[18]=t,i}function dE(n){let e=[],t=new Map,i,s,l,o,r,a,u,f,c,d,m,h=n[5];const g=y=>y[16].key;for(let y=0;y({19:l}),({uniqueId:l})=>l?524288:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o&1572865&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function Ym(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),b(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function hE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_;const y=[pE,dE],k=[];function T(C,M){return C[1]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=B(n[4]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(C,r,M),S(C,a,M),b(a,u),b(u,f),b(u,c),k[d].m(u,null),h=!0,g||(_=K(u,"submit",pt(n[6])),g=!0)},p(C,M){(!h||M&16)&&re(o,C[4]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,_()}}}function gE(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[hE]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&1048607&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function _E(n,e,t){let i,s,l;Je(n,St,T=>t(4,l=T));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];Yt(St,l="Token options",l);let r={},a={},u=!1,f=!1;c();async function c(){t(1,u=!0);try{const T=await he.settings.getAll()||{};m(T)}catch(T){he.errorResponseHandler(T)}t(1,u=!1)}async function d(){if(!(f||!s)){t(2,f=!0);try{const T=await he.settings.update(V.filterRedactedProps(a));m(T),Vt("Successfully saved tokens options.")}catch(T){he.errorResponseHandler(T)}t(2,f=!1)}}function m(T){var C;T=T||{},t(0,a={});for(const M of o)t(0,a[M.key]={duration:((C=T[M.key])==null?void 0:C.duration)||0},a);t(8,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(T){a[T.key].duration=ht(this.value),t(0,a)}const _=T=>{a[T.key].secret?(delete a[T.key].secret,t(0,a)):t(0,a[T.key].secret=V.randomString(50),a)},y=()=>h(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(3,s=i!=JSON.stringify(a))},[a,u,f,s,l,o,d,h,r,i,g,_,y,k]}class bE extends ye{constructor(e){super(),ve(this,e,_E,gE,be,{})}}function vE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h;return o=new x_({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in +

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

    `,c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(C,r,M),S(C,a,M),b(a,u),b(u,f),b(u,c),k[d].m(u,null),h=!0,g||(_=K(u,"submit",pt(n[20])),g=!0)},p(C,M){(!h||M&128)&&re(o,C[7]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,_()}}}function KO(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[YO]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}const lo="s3_test_request";function JO(n,e,t){let i,s,l;Je(n,St,F=>t(7,l=F)),Yt(St,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;m();async function m(){t(2,a=!0);try{const F=await he.settings.getAll()||{};g(F)}catch(F){he.errorResponseHandler(F)}t(2,a=!1)}async function h(){if(!(u||!s)){t(3,u=!0);try{he.cancelRequest(lo);const F=await he.settings.update(V.filterRedactedProps(r));Vn({}),await g(F),Ca(),c?nv("Successfully saved but failed to establish S3 connection."):Vt("Successfully saved files storage settings.")}catch(F){he.errorResponseHandler(F)}t(3,u=!1)}}async function g(F={}){t(1,r={s3:(F==null?void 0:F.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await y()}async function _(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await y()}async function y(){if(t(5,c=null),!!r.s3.enabled){he.cancelRequest(lo),clearTimeout(d),d=setTimeout(()=>{he.cancelRequest(lo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await he.settings.testS3({$cancelKey:lo})}catch(F){t(5,c=F)}t(4,f=!1),clearTimeout(d)}}nn(()=>()=>{clearTimeout(d)});function k(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function $(){r.s3.accessKey=this.value,t(1,r)}function O(F){n.$$.not_equal(r.s3.secret,F)&&(r.s3.secret=F,t(1,r))}function E(){r.s3.forcePathStyle=this.checked,t(1,r)}const I=()=>_(),L=()=>h(),N=()=>h();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,h,_,i,k,T,C,M,$,O,E,I,L,N]}class ZO extends ye{constructor(e){super(),ve(this,e,JO,KO,be,{})}}function GO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),b(s,l),r||(a=K(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function XO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Client ID"),s=D(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),b(e,t),S(u,s,f),S(u,l,f),de(l,n[0].clientId),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&de(l,u[0].clientId)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function QO(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new nu({props:u}),ie.push(()=>ke(l,"value",a)),{c(){e=v("label"),t=B("Client Secret"),s=D(),q(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){S(f,e,c),b(e,t),S(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function jm(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=Kt(o,r(n)),ie.push(()=>ke(t,"config",l))),{c(){e=v("div"),t&&q(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&j(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],we(()=>i=!1)),o!==(o=a[4])){if(t){pe();const c=t;P(c.$$.fragment,1,0,()=>{H(c,1)}),me()}o?(t=Kt(o,r(a)),ie.push(()=>ke(t,"config",l)),q(t.$$.fragment),A(t.$$.fragment,1),j(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&H(t)}}}function xO(n){let e,t,i,s,l,o,r,a,u,f,c,d;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[GO,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[XO,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[QO,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let m=n[4]&&jm(n);return{c(){q(e.$$.fragment),t=D(),i=v("div"),s=v("div"),l=D(),o=v("div"),q(r.$$.fragment),a=D(),u=v("div"),q(f.$$.fragment),c=D(),m&&m.c(),p(s,"class","col-12 spacing"),p(o,"class","col-lg-6"),p(u,"class","col-lg-6"),p(i,"class","grid")},m(h,g){j(e,h,g),S(h,t,g),S(h,i,g),b(i,s),b(i,l),b(i,o),j(r,o,null),b(i,a),b(i,u),j(f,u,null),b(i,c),m&&m.m(i,null),d=!0},p(h,g){const _={};g&2&&(_.name=h[1]+".enabled"),g&3145729&&(_.$$scope={dirty:g,ctx:h}),e.$set(_);const y={};g&2&&(y.name=h[1]+".clientId"),g&3145729&&(y.$$scope={dirty:g,ctx:h}),r.$set(y);const k={};g&2&&(k.name=h[1]+".clientSecret"),g&3145729&&(k.$$scope={dirty:g,ctx:h}),f.$set(k),h[4]?m?(m.p(h,g),g&16&&A(m,1)):(m=jm(h),m.c(),A(m,1),m.m(i,null)):m&&(pe(),P(m,1,1,()=>{m=null}),me())},i(h){d||(A(e.$$.fragment,h),A(r.$$.fragment,h),A(f.$$.fragment,h),A(m),d=!0)},o(h){P(e.$$.fragment,h),P(r.$$.fragment,h),P(f.$$.fragment,h),P(m),d=!1},d(h){H(e,h),h&&w(t),h&&w(i),H(r),H(f),m&&m.d()}}}function Hm(n){let e;return{c(){e=v("i"),p(e,"class",n[3])},m(t,i){S(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&w(e)}}}function qm(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&st(()=>{t||(t=Be(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=Be(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function eE(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function tE(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function nE(n){let e,t,i,s,l,o,r,a,u,f=n[3]&&Hm(n),c=n[6]&&qm();function d(g,_){return g[0].enabled?tE:eE}let m=d(n),h=m(n);return{c(){e=v("div"),f&&f.c(),t=D(),i=v("span"),s=B(n[2]),l=D(),o=v("div"),r=D(),c&&c.c(),a=D(),h.c(),u=Ae(),p(i,"class","txt"),p(e,"class","inline-flex"),p(o,"class","flex-fill")},m(g,_){S(g,e,_),f&&f.m(e,null),b(e,t),b(e,i),b(i,s),S(g,l,_),S(g,o,_),S(g,r,_),c&&c.m(g,_),S(g,a,_),h.m(g,_),S(g,u,_)},p(g,_){g[3]?f?f.p(g,_):(f=Hm(g),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&4&&re(s,g[2]),g[6]?c?_&64&&A(c,1):(c=qm(),c.c(),A(c,1),c.m(a.parentNode,a)):c&&(pe(),P(c,1,1,()=>{c=null}),me()),m!==(m=d(g))&&(h.d(1),h=m(g),h&&(h.c(),h.m(u.parentNode,u)))},d(g){g&&w(e),f&&f.d(),g&&w(l),g&&w(o),g&&w(r),c&&c.d(g),g&&w(a),h.d(g),g&&w(u)}}}function iE(n){let e,t;const i=[n[7]];let s={$$slots:{header:[nE],default:[xO]},$$scope:{ctx:n}};for(let l=0;lt(11,o=E));let{key:r}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{optionsComponent:c}=e,d;function m(){d==null||d.expand()}function h(){d==null||d.collapse()}function g(){d==null||d.collapseSiblings()}function _(){f.enabled=this.checked,t(0,f)}function y(){f.clientId=this.value,t(0,f)}function k(E){n.$$.not_equal(f.clientSecret,E)&&(f.clientSecret=E,t(0,f))}function T(E){f=E,t(0,f)}function C(E){ie[E?"unshift":"push"](()=>{d=E,t(5,d)})}function M(E){We.call(this,n,E)}function $(E){We.call(this,n,E)}function O(E){We.call(this,n,E)}return n.$$set=E=>{e=Xe(Xe({},e),Gn(E)),t(7,l=At(e,s)),"key"in E&&t(1,r=E.key),"title"in E&&t(2,a=E.title),"icon"in E&&t(3,u=E.icon),"config"in E&&t(0,f=E.config),"optionsComponent"in E&&t(4,c=E.optionsComponent)},n.$$.update=()=>{n.$$.dirty&2050&&t(6,i=!V.isEmpty(V.getNestedVal(o,r))),n.$$.dirty&3&&(f.enabled||Ts(r))},[f,r,a,u,c,d,i,l,m,h,g,o,_,y,k,T,C,M,$,O]}class lE extends ye{constructor(e){super(),ve(this,e,sE,iE,be,{key:1,title:2,icon:3,config:0,optionsComponent:4,expand:8,collapse:9,collapseSiblings:10})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}get collapseSiblings(){return this.$$.ctx[10]}}function Vm(n,e,t){const i=n.slice();return i[15]=e[t][0],i[16]=e[t][1],i[17]=e,i[18]=t,i}function oE(n){let e,t,i,s,l,o,r,a,u,f,c=Object.entries(vl),d=[];for(let g=0;gP(d[g],1,1,()=>{d[g]=null});let h=n[4]&&Bm(n);return{c(){e=v("div");for(let g=0;gn[10](e,t),o=()=>n[10](null,t);function r(u){n[11](u,n[15])}let a={single:!0,key:n[15],title:n[16].title,icon:n[16].icon||"ri-fingerprint-line",optionsComponent:n[16].optionsComponent};return n[0][n[15]]!==void 0&&(a.config=n[0][n[15]]),e=new lE({props:a}),l(),ie.push(()=>ke(e,"config",r)),{c(){q(e.$$.fragment)},m(u,f){j(e,u,f),s=!0},p(u,f){n=u,t!==n[15]&&(o(),t=n[15],l());const c={};!i&&f&1&&(i=!0,c.config=n[0][n[15]],we(()=>i=!1)),e.$set(c)},i(u){s||(A(e.$$.fragment,u),s=!0)},o(u){P(e.$$.fragment,u),s=!1},d(u){o(),H(e,u)}}}function Bm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),b(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function aE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_;const y=[rE,oE],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=B(n[5]),r=D(),a=v("div"),u=v("form"),f=v("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(C,r,M),S(C,a,M),b(a,u),b(u,f),b(u,c),k[d].m(u,null),h=!0,g||(_=K(u,"submit",pt(n[6])),g=!0)},p(C,M){(!h||M&32)&&re(o,C[5]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,_()}}}function uE(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[aE]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&524351&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function fE(n,e,t){let i,s,l;Je(n,St,k=>t(5,l=k)),Yt(St,l="Auth providers",l);let o={},r={},a={},u=!1,f=!1;c();async function c(){t(2,u=!0);try{const k=await he.settings.getAll()||{};m(k)}catch(k){he.errorResponseHandler(k)}t(2,u=!1)}async function d(){var k;if(!(f||!s)){t(3,f=!0);try{const T=await he.settings.update(V.filterRedactedProps(a));m(T),Vn({}),(k=o[Object.keys(o)[0]])==null||k.collapseSiblings(),Vt("Successfully updated auth providers.")}catch(T){he.errorResponseHandler(T)}t(3,f=!1)}}function m(k){k=k||{},t(0,a={});for(const T in vl)t(0,a[T]=Object.assign({enabled:!1},k[T]),a);t(8,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(k,T){ie[k?"unshift":"push"](()=>{o[T]=k,t(1,o)})}function _(k,T){n.$$.not_equal(a[T],k)&&(a[T]=k,t(0,a))}const y=()=>h();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(4,s=i!=JSON.stringify(a))},[a,o,u,f,s,l,d,h,r,i,g,_,y]}class cE extends ye{constructor(e){super(),ve(this,e,fE,uE,be,{})}}function Um(n,e,t){const i=n.slice();return i[16]=e[t],i[17]=e,i[18]=t,i}function dE(n){let e=[],t=new Map,i,s,l,o,r,a,u,f,c,d,m,h=n[5];const g=y=>y[16].key;for(let y=0;y({19:l}),({uniqueId:l})=>l?524288:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ae(),q(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o&1572865&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function Ym(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),b(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function hE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_;const y=[pE,dE],k=[];function T(C,M){return C[1]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=B(n[4]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(C,r,M),S(C,a,M),b(a,u),b(u,f),b(u,c),k[d].m(u,null),h=!0,g||(_=K(u,"submit",pt(n[6])),g=!0)},p(C,M){(!h||M&16)&&re(o,C[4]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,_()}}}function gE(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[hE]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&1048607&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function _E(n,e,t){let i,s,l;Je(n,St,T=>t(4,l=T));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];Yt(St,l="Token options",l);let r={},a={},u=!1,f=!1;c();async function c(){t(1,u=!0);try{const T=await he.settings.getAll()||{};m(T)}catch(T){he.errorResponseHandler(T)}t(1,u=!1)}async function d(){if(!(f||!s)){t(2,f=!0);try{const T=await he.settings.update(V.filterRedactedProps(a));m(T),Vt("Successfully saved tokens options.")}catch(T){he.errorResponseHandler(T)}t(2,f=!1)}}function m(T){var C;T=T||{},t(0,a={});for(const M of o)t(0,a[M.key]={duration:((C=T[M.key])==null?void 0:C.duration)||0},a);t(8,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(T){a[T.key].duration=ht(this.value),t(0,a)}const _=T=>{a[T.key].secret?(delete a[T.key].secret,t(0,a)):t(0,a[T.key].secret=V.randomString(50),a)},y=()=>h(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(3,s=i!=JSON.stringify(a))},[a,u,f,s,l,o,d,h,r,i,g,_,y,k]}class bE extends ye{constructor(e){super(),ve(this,e,_E,gE,be,{})}}function vE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h;return o=new x_({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

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

    `,t=D(),i=v("div"),s=v("button"),s.innerHTML='Copy',l=D(),q(o.$$.fragment),r=D(),a=v("div"),u=v("div"),f=D(),c=v("button"),c.innerHTML=` Download as JSON`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(g,_){S(g,e,_),S(g,t,_),S(g,i,_),b(i,s),b(i,l),j(o,i,null),n[8](i),S(g,r,_),S(g,a,_),b(a,u),b(a,f),b(a,c),d=!0,m||(h=[K(s,"click",n[7]),K(i,"keydown",n[9]),K(c,"click",n[10])],m=!0)},p(g,_){const y={};_&4&&(y.content=g[2]),o.$set(y)},i(g){d||(A(o.$$.fragment,g),d=!0)},o(g){P(o.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(t),g&&w(i),H(o),n[8](null),g&&w(r),g&&w(a),m=!1,Le(h)}}}function yE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function kE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[yE,vE],h=[];function g(_,y){return _[1]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=B(n[3]),r=D(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(_,y){S(_,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(_,r,y),S(_,a,y),b(a,u),h[f].m(u,null),d=!0},p(_,y){(!d||y&8)&&re(o,_[3]);let k=f;f=g(_),f===k?h[f].p(_,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),me(),c=h[f],c?c.p(_,y):(c=h[f]=m[f](_),c.c()),A(c,1),c.m(u,null))},i(_){d||(A(c),d=!0)},o(_){P(c),d=!1},d(_){_&&w(e),_&&w(r),_&&w(a),h[f].d()}}}function wE(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[kE]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function SE(n,e,t){let i,s;Je(n,St,_=>t(3,s=_)),Yt(St,s="Export collections",s);const l="export_"+V.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await he.collections.getFullList(100,{$cancelKey:l}));for(let _ of r)delete _.created,delete _.updated}catch(_){he.errorResponseHandler(_)}t(1,a=!1)}function f(){V.downloadJson(r,"pb_schema")}function c(){V.copyToClipboard(i),Qg("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function m(_){ie[_?"unshift":"push"](()=>{o=_,t(0,o)})}const h=_=>{if(_.ctrlKey&&_.code==="KeyA"){_.preventDefault();const y=window.getSelection(),k=document.createRange();k.selectNodeContents(o),y.removeAllRanges(),y.addRange(k)}},g=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,m,h,g]}class TE extends ye{constructor(e){super(),ve(this,e,SE,wE,be,{})}}function Km(n,e,t){const i=n.slice();return i[14]=e[t],i}function Jm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Zm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Gm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function Xm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function xm(n,e,t){const i=n.slice();return i[30]=e[t],i}function CE(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&eh(),a=n[0].name!==n[1].name&&th(n);return{c(){e=v("div"),r&&r.c(),t=D(),a&&a.c(),i=D(),s=v("strong"),o=B(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),b(e,t),a&&a.m(e,null),b(e,i),b(e,s),b(s,o)},p(u,f){u[9]?r||(r=eh(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=th(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&re(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function $E(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=D(),i=v("strong"),l=B(s),p(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),b(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function ME(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=D(),i=v("strong"),l=B(s),p(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),b(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function eh(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function th(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=B(t),s=D(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),b(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&re(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function nh(n){var _,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((_=n[0])==null?void 0:_[n[30]])+"",f,c,d,m,h=n[12]((y=n[1])==null?void 0:y[n[30]])+"",g;return{c(){var k,T,C,M,$,O;e=v("tr"),t=v("td"),i=v("span"),l=B(s),o=D(),r=v("td"),a=v("pre"),f=B(u),c=D(),d=v("td"),m=v("pre"),g=B(h),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),Q(r,"changed-old-col",!n[10]&&rn((k=n[0])==null?void 0:k[n[30]],(T=n[1])==null?void 0:T[n[30]])),Q(r,"changed-none-col",n[10]),p(m,"class","txt"),p(d,"class","svelte-lmkr38"),Q(d,"changed-new-col",!n[5]&&rn((C=n[0])==null?void 0:C[n[30]],(M=n[1])==null?void 0:M[n[30]])),Q(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),Q(e,"txt-primary",rn(($=n[0])==null?void 0:$[n[30]],(O=n[1])==null?void 0:O[n[30]]))},m(k,T){S(k,e,T),b(e,t),b(t,i),b(i,l),b(e,o),b(e,r),b(r,a),b(a,f),b(e,c),b(e,d),b(d,m),b(m,g)},p(k,T){var C,M,$,O,E,I,L,N;T[0]&1&&u!==(u=k[12]((C=k[0])==null?void 0:C[k[30]])+"")&&re(f,u),T[0]&3075&&Q(r,"changed-old-col",!k[10]&&rn((M=k[0])==null?void 0:M[k[30]],($=k[1])==null?void 0:$[k[30]])),T[0]&1024&&Q(r,"changed-none-col",k[10]),T[0]&2&&h!==(h=k[12]((O=k[1])==null?void 0:O[k[30]])+"")&&re(g,h),T[0]&2083&&Q(d,"changed-new-col",!k[5]&&rn((E=k[0])==null?void 0:E[k[30]],(I=k[1])==null?void 0:I[k[30]])),T[0]&32&&Q(d,"changed-none-col",k[5]),T[0]&2051&&Q(e,"txt-primary",rn((L=k[0])==null?void 0:L[k[30]],(N=k[1])==null?void 0:N[k[30]]))},d(k){k&&w(e)}}}function ih(n){let e,t=n[6],i=[];for(let s=0;sProps Old New`,l=D(),o=v("tbody");for(let C=0;C!["schema","created","updated"].includes(y));function g(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(k=>y.id==k.id))))}function _(y){return typeof y>"u"?"":V.isObject(y)?JSON.stringify(y,null,4):y}return n.$$set=y=>{"collectionA"in y&&t(0,o=y.collectionA),"collectionB"in y&&t(1,r=y.collectionB),"deleteMissing"in y&&t(2,a=y.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&g(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(k=>y.id==k.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(k=>k.id==y.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(y=>!u.find(k=>k.id==y.id))),n.$$.dirty[0]&7&&t(9,l=V.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,m,l,s,h,_]}class EE extends ye{constructor(e){super(),ve(this,e,OE,DE,be,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function ch(n,e,t){const i=n.slice();return i[17]=e[t],i}function dh(n){let e,t;return e=new EE({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){q(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function AE(n){let e,t,i=n[2],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{h()}):h()}async function h(){if(!u){t(4,u=!0);try{await he.collections.import(o,a),Vt("Successfully imported collections configuration."),i("submit")}catch(C){he.errorResponseHandler(C)}t(4,u=!1),c()}}const g=()=>m(),_=()=>!u;function y(C){ie[C?"unshift":"push"](()=>{s=C,t(1,s)})}function k(C){We.call(this,n,C)}function T(C){We.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,m,f,l,o,g,_,y,k,T]}class FE extends ye{constructor(e){super(),ve(this,e,NE,LE,be,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function ph(n,e,t){const i=n.slice();return i[32]=e[t],i}function mh(n,e,t){const i=n.slice();return i[35]=e[t],i}function hh(n,e,t){const i=n.slice();return i[32]=e[t],i}function RE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k,T,C,M,$,O;a=new _e({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[HE,({uniqueId:W})=>({40:W}),({uniqueId:W})=>[0,W?512:0]]},$$scope:{ctx:n}}});let E=!1,I=n[6]&&n[1].length&&!n[7]&&_h(),L=n[6]&&n[1].length&&n[7]&&bh(n),N=n[13].length&&Oh(n),F=!!n[0]&&Eh(n);return{c(){e=v("input"),t=D(),i=v("div"),s=v("p"),l=B(`Paste below the collections configuration you want to import or - `),o=v("button"),o.innerHTML='Load from JSON file',r=D(),q(a.$$.fragment),u=D(),f=D(),I&&I.c(),c=D(),L&&L.c(),d=D(),N&&N.c(),m=D(),h=v("div"),F&&F.c(),g=D(),_=v("div"),y=D(),k=v("button"),T=v("span"),T.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),Q(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(_,"class","flex-fill"),p(T,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(h,"class","flex m-t-base")},m(W,Z){S(W,e,Z),n[19](e),S(W,t,Z),S(W,i,Z),b(i,s),b(s,l),b(s,o),S(W,r,Z),j(a,W,Z),S(W,u,Z),S(W,f,Z),I&&I.m(W,Z),S(W,c,Z),L&&L.m(W,Z),S(W,d,Z),N&&N.m(W,Z),S(W,m,Z),S(W,h,Z),F&&F.m(h,null),b(h,g),b(h,_),b(h,y),b(h,k),b(k,T),M=!0,$||(O=[K(e,"change",n[20]),K(o,"click",n[21]),K(k,"click",n[26])],$=!0)},p(W,Z){(!M||Z[0]&4096)&&Q(o,"btn-loading",W[12]);const ne={};Z[0]&64&&(ne.class="form-field "+(W[6]?"":"field-error")),Z[0]&65|Z[1]&1536&&(ne.$$scope={dirty:Z,ctx:W}),a.$set(ne),W[6]&&W[1].length&&!W[7]?I||(I=_h(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),W[6]&&W[1].length&&W[7]?L?L.p(W,Z):(L=bh(W),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),W[13].length?N?N.p(W,Z):(N=Oh(W),N.c(),N.m(m.parentNode,m)):N&&(N.d(1),N=null),W[0]?F?F.p(W,Z):(F=Eh(W),F.c(),F.m(h,g)):F&&(F.d(1),F=null),(!M||Z[0]&16384&&C!==(C=!W[14]))&&(k.disabled=C)},i(W){M||(A(a.$$.fragment,W),A(E),M=!0)},o(W){P(a.$$.fragment,W),P(E),M=!1},d(W){W&&w(e),n[19](null),W&&w(t),W&&w(i),W&&w(r),H(a,W),W&&w(u),W&&w(f),I&&I.d(W),W&&w(c),L&&L.d(W),W&&w(d),N&&N.d(W),W&&w(m),W&&w(h),F&&F.d(),$=!1,Le(O)}}}function jE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function gh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function HE(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&gh();return{c(){e=v("label"),t=B("Collections"),s=D(),l=v("textarea"),r=D(),c&&c.c(),a=Ae(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,m){S(d,e,m),b(e,t),S(d,s,m),S(d,l,m),ce(l,n[0]),S(d,r,m),c&&c.m(d,m),S(d,a,m),u||(f=K(l,"input",n[22]),u=!0)},p(d,m){m[1]&512&&i!==(i=d[40])&&p(e,"for",i),m[1]&512&&o!==(o=d[40])&&p(l,"id",o),m[0]&1&&ce(l,d[0]),d[0]&&!d[6]?c||(c=gh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function _h(n){let e;return{c(){e=v("div"),e.innerHTML=`
    + `),o=v("button"),o.innerHTML='Load from JSON file',r=D(),q(a.$$.fragment),u=D(),f=D(),I&&I.c(),c=D(),L&&L.c(),d=D(),N&&N.c(),m=D(),h=v("div"),F&&F.c(),g=D(),_=v("div"),y=D(),k=v("button"),T=v("span"),T.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),Q(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(_,"class","flex-fill"),p(T,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(h,"class","flex m-t-base")},m(W,Z){S(W,e,Z),n[19](e),S(W,t,Z),S(W,i,Z),b(i,s),b(s,l),b(s,o),S(W,r,Z),j(a,W,Z),S(W,u,Z),S(W,f,Z),I&&I.m(W,Z),S(W,c,Z),L&&L.m(W,Z),S(W,d,Z),N&&N.m(W,Z),S(W,m,Z),S(W,h,Z),F&&F.m(h,null),b(h,g),b(h,_),b(h,y),b(h,k),b(k,T),M=!0,$||(O=[K(e,"change",n[20]),K(o,"click",n[21]),K(k,"click",n[26])],$=!0)},p(W,Z){(!M||Z[0]&4096)&&Q(o,"btn-loading",W[12]);const ne={};Z[0]&64&&(ne.class="form-field "+(W[6]?"":"field-error")),Z[0]&65|Z[1]&1536&&(ne.$$scope={dirty:Z,ctx:W}),a.$set(ne),W[6]&&W[1].length&&!W[7]?I||(I=_h(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),W[6]&&W[1].length&&W[7]?L?L.p(W,Z):(L=bh(W),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),W[13].length?N?N.p(W,Z):(N=Oh(W),N.c(),N.m(m.parentNode,m)):N&&(N.d(1),N=null),W[0]?F?F.p(W,Z):(F=Eh(W),F.c(),F.m(h,g)):F&&(F.d(1),F=null),(!M||Z[0]&16384&&C!==(C=!W[14]))&&(k.disabled=C)},i(W){M||(A(a.$$.fragment,W),A(E),M=!0)},o(W){P(a.$$.fragment,W),P(E),M=!1},d(W){W&&w(e),n[19](null),W&&w(t),W&&w(i),W&&w(r),H(a,W),W&&w(u),W&&w(f),I&&I.d(W),W&&w(c),L&&L.d(W),W&&w(d),N&&N.d(W),W&&w(m),W&&w(h),F&&F.d(),$=!1,Le(O)}}}function jE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function gh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function HE(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&gh();return{c(){e=v("label"),t=B("Collections"),s=D(),l=v("textarea"),r=D(),c&&c.c(),a=Ae(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,m){S(d,e,m),b(e,t),S(d,s,m),S(d,l,m),de(l,n[0]),S(d,r,m),c&&c.m(d,m),S(d,a,m),u||(f=K(l,"input",n[22]),u=!0)},p(d,m){m[1]&512&&i!==(i=d[40])&&p(e,"for",i),m[1]&512&&o!==(o=d[40])&&p(l,"id",o),m[0]&1&&de(l,d[0]),d[0]&&!d[6]?c||(c=gh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function _h(n){let e;return{c(){e=v("div"),e.innerHTML=`
    Your collections configuration is already up-to-date!
    `,p(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function bh(n){let e,t,i,s,l,o=n[9].length&&vh(n),r=n[4].length&&wh(n),a=n[8].length&&$h(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=D(),i=v("div"),o&&o.c(),s=D(),r&&r.c(),l=D(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),b(i,s),r&&r.m(i,null),b(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=vh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=wh(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=$h(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function vh(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=D(),s=v("div"),s.innerHTML=`Some of the imported collections shares the same name and/or fields but are imported with different IDs. You can replace them in the import if you want - to.`,l=D(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:G,d(u){u&&w(e),r=!1,a()}}}function Eh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function qE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[jE,RE],h=[];function g(_,y){return _[5]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=B(n[15]),r=D(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(_,y){S(_,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(_,r,y),S(_,a,y),b(a,u),h[f].m(u,null),d=!0},p(_,y){(!d||y[0]&32768)&&re(o,_[15]);let k=f;f=g(_),f===k?h[f].p(_,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),me(),c=h[f],c?c.p(_,y):(c=h[f]=m[f](_),c.c()),A(c,1),c.m(u,null))},i(_){d||(A(c),d=!0)},o(_){P(c),d=!1},d(_){_&&w(e),_&&w(r),_&&w(a),h[f].d()}}}function VE(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[qE]},$$scope:{ctx:n}}});let r={};return l=new FE({props:r}),n[27](l),l.$on("submit",n[28]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[27](null),H(l,a)}}}function zE(n,e,t){let i,s,l,o,r,a,u;Je(n,St,z=>t(15,u=z)),Yt(St,u="Import collections",u);let f,c,d="",m=!1,h=[],g=[],_=!0,y=[],k=!1;T();async function T(){t(5,k=!0);try{t(2,g=await he.collections.getFullList(200));for(let z of g)delete z.created,delete z.updated}catch(z){he.errorResponseHandler(z)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let z of h){const X=V.findByKey(g,"id",z.id);!(X!=null&&X.id)||!V.hasCollectionChanges(X,z,_)||y.push({new:z,old:X})}}function M(){t(1,h=[]);try{t(1,h=JSON.parse(d))}catch{}Array.isArray(h)?t(1,h=V.filterDuplicatesByKey(h)):t(1,h=[]);for(let z of h)delete z.created,delete z.updated,z.schema=V.filterDuplicatesByKey(z.schema)}function $(){var z,X;for(let Y of h){const le=V.findByKey(g,"name",Y.name)||V.findByKey(g,"id",Y.id);if(!le)continue;const He=Y.id,Re=le.id;Y.id=Re;const Fe=Array.isArray(le.schema)?le.schema:[],qe=Array.isArray(Y.schema)?Y.schema:[];for(const ge of qe){const Se=V.findByKey(Fe,"name",ge.name);Se&&Se.id&&(ge.id=Se.id)}for(let ge of h)if(Array.isArray(ge.schema))for(let Se of ge.schema)(z=Se.options)!=null&&z.collectionId&&((X=Se.options)==null?void 0:X.collectionId)===He&&(Se.options.collectionId=Re)}t(0,d=JSON.stringify(h,null,4))}function O(z){t(12,m=!0);const X=new FileReader;X.onload=async Y=>{t(12,m=!1),t(10,f.value="",f),t(0,d=Y.target.result),await cn(),h.length||(cl("Invalid collections configuration."),E())},X.onerror=Y=>{console.warn(Y),cl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},X.readAsText(z)}function E(){t(0,d=""),t(10,f.value="",f),Vn({})}function I(z){ie[z?"unshift":"push"](()=>{f=z,t(10,f)})}const L=()=>{f.files.length&&O(f.files[0])},N=()=>{f.click()};function F(){d=this.value,t(0,d)}function W(){_=this.checked,t(3,_)}const Z=()=>$(),ne=()=>E(),J=()=>c==null?void 0:c.show(g,h,_);function te(z){ie[z?"unshift":"push"](()=>{c=z,t(11,c)})}const ee=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&h.length&&h.length===h.filter(z=>!!z.id&&!!z.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(z=>i&&_&&!V.findByKey(h,"id",z.id))),n.$$.dirty[0]&70&&t(8,l=h.filter(z=>i&&!V.findByKey(g,"id",z.id))),n.$$.dirty[0]&10&&(typeof h<"u"||typeof _<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=h.filter(z=>{let X=V.findByKey(g,"name",z.name)||V.findByKey(g,"id",z.id);if(!X)return!1;if(X.id!=z.id)return!0;const Y=Array.isArray(X.schema)?X.schema:[],le=Array.isArray(z.schema)?z.schema:[];for(const He of le){if(V.findByKey(Y,"id",He.id))continue;const Fe=V.findByKey(Y,"name",He.name);if(Fe&&He.id!=Fe.id)return!0}return!1}))},[d,h,g,_,y,k,i,o,l,s,f,c,m,a,r,u,$,O,E,I,L,N,F,W,Z,ne,J,te,ee]}class BE extends ye{constructor(e){super(),ve(this,e,zE,VE,be,{},null,[-1,-1])}}const Pt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Ti("/"):!0}],UE={"/login":Dt({component:HD,conditions:Pt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Dt({asyncComponent:()=>ft(()=>import("./PageAdminRequestPasswordReset-6f4498c0.js"),[],import.meta.url),conditions:Pt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Dt({asyncComponent:()=>ft(()=>import("./PageAdminConfirmPasswordReset-22a6879c.js"),[],import.meta.url),conditions:Pt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Dt({component:uD,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Dt({component:n3,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Dt({component:ZD,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Dt({component:PD,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Dt({component:PO,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Dt({component:ZO,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Dt({component:cE,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Dt({component:bE,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Dt({component:TE,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Dt({component:BE,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-e8d3b713.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-e8d3b713.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-7da4beac.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-7da4beac.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-6bf0e478.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-6bf0e478.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"*":Dt({component:Sv,userData:{showAppSidebar:!1}})};function WE(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=m=>Math.sqrt(m)*120,easing:d=Bo}=i;return{delay:f,duration:zt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(m,h)=>{const g=h*a,_=h*u,y=m+h*e.width/t.width,k=m+h*e.height/t.height;return`transform: ${l} translate(${g}px, ${_}px) scale(${y}, ${k});`}}}function Ah(n,e,t){const i=n.slice();return i[2]=e[t],i}function YE(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function KE(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function JE(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ZE(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Ih(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,m=G,h,g,_;function y(M,$){return M[2].type==="info"?ZE:M[2].type==="success"?JE:M[2].type==="warning"?KE:YE}let k=y(e),T=k(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),T.c(),s=D(),l=v("div"),r=B(o),a=D(),u=v("button"),u.innerHTML='',f=D(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,$){S(M,t,$),b(t,i),T.m(i,null),b(t,s),b(t,l),b(l,r),b(t,a),b(t,u),b(t,f),h=!0,g||(_=K(u,"click",pt(C)),g=!0)},p(M,$){e=M,k!==(k=y(e))&&(T.d(1),T=k(e),T&&(T.c(),T.m(i,null))),(!h||$&1)&&o!==(o=e[2].message+"")&&re(r,o),(!h||$&1)&&Q(t,"alert-info",e[2].type=="info"),(!h||$&1)&&Q(t,"alert-success",e[2].type=="success"),(!h||$&1)&&Q(t,"alert-danger",e[2].type=="error"),(!h||$&1)&&Q(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){Mb(t),m(),Vh(t,d)},a(){m(),m=$b(t,d,WE,{duration:150})},i(M){h||(st(()=>{c||(c=Be(t,yo,{duration:150},!0)),c.run(1)}),h=!0)},o(M){c||(c=Be(t,yo,{duration:150},!1)),c.run(0),h=!1},d(M){M&&w(t),T.d(),M&&c&&c.end(),g=!1,_()}}}function GE(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>xg(l)]}class QE extends ye{constructor(e){super(),ve(this,e,XE,GE,be,{})}}function xE(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=B(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){S(l,e,o),b(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&re(i,t)},d(l){l&&w(e)}}}function eA(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=D(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],Q(s,"btn-loading",n[2])},m(a,u){S(a,e,u),b(e,t),S(a,i,u),S(a,s,u),b(s,l),e.focus(),o||(r=[K(e,"click",n[4]),K(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&Q(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Le(r)}}}function tA(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[eA],header:[xE]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function nA(n,e,t){let i;Je(n,Qa,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){ie[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await cn(),t(3,o=!1),tb()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class iA extends ye{constructor(e){super(),ve(this,e,nA,tA,be,{})}}function Ph(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k;return g=new Qn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[sA]},$$scope:{ctx:n}}}),{c(){var T;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=D(),s=v("nav"),l=v("a"),l.innerHTML='',o=D(),r=v("a"),r.innerHTML='',a=D(),u=v("a"),u.innerHTML='',f=D(),c=v("figure"),d=v("img"),h=D(),q(g.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),Hn(d.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||p(d,"src",m),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(T,C){S(T,e,C),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(e,f),b(e,c),b(c,d),b(c,h),j(g,c,null),_=!0,y||(k=[Pe(Xt.call(null,t)),Pe(Xt.call(null,l)),Pe(Fn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Pe(Ye.call(null,l,{text:"Collections",position:"right"})),Pe(Xt.call(null,r)),Pe(Fn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Pe(Ye.call(null,r,{text:"Logs",position:"right"})),Pe(Xt.call(null,u)),Pe(Fn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Pe(Ye.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p(T,C){var $;(!_||C&1&&!Hn(d.src,m="./images/avatars/avatar"+((($=T[0])==null?void 0:$.avatar)||0)+".svg"))&&p(d,"src",m);const M={};C&1024&&(M.$$scope={dirty:C,ctx:T}),g.$set(M)},i(T){_||(A(g.$$.fragment,T),_=!0)},o(T){P(g.$$.fragment,T),_=!1},d(T){T&&w(e),H(g),y=!1,Le(k)}}}function sA(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` + to.`,l=D(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:G,d(u){u&&w(e),r=!1,a()}}}function Eh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function qE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[jE,RE],h=[];function g(_,y){return _[5]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=B(n[15]),r=D(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(_,y){S(_,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),S(_,r,y),S(_,a,y),b(a,u),h[f].m(u,null),d=!0},p(_,y){(!d||y[0]&32768)&&re(o,_[15]);let k=f;f=g(_),f===k?h[f].p(_,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),me(),c=h[f],c?c.p(_,y):(c=h[f]=m[f](_),c.c()),A(c,1),c.m(u,null))},i(_){d||(A(c),d=!0)},o(_){P(c),d=!1},d(_){_&&w(e),_&&w(r),_&&w(a),h[f].d()}}}function VE(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[qE]},$$scope:{ctx:n}}});let r={};return l=new FE({props:r}),n[27](l),l.$on("submit",n[28]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[27](null),H(l,a)}}}function zE(n,e,t){let i,s,l,o,r,a,u;Je(n,St,z=>t(15,u=z)),Yt(St,u="Import collections",u);let f,c,d="",m=!1,h=[],g=[],_=!0,y=[],k=!1;T();async function T(){t(5,k=!0);try{t(2,g=await he.collections.getFullList(200));for(let z of g)delete z.created,delete z.updated}catch(z){he.errorResponseHandler(z)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let z of h){const X=V.findByKey(g,"id",z.id);!(X!=null&&X.id)||!V.hasCollectionChanges(X,z,_)||y.push({new:z,old:X})}}function M(){t(1,h=[]);try{t(1,h=JSON.parse(d))}catch{}Array.isArray(h)?t(1,h=V.filterDuplicatesByKey(h)):t(1,h=[]);for(let z of h)delete z.created,delete z.updated,z.schema=V.filterDuplicatesByKey(z.schema)}function $(){var z,X;for(let Y of h){const le=V.findByKey(g,"name",Y.name)||V.findByKey(g,"id",Y.id);if(!le)continue;const He=Y.id,Re=le.id;Y.id=Re;const Fe=Array.isArray(le.schema)?le.schema:[],qe=Array.isArray(Y.schema)?Y.schema:[];for(const ge of qe){const Se=V.findByKey(Fe,"name",ge.name);Se&&Se.id&&(ge.id=Se.id)}for(let ge of h)if(Array.isArray(ge.schema))for(let Se of ge.schema)(z=Se.options)!=null&&z.collectionId&&((X=Se.options)==null?void 0:X.collectionId)===He&&(Se.options.collectionId=Re)}t(0,d=JSON.stringify(h,null,4))}function O(z){t(12,m=!0);const X=new FileReader;X.onload=async Y=>{t(12,m=!1),t(10,f.value="",f),t(0,d=Y.target.result),await cn(),h.length||(cl("Invalid collections configuration."),E())},X.onerror=Y=>{console.warn(Y),cl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},X.readAsText(z)}function E(){t(0,d=""),t(10,f.value="",f),Vn({})}function I(z){ie[z?"unshift":"push"](()=>{f=z,t(10,f)})}const L=()=>{f.files.length&&O(f.files[0])},N=()=>{f.click()};function F(){d=this.value,t(0,d)}function W(){_=this.checked,t(3,_)}const Z=()=>$(),ne=()=>E(),J=()=>c==null?void 0:c.show(g,h,_);function te(z){ie[z?"unshift":"push"](()=>{c=z,t(11,c)})}const ee=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&h.length&&h.length===h.filter(z=>!!z.id&&!!z.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(z=>i&&_&&!V.findByKey(h,"id",z.id))),n.$$.dirty[0]&70&&t(8,l=h.filter(z=>i&&!V.findByKey(g,"id",z.id))),n.$$.dirty[0]&10&&(typeof h<"u"||typeof _<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=h.filter(z=>{let X=V.findByKey(g,"name",z.name)||V.findByKey(g,"id",z.id);if(!X)return!1;if(X.id!=z.id)return!0;const Y=Array.isArray(X.schema)?X.schema:[],le=Array.isArray(z.schema)?z.schema:[];for(const He of le){if(V.findByKey(Y,"id",He.id))continue;const Fe=V.findByKey(Y,"name",He.name);if(Fe&&He.id!=Fe.id)return!0}return!1}))},[d,h,g,_,y,k,i,o,l,s,f,c,m,a,r,u,$,O,E,I,L,N,F,W,Z,ne,J,te,ee]}class BE extends ye{constructor(e){super(),ve(this,e,zE,VE,be,{},null,[-1,-1])}}const Pt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Ti("/"):!0}],UE={"/login":Dt({component:HD,conditions:Pt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Dt({asyncComponent:()=>ft(()=>import("./PageAdminRequestPasswordReset-58584d43.js"),[],import.meta.url),conditions:Pt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Dt({asyncComponent:()=>ft(()=>import("./PageAdminConfirmPasswordReset-b8522733.js"),[],import.meta.url),conditions:Pt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Dt({component:uD,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Dt({component:n3,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Dt({component:ZD,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Dt({component:PD,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Dt({component:PO,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Dt({component:ZO,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Dt({component:cE,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Dt({component:bE,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Dt({component:TE,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Dt({component:BE,conditions:Pt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-91aee058.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-91aee058.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-ccc59c33.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-ccc59c33.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-04cf4a7a.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-04cf4a7a.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"*":Dt({component:Sv,userData:{showAppSidebar:!1}})};function WE(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=m=>Math.sqrt(m)*120,easing:d=Bo}=i;return{delay:f,duration:zt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(m,h)=>{const g=h*a,_=h*u,y=m+h*e.width/t.width,k=m+h*e.height/t.height;return`transform: ${l} translate(${g}px, ${_}px) scale(${y}, ${k});`}}}function Ah(n,e,t){const i=n.slice();return i[2]=e[t],i}function YE(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function KE(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function JE(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ZE(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Ih(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,m=G,h,g,_;function y(M,$){return M[2].type==="info"?ZE:M[2].type==="success"?JE:M[2].type==="warning"?KE:YE}let k=y(e),T=k(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),T.c(),s=D(),l=v("div"),r=B(o),a=D(),u=v("button"),u.innerHTML='',f=D(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,$){S(M,t,$),b(t,i),T.m(i,null),b(t,s),b(t,l),b(l,r),b(t,a),b(t,u),b(t,f),h=!0,g||(_=K(u,"click",pt(C)),g=!0)},p(M,$){e=M,k!==(k=y(e))&&(T.d(1),T=k(e),T&&(T.c(),T.m(i,null))),(!h||$&1)&&o!==(o=e[2].message+"")&&re(r,o),(!h||$&1)&&Q(t,"alert-info",e[2].type=="info"),(!h||$&1)&&Q(t,"alert-success",e[2].type=="success"),(!h||$&1)&&Q(t,"alert-danger",e[2].type=="error"),(!h||$&1)&&Q(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){Mb(t),m(),Vh(t,d)},a(){m(),m=$b(t,d,WE,{duration:150})},i(M){h||(st(()=>{c||(c=Be(t,yo,{duration:150},!0)),c.run(1)}),h=!0)},o(M){c||(c=Be(t,yo,{duration:150},!1)),c.run(0),h=!1},d(M){M&&w(t),T.d(),M&&c&&c.end(),g=!1,_()}}}function GE(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>xg(l)]}class QE extends ye{constructor(e){super(),ve(this,e,XE,GE,be,{})}}function xE(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=B(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){S(l,e,o),b(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&re(i,t)},d(l){l&&w(e)}}}function eA(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=D(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],Q(s,"btn-loading",n[2])},m(a,u){S(a,e,u),b(e,t),S(a,i,u),S(a,s,u),b(s,l),e.focus(),o||(r=[K(e,"click",n[4]),K(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&Q(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Le(r)}}}function tA(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[eA],header:[xE]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){q(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function nA(n,e,t){let i;Je(n,Qa,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){ie[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await cn(),t(3,o=!1),tb()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class iA extends ye{constructor(e){super(),ve(this,e,nA,tA,be,{})}}function Ph(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,_,y,k;return g=new Qn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[sA]},$$scope:{ctx:n}}}),{c(){var T;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=D(),s=v("nav"),l=v("a"),l.innerHTML='',o=D(),r=v("a"),r.innerHTML='',a=D(),u=v("a"),u.innerHTML='',f=D(),c=v("figure"),d=v("img"),h=D(),q(g.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),Hn(d.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||p(d,"src",m),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(T,C){S(T,e,C),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(e,f),b(e,c),b(c,d),b(c,h),j(g,c,null),_=!0,y||(k=[Pe(Xt.call(null,t)),Pe(Xt.call(null,l)),Pe(Fn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Pe(Ye.call(null,l,{text:"Collections",position:"right"})),Pe(Xt.call(null,r)),Pe(Fn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Pe(Ye.call(null,r,{text:"Logs",position:"right"})),Pe(Xt.call(null,u)),Pe(Fn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Pe(Ye.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p(T,C){var $;(!_||C&1&&!Hn(d.src,m="./images/avatars/avatar"+((($=T[0])==null?void 0:$.avatar)||0)+".svg"))&&p(d,"src",m);const M={};C&1024&&(M.$$scope={dirty:C,ctx:T}),g.$set(M)},i(T){_||(A(g.$$.fragment,T),_=!0)},o(T){P(g.$$.fragment,T),_=!1},d(T){T&&w(e),H(g),y=!1,Le(k)}}}function sA(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` Manage admins`,t=D(),i=v("hr"),s=D(),l=v("button"),l.innerHTML=` - Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Pe(Xt.call(null,e)),K(l,"click",n[6])],o=!0)},p:G,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Le(r)}}}function lA(n){var m;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=V.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((m=n[0])==null?void 0:m.id)&&n[1]&&Ph(n);return o=new Hb({props:{routes:UE}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new QE({}),f=new iA({}),{c(){t=D(),i=v("div"),d&&d.c(),s=D(),l=v("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(h,g){S(h,t,g),S(h,i,g),d&&d.m(i,null),b(i,s),b(i,l),j(o,l,null),b(l,r),j(a,l,null),S(h,u,g),j(f,h,g),c=!0},p(h,[g]){var _;(!c||g&12)&&e!==(e=V.joinNonEmpty([h[3],h[2],"PocketBase"]," - "))&&(document.title=e),(_=h[0])!=null&&_.id&&h[1]?d?(d.p(h,g),g&3&&A(d,1)):(d=Ph(h),d.c(),A(d,1),d.m(i,s)):d&&(pe(),P(d,1,1,()=>{d=null}),me())},i(h){c||(A(d),A(o.$$.fragment,h),A(a.$$.fragment,h),A(f.$$.fragment,h),c=!0)},o(h){P(d),P(o.$$.fragment,h),P(a.$$.fragment,h),P(f.$$.fragment,h),c=!1},d(h){h&&w(t),h&&w(i),d&&d.d(),H(o),H(a),h&&w(u),H(f,h)}}}function oA(n,e,t){let i,s,l,o;Je(n,Cs,m=>t(8,i=m)),Je(n,vo,m=>t(2,s=m)),Je(n,Ma,m=>t(0,l=m)),Je(n,St,m=>t(3,o=m));let r,a=!1;function u(m){var h,g,_,y;((h=m==null?void 0:m.detail)==null?void 0:h.location)!==r&&(t(1,a=!!((_=(g=m==null?void 0:m.detail)==null?void 0:g.userData)!=null&&_.showAppSidebar)),r=(y=m==null?void 0:m.detail)==null?void 0:y.location,Yt(St,o="",o),Vn({}),tb())}function f(){Ti("/")}async function c(){var m,h;if(l!=null&&l.id)try{const g=await he.settings.getAll({$cancelKey:"initialAppSettings"});Yt(vo,s=((m=g==null?void 0:g.meta)==null?void 0:m.appName)||"",s),Yt(Cs,i=!!((h=g==null?void 0:g.meta)!=null&&h.hideControls),i)}catch(g){g!=null&&g.isAbort||console.warn("Failed to load app settings.",g)}}function d(){he.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class rA extends ye{constructor(e){super(),ve(this,e,oA,lA,be,{})}}new rA({target:document.getElementById("app")});export{Le as A,Vt as B,V as C,Ti as D,Ae as E,e_ as F,ga as G,du as H,Je as I,es as J,$t as K,nn as L,ie as M,x_ as N,wt as O,Xi as P,tn as Q,bn as R,ye as S,Ar as T,P as a,D as b,q as c,H as d,v as e,p as f,S as g,b as h,ve as i,Pe as j,pe as k,Xt as l,j as m,me as n,w as o,he as p,_e as q,Q as r,be as s,A as t,K as u,pt as v,B as w,re as x,G as y,ce as z}; + Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Pe(Xt.call(null,e)),K(l,"click",n[6])],o=!0)},p:G,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Le(r)}}}function lA(n){var m;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=V.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((m=n[0])==null?void 0:m.id)&&n[1]&&Ph(n);return o=new Hb({props:{routes:UE}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new QE({}),f=new iA({}),{c(){t=D(),i=v("div"),d&&d.c(),s=D(),l=v("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(h,g){S(h,t,g),S(h,i,g),d&&d.m(i,null),b(i,s),b(i,l),j(o,l,null),b(l,r),j(a,l,null),S(h,u,g),j(f,h,g),c=!0},p(h,[g]){var _;(!c||g&12)&&e!==(e=V.joinNonEmpty([h[3],h[2],"PocketBase"]," - "))&&(document.title=e),(_=h[0])!=null&&_.id&&h[1]?d?(d.p(h,g),g&3&&A(d,1)):(d=Ph(h),d.c(),A(d,1),d.m(i,s)):d&&(pe(),P(d,1,1,()=>{d=null}),me())},i(h){c||(A(d),A(o.$$.fragment,h),A(a.$$.fragment,h),A(f.$$.fragment,h),c=!0)},o(h){P(d),P(o.$$.fragment,h),P(a.$$.fragment,h),P(f.$$.fragment,h),c=!1},d(h){h&&w(t),h&&w(i),d&&d.d(),H(o),H(a),h&&w(u),H(f,h)}}}function oA(n,e,t){let i,s,l,o;Je(n,Cs,m=>t(8,i=m)),Je(n,vo,m=>t(2,s=m)),Je(n,Ma,m=>t(0,l=m)),Je(n,St,m=>t(3,o=m));let r,a=!1;function u(m){var h,g,_,y;((h=m==null?void 0:m.detail)==null?void 0:h.location)!==r&&(t(1,a=!!((_=(g=m==null?void 0:m.detail)==null?void 0:g.userData)!=null&&_.showAppSidebar)),r=(y=m==null?void 0:m.detail)==null?void 0:y.location,Yt(St,o="",o),Vn({}),tb())}function f(){Ti("/")}async function c(){var m,h;if(l!=null&&l.id)try{const g=await he.settings.getAll({$cancelKey:"initialAppSettings"});Yt(vo,s=((m=g==null?void 0:g.meta)==null?void 0:m.appName)||"",s),Yt(Cs,i=!!((h=g==null?void 0:g.meta)!=null&&h.hideControls),i)}catch(g){g!=null&&g.isAbort||console.warn("Failed to load app settings.",g)}}function d(){he.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class rA extends ye{constructor(e){super(),ve(this,e,oA,lA,be,{})}}new rA({target:document.getElementById("app")});export{Le as A,Vt as B,V as C,Ti as D,Ae as E,e_ as F,ga as G,du as H,Je as I,es as J,$t as K,nn as L,ie as M,x_ as N,wt as O,Xi as P,tn as Q,bn as R,ye as S,Ar as T,P as a,D as b,q as c,H as d,v as e,p as f,S as g,b as h,ve as i,Pe as j,pe as k,Xt as l,j as m,me as n,w as o,he as p,_e as q,Q as r,be as s,A as t,K as u,pt as v,B as w,re as x,G as y,de as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 10705e3e..9689ab86 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -24,7 +24,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/src/components/records/RecordFieldCell.svelte b/ui/src/components/records/RecordFieldCell.svelte index f3a3fe0d..747488f5 100644 --- a/ui/src/components/records/RecordFieldCell.svelte +++ b/ui/src/components/records/RecordFieldCell.svelte @@ -10,7 +10,11 @@ - {#if CommonHelper.isEmpty(record[field.name])} + {#if field.type === "json"} + + {CommonHelper.truncate(JSON.stringify(record[field.name]))} + + {:else if CommonHelper.isEmpty(record[field.name])} N/A {:else if field.type === "bool"} {record[field.name] ? "True" : "False"} @@ -33,10 +37,6 @@ {:else if field.type === "date"} - {:else if field.type === "json"} - - {CommonHelper.truncate(JSON.stringify(record[field.name]))} - {:else if field.type === "select"}
    {#each CommonHelper.toArray(record[field.name]) as item, i (i + item)} diff --git a/ui/src/components/records/fields/JsonField.svelte b/ui/src/components/records/fields/JsonField.svelte index b689f772..af7df06c 100644 --- a/ui/src/components/records/fields/JsonField.svelte +++ b/ui/src/components/records/fields/JsonField.svelte @@ -6,10 +6,10 @@ export let field = new SchemaField(); export let value = undefined; - $: if (typeof value !== "undefined" && typeof value !== "string" && value !== null) { - // the JSON field support both js primitives and encoded JSON string - // so we are normalizing the value to only a string - value = JSON.stringify(value, null, 2); + let serialized = undefined; + + $: if (value !== serialized?.trim()) { + serialized = JSON.stringify(value, null, 2); } @@ -18,5 +18,14 @@ {field.name} -