@nymphjs/tilmeld-components 1.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/LICENSE +202 -0
- package/README.md +31 -0
- package/dist/index.js +3 -0
- package/dist/index.js.LICENSE.txt +47 -0
- package/dist/index.js.map +1 -0
- package/jest.config.js +6 -0
- package/package.json +57 -0
- package/src/Account.svelte +317 -0
- package/src/ChangePassword.svelte +176 -0
- package/src/Login.svelte +314 -0
- package/src/Recover.svelte +309 -0
- package/src/global.d.ts +1 -0
- package/src/index.d.ts +6 -0
- package/src/index.ts +6 -0
- package/tsconfig.json +10 -0
- package/webpack.config.js +35 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [1.0.0-alpha.2](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2021-09-21)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- split out Tilmeld components into own package ([66eb98f](https://github.com/sciactive/nymphjs/commit/66eb98f81b502236cf7ff8439194759278154a20))
|
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Tilmeld Components - User/Group System for Nymph
|
|
2
|
+
|
|
3
|
+
Powerful object data storage and querying.
|
|
4
|
+
|
|
5
|
+
The Tilmeld Components are front end registration/login, account recovery, account details, and password change components build with (Svelte)[https://svelte.dev/] and (SMUI)[https://sveltematerialui.com/].
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install --save @nymphjs/tilmeld-components
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
You need to have an SMUI theme compiled and installed on your front end app. If you're using Svelte, you need to have TypeScript support and you should use the 'svelte' mainfield from package.json.
|
|
16
|
+
|
|
17
|
+
# License
|
|
18
|
+
|
|
19
|
+
Copyright 2021 SciActive Inc
|
|
20
|
+
|
|
21
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
22
|
+
you may not use this file except in compliance with the License.
|
|
23
|
+
You may obtain a copy of the License at
|
|
24
|
+
|
|
25
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
26
|
+
|
|
27
|
+
Unless required by applicable law or agreed to in writing, software
|
|
28
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
29
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
30
|
+
See the License for the specific language governing permissions and
|
|
31
|
+
limitations under the License.
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
+
(()=>{var t={947:function(t){t.exports=(()=>{var t={73:function(t,n,e){"use strict";var r=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{a(r.next(t))}catch(t){o(t)}}function s(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,s)}a((r=r.apply(t,n||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.InvalidStateError=n.EntityIsSleepingReferenceError=void 0;const o=e(486),u=i(e(116)),s=e(988),a="This entity is in a sleeping reference state. You must use .$ready() to wake it.";class c{constructor(t){return this.guid=null,this.cdate=null,this.mdate=null,this.tags=[],this.$originalTags=[],this.$dirty={},this.$isASleepingReference=!1,this.$sleepingReference=null,this.$readyPromise=null,this.$dataHandler={has:(t,n)=>"symbol"!=typeof n&&this.$isASleepingReference?(console.error(`Tried to check data on a sleeping reference: ${n}`),!1):t.hasOwnProperty(n),get:(t,n)=>{if("symbol"==typeof n||!this.$isASleepingReference)return t.hasOwnProperty(n)?t[n]:void 0;console.error(`Tried to get data on a sleeping reference: ${n}`)},set:(t,n,e)=>"symbol"!=typeof n&&this.$isASleepingReference?(console.error(`Tried to set data on a sleeping reference: ${n}`),!1):("symbol"!=typeof n&&(this.$dirty[n]=!0),t[n]=e,!0),deleteProperty:(t,n)=>"symbol"!=typeof n&&this.$isASleepingReference?(console.error(`Tried to delete data on a sleeping reference: ${n}`),!1):!t.hasOwnProperty(n)||(this.$dirty[n]=!0,delete t[n])},this.$dataStore={},this.$data=new Proxy(this.$dataStore,this.$dataHandler),null!=t&&(this.guid=t,this.$isASleepingReference=!0,this.$sleepingReference=["nymph_entity_reference",this.guid,this.constructor.class],this.$ready()),new Proxy(this,{has:(t,n)=>"string"!=typeof n||n in t||"$"===n.substring(0,1)?n in t:n in t.$data,get:(t,n)=>"string"!=typeof n||n in t||"$"===n.substring(0,1)?t[n]:n in t.$data?t.$data[n]:void 0,set:(t,n,e)=>("string"!=typeof n||n in t||"$"===n.substring(0,1)?t[n]=e:t.$data[n]=e,!0),deleteProperty:(t,n)=>n in t?delete t[n]:!(n in t.$data)||delete t.$data[n],getPrototypeOf:t=>t.constructor.prototype})}static factory(t){return r(this,void 0,void 0,(function*(){const n=new this(t);return null!=t&&(yield n.$ready()),n}))}static factorySync(t){return new this(t)}static factoryReference(t){const n=new this;return n.$referenceSleep(t),n}static serverCallStatic(t,n){return r(this,void 0,void 0,(function*(){return(yield u.default.serverCallStatic(this.class,t,Array.prototype.slice.call(n))).return}))}toJSON(){if(this.$isASleepingReference)throw new l(a);const t={class:this.constructor.class,guid:this.guid,cdate:this.cdate,mdate:this.mdate,tags:[...this.tags],data:{}};for(let[n,e]of Object.entries(this.$dataStore))t.data[n]=(0,s.entitiesToReferences)(e);return t}$init(t){return null==t||(this.$isASleepingReference=!1,this.$sleepingReference=null,this.guid=t.guid,this.cdate=t.cdate,this.mdate=t.mdate,this.tags=t.tags,this.$originalTags=t.tags.slice(0),this.$dirty={},this.$dataStore=Object.entries(t.data).map((([t,n])=>(this.$dirty[t]=!1,{key:t,value:(0,s.referencesToEntities)(n)}))).reduce(((t,{key:n,value:e})=>Object.assign(t,{[n]:e})),{}),this.$data=new Proxy(this.$dataStore,this.$dataHandler)),this}$addTag(...t){if(this.$isASleepingReference)throw new l(a);t.length<1||(this.tags=(0,s.uniqueStrings)([...this.tags,...t]))}$arraySearch(t,n=!1){if(this.$isASleepingReference)throw new l(a);if(!Array.isArray(t))return-1;for(let e=0;e<t.length;e++){const r=t[e];if(n?this.$equals(r):this.$is(r))return e}return-1}$delete(){return r(this,void 0,void 0,(function*(){if(this.$isASleepingReference)throw new l(a);const t=this.guid;return(yield u.default.deleteEntity(this))===t}))}$equals(t){var n,e;if(this.$isASleepingReference)throw new l(a);if(!(t instanceof c))return!1;if((this.guid||t.guid)&&this.guid!==t.guid)return!1;if(t.constructor!==this.constructor)return!1;if(t.cdate!==this.cdate)return!1;if(t.mdate!==this.mdate)return!1;const r=(0,s.sortObj)(t.toJSON());null===(n=r.tags)||void 0===n||n.sort();const i=(0,s.sortObj)(this.toJSON());return null===(e=i.tags)||void 0===e||e.sort(),(0,o.isEqual)(r,i)}$getPatch(){if(this.$isASleepingReference)throw new l(a);if(null==this.guid)throw new f("You can't make a patch from an unsaved entity.");const t={guid:this.guid,mdate:this.mdate,class:this.constructor.class,addTags:this.tags.filter((t=>-1===this.$originalTags.indexOf(t))),removeTags:this.$originalTags.filter((t=>-1===this.tags.indexOf(t))),unset:[],set:{}};for(let[n,e]of Object.entries(this.$dirty))e&&(n in this.$data?t.set[n]=(0,s.entitiesToReferences)(this.$data[n]):t.unset.push(n));return t}$hasTag(...t){if(this.$isASleepingReference)throw new l(a);if(!t.length)return!1;for(let n=0;n<t.length;n++)if(-1===this.tags.indexOf(t[n]))return!1;return!0}$inArray(t,n=!1){return-1!==this.$arraySearch(t,n)}$is(t){var n,e;if(this.$isASleepingReference)throw new l(a);if(!(t instanceof c))return!1;if(this.guid||t.guid)return this.guid===t.guid;if("function"!=typeof t.toJSON)return!1;{const r=(0,s.sortObj)(t.toJSON());null===(n=r.tags)||void 0===n||n.sort();const i=(0,s.sortObj)(this.toJSON());return null===(e=i.tags)||void 0===e||e.sort(),(0,o.isEqual)(r,i)}}$patch(){return r(this,void 0,void 0,(function*(){if(this.$isASleepingReference)throw new l(a);const t=this.mdate;return yield u.default.patchEntity(this),t===this.mdate}))}$ready(){var t;if(!this.$isASleepingReference)return this.$readyPromise=null,Promise.resolve(this);if(null==(null===(t=this.$sleepingReference)||void 0===t?void 0:t[1]))throw new f("Tried to ready a sleeping reference with no GUID.");return this.$readyPromise||(this.$readyPromise=u.default.getEntityData({class:this.constructor},{type:"&",guid:this.$sleepingReference[1]}).then((t=>{if(null==t){const n={data:t,textStatus:"No data returned."};return Promise.reject(n)}return this.$init(t)})).finally((()=>{this.$readyPromise=null}))),this.$readyPromise}$readyAll(t){return new Promise(((n,e)=>{const r=()=>{let r;if(void 0!==t&&(r=t-1),void 0!==r&&r<0)return void n(this);const i=[];for(let[t,n]of Object.entries(this.$data))if(n instanceof c&&n.$isASleepingReference)i.push(n.$readyAll(r));else if(Array.isArray(n))for(let t=0;t<n.length;t++)n[t]instanceof c&&n[t].$isASleepingReference&&i.push(n[t].$readyAll(r));i.length?Promise.all(i).then((()=>n(this)),(t=>e(t))):n(this)};this.$isASleepingReference?this.$ready().then(r,(t=>e(t))):r()}))}$referenceSleep(t){this.$isASleepingReference=!0,this.guid=t[1],this.$sleepingReference=[...t]}$refresh(){return r(this,void 0,void 0,(function*(){if(this.$isASleepingReference)return yield this.$ready(),!0;if(null==this.guid)return!1;const t=yield u.default.getEntityData({class:this.constructor},{type:"&",guid:this.guid});return this.$init(t),null!=this.guid||0}))}$removeTag(...t){if(this.$isASleepingReference)throw new l(a);this.tags=(0,o.difference)(this.tags,t)}$save(){return r(this,void 0,void 0,(function*(){if(this.$isASleepingReference)throw new l(a);return yield u.default.saveEntity(this),!!this.guid}))}$serverCall(t,n,e=!1){return r(this,void 0,void 0,(function*(){if(this.$isASleepingReference)throw new l(a);const r=Array.prototype.slice.call(n),i=yield u.default.serverCall(this,t,r,e);return!e&&i.entity&&this.$init(i.entity),i.return}))}$toReference(){return this.$isASleepingReference&&this.$sleepingReference?this.$sleepingReference:null==this.guid?this:["nymph_entity_reference",this.guid,this.constructor.class]}}n.default=c,c.class="Entity";class l extends Error{constructor(t){super(t),this.name="EntityIsSleepingReferenceError"}}n.EntityIsSleepingReferenceError=l;class f extends Error{constructor(t){super(t),this.name="InvalidStateError"}}n.InvalidStateError=f,u.default.setEntityClass(c.class,c)},128:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0})},872:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=class{constructor(t,n){this.sortProperty=null,this.sortParent=null,this.sortCaseSensitive=null,this.array=t,this.nymph=n}_arraySortProperty(t,n){let e=this.sortProperty,r=this.sortParent;const i=this.nymph.getEntityClass("Entity");if(null!=r&&t[r]instanceof i&&n[r]instanceof i){const i=t[r][e],o=n[r][e];if(void 0!==i||void 0!==o)if(this.sortCaseSensitive||"string"!=typeof i||"string"!=typeof o){if(i>o)return 1;if(i<o)return-1}else{const t=i.toUpperCase(),n=o.toUpperCase();if(t!==n)return t.localeCompare(n)}}const o=t[e],u=n[e];if(!this.sortCaseSensitive&&"string"==typeof o&&"string"==typeof u){const t=o.toUpperCase(),n=u.toUpperCase();return t.localeCompare(n)}return o>u?1:o<u?-1:0}hsort(t,n,e=!1,r=!1){if(this.sort(t,e,r),null==n)return this.array;let i,o=[];for(;this.array.length;){i=!1;for(let t=0;t<this.array.length;t++){if(null==this.array[t][n]||"function"!=typeof this.array[t][n].$inArray||!this.array[t][n].$inArray(o.concat(this.array))){o.push(this.array[t]),this.array.splice(t,1),i=!0;break}if("function"==typeof this.array[t][n].$arraySearch){const e=this.array[t][n].$arraySearch(o);if(-1!==e){const r=[this.array[t][n].guid];let u=Number(e);for(;void 0!==o[u+1]&&null!=o[u+1][n]&&-1!==r.indexOf(o[u+1][n].guid);)r.push(o[u+1].guid),u+=1;u+=1,void 0!==o[u]?o.splice(u,0,this.array[t]):o.push(this.array[t]),this.array.splice(t,1),i=!0;break}}}i||this.array.length&&(o=o.concat(this.array),this.array.splice(0,this.array.length))}return this.array.splice(0,0,...o),this.array}psort(t,n,e=!1,r=!1){return this.sortProperty=t,this.sortParent=n,this.sortCaseSensitive=!!e,this.array.sort(this._arraySortProperty.bind(this)),r&&this.array.reverse(),this.array}sort(t,n=!1,e=!1){return this.sortProperty=t,this.sortParent=null,this.sortCaseSensitive=!!n,this.array.sort(this._arraySortProperty.bind(this)),e&&this.array.reverse(),this.array}}},660:function(t,n){"use strict";var e=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{a(r.next(t))}catch(t){o(t)}}function s(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,s)}a((r=r.apply(t,n||[])).next())}))};Object.defineProperty(n,"__esModule",{value:!0}),n.ServerError=n.ClientError=n.InvalidResponseError=void 0;class r{constructor(t){this.xsrfToken=null,this.requestCallbacks=[],this.responseCallbacks=[],this.fetch=t||((...t)=>fetch(...t))}static makeUrl(t,n){if(!n)return t;for(let[e,r]of Object.entries(n))t=t+(-1!==t.indexOf("?")?"&":"?")+encodeURIComponent(e)+"="+encodeURIComponent(JSON.stringify(r));return t}on(t,n){const e=t+"Callbacks";if(!this.hasOwnProperty(e))throw new Error("Invalid event type.");return this[e].push(n),()=>this.off(t,n)}off(t,n){const e=t+"Callbacks";if(!this.hasOwnProperty(e))return!1;const r=this[e].indexOf(n);return r>-1&&this[e].splice(r,1),!0}setXsrfToken(t){this.xsrfToken=t}GET(t){return e(this,void 0,void 0,(function*(){return yield this._httpRequest("GET",t)}))}POST(t){return e(this,void 0,void 0,(function*(){return yield this._httpRequest("POST",t)}))}PUT(t){return e(this,void 0,void 0,(function*(){return yield this._httpRequest("PUT",t)}))}PATCH(t){return e(this,void 0,void 0,(function*(){return yield this._httpRequest("PATCH",t)}))}DELETE(t){return e(this,void 0,void 0,(function*(){return yield this._httpRequest("DELETE",t)}))}_httpRequest(t,n){return e(this,void 0,void 0,(function*(){const e=JSON.stringify(n.data);let s=n.url;"GET"===t&&(s=r.makeUrl(n.url,n.data));const a={method:t,headers:{},credentials:"include"};"GET"!==t&&n.data&&(a.headers["Content-Type"]="application/json",a.body=e);for(let t=0;t<this.requestCallbacks.length;t++)this.requestCallbacks[t]&&this.requestCallbacks[t](this,s,a);null!==this.xsrfToken&&(a.headers["X-Xsrf-Token"]=this.xsrfToken);const c=yield this.fetch(s,a);if(!c.ok){const t=yield c.text();let n;try{n=JSON.parse(t)}catch(t){if(!(t instanceof SyntaxError))throw t}throw"object"!=typeof n&&(n={textStatus:c.statusText}),n.status=c.status,c.status<500?new o(n):new u(n)}for(let t=0;t<this.responseCallbacks.length;t++)this.responseCallbacks[t]&&this.responseCallbacks[t](this,c);const l=yield c.text();if("json"!==n.dataType)return l;if(!l.length)throw new i("Server response was empty.");try{return JSON.parse(l)}catch(t){if(!(t instanceof SyntaxError))throw t;throw new i("Server response was invalid: "+JSON.stringify(l))}}))}}n.default=r;class i extends Error{constructor(t){super(t),this.name="InvalidResponseError"}}n.InvalidResponseError=i;class o extends Error{constructor(t){super(t.textStatus),this.name="ClientError",Object.assign(this,t)}}n.ClientError=o;class u extends Error{constructor(t){super(t.textStatus),this.name="ServerError",Object.assign(this,t)}}n.ServerError=u},116:function(t,n,e){"use strict";var r=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{a(r.next(t))}catch(t){o(t)}}function s(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,s)}a((r=r.apply(t,n||[])).next())}))},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.InvalidRequestError=n.ClassNotAvailableError=void 0;const o=i(e(660)),u=e(988);let s;class a{static setEntityClass(t,n){this.entityClasses[t]=n}static getEntityClass(t){if(this.entityClasses.hasOwnProperty(t))return this.entityClasses[t];throw new c("Tried to get class that's not available: "+t)}static init(t){this.restUrl=t.restUrl,s=new o.default("fetch"in t?t.fetch:void 0),s.on("request",((t,n,e)=>{for(let t=0;t<this.requestCallbacks.length;t++)this.requestCallbacks[t]&&this.requestCallbacks[t](n,e)})),s.on("response",((t,n)=>{for(let t=0;t<this.responseCallbacks.length;t++)this.responseCallbacks[t]&&this.responseCallbacks[t](n)}))}static newUID(t){return r(this,void 0,void 0,(function*(){const n=yield s.POST({url:this.restUrl,dataType:"text",data:{action:"uid",data:t}});return Number(n)}))}static setUID(t,n){return r(this,void 0,void 0,(function*(){return yield s.PUT({url:this.restUrl,dataType:"json",data:{action:"uid",data:{name:t,value:n}}})}))}static getUID(t){return r(this,void 0,void 0,(function*(){const n=yield s.GET({url:this.restUrl,dataType:"text",data:{action:"uid",data:t}});return Number(n)}))}static deleteUID(t){return r(this,void 0,void 0,(function*(){return yield s.DELETE({url:this.restUrl,dataType:"text",data:{action:"uid",data:t}})}))}static saveEntity(t){return r(this,void 0,void 0,(function*(){let n=null==t.guid?"POST":"PUT";return yield this.requestWithMethod(t,n,t,!1)}))}static saveEntities(t){return r(this,void 0,void 0,(function*(){if(!t.length)return Promise.resolve(!1);let n=null==t[0].guid?"POST":"PUT";return t.forEach((t=>{if("POST"===n&&null!=t.guid||"PUT"===n&&null==t.guid)throw new l("Due to REST restriction, you can only create new entities or update existing entities, not both at the same time.")})),yield this.requestWithMethod(t,n,t,!0)}))}static patchEntity(t){return r(this,void 0,void 0,(function*(){if(null==t.guid)throw new l("You can't patch an entity that hasn't yet been saved.");let n=t.$getPatch();return yield this.requestWithMethod(t,"PATCH",n,!1)}))}static patchEntities(t){return r(this,void 0,void 0,(function*(){if(!t.length)return Promise.resolve(!1);t.forEach((t=>{if(null==t.guid)throw new l("Due to REST restriction, you can only create new entities or update existing entities, not both at the same time.")}));let n=t.map((t=>t.$getPatch()));return yield this.requestWithMethod(t,"PATCH",n,!0)}))}static requestWithMethod(t,n,e,i){return r(this,void 0,void 0,(function*(){const r=yield s[n]({url:this.restUrl,dataType:"json",data:{action:i?"entities":"entity",data:e}});if(i&&Array.isArray(t)&&t.length===r.length)return t.map(((t,n)=>!r[n]||void 0===r[n].guid||null!=t.guid&&t.guid!==r[n].guid?t:t.$init(r[n])));if(!Array.isArray(t)&&void 0!==r.guid)return t.$init(r);throw new Error("Server error")}))}static getEntity(t,...n){return r(this,void 0,void 0,(function*(){const e=yield this.getEntityData(t,...n);return null!=e?t.return&&"guid"===t.return?e:this.initEntity(e):null}))}static getEntityData(t,...n){return r(this,void 0,void 0,(function*(){if(t.class===this.getEntityClass("Entity"))throw new l("You can't make REST requests with the base Entity class.");"string"==typeof n[0]&&(n=[{type:"&",guid:n[0]}]);const e=yield s.GET({url:this.restUrl,dataType:"json",data:{action:"entity",data:[Object.assign(Object.assign({},t),{class:t.class.class}),...(0,u.entityConstructorsToClassNames)(n)]}});return void 0!==e.guid?e:null}))}static getEntities(t,...n){return r(this,void 0,void 0,(function*(){const e=yield s.GET({url:this.restUrl,dataType:"json",data:{action:"entities",data:[Object.assign(Object.assign({},t),{class:t.class.class}),...(0,u.entityConstructorsToClassNames)(n)]}});return t.return&&"guid"===t.return?e:e.map((t=>this.initEntity(t)))}))}static initEntity(t){const n=this.getEntityClass(t.class);if(!n)throw new c(t.class+" class cannot be found.");return n.factorySync().$init(t)}static initEntitiesFromData(t){if(Array.isArray(t))return t.map((t=>this.initEntitiesFromData(t)));if(t instanceof Object&&!(t instanceof this.getEntityClass("Entity"))){if(t.hasOwnProperty("class")&&t.hasOwnProperty("guid")&&t.hasOwnProperty("cdate")&&t.hasOwnProperty("mdate")&&t.hasOwnProperty("tags")&&t.hasOwnProperty("data")&&this.getEntityClass(t.class))return this.initEntity(t);for(let[n,e]of Object.entries(t))t[n]=this.initEntitiesFromData(e)}return t}static deleteEntity(t,n=!1){return r(this,void 0,void 0,(function*(){return yield s.DELETE({url:this.restUrl,dataType:"json",data:{action:n?"entities":"entity",data:n&&Array.isArray(t)?t.map((t=>({guid:t.guid,class:t.constructor.class}))):{guid:t.guid,class:t.constructor.class}}})}))}static deleteEntities(t){return r(this,void 0,void 0,(function*(){return yield this.deleteEntity(t,!0)}))}static serverCall(t,n,e,i=!1){return r(this,void 0,void 0,(function*(){const r=yield s.POST({url:this.restUrl,dataType:"json",data:{action:"method",data:{entity:t,stateless:i,method:n,params:(0,u.entitiesToReferences)((0,u.entityConstructorsToClassNames)(e))}}});return Object.assign(Object.assign({},r),{return:this.initEntitiesFromData(r.return)})}))}static serverCallStatic(t,n,e){return r(this,void 0,void 0,(function*(){const r=yield s.POST({url:this.restUrl,dataType:"json",data:{action:"method",data:{class:t,static:!0,method:n,params:(0,u.entitiesToReferences)((0,u.entityConstructorsToClassNames)(e))}}});return this.initEntitiesFromData(r)}))}static on(t,n){const e=t+"Callbacks";if(!this.hasOwnProperty(e))throw new Error("Invalid event type.");return this[e].push(n),()=>this.off(t,n)}static off(t,n){const e=t+"Callbacks";if(!this.hasOwnProperty(e))return!1;const r=this[e].indexOf(n);return r>-1&&this[e].splice(r,1),!0}static setXsrfToken(t){s.setXsrfToken(t)}}n.default=a,a.entityClasses={},a.requestCallbacks=[],a.responseCallbacks=[];class c extends Error{constructor(t){super(t),this.name="ClassNotAvailableError"}}n.ClassNotAvailableError=c;class l extends Error{constructor(t){super(t),this.name="InvalidRequestError"}}var f;n.InvalidRequestError=l,void 0!==(f="undefined"==typeof window?"undefined"==typeof self?void 0:self:window)&&void 0!==f.NymphOptions&&a.init(f.NymphOptions)},588:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0})},335:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&r(n,t,e);return i(n,t),n};Object.defineProperty(n,"__esModule",{value:!0}),n.PubSubSubscription=void 0;const u=o(e(116));let s=null;class a{static init(t){var n;if(this.pubsubUrl=t.pubsubUrl,this.WebSocket=null!==(n=t.WebSocket)&&void 0!==n?n:WebSocket,this.noConsole=!!t.noConsole,!this.WebSocket)throw new Error("Nymph-PubSub requires WebSocket!");"undefined"!=typeof addEventListener&&addEventListener("online",(()=>this.connect())),("undefined"==typeof navigator||navigator.onLine)&&this.connect()}static isConfigured(){return null!=this.pubsubUrl}static subscribeEntities(t,...n){const e=u.default.getEntities(t,...n),r=[Object.assign(Object.assign({},t),{class:t.class.class}),...n],i=JSON.stringify(r);return(t,n,r)=>{const o=[t,n,r];return e.then(t,n),a._subscribeQuery(i,o),new c(i,o,(()=>{a._unsubscribeQuery(i,o)}))}}static subscribeEntity(t,...n){const e=u.default.getEntity(t,...n),r=[Object.assign(Object.assign({},t),{class:t.class.class,limit:1}),...n],i=JSON.stringify(r);return(t,n,r)=>{const o=[n=>{n.length?t&&t(n[0]):t&&t(null)},n,r];return e.then(t,n),a._subscribeQuery(i,o),new c(i,o,(()=>{a._unsubscribeQuery(i,o)}))}}static subscribeUID(t){const n=u.default.getUID(t);return(e,r,i)=>{const o=[e,r,i];return n.then(e,r),a._subscribeUID(t,o),{unsubscribe:()=>{a._unsubscribeUID(t,o)}}}}static subscribeWith(t,n,e,r){if(!t.guid)throw new u.InvalidRequestError("You can't subscribe to an entity with no GUID.");const i=[{class:t.constructor.class,limit:1},{type:"&",guid:t.guid}],o=JSON.stringify(i),s=[e=>{Array.isArray(e)?e[0].length?t.$init(e[0]):t.guid=null:"removed"in e?t.guid=null:t.$init(e.data),n&&n(t)},e,r];return a._subscribeQuery(o,s),new c(o,s,(()=>{a._unsubscribeQuery(o,s)}))}static connect(){(!this.connection||this.connection.readyState!==this.WebSocket.OPEN&&this.connection.readyState!==this.WebSocket.CONNECTING)&&(this._waitForConnection(),this._attemptConnect())}static close(){this.waitForConnectionTimeout&&clearTimeout(this.waitForConnectionTimeout),this.connection&&this.connection.close(4200,"Closure requested by application.")}static _waitForConnection(t=0){this.waitForConnectionTimeout=setTimeout((()=>{this.connection&&this.connection.readyState!==this.WebSocket.OPEN?this.connection.readyState!==this.WebSocket.CONNECTING||t>=5?(this.connection.close(),this._waitForConnection(),this._attemptConnect()):this._waitForConnection(t+1):this._attemptConnect()}),5e3)}static _attemptConnect(){null!=this.pubsubUrl&&(this.connection=new this.WebSocket(this.pubsubUrl,"nymph"),this.connection.onopen=this._onopen.bind(this),this.connection.onmessage=this._onmessage.bind(this))}static _onopen(){"undefined"==typeof console||this.noConsole||console.log("Nymph-PubSub connection established!");for(let t=0;t<this.connectCallbacks.length;t++){const n=this.connectCallbacks[t];n&&n()}null!=s&&this._send({action:"authenticate",token:s});for(let t in this.subscriptions.queries){if(!this.subscriptions.queries.hasOwnProperty(t))continue;let n=!1;for(let e=0;e<this.subscriptions.queries[t].length;e++)if(this.subscriptions.queries[t][e][2]){n=!0;break}this._sendQuery(t,n)}for(let t in this.subscriptions.uids){if(!this.subscriptions.uids.hasOwnProperty(t))continue;let n=!1;for(let e=0;e<this.subscriptions.uids[t].length;e++)if(this.subscriptions.uids[t][e][2]){n=!0;break}this._sendUID(t,n)}this.connection&&(this.connection.onclose=this._onclose.bind(this))}static _onmessage(t){var n;let e=JSON.parse(t.data),r=[],i="count"in e;if(e.hasOwnProperty("query")&&this.subscriptions.queries.hasOwnProperty(e.query)){if(r=[...this.subscriptions.queries[e.query]],!i)for(let t=0;t<r.length;t++){const n=r[t][0];"function"==typeof n&&n(e)}}else if(e.hasOwnProperty("uid")&&this.subscriptions.uids.hasOwnProperty(e.uid)&&(r=[...this.subscriptions.uids[e.uid]],!i))for(let t=0;t<r.length;t++){const i=r[t][0];"function"==typeof i&&i(null!==(n=e.value)&&void 0!==n?n:null,e.event)}if(i)for(let t=0;t<r.length;t++){const n=r[t][2];"function"==typeof n&&n(e.count)}}static _onclose(t){"undefined"==typeof console||this.noConsole||console.log(`Nymph-PubSub connection closed: ${t.code} ${t.reason}`);for(let t=0;t<this.disconnectCallbacks.length;t++){const n=this.disconnectCallbacks[t];n&&n()}4200===t.code||"undefined"!=typeof navigator&&!navigator.onLine||(this.connection&&this.connection.close(),this._waitForConnection(),this._attemptConnect())}static _send(t){this.connection&&this.connection.send(JSON.stringify(t))}static isConnectionOpen(){return!(!this.connection||this.connection.readyState!==this.WebSocket.OPEN)}static _subscribeQuery(t,n){let e=!1;this.subscriptions.queries.hasOwnProperty(t)||(this.subscriptions.queries[t]=[],e=!0);let r=!e&&this._isCountSubscribedQuery(t);this.subscriptions.queries[t].push(n),this.isConnectionOpen()&&(e?this._sendQuery(t,!!n[2]):!r&&n[2]&&(this._sendUnQuery(t),this._sendQuery(t,!0)))}static _subscribeUID(t,n){let e=!1;this.subscriptions.uids.hasOwnProperty(t)||(this.subscriptions.uids[t]=[],e=!0);let r=!e&&this._isCountSubscribedUID(t);this.subscriptions.uids[t].push(n),this.isConnectionOpen()&&(e?this._sendUID(t,!!n[2]):!r&&n[2]&&(this._sendUnUID(t),this._sendUID(t,!0)))}static _sendQuery(t,n){this._send({action:"subscribe",query:t,count:n})}static _sendUID(t,n){this._send({action:"subscribe",uid:t,count:n})}static _isCountSubscribedQuery(t){if(!this.subscriptions.queries.hasOwnProperty(t))return!1;for(let n=0;n<this.subscriptions.queries[t].length;n++)if(this.subscriptions.queries[t][n][2])return!0;return!1}static _isCountSubscribedUID(t){if(!this.subscriptions.uids.hasOwnProperty(t))return!1;for(let n=0;n<this.subscriptions.uids[t].length;n++)if(this.subscriptions.uids[t][n][2])return!0;return!1}static _unsubscribeQuery(t,n){if(!this.subscriptions.queries.hasOwnProperty(t))return;const e=this.subscriptions.queries[t].indexOf(n);-1!==e&&(this.subscriptions.queries[t].splice(e,1),this.subscriptions.queries[t].length||(delete this.subscriptions.queries[t],this.isConnectionOpen()&&this._sendUnQuery(t)))}static _unsubscribeUID(t,n){if(!this.subscriptions.uids.hasOwnProperty(t))return;const e=this.subscriptions.uids[t].indexOf(n);-1!==e&&(this.subscriptions.uids[t].splice(e,1),this.subscriptions.uids[t].length||(delete this.subscriptions.uids[t],this.isConnectionOpen()&&this._sendUnUID(t)))}static _sendUnQuery(t){this._send({action:"unsubscribe",query:t})}static _sendUnUID(t){this._send({action:"unsubscribe",uid:t})}static updateArray(t,n){var e,r,i,o,s,a;if(Array.isArray(n)){const e=[...n];if(0===t.length)return void t.splice(0,0,...e);const r={},i=u.default.getEntityClass("Entity");for(let t=0;t<e.length;t++){const n=e[t];n instanceof i&&null!=n.guid&&(r[n.guid]=t)}const o=[];for(let n in t)if("number"==typeof n&&n<=4294967294&&/^0$|^[1-9]\d*$/.test(n)&&t.hasOwnProperty(n)){const i=t[n].guid;null!=i&&(r.hasOwnProperty(i)?e[r[i]].mdate!==t[n].mdate?(t[n].$init(e[r[i]].toJSON()),delete r[i]):delete r[i]:o.push(n))}o.sort((function(t,n){return t>n?-1:t<n?1:0}));for(let n=0;n<o.length;n++)t.splice(o[n],1);for(let n of Object.values(r))t.splice(t.length,0,e[n])}else if(null!=n&&n.hasOwnProperty("query")){if("removed"in n)for(let e=0;e<t.length;e++)if(null!=t[e]&&t[e].guid===n.removed)return void t.splice(e,1);let c=null;if("added"in n){for(let e=0;e<t.length;e++)null!=t[e]&&t[e].guid===n.added&&(c=t.splice(e,1)[0].$init(n.data));null==c&&(c=u.default.initEntity(n.data))}if("updated"in n)for(let e=0;e<t.length;e++)null!=t[e]&&t[e].guid===n.updated&&(c=t.splice(e,1)[0].$init(n.data));const l=JSON.parse(n.query);if(null!=c){const n="sort"in l[0]?l[0].sort:"cdate";let u;if(l[0].hasOwnProperty("reverse")&&l[0].reverse)for(u=0;(null!==(r=(null!==(e=t[u])&&void 0!==e?e:{})[n])&&void 0!==r?r:0)>=(null!==(i=c[n])&&void 0!==i?i:0)&&u<t.length;u++);else for(u=0;(null!==(s=(null!==(o=t[u])&&void 0!==o?o:{})[n])&&void 0!==s?s:0)<(null!==(a=c[n])&&void 0!==a?a:0)&&u<t.length;u++);t.splice(u,0,c)}}}static on(t,n){const e=t+"Callbacks";if(!this.hasOwnProperty(e))throw new Error("Invalid event type.");return this[e].push(n),()=>this.off(t,n)}static off(t,n){const e=t+"Callbacks";if(!this.hasOwnProperty(e))return!1;const r=this[e].indexOf(n);return r>-1&&this[e].splice(r,1),!0}static setToken(t){s=t,this.isConnectionOpen()&&this._send({action:"authenticate",token:s})}}n.default=a,a.subscriptions={queries:{},uids:{}},a.connectCallbacks=[],a.disconnectCallbacks=[],a.noConsole=!1;class c{constructor(t,n,e){this.query=t,this.callbacks=n,this.unsubscribe=e}}var l;n.PubSubSubscription=c,void 0!==(l="undefined"==typeof window?"undefined"==typeof self?void 0:self:window)&&void 0!==l.NymphOptions&&(l.NymphOptions.pubsubUrl,1)&&a.init(l.NymphOptions)},814:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0})},568:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.PubSub=n.Nymph=n.EntitySorter=n.Entity=void 0,i(e(73),n);const u=o(e(73));n.Entity=u.default,i(e(128),n);const s=o(e(872));n.EntitySorter=s.default,i(e(660),n),i(e(116),n);const a=o(e(116));n.Nymph=a.default,n.default=a.default,i(e(588),n),i(e(335),n);const c=o(e(335));n.PubSub=c.default,i(e(814),n)},988:function(t,n,e){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.sortObj=n.referencesToEntities=n.entitiesToReferences=n.entityConstructorsToClassNames=n.uniqueStrings=void 0;const i=r(e(116));n.uniqueStrings=function(t){const n={};for(let e=0;e<t.length;++e)n[t[e]]=!0;return Object.keys(n)},n.entityConstructorsToClassNames=function t(n){const e=i.default.getEntityClass("Entity");if("function"==typeof n&&n.prototype instanceof e&&"string"==typeof n.class)return n.class;if(Array.isArray(n))return n.map(t);if(n instanceof Object){let e=Object.create(n);for(let[r,i]of Object.entries(n))e[r]=t(i);return e}return n},n.entitiesToReferences=function t(n){if(n instanceof i.default.getEntityClass("Entity")&&"function"==typeof n.$toReference)return n.$toReference();if(Array.isArray(n))return n.map(t);if(n instanceof Object){let e=Object.create(n);for(let[r,i]of Object.entries(n))e[r]=t(i);return e}return n},n.referencesToEntities=function t(n,e=!1){const r=i.default.getEntityClass("Entity");if(Array.isArray(n)){if("nymph_entity_reference"!==n[0])return n.map((n=>t(n,e)));try{return i.default.getEntityClass(n[2]).factoryReference(n)}catch(t){return n}}else if(r&&n instanceof Object&&!(n instanceof r))for(let[e,r]of Object.entries(n))n[e]=t(r);return n},n.sortObj=function(t){const n=Object.keys(t);n.sort();for(let e=0;e<n.length;e++){const r=t[n[e]];delete t[n[e]],t[n[e]]=r}return t}},486:function(t,n,e){var r;t=e.nmd(t),function(){var i,o="Expected a function",u="__lodash_hash_undefined__",s="__lodash_placeholder__",a=32,c=128,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",256]],v="[object Arguments]",y="[object Array]",g="[object Boolean]",_="[object Date]",b="[object Error]",m="[object Function]",w="[object GeneratorFunction]",$="[object Map]",O="[object Number]",E="[object Object]",x="[object Promise]",C="[object RegExp]",S="[object Set]",k="[object String]",j="[object Symbol]",P="[object WeakMap]",A="[object ArrayBuffer]",T="[object DataView]",U="[object Float32Array]",R="[object Float64Array]",I="[object Int8Array]",N="[object Int16Array]",D="[object Int32Array]",q="[object Uint8Array]",M="[object Uint8ClampedArray]",L="[object Uint16Array]",W="[object Uint32Array]",z=/\b__p \+= '';/g,F=/\b(__p \+=) '' \+/g,B=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,Q=RegExp(G.source),H=RegExp(J.source),Y=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,K=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,et=RegExp(nt.source),rt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,at=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,_t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$t="a-z\\xdf-\\xf6\\xf8-\\xff",Ot="A-Z\\xc0-\\xd6\\xd8-\\xde",Et="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xt="["+Et+"]",Ct="["+wt+"]",St="\\d+",kt="["+$t+"]",jt="[^\\ud800-\\udfff"+Et+St+"\\u2700-\\u27bf"+$t+Ot+"]",Pt="\\ud83c[\\udffb-\\udfff]",At="[^\\ud800-\\udfff]",Tt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",Rt="["+Ot+"]",It="(?:"+kt+"|"+jt+")",Nt="(?:"+Rt+"|"+jt+")",Dt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Mt="(?:"+Ct+"|"+Pt+")?",Lt="[\\ufe0e\\ufe0f]?",Wt=Lt+Mt+"(?:\\u200d(?:"+[At,Tt,Ut].join("|")+")"+Lt+Mt+")*",zt="(?:"+["[\\u2700-\\u27bf]",Tt,Ut].join("|")+")"+Wt,Ft="(?:"+[At+Ct+"?",Ct,Tt,Ut,"[\\ud800-\\udfff]"].join("|")+")",Bt=RegExp("['’]","g"),Gt=RegExp(Ct,"g"),Jt=RegExp(Pt+"(?="+Pt+")|"+Ft+Wt,"g"),Qt=RegExp([Rt+"?"+kt+"+"+Dt+"(?="+[xt,Rt,"$"].join("|")+")",Nt+"+"+qt+"(?="+[xt,Rt+It,"$"].join("|")+")",Rt+"?"+It+"+"+Dt,Rt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",St,zt].join("|"),"g"),Ht=RegExp("[\\u200d\\ud800-\\udfff"+wt+"\\ufe0e\\ufe0f]"),Yt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xt=-1,Kt={};Kt[U]=Kt[R]=Kt[I]=Kt[N]=Kt[D]=Kt[q]=Kt[M]=Kt[L]=Kt[W]=!0,Kt[v]=Kt[y]=Kt[A]=Kt[g]=Kt[T]=Kt[_]=Kt[b]=Kt[m]=Kt[$]=Kt[O]=Kt[E]=Kt[C]=Kt[S]=Kt[k]=Kt[P]=!1;var Vt={};Vt[v]=Vt[y]=Vt[A]=Vt[T]=Vt[g]=Vt[_]=Vt[U]=Vt[R]=Vt[I]=Vt[N]=Vt[D]=Vt[$]=Vt[O]=Vt[E]=Vt[C]=Vt[S]=Vt[k]=Vt[j]=Vt[q]=Vt[M]=Vt[L]=Vt[W]=!0,Vt[b]=Vt[m]=Vt[P]=!1;var tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,en=parseInt,rn="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g,on="object"==typeof self&&self&&self.Object===Object&&self,un=rn||on||Function("return this")(),sn=n&&!n.nodeType&&n,an=sn&&t&&!t.nodeType&&t,cn=an&&an.exports===sn,ln=cn&&rn.process,fn=function(){try{return an&&an.require&&an.require("util").types||ln&&ln.binding&&ln.binding("util")}catch(t){}}(),hn=fn&&fn.isArrayBuffer,dn=fn&&fn.isDate,pn=fn&&fn.isMap,vn=fn&&fn.isRegExp,yn=fn&&fn.isSet,gn=fn&&fn.isTypedArray;function _n(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function bn(t,n,e,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var u=t[i];n(r,u,e(u),t)}return r}function mn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}function wn(t,n){for(var e=null==t?0:t.length;e--&&!1!==n(t[e],e,t););return t}function $n(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function On(t,n){for(var e=-1,r=null==t?0:t.length,i=0,o=[];++e<r;){var u=t[e];n(u,e,t)&&(o[i++]=u)}return o}function En(t,n){return!(null==t||!t.length)&&Rn(t,n,0)>-1}function xn(t,n,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(n,t[r]))return!0;return!1}function Cn(t,n){for(var e=-1,r=null==t?0:t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}function Sn(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}function kn(t,n,e,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}function jn(t,n,e,r){var i=null==t?0:t.length;for(r&&i&&(e=t[--i]);i--;)e=n(e,t[i],i,t);return e}function Pn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}var An=qn("length");function Tn(t,n,e){var r;return e(t,(function(t,e,i){if(n(t,e,i))return r=e,!1})),r}function Un(t,n,e,r){for(var i=t.length,o=e+(r?1:-1);r?o--:++o<i;)if(n(t[o],o,t))return o;return-1}function Rn(t,n,e){return n==n?function(t,n,e){for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1}(t,n,e):Un(t,Nn,e)}function In(t,n,e,r){for(var i=e-1,o=t.length;++i<o;)if(r(t[i],n))return i;return-1}function Nn(t){return t!=t}function Dn(t,n){var e=null==t?0:t.length;return e?Wn(t,n)/e:h}function qn(t){return function(n){return null==n?i:n[t]}}function Mn(t){return function(n){return null==t?i:t[n]}}function Ln(t,n,e,r,i){return i(t,(function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)})),e}function Wn(t,n){for(var e,r=-1,o=t.length;++r<o;){var u=n(t[r]);u!==i&&(e=e===i?u:e+u)}return e}function zn(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function Fn(t){return t?t.slice(0,ue(t)+1).replace(rt,""):t}function Bn(t){return function(n){return t(n)}}function Gn(t,n){return Cn(n,(function(n){return t[n]}))}function Jn(t,n){return t.has(n)}function Qn(t,n){for(var e=-1,r=t.length;++e<r&&Rn(n,t[e],0)>-1;);return e}function Hn(t,n){for(var e=t.length;e--&&Rn(n,t[e],0)>-1;);return e}function Yn(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}var Zn=Mn({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Xn=Mn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Kn(t){return"\\"+tn[t]}function Vn(t){return Ht.test(t)}function te(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function ne(t,n){return function(e){return t(n(e))}}function ee(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var u=t[e];u!==n&&u!==s||(t[e]=s,o[i++]=e)}return o}function re(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}function ie(t){return Vn(t)?function(t){for(var n=Jt.lastIndex=0;Jt.test(t);)++n;return n}(t):An(t)}function oe(t){return Vn(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function ue(t){for(var n=t.length;n--&&it.test(t.charAt(n)););return n}var se=Mn({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ae=function t(n){var e,r=(n=null==n?un:ae.defaults(un.Object(),n,ae.pick(un,Zt))).Array,it=n.Date,wt=n.Error,$t=n.Function,Ot=n.Math,Et=n.Object,xt=n.RegExp,Ct=n.String,St=n.TypeError,kt=r.prototype,jt=$t.prototype,Pt=Et.prototype,At=n["__core-js_shared__"],Tt=jt.toString,Ut=Pt.hasOwnProperty,Rt=0,It=(e=/[^.]+$/.exec(At&&At.keys&&At.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",Nt=Pt.toString,Dt=Tt.call(Et),qt=un._,Mt=xt("^"+Tt.call(Ut).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=cn?n.Buffer:i,Wt=n.Symbol,zt=n.Uint8Array,Ft=Lt?Lt.allocUnsafe:i,Jt=ne(Et.getPrototypeOf,Et),Ht=Et.create,tn=Pt.propertyIsEnumerable,rn=kt.splice,on=Wt?Wt.isConcatSpreadable:i,sn=Wt?Wt.iterator:i,an=Wt?Wt.toStringTag:i,ln=function(){try{var t=ao(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),fn=n.clearTimeout!==un.clearTimeout&&n.clearTimeout,An=it&&it.now!==un.Date.now&&it.now,Mn=n.setTimeout!==un.setTimeout&&n.setTimeout,ce=Ot.ceil,le=Ot.floor,fe=Et.getOwnPropertySymbols,he=Lt?Lt.isBuffer:i,de=n.isFinite,pe=kt.join,ve=ne(Et.keys,Et),ye=Ot.max,ge=Ot.min,_e=it.now,be=n.parseInt,me=Ot.random,we=kt.reverse,$e=ao(n,"DataView"),Oe=ao(n,"Map"),Ee=ao(n,"Promise"),xe=ao(n,"Set"),Ce=ao(n,"WeakMap"),Se=ao(Et,"create"),ke=Ce&&new Ce,je={},Pe=qo($e),Ae=qo(Oe),Te=qo(Ee),Ue=qo(xe),Re=qo(Ce),Ie=Wt?Wt.prototype:i,Ne=Ie?Ie.valueOf:i,De=Ie?Ie.toString:i;function qe(t){if(ns(t)&&!Bu(t)&&!(t instanceof ze)){if(t instanceof We)return t;if(Ut.call(t,"__wrapped__"))return Mo(t)}return new We(t)}var Me=function(){function t(){}return function(n){if(!ts(n))return{};if(Ht)return Ht(n);t.prototype=n;var e=new t;return t.prototype=i,e}}();function Le(){}function We(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=i}function ze(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Fe(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Be(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ge(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Je(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new Ge;++n<e;)this.add(t[n])}function Qe(t){var n=this.__data__=new Be(t);this.size=n.size}function He(t,n){var e=Bu(t),r=!e&&Fu(t),i=!e&&!r&&Hu(t),o=!e&&!r&&!i&&cs(t),u=e||r||i||o,s=u?zn(t.length,Ct):[],a=s.length;for(var c in t)!n&&!Ut.call(t,c)||u&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yo(c,a))||s.push(c);return s}function Ye(t){var n=t.length;return n?t[Gr(0,n-1)]:i}function Ze(t,n){return Uo(Ci(t),or(n,0,t.length))}function Xe(t){return Uo(Ci(t))}function Ke(t,n,e){(e!==i&&!Lu(t[n],e)||e===i&&!(n in t))&&rr(t,n,e)}function Ve(t,n,e){var r=t[n];Ut.call(t,n)&&Lu(r,e)&&(e!==i||n in t)||rr(t,n,e)}function tr(t,n){for(var e=t.length;e--;)if(Lu(t[e][0],n))return e;return-1}function nr(t,n,e,r){return lr(t,(function(t,i,o){n(r,t,e(t),o)})),r}function er(t,n){return t&&Si(n,As(n),t)}function rr(t,n,e){"__proto__"==n&&ln?ln(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}function ir(t,n){for(var e=-1,o=n.length,u=r(o),s=null==t;++e<o;)u[e]=s?i:Cs(t,n[e]);return u}function or(t,n,e){return t==t&&(e!==i&&(t=t<=e?t:e),n!==i&&(t=t>=n?t:n)),t}function ur(t,n,e,r,o,u){var s,a=1&n,c=2&n,l=4&n;if(e&&(s=o?e(t,r,o,u):e(t)),s!==i)return s;if(!ts(t))return t;var f=Bu(t);if(f){if(s=function(t){var n=t.length,e=new t.constructor(n);return n&&"string"==typeof t[0]&&Ut.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t),!a)return Ci(t,s)}else{var h=fo(t),d=h==m||h==w;if(Hu(t))return mi(t,a);if(h==E||h==v||d&&!o){if(s=c||d?{}:po(t),!a)return c?function(t,n){return Si(t,lo(t),n)}(t,function(t,n){return t&&Si(n,Ts(n),t)}(s,t)):function(t,n){return Si(t,co(t),n)}(t,er(s,t))}else{if(!Vt[h])return o?t:{};s=function(t,n,e){var r,i=t.constructor;switch(n){case A:return wi(t);case g:case _:return new i(+t);case T:return function(t,n){var e=n?wi(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case U:case R:case I:case N:case D:case q:case M:case L:case W:return $i(t,e);case $:return new i;case O:case k:return new i(t);case C:return function(t){var n=new t.constructor(t.source,ht.exec(t));return n.lastIndex=t.lastIndex,n}(t);case S:return new i;case j:return r=t,Ne?Et(Ne.call(r)):{}}}(t,h,a)}}u||(u=new Qe);var p=u.get(t);if(p)return p;u.set(t,s),us(t)?t.forEach((function(r){s.add(ur(r,n,e,r,t,u))})):es(t)&&t.forEach((function(r,i){s.set(i,ur(r,n,e,i,t,u))}));var y=f?i:(l?c?no:to:c?Ts:As)(t);return mn(y||t,(function(r,i){y&&(r=t[i=r]),Ve(s,i,ur(r,n,e,i,t,u))})),s}function sr(t,n,e){var r=e.length;if(null==t)return!r;for(t=Et(t);r--;){var o=e[r],u=n[o],s=t[o];if(s===i&&!(o in t)||!u(s))return!1}return!0}function ar(t,n,e){if("function"!=typeof t)throw new St(o);return jo((function(){t.apply(i,e)}),n)}function cr(t,n,e,r){var i=-1,o=En,u=!0,s=t.length,a=[],c=n.length;if(!s)return a;e&&(n=Cn(n,Bn(e))),r?(o=xn,u=!1):n.length>=200&&(o=Jn,u=!1,n=new Je(n));t:for(;++i<s;){var l=t[i],f=null==e?l:e(l);if(l=r||0!==l?l:0,u&&f==f){for(var h=c;h--;)if(n[h]===f)continue t;a.push(l)}else o(n,f,r)||a.push(l)}return a}qe.templateSettings={escape:Y,evaluate:Z,interpolate:X,variable:"",imports:{_:qe}},qe.prototype=Le.prototype,qe.prototype.constructor=qe,We.prototype=Me(Le.prototype),We.prototype.constructor=We,ze.prototype=Me(Le.prototype),ze.prototype.constructor=ze,Fe.prototype.clear=function(){this.__data__=Se?Se(null):{},this.size=0},Fe.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},Fe.prototype.get=function(t){var n=this.__data__;if(Se){var e=n[t];return e===u?i:e}return Ut.call(n,t)?n[t]:i},Fe.prototype.has=function(t){var n=this.__data__;return Se?n[t]!==i:Ut.call(n,t)},Fe.prototype.set=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Se&&n===i?u:n,this},Be.prototype.clear=function(){this.__data__=[],this.size=0},Be.prototype.delete=function(t){var n=this.__data__,e=tr(n,t);return!(e<0||(e==n.length-1?n.pop():rn.call(n,e,1),--this.size,0))},Be.prototype.get=function(t){var n=this.__data__,e=tr(n,t);return e<0?i:n[e][1]},Be.prototype.has=function(t){return tr(this.__data__,t)>-1},Be.prototype.set=function(t,n){var e=this.__data__,r=tr(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},Ge.prototype.clear=function(){this.size=0,this.__data__={hash:new Fe,map:new(Oe||Be),string:new Fe}},Ge.prototype.delete=function(t){var n=uo(this,t).delete(t);return this.size-=n?1:0,n},Ge.prototype.get=function(t){return uo(this,t).get(t)},Ge.prototype.has=function(t){return uo(this,t).has(t)},Ge.prototype.set=function(t,n){var e=uo(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Je.prototype.add=Je.prototype.push=function(t){return this.__data__.set(t,u),this},Je.prototype.has=function(t){return this.__data__.has(t)},Qe.prototype.clear=function(){this.__data__=new Be,this.size=0},Qe.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Qe.prototype.get=function(t){return this.__data__.get(t)},Qe.prototype.has=function(t){return this.__data__.has(t)},Qe.prototype.set=function(t,n){var e=this.__data__;if(e instanceof Be){var r=e.__data__;if(!Oe||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new Ge(r)}return e.set(t,n),this.size=e.size,this};var lr=Pi(_r),fr=Pi(br,!0);function hr(t,n){var e=!0;return lr(t,(function(t,r,i){return e=!!n(t,r,i)})),e}function dr(t,n,e){for(var r=-1,o=t.length;++r<o;){var u=t[r],s=n(u);if(null!=s&&(a===i?s==s&&!as(s):e(s,a)))var a=s,c=u}return c}function pr(t,n){var e=[];return lr(t,(function(t,r,i){n(t,r,i)&&e.push(t)})),e}function vr(t,n,e,r,i){var o=-1,u=t.length;for(e||(e=vo),i||(i=[]);++o<u;){var s=t[o];n>0&&e(s)?n>1?vr(s,n-1,e,r,i):Sn(i,s):r||(i[i.length]=s)}return i}var yr=Ai(),gr=Ai(!0);function _r(t,n){return t&&yr(t,n,As)}function br(t,n){return t&&gr(t,n,As)}function mr(t,n){return On(n,(function(n){return Xu(t[n])}))}function wr(t,n){for(var e=0,r=(n=yi(n,t)).length;null!=t&&e<r;)t=t[Do(n[e++])];return e&&e==r?t:i}function $r(t,n,e){var r=n(t);return Bu(t)?r:Sn(r,e(t))}function Or(t){return null==t?t===i?"[object Undefined]":"[object Null]":an&&an in Et(t)?function(t){var n=Ut.call(t,an),e=t[an];try{t[an]=i;var r=!0}catch(t){}var o=Nt.call(t);return r&&(n?t[an]=e:delete t[an]),o}(t):function(t){return Nt.call(t)}(t)}function Er(t,n){return t>n}function xr(t,n){return null!=t&&Ut.call(t,n)}function Cr(t,n){return null!=t&&n in Et(t)}function Sr(t,n,e){for(var o=e?xn:En,u=t[0].length,s=t.length,a=s,c=r(s),l=1/0,f=[];a--;){var h=t[a];a&&n&&(h=Cn(h,Bn(n))),l=ge(h.length,l),c[a]=!e&&(n||u>=120&&h.length>=120)?new Je(a&&h):i}h=t[0];var d=-1,p=c[0];t:for(;++d<u&&f.length<l;){var v=h[d],y=n?n(v):v;if(v=e||0!==v?v:0,!(p?Jn(p,y):o(f,y,e))){for(a=s;--a;){var g=c[a];if(!(g?Jn(g,y):o(t[a],y,e)))continue t}p&&p.push(y),f.push(v)}}return f}function kr(t,n,e){var r=null==(t=xo(t,n=yi(n,t)))?t:t[Do(Zo(n))];return null==r?i:_n(r,t,e)}function jr(t){return ns(t)&&Or(t)==v}function Pr(t,n,e,r,o){return t===n||(null==t||null==n||!ns(t)&&!ns(n)?t!=t&&n!=n:function(t,n,e,r,o,u){var s=Bu(t),a=Bu(n),c=s?y:fo(t),l=a?y:fo(n),f=(c=c==v?E:c)==E,h=(l=l==v?E:l)==E,d=c==l;if(d&&Hu(t)){if(!Hu(n))return!1;s=!0,f=!1}if(d&&!f)return u||(u=new Qe),s||cs(t)?Ki(t,n,e,r,o,u):function(t,n,e,r,i,o,u){switch(e){case T:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case A:return!(t.byteLength!=n.byteLength||!o(new zt(t),new zt(n)));case g:case _:case O:return Lu(+t,+n);case b:return t.name==n.name&&t.message==n.message;case C:case k:return t==n+"";case $:var s=te;case S:var a=1&r;if(s||(s=re),t.size!=n.size&&!a)return!1;var c=u.get(t);if(c)return c==n;r|=2,u.set(t,n);var l=Ki(s(t),s(n),r,i,o,u);return u.delete(t),l;case j:if(Ne)return Ne.call(t)==Ne.call(n)}return!1}(t,n,c,e,r,o,u);if(!(1&e)){var p=f&&Ut.call(t,"__wrapped__"),m=h&&Ut.call(n,"__wrapped__");if(p||m){var w=p?t.value():t,x=m?n.value():n;return u||(u=new Qe),o(w,x,e,r,u)}}return!!d&&(u||(u=new Qe),function(t,n,e,r,o,u){var s=1&e,a=to(t),c=a.length;if(c!=to(n).length&&!s)return!1;for(var l=c;l--;){var f=a[l];if(!(s?f in n:Ut.call(n,f)))return!1}var h=u.get(t),d=u.get(n);if(h&&d)return h==n&&d==t;var p=!0;u.set(t,n),u.set(n,t);for(var v=s;++l<c;){var y=t[f=a[l]],g=n[f];if(r)var _=s?r(g,y,f,n,t,u):r(y,g,f,t,n,u);if(!(_===i?y===g||o(y,g,e,r,u):_)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var b=t.constructor,m=n.constructor;b==m||!("constructor"in t)||!("constructor"in n)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(p=!1)}return u.delete(t),u.delete(n),p}(t,n,e,r,o,u))}(t,n,e,r,Pr,o))}function Ar(t,n,e,r){var o=e.length,u=o,s=!r;if(null==t)return!u;for(t=Et(t);o--;){var a=e[o];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<u;){var c=(a=e[o])[0],l=t[c],f=a[1];if(s&&a[2]){if(l===i&&!(c in t))return!1}else{var h=new Qe;if(r)var d=r(l,f,c,t,n,h);if(!(d===i?Pr(f,l,3,r,h):d))return!1}}return!0}function Tr(t){return!(!ts(t)||(n=t,It&&It in n))&&(Xu(t)?Mt:vt).test(qo(t));var n}function Ur(t){return"function"==typeof t?t:null==t?ra:"object"==typeof t?Bu(t)?qr(t[0],t[1]):Dr(t):ha(t)}function Rr(t){if(!wo(t))return ve(t);var n=[];for(var e in Et(t))Ut.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Ir(t,n){return t<n}function Nr(t,n){var e=-1,i=Ju(t)?r(t.length):[];return lr(t,(function(t,r,o){i[++e]=n(t,r,o)})),i}function Dr(t){var n=so(t);return 1==n.length&&n[0][2]?Oo(n[0][0],n[0][1]):function(e){return e===t||Ar(e,t,n)}}function qr(t,n){return _o(t)&&$o(n)?Oo(Do(t),n):function(e){var r=Cs(e,t);return r===i&&r===n?Ss(e,t):Pr(n,r,3)}}function Mr(t,n,e,r,o){t!==n&&yr(n,(function(u,s){if(o||(o=new Qe),ts(u))!function(t,n,e,r,o,u,s){var a=So(t,e),c=So(n,e),l=s.get(c);if(l)Ke(t,e,l);else{var f=u?u(a,c,e+"",t,n,s):i,h=f===i;if(h){var d=Bu(c),p=!d&&Hu(c),v=!d&&!p&&cs(c);f=c,d||p||v?Bu(a)?f=a:Qu(a)?f=Ci(a):p?(h=!1,f=mi(c,!0)):v?(h=!1,f=$i(c,!0)):f=[]:is(c)||Fu(c)?(f=a,Fu(a)?f=gs(a):ts(a)&&!Xu(a)||(f=po(c))):h=!1}h&&(s.set(c,f),o(f,c,r,u,s),s.delete(c)),Ke(t,e,f)}}(t,n,s,e,Mr,r,o);else{var a=r?r(So(t,s),u,s+"",t,n,o):i;a===i&&(a=u),Ke(t,s,a)}}),Ts)}function Lr(t,n){var e=t.length;if(e)return yo(n+=n<0?e:0,e)?t[n]:i}function Wr(t,n,e){n=n.length?Cn(n,(function(t){return Bu(t)?function(n){return wr(n,1===t.length?t[0]:t)}:t})):[ra];var r=-1;return n=Cn(n,Bn(oo())),function(t,n){var r=t.length;for(t.sort((function(t,n){return function(t,n,e){for(var r=-1,i=t.criteria,o=n.criteria,u=i.length,s=e.length;++r<u;){var a=Oi(i[r],o[r]);if(a)return r>=s?a:a*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}));r--;)t[r]=t[r].value;return t}(Nr(t,(function(t,e,i){return{criteria:Cn(n,(function(n){return n(t)})),index:++r,value:t}})))}function zr(t,n,e){for(var r=-1,i=n.length,o={};++r<i;){var u=n[r],s=wr(t,u);e(s,u)&&Zr(o,yi(u,t),s)}return o}function Fr(t,n,e,r){var i=r?In:Rn,o=-1,u=n.length,s=t;for(t===n&&(n=Ci(n)),e&&(s=Cn(t,Bn(e)));++o<u;)for(var a=0,c=n[o],l=e?e(c):c;(a=i(s,l,a,r))>-1;)s!==t&&rn.call(s,a,1),rn.call(t,a,1);return t}function Br(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(e==r||i!==o){var o=i;yo(i)?rn.call(t,i,1):ai(t,i)}}return t}function Gr(t,n){return t+le(me()*(n-t+1))}function Jr(t,n){var e="";if(!t||n<1||n>f)return e;do{n%2&&(e+=t),(n=le(n/2))&&(t+=t)}while(n);return e}function Qr(t,n){return Po(Eo(t,n,ra),t+"")}function Hr(t){return Ye(Ls(t))}function Yr(t,n){var e=Ls(t);return Uo(e,or(n,0,e.length))}function Zr(t,n,e,r){if(!ts(t))return t;for(var o=-1,u=(n=yi(n,t)).length,s=u-1,a=t;null!=a&&++o<u;){var c=Do(n[o]),l=e;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var f=a[c];(l=r?r(f,c,a):i)===i&&(l=ts(f)?f:yo(n[o+1])?[]:{})}Ve(a,c,l),a=a[c]}return t}var Xr=ke?function(t,n){return ke.set(t,n),t}:ra,Kr=ln?function(t,n){return ln(t,"toString",{configurable:!0,enumerable:!1,value:ta(n),writable:!0})}:ra;function Vr(t){return Uo(Ls(t))}function ti(t,n,e){var i=-1,o=t.length;n<0&&(n=-n>o?0:o+n),(e=e>o?o:e)<0&&(e+=o),o=n>e?0:e-n>>>0,n>>>=0;for(var u=r(o);++i<o;)u[i]=t[i+n];return u}function ni(t,n){var e;return lr(t,(function(t,r,i){return!(e=n(t,r,i))})),!!e}function ei(t,n,e){var r=0,i=null==t?r:t.length;if("number"==typeof n&&n==n&&i<=2147483647){for(;r<i;){var o=r+i>>>1,u=t[o];null!==u&&!as(u)&&(e?u<=n:u<n)?r=o+1:i=o}return i}return ri(t,n,ra,e)}function ri(t,n,e,r){var o=0,u=null==t?0:t.length;if(0===u)return 0;for(var s=(n=e(n))!=n,a=null===n,c=as(n),l=n===i;o<u;){var f=le((o+u)/2),h=e(t[f]),d=h!==i,p=null===h,v=h==h,y=as(h);if(s)var g=r||v;else g=l?v&&(r||d):a?v&&d&&(r||!p):c?v&&d&&!p&&(r||!y):!p&&!y&&(r?h<=n:h<n);g?o=f+1:u=f}return ge(u,4294967294)}function ii(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var u=t[e],s=n?n(u):u;if(!e||!Lu(s,a)){var a=s;o[i++]=0===u?0:u}}return o}function oi(t){return"number"==typeof t?t:as(t)?h:+t}function ui(t){if("string"==typeof t)return t;if(Bu(t))return Cn(t,ui)+"";if(as(t))return De?De.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function si(t,n,e){var r=-1,i=En,o=t.length,u=!0,s=[],a=s;if(e)u=!1,i=xn;else if(o>=200){var c=n?null:Ji(t);if(c)return re(c);u=!1,i=Jn,a=new Je}else a=n?[]:s;t:for(;++r<o;){var l=t[r],f=n?n(l):l;if(l=e||0!==l?l:0,u&&f==f){for(var h=a.length;h--;)if(a[h]===f)continue t;n&&a.push(f),s.push(l)}else i(a,f,e)||(a!==s&&a.push(f),s.push(l))}return s}function ai(t,n){return null==(t=xo(t,n=yi(n,t)))||delete t[Do(Zo(n))]}function ci(t,n,e,r){return Zr(t,n,e(wr(t,n)),r)}function li(t,n,e,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&n(t[o],o,t););return e?ti(t,r?0:o,r?o+1:i):ti(t,r?o+1:0,r?i:o)}function fi(t,n){var e=t;return e instanceof ze&&(e=e.value()),kn(n,(function(t,n){return n.func.apply(n.thisArg,Sn([t],n.args))}),e)}function hi(t,n,e){var i=t.length;if(i<2)return i?si(t[0]):[];for(var o=-1,u=r(i);++o<i;)for(var s=t[o],a=-1;++a<i;)a!=o&&(u[o]=cr(u[o]||s,t[a],n,e));return si(vr(u,1),n,e)}function di(t,n,e){for(var r=-1,o=t.length,u=n.length,s={};++r<o;){var a=r<u?n[r]:i;e(s,t[r],a)}return s}function pi(t){return Qu(t)?t:[]}function vi(t){return"function"==typeof t?t:ra}function yi(t,n){return Bu(t)?t:_o(t,n)?[t]:No(_s(t))}var gi=Qr;function _i(t,n,e){var r=t.length;return e=e===i?r:e,!n&&e>=r?t:ti(t,n,e)}var bi=fn||function(t){return un.clearTimeout(t)};function mi(t,n){if(n)return t.slice();var e=t.length,r=Ft?Ft(e):new t.constructor(e);return t.copy(r),r}function wi(t){var n=new t.constructor(t.byteLength);return new zt(n).set(new zt(t)),n}function $i(t,n){var e=n?wi(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Oi(t,n){if(t!==n){var e=t!==i,r=null===t,o=t==t,u=as(t),s=n!==i,a=null===n,c=n==n,l=as(n);if(!a&&!l&&!u&&t>n||u&&s&&c&&!a&&!l||r&&s&&c||!e&&c||!o)return 1;if(!r&&!u&&!l&&t<n||l&&e&&o&&!r&&!u||a&&e&&o||!s&&o||!c)return-1}return 0}function Ei(t,n,e,i){for(var o=-1,u=t.length,s=e.length,a=-1,c=n.length,l=ye(u-s,0),f=r(c+l),h=!i;++a<c;)f[a]=n[a];for(;++o<s;)(h||o<u)&&(f[e[o]]=t[o]);for(;l--;)f[a++]=t[o++];return f}function xi(t,n,e,i){for(var o=-1,u=t.length,s=-1,a=e.length,c=-1,l=n.length,f=ye(u-a,0),h=r(f+l),d=!i;++o<f;)h[o]=t[o];for(var p=o;++c<l;)h[p+c]=n[c];for(;++s<a;)(d||o<u)&&(h[p+e[s]]=t[o++]);return h}function Ci(t,n){var e=-1,i=t.length;for(n||(n=r(i));++e<i;)n[e]=t[e];return n}function Si(t,n,e,r){var o=!e;e||(e={});for(var u=-1,s=n.length;++u<s;){var a=n[u],c=r?r(e[a],t[a],a,e,t):i;c===i&&(c=t[a]),o?rr(e,a,c):Ve(e,a,c)}return e}function ki(t,n){return function(e,r){var i=Bu(e)?bn:nr,o=n?n():{};return i(e,t,oo(r,2),o)}}function ji(t){return Qr((function(n,e){var r=-1,o=e.length,u=o>1?e[o-1]:i,s=o>2?e[2]:i;for(u=t.length>3&&"function"==typeof u?(o--,u):i,s&&go(e[0],e[1],s)&&(u=o<3?i:u,o=1),n=Et(n);++r<o;){var a=e[r];a&&t(n,a,r,u)}return n}))}function Pi(t,n){return function(e,r){if(null==e)return e;if(!Ju(e))return t(e,r);for(var i=e.length,o=n?i:-1,u=Et(e);(n?o--:++o<i)&&!1!==r(u[o],o,u););return e}}function Ai(t){return function(n,e,r){for(var i=-1,o=Et(n),u=r(n),s=u.length;s--;){var a=u[t?s:++i];if(!1===e(o[a],a,o))break}return n}}function Ti(t){return function(n){var e=Vn(n=_s(n))?oe(n):i,r=e?e[0]:n.charAt(0),o=e?_i(e,1).join(""):n.slice(1);return r[t]()+o}}function Ui(t){return function(n){return kn(Xs(Fs(n).replace(Bt,"")),t,"")}}function Ri(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=Me(t.prototype),r=t.apply(e,n);return ts(r)?r:e}}function Ii(t){return function(n,e,r){var o=Et(n);if(!Ju(n)){var u=oo(e,3);n=As(n),e=function(t){return u(o[t],t,o)}}var s=t(n,e,r);return s>-1?o[u?n[s]:s]:i}}function Ni(t){return Vi((function(n){var e=n.length,r=e,u=We.prototype.thru;for(t&&n.reverse();r--;){var s=n[r];if("function"!=typeof s)throw new St(o);if(u&&!a&&"wrapper"==ro(s))var a=new We([],!0)}for(r=a?r:e;++r<e;){var c=ro(s=n[r]),l="wrapper"==c?eo(s):i;a=l&&bo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[ro(l[0])].apply(a,l[3]):1==s.length&&bo(s)?a[c]():a.thru(s)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Bu(r))return a.plant(r).value();for(var i=0,o=e?n[i].apply(this,t):r;++i<e;)o=n[i].call(this,o);return o}}))}function Di(t,n,e,o,u,s,a,l,f,h){var d=n&c,p=1&n,v=2&n,y=24&n,g=512&n,_=v?i:Ri(t);return function i(){for(var c=arguments.length,b=r(c),m=c;m--;)b[m]=arguments[m];if(y)var w=io(i),$=Yn(b,w);if(o&&(b=Ei(b,o,u,y)),s&&(b=xi(b,s,a,y)),c-=$,y&&c<h){var O=ee(b,w);return Bi(t,n,Di,i.placeholder,e,b,O,l,f,h-c)}var E=p?e:this,x=v?E[t]:t;return c=b.length,l?b=Co(b,l):g&&c>1&&b.reverse(),d&&f<c&&(b.length=f),this&&this!==un&&this instanceof i&&(x=_||Ri(x)),x.apply(E,b)}}function qi(t,n){return function(e,r){return function(t,n,e,r){return _r(t,(function(t,i,o){n(r,e(t),i,o)})),r}(e,t,n(r),{})}}function Mi(t,n){return function(e,r){var o;if(e===i&&r===i)return n;if(e!==i&&(o=e),r!==i){if(o===i)return r;"string"==typeof e||"string"==typeof r?(e=ui(e),r=ui(r)):(e=oi(e),r=oi(r)),o=t(e,r)}return o}}function Li(t){return Vi((function(n){return n=Cn(n,Bn(oo())),Qr((function(e){var r=this;return t(n,(function(t){return _n(t,r,e)}))}))}))}function Wi(t,n){var e=(n=n===i?" ":ui(n)).length;if(e<2)return e?Jr(n,t):n;var r=Jr(n,ce(t/ie(n)));return Vn(n)?_i(oe(r),0,t).join(""):r.slice(0,t)}function zi(t){return function(n,e,o){return o&&"number"!=typeof o&&go(n,e,o)&&(e=o=i),n=ds(n),e===i?(e=n,n=0):e=ds(e),function(t,n,e,i){for(var o=-1,u=ye(ce((n-t)/(e||1)),0),s=r(u);u--;)s[i?u:++o]=t,t+=e;return s}(n,e,o=o===i?n<e?1:-1:ds(o),t)}}function Fi(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=ys(n),e=ys(e)),t(n,e)}}function Bi(t,n,e,r,o,u,s,c,l,f){var h=8&n;n|=h?a:64,4&(n&=~(h?64:a))||(n&=-4);var d=[t,n,o,h?u:i,h?s:i,h?i:u,h?i:s,c,l,f],p=e.apply(i,d);return bo(t)&&ko(p,d),p.placeholder=r,Ao(p,t,n)}function Gi(t){var n=Ot[t];return function(t,e){if(t=ys(t),(e=null==e?0:ge(ps(e),292))&&de(t)){var r=(_s(t)+"e").split("e");return+((r=(_s(n(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return n(t)}}var Ji=xe&&1/re(new xe([,-0]))[1]==l?function(t){return new xe(t)}:aa;function Qi(t){return function(n){var e=fo(n);return e==$?te(n):e==S?function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=[t,t]})),e}(n):function(t,n){return Cn(n,(function(n){return[n,t[n]]}))}(n,t(n))}}function Hi(t,n,e,u,l,f,h,d){var p=2&n;if(!p&&"function"!=typeof t)throw new St(o);var v=u?u.length:0;if(v||(n&=-97,u=l=i),h=h===i?h:ye(ps(h),0),d=d===i?d:ps(d),v-=l?l.length:0,64&n){var y=u,g=l;u=l=i}var _=p?i:eo(t),b=[t,n,e,u,l,y,g,f,h,d];if(_&&function(t,n){var e=t[1],r=n[1],i=e|r,o=i<131,u=r==c&&8==e||r==c&&256==e&&t[7].length<=n[8]||384==r&&n[7].length<=n[8]&&8==e;if(!o&&!u)return t;1&r&&(t[2]=n[2],i|=1&e?0:4);var a=n[3];if(a){var l=t[3];t[3]=l?Ei(l,a,n[4]):a,t[4]=l?ee(t[3],s):n[4]}(a=n[5])&&(l=t[5],t[5]=l?xi(l,a,n[6]):a,t[6]=l?ee(t[5],s):n[6]),(a=n[7])&&(t[7]=a),r&c&&(t[8]=null==t[8]?n[8]:ge(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i}(b,_),t=b[0],n=b[1],e=b[2],u=b[3],l=b[4],!(d=b[9]=b[9]===i?p?0:t.length:ye(b[9]-v,0))&&24&n&&(n&=-25),n&&1!=n)m=8==n||16==n?function(t,n,e){var o=Ri(t);return function u(){for(var s=arguments.length,a=r(s),c=s,l=io(u);c--;)a[c]=arguments[c];var f=s<3&&a[0]!==l&&a[s-1]!==l?[]:ee(a,l);return(s-=f.length)<e?Bi(t,n,Di,u.placeholder,i,a,f,i,i,e-s):_n(this&&this!==un&&this instanceof u?o:t,this,a)}}(t,n,d):n!=a&&33!=n||l.length?Di.apply(i,b):function(t,n,e,i){var o=1&n,u=Ri(t);return function n(){for(var s=-1,a=arguments.length,c=-1,l=i.length,f=r(l+a),h=this&&this!==un&&this instanceof n?u:t;++c<l;)f[c]=i[c];for(;a--;)f[c++]=arguments[++s];return _n(h,o?e:this,f)}}(t,n,e,u);else var m=function(t,n,e){var r=1&n,i=Ri(t);return function n(){return(this&&this!==un&&this instanceof n?i:t).apply(r?e:this,arguments)}}(t,n,e);return Ao((_?Xr:ko)(m,b),t,n)}function Yi(t,n,e,r){return t===i||Lu(t,Pt[e])&&!Ut.call(r,e)?n:t}function Zi(t,n,e,r,o,u){return ts(t)&&ts(n)&&(u.set(n,t),Mr(t,n,i,Zi,u),u.delete(n)),t}function Xi(t){return is(t)?i:t}function Ki(t,n,e,r,o,u){var s=1&e,a=t.length,c=n.length;if(a!=c&&!(s&&c>a))return!1;var l=u.get(t),f=u.get(n);if(l&&f)return l==n&&f==t;var h=-1,d=!0,p=2&e?new Je:i;for(u.set(t,n),u.set(n,t);++h<a;){var v=t[h],y=n[h];if(r)var g=s?r(y,v,h,n,t,u):r(v,y,h,t,n,u);if(g!==i){if(g)continue;d=!1;break}if(p){if(!Pn(n,(function(t,n){if(!Jn(p,n)&&(v===t||o(v,t,e,r,u)))return p.push(n)}))){d=!1;break}}else if(v!==y&&!o(v,y,e,r,u)){d=!1;break}}return u.delete(t),u.delete(n),d}function Vi(t){return Po(Eo(t,i,Go),t+"")}function to(t){return $r(t,As,co)}function no(t){return $r(t,Ts,lo)}var eo=ke?function(t){return ke.get(t)}:aa;function ro(t){for(var n=t.name+"",e=je[n],r=Ut.call(je,n)?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==t)return i.name}return n}function io(t){return(Ut.call(qe,"placeholder")?qe:t).placeholder}function oo(){var t=qe.iteratee||ia;return t=t===ia?Ur:t,arguments.length?t(arguments[0],arguments[1]):t}function uo(t,n){var e,r,i=t.__data__;return("string"==(r=typeof(e=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?i["string"==typeof n?"string":"hash"]:i.map}function so(t){for(var n=As(t),e=n.length;e--;){var r=n[e],i=t[r];n[e]=[r,i,$o(i)]}return n}function ao(t,n){var e=function(t,n){return null==t?i:t[n]}(t,n);return Tr(e)?e:i}var co=fe?function(t){return null==t?[]:(t=Et(t),On(fe(t),(function(n){return tn.call(t,n)})))}:va,lo=fe?function(t){for(var n=[];t;)Sn(n,co(t)),t=Jt(t);return n}:va,fo=Or;function ho(t,n,e){for(var r=-1,i=(n=yi(n,t)).length,o=!1;++r<i;){var u=Do(n[r]);if(!(o=null!=t&&e(t,u)))break;t=t[u]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Vu(i)&&yo(u,i)&&(Bu(t)||Fu(t))}function po(t){return"function"!=typeof t.constructor||wo(t)?{}:Me(Jt(t))}function vo(t){return Bu(t)||Fu(t)||!!(on&&t&&t[on])}function yo(t,n){var e=typeof t;return!!(n=null==n?f:n)&&("number"==e||"symbol"!=e&>.test(t))&&t>-1&&t%1==0&&t<n}function go(t,n,e){if(!ts(e))return!1;var r=typeof n;return!!("number"==r?Ju(e)&&yo(n,e.length):"string"==r&&n in e)&&Lu(e[n],t)}function _o(t,n){if(Bu(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!as(t))||V.test(t)||!K.test(t)||null!=n&&t in Et(n)}function bo(t){var n=ro(t),e=qe[n];if("function"!=typeof e||!(n in ze.prototype))return!1;if(t===e)return!0;var r=eo(e);return!!r&&t===r[0]}($e&&fo(new $e(new ArrayBuffer(1)))!=T||Oe&&fo(new Oe)!=$||Ee&&fo(Ee.resolve())!=x||xe&&fo(new xe)!=S||Ce&&fo(new Ce)!=P)&&(fo=function(t){var n=Or(t),e=n==E?t.constructor:i,r=e?qo(e):"";if(r)switch(r){case Pe:return T;case Ae:return $;case Te:return x;case Ue:return S;case Re:return P}return n});var mo=At?Xu:ya;function wo(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Pt)}function $o(t){return t==t&&!ts(t)}function Oo(t,n){return function(e){return null!=e&&e[t]===n&&(n!==i||t in Et(e))}}function Eo(t,n,e){return n=ye(n===i?t.length-1:n,0),function(){for(var i=arguments,o=-1,u=ye(i.length-n,0),s=r(u);++o<u;)s[o]=i[n+o];o=-1;for(var a=r(n+1);++o<n;)a[o]=i[o];return a[n]=e(s),_n(t,this,a)}}function xo(t,n){return n.length<2?t:wr(t,ti(n,0,-1))}function Co(t,n){for(var e=t.length,r=ge(n.length,e),o=Ci(t);r--;){var u=n[r];t[r]=yo(u,e)?o[u]:i}return t}function So(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var ko=To(Xr),jo=Mn||function(t,n){return un.setTimeout(t,n)},Po=To(Kr);function Ao(t,n,e){var r=n+"";return Po(t,function(t,n){var e=n.length;if(!e)return t;var r=e-1;return n[r]=(e>1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return mn(p,(function(e){var r="_."+e[0];n&e[1]&&!En(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(ut);return n?n[1].split(st):[]}(r),e)))}function To(t){var n=0,e=0;return function(){var r=_e(),o=16-(r-e);if(e=r,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(i,arguments)}}function Uo(t,n){var e=-1,r=t.length,o=r-1;for(n=n===i?r:n;++e<n;){var u=Gr(e,o),s=t[u];t[u]=t[e],t[e]=s}return t.length=n,t}var Ro,Io,No=(Ro=Ru((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(tt,(function(t,e,r,i){n.push(r?i.replace(lt,"$1"):e||t)})),n}),(function(t){return 500===Io.size&&Io.clear(),t})),Io=Ro.cache,Ro);function Do(t){if("string"==typeof t||as(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function qo(t){if(null!=t){try{return Tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Mo(t){if(t instanceof ze)return t.clone();var n=new We(t.__wrapped__,t.__chain__);return n.__actions__=Ci(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}var Lo=Qr((function(t,n){return Qu(t)?cr(t,vr(n,1,Qu,!0)):[]})),Wo=Qr((function(t,n){var e=Zo(n);return Qu(e)&&(e=i),Qu(t)?cr(t,vr(n,1,Qu,!0),oo(e,2)):[]})),zo=Qr((function(t,n){var e=Zo(n);return Qu(e)&&(e=i),Qu(t)?cr(t,vr(n,1,Qu,!0),i,e):[]}));function Fo(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:ps(e);return i<0&&(i=ye(r+i,0)),Un(t,oo(n,3),i)}function Bo(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return e!==i&&(o=ps(e),o=e<0?ye(r+o,0):ge(o,r-1)),Un(t,oo(n,3),o,!0)}function Go(t){return null!=t&&t.length?vr(t,1):[]}function Jo(t){return t&&t.length?t[0]:i}var Qo=Qr((function(t){var n=Cn(t,pi);return n.length&&n[0]===t[0]?Sr(n):[]})),Ho=Qr((function(t){var n=Zo(t),e=Cn(t,pi);return n===Zo(e)?n=i:e.pop(),e.length&&e[0]===t[0]?Sr(e,oo(n,2)):[]})),Yo=Qr((function(t){var n=Zo(t),e=Cn(t,pi);return(n="function"==typeof n?n:i)&&e.pop(),e.length&&e[0]===t[0]?Sr(e,i,n):[]}));function Zo(t){var n=null==t?0:t.length;return n?t[n-1]:i}var Xo=Qr(Ko);function Ko(t,n){return t&&t.length&&n&&n.length?Fr(t,n):t}var Vo=Vi((function(t,n){var e=null==t?0:t.length,r=ir(t,n);return Br(t,Cn(n,(function(t){return yo(t,e)?+t:t})).sort(Oi)),r}));function tu(t){return null==t?t:we.call(t)}var nu=Qr((function(t){return si(vr(t,1,Qu,!0))})),eu=Qr((function(t){var n=Zo(t);return Qu(n)&&(n=i),si(vr(t,1,Qu,!0),oo(n,2))})),ru=Qr((function(t){var n=Zo(t);return n="function"==typeof n?n:i,si(vr(t,1,Qu,!0),i,n)}));function iu(t){if(!t||!t.length)return[];var n=0;return t=On(t,(function(t){if(Qu(t))return n=ye(t.length,n),!0})),zn(n,(function(n){return Cn(t,qn(n))}))}function ou(t,n){if(!t||!t.length)return[];var e=iu(t);return null==n?e:Cn(e,(function(t){return _n(n,i,t)}))}var uu=Qr((function(t,n){return Qu(t)?cr(t,n):[]})),su=Qr((function(t){return hi(On(t,Qu))})),au=Qr((function(t){var n=Zo(t);return Qu(n)&&(n=i),hi(On(t,Qu),oo(n,2))})),cu=Qr((function(t){var n=Zo(t);return n="function"==typeof n?n:i,hi(On(t,Qu),i,n)})),lu=Qr(iu),fu=Qr((function(t){var n=t.length,e=n>1?t[n-1]:i;return e="function"==typeof e?(t.pop(),e):i,ou(t,e)}));function hu(t){var n=qe(t);return n.__chain__=!0,n}function du(t,n){return n(t)}var pu=Vi((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,o=function(n){return ir(n,t)};return!(n>1||this.__actions__.length)&&r instanceof ze&&yo(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:du,args:[o],thisArg:i}),new We(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(i),t}))):this.thru(o)})),vu=ki((function(t,n,e){Ut.call(t,e)?++t[e]:rr(t,e,1)})),yu=Ii(Fo),gu=Ii(Bo);function _u(t,n){return(Bu(t)?mn:lr)(t,oo(n,3))}function bu(t,n){return(Bu(t)?wn:fr)(t,oo(n,3))}var mu=ki((function(t,n,e){Ut.call(t,e)?t[e].push(n):rr(t,e,[n])})),wu=Qr((function(t,n,e){var i=-1,o="function"==typeof n,u=Ju(t)?r(t.length):[];return lr(t,(function(t){u[++i]=o?_n(n,t,e):kr(t,n,e)})),u})),$u=ki((function(t,n,e){rr(t,e,n)}));function Ou(t,n){return(Bu(t)?Cn:Nr)(t,oo(n,3))}var Eu=ki((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]})),xu=Qr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&go(t,n[0],n[1])?n=[]:e>2&&go(n[0],n[1],n[2])&&(n=[n[0]]),Wr(t,vr(n,1),[])})),Cu=An||function(){return un.Date.now()};function Su(t,n,e){return n=e?i:n,n=t&&null==n?t.length:n,Hi(t,c,i,i,i,i,n)}function ku(t,n){var e;if("function"!=typeof n)throw new St(o);return t=ps(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=i),e}}var ju=Qr((function(t,n,e){var r=1;if(e.length){var i=ee(e,io(ju));r|=a}return Hi(t,r,n,e,i)})),Pu=Qr((function(t,n,e){var r=3;if(e.length){var i=ee(e,io(Pu));r|=a}return Hi(n,r,t,e,i)}));function Au(t,n,e){var r,u,s,a,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new St(o);function v(n){var e=r,o=u;return r=u=i,f=n,a=t.apply(o,e)}function y(t){return f=t,c=jo(_,n),h?v(t):a}function g(t){var e=t-l;return l===i||e>=n||e<0||d&&t-f>=s}function _(){var t=Cu();if(g(t))return b(t);c=jo(_,function(t){var e=n-(t-l);return d?ge(e,s-(t-f)):e}(t))}function b(t){return c=i,p&&r?v(t):(r=u=i,a)}function m(){var t=Cu(),e=g(t);if(r=arguments,u=this,l=t,e){if(c===i)return y(l);if(d)return bi(c),c=jo(_,n),v(l)}return c===i&&(c=jo(_,n)),a}return n=ys(n)||0,ts(e)&&(h=!!e.leading,s=(d="maxWait"in e)?ye(ys(e.maxWait)||0,n):s,p="trailing"in e?!!e.trailing:p),m.cancel=function(){c!==i&&bi(c),f=0,r=l=u=c=i},m.flush=function(){return c===i?a:b(Cu())},m}var Tu=Qr((function(t,n){return ar(t,1,n)})),Uu=Qr((function(t,n,e){return ar(t,ys(n)||0,e)}));function Ru(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new St(o);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(Ru.Cache||Ge),e}function Iu(t){if("function"!=typeof t)throw new St(o);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Ru.Cache=Ge;var Nu=gi((function(t,n){var e=(n=1==n.length&&Bu(n[0])?Cn(n[0],Bn(oo())):Cn(vr(n,1),Bn(oo()))).length;return Qr((function(r){for(var i=-1,o=ge(r.length,e);++i<o;)r[i]=n[i].call(this,r[i]);return _n(t,this,r)}))})),Du=Qr((function(t,n){var e=ee(n,io(Du));return Hi(t,a,i,n,e)})),qu=Qr((function(t,n){var e=ee(n,io(qu));return Hi(t,64,i,n,e)})),Mu=Vi((function(t,n){return Hi(t,256,i,i,i,n)}));function Lu(t,n){return t===n||t!=t&&n!=n}var Wu=Fi(Er),zu=Fi((function(t,n){return t>=n})),Fu=jr(function(){return arguments}())?jr:function(t){return ns(t)&&Ut.call(t,"callee")&&!tn.call(t,"callee")},Bu=r.isArray,Gu=hn?Bn(hn):function(t){return ns(t)&&Or(t)==A};function Ju(t){return null!=t&&Vu(t.length)&&!Xu(t)}function Qu(t){return ns(t)&&Ju(t)}var Hu=he||ya,Yu=dn?Bn(dn):function(t){return ns(t)&&Or(t)==_};function Zu(t){if(!ns(t))return!1;var n=Or(t);return n==b||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!is(t)}function Xu(t){if(!ts(t))return!1;var n=Or(t);return n==m||n==w||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Ku(t){return"number"==typeof t&&t==ps(t)}function Vu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function ts(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function ns(t){return null!=t&&"object"==typeof t}var es=pn?Bn(pn):function(t){return ns(t)&&fo(t)==$};function rs(t){return"number"==typeof t||ns(t)&&Or(t)==O}function is(t){if(!ns(t)||Or(t)!=E)return!1;var n=Jt(t);if(null===n)return!0;var e=Ut.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Tt.call(e)==Dt}var os=vn?Bn(vn):function(t){return ns(t)&&Or(t)==C},us=yn?Bn(yn):function(t){return ns(t)&&fo(t)==S};function ss(t){return"string"==typeof t||!Bu(t)&&ns(t)&&Or(t)==k}function as(t){return"symbol"==typeof t||ns(t)&&Or(t)==j}var cs=gn?Bn(gn):function(t){return ns(t)&&Vu(t.length)&&!!Kt[Or(t)]},ls=Fi(Ir),fs=Fi((function(t,n){return t<=n}));function hs(t){if(!t)return[];if(Ju(t))return ss(t)?oe(t):Ci(t);if(sn&&t[sn])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[sn]());var n=fo(t);return(n==$?te:n==S?re:Ls)(t)}function ds(t){return t?(t=ys(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ps(t){var n=ds(t),e=n%1;return n==n?e?n-e:n:0}function vs(t){return t?or(ps(t),0,d):0}function ys(t){if("number"==typeof t)return t;if(as(t))return h;if(ts(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=ts(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Fn(t);var e=pt.test(t);return e||yt.test(t)?en(t.slice(2),e?2:8):dt.test(t)?h:+t}function gs(t){return Si(t,Ts(t))}function _s(t){return null==t?"":ui(t)}var bs=ji((function(t,n){if(wo(n)||Ju(n))Si(n,As(n),t);else for(var e in n)Ut.call(n,e)&&Ve(t,e,n[e])})),ms=ji((function(t,n){Si(n,Ts(n),t)})),ws=ji((function(t,n,e,r){Si(n,Ts(n),t,r)})),$s=ji((function(t,n,e,r){Si(n,As(n),t,r)})),Os=Vi(ir),Es=Qr((function(t,n){t=Et(t);var e=-1,r=n.length,o=r>2?n[2]:i;for(o&&go(n[0],n[1],o)&&(r=1);++e<r;)for(var u=n[e],s=Ts(u),a=-1,c=s.length;++a<c;){var l=s[a],f=t[l];(f===i||Lu(f,Pt[l])&&!Ut.call(t,l))&&(t[l]=u[l])}return t})),xs=Qr((function(t){return t.push(i,Zi),_n(Rs,i,t)}));function Cs(t,n,e){var r=null==t?i:wr(t,n);return r===i?e:r}function Ss(t,n){return null!=t&&ho(t,n,Cr)}var ks=qi((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Nt.call(n)),t[n]=e}),ta(ra)),js=qi((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Nt.call(n)),Ut.call(t,n)?t[n].push(e):t[n]=[e]}),oo),Ps=Qr(kr);function As(t){return Ju(t)?He(t):Rr(t)}function Ts(t){return Ju(t)?He(t,!0):function(t){if(!ts(t))return function(t){var n=[];if(null!=t)for(var e in Et(t))n.push(e);return n}(t);var n=wo(t),e=[];for(var r in t)("constructor"!=r||!n&&Ut.call(t,r))&&e.push(r);return e}(t)}var Us=ji((function(t,n,e){Mr(t,n,e)})),Rs=ji((function(t,n,e,r){Mr(t,n,e,r)})),Is=Vi((function(t,n){var e={};if(null==t)return e;var r=!1;n=Cn(n,(function(n){return n=yi(n,t),r||(r=n.length>1),n})),Si(t,no(t),e),r&&(e=ur(e,7,Xi));for(var i=n.length;i--;)ai(e,n[i]);return e})),Ns=Vi((function(t,n){return null==t?{}:function(t,n){return zr(t,n,(function(n,e){return Ss(t,e)}))}(t,n)}));function Ds(t,n){if(null==t)return{};var e=Cn(no(t),(function(t){return[t]}));return n=oo(n),zr(t,e,(function(t,e){return n(t,e[0])}))}var qs=Qi(As),Ms=Qi(Ts);function Ls(t){return null==t?[]:Gn(t,As(t))}var Ws=Ui((function(t,n,e){return n=n.toLowerCase(),t+(e?zs(n):n)}));function zs(t){return Zs(_s(t).toLowerCase())}function Fs(t){return(t=_s(t))&&t.replace(_t,Zn).replace(Gt,"")}var Bs=Ui((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Gs=Ui((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),Js=Ti("toLowerCase"),Qs=Ui((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()})),Hs=Ui((function(t,n,e){return t+(e?" ":"")+Zs(n)})),Ys=Ui((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Zs=Ti("toUpperCase");function Xs(t,n,e){return t=_s(t),(n=e?i:n)===i?function(t){return Yt.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(at)||[]}(t):t.match(n)||[]}var Ks=Qr((function(t,n){try{return _n(t,i,n)}catch(t){return Zu(t)?t:new wt(t)}})),Vs=Vi((function(t,n){return mn(n,(function(n){n=Do(n),rr(t,n,ju(t[n],t))})),t}));function ta(t){return function(){return t}}var na=Ni(),ea=Ni(!0);function ra(t){return t}function ia(t){return Ur("function"==typeof t?t:ur(t,1))}var oa=Qr((function(t,n){return function(e){return kr(e,t,n)}})),ua=Qr((function(t,n){return function(e){return kr(t,e,n)}}));function sa(t,n,e){var r=As(n),i=mr(n,r);null!=e||ts(n)&&(i.length||!r.length)||(e=n,n=t,t=this,i=mr(n,As(n)));var o=!(ts(e)&&"chain"in e&&!e.chain),u=Xu(t);return mn(i,(function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(o||n){var e=t(this.__wrapped__);return(e.__actions__=Ci(this.__actions__)).push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,Sn([this.value()],arguments))})})),t}function aa(){}var ca=Li(Cn),la=Li($n),fa=Li(Pn);function ha(t){return _o(t)?qn(Do(t)):function(t){return function(n){return wr(n,t)}}(t)}var da=zi(),pa=zi(!0);function va(){return[]}function ya(){return!1}var ga,_a=Mi((function(t,n){return t+n}),0),ba=Gi("ceil"),ma=Mi((function(t,n){return t/n}),1),wa=Gi("floor"),$a=Mi((function(t,n){return t*n}),1),Oa=Gi("round"),Ea=Mi((function(t,n){return t-n}),0);return qe.after=function(t,n){if("function"!=typeof n)throw new St(o);return t=ps(t),function(){if(--t<1)return n.apply(this,arguments)}},qe.ary=Su,qe.assign=bs,qe.assignIn=ms,qe.assignInWith=ws,qe.assignWith=$s,qe.at=Os,qe.before=ku,qe.bind=ju,qe.bindAll=Vs,qe.bindKey=Pu,qe.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Bu(t)?t:[t]},qe.chain=hu,qe.chunk=function(t,n,e){n=(e?go(t,n,e):n===i)?1:ye(ps(n),0);var o=null==t?0:t.length;if(!o||n<1)return[];for(var u=0,s=0,a=r(ce(o/n));u<o;)a[s++]=ti(t,u,u+=n);return a},qe.compact=function(t){for(var n=-1,e=null==t?0:t.length,r=0,i=[];++n<e;){var o=t[n];o&&(i[r++]=o)}return i},qe.concat=function(){var t=arguments.length;if(!t)return[];for(var n=r(t-1),e=arguments[0],i=t;i--;)n[i-1]=arguments[i];return Sn(Bu(e)?Ci(e):[e],vr(n,1))},qe.cond=function(t){var n=null==t?0:t.length,e=oo();return t=n?Cn(t,(function(t){if("function"!=typeof t[1])throw new St(o);return[e(t[0]),t[1]]})):[],Qr((function(e){for(var r=-1;++r<n;){var i=t[r];if(_n(i[0],this,e))return _n(i[1],this,e)}}))},qe.conforms=function(t){return function(t){var n=As(t);return function(e){return sr(e,t,n)}}(ur(t,1))},qe.constant=ta,qe.countBy=vu,qe.create=function(t,n){var e=Me(t);return null==n?e:er(e,n)},qe.curry=function t(n,e,r){var o=Hi(n,8,i,i,i,i,i,e=r?i:e);return o.placeholder=t.placeholder,o},qe.curryRight=function t(n,e,r){var o=Hi(n,16,i,i,i,i,i,e=r?i:e);return o.placeholder=t.placeholder,o},qe.debounce=Au,qe.defaults=Es,qe.defaultsDeep=xs,qe.defer=Tu,qe.delay=Uu,qe.difference=Lo,qe.differenceBy=Wo,qe.differenceWith=zo,qe.drop=function(t,n,e){var r=null==t?0:t.length;return r?ti(t,(n=e||n===i?1:ps(n))<0?0:n,r):[]},qe.dropRight=function(t,n,e){var r=null==t?0:t.length;return r?ti(t,0,(n=r-(n=e||n===i?1:ps(n)))<0?0:n):[]},qe.dropRightWhile=function(t,n){return t&&t.length?li(t,oo(n,3),!0,!0):[]},qe.dropWhile=function(t,n){return t&&t.length?li(t,oo(n,3),!0):[]},qe.fill=function(t,n,e,r){var o=null==t?0:t.length;return o?(e&&"number"!=typeof e&&go(t,n,e)&&(e=0,r=o),function(t,n,e,r){var o=t.length;for((e=ps(e))<0&&(e=-e>o?0:o+e),(r=r===i||r>o?o:ps(r))<0&&(r+=o),r=e>r?0:vs(r);e<r;)t[e++]=n;return t}(t,n,e,r)):[]},qe.filter=function(t,n){return(Bu(t)?On:pr)(t,oo(n,3))},qe.flatMap=function(t,n){return vr(Ou(t,n),1)},qe.flatMapDeep=function(t,n){return vr(Ou(t,n),l)},qe.flatMapDepth=function(t,n,e){return e=e===i?1:ps(e),vr(Ou(t,n),e)},qe.flatten=Go,qe.flattenDeep=function(t){return null!=t&&t.length?vr(t,l):[]},qe.flattenDepth=function(t,n){return null!=t&&t.length?vr(t,n=n===i?1:ps(n)):[]},qe.flip=function(t){return Hi(t,512)},qe.flow=na,qe.flowRight=ea,qe.fromPairs=function(t){for(var n=-1,e=null==t?0:t.length,r={};++n<e;){var i=t[n];r[i[0]]=i[1]}return r},qe.functions=function(t){return null==t?[]:mr(t,As(t))},qe.functionsIn=function(t){return null==t?[]:mr(t,Ts(t))},qe.groupBy=mu,qe.initial=function(t){return null!=t&&t.length?ti(t,0,-1):[]},qe.intersection=Qo,qe.intersectionBy=Ho,qe.intersectionWith=Yo,qe.invert=ks,qe.invertBy=js,qe.invokeMap=wu,qe.iteratee=ia,qe.keyBy=$u,qe.keys=As,qe.keysIn=Ts,qe.map=Ou,qe.mapKeys=function(t,n){var e={};return n=oo(n,3),_r(t,(function(t,r,i){rr(e,n(t,r,i),t)})),e},qe.mapValues=function(t,n){var e={};return n=oo(n,3),_r(t,(function(t,r,i){rr(e,r,n(t,r,i))})),e},qe.matches=function(t){return Dr(ur(t,1))},qe.matchesProperty=function(t,n){return qr(t,ur(n,1))},qe.memoize=Ru,qe.merge=Us,qe.mergeWith=Rs,qe.method=oa,qe.methodOf=ua,qe.mixin=sa,qe.negate=Iu,qe.nthArg=function(t){return t=ps(t),Qr((function(n){return Lr(n,t)}))},qe.omit=Is,qe.omitBy=function(t,n){return Ds(t,Iu(oo(n)))},qe.once=function(t){return ku(2,t)},qe.orderBy=function(t,n,e,r){return null==t?[]:(Bu(n)||(n=null==n?[]:[n]),Bu(e=r?i:e)||(e=null==e?[]:[e]),Wr(t,n,e))},qe.over=ca,qe.overArgs=Nu,qe.overEvery=la,qe.overSome=fa,qe.partial=Du,qe.partialRight=qu,qe.partition=Eu,qe.pick=Ns,qe.pickBy=Ds,qe.property=ha,qe.propertyOf=function(t){return function(n){return null==t?i:wr(t,n)}},qe.pull=Xo,qe.pullAll=Ko,qe.pullAllBy=function(t,n,e){return t&&t.length&&n&&n.length?Fr(t,n,oo(e,2)):t},qe.pullAllWith=function(t,n,e){return t&&t.length&&n&&n.length?Fr(t,n,i,e):t},qe.pullAt=Vo,qe.range=da,qe.rangeRight=pa,qe.rearg=Mu,qe.reject=function(t,n){return(Bu(t)?On:pr)(t,Iu(oo(n,3)))},qe.remove=function(t,n){var e=[];if(!t||!t.length)return e;var r=-1,i=[],o=t.length;for(n=oo(n,3);++r<o;){var u=t[r];n(u,r,t)&&(e.push(u),i.push(r))}return Br(t,i),e},qe.rest=function(t,n){if("function"!=typeof t)throw new St(o);return Qr(t,n=n===i?n:ps(n))},qe.reverse=tu,qe.sampleSize=function(t,n,e){return n=(e?go(t,n,e):n===i)?1:ps(n),(Bu(t)?Ze:Yr)(t,n)},qe.set=function(t,n,e){return null==t?t:Zr(t,n,e)},qe.setWith=function(t,n,e,r){return r="function"==typeof r?r:i,null==t?t:Zr(t,n,e,r)},qe.shuffle=function(t){return(Bu(t)?Xe:Vr)(t)},qe.slice=function(t,n,e){var r=null==t?0:t.length;return r?(e&&"number"!=typeof e&&go(t,n,e)?(n=0,e=r):(n=null==n?0:ps(n),e=e===i?r:ps(e)),ti(t,n,e)):[]},qe.sortBy=xu,qe.sortedUniq=function(t){return t&&t.length?ii(t):[]},qe.sortedUniqBy=function(t,n){return t&&t.length?ii(t,oo(n,2)):[]},qe.split=function(t,n,e){return e&&"number"!=typeof e&&go(t,n,e)&&(n=e=i),(e=e===i?d:e>>>0)?(t=_s(t))&&("string"==typeof n||null!=n&&!os(n))&&!(n=ui(n))&&Vn(t)?_i(oe(t),0,e):t.split(n,e):[]},qe.spread=function(t,n){if("function"!=typeof t)throw new St(o);return n=null==n?0:ye(ps(n),0),Qr((function(e){var r=e[n],i=_i(e,0,n);return r&&Sn(i,r),_n(t,this,i)}))},qe.tail=function(t){var n=null==t?0:t.length;return n?ti(t,1,n):[]},qe.take=function(t,n,e){return t&&t.length?ti(t,0,(n=e||n===i?1:ps(n))<0?0:n):[]},qe.takeRight=function(t,n,e){var r=null==t?0:t.length;return r?ti(t,(n=r-(n=e||n===i?1:ps(n)))<0?0:n,r):[]},qe.takeRightWhile=function(t,n){return t&&t.length?li(t,oo(n,3),!1,!0):[]},qe.takeWhile=function(t,n){return t&&t.length?li(t,oo(n,3)):[]},qe.tap=function(t,n){return n(t),t},qe.throttle=function(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new St(o);return ts(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),Au(t,n,{leading:r,maxWait:n,trailing:i})},qe.thru=du,qe.toArray=hs,qe.toPairs=qs,qe.toPairsIn=Ms,qe.toPath=function(t){return Bu(t)?Cn(t,Do):as(t)?[t]:Ci(No(_s(t)))},qe.toPlainObject=gs,qe.transform=function(t,n,e){var r=Bu(t),i=r||Hu(t)||cs(t);if(n=oo(n,4),null==e){var o=t&&t.constructor;e=i?r?new o:[]:ts(t)&&Xu(o)?Me(Jt(t)):{}}return(i?mn:_r)(t,(function(t,r,i){return n(e,t,r,i)})),e},qe.unary=function(t){return Su(t,1)},qe.union=nu,qe.unionBy=eu,qe.unionWith=ru,qe.uniq=function(t){return t&&t.length?si(t):[]},qe.uniqBy=function(t,n){return t&&t.length?si(t,oo(n,2)):[]},qe.uniqWith=function(t,n){return n="function"==typeof n?n:i,t&&t.length?si(t,i,n):[]},qe.unset=function(t,n){return null==t||ai(t,n)},qe.unzip=iu,qe.unzipWith=ou,qe.update=function(t,n,e){return null==t?t:ci(t,n,vi(e))},qe.updateWith=function(t,n,e,r){return r="function"==typeof r?r:i,null==t?t:ci(t,n,vi(e),r)},qe.values=Ls,qe.valuesIn=function(t){return null==t?[]:Gn(t,Ts(t))},qe.without=uu,qe.words=Xs,qe.wrap=function(t,n){return Du(vi(n),t)},qe.xor=su,qe.xorBy=au,qe.xorWith=cu,qe.zip=lu,qe.zipObject=function(t,n){return di(t||[],n||[],Ve)},qe.zipObjectDeep=function(t,n){return di(t||[],n||[],Zr)},qe.zipWith=fu,qe.entries=qs,qe.entriesIn=Ms,qe.extend=ms,qe.extendWith=ws,sa(qe,qe),qe.add=_a,qe.attempt=Ks,qe.camelCase=Ws,qe.capitalize=zs,qe.ceil=ba,qe.clamp=function(t,n,e){return e===i&&(e=n,n=i),e!==i&&(e=(e=ys(e))==e?e:0),n!==i&&(n=(n=ys(n))==n?n:0),or(ys(t),n,e)},qe.clone=function(t){return ur(t,4)},qe.cloneDeep=function(t){return ur(t,5)},qe.cloneDeepWith=function(t,n){return ur(t,5,n="function"==typeof n?n:i)},qe.cloneWith=function(t,n){return ur(t,4,n="function"==typeof n?n:i)},qe.conformsTo=function(t,n){return null==n||sr(t,n,As(n))},qe.deburr=Fs,qe.defaultTo=function(t,n){return null==t||t!=t?n:t},qe.divide=ma,qe.endsWith=function(t,n,e){t=_s(t),n=ui(n);var r=t.length,o=e=e===i?r:or(ps(e),0,r);return(e-=n.length)>=0&&t.slice(e,o)==n},qe.eq=Lu,qe.escape=function(t){return(t=_s(t))&&H.test(t)?t.replace(J,Xn):t},qe.escapeRegExp=function(t){return(t=_s(t))&&et.test(t)?t.replace(nt,"\\$&"):t},qe.every=function(t,n,e){var r=Bu(t)?$n:hr;return e&&go(t,n,e)&&(n=i),r(t,oo(n,3))},qe.find=yu,qe.findIndex=Fo,qe.findKey=function(t,n){return Tn(t,oo(n,3),_r)},qe.findLast=gu,qe.findLastIndex=Bo,qe.findLastKey=function(t,n){return Tn(t,oo(n,3),br)},qe.floor=wa,qe.forEach=_u,qe.forEachRight=bu,qe.forIn=function(t,n){return null==t?t:yr(t,oo(n,3),Ts)},qe.forInRight=function(t,n){return null==t?t:gr(t,oo(n,3),Ts)},qe.forOwn=function(t,n){return t&&_r(t,oo(n,3))},qe.forOwnRight=function(t,n){return t&&br(t,oo(n,3))},qe.get=Cs,qe.gt=Wu,qe.gte=zu,qe.has=function(t,n){return null!=t&&ho(t,n,xr)},qe.hasIn=Ss,qe.head=Jo,qe.identity=ra,qe.includes=function(t,n,e,r){t=Ju(t)?t:Ls(t),e=e&&!r?ps(e):0;var i=t.length;return e<0&&(e=ye(i+e,0)),ss(t)?e<=i&&t.indexOf(n,e)>-1:!!i&&Rn(t,n,e)>-1},qe.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:ps(e);return i<0&&(i=ye(r+i,0)),Rn(t,n,i)},qe.inRange=function(t,n,e){return n=ds(n),e===i?(e=n,n=0):e=ds(e),function(t,n,e){return t>=ge(n,e)&&t<ye(n,e)}(t=ys(t),n,e)},qe.invoke=Ps,qe.isArguments=Fu,qe.isArray=Bu,qe.isArrayBuffer=Gu,qe.isArrayLike=Ju,qe.isArrayLikeObject=Qu,qe.isBoolean=function(t){return!0===t||!1===t||ns(t)&&Or(t)==g},qe.isBuffer=Hu,qe.isDate=Yu,qe.isElement=function(t){return ns(t)&&1===t.nodeType&&!is(t)},qe.isEmpty=function(t){if(null==t)return!0;if(Ju(t)&&(Bu(t)||"string"==typeof t||"function"==typeof t.splice||Hu(t)||cs(t)||Fu(t)))return!t.length;var n=fo(t);if(n==$||n==S)return!t.size;if(wo(t))return!Rr(t).length;for(var e in t)if(Ut.call(t,e))return!1;return!0},qe.isEqual=function(t,n){return Pr(t,n)},qe.isEqualWith=function(t,n,e){var r=(e="function"==typeof e?e:i)?e(t,n):i;return r===i?Pr(t,n,i,e):!!r},qe.isError=Zu,qe.isFinite=function(t){return"number"==typeof t&&de(t)},qe.isFunction=Xu,qe.isInteger=Ku,qe.isLength=Vu,qe.isMap=es,qe.isMatch=function(t,n){return t===n||Ar(t,n,so(n))},qe.isMatchWith=function(t,n,e){return e="function"==typeof e?e:i,Ar(t,n,so(n),e)},qe.isNaN=function(t){return rs(t)&&t!=+t},qe.isNative=function(t){if(mo(t))throw new wt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Tr(t)},qe.isNil=function(t){return null==t},qe.isNull=function(t){return null===t},qe.isNumber=rs,qe.isObject=ts,qe.isObjectLike=ns,qe.isPlainObject=is,qe.isRegExp=os,qe.isSafeInteger=function(t){return Ku(t)&&t>=-9007199254740991&&t<=f},qe.isSet=us,qe.isString=ss,qe.isSymbol=as,qe.isTypedArray=cs,qe.isUndefined=function(t){return t===i},qe.isWeakMap=function(t){return ns(t)&&fo(t)==P},qe.isWeakSet=function(t){return ns(t)&&"[object WeakSet]"==Or(t)},qe.join=function(t,n){return null==t?"":pe.call(t,n)},qe.kebabCase=Bs,qe.last=Zo,qe.lastIndexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=r;return e!==i&&(o=(o=ps(e))<0?ye(r+o,0):ge(o,r-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,o):Un(t,Nn,o,!0)},qe.lowerCase=Gs,qe.lowerFirst=Js,qe.lt=ls,qe.lte=fs,qe.max=function(t){return t&&t.length?dr(t,ra,Er):i},qe.maxBy=function(t,n){return t&&t.length?dr(t,oo(n,2),Er):i},qe.mean=function(t){return Dn(t,ra)},qe.meanBy=function(t,n){return Dn(t,oo(n,2))},qe.min=function(t){return t&&t.length?dr(t,ra,Ir):i},qe.minBy=function(t,n){return t&&t.length?dr(t,oo(n,2),Ir):i},qe.stubArray=va,qe.stubFalse=ya,qe.stubObject=function(){return{}},qe.stubString=function(){return""},qe.stubTrue=function(){return!0},qe.multiply=$a,qe.nth=function(t,n){return t&&t.length?Lr(t,ps(n)):i},qe.noConflict=function(){return un._===this&&(un._=qt),this},qe.noop=aa,qe.now=Cu,qe.pad=function(t,n,e){t=_s(t);var r=(n=ps(n))?ie(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return Wi(le(i),e)+t+Wi(ce(i),e)},qe.padEnd=function(t,n,e){t=_s(t);var r=(n=ps(n))?ie(t):0;return n&&r<n?t+Wi(n-r,e):t},qe.padStart=function(t,n,e){t=_s(t);var r=(n=ps(n))?ie(t):0;return n&&r<n?Wi(n-r,e)+t:t},qe.parseInt=function(t,n,e){return e||null==n?n=0:n&&(n=+n),be(_s(t).replace(rt,""),n||0)},qe.random=function(t,n,e){if(e&&"boolean"!=typeof e&&go(t,n,e)&&(n=e=i),e===i&&("boolean"==typeof n?(e=n,n=i):"boolean"==typeof t&&(e=t,t=i)),t===i&&n===i?(t=0,n=1):(t=ds(t),n===i?(n=t,t=0):n=ds(n)),t>n){var r=t;t=n,n=r}if(e||t%1||n%1){var o=me();return ge(t+o*(n-t+nn("1e-"+((o+"").length-1))),n)}return Gr(t,n)},qe.reduce=function(t,n,e){var r=Bu(t)?kn:Ln,i=arguments.length<3;return r(t,oo(n,4),e,i,lr)},qe.reduceRight=function(t,n,e){var r=Bu(t)?jn:Ln,i=arguments.length<3;return r(t,oo(n,4),e,i,fr)},qe.repeat=function(t,n,e){return n=(e?go(t,n,e):n===i)?1:ps(n),Jr(_s(t),n)},qe.replace=function(){var t=arguments,n=_s(t[0]);return t.length<3?n:n.replace(t[1],t[2])},qe.result=function(t,n,e){var r=-1,o=(n=yi(n,t)).length;for(o||(o=1,t=i);++r<o;){var u=null==t?i:t[Do(n[r])];u===i&&(r=o,u=e),t=Xu(u)?u.call(t):u}return t},qe.round=Oa,qe.runInContext=t,qe.sample=function(t){return(Bu(t)?Ye:Hr)(t)},qe.size=function(t){if(null==t)return 0;if(Ju(t))return ss(t)?ie(t):t.length;var n=fo(t);return n==$||n==S?t.size:Rr(t).length},qe.snakeCase=Qs,qe.some=function(t,n,e){var r=Bu(t)?Pn:ni;return e&&go(t,n,e)&&(n=i),r(t,oo(n,3))},qe.sortedIndex=function(t,n){return ei(t,n)},qe.sortedIndexBy=function(t,n,e){return ri(t,n,oo(e,2))},qe.sortedIndexOf=function(t,n){var e=null==t?0:t.length;if(e){var r=ei(t,n);if(r<e&&Lu(t[r],n))return r}return-1},qe.sortedLastIndex=function(t,n){return ei(t,n,!0)},qe.sortedLastIndexBy=function(t,n,e){return ri(t,n,oo(e,2),!0)},qe.sortedLastIndexOf=function(t,n){if(null!=t&&t.length){var e=ei(t,n,!0)-1;if(Lu(t[e],n))return e}return-1},qe.startCase=Hs,qe.startsWith=function(t,n,e){return t=_s(t),e=null==e?0:or(ps(e),0,t.length),n=ui(n),t.slice(e,e+n.length)==n},qe.subtract=Ea,qe.sum=function(t){return t&&t.length?Wn(t,ra):0},qe.sumBy=function(t,n){return t&&t.length?Wn(t,oo(n,2)):0},qe.template=function(t,n,e){var r=qe.templateSettings;e&&go(t,n,e)&&(n=i),t=_s(t),n=ws({},n,r,Yi);var o,u,s=ws({},n.imports,r.imports,Yi),a=As(s),c=Gn(s,a),l=0,f=n.interpolate||bt,h="__p += '",d=xt((n.escape||bt).source+"|"+f.source+"|"+(f===X?ft:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),p="//# sourceURL="+(Ut.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xt+"]")+"\n";t.replace(d,(function(n,e,r,i,s,a){return r||(r=i),h+=t.slice(l,a).replace(mt,Kn),e&&(o=!0,h+="' +\n__e("+e+") +\n'"),s&&(u=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+n.length,n})),h+="';\n";var v=Ut.call(n,"variable")&&n.variable;if(v){if(ct.test(v))throw new wt("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(u?h.replace(z,""):h).replace(F,"$1").replace(B,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=Ks((function(){return $t(a,p+"return "+h).apply(i,c)}));if(y.source=h,Zu(y))throw y;return y},qe.times=function(t,n){if((t=ps(t))<1||t>f)return[];var e=d,r=ge(t,d);n=oo(n),t-=d;for(var i=zn(r,n);++e<t;)n(e);return i},qe.toFinite=ds,qe.toInteger=ps,qe.toLength=vs,qe.toLower=function(t){return _s(t).toLowerCase()},qe.toNumber=ys,qe.toSafeInteger=function(t){return t?or(ps(t),-9007199254740991,f):0===t?t:0},qe.toString=_s,qe.toUpper=function(t){return _s(t).toUpperCase()},qe.trim=function(t,n,e){if((t=_s(t))&&(e||n===i))return Fn(t);if(!t||!(n=ui(n)))return t;var r=oe(t),o=oe(n);return _i(r,Qn(r,o),Hn(r,o)+1).join("")},qe.trimEnd=function(t,n,e){if((t=_s(t))&&(e||n===i))return t.slice(0,ue(t)+1);if(!t||!(n=ui(n)))return t;var r=oe(t);return _i(r,0,Hn(r,oe(n))+1).join("")},qe.trimStart=function(t,n,e){if((t=_s(t))&&(e||n===i))return t.replace(rt,"");if(!t||!(n=ui(n)))return t;var r=oe(t);return _i(r,Qn(r,oe(n))).join("")},qe.truncate=function(t,n){var e=30,r="...";if(ts(n)){var o="separator"in n?n.separator:o;e="length"in n?ps(n.length):e,r="omission"in n?ui(n.omission):r}var u=(t=_s(t)).length;if(Vn(t)){var s=oe(t);u=s.length}if(e>=u)return t;var a=e-ie(r);if(a<1)return r;var c=s?_i(s,0,a).join(""):t.slice(0,a);if(o===i)return c+r;if(s&&(a+=c.length-a),os(o)){if(t.slice(a).search(o)){var l,f=c;for(o.global||(o=xt(o.source,_s(ht.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===i?a:h)}}else if(t.indexOf(ui(o),a)!=a){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},qe.unescape=function(t){return(t=_s(t))&&Q.test(t)?t.replace(G,se):t},qe.uniqueId=function(t){var n=++Rt;return _s(t)+n},qe.upperCase=Ys,qe.upperFirst=Zs,qe.each=_u,qe.eachRight=bu,qe.first=Jo,sa(qe,(ga={},_r(qe,(function(t,n){Ut.call(qe.prototype,n)||(ga[n]=t)})),ga),{chain:!1}),qe.VERSION="4.17.21",mn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){qe[t].placeholder=qe})),mn(["drop","take"],(function(t,n){ze.prototype[t]=function(e){e=e===i?1:ye(ps(e),0);var r=this.__filtered__&&!n?new ze(this):this.clone();return r.__filtered__?r.__takeCount__=ge(e,r.__takeCount__):r.__views__.push({size:ge(e,d),type:t+(r.__dir__<0?"Right":"")}),r},ze.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),mn(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;ze.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:oo(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),mn(["head","last"],(function(t,n){var e="take"+(n?"Right":"");ze.prototype[t]=function(){return this[e](1).value()[0]}})),mn(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");ze.prototype[t]=function(){return this.__filtered__?new ze(this):this[e](1)}})),ze.prototype.compact=function(){return this.filter(ra)},ze.prototype.find=function(t){return this.filter(t).head()},ze.prototype.findLast=function(t){return this.reverse().find(t)},ze.prototype.invokeMap=Qr((function(t,n){return"function"==typeof t?new ze(this):this.map((function(e){return kr(e,t,n)}))})),ze.prototype.reject=function(t){return this.filter(Iu(oo(t)))},ze.prototype.slice=function(t,n){t=ps(t);var e=this;return e.__filtered__&&(t>0||n<0)?new ze(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==i&&(e=(n=ps(n))<0?e.dropRight(-n):e.take(n-t)),e)},ze.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},ze.prototype.toArray=function(){return this.take(d)},_r(ze.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),o=qe[r?"take"+("last"==n?"Right":""):n],u=r||/^find/.test(n);o&&(qe.prototype[n]=function(){var n=this.__wrapped__,s=r?[1]:arguments,a=n instanceof ze,c=s[0],l=a||Bu(n),f=function(t){var n=o.apply(qe,Sn([t],s));return r&&h?n[0]:n};l&&e&&"function"==typeof c&&1!=c.length&&(a=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=u&&!h,v=a&&!d;if(!u&&l){n=v?n:new ze(this);var y=t.apply(n,s);return y.__actions__.push({func:du,args:[f],thisArg:i}),new We(y,h)}return p&&v?t.apply(this,s):(y=this.thru(f),p?r?y.value()[0]:y.value():y)})})),mn(["pop","push","shift","sort","splice","unshift"],(function(t){var n=kt[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);qe.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(Bu(i)?i:[],t)}return this[e]((function(e){return n.apply(Bu(e)?e:[],t)}))}})),_r(ze.prototype,(function(t,n){var e=qe[n];if(e){var r=e.name+"";Ut.call(je,r)||(je[r]=[]),je[r].push({name:n,func:e})}})),je[Di(i,2).name]=[{name:"wrapper",func:i}],ze.prototype.clone=function(){var t=new ze(this.__wrapped__);return t.__actions__=Ci(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ci(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ci(this.__views__),t},ze.prototype.reverse=function(){if(this.__filtered__){var t=new ze(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},ze.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Bu(t),r=n<0,i=e?t.length:0,o=function(t,n,e){for(var r=-1,i=e.length;++r<i;){var o=e[r],u=o.size;switch(o.type){case"drop":t+=u;break;case"dropRight":n-=u;break;case"take":n=ge(n,t+u);break;case"takeRight":t=ye(t,n-u)}}return{start:t,end:n}}(0,i,this.__views__),u=o.start,s=o.end,a=s-u,c=r?s:u-1,l=this.__iteratees__,f=l.length,h=0,d=ge(a,this.__takeCount__);if(!e||!r&&i==a&&d==a)return fi(t,this.__actions__);var p=[];t:for(;a--&&h<d;){for(var v=-1,y=t[c+=n];++v<f;){var g=l[v],_=g.iteratee,b=g.type,m=_(y);if(2==b)y=m;else if(!m){if(1==b)continue t;break t}}p[h++]=y}return p},qe.prototype.at=pu,qe.prototype.chain=function(){return hu(this)},qe.prototype.commit=function(){return new We(this.value(),this.__chain__)},qe.prototype.next=function(){this.__values__===i&&(this.__values__=hs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},qe.prototype.plant=function(t){for(var n,e=this;e instanceof Le;){var r=Mo(e);r.__index__=0,r.__values__=i,n?o.__wrapped__=r:n=r;var o=r;e=e.__wrapped__}return o.__wrapped__=t,n},qe.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof ze){var n=t;return this.__actions__.length&&(n=new ze(this)),(n=n.reverse()).__actions__.push({func:du,args:[tu],thisArg:i}),new We(n,this.__chain__)}return this.thru(tu)},qe.prototype.toJSON=qe.prototype.valueOf=qe.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},qe.prototype.first=qe.prototype.head,sn&&(qe.prototype[sn]=function(){return this}),qe}();un._=ae,(r=function(){return ae}.call(n,e,n,t))===i||(t.exports=r)}.call(this)}},n={};function e(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}return e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),e(568)})()},61:function(t,n,e){var r;t.exports=(r=e(947),(()=>{"use strict";var t={848:function(t,n,e){var r=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{a(r.next(t))}catch(t){o(t)}}function s(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,s)}a((r=r.apply(t,n||[])).next())}))};Object.defineProperty(n,"__esModule",{value:!0});const i=e(196);class o extends i.Entity{constructor(t){super(t),null==t&&(this.$data.enabled=!0,this.$data.abilities=[])}static factory(t){const n=Object.create(null,{factory:{get:()=>super.factory}});return r(this,void 0,void 0,(function*(){return yield n.factory.call(this,t)}))}static factorySync(t){return super.factorySync(t)}$checkGroupname(){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$checkGroupname",[],!0)}))}$checkEmail(){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$checkEmail",[],!0)}))}$getAvatar(){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$getAvatar",[],!0)}))}$getChildren(){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$getChildren",[],!0)}))}$getDescendants(t=!1){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$getDescendants",[t],!0)}))}$getLevel(){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$getLevel",[],!0)}))}$isDescendant(t){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$isDescendant",[t],!0)}))}static getPrimaryGroups(t,n){return r(this,void 0,void 0,(function*(){return yield o.serverCallStatic("getPrimaryGroups",[{options:t,class:o.class},n])}))}static getSecondaryGroups(t,n){return r(this,void 0,void 0,(function*(){return yield o.serverCallStatic("getSecondaryGroups",[{options:t,class:o.class},n])}))}}n.default=o,o.class="Group",i.Nymph.setEntityClass(o.class,o)},178:function(t,n,e){var r=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{a(r.next(t))}catch(t){o(t)}}function s(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,s)}a((r=r.apply(t,n||[])).next())}))};Object.defineProperty(n,"__esModule",{value:!0});const i=e(196);let o=null;class u extends i.Entity{constructor(t){super(t),null==t&&(this.$data.enabled=!0,this.$data.abilities=[],this.$data.groups=[],this.$data.inheritAbilities=!0)}static init(){this.removeNymphResponseListener&&this.removeNymphResponseListener(),this.removeNymphResponseListener=i.Nymph.on("response",(t=>u.handleToken(t))),u.handleToken()}static factory(t){const n=Object.create(null,{factory:{get:()=>super.factory}});return r(this,void 0,void 0,(function*(){return yield n.factory.call(this,t)}))}static factoryUsername(t){return r(this,void 0,void 0,(function*(){const n=new this;if(null!=t){const n=yield i.Nymph.getEntity({class:this},{type:"&",ilike:["username",t.replace(/([\\%_])/g,(t=>`\\${t}`))]});if(null!=n)return n}return n}))}static factorySync(t){return super.factorySync(t)}$checkUsername(){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$checkUsername",[],!0)}))}$checkEmail(){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$checkEmail",[],!0)}))}$checkPhone(){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$checkPhone",[],!0)}))}$getAvatar(){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$getAvatar",[],!0)}))}$register(t){return r(this,void 0,void 0,(function*(){const n=yield this.$serverCall("$register",[t]);if(n.result)for(let t=0;t<u.registerCallbacks.length;t++)u.registerCallbacks[t]&&u.registerCallbacks[t](this);if(n.loggedin){u.currentUser=this,u.handleToken();for(let t=0;t<u.loginCallbacks.length;t++)u.loginCallbacks[t]&&u.loginCallbacks[t](this)}return n}))}$logout(){return r(this,void 0,void 0,(function*(){const t=yield this.$serverCall("$logout",[]);if(t.result){u.currentUser=void 0,u.handleToken();for(let t=0;t<u.logoutCallbacks.length;t++)u.logoutCallbacks[t]&&u.logoutCallbacks[t](this)}return t}))}$gatekeeper(t){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$gatekeeper",[t],!0)}))}$changePassword(t){return r(this,void 0,void 0,(function*(){return yield this.$serverCall("$changePassword",[t])}))}static current(t){return r(this,void 0,void 0,(function*(){return void 0!==u.currentUser?u.currentUser:(u.currentUserPromise||(u.currentUserPromise=u.serverCallStatic("current",[!1]).then((t=>(u.currentUser=null!=t?t:void 0,u.currentUserPromise=void 0,t)))),yield u.currentUserPromise,null==u.currentUser?t?u.factorySync():null:u.currentUser)}))}static loginUser(t){return r(this,void 0,void 0,(function*(){const n=yield u.serverCallStatic("loginUser",[t]);if(n.result){u.currentUser=n.user,u.handleToken();for(let t=0;t<u.loginCallbacks.length;t++)u.loginCallbacks[t]&&u.loginCallbacks[t](n.user)}return n}))}static sendRecovery(t){return r(this,void 0,void 0,(function*(){return yield u.serverCallStatic("sendRecovery",[t])}))}static recover(t){return r(this,void 0,void 0,(function*(){return yield u.serverCallStatic("recover",[t])}))}static getClientConfig(){return r(this,void 0,void 0,(function*(){return u.clientConfig?u.clientConfig:(u.clientConfigPromise||(u.clientConfigPromise=u.serverCallStatic("getClientConfig",[]).then((t=>(u.clientConfig=t,u.clientConfigPromise=void 0,t)))),yield u.clientConfigPromise)}))}static handleToken(t){let n=null;const e=/(?:(?:^|.*;\s*)TILMELDAUTH\s*=\s*([^;]*).*$)|^.*$/;if(t&&t.headers.has("X-TILMELDAUTH"))n=t.headers.get("X-TILMELDAUTH");else{if("undefined"==typeof document||!document.cookie.match(e))return;n=document.cookie.replace(e,"$1")}if(o!==n)if(null==n||""===n)null!=o&&(i.Nymph.setXsrfToken(null),i.PubSub.isConfigured()&&i.PubSub.setToken(null),o=null);else{const t=n.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),e="undefined"==typeof atob?Buffer.from(t,"base64").toString("binary"):atob(t),r=JSON.parse(e);i.Nymph.setXsrfToken(r.xsrfToken),i.PubSub.isConfigured()&&i.PubSub.setToken(n),o=n}}static on(t,n){const e=t+"Callbacks";if(!this.hasOwnProperty(e))throw new Error("Invalid event type.");return this[e].push(n),()=>this.off(t,n)}static off(t,n){const e=t+"Callbacks";if(!this.hasOwnProperty(e))return!1;const r=this[e].indexOf(n);return r>-1&&this[e].splice(r,1),!0}}n.default=u,u.class="User",u.registerCallbacks=[],u.loginCallbacks=[],u.logoutCallbacks=[],i.Nymph.setEntityClass(u.class,u),u.init()},13:function(t,n,e){var r=this&&this.__awaiter||function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{a(r.next(t))}catch(t){o(t)}}function s(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,s)}a((r=r.apply(t,n||[])).next())}))},i=this&&this.__rest||function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}return e},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.checkUsername=n.register=n.login=n.getClientConfig=void 0;const u=o(e(178));let s=null,a=null;function c(){return r(this,void 0,void 0,(function*(){return s||(a||(a=u.default.getClientConfig().then((t=>s=t))),yield a)}))}n.getClientConfig=c,n.login=function(t,n){var e;return r(this,void 0,void 0,(function*(){if(""===t)throw new Error("You need to enter a username.");if(""===n)throw new Error("You need to enter a password");try{const e=yield u.default.loginUser({username:t,password:n}),{result:r}=e,o=i(e,["result"]);if(!r)throw new Error(o.message);return o}catch(t){throw new Error(null!==(e=null==t?void 0:t.message)&&void 0!==e?e:"An error occurred.")}}))},n.register=function(t){var n;return r(this,void 0,void 0,(function*(){if(""===t.username)throw new Error("You need to enter a username.");if(!t.usernameVerified)throw new Error("The username you entered is not valid.");if(t.password!==t.password2)throw new Error("Your passwords do not match.");if(""===t.password)throw new Error("You need to enter a password");let e=u.default.factorySync();e.username=t.username;const r=yield c();r.emailUsernames?e.email=t.username:-1!==r.regFields.indexOf("email")&&(e.email=t.email),-1!==r.regFields.indexOf("name")&&(e.nameFirst=t.nameFirst,e.nameLast=t.nameLast),-1!==r.regFields.indexOf("phone")&&(e.phone=t.phone);try{const n=yield e.$register({password:t.password}),{result:r}=n,o=i(n,["result"]);if(!r)throw new Error(o.message);return Object.assign(Object.assign({},o),{user:e})}catch(t){throw new Error(null!==(n=null==t?void 0:t.message)&&void 0!==n?n:"An error occurred.")}}))},n.checkUsername=function(t){var n;return r(this,void 0,void 0,(function*(){let e=u.default.factorySync();e.username=t,(yield c()).emailUsernames&&(e.email=t);try{const t=yield e.$checkUsername(),{result:n}=t,r=i(t,["result"]);if(!n)throw new Error(r.message);return r}catch(t){throw new Error(null!==(n=null==t?void 0:t.message)&&void 0!==n?n:"An error occurred.")}}))}},568:function(t,n,e){var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.User=n.Group=void 0,i(e(848),n);const u=o(e(848));n.Group=u.default,i(e(13),n),i(e(178),n);const s=o(e(178));n.User=s.default},196:t=>{t.exports=r}},n={};return function e(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return t[r].call(o.exports,o,o.exports,e),o.exports}(568)})())}},n={};function e(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return t[r].call(o.exports,o,o.exports,e),o.exports}e.d=(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};e.r(t),e.d(t,{applyPassive:()=>Et});var n={};function r(){}function i(t,n){for(const e in n)t[e]=n[e];return t}function o(t){return t()}function u(){return Object.create(null)}function s(t){t.forEach(o)}function a(t){return"function"==typeof t}function c(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}function l(t){return 0===Object.keys(t).length}function f(t,n,e,r){if(t){const i=h(t,n,e,r);return t[0](i)}}function h(t,n,e,r){return t[1]&&r?i(e.ctx.slice(),t[1](r(n))):e.ctx}function d(t,n,e,r){if(t[2]&&r){const i=t[2](r(e));if(void 0===n.dirty)return i;if("object"==typeof i){const t=[],e=Math.max(n.dirty.length,i.length);for(let r=0;r<e;r+=1)t[r]=n.dirty[r]|i[r];return t}return n.dirty|i}return n.dirty}function p(t,n,e,r,i,o){if(i){const u=h(n,e,r,o);t.p(u,i)}}function v(t){if(t.ctx.length>32){const n=[],e=t.ctx.length/32;for(let t=0;t<e;t++)n[t]=-1;return n}return-1}function y(t){const n={};for(const e in t)"$"!==e[0]&&(n[e]=t[e]);return n}function g(t,n){const e={};n=new Set(n);for(const r in t)n.has(r)||"$"===r[0]||(e[r]=t[r]);return e}function _(t){return t&&a(t.destroy)?t.destroy:r}e.r(n),e.d(n,{closest:()=>xt,estimateScrollWidth:()=>St,matches:()=>Ct}),new Set;let b,m=!1;function w(t,n,e){t.insertBefore(n,e||null)}function $(t){t.parentNode.removeChild(t)}function O(t){return document.createElement(t)}function E(t,n,e,r){return t.addEventListener(n,e,r),()=>t.removeEventListener(n,e,r)}function x(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function C(t,n){const e=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in n)null==n[r]?t.removeAttribute(r):"style"===r?t.style.cssText=n[r]:"__value"===r?t.value=t[r]=n[r]:e[r]&&e[r].set?t[r]=n[r]:x(t,r,n[r])}function S(t){b=t}function k(){if(!b)throw new Error("Function called outside component initialization");return b}function j(t,n){k().$$.context.set(t,n)}new Set;const P=[],A=[],T=[],U=[],R=Promise.resolve();let I=!1;function N(t){T.push(t)}let D=!1;const q=new Set;function M(){if(!D){D=!0;do{for(let t=0;t<P.length;t+=1){const n=P[t];S(n),L(n.$$)}for(S(null),P.length=0;A.length;)A.pop()();for(let t=0;t<T.length;t+=1){const n=T[t];q.has(n)||(q.add(n),n())}T.length=0}while(P.length);for(;U.length;)U.pop()();I=!1,D=!1,q.clear()}}function L(t){if(null!==t.fragment){t.update(),s(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(N)}}const W=new Set;let z;function F(t,n){t&&t.i&&(W.delete(t),t.i(n))}function B(t,n,e,r){if(t&&t.o){if(W.has(t))return;W.add(t),z.c.push((()=>{W.delete(t),r&&(e&&t.d(1),r())})),t.o(n)}}const G="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function J(t,n){const e={},r={},i={$$scope:1};let o=t.length;for(;o--;){const u=t[o],s=n[o];if(s){for(const t in u)t in s||(r[t]=1);for(const t in s)i[t]||(e[t]=s[t],i[t]=1);t[o]=s}else for(const t in u)i[t]=1}for(const t in r)t in e||(e[t]=void 0);return e}function Q(t){return"object"==typeof t&&null!==t?t:{}}let H;function Y(t){t&&t.c()}function Z(t,n,e,r){const{fragment:i,on_mount:u,on_destroy:c,after_update:l}=t.$$;i&&i.m(n,e),r||N((()=>{const n=u.map(o).filter(a);c?c.push(...n):s(n),t.$$.on_mount=[]})),l.forEach(N)}function X(t,n){const e=t.$$;null!==e.fragment&&(s(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function K(t,n,e,i,o,a,c,l=[-1]){const f=b;S(t);const h=t.$$={fragment:null,ctx:null,props:a,update:r,not_equal:o,bound:u(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(f?f.$$.context:n.context||[]),callbacks:u(),dirty:l,skip_bound:!1,root:n.target||f.$$.root};c&&c(h.root);let d=!1;if(h.ctx=e?e(t,n.props||{},((n,e,...r)=>{const i=r.length?r[0]:e;return h.ctx&&o(h.ctx[n],h.ctx[n]=i)&&(!h.skip_bound&&h.bound[n]&&h.bound[n](i),d&&function(t,n){-1===t.$$.dirty[0]&&(P.push(t),I||(I=!0,R.then(M)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}(t,n)),e})):[],h.update(),d=!0,s(h.before_update),h.fragment=!!i&&i(h.ctx),n.target){if(n.hydrate){m=!0;const t=(p=n.target,Array.from(p.childNodes));h.fragment&&h.fragment.l(t),t.forEach($)}else h.fragment&&h.fragment.c();n.intro&&F(t.$$.fragment),Z(t,n.target,n.anchor,n.customElement),m=!1,M()}var p;S(f)}new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),"function"==typeof HTMLElement&&(H=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(a);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){s(this.$$.on_disconnect)}$destroy(){X(this,1),this.$destroy=r}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});class V{$destroy(){X(this,1),this.$destroy=r}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const tt=/^[a-z]+(?::(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/,nt=/^[^$]+(?:\$(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/;function et(t){let n,e=[];function r(n){!function(t,n){const e=t.$$.callbacks[n.type];e&&e.slice().forEach((t=>t.call(this,n)))}(t,n)}return t.$on=(t,r)=>{let i=t,o=()=>{};return n?o=n(i,r):e.push([i,r]),i.match(tt)&&console&&console.warn('Event modifiers in SMUI now use "$" instead of ":", so that all events can be bound with modifiers. Please update your event binding: ',i),(...t)=>{o()}},t=>{const i=[],o={};n=(n,e)=>{let u=n,s=e,a=!1;const c=u.match(tt),l=u.match(nt),f=c||l;if(u.match(/^SMUI:\w+:/)){const t=u.split(":");let n="";for(let e=0;e<t.length;e++)n+=e===t.length-1?":"+t[e]:t[e].split("-").map((t=>t.slice(0,1).toUpperCase()+t.slice(1))).join("");console.warn(`The event ${u.split("$")[0]} has been renamed to ${n.split("$")[0]}.`),u=n}if(f){const t=u.split(c?":":"$");u=t[0];const n=Object.fromEntries(t.slice(1).map((t=>[t,!0])));n.passive&&(a=a||{},a.passive=!0),n.nonpassive&&(a=a||{},a.passive=!1),n.capture&&(a=a||{},a.capture=!0),n.once&&(a=a||{},a.once=!0),n.preventDefault&&(h=s,s=function(t){return t.preventDefault(),h.call(this,t)}),n.stopPropagation&&(s=function(t){return function(n){return n.stopPropagation(),t.call(this,n)}}(s))}var h;const d=E(t,u,s,a),p=()=>{d();const t=i.indexOf(p);t>-1&&i.splice(t,1)};return i.push(p),u in o||(o[u]=E(t,u,r)),p};for(let t=0;t<e.length;t++)n(e[t][0],e[t][1]);return{destroy:()=>{for(let t=0;t<i.length;t++)i[t]();for(let t of Object.entries(o))t[1]()}}}}function rt(t){return Object.entries(t).filter((([t,n])=>""!==t&&n)).map((([t])=>t)).join(" ")}function it(t){let n,e,r,o,u,c;const l=t[6].default,h=f(l,t,t[5],null);let y=[t[3]],g={};for(let t=0;t<y.length;t+=1)g=i(g,y[t]);return{c(){n=O("div"),h&&h.c(),C(n,g)},m(i,s){w(i,n,s),h&&h.m(n,null),t[7](n),o=!0,u||(c=[_(e=pt.call(null,n,t[0])),_(r=t[2].call(null,n))],u=!0)},p(t,[r]){h&&h.p&&(!o||32&r)&&p(h,l,t,t[5],o?d(l,t[5],r,null):v(t[5]),null),C(n,g=J(y,[8&r&&t[3]])),e&&a(e.update)&&1&r&&e.update.call(null,t[0])},i(t){o||(F(h,t),o=!0)},o(t){B(h,t),o=!1},d(e){e&&$(n),h&&h.d(e),t[7](null),u=!1,s(c)}}}function ot(t,n,e){const r=["use","getElement"];let o=g(n,r),{$$slots:u={},$$scope:s}=n,{use:a=[]}=n;const c=et(k());let l;return t.$$set=t=>{n=i(i({},n),y(t)),e(3,o=g(n,r)),"use"in t&&e(0,a=t.use),"$$scope"in t&&e(5,s=t.$$scope)},[a,l,c,o,function(){return l},s,u,function(t){A[t?"unshift":"push"]((()=>{l=t,e(1,l)}))}]}const ut=class extends V{constructor(t){super(),K(this,t,ot,it,c,{use:0,getElement:4})}get getElement(){return this.$$.ctx[4]}},st={component:ut,class:"",classMap:{},contexts:{},props:{}};function at(t){let n;const e=t[10].default,r=f(e,t,t[12],null);return{c(){r&&r.c()},m(t,e){r&&r.m(t,e),n=!0},p(t,i){r&&r.p&&(!n||4096&i)&&p(r,e,t,t[12],n?d(e,t[12],i,null):v(t[12]),null)},i(t){n||(F(r,t),n=!0)},o(t){B(r,t),n=!1},d(t){r&&r.d(t)}}}function ct(t){let n,e,r;const o=[{use:[t[7],...t[0]]},{class:rt({[t[1]]:!0,[t[5]]:!0,...t[4]})},t[6],t[8]];var u=t[2];function a(t){let n={$$slots:{default:[at]},$$scope:{ctx:t}};for(let t=0;t<o.length;t+=1)n=i(n,o[t]);return{props:n}}return u&&(n=new u(a(t)),t[11](n)),{c(){var t;n&&Y(n.$$.fragment),t="",e=document.createTextNode(t)},m(t,i){n&&Z(n,t,i),w(t,e,i),r=!0},p(t,[r]){const i=499&r?J(o,[129&r&&{use:[t[7],...t[0]]},50&r&&{class:rt({[t[1]]:!0,[t[5]]:!0,...t[4]})},64&r&&Q(t[6]),256&r&&Q(t[8])]):{};if(4096&r&&(i.$$scope={dirty:r,ctx:t}),u!==(u=t[2])){if(n){z={r:0,c:[],p:z};const t=n;B(t.$$.fragment,1,0,(()=>{X(t,1)})),z.r||s(z.c),z=z.p}u?(n=new u(a(t)),t[11](n),Y(n.$$.fragment),F(n.$$.fragment,1),Z(n,e.parentNode,e)):n=null}else u&&n.$set(i)},i(t){r||(n&&F(n.$$.fragment,t),r=!0)},o(t){n&&B(n.$$.fragment,t),r=!1},d(r){t[11](null),r&&$(e),n&&X(n,r)}}}function lt(t,n,e){const r=["use","class","component","getElement"];let o,u=g(n,r),{$$slots:s={},$$scope:a}=n,{use:c=[]}=n,{class:l=""}=n;const f=st.class,h={},d=[],p=st.contexts,v=st.props;let{component:_=st.component}=n;Object.entries(st.classMap).forEach((([t,n])=>{const r=(i=n,k().$$.context.get(i));var i;r&&"subscribe"in r&&d.push(r.subscribe((n=>{e(4,h[t]=n,h)})))}));const b=et(k());for(let t in p)p.hasOwnProperty(t)&&j(t,p[t]);var m;return m=()=>{for(const t of d)t()},k().$$.on_destroy.push(m),t.$$set=t=>{n=i(i({},n),y(t)),e(8,u=g(n,r)),"use"in t&&e(0,c=t.use),"class"in t&&e(1,l=t.class),"component"in t&&e(2,_=t.component),"$$scope"in t&&e(12,a=t.$$scope)},[c,l,_,o,h,f,v,b,u,function(){return o.getElement()},s,function(t){A[t?"unshift":"push"]((()=>{o=t,e(3,o)}))},a]}const ft=class extends V{constructor(t){super(),K(this,t,lt,ct,c,{use:0,class:1,component:2,getElement:9})}get getElement(){return this.$$.ctx[9]}},ht=Object.assign({},st);function dt(t){return new Proxy(ft,{construct:function(n,e){return Object.assign(st,ht,t),new n(...e)},get:function(n,e){return Object.assign(st,ht,t),n[e]}})}function pt(t,n){let e=[];if(n)for(let r=0;r<n.length;r++){const i=n[r],o=Array.isArray(i)?i[0]:i;Array.isArray(i)&&i.length>1?e.push(o(t,i[1])):e.push(o(t))}return{update(t){if((t&&t.length||0)!=e.length)throw new Error("You must not change the length of an actions array.");if(t)for(let n=0;n<t.length;n++){const r=e[n];if(r&&r.update){const e=t[n];Array.isArray(e)&&e.length>1?r.update(e[1]):r.update()}}},destroy(){for(let t=0;t<e.length;t++){const n=e[t];n&&n.destroy&&n.destroy()}}}}const{document:vt,window:yt}=G;function gt(t){let n,e,r,o,u,c;const l=t[6].default,h=f(l,t,t[5],null);let y=[t[3]],g={};for(let t=0;t<y.length;t+=1)g=i(g,y[t]);return{c(){n=O("h2"),h&&h.c(),C(n,g)},m(i,s){w(i,n,s),h&&h.m(n,null),t[7](n),o=!0,u||(c=[_(e=pt.call(null,n,t[0])),_(r=t[2].call(null,n))],u=!0)},p(t,[r]){h&&h.p&&(!o||32&r)&&p(h,l,t,t[5],o?d(l,t[5],r,null):v(t[5]),null),C(n,g=J(y,[8&r&&t[3]])),e&&a(e.update)&&1&r&&e.update.call(null,t[0])},i(t){o||(F(h,t),o=!0)},o(t){B(h,t),o=!1},d(e){e&&$(n),h&&h.d(e),t[7](null),u=!1,s(c)}}}function _t(t,n,e){const r=["use","getElement"];let o=g(n,r),{$$slots:u={},$$scope:s}=n,{use:a=[]}=n;const c=et(k());let l;return t.$$set=t=>{n=i(i({},n),y(t)),e(3,o=g(n,r)),"use"in t&&e(0,a=t.use),"$$scope"in t&&e(5,s=t.$$scope)},[a,l,c,o,function(){return l},s,u,function(t){A[t?"unshift":"push"]((()=>{l=t,e(1,l)}))}]}function bt(t){let n,e,r,o,u,c;const l=t[6].default,h=f(l,t,t[5],null);let y=[t[3]],g={};for(let t=0;t<y.length;t+=1)g=i(g,y[t]);return{c(){n=O("span"),h&&h.c(),C(n,g)},m(i,s){w(i,n,s),h&&h.m(n,null),t[7](n),o=!0,u||(c=[_(e=pt.call(null,n,t[0])),_(r=t[2].call(null,n))],u=!0)},p(t,[r]){h&&h.p&&(!o||32&r)&&p(h,l,t,t[5],o?d(l,t[5],r,null):v(t[5]),null),C(n,g=J(y,[8&r&&t[3]])),e&&a(e.update)&&1&r&&e.update.call(null,t[0])},i(t){o||(F(h,t),o=!0)},o(t){B(h,t),o=!1},d(e){e&&$(n),h&&h.d(e),t[7](null),u=!1,s(c)}}}function mt(t,n,e){const r=["use","getElement"];let o=g(n,r),{$$slots:u={},$$scope:s}=n,{use:a=[]}=n;const c=et(k());let l;return t.$$set=t=>{n=i(i({},n),y(t)),e(3,o=g(n,r)),"use"in t&&e(0,a=t.use),"$$scope"in t&&e(5,s=t.$$scope)},[a,l,c,o,function(){return l},s,u,function(t){A[t?"unshift":"push"]((()=>{l=t,e(1,l)}))}]}const wt=ut,$t=class extends V{constructor(t){super(),K(this,t,_t,gt,c,{use:0,getElement:4})}get getElement(){return this.$$.ctx[4]}},Ot=class extends V{constructor(t){super(),K(this,t,mt,bt,c,{use:0,getElement:4})}get getElement(){return this.$$.ctx[4]}};function Et(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var n=!1;try{var e={get passive(){return n=!0,!1}},r=function(){};t.document.addEventListener("test",r,e),t.document.removeEventListener("test",r,e)}catch(t){n=!1}return n}(t)&&{passive:!0}}function xt(t,n){if(t.closest)return t.closest(n);for(var e=t;e;){if(Ct(e,n))return e;e=e.parentElement}return null}function Ct(t,n){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,n)}function St(t){var n=t;if(null!==n.offsetParent)return n.scrollWidth;var e=n.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);var r=e.scrollWidth;return document.documentElement.removeChild(e),r}dt({class:"mdc-dialog__header",component:wt,contexts:{"SMUI:icon-button:context":"dialog:header"}}),dt({class:"mdc-dialog__title",component:$t}),dt({class:"mdc-dialog__content",component:wt}),dt({class:"mdc-dialog__actions",component:wt,classMap:{"smui-dialog__actions--reversed":"SMUI:dialog:actions:reversed"},contexts:{"SMUI:button:context":"dialog:action"}});const{applyPassive:kt}=t,{matches:jt}=n;dt({class:"mdc-text-field-helper-line",component:wt}),dt({class:"mdc-text-field__affix mdc-text-field__affix--prefix",component:Ot}),dt({class:"mdc-text-field__affix mdc-text-field__affix--suffix",component:Ot}),e(61)})()})();
|
|
3
|
+
//# sourceMappingURL=index.js.map
|