2 lines
2.4 KiB
JavaScript
2 lines
2.4 KiB
JavaScript
import{S as w,i as M,s as N,I as V,l as u,a as E,e as b,m as d,n as _,h as f,c as I,p as h,b as v,J as $,K as T,L as j,f as A,t as W,M as y,o as q,r as z,u as B,N as m,v as C}from"../chunks/index-1530a265.js";import{b as k}from"../chunks/paths-b9644fda.js";import{t as J,l as K}from"../chunks/state-7916fb32.js";import{s as L,t as S}from"../chunks/theme-e602ecc3.js";import"../chunks/preload-helper-23bf4dac.js";function D(n){let o,i,l,r,c,s=n[0].message+"",t;return{c(){o=u("div"),i=u("div"),l=u("div"),r=E(),c=u("div"),t=z(s),this.h()},l(e){o=d(e,"DIV",{class:!0});var a=_(o);i=d(a,"DIV",{class:!0});var p=_(i);l=d(p,"DIV",{class:!0}),_(l).forEach(f),r=I(p),c=d(p,"DIV",{});var g=_(c);t=B(g,s),g.forEach(f),p.forEach(f),a.forEach(f),this.h()},h(){h(l,"class","loader mx-auto svelte-1ub1m40"),h(i,"class","text-indigo-100 text-4xl font-bold my-auto"),h(o,"class","w-screen h-screen z-50 absolute left-0 top-0 bg-gray-600 opacity-50 flex align-middle justify-center")},m(e,a){v(e,o,a),m(o,i),m(i,l),m(i,r),m(i,c),m(c,t)},p(e,a){a&1&&s!==(s=e[0].message+"")&&C(t,s)},d(e){e&&f(o)}}}function R(n){let o,i,l,r;const c=n[2].default,s=V(c,n,n[1],null);let t=n[0].loading&&D(n);return{c(){o=u("main"),s&&s.c(),i=E(),t&&t.c(),l=b(),this.h()},l(e){o=d(e,"MAIN",{class:!0});var a=_(o);s&&s.l(a),a.forEach(f),i=I(e),t&&t.l(e),l=b(),this.h()},h(){h(o,"class","h-screen text-primary-content")},m(e,a){v(e,o,a),s&&s.m(o,null),v(e,i,a),t&&t.m(e,a),v(e,l,a),r=!0},p(e,[a]){s&&s.p&&(!r||a&2)&&$(s,c,e,e[1],r?j(c,e[1],a,null):T(e[1]),null),e[0].loading?t?t.p(e,a):(t=D(e),t.c(),t.m(l.parentNode,l)):t&&(t.d(1),t=null)},i(e){r||(A(s,e),r=!0)},o(e){W(s,e),r=!1},d(e){e&&f(o),s&&s.d(e),e&&f(i),t&&t.d(e),e&&f(l)}}}function x(n,o,i){let l,r;y(n,S,t=>i(3,l=t)),y(n,K,t=>i(0,r=t));let{$$slots:c={},$$scope:s}=o;return q(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(`${k}/service-worker.js`,{scope:`${k}/`}).then(function(e){console.log("Registration successful, scope is:",e.scope)}).catch(function(e){console.log("Service worker registration failed, error:",e)});const t=window.matchMedia("(prefers-color-scheme: dark)").matches;l.theme===void 0&&L(t?"dark":"light"),S.subscribe(({theme:e,isDark:a})=>{e&&(document.getElementsByTagName("html")[0].setAttribute("data-theme",e),J(a))})}),n.$$set=t=>{"$$scope"in t&&i(1,s=t.$$scope)},[r,s,c]}class Q extends w{constructor(o){super(),M(this,o,x,R,N,{})}}export{Q as default};
|