From a1378144ebcb9768b40b4a2d4a1adc1bc54a0b38 Mon Sep 17 00:00:00 2001 From: zavx0z Date: Tue, 5 Dec 2023 15:09:48 +0300 Subject: [PATCH] analytic --- app/web/package.json | 3 -- app/web/src/app.html | 29 +++++++++---- app/web/src/{ => lib}/Bots.svelte | 3 +- app/web/src/lib/components/Scene.svelte | 6 ++- app/web/src/lib/components/thing/Thing.svelte | 1 - app/web/src/routes/+layout.svelte | 4 ++ index.html | 41 ++++++++++++------- .../immutable/chunks/singletons.3f4538c9.js | 1 - .../immutable/chunks/singletons.f3045a7f.js | 1 + .../{app.ad889d48.js => app.8c260a22.js} | 2 +- .../{start.63bcea63.js => start.a7bd531a.js} | 2 +- .../nodes/{1.dd65cf12.js => 1.779364d8.js} | 2 +- .../nodes/{2.ab1300f0.js => 2.178b744f.js} | 2 +- internal/version.json | 2 +- package.json | 5 ++- 15 files changed, 64 insertions(+), 40 deletions(-) rename app/web/src/{ => lib}/Bots.svelte (95%) create mode 100644 app/web/src/routes/+layout.svelte delete mode 100644 internal/immutable/chunks/singletons.3f4538c9.js create mode 100644 internal/immutable/chunks/singletons.f3045a7f.js rename internal/immutable/entry/{app.ad889d48.js => app.8c260a22.js} (94%) rename internal/immutable/entry/{start.63bcea63.js => start.a7bd531a.js} (99%) rename internal/immutable/nodes/{1.dd65cf12.js => 1.779364d8.js} (93%) rename internal/immutable/nodes/{2.ab1300f0.js => 2.178b744f.js} (99%) diff --git a/app/web/package.json b/app/web/package.json index 3396c44..6907075 100644 --- a/app/web/package.json +++ b/app/web/package.json @@ -23,12 +23,9 @@ "type": "module", "dependencies": { "@dimforge/rapier3d-compat": "^0.11.2", - "@theatre/core": "^0.7.0", - "@theatre/studio": "^0.7.0", "@threlte/core": "^7.0.3", "@threlte/extras": "^8.0.0", "@threlte/rapier": "^1.1.3", - "@threlte/theatre": "^2.1.4", "@xstate/svelte": "^3.0.0", "xstate": "^5.0.0" } diff --git a/app/web/src/app.html b/app/web/src/app.html index 77a5ff5..3b47647 100644 --- a/app/web/src/app.html +++ b/app/web/src/app.html @@ -1,12 +1,23 @@ - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + %sveltekit.head% + + + + + +
%sveltekit.body%
+ diff --git a/app/web/src/Bots.svelte b/app/web/src/lib/Bots.svelte similarity index 95% rename from app/web/src/Bots.svelte rename to app/web/src/lib/Bots.svelte index 481b7ed..3b1125c 100644 --- a/app/web/src/Bots.svelte +++ b/app/web/src/lib/Bots.svelte @@ -12,8 +12,7 @@ Command: npx @threlte/gltf@2.0.1 ./static/bots.glb const gltf = useGltf(bots) export const { actions, mixer } = useGltfAnimations(gltf, ref) - $: Object.entries($actions).forEach(([key, value]) => { - console.log(key, value) + $: Object.entries($actions).forEach(([_, value]) => { value?.play() }) const component = forwardEventHandlers() diff --git a/app/web/src/lib/components/Scene.svelte b/app/web/src/lib/components/Scene.svelte index 571f2f6..60777a3 100644 --- a/app/web/src/lib/components/Scene.svelte +++ b/app/web/src/lib/components/Scene.svelte @@ -7,7 +7,7 @@ import type { AnyStateNode } from "xstate" import Thing from "./thing/Thing.svelte" import { thingMachine } from "./machine" - import Bots from "../../Bots.svelte" + import Bots from "../Bots.svelte" export let actor: SimulatorActorType let edges: { [key: string]: DirectedGraphEdge } = {} @@ -15,9 +15,11 @@ let digraph: any + + - + diff --git a/app/web/src/lib/components/thing/Thing.svelte b/app/web/src/lib/components/thing/Thing.svelte index 1c5fe66..900d840 100644 --- a/app/web/src/lib/components/thing/Thing.svelte +++ b/app/web/src/lib/components/thing/Thing.svelte @@ -55,7 +55,6 @@ + + + diff --git a/index.html b/index.html index 8dd8666..aafde23 100644 --- a/index.html +++ b/index.html @@ -1,22 +1,33 @@ - - - - - - + + + + + + - + - + - - -
+ + + + + +
- + diff --git a/internal/immutable/chunks/singletons.3f4538c9.js b/internal/immutable/chunks/singletons.3f4538c9.js deleted file mode 100644 index ec3b347..0000000 --- a/internal/immutable/chunks/singletons.3f4538c9.js +++ /dev/null @@ -1 +0,0 @@ -import{w as u}from"./index.17ca9755.js";var _;const k=((_=globalThis.__sveltekit_8voxp)==null?void 0:_.base)??"/littlesun";var g;const m=((g=globalThis.__sveltekit_8voxp)==null?void 0:g.assets)??k,w="1701776069457",T="sveltekit:snapshot",x="sveltekit:scroll",y="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1},h=location.origin;function I(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function S(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function b(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function O(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=b(e)}}function U(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,r=!n||!!o||A(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),l=(n==null?void 0:n.origin)===h&&e.hasAttribute("download");return{url:n,external:r,target:o,download:l}}function L(e){let t=null,n=null,o=null,r=null,l=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),r===null&&(r=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),l===null&&(l=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=b(s);function i(v){switch(v){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[r??"off"],keep_focus:i(t),noscroll:i(n),reload:i(l),replace_state:i(a)}}function p(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function l(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:r,subscribe:l}}function E(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const r=await fetch(`${m}/internal/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==w;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function A(e,t){return e.origin!==h||!e.pathname.startsWith(t)}function N(e){e.client}const P={url:p({}),page:p({}),navigating:u(null),updated:E()};export{y as I,f as P,x as S,T as a,U as b,L as c,P as d,k as e,O as f,I as g,N as h,A as i,h as o,S as s}; diff --git a/internal/immutable/chunks/singletons.f3045a7f.js b/internal/immutable/chunks/singletons.f3045a7f.js new file mode 100644 index 0000000..8f803fd --- /dev/null +++ b/internal/immutable/chunks/singletons.f3045a7f.js @@ -0,0 +1 @@ +import{w as u}from"./index.17ca9755.js";var p;const k=((p=globalThis.__sveltekit_15l776l)==null?void 0:p.base)??"/littlesun";var g;const m=((g=globalThis.__sveltekit_15l776l)==null?void 0:g.assets)??k,w="1701783598171",T="sveltekit:snapshot",y="sveltekit:scroll",I="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1},h=location.origin;function S(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function x(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function b(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function O(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=b(e)}}function U(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,l=!n||!!o||A(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),r=(n==null?void 0:n.origin)===h&&e.hasAttribute("download");return{url:n,external:l,target:o,download:r}}function L(e){let t=null,n=null,o=null,l=null,r=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),l===null&&(l=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),r===null&&(r=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=b(s);function i(v){switch(v){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[l??"off"],keep_focus:i(t),noscroll:i(n),reload:i(r),replace_state:i(a)}}function _(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function l(a){n=!1,t.set(a)}function r(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:l,subscribe:r}}function E(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const l=await fetch(`${m}/internal/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!l.ok)return!1;const a=(await l.json()).version!==w;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function A(e,t){return e.origin!==h||!e.pathname.startsWith(t)}function N(e){e.client}const P={url:_({}),page:_({}),navigating:u(null),updated:E()};export{I,f as P,y as S,T as a,U as b,L as c,P as d,k as e,O as f,S as g,N as h,A as i,h as o,x as s}; diff --git a/internal/immutable/entry/app.ad889d48.js b/internal/immutable/entry/app.8c260a22.js similarity index 94% rename from internal/immutable/entry/app.ad889d48.js rename to internal/immutable/entry/app.8c260a22.js index 753c737..e036669 100644 --- a/internal/immutable/entry/app.ad889d48.js +++ b/internal/immutable/entry/app.8c260a22.js @@ -1 +1 @@ -import{s as A,a as B,o as U,t as j,b as P}from"../chunks/scheduler.c03d0109.js";import{S as W,i as z,s as F,e as h,c as G,a as g,t as d,b as R,d as p,f as w,g as H,h as J,j as K,k as N,l as m,m as M,n as Q,o as X,p as L,q as k,r as v,u as C,v as E,w as y}from"../chunks/index.bd9bea11.js";const Y="modulepreload",Z=function(o,e){return new URL(o,e).href},D={},S=function(e,n,i){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(f=>{if(f=Z(f,i),f in D)return;D[f]=!0;const t=f.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(!!i)for(let a=s.length-1;a>=0;a--){const _=s[a];if(_.href===f&&(!t||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${r}`))return;const c=document.createElement("link");if(c.rel=t?"stylesheet":Y,t||(c.as="script",c.crossOrigin=""),c.href=f,document.head.appendChild(c),t)return new Promise((a,_)=>{c.addEventListener("load",a),c.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${f}`)))})})).then(()=>e()).catch(f=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=f,window.dispatchEvent(t),!t.defaultPrevented)throw f})},re={};function $(o){let e,n,i;var s=o[1][0];function f(t,r){return{props:{data:t[3],form:t[2]}}}return s&&(e=k(s,f(o)),o[12](e)),{c(){e&&v(e.$$.fragment),n=h()},l(t){e&&C(e.$$.fragment,t),n=h()},m(t,r){e&&E(e,t,r),g(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][0])){if(e){L();const l=e;d(l.$$.fragment,1,0,()=>{y(l,1)}),R()}s?(e=k(s,f(t)),t[12](e),v(e.$$.fragment),p(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const l={};r&8&&(l.data=t[3]),r&4&&(l.form=t[2]),e.$set(l)}},i(t){i||(e&&p(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&w(n),o[12](null),e&&y(e,t)}}}function x(o){let e,n,i;var s=o[1][0];function f(t,r){return{props:{data:t[3],$$slots:{default:[ee]},$$scope:{ctx:t}}}}return s&&(e=k(s,f(o)),o[11](e)),{c(){e&&v(e.$$.fragment),n=h()},l(t){e&&C(e.$$.fragment,t),n=h()},m(t,r){e&&E(e,t,r),g(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][0])){if(e){L();const l=e;d(l.$$.fragment,1,0,()=>{y(l,1)}),R()}s?(e=k(s,f(t)),t[11](e),v(e.$$.fragment),p(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const l={};r&8&&(l.data=t[3]),r&8215&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)}},i(t){i||(e&&p(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&w(n),o[11](null),e&&y(e,t)}}}function ee(o){let e,n,i;var s=o[1][1];function f(t,r){return{props:{data:t[4],form:t[2]}}}return s&&(e=k(s,f(o)),o[10](e)),{c(){e&&v(e.$$.fragment),n=h()},l(t){e&&C(e.$$.fragment,t),n=h()},m(t,r){e&&E(e,t,r),g(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][1])){if(e){L();const l=e;d(l.$$.fragment,1,0,()=>{y(l,1)}),R()}s?(e=k(s,f(t)),t[10](e),v(e.$$.fragment),p(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const l={};r&16&&(l.data=t[4]),r&4&&(l.form=t[2]),e.$set(l)}},i(t){i||(e&&p(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&w(n),o[10](null),e&&y(e,t)}}}function I(o){let e,n=o[6]&&O(o);return{c(){e=H("div"),n&&n.c(),this.h()},l(i){e=J(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=K(e);n&&n.l(s),s.forEach(w),this.h()},h(){N(e,"id","svelte-announcer"),N(e,"aria-live","assertive"),N(e,"aria-atomic","true"),m(e,"position","absolute"),m(e,"left","0"),m(e,"top","0"),m(e,"clip","rect(0 0 0 0)"),m(e,"clip-path","inset(50%)"),m(e,"overflow","hidden"),m(e,"white-space","nowrap"),m(e,"width","1px"),m(e,"height","1px")},m(i,s){g(i,e,s),n&&n.m(e,null)},p(i,s){i[6]?n?n.p(i,s):(n=O(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&w(e),n&&n.d()}}}function O(o){let e;return{c(){e=M(o[7])},l(n){e=Q(n,o[7])},m(n,i){g(n,e,i)},p(n,i){i&128&&X(e,n[7])},d(n){n&&w(e)}}}function te(o){let e,n,i,s,f;const t=[x,$],r=[];function l(a,_){return a[1][1]?0:1}e=l(o),n=r[e]=t[e](o);let c=o[5]&&I(o);return{c(){n.c(),i=F(),c&&c.c(),s=h()},l(a){n.l(a),i=G(a),c&&c.l(a),s=h()},m(a,_){r[e].m(a,_),g(a,i,_),c&&c.m(a,_),g(a,s,_),f=!0},p(a,[_]){let b=e;e=l(a),e===b?r[e].p(a,_):(L(),d(r[b],1,1,()=>{r[b]=null}),R(),n=r[e],n?n.p(a,_):(n=r[e]=t[e](a),n.c()),p(n,1),n.m(i.parentNode,i)),a[5]?c?c.p(a,_):(c=I(a),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(a){f||(p(n),f=!0)},o(a){d(n),f=!1},d(a){a&&(w(i),w(s)),r[e].d(a),c&&c.d(a)}}}function ne(o,e,n){let{stores:i}=e,{page:s}=e,{constructors:f}=e,{components:t=[]}=e,{form:r}=e,{data_0:l=null}=e,{data_1:c=null}=e;B(i.page.notify);let a=!1,_=!1,b=null;U(()=>{const u=i.page.subscribe(()=>{a&&(n(6,_=!0),j().then(()=>{n(7,b=document.title||"untitled page")}))});return n(5,a=!0),u});function T(u){P[u?"unshift":"push"](()=>{t[1]=u,n(0,t)})}function V(u){P[u?"unshift":"push"](()=>{t[0]=u,n(0,t)})}function q(u){P[u?"unshift":"push"](()=>{t[0]=u,n(0,t)})}return o.$$set=u=>{"stores"in u&&n(8,i=u.stores),"page"in u&&n(9,s=u.page),"constructors"in u&&n(1,f=u.constructors),"components"in u&&n(0,t=u.components),"form"in u&&n(2,r=u.form),"data_0"in u&&n(3,l=u.data_0),"data_1"in u&&n(4,c=u.data_1)},o.$$.update=()=>{o.$$.dirty&768&&i.page.set(s)},[t,f,r,l,c,a,_,b,i,s,T,V,q]}class oe extends W{constructor(e){super(),z(this,e,ne,te,A,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const ae=[()=>S(()=>import("../nodes/0.08976c60.js"),["../nodes/0.08976c60.js","../chunks/scheduler.c03d0109.js","../chunks/index.bd9bea11.js"],import.meta.url),()=>S(()=>import("../nodes/1.dd65cf12.js"),["../nodes/1.dd65cf12.js","../chunks/scheduler.c03d0109.js","../chunks/index.bd9bea11.js","../chunks/singletons.3f4538c9.js","../chunks/index.17ca9755.js"],import.meta.url),()=>S(()=>import("../nodes/2.ab1300f0.js"),["../nodes/2.ab1300f0.js","../chunks/scheduler.c03d0109.js","../chunks/index.bd9bea11.js","../chunks/index.17ca9755.js","../assets/2.3013e702.css"],import.meta.url)],le=[],fe={"/":[2]},ce={handleError:({error:o})=>{console.error(o)}};export{fe as dictionary,ce as hooks,re as matchers,ae as nodes,oe as root,le as server_loads}; +import{s as A,a as B,o as U,t as j,b as P}from"../chunks/scheduler.c03d0109.js";import{S as W,i as z,s as F,e as h,c as G,a as g,t as d,b as R,d as p,f as w,g as H,h as J,j as K,k as N,l as m,m as M,n as Q,o as X,p as L,q as k,r as v,u as C,v as E,w as y}from"../chunks/index.bd9bea11.js";const Y="modulepreload",Z=function(o,e){return new URL(o,e).href},D={},S=function(e,n,i){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(f=>{if(f=Z(f,i),f in D)return;D[f]=!0;const t=f.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(!!i)for(let a=s.length-1;a>=0;a--){const _=s[a];if(_.href===f&&(!t||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${r}`))return;const c=document.createElement("link");if(c.rel=t?"stylesheet":Y,t||(c.as="script",c.crossOrigin=""),c.href=f,document.head.appendChild(c),t)return new Promise((a,_)=>{c.addEventListener("load",a),c.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${f}`)))})})).then(()=>e()).catch(f=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=f,window.dispatchEvent(t),!t.defaultPrevented)throw f})},re={};function $(o){let e,n,i;var s=o[1][0];function f(t,r){return{props:{data:t[3],form:t[2]}}}return s&&(e=k(s,f(o)),o[12](e)),{c(){e&&v(e.$$.fragment),n=h()},l(t){e&&C(e.$$.fragment,t),n=h()},m(t,r){e&&E(e,t,r),g(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][0])){if(e){L();const l=e;d(l.$$.fragment,1,0,()=>{y(l,1)}),R()}s?(e=k(s,f(t)),t[12](e),v(e.$$.fragment),p(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const l={};r&8&&(l.data=t[3]),r&4&&(l.form=t[2]),e.$set(l)}},i(t){i||(e&&p(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&w(n),o[12](null),e&&y(e,t)}}}function x(o){let e,n,i;var s=o[1][0];function f(t,r){return{props:{data:t[3],$$slots:{default:[ee]},$$scope:{ctx:t}}}}return s&&(e=k(s,f(o)),o[11](e)),{c(){e&&v(e.$$.fragment),n=h()},l(t){e&&C(e.$$.fragment,t),n=h()},m(t,r){e&&E(e,t,r),g(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][0])){if(e){L();const l=e;d(l.$$.fragment,1,0,()=>{y(l,1)}),R()}s?(e=k(s,f(t)),t[11](e),v(e.$$.fragment),p(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const l={};r&8&&(l.data=t[3]),r&8215&&(l.$$scope={dirty:r,ctx:t}),e.$set(l)}},i(t){i||(e&&p(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&w(n),o[11](null),e&&y(e,t)}}}function ee(o){let e,n,i;var s=o[1][1];function f(t,r){return{props:{data:t[4],form:t[2]}}}return s&&(e=k(s,f(o)),o[10](e)),{c(){e&&v(e.$$.fragment),n=h()},l(t){e&&C(e.$$.fragment,t),n=h()},m(t,r){e&&E(e,t,r),g(t,n,r),i=!0},p(t,r){if(r&2&&s!==(s=t[1][1])){if(e){L();const l=e;d(l.$$.fragment,1,0,()=>{y(l,1)}),R()}s?(e=k(s,f(t)),t[10](e),v(e.$$.fragment),p(e.$$.fragment,1),E(e,n.parentNode,n)):e=null}else if(s){const l={};r&16&&(l.data=t[4]),r&4&&(l.form=t[2]),e.$set(l)}},i(t){i||(e&&p(e.$$.fragment,t),i=!0)},o(t){e&&d(e.$$.fragment,t),i=!1},d(t){t&&w(n),o[10](null),e&&y(e,t)}}}function I(o){let e,n=o[6]&&O(o);return{c(){e=H("div"),n&&n.c(),this.h()},l(i){e=J(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=K(e);n&&n.l(s),s.forEach(w),this.h()},h(){N(e,"id","svelte-announcer"),N(e,"aria-live","assertive"),N(e,"aria-atomic","true"),m(e,"position","absolute"),m(e,"left","0"),m(e,"top","0"),m(e,"clip","rect(0 0 0 0)"),m(e,"clip-path","inset(50%)"),m(e,"overflow","hidden"),m(e,"white-space","nowrap"),m(e,"width","1px"),m(e,"height","1px")},m(i,s){g(i,e,s),n&&n.m(e,null)},p(i,s){i[6]?n?n.p(i,s):(n=O(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&w(e),n&&n.d()}}}function O(o){let e;return{c(){e=M(o[7])},l(n){e=Q(n,o[7])},m(n,i){g(n,e,i)},p(n,i){i&128&&X(e,n[7])},d(n){n&&w(e)}}}function te(o){let e,n,i,s,f;const t=[x,$],r=[];function l(a,_){return a[1][1]?0:1}e=l(o),n=r[e]=t[e](o);let c=o[5]&&I(o);return{c(){n.c(),i=F(),c&&c.c(),s=h()},l(a){n.l(a),i=G(a),c&&c.l(a),s=h()},m(a,_){r[e].m(a,_),g(a,i,_),c&&c.m(a,_),g(a,s,_),f=!0},p(a,[_]){let b=e;e=l(a),e===b?r[e].p(a,_):(L(),d(r[b],1,1,()=>{r[b]=null}),R(),n=r[e],n?n.p(a,_):(n=r[e]=t[e](a),n.c()),p(n,1),n.m(i.parentNode,i)),a[5]?c?c.p(a,_):(c=I(a),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},i(a){f||(p(n),f=!0)},o(a){d(n),f=!1},d(a){a&&(w(i),w(s)),r[e].d(a),c&&c.d(a)}}}function ne(o,e,n){let{stores:i}=e,{page:s}=e,{constructors:f}=e,{components:t=[]}=e,{form:r}=e,{data_0:l=null}=e,{data_1:c=null}=e;B(i.page.notify);let a=!1,_=!1,b=null;U(()=>{const u=i.page.subscribe(()=>{a&&(n(6,_=!0),j().then(()=>{n(7,b=document.title||"untitled page")}))});return n(5,a=!0),u});function T(u){P[u?"unshift":"push"](()=>{t[1]=u,n(0,t)})}function V(u){P[u?"unshift":"push"](()=>{t[0]=u,n(0,t)})}function q(u){P[u?"unshift":"push"](()=>{t[0]=u,n(0,t)})}return o.$$set=u=>{"stores"in u&&n(8,i=u.stores),"page"in u&&n(9,s=u.page),"constructors"in u&&n(1,f=u.constructors),"components"in u&&n(0,t=u.components),"form"in u&&n(2,r=u.form),"data_0"in u&&n(3,l=u.data_0),"data_1"in u&&n(4,c=u.data_1)},o.$$.update=()=>{o.$$.dirty&768&&i.page.set(s)},[t,f,r,l,c,a,_,b,i,s,T,V,q]}class oe extends W{constructor(e){super(),z(this,e,ne,te,A,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const ae=[()=>S(()=>import("../nodes/0.08976c60.js"),["../nodes/0.08976c60.js","../chunks/scheduler.c03d0109.js","../chunks/index.bd9bea11.js"],import.meta.url),()=>S(()=>import("../nodes/1.779364d8.js"),["../nodes/1.779364d8.js","../chunks/scheduler.c03d0109.js","../chunks/index.bd9bea11.js","../chunks/singletons.f3045a7f.js","../chunks/index.17ca9755.js"],import.meta.url),()=>S(()=>import("../nodes/2.178b744f.js"),["../nodes/2.178b744f.js","../chunks/scheduler.c03d0109.js","../chunks/index.bd9bea11.js","../chunks/index.17ca9755.js","../assets/2.3013e702.css"],import.meta.url)],le=[],fe={"/":[2]},ce={handleError:({error:o})=>{console.error(o)}};export{fe as dictionary,ce as hooks,re as matchers,ae as nodes,oe as root,le as server_loads}; diff --git a/internal/immutable/entry/start.63bcea63.js b/internal/immutable/entry/start.a7bd531a.js similarity index 99% rename from internal/immutable/entry/start.63bcea63.js rename to internal/immutable/entry/start.a7bd531a.js index d2b4eff..9a095bf 100644 --- a/internal/immutable/entry/start.63bcea63.js +++ b/internal/immutable/entry/start.a7bd531a.js @@ -1,3 +1,3 @@ -import{o as me,t as we}from"../chunks/scheduler.c03d0109.js";import{S as Ge,a as Je,I as V,g as De,f as Ce,b as _e,c as le,s as te,i as ye,d as H,o as Me,e as G,P as Ve,h as Ze}from"../chunks/singletons.3f4538c9.js";function Qe(t,r){return t==="/"||r==="ignore"?t:r==="never"?t.endsWith("/")?t.slice(0,-1):t:r==="always"&&!t.endsWith("/")?t+"/":t}function et(t){return t.split("%25").map(decodeURI).join("%25")}function tt(t){for(const r in t)t[r]=decodeURIComponent(t[r]);return t}const nt=["href","pathname","search","searchParams","toString","toJSON"];function at(t,r){const f=new URL(t);for(const i of nt)Object.defineProperty(f,i,{get(){return r(),t[i]},enumerable:!0,configurable:!0});return rt(f),f}function rt(t){Object.defineProperty(t,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}const ot="/__data.json";function it(t){return t.replace(/\/$/,"")+ot}function st(...t){let r=5381;for(const f of t)if(typeof f=="string"){let i=f.length;for(;i;)r=r*33^f.charCodeAt(--i)}else if(ArrayBuffer.isView(f)){const i=new Uint8Array(f.buffer,f.byteOffset,f.byteLength);let h=i.length;for(;h;)r=r*33^i[--h]}else throw new TypeError("value must be a string or TypedArray");return(r>>>0).toString(36)}const Ke=window.fetch;window.fetch=(t,r)=>((t instanceof Request?t.method:(r==null?void 0:r.method)||"GET")!=="GET"&&ae.delete(Se(t)),Ke(t,r));const ae=new Map;function ct(t,r){const f=Se(t,r),i=document.querySelector(f);if(i!=null&&i.textContent){const{body:h,...u}=JSON.parse(i.textContent),E=i.getAttribute("data-ttl");return E&&ae.set(f,{body:h,init:u,ttl:1e3*Number(E)}),Promise.resolve(new Response(h,u))}return window.fetch(t,r)}function lt(t,r,f){if(ae.size>0){const i=Se(t,f),h=ae.get(i);if(h){if(performance.now(){const h=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(i);if(h)return r.push({name:h[1],matcher:h[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const u=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(i);if(u)return r.push({name:u[1],matcher:u[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!i)return;const E=i.split(/\[(.+?)\](?!\])/);return"/"+E.map((g,m)=>{if(m%2){if(g.startsWith("x+"))return ve(String.fromCharCode(parseInt(g.slice(2),16)));if(g.startsWith("u+"))return ve(String.fromCharCode(...g.slice(2).split("-").map(U=>parseInt(U,16))));const d=ft.exec(g);if(!d)throw new Error(`Invalid param: ${g}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,j,T,R,C]=d;return r.push({name:R,matcher:C,optional:!!j,rest:!!T,chained:T?m===1&&E[0]==="":!1}),T?"(.*?)":j?"([^/]*)?":"([^/]+?)"}return ve(g)}).join("")}).join("")}/?$`),params:r}}function dt(t){return!/^\([^)]+\)$/.test(t)}function pt(t){return t.slice(1).split("/").filter(dt)}function ht(t,r,f){const i={},h=t.slice(1),u=h.filter(l=>l!==void 0);let E=0;for(let l=0;ld).join("/"),E=0),m===void 0){g.rest&&(i[g.name]="");continue}if(!g.matcher||f[g.matcher](m)){i[g.name]=m;const d=r[l+1],j=h[l+1];d&&!d.rest&&d.optional&&j&&g.chained&&(E=0),!d&&!j&&Object.keys(i).length===u.length&&(E=0);continue}if(g.optional&&g.chained){E++;continue}return}if(!E)return i}function ve(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function gt({nodes:t,server_loads:r,dictionary:f,matchers:i}){const h=new Set(r);return Object.entries(f).map(([l,[g,m,d]])=>{const{pattern:j,params:T}=ut(l),R={id:l,exec:C=>{const U=j.exec(C);if(U)return ht(U,T,i)},errors:[1,...d||[]].map(C=>t[C]),layouts:[0,...m||[]].map(E),leaf:u(g)};return R.errors.length=R.layouts.length=Math.max(R.errors.length,R.layouts.length),R});function u(l){const g=l<0;return g&&(l=~l),[g,t[l]]}function E(l){return l===void 0?l:[h.has(l),t[l]]}}function ze(t){try{return JSON.parse(sessionStorage[t])}catch{}}function qe(t,r){const f=JSON.stringify(r);try{sessionStorage[t]=f}catch{}}const mt=-1,wt=-2,_t=-3,yt=-4,vt=-5,bt=-6;function Et(t,r){if(typeof t=="number")return h(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const f=t,i=Array(f.length);function h(u,E=!1){if(u===mt)return;if(u===_t)return NaN;if(u===yt)return 1/0;if(u===vt)return-1/0;if(u===bt)return-0;if(E)throw new Error("Invalid input");if(u in i)return i[u];const l=f[u];if(!l||typeof l!="object")i[u]=l;else if(Array.isArray(l))if(typeof l[0]=="string"){const g=l[0],m=r==null?void 0:r[g];if(m)return i[u]=m(h(l[1]));switch(g){case"Date":i[u]=new Date(l[1]);break;case"Set":const d=new Set;i[u]=d;for(let R=1;Rr!=null)}const We=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...We];const kt=new Set([...We]);[...kt];async function Rt(t){var r;for(const f in t)if(typeof((r=t[f])==null?void 0:r.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(t).map(async([i,h])=>[i,await h])));return t}class ne{constructor(r,f){this.status=r,typeof f=="string"?this.body={message:f}:f?this.body=f:this.body={message:`Error: ${r}`}}toString(){return JSON.stringify(this.body)}}class Fe{constructor(r,f){this.status=r,this.location=f}}const At="x-sveltekit-invalidated",It="x-sveltekit-trailing-slash",J=ze(Ge)??{},ee=ze(Je)??{};function be(t){J[t]=te()}function K(t){return location.href=t.href,new Promise(()=>{})}function Lt(t,r){var Ne;const f=gt(t),i=t.nodes[0],h=t.nodes[1];i(),h();const u=document.documentElement,E=[],l=[];let g=null;const m={before_navigate:[],on_navigate:[],after_navigate:[]};let d={branch:[],error:null,url:null},j=!1,T=!1,R=!0,C=!1,U=!1,D=!1,z=!1,q,x=(Ne=history.state)==null?void 0:Ne[V];x||(x=Date.now(),history.replaceState({...history.state,[V]:x},"",location.href));const fe=J[x];fe&&(history.scrollRestoration="manual",scrollTo(fe.x,fe.y));let F,W,Y;async function ke(){if(Y=Y||Promise.resolve(),await Y,!Y)return;Y=null;const e=new URL(location.href),s=Z(e,!0);g=null;const n=W={},o=s&&await pe(s);if(n===W&&o){if(o.type==="redirect")return re(new URL(o.location,e).href,{},1,n);o.props.page!==void 0&&(F=o.props.page),q.$set(o.props)}}function Re(e){l.some(s=>s==null?void 0:s.snapshot)&&(ee[e]=l.map(s=>{var n;return(n=s==null?void 0:s.snapshot)==null?void 0:n.capture()}))}function Ae(e){var s;(s=ee[e])==null||s.forEach((n,o)=>{var a,c;(c=(a=l[o])==null?void 0:a.snapshot)==null||c.restore(n)})}function Ie(){be(x),qe(Ge,J),Re(x),qe(Je,ee)}async function re(e,{noScroll:s=!1,replaceState:n=!1,keepFocus:o=!1,state:a={},invalidateAll:c=!1},p,v){return typeof e=="string"&&(e=new URL(e,De(document))),ce({url:e,scroll:s?te():null,keepfocus:o,redirect_count:p,details:{state:a,replaceState:n},nav_token:v,accepted:()=>{c&&(z=!0)},blocked:()=>{},type:"goto"})}async function Le(e){return g={id:e.id,promise:pe(e).then(s=>(s.type==="loaded"&&s.state.error&&(g=null),s))},g.promise}async function oe(...e){const n=f.filter(o=>e.some(a=>o.exec(a))).map(o=>Promise.all([...o.layouts,o.leaf].map(a=>a==null?void 0:a[1]())));await Promise.all(n)}function Pe(e){var o;d=e.state;const s=document.querySelector("style[data-sveltekit]");s&&s.remove(),F=e.props.page,q=new t.root({target:r,props:{...e.props,stores:H,components:l},hydrate:!0}),Ae(x);const n={from:null,to:{params:d.params,route:{id:((o=d.route)==null?void 0:o.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};m.after_navigate.forEach(a=>a(n)),T=!0}async function X({url:e,params:s,branch:n,status:o,error:a,route:c,form:p}){let v="never";for(const _ of n)(_==null?void 0:_.slash)!==void 0&&(v=_.slash);e.pathname=Qe(e.pathname,v),e.search=e.search;const b={type:"loaded",state:{url:e,params:s,branch:n,error:a,route:c},props:{constructors:St(n).map(_=>_.node.component)}};p!==void 0&&(b.props.form=p);let y={},L=!F,A=0;for(let _=0;_(v.route=!0,w[O])}),params:new Proxy(o,{get:(w,O)=>(v.params.add(O),w[O])}),data:(c==null?void 0:c.data)??null,url:at(n,()=>{v.url=!0}),async fetch(w,O){let N;w instanceof Request?(N=w.url,O={body:w.method==="GET"||w.method==="HEAD"?void 0:await w.blob(),cache:w.cache,credentials:w.credentials,headers:w.headers,integrity:w.integrity,keepalive:w.keepalive,method:w.method,mode:w.mode,redirect:w.redirect,referrer:w.referrer,referrerPolicy:w.referrerPolicy,signal:w.signal,...O}):N=w;const M=new URL(N,n);return P(M.href),M.origin===n.origin&&(N=M.href.slice(n.origin.length)),T?lt(N,M.href,O):ct(N,O)},setHeaders:()=>{},depends:P,parent(){return v.parent=!0,s()}};p=await b.universal.load.call(null,_)??null,p=p?await Rt(p):null}return{node:b,loader:e,server:c,universal:(L=b.universal)!=null&&L.load?{type:"data",data:p,uses:v}:null,data:p??(c==null?void 0:c.data)??null,slash:((A=b.universal)==null?void 0:A.trailingSlash)??(c==null?void 0:c.slash)}}function Oe(e,s,n,o,a){if(z)return!0;if(!o)return!1;if(o.parent&&e||o.route&&s||o.url&&n)return!0;for(const c of o.params)if(a[c]!==d.params[c])return!0;for(const c of o.dependencies)if(E.some(p=>p(new URL(c))))return!0;return!1}function de(e,s){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?s??null:null}async function pe({id:e,invalidating:s,url:n,params:o,route:a}){if((g==null?void 0:g.id)===e)return g.promise;const{errors:c,layouts:p,leaf:v}=a,b=[...p,v];c.forEach(S=>S==null?void 0:S().catch(()=>{})),b.forEach(S=>S==null?void 0:S[1]().catch(()=>{}));let y=null;const L=d.url?e!==d.url.pathname+d.url.search:!1,A=d.route?a.id!==d.route.id:!1;let P=!1;const _=b.map((S,I)=>{var B;const k=d.branch[I],$=!!(S!=null&&S[0])&&((k==null?void 0:k.loader)!==S[1]||Oe(P,A,L,(B=k.server)==null?void 0:B.uses,o));return $&&(P=!0),$});if(_.some(Boolean)){try{y=await He(n,_)}catch(S){return ie({status:S instanceof ne?S.status:500,error:await Q(S,{url:n,params:o,route:{id:a.id}}),url:n,route:a})}if(y.type==="redirect")return y}const w=y==null?void 0:y.nodes;let O=!1;const N=b.map(async(S,I)=>{var he;if(!S)return;const k=d.branch[I],$=w==null?void 0:w[I];if((!$||$.type==="skip")&&S[1]===(k==null?void 0:k.loader)&&!Oe(O,A,L,(he=k.universal)==null?void 0:he.uses,o))return k;if(O=!0,($==null?void 0:$.type)==="error")throw $;return ue({loader:S[1],url:n,params:o,route:a,parent:async()=>{var Te;const $e={};for(let ge=0;ge{});const M=[];for(let S=0;SPromise.resolve({}),server_data_node:de(c)}),b={node:await h(),loader:h,universal:null,server:null,data:null};return await X({url:n,params:a,branch:[v,b],status:e,error:s,route:null})}function Z(e,s){if(ye(e,G))return;const n=se(e);for(const o of f){const a=o.exec(n);if(a)return{id:e.pathname+e.search,invalidating:s,route:o,params:tt(a),url:e}}}function se(e){return et(e.pathname.slice(G.length)||"/")}function Ue({url:e,type:s,intent:n,delta:o}){let a=!1;const c=Be(d,n,e,s);o!==void 0&&(c.navigation.delta=o);const p={...c.navigation,cancel:()=>{a=!0,c.reject(new Error("navigation was cancelled"))}};return U||m.before_navigate.forEach(v=>v(p)),a?null:c}async function ce({url:e,scroll:s,keepfocus:n,redirect_count:o,details:a,type:c,delta:p,nav_token:v={},accepted:b,blocked:y}){var N,M,S;const L=Z(e,!1),A=Ue({url:e,type:c,delta:p,intent:L});if(!A){y();return}const P=x;b(),U=!0,T&&H.navigating.set(A.navigation),W=v;let _=L&&await pe(L);if(!_){if(ye(e,G))return await K(e);_=await je(e,{id:null},await Q(new Error(`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(L==null?void 0:L.url)||e,W!==v)return A.reject(new Error("navigation was aborted")),!1;if(_.type==="redirect")if(o>=20)_=await ie({status:500,error:await Q(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return re(new URL(_.location,e).href,{},o+1,v),!1;else((N=_.props.page)==null?void 0:N.status)>=400&&await H.updated.check()&&await K(e);if(E.length=0,z=!1,C=!0,be(P),Re(P),(M=_.props.page)!=null&&M.url&&_.props.page.url.pathname!==e.pathname&&(e.pathname=(S=_.props.page)==null?void 0:S.url.pathname),a){const I=a.replaceState?0:1;if(a.state[V]=x+=I,history[a.replaceState?"replaceState":"pushState"](a.state,"",e),!a.replaceState){let k=x+1;for(;ee[k]||J[k];)delete ee[k],delete J[k],k+=1}}if(g=null,T){d=_.state,_.props.page&&(_.props.page.url=e);const I=(await Promise.all(m.on_navigate.map(k=>k(A.navigation)))).filter(k=>typeof k=="function");if(I.length>0){let k=function(){m.after_navigate=m.after_navigate.filter($=>!I.includes($))};I.push(k),m.after_navigate.push(...I)}q.$set(_.props)}else Pe(_);const{activeElement:w}=document;if(await we(),R){const I=e.hash&&document.getElementById(decodeURIComponent(e.hash.slice(1)));s?scrollTo(s.x,s.y):I?I.scrollIntoView():scrollTo(0,0)}const O=document.activeElement!==w&&document.activeElement!==document.body;!n&&!O&&Ee(),R=!0,_.props.page&&(F=_.props.page),U=!1,c==="popstate"&&Ae(x),A.fulfil(void 0),m.after_navigate.forEach(I=>I(A.navigation)),H.navigating.set(null),C=!1}async function je(e,s,n,o){return e.origin===Me&&e.pathname===location.pathname&&!j?await ie({status:o,error:n,url:e,route:s}):await K(e)}function Xe(){let e;u.addEventListener("mousemove",c=>{const p=c.target;clearTimeout(e),e=setTimeout(()=>{o(p,2)},20)});function s(c){o(c.composedPath()[0],1)}u.addEventListener("mousedown",s),u.addEventListener("touchstart",s,{passive:!0});const n=new IntersectionObserver(c=>{for(const p of c)p.isIntersecting&&(oe(se(new URL(p.target.href))),n.unobserve(p.target))},{threshold:0});function o(c,p){const v=Ce(c,u);if(!v)return;const{url:b,external:y,download:L}=_e(v,G);if(y||L)return;const A=le(v);if(!A.reload)if(p<=A.preload_data){const P=Z(b,!1);P&&Le(P)}else p<=A.preload_code&&oe(se(b))}function a(){n.disconnect();for(const c of u.querySelectorAll("a")){const{url:p,external:v,download:b}=_e(c,G);if(v||b)continue;const y=le(c);y.reload||(y.preload_code===Ve.viewport&&n.observe(c),y.preload_code===Ve.eager&&oe(se(p)))}}m.after_navigate.push(a),a()}function Q(e,s){return e instanceof ne?e.body:t.hooks.handleError({error:e,event:s})??{message:s.route.id!=null?"Internal Error":"Not Found"}}return{after_navigate:e=>{me(()=>(m.after_navigate.push(e),()=>{const s=m.after_navigate.indexOf(e);m.after_navigate.splice(s,1)}))},before_navigate:e=>{me(()=>(m.before_navigate.push(e),()=>{const s=m.before_navigate.indexOf(e);m.before_navigate.splice(s,1)}))},on_navigate:e=>{me(()=>(m.on_navigate.push(e),()=>{const s=m.on_navigate.indexOf(e);m.on_navigate.splice(s,1)}))},disable_scroll_handling:()=>{(C||!T)&&(R=!1)},goto:(e,s={})=>re(e,s,0),invalidate:e=>{if(typeof e=="function")E.push(e);else{const{href:s}=new URL(e,location.href);E.push(n=>n.href===s)}return ke()},invalidate_all:()=>(z=!0,ke()),preload_data:async e=>{const s=new URL(e,De(document)),n=Z(s,!1);if(!n)throw new Error(`Attempted to preload a URL that does not belong to this app: ${s}`);await Le(n)},preload_code:oe,apply_action:async e=>{if(e.type==="error"){const s=new URL(location.href),{branch:n,route:o}=d;if(!o)return;const a=await xe(d.branch.length,n,o.errors);if(a){const c=await X({url:s,params:d.params,branch:n.slice(0,a.idx).concat(a.node),status:e.status??500,error:e.error,route:o});d=c.state,q.$set(c.props),we().then(Ee)}}else e.type==="redirect"?re(e.location,{invalidateAll:!0},0):(q.$set({form:null,page:{...F,form:e.data,status:e.status}}),await we(),q.$set({form:e.data}),e.type==="success"&&Ee())},_start_router:()=>{var s;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let o=!1;if(Ie(),!U){const a=Be(d,void 0,null,"leave"),c={...a.navigation,cancel:()=>{o=!0,a.reject(new Error("navigation was cancelled"))}};m.before_navigate.forEach(p=>p(c))}o?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ie()}),(s=navigator.connection)!=null&&s.saveData||Xe(),u.addEventListener("click",n=>{var P;if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const o=Ce(n.composedPath()[0],u);if(!o)return;const{url:a,external:c,target:p,download:v}=_e(o,G);if(!a)return;if(p==="_parent"||p==="_top"){if(window.parent!==window)return}else if(p&&p!=="_self")return;const b=le(o);if(!(o instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||v)return;if(c||b.reload){Ue({url:a,type:"link"})?U=!0:n.preventDefault();return}const[L,A]=a.href.split("#");if(A!==void 0&&L===location.href.split("#")[0]){if(d.url.hash===a.hash){n.preventDefault(),(P=o.ownerDocument.getElementById(A))==null||P.scrollIntoView();return}if(D=!0,be(x),e(a),!b.replace_state)return;D=!1,n.preventDefault()}ce({url:a,scroll:b.noscroll?te():null,keepfocus:b.keep_focus??!1,redirect_count:0,details:{state:{},replaceState:b.replace_state??a.href===location.href},accepted:()=>n.preventDefault(),blocked:()=>n.preventDefault(),type:"link"})}),u.addEventListener("submit",n=>{if(n.defaultPrevented)return;const o=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formMethod)||o.method)!=="get")return;const p=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||o.action);if(ye(p,G))return;const v=n.target,{keep_focus:b,noscroll:y,reload:L,replace_state:A}=le(v);if(L)return;n.preventDefault(),n.stopPropagation();const P=new FormData(v),_=a==null?void 0:a.getAttribute("name");_&&P.append(_,(a==null?void 0:a.getAttribute("value"))??""),p.search=new URLSearchParams(P).toString(),ce({url:p,scroll:y?te():null,keepfocus:b??!1,redirect_count:0,details:{state:{},replaceState:A??p.href===location.href},nav_token:{},accepted:()=>{},blocked:()=>{},type:"form"})}),addEventListener("popstate",async n=>{var o;if(W={},(o=n.state)!=null&&o[V]){if(n.state[V]===x)return;const a=J[n.state[V]],c=new URL(location.href);if(d.url.href.split("#")[0]===location.href.split("#")[0]){e(c),J[x]=te(),x=n.state[V],scrollTo(a.x,a.y);return}const p=n.state[V]-x;await ce({url:c,scroll:a,keepfocus:!1,redirect_count:0,details:null,accepted:()=>{x=n.state[V]},blocked:()=>{history.go(-p)},type:"popstate",delta:p,nav_token:W})}else if(!D){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{D&&(D=!1,history.replaceState({...history.state,[V]:++x},"",location.href))});for(const n of document.querySelectorAll("link"))n.rel==="icon"&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&H.navigating.set(null)});function e(n){d.url=n,H.page.set({...F,url:n}),H.page.notify()}},_hydrate:async({status:e=200,error:s,node_ids:n,params:o,route:a,data:c,form:p})=>{j=!0;const v=new URL(location.href);({params:o={},route:a={id:null}}=Z(v,!1)||{});let b;try{const y=n.map(async(P,_)=>{const w=c[_];return w!=null&&w.uses&&(w.uses=Ye(w.uses)),ue({loader:t.nodes[P],url:v,params:o,route:a,parent:async()=>{const O={};for(let N=0;N<_;N+=1)Object.assign(O,(await y[N]).data);return O},server_data_node:de(w)})}),L=await Promise.all(y),A=f.find(({id:P})=>P===a.id);if(A){const P=A.layouts;for(let _=0;_u?"1":"0").join(""));const i=await Ke(f.href);if((h=i.headers.get("content-type"))!=null&&h.includes("text/html")&&await K(t),!i.ok)throw new ne(i.status,await i.json());return new Promise(async u=>{var j;const E=new Map,l=i.body.getReader(),g=new TextDecoder;function m(T){return Et(T,{Promise:R=>new Promise((C,U)=>{E.set(R,{fulfil:C,reject:U})})})}let d="";for(;;){const{done:T,value:R}=await l.read();if(T&&!d)break;for(d+=!R&&d?` +import{o as me,t as we}from"../chunks/scheduler.c03d0109.js";import{S as Ge,a as Je,I as V,g as De,f as Ce,b as _e,c as le,s as te,i as ye,d as H,o as Me,e as G,P as Ve,h as Ze}from"../chunks/singletons.f3045a7f.js";function Qe(t,r){return t==="/"||r==="ignore"?t:r==="never"?t.endsWith("/")?t.slice(0,-1):t:r==="always"&&!t.endsWith("/")?t+"/":t}function et(t){return t.split("%25").map(decodeURI).join("%25")}function tt(t){for(const r in t)t[r]=decodeURIComponent(t[r]);return t}const nt=["href","pathname","search","searchParams","toString","toJSON"];function at(t,r){const f=new URL(t);for(const i of nt)Object.defineProperty(f,i,{get(){return r(),t[i]},enumerable:!0,configurable:!0});return rt(f),f}function rt(t){Object.defineProperty(t,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}const ot="/__data.json";function it(t){return t.replace(/\/$/,"")+ot}function st(...t){let r=5381;for(const f of t)if(typeof f=="string"){let i=f.length;for(;i;)r=r*33^f.charCodeAt(--i)}else if(ArrayBuffer.isView(f)){const i=new Uint8Array(f.buffer,f.byteOffset,f.byteLength);let h=i.length;for(;h;)r=r*33^i[--h]}else throw new TypeError("value must be a string or TypedArray");return(r>>>0).toString(36)}const Ke=window.fetch;window.fetch=(t,r)=>((t instanceof Request?t.method:(r==null?void 0:r.method)||"GET")!=="GET"&&ae.delete(Se(t)),Ke(t,r));const ae=new Map;function ct(t,r){const f=Se(t,r),i=document.querySelector(f);if(i!=null&&i.textContent){const{body:h,...u}=JSON.parse(i.textContent),E=i.getAttribute("data-ttl");return E&&ae.set(f,{body:h,init:u,ttl:1e3*Number(E)}),Promise.resolve(new Response(h,u))}return window.fetch(t,r)}function lt(t,r,f){if(ae.size>0){const i=Se(t,f),h=ae.get(i);if(h){if(performance.now(){const h=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(i);if(h)return r.push({name:h[1],matcher:h[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const u=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(i);if(u)return r.push({name:u[1],matcher:u[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!i)return;const E=i.split(/\[(.+?)\](?!\])/);return"/"+E.map((g,m)=>{if(m%2){if(g.startsWith("x+"))return ve(String.fromCharCode(parseInt(g.slice(2),16)));if(g.startsWith("u+"))return ve(String.fromCharCode(...g.slice(2).split("-").map(U=>parseInt(U,16))));const d=ft.exec(g);if(!d)throw new Error(`Invalid param: ${g}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,j,T,R,C]=d;return r.push({name:R,matcher:C,optional:!!j,rest:!!T,chained:T?m===1&&E[0]==="":!1}),T?"(.*?)":j?"([^/]*)?":"([^/]+?)"}return ve(g)}).join("")}).join("")}/?$`),params:r}}function dt(t){return!/^\([^)]+\)$/.test(t)}function pt(t){return t.slice(1).split("/").filter(dt)}function ht(t,r,f){const i={},h=t.slice(1),u=h.filter(l=>l!==void 0);let E=0;for(let l=0;ld).join("/"),E=0),m===void 0){g.rest&&(i[g.name]="");continue}if(!g.matcher||f[g.matcher](m)){i[g.name]=m;const d=r[l+1],j=h[l+1];d&&!d.rest&&d.optional&&j&&g.chained&&(E=0),!d&&!j&&Object.keys(i).length===u.length&&(E=0);continue}if(g.optional&&g.chained){E++;continue}return}if(!E)return i}function ve(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function gt({nodes:t,server_loads:r,dictionary:f,matchers:i}){const h=new Set(r);return Object.entries(f).map(([l,[g,m,d]])=>{const{pattern:j,params:T}=ut(l),R={id:l,exec:C=>{const U=j.exec(C);if(U)return ht(U,T,i)},errors:[1,...d||[]].map(C=>t[C]),layouts:[0,...m||[]].map(E),leaf:u(g)};return R.errors.length=R.layouts.length=Math.max(R.errors.length,R.layouts.length),R});function u(l){const g=l<0;return g&&(l=~l),[g,t[l]]}function E(l){return l===void 0?l:[h.has(l),t[l]]}}function ze(t){try{return JSON.parse(sessionStorage[t])}catch{}}function qe(t,r){const f=JSON.stringify(r);try{sessionStorage[t]=f}catch{}}const mt=-1,wt=-2,_t=-3,yt=-4,vt=-5,bt=-6;function Et(t,r){if(typeof t=="number")return h(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const f=t,i=Array(f.length);function h(u,E=!1){if(u===mt)return;if(u===_t)return NaN;if(u===yt)return 1/0;if(u===vt)return-1/0;if(u===bt)return-0;if(E)throw new Error("Invalid input");if(u in i)return i[u];const l=f[u];if(!l||typeof l!="object")i[u]=l;else if(Array.isArray(l))if(typeof l[0]=="string"){const g=l[0],m=r==null?void 0:r[g];if(m)return i[u]=m(h(l[1]));switch(g){case"Date":i[u]=new Date(l[1]);break;case"Set":const d=new Set;i[u]=d;for(let R=1;Rr!=null)}const We=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...We];const kt=new Set([...We]);[...kt];async function Rt(t){var r;for(const f in t)if(typeof((r=t[f])==null?void 0:r.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(t).map(async([i,h])=>[i,await h])));return t}class ne{constructor(r,f){this.status=r,typeof f=="string"?this.body={message:f}:f?this.body=f:this.body={message:`Error: ${r}`}}toString(){return JSON.stringify(this.body)}}class Fe{constructor(r,f){this.status=r,this.location=f}}const At="x-sveltekit-invalidated",It="x-sveltekit-trailing-slash",J=ze(Ge)??{},ee=ze(Je)??{};function be(t){J[t]=te()}function K(t){return location.href=t.href,new Promise(()=>{})}function Lt(t,r){var Ne;const f=gt(t),i=t.nodes[0],h=t.nodes[1];i(),h();const u=document.documentElement,E=[],l=[];let g=null;const m={before_navigate:[],on_navigate:[],after_navigate:[]};let d={branch:[],error:null,url:null},j=!1,T=!1,R=!0,C=!1,U=!1,D=!1,z=!1,q,x=(Ne=history.state)==null?void 0:Ne[V];x||(x=Date.now(),history.replaceState({...history.state,[V]:x},"",location.href));const fe=J[x];fe&&(history.scrollRestoration="manual",scrollTo(fe.x,fe.y));let F,W,Y;async function ke(){if(Y=Y||Promise.resolve(),await Y,!Y)return;Y=null;const e=new URL(location.href),s=Z(e,!0);g=null;const n=W={},o=s&&await pe(s);if(n===W&&o){if(o.type==="redirect")return re(new URL(o.location,e).href,{},1,n);o.props.page!==void 0&&(F=o.props.page),q.$set(o.props)}}function Re(e){l.some(s=>s==null?void 0:s.snapshot)&&(ee[e]=l.map(s=>{var n;return(n=s==null?void 0:s.snapshot)==null?void 0:n.capture()}))}function Ae(e){var s;(s=ee[e])==null||s.forEach((n,o)=>{var a,c;(c=(a=l[o])==null?void 0:a.snapshot)==null||c.restore(n)})}function Ie(){be(x),qe(Ge,J),Re(x),qe(Je,ee)}async function re(e,{noScroll:s=!1,replaceState:n=!1,keepFocus:o=!1,state:a={},invalidateAll:c=!1},p,v){return typeof e=="string"&&(e=new URL(e,De(document))),ce({url:e,scroll:s?te():null,keepfocus:o,redirect_count:p,details:{state:a,replaceState:n},nav_token:v,accepted:()=>{c&&(z=!0)},blocked:()=>{},type:"goto"})}async function Le(e){return g={id:e.id,promise:pe(e).then(s=>(s.type==="loaded"&&s.state.error&&(g=null),s))},g.promise}async function oe(...e){const n=f.filter(o=>e.some(a=>o.exec(a))).map(o=>Promise.all([...o.layouts,o.leaf].map(a=>a==null?void 0:a[1]())));await Promise.all(n)}function Pe(e){var o;d=e.state;const s=document.querySelector("style[data-sveltekit]");s&&s.remove(),F=e.props.page,q=new t.root({target:r,props:{...e.props,stores:H,components:l},hydrate:!0}),Ae(x);const n={from:null,to:{params:d.params,route:{id:((o=d.route)==null?void 0:o.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};m.after_navigate.forEach(a=>a(n)),T=!0}async function X({url:e,params:s,branch:n,status:o,error:a,route:c,form:p}){let v="never";for(const _ of n)(_==null?void 0:_.slash)!==void 0&&(v=_.slash);e.pathname=Qe(e.pathname,v),e.search=e.search;const b={type:"loaded",state:{url:e,params:s,branch:n,error:a,route:c},props:{constructors:St(n).map(_=>_.node.component)}};p!==void 0&&(b.props.form=p);let y={},L=!F,A=0;for(let _=0;_(v.route=!0,w[O])}),params:new Proxy(o,{get:(w,O)=>(v.params.add(O),w[O])}),data:(c==null?void 0:c.data)??null,url:at(n,()=>{v.url=!0}),async fetch(w,O){let N;w instanceof Request?(N=w.url,O={body:w.method==="GET"||w.method==="HEAD"?void 0:await w.blob(),cache:w.cache,credentials:w.credentials,headers:w.headers,integrity:w.integrity,keepalive:w.keepalive,method:w.method,mode:w.mode,redirect:w.redirect,referrer:w.referrer,referrerPolicy:w.referrerPolicy,signal:w.signal,...O}):N=w;const M=new URL(N,n);return P(M.href),M.origin===n.origin&&(N=M.href.slice(n.origin.length)),T?lt(N,M.href,O):ct(N,O)},setHeaders:()=>{},depends:P,parent(){return v.parent=!0,s()}};p=await b.universal.load.call(null,_)??null,p=p?await Rt(p):null}return{node:b,loader:e,server:c,universal:(L=b.universal)!=null&&L.load?{type:"data",data:p,uses:v}:null,data:p??(c==null?void 0:c.data)??null,slash:((A=b.universal)==null?void 0:A.trailingSlash)??(c==null?void 0:c.slash)}}function Oe(e,s,n,o,a){if(z)return!0;if(!o)return!1;if(o.parent&&e||o.route&&s||o.url&&n)return!0;for(const c of o.params)if(a[c]!==d.params[c])return!0;for(const c of o.dependencies)if(E.some(p=>p(new URL(c))))return!0;return!1}function de(e,s){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?s??null:null}async function pe({id:e,invalidating:s,url:n,params:o,route:a}){if((g==null?void 0:g.id)===e)return g.promise;const{errors:c,layouts:p,leaf:v}=a,b=[...p,v];c.forEach(S=>S==null?void 0:S().catch(()=>{})),b.forEach(S=>S==null?void 0:S[1]().catch(()=>{}));let y=null;const L=d.url?e!==d.url.pathname+d.url.search:!1,A=d.route?a.id!==d.route.id:!1;let P=!1;const _=b.map((S,I)=>{var B;const k=d.branch[I],$=!!(S!=null&&S[0])&&((k==null?void 0:k.loader)!==S[1]||Oe(P,A,L,(B=k.server)==null?void 0:B.uses,o));return $&&(P=!0),$});if(_.some(Boolean)){try{y=await He(n,_)}catch(S){return ie({status:S instanceof ne?S.status:500,error:await Q(S,{url:n,params:o,route:{id:a.id}}),url:n,route:a})}if(y.type==="redirect")return y}const w=y==null?void 0:y.nodes;let O=!1;const N=b.map(async(S,I)=>{var he;if(!S)return;const k=d.branch[I],$=w==null?void 0:w[I];if((!$||$.type==="skip")&&S[1]===(k==null?void 0:k.loader)&&!Oe(O,A,L,(he=k.universal)==null?void 0:he.uses,o))return k;if(O=!0,($==null?void 0:$.type)==="error")throw $;return ue({loader:S[1],url:n,params:o,route:a,parent:async()=>{var Te;const $e={};for(let ge=0;ge{});const M=[];for(let S=0;SPromise.resolve({}),server_data_node:de(c)}),b={node:await h(),loader:h,universal:null,server:null,data:null};return await X({url:n,params:a,branch:[v,b],status:e,error:s,route:null})}function Z(e,s){if(ye(e,G))return;const n=se(e);for(const o of f){const a=o.exec(n);if(a)return{id:e.pathname+e.search,invalidating:s,route:o,params:tt(a),url:e}}}function se(e){return et(e.pathname.slice(G.length)||"/")}function Ue({url:e,type:s,intent:n,delta:o}){let a=!1;const c=Be(d,n,e,s);o!==void 0&&(c.navigation.delta=o);const p={...c.navigation,cancel:()=>{a=!0,c.reject(new Error("navigation was cancelled"))}};return U||m.before_navigate.forEach(v=>v(p)),a?null:c}async function ce({url:e,scroll:s,keepfocus:n,redirect_count:o,details:a,type:c,delta:p,nav_token:v={},accepted:b,blocked:y}){var N,M,S;const L=Z(e,!1),A=Ue({url:e,type:c,delta:p,intent:L});if(!A){y();return}const P=x;b(),U=!0,T&&H.navigating.set(A.navigation),W=v;let _=L&&await pe(L);if(!_){if(ye(e,G))return await K(e);_=await je(e,{id:null},await Q(new Error(`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(L==null?void 0:L.url)||e,W!==v)return A.reject(new Error("navigation was aborted")),!1;if(_.type==="redirect")if(o>=20)_=await ie({status:500,error:await Q(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return re(new URL(_.location,e).href,{},o+1,v),!1;else((N=_.props.page)==null?void 0:N.status)>=400&&await H.updated.check()&&await K(e);if(E.length=0,z=!1,C=!0,be(P),Re(P),(M=_.props.page)!=null&&M.url&&_.props.page.url.pathname!==e.pathname&&(e.pathname=(S=_.props.page)==null?void 0:S.url.pathname),a){const I=a.replaceState?0:1;if(a.state[V]=x+=I,history[a.replaceState?"replaceState":"pushState"](a.state,"",e),!a.replaceState){let k=x+1;for(;ee[k]||J[k];)delete ee[k],delete J[k],k+=1}}if(g=null,T){d=_.state,_.props.page&&(_.props.page.url=e);const I=(await Promise.all(m.on_navigate.map(k=>k(A.navigation)))).filter(k=>typeof k=="function");if(I.length>0){let k=function(){m.after_navigate=m.after_navigate.filter($=>!I.includes($))};I.push(k),m.after_navigate.push(...I)}q.$set(_.props)}else Pe(_);const{activeElement:w}=document;if(await we(),R){const I=e.hash&&document.getElementById(decodeURIComponent(e.hash.slice(1)));s?scrollTo(s.x,s.y):I?I.scrollIntoView():scrollTo(0,0)}const O=document.activeElement!==w&&document.activeElement!==document.body;!n&&!O&&Ee(),R=!0,_.props.page&&(F=_.props.page),U=!1,c==="popstate"&&Ae(x),A.fulfil(void 0),m.after_navigate.forEach(I=>I(A.navigation)),H.navigating.set(null),C=!1}async function je(e,s,n,o){return e.origin===Me&&e.pathname===location.pathname&&!j?await ie({status:o,error:n,url:e,route:s}):await K(e)}function Xe(){let e;u.addEventListener("mousemove",c=>{const p=c.target;clearTimeout(e),e=setTimeout(()=>{o(p,2)},20)});function s(c){o(c.composedPath()[0],1)}u.addEventListener("mousedown",s),u.addEventListener("touchstart",s,{passive:!0});const n=new IntersectionObserver(c=>{for(const p of c)p.isIntersecting&&(oe(se(new URL(p.target.href))),n.unobserve(p.target))},{threshold:0});function o(c,p){const v=Ce(c,u);if(!v)return;const{url:b,external:y,download:L}=_e(v,G);if(y||L)return;const A=le(v);if(!A.reload)if(p<=A.preload_data){const P=Z(b,!1);P&&Le(P)}else p<=A.preload_code&&oe(se(b))}function a(){n.disconnect();for(const c of u.querySelectorAll("a")){const{url:p,external:v,download:b}=_e(c,G);if(v||b)continue;const y=le(c);y.reload||(y.preload_code===Ve.viewport&&n.observe(c),y.preload_code===Ve.eager&&oe(se(p)))}}m.after_navigate.push(a),a()}function Q(e,s){return e instanceof ne?e.body:t.hooks.handleError({error:e,event:s})??{message:s.route.id!=null?"Internal Error":"Not Found"}}return{after_navigate:e=>{me(()=>(m.after_navigate.push(e),()=>{const s=m.after_navigate.indexOf(e);m.after_navigate.splice(s,1)}))},before_navigate:e=>{me(()=>(m.before_navigate.push(e),()=>{const s=m.before_navigate.indexOf(e);m.before_navigate.splice(s,1)}))},on_navigate:e=>{me(()=>(m.on_navigate.push(e),()=>{const s=m.on_navigate.indexOf(e);m.on_navigate.splice(s,1)}))},disable_scroll_handling:()=>{(C||!T)&&(R=!1)},goto:(e,s={})=>re(e,s,0),invalidate:e=>{if(typeof e=="function")E.push(e);else{const{href:s}=new URL(e,location.href);E.push(n=>n.href===s)}return ke()},invalidate_all:()=>(z=!0,ke()),preload_data:async e=>{const s=new URL(e,De(document)),n=Z(s,!1);if(!n)throw new Error(`Attempted to preload a URL that does not belong to this app: ${s}`);await Le(n)},preload_code:oe,apply_action:async e=>{if(e.type==="error"){const s=new URL(location.href),{branch:n,route:o}=d;if(!o)return;const a=await xe(d.branch.length,n,o.errors);if(a){const c=await X({url:s,params:d.params,branch:n.slice(0,a.idx).concat(a.node),status:e.status??500,error:e.error,route:o});d=c.state,q.$set(c.props),we().then(Ee)}}else e.type==="redirect"?re(e.location,{invalidateAll:!0},0):(q.$set({form:null,page:{...F,form:e.data,status:e.status}}),await we(),q.$set({form:e.data}),e.type==="success"&&Ee())},_start_router:()=>{var s;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let o=!1;if(Ie(),!U){const a=Be(d,void 0,null,"leave"),c={...a.navigation,cancel:()=>{o=!0,a.reject(new Error("navigation was cancelled"))}};m.before_navigate.forEach(p=>p(c))}o?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ie()}),(s=navigator.connection)!=null&&s.saveData||Xe(),u.addEventListener("click",n=>{var P;if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const o=Ce(n.composedPath()[0],u);if(!o)return;const{url:a,external:c,target:p,download:v}=_e(o,G);if(!a)return;if(p==="_parent"||p==="_top"){if(window.parent!==window)return}else if(p&&p!=="_self")return;const b=le(o);if(!(o instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||v)return;if(c||b.reload){Ue({url:a,type:"link"})?U=!0:n.preventDefault();return}const[L,A]=a.href.split("#");if(A!==void 0&&L===location.href.split("#")[0]){if(d.url.hash===a.hash){n.preventDefault(),(P=o.ownerDocument.getElementById(A))==null||P.scrollIntoView();return}if(D=!0,be(x),e(a),!b.replace_state)return;D=!1,n.preventDefault()}ce({url:a,scroll:b.noscroll?te():null,keepfocus:b.keep_focus??!1,redirect_count:0,details:{state:{},replaceState:b.replace_state??a.href===location.href},accepted:()=>n.preventDefault(),blocked:()=>n.preventDefault(),type:"link"})}),u.addEventListener("submit",n=>{if(n.defaultPrevented)return;const o=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formMethod)||o.method)!=="get")return;const p=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||o.action);if(ye(p,G))return;const v=n.target,{keep_focus:b,noscroll:y,reload:L,replace_state:A}=le(v);if(L)return;n.preventDefault(),n.stopPropagation();const P=new FormData(v),_=a==null?void 0:a.getAttribute("name");_&&P.append(_,(a==null?void 0:a.getAttribute("value"))??""),p.search=new URLSearchParams(P).toString(),ce({url:p,scroll:y?te():null,keepfocus:b??!1,redirect_count:0,details:{state:{},replaceState:A??p.href===location.href},nav_token:{},accepted:()=>{},blocked:()=>{},type:"form"})}),addEventListener("popstate",async n=>{var o;if(W={},(o=n.state)!=null&&o[V]){if(n.state[V]===x)return;const a=J[n.state[V]],c=new URL(location.href);if(d.url.href.split("#")[0]===location.href.split("#")[0]){e(c),J[x]=te(),x=n.state[V],scrollTo(a.x,a.y);return}const p=n.state[V]-x;await ce({url:c,scroll:a,keepfocus:!1,redirect_count:0,details:null,accepted:()=>{x=n.state[V]},blocked:()=>{history.go(-p)},type:"popstate",delta:p,nav_token:W})}else if(!D){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{D&&(D=!1,history.replaceState({...history.state,[V]:++x},"",location.href))});for(const n of document.querySelectorAll("link"))n.rel==="icon"&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&H.navigating.set(null)});function e(n){d.url=n,H.page.set({...F,url:n}),H.page.notify()}},_hydrate:async({status:e=200,error:s,node_ids:n,params:o,route:a,data:c,form:p})=>{j=!0;const v=new URL(location.href);({params:o={},route:a={id:null}}=Z(v,!1)||{});let b;try{const y=n.map(async(P,_)=>{const w=c[_];return w!=null&&w.uses&&(w.uses=Ye(w.uses)),ue({loader:t.nodes[P],url:v,params:o,route:a,parent:async()=>{const O={};for(let N=0;N<_;N+=1)Object.assign(O,(await y[N]).data);return O},server_data_node:de(w)})}),L=await Promise.all(y),A=f.find(({id:P})=>P===a.id);if(A){const P=A.layouts;for(let _=0;_u?"1":"0").join(""));const i=await Ke(f.href);if((h=i.headers.get("content-type"))!=null&&h.includes("text/html")&&await K(t),!i.ok)throw new ne(i.status,await i.json());return new Promise(async u=>{var j;const E=new Map,l=i.body.getReader(),g=new TextDecoder;function m(T){return Et(T,{Promise:R=>new Promise((C,U)=>{E.set(R,{fulfil:C,reject:U})})})}let d="";for(;;){const{done:T,value:R}=await l.read();if(T&&!d)break;for(d+=!R&&d?` `:g.decode(R);;){const C=d.indexOf(` `);if(C===-1)break;const U=JSON.parse(d.slice(0,C));if(d=d.slice(C+1),U.type==="redirect")return u(U);if(U.type==="data")(j=U.nodes)==null||j.forEach(D=>{(D==null?void 0:D.type)==="data"&&(D.uses=Ye(D.uses),D.data=m(D.data))}),u(U);else if(U.type==="chunk"){const{id:D,data:z,error:q}=U,x=E.get(D);E.delete(D),q?x.reject(m(q)):x.fulfil(m(z))}}}})}function Ye(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url)}}function Ee(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const r=document.body,f=r.getAttribute("tabindex");r.tabIndex=-1,r.focus({preventScroll:!0,focusVisible:!1}),f!==null?r.setAttribute("tabindex",f):r.removeAttribute("tabindex");const i=getSelection();if(i&&i.type!=="None"){const h=[];for(let u=0;u{if(i.rangeCount===h.length){for(let u=0;u{h=d,u=j});return E.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((g=t.route)==null?void 0:g.id)??null},url:t.url},to:f&&{params:(r==null?void 0:r.params)??null,route:{id:((m=r==null?void 0:r.route)==null?void 0:m.id)??null},url:f},willUnload:!r,type:i,complete:E},fulfil:h,reject:u}}async function xt(t,r,f){const i=Lt(t,r);Ze({client:i}),f?await i._hydrate(f):i.goto(location.href,{replaceState:!0}),i._start_router()}export{xt as start}; diff --git a/internal/immutable/nodes/1.dd65cf12.js b/internal/immutable/nodes/1.779364d8.js similarity index 93% rename from internal/immutable/nodes/1.dd65cf12.js rename to internal/immutable/nodes/1.779364d8.js index 91c83f6..717ceae 100644 --- a/internal/immutable/nodes/1.dd65cf12.js +++ b/internal/immutable/nodes/1.779364d8.js @@ -1 +1 @@ -import{s as x,n as _,e as S}from"../chunks/scheduler.c03d0109.js";import{S as j,i as q,g as f,m as d,s as y,h as g,j as h,n as v,f as u,c as C,a as m,x as $,o as E}from"../chunks/index.bd9bea11.js";import{d as H}from"../chunks/singletons.3f4538c9.js";const P=()=>{const s=H;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},k={subscribe(s){return P().page.subscribe(s)}};function w(s){var b;let t,r=s[0].status+"",o,n,i,c=((b=s[0].error)==null?void 0:b.message)+"",l;return{c(){t=f("h1"),o=d(r),n=y(),i=f("p"),l=d(c)},l(e){t=g(e,"H1",{});var a=h(t);o=v(a,r),a.forEach(u),n=C(e),i=g(e,"P",{});var p=h(i);l=v(p,c),p.forEach(u)},m(e,a){m(e,t,a),$(t,o),m(e,n,a),m(e,i,a),$(i,l)},p(e,[a]){var p;a&1&&r!==(r=e[0].status+"")&&E(o,r),a&1&&c!==(c=((p=e[0].error)==null?void 0:p.message)+"")&&E(l,c)},i:_,o:_,d(e){e&&(u(t),u(n),u(i))}}}function z(s,t,r){let o;return S(s,k,n=>r(0,o=n)),[o]}let F=class extends j{constructor(t){super(),q(this,t,z,w,x,{})}};export{F as component}; +import{s as x,n as _,e as S}from"../chunks/scheduler.c03d0109.js";import{S as j,i as q,g as f,m as d,s as y,h as g,j as h,n as v,f as u,c as C,a as m,x as $,o as E}from"../chunks/index.bd9bea11.js";import{d as H}from"../chunks/singletons.f3045a7f.js";const P=()=>{const s=H;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},k={subscribe(s){return P().page.subscribe(s)}};function w(s){var b;let t,r=s[0].status+"",o,n,i,c=((b=s[0].error)==null?void 0:b.message)+"",l;return{c(){t=f("h1"),o=d(r),n=y(),i=f("p"),l=d(c)},l(e){t=g(e,"H1",{});var a=h(t);o=v(a,r),a.forEach(u),n=C(e),i=g(e,"P",{});var p=h(i);l=v(p,c),p.forEach(u)},m(e,a){m(e,t,a),$(t,o),m(e,n,a),m(e,i,a),$(i,l)},p(e,[a]){var p;a&1&&r!==(r=e[0].status+"")&&E(o,r),a&1&&c!==(c=((p=e[0].error)==null?void 0:p.message)+"")&&E(l,c)},i:_,o:_,d(e){e&&(u(t),u(n),u(i))}}}function z(s,t,r){let o;return S(s,k,n=>r(0,o=n)),[o]}let F=class extends j{constructor(t){super(),q(this,t,z,w,x,{})}};export{F as component}; diff --git a/internal/immutable/nodes/2.ab1300f0.js b/internal/immutable/nodes/2.178b744f.js similarity index 99% rename from internal/immutable/nodes/2.ab1300f0.js rename to internal/immutable/nodes/2.178b744f.js index c805792..1b5df72 100644 --- a/internal/immutable/nodes/2.ab1300f0.js +++ b/internal/immutable/nodes/2.178b744f.js @@ -3801,4 +3801,4 @@ void main() { } -`,$I={fragmentShader:ZI,vertexShader:jI},eM=r=>({ref:r[0]&1}),Ud=r=>({ref:r[0]});function tM(r){let e,t;return e=new ct.PlaneGeometry({props:{args:typeof r[1]=="number"?[r[1],r[1]]:r[1]}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,i){const s={};i[0]&2&&(s.args=typeof n[1]=="number"?[n[1],n[1]]:n[1]),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function nM(r){let e,t,n;e=new ct.ShaderMaterial({props:{fragmentShader:r[4],vertexShader:r[5],uniforms:r[2],transparent:!0,side:fn,defines:{USE_COLORSPACE_FRAGMENT:KI>=154?"":void 0}}});const i=r[26].default,s=gn(i,r,r[29],Ud),a=s||tM(r);return{c(){Qe(e.$$.fragment),t=mt(),a&&a.c()},l(o){ke(e.$$.fragment,o),t=bt(o),a&&a.l(o)},m(o,c){Oe(e,o,c),dt(o,t,c),a&&a.m(o,c),n=!0},p(o,c){const l={};c[0]&4&&(l.uniforms=o[2]),e.$set(l),s?s.p&&(!n||c[0]&536870913)&&mn(s,i,o,o[29],n?_n(i,o[29],c,eM):bn(o[29]),Ud):a&&a.p&&(!n||c[0]&2)&&a.p(o,n?c:[-1,-1])},i(o){n||(_e(e.$$.fragment,o),_e(a,o),n=!0)},o(o){ye(e.$$.fragment,o),ye(a,o),n=!1},d(o){o&&ht(t),Ge(e,o),a&&a.d(o)}}}function iM(r){let e,t,n;const i=[{frustumCulled:!1},r[7]];function s(o){r[28](o)}let a={$$slots:{default:[nM,({ref:o})=>({0:o}),({ref:o})=>[o?1:0]]},$$scope:{ctx:r}};for(let o=0;oyo(e,"ref",s)),{c(){Qe(e.$$.fragment)},l(o){ke(e.$$.fragment,o)},m(o,c){Oe(e,o,c),n=!0},p(o,c){const l=c[0]&128?fa(i,[i[0],da(o[7])]):{};c[0]&536870919&&(l.$$scope={dirty:c,ctx:o}),!t&&c[0]&1&&(t=!0,l.ref=o[0],_o(()=>t=!1)),e.$set(l)},i(o){n||(_e(e.$$.fragment,o),n=!0)},o(o){ye(e.$$.fragment,o),n=!1},d(o){r[27](null),Ge(e,o)}}}function sM(r,e,t){const n=["cellColor","sectionColor","cellSize","backgroundColor","backgroundOpacity","sectionSize","plane","gridSize","followCamera","infiniteGrid","fadeDistance","fadeStrength","cellThickness","sectionThickness","type","axis","maxRadius","cellDividers","sectionDividers","ref"];let i=Bn(e,n),s,{$$slots:a={},$$scope:o}=e,{cellColor:c="#000000"}=e,{sectionColor:l="#0000ee"}=e,{cellSize:h=1}=e,{backgroundColor:u="#dadada"}=e,{backgroundOpacity:f=0}=e,{sectionSize:d=10}=e,{plane:p="xz"}=e,{gridSize:m=[20,20]}=e,{followCamera:g=!1}=e,{infiniteGrid:A=!1}=e,{fadeDistance:_=100}=e,{fadeStrength:b=1}=e,{cellThickness:y=1}=e,{sectionThickness:x=2}=e,{type:v="grid"}=e,{axis:C="x"}=e,{maxRadius:B=0}=e,{cellDividers:E=6}=e,{sectionDividers:I=2}=e,{ref:P}=e;const{fragmentShader:H,vertexShader:J}=$I,{invalidate:N}=mi();let D={uSize1:{value:h},uSize2:{value:d},uColor1:{value:new Ae(c)},uColor2:{value:new Ae(l)},uBackgroundColor:{value:new Ae("#aaaaaa")},uBackgroundOpacity:{value:.7},uFadeDistance:{value:_},uFadeStrength:{value:b},uThickness1:{value:1},uThickness2:{value:1},uInfiniteGrid:{value:A?1:0},uFollowCamera:{value:0},uCoord0:{value:0},uCoord1:{value:2},uCoord2:{value:1},uGridType:{value:0},uLineGridCoord:{value:0},uCircleGridMaxRadius:{value:9},uPolarCellDividers:{value:6},uPolarSectionDividers:{value:2}};const z={x:0,y:1,z:2},G={xz:"xzy",xy:"xyz",zy:"zyx"},Z=Tc();vt(r,Z,R=>t(3,s=R));function V(R){ui[R?"unshift":"push"](()=>{s=R,Z.set(s)})}function K(R){P=R,t(0,P)}return r.$$set=R=>{e=Vt(Vt({},e),ps(R)),t(7,i=Bn(e,n)),"cellColor"in R&&t(8,c=R.cellColor),"sectionColor"in R&&t(9,l=R.sectionColor),"cellSize"in R&&t(10,h=R.cellSize),"backgroundColor"in R&&t(11,u=R.backgroundColor),"backgroundOpacity"in R&&t(12,f=R.backgroundOpacity),"sectionSize"in R&&t(13,d=R.sectionSize),"plane"in R&&t(14,p=R.plane),"gridSize"in R&&t(1,m=R.gridSize),"followCamera"in R&&t(15,g=R.followCamera),"infiniteGrid"in R&&t(16,A=R.infiniteGrid),"fadeDistance"in R&&t(17,_=R.fadeDistance),"fadeStrength"in R&&t(18,b=R.fadeStrength),"cellThickness"in R&&t(19,y=R.cellThickness),"sectionThickness"in R&&t(20,x=R.sectionThickness),"type"in R&&t(21,v=R.type),"axis"in R&&t(22,C=R.axis),"maxRadius"in R&&t(23,B=R.maxRadius),"cellDividers"in R&&t(24,E=R.cellDividers),"sectionDividers"in R&&t(25,I=R.sectionDividers),"ref"in R&&t(0,P=R.ref),"$$scope"in R&&t(29,o=R.$$scope)},r.$$.update=()=>{if(r.$$.dirty[0]&67108608){const R=G[p],W=R.charAt(0),fe=R.charAt(1),ge=R.charAt(2);t(2,D.uCoord0.value=z[W],D),t(2,D.uCoord1.value=z[fe],D),t(2,D.uCoord2.value=z[ge],D),t(2,D.uSize1={value:h},D),t(2,D.uSize2={value:d},D),t(2,D.uColor1={value:new Ae(c)},D),t(2,D.uColor2={value:new Ae(l)},D),t(2,D.uBackgroundColor={value:new Ae(u)},D),t(2,D.uBackgroundOpacity={value:f},D),t(2,D.uFadeDistance={value:_},D),t(2,D.uFadeStrength={value:b},D),t(2,D.uThickness1={value:y},D),t(2,D.uThickness2={value:x},D),t(2,D.uFollowCamera={value:g?1:0},D),t(2,D.uInfiniteGrid={value:A?1:0},D),v=="grid"&&t(2,D.uGridType={value:0},D),v==="lines"&&(t(2,D.uGridType={value:1},D),t(2,D.uLineGridCoord={value:z[C]},D)),v==="circular"&&(t(2,D.uGridType={value:2},D),t(2,D.uCircleGridMaxRadius={value:B||0},D)),v==="polar"&&(t(2,D.uGridType={value:3},D),t(2,D.uCircleGridMaxRadius={value:B||0},D),t(2,D.uPolarCellDividers={value:E||0},D),t(2,D.uPolarSectionDividers={value:I||0},D)),N()}},[P,m,D,s,H,J,Z,i,c,l,h,u,f,d,p,g,A,_,b,y,x,v,C,B,E,I,a,V,K,o]}class rM extends Zt{constructor(e){super(),$t(this,e,sM,iM,jt,{cellColor:8,sectionColor:9,cellSize:10,backgroundColor:11,backgroundOpacity:12,sectionSize:13,plane:14,gridSize:1,followCamera:15,infiniteGrid:16,fadeDistance:17,fadeStrength:18,cellThickness:19,sectionThickness:20,type:21,axis:22,maxRadius:23,cellDividers:24,sectionDividers:25,ref:0},null,[-1,-1])}}const aM=()=>QS("threlte-controls",{orbitControls:Kt(void 0)}),Fd={type:"change"},Tl={type:"start"},Nd={type:"end"},mo=new Cs,Qd=new ci,oM=Math.cos(70*tc.DEG2RAD);let cM=class extends jn{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new M,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:ji.ROTATE,MIDDLE:ji.DOLLY,RIGHT:ji.PAN},this.touches={ONE:Zi.ROTATE,TWO:Zi.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return o.phi},this.getAzimuthalAngle=function(){return o.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(F){F.addEventListener("keydown",S),this._domElementKeyEvents=F},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",S),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(Fd),n.update(),s=i.NONE},this.update=function(){const F=new M,ce=new Ht().setFromUnitVectors(e.up,new M(0,1,0)),$=ce.clone().invert(),ze=new M,De=new Ht,Ue=new M,Te=2*Math.PI;return function(ue=null){const le=n.object.position;F.copy(le).sub(n.target),F.applyQuaternion(ce),o.setFromVector3(F),n.autoRotate&&s===i.NONE&&P(E(ue)),n.enableDamping?(o.theta+=c.theta*n.dampingFactor,o.phi+=c.phi*n.dampingFactor):(o.theta+=c.theta,o.phi+=c.phi);let me=n.minAzimuthAngle,de=n.maxAzimuthAngle;isFinite(me)&&isFinite(de)&&(me<-Math.PI?me+=Te:me>Math.PI&&(me-=Te),de<-Math.PI?de+=Te:de>Math.PI&&(de-=Te),me<=de?o.theta=Math.max(me,Math.min(de,o.theta)):o.theta=o.theta>(me+de)/2?Math.max(me,o.theta):Math.min(de,o.theta)),o.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,o.phi)),o.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(h,n.dampingFactor):n.target.add(h),n.zoomToCursor&&v||n.object.isOrthographicCamera?o.radius=V(o.radius):o.radius=V(o.radius*l),F.setFromSpherical(o),F.applyQuaternion($),le.copy(n.target).add(F),n.object.lookAt(n.target),n.enableDamping===!0?(c.theta*=1-n.dampingFactor,c.phi*=1-n.dampingFactor,h.multiplyScalar(1-n.dampingFactor)):(c.set(0,0,0),h.set(0,0,0));let te=!1;if(n.zoomToCursor&&v){let Ie=null;if(n.object.isPerspectiveCamera){const Ve=F.length();Ie=V(Ve*l);const wt=Ve-Ie;n.object.position.addScaledVector(y,wt),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const Ve=new M(x.x,x.y,0);Ve.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/l)),n.object.updateProjectionMatrix(),te=!0;const wt=new M(x.x,x.y,0);wt.unproject(n.object),n.object.position.sub(wt).add(Ve),n.object.updateMatrixWorld(),Ie=F.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;Ie!==null&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(Ie).add(n.object.position):(mo.origin.copy(n.object.position),mo.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(mo.direction))a||8*(1-De.dot(n.object.quaternion))>a||Ue.distanceToSquared(n.target)>0?(n.dispatchEvent(Fd),ze.copy(n.object.position),De.copy(n.object.quaternion),Ue.copy(n.target),te=!1,!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",ie),n.domElement.removeEventListener("pointerdown",xe),n.domElement.removeEventListener("pointercancel",Ne),n.domElement.removeEventListener("wheel",T),n.domElement.removeEventListener("pointermove",ve),n.domElement.removeEventListener("pointerup",Ne),n._domElementKeyEvents!==null&&(n._domElementKeyEvents.removeEventListener("keydown",S),n._domElementKeyEvents=null)};const n=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let s=i.NONE;const a=1e-6,o=new mh,c=new mh;let l=1;const h=new M,u=new Y,f=new Y,d=new Y,p=new Y,m=new Y,g=new Y,A=new Y,_=new Y,b=new Y,y=new M,x=new Y;let v=!1;const C=[],B={};function E(F){return F!==null?2*Math.PI/60*n.autoRotateSpeed*F:2*Math.PI/60/60*n.autoRotateSpeed}function I(){return Math.pow(.95,n.zoomSpeed)}function P(F){c.theta-=F}function H(F){c.phi-=F}const J=function(){const F=new M;return function($,ze){F.setFromMatrixColumn(ze,0),F.multiplyScalar(-$),h.add(F)}}(),N=function(){const F=new M;return function($,ze){n.screenSpacePanning===!0?F.setFromMatrixColumn(ze,1):(F.setFromMatrixColumn(ze,0),F.crossVectors(n.object.up,F)),F.multiplyScalar($),h.add(F)}}(),D=function(){const F=new M;return function($,ze){const De=n.domElement;if(n.object.isPerspectiveCamera){const Ue=n.object.position;F.copy(Ue).sub(n.target);let Te=F.length();Te*=Math.tan(n.object.fov/2*Math.PI/180),J(2*$*Te/De.clientHeight,n.object.matrix),N(2*ze*Te/De.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(J($*(n.object.right-n.object.left)/n.object.zoom/De.clientWidth,n.object.matrix),N(ze*(n.object.top-n.object.bottom)/n.object.zoom/De.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function z(F){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?l/=F:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function G(F){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?l*=F:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function Z(F){if(!n.zoomToCursor)return;v=!0;const ce=n.domElement.getBoundingClientRect(),$=F.clientX-ce.left,ze=F.clientY-ce.top,De=ce.width,Ue=ce.height;x.x=$/De*2-1,x.y=-(ze/Ue)*2+1,y.set(x.x,x.y,1).unproject(n.object).sub(n.object.position).normalize()}function V(F){return Math.max(n.minDistance,Math.min(n.maxDistance,F))}function K(F){u.set(F.clientX,F.clientY)}function R(F){Z(F),A.set(F.clientX,F.clientY)}function W(F){p.set(F.clientX,F.clientY)}function fe(F){f.set(F.clientX,F.clientY),d.subVectors(f,u).multiplyScalar(n.rotateSpeed);const ce=n.domElement;P(2*Math.PI*d.x/ce.clientHeight),H(2*Math.PI*d.y/ce.clientHeight),u.copy(f),n.update()}function ge(F){_.set(F.clientX,F.clientY),b.subVectors(_,A),b.y>0?z(I()):b.y<0&&G(I()),A.copy(_),n.update()}function Ee(F){m.set(F.clientX,F.clientY),g.subVectors(m,p).multiplyScalar(n.panSpeed),D(g.x,g.y),p.copy(m),n.update()}function Le(F){Z(F),F.deltaY<0?G(I()):F.deltaY>0&&z(I()),n.update()}function we(F){let ce=!1;switch(F.code){case n.keys.UP:F.ctrlKey||F.metaKey||F.shiftKey?H(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):D(0,n.keyPanSpeed),ce=!0;break;case n.keys.BOTTOM:F.ctrlKey||F.metaKey||F.shiftKey?H(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):D(0,-n.keyPanSpeed),ce=!0;break;case n.keys.LEFT:F.ctrlKey||F.metaKey||F.shiftKey?P(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):D(n.keyPanSpeed,0),ce=!0;break;case n.keys.RIGHT:F.ctrlKey||F.metaKey||F.shiftKey?P(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):D(-n.keyPanSpeed,0),ce=!0;break}ce&&(F.preventDefault(),n.update())}function Be(){if(C.length===1)u.set(C[0].pageX,C[0].pageY);else{const F=.5*(C[0].pageX+C[1].pageX),ce=.5*(C[0].pageY+C[1].pageY);u.set(F,ce)}}function ne(){if(C.length===1)p.set(C[0].pageX,C[0].pageY);else{const F=.5*(C[0].pageX+C[1].pageX),ce=.5*(C[0].pageY+C[1].pageY);p.set(F,ce)}}function qe(){const F=C[0].pageX-C[1].pageX,ce=C[0].pageY-C[1].pageY,$=Math.sqrt(F*F+ce*ce);A.set(0,$)}function Pe(){n.enableZoom&&qe(),n.enablePan&&ne()}function U(){n.enableZoom&&qe(),n.enableRotate&&Be()}function he(F){if(C.length==1)f.set(F.pageX,F.pageY);else{const $=be(F),ze=.5*(F.pageX+$.x),De=.5*(F.pageY+$.y);f.set(ze,De)}d.subVectors(f,u).multiplyScalar(n.rotateSpeed);const ce=n.domElement;P(2*Math.PI*d.x/ce.clientHeight),H(2*Math.PI*d.y/ce.clientHeight),u.copy(f)}function j(F){if(C.length===1)m.set(F.pageX,F.pageY);else{const ce=be(F),$=.5*(F.pageX+ce.x),ze=.5*(F.pageY+ce.y);m.set($,ze)}g.subVectors(m,p).multiplyScalar(n.panSpeed),D(g.x,g.y),p.copy(m)}function re(F){const ce=be(F),$=F.pageX-ce.x,ze=F.pageY-ce.y,De=Math.sqrt($*$+ze*ze);_.set(0,De),b.set(0,Math.pow(_.y/A.y,n.zoomSpeed)),z(b.y),A.copy(_)}function ee(F){n.enableZoom&&re(F),n.enablePan&&j(F)}function Re(F){n.enableZoom&&re(F),n.enableRotate&&he(F)}function xe(F){n.enabled!==!1&&(C.length===0&&(n.domElement.setPointerCapture(F.pointerId),n.domElement.addEventListener("pointermove",ve),n.domElement.addEventListener("pointerup",Ne)),ae(F),F.pointerType==="touch"?O(F):et(F))}function ve(F){n.enabled!==!1&&(F.pointerType==="touch"?se(F):gt(F))}function Ne(F){Me(F),C.length===0&&(n.domElement.releasePointerCapture(F.pointerId),n.domElement.removeEventListener("pointermove",ve),n.domElement.removeEventListener("pointerup",Ne)),n.dispatchEvent(Nd),s=i.NONE}function et(F){let ce;switch(F.button){case 0:ce=n.mouseButtons.LEFT;break;case 1:ce=n.mouseButtons.MIDDLE;break;case 2:ce=n.mouseButtons.RIGHT;break;default:ce=-1}switch(ce){case ji.DOLLY:if(n.enableZoom===!1)return;R(F),s=i.DOLLY;break;case ji.ROTATE:if(F.ctrlKey||F.metaKey||F.shiftKey){if(n.enablePan===!1)return;W(F),s=i.PAN}else{if(n.enableRotate===!1)return;K(F),s=i.ROTATE}break;case ji.PAN:if(F.ctrlKey||F.metaKey||F.shiftKey){if(n.enableRotate===!1)return;K(F),s=i.ROTATE}else{if(n.enablePan===!1)return;W(F),s=i.PAN}break;default:s=i.NONE}s!==i.NONE&&n.dispatchEvent(Tl)}function gt(F){switch(s){case i.ROTATE:if(n.enableRotate===!1)return;fe(F);break;case i.DOLLY:if(n.enableZoom===!1)return;ge(F);break;case i.PAN:if(n.enablePan===!1)return;Ee(F);break}}function T(F){n.enabled===!1||n.enableZoom===!1||s!==i.NONE||(F.preventDefault(),n.dispatchEvent(Tl),Le(F),n.dispatchEvent(Nd))}function S(F){n.enabled===!1||n.enablePan===!1||we(F)}function O(F){switch(oe(F),C.length){case 1:switch(n.touches.ONE){case Zi.ROTATE:if(n.enableRotate===!1)return;Be(),s=i.TOUCH_ROTATE;break;case Zi.PAN:if(n.enablePan===!1)return;ne(),s=i.TOUCH_PAN;break;default:s=i.NONE}break;case 2:switch(n.touches.TWO){case Zi.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Pe(),s=i.TOUCH_DOLLY_PAN;break;case Zi.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;U(),s=i.TOUCH_DOLLY_ROTATE;break;default:s=i.NONE}break;default:s=i.NONE}s!==i.NONE&&n.dispatchEvent(Tl)}function se(F){switch(oe(F),s){case i.TOUCH_ROTATE:if(n.enableRotate===!1)return;he(F),n.update();break;case i.TOUCH_PAN:if(n.enablePan===!1)return;j(F),n.update();break;case i.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;ee(F),n.update();break;case i.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Re(F),n.update();break;default:s=i.NONE}}function ie(F){n.enabled!==!1&&F.preventDefault()}function ae(F){C.push(F)}function Me(F){delete B[F.pointerId];for(let ce=0;ce({ref:r&1}),kd=r=>({ref:r[0]});function hM(r){let e;const t=r[7].default,n=gn(t,r,r[10],kd);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&1025)&&mn(n,t,i,i[10],e?_n(t,i[10],s,lM):bn(i[10]),kd)},i(i){e||(_e(n,i),e=!0)},o(i){ye(n,i),e=!1},d(i){n&&n.d(i)}}}function uM(r){let e,t;const n=[{is:r[0]},r[6]];let i={$$slots:{default:[hM,({ref:s})=>({0:s}),({ref:s})=>s?1:0]},$$scope:{ctx:r}};for(let s=0;st(11,s=y));const h=y=>y.isCamera,{renderer:u,invalidate:f}=mi();if(!h(s))throw new Error("Parent missing: need to be a child of a ");const d=new cM(s,u.domElement),{start:p,stop:m}=wc(()=>d.update(),{autoStart:!1}),g=Tc();vt(r,g,y=>t(1,a=y));const{orbitControls:A}=aM();function _(y){ui[y?"unshift":"push"](()=>{a=y,g.set(a)})}const b=({ref:y,cleanup:x})=>{A.set(y),y.update(),x(()=>{A.set(void 0)})};return r.$$set=y=>{e=Vt(Vt({},e),ps(y)),t(6,i=Bn(e,n)),"$$scope"in y&&t(10,c=y.$$scope)},r.$$.update=()=>{i.autoRotate||i.enableDamping?p():m()},[d,a,l,f,g,A,i,o,_,b,c]}class dM extends Zt{constructor(e){super(),$t(this,e,fM,uM,jt,{ref:0})}get ref(){return this.$$.ctx[0]}}new He;new He;new Lt;`${Je.logdepthbuf_pars_vertex}${Je.fog_pars_vertex}${Je.logdepthbuf_vertex}${Je.fog_vertex}`;function AM(r){return[].concat(...r)}function pM(r){if(!r.states)return[];const e=Object.keys(r.states).map(t=>r.states[t]);return e.sort((t,n)=>n.order-t.order),e}function gM(r){let e;const t=r[5].default,n=gn(t,r,r[4],null);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,s){n&&n.m(i,s),e=!0},p(i,[s]){n&&n.p&&(!e||s&16)&&mn(n,t,i,i[4],e?_n(t,i[4],s,null):bn(i[4]),null)},i(i){e||(_e(n,i),e=!0)},o(i){ye(n,i),e=!1},d(i){n&&n.d(i)}}}function mM(r,e,t){let{$$slots:n={},$$scope:i}=e,{actor:s}=e;const a=s.getSnapshot().context.machine.root;let{edges:o={}}=e,{nodes:c={}}=e,{digraph:l}=e;return Wo(async()=>{function h(u){const f=u instanceof Jo?u.root:u,d=AM([...f.transitions.values(),f.always?f.always:[]].flat().map((m,g)=>(m.target?m.target:[f]).map((_,b)=>{const y={id:`${f.id}:${g}:${b}`,source:f,target:_,transition:m,sections:[],label:{text:m.eventType,x:0,y:0,width:0,height:0}};return t(0,o[y.id]=y,o),y}))),p={id:f.id,stateNode:f,children:pM(f).map(h),edges:d};return t(1,c[p.id]=p.stateNode,c),p}t(2,l=h(a))}),r.$$set=h=>{"actor"in h&&t(3,s=h.actor),"edges"in h&&t(0,o=h.edges),"nodes"in h&&t(1,c=h.nodes),"digraph"in h&&t(2,l=h.digraph),"$$scope"in h&&t(4,i=h.$$scope)},[o,c,l,s,i,n]}class bM extends Zt{constructor(e){super(),$t(this,e,mM,gM,jt,{actor:3,edges:0,nodes:1,digraph:2})}}function _M(r){let e,t,n,i;return e=new ct.IcosahedronGeometry({props:{args:[r[3]*r[2],r[4]]}}),n=new ct.MeshStandardMaterial({props:{side:fn,color:r[5],transparent:!0,opacity:r[7],emissive:r[5],emissiveIntensity:r[8],wireframe:!0}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&28&&(o.args=[s[3]*s[2],s[4]]),e.$set(o);const c={};a&32&&(c.color=s[5]),a&128&&(c.opacity=s[7]),a&32&&(c.emissive=s[5]),a&256&&(c.emissiveIntensity=s[8]),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function yM(r){let e,t,n,i;return e=new ct.IcosahedronGeometry({props:{args:[r[3],r[4]]}}),n=new ct.MeshStandardMaterial({props:{side:fn,color:r[6],transparent:!0,opacity:r[13]}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&24&&(o.args=[s[3],s[4]]),e.$set(o);const c={};a&64&&(c.color=s[6]),a&8192&&(c.opacity=s[13]),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function EM(r){let e,t,n,i;return e=new ct.Mesh({props:{position:r[0],rotation:r[1],$$slots:{default:[_M]},$$scope:{ctx:r}}}),n=new ct.Mesh({props:{position:r[0],rotation:r[1],scale:[r[2],r[2],r[2]],$$slots:{default:[yM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&1&&(o.position=s[0]),a&2&&(o.rotation=s[1]),a&16828&&(o.$$scope={dirty:a,ctx:s}),e.$set(o);const c={};a&1&&(c.position=s[0]),a&2&&(c.rotation=s[1]),a&4&&(c.scale=[s[2],s[2],s[2]]),a&24664&&(c.$$scope={dirty:a,ctx:s}),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function xM(r){let e,t;return e=new Wg({props:{rotationSpeed:r[12],rotationIntensity:r[11],speed:r[9],floatIntensity:r[10],$$slots:{default:[EM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,[i]){const s={};i&4096&&(s.rotationSpeed=n[12]),i&2048&&(s.rotationIntensity=n[11]),i&512&&(s.speed=n[9]),i&1024&&(s.floatIntensity=n[10]),i&25087&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function vM(r,e,t){let{position:n=[0,0,0]}=e,{rotation:i=[0,0,0]}=e,{scale:s=1}=e,{radius:a=.5}=e,{detail:o=4}=e,{color:c="#2a3a50"}=e,{colorBase:l="#fff"}=e,{opacity:h=.44}=e,{emissive:u=1.2}=e,{speed:f=15}=e,{floatIntensity:d=.1}=e,{rotationIntensity:p=.4}=e,{rotationSpeed:m=.3}=e,{opacityMaterial:g=.55}=e;return r.$$set=A=>{"position"in A&&t(0,n=A.position),"rotation"in A&&t(1,i=A.rotation),"scale"in A&&t(2,s=A.scale),"radius"in A&&t(3,a=A.radius),"detail"in A&&t(4,o=A.detail),"color"in A&&t(5,c=A.color),"colorBase"in A&&t(6,l=A.colorBase),"opacity"in A&&t(7,h=A.opacity),"emissive"in A&&t(8,u=A.emissive),"speed"in A&&t(9,f=A.speed),"floatIntensity"in A&&t(10,d=A.floatIntensity),"rotationIntensity"in A&&t(11,p=A.rotationIntensity),"rotationSpeed"in A&&t(12,m=A.rotationSpeed),"opacityMaterial"in A&&t(13,g=A.opacityMaterial)},[n,i,s,a,o,c,l,h,u,f,d,p,m,g]}class Bl extends Zt{constructor(e){super(),$t(this,e,vM,xM,jt,{position:0,rotation:1,scale:2,radius:3,detail:4,color:5,colorBase:6,opacity:7,emissive:8,speed:9,floatIntensity:10,rotationIntensity:11,rotationSpeed:12,opacityMaterial:13})}}function CM(r,e){const t=gs(r,e).start();return Yt(()=>t.stop()),t}function SM(r,e){const t=CM(r,e);let n=t.getSnapshot();return{snapshot:Eh(n,s=>t.subscribe(a=>{n!==a&&(n=a,s(n))}).unsubscribe),send:t.send,actorRef:t}}function IM(r,e){return r===e}const bo=(r,e,t=IM)=>{let n,i=e(r.getSnapshot());return Eh(i,a=>{const o=c=>{const l=e(c);t(i,l)||(i=l,a(l))};return o(r.getSnapshot()),n=r.subscribe(o),()=>{n.unsubscribe()}})},MM=Math.PI/180;function wM(r){return r*MM}function TM(r){let e,t,n,i;return e=new ct.TorusGeometry({props:{args:[r[4],r[5],r[7],r[8]]}}),n=new ct.MeshStandardMaterial({props:{color:r[2],opacity:r[9],wireframe:!0,transparent:!0,emissive:r[2],emissiveIntensity:r[3]}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&432&&(o.args=[s[4],s[5],s[7],s[8]]),e.$set(o);const c={};a&4&&(c.color=s[2]),a&512&&(c.opacity=s[9]),a&4&&(c.emissive=s[2]),a&8&&(c.emissiveIntensity=s[3]),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function BM(r){let e,t;return e=new ct.Mesh({props:{position:r[6],rotation:r[0],scale:[r[1],r[1],r[1]],$$slots:{default:[TM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,[i]){const s={};i&64&&(s.position=n[6]),i&1&&(s.rotation=n[0]),i&2&&(s.scale=[n[1],n[1],n[1]]),i&1980&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function RM(r,e,t){let{rotation:n=[wM(90),0,0]}=e,{scale:i=1}=e,{color:s="white"}=e,{emissiveIntensity:a=2}=e,{radius:o=1}=e,{tube:c=1}=e,{position:l=[0,0,0]}=e,{radialSegments:h=11}=e,{tubularSegments:u=22}=e,{opacity:f=1}=e;return r.$$set=d=>{"rotation"in d&&t(0,n=d.rotation),"scale"in d&&t(1,i=d.scale),"color"in d&&t(2,s=d.color),"emissiveIntensity"in d&&t(3,a=d.emissiveIntensity),"radius"in d&&t(4,o=d.radius),"tube"in d&&t(5,c=d.tube),"position"in d&&t(6,l=d.position),"radialSegments"in d&&t(7,h=d.radialSegments),"tubularSegments"in d&&t(8,u=d.tubularSegments),"opacity"in d&&t(9,f=d.opacity)},[n,i,s,a,o,c,l,h,u,f]}class DM extends Zt{constructor(e){super(),$t(this,e,RM,BM,jt,{rotation:0,scale:1,color:2,emissiveIntensity:3,radius:4,tube:5,position:6,radialSegments:7,tubularSegments:8,opacity:9})}}function LM(r){let e,t,n,i,s,a,o,c;return e=new DM({props:{scale:r[1],position:[r[9],r[10],r[11]],color:r[2].color,opacity:r[2].opacity,emissiveIntensity:r[2].emissive,radius:r[0].context.tor.radius,tube:r[0].context.tor.tube}}),n=new Bl({props:{rotationSpeed:0,rotationIntensity:0,position:[r[9],r[10],r[11]],detail:2,scale:r[8]*1.4*r[1],color:"#7d6639",colorBase:"#e6bc69",emissive:1,opacity:1,opacityMaterial:Dl}}),s=new Bl({props:{position:[r[8]*r[1]+.1,r[10],r[11]],rotationSpeed:12,rotationIntensity:.3,detail:1,color:"#7d4545",colorBase:"#FF8D8D",scale:r[8]*r[1],opacity:1,opacityMaterial:Dl,emissive:.7}}),o=new Bl({props:{rotationSpeed:12,color:"#426573",colorBase:"#7ab9d4",position:[-r[8]*r[1]-.1,r[10],r[11]],detail:1,scale:r[8]*r[1],opacity:1,opacityMaterial:Dl,emissive:.7}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment),i=mt(),Qe(s.$$.fragment),a=mt(),Qe(o.$$.fragment)},l(l){ke(e.$$.fragment,l),t=bt(l),ke(n.$$.fragment,l),i=bt(l),ke(s.$$.fragment,l),a=bt(l),ke(o.$$.fragment,l)},m(l,h){Oe(e,l,h),dt(l,t,h),Oe(n,l,h),dt(l,i,h),Oe(s,l,h),dt(l,a,h),Oe(o,l,h),c=!0},p(l,h){const u={};h&2&&(u.scale=l[1]),h&4&&(u.color=l[2].color),h&4&&(u.opacity=l[2].opacity),h&4&&(u.emissiveIntensity=l[2].emissive),h&1&&(u.radius=l[0].context.tor.radius),h&1&&(u.tube=l[0].context.tor.tube),e.$set(u);const f={};h&2&&(f.scale=l[8]*1.4*l[1]),n.$set(f);const d={};h&2&&(d.position=[l[8]*l[1]+.1,l[10],l[11]]),h&2&&(d.scale=l[8]*l[1]),s.$set(d);const p={};h&2&&(p.position=[-l[8]*l[1]-.1,l[10],l[11]]),h&2&&(p.scale=l[8]*l[1]),o.$set(p)},i(l){c||(_e(e.$$.fragment,l),_e(n.$$.fragment,l),_e(s.$$.fragment,l),_e(o.$$.fragment,l),c=!0)},o(l){ye(e.$$.fragment,l),ye(n.$$.fragment,l),ye(s.$$.fragment,l),ye(o.$$.fragment,l),c=!1},d(l){l&&(ht(t),ht(i),ht(a)),Ge(e,l),Ge(n,l),Ge(s,l),Ge(o,l)}}}function PM(r){let e,t;return e=new Wg({props:{speed:Gd,rotationSpeed:Gd,rotationIntensity:Od,floatIntensity:Od,$$slots:{default:[LM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,[i]){const s={};i&131079&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}let Rl=1,Od=.2,Gd=14,Dl=.6;function UM(r,e,t){let n,i,s,a,o,{machine:c}=e,{snapshot:l,send:h,actorRef:u}=SM(c,{input:{parent:{position:[0,.87,0],scale:.22},params:{},tor:{radius:Rl,tube:Rl/2,material:{opacity:.1,color:" #426573",emissive:.001}}}});vt(r,l,y=>t(0,s=y));const f=bo(u,y=>y.context.parent.position);vt(r,f,y=>t(13,n=y));const d=bo(u,y=>y.context.parent.scale);vt(r,d,y=>t(1,a=y));const p=bo(u,y=>y.context.params.position);vt(r,p,y=>t(14,i=y));const m=bo(u,y=>y.context.tor.material);vt(r,m,y=>t(2,o=y));let g=Rl/2,A=-i[0]-n[0],_=-i[1]+n[1]-s.context.tor.radius,b=-i[2]-n[2];return r.$$set=y=>{"machine"in y&&t(12,c=y.machine)},[s,a,o,l,f,d,p,m,g,A,_,b,c]}class FM extends Zt{constructor(e){super(),$t(this,e,UM,PM,jt,{machine:12})}}const NM=Bh({initial:"created",context:({input:{params:r,tor:e,parent:t}})=>{var i,s,a,o,c;return{parent:{position:(t==null?void 0:t.position)||[0,0,0],scale:(t==null?void 0:t.scale)||1},tor:{material:{color:((i=e.material)==null?void 0:i.color)||"black",opacity:((s=e.material)==null?void 0:s.opacity)||.44,emissive:((a=e.material)==null?void 0:a.emissive)||14},radius:e.radius||0,tube:e.tube||0},params:{position:r.position?r.position:[0,-e.radius,0],rotation:r.rotation?r.rotation:[0,0,0],material:{color:"blue",opacity:((o=r.material)==null?void 0:o.opacity)||.44,emissive:((c=r.material)==null?void 0:c.emissive)||14}}}},states:{created:{on:{EVENT:{actions:[]},MEASURE:{actions:["torPositionSet"]}}}},types:{}},{actions:{torPositionSet:$s(({context:r,event:e})=>{if(e.type==="MEASURE"){const t=e.params;r.params.position=[t.center.x,t.center.y,t.center.z],console.log(r.params.position,t)}return r})}}),QM=""+new URL("../assets/bots.24b313a0.glb",import.meta.url).href,kM=r=>({}),Hd=r=>({ref:r[0]}),OM=r=>({}),zd=r=>({error:r[11]}),GM=r=>({}),Vd=r=>({});function HM(r){let e;const t=r[8].error,n=gn(t,r,r[10],zd);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&1024)&&mn(n,t,i,i[10],e?_n(t,i[10],s,OM):bn(i[10]),zd)},i(i){e||(_e(n,i),e=!0)},o(i){ye(n,i),e=!1},d(i){n&&n.d(i)}}}function zM(r){let e,t;return e=new ct.Group({props:{name:"Scene",$$slots:{default:[qM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,i){const s={};i&1024&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function VM(r){let e,t,n,i,s,a;return e=new ct({props:{is:r[5].nodes.mixamorigHips}}),n=new ct.SkinnedMesh({props:{name:"Beta_Joints",geometry:r[5].nodes.Beta_Joints.geometry,material:r[5].materials.Beta_Joints_MAT1,skeleton:r[5].nodes.Beta_Joints.skeleton}}),s=new ct.SkinnedMesh({props:{name:"Beta_Surface",geometry:r[5].nodes.Beta_Surface.geometry,material:r[5].materials.Beta_HighLimbsGeoSG3,skeleton:r[5].nodes.Beta_Surface.skeleton}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment),i=mt(),Qe(s.$$.fragment)},l(o){ke(e.$$.fragment,o),t=bt(o),ke(n.$$.fragment,o),i=bt(o),ke(s.$$.fragment,o)},m(o,c){Oe(e,o,c),dt(o,t,c),Oe(n,o,c),dt(o,i,c),Oe(s,o,c),a=!0},p:ua,i(o){a||(_e(e.$$.fragment,o),_e(n.$$.fragment,o),_e(s.$$.fragment,o),a=!0)},o(o){ye(e.$$.fragment,o),ye(n.$$.fragment,o),ye(s.$$.fragment,o),a=!1},d(o){o&&(ht(t),ht(i)),Ge(e,o),Ge(n,o),Ge(s,o)}}}function WM(r){let e,t,n,i,s,a;return e=new ct({props:{is:r[5].nodes.mixamorigHips_1}}),n=new ct.SkinnedMesh({props:{name:"Alpha_Joints",geometry:r[5].nodes.Alpha_Joints.geometry,material:r[5].materials["Alpha_Joints_MAT.001"],skeleton:r[5].nodes.Alpha_Joints.skeleton}}),s=new ct.SkinnedMesh({props:{name:"Alpha_Surface",geometry:r[5].nodes.Alpha_Surface.geometry,material:r[5].materials["Alpha_Body_MAT.001"],skeleton:r[5].nodes.Alpha_Surface.skeleton}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment),i=mt(),Qe(s.$$.fragment)},l(o){ke(e.$$.fragment,o),t=bt(o),ke(n.$$.fragment,o),i=bt(o),ke(s.$$.fragment,o)},m(o,c){Oe(e,o,c),dt(o,t,c),Oe(n,o,c),dt(o,i,c),Oe(s,o,c),a=!0},p:ua,i(o){a||(_e(e.$$.fragment,o),_e(n.$$.fragment,o),_e(s.$$.fragment,o),a=!0)},o(o){ye(e.$$.fragment,o),ye(n.$$.fragment,o),ye(s.$$.fragment,o),a=!1},d(o){o&&(ht(t),ht(i)),Ge(e,o),Ge(n,o),Ge(s,o)}}}function qM(r){let e,t,n,i;return e=new ct.Group({props:{name:"Armature001",position:[0,0,.59],rotation:[Math.PI/2,0,3.11],scale:.01,$$slots:{default:[VM]},$$scope:{ctx:r}}}),n=new ct.Group({props:{name:"Armature",position:[0,0,-.59],rotation:[Math.PI/2,0,0],scale:.01,$$slots:{default:[WM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&1024&&(o.$$scope={dirty:a,ctx:s}),e.$set(o);const c={};a&1024&&(c.$$scope={dirty:a,ctx:s}),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function XM(r){let e;const t=r[8].fallback,n=gn(t,r,r[10],Vd);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&1024)&&mn(n,t,i,i[10],e?_n(t,i[10],s,GM):bn(i[10]),Vd)},i(i){e||(_e(n,i),e=!0)},o(i){ye(n,i),e=!1},d(i){n&&n.d(i)}}}function YM(r){let e,t,n={ctx:r,current:null,token:null,hasCatch:!0,pending:XM,then:zM,catch:HM,value:5,error:11,blocks:[,,,]};sm(r[5],n);const i=r[8].default,s=gn(i,r,r[10],Hd);return{c(){n.block.c(),e=mt(),s&&s.c()},l(a){n.block.l(a),e=bt(a),s&&s.l(a)},m(a,o){n.block.m(a,n.anchor=o),n.mount=()=>e.parentNode,n.anchor=e,dt(a,e,o),s&&s.m(a,o),t=!0},p(a,o){r=a,rm(n,r,o),s&&s.p&&(!t||o&1024)&&mn(s,i,r,r[10],t?_n(i,r[10],o,kM):bn(r[10]),Hd)},i(a){t||(_e(n.block),_e(s,a),t=!0)},o(a){for(let o=0;o<3;o+=1){const c=n.blocks[o];ye(c)}ye(s,a),t=!1},d(a){a&&ht(e),n.block.d(a),n.token=null,n=null,s&&s.d(a)}}}function JM(r){let e,t;const n=[{is:r[0]},{dispose:!1},r[4]];let i={$$slots:{default:[YM]},$$scope:{ctx:r}};for(let s=0;s(a(),a=im(d,A=>t(7,s=A)),d),c;r.$$.on_destroy.push(()=>a());let{$$slots:l={},$$scope:h}=e;const u=new Wn,f=UI(QM),{actions:d,mixer:p}=NI(f,u);o();const m=Tc();vt(r,m,A=>t(2,c=A));function g(A){ui[A?"unshift":"push"](()=>{c=A,m.set(c)})}return r.$$set=A=>{e=Vt(Vt({},e),ps(A)),t(4,i=Bn(e,n)),"$$scope"in A&&t(10,h=A.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&Object.entries(s).forEach(([A,_])=>{console.log(A,_),_==null||_.play()})},[u,d,c,m,i,f,p,s,l,g,h]}class jM extends Zt{constructor(e){super(),$t(this,e,KM,JM,jt,{ref:0,actions:1,mixer:6})}get ref(){return this.$$.ctx[0]}get actions(){return this.$$.ctx[1]}get mixer(){return this.$$.ctx[6]}}function ZM(r){let e,t;return e=new dM({props:{autoRotate:!0,enableZoom:!0,enableDamping:!0,autoRotateSpeed:2,"target.y":.8}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p:ua,i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function $M(r){let e,t,n,i,s,a,o,c,l,h,u,f,d,p;return e=new ct.PerspectiveCamera({props:{makeDefault:!0,position:[0,4,9],fov:15,$$slots:{default:[ZM]},$$scope:{ctx:r}}}),n=new ct.AmbientLight({props:{intensity:.5}}),s=new ct.DirectionalLight({props:{args:["#fff",.5],intensity:.6}}),o=new rM({props:{"position.y":-.001,cellColor:"#324560",sectionColor:"#1b2634",sectionThickness:0,fadeDistance:14,cellSize:1}}),l=new JI({props:{resolution:44,depthWrite:!0,color:"#87ceeb",smooth:!0,scale:7,blur:7,far:1.8,opacity:.7}}),u=new jM({}),d=new FM({props:{machine:NM}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment),i=mt(),Qe(s.$$.fragment),a=mt(),Qe(o.$$.fragment),c=mt(),Qe(l.$$.fragment),h=mt(),Qe(u.$$.fragment),f=mt(),Qe(d.$$.fragment)},l(m){ke(e.$$.fragment,m),t=bt(m),ke(n.$$.fragment,m),i=bt(m),ke(s.$$.fragment,m),a=bt(m),ke(o.$$.fragment,m),c=bt(m),ke(l.$$.fragment,m),h=bt(m),ke(u.$$.fragment,m),f=bt(m),ke(d.$$.fragment,m)},m(m,g){Oe(e,m,g),dt(m,t,g),Oe(n,m,g),dt(m,i,g),Oe(s,m,g),dt(m,a,g),Oe(o,m,g),dt(m,c,g),Oe(l,m,g),dt(m,h,g),Oe(u,m,g),dt(m,f,g),Oe(d,m,g),p=!0},p(m,g){const A={};g&128&&(A.$$scope={dirty:g,ctx:m}),e.$set(A)},i(m){p||(_e(e.$$.fragment,m),_e(n.$$.fragment,m),_e(s.$$.fragment,m),_e(o.$$.fragment,m),_e(l.$$.fragment,m),_e(u.$$.fragment,m),_e(d.$$.fragment,m),p=!0)},o(m){ye(e.$$.fragment,m),ye(n.$$.fragment,m),ye(s.$$.fragment,m),ye(o.$$.fragment,m),ye(l.$$.fragment,m),ye(u.$$.fragment,m),ye(d.$$.fragment,m),p=!1},d(m){m&&(ht(t),ht(i),ht(a),ht(c),ht(h),ht(f)),Ge(e,m),Ge(n,m),Ge(s,m),Ge(o,m),Ge(l,m),Ge(u,m),Ge(d,m)}}}function ew(r){let e,t,n,i,s;function a(h){r[4](h)}function o(h){r[5](h)}function c(h){r[6](h)}let l={actor:r[0],$$slots:{default:[$M]},$$scope:{ctx:r}};return r[1]!==void 0&&(l.edges=r[1]),r[2]!==void 0&&(l.nodes=r[2]),r[3]!==void 0&&(l.digraph=r[3]),e=new bM({props:l}),ui.push(()=>yo(e,"edges",a)),ui.push(()=>yo(e,"nodes",o)),ui.push(()=>yo(e,"digraph",c)),{c(){Qe(e.$$.fragment)},l(h){ke(e.$$.fragment,h)},m(h,u){Oe(e,h,u),s=!0},p(h,[u]){const f={};u&1&&(f.actor=h[0]),u&128&&(f.$$scope={dirty:u,ctx:h}),!t&&u&2&&(t=!0,f.edges=h[1],_o(()=>t=!1)),!n&&u&4&&(n=!0,f.nodes=h[2],_o(()=>n=!1)),!i&&u&8&&(i=!0,f.digraph=h[3],_o(()=>i=!1)),e.$set(f)},i(h){s||(_e(e.$$.fragment,h),s=!0)},o(h){ye(e.$$.fragment,h),s=!1},d(h){Ge(e,h)}}}function tw(r,e,t){let{actor:n}=e,i={},s={},a;function o(h){i=h,t(1,i)}function c(h){s=h,t(2,s)}function l(h){a=h,t(3,a)}return r.$$set=h=>{"actor"in h&&t(0,n=h.actor)},[n,i,s,a,o,c,l]}class nw extends Zt{constructor(e){super(),$t(this,e,tw,ew,jt,{actor:0})}}const iw=Bh({id:"simService",types:{},initial:"active",context:({input:r})=>({machine:r.machine,state:r.state,previewEvent:r.previewEvent}),on:{"STATE.UPDATE":{actions:$s({state:({event:r})=>r.state})},EVENT:{actions:lb("machine",({event:r})=>({...r.event}))}},states:{active:{invoke:{id:"machine",input:({context:r})=>({machine:r.machine}),src:gA(({sendBack:r,receive:e,input:t})=>{console.log("starting again");const n=gs(t.machine),i=n.subscribe(s=>{r({type:"STATE.UPDATE",state:s})});return n.start(),e(s=>{n.getSnapshot().status==="active"&&n.send(s)}),()=>{i.unsubscribe(),n.stop()}})},on:{"MACHINE.UPDATE":{target:"active",reenter:!0,actions:$s({machine:({event:r})=>r.machine})},"EVENT.PREVIEW":{actions:$s({previewEvent:({event:r})=>r.eventType})},"PREVIEW.CLEAR":{actions:$s({previewEvent:void 0})}}}}});function sw(r){let e,t;return e=new nw({props:{actor:r[0]}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p:ua,i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function rw(r){let e,t,n;return t=new fS({props:{$$slots:{default:[sw]},$$scope:{ctx:r}}}),{c(){e=qd("div"),Qe(t.$$.fragment),this.h()},l(i){e=Xd(i,"DIV",{class:!0});var s=Yd(e);ke(t.$$.fragment,s),s.forEach(ht),this.h()},h(){Jd(e,"class","svelte-13kenss")},m(i,s){dt(i,e,s),Oe(t,e,null),n=!0},p(i,[s]){const a={};s&2&&(a.$$scope={dirty:s,ctx:i}),t.$set(a)},i(i){n||(_e(t.$$.fragment,i),n=!0)},o(i){ye(t.$$.fragment,i),n=!1},d(i){i&&ht(e),Ge(t)}}}function aw(r){return[gs(iw,{input:{machine:Ou,state:Ou.getInitialSnapshot(null)}}).start()]}class Aw extends Zt{constructor(e){super(),$t(this,e,aw,rw,jt,{})}}export{Aw as component}; +`,$I={fragmentShader:ZI,vertexShader:jI},eM=r=>({ref:r[0]&1}),Ud=r=>({ref:r[0]});function tM(r){let e,t;return e=new ct.PlaneGeometry({props:{args:typeof r[1]=="number"?[r[1],r[1]]:r[1]}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,i){const s={};i[0]&2&&(s.args=typeof n[1]=="number"?[n[1],n[1]]:n[1]),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function nM(r){let e,t,n;e=new ct.ShaderMaterial({props:{fragmentShader:r[4],vertexShader:r[5],uniforms:r[2],transparent:!0,side:fn,defines:{USE_COLORSPACE_FRAGMENT:KI>=154?"":void 0}}});const i=r[26].default,s=gn(i,r,r[29],Ud),a=s||tM(r);return{c(){Qe(e.$$.fragment),t=mt(),a&&a.c()},l(o){ke(e.$$.fragment,o),t=bt(o),a&&a.l(o)},m(o,c){Oe(e,o,c),dt(o,t,c),a&&a.m(o,c),n=!0},p(o,c){const l={};c[0]&4&&(l.uniforms=o[2]),e.$set(l),s?s.p&&(!n||c[0]&536870913)&&mn(s,i,o,o[29],n?_n(i,o[29],c,eM):bn(o[29]),Ud):a&&a.p&&(!n||c[0]&2)&&a.p(o,n?c:[-1,-1])},i(o){n||(_e(e.$$.fragment,o),_e(a,o),n=!0)},o(o){ye(e.$$.fragment,o),ye(a,o),n=!1},d(o){o&&ht(t),Ge(e,o),a&&a.d(o)}}}function iM(r){let e,t,n;const i=[{frustumCulled:!1},r[7]];function s(o){r[28](o)}let a={$$slots:{default:[nM,({ref:o})=>({0:o}),({ref:o})=>[o?1:0]]},$$scope:{ctx:r}};for(let o=0;oyo(e,"ref",s)),{c(){Qe(e.$$.fragment)},l(o){ke(e.$$.fragment,o)},m(o,c){Oe(e,o,c),n=!0},p(o,c){const l=c[0]&128?fa(i,[i[0],da(o[7])]):{};c[0]&536870919&&(l.$$scope={dirty:c,ctx:o}),!t&&c[0]&1&&(t=!0,l.ref=o[0],_o(()=>t=!1)),e.$set(l)},i(o){n||(_e(e.$$.fragment,o),n=!0)},o(o){ye(e.$$.fragment,o),n=!1},d(o){r[27](null),Ge(e,o)}}}function sM(r,e,t){const n=["cellColor","sectionColor","cellSize","backgroundColor","backgroundOpacity","sectionSize","plane","gridSize","followCamera","infiniteGrid","fadeDistance","fadeStrength","cellThickness","sectionThickness","type","axis","maxRadius","cellDividers","sectionDividers","ref"];let i=Bn(e,n),s,{$$slots:a={},$$scope:o}=e,{cellColor:c="#000000"}=e,{sectionColor:l="#0000ee"}=e,{cellSize:h=1}=e,{backgroundColor:u="#dadada"}=e,{backgroundOpacity:f=0}=e,{sectionSize:d=10}=e,{plane:p="xz"}=e,{gridSize:m=[20,20]}=e,{followCamera:g=!1}=e,{infiniteGrid:A=!1}=e,{fadeDistance:_=100}=e,{fadeStrength:b=1}=e,{cellThickness:y=1}=e,{sectionThickness:x=2}=e,{type:v="grid"}=e,{axis:C="x"}=e,{maxRadius:B=0}=e,{cellDividers:E=6}=e,{sectionDividers:I=2}=e,{ref:P}=e;const{fragmentShader:H,vertexShader:J}=$I,{invalidate:N}=mi();let D={uSize1:{value:h},uSize2:{value:d},uColor1:{value:new Ae(c)},uColor2:{value:new Ae(l)},uBackgroundColor:{value:new Ae("#aaaaaa")},uBackgroundOpacity:{value:.7},uFadeDistance:{value:_},uFadeStrength:{value:b},uThickness1:{value:1},uThickness2:{value:1},uInfiniteGrid:{value:A?1:0},uFollowCamera:{value:0},uCoord0:{value:0},uCoord1:{value:2},uCoord2:{value:1},uGridType:{value:0},uLineGridCoord:{value:0},uCircleGridMaxRadius:{value:9},uPolarCellDividers:{value:6},uPolarSectionDividers:{value:2}};const z={x:0,y:1,z:2},G={xz:"xzy",xy:"xyz",zy:"zyx"},Z=Tc();vt(r,Z,R=>t(3,s=R));function V(R){ui[R?"unshift":"push"](()=>{s=R,Z.set(s)})}function K(R){P=R,t(0,P)}return r.$$set=R=>{e=Vt(Vt({},e),ps(R)),t(7,i=Bn(e,n)),"cellColor"in R&&t(8,c=R.cellColor),"sectionColor"in R&&t(9,l=R.sectionColor),"cellSize"in R&&t(10,h=R.cellSize),"backgroundColor"in R&&t(11,u=R.backgroundColor),"backgroundOpacity"in R&&t(12,f=R.backgroundOpacity),"sectionSize"in R&&t(13,d=R.sectionSize),"plane"in R&&t(14,p=R.plane),"gridSize"in R&&t(1,m=R.gridSize),"followCamera"in R&&t(15,g=R.followCamera),"infiniteGrid"in R&&t(16,A=R.infiniteGrid),"fadeDistance"in R&&t(17,_=R.fadeDistance),"fadeStrength"in R&&t(18,b=R.fadeStrength),"cellThickness"in R&&t(19,y=R.cellThickness),"sectionThickness"in R&&t(20,x=R.sectionThickness),"type"in R&&t(21,v=R.type),"axis"in R&&t(22,C=R.axis),"maxRadius"in R&&t(23,B=R.maxRadius),"cellDividers"in R&&t(24,E=R.cellDividers),"sectionDividers"in R&&t(25,I=R.sectionDividers),"ref"in R&&t(0,P=R.ref),"$$scope"in R&&t(29,o=R.$$scope)},r.$$.update=()=>{if(r.$$.dirty[0]&67108608){const R=G[p],W=R.charAt(0),fe=R.charAt(1),ge=R.charAt(2);t(2,D.uCoord0.value=z[W],D),t(2,D.uCoord1.value=z[fe],D),t(2,D.uCoord2.value=z[ge],D),t(2,D.uSize1={value:h},D),t(2,D.uSize2={value:d},D),t(2,D.uColor1={value:new Ae(c)},D),t(2,D.uColor2={value:new Ae(l)},D),t(2,D.uBackgroundColor={value:new Ae(u)},D),t(2,D.uBackgroundOpacity={value:f},D),t(2,D.uFadeDistance={value:_},D),t(2,D.uFadeStrength={value:b},D),t(2,D.uThickness1={value:y},D),t(2,D.uThickness2={value:x},D),t(2,D.uFollowCamera={value:g?1:0},D),t(2,D.uInfiniteGrid={value:A?1:0},D),v=="grid"&&t(2,D.uGridType={value:0},D),v==="lines"&&(t(2,D.uGridType={value:1},D),t(2,D.uLineGridCoord={value:z[C]},D)),v==="circular"&&(t(2,D.uGridType={value:2},D),t(2,D.uCircleGridMaxRadius={value:B||0},D)),v==="polar"&&(t(2,D.uGridType={value:3},D),t(2,D.uCircleGridMaxRadius={value:B||0},D),t(2,D.uPolarCellDividers={value:E||0},D),t(2,D.uPolarSectionDividers={value:I||0},D)),N()}},[P,m,D,s,H,J,Z,i,c,l,h,u,f,d,p,g,A,_,b,y,x,v,C,B,E,I,a,V,K,o]}class rM extends Zt{constructor(e){super(),$t(this,e,sM,iM,jt,{cellColor:8,sectionColor:9,cellSize:10,backgroundColor:11,backgroundOpacity:12,sectionSize:13,plane:14,gridSize:1,followCamera:15,infiniteGrid:16,fadeDistance:17,fadeStrength:18,cellThickness:19,sectionThickness:20,type:21,axis:22,maxRadius:23,cellDividers:24,sectionDividers:25,ref:0},null,[-1,-1])}}const aM=()=>QS("threlte-controls",{orbitControls:Kt(void 0)}),Fd={type:"change"},Tl={type:"start"},Nd={type:"end"},mo=new Cs,Qd=new ci,oM=Math.cos(70*tc.DEG2RAD);let cM=class extends jn{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new M,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:ji.ROTATE,MIDDLE:ji.DOLLY,RIGHT:ji.PAN},this.touches={ONE:Zi.ROTATE,TWO:Zi.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return o.phi},this.getAzimuthalAngle=function(){return o.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(F){F.addEventListener("keydown",S),this._domElementKeyEvents=F},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",S),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(Fd),n.update(),s=i.NONE},this.update=function(){const F=new M,ce=new Ht().setFromUnitVectors(e.up,new M(0,1,0)),$=ce.clone().invert(),ze=new M,De=new Ht,Ue=new M,Te=2*Math.PI;return function(ue=null){const le=n.object.position;F.copy(le).sub(n.target),F.applyQuaternion(ce),o.setFromVector3(F),n.autoRotate&&s===i.NONE&&P(E(ue)),n.enableDamping?(o.theta+=c.theta*n.dampingFactor,o.phi+=c.phi*n.dampingFactor):(o.theta+=c.theta,o.phi+=c.phi);let me=n.minAzimuthAngle,de=n.maxAzimuthAngle;isFinite(me)&&isFinite(de)&&(me<-Math.PI?me+=Te:me>Math.PI&&(me-=Te),de<-Math.PI?de+=Te:de>Math.PI&&(de-=Te),me<=de?o.theta=Math.max(me,Math.min(de,o.theta)):o.theta=o.theta>(me+de)/2?Math.max(me,o.theta):Math.min(de,o.theta)),o.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,o.phi)),o.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(h,n.dampingFactor):n.target.add(h),n.zoomToCursor&&v||n.object.isOrthographicCamera?o.radius=V(o.radius):o.radius=V(o.radius*l),F.setFromSpherical(o),F.applyQuaternion($),le.copy(n.target).add(F),n.object.lookAt(n.target),n.enableDamping===!0?(c.theta*=1-n.dampingFactor,c.phi*=1-n.dampingFactor,h.multiplyScalar(1-n.dampingFactor)):(c.set(0,0,0),h.set(0,0,0));let te=!1;if(n.zoomToCursor&&v){let Ie=null;if(n.object.isPerspectiveCamera){const Ve=F.length();Ie=V(Ve*l);const wt=Ve-Ie;n.object.position.addScaledVector(y,wt),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const Ve=new M(x.x,x.y,0);Ve.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/l)),n.object.updateProjectionMatrix(),te=!0;const wt=new M(x.x,x.y,0);wt.unproject(n.object),n.object.position.sub(wt).add(Ve),n.object.updateMatrixWorld(),Ie=F.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;Ie!==null&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(Ie).add(n.object.position):(mo.origin.copy(n.object.position),mo.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(mo.direction))a||8*(1-De.dot(n.object.quaternion))>a||Ue.distanceToSquared(n.target)>0?(n.dispatchEvent(Fd),ze.copy(n.object.position),De.copy(n.object.quaternion),Ue.copy(n.target),te=!1,!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",ie),n.domElement.removeEventListener("pointerdown",xe),n.domElement.removeEventListener("pointercancel",Ne),n.domElement.removeEventListener("wheel",T),n.domElement.removeEventListener("pointermove",ve),n.domElement.removeEventListener("pointerup",Ne),n._domElementKeyEvents!==null&&(n._domElementKeyEvents.removeEventListener("keydown",S),n._domElementKeyEvents=null)};const n=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let s=i.NONE;const a=1e-6,o=new mh,c=new mh;let l=1;const h=new M,u=new Y,f=new Y,d=new Y,p=new Y,m=new Y,g=new Y,A=new Y,_=new Y,b=new Y,y=new M,x=new Y;let v=!1;const C=[],B={};function E(F){return F!==null?2*Math.PI/60*n.autoRotateSpeed*F:2*Math.PI/60/60*n.autoRotateSpeed}function I(){return Math.pow(.95,n.zoomSpeed)}function P(F){c.theta-=F}function H(F){c.phi-=F}const J=function(){const F=new M;return function($,ze){F.setFromMatrixColumn(ze,0),F.multiplyScalar(-$),h.add(F)}}(),N=function(){const F=new M;return function($,ze){n.screenSpacePanning===!0?F.setFromMatrixColumn(ze,1):(F.setFromMatrixColumn(ze,0),F.crossVectors(n.object.up,F)),F.multiplyScalar($),h.add(F)}}(),D=function(){const F=new M;return function($,ze){const De=n.domElement;if(n.object.isPerspectiveCamera){const Ue=n.object.position;F.copy(Ue).sub(n.target);let Te=F.length();Te*=Math.tan(n.object.fov/2*Math.PI/180),J(2*$*Te/De.clientHeight,n.object.matrix),N(2*ze*Te/De.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(J($*(n.object.right-n.object.left)/n.object.zoom/De.clientWidth,n.object.matrix),N(ze*(n.object.top-n.object.bottom)/n.object.zoom/De.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function z(F){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?l/=F:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function G(F){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?l*=F:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function Z(F){if(!n.zoomToCursor)return;v=!0;const ce=n.domElement.getBoundingClientRect(),$=F.clientX-ce.left,ze=F.clientY-ce.top,De=ce.width,Ue=ce.height;x.x=$/De*2-1,x.y=-(ze/Ue)*2+1,y.set(x.x,x.y,1).unproject(n.object).sub(n.object.position).normalize()}function V(F){return Math.max(n.minDistance,Math.min(n.maxDistance,F))}function K(F){u.set(F.clientX,F.clientY)}function R(F){Z(F),A.set(F.clientX,F.clientY)}function W(F){p.set(F.clientX,F.clientY)}function fe(F){f.set(F.clientX,F.clientY),d.subVectors(f,u).multiplyScalar(n.rotateSpeed);const ce=n.domElement;P(2*Math.PI*d.x/ce.clientHeight),H(2*Math.PI*d.y/ce.clientHeight),u.copy(f),n.update()}function ge(F){_.set(F.clientX,F.clientY),b.subVectors(_,A),b.y>0?z(I()):b.y<0&&G(I()),A.copy(_),n.update()}function Ee(F){m.set(F.clientX,F.clientY),g.subVectors(m,p).multiplyScalar(n.panSpeed),D(g.x,g.y),p.copy(m),n.update()}function Le(F){Z(F),F.deltaY<0?G(I()):F.deltaY>0&&z(I()),n.update()}function we(F){let ce=!1;switch(F.code){case n.keys.UP:F.ctrlKey||F.metaKey||F.shiftKey?H(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):D(0,n.keyPanSpeed),ce=!0;break;case n.keys.BOTTOM:F.ctrlKey||F.metaKey||F.shiftKey?H(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):D(0,-n.keyPanSpeed),ce=!0;break;case n.keys.LEFT:F.ctrlKey||F.metaKey||F.shiftKey?P(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):D(n.keyPanSpeed,0),ce=!0;break;case n.keys.RIGHT:F.ctrlKey||F.metaKey||F.shiftKey?P(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):D(-n.keyPanSpeed,0),ce=!0;break}ce&&(F.preventDefault(),n.update())}function Be(){if(C.length===1)u.set(C[0].pageX,C[0].pageY);else{const F=.5*(C[0].pageX+C[1].pageX),ce=.5*(C[0].pageY+C[1].pageY);u.set(F,ce)}}function ne(){if(C.length===1)p.set(C[0].pageX,C[0].pageY);else{const F=.5*(C[0].pageX+C[1].pageX),ce=.5*(C[0].pageY+C[1].pageY);p.set(F,ce)}}function qe(){const F=C[0].pageX-C[1].pageX,ce=C[0].pageY-C[1].pageY,$=Math.sqrt(F*F+ce*ce);A.set(0,$)}function Pe(){n.enableZoom&&qe(),n.enablePan&&ne()}function U(){n.enableZoom&&qe(),n.enableRotate&&Be()}function he(F){if(C.length==1)f.set(F.pageX,F.pageY);else{const $=be(F),ze=.5*(F.pageX+$.x),De=.5*(F.pageY+$.y);f.set(ze,De)}d.subVectors(f,u).multiplyScalar(n.rotateSpeed);const ce=n.domElement;P(2*Math.PI*d.x/ce.clientHeight),H(2*Math.PI*d.y/ce.clientHeight),u.copy(f)}function j(F){if(C.length===1)m.set(F.pageX,F.pageY);else{const ce=be(F),$=.5*(F.pageX+ce.x),ze=.5*(F.pageY+ce.y);m.set($,ze)}g.subVectors(m,p).multiplyScalar(n.panSpeed),D(g.x,g.y),p.copy(m)}function re(F){const ce=be(F),$=F.pageX-ce.x,ze=F.pageY-ce.y,De=Math.sqrt($*$+ze*ze);_.set(0,De),b.set(0,Math.pow(_.y/A.y,n.zoomSpeed)),z(b.y),A.copy(_)}function ee(F){n.enableZoom&&re(F),n.enablePan&&j(F)}function Re(F){n.enableZoom&&re(F),n.enableRotate&&he(F)}function xe(F){n.enabled!==!1&&(C.length===0&&(n.domElement.setPointerCapture(F.pointerId),n.domElement.addEventListener("pointermove",ve),n.domElement.addEventListener("pointerup",Ne)),ae(F),F.pointerType==="touch"?O(F):et(F))}function ve(F){n.enabled!==!1&&(F.pointerType==="touch"?se(F):gt(F))}function Ne(F){Me(F),C.length===0&&(n.domElement.releasePointerCapture(F.pointerId),n.domElement.removeEventListener("pointermove",ve),n.domElement.removeEventListener("pointerup",Ne)),n.dispatchEvent(Nd),s=i.NONE}function et(F){let ce;switch(F.button){case 0:ce=n.mouseButtons.LEFT;break;case 1:ce=n.mouseButtons.MIDDLE;break;case 2:ce=n.mouseButtons.RIGHT;break;default:ce=-1}switch(ce){case ji.DOLLY:if(n.enableZoom===!1)return;R(F),s=i.DOLLY;break;case ji.ROTATE:if(F.ctrlKey||F.metaKey||F.shiftKey){if(n.enablePan===!1)return;W(F),s=i.PAN}else{if(n.enableRotate===!1)return;K(F),s=i.ROTATE}break;case ji.PAN:if(F.ctrlKey||F.metaKey||F.shiftKey){if(n.enableRotate===!1)return;K(F),s=i.ROTATE}else{if(n.enablePan===!1)return;W(F),s=i.PAN}break;default:s=i.NONE}s!==i.NONE&&n.dispatchEvent(Tl)}function gt(F){switch(s){case i.ROTATE:if(n.enableRotate===!1)return;fe(F);break;case i.DOLLY:if(n.enableZoom===!1)return;ge(F);break;case i.PAN:if(n.enablePan===!1)return;Ee(F);break}}function T(F){n.enabled===!1||n.enableZoom===!1||s!==i.NONE||(F.preventDefault(),n.dispatchEvent(Tl),Le(F),n.dispatchEvent(Nd))}function S(F){n.enabled===!1||n.enablePan===!1||we(F)}function O(F){switch(oe(F),C.length){case 1:switch(n.touches.ONE){case Zi.ROTATE:if(n.enableRotate===!1)return;Be(),s=i.TOUCH_ROTATE;break;case Zi.PAN:if(n.enablePan===!1)return;ne(),s=i.TOUCH_PAN;break;default:s=i.NONE}break;case 2:switch(n.touches.TWO){case Zi.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Pe(),s=i.TOUCH_DOLLY_PAN;break;case Zi.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;U(),s=i.TOUCH_DOLLY_ROTATE;break;default:s=i.NONE}break;default:s=i.NONE}s!==i.NONE&&n.dispatchEvent(Tl)}function se(F){switch(oe(F),s){case i.TOUCH_ROTATE:if(n.enableRotate===!1)return;he(F),n.update();break;case i.TOUCH_PAN:if(n.enablePan===!1)return;j(F),n.update();break;case i.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;ee(F),n.update();break;case i.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Re(F),n.update();break;default:s=i.NONE}}function ie(F){n.enabled!==!1&&F.preventDefault()}function ae(F){C.push(F)}function Me(F){delete B[F.pointerId];for(let ce=0;ce({ref:r&1}),kd=r=>({ref:r[0]});function hM(r){let e;const t=r[7].default,n=gn(t,r,r[10],kd);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&1025)&&mn(n,t,i,i[10],e?_n(t,i[10],s,lM):bn(i[10]),kd)},i(i){e||(_e(n,i),e=!0)},o(i){ye(n,i),e=!1},d(i){n&&n.d(i)}}}function uM(r){let e,t;const n=[{is:r[0]},r[6]];let i={$$slots:{default:[hM,({ref:s})=>({0:s}),({ref:s})=>s?1:0]},$$scope:{ctx:r}};for(let s=0;st(11,s=y));const h=y=>y.isCamera,{renderer:u,invalidate:f}=mi();if(!h(s))throw new Error("Parent missing: need to be a child of a ");const d=new cM(s,u.domElement),{start:p,stop:m}=wc(()=>d.update(),{autoStart:!1}),g=Tc();vt(r,g,y=>t(1,a=y));const{orbitControls:A}=aM();function _(y){ui[y?"unshift":"push"](()=>{a=y,g.set(a)})}const b=({ref:y,cleanup:x})=>{A.set(y),y.update(),x(()=>{A.set(void 0)})};return r.$$set=y=>{e=Vt(Vt({},e),ps(y)),t(6,i=Bn(e,n)),"$$scope"in y&&t(10,c=y.$$scope)},r.$$.update=()=>{i.autoRotate||i.enableDamping?p():m()},[d,a,l,f,g,A,i,o,_,b,c]}class dM extends Zt{constructor(e){super(),$t(this,e,fM,uM,jt,{ref:0})}get ref(){return this.$$.ctx[0]}}new He;new He;new Lt;`${Je.logdepthbuf_pars_vertex}${Je.fog_pars_vertex}${Je.logdepthbuf_vertex}${Je.fog_vertex}`;function AM(r){return[].concat(...r)}function pM(r){if(!r.states)return[];const e=Object.keys(r.states).map(t=>r.states[t]);return e.sort((t,n)=>n.order-t.order),e}function gM(r){let e;const t=r[5].default,n=gn(t,r,r[4],null);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,s){n&&n.m(i,s),e=!0},p(i,[s]){n&&n.p&&(!e||s&16)&&mn(n,t,i,i[4],e?_n(t,i[4],s,null):bn(i[4]),null)},i(i){e||(_e(n,i),e=!0)},o(i){ye(n,i),e=!1},d(i){n&&n.d(i)}}}function mM(r,e,t){let{$$slots:n={},$$scope:i}=e,{actor:s}=e;const a=s.getSnapshot().context.machine.root;let{edges:o={}}=e,{nodes:c={}}=e,{digraph:l}=e;return Wo(async()=>{function h(u){const f=u instanceof Jo?u.root:u,d=AM([...f.transitions.values(),f.always?f.always:[]].flat().map((m,g)=>(m.target?m.target:[f]).map((_,b)=>{const y={id:`${f.id}:${g}:${b}`,source:f,target:_,transition:m,sections:[],label:{text:m.eventType,x:0,y:0,width:0,height:0}};return t(0,o[y.id]=y,o),y}))),p={id:f.id,stateNode:f,children:pM(f).map(h),edges:d};return t(1,c[p.id]=p.stateNode,c),p}t(2,l=h(a))}),r.$$set=h=>{"actor"in h&&t(3,s=h.actor),"edges"in h&&t(0,o=h.edges),"nodes"in h&&t(1,c=h.nodes),"digraph"in h&&t(2,l=h.digraph),"$$scope"in h&&t(4,i=h.$$scope)},[o,c,l,s,i,n]}class bM extends Zt{constructor(e){super(),$t(this,e,mM,gM,jt,{actor:3,edges:0,nodes:1,digraph:2})}}function _M(r){let e,t,n,i;return e=new ct.IcosahedronGeometry({props:{args:[r[3]*r[2],r[4]]}}),n=new ct.MeshStandardMaterial({props:{side:fn,color:r[5],transparent:!0,opacity:r[7],emissive:r[5],emissiveIntensity:r[8],wireframe:!0}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&28&&(o.args=[s[3]*s[2],s[4]]),e.$set(o);const c={};a&32&&(c.color=s[5]),a&128&&(c.opacity=s[7]),a&32&&(c.emissive=s[5]),a&256&&(c.emissiveIntensity=s[8]),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function yM(r){let e,t,n,i;return e=new ct.IcosahedronGeometry({props:{args:[r[3],r[4]]}}),n=new ct.MeshStandardMaterial({props:{side:fn,color:r[6],transparent:!0,opacity:r[13]}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&24&&(o.args=[s[3],s[4]]),e.$set(o);const c={};a&64&&(c.color=s[6]),a&8192&&(c.opacity=s[13]),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function EM(r){let e,t,n,i;return e=new ct.Mesh({props:{position:r[0],rotation:r[1],$$slots:{default:[_M]},$$scope:{ctx:r}}}),n=new ct.Mesh({props:{position:r[0],rotation:r[1],scale:[r[2],r[2],r[2]],$$slots:{default:[yM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&1&&(o.position=s[0]),a&2&&(o.rotation=s[1]),a&16828&&(o.$$scope={dirty:a,ctx:s}),e.$set(o);const c={};a&1&&(c.position=s[0]),a&2&&(c.rotation=s[1]),a&4&&(c.scale=[s[2],s[2],s[2]]),a&24664&&(c.$$scope={dirty:a,ctx:s}),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function xM(r){let e,t;return e=new Wg({props:{rotationSpeed:r[12],rotationIntensity:r[11],speed:r[9],floatIntensity:r[10],$$slots:{default:[EM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,[i]){const s={};i&4096&&(s.rotationSpeed=n[12]),i&2048&&(s.rotationIntensity=n[11]),i&512&&(s.speed=n[9]),i&1024&&(s.floatIntensity=n[10]),i&25087&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function vM(r,e,t){let{position:n=[0,0,0]}=e,{rotation:i=[0,0,0]}=e,{scale:s=1}=e,{radius:a=.5}=e,{detail:o=4}=e,{color:c="#2a3a50"}=e,{colorBase:l="#fff"}=e,{opacity:h=.44}=e,{emissive:u=1.2}=e,{speed:f=15}=e,{floatIntensity:d=.1}=e,{rotationIntensity:p=.4}=e,{rotationSpeed:m=.3}=e,{opacityMaterial:g=.55}=e;return r.$$set=A=>{"position"in A&&t(0,n=A.position),"rotation"in A&&t(1,i=A.rotation),"scale"in A&&t(2,s=A.scale),"radius"in A&&t(3,a=A.radius),"detail"in A&&t(4,o=A.detail),"color"in A&&t(5,c=A.color),"colorBase"in A&&t(6,l=A.colorBase),"opacity"in A&&t(7,h=A.opacity),"emissive"in A&&t(8,u=A.emissive),"speed"in A&&t(9,f=A.speed),"floatIntensity"in A&&t(10,d=A.floatIntensity),"rotationIntensity"in A&&t(11,p=A.rotationIntensity),"rotationSpeed"in A&&t(12,m=A.rotationSpeed),"opacityMaterial"in A&&t(13,g=A.opacityMaterial)},[n,i,s,a,o,c,l,h,u,f,d,p,m,g]}class Bl extends Zt{constructor(e){super(),$t(this,e,vM,xM,jt,{position:0,rotation:1,scale:2,radius:3,detail:4,color:5,colorBase:6,opacity:7,emissive:8,speed:9,floatIntensity:10,rotationIntensity:11,rotationSpeed:12,opacityMaterial:13})}}function CM(r,e){const t=gs(r,e).start();return Yt(()=>t.stop()),t}function SM(r,e){const t=CM(r,e);let n=t.getSnapshot();return{snapshot:Eh(n,s=>t.subscribe(a=>{n!==a&&(n=a,s(n))}).unsubscribe),send:t.send,actorRef:t}}function IM(r,e){return r===e}const bo=(r,e,t=IM)=>{let n,i=e(r.getSnapshot());return Eh(i,a=>{const o=c=>{const l=e(c);t(i,l)||(i=l,a(l))};return o(r.getSnapshot()),n=r.subscribe(o),()=>{n.unsubscribe()}})},MM=Math.PI/180;function wM(r){return r*MM}function TM(r){let e,t,n,i;return e=new ct.TorusGeometry({props:{args:[r[4],r[5],r[7],r[8]]}}),n=new ct.MeshStandardMaterial({props:{color:r[2],opacity:r[9],wireframe:!0,transparent:!0,emissive:r[2],emissiveIntensity:r[3]}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&432&&(o.args=[s[4],s[5],s[7],s[8]]),e.$set(o);const c={};a&4&&(c.color=s[2]),a&512&&(c.opacity=s[9]),a&4&&(c.emissive=s[2]),a&8&&(c.emissiveIntensity=s[3]),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function BM(r){let e,t;return e=new ct.Mesh({props:{position:r[6],rotation:r[0],scale:[r[1],r[1],r[1]],$$slots:{default:[TM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,[i]){const s={};i&64&&(s.position=n[6]),i&1&&(s.rotation=n[0]),i&2&&(s.scale=[n[1],n[1],n[1]]),i&1980&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function RM(r,e,t){let{rotation:n=[wM(90),0,0]}=e,{scale:i=1}=e,{color:s="white"}=e,{emissiveIntensity:a=2}=e,{radius:o=1}=e,{tube:c=1}=e,{position:l=[0,0,0]}=e,{radialSegments:h=11}=e,{tubularSegments:u=22}=e,{opacity:f=1}=e;return r.$$set=d=>{"rotation"in d&&t(0,n=d.rotation),"scale"in d&&t(1,i=d.scale),"color"in d&&t(2,s=d.color),"emissiveIntensity"in d&&t(3,a=d.emissiveIntensity),"radius"in d&&t(4,o=d.radius),"tube"in d&&t(5,c=d.tube),"position"in d&&t(6,l=d.position),"radialSegments"in d&&t(7,h=d.radialSegments),"tubularSegments"in d&&t(8,u=d.tubularSegments),"opacity"in d&&t(9,f=d.opacity)},[n,i,s,a,o,c,l,h,u,f]}class DM extends Zt{constructor(e){super(),$t(this,e,RM,BM,jt,{rotation:0,scale:1,color:2,emissiveIntensity:3,radius:4,tube:5,position:6,radialSegments:7,tubularSegments:8,opacity:9})}}function LM(r){let e,t,n,i,s,a,o,c;return e=new DM({props:{scale:r[1],position:[r[9],r[10],r[11]],color:r[2].color,opacity:r[2].opacity,emissiveIntensity:r[2].emissive,radius:r[0].context.tor.radius,tube:r[0].context.tor.tube}}),n=new Bl({props:{rotationSpeed:0,rotationIntensity:0,position:[r[9],r[10],r[11]],detail:2,scale:r[8]*1.4*r[1],color:"#7d6639",colorBase:"#e6bc69",emissive:1,opacity:1,opacityMaterial:Dl}}),s=new Bl({props:{position:[r[8]*r[1]+.1,r[10],r[11]],rotationSpeed:12,rotationIntensity:.3,detail:1,color:"#7d4545",colorBase:"#FF8D8D",scale:r[8]*r[1],opacity:1,opacityMaterial:Dl,emissive:.7}}),o=new Bl({props:{rotationSpeed:12,color:"#426573",colorBase:"#7ab9d4",position:[-r[8]*r[1]-.1,r[10],r[11]],detail:1,scale:r[8]*r[1],opacity:1,opacityMaterial:Dl,emissive:.7}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment),i=mt(),Qe(s.$$.fragment),a=mt(),Qe(o.$$.fragment)},l(l){ke(e.$$.fragment,l),t=bt(l),ke(n.$$.fragment,l),i=bt(l),ke(s.$$.fragment,l),a=bt(l),ke(o.$$.fragment,l)},m(l,h){Oe(e,l,h),dt(l,t,h),Oe(n,l,h),dt(l,i,h),Oe(s,l,h),dt(l,a,h),Oe(o,l,h),c=!0},p(l,h){const u={};h&2&&(u.scale=l[1]),h&4&&(u.color=l[2].color),h&4&&(u.opacity=l[2].opacity),h&4&&(u.emissiveIntensity=l[2].emissive),h&1&&(u.radius=l[0].context.tor.radius),h&1&&(u.tube=l[0].context.tor.tube),e.$set(u);const f={};h&2&&(f.scale=l[8]*1.4*l[1]),n.$set(f);const d={};h&2&&(d.position=[l[8]*l[1]+.1,l[10],l[11]]),h&2&&(d.scale=l[8]*l[1]),s.$set(d);const p={};h&2&&(p.position=[-l[8]*l[1]-.1,l[10],l[11]]),h&2&&(p.scale=l[8]*l[1]),o.$set(p)},i(l){c||(_e(e.$$.fragment,l),_e(n.$$.fragment,l),_e(s.$$.fragment,l),_e(o.$$.fragment,l),c=!0)},o(l){ye(e.$$.fragment,l),ye(n.$$.fragment,l),ye(s.$$.fragment,l),ye(o.$$.fragment,l),c=!1},d(l){l&&(ht(t),ht(i),ht(a)),Ge(e,l),Ge(n,l),Ge(s,l),Ge(o,l)}}}function PM(r){let e,t;return e=new Wg({props:{speed:Gd,rotationSpeed:Gd,rotationIntensity:Od,floatIntensity:Od,$$slots:{default:[LM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,[i]){const s={};i&131079&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}let Rl=1,Od=.2,Gd=14,Dl=.6;function UM(r,e,t){let n,i,s,a,o,{machine:c}=e,{snapshot:l,send:h,actorRef:u}=SM(c,{input:{parent:{position:[0,.87,0],scale:.22},params:{},tor:{radius:Rl,tube:Rl/2,material:{opacity:.1,color:" #426573",emissive:.001}}}});vt(r,l,y=>t(0,s=y));const f=bo(u,y=>y.context.parent.position);vt(r,f,y=>t(13,n=y));const d=bo(u,y=>y.context.parent.scale);vt(r,d,y=>t(1,a=y));const p=bo(u,y=>y.context.params.position);vt(r,p,y=>t(14,i=y));const m=bo(u,y=>y.context.tor.material);vt(r,m,y=>t(2,o=y));let g=Rl/2,A=-i[0]-n[0],_=-i[1]+n[1]-s.context.tor.radius,b=-i[2]-n[2];return r.$$set=y=>{"machine"in y&&t(12,c=y.machine)},[s,a,o,l,f,d,p,m,g,A,_,b,c]}class FM extends Zt{constructor(e){super(),$t(this,e,UM,PM,jt,{machine:12})}}const NM=Bh({initial:"created",context:({input:{params:r,tor:e,parent:t}})=>{var i,s,a,o,c;return{parent:{position:(t==null?void 0:t.position)||[0,0,0],scale:(t==null?void 0:t.scale)||1},tor:{material:{color:((i=e.material)==null?void 0:i.color)||"black",opacity:((s=e.material)==null?void 0:s.opacity)||.44,emissive:((a=e.material)==null?void 0:a.emissive)||14},radius:e.radius||0,tube:e.tube||0},params:{position:r.position?r.position:[0,-e.radius,0],rotation:r.rotation?r.rotation:[0,0,0],material:{color:"blue",opacity:((o=r.material)==null?void 0:o.opacity)||.44,emissive:((c=r.material)==null?void 0:c.emissive)||14}}}},states:{created:{on:{EVENT:{actions:[]},MEASURE:{actions:["torPositionSet"]}}}},types:{}},{actions:{torPositionSet:$s(({context:r,event:e})=>{if(e.type==="MEASURE"){const t=e.params;r.params.position=[t.center.x,t.center.y,t.center.z],console.log(r.params.position,t)}return r})}}),QM=""+new URL("../assets/bots.24b313a0.glb",import.meta.url).href,kM=r=>({}),Hd=r=>({ref:r[0]}),OM=r=>({}),zd=r=>({error:r[11]}),GM=r=>({}),Vd=r=>({});function HM(r){let e;const t=r[8].error,n=gn(t,r,r[10],zd);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&1024)&&mn(n,t,i,i[10],e?_n(t,i[10],s,OM):bn(i[10]),zd)},i(i){e||(_e(n,i),e=!0)},o(i){ye(n,i),e=!1},d(i){n&&n.d(i)}}}function zM(r){let e,t;return e=new ct.Group({props:{name:"Scene",$$slots:{default:[qM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p(n,i){const s={};i&1024&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function VM(r){let e,t,n,i,s,a;return e=new ct({props:{is:r[5].nodes.mixamorigHips}}),n=new ct.SkinnedMesh({props:{name:"Beta_Joints",geometry:r[5].nodes.Beta_Joints.geometry,material:r[5].materials.Beta_Joints_MAT1,skeleton:r[5].nodes.Beta_Joints.skeleton}}),s=new ct.SkinnedMesh({props:{name:"Beta_Surface",geometry:r[5].nodes.Beta_Surface.geometry,material:r[5].materials.Beta_HighLimbsGeoSG3,skeleton:r[5].nodes.Beta_Surface.skeleton}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment),i=mt(),Qe(s.$$.fragment)},l(o){ke(e.$$.fragment,o),t=bt(o),ke(n.$$.fragment,o),i=bt(o),ke(s.$$.fragment,o)},m(o,c){Oe(e,o,c),dt(o,t,c),Oe(n,o,c),dt(o,i,c),Oe(s,o,c),a=!0},p:ua,i(o){a||(_e(e.$$.fragment,o),_e(n.$$.fragment,o),_e(s.$$.fragment,o),a=!0)},o(o){ye(e.$$.fragment,o),ye(n.$$.fragment,o),ye(s.$$.fragment,o),a=!1},d(o){o&&(ht(t),ht(i)),Ge(e,o),Ge(n,o),Ge(s,o)}}}function WM(r){let e,t,n,i,s,a;return e=new ct({props:{is:r[5].nodes.mixamorigHips_1}}),n=new ct.SkinnedMesh({props:{name:"Alpha_Joints",geometry:r[5].nodes.Alpha_Joints.geometry,material:r[5].materials["Alpha_Joints_MAT.001"],skeleton:r[5].nodes.Alpha_Joints.skeleton}}),s=new ct.SkinnedMesh({props:{name:"Alpha_Surface",geometry:r[5].nodes.Alpha_Surface.geometry,material:r[5].materials["Alpha_Body_MAT.001"],skeleton:r[5].nodes.Alpha_Surface.skeleton}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment),i=mt(),Qe(s.$$.fragment)},l(o){ke(e.$$.fragment,o),t=bt(o),ke(n.$$.fragment,o),i=bt(o),ke(s.$$.fragment,o)},m(o,c){Oe(e,o,c),dt(o,t,c),Oe(n,o,c),dt(o,i,c),Oe(s,o,c),a=!0},p:ua,i(o){a||(_e(e.$$.fragment,o),_e(n.$$.fragment,o),_e(s.$$.fragment,o),a=!0)},o(o){ye(e.$$.fragment,o),ye(n.$$.fragment,o),ye(s.$$.fragment,o),a=!1},d(o){o&&(ht(t),ht(i)),Ge(e,o),Ge(n,o),Ge(s,o)}}}function qM(r){let e,t,n,i;return e=new ct.Group({props:{name:"Armature001",position:[0,0,.59],rotation:[Math.PI/2,0,3.11],scale:.01,$$slots:{default:[VM]},$$scope:{ctx:r}}}),n=new ct.Group({props:{name:"Armature",position:[0,0,-.59],rotation:[Math.PI/2,0,0],scale:.01,$$slots:{default:[WM]},$$scope:{ctx:r}}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment)},l(s){ke(e.$$.fragment,s),t=bt(s),ke(n.$$.fragment,s)},m(s,a){Oe(e,s,a),dt(s,t,a),Oe(n,s,a),i=!0},p(s,a){const o={};a&1024&&(o.$$scope={dirty:a,ctx:s}),e.$set(o);const c={};a&1024&&(c.$$scope={dirty:a,ctx:s}),n.$set(c)},i(s){i||(_e(e.$$.fragment,s),_e(n.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(n.$$.fragment,s),i=!1},d(s){s&&ht(t),Ge(e,s),Ge(n,s)}}}function XM(r){let e;const t=r[8].fallback,n=gn(t,r,r[10],Vd);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&1024)&&mn(n,t,i,i[10],e?_n(t,i[10],s,GM):bn(i[10]),Vd)},i(i){e||(_e(n,i),e=!0)},o(i){ye(n,i),e=!1},d(i){n&&n.d(i)}}}function YM(r){let e,t,n={ctx:r,current:null,token:null,hasCatch:!0,pending:XM,then:zM,catch:HM,value:5,error:11,blocks:[,,,]};sm(r[5],n);const i=r[8].default,s=gn(i,r,r[10],Hd);return{c(){n.block.c(),e=mt(),s&&s.c()},l(a){n.block.l(a),e=bt(a),s&&s.l(a)},m(a,o){n.block.m(a,n.anchor=o),n.mount=()=>e.parentNode,n.anchor=e,dt(a,e,o),s&&s.m(a,o),t=!0},p(a,o){r=a,rm(n,r,o),s&&s.p&&(!t||o&1024)&&mn(s,i,r,r[10],t?_n(i,r[10],o,kM):bn(r[10]),Hd)},i(a){t||(_e(n.block),_e(s,a),t=!0)},o(a){for(let o=0;o<3;o+=1){const c=n.blocks[o];ye(c)}ye(s,a),t=!1},d(a){a&&ht(e),n.block.d(a),n.token=null,n=null,s&&s.d(a)}}}function JM(r){let e,t;const n=[{is:r[0]},{dispose:!1},r[4]];let i={$$slots:{default:[YM]},$$scope:{ctx:r}};for(let s=0;s(a(),a=im(d,A=>t(7,s=A)),d),c;r.$$.on_destroy.push(()=>a());let{$$slots:l={},$$scope:h}=e;const u=new Wn,f=UI(QM),{actions:d,mixer:p}=NI(f,u);o();const m=Tc();vt(r,m,A=>t(2,c=A));function g(A){ui[A?"unshift":"push"](()=>{c=A,m.set(c)})}return r.$$set=A=>{e=Vt(Vt({},e),ps(A)),t(4,i=Bn(e,n)),"$$scope"in A&&t(10,h=A.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&Object.entries(s).forEach(([A,_])=>{_==null||_.play()})},[u,d,c,m,i,f,p,s,l,g,h]}class jM extends Zt{constructor(e){super(),$t(this,e,KM,JM,jt,{ref:0,actions:1,mixer:6})}get ref(){return this.$$.ctx[0]}get actions(){return this.$$.ctx[1]}get mixer(){return this.$$.ctx[6]}}function ZM(r){let e,t;return e=new dM({props:{autoRotate:!0,enableZoom:!0,enableDamping:!0,autoRotateSpeed:2,"target.y":.8}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p:ua,i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function $M(r){let e,t,n,i,s,a,o,c,l,h,u,f,d,p;return e=new ct.PerspectiveCamera({props:{makeDefault:!0,position:[0,4,9],fov:15,$$slots:{default:[ZM]},$$scope:{ctx:r}}}),n=new ct.AmbientLight({props:{intensity:.5}}),s=new ct.DirectionalLight({props:{args:["#fff",.5],intensity:.6}}),o=new rM({props:{"position.y":-.001,cellColor:"#324560",sectionColor:"#1b2634",sectionThickness:0,fadeDistance:14,cellSize:1}}),l=new JI({props:{resolution:44,depthWrite:!0,color:"#87ceeb",smooth:!0,scale:7,blur:7,far:1.8,opacity:.7}}),u=new jM({}),d=new FM({props:{machine:NM}}),{c(){Qe(e.$$.fragment),t=mt(),Qe(n.$$.fragment),i=mt(),Qe(s.$$.fragment),a=mt(),Qe(o.$$.fragment),c=mt(),Qe(l.$$.fragment),h=mt(),Qe(u.$$.fragment),f=mt(),Qe(d.$$.fragment)},l(m){ke(e.$$.fragment,m),t=bt(m),ke(n.$$.fragment,m),i=bt(m),ke(s.$$.fragment,m),a=bt(m),ke(o.$$.fragment,m),c=bt(m),ke(l.$$.fragment,m),h=bt(m),ke(u.$$.fragment,m),f=bt(m),ke(d.$$.fragment,m)},m(m,g){Oe(e,m,g),dt(m,t,g),Oe(n,m,g),dt(m,i,g),Oe(s,m,g),dt(m,a,g),Oe(o,m,g),dt(m,c,g),Oe(l,m,g),dt(m,h,g),Oe(u,m,g),dt(m,f,g),Oe(d,m,g),p=!0},p(m,g){const A={};g&128&&(A.$$scope={dirty:g,ctx:m}),e.$set(A)},i(m){p||(_e(e.$$.fragment,m),_e(n.$$.fragment,m),_e(s.$$.fragment,m),_e(o.$$.fragment,m),_e(l.$$.fragment,m),_e(u.$$.fragment,m),_e(d.$$.fragment,m),p=!0)},o(m){ye(e.$$.fragment,m),ye(n.$$.fragment,m),ye(s.$$.fragment,m),ye(o.$$.fragment,m),ye(l.$$.fragment,m),ye(u.$$.fragment,m),ye(d.$$.fragment,m),p=!1},d(m){m&&(ht(t),ht(i),ht(a),ht(c),ht(h),ht(f)),Ge(e,m),Ge(n,m),Ge(s,m),Ge(o,m),Ge(l,m),Ge(u,m),Ge(d,m)}}}function ew(r){let e,t,n,i,s;function a(h){r[4](h)}function o(h){r[5](h)}function c(h){r[6](h)}let l={actor:r[0],$$slots:{default:[$M]},$$scope:{ctx:r}};return r[1]!==void 0&&(l.edges=r[1]),r[2]!==void 0&&(l.nodes=r[2]),r[3]!==void 0&&(l.digraph=r[3]),e=new bM({props:l}),ui.push(()=>yo(e,"edges",a)),ui.push(()=>yo(e,"nodes",o)),ui.push(()=>yo(e,"digraph",c)),{c(){Qe(e.$$.fragment)},l(h){ke(e.$$.fragment,h)},m(h,u){Oe(e,h,u),s=!0},p(h,[u]){const f={};u&1&&(f.actor=h[0]),u&128&&(f.$$scope={dirty:u,ctx:h}),!t&&u&2&&(t=!0,f.edges=h[1],_o(()=>t=!1)),!n&&u&4&&(n=!0,f.nodes=h[2],_o(()=>n=!1)),!i&&u&8&&(i=!0,f.digraph=h[3],_o(()=>i=!1)),e.$set(f)},i(h){s||(_e(e.$$.fragment,h),s=!0)},o(h){ye(e.$$.fragment,h),s=!1},d(h){Ge(e,h)}}}function tw(r,e,t){let{actor:n}=e,i={},s={},a;function o(h){i=h,t(1,i)}function c(h){s=h,t(2,s)}function l(h){a=h,t(3,a)}return r.$$set=h=>{"actor"in h&&t(0,n=h.actor)},[n,i,s,a,o,c,l]}class nw extends Zt{constructor(e){super(),$t(this,e,tw,ew,jt,{actor:0})}}const iw=Bh({id:"simService",types:{},initial:"active",context:({input:r})=>({machine:r.machine,state:r.state,previewEvent:r.previewEvent}),on:{"STATE.UPDATE":{actions:$s({state:({event:r})=>r.state})},EVENT:{actions:lb("machine",({event:r})=>({...r.event}))}},states:{active:{invoke:{id:"machine",input:({context:r})=>({machine:r.machine}),src:gA(({sendBack:r,receive:e,input:t})=>{console.log("starting again");const n=gs(t.machine),i=n.subscribe(s=>{r({type:"STATE.UPDATE",state:s})});return n.start(),e(s=>{n.getSnapshot().status==="active"&&n.send(s)}),()=>{i.unsubscribe(),n.stop()}})},on:{"MACHINE.UPDATE":{target:"active",reenter:!0,actions:$s({machine:({event:r})=>r.machine})},"EVENT.PREVIEW":{actions:$s({previewEvent:({event:r})=>r.eventType})},"PREVIEW.CLEAR":{actions:$s({previewEvent:void 0})}}}}});function sw(r){let e,t;return e=new nw({props:{actor:r[0]}}),{c(){Qe(e.$$.fragment)},l(n){ke(e.$$.fragment,n)},m(n,i){Oe(e,n,i),t=!0},p:ua,i(n){t||(_e(e.$$.fragment,n),t=!0)},o(n){ye(e.$$.fragment,n),t=!1},d(n){Ge(e,n)}}}function rw(r){let e,t,n;return t=new fS({props:{$$slots:{default:[sw]},$$scope:{ctx:r}}}),{c(){e=qd("div"),Qe(t.$$.fragment),this.h()},l(i){e=Xd(i,"DIV",{class:!0});var s=Yd(e);ke(t.$$.fragment,s),s.forEach(ht),this.h()},h(){Jd(e,"class","svelte-13kenss")},m(i,s){dt(i,e,s),Oe(t,e,null),n=!0},p(i,[s]){const a={};s&2&&(a.$$scope={dirty:s,ctx:i}),t.$set(a)},i(i){n||(_e(t.$$.fragment,i),n=!0)},o(i){ye(t.$$.fragment,i),n=!1},d(i){i&&ht(e),Ge(t)}}}function aw(r){return[gs(iw,{input:{machine:Ou,state:Ou.getInitialSnapshot(null)}}).start()]}class Aw extends Zt{constructor(e){super(),$t(this,e,aw,rw,jt,{})}}export{Aw as component}; diff --git a/internal/version.json b/internal/version.json index 7366305..a9132c8 100644 --- a/internal/version.json +++ b/internal/version.json @@ -1 +1 @@ -{"version":"1701776069457"} \ No newline at end of file +{"version":"1701783598171"} \ No newline at end of file diff --git a/package.json b/package.json index fb6ce31..870f85e 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,11 @@ "app/*" ], "devDependencies": { + "@types/gtag.js": "^0.0.18", + "bun-types": "latest", "prettier": "^3.1.0", "prettier-plugin-svelte": "^3.1.2", - "prettier-plugin-tailwindcss": "^0.5.7", - "bun-types": "latest" + "prettier-plugin-tailwindcss": "^0.5.7" }, "peerDependencies": { "typescript": "^5.0.0"