CodeLiturgy.Dashboard/CodeLiturgy.Views/wwwroot/static/envs/envs.js

5 lines
19 KiB
JavaScript
Raw Normal View History

2022-11-26 01:35:47 +03:00
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const r of l)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function i(l){const r={};return l.integrity&&(r.integrity=l.integrity),l.referrerpolicy&&(r.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?r.credentials="include":l.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(l){if(l.ep)return;l.ep=!0;const r=i(l);fetch(l.href,r)}})();function N(){}function Ce(t){return t()}function fe(){return Object.create(null)}function O(t){t.forEach(Ce)}function Ee(t){return typeof t=="function"}function U(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function De(t){return Object.keys(t).length===0}function a(t,e){t.appendChild(e)}function w(t,e,i){t.insertBefore(e,i||null)}function E(t){t.parentNode&&t.parentNode.removeChild(t)}function we(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function d(t){return document.createElement(t)}function M(t){return document.createTextNode(t)}function D(){return M(" ")}function le(){return M("")}function L(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function _(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}function Te(t){return Array.from(t.childNodes)}function F(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function R(t,e){t.value=e==null?"":e}function P(t,e,i,n){i===null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function de(t,e){for(let i=0;i<t.options.length;i+=1){const n=t.options[i];if(n.__value===e){n.selected=!0;return}}t.selectedIndex=-1}function xe(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}function Le(t,e,{bubbles:i=!1,cancelable:n=!1}={}){const l=document.createEvent("CustomEvent");return l.initCustomEvent(t,i,n,e),l}let V;function Q(t){V=t}function Me(){if(!V)throw new Error("Function called outside component initialization");return V}function Se(){const t=Me();return(e,i,{cancelable:n=!1}={})=>{const l=t.$$.callbacks[e];if(l){const r=Le(e,i,{cancelable:n});return l.slice().forEach(s=>{s.call(t,r)}),!r.defaultPrevented}return!0}}const J=[],me=[],te=[],_e=[],Ie=Promise.resolve();let oe=!1;function Pe(){oe||(oe=!0,Ie.then(Ne))}function ie(t){te.push(t)}const re=new Set;let ee=0;function Ne(){const t=V;do{for(;ee<J.length;){const e=J[ee];ee++,Q(e),Oe(e.$$)}for(Q(null),J.length=0,ee=0;me.length;)me.pop()();for(let e=0;e<te.length;e+=1){const i=te[e];re.has(i)||(re.add(i),i())}te.length=0}while(J.length);for(;_e.length;)_e.pop()();oe=!1,re.clear(),Q(t)}function Oe(t){if(t.fragment!==null){t.update(),O(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ie)}}const ne=new Set;let q;function j(){q={r:0,c:[],p:q}}function B(){q.r||O(q.c),q=q.p}function S(t,e){t&&t.i&&(ne.delete(t),t.i(e))}function T(t,e,i,n){if(t&&t.o){if(ne.has(t))return;ne.add(t),q.c.push(()=>{ne.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}function W(t){t&&t.c()}function K(t,e,i,n){const{fragment:l,after_update:r}=t.$$;l&&l.m(e,i),n||ie(()=>{const s=t.$$.on_mount.map(Ce).filter(Ee);t.$$.on_destroy?t.$$.on_destroy.push(...s):O(s),t.$$.on_mount=[]}),r.forEach(ie)}function G(t,e){const i=t.$$;i.fragment!==null&&(O(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function He(t,e){t.$$.dirty[0]===-1&&(J.push(t),Pe(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function X(t,e,i,n,l,r,s,c=[-1]){const o=V;Q(t);const u=t.$$={fragment:null,ctx:[],props:r,update:N,not_equal:l,bound:fe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(o?o.$$.context:[])),callbacks:fe(),dirty:c,skip_bound:!1,root:e.target||o.$$.root};s&&s(u.root);let m=!1;if(u.ctx=i?i(t,e.props||{},(f,v,...h)=>{const p
`,n=d("option"),n.textContent=`Staging
`,l=d("option"),l.textContent="Production",i.__value="Development",i.value=i.__value,n.__value="Staging",n.value=n.__value,l.__value="Production",l.value=l.__value,_(e,"class","site-input svelte-k7xnb2"),t[0].siteType===void 0&&ie(()=>t[10].call(e))},m(c,o){w(c,e,o),a(e,i),a(e,n),a(e,l),de(e,t[0].siteType),r||(s=[L(e,"change",t[10]),L(e,"change",t[11])],r=!0)},p(c,o){o&1&&de(e,c[0].siteType)},d(c){c&&E(e),r=!1,O(s)}}}function Re(t){let e,i,n=t[0].siteType+"",l;return{c(){e=d("div"),i=d("span"),l=M(n),_(e,"class","site-data")},m(r,s){w(r,e,s),a(e,i),a(i,l)},p(r,s){s&1&&n!==(n=r[0].siteType+"")&&F(l,n)},d(r){r&&E(e)}}}function pe(t){let e;function i(r,s){return r[1]?Ue:Ke}let n=i(t),l=n(t);return{c(){l.c(),e=le()},m(r,s){l.m(r,s),w(r,e,s)},p(r,s){n===(n=i(r))&&l?l.p(r,s):(l.d(1),l=n(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){l.d(r),r&&E(e)}}}function Ue(t){let e,i,n,l,r,s,c,o,u,m=t[0].createdDate+"",f,v,h;return{c(){e=d("div"),i=d("div"),n=d("span"),l=M("UrlAddress: "),r=d("input"),s=D(),c=d("div"),o=d("span"),u=M("Created date: "),f=M(m),_(r,"type","text"),_(r,"class","site-input svelte-k7xnb2"),_(i,"class","site-text svelte-k7xnb2"),_(c,"class","site-text svelte-k7xnb2"),_(e,"class","row site-display svelte-k7xnb2")},m(p,A){w(p,e,A),a(e,i),a(i,n),a(n,l),a(n,r),R(r,t[0].urlAddress),a(e,s),a(e,c),a(c,o),a(o,u),a(o,f),v||(h=L(r,"input",t[12]),v=!0)},p(p,A){A&1&&r.value!==p[0].urlAddress&&R(r,p[0].urlAddress),A&1&&m!==(m=p[0].createdDate+"")&&F(f,m)},d(p){p&&E(e),v=!1,h()}}}function Ke(t){let e,i,n,l,r=t[0].urlAddress+"",s,c,o,u,m,f=t[0].createdDate+"",v;return{c(){e=d("div"),i=d("div"),n=d("span"),l=M("UrlAddress: "),s=M(r),c=D(),o=d("div"),u=d("span"),m=M("Created date: "),v=M(f),_(i,"class","site-text svelte-k7xnb2"),_(o,"class","site-text svelte-k7xnb2"),_(e,"class","row site-display svelte-k7xnb2")},m(h,p){w(h,e,p),a(e,i),a(i,n),a(n,l),a(n,s),a(e,c),a(e,o),a(o,u),a(u,m),a(u,v)},p(h,p){p&1&&r!==(r=h[0].urlAddress+"")&&F(s,r),p&1&&f!==(f=h[0].createdDate+"")&&F(v,f)},d(h){h&&E(e)}}}function Ge(t){let e,i,n,l,r,s,c,o;function u(y,k){return y[1]?je:qe}let m=u(t),f=m(t);function v(y,k){return y[1]?Be:ze}let h=v(t),p=h(t);function A(y,k){return y[1]?Fe:Re}let g=A(t),$=g(t),b=t[2]&&pe(t);return{c(){e=d("div"),i=d("div"),n=d("div"),f.c(),l=D(),r=d("div"),p.c(),s=D(),c=d("div"),$.c(),o=D(),b&&b.c(),_(n,"class","col"),P(n,"display","flex"),_(r,"class","col no-margin svelte-k7xnb2"),_(c,"class","col"),_(i,"class","row site-row svelte-k7xnb2"),_(e,"class","site-item svelte-k7xnb2")},m(y,k){w(y,e,k),a(e,i),a(i,n),f.m(n,null),a(i,l),a(i,r),p.m(r,null),a(i,s),a(i,c),$.m(c,null),a(e,o),b&&b.m(e,null)},p(y,[k]){m===(m=u(y))&&f?f.p(y,k):(f.d(1),f=m(y),f&&(f.c(),f.m(n,null))),h===(h=v(y))&&p?p.p(y,k):(p.d(1),p=h(y),p&&(p.c(),p.m(r,null))),g===(g=A(y))&&$?$.p(y,k):($.d(1),$=g(y),$&&($.c(),$.m(c,null))),y[2]?b?b.p(y,k):(b=pe(y),b.c(),b.m(e,null)):b&&(b.d(1),b=null)},i:N,o:N,d(y){y&&E(e),f.d(),p.d(),$.d(),b&&b.d()}}}function Je(t,e,i){let{site:n}=e,l=!1,r=!1;const s=$=>{if($=="domain"){if(l)return;i(2,r=!r)}},c=Se();function o(){c("removed",{id:n.id})}function u(){i(1,l=!l),l&&!r&&i(2,r=!0),c("edit",{id:n.id})}function m(){console.log(n),c("save",{id:n.id,site:n}),i(1,l=!1)}const f=()=>s("domain");function v(){n.domain=this.value,i(0,n)}const h=()=>s("domain");function p(){n.siteType=xe(this),i(0,n)}const A=()=>answer="";function g(){n.urlAddress=this.value,i(0,n)}return t.$$set=$=>{"site"in $&&i(0,n=$.site)},[n,l,r,s,o,u,m,f,v,h,p,A,g]}class Qe extends Y{constructor(e){super(),X(this,e,Je,Ge,U,{site:0})}}function ve(t,e,i){const n=t.slice();return n[5]=e[i],n}function Ve(t){let e;return{c(){e=d("div"),e.innerHTML="<h5>The site list is empty.</h5>",_(e,"class","no-sites-display svelte-14ayx1a")},m(i,n){w(i,e,n)},p:N,i:N,o:N,d(i){i&&E(e)}}}function We(t){let e,i,n=t[0].sites,l=[];for(let s=0;s<n.length;s+=1)l[s]=he(ve(t,n,s));const r=s=>T(l[s],1,1,()=>{l[s]=null});return{c(){for(let s=0;s<l.length;s+=1)l[s].c();e=le()},m(s,c){for(let o=0;o<l.length;o+=1)l[o].m(s,c);w(s,e,c),i=!0},p(s,c){if(c&7){n=s[0].sites;let o;for(o=0;o<
2022-11-22 18:05:35 +03:00
//# sourceMappingURL=envs.js.map