@enablerr-ui/form 0.2.21 → 0.2.22
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/form","@enablerr-ui/layout"],(function(t){"use strict";var e,n,s;return{setters:[function(t){e=t.default},function(t){n=t.default},function(t){s=t.getAttractions}],execute:function(){function o(){}function r(t){return t()}function i(){return Object.create(null)}function a(t){t.forEach(r)}function c(t){return"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function u(t,...e){if(null==t)return o;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function d(t){let e;return u(t,(t=>e=t))(),e}function p(t,e,n){t.$$.on_destroy.push(u(e,n))}function f(t,e,n,s){if(t){const o=m(t,e,n,s);return t[0](o)}}function m(t,e,n,s){return t[1]&&s?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](s(e))):n.ctx}function $(t,e,n,s,o,r,i){const a=function(t,e,n,s){if(t[2]&&s){const o=t[2](s(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let s=0;s<n;s+=1)t[s]=e.dirty[s]|o[s];return t}return e.dirty|o}return e.dirty}(e,s,o,r);if(a){const o=m(e,n,s,i);t.p(o,a)}}function h(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 w(t){return document.createElement(t)}function y(t){return document.createTextNode(t)}function x(){return y(" ")}function k(){return y("")}function S(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function E(t){return function(e){return e.preventDefault(),t.call(this,e)}}function T(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function N(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:T(t,e,n)}function I(t){return""===t?null:+t}function C(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function j(t,e){t.value=null==e?"":e}function q(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 M(){const t=L();return(e,n)=>{const s=t.$$.callbacks[e];if(s){const o=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);s.slice().forEach((e=>{e.call(t,o)}))}}}function D(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}const A=[],B=[],F=[],P=[],V=Promise.resolve();let z=!1;function Y(t){F.push(t)}function R(t){P.push(t)}let J=!1;const U=new Set;function X(){if(!J){J=!0;do{for(let t=0;t<A.length;t+=1){const e=A[t];O(e),W(e.$$)}for(O(null),A.length=0;B.length;)B.pop()();for(let t=0;t<F.length;t+=1){const e=F[t];U.has(e)||(U.add(e),e())}F.length=0}while(A.length);for(;P.length;)P.pop()();z=!1,J=!1,U.clear()}}function W(t){if(null!==t.fragment){t.update(),a(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Y)}}const H=new Set;let Z;function G(){Z={r:0,c:[],p:Z}}function K(){Z.r||a(Z.c),Z=Z.p}function Q(t,e){t&&t.i&&(H.delete(t),t.i(e))}function tt(t,e,n,s){if(t&&t.o){if(H.has(t))return;H.add(t),Z&&Z.c.push((()=>{H.delete(t),s&&(n&&t.d(1),s())})),t.o(e)}}function et(t,e){const n=e.token={};function s(t,s,o,r){if(e.token!==n)return;e.resolved=r;let i=e.ctx;void 0!==o&&(i=i.slice(),i[o]=r);const a=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==s&&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[s]=a),c&&X()}if((o=t)&&"object"==typeof o&&"function"==typeof o.then){const n=L();if(t.then((t=>{O(n),s(e.then,1,e.value,t),O(null)}),(t=>{if(O(n),s(e.catch,2,e.error,t),O(null),!e.hasCatch)throw t})),e.current!==e.pending)return s(e.pending,0),!0}else{if(e.current!==e.then)return s(e.then,1,e.value,t),!0;e.resolved=t}var o}const nt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function st(t,e,n){const s=t.$$.props[e];void 0!==s&&(t.$$.bound[s]=n,n(t.$$.ctx[s]))}function ot(t){t&&t.c()}function rt(t,e,n,s){const{fragment:o,on_mount:i,on_destroy:l,after_update:u}=t.$$;o&&o.m(e,n),s||Y((()=>{const e=i.map(r).filter(c);l?l.push(...e):a(e),t.$$.on_mount=[]})),u.forEach(Y)}function it(t,e){const n=t.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function at(t,e){-1===t.$$.dirty[0]&&(A.push(t),z||(z=!0,V.then(X)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ct(t,e,n,s,r,c,l=[-1]){const u=_;O(t);const d=t.$$={fragment:null,ctx:null,props:c,update:o,not_equal:r,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,...s)=>{const o=s.length?s[0]:n;return d.ctx&&r(d.ctx[e],d.ctx[e]=o)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](o),p&&at(t,e)),n})):[],d.update(),p=!0,a(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 lt{$destroy(){it(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 ut=window.sessionStorage;ut.clear();const dt={getItem:t=>ut.getItem(t),setItem:(t,e)=>ut.setItem(t,e)},pt=[];function ft(t,e=o){let n;const s=[];function r(e){if(l(t,e)&&(t=e,n)){const e=!pt.length;for(let e=0;e<s.length;e+=1){const n=s[e];n[1](),pt.push(n,t)}if(e){for(let t=0;t<pt.length;t+=2)pt[t][0](pt[t+1]);pt.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 mt(t,e,n){const s=!Array.isArray(t),r=s?[t]:t,i=e.length<2;return l=t=>{let n=!1;const l=[];let d=0,p=o;const f=()=>{if(d)return;p();const n=e(s?l[0]:l,t);i?t(n):p=c(n)?n:o},m=r.map(((t,e)=>u(t,(t=>{l[e]=t,d&=~(1<<e),n&&f()}),(()=>{d|=1<<e}))));return n=!0,f(),function(){a(m),p()}},{subscribe:ft(n,l).subscribe};var l}const $t=ft(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"))}:""),ht=ft([]),gt=ft({tenant:"",status:""}),vt=()=>{$t.set(""),window.localStorage.setItem("lh-enablerr-user",""),window.localStorage.setItem("lh-enablerr-gravatar",""),window.localStorage.setItem("lh-enablerr-tenant",""),window.localStorage.setItem("lh-enablerr-tenants",""),window.location.href="/"};function bt(t){let e,n,s,o,r;const i=t[3].default,a=f(i,t,t[2],null);return{c(){e=w("fieldset"),n=w("legend"),s=y(t[0]),o=x(),a&&a.c(),q(n,"sr-only",!t[1])},m(t,i){g(t,e,i),h(e,n),h(n,s),h(e,o),a&&a.m(e,null),r=!0},p(t,[e]){(!r||1&e)&&C(s,t[0]),2&e&&q(n,"sr-only",!t[1]),a&&a.p&&(!r||4&e)&&$(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 wt(t,e,n){let{$$slots:s={},$$scope:o}=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,o=t.$$scope)},[r,i,o,s]}class yt extends lt{constructor(t){super(),ct(this,t,wt,bt,l,{title:0,show:1})}}const xt=t=>({}),kt=t=>({}),St=t=>({}),Et=t=>({});function Tt(t){let e,n,s,o,r,i,c,l,u,d;const p=t[16].head,m=f(p,t,t[15],Et),h=t[16].tail,b=f(h,t,t[15],kt);return{c(){m&&m.c(),e=x(),n=w("input"),o=x(),r=w("input"),c=x(),b&&b.c(),T(n,"type","number"),T(n,"class",s=t[1]+" form-input form-number hidden"),T(n,"id",t[5]),T(n,"name",t[5]),T(n,"placeholder",t[8]),T(n,"aria-label",t[7]),T(n,"title",t[7]),n.required=t[9],n.disabled=t[10],T(n,"pattern",t[11]),T(n,"min",t[2]),T(n,"max",t[12]),T(n,"step",t[3]),T(r,"type","text"),T(r,"id",t[6]),T(r,"name",t[6]),T(r,"class",i=t[1]+" form-input form-number form-shadow"),r.disabled=t[10],T(r,"aria-label",t[7]),T(r,"title",t[7])},m(s,i){m&&m.m(s,i),g(s,e,i),g(s,n,i),j(n,t[0]),g(s,o,i),g(s,r,i),j(r,t[4]),g(s,c,i),b&&b.m(s,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]){m&&m.p&&(!l||32768&e)&&$(m,p,t,t[15],e,St,Et),(!l||2&e&&s!==(s=t[1]+" form-input form-number hidden"))&&T(n,"class",s),(!l||4&e)&&T(n,"min",t[2]),(!l||8&e)&&T(n,"step",t[3]),1&e&&I(n.value)!==t[0]&&j(n,t[0]),(!l||2&e&&i!==(i=t[1]+" form-input form-number form-shadow"))&&T(r,"class",i),16&e&&r.value!==t[4]&&j(r,t[4]),b&&b.p&&(!l||32768&e)&&$(b,h,t,t[15],e,xt,kt)},i(t){l||(Q(m,t),Q(b,t),l=!0)},o(t){tt(m,t),tt(b,t),l=!1},d(t){m&&m.d(t),t&&v(e),t&&v(n),t&&v(o),t&&v(r),t&&v(c),b&&b.d(t),u=!1,a(d)}}}function Nt(t,e,n){let{$$slots:s={},$$scope:o}=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:$}=r;let{positive:h,min:g,max:v,decimal:b=0,step:w=1}=r;const y=M();let x;b>0&&(w="any"),h&&!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,o=t.$$scope)},[a,i,g,w,x,l,u,d,p,f,m,$,v,()=>{S(),y("blur")},r,o,s,function(e){D(t,e)},function(){a=I(this.value),n(0,a)},function(){x=this.value,n(4,x)}]}class It extends lt{constructor(t){super(),ct(this,t,Nt,Tt,l,{options:14,css:1,value:0})}}function Ct(t){let e;return{c(){e=w("span"),e.textContent="%",T(e,"slot","head"),T(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 jt(t){let e,n,s;function o(e){t[3](e)}let r={options:t[0],css:t[2],$$slots:{head:[Ct]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.value=t[1]),e=new It({props:r}),B.push((()=>st(e,"value",o))),e.$on("focus",t[4]),e.$on("blur",t[5]),{c(){ot(e.$$.fragment)},m(t,n){rt(e,t,n),s=!0},p(t,[s]){const o={};1&s&&(o.options=t[0]),4&s&&(o.css=t[2]),64&s&&(o.$$scope={dirty:s,ctx:t}),!n&&2&s&&(n=!0,o.value=t[1],R((()=>n=!1))),e.$set(o)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){it(e,t)}}}function qt(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;return s.positive=s.positive||!0,s.max=s.max||100,s.decimal=s.decimal||2,t.$$set=t=>{"options"in t&&n(0,s=t.options),"css"in t&&n(2,o=t.css),"value"in t&&n(1,r=t.value)},[s,r,o,function(t){r=t,n(1,r)},function(e){D(t,e)},function(e){D(t,e)}]}function _t(t){let e,n;return{c(){e=w("span"),n=y(t[3]),T(e,"slot","head"),T(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,s){g(t,e,s),h(e,n)},p(t,e){8&e&&C(n,t[3])},d(t){t&&v(e)}}}function Ot(t){let e,n,s;function o(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 It({props:r}),B.push((()=>st(e,"value",o))),e.$on("focus",t[5]),e.$on("blur",t[6]),{c(){ot(e.$$.fragment)},m(t,n){rt(e,t,n),s=!0},p(t,[s]){const o={};2&s&&(o.options=t[1]),4&s&&(o.css=t[2]),136&s&&(o.$$scope={dirty:s,ctx:t}),!n&&1&s&&(n=!0,o.value=t[0],R((()=>n=!1))),e.$set(o)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){it(e,t)}}}function Lt(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e,{currency:i="CHF"}=e;return t.$$set=t=>{"options"in t&&n(1,s=t.options),"css"in t&&n(2,o=t.css),"value"in t&&n(0,r=t.value),"currency"in t&&n(3,i=t.currency)},[r,s,o,i,function(t){r=t,n(0,r)},function(e){D(t,e)},function(e){D(t,e)}]}function Mt(t){let e,n,s,r;return{c(){e=w("input"),T(e,"type","password"),T(e,"class",n=t[1]+" form-input"),T(e,"id",t[2]),T(e,"name",t[2]),T(e,"placeholder",t[4]),T(e,"aria-label",t[3]),T(e,"title",t[3]),e.required=t[5],e.disabled=t[6],T(e,"pattern",t[7]),T(e,"autocomplete","off")},m(n,o){g(n,e,o),j(e,t[0]),s||(r=S(e,"input",t[9]),s=!0)},p(t,[s]){2&s&&n!==(n=t[1]+" form-input")&&T(e,"class",n),1&s&&e.value!==t[0]&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Dt(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u,pattern:d}=s;return t.$$set=t=>{"options"in t&&n(8,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,c,l,u,d,s,function(){r=this.value,n(0,r)}]}const At=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",Bt=t=>"function"==typeof t,Ft=t=>t&&t.toString,Pt=(t={})=>!Object.keys(t).length,Vt=(t,...e)=>e.includes(t),zt=t=>Vt(t,void 0,null),Yt=t=>!zt(t),Rt=(t,...e)=>e.concat(t).find(Yt),Jt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Ut=t=>(e,...n)=>Jt(Jt("",t.toString),e,...n),Xt=(t,e=2,n=0,s=t.toString(),o=n.toString())=>o.repeat(e-s.length)+s,Wt=(...t)=>Ut(t[0])(Xt,...t),Ht=(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),Zt=(t,e=window)=>({listen(n,s){e[`${n}EventListener`](t,s)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),Gt=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||te(console.error,n))).every(Boolean),Kt=t=>(e,n)=>(Promise.resolve(n).then(e),t),Qt=Kt(!0),te=Kt(!1);var ee=Object.freeze({__proto__:null,decimalSeparator:At,isFunction:Bt,isStringable:Ft,isObjEmpty:Pt,hasValue:Vt,isNullish:zt,isNotNullish:Yt,bestValue:Rt,tryCatch:Jt,ensureStrValue:Ut,padLeft:Wt,showupElement:Ht,getListener:Zt,isMissing:Gt,go:Qt,stop:te});function ne(t){let e,n,s,r;return{c(){e=w("input"),T(e,"type","date"),T(e,"class",n=t[1]+" form-input form-date"),T(e,"id",t[2]),T(e,"name",t[2]),T(e,"aria-label",t[3]),T(e,"title",t[3]),T(e,"pattern",ie),T(e,"min",t[6]),T(e,"max",t[7]),e.required=t[4],e.disabled=t[5]},m(n,o){g(n,e,o),j(e,t[0]),s||(r=[S(e,"input",t[10]),S(e,"blur",t[9])],s=!0)},p(t,[s]){2&s&&n!==(n=t[1]+" form-input form-date")&&T(e,"class",n),1&s&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,a(r)}}}const se={timeZone:"UTC",year:"numeric",month:"long",day:"numeric",weekday:"short"},oe={year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",timeZoneName:"short"},re=(t,e=!1)=>{const n=e?oe:se,s=Intl.DateTimeFormat?new Intl.DateTimeFormat(t,n):{format:t=>t};return{format:t=>{try{t=t?s.format(new Date(t)):""}catch{t="(ungültig)"}return t}}},ie="\\d{4}(-|/)\\d{2}(-|/)\\d{2}";function ae(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,required:c,disabled:l,min:u,max:d}=s;return r=r.substr(0,10),t.$$set=t=>{"options"in t&&n(8,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,c,l,u,d,s,function(e){D(t,e)},function(){r=this.value,n(0,r)}]}class ce extends lt{constructor(t){super(),ct(this,t,ae,ne,l,{options:8,css:1,value:0})}}const{document:le}=nt;function ue(t,e,n){const s=t.slice();return s[16]=e[n].lit,s[17]=e[n].ref,s[18]=e,s[19]=n,s}function de(t){let e,n,s;function o(){t[12].call(e,t[19])}return{c(){e=w("input"),T(e,"class","iw-m iw-n"+t[17].count+" svelte-u6cc6e"),T(e,"id",t[2]+"-"+t[19]),T(e,"type","text"),T(e,"data-step",t[19]),T(e,"size",t[17].count),T(e,"minlength",t[17].count),T(e,"maxlength",t[17].count),T(e,"pattern",t[5][t[19]]||t[17].pattern),e.required=t[3],e.disabled=t[4]},m(r,i){g(r,e,i),j(e,t[1][t[19]]),n||(s=[S(e,"input",o),S(e,"input",t[8]),S(e,"blur",t[11])],n=!0)},p(n,s){t=n,2&s&&e.value!==t[1][t[19]]&&j(e,t[1][t[19]])},d(t){t&&v(e),n=!1,a(s)}}}function pe(t){let e,n,s=t[16]+"";return{c(){e=w("span"),n=y(s),T(e,"class","iw-m svelte-u6cc6e")},m(t,s){g(t,e,s),h(e,n)},p:o,d(t){t&&v(e)}}}function fe(t){let e;let n=function(t,e){return t[16]?pe:de}(t),s=n(t);return{c(){s.c(),e=k()},m(t,n){s.m(t,n),g(t,e,n)},p(t,e){s.p(t,e)},d(t){s.d(t),t&&v(e)}}}function me(t){let e,n,s,r,i=t[6].obj,a=[];for(let e=0;e<i.length;e+=1)a[e]=fe(ue(t,i,e));return{c(){e=w("div");for(let t=0;t<a.length;t+=1)a[t].c();T(e,"class",n=t[0]+" form-input svelte-u6cc6e"),T(e,"id",t[2]),T(e,"name",t[2]),T(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,[s]){if(382&s){let n;for(i=t[6].obj,n=0;n<i.length;n+=1){const o=ue(t,i,n);a[n]?a[n].p(o,s):(a[n]=fe(o),a[n].c(),a[n].m(e,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=i.length}1&s&&n!==(n=t[0]+" form-input svelte-u6cc6e")&&T(e,"class",n)},i:o,o:o,d(t){t&&v(e),b(a,t),s=!1,r()}}}function $e(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;r=r.toString();const{name:i,title:a,required:c,disabled:l,mask:u,pattern:d=[]}=s,p=(t=>{let e=[],n="",s=!1;if("string"!=typeof t)return e;const o=(t="")=>{n=t},r=t=>o(n.concat(t)),i=(t=!0)=>{s=t},a=t=>(e.push({lit:t}),void i(!1));for(const c of t)s?a(c):"\\"===c?i():"{"===c?o():"}"===c?e.push({ref:{count:parseInt(n),pattern:`\\d{${n}}`}}):" "===c?a(c):c>=0?r(c):a(c);const c=(t,n="",s=!0,o=0)=>t?e.reduce(((e,n)=>e.concat(n.ref&&n.ref.count?t.slice(o,o+=n.ref.count):s&&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,s=t.options),"css"in t&&n(0,o=t.css),"value"in t&&n(9,r=t.value)},[o,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 s=`#${i}-${e} ~ input`,o=document.querySelectorAll(s);return o[0]&&o[0].focus&&o[0].focus()},r,s,function(e){D(t,e)},function(t){f[t]=this.value,n(1,f)}]}class he extends lt{constructor(t){var e;super(),le.getElementById("svelte-u6cc6e-style")||((e=w("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}",h(le.head,e)),ct(this,t,$e,me,l,{options:10,css:0,value:9})}}function ge(t){let e,n,s;function o(e){t[3](e)}let r={options:t[0],css:t[1]};return void 0!==t[2]&&(r.value=t[2]),e=new he({props:r}),B.push((()=>st(e,"value",o))),e.$on("blur",t[4]),{c(){ot(e.$$.fragment)},m(t,n){rt(e,t,n),s=!0},p(t,[s]){const o={};1&s&&(o.options=t[0]),2&s&&(o.css=t[1]),!n&&4&s&&(n=!0,o.value=t[2],R((()=>n=!1))),e.$set(o)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){it(e,t)}}}function ve(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;return o=o.concat(" form-time"),s.mask="{2}:{2}",s.pattern=["(2[0-3]|[0-1][0-9])","","[0-5][0-9]"],t.$$set=t=>{"options"in t&&n(0,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(2,r=t.value)},[s,o,r,function(t){r=t,n(2,r)},function(e){D(t,e)}]}class be extends lt{constructor(t){super(),ct(this,t,ve,ge,l,{options:0,css:1,value:2})}}function we(t){let e,n,s,o,r,i,c,l,u,d,p,f;function m(e){t[15](e)}let $={options:t[4],css:t[0]};function b(e){t[16](e)}void 0!==t[1]&&($.value=t[1]),n=new ce({props:$}),B.push((()=>st(n,"value",m))),n.$on("blur",t[10]);let y={options:t[3],css:t[0]};return void 0!==t[2]&&(y.value=t[2]),r=new be({props:y}),B.push((()=>st(r,"value",b))),r.$on("blur",t[10]),{c(){e=w("div"),ot(n.$$.fragment),o=x(),ot(r.$$.fragment),c=x(),l=w("input"),T(e,"id",t[6]),T(e,"tabindex","90"),T(e,"class","hidden"),T(l,"type","text"),T(l,"class",u=t[0]+" form-input form-shadow"),T(l,"id",t[7]),T(l,"name",t[7]),l.disabled=t[9],T(l,"aria-label",t[8]),T(l,"title",t[8])},m(s,i){g(s,e,i),rt(n,e,null),h(e,o),rt(r,e,null),g(s,c,i),g(s,l,i),j(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 o={};16&e&&(o.options=t[4]),1&e&&(o.css=t[0]),!s&&2&e&&(s=!0,o.value=t[1],R((()=>s=!1))),n.$set(o);const a={};8&e&&(a.options=t[3]),1&e&&(a.css=t[0]),!i&&4&e&&(i=!0,a.value=t[2],R((()=>i=!1))),r.$set(a),(!d||1&e&&u!==(u=t[0]+" form-input form-shadow"))&&T(l,"class",u),32&e&&l.value!==t[5]&&j(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),it(n),it(r),t&&v(c),t&&v(l),p=!1,a(f)}}}function ye(t,e,n){let{options:s}=e,{css:o}=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(),s=Wt(e.getMonth()+1),o=Wt(e.getDate()),r=Wt(e.getHours()),i=Wt(e.getMinutes());return{date:n.concat("-",s,"-",o),time:r.concat(i)}})(r);const{name:l,nameShadow:u,title:d,disabled:p}=s;let f,m=Object.assign({},s),$=Object.assign({},s);$.name=l+"-Date",m.name=l+"-Time";const h=re(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=h.format(r))},v=t=>t.startsWith($.name),b=M();return g(),t.$$set=t=>{"options"in t&&n(13,s=t.options),"css"in t&&n(0,o=t.css),"value"in t&&n(12,r=t.value)},[o,a,c,m,$,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($.name).focus()),r,s,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 xe(t){let e,n,s,o,r,i,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 ce({props:d}),B.push((()=>st(e,"value",u))),e.$on("blur",t[8]),{c(){ot(e.$$.fragment),s=x(),o=w("input"),T(o,"type","text"),T(o,"class",r=t[2]+" form-input form-shadow"),T(o,"id",t[4]),T(o,"name",t[4]),T(o,"placeholder",t[6]),o.disabled=t[7],T(o,"aria-label",t[5]),T(o,"title",t[5])},m(n,r){rt(e,n,r),g(n,s,r),g(n,o,r),j(o,t[3]),i=!0,c||(l=[S(o,"input",t[11]),S(o,"focus",t[9])],c=!0)},p(t,[s]){const a={};2&s&&(a.options=t[1]),4&s&&(a.css=t[2]+" hidden"),!n&&1&s&&(n=!0,a.value=t[0],R((()=>n=!1))),e.$set(a),(!i||4&s&&r!==(r=t[2]+" form-input form-shadow"))&&T(o,"class",r),8&s&&o.value!==t[3]&&j(o,t[3])},i(t){i||(Q(e.$$.fragment,t),i=!0)},o(t){tt(e.$$.fragment,t),i=!1},d(t){it(e,t),t&&v(s),t&&v(o),c=!1,a(l)}}}function ke(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale")),{nameShadow:a,title:c,placeholder:l,disabled:u}=s;let d;const p=re(i.id),f=()=>{n(3,d=p.format(r))},m=M();return f(),t.$$set=t=>{"options"in t&&n(1,s=t.options),"css"in t&&n(2,o=t.css),"value"in t&&n(0,r=t.value)},[r,s,o,d,a,c,l,u,()=>{f(),m("blur")},function(e){D(t,e)},function(t){r=t,n(0,r)},function(){d=this.value,n(3,d)}]}function Se(t){let e,n,s,r;return{c(){e=w("input"),T(e,"type","email"),T(e,"class",n=t[1]+" form-input"),T(e,"id",t[2]),T(e,"name",t[2]),T(e,"placeholder",t[4]),T(e,"aria-label",t[3]),T(e,"title",t[3]),e.required=t[5],e.disabled=t[6]},m(n,o){g(n,e,o),j(e,t[0]),s||(r=S(e,"input",t[8]),s=!0)},p(t,[s]){2&s&&n!==(n=t[1]+" form-input")&&T(e,"class",n),1&s&&e.value!==t[0]&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Ee(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u}=s;return t.$$set=t=>{"options"in t&&n(7,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,c,l,u,s,function(){r=this.value,n(0,r)}]}function Te(t){let e,n,s,r;return{c(){e=w("textarea"),T(e,"rows",t[6]),T(e,"class",n=t[1]+" form-textarea block"),T(e,"id",t[2]),T(e,"name",t[2]),T(e,"aria-label",t[3]),T(e,"title",t[3]),e.required=t[4],e.disabled=t[5]},m(n,o){g(n,e,o),j(e,t[0]),s||(r=S(e,"input",t[8]),s=!0)},p(t,[s]){2&s&&n!==(n=t[1]+" form-textarea block")&&T(e,"class",n),1&s&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Ne(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,required:c,disabled:l,rows:u=3}=s;return t.$$set=t=>{"options"in t&&n(7,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,c,l,u,s,function(){r=this.value,n(0,r)}]}function Ie(t){let e,n,s,r,i,c,l,u;return{c(){e=w("div"),n=w("input"),s=x(),r=w("div"),i=x(),c=w("div"),T(n,"type","checkbox"),T(n,"id",t[1]),T(n,"name",t[1]),T(n,"aria-label",t[2]),T(n,"title",t[2]),n.disabled=t[3],T(n,"class","svelte-ke6ng1"),T(r,"class","track svelte-ke6ng1"),T(c,"class","thumb svelte-ke6ng1"),T(e,"class","switch svelte-ke6ng1")},m(o,a){g(o,e,a),h(e,n),n.checked=t[0],h(e,s),h(e,r),h(e,i),h(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,a(u)}}}function Ce(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;o="";const{name:i,title:a,disabled:c}=s;return t.$$set=t=>{"options"in t&&n(6,s=t.options),"css"in t&&n(5,o=t.css),"value"in t&&n(0,r=t.value)},[r,i,a,c,()=>n(0,r=c?r:!r),o,s,function(){r=this.checked,n(0,r)}]}function je(t){let e,n,s,r;return{c(){e=w("input"),T(e,"type","file"),T(e,"class",n=t[1]+" form-input"),T(e,"id",t[2]),T(e,"name",t[2]),T(e,"pattern",t[7]),T(e,"placeholder",t[4]),T(e,"aria-label",t[3]),T(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,[s]){2&s&&n!==(n=t[1]+" form-input")&&T(e,"class",n)},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function qe(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u,pattern:d}=s;return t.$$set=t=>{"options"in t&&n(8,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,c,l,u,d,s,function(){r=this.value,n(0,r)}]}function _e(t){let e,n,s,r;return{c(){e=w("input"),T(e,"type","text"),T(e,"class",n=t[1]+" form-input"),T(e,"id",t[2]),T(e,"name",t[2]),T(e,"placeholder",t[4]),T(e,"aria-label",t[3]),T(e,"title",t[3]),e.required=t[5],e.disabled=t[6],T(e,"pattern",t[7]),T(e,"autocomplete",t[8])},m(n,o){g(n,e,o),j(e,t[0]),s||(r=S(e,"input",t[10]),s=!0)},p(t,[s]){2&s&&n!==(n=t[1]+" form-input")&&T(e,"class",n),1&s&&e.value!==t[0]&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Oe(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u,pattern:d,autocomplete:p="on"}=s;return t.$$set=t=>{"options"in t&&n(9,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,c,l,u,d,p,s,function(){r=this.value,n(0,r)}]}function Le(t){let e,n,s;return{c(){e=w("input"),T(e,"type","hidden"),T(e,"id",t[1]),T(e,"name",t[1]),e.disabled=!0},m(o,r){g(o,e,r),j(e,t[0]),n||(s=S(e,"input",t[4]),n=!0)},p(t,[n]){1&n&&j(e,t[0])},i:o,o:o,d(t){t&&v(e),n=!1,s()}}}function Me(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;o="";const{name:i}=s;return t.$$set=t=>{"options"in t&&n(3,s=t.options),"css"in t&&n(2,o=t.css),"value"in t&&n(0,r=t.value)},[r,i,o,s,function(){r=this.value,n(0,r)}]}const{document:De}=nt;function Ae(t){let e;return{c(){e=w("p"),e.textContent=`Unknow input type: ${t[4]}`,T(e,"class","svelte-166hp95")},m(t,n){g(t,e,n)},p:o,i:o,o:o,d(t){t&&v(e)}}}function Be(t){let e,n,s,o;function r(e){t[9](e)}var i=t[6];function a(t){let e={options:t[0],css:He};return void 0!==t[1]&&(e.value=t[1]),{props:e}}return i&&(e=new i(a(t)),B.push((()=>st(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8])),{c(){e&&ot(e.$$.fragment),s=k()},m(t,n){e&&rt(e,t,n),g(t,s,n),o=!0},p(t,o){const c={};if(1&o&&(c.options=t[0]),!n&&2&o&&(n=!0,c.value=t[1],R((()=>n=!1))),i!==(i=t[6])){if(e){G();const t=e;tt(t.$$.fragment,1,0,(()=>{it(t,1)})),K()}i?(e=new i(a(t)),B.push((()=>st(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8]),ot(e.$$.fragment),Q(e.$$.fragment,1),rt(e,s.parentNode,s)):e=null}else i&&e.$set(c)},i(t){o||(e&&Q(e.$$.fragment,t),o=!0)},o(t){e&&tt(e.$$.fragment,t),o=!1},d(t){t&&v(s),e&&it(e,t)}}}function Fe(t){let e,n,s,r,i,a,c,l,u,d,p,f=t[2].title+"";const m=[Be,Ae],$=[];a=function(t,e){return t[6]?0:1}(t),c=$[a]=m[a](t);let b=t[5]&&function(t){let e;return{c(){e=w("p"),e.textContent=`${t[5]}`,T(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=w("fieldset"),n=w("label"),s=y(f),i=x(),c.c(),l=x(),b&&b.c(),T(n,"for",r=t[2].id),T(n,"disabled",t[3])},m(o,r){g(o,e,r),h(e,n),h(n,s),h(e,i),$[a].m(e,null),h(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+"")&&C(s,f),(!u||4&e&&r!==(r=t[2].id))&&T(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),$[a].d(),b&&b.d(),d=!1,p()}}}const Pe={hidden:class extends lt{constructor(t){super(),ct(this,t,Me,Le,l,{options:3,css:2,value:0})}},text:class extends lt{constructor(t){super(),ct(this,t,Oe,_e,l,{options:9,css:1,value:0})}},file:class extends lt{constructor(t){super(),ct(this,t,qe,je,l,{options:8,css:1,value:0})}},checkbox:class extends lt{constructor(t){var e;super(),document.getElementById("svelte-ke6ng1-style")||((e=w("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)}",h(document.head,e)),ct(this,t,Ce,Ie,l,{options:6,css:5,value:0})}},masked:he,textarea:class extends lt{constructor(t){super(),ct(this,t,Ne,Te,l,{options:7,css:1,value:0})}},email:class extends lt{constructor(t){super(),ct(this,t,Ee,Se,l,{options:7,css:1,value:0})}},date:class extends lt{constructor(t){super(),ct(this,t,ke,xe,l,{options:1,css:2,value:0})}},datetime:class extends lt{constructor(t){super(),ct(this,t,ye,we,l,{options:13,css:0,value:12})}},number:It,password:class extends lt{constructor(t){super(),ct(this,t,Dt,Mt,l,{options:8,css:1,value:0})}},currency:class extends lt{constructor(t){super(),ct(this,t,Lt,Ot,l,{options:1,css:2,value:0,currency:3})}},rate:class extends lt{constructor(t){super(),ct(this,t,qt,jt,l,{options:0,css:2,value:1})}}},Ve={default:"",checkbox:!1,email:"@",number:0,currency:0,rate:0},ze=t=>t+"-show",Ye=t=>t&&document.getElementById(t),Re=(t,e,n="block")=>{t&&t.style&&(t.style.display=e?n:"none")},Je=(t,e)=>{if(!t)return!0;const n=Ye(t);if(!n)return!0;const s=Ye(ze(t));return!e&&!s||(s&&Re(s,!e),Re(n,e),e&&n.focus&&n.focus(),!1)},Ue=t=>Je(t,!0),Xe=(t,e=Ye(t))=>e&&e.children&&e.children.length?Array.from(e.children).every((t=>Xe(t.id,t))):!e||!e.validity||e.validity.valid,We=t=>void 0===Ve[t]?Ve.default:Ve[t],He="form-field";function Ze(t,e,n){let{options:s}=e,{value:o}=e;const{label:r={},disabled:i,type:a="text",hint:c=!1}=s;r.id=s.name,s.nameShadow=ze(s.name),s.required=!i&&s.required,s.title=s.title||s.placeholder;const l=(t=>Pe[t])(a);return t.$$set=t=>{"options"in t&&n(0,s=t.options),"value"in t&&n(1,o=t.value)},[s,o,r,i,a,c,l,t=>Ue(s.name),t=>{return e=s.name,Je(e,!1);var e},function(t){o=t,n(1,o)}]}class Ge extends lt{constructor(t){var e;super(),De.getElementById("svelte-166hp95-style")||((e=w("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}",h(De.head,e)),ct(this,t,Ze,Fe,l,{options:0,value:1})}}var Ke=Object.prototype.hasOwnProperty;function Qe(t){return null==t}function tn(t){return Qe(t)||Object.keys(t).length<=0}const en=function t(e,n){var s,o;if(e===n)return!0;if(e&&n&&(s=e.constructor)===n.constructor){if(s===Date)return e.getTime()===n.getTime();if(s===RegExp)return e.toString()===n.toString();if(s===Array){if((o=e.length)===n.length)for(;o--&&t(e[o],n[o]););return-1===o}if(!s||"object"==typeof e){for(s in o=0,e){if(Ke.call(e,s)&&++o&&!Ke.call(n,s))return!1;if(!(s in n)||!t(e[s],n[s]))return!1}return Object.keys(n).length===o}}return e!=e&&n!=n};function nn(t,e,n){if(new Object(t)!==t)return t;Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]);const s=e.slice(0,-1).reduce(((t,n,s)=>new Object(t[n])===t[n]?t[n]:t[n]=Math.trunc(Math.abs(e[s+1]))===+e[s+1]?[]:{}),t);return s[e[e.length-1]]=n,t}const sn={assignDeep:function t(e,n){if(Array.isArray(e))return e.map((e=>t(e,n)));const s={};for(const o in e)s[o]="object"==typeof e[o]?t(e[o],n):n;return s},cloneDeep:function(t){return JSON.parse(JSON.stringify(t))},deepEqual:en,getErrorsFromSchema:function t(e,n,s={}){for(const o in n)switch(!0){case"object"===n[o].type&&!tn(n[o].fields):s[o]=t(e[o],n[o].fields,{...s[o]});break;case"array"===n[o].type:{const r=e&&e[o]?e[o]:[];s[o]=r.map((e=>{const r=t(e,n[o].innerType.fields,{...s[o]});return Object.keys(r).length>0?r:""}));break}default:s[o]=""}return s},getValues:function t(e){let n=[];for(const[,s]of Object.entries(e)){const e="object"==typeof s?t(s):[s];n=[...n,...e]}return n},isEmpty:tn,isNullish:Qe,set:nn,subscribeOnce:function(t){return new Promise((e=>{t.subscribe(e)()}))},update:function(t,e,n){t.update((t=>(nn(t,e,n),t)))}};const on=t=>{let e=t.initialValues||{};const n=t.validationSchema,s=t.validate,o=t.onSubmit,r=()=>sn.cloneDeep(e),i=()=>n?sn.getErrorsFromSchema(e,n.fields):sn.assignDeep(e,""),a=()=>sn.assignDeep(e,!1),c=ft(r()),l=ft(i()),u=ft(a()),p=ft(!1),f=ft(!1),m=mt(l,(t=>sn.getValues(t).every((t=>""===t)))),$=mt(c,(t=>{const n=sn.assignDeep(t,!1);for(let s in t)n[s]=!sn.deepEqual(t[s],e[s]);return n})),h=mt($,(t=>sn.getValues(t).includes(!0)));function g(t,e){return x(t,!0),n?(f.set(!0),n.validateAt(t,d(c)).then((()=>sn.update(l,t,""))).catch((e=>sn.update(l,t,e.message))).finally((()=>{f.set(!1)}))):s?(f.set(!0),Promise.resolve().then((()=>s({[t]:e}))).then((e=>sn.update(l,t,sn.isNullish(e)?"":e[t]))).finally((()=>{f.set(!1)}))):Promise.resolve()}function v(t,e){return y(t,e),g(t,e)}function b(){c.set(r()),l.set(i()),u.set(a())}function w(t){return Promise.resolve().then((()=>l.set(i()))).then((()=>o(t,c,l))).finally((()=>p.set(!1)))}function y(t,e){sn.update(c,t,e)}function x(t,e){sn.update(u,t,e)}return{form:c,errors:l,touched:u,modified:$,isValid:m,isSubmitting:p,isValidating:f,isModified:h,handleChange:function(t){const e=t.target,n=e.name||e.id,s=function(t){return t.getAttribute&&"checkbox"===t.getAttribute("type")}(e)?e.checked:e.value;return v(n,s)},handleSubmit:function(t){return t&&t.preventDefault&&t.preventDefault(),p.set(!0),sn.subscribeOnce(c).then((t=>"function"==typeof s?(f.set(!0),Promise.resolve().then((()=>s(t))).then((e=>{sn.isNullish(e)||0===sn.getValues(e).length?w(t):(l.set(e),p.set(!1))})).finally((()=>f.set(!1)))):n?(f.set(!0),n.validate(t,{abortEarly:!1}).then((()=>w(t))).catch((t=>{if(t&&t.inner){const e=i();t.inner.map((t=>sn.set(e,t.path,t.message))),l.set(e)}p.set(!1)})).finally((()=>f.set(!1)))):void w(t)))},handleReset:b,updateField:y,updateValidateField:v,updateTouched:x,validateField:function(t){return sn.subscribeOnce(c).then((e=>g(t,e[t])))},updateInitialValues:function(t){e=t,b()},state:mt([c,l,u,$,m,f,p,h],(([t,e,n,s,o,r,i,a])=>({form:t,errors:e,touched:n,modified:s,isValid:o,isSubmitting:i,isValidating:r,isModified:a})))}};function rn(t,e,n){const s=t.slice();return s[33]=e[n].show,s[13]=e[n].title,s[14]=e[n].fields,s}function an(t,e,n){const s=t.slice();return s[0]=e[n],s[36]=e,s[37]=n,s}function cn(t){let e,n,s,o=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=w("p"),n=y(o),s=y(r),T(e,"class","er-error text-sm mt-2 text-red-500")},m(t,o){g(t,e,o),h(e,n),h(e,s)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&C(s,r)},d(t){t&&v(e)}}}function ln(t){let e;return{c(){e=w("p"),e.textContent=`${t[8].text}`,T(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 un(t){let e,n,s;function o(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 Ge({props:r}),B.push((()=>st(e,"value",o))),{c(){ot(e.$$.fragment)},m(t,n){rt(e,t,n),s=!0},p(s,o){t=s;const r={};!n&&80&o[0]&&(n=!0,r.value=t[4][t[0].name],R((()=>n=!1))),e.$set(r)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){it(e,t)}}}function dn(t){let e,n,s=t[14],o=[];for(let e=0;e<s.length;e+=1)o[e]=un(an(t,s,e));const r=t=>tt(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=k()},m(t,s){for(let e=0;e<o.length;e+=1)o[e].m(t,s);g(t,e,s),n=!0},p(t,n){if(80&n[0]){let i;for(s=t[14],i=0;i<s.length;i+=1){const r=an(t,s,i);o[i]?(o[i].p(r,n),Q(o[i],1)):(o[i]=un(r),o[i].c(),Q(o[i],1),o[i].m(e.parentNode,e))}for(G(),i=s.length;i<o.length;i+=1)r(i);K()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)Q(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)tt(o[t]);n=!1},d(t){b(o,t),t&&v(e)}}}function pn(t){let e,n;return e=new yt({props:{title:t[13],show:t[33],$$slots:{default:[dn]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};16&n[0]|128&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function fn(t){let e,n,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,n;return{c(){e=w("m-icon"),N(e,"class","mar-r-md"),N(e,"name",n=t[9].icon)},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=w("button"),i&&i.c(),n=x(),s=y(r),T(e,"ord","primary"),T(e,"class","full-width"),T(e,"type","submit")},m(t,o){g(t,e,o),i&&i.m(e,null),h(e,n),h(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&v(e),i&&i.d()}}}function mn(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=w("h2"),e.textContent=`${t[13].text}`},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t),$=t[1]&&t[7].text&&cn(t),y=t[3]&&t[8].text&&ln(t),k=t[6],N=[];for(let e=0;e<k.length;e+=1)N[e]=pn(rn(t,k,e));const I=t=>tt(N[t],1,1,(()=>{N[t]=null}));let C=t[9]&&fn(t);return{c(){n=x(),m&&m.c(),s=x(),$&&$.c(),r=x(),y&&y.c(),i=x(),a=w("p"),a.textContent=`${t[10].text}`,c=x(),l=w("form");for(let t=0;t<N.length;t+=1)N[t].c();u=x(),C&&C.c(),T(a,"id","er-invalid"),T(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),$&&$.m(e,o),g(e,r,o),y&&y.m(e,o),g(e,i,o),g(e,a,o),g(e,c,o),g(e,l,o);for(let t=0;t<N.length;t+=1)N[t].m(l,null);h(l,u),C&&C.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?$?$.p(t,n):($=cn(t),$.c(),$.m(r.parentNode,r)):$&&($.d(1),$=null),t[3]&&t[8].text?y?y.p(t,n):(y=ln(t),y.c(),y.m(i.parentNode,i)):y&&(y.d(1),y=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const s=rn(t,k,e);N[e]?(N[e].p(s,n),Q(N[e],1)):(N[e]=pn(s),N[e].c(),Q(N[e],1),N[e].m(l,u))}for(G(),e=k.length;e<N.length;e+=1)I(e);K()}t[9]&&C.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(N[t]);d=!0}},o(t){N=N.filter(Boolean);for(let t=0;t<N.length;t+=1)tt(N[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),$&&$.d(t),t&&v(r),y&&y.d(t),t&&v(i),t&&v(a),t&&v(c),t&&v(l),b(N,t),C&&C.d(),p=!1,f()}}}function $n(t,n,s){let o,r,{options:i={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:d=!1,failure:f={},success:m={},button:$=!1,links:h=[]}=i;a=a||{};const g={};let v=!1,b="",w=!1;const y=u.reduce(((t,e)=>t.concat(e.fields)),[]),x=(t,e,n,s)=>(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]),"?"))(s)))),k={},S={};y.map((({name:t,type:e,value:n})=>{const o=We(e);let r=Rt(o,g[t],a[t],n);switch(e){case"date":r=r.substr(0,10);case"masked":r=r.toString()}s(17,k[t]=r,k),S[t]=r}));const{form:E,handleSubmit:T,handleReset:N}=on({initialValues:k,onSubmit:async t=>{if(!d)return;if(!(()=>{const t=y.find((t=>!Xe(t.name)));return!t||(Ht("er-invalid",3e3),Ue(t.name),!1)})())return;const{path:n,func:o}=d,r=(t=>y.reduce(((e,n)=>(e[n.name]=t[n.name],e)),{}))(t);let i={};n&&!(i=await((t,n)=>{let s={};for(const t in S)(zt(a[t])||Yt(n[t])&&S[t]!==n[t])&&(s[t]=n[t]);if(Pt(s))return!1;const{_id:o,id:r}=n;return e.post("/api/"+t,{...s,_id:o,id:r}).then((t=>t.data))})(n,r))||o&&!(i=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(o,r,i))||((t,e)=>{const{action:n,url:o,query:r,reset:i}=t,{status:a=!0,data:c,message:l={}}=e;a?(s(3,w=!0),setTimeout((()=>{s(3,w=!1),x(n,c,o,r)}),m.text?1e3:10)):(i&&N(),s(1,v=!0),s(2,b=l.text),setTimeout((()=>{s(1,v=!1),s(2,b="")}),3e3))})(d,i)}});return p(t,E,(t=>s(4,r=t))),t.$$set=t=>{"options"in t&&s(0,i=t.options),"input"in t&&s(15,a=t.input),"head"in t&&s(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&s(5,o=k.Title||l.text||c)},[i,v,b,w,r,o,u,f,m,$,{text:"Bitte füllen Sie die Felder korrekt aus."},E,T,l,y,a,c,k,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,E.set(r))}]}const{document:hn}=nt;function gn(t,e,n){const s=t.slice();return s[32]=e[n].show,s[13]=e[n].title,s[14]=e[n].fields,s}function vn(t,e,n){const s=t.slice();return s[0]=e[n],s[35]=e,s[36]=n,s}function bn(t){let e,n,s,o=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=w("p"),n=y(o),s=y(r),T(e,"class","er-error text-sm mt-2 text-red-500")},m(t,o){g(t,e,o),h(e,n),h(e,s)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&C(s,r)},d(t){t&&v(e)}}}function wn(t){let e;return{c(){e=w("p"),e.textContent=`${t[8].text}`,T(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 yn(t){let e,n,s,o;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 Ge({props:i}),B.push((()=>st(e,"value",r))),{c(){ot(e.$$.fragment),s=x()},m(t,n){rt(e,t,n),g(t,s,n),o=!0},p(s,o){t=s;const r={};!n&&80&o[0]&&(n=!0,r.value=t[4][t[0].name],R((()=>n=!1))),e.$set(r)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){it(e,t),t&&v(s)}}}function xn(t){let e,n,s=t[14],o=[];for(let e=0;e<s.length;e+=1)o[e]=yn(vn(t,s,e));const r=t=>tt(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=k()},m(t,s){for(let e=0;e<o.length;e+=1)o[e].m(t,s);g(t,e,s),n=!0},p(t,n){if(80&n[0]){let i;for(s=t[14],i=0;i<s.length;i+=1){const r=vn(t,s,i);o[i]?(o[i].p(r,n),Q(o[i],1)):(o[i]=yn(r),o[i].c(),Q(o[i],1),o[i].m(e.parentNode,e))}for(G(),i=s.length;i<o.length;i+=1)r(i);K()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)Q(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)tt(o[t]);n=!1},d(t){b(o,t),t&&v(e)}}}function kn(t){let e,n;return e=new yt({props:{title:t[13],show:t[32],$$slots:{default:[xn]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};16&n[0]|64&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function Sn(t){let e,n,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,n;return{c(){e=w("m-icon"),N(e,"class","mar-r-md"),N(e,"name",n=t[9].icon)},m(t,n){g(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=w("button"),i&&i.c(),n=x(),s=y(r),T(e,"ord","primary"),T(e,"class","full-width"),T(e,"type","submit")},m(t,o){g(t,e,o),i&&i.m(e,null),h(e,n),h(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&v(e),i&&i.d()}}}function En(t){let e,n,s,r,i,a,c,l,u,d,p,f;hn.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=w("h2"),e.textContent=`${t[13].text}`,T(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),$=t[1]&&t[7].text&&bn(t),y=t[3]&&t[8].text&&wn(t),k=t[6],N=[];for(let e=0;e<k.length;e+=1)N[e]=kn(gn(t,k,e));const I=t=>tt(N[t],1,1,(()=>{N[t]=null}));let C=t[9]&&Sn(t);return{c(){n=x(),m&&m.c(),s=x(),$&&$.c(),r=x(),y&&y.c(),i=x(),a=w("p"),a.textContent=`${t[10].text}`,c=x(),l=w("form");for(let t=0;t<N.length;t+=1)N[t].c();u=x(),C&&C.c(),T(a,"id","er-invalid"),T(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),T(l,"class","mt-4"),l.noValidate=!0,T(l,"enctype","multipart/form-data")},m(e,o){g(e,n,o),m&&m.m(e,o),g(e,s,o),$&&$.m(e,o),g(e,r,o),y&&y.m(e,o),g(e,i,o),g(e,a,o),g(e,c,o),g(e,l,o);for(let t=0;t<N.length;t+=1)N[t].m(l,null);h(l,u),C&&C.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])&&(hn.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?$?$.p(t,n):($=bn(t),$.c(),$.m(r.parentNode,r)):$&&($.d(1),$=null),t[3]&&t[8].text?y?y.p(t,n):(y=wn(t),y.c(),y.m(i.parentNode,i)):y&&(y.d(1),y=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const s=gn(t,k,e);N[e]?(N[e].p(s,n),Q(N[e],1)):(N[e]=kn(s),N[e].c(),Q(N[e],1),N[e].m(l,u))}for(G(),e=k.length;e<N.length;e+=1)I(e);K()}t[9]&&C.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(N[t]);d=!0}},o(t){N=N.filter(Boolean);for(let t=0;t<N.length;t+=1)tt(N[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),$&&$.d(t),t&&v(r),y&&y.d(t),t&&v(i),t&&v(a),t&&v(c),t&&v(l),b(N,t),C&&C.d(),p=!1,f()}}}function Tn(t,n,s){let o,r,{options:i={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:d=!1,failure:f={},success:m={},button:$=!1,links:h=[]}=i;a=a||{};const g={};let v=!1,b="",w=!1;const y=u.reduce(((t,e)=>t.concat(e.fields)),[]),x=(t,e,n,s)=>(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]),"?"))(s)))),k={},S={};y.map((({name:t,type:e,value:n})=>{const o=We(e);let r=Rt(o,g[t],a[t],n);s(17,k[t]=r,k),S[t]=r}));const{form:E,handleSubmit:T,handleReset:N}=on({initialValues:k,onSubmit:async t=>{if(!d)return;const{path:n,func:o}=d,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))||o&&!(i=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(o,r,i))||((t,e)=>{const{action:n,url:o,query:r,reset:i}=t,{status:a=!0,data:c,message:l={}}=e;a?(s(3,w=!0),setTimeout((()=>{s(3,w=!1),x(n,c,o,r)}),m.text?1e3:10)):(i&&N(),s(1,v=!0),s(2,b=l.text),setTimeout((()=>{s(1,v=!1),s(2,b="")}),3e3))})(d,i)}});return p(t,E,(t=>s(4,r=t))),t.$$set=t=>{"options"in t&&s(0,i=t.options),"input"in t&&s(15,a=t.input),"head"in t&&s(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&s(5,o=k.Title||l.text||c)},[i,v,b,w,r,o,u,f,m,$,{text:"Bitte füllen Sie die Felder korrekt aus."},E,T,l,y,a,c,k,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,E.set(r))}]}function Nn(t){let e,n,s,o;const r=t[3].default,i=f(r,t,t[2],null);return{c(){e=w("button"),i&&i.c(),T(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,s||(o=S(e,"click",t[4]),s=!0)},p(t,[s]){i&&i.p&&(!n||4&s)&&$(i,r,t,t[2],s,null,null),(!n||2&s)&&(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),s=!1,o()}}}function In(t,e,n){let{$$slots:s={},$$scope:o}=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,o=t.$$scope)},[r,i,o,s,()=>window.singleSpaNavigate(r)]}function Cn(t){let e,n,s,o,r;const i=t[5].default,a=f(i,t,t[4],null);return{c(){e=w("span"),a&&a.c(),T(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),T(e,"title",t[0])},m(n,i){g(n,e,i),a&&a.m(e,null),s=!0,o||(r=S(e,"click",t[2]),o=!0)},p(t,[o]){a&&a.p&&(!s||16&o)&&$(a,i,t,t[4],o,null,null),(!s||2&o&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&T(e,"class",n),(!s||1&o)&&T(e,"title",t[0])},i(t){s||(Q(a,t),s=!0)},o(t){tt(a,t),s=!1},d(t){t&&v(e),a&&a.d(t),o=!1,r()}}}function jn(t,e,n){let{$$slots:s={},$$scope:o}=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,o=t.$$scope)},[r,a,()=>window.singleSpaNavigate(i),i,o,s]}const qn=t=>({tenant:1&t}),_n=t=>({tenant:t[0].tenant});function On(t){let e;return{c(){e=w("p"),e.textContent="You are being redirected to the Login page."},m(t,n){g(t,e,n)},p:o,i:o,o:o,d(t){t&&v(e)}}}function Ln(t){let e;const n=t[3].default,s=f(n,t,t[2],_n);return{c(){s&&s.c()},m(t,n){s&&s.m(t,n),e=!0},p(t,o){s&&s.p&&(!e||5&o)&&$(s,n,t,t[2],o,qn,_n)},i(t){e||(Q(s,t),e=!0)},o(t){tt(s,t),e=!1},d(t){s&&s.d(t)}}}function Mn(t){let e,n,s,o;const r=[Ln,On],i=[];return e=function(t,e){return t[1]()?0:1}(t),n=i[e]=r[e](t),{c(){n.c(),s=k()},m(t,n){i[e].m(t,n),g(t,s,n),o=!0},p(t,[e]){n.p(t,e)},i(t){o||(Q(n),o=!0)},o(t){tt(n),o=!1},d(t){i[e].d(t),t&&v(s)}}}function Dn(t,e,n){let s;p(t,$t,(t=>n(0,s=t)));let{$$slots:o={},$$scope:r}=e;return t.$$set=t=>{"$$scope"in t&&n(2,r=t.$$scope)},[s,()=>s||te(window.singleSpaNavigate,`/?p=${window.location.pathname}`),r,o]}function An(t,e,n){let s;p(t,ht,(t=>n(1,s=t)));let{description:o}=e;return t.$$set=t=>{"description"in t&&n(0,o=t.description)},t.$$.update=()=>{if(3&t.$$.dirty&&o){const t=o;o.length>30&&n(0,o=o.substring(0,30)+"...");const e=window.location.pathname,r=s;r.find((t=>t.href===e))||ht.set(r.slice(Math.max(r.length-6+1,0)).concat({href:e,text:o,desc:t}))}},[o,s]}const Bn="single-spa:routing-event",Fn=Zt(Bn);function Pn(t,{modulePath:e,update:n}){if(Gt({value:n,check:Bt,text:"<update> should be a function (dataListener)"},{value:e,check:Ft,text:"<modulePath> should be a string (dataListener)"}))return;const s=e.toString(),o=e=>{const o=e.currentTarget.location.pathname,[,r,...i]=o.split("/");s===r&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Fn.start(o),{destroy:()=>Fn.stop(o)}}const Vn=()=>window.dispatchEvent(new CustomEvent(Bn)),zn=t=>({prop:2&t}),Yn=t=>({prop:t[6],refresh:Vn}),Rn=t=>({err:2&t,prop:2&t}),Jn=t=>({err:t[7],prop:t[6],refresh:Vn}),Un=t=>({prop:2&t}),Xn=t=>({prop:t[6],refresh:Vn}),Wn=t=>({prop:2&t}),Hn=t=>({prop:t[6],refresh:Vn});function Zn(t){let e;const n=t[4].init,s=f(n,t,t[3],Yn);return{c(){s&&s.c()},m(t,n){s&&s.m(t,n),e=!0},p(t,o){s&&s.p&&(!e||10&o)&&$(s,n,t,t[3],o,zn,Yn)},i(t){e||(Q(s,t),e=!0)},o(t){tt(s,t),e=!1},d(t){s&&s.d(t)}}}function Gn(t){let e,n,s,o={ctx:t,current:null,token:null,hasCatch:!0,pending:ts,then:Qn,catch:Kn,value:6,error:7,blocks:[,,,]};return et(n=t[1],o),{c(){e=k(),o.block.c()},m(t,n){g(t,e,n),o.block.m(t,o.anchor=n),o.mount=()=>e.parentNode,o.anchor=e,s=!0},p(e,s){t=e,o.ctx=t,2&s&&n!==(n=t[1])&&et(n,o)||function(t,e,n){const s=e.slice(),{resolved:o}=t;t.current===t.then&&(s[t.value]=o),t.current===t.catch&&(s[t.error]=o),t.block.p(s,n)}(o,t,s)},i(t){s||(Q(o.block),s=!0)},o(t){for(let t=0;t<3;t+=1){tt(o.blocks[t])}s=!1},d(t){t&&v(e),o.block.d(t),o.token=null,o=null}}}function Kn(t){let e;const n=t[4].error,s=f(n,t,t[3],Jn);return{c(){s&&s.c()},m(t,n){s&&s.m(t,n),e=!0},p(t,o){s&&s.p&&(!e||10&o)&&$(s,n,t,t[3],o,Rn,Jn)},i(t){e||(Q(s,t),e=!0)},o(t){tt(s,t),e=!1},d(t){s&&s.d(t)}}}function Qn(t){let e;const n=t[4].default,s=f(n,t,t[3],Xn);return{c(){s&&s.c()},m(t,n){s&&s.m(t,n),e=!0},p(t,o){s&&s.p&&(!e||10&o)&&$(s,n,t,t[3],o,Un,Xn)},i(t){e||(Q(s,t),e=!0)},o(t){tt(s,t),e=!1},d(t){s&&s.d(t)}}}function ts(t){let e;const n=t[4].load,s=f(n,t,t[3],Hn);return{c(){s&&s.c()},m(t,n){s&&s.m(t,n),e=!0},p(t,o){s&&s.p&&(!e||10&o)&&$(s,n,t,t[3],o,Wn,Hn)},i(t){e||(Q(s,t),e=!0)},o(t){tt(s,t),e=!1},d(t){s&&s.d(t)}}}function es(t){let e,n,s,r,i,l,u;const d=[Gn,Zn],p=[];function f(t,e){return t[1]?0:1}return n=f(t),s=p[n]=d[n](t),{c(){e=w("section"),s.c(),T(e,"class","data")},m(s,a){var d;g(s,e,a),p[n].m(e,null),i=!0,l||(u=[(d=r=Pn.call(null,e,t[0]),d&&c(d.destroy)?d.destroy:o),S(e,"data",t[5])],l=!0)},p(t,[o]){let i=n;n=f(t),n===i?p[n].p(t,o):(G(),tt(p[i],1,1,(()=>{p[i]=null})),K(),s=p[n],s?s.p(t,o):(s=p[n]=d[n](t),s.c()),Q(s,1),s.m(e,null)),r&&c(r.update)&&1&o&&r.update.call(null,t[0])},i(t){i||(Q(s),i=!0)},o(t){tt(s),i=!1},d(t){t&&v(e),p[n].d(),l=!1,a(u)}}}function ns(t,e,n){let s,{$$slots:o={},$$scope:r}=e,{options:i}=e,{update:a=!1}=e;a&&(i={update:a,modulePath:window.location.pathname.split("/")[1]});return t.$$set=t=>{"options"in t&&n(0,i=t.options),"update"in t&&n(2,a=t.update),"$$scope"in t&&n(3,r=t.$$scope)},[i,s,a,r,o,({detail:t})=>n(1,s=t.data)]}function ss(t){let e,n;return e=new t[2]({props:{class:"full-width",style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[1],value:t[0],multiline:!0,readonly:!0,rows:"1"}}),e.$on("keydown",t[3]),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,[n]){const s={};2&n&&(s.id=t[1]),1&n&&(s.value=t[0]),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function os(t,e,n){const{TextField:o}=s;let{id:r}=e,{value:i}=e,{close:a}=e;const c=()=>{const t=document.getElementById(r),{style:e,scrollHeight:n}=t;n&&(e.height=n+"px"),t.focus()};return t.$$set=t=>{"id"in t&&n(1,r=t.id),"value"in t&&n(0,i=t.value),"close"in t&&n(4,a=t.close)},t.$$.update=()=>{1&t.$$.dirty&&i&&setTimeout(c)},[i,r,o,({detail:{nativeEvent:t}})=>"Escape"===t.key&&(n(0,i=""),a()),a]}class rs extends lt{constructor(t){super(),ct(this,t,os,ss,l,{id:1,value:0,close:4})}}function is(t){let e,n,s;function o(e){t[7](e)}let r={id:t[5],close:t[10]};return void 0!==t[2]&&(r.value=t[2]),e=new rs({props:r}),B.push((()=>st(e,"value",o))),{c(){ot(e.$$.fragment)},m(t,n){rt(e,t,n),s=!0},p(t,s){const o={};1024&s&&(o.close=t[10]),!n&&4&s&&(n=!0,o.value=t[2],R((()=>n=!1))),e.$set(o)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){it(e,t)}}}function as(t){let e,n;return e=new t[4]({props:{title:t[0],closeCallback:t[10],$$slots:{default:[is]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};1&n&&(s.title=t[0]),1024&n&&(s.closeCallback=t[10]),3076&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function cs(t){let e,n,s;function o(e){t[8](e)}let r={$$slots:{default:[as,({closeCallback:t})=>({10:t}),({closeCallback:t})=>t?1024:0]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.open=t[1]),e=new t[3]({props:r}),B.push((()=>st(e,"open",o))),e.$on("change",t[9]),{c(){ot(e.$$.fragment)},m(t,n){rt(e,t,n),s=!0},p(t,[s]){const o={};3077&s&&(o.$$scope={dirty:s,ctx:t}),!n&&2&s&&(n=!0,o.open=t[1],R((()=>n=!1))),e.$set(o)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){it(e,t)}}}function ls(t,e,n){const{Modal:o,Dialog:r}=s;let i,{title:a}=e,{showMessage:c}=e,l="";return c=t=>{n(2,l=[].concat(t).join("\n")),n(1,i=!0)},t.$$set=t=>{"title"in t&&n(0,a=t.title),"showMessage"in t&&n(6,c=t.showMessage)},[a,i,l,o,r,"modalDialog",c,function(t){l=t,n(2,l)},function(t){i=t,n(1,i)},function(e){D(t,e)}]}class us extends lt{constructor(t){super(),ct(this,t,ls,cs,l,{title:0,showMessage:6})}}const ds=t=>({prop:8192&t,refresh:16384&t,showMessage:16&t}),ps=t=>({prop:t[13],refresh:t[14],showMessage:t[4]});function fs(t){let e;const n=t[10].default,s=f(n,t,t[12],ps);return{c(){s&&s.c()},m(t,n){s&&s.m(t,n),e=!0},p(t,o){s&&s.p&&(!e||28688&o)&&$(s,n,t,t[12],o,ds,ps)},i(t){e||(Q(s,t),e=!0)},o(t){tt(s,t),e=!1},d(t){s&&s.d(t)}}}function ms(t){let e,n,s;function o(e){t[11](e)}let r={title:t[2]};return void 0!==t[4]&&(r.showMessage=t[4]),e=new us({props:r}),B.push((()=>st(e,"showMessage",o))),e.$on("change",(function(){c(t[8](t[14]))&&t[8](t[14]).apply(this,arguments)})),{c(){ot(e.$$.fragment)},m(t,n){rt(e,t,n),s=!0},p(s,o){t=s;const r={};4&o&&(r.title=t[2]),!n&&16&o&&(n=!0,r.showMessage=t[4],R((()=>n=!1))),e.$set(r)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){it(e,t)}}}function $s(t){let e,n,s,o;e=new t[6]({props:{class:t[1],title:t[13].title,style:t[3],$$slots:{default:[fs]},$$scope:{ctx:t}}});let r=t[2]&&ms(t);return{c(){ot(e.$$.fragment),n=x(),r&&r.c(),s=k()},m(t,i){rt(e,t,i),g(t,n,i),r&&r.m(t,i),g(t,s,i),o=!0},p(t,n){const o={};2&n&&(o.class=t[1]),8192&n&&(o.title=t[13].title),8&n&&(o.style=t[3]),28688&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o),t[2]?r?(r.p(t,n),4&n&&Q(r,1)):(r=ms(t),r.c(),Q(r,1),r.m(s.parentNode,s)):r&&(G(),tt(r,1,1,(()=>{r=null})),K())},i(t){o||(Q(e.$$.fragment,t),Q(r),o=!0)},o(t){tt(e.$$.fragment,t),tt(r),o=!1},d(t){it(e,t),t&&v(n),r&&r.d(t),t&&v(s)}}}function hs(t){let e;return{c(){e=y("... Initializing ...")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function gs(t){let e,n;return e=new t[7]({props:{$$slots:{default:[hs]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};4096&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function vs(t){let e,n;return e=new t[6]({props:{slot:"init",constrainWidth:!0,title:"Please wait while",$$slots:{default:[gs]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};4096&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function bs(t){let e;return{c(){e=y("... Loading...")},m(t,n){g(t,e,n)},d(t){t&&v(e)}}}function ws(t){let e,n;return e=new t[7]({props:{$$slots:{default:[bs]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};4096&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function ys(t){let e,n;return e=new t[6]({props:{slot:"load",constrainWidth:!0,title:"Please wait while",$$slots:{default:[ws]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};4096&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function xs(t){let e,n,s,o=t[15]+"";return{c(){e=y("... "),n=y(o),s=y(" ...")},m(t,o){g(t,e,o),g(t,n,o),g(t,s,o)},p(t,e){32768&e&&o!==(o=t[15]+"")&&C(n,o)},d(t){t&&v(e),t&&v(n),t&&v(s)}}}function ks(t){let e,n;return e=new t[7]({props:{$$slots:{default:[xs]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};36864&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function Ss(t){let e,n;return e=new t[6]({props:{slot:"error",constrainWidth:!0,title:"Oops!",$$slots:{default:[ks]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};36864&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function Es(t){let e,n;return e=new t[5]({props:{update:t[0],$$slots:{error:[Ss,({err:t,prop:e,refresh:n})=>({15:t,13:e,14:n}),({err:t,prop:e,refresh:n})=>(t?32768:0)|(e?8192:0)|(n?16384:0)],load:[ys,({prop:t,refresh:e})=>({13:t,14:e}),({prop:t,refresh:e})=>(t?8192:0)|(e?16384:0)],init:[vs,({prop:t,refresh:e})=>({13:t,14:e}),({prop:t,refresh:e})=>(t?8192:0)|(e?16384:0)],default:[$s,({prop:t,refresh:e})=>({13:t,14:e}),({prop:t,refresh:e})=>(t?8192:0)|(e?16384:0)]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,[n]){const s={};1&n&&(s.update=t[0]),61470&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function Ts(t,e,o){let{$$slots:r={},$$scope:i}=e;const{Listener:a}=n,{Dialog:c,Chip:l}=s;let u,{options:d={}}=e,{update:p=""}=e,{className:f="form"}=e,{msgTitle:m=""}=e,{style:$}=e;p=p||d.update;return t.$$set=t=>{"options"in t&&o(9,d=t.options),"update"in t&&o(0,p=t.update),"className"in t&&o(1,f=t.className),"msgTitle"in t&&o(2,m=t.msgTitle),"style"in t&&o(3,$=t.style),"$$scope"in t&&o(12,i=t.$$scope)},[p,f,m,$,u,a,c,l,t=>({detail:e})=>!e.value&&t(),d,r,function(t){u=t,o(4,u)},i]}const Ns=t=>({prop:2048&t,refresh:4096&t,showMessage:8192&t}),Is=t=>({prop:t[11],refresh:t[12],showMessage:t[13]});function Cs(t){let e,n,s;e=new t[6]({props:{description:t[4](t[11])}});const o=t[9].default,r=f(o,t,t[10],Is);return{c(){ot(e.$$.fragment),n=x(),r&&r.c()},m(t,o){rt(e,t,o),g(t,n,o),r&&r.m(t,o),s=!0},p(t,n){const i={};2064&n&&(i.description=t[4](t[11])),e.$set(i),r&&r.p&&(!s||15360&n)&&$(r,o,t,t[10],n,Ns,Is)},i(t){s||(Q(e.$$.fragment,t),Q(r,t),s=!0)},o(t){tt(e.$$.fragment,t),tt(r,t),s=!1},d(t){it(e,t),t&&v(n),r&&r.d(t)}}}function js(t){let e,n;return e=new t[7]({props:{update:t[0],className:t[1],style:t[2],msgTitle:t[3],$$slots:{default:[Cs,({prop:t,refresh:e,showMessage:n})=>({11:t,12:e,13:n}),({prop:t,refresh:e,showMessage:n})=>(t?2048:0)|(e?4096:0)|(n?8192:0)]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,n){const s={};1&n&&(s.update=t[0]),2&n&&(s.className=t[1]),4&n&&(s.style=t[2]),8&n&&(s.msgTitle=t[3]),15376&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function qs(t){let e,n;return e=new t[5]({props:{$$slots:{default:[js]},$$scope:{ctx:t}}}),{c(){ot(e.$$.fragment)},m(t,s){rt(e,t,s),n=!0},p(t,[n]){const s={};1055&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){it(e,t)}}}function _s(t,e,s){let o,{$$slots:r={},$$scope:i}=e;const{CheckLogin:a,Breadcrumb:c,FormDialog:l}=n;let{update:u}=e,{description:d=""}=e,{className:p="form mar-t-md"}=e,{style:f=""}=e,{msgTitle:m=""}=e;return t.$$set=t=>{"update"in t&&s(0,u=t.update),"description"in t&&s(8,d=t.description),"className"in t&&s(1,p=t.className),"style"in t&&s(2,f=t.style),"msgTitle"in t&&s(3,m=t.msgTitle),"$$scope"in t&&s(10,i=t.$$scope)},t.$$.update=()=>{256&t.$$.dirty&&s(4,o=t=>d||t.description)},[u,p,f,m,o,a,c,l,d,r,i]}e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(vt(),Promise.reject(t)):t));let Os=new Map;const Ls=t=>(...e)=>{const n=d(gt),s=n.tenant;"invalid"===n.status&&(Os=new Map,gt.set({tenant:s,status:""}));const o=[].concat(t.name,e).join("-");let r=Os.get(o);if(!r)try{r=t(...e),Os.set(o,r)}catch(t){throw t}return r};var Ms={getSchema:Ls((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`})))),getSchemas:Ls((async()=>(await axios.get("/api/schema")).data)),getSchemaByClass:Ls((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data)),getEvents:()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"})),getEvent:Ls((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`})))),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),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:t=>axios.post("/api/taskqueue",{id:t}).then((t=>t.data)).catch((t=>{throw"queue not found"})),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 Ds=window.location.pathname;t("default",{version:"0.2.21",Storage:dt,getLoggedIn:()=>$t,getBreadcrumbs:()=>ht,getCacheValidator:()=>gt,onLogout:vt,Listener:class extends lt{constructor(t){super(),ct(this,t,ns,es,l,{options:0,update:2})}},Request:Ms,FormDialog:class extends lt{constructor(t){var e;super(),document.getElementById("svelte-w8q1at-style")||((e=w("style")).id="svelte-w8q1at-style",e.textContent=".dialog > .chip{min-width:25em}.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}}",h(document.head,e)),ct(this,t,Ts,Es,l,{options:9,update:0,className:1,msgTitle:2,style:3})}},Page:class extends lt{constructor(t){super(),ct(this,t,_s,qs,l,{update:0,description:8,className:1,style:2,msgTitle:3})}},Form:class extends lt{constructor(t){super(),ct(this,t,$n,mn,l,{options:0,input:15,head:16},[-1,-1])}},FormUpload:class extends lt{constructor(t){super(),ct(this,t,Tn,En,l,{options:0,input:15,head:16},[-1,-1])}},LinkButton:class extends lt{constructor(t){super(),ct(this,t,In,Nn,l,{path:0,disabled:1})}},LinkIcon:class extends lt{constructor(t){var e;super(),document.getElementById("svelte-1jng2dw-style")||((e=w("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}",h(document.head,e)),ct(this,t,jn,Cn,l,{title:0,link:3,color:1})}},Breadcrumb:class extends lt{constructor(t){super(),ct(this,t,An,null,l,{description:0})}},CheckLogin:class extends lt{constructor(t){super(),ct(this,t,Dn,Mn,l,{})}},checkLogin:()=>{d($t)||window.singleSpaNavigate(`/?p=${Ds}`)},util:ee})}}}));
|
|
1
|
+
System.register(["axios","@enablerr-ui/auth","@enablerr-ui/layout","@enablerr-ui/form"],(function(t){"use strict";var e,n,o,i,s;return{setters:[function(t){e=t.default},function(t){n=t.user},function(t){o=t.getGridHelp,i=t.getAttractions},function(t){s=t.TextArea}],execute:function(){function a(){}function r(t,e){for(const n in e)t[n]=e[n];return t}function c(t){return t()}function l(){return Object.create(null)}function u(t){t.forEach(c)}function d(t){return"function"==typeof t}function f(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function p(t,...e){if(null==t)return a;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function m(t){let e;return p(t,(t=>e=t))(),e}function h(t,e,n,o){if(t){const i=g(t,e,n,o);return t[0](i)}}function g(t,e,n,o){return t[1]&&o?r(n.ctx.slice(),t[1](o(e))):n.ctx}function $(t,e,n,o,i,s,a){const r=function(t,e,n,o){if(t[2]&&o){const i=t[2](o(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|i[o];return t}return e.dirty|i}return e.dirty}(e,o,i,s);if(r){const i=g(e,n,o,a);t.p(i,r)}}function y(t,e){const n={};e=new Set(e);for(const o in t)e.has(o)||"$"===o[0]||(n[o]=t[o]);return n}function w(t,e,n){t.insertBefore(e,n||null)}function x(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function b(){return t="",document.createTextNode(t);var t}function k(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}let I;function j(t){I=t}function E(){if(!I)throw new Error("Function called outside component initialization");return I}function N(){const t=E();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const i=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,i)}))}}}const _=[],C=[],M=[],T=[],D=Promise.resolve();let F=!1;function L(t){M.push(t)}function P(t){T.push(t)}let A=!1;const B=new Set;function O(){if(!A){A=!0;do{for(let t=0;t<_.length;t+=1){const e=_[t];j(e),z(e.$$)}for(j(null),_.length=0;C.length;)C.pop()();for(let t=0;t<M.length;t+=1){const e=M[t];B.has(e)||(B.add(e),e())}M.length=0}while(_.length);for(;T.length;)T.pop()();F=!1,A=!1,B.clear()}}function z(t){if(null!==t.fragment){t.update(),u(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const H=new Set;let q;function V(){q={r:0,c:[],p:q}}function R(){q.r||u(q.c),q=q.p}function G(t,e){t&&t.i&&(H.delete(t),t.i(e))}function J(t,e,n,o){if(t&&t.o){if(H.has(t))return;H.add(t),q&&q.c.push((()=>{H.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function U(t,e){const n=e.token={};function o(t,o,i,s){if(e.token!==n)return;e.resolved=s;let a=e.ctx;void 0!==i&&(a=a.slice(),a[i]=s);const r=t&&(e.current=t)(a);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(V(),J(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),R())})):e.block.d(1),r.c(),G(r,1),r.m(e.mount(),e.anchor),c=!0),e.block=r,e.blocks&&(e.blocks[o]=r),c&&O()}if((i=t)&&"object"==typeof i&&"function"==typeof i.then){const n=E();if(t.then((t=>{j(n),o(e.then,1,e.value,t),j(null)}),(t=>{if(j(n),o(e.catch,2,e.error,t),j(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 i}function K(t,e,n){const o=e.slice(),{resolved:i}=t;t.current===t.then&&(o[t.value]=i),t.current===t.catch&&(o[t.error]=i),t.block.p(o,n)}function W(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function Z(t){t&&t.c()}function Q(t,e,n,o){const{fragment:i,on_mount:s,on_destroy:a,after_update:r}=t.$$;i&&i.m(e,n),o||L((()=>{const e=s.map(c).filter(d);a?a.push(...e):u(e),t.$$.on_mount=[]})),r.forEach(L)}function X(t,e){const n=t.$$;null!==n.fragment&&(u(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Y(t,e){-1===t.$$.dirty[0]&&(_.push(t),F||(F=!0,D.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function tt(t,e,n,o,i,s,r=[-1]){const c=I;j(t);const d=t.$$={fragment:null,ctx:null,props:s,update:a,not_equal:i,bound:l(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:e.context||[]),callbacks:l(),dirty:r,skip_bound:!1};let f=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&i(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),f&&Y(t,e)),n})):[],d.update(),f=!0,u(d.before_update),d.fragment=!!o&&o(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(x)}else d.fragment&&d.fragment.c();e.intro&&G(t.$$.fragment),Q(t,e.target,e.anchor,e.customElement),O()}j(c)}class et{$destroy(){X(this,1),this.$destroy=a}$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)}}function nt(t){let e,n,o,i,s;const a=t[5].default,r=h(a,t,t[4],null);return{c(){e=v("span"),r&&r.c(),S(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),S(e,"title",t[0])},m(n,a){w(n,e,a),r&&r.m(e,null),o=!0,i||(s=k(e,"click",t[2]),i=!0)},p(t,[i]){r&&r.p&&(!o||16&i)&&$(r,a,t,t[4],i,null,null),(!o||2&i&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&S(e,"class",n),(!o||1&i)&&S(e,"title",t[0])},i(t){o||(G(r,t),o=!0)},o(t){J(r,t),o=!1},d(t){t&&x(e),r&&r.d(t),i=!1,s()}}}function ot(t,e,n){let{$$slots:o={},$$scope:i}=e,{title:s}=e,{link:a="/"}=e,{color:r}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"link"in t&&n(3,a=t.link),"color"in t&&n(1,r=t.color),"$$scope"in t&&n(4,i=t.$$scope)},[s,r,()=>window.singleSpaNavigate(a),a,i,o]}const{loggedIn:it}=n,st=async(t,e)=>{const n={};return t&&(n.event={id:t}),e&&(n.task={id:e}),(await axios.post("/api/read/commChat",n)).data.filter((e=>t?e.event&&e.event.id===t:!e.event)).filter((t=>e?t.task&&t.task.id===e:!t.task))},at=(t,e)=>{if(e.id.c){for(let n in t)if(t[n].id.c[0]==e.id.c[0]&&t[n].id.c[1]==e.id.c[1])return n}else for(let n in t)if(t[n].id==e.id)return n;return-1},{loggedIn:rt}=n,ct=async(t,e)=>{const n={};return t&&(n.event={id:t}),e&&(n.task={id:e}),(await axios.post("/api/read/commFeedback",n)).data.filter((e=>t?e.event&&e.event.id===t:!e.event)).filter((t=>e?t.task&&t.task.id===e:!t.task))};let lt;lt=[{id:"0001",email:"andrea.zirn@fhnw.ch",firstName:"Andrea",lastName:"Zirn",jobDescription:"Softwaredeveloper, Design Guru",status:"busy"},{id:"0002",email:"cloe.huesser@fhnw.ch",firstName:"Cloe",lastName:"Hüsser",jobDescription:"Softwaredeveloper, Javascript Hacker",status:"online"},{id:"0003",email:"simone.beck@fhnw.ch",firstName:"Simone",lastName:"Beck",jobDescription:"HR Verantwortliche",status:"offline"},{id:"0004",email:"shenia.scherer@fhnw.ch",firstName:"Shenia",lastName:"Scherer",jobDescription:"IIT Praktikantin",status:"offline"},{id:"0005",email:"puijanjenny.tran@students.fhnw.ch",firstName:"Jenny",lastName:"Tran",jobDescription:"IP-6 Studentin",status:"offline"},{id:"0006",email:"sinead.ganz@students.fhnw.ch",firstName:"Sinead",lastName:"Ganz",jobDescription:"IP-6 Studentin",status:"offline"}];let ut=[{id:"001",userId:"001",type:"info",title:"Neuer Mitarbeiter",description:"Es wurde eine neue Mitarbeiterin Simone Beck in der Firma erfasst.",date:"01.01.2022",eventId:"609b5bf30071894811577c06",read:!1},{id:"001",userId:"002",type:"info",title:"Neuer Mitarbeiter",description:"Es wurde eine neue Mitarbeiterin Simone Beck in der Firma erfasst.",date:"01.01.2022",eventId:"609b5bf30071894811577c06",read:!1}];let dt=[{id:"0000",userId:"0000",moduleList:[{moduleId:1111,position:0},{moduleId:9999,position:1}]},{id:"0001",userId:"0001",moduleList:[{moduleId:1111,position:0},{moduleId:2222,position:1},{moduleId:3333,position:2},{moduleId:4444,position:3}]}];let ft=[{id:"001",role:"Kundenmanager",user:"002"},{id:"002",role:"HR",user:"003"},{id:"003",role:"Projektleiter",user:"001"},{id:"004",role:"Software Developer",user:"001"},{id:"005",role:"Software Developer",user:"002"}];let pt=[{id:1111,name:"TaskModule",text:"Alle Tasks",status:!1,6:o.item({x:0,y:0,w:2,h:5,fixed:!0}),5:o.item({x:0,y:0,w:2,h:5,fixed:!0}),4:o.item({x:0,y:0,w:2,h:5,fixed:!0}),3:o.item({x:0,y:0,w:2,h:5,fixed:!0}),2:o.item({x:0,y:0,w:1,h:5,fixed:!0}),1:o.item({x:0,y:0,w:1,h:5,fixed:!0})},{id:3333,name:"Chat Modul",text:"Chat",status:!1,6:o.item({x:2,y:0,w:1,h:5,fixed:!0}),5:o.item({x:2,y:0,w:1,h:5,fixed:!0}),4:o.item({x:2,y:0,w:1,h:5,fixed:!0}),3:o.item({x:2,y:0,w:1,h:5,fixed:!0}),2:o.item({x:2,y:0,w:1,h:5,fixed:!0}),1:o.item({x:2,y:0,w:1,h:5,fixed:!0})},{id:4444,name:"Feedback Modul",text:"Feedback",status:!1,6:o.item({x:3,y:0,w:1,h:5,fixed:!0}),5:o.item({x:3,y:0,w:1,h:5,fixed:!0}),4:o.item({x:3,y:0,w:1,h:5,fixed:!0}),3:o.item({x:3,y:0,w:1,h:5,fixed:!0}),2:o.item({x:3,y:0,w:1,h:5,fixed:!0}),1:o.item({x:3,y:0,w:1,h:5,fixed:!0})},{id:9999,name:"Neues Modul",text:"+",status:!1,6:o.item({x:3,y:3,w:1,h:2}),5:o.item({x:3,y:3,w:1,h:2}),4:o.item({x:3,y:3,w:1,h:2}),3:o.item({x:3,y:3,w:1,h:2}),2:o.item({x:3,y:3,w:1,h:2}),1:o.item({x:3,y:3,w:1,h:2})}];const{cacheValidator:mt,onLogout:ht}=n;e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(ht(),Promise.reject(t)):t));let gt=new Map;const $t=t=>(...e)=>{const n=m(mt),o=n.tenant;"invalid"===n.status&&(gt=new Map,mt.set({tenant:o,status:""}));const i=[].concat(t.name,e).join("-");let s=gt.get(i);if(!s)try{s=t(...e),gt.set(i,s)}catch(t){throw t}return s};var yt={getSchema:$t((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`})))),getSchemas:$t((async()=>(await axios.get("/api/schema")).data)),getSchemaByClass:$t((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data)),getEvents:()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"})),getEvent:$t((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`})))),getTask:(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),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:()=>axios.post("/api/taskqueue",{id:!1}).then((t=>t.data)).catch((t=>{throw"queue not found"})),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,getUserSettings:async()=>(await axios.get("/api/user")).data,saveUserSettings:async t=>(await axios.post("/api/user",t)).data,saveDefaultSettings:async(t,e)=>{let n={schema:"http://json-schema.org/draft-04/schema#",id:e,email:t,firstName:"",lastName:"",jobDescription:"",role:[],setting:{showJobDescription:!0,dashboardLayout:[{id:"0000",activated:!0,days:["Mo","Tu","We","Th","Fr","Sa","Su"],moduleList:[{moduleId:"1111",position:"0"},{moduleId:"9999",position:"1"}]}],notificationActivated:!0,showNotifications:!0,notificationToMail:!1,typesOfNotification:[]}};return(await axios.post("/api/user",n)).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"),setTenant:async t=>(await axios.post("/api/auth/tenant",{id:t})).data,getChat:st,saveChat:async(t,e,n)=>{const o={};t&&(o.event={id:t}),e&&(o.task={id:e});let i=await st(t,e);i[0]||(i=[...i,{...o}]);const{user:s}=m(it);let a=at(i[0].messages,n);return i[0].messages&&a>=0?i[0].messages[a]=n:(n.sender=s,i[0].messages=(i[0].messages||[]).concat(n)),console.log("chat saved",i[0]),(await axios.post("/api/commChat",i[0])).data.id},getFeedback:ct,saveFeedback:async(t,e,n,o,i)=>{const s={};t&&(s.event={id:t}),e&&(s.task={id:e});let a=await ct(t,e);if(a[0]&&null!=i){let t=a.filter((t=>t._id===i));t={...t,...o};const{user:e}=m(rt);return n.sender=e,t[0].messages=(t[0].messages||[]).concat(n),console.log("has id",t[0].messages),(await axios.post("/api/commFeedback",t[0])).data.id}{a={...s},a={...a,...o};const{user:t}=m(rt);return n.sender=t,a.messages=(a.messages||[]).concat(n),console.log("new feedback",a),(await axios.post("/api/commFeedback",a)).data.id}},getUser:t=>lt.filter((e=>e.email==t)),getSettings:t=>dt.filter((e=>e.userId===t))[0],getNotifications:t=>ut.filter((e=>e.userId===t)),getRoles:t=>ft.filter((e=>e.user===t)),getModules:t=>pt.filter((e=>t.includes(e.id))),getAllModules:()=>pt};const wt=Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value||".",xt=t=>"function"==typeof t,vt=t=>t&&t.toString,bt=(t,...e)=>e.includes(t),kt=t=>bt(t,void 0,null),St=t=>!kt(t),It=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},jt=t=>(e,...n)=>It(It("",t.toString),e,...n),Et=(t,e=2,n=0,o=t.toString(),i=n.toString())=>i.repeat(e-o.length)+o,Nt=(t,e=window)=>({listen(n,o){e[`${n}EventListener`](t,o)},start(t){this.listen("add",t)},stop(t){this.listen("remove",t)}}),_t=(...t)=>!t.map((({value:t,check:e,text:n})=>e(t)||Tt(console.error,n))).every(Boolean),Ct=t=>(e,n)=>(Promise.resolve(n).then(e),t),Mt=Ct(!0),Tt=Ct(!1);t("util",Object.freeze({__proto__:null,decimalSeparator:wt,isFunction:xt,isStringable:vt,isObjEmpty:(t={})=>!Object.keys(t).length,hasValue:bt,isNullish:kt,isNotNullish:St,bestValue:(t,...e)=>e.concat(t).find(St),tryCatch:It,ensureStrValue:jt,padLeft:(...t)=>jt(t[0])(Et,...t),showupElement:(t="",e=0,n=document.getElementById(t))=>n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e)),getListener:Nt,isMissing:_t,go:Mt,stop:Tt}));const Dt="single-spa:routing-event",Ft=Nt(Dt);function Lt(t,{modulePath:e,update:n}){if(!1===n)return;if(_t({value:n,check:xt,text:"<update> should be a function (dataListener)"},{value:e,check:vt,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString()||"/",i=e=>{const i=e.currentTarget.location.pathname,[,s,...a]=i.split("/");o===(s||"/")&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...a)}}))};return Ft.start(i),{destroy:()=>Ft.stop(i)}}const Pt=()=>window.dispatchEvent(new CustomEvent(Dt)),At=t=>({prop:4&t,tenant:8&t,user:8&t}),Bt=t=>({prop:t[11],refresh:Pt,tenant:t[3].tenant,user:t[3].user}),Ot=t=>({err:4&t,prop:4&t,tenant:8&t,user:8&t}),zt=t=>({err:t[12],prop:t[11],refresh:Pt,tenant:t[3].tenant,user:t[3].user}),Ht=t=>({prop:4&t,tenant:8&t,user:8&t}),qt=t=>({prop:t[11],refresh:Pt,tenant:t[3].tenant,user:t[3].user}),Vt=t=>({prop:4&t,tenant:8&t,user:8&t}),Rt=t=>({prop:t[11],refresh:Pt,tenant:t[3].tenant,user:t[3].user});function Gt(t){let e;const n=t[8].init,o=h(n,t,t[7],Bt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,i){o&&o.p&&(!e||140&i)&&$(o,n,t,t[7],i,At,Bt)},i(t){e||(G(o,t),e=!0)},o(t){J(o,t),e=!1},d(t){o&&o.d(t)}}}function Jt(t){let e,n,o,i={ctx:t,current:null,token:null,hasCatch:!0,pending:Wt,then:Kt,catch:Ut,value:11,error:12,blocks:[,,,]};return U(n=t[2],i),{c(){e=b(),i.block.c()},m(t,n){w(t,e,n),i.block.m(t,i.anchor=n),i.mount=()=>e.parentNode,i.anchor=e,o=!0},p(e,o){t=e,i.ctx=t,4&o&&n!==(n=t[2])&&U(n,i)||K(i,t,o)},i(t){o||(G(i.block),o=!0)},o(t){for(let t=0;t<3;t+=1){J(i.blocks[t])}o=!1},d(t){t&&x(e),i.block.d(t),i.token=null,i=null}}}function Ut(t){let e;const n=t[8].error,o=h(n,t,t[7],zt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,i){o&&o.p&&(!e||140&i)&&$(o,n,t,t[7],i,Ot,zt)},i(t){e||(G(o,t),e=!0)},o(t){J(o,t),e=!1},d(t){o&&o.d(t)}}}function Kt(t){let e;const n=t[8].default,o=h(n,t,t[7],qt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,i){o&&o.p&&(!e||140&i)&&$(o,n,t,t[7],i,Ht,qt)},i(t){e||(G(o,t),e=!0)},o(t){J(o,t),e=!1},d(t){o&&o.d(t)}}}function Wt(t){let e,n,o,i={ctx:t,current:null,token:null,hasCatch:!1,pending:Xt,then:Qt,catch:Zt,value:10,blocks:[,,,]};return U(n=t[5](t[1]),i),{c(){e=b(),i.block.c()},m(t,n){w(t,e,n),i.block.m(t,i.anchor=n),i.mount=()=>e.parentNode,i.anchor=e,o=!0},p(e,o){t=e,i.ctx=t,2&o&&n!==(n=t[5](t[1]))&&U(n,i)||K(i,t,o)},i(t){o||(G(i.block),o=!0)},o(t){for(let t=0;t<3;t+=1){J(i.blocks[t])}o=!1},d(t){t&&x(e),i.block.d(t),i.token=null,i=null}}}function Zt(t){return{c:a,m:a,p:a,i:a,o:a,d:a}}function Qt(t){let e;const n=t[8].load,o=h(n,t,t[7],Rt);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,i){o&&o.p&&(!e||140&i)&&$(o,n,t,t[7],i,Vt,Rt)},i(t){e||(G(o,t),e=!0)},o(t){J(o,t),e=!1},d(t){o&&o.d(t)}}}function Xt(t){return{c:a,m:a,p:a,i:a,o:a,d:a}}function Yt(t){let e,n,o,i,s,r,c;const l=[Jt,Gt],f=[];function p(t,e){return t[2]?0:1}return n=p(t),o=f[n]=l[n](t),{c(){e=v("section"),o.c(),S(e,"class","data")},m(o,l){var u;w(o,e,l),f[n].m(e,null),s=!0,r||(c=[(u=i=Lt.call(null,e,t[0]),u&&d(u.destroy)?u.destroy:a),k(e,"data",t[9])],r=!0)},p(t,[s]){let a=n;n=p(t),n===a?f[n].p(t,s):(V(),J(f[a],1,1,(()=>{f[a]=null})),R(),o=f[n],o?o.p(t,s):(o=f[n]=l[n](t),o.c()),G(o,1),o.m(e,null)),i&&d(i.update)&&1&s&&i.update.call(null,t[0])},i(t){s||(G(o),s=!0)},o(t){J(o),s=!1},d(t){t&&x(e),f[n].d(),r=!1,u(c)}}}function te(t,e,o){let i,{$$slots:s={},$$scope:a}=e;const{loggedIn:r}=n;var c,l;c=r,l=t=>o(3,i=t),t.$$.on_destroy.push(p(c,l));let u,{options:d}=e,{update:f=!1}=e,{loadingDelay:m=250}=e;f&&(d={update:f,modulePath:window.location.pathname.split("/")[1]||"/"});return t.$$set=t=>{"options"in t&&o(0,d=t.options),"update"in t&&o(6,f=t.update),"loadingDelay"in t&&o(1,m=t.loadingDelay),"$$scope"in t&&o(7,a=t.$$scope)},[d,m,u,i,r,t=>new Promise((e=>setTimeout(e,t))),f,a,s,({detail:t})=>o(2,u=t.data)]}function ee(t){let e,n;const o=[{class:"full-width"},{style:t[0]},{inputClass:t[1]||"form"},{multiline:!0},{id:t[2]},{value:t[3]},{rows:t[4]},t[7]];let i={};for(let t=0;t<o.length;t+=1)i=r(i,o[t]);return e=new t[5]({props:i}),e.$on("change",t[6]),{c(){Z(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,[n]){const i=159&n?function(t,e){const n={},o={},i={$$scope:1};let s=t.length;for(;s--;){const a=t[s],r=e[s];if(r){for(const t in a)t in r||(o[t]=1);for(const t in r)i[t]||(n[t]=r[t],i[t]=1);t[s]=r}else for(const t in a)i[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(o,[o[0],1&n&&{style:t[0]},2&n&&{inputClass:t[1]||"form"},o[3],4&n&&{id:t[2]},8&n&&{value:t[3]},16&n&&{rows:t[4]},128&n&&(s=t[7],"object"==typeof s&&null!==s?s:{})]):{};var s;e.$set(i)},i(t){n||(G(e.$$.fragment,t),n=!0)},o(t){J(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function ne(t,e,n){const o=["noForm","id","value","style","rows"];let s=y(e,o);const a=N(),{TextField:c}=i;let{noForm:l=""}=e,{id:u}=e,{value:d}=e,{style:f=""}=e,{rows:p=3}=e;f+=" padding-bottom: .5em;";const m=5*(p>1),h=()=>{const t=document.getElementById(u);if(!t)return;const{style:e,scrollHeight:n}=t;n&&(e.height=`${n+m}px`)};return t.$$set=t=>{e=r(r({},e),function(t){const e={};for(const n in t)"$"!==n[0]&&(e[n]=t[n]);return e}(t)),n(7,s=y(e,o)),"noForm"in t&&n(1,l=t.noForm),"id"in t&&n(2,u=t.id),"value"in t&&n(3,d=t.value),"style"in t&&n(0,f=t.style),"rows"in t&&n(4,p=t.rows)},t.$$.update=()=>{8&t.$$.dirty&&d&&setTimeout(h)},[f,l,u,d,p,c,({detail:{value:t}})=>a("blur",{value:t}),s]}function oe(t){let e,n;return e=new s({props:{style:"min-width: 25em; overflow-y: hidden; resize: none;",id:t[0],value:t[1]}}),{c(){Z(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,[n]){const o={};1&n&&(o.id=t[0]),2&n&&(o.value=t[1]),e.$set(o)},i(t){n||(G(e.$$.fragment,t),n=!0)},o(t){J(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function ie(t,e,n){let{id:o}=e,{value:i}=e;return t.$$set=t=>{"id"in t&&n(0,o=t.id),"value"in t&&n(1,i=t.value)},[o,i]}class se extends et{constructor(t){super(),tt(this,t,ie,oe,f,{id:0,value:1})}}function ae(t){let e,n,o;function i(e){t[7](e)}let s={id:t[5]};return void 0!==t[2]&&(s.value=t[2]),e=new se({props:s}),C.push((()=>W(e,"value",i))),{c(){Z(e.$$.fragment)},m(t,n){Q(e,t,n),o=!0},p(t,o){const i={};!n&&4&o&&(n=!0,i.value=t[2],P((()=>n=!1))),e.$set(i)},i(t){o||(G(e.$$.fragment,t),o=!0)},o(t){J(e.$$.fragment,t),o=!1},d(t){X(e,t)}}}function re(t){let e,n;return e=new t[4]({props:{title:t[0],closeCallback:t[10],$$slots:{default:[ae]},$$scope:{ctx:t}}}),{c(){Z(e.$$.fragment)},m(t,o){Q(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.title=t[0]),1024&n&&(o.closeCallback=t[10]),2052&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(G(e.$$.fragment,t),n=!0)},o(t){J(e.$$.fragment,t),n=!1},d(t){X(e,t)}}}function ce(t){let e,n,o;function i(e){t[8](e)}let s={$$slots:{default:[re,({closeCallback:t})=>({10:t}),({closeCallback:t})=>t?1024:0]},$$scope:{ctx:t}};return void 0!==t[1]&&(s.open=t[1]),e=new t[3]({props:s}),C.push((()=>W(e,"open",i))),e.$on("change",t[9]),{c(){Z(e.$$.fragment)},m(t,n){Q(e,t,n),o=!0},p(t,[o]){const i={};3077&o&&(i.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,i.open=t[1],P((()=>n=!1))),e.$set(i)},i(t){o||(G(e.$$.fragment,t),o=!0)},o(t){J(e.$$.fragment,t),o=!1},d(t){X(e,t)}}}function le(t,e,n){const{Modal:o,Dialog:s}=i;let a,{title:r}=e,{showMessage:c}=e,l="";return c=t=>{n(2,l=[].concat(t).join("\n")),n(1,a=!0)},t.$$set=t=>{"title"in t&&n(0,r=t.title),"showMessage"in t&&n(6,c=t.showMessage)},[r,a,l,o,s,"modalDialog",c,function(t){l=t,n(2,l)},function(t){a=t,n(1,a)},function(e){!function(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}(t,e)}]}t("version","0.2.22");const ue=window.sessionStorage;ue.clear();t("Storage",{getItem:t=>ue.getItem(t),setItem:(t,e)=>ue.setItem(t,e)}),t("LinkIcon",class extends et{constructor(t){var e,n,o;super(),document.getElementById("svelte-1jng2dw-style")||((o=v("style")).id="svelte-1jng2dw-style",o.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}",e=document.head,n=o,e.appendChild(n)),tt(this,t,ot,nt,f,{title:0,link:3,color:1})}}),t("Page",class extends et{constructor(t){super(),tt(this,t,te,Yt,f,{options:0,update:6,loadingDelay:1})}}),t("Request",yt),t("TextArea",class extends et{constructor(t){super(),tt(this,t,ne,ee,f,{noForm:1,id:2,value:3,style:0,rows:4})}}),t("ModalDialog",class extends et{constructor(t){super(),tt(this,t,le,ce,f,{title:0,showMessage:6})}})}}}));
|