@dbp-wp/ui 0.1.0
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/LICENSE +201 -0
- package/README.md +15 -0
- package/dist/assets/index-BoutbZPC.js +20 -0
- package/dist/assets/index-Cjcwkjv9.css +1 -0
- package/dist/index.html +13 -0
- package/package.json +41 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @dbp-wp/ui
|
|
2
|
+
|
|
3
|
+
The web UI for [DBP WP](https://github.com/takashi-matsuyama/dbp_wp): a shell-agnostic
|
|
4
|
+
single-page app (Svelte 5) providing the table view and spreadsheet.
|
|
5
|
+
|
|
6
|
+
This package ships a prebuilt, self-contained SPA in `dist/`. It is served as static files
|
|
7
|
+
by the `dbp-wp` CLI, which is what most people will run (`npx dbp-wp`). The UI talks to the
|
|
8
|
+
CLI's local API, so it never holds WordPress credentials of its own.
|
|
9
|
+
|
|
10
|
+
It is published as a sibling package (alongside `@dbp-wp/core` and `dbp-wp`) so the three
|
|
11
|
+
layers — core, UI, and shell — stay independently versioned.
|
|
12
|
+
|
|
13
|
+
## License
|
|
14
|
+
|
|
15
|
+
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var Zs=Object.defineProperty;var po=e=>{throw TypeError(e)};var Qs=(e,t,n)=>t in e?Zs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ne=(e,t,n)=>Qs(e,typeof t!="symbol"?t+"":t,n),si=(e,t,n)=>t.has(e)||po("Cannot "+n);var h=(e,t,n)=>(si(e,t,"read from private field"),n?n.call(e):t.get(e)),N=(e,t,n)=>t.has(e)?po("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(si(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Y=(e,t,n)=>(si(e,t,"access private method"),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const Ko=!1;var ji=Array.isArray,el=Array.prototype.indexOf,Dr=Array.prototype.includes,Kr=Array.from,tl=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,nl=Object.getOwnPropertyDescriptors,rl=Object.prototype,il=Array.prototype,Wo=Object.getPrototypeOf,ho=Object.isExtensible;const ol=()=>{};function sl(e){for(var t=0;t<e.length;t++)e[t]()}function Xo(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const Ae=2,vr=4,Wr=8,Yo=1<<24,gt=16,wt=32,en=64,Mi=128,ut=512,ye=1024,Ce=2048,Pt=4096,Te=8192,ft=16384,Kn=32768,go=1<<25,Hn=65536,Lr=1<<17,ll=1<<18,Wn=1<<19,al=1<<20,Ft=1<<25,yn=65536,Nr=1<<21,On=1<<22,Jt=1<<23,fr=Symbol("$state"),Ir=Symbol("attributes"),Ei=Symbol("class"),ul=Symbol("style"),ir=Symbol("text"),Or=Symbol("form reset"),Xr=new class extends Error{constructor(){super(...arguments);Ne(this,"name","StaleReactionError");Ne(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var Bo;const fl=!!((Bo=globalThis.document)!=null&&Bo.contentType)&&globalThis.document.contentType.includes("xml");function cl(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function dl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function pl(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function hl(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function gl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function vl(e){throw new Error("https://svelte.dev/e/effect_orphan")}function _l(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ml(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function wl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Sl(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function yl(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Cl=1,Rl=2,Jo=4,Ml=8,El=16,xl=1,Al=2,Se=Symbol("uninitialized"),Fl="http://www.w3.org/1999/xhtml";function bl(){console.warn("https://svelte.dev/e/derived_inert")}function Pl(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Il(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Zo(e){return e===this.v}function Ol(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Qo(e){return!Ol(e,this.v)}let kl=!1,$e=null;function Gn(e){$e=e}function Xn(e,t=!1,n){$e={p:$e,i:!1,c:null,e:null,s:e,x:null,r:K,l:null}}function Yn(e){var t=$e,n=t.e;if(n!==null){t.e=null;for(var r of n)ws(r)}return t.i=!0,$e=t.p,{}}function es(){return!0}let un=[];function ts(){var e=un;un=[],sl(e)}function Zt(e){if(un.length===0&&!dr){var t=un;queueMicrotask(()=>{t===un&&ts()})}un.push(e)}function Tl(){for(;un.length>0;)ts()}function ns(e){var t=K;if(t===null)return U.f|=Jt,e;if(!(t.f&Kn)&&!(t.f&vr))throw e;Xt(e,t)}function Xt(e,t){if(!(t!==null&&t.f&ft)){for(;t!==null;){if(t.f&Mi){if(!(t.f&Kn))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}const $l=-7169;function ce(e,t){e.f=e.f&$l|t}function Bi(e){e.f&ut||e.deps===null?ce(e,ye):ce(e,Pt)}function rs(e){if(e!==null)for(const t of e)!(t.f&Ae)||!(t.f&yn)||(t.f^=yn,rs(t.deps))}function is(e,t,n){e.f&Ce?t.add(e):e.f&Pt&&n.add(e),rs(e.deps),ce(e,ye)}function Vl(e){let t=0,n=Rn(0),r;return()=>{Xi()&&(p(n),Ss(()=>(t===0&&(r=Qi(()=>e(()=>pr(n)))),t+=1,()=>{Zt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,pr(n))})})))}}var Dl=Hn|Wn;function Ll(e,t,n,r){new Nl(e,t,n,r)}var rt,zi,it,pn,He,ot,ke,Je,Dt,hn,Kt,kn,Sr,yr,Lt,Br,ue,Hl,Gl,zl,xi,kr,Tr,Ai,Fi;class Nl{constructor(t,n,r,i){N(this,ue);Ne(this,"parent");Ne(this,"is_pending",!1);Ne(this,"transform_error");N(this,rt);N(this,zi,null);N(this,it);N(this,pn);N(this,He);N(this,ot,null);N(this,ke,null);N(this,Je,null);N(this,Dt,null);N(this,hn,0);N(this,Kt,0);N(this,kn,!1);N(this,Sr,new Set);N(this,yr,new Set);N(this,Lt,null);N(this,Br,Vl(()=>(D(this,Lt,Rn(h(this,hn))),()=>{D(this,Lt,null)})));var o;D(this,rt,t),D(this,it,n),D(this,pn,s=>{var l=K;l.b=this,l.f|=Mi,r(s)}),this.parent=K.b,this.transform_error=i??((o=this.parent)==null?void 0:o.transform_error)??(s=>s),D(this,He,Jr(()=>{Y(this,ue,xi).call(this)},Dl))}defer_effect(t){is(t,h(this,Sr),h(this,yr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!h(this,it).pending}update_pending_count(t,n){Y(this,ue,Ai).call(this,t,n),D(this,hn,h(this,hn)+t),!(!h(this,Lt)||h(this,kn))&&(D(this,kn,!0),Zt(()=>{D(this,kn,!1),h(this,Lt)&&zn(h(this,Lt),h(this,hn))}))}get_effect_pending(){return h(this,Br).call(this),p(h(this,Lt))}error(t){if(!h(this,it).onerror&&!h(this,it).failed)throw t;I!=null&&I.is_fork?(h(this,ot)&&I.skip_effect(h(this,ot)),h(this,ke)&&I.skip_effect(h(this,ke)),h(this,Je)&&I.skip_effect(h(this,Je)),I.oncommit(()=>{Y(this,ue,Fi).call(this,t)})):Y(this,ue,Fi).call(this,t)}}rt=new WeakMap,zi=new WeakMap,it=new WeakMap,pn=new WeakMap,He=new WeakMap,ot=new WeakMap,ke=new WeakMap,Je=new WeakMap,Dt=new WeakMap,hn=new WeakMap,Kt=new WeakMap,kn=new WeakMap,Sr=new WeakMap,yr=new WeakMap,Lt=new WeakMap,Br=new WeakMap,ue=new WeakSet,Hl=function(){try{D(this,ot,st(()=>h(this,pn).call(this,h(this,rt))))}catch(t){this.error(t)}},Gl=function(t){const n=h(this,it).failed;n&&D(this,Je,st(()=>{n(h(this,rt),()=>t,()=>()=>{})}))},zl=function(){const t=h(this,it).pending;t&&(this.is_pending=!0,D(this,ke,st(()=>t(h(this,rt)))),Zt(()=>{var n=D(this,Dt,document.createDocumentFragment()),r=Qt();n.append(r),D(this,ot,Y(this,ue,Tr).call(this,()=>st(()=>h(this,pn).call(this,r)))),h(this,Kt)===0&&(h(this,rt).before(n),D(this,Dt,null),wn(h(this,ke),()=>{D(this,ke,null)}),Y(this,ue,kr).call(this,I))}))},xi=function(){try{if(this.is_pending=this.has_pending_snippet(),D(this,Kt,0),D(this,hn,0),D(this,ot,st(()=>{h(this,pn).call(this,h(this,rt))})),h(this,Kt)>0){var t=D(this,Dt,document.createDocumentFragment());Zi(h(this,ot),t);const n=h(this,it).pending;D(this,ke,st(()=>n(h(this,rt))))}else Y(this,ue,kr).call(this,I)}catch(n){this.error(n)}},kr=function(t){this.is_pending=!1,t.transfer_effects(h(this,Sr),h(this,yr))},Tr=function(t){var n=K,r=U,i=$e;It(h(this,He)),ct(h(this,He)),Gn(h(this,He).ctx);try{return Cn.ensure(),t()}catch(o){return ns(o),null}finally{It(n),ct(r),Gn(i)}},Ai=function(t,n){var r;if(!this.has_pending_snippet()){this.parent&&Y(r=this.parent,ue,Ai).call(r,t,n);return}D(this,Kt,h(this,Kt)+t),h(this,Kt)===0&&(Y(this,ue,kr).call(this,n),h(this,ke)&&wn(h(this,ke),()=>{D(this,ke,null)}),h(this,Dt)&&(h(this,rt).before(h(this,Dt)),D(this,Dt,null)))},Fi=function(t){h(this,ot)&&(Ue(h(this,ot)),D(this,ot,null)),h(this,ke)&&(Ue(h(this,ke)),D(this,ke,null)),h(this,Je)&&(Ue(h(this,Je)),D(this,Je,null));var n=h(this,it).onerror;let r=h(this,it).failed;var i=!1,o=!1;const s=()=>{if(i){Il();return}i=!0,o&&yl(),h(this,Je)!==null&&wn(h(this,Je),()=>{D(this,Je,null)}),Y(this,ue,Tr).call(this,()=>{Y(this,ue,xi).call(this)})},l=a=>{try{o=!0,n==null||n(a,s),o=!1}catch(u){Xt(u,h(this,He)&&h(this,He).parent)}r&&D(this,Je,Y(this,ue,Tr).call(this,()=>{try{return st(()=>{var u=K;u.b=this,u.f|=Mi,r(h(this,rt),()=>a,()=>s)})}catch(u){return Xt(u,h(this,He).parent),null}}))};Zt(()=>{var a;try{a=this.transform_error(t)}catch(u){Xt(u,h(this,He)&&h(this,He).parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,u=>Xt(u,h(this,He)&&h(this,He).parent)):l(a)})};function jl(e,t,n,r){const i=Ui;var o=e.filter(c=>!c.settled),s=t.map(i);if(n.length===0&&o.length===0){r(s);return}var l=K,a=Bl(),u=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(c=>c.promise)):null;function d(c){if(!(l.f&ft)){a();try{r([...s,...c])}catch(v){Xt(v,l)}Hr()}}var g=os();if(n.length===0){u.then(()=>d([])).finally(g);return}function f(){Promise.all(n.map(c=>Ul(c))).then(d).catch(c=>Xt(c,l)).finally(g)}u?u.then(()=>{a(),f(),Hr()}):f()}function Bl(){var e=K,t=U,n=$e,r=I;return function(o=!0){It(e),ct(t),Gn(n),o&&!(e.f&ft)&&(r==null||r.activate(),r==null||r.apply())}}function Hr(e=!0){It(null),ct(null),Gn(null),e&&(I==null||I.deactivate())}function os(){var e=K,t=e.b,n=I,r=!!(t!=null&&t.is_rendered());return t==null||t.update_pending_count(1,n),n.increment(r,e),()=>{t==null||t.update_pending_count(-1,n),n.decrement(r,e)}}function Ui(e){var t=Ae|Ce;return K!==null&&(K.f|=Wn),{ctx:$e,deps:null,effects:null,equals:Zo,f:t,fn:e,reactions:null,rv:0,v:Se,wv:0,parent:K,ac:null}}const or=Symbol("obsolete");function Ul(e,t,n){let r=K;r===null&&dl();var i=void 0,o=Rn(Se),s=!U,l=new Set;return ca(()=>{var c,v;var a=K,u=Xo();i=u.promise;try{Promise.resolve(e()).then(u.resolve,_=>{_!==Xr&&u.reject(_)}).finally(Hr)}catch(_){u.reject(_),Hr()}var d=I;if(s){if(a.f&Kn)var g=os();if((c=r.b)!=null&&c.is_rendered())(v=d.async_deriveds.get(a))==null||v.reject(or);else for(const _ of l.values())_.reject(or);l.add(u),d.async_deriveds.set(a,u)}const f=(_,m=void 0)=>{g==null||g(),l.delete(u),m!==or&&(d.activate(),m?(o.f|=Jt,zn(o,m)):(o.f&Jt&&(o.f^=Jt),zn(o,_)),d.deactivate())};u.promise.then(f,_=>f(null,_||"unknown"))}),Yi(()=>{for(const a of l)a.reject(or)}),new Promise(a=>{function u(d){function g(){d===i?a(o):u(i)}d.then(g,g)}u(i)})}function fn(e){const t=Ui(e);return Es(t),t}function ql(e){const t=Ui(e);return t.equals=Qo,t}function Kl(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ue(t[n])}}function qi(e){var t,n=K,r=e.parent;if(!tn&&r!==null&&e.v!==Se&&r.f&(ft|Te))return bl(),e.v;It(r);try{e.f&=~yn,Kl(e),t=bs(e)}finally{It(n)}return t}function ss(e){var t=qi(e);if(!e.equals(t)&&(e.wv=As(),(!(I!=null&&I.is_fork)||e.deps===null)&&(I!==null?(I.capture(e,t,!0),cr==null||cr.capture(e,t,!0)):e.v=t,e.deps===null))){ce(e,ye);return}tn||(xe!==null?(Xi()||I!=null&&I.is_fork)&&xe.set(e,t):Bi(e))}function Wl(e){var t,n;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),(n=r.ac)==null||n.abort(Xr),r.fn!==null&&(r.teardown=ol),r.ac=null,_r(r,0),Ji(r))}function ls(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&jn(t)}let li=null,An=null,I=null,cr=null,xe=null,bi=null,dr=!1,ai=!1,bn=null,$r=null;var vo=0;let Xl=1;var Tn,Wt,gn,$n,Vn,Dn,Nt,Ln,Ge,Cr,Ht,pt,xt,Nn,vn,Z,Pi,sr,Ii,as,us,Fn,Yl,lr;const Ur=class Ur{constructor(){N(this,Z);Ne(this,"id",Xl++);N(this,Tn,!1);Ne(this,"linked",!0);N(this,Wt,null);N(this,gn,null);Ne(this,"async_deriveds",new Map);Ne(this,"current",new Map);Ne(this,"previous",new Map);N(this,$n,new Set);N(this,Vn,new Set);N(this,Dn,0);N(this,Nt,new Map);N(this,Ln,null);N(this,Ge,[]);N(this,Cr,[]);N(this,Ht,new Set);N(this,pt,new Set);N(this,xt,new Map);N(this,Nn,new Set);Ne(this,"is_fork",!1);N(this,vn,!1);An===null?li=An=this:(D(An,gn,this),D(this,Wt,An)),An=this}skip_effect(t){h(this,xt).has(t)||h(this,xt).set(t,{d:[],m:[]}),h(this,Nn).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=h(this,xt).get(t);if(r){h(this,xt).delete(t);for(var i of r.d)ce(i,Ce),n(i);for(i of r.m)ce(i,Pt),n(i)}h(this,Nn).add(t)}capture(t,n,r=!1){t.v!==Se&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&Jt||(this.current.set(t,[n,r]),xe==null||xe.set(t,n)),this.is_fork||(t.v=n)}activate(){I=this}deactivate(){I=null,xe=null}flush(){try{ai=!0,I=this,Y(this,Z,sr).call(this)}finally{vo=0,bi=null,bn=null,$r=null,ai=!1,I=null,xe=null,mn.clear()}}discard(){var t;for(const n of h(this,Vn))n(this);h(this,Vn).clear();for(const n of this.async_deriveds.values())n.reject(or);Y(this,Z,lr).call(this),(t=h(this,Ln))==null||t.resolve()}register_created_effect(t){h(this,Cr).push(t)}increment(t,n){if(D(this,Dn,h(this,Dn)+1),t){let r=h(this,Nt).get(n)??0;h(this,Nt).set(n,r+1)}}decrement(t,n){if(D(this,Dn,h(this,Dn)-1),t){let r=h(this,Nt).get(n)??0;r===1?h(this,Nt).delete(n):h(this,Nt).set(n,r-1)}h(this,vn)||(D(this,vn,!0),Zt(()=>{D(this,vn,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)h(this,Ht).add(r);for(const r of n)h(this,pt).add(r);t.clear(),n.clear()}oncommit(t){h(this,$n).add(t)}ondiscard(t){h(this,Vn).add(t)}settled(){return(h(this,Ln)??D(this,Ln,Xo())).promise}static ensure(){if(I===null){const t=I=new Ur;!ai&&!dr&&Zt(()=>{h(t,Tn)||t.flush()})}return I}apply(){{xe=null;return}}schedule(t){var i;if(bi=t,(i=t.b)!=null&&i.is_pending&&t.f&(vr|Wr|Yo)&&!(t.f&Kn)){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(bn!==null&&n===K&&(U===null||!(U.f&Ae)))return;if(r&(en|wt)){if(!(r&ye))return;n.f^=ye}}h(this,Ge).push(n)}};Tn=new WeakMap,Wt=new WeakMap,gn=new WeakMap,$n=new WeakMap,Vn=new WeakMap,Dn=new WeakMap,Nt=new WeakMap,Ln=new WeakMap,Ge=new WeakMap,Cr=new WeakMap,Ht=new WeakMap,pt=new WeakMap,xt=new WeakMap,Nn=new WeakMap,vn=new WeakMap,Z=new WeakSet,Pi=function(){if(this.is_fork)return!0;for(const r of h(this,Nt).keys()){for(var t=r,n=!1;t.parent!==null;){if(h(this,xt).has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1},sr=function(){var a,u,d,g;D(this,Tn,!0),vo++>1e3&&(Y(this,Z,lr).call(this),Zl());for(const f of h(this,Ht))h(this,pt).delete(f),ce(f,Ce),this.schedule(f);for(const f of h(this,pt))ce(f,Pt),this.schedule(f);const t=h(this,Ge);D(this,Ge,[]),this.apply();var n=bn=[],r=[],i=$r=[];for(const f of t)try{Y(this,Z,Ii).call(this,f,n,r)}catch(c){throw ds(f),Y(this,Z,Pi).call(this)||this.discard(),c}if(I=null,i.length>0){var o=Ur.ensure();for(const f of i)o.schedule(f)}if(bn=null,$r=null,Y(this,Z,Pi).call(this)){Y(this,Z,Fn).call(this,r),Y(this,Z,Fn).call(this,n);for(const[f,c]of h(this,xt))cs(f,c);i.length>0&&Y(a=I,Z,sr).call(a);return}const s=Y(this,Z,as).call(this);if(s){Y(this,Z,Fn).call(this,r),Y(this,Z,Fn).call(this,n),Y(u=s,Z,us).call(u,this);return}h(this,Ht).clear(),h(this,pt).clear();for(const f of h(this,$n))f(this);h(this,$n).clear(),cr=this,_o(r),_o(n),cr=null,(d=h(this,Ln))==null||d.resolve();var l=I;if(h(this,Dn)===0&&(h(this,Ge).length===0||l!==null)&&Y(this,Z,lr).call(this),h(this,Ge).length>0)if(l!==null){const f=l;h(f,Ge).push(...h(this,Ge).filter(c=>!h(f,Ge).includes(c)))}else l=this;l!==null&&Y(g=l,Z,sr).call(g)},Ii=function(t,n,r){t.f^=ye;for(var i=t.first;i!==null;){var o=i.f,s=(o&(wt|en))!==0,l=s&&(o&ye)!==0,a=l||(o&Te)!==0||h(this,xt).has(i);if(!a&&i.fn!==null){s?i.f^=ye:o&vr?n.push(i):xr(i)&&(o>&&h(this,pt).add(i),jn(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var d=i.next;if(d!==null){i=d;break}i=i.parent}}},as=function(){for(var t=h(this,Wt);t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=h(t,Wt)}return null},us=function(t){var r;for(const[i,o]of t.current)!this.previous.has(i)&&t.previous.has(i)&&this.previous.set(i,t.previous.get(i)),this.current.set(i,o);for(const[i,o]of t.async_deriveds){const s=this.async_deriveds.get(i);s&&o.promise.then(s.resolve).catch(s.reject)}t.async_deriveds.clear(),this.transfer_effects(h(t,Ht),h(t,pt));const n=i=>{var o=i.reactions;if(o!==null)for(const a of o){var s=a.f;if(s&Ae)n(a);else{var l=a;s&(On|gt)&&!this.async_deriveds.has(l)&&(h(this,pt).delete(l),ce(l,Ce),this.schedule(l))}}};for(const i of this.current.keys())n(i);this.oncommit(()=>t.discard()),Y(r=t,Z,lr).call(r),I=this,Y(this,Z,sr).call(this)},Fn=function(t){for(var n=0;n<t.length;n+=1)is(t[n],h(this,Ht),h(this,pt))},Yl=function(){var g;for(let f=li;f!==null;f=h(f,gn)){var t=f.id<this.id,n=[];for(const[c,[v,_]]of this.current){if(f.current.has(c)){var r=f.current.get(c)[0];if(t&&v!==r)f.current.set(c,[v,_]);else continue}n.push(c)}if(t)for(const[c,v]of this.async_deriveds){const _=f.async_deriveds.get(c);_&&v.promise.then(_.resolve).catch(_.reject)}var i=[...f.current.keys()].filter(c=>!f.current.get(c)[1]);if(!(!h(f,Tn)||i.length===0)){var o=i.filter(c=>!this.current.has(c));if(o.length===0)t&&f.discard();else if(n.length>0){if(t)for(const c of h(this,Nn))f.unskip_effect(c,v=>{var _;v.f&(gt|On)?f.schedule(v):Y(_=f,Z,Fn).call(_,[v])});f.activate();var s=new Set,l=new Map;for(var a of n)fs(a,o,s,l);l=new Map;var u=[...f.current].filter(([c,v])=>{const _=this.current.get(c);return _?_[0]!==v[0]||_[1]!==v[1]:!0}).map(([c])=>c);if(u.length>0)for(const c of h(this,Cr))!(c.f&(ft|Te|Lr))&&Ki(c,u,l)&&(c.f&(On|gt)?(ce(c,Ce),f.schedule(c)):h(f,Ht).add(c));if(h(f,Ge).length>0&&!h(f,vn)){f.apply();for(var d of h(f,Ge))Y(g=f,Z,Ii).call(g,d,[],[]);D(f,Ge,[])}f.deactivate()}}}},lr=function(){if(this.linked){var t=h(this,Wt),n=h(this,gn);t===null?li=n:D(t,gn,n),n===null?An=t:D(n,Wt,t),this.linked=!1}};let Cn=Ur;function Jl(e){var t=dr;dr=!0;try{for(var n;;){if(Tl(),I===null)return n;I.flush()}}finally{dr=t}}function Zl(){try{_l()}catch(e){Xt(e,bi)}}let dt=null;function _o(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(ft|Te))&&xr(r)&&(dt=new Set,jn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Cs(r),(dt==null?void 0:dt.size)>0)){mn.clear();for(const i of dt){if(i.f&(ft|Te))continue;const o=[i];let s=i.parent;for(;s!==null;)dt.has(s)&&(dt.delete(s),o.push(s)),s=s.parent;for(let l=o.length-1;l>=0;l--){const a=o[l];a.f&(ft|Te)||jn(a)}}dt.clear()}}dt=null}}function fs(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const o=i.f;o&Ae?fs(i,t,n,r):o&(On|gt)&&!(o&Ce)&&Ki(i,t,r)&&(ce(i,Ce),Wi(i))}}function Ki(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Dr.call(t,i))return!0;if(i.f&Ae&&Ki(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Wi(e){I.schedule(e)}function cs(e,t){if(!(e.f&wt&&e.f&ye)){e.f&Ce?t.d.push(e):e.f&Pt&&t.m.push(e),ce(e,ye);for(var n=e.first;n!==null;)cs(n,t),n=n.next}}function ds(e){ce(e,ye);for(var t=e.first;t!==null;)ds(t),t=t.next}let Gr=new Set;const mn=new Map;let ps=!1;function Rn(e,t){var n={f:0,v:e,reactions:null,equals:Zo,rv:0,wv:0};return n}function H(e,t){const n=Rn(e);return Es(n),n}function Ql(e,t=!1,n=!0){const r=Rn(e);return t||(r.equals=Qo),r}function S(e,t,n=!1){U!==null&&(!vt||U.f&Lr)&&es()&&U.f&(Ae|gt|On|Lr)&&(bt===null||!bt.has(e))&&Sl();let r=n?Be(t):t;return zn(e,r,$r)}function zn(e,t,n=null){if(!e.equals(t)){mn.set(e,tn?t:e.v);var r=Cn.ensure();if(r.capture(e,t),e.f&Ae){const i=e;e.f&Ce&&qi(i),xe===null&&Bi(i)}e.wv=As(),hs(e,Ce,n),K!==null&&K.f&ye&&!(K.f&(wt|en))&&(nt===null?ha([e]):nt.push(e)),!r.is_fork&&Gr.size>0&&!ps&&ea()}return t}function ea(){ps=!1;for(const e of Gr){e.f&ye&&ce(e,Pt);let t;try{t=xr(e)}catch{t=!0}t&&jn(e)}Gr.clear()}function pr(e){S(e,e.v+1)}function hs(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,o=0;o<i;o++){var s=r[o],l=s.f,a=(l&Ce)===0;if(a&&ce(s,t),l&Lr)Gr.add(s);else if(l&Ae){var u=s;xe==null||xe.delete(u),l&yn||(l&ut&&(K===null||!(K.f&Nr))&&(s.f|=yn),hs(u,Pt,n))}else if(a){var d=s;l>&&dt!==null&&dt.add(d),n!==null?n.push(d):Wi(d)}}}function Be(e){if(typeof e!="object"||e===null||fr in e)return e;const t=Wo(e);if(t!==rl&&t!==il)return e;var n=new Map,r=ji(e),i=H(0),o=Sn,s=l=>{if(Sn===o)return l();var a=U,u=Sn;ct(null),Co(o);var d=l();return ct(a),Co(u),d};return r&&n.set("length",H(e.length)),new Proxy(e,{defineProperty(l,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&ml();var d=n.get(a);return d===void 0?s(()=>{var g=H(u.value);return n.set(a,g),g}):S(d,u.value,!0),!0},deleteProperty(l,a){var u=n.get(a);if(u===void 0){if(a in l){const d=s(()=>H(Se));n.set(a,d),pr(i)}}else S(u,Se),pr(i);return!0},get(l,a,u){var c;if(a===fr)return e;var d=n.get(a),g=a in l;if(d===void 0&&(!g||(c=ur(l,a))!=null&&c.writable)&&(d=s(()=>{var v=Be(g?l[a]:Se),_=H(v);return _}),n.set(a,d)),d!==void 0){var f=p(d);return f===Se?void 0:f}return Reflect.get(l,a,u)},getOwnPropertyDescriptor(l,a){var u=Reflect.getOwnPropertyDescriptor(l,a);if(u&&"value"in u){var d=n.get(a);d&&(u.value=p(d))}else if(u===void 0){var g=n.get(a),f=g==null?void 0:g.v;if(g!==void 0&&f!==Se)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return u},has(l,a){var f;if(a===fr)return!0;var u=n.get(a),d=u!==void 0&&u.v!==Se||Reflect.has(l,a);if(u!==void 0||K!==null&&(!d||(f=ur(l,a))!=null&&f.writable)){u===void 0&&(u=s(()=>{var c=d?Be(l[a]):Se,v=H(c);return v}),n.set(a,u));var g=p(u);if(g===Se)return!1}return d},set(l,a,u,d){var y;var g=n.get(a),f=a in l;if(r&&a==="length")for(var c=u;c<g.v;c+=1){var v=n.get(c+"");v!==void 0?S(v,Se):c in l&&(v=s(()=>H(Se)),n.set(c+"",v))}if(g===void 0)(!f||(y=ur(l,a))!=null&&y.writable)&&(g=s(()=>H(void 0)),S(g,Be(u)),n.set(a,g));else{f=g.v!==Se;var _=s(()=>Be(u));S(g,_)}var m=Reflect.getOwnPropertyDescriptor(l,a);if(m!=null&&m.set&&m.set.call(d,u),!f){if(r&&typeof a=="string"){var w=n.get("length"),x=Number(a);Number.isInteger(x)&&x>=w.v&&S(w,x+1)}pr(i)}return!0},ownKeys(l){p(i);var a=Reflect.ownKeys(l).filter(g=>{var f=n.get(g);return f===void 0||f.v!==Se});for(var[u,d]of n)d.v!==Se&&!(u in l)&&a.push(u);return a},setPrototypeOf(){wl()}})}function mo(e){try{if(e!==null&&typeof e=="object"&&fr in e)return e[fr]}catch{}return e}function ta(e,t){return Object.is(mo(e),mo(t))}var wo,gs,vs,_s;function na(){if(wo===void 0){wo=window,gs=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;vs=ur(t,"firstChild").get,_s=ur(t,"nextSibling").get,ho(e)&&(e[Ei]=void 0,e[Ir]=null,e[ul]=void 0,e.__e=void 0),ho(n)&&(n[ir]=void 0)}}function Qt(e=""){return document.createTextNode(e)}function zr(e){return vs.call(e)}function Er(e){return _s.call(e)}function R(e,t){return zr(e)}function at(e,t=!1){{var n=zr(e);return n instanceof Comment&&n.data===""?Er(n):n}}function M(e,t=1,n=!1){let r=e;for(;t--;)r=Er(r);return r}function ra(e){e.textContent=""}function ms(){return!1}function ia(e,t,n){return n?document.createElement(e,{is:n}):document.createElement(e)}let So=!1;function oa(){So||(So=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n[Or])==null||t.call(n)})},{capture:!0}))}function Yr(e){var t=U,n=K;ct(null),It(null);try{return e()}finally{ct(t),It(n)}}function sa(e,t,n,r=n){e.addEventListener(t,()=>Yr(n));const i=e[Or];i?e[Or]=()=>{i(),r(!0)}:e[Or]=()=>r(!0),oa()}function la(e){K===null&&(U===null&&vl(),gl()),tn&&hl()}function aa(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function rn(e,t){var n=K;n!==null&&n.f&Te&&(e|=Te);var r={ctx:$e,deps:null,nodes:null,f:e|Ce|ut,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};I==null||I.register_created_effect(r);var i=r;if(e&vr)bn!==null?bn.push(r):Cn.ensure().schedule(r);else if(t!==null){try{jn(r)}catch(s){throw Ue(r),s}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&Wn)&&(i=i.first,e>&&e&Hn&&i!==null&&(i.f|=Hn))}if(i!==null&&(i.parent=n,n!==null&&aa(i,n),U!==null&&U.f&Ae&&!(e&en))){var o=U;(o.effects??(o.effects=[])).push(i)}return r}function Xi(){return U!==null&&!vt}function Yi(e){const t=rn(Wr,null);return ce(t,ye),t.teardown=e,t}function ua(e){la();var t=K.f,n=!U&&(t&wt)!==0&&$e!==null&&!$e.i;if(n){var r=$e;(r.e??(r.e=[])).push(e)}else return ws(e)}function ws(e){return rn(vr|al,e)}function fa(e){Cn.ensure();const t=rn(en|Wn,e);return(n={})=>new Promise(r=>{n.outro?wn(t,()=>{Ue(t),r(void 0)}):(Ue(t),r(void 0))})}function ca(e){return rn(On|Wn,e)}function Ss(e,t=0){return rn(Wr|t,e)}function W(e,t=[],n=[],r=[]){jl(r,t,n,i=>{rn(Wr,()=>{e(...i.map(p))})})}function Jr(e,t=0){var n=rn(gt|t,e);return n}function st(e){return rn(wt|Wn,e)}function ys(e){var t=e.teardown;if(t!==null){const n=tn,r=U;yo(!0),ct(null);try{t.call(null)}finally{yo(n),ct(r)}}}function Ji(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Yr(()=>{i.abort(Xr)});var r=n.next;n.f&en?n.parent=null:Ue(n,t),n=r}}function da(e){for(var t=e.first;t!==null;){var n=t.next;t.f&wt||Ue(t),t=n}}function Ue(e,t=!0){var n=!1;(t||e.f&ll)&&e.nodes!==null&&e.nodes.end!==null&&(pa(e.nodes.start,e.nodes.end),n=!0),e.f|=go,Ji(e,t&&!n),_r(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)o.stop();ys(e),e.f^=go,e.f|=ft;var i=e.parent;i!==null&&i.first!==null&&Cs(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function pa(e,t){for(;e!==null;){var n=e===t?null:Er(e);e.remove(),e=n}}function Cs(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function wn(e,t,n=!0){var r=[];Rs(e,r,!0);var i=()=>{n&&Ue(e),t&&t()},o=r.length;if(o>0){var s=()=>--o||i();for(var l of r)l.out(s)}else i()}function Rs(e,t,n){if(!(e.f&Te)){e.f^=Te;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var o=i.next;if(!(i.f&en)){var s=(i.f&Hn)!==0||(i.f&wt)!==0&&(e.f>)!==0;Rs(i,t,s?n:!1)}i=o}}}function jr(e){Ms(e,!0)}function Ms(e,t){if(e.f&Te){e.f^=Te,e.f&ye||(ce(e,Ce),Cn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Hn)!==0||(n.f&wt)!==0;Ms(n,i?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(const s of o)(s.is_global||t)&&s.in()}}function Zi(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Er(n);t.append(n),n=i}}let Vr=!1,tn=!1;function yo(e){tn=e}let U=null,vt=!1;function ct(e){U=e}let K=null;function It(e){K=e}let bt=null;function Es(e){U!==null&&(bt??(bt=new Set)).add(e)}let ze=null,Ye=0,nt=null;function ha(e){nt=e}let xs=1,cn=0,Sn=cn;function Co(e){Sn=e}function As(){return++xs}function xr(e){var t=e.f;if(t&Ce)return!0;if(t&Ae&&(e.f&=~yn),t&Pt){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(xr(o)&&ss(o),o.wv>e.wv)return!0}t&ut&&xe===null&&ce(e,ye)}return!1}function Fs(e,t,n=!0){var r=e.reactions;if(r!==null&&!(bt!==null&&bt.has(e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&Ae?Fs(o,t,!1):t===o&&(n?ce(o,Ce):o.f&ye&&ce(o,Pt),Wi(o))}}function bs(e){var _;var t=ze,n=Ye,r=nt,i=U,o=bt,s=$e,l=vt,a=Sn,u=e.f;ze=null,Ye=0,nt=null,U=u&(wt|en)?null:e,bt=null,Gn(e.ctx),vt=!1,Sn=++cn,e.ac!==null&&(Yr(()=>{e.ac.abort(Xr)}),e.ac=null);try{e.f|=Nr;var d=e.fn,g=d();e.f|=Kn;var f=e.deps,c=I==null?void 0:I.is_fork;if(ze!==null){var v;if(c||_r(e,Ye),f!==null&&Ye>0)for(f.length=Ye+ze.length,v=0;v<ze.length;v++)f[Ye+v]=ze[v];else e.deps=f=ze;if(Xi()&&e.f&ut)for(v=Ye;v<f.length;v++)((_=f[v]).reactions??(_.reactions=[])).push(e)}else!c&&f!==null&&Ye<f.length&&(_r(e,Ye),f.length=Ye);if(es()&&nt!==null&&!vt&&f!==null&&!(e.f&(Ae|Pt|Ce)))for(v=0;v<nt.length;v++)Fs(nt[v],e);if(i!==null&&i!==e){if(cn++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=cn;if(t!==null)for(const m of t)m.rv=cn;nt!==null&&(r===null?r=nt:r.push(...nt))}return e.f&Jt&&(e.f^=Jt),g}catch(m){return ns(m)}finally{e.f^=Nr,ze=t,Ye=n,nt=r,U=i,bt=o,Gn(s),vt=l,Sn=a}}function ga(e,t){let n=t.reactions;if(n!==null){var r=el.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&Ae&&(ze===null||!Dr.call(ze,t))){var o=t;o.f&ut&&(o.f^=ut,o.f&=~yn),o.v!==Se&&Bi(o),Wl(o),_r(o,0)}}function _r(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ga(e,n[r])}function jn(e){var t=e.f;if(!(t&ft)){ce(e,ye);var n=K,r=Vr;K=e,Vr=!0;try{t&(gt|Yo)?da(e):Ji(e),ys(e);var i=bs(e);e.teardown=typeof i=="function"?i:null,e.wv=xs;var o;Ko&&kl&&e.f&Ce&&e.deps}finally{Vr=r,K=n}}}async function va(){await Promise.resolve(),Jl()}function p(e){var t=e.f,n=(t&Ae)!==0;if(U!==null&&!vt){var r=K!==null&&(K.f&ft)!==0;if(!r&&(bt===null||!bt.has(e))){var i=U.deps;if(U.f&Nr)e.rv<cn&&(e.rv=cn,ze===null&&i!==null&&i[Ye]===e?Ye++:ze===null?ze=[e]:ze.push(e));else{U.deps??(U.deps=[]),Dr.call(U.deps,e)||U.deps.push(e);var o=e.reactions;o===null?e.reactions=[U]:Dr.call(o,U)||o.push(U)}}}if(tn&&mn.has(e))return mn.get(e);if(n){var s=e;if(tn){var l=s.v;return(!(s.f&ye)&&s.reactions!==null||Is(s))&&(l=qi(s)),mn.set(s,l),l}var a=(s.f&ut)===0&&!vt&&U!==null&&(Vr||(U.f&ut)!==0),u=(s.f&Kn)===0;xr(s)&&(a&&(s.f|=ut),ss(s)),a&&!u&&(ls(s),Ps(s))}if(xe!=null&&xe.has(e))return xe.get(e);if(e.f&Jt)throw e.v;return e.v}function Ps(e){if(e.f|=ut,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&Ae&&!(t.f&ut)&&(ls(t),Ps(t))}function Is(e){if(e.v===Se)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(mn.has(t)||t.f&Ae&&Is(t))return!0;return!1}function Qi(e){var t=vt;try{return vt=!0,e()}finally{vt=t}}const _a=["touchstart","touchmove"];function ma(e){return _a.includes(e)}const dn=Symbol("events"),Os=new Set,Oi=new Set;function wa(e,t,n,r={}){function i(o){if(r.capture||ki.call(t,o),!o.cancelBubble)return Yr(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Zt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Sa(e,t,n,r,i){var o={capture:r,passive:i},s=wa(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Yi(()=>{t.removeEventListener(e,s,o)})}function le(e,t,n){(t[dn]??(t[dn]={}))[e]=n}function Zr(e){for(var t=0;t<e.length;t++)Os.add(e[t]);for(var n of Oi)n(e)}let Ro=null;function ki(e){var _,m;var t=this,n=t.ownerDocument,r=e.type,i=((_=e.composedPath)==null?void 0:_.call(e))||[],o=i[0]||e.target;Ro=e;var s=0,l=Ro===e&&e[dn];if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e[dn]=t;return}var u=i.indexOf(t);if(u===-1)return;a<=u&&(s=a)}if(o=i[s]||e.target,o!==t){tl(e,"currentTarget",{configurable:!0,get(){return o||n}});var d=U,g=K;ct(null),It(null);try{for(var f,c=[];o!==null&&o!==t;){try{var v=(m=o[dn])==null?void 0:m[r];v!=null&&(!o.disabled||e.target===o)&&v.call(o,e)}catch(w){f?c.push(w):f=w}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(f){for(let w of c)queueMicrotask(()=>{throw w});throw f}}finally{e[dn]=t,delete e.currentTarget,ct(d),It(g)}}}var Uo;const ui=((Uo=globalThis==null?void 0:globalThis.window)==null?void 0:Uo.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function ya(e){return(ui==null?void 0:ui.createHTML(e))??e}function Ca(e){var t=ia("template");return t.innerHTML=ya(e.replaceAll("<!>","<!---->")),t.content}function Ti(e,t){var n=K;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function L(e,t){var n=(t&xl)!==0,r=(t&Al)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=Ca(o?e:"<!>"+e),n||(i=zr(i)));var s=r||gs?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=zr(s),a=s.lastChild;Ti(l,a)}else Ti(s,s);return s}}function mr(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Qt();return e.append(t,n),Ti(t,n),e}function A(e,t){e!==null&&e.before(t)}function J(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[ir]??(e[ir]=e.nodeValue))&&(e[ir]=n,e.nodeValue=`${n}`)}function Ra(e,t){return Ma(e,t)}const Ar=new Map;function Ma(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0,transformError:l}){na();var a=void 0,u=fa(()=>{var d=n??t.appendChild(Qt());Ll(d,{pending:()=>{}},c=>{Xn({});var v=$e;o&&(v.c=o),i&&(r.$$events=i),a=e(c,r)||{},Yn()},l);var g=new Set,f=c=>{for(var v=0;v<c.length;v++){var _=c[v];if(!g.has(_)){g.add(_);var m=ma(_);for(const y of[t,document]){var w=Ar.get(y);w===void 0&&(w=new Map,Ar.set(y,w));var x=w.get(_);x===void 0?(y.addEventListener(_,ki,{passive:m}),w.set(_,1)):w.set(_,x+1)}}}};return f(Kr(Os)),Oi.add(f),()=>{var m;for(var c of g)for(const w of[t,document]){var v=Ar.get(w),_=v.get(c);--_==0?(w.removeEventListener(c,ki),v.delete(c),v.size===0&&Ar.delete(w)):v.set(c,_)}Oi.delete(f),d!==n&&((m=d.parentNode)==null||m.removeChild(d))}});return Ea.set(a,u),a}let Ea=new WeakMap;var ht,At,Ze,_n,Rr,Mr,qr;class ks{constructor(t,n=!0){Ne(this,"anchor");N(this,ht,new Map);N(this,At,new Map);N(this,Ze,new Map);N(this,_n,new Set);N(this,Rr,!0);N(this,Mr,t=>{if(h(this,ht).has(t)){var n=h(this,ht).get(t),r=h(this,At).get(n);if(r)jr(r),h(this,_n).delete(n);else{var i=h(this,Ze).get(n);i&&(jr(i.effect),h(this,At).set(n,i.effect),h(this,Ze).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,s]of h(this,ht)){if(h(this,ht).delete(o),o===t)break;const l=h(this,Ze).get(s);l&&(Ue(l.effect),h(this,Ze).delete(s))}for(const[o,s]of h(this,At)){if(o===n||h(this,_n).has(o))continue;const l=()=>{if(Array.from(h(this,ht).values()).includes(o)){var u=document.createDocumentFragment();Zi(s,u),u.append(Qt()),h(this,Ze).set(o,{effect:s,fragment:u})}else Ue(s);h(this,_n).delete(o),h(this,At).delete(o)};h(this,Rr)||!r?(h(this,_n).add(o),wn(s,l,!1)):l()}}});N(this,qr,t=>{h(this,ht).delete(t);const n=Array.from(h(this,ht).values());for(const[r,i]of h(this,Ze))n.includes(r)||(Ue(i.effect),h(this,Ze).delete(r))});this.anchor=t,D(this,Rr,n)}ensure(t,n){var r=I,i=ms();if(n&&!h(this,At).has(t)&&!h(this,Ze).has(t))if(i){var o=document.createDocumentFragment(),s=Qt();o.append(s),h(this,Ze).set(t,{effect:st(()=>n(s)),fragment:o})}else h(this,At).set(t,st(()=>n(this.anchor)));if(h(this,ht).set(r,t),i){for(const[l,a]of h(this,At))l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of h(this,Ze))l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(h(this,Mr)),r.ondiscard(h(this,qr))}else h(this,Mr).call(this,r)}}ht=new WeakMap,At=new WeakMap,Ze=new WeakMap,_n=new WeakMap,Rr=new WeakMap,Mr=new WeakMap,qr=new WeakMap;function ne(e,t,n=!1){var r=new ks(e),i=n?Hn:0;function o(s,l){r.ensure(s,l)}Jr(()=>{var s=!1;t((l,a=0)=>{s=!0,o(a,l)}),s||o(-1,null)},i)}const xa=Symbol("NaN");function Mo(e,t,n){var r=new ks(e);Jr(()=>{var i=t();i!==i&&(i=xa),r.ensure(i,n)})}function fi(e,t){return t}function Aa(e,t,n){for(var r=[],i=t.length,o,s=t.length,l=0;l<i;l++){let g=t[l];wn(g,()=>{if(o){if(o.pending.delete(g),o.done.add(g),o.pending.size===0){var f=e.outrogroups;$i(e,Kr(o.done)),f.delete(o),f.size===0&&(e.outrogroups=null)}}else s-=1},!1)}if(s===0){var a=r.length===0&&n!==null;if(a){var u=n,d=u.parentNode;ra(d),d.append(u),e.items.clear()}$i(e,t,!a)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function $i(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const s of e.pending.values())for(const l of s)r.add(e.items.get(l).e)}for(var i=0;i<t.length;i++){var o=t[i];if(r!=null&&r.has(o)){o.f|=Ft;const s=document.createDocumentFragment();Zi(o,s)}else Ue(t[i],n)}}var Eo;function je(e,t,n,r,i,o=null){var s=e,l=new Map,a=(t&Jo)!==0;if(a){var u=e;s=u.appendChild(Qt())}var d=null,g=ql(()=>{var y=n();return ji(y)?y:y==null?[]:Kr(y)}),f,c=new Map,v=!0;function _(y){x.effect.f&ft||(x.pending.delete(y),x.fallback=d,Fa(x,f,s,t,r),d!==null&&(f.length===0?d.f&Ft?(d.f^=Ft,ar(d,null,s)):jr(d):wn(d,()=>{d=null})))}function m(y){x.pending.delete(y)}var w=Jr(()=>{f=p(g);for(var y=f.length,$=new Set,V=I,se=ms(),ie=0;ie<y;ie+=1){var F=f[ie],ee=r(F,ie),Q=v?null:l.get(ee);Q?(Q.v&&zn(Q.v,F),Q.i&&zn(Q.i,ie),se&&V.unskip_effect(Q.e)):(Q=ba(l,v?s:Eo??(Eo=Qt()),F,ee,ie,i,t,n),v||(Q.e.f|=Ft),l.set(ee,Q)),$.add(ee)}if(y===0&&o&&!d&&(v?d=st(()=>o(s)):(d=st(()=>o(Eo??(Eo=Qt()))),d.f|=Ft)),y>$.size&&pl(),!v)if(c.set(V,$),se){for(const[ae,Re]of l)$.has(ae)||V.skip_effect(Re.e);V.oncommit(_),V.ondiscard(m)}else _(V);p(g)}),x={effect:w,items:l,pending:c,outrogroups:null,fallback:d};v=!1}function nr(e){for(;e!==null&&!(e.f&wt);)e=e.next;return e}function Fa(e,t,n,r,i){var Q,ae,Re,et,Ot,kt,St,yt,Bt;var o=(r&Ml)!==0,s=t.length,l=e.items,a=nr(e.effect.first),u,d=null,g,f=[],c=[],v,_,m,w;if(o)for(w=0;w<s;w+=1)v=t[w],_=i(v,w),m=l.get(_).e,m.f&Ft||((ae=(Q=m.nodes)==null?void 0:Q.a)==null||ae.measure(),(g??(g=new Set)).add(m));for(w=0;w<s;w+=1){if(v=t[w],_=i(v,w),m=l.get(_).e,e.outrogroups!==null)for(const Fe of e.outrogroups)Fe.pending.delete(m),Fe.done.delete(m);if(m.f&Te&&(jr(m),o&&((et=(Re=m.nodes)==null?void 0:Re.a)==null||et.unfix(),(g??(g=new Set)).delete(m))),m.f&Ft)if(m.f^=Ft,m===a)ar(m,null,n);else{var x=d?d.next:a;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),qt(e,d,m),qt(e,m,x),ar(m,x,n),d=m,f=[],c=[],a=nr(d.next);continue}if(m!==a){if(u!==void 0&&u.has(m)){if(f.length<c.length){var y=c[0],$;d=y.prev;var V=f[0],se=f[f.length-1];for($=0;$<f.length;$+=1)ar(f[$],y,n);for($=0;$<c.length;$+=1)u.delete(c[$]);qt(e,V.prev,se.next),qt(e,d,V),qt(e,se,y),a=y,d=se,w-=1,f=[],c=[]}else u.delete(m),ar(m,a,n),qt(e,m.prev,m.next),qt(e,m,d===null?e.effect.first:d.next),qt(e,d,m),d=m;continue}for(f=[],c=[];a!==null&&a!==m;)(u??(u=new Set)).add(a),c.push(a),a=nr(a.next);if(a===null)continue}m.f&Ft||f.push(m),d=m,a=nr(m.next)}if(e.outrogroups!==null){for(const Fe of e.outrogroups)Fe.pending.size===0&&($i(e,Kr(Fe.done)),(Ot=e.outrogroups)==null||Ot.delete(Fe));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||u!==void 0){var ie=[];if(u!==void 0)for(m of u)m.f&Te||ie.push(m);for(;a!==null;)!(a.f&Te)&&a!==e.fallback&&ie.push(a),a=nr(a.next);var F=ie.length;if(F>0){var ee=r&Jo&&s===0?n:null;if(o){for(w=0;w<F;w+=1)(St=(kt=ie[w].nodes)==null?void 0:kt.a)==null||St.measure();for(w=0;w<F;w+=1)(Bt=(yt=ie[w].nodes)==null?void 0:yt.a)==null||Bt.fix()}Aa(e,ie,ee)}}o&&Zt(()=>{var Fe,C;if(g!==void 0)for(m of g)(C=(Fe=m.nodes)==null?void 0:Fe.a)==null||C.apply()})}function ba(e,t,n,r,i,o,s,l){var a=s&Cl?s&El?Rn(n):Ql(n,!1,!1):null,u=s&Rl?Rn(i):null;return{v:a,i:u,e:st(()=>(o(t,a??n,u??i,l),()=>{e.delete(r)}))}}function ar(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,o=t&&!(t.f&Ft)?t.nodes.start:n;r!==null;){var s=Er(r);if(o.before(r),r===i)return;r=s}}function qt(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const xo=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Pa(e,t,n){var r=e==null?"":""+e;if(n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,s=0;(s=r.indexOf(i,s))>=0;){var l=s+o;(s===0||xo.includes(r[s-1]))&&(l===r.length||xo.includes(r[l]))?r=(s===0?"":r.substring(0,s))+r.substring(l+1):s=l}}return r===""?null:r}function Pn(e,t,n,r,i,o){var s=e[Ei];if(s!==n||s===void 0){var l=Pa(n,r,o);l==null?e.removeAttribute("class"):e.className=l,e[Ei]=n}else if(o&&i!==o)for(var a in o){var u=!!o[a];(i==null||u!==!!i[a])&&e.classList.toggle(a,u)}return o}function eo(e,t,n=!1){if(e.multiple){if(t==null)return;if(!ji(t))return Pl();for(var r of e.options)r.selected=t.includes(Ao(r));return}for(r of e.options){var i=Ao(r);if(ta(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Ts(e){var t=new MutationObserver(()=>{eo(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Yi(()=>{t.disconnect()})}function Ao(e){return"__value"in e?e.__value:e.value}const Ia=Symbol("is custom element"),Oa=Symbol("is html"),ka=fl?"progress":"PROGRESS";function ci(e,t){var n=$s(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ka)||(e.value=t??"")}function Ta(e,t,n,r){var i=$s(e);i[t]!==(i[t]=n)&&(n==null?e.removeAttribute(t):typeof n!="string"&&$a(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function $s(e){return e[Ir]??(e[Ir]={[Ia]:e.nodeName.includes("-"),[Oa]:e.namespaceURI===Fl})}var Fo=new Map;function $a(e){var t=e.getAttribute("is")||e.nodeName,n=Fo.get(t);if(n)return n;Fo.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=nl(i);for(var s in r)r[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&n.push(s);i=Wo(i)}return n}function hr(e,t,n=t){var r=new WeakSet;sa(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=di(e)?pi(o):o,n(o),I!==null&&r.add(I),await va(),o!==(o=t())){var s=e.selectionStart,l=e.selectionEnd,a=e.value.length;if(e.value=o??"",l!==null){var u=e.value.length;s===l&&l===a&&u>a?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=s,e.selectionEnd=Math.min(l,u))}}}),Qi(t)==null&&e.value&&(n(di(e)?pi(e.value):e.value),I!==null&&r.add(I)),Ss(()=>{var i=t();if(e===document.activeElement){var o=I;if(r.has(o))return}di(e)&&i===pi(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function di(e){var t=e.type;return t==="number"||t==="range"}function pi(e){return e===""?null:+e}function Va(e){$e===null&&cl(),ua(()=>{const t=Qi(e);if(typeof t=="function")return t})}const Da="5";var qo;typeof window<"u"&&((qo=window.__svelte??(window.__svelte={})).v??(qo.v=new Set)).add(Da);function La(e={}){const t=new URLSearchParams;e.type&&t.set("type",e.type),e.page&&e.page>1&&t.set("page",String(e.page));const n=t.toString();return n?`/api/posts?${n}`:"/api/posts"}async function Na(e={}){const t=await fetch(La(e));if(!t.ok)throw new Error(`Failed to load posts: ${t.status}`);const n=await t.json();return{posts:Array.isArray(n.posts)?n.posts:[],unconfigured:n.unconfigured===!0}}async function Ha(){const e=await fetch("/api/types");if(!e.ok)throw new Error(`Failed to load post types: ${e.status}`);const t=await e.json();return Array.isArray(t.types)?t.types:[]}async function Ga(){const e=await fetch("/api/connection");if(!e.ok)throw new Error(`Failed to read connection status: ${e.status}`);const t=await e.json();return{connected:t.connected===!0,siteUrl:typeof t.siteUrl=="string"?t.siteUrl:null,connectorAvailable:t.connectorAvailable===!0}}async function za(e){const t=await fetch("/api/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error(n.error??`Connection failed: ${t.status}`);return{connected:n.connected??!0,siteUrl:n.siteUrl??e.siteUrl,connectorAvailable:n.connectorAvailable??!1}}async function ja(){const e=await fetch("/api/connection",{method:"DELETE"});if(!e.ok)throw new Error(`Disconnect failed: ${e.status}`)}async function Ba(e,t="posts"){const n=await fetch("/api/posts/batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:t,updates:e})}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error??`Save failed: ${n.status}`);return Array.isArray(r.results)?r.results:[]}async function Ua(e,t="posts"){const n=await fetch("/api/posts/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:t,creates:e})}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error??`Import failed: ${n.status}`);return Array.isArray(r.results)?r.results:[]}async function qa(e){const t=await fetch("/api/posts/meta/bulk",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({deletes:e})}),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error(n.error??`Bulk delete failed: ${t.status}`);return Array.isArray(n.results)?n.results:[]}var Ka=L('<p class="error"> </p>'),Wa=L(`<form class="connect"><h2>Connect to WordPress</h2> <p class="notice">Use an <a href="https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/" target="_blank" rel="noreferrer">Application Password</a>. Credentials are kept only in this session's local process, never in the browser.</p> <label>Site URL <input placeholder="https://example.com" autocomplete="off" required=""/></label> <label>Username <input autocomplete="off" required=""/></label> <label>Application Password <input type="password" autocomplete="off" required=""/></label> <button type="submit"> </button> <!></form>`);function Xa(e,t){Xn(t,!0);let n=H(""),r=H(""),i=H(""),o=H(!1),s=H(null);async function l(y){y.preventDefault(),S(o,!0),S(s,null);const $={siteUrl:p(n),username:p(r),applicationPassword:p(i)};try{await za($),t.onconnected()}catch(V){S(s,V instanceof Error?V.message:String(V),!0)}finally{S(i,""),S(o,!1)}}var a=Wa(),u=M(R(a),4),d=M(R(u)),g=M(u,2),f=M(R(g)),c=M(g,2),v=M(R(c)),_=M(c,2),m=R(_),w=M(_,2);{var x=y=>{var $=Ka(),V=R($);W(()=>J(V,p(s))),A(y,$)};ne(w,y=>{p(s)&&y(x)})}W(()=>{_.disabled=p(o),J(m,p(o)?"Connecting…":"Connect")}),Sa("submit",a,l),hr(d,()=>p(n),y=>S(n,y)),hr(f,()=>p(r),y=>S(r,y)),hr(v,()=>p(i),y=>S(i,y)),A(e,a),Yn()}/**
|
|
3
|
+
* table-core
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) TanStack
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
9
|
+
*
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/function Yt(e,t){return typeof e=="function"?e(t):e}function Qe(e,t){return n=>{t.setState(r=>({...r,[e]:Yt(n,r[e])}))}}function Qr(e){return e instanceof Function}function Ya(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Ja(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const s=t(o);s!=null&&s.length&&r(s)})};return r(e),n}function k(e,t,n){let r=[],i;return o=>{let s;n.key&&n.debug&&(s=Date.now());const l=e(o);if(!(l.length!==r.length||l.some((d,g)=>r[g]!==d)))return i;r=l;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...l),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-s)*100)/100,g=Math.round((Date.now()-u)*100)/100,f=g/16,c=(v,_)=>{for(v=String(v);v.length<_;)v=" "+v;return v};console.info(`%c⏱ ${c(g,5)} /${c(d,5)} ms`,`
|
|
12
|
+
font-size: .6rem;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function T(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function Za(e,t,n,r){const i=()=>{var s;return(s=o.getValue())!=null?s:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:k(()=>[e,n,t,o],(s,l,a,u)=>({table:s,column:l,row:a,cell:u,getValue:u.getValue,renderValue:u.renderValue}),T(e.options,"debugCells"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(o,n,t,e)},{}),o}function Qa(e,t,n,r){var i,o;const l={...e._getDefaultColumnDef(),...t},a=l.accessorKey;let u=(i=(o=l.id)!=null?o:a?typeof String.prototype.replaceAll=="function"?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)!=null?i:typeof l.header=="string"?l.header:void 0,d;if(l.accessorFn?d=l.accessorFn:a&&(a.includes(".")?d=f=>{let c=f;for(const _ of a.split(".")){var v;c=(v=c)==null?void 0:v[_]}return c}:d=f=>f[l.accessorKey]),!u)throw new Error;let g={id:`${String(u)}`,accessorFn:d,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:k(()=>[!0],()=>{var f;return[g,...(f=g.columns)==null?void 0:f.flatMap(c=>c.getFlatColumns())]},T(e.options,"debugColumns")),getLeafColumns:k(()=>[e._getOrderColumnsFn()],f=>{var c;if((c=g.columns)!=null&&c.length){let v=g.columns.flatMap(_=>_.getLeafColumns());return f(v)}return[g]},T(e.options,"debugColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(g,e);return g}const Ie="debugHeaders";function bo(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],l=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(l),s.push(a)};return l(o),s},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(o,e)}),o}const eu={createTable:e=>{e.getHeaderGroups=k(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,s;const l=(o=r==null?void 0:r.map(g=>n.find(f=>f.id===g)).filter(Boolean))!=null?o:[],a=(s=i==null?void 0:i.map(g=>n.find(f=>f.id===g)).filter(Boolean))!=null?s:[],u=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(i!=null&&i.includes(g.id)));return Fr(t,[...l,...u,...a],e)},T(e.options,Ie)),e.getCenterHeaderGroups=k(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Fr(t,n,e,"center")),T(e.options,Ie)),e.getLeftHeaderGroups=k(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(s=>n.find(l=>l.id===s)).filter(Boolean))!=null?i:[];return Fr(t,o,e,"left")},T(e.options,Ie)),e.getRightHeaderGroups=k(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(s=>n.find(l=>l.id===s)).filter(Boolean))!=null?i:[];return Fr(t,o,e,"right")},T(e.options,Ie)),e.getFooterGroups=k(()=>[e.getHeaderGroups()],t=>[...t].reverse(),T(e.options,Ie)),e.getLeftFooterGroups=k(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),T(e.options,Ie)),e.getCenterFooterGroups=k(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),T(e.options,Ie)),e.getRightFooterGroups=k(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),T(e.options,Ie)),e.getFlatHeaders=k(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),T(e.options,Ie)),e.getLeftFlatHeaders=k(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),T(e.options,Ie)),e.getCenterFlatHeaders=k(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),T(e.options,Ie)),e.getRightFlatHeaders=k(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),T(e.options,Ie)),e.getCenterLeafHeaders=k(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),T(e.options,Ie)),e.getLeftLeafHeaders=k(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),T(e.options,Ie)),e.getRightLeafHeaders=k(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),T(e.options,Ie)),e.getLeafHeaders=k(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,s,l,a,u;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(s=(l=n[0])==null?void 0:l.headers)!=null?s:[],...(a=(u=r[0])==null?void 0:u.headers)!=null?a:[]].map(d=>d.getLeafHeaders()).flat()},T(e.options,Ie))}};function Fr(e,t,n,r){var i,o;let s=0;const l=function(f,c){c===void 0&&(c=1),s=Math.max(s,c),f.filter(v=>v.getIsVisible()).forEach(v=>{var _;(_=v.columns)!=null&&_.length&&l(v.columns,c+1)},0)};l(e);let a=[];const u=(f,c)=>{const v={depth:c,id:[r,`${c}`].filter(Boolean).join("_"),headers:[]},_=[];f.forEach(m=>{const w=[..._].reverse()[0],x=m.column.depth===v.depth;let y,$=!1;if(x&&m.column.parent?y=m.column.parent:(y=m.column,$=!0),w&&(w==null?void 0:w.column)===y)w.subHeaders.push(m);else{const V=bo(n,y,{id:[r,c,y.id,m==null?void 0:m.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${_.filter(se=>se.column===y).length}`:void 0,depth:c,index:_.length});V.subHeaders.push(m),_.push(V)}v.headers.push(m),m.headerGroup=v}),a.push(v),c>0&&u(_,c-1)},d=t.map((f,c)=>bo(n,f,{depth:s,index:c}));u(d,s-1),a.reverse();const g=f=>f.filter(v=>v.column.getIsVisible()).map(v=>{let _=0,m=0,w=[0];v.subHeaders&&v.subHeaders.length?(w=[],g(v.subHeaders).forEach(y=>{let{colSpan:$,rowSpan:V}=y;_+=$,w.push(V)})):_=1;const x=Math.min(...w);return m=m+x,v.colSpan=_,v.rowSpan=m,{colSpan:_,rowSpan:m}});return g((i=(o=a[0])==null?void 0:o.headers)!=null?i:[]),a}const tu=(e,t,n,r,i,o,s)=>{let l={id:t,index:r,original:n,depth:i,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(l._valuesCache.hasOwnProperty(a))return l._valuesCache[a];const u=e.getColumn(a);if(u!=null&&u.accessorFn)return l._valuesCache[a]=u.accessorFn(l.original,r),l._valuesCache[a]},getUniqueValues:a=>{if(l._uniqueValuesCache.hasOwnProperty(a))return l._uniqueValuesCache[a];const u=e.getColumn(a);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[a]=u.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[a]):(l._uniqueValuesCache[a]=[l.getValue(a)],l._uniqueValuesCache[a])},renderValue:a=>{var u;return(u=l.getValue(a))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Ja(l.subRows,a=>a.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let a=[],u=l;for(;;){const d=u.getParentRow();if(!d)break;a.push(d),u=d}return a.reverse()},getAllCells:k(()=>[e.getAllLeafColumns()],a=>a.map(u=>Za(e,l,u,u.id)),T(e.options,"debugRows")),_getAllCellsByColumnId:k(()=>[l.getAllCells()],a=>a.reduce((u,d)=>(u[d.column.id]=d,u),{}),T(e.options,"debugRows"))};for(let a=0;a<e._features.length;a++){const u=e._features[a];u==null||u.createRow==null||u.createRow(l,e)}return l},nu={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Vs=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};Vs.autoRemove=e=>_t(e);const Ds=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Ds.autoRemove=e=>_t(e);const Ls=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Ls.autoRemove=e=>_t(e);const Ns=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Ns.autoRemove=e=>_t(e);const Hs=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});Hs.autoRemove=e=>_t(e)||!(e!=null&&e.length);const Gs=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});Gs.autoRemove=e=>_t(e)||!(e!=null&&e.length);const zs=(e,t,n)=>e.getValue(t)===n;zs.autoRemove=e=>_t(e);const js=(e,t,n)=>e.getValue(t)==n;js.autoRemove=e=>_t(e);const to=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};to.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(i)?1/0:i;if(o>s){const l=o;o=s,s=l}return[o,s]};to.autoRemove=e=>_t(e)||_t(e[0])&&_t(e[1]);const Vt={includesString:Vs,includesStringSensitive:Ds,equalsString:Ls,arrIncludes:Ns,arrIncludesAll:Hs,arrIncludesSome:Gs,equals:zs,weakEquals:js,inNumberRange:to};function _t(e){return e==null||e===""}const ru={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Qe("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Vt.includesString:typeof r=="number"?Vt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Vt.equals:Array.isArray(r)?Vt.arrIncludes:Vt.weakEquals},e.getFilterFn=()=>{var n,r;return Qr(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Vt[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r==null?void 0:r.find(d=>d.id===e.id),s=Yt(n,o?o.value:void 0);if(Po(i,s,e)){var l;return(l=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?l:[]}const a={id:e.id,value:s};if(o){var u;return(u=r==null?void 0:r.map(d=>d.id===e.id?a:d))!=null?u:[]}return r!=null&&r.length?[...r,a]:[a]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=Yt(t,i))==null?void 0:o.filter(s=>{const l=n.find(a=>a.id===s.id);if(l){const a=l.getFilterFn();if(Po(a,s.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Po(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const iu=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),ou=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},su=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},lu=(e,t,n)=>{let r,i;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r===void 0?s>=s&&(r=i=s):(r>s&&(r=s),i<s&&(i=s)))}),[r,i]},au=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},uu=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!Ya(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,s)=>o-s);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},fu=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),cu=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,du=(e,t)=>t.length,hi={sum:iu,min:ou,max:su,extent:lu,mean:au,median:uu,unique:fu,uniqueCount:cu,count:du},pu={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Qe("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return hi.sum;if(Object.prototype.toString.call(r)==="[object Date]")return hi.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Qr(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:hi[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function hu(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(s=>s.id===o)).filter(Boolean),...r]}const gu={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Qe("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=k(n=>[gr(t,n)],n=>n.findIndex(r=>r.id===e.id),T(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=gr(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=gr(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=k(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const s=[...t],l=[...i];for(;l.length&&s.length;){const a=s.shift(),u=l.findIndex(d=>d.id===a);u>-1&&o.push(l.splice(u,1)[0])}o=[...o,...l]}return hu(o,n,r)},T(e.options,"debugTable"))}},gi=()=>({left:[],right:[]}),vu={getInitialState:e=>({columnPinning:gi(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Qe("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,s;if(n==="right"){var l,a;return{left:((l=i==null?void 0:i.left)!=null?l:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((a=i==null?void 0:i.right)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var u,d;return{left:[...((u=i==null?void 0:i.left)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((d=i==null?void 0:i.right)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((o=i==null?void 0:i.left)!=null?o:[]).filter(g=>!(r!=null&&r.includes(g))),right:((s=i==null?void 0:i.right)!=null?s:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,s;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(l=>r==null?void 0:r.includes(l)),s=n.some(l=>i==null?void 0:i.includes(l));return o?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=k(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(s=>!o.includes(s.column.id))},T(t.options,"debugRows")),e.getLeftVisibleCells=k(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),T(t.options,"debugRows")),e.getRightVisibleCells=k(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),T(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?gi():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:gi())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=k(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),T(e.options,"debugColumns")),e.getRightLeafColumns=k(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),T(e.options,"debugColumns")),e.getCenterLeafColumns=k(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},T(e.options,"debugColumns"))}};function _u(e){return e||(typeof document<"u"?document:null)}const br={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},vi=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),mu={getDefaultColumnDef:()=>br,getInitialState:e=>({columnSizing:{},columnSizingInfo:vi(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Qe("columnSizing",e),onColumnSizingInfoChange:Qe("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:br.minSize,(r=o??e.columnDef.size)!=null?r:br.size),(i=e.columnDef.maxSize)!=null?i:br.maxSize)},e.getStart=k(n=>[n,gr(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),T(t.options,"debugColumns")),e.getAfter=k(n=>[n,gr(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),T(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),_i(o)&&o.touches&&o.touches.length>1))return;const s=e.getSize(),l=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],a=_i(o)?Math.round(o.touches[0].clientX):o.clientX,u={},d=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(y=>{var $,V;const se=t.options.columnResizeDirection==="rtl"?-1:1,ie=(x-(($=y==null?void 0:y.startOffset)!=null?$:0))*se,F=Math.max(ie/((V=y==null?void 0:y.startSize)!=null?V:0),-.999999);return y.columnSizingStart.forEach(ee=>{let[Q,ae]=ee;u[Q]=Math.round(Math.max(ae+ae*F,0)*100)/100}),{...y,deltaOffset:ie,deltaPercentage:F}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(y=>({...y,...u})))},g=w=>d("move",w),f=w=>{d("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},c=_u(n),v={moveHandler:w=>g(w.clientX),upHandler:w=>{c==null||c.removeEventListener("mousemove",v.moveHandler),c==null||c.removeEventListener("mouseup",v.upHandler),f(w.clientX)}},_={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),g(w.touches[0].clientX),!1),upHandler:w=>{var x;c==null||c.removeEventListener("touchmove",_.moveHandler),c==null||c.removeEventListener("touchend",_.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),f((x=w.touches[0])==null?void 0:x.clientX)}},m=wu()?{passive:!1}:!1;_i(o)?(c==null||c.addEventListener("touchmove",_.moveHandler,m),c==null||c.addEventListener("touchend",_.upHandler,m)):(c==null||c.addEventListener("mousemove",v.moveHandler,m),c==null||c.addEventListener("mouseup",v.upHandler,m)),t.setColumnSizingInfo(w=>({...w,startOffset:a,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?vi():(n=e.initialState.columnSizingInfo)!=null?n:vi())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Pr=null;function wu(){if(typeof Pr=="boolean")return Pr;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Pr=e,Pr}function _i(e){return e.type==="touchstart"}const Su={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Qe("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=k(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),T(t.options,"debugRows")),e.getVisibleCells=k(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],T(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>k(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),T(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function gr(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const yu={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Cu={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Qe("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Vt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Qr(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Vt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Ru={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Qe("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const s=o.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{s[l]=!0}):s=r,n=(i=n)!=null?i:!o,!o&&n)return{...s,[e.id]:!0};if(o&&!n){const{[e.id]:l,...a}=s;return a}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Vi=0,Di=10,mi=()=>({pageIndex:Vi,pageSize:Di}),Mu={getInitialState:e=>({...e,pagination:{...mi(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Qe("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>Yt(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?mi():(i=e.initialState.pagination)!=null?i:mi())},e.setPageIndex=r=>{e.setPagination(i=>{let o=Yt(r,i.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?Vi:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:Vi)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?Di:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:Di)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,Yt(r,i.pageSize)),s=i.pageSize*i.pageIndex,l=Math.floor(s/o);return{...i,pageIndex:l,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let s=Yt(r,(o=e.options.pageCount)!=null?o:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...i,pageCount:s}}),e.getPageOptions=k(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,s)=>s)),i},T(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},wi=()=>({top:[],bottom:[]}),Eu={getInitialState:e=>({rowPinning:wi(),...e}),getDefaultOptions:e=>({onRowPinningChange:Qe("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(a=>{let{id:u}=a;return u}):[],s=i?e.getParentRows().map(a=>{let{id:u}=a;return u}):[],l=new Set([...s,e.id,...o]);t.setRowPinning(a=>{var u,d;if(n==="bottom"){var g,f;return{top:((g=a==null?void 0:a.top)!=null?g:[]).filter(_=>!(l!=null&&l.has(_))),bottom:[...((f=a==null?void 0:a.bottom)!=null?f:[]).filter(_=>!(l!=null&&l.has(_))),...Array.from(l)]}}if(n==="top"){var c,v;return{top:[...((c=a==null?void 0:a.top)!=null?c:[]).filter(_=>!(l!=null&&l.has(_))),...Array.from(l)],bottom:((v=a==null?void 0:a.bottom)!=null?v:[]).filter(_=>!(l!=null&&l.has(_)))}}return{top:((u=a==null?void 0:a.top)!=null?u:[]).filter(_=>!(l!=null&&l.has(_))),bottom:((d=a==null?void 0:a.bottom)!=null?d:[]).filter(_=>!(l!=null&&l.has(_)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(l=>r==null?void 0:r.includes(l)),s=n.some(l=>i==null?void 0:i.includes(l));return o?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:l}=s;return l});return(r=o==null?void 0:o.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?wi():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:wi())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(s=>{const l=e.getRow(s,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(s=>t.find(l=>l.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=k(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),T(e.options,"debugRows")),e.getBottomRows=k(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),T(e.options,"debugRows")),e.getCenterRows=k(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},T(e.options,"debugRows"))}},xu={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Qe("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{Li(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=k(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Si(e,n):{rows:[],flatRows:[],rowsById:{}},T(e.options,"debugTable")),e.getFilteredSelectedRowModel=k(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Si(e,n):{rows:[],flatRows:[],rowsById:{}},T(e.options,"debugTable")),e.getGroupedSelectedRowModel=k(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Si(e,n):{rows:[],flatRows:[],rowsById:{}},T(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var s;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const l={...o};return Li(l,e.id,n,(s=r==null?void 0:r.selectChildren)!=null?s:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return no(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Ni(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Ni(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},Li=(e,t,n,r,i)=>{var o;const s=i.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=s.subRows)!=null&&o.length&&s.getCanSelectSubRows()&&s.subRows.forEach(l=>Li(e,l.id,n,r,i))};function Si(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(s,l){return s.map(a=>{var u;const d=no(a,n);if(d&&(r.push(a),i[a.id]=a),(u=a.subRows)!=null&&u.length&&(a={...a,subRows:o(a.subRows)}),d)return a}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function no(e,t){var n;return(n=t[e.id])!=null?n:!1}function Ni(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(s=>{if(!(o&&!i)&&(s.getCanSelect()&&(no(s,t)?o=!0:i=!1),s.subRows&&s.subRows.length)){const l=Ni(s,t);l==="all"?o=!0:(l==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const Hi=/([0-9]+)/gm,Au=(e,t,n)=>Bs(nn(e.getValue(n)).toLowerCase(),nn(t.getValue(n)).toLowerCase()),Fu=(e,t,n)=>Bs(nn(e.getValue(n)),nn(t.getValue(n))),bu=(e,t,n)=>ro(nn(e.getValue(n)).toLowerCase(),nn(t.getValue(n)).toLowerCase()),Pu=(e,t,n)=>ro(nn(e.getValue(n)),nn(t.getValue(n))),Iu=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},Ou=(e,t,n)=>ro(e.getValue(n),t.getValue(n));function ro(e,t){return e===t?0:e>t?1:-1}function nn(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Bs(e,t){const n=e.split(Hi).filter(Boolean),r=t.split(Hi).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),s=parseInt(i,10),l=parseInt(o,10),a=[s,l].sort();if(isNaN(a[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(a[1]))return isNaN(s)?-1:1;if(s>l)return 1;if(l>s)return-1}return n.length-r.length}const rr={alphanumeric:Au,alphanumericCaseSensitive:Fu,text:bu,textCaseSensitive:Pu,datetime:Iu,basic:Ou},ku={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Qe("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return rr.datetime;if(typeof o=="string"&&(r=!0,o.split(Hi).length>1))return rr.alphanumeric}return r?rr.text:rr.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Qr(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:rr[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(s=>{const l=s==null?void 0:s.find(c=>c.id===e.id),a=s==null?void 0:s.findIndex(c=>c.id===e.id);let u=[],d,g=o?n:i==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?l?d="toggle":d="add":s!=null&&s.length&&a!==s.length-1?d="replace":l?d="toggle":d="replace",d==="toggle"&&(o||i||(d="remove")),d==="add"){var f;u=[...s,{id:e.id,desc:g}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=s.map(c=>c.id===e.id?{...c,desc:g}:c):d==="remove"?u=s.filter(c=>c.id!==e.id):u=[{id:e.id,desc:g}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:s==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Tu=[eu,Su,gu,vu,nu,ru,yu,Cu,ku,pu,Ru,Mu,Eu,xu,mu];function $u(e){var t,n;const r=[...Tu,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((f,c)=>Object.assign(f,c.getDefaultOptions==null?void 0:c.getDefaultOptions(i)),{}),s=f=>i.options.mergeOptions?i.options.mergeOptions(o,f):{...o,...f};let a={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(f=>{var c;a=(c=f.getInitialState==null?void 0:f.getInitialState(a))!=null?c:a});const u=[];let d=!1;const g={_features:r,options:{...o,...e},initialState:a,_queue:f=>{u.push(f),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(c=>setTimeout(()=>{throw c})))},reset:()=>{i.setState(i.initialState)},setOptions:f=>{const c=Yt(f,i.options);i.options=s(c)},getState:()=>i.options.state,setState:f=>{i.options.onStateChange==null||i.options.onStateChange(f)},_getRowId:(f,c,v)=>{var _;return(_=i.options.getRowId==null?void 0:i.options.getRowId(f,c,v))!=null?_:`${v?[v.id,c].join("."):c}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(f,c)=>{let v=(c?i.getPrePaginationRowModel():i.getRowModel()).rowsById[f];if(!v&&(v=i.getCoreRowModel().rowsById[f],!v))throw new Error;return v},_getDefaultColumnDef:k(()=>[i.options.defaultColumn],f=>{var c;return f=(c=f)!=null?c:{},{header:v=>{const _=v.header.column.columnDef;return _.accessorKey?_.accessorKey:_.accessorFn?_.id:null},cell:v=>{var _,m;return(_=(m=v.renderValue())==null||m.toString==null?void 0:m.toString())!=null?_:null},...i._features.reduce((v,_)=>Object.assign(v,_.getDefaultColumnDef==null?void 0:_.getDefaultColumnDef()),{}),...f}},T(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:k(()=>[i._getColumnDefs()],f=>{const c=function(v,_,m){return m===void 0&&(m=0),v.map(w=>{const x=Qa(i,w,m,_),y=w;return x.columns=y.columns?c(y.columns,x,m+1):[],x})};return c(f)},T(e,"debugColumns")),getAllFlatColumns:k(()=>[i.getAllColumns()],f=>f.flatMap(c=>c.getFlatColumns()),T(e,"debugColumns")),_getAllFlatColumnsById:k(()=>[i.getAllFlatColumns()],f=>f.reduce((c,v)=>(c[v.id]=v,c),{}),T(e,"debugColumns")),getAllLeafColumns:k(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(f,c)=>{let v=f.flatMap(_=>_.getLeafColumns());return c(v)},T(e,"debugColumns")),getColumn:f=>i._getAllFlatColumnsById()[f]};Object.assign(i,g);for(let f=0;f<i._features.length;f++){const c=i._features[f];c==null||c.createTable==null||c.createTable(i)}return i}function Vu(){return e=>k(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,s){o===void 0&&(o=0);const l=[];for(let u=0;u<i.length;u++){const d=tu(e,e._getRowId(i[u],u,s),i[u],u,o,void 0,s==null?void 0:s.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,l.push(d),e.options.getSubRows){var a;d.originalSubRows=e.options.getSubRows(i[u],u),(a=d.originalSubRows)!=null&&a.length&&(d.subRows=r(d.originalSubRows,o+1,d))}}return l};return n.rows=r(t),n},T(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Du(){return e=>k(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(a=>{var u;return(u=e.getColumn(a.id))==null?void 0:u.getCanSort()}),s={};o.forEach(a=>{const u=e.getColumn(a.id);u&&(s[a.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const l=a=>{const u=a.map(d=>({...d}));return u.sort((d,g)=>{for(let c=0;c<o.length;c+=1){var f;const v=o[c],_=s[v.id],m=_.sortUndefined,w=(f=v==null?void 0:v.desc)!=null?f:!1;let x=0;if(m){const y=d.getValue(v.id),$=g.getValue(v.id),V=y===void 0,se=$===void 0;if(V||se){if(m==="first")return V?-1:1;if(m==="last")return V?1:-1;x=V&&se?0:V?m:-m}}if(x===0&&(x=_.sortingFn(d,g,v.id)),x!==0)return w&&(x*=-1),_.invertSorting&&(x*=-1),x}return d.index-g.index}),u.forEach(d=>{var g;i.push(d),(g=d.subRows)!=null&&g.length&&(d.subRows=l(d.subRows))}),u};return{rows:l(n.rows),flatRows:i,rowsById:n.rowsById}},T(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}const Lu=[{accessorKey:"id",header:"ID"},{accessorKey:"title",header:"Title"},{accessorKey:"status",header:"Status"},{accessorKey:"menuOrder",header:"Menu order"}];function Nu(e){return $u({data:e.data,columns:Lu,state:{sorting:e.sorting},onSortingChange:e.onSortingChange,getCoreRowModel:Vu(),getSortedRowModel:Du(),onStateChange(){},renderFallbackValue:null})}function Hu(e){const t=e.column.columnDef.header;return typeof t=="string"?t:""}function Gu(e){return e==="asc"?" ▲":e==="desc"?" ▼":""}var zu=L('<p class="empty">No posts to show.</p>'),ju=L('<th class="sortable"> </th>'),Io=L("<tr></tr>"),Bu=L("<td> </td>"),Uu=L("<table><thead></thead><tbody></tbody></table>");function qu(e,t){Xn(t,!0);let n=H(Be([]));function r(u){S(n,typeof u=="function"?u(p(n)):u,!0)}const i=fn(()=>Nu({data:t.posts,sorting:p(n),onSortingChange:r}));var o=mr(),s=at(o);{var l=u=>{var d=zu();A(u,d)},a=u=>{var d=Uu(),g=R(d);je(g,21,()=>p(i).getHeaderGroups(),c=>c.id,(c,v)=>{var _=Io();je(_,21,()=>p(v).headers,m=>m.id,(m,w)=>{var x=ju(),y=R(x);W(($,V)=>J(y,`${$??""}${V??""}`),[()=>Hu(p(w)),()=>Gu(p(w).column.getIsSorted())]),le("click",x,$=>{var V;return(V=p(w).column.getToggleSortingHandler())==null?void 0:V($)}),A(m,x)}),A(c,_)});var f=M(g);je(f,21,()=>p(i).getRowModel().rows,c=>c.id,(c,v)=>{var _=Io();je(_,21,()=>p(v).getVisibleCells(),m=>m.id,(m,w)=>{var x=Bu(),y=R(x);W($=>J(y,$),[()=>String(p(w).getValue()??"")]),A(m,x)}),A(c,_)}),A(u,d)};ne(s,u=>{t.posts.length===0?u(l):u(a,-1)})}A(e,o),Yn()}Zr(["click"]);var lt="INUMBER",Jn="IOP1",Zn="IOP2",Qn="IOP3",Gt="IVAR",Mn="IVARNAME",Bn="IFUNCALL",ei="IFUNDEF",qe="IEXPR",io="IEXPREVAL",En="IMEMBER",ti="IENDSTATEMENT",Un="IARRAY";function X(e,t){this.type=e,this.value=t??0}X.prototype.toString=function(){switch(this.type){case lt:case Jn:case Zn:case Qn:case Gt:case Mn:case ti:return this.value;case Bn:return"CALL "+this.value;case ei:return"DEF "+this.value;case Un:return"ARRAY "+this.value;case En:return"."+this.value;default:return"Invalid Instruction"}};function ni(e){return new X(Jn,e)}function jt(e){return new X(Zn,e)}function Us(e){return new X(Qn,e)}function Gi(e,t,n,r,i){for(var o=[],s=[],l,a,u,d,g=0;g<e.length;g++){var f=e[g],c=f.type;if(c===lt||c===Mn)Array.isArray(f.value)?o.push.apply(o,Gi(f.value.map(function(v){return new X(lt,v)}).concat(new X(Un,f.value.length)),t,n,r,i)):o.push(f);else if(c===Gt&&Object.hasOwn(i,f.value))f=new X(lt,i[f.value]),o.push(f);else if(c===Zn&&o.length>1)a=o.pop(),l=o.pop(),d=n[f.value],f=new X(lt,d(l.value,a.value)),o.push(f);else if(c===Qn&&o.length>2)u=o.pop(),a=o.pop(),l=o.pop(),f.value==="?"?o.push(l.value?a.value:u.value):(d=r[f.value],f=new X(lt,d(l.value,a.value,u.value)),o.push(f));else if(c===Jn&&o.length>0)l=o.pop(),d=t[f.value],f=new X(lt,d(l.value)),o.push(f);else if(c===qe){for(;o.length>0;)s.push(o.shift());s.push(new X(qe,Gi(f.value,t,n,r,i)))}else if(c===En&&o.length>0)l=o.pop(),o.push(new X(lt,l.value[f.value]));else{for(;o.length>0;)s.push(o.shift());s.push(f)}}for(;o.length>0;)s.push(o.shift());return s}function qs(e,t,n){for(var r=[],i=0;i<e.length;i++){var o=e[i],s=o.type;if(s===Gt&&o.value===t)for(var l=0;l<n.tokens.length;l++){var a=n.tokens[l],u;a.type===Jn?u=ni(a.value):a.type===Zn?u=jt(a.value):a.type===Qn?u=Us(a.value):u=new X(a.type,a.value),r.push(u)}else s===qe?r.push(new X(qe,qs(o.value,t,n))):r.push(o)}return r}function yi(e,t,n){if(Object.values(t.functions).includes(e))return!0;for(const i of Object.values(n))if(typeof i=="object"&&i!==null){for(const o of Object.values(i))if(o===e){const s=Object.freeze({abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,clz32:Math.clz32,cos:Math.cos,exp:Math.exp,floor:Math.floor,imul:Math.imul,fround:Math.fround,f16round:Math.f16round,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,log10:Math.log10,log2:Math.log2,log1p:Math.log1p,expm1:Math.expm1,cosh:Math.cosh,sinh:Math.sinh,tanh:Math.tanh,acosh:Math.acosh,asinh:Math.asinh,atanh:Math.atanh,hypot:Math.hypot,trunc:Math.trunc,sign:Math.sign,cbrt:Math.cbrt});for(var r of Object.getOwnPropertyNames(s))if(s[r]===o)return!0;return Object.values(t.functions).includes(o)}}return!1}function an(e,t,n){var r=[],i,o,s,l,a,u;if(oo(e))return $t(e,n);for(var d=e.length,g=0;g<d;g++){var f=e[g],c=f.type;if(c===lt||c===Mn)r.push(f.value);else if(c===Zn)o=r.pop(),i=r.pop(),f.value==="and"?r.push(i?!!an(o,t,n):!1):f.value==="or"?r.push(i?!0:!!an(o,t,n)):f.value==="="?(l=t.binaryOps[f.value],r.push(l(i,an(o,t,n),n))):(l=t.binaryOps[f.value],r.push(l($t(i,n),$t(o,n))));else if(c===Qn)s=r.pop(),o=r.pop(),i=r.pop(),f.value==="?"?r.push(an(i?o:s,t,n)):(l=t.ternaryOps[f.value],r.push(l($t(i,n),$t(o,n),$t(s,n))));else if(c===Gt){if(/^__proto__|prototype|constructor$/.test(f.value))throw new Error("prototype access detected");if(f.value in t.functions)r.push(t.functions[f.value]);else if(f.value in t.unaryOps&&t.parser.isOperatorEnabled(f.value))r.push(t.unaryOps[f.value]);else{var v=n[f.value];if(v!==void 0){if(typeof v=="function"&&!yi(v,t,n))throw new Error("Variable references an unallowed function: "+f.value);r.push(v)}else throw new Error("undefined variable: "+f.value)}}else if(c===Jn)i=r.pop(),l=t.unaryOps[f.value],r.push(l($t(i,n)));else if(c===Bn){for(u=f.value,a=[];u-- >0;)a.unshift($t(r.pop(),n));if(l=r.pop(),!yi(l,t,n))throw new Error("Is not an allowed function.");if(l.apply&&l.call)r.push(l.apply(void 0,a));else throw new Error(l+" is not a function")}else if(c===ei)r.push(function(){for(var _=r.pop(),m=[],w=f.value;w-- >0;)m.unshift(r.pop());var x=r.pop(),y=function(){for(var $=Object.assign({},n),V=0,se=m.length;V<se;V++)$[m[V]]=arguments[V];return an(_,t,$)};return t.functions["lambda_"+t.functions.__counter++]=y,n[x]=y,y}());else if(c===qe)r.push(Ku(f,t));else if(c===io)r.push(f);else if(c===En){if(i=r.pop(),/^__proto__|prototype|constructor$/.test(f.value))throw new Error("prototype access detected in MEMBER");if(typeof i=="object"&&typeof i[f.value]=="function"&&!yi(i[f.value],t,n))throw new Error("Is not an allowed function in MEMBER.");r.push(i[f.value])}else if(c===ti)r.pop();else if(c===Un){for(u=f.value,a=[];u-- >0;)a.unshift(r.pop());r.push(a)}else throw new Error("invalid Expression")}if(r.length>1)throw new Error("invalid Expression (parity)");return r[0]===0?0:$t(r[0],n)}function Ku(e,t,n){return oo(e)?e:{type:io,value:function(r){return an(e.value,t,r)}}}function oo(e){return e&&e.type===io}function $t(e,t){return oo(e)?e.value(t):e}function so(e,t){for(var n=[],r,i,o,s,l,a,u=0;u<e.length;u++){var d=e[u],g=d.type;if(g===lt)typeof d.value=="number"&&d.value<0?n.push("("+d.value+")"):Array.isArray(d.value)?n.push("["+d.value.map(Oo).join(", ")+"]"):n.push(Oo(d.value));else if(g===Zn)i=n.pop(),r=n.pop(),s=d.value,t?s==="^"?n.push("Math.pow("+r+", "+i+")"):s==="and"?n.push("(!!"+r+" && !!"+i+")"):s==="or"?n.push("(!!"+r+" || !!"+i+")"):s==="||"?n.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+r+"),("+i+")))"):s==="=="?n.push("("+r+" === "+i+")"):s==="!="?n.push("("+r+" !== "+i+")"):s==="["?n.push(r+"[("+i+") | 0]"):n.push("("+r+" "+s+" "+i+")"):s==="["?n.push(r+"["+i+"]"):n.push("("+r+" "+s+" "+i+")");else if(g===Qn)if(o=n.pop(),i=n.pop(),r=n.pop(),s=d.value,s==="?")n.push("("+r+" ? "+i+" : "+o+")");else throw new Error("invalid Expression");else if(g===Gt||g===Mn)n.push(d.value);else if(g===Jn)r=n.pop(),s=d.value,s==="-"||s==="+"?n.push("("+s+r+")"):t?s==="not"?n.push("(!"+r+")"):s==="!"?n.push("fac("+r+")"):n.push(s+"("+r+")"):s==="!"?n.push("("+r+"!)"):n.push("("+s+" "+r+")");else if(g===Bn){for(a=d.value,l=[];a-- >0;)l.unshift(n.pop());s=n.pop(),n.push(s+"("+l.join(", ")+")")}else if(g===ei){for(i=n.pop(),a=d.value,l=[];a-- >0;)l.unshift(n.pop());r=n.pop(),t?n.push("("+r+" = function("+l.join(", ")+") { return "+i+" })"):n.push("("+r+"("+l.join(", ")+") = "+i+")")}else if(g===En)r=n.pop(),n.push(r+"."+d.value);else if(g===Un){for(a=d.value,l=[];a-- >0;)l.unshift(n.pop());n.push("["+l.join(", ")+"]")}else if(g===qe)n.push("("+so(d.value,t)+")");else if(g!==ti)throw new Error("invalid Expression")}return n.length>1&&(t?n=[n.join(",")]:n=[n.join(";")]),String(n[0])}function Oo(e){return typeof e=="string"?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function In(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1}function lo(e,t,n){n=n||{};for(var r=!!n.withMembers,i=null,o=0;o<e.length;o++){var s=e[o];s.type===Gt||s.type===Mn?!r&&!In(t,s.value)?t.push(s.value):(i!==null&&(In(t,i)||t.push(i)),i=s.value):s.type===En&&r&&i!==null?i+="."+s.value:s.type===qe?lo(s.value,t,n):i!==null&&(In(t,i)||t.push(i),i=null)}i!==null&&!In(t,i)&&t.push(i)}function mt(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}mt.prototype.simplify=function(e){return e=e||{},new mt(Gi(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)};mt.prototype.substitute=function(e,t){return t instanceof mt||(t=this.parser.parse(String(t))),new mt(qs(this.tokens,e,t),this.parser)};mt.prototype.evaluate=function(e){return e=e||{},an(this.tokens,this,e)};mt.prototype.toString=function(){return so(this.tokens,!1)};mt.prototype.symbols=function(e){e=e||{};var t=[];return lo(this.tokens,t,e),t};mt.prototype.variables=function(e){e=e||{};var t=[];lo(this.tokens,t,e);var n=this.functions;return t.filter(function(r){return!(r in n)})};mt.prototype.toJSFunction=function(e,t){var n=this,r=new Function(e,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+so(this.simplify(t).tokens,!0)+"; }");return function(){return r.apply(n,arguments)}};var wr="TEOF",te="TOP",ri="TNUMBER",Ks="TSTRING",zt="TPAREN",qn="TBRACKET",ii="TCOMMA",ao="TNAME",uo="TSEMICOLON";function Ws(e,t,n){this.type=e,this.value=t,this.index=n}Ws.prototype.toString=function(){return this.type+": "+this.value};function fe(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options,this.parser=e}fe.prototype.newToken=function(e,t,n){return new Ws(e,t,n??this.pos)};fe.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current};fe.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent};fe.prototype.next=function(){if(this.pos>=this.expression.length)return this.newToken(wr,"EOF");if(this.isWhitespace()||this.isComment())return this.next();if(this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst()||this.isName())return this.current;this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')};fe.prototype.isString=function(){var e=!1,t=this.pos,n=this.expression.charAt(t);if(n==="'"||n==='"')for(var r=this.expression.indexOf(n,t+1);r>=0&&this.pos<this.expression.length;){if(this.pos=r+1,this.expression.charAt(r-1)!=="\\"){var i=this.expression.substring(t+1,r);this.current=this.newToken(Ks,this.unescape(i),t),e=!0;break}r=this.expression.indexOf(n,r+1)}return e};fe.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return e==="("||e===")"?(this.current=this.newToken(zt,e),this.pos++,!0):!1};fe.prototype.isBracket=function(){var e=this.expression.charAt(this.pos);return(e==="["||e==="]")&&this.isOperatorEnabled("[")?(this.current=this.newToken(qn,e),this.pos++,!0):!1};fe.prototype.isComma=function(){var e=this.expression.charAt(this.pos);return e===","?(this.current=this.newToken(ii,","),this.pos++,!0):!1};fe.prototype.isSemicolon=function(){var e=this.expression.charAt(this.pos);return e===";"?(this.current=this.newToken(uo,";"),this.pos++,!0):!1};fe.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()&&(t===this.pos||n!=="_"&&n!=="."&&(n<"0"||n>"9")))break}if(t>e){var r=this.expression.substring(e,t);if(r in this.consts)return this.current=this.newToken(ri,this.consts[r]),this.pos+=r.length,!0}return!1};fe.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var n=this.expression.charAt(t);if(n.toUpperCase()===n.toLowerCase()&&(t===this.pos||n!=="_"&&(n<"0"||n>"9")))break}if(t>e){var r=this.expression.substring(e,t);if(this.isOperatorEnabled(r)&&(r in this.binaryOps||r in this.unaryOps||r in this.ternaryOps))return this.current=this.newToken(te,r),this.pos+=r.length,!0}return!1};fe.prototype.isName=function(){for(var e=this.pos,t=e,n=!1;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()){if(t===this.pos&&(r==="$"||r==="_")){r==="_"&&(n=!0);continue}else if(t===this.pos||!n||r!=="_"&&(r<"0"||r>"9"))break}else n=!0}if(n){var i=this.expression.substring(e,t);return this.current=this.newToken(ao,i),this.pos+=i.length,!0}return!1};fe.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);(t===" "||t===" "||t===`
|
|
15
|
+
`||t==="\r")&&(e=!0,this.pos++,!(this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var Wu=/^[0-9a-f]{4}$/i;fe.prototype.unescape=function(e){var t=e.indexOf("\\");if(t<0)return e;for(var n=e.substring(0,t);t>=0;){var r=e.charAt(++t);switch(r){case"'":n+="'";break;case'"':n+='"';break;case"\\":n+="\\";break;case"/":n+="/";break;case"b":n+="\b";break;case"f":n+="\f";break;case"n":n+=`
|
|
16
|
+
`;break;case"r":n+="\r";break;case"t":n+=" ";break;case"u":var i=e.substring(t+1,t+5);Wu.test(i)||this.parseError("Illegal escape sequence: \\u"+i),n+=String.fromCharCode(parseInt(i,16)),t+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+r+'"')}++t;var o=e.indexOf("\\",t);n+=e.substring(t,o<0?e.length:o),t=o}return n};fe.prototype.isComment=function(){var e=this.expression.charAt(this.pos);return e==="/"&&this.expression.charAt(this.pos+1)==="*"?(this.pos=this.expression.indexOf("*/",this.pos)+2,this.pos===1&&(this.pos=this.expression.length),!0):!1};fe.prototype.isRadixInteger=function(){var e=this.pos;if(e>=this.expression.length-2||this.expression.charAt(e)!=="0")return!1;++e;var t,n;if(this.expression.charAt(e)==="x")t=16,n=/^[0-9a-f]$/i,++e;else if(this.expression.charAt(e)==="b")t=2,n=/^[01]$/i,++e;else return!1;for(var r=!1,i=e;e<this.expression.length;){var o=this.expression.charAt(e);if(n.test(o))e++,r=!0;else break}return r&&(this.current=this.newToken(ri,parseInt(this.expression.substring(i,e),t)),this.pos=e),r};fe.prototype.isNumber=function(){for(var e=!1,t=this.pos,n=t,r=t,i=!1,o=!1,s;t<this.expression.length&&(s=this.expression.charAt(t),s>="0"&&s<="9"||!i&&s===".");)s==="."?i=!0:o=!0,t++,e=o;if(e&&(r=t),s==="e"||s==="E"){t++;for(var l=!0,a=!1;t<this.expression.length;){if(s=this.expression.charAt(t),l&&(s==="+"||s==="-"))l=!1;else if(s>="0"&&s<="9")a=!0,l=!1;else break;t++}a||(t=r)}return e?(this.current=this.newToken(ri,parseFloat(this.expression.substring(n,t))),this.pos=t):this.pos=r,e};fe.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if(t==="+"||t==="-"||t==="*"||t==="/"||t==="%"||t==="^"||t==="?"||t===":"||t===".")this.current=this.newToken(te,t);else if(t==="∙"||t==="•")this.current=this.newToken(te,"*");else if(t===">")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(te,">="),this.pos++):this.current=this.newToken(te,">");else if(t==="<")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(te,"<="),this.pos++):this.current=this.newToken(te,"<");else if(t==="|")if(this.expression.charAt(this.pos+1)==="|")this.current=this.newToken(te,"||"),this.pos++;else return!1;else if(t==="=")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(te,"=="),this.pos++):this.current=this.newToken(te,t);else if(t==="!")this.expression.charAt(this.pos+1)==="="?(this.current=this.newToken(te,"!="),this.pos++):this.current=this.newToken(te,t);else return!1;return this.pos++,this.isOperatorEnabled(this.current.value)?!0:(this.pos=e,!1)};fe.prototype.isOperatorEnabled=function(e){return this.parser.isOperatorEnabled(e)};fe.prototype.getCoordinates=function(){var e=0,t,n=-1;do e++,t=this.pos-n,n=this.expression.indexOf(`
|
|
17
|
+
`,n+1);while(n>=0&&n<this.pos);return{line:e,column:t}};fe.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)};function re(e,t,n){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=n.allowMemberAccess!==!1}re.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()};re.prototype.tokenMatches=function(e,t){return typeof t>"u"?!0:Array.isArray(t)?In(t,e.value):typeof t=="function"?t(e):e.value===t};re.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()};re.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken};re.prototype.accept=function(e,t){return this.nextToken.type===e&&this.tokenMatches(this.nextToken,t)?(this.next(),!0):!1};re.prototype.expect=function(e,t){if(!this.accept(e,t)){var n=this.tokens.getCoordinates();throw new Error("parse error ["+n.line+":"+n.column+"]: Expected "+(t||e))}};re.prototype.parseAtom=function(e){var t=this.tokens.unaryOps;function n(i){return i.value in t}if(this.accept(ao)||this.accept(te,n))e.push(new X(Gt,this.current.value));else if(this.accept(ri))e.push(new X(lt,this.current.value));else if(this.accept(Ks))e.push(new X(lt,this.current.value));else if(this.accept(zt,"("))this.parseExpression(e),this.expect(zt,")");else if(this.accept(qn,"["))if(this.accept(qn,"]"))e.push(new X(Un,0));else{var r=this.parseArrayList(e);e.push(new X(Un,r))}else throw new Error("unexpected "+this.nextToken)};re.prototype.parseExpression=function(e){var t=[];this.parseUntilEndStatement(e,t)||(this.parseVariableAssignmentExpression(t),!this.parseUntilEndStatement(e,t)&&this.pushExpression(e,t))};re.prototype.pushExpression=function(e,t){for(var n=0,r=t.length;n<r;n++)e.push(t[n])};re.prototype.parseUntilEndStatement=function(e,t){return this.accept(uo)?(this.nextToken&&this.nextToken.type!==wr&&!(this.nextToken.type===zt&&this.nextToken.value===")")&&t.push(new X(ti)),this.nextToken.type!==wr&&this.parseExpression(t),e.push(new X(qe,t)),!0):!1};re.prototype.parseArrayList=function(e){for(var t=0;!this.accept(qn,"]");)for(this.parseExpression(e),++t;this.accept(ii);)this.parseExpression(e),++t;return t};re.prototype.parseVariableAssignmentExpression=function(e){for(this.parseConditionalExpression(e);this.accept(te,"=");){var t=e.pop(),n=[],r=e.length-1;if(t.type===Bn){if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(var i=0,o=t.value+1;i<o;i++){var s=r-i;e[s].type===Gt&&(e[s]=new X(Mn,e[s].value))}this.parseVariableAssignmentExpression(n),e.push(new X(qe,n)),e.push(new X(ei,t.value));continue}if(t.type!==Gt&&t.type!==En)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(n),e.push(new X(Mn,t.value)),e.push(new X(qe,n)),e.push(jt("="))}};re.prototype.parseConditionalExpression=function(e){for(this.parseOrExpression(e);this.accept(te,"?");){var t=[],n=[];this.parseConditionalExpression(t),this.expect(te,":"),this.parseConditionalExpression(n),e.push(new X(qe,t)),e.push(new X(qe,n)),e.push(Us("?"))}};re.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(te,"or");){var t=[];this.parseAndExpression(t),e.push(new X(qe,t)),e.push(jt("or"))}};re.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(te,"and");){var t=[];this.parseComparison(t),e.push(new X(qe,t)),e.push(jt("and"))}};var Xu=["==","!=","<","<=",">=",">","in"];re.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(te,Xu);){var t=this.current;this.parseAddSub(e),e.push(jt(t.value))}};var Yu=["+","-","||"];re.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(te,Yu);){var t=this.current;this.parseTerm(e),e.push(jt(t.value))}};var Ju=["*","/","%"];re.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(te,Ju);){var t=this.current;this.parseFactor(e),e.push(jt(t.value))}};re.prototype.parseFactor=function(e){var t=this.tokens.unaryOps;function n(i){return i.value in t}if(this.save(),this.accept(te,n)){if(this.current.value!=="-"&&this.current.value!=="+"){if(this.nextToken.type===zt&&this.nextToken.value==="("){this.restore(),this.parseExponential(e);return}else if(this.nextToken.type===uo||this.nextToken.type===ii||this.nextToken.type===wr||this.nextToken.type===zt&&this.nextToken.value===")"){this.restore(),this.parseAtom(e);return}}var r=this.current;this.parseFactor(e),e.push(ni(r.value))}else this.parseExponential(e)};re.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(te,"^");)this.parseFactor(e),e.push(jt("^"))};re.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(te,"!");)e.push(ni("!"))};re.prototype.parseFunctionCall=function(e){var t=this.tokens.unaryOps;function n(o){return o.value in t}if(this.accept(te,n)){var r=this.current;this.parseAtom(e),e.push(ni(r.value))}else for(this.parseMemberExpression(e);this.accept(zt,"(");)if(this.accept(zt,")"))e.push(new X(Bn,0));else{var i=this.parseArgumentList(e);e.push(new X(Bn,i))}};re.prototype.parseArgumentList=function(e){for(var t=0;!this.accept(zt,")");)for(this.parseExpression(e),++t;this.accept(ii);)this.parseExpression(e),++t;return t};re.prototype.parseMemberExpression=function(e){for(this.parseAtom(e);this.accept(te,".")||this.accept(qn,"[");){var t=this.current;if(t.value==="."){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(ao),e.push(new X(En,this.current.value))}else if(t.value==="["){if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(e),this.expect(qn,"]"),e.push(jt("["))}else throw new Error("unexpected symbol: "+t.value)}};function Zu(e,t){return Number(e)+Number(t)}function Qu(e,t){return e-t}function ef(e,t){return e*t}function tf(e,t){return e/t}function nf(e,t){return e%t}function rf(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):""+e+t}function of(e,t){return e===t}function sf(e,t){return e!==t}function lf(e,t){return e>t}function af(e,t){return e<t}function uf(e,t){return e>=t}function ff(e,t){return e<=t}function cf(e,t){return!!(e&&t)}function df(e,t){return!!(e||t)}function pf(e,t){return In(t,e)}function hf(e){return(Math.exp(e)-Math.exp(-e))/2}function gf(e){return(Math.exp(e)+Math.exp(-e))/2}function vf(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function _f(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function mf(e){return Math.log(e+Math.sqrt(e*e-1))}function wf(e){return Math.log((1+e)/(1-e))/2}function ko(e){return Math.log(e)*Math.LOG10E}function Sf(e){return-e}function yf(e){return!e}function Cf(e){return e<0?Math.ceil(e):Math.floor(e)}function Rf(e){return Math.random()*(e||1)}function To(e){return fo(e+1)}function Mf(e){return isFinite(e)&&e===Math.round(e)}var Ef=4.7421875,Ci=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function fo(e){var t,n;if(Mf(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var r=e-2,i=e-1;r>1;)i*=r,r--;return i===0&&(i=1),i}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*fo(1-e));if(e>=171.35)return 1/0;if(e>85){var o=e*e,s=o*e,l=s*e,a=l*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*o)-139/(51840*s)-571/(2488320*l)+163879/(209018880*a)+5246819/(75246796800*a*e))}--e,n=Ci[0];for(var u=1;u<Ci.length;++u)n+=Ci[u]/(e+u);return t=e+Ef+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*n}function xf(e){return Array.isArray(e)?e.length:String(e).length}function $o(){for(var e=0,t=0,n=0;n<arguments.length;n++){var r=Math.abs(arguments[n]),i;t<r?(i=t/r,e=e*i*i+1,t=r):r>0?(i=r/t,e+=i*i):e+=r}return t===1/0?1/0:t*Math.sqrt(e)}function Vo(e,t,n){return e?t:n}function Af(e,t){return typeof t>"u"||+t==0?Math.round(e):(e=+e,t=-+t,isNaN(e)||!(typeof t=="number"&&t%1===0)?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}function Ff(e,t,n){return n&&(n[e]=t),t}function bf(e,t){return e[t|0]}function Pf(e){return arguments.length===1&&Array.isArray(e)?Math.max.apply(Math,e):Math.max.apply(Math,arguments)}function If(e){return arguments.length===1&&Array.isArray(e)?Math.min.apply(Math,e):Math.min.apply(Math,arguments)}function Of(e,t){if(typeof e!="function")throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(n,r){return e(n,r)})}function kf(e,t,n){if(typeof e!="function")throw new Error("First argument to fold is not a function");if(!Array.isArray(n))throw new Error("Second argument to fold is not an array");return n.reduce(function(r,i,o){return e(r,i,o)},t)}function Tf(e,t){if(typeof e!="function")throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(n,r){return e(n,r)})}function $f(e,t){if(!(Array.isArray(t)||typeof t=="string"))throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(e)}function Vf(e,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(e)}function Df(e){return(e>0)-(e<0)||+e}var Do=1/3;function Lf(e){return e<0?-Math.pow(-e,Do):Math.pow(e,Do)}function Nf(e){return Math.exp(e)-1}function Hf(e){return Math.log(1+e)}function Gf(e){return Math.log(e)/Math.LN2}function zf(e){if(!Array.isArray(e))throw new Error("Sum argument is not an array");return e.reduce(function(t,n){return t+Number(n)},0)}function xn(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||hf,cosh:Math.cosh||gf,tanh:Math.tanh||vf,asinh:Math.asinh||_f,acosh:Math.acosh||mf,atanh:Math.atanh||wf,sqrt:Math.sqrt,cbrt:Math.cbrt||Lf,log:Math.log,log2:Math.log2||Gf,ln:Math.log,lg:Math.log10||ko,log10:Math.log10||ko,expm1:Math.expm1||Nf,log1p:Math.log1p||Hf,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||Cf,"-":Sf,"+":Number,exp:Math.exp,not:yf,length:xf,"!":To,sign:Math.sign||Df},this.binaryOps={"+":Zu,"-":Qu,"*":ef,"/":tf,"%":nf,"^":Math.pow,"||":rf,"==":of,"!=":sf,">":lf,"<":af,">=":uf,"<=":ff,and:cf,or:df,in:pf,"=":Ff,"[":bf},this.ternaryOps={"?":Vo},this.functions={random:Rf,fac:To,min:If,max:Pf,hypot:Math.hypot||$o,pyt:Math.hypot||$o,pow:Math.pow,atan2:Math.atan2,if:Vo,gamma:fo,roundTo:Af,map:Of,fold:kf,filter:Tf,indexOf:$f,join:Vf,sum:zf},this.consts={E:Math.E,PI:Math.PI,true:!0,false:!1}}xn.prototype.parse=function(e){var t=[],n=new re(this,new fe(this,e),{allowMemberAccess:this.options.allowMemberAccess});return n.parseExpression(t),n.expect(wr,"EOF"),new mt(t,this)};xn.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var Xs=new xn;xn.parse=function(e){return Xs.parse(e)};xn.evaluate=function(e,t){return Xs.parse(e).evaluate(t)};var Lo={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};function jf(e){return Object.hasOwn(Lo,e)?Lo[e]:e}xn.prototype.isOperatorEnabled=function(e){var t=jf(e),n=this.options.operators||{};return!(t in n)||!!n[t]};var Bf=class{constructor(){Ne(this,"parser");this.parser=new xn({allowMemberAccess:!1,operators:{assignment:!1,fndef:!1}}),delete this.parser.functions.random}evaluate(e,t){let n;try{n=this.parser.parse(e)}catch(i){throw new Error(`Invalid formula: ${i instanceof Error?i.message:"parse error"}`)}let r;try{r=n.evaluate(t)}catch(i){throw new Error(`Formula evaluation failed: ${i instanceof Error?i.message:"error"}`)}if(typeof r!="number"||!Number.isFinite(r))throw new Error("Formula must evaluate to a finite number.");return r}},Uf=-2147483648,qf=2147483647;function Kf(e){const t=Wf(e);return{headers:t[0]??[],rows:t.slice(1)}}function Wf(e){const t=[];let n=[],r="",i=!1,o=0;const s=()=>{n.push(r),r=""},l=()=>{s(),t.push(n),n=[]};for(;o<e.length;){const a=e[o];if(i){if(a==='"'){if(e[o+1]==='"'){r+='"',o+=2;continue}i=!1,o+=1;continue}r+=a,o+=1;continue}if(a==='"'){i=!0,o+=1;continue}if(a===","){s(),o+=1;continue}if(a==="\r"){l(),o+=e[o+1]===`
|
|
18
|
+
`?2:1;continue}if(a===`
|
|
19
|
+
`){l(),o+=1;continue}r+=a,o+=1}if(i)throw new Error("Malformed CSV: unterminated quoted field.");return(r!==""||n.length>0)&&l(),t}function Xf(e){const t=JSON.parse(e);if(!Array.isArray(t))throw new Error("JSON import must be an array of objects.");const n=[],r=new Set;for(const o of t)if(No(o))for(const s of Object.keys(o))r.has(s)||(r.add(s),n.push(s));const i=t.map(o=>{const s=No(o)?o:{};return n.map(l=>Yf(s[l]))});return{headers:n,rows:i}}function No(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Yf(e){return e==null?"":typeof e=="object"?JSON.stringify(e):String(e)}var Jf=Object.assign(Object.create(null),{publish:"publish",published:"publish",draft:"draft",pending:"pending",private:"private",future:"future"});function Zf(e){const t=e.trim();return Jf[t.toLowerCase()]??t}function Qf(e,t){const n=[];for(const r of e.rows){const i={};let o;for(let s=0;s<t.length;s+=1){const l=t[s];if(!l||l.kind==="skip")continue;const a=r[s]??"";if(a!=="")switch(l.kind){case"title":i.title=a;break;case"status":i.status=Zf(a);break;case"menuOrder":{const u=Number(a);Number.isInteger(u)&&u>=Uf&&u<=qf&&(i.menuOrder=u);break}case"meta":if(l.key.trim()==="")break;o||(o=Object.create(null)),o[l.key]=a;break}}o!==void 0&&Object.keys(o).length>0?n.push({fields:i,meta:o}):Object.keys(i).length>0&&n.push({fields:i})}return n}const ec=new Bf,tc=-2147483648,nc=2147483647,Ho=1e3,Go=1e4;function rc(e,t){if(t.length>Ho)throw new Error(`Formula is too long (max ${Ho} characters).`);if(e.length>Go)throw new Error(`Too many rows for one formula (max ${Go}).`);const n=new Map;return e.forEach((r,i)=>{const o=ec.evaluate(t,{index:i+1,id:r.id,menuOrder:r.menuOrder}),s=Math.round(o);if(s<tc||s>nc)throw new Error(`menu_order result out of range: ${s}`);n.set(r.id,s)}),n}var ic=L('<p class="empty">No rows yet.</p>'),Ri=L('<span class="error"> </span>'),oc=L("<option></option>"),sc=L('<div class="meta-bar svelte-1tkndkt"><label>Custom field column <input list="dbp-meta-keys" placeholder="meta key, e.g. price"/></label> <datalist id="dbp-meta-keys"></datalist> <button>Add column</button></div>'),lc=L('<p class="restricted-note svelte-1tkndkt">Custom field editing needs the DBP WP Connector plugin. Standard fields are editable.</p>'),ac=L('<span class="confirm svelte-1tkndkt"> <button> </button> <button>Cancel</button></span>'),uc=L('<button class="col-action svelte-1tkndkt" title="Hide this column (keeps the data)">×</button> <button class="col-action danger svelte-1tkndkt" title="Delete this field from all rows">🗑</button>',1),fc=L('<th class="meta-col svelte-1tkndkt"><span class="meta-key"> </span> <!></th>'),cc=L('<td><input class="svelte-1tkndkt"/></td>'),dc=L('<tr><td> </td><td><input/></td><td><input type="number"/></td><!><td class="row-status"><!></td></tr>'),pc=L('<div class="sheet-toolbar"><button> </button> <!></div> <div class="formula-bar"><label>menu_order = <input placeholder="e.g. index * 10"/></label> <button>Apply to all rows</button> <span class="hint">cells: index, id, menuOrder (saved value)</span> <!></div> <!> <table class="sheet"><thead><tr><th>ID</th><th>Title</th><th>Menu order</th><!><th></th></tr></thead><tbody></tbody></table>',1);function hc(e,t){Xn(t,!0);let n=H(""),r=H(null),i=H(Be({})),o=H(Be({})),s=H(Be([])),l=H(""),a=H(!1),u=H(null),d=H(Be({})),g=H(null),f=H(!1);function c(C){return p(i)[C.id]??{title:C.title,menuOrder:C.menuOrder}}function v(C,b){p(i)[C.id]={...c(C),title:b}}function _(C,b){if(b.trim()==="")return;const P=Number(b);Number.isInteger(P)&&(p(i)[C.id]={...c(C),menuOrder:P})}const m=fn(()=>{const C=new Set;for(const b of t.posts){const P=b.dbpWpMeta;if(P)for(const G of Object.keys(P))G.startsWith("_")||C.add(G)}return[...C].sort()});function w(C,b){var G;const P=(G=C.dbpWpMeta)==null?void 0:G[b];return P==null?"":String(P)}function x(C,b){var P;return((P=p(o)[C.id])==null?void 0:P[b])??w(C,b)}function y(C,b,P){p(o)[C.id]={...p(o)[C.id],[b]:P}}function $(C,b){var G;const P=(G=p(o)[C.id])==null?void 0:G[b];return P!==void 0&&P!==w(C,b)}function V(){const C=p(l).trim();C!==""&&!p(s).includes(C)&&S(s,[...p(s),C],!0),S(l,"")}function se(C){S(s,p(s).filter(P=>P!==C),!0);const b={};for(const[P,G]of Object.entries(p(o))){const ve={};for(const[E,O]of Object.entries(G))E!==C&&(ve[E]=O);b[Number(P)]=ve}S(o,b,!0)}function ie(C){return t.posts.filter(b=>b.dbpWpMeta!==void 0&&Object.prototype.hasOwnProperty.call(b.dbpWpMeta,C))}function F(C){S(g,C,!0)}function ee(){S(g,null)}async function Q(C){if(p(f)||p(a))return;const b=ie(C);if(b.length===0){se(C),S(g,null);return}S(f,!0),S(u,null);try{const P=await qa(b.map(ve=>({id:ve.id,keys:[C]}))),G=P.filter(ve=>!ve.ok);G.length>0?S(u,`Delete failed for ${G.length} of ${P.length} row(s).`):se(C),S(g,null),await t.onsaved()}catch(P){S(u,P instanceof Error?P.message:String(P),!0)}finally{S(f,!1)}}function ae(C){const b=p(i)[C.id];return b!==void 0&&(b.title!==C.title||b.menuOrder!==C.menuOrder)||p(s).some(G=>$(C,G))}const Re=fn(()=>t.posts.filter(ae));function et(){if(p(n).trim()!==""){S(r,null);try{const C=rc(t.posts,p(n)),b={...p(i)};for(const P of t.posts){const G=C.get(P.id);G!==void 0&&(b[P.id]={...c(P),menuOrder:G})}S(i,b,!0)}catch(C){S(r,C instanceof Error?C.message:String(C),!0)}}}function Ot(){return p(Re).map(C=>{const b=c(C),P={id:C.id};b.title!==C.title&&(P.title=b.title),b.menuOrder!==C.menuOrder&&(P.menuOrder=b.menuOrder);const G={};for(const ve of p(s))$(C,ve)&&(G[ve]=x(C,ve));return Object.keys(G).length>0&&(P.meta=G),P})}async function kt(){S(a,!0),S(u,null),S(d,{},!0);try{const C=await Ba(Ot(),t.type),b={},P=[];for(const G of C)G.ok?P.push(G.id):b[G.id]=G.error??"Update failed";if(S(d,b,!0),P.length>0){const G={...p(i)},ve={...p(o)};for(const E of P)delete G[E],delete ve[E];S(i,G,!0),S(o,ve,!0),await t.onsaved()}}catch(C){S(u,C instanceof Error?C.message:String(C),!0)}finally{S(a,!1)}}var St=mr(),yt=at(St);{var Bt=C=>{var b=ic();A(C,b)},Fe=C=>{var b=pc(),P=at(b),G=R(P),ve=R(G),E=M(G,2);{var O=j=>{var B=Ri(),_e=R(B);W(()=>J(_e,p(u))),A(j,B)};ne(E,j=>{p(u)&&j(O)})}var z=M(P,2),q=R(z),oe=M(R(q)),de=M(q,2),be=M(de,4);{var Ut=j=>{var B=Ri(),_e=R(B);W(()=>J(_e,p(r))),A(j,B)};ne(be,j=>{p(r)&&j(Ut)})}var Oe=M(z,2);{var Ct=j=>{var B=sc(),_e=R(B),De=M(R(_e)),Me=M(_e,2);je(Me,20,()=>p(m),pe=>pe,(pe,Le)=>{var me=oc(),we={};W(()=>{we!==(we=Le)&&(me.value=(me.__value=Le)??"")}),A(pe,me)});var Ke=M(Me,2);W(pe=>{De.disabled=p(a),Ke.disabled=pe},[()=>p(a)||p(l).trim()===""]),le("keydown",De,pe=>pe.key==="Enter"&&V()),hr(De,()=>p(l),pe=>S(l,pe)),le("click",Ke,V),A(j,B)},on=j=>{var B=lc();A(j,B)};ne(Oe,j=>{t.connectorAvailable?j(Ct):j(on,-1)})}var er=M(Oe,2),sn=R(er),tr=R(sn),Ve=M(R(tr),3);je(Ve,16,()=>p(s),j=>j,(j,B)=>{var _e=fc(),De=R(_e),Me=R(De),Ke=M(De,2);{var pe=me=>{var we=ac(),We=R(we),Ee=M(We),Rt=R(Ee),Mt=M(Ee,2);W(he=>{J(We,`Delete “${B??""}” from ${he??""} row(s)? `),Ee.disabled=p(f),J(Rt,p(f)?"Deleting…":"Delete"),Mt.disabled=p(f)},[()=>ie(B).length]),le("click",Ee,()=>Q(B)),le("click",Mt,ee),A(me,we)},Le=me=>{var we=uc(),We=at(we),Ee=M(We,2);W(()=>{We.disabled=p(a)||p(f),Ee.disabled=p(a)||p(f)}),le("click",We,()=>se(B)),le("click",Ee,()=>F(B)),A(me,we)};ne(Ke,me=>{p(g)===B?me(pe):me(Le,-1)})}W(()=>J(Me,B)),A(j,_e)});var tt=M(sn);je(tt,21,()=>t.posts,j=>j.id,(j,B)=>{var _e=dc();let De;var Me=R(_e),Ke=R(Me),pe=M(Me),Le=R(pe),me=M(pe),we=R(me),We=M(me);je(We,16,()=>p(s),he=>he,(he,Et)=>{var Tt=cc();let ge;var Pe=R(Tt);W((Xe,ln)=>{ge=Pn(Tt,1,"svelte-1tkndkt",null,ge,Xe),ci(Pe,ln),Pe.disabled=p(a)},[()=>({"changed-cell":$(p(B),Et)}),()=>x(p(B),Et)]),le("input",Pe,Xe=>y(p(B),Et,Xe.currentTarget.value)),A(he,Tt)});var Ee=M(We),Rt=R(Ee);{var Mt=he=>{var Et=Ri(),Tt=R(Et);W(()=>J(Tt,p(d)[p(B).id])),A(he,Et)};ne(Rt,he=>{p(d)[p(B).id]&&he(Mt)})}W((he,Et,Tt)=>{De=Pn(_e,1,"",null,De,he),J(Ke,p(B).id),ci(Le,Et),Le.disabled=p(a),ci(we,Tt),we.disabled=p(a)},[()=>({changed:ae(p(B))}),()=>c(p(B)).title,()=>c(p(B)).menuOrder]),le("input",Le,he=>v(p(B),he.currentTarget.value)),le("input",we,he=>_(p(B),he.currentTarget.value)),A(j,_e)}),W(j=>{G.disabled=p(a)||p(f)||p(Re).length===0,J(ve,p(a)?"Saving…":`Save ${p(Re).length} change${p(Re).length===1?"":"s"}`),oe.disabled=p(a),de.disabled=j},[()=>p(a)||p(n).trim()===""]),le("click",G,kt),le("keydown",oe,j=>j.key==="Enter"&&et()),hr(oe,()=>p(n),j=>S(n,j)),le("click",de,et),A(C,b)};ne(yt,C=>{t.posts.length===0?C(Bt):C(Fe,-1)})}A(e,St),Yn()}Zr(["click","keydown","input"]);var gc=L('<span class="file-name svelte-1p0j61w"> </span>'),vc=L('<button class="link svelte-1p0j61w">Clear</button>'),zo=L('<p class="error"> </p>'),_c=L(`<p class="restricted-note svelte-1p0j61w">Restricted mode: custom fields (meta) need the DBP WP Connector plugin. Title, status, and
|
|
20
|
+
menu order still import.</p>`),mc=L('<p class="empty">No columns found in the file.</p>'),wc=L('<li class="svelte-1p0j61w"><span class="source-col svelte-1p0j61w"> </span> <span class="arrow svelte-1p0j61w">→</span> <select><option>Skip</option><option>Title</option><option>Status</option><option>Menu order</option><option> </option></select></li>'),Sc=L('<p class="hint svelte-1p0j61w">Map at least one column to import.</p>'),yc=L("<th> </th>"),Cc=L("<td> </td>"),Rc=L("<tr></tr>"),Mc=L('<p class="hint svelte-1p0j61w"></p>'),Ec=L('<span class="hint svelte-1p0j61w"> </span>'),jo=L('<span class="error"> </span>'),xc=L('<div class="preview"><h3> </h3> <div class="table-wrap svelte-1p0j61w"><table class="sheet"><thead><tr></tr></thead><tbody></tbody></table></div> <!></div> <div class="actions svelte-1p0j61w"><button> </button> <!> <!></div>',1),Ac=L('<div class="mapping"><h3>Map columns</h3> <ul class="column-list svelte-1p0j61w"></ul></div> <!> <!>',1),Fc=L('<li class="error"> </li>'),bc=L('<ul class="error-list svelte-1p0j61w"></ul>'),Pc=L('<div class="summary"><p> <!></p> <!></div>'),Ic=L('<div class="import-view svelte-1p0j61w"><div class="step svelte-1p0j61w"><p>Import new posts from a CSV or JSON file into <code> </code>.</p> <input type="file" accept=".csv,.json,text/csv,application/json"/> <!> <!></div> <!> <!> <!> <!></div>');function Oc(e,t){Xn(t,!0);const n=500,r=20;let i=H(null),o=H(null),s=H(Be([])),l=H(null),a=H(!1),u=H(null),d=H(null),g=H(null);function f(E){const O=E.trim().toLowerCase();return O==="title"?{kind:"title"}:O==="status"?{kind:"status"}:O==="menu_order"||O==="menuorder"||O==="order"?{kind:"menuOrder"}:{kind:"skip"}}async function c(E){var q;const z=(q=E.currentTarget.files)==null?void 0:q[0];if(z){S(l,null),S(g,null),S(d,null);try{const oe=await z.text(),be=z.name.toLowerCase().endsWith(".json")||z.type.includes("json")?Xf(oe):Kf(oe);S(i,z.name,!0),S(o,be,!0),S(s,be.headers.map(f),!0)}catch(oe){S(o,null),S(s,[],!0),S(i,z.name,!0),S(l,oe instanceof Error?oe.message:"Could not parse the file.",!0)}}}function v(E,O){var oe;const z=((oe=p(o))==null?void 0:oe.headers[E])??"";let q;switch(O){case"title":q={kind:"title"};break;case"status":q={kind:"status"};break;case"menuOrder":q={kind:"menuOrder"};break;case"meta":q={kind:"meta",key:z};break;default:q={kind:"skip"}}p(s)[E]=q,S(s,[...p(s)],!0)}function _(E){switch(E.kind){case"title":case"status":case"menuOrder":return E.kind;case"meta":return`meta:${E.key}`;default:return null}}function m(E){switch(E.kind){case"title":return"Title";case"status":return"Status";case"menuOrder":return"Menu order";case"meta":return`Custom: ${E.key}`;default:return""}}const w=fn(()=>{const E=new Map;for(const O of p(s)){const z=_(O);z&&E.set(z,(E.get(z)??0)+1)}return[...E.entries()].filter(([,O])=>O>1).map(([O])=>O)}),x=fn(()=>p(s).flatMap((E,O)=>E.kind==="skip"?[]:[{col:O,target:E}])),y=fn(()=>p(o)?Qf(p(o),p(s)):[]),$=fn(()=>!p(a)&&p(y).length>0&&p(w).length===0&&p(x).length>0);function V(){S(o,null),S(s,[],!0),S(i,null),S(l,null),S(g,null),S(d,null)}async function se(){if(!p($))return;S(a,!0),S(d,null),S(g,null);const E=p(y).map(q=>({...q.fields,...q.meta?{meta:q.meta}:{}}));let O=0;const z=[];try{for(let q=0;q<E.length;q+=n){const oe=await Ua(E.slice(q,q+n),t.type);for(const de of oe)de.ok?O+=1:z.push(de.error??"Create failed");S(u,{done:Math.min(q+n,E.length),total:E.length},!0)}S(g,{created:O,failed:z.length,errors:z.slice(0,10)},!0),O>0&&await t.onimported()}catch(q){S(d,q instanceof Error?q.message:String(q),!0),(O>0||z.length>0)&&S(g,{created:O,failed:z.length,errors:z.slice(0,10)},!0),O>0&&await t.onimported()}finally{S(a,!1),S(u,null)}}var ie=Ic(),F=R(ie),ee=R(F),Q=M(R(ee)),ae=R(Q),Re=M(ee,2),et=M(Re,2);{var Ot=E=>{var O=gc(),z=R(O);W(()=>J(z,p(i))),A(E,O)};ne(et,E=>{p(i)&&E(Ot)})}var kt=M(et,2);{var St=E=>{var O=vc();W(()=>O.disabled=p(a)),le("click",O,V),A(E,O)};ne(kt,E=>{p(o)&&E(St)})}var yt=M(F,2);{var Bt=E=>{var O=zo(),z=R(O);W(()=>J(z,p(l))),A(E,O)};ne(yt,E=>{p(l)&&E(Bt)})}var Fe=M(yt,2);{var C=E=>{var O=_c();A(E,O)};ne(Fe,E=>{t.connectorAvailable||E(C)})}var b=M(Fe,2);{var P=E=>{var O=mr(),z=at(O);{var q=de=>{var be=mc();A(de,be)},oe=de=>{var be=Ac(),Ut=at(be),Oe=M(R(Ut),2);je(Oe,21,()=>p(o).headers,fi,(Ve,tt,j)=>{var B=wc(),_e=R(B),De=R(_e),Me=M(_e,4),Ke=R(Me);Ke.value=Ke.__value="skip";var pe=M(Ke);pe.value=pe.__value="title";var Le=M(pe);Le.value=Le.__value="status";var me=M(Le);me.value=me.__value="menuOrder";var we=M(me),We=R(we);we.value=we.__value="meta";var Ee;Ts(Me),W(()=>{var Rt,Mt,he;Ta(_e,"title",p(tt)),J(De,p(tt)||"(empty header)"),Me.disabled=p(a),we.disabled=!t.connectorAvailable,J(We,`Custom field${t.connectorAvailable?"":" (needs connector)"}`),Ee!==(Ee=((Rt=p(s)[j])==null?void 0:Rt.kind)??"skip")&&(Me.value=(Me.__value=((Mt=p(s)[j])==null?void 0:Mt.kind)??"skip")??"",eo(Me,((he=p(s)[j])==null?void 0:he.kind)??"skip"))}),le("change",Me,Rt=>v(j,Rt.currentTarget.value)),A(Ve,B)});var Ct=M(Ut,2);{var on=Ve=>{var tt=zo(),j=R(tt);W(B=>J(j,`Each target can be mapped only once. Conflicting: ${B??""}.`),[()=>p(w).join(", ")]),A(Ve,tt)};ne(Ct,Ve=>{p(w).length>0&&Ve(on)})}var er=M(Ct,2);{var sn=Ve=>{var tt=Sc();A(Ve,tt)},tr=Ve=>{var tt=xc(),j=at(tt),B=R(j),_e=R(B),De=M(B,2),Me=R(De),Ke=R(Me),pe=R(Ke);je(pe,21,()=>p(x),ge=>ge.col,(ge,Pe)=>{var Xe=yc(),ln=R(Xe);W(oi=>J(ln,oi),[()=>m(p(Pe).target)]),A(ge,Xe)});var Le=M(Ke);je(Le,21,()=>p(o).rows.slice(0,r),fi,(ge,Pe)=>{var Xe=Rc();je(Xe,21,()=>p(x),ln=>ln.col,(ln,oi)=>{var co=Cc(),Js=R(co);W(()=>J(Js,p(Pe)[p(oi).col]??"")),A(ln,co)}),A(ge,Xe)});var me=M(De,2);{var we=ge=>{var Pe=Mc();Pe.textContent="Showing the first 20 rows.",A(ge,Pe)};ne(me,ge=>{p(o).rows.length>r&&ge(we)})}var We=M(j,2),Ee=R(We),Rt=R(Ee),Mt=M(Ee,2);{var he=ge=>{var Pe=Ec(),Xe=R(Pe);W(()=>J(Xe,`${p(u).done??""} / ${p(u).total??""}`)),A(ge,Pe)};ne(Mt,ge=>{p(u)&&ge(he)})}var Et=M(Mt,2);{var Tt=ge=>{var Pe=jo(),Xe=R(Pe);W(()=>J(Xe,p(d))),A(ge,Pe)};ne(Et,ge=>{p(d)&&ge(Tt)})}W(()=>{J(_e,`Preview — ${p(y).length??""} post${p(y).length===1?"":"s"} from ${p(o).rows.length??""} row${p(o).rows.length===1?"":"s"}`),Ee.disabled=!p($),J(Rt,p(a)?"Importing…":`Import ${p(y).length} post${p(y).length===1?"":"s"}`)}),le("click",Ee,se),A(Ve,tt)};ne(er,Ve=>{p(x).length===0?Ve(sn):Ve(tr,-1)})}A(de,be)};ne(z,de=>{p(o).headers.length===0?de(q):de(oe,-1)})}A(E,O)};ne(b,E=>{p(o)&&E(P)})}var G=M(b,2);{var ve=E=>{var O=Pc(),z=R(O),q=R(z),oe=M(q);{var de=Oe=>{var Ct=jo(),on=R(Ct);W(()=>J(on,`${p(g).failed??""} failed.`)),A(Oe,Ct)};ne(oe,Oe=>{p(g).failed>0&&Oe(de)})}var be=M(z,2);{var Ut=Oe=>{var Ct=bc();je(Ct,21,()=>p(g).errors,fi,(on,er)=>{var sn=Fc(),tr=R(sn);W(()=>J(tr,p(er))),A(on,sn)}),A(Oe,Ct)};ne(be,Oe=>{p(g).errors.length>0&&Oe(Ut)})}W(()=>J(q,`Created ${p(g).created??""} post${p(g).created===1?"":"s"}. `)),A(E,O)};ne(G,E=>{p(g)&&E(ve)})}W(()=>J(ae,t.type)),le("change",Re,c),A(e,ie),Yn()}Zr(["change","click"]);var kc=L("<option> </option>"),Tc=L('<label class="type-select">Type <select></select></label>'),$c=L('<nav><button>Table</button> <button>Spreadsheet</button> <button>Import</button></nav> <!> <span class="conn"> <span> </span> <button>Disconnect</button></span>',1),Vc=L("<p>Loading…</p>"),Dc=L('<p class="error"> </p> <button>Retry</button>',1),Lc=L("<header><h1>DBP WP</h1> <!></header> <main><!></main>",1);function Nc(e,t){Xn(t,!0);let n=H("table"),r=H(Be({connected:!1,siteUrl:null,connectorAvailable:!1})),i=H(Be([])),o=H(Be([])),s=H("posts"),l=H(!0),a=H(null);async function u(){S(l,!0),S(a,null);try{if(S(r,await Ga(),!0),p(r).connected){if(p(o).length===0)try{S(o,await Ha(),!0)}catch{}const F=await Na({type:p(s)});F.unconfigured?(S(r,{connected:!1,siteUrl:null,connectorAvailable:!1},!0),S(i,[],!0),S(o,[],!0),S(s,"posts")):S(i,F.posts,!0)}else S(i,[],!0),S(o,[],!0),S(s,"posts")}catch(F){S(a,F instanceof Error?F.message:String(F),!0)}finally{S(l,!1)}}async function d(F){F!==p(s)&&(S(s,F,!0),await u())}async function g(){try{await ja()}catch(F){S(a,F instanceof Error?F.message:String(F),!0)}await u()}Va(()=>{u()});var f=Lc(),c=at(f),v=M(R(c),2);{var _=F=>{var ee=$c(),Q=at(ee),ae=R(Q);let Re;var et=M(ae,2);let Ot;var kt=M(et,2);let St;var yt=M(Q,2);{var Bt=E=>{var O=Tc(),z=M(R(O));je(z,21,()=>p(o),oe=>oe.restBase,(oe,de)=>{var be=kc(),Ut=R(be),Oe={};W(()=>{J(Ut,p(de).name),Oe!==(Oe=p(de).restBase)&&(be.value=(be.__value=p(de).restBase)??"")}),A(oe,be)});var q;Ts(z),W(()=>{z.disabled=p(l),q!==(q=p(s))&&(z.value=(z.__value=p(s))??"",eo(z,p(s)))}),le("change",z,oe=>d(oe.currentTarget.value)),A(E,O)};ne(yt,E=>{p(o).length>0&&E(Bt)})}var Fe=M(yt,2),C=R(Fe),b=M(C);let P;var G=R(b),ve=M(b,2);W(()=>{Re=Pn(ae,1,"",null,Re,{active:p(n)==="table"}),Ot=Pn(et,1,"",null,Ot,{active:p(n)==="spreadsheet"}),St=Pn(kt,1,"",null,St,{active:p(n)==="import"}),J(C,`${p(r).siteUrl??""} `),P=Pn(b,1,"connector-badge",null,P,{restricted:!p(r).connectorAvailable}),J(G,p(r).connectorAvailable?"Connector: active":"Restricted mode")}),le("click",ae,()=>S(n,"table")),le("click",et,()=>S(n,"spreadsheet")),le("click",kt,()=>S(n,"import")),le("click",ve,g),A(F,ee)};ne(v,F=>{p(r).connected&&F(_)})}var m=M(c,2),w=R(m);{var x=F=>{var ee=Vc();A(F,ee)},y=F=>{var ee=Dc(),Q=at(ee),ae=R(Q),Re=M(Q,2);W(()=>J(ae,p(a))),le("click",Re,u),A(F,ee)},$=F=>{Xa(F,{onconnected:u})},V=F=>{qu(F,{get posts(){return p(i)}})},se=F=>{var ee=mr(),Q=at(ee);Mo(Q,()=>p(s),ae=>{hc(ae,{get posts(){return p(i)},get type(){return p(s)},get connectorAvailable(){return p(r).connectorAvailable},onsaved:u})}),A(F,ee)},ie=F=>{var ee=mr(),Q=at(ee);Mo(Q,()=>p(s),ae=>{Oc(ae,{get type(){return p(s)},get connectorAvailable(){return p(r).connectorAvailable},onimported:u})}),A(F,ee)};ne(w,F=>{p(l)?F(x):p(a)?F(y,1):p(r).connected?p(n)==="table"?F(V,3):p(n)==="spreadsheet"?F(se,4):F(ie,-1):F($,2)})}A(e,f),Yn()}Zr(["click","change"]);const Ys=document.getElementById("app");if(!Ys)throw new Error("Root element #app was not found.");Ra(Nc,{target:Ys});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.meta-bar.svelte-1tkndkt{display:flex;align-items:center;gap:.5rem;margin:.5rem 0}.restricted-note.svelte-1tkndkt{margin:.5rem 0;font-size:.85rem;opacity:.75}.meta-col.svelte-1tkndkt{white-space:nowrap}.col-action.svelte-1tkndkt{margin-left:.25rem;padding:0 .35rem;line-height:1;cursor:pointer}.col-action.danger.svelte-1tkndkt{color:#b00020}.confirm.svelte-1tkndkt{margin-left:.5rem;font-weight:400;font-size:.85rem}.changed-cell.svelte-1tkndkt input:where(.svelte-1tkndkt){background:#ffd7002e}.import-view.svelte-1p0j61w{display:flex;flex-direction:column;gap:1rem}.step.svelte-1p0j61w{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.file-name.svelte-1p0j61w{font-size:.85rem;opacity:.8}.link.svelte-1p0j61w{background:none;border:none;text-decoration:underline;cursor:pointer;padding:0}.restricted-note.svelte-1p0j61w{margin:0;font-size:.85rem;opacity:.75}.column-list.svelte-1p0j61w{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.35rem}.column-list.svelte-1p0j61w li:where(.svelte-1p0j61w){display:flex;align-items:center;gap:.5rem}.source-col.svelte-1p0j61w{min-width:12rem;max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:monospace}.arrow.svelte-1p0j61w{opacity:.5}.table-wrap.svelte-1p0j61w{overflow-x:auto}.actions.svelte-1p0j61w{display:flex;align-items:center;gap:.75rem}.hint.svelte-1p0j61w{font-size:.85rem;opacity:.7}.error-list.svelte-1p0j61w{margin:.25rem 0 0;padding-left:1.25rem;font-size:.85rem}:root{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color-scheme:light dark}body{margin:0;padding:0}header{display:flex;align-items:baseline;gap:1.5rem;padding:.75rem 1rem;border-bottom:1px solid color-mix(in srgb,currentColor 20%,transparent)}header h1{font-size:1.1rem;margin:0}nav button{font:inherit;padding:.35rem .75rem;margin-right:.25rem;border:1px solid color-mix(in srgb,currentColor 25%,transparent);border-radius:6px;background:transparent;cursor:pointer}nav button.active{background:color-mix(in srgb,currentColor 12%,transparent);font-weight:600}header .conn{margin-left:auto;font-size:.85rem;display:inline-flex;align-items:center;gap:.5rem}main{padding:1rem}form.connect{display:flex;flex-direction:column;gap:.75rem;max-width:28rem}form.connect h2{margin:0;font-size:1rem}form.connect label{display:flex;flex-direction:column;gap:.25rem;font-size:.9rem}form.connect input{font:inherit;padding:.4rem .5rem;border:1px solid color-mix(in srgb,currentColor 30%,transparent);border-radius:6px;background:transparent}form.connect button{font:inherit;align-self:flex-start;padding:.45rem 1rem;border:1px solid color-mix(in srgb,currentColor 30%,transparent);border-radius:6px;background:color-mix(in srgb,currentColor 10%,transparent);cursor:pointer}form.connect button:disabled{cursor:progress;opacity:.6}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:.4rem .6rem;border-bottom:1px solid color-mix(in srgb,currentColor 15%,transparent)}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}.sheet input{width:100%;font:inherit;padding:.2rem .3rem;box-sizing:border-box}.sheet-toolbar{display:flex;align-items:center;gap:.75rem;margin-bottom:.75rem}.sheet-toolbar button{font:inherit;padding:.4rem .9rem;border:1px solid color-mix(in srgb,currentColor 30%,transparent);border-radius:6px;background:color-mix(in srgb,currentColor 10%,transparent);cursor:pointer}.sheet-toolbar button:disabled{cursor:default;opacity:.5}.formula-bar{display:flex;align-items:center;gap:.6rem;margin-bottom:.75rem;flex-wrap:wrap}.formula-bar label{display:inline-flex;align-items:center;gap:.35rem;font-family:ui-monospace,monospace;font-size:.85rem}.formula-bar input{font:inherit;padding:.25rem .4rem;min-width:12rem;border:1px solid color-mix(in srgb,currentColor 30%,transparent);border-radius:6px;background:transparent}.formula-bar button{font:inherit;padding:.3rem .7rem;border:1px solid color-mix(in srgb,currentColor 30%,transparent);border-radius:6px;background:transparent;cursor:pointer}.formula-bar button:disabled{opacity:.5;cursor:default}.formula-bar .hint{font-size:.78rem;color:color-mix(in srgb,currentColor 60%,transparent)}.sheet tr.changed td{background:color-mix(in srgb,#f1c40f 18%,transparent)}.row-status .error{font-size:.8rem}.notice{color:color-mix(in srgb,currentColor 70%,transparent);font-size:.9rem}.error{color:#c0392b}.empty{color:color-mix(in srgb,currentColor 60%,transparent)}
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>DBP WP</title>
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-BoutbZPC.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Cjcwkjv9.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dbp-wp/ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "DBP WP web UI: table view and spreadsheet (Svelte 5 SPA). Served by the dbp-wp CLI.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "Takashi Matsuyama",
|
|
7
|
+
"homepage": "https://wp.dbp.jp",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/takashi-matsuyama/dbp_wp.git",
|
|
11
|
+
"directory": "packages/ui"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/takashi-matsuyama/dbp_wp/issues"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": "./package.json",
|
|
22
|
+
"./dist/*": "./dist/*"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"dev": "vite",
|
|
29
|
+
"build": "vite build",
|
|
30
|
+
"preview": "vite preview",
|
|
31
|
+
"typecheck": "svelte-check --tsconfig ./tsconfig.json"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@dbp-wp/core": "0.1.0",
|
|
35
|
+
"@tanstack/table-core": "^8.20.5",
|
|
36
|
+
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
37
|
+
"svelte": "^5.1.0",
|
|
38
|
+
"svelte-check": "^4.0.0",
|
|
39
|
+
"vite": "^5.4.0"
|
|
40
|
+
}
|
|
41
|
+
}
|