Files
mermaid-live-editor/_app/immutable/pages/__layout.svelte-e1f4a581.js
T
2022-05-27 10:30:25 +00:00

2 lines
2.4 KiB
JavaScript

import{S as w,i as M,s as N,I as V,e as u,k as E,t as $,c as d,a as _,d as f,m as I,h as j,b as h,g as v,J as m,j as T,l as b,K as q,L as A,M as W,q as z,o as B,N as k,v as C}from"../chunks/index-b06f7db9.js";import{b as y}from"../chunks/paths-396f020f.js";import{t as J,l as K}from"../chunks/state-3a19ae0b.js";import{s as L,t as S}from"../chunks/theme-b131f510.js";import"../chunks/preload-helper-29d322af.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=$(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=j(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+"")&&T(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)&&q(s,c,e,e[1],r?W(c,e[1],a,null):A(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||(z(s,e),r=!0)},o(e){B(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;k(n,S,t=>i(3,l=t)),k(n,K,t=>i(0,r=t));let{$$slots:c={},$$scope:s}=o;return C(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(`${y}/service-worker.js`,{scope:`${y}/`}).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};