@enablerr-ui/form 0.2.8 → 0.2.9
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/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["axios","@enablerr-ui/layout"],(function(t){"use strict";var e,n;return{setters:[function(t){e=t.default},function(t){n=t.getAttractions}],execute:function(){function o(){}function s(t){return t()}function r(){return Object.create(null)}function i(t){t.forEach(s)}function a(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,...e){if(null==t)return o;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function u(t){let e;return l(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(l(e,n))}function p(t,e,n,o){if(t){const s=f(t,e,n,o);return t[0](s)}}function f(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function m(t,e,n,o,s,r,i){const a=function(t,e,n,o){if(t[2]&&o){const s=t[2](o(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|s[o];return t}return e.dirty|s}return e.dirty}(e,o,s,r);if(a){const s=f(e,n,o,i);t.p(s,a)}}function h(t){return t&&a(t.destroy)?t.destroy:o}function $(t,e){t.appendChild(e)}function g(t,e,n){t.insertBefore(e,n||null)}function v(t){t.parentNode.removeChild(t)}function b(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function y(t){return document.createElement(t)}function w(t){return document.createTextNode(t)}function x(){return w(" ")}function k(){return w("")}function S(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function E(t){return function(e){return e.preventDefault(),t.call(this,e)}}function I(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function T(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:I(t,e,n)}function C(t){return""===t?null:+t}function j(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function q(t,e){t.value=null==e?"":e}function N(t,e,n){t.classList[n?"add":"remove"](e)}let _;function O(t){_=t}function A(){if(!_)throw new Error("Function called outside component initialization");return _}function D(){const t=A();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const s=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,s)}))}}}function L(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}const B=[],F=[],V=[],P=[],M=Promise.resolve();let z=!1;function R(t){V.push(t)}function Y(t){P.push(t)}let J=!1;const U=new Set;function X(){if(!J){J=!0;do{for(let t=0;t<B.length;t+=1){const e=B[t];O(e),W(e.$$)}for(O(null),B.length=0;F.length;)F.pop()();for(let t=0;t<V.length;t+=1){const e=V[t];U.has(e)||(U.add(e),e())}V.length=0}while(B.length);for(;P.length;)P.pop()();z=!1,J=!1,U.clear()}}function W(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(R)}}const H=new Set;let Z;function G(){Z={r:0,c:[],p:Z}}function K(){Z.r||i(Z.c),Z=Z.p}function Q(t,e){t&&t.i&&(H.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(H.has(t))return;H.add(t),Z&&Z.c.push((()=>{H.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function et(t,e){const n=e.token={};function o(t,o,s,r){if(e.token!==n)return;e.resolved=r;let i=e.ctx;void 0!==s&&(i=i.slice(),i[s]=r);const a=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(G(),tt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),K())})):e.block.d(1),a.c(),Q(a,1),a.m(e.mount(),e.anchor),c=!0),e.block=a,e.blocks&&(e.blocks[o]=a),c&&X()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=A();if(t.then((t=>{O(n),o(e.then,1,e.value,t),O(null)}),(t=>{if(O(n),o(e.catch,2,e.error,t),O(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var s}function nt(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}const ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function st(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function rt(t){t&&t.c()}function it(t,e,n,o){const{fragment:r,on_mount:c,on_destroy:l,after_update:u}=t.$$;r&&r.m(e,n),o||R((()=>{const e=c.map(s).filter(a);l?l.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(R)}function at(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ct(t,e){-1===t.$$.dirty[0]&&(B.push(t),z||(z=!0,M.then(X)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(t,e,n,s,a,c,l=[-1]){const u=_;O(t);const d=t.$$={fragment:null,ctx:null,props:c,update:o,not_equal:a,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:r(),dirty:l,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&ct(t,e)),n})):[],d.update(),p=!0,i(d.before_update),d.fragment=!!s&&s(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(v)}else d.fragment&&d.fragment.c();e.intro&&Q(t.$$.fragment),it(t,e.target,e.anchor,e.customElement),X()}O(u)}class ut{$destroy(){at(this,1),this.$destroy=o}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const dt=window.sessionStorage;dt.clear();const pt={getItem:t=>dt.getItem(t),setItem:(t,e)=>dt.setItem(t,e)},ft=[];function mt(t,e=o){let n;const s=[];function r(e){if(c(t,e)&&(t=e,n)){const e=!ft.length;for(let e=0;e<s.length;e+=1){const n=s[e];n[1](),ft.push(n,t)}if(e){for(let t=0;t<ft.length;t+=2)ft[t][0](ft[t+1]);ft.length=0}}}return{set:r,update:function(e){r(e(t))},subscribe:function(i,a=o){const c=[i,a];return s.push(c),1===s.length&&(n=e(r)||o),i(t),()=>{const t=s.indexOf(c);-1!==t&&s.splice(t,1),0===s.length&&(n(),n=null)}}}}function ht(t,e,n){const s=!Array.isArray(t),r=s?[t]:t,c=e.length<2;return u=t=>{let n=!1;const u=[];let d=0,p=o;const f=()=>{if(d)return;p();const n=e(s?u[0]:u,t);c?t(n):p=a(n)?n:o},m=r.map(((t,e)=>l(t,(t=>{u[e]=t,d&=~(1<<e),n&&f()}),(()=>{d|=1<<e}))));return n=!0,f(),function(){i(m),p()}},{subscribe:mt(n,u).subscribe};var u}const $t=mt(window.localStorage.getItem("lh-enablerr-user")?{user:window.localStorage.getItem("lh-enablerr-user"),gravatar:window.localStorage.getItem("lh-enablerr-gravatar"),tenant:window.localStorage.getItem("lh-enablerr-tenant"),tenants:JSON.parse(window.localStorage.getItem("lh-enablerr-tenants"))}:""),gt=mt([]),vt=mt({tenant:"",status:""});function bt(t){let e,n,o,s,r;const i=t[3].default,a=p(i,t,t[2],null);return{c(){e=y("fieldset"),n=y("legend"),o=w(t[0]),s=x(),a&&a.c(),N(n,"sr-only",!t[1])},m(t,i){g(t,e,i),$(e,n),$(n,o),$(e,s),a&&a.m(e,null),r=!0},p(t,[e]){(!r||1&e)&&j(o,t[0]),2&e&&N(n,"sr-only",!t[1]),a&&a.p&&(!r||4&e)&&m(a,i,t,t[2],e,null,null)},i(t){r||(Q(a,t),r=!0)},o(t){tt(a,t),r=!1},d(t){t&&v(e),a&&a.d(t)}}}function yt(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:r=""}=e,{show:i=!0}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"show"in t&&n(1,i=t.show),"$$scope"in t&&n(2,s=t.$$scope)},[r,i,s,o]}class wt extends ut{constructor(t){super(),lt(this,t,yt,bt,c,{title:0,show:1})}}const xt=t=>({}),kt=t=>({}),St=t=>({}),Et=t=>({});function It(t){let e,n,o,s,r,a,c,l,u,d;const f=t[16].head,h=p(f,t,t[15],Et),$=t[16].tail,b=p($,t,t[15],kt);return{c(){h&&h.c(),e=x(),n=y("input"),s=x(),r=y("input"),c=x(),b&&b.c(),I(n,"type","number"),I(n,"class",o=t[1]+" form-input form-number hidden"),I(n,"id",t[5]),I(n,"name",t[5]),I(n,"placeholder",t[8]),I(n,"aria-label",t[7]),I(n,"title",t[7]),n.required=t[9],n.disabled=t[10],I(n,"pattern",t[11]),I(n,"min",t[2]),I(n,"max",t[12]),I(n,"step",t[3]),I(r,"type","text"),I(r,"id",t[6]),I(r,"name",t[6]),I(r,"class",a=t[1]+" form-input form-number form-shadow"),r.disabled=t[10],I(r,"aria-label",t[7]),I(r,"title",t[7])},m(o,i){h&&h.m(o,i),g(o,e,i),g(o,n,i),q(n,t[0]),g(o,s,i),g(o,r,i),q(r,t[4]),g(o,c,i),b&&b.m(o,i),l=!0,u||(d=[S(n,"input",t[18]),S(n,"blur",t[13]),S(r,"input",t[19]),S(r,"focus",t[17])],u=!0)},p(t,[e]){h&&h.p&&(!l||32768&e)&&m(h,f,t,t[15],e,St,Et),(!l||2&e&&o!==(o=t[1]+" form-input form-number hidden"))&&I(n,"class",o),(!l||4&e)&&I(n,"min",t[2]),(!l||8&e)&&I(n,"step",t[3]),1&e&&C(n.value)!==t[0]&&q(n,t[0]),(!l||2&e&&a!==(a=t[1]+" form-input form-number form-shadow"))&&I(r,"class",a),16&e&&r.value!==t[4]&&q(r,t[4]),b&&b.p&&(!l||32768&e)&&m(b,$,t,t[15],e,xt,kt)},i(t){l||(Q(h,t),Q(b,t),l=!0)},o(t){tt(h,t),tt(b,t),l=!1},d(t){h&&h.d(t),t&&v(e),t&&v(n),t&&v(s),t&&v(r),t&&v(c),b&&b.d(t),u=!1,i(d)}}}function Tt(t,e,n){let{$$slots:o={},$$scope:s}=e,{options:r}=e,{css:i}=e,{value:a}=e;const c=JSON.parse(window.sessionStorage.getItem("Locale")),{name:l,nameShadow:u,title:d,placeholder:p,required:f,disabled:m,pattern:h}=r;let{positive:$,min:g,max:v,decimal:b=0,step:y=1}=r;const w=D();let x;b>0&&(y="any"),$&&!g&&(g=0);const k=((t,e)=>{const n=Intl.NumberFormat?new Intl.NumberFormat(t,{minimumFractionDigits:e}):{format:t=>t};return{format:t=>{try{t=n.format(t||0)}catch{t="(ungültig)"}return t}}})(c.id,b),S=()=>{n(4,x=k.format(a))};return S(),t.$$set=t=>{"options"in t&&n(14,r=t.options),"css"in t&&n(1,i=t.css),"value"in t&&n(0,a=t.value),"$$scope"in t&&n(15,s=t.$$scope)},[a,i,g,y,x,l,u,d,p,f,m,h,v,()=>{S(),w("blur")},r,s,o,function(e){L(t,e)},function(){a=C(this.value),n(0,a)},function(){x=this.value,n(4,x)}]}class Ct extends ut{constructor(t){super(),lt(this,t,Tt,It,c,{options:14,css:1,value:0})}}function jt(t){let e;return{c(){e=y("span"),e.textContent="%",I(e,"slot","head"),I(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function qt(t){let e,n,o;function s(e){t[3](e)}let r={options:t[0],css:t[2],$$slots:{head:[jt]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.value=t[1]),e=new Ct({props:r}),F.push((()=>st(e,"value",s))),e.$on("focus",t[4]),e.$on("blur",t[5]),{c(){rt(e.$$.fragment)},m(t,n){it(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),4&o&&(s.css=t[2]),64&o&&(s.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,s.value=t[1],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Nt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;return o.positive=o.positive||!0,o.max=o.max||100,o.decimal=o.decimal||2,t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(1,r=t.value)},[o,r,s,function(t){r=t,n(1,r)},function(e){L(t,e)},function(e){L(t,e)}]}function _t(t){let e,n;return{c(){e=y("span"),n=w(t[3]),I(e,"slot","head"),I(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,o){g(t,e,o),$(e,n)},p(t,e){8&e&&j(n,t[3])},d(t){t&&v(e)}}}function Ot(t){let e,n,o;function s(e){t[4](e)}let r={options:t[1],css:t[2],$$slots:{head:[_t]},$$scope:{ctx:t}};return void 0!==t[0]&&(r.value=t[0]),e=new Ct({props:r}),F.push((()=>st(e,"value",s))),e.$on("focus",t[5]),e.$on("blur",t[6]),{c(){rt(e.$$.fragment)},m(t,n){it(e,t,n),o=!0},p(t,[o]){const s={};2&o&&(s.options=t[1]),4&o&&(s.css=t[2]),136&o&&(s.$$scope={dirty:o,ctx:t}),!n&&1&o&&(n=!0,s.value=t[0],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function At(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e,{currency:i="CHF"}=e;return t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,r=t.value),"currency"in t&&n(3,i=t.currency)},[r,o,s,i,function(t){r=t,n(0,r)},function(e){L(t,e)},function(e){L(t,e)}]}function Dt(t){let e,n,s,r;return{c(){e=y("input"),I(e,"type","password"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],I(e,"pattern",t[7]),I(e,"autocomplete","off")},m(n,o){g(n,e,o),q(e,t[0]),s||(r=S(e,"input",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&q(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Lt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,d,o,function(){r=this.value,n(0,r)}]}Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value;const Bt=t=>((t,...e)=>e.includes(t))(t,void 0,null),Ft=t=>!Bt(t),Vt=(t,...e)=>e.concat(t).find(Ft),Pt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Mt=(t,e=2,n=0,o=t.toString(),s=n.toString())=>s.repeat(e-o.length)+o,zt=(...t)=>{return(e=t[0],(t,...n)=>Pt(Pt("",e.toString),t,...n))(Mt,...t);var e};function Rt(t){let e,n,s,r;return{c(){e=y("input"),I(e,"type","date"),I(e,"class",n=t[1]+" form-input form-date"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"aria-label",t[3]),I(e,"title",t[3]),I(e,"pattern",Xt),I(e,"min",t[6]),I(e,"max",t[7]),e.required=t[4],e.disabled=t[5]},m(n,o){g(n,e,o),q(e,t[0]),s||(r=[S(e,"input",t[10]),S(e,"blur",t[9])],s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input form-date")&&I(e,"class",n),1&o&&q(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i(r)}}}const Yt={timeZone:"UTC",year:"numeric",month:"long",day:"numeric",weekday:"short"},Jt={year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",timeZoneName:"short"},Ut=(t,e=!1)=>{const n=e?Jt:Yt,o=Intl.DateTimeFormat?new Intl.DateTimeFormat(t,n):{format:t=>t};return{format:t=>{try{t=t?o.format(new Date(t)):""}catch{t="(ungültig)"}return t}}},Xt="\\d{4}(-|/)\\d{2}(-|/)\\d{2}";function Wt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,required:c,disabled:l,min:u,max:d}=o;return r=r.substr(0,10),t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,d,o,function(e){L(t,e)},function(){r=this.value,n(0,r)}]}class Ht extends ut{constructor(t){super(),lt(this,t,Wt,Rt,c,{options:8,css:1,value:0})}}const{document:Zt}=ot;function Gt(t,e,n){const o=t.slice();return o[16]=e[n].lit,o[17]=e[n].ref,o[18]=e,o[19]=n,o}function Kt(t){let e,n,o;function s(){t[12].call(e,t[19])}return{c(){e=y("input"),I(e,"class","iw-m iw-n"+t[17].count+" svelte-u6cc6e"),I(e,"id",t[2]+"-"+t[19]),I(e,"type","text"),I(e,"data-step",t[19]),I(e,"size",t[17].count),I(e,"minlength",t[17].count),I(e,"maxlength",t[17].count),I(e,"pattern",t[5][t[19]]||t[17].pattern),e.required=t[3],e.disabled=t[4]},m(r,i){g(r,e,i),q(e,t[1][t[19]]),n||(o=[S(e,"input",s),S(e,"input",t[8]),S(e,"blur",t[11])],n=!0)},p(n,o){t=n,2&o&&e.value!==t[1][t[19]]&&q(e,t[1][t[19]])},d(t){t&&v(e),n=!1,i(o)}}}function Qt(t){let e,n,s=t[16]+"";return{c(){e=y("span"),n=w(s),I(e,"class","iw-m svelte-u6cc6e")},m(t,o){g(t,e,o),$(e,n)},p:o,d(t){t&&v(e)}}}function te(t){let e;let n=function(t,e){return t[16]?Qt:Kt}(t),o=n(t);return{c(){o.c(),e=k()},m(t,n){o.m(t,n),g(t,e,n)},p(t,e){o.p(t,e)},d(t){o.d(t),t&&v(e)}}}function ee(t){let e,n,s,r,i=t[6].obj,a=[];for(let e=0;e<i.length;e+=1)a[e]=te(Gt(t,i,e));return{c(){e=y("div");for(let t=0;t<a.length;t+=1)a[t].c();I(e,"class",n=t[0]+" form-input svelte-u6cc6e"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"tabindex","0")},m(n,o){g(n,e,o);for(let t=0;t<a.length;t+=1)a[t].m(e,null);s||(r=S(e,"focus",t[7]),s=!0)},p(t,[o]){if(382&o){let n;for(i=t[6].obj,n=0;n<i.length;n+=1){const s=Gt(t,i,n);a[n]?a[n].p(s,o):(a[n]=te(s),a[n].c(),a[n].m(e,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=i.length}1&o&&n!==(n=t[0]+" form-input svelte-u6cc6e")&&I(e,"class",n)},i:o,o:o,d(t){t&&v(e),b(a,t),s=!1,r()}}}function ne(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;r=r.toString();const{name:i,title:a,required:c,disabled:l,mask:u,pattern:d=[]}=o,p=(t=>{let e=[],n="",o=!1;if("string"!=typeof t)return e;const s=(t="")=>{n=t},r=t=>s(n.concat(t)),i=(t=!0)=>{o=t},a=t=>(e.push({lit:t}),void i(!1));for(const c of t)o?a(c):"\\"===c?i():"{"===c?s():"}"===c?e.push({ref:{count:parseInt(n),pattern:`\\d{${n}}`}}):" "===c?a(c):c>=0?r(c):a(c);const c=(t,n="",o=!0,s=0)=>t?e.reduce(((e,n)=>e.concat(n.ref&&n.ref.count?t.slice(s,s+=n.ref.count):o&&n.lit||"")),n):n;return{obj:e,getValues:t=>c(t,[],!1),format:t=>c(t)}})(u),f=p.getValues(r);return t.$$set=t=>{"options"in t&&n(10,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(9,r=t.value)},[s,f,i,c,l,d,p,({relatedTarget:t})=>{if(!t||"INPUT"===t.tagName)return!0;const e=`#${i} > input`;return document.querySelectorAll(e)[0].focus()},({target:t})=>{n(9,r=f.reduce(((t,e)=>t.concat(e))));const e=t.dataset.step;if(f[e].length<t.minLength)return!0;const o=`#${i}-${e} ~ input`,s=document.querySelectorAll(o);return s[0]&&s[0].focus&&s[0].focus()},r,o,function(e){L(t,e)},function(t){f[t]=this.value,n(1,f)}]}class oe extends ut{constructor(t){var e;super(),Zt.getElementById("svelte-u6cc6e-style")||((e=y("style")).id="svelte-u6cc6e-style",e.textContent="span.iw-m.svelte-u6cc6e{margin-right:1px;margin-left:1px}.iw-n1.svelte-u6cc6e{width:0.75rem}.iw-n2.svelte-u6cc6e{width:1.25rem}.iw-n3.svelte-u6cc6e{width:2rem}.iw-n4.svelte-u6cc6e{width:2.5rem}.iw-n5.svelte-u6cc6e{width:3.25rem}.iw-n6.svelte-u6cc6e{width:3.75rem}.iw-n7.svelte-u6cc6e{width:4.5rem}.iw-n8.svelte-u6cc6e{width:5rem}.iw-n9.svelte-u6cc6e{width:5.75rem}.iw-n10.svelte-u6cc6e{width:6.25rem}input.svelte-u6cc6e:invalid{background-color:#fff5f5}",$(Zt.head,e)),lt(this,t,ne,ee,c,{options:10,css:0,value:9})}}function se(t){let e,n,o;function s(e){t[3](e)}let r={options:t[0],css:t[1]};return void 0!==t[2]&&(r.value=t[2]),e=new oe({props:r}),F.push((()=>st(e,"value",s))),e.$on("blur",t[4]),{c(){rt(e.$$.fragment)},m(t,n){it(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),2&o&&(s.css=t[1]),!n&&4&o&&(n=!0,s.value=t[2],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function re(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;return s=s.concat(" form-time"),o.mask="{2}:{2}",o.pattern=["(2[0-3]|[0-1][0-9])","","[0-5][0-9]"],t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(2,r=t.value)},[o,s,r,function(t){r=t,n(2,r)},function(e){L(t,e)}]}class ie extends ut{constructor(t){super(),lt(this,t,re,se,c,{options:0,css:1,value:2})}}function ae(t){let e,n,o,s,r,a,c,l,u,d,p,f;function m(e){t[15](e)}let h={options:t[4],css:t[0]};function b(e){t[16](e)}void 0!==t[1]&&(h.value=t[1]),n=new Ht({props:h}),F.push((()=>st(n,"value",m))),n.$on("blur",t[10]);let w={options:t[3],css:t[0]};return void 0!==t[2]&&(w.value=t[2]),r=new ie({props:w}),F.push((()=>st(r,"value",b))),r.$on("blur",t[10]),{c(){e=y("div"),rt(n.$$.fragment),s=x(),rt(r.$$.fragment),c=x(),l=y("input"),I(e,"id",t[6]),I(e,"tabindex","90"),I(e,"class","hidden"),I(l,"type","text"),I(l,"class",u=t[0]+" form-input form-shadow"),I(l,"id",t[7]),I(l,"name",t[7]),l.disabled=t[9],I(l,"aria-label",t[8]),I(l,"title",t[8])},m(o,i){g(o,e,i),it(n,e,null),$(e,s),it(r,e,null),g(o,c,i),g(o,l,i),q(l,t[5]),d=!0,p||(f=[S(e,"blur",t[10]),S(e,"focus",t[11]),S(l,"input",t[17]),S(l,"focus",t[14])],p=!0)},p(t,[e]){const s={};16&e&&(s.options=t[4]),1&e&&(s.css=t[0]),!o&&2&e&&(o=!0,s.value=t[1],Y((()=>o=!1))),n.$set(s);const i={};8&e&&(i.options=t[3]),1&e&&(i.css=t[0]),!a&&4&e&&(a=!0,i.value=t[2],Y((()=>a=!1))),r.$set(i),(!d||1&e&&u!==(u=t[0]+" form-input form-shadow"))&&I(l,"class",u),32&e&&l.value!==t[5]&&q(l,t[5])},i(t){d||(Q(n.$$.fragment,t),Q(r.$$.fragment,t),d=!0)},o(t){tt(n.$$.fragment,t),tt(r.$$.fragment,t),d=!1},d(t){t&&v(e),at(n),at(r),t&&v(c),t&&v(l),p=!1,i(f)}}}function ce(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale"));let{date:a,time:c}=(t=>{if(!t)return{date:"",time:""};const e=new Date(t),n=e.getFullYear().toString(),o=zt(e.getMonth()+1),s=zt(e.getDate()),r=zt(e.getHours()),i=zt(e.getMinutes());return{date:n.concat("-",o,"-",s),time:r.concat(i)}})(r);const{name:l,nameShadow:u,title:d,disabled:p}=o;let f,m=Object.assign({},o),h=Object.assign({},o);h.name=l+"-Date",m.name=l+"-Time";const $=Ut(i.id,!0),g=()=>{try{n(12,(t=c,r=new Date(a.substring(0,10).concat("T",t.substr(0,2),":",t.substr(2))).toISOString()))}catch(t){n(12,r=a||c?"invalid":"")}var t;n(5,f=$.format(r))},v=t=>t.startsWith(h.name),b=D();return g(),t.$$set=t=>{"options"in t&&n(13,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(12,r=t.value)},[s,a,c,m,h,f,l,u,d,p,({relatedTarget:t})=>{if(t){if(t.id.startsWith(m.name))return!0;if(v(t.id))return!0}g(),b("blur")},({relatedTarget:t})=>!t||(!!v(t.id)||void document.getElementById(h.name).focus()),r,o,function(e){L(t,e)},function(t){a=t,n(1,a)},function(t){c=t,n(2,c)},function(){f=this.value,n(5,f)}]}function le(t){let e,n,o,s,r,a,c,l;function u(e){t[10](e)}let d={options:t[1],css:t[2]+" hidden"};return void 0!==t[0]&&(d.value=t[0]),e=new Ht({props:d}),F.push((()=>st(e,"value",u))),e.$on("blur",t[8]),{c(){rt(e.$$.fragment),o=x(),s=y("input"),I(s,"type","text"),I(s,"class",r=t[2]+" form-input form-shadow"),I(s,"id",t[4]),I(s,"name",t[4]),I(s,"placeholder",t[6]),s.disabled=t[7],I(s,"aria-label",t[5]),I(s,"title",t[5])},m(n,r){it(e,n,r),g(n,o,r),g(n,s,r),q(s,t[3]),a=!0,c||(l=[S(s,"input",t[11]),S(s,"focus",t[9])],c=!0)},p(t,[o]){const i={};2&o&&(i.options=t[1]),4&o&&(i.css=t[2]+" hidden"),!n&&1&o&&(n=!0,i.value=t[0],Y((()=>n=!1))),e.$set(i),(!a||4&o&&r!==(r=t[2]+" form-input form-shadow"))&&I(s,"class",r),8&o&&s.value!==t[3]&&q(s,t[3])},i(t){a||(Q(e.$$.fragment,t),a=!0)},o(t){tt(e.$$.fragment,t),a=!1},d(t){at(e,t),t&&v(o),t&&v(s),c=!1,i(l)}}}function ue(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale")),{nameShadow:a,title:c,placeholder:l,disabled:u}=o;let d;const p=Ut(i.id),f=()=>{n(3,d=p.format(r))},m=D();return f(),t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,r=t.value)},[r,o,s,d,a,c,l,u,()=>{f(),m("blur")},function(e){L(t,e)},function(t){r=t,n(0,r)},function(){d=this.value,n(3,d)}]}function de(t){let e,n,s,r;return{c(){e=y("input"),I(e,"type","email"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6]},m(n,o){g(n,e,o),q(e,t[0]),s||(r=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&q(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function pe(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,o,function(){r=this.value,n(0,r)}]}function fe(t){let e,n,s,r;return{c(){e=y("textarea"),I(e,"rows",t[6]),I(e,"class",n=t[1]+" form-textarea block"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[4],e.disabled=t[5]},m(n,o){g(n,e,o),q(e,t[0]),s||(r=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-textarea block")&&I(e,"class",n),1&o&&q(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function me(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,required:c,disabled:l,rows:u=3}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,o,function(){r=this.value,n(0,r)}]}function he(t){let e,n,s,r,a,c,l,u;return{c(){e=y("div"),n=y("input"),s=x(),r=y("div"),a=x(),c=y("div"),I(n,"type","checkbox"),I(n,"id",t[1]),I(n,"name",t[1]),I(n,"aria-label",t[2]),I(n,"title",t[2]),n.disabled=t[3],I(n,"class","svelte-ke6ng1"),I(r,"class","track svelte-ke6ng1"),I(c,"class","thumb svelte-ke6ng1"),I(e,"class","switch svelte-ke6ng1")},m(o,i){g(o,e,i),$(e,n),n.checked=t[0],$(e,s),$(e,r),$(e,a),$(e,c),l||(u=[S(n,"change",t[7]),S(r,"click",t[4]),S(c,"click",t[4])],l=!0)},p(t,[e]){1&e&&(n.checked=t[0])},i:o,o:o,d(t){t&&v(e),l=!1,i(u)}}}function $e(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;s="";const{name:i,title:a,disabled:c}=o;return t.$$set=t=>{"options"in t&&n(6,o=t.options),"css"in t&&n(5,s=t.css),"value"in t&&n(0,r=t.value)},[r,i,a,c,()=>n(0,r=c?r:!r),s,o,function(){r=this.checked,n(0,r)}]}function ge(t){let e,n,s,r;return{c(){e=y("input"),I(e,"type","file"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"pattern",t[7]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],e.multiple=!0},m(n,o){g(n,e,o),s||(r=S(e,"change",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n)},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function ve(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,d,o,function(){r=this.value,n(0,r)}]}function be(t){let e,n,s,r;return{c(){e=y("input"),I(e,"type","text"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],I(e,"pattern",t[7]),I(e,"autocomplete",t[8])},m(n,o){g(n,e,o),q(e,t[0]),s||(r=S(e,"input",t[10]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&q(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function ye(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u,pattern:d,autocomplete:p="on"}=o;return t.$$set=t=>{"options"in t&&n(9,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,d,p,o,function(){r=this.value,n(0,r)}]}function we(t){let e,n,s;return{c(){e=y("input"),I(e,"type","hidden"),I(e,"id",t[1]),I(e,"name",t[1]),e.disabled=!0},m(o,r){g(o,e,r),q(e,t[0]),n||(s=S(e,"input",t[4]),n=!0)},p(t,[n]){1&n&&q(e,t[0])},i:o,o:o,d(t){t&&v(e),n=!1,s()}}}function xe(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;s="";const{name:i}=o;return t.$$set=t=>{"options"in t&&n(3,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,r=t.value)},[r,i,s,o,function(){r=this.value,n(0,r)}]}const{document:ke}=ot;function Se(t){let e;return{c(){e=y("p"),e.textContent=`Unknow input type: ${t[4]}`,I(e,"class","svelte-166hp95")},m(t,n){g(t,e,n)},p:o,i:o,o:o,d(t){t&&v(e)}}}function Ee(t){let e,n,o,s;function r(e){t[9](e)}var i=t[6];function a(t){let e={options:t[0],css:Le};return void 0!==t[1]&&(e.value=t[1]),{props:e}}return i&&(e=new i(a(t)),F.push((()=>st(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8])),{c(){e&&rt(e.$$.fragment),o=k()},m(t,n){e&&it(e,t,n),g(t,o,n),s=!0},p(t,s){const c={};if(1&s&&(c.options=t[0]),!n&&2&s&&(n=!0,c.value=t[1],Y((()=>n=!1))),i!==(i=t[6])){if(e){G();const t=e;tt(t.$$.fragment,1,0,(()=>{at(t,1)})),K()}i?(e=new i(a(t)),F.push((()=>st(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8]),rt(e.$$.fragment),Q(e.$$.fragment,1),it(e,o.parentNode,o)):e=null}else i&&e.$set(c)},i(t){s||(e&&Q(e.$$.fragment,t),s=!0)},o(t){e&&tt(e.$$.fragment,t),s=!1},d(t){t&&v(o),e&&at(e,t)}}}function Ie(t){let e,n,s,r,i,a,c,l,u,d,p,f=t[2].title+"";const m=[Ee,Se],h=[];a=function(t,e){return t[6]?0:1}(t),c=h[a]=m[a](t);let b=t[5]&&function(t){let e;return{c(){e=y("p"),e.textContent=`${t[5]}`,I(e,"class","form-hint hidden svelte-166hp95")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=y("fieldset"),n=y("label"),s=w(f),i=x(),c.c(),l=x(),b&&b.c(),I(n,"for",r=t[2].id),I(n,"disabled",t[3])},m(o,r){g(o,e,r),$(e,n),$(n,s),$(e,i),h[a].m(e,null),$(e,l),b&&b.m(e,null),u=!0,d||(p=S(n,"click",t[7]),d=!0)},p(t,[e]){(!u||4&e)&&f!==(f=t[2].title+"")&&j(s,f),(!u||4&e&&r!==(r=t[2].id))&&I(n,"for",r),c.p(t,e),t[5]&&b.p(t,e)},i(t){u||(Q(c),u=!0)},o(t){tt(c),u=!1},d(t){t&&v(e),h[a].d(),b&&b.d(),d=!1,p()}}}const Te={hidden:class extends ut{constructor(t){super(),lt(this,t,xe,we,c,{options:3,css:2,value:0})}},text:class extends ut{constructor(t){super(),lt(this,t,ye,be,c,{options:9,css:1,value:0})}},file:class extends ut{constructor(t){super(),lt(this,t,ve,ge,c,{options:8,css:1,value:0})}},checkbox:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-ke6ng1-style")||((e=y("style")).id="svelte-ke6ng1-style",e.textContent=".switch.svelte-ke6ng1.svelte-ke6ng1{display:block;position:relative;vertical-align:middle;cursor:pointer;background-color:transparent;user-select:none}.track.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:3rem;height:1.5rem;background-color:#a0aec0;border-radius:9999px;box-shadow:inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)}.thumb.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:1.5rem;height:1.5rem;background-color:white;transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);border-radius:9999px;border-width:2px;border-color:#a0aec0}input[type='checkbox'].svelte-ke6ng1.svelte-ke6ng1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}input[type='checkbox'].svelte-ke6ng1:checked~.thumb.svelte-ke6ng1{border-color:#38b2ac;--transform-translate-x:100%;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;--border-opacity:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}input[type='checkbox'].svelte-ke6ng1:checked~.track.svelte-ke6ng1{background-color:#38b2ac;--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transition-property:background-color, border-color, color, fill, stroke}input[type='checkbox'].svelte-ke6ng1:disabled~.track.svelte-ke6ng1{background-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled~.thumb.svelte-ke6ng1{background-color:#f7fafc;border-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.thumb.svelte-ke6ng1{border-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.track.svelte-ke6ng1{background-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:focus+.track.svelte-ke6ng1,input[type='checkbox'].svelte-ke6ng1:active+.track.svelte-ke6ng1{box-shadow:0 0 0 3px rgba(66, 153, 225, 0.5)}",$(document.head,e)),lt(this,t,$e,he,c,{options:6,css:5,value:0})}},masked:oe,textarea:class extends ut{constructor(t){super(),lt(this,t,me,fe,c,{options:7,css:1,value:0})}},email:class extends ut{constructor(t){super(),lt(this,t,pe,de,c,{options:7,css:1,value:0})}},date:class extends ut{constructor(t){super(),lt(this,t,ue,le,c,{options:1,css:2,value:0})}},datetime:class extends ut{constructor(t){super(),lt(this,t,ce,ae,c,{options:13,css:0,value:12})}},number:Ct,password:class extends ut{constructor(t){super(),lt(this,t,Lt,Dt,c,{options:8,css:1,value:0})}},currency:class extends ut{constructor(t){super(),lt(this,t,At,Ot,c,{options:1,css:2,value:0,currency:3})}},rate:class extends ut{constructor(t){super(),lt(this,t,Nt,qt,c,{options:0,css:2,value:1})}}},Ce={default:"",checkbox:!1,email:"@",number:0,currency:0,rate:0},je=t=>t+"-show",qe=t=>t&&document.getElementById(t),Ne=(t,e,n="block")=>{t&&t.style&&(t.style.display=e?n:"none")},_e=(t,e)=>{if(!t)return!0;const n=qe(t);if(!n)return!0;const o=qe(je(t));return!e&&!o||(o&&Ne(o,!e),Ne(n,e),e&&n.focus&&n.focus(),!1)},Oe=t=>_e(t,!0),Ae=(t,e=qe(t))=>e&&e.children&&e.children.length?Array.from(e.children).every((t=>Ae(t.id,t))):!e||!e.validity||e.validity.valid,De=t=>void 0===Ce[t]?Ce.default:Ce[t],Le="form-field";function Be(t,e,n){let{options:o}=e,{value:s}=e;const{label:r={},disabled:i,type:a="text",hint:c=!1}=o;r.id=o.name,o.nameShadow=je(o.name),o.required=!i&&o.required,o.title=o.title||o.placeholder;const l=(t=>Te[t])(a);return t.$$set=t=>{"options"in t&&n(0,o=t.options),"value"in t&&n(1,s=t.value)},[o,s,r,i,a,c,l,t=>Oe(o.name),t=>{return e=o.name,_e(e,!1);var e},function(t){s=t,n(1,s)}]}class Fe extends ut{constructor(t){var e;super(),ke.getElementById("svelte-166hp95-style")||((e=y("style")).id="svelte-166hp95-style",e.textContent="p.svelte-166hp95,.form-hint.svelte-166hp95{padding-left:0.75rem;color:#38b2ac;font-size:0.875rem;font-style:italic}",$(ke.head,e)),lt(this,t,Be,Ie,c,{options:0,value:1})}}var Ve=Object.prototype.hasOwnProperty;function Pe(t){return null==t}function Me(t){return Pe(t)||Object.keys(t).length<=0}const ze=function t(e,n){var o,s;if(e===n)return!0;if(e&&n&&(o=e.constructor)===n.constructor){if(o===Date)return e.getTime()===n.getTime();if(o===RegExp)return e.toString()===n.toString();if(o===Array){if((s=e.length)===n.length)for(;s--&&t(e[s],n[s]););return-1===s}if(!o||"object"==typeof e){for(o in s=0,e){if(Ve.call(e,o)&&++s&&!Ve.call(n,o))return!1;if(!(o in n)||!t(e[o],n[o]))return!1}return Object.keys(n).length===s}}return e!=e&&n!=n};function Re(t,e,n){if(new Object(t)!==t)return t;Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]);const o=e.slice(0,-1).reduce(((t,n,o)=>new Object(t[n])===t[n]?t[n]:t[n]=Math.trunc(Math.abs(e[o+1]))===+e[o+1]?[]:{}),t);return o[e[e.length-1]]=n,t}const Ye={assignDeep:function t(e,n){if(Array.isArray(e))return e.map((e=>t(e,n)));const o={};for(const s in e)o[s]="object"==typeof e[s]?t(e[s],n):n;return o},cloneDeep:function(t){return JSON.parse(JSON.stringify(t))},deepEqual:ze,getErrorsFromSchema:function t(e,n,o={}){for(const s in n)switch(!0){case"object"===n[s].type&&!Me(n[s].fields):o[s]=t(e[s],n[s].fields,{...o[s]});break;case"array"===n[s].type:{const r=e&&e[s]?e[s]:[];o[s]=r.map((e=>{const r=t(e,n[s].innerType.fields,{...o[s]});return Object.keys(r).length>0?r:""}));break}default:o[s]=""}return o},getValues:function t(e){let n=[];for(const[,o]of Object.entries(e)){const e="object"==typeof o?t(o):[o];n=[...n,...e]}return n},isEmpty:Me,isNullish:Pe,set:Re,subscribeOnce:function(t){return new Promise((e=>{t.subscribe(e)()}))},update:function(t,e,n){t.update((t=>(Re(t,e,n),t)))}};const Je=t=>{let e=t.initialValues||{};const n=t.validationSchema,o=t.validate,s=t.onSubmit,r=()=>Ye.cloneDeep(e),i=()=>n?Ye.getErrorsFromSchema(e,n.fields):Ye.assignDeep(e,""),a=()=>Ye.assignDeep(e,!1),c=mt(r()),l=mt(i()),d=mt(a()),p=mt(!1),f=mt(!1),m=ht(l,(t=>Ye.getValues(t).every((t=>""===t)))),h=ht(c,(t=>{const n=Ye.assignDeep(t,!1);for(let o in t)n[o]=!Ye.deepEqual(t[o],e[o]);return n})),$=ht(h,(t=>Ye.getValues(t).includes(!0)));function g(t,e){return x(t,!0),n?(f.set(!0),n.validateAt(t,u(c)).then((()=>Ye.update(l,t,""))).catch((e=>Ye.update(l,t,e.message))).finally((()=>{f.set(!1)}))):o?(f.set(!0),Promise.resolve().then((()=>o({[t]:e}))).then((e=>Ye.update(l,t,Ye.isNullish(e)?"":e[t]))).finally((()=>{f.set(!1)}))):Promise.resolve()}function v(t,e){return w(t,e),g(t,e)}function b(){c.set(r()),l.set(i()),d.set(a())}function y(t){return Promise.resolve().then((()=>l.set(i()))).then((()=>s(t,c,l))).finally((()=>p.set(!1)))}function w(t,e){Ye.update(c,t,e)}function x(t,e){Ye.update(d,t,e)}return{form:c,errors:l,touched:d,modified:h,isValid:m,isSubmitting:p,isValidating:f,isModified:$,handleChange:function(t){const e=t.target,n=e.name||e.id,o=function(t){return t.getAttribute&&"checkbox"===t.getAttribute("type")}(e)?e.checked:e.value;return v(n,o)},handleSubmit:function(t){return t&&t.preventDefault&&t.preventDefault(),p.set(!0),Ye.subscribeOnce(c).then((t=>"function"==typeof o?(f.set(!0),Promise.resolve().then((()=>o(t))).then((e=>{Ye.isNullish(e)||0===Ye.getValues(e).length?y(t):(l.set(e),p.set(!1))})).finally((()=>f.set(!1)))):n?(f.set(!0),n.validate(t,{abortEarly:!1}).then((()=>y(t))).catch((t=>{if(t&&t.inner){const e=i();t.inner.map((t=>Ye.set(e,t.path,t.message))),l.set(e)}p.set(!1)})).finally((()=>f.set(!1)))):void y(t)))},handleReset:b,updateField:w,updateValidateField:v,updateTouched:x,validateField:function(t){return Ye.subscribeOnce(c).then((e=>g(t,e[t])))},updateInitialValues:function(t){e=t,b()},state:ht([c,l,d,h,m,f,p,$],(([t,e,n,o,s,r,i,a])=>({form:t,errors:e,touched:n,modified:o,isValid:s,isSubmitting:i,isValidating:r,isModified:a})))}};function Ue(t,e,n){const o=t.slice();return o[33]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function Xe(t,e,n){const o=t.slice();return o[0]=e[n],o[36]=e,o[37]=n,o}function We(t){let e,n,o,s=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=y("p"),n=w(s),o=w(r),I(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){g(t,e,s),$(e,n),$(e,o)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&j(o,r)},d(t){t&&v(e)}}}function He(t){let e;return{c(){e=y("p"),e.textContent=`${t[8].text}`,I(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}function Ze(t){let e,n,o;function s(e){t[18](e,t[0])}let r={options:t[0]};return void 0!==t[4][t[0].name]&&(r.value=t[4][t[0].name]),e=new Fe({props:r}),F.push((()=>st(e,"value",s))),{c(){rt(e.$$.fragment)},m(t,n){it(e,t,n),o=!0},p(o,s){t=o;const r={};!n&&80&s[0]&&(n=!0,r.value=t[4][t[0].name],Y((()=>n=!1))),e.$set(r)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Ge(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=Ze(Xe(t,o,e));const r=t=>tt(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=k()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);g(t,e,o),n=!0},p(t,n){if(80&n[0]){let i;for(o=t[14],i=0;i<o.length;i+=1){const r=Xe(t,o,i);s[i]?(s[i].p(r,n),Q(s[i],1)):(s[i]=Ze(r),s[i].c(),Q(s[i],1),s[i].m(e.parentNode,e))}for(G(),i=o.length;i<s.length;i+=1)r(i);K()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Q(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)tt(s[t]);n=!1},d(t){b(s,t),t&&v(e)}}}function Ke(t){let e,n;return e=new wt({props:{title:t[13],show:t[33],$$slots:{default:[Ge]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};16&n[0]|128&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Qe(t){let e,n,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,n;return{c(){e=y("m-icon"),T(e,"class","mar-r-md"),T(e,"name",n=t[9].icon)},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=y("button"),i&&i.c(),n=x(),s=w(r),I(e,"ord","primary"),I(e,"class","full-width"),I(e,"type","submit")},m(t,o){g(t,e,o),i&&i.m(e,null),$(e,n),$(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&v(e),i&&i.d()}}}function tn(t){let e,n,s,r,i,a,c,l,u,d,p,f;document.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=y("h2"),e.textContent=`${t[13].text}`},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&We(t),w=t[3]&&t[8].text&&He(t),k=t[6],T=[];for(let e=0;e<k.length;e+=1)T[e]=Ke(Ue(t,k,e));const C=t=>tt(T[t],1,1,(()=>{T[t]=null}));let j=t[9]&&Qe(t);return{c(){n=x(),m&&m.c(),s=x(),h&&h.c(),r=x(),w&&w.c(),i=x(),a=y("p"),a.textContent=`${t[10].text}`,c=x(),l=y("form");for(let t=0;t<T.length;t+=1)T[t].c();u=x(),j&&j.c(),I(a,"id","er-invalid"),I(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),l.noValidate=!0},m(e,o){g(e,n,o),m&&m.m(e,o),g(e,s,o),h&&h.m(e,o),g(e,r,o),w&&w.m(e,o),g(e,i,o),g(e,a,o),g(e,c,o),g(e,l,o);for(let t=0;t<T.length;t+=1)T[t].m(l,null);$(l,u),j&&j.m(l,null),d=!0,p||(f=S(l,"submit",E(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(document.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?h?h.p(t,n):(h=We(t),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null),t[3]&&t[8].text?w?w.p(t,n):(w=He(t),w.c(),w.m(i.parentNode,i)):w&&(w.d(1),w=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=Ue(t,k,e);T[e]?(T[e].p(o,n),Q(T[e],1)):(T[e]=Ke(o),T[e].c(),Q(T[e],1),T[e].m(l,u))}for(G(),e=k.length;e<T.length;e+=1)C(e);K()}t[9]&&j.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(T[t]);d=!0}},o(t){T=T.filter(Boolean);for(let t=0;t<T.length;t+=1)tt(T[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(r),w&&w.d(t),t&&v(i),t&&v(a),t&&v(c),t&&v(l),b(T,t),j&&j.d(),p=!1,f()}}}function en(t,n,o){let s,r,{options:i={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:$=[]}=i;a=a||{};const g={};let v=!1,b="",y=!1;const w=u.reduce(((t,e)=>t.concat(e.fields)),[]),x=(t,n)=>{let o={};for(const t in I)(Bt(a[t])||Ft(n[t])&&I[t]!==n[t])&&(o[t]=n[t]);if(((t={})=>!Object.keys(t).length)(o))return!1;const{_id:s,id:r}=n;return e.post("/api/"+t,{...o,_id:s,id:r}).then((t=>t.data))},k=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+r[e]),"?"))(o)))),S=()=>{const t=w.find((t=>!Ae(t.name)));return!t||(((t="",e=0,n=document.getElementById(t))=>{n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e))})("er-invalid",3e3),Oe(t.name),!1)},E={},I={};w.map((({name:t,type:e,value:n})=>{const s=De(e);let r=Vt(s,g[t],a[t],n);switch(e){case"date":r=r.substr(0,10);case"masked":r=r.toString()}o(17,E[t]=r,E),I[t]=r}));const{form:T,handleSubmit:C,handleReset:j}=Je({initialValues:E,onSubmit:async t=>{if(!p)return;if(!S())return;const{path:e,func:n}=p,s=(t=>w.reduce(((e,n)=>(e[n.name]=t[n.name],e)),{}))(t);let r={};e&&!(r=await x(e,s))||n&&!(r=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(n,s,r))||((t,e)=>{const{action:n,url:s,query:r,reset:i}=t,{status:a=!0,data:c,message:l={}}=e;a?(o(3,y=!0),setTimeout((()=>{o(3,y=!1),k(n,c,s,r)}),m.text?1e3:10)):(i&&j(),o(1,v=!0),o(2,b=l.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,r)}});return d(t,T,(t=>o(4,r=t))),t.$$set=t=>{"options"in t&&o(0,i=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=E.Title||l.text||c)},[i,v,b,y,r,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},T,C,l,w,a,c,E,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,T.set(r))}]}const{document:nn}=ot;function on(t,e,n){const o=t.slice();return o[32]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function sn(t,e,n){const o=t.slice();return o[0]=e[n],o[35]=e,o[36]=n,o}function rn(t){let e,n,o,s=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=y("p"),n=w(s),o=w(r),I(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){g(t,e,s),$(e,n),$(e,o)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&j(o,r)},d(t){t&&v(e)}}}function an(t){let e;return{c(){e=y("p"),e.textContent=`${t[8].text}`,I(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}function cn(t){let e,n,o,s;function r(e){t[18](e,t[0])}let i={options:t[0]};return void 0!==t[4][t[0].name]&&(i.value=t[4][t[0].name]),e=new Fe({props:i}),F.push((()=>st(e,"value",r))),{c(){rt(e.$$.fragment),o=x()},m(t,n){it(e,t,n),g(t,o,n),s=!0},p(o,s){t=o;const r={};!n&&80&s[0]&&(n=!0,r.value=t[4][t[0].name],Y((()=>n=!1))),e.$set(r)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){at(e,t),t&&v(o)}}}function ln(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=cn(sn(t,o,e));const r=t=>tt(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=k()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);g(t,e,o),n=!0},p(t,n){if(80&n[0]){let i;for(o=t[14],i=0;i<o.length;i+=1){const r=sn(t,o,i);s[i]?(s[i].p(r,n),Q(s[i],1)):(s[i]=cn(r),s[i].c(),Q(s[i],1),s[i].m(e.parentNode,e))}for(G(),i=o.length;i<s.length;i+=1)r(i);K()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Q(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)tt(s[t]);n=!1},d(t){b(s,t),t&&v(e)}}}function un(t){let e,n;return e=new wt({props:{title:t[13],show:t[32],$$slots:{default:[ln]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};16&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function dn(t){let e,n,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,n;return{c(){e=y("m-icon"),T(e,"class","mar-r-md"),T(e,"name",n=t[9].icon)},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=y("button"),i&&i.c(),n=x(),s=w(r),I(e,"ord","primary"),I(e,"class","full-width"),I(e,"type","submit")},m(t,o){g(t,e,o),i&&i.m(e,null),$(e,n),$(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&v(e),i&&i.d()}}}function pn(t){let e,n,s,r,i,a,c,l,u,d,p,f;nn.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=y("h2"),e.textContent=`${t[13].text}`,I(e,"class","mt-6 text-center text-2xl leading-9 font-extrabold text-gray-900")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&rn(t),w=t[3]&&t[8].text&&an(t),k=t[6],T=[];for(let e=0;e<k.length;e+=1)T[e]=un(on(t,k,e));const C=t=>tt(T[t],1,1,(()=>{T[t]=null}));let j=t[9]&&dn(t);return{c(){n=x(),m&&m.c(),s=x(),h&&h.c(),r=x(),w&&w.c(),i=x(),a=y("p"),a.textContent=`${t[10].text}`,c=x(),l=y("form");for(let t=0;t<T.length;t+=1)T[t].c();u=x(),j&&j.c(),I(a,"id","er-invalid"),I(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),I(l,"class","mt-4"),l.noValidate=!0,I(l,"enctype","multipart/form-data")},m(e,o){g(e,n,o),m&&m.m(e,o),g(e,s,o),h&&h.m(e,o),g(e,r,o),w&&w.m(e,o),g(e,i,o),g(e,a,o),g(e,c,o),g(e,l,o);for(let t=0;t<T.length;t+=1)T[t].m(l,null);$(l,u),j&&j.m(l,null),d=!0,p||(f=S(l,"submit",E(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(nn.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?h?h.p(t,n):(h=rn(t),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null),t[3]&&t[8].text?w?w.p(t,n):(w=an(t),w.c(),w.m(i.parentNode,i)):w&&(w.d(1),w=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=on(t,k,e);T[e]?(T[e].p(o,n),Q(T[e],1)):(T[e]=un(o),T[e].c(),Q(T[e],1),T[e].m(l,u))}for(G(),e=k.length;e<T.length;e+=1)C(e);K()}t[9]&&j.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(T[t]);d=!0}},o(t){T=T.filter(Boolean);for(let t=0;t<T.length;t+=1)tt(T[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(r),w&&w.d(t),t&&v(i),t&&v(a),t&&v(c),t&&v(l),b(T,t),j&&j.d(),p=!1,f()}}}function fn(t,n,o){let s,r,{options:i={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:$=[]}=i;a=a||{};const g={};let v=!1,b="",y=!1;const w=u.reduce(((t,e)=>t.concat(e.fields)),[]),x=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+r[e]),"?"))(o)))),k={},S={};w.map((({name:t,type:e,value:n})=>{const s=De(e);let r=Vt(s,g[t],a[t],n);o(17,k[t]=r,k),S[t]=r}));const{form:E,handleSubmit:I,handleReset:T}=Je({initialValues:k,onSubmit:async t=>{if(!p)return;const{path:n,func:s}=p,r=(()=>{const t=new FormData,e=document.querySelector("#plugin").files;for(let n=0;n<e.length;n++)t.append(`upload_${n}`,e[n]);return t})();let i={};n&&!(i=await((t,n)=>e.post("/api/"+t,n,{headers:{"Content-Type":"multipart/form-data"}}).then((t=>t.data)))(n,r))||s&&!(i=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(s,r,i))||((t,e)=>{const{action:n,url:s,query:r,reset:i}=t,{status:a=!0,data:c,message:l={}}=e;a?(o(3,y=!0),setTimeout((()=>{o(3,y=!1),x(n,c,s,r)}),m.text?1e3:10)):(i&&T(),o(1,v=!0),o(2,b=l.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,i)}});return d(t,E,(t=>o(4,r=t))),t.$$set=t=>{"options"in t&&o(0,i=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=k.Title||l.text||c)},[i,v,b,y,r,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},E,I,l,w,a,c,k,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,E.set(r))}]}function mn(t){let e,n,o,s;const r=t[3].default,i=p(r,t,t[2],null);return{c(){e=y("button"),i&&i.c(),I(e,"class","link-button txt-sm mar-r-sm"),e.disabled=t[1]},m(r,a){g(r,e,a),i&&i.m(e,null),n=!0,o||(s=S(e,"click",t[4]),o=!0)},p(t,[o]){i&&i.p&&(!n||4&o)&&m(i,r,t,t[2],o,null,null),(!n||2&o)&&(e.disabled=t[1])},i(t){n||(Q(i,t),n=!0)},o(t){tt(i,t),n=!1},d(t){t&&v(e),i&&i.d(t),o=!1,s()}}}function hn(t,e,n){let{$$slots:o={},$$scope:s}=e,{path:r}=e,{disabled:i}=e;return t.$$set=t=>{"path"in t&&n(0,r=t.path),"disabled"in t&&n(1,i=t.disabled),"$$scope"in t&&n(2,s=t.$$scope)},[r,i,s,o,()=>window.singleSpaNavigate(r)]}function $n(t){let e,n,o,s,r;const i=t[5].default,a=p(i,t,t[4],null);return{c(){e=y("span"),a&&a.c(),I(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),I(e,"title",t[0])},m(n,i){g(n,e,i),a&&a.m(e,null),o=!0,s||(r=S(e,"click",t[2]),s=!0)},p(t,[s]){a&&a.p&&(!o||16&s)&&m(a,i,t,t[4],s,null,null),(!o||2&s&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&I(e,"class",n),(!o||1&s)&&I(e,"title",t[0])},i(t){o||(Q(a,t),o=!0)},o(t){tt(a,t),o=!1},d(t){t&&v(e),a&&a.d(t),s=!1,r()}}}function gn(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:r}=e,{link:i="/"}=e,{color:a}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,a=t.color),"$$scope"in t&&n(4,s=t.$$scope)},[r,a,()=>window.singleSpaNavigate(i),i,s,o]}function vn(t){let e,n,o=t[0](),s=o&&function(t){let e;const n=t[2].default,o=p(n,t,t[1],null);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||2&s)&&m(o,n,t,t[1],s,null,null)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}(t);return{c(){s&&s.c(),e=k()},m(t,o){s&&s.m(t,o),g(t,e,o),n=!0},p(t,[e]){o&&s.p(t,e)},i(t){n||(Q(s),n=!0)},o(t){tt(s),n=!1},d(t){s&&s.d(t),t&&v(e)}}}function bn(t,e,n){let{$$slots:o={},$$scope:s}=e;D();const r=window.location.pathname;return t.$$set=t=>{"$$scope"in t&&n(1,s=t.$$scope)},[()=>!!u($t)||window.singleSpaNavigate(`/?p=${r}`),s,o]}function yn(t,e,n){let o;d(t,gt,(t=>n(1,o=t)));let{description:s}=e;return t.$$set=t=>{"description"in t&&n(0,s=t.description)},t.$$.update=()=>{if(3&t.$$.dirty&&s){const t=s;s.length>30&&n(0,s=s.substring(0,30)+"...");const e=window.location.pathname,r=o;r.find((t=>t.href===e))||gt.set(r.slice(Math.max(r.length-6+1,0)).concat({href:e,text:s,desc:t}))}},[s,o]}function wn(t,{modulePath:e,update:n}){const o="single-spa:routing-event",s=({currentTarget:o})=>{if(!n||!e)return;const[,s,...r]=o.location.pathname.split("/");e===s&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...r)}}))};return window.addEventListener(o,s),{destroy(){window.removeEventListener(o,s)}}}const xn=t=>({prop:2&t}),kn=t=>({prop:t[5]});function Sn(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!1,pending:Tn,then:In,catch:En,value:5,blocks:[,,,]};return et(n=t[1],s),{c(){e=k(),s.block.c()},m(t,n){g(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,2&o&&n!==(n=t[1])&&et(n,s)||nt(s,t,o)},i(t){o||(Q(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){tt(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function En(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function In(t){let e;const n=t[4].default,o=p(n,t,t[3],kn);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||10&s)&&m(o,n,t,t[3],s,xn,kn)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function Tn(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function Cn(t){let e,n,o,s,r,c=t[1]&&Sn(t);return{c(){e=y("div"),c&&c.c(),I(e,"class","data")},m(i,a){g(i,e,a),c&&c.m(e,null),o=!0,s||(r=[h(n=wn.call(null,e,t[0])),S(e,"data",t[2])],s=!0)},p(t,[o]){t[1]?c?(c.p(t,o),2&o&&Q(c,1)):(c=Sn(t),c.c(),Q(c,1),c.m(e,null)):c&&(G(),tt(c,1,1,(()=>{c=null})),K()),n&&a(n.update)&&1&o&&n.update.call(null,t[0])},i(t){o||(Q(c),o=!0)},o(t){tt(c),o=!1},d(t){t&&v(e),c&&c.d(),s=!1,i(r)}}}function jn(t,e,n){let o,{$$slots:s={},$$scope:r}=e,{options:i}=e;return t.$$set=t=>{"options"in t&&n(0,i=t.options),"$$scope"in t&&n(3,r=t.$$scope)},[i,o,({detail:t})=>{n(1,o=t.data)},r,s]}function qn(t,{modulePath:e,update:n}){const o="single-spa:routing-event",s=({currentTarget:o})=>{if(!n||!e)return;const[,s,...r]=o.location.pathname.split("/");e===s&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...r)}}))};return window.addEventListener(o,s),{destroy(){window.removeEventListener(o,s)}}}const Nn=t=>({prop:2&t}),_n=t=>({prop:t[7]});function On(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[Ln]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function An(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!0,pending:zn,then:Pn,catch:Bn,value:7,error:8,blocks:[,,,]};return et(n=t[1],s),{c(){e=k(),s.block.c()},m(t,n){g(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,2&o&&n!==(n=t[1])&&et(n,s)||nt(s,t,o)},i(t){o||(Q(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){tt(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function Dn(t){let e;return{c(){e=w("... Initializing ...")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function Ln(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Dn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Bn(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Oops!",$$slots:{default:[Vn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Fn(t){let e,n,o,s=t[8]+"";return{c(){e=w("... "),n=w(s),o=w(" ...")},m(t,s){g(t,e,s),g(t,n,s),g(t,o,s)},p(t,e){2&e&&s!==(s=t[8]+"")&&j(n,s)},d(t){t&&v(e),t&&v(n),t&&v(o)}}}function Vn(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Fn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Pn(t){let e,n;return e=new t[2]({props:{class:"form",title:t[7].title,$$slots:{default:[Mn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.title=t[7].title),66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Mn(t){let e;const n=t[5].default,o=p(n,t,t[6],_n);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||66&s)&&m(o,n,t,t[6],s,Nn,_n)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function zn(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[Yn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Rn(t){let e;return{c(){e=w("... Loading...")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function Yn(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Rn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Jn(t){let e,n,o,s,r,c,l;const u=[An,On],d=[];function p(t,e){return t[1]?0:1}return n=p(t),o=d[n]=u[n](t),{c(){e=y("section"),o.c()},m(o,i){g(o,e,i),d[n].m(e,null),r=!0,c||(l=[h(s=qn.call(null,e,t[0])),S(e,"data",t[4])],c=!0)},p(t,[r]){let i=n;n=p(t),n===i?d[n].p(t,r):(G(),tt(d[i],1,1,(()=>{d[i]=null})),K(),o=d[n],o?o.p(t,r):(o=d[n]=u[n](t),o.c()),Q(o,1),o.m(e,null)),s&&a(s.update)&&1&r&&s.update.call(null,t[0])},i(t){r||(Q(o),r=!0)},o(t){tt(o),r=!1},d(t){t&&v(e),d[n].d(),c=!1,i(l)}}}function Un(t,e,o){let{$$slots:s={},$$scope:r}=e;const{Dialog:i,Chip:a}=n;let c,{options:l}=e;return t.$$set=t=>{"options"in t&&o(0,l=t.options),"$$scope"in t&&o(6,r=t.$$scope)},[l,c,i,a,({detail:t})=>{o(1,c=t.data)},s,r]}let Xn=new Map;const Wn=t=>(...e)=>{const n=u(vt),o=n.tenant;"invalid"===n.status&&(Xn=new Map,vt.set({tenant:o,status:""}));const s=[].concat(t.name,e).join("-");let r=Xn.get(s);if(!r)try{r=t(...e),Xn.set(s,r)}catch(t){throw t}return r};var Hn={getSchema:Wn((t=>e.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`})))),getSchemas:Wn((async()=>(await e.get("/api/schema")).data)),getSchemaByClass:Wn((async t=>(await e.get(`/api/schemabyclass/${t}`)).data)),getEvents:Wn((async()=>(await e.get("/api/read/_event")).data)),getTask:async(t,n)=>(await e.get(`/api/task/${t}:${n}?display=form`)).data,getTaskList:async(t,n)=>(await e.get(`/api/task/${t}:${n}?display=list`)).data,getTasksList:t=>e.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:async t=>(await e.post("/api/read/_task",{_id:t})).data[0],getTaskqueue:async t=>(await e.post("/api/taskqueue",{id:t})).data,saveData:async(t,n)=>(await e.post(`/api/${t}`,n)).data.id,deleteTask:async t=>(await e.delete(`/api/_task/${t}`)).data,savePlugins:async(t,n)=>(await e.post("/api/plugin",t,n)).data,savePlugin:async(t,n)=>(await e.post(`/api/plugin/${t}`,n)).data,deletePlugin:async t=>(await e.delete(`/api/plugin/${t}`)).data,getAuthStatus:async t=>(await e.post("/api/auth/status",{email:t})).data,authEnroll:async t=>(await e.post("/api/auth/enroll",t)).data,authLogin:async(t,n)=>(await e.post("/api/auth/login",{username:t,passcode:n})).data,authLogout:async()=>await e.post("/api/auth/logout")};const Zn=window.location.pathname;t("default",{version:"0.2.8",Storage:pt,getLoggedIn:()=>$t,getBreadcrumbs:()=>gt,getCacheValidator:()=>vt,Listener:class extends ut{constructor(t){super(),lt(this,t,jn,Cn,c,{options:0})}},Request:Hn,FormDialog:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-10olhh0-style")||((e=y("style")).id="svelte-10olhh0-style",e.textContent="section.data{position:relative;width:100%}.dialog.form{width:fit-content !important;min-width:25em !important;min-height:10em}",$(document.head,e)),lt(this,t,Un,Jn,c,{options:0})}},Form:class extends ut{constructor(t){super(),lt(this,t,en,tn,c,{options:0,input:15,head:16},[-1,-1])}},FormUpload:class extends ut{constructor(t){super(),lt(this,t,fn,pn,c,{options:0,input:15,head:16},[-1,-1])}},LinkButton:class extends ut{constructor(t){super(),lt(this,t,hn,mn,c,{path:0,disabled:1})}},LinkIcon:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-1jng2dw-style")||((e=y("style")).id="svelte-1jng2dw-style",e.textContent=".red.svelte-1jng2dw{background-color:var(--m-color-red-light)}.blue.svelte-1jng2dw{background-color:var(--m-color-blue-light)}.green.svelte-1jng2dw{background-color:var(--m-color-green-light)}.icon.svelte-1jng2dw{max-height:1.2em}",$(document.head,e)),lt(this,t,gn,$n,c,{title:0,link:3,color:1})}},Breadcrumb:class extends ut{constructor(t){super(),lt(this,t,yn,null,c,{description:0})}},CheckLogin:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-29ryz7-style")||((e=y("style")).id="svelte-29ryz7-style",e.textContent="nav.breadcrumbs{margin:0 !important;padding-bottom:1em}",$(document.head,e)),lt(this,t,bn,vn,c,{})}},checkLogin:()=>{u($t)||window.singleSpaNavigate(`/?p=${Zn}`)}})}}}));
|
|
1
|
+
System.register(["axios","@enablerr-ui/layout"],(function(t){"use strict";var e,n;return{setters:[function(t){e=t.default},function(t){n=t.getAttractions}],execute:function(){function o(){}function s(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(s)}function a(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,...e){if(null==t)return o;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function u(t){let e;return l(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(l(e,n))}function p(t,e,n,o){if(t){const s=f(t,e,n,o);return t[0](s)}}function f(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function m(t,e,n,o,s,i,r){const a=function(t,e,n,o){if(t[2]&&o){const s=t[2](o(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|s[o];return t}return e.dirty|s}return e.dirty}(e,o,s,i);if(a){const s=f(e,n,o,r);t.p(s,a)}}function h(t){return t&&a(t.destroy)?t.destroy:o}function $(t,e){t.appendChild(e)}function g(t,e,n){t.insertBefore(e,n||null)}function v(t){t.parentNode.removeChild(t)}function b(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function y(t){return document.createElement(t)}function x(t){return document.createTextNode(t)}function w(){return x(" ")}function k(){return x("")}function S(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function E(t){return function(e){return e.preventDefault(),t.call(this,e)}}function I(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function T(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:I(t,e,n)}function j(t){return""===t?null:+t}function q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function C(t,e){t.value=null==e?"":e}function N(t,e,n){t.classList[n?"add":"remove"](e)}let _;function O(t){_=t}function L(){if(!_)throw new Error("Function called outside component initialization");return _}function A(){const t=L();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const s=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,s)}))}}}function D(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}const B=[],F=[],P=[],V=[],M=Promise.resolve();let z=!1;function R(t){P.push(t)}function Y(t){V.push(t)}let J=!1;const U=new Set;function X(){if(!J){J=!0;do{for(let t=0;t<B.length;t+=1){const e=B[t];O(e),W(e.$$)}for(O(null),B.length=0;F.length;)F.pop()();for(let t=0;t<P.length;t+=1){const e=P[t];U.has(e)||(U.add(e),e())}P.length=0}while(B.length);for(;V.length;)V.pop()();z=!1,J=!1,U.clear()}}function W(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(R)}}const H=new Set;let Z;function G(){Z={r:0,c:[],p:Z}}function K(){Z.r||r(Z.c),Z=Z.p}function Q(t,e){t&&t.i&&(H.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(H.has(t))return;H.add(t),Z&&Z.c.push((()=>{H.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function et(t,e){const n=e.token={};function o(t,o,s,i){if(e.token!==n)return;e.resolved=i;let r=e.ctx;void 0!==s&&(r=r.slice(),r[s]=i);const a=t&&(e.current=t)(r);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(G(),tt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),K())})):e.block.d(1),a.c(),Q(a,1),a.m(e.mount(),e.anchor),c=!0),e.block=a,e.blocks&&(e.blocks[o]=a),c&&X()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=L();if(t.then((t=>{O(n),o(e.then,1,e.value,t),O(null)}),(t=>{if(O(n),o(e.catch,2,e.error,t),O(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var s}function nt(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}const ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function st(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function it(t){t&&t.c()}function rt(t,e,n,o){const{fragment:i,on_mount:c,on_destroy:l,after_update:u}=t.$$;i&&i.m(e,n),o||R((()=>{const e=c.map(s).filter(a);l?l.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(R)}function at(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ct(t,e){-1===t.$$.dirty[0]&&(B.push(t),z||(z=!0,M.then(X)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(t,e,n,s,a,c,l=[-1]){const u=_;O(t);const d=t.$$={fragment:null,ctx:null,props:c,update:o,not_equal:a,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:i(),dirty:l,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&ct(t,e)),n})):[],d.update(),p=!0,r(d.before_update),d.fragment=!!s&&s(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(v)}else d.fragment&&d.fragment.c();e.intro&&Q(t.$$.fragment),rt(t,e.target,e.anchor,e.customElement),X()}O(u)}class ut{$destroy(){at(this,1),this.$destroy=o}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const dt=window.sessionStorage;dt.clear();const pt={getItem:t=>dt.getItem(t),setItem:(t,e)=>dt.setItem(t,e)},ft=[];function mt(t,e=o){let n;const s=[];function i(e){if(c(t,e)&&(t=e,n)){const e=!ft.length;for(let e=0;e<s.length;e+=1){const n=s[e];n[1](),ft.push(n,t)}if(e){for(let t=0;t<ft.length;t+=2)ft[t][0](ft[t+1]);ft.length=0}}}return{set:i,update:function(e){i(e(t))},subscribe:function(r,a=o){const c=[r,a];return s.push(c),1===s.length&&(n=e(i)||o),r(t),()=>{const t=s.indexOf(c);-1!==t&&s.splice(t,1),0===s.length&&(n(),n=null)}}}}function ht(t,e,n){const s=!Array.isArray(t),i=s?[t]:t,c=e.length<2;return u=t=>{let n=!1;const u=[];let d=0,p=o;const f=()=>{if(d)return;p();const n=e(s?u[0]:u,t);c?t(n):p=a(n)?n:o},m=i.map(((t,e)=>l(t,(t=>{u[e]=t,d&=~(1<<e),n&&f()}),(()=>{d|=1<<e}))));return n=!0,f(),function(){r(m),p()}},{subscribe:mt(n,u).subscribe};var u}const $t=mt(window.localStorage.getItem("lh-enablerr-user")?{user:window.localStorage.getItem("lh-enablerr-user"),gravatar:window.localStorage.getItem("lh-enablerr-gravatar"),tenant:window.localStorage.getItem("lh-enablerr-tenant"),tenants:JSON.parse(window.localStorage.getItem("lh-enablerr-tenants"))}:""),gt=mt([]),vt=mt({tenant:"",status:""});function bt(t){let e,n,o,s,i;const r=t[3].default,a=p(r,t,t[2],null);return{c(){e=y("fieldset"),n=y("legend"),o=x(t[0]),s=w(),a&&a.c(),N(n,"sr-only",!t[1])},m(t,r){g(t,e,r),$(e,n),$(n,o),$(e,s),a&&a.m(e,null),i=!0},p(t,[e]){(!i||1&e)&&q(o,t[0]),2&e&&N(n,"sr-only",!t[1]),a&&a.p&&(!i||4&e)&&m(a,r,t,t[2],e,null,null)},i(t){i||(Q(a,t),i=!0)},o(t){tt(a,t),i=!1},d(t){t&&v(e),a&&a.d(t)}}}function yt(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:i=""}=e,{show:r=!0}=e;return t.$$set=t=>{"title"in t&&n(0,i=t.title),"show"in t&&n(1,r=t.show),"$$scope"in t&&n(2,s=t.$$scope)},[i,r,s,o]}class xt extends ut{constructor(t){super(),lt(this,t,yt,bt,c,{title:0,show:1})}}const wt=t=>({}),kt=t=>({}),St=t=>({}),Et=t=>({});function It(t){let e,n,o,s,i,a,c,l,u,d;const f=t[16].head,h=p(f,t,t[15],Et),$=t[16].tail,b=p($,t,t[15],kt);return{c(){h&&h.c(),e=w(),n=y("input"),s=w(),i=y("input"),c=w(),b&&b.c(),I(n,"type","number"),I(n,"class",o=t[1]+" form-input form-number hidden"),I(n,"id",t[5]),I(n,"name",t[5]),I(n,"placeholder",t[8]),I(n,"aria-label",t[7]),I(n,"title",t[7]),n.required=t[9],n.disabled=t[10],I(n,"pattern",t[11]),I(n,"min",t[2]),I(n,"max",t[12]),I(n,"step",t[3]),I(i,"type","text"),I(i,"id",t[6]),I(i,"name",t[6]),I(i,"class",a=t[1]+" form-input form-number form-shadow"),i.disabled=t[10],I(i,"aria-label",t[7]),I(i,"title",t[7])},m(o,r){h&&h.m(o,r),g(o,e,r),g(o,n,r),C(n,t[0]),g(o,s,r),g(o,i,r),C(i,t[4]),g(o,c,r),b&&b.m(o,r),l=!0,u||(d=[S(n,"input",t[18]),S(n,"blur",t[13]),S(i,"input",t[19]),S(i,"focus",t[17])],u=!0)},p(t,[e]){h&&h.p&&(!l||32768&e)&&m(h,f,t,t[15],e,St,Et),(!l||2&e&&o!==(o=t[1]+" form-input form-number hidden"))&&I(n,"class",o),(!l||4&e)&&I(n,"min",t[2]),(!l||8&e)&&I(n,"step",t[3]),1&e&&j(n.value)!==t[0]&&C(n,t[0]),(!l||2&e&&a!==(a=t[1]+" form-input form-number form-shadow"))&&I(i,"class",a),16&e&&i.value!==t[4]&&C(i,t[4]),b&&b.p&&(!l||32768&e)&&m(b,$,t,t[15],e,wt,kt)},i(t){l||(Q(h,t),Q(b,t),l=!0)},o(t){tt(h,t),tt(b,t),l=!1},d(t){h&&h.d(t),t&&v(e),t&&v(n),t&&v(s),t&&v(i),t&&v(c),b&&b.d(t),u=!1,r(d)}}}function Tt(t,e,n){let{$$slots:o={},$$scope:s}=e,{options:i}=e,{css:r}=e,{value:a}=e;const c=JSON.parse(window.sessionStorage.getItem("Locale")),{name:l,nameShadow:u,title:d,placeholder:p,required:f,disabled:m,pattern:h}=i;let{positive:$,min:g,max:v,decimal:b=0,step:y=1}=i;const x=A();let w;b>0&&(y="any"),$&&!g&&(g=0);const k=((t,e)=>{const n=Intl.NumberFormat?new Intl.NumberFormat(t,{minimumFractionDigits:e}):{format:t=>t};return{format:t=>{try{t=n.format(t||0)}catch{t="(ungültig)"}return t}}})(c.id,b),S=()=>{n(4,w=k.format(a))};return S(),t.$$set=t=>{"options"in t&&n(14,i=t.options),"css"in t&&n(1,r=t.css),"value"in t&&n(0,a=t.value),"$$scope"in t&&n(15,s=t.$$scope)},[a,r,g,y,w,l,u,d,p,f,m,h,v,()=>{S(),x("blur")},i,s,o,function(e){D(t,e)},function(){a=j(this.value),n(0,a)},function(){w=this.value,n(4,w)}]}class jt extends ut{constructor(t){super(),lt(this,t,Tt,It,c,{options:14,css:1,value:0})}}function qt(t){let e;return{c(){e=y("span"),e.textContent="%",I(e,"slot","head"),I(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function Ct(t){let e,n,o;function s(e){t[3](e)}let i={options:t[0],css:t[2],$$slots:{head:[qt]},$$scope:{ctx:t}};return void 0!==t[1]&&(i.value=t[1]),e=new jt({props:i}),F.push((()=>st(e,"value",s))),e.$on("focus",t[4]),e.$on("blur",t[5]),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),4&o&&(s.css=t[2]),64&o&&(s.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,s.value=t[1],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Nt(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;return o.positive=o.positive||!0,o.max=o.max||100,o.decimal=o.decimal||2,t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(1,i=t.value)},[o,i,s,function(t){i=t,n(1,i)},function(e){D(t,e)},function(e){D(t,e)}]}function _t(t){let e,n;return{c(){e=y("span"),n=x(t[3]),I(e,"slot","head"),I(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,o){g(t,e,o),$(e,n)},p(t,e){8&e&&q(n,t[3])},d(t){t&&v(e)}}}function Ot(t){let e,n,o;function s(e){t[4](e)}let i={options:t[1],css:t[2],$$slots:{head:[_t]},$$scope:{ctx:t}};return void 0!==t[0]&&(i.value=t[0]),e=new jt({props:i}),F.push((()=>st(e,"value",s))),e.$on("focus",t[5]),e.$on("blur",t[6]),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,[o]){const s={};2&o&&(s.options=t[1]),4&o&&(s.css=t[2]),136&o&&(s.$$scope={dirty:o,ctx:t}),!n&&1&o&&(n=!0,s.value=t[0],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Lt(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e,{currency:r="CHF"}=e;return t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,i=t.value),"currency"in t&&n(3,r=t.currency)},[i,o,s,r,function(t){i=t,n(0,i)},function(e){D(t,e)},function(e){D(t,e)}]}function At(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","password"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],I(e,"pattern",t[7]),I(e,"autocomplete","off")},m(n,o){g(n,e,o),C(e,t[0]),s||(i=S(e,"input",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function Dt(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,placeholder:c,required:l,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,d,o,function(){i=this.value,n(0,i)}]}Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value;const Bt=t=>((t,...e)=>e.includes(t))(t,void 0,null),Ft=t=>!Bt(t),Pt=(t,...e)=>e.concat(t).find(Ft),Vt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Mt=(t,e=2,n=0,o=t.toString(),s=n.toString())=>s.repeat(e-o.length)+o,zt=(...t)=>{return(e=t[0],(t,...n)=>Vt(Vt("",e.toString),t,...n))(Mt,...t);var e};function Rt(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","date"),I(e,"class",n=t[1]+" form-input form-date"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"aria-label",t[3]),I(e,"title",t[3]),I(e,"pattern",Xt),I(e,"min",t[6]),I(e,"max",t[7]),e.required=t[4],e.disabled=t[5]},m(n,o){g(n,e,o),C(e,t[0]),s||(i=[S(e,"input",t[10]),S(e,"blur",t[9])],s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input form-date")&&I(e,"class",n),1&o&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r(i)}}}const Yt={timeZone:"UTC",year:"numeric",month:"long",day:"numeric",weekday:"short"},Jt={year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",timeZoneName:"short"},Ut=(t,e=!1)=>{const n=e?Jt:Yt,o=Intl.DateTimeFormat?new Intl.DateTimeFormat(t,n):{format:t=>t};return{format:t=>{try{t=t?o.format(new Date(t)):""}catch{t="(ungültig)"}return t}}},Xt="\\d{4}(-|/)\\d{2}(-|/)\\d{2}";function Wt(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,required:c,disabled:l,min:u,max:d}=o;return i=i.substr(0,10),t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,d,o,function(e){D(t,e)},function(){i=this.value,n(0,i)}]}class Ht extends ut{constructor(t){super(),lt(this,t,Wt,Rt,c,{options:8,css:1,value:0})}}const{document:Zt}=ot;function Gt(t,e,n){const o=t.slice();return o[16]=e[n].lit,o[17]=e[n].ref,o[18]=e,o[19]=n,o}function Kt(t){let e,n,o;function s(){t[12].call(e,t[19])}return{c(){e=y("input"),I(e,"class","iw-m iw-n"+t[17].count+" svelte-u6cc6e"),I(e,"id",t[2]+"-"+t[19]),I(e,"type","text"),I(e,"data-step",t[19]),I(e,"size",t[17].count),I(e,"minlength",t[17].count),I(e,"maxlength",t[17].count),I(e,"pattern",t[5][t[19]]||t[17].pattern),e.required=t[3],e.disabled=t[4]},m(i,r){g(i,e,r),C(e,t[1][t[19]]),n||(o=[S(e,"input",s),S(e,"input",t[8]),S(e,"blur",t[11])],n=!0)},p(n,o){t=n,2&o&&e.value!==t[1][t[19]]&&C(e,t[1][t[19]])},d(t){t&&v(e),n=!1,r(o)}}}function Qt(t){let e,n,s=t[16]+"";return{c(){e=y("span"),n=x(s),I(e,"class","iw-m svelte-u6cc6e")},m(t,o){g(t,e,o),$(e,n)},p:o,d(t){t&&v(e)}}}function te(t){let e;let n=function(t,e){return t[16]?Qt:Kt}(t),o=n(t);return{c(){o.c(),e=k()},m(t,n){o.m(t,n),g(t,e,n)},p(t,e){o.p(t,e)},d(t){o.d(t),t&&v(e)}}}function ee(t){let e,n,s,i,r=t[6].obj,a=[];for(let e=0;e<r.length;e+=1)a[e]=te(Gt(t,r,e));return{c(){e=y("div");for(let t=0;t<a.length;t+=1)a[t].c();I(e,"class",n=t[0]+" form-input svelte-u6cc6e"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"tabindex","0")},m(n,o){g(n,e,o);for(let t=0;t<a.length;t+=1)a[t].m(e,null);s||(i=S(e,"focus",t[7]),s=!0)},p(t,[o]){if(382&o){let n;for(r=t[6].obj,n=0;n<r.length;n+=1){const s=Gt(t,r,n);a[n]?a[n].p(s,o):(a[n]=te(s),a[n].c(),a[n].m(e,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=r.length}1&o&&n!==(n=t[0]+" form-input svelte-u6cc6e")&&I(e,"class",n)},i:o,o:o,d(t){t&&v(e),b(a,t),s=!1,i()}}}function ne(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;i=i.toString();const{name:r,title:a,required:c,disabled:l,mask:u,pattern:d=[]}=o,p=(t=>{let e=[],n="",o=!1;if("string"!=typeof t)return e;const s=(t="")=>{n=t},i=t=>s(n.concat(t)),r=(t=!0)=>{o=t},a=t=>(e.push({lit:t}),void r(!1));for(const c of t)o?a(c):"\\"===c?r():"{"===c?s():"}"===c?e.push({ref:{count:parseInt(n),pattern:`\\d{${n}}`}}):" "===c?a(c):c>=0?i(c):a(c);const c=(t,n="",o=!0,s=0)=>t?e.reduce(((e,n)=>e.concat(n.ref&&n.ref.count?t.slice(s,s+=n.ref.count):o&&n.lit||"")),n):n;return{obj:e,getValues:t=>c(t,[],!1),format:t=>c(t)}})(u),f=p.getValues(i);return t.$$set=t=>{"options"in t&&n(10,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(9,i=t.value)},[s,f,r,c,l,d,p,({relatedTarget:t})=>{if(!t||"INPUT"===t.tagName)return!0;const e=`#${r} > input`;return document.querySelectorAll(e)[0].focus()},({target:t})=>{n(9,i=f.reduce(((t,e)=>t.concat(e))));const e=t.dataset.step;if(f[e].length<t.minLength)return!0;const o=`#${r}-${e} ~ input`,s=document.querySelectorAll(o);return s[0]&&s[0].focus&&s[0].focus()},i,o,function(e){D(t,e)},function(t){f[t]=this.value,n(1,f)}]}class oe extends ut{constructor(t){var e;super(),Zt.getElementById("svelte-u6cc6e-style")||((e=y("style")).id="svelte-u6cc6e-style",e.textContent="span.iw-m.svelte-u6cc6e{margin-right:1px;margin-left:1px}.iw-n1.svelte-u6cc6e{width:0.75rem}.iw-n2.svelte-u6cc6e{width:1.25rem}.iw-n3.svelte-u6cc6e{width:2rem}.iw-n4.svelte-u6cc6e{width:2.5rem}.iw-n5.svelte-u6cc6e{width:3.25rem}.iw-n6.svelte-u6cc6e{width:3.75rem}.iw-n7.svelte-u6cc6e{width:4.5rem}.iw-n8.svelte-u6cc6e{width:5rem}.iw-n9.svelte-u6cc6e{width:5.75rem}.iw-n10.svelte-u6cc6e{width:6.25rem}input.svelte-u6cc6e:invalid{background-color:#fff5f5}",$(Zt.head,e)),lt(this,t,ne,ee,c,{options:10,css:0,value:9})}}function se(t){let e,n,o;function s(e){t[3](e)}let i={options:t[0],css:t[1]};return void 0!==t[2]&&(i.value=t[2]),e=new oe({props:i}),F.push((()=>st(e,"value",s))),e.$on("blur",t[4]),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),2&o&&(s.css=t[1]),!n&&4&o&&(n=!0,s.value=t[2],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function ie(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;return s=s.concat(" form-time"),o.mask="{2}:{2}",o.pattern=["(2[0-3]|[0-1][0-9])","","[0-5][0-9]"],t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(2,i=t.value)},[o,s,i,function(t){i=t,n(2,i)},function(e){D(t,e)}]}class re extends ut{constructor(t){super(),lt(this,t,ie,se,c,{options:0,css:1,value:2})}}function ae(t){let e,n,o,s,i,a,c,l,u,d,p,f;function m(e){t[15](e)}let h={options:t[4],css:t[0]};function b(e){t[16](e)}void 0!==t[1]&&(h.value=t[1]),n=new Ht({props:h}),F.push((()=>st(n,"value",m))),n.$on("blur",t[10]);let x={options:t[3],css:t[0]};return void 0!==t[2]&&(x.value=t[2]),i=new re({props:x}),F.push((()=>st(i,"value",b))),i.$on("blur",t[10]),{c(){e=y("div"),it(n.$$.fragment),s=w(),it(i.$$.fragment),c=w(),l=y("input"),I(e,"id",t[6]),I(e,"tabindex","90"),I(e,"class","hidden"),I(l,"type","text"),I(l,"class",u=t[0]+" form-input form-shadow"),I(l,"id",t[7]),I(l,"name",t[7]),l.disabled=t[9],I(l,"aria-label",t[8]),I(l,"title",t[8])},m(o,r){g(o,e,r),rt(n,e,null),$(e,s),rt(i,e,null),g(o,c,r),g(o,l,r),C(l,t[5]),d=!0,p||(f=[S(e,"blur",t[10]),S(e,"focus",t[11]),S(l,"input",t[17]),S(l,"focus",t[14])],p=!0)},p(t,[e]){const s={};16&e&&(s.options=t[4]),1&e&&(s.css=t[0]),!o&&2&e&&(o=!0,s.value=t[1],Y((()=>o=!1))),n.$set(s);const r={};8&e&&(r.options=t[3]),1&e&&(r.css=t[0]),!a&&4&e&&(a=!0,r.value=t[2],Y((()=>a=!1))),i.$set(r),(!d||1&e&&u!==(u=t[0]+" form-input form-shadow"))&&I(l,"class",u),32&e&&l.value!==t[5]&&C(l,t[5])},i(t){d||(Q(n.$$.fragment,t),Q(i.$$.fragment,t),d=!0)},o(t){tt(n.$$.fragment,t),tt(i.$$.fragment,t),d=!1},d(t){t&&v(e),at(n),at(i),t&&v(c),t&&v(l),p=!1,r(f)}}}function ce(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const r=JSON.parse(window.sessionStorage.getItem("Locale"));let{date:a,time:c}=(t=>{if(!t)return{date:"",time:""};const e=new Date(t),n=e.getFullYear().toString(),o=zt(e.getMonth()+1),s=zt(e.getDate()),i=zt(e.getHours()),r=zt(e.getMinutes());return{date:n.concat("-",o,"-",s),time:i.concat(r)}})(i);const{name:l,nameShadow:u,title:d,disabled:p}=o;let f,m=Object.assign({},o),h=Object.assign({},o);h.name=l+"-Date",m.name=l+"-Time";const $=Ut(r.id,!0),g=()=>{try{n(12,(t=c,i=new Date(a.substring(0,10).concat("T",t.substr(0,2),":",t.substr(2))).toISOString()))}catch(t){n(12,i=a||c?"invalid":"")}var t;n(5,f=$.format(i))},v=t=>t.startsWith(h.name),b=A();return g(),t.$$set=t=>{"options"in t&&n(13,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(12,i=t.value)},[s,a,c,m,h,f,l,u,d,p,({relatedTarget:t})=>{if(t){if(t.id.startsWith(m.name))return!0;if(v(t.id))return!0}g(),b("blur")},({relatedTarget:t})=>!t||(!!v(t.id)||void document.getElementById(h.name).focus()),i,o,function(e){D(t,e)},function(t){a=t,n(1,a)},function(t){c=t,n(2,c)},function(){f=this.value,n(5,f)}]}function le(t){let e,n,o,s,i,a,c,l;function u(e){t[10](e)}let d={options:t[1],css:t[2]+" hidden"};return void 0!==t[0]&&(d.value=t[0]),e=new Ht({props:d}),F.push((()=>st(e,"value",u))),e.$on("blur",t[8]),{c(){it(e.$$.fragment),o=w(),s=y("input"),I(s,"type","text"),I(s,"class",i=t[2]+" form-input form-shadow"),I(s,"id",t[4]),I(s,"name",t[4]),I(s,"placeholder",t[6]),s.disabled=t[7],I(s,"aria-label",t[5]),I(s,"title",t[5])},m(n,i){rt(e,n,i),g(n,o,i),g(n,s,i),C(s,t[3]),a=!0,c||(l=[S(s,"input",t[11]),S(s,"focus",t[9])],c=!0)},p(t,[o]){const r={};2&o&&(r.options=t[1]),4&o&&(r.css=t[2]+" hidden"),!n&&1&o&&(n=!0,r.value=t[0],Y((()=>n=!1))),e.$set(r),(!a||4&o&&i!==(i=t[2]+" form-input form-shadow"))&&I(s,"class",i),8&o&&s.value!==t[3]&&C(s,t[3])},i(t){a||(Q(e.$$.fragment,t),a=!0)},o(t){tt(e.$$.fragment,t),a=!1},d(t){at(e,t),t&&v(o),t&&v(s),c=!1,r(l)}}}function ue(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const r=JSON.parse(window.sessionStorage.getItem("Locale")),{nameShadow:a,title:c,placeholder:l,disabled:u}=o;let d;const p=Ut(r.id),f=()=>{n(3,d=p.format(i))},m=A();return f(),t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,i=t.value)},[i,o,s,d,a,c,l,u,()=>{f(),m("blur")},function(e){D(t,e)},function(t){i=t,n(0,i)},function(){d=this.value,n(3,d)}]}function de(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","email"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6]},m(n,o){g(n,e,o),C(e,t[0]),s||(i=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function pe(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,placeholder:c,required:l,disabled:u}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,o,function(){i=this.value,n(0,i)}]}function fe(t){let e,n,s,i;return{c(){e=y("textarea"),I(e,"rows",t[6]),I(e,"class",n=t[1]+" form-textarea block"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[4],e.disabled=t[5]},m(n,o){g(n,e,o),C(e,t[0]),s||(i=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-textarea block")&&I(e,"class",n),1&o&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function me(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,required:c,disabled:l,rows:u=3}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,o,function(){i=this.value,n(0,i)}]}function he(t){let e,n,s,i,a,c,l,u;return{c(){e=y("div"),n=y("input"),s=w(),i=y("div"),a=w(),c=y("div"),I(n,"type","checkbox"),I(n,"id",t[1]),I(n,"name",t[1]),I(n,"aria-label",t[2]),I(n,"title",t[2]),n.disabled=t[3],I(n,"class","svelte-ke6ng1"),I(i,"class","track svelte-ke6ng1"),I(c,"class","thumb svelte-ke6ng1"),I(e,"class","switch svelte-ke6ng1")},m(o,r){g(o,e,r),$(e,n),n.checked=t[0],$(e,s),$(e,i),$(e,a),$(e,c),l||(u=[S(n,"change",t[7]),S(i,"click",t[4]),S(c,"click",t[4])],l=!0)},p(t,[e]){1&e&&(n.checked=t[0])},i:o,o:o,d(t){t&&v(e),l=!1,r(u)}}}function $e(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;s="";const{name:r,title:a,disabled:c}=o;return t.$$set=t=>{"options"in t&&n(6,o=t.options),"css"in t&&n(5,s=t.css),"value"in t&&n(0,i=t.value)},[i,r,a,c,()=>n(0,i=c?i:!i),s,o,function(){i=this.checked,n(0,i)}]}function ge(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","file"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"pattern",t[7]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],e.multiple=!0},m(n,o){g(n,e,o),s||(i=S(e,"change",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n)},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function ve(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,placeholder:c,required:l,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,d,o,function(){i=this.value,n(0,i)}]}function be(t){let e,n,s,i;return{c(){e=y("input"),I(e,"type","text"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],I(e,"pattern",t[7]),I(e,"autocomplete",t[8])},m(n,o){g(n,e,o),C(e,t[0]),s||(i=S(e,"input",t[10]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i()}}}function ye(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;const{name:r,title:a,placeholder:c,required:l,disabled:u,pattern:d,autocomplete:p="on"}=o;return t.$$set=t=>{"options"in t&&n(9,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,i=t.value)},[i,s,r,a,c,l,u,d,p,o,function(){i=this.value,n(0,i)}]}function xe(t){let e,n,s;return{c(){e=y("input"),I(e,"type","hidden"),I(e,"id",t[1]),I(e,"name",t[1]),e.disabled=!0},m(o,i){g(o,e,i),C(e,t[0]),n||(s=S(e,"input",t[4]),n=!0)},p(t,[n]){1&n&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),n=!1,s()}}}function we(t,e,n){let{options:o}=e,{css:s}=e,{value:i}=e;s="";const{name:r}=o;return t.$$set=t=>{"options"in t&&n(3,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,i=t.value)},[i,r,s,o,function(){i=this.value,n(0,i)}]}const{document:ke}=ot;function Se(t){let e;return{c(){e=y("p"),e.textContent=`Unknow input type: ${t[4]}`,I(e,"class","svelte-166hp95")},m(t,n){g(t,e,n)},p:o,i:o,o:o,d(t){t&&v(e)}}}function Ee(t){let e,n,o,s;function i(e){t[9](e)}var r=t[6];function a(t){let e={options:t[0],css:De};return void 0!==t[1]&&(e.value=t[1]),{props:e}}return r&&(e=new r(a(t)),F.push((()=>st(e,"value",i))),e.$on("focus",t[7]),e.$on("blur",t[8])),{c(){e&&it(e.$$.fragment),o=k()},m(t,n){e&&rt(e,t,n),g(t,o,n),s=!0},p(t,s){const c={};if(1&s&&(c.options=t[0]),!n&&2&s&&(n=!0,c.value=t[1],Y((()=>n=!1))),r!==(r=t[6])){if(e){G();const t=e;tt(t.$$.fragment,1,0,(()=>{at(t,1)})),K()}r?(e=new r(a(t)),F.push((()=>st(e,"value",i))),e.$on("focus",t[7]),e.$on("blur",t[8]),it(e.$$.fragment),Q(e.$$.fragment,1),rt(e,o.parentNode,o)):e=null}else r&&e.$set(c)},i(t){s||(e&&Q(e.$$.fragment,t),s=!0)},o(t){e&&tt(e.$$.fragment,t),s=!1},d(t){t&&v(o),e&&at(e,t)}}}function Ie(t){let e,n,s,i,r,a,c,l,u,d,p,f=t[2].title+"";const m=[Ee,Se],h=[];a=function(t,e){return t[6]?0:1}(t),c=h[a]=m[a](t);let b=t[5]&&function(t){let e;return{c(){e=y("p"),e.textContent=`${t[5]}`,I(e,"class","form-hint hidden svelte-166hp95")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=y("fieldset"),n=y("label"),s=x(f),r=w(),c.c(),l=w(),b&&b.c(),I(n,"for",i=t[2].id),I(n,"disabled",t[3])},m(o,i){g(o,e,i),$(e,n),$(n,s),$(e,r),h[a].m(e,null),$(e,l),b&&b.m(e,null),u=!0,d||(p=S(n,"click",t[7]),d=!0)},p(t,[e]){(!u||4&e)&&f!==(f=t[2].title+"")&&q(s,f),(!u||4&e&&i!==(i=t[2].id))&&I(n,"for",i),c.p(t,e),t[5]&&b.p(t,e)},i(t){u||(Q(c),u=!0)},o(t){tt(c),u=!1},d(t){t&&v(e),h[a].d(),b&&b.d(),d=!1,p()}}}const Te={hidden:class extends ut{constructor(t){super(),lt(this,t,we,xe,c,{options:3,css:2,value:0})}},text:class extends ut{constructor(t){super(),lt(this,t,ye,be,c,{options:9,css:1,value:0})}},file:class extends ut{constructor(t){super(),lt(this,t,ve,ge,c,{options:8,css:1,value:0})}},checkbox:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-ke6ng1-style")||((e=y("style")).id="svelte-ke6ng1-style",e.textContent=".switch.svelte-ke6ng1.svelte-ke6ng1{display:block;position:relative;vertical-align:middle;cursor:pointer;background-color:transparent;user-select:none}.track.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:3rem;height:1.5rem;background-color:#a0aec0;border-radius:9999px;box-shadow:inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)}.thumb.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:1.5rem;height:1.5rem;background-color:white;transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);border-radius:9999px;border-width:2px;border-color:#a0aec0}input[type='checkbox'].svelte-ke6ng1.svelte-ke6ng1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}input[type='checkbox'].svelte-ke6ng1:checked~.thumb.svelte-ke6ng1{border-color:#38b2ac;--transform-translate-x:100%;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;--border-opacity:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}input[type='checkbox'].svelte-ke6ng1:checked~.track.svelte-ke6ng1{background-color:#38b2ac;--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transition-property:background-color, border-color, color, fill, stroke}input[type='checkbox'].svelte-ke6ng1:disabled~.track.svelte-ke6ng1{background-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled~.thumb.svelte-ke6ng1{background-color:#f7fafc;border-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.thumb.svelte-ke6ng1{border-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.track.svelte-ke6ng1{background-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:focus+.track.svelte-ke6ng1,input[type='checkbox'].svelte-ke6ng1:active+.track.svelte-ke6ng1{box-shadow:0 0 0 3px rgba(66, 153, 225, 0.5)}",$(document.head,e)),lt(this,t,$e,he,c,{options:6,css:5,value:0})}},masked:oe,textarea:class extends ut{constructor(t){super(),lt(this,t,me,fe,c,{options:7,css:1,value:0})}},email:class extends ut{constructor(t){super(),lt(this,t,pe,de,c,{options:7,css:1,value:0})}},date:class extends ut{constructor(t){super(),lt(this,t,ue,le,c,{options:1,css:2,value:0})}},datetime:class extends ut{constructor(t){super(),lt(this,t,ce,ae,c,{options:13,css:0,value:12})}},number:jt,password:class extends ut{constructor(t){super(),lt(this,t,Dt,At,c,{options:8,css:1,value:0})}},currency:class extends ut{constructor(t){super(),lt(this,t,Lt,Ot,c,{options:1,css:2,value:0,currency:3})}},rate:class extends ut{constructor(t){super(),lt(this,t,Nt,Ct,c,{options:0,css:2,value:1})}}},je={default:"",checkbox:!1,email:"@",number:0,currency:0,rate:0},qe=t=>t+"-show",Ce=t=>t&&document.getElementById(t),Ne=(t,e,n="block")=>{t&&t.style&&(t.style.display=e?n:"none")},_e=(t,e)=>{if(!t)return!0;const n=Ce(t);if(!n)return!0;const o=Ce(qe(t));return!e&&!o||(o&&Ne(o,!e),Ne(n,e),e&&n.focus&&n.focus(),!1)},Oe=t=>_e(t,!0),Le=(t,e=Ce(t))=>e&&e.children&&e.children.length?Array.from(e.children).every((t=>Le(t.id,t))):!e||!e.validity||e.validity.valid,Ae=t=>void 0===je[t]?je.default:je[t],De="form-field";function Be(t,e,n){let{options:o}=e,{value:s}=e;const{label:i={},disabled:r,type:a="text",hint:c=!1}=o;i.id=o.name,o.nameShadow=qe(o.name),o.required=!r&&o.required,o.title=o.title||o.placeholder;const l=(t=>Te[t])(a);return t.$$set=t=>{"options"in t&&n(0,o=t.options),"value"in t&&n(1,s=t.value)},[o,s,i,r,a,c,l,t=>Oe(o.name),t=>{return e=o.name,_e(e,!1);var e},function(t){s=t,n(1,s)}]}class Fe extends ut{constructor(t){var e;super(),ke.getElementById("svelte-166hp95-style")||((e=y("style")).id="svelte-166hp95-style",e.textContent="p.svelte-166hp95,.form-hint.svelte-166hp95{padding-left:0.75rem;color:#38b2ac;font-size:0.875rem;font-style:italic}",$(ke.head,e)),lt(this,t,Be,Ie,c,{options:0,value:1})}}var Pe=Object.prototype.hasOwnProperty;function Ve(t){return null==t}function Me(t){return Ve(t)||Object.keys(t).length<=0}const ze=function t(e,n){var o,s;if(e===n)return!0;if(e&&n&&(o=e.constructor)===n.constructor){if(o===Date)return e.getTime()===n.getTime();if(o===RegExp)return e.toString()===n.toString();if(o===Array){if((s=e.length)===n.length)for(;s--&&t(e[s],n[s]););return-1===s}if(!o||"object"==typeof e){for(o in s=0,e){if(Pe.call(e,o)&&++s&&!Pe.call(n,o))return!1;if(!(o in n)||!t(e[o],n[o]))return!1}return Object.keys(n).length===s}}return e!=e&&n!=n};function Re(t,e,n){if(new Object(t)!==t)return t;Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]);const o=e.slice(0,-1).reduce(((t,n,o)=>new Object(t[n])===t[n]?t[n]:t[n]=Math.trunc(Math.abs(e[o+1]))===+e[o+1]?[]:{}),t);return o[e[e.length-1]]=n,t}const Ye={assignDeep:function t(e,n){if(Array.isArray(e))return e.map((e=>t(e,n)));const o={};for(const s in e)o[s]="object"==typeof e[s]?t(e[s],n):n;return o},cloneDeep:function(t){return JSON.parse(JSON.stringify(t))},deepEqual:ze,getErrorsFromSchema:function t(e,n,o={}){for(const s in n)switch(!0){case"object"===n[s].type&&!Me(n[s].fields):o[s]=t(e[s],n[s].fields,{...o[s]});break;case"array"===n[s].type:{const i=e&&e[s]?e[s]:[];o[s]=i.map((e=>{const i=t(e,n[s].innerType.fields,{...o[s]});return Object.keys(i).length>0?i:""}));break}default:o[s]=""}return o},getValues:function t(e){let n=[];for(const[,o]of Object.entries(e)){const e="object"==typeof o?t(o):[o];n=[...n,...e]}return n},isEmpty:Me,isNullish:Ve,set:Re,subscribeOnce:function(t){return new Promise((e=>{t.subscribe(e)()}))},update:function(t,e,n){t.update((t=>(Re(t,e,n),t)))}};const Je=t=>{let e=t.initialValues||{};const n=t.validationSchema,o=t.validate,s=t.onSubmit,i=()=>Ye.cloneDeep(e),r=()=>n?Ye.getErrorsFromSchema(e,n.fields):Ye.assignDeep(e,""),a=()=>Ye.assignDeep(e,!1),c=mt(i()),l=mt(r()),d=mt(a()),p=mt(!1),f=mt(!1),m=ht(l,(t=>Ye.getValues(t).every((t=>""===t)))),h=ht(c,(t=>{const n=Ye.assignDeep(t,!1);for(let o in t)n[o]=!Ye.deepEqual(t[o],e[o]);return n})),$=ht(h,(t=>Ye.getValues(t).includes(!0)));function g(t,e){return w(t,!0),n?(f.set(!0),n.validateAt(t,u(c)).then((()=>Ye.update(l,t,""))).catch((e=>Ye.update(l,t,e.message))).finally((()=>{f.set(!1)}))):o?(f.set(!0),Promise.resolve().then((()=>o({[t]:e}))).then((e=>Ye.update(l,t,Ye.isNullish(e)?"":e[t]))).finally((()=>{f.set(!1)}))):Promise.resolve()}function v(t,e){return x(t,e),g(t,e)}function b(){c.set(i()),l.set(r()),d.set(a())}function y(t){return Promise.resolve().then((()=>l.set(r()))).then((()=>s(t,c,l))).finally((()=>p.set(!1)))}function x(t,e){Ye.update(c,t,e)}function w(t,e){Ye.update(d,t,e)}return{form:c,errors:l,touched:d,modified:h,isValid:m,isSubmitting:p,isValidating:f,isModified:$,handleChange:function(t){const e=t.target,n=e.name||e.id,o=function(t){return t.getAttribute&&"checkbox"===t.getAttribute("type")}(e)?e.checked:e.value;return v(n,o)},handleSubmit:function(t){return t&&t.preventDefault&&t.preventDefault(),p.set(!0),Ye.subscribeOnce(c).then((t=>"function"==typeof o?(f.set(!0),Promise.resolve().then((()=>o(t))).then((e=>{Ye.isNullish(e)||0===Ye.getValues(e).length?y(t):(l.set(e),p.set(!1))})).finally((()=>f.set(!1)))):n?(f.set(!0),n.validate(t,{abortEarly:!1}).then((()=>y(t))).catch((t=>{if(t&&t.inner){const e=r();t.inner.map((t=>Ye.set(e,t.path,t.message))),l.set(e)}p.set(!1)})).finally((()=>f.set(!1)))):void y(t)))},handleReset:b,updateField:x,updateValidateField:v,updateTouched:w,validateField:function(t){return Ye.subscribeOnce(c).then((e=>g(t,e[t])))},updateInitialValues:function(t){e=t,b()},state:ht([c,l,d,h,m,f,p,$],(([t,e,n,o,s,i,r,a])=>({form:t,errors:e,touched:n,modified:o,isValid:s,isSubmitting:r,isValidating:i,isModified:a})))}};function Ue(t,e,n){const o=t.slice();return o[33]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function Xe(t,e,n){const o=t.slice();return o[0]=e[n],o[36]=e,o[37]=n,o}function We(t){let e,n,o,s=t[7].text+"",i=t[2]?": "+t[2]:"";return{c(){e=y("p"),n=x(s),o=x(i),I(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){g(t,e,s),$(e,n),$(e,o)},p(t,e){4&e[0]&&i!==(i=t[2]?": "+t[2]:"")&&q(o,i)},d(t){t&&v(e)}}}function He(t){let e;return{c(){e=y("p"),e.textContent=`${t[8].text}`,I(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}function Ze(t){let e,n,o;function s(e){t[18](e,t[0])}let i={options:t[0]};return void 0!==t[4][t[0].name]&&(i.value=t[4][t[0].name]),e=new Fe({props:i}),F.push((()=>st(e,"value",s))),{c(){it(e.$$.fragment)},m(t,n){rt(e,t,n),o=!0},p(o,s){t=o;const i={};!n&&80&s[0]&&(n=!0,i.value=t[4][t[0].name],Y((()=>n=!1))),e.$set(i)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function Ge(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=Ze(Xe(t,o,e));const i=t=>tt(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=k()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);g(t,e,o),n=!0},p(t,n){if(80&n[0]){let r;for(o=t[14],r=0;r<o.length;r+=1){const i=Xe(t,o,r);s[r]?(s[r].p(i,n),Q(s[r],1)):(s[r]=Ze(i),s[r].c(),Q(s[r],1),s[r].m(e.parentNode,e))}for(G(),r=o.length;r<s.length;r+=1)i(r);K()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Q(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)tt(s[t]);n=!1},d(t){b(s,t),t&&v(e)}}}function Ke(t){let e,n;return e=new xt({props:{title:t[13],show:t[33],$$slots:{default:[Ge]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};16&n[0]|128&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Qe(t){let e,n,s,i=t[9].value+"",r=t[9].icon&&function(t){let e,n;return{c(){e=y("m-icon"),T(e,"class","mar-r-md"),T(e,"name",n=t[9].icon)},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=y("button"),r&&r.c(),n=w(),s=x(i),I(e,"ord","primary"),I(e,"class","full-width"),I(e,"type","submit")},m(t,o){g(t,e,o),r&&r.m(e,null),$(e,n),$(e,s)},p(t,e){t[9].icon&&r.p(t,e)},d(t){t&&v(e),r&&r.d()}}}function tn(t){let e,n,s,i,r,a,c,l,u,d,p,f;document.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=y("h2"),e.textContent=`${t[13].text}`},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&We(t),x=t[3]&&t[8].text&&He(t),k=t[6],T=[];for(let e=0;e<k.length;e+=1)T[e]=Ke(Ue(t,k,e));const j=t=>tt(T[t],1,1,(()=>{T[t]=null}));let q=t[9]&&Qe(t);return{c(){n=w(),m&&m.c(),s=w(),h&&h.c(),i=w(),x&&x.c(),r=w(),a=y("p"),a.textContent=`${t[10].text}`,c=w(),l=y("form");for(let t=0;t<T.length;t+=1)T[t].c();u=w(),q&&q.c(),I(a,"id","er-invalid"),I(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),l.noValidate=!0},m(e,o){g(e,n,o),m&&m.m(e,o),g(e,s,o),h&&h.m(e,o),g(e,i,o),x&&x.m(e,o),g(e,r,o),g(e,a,o),g(e,c,o),g(e,l,o);for(let t=0;t<T.length;t+=1)T[t].m(l,null);$(l,u),q&&q.m(l,null),d=!0,p||(f=S(l,"submit",E(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(document.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?h?h.p(t,n):(h=We(t),h.c(),h.m(i.parentNode,i)):h&&(h.d(1),h=null),t[3]&&t[8].text?x?x.p(t,n):(x=He(t),x.c(),x.m(r.parentNode,r)):x&&(x.d(1),x=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=Ue(t,k,e);T[e]?(T[e].p(o,n),Q(T[e],1)):(T[e]=Ke(o),T[e].c(),Q(T[e],1),T[e].m(l,u))}for(G(),e=k.length;e<T.length;e+=1)j(e);K()}t[9]&&q.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(T[t]);d=!0}},o(t){T=T.filter(Boolean);for(let t=0;t<T.length;t+=1)tt(T[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(i),x&&x.d(t),t&&v(r),t&&v(a),t&&v(c),t&&v(l),b(T,t),q&&q.d(),p=!1,f()}}}function en(t,n,o){let s,i,{options:r={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:$=[]}=r;a=a||{};const g={};let v=!1,b="",y=!1;const x=u.reduce(((t,e)=>t.concat(e.fields)),[]),w=(t,n)=>{let o={};for(const t in I)(Bt(a[t])||Ft(n[t])&&I[t]!==n[t])&&(o[t]=n[t]);if(((t={})=>!Object.keys(t).length)(o))return!1;const{_id:s,id:i}=n;return e.post("/api/"+t,{...o,_id:s,id:i}).then((t=>t.data))},k=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+i[e]),"?"))(o)))),S=()=>{const t=x.find((t=>!Le(t.name)));return!t||(((t="",e=0,n=document.getElementById(t))=>{n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e))})("er-invalid",3e3),Oe(t.name),!1)},E={},I={};x.map((({name:t,type:e,value:n})=>{const s=Ae(e);let i=Pt(s,g[t],a[t],n);switch(e){case"date":i=i.substr(0,10);case"masked":i=i.toString()}o(17,E[t]=i,E),I[t]=i}));const{form:T,handleSubmit:j,handleReset:q}=Je({initialValues:E,onSubmit:async t=>{if(!p)return;if(!S())return;const{path:e,func:n}=p,s=(t=>x.reduce(((e,n)=>(e[n.name]=t[n.name],e)),{}))(t);let i={};e&&!(i=await w(e,s))||n&&!(i=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(n,s,i))||((t,e)=>{const{action:n,url:s,query:i,reset:r}=t,{status:a=!0,data:c,message:l={}}=e;a?(o(3,y=!0),setTimeout((()=>{o(3,y=!1),k(n,c,s,i)}),m.text?1e3:10)):(r&&q(),o(1,v=!0),o(2,b=l.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,i)}});return d(t,T,(t=>o(4,i=t))),t.$$set=t=>{"options"in t&&o(0,r=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=E.Title||l.text||c)},[r,v,b,y,i,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},T,j,l,x,a,c,E,function(e,n){t.$$.not_equal(i[n.name],e)&&(i[n.name]=e,T.set(i))}]}const{document:nn}=ot;function on(t,e,n){const o=t.slice();return o[32]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function sn(t,e,n){const o=t.slice();return o[0]=e[n],o[35]=e,o[36]=n,o}function rn(t){let e,n,o,s=t[7].text+"",i=t[2]?": "+t[2]:"";return{c(){e=y("p"),n=x(s),o=x(i),I(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){g(t,e,s),$(e,n),$(e,o)},p(t,e){4&e[0]&&i!==(i=t[2]?": "+t[2]:"")&&q(o,i)},d(t){t&&v(e)}}}function an(t){let e;return{c(){e=y("p"),e.textContent=`${t[8].text}`,I(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}function cn(t){let e,n,o,s;function i(e){t[18](e,t[0])}let r={options:t[0]};return void 0!==t[4][t[0].name]&&(r.value=t[4][t[0].name]),e=new Fe({props:r}),F.push((()=>st(e,"value",i))),{c(){it(e.$$.fragment),o=w()},m(t,n){rt(e,t,n),g(t,o,n),s=!0},p(o,s){t=o;const i={};!n&&80&s[0]&&(n=!0,i.value=t[4][t[0].name],Y((()=>n=!1))),e.$set(i)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){at(e,t),t&&v(o)}}}function ln(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=cn(sn(t,o,e));const i=t=>tt(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=k()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);g(t,e,o),n=!0},p(t,n){if(80&n[0]){let r;for(o=t[14],r=0;r<o.length;r+=1){const i=sn(t,o,r);s[r]?(s[r].p(i,n),Q(s[r],1)):(s[r]=cn(i),s[r].c(),Q(s[r],1),s[r].m(e.parentNode,e))}for(G(),r=o.length;r<s.length;r+=1)i(r);K()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Q(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)tt(s[t]);n=!1},d(t){b(s,t),t&&v(e)}}}function un(t){let e,n;return e=new xt({props:{title:t[13],show:t[32],$$slots:{default:[ln]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};16&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function dn(t){let e,n,s,i=t[9].value+"",r=t[9].icon&&function(t){let e,n;return{c(){e=y("m-icon"),T(e,"class","mar-r-md"),T(e,"name",n=t[9].icon)},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=y("button"),r&&r.c(),n=w(),s=x(i),I(e,"ord","primary"),I(e,"class","full-width"),I(e,"type","submit")},m(t,o){g(t,e,o),r&&r.m(e,null),$(e,n),$(e,s)},p(t,e){t[9].icon&&r.p(t,e)},d(t){t&&v(e),r&&r.d()}}}function pn(t){let e,n,s,i,r,a,c,l,u,d,p,f;nn.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=y("h2"),e.textContent=`${t[13].text}`,I(e,"class","mt-6 text-center text-2xl leading-9 font-extrabold text-gray-900")},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&rn(t),x=t[3]&&t[8].text&&an(t),k=t[6],T=[];for(let e=0;e<k.length;e+=1)T[e]=un(on(t,k,e));const j=t=>tt(T[t],1,1,(()=>{T[t]=null}));let q=t[9]&&dn(t);return{c(){n=w(),m&&m.c(),s=w(),h&&h.c(),i=w(),x&&x.c(),r=w(),a=y("p"),a.textContent=`${t[10].text}`,c=w(),l=y("form");for(let t=0;t<T.length;t+=1)T[t].c();u=w(),q&&q.c(),I(a,"id","er-invalid"),I(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),I(l,"class","mt-4"),l.noValidate=!0,I(l,"enctype","multipart/form-data")},m(e,o){g(e,n,o),m&&m.m(e,o),g(e,s,o),h&&h.m(e,o),g(e,i,o),x&&x.m(e,o),g(e,r,o),g(e,a,o),g(e,c,o),g(e,l,o);for(let t=0;t<T.length;t+=1)T[t].m(l,null);$(l,u),q&&q.m(l,null),d=!0,p||(f=S(l,"submit",E(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(nn.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?h?h.p(t,n):(h=rn(t),h.c(),h.m(i.parentNode,i)):h&&(h.d(1),h=null),t[3]&&t[8].text?x?x.p(t,n):(x=an(t),x.c(),x.m(r.parentNode,r)):x&&(x.d(1),x=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=on(t,k,e);T[e]?(T[e].p(o,n),Q(T[e],1)):(T[e]=un(o),T[e].c(),Q(T[e],1),T[e].m(l,u))}for(G(),e=k.length;e<T.length;e+=1)j(e);K()}t[9]&&q.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(T[t]);d=!0}},o(t){T=T.filter(Boolean);for(let t=0;t<T.length;t+=1)tt(T[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(i),x&&x.d(t),t&&v(r),t&&v(a),t&&v(c),t&&v(l),b(T,t),q&&q.d(),p=!1,f()}}}function fn(t,n,o){let s,i,{options:r={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:$=[]}=r;a=a||{};const g={};let v=!1,b="",y=!1;const x=u.reduce(((t,e)=>t.concat(e.fields)),[]),w=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+i[e]),"?"))(o)))),k={},S={};x.map((({name:t,type:e,value:n})=>{const s=Ae(e);let i=Pt(s,g[t],a[t],n);o(17,k[t]=i,k),S[t]=i}));const{form:E,handleSubmit:I,handleReset:T}=Je({initialValues:k,onSubmit:async t=>{if(!p)return;const{path:n,func:s}=p,i=(()=>{const t=new FormData,e=document.querySelector("#plugin").files;for(let n=0;n<e.length;n++)t.append(`upload_${n}`,e[n]);return t})();let r={};n&&!(r=await((t,n)=>e.post("/api/"+t,n,{headers:{"Content-Type":"multipart/form-data"}}).then((t=>t.data)))(n,i))||s&&!(r=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(s,i,r))||((t,e)=>{const{action:n,url:s,query:i,reset:r}=t,{status:a=!0,data:c,message:l={}}=e;a?(o(3,y=!0),setTimeout((()=>{o(3,y=!1),w(n,c,s,i)}),m.text?1e3:10)):(r&&T(),o(1,v=!0),o(2,b=l.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,r)}});return d(t,E,(t=>o(4,i=t))),t.$$set=t=>{"options"in t&&o(0,r=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=k.Title||l.text||c)},[r,v,b,y,i,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},E,I,l,x,a,c,k,function(e,n){t.$$.not_equal(i[n.name],e)&&(i[n.name]=e,E.set(i))}]}function mn(t){let e,n,o,s;const i=t[3].default,r=p(i,t,t[2],null);return{c(){e=y("button"),r&&r.c(),I(e,"class","link-button txt-sm mar-r-sm"),e.disabled=t[1]},m(i,a){g(i,e,a),r&&r.m(e,null),n=!0,o||(s=S(e,"click",t[4]),o=!0)},p(t,[o]){r&&r.p&&(!n||4&o)&&m(r,i,t,t[2],o,null,null),(!n||2&o)&&(e.disabled=t[1])},i(t){n||(Q(r,t),n=!0)},o(t){tt(r,t),n=!1},d(t){t&&v(e),r&&r.d(t),o=!1,s()}}}function hn(t,e,n){let{$$slots:o={},$$scope:s}=e,{path:i}=e,{disabled:r}=e;return t.$$set=t=>{"path"in t&&n(0,i=t.path),"disabled"in t&&n(1,r=t.disabled),"$$scope"in t&&n(2,s=t.$$scope)},[i,r,s,o,()=>window.singleSpaNavigate(i)]}function $n(t){let e,n,o,s,i;const r=t[5].default,a=p(r,t,t[4],null);return{c(){e=y("span"),a&&a.c(),I(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),I(e,"title",t[0])},m(n,r){g(n,e,r),a&&a.m(e,null),o=!0,s||(i=S(e,"click",t[2]),s=!0)},p(t,[s]){a&&a.p&&(!o||16&s)&&m(a,r,t,t[4],s,null,null),(!o||2&s&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&I(e,"class",n),(!o||1&s)&&I(e,"title",t[0])},i(t){o||(Q(a,t),o=!0)},o(t){tt(a,t),o=!1},d(t){t&&v(e),a&&a.d(t),s=!1,i()}}}function gn(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:i}=e,{link:r="/"}=e,{color:a}=e;return t.$$set=t=>{"title"in t&&n(0,i=t.title),"link"in t&&n(3,r=t.link),"color"in t&&n(1,a=t.color),"$$scope"in t&&n(4,s=t.$$scope)},[i,a,()=>window.singleSpaNavigate(r),r,s,o]}function vn(t){let e,n,o=t[0](),s=o&&function(t){let e;const n=t[2].default,o=p(n,t,t[1],null);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||2&s)&&m(o,n,t,t[1],s,null,null)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}(t);return{c(){s&&s.c(),e=k()},m(t,o){s&&s.m(t,o),g(t,e,o),n=!0},p(t,[e]){o&&s.p(t,e)},i(t){n||(Q(s),n=!0)},o(t){tt(s),n=!1},d(t){s&&s.d(t),t&&v(e)}}}function bn(t,e,n){let{$$slots:o={},$$scope:s}=e;const i=window.location.pathname;return t.$$set=t=>{"$$scope"in t&&n(1,s=t.$$scope)},[()=>!!u($t)||window.singleSpaNavigate(`/?p=${i}`),s,o]}function yn(t,e,n){let o;d(t,gt,(t=>n(1,o=t)));let{description:s}=e;return t.$$set=t=>{"description"in t&&n(0,s=t.description)},t.$$.update=()=>{if(3&t.$$.dirty&&s){const t=s;s.length>30&&n(0,s=s.substring(0,30)+"...");const e=window.location.pathname,i=o;i.find((t=>t.href===e))||gt.set(i.slice(Math.max(i.length-6+1,0)).concat({href:e,text:s,desc:t}))}},[s,o]}const xn={event:"single-spa:routing-event",listen:function(t,e){window[`${t}EventListener`](this.event,e)},start:function(t){this.listen("add",t)},stop:function(t){this.listen("remove",t)}};function wn(t,{modulePath:e,update:n}){if(!e)return console.error("modulePath missing in dataListener");if("function"!=typeof n)return console.error("update function missing in dataListener");const o=({currentTarget:o})=>{const[,s,...i]=o.location.pathname.split("/");e===s&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return xn.start(o),{destroy:()=>xn.stop(o)}}const kn=t=>({prop:2&t}),Sn=t=>({prop:t[5]});function En(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!1,pending:jn,then:Tn,catch:In,value:5,blocks:[,,,]};return et(n=t[1],s),{c(){e=k(),s.block.c()},m(t,n){g(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,2&o&&n!==(n=t[1])&&et(n,s)||nt(s,t,o)},i(t){o||(Q(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){tt(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function In(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function Tn(t){let e;const n=t[3].default,o=p(n,t,t[2],Sn);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||6&s)&&m(o,n,t,t[2],s,kn,Sn)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function jn(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function qn(t){let e,n,o,s,i,c=t[1]&&En(t);return{c(){e=y("div"),c&&c.c(),I(e,"class","data")},m(r,a){g(r,e,a),c&&c.m(e,null),o=!0,s||(i=[h(n=wn.call(null,e,t[0])),S(e,"data",t[4])],s=!0)},p(t,[o]){t[1]?c?(c.p(t,o),2&o&&Q(c,1)):(c=En(t),c.c(),Q(c,1),c.m(e,null)):c&&(G(),tt(c,1,1,(()=>{c=null})),K()),n&&a(n.update)&&1&o&&n.update.call(null,t[0])},i(t){o||(Q(c),o=!0)},o(t){tt(c),o=!1},d(t){t&&v(e),c&&c.d(),s=!1,r(i)}}}function Cn(t,e,n){let o,{$$slots:s={},$$scope:i}=e,{options:r}=e;return t.$$set=t=>{"options"in t&&n(0,r=t.options),"$$scope"in t&&n(2,i=t.$$scope)},[r,o,i,s,({detail:t})=>n(1,o=t.data)]}const Nn={event:"single-spa:routing-event",listen:function(t,e){window[`${t}EventListener`](this.event,e)},start:function(t){this.listen("add",t)},stop:function(t){this.listen("remove",t)}};function _n(t,{modulePath:e,update:n}){if(!e)return console.error("modulePath missing in dataListener");if("function"!=typeof n)return console.error("update function missing in dataListener");const o=({currentTarget:o})=>{const[,s,...i]=o.location.pathname.split("/");e===s&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Nn.start(o),{destroy:()=>Nn.stop(o)}}const On=t=>({prop:2&t}),Ln=t=>({prop:t[7]});function An(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[Fn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Dn(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!0,pending:Yn,then:zn,catch:Pn,value:7,error:8,blocks:[,,,]};return et(n=t[1],s),{c(){e=k(),s.block.c()},m(t,n){g(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,2&o&&n!==(n=t[1])&&et(n,s)||nt(s,t,o)},i(t){o||(Q(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){tt(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function Bn(t){let e;return{c(){e=x("... Initializing ...")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function Fn(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Bn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Pn(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Oops!",$$slots:{default:[Mn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Vn(t){let e,n,o,s=t[8]+"";return{c(){e=x("... "),n=x(s),o=x(" ...")},m(t,s){g(t,e,s),g(t,n,s),g(t,o,s)},p(t,e){2&e&&s!==(s=t[8]+"")&&q(n,s)},d(t){t&&v(e),t&&v(n),t&&v(o)}}}function Mn(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Vn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function zn(t){let e,n;return e=new t[2]({props:{class:"form",title:t[7].title,$$slots:{default:[Rn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.title=t[7].title),66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Rn(t){let e;const n=t[4].default,o=p(n,t,t[6],Ln);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||66&s)&&m(o,n,t,t[6],s,On,Ln)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function Yn(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[Un]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Jn(t){let e;return{c(){e=x("... Loading...")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function Un(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Jn]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,o){rt(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Xn(t){let e,n,o,s,i,c,l;const u=[Dn,An],d=[];function p(t,e){return t[1]?0:1}return n=p(t),o=d[n]=u[n](t),{c(){e=y("section"),o.c()},m(o,r){g(o,e,r),d[n].m(e,null),i=!0,c||(l=[h(s=_n.call(null,e,t[0])),S(e,"data",t[5])],c=!0)},p(t,[i]){let r=n;n=p(t),n===r?d[n].p(t,i):(G(),tt(d[r],1,1,(()=>{d[r]=null})),K(),o=d[n],o?o.p(t,i):(o=d[n]=u[n](t),o.c()),Q(o,1),o.m(e,null)),s&&a(s.update)&&1&i&&s.update.call(null,t[0])},i(t){i||(Q(o),i=!0)},o(t){tt(o),i=!1},d(t){t&&v(e),d[n].d(),c=!1,r(l)}}}function Wn(t,e,o){let{$$slots:s={},$$scope:i}=e;const{Dialog:r,Chip:a}=n;let c,{options:l}=e;return t.$$set=t=>{"options"in t&&o(0,l=t.options),"$$scope"in t&&o(6,i=t.$$scope)},[l,c,r,a,s,({detail:t})=>o(1,c=t.data),i]}let Hn=new Map;const Zn=t=>(...e)=>{const n=u(vt),o=n.tenant;"invalid"===n.status&&(Hn=new Map,vt.set({tenant:o,status:""}));const s=[].concat(t.name,e).join("-");let i=Hn.get(s);if(!i)try{i=t(...e),Hn.set(s,i)}catch(t){throw t}return i};var Gn={getSchema:Zn((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`})))),getSchemas:Zn((async()=>(await axios.get("/api/schema")).data)),getSchemaByClass:Zn((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data)),getEvents:Zn((async()=>(await axios.get("/api/read/_event")).data)),getTask:async(t,e)=>(await axios.get(`/api/task/${t}:${e}?display=form`)).data,getTaskList:async(t,e)=>(await axios.get(`/api/task/${t}:${e}?display=list`)).data,getTasksList:t=>axios.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:async t=>(await axios.post("/api/read/_task",{_id:t})).data[0],getTaskqueue:async t=>(await axios.post("/api/taskqueue",{id:t})).data,saveData:async(t,e)=>(await axios.post(`/api/${t}`,e)).data.id,deleteTask:async t=>(await axios.delete(`/api/_task/${t}`)).data,savePlugins:async(t,e)=>(await axios.post("/api/plugin",t,e)).data,savePlugin:async(t,e)=>(await axios.post(`/api/plugin/${t}`,e)).data,deletePlugin:async t=>(await axios.delete(`/api/plugin/${t}`)).data,getAuthStatus:async t=>(await axios.post("/api/auth/status",{email:t})).data,authEnroll:async t=>(await axios.post("/api/auth/enroll",t)).data,authLogin:async(t,e)=>(await axios.post("/api/auth/login",{username:t,passcode:e})).data,authLogout:async()=>await axios.post("/api/auth/logout")};const Kn=window.location.pathname;t("default",{version:"0.2.9",Storage:pt,getLoggedIn:()=>$t,getBreadcrumbs:()=>gt,getCacheValidator:()=>vt,Listener:class extends ut{constructor(t){super(),lt(this,t,Cn,qn,c,{options:0})}},Request:Gn,FormDialog:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-1ifpj2m-style")||((e=y("style")).id="svelte-1ifpj2m-style",e.textContent="section.data{position:relative;width:100%}.dialog.form{width:fit-content !important;min-width:32em !important;min-height:10em !important}@media screen and (max-width: 600px){.dialog.form{min-width:25em !important}}",$(document.head,e)),lt(this,t,Wn,Xn,c,{options:0})}},Form:class extends ut{constructor(t){super(),lt(this,t,en,tn,c,{options:0,input:15,head:16},[-1,-1])}},FormUpload:class extends ut{constructor(t){super(),lt(this,t,fn,pn,c,{options:0,input:15,head:16},[-1,-1])}},LinkButton:class extends ut{constructor(t){super(),lt(this,t,hn,mn,c,{path:0,disabled:1})}},LinkIcon:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-1jng2dw-style")||((e=y("style")).id="svelte-1jng2dw-style",e.textContent=".red.svelte-1jng2dw{background-color:var(--m-color-red-light)}.blue.svelte-1jng2dw{background-color:var(--m-color-blue-light)}.green.svelte-1jng2dw{background-color:var(--m-color-green-light)}.icon.svelte-1jng2dw{max-height:1.2em}",$(document.head,e)),lt(this,t,gn,$n,c,{title:0,link:3,color:1})}},Breadcrumb:class extends ut{constructor(t){super(),lt(this,t,yn,null,c,{description:0})}},CheckLogin:class extends ut{constructor(t){super(),lt(this,t,bn,vn,c,{})}},checkLogin:()=>{u($t)||window.singleSpaNavigate(`/?p=${Kn}`)}})}}}));
|