@htmlbricks/hb-form 0.60.59 → 0.60.61

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
1
  (function(Yn){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const Pr=1,Lr=2,Gn=4,na=8,ia=16,aa=1,sa=2,Wn="[",tn="[!",rn="]",zt={},Q=Symbol(),oa="http://www.w3.org/1999/xhtml",Xn=!1;var nn=Array.isArray,la=Array.prototype.indexOf,an=Array.from,jr=Object.keys,Kt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,ua=Object.getOwnPropertyDescriptors,fa=Object.prototype,ca=Array.prototype,zn=Object.getPrototypeOf,Kn=Object.isExtensible;function Zn(e){for(var t=0;t<e.length;t++)e[t]()}function va(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const de=2,sn=4,on=8,Qt=16,ct=32,mt=64,Qn=128,_e=256,Vr=512,re=1024,pe=2048,yt=4096,Ie=8192,Vt=16384,ln=32768,un=65536,ei=1<<17,da=1<<18,er=1<<19,ba=1<<20,fn=1<<21,cn=1<<22,Dt=1<<23,vn=Symbol("$state"),ha=Symbol("legacy props"),_a=Symbol(""),dn=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ti=3,dr=8;function pa(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function ma(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ya(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ga(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function wa(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ea(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function xa(){throw new Error("https://svelte.dev/e/hydration_failed")}function Sa(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ka(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Na(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Dr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let F=!1;function Me(e){F=e}let W;function Pe(e){if(e===null)throw Dr(),zt;return W=e}function br(){return Pe(wt(W))}function vt(e){if(F){if(wt(W)!==null)throw Dr(),zt;W=e}}function bn(){for(var e=0,t=W;;){if(t.nodeType===dr){var r=t.data;if(r===rn){if(e===0)return t;e-=1}else(r===Wn||r===tn)&&(e+=1)}var n=wt(t);t.remove(),t=n}}function ri(e){if(!e||e.nodeType!==dr)throw Dr(),zt;return e.data}function ni(e){return e===this.v}function $a(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ii(e){return!$a(e,this.v)}let Ta=!1,Le=null;function Fr(e){Le=e}function ai(e,t=!1,r){Le={p:Le,c:null,e:null,s:e,x:null,l:null}}function si(e){var t=Le,r=t.e;if(r!==null){t.e=null;for(var n of r)Ni(n)}return e!==void 0&&(t.x=e),Le=t.p,e??{}}function oi(){return!0}const Oa=new WeakMap;function Aa(e){var t=M;if(t===null)return V.f|=Dt,e;if((t.f&ln)===0){if((t.f&Qn)===0)throw!t.parent&&e instanceof Error&&li(e),e;t.b.error(e)}else hn(e,t)}function hn(e,t){for(;t!==null;){if((t.f&Qn)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e instanceof Error&&li(e),e}function li(e){const t=Oa.get(e);t&&(Kt(e,"message",{value:t.message}),Kt(e,"stack",{value:t.stack}))}let hr=[],_n=[];function ui(){var e=hr;hr=[],Zn(e)}function Ca(){var e=_n;_n=[],Zn(e)}function fi(e){hr.length===0&&queueMicrotask(ui),hr.push(e)}function Ra(){hr.length>0&&ui(),_n.length>0&&Ca()}function Ia(){const e=M.b;return e===null&&pa(),e}function Jr(e){var t=de|pe,r=V!==null&&(V.f&de)!==0?V:null;return M===null||r!==null&&(r.f&_e)!==0?t|=_e:M.f|=er,{ctx:Le,deps:null,effects:null,equals:ni,f:t,fn:e,reactions:null,rv:0,v:Q,wv:0,parent:r??M,ac:null}}function Ma(e,t){let r=M;r===null&&ma();var n=r.b,i=void 0,a=_r(Q),s=null,l=!V;return Ga(()=>{try{var u=e();s&&Promise.resolve(u).catch(()=>{})}catch(_){u=Promise.reject(_)}var f=()=>u;i=s?.then(f,f)??Promise.resolve(u),s=i;var c=Z,h=n.is_pending();l&&(n.update_pending_count(1),h||c.increment());const p=(_,v=void 0)=>{s=null,h||c.activate(),v?v!==dn&&(a.f|=Dt,pr(a,v)):((a.f&Dt)!==0&&(a.f^=Dt),pr(a,_)),l&&(n.update_pending_count(-1),h||c.decrement()),di()};if(i.then(p,_=>p(null,_||"unknown")),c)return()=>{queueMicrotask(()=>c.neuter())}}),new Promise(u=>{function f(c){function h(){c===i?u(a):f(i)}c.then(h,h)}f(i)})}function qr(e){const t=Jr(e);return Pi(t),t}function Pa(e){const t=Jr(e);return t.equals=ii,t}function ci(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ze(t[r])}}function La(e){for(var t=e.parent;t!==null;){if((t.f&de)===0)return t;t=t.parent}return null}function pn(e){var t,r=M;Ke(La(e));try{ci(e),t=Fi(e)}finally{Ke(r)}return t}function vi(e){var t=pn(e);if(e.equals(t)||(e.v=t,e.wv=Vi()),!Ut){var r=(xt||(e.f&_e)!==0)&&e.deps!==null?yt:re;oe(e,r)}}function ja(e,t,r){const n=Jr;if(t.length===0){r(e.map(n));return}var i=Z,a=M,s=Va(),l=Ia();Promise.all(t.map(u=>Ma(u))).then(u=>{i?.activate(),s();try{r([...e.map(n),...u])}catch(f){(a.f&Vt)===0&&hn(f,a)}i?.deactivate(),di()}).catch(u=>{l.error(u)})}function Va(){var e=M,t=V,r=Le,n=Z;return function(){Ke(e),me(t),Fr(r),n?.activate()}}function di(){Ke(null),me(null),Fr(null)}const mn=new Set;let Z=null,bi=new Set,Hr=[];function hi(){const e=Hr.shift();Hr.length>0&&queueMicrotask(hi),e()}let Ft=[],Br=null,yn=!1,Ur=!1;class Jt{current=new Map;#t=new Map;#e=new Set;#r=0;#u=null;#f=!1;#i=[];#s=[];#a=[];#n=[];#o=[];#c=[];#v=[];skipped_effects=new Set;process(t){Ft=[];for(const i of t)this.#b(i);if(this.#i.length===0&&this.#r===0){this.#d();var r=this.#a,n=this.#n;this.#a=[],this.#n=[],this.#o=[],Z=null,pi(r),pi(n),Z===null?Z=this:mn.delete(this),this.#u?.resolve()}else this.#l(this.#a),this.#l(this.#n),this.#l(this.#o);for(const i of this.#i)ir(i);for(const i of this.#s)ir(i);this.#i=[],this.#s=[]}#b(t){t.f^=re;for(var r=t.first;r!==null;){var n=r.f,i=(n&(ct|mt))!==0,a=i&&(n&re)!==0,s=a||(n&Ie)!==0||this.skipped_effects.has(r);if(!s&&r.fn!==null){if(i)r.f^=re;else if((n&sn)!==0)this.#n.push(r);else if((n&re)===0)if((n&cn)!==0){var l=r.b?.is_pending()?this.#s:this.#i;l.push(r)}else Gr(r)&&((r.f&Qt)!==0&&this.#o.push(r),ir(r));var u=r.first;if(u!==null){r=u;continue}}var f=r.parent;for(r=r.next;r===null&&f!==null;)r=f.next,f=f.parent}}#l(t){for(const r of t)((r.f&pe)!==0?this.#c:this.#v).push(r),oe(r,re);t.length=0}capture(t,r){this.#t.has(t)||this.#t.set(t,r),this.current.set(t,t.v)}activate(){Z=this}deactivate(){Z=null;for(const t of bi)if(bi.delete(t),t(),Z!==null)break}neuter(){this.#f=!0}flush(){Ft.length>0?_i():this.#d(),Z===this&&(this.#r===0&&mn.delete(this),this.deactivate())}#d(){if(!this.#f)for(const t of this.#e)t();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const t of this.#c)oe(t,pe),tr(t);for(const t of this.#v)oe(t,yt),tr(t);this.#a=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(t){this.#e.add(t)}settled(){return(this.#u??=va()).promise}static ensure(){if(Z===null){const t=Z=new Jt;mn.add(Z),Ur||Jt.enqueue(()=>{Z===t&&t.flush()})}return Z}static enqueue(t){Hr.length===0&&queueMicrotask(hi),Hr.unshift(t)}}function qt(e){var t=Ur;Ur=!0;try{for(var r;;){if(Ra(),Ft.length===0&&(Z?.flush(),Ft.length===0))return Br=null,r;_i()}}finally{Ur=t}}function _i(){var e=nr;yn=!0;try{var t=0;for(Ii(!0);Ft.length>0;){var r=Jt.ensure();if(t++>1e3){var n,i;Da()}r.process(Ft),gt.clear()}}finally{yn=!1,Ii(e),Br=null}}function Da(){try{Ea()}catch(e){hn(e,Br)}}let Ht=null;function pi(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(Vt|Ie))===0&&Gr(n)&&(Ht=[],ir(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?Ai(n):n.fn=null),Ht?.length>0)){gt.clear();for(const i of Ht)ir(i);Ht=[]}}Ht=null}}function tr(e){for(var t=Br=e;t.parent!==null;){t=t.parent;var r=t.f;if(yn&&t===M&&(r&Qt)!==0)return;if((r&(mt|ct))!==0){if((r&re)===0)return;t.f^=re}}Ft.push(t)}const gt=new Map;function _r(e,t){var r={f:0,v:e,reactions:null,equals:ni,rv:0,wv:0};return r}function G(e,t){const r=_r(e);return Pi(r),r}function mi(e,t=!1,r=!0){const n=_r(e);return t||(n.equals=ii),n}function be(e,t,r=!1){V!==null&&(!Yt||(V.f&ei)!==0)&&oi()&&(V.f&(de|Qt|cn|ei))!==0&&!ht?.includes(e)&&Na();let n=r?dt(t):t;return pr(e,n)}function pr(e,t){if(!e.equals(t)){var r=e.v;Ut?gt.set(e,t):gt.set(e,r),e.v=t;var n=Jt.ensure();n.capture(e,r),(e.f&de)!==0&&((e.f&pe)!==0&&pn(e),oe(e,(e.f&_e)===0?re:yt)),e.wv=Vi(),yi(e,pe),M!==null&&(M.f&re)!==0&&(M.f&(ct|mt))===0&&(ye===null?Ka([e]):ye.push(e))}return t}function gn(e){be(e,e.v+1)}function yi(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var a=r[i],s=a.f,l=(s&pe)===0;l&&oe(a,t),(s&de)!==0?yi(a,yt):l&&((s&Qt)!==0&&Ht!==null&&Ht.push(a),tr(a))}}function dt(e){if(typeof e!="object"||e===null||vn in e)return e;const t=zn(e);if(t!==fa&&t!==ca)return e;var r=new Map,n=nn(e),i=G(0),a=Gt,s=l=>{if(Gt===a)return l();var u=V,f=Gt;me(null),ji(a);var c=l();return me(u),ji(f),c};return n&&r.set("length",G(e.length)),new Proxy(e,{defineProperty(l,u,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Sa();var c=r.get(u);return c===void 0?c=s(()=>{var h=G(f.value);return r.set(u,h),h}):be(c,f.value,!0),!0},deleteProperty(l,u){var f=r.get(u);if(f===void 0){if(u in l){const c=s(()=>G(Q));r.set(u,c),gn(i)}}else be(f,Q),gn(i);return!0},get(l,u,f){if(u===vn)return e;var c=r.get(u),h=u in l;if(c===void 0&&(!h||Zt(l,u)?.writable)&&(c=s(()=>{var _=dt(h?l[u]:Q),v=G(_);return v}),r.set(u,c)),c!==void 0){var p=o(c);return p===Q?void 0:p}return Reflect.get(l,u,f)},getOwnPropertyDescriptor(l,u){var f=Reflect.getOwnPropertyDescriptor(l,u);if(f&&"value"in f){var c=r.get(u);c&&(f.value=o(c))}else if(f===void 0){var h=r.get(u),p=h?.v;if(h!==void 0&&p!==Q)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return f},has(l,u){if(u===vn)return!0;var f=r.get(u),c=f!==void 0&&f.v!==Q||Reflect.has(l,u);if(f!==void 0||M!==null&&(!c||Zt(l,u)?.writable)){f===void 0&&(f=s(()=>{var p=c?dt(l[u]):Q,_=G(p);return _}),r.set(u,f));var h=o(f);if(h===Q)return!1}return c},set(l,u,f,c){var h=r.get(u),p=u in l;if(n&&u==="length")for(var _=f;_<h.v;_+=1){var v=r.get(_+"");v!==void 0?be(v,Q):_ in l&&(v=s(()=>G(Q)),r.set(_+"",v))}if(h===void 0)(!p||Zt(l,u)?.writable)&&(h=s(()=>G(void 0)),be(h,dt(f)),r.set(u,h));else{p=h.v!==Q;var y=s(()=>dt(f));be(h,y)}var $=Reflect.getOwnPropertyDescriptor(l,u);if($?.set&&$.set.call(c,f),!p){if(n&&typeof u=="string"){var N=r.get("length"),O=Number(u);Number.isInteger(O)&&O>=N.v&&be(N,O+1)}gn(i)}return!0},ownKeys(l){o(i);var u=Reflect.ownKeys(l).filter(h=>{var p=r.get(h);return p===void 0||p.v!==Q});for(var[f,c]of r)c.v!==Q&&!(f in l)&&u.push(f);return u},setPrototypeOf(){ka()}})}var gi,wi,Ei,xi;function wn(){if(gi===void 0){gi=window,wi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Ei=Zt(t,"firstChild").get,xi=Zt(t,"nextSibling").get,Kn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Kn(r)&&(r.__t=void 0)}}function bt(e=""){return document.createTextNode(e)}function Bt(e){return Ei.call(e)}function wt(e){return xi.call(e)}function Et(e,t){if(!F)return Bt(e);var r=Bt(W);return r===null&&(r=W.appendChild(bt())),Pe(r),r}function J(e,t){if(!F){var r=Bt(e);return r instanceof Comment&&r.data===""?wt(r):r}return W}function Yr(e,t=1,r=!1){let n=F?W:e;for(var i;t--;)i=n,n=wt(n);if(!F)return n;if(r&&n?.nodeType!==ti){var a=bt();return n===null?i?.after(a):n.before(a),Pe(a),a}return Pe(n),n}function Si(e){e.textContent=""}function ki(){return!1}function En(e){var t=V,r=M;me(null),Ke(null);try{return e()}finally{me(t),Ke(r)}}function Fa(e){M===null&&V===null&&wa(),V!==null&&(V.f&_e)!==0&&M===null&&ga(),Ut&&ya()}function Ja(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Xe(e,t,r,n=!0){var i=M;i!==null&&(i.f&Ie)!==0&&(e|=Ie);var a={ctx:Le,deps:null,nodes_start:null,nodes_end:null,f:e|pe,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{ir(a),a.f|=ln}catch(u){throw ze(a),u}else t!==null&&tr(a);if(n){var s=a;if(r&&s.deps===null&&s.teardown===null&&s.nodes_start===null&&s.first===s.last&&(s.f&er)===0&&(s=s.first),s!==null&&(s.parent=i,i!==null&&Ja(s,i),V!==null&&(V.f&de)!==0&&(e&mt)===0)){var l=V;(l.effects??=[]).push(s)}}return a}function qa(e){const t=Xe(on,null,!1);return oe(t,re),t.teardown=e,t}function Ha(e){Fa();var t=M.f,r=!V&&(t&ct)!==0&&(t&ln)===0;if(r){var n=Le;(n.e??=[]).push(e)}else return Ni(e)}function Ni(e){return Xe(sn|ba,e,!1)}function Ba(e){Jt.ensure();const t=Xe(mt|er,e,!0);return()=>{ze(t)}}function Ua(e){Jt.ensure();const t=Xe(mt|er,e,!0);return(r={})=>new Promise(n=>{r.outro?xn(t,()=>{ze(t),n(void 0)}):(ze(t),n(void 0))})}function Ya(e){return Xe(sn,e,!1)}function Ga(e){return Xe(cn|er,e,!0)}function Wa(e,t=0){return Xe(on|t,e,!0)}function m(e,t=[],r=[]){ja(t,r,n=>{Xe(on,()=>e(...n.map(o)),!0)})}function $i(e,t=0){var r=Xe(Qt|t,e,!0);return r}function rr(e,t=!0){return Xe(ct|er,e,!0,t)}function Ti(e){var t=e.teardown;if(t!==null){const r=Ut,n=V;Mi(!0),me(null);try{t.call(null)}finally{Mi(r),me(n)}}}function Oi(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&En(()=>{i.abort(dn)});var n=r.next;(r.f&mt)!==0?r.parent=null:ze(r,t),r=n}}function Xa(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&ct)===0&&ze(t),t=r}}function ze(e,t=!0){var r=!1;(t||(e.f&da)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(za(e.nodes_start,e.nodes_end),r=!0),Oi(e,t&&!r),Wr(e,0),oe(e,Vt);var n=e.transitions;if(n!==null)for(const a of n)a.stop();Ti(e);var i=e.parent;i!==null&&i.first!==null&&Ai(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function za(e,t){for(;e!==null;){var r=e===t?null:wt(e);e.remove(),e=r}}function Ai(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function xn(e,t){var r=[];Sn(e,r,!0),Ci(r,()=>{ze(e),t&&t()})}function Ci(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Sn(e,t,r){if((e.f&Ie)===0){if(e.f^=Ie,e.transitions!==null)for(const s of e.transitions)(s.is_global||r)&&t.push(s);for(var n=e.first;n!==null;){var i=n.next,a=(n.f&un)!==0||(n.f&ct)!==0;Sn(n,t,a?r:!1),n=i}}}function kn(e){Ri(e,!0)}function Ri(e,t){if((e.f&Ie)!==0){e.f^=Ie,(e.f&re)===0&&(oe(e,pe),tr(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&un)!==0||(r.f&ct)!==0;Ri(r,i?t:!1),r=n}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let nr=!1;function Ii(e){nr=e}let Ut=!1;function Mi(e){Ut=e}let V=null,Yt=!1;function me(e){V=e}let M=null;function Ke(e){M=e}let ht=null;function Pi(e){V!==null&&(ht===null?ht=[e]:ht.push(e))}let ae=null,he=0,ye=null;function Ka(e){ye=e}let Li=1,mr=0,Gt=mr;function ji(e){Gt=e}let xt=!1;function Vi(){return++Li}function Gr(e){var t=e.f;if((t&pe)!==0)return!0;if((t&yt)!==0){var r=e.deps,n=(t&_e)!==0;if(r!==null){var i,a,s=(t&Vr)!==0,l=n&&M!==null&&!xt,u=r.length;if((s||l)&&(M===null||(M.f&Vt)===0)){var f=e,c=f.parent;for(i=0;i<u;i++)a=r[i],(s||!a?.reactions?.includes(f))&&(a.reactions??=[]).push(f);s&&(f.f^=Vr),l&&c!==null&&(c.f&_e)===0&&(f.f^=_e)}for(i=0;i<u;i++)if(a=r[i],Gr(a)&&vi(a),a.wv>e.wv)return!0}(!n||M!==null&&!xt)&&oe(e,re)}return!1}function Di(e,t,r=!0){var n=e.reactions;if(n!==null&&!ht?.includes(e))for(var i=0;i<n.length;i++){var a=n[i];(a.f&de)!==0?Di(a,t,!1):t===a&&(r?oe(a,pe):(a.f&re)!==0&&oe(a,yt),tr(a))}}function Fi(e){var t=ae,r=he,n=ye,i=V,a=xt,s=ht,l=Le,u=Yt,f=Gt,c=e.f;ae=null,he=0,ye=null,xt=(c&_e)!==0&&(Yt||!nr||V===null),V=(c&(ct|mt))===0?e:null,ht=null,Fr(e.ctx),Yt=!1,Gt=++mr,e.ac!==null&&(En(()=>{e.ac.abort(dn)}),e.ac=null);try{e.f|=fn;var h=e.fn,p=h(),_=e.deps;if(ae!==null){var v;if(Wr(e,he),_!==null&&he>0)for(_.length=he+ae.length,v=0;v<ae.length;v++)_[he+v]=ae[v];else e.deps=_=ae;if(!xt||(c&de)!==0&&e.reactions!==null)for(v=he;v<_.length;v++)(_[v].reactions??=[]).push(e)}else _!==null&&he<_.length&&(Wr(e,he),_.length=he);if(oi()&&ye!==null&&!Yt&&_!==null&&(e.f&(de|yt|pe))===0)for(v=0;v<ye.length;v++)Di(ye[v],e);return i!==null&&i!==e&&(mr++,ye!==null&&(n===null?n=ye:n.push(...ye))),(e.f&Dt)!==0&&(e.f^=Dt),p}catch(y){return Aa(y)}finally{e.f^=fn,ae=t,he=r,ye=n,V=i,xt=a,ht=s,Fr(l),Yt=u,Gt=f}}function Za(e,t){let r=t.reactions;if(r!==null){var n=la.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(t.f&de)!==0&&(ae===null||!ae.includes(t))&&(oe(t,yt),(t.f&(_e|Vr))===0&&(t.f^=Vr),ci(t),Wr(t,0))}function Wr(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Za(e,r[n])}function ir(e){var t=e.f;if((t&Vt)===0){oe(e,re);var r=M,n=nr;M=e,nr=!0;try{(t&Qt)!==0?Xa(e):Oi(e),Ti(e);var i=Fi(e);e.teardown=typeof i=="function"?i:null,e.wv=Li;var a;Xn&&Ta&&(e.f&pe)!==0&&e.deps}finally{nr=n,M=r}}}function o(e){var t=e.f,r=(t&de)!==0;if(V!==null&&!Yt){var n=M!==null&&(M.f&Vt)!==0;if(!n&&!ht?.includes(e)){var i=V.deps;if((V.f&fn)!==0)e.rv<mr&&(e.rv=mr,ae===null&&i!==null&&i[he]===e?he++:ae===null?ae=[e]:(!xt||!ae.includes(e))&&ae.push(e));else{(V.deps??=[]).push(e);var a=e.reactions;a===null?e.reactions=[V]:a.includes(V)||a.push(V)}}}else if(r&&e.deps===null&&e.effects===null){var s=e,l=s.parent;l!==null&&(l.f&_e)===0&&(s.f^=_e)}if(Ut){if(gt.has(e))return gt.get(e);if(r){s=e;var u=s.v;return((s.f&re)===0&&s.reactions!==null||Ji(s))&&(u=pn(s)),gt.set(s,u),u}}else r&&(s=e,Gr(s)&&vi(s));if((e.f&Dt)!==0)throw e.v;return e.v}function Ji(e){if(e.v===Q)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(gt.has(t)||(t.f&de)!==0&&Ji(t))return!0;return!1}const Qa=-7169;function oe(e,t){e.f=e.f&Qa|t}const qi=new Set,Nn=new Set;function es(e,t,r,n={}){function i(a){if(n.capture||yr.call(t,a),!a.cancelBubble)return En(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?fi(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function A(e,t,r,n,i){var a={capture:n,passive:i},s=es(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&qa(()=>{t.removeEventListener(e,s,a)})}function ts(e){for(var t=0;t<e.length;t++)qi.add(e[t]);for(var r of Nn)r(e)}let Hi=null;function yr(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;Hi=e;var s=0,l=Hi===e&&e.__root;if(l){var u=i.indexOf(l);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;u<=f&&(s=u)}if(a=i[s]||e.target,a!==t){Kt(e,"currentTarget",{configurable:!0,get(){return a||r}});var c=V,h=M;me(null),Ke(null);try{for(var p,_=[];a!==null;){var v=a.assignedSlot||a.parentNode||a.host||null;try{var y=a["__"+n];if(y!=null&&(!a.disabled||e.target===a))if(nn(y)){var[$,...N]=y;$.apply(a,[e,...N])}else y.call(a,e)}catch(O){p?_.push(O):p=O}if(e.cancelBubble||v===t||v===null)break;a=v}if(p){for(let O of _)queueMicrotask(()=>{throw O});throw p}}finally{e.__root=t,delete e.currentTarget,me(c),Ke(h)}}}function rs(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function St(e,t){var r=M;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function R(e,t){var r=(t&aa)!==0,n=(t&sa)!==0,i,a=!e.startsWith("<!>");return()=>{if(F)return St(W,null),W;i===void 0&&(i=rs(a?e:"<!>"+e),r||(i=Bt(i)));var s=n||wi?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=Bt(s),u=s.lastChild;St(l,u)}else St(s,s);return s}}function ns(e=""){if(!F){var t=bt(e+"");return St(t,t),t}var r=W;return r.nodeType!==ti&&(r.before(r=bt()),Pe(r)),St(r,r),r}function H(){if(F)return St(W,null),W;var e=document.createDocumentFragment(),t=document.createComment(""),r=bt();return e.append(t,r),St(t,r),e}function b(e,t){if(F){M.nodes_end=W,br();return}e!==null&&e.before(t)}const is=["touchstart","touchmove"];function as(e){return is.includes(e)}function Bi(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Ui(e,t){return Yi(e,t)}function ss(e,t){wn(),t.intro=t.intro??!1;const r=t.target,n=F,i=W;try{for(var a=Bt(r);a&&(a.nodeType!==dr||a.data!==Wn);)a=wt(a);if(!a)throw zt;Me(!0),Pe(a),br();const s=Yi(e,{...t,anchor:a});if(W===null||W.nodeType!==dr||W.data!==rn)throw Dr(),zt;return Me(!1),s}catch(s){if(s instanceof Error&&s.message.split(`
2
- `).some(l=>l.startsWith("https://svelte.dev/e/")))throw s;return s!==zt&&console.warn("Failed to hydrate: ",s),t.recover===!1&&xa(),wn(),Si(r),Me(!1),Ui(e,t)}finally{Me(n),Pe(i)}}const ar=new Map;function Yi(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:s=!0}){wn();var l=new Set,u=h=>{for(var p=0;p<h.length;p++){var _=h[p];if(!l.has(_)){l.add(_);var v=as(_);t.addEventListener(_,yr,{passive:v});var y=ar.get(_);y===void 0?(document.addEventListener(_,yr,{passive:v}),ar.set(_,1)):ar.set(_,y+1)}}};u(an(qi)),Nn.add(u);var f=void 0,c=Ua(()=>{var h=r??t.appendChild(bt());return rr(()=>{if(a){ai({});var p=Le;p.c=a}i&&(n.$$events=i),F&&St(h,null),f=e(h,n)||{},F&&(M.nodes_end=W),a&&si()}),()=>{for(var p of l){t.removeEventListener(p,yr);var _=ar.get(p);--_===0?(document.removeEventListener(p,yr),ar.delete(p)):ar.set(p,_)}Nn.delete(u),h!==r&&h.parentNode?.removeChild(h)}});return $n.set(f,c),f}let $n=new WeakMap;function os(e,t){const r=$n.get(e);return r?($n.delete(e),r(t)):Promise.resolve()}function L(e,t,r=!1){F&&br();var n=e,i=null,a=null,s=Q,l=r?un:0,u=!1;const f=(_,v=!0)=>{u=!0,p(v,_)};var c=null;function h(){c!==null&&(c.lastChild.remove(),n.before(c),c=null);var _=s?i:a,v=s?a:i;_&&kn(_),v&&xn(v,()=>{s?a=null:i=null})}const p=(_,v)=>{if(s===(s=_))return;let y=!1;if(F){const q=ri(n)===tn;!!s===q&&(n=bn(),Pe(n),Me(!1),y=!0)}var $=ki(),N=n;if($&&(c=document.createDocumentFragment(),c.append(N=bt())),s?i??=v&&rr(()=>v(N)):a??=v&&rr(()=>v(N)),$){var O=Z,D=s?i:a,k=s?a:i;D&&O.skipped_effects.delete(D),k&&O.skipped_effects.add(k),O.add_callback(h)}else h();y&&Me(!0)};$i(()=>{u=!1,t(f),u||p(null,null)},l),F&&(n=W)}function ls(e,t,r){for(var n=e.items,i=[],a=t.length,s=0;s<a;s++)Sn(t[s].e,i,!0);var l=a>0&&i.length===0&&r!==null;if(l){var u=r.parentNode;Si(u),u.append(r),n.clear(),Ze(e,t[0].prev,t[a-1].next)}Ci(i,()=>{for(var f=0;f<a;f++){var c=t[f];l||(n.delete(c.k),Ze(e,c.prev,c.next)),ze(c.e,!l)}})}function Gi(e,t,r,n,i,a=null){var s=e,l={flags:t,items:new Map,first:null},u=(t&Gn)!==0;if(u){var f=e;s=F?Pe(Bt(f)):f.appendChild(bt())}F&&br();var c=null,h=!1,p=new Map,_=Pa(()=>{var N=r();return nn(N)?N:N==null?[]:an(N)}),v,y;function $(){us(y,v,l,p,s,i,t,n,r),a!==null&&(v.length===0?c?kn(c):c=rr(()=>a(s)):c!==null&&xn(c,()=>{c=null}))}$i(()=>{y??=M,v=o(_);var N=v.length;if(h&&N===0)return;h=N===0;let O=!1;if(F){var D=ri(s)===tn;D!==(N===0)&&(s=bn(),Pe(s),Me(!1),O=!0)}if(F){for(var k=null,q,x=0;x<N;x++){if(W.nodeType===dr&&W.data===rn){s=W,O=!0,Me(!1);break}var I=v[x],P=n(I,x);q=Tn(W,l,k,null,I,P,x,i,t,r),l.items.set(P,q),k=q}N>0&&Pe(bn())}if(F)N===0&&a&&(c=rr(()=>a(s)));else if(ki()){var ne=new Set,C=Z;for(x=0;x<N;x+=1){I=v[x],P=n(I,x);var fe=l.items.get(P)??p.get(P);fe?(t&(Pr|Lr))!==0&&Wi(fe,I,x,t):(q=Tn(null,l,null,null,I,P,x,i,t,r,!0),p.set(P,q)),ne.add(P)}for(const[se,j]of l.items)ne.has(se)||C.skipped_effects.add(j.e);C.add_callback($)}else $();O&&Me(!0),o(_)}),F&&(s=W)}function us(e,t,r,n,i,a,s,l,u){var f=(s&na)!==0,c=(s&(Pr|Lr))!==0,h=t.length,p=r.items,_=r.first,v=_,y,$=null,N,O=[],D=[],k,q,x,I;if(f)for(I=0;I<h;I+=1)k=t[I],q=l(k,I),x=p.get(q),x!==void 0&&(x.a?.measure(),(N??=new Set).add(x));for(I=0;I<h;I+=1){if(k=t[I],q=l(k,I),x=p.get(q),x===void 0){var P=n.get(q);if(P!==void 0){n.delete(q),p.set(q,P);var ne=$?$.next:v;Ze(r,$,P),Ze(r,P,ne),On(P,ne,i),$=P}else{var C=v?v.e.nodes_start:i;$=Tn(C,r,$,$===null?r.first:$.next,k,q,I,a,s,u)}p.set(q,$),O=[],D=[],v=$.next;continue}if(c&&Wi(x,k,I,s),(x.e.f&Ie)!==0&&(kn(x.e),f&&(x.a?.unfix(),(N??=new Set).delete(x))),x!==v){if(y!==void 0&&y.has(x)){if(O.length<D.length){var fe=D[0],se;$=fe.prev;var j=O[0],T=O[O.length-1];for(se=0;se<O.length;se+=1)On(O[se],fe,i);for(se=0;se<D.length;se+=1)y.delete(D[se]);Ze(r,j.prev,T.next),Ze(r,$,j),Ze(r,T,fe),v=fe,$=T,I-=1,O=[],D=[]}else y.delete(x),On(x,v,i),Ze(r,x.prev,x.next),Ze(r,x,$===null?r.first:$.next),Ze(r,$,x),$=x;continue}for(O=[],D=[];v!==null&&v.k!==q;)(v.e.f&Ie)===0&&(y??=new Set).add(v),D.push(v),v=v.next;if(v===null)continue;x=v}O.push(x),$=x,v=x.next}if(v!==null||y!==void 0){for(var X=y===void 0?[]:an(y);v!==null;)(v.e.f&Ie)===0&&X.push(v),v=v.next;var Wt=X.length;if(Wt>0){var zr=(s&Gn)!==0&&h===0?i:null;if(f){for(I=0;I<Wt;I+=1)X[I].a?.measure();for(I=0;I<Wt;I+=1)X[I].a?.fix()}ls(r,X,zr)}}f&&fi(()=>{if(N!==void 0)for(x of N)x.a?.apply()}),e.first=r.first&&r.first.e,e.last=$&&$.e;for(var Mn of n.values())ze(Mn.e);n.clear()}function Wi(e,t,r,n){(n&Pr)!==0&&pr(e.v,t),(n&Lr)!==0?pr(e.i,r):e.i=r}function Tn(e,t,r,n,i,a,s,l,u,f,c){var h=(u&Pr)!==0,p=(u&ia)===0,_=h?p?mi(i,!1,!1):_r(i):i,v=(u&Lr)===0?s:_r(s),y={i:v,v:_,k:a,a:null,e:null,prev:r,next:n};try{if(e===null){var $=document.createDocumentFragment();$.append(e=bt())}return y.e=rr(()=>l(e,_,v,f),F),y.e.prev=r&&r.e,y.e.next=n&&n.e,r===null?c||(t.first=y):(r.next=y,r.e.next=y.e),n!==null&&(n.prev=y,n.e.prev=y.e),y}finally{}}function On(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,a=e.e.nodes_start;a!==null&&a!==n;){var s=wt(a);i.before(a),a=s}}function Ze(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function An(e,t,r,n,i){F&&br();var a=t.$$slots?.[r],s=!1;a===!0&&(a=t[r==="default"?"children":r],s=!0),a===void 0?i!==null&&i(e):a(e,s?()=>n:n)}function fs(e,t){Ya(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function cs(e,t,r){var n=e==null?"":""+e;return n===""?null:n}function vs(e,t){return e==null?null:String(e)}function U(e,t,r,n,i,a){var s=e.__className;if(F||s!==r||s===void 0){var l=cs(r);(!F||l!==e.getAttribute("class"))&&(l==null?e.removeAttribute("class"):e.className=l),e.__className=r}return a}function B(e,t,r,n){var i=e.__style;if(F||i!==t){var a=vs(t);(!F||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e.__style=t}return n}const ds=Symbol("is custom element"),bs=Symbol("is html");function Cn(e,t,r,n){var i=hs(e);F&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[_a]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Xi(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function g(e,t,r){var n=V,i=M;let a=F;F&&Me(!1),me(null),Ke(null);try{t!=="style"&&(Rn.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?Xi(e).includes(t):r&&typeof r=="object")?e[t]=r:Cn(e,t,r==null?r:String(r))}finally{me(n),Ke(i),a&&Me(!0)}}function hs(e){return e.__attributes??={[ds]:e.nodeName.includes("-"),[bs]:e.namespaceURI===oa}}var Rn=new Map;function Xi(e){var t=e.getAttribute("is")||e.nodeName,r=Rn.get(t);if(r)return r;Rn.set(t,r=[]);for(var n,i=e,a=Element.prototype;a!==i;){n=ua(i);for(var s in n)n[s].set&&r.push(s);i=zn(i)}return r}function sr(e,t,r,n){var i=n,a=!0,s=()=>(a&&(a=!1,i=n),i),l;l=e[t],l===void 0&&n!==void 0&&(l=s());var u;u=()=>{var p=e[t];return p===void 0?s():(a=!0,p)};var f=!1,c=Jr(()=>(f=!1,u())),h=M;return(function(p,_){if(arguments.length>0){const v=_?o(c):p;return be(c,v),f=!0,i!==void 0&&(i=v),p}return Ut&&f||(h.f&Vt)!==0?c.v:o(c)})}function _s(e){return new ps(e)}class ps{#t;#e;constructor(t){var r=new Map,n=(a,s)=>{var l=mi(s,!1,!1);return r.set(a,l),l};const i=new Proxy({...t.props||{},$$events:{}},{get(a,s){return o(r.get(s)??n(s,Reflect.get(a,s)))},has(a,s){return s===ha?!0:(o(r.get(s)??n(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,l){return be(r.get(s)??n(s,l),l),Reflect.set(a,s,l)}});this.#e=(t.hydrate?ss:Ui)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&qt(),this.#t=i.$$events;for(const a of Object.keys(this.#e))a==="$set"||a==="$destroy"||a==="$on"||Kt(this,a,{get(){return this.#e[a]},set(s){this.#e[a]=s},enumerable:!0});this.#e.$set=a=>{Object.assign(i,a)},this.#e.$destroy=()=>{os(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}let zi;typeof HTMLElement=="function"&&(zi=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const a=document.createElement("slot");n!=="default"&&(a.name=n),b(i,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=ms(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Xr(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=_s({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Ba(()=>{Wa(()=>{this.$$r=!0;for(const n of jr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Xr(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const a=this.$$c.$on(n,i);this.$$l_u.set(i,a)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Xr(e,r,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 jr(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Xr(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){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(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ms(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ys(e,t,r,n,i,a){let s=class extends zi{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return jr(t).map(l=>(t[l].attribute||l).toLowerCase())}};return jr(t).forEach(l=>{Kt(s.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(u){u=Xr(l,u,t),this.$$d[l]=u;var f=this.$$c;if(f){var c=Zt(f,l)?.get;c?f[l]=u:f.$set({[l]:u})}}})}),n.forEach(l=>{Kt(s.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=s,s}const le={version:"0.60.59"},gs=(e,t)=>e.reduce((r,n)=>{for(const i of t(n))(r[i]=r[i]||[]).push(n);return r},{});function ue(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const r=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const n=document.createElement("script");if(n.id=t+"-script",n.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${r}`,e?.local)n.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];n.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${r}`}document.head.appendChild(n)}catch(n){console.warn(n)}}function ws(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var or={},In,Ki;function Es(){if(Ki)return In;Ki=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
2
+ `).some(l=>l.startsWith("https://svelte.dev/e/")))throw s;return s!==zt&&console.warn("Failed to hydrate: ",s),t.recover===!1&&xa(),wn(),Si(r),Me(!1),Ui(e,t)}finally{Me(n),Pe(i)}}const ar=new Map;function Yi(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:s=!0}){wn();var l=new Set,u=h=>{for(var p=0;p<h.length;p++){var _=h[p];if(!l.has(_)){l.add(_);var v=as(_);t.addEventListener(_,yr,{passive:v});var y=ar.get(_);y===void 0?(document.addEventListener(_,yr,{passive:v}),ar.set(_,1)):ar.set(_,y+1)}}};u(an(qi)),Nn.add(u);var f=void 0,c=Ua(()=>{var h=r??t.appendChild(bt());return rr(()=>{if(a){ai({});var p=Le;p.c=a}i&&(n.$$events=i),F&&St(h,null),f=e(h,n)||{},F&&(M.nodes_end=W),a&&si()}),()=>{for(var p of l){t.removeEventListener(p,yr);var _=ar.get(p);--_===0?(document.removeEventListener(p,yr),ar.delete(p)):ar.set(p,_)}Nn.delete(u),h!==r&&h.parentNode?.removeChild(h)}});return $n.set(f,c),f}let $n=new WeakMap;function os(e,t){const r=$n.get(e);return r?($n.delete(e),r(t)):Promise.resolve()}function L(e,t,r=!1){F&&br();var n=e,i=null,a=null,s=Q,l=r?un:0,u=!1;const f=(_,v=!0)=>{u=!0,p(v,_)};var c=null;function h(){c!==null&&(c.lastChild.remove(),n.before(c),c=null);var _=s?i:a,v=s?a:i;_&&kn(_),v&&xn(v,()=>{s?a=null:i=null})}const p=(_,v)=>{if(s===(s=_))return;let y=!1;if(F){const q=ri(n)===tn;!!s===q&&(n=bn(),Pe(n),Me(!1),y=!0)}var $=ki(),N=n;if($&&(c=document.createDocumentFragment(),c.append(N=bt())),s?i??=v&&rr(()=>v(N)):a??=v&&rr(()=>v(N)),$){var O=Z,D=s?i:a,k=s?a:i;D&&O.skipped_effects.delete(D),k&&O.skipped_effects.add(k),O.add_callback(h)}else h();y&&Me(!0)};$i(()=>{u=!1,t(f),u||p(null,null)},l),F&&(n=W)}function ls(e,t,r){for(var n=e.items,i=[],a=t.length,s=0;s<a;s++)Sn(t[s].e,i,!0);var l=a>0&&i.length===0&&r!==null;if(l){var u=r.parentNode;Si(u),u.append(r),n.clear(),Ze(e,t[0].prev,t[a-1].next)}Ci(i,()=>{for(var f=0;f<a;f++){var c=t[f];l||(n.delete(c.k),Ze(e,c.prev,c.next)),ze(c.e,!l)}})}function Gi(e,t,r,n,i,a=null){var s=e,l={flags:t,items:new Map,first:null},u=(t&Gn)!==0;if(u){var f=e;s=F?Pe(Bt(f)):f.appendChild(bt())}F&&br();var c=null,h=!1,p=new Map,_=Pa(()=>{var N=r();return nn(N)?N:N==null?[]:an(N)}),v,y;function $(){us(y,v,l,p,s,i,t,n,r),a!==null&&(v.length===0?c?kn(c):c=rr(()=>a(s)):c!==null&&xn(c,()=>{c=null}))}$i(()=>{y??=M,v=o(_);var N=v.length;if(h&&N===0)return;h=N===0;let O=!1;if(F){var D=ri(s)===tn;D!==(N===0)&&(s=bn(),Pe(s),Me(!1),O=!0)}if(F){for(var k=null,q,x=0;x<N;x++){if(W.nodeType===dr&&W.data===rn){s=W,O=!0,Me(!1);break}var I=v[x],P=n(I,x);q=Tn(W,l,k,null,I,P,x,i,t,r),l.items.set(P,q),k=q}N>0&&Pe(bn())}if(F)N===0&&a&&(c=rr(()=>a(s)));else if(ki()){var ne=new Set,C=Z;for(x=0;x<N;x+=1){I=v[x],P=n(I,x);var fe=l.items.get(P)??p.get(P);fe?(t&(Pr|Lr))!==0&&Wi(fe,I,x,t):(q=Tn(null,l,null,null,I,P,x,i,t,r,!0),p.set(P,q)),ne.add(P)}for(const[se,j]of l.items)ne.has(se)||C.skipped_effects.add(j.e);C.add_callback($)}else $();O&&Me(!0),o(_)}),F&&(s=W)}function us(e,t,r,n,i,a,s,l,u){var f=(s&na)!==0,c=(s&(Pr|Lr))!==0,h=t.length,p=r.items,_=r.first,v=_,y,$=null,N,O=[],D=[],k,q,x,I;if(f)for(I=0;I<h;I+=1)k=t[I],q=l(k,I),x=p.get(q),x!==void 0&&(x.a?.measure(),(N??=new Set).add(x));for(I=0;I<h;I+=1){if(k=t[I],q=l(k,I),x=p.get(q),x===void 0){var P=n.get(q);if(P!==void 0){n.delete(q),p.set(q,P);var ne=$?$.next:v;Ze(r,$,P),Ze(r,P,ne),On(P,ne,i),$=P}else{var C=v?v.e.nodes_start:i;$=Tn(C,r,$,$===null?r.first:$.next,k,q,I,a,s,u)}p.set(q,$),O=[],D=[],v=$.next;continue}if(c&&Wi(x,k,I,s),(x.e.f&Ie)!==0&&(kn(x.e),f&&(x.a?.unfix(),(N??=new Set).delete(x))),x!==v){if(y!==void 0&&y.has(x)){if(O.length<D.length){var fe=D[0],se;$=fe.prev;var j=O[0],T=O[O.length-1];for(se=0;se<O.length;se+=1)On(O[se],fe,i);for(se=0;se<D.length;se+=1)y.delete(D[se]);Ze(r,j.prev,T.next),Ze(r,$,j),Ze(r,T,fe),v=fe,$=T,I-=1,O=[],D=[]}else y.delete(x),On(x,v,i),Ze(r,x.prev,x.next),Ze(r,x,$===null?r.first:$.next),Ze(r,$,x),$=x;continue}for(O=[],D=[];v!==null&&v.k!==q;)(v.e.f&Ie)===0&&(y??=new Set).add(v),D.push(v),v=v.next;if(v===null)continue;x=v}O.push(x),$=x,v=x.next}if(v!==null||y!==void 0){for(var X=y===void 0?[]:an(y);v!==null;)(v.e.f&Ie)===0&&X.push(v),v=v.next;var Wt=X.length;if(Wt>0){var zr=(s&Gn)!==0&&h===0?i:null;if(f){for(I=0;I<Wt;I+=1)X[I].a?.measure();for(I=0;I<Wt;I+=1)X[I].a?.fix()}ls(r,X,zr)}}f&&fi(()=>{if(N!==void 0)for(x of N)x.a?.apply()}),e.first=r.first&&r.first.e,e.last=$&&$.e;for(var Mn of n.values())ze(Mn.e);n.clear()}function Wi(e,t,r,n){(n&Pr)!==0&&pr(e.v,t),(n&Lr)!==0?pr(e.i,r):e.i=r}function Tn(e,t,r,n,i,a,s,l,u,f,c){var h=(u&Pr)!==0,p=(u&ia)===0,_=h?p?mi(i,!1,!1):_r(i):i,v=(u&Lr)===0?s:_r(s),y={i:v,v:_,k:a,a:null,e:null,prev:r,next:n};try{if(e===null){var $=document.createDocumentFragment();$.append(e=bt())}return y.e=rr(()=>l(e,_,v,f),F),y.e.prev=r&&r.e,y.e.next=n&&n.e,r===null?c||(t.first=y):(r.next=y,r.e.next=y.e),n!==null&&(n.prev=y,n.e.prev=y.e),y}finally{}}function On(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,a=e.e.nodes_start;a!==null&&a!==n;){var s=wt(a);i.before(a),a=s}}function Ze(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function An(e,t,r,n,i){F&&br();var a=t.$$slots?.[r],s=!1;a===!0&&(a=t[r==="default"?"children":r],s=!0),a===void 0?i!==null&&i(e):a(e,s?()=>n:n)}function fs(e,t){Ya(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function cs(e,t,r){var n=e==null?"":""+e;return n===""?null:n}function vs(e,t){return e==null?null:String(e)}function U(e,t,r,n,i,a){var s=e.__className;if(F||s!==r||s===void 0){var l=cs(r);(!F||l!==e.getAttribute("class"))&&(l==null?e.removeAttribute("class"):e.className=l),e.__className=r}return a}function B(e,t,r,n){var i=e.__style;if(F||i!==t){var a=vs(t);(!F||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e.__style=t}return n}const ds=Symbol("is custom element"),bs=Symbol("is html");function Cn(e,t,r,n){var i=hs(e);F&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[_a]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Xi(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function g(e,t,r){var n=V,i=M;let a=F;F&&Me(!1),me(null),Ke(null);try{t!=="style"&&(Rn.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?Xi(e).includes(t):r&&typeof r=="object")?e[t]=r:Cn(e,t,r==null?r:String(r))}finally{me(n),Ke(i),a&&Me(!0)}}function hs(e){return e.__attributes??={[ds]:e.nodeName.includes("-"),[bs]:e.namespaceURI===oa}}var Rn=new Map;function Xi(e){var t=e.getAttribute("is")||e.nodeName,r=Rn.get(t);if(r)return r;Rn.set(t,r=[]);for(var n,i=e,a=Element.prototype;a!==i;){n=ua(i);for(var s in n)n[s].set&&r.push(s);i=zn(i)}return r}function sr(e,t,r,n){var i=n,a=!0,s=()=>(a&&(a=!1,i=n),i),l;l=e[t],l===void 0&&n!==void 0&&(l=s());var u;u=()=>{var p=e[t];return p===void 0?s():(a=!0,p)};var f=!1,c=Jr(()=>(f=!1,u())),h=M;return(function(p,_){if(arguments.length>0){const v=_?o(c):p;return be(c,v),f=!0,i!==void 0&&(i=v),p}return Ut&&f||(h.f&Vt)!==0?c.v:o(c)})}function _s(e){return new ps(e)}class ps{#t;#e;constructor(t){var r=new Map,n=(a,s)=>{var l=mi(s,!1,!1);return r.set(a,l),l};const i=new Proxy({...t.props||{},$$events:{}},{get(a,s){return o(r.get(s)??n(s,Reflect.get(a,s)))},has(a,s){return s===ha?!0:(o(r.get(s)??n(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,l){return be(r.get(s)??n(s,l),l),Reflect.set(a,s,l)}});this.#e=(t.hydrate?ss:Ui)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&qt(),this.#t=i.$$events;for(const a of Object.keys(this.#e))a==="$set"||a==="$destroy"||a==="$on"||Kt(this,a,{get(){return this.#e[a]},set(s){this.#e[a]=s},enumerable:!0});this.#e.$set=a=>{Object.assign(i,a)},this.#e.$destroy=()=>{os(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}let zi;typeof HTMLElement=="function"&&(zi=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const a=document.createElement("slot");n!=="default"&&(a.name=n),b(i,a)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=ms(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Xr(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=_s({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Ba(()=>{Wa(()=>{this.$$r=!0;for(const n of jr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Xr(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const a=this.$$c.$on(n,i);this.$$l_u.set(i,a)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Xr(e,r,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 jr(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Xr(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){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(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ms(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ys(e,t,r,n,i,a){let s=class extends zi{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return jr(t).map(l=>(t[l].attribute||l).toLowerCase())}};return jr(t).forEach(l=>{Kt(s.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(u){u=Xr(l,u,t),this.$$d[l]=u;var f=this.$$c;if(f){var c=Zt(f,l)?.get;c?f[l]=u:f.$set({[l]:u})}}})}),n.forEach(l=>{Kt(s.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=s,s}const le={version:"0.60.61"},gs=(e,t)=>e.reduce((r,n)=>{for(const i of t(n))(r[i]=r[i]||[]).push(n);return r},{});function ue(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const r=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const n=document.createElement("script");if(n.id=t+"-script",n.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${r}`,e?.local)n.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];n.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${r}`}document.head.appendChild(n)}catch(n){console.warn(n)}}function ws(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var or={},In,Ki;function Es(){if(Ki)return In;Ki=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
3
3
  `,f="/",c="*",h="",p="comment",_="declaration";In=function(y,$){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];$=$||{};var N=1,O=1;function D(j){var T=j.match(t);T&&(N+=T.length);var X=j.lastIndexOf(u);O=~X?j.length-X:O+j.length}function k(){var j={line:N,column:O};return function(T){return T.position=new q(j),P(),T}}function q(j){this.start=j,this.end={line:N,column:O},this.source=$.source}q.prototype.content=y;function x(j){var T=new Error($.source+":"+N+":"+O+": "+j);if(T.reason=j,T.filename=$.source,T.line=N,T.column=O,T.source=y,!$.silent)throw T}function I(j){var T=j.exec(y);if(T){var X=T[0];return D(X),y=y.slice(X.length),T}}function P(){I(r)}function ne(j){var T;for(j=j||[];T=C();)T!==!1&&j.push(T);return j}function C(){var j=k();if(!(f!=y.charAt(0)||c!=y.charAt(1))){for(var T=2;h!=y.charAt(T)&&(c!=y.charAt(T)||f!=y.charAt(T+1));)++T;if(T+=2,h===y.charAt(T-1))return x("End of comment missing");var X=y.slice(2,T-2);return O+=2,D(X),y=y.slice(T),O+=2,j({type:p,comment:X})}}function fe(){var j=k(),T=I(n);if(T){if(C(),!I(i))return x("property missing ':'");var X=I(a),Wt=j({type:_,property:v(T[0].replace(e,h)),value:X?v(X[0].replace(e,h)):h});return I(s),Wt}}function se(){var j=[];ne(j);for(var T;T=fe();)T!==!1&&(j.push(T),ne(j));return j}return P(),se()};function v(y){return y?y.replace(l,h):h}return In}var Zi;function xs(){if(Zi)return or;Zi=1;var e=or&&or.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(or,"__esModule",{value:!0}),or.default=r;var t=e(Es());function r(n,i){var a=null;if(!n||typeof n!="string")return a;var s=(0,t.default)(n),l=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var f=u.property,c=u.value;l?i(f,c,u):c&&(a=a||{},a[f]=c)}}),a}return or}var Ss=xs();const Qi=ws(Ss);Qi.default;var ks=R('<label class="svelte-58vy9y"> </label>'),Ns=R("<hb-input-array-objects></hb-input-array-objects>",2),$s=R("<hb-input-array-tags></hb-input-array-tags>",2),Ts=R("<hb-input-text></hb-input-text>",2),Os=R("<hb-input-color></hb-input-color>",2),As=R("<hb-input-range></hb-input-range>",2),Cs=R("<hb-input-file></hb-input-file>",2),Rs=R("<hb-input-email></hb-input-email>",2),Is=R("<hb-input-date></hb-input-date>",2),Ms=R("<hb-input-datetime></hb-input-datetime>",2),Ps=R("<hb-input-checkbox></hb-input-checkbox>",2),Ls=R("<hb-input-number></hb-input-number>",2),js=R("<hb-input-area></hb-input-area>",2),Vs=R("<hb-input-radio></hb-input-radio>",2),Ds=R("<hb-input-select></hb-input-select>",2),Fs=R('<div class="col mb-3 svelte-58vy9y"><!> <!></div>'),Js=R('<div class="row svelte-58vy9y"></div>'),qs=R('<label class="svelte-58vy9y"> </label>'),Hs=R("<hb-input-text></hb-input-text>",2),Bs=R("<hb-input-array-objects></hb-input-array-objects>",2),Us=R("<hb-input-array-tags></hb-input-array-tags>",2),Ys=R("<hb-input-color></hb-input-color>",2),Gs=R("<hb-input-range></hb-input-range>",2),Ws=R("<hb-input-file></hb-input-file>",2),Xs=R("<hb-input-email></hb-input-email>",2),zs=R("<hb-input-date></hb-input-date>",2),Ks=R("<hb-input-datetime></hb-input-datetime>",2),Zs=R("<hb-input-checkbox></hb-input-checkbox>",2),Qs=R("<hb-input-number></hb-input-number>",2),eo=R("<hb-input-area></hb-input-area>",2),to=R("<hb-input-radio></hb-input-radio>",2),ro=R("<hb-input-select></hb-input-select>",2),no=R('<div class="col mb-3 svelte-58vy9y"><!> <!></div>'),io=(e,t)=>t(),ao=R('<button part="main_button" type="button" class="btn btn-primary svelte-58vy9y"><!></button>'),so=R('<div id="button_container" part="button_container" class="svelte-58vy9y"><span class="svelte-58vy9y"><!></span> <!></div>'),oo=R("<!> <!>",1),lo=R('<div class="container-fluid svelte-58vy9y"><!></div>');const uo={hash:"svelte-58vy9y",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");
4
4
  /*!
5
5
  * Bootstrap v5.1.2 (https://getbootstrap.com/)
@@ -104,5 +104,5 @@ button.svelte-58vy9y {margin:0;font-family:inherit;font-size:inherit;line-height
104
104
  *
105
105
  * @license: MIT License
106
106
  *
107
- */dt({});let r=G(""),n=G(""),i=G(""),a=G(""),s=G(""),l=G(""),u=G(""),f=G(""),c=G(""),h=G(""),p=G(""),_=G(""),v=G(""),y=G("");const $={row:{component:void 0,options:{row:!0}},select:{component:"hb-input-select"},arrayobjects:{component:"hb-input-array-objects"},arraytags:{component:"hb-input-array-tags"},date:{component:"hb-input-date"},datetime:{component:"hb-input-datetime"},text:{component:"hb-input-text"},number:{component:"hb-input-number"},email:{component:"hb-input-email"},color:{component:"hb-input-color"},file:{component:"hb-input-file"},textarea:{component:"hb-input-area"},range:{component:"hb-input-range"},checkbox:{component:"hb-input-checkbox",options:{labelIsHandledByComponent:!0}},radio:{component:"hb-input-radio"}};let N=qr(()=>{const d={};for(const E of D())if(E.type!=="row")d[E.id]=E.value;else if(E.type==="row"&&E.params?.columns?.length)for(const z of E.params.columns)d[z.id]=z.value;return d}),O=sr(t,"id",7,""),D=sr(t,"schema"),k=sr(t,"show_validation",7,"no"),q=sr(t,"hide_submit",7,!1),x=sr(t,"submitted",7,"no"),I=sr(t,"getvals",7,"no"),P=G(dt({})),ne=G(dt({})),C=G(dt({})),fe=qr(()=>{const d=[];for(const E of D())E.type==="row"&&E.params?.columns?.length?d.push(...E.params.columns):d.push(E);return gs(d.filter(E=>E.dependencies?.length),E=>E.dependencies.map(z=>z.id))});function se(d){d?.forEach?.(E=>{const z=$[E.type];if(!z)throw new Error(`FormRenderer: Tried to render an unknown component type ${E.type}!`);z.options?.row&&se(E.params?.columns??[]),o(P)[E.id]=o(P)[E.id]||!E.dependencies?.length})}function j(d){return d?.map?.(E=>{const z=$[E.type];if(!z)throw new Error(`FormRenderer: Tried to render an unknown component type ${E.type}!`);return z.options?.row?{entry:E,columns:j(E.params?.columns??[]),options:z.options}:{entry:E,component:z.component,options:z.options||{}}})||[]}let T=qr(()=>j(D()));q()===!0||q()==="yes"||q()==="true"?q(!0):q(!1),D()||console.warn("no schema provided"),Ha(()=>{if(typeof D()=="string")try{D(JSON.parse(D())),be(ne,{},!0),be(C,{},!0),be(P,{},!0),x()&&x()==="yes"&&D()&&typeof D()!="string"?ce():x()==="yes"&&x("no"),console.log("effectform"),se(D())}catch(d){console.error("error with schema",D(),d)}});let X=qr(()=>!o(ne)||!Object.entries(o(ne))?.length?!0:!!Object.entries(o(ne)).find(([d,E])=>!E&&o(P)&&o(P)[d]));const Wt=d=>{console.log("canShow",d);for(const E of d.dependencies||[])if(o(P)&&!o(P)[E.id]||o(N)&&!o(N)[E.id]||o(N)&&E?.values&&!E?.values?.includes(o(N)[E.id]))return!1;return!0},zr=d=>{Wt(d)?Mn(d,d.value):ta(d)},Mn=(d,E)=>{o(P)[d.id]=!0,d.type!=="row"&&(o(N)[d.id]=o(C)[d.id]??E);for(const z of o(fe)[d.id]||[])zr(z)},ta=d=>{o(P)[d.id]=!1,delete o(N)[d.id];for(const E of o(fe)[d.id]||[])ta(E)};ue({repoName:"@htmlbricks/hb-input-text",version:le.version}),ue({repoName:"@htmlbricks/hb-input-date",version:le.version}),ue({repoName:"@htmlbricks/hb-input-email",version:le.version}),ue({repoName:"@htmlbricks/hb-input-checkbox",version:le.version}),ue({repoName:"@htmlbricks/hb-input-number",version:le.version}),ue({repoName:"@htmlbricks/hb-input-area",version:le.version}),ue({repoName:"@htmlbricks/hb-input-radio",version:le.version}),ue({repoName:"@htmlbricks/hb-input-select",version:le.version}),ue({repoName:"@htmlbricks/hb-input-file",version:le.version}),ue({repoName:"@htmlbricks/hb-input-color",version:le.version}),ue({repoName:"@htmlbricks/hb-input-range",version:le.version}),ue({repoName:"@htmlbricks/hb-input-datetime",version:le.version}),ue({repoName:"@htmlbricks/hb-input-array-objects",version:le.version}),ue({repoName:"@htmlbricks/hb-input-array-tags",version:le.version});let Pn=G(void 0);function ra(d,E){d==="update"?(console.log("update",E),o(Pn)&&clearTimeout(o(Pn)),be(Pn,setTimeout(()=>{t.$$host.dispatchEvent(new CustomEvent(d,{detail:E}))},300),!0)):t.$$host.dispatchEvent(new CustomEvent(d,{detail:E}))}const ce=()=>{if(console.log("submitting form"),k("yes"),x("no"),console.log(o(X),JSON.stringify(o(ne)),o(P),o(N)),o(X))return console.warn("Form is invalid");const d=Object.assign({_valid:!o(X)},o(N));ra("submit",d)};function Y(d){console.info("setValByMessage",d);let E;if(o(C)[d.id]!==d.value){if(o(C)[d.id]=d.value,o(P)[d.id]&&(o(N)[d.id]=d.value),o(fe)[d.id])for(const z of o(fe)[d.id])zr(z);E=Object.assign({_valid:!o(X),_id:O()},o(N))}o(ne)[d.id]!==d.valid&&(o(ne)[d.id]=d.valid,E=Object.assign({_valid:!o(X),_id:O()},o(N))),E&&ra("update",E)}var fo={get id(){return O()},set id(d=""){O(d),qt()},get schema(){return D()},set schema(d){D(d),qt()},get show_validation(){return k()},set show_validation(d="no"){k(d),qt()},get hide_submit(){return q()},set hide_submit(d=!1){q(d),qt()},get submitted(){return x()},set submitted(d="no"){x(d),qt()},get getvals(){return I()},set getvals(d="no"){I(d),qt()}},Ln=lo(),co=Et(Ln);{var vo=d=>{var E=oo(),z=J(E);Gi(z,17,()=>o(T),({entry:Xt,component:_t,options:w,columns:ee})=>Xt.id,(Xt,_t)=>{let w=()=>o(_t).entry,ee=()=>o(_t).component,Kr=()=>o(_t).options,gr=()=>o(_t).columns;var lr=H(),jn=J(lr);{var Vn=ur=>{var kt=Js();Gi(kt,21,gr,({entry:wr,component:fr,options:Er})=>wr.id,(wr,fr,Er,Zr)=>{let S=()=>o(fr).entry,te=()=>o(fr).component,Fn=()=>o(fr).options;var Qr=H(),Jn=J(Qr);{var ge=K=>{var Qe=Fs(),en=Et(Qe);{var qn=we=>{var ie=ks(),Ee=Et(ie);vt(ie),m(()=>{Cn(ie,"for",S().id),Bi(Ee,`${S().label??""}${S().required?"*":""}`)}),b(we,ie)};L(en,we=>{Fn().labelIsHandledByComponent||we(qn)})}var Nt=Yr(en,2);{var je=we=>{var ie=Ns();B(ie,o(v)),m(()=>g(ie,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(ie,"show_validation",k())),U(ie,1,"svelte-58vy9y"),A("setVal",ie,Ee=>Y(Ee.detail)),b(we,ie)},xr=we=>{var ie=H(),Ee=J(ie);{var Ve=$t=>{var De=$s();B(De,o(y)),m(()=>g(De,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(De,"show_validation",k())),U(De,1,"svelte-58vy9y"),A("setVal",De,et=>Y(et.detail)),b($t,De)},Sr=$t=>{var De=H(),et=J(De);{var Fe=Tt=>{var xe=Ts();B(xe,o(s)),m(()=>g(xe,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(xe,"show_validation",k())),U(xe,1,"svelte-58vy9y"),A("setVal",xe,tt=>Y(tt.detail)),A("clickEnter",xe,()=>ce()),b(Tt,xe)},kr=Tt=>{var xe=H(),tt=J(xe);{var Je=Ot=>{var qe=Os();B(qe,o(f)),m(()=>g(qe,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(qe,"show_validation",k())),U(qe,1,"svelte-58vy9y"),A("setVal",qe,rt=>Y(rt.detail)),b(Ot,qe)},Nr=Ot=>{var qe=H(),rt=J(qe);{var He=At=>{var Be=As();B(Be,o(_)),m(()=>g(Be,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Be,"show_validation",k())),U(Be,1,"svelte-58vy9y"),A("setVal",Be,nt=>Y(nt.detail)),b(At,Be)},$r=At=>{var Be=H(),nt=J(Be);{var Se=Ct=>{var Ue=Cs();B(Ue,o(c)),m(()=>g(Ue,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Ue,"show_validation",k())),U(Ue,1,"svelte-58vy9y"),A("setVal",Ue,it=>Y(it.detail)),b(Ct,Ue)},Tr=Ct=>{var Ue=H(),it=J(Ue);{var ke=Rt=>{var Ne=Rs();B(Ne,o(u)),m(()=>g(Ne,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Ne,"show_validation",k())),U(Ne,1,"svelte-58vy9y"),A("setVal",Ne,at=>Y(at.detail)),A("clickEnter",Ne,()=>ce()),b(Rt,Ne)},Or=Rt=>{var Ne=H(),at=J(Ne);{var $e=It=>{var Te=Is();B(Te,o(n)),m(()=>g(Te,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Te,"show_validation",k())),U(Te,1,"svelte-58vy9y"),A("setVal",Te,st=>Y(st.detail)),A("clickEnter",Te,()=>ce()),b(It,Te)},Ar=It=>{var Te=H(),st=J(Te);{var Ye=Mt=>{var Oe=Ms();B(Oe,o(i)),m(()=>g(Oe,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Oe,"show_validation",k())),U(Oe,1,"svelte-58vy9y"),A("setVal",Oe,ot=>Y(ot.detail)),A("clickEnter",Oe,()=>ce()),b(Mt,Oe)},Cr=Mt=>{var Oe=H(),ot=J(Oe);{var Ae=Pt=>{var Ge=Ps();B(Ge,o(h)),U(Ge,1,"checkbox-inline svelte-58vy9y"),m(()=>g(Ge,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Ge,"show_validation",k())),A("setVal",Ge,lt=>Y(lt.detail)),b(Pt,Ge)},Rr=Pt=>{var Ge=H(),lt=J(Ge);{var Ce=Lt=>{var Re=Ls();B(Re,o(l)),m(()=>g(Re,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Re,"show_validation",k())),U(Re,1,"svelte-58vy9y"),A("setVal",Re,ut=>Y(ut.detail)),A("clickEnter",Re,()=>ce()),b(Lt,Re)},Ir=Lt=>{var Re=H(),ut=J(Re);{var We=jt=>{var ve=js();B(ve,o(a)),m(()=>g(ve,"schemaentry",JSON.stringify({...S(),value:S().value}))),m(()=>g(ve,"show_validation",k())),U(ve,1,"svelte-58vy9y"),A("setVal",ve,ft=>Y(ft.detail)),A("clickEnter",ve,()=>ce()),b(jt,ve)},Mr=jt=>{var ve=H(),ft=J(ve);{var Hn=cr=>{var pt=Vs();B(pt,o(p)),m(()=>g(pt,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(pt,"show_validation",k())),U(pt,1,"svelte-58vy9y"),A("setVal",pt,Bn=>Y(Bn.detail)),b(cr,pt)},_o=cr=>{var pt=H(),Bn=J(pt);{var po=Un=>{var vr=Ds();B(vr,o(r)),m(()=>g(vr,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(vr,"show_validation",k())),U(vr,1,"svelte-58vy9y"),A("setVal",vr,mo=>Y(mo.detail)),b(Un,vr)};L(Bn,Un=>{te()==="hb-input-select"&&Un(po)},!0)}b(cr,pt)};L(ft,cr=>{te()==="hb-input-radio"?cr(Hn):cr(_o,!1)},!0)}b(jt,ve)};L(ut,jt=>{te()==="hb-input-area"?jt(We):jt(Mr,!1)},!0)}b(Lt,Re)};L(lt,Lt=>{te()==="hb-input-number"?Lt(Ce):Lt(Ir,!1)},!0)}b(Pt,Ge)};L(ot,Pt=>{te()==="hb-input-checkbox"?Pt(Ae):Pt(Rr,!1)},!0)}b(Mt,Oe)};L(st,Mt=>{te()==="hb-input-datetime"?Mt(Ye):Mt(Cr,!1)},!0)}b(It,Te)};L(at,It=>{te()==="hb-input-date"?It($e):It(Ar,!1)},!0)}b(Rt,Ne)};L(it,Rt=>{te()==="hb-input-email"?Rt(ke):Rt(Or,!1)},!0)}b(Ct,Ue)};L(nt,Ct=>{te()==="hb-input-file"?Ct(Se):Ct(Tr,!1)},!0)}b(At,Be)};L(rt,At=>{te()==="hb-input-range"?At(He):At($r,!1)},!0)}b(Ot,qe)};L(tt,Ot=>{te()==="hb-input-color"?Ot(Je):Ot(Nr,!1)},!0)}b(Tt,xe)};L(et,Tt=>{te()==="hb-input-text"?Tt(Fe):Tt(kr,!1)},!0)}b($t,De)};L(Ee,$t=>{te()==="hb-input-array-tags"?$t(Ve):$t(Sr,!1)},!0)}b(we,ie)};L(Nt,we=>{te()==="hb-array-objects"?we(je):we(xr,!1)})}vt(Qe),m(()=>B(Qe,te()==="hb-input-checkbox"?"line-height:52px;":"")),b(K,Qe)};L(Jn,K=>{o(P)[S().id]&&K(ge)})}b(wr,Qr)}),vt(kt),b(ur,kt)},Dn=ur=>{var kt=H(),wr=J(kt);{var fr=Er=>{var Zr=no(),S=Et(Zr);{var te=ge=>{var K=qs(),Qe=Et(K);vt(K),m(()=>{Cn(K,"for",w().id),Bi(Qe,`${w().label??""}${w().required?"*":""}`)}),b(ge,K)};L(S,ge=>{Kr()?.labelIsHandledByComponent||ge(te)})}var Fn=Yr(S,2);{var Qr=ge=>{var K=Hs();B(K,o(s)),m(()=>g(K,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(K,"show_validation",k())),U(K,1,"svelte-58vy9y"),A("setVal",K,Qe=>Y(Qe.detail)),A("clickEnter",K,()=>ce()),b(ge,K)},Jn=ge=>{var K=H(),Qe=J(K);{var en=Nt=>{var je=Bs();B(je,o(v)),m(()=>g(je,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(je,"show_validation",k())),U(je,1,"svelte-58vy9y"),A("setVal",je,xr=>Y(xr.detail)),b(Nt,je)},qn=Nt=>{var je=H(),xr=J(je);{var we=Ee=>{var Ve=Us();B(Ve,o(y)),m(()=>g(Ve,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Ve,"show_validation",k())),U(Ve,1,"svelte-58vy9y"),A("setVal",Ve,Sr=>Y(Sr.detail)),b(Ee,Ve)},ie=Ee=>{var Ve=H(),Sr=J(Ve);{var $t=et=>{var Fe=Ys();B(Fe,o(f)),m(()=>g(Fe,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Fe,"show_validation",k())),U(Fe,1,"svelte-58vy9y"),A("setVal",Fe,kr=>Y(kr.detail)),b(et,Fe)},De=et=>{var Fe=H(),kr=J(Fe);{var Tt=tt=>{var Je=Gs();B(Je,o(_)),m(()=>g(Je,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Je,"show_validation",k())),U(Je,1,"svelte-58vy9y"),A("setVal",Je,Nr=>Y(Nr.detail)),b(tt,Je)},xe=tt=>{var Je=H(),Nr=J(Je);{var Ot=rt=>{var He=Ws();B(He,o(c)),m(()=>g(He,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(He,"show_validation",k())),U(He,1,"svelte-58vy9y"),A("setVal",He,$r=>Y($r.detail)),b(rt,He)},qe=rt=>{var He=H(),$r=J(He);{var At=nt=>{var Se=Xs();B(Se,o(u)),m(()=>g(Se,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Se,"show_validation",k())),U(Se,1,"svelte-58vy9y"),A("setVal",Se,Tr=>Y(Tr.detail)),A("clickEnter",Se,()=>ce()),b(nt,Se)},Be=nt=>{var Se=H(),Tr=J(Se);{var Ct=it=>{var ke=zs();B(ke,o(n)),m(()=>g(ke,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(ke,"show_validation",k())),U(ke,1,"svelte-58vy9y"),A("setVal",ke,Or=>Y(Or.detail)),A("clickEnter",ke,()=>ce()),b(it,ke)},Ue=it=>{var ke=H(),Or=J(ke);{var Rt=at=>{var $e=Ks();B($e,o(n)),m(()=>g($e,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g($e,"show_validation",k())),U($e,1,"svelte-58vy9y"),A("setVal",$e,Ar=>Y(Ar.detail)),A("clickEnter",$e,()=>ce()),b(at,$e)},Ne=at=>{var $e=H(),Ar=J($e);{var It=st=>{var Ye=Zs();B(Ye,o(h)),m(()=>g(Ye,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Ye,"show_validation",k())),U(Ye,1,"svelte-58vy9y"),A("setVal",Ye,Cr=>Y(Cr.detail)),b(st,Ye)},Te=st=>{var Ye=H(),Cr=J(Ye);{var Mt=ot=>{var Ae=Qs();B(Ae,o(l)),m(()=>g(Ae,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Ae,"show_validation",k())),U(Ae,1,"svelte-58vy9y"),A("setVal",Ae,Rr=>Y(Rr.detail)),A("clickEnter",Ae,()=>ce()),b(ot,Ae)},Oe=ot=>{var Ae=H(),Rr=J(Ae);{var Pt=lt=>{var Ce=eo();B(Ce,o(a)),m(()=>g(Ce,"schemaentry",JSON.stringify({...w(),value:w().value},null,0))),m(()=>g(Ce,"show_validation",k())),U(Ce,1,"svelte-58vy9y"),A("setVal",Ce,Ir=>Y(Ir.detail)),A("clickEnter",Ce,()=>ce()),b(lt,Ce)},Ge=lt=>{var Ce=H(),Ir=J(Ce);{var Lt=ut=>{var We=to();B(We,o(p)),m(()=>g(We,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(We,"show_validation",k())),U(We,1,"svelte-58vy9y"),A("setVal",We,Mr=>Y(Mr.detail)),b(ut,We)},Re=ut=>{var We=H(),Mr=J(We);{var jt=ve=>{var ft=ro();B(ft,o(r)),m(()=>g(ft,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(ft,"show_validation",k())),U(ft,1,"svelte-58vy9y"),A("setVal",ft,Hn=>Y(Hn.detail)),b(ve,ft)};L(Mr,ve=>{ee()==="hb-input-select"&&ve(jt)},!0)}b(ut,We)};L(Ir,ut=>{ee()==="hb-input-radio"?ut(Lt):ut(Re,!1)},!0)}b(lt,Ce)};L(Rr,lt=>{ee()==="hb-input-area"?lt(Pt):lt(Ge,!1)},!0)}b(ot,Ae)};L(Cr,ot=>{ee()==="hb-input-number"?ot(Mt):ot(Oe,!1)},!0)}b(st,Ye)};L(Ar,st=>{ee()==="hb-input-checkbox"?st(It):st(Te,!1)},!0)}b(at,$e)};L(Or,at=>{ee()==="hb-input-datetime"?at(Rt):at(Ne,!1)},!0)}b(it,ke)};L(Tr,it=>{ee()==="hb-input-date"?it(Ct):it(Ue,!1)},!0)}b(nt,Se)};L($r,nt=>{ee()==="hb-input-email"?nt(At):nt(Be,!1)},!0)}b(rt,He)};L(Nr,rt=>{ee()==="hb-input-file"?rt(Ot):rt(qe,!1)},!0)}b(tt,Je)};L(kr,tt=>{ee()==="hb-input-range"?tt(Tt):tt(xe,!1)},!0)}b(et,Fe)};L(Sr,et=>{ee()==="hb-input-color"?et($t):et(De,!1)},!0)}b(Ee,Ve)};L(xr,Ee=>{ee()==="hb-input-array-tags"?Ee(we):Ee(ie,!1)},!0)}b(Nt,je)};L(Qe,Nt=>{ee()==="hb-input-array-objects"?Nt(en):Nt(qn,!1)},!0)}b(ge,K)};L(Fn,ge=>{ee()==="hb-input-text"?ge(Qr):ge(Jn,!1)})}vt(Zr),b(Er,Zr)};L(wr,Er=>{o(P)&&o(P)[w().id]&&Er(fr)},!0)}b(ur,kt)};L(jn,ur=>{Kr()?.row&&(o(P)[w().id]||o(P)[w().id]!==!1)&&gr()?.length&&gr().some(kt=>o(P)[kt.entry.id])?ur(Vn):ur(Dn,!1)})}b(Xt,lr)});var bo=Yr(z,2);{var ho=Xt=>{var _t=so(),w=Et(_t);w.__click=[io,ce];var ee=Et(w);An(ee,t,"submit_button",{},gr=>{var lr=ao(),jn=Et(lr);An(jn,t,"submit_label",{},Vn=>{var Dn=ns("Submit");b(Vn,Dn)}),vt(lr),b(gr,lr)}),vt(w);var Kr=Yr(w,2);An(Kr,t,"other_buttons",{},null),vt(_t),b(Xt,_t)};L(bo,Xt=>{q()||Xt(ho)})}b(d,E)};L(co,d=>{D()&&typeof D()=="object"&&D()?.length&&d(vo)})}return vt(Ln),b(e,Ln),si(fo)}ts(["click"]),customElements.define("hb-form",ys(ea,{id:{},schema:{},show_validation:{},hide_submit:{},submitted:{},getvals:{}},["submit_button","submit_label","other_buttons"],[],!0)),Yn.Component=ea,Object.defineProperty(Yn,Symbol.toStringTag,{value:"Module"})})(this.form=this.form||{});
107
+ */dt({});let r=G(""),n=G(""),i=G(""),a=G(""),s=G(""),l=G(""),u=G(""),f=G(""),c=G(""),h=G(""),p=G(""),_=G(""),v=G(""),y=G("");const $={row:{component:void 0,options:{row:!0}},select:{component:"hb-input-select"},arrayobjects:{component:"hb-input-array-objects"},arraytags:{component:"hb-input-array-tags"},date:{component:"hb-input-date"},datetime:{component:"hb-input-datetime"},text:{component:"hb-input-text"},number:{component:"hb-input-number"},email:{component:"hb-input-email"},color:{component:"hb-input-color"},file:{component:"hb-input-file"},textarea:{component:"hb-input-area"},range:{component:"hb-input-range"},checkbox:{component:"hb-input-checkbox",options:{labelIsHandledByComponent:!0}},radio:{component:"hb-input-radio"}};let N=qr(()=>{const d={};for(const E of D())if(E.type!=="row")d[E.id]=E.value;else if(E.type==="row"&&E.params?.columns?.length)for(const z of E.params.columns)d[z.id]=z.value;return d}),O=sr(t,"id",7,""),D=sr(t,"schema"),k=sr(t,"show_validation",7,"no"),q=sr(t,"hide_submit",7,!1),x=sr(t,"submitted",7,"no"),I=sr(t,"getvals",7,"no"),P=G(dt({})),ne=G(dt({})),C=G(dt({})),fe=qr(()=>{const d=[];for(const E of D())E.type==="row"&&E.params?.columns?.length?d.push(...E.params.columns):d.push(E);return gs(d.filter(E=>E.dependencies?.length),E=>E.dependencies.map(z=>z.id))});function se(d){d?.forEach?.(E=>{const z=$[E.type];if(!z)throw new Error(`FormRenderer: Tried to render an unknown component type ${E.type}!`);z.options?.row&&se(E.params?.columns??[]),o(P)[E.id]=o(P)[E.id]||!E.dependencies?.length})}function j(d){return d?.map?.(E=>{const z=$[E.type];if(!z)throw new Error(`FormRenderer: Tried to render an unknown component type ${E.type}!`);return z.options?.row?{entry:E,columns:j(E.params?.columns??[]),options:z.options}:{entry:E,component:z.component,options:z.options||{}}})||[]}let T=qr(()=>j(D()));q()===!0||q()==="yes"||q()==="true"?q(!0):q(!1),D()||console.warn("no schema provided"),Ha(()=>{if(typeof D()=="string")try{D(JSON.parse(D())),be(ne,{},!0),be(C,{},!0),be(P,{},!0),x()&&x()==="yes"&&D()&&typeof D()!="string"?ce():x()==="yes"&&x("no"),console.log("effectform"),se(D())}catch(d){console.error("error with schema",D(),d)}});let X=qr(()=>!o(ne)||!Object.entries(o(ne))?.length?!0:!!Object.entries(o(ne)).find(([d,E])=>!E&&o(P)&&o(P)[d]));const Wt=d=>{console.log("canShow",d);for(const E of d.dependencies||[])if(o(P)&&!o(P)[E.id]||o(N)&&!o(N)[E.id]||o(N)&&E?.values&&!E?.values?.includes(o(N)[E.id]))return!1;return!0},zr=d=>{Wt(d)?Mn(d,d.value):ta(d)},Mn=(d,E)=>{o(P)[d.id]=!0,d.type!=="row"&&(o(N)[d.id]=o(C)[d.id]??E);for(const z of o(fe)[d.id]||[])zr(z)},ta=d=>{o(P)[d.id]=!1,delete o(N)[d.id];for(const E of o(fe)[d.id]||[])ta(E)};ue({repoName:"@htmlbricks/hb-input-text",version:le.version}),ue({repoName:"@htmlbricks/hb-input-date",version:le.version}),ue({repoName:"@htmlbricks/hb-input-email",version:le.version}),ue({repoName:"@htmlbricks/hb-input-checkbox",version:le.version}),ue({repoName:"@htmlbricks/hb-input-number",version:le.version}),ue({repoName:"@htmlbricks/hb-input-area",version:le.version}),ue({repoName:"@htmlbricks/hb-input-radio",version:le.version}),ue({repoName:"@htmlbricks/hb-input-select",version:le.version}),ue({repoName:"@htmlbricks/hb-input-file",version:le.version}),ue({repoName:"@htmlbricks/hb-input-color",version:le.version}),ue({repoName:"@htmlbricks/hb-input-range",version:le.version}),ue({repoName:"@htmlbricks/hb-input-datetime",version:le.version}),ue({repoName:"@htmlbricks/hb-input-array-objects",version:le.version}),ue({repoName:"@htmlbricks/hb-input-array-tags",version:le.version});let Pn=G(void 0);function ra(d,E){d==="update"?(console.log("update",E),o(Pn)&&clearTimeout(o(Pn)),be(Pn,setTimeout(()=>{t.$$host.dispatchEvent(new CustomEvent(d,{detail:E}))},300),!0)):t.$$host.dispatchEvent(new CustomEvent(d,{detail:E}))}const ce=()=>{if(console.log("submitting form"),k("yes"),x("no"),console.log(o(X),JSON.stringify(o(ne)),o(P),o(N)),o(X))return console.warn("Form is invalid");const d=Object.assign({_valid:!o(X)},o(N));ra("submit",d)};function Y(d){console.info("setValByMessage",d);let E;if(o(C)[d.id]!==d.value){if(o(C)[d.id]=d.value,o(P)[d.id]&&(o(N)[d.id]=d.value),o(fe)[d.id])for(const z of o(fe)[d.id])zr(z);E=Object.assign({_valid:!o(X),_id:O()},o(N))}o(ne)[d.id]!==d.valid&&(o(ne)[d.id]=d.valid,E=Object.assign({_valid:!o(X),_id:O()},o(N))),E&&ra("update",E)}var fo={get id(){return O()},set id(d=""){O(d),qt()},get schema(){return D()},set schema(d){D(d),qt()},get show_validation(){return k()},set show_validation(d="no"){k(d),qt()},get hide_submit(){return q()},set hide_submit(d=!1){q(d),qt()},get submitted(){return x()},set submitted(d="no"){x(d),qt()},get getvals(){return I()},set getvals(d="no"){I(d),qt()}},Ln=lo(),co=Et(Ln);{var vo=d=>{var E=oo(),z=J(E);Gi(z,17,()=>o(T),({entry:Xt,component:_t,options:w,columns:ee})=>Xt.id,(Xt,_t)=>{let w=()=>o(_t).entry,ee=()=>o(_t).component,Kr=()=>o(_t).options,gr=()=>o(_t).columns;var lr=H(),jn=J(lr);{var Vn=ur=>{var kt=Js();Gi(kt,21,gr,({entry:wr,component:fr,options:Er})=>wr.id,(wr,fr,Er,Zr)=>{let S=()=>o(fr).entry,te=()=>o(fr).component,Fn=()=>o(fr).options;var Qr=H(),Jn=J(Qr);{var ge=K=>{var Qe=Fs(),en=Et(Qe);{var qn=we=>{var ie=ks(),Ee=Et(ie);vt(ie),m(()=>{Cn(ie,"for",S().id),Bi(Ee,`${S().label??""}${S().required?"*":""}`)}),b(we,ie)};L(en,we=>{Fn().labelIsHandledByComponent||we(qn)})}var Nt=Yr(en,2);{var je=we=>{var ie=Ns();B(ie,o(v)),m(()=>g(ie,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(ie,"show_validation",k())),U(ie,1,"svelte-58vy9y"),A("setVal",ie,Ee=>Y(Ee.detail)),b(we,ie)},xr=we=>{var ie=H(),Ee=J(ie);{var Ve=$t=>{var De=$s();B(De,o(y)),m(()=>g(De,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(De,"show_validation",k())),U(De,1,"svelte-58vy9y"),A("setVal",De,et=>Y(et.detail)),b($t,De)},Sr=$t=>{var De=H(),et=J(De);{var Fe=Tt=>{var xe=Ts();B(xe,o(s)),m(()=>g(xe,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(xe,"show_validation",k())),U(xe,1,"svelte-58vy9y"),A("setVal",xe,tt=>Y(tt.detail)),A("clickEnter",xe,()=>ce()),b(Tt,xe)},kr=Tt=>{var xe=H(),tt=J(xe);{var Je=Ot=>{var qe=Os();B(qe,o(f)),m(()=>g(qe,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(qe,"show_validation",k())),U(qe,1,"svelte-58vy9y"),A("setVal",qe,rt=>Y(rt.detail)),b(Ot,qe)},Nr=Ot=>{var qe=H(),rt=J(qe);{var He=At=>{var Be=As();B(Be,o(_)),m(()=>g(Be,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Be,"show_validation",k())),U(Be,1,"svelte-58vy9y"),A("setVal",Be,nt=>Y(nt.detail)),b(At,Be)},$r=At=>{var Be=H(),nt=J(Be);{var Se=Ct=>{var Ue=Cs();B(Ue,o(c)),m(()=>g(Ue,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Ue,"show_validation",k())),U(Ue,1,"svelte-58vy9y"),A("setVal",Ue,it=>Y(it.detail)),b(Ct,Ue)},Tr=Ct=>{var Ue=H(),it=J(Ue);{var ke=Rt=>{var Ne=Rs();B(Ne,o(u)),m(()=>g(Ne,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Ne,"show_validation",k())),U(Ne,1,"svelte-58vy9y"),A("setVal",Ne,at=>Y(at.detail)),A("clickEnter",Ne,()=>ce()),b(Rt,Ne)},Or=Rt=>{var Ne=H(),at=J(Ne);{var $e=It=>{var Te=Is();B(Te,o(n)),m(()=>g(Te,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Te,"show_validation",k())),U(Te,1,"svelte-58vy9y"),A("setVal",Te,st=>Y(st.detail)),A("clickEnter",Te,()=>ce()),b(It,Te)},Ar=It=>{var Te=H(),st=J(Te);{var Ye=Mt=>{var Oe=Ms();B(Oe,o(i)),m(()=>g(Oe,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Oe,"show_validation",k())),U(Oe,1,"svelte-58vy9y"),A("setVal",Oe,ot=>Y(ot.detail)),A("clickEnter",Oe,()=>ce()),b(Mt,Oe)},Cr=Mt=>{var Oe=H(),ot=J(Oe);{var Ae=Pt=>{var Ge=Ps();B(Ge,o(h)),U(Ge,1,"checkbox-inline svelte-58vy9y"),m(()=>g(Ge,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Ge,"show_validation",k())),A("setVal",Ge,lt=>Y(lt.detail)),b(Pt,Ge)},Rr=Pt=>{var Ge=H(),lt=J(Ge);{var Ce=Lt=>{var Re=Ls();B(Re,o(l)),m(()=>g(Re,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(Re,"show_validation",k())),U(Re,1,"svelte-58vy9y"),A("setVal",Re,ut=>Y(ut.detail)),A("clickEnter",Re,()=>ce()),b(Lt,Re)},Ir=Lt=>{var Re=H(),ut=J(Re);{var We=jt=>{var ve=js();B(ve,o(a)),m(()=>g(ve,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(ve,"show_validation",k())),U(ve,1,"svelte-58vy9y"),A("setVal",ve,ft=>Y(ft.detail)),A("clickEnter",ve,()=>ce()),b(jt,ve)},Mr=jt=>{var ve=H(),ft=J(ve);{var Hn=cr=>{var pt=Vs();B(pt,o(p)),m(()=>g(pt,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(pt,"show_validation",k())),U(pt,1,"svelte-58vy9y"),A("setVal",pt,Bn=>Y(Bn.detail)),b(cr,pt)},_o=cr=>{var pt=H(),Bn=J(pt);{var po=Un=>{var vr=Ds();B(vr,o(r)),m(()=>g(vr,"schemaentry",JSON.stringify({...S(),value:o(C)[S().id]??S().value}))),m(()=>g(vr,"show_validation",k())),U(vr,1,"svelte-58vy9y"),A("setVal",vr,mo=>Y(mo.detail)),b(Un,vr)};L(Bn,Un=>{te()==="hb-input-select"&&Un(po)},!0)}b(cr,pt)};L(ft,cr=>{te()==="hb-input-radio"?cr(Hn):cr(_o,!1)},!0)}b(jt,ve)};L(ut,jt=>{te()==="hb-input-area"?jt(We):jt(Mr,!1)},!0)}b(Lt,Re)};L(lt,Lt=>{te()==="hb-input-number"?Lt(Ce):Lt(Ir,!1)},!0)}b(Pt,Ge)};L(ot,Pt=>{te()==="hb-input-checkbox"?Pt(Ae):Pt(Rr,!1)},!0)}b(Mt,Oe)};L(st,Mt=>{te()==="hb-input-datetime"?Mt(Ye):Mt(Cr,!1)},!0)}b(It,Te)};L(at,It=>{te()==="hb-input-date"?It($e):It(Ar,!1)},!0)}b(Rt,Ne)};L(it,Rt=>{te()==="hb-input-email"?Rt(ke):Rt(Or,!1)},!0)}b(Ct,Ue)};L(nt,Ct=>{te()==="hb-input-file"?Ct(Se):Ct(Tr,!1)},!0)}b(At,Be)};L(rt,At=>{te()==="hb-input-range"?At(He):At($r,!1)},!0)}b(Ot,qe)};L(tt,Ot=>{te()==="hb-input-color"?Ot(Je):Ot(Nr,!1)},!0)}b(Tt,xe)};L(et,Tt=>{te()==="hb-input-text"?Tt(Fe):Tt(kr,!1)},!0)}b($t,De)};L(Ee,$t=>{te()==="hb-input-array-tags"?$t(Ve):$t(Sr,!1)},!0)}b(we,ie)};L(Nt,we=>{te()==="hb-array-objects"?we(je):we(xr,!1)})}vt(Qe),m(()=>B(Qe,te()==="hb-input-checkbox"?"line-height:52px;":"")),b(K,Qe)};L(Jn,K=>{o(P)[S().id]&&K(ge)})}b(wr,Qr)}),vt(kt),b(ur,kt)},Dn=ur=>{var kt=H(),wr=J(kt);{var fr=Er=>{var Zr=no(),S=Et(Zr);{var te=ge=>{var K=qs(),Qe=Et(K);vt(K),m(()=>{Cn(K,"for",w().id),Bi(Qe,`${w().label??""}${w().required?"*":""}`)}),b(ge,K)};L(S,ge=>{Kr()?.labelIsHandledByComponent||ge(te)})}var Fn=Yr(S,2);{var Qr=ge=>{var K=Hs();B(K,o(s)),m(()=>g(K,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(K,"show_validation",k())),U(K,1,"svelte-58vy9y"),A("setVal",K,Qe=>Y(Qe.detail)),A("clickEnter",K,()=>ce()),b(ge,K)},Jn=ge=>{var K=H(),Qe=J(K);{var en=Nt=>{var je=Bs();B(je,o(v)),m(()=>g(je,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(je,"show_validation",k())),U(je,1,"svelte-58vy9y"),A("setVal",je,xr=>Y(xr.detail)),b(Nt,je)},qn=Nt=>{var je=H(),xr=J(je);{var we=Ee=>{var Ve=Us();B(Ve,o(y)),m(()=>g(Ve,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Ve,"show_validation",k())),U(Ve,1,"svelte-58vy9y"),A("setVal",Ve,Sr=>Y(Sr.detail)),b(Ee,Ve)},ie=Ee=>{var Ve=H(),Sr=J(Ve);{var $t=et=>{var Fe=Ys();B(Fe,o(f)),m(()=>g(Fe,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Fe,"show_validation",k())),U(Fe,1,"svelte-58vy9y"),A("setVal",Fe,kr=>Y(kr.detail)),b(et,Fe)},De=et=>{var Fe=H(),kr=J(Fe);{var Tt=tt=>{var Je=Gs();B(Je,o(_)),m(()=>g(Je,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Je,"show_validation",k())),U(Je,1,"svelte-58vy9y"),A("setVal",Je,Nr=>Y(Nr.detail)),b(tt,Je)},xe=tt=>{var Je=H(),Nr=J(Je);{var Ot=rt=>{var He=Ws();B(He,o(c)),m(()=>g(He,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(He,"show_validation",k())),U(He,1,"svelte-58vy9y"),A("setVal",He,$r=>Y($r.detail)),b(rt,He)},qe=rt=>{var He=H(),$r=J(He);{var At=nt=>{var Se=Xs();B(Se,o(u)),m(()=>g(Se,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Se,"show_validation",k())),U(Se,1,"svelte-58vy9y"),A("setVal",Se,Tr=>Y(Tr.detail)),A("clickEnter",Se,()=>ce()),b(nt,Se)},Be=nt=>{var Se=H(),Tr=J(Se);{var Ct=it=>{var ke=zs();B(ke,o(n)),m(()=>g(ke,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(ke,"show_validation",k())),U(ke,1,"svelte-58vy9y"),A("setVal",ke,Or=>Y(Or.detail)),A("clickEnter",ke,()=>ce()),b(it,ke)},Ue=it=>{var ke=H(),Or=J(ke);{var Rt=at=>{var $e=Ks();B($e,o(n)),m(()=>g($e,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g($e,"show_validation",k())),U($e,1,"svelte-58vy9y"),A("setVal",$e,Ar=>Y(Ar.detail)),A("clickEnter",$e,()=>ce()),b(at,$e)},Ne=at=>{var $e=H(),Ar=J($e);{var It=st=>{var Ye=Zs();B(Ye,o(h)),m(()=>g(Ye,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Ye,"show_validation",k())),U(Ye,1,"svelte-58vy9y"),A("setVal",Ye,Cr=>Y(Cr.detail)),b(st,Ye)},Te=st=>{var Ye=H(),Cr=J(Ye);{var Mt=ot=>{var Ae=Qs();B(Ae,o(l)),m(()=>g(Ae,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Ae,"show_validation",k())),U(Ae,1,"svelte-58vy9y"),A("setVal",Ae,Rr=>Y(Rr.detail)),A("clickEnter",Ae,()=>ce()),b(ot,Ae)},Oe=ot=>{var Ae=H(),Rr=J(Ae);{var Pt=lt=>{var Ce=eo();B(Ce,o(a)),m(()=>g(Ce,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(Ce,"show_validation",k())),U(Ce,1,"svelte-58vy9y"),A("setVal",Ce,Ir=>Y(Ir.detail)),A("clickEnter",Ce,()=>ce()),b(lt,Ce)},Ge=lt=>{var Ce=H(),Ir=J(Ce);{var Lt=ut=>{var We=to();B(We,o(p)),m(()=>g(We,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(We,"show_validation",k())),U(We,1,"svelte-58vy9y"),A("setVal",We,Mr=>Y(Mr.detail)),b(ut,We)},Re=ut=>{var We=H(),Mr=J(We);{var jt=ve=>{var ft=ro();B(ft,o(r)),m(()=>g(ft,"schemaentry",JSON.stringify({...w(),value:o(C)[w().id]??w().value},null,0))),m(()=>g(ft,"show_validation",k())),U(ft,1,"svelte-58vy9y"),A("setVal",ft,Hn=>Y(Hn.detail)),b(ve,ft)};L(Mr,ve=>{ee()==="hb-input-select"&&ve(jt)},!0)}b(ut,We)};L(Ir,ut=>{ee()==="hb-input-radio"?ut(Lt):ut(Re,!1)},!0)}b(lt,Ce)};L(Rr,lt=>{ee()==="hb-input-area"?lt(Pt):lt(Ge,!1)},!0)}b(ot,Ae)};L(Cr,ot=>{ee()==="hb-input-number"?ot(Mt):ot(Oe,!1)},!0)}b(st,Ye)};L(Ar,st=>{ee()==="hb-input-checkbox"?st(It):st(Te,!1)},!0)}b(at,$e)};L(Or,at=>{ee()==="hb-input-datetime"?at(Rt):at(Ne,!1)},!0)}b(it,ke)};L(Tr,it=>{ee()==="hb-input-date"?it(Ct):it(Ue,!1)},!0)}b(nt,Se)};L($r,nt=>{ee()==="hb-input-email"?nt(At):nt(Be,!1)},!0)}b(rt,He)};L(Nr,rt=>{ee()==="hb-input-file"?rt(Ot):rt(qe,!1)},!0)}b(tt,Je)};L(kr,tt=>{ee()==="hb-input-range"?tt(Tt):tt(xe,!1)},!0)}b(et,Fe)};L(Sr,et=>{ee()==="hb-input-color"?et($t):et(De,!1)},!0)}b(Ee,Ve)};L(xr,Ee=>{ee()==="hb-input-array-tags"?Ee(we):Ee(ie,!1)},!0)}b(Nt,je)};L(Qe,Nt=>{ee()==="hb-input-array-objects"?Nt(en):Nt(qn,!1)},!0)}b(ge,K)};L(Fn,ge=>{ee()==="hb-input-text"?ge(Qr):ge(Jn,!1)})}vt(Zr),b(Er,Zr)};L(wr,Er=>{o(P)&&o(P)[w().id]&&Er(fr)},!0)}b(ur,kt)};L(jn,ur=>{Kr()?.row&&(o(P)[w().id]||o(P)[w().id]!==!1)&&gr()?.length&&gr().some(kt=>o(P)[kt.entry.id])?ur(Vn):ur(Dn,!1)})}b(Xt,lr)});var bo=Yr(z,2);{var ho=Xt=>{var _t=so(),w=Et(_t);w.__click=[io,ce];var ee=Et(w);An(ee,t,"submit_button",{},gr=>{var lr=ao(),jn=Et(lr);An(jn,t,"submit_label",{},Vn=>{var Dn=ns("Submit");b(Vn,Dn)}),vt(lr),b(gr,lr)}),vt(w);var Kr=Yr(w,2);An(Kr,t,"other_buttons",{},null),vt(_t),b(Xt,_t)};L(bo,Xt=>{q()||Xt(ho)})}b(d,E)};L(co,d=>{D()&&typeof D()=="object"&&D()?.length&&d(vo)})}return vt(Ln),b(e,Ln),si(fo)}ts(["click"]),customElements.define("hb-form",ys(ea,{id:{},schema:{},show_validation:{},hide_submit:{},submitted:{},getvals:{}},["submit_button","submit_label","other_buttons"],[],!0)),Yn.Component=ea,Object.defineProperty(Yn,Symbol.toStringTag,{value:"Module"})})(this.form=this.form||{});
108
108
  //# sourceMappingURL=main.iife.js.map