2 lines
2.4 KiB
JavaScript
2 lines
2.4 KiB
JavaScript
import{S as I,i as M,s as V,B as $,k as m,a as E,e as b,l as u,m as _,h as f,c as D,n as p,b as v,C as N,D as T,E as j,f as q,t as A,F as y,o as B,q as C,r as L,G as d,u as W}from"../../chunks/index-85b2c4b8.js";import{b as k}from"../../chunks/paths-6cd3a76e.js";import{i as z,t as F,l as G}from"../../chunks/state-54ce1bc7.js";import{s as H,t as S}from"../../chunks/theme-ce3fc7a6.js";function w(n){let i,o,l,r,c,s=n[0].message+"",t;return{c(){i=m("div"),o=m("div"),l=m("div"),r=E(),c=m("div"),t=C(s),this.h()},l(e){i=u(e,"DIV",{class:!0});var a=_(i);o=u(a,"DIV",{class:!0});var h=_(o);l=u(h,"DIV",{class:!0}),_(l).forEach(f),r=D(h),c=u(h,"DIV",{});var g=_(c);t=L(g,s),g.forEach(f),h.forEach(f),a.forEach(f),this.h()},h(){p(l,"class","loader mx-auto svelte-1ub1m40"),p(o,"class","text-indigo-100 text-4xl font-bold my-auto"),p(i,"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,i,a),d(i,o),d(o,l),d(o,r),d(o,c),d(c,t)},p(e,a){a&1&&s!==(s=e[0].message+"")&&W(t,s)},d(e){e&&f(i)}}}function R(n){let i,o,l,r;const c=n[2].default,s=$(c,n,n[1],null);let t=n[0].loading&&w(n);return{c(){i=m("main"),s&&s.c(),o=E(),t&&t.c(),l=b(),this.h()},l(e){i=u(e,"MAIN",{class:!0});var a=_(i);s&&s.l(a),a.forEach(f),o=D(e),t&&t.l(e),l=b(),this.h()},h(){p(i,"class","h-screen text-primary-content")},m(e,a){v(e,i,a),s&&s.m(i,null),v(e,o,a),t&&t.m(e,a),v(e,l,a),r=!0},p(e,[a]){s&&s.p&&(!r||a&2)&&N(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=w(e),t.c(),t.m(l.parentNode,l)):t&&(t.d(1),t=null)},i(e){r||(q(s,e),r=!0)},o(e){A(s,e),r=!1},d(e){e&&f(i),s&&s.d(e),e&&f(o),t&&t.d(e),e&&f(l)}}}function x(n,i,o){let l,r;y(n,S,t=>o(3,l=t)),y(n,G,t=>o(0,r=t));let{$$slots:c={},$$scope:s}=i;return B(()=>{window.addEventListener("hashchange",async e=>{await z()}),"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&&H(t?"dark":"light"),S.subscribe(({theme:e,isDark:a})=>{e&&(document.getElementsByTagName("html")[0].setAttribute("data-theme",e),F(a))})}),n.$$set=t=>{"$$scope"in t&&o(1,s=t.$$scope)},[r,s,c]}class Q extends I{constructor(i){super(),M(this,i,x,R,V,{})}}export{Q as default};
|