From 5d8fc939e2f71d9537b9e69025cdc55378d78b1c Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Thu, 21 Jul 2022 12:56:17 +0300 Subject: [PATCH] [#164] serve common media files inline and fix svg content-type --- tools/filesystem/filesystem.go | 26 +++- tools/filesystem/filesystem_test.go | 127 ++++++++++++------ tools/rest/uploaded_file.go | 7 +- ...js => FilterAutocompleteInput.22ad58b4.js} | 2 +- ...PageAdminConfirmPasswordReset.0023ef63.js} | 2 +- ...PageAdminRequestPasswordReset.bb44d6f7.js} | 2 +- ...=> PageUserConfirmEmailChange.c2566a53.js} | 2 +- ... PageUserConfirmPasswordReset.9fab9e12.js} | 2 +- ...> PageUserConfirmVerification.5e5c9ab6.js} | 2 +- .../{index.f5b1cef3.js => index.38300823.js} | 10 +- ...{index.2d1d905e.css => index.615ff839.css} | 2 +- ui/dist/index.html | 4 +- .../records/fields/FileField.svelte | 1 - ui/src/scss/_overlay_panel.scss | 4 + ui/src/utils/CommonHelper.js | 2 +- 15 files changed, 138 insertions(+), 57 deletions(-) rename ui/dist/assets/{FilterAutocompleteInput.ba7c1341.js => FilterAutocompleteInput.22ad58b4.js} (99%) rename ui/dist/assets/{PageAdminConfirmPasswordReset.b4aab48c.js => PageAdminConfirmPasswordReset.0023ef63.js} (98%) rename ui/dist/assets/{PageAdminRequestPasswordReset.d671df73.js => PageAdminRequestPasswordReset.bb44d6f7.js} (98%) rename ui/dist/assets/{PageUserConfirmEmailChange.4fa1d7e3.js => PageUserConfirmEmailChange.c2566a53.js} (98%) rename ui/dist/assets/{PageUserConfirmPasswordReset.e31371ba.js => PageUserConfirmPasswordReset.9fab9e12.js} (98%) rename ui/dist/assets/{PageUserConfirmVerification.c9800662.js => PageUserConfirmVerification.5e5c9ab6.js} (97%) rename ui/dist/assets/{index.f5b1cef3.js => index.38300823.js} (99%) rename ui/dist/assets/{index.2d1d905e.css => index.615ff839.css} (66%) diff --git a/tools/filesystem/filesystem.go b/tools/filesystem/filesystem.go index c15d6678..c214e7d5 100644 --- a/tools/filesystem/filesystem.go +++ b/tools/filesystem/filesystem.go @@ -16,6 +16,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/disintegration/imaging" + "github.com/pocketbase/pocketbase/tools/list" "gocloud.dev/blob" "gocloud.dev/blob/fileblob" "gocloud.dev/blob/s3blob" @@ -176,6 +177,11 @@ func (s *System) DeletePrefix(prefix string) []error { return failed } +var inlineServeContentTypes = []string{ + "image/png", "image/jpg", "image/jpeg", "image/gif", + "video/mp4", "video/3gpp", "video/quicktime", " video/x-ms-wmv", +} + // Serve serves the file at fileKey location to an HTTP response. func (s *System) Serve(response http.ResponseWriter, fileKey string, name string) error { r, readErr := s.bucket.NewReader(s.ctx, fileKey, nil) @@ -184,9 +190,25 @@ func (s *System) Serve(response http.ResponseWriter, fileKey string, name string } defer r.Close() - response.Header().Set("Content-Disposition", "attachment; filename="+name) - response.Header().Set("Content-Type", r.ContentType()) + disposition := "attachment" + realContentType := r.ContentType() + if list.ExistInSlice(realContentType, inlineServeContentTypes) { + disposition = "inline" + } + + // make an exception for svg and use a custom content type + // to send in the response so that it can be loaded in a img tag + // (see https://github.com/whatwg/mimesniff/issues/7) + ext := filepath.Ext(name) + extContentType := realContentType + if ext == ".svg" { + extContentType = "image/svg+xml" + } + + response.Header().Set("Content-Disposition", disposition+"; filename="+name) + response.Header().Set("Content-Type", extContentType) response.Header().Set("Content-Length", strconv.FormatInt(r.Size(), 10)) + response.Header().Set("Content-Security-Policy", "default-src 'none'; style-src 'unsafe-inline'; sandbox") // All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT) // (see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1) diff --git a/tools/filesystem/filesystem_test.go b/tools/filesystem/filesystem_test.go index 79991172..c4f32837 100644 --- a/tools/filesystem/filesystem_test.go +++ b/tools/filesystem/filesystem_test.go @@ -28,7 +28,7 @@ func TestFileSystemExists(t *testing.T) { {"sub1.txt", false}, {"test/sub1.txt", true}, {"test/sub2.txt", true}, - {"file.png", true}, + {"image.png", true}, } for i, scenario := range scenarios { @@ -51,13 +51,14 @@ func TestFileSystemAttributes(t *testing.T) { defer fs.Close() scenarios := []struct { - file string - expectError bool + file string + expectError bool + expectContentType string }{ - {"sub1.txt", true}, - {"test/sub1.txt", false}, - {"test/sub2.txt", false}, - {"file.png", false}, + {"sub1.txt", true, ""}, + {"test/sub1.txt", false, "application/octet-stream"}, + {"test/sub2.txt", false, "application/octet-stream"}, + {"image.png", false, "image/png"}, } for i, scenario := range scenarios { @@ -71,8 +72,8 @@ func TestFileSystemAttributes(t *testing.T) { t.Errorf("(%d) Expected nil, got error, %v", i, err) } - if err == nil && attr.ContentType != "application/octet-stream" { - t.Errorf("(%d) Expected attr.ContentType to be %q, got %q", i, "application/octet-stream", attr.ContentType) + if err == nil && attr.ContentType != scenario.expectContentType { + t.Errorf("(%d) Expected attr.ContentType to be %q, got %q", i, scenario.expectContentType, attr.ContentType) } } } @@ -91,7 +92,7 @@ func TestFileSystemDelete(t *testing.T) { t.Fatal("Expected error, got nil") } - if err := fs.Delete("file.png"); err != nil { + if err := fs.Delete("image.png"); err != nil { t.Fatalf("Expected nil, got error %v", err) } } @@ -157,33 +158,73 @@ func TestFileSystemServe(t *testing.T) { } defer fs.Close() - r := httptest.NewRecorder() - - // serve missing file - if err := fs.Serve(r, "missing.txt", "download.txt"); err == nil { - t.Fatal("Expected error, got nil") - } - - // serve existing file - if err := fs.Serve(r, "test/sub1.txt", "download.txt"); err != nil { - t.Fatal("Expected nil, got error") - } - - result := r.Result() - - // check headers scenarios := []struct { - header string - expected string + path string + name string + expectError bool + expectHeaders map[string]string }{ - {"Content-Disposition", "attachment; filename=download.txt"}, - {"Content-Type", "application/octet-stream"}, - {"Content-Length", "0"}, + { + // missing + "missing.txt", + "test_name.txt", + true, + nil, + }, + { + // existing regular file + "test/sub1.txt", + "test_name.txt", + false, + map[string]string{ + "Content-Disposition": "attachment; filename=test_name.txt", + "Content-Type": "application/octet-stream", + "Content-Length": "0", + }, + }, + // png inline + { + // svg exception + "image.png", + "test_name.png", + false, + map[string]string{ + "Content-Disposition": "inline; filename=test_name.png", + "Content-Type": "image/png", + "Content-Length": "73", + }, + }, + { + // svg exception + "image.svg", + "test_name.svg", + false, + map[string]string{ + "Content-Disposition": "attachment; filename=test_name.svg", + "Content-Type": "image/svg+xml", + "Content-Length": "0", + }, + }, } - for i, scenario := range scenarios { - v := result.Header.Get(scenario.header) - if v != scenario.expected { - t.Errorf("(%d) Expected value %q for header %q, got %q", i, scenario.expected, scenario.header, v) + + for _, scenario := range scenarios { + r := httptest.NewRecorder() + + err := fs.Serve(r, scenario.path, scenario.name) + hasErr := err != nil + + if hasErr != scenario.expectError { + t.Errorf("(%s) Expected hasError %v, got %v", scenario.path, scenario.expectError, hasErr) + continue + } + + result := r.Result() + + for hName, hValue := range scenario.expectHeaders { + v := result.Header.Get(hName) + if v != hValue { + t.Errorf("(%s) Expected value %q for header %q, got %q", scenario.path, hValue, hName, v) + } } } } @@ -209,11 +250,11 @@ func TestFileSystemCreateThumb(t *testing.T) { // non-image existing file {"test/sub1.txt", "thumb_test_sub1", true, true}, // existing image file - crop center - {"file.png", "thumb_file_center", true, false}, + {"image.png", "thumb_file_center", true, false}, // existing image file - crop top - {"file.png", "thumb_file_top", false, false}, + {"image.png", "thumb_file_top", false, false}, // existing image file with existing thumb path = should fail - {"file.png", "test", true, true}, + {"image.png", "test", true, true}, } for i, scenario := range scenarios { @@ -259,7 +300,7 @@ func createTestDir(t *testing.T) string { } file2.Close() - file3, err := os.OpenFile(filepath.Join(dir, "file.png"), os.O_WRONLY|os.O_CREATE, 0666) + file3, err := os.OpenFile(filepath.Join(dir, "image.png"), os.O_WRONLY|os.O_CREATE, 0666) if err != nil { t.Fatal(err) } @@ -267,6 +308,16 @@ func createTestDir(t *testing.T) string { imgRect := image.Rect(0, 0, 1, 1) png.Encode(file3, imgRect) file3.Close() + err2 := os.WriteFile(filepath.Join(dir, "image.png.attrs"), []byte(`{"user.cache_control":"","user.content_disposition":"","user.content_encoding":"","user.content_language":"","user.content_type":"image/png","user.metadata":null}`), 0666) + if err2 != nil { + t.Fatal(err2) + } + + file4, err := os.OpenFile(filepath.Join(dir, "image.svg"), os.O_WRONLY|os.O_CREATE, 0666) + if err != nil { + t.Fatal(err) + } + file4.Close() return dir } diff --git a/tools/rest/uploaded_file.go b/tools/rest/uploaded_file.go index 57b311f8..74cae162 100644 --- a/tools/rest/uploaded_file.go +++ b/tools/rest/uploaded_file.go @@ -7,6 +7,7 @@ import ( "mime/multipart" "net/http" "path/filepath" + "regexp" "github.com/pocketbase/pocketbase/tools/security" ) @@ -15,6 +16,8 @@ import ( // will be used when parsing a form request body. const DefaultMaxMemory = 32 << 20 // 32mb +var extensionInvalidCharsRegex = regexp.MustCompile(`[^\w\.\*\-\+\=\#]+`) + // UploadedFile defines a single multipart uploaded file instance. type UploadedFile struct { name string @@ -65,8 +68,10 @@ func FindUploadedFiles(r *http.Request, key string) ([]*UploadedFile, error) { return nil, err } + ext := extensionInvalidCharsRegex.ReplaceAllString(filepath.Ext(fh.Filename), "") + result[i] = &UploadedFile{ - name: fmt.Sprintf("%s%s", security.RandomString(32), filepath.Ext(fh.Filename)), + name: fmt.Sprintf("%s%s", security.RandomString(32), ext), header: fh, bytes: buf.Bytes(), } diff --git a/ui/dist/assets/FilterAutocompleteInput.ba7c1341.js b/ui/dist/assets/FilterAutocompleteInput.22ad58b4.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput.ba7c1341.js rename to ui/dist/assets/FilterAutocompleteInput.22ad58b4.js index 20297ecb..abc6c238 100644 --- a/ui/dist/assets/FilterAutocompleteInput.ba7c1341.js +++ b/ui/dist/assets/FilterAutocompleteInput.22ad58b4.js @@ -1,4 +1,4 @@ -import{S as Sa,i as va,s as Ca,e as Aa,f as Ma,g as Da,y as xn,o as Oa,G as Ta,H as Ba,I as Ra,J as Pa,K as La,C as kn,L as Ea}from"./index.f5b1cef3.js";class z{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ve.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Ve.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zt(this),r=new Zt(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zt(this,e)}iterRange(e,t=this.length){return new zo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new qo(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?z.empty:e.length<=32?new Q(e):Ve.from(Q.split(e,[]))}}class Q extends z{constructor(e,t=Ia(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Na(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(hr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Pi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Q(l,o.length+r.length));else{let h=l.length>>1;i.push(new Q(l.slice(0,h)),new Q(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Q))return super.replace(e,t,i);let s=Pi(this.text,Pi(i.text,hr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new Q(s,r):Ve.from(Q.split(s,[]),r)}sliceString(e,t=this.length,i=` +import{S as Sa,i as va,s as Ca,e as Aa,f as Ma,g as Da,y as xn,o as Oa,G as Ta,H as Ba,I as Ra,J as Pa,K as La,C as kn,L as Ea}from"./index.38300823.js";class z{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ve.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Ve.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zt(this),r=new Zt(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zt(this,e)}iterRange(e,t=this.length){return new zo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new qo(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?z.empty:e.length<=32?new Q(e):Ve.from(Q.split(e,[]))}}class Q extends z{constructor(e,t=Ia(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Na(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(hr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Pi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Q(l,o.length+r.length));else{let h=l.length>>1;i.push(new Q(l.slice(0,h)),new Q(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Q))return super.replace(e,t,i);let s=Pi(this.text,Pi(i.text,hr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new Q(s,r):Ve.from(Q.split(s,[]),r)}sliceString(e,t=this.length,i=` `){let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=h+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new Q(i,s)),i=[],s=-1);return s>-1&&t.push(new Q(i,s)),t}}class Ve extends z{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,h=i+o.lines-1;if((t?h:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=h+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let a=s&((o<=e?1:0)|(h>=t?2:0));o>=e&&h<=t&&!a?i.push(l):l.decompose(e-o,t-o,i,a)}o=h+1}}replace(e,t,i){if(i.lines=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new Ve(c,this.length-(t-e)+i.length)}return super.replace(r,l,h)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` `){let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=h+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ve))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let h=this.children[s],a=e.children[r];if(h!=a)return i+h.scanIdentical(a,t);i+=h.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new Q(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],h=0,a=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ve)for(let g of d.children)f(g);else d.lines>o&&(h>o||!h)?(u(),l.push(d)):d instanceof Q&&h&&(p=c[c.length-1])instanceof Q&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new Q(p.text.concat(d.text),p.length+1+d.length)):(h+d.lines>s&&u(),h+=d.lines,a+=d.length+1,c.push(d))}function u(){h!=0&&(l.push(c.length==1?c[0]:Ve.from(c,a)),a=-1,h=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Ve(l,t)}}z.empty=new Q([""],0);function Ia(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Pi(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(h>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof Q?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof Q?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` `,this;e--}else if(s instanceof Q){let h=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=s.children[o+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof Q?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class zo{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Zt(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class qo{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(z.prototype[Symbol.iterator]=function(){return this.iter()},Zt.prototype[Symbol.iterator]=zo.prototype[Symbol.iterator]=qo.prototype[Symbol.iterator]=function(){return this});class Na{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}let Dt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Dt[e-1]<=n;return!1}function ar(n){return n>=127462&&n<=127487}const cr=8205;function Ae(n,e,t=!0,i=!0){return(t?Ko:Fa)(n,e,i)}function Ko(n,e,t){if(e==n.length)return e;e&&Uo(n.charCodeAt(e))&&jo(n.charCodeAt(e-1))&&e--;let i=re(n,e);for(e+=ve(i);e=0&&ar(re(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Fa(n,e,t){for(;e>0;){let i=Ko(n,e-2,t);if(i=56320&&n<57344}function jo(n){return n>=55296&&n<56320}function re(n,e){let t=n.charCodeAt(e);if(!jo(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Uo(i)?(t-55296<<10)+(i-56320)+65536:t}function Rs(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ve(n){return n<65536?1:2}const Kn=/\r\n?|\n/;var me=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(me||(me={}));class We{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=me.Simple&&a>=e&&(i==me.TrackDel&&se||i==me.TrackBefore&&se))return null;if(a>e||a==e&&t<0&&!l)return e==s||t<0?r:r+h;r+=h}s=a}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new We(e)}static create(e){return new We(e)}}class ee extends We{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Un(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return jn(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let h=s>>1;for(;i.length0&&Ye(i,t,r.text),r.forward(c),l+=c}let a=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function h(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?z.of(d.split(i||Kn)):d:z.empty,g=p.length;if(f==u&&g==0)return;fo&&he(s,f-o,-1),he(s,u-f,g),Ye(r,s,p),o=u}}return a(e),h(!l),l}static empty(e){return new ee(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function Ye(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],h=n.sections[o++];e(s,a,r,c,f),s=a,r=c}}}function jn(n,e,t,i=!1){let s=[],r=i?[]:null,o=new si(n),l=new si(e);for(let h=-1;;)if(o.ins==-1&&l.ins==-1){let a=Math.min(o.len,l.len);he(s,a,-1),o.forward(a),l.forward(a)}else if(l.ins>=0&&(o.ins<0||h==o.i||o.off==0&&(l.len=0&&h=0){let a=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);a+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lenh||o.ins>=0&&o.len>h)&&(l||i.length>a),r.forward2(h),o.forward(h)}}}}class si{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?z.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?z.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ct{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new ct(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return m.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return m.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return m.range(e.anchor,e.head)}static create(e,t,i){return new ct(e,t,i)}}class m{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:m.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new m(e.ranges.map(t=>ct.fromJSON(t)),e.main)}static single(e,t=e){return new m([m.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?4:0))}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?m.range(h,l):m.range(l,h))}}return new m(e,t)}}function Jo(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Ps=0;class T{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=Ps++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}static define(e={}){return new T(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Ls),!!e.static,e.enables)}of(e){return new Li([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Li(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Li(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Ls(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Li{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=Ps++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,h=!1,a=!1,c=[];for(let f of this.dependencies)f=="doc"?h=!0:f=="selection"?a=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(h&&u.docChanged||a&&(u.docChanged||u.selection)||Gn(f,c)){let d=i(f);if(l?!fr(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d=i(f),p=u.config.address[r];if(p!=null){let g=Fi(u,p);if(this.dependencies.every(y=>y instanceof T?u.facet(y)===f.facet(y):y instanceof ke?u.field(y,!1)==f.field(y,!1):!0)||(l?fr(d,g,s):s(d,g)))return f.values[o]=g,0}return f.values[o]=d,1}}}}function fr(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[h.id]),s=t.map(h=>h.type),r=i.filter(h=>!(h&1)),o=n[e.id]>>1;function l(h){let a=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(ur).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,ur.of({field:this,create:e})]}get extension(){return this}}const Ct={lowest:4,low:3,default:2,high:1,highest:0};function Kt(n){return e=>new $o(e,n)}const Wt={highest:Kt(Ct.highest),high:Kt(Ct.high),default:Kt(Ct.default),low:Kt(Ct.low),lowest:Kt(Ct.lowest)};class $o{constructor(e,t){this.inner=e,this.prec=t}}class _e{of(e){return new Jn(this,e)}reconfigure(e){return _e.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Jn{constructor(e,t){this.compartment=e,this.inner=t}}class Vi{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of Wa(e,t,o))u instanceof ke?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),h=[],a=[];for(let u of s)l[u.id]=a.length<<1,a.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],p=d[0].facet,g=c&&c[u]||[];if(d.every(y=>y.type==0))if(l[p.id]=h.length<<1|1,Ls(g,d))h.push(i.facet(p));else{let y=p.combine(d.map(b=>b.value));h.push(i&&p.compare(y,i.facet(p))?i.facet(p):y)}else{for(let y of d)y.type==0?(l[y.id]=h.length<<1|1,h.push(y.value)):(l[y.id]=a.length<<1,a.push(b=>y.dynamicSlot(b)));l[p.id]=a.length<<1,a.push(y=>Ha(y,p,d))}}let f=a.map(u=>u(l));return new Vi(e,o,f,l,h,r)}}function Wa(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let h=s.get(o);if(h!=null){if(h<=l)return;let a=i[h].indexOf(o);a>-1&&i[h].splice(a,1),o instanceof Jn&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let a of o)r(a,l);else if(o instanceof Jn){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let a=e.get(o.compartment)||o.inner;t.set(o.compartment,a),r(a,l)}else if(o instanceof $o)r(o.inner,o.prec);else if(o instanceof ke)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Li)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,l);else{let a=o.extension;if(!a)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(a,l)}}return r(n,Ct.default),i.reduce((o,l)=>o.concat(l))}function ei(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Fi(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Xo=T.define(),Yo=T.define({combine:n=>n.some(e=>e),static:!0}),_o=T.define({combine:n=>n.length?n[0]:void 0,static:!0}),Qo=T.define(),Zo=T.define(),el=T.define(),tl=T.define({combine:n=>n.length?n[0]:!1});class wt{constructor(e,t){this.type=e,this.value=t}static define(){return new za}}class za{of(e){return new wt(this,e)}}class qa{constructor(e){this.map=e}of(e){return new H(this,e)}}class H{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new H(this.type,t)}is(e){return this.type==e}static define(e={}){return new qa(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}H.reconfigure=H.define();H.appendConfig=H.define();class te{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Jo(i,t.newLength),r.some(l=>l.type==te.time)||(this.annotations=r.concat(te.time.of(Date.now())))}static create(e,t,i,s,r,o){return new te(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(te.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}te.time=wt.define();te.userEvent=wt.define();te.addToHistory=wt.define();te.remote=wt.define();function Ka(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof te?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof te?n=r[0]:n=nl(e,Ot(r),!1)}return n}function ja(n){let e=n.startState,t=e.facet(el),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=il(n,$n(e,r,n.changes.newLength),!0))}return i==n?n:te.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Ga=[];function Ot(n){return n==null?Ga:Array.isArray(n)?n:[n]}var ce=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(ce||(ce={}));const Ja=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Xn;try{Xn=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function $a(n){if(Xn)return Xn.test(n);for(let e=0;e"\x80"&&(t.toUpperCase()!=t.toLowerCase()||Ja.test(t)))return!0}return!1}function Xa(n){return e=>{if(!/\S/.test(e))return ce.Space;if($a(e))return ce.Word;for(let t=0;t-1)return ce.Word;return ce.Other}}class V{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,l)),t=null),s.set(o.value.compartment,o.value.extension)):o.is(H.reconfigure)?(t=null,i=o.value):o.is(H.appendConfig)&&(t=null,i=Ot(i).concat(o.value));let r;t?r=e.startState.values.slice():(t=Vi.resolve(i,s,this),r=new V(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,h)=>h.reconfigure(l,this),null).values),new V(t,e.newDoc,e.newSelection,r,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:m.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Ot(i.effects);for(let l=1;lo.spec.fromJSON(l,h)))}}return V.create({doc:e.doc,selection:m.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Vi.resolve(e.extensions||[],new Map),i=e.doc instanceof z?e.doc:z.of((e.doc||"").split(t.staticFacet(V.lineSeparator)||Kn)),s=e.selection?e.selection instanceof m?e.selection:m.single(e.selection.anchor,e.selection.head):m.single(0);return Jo(s,i.length),t.staticFacet(Yo)||(s=s.asSingle()),new V(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(V.tabSize)}get lineBreak(){return this.facet(V.lineSeparator)||` diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset.b4aab48c.js b/ui/dist/assets/PageAdminConfirmPasswordReset.0023ef63.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset.b4aab48c.js rename to ui/dist/assets/PageAdminConfirmPasswordReset.0023ef63.js index 42d7cec7..10e0f9b8 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset.b4aab48c.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset.0023ef63.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as F,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 k,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.f5b1cef3.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=k(),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=k(),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,C,v,P,A,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 F,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 k,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.38300823.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=k(),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=k(),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,C,v,P,A,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=k(),F(r.$$.fragment),p=k(),F(d.$$.fragment),n=k(),i=c("button"),g=c("span"),g.textContent="Set new password",R=k(),C=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(C,"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,C,$),_(C,v),P=!0,A||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],A=!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),(!P||$&4)&&(i.disabled=a[2]),$&4&&L(i,"btn-loading",a[2])},i(a){P||(H(r.$$.fragment,a),H(d.$$.fragment,a),P=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),P=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(C),A=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){F(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.d671df73.js b/ui/dist/assets/PageAdminRequestPasswordReset.bb44d6f7.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset.d671df73.js rename to ui/dist/assets/PageAdminRequestPasswordReset.bb44d6f7.js index 710c6f62..1724dab7 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset.d671df73.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset.bb44d6f7.js @@ -1,2 +1,2 @@ -import{S as E,i as M,s as T,F as j,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 z,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as A,v as I,w as h,x as J,y as P,z as R}from"./index.f5b1cef3.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 E,i as M,s as T,F as j,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 z,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as A,v as I,w as h,x as J,y as P,z as R}from"./index.38300823.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\u2019ll 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=A(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]),$&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=A(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=z(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 j({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 E{constructor(e){super(),M(this,e,W,V,T,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageUserConfirmEmailChange.4fa1d7e3.js b/ui/dist/assets/PageUserConfirmEmailChange.c2566a53.js similarity index 98% rename from ui/dist/assets/PageUserConfirmEmailChange.4fa1d7e3.js rename to ui/dist/assets/PageUserConfirmEmailChange.c2566a53.js index af5ac5ef..2e8dfc3a 100644 --- a/ui/dist/assets/PageUserConfirmEmailChange.4fa1d7e3.js +++ b/ui/dist/assets/PageUserConfirmEmailChange.c2566a53.js @@ -1,4 +1,4 @@ -import{S as J,i as M,s as N,F as R,c as S,m as U,t as $,a as v,d as z,C as W,E as Y,g as _,k as j,n as A,o as b,p as F,q as B,e as m,w as y,b as C,f as d,r as H,h as k,u as E,v as D,y as h,x as G,z as T}from"./index.f5b1cef3.js";function I(r){let e,s,t,l,n,o,c,a,i,u,g,q,p=r[3]&&L(r);return o=new B({props:{class:"form-field required",name:"password",$$slots:{default:[O,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),s=m("div"),t=m("h4"),l=y(`Type your password to confirm changing your email address +import{S as J,i as M,s as N,F as R,c as S,m as U,t as $,a as v,d as z,C as W,E as Y,g as _,k as j,n as A,o as b,p as F,q as B,e as m,w as y,b as C,f as d,r as H,h as k,u as E,v as D,y as h,x as G,z as T}from"./index.38300823.js";function I(r){let e,s,t,l,n,o,c,a,i,u,g,q,p=r[3]&&L(r);return o=new B({props:{class:"form-field required",name:"password",$$slots:{default:[O,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),s=m("div"),t=m("h4"),l=y(`Type your password to confirm changing your email address `),p&&p.c(),n=C(),S(o.$$.fragment),c=C(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","m-b-xs"),d(s,"class","content txt-center m-b-sm"),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,s),k(s,t),k(t,l),p&&p.m(t,null),k(e,n),U(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||(q=E(e,"submit",D(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=L(f),p.c(),p.m(t,null)):p&&(p.d(1),p=null);const P={};w&769&&(P.$$scope={dirty:w,ctx:f}),o.$set(P),(!u||w&2)&&(a.disabled=f[1]),w&2&&H(a,"btn-loading",f[1])},i(f){u||($(o.$$.fragment,f),u=!0)},o(f){v(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),z(o),g=!1,q()}}}function K(r){let e,s,t,l,n;return{c(){e=m("div"),e.innerHTML=`

Email address changed

You can now sign in with your new email address.

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

Password changed

You can now sign in with your new password.

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

Invalid or expired verification token.

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

Successfully verified email address.

`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(l,c){r(l,t,c),r(l,s,c),r(l,e,c),n||(i=_(e,"click",o[3]),n=!0)},p,d(l){l&&a(t),l&&a(s),l&&a(e),n=!1,i()}}}function T(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 F(o){let t;function s(i,l){return i[1]?T:i[0]?S:P}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(i,l){n.m(i,l),r(i,t,l)},p(i,l){e===(e=s(i))&&n?n.p(i,l):(n.d(1),n=e(i),n&&(n.c(),n.m(t.parentNode,t)))},d(i){n.d(i),i&&a(t)}}}function U(o){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[F]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const i={};n&67&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){s||(g(t.$$.fragment,e),s=!0)},o(e){$(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function V(o,t,s){let{params:e}=t,n=!1,i=!1;l();async function l(){s(1,i=!0);try{await H.Users.confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch(d){console.warn(d),s(0,n=!1)}s(1,i=!1)}const c=()=>window.close(),b=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,i,e,c,b]}class E extends k{constructor(t){super(),v(this,t,V,U,y,{params:2})}}export{E as default}; diff --git a/ui/dist/assets/index.f5b1cef3.js b/ui/dist/assets/index.38300823.js similarity index 99% rename from ui/dist/assets/index.f5b1cef3.js rename to ui/dist/assets/index.38300823.js index c34d43b6..a59da70d 100644 --- a/ui/dist/assets/index.f5b1cef3.js +++ b/ui/dist/assets/index.38300823.js @@ -1,14 +1,14 @@ const __=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 oe(){}const bl=n=>n;function _t(n,e){for(const t in e)n[t]=e[t];return n}function jp(n){return n()}function Ya(){return Object.create(null)}function st(n){n.forEach(jp)}function Zn(n){return typeof n=="function"}function Pe(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Ll;function ti(n,e){return Ll||(Ll=document.createElement("a")),Ll.href=e,n===Ll.href}function b_(n){return Object.keys(n).length===0}function qp(n,...e){if(n==null)return oe;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function qt(n,e,t){n.$$.on_destroy.push(qp(e,t))}function On(n,e,t,i){if(n){const s=Vp(n,e,t,i);return n[0](s)}}function Vp(n,e,t,i){return n[1]&&i?_t(t.ctx.slice(),n[1](i(e))):t.ctx}function En(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(),sa=zp?n=>requestAnimationFrame(n):oe;const _s=new Set;function Bp(n){_s.forEach(e=>{e.c(n)||(_s.delete(e),e.f())}),_s.size!==0&&sa(Bp)}function Lo(n){let e;return _s.size===0&&sa(Bp),{promise:new Promise(t=>{_s.add(e={c:n,f:t})}),abort(){_s.delete(e)}}}function p(n,e){n.appendChild(e)}function Up(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function v_(n){const e=_("style");return y_(Up(n),e),e.sheet}function y_(n,e){p(n.head||n,e)}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode.removeChild(n)}function Bn(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function Qt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function ni(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Wp(n){return function(e){e.target===this&&n.call(this,e)}}function h(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function fi(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]:h(n,i,e[i])}function It(n){return n===""?null:+n}function k_(n){return Array.from(n.childNodes)}function me(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function $e(n,e){n.value=e==null?"":e}function Za(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ee(n,e,t){n.classList[t?"add":"remove"](e)}function Yp(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}const ao=new Map;let uo=0;function w_(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function S_(n,e){const t={stylesheet:v_(e),rules:{}};return ao.set(n,t),t}function rl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ `;for(let b=0;b<=1;b+=a){const y=e+(t-e)*l(b);u+=b*100+`%{${o(y,1-y)}} `}const f=u+`100% {${o(t,1-t)}} -}`,c=`__svelte_${w_(f)}_${r}`,d=Up(n),{stylesheet:m,rules:g}=ao.get(d)||S_(d,n);g[c]||(g[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const v=n.style.animation||"";return n.style.animation=`${v?`${v}, `:""}${c} ${i}ms linear ${s}ms 1 both`,uo+=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(", "),uo-=s,uo||$_())}function $_(){sa(()=>{uo||(ao.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),ao.clear())})}function C_(n,e,t,i){if(!e)return oe;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return oe;const{delay:l=0,duration:o=300,easing:r=bl,start:a=Po()+l,end:u=a+o,tick:f=oe,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,g;function v(){c&&(g=rl(n,0,1,o,l,r,c)),l||(m=!0)}function b(){c&&al(n,g),d=!1}return Lo(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),b()),!d)return!1;if(m){const C=y-a,$=0+1*r(C/o);f($,1-$)}return!0}),v(),f(0,1),b}function M_(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,Kp(n,s)}}function Kp(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 Gs(n){ul=n}function Fo(){if(!ul)throw new Error("Function called outside component initialization");return ul}function Jn(n){Fo().$$.on_mount.push(n)}function T_(n){Fo().$$.after_update.push(n)}function D_(n){Fo().$$.on_destroy.push(n)}function hn(){const n=Fo();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Yp(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function pt(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Ws=[],he=[],no=[],Cr=[],Zp=Promise.resolve();let Mr=!1;function Jp(){Mr||(Mr=!0,Zp.then(Gp))}function di(){return Jp(),Zp}function Lt(n){no.push(n)}function He(n){Cr.push(n)}const Jo=new Set;let Fl=0;function Gp(){const n=ul;do{for(;Fl{Ls=null})),Ls}function ts(n,e,t){n.dispatchEvent(Yp(`${e?"intro":"outro"}${t}`))}const io=new Set;let ri;function De(){ri={r:0,c:[],p:ri}}function Oe(){ri.r||st(ri.c),ri=ri.p}function A(n,e){n&&n.i&&(io.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(io.has(n))return;io.add(n),ri.c.push(()=>{io.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const oa={duration:0};function Xp(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&al(n,l)}function u(){const{delay:c=0,duration:d=300,easing:m=bl,tick:g=oe,css:v}=i||oa;v&&(l=rl(n,0,1,d,c,m,v,r++)),g(0,1);const b=Po()+c,y=b+d;o&&o.abort(),s=!0,Lt(()=>ts(n,!0,"start")),o=Lo(C=>{if(s){if(C>=y)return g(1,0),ts(n,!0,"end"),a(),s=!1;if(C>=b){const $=m((C-b)/d);g($,1-$)}}return s})}let f=!1;return{start(){f||(f=!0,al(n),Zn(i)?(i=i(),la().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Qp(n,e,t){let i=e(n,t),s=!0,l;const o=ri;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=bl,tick:c=oe,css:d}=i||oa;d&&(l=rl(n,1,0,u,a,f,d));const m=Po()+a,g=m+u;Lt(()=>ts(n,!1,"start")),Lo(v=>{if(s){if(v>=g)return c(0,1),ts(n,!1,"end"),--o.r||st(o.c),!1;if(v>=m){const b=f((v-m)/u);c(1-b,b)}}return s})}return Zn(i)?la().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&al(n,l),s=!1)}}}function at(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&al(n,a)}function f(d,m){const g=d.b-l;return m*=Math.abs(g),{a:l,b:d.b,d:g,duration:m,start:d.start,end:d.start+m,group:d.group}}function c(d){const{delay:m=0,duration:g=300,easing:v=bl,tick:b=oe,css:y}=s||oa,C={start:Po()+m,b:d};d||(C.group=ri,ri.r+=1),o||r?r=C:(y&&(u(),a=rl(n,l,d,g,m,v,y)),d&&b(0,1),o=f(C,g),Lt(()=>ts(n,d,"start")),Lo($=>{if(r&&$>r.start&&(o=f(r,g),r=null,ts(n,o.b,"start"),y&&(u(),a=rl(n,l,o.b,o.duration,0,v,s.css))),o){if($>=o.end)b(l=o.b,1-l),ts(n,o.b,"end"),r||(o.b?u():--o.group.r||st(o.group.c)),o=null;else if($>=o.start){const S=$-o.start;l=o.a+o.d*v(S/o.duration),b(l,1-l)}}return!!(o||r)}))}return{run(d){Zn(s)?la().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function cn(n,e){n.d(1),e.delete(n.key)}function Bt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function E_(n,e){n.f(),Bt(n,e)}function dt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,m=l.length,g=d;const v={};for(;g--;)v[n[g].key]=g;const b=[],y=new Map,C=new Map;for(g=m;g--;){const D=c(s,l,g),E=t(D);let O=o.get(E);O?i&&O.p(D,e):(O=u(E,D),O.c()),y.set(E,b[g]=O),E in v&&C.set(E,Math.abs(g-v[E]))}const $=new Set,S=new Set;function M(D){A(D,1),D.m(r,f),o.set(D.key,D),f=D.first,m--}for(;d&&m;){const D=b[m-1],E=n[d-1],O=D.key,F=E.key;D===E?(f=D.first,d--,m--):y.has(F)?!o.has(O)||$.has(O)?M(D):S.has(F)?d--:C.get(O)>C.get(F)?(S.add(O),M(D)):($.add(F),d--):(a(E,o),d--)}for(;d--;){const D=n[d];y.has(D.key)||a(D,o)}for(;m;)M(b[m-1]);return b}function bn(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 hi(n){return typeof n=="object"&&n!==null?n:{}}function Re(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function B(n){n&&n.c()}function V(n,e,t,i){const{fragment:s,on_mount:l,on_destroy:o,after_update:r}=n.$$;s&&s.m(e,t),i||Lt(()=>{const a=l.map(jp).filter(Zn);o?o.push(...a):st(a),n.$$.on_mount=[]}),r.forEach(Lt)}function z(n,e){const t=n.$$;t.fragment!==null&&(st(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function A_(n,e){n.$$.dirty[0]===-1&&(Ws.push(n),Jp(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const g=m.length?m[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=g)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](g),f&&A_(n,c)),d}):[],u.update(),f=!0,st(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=k_(e.target);u.fragment&&u.fragment.l(c),c.forEach(k)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),V(n,e.target,e.anchor,e.customElement),Gp()}Gs(a)}class Fe{$destroy(){z(this,1),this.$destroy=oe}$on(e,t){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&&!b_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function an(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 em(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return xp(t,o=>{let r=!1;const a=[];let u=0,f=oe;const c=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=Zn(m)?m:oe},d=s.map((m,g)=>qp(m,v=>{a[g]=v,u&=~(1<{u|=1<{z(f,1)}),Oe()}l?(e=new l(o()),e.$on("routeEvent",r[7]),B(e.$$.fragment),A(e.$$.fragment,1),V(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&&k(t),e&&z(e,r)}}}function L_(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{z(f,1)}),Oe()}l?(e=new l(o()),e.$on("routeEvent",r[6]),B(e.$$.fragment),A(e.$$.fragment,1),V(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&&k(t),e&&z(e,r)}}}function F_(n){let e,t,i,s;const l=[L_,P_],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=lt()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(De(),P(o[f],1,1,()=>{o[f]=null}),Oe(),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&&k(i)}}}function Ja(){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 Io=xp(null,function(e){e(Ja());const t=()=>{e(Ja())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});em(Io,n=>n.location);em(Io,n=>n.querystring);const Ga=si(void 0);async function Ts(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await di();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 Tn(n,e){if(e=Qa(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with
tags');return Xa(n,e),{update(t){t=Qa(t),Xa(n,t)}}}function Xa(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||I_(i.currentTarget.getAttribute("href"))})}function Qa(n){return n&&typeof n=="string"?{href:n}:n||{}}function I_(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0,void 0),window.location.hash=n}function N_(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(M,D){if(!D||typeof D!="function"&&(typeof D!="object"||D._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:E,keys:O}=tm(M);this.path=M,typeof D=="object"&&D._sveltesparouter===!0?(this.component=D.component,this.conditions=D.conditions||[],this.userData=D.userData,this.props=D.props||{}):(this.component=()=>Promise.resolve(D),this.conditions=[],this.props={}),this._pattern=E,this._keys=O}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 F=M.match(s);if(F&&F[0])M=M.substr(F[0].length)||"/";else return null}}const D=this._pattern.exec(M);if(D===null)return null;if(this._keys===!1)return D;const E={};let O=0;for(;O{r.push(new o(M,S))}):Object.keys(i).forEach(S=>{r.push(new o(S,i[S]))});let a=null,u=null,f={};const c=hn();async function d(S,M){await di(),c(S,M)}let m=null,g=null;l&&(g=S=>{S.state&&S.state.__svelte_spa_router_scrollY?m=S.state:m=null},window.addEventListener("popstate",g),T_(()=>{m?window.scrollTo(m.__svelte_spa_router_scrollX,m.__svelte_spa_router_scrollY):window.scrollTo(0,0)}));let v=null,b=null;const y=Io.subscribe(async S=>{v=S;let M=0;for(;M{Ga.set(u)});return}t(0,a=null),b=null,Ga.set(void 0)});D_(()=>{y(),g&&window.removeEventListener("popstate",g)});function C(S){pt.call(this,n,S)}function $(S){pt.call(this,n,S)}return n.$$set=S=>{"routes"in S&&t(3,i=S.routes),"prefix"in S&&t(4,s=S.prefix),"restoreScrollState"in S&&t(5,l=S.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,C,$]}class R_ extends Fe{constructor(e){super(),Le(this,e,N_,F_,Pe,{routes:3,prefix:4,restoreScrollState:5})}}const so=[];let nm;function im(n){const e=n.pattern.test(nm);xa(n,n.className,e),xa(n,n.inactiveClassName,!e)}function xa(n,e,t){(e||"").split(" ").forEach(i=>{!i||(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Io.subscribe(n=>{nm=n.location+(n.querystring?"?"+n.querystring:""),so.map(im)});function oi(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"?tm(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return so.push(i),im(i),{destroy(){so.splice(so.indexOf(i),1)}}}const H_="modulepreload",j_=function(n){return"/_/"+n},eu={},Qi=function(e,t,i){return!t||t.length===0?e():Promise.all(t.map(s=>{if(s=j_(s),s in eu)return;eu[s]=!0;const l=s.endsWith(".css"),o=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${o}`))return;const r=document.createElement("link");if(r.rel=l?"stylesheet":H_,l||(r.as="script",r.crossOrigin=""),r.href=s,document.head.appendChild(r),l)return new Promise((a,u)=>{r.addEventListener("load",a),r.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())};var Tr=function(n,e){return Tr=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])},Tr(n,e)};function dn(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}Tr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Dr=function(){return Dr=Object.assign||function(n){for(var e,t=1,i=arguments.length;t0&&s[s.length-1])||f[0]!==6&&f[0]!==2)){o=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]0&&(!i.exp||i.exp-t>Date.now()/1e3))},n}(),vl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){this.id=e.id!==void 0?e.id:"",this.created=e.created!==void 0?e.created:"",this.updated=e.updated!==void 0?e.updated:""},Object.defineProperty(n.prototype,"isNew",{get:function(){return!this.id||this.id==="00000000-0000-0000-0000-000000000000"},enumerable:!1,configurable:!0}),n.prototype.clone=function(){return new this.constructor(JSON.parse(JSON.stringify(this)))},n.prototype.export=function(){return Object.assign({},this)},n}(),fo=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return dn(e,n),e.prototype.load=function(t){n.prototype.load.call(this,t);for(var i=0,s=Object.entries(t);i0?n:1,this.perPage=e>=0?e:0,this.totalItems=t>=0?t:0,this.items=i||[]},rm=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return dn(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 Xs(l,void 0,void 0,function(){return Qs(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=400)throw new Go({url:$.url,status:$.status,data:S});return[2,S]}})})}).catch(function($){throw $ instanceof Go?$:new Go($)})},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 ns(n){return typeof n=="number"}function Ro(n){return typeof n=="number"&&n%1===0}function x_(n){return typeof n=="string"}function e0(n){return Object.prototype.toString.call(n)==="[object Date]"}function Dm(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function t0(n){return Array.isArray(n)?n:[n]}function tu(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 n0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ss(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function vi(n,e,t){return Ro(n)&&n>=e&&n<=t}function i0(n,e){return n-e*Math.floor(n/e)}function xt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Di(n){if(!(vt(n)||n===null||n===""))return parseInt(n,10)}function Bi(n){if(!(vt(n)||n===null||n===""))return parseFloat(n)}function ua(n){if(!(vt(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function fa(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function yl(n){return n%4===0&&(n%100!==0||n%400===0)}function xs(n){return yl(n)?366:365}function ho(n,e){const t=i0(e-1,12)+1,i=n+(e-t)/12;return t===2?yl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function ca(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 po(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 Ar(n){return n>99?n:n>60?1900+n:2e3+n}function Om(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 Em(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new qn(`Invalid unit value ${n}`);return e}function mo(n,e){const t={};for(const i in n)if(Ss(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Em(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}${xt(t,2)}:${xt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${xt(t,2)}${xt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function jo(n){return n0(n,["hour","minute","second","millisecond"])}const Am=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,s0=["January","February","March","April","May","June","July","August","September","October","November","December"],Pm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],l0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Lm(n){switch(n){case"narrow":return[...l0];case"short":return[...Pm];case"long":return[...s0];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 Fm=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Im=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],o0=["M","T","W","T","F","S","S"];function Nm(n){switch(n){case"narrow":return[...o0];case"short":return[...Im];case"long":return[...Fm];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Rm=["AM","PM"],r0=["Before Christ","Anno Domini"],a0=["BC","AD"],u0=["B","A"];function Hm(n){switch(n){case"narrow":return[...u0];case"short":return[...a0];case"long":return[...r0];default:return null}}function f0(n){return Rm[n.hour<12?0:1]}function c0(n,e){return Nm(e)[n.weekday-1]}function d0(n,e){return Lm(e)[n.month-1]}function h0(n,e){return Hm(e)[n.year<0?0:1]}function p0(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 nu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const m0={D:Er,DD:um,DDD:fm,DDDD:cm,t:dm,tt:hm,ttt:pm,tttt:mm,T:gm,TT:_m,TTT:bm,TTTT:vm,f:ym,ff:wm,fff:$m,ffff:Mm,F:km,FF:Sm,FFF:Cm,FFFF:Tm};class kn{static create(e,t={}){return new kn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return m0[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 xt(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,g)=>this.loc.extract(e,m,g),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?f0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,g)=>i?d0(e,m):l(g?{month:m}:{month:m,day:"numeric"},"month"),u=(m,g)=>i?c0(e,m):l(g?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const g=kn.macroTokenToFormatOpts(m);return g?this.formatWithSystemDefault(e,g):m},c=m=>i?h0(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 nu(kn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=kn.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 nu(l,s(r))}}class xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class kl{get type(){throw new Mi}get name(){throw new Mi}get ianaName(){return this.name}get isUniversal(){throw new Mi}offsetName(e,t){throw new Mi}formatOffset(e,t){throw new Mi}offset(e){throw new Mi}equals(e){throw new Mi}get isValid(){throw new Mi}}let Xo=null;class da extends kl{static get instance(){return Xo===null&&(Xo=new da),Xo}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Om(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 lo={};function g0(n){return lo[n]||(lo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),lo[n]}const _0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function b0(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 v0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?g:1e3+g,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Qo=null;class gn extends kl{static get utcInstance(){return Qo===null&&(Qo=new gn(0)),Qo}static instance(e){return e===0?gn.utcInstance:new gn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new gn(Ho(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${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 y0 extends kl{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 Oi(n,e){if(vt(n)||n===null)return e;if(n instanceof kl)return n;if(x_(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?gn.utcInstance:gn.parseSpecifier(t)||ki.create(n)}else return ns(n)?gn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new y0(n)}let iu=()=>Date.now(),su="system",lu=null,ou=null,ru=null,au;class sn{static get now(){return iu}static set now(e){iu=e}static set defaultZone(e){su=e}static get defaultZone(){return Oi(su,da.instance)}static get defaultLocale(){return lu}static set defaultLocale(e){lu=e}static get defaultNumberingSystem(){return ou}static set defaultNumberingSystem(e){ou=e}static get defaultOutputCalendar(){return ru}static set defaultOutputCalendar(e){ru=e}static get throwOnInvalid(){return au}static set throwOnInvalid(e){au=e}static resetCaches(){Wt.resetCache(),ki.resetCache()}}let uu={};function k0(n,e={}){const t=JSON.stringify([n,e]);let i=uu[t];return i||(i=new Intl.ListFormat(n,e),uu[t]=i),i}let Pr={};function Lr(n,e={}){const t=JSON.stringify([n,e]);let i=Pr[t];return i||(i=new Intl.DateTimeFormat(n,e),Pr[t]=i),i}let Fr={};function w0(n,e={}){const t=JSON.stringify([n,e]);let i=Fr[t];return i||(i=new Intl.NumberFormat(n,e),Fr[t]=i),i}let Ir={};function S0(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Ir[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Ir[s]=l),l}let Ks=null;function $0(){return Ks||(Ks=new Intl.DateTimeFormat().resolvedOptions().locale,Ks)}function C0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Lr(n).resolvedOptions()}catch{t=Lr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function M0(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function T0(n){const e=[];for(let t=1;t<=12;t++){const i=tt.utc(2016,t,1);e.push(n(i))}return e}function D0(n){const e=[];for(let t=1;t<=7;t++){const i=tt.utc(2016,11,13+t);e.push(n(i))}return e}function Nl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function O0(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 E0{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=w0(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):fa(e,3);return xt(t,this.padTo)}}}class A0{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&&ki.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:tt.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=Lr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class P0{constructor(e,t,i){this.opts={style:"long",...i},!t&&Dm()&&(this.rtf=S0(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):p0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Wt{static fromOpts(e){return Wt.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||sn.defaultLocale,o=l||(s?"en-US":$0()),r=t||sn.defaultNumberingSystem,a=i||sn.defaultOutputCalendar;return new Wt(o,r,a,l)}static resetCache(){Ks=null,Pr={},Fr={},Ir={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Wt.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=C0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=M0(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=O0(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:Wt.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return Nl(this,e,i,Lm,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=T0(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Nl(this,e,i,Nm,()=>{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]=D0(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Nl(this,void 0,e,()=>Rm,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[tt.utc(2016,11,13,9),tt.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Nl(this,e,t,Hm,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[tt.utc(-40,1,1),tt.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 E0(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new A0(e,this.intl,t)}relFormatter(e={}){return new P0(this.intl,this.isEnglish(),e)}listFormatter(e={}){return k0(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 Ds(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Os(...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 Es(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 jm(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(g||m&&f)?-m:m;return[{years:d(Bi(t)),months:d(Bi(i)),weeks:d(Bi(s)),days:d(Bi(l)),hours:d(Bi(o)),minutes:d(Bi(r)),seconds:d(Bi(a),a==="-0"),milliseconds:d(ua(u),c)}]}const W0={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function ma(n,e,t,i,s,l,o){const r={year:e.length===2?Ar(Di(e)):Di(e),month:Pm.indexOf(t)+1,day:Di(i),hour:Di(s),minute:Di(l)};return o&&(r.second=Di(o)),n&&(r.weekday=n.length>3?Fm.indexOf(n)+1:Im.indexOf(n)+1),r}const Y0=/^(?:(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 K0(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=ma(e,s,i,t,l,o,r);let m;return a?m=W0[a]:u?m=0:m=Ho(f,c),[d,new gn(m)]}function Z0(n){return n.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const J0=/^(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$/,G0=/^(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$/,X0=/^(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 fu(n){const[,e,t,i,s,l,o,r]=n;return[ma(e,s,i,t,l,o,r),gn.utcInstance]}function Q0(n){const[,e,t,i,s,l,o,r]=n;return[ma(e,r,t,i,s,l,o),gn.utcInstance]}const x0=Ds(F0,pa),eb=Ds(I0,pa),tb=Ds(N0,pa),nb=Ds(Vm),Bm=Os(V0,As,wl,Sl),ib=Os(R0,As,wl,Sl),sb=Os(H0,As,wl,Sl),lb=Os(As,wl,Sl);function ob(n){return Es(n,[x0,Bm],[eb,ib],[tb,sb],[nb,lb])}function rb(n){return Es(Z0(n),[Y0,K0])}function ab(n){return Es(n,[J0,fu],[G0,fu],[X0,Q0])}function ub(n){return Es(n,[B0,U0])}const fb=Os(As);function cb(n){return Es(n,[z0,fb])}const db=Ds(j0,q0),hb=Ds(zm),pb=Os(As,wl,Sl);function mb(n){return Es(n,[db,Bm],[hb,pb])}const gb="Invalid Duration",Um={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}},_b={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},...Um},Nn=146097/400,hs=146097/4800,bb={years:{quarters:4,months:12,weeks:Nn/7,days:Nn,hours:Nn*24,minutes:Nn*24*60,seconds:Nn*24*60*60,milliseconds:Nn*24*60*60*1e3},quarters:{months:3,weeks:Nn/28,days:Nn/4,hours:Nn*24/4,minutes:Nn*24*60/4,seconds:Nn*24*60*60/4,milliseconds:Nn*24*60*60*1e3/4},months:{weeks:hs/7,days:hs,hours:hs*24,minutes:hs*24*60,seconds:hs*24*60*60,milliseconds:hs*24*60*60*1e3},...Um},Ji=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vb=Ji.slice(0).reverse();function Ui(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new wt(i)}function yb(n){return n<0?Math.floor(n):Math.ceil(n)}function Wm(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?yb(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function kb(n,e){vb.reduce((t,i)=>vt(e[i])?t:(t&&Wm(n,e,t,e,i),i),null)}class wt{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Wt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?bb:_b,this.isLuxonDuration=!0}static fromMillis(e,t){return wt.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new qn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new wt({values:mo(e,wt.normalizeUnit),loc:Wt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ns(e))return wt.fromMillis(e);if(wt.isDuration(e))return e;if(typeof e=="object")return wt.fromObject(e);throw new qn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=ub(e);return i?wt.fromObject(i,t):wt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=cb(e);return i?wt.fromObject(i,t):wt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new qn("need to specify a reason the Duration is invalid");const i=e instanceof xn?e:new xn(e,t);if(sn.throwOnInvalid)throw new G_(i);return new wt({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 am(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?kn.create(this.loc,i).formatDurationFromString(this,e):gb}toHuman(e={}){const t=Ji.map(i=>{const s=this.values[i];return vt(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+=fa(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=wt.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 Ui(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=wt.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]=Em(e(this.values[i],i));return Ui(this,{values:t},!0)}get(e){return this[wt.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...mo(e,wt.normalizeUnit)};return Ui(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Ui(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return kb(this.matrix,e),Ui(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>wt.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;ns(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)Ji.indexOf(u)>Ji.indexOf(o)&&Wm(this.matrix,s,u,t,o)}else ns(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Ui(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Ui(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Ji)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Fs="Invalid Interval";function wb(n,e){return!n||!n.isValid?Kt.invalid("missing or invalid start"):!e||!e.isValid?Kt.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?Kt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Rs).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(Kt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=wt.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(Kt.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:Kt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Kt.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(Kt.fromDateTimes(t,a.time)),t=null);return Kt.merge(s)}difference(...e){return Kt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Fs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Fs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Fs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Fs}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Fs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):wt.invalid(this.invalidReason)}mapEndpoints(e){return Kt.fromDateTimes(e(this.s),e(this.e))}}class Rl{static hasDST(e=sn.defaultZone){const t=tt.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ki.isValidZone(e)}static normalizeZone(e){return Oi(e,sn.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Wt.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Wt.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Wt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Wt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Wt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Wt.create(t,null,"gregory").eras(e)}static features(){return{relative:Dm()}}}function cu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(wt.fromMillis(i).as("days"))}function Sb(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=cu(r,a);return(u-u%7)/7}],["days",cu]],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 $b(n,e,t,i){let[s,l,o,r]=Sb(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?wt.fromMillis(a,i).shiftTo(...u).plus(f):f}const ga={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},du={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]},Cb=ga.hanidec.replace(/[\[|\]]/g,"").split("");function Mb(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Xn({numberingSystem:n},e=""){return new RegExp(`${ga[n||"latn"]}${e}`)}const Tb="missing Intl.DateTimeFormat.formatToParts support";function Dt(n,e=t=>t){return{regex:n,deser:([t])=>e(Mb(t))}}const Db=String.fromCharCode(160),Ym=`[ ${Db}]`,Km=new RegExp(Ym,"g");function Ob(n){return n.replace(/\./g,"\\.?").replace(Km,Ym)}function hu(n){return n.replace(/\./g,"").replace(Km," ").toLowerCase()}function Qn(n,e){return n===null?null:{regex:RegExp(n.map(Ob).join("|")),deser:([t])=>n.findIndex(i=>hu(t)===hu(i))+e}}function pu(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function xo(n){return{regex:n,deser:([e])=>e}}function Eb(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Ab(n,e){const t=Xn(e),i=Xn(e,"{2}"),s=Xn(e,"{3}"),l=Xn(e,"{4}"),o=Xn(e,"{6}"),r=Xn(e,"{1,2}"),a=Xn(e,"{1,3}"),u=Xn(e,"{1,6}"),f=Xn(e,"{1,9}"),c=Xn(e,"{2,4}"),d=Xn(e,"{4,6}"),m=b=>({regex:RegExp(Eb(b.val)),deser:([y])=>y,literal:!0}),v=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Qn(e.eras("short",!1),0);case"GG":return Qn(e.eras("long",!1),0);case"y":return Dt(u);case"yy":return Dt(c,Ar);case"yyyy":return Dt(l);case"yyyyy":return Dt(d);case"yyyyyy":return Dt(o);case"M":return Dt(r);case"MM":return Dt(i);case"MMM":return Qn(e.months("short",!0,!1),1);case"MMMM":return Qn(e.months("long",!0,!1),1);case"L":return Dt(r);case"LL":return Dt(i);case"LLL":return Qn(e.months("short",!1,!1),1);case"LLLL":return Qn(e.months("long",!1,!1),1);case"d":return Dt(r);case"dd":return Dt(i);case"o":return Dt(a);case"ooo":return Dt(s);case"HH":return Dt(i);case"H":return Dt(r);case"hh":return Dt(i);case"h":return Dt(r);case"mm":return Dt(i);case"m":return Dt(r);case"q":return Dt(r);case"qq":return Dt(i);case"s":return Dt(r);case"ss":return Dt(i);case"S":return Dt(a);case"SSS":return Dt(s);case"u":return xo(f);case"uu":return xo(r);case"uuu":return Dt(t);case"a":return Qn(e.meridiems(),0);case"kkkk":return Dt(l);case"kk":return Dt(c,Ar);case"W":return Dt(r);case"WW":return Dt(i);case"E":case"c":return Dt(t);case"EEE":return Qn(e.weekdays("short",!1,!1),1);case"EEEE":return Qn(e.weekdays("long",!1,!1),1);case"ccc":return Qn(e.weekdays("short",!0,!1),1);case"cccc":return Qn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return pu(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return pu(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return xo(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:Tb};return v.token=n,v}const Pb={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 Lb(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=Pb[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function Fb(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function Ib(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 Nb(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 vt(n.z)||(t=ki.create(n.z)),vt(n.Z)||(t||(t=new gn(n.Z)),i=n.Z),vt(n.q)||(n.M=(n.q-1)*3+1),vt(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),vt(n.u)||(n.S=ua(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let er=null;function Rb(){return er||(er=tt.fromMillis(1555555555555)),er}function Hb(n,e){if(n.literal)return n;const t=kn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=kn.create(e,t).formatDateTimeParts(Rb()).map(o=>Lb(o,e,t));return l.includes(void 0)?n:l}function jb(n,e){return Array.prototype.concat(...n.map(t=>Hb(t,e)))}function Zm(n,e,t){const i=jb(kn.parseFormat(t),n),s=i.map(o=>Ab(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=Fb(s),a=RegExp(o,"i"),[u,f]=Ib(e,a,r),[c,d,m]=f?Nb(f):[null,null,void 0];if(Ss(f,"a")&&Ss(f,"H"))throw new Ys("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 qb(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=Zm(n,e,t);return[i,s,l,o]}const Jm=[0,31,59,90,120,151,181,212,243,273,304,334],Gm=[0,31,60,91,121,152,182,213,244,274,305,335];function zn(n,e){return new xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Xm(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 Qm(n,e,t){return t+(yl(n)?Gm:Jm)[e-1]}function xm(n,e){const t=yl(n)?Gm:Jm,i=t.findIndex(l=>lpo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...jo(n)}}function mu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Xm(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}=xm(r,o);return{year:r,month:a,day:u,...jo(n)}}function tr(n){const{year:e,month:t,day:i}=n,s=Qm(e,t,i);return{year:e,ordinal:s,...jo(n)}}function gu(n){const{year:e,ordinal:t}=n,{month:i,day:s}=xm(e,t);return{year:e,month:i,day:s,...jo(n)}}function Vb(n){const e=Ro(n.weekYear),t=vi(n.weekNumber,1,po(n.weekYear)),i=vi(n.weekday,1,7);return e?t?i?!1:zn("weekday",n.weekday):zn("week",n.week):zn("weekYear",n.weekYear)}function zb(n){const e=Ro(n.year),t=vi(n.ordinal,1,xs(n.year));return e?t?!1:zn("ordinal",n.ordinal):zn("year",n.year)}function eg(n){const e=Ro(n.year),t=vi(n.month,1,12),i=vi(n.day,1,ho(n.year,n.month));return e?t?i?!1:zn("day",n.day):zn("month",n.month):zn("year",n.year)}function tg(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=vi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=vi(t,0,59),r=vi(i,0,59),a=vi(s,0,999);return l?o?r?a?!1:zn("millisecond",s):zn("second",i):zn("minute",t):zn("hour",e)}const nr="Invalid DateTime",_u=864e13;function Hl(n){return new xn("unsupported zone",`the zone "${n.name}" is not supported`)}function ir(n){return n.weekData===null&&(n.weekData=Nr(n.c)),n.weekData}function Is(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new tt({...t,...e,old:t})}function ng(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 bu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function oo(n,e,t){return ng(ca(n),e,t)}function vu(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=wt.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=ca(l);let[a,u]=ng(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Ns(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=tt.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return tt.invalid(new xn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function jl(n,e,t=!0){return n.isValid?kn.create(Wt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function sr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=xt(n.c.year,t?6:4),e?(i+="-",i+=xt(n.c.month),i+="-",i+=xt(n.c.day)):(i+=xt(n.c.month),i+=xt(n.c.day)),i}function yu(n,e,t,i,s,l){let o=xt(n.c.hour);return e?(o+=":",o+=xt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=xt(n.c.minute),(n.c.second!==0||!t)&&(o+=xt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=xt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=xt(Math.trunc(-n.o/60)),o+=":",o+=xt(Math.trunc(-n.o%60))):(o+="+",o+=xt(Math.trunc(n.o/60)),o+=":",o+=xt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const ig={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Bb={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Ub={ordinal:1,hour:0,minute:0,second:0,millisecond:0},sg=["year","month","day","hour","minute","second","millisecond"],Wb=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Yb=["year","ordinal","hour","minute","second","millisecond"];function ku(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 am(n);return e}function wu(n,e){const t=Oi(e.zone,sn.defaultZone),i=Wt.fromObject(e),s=sn.now();let l,o;if(vt(n.year))l=s;else{for(const u of sg)vt(n[u])&&(n[u]=ig[u]);const r=eg(n)||tg(n);if(r)return tt.invalid(r);const a=t.offset(s);[l,o]=oo(n,a,t)}return new tt({ts:l,zone:t,loc:i,o})}function Su(n,e,t){const i=vt(t.round)?!0:t.round,s=(o,r)=>(o=fa(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 $u(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 tt{constructor(e){const t=e.zone||sn.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new xn("invalid input"):null)||(t.isValid?null:Hl(t));this.ts=vt(e.ts)?sn.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=bu(this.ts,r),i=Number.isNaN(s.year)?new xn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Wt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new tt({})}static local(){const[e,t]=$u(arguments),[i,s,l,o,r,a,u]=t;return wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=$u(arguments),[i,s,l,o,r,a,u]=t;return e.zone=gn.utcInstance,wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=e0(e)?e.valueOf():NaN;if(Number.isNaN(i))return tt.invalid("invalid input");const s=Oi(t.zone,sn.defaultZone);return s.isValid?new tt({ts:i,zone:s,loc:Wt.fromObject(t)}):tt.invalid(Hl(s))}static fromMillis(e,t={}){if(ns(e))return e<-_u||e>_u?tt.invalid("Timestamp out of range"):new tt({ts:e,zone:Oi(t.zone,sn.defaultZone),loc:Wt.fromObject(t)});throw new qn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ns(e))return new tt({ts:e*1e3,zone:Oi(t.zone,sn.defaultZone),loc:Wt.fromObject(t)});throw new qn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Oi(t.zone,sn.defaultZone);if(!i.isValid)return tt.invalid(Hl(i));const s=sn.now(),l=vt(t.specificOffset)?i.offset(s):t.specificOffset,o=mo(e,ku),r=!vt(o.ordinal),a=!vt(o.year),u=!vt(o.month)||!vt(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=Wt.fromObject(t);if((f||r)&&c)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Ys("Can't mix ordinal dates with month/day");const m=c||o.weekday&&!f;let g,v,b=bu(s,l);m?(g=Wb,v=Bb,b=Nr(b)):r?(g=Yb,v=Ub,b=tr(b)):(g=sg,v=ig);let y=!1;for(const O of g){const F=o[O];vt(F)?y?o[O]=v[O]:o[O]=b[O]:y=!0}const C=m?Vb(o):r?zb(o):eg(o),$=C||tg(o);if($)return tt.invalid($);const S=m?mu(o):r?gu(o):o,[M,D]=oo(S,l,i),E=new tt({ts:M,zone:i,o:D,loc:d});return o.weekday&&f&&e.weekday!==E.weekday?tt.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${E.toISO()}`):E}static fromISO(e,t={}){const[i,s]=ob(e);return Ns(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=rb(e);return Ns(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=ab(e);return Ns(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(vt(e)||vt(t))throw new qn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Wt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=qb(o,e,t);return f?tt.invalid(f):Ns(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return tt.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=mb(e);return Ns(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new qn("need to specify a reason the DateTime is invalid");const i=e instanceof xn?e:new xn(e,t);if(sn.throwOnInvalid)throw new Z_(i);return new tt({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?ir(this).weekYear:NaN}get weekNumber(){return this.isValid?ir(this).weekNumber:NaN}get weekday(){return this.isValid?ir(this).weekday:NaN}get ordinal(){return this.isValid?tr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Rl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Rl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Rl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Rl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return yl(this.year)}get daysInMonth(){return ho(this.year,this.month)}get daysInYear(){return this.isValid?xs(this.year):NaN}get weeksInWeekYear(){return this.isValid?po(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=kn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(gn.instance(e),t)}toLocal(){return this.setZone(sn.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Oi(e,sn.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=oo(o,l,e)}return Is(this,{ts:s,zone:e})}else return tt.invalid(Hl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Is(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=mo(e,ku),i=!vt(t.weekYear)||!vt(t.weekNumber)||!vt(t.weekday),s=!vt(t.ordinal),l=!vt(t.year),o=!vt(t.month)||!vt(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Ys("Can't mix ordinal dates with month/day");let u;i?u=mu({...Nr(this.c),...t}):vt(t.ordinal)?(u={...this.toObject(),...t},vt(t.day)&&(u.day=Math.min(ho(u.year,u.month),u.day))):u=gu({...tr(this.c),...t});const[f,c]=oo(u,this.o,this.zone);return Is(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=wt.fromDurationLike(e);return Is(this,vu(this,t))}minus(e){if(!this.isValid)return this;const t=wt.fromDurationLike(e).negate();return Is(this,vu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=wt.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?kn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):nr}toLocaleString(e=Er,t={}){return this.isValid?kn.create(this.loc.clone(t),e).formatDateTime(this):nr}toLocaleParts(e={}){return this.isValid?kn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=sr(this,o);return r+="T",r+=yu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?sr(this,e==="extended"):null}toISOWeekDate(){return jl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+yu(this,o==="extended",t,e,i,l):null}toRFC2822(){return jl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return jl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?sr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),jl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():nr}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 wt.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=t0(t).map(wt.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=$b(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(tt.now(),e,t)}until(e){return this.isValid?Kt.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||tt.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(tt.isDateTime))throw new qn("max requires all arguments be DateTimes");return tu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Wt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return Zm(o,e,t)}static fromStringExplain(e,t,i={}){return tt.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Er}static get DATE_MED(){return um}static get DATE_MED_WITH_WEEKDAY(){return X_}static get DATE_FULL(){return fm}static get DATE_HUGE(){return cm}static get TIME_SIMPLE(){return dm}static get TIME_WITH_SECONDS(){return hm}static get TIME_WITH_SHORT_OFFSET(){return pm}static get TIME_WITH_LONG_OFFSET(){return mm}static get TIME_24_SIMPLE(){return gm}static get TIME_24_WITH_SECONDS(){return _m}static get TIME_24_WITH_SHORT_OFFSET(){return bm}static get TIME_24_WITH_LONG_OFFSET(){return vm}static get DATETIME_SHORT(){return ym}static get DATETIME_SHORT_WITH_SECONDS(){return km}static get DATETIME_MED(){return wm}static get DATETIME_MED_WITH_SECONDS(){return Sm}static get DATETIME_MED_WITH_WEEKDAY(){return Q_}static get DATETIME_FULL(){return $m}static get DATETIME_FULL_WITH_SECONDS(){return Cm}static get DATETIME_HUGE(){return Mm}static get DATETIME_HUGE_WITH_SECONDS(){return Tm}}function Rs(n){if(tt.isDateTime(n))return n;if(n&&n.valueOf&&ns(n.valueOf()))return tt.fromJSDate(n);if(n&&typeof n=="object")return tt.fromObject(n);throw new qn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}class Y{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-01T00:00:00Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||Y.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 Y.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!Y.isEmpty(e[t]))return!0;return!1}static isObjectArrayWithKeys(e,t){if(!Array.isArray(e)||typeof e[0]!="object")return!1;if(e.length==0)return!0;let i=Y.toArray(t);for(let s of i)if(!(s in e[0]))return!1;return!0}static toArray(e,t=!1){return Array.isArray(e)?e:(t||!Y.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){Y.inArray(e,t)||e.push(t)}static findByKey(e,t,i){for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){let 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"){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]=Y.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(!Y.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(!Y.isObject(e)&&!Array.isArray(e)){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)(!Y.isObject(l)&&!Array.isArray(l)||!Y.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)(!Y.isObject(s)&&!Array.isArray(s)||!Y.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):Y.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||Y.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||Y.isObject(e)&&Object.keys(e).length>0)&&Y.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 openInWindow(e,t,i,s){t=t||1024,i=i||768,s=s||"popup";let l=window.innerWidth,o=window.innerHeight;t=t>l?l:t,i=i>o?o:i;let r=l/2-t/2,a=o/2-i/2;return window.open(e,s,"width="+t+",height="+i+",top="+a+",left="+r+",resizable,menubar=no")}static getQueryString(e){let t=e.indexOf("?");if(t<0)return"";let i=e.indexOf("#");return e.substring(t+1,i>t?i:e.length)}static getQueryParams(e){let t={},i=Y.getQueryString(e).split("&");for(let s in i){let l=i[s].split("=");if(l.length===2){let o=decodeURIComponent(l[1]);if(o.startsWith("{")||o.startsWith("["))try{o=JSON.parse(o)}catch{}t[decodeURIComponent(l[0])]=o}}return t}static setQueryParams(e,t,i=!0){let s=Y.getQueryString(e),l=i&&s?Y.getQueryParams(e):{},o=Object.assign(l,t),r="";for(let a in o)Y.isEmpty(o[a])||(r&&(r+="&"),r+=encodeURIComponent(a)+"=",Y.isObject(o[a])?r+=encodeURIComponent(JSON.stringify(o[a])):r+=encodeURIComponent(o[a]));return r=r?"?"+r:"",Y.isEmpty(s)?e+r:e.replace("?"+s,r)}static replaceClientQueryParams(e){let t=Y.setQueryParams(window.location.href,e);window.location.replace(t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return/\.jpg|\.jpeg|\.png|\.svg|\.webp|\.avif$/.test(e)}static checkImageUrl(e){return new Promise((t,i)=>{const s=new Image;s.onload=function(){return t(!0)},s.onerror=function(l){return i(l)},s.src=e})}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(Y.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)Y.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):Y.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static dummyCollectionRecord(e){var s,l,o,r,a;const t=(e==null?void 0:e.schema)||[],i={"@collectionId":e==null?void 0:e.id,"@collectionName":e==null?void 0:e.name,id:"RECORD_ID",created:"2022-01-01 01:00:00",updated:"2022-01-01 23:59:59"};for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON (array/object)":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"||u.type==="user"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)>1&&(f=[f])):f="test",i[u.name]=f}return i}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"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=e||{},e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":case"user":return((t=e.options)==null?void 0:t.maxSelect)>1?"Array":"String";default:return"String"}}}const _a=si([]);function _n(n,e=3e3){return og(n,"success",e)}function lg(n,e=4500){return og(n,"error",e)}function og(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{rg(i)},t)};_a.update(s=>(ag(s,i.message),Y.pushOrReplaceByKey(s,i,"message"),s))}function rg(n){_a.update(e=>(ag(e,n),e))}function ag(n,e){let t;typeof e=="string"?t=Y.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),Y.removeByKey(n,"message",t.message))}const rs=si({});function Ri(n){rs.set(n||{})}function ug(n){rs.update(e=>(Y.deleteByPath(e,n),e))}const ba=si({});function Rr(n){ba.set(n||{})}aa.prototype.logout=function(n=!0){this.AuthStore.clear(),n&&Ts("/login")};aa.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&&lg(l)}if(Y.isEmpty(s.data)||Ri(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Ts("/")};class Kb extends lm{save(e,t){super.save(e,t),t instanceof ws&&Rr(t)}clear(){super.clear(),Rr(null)}}const Se=new aa("/","en-US",new Kb("pb_admin_auth"));Se.AuthStore.model instanceof ws&&Rr(Se.AuthStore.model);function Cu(n){let e,t,i;return{c(){e=_("div"),e.innerHTML=`