neutauri/web_src/build/bundle.js

3 lines
6.4 KiB
JavaScript

var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function s(t){t.forEach(e)}function o(t){return"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function r(t,e){t.appendChild(e)}function c(t,e,n){t.insertBefore(e,n||null)}function i(t){t.parentNode.removeChild(t)}function u(t){return document.createElement(t)}function a(t){return document.createTextNode(t)}function f(){return a(" ")}function d(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function v(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function p(t,e){t.value=null==e?"":e}function x(t,e){for(let n=0;n<t.options.length;n+=1){const s=t.options[n];if(s.__value===e)return void(s.selected=!0)}t.selectedIndex=-1}let $;function g(t){$=t}const m=[],b=[],_=[],y=[],k=Promise.resolve();let E=!1;function w(t){_.push(t)}const C=new Set;let A=0;function L(){const t=$;do{for(;A<m.length;){const t=m[A];A++,g(t),M(t.$$)}for(g(null),m.length=0,A=0;b.length;)b.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];C.has(e)||(C.add(e),e())}_.length=0}while(m.length);for(;y.length;)y.pop()();E=!1,C.clear(),g(t)}function M(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(w)}}const N=new Set;function O(t,e){-1===t.$$.dirty[0]&&(m.push(t),E||(E=!0,k.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function j(l,r,c,u,a,f,d,v=[-1]){const h=$;g(l);const p=l.$$={fragment:null,ctx:null,props:f,update:t,not_equal:a,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(r.context||(h?h.$$.context:[])),callbacks:n(),dirty:v,skip_bound:!1,root:r.target||h.$$.root};d&&d(p.root);let x=!1;if(p.ctx=c?c(l,r.props||{},((t,e,...n)=>{const s=n.length?n[0]:e;return p.ctx&&a(p.ctx[t],p.ctx[t]=s)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](s),x&&O(l,t)),e})):[],p.update(),x=!0,s(p.before_update),p.fragment=!!u&&u(p.ctx),r.target){if(r.hydrate){const t=function(t){return Array.from(t.childNodes)}(r.target);p.fragment&&p.fragment.l(t),t.forEach(i)}else p.fragment&&p.fragment.c();r.intro&&((m=l.$$.fragment)&&m.i&&(N.delete(m),m.i(b))),function(t,n,l,r){const{fragment:c,on_mount:i,on_destroy:u,after_update:a}=t.$$;c&&c.m(n,l),r||w((()=>{const n=i.map(e).filter(o);u?u.push(...n):s(n),t.$$.on_mount=[]})),a.forEach(w)}(l,r.target,r.anchor,r.customElement),L()}var m,b;g(h)}function S(t,e,n){const s=t.slice();return s[15]=e[n],s[3]=n,s}function T(t){let e,n,s,o,l,f=t[15].last+"",d=t[15].first+"";return{c(){e=u("option"),n=a(f),s=a(", "),o=a(d),e.__value=l=t[3],e.value=e.__value,v(e,"class","svelte-vxnnxe")},m(t,l){c(t,e,l),r(e,n),r(e,s),r(e,o)},p(t,e){2&e&&f!==(f=t[15].last+"")&&h(n,f),2&e&&d!==(d=t[15].first+"")&&h(o,d)},d(t){t&&i(e)}}}function q(e){let n,o,l,h,$,g,m,b,_,y,k,E,C,A,L,M,N,O,j,q,z,B,D,H,I,P,R,W,F,G,J,K,Q=e[1],U=[];for(let t=0;t<Q.length;t+=1)U[t]=T(S(e,Q,t));return{c(){n=u("div"),o=u("h1"),o.textContent="Neutauri Demo",l=f(),h=u("h3"),h.textContent="svelte example form https://eugenkiss.github.io/7guis/tasks#crud",$=f(),g=u("div"),m=u("div"),b=u("input"),_=f(),y=u("select");for(let t=0;t<U.length;t+=1)U[t].c();k=f(),E=u("div"),C=u("label"),A=u("input"),L=f(),M=u("label"),N=u("input"),O=f(),j=u("div"),q=u("button"),z=a("create"),D=f(),H=u("button"),I=a("update"),R=f(),W=u("button"),F=a("delete"),v(o,"class","svelte-vxnnxe"),v(h,"class","svelte-vxnnxe"),v(b,"placeholder","filter prefix"),v(b,"class","svelte-vxnnxe"),v(y,"size",5),v(y,"class","svelte-vxnnxe"),void 0===e[3]&&w((()=>e[11].call(y))),v(m,"class","left svelte-vxnnxe"),v(A,"placeholder","first"),v(A,"class","svelte-vxnnxe"),v(C,"class","svelte-vxnnxe"),v(N,"placeholder","last"),v(N,"class","svelte-vxnnxe"),v(M,"class","svelte-vxnnxe"),q.disabled=B=!e[4]||!e[5],v(q,"class","svelte-vxnnxe"),H.disabled=P=!e[4]||!e[5]||!e[2],v(H,"class","svelte-vxnnxe"),W.disabled=G=!e[2],v(W,"class","svelte-vxnnxe"),v(j,"class","buttons svelte-vxnnxe"),v(E,"class","right svelte-vxnnxe"),v(g,"class","crud svelte-vxnnxe"),v(n,"class","center svelte-vxnnxe")},m(t,s){c(t,n,s),r(n,o),r(n,l),r(n,h),r(n,$),r(n,g),r(g,m),r(m,b),p(b,e[0]),r(m,_),r(m,y);for(let t=0;t<U.length;t+=1)U[t].m(y,null);x(y,e[3]),r(g,k),r(g,E),r(E,C),r(C,A),p(A,e[4]),r(E,L),r(E,M),r(M,N),p(N,e[5]),r(E,O),r(E,j),r(j,q),r(q,z),r(j,D),r(j,H),r(H,I),r(j,R),r(j,W),r(W,F),J||(K=[d(b,"input",e[10]),d(y,"change",e[11]),d(A,"input",e[12]),d(N,"input",e[13]),d(q,"click",e[6]),d(H,"click",e[7]),d(W,"click",e[8])],J=!0)},p(t,[e]){if(1&e&&b.value!==t[0]&&p(b,t[0]),2&e){let n;for(Q=t[1],n=0;n<Q.length;n+=1){const s=S(t,Q,n);U[n]?U[n].p(s,e):(U[n]=T(s),U[n].c(),U[n].m(y,null))}for(;n<U.length;n+=1)U[n].d(1);U.length=Q.length}8&e&&x(y,t[3]),16&e&&A.value!==t[4]&&p(A,t[4]),32&e&&N.value!==t[5]&&p(N,t[5]),48&e&&B!==(B=!t[4]||!t[5])&&(q.disabled=B),52&e&&P!==(P=!t[4]||!t[5]||!t[2])&&(H.disabled=P),4&e&&G!==(G=!t[2])&&(W.disabled=G)},i:t,o:t,d(t){t&&i(n),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(U,t),J=!1,s(K)}}}function z(t,e,n){let s,o,l=[{first:"Hans",last:"Emil"},{first:"Max",last:"Mustermann"},{first:"Roman",last:"Tisch"}],r="",c="",i="",u=0;return t.$$.update=()=>{var e;513&t.$$.dirty&&n(1,s=r?l.filter((t=>`${t.last}, ${t.first}`.toLowerCase().startsWith(r.toLowerCase()))):l),10&t.$$.dirty&&n(2,o=s[u]),4&t.$$.dirty&&(n(4,c=(e=o)?e.first:""),n(5,i=e?e.last:""))},[r,s,o,u,c,i,function(){n(9,l=l.concat({first:c,last:i})),n(3,u=l.length-1),n(4,c=n(5,i=""))},function(){n(2,o.first=c,o),n(2,o.last=i,o),n(9,l)},function(){const t=l.indexOf(o);n(9,l=[...l.slice(0,t),...l.slice(t+1)]),n(4,c=n(5,i="")),n(3,u=Math.min(u,s.length-2))},l,function(){r=this.value,n(0,r)},function(){u=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(3,u)},function(){c=this.value,n(4,c)},function(){i=this.value,n(5,i)}]}return new class extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$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)}}{constructor(t){super(),j(this,t,z,q,l,{})}}({target:document.body})}();
//# sourceMappingURL=bundle.js.map