@htmlbricks/hb-form-composer 0.65.22 → 0.66.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/main.iife.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(Zt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const or=1,ar=2,fr=16,ur=1,cr=4,dr=8,hr=16,vr=1,_r=2,Qt="[",nt="[!",xt="]",Pe={},N=Symbol(),pr="http://www.w3.org/1999/xhtml",Tt=!1;var en=Array.isArray,br=Array.prototype.indexOf,St=Array.from,rt=Object.keys,it=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyDescriptors,gr=Object.prototype,yr=Array.prototype,tn=Object.getPrototypeOf,nn=Object.isExtensible;function wr(e){for(var t=0;t<e.length;t++)e[t]()}function rn(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}const C=2,kt=4,Ct=8,fe=16,ue=32,pe=64,st=128,Q=512,O=1024,q=2048,ce=4096,B=8192,de=16384,lt=32768,Me=65536,sn=1<<17,ln=1<<18,Se=1<<19,$r=1<<20,ke=32768,At=1<<21,Nt=1<<22,be=1<<23,ot=Symbol("$state"),on=Symbol("legacy props"),Er=Symbol(""),De=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ot=3,Ie=8;function xr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Tr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Sr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function kr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Cr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ar(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Nr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Or(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Rr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Lr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Pr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Mr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function at(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Dr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let g=!1;function ee(e){g=e}let y;function H(e){if(e===null)throw at(),Pe;return y=e}function ft(){return H(se(y))}function an(e){if(g){if(se(y)!==null)throw at(),Pe;y=e}}function Ir(e=1){if(g){for(var t=e,n=y;t--;)n=se(n);y=n}}function ut(e=!0){for(var t=0,n=y;;){if(n.nodeType===Ie){var r=n.data;if(r===xt){if(t===0)return n;t-=1}else(r===Qt||r===nt)&&(t+=1)}var s=se(n);e&&n.remove(),n=s}}function fn(e){if(!e||e.nodeType!==Ie)throw at(),Pe;return e.data}function un(e){return e===this.v}function Fr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function cn(e){return!Fr(e,this.v)}let qr=!1,V=null;function Fe(e){V=e}function dn(e,t=!1,n){V={p:V,i:!1,c:null,e:null,s:e,x:null,l:null}}function hn(e){var t=V,n=t.e;if(n!==null){t.e=null;for(var r of n)Dn(r)}return e!==void 0&&(t.x=e),t.i=!0,V=t.p,e??{}}function vn(){return!0}let Ce=[];function _n(){var e=Ce;Ce=[],wr(e)}function ct(e){if(Ce.length===0&&!Ye){var t=Ce;queueMicrotask(()=>{t===Ce&&_n()})}Ce.push(e)}function jr(){for(;Ce.length>0;)_n()}function pn(e){var t=m;if(t===null)return p.f|=be,e;if((t.f&lt)===0){if((t.f&st)===0)throw e;t.b.error(e)}else qe(e,t)}function qe(e,t){for(;t!==null;){if((t.f&st)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const dt=new Set;let S=null,J=null,z=[],ht=null,Rt=!1,Ye=!1;class te{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#n=0;#r=0;#a=null;#s=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#r>0}process(t){z=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#l(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#o(n.effects),this.#o(n.render_effects),this.#o(n.block_effects)):(S=null,mn(n.render_effects),mn(n.effects),this.#a?.resolve()),J=null}#l(t,n){t.f^=O;for(var r=t.first;r!==null;){var s=r.f,i=(s&(ue|pe))!==0,o=i&&(s&O)!==0,l=o||(s&B)!==0||this.skipped_effects.has(r);if((r.f&st)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&r.fn!==null){i?r.f^=O:(s&kt)!==0?n.effects.push(r):Ke(r)&&((r.f&fe)!==0&&n.block_effects.push(r),Xe(r));var f=r.first;if(f!==null){r=f;continue}}var a=r.parent;for(r=r.next;r===null&&a!==null;)a===n.effect&&(this.#o(n.effects),this.#o(n.render_effects),this.#o(n.block_effects),n=n.parent),r=a.next,a=a.parent}}#o(t){for(const n of t)((n.f&q)!==0?this.#s:this.#i).push(n),this.#f(n.deps),P(n,O)}#f(t){if(t!==null)for(const n of t)(n.f&C)===0||(n.f&ke)===0||(n.f^=ke,this.#f(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&be)===0&&(this.current.set(t,t.v),J?.set(t,t.v))}activate(){S=this,this.apply()}deactivate(){S===this&&(S=null,J=null)}flush(){if(this.activate(),z.length>0){if(bn(),S!==null&&S!==this)return}else this.#n===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#u(){if(this.#r===0){for(const t of this.#t)t();this.#t.clear()}this.#n===0&&this.#c()}#c(){if(dt.size>1){this.previous.clear();var t=J,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of dt){if(i===this){n=!1;continue}const o=[];for(const[f,a]of this.current){if(i.current.has(f))if(n&&a!==i.current.get(f))i.current.set(f,a);else continue;o.push(f)}if(o.length===0)continue;const l=[...i.current.keys()].filter(f=>!this.current.has(f));if(l.length>0){var s=z;z=[];const f=new Set,a=new Map;for(const u of o)gn(u,l,f,a);if(z.length>0){S=i,i.apply();for(const u of z)i.#l(u,r);i.deactivate()}z=s}}S=null,J=t}this.committed=!0,dt.delete(this)}increment(t){this.#n+=1,t&&(this.#r+=1)}decrement(t){this.#n-=1,t&&(this.#r-=1),this.revive()}revive(){for(const t of this.#s)P(t,q),Ae(t);for(const t of this.#i)P(t,ce),Ae(t);this.#s=[],this.#i=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=rn()).promise}static ensure(){if(S===null){const t=S=new te;dt.add(S),Ye||te.enqueue(()=>{S===t&&t.flush()})}return S}static enqueue(t){ct(t)}apply(){}}function vt(e){var t=Ye;Ye=!0;try{for(var n;;){if(jr(),z.length===0&&(S?.flush(),z.length===0))return ht=null,n;bn()}}finally{Ye=t}}function bn(){var e=ye;Rt=!0;var t=null;try{var n=0;for(mt(!0);z.length>0;){var r=te.ensure();if(n++>1e3){var s,i;Br()}r.process(z),me.clear()}}finally{Rt=!1,mt(e),ht=null}}function Br(){try{Ar()}catch(e){qe(e,ht)}}let he=null;function mn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(de|B))===0&&Ke(r)&&(he=new Set,Xe(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?jn(r):r.fn=null),he?.size>0)){me.clear();for(const s of he){if((s.f&(de|B))!==0)continue;const i=[s];let o=s.parent;for(;o!==null;)he.has(o)&&(he.delete(o),i.push(o)),o=o.parent;for(let l=i.length-1;l>=0;l--){const f=i[l];(f.f&(de|B))===0&&Xe(f)}}he.clear()}}he=null}}function gn(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&C)!==0?gn(s,t,n,r):(i&(Nt|fe))!==0&&(i&q)===0&&yn(s,t,r)&&(P(s,q),Ae(s))}}function yn(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&C)!==0&&yn(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Ae(e){for(var t=ht=e;t.parent!==null;){t=t.parent;var n=t.f;if(Rt&&t===m&&(n&fe)!==0&&(n&ln)===0)return;if((n&(pe|ue))!==0){if((n&O)===0)return;t.f^=O}}z.push(t)}function Hr(e){let t=0,n=Ne(0),r;return()=>{bt()&&(b(n),In(()=>(t===0&&(r=Vt(()=>e(()=>ze(n)))),t+=1,()=>{ct(()=>{t-=1,t===0&&(r?.(),r=void 0,ze(n))})})))}}var Vr=Me|Se|st;function Ur(e,t,n){new Yr(e,t,n)}class Yr{parent;#t=!1;#e;#n=g?y:null;#r;#a;#s;#i=null;#l=null;#o=null;#f=null;#u=null;#c=0;#d=0;#v=!1;#h=null;#g=Hr(()=>(this.#h=Ne(this.#c),()=>{this.#h=null}));constructor(t,n,r){this.#e=t,this.#r=n,this.#a=r,this.parent=m.b,this.#t=!!this.#r.pending,this.#s=jt(()=>{if(m.b=this,g){const i=this.#n;ft(),i.nodeType===Ie&&i.data===nt?this.#w():this.#y()}else{var s=this.#b();try{this.#i=G(()=>r(s))}catch(i){this.error(i)}this.#d>0?this.#p():this.#t=!1}return()=>{this.#u?.remove()}},Vr),g&&(this.#e=y)}#y(){try{this.#i=G(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#w(){const t=this.#r.pending;t&&(this.#l=G(()=>t(this.#e)),te.enqueue(()=>{var n=this.#b();this.#i=this.#_(()=>(te.ensure(),G(()=>this.#a(n)))),this.#d>0?this.#p():(Be(this.#l,()=>{this.#l=null}),this.#t=!1)}))}#b(){var t=this.#e;return this.#t&&(this.#u=W(),this.#e.before(this.#u),t=this.#u),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#_(t){var n=m,r=p,s=V;K(this.#s),L(this.#s),Fe(this.#s.ctx);try{return t()}catch(i){return pn(i),null}finally{K(n),L(r),Fe(s)}}#p(){const t=this.#r.pending;this.#i!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),Vn(this.#i,this.#f)),this.#l===null&&(this.#l=G(()=>t(this.#e)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#d+=t,this.#d===0&&(this.#t=!1,this.#l&&Be(this.#l,()=>{this.#l=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t){this.#m(t),this.#c+=t,this.#h&&Je(this.#h,this.#c)}get_effect_pending(){return this.#g(),b(this.#h)}error(t){var n=this.#r.onerror;let r=this.#r.failed;if(this.#v||!n&&!r)throw t;this.#i&&(D(this.#i),this.#i=null),this.#l&&(D(this.#l),this.#l=null),this.#o&&(D(this.#o),this.#o=null),g&&(H(this.#n),Ir(),H(ut()));var s=!1,i=!1;const o=()=>{if(s){Dr();return}s=!0,i&&Mr(),te.ensure(),this.#c=0,this.#o!==null&&Be(this.#o,()=>{this.#o=null}),this.#t=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#v=!1,G(()=>this.#a(this.#e)))),this.#d>0?this.#p():this.#t=!1};var l=p;try{L(null),i=!0,n?.(t,o),i=!1}catch(f){qe(f,this.#s&&this.#s.parent)}finally{L(l)}r&&ct(()=>{this.#o=this.#_(()=>{te.ensure(),this.#v=!0;try{return G(()=>{r(this.#e,()=>t,()=>o)})}catch(f){return qe(f,this.#s.parent),null}finally{this.#v=!1}})})}}function Jr(e,t,n){for(var r=[],s=t.length,i=0;i<s;i++)Bt(t[i].e,r,!0);Bn(r,()=>{var o=r.length===0&&n!==null;if(o){var l=n,f=l.parentNode;Rn(f),f.append(l),e.items.clear(),ie(e,t[0].prev,t[s-1].next)}for(var a=0;a<s;a++){var u=t[a];o||(e.items.delete(u.k),ie(e,u.prev,u.next)),D(u.e,!o)}e.first===t[0]&&(e.first=t[0].prev)})}function zr(e,t,n,r,s,i=null){var o=e,l=new Map,f=null;g&&ft();var a=null,u=wn(()=>{var $=n();return en($)?$:$==null?[]:St($)}),d,c=!0;function h(){Wr(x,d,o,t,r),a!==null&&(d.length===0?(a.fragment?(o.before(a.fragment),a.fragment=null):Ht(a.effect),v.first=a.effect):Be(a.effect,()=>{a=null}))}var v=jt(()=>{d=b(u);var $=d.length;let F=!1;if(g){var E=fn(o)===nt;E!==($===0)&&(o=ut(),H(o),ee(!1),F=!0)}for(var Y=new Set,T=S,ne=null,Ve=Ln(),re=0;re<$;re+=1){g&&y.nodeType===Ie&&y.data===xt&&(o=y,F=!0,ee(!1));var et=d[re],Ue=r(et,re),Z=c?null:l.get(Ue);Z?(Je(Z.v,et),Z.i=re,Ve&&T.skipped_effects.delete(Z.e)):(Z=Gr(c?o:null,ne,et,Ue,re,s,t,n),c&&(Z.o=!0,ne===null?f=Z:ne.next=Z,ne=Z),l.set(Ue,Z)),Y.add(Ue)}if($===0&&i&&!a)if(c)a={fragment:null,effect:G(()=>i(o))};else{var _=document.createDocumentFragment(),w=W();_.append(w),a={fragment:_,effect:G(()=>i(w))}}if(g&&$>0&&H(ut()),!c)if(Ve){for(const[A,j]of l)Y.has(A)||T.skipped_effects.add(j.e);T.oncommit(h),T.ondiscard(()=>{})}else h();F&&ee(!0),b(u)}),x={effect:v,items:l,first:f};c=!1,g&&(o=y)}function Wr(e,t,n,r,s){var i=t.length,o=e.items,l=e.first,f,a=null,u=[],d=[],c,h,v,x;for(x=0;x<i;x+=1){if(c=t[x],h=s(c,x),v=o.get(h),e.first??=v,!v.o){v.o=!0;var $=a?a.next:l;ie(e,a,v),ie(e,v,$),Lt(v,$,n),a=v,u=[],d=[],l=a.next;continue}if((v.e.f&B)!==0&&Ht(v.e),v!==l){if(f!==void 0&&f.has(v)){if(u.length<d.length){var F=d[0],E;a=F.prev;var Y=u[0],T=u[u.length-1];for(E=0;E<u.length;E+=1)Lt(u[E],F,n);for(E=0;E<d.length;E+=1)f.delete(d[E]);ie(e,Y.prev,T.next),ie(e,a,Y),ie(e,T,F),l=F,a=T,x-=1,u=[],d=[]}else f.delete(v),Lt(v,l,n),ie(e,v.prev,v.next),ie(e,v,a===null?e.first:a.next),ie(e,a,v),a=v;continue}for(u=[],d=[];l!==null&&l.k!==h;)(l.e.f&B)===0&&(f??=new Set).add(l),d.push(l),l=l.next;if(l===null)continue;v=l}u.push(v),a=v,l=v.next}if(l!==null||f!==void 0){for(var ne=f===void 0?[]:St(f);l!==null;)(l.e.f&B)===0&&ne.push(l),l=l.next;var Ve=ne.length;if(Ve>0){var re=null;Jr(e,ne,re)}}}function Gr(e,t,n,r,s,i,o,l){var f=(o&or)!==0,a=(o&fr)===0,u=f?a?Tn(n,!1,!1):Ne(n):n,d=(o&ar)===0?s:Ne(s),c={i:d,v:u,k:r,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var h=document.createDocumentFragment();h.append(e=W())}return c.e=G(()=>i(e,u,d,l)),t!==null&&(t.next=c),c}finally{}}function Lt(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,s=t?t.e.nodes_start:n,i=e.e.nodes_start;i!==null&&i!==r;){var o=se(i);s.before(i),i=o}}function ie(e,t,n){t===null?(e.first=n,e.effect.first=n&&n.e):(t.e.next&&(t.e.next.prev=null),t.next=n,t.e.next=n&&n.e),n===null?e.effect.last=t&&t.e:(n.e.prev&&(n.e.prev.next=null),n.prev=t,n.e.prev=t&&t.e)}function Kr(e,t,n,r){const s=Pt;if(n.length===0&&e.length===0){r(t.map(s));return}var i=S,o=m,l=Xr();function f(){Promise.all(n.map(a=>Zr(a))).then(a=>{l();try{r([...t.map(s),...a])}catch(u){(o.f&de)===0&&qe(u,o)}i?.deactivate(),_t()}).catch(a=>{qe(a,o)})}e.length>0?Promise.all(e).then(()=>{l();try{return f()}finally{i?.deactivate(),_t()}}):f()}function Xr(){var e=m,t=p,n=V,r=S;return function(i=!0){K(e),L(t),Fe(n),i&&r?.activate()}}function _t(){K(null),L(null),Fe(null)}function Pt(e){var t=C|q,n=p!==null&&(p.f&C)!==0?p:null;return m!==null&&(m.f|=Se),{ctx:V,deps:null,effects:null,equals:un,f:t,fn:e,reactions:null,rv:0,v:N,wv:0,parent:n??m,ac:null}}function Zr(e,t){let n=m;n===null&&Tr();var r=n.b,s=void 0,i=Ne(N),o=!p,l=new Map;return li(()=>{var f=rn();s=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).then(()=>{a===S&&a.committed&&a.deactivate(),_t()})}catch(c){f.reject(c),_t()}var a=S;if(o){var u=!r.is_pending();r.update_pending_count(1),a.increment(u),l.get(a)?.reject(De),l.delete(a),l.set(a,f)}const d=(c,h=void 0)=>{if(a.activate(),h)h!==De&&(i.f|=be,Je(i,h));else{(i.f&be)!==0&&(i.f^=be),Je(i,c);for(const[v,x]of l){if(l.delete(v),v===a)break;x.reject(De)}}o&&(r.update_pending_count(-1),a.decrement(u))};f.promise.then(d,c=>d(null,c||"unknown"))}),Pn(()=>{for(const f of l.values())f.reject(De)}),new Promise(f=>{function a(u){function d(){u===s?f(i):a(s)}u.then(d,d)}a(s)})}function wn(e){const t=Pt(e);return t.equals=cn,t}function $n(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)D(t[n])}}function Qr(e){for(var t=e.parent;t!==null;){if((t.f&C)===0)return(t.f&de)===0?t:null;t=t.parent}return null}function Mt(e){var t,n=m;K(Qr(e));try{e.f&=~ke,$n(e),t=Gn(e)}finally{K(n)}return t}function En(e){var t=Mt(e);if(e.equals(t)||(S?.is_fork||(e.v=t),e.wv=zn()),!Oe)if(J!==null)bt()&&J.set(e,t);else{var n=(e.f&Q)===0?ce:O;P(e,n)}}let Dt=new Set;const me=new Map;let xn=!1;function Ne(e,t){var n={f:0,v:e,reactions:null,equals:un,rv:0,wv:0};return n}function R(e,t){const n=Ne(e);return fi(n),n}function Tn(e,t=!1,n=!0){const r=Ne(e);return t||(r.equals=cn),r}function k(e,t,n=!1){p!==null&&(!oe||(p.f&sn)!==0)&&vn()&&(p.f&(C|fe|Nt|sn))!==0&&!ve?.includes(e)&&Pr();let r=n?ge(t):t;return Je(e,r)}function Je(e,t){if(!e.equals(t)){var n=e.v;Oe?me.set(e,t):me.set(e,n),e.v=t;var r=te.ensure();r.capture(e,n),(e.f&C)!==0&&((e.f&q)!==0&&Mt(e),P(e,(e.f&Q)!==0?O:ce)),e.wv=zn(),Sn(e,q),m!==null&&(m.f&O)!==0&&(m.f&(ue|pe))===0&&(X===null?ui([e]):X.push(e)),!r.is_fork&&Dt.size>0&&!xn&&ei()}return t}function ei(){xn=!1;var e=ye;mt(!0);const t=Array.from(Dt);try{for(const n of t)(n.f&O)!==0&&P(n,ce),Ke(n)&&Xe(n)}finally{mt(e)}Dt.clear()}function ze(e){k(e,e.v+1)}function Sn(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,s=0;s<r;s++){var i=n[s],o=i.f,l=(o&q)===0;if(l&&P(i,t),(o&C)!==0){var f=i;J?.delete(f),(o&ke)===0&&(o&Q&&(i.f|=ke),Sn(f,ce))}else l&&((o&fe)!==0&&he!==null&&he.add(i),Ae(i))}}function ge(e){if(typeof e!="object"||e===null||ot in e)return e;const t=tn(e);if(t!==gr&&t!==yr)return e;var n=new Map,r=en(e),s=R(0),i=Re,o=l=>{if(Re===i)return l();var f=p,a=Re;L(null),Jn(i);var u=l();return L(f),Jn(a),u};return r&&n.set("length",R(e.length)),new Proxy(e,{defineProperty(l,f,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Rr();var u=n.get(f);return u===void 0?u=o(()=>{var d=R(a.value);return n.set(f,d),d}):k(u,a.value,!0),!0},deleteProperty(l,f){var a=n.get(f);if(a===void 0){if(f in l){const u=o(()=>R(N));n.set(f,u),ze(s)}}else k(a,N),ze(s);return!0},get(l,f,a){if(f===ot)return e;var u=n.get(f),d=f in l;if(u===void 0&&(!d||Te(l,f)?.writable)&&(u=o(()=>{var h=ge(d?l[f]:N),v=R(h);return v}),n.set(f,u)),u!==void 0){var c=b(u);return c===N?void 0:c}return Reflect.get(l,f,a)},getOwnPropertyDescriptor(l,f){var a=Reflect.getOwnPropertyDescriptor(l,f);if(a&&"value"in a){var u=n.get(f);u&&(a.value=b(u))}else if(a===void 0){var d=n.get(f),c=d?.v;if(d!==void 0&&c!==N)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return a},has(l,f){if(f===ot)return!0;var a=n.get(f),u=a!==void 0&&a.v!==N||Reflect.has(l,f);if(a!==void 0||m!==null&&(!u||Te(l,f)?.writable)){a===void 0&&(a=o(()=>{var c=u?ge(l[f]):N,h=R(c);return h}),n.set(f,a));var d=b(a);if(d===N)return!1}return u},set(l,f,a,u){var d=n.get(f),c=f in l;if(r&&f==="length")for(var h=a;h<d.v;h+=1){var v=n.get(h+"");v!==void 0?k(v,N):h in l&&(v=o(()=>R(N)),n.set(h+"",v))}if(d===void 0)(!c||Te(l,f)?.writable)&&(d=o(()=>R(void 0)),k(d,ge(a)),n.set(f,d));else{c=d.v!==N;var x=o(()=>ge(a));k(d,x)}var $=Reflect.getOwnPropertyDescriptor(l,f);if($?.set&&$.set.call(u,a),!c){if(r&&typeof f=="string"){var F=n.get("length"),E=Number(f);Number.isInteger(E)&&E>=F.v&&k(F,E+1)}ze(s)}return!0},ownKeys(l){b(s);var f=Reflect.ownKeys(l).filter(d=>{var c=n.get(d);return c===void 0||c.v!==N});for(var[a,u]of n)u.v!==N&&!(a in l)&&f.push(a);return f},setPrototypeOf(){Lr()}})}var kn,Cn,An,Nn;function It(){if(kn===void 0){kn=window,Cn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;An=Te(t,"firstChild").get,Nn=Te(t,"nextSibling").get,nn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),nn(n)&&(n.__t=void 0)}}function W(e=""){return document.createTextNode(e)}function je(e){return An.call(e)}function se(e){return Nn.call(e)}function On(e,t){if(!g)return je(e);var n=je(y);return n===null&&(n=y.appendChild(W())),H(n),n}function pt(e,t=!1){if(!g){var n=je(e);return n instanceof Comment&&n.data===""?se(n):n}if(t&&y?.nodeType!==Ot){var r=W();return y?.before(r),H(r),r}return y}function Ft(e,t=1,n=!1){let r=g?y:e;for(var s;t--;)s=r,r=se(r);if(!g)return r;if(n&&r?.nodeType!==Ot){var i=W();return r===null?s?.after(i):r.before(i),H(i),i}return H(r),r}function Rn(e){e.textContent=""}function Ln(){return!1}function qt(e){var t=p,n=m;L(null),K(null);try{return e()}finally{L(t),K(n)}}function ti(e){m===null&&(p===null&&Cr(),kr()),Oe&&Sr()}function ni(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function le(e,t,n){var r=m;r!==null&&(r.f&B)!==0&&(e|=B);var s={ctx:V,deps:null,nodes_start:null,nodes_end:null,f:e|q|Q,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Xe(s),s.f|=lt}catch(l){throw D(s),l}else t!==null&&Ae(s);var i=s;if(n&&i.deps===null&&i.teardown===null&&i.nodes_start===null&&i.first===i.last&&(i.f&Se)===0&&(i=i.first,(e&fe)!==0&&(e&Me)!==0&&i!==null&&(i.f|=Me)),i!==null&&(i.parent=r,r!==null&&ni(i,r),p!==null&&(p.f&C)!==0&&(e&pe)===0)){var o=p;(o.effects??=[]).push(i)}return s}function bt(){return p!==null&&!oe}function Pn(e){const t=le(Ct,null,!1);return P(t,O),t.teardown=e,t}function Mn(e){ti();var t=m.f,n=!p&&(t&ue)!==0&&(t&lt)===0;if(n){var r=V;(r.e??=[]).push(e)}else return Dn(e)}function Dn(e){return le(kt|$r,e,!1)}function ri(e){te.ensure();const t=le(pe|Se,e,!0);return()=>{D(t)}}function ii(e){te.ensure();const t=le(pe|Se,e,!0);return(n={})=>new Promise(r=>{n.outro?Be(t,()=>{D(t),r(void 0)}):(D(t),r(void 0))})}function si(e){return le(kt,e,!1)}function li(e){return le(Nt|Se,e,!0)}function In(e,t=0){return le(Ct|t,e,!0)}function We(e,t=[],n=[],r=[]){Kr(r,t,n,s=>{le(Ct,()=>e(...s.map(b)),!0)})}function jt(e,t=0){var n=le(fe|t,e,!0);return n}function G(e){return le(ue|Se,e,!0)}function Fn(e){var t=e.teardown;if(t!==null){const n=Oe,r=p;Un(!0),L(null);try{t.call(null)}finally{Un(n),L(r)}}}function qn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&qt(()=>{s.abort(De)});var r=n.next;(n.f&pe)!==0?n.parent=null:D(n,t),n=r}}function oi(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ue)===0&&D(t),t=n}}function D(e,t=!0){var n=!1;(t||(e.f&ln)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(ai(e.nodes_start,e.nodes_end),n=!0),qn(e,t&&!n),gt(e,0),P(e,de);var r=e.transitions;if(r!==null)for(const i of r)i.stop();Fn(e);var s=e.parent;s!==null&&s.first!==null&&jn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function ai(e,t){for(;e!==null;){var n=e===t?null:se(e);e.remove(),e=n}}function jn(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 Be(e,t,n=!0){var r=[];Bt(e,r,!0),Bn(r,()=>{n&&D(e),t&&t()})}function Bn(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function Bt(e,t,n){if((e.f&B)===0){if(e.f^=B,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var s=r.next,i=(r.f&Me)!==0||(r.f&ue)!==0&&(e.f&fe)!==0;Bt(r,t,i?n:!1),r=s}}}function Ht(e){Hn(e,!0)}function Hn(e,t){if((e.f&B)!==0){e.f^=B,(e.f&O)===0&&(P(e,q),Ae(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Me)!==0||(n.f&ue)!==0;Hn(n,s?t:!1),n=r}if(e.transitions!==null)for(const i of e.transitions)(i.is_global||t)&&i.in()}}function Vn(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var s=n===r?null:se(n);t.append(n),n=s}}let ye=!1;function mt(e){ye=e}let Oe=!1;function Un(e){Oe=e}let p=null,oe=!1;function L(e){p=e}let m=null;function K(e){m=e}let ve=null;function fi(e){p!==null&&(ve===null?ve=[e]:ve.push(e))}let I=null,U=0,X=null;function ui(e){X=e}let Yn=1,Ge=0,Re=Ge;function Jn(e){Re=e}function zn(){return++Yn}function Ke(e){var t=e.f;if((t&q)!==0)return!0;if(t&C&&(e.f&=~ke),(t&ce)!==0){var n=e.deps;if(n!==null)for(var r=n.length,s=0;s<r;s++){var i=n[s];if(Ke(i)&&En(i),i.wv>e.wv)return!0}(t&Q)!==0&&J===null&&P(e,O)}return!1}function Wn(e,t,n=!0){var r=e.reactions;if(r!==null&&!ve?.includes(e))for(var s=0;s<r.length;s++){var i=r[s];(i.f&C)!==0?Wn(i,t,!1):t===i&&(n?P(i,q):(i.f&O)!==0&&P(i,ce),Ae(i))}}function Gn(e){var t=I,n=U,r=X,s=p,i=ve,o=V,l=oe,f=Re,a=e.f;I=null,U=0,X=null,p=(a&(ue|pe))===0?e:null,ve=null,Fe(e.ctx),oe=!1,Re=++Ge,e.ac!==null&&(qt(()=>{e.ac.abort(De)}),e.ac=null);try{e.f|=At;var u=e.fn,d=u(),c=e.deps;if(I!==null){var h;if(gt(e,U),c!==null&&U>0)for(c.length=U+I.length,h=0;h<I.length;h++)c[U+h]=I[h];else e.deps=c=I;if(ye&&bt()&&(e.f&Q)!==0)for(h=U;h<c.length;h++)(c[h].reactions??=[]).push(e)}else c!==null&&U<c.length&&(gt(e,U),c.length=U);if(vn()&&X!==null&&!oe&&c!==null&&(e.f&(C|ce|q))===0)for(h=0;h<X.length;h++)Wn(X[h],e);return s!==null&&s!==e&&(Ge++,X!==null&&(r===null?r=X:r.push(...X))),(e.f&be)!==0&&(e.f^=be),d}catch(v){return pn(v)}finally{e.f^=At,I=t,U=n,X=r,p=s,ve=i,Fe(o),oe=l,Re=f}}function ci(e,t){let n=t.reactions;if(n!==null){var r=br.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}n===null&&(t.f&C)!==0&&(I===null||!I.includes(t))&&(P(t,ce),(t.f&Q)!==0&&(t.f^=Q,t.f&=~ke),$n(t),gt(t,0))}function gt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ci(e,n[r])}function Xe(e){var t=e.f;if((t&de)===0){P(e,O);var n=m,r=ye;m=e,ye=!0;try{(t&fe)!==0?oi(e):qn(e),Fn(e);var s=Gn(e);e.teardown=typeof s=="function"?s:null,e.wv=Yn;var i;Tt&&qr&&(e.f&q)!==0&&e.deps}finally{ye=r,m=n}}}function b(e){var t=e.f,n=(t&C)!==0;if(p!==null&&!oe){var r=m!==null&&(m.f&de)!==0;if(!r&&!ve?.includes(e)){var s=p.deps;if((p.f&At)!==0)e.rv<Ge&&(e.rv=Ge,I===null&&s!==null&&s[U]===e?U++:I===null?I=[e]:I.includes(e)||I.push(e));else{(p.deps??=[]).push(e);var i=e.reactions;i===null?e.reactions=[p]:i.includes(p)||i.push(p)}}}if(Oe){if(me.has(e))return me.get(e);if(n){var o=e,l=o.v;return((o.f&O)===0&&o.reactions!==null||Xn(o))&&(l=Mt(o)),me.set(o,l),l}}else n&&!J?.has(e)&&(o=e,Ke(o)&&En(o),ye&&bt()&&(o.f&Q)===0&&Kn(o));if(J?.has(e))return J.get(e);if((e.f&be)!==0)throw e.v;return e.v}function Kn(e){if(e.deps!==null){e.f^=Q;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&C)!==0&&(t.f&Q)===0&&Kn(t)}}function Xn(e){if(e.v===N)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(me.has(t)||(t.f&C)!==0&&Xn(t))return!0;return!1}function Vt(e){var t=oe;try{return oe=!0,e()}finally{oe=t}}const di=-7169;function P(e,t){e.f=e.f&di|t}const Zn=new Set,Ut=new Set;function hi(e,t,n,r={}){function s(i){if(r.capture||Qe.call(t,i),!i.cancelBubble)return qt(()=>n?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ct(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Ze(e,t,n,r,s){var i={capture:r,passive:s},o=hi(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Pn(()=>{t.removeEventListener(e,o,i)})}function vi(e){for(var t=0;t<e.length;t++)Zn.add(e[t]);for(var n of Ut)n(e)}let Qn=null;function Qe(e){var t=this,n=t.ownerDocument,r=e.type,s=e.composedPath?.()||[],i=s[0]||e.target;Qn=e;var o=0,l=Qn===e&&e.__root;if(l){var f=s.indexOf(l);if(f!==-1&&(t===document||t===window)){e.__root=t;return}var a=s.indexOf(t);if(a===-1)return;f<=a&&(o=f)}if(i=s[o]||e.target,i!==t){it(e,"currentTarget",{configurable:!0,get(){return i||n}});var u=p,d=m;L(null),K(null);try{for(var c,h=[];i!==null;){var v=i.assignedSlot||i.parentNode||i.host||null;try{var x=i["__"+r];x!=null&&(!i.disabled||e.target===i)&&x.call(i,e)}catch($){c?h.push($):c=$}if(e.cancelBubble||v===t||v===null)break;i=v}if(c){for(let $ of h)queueMicrotask(()=>{throw $});throw c}}finally{e.__root=t,delete e.currentTarget,L(u),K(d)}}}function _i(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function we(e,t){var n=m;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function yt(e,t){var n=(t&vr)!==0,r=(t&_r)!==0,s,i=!e.startsWith("<!>");return()=>{if(g)return we(y,null),y;s===void 0&&(s=_i(i?e:"<!>"+e),n||(s=je(s)));var o=r||Cn?document.importNode(s,!0):s.cloneNode(!0);if(n){var l=je(o),f=o.lastChild;we(l,f)}else we(o,o);return o}}function pi(e=""){if(!g){var t=W(e+"");return we(t,t),t}var n=y;return n.nodeType!==Ot&&(n.before(n=W()),H(n)),we(n,n),n}function er(){if(g)return we(y,null),y;var e=document.createDocumentFragment(),t=document.createComment(""),n=W();return e.append(t,n),we(t,n),e}function $e(e,t){if(g){var n=m;((n.f&lt)===0||n.nodes_end===null)&&(n.nodes_end=y),ft();return}e!==null&&e.before(t)}const bi=["touchstart","touchmove"];function mi(e){return bi.includes(e)}function tr(e,t){return nr(e,t)}function gi(e,t){It(),t.intro=t.intro??!1;const n=t.target,r=g,s=y;try{for(var i=je(n);i&&(i.nodeType!==Ie||i.data!==Qt);)i=se(i);if(!i)throw Pe;ee(!0),H(i);const o=nr(e,{...t,anchor:i});return ee(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
- `).some(l=>l.startsWith("https://svelte.dev/e/")))throw o;return o!==Pe&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Nr(),It(),Rn(n),ee(!1),tr(e,t)}finally{ee(r),H(s)}}const He=new Map;function nr(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:o=!0}){It();var l=new Set,f=d=>{for(var c=0;c<d.length;c++){var h=d[c];if(!l.has(h)){l.add(h);var v=mi(h);t.addEventListener(h,Qe,{passive:v});var x=He.get(h);x===void 0?(document.addEventListener(h,Qe,{passive:v}),He.set(h,1)):He.set(h,x+1)}}};f(St(Zn)),Ut.add(f);var a=void 0,u=ii(()=>{var d=n??t.appendChild(W());return Ur(d,{pending:()=>{}},c=>{if(i){dn({});var h=V;h.c=i}if(s&&(r.$$events=s),g&&we(c,null),a=e(c,r)||{},g&&(m.nodes_end=y,y===null||y.nodeType!==Ie||y.data!==xt))throw at(),Pe;i&&hn()}),()=>{for(var c of l){t.removeEventListener(c,Qe);var h=He.get(c);--h===0?(document.removeEventListener(c,Qe),He.delete(c)):He.set(c,h)}Ut.delete(f),d!==n&&d.parentNode?.removeChild(d)}});return Yt.set(a,u),a}let Yt=new WeakMap;function yi(e,t){const n=Yt.get(e);return n?(Yt.delete(e),n(t)):Promise.resolve()}class wi{anchor;#t=new Map;#e=new Map;#n=new Map;#r=new Set;#a=!0;constructor(t,n=!0){this.anchor=t,this.#a=n}#s=()=>{var t=S;if(this.#t.has(t)){var n=this.#t.get(t),r=this.#e.get(n);if(r)Ht(r),this.#r.delete(n);else{var s=this.#n.get(n);s&&(this.#e.set(n,s.effect),this.#n.delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[i,o]of this.#t){if(this.#t.delete(i),i===t)break;const l=this.#n.get(o);l&&(D(l.effect),this.#n.delete(o))}for(const[i,o]of this.#e){if(i===n||this.#r.has(i))continue;const l=()=>{if(Array.from(this.#t.values()).includes(i)){var a=document.createDocumentFragment();Vn(o,a),a.append(W()),this.#n.set(i,{effect:o,fragment:a})}else D(o);this.#r.delete(i),this.#e.delete(i)};this.#a||!r?(this.#r.add(i),Be(o,l,!1)):l()}}};#i=t=>{this.#t.delete(t);const n=Array.from(this.#t.values());for(const[r,s]of this.#n)n.includes(r)||(D(s.effect),this.#n.delete(r))};ensure(t,n){var r=S,s=Ln();if(n&&!this.#e.has(t)&&!this.#n.has(t))if(s){var i=document.createDocumentFragment(),o=W();i.append(o),this.#n.set(t,{effect:G(()=>n(o)),fragment:i})}else this.#e.set(t,G(()=>n(this.anchor)));if(this.#t.set(r,t),s){for(const[l,f]of this.#e)l===t?r.skipped_effects.delete(f):r.skipped_effects.add(f);for(const[l,f]of this.#n)l===t?r.skipped_effects.delete(f.effect):r.skipped_effects.add(f.effect);r.oncommit(this.#s),r.ondiscard(this.#i)}else g&&(this.anchor=y),this.#s()}}function $i(e){V===null&&xr(),Mn(()=>{const t=Vt(e);if(typeof t=="function")return t})}function wt(e,t,n=!1){g&&ft();var r=new wi(e),s=n?Me:0;function i(o,l){if(g){const a=fn(e)===nt;if(o===a){var f=ut();H(f),r.anchor=f,ee(!1),r.ensure(o,l),ee(!0);return}}r.ensure(o,l)}jt(()=>{var o=!1;t((l,f=!0)=>{o=!0,i(f,l)}),o||i(!1,null)},s)}function Ei(e,t){si(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const s=document.createElement("style");s.id=t.hash,s.textContent=t.code,r.appendChild(s)}})}function xi(e,t){return e==null?null:String(e)}function Jt(e,t,n,r){var s=e.__style;if(g||s!==t){var i=xi(t);(!g||i!==e.getAttribute("style"))&&(i==null?e.removeAttribute("style"):e.style.cssText=i),e.__style=t}return r}const Ti=Symbol("is custom element"),Si=Symbol("is html");function ki(e,t,n,r){var s=Ci(e);g&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||s[t]!==(s[t]=n)&&(t==="loading"&&(e[Er]=n),n==null?e.removeAttribute(t):typeof n!="string"&&rr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ae(e,t,n){var r=p,s=m;let i=g;g&&ee(!1),L(null),K(null);try{t!=="style"&&(zt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?rr(e).includes(t):n&&typeof n=="object")?e[t]=n:ki(e,t,n==null?n:String(n))}finally{L(r),K(s),i&&ee(!0)}}function Ci(e){return e.__attributes??={[Ti]:e.nodeName.includes("-"),[Si]:e.namespaceURI===pr}}var zt=new Map;function rr(e){var t=e.getAttribute("is")||e.nodeName,n=zt.get(t);if(n)return n;zt.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=mr(s);for(var o in r)r[o].set&&n.push(o);s=tn(s)}return n}let $t=!1;function Ai(e){var t=$t;try{return $t=!1,[e(),$t]}finally{$t=t}}function Wt(e,t,n,r){var s=(n&dr)!==0,i=(n&hr)!==0,o=r,l=!0,f=()=>(l&&(l=!1,o=i?Vt(r):r),o),a;if(s){var u=ot in e||on in e;a=Te(e,t)?.set??(u&&t in e?E=>e[t]=E:void 0)}var d,c=!1;s?[d,c]=Ai(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=f(),a&&(Or(),a(d)));var h;if(h=()=>{var E=e[t];return E===void 0?f():(l=!0,E)},(n&cr)===0)return h;if(a){var v=e.$$legacy;return(function(E,Y){return arguments.length>0?((!Y||v||c)&&a(Y?h():E),E):h()})}var x=!1,$=((n&ur)!==0?Pt:wn)(()=>(x=!1,h()));s&&b($);var F=m;return(function(E,Y){if(arguments.length>0){const T=Y?b($):s?ge(E):E;return k($,T),x=!0,o!==void 0&&(o=T),E}return Oe&&x||(F.f&de)!==0?$.v:b($)})}function Ni(e){return new Oi(e)}class Oi{#t;#e;constructor(t){var n=new Map,r=(i,o)=>{var l=Tn(o,!1,!1);return n.set(i,l),l};const s=new Proxy({...t.props||{},$$events:{}},{get(i,o){return b(n.get(o)??r(o,Reflect.get(i,o)))},has(i,o){return o===on?!0:(b(n.get(o)??r(o,Reflect.get(i,o))),Reflect.has(i,o))},set(i,o,l){return k(n.get(o)??r(o,l),l),Reflect.set(i,o,l)}});this.#e=(t.hydrate?gi:tr)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&vt(),this.#t=s.$$events;for(const i of Object.keys(this.#e))i==="$set"||i==="$destroy"||i==="$on"||it(this,i,{get(){return this.#e[i]},set(o){this.#e[i]=o},enumerable:!0});this.#e.$set=i=>{Object.assign(s,i)},this.#e.$destroy=()=>{yi(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const r=(...s)=>n.call(this,...s);return this.#t[t].push(r),()=>{this.#t[t]=this.#t[t].filter(s=>s!==r)}}$destroy(){this.#e.$destroy()}}let ir;typeof HTMLElement=="function"&&(ir=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return s=>{const i=document.createElement("slot");r!=="default"&&(i.name=r),$e(s,i)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Ri(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const s=this.$$g_p(r.name);s in this.$$d||(this.$$d[s]=Et(s,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Ni({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ri(()=>{In(()=>{this.$$r=!0;for(const r of rt(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const s=Et(r,this.$$d[r],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,s)}this.$$r=!1})});for(const r in this.$$l)for(const s of this.$$l[r]){const i=this.$$c.$on(r,s);this.$$l_u.set(s,i)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Et(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return rt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Et(e,t,n,r){const s=n[e]?.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Ri(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Li(e,t,n,r,s,i){let o=class extends ir{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return rt(t).map(l=>(t[l].attribute||l).toLowerCase())}};return rt(t).forEach(l=>{it(o.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(f){f=Et(l,f,t),this.$$d[l]=f;var a=this.$$c;if(a){var u=Te(a,l)?.get;u?a[l]=f:a.$set({[l]:f})}}})}),r.forEach(l=>{it(o.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=o,o}const Gt={version:"0.65.22"};var Le={},sr;function Pi(){if(sr)return Le;sr=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.LanguageTranslator=void 0,Le.getChildStyleToPass=e,Le.addComponent=t;function e(r,s){var i,o,l="";try{if(r&&s?.length&&(!((i=Object.keys(r))===null||i===void 0)&&i.length)&&(!((o=s?.filter(function(c){return Object.keys(r).includes(c.name)}))===null||o===void 0)&&o.length))for(var f=function(c){var h=s?.filter(function(v){return v.name===c&&v.defaultValue!==r[c]});h&&(l+="".concat(c,":").concat(r[c],";"))},a=0,u=Object.keys(r);a<u.length;a++){var d=u[a];f(d)}}catch(c){console.error("error getting child style to pass",c)}finally{return l}}function t(r){var s,i=((s=r?.repoName.split("/"))===null||s===void 0?void 0:s[1])||r?.repoName;if(!i)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var o=r?.iifePath||"main.iife.js";if(!document.getElementById(i+"-script"))try{var l=document.createElement("script");if(l.id=i+"-script",l.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(o),r?.local)l.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var f=i.split("-")[0];l.src="http://localhost:6006/webcomponents/".concat(i.replace(f+"-",""),"/").concat(o)}document.head.appendChild(l)}catch(a){console.warn(a)}}var n=(function(){function r(s){if(this.lang="",!s?.dictionary)throw new Error("no dictionary provided");this.dictionary=s.dictionary,this.setLang(s?.lang)}return r.prototype.setLang=function(s){s||(s=r.getDefaultLang()),this.lang=s},r.prototype.translateWord=function(s,i){return r.getDictionaryWord(s,this.dictionary,i||this.lang)},r.prototype.translateDate=function(s,i,o){return r.formatDate(s,i,o||this.lang)},r.getDefaultLang=function(){var s,i,o,l="en";return navigator?.languages&&(!((o=(i=(s=navigator.languages[0])===null||s===void 0?void 0:s.split("-")[0])===null||i===void 0?void 0:i.toLowerCase())===null||o===void 0)&&o.length)&&(l=navigator.languages[0].split("-")[0].toLowerCase()),l},r.getDictionaryWord=function(s,i,o){var l;if(!s)throw new Error("no wordKey provided");if(!i)throw new Error("no dictionary provided");if(o&&(!((l=i[o])===null||l===void 0)&&l[s]))return i[o][s];var f="",a=r.getDefaultLang();if(!o||a!==o){var u=i?.[a];u?.[s]&&(f=u[s])}return f},r.formatDate=function(s,i,o){if(!s)throw new Error("no date provided");if(typeof s.getMonth!="function")throw new Error("wrong date format");var l=new Intl.DateTimeFormat(o||r.getDefaultLang(),i);return l.format(s)},r})();return Le.LanguageTranslator=n,Le}var Kt=Pi(),Mi=yt("<hb-dialogform></hb-dialogform>",2),Di=yt("<hb-form></hb-form>",2),Ii=yt('<h2 style="margin:60px;text-align:center;color:blue">output</h2> <!>',1),Fi=yt('<hb-table><span slot="buttons-container"><button class="btn btn-outline-primary btn-sm svelte-1f1dlex">done</button></span></hb-table> <!> <!>',3);const qi={hash:"svelte-1f1dlex",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;}
1
+ (function(Wt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const rr=1,ir=2,sr=16,or=1,lr=4,ar=8,fr=16,ur=1,cr=2,Gt="[",Qe="[!",wt="]",Le={},O=Symbol(),dr="http://www.w3.org/1999/xhtml",$t=!1;var Kt=Array.isArray,hr=Array.prototype.indexOf,Et=Array.from,et=Object.keys,tt=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,vr=Object.getOwnPropertyDescriptors,_r=Object.prototype,pr=Array.prototype,Xt=Object.getPrototypeOf,Zt=Object.isExtensible;function br(e){for(var t=0;t<e.length;t++)e[t]()}function Qt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}const N=2,xt=4,Tt=8,fe=16,ue=32,pe=64,nt=128,Z=512,R=1024,F=2048,ce=4096,j=8192,de=16384,rt=32768,Pe=65536,en=1<<17,tn=1<<18,Ee=1<<19,mr=1<<20,xe=32768,kt=1<<21,St=1<<22,be=1<<23,it=Symbol("$state"),nn=Symbol("legacy props"),gr=Symbol(""),Me=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ct=3,De=8;function yr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function wr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function $r(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Er(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function xr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Tr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function kr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Sr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Cr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ar(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Nr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Or(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function st(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Rr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let w=!1;function Q(e){w=e}let g;function B(e){if(e===null)throw st(),Le;return g=e}function ot(){return B(re(g))}function rn(e){if(w){if(re(g)!==null)throw st(),Le;g=e}}function Lr(e=1){if(w){for(var t=e,n=g;t--;)n=re(n);g=n}}function lt(e=!0){for(var t=0,n=g;;){if(n.nodeType===De){var r=n.data;if(r===wt){if(t===0)return n;t-=1}else(r===Gt||r===Qe)&&(t+=1)}var s=re(n);e&&n.remove(),n=s}}function sn(e){if(!e||e.nodeType!==De)throw st(),Le;return e.data}function on(e){return e===this.v}function Pr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ln(e){return!Pr(e,this.v)}let Mr=!1,H=null;function Ie(e){H=e}function an(e,t=!1,n){H={p:H,i:!1,c:null,e:null,s:e,x:null,l:null}}function fn(e){var t=H,n=t.e;if(n!==null){t.e=null;for(var r of n)Rn(r)}return e!==void 0&&(t.x=e),t.i=!0,H=t.p,e??{}}function un(){return!0}let Te=[];function cn(){var e=Te;Te=[],br(e)}function at(e){if(Te.length===0&&!Ve){var t=Te;queueMicrotask(()=>{t===Te&&cn()})}Te.push(e)}function Dr(){for(;Te.length>0;)cn()}function dn(e){var t=m;if(t===null)return p.f|=be,e;if((t.f&rt)===0){if((t.f&nt)===0)throw e;t.b.error(e)}else Fe(e,t)}function Fe(e,t){for(;t!==null;){if((t.f&nt)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const ft=new Set;let S=null,U=null,Y=[],ut=null,At=!1,Ve=!1;class ee{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#n=0;#r=0;#a=null;#s=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#r>0}process(t){Y=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#o(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#l(n.effects),this.#l(n.render_effects),this.#l(n.block_effects)):(S=null,vn(n.render_effects),vn(n.effects),this.#a?.resolve()),U=null}#o(t,n){t.f^=R;for(var r=t.first;r!==null;){var s=r.f,i=(s&(ue|pe))!==0,l=i&&(s&R)!==0,o=l||(s&j)!==0||this.skipped_effects.has(r);if((r.f&nt)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!o&&r.fn!==null){i?r.f^=R:(s&xt)!==0?n.effects.push(r):We(r)&&((r.f&fe)!==0&&n.block_effects.push(r),Ge(r));var a=r.first;if(a!==null){r=a;continue}}var f=r.parent;for(r=r.next;r===null&&f!==null;)f===n.effect&&(this.#l(n.effects),this.#l(n.render_effects),this.#l(n.block_effects),n=n.parent),r=f.next,f=f.parent}}#l(t){for(const n of t)((n.f&F)!==0?this.#s:this.#i).push(n),this.#f(n.deps),P(n,R)}#f(t){if(t!==null)for(const n of t)(n.f&N)===0||(n.f&xe)===0||(n.f^=xe,this.#f(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&be)===0&&(this.current.set(t,t.v),U?.set(t,t.v))}activate(){S=this,this.apply()}deactivate(){S===this&&(S=null,U=null)}flush(){if(this.activate(),Y.length>0){if(hn(),S!==null&&S!==this)return}else this.#n===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#u(){if(this.#r===0){for(const t of this.#t)t();this.#t.clear()}this.#n===0&&this.#c()}#c(){if(ft.size>1){this.previous.clear();var t=U,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of ft){if(i===this){n=!1;continue}const l=[];for(const[a,f]of this.current){if(i.current.has(a))if(n&&f!==i.current.get(a))i.current.set(a,f);else continue;l.push(a)}if(l.length===0)continue;const o=[...i.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){var s=Y;Y=[];const a=new Set,f=new Map;for(const u of l)_n(u,o,a,f);if(Y.length>0){S=i,i.apply();for(const u of Y)i.#o(u,r);i.deactivate()}Y=s}}S=null,U=t}this.committed=!0,ft.delete(this)}increment(t){this.#n+=1,t&&(this.#r+=1)}decrement(t){this.#n-=1,t&&(this.#r-=1),this.revive()}revive(){for(const t of this.#s)P(t,F),ke(t);for(const t of this.#i)P(t,ce),ke(t);this.#s=[],this.#i=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=Qt()).promise}static ensure(){if(S===null){const t=S=new ee;ft.add(S),Ve||ee.enqueue(()=>{S===t&&t.flush()})}return S}static enqueue(t){at(t)}apply(){}}function ct(e){var t=Ve;Ve=!0;try{for(var n;;){if(Dr(),Y.length===0&&(S?.flush(),Y.length===0))return ut=null,n;hn()}}finally{Ve=t}}function hn(){var e=ge;At=!0;var t=null;try{var n=0;for(_t(!0);Y.length>0;){var r=ee.ensure();if(n++>1e3){var s,i;Ir()}r.process(Y),me.clear()}}finally{At=!1,_t(e),ut=null}}function Ir(){try{Tr()}catch(e){Fe(e,ut)}}let he=null;function vn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(de|j))===0&&We(r)&&(he=new Set,Ge(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Dn(r):r.fn=null),he?.size>0)){me.clear();for(const s of he){if((s.f&(de|j))!==0)continue;const i=[s];let l=s.parent;for(;l!==null;)he.has(l)&&(he.delete(l),i.push(l)),l=l.parent;for(let o=i.length-1;o>=0;o--){const a=i[o];(a.f&(de|j))===0&&Ge(a)}}he.clear()}}he=null}}function _n(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&N)!==0?_n(s,t,n,r):(i&(St|fe))!==0&&(i&F)===0&&pn(s,t,r)&&(P(s,F),ke(s))}}function pn(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&N)!==0&&pn(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function ke(e){for(var t=ut=e;t.parent!==null;){t=t.parent;var n=t.f;if(At&&t===m&&(n&fe)!==0&&(n&tn)===0)return;if((n&(pe|ue))!==0){if((n&R)===0)return;t.f^=R}}Y.push(t)}function Fr(e){let t=0,n=Se(0),r;return()=>{vt()&&(y(n),Ln(()=>(t===0&&(r=jt(()=>e(()=>Ye(n)))),t+=1,()=>{at(()=>{t-=1,t===0&&(r?.(),r=void 0,Ye(n))})})))}}var qr=Pe|Ee|nt;function jr(e,t,n){new Br(e,t,n)}class Br{parent;#t=!1;#e;#n=w?g:null;#r;#a;#s;#i=null;#o=null;#l=null;#f=null;#u=null;#c=0;#d=0;#v=!1;#h=null;#g=Fr(()=>(this.#h=Se(this.#c),()=>{this.#h=null}));constructor(t,n,r){this.#e=t,this.#r=n,this.#a=r,this.parent=m.b,this.#t=!!this.#r.pending,this.#s=It(()=>{if(m.b=this,w){const i=this.#n;ot(),i.nodeType===De&&i.data===Qe?this.#w():this.#y()}else{var s=this.#b();try{this.#i=W(()=>r(s))}catch(i){this.error(i)}this.#d>0?this.#p():this.#t=!1}return()=>{this.#u?.remove()}},qr),w&&(this.#e=g)}#y(){try{this.#i=W(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#w(){const t=this.#r.pending;t&&(this.#o=W(()=>t(this.#e)),ee.enqueue(()=>{var n=this.#b();this.#i=this.#_(()=>(ee.ensure(),W(()=>this.#a(n)))),this.#d>0?this.#p():(je(this.#o,()=>{this.#o=null}),this.#t=!1)}))}#b(){var t=this.#e;return this.#t&&(this.#u=z(),this.#e.before(this.#u),t=this.#u),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#_(t){var n=m,r=p,s=H;G(this.#s),L(this.#s),Ie(this.#s.ctx);try{return t()}catch(i){return dn(i),null}finally{G(n),L(r),Ie(s)}}#p(){const t=this.#r.pending;this.#i!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),qn(this.#i,this.#f)),this.#o===null&&(this.#o=W(()=>t(this.#e)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#d+=t,this.#d===0&&(this.#t=!1,this.#o&&je(this.#o,()=>{this.#o=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t){this.#m(t),this.#c+=t,this.#h&&Ue(this.#h,this.#c)}get_effect_pending(){return this.#g(),y(this.#h)}error(t){var n=this.#r.onerror;let r=this.#r.failed;if(this.#v||!n&&!r)throw t;this.#i&&(M(this.#i),this.#i=null),this.#o&&(M(this.#o),this.#o=null),this.#l&&(M(this.#l),this.#l=null),w&&(B(this.#n),Lr(),B(lt()));var s=!1,i=!1;const l=()=>{if(s){Rr();return}s=!0,i&&Or(),ee.ensure(),this.#c=0,this.#l!==null&&je(this.#l,()=>{this.#l=null}),this.#t=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#v=!1,W(()=>this.#a(this.#e)))),this.#d>0?this.#p():this.#t=!1};var o=p;try{L(null),i=!0,n?.(t,l),i=!1}catch(a){Fe(a,this.#s&&this.#s.parent)}finally{L(o)}r&&at(()=>{this.#l=this.#_(()=>{ee.ensure(),this.#v=!0;try{return W(()=>{r(this.#e,()=>t,()=>l)})}catch(a){return Fe(a,this.#s.parent),null}finally{this.#v=!1}})})}}function Hr(e,t,n){for(var r=[],s=t.length,i=0;i<s;i++)Ft(t[i].e,r,!0);In(r,()=>{var l=r.length===0&&n!==null;if(l){var o=n,a=o.parentNode;Cn(a),a.append(o),e.items.clear(),ne(e,t[0].prev,t[s-1].next)}for(var f=0;f<s;f++){var u=t[f];l||(e.items.delete(u.k),ne(e,u.prev,u.next)),M(u.e,!l)}e.first===t[0]&&(e.first=t[0].prev)})}function Vr(e,t,n,r,s,i=null){var l=e,o=new Map,a=null;w&&ot();var f=null,u=bn(()=>{var $=n();return Kt($)?$:$==null?[]:Et($)}),d,c=!0;function h(){Ur(T,d,l,t,r),f!==null&&(d.length===0?(f.fragment?(l.before(f.fragment),f.fragment=null):qt(f.effect),_.first=f.effect):je(f.effect,()=>{f=null}))}var _=It(()=>{d=y(u);var $=d.length;let k=!1;if(w){var E=sn(l)===Qe;E!==($===0)&&(l=lt(),B(l),Q(!1),k=!0)}for(var X=new Set,q=S,le=null,He=An(),ae=0;ae<$;ae+=1){w&&g.nodeType===De&&g.data===wt&&(l=g,k=!0,Q(!1));var v=d[ae],b=r(v,ae),x=c?null:o.get(b);x?(Ue(x.v,v),x.i=ae,He&&q.skipped_effects.delete(x.e)):(x=Yr(c?l:null,le,v,b,ae,s,t,n),c&&(x.o=!0,le===null?a=x:le.next=x,le=x),o.set(b,x)),X.add(b)}if($===0&&i&&!f)if(c)f={fragment:null,effect:W(()=>i(l))};else{var I=document.createDocumentFragment(),C=z();I.append(C),f={fragment:I,effect:W(()=>i(C))}}if(w&&$>0&&B(lt()),!c)if(He){for(const[te,_e]of o)X.has(te)||q.skipped_effects.add(_e.e);q.oncommit(h),q.ondiscard(()=>{})}else h();k&&Q(!0),y(u)}),T={effect:_,items:o,first:a};c=!1,w&&(l=g)}function Ur(e,t,n,r,s){var i=t.length,l=e.items,o=e.first,a,f=null,u=[],d=[],c,h,_,T;for(T=0;T<i;T+=1){if(c=t[T],h=s(c,T),_=l.get(h),e.first??=_,!_.o){_.o=!0;var $=f?f.next:o;ne(e,f,_),ne(e,_,$),Nt(_,$,n),f=_,u=[],d=[],o=f.next;continue}if((_.e.f&j)!==0&&qt(_.e),_!==o){if(a!==void 0&&a.has(_)){if(u.length<d.length){var k=d[0],E;f=k.prev;var X=u[0],q=u[u.length-1];for(E=0;E<u.length;E+=1)Nt(u[E],k,n);for(E=0;E<d.length;E+=1)a.delete(d[E]);ne(e,X.prev,q.next),ne(e,f,X),ne(e,q,k),o=k,f=q,T-=1,u=[],d=[]}else a.delete(_),Nt(_,o,n),ne(e,_.prev,_.next),ne(e,_,f===null?e.first:f.next),ne(e,f,_),f=_;continue}for(u=[],d=[];o!==null&&o.k!==h;)(o.e.f&j)===0&&(a??=new Set).add(o),d.push(o),o=o.next;if(o===null)continue;_=o}u.push(_),f=_,o=_.next}if(o!==null||a!==void 0){for(var le=a===void 0?[]:Et(a);o!==null;)(o.e.f&j)===0&&le.push(o),o=o.next;var He=le.length;if(He>0){var ae=null;Hr(e,le,ae)}}}function Yr(e,t,n,r,s,i,l,o){var a=(l&rr)!==0,f=(l&sr)===0,u=a?f?wn(n,!1,!1):Se(n):n,d=(l&ir)===0?s:Se(s),c={i:d,v:u,k:r,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var h=document.createDocumentFragment();h.append(e=z())}return c.e=W(()=>i(e,u,d,o)),t!==null&&(t.next=c),c}finally{}}function Nt(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,s=t?t.e.nodes_start:n,i=e.e.nodes_start;i!==null&&i!==r;){var l=re(i);s.before(i),i=l}}function ne(e,t,n){t===null?(e.first=n,e.effect.first=n&&n.e):(t.e.next&&(t.e.next.prev=null),t.next=n,t.e.next=n&&n.e),n===null?e.effect.last=t&&t.e:(n.e.prev&&(n.e.prev.next=null),n.prev=t,n.e.prev=t&&t.e)}function Jr(e,t,n,r){const s=Ot;if(n.length===0&&e.length===0){r(t.map(s));return}var i=S,l=m,o=zr();function a(){Promise.all(n.map(f=>Wr(f))).then(f=>{o();try{r([...t.map(s),...f])}catch(u){(l.f&de)===0&&Fe(u,l)}i?.deactivate(),dt()}).catch(f=>{Fe(f,l)})}e.length>0?Promise.all(e).then(()=>{o();try{return a()}finally{i?.deactivate(),dt()}}):a()}function zr(){var e=m,t=p,n=H,r=S;return function(i=!0){G(e),L(t),Ie(n),i&&r?.activate()}}function dt(){G(null),L(null),Ie(null)}function Ot(e){var t=N|F,n=p!==null&&(p.f&N)!==0?p:null;return m!==null&&(m.f|=Ee),{ctx:H,deps:null,effects:null,equals:on,f:t,fn:e,reactions:null,rv:0,v:O,wv:0,parent:n??m,ac:null}}function Wr(e,t){let n=m;n===null&&wr();var r=n.b,s=void 0,i=Se(O),l=!p,o=new Map;return ni(()=>{var a=Qt();s=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).then(()=>{f===S&&f.committed&&f.deactivate(),dt()})}catch(c){a.reject(c),dt()}var f=S;if(l){var u=!r.is_pending();r.update_pending_count(1),f.increment(u),o.get(f)?.reject(Me),o.delete(f),o.set(f,a)}const d=(c,h=void 0)=>{if(f.activate(),h)h!==Me&&(i.f|=be,Ue(i,h));else{(i.f&be)!==0&&(i.f^=be),Ue(i,c);for(const[_,T]of o){if(o.delete(_),_===f)break;T.reject(Me)}}l&&(r.update_pending_count(-1),f.decrement(u))};a.promise.then(d,c=>d(null,c||"unknown"))}),Nn(()=>{for(const a of o.values())a.reject(Me)}),new Promise(a=>{function f(u){function d(){u===s?a(i):f(s)}u.then(d,d)}f(s)})}function bn(e){const t=Ot(e);return t.equals=ln,t}function mn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)M(t[n])}}function Gr(e){for(var t=e.parent;t!==null;){if((t.f&N)===0)return(t.f&de)===0?t:null;t=t.parent}return null}function Rt(e){var t,n=m;G(Gr(e));try{e.f&=~xe,mn(e),t=Yn(e)}finally{G(n)}return t}function gn(e){var t=Rt(e);if(e.equals(t)||(S?.is_fork||(e.v=t),e.wv=Vn()),!Ae)if(U!==null)vt()&&U.set(e,t);else{var n=(e.f&Z)===0?ce:R;P(e,n)}}let Lt=new Set;const me=new Map;let yn=!1;function Se(e,t){var n={f:0,v:e,reactions:null,equals:on,rv:0,wv:0};return n}function J(e,t){const n=Se(e);return si(n),n}function wn(e,t=!1,n=!0){const r=Se(e);return t||(r.equals=ln),r}function A(e,t,n=!1){p!==null&&(!se||(p.f&en)!==0)&&un()&&(p.f&(N|fe|St|en))!==0&&!ve?.includes(e)&&Nr();let r=n?Ce(t):t;return Ue(e,r)}function Ue(e,t){if(!e.equals(t)){var n=e.v;Ae?me.set(e,t):me.set(e,n),e.v=t;var r=ee.ensure();r.capture(e,n),(e.f&N)!==0&&((e.f&F)!==0&&Rt(e),P(e,(e.f&Z)!==0?R:ce)),e.wv=Vn(),$n(e,F),m!==null&&(m.f&R)!==0&&(m.f&(ue|pe))===0&&(K===null?oi([e]):K.push(e)),!r.is_fork&&Lt.size>0&&!yn&&Kr()}return t}function Kr(){yn=!1;var e=ge;_t(!0);const t=Array.from(Lt);try{for(const n of t)(n.f&R)!==0&&P(n,ce),We(n)&&Ge(n)}finally{_t(e)}Lt.clear()}function Ye(e){A(e,e.v+1)}function $n(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,s=0;s<r;s++){var i=n[s],l=i.f,o=(l&F)===0;if(o&&P(i,t),(l&N)!==0){var a=i;U?.delete(a),(l&xe)===0&&(l&Z&&(i.f|=xe),$n(a,ce))}else o&&((l&fe)!==0&&he!==null&&he.add(i),ke(i))}}function Ce(e){if(typeof e!="object"||e===null||it in e)return e;const t=Xt(e);if(t!==_r&&t!==pr)return e;var n=new Map,r=Kt(e),s=J(0),i=Ne,l=o=>{if(Ne===i)return o();var a=p,f=Ne;L(null),Hn(i);var u=o();return L(a),Hn(f),u};return r&&n.set("length",J(e.length)),new Proxy(e,{defineProperty(o,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Cr();var u=n.get(a);return u===void 0?u=l(()=>{var d=J(f.value);return n.set(a,d),d}):A(u,f.value,!0),!0},deleteProperty(o,a){var f=n.get(a);if(f===void 0){if(a in o){const u=l(()=>J(O));n.set(a,u),Ye(s)}}else A(f,O),Ye(s);return!0},get(o,a,f){if(a===it)return e;var u=n.get(a),d=a in o;if(u===void 0&&(!d||$e(o,a)?.writable)&&(u=l(()=>{var h=Ce(d?o[a]:O),_=J(h);return _}),n.set(a,u)),u!==void 0){var c=y(u);return c===O?void 0:c}return Reflect.get(o,a,f)},getOwnPropertyDescriptor(o,a){var f=Reflect.getOwnPropertyDescriptor(o,a);if(f&&"value"in f){var u=n.get(a);u&&(f.value=y(u))}else if(f===void 0){var d=n.get(a),c=d?.v;if(d!==void 0&&c!==O)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return f},has(o,a){if(a===it)return!0;var f=n.get(a),u=f!==void 0&&f.v!==O||Reflect.has(o,a);if(f!==void 0||m!==null&&(!u||$e(o,a)?.writable)){f===void 0&&(f=l(()=>{var c=u?Ce(o[a]):O,h=J(c);return h}),n.set(a,f));var d=y(f);if(d===O)return!1}return u},set(o,a,f,u){var d=n.get(a),c=a in o;if(r&&a==="length")for(var h=f;h<d.v;h+=1){var _=n.get(h+"");_!==void 0?A(_,O):h in o&&(_=l(()=>J(O)),n.set(h+"",_))}if(d===void 0)(!c||$e(o,a)?.writable)&&(d=l(()=>J(void 0)),A(d,Ce(f)),n.set(a,d));else{c=d.v!==O;var T=l(()=>Ce(f));A(d,T)}var $=Reflect.getOwnPropertyDescriptor(o,a);if($?.set&&$.set.call(u,f),!c){if(r&&typeof a=="string"){var k=n.get("length"),E=Number(a);Number.isInteger(E)&&E>=k.v&&A(k,E+1)}Ye(s)}return!0},ownKeys(o){y(s);var a=Reflect.ownKeys(o).filter(d=>{var c=n.get(d);return c===void 0||c.v!==O});for(var[f,u]of n)u.v!==O&&!(f in o)&&a.push(f);return a},setPrototypeOf(){Ar()}})}var En,xn,Tn,kn;function Pt(){if(En===void 0){En=window,xn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Tn=$e(t,"firstChild").get,kn=$e(t,"nextSibling").get,Zt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Zt(n)&&(n.__t=void 0)}}function z(e=""){return document.createTextNode(e)}function qe(e){return Tn.call(e)}function re(e){return kn.call(e)}function Sn(e,t){if(!w)return qe(e);var n=qe(g);return n===null&&(n=g.appendChild(z())),B(n),n}function ht(e,t=!1){if(!w){var n=qe(e);return n instanceof Comment&&n.data===""?re(n):n}if(t&&g?.nodeType!==Ct){var r=z();return g?.before(r),B(r),r}return g}function Mt(e,t=1,n=!1){let r=w?g:e;for(var s;t--;)s=r,r=re(r);if(!w)return r;if(n&&r?.nodeType!==Ct){var i=z();return r===null?s?.after(i):r.before(i),B(i),i}return B(r),r}function Cn(e){e.textContent=""}function An(){return!1}function Dt(e){var t=p,n=m;L(null),G(null);try{return e()}finally{L(t),G(n)}}function Xr(e){m===null&&(p===null&&xr(),Er()),Ae&&$r()}function Zr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ie(e,t,n){var r=m;r!==null&&(r.f&j)!==0&&(e|=j);var s={ctx:H,deps:null,nodes_start:null,nodes_end:null,f:e|F|Z,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Ge(s),s.f|=rt}catch(o){throw M(s),o}else t!==null&&ke(s);var i=s;if(n&&i.deps===null&&i.teardown===null&&i.nodes_start===null&&i.first===i.last&&(i.f&Ee)===0&&(i=i.first,(e&fe)!==0&&(e&Pe)!==0&&i!==null&&(i.f|=Pe)),i!==null&&(i.parent=r,r!==null&&Zr(i,r),p!==null&&(p.f&N)!==0&&(e&pe)===0)){var l=p;(l.effects??=[]).push(i)}return s}function vt(){return p!==null&&!se}function Nn(e){const t=ie(Tt,null,!1);return P(t,R),t.teardown=e,t}function On(e){Xr();var t=m.f,n=!p&&(t&ue)!==0&&(t&rt)===0;if(n){var r=H;(r.e??=[]).push(e)}else return Rn(e)}function Rn(e){return ie(xt|mr,e,!1)}function Qr(e){ee.ensure();const t=ie(pe|Ee,e,!0);return()=>{M(t)}}function ei(e){ee.ensure();const t=ie(pe|Ee,e,!0);return(n={})=>new Promise(r=>{n.outro?je(t,()=>{M(t),r(void 0)}):(M(t),r(void 0))})}function ti(e){return ie(xt,e,!1)}function ni(e){return ie(St|Ee,e,!0)}function Ln(e,t=0){return ie(Tt|t,e,!0)}function Je(e,t=[],n=[],r=[]){Jr(r,t,n,s=>{ie(Tt,()=>e(...s.map(y)),!0)})}function It(e,t=0){var n=ie(fe|t,e,!0);return n}function W(e){return ie(ue|Ee,e,!0)}function Pn(e){var t=e.teardown;if(t!==null){const n=Ae,r=p;jn(!0),L(null);try{t.call(null)}finally{jn(n),L(r)}}}function Mn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Dt(()=>{s.abort(Me)});var r=n.next;(n.f&pe)!==0?n.parent=null:M(n,t),n=r}}function ri(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ue)===0&&M(t),t=n}}function M(e,t=!0){var n=!1;(t||(e.f&tn)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(ii(e.nodes_start,e.nodes_end),n=!0),Mn(e,t&&!n),pt(e,0),P(e,de);var r=e.transitions;if(r!==null)for(const i of r)i.stop();Pn(e);var s=e.parent;s!==null&&s.first!==null&&Dn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function ii(e,t){for(;e!==null;){var n=e===t?null:re(e);e.remove(),e=n}}function Dn(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 je(e,t,n=!0){var r=[];Ft(e,r,!0),In(r,()=>{n&&M(e),t&&t()})}function In(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function Ft(e,t,n){if((e.f&j)===0){if(e.f^=j,e.transitions!==null)for(const l of e.transitions)(l.is_global||n)&&t.push(l);for(var r=e.first;r!==null;){var s=r.next,i=(r.f&Pe)!==0||(r.f&ue)!==0&&(e.f&fe)!==0;Ft(r,t,i?n:!1),r=s}}}function qt(e){Fn(e,!0)}function Fn(e,t){if((e.f&j)!==0){e.f^=j,(e.f&R)===0&&(P(e,F),ke(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Pe)!==0||(n.f&ue)!==0;Fn(n,s?t:!1),n=r}if(e.transitions!==null)for(const i of e.transitions)(i.is_global||t)&&i.in()}}function qn(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var s=n===r?null:re(n);t.append(n),n=s}}let ge=!1;function _t(e){ge=e}let Ae=!1;function jn(e){Ae=e}let p=null,se=!1;function L(e){p=e}let m=null;function G(e){m=e}let ve=null;function si(e){p!==null&&(ve===null?ve=[e]:ve.push(e))}let D=null,V=0,K=null;function oi(e){K=e}let Bn=1,ze=0,Ne=ze;function Hn(e){Ne=e}function Vn(){return++Bn}function We(e){var t=e.f;if((t&F)!==0)return!0;if(t&N&&(e.f&=~xe),(t&ce)!==0){var n=e.deps;if(n!==null)for(var r=n.length,s=0;s<r;s++){var i=n[s];if(We(i)&&gn(i),i.wv>e.wv)return!0}(t&Z)!==0&&U===null&&P(e,R)}return!1}function Un(e,t,n=!0){var r=e.reactions;if(r!==null&&!ve?.includes(e))for(var s=0;s<r.length;s++){var i=r[s];(i.f&N)!==0?Un(i,t,!1):t===i&&(n?P(i,F):(i.f&R)!==0&&P(i,ce),ke(i))}}function Yn(e){var t=D,n=V,r=K,s=p,i=ve,l=H,o=se,a=Ne,f=e.f;D=null,V=0,K=null,p=(f&(ue|pe))===0?e:null,ve=null,Ie(e.ctx),se=!1,Ne=++ze,e.ac!==null&&(Dt(()=>{e.ac.abort(Me)}),e.ac=null);try{e.f|=kt;var u=e.fn,d=u(),c=e.deps;if(D!==null){var h;if(pt(e,V),c!==null&&V>0)for(c.length=V+D.length,h=0;h<D.length;h++)c[V+h]=D[h];else e.deps=c=D;if(ge&&vt()&&(e.f&Z)!==0)for(h=V;h<c.length;h++)(c[h].reactions??=[]).push(e)}else c!==null&&V<c.length&&(pt(e,V),c.length=V);if(un()&&K!==null&&!se&&c!==null&&(e.f&(N|ce|F))===0)for(h=0;h<K.length;h++)Un(K[h],e);return s!==null&&s!==e&&(ze++,K!==null&&(r===null?r=K:r.push(...K))),(e.f&be)!==0&&(e.f^=be),d}catch(_){return dn(_)}finally{e.f^=kt,D=t,V=n,K=r,p=s,ve=i,Ie(l),se=o,Ne=a}}function li(e,t){let n=t.reactions;if(n!==null){var r=hr.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}n===null&&(t.f&N)!==0&&(D===null||!D.includes(t))&&(P(t,ce),(t.f&Z)!==0&&(t.f^=Z,t.f&=~xe),mn(t),pt(t,0))}function pt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)li(e,n[r])}function Ge(e){var t=e.f;if((t&de)===0){P(e,R);var n=m,r=ge;m=e,ge=!0;try{(t&fe)!==0?ri(e):Mn(e),Pn(e);var s=Yn(e);e.teardown=typeof s=="function"?s:null,e.wv=Bn;var i;$t&&Mr&&(e.f&F)!==0&&e.deps}finally{ge=r,m=n}}}function y(e){var t=e.f,n=(t&N)!==0;if(p!==null&&!se){var r=m!==null&&(m.f&de)!==0;if(!r&&!ve?.includes(e)){var s=p.deps;if((p.f&kt)!==0)e.rv<ze&&(e.rv=ze,D===null&&s!==null&&s[V]===e?V++:D===null?D=[e]:D.includes(e)||D.push(e));else{(p.deps??=[]).push(e);var i=e.reactions;i===null?e.reactions=[p]:i.includes(p)||i.push(p)}}}if(Ae){if(me.has(e))return me.get(e);if(n){var l=e,o=l.v;return((l.f&R)===0&&l.reactions!==null||zn(l))&&(o=Rt(l)),me.set(l,o),o}}else n&&!U?.has(e)&&(l=e,We(l)&&gn(l),ge&&vt()&&(l.f&Z)===0&&Jn(l));if(U?.has(e))return U.get(e);if((e.f&be)!==0)throw e.v;return e.v}function Jn(e){if(e.deps!==null){e.f^=Z;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&N)!==0&&(t.f&Z)===0&&Jn(t)}}function zn(e){if(e.v===O)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(me.has(t)||(t.f&N)!==0&&zn(t))return!0;return!1}function jt(e){var t=se;try{return se=!0,e()}finally{se=t}}const ai=-7169;function P(e,t){e.f=e.f&ai|t}const Wn=new Set,Bt=new Set;function fi(e,t,n,r={}){function s(i){if(r.capture||Xe.call(t,i),!i.cancelBubble)return Dt(()=>n?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?at(()=>{t.addEventListener(e,s,r)}):t.addEventListener(e,s,r),s}function Ke(e,t,n,r,s){var i={capture:r,passive:s},l=fi(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Nn(()=>{t.removeEventListener(e,l,i)})}function ui(e){for(var t=0;t<e.length;t++)Wn.add(e[t]);for(var n of Bt)n(e)}let Gn=null;function Xe(e){var t=this,n=t.ownerDocument,r=e.type,s=e.composedPath?.()||[],i=s[0]||e.target;Gn=e;var l=0,o=Gn===e&&e.__root;if(o){var a=s.indexOf(o);if(a!==-1&&(t===document||t===window)){e.__root=t;return}var f=s.indexOf(t);if(f===-1)return;a<=f&&(l=a)}if(i=s[l]||e.target,i!==t){tt(e,"currentTarget",{configurable:!0,get(){return i||n}});var u=p,d=m;L(null),G(null);try{for(var c,h=[];i!==null;){var _=i.assignedSlot||i.parentNode||i.host||null;try{var T=i["__"+r];T!=null&&(!i.disabled||e.target===i)&&T.call(i,e)}catch($){c?h.push($):c=$}if(e.cancelBubble||_===t||_===null)break;i=_}if(c){for(let $ of h)queueMicrotask(()=>{throw $});throw c}}finally{e.__root=t,delete e.currentTarget,L(u),G(d)}}}function ci(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function ye(e,t){var n=m;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function bt(e,t){var n=(t&ur)!==0,r=(t&cr)!==0,s,i=!e.startsWith("<!>");return()=>{if(w)return ye(g,null),g;s===void 0&&(s=ci(i?e:"<!>"+e),n||(s=qe(s)));var l=r||xn?document.importNode(s,!0):s.cloneNode(!0);if(n){var o=qe(l),a=l.lastChild;ye(o,a)}else ye(l,l);return l}}function di(e=""){if(!w){var t=z(e+"");return ye(t,t),t}var n=g;return n.nodeType!==Ct&&(n.before(n=z()),B(n)),ye(n,n),n}function Kn(){if(w)return ye(g,null),g;var e=document.createDocumentFragment(),t=document.createComment(""),n=z();return e.append(t,n),ye(t,n),e}function we(e,t){if(w){var n=m;((n.f&rt)===0||n.nodes_end===null)&&(n.nodes_end=g),ot();return}e!==null&&e.before(t)}const hi=["touchstart","touchmove"];function vi(e){return hi.includes(e)}function Xn(e,t){return Zn(e,t)}function _i(e,t){Pt(),t.intro=t.intro??!1;const n=t.target,r=w,s=g;try{for(var i=qe(n);i&&(i.nodeType!==De||i.data!==Gt);)i=re(i);if(!i)throw Le;Q(!0),B(i);const l=Zn(e,{...t,anchor:i});return Q(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
2
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw l;return l!==Le&&console.warn("Failed to hydrate: ",l),t.recover===!1&&kr(),Pt(),Cn(n),Q(!1),Xn(e,t)}finally{Q(r),B(s)}}const Be=new Map;function Zn(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:l=!0}){Pt();var o=new Set,a=d=>{for(var c=0;c<d.length;c++){var h=d[c];if(!o.has(h)){o.add(h);var _=vi(h);t.addEventListener(h,Xe,{passive:_});var T=Be.get(h);T===void 0?(document.addEventListener(h,Xe,{passive:_}),Be.set(h,1)):Be.set(h,T+1)}}};a(Et(Wn)),Bt.add(a);var f=void 0,u=ei(()=>{var d=n??t.appendChild(z());return jr(d,{pending:()=>{}},c=>{if(i){an({});var h=H;h.c=i}if(s&&(r.$$events=s),w&&ye(c,null),f=e(c,r)||{},w&&(m.nodes_end=g,g===null||g.nodeType!==De||g.data!==wt))throw st(),Le;i&&fn()}),()=>{for(var c of o){t.removeEventListener(c,Xe);var h=Be.get(c);--h===0?(document.removeEventListener(c,Xe),Be.delete(c)):Be.set(c,h)}Bt.delete(a),d!==n&&d.parentNode?.removeChild(d)}});return Ht.set(f,u),f}let Ht=new WeakMap;function pi(e,t){const n=Ht.get(e);return n?(Ht.delete(e),n(t)):Promise.resolve()}class bi{anchor;#t=new Map;#e=new Map;#n=new Map;#r=new Set;#a=!0;constructor(t,n=!0){this.anchor=t,this.#a=n}#s=()=>{var t=S;if(this.#t.has(t)){var n=this.#t.get(t),r=this.#e.get(n);if(r)qt(r),this.#r.delete(n);else{var s=this.#n.get(n);s&&(this.#e.set(n,s.effect),this.#n.delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[i,l]of this.#t){if(this.#t.delete(i),i===t)break;const o=this.#n.get(l);o&&(M(o.effect),this.#n.delete(l))}for(const[i,l]of this.#e){if(i===n||this.#r.has(i))continue;const o=()=>{if(Array.from(this.#t.values()).includes(i)){var f=document.createDocumentFragment();qn(l,f),f.append(z()),this.#n.set(i,{effect:l,fragment:f})}else M(l);this.#r.delete(i),this.#e.delete(i)};this.#a||!r?(this.#r.add(i),je(l,o,!1)):o()}}};#i=t=>{this.#t.delete(t);const n=Array.from(this.#t.values());for(const[r,s]of this.#n)n.includes(r)||(M(s.effect),this.#n.delete(r))};ensure(t,n){var r=S,s=An();if(n&&!this.#e.has(t)&&!this.#n.has(t))if(s){var i=document.createDocumentFragment(),l=z();i.append(l),this.#n.set(t,{effect:W(()=>n(l)),fragment:i})}else this.#e.set(t,W(()=>n(this.anchor)));if(this.#t.set(r,t),s){for(const[o,a]of this.#e)o===t?r.skipped_effects.delete(a):r.skipped_effects.add(a);for(const[o,a]of this.#n)o===t?r.skipped_effects.delete(a.effect):r.skipped_effects.add(a.effect);r.oncommit(this.#s),r.ondiscard(this.#i)}else w&&(this.anchor=g),this.#s()}}function mi(e){H===null&&yr(),On(()=>{const t=jt(e);if(typeof t=="function")return t})}function mt(e,t,n=!1){w&&ot();var r=new bi(e),s=n?Pe:0;function i(l,o){if(w){const f=sn(e)===Qe;if(l===f){var a=lt();B(a),r.anchor=a,Q(!1),r.ensure(l,o),Q(!0);return}}r.ensure(l,o)}It(()=>{var l=!1;t((o,a=!0)=>{l=!0,i(a,o)}),l||i(!1,null)},s)}function gi(e,t){ti(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const s=document.createElement("style");s.id=t.hash,s.textContent=t.code,r.appendChild(s)}})}const yi=Symbol("is custom element"),wi=Symbol("is html");function $i(e,t,n,r){var s=Ei(e);w&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||s[t]!==(s[t]=n)&&(t==="loading"&&(e[gr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Qn(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function oe(e,t,n){var r=p,s=m;let i=w;w&&Q(!1),L(null),G(null);try{t!=="style"&&(Vt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?Qn(e).includes(t):n&&typeof n=="object")?e[t]=n:$i(e,t,n==null?n:String(n))}finally{L(r),G(s),i&&Q(!0)}}function Ei(e){return e.__attributes??={[yi]:e.nodeName.includes("-"),[wi]:e.namespaceURI===dr}}var Vt=new Map;function Qn(e){var t=e.getAttribute("is")||e.nodeName,n=Vt.get(t);if(n)return n;Vt.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=vr(s);for(var l in r)r[l].set&&n.push(l);s=Xt(s)}return n}let gt=!1;function xi(e){var t=gt;try{return gt=!1,[e(),gt]}finally{gt=t}}function Ut(e,t,n,r){var s=(n&ar)!==0,i=(n&fr)!==0,l=r,o=!0,a=()=>(o&&(o=!1,l=i?jt(r):r),l),f;if(s){var u=it in e||nn in e;f=$e(e,t)?.set??(u&&t in e?E=>e[t]=E:void 0)}var d,c=!1;s?[d,c]=xi(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=a(),f&&(Sr(),f(d)));var h;if(h=()=>{var E=e[t];return E===void 0?a():(o=!0,E)},(n&lr)===0)return h;if(f){var _=e.$$legacy;return(function(E,X){return arguments.length>0?((!X||_||c)&&f(X?h():E),E):h()})}var T=!1,$=((n&or)!==0?Ot:bn)(()=>(T=!1,h()));s&&y($);var k=m;return(function(E,X){if(arguments.length>0){const q=X?y($):s?Ce(E):E;return A($,q),T=!0,l!==void 0&&(l=q),E}return Ae&&T||(k.f&de)!==0?$.v:y($)})}function Ti(e){return new ki(e)}class ki{#t;#e;constructor(t){var n=new Map,r=(i,l)=>{var o=wn(l,!1,!1);return n.set(i,o),o};const s=new Proxy({...t.props||{},$$events:{}},{get(i,l){return y(n.get(l)??r(l,Reflect.get(i,l)))},has(i,l){return l===nn?!0:(y(n.get(l)??r(l,Reflect.get(i,l))),Reflect.has(i,l))},set(i,l,o){return A(n.get(l)??r(l,o),o),Reflect.set(i,l,o)}});this.#e=(t.hydrate?_i:Xn)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&ct(),this.#t=s.$$events;for(const i of Object.keys(this.#e))i==="$set"||i==="$destroy"||i==="$on"||tt(this,i,{get(){return this.#e[i]},set(l){this.#e[i]=l},enumerable:!0});this.#e.$set=i=>{Object.assign(s,i)},this.#e.$destroy=()=>{pi(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const r=(...s)=>n.call(this,...s);return this.#t[t].push(r),()=>{this.#t[t]=this.#t[t].filter(s=>s!==r)}}$destroy(){this.#e.$destroy()}}let er;typeof HTMLElement=="function"&&(er=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return s=>{const i=document.createElement("slot");r!=="default"&&(i.name=r),we(s,i)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Si(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const s=this.$$g_p(r.name);s in this.$$d||(this.$$d[s]=yt(s,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Ti({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Qr(()=>{Ln(()=>{this.$$r=!0;for(const r of et(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const s=yt(r,this.$$d[r],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,s)}this.$$r=!1})});for(const r in this.$$l)for(const s of this.$$l[r]){const i=this.$$c.$on(r,s);this.$$l_u.set(s,i)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=yt(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return et(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function yt(e,t,n,r){const s=n[e]?.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Si(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Ci(e,t,n,r,s,i){let l=class extends er{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return et(t).map(o=>(t[o].attribute||o).toLowerCase())}};return et(t).forEach(o=>{tt(l.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(a){a=yt(o,a,t),this.$$d[o]=a;var f=this.$$c;if(f){var u=$e(f,o)?.get;u?f[o]=a:f.$set({[o]:a})}}})}),r.forEach(o=>{tt(l.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=l,l}const Yt={version:"0.66.0"};var Oe={},tr;function Ai(){if(tr)return Oe;tr=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.LanguageTranslator=void 0,Oe.getChildStyleToPass=e,Oe.addComponent=t;function e(r,s){var i,l,o="";try{if(r&&s?.length&&(!((i=Object.keys(r))===null||i===void 0)&&i.length)&&(!((l=s?.filter(function(c){return Object.keys(r).includes(c.name)}))===null||l===void 0)&&l.length))for(var a=function(c){var h=s?.filter(function(_){return _.name===c&&_.defaultValue!==r[c]});h&&(o+="".concat(c,":").concat(r[c],";"))},f=0,u=Object.keys(r);f<u.length;f++){var d=u[f];a(d)}}catch(c){console.error("error getting child style to pass",c)}finally{return o}}function t(r){var s,i=((s=r?.repoName.split("/"))===null||s===void 0?void 0:s[1])||r?.repoName;if(!i)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var l=r?.iifePath||"main.iife.js";if(!document.getElementById(i+"-script"))try{var o=document.createElement("script");if(o.id=i+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(l),r?.local)o.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var a=i.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(i.replace(a+"-",""),"/").concat(l)}document.head.appendChild(o)}catch(f){console.warn(f)}}var n=(function(){function r(s){if(this.lang="",!s?.dictionary)throw new Error("no dictionary provided");this.dictionary=s.dictionary,this.setLang(s?.lang)}return r.prototype.setLang=function(s){s||(s=r.getDefaultLang()),this.lang=s},r.prototype.translateWord=function(s,i){return r.getDictionaryWord(s,this.dictionary,i||this.lang)},r.prototype.translateDate=function(s,i,l){return r.formatDate(s,i,l||this.lang)},r.getDefaultLang=function(){var s,i,l,o="en";return navigator?.languages&&(!((l=(i=(s=navigator.languages[0])===null||s===void 0?void 0:s.split("-")[0])===null||i===void 0?void 0:i.toLowerCase())===null||l===void 0)&&l.length)&&(o=navigator.languages[0].split("-")[0].toLowerCase()),o},r.getDictionaryWord=function(s,i,l){var o;if(!s)throw new Error("no wordKey provided");if(!i)throw new Error("no dictionary provided");if(l&&(!((o=i[l])===null||o===void 0)&&o[s]))return i[l][s];var a="",f=r.getDefaultLang();if(!l||f!==l){var u=i?.[f];u?.[s]&&(a=u[s])}return a},r.formatDate=function(s,i,l){if(!s)throw new Error("no date provided");if(typeof s.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(l||r.getDefaultLang(),i);return o.format(s)},r})();return Oe.LanguageTranslator=n,Oe}var Jt=Ai(),Ni=bt("<hb-dialogform></hb-dialogform>",2),Oi=bt("<hb-form></hb-form>",2),Ri=bt('<h2 style="margin:60px;text-align:center;color:blue">output</h2> <!>',1),Li=bt('<hb-table><span slot="buttons-container"><button class="btn btn-outline-primary btn-sm svelte-1f1dlex">done</button></span></hb-table> <!> <!>',3);const Pi={hash:"svelte-1f1dlex",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;}
3
3
  /*!
4
4
  * Bootstrap v5.1.2 (https://getbootstrap.com/)
5
5
  * Copyright 2011-2021 The Bootstrap Authors
@@ -7,5 +7,5 @@
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  */.btn.svelte-1f1dlex {--bs-btn-padding-x: 0.75rem;--bs-btn-padding-y: 0.375rem;--bs-btn-font-family: ;--bs-btn-font-size: 1rem;--bs-btn-font-weight: 400;--bs-btn-line-height: 1.5;--bs-btn-color: var(--bs-body-color);--bs-btn-bg: transparent;--bs-btn-border-width: var(--bs-border-width);--bs-btn-border-color: transparent;--bs-btn-border-radius: var(--bs-border-radius);--bs-btn-hover-border-color: transparent;--bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity: 0.65;--bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;}
9
9
  @media (prefers-reduced-motion: reduce) {.btn.svelte-1f1dlex {transition:none;}
10
- }.btn.svelte-1f1dlex:hover {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);}.btn.svelte-1f1dlex:focus-visible {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow);} .btn.svelte-1f1dlex:first-child:active {color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color);} .btn.svelte-1f1dlex:first-child:active:focus-visible {box-shadow:var(--bs-btn-focus-box-shadow);}.btn.svelte-1f1dlex:disabled {color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity);}.btn-outline-primary.svelte-1f1dlex {--bs-btn-color: #0d6efd;--bs-btn-border-color: #0d6efd;--bs-btn-hover-color: #fff;--bs-btn-hover-bg: #0d6efd;--bs-btn-hover-border-color: #0d6efd;--bs-btn-focus-shadow-rgb: 13, 110, 253;--bs-btn-active-color: #fff;--bs-btn-active-bg: #0d6efd;--bs-btn-active-border-color: #0d6efd;--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color: #0d6efd;--bs-btn-disabled-bg: transparent;--bs-btn-disabled-border-color: #0d6efd;--bs-gradient: none;}.btn-sm.svelte-1f1dlex {--bs-btn-padding-y: 0.25rem;--bs-btn-padding-x: 0.5rem;--bs-btn-font-size: 0.875rem;--bs-btn-border-radius: var(--bs-border-radius-sm);}`};function lr(e,t){dn(t,!0),Ei(e,qi);function n(_,w){t.$$host.dispatchEvent(new CustomEvent(_,{detail:w}))}let r=Wt(t,"id",7,""),s=Wt(t,"debug",7,!1),i=Wt(t,"output_schema",23,()=>[]);const o=[{id:"first-row",type:"row",params:{columns:[{type:"text",placeholder:"Label...",id:"label",required:!0,label:"Property Label",validationTip:"This field cannot be empty."},{type:"select",placeholder:"Select something here...",id:"type",required:!0,label:"Type",validationTip:"This field cannot be empty.",params:{options:[{label:"",value:"",id:""},{label:"text",value:"text",id:"text"},{label:"textarea",value:"textarea",id:"textarea"},{label:"email",value:"email",id:"email"},{label:"number",value:"number",id:"number"},{label:"select",value:"select",id:"select"},{label:"radio",value:"radio",id:"radio"},{label:"checkbox",value:"checkbox",id:"checkbox"},{label:"file",value:"file",id:"file"},{label:"date",value:"date",id:"date"},{label:"datetime",value:"datetime",id:"datetime"},{label:"color",value:"color",id:"color"},{label:"range",value:"range",id:"range"}]}}]}},{id:"conditionals-row",type:"row",params:{columns:[{type:"checkbox",placeholder:"Conditional...",id:"conditional",label:"Is Conditional?"},{type:"checkbox",placeholder:"Required...",id:"required",label:"Is Required?"}]}},{id:"size-row",type:"row",params:{columns:[{type:"number",placeholder:"Min...",id:"min",label:"Min",dependencies:[{id:"type",values:["number","date","datetime","text","textarea","range"]}]},{type:"number",placeholder:"Max...",id:"max",label:"Max",dependencies:[{id:"type",values:["number","date","datetime","text","textarea","range"]}]}]}},{type:"arrayobjects",label:"conditions",id:"conditions",params:{addPropertyLabel:"add condition",schema:[{id:"conditions-row",type:"row",params:{columns:[{type:"text",placeholder:"Condition Property name...",id:"conditionlabel",required:!0,label:"Label",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Condition values (separated by comma)...",id:"conditionvalue",label:"Values",validationTip:"This field cannot be empty."}]}}]},dependencies:[{id:"conditional"}]},{type:"arrayobjects",label:"options",placeholder:"Insert your last name here...",id:"options",validationTip:"This field cannot be empty.",params:{addPropertyLabel:"add option",schema:[{id:"options-row",type:"row",params:{columns:[{type:"text",placeholder:"Property name...",id:"optionlabel",required:!0,label:"Label",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Value...",id:"optionvalue",label:"Value",required:!0,validationTip:"This field cannot be empty."}]}}]},dependencies:[{id:"type",values:["select","radio"]}]}];let l=R(void 0);ge({});let f=R(""),a=R(""),u=R(""),d=R(void 0);const c=[{label:"Label",key:"label"},{label:"type",key:"type"},{label:"params",key:"params",nosort:!0},{label:"dependencies",key:"dependencies"},{label:"required",key:"required"},{label:"value",key:"value"},{label:"modifiche",key:"mod",type:"actions",nosort:!0}];let h=R(ge([])),v=R(!1);$i(()=>{Kt.addComponent({repoName:"@htmlbricks/hb-form",version:Gt.version}),Kt.addComponent({repoName:"@htmlbricks/hb-table",version:Gt.version}),Kt.addComponent({repoName:"@htmlbricks/hb-dialogform",version:Gt.version}),k(d,t.$$host?.shadowRoot?.querySelector("#schema"),!0),console.log("formComponent",b(d))}),Mn(()=>{if(typeof i()=="string"&&i()!=="")try{console.log("parsing output_schema"),i(JSON.parse(i()))}catch(w){console.error("error parsing output_schema",w)}i()||i([]),typeof s()=="string"&&(s()==="true"||s()==="yes"||s()==="")?s(!0):s()!==!0&&s(!1),b(l)||k(l,[{counter:0,schema:JSON.stringify(o)}],!0);const _=[];for(const w of i()){let A,j;w.params&&(j=JSON.stringify(w.params)),w.dependencies&&(A=JSON.stringify(w.dependencies)),_.push({_id:w.label,label:w.label,type:w.type,params:j,required:w.required,dependencies:A,value:w.value,_actions:[{name:"delete",type:"icon",iconOrText:"x-octagon-fill",disabled:!!w.value}]})}k(h,_,!0)});function x(_){console.log("addSchema",_);let w={},A=[];if(_.conditions&&(A=_.conditions.map(M=>({id:M.conditionlabel,values:M.conditionvalue?M.conditionvalue.replace(", ",",").replace(" ,",",").split(","):void 0}))),(_.type==="text"||_.type==="textarea"||_.type==="number"||_.type==="datetime"||_.type==="date"||_.type==="range")&&(_.min&&(w.min=_.min),_.max&&(w.max=_.max)),_.type==="select"||_.type==="radio"&&_.options?.length){w.options=[];for(const M of _.options)w.options.push({label:M.optionlabel,value:M.optionvalue})}const j={id:_.label,type:_.type,label:_.label,required:_.required,placeholder:_.placeholder,dependencies:A};Object.keys(w).length&&(j.params=w),i().find(M=>M.label===_.label)?i(i().map(M=>M.label===_.label?j:M)):i([...i(),j]),b(l)?.length&&k(l,[...b(l),{counter:b(l).length,schema:JSON.stringify(o)}],!0),console.info("schema4selectorS",b(l))}function $(_){if(console.log(_,i()),i().find(A=>A.label===_)?.value)return console.warn("cannot remove default value");i(i().filter(A=>A.label!==_)),b(l)?.length&&k(l,b(l).filter(A=>A.counter!==b(l).length-1),!0)}function F(){const _={schema:i(),id:r()};n("done",_)}var E={get id(){return r()},set id(_=""){r(_),vt()},get debug(){return s()},set debug(_=!1){s(_),vt()},get output_schema(){return i()},set output_schema(_=[]){i(_),vt()}},Y=Fi(),T=pt(Y);ae(T,"id","table_specs"),Jt(T,b(u)),ae(T,"disablepagination","yes"),We(()=>ae(T,"headers",JSON.stringify(c))),We(()=>ae(T,"rows",JSON.stringify(b(h)))),ae(T,"add_item","yes");var ne=On(T),Ve=On(ne);Ve.__click=F,an(ne),an(T);var re=Ft(T,2);{var et=_=>{var w=er(),A=pt(w);zr(A,17,()=>b(l),j=>j.counter,(j,M)=>{var _e=er(),Ee=pt(_e);{var ji=Xt=>{var xe=Mi();ae(xe,"title","Add property"),We(()=>ae(xe,"show",b(v)?"yes":"no")),We(()=>ae(xe,"schema",b(M).schema)),Jt(xe,b(a)),Ze("modalFormConfirm",xe,tt=>{console.log(tt.detail),x(tt.detail),k(v,!1)}),Ze("modalFormCancel",xe,tt=>{console.log("cancelform"),k(v,!1)}),Ze("modalShow",xe,tt=>{console.log("modalShow"),k(v,tt.detail.show,!0)}),$e(Xt,xe)};wt(Ee,Xt=>{b(M).counter===b(l).length-1&&Xt(ji)})}$e(j,_e)}),$e(_,w)};wt(re,_=>{b(l)&&_(et)})}var Ue=Ft(re,2);{var Z=_=>{var w=Ii(),A=Ft(pt(w),2);{var j=_e=>{var Ee=Di();ae(Ee,"hide_submit","yes"),We(()=>ae(Ee,"schema",JSON.stringify(i()))),Jt(Ee,b(f)),$e(_e,Ee)},M=_e=>{var Ee=pi("...no output");$e(_e,Ee)};wt(A,_e=>{i()?.length?_e(j):_e(M,!1)})}$e(_,w)};wt(Ue,_=>{s()&&_(Z)})}return Ze("tableCustomActionClick",T,_=>{_.detail.action==="delete"&&$(_.detail.itemId)}),Ze("addItem",T,_=>{k(v,!0)}),$e(e,Y),hn(E)}vi(["click"]),customElements.define("hb-form-composer",Li(lr,{id:{},debug:{},output_schema:{}},[],[],!0)),Zt.Component=lr,Object.defineProperty(Zt,Symbol.toStringTag,{value:"Module"})})(this["form-composer"]=this["form-composer"]||{});
10
+ }.btn.svelte-1f1dlex:hover {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);}.btn.svelte-1f1dlex:focus-visible {color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow);} .btn.svelte-1f1dlex:first-child:active {color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color);} .btn.svelte-1f1dlex:first-child:active:focus-visible {box-shadow:var(--bs-btn-focus-box-shadow);}.btn.svelte-1f1dlex:disabled {color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity);}.btn-outline-primary.svelte-1f1dlex {--bs-btn-color: #0d6efd;--bs-btn-border-color: #0d6efd;--bs-btn-hover-color: #fff;--bs-btn-hover-bg: #0d6efd;--bs-btn-hover-border-color: #0d6efd;--bs-btn-focus-shadow-rgb: 13, 110, 253;--bs-btn-active-color: #fff;--bs-btn-active-bg: #0d6efd;--bs-btn-active-border-color: #0d6efd;--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color: #0d6efd;--bs-btn-disabled-bg: transparent;--bs-btn-disabled-border-color: #0d6efd;--bs-gradient: none;}.btn-sm.svelte-1f1dlex {--bs-btn-padding-y: 0.25rem;--bs-btn-padding-x: 0.5rem;--bs-btn-font-size: 0.875rem;--bs-btn-border-radius: var(--bs-border-radius-sm);}`};function nr(e,t){an(t,!0),gi(e,Pi);function n(v,b){t.$$host.dispatchEvent(new CustomEvent(v,{detail:b}))}let r=Ut(t,"id",7,""),s=Ut(t,"debug",7,!1),i=Ut(t,"output_schema",23,()=>[]);const l=[{id:"first-row",type:"row",params:{columns:[{type:"text",placeholder:"Label...",id:"label",required:!0,label:"Property Label",validationTip:"This field cannot be empty."},{type:"select",placeholder:"Select something here...",id:"type",required:!0,label:"Type",validationTip:"This field cannot be empty.",params:{options:[{label:"",value:"",id:""},{label:"text",value:"text",id:"text"},{label:"textarea",value:"textarea",id:"textarea"},{label:"email",value:"email",id:"email"},{label:"number",value:"number",id:"number"},{label:"select",value:"select",id:"select"},{label:"radio",value:"radio",id:"radio"},{label:"checkbox",value:"checkbox",id:"checkbox"},{label:"file",value:"file",id:"file"},{label:"date",value:"date",id:"date"},{label:"datetime",value:"datetime",id:"datetime"},{label:"color",value:"color",id:"color"},{label:"range",value:"range",id:"range"}]}}]}},{id:"conditionals-row",type:"row",params:{columns:[{type:"checkbox",placeholder:"Conditional...",id:"conditional",label:"Is Conditional?"},{type:"checkbox",placeholder:"Required...",id:"required",label:"Is Required?"}]}},{id:"size-row",type:"row",params:{columns:[{type:"number",placeholder:"Min...",id:"min",label:"Min",dependencies:[{id:"type",values:["number","date","datetime","text","textarea","range"]}]},{type:"number",placeholder:"Max...",id:"max",label:"Max",dependencies:[{id:"type",values:["number","date","datetime","text","textarea","range"]}]}]}},{type:"arrayobjects",label:"conditions",id:"conditions",params:{addPropertyLabel:"add condition",schema:[{id:"conditions-row",type:"row",params:{columns:[{type:"text",placeholder:"Condition Property name...",id:"conditionlabel",required:!0,label:"Label",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Condition values (separated by comma)...",id:"conditionvalue",label:"Values",validationTip:"This field cannot be empty."}]}}]},dependencies:[{id:"conditional"}]},{type:"arrayobjects",label:"options",placeholder:"Insert your last name here...",id:"options",validationTip:"This field cannot be empty.",params:{addPropertyLabel:"add option",schema:[{id:"options-row",type:"row",params:{columns:[{type:"text",placeholder:"Property name...",id:"optionlabel",required:!0,label:"Label",validationTip:"This field cannot be empty."},{type:"text",placeholder:"Value...",id:"optionvalue",label:"Value",required:!0,validationTip:"This field cannot be empty."}]}}]},dependencies:[{id:"type",values:["select","radio"]}]}];let o=J(void 0),a=J(void 0);const f=[{label:"Label",key:"label"},{label:"type",key:"type"},{label:"params",key:"params",nosort:!0},{label:"dependencies",key:"dependencies"},{label:"required",key:"required"},{label:"value",key:"value"},{label:"modifiche",key:"mod",type:"actions",nosort:!0}];let u=J(Ce([])),d=J(!1);mi(()=>{Jt.addComponent({repoName:"@htmlbricks/hb-form",version:Yt.version}),Jt.addComponent({repoName:"@htmlbricks/hb-table",version:Yt.version}),Jt.addComponent({repoName:"@htmlbricks/hb-dialogform",version:Yt.version}),A(a,t.$$host?.shadowRoot?.querySelector("#schema"),!0),console.log("formComponent",y(a))}),On(()=>{if(typeof i()=="string"&&i()!=="")try{console.log("parsing output_schema"),i(JSON.parse(i()))}catch(b){console.error("error parsing output_schema",b)}i()||i([]),typeof s()=="string"&&(s()==="true"||s()==="yes"||s()==="")?s(!0):s()!==!0&&s(!1),y(o)||A(o,[{counter:0,schema:JSON.stringify(l)}],!0);const v=[];for(const b of i()){let x,I;b.params&&(I=JSON.stringify(b.params)),b.dependencies&&(x=JSON.stringify(b.dependencies)),v.push({_id:b.label,label:b.label,type:b.type,params:I,required:b.required,dependencies:x,value:b.value,_actions:[{name:"delete",type:"icon",iconOrText:"x-octagon-fill",disabled:!!b.value}]})}A(u,v,!0)});function c(v){console.log("addSchema",v);let b={},x=[];if(v.conditions&&(x=v.conditions.map(C=>({id:C.conditionlabel,values:C.conditionvalue?C.conditionvalue.replace(", ",",").replace(" ,",",").split(","):void 0}))),(v.type==="text"||v.type==="textarea"||v.type==="number"||v.type==="datetime"||v.type==="date"||v.type==="range")&&(v.min&&(b.min=v.min),v.max&&(b.max=v.max)),v.type==="select"||v.type==="radio"&&v.options?.length){b.options=[];for(const C of v.options)b.options.push({label:C.optionlabel,value:C.optionvalue})}const I={id:v.label,type:v.type,label:v.label,required:v.required,placeholder:v.placeholder,dependencies:x};Object.keys(b).length&&(I.params=b),i().find(C=>C.label===v.label)?i(i().map(C=>C.label===v.label?I:C)):i([...i(),I]),y(o)?.length&&A(o,[...y(o),{counter:y(o).length,schema:JSON.stringify(l)}],!0),console.info("schema4selectorS",y(o))}function h(v){if(console.log(v,i()),i().find(x=>x.label===v)?.value)return console.warn("cannot remove default value");i(i().filter(x=>x.label!==v)),y(o)?.length&&A(o,y(o).filter(x=>x.counter!==y(o).length-1),!0)}function _(){const v={schema:i(),id:r()};n("done",v)}var T={get id(){return r()},set id(v=""){r(v),ct()},get debug(){return s()},set debug(v=!1){s(v),ct()},get output_schema(){return i()},set output_schema(v=[]){i(v),ct()}},$=Li(),k=ht($);oe(k,"id","table_specs"),oe(k,"disablepagination","yes"),Je(()=>oe(k,"headers",JSON.stringify(f))),Je(()=>oe(k,"rows",JSON.stringify(y(u)))),oe(k,"add_item","yes");var E=Sn(k),X=Sn(E);X.__click=_,rn(E),rn(k);var q=Mt(k,2);{var le=v=>{var b=Kn(),x=ht(b);Vr(x,17,()=>y(o),I=>I.counter,(I,C)=>{var te=Kn(),_e=ht(te);{var Mi=zt=>{var Re=Ni();oe(Re,"title","Add property"),Je(()=>oe(Re,"show",y(d)?"yes":"no")),Je(()=>oe(Re,"schema",y(C).schema)),Ke("modalFormConfirm",Re,Ze=>{console.log(Ze.detail),c(Ze.detail),A(d,!1)}),Ke("modalFormCancel",Re,Ze=>{console.log("cancelform"),A(d,!1)}),Ke("modalShow",Re,Ze=>{console.log("modalShow"),A(d,Ze.detail.show,!0)}),we(zt,Re)};mt(_e,zt=>{y(C).counter===y(o).length-1&&zt(Mi)})}we(I,te)}),we(v,b)};mt(q,v=>{y(o)&&v(le)})}var He=Mt(q,2);{var ae=v=>{var b=Ri(),x=Mt(ht(b),2);{var I=te=>{var _e=Oi();oe(_e,"hide_submit","yes"),Je(()=>oe(_e,"schema",JSON.stringify(i()))),we(te,_e)},C=te=>{var _e=di("...no output");we(te,_e)};mt(x,te=>{i()?.length?te(I):te(C,!1)})}we(v,b)};mt(He,v=>{s()&&v(ae)})}return Ke("tableCustomActionClick",k,v=>{v.detail.action==="delete"&&h(v.detail.itemId)}),Ke("addItem",k,v=>{A(d,!0)}),we(e,$),fn(T)}ui(["click"]),customElements.define("hb-form-composer",Ci(nr,{id:{},debug:{},output_schema:{}},[],[],!0)),Wt.Component=nr,Object.defineProperty(Wt,Symbol.toStringTag,{value:"Module"})})(this["form-composer"]=this["form-composer"]||{});
11
11
  //# sourceMappingURL=main.iife.js.map