Files
pawspective/dist/assets/index-BzJXpssD.js
2026-06-17 08:52:48 +09:00

40 lines
239 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=Array.isArray,u=Array.prototype.indexOf,d=Array.prototype.includes,f=Array.from,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,g=Object.prototype,_=Array.prototype,v=Object.getPrototypeOf,y=Object.isExtensible,b=()=>{};function x(e){return e()}function S(e){for(var t=0;t<e.length;t++)e[t]()}function C(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var w=1024,T=2048,E=4096,D=8192,O=16384,ee=32768,k=1<<25,te=65536,A=1<<19,j=1<<20,M=1<<25,N=65536,P=1<<21,F=1<<22,ne=1<<23,I=Symbol(`$state`),re=Symbol(`legacy props`),ie=Symbol(``),ae=Symbol(`attributes`),oe=Symbol(`class`),se=Symbol(`style`),ce=Symbol(`text`),le=Symbol(`form reset`),L=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ue=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function de(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function fe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function pe(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function me(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function he(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function ge(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function _e(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function ve(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ye(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function xe(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Se(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ce={},we=Symbol(`uninitialized`),Te=`http://www.w3.org/1999/xhtml`;function Ee(){console.warn(`https://svelte.dev/e/derived_inert`)}function De(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Oe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var ke=!1;function Ae(e){ke=e}var je;function Me(e){if(e===null)throw De(),Ce;return je=e}function Ne(){return Me(dn(je))}function R(e){if(ke){if(dn(je)!==null)throw De(),Ce;je=e}}function Pe(e=1){if(ke){for(var t=e,n=je;t--;)n=dn(n);je=n}}function Fe(e=!0){for(var t=0,n=je;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=dn(n);e&&n.remove(),n=i}}function Ie(e){if(!e||e.nodeType!==8)throw De(),Ce;return e.data}function Le(e){return e===this.v}function Re(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function ze(e){return!Re(e,this.v)}var Be=!1,Ve=!1;function He(){Ve=!0}var Ue=null;function We(e){Ue=e}function Ge(e,t=!1,n){Ue={p:Ue,i:!1,c:null,e:null,s:e,x:null,r:G,l:Ve&&!t?{s:null,u:null,$:[]}:null}}function Ke(e){var t=Ue,n=t.e;if(n!==null){t.e=null;for(var r of n)kn(r)}return e!==void 0&&(t.x=e),t.i=!0,Ue=t.p,e??{}}function qe(){return!Ve||Ue!==null&&Ue.l===null}var Je=[];function Ye(){var e=Je;Je=[],S(e)}function Xe(e){if(Je.length===0&&!At){var t=Je;queueMicrotask(()=>{t===Je&&Ye()})}Je.push(e)}function Ze(){for(;Je.length>0;)Ye()}function Qe(e){var t=G;if(t===null)return W.f|=ne,e;if(!(t.f&32768)&&!(t.f&4))throw e;$e(e,t)}function $e(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var et=~(T|E|w);function tt(e,t){e.f=e.f&et|t}function nt(e){e.f&512||e.deps===null?tt(e,w):tt(e,E)}function rt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=N,rt(t.deps))}function it(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),rt(e.deps),tt(e,w)}var at=!1,ot=!1;function st(e){var t=ot;try{return ot=!1,[e(),ot]}finally{ot=t}}function ct(e){let t=0,n=Yt(0),r;return()=>{En()&&(K(n),In(()=>(t===0&&(r=q(()=>e(()=>en(n)))),t+=1,()=>{Xe(()=>{--t,t===0&&(r?.(),r=void 0,en(n))})})))}}var lt=te|A;function ut(e,t,n,r){new dt(e,t,n,r)}var dt=class{parent;is_pending=!1;transform_error;#e;#t=ke?je:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=ct(()=>(this.#m=Yt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=G;t.b=this,t.f|=128,n(e)},this.parent=G.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Rn(()=>{if(ke){let e=this.#t;Ne();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},lt),ke&&(this.#e=je)}#g(){try{this.#a=zn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=zn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=zn(()=>e(this.#e)),Xe(()=>{var e=this.#c=document.createDocumentFragment(),t=ln();e.append(t),this.#a=this.#x(()=>zn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Kn(this.#o,()=>{this.#o=null}),this.#b(z))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=zn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Xn(this.#a,e);let t=this.#n.pending;this.#o=zn(()=>t(this.#e))}else this.#b(z)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){it(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=G,n=W,r=Ue;rr(this.#i),nr(this.#i),We(this.#i.ctx);try{return It.ensure(),e()}catch(e){return Qe(e),null}finally{rr(t),nr(n),We(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Kn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Xe(()=>{this.#d=!1,this.#m&&Qt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),K(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;z?.is_fork?(this.#a&&z.skip_effect(this.#a),this.#o&&z.skip_effect(this.#o),this.#s&&z.skip_effect(this.#s),z.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(Un(this.#a),null),this.#o&&=(Un(this.#o),null),this.#s&&=(Un(this.#s),null),ke&&(Me(this.#t),Pe(),Me(Fe()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Oe();return}r=!0,i&&Se(),this.#s!==null&&Kn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){$e(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return zn(()=>{var t=G;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return $e(e,this.#i.parent),null}}))};Xe(()=>{var t;try{t=this.transform_error(e)}catch(e){$e(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>$e(e,this.#i&&this.#i.parent)):o(t)})}};function ft(e,t,n,r){let i=qe()?gt:yt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=G,c=pt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){$e(e,s)}mt()}}var d=ht();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>vt(e))).then(u).catch(e=>$e(e,s)).finally(d)}l?l.then(()=>{c(),f(),mt()}):f()}function pt(){var e=G,t=W,n=Ue,r=z;return function(i=!0){rr(e),nr(t),We(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function mt(e=!0){rr(null),nr(null),We(null),e&&z?.deactivate()}function ht(){var e=G,t=e.b,n=z,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function gt(e){var t=2|T;return G!==null&&(G.f|=A),{ctx:Ue,deps:null,effects:null,equals:Le,f:t,fn:e,reactions:null,rv:0,v:we,wv:0,parent:G,ac:null}}var _t=Symbol(`obsolete`);function vt(e,t,n){let r=G;r===null&&fe();var i=void 0,a=Yt(we),o=!W,s=new Set;return Fn(()=>{var t=G,n=C();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==L&&n.reject(e)}).finally(mt)}catch(e){n.reject(e),mt()}var c=z;if(o){if(t.f&32768)var l=ht();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(_t);else for(let e of s.values())e.reject(_t);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==_t&&(c.activate(),t?(a.f|=ne,Qt(a,t)):(a.f&8388608&&(a.f^=ne),Qt(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Dn(()=>{for(let e of s)e.reject(_t)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function yt(e){let t=gt(e);return t.equals=ze,t}function bt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Un(t[n])}}function xt(e){var t,n=G,r=e.parent;if(!$n&&r!==null&&e.v!==we&&r.f&24576)return Ee(),e.v;rr(r);try{e.f&=~N,bt(e),t=_r(e)}finally{rr(n)}return t}function St(e){var t=xt(e);if(!e.equals(t)&&(e.wv=mr(),(!z?.is_fork||e.deps===null)&&(z===null?e.v=t:(z.capture(e,t,!0),Dt?.capture(e,t,!0)),e.deps===null))){tt(e,w);return}$n||(Ot===null?nt(e):(En()||z?.is_fork)&&Ot.set(e,t))}function Ct(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(L),t.fn!==null&&(t.teardown=b),t.ac=null,yr(t,0),Vn(t))}function wt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&br(t)}var Tt=null,Et=null,z=null,Dt=null,Ot=null,kt=null,At=!1,jt=!1,Mt=null,Nt=null,Pt=0,Ft=1,It=class e{id=Ft++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){Et===null?Tt=Et=this:(Et.#n=this,this.#t=Et),Et=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)tt(r,T),t(r);for(r of n.m)tt(r,E),t(r)}this.#p.add(e)}#g(){this.#e=!0,Pt++>1e3&&(this.#S(),Rt());for(let e of this.#u)this.#d.delete(e),tt(e,T),this.schedule(e);for(let e of this.#d)tt(e,E),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Mt=[],r=[],i=Nt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Gt(e),this.#h()||this.discard(),t}if(z=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Mt=null,Nt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Wt(e,t);i.length>0&&z.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),Dt=this,Bt(r),Bt(n),Dt=null,this.#s?.resolve();var s=z;if(this.#a===0&&(this.#c.length===0||s!==null)&&(this.#S(),Be&&(this.#x(),z=s)),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(e,t,n){e.f^=w;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=w:i&4?t.push(r):Be&&i&16777224?n.push(r):hr(r)&&(i&16&&this.#d.add(r),br(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),tt(i,T),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),z=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)it(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==we&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Ot?.set(e,t)),this.is_fork||(e.v=t)}activate(){z=this}deactivate(){z=null,Ot=null}flush(){try{jt=!0,z=this,this.#g()}finally{Pt=0,kt=null,Mt=null,Nt=null,jt=!1,z=null,Ot=null,qt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(_t);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}#x(){for(let u=Tt;u!==null;u=u.#n){var e=u.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(u.current.has(r)){var n=u.current.get(r)[0];if(e&&i!==n)u.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=u.async_deriveds.get(e);n&&t.promise.then(n.resolve).catch(n.reject)}var r=[...u.current.keys()].filter(e=>!u.current.get(e)[1]);if(!(!u.#e||r.length===0)){var i=r.filter(e=>!this.current.has(e));if(i.length===0)e&&u.discard();else if(t.length>0){if(e)for(let e of this.#p)u.unskip_effect(e,e=>{e.f&4194320?u.schedule(e):u.#b([e])});u.activate();var a=new Set,o=new Map;for(var s of t)Vt(s,i,a,o);o=new Map;var c=[...u.current].filter(([e,t])=>{let n=this.current.get(e);return n?n[0]!==t[0]||n[1]!==t[1]:!0}).map(([e])=>e);if(c.length>0)for(let e of this.#l)!(e.f&155648)&&Ht(e,c,o)&&(e.f&4194320?(tt(e,T),u.schedule(e)):u.#u.add(e));if(u.#c.length>0&&!u.#m){u.apply();for(var l of u.#c)u.#_(l,[],[]);u.#c=[]}u.deactivate()}}}}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Xe(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=C()).promise}static ensure(){if(z===null){let t=z=new e;!jt&&!At&&Xe(()=>{t.#e||t.flush()})}return z}apply(){if(!Be||!this.is_fork&&this.#t===null&&this.#n===null){Ot=null;return}Ot=new Map;for(let[e,[t]]of this.current)Ot.set(e,t);for(let t=Tt;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)Ot.has(e)||Ot.set(e,n)}}schedule(e){if(kt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Mt!==null&&t===G&&(Be||(W===null||!(W.f&2))&&!at))return;if(n&96){if(!(n&1024))return;t.f^=w}}this.#c.push(t)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null?Tt=t:e.#n=t,t===null?Et=e:t.#t=e,this.linked=!1}}};function Lt(e){var t=At;At=!0;try{var n;for(e&&(z!==null&&!z.is_fork&&z.flush(),n=e());;){if(Ze(),z===null)return n;z.flush()}}finally{At=t}}function Rt(){try{_e()}catch(e){$e(e,kt)}}var zt=null;function Bt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&hr(r)&&(zt=new Set,br(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Gn(r),zt?.size>0)){qt.clear();for(let e of zt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)zt.has(n)&&(zt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||br(n)}}zt.clear()}}zt=null}}function Vt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Vt(i,t,n,r):e&4194320&&!(e&2048)&&Ht(i,t,r)&&(tt(i,T),Ut(i))}}function Ht(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(d.call(t,r))return!0;if(r.f&2&&Ht(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Ut(e){z.schedule(e)}function Wt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),tt(e,w);for(var n=e.first;n!==null;)Wt(n,t),n=n.next}}function Gt(e){tt(e,w);for(var t=e.first;t!==null;)Gt(t),t=t.next}var Kt=new Set,qt=new Map,Jt=!1;function Yt(e,t){return{f:0,v:e,reactions:null,equals:Le,rv:0,wv:0}}function Xt(e,t){let n=Yt(e,t);return ar(n),n}function B(e,t=!1,n=!0){let r=Yt(e);return t||(r.equals=ze),Ve&&n&&Ue!==null&&Ue.l!==null&&(Ue.l.s??=[]).push(r),r}function Zt(e,t){return V(e,q(()=>K(e))),t}function V(e,t,n=!1){return W!==null&&(!tr||W.f&131072)&&qe()&&W.f&4325394&&(ir===null||!ir.has(e))&&xe(),Qt(e,n?nn(t):t,Nt)}function Qt(e,t,n=null){if(!e.equals(t)){qt.set(e,$n?t:e.v);var r=It.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&xt(t),Ot===null&&nt(t)}e.wv=mr(),tn(e,T,n),qe()&&G!==null&&G.f&1024&&!(G.f&96)&&(cr===null?lr([e]):cr.push(e)),!r.is_fork&&Kt.size>0&&!Jt&&$t()}return t}function $t(){Jt=!1;for(let e of Kt){e.f&1024&&tt(e,E);let t;try{t=hr(e)}catch{t=!0}t&&br(e)}Kt.clear()}function en(e){V(e,e.v+1)}function tn(e,t,n){var r=e.reactions;if(r!==null)for(var i=qe(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===G)){var l=(c&T)===0;if(l&&tt(s,t),c&131072)Kt.add(s);else if(c&2){var u=s;Ot?.delete(u),c&65536||(c&512&&(G===null||!(G.f&2097152))&&(s.f|=N),tn(u,E,n))}else if(l){var d=s;c&16&&zt!==null&&zt.add(d),n===null?Ut(d):n.push(d)}}}}function nn(e){if(typeof e!=`object`||!e||I in e)return e;let t=v(e);if(t!==g&&t!==_)return e;var n=new Map,r=l(e),i=Xt(0),a=null,o=fr,s=e=>{if(fr===o)return e();var t=W,n=fr;nr(null),pr(o);var r=e();return nr(t),pr(n),r};return r&&n.set(`length`,Xt(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&ye();var i=n.get(t);return i===void 0?s(()=>{var e=Xt(r.value,a);return n.set(t,e),e}):V(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>Xt(we,a));n.set(t,e),en(i)}}else V(r,we),en(i);return!0},get(t,r,i){if(r===I)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||m(t,r)?.writable)&&(o=s(()=>Xt(nn(c?t[r]:we),a)),n.set(r,o)),o!==void 0){var l=K(o);return l===we?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=K(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==we)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===I)return!0;var r=n.get(t),i=r!==void 0&&r.v!==we||Reflect.has(e,t);return(r!==void 0||G!==null&&(!i||m(e,t)?.writable))&&(r===void 0&&(r=s(()=>Xt(i?nn(e[t]):we,a)),n.set(t,r)),K(r)===we)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var d=o;d<l.v;d+=1){var f=n.get(d+``);f===void 0?d in e&&(f=s(()=>Xt(we,a)),n.set(d+``,f)):V(f,we)}if(l===void 0)(!u||m(e,t)?.writable)&&(l=s(()=>Xt(void 0,a)),V(l,nn(o)),n.set(t,l));else{u=l.v!==we;var p=s(()=>nn(o));V(l,p)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,o),!u){if(r&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&V(g,_+1)}en(i)}return!0},ownKeys(e){K(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==we});for(var[r,a]of n)a.v!==we&&!(r in e)&&t.push(r);return t},setPrototypeOf(){be()}})}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var rn,an,on,sn;function cn(){if(rn===void 0){rn=window,an=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;on=m(t,`firstChild`).get,sn=m(t,`nextSibling`).get,y(e)&&(e[oe]=void 0,e[ae]=null,e[se]=void 0,e.__e=void 0),y(n)&&(n[ce]=void 0)}}function ln(e=``){return document.createTextNode(e)}function un(e){return on.call(e)}function dn(e){return sn.call(e)}function H(e,t){if(!ke)return un(e);var n=un(je);if(n===null)n=je.appendChild(ln());else if(t&&n.nodeType!==3){var r=ln();return n?.before(r),Me(r),r}return t&&gn(n),Me(n),n}function fn(e,t=!1){if(!ke){var n=un(e);return n instanceof Comment&&n.data===``?dn(n):n}if(t){if(je?.nodeType!==3){var r=ln();return je?.before(r),Me(r),r}gn(je)}return je}function U(e,t=1,n=!1){let r=ke?je:e;for(var i;t--;)i=r,r=dn(r);if(!ke)return r;if(n){if(r?.nodeType!==3){var a=ln();return r===null?i?.after(a):r.before(a),Me(a),a}gn(r)}return Me(r),r}function pn(e){e.textContent=``}function mn(){return!Be||zt!==null?!1:(G.f&ee)!==0}function hn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function gn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function _n(e,t){if(t){let t=document.body;e.autofocus=!0,Xe(()=>{document.activeElement===t&&e.focus()})}}function vn(e){ke&&un(e)!==null&&pn(e)}var yn=!1;function bn(){yn||(yn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[le]?.()})},{capture:!0}))}function xn(e){var t=W,n=G;nr(null),rr(null);try{return e()}finally{nr(t),rr(n)}}function Sn(e,t,n,r=n){e.addEventListener(t,()=>xn(n));let i=e[le];i?e[le]=()=>{i(),r(!0)}:e[le]=()=>r(!0),bn()}function Cn(e){G===null&&(W===null&&ge(e),he()),$n&&me(e)}function wn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Tn(e,t){var n=G;n!==null&&n.f&8192&&(e|=D);var r={ctx:Ue,deps:null,nodes:null,f:e|T|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};z?.register_created_effect(r);var i=r;if(e&4)Mt===null?It.ensure().schedule(r):Mt.push(r);else if(t!==null){try{br(r)}catch(e){throw Un(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=te))}if(i!==null&&(i.parent=n,n!==null&&wn(i,n),W!==null&&W.f&2&&!(e&64))){var a=W;(a.effects??=[]).push(i)}return r}function En(){return W!==null&&!tr}function Dn(e){let t=Tn(8,null);return tt(t,w),t.teardown=e,t}function On(e){Cn(`$effect`);var t=G.f;if(!W&&t&32&&Ue!==null&&!Ue.i){var n=Ue;(n.e??=[]).push(e)}else return kn(e)}function kn(e){return Tn(4|j,e)}function An(e){return Cn(`$effect.pre`),Tn(8|j,e)}function jn(e){It.ensure();let t=Tn(64|A,e);return(e={})=>new Promise(n=>{e.outro?Kn(t,()=>{Un(t),n(void 0)}):(Un(t),n(void 0))})}function Mn(e){return Tn(4,e)}function Nn(e,t){var n=Ue,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=In(()=>{if(e(),!r.ran){r.ran=!0;var n=G;try{rr(n.parent),q(t)}finally{rr(n)}}})}function Pn(){var e=Ue;In(()=>{for(var t of e.l.$){t.deps();var n=t.effect;n.f&1024&&n.deps!==null&&tt(n,E),hr(n)&&br(n),t.ran=!1}})}function Fn(e){return Tn(F|A,e)}function In(e,t=0){return Tn(8|t,e)}function Ln(e,t=[],n=[],r=[]){ft(r,t,n,t=>{Tn(8,()=>{e(...t.map(K))})})}function Rn(e,t=0){return Tn(16|t,e)}function zn(e){return Tn(32|A,e)}function Bn(e){var t=e.teardown;if(t!==null){let e=$n,n=W;er(!0),nr(null);try{t.call(null)}finally{er(e),nr(n)}}}function Vn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&xn(()=>{e.abort(L)});var r=n.next;n.f&64?n.parent=null:Un(n,t),n=r}}function Hn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Un(t),t=n}}function Un(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Wn(e.nodes.start,e.nodes.end),n=!0),e.f|=k,Vn(e,t&&!n),yr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Bn(e),e.f^=k,e.f|=O;var i=e.parent;i!==null&&i.first!==null&&Gn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Wn(e,t){for(;e!==null;){var n=e===t?null:dn(e);e.remove(),e=n}}function Gn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Kn(e,t,n=!0){var r=[];qn(e,r,!0);var i=()=>{n&&Un(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function qn(e,t,n){if(!(e.f&8192)){e.f^=D;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;qn(i,t,o?n:!1)}i=a}}}function Jn(e){Yn(e,!0)}function Yn(e,t){if(e.f&8192){e.f^=D,e.f&1024||(tt(e,T),It.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Yn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Xn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:dn(n);t.append(n),n=i}}var Zn=null,Qn=!1,$n=!1;function er(e){$n=e}var W=null,tr=!1;function nr(e){W=e}var G=null;function rr(e){G=e}var ir=null;function ar(e){W!==null&&(!Be||W.f&2)&&(ir??=new Set).add(e)}var or=null,sr=0,cr=null;function lr(e){cr=e}var ur=1,dr=0,fr=dr;function pr(e){fr=e}function mr(){return++ur}function hr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~N),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(hr(a)&&St(a),a.wv>e.wv)return!0}t&512&&Ot===null&&tt(e,w)}return!1}function gr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!Be&&ir!==null&&ir.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?gr(a,t,!1):t===a&&(n?tt(a,T):a.f&1024&&tt(a,E),Ut(a))}}function _r(e){var t=or,n=sr,r=cr,i=W,a=ir,o=Ue,s=tr,c=fr,l=e.f;or=null,sr=0,cr=null,W=l&96?null:e,ir=null,We(e.ctx),tr=!1,fr=++dr,e.ac!==null&&(xn(()=>{e.ac.abort(L)}),e.ac=null);try{e.f|=P;var u=e.fn,d=u();e.f|=ee;var f=e.deps,p=z?.is_fork;if(or!==null){var m;if(p||yr(e,sr),f!==null&&sr>0)for(f.length=sr+or.length,m=0;m<or.length;m++)f[sr+m]=or[m];else e.deps=f=or;if(En()&&e.f&512)for(m=sr;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&sr<f.length&&(yr(e,sr),f.length=sr);if(qe()&&cr!==null&&!tr&&f!==null&&!(e.f&6146))for(m=0;m<cr.length;m++)gr(cr[m],e);if(i!==null&&i!==e){if(dr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=dr;if(t!==null)for(let e of t)e.rv=dr;cr!==null&&(r===null?r=cr:r.push(...cr))}return e.f&8388608&&(e.f^=ne),d}catch(e){return Qe(e)}finally{e.f^=P,or=t,sr=n,cr=r,W=i,ir=a,We(o),tr=s,fr=c}}function vr(e,t){let n=t.reactions;if(n!==null){var r=u.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(or===null||!d.call(or,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~N),a.v!==we&&nt(a),Ct(a),yr(a,0)}}function yr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)vr(e,n[r])}function br(e){var t=e.f;if(!(t&16384)){tt(e,w);var n=G,r=Qn;G=e,Qn=!0;try{t&16777232?Hn(e):Vn(e),Bn(e);var i=_r(e);e.teardown=typeof i==`function`?i:null,e.wv=ur}finally{Qn=r,G=n}}}async function xr(){if(Be)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),Lt()}function K(e){var t=(e.f&2)!=0;if(Zn?.add(e),W!==null&&!tr&&!(G!==null&&G.f&16384)&&(ir===null||!ir.has(e))){var n=W.deps;if(W.f&2097152)e.rv<dr&&(e.rv=dr,or===null&&n!==null&&n[sr]===e?sr++:or===null?or=[e]:or.push(e));else{W.deps??=[],d.call(W.deps,e)||W.deps.push(e);var r=e.reactions;r===null?e.reactions=[W]:d.call(r,W)||r.push(W)}}if($n&&qt.has(e))return qt.get(e);if(t){var i=e;if($n){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Cr(i))&&(a=xt(i)),qt.set(i,a),a}var o=(i.f&512)==0&&!tr&&W!==null&&(Qn||(W.f&512)!=0),s=(i.f&ee)===0;hr(i)&&(o&&(i.f|=512),St(i)),o&&!s&&(wt(i),Sr(i))}if(Ot?.has(e))return Ot.get(e);if(e.f&8388608)throw e.v;return e.v}function Sr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(wt(t),Sr(t))}function Cr(e){if(e.v===we)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(qt.has(t)||t.f&2&&Cr(t))return!0;return!1}function q(e){var t=tr;try{return tr=!0,e()}finally{tr=t}}function wr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(I in e)Tr(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&I in n&&Tr(n)}}}function Tr(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Tr(e[n],t)}catch{}let n=v(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=h(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var Er=[`touchstart`,`touchmove`];function Dr(e){return Er.includes(e)}var Or=Symbol(`events`),kr=new Set,Ar=new Set;function jr(e,t,n,r={}){function i(e){if(r.capture||Nr.call(t,e),!e.cancelBubble)return xn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?Xe(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function J(e,t,n,r,i){var a={capture:r,passive:i},o=jr(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Dn(()=>{t.removeEventListener(e,o,a)})}var Mr=null;function Nr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;Mr=e;var o=0,s=Mr===e&&e[Or];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[Or]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){p(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=W,d=G;nr(null),rr(null);try{for(var f,m=[];a!==null&&a!==t;){try{var h=a[Or]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?m.push(e):f=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(f){for(let e of m)queueMicrotask(()=>{throw e});throw f}}finally{e[Or]=t,delete e.currentTarget,nr(u),rr(d)}}}var Pr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function Fr(e){return Pr?.createHTML(e)??e}function Ir(e){var t=hn(`template`);return t.innerHTML=Fr(e.replaceAll(`<!>`,`<!---->`)),t.content}function Lr(e,t){var n=G;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Y(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(ke)return Lr(je,null),je;i===void 0&&(i=Ir(a?e:`<!>`+e),n||(i=un(i)));var t=r||an?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=un(t),s=t.lastChild;Lr(o,s)}else Lr(t,t);return t}}function X(e,t){if(ke){var n=G;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=je),Ne();return}e!==null&&e.before(t)}function Z(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ce]??=e.nodeValue)&&(e[ce]=n,e.nodeValue=`${n}`)}function Rr(e,t){return Br(e,t)}var zr=new Map;function Br(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){cn();var c=void 0,l=jn(()=>{var o=n??t.appendChild(ln());ut(o,{pending:()=>{}},t=>{Ge({});var n=Ue;if(a&&(n.c=a),i&&(r.$$events=i),ke&&Lr(t,null),c=e(t,r)||{},ke&&(G.nodes.end=je,je===null||je.nodeType!==8||je.data!==`]`))throw De(),Ce;Ke()},s);var l=new Set,u=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=Dr(r);for(let e of[t,document]){var a=zr.get(e);a===void 0&&(a=new Map,zr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Nr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return u(f(kr)),Ar.add(u),()=>{for(var e of l)for(let n of[t,document]){var r=zr.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Nr),r.delete(e),r.size===0&&zr.delete(n)):r.set(e,i)}Ar.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return Vr.set(c,l),c}var Vr=new WeakMap,Hr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Jn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Jn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(Un(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Xn(r,t),t.append(ln()),this.#n.set(e,{effect:r,fragment:t})}else Un(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Kn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(Un(n.effect),this.#n.delete(e))};ensure(e,t){var n=z,r=mn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=ln();i.append(a),this.#n.set(e,{effect:zn(()=>t(a)),fragment:i})}else this.#t.set(e,zn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else ke&&(this.anchor=je),this.#a(n)}};function Ur(e,t,n=!1){var r;ke&&(r=je,Ne());var i=new Hr(e),a=n?te:0;function o(e,t){if(ke){var n=Ie(r);if(e!==parseInt(n.substring(1))){var a=Fe();Me(a),i.anchor=a,Ae(!1),i.ensure(e,t),Ae(!0);return}}i.ensure(e,t)}Rn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Wr(e,t){return t}function Gr(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Kn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Kr(e,f(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;pn(u),u.append(l),e.items.clear()}Kr(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Kr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=M,Xn(a,document.createDocumentFragment())):Un(t[i],n)}}var qr;function Jr(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=ke?Me(un(c)):c.appendChild(ln())}ke&&Ne();var u=null,d=yt(()=>{var e=n();return l(e)?e:e==null?[]:f(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=u,Xr(v,p,o,t,r),u!==null&&(p.length===0?u.f&33554432?(u.f^=M,Qr(u,null,o)):Jn(u):Kn(u,()=>{u=null})))}function _(e){v.pending.delete(e)}var v={effect:Rn(()=>{p=K(d);var e=p.length;let c=!1;ke&&Ie(o)===`[!`!=(e===0)&&(o=Fe(),Me(o),Ae(!1),c=!0);for(var l=new Set,f=z,v=mn(),y=0;y<e;y+=1){ke&&je.nodeType===8&&je.data===`]`&&(o=je,c=!0,Ae(!1));var b=p[y],x=r(b,y),S=h?null:s.get(x);S?(S.v&&Qt(S.v,b),S.i&&Qt(S.i,y),v&&f.unskip_effect(S.e)):(S=Zr(s,h?o:qr??=ln(),b,x,y,i,t,n),h||(S.e.f|=M),s.set(x,S)),l.add(x)}if(e===0&&a&&!u&&(h?u=zn(()=>a(o)):(u=zn(()=>a(qr??=ln())),u.f|=M)),e>l.size&&pe(``,``,``),ke&&e>0&&Me(Fe()),!h)if(m.set(f,l),v){for(let[e,t]of s)l.has(e)||f.skip_effect(t.e);f.oncommit(g),f.ondiscard(_)}else g(f);c&&Ae(!0),K(d)}),flags:t,items:s,pending:m,outrogroups:null,fallback:u};h=!1,ke&&(o=je)}function Yr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Xr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=Yr(e.effect.first),l,u=null,d,p=[],m=[],h,g,_,v;if(a)for(v=0;v<o;v+=1)h=t[v],g=i(h,v),_=s.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(d??=new Set).add(_));for(v=0;v<o;v+=1){if(h=t[v],g=i(h,v),_=s.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Jn(_),a&&(_.nodes?.a?.unfix(),(d??=new Set).delete(_))),_.f&33554432)if(_.f^=M,_===c)Qr(_,null,n);else{var y=u?u.next:c;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),$r(e,u,_),$r(e,_,y),Qr(_,y,n),u=_,p=[],m=[],c=Yr(u.next);continue}if(_!==c){if(l!==void 0&&l.has(_)){if(p.length<m.length){var b=m[0],x;u=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)Qr(p[x],b,n);for(x=0;x<m.length;x+=1)l.delete(m[x]);$r(e,S.prev,C.next),$r(e,u,S),$r(e,C,b),c=b,u=C,--v,p=[],m=[]}else l.delete(_),Qr(_,c,n),$r(e,_.prev,_.next),$r(e,_,u===null?e.effect.first:u.next),$r(e,u,_),u=_;continue}for(p=[],m=[];c!==null&&c!==_;)(l??=new Set).add(c),m.push(c),c=Yr(c.next);if(c===null)continue}_.f&33554432||p.push(_),u=_,c=Yr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Kr(e,f(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var w=[];if(l!==void 0)for(_ of l)_.f&8192||w.push(_);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&w.push(c),c=Yr(c.next);var T=w.length;if(T>0){var E=r&4&&o===0?n:null;if(a){for(v=0;v<T;v+=1)w[v].nodes?.a?.measure();for(v=0;v<T;v+=1)w[v].nodes?.a?.fix()}Gr(e,w,E)}}a&&Xe(()=>{if(d!==void 0)for(_ of d)_.nodes?.a?.apply()})}function Zr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Yt(n):B(n,!1,!1):null,l=o&2?Yt(i):null;return{v:c,i:l,e:zn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Qr(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=dn(r);if(a.before(r),r===i)return;r=o}}function $r(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}var ei=[...`
\r\f\xA0\v`];function ti(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||ei.includes(r[o-1]))&&(s===r.length||ei.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function ni(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function ri(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function ii(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(ri)),i&&c.push(...Object.keys(i).map(ri));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=ri(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=ni(r)),i&&(n+=ni(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function ai(e,t,n,r,i,a){var o=e[oe];if(ke||o!==n||o===void 0){var s=ti(n,r,a);(!ke||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[oe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function oi(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function si(e,t,n,r){var i=e[se];if(ke||i!==t){var a=ii(t,r);(!ke||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[se]=t}else r&&(Array.isArray(r)?(oi(e,n?.[0],r[0]),oi(e,n?.[1],r[1],`important`)):oi(e,n,r));return r}var ci=Symbol(`is custom element`),li=Symbol(`is html`),ui=ue?`link`:`LINK`;function di(e){if(ke){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;fi(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;fi(e,`checked`,null),e.checked=r}}};e[le]=n,Xe(n),bn()}}function fi(e,t,n,r){var i=pi(e);ke&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ui)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ie]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&hi(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function pi(e){return e[ae]??={[ci]:e.nodeName.includes(`-`),[li]:e.namespaceURI===Te}}var mi=new Map;function hi(e){var t=e.getAttribute(`is`)||e.nodeName,n=mi.get(t);if(n)return n;mi.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=h(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=v(i)}return n}function gi(e,t,n=t){var r=new WeakSet;Sn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=_i(e)?vi(a):a,n(a),z!==null&&r.add(z),await xr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(ke&&e.defaultValue!==e.value||q(t)==null&&e.value)&&(n(_i(e)?vi(e.value):e.value),z!==null&&r.add(z)),In(()=>{var n=t();if(e===document.activeElement){var i=Be?Dt:z;if(r.has(i))return}_i(e)&&n===vi(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function _i(e){var t=e.type;return t===`number`||t===`range`}function vi(e){return e===``?null:+e}function yi(e,t){return e===t||e?.[I]===t}function bi(e={},t,n,r){var i=Ue.r,a=G;return Mn(()=>{var o,s;return In(()=>{o=s,s=r?.()||[],q(()=>{yi(n(...s),e)||(t(e,...s),o&&yi(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&yi(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function xi(e){return function(...t){t[0].target===this&&e?.apply(this,t)}}function Si(e){return function(...t){return t[0].stopPropagation(),e?.apply(this,t)}}function Ci(e=!1){let t=Ue,n=t.l.u;if(!n)return;let r=()=>wr(t.s);if(e){let e=0,n={},i=gt(()=>{let r=!1,i=t.s;for(let e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>K(i)}n.b.length&&An(()=>{wi(t,r),S(n.b)}),On(()=>{let e=q(()=>n.m.map(x));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&On(()=>{wi(t,r),S(n.a)})}function wi(e,t){if(e.l.s)for(let t of e.l.s)K(t);t()}function Ti(e,t){var n=e.$$events?.[t.type];for(var r of l(n)?n.slice():n==null?[]:[n])r.call(this,t)}function Ei(e,t,n,r){var i=!Ve||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=gt(r),K(l)):(c&&(c=!1,s=o?q(r):r),s);let d;if(a){var f=I in e||re in e;d=m(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,h=!1;a?[p,h]=st(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&ve(t),d(p)));var g=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(d){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&d(t?g():e),e):g()})}var v=!1,y=(n&1?gt:yt)(()=>(v=!1,g()));a&&K(y);var b=G;return(function(e,t){if(arguments.length>0){let n=t?K(y):i&&a?nn(e):e;return V(y,n),v=!0,s!==void 0&&(s=n),e}return $n&&v||b.f&16384?y.v:K(y)})}function Di(e){Ue===null&&de(`onMount`),Ve&&Ue.l!==null?ji(Ue).m.push(e):On(()=>{let t=q(e);if(typeof t==`function`)return t})}function Oi(e){Ue===null&&de(`onDestroy`),Di(()=>()=>q(e))}function ki(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}function Ai(){let e=Ue;return e===null&&de(`createEventDispatcher`),(t,n,r)=>{let i=e.s.$$events?.[t];if(i){let a=l(i)?i.slice():[i],o=ki(t,n,r);for(let t of a)t.call(e.x,o);return!o.defaultPrevented}return!0}}function ji(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`),He();var Mi=o(((e,t)=>{(function(e,n){typeof t==`object`&&t.exports?t.exports=n():e.Zdog=n()})(e,function(){var e={};e.TAU=Math.PI*2,e.extend=function(e,t){for(var n in t)e[n]=t[n];return e},e.lerp=function(e,t,n){return(t-e)*n+e},e.modulo=function(e,t){return(e%t+t)%t};var t={2:function(e){return e*e},3:function(e){return e*e*e},4:function(e){return e*e*e*e},5:function(e){return e*e*e*e*e}};return e.easeInOut=function(e,n){if(n==1)return e;e=Math.max(0,Math.min(1,e));var r=e<.5,i=r?e:1-e;i/=.5;var a=(t[n]||t[2])(i);return a/=2,r?a:1-a},e})})),Ni=o(((e,t)=>{(function(e,n){typeof t==`object`&&t.exports?t.exports=n():e.Zdog.CanvasRenderer=n()})(e,function(){var e={isCanvas:!0};return e.begin=function(e){e.beginPath()},e.move=function(e,t,n){e.moveTo(n.x,n.y)},e.line=function(e,t,n){e.lineTo(n.x,n.y)},e.bezier=function(e,t,n,r,i){e.bezierCurveTo(n.x,n.y,r.x,r.y,i.x,i.y)},e.closePath=function(e){e.closePath()},e.setPath=function(){},e.renderPath=function(t,n,r,i){this.begin(t,n),r.forEach(function(r){r.render(t,n,e)}),i&&this.closePath(t,n)},e.stroke=function(e,t,n,r,i){n&&(e.strokeStyle=r,e.lineWidth=i,e.stroke())},e.fill=function(e,t,n,r){n&&(e.fillStyle=r,e.fill())},e.end=function(){},e})})),Pi=o(((e,t)=>{(function(e,n){typeof t==`object`&&t.exports?t.exports=n():e.Zdog.SvgRenderer=n()})(e,function(){var e={isSvg:!0},t=e.round=function(e){return Math.round(e*1e3)/1e3};function n(e){return t(e.x)+`,`+t(e.y)+` `}return e.begin=function(){},e.move=function(e,t,r){return`M`+n(r)},e.line=function(e,t,r){return`L`+n(r)},e.bezier=function(e,t,r,i,a){return`C`+n(r)+n(i)+n(a)},e.closePath=function(){return`Z`},e.setPath=function(e,t,n){t.setAttribute(`d`,n)},e.renderPath=function(t,n,r,i){var a=``;r.forEach(function(r){a+=r.render(t,n,e)}),i&&(a+=this.closePath(t,n)),this.setPath(t,n,a)},e.stroke=function(e,t,n,r,i){n&&(t.setAttribute(`stroke`,r),t.setAttribute(`stroke-width`,i))},e.fill=function(e,t,n,r){var i=n?r:`none`;t.setAttribute(`fill`,i)},e.end=function(e,t){e.appendChild(t)},e})})),Fi=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Mi());else{var r=e.Zdog;r.Vector=n(r)}})(e,function(e){function t(e){this.set(e)}var n=e.TAU;t.prototype.set=function(e){return this.x=e&&e.x||0,this.y=e&&e.y||0,this.z=e&&e.z||0,this},t.prototype.write=function(e){return e?(this.x=e.x==null?this.x:e.x,this.y=e.y==null?this.y:e.y,this.z=e.z==null?this.z:e.z,this):this},t.prototype.rotate=function(e){if(e)return this.rotateZ(e.z),this.rotateY(e.y),this.rotateX(e.x),this},t.prototype.rotateZ=function(e){r(this,e,`x`,`y`)},t.prototype.rotateX=function(e){r(this,e,`y`,`z`)},t.prototype.rotateY=function(e){r(this,e,`x`,`z`)};function r(e,t,r,i){if(!(!t||t%n===0)){var a=Math.cos(t),o=Math.sin(t),s=e[r],c=e[i];e[r]=s*a-c*o,e[i]=c*a+s*o}}t.prototype.isSame=function(e){return e?this.x===e.x&&this.y===e.y&&this.z===e.z:!1},t.prototype.add=function(e){return e?(this.x+=e.x||0,this.y+=e.y||0,this.z+=e.z||0,this):this},t.prototype.subtract=function(e){return e?(this.x-=e.x||0,this.y-=e.y||0,this.z-=e.z||0,this):this},t.prototype.multiply=function(e){return e==null||(typeof e==`number`?(this.x*=e,this.y*=e,this.z*=e):(this.x*=e.x==null?1:e.x,this.y*=e.y==null?1:e.y,this.z*=e.z==null?1:e.z)),this},t.prototype.transform=function(e,t,n){return this.multiply(n),this.rotate(t),this.add(e),this},t.prototype.lerp=function(t,n){return this.x=e.lerp(this.x,t.x||0,n),this.y=e.lerp(this.y,t.y||0,n),this.z=e.lerp(this.z,t.z||0,n),this},t.prototype.magnitude=function(){return i(this.x*this.x+this.y*this.y+this.z*this.z)};function i(e){return Math.abs(e-1)<1e-8?1:Math.sqrt(e)}return t.prototype.magnitude2d=function(){return i(this.x*this.x+this.y*this.y)},t.prototype.copy=function(){return new t(this)},t})})),Ii=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Mi(),Fi(),Ni(),Pi());else{var r=e.Zdog;r.Anchor=n(r,r.Vector,r.CanvasRenderer,r.SvgRenderer)}})(e,function(e,t,n,r){var i=e.TAU,a={x:1,y:1,z:1};function o(e){this.create(e||{})}o.prototype.create=function(n){this.children=[],e.extend(this,this.constructor.defaults),this.setOptions(n),this.translate=new t(n.translate),this.rotate=new t(n.rotate),this.scale=new t(a).multiply(this.scale),this.origin=new t,this.renderOrigin=new t,this.addTo&&this.addTo.addChild(this)},o.defaults={},o.optionKeys=Object.keys(o.defaults).concat([`rotate`,`translate`,`scale`,`addTo`]),o.prototype.setOptions=function(e){var t=this.constructor.optionKeys;for(var n in e)t.indexOf(n)!=-1&&(this[n]=e[n])},o.prototype.addChild=function(e){this.children.indexOf(e)==-1&&(e.remove(),e.addTo=this,this.children.push(e))},o.prototype.removeChild=function(e){var t=this.children.indexOf(e);t!=-1&&this.children.splice(t,1)},o.prototype.remove=function(){this.addTo&&this.addTo.removeChild(this)},o.prototype.update=function(){this.reset(),this.children.forEach(function(e){e.update()}),this.transform(this.translate,this.rotate,this.scale)},o.prototype.reset=function(){this.renderOrigin.set(this.origin)},o.prototype.transform=function(e,t,n){this.renderOrigin.transform(e,t,n),this.children.forEach(function(r){r.transform(e,t,n)})},o.prototype.updateGraph=function(){this.update(),this.updateFlatGraph(),this.flatGraph.forEach(function(e){e.updateSortValue()}),this.flatGraph.sort(o.shapeSorter)},o.shapeSorter=function(e,t){return e.sortValue-t.sortValue},Object.defineProperty(o.prototype,"flatGraph",{get:function(){return this._flatGraph||this.updateFlatGraph(),this._flatGraph},set:function(e){this._flatGraph=e}}),o.prototype.updateFlatGraph=function(){this.flatGraph=this.getFlatGraph()},o.prototype.getFlatGraph=function(){var e=[this];return this.addChildFlatGraph(e)},o.prototype.addChildFlatGraph=function(e){return this.children.forEach(function(t){var n=t.getFlatGraph();Array.prototype.push.apply(e,n)}),e},o.prototype.updateSortValue=function(){this.sortValue=this.renderOrigin.z},o.prototype.render=function(){},o.prototype.renderGraphCanvas=function(e){if(!e)throw Error(`ctx is `+e+`. Canvas context required for render. Check .renderGraphCanvas( ctx ).`);this.flatGraph.forEach(function(t){t.render(e,n)})},o.prototype.renderGraphSvg=function(e){if(!e)throw Error(`svg is `+e+`. SVG required for render. Check .renderGraphSvg( svg ).`);this.flatGraph.forEach(function(t){t.render(e,r)})},o.prototype.copy=function(t){var n={};this.constructor.optionKeys.forEach(function(e){n[e]=this[e]},this),e.extend(n,t);var r=this.constructor;return new r(n)},o.prototype.copyGraph=function(e){var t=this.copy(e);return this.children.forEach(function(e){e.copyGraph({addTo:t})}),t},o.prototype.normalizeRotate=function(){this.rotate.x=e.modulo(this.rotate.x,i),this.rotate.y=e.modulo(this.rotate.y,i),this.rotate.z=e.modulo(this.rotate.z,i)};function s(t){return function(n){function r(e){this.create(e||{})}return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.defaults=e.extend({},t.defaults),e.extend(r.defaults,n),r.optionKeys=t.optionKeys.slice(0),Object.keys(r.defaults).forEach(function(e){!r.optionKeys.indexOf(e)!=1&&r.optionKeys.push(e)}),r.subclass=s(r),r}}return o.subclass=s(o),o})})),Li=o(((e,t)=>{(function(e,n){typeof t==`object`&&t.exports?t.exports=n():e.Zdog.Dragger=n()})(e,function(){var e=typeof window<`u`,t=`mousedown`,n=`mousemove`,r=`mouseup`;e&&(window.PointerEvent?(t=`pointerdown`,n=`pointermove`,r=`pointerup`):`ontouchstart`in window&&(t=`touchstart`,n=`touchmove`,r=`touchend`));function i(){}function a(e){this.create(e||{})}return a.prototype.create=function(e){this.onDragStart=e.onDragStart||i,this.onDragMove=e.onDragMove||i,this.onDragEnd=e.onDragEnd||i,this.bindDrag(e.startElement)},a.prototype.bindDrag=function(e){e=this.getQueryElement(e),e&&(e.style.touchAction=`none`,e.addEventListener(t,this))},a.prototype.getQueryElement=function(e){return typeof e==`string`&&(e=document.querySelector(e)),e},a.prototype.handleEvent=function(e){var t=this[`on`+e.type];t&&t.call(this,e)},a.prototype.onmousedown=a.prototype.onpointerdown=function(e){this.dragStart(e,e)},a.prototype.ontouchstart=function(e){this.dragStart(e,e.changedTouches[0])},a.prototype.dragStart=function(t,i){t.preventDefault(),this.dragStartX=i.pageX,this.dragStartY=i.pageY,e&&(window.addEventListener(n,this),window.addEventListener(r,this)),this.onDragStart(i)},a.prototype.ontouchmove=function(e){this.dragMove(e,e.changedTouches[0])},a.prototype.onmousemove=a.prototype.onpointermove=function(e){this.dragMove(e,e)},a.prototype.dragMove=function(e,t){e.preventDefault();var n=t.pageX-this.dragStartX,r=t.pageY-this.dragStartY;this.onDragMove(t,n,r)},a.prototype.onmouseup=a.prototype.onpointerup=a.prototype.ontouchend=a.prototype.dragEnd=function(){window.removeEventListener(n,this),window.removeEventListener(r,this),this.onDragEnd()},a})})),Ri=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Mi(),Ii(),Li());else{var r=e.Zdog;r.Illustration=n(r,r.Anchor,r.Dragger)}})(e,function(e,t,n){function r(){}var i=e.TAU,a=t.subclass({element:void 0,centered:!0,zoom:1,dragRotate:!1,resize:!1,onPrerender:r,onDragStart:r,onDragMove:r,onDragEnd:r,onResize:r});e.extend(a.prototype,n.prototype),a.prototype.create=function(e){t.prototype.create.call(this,e),n.prototype.create.call(this,e),this.setElement(this.element),this.setDragRotate(this.dragRotate),this.setResize(this.resize)},a.prototype.setElement=function(e){if(e=this.getQueryElement(e),!e)throw Error(`Zdog.Illustration element required. Set to `+e);var t=e.nodeName.toLowerCase();t==`canvas`?this.setCanvas(e):t==`svg`&&this.setSvg(e)},a.prototype.setSize=function(e,t){e=Math.round(e),t=Math.round(t),this.isCanvas?this.setSizeCanvas(e,t):this.isSvg&&this.setSizeSvg(e,t)},a.prototype.setResize=function(e){this.resize=e,this.resizeListener||=this.onWindowResize.bind(this),e?(window.addEventListener(`resize`,this.resizeListener),this.onWindowResize()):window.removeEventListener(`resize`,this.resizeListener)},a.prototype.onWindowResize=function(){this.setMeasuredSize(),this.onResize(this.width,this.height)},a.prototype.setMeasuredSize=function(){var e,t;if(this.resize==`fullscreen`)e=window.innerWidth,t=window.innerHeight;else{var n=this.element.getBoundingClientRect();e=n.width,t=n.height}this.setSize(e,t)},a.prototype.renderGraph=function(e){this.isCanvas?this.renderGraphCanvas(e):this.isSvg&&this.renderGraphSvg(e)},a.prototype.updateRenderGraph=function(e){this.updateGraph(),this.renderGraph(e)},a.prototype.setCanvas=function(e){this.element=e,this.isCanvas=!0,this.ctx=this.element.getContext(`2d`),this.setSizeCanvas(e.width,e.height)},a.prototype.setSizeCanvas=function(e,t){this.width=e,this.height=t;var n=this.pixelRatio=window.devicePixelRatio||1;this.element.width=this.canvasWidth=e*n,this.element.height=this.canvasHeight=t*n,n>1&&!this.resize&&(this.element.style.width=e+`px`,this.element.style.height=t+`px`)},a.prototype.renderGraphCanvas=function(e){e||=this,this.prerenderCanvas(),t.prototype.renderGraphCanvas.call(e,this.ctx),this.postrenderCanvas()},a.prototype.prerenderCanvas=function(){var e=this.ctx;if(e.lineCap=`round`,e.lineJoin=`round`,e.clearRect(0,0,this.canvasWidth,this.canvasHeight),e.save(),this.centered){var t=this.width/2*this.pixelRatio,n=this.height/2*this.pixelRatio;e.translate(t,n)}var r=this.pixelRatio*this.zoom;e.scale(r,r),this.onPrerender(e)},a.prototype.postrenderCanvas=function(){this.ctx.restore()},a.prototype.setSvg=function(e){this.element=e,this.isSvg=!0,this.pixelRatio=1;var t=e.getAttribute(`width`),n=e.getAttribute(`height`);this.setSizeSvg(t,n)},a.prototype.setSizeSvg=function(e,t){this.width=e,this.height=t;var n=e/this.zoom,r=t/this.zoom,i=this.centered?-n/2:0,a=this.centered?-r/2:0;this.element.setAttribute(`viewBox`,i+` `+a+` `+n+` `+r),this.resize?(this.element.removeAttribute(`width`),this.element.removeAttribute(`height`)):(this.element.setAttribute(`width`,e),this.element.setAttribute(`height`,t))},a.prototype.renderGraphSvg=function(e){e||=this,o(this.element),this.onPrerender(this.element),t.prototype.renderGraphSvg.call(e,this.element)};function o(e){for(;e.firstChild;)e.removeChild(e.firstChild)}return a.prototype.setDragRotate=function(e){if(e)e===!0&&(e=this);else return;this.dragRotate=e,this.bindDrag(this.element)},a.prototype.dragStart=function(){this.dragStartRX=this.dragRotate.rotate.x,this.dragStartRY=this.dragRotate.rotate.y,n.prototype.dragStart.apply(this,arguments)},a.prototype.dragMove=function(e,t){var r=t.pageX-this.dragStartX,a=t.pageY-this.dragStartY,o=Math.min(this.width,this.height),s=r/o*i,c=a/o*i;this.dragRotate.rotate.x=this.dragStartRX-c,this.dragRotate.rotate.y=this.dragStartRY-s,n.prototype.dragMove.apply(this,arguments)},a})})),zi=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Fi());else{var r=e.Zdog;r.PathCommand=n(r.Vector)}})(e,function(e){function t(t,i,a){this.method=t,this.points=i.map(n),this.renderPoints=i.map(r),this.previousPoint=a,this.endRenderPoint=this.renderPoints[this.renderPoints.length-1],t==`arc`&&(this.controlPoints=[new e,new e])}function n(t){return t instanceof e?t:new e(t)}function r(t){return new e(t)}t.prototype.reset=function(){var e=this.points;this.renderPoints.forEach(function(t,n){var r=e[n];t.set(r)})},t.prototype.transform=function(e,t,n){this.renderPoints.forEach(function(r){r.transform(e,t,n)})},t.prototype.render=function(e,t,n){return this[this.method](e,t,n)},t.prototype.move=function(e,t,n){return n.move(e,t,this.renderPoints[0])},t.prototype.line=function(e,t,n){return n.line(e,t,this.renderPoints[0])},t.prototype.bezier=function(e,t,n){var r=this.renderPoints[0],i=this.renderPoints[1],a=this.renderPoints[2];return n.bezier(e,t,r,i,a)};var i=9/16;return t.prototype.arc=function(e,t,n){var r=this.previousPoint,a=this.renderPoints[0],o=this.renderPoints[1],s=this.controlPoints[0],c=this.controlPoints[1];return s.set(r).lerp(a,i),c.set(o).lerp(a,i),n.bezier(e,t,s,c,o)},t})})),Bi=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Mi(),Fi(),zi(),Ii());else{var r=e.Zdog;r.Shape=n(r,r.Vector,r.PathCommand,r.Anchor)}})(e,function(e,t,n,r){var i=r.subclass({stroke:1,fill:!1,color:`#333`,closed:!0,visible:!0,path:[{}],front:{z:1},backface:!0});i.prototype.create=function(e){r.prototype.create.call(this,e),this.updatePath(),this.front=new t(e.front||this.front),this.renderFront=new t(this.front),this.renderNormal=new t};var a=[`move`,`line`,`bezier`,`arc`];i.prototype.updatePath=function(){this.setPath(),this.updatePathCommands()},i.prototype.setPath=function(){},i.prototype.updatePathCommands=function(){var e;this.pathCommands=this.path.map(function(t,r){var i=Object.keys(t),o=i[0],s=t[o];i.length==1&&a.indexOf(o)!=-1||(o=`line`,s=t),(o==`line`||o==`move`)&&!Array.isArray(s)&&(s=[s]),o=r===0?`move`:o;var c=new n(o,s,e);return e=c.endRenderPoint,c})},i.prototype.reset=function(){this.renderOrigin.set(this.origin),this.renderFront.set(this.front),this.pathCommands.forEach(function(e){e.reset()})},i.prototype.transform=function(e,t,n){this.renderOrigin.transform(e,t,n),this.renderFront.transform(e,t,n),this.renderNormal.set(this.renderOrigin).subtract(this.renderFront),this.pathCommands.forEach(function(r){r.transform(e,t,n)}),this.children.forEach(function(r){r.transform(e,t,n)})},i.prototype.updateSortValue=function(){var e=this.pathCommands.length,t=this.pathCommands[0].endRenderPoint,n=this.pathCommands[e-1].endRenderPoint;e>2&&t.isSame(n)&&--e;for(var r=0,i=0;i<e;i++)r+=this.pathCommands[i].endRenderPoint.z;this.sortValue=r/e},i.prototype.render=function(e,t){var n=this.pathCommands.length;if(!(!this.visible||!n)&&(this.isFacingBack=this.renderNormal.z>0,!(!this.backface&&this.isFacingBack))){if(!t)throw Error(`Zdog renderer required. Set to `+t);var r=n==1;t.isCanvas&&r?this.renderCanvasDot(e,t):this.renderPath(e,t)}};var o=e.TAU;i.prototype.renderCanvasDot=function(e){var t=this.getLineWidth();if(t){e.fillStyle=this.getRenderColor();var n=this.pathCommands[0].endRenderPoint;e.beginPath();var r=t/2;e.arc(n.x,n.y,r,0,o),e.fill()}},i.prototype.getLineWidth=function(){return this.stroke?this.stroke==1?1:this.stroke:0},i.prototype.getRenderColor=function(){return typeof this.backface==`string`&&this.isFacingBack?this.backface:this.color},i.prototype.renderPath=function(e,t){var n=this.getRenderElement(e,t),r=!(this.pathCommands.length==2&&this.pathCommands[1].method==`line`)&&this.closed,i=this.getRenderColor();t.renderPath(e,n,this.pathCommands,r),t.stroke(e,n,this.stroke,i,this.getLineWidth()),t.fill(e,n,this.fill,i),t.end(e,n)};var s=`http://www.w3.org/2000/svg`;return i.prototype.getRenderElement=function(e,t){if(t.isSvg)return this.svgElement||(this.svgElement=document.createElementNS(s,`path`),this.svgElement.setAttribute(`stroke-linecap`,`round`),this.svgElement.setAttribute(`stroke-linejoin`,`round`)),this.svgElement},i})})),Vi=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Ii());else{var r=e.Zdog;r.Group=n(r.Anchor)}})(e,function(e){var t=e.subclass({updateSort:!1,visible:!0});return t.prototype.updateSortValue=function(){var t=0;this.flatGraph.forEach(function(e){e.updateSortValue(),t+=e.sortValue}),this.sortValue=t/this.flatGraph.length,this.updateSort&&this.flatGraph.sort(e.shapeSorter)},t.prototype.render=function(e,t){this.visible&&this.flatGraph.forEach(function(n){n.render(e,t)})},t.prototype.updateFlatGraph=function(){var e=[];this.flatGraph=this.addChildFlatGraph(e)},t.prototype.getFlatGraph=function(){return[this]},t})})),Hi=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Bi());else{var r=e.Zdog;r.Rect=n(r.Shape)}})(e,function(e){var t=e.subclass({width:1,height:1});return t.prototype.setPath=function(){var e=this.width/2,t=this.height/2;this.path=[{x:-e,y:-t},{x:e,y:-t},{x:e,y:t},{x:-e,y:t}]},t})})),Ui=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Bi());else{var r=e.Zdog;r.RoundedRect=n(r.Shape)}})(e,function(e){var t=e.subclass({width:1,height:1,cornerRadius:.25,closed:!1});return t.prototype.setPath=function(){var e=this.width/2,t=this.height/2,n=Math.min(e,t),r=Math.min(this.cornerRadius,n),i=e-r,a=t-r,o=[{x:i,y:-t},{arc:[{x:e,y:-t},{x:e,y:-a}]}];a&&o.push({x:e,y:a}),o.push({arc:[{x:e,y:t},{x:i,y:t}]}),i&&o.push({x:-i,y:t}),o.push({arc:[{x:-e,y:t},{x:-e,y:a}]}),a&&o.push({x:-e,y:-a}),o.push({arc:[{x:-e,y:-t},{x:-i,y:-t}]}),i&&o.push({x:i,y:-t}),this.path=o},t})})),Wi=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Bi());else{var r=e.Zdog;r.Ellipse=n(r.Shape)}})(e,function(e){var t=e.subclass({diameter:1,width:void 0,height:void 0,quarters:4,closed:!1});return t.prototype.setPath=function(){var e=this.width==null?this.diameter:this.width,t=this.height==null?this.diameter:this.height,n=e/2,r=t/2;this.path=[{x:0,y:-r},{arc:[{x:n,y:-r},{x:n,y:0}]}],this.quarters>1&&this.path.push({arc:[{x:n,y:r},{x:0,y:r}]}),this.quarters>2&&this.path.push({arc:[{x:-n,y:r},{x:-n,y:0}]}),this.quarters>3&&this.path.push({arc:[{x:-n,y:-r},{x:0,y:-r}]})},t})})),Gi=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Mi(),Bi());else{var r=e.Zdog;r.Polygon=n(r,r.Shape)}})(e,function(e,t){var n=t.subclass({sides:3,radius:.5}),r=e.TAU;return n.prototype.setPath=function(){this.path=[];for(var e=0;e<this.sides;e++){var t=e/this.sides*r-r/4,n=Math.cos(t)*this.radius,i=Math.sin(t)*this.radius;this.path.push({x:n,y:i})}},n})})),Ki=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Mi(),Fi(),Ii(),Wi());else{var r=e.Zdog;r.Hemisphere=n(r,r.Vector,r.Anchor,r.Ellipse)}})(e,function(e,t,n,r){var i=r.subclass({fill:!0}),a=e.TAU;i.prototype.create=function(){r.prototype.create.apply(this,arguments),this.apex=new n({addTo:this,translate:{z:this.diameter/2}}),this.renderCentroid=new t},i.prototype.updateSortValue=function(){this.renderCentroid.set(this.renderOrigin).lerp(this.apex.renderOrigin,3/8),this.sortValue=this.renderCentroid.z},i.prototype.render=function(e,t){this.renderDome(e,t),r.prototype.render.apply(this,arguments)},i.prototype.renderDome=function(e,t){if(this.visible){var n=this.getDomeRenderElement(e,t),r=Math.atan2(this.renderNormal.y,this.renderNormal.x),i=this.diameter/2*this.renderNormal.magnitude(),o=this.renderOrigin.x,s=this.renderOrigin.y;if(t.isCanvas){var c=r+a/4,l=r-a/4;e.beginPath(),e.arc(o,s,i,c,l)}else t.isSvg&&(r=(r-a/4)/a*360,this.domeSvgElement.setAttribute(`d`,`M `+-i+`,0 A `+i+`,`+i+` 0 0 1 `+i+`,0`),this.domeSvgElement.setAttribute(`transform`,`translate(`+o+`,`+s+` ) rotate(`+r+`)`));t.stroke(e,n,this.stroke,this.color,this.getLineWidth()),t.fill(e,n,this.fill,this.color),t.end(e,n)}};var o=`http://www.w3.org/2000/svg`;return i.prototype.getDomeRenderElement=function(e,t){if(t.isSvg)return this.domeSvgElement||(this.domeSvgElement=document.createElementNS(o,`path`),this.domeSvgElement.setAttribute(`stroke-linecap`,`round`),this.domeSvgElement.setAttribute(`stroke-linejoin`,`round`)),this.domeSvgElement},i})})),qi=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Mi(),zi(),Bi(),Vi(),Wi());else{var r=e.Zdog;r.Cylinder=n(r,r.PathCommand,r.Shape,r.Group,r.Ellipse)}})(e,function(e,t,n,r,i){function a(){}var o=r.subclass({color:`#333`,updateSort:!0});o.prototype.create=function(){r.prototype.create.apply(this,arguments),this.pathCommands=[new t(`move`,[{}]),new t(`line`,[{}])]},o.prototype.render=function(e,t){this.renderCylinderSurface(e,t),r.prototype.render.apply(this,arguments)},o.prototype.renderCylinderSurface=function(e,t){if(this.visible){var n=this.getRenderElement(e,t),r=this.frontBase,i=this.rearBase,a=r.renderNormal.magnitude(),o=r.diameter*a+r.getLineWidth();this.pathCommands[0].renderPoints[0].set(r.renderOrigin),this.pathCommands[1].renderPoints[0].set(i.renderOrigin),t.isCanvas&&(e.lineCap=`butt`),t.renderPath(e,n,this.pathCommands),t.stroke(e,n,!0,this.color,o),t.end(e,n),t.isCanvas&&(e.lineCap=`round`)}};var s=`http://www.w3.org/2000/svg`;o.prototype.getRenderElement=function(e,t){if(t.isSvg)return this.svgElement||=document.createElementNS(s,`path`),this.svgElement},o.prototype.copyGraph=a;var c=i.subclass();c.prototype.copyGraph=a;var l=n.subclass({diameter:1,length:1,frontFace:void 0,fill:!0}),u=e.TAU;return l.prototype.create=function(){n.prototype.create.apply(this,arguments),this.group=new o({addTo:this,color:this.color,visible:this.visible});var e=this.length/2,t=this.backface||!0;this.frontBase=this.group.frontBase=new i({addTo:this.group,diameter:this.diameter,translate:{z:e},rotate:{y:u/2},color:this.color,stroke:this.stroke,fill:this.fill,backface:this.frontFace||t,visible:this.visible}),this.rearBase=this.group.rearBase=this.frontBase.copy({translate:{z:-e},rotate:{y:0},backface:t})},l.prototype.render=function(){},[`stroke`,`fill`,`color`,`visible`].forEach(function(e){var t=`_`+e;Object.defineProperty(l.prototype,e,{get:function(){return this[t]},set:function(n){this[t]=n,this.frontBase&&(this.frontBase[e]=n,this.rearBase[e]=n,this.group[e]=n)}})}),l})})),Ji=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Mi(),Fi(),zi(),Ii(),Wi());else{var r=e.Zdog;r.Cone=n(r,r.Vector,r.PathCommand,r.Anchor,r.Ellipse)}})(e,function(e,t,n,r,i){var a=i.subclass({length:1,fill:!0}),o=e.TAU;a.prototype.create=function(){i.prototype.create.apply(this,arguments),this.apex=new r({addTo:this,translate:{z:this.length}}),this.renderApex=new t,this.renderCentroid=new t,this.tangentA=new t,this.tangentB=new t,this.surfacePathCommands=[new n(`move`,[{}]),new n(`line`,[{}]),new n(`line`,[{}])]},a.prototype.updateSortValue=function(){this.renderCentroid.set(this.renderOrigin).lerp(this.apex.renderOrigin,1/3),this.sortValue=this.renderCentroid.z},a.prototype.render=function(e,t){this.renderConeSurface(e,t),i.prototype.render.apply(this,arguments)},a.prototype.renderConeSurface=function(e,t){if(this.visible){this.renderApex.set(this.apex.renderOrigin).subtract(this.renderOrigin);var n=this.renderNormal.magnitude(),r=this.renderApex.magnitude2d(),i=this.renderNormal.magnitude2d(),a=Math.acos(i/n),s=Math.sin(a),c=this.diameter/2*n;if(c*s<r){var l=Math.atan2(this.renderNormal.y,this.renderNormal.x)+o/2,u=r/s,d=Math.acos(c/u),f=this.tangentA,p=this.tangentB;f.x=Math.cos(d)*c*s,f.y=Math.sin(d)*c,p.set(this.tangentA),p.y*=-1,f.rotateZ(l),p.rotateZ(l),f.add(this.renderOrigin),p.add(this.renderOrigin),this.setSurfaceRenderPoint(0,f),this.setSurfaceRenderPoint(1,this.apex.renderOrigin),this.setSurfaceRenderPoint(2,p);var m=this.getSurfaceRenderElement(e,t);t.renderPath(e,m,this.surfacePathCommands),t.stroke(e,m,this.stroke,this.color,this.getLineWidth()),t.fill(e,m,this.fill,this.color),t.end(e,m)}}};var s=`http://www.w3.org/2000/svg`;return a.prototype.getSurfaceRenderElement=function(e,t){if(t.isSvg)return this.surfaceSvgElement||(this.surfaceSvgElement=document.createElementNS(s,`path`),this.surfaceSvgElement.setAttribute(`stroke-linecap`,`round`),this.surfaceSvgElement.setAttribute(`stroke-linejoin`,`round`)),this.surfaceSvgElement},a.prototype.setSurfaceRenderPoint=function(e,t){this.surfacePathCommands[e].renderPoints[0].set(t)},a})})),Yi=o(((e,t)=>{(function(e,n){if(typeof t==`object`&&t.exports)t.exports=n(Mi(),Ii(),Bi(),Hi());else{var r=e.Zdog;r.Box=n(r,r.Anchor,r.Shape,r.Rect)}})(e,function(e,t,n,r){var i=r.subclass();i.prototype.copyGraph=function(){};var a=e.TAU,o=[`frontFace`,`rearFace`,`leftFace`,`rightFace`,`topFace`,`bottomFace`],s=e.extend({},n.defaults);delete s.path,o.forEach(function(e){s[e]=!0}),e.extend(s,{width:1,height:1,depth:1,fill:!0});var c=t.subclass(s);return c.prototype.create=function(e){t.prototype.create.call(this,e),this.updatePath(),this.fill=this.fill},c.prototype.updatePath=function(){o.forEach(function(e){this[e]=this[e]},this)},o.forEach(function(e){var t=`_`+e;Object.defineProperty(c.prototype,e,{get:function(){return this[t]},set:function(n){this[t]=n,this.setFace(e,n)}})}),c.prototype.setFace=function(e,t){var n=e+`Rect`,r=this[n];if(!t){this.removeChild(r);return}var a=this.getFaceOptions(e);a.color=typeof t==`string`?t:this.color,r?r.setOptions(a):r=this[n]=new i(a),r.updatePath(),this.addChild(r)},c.prototype.getFaceOptions=function(e){return{frontFace:{width:this.width,height:this.height,translate:{z:this.depth/2}},rearFace:{width:this.width,height:this.height,translate:{z:-this.depth/2},rotate:{y:a/2}},leftFace:{width:this.depth,height:this.height,translate:{x:-this.width/2},rotate:{y:-a/4}},rightFace:{width:this.depth,height:this.height,translate:{x:this.width/2},rotate:{y:a/4}},topFace:{width:this.width,height:this.depth,translate:{y:-this.height/2},rotate:{x:-a/4}},bottomFace:{width:this.width,height:this.depth,translate:{y:this.height/2},rotate:{x:a/4}}}[e]},[`color`,`stroke`,`fill`,`backface`,`front`,`visible`].forEach(function(e){var t=`_`+e;Object.defineProperty(c.prototype,e,{get:function(){return this[t]},set:function(n){this[t]=n,o.forEach(function(t){var r=this[t+`Rect`],i=typeof this[t]==`string`;r&&!(e==`color`&&i)&&(r[e]=n)},this)}})}),c})})),Q=c(o(((e,t)=>{(function(e,n){typeof t==`object`&&t.exports?t.exports=n(Mi(),Ni(),Pi(),Fi(),Ii(),Li(),Ri(),zi(),Bi(),Vi(),Hi(),Ui(),Wi(),Gi(),Ki(),qi(),Ji(),Yi()):typeof define==`function`&&define.amd&&define(`zdog`,[],e.Zdog)})(e,function(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_){return e.CanvasRenderer=t,e.SvgRenderer=n,e.Vector=r,e.Anchor=i,e.Dragger=a,e.Illustration=o,e.PathCommand=s,e.Shape=c,e.Group=l,e.Rect=u,e.RoundedRect=d,e.Ellipse=f,e.Polygon=p,e.Hemisphere=m,e.Cylinder=h,e.Cone=g,e.Box=_,e})}))()),Xi=Y(`<canvas class="land-canvas svelte-1mpuuoe"></canvas>`);function Zi(e,t){Ge(t,!0);let n=Q.default.TAU,r=.6,i=1.06,a=Xt(null),o,s,c=!0,l=r,u=0,d=0,f=(e,t,n)=>e+(t-e)*n;function p(e){let t=`#36601A`,r=`#FFE4F0`,i=`#FFF7FB`,a=-310,o=new Q.default.Anchor({addTo:e}),s=new Q.default.Anchor({addTo:o,scale:.82});new Q.default.Cylinder({addTo:s,diameter:2160,length:260,color:`#9A6438`,frontFace:`#5ab030`,backface:`#6E4424`,stroke:!1,rotate:{x:n/4},translate:{y:300,z:a}}),new Q.default.Ellipse({addTo:s,diameter:1820,stroke:0,fill:!0,color:`#3a8018`,rotate:{x:n/4},translate:{y:169,z:a}}),new Q.default.Ellipse({addTo:s,diameter:600,stroke:24,color:`#5EA7DC`,rotate:{x:n/4},translate:{x:100,y:166,z:a}}),new Q.default.Ellipse({addTo:s,diameter:576,stroke:0,fill:!0,color:`#73BFF5`,rotate:{x:n/4},translate:{x:100,y:168,z:a}});function c(e,n,r,i=1){let a=new Q.default.Anchor({addTo:e,translate:{x:n,y:170,z:r},scale:i});new Q.default.Shape({addTo:a,path:[{x:0,y:0},{x:0,y:-180}],stroke:34,color:`#6B4A2A`}),new Q.default.Shape({addTo:a,stroke:190,color:`#4A7B28`,translate:{y:-210}}),new Q.default.Shape({addTo:a,stroke:160,color:t,translate:{x:-52,y:-190,z:18}}),new Q.default.Shape({addTo:a,stroke:160,color:t,translate:{x:52,y:-190,z:18}})}c(s,-480,-480,.85),c(s,500,-200,1),c(s,180,-680,.8),c(s,-420,-100,1.05),c(s,560,-560,.75),c(s,-560,-240,.9);function l(e,t,n,a,o=1){let s=new Q.default.Anchor({addTo:e,translate:{x:t,y:n,z:a},scale:o});new Q.default.Shape({addTo:s,stroke:110,color:i}),new Q.default.Shape({addTo:s,stroke:76,color:r,translate:{x:-58,y:12}}),new Q.default.Shape({addTo:s,stroke:82,color:i,translate:{x:56,y:6}}),new Q.default.Shape({addTo:s,stroke:64,color:r,translate:{x:-98,y:16}}),new Q.default.Shape({addTo:s,stroke:58,color:i,translate:{x:100,y:12}})}l(o,-680,-360,-500,1.25),l(o,-180,-450,-960,1.15),l(o,320,-360,-600,1.1)}function m(e){let t=K(a).getBoundingClientRect();return{x:e.clientX-t.left-t.width/2,y:e.clientY-t.top-t.height/2}}function h(e){e.preventDefault();let t=m(e);u=t.x,d=t.y;let n=e.deltaY<0?i:1/i;l=Math.max(.15,Math.min(16,l*n))}function g(){c=!1,K(a).style.cursor=`grabbing`}function _(){K(a)&&(K(a).style.cursor=`grab`)}Di(()=>{o=new Q.default.Illustration({element:K(a),dragRotate:!0,resize:`window`,zoom:r,rotate:{x:-n/9,y:n/10}}),p(o);function e(){s=requestAnimationFrame(e),c&&(o.rotate.y+=.003);let t=o.zoom,n=f(t,l,.12);if(Math.abs(n-t)>1e-5){let e=1/n-1/t;o.translate.x+=u*e,o.translate.y+=d*e,o.zoom=n}o.updateRenderGraph()}e(),K(a).addEventListener(`wheel`,h,{passive:!1}),window.addEventListener(`pointerup`,_)}),Oi(()=>{cancelAnimationFrame(s),K(a)&&K(a).removeEventListener(`wheel`,h),typeof window<`u`&&window.removeEventListener(`pointerup`,_)});var v=Xi();bi(v,e=>V(a,e),()=>K(a)),J(`pointerdown`,v,g),X(e,v),Ke()}function Qi(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function $i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var ea={autoSleep:120,force3D:`auto`,nullTargetWarn:1,units:{lineHeight:``}},ta={duration:.5,overwrite:!1,delay:0},na,ra,ia,aa=1e8,oa=1/aa,sa=Math.PI*2,ca=sa/4,la=0,ua=Math.sqrt,da=Math.cos,fa=Math.sin,pa=function(e){return typeof e==`string`},ma=function(e){return typeof e==`function`},ha=function(e){return typeof e==`number`},ga=function(e){return e===void 0},_a=function(e){return typeof e==`object`},va=function(e){return e!==!1},ya=function(){return typeof window<`u`},ba=function(e){return ma(e)||pa(e)},xa=typeof ArrayBuffer==`function`&&ArrayBuffer.isView||function(){},Sa=Array.isArray,Ca=/random\([^)]+\)/g,wa=/,\s*/g,Ta=/(?:-?\.?\d|\.)+/gi,Ea=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Da=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Oa=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,ka=/[+-]=-?[.\d]+/,Aa=/[^,'"\[\]\s]+/gi,ja=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ma,Na,Pa,Fa,Ia={},La={},Ra,za=function(e){return(La=vo(e,Ia))&&Lc},Ba=function(e,t){return console.warn(`Invalid property`,e,`set to`,t,`Missing plugin? gsap.registerPlugin()`)},Va=function(e,t){return!t&&console.warn(e)},Ha=function(e,t){return e&&(Ia[e]=t)&&La&&(La[e]=t)||Ia},Ua=function(){return 0},Wa={suppressEvents:!0,isStart:!0,kill:!1},Ga={suppressEvents:!0,kill:!1},Ka={suppressEvents:!0},qa={},Ja=[],Ya={},Xa,Za={},Qa={},$a=30,eo=[],to=``,no=function(e){var t=e[0],n,r;if(_a(t)||ma(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=eo.length;r--&&!eo[r].targetTest(t););n=eo[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new qs(e[r],n)))||e.splice(r,1);return e},ro=function(e){return e._gsap||no(ts(e))[0]._gsap},io=function(e,t,n){return(n=e[t])&&ma(n)?e[t]():ga(n)&&e.getAttribute&&e.getAttribute(t)||n},ao=function(e,t){return(e=e.split(`,`)).forEach(t)||e},oo=function(e){return Math.round(e*1e5)/1e5||0},so=function(e){return Math.round(e*1e7)/1e7||0},co=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n===`+`?e+r:n===`-`?e-r:n===`*`?e*r:e/r},lo=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},uo=function(){var e=Ja.length,t=Ja.slice(0),n,r;for(Ya={},Ja.length=0,n=0;n<e;n++)r=t[n],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},fo=function(e){return!!(e._initted||e._startAt||e.add)},po=function(e,t,n,r){Ja.length&&!ra&&uo(),e.render(t,n,r||!!(ra&&t<0&&fo(e))),Ja.length&&!ra&&uo()},mo=function(e){var t=parseFloat(e);return(t||t===0)&&(e+``).match(Aa).length<2?t:pa(e)?e.trim():e},ho=function(e){return e},go=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},_o=function(e){return function(t,n){for(var r in n)r in t||r===`duration`&&e||r===`ease`||(t[r]=n[r])}},vo=function(e,t){for(var n in t)e[n]=t[n];return e},yo=function e(t,n){for(var r in n)r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&(t[r]=_a(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},bo=function(e,t){var n={},r;for(r in e)r in t||(n[r]=e[r]);return n},xo=function(e){var t=e.parent||Ma,n=e.keyframes?_o(Sa(e.keyframes)):go;if(va(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},So=function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0},Co=function(e,t,n,r,i){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var a=e[r],o;if(i)for(o=t[i];a&&a[i]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=a,t.parent=t._dp=e,t},wo=function(e,t,n,r){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var i=t._prev,a=t._next;i?i._next=a:e[n]===t&&(e[n]=a),a?a._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},To=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Eo=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},Do=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Oo=function(e,t,n,r){return e._startAt&&(ra?e._startAt.revert(Ga):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},ko=function e(t){return!t||t._ts&&e(t.parent)},Ao=function(e){return e._repeat?jo(e._tTime,e=e.duration()+e._rDelay)*e:0},jo=function(e,t){var n=Math.floor(e=so(e/t));return e&&n===e?n-1:n},Mo=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},No=function(e){return e._end=so(e._start+(e._tDur/Math.abs(e._ts||e._rts||oa)||0))},Po=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=so(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),No(e),n._dirty||Eo(n,e)),e},Fo=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=Mo(e.rawTime(),t),(!t._dur||Yo(0,t.totalDuration(),n)-t._tTime>oa)&&t.render(n,!0)),Eo(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-oa}},Io=function(e,t,n,r){return t.parent&&To(t),t._start=so((ha(n)?n:n||e!==Ma?Ko(e,n,t):e._time)+t._delay),t._end=so(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Co(e,t,`_first`,`_last`,e._sort?`_start`:0),Bo(t)||(e._recent=t),r||Fo(e,t),e._ts<0&&Po(e,e._tTime),e},Lo=function(e,t){return(Ia.ScrollTrigger||Ba(`scrollTrigger`,t))&&Ia.ScrollTrigger.create(t,e)},Ro=function(e,t,n,r,i){if(nc(e,t,i),!e._initted)return 1;if(!n&&e._pt&&!ra&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Xa!==Ns.frame)return Ja.push(e),e._lazy=[i,r],1},zo=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},Bo=function(e){var t=e.data;return t===`isFromStart`||t===`isStart`},Vo=function(e,t,n,r){var i=e.ratio,a=t<0||!t&&(!e._start&&zo(e)&&!(!e._initted&&Bo(e))||(e._ts<0||e._dp._ts<0)&&!Bo(e))?0:1,o=e._rDelay,s=0,c,l,u;if(o&&e._repeat&&(s=Yo(0,e._tDur,t),l=jo(s,o),e._yoyo&&l&1&&(a=1-a),l!==jo(e._tTime,o)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==i||ra||r||e._zTime===oa||!t&&e._zTime){if(!e._initted&&Ro(e,t,r,n,s))return;for(u=e._zTime,e._zTime=t||(n?oa:0),n||=t&&!u,e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=s,c=e._pt;c;)c.r(a,c.d),c=c._next;t<0&&Oo(e,t,n,!0),e._onUpdate&&!n&&vs(e,`onUpdate`),s&&e._repeat&&!n&&e.parent&&vs(e,`onRepeat`),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&To(e,1),!n&&!ra&&(vs(e,a?`onComplete`:`onReverseComplete`,!0),e._prom&&e._prom()))}else e._zTime||=t},Ho=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data===`isPause`&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data===`isPause`&&r._start<t)return r;r=r._prev}},Uo=function(e,t,n,r){var i=e._repeat,a=so(t)||0,o=e._tTime/e._tDur;return o&&!r&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:so(a*(i+1)+e._rDelay*i):a,o>0&&!r&&Po(e,e._tTime=e._tDur*o),e.parent&&No(e),n||Eo(e.parent,e),e},Wo=function(e){return e instanceof Ys?Eo(e):Uo(e,e._dur)},Go={_start:0,endTime:Ua,totalDuration:Ua},Ko=function e(t,n,r){var i=t.labels,a=t._recent||Go,o=t.duration()>=aa?a.endTime(!1):t._dur,s,c,l;return pa(n)&&(isNaN(n)||n in i)?(c=n.charAt(0),l=n.substr(-1)===`%`,s=n.indexOf(`=`),c===`<`||c===`>`?(s>=0&&(n=n.replace(/=/,``)),(c===`<`?a._start:a.endTime(a._repeat>=0))+(parseFloat(n.substr(1))||0)*(l?(s<0?a:r).totalDuration()/100:1)):s<0?(n in i||(i[n]=o),i[n]):(c=parseFloat(n.charAt(s-1)+n.substr(s+1)),l&&r&&(c=c/100*(Sa(r)?r[0]:r).totalDuration()),s>1?e(t,n.substr(0,s-1),r)+c:o+c)):n==null?o:+n},qo=function(e,t,n){var r=ha(t[1]),i=(r?2:1)+(e<2?0:1),a=t[i],o,s;if(r&&(a.duration=t[1]),a.parent=n,e){for(o=a,s=n;s&&!(`immediateRender`in o);)o=s.vars.defaults||{},s=va(s.vars.inherit)&&s.parent;a.immediateRender=va(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[i-1]}return new lc(t[0],a,t[i+1])},Jo=function(e,t){return e||e===0?t(e):t},Yo=function(e,t,n){return n<e?e:n>t?t:n},Xo=function(e,t){return!pa(e)||!(t=ja.exec(e))?``:t[1]},Zo=function(e,t,n){return Jo(n,function(n){return Yo(e,t,n)})},Qo=[].slice,$o=function(e,t){return e&&_a(e)&&`length`in e&&(!t&&!e.length||e.length-1 in e&&_a(e[0]))&&!e.nodeType&&e!==Na},es=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(e){var r;return pa(e)&&!t||$o(e,1)?(r=n).push.apply(r,ts(e)):n.push(e)})||n},ts=function(e,t,n){return ia&&!t&&ia.selector?ia.selector(e):pa(e)&&!n&&(Pa||!Ps())?Qo.call((t||Fa).querySelectorAll(e),0):Sa(e)?es(e,n):$o(e)?Qo.call(e,0):e?[e]:[]},ns=function(e){return e=ts(e)[0]||Va(`Invalid scope`)||{},function(t){var n=e.current||e.nativeElement||e;return ts(t,n.querySelectorAll?n:n===e?Va(`Invalid scope`)||Fa.createElement(`div`):e)}},rs=function(e){return e.sort(function(){return .5-Math.random()})},is=function(e){if(ma(e))return e;var t=_a(e)?e:{each:e},n=Hs(t.ease),r=t.from||0,i=parseFloat(t.base)||0,a={},o=r>0&&r<1,s=isNaN(r)||o,c=t.axis,l=r,u=r;return pa(r)?l=u={center:.5,edges:.5,end:1}[r]||0:!o&&s&&(l=r[0],u=r[1]),function(e,o,d){var f=(d||t).length,p=a[f],m,h,g,_,v,y,b,x,S;if(!p){if(S=t.grid===`auto`?0:(t.grid||[1,aa])[1],!S){for(b=-aa;b<(b=d[S++].getBoundingClientRect().left)&&S<f;);S<f&&S--}for(p=a[f]=[],m=s?Math.min(S,f)*l-.5:r%S,h=S===aa?0:s?f*u/S-.5:r/S|0,b=0,x=aa,y=0;y<f;y++)g=y%S-m,_=h-(y/S|0),p[y]=v=c?Math.abs(c===`y`?_:g):ua(g*g+_*_),v>b&&(b=v),v<x&&(x=v);r===`random`&&rs(p),p.max=b-x,p.min=x,p.v=f=(parseFloat(t.amount)||parseFloat(t.each)*(S>f?f-1:c?c===`y`?f/S:S:Math.max(S,f/S))||0)*(r===`edges`?-1:1),p.b=f<0?i-f:i,p.u=Xo(t.amount||t.each)||0,n=n&&f<0?Vs(n):n}return f=(p[e]-p.min)/p.max||0,so(p.b+(n?n(f):f)*p.v)+p.u}},as=function(e){var t=10**((e+``).split(`.`)[1]||``).length;return function(n){var r=so(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(ha(n)?0:Xo(n))}},os=function(e,t){var n=Sa(e),r,i;return!n&&_a(e)&&(r=n=e.radius||aa,e.values?(e=ts(e.values),(i=!ha(e[0]))&&(r*=r)):e=as(e.increment)),Jo(t,n?ma(e)?function(t){return i=e(t),Math.abs(i-t)<=r?i:t}:function(t){for(var n=parseFloat(i?t.x:t),a=parseFloat(i?t.y:0),o=aa,s=0,c=e.length,l,u;c--;)i?(l=e[c].x-n,u=e[c].y-a,l=l*l+u*u):l=Math.abs(e[c]-n),l<o&&(o=l,s=c);return s=!r||o<=r?e[s]:t,i||s===t||ha(t)?s:s+Xo(t)}:as(e))},ss=function(e,t,n,r){return Jo(Sa(e)?!t:n===!0?!!(n=0):!r,function(){return Sa(e)?e[~~(Math.random()*e.length)]:(n||=1e-5)&&(r=n<1?10**((n+``).length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*r)/r})},cs=function(){var e=[...arguments];return function(t){return e.reduce(function(e,t){return t(e)},t)}},ls=function(e,t){return function(n){return e(parseFloat(n))+(t||Xo(n))}},us=function(e,t,n){return hs(e,t,0,1,n)},ds=function(e,t,n){return Jo(n,function(n){return e[~~t(n)]})},fs=function e(t,n,r){var i=n-t;return Sa(t)?ds(t,e(0,t.length),n):Jo(r,function(e){return(i+(e-t)%i)%i+t})},ps=function e(t,n,r){var i=n-t,a=i*2;return Sa(t)?ds(t,e(0,t.length-1),n):Jo(r,function(e){return e=(a+(e-t)%a)%a||0,t+(e>i?a-e:e)})},ms=function(e){return e.replace(Ca,function(e){var t=e.indexOf(`[`)+1,n=e.substring(t||7,t?e.indexOf(`]`):e.length-1).split(wa);return ss(t?n:+n[0],t?0:+n[1],+n[2]||1e-5)})},hs=function(e,t,n,r,i){var a=t-e,o=r-n;return Jo(i,function(t){return n+((t-e)/a*o||0)})},gs=function e(t,n,r,i){var a=isNaN(t+n)?0:function(e){return(1-e)*t+e*n};if(!a){var o=pa(t),s={},c,l,u,d,f;if(r===!0&&(i=1)&&(r=null),o)t={p:t},n={p:n};else if(Sa(t)&&!Sa(n)){for(u=[],d=t.length,f=d-2,l=1;l<d;l++)u.push(e(t[l-1],t[l]));d--,a=function(e){e*=d;var t=Math.min(f,~~e);return u[t](e-t)},r=n}else i||(t=vo(Sa(t)?[]:{},t));if(!u){for(c in n)Zs.call(s,t,c,`get`,n[c]);a=function(e){return vc(e,s)||(o?t.p:t)}}}return Jo(r,a)},_s=function(e,t,n){var r=e.labels,i=aa,a,o,s;for(a in r)o=r[a]-t,o<0==!!n&&o&&i>(o=Math.abs(o))&&(s=a,i=o);return s},vs=function(e,t,n){var r=e.vars,i=r[t],a=ia,o=e._ctx,s,c,l;if(i)return s=r[t+`Params`],c=r.callbackScope||e,n&&Ja.length&&uo(),o&&(ia=o),l=s?i.apply(c,s):i.call(c),ia=a,l},ys=function(e){return To(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ra),e.progress()<1&&vs(e,`onInterrupt`),e},bs,xs=[],Ss=function(e){if(e)if(e=!e.name&&e.default||e,ya()||e.headless){var t=e.name,n=ma(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:Ua,render:vc,add:Zs,kill:bc,modifier:yc,rawVars:0},a={targetTest:0,get:0,getSetter:mc,aliases:{},register:0};if(Ps(),e!==r){if(Za[t])return;go(r,go(bo(e,i),a)),vo(r.prototype,vo(i,bo(e,a))),Za[r.prop=t]=r,e.targetTest&&(eo.push(r),qa[t]=1),t=(t===`css`?`CSS`:t.charAt(0).toUpperCase()+t.substr(1))+`Plugin`}Ha(t,r),e.register&&e.register(Lc,r,Cc)}else xs.push(e)},Cs=255,ws={aqua:[0,Cs,Cs],lime:[0,Cs,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Cs],navy:[0,0,128],white:[Cs,Cs,Cs],olive:[128,128,0],yellow:[Cs,Cs,0],orange:[Cs,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Cs,0,0],pink:[Cs,192,203],cyan:[0,Cs,Cs],transparent:[Cs,Cs,Cs,0]},Ts=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*Cs+.5|0},Es=function(e,t,n){var r=e?ha(e)?[e>>16,e>>8&Cs,e&Cs]:0:ws.black,i,a,o,s,c,l,u,d,f,p;if(!r){if(e.substr(-1)===`,`&&(e=e.substr(0,e.length-1)),ws[e])r=ws[e];else if(e.charAt(0)===`#`){if(e.length<6&&(i=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e=`#`+i+i+a+a+o+o+(e.length===5?e.charAt(4)+e.charAt(4):``)),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&Cs,r&Cs,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&Cs,e&Cs]}else if(e.substr(0,3)===`hsl`){if(r=p=e.match(Ta),!t)s=r[0]%360/360,c=r[1]/100,l=r[2]/100,a=l<=.5?l*(c+1):l+c-l*c,i=l*2-a,r.length>3&&(r[3]*=1),r[0]=Ts(s+1/3,i,a),r[1]=Ts(s,i,a),r[2]=Ts(s-1/3,i,a);else if(~e.indexOf(`=`))return r=e.match(Ea),n&&r.length<4&&(r[3]=1),r}else r=e.match(Ta)||ws.transparent;r=r.map(Number)}return t&&!p&&(i=r[0]/Cs,a=r[1]/Cs,o=r[2]/Cs,u=Math.max(i,a,o),d=Math.min(i,a,o),l=(u+d)/2,u===d?s=c=0:(f=u-d,c=l>.5?f/(2-u-d):f/(u+d),s=u===i?(a-o)/f+(a<o?6:0):u===a?(o-i)/f+2:(i-a)/f+4,s*=60),r[0]=~~(s+.5),r[1]=~~(c*100+.5),r[2]=~~(l*100+.5)),n&&r.length<4&&(r[3]=1),r},Ds=function(e){var t=[],n=[],r=-1;return e.split(ks).forEach(function(e){var i=e.match(Da)||[];t.push.apply(t,i),n.push(r+=i.length+1)}),t.c=n,t},Os=function(e,t,n){var r=``,i=(e+r).match(ks),a=t?`hsla(`:`rgba(`,o=0,s,c,l,u;if(!i)return e;if(i=i.map(function(e){return(e=Es(e,t,1))&&a+(t?e[0]+`,`+e[1]+`%,`+e[2]+`%,`+e[3]:e.join(`,`))+`)`}),n&&(l=Ds(e),s=n.c,s.join(r)!==l.c.join(r)))for(c=e.replace(ks,`1`).split(Da),u=c.length-1;o<u;o++)r+=c[o]+(~s.indexOf(o)?i.shift()||a+`0,0,0,0)`:(l.length?l:i.length?i:n).shift());if(!c)for(c=e.split(ks),u=c.length-1;o<u;o++)r+=c[o]+i[o];return r+c[u]},ks=function(){var e=`(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b`,t;for(t in ws)e+=`|`+t+`\\b`;return RegExp(e+`)`,`gi`)}(),As=/hsl[a]?\(/,js=function(e){var t=e.join(` `),n;if(ks.lastIndex=0,ks.test(t))return n=As.test(t),e[1]=Os(e[1],n),e[0]=Os(e[0],n,Ds(e[1])),!0},Ms,Ns=function(){var e=Date.now,t=500,n=33,r=e(),i=r,a=1e3/240,o=a,s=[],c,l,u,d,f,p,m=function u(m){var h=e()-i,g=m===!0,_,v,y,b;if((h>t||h<0)&&(r+=h-n),i+=h,y=i-r,_=y-o,(_>0||g)&&(b=++d.frame,f=y-d.time*1e3,d.time=y/=1e3,o+=_+(_>=a?4:a-_),v=1),g||(c=l(u)),v)for(p=0;p<s.length;p++)s[p](y,f,b,m)};return d={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(e){return f/(1e3/(e||60))},wake:function(){Ra&&(!Pa&&ya()&&(Na=Pa=window,Fa=Na.document||{},Ia.gsap=Lc,(Na.gsapVersions||=[]).push(Lc.version),za(La||Na.GreenSockGlobals||!Na.gsap&&Na||{}),xs.forEach(Ss)),u=typeof requestAnimationFrame<`u`&&requestAnimationFrame,c&&d.sleep(),l=u||function(e){return setTimeout(e,o-d.time*1e3+1|0)},Ms=1,m(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(c),Ms=0,l=Ua},lagSmoothing:function(e,r){t=e||1/0,n=Math.min(r||33,t)},fps:function(e){a=1e3/(e||240),o=d.time*1e3+a},add:function(e,t,n){var r=t?function(t,n,i,a){e(t,n,i,a),d.remove(r)}:e;return d.remove(e),s[n?`unshift`:`push`](r),Ps(),r},remove:function(e,t){~(t=s.indexOf(e))&&s.splice(t,1)&&p>=t&&p--},_listeners:s},d}(),Ps=function(){return!Ms&&Ns.wake()},Fs={},Is=/^[\d.\-M][\d.\-,\s]/,Ls=/["']/g,Rs=function(e){for(var t={},n=e.substr(1,e.length-3).split(`:`),r=n[0],i=1,a=n.length,o,s,c;i<a;i++)s=n[i],o=i===a-1?s.length:s.lastIndexOf(`,`),c=s.substr(0,o),t[r]=isNaN(c)?c.replace(Ls,``).trim():+c,r=s.substr(o+1).trim();return t},zs=function(e){var t=e.indexOf(`(`)+1,n=e.indexOf(`)`),r=e.indexOf(`(`,t);return e.substring(t,~r&&r<n?e.indexOf(`)`,n+1):n)},Bs=function(e){var t=(e+``).split(`(`),n=Fs[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf(`{`)?[Rs(t[1])]:zs(e).split(`,`).map(mo)):Fs._CE&&Is.test(e)?Fs._CE(``,e):n},Vs=function(e){return function(t){return 1-e(1-t)}},Hs=function(e,t){return e&&(ma(e)?e:Fs[e]||Bs(e))||t},Us=function(e,t,n,r){n===void 0&&(n=function(e){return 1-t(1-e)}),r===void 0&&(r=function(e){return e<.5?t(e*2)/2:1-t((1-e)*2)/2});var i={easeIn:t,easeOut:n,easeInOut:r},a;return ao(e,function(e){for(var t in Fs[e]=Ia[e]=i,Fs[a=e.toLowerCase()]=n,i)Fs[a+(t===`easeIn`?`.in`:t===`easeOut`?`.out`:`.inOut`)]=Fs[e+`.`+t]=i[t]}),i},Ws=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Gs=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),o=a/sa*(Math.asin(1/i)||0),s=function(e){return e===1?1:i*2**(-10*e)*fa((e-o)*a)+1},c=t===`out`?s:t===`in`?function(e){return 1-s(1-e)}:Ws(s);return a=sa/a,c.config=function(n,r){return e(t,n,r)},c},Ks=function e(t,n){n===void 0&&(n=1.70158);var r=function(e){return e?--e*e*((n+1)*e+n)+1:0},i=t===`out`?r:t===`in`?function(e){return 1-r(1-e)}:Ws(r);return i.config=function(n){return e(t,n)},i};ao(`Linear,Quad,Cubic,Quart,Quint,Strong`,function(e,t){var n=t<5?t+1:t;Us(e+`,Power`+(n-1),t?function(e){return e**+n}:function(e){return e},function(e){return 1-(1-e)**n},function(e){return e<.5?(e*2)**n/2:1-((1-e)*2)**n/2})}),Fs.Linear.easeNone=Fs.none=Fs.Linear.easeIn,Us(`Elastic`,Gs(`in`),Gs(`out`),Gs()),(function(e,t){var n=1/t,r=2*n,i=2.5*n,a=function(a){return a<n?e*a*a:a<r?e*(a-1.5/t)**2+.75:a<i?e*(a-=2.25/t)*a+.9375:e*(a-2.625/t)**2+.984375};Us(`Bounce`,function(e){return 1-a(1-e)},a)})(7.5625,2.75),Us(`Expo`,function(e){return 2**(10*(e-1))*e+e*e*e*e*e*e*(1-e)}),Us(`Circ`,function(e){return-(ua(1-e*e)-1)}),Us(`Sine`,function(e){return e===1?1:-da(e*ca)+1}),Us(`Back`,Ks(`in`),Ks(`out`),Ks()),Fs.SteppedEase=Fs.steps=Ia.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,r=e+ +!t,i=+!!t,a=1-oa;return function(e){return((r*Yo(0,a,e)|0)+i)*n}}},ta.ease=Fs[`quad.out`],ao(`onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt`,function(e){return to+=e+`,`+e+`Params,`});var qs=function(e,t){this.id=la++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:io,this.set=t?t.getSetter:mc},Js=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,Uo(this,+e.duration,1,1),this.data=e.data,ia&&(this._ctx=ia,ia.data.push(this)),Ms||Ns.wake()}var t=e.prototype;return t.delay=function(e){return e||e===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,Uo(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(Ps(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(Po(this,e),!n._dp||n.parent||Fo(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&Io(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===oa||!this._initted&&this._dur&&e||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),po(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+Ao(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-e:e)+Ao(this),t):this.duration()?Math.min(1,this._time/this._dur):+(this.rawTime()>0)},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?jo(this._tTime,n)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-oa?0:this._rts;if(this._rts===e)return this;var n=this.parent&&this._ts?Mo(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-oa?0:this._rts,this.totalTime(Yo(-Math.abs(this._delay),this.totalDuration(),n),t!==!1),No(this),Do(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ps(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==oa&&(this._tTime-=oa)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=so(e);var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&Io(t,this,this._start-this._delay),this}return this._start},t.endTime=function(e){return this._start+(va(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Mo(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){e===void 0&&(e=Ka);var t=ra;return ra=e,fo(this)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),this.data!==`nested`&&e.kill!==!1&&this.kill(),ra=t,this},t.globalTime=function(e){for(var t=this,n=arguments.length?e:t.rawTime();t;)n=t._start+n/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):n},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,Wo(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,Wo(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(Ko(this,e),va(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,va(t)),this._dur||(this._zTime=-oa),this},t.play=function(e,t){return e!=null&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return e!=null&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return e!=null&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-oa:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-oa,this},t.isActive=function(){var e=this.parent||this._dp,t=this._start,n;return!!(!e||this._ts&&this._initted&&e.isActive()&&(n=e.rawTime(!0))>=t&&n<this.endTime(!0)-oa)},t.eventCallback=function(e,t,n){var r=this.vars;return arguments.length>1?(t?(r[e]=t,n&&(r[e+`Params`]=n),e===`onUpdate`&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this,n=t._prom;return new Promise(function(r){var i=ma(e)?e:ho,a=function(){var e=t.then;t.then=null,n&&n(),ma(i)&&(i=i(t))&&(i.then||i===t)&&(t.then=e),r(i),t.then=e};t._initted&&t.totalProgress()===1&&t._ts>=0||!t._tTime&&t._ts<0?a():t._prom=a})},t.kill=function(){ys(this)},e}();go(Js.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-oa,_prom:0,_ps:!1,_rts:1});var Ys=function(e){$i(t,e);function t(t,n){var r;return t===void 0&&(t={}),r=e.call(this,t)||this,r.labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=va(t.sortChildren),Ma&&Io(t.parent||Ma,Qi(r),n),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&Lo(Qi(r),t.scrollTrigger),r}var n=t.prototype;return n.to=function(e,t,n){return qo(0,arguments,this),this},n.from=function(e,t,n){return qo(1,arguments,this),this},n.fromTo=function(e,t,n,r){return qo(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,xo(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new lc(e,t,Ko(this,n),1),this},n.call=function(e,t,n){return Io(this,lc.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,i,a,o){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=a,n.onCompleteParams=o,n.parent=this,new lc(e,n,Ko(this,i)),this},n.staggerFrom=function(e,t,n,r,i,a,o){return n.runBackwards=1,xo(n).immediateRender=va(n.immediateRender),this.staggerTo(e,t,n,r,i,a,o)},n.staggerFromTo=function(e,t,n,r,i,a,o,s){return r.startAt=n,xo(r).immediateRender=va(r.immediateRender),this.staggerTo(e,t,r,i,a,o,s)},n.render=function(e,t,n){var r=this._time,i=this._dirty?this.totalDuration():this._tDur,a=this._dur,o=e<=0?0:so(e),s=this._zTime<0!=e<0&&(this._initted||!a),c,l,u,d,f,p,m,h,g,_,v,y;if(this!==Ma&&o>i&&e>=0&&(o=i),o!==this._tTime||n||s){if(r!==this._time&&a&&(o+=this._time-r,e+=this._time-r),c=o,g=this._start,h=this._ts,p=!h,s&&(a||(r=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(v=this._yoyo,f=a+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(f*100+e,t,n);if(c=so(o%f),o===i?(d=this._repeat,c=a):(_=so(o/f),d=~~_,d&&d===_&&(c=a,d--),c>a&&(c=a)),_=jo(this._tTime,f),!r&&this._tTime&&_!==d&&this._tTime-_*f-this._dur<=0&&(_=d),v&&d&1&&(c=a-c,y=1),d!==_&&!this._lock){var b=v&&_&1,x=b===(v&&d&1);if(d<_&&(b=!b),r=b?0:o%a?a:o,this._lock=1,this.render(r||(y?0:so(d*f)),t,!a)._lock=0,this._tTime=o,!t&&this.parent&&vs(this,`onRepeat`),this.vars.repeatRefresh&&!y&&(this.invalidate()._lock=1,_=d),r&&r!==this._time||p!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act||(a=this._dur,i=this._tDur,x&&(this._lock=2,r=b?a:-1e-4,this.render(r,!0),this.vars.repeatRefresh&&!y&&this.invalidate()),this._lock=0,!this._ts&&!p))return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(m=Ho(this,so(r),so(c)),m&&(o-=c-(c=m._start))),this._tTime=o,this._time=c,this._act=!!h,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,r=0),!r&&o&&a&&!t&&!_&&(vs(this,`onStart`),this._tTime!==o))return this;if(c>=r&&e>=0)for(l=this._first;l;){if(u=l._next,(l._act||c>=l._start)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(c-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(c-l._start)*l._ts,t,n),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=-oa);break}}l=u}else{l=this._last;for(var S=e<0?e:c;l;){if(u=l._prev,(l._act||S<=l._end)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(S-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(S-l._start)*l._ts,t,n||ra&&fo(l)),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=S?-oa:oa);break}}l=u}}if(m&&!t&&(this.pause(),m.render(c>=r?0:-oa)._zTime=c>=r?1:-1,this._ts))return this._start=g,No(this),this.render(e,t,n);this._onUpdate&&!t&&vs(this,`onUpdate`,!0),(o===i&&this._tTime>=this.totalDuration()||!o&&r)&&(g===this._start||Math.abs(h)!==Math.abs(this._ts))&&(this._lock||((e||!a)&&(o===i&&this._ts>0||!o&&this._ts<0)&&To(this,1),!t&&!(e<0&&!r)&&(o||r||!i)&&(vs(this,o===i&&e>=0?`onComplete`:`onReverseComplete`,!0),this._prom&&!(o<i&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(ha(t)||(t=Ko(this,t,e)),!(e instanceof Js)){if(Sa(e))return e.forEach(function(e){return n.add(e,t)}),this;if(pa(e))return this.addLabel(e,t);if(ma(e))e=lc.delayedCall(0,e);else return this}return this===e?this:Io(this,e,t)},n.getChildren=function(e,t,n,r){e===void 0&&(e=!0),t===void 0&&(t=!0),n===void 0&&(n=!0),r===void 0&&(r=-aa);for(var i=[],a=this._first;a;)a._start>=r&&(a instanceof lc?t&&i.push(a):(n&&i.push(a),e&&i.push.apply(i,a.getChildren(!0,t,n)))),a=a._next;return i},n.getById=function(e){for(var t=this.getChildren(1,1,1),n=t.length;n--;)if(t[n].vars.id===e)return t[n]},n.remove=function(e){return pa(e)?this.removeLabel(e):ma(e)?this.killTweensOf(e):(e.parent===this&&wo(this,e),e===this._recent&&(this._recent=this._last),Eo(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=so(Ns.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(e,t){return this.labels[e]=Ko(this,t),this},n.removeLabel=function(e){return delete this.labels[e],this},n.addPause=function(e,t,n){var r=lc.delayedCall(0,t||Ua,n);return r.data=`isPause`,this._hasPause=1,Io(this,r,Ko(this,e))},n.removePause=function(e){var t=this._first;for(e=Ko(this,e);t;)t._start===e&&t.data===`isPause`&&To(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)ec!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n=[],r=ts(e),i=this._first,a=ha(t),o;i;)i instanceof lc?lo(i._targets,r)&&(a?(!ec||i._initted&&i._ts)&&i.globalTime(0)<=t&&i.globalTime(i.totalDuration())>t:!t||i.isActive())&&n.push(i):(o=i.getTweensOf(r,t)).length&&n.push.apply(n,o),i=i._next;return n},n.tweenTo=function(e,t){t||={};var n=this,r=Ko(n,e),i=t,a=i.startAt,o=i.onStart,s=i.onStartParams,c=i.immediateRender,l,u=lc.to(n,go({ease:t.ease||`none`,lazy:!1,immediateRender:!1,time:r,overwrite:`auto`,duration:t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale())||oa,onStart:function(){if(n.pause(),!l){var e=t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale());u._dur!==e&&Uo(u,e,0,1).render(u._time,!0,!0),l=1}o&&o.apply(u,s||[])}},t));return c?u.render(0):u},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,go({startAt:{time:Ko(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return e===void 0&&(e=this._time),_s(this,Ko(this,e))},n.previousLabel=function(e){return e===void 0&&(e=this._time),_s(this,Ko(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+oa)},n.shiftChildren=function(e,t,n){n===void 0&&(n=0);var r=this._first,i=this.labels,a;for(e=so(e);r;)r._start>=n&&(r._start+=e,r._end+=e),r=r._next;if(t)for(a in i)i[a]>=n&&(i[a]+=e);return Eo(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){e===void 0&&(e=!0);for(var t=this._first,n;t;)n=t._next,this.remove(t),t=n;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),Eo(this)},n.totalDuration=function(e){var t=0,n=this,r=n._last,i=aa,a,o,s;if(arguments.length)return n.timeScale((n._repeat<0?n.duration():n.totalDuration())/(n.reversed()?-e:e));if(n._dirty){for(s=n.parent;r;)a=r._prev,r._dirty&&r.totalDuration(),o=r._start,o>i&&n._sort&&r._ts&&!n._lock?(n._lock=1,Io(n,r,o-r._delay,1)._lock=0):i=o,o<0&&r._ts&&(t-=o,(!s&&!n._dp||s&&s.smoothChildTiming)&&(n._start+=so(o/n._ts),n._time-=o,n._tTime-=o),n.shiftChildren(-o,!1,-1/0),i=0),r._end>t&&r._ts&&(t=r._end),r=a;Uo(n,n===Ma&&n._time>t?n._time:t,1,1),n._dirty=0}return n._tDur},t.updateRoot=function(e){if(Ma._ts&&(po(Ma,Mo(e,Ma)),Xa=Ns.frame),Ns.frame>=$a){$a+=ea.autoSleep||120;var t=Ma._first;if((!t||!t._ts)&&ea.autoSleep&&Ns._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||Ns.sleep()}}},t}(Js);go(Ys.prototype,{_lock:0,_hasPause:0,_forcing:0});var Xs=function(e,t,n,r,i,a,o){var s=new Cc(this._pt,e,t,0,1,_c,null,i),c=0,l=0,u,d,f,p,m,h,g,_;for(s.b=n,s.e=r,n+=``,r+=``,(g=~r.indexOf(`random(`))&&(r=ms(r)),a&&(_=[n,r],a(_,e,t),n=_[0],r=_[1]),d=n.match(Oa)||[];u=Oa.exec(r);)p=u[0],m=r.substring(c,u.index),f?f=(f+1)%5:m.substr(-5)===`rgba(`&&(f=1),p!==d[l++]&&(h=parseFloat(d[l-1])||0,s._pt={_next:s._pt,p:m||l===1?m:`,`,s:h,c:p.charAt(1)===`=`?co(h,p)-h:parseFloat(p)-h,m:f&&f<4?Math.round:0},c=Oa.lastIndex);return s.c=c<r.length?r.substring(c,r.length):``,s.fp=o,(ka.test(r)||g)&&(s.e=0),this._pt=s,s},Zs=function(e,t,n,r,i,a,o,s,c,l){ma(r)&&(r=r(i||0,e,a));var u=e[t],d=n===`get`?ma(u)?c?e[t.indexOf(`set`)||!ma(e[`get`+t.substr(3)])?t:`get`+t.substr(3)](c):e[t]():u:n,f=ma(u)?c?fc:dc:uc,p;if(pa(r)&&(~r.indexOf(`random(`)&&(r=ms(r)),r.charAt(1)===`=`&&(p=co(d,r)+(Xo(d)||0),(p||p===0)&&(r=p))),!l||d!==r||tc)return!isNaN(d*r)&&r!==``?(p=new Cc(this._pt,e,t,+d||0,r-(d||0),typeof u==`boolean`?gc:hc,0,f),c&&(p.fp=c),o&&p.modifier(o,this,e),this._pt=p):(!u&&!(t in e)&&Ba(t,r),Xs.call(this,e,t,d,r,f,s||ea.stringFilter,c))},Qs=function(e,t,n,r,i){if(ma(e)&&(e=oc(e,i,t,n,r)),!_a(e)||e.style&&e.nodeType||Sa(e)||xa(e))return pa(e)?oc(e,i,t,n,r):e;var a={},o;for(o in e)a[o]=oc(e[o],i,t,n,r);return a},$s=function(e,t,n,r,i,a){var o,s,c,l;if(Za[e]&&(o=new Za[e]).init(i,o.rawVars?t[e]:Qs(t[e],r,i,a,n),n,r,a)!==!1&&(n._pt=s=new Cc(n._pt,i,e,0,1,o.render,o,0,o.priority),n!==bs))for(c=n._ptLookup[n._targets.indexOf(i)],l=o._props.length;l--;)c[o._props[l]]=s;return o},ec,tc,nc=function e(t,n,r){var i=t.vars,a=i.ease,o=i.startAt,s=i.immediateRender,c=i.lazy,l=i.onUpdate,u=i.runBackwards,d=i.yoyoEase,f=i.keyframes,p=i.autoRevert,m=t._dur,h=t._startAt,g=t._targets,_=t.parent,v=_&&_.data===`nested`?_.vars.targets:g,y=t._overwrite===`auto`&&!na,b=t.timeline,x=i.easeReverse||d,S,C,w,T,E,D,O,ee,k,te,A,j,M;if(b&&(!f||!a)&&(a=`none`),t._ease=Hs(a,ta.ease),t._rEase=x&&(Hs(x)||t._ease),t._from=!b&&!!i.runBackwards,t._from&&(t.ratio=1),!b||f&&!i.stagger){if(ee=g[0]?ro(g[0]).harness:0,j=ee&&i[ee.prop],S=bo(i,qa),h&&(h._zTime<0&&h.progress(1),n<0&&u&&s&&!p?h.render(-1,!0):h.revert(u&&m?Ga:Wa),h._lazy=0),o){if(To(t._startAt=lc.set(g,go({data:`isStart`,overwrite:!1,parent:_,immediateRender:!0,lazy:!h&&va(c),startAt:null,delay:0,onUpdate:l&&function(){return vs(t,`onUpdate`)},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(ra||!s&&!p)&&t._startAt.revert(Ga),s&&m&&n<=0&&r<=0){n&&(t._zTime=n);return}}else if(u&&m&&!h){if(n&&(s=!1),w=go({overwrite:!1,data:`isFromStart`,lazy:s&&!h&&va(c),immediateRender:s,stagger:0,parent:_},S),j&&(w[ee.prop]=j),To(t._startAt=lc.set(g,w)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(ra?t._startAt.revert(Ga):t._startAt.render(-1,!0)),t._zTime=n,!s)e(t._startAt,oa,oa);else if(!n)return}for(t._pt=t._ptCache=0,c=m&&va(c)||c&&!m,C=0;C<g.length;C++){if(E=g[C],O=E._gsap||no(g)[C]._gsap,t._ptLookup[C]=te={},Ya[O.id]&&Ja.length&&uo(),A=v===g?C:v.indexOf(E),ee&&(k=new ee).init(E,j||S,t,A,v)!==!1&&(t._pt=T=new Cc(t._pt,E,k.name,0,1,k.render,k,0,k.priority),k._props.forEach(function(e){te[e]=T}),k.priority&&(D=1)),!ee||j)for(w in S)Za[w]&&(k=$s(w,S,t,A,E,v))?k.priority&&(D=1):te[w]=T=Zs.call(t,E,w,`get`,S[w],A,v,0,i.stringFilter);t._op&&t._op[C]&&t.kill(E,t._op[C]),y&&t._pt&&(ec=t,Ma.killTweensOf(E,te,t.globalTime(n)),M=!t.parent,ec=0),t._pt&&c&&(Ya[O.id]=1)}D&&Sc(t),t._onInit&&t._onInit(t)}t._onUpdate=l,t._initted=(!t._op||t._pt)&&!M,f&&n<=0&&b.render(aa,!0,!0)},rc=function(e,t,n,r,i,a,o,s){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],l,u,d,f;if(!c)for(c=e._ptCache[t]=[],d=e._ptLookup,f=e._targets.length;f--;){if(l=d[f][t],l&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==t&&l.fp!==t;)l=l._next;if(!l)return tc=1,e.vars[t]=`+=0`,nc(e,o),tc=0,s?Va(t+` not eligible for reset. Try splitting into individual properties`):1;c.push(l)}for(f=c.length;f--;)u=c[f],l=u._pt||u,l.s=(r||r===0)&&!i?r:l.s+(r||0)+a*l.c,l.c=n-l.s,u.e&&=oo(n)+Xo(u.e),u.b&&=l.s+Xo(u.b)},ic=function(e,t){var n=e[0]?ro(e[0]).harness:0,r=n&&n.aliases,i,a,o,s;if(!r)return t;for(a in i=vo({},t),r)if(a in i)for(s=r[a].split(`,`),o=s.length;o--;)i[s[o]]=i[a];return i},ac=function(e,t,n,r){var i=t.ease||r||`power1.inOut`,a,o;if(Sa(t))o=n[e]||(n[e]=[]),t.forEach(function(e,n){return o.push({t:n/(t.length-1)*100,v:e,e:i})});else for(a in t)o=n[a]||(n[a]=[]),a===`ease`||o.push({t:parseFloat(e),v:t[a],e:i})},oc=function(e,t,n,r,i){return ma(e)?e.call(t,n,r,i):pa(e)&&~e.indexOf(`random(`)?ms(e):e},sc=to+`repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert`,cc={};ao(sc+`,id,stagger,delay,duration,paused,scrollTrigger`,function(e){return cc[e]=1});var lc=function(e){$i(t,e);function t(t,n,r,i){var a;typeof n==`number`&&(r.duration=n,n=r,r=null),a=e.call(this,i?n:xo(n))||this;var o=a.vars,s=o.duration,c=o.delay,l=o.immediateRender,u=o.stagger,d=o.overwrite,f=o.keyframes,p=o.defaults,m=o.scrollTrigger,h=n.parent||Ma,g=(Sa(t)||xa(t)?ha(t[0]):`length`in n)?[t]:ts(t),_,v,y,b,x,S,C,w;if(a._targets=g.length?no(g):Va(`GSAP target `+t+` not found. https://gsap.com`,!ea.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,f||u||ba(s)||ba(c)){n=a.vars;var T=n.easeReverse||n.yoyoEase;if(_=a.timeline=new Ys({data:`nested`,defaults:p||{},targets:h&&h.data===`nested`?h.vars.targets:g}),_.kill(),_.parent=_._dp=Qi(a),_._start=0,u||ba(s)||ba(c)){if(b=g.length,C=u&&is(u),_a(u))for(x in u)~sc.indexOf(x)&&(w||={},w[x]=u[x]);for(v=0;v<b;v++)y=bo(n,cc),y.stagger=0,T&&(y.easeReverse=T),w&&vo(y,w),S=g[v],y.duration=+oc(s,Qi(a),v,S,g),y.delay=(+oc(c,Qi(a),v,S,g)||0)-a._delay,!u&&b===1&&y.delay&&(a._delay=c=y.delay,a._start+=c,y.delay=0),_.to(S,y,C?C(v,S,g):0),_._ease=Fs.none;_.duration()?s=c=0:a.timeline=0}else if(f){xo(go(_.vars.defaults,{ease:`none`})),_._ease=Hs(f.ease||n.ease||`none`);var E=0,D,O,ee;if(Sa(f))f.forEach(function(e){return _.to(g,e,`>`)}),_.duration();else{for(x in y={},f)x===`ease`||x===`easeEach`||ac(x,f[x],y,f.easeEach);for(x in y)for(D=y[x].sort(function(e,t){return e.t-t.t}),E=0,v=0;v<D.length;v++)O=D[v],ee={ease:O.e,duration:(O.t-(v?D[v-1].t:0))/100*s},ee[x]=O.v,_.to(g,ee,E),E+=ee.duration;_.duration()<s&&_.to({},{duration:s-_.duration()})}}s||a.duration(s=_.duration())}else a.timeline=0;return d===!0&&!na&&(ec=Qi(a),Ma.killTweensOf(g),ec=0),Io(h,Qi(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(l||!s&&!f&&a._start===so(h._time)&&va(l)&&ko(Qi(a))&&h.data!==`nested`)&&(a._tTime=-oa,a.render(Math.max(0,-c)||0)),m&&Lo(Qi(a),m),a}var n=t.prototype;return n.render=function(e,t,n){var r=this._time,i=this._tDur,a=this._dur,o=e<0,s=e>i-oa&&!o?i:e<oa?0:e,c,l,u,d,f,p,m,h;if(!a)Vo(this,e,t,n);else if(s!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==o||this._lazy){if(c=s,h=this.timeline,this._repeat){if(d=a+this._rDelay,this._repeat<-1&&o)return this.totalTime(d*100+e,t,n);if(c=so(s%d),s===i?(u=this._repeat,c=a):(f=so(s/d),u=~~f,u&&u===f?(c=a,u--):c>a&&(c=a)),p=this._yoyo&&u&1,p&&(c=a-c),f=jo(this._tTime,d),c===r&&!n&&this._initted&&u===f)return this._tTime=s,this;u!==f&&this.vars.repeatRefresh&&!p&&!this._lock&&c!==d&&this._initted&&(this._lock=n=1,this.render(so(d*u),!0).invalidate()._lock=0)}if(!this._initted){if(Ro(this,o?e:c,n,t,s))return this._tTime=0,this;if(r!==this._time&&!(n&&this.vars.repeatRefresh&&u!==f))return this;if(a!==this._dur)return this.render(e,t,n)}if(this._rEase){var g=c<r;if(g!==this._inv){var _=g?r:a-r;this._inv=g,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=r,this._invRecip=_?(g?-1:1)/_:0,this._invScale=g?-this.ratio:1-this.ratio,this._invEase=g?this._rEase:this._ease}this.ratio=m=this._invRatio+this._invScale*this._invEase((c-this._invTime)*this._invRecip)}else this.ratio=m=this._ease(c/a);if(this._from&&(this.ratio=m=1-m),this._tTime=s,this._time=c,!this._act&&this._ts&&(this._act=1,this._lazy=0),!r&&s&&!t&&!f&&(vs(this,`onStart`),this._tTime!==s))return this;for(l=this._pt;l;)l.r(m,l.d),l=l._next;h&&h.render(e<0?e:h._dur*h._ease(c/this._dur),t,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(o&&Oo(this,e,t,n),vs(this,`onUpdate`)),this._repeat&&u!==f&&this.vars.onRepeat&&!t&&this.parent&&vs(this,`onRepeat`),(s===this._tDur||!s)&&this._tTime===s&&(o&&!this._onUpdate&&Oo(this,e,!0,!0),(e||!a)&&(s===this._tDur&&this._ts>0||!s&&this._ts<0)&&To(this,1),!t&&!(o&&!r)&&(s||r||p)&&(vs(this,s===i?`onComplete`:`onReverseComplete`,!0),this._prom&&!(s<i&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r,i){Ms||Ns.wake(),this._ts||this.play();var a=Math.min(this._dur,(this._dp._time-this._start)*this._ts),o;return this._initted||nc(this,a),o=this._ease(a/this._dur),rc(this,e,t,n,r,o,a,i)?this.resetTo(e,t,n,r,1):(Po(this,0),this.parent||Co(this._dp,this,`_first`,`_last`,this._dp._sort?`_start`:0),this.render(0))},n.kill=function(e,t){if(t===void 0&&(t=`all`),!e&&(!t||t===`all`))return this._lazy=this._pt=0,this.parent?ys(this):this.scrollTrigger&&this.scrollTrigger.kill(!!ra),this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,ec&&ec.vars.overwrite!==!0)._first||ys(this),this.parent&&n!==this.timeline.totalDuration()&&Uo(this,this._dur*this.timeline._tDur/n,0,1),this}var r=this._targets,i=e?ts(e):r,a=this._ptLookup,o=this._pt,s,c,l,u,d,f,p;if((!t||t===`all`)&&So(r,i))return t===`all`&&(this._pt=0),ys(this);for(s=this._op=this._op||[],t!==`all`&&(pa(t)&&(d={},ao(t,function(e){return d[e]=1}),t=d),t=ic(r,t)),p=r.length;p--;)if(~i.indexOf(r[p]))for(d in c=a[p],t===`all`?(s[p]=t,u=c,l={}):(l=s[p]=s[p]||{},u=t),u)f=c&&c[d],f&&((!(`kill`in f.d)||f.d.kill(d)===!0)&&wo(this,f,`_pt`),delete c[d]),l!==`all`&&(l[d]=1);return this._initted&&!this._pt&&o&&ys(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return qo(1,arguments)},t.delayedCall=function(e,n,r,i){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},t.fromTo=function(e,t,n){return qo(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return Ma.killTweensOf(e,t,n)},t}(Js);go(lc.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),ao(`staggerTo,staggerFrom,staggerFromTo`,function(e){lc[e]=function(){var t=new Ys,n=Qo.call(arguments,0);return n.splice(e===`staggerFromTo`?5:4,0,0),t[e].apply(t,n)}});var uc=function(e,t,n){return e[t]=n},dc=function(e,t,n){return e[t](n)},fc=function(e,t,n,r){return e[t](r.fp,n)},pc=function(e,t,n){return e.setAttribute(t,n)},mc=function(e,t){return ma(e[t])?dc:ga(e[t])&&e.setAttribute?pc:uc},hc=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},gc=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},_c=function(e,t){var n=t._pt,r=``;if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},vc=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},yc=function(e,t,n,r){for(var i=this._pt,a;i;)a=i._next,i.p===r&&i.modifier(e,t,n),i=a},bc=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?wo(this,t,`_pt`):t.dep||(n=1),t=r;return!n},xc=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},Sc=function(e){for(var t=e._pt,n,r,i,a;t;){for(n=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:a)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:a=t,t=n}e._pt=i},Cc=function(){function e(e,t,n,r,i,a,o,s,c){this.t=t,this.s=r,this.c=i,this.p=n,this.r=a||hc,this.d=o||this,this.set=s||uc,this.pr=c||0,this._next=e,e&&(e._prev=this)}var t=e.prototype;return t.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=xc,this.m=e,this.mt=n,this.tween=t},e}();ao(to+`parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse`,function(e){return qa[e]=1}),Ia.TweenMax=Ia.TweenLite=lc,Ia.TimelineLite=Ia.TimelineMax=Ys,Ma=new Ys({sortChildren:!1,defaults:ta,autoRemoveChildren:!0,id:`root`,smoothChildTiming:!0}),ea.stringFilter=js;var wc=[],Tc={},Ec=[],Dc=0,Oc=0,kc=function(e){return(Tc[e]||Ec).map(function(e){return e()})},Ac=function(){var e=Date.now(),t=[];e-Dc>2&&(kc(`matchMediaInit`),wc.forEach(function(e){var n=e.queries,r=e.conditions,i,a,o,s;for(a in n)i=Na.matchMedia(n[a]).matches,i&&(o=1),i!==r[a]&&(r[a]=i,s=1);s&&(e.revert(),o&&t.push(e))}),kc(`matchMediaRevert`),t.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Dc=e,kc(`matchMedia`))},jc=function(){function e(e,t){this.selector=t&&ns(t),this.data=[],this._r=[],this.isReverted=!1,this.id=Oc++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){ma(e)&&(n=t,t=e,e=ma);var r=this,i=function(){var e=ia,i=r.selector,a;return e&&e!==r&&e.data.push(r),n&&(r.selector=ns(n)),ia=r,a=t.apply(r,arguments),ma(a)&&r._r.push(a),ia=e,r.selector=i,r.isReverted=!1,a};return r.last=i,e===ma?i(r,function(e){return r.add(null,e)}):e?r[e]=i:i},t.ignore=function(e){var t=ia;ia=null,e(this),ia=t},t.getTweens=function(){var t=[];return this.data.forEach(function(n){return n instanceof e?t.push.apply(t,n.getTweens()):n instanceof lc&&!(n.parent&&n.parent.data===`nested`)&&t.push(n)}),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e?(function(){for(var t=n.getTweens(),r=n.data.length,i;r--;)i=n.data[r],i.data===`isFlip`&&(i.revert(),i.getChildren(!0,!0,!1).forEach(function(e){return t.splice(t.indexOf(e),1)}));for(t.map(function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}}).sort(function(e,t){return t.g-e.g||-1/0}).forEach(function(t){return t.t.revert(e)}),r=n.data.length;r--;)i=n.data[r],i instanceof Ys?i.data!==`nested`&&(i.scrollTrigger&&i.scrollTrigger.revert(),i.kill()):!(i instanceof lc)&&i.revert&&i.revert(e);n._r.forEach(function(t){return t(e,n)}),n.isReverted=!0})():this.data.forEach(function(e){return e.kill&&e.kill()}),this.clear(),t)for(var r=wc.length;r--;)wc[r].id===this.id&&wc.splice(r,1)},t.revert=function(e){this.kill(e||{})},e}(),Mc=function(){function e(e){this.contexts=[],this.scope=e,ia&&ia.data.push(this)}var t=e.prototype;return t.add=function(e,t,n){_a(e)||(e={matches:e});var r=new jc(0,n||this.scope),i=r.conditions={},a,o,s;for(o in ia&&!r.selector&&(r.selector=ia.selector),this.contexts.push(r),t=r.add(`onMatch`,t),r.queries=e,e)o===`all`?s=1:(a=Na.matchMedia(e[o]),a&&(wc.indexOf(r)<0&&wc.push(r),(i[o]=a.matches)&&(s=1),a.addListener?a.addListener(Ac):a.addEventListener(`change`,Ac)));return s&&t(r,function(e){return r.add(null,e)}),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},e}(),Nc={registerPlugin:function(){[...arguments].forEach(function(e){return Ss(e)})},timeline:function(e){return new Ys(e)},getTweensOf:function(e,t){return Ma.getTweensOf(e,t)},getProperty:function(e,t,n,r){pa(e)&&(e=ts(e)[0]);var i=ro(e||{}).get,a=n?ho:mo;return n===`native`&&(n=``),e&&(t?a((Za[t]&&Za[t].get||i)(e,t,n,r)):function(t,n,r){return a((Za[t]&&Za[t].get||i)(e,t,n,r))})},quickSetter:function(e,t,n){if(e=ts(e),e.length>1){var r=e.map(function(e){return Lc.quickSetter(e,t,n)}),i=r.length;return function(e){for(var t=i;t--;)r[t](e)}}e=e[0]||{};var a=Za[t],o=ro(e),s=o.harness&&(o.harness.aliases||{})[t]||t,c=a?function(t){var r=new a;bs._pt=0,r.init(e,n?t+n:t,bs,0,[e]),r.render(1,r),bs._pt&&vc(1,bs)}:o.set(e,s);return a?c:function(t){return c(e,s,n?t+n:t,o,1)}},quickTo:function(e,t,n){var r,i=Lc.to(e,go((r={},r[t]=`+=0.1`,r.paused=!0,r.stagger=0,r),n||{})),a=function(e,n,r){return i.resetTo(t,e,n,r)};return a.tween=i,a},isTweening:function(e){return Ma.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Hs(e.ease,ta.ease)),yo(ta,e||{})},config:function(e){return yo(ea,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,a=e.extendTimeline;(r||``).split(`,`).forEach(function(e){return e&&!Za[e]&&!Ia[e]&&Va(t+` effect requires `+e+` plugin.`)}),Qa[t]=function(e,t,r){return n(ts(e),go(t||{},i),r)},a&&(Ys.prototype[t]=function(e,n,r){return this.add(Qa[t](e,_a(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){Fs[e]=Hs(t)},parseEase:function(e,t){return arguments.length?Hs(e,t):Fs},getById:function(e){return Ma.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new Ys(e),r,i;for(n.smoothChildTiming=va(e.smoothChildTiming),Ma.remove(n),n._dp=0,n._time=n._tTime=Ma._time,r=Ma._first;r;)i=r._next,(t||!(!r._dur&&r instanceof lc&&r.vars.onComplete===r._targets[0]))&&Io(n,r,r._start-r._delay),r=i;return Io(Ma,n,0),n},context:function(e,t){return e?new jc(e,t):ia},matchMedia:function(e){return new Mc(e)},matchMediaRefresh:function(){return wc.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||Ac()},addEventListener:function(e,t){var n=Tc[e]||(Tc[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=Tc[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:fs,wrapYoyo:ps,distribute:is,random:ss,snap:os,normalize:us,getUnit:Xo,clamp:Zo,splitColor:Es,toArray:ts,selector:ns,mapRange:hs,pipe:cs,unitize:ls,interpolate:gs,shuffle:rs},install:za,effects:Qa,ticker:Ns,updateRoot:Ys.updateRoot,plugins:Za,globalTimeline:Ma,core:{PropTween:Cc,globals:Ha,Tween:lc,Timeline:Ys,Animation:Js,getCache:ro,_removeLinkedListItem:wo,reverting:function(){return ra},context:function(e){return e&&ia&&(ia.data.push(e),e._ctx=ia),ia},suppressOverwrites:function(e){return na=e}}};ao(`to,from,fromTo,delayedCall,set,killTweensOf`,function(e){return Nc[e]=lc[e]}),Ns.add(Ys.updateRoot),bs=Nc.to({},{duration:0});var Pc=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},Fc=function(e,t){var n=e._targets,r,i,a;for(r in t)for(i=n.length;i--;)a=e._ptLookup[i][r],(a&&=a.d)&&(a._pt&&(a=Pc(a,r)),a&&a.modifier&&a.modifier(t[r],e,n[i],r))},Ic=function(e,t){return{name:e,headless:1,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,i;if(pa(n)&&(r={},ao(n,function(e){return r[e]=1}),n=r),t){for(i in r={},n)r[i]=t(n[i]);n=r}Fc(e,n)}}}},Lc=Nc.registerPlugin({name:`attr`,init:function(e,t,n,r,i){var a,o,s;for(a in this.tween=n,t)s=e.getAttribute(a)||``,o=this.add(e,`setAttribute`,(s||0)+``,t[a],r,i,0,0,a),o.op=a,o.b=s,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)ra?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:`endArray`,headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},Ic(`roundProps`,as),Ic(`modifiers`),Ic(`snap`,os))||Nc;lc.version=Ys.version=Lc.version=`3.15.0`,Ra=1,ya()&&Ps(),Fs.Power0,Fs.Power1,Fs.Power2,Fs.Power3,Fs.Power4,Fs.Linear,Fs.Quad,Fs.Cubic,Fs.Quart,Fs.Quint,Fs.Strong,Fs.Elastic,Fs.Back,Fs.SteppedEase,Fs.Bounce,Fs.Sine,Fs.Expo,Fs.Circ;var Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc=function(){return typeof window<`u`},Kc={},qc=180/Math.PI,Jc=Math.PI/180,Yc=Math.atan2,Xc=1e8,Zc=/([A-Z])/g,Qc=/(left|right|width|margin|padding|x)/i,$c=/[\s,\(]\S/,el={autoAlpha:`opacity,visibility`,scale:`scaleX,scaleY`,alpha:`opacity`},tl=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},nl=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},rl=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},il=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},al=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},ol=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},sl=function(e,t){return t.set(t.t,t.p,e===1?t.e:t.b,t)},cl=function(e,t,n){return e.style[t]=n},ll=function(e,t,n){return e.style.setProperty(t,n)},ul=function(e,t,n){return e._gsap[t]=n},dl=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},fl=function(e,t,n,r,i){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(i,a)},pl=function(e,t,n,r,i){var a=e._gsap;a[t]=n,a.renderTransform(i,a)},ml=`transform`,hl=ml+`Origin`,gl=function e(t,n){var r=this,i=this.target,a=i.style,o=i._gsap;if(t in Kc&&a){if(this.tfm=this.tfm||{},t!==`transform`)t=el[t]||t,~t.indexOf(`,`)?t.split(`,`).forEach(function(e){return r.tfm[e]=Fl(i,e)}):this.tfm[t]=o.x?o[t]:Fl(i,t),t===hl&&(this.tfm.zOrigin=o.zOrigin);else return el.transform.split(`,`).forEach(function(t){return e.call(r,t,n)});if(this.props.indexOf(ml)>=0)return;o.svg&&(this.svgo=i.getAttribute(`data-svg-origin`),this.props.push(hl,n,``)),t=ml}(a||n)&&this.props.push(t,n,a[t])},_l=function(e){e.translate&&(e.removeProperty(`translate`),e.removeProperty(`scale`),e.removeProperty(`rotate`))},vl=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,i,a;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?n[e[i]]=e[i+2]:n.removeProperty(e[i].substr(0,2)===`--`?e[i]:e[i].replace(Zc,`-$1`).toLowerCase());if(this.tfm){for(a in this.tfm)r[a]=this.tfm[a];r.svg&&(r.renderTransform(),t.setAttribute(`data-svg-origin`,this.svgo||``)),i=Wc(),(!i||!i.isStart)&&!n[ml]&&(_l(n),r.zOrigin&&n[hl]&&(n[hl]+=` `+r.zOrigin+`px`,r.zOrigin=0,r.renderTransform()),r.uncache=1)}},yl=function(e,t){var n={target:e,props:[],revert:vl,save:gl};return e._gsap||Lc.core.getCache(e),t&&e.style&&e.nodeType&&t.split(`,`).forEach(function(e){return n.save(e)}),n},bl,xl=function(e,t){var n=zc.createElementNS?zc.createElementNS((t||`http://www.w3.org/1999/xhtml`).replace(/^https/,`http`),e):zc.createElement(e);return n&&n.style?n:zc.createElement(e)},Sl=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(Zc,`-$1`).toLowerCase())||i.getPropertyValue(n)||!r&&e(t,wl(n)||n,1)||``},Cl=`O,Moz,ms,Ms,Webkit`.split(`,`),wl=function(e,t,n){var r=(t||Hc).style,i=5;if(e in r&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(Cl[i]+e in r););return i<0?null:(i===3?`ms`:i>=0?Cl[i]:``)+e},Tl=function(){Gc()&&window.document&&(Rc=window,zc=Rc.document,Bc=zc.documentElement,Hc=xl(`div`)||{style:{}},xl(`div`),ml=wl(ml),hl=ml+`Origin`,Hc.style.cssText=`border-width:0;line-height:0;position:absolute;padding:0`,bl=!!wl(`perspective`),Wc=Lc.core.reverting,Vc=1)},El=function(e){var t=e.ownerSVGElement,n=xl(`svg`,t&&t.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`),r=e.cloneNode(!0),i;r.style.display=`block`,n.appendChild(r),Bc.appendChild(n);try{i=r.getBBox()}catch{}return n.removeChild(r),Bc.removeChild(n),i},Dl=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},Ol=function(e){var t,n;try{t=e.getBBox()}catch{t=El(e),n=1}return t&&(t.width||t.height)||n||(t=El(e)),t&&!t.width&&!t.x&&!t.y?{x:+Dl(e,[`x`,`cx`,`x1`])||0,y:+Dl(e,[`y`,`cy`,`y1`])||0,width:0,height:0}:t},kl=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Ol(e))},Al=function(e,t){if(t){var n=e.style,r;t in Kc&&t!==hl&&(t=ml),n.removeProperty?(r=t.substr(0,2),(r===`ms`||t.substr(0,6)===`webkit`)&&(t=`-`+t),n.removeProperty(r===`--`?t:t.replace(Zc,`-$1`).toLowerCase())):n.removeAttribute(t)}},jl=function(e,t,n,r,i,a){var o=new Cc(e._pt,t,n,0,1,a?sl:ol);return e._pt=o,o.b=r,o.e=i,e._props.push(n),o},Ml={deg:1,rad:1,turn:1},Nl={grid:1,flex:1},Pl=function e(t,n,r,i){var a=parseFloat(r)||0,o=(r+``).trim().substr((a+``).length)||`px`,s=Hc.style,c=Qc.test(n),l=t.tagName.toLowerCase()===`svg`,u=(l?`client`:`offset`)+(c?`Width`:`Height`),d=100,f=i===`px`,p=i===`%`,m,h,g,_;if(i===o||!a||Ml[i]||Ml[o])return a;if(o!==`px`&&!f&&(a=e(t,n,r,`px`)),_=t.getCTM&&kl(t),(p||o===`%`)&&(Kc[n]||~n.indexOf(`adius`)))return m=_?t.getBBox()[c?`width`:`height`]:t[u],oo(p?a/m*d:a/100*m);if(s[c?`width`:`height`]=d+(f?o:i),h=i!==`rem`&&~n.indexOf(`adius`)||i===`em`&&t.appendChild&&!l?t:t.parentNode,_&&(h=(t.ownerSVGElement||{}).parentNode),(!h||h===zc||!h.appendChild)&&(h=zc.body),g=h._gsap,g&&p&&g.width&&c&&g.time===Ns.time&&!g.uncache)return oo(a/g.width*d);if(p&&(n===`height`||n===`width`)){var v=t.style[n];t.style[n]=d+i,m=t[u],v?t.style[n]=v:Al(t,n)}else (p||o===`%`)&&!Nl[Sl(h,`display`)]&&(s.position=Sl(t,`position`)),h===t&&(s.position=`static`),h.appendChild(Hc),m=Hc[u],h.removeChild(Hc),s.position=`absolute`;return c&&p&&(g=ro(h),g.time=Ns.time,g.width=h[u]),oo(f?m*a/d:m&&a?d/m*a:0)},Fl=function(e,t,n,r){var i;return Vc||Tl(),t in el&&t!==`transform`&&(t=el[t],~t.indexOf(`,`)&&(t=t.split(`,`)[0])),Kc[t]&&t!==`transform`?(i=ql(e,r),i=t===`transformOrigin`?i.svg?i.origin:Jl(Sl(e,hl))+` `+i.zOrigin+`px`:i[t]):(i=e.style[t],(!i||i===`auto`||r||~(i+``).indexOf(`calc(`))&&(i=Bl[t]&&Bl[t](e,t,n)||Sl(e,t)||io(e,t)||+(t===`opacity`))),n&&!~(i+``).trim().indexOf(` `)?Pl(e,t,i,n)+n:i},Il=function(e,t,n,r){if(!n||n===`none`){var i=wl(t,e,1),a=i&&Sl(e,i,1);a&&a!==n?(t=i,n=a):t===`borderColor`&&(n=Sl(e,`borderTopColor`))}var o=new Cc(this._pt,e.style,t,0,1,_c),s=0,c=0,l,u,d,f,p,m,h,g,_,v,y,b;if(o.b=n,o.e=r,n+=``,r+=``,r.substring(0,6)===`var(--`&&(r=Sl(e,r.substring(4,r.indexOf(`)`)))),r===`auto`&&(m=e.style[t],e.style[t]=r,r=Sl(e,t)||r,m?e.style[t]=m:Al(e,t)),l=[n,r],js(l),n=l[0],r=l[1],d=n.match(Da)||[],b=r.match(Da)||[],b.length){for(;u=Da.exec(r);)h=u[0],_=r.substring(s,u.index),p?p=(p+1)%5:(_.substr(-5)===`rgba(`||_.substr(-5)===`hsla(`)&&(p=1),h!==(m=d[c++]||``)&&(f=parseFloat(m)||0,y=m.substr((f+``).length),h.charAt(1)===`=`&&(h=co(f,h)+y),g=parseFloat(h),v=h.substr((g+``).length),s=Da.lastIndex-v.length,v||(v=v||ea.units[t]||y,s===r.length&&(r+=v,o.e+=v)),y!==v&&(f=Pl(e,t,m,v)||0),o._pt={_next:o._pt,p:_||c===1?_:`,`,s:f,c:g-f,m:p&&p<4||t===`zIndex`?Math.round:0});o.c=s<r.length?r.substring(s,r.length):``}else o.r=t===`display`&&r===`none`?sl:ol;return ka.test(r)&&(o.e=0),this._pt=o,o},Ll={top:`0%`,bottom:`100%`,left:`0%`,right:`100%`,center:`50%`},Rl=function(e){var t=e.split(` `),n=t[0],r=t[1]||`50%`;return(n===`top`||n===`bottom`||r===`left`||r===`right`)&&(e=n,n=r,r=e),t[0]=Ll[n]||n,t[1]=Ll[r]||r,t.join(` `)},zl=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,r=n.style,i=t.u,a=n._gsap,o,s,c;if(i===`all`||i===!0)r.cssText=``,s=1;else for(i=i.split(`,`),c=i.length;--c>-1;)o=i[c],Kc[o]&&(s=1,o=o===`transformOrigin`?hl:ml),Al(n,o);s&&(Al(n,ml),a&&(a.svg&&n.removeAttribute(`transform`),r.scale=r.rotate=r.translate=`none`,ql(n,1),a.uncache=1,_l(r)))}},Bl={clearProps:function(e,t,n,r,i){if(i.data!==`isFromStart`){var a=e._pt=new Cc(e._pt,t,n,0,0,zl);return a.u=r,a.pr=-10,a.tween=i,e._props.push(n),1}}},Vl=[1,0,0,1,0,0],Hl={},Ul=function(e){return e===`matrix(1, 0, 0, 1, 0, 0)`||e===`none`||!e},Wl=function(e){var t=Sl(e,ml);return Ul(t)?Vl:t.substr(7).match(Ea).map(oo)},Gl=function(e,t){var n=e._gsap||ro(e),r=e.style,i=Wl(e),a,o,s,c;return n.svg&&e.getAttribute(`transform`)?(s=e.transform.baseVal.consolidate().matrix,i=[s.a,s.b,s.c,s.d,s.e,s.f],i.join(`,`)===`1,0,0,1,0,0`?Vl:i):(i===Vl&&!e.offsetParent&&e!==Bc&&!n.svg&&(s=r.display,r.display=`block`,a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,o=e.nextElementSibling,Bc.appendChild(e)),i=Wl(e),s?r.display=s:Al(e,`display`),c&&(o?a.insertBefore(e,o):a?a.appendChild(e):Bc.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},Kl=function(e,t,n,r,i,a){var o=e._gsap,s=i||Gl(e,!0),c=o.xOrigin||0,l=o.yOrigin||0,u=o.xOffset||0,d=o.yOffset||0,f=s[0],p=s[1],m=s[2],h=s[3],g=s[4],_=s[5],v=t.split(` `),y=parseFloat(v[0])||0,b=parseFloat(v[1])||0,x,S,C,w;n?s!==Vl&&(S=f*h-p*m)&&(C=h/S*y+b*(-m/S)+(m*_-h*g)/S,w=y*(-p/S)+f/S*b-(f*_-p*g)/S,y=C,b=w):(x=Ol(e),y=x.x+(~v[0].indexOf(`%`)?y/100*x.width:y),b=x.y+(~(v[1]||v[0]).indexOf(`%`)?b/100*x.height:b)),r||r!==!1&&o.smooth?(g=y-c,_=b-l,o.xOffset=u+(g*f+_*m)-g,o.yOffset=d+(g*p+_*h)-_):o.xOffset=o.yOffset=0,o.xOrigin=y,o.yOrigin=b,o.smooth=!!r,o.origin=t,o.originIsAbsolute=!!n,e.style[hl]=`0px 0px`,a&&(jl(a,o,`xOrigin`,c,y),jl(a,o,`yOrigin`,l,b),jl(a,o,`xOffset`,u,o.xOffset),jl(a,o,`yOffset`,d,o.yOffset)),e.setAttribute(`data-svg-origin`,y+` `+b)},ql=function(e,t){var n=e._gsap||new qs(e);if(`x`in n&&!t&&!n.uncache)return n;var r=e.style,i=n.scaleX<0,a=`px`,o=`deg`,s=getComputedStyle(e),c=Sl(e,hl)||`0`,l=u=d=m=h=g=_=v=y=0,u,d,f=p=1,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee,k,te,A,j,M,N,P,F,ne,I,re;return n.svg=!!(e.getCTM&&kl(e)),s.translate&&((s.translate!==`none`||s.scale!==`none`||s.rotate!==`none`)&&(r[ml]=(s.translate===`none`?``:`translate3d(`+(s.translate+` 0 0`).split(` `).slice(0,3).join(`, `)+`) `)+(s.rotate===`none`?``:`rotate(`+s.rotate+`) `)+(s.scale===`none`?``:`scale(`+s.scale.split(` `).join(`,`)+`) `)+(s[ml]===`none`?``:s[ml])),r.scale=r.rotate=r.translate=`none`),S=Gl(e,n.svg),n.svg&&(n.uncache?(j=e.getBBox(),c=n.xOrigin-j.x+`px `+(n.yOrigin-j.y)+`px`,A=``):A=!t&&e.getAttribute(`data-svg-origin`),Kl(e,A||c,!!A||n.originIsAbsolute,n.smooth!==!1,S)),b=n.xOrigin||0,x=n.yOrigin||0,S!==Vl&&(E=S[0],D=S[1],O=S[2],ee=S[3],l=k=S[4],u=te=S[5],S.length===6?(f=Math.sqrt(E*E+D*D),p=Math.sqrt(ee*ee+O*O),m=E||D?Yc(D,E)*qc:0,_=O||ee?Yc(O,ee)*qc+m:0,_&&(p*=Math.abs(Math.cos(_*Jc))),n.svg&&(l-=b-(b*E+x*O),u-=x-(b*D+x*ee))):(re=S[6],ne=S[7],N=S[8],P=S[9],F=S[10],I=S[11],l=S[12],u=S[13],d=S[14],C=Yc(re,F),h=C*qc,C&&(w=Math.cos(-C),T=Math.sin(-C),A=k*w+N*T,j=te*w+P*T,M=re*w+F*T,N=k*-T+N*w,P=te*-T+P*w,F=re*-T+F*w,I=ne*-T+I*w,k=A,te=j,re=M),C=Yc(-O,F),g=C*qc,C&&(w=Math.cos(-C),T=Math.sin(-C),A=E*w-N*T,j=D*w-P*T,M=O*w-F*T,I=ee*T+I*w,E=A,D=j,O=M),C=Yc(D,E),m=C*qc,C&&(w=Math.cos(C),T=Math.sin(C),A=E*w+D*T,j=k*w+te*T,D=D*w-E*T,te=te*w-k*T,E=A,k=j),h&&Math.abs(h)+Math.abs(m)>359.9&&(h=m=0,g=180-g),f=oo(Math.sqrt(E*E+D*D+O*O)),p=oo(Math.sqrt(te*te+re*re)),C=Yc(k,te),_=Math.abs(C)>2e-4?C*qc:0,y=I?1/(I<0?-I:I):0),n.svg&&(A=e.getAttribute(`transform`),n.forceCSS=e.setAttribute(`transform`,``)||!Ul(Sl(e,ml)),A&&e.setAttribute(`transform`,A))),Math.abs(_)>90&&Math.abs(_)<270&&(i?(f*=-1,_+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,_+=_<=0?180:-180)),t||=n.uncache,n.x=l-((n.xPercent=l&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-l)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+a,n.y=u-((n.yPercent=u&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+a,n.z=d+a,n.scaleX=oo(f),n.scaleY=oo(p),n.rotation=oo(m)+o,n.rotationX=oo(h)+o,n.rotationY=oo(g)+o,n.skewX=_+o,n.skewY=v+o,n.transformPerspective=y+a,(n.zOrigin=parseFloat(c.split(` `)[2])||!t&&n.zOrigin||0)&&(r[hl]=Jl(c)),n.xOffset=n.yOffset=0,n.force3D=ea.force3D,n.renderTransform=n.svg?tu:bl?eu:Xl,n.uncache=0,n},Jl=function(e){return(e=e.split(` `))[0]+` `+e[1]},Yl=function(e,t,n){var r=Xo(t);return oo(parseFloat(t)+parseFloat(Pl(e,`x`,n+`px`,r)))+r},Xl=function(e,t){t.z=`0px`,t.rotationY=t.rotationX=`0deg`,t.force3D=0,eu(e,t)},Zl=`0deg`,Ql=`0px`,$l=`) `,eu=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.z,c=n.rotation,l=n.rotationY,u=n.rotationX,d=n.skewX,f=n.skewY,p=n.scaleX,m=n.scaleY,h=n.transformPerspective,g=n.force3D,_=n.target,v=n.zOrigin,y=``,b=g===`auto`&&e&&e!==1||g===!0;if(v&&(u!==Zl||l!==Zl)){var x=parseFloat(l)*Jc,S=Math.sin(x),C=Math.cos(x),w;x=parseFloat(u)*Jc,w=Math.cos(x),a=Yl(_,a,S*w*-v),o=Yl(_,o,-Math.sin(x)*-v),s=Yl(_,s,C*w*-v+v)}h!==Ql&&(y+=`perspective(`+h+$l),(r||i)&&(y+=`translate(`+r+`%, `+i+`%) `),(b||a!==Ql||o!==Ql||s!==Ql)&&(y+=s!==Ql||b?`translate3d(`+a+`, `+o+`, `+s+`) `:`translate(`+a+`, `+o+$l),c!==Zl&&(y+=`rotate(`+c+$l),l!==Zl&&(y+=`rotateY(`+l+$l),u!==Zl&&(y+=`rotateX(`+u+$l),(d!==Zl||f!==Zl)&&(y+=`skew(`+d+`, `+f+$l),(p!==1||m!==1)&&(y+=`scale(`+p+`, `+m+$l),_.style[ml]=y||`translate(0, 0)`},tu=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.rotation,c=n.skewX,l=n.skewY,u=n.scaleX,d=n.scaleY,f=n.target,p=n.xOrigin,m=n.yOrigin,h=n.xOffset,g=n.yOffset,_=n.forceCSS,v=parseFloat(a),y=parseFloat(o),b,x,S,C,w;s=parseFloat(s),c=parseFloat(c),l=parseFloat(l),l&&(l=parseFloat(l),c+=l,s+=l),s||c?(s*=Jc,c*=Jc,b=Math.cos(s)*u,x=Math.sin(s)*u,S=Math.sin(s-c)*-d,C=Math.cos(s-c)*d,c&&(l*=Jc,w=Math.tan(c-l),w=Math.sqrt(1+w*w),S*=w,C*=w,l&&(w=Math.tan(l),w=Math.sqrt(1+w*w),b*=w,x*=w)),b=oo(b),x=oo(x),S=oo(S),C=oo(C)):(b=u,C=d,x=S=0),(v&&!~(a+``).indexOf(`px`)||y&&!~(o+``).indexOf(`px`))&&(v=Pl(f,`x`,a,`px`),y=Pl(f,`y`,o,`px`)),(p||m||h||g)&&(v=oo(v+p-(p*b+m*S)+h),y=oo(y+m-(p*x+m*C)+g)),(r||i)&&(w=f.getBBox(),v=oo(v+r/100*w.width),y=oo(y+i/100*w.height)),w=`matrix(`+b+`,`+x+`,`+S+`,`+C+`,`+v+`,`+y+`)`,f.setAttribute(`transform`,w),_&&(f.style[ml]=w)},nu=function(e,t,n,r,i){var a=360,o=pa(i),s=parseFloat(i)*(o&&~i.indexOf(`rad`)?qc:1)-r,c=r+s+`deg`,l,u;return o&&(l=i.split(`_`)[1],l===`short`&&(s%=a,s!==s%(a/2)&&(s+=s<0?a:-a)),l===`cw`&&s<0?s=(s+a*Xc)%a-~~(s/a)*a:l===`ccw`&&s>0&&(s=(s-a*Xc)%a-~~(s/a)*a)),e._pt=u=new Cc(e._pt,t,n,r,s,nl),u.e=c,u.u=`deg`,e._props.push(n),u},ru=function(e,t){for(var n in t)e[n]=t[n];return e},iu=function(e,t,n){var r=ru({},n._gsap),i=`perspective,force3D,transformOrigin,svgOrigin`,a=n.style,o,s,c,l,u,d,f,p;for(s in r.svg?(c=n.getAttribute(`transform`),n.setAttribute(`transform`,``),a[ml]=t,o=ql(n,1),Al(n,ml),n.setAttribute(`transform`,c)):(c=getComputedStyle(n)[ml],a[ml]=t,o=ql(n,1),a[ml]=c),Kc)c=r[s],l=o[s],c!==l&&i.indexOf(s)<0&&(f=Xo(c),p=Xo(l),u=f===p?parseFloat(c):Pl(n,s,c,p),d=parseFloat(l),e._pt=new Cc(e._pt,o,s,u,d-u,tl),e._pt.u=p||0,e._props.push(s));ru(o,r)};ao(`padding,margin,Width,Radius`,function(e,t){var n=`Top`,r=`Right`,i=`Bottom`,a=`Left`,o=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(n){return t<2?e+n:`border`+n+e});Bl[t>1?`border`+e:e]=function(e,t,n,r,i){var a,s;if(arguments.length<4)return a=o.map(function(t){return Fl(e,t,n)}),s=a.join(` `),s.split(a[0]).length===5?a[0]:s;a=(r+``).split(` `),s={},o.forEach(function(e,t){return s[e]=a[t]=a[t]||a[(t-1)/2|0]}),e.init(t,s,i)}});var au={name:`css`,register:Tl,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var a=this._props,o=e.style,s=n.vars.startAt,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;for(m in Vc||Tl(),this.styles=this.styles||yl(e),C=this.styles.props,this.tween=n,t)if(m!==`autoRound`&&(l=t[m],!(Za[m]&&$s(m,t,n,r,e,i)))){if(f=typeof l,p=Bl[m],f===`function`&&(l=l.call(n,r,e,i),f=typeof l),f===`string`&&~l.indexOf(`random(`)&&(l=ms(l)),p)p(this,e,m,l,n)&&(S=1);else if(m.substr(0,2)===`--`)c=(getComputedStyle(e).getPropertyValue(m)+``).trim(),l+=``,ks.lastIndex=0,ks.test(c)||(h=Xo(c),g=Xo(l),g?h!==g&&(c=Pl(e,m,c,g)+g):h&&(l+=h)),this.add(o,`setProperty`,c,l,r,i,0,0,m),a.push(m),C.push(m,0,o[m]);else if(f!==`undefined`){if(s&&m in s?(c=typeof s[m]==`function`?s[m].call(n,r,e,i):s[m],pa(c)&&~c.indexOf(`random(`)&&(c=ms(c)),Xo(c+``)||c===`auto`||(c+=ea.units[m]||Xo(Fl(e,m))||``),(c+``).charAt(1)===`=`&&(c=Fl(e,m))):c=Fl(e,m),d=parseFloat(c),_=f===`string`&&l.charAt(1)===`=`&&l.substr(0,2),_&&(l=l.substr(2)),u=parseFloat(l),m in el&&(m===`autoAlpha`&&(d===1&&Fl(e,`visibility`)===`hidden`&&u&&(d=0),C.push(`visibility`,0,o.visibility),jl(this,o,`visibility`,d?`inherit`:`hidden`,u?`inherit`:`hidden`,!u)),m!==`scale`&&m!==`transform`&&(m=el[m],~m.indexOf(`,`)&&(m=m.split(`,`)[0]))),v=m in Kc,v){if(this.styles.save(m),w=l,f===`string`&&l.substring(0,6)===`var(--`){if(l=Sl(e,l.substring(4,l.indexOf(`)`))),l.substring(0,5)===`calc(`){var T=e.style.perspective;e.style.perspective=l,l=Sl(e,`perspective`),T?e.style.perspective=T:Al(e,`perspective`)}u=parseFloat(l)}if(y||(b=e._gsap,b.renderTransform&&!t.parseTransform||ql(e,t.parseTransform),x=t.smoothOrigin!==!1&&b.smooth,y=this._pt=new Cc(this._pt,o,ml,0,1,b.renderTransform,b,0,-1),y.dep=1),m===`scale`)this._pt=new Cc(this._pt,b,`scaleY`,b.scaleY,(_?co(b.scaleY,_+u):u)-b.scaleY||0,tl),this._pt.u=0,a.push(`scaleY`,m),m+=`X`;else if(m===`transformOrigin`){C.push(hl,0,o[hl]),l=Rl(l),b.svg?Kl(e,l,0,x,0,this):(g=parseFloat(l.split(` `)[2])||0,g!==b.zOrigin&&jl(this,b,`zOrigin`,b.zOrigin,g),jl(this,o,m,Jl(c),Jl(l)));continue}else if(m===`svgOrigin`){Kl(e,l,1,x,0,this);continue}else if(m in Hl){nu(this,b,m,d,_?co(d,_+l):l);continue}else if(m===`smoothOrigin`){jl(this,b,`smooth`,b.smooth,l);continue}else if(m===`force3D`){b[m]=l;continue}else if(m===`transform`){iu(this,l,e);continue}}else m in o||(m=wl(m)||m);if(v||(u||u===0)&&(d||d===0)&&!$c.test(l)&&m in o)h=(c+``).substr((d+``).length),u||=0,g=Xo(l)||(m in ea.units?ea.units[m]:h),h!==g&&(d=Pl(e,m,c,g)),this._pt=new Cc(this._pt,v?b:o,m,d,(_?co(d,_+u):u)-d,!v&&(g===`px`||m===`zIndex`)&&t.autoRound!==!1?al:tl),this._pt.u=g||0,v&&w!==l?(this._pt.b=c,this._pt.e=w,this._pt.r=il):h!==g&&g!==`%`&&(this._pt.b=c,this._pt.r=rl);else if(m in o)Il.call(this,e,m,c,_?_+l:l);else if(m in e)this.add(e,m,c||e[m],_?_+l:l,r,i);else if(m!==`parseTransform`){Ba(m,l);continue}v||(m in o?C.push(m,0,o[m]):typeof e[m]==`function`?C.push(m,2,e[m]()):C.push(m,1,c||e[m])),a.push(m)}}S&&Sc(this)},render:function(e,t){if(t.tween._time||!Wc())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:Fl,aliases:el,getSetter:function(e,t,n){var r=el[t];return r&&r.indexOf(`,`)<0&&(t=r),t in Kc&&t!==hl&&(e._gsap.x||Fl(e,`x`))?n&&Uc===n?t===`scale`?dl:ul:(Uc=n||{})&&(t===`scale`?fl:pl):e.style&&!ga(e.style[t])?cl:~t.indexOf(`-`)?ll:mc(e,t)},core:{_removeProperty:Al,_getMatrix:Gl}};Lc.utils.checkPrefix=wl,Lc.core.getStyleSaver=yl,(function(e,t,n,r){var i=ao(e+`,`+t+`,`+n,function(e){Kc[e]=1});ao(t,function(e){ea.units[e]=`deg`,Hl[e]=1}),el[i[13]]=e+`,`+t,ao(r,function(e){var t=e.split(`:`);el[t[1]]=i[t[0]]})})(`x,y,z,scale,scaleX,scaleY,xPercent,yPercent`,`rotation,rotationX,rotationY,skewX,skewY`,`transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective`,`0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY`),ao(`x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective`,function(e){ea.units[e]=`px`}),Lc.registerPlugin(au);var $=Lc.registerPlugin(au)||Lc;$.core.Tween;var ou=Y(`<canvas class="background-scene svelte-1uv8knz"></canvas>`);function su(e,t){Ge(t,!1);let n=B();Di(()=>{let e=Q.default.TAU,t={beeYellow:`#FCD116`,beeBlack:`#3D2620`,beeWhite:`#FFFDF0`,beeCheek:`#F26B50`,leafGreen:`#5DA020`,darkGreen:`#3A5C18`,land:`#7ab535`,landLight:`#9fd95c`,trunkBrown:`#8B6340`,cloudPink:`#FFE4F0`,cloudWhite:`#FFF7FB`,daisyWhite:`#FFFFFF`,daisyYellow:`#F9D342`,roseRed:`#F04A6F`,rosePink:`#FF8FAE`,lavPurple:`#C07EE0`,lavLight:`#E2B8F5`,sunflowerY:`#FFB800`,sunflowerC:`#7A3B10`,tulipPink:`#FF85A2`,tulipOrange:`#FF6B35`,honeyGold:`#F2C94C`,honeyDark:`#D4A017`},r=new Q.default.Illustration({element:K(n),dragRotate:!1,resize:`window`,rotate:{x:-.28,y:-.12,z:0}}),i=new Q.default.Anchor({addTo:r});new Q.default.Shape({addTo:i,path:[{x:-2e3,y:-1e3},{x:2e3,y:-1e3},{x:2e3,y:0},{x:-2e3,y:0}],stroke:0,fill:!0,color:`#FFB7D5`,translate:{z:-800}}),new Q.default.Shape({addTo:i,path:[{x:-2e3,y:0},{x:2e3,y:0},{x:2e3,y:600},{x:-2e3,y:600}],stroke:0,fill:!0,color:`#FFE1F0`,translate:{z:-800}});function a(e,t,n,r,a=160){let o=[{x:e-t/2,y:300}];for(let n=0;n<=24;n++){let r=n/24;o.push({x:e-t/2+r*t,y:300-Math.sin(r*Math.PI)*a})}o.push({x:e+t/2,y:300}),new Q.default.Shape({addTo:i,path:o,stroke:0,fill:!0,color:n,translate:{z:r}})}a(-600,900,t.darkGreen,-700,160),a(500,800,`#4a7020`,-700,160),a(-200,700,`#5a8a28`,-680,150),a(900,700,`#3d6a18`,-720,170),new Q.default.Shape({addTo:i,path:[{x:-2e3,y:220},{x:2e3,y:220},{x:2e3,y:800},{x:-2e3,y:800}],stroke:0,fill:!0,color:t.land,translate:{z:-500}}),new Q.default.Shape({addTo:i,path:[{x:-2e3,y:220},{x:2e3,y:220},{x:2e3,y:260},{x:-2e3,y:260}],stroke:0,fill:!0,color:t.landLight,translate:{z:-490}}),[{x:-420,y:-280,z:-420,s:1.2},{x:-160,y:-310,z:-510,s:.9},{x:360,y:-220,z:-380,s:1.4},{x:80,y:-290,z:-460,s:1},{x:700,y:-260,z:-500,s:1.1}].forEach(e=>{let n=new Q.default.Anchor({addTo:i,translate:{x:e.x,y:e.y,z:e.z},scale:e.s});new Q.default.Shape({addTo:n,stroke:95,color:t.cloudPink}),new Q.default.Shape({addTo:n,stroke:72,color:t.cloudWhite,translate:{x:-55,y:10}}),new Q.default.Shape({addTo:n,stroke:78,color:t.cloudPink,translate:{x:55,y:5}}),new Q.default.Shape({addTo:n,stroke:62,color:t.cloudWhite,translate:{x:-95,y:15}}),new Q.default.Shape({addTo:n,stroke:58,color:t.cloudPink,translate:{x:100,y:12}})}),[{x:-560,y:140,z:-320,s:1},{x:-380,y:160,z:-260,s:.8},{x:460,y:150,z:-370,s:1.2},{x:580,y:170,z:-220,s:.85},{x:740,y:145,z:-300,s:.9},{x:-680,y:155,z:-340,s:1}].forEach(e=>{let n=new Q.default.Anchor({addTo:i,translate:{x:e.x,y:e.y,z:e.z},scale:e.s});new Q.default.Shape({addTo:n,path:[{y:0},{y:-90}],stroke:18,color:t.trunkBrown}),new Q.default.Shape({addTo:n,stroke:130,color:t.darkGreen,translate:{y:-130}}),new Q.default.Shape({addTo:n,stroke:100,color:t.leafGreen,translate:{y:-175,x:-20}}),new Q.default.Shape({addTo:n,stroke:90,color:`#7fcf38`,translate:{y:-185,x:20}})});let o=new Q.default.Anchor({addTo:r,translate:{x:0,y:50,z:120}});function s(n,r,i,a,o,s,c,l,u){u||=t.daisyWhite;let d=new Q.default.Anchor({addTo:n,translate:{x:r,y:i+(120-s),z:a},scale:o});new Q.default.Shape({addTo:d,path:[{x:0,y:s,z:0},{x:0,y:0,z:0}],stroke:7,color:t.leafGreen});let f=new Q.default.Anchor({addTo:d,rotate:{x:c,y:l}});for(let t=0;t<13;t++){let n=new Q.default.Anchor({addTo:f,rotate:{z:e/13*t}});new Q.default.Ellipse({addTo:n,width:11,height:30,fill:!0,color:u,stroke:0,translate:{y:-18}})}new Q.default.Ellipse({addTo:f,diameter:15,fill:!0,stroke:4,color:t.daisyYellow,translate:{z:1.5}})}function c(n,r,i,a,o,s,c,l){let u=new Q.default.Anchor({addTo:n,translate:{x:r,y:i+(140-s),z:a},scale:o});new Q.default.Shape({addTo:u,path:[{x:0,y:s},{x:0,y:0}],stroke:7,color:t.leafGreen});let d=new Q.default.Anchor({addTo:u,rotate:{x:c,y:l}});for(let n=0;n<3;n++){let r=6+n*2,i=10+n*9;for(let a=0;a<r;a++){let o=e/r*a+n*.3,s=new Q.default.Anchor({addTo:d,translate:{x:Math.cos(o)*i,y:Math.sin(o)*i}});new Q.default.Ellipse({addTo:s,width:n===0?8:10+n*2,height:n===0?12:14+n*3,fill:!0,color:n===0?t.roseRed:t.rosePink,stroke:0,rotate:{z:o}})}}new Q.default.Ellipse({addTo:d,diameter:8,fill:!0,stroke:0,color:`#c0243a`,translate:{z:1}})}function l(e,n,r,i,a,o,s,c){let l=new Q.default.Anchor({addTo:e,translate:{x:n,y:r+(150-o),z:i},scale:a});new Q.default.Shape({addTo:l,path:[{x:0,y:o},{x:0,y:0}],stroke:6,color:t.leafGreen});let u=new Q.default.Anchor({addTo:l,rotate:{x:s,y:c}});for(let e=0;e<8;e++){let n=new Q.default.Anchor({addTo:u,translate:{x:0,y:-e*10},rotate:{z:e%2==0?.3:-.3}});new Q.default.Ellipse({addTo:n,width:9,height:14,fill:!0,color:e<3?t.lavPurple:t.lavLight,stroke:0,translate:{x:6}}),new Q.default.Ellipse({addTo:n,width:9,height:14,fill:!0,color:e<3?t.lavPurple:t.lavLight,stroke:0,translate:{x:-6}})}}function u(n,r,i,a,o,s,c,l){let u=new Q.default.Anchor({addTo:n,translate:{x:r,y:i+(160-s),z:a},scale:o});new Q.default.Shape({addTo:u,path:[{x:0,y:s},{x:0,y:0}],stroke:9,color:t.leafGreen});let d=new Q.default.Anchor({addTo:u,rotate:{x:c,y:l}});for(let n=0;n<18;n++){let r=new Q.default.Anchor({addTo:d,rotate:{z:e/18*n}});new Q.default.Ellipse({addTo:r,width:13,height:36,fill:!0,color:t.sunflowerY,stroke:0,translate:{y:-24}})}new Q.default.Ellipse({addTo:d,diameter:22,fill:!0,stroke:5,color:t.sunflowerC,translate:{z:2}})}function d(n,r,i,a,o,s,c,l,u){u||=t.tulipPink;let d=new Q.default.Anchor({addTo:n,translate:{x:r,y:i+(130-s),z:a},scale:o});new Q.default.Shape({addTo:d,path:[{x:0,y:s},{x:0,y:0}],stroke:8,color:t.leafGreen});let f=new Q.default.Anchor({addTo:d,rotate:{x:c,y:l}});for(let t=0;t<6;t++){let n=e/6*t;new Q.default.Ellipse({addTo:f,width:18,height:36,fill:!0,color:u,stroke:0,translate:{x:Math.cos(n)*10,z:Math.sin(n)*10},rotate:{y:n,x:-.3}})}}let f=new Q.default.Anchor({addTo:o,translate:{x:-310,y:-180,z:-60}});new Q.default.Shape({addTo:f,path:[{x:0,y:-80},{x:0,y:-30}],stroke:5,color:t.trunkBrown}),new Q.default.Shape({addTo:f,stroke:14,color:`#E8A800`,translate:{x:12,y:46}}),[{x:0,y:0},{x:0,y:-38},{x:-33,y:-19},{x:33,y:-19},{x:-33,y:19},{x:33,y:19},{x:0,y:38}].forEach((n,r)=>{new Q.default.Polygon({addTo:f,sides:6,radius:17,fill:!0,stroke:9,color:r%2==0?t.honeyGold:`#EDAB20`,translate:{x:n.x,y:n.y,z:r%2==0?5:0},rotate:{z:e/12}}),new Q.default.Polygon({addTo:f,sides:6,radius:10,fill:!0,stroke:0,color:`#D4920A`,translate:{x:n.x,y:n.y,z:r%2==0?8:3},rotate:{z:e/12}})}),[{f:`d`,x:-750,y:140,z:20,s:4.8,len:120,rx:-e/4,ry:.3,c:t.daisyWhite},{f:`t`,x:-680,y:155,z:60,s:5,len:115,rx:-e/4.2,ry:-.2,c:t.tulipPink},{f:`r`,x:-620,y:130,z:-40,s:4.6,len:110,rx:-e/3.8,ry:.1},{f:`s`,x:-580,y:165,z:80,s:4.5,len:105,rx:-e/3.6,ry:-.3},{f:`l`,x:-530,y:145,z:100,s:5.2,len:170,rx:-e/5,ry:-.5},{f:`d`,x:-480,y:150,z:30,s:4.7,len:125,rx:-e/4,ry:.2,c:`#FFE4F0`},{f:`t`,x:-420,y:135,z:-80,s:5.3,len:120,rx:-e/4.3,ry:.4,c:t.tulipOrange},{f:`r`,x:-360,y:140,z:50,s:4.8,len:115,rx:-e/4.4,ry:-.2},{f:`d`,x:-310,y:125,z:-100,s:4.9,len:130,rx:-e/3.8,ry:.15,c:`#fff0fb`},{f:`s`,x:-260,y:155,z:70,s:4.4,len:110,rx:-e/3.5,ry:.25},{f:`l`,x:-200,y:140,z:45,s:5.1,len:165,rx:-e/4.8,ry:-.35},{f:`t`,x:-140,y:160,z:120,s:5,len:100,rx:-e/4.5,ry:.3,c:`#ff85a2`},{f:`d`,x:-80,y:145,z:80,s:4.6,len:115,rx:-e/4,ry:.1,c:t.daisyWhite},{f:`r`,x:-20,y:130,z:-50,s:4.7,len:120,rx:-e/3.9,ry:-.1},{f:`s`,x:60,y:155,z:90,s:4.5,len:105,rx:-e/3.7,ry:.2},{f:`d`,x:140,y:140,z:40,s:5,len:125,rx:-e/4,ry:-.25,c:`#FFE4F0`},{f:`t`,x:210,y:150,z:110,s:5.2,len:115,rx:-e/4.2,ry:.35,c:t.tulipPink},{f:`l`,x:280,y:135,z:60,s:4.8,len:160,rx:-e/5,ry:-.4},{f:`d`,x:350,y:160,z:75,s:4.9,len:120,rx:-e/4,ry:.2,c:`#fff0fb`},{f:`r`,x:410,y:140,z:-70,s:4.6,len:125,rx:-e/3.8,ry:.15},{f:`s`,x:470,y:155,z:85,s:4.7,len:110,rx:-e/3.5,ry:-.2},{f:`t`,x:540,y:130,z:30,s:5.1,len:100,rx:-e/4.5,ry:.4,c:t.tulipOrange},{f:`l`,x:600,y:145,z:120,s:5,len:175,rx:-e/4.8,ry:-.3},{f:`d`,x:660,y:150,z:50,s:4.8,len:130,rx:-e/4,ry:.25,c:`#FFE4F0`},{f:`r`,x:720,y:140,z:-90,s:4.9,len:115,rx:-e/3.9,ry:-.15},{f:`s`,x:780,y:165,z:95,s:4.5,len:105,rx:-e/3.6,ry:.1},{f:`t`,x:840,y:135,z:40,s:5.3,len:120,rx:-e/4.3,ry:.3,c:t.tulipPink},{f:`d`,x:900,y:155,z:110,s:4.7,len:125,rx:-e/4.1,ry:-.2,c:`#fff0fb`},{f:`l`,x:950,y:140,z:60,s:5.2,len:170,rx:-e/5,ry:-.4}].forEach(e=>{e.f===`d`?s(o,e.x,e.y,e.z,e.s,e.len,e.rx,e.ry,e.c):e.f===`r`?c(o,e.x,e.y,e.z,e.s,e.len,e.rx,e.ry):e.f===`l`?l(o,e.x,e.y,e.z,e.s,e.len,e.rx,e.ry):e.f===`s`?u(o,e.x,e.y,e.z,e.s,e.len,e.rx,e.ry):e.f===`t`&&d(o,e.x,e.y,e.z,e.s,e.len,e.rx,e.ry,e.c)}),r.updateRenderGraph()}),Ci();var r=ou();bi(r,e=>V(n,e),()=>K(n)),X(e,r),Ke()}var cu=Y(`<div><span class="history-label svelte-1nwv6qn"> </span> <p class="svelte-1nwv6qn"> </p></div>`),lu=Y(`<div class="history-panel svelte-1nwv6qn"><div class="history-header svelte-1nwv6qn"><h2 class="svelte-1nwv6qn">Session chat</h2> <button class="close-btn svelte-1nwv6qn">✕</button></div> <div class="history-scroll svelte-1nwv6qn"></div></div>`),uu=Y(`<button class="radial-btn svelte-1nwv6qn"><span class="radial-icon svelte-1nwv6qn"> </span> <span class="radial-label svelte-1nwv6qn"> </span></button>`),du=Y(`<div class="radial-overlay svelte-1nwv6qn"><!> <button class="radial-center svelte-1nwv6qn">✕</button></div>`),fu=Y(`<div class="card-overlay svelte-1nwv6qn"><div class="card svelte-1nwv6qn"><div class="card-icon svelte-1nwv6qn"> </div> <h2 class="svelte-1nwv6qn"> </h2> <p class="card-desc svelte-1nwv6qn"> </p> <p class="card-hint svelte-1nwv6qn"> </p> <div class="card-actions svelte-1nwv6qn"><button class="card-btn primary svelte-1nwv6qn">Activate</button> <button class="card-btn ghost svelte-1nwv6qn">Cancel</button></div></div></div>`),pu=Y(`<div><div class="thought-bubble svelte-1nwv6qn"><div class="thought-dots svelte-1nwv6qn"><span class="svelte-1nwv6qn"></span><span class="svelte-1nwv6qn"></span><span class="svelte-1nwv6qn"></span></div> <p class="thought-text svelte-1nwv6qn"> </p></div> <div class="thought-reply svelte-1nwv6qn"><textarea placeholder="Reply to Buzz…" rows="1" class="svelte-1nwv6qn"></textarea> <button class="reply-send svelte-1nwv6qn"> </button></div></div>`),mu=Y(`<p class="hint svelte-1nwv6qn">Tap the bee to open interactions ✿</p>`),hu=Y(`<div class="top-bar svelte-1nwv6qn"><button class="bar-btn svelte-1nwv6qn">← Home</button> <button class="bar-btn svelte-1nwv6qn"> </button></div> <!> <!> <canvas class="scene svelte-1nwv6qn"></canvas> <!> <!> <!> <!>`,1);function gu(e,t){Ge(t,!1);let n=Ei(t,`embedded`,8,!1),r=B(),i=B(!1),a=B(null),o=B(!1),s=B(!1),c=B(``),l=B(``),u=null,d=null,f=B(!1),p=[{id:`annoy`,icon:`😤`,label:`Annoy`,title:`Pull the bee's tail`,description:`Grab and drag the bee hard to make it flash red with anger.`,hint:`Drag the bee quickly to trigger annoyance.`,angle:-90},{id:`fly`,icon:`🦋`,label:`Fly`,title:`Make it fly around`,description:`Double-tap the bee's wings to send it looping through the garden.`,hint:`Click the wing area twice quickly.`,angle:-30},{id:`anger`,icon:`🍯`,label:`Honeycomb`,title:`Touch the honeycomb`,description:`Click the golden honeycomb hanging in the scene to trigger a buzzing rage.`,hint:`The honeycomb is visible in the upper right of the scene.`,angle:30},{id:`pollen`,icon:`🌸`,label:`Pollen`,title:`Gather pollen`,description:`Click any of the flowers scattered around the garden to send the bee collecting.`,hint:`Tap the flowers in the foreground.`,angle:90},{id:`chat`,icon:`💬`,label:`Chat`,title:`Speak to the bee`,description:`The bee has thoughts and wisdom about effort, rest, and how others see you.`,hint:`Reply to the bee's thought bubbles below.`,angle:150}],m=B([{role:`assistant`,content:`Buzz! 🌸 Ask me about effort, rest, or what others think of you!`}]),h=[`The garden is asking a lot today. What do you think?`,`I am thinking about hard work and sweet rest.`,`If I fly too much, I wonder if the flowers miss me.`,`Does being busy make us feel better or more tired?`,`Every drop of nectar matters — even the ones you can't see yet.`,`What do you think the other bees say about me?`],g,_,v,y,b,x=0,S=null;function C(){dispatch(`back`)}function w(e){V(a,p.find(t=>t.id===e)),V(i,!1)}function T(){V(a,null)}function E(){if(K(a)){if(K(a).id===`annoy`&&g?.(),K(a).id===`fly`&&_?.(),K(a).id===`anger`&&v?.(),K(a).id===`pollen`&&y?.(),K(a).id===`chat`){V(a,null);return}V(a,null)}}function D(){V(o,!K(o)),K(o)&&(V(i,!1),V(a,null))}function O(e,t=!1){d&&clearTimeout(d),V(c,e),V(s,!0),t||(d=setTimeout(()=>{V(s,!1)},12e3))}function ee(){u&&clearTimeout(u),u=setTimeout(()=>{let e=h[Math.floor(Math.random()*h.length)];O(e),ee()},16e3+Math.random()*12e3)}async function k(){let e=K(l).trim();!e||K(f)||(V(l,``),V(s,!1),await A(e))}function te(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),k())}async function A(e){if(!K(f)){V(f,!0),O(``,!0),b?.(),V(m,[...K(m),{role:`user`,content:e}]);try{let e={model:`gpt-4o-mini`,messages:[{role:`system`,content:`You are Buzz, an adorable wise bee who lives in a flower garden. You speak in short, warm, whimsical messages (2-4 sentences max). You use flower and bee metaphors naturally.
Your specialty is helping people think about:
- How others perceive them (social perception, first impressions, reputation)
- Diligence and hard work (like a bee — constant, purposeful effort)
- Laziness and rest (the importance of pause vs. the trap of avoidance)
You give gentle, insightful, slightly playful advice. You don't lecture. Keep it warm, short, and wise.`},...K(m)],max_tokens:256,temperature:.9},t=await fetch(`https://api.openai.com/v1/chat/completions`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer undefined`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json();throw console.error(`OpenAI Internal Error JSON:`,e),Error(`API returned status ${t.status}`)}let n=(await t.json())?.choices?.[0]?.message?.content;if(n){let e=n.trim();V(m,[...K(m),{role:`assistant`,content:e}]),O(e,!0)}else O(`Sorry, I can't think of anything to answer. Try again?`,!0)}catch(e){console.error(`OpenAI Catch block triggered:`,e),V(m,K(m).slice(0,-1)),O(`Sorry, I can't think of anything to answer. Try again?`,!0)}finally{V(f,!1)}}}Di(()=>{if(n()||document.body.classList.add(`bee-page`),!K(r))return;let e=Q.default.TAU,t={beeYellow:`#FCD116`,beeBlack:`#3D2620`,beeWhite:`#FFFDF0`,beeCheek:`#F26B50`,leafGreen:`#5DA020`,darkGreen:`#3A5C18`,land:`#7ab535`,landLight:`#9fd95c`,trunkBrown:`#8B6340`,cloudPink:`#FFE4F0`,cloudWhite:`#FFF7FB`,daisyWhite:`#FFFFFF`,daisyYellow:`#F9D342`,roseRed:`#F04A6F`,rosePink:`#FF8FAE`,lavPurple:`#C07EE0`,lavLight:`#E2B8F5`,sunflowerY:`#FFB800`,sunflowerC:`#7A3B10`,tulipPink:`#FF85A2`,tulipOrange:`#FF6B35`,honeyGold:`#F2C94C`,honeyDark:`#D4A017`,beeAngryRed:`#FF3B30`},o=new Q.default.Illustration({element:K(r),dragRotate:!1,resize:`window`,rotate:{x:-.28,y:-.12,z:0}}),s=new Q.default.Anchor({addTo:o,translate:{x:0,y:50,z:120}}),c=new Q.default.Anchor({addTo:s,translate:{x:0,y:-100,z:0},scale:1.55}),l=new Q.default.Anchor({addTo:c,translate:{x:0,y:32,z:-35},rotate:{y:0}}),f=new Q.default.Anchor({addTo:l,translate:{x:0,y:-32,z:35}}),p=new Q.default.Shape({addTo:f,stroke:130,color:t.beeYellow});new Q.default.Shape({addTo:p,stroke:10,color:t.beeBlack,translate:{x:-22,y:4,z:36}}),new Q.default.Shape({addTo:p,stroke:10,color:t.beeBlack,translate:{x:14,y:4,z:40}});let m=new Q.default.Shape({addTo:p,stroke:3.5,color:t.beeBlack,closed:!1,path:[{x:-4,y:10,z:42},{bezier:[{x:-2,y:13,z:42},{x:2,y:13,z:42},{x:4,y:10,z:42}]}]}),h=new Q.default.Shape({addTo:p,path:[{x:-34,y:-14,z:44},{x:-10,y:-22,z:44}],stroke:8,color:t.beeBlack,translate:{x:-18,y:-8,z:20},rotate:{z:-.18}}),C=new Q.default.Shape({addTo:p,path:[{x:10,y:-22,z:44},{x:34,y:-14,z:44}],stroke:8,color:t.beeBlack,translate:{x:18,y:-8,z:20},rotate:{z:.18}});new Q.default.Shape({addTo:p,stroke:14,color:t.beeCheek,translate:{x:-32,y:14,z:24}}),new Q.default.Shape({addTo:p,stroke:14,color:t.beeCheek,translate:{x:24,y:14,z:30}});let w=new Q.default.Anchor({addTo:p,translate:{y:-44,z:10}});new Q.default.Shape({addTo:w,path:[{y:0,x:-10},{y:-22,x:-24,z:8}],stroke:4.5,color:t.beeBlack}),new Q.default.Shape({addTo:w,path:[{y:0,x:10},{y:-22,x:-4,z:12}],stroke:4.5,color:t.beeBlack});let T=new Q.default.Anchor({addTo:f,translate:{x:-18,y:45,z:32}}),E=new Q.default.Anchor({addTo:f,translate:{x:18,y:45,z:32}});new Q.default.Shape({addTo:T,path:[{y:0},{y:22}],stroke:7,color:t.beeBlack}),new Q.default.Shape({addTo:E,path:[{y:0},{y:22}],stroke:7,color:t.beeBlack});let D=new Q.default.Anchor({addTo:f,translate:{y:32,z:-35}}),k=new Q.default.Shape({addTo:D,stroke:140,color:t.beeYellow});k.copy({addTo:D,stroke:162,color:t.beeBlack,translate:{z:-32}});let te=k.copy({addTo:D,stroke:168,color:t.beeYellow,translate:{z:-64}});k.copy({addTo:D,stroke:156,color:t.beeBlack,translate:{z:-96}}),new Q.default.Shape({addTo:D,stroke:108,color:t.beeBlack,translate:{z:-123}});let j=new Q.default.Anchor({addTo:D,translate:{z:-43,y:-65,x:29}}),M=new Q.default.Anchor({addTo:D,translate:{z:-43,y:-65,x:-29}});new Q.default.Ellipse({addTo:j,width:80,height:160,color:t.beeWhite,fill:!0,rotate:{x:e/5,z:e/5},translate:{x:65},stroke:0}),new Q.default.Ellipse({addTo:M,width:80,height:160,color:t.beeWhite,fill:!0,rotate:{x:e/5,z:-e/5},translate:{x:-65},stroke:0});function N(e){e===`neutral`?(h.rotate.z=-.18,C.rotate.z=.18,m.path=[{x:-4,y:10,z:42},{bezier:[{x:-2,y:13,z:42},{x:2,y:13,z:42},{x:4,y:10,z:42}]}]):e===`annoyed`?(h.rotate.z=-.55,C.rotate.z=.55,m.path=[{x:-4,y:14,z:42},{bezier:[{x:-2,y:10,z:42},{x:2,y:10,z:42},{x:4,y:14,z:42}]}]):e===`angry`?(h.rotate.z=-.8,C.rotate.z=.8,m.path=[{x:-5,y:15,z:42},{bezier:[{x:-2,y:8,z:42},{x:2,y:8,z:42},{x:5,y:15,z:42}]}]):e===`excited`?(h.rotate.z=-.05,C.rotate.z=.05,m.path=[{x:-6,y:7,z:42},{bezier:[{x:-2,y:18,z:42},{x:2,y:18,z:42},{x:6,y:7,z:42}]}]):e===`happy`&&(h.rotate.z=-.1,C.rotate.z=.1,m.path=[{x:-5,y:8,z:42},{bezier:[{x:-2,y:16,z:42},{x:2,y:16,z:42},{x:5,y:8,z:42}]}]),m.updatePath()}N(`neutral`);let P=0,F=!0,ne=!1,I=!1,re=!1;function ie(){if(!F)return;P++;let t=I?2.5:1;j.rotate.z=-e/6+e/10*Math.sin(P/(.9/t)),M.rotate.z=e/6-e/10*Math.sin(P/(.9/t)),w.rotate.x=e/40*Math.sin(P/10),re&&(l.rotate.z=Math.sin(P/3)*.18),ne||(c.translate.y=-100+Math.sin(P/14)*5,c.translate.x=Math.cos(P/28)*4),o.updateRenderGraph(),requestAnimationFrame(ie)}ie();function ae(){if(I)return;I=!0,re=!0,N(`angry`);let e=$.timeline({onComplete:()=>{N(`neutral`),I=!1,re=!1,l.rotate.z=0}});e.to([p,k,te],{duration:.12,color:t.beeAngryRed,ease:`power2.out`}),e.to([p,k,te],{duration:.7,color:t.beeYellow,ease:`power1.inOut`,delay:.9}),A(`Someone just pulled on my tail — I'm cross! Give me short playful bee wisdom about keeping cool.`)}function oe(){if(ne)return;ne=!0,N(`excited`);let t=$.timeline({onComplete:()=>{N(`neutral`),ne=!1}});t.to(c.translate,{duration:.4,x:-200,y:-150,z:80,ease:`power2.inOut`}),t.to(l.rotate,{duration:.4,x:.3,y:-.6,z:.5,ease:`power2.inOut`},0),t.to(c.translate,{duration:.35,x:0,y:-220,z:120,ease:`power2.inOut`}),t.to(l.rotate,{duration:.35,x:.25,y:-e/8,z:.3,ease:`power2.inOut`},`<`),t.to(c.translate,{duration:.35,x:200,y:-150,z:80,ease:`power2.inOut`}),t.to(l.rotate,{duration:.35,x:.3,y:.6,z:-.5,ease:`power2.inOut`},`<`),t.to(c.translate,{duration:.35,x:0,y:-80,z:20,ease:`power2.inOut`}),t.to(l.rotate,{duration:.35,x:.35,y:e/6,z:.8,ease:`power2.inOut`},`<`),t.to(c.translate,{duration:.35,x:0,y:-100,z:0,ease:`power2.inOut`}),t.to(l.rotate,{duration:.5,x:0,y:0,z:0,ease:`power2.inOut`},`<`)}function se(){if(ne)return;ne=!0,N(`happy`);let e=$.timeline({onComplete:()=>{N(`neutral`),ne=!1}});e.to(c.translate,{duration:.5,x:-60,y:70,z:5,ease:`power2.inOut`}),e.to(l.rotate,{duration:.2,x:.5,y:.4,ease:`power2.out`},`-=0.2`),e.to(T.rotate,{duration:.2,z:.2,x:.1,ease:`back.out(1.5)`},`-=0.1`),e.to(E.rotate,{duration:.2,z:-.2,x:.1,ease:`back.out(1.5)`},`<`),e.to(c.translate,{duration:.12,y:80,ease:`power1.inOut`}),e.to(c.translate,{duration:.12,y:65,ease:`power1.inOut`}),e.to(T.rotate,{duration:.2,z:0,x:0,ease:`power2.in`}),e.to(E.rotate,{duration:.2,z:0,x:0,ease:`power2.in`},`<`),e.to(c.translate,{duration:.55,x:0,y:-100,z:0,ease:`power2.inOut`}),e.to(l.rotate,{duration:.4,x:0,y:0,ease:`power2.inOut`},`-=0.4`)}function ce(){if(ne)return;ne=!0,N(`happy`);let e=$.timeline({onComplete:()=>{N(`neutral`),ne=!1}});e.to(T.rotate,{duration:.4,z:.3,x:.15,ease:`sine.inOut`}),e.to(E.rotate,{duration:.4,z:-.3,x:.15,ease:`sine.inOut`},`<`),e.to(T.rotate,{duration:.4,z:0,x:0,ease:`sine.inOut`},`-=0.1`),e.to(E.rotate,{duration:.4,z:0,x:0,ease:`sine.inOut`},`<`),e.to(T.rotate,{duration:.35,z:.25,x:.12,ease:`sine.inOut`}),e.to(E.rotate,{duration:.35,z:-.25,x:.12,ease:`sine.inOut`},`<`),e.to(T.rotate,{duration:.35,z:0,x:0,ease:`sine.inOut`}),e.to(E.rotate,{duration:.35,z:0,x:0,ease:`sine.inOut`},`<`)}g=ae,_=oe,y=se,b=ce,v=()=>{O(`You touched my honeycomb! Bzzzz! 🍯`),ae()};let le={x:-310,y:-130,r:80},L=[{x:-280,y:120,r:70},{x:-140,y:130,r:70},{x:60,y:140,r:70},{x:220,y:125,r:70},{x:-360,y:150,r:70},{x:-220,y:145,r:70}],ue=!1,de=0,fe=0,pe=!1,me=.008;function he(e){ue=!0,pe=!1,de=e.clientX,fe=e.clientY;try{K(r).setPointerCapture(e.pointerId)}catch{}}function ge(t){if(!ue)return;let n=t.clientX-de,r=t.clientY-fe;de=t.clientX,fe=t.clientY;let i=Math.sqrt(n*n+r*r);i>10&&(pe=!0),i>28&&ae(),l.rotate.y+=n*me,l.rotate.x+=r*me,l.rotate.x=Math.max(-e/8,Math.min(e/8,l.rotate.x)),o.updateRenderGraph()}function _e(){ue=!1}function ve(e){if(pe)return;let t=K(r).getBoundingClientRect(),n=e.clientX-t.left-t.width/2,o=e.clientY-t.top-t.height/2;if(Math.hypot(n-le.x,o-le.y)<le.r){v();return}for(let e of L)if(Math.hypot(n-e.x,o-e.y)<e.r){se();return}let s=Math.hypot(n- -40,o- -130)<90,c=Math.hypot(n-40,o- -130)<90;if(s||c){x++,S&&clearTimeout(S),x>=2?(x=0,oe()):S=setTimeout(()=>{x=0},700);return}Math.hypot(n,o+100)<130&&(V(i,!K(i)),V(a,null))}return n()||(K(r).addEventListener(`click`,ve),K(r).addEventListener(`pointerdown`,he),K(r).addEventListener(`pointermove`,ge),window.addEventListener(`pointerup`,_e)),setTimeout(()=>O(`Buzz! 🌸 I'm thinking about effort and rest. What about you?`),3e3),ee(),()=>{F=!1,u&&clearTimeout(u),d&&clearTimeout(d),K(r)?.removeEventListener(`click`,ve),K(r)?.removeEventListener(`pointerdown`,he),K(r)?.removeEventListener(`pointermove`,ge),window.removeEventListener(`pointerup`,_e)}}),Ci();var j=hu(),M=fn(j),N=H(M),P=U(N,2),F=H(P,!0);R(P),R(M);var ne=U(M,2),I=e=>{var t=lu(),n=H(t),r=U(H(n),2);R(n);var i=U(n,2);Jr(i,5,()=>K(m),Wr,(e,t)=>{var n=cu(),r=H(n),i=H(r,!0);R(r);var a=U(r,2),o=H(a,!0);R(a),R(n),Ln(()=>{ai(n,1,`history-msg ${(K(t),q(()=>K(t).role))??``}`,`svelte-1nwv6qn`),Z(i,(K(t),q(()=>K(t).role===`assistant`?`🐝 Buzz`:`You`))),Z(o,(K(t),q(()=>K(t).content)))}),X(e,n)}),R(i),R(t),J(`click`,r,()=>V(o,!1)),X(e,t)};Ur(ne,e=>{K(o)&&e(I)});var re=U(ne,2),ie=e=>{su(e,{})};Ur(re,e=>{n()||e(ie)});var ae=U(re,2);bi(ae,e=>V(r,e),()=>K(r));var oe=U(ae,2),se=e=>{var t=du(),n=H(t);Jr(n,1,()=>p,Wr,(e,t,n)=>{let r=yt(()=>q(()=>n/p.length*360-90)),i=yt(()=>(wr(K(r)),q(()=>K(r)*(Math.PI/180)))),a=yt(()=>110);var o=uu(),s=H(o),c=H(s,!0);R(s);var l=U(s,2),u=H(l,!0);R(l),R(o),Ln((e,r)=>{si(o,`
left: calc(50% + ${e??``}px - 36px);
top: calc(50% + ${r??``}px - 36px);
animation-delay: ${n*55}ms;
`),Z(c,(K(t),q(()=>K(t).icon))),Z(u,(K(t),q(()=>K(t).label)))},[()=>(wr(K(i)),wr(K(a)),q(()=>Math.cos(K(i))*K(a))),()=>(wr(K(i)),wr(K(a)),q(()=>Math.sin(K(i))*K(a)))]),J(`click`,o,()=>w(K(t).id)),X(e,o)});var r=U(n,2);R(t),J(`click`,r,()=>{V(i,!1)}),X(e,t)};Ur(oe,e=>{!n()&&K(i)&&e(se)});var ce=U(oe,2),le=e=>{var t=fu(),n=H(t),r=H(n),i=H(r,!0);R(r);var o=U(r,2),s=H(o,!0);R(o);var c=U(o,2),l=H(c,!0);R(c);var u=U(c,2),d=H(u);R(u);var f=U(u,2),p=H(f),m=U(p,2);R(f),R(n),R(t),Ln(()=>{Z(i,(K(a),q(()=>K(a).icon))),Z(s,(K(a),q(()=>K(a).title))),Z(l,(K(a),q(()=>K(a).description))),Z(d,`${(K(a),q(()=>K(a).hint))??``}`)}),J(`click`,p,E),J(`click`,m,T),J(`click`,t,xi(()=>V(a,null))),X(e,t)};Ur(ce,e=>{K(a)&&e(le)});var L=U(ce,2),ue=e=>{var t=pu();let n;var r=H(t),i=U(H(r),2),a=H(i,!0);R(i),R(r);var o=U(r,2),u=H(o);vn(u);var d=U(u,2),p=H(d,!0);R(d),R(o),R(t),Ln(e=>{n=ai(t,1,`thought-wrap svelte-1nwv6qn`,null,n,{visible:K(s)}),Z(a,K(c)),u.disabled=K(f),d.disabled=e,Z(p,K(f)?``:``)},[()=>(K(f),K(l),q(()=>K(f)||!K(l).trim()))]),gi(u,()=>K(l),e=>V(l,e)),J(`keydown`,u,te),J(`click`,d,k),X(e,t)};Ur(L,e=>{n()||e(ue)});var de=U(L,2),fe=e=>{X(e,mu())};Ur(de,e=>{n()||e(fe)}),Ln(()=>Z(F,K(o)?`Close history`:`💬 History`)),J(`click`,N,C),J(`click`,P,D),X(e,j),Ke()}var _u=Y(`<canvas class="background-scene svelte-jrixkq"></canvas>`);function vu(e,t){Ge(t,!1);let n=B();Di(()=>{let e=Q.default.TAU,t={body:`#FFF1E6`,headBase:`#FFF5E8`,eye:`#FFFFFF`,pupil:`#111111`,comb:`#FF3B5C`,tail:`#F8D7C7`,leg:`#FAA353`,sky:`#FFB7D5`,skyLight:`#FFE1F0`,land:`#7ab535`,landLight:`#9fd95c`,darkGreen:`#3A5C18`,trunkBrown:`#8B6340`,cloudPink:`#FFE4F0`,cloudWhite:`#FFF7FB`,blossomPink:`#FFACD2`,appleRed:`#FF4B4B`,leafGreen:`#5DA020`,daisyWhite:`#FFFFFF`,daisyYellow:`#F9D342`,roseRed:`#F04A6F`,rosePink:`#FF8FAE`,lavPurple:`#C07EE0`,lavLight:`#E2B8F5`,sunflowerY:`#FFB800`,sunflowerC:`#7A3B10`,tulipPink:`#FF85A2`,tulipOrange:`#FF6B35`},r=new Q.default.Illustration({element:K(n),dragRotate:!1,resize:`window`}),i=new Q.default.Anchor({addTo:r});new Q.default.Shape({addTo:i,path:[{x:-3e3,y:-1500},{x:3e3,y:-1500},{x:3e3,y:180},{x:-3e3,y:180}],stroke:0,fill:!0,color:t.sky,translate:{z:-1500}}),new Q.default.Shape({addTo:i,path:[{x:-3e3,y:180},{x:3e3,y:180},{x:3e3,y:1600},{x:-3e3,y:1600}],stroke:0,fill:!0,color:t.skyLight,translate:{z:-1500}});function a(e,t,n,r,a=220){let o=[{x:e-t/2,y:520}];for(let n=0;n<=24;n++){let r=n/24;o.push({x:e-t/2+r*t,y:520-Math.sin(r*Math.PI)*a})}o.push({x:e+t/2,y:520}),new Q.default.Shape({addTo:i,path:o,stroke:0,fill:!0,color:n,translate:{z:r}})}a(-900,1600,t.darkGreen,-1200,260),a(800,1500,`#4A7020`,-1100,220),a(-300,1300,`#5A8A28`,-1e3,180),a(400,1e3,`#6BA330`,-900,140),new Q.default.Shape({addTo:i,path:[{x:-3e3,y:340},{x:3e3,y:340},{x:3e3,y:1800},{x:-3e3,y:1800}],stroke:0,fill:!0,color:t.land,translate:{z:-700}}),new Q.default.Shape({addTo:i,path:[{x:-3e3,y:340},{x:3e3,y:340},{x:3e3,y:400},{x:-3e3,y:400}],stroke:0,fill:!0,color:t.landLight,translate:{z:-690}}),[{x:-750,y:-400,z:-1100,s:2},{x:-200,y:-480,z:-1150,s:1.6},{x:650,y:-380,z:-1050,s:2.2},{x:250,y:-450,z:-1120,s:1.7},{x:950,y:-420,z:-1180,s:1.4}].forEach(e=>{let n=new Q.default.Anchor({addTo:i,translate:{x:e.x,y:e.y,z:e.z},scale:e.s});new Q.default.Shape({addTo:n,stroke:150,color:t.cloudPink}),new Q.default.Shape({addTo:n,stroke:115,color:t.cloudWhite,translate:{x:-90,y:15}}),new Q.default.Shape({addTo:n,stroke:125,color:t.cloudPink,translate:{x:90,y:8}}),new Q.default.Shape({addTo:n,stroke:95,color:t.cloudWhite,translate:{x:-150,y:22}}),new Q.default.Shape({addTo:n,stroke:85,color:t.cloudPink,translate:{x:160,y:18}})}),[{x:-750,y:210,z:-850,s:1.8,type:`apples`},{x:-500,y:240,z:-800,s:1.4,type:`blossoms`},{x:650,y:220,z:-860,s:1.9,type:`apples`},{x:850,y:260,z:-780,s:1.5,type:`blossoms`}].forEach(e=>{let n=new Q.default.Anchor({addTo:i,translate:{x:e.x,y:e.y,z:e.z},scale:e.s});new Q.default.Shape({addTo:n,path:[{y:0},{y:-120}],stroke:30,color:t.trunkBrown});let r=new Q.default.Anchor({addTo:n,translate:{y:-150}});new Q.default.Shape({addTo:r,stroke:200,color:`#5DA020`}),new Q.default.Shape({addTo:r,stroke:160,color:`#7CBF37`,translate:{x:-40,y:-40,z:15}}),new Q.default.Shape({addTo:r,stroke:140,color:`#4A8516`,translate:{x:45,y:25,z:-15}}),e.type===`apples`?(new Q.default.Shape({addTo:r,stroke:20,color:t.appleRed,translate:{x:-35,y:15,z:80}}),new Q.default.Shape({addTo:r,stroke:20,color:t.appleRed,translate:{x:50,y:-30,z:65}}),new Q.default.Shape({addTo:r,stroke:18,color:t.appleRed,translate:{x:8,y:50,z:70}})):(new Q.default.Shape({addTo:r,stroke:22,color:t.blossomPink,translate:{x:-50,y:-20,z:70}}),new Q.default.Shape({addTo:r,stroke:22,color:t.blossomPink,translate:{x:35,y:30,z:80}}),new Q.default.Shape({addTo:r,stroke:18,color:t.blossomPink,translate:{x:-8,y:-60,z:60}}))});function o(n,r,i,a,o,s,c,l,u){u||=t.daisyWhite;let d=new Q.default.Anchor({addTo:n,translate:{x:r,y:i+(120-s),z:a},scale:o});new Q.default.Shape({addTo:d,path:[{x:0,y:s,z:0},{x:0,y:0,z:0}],stroke:7,color:t.leafGreen});let f=new Q.default.Anchor({addTo:d,rotate:{x:c,y:l}});for(let t=0;t<13;t++){let n=new Q.default.Anchor({addTo:f,rotate:{z:e/13*t}});new Q.default.Ellipse({addTo:n,width:11,height:30,fill:!0,color:u,stroke:0,translate:{y:-18}})}new Q.default.Ellipse({addTo:f,diameter:15,fill:!0,stroke:4,color:t.daisyYellow,translate:{z:1.5}})}function s(n,r,i,a,o,s,c,l){let u=new Q.default.Anchor({addTo:n,translate:{x:r,y:i+(140-s),z:a},scale:o});new Q.default.Shape({addTo:u,path:[{x:0,y:s},{x:0,y:0}],stroke:7,color:t.leafGreen});let d=new Q.default.Anchor({addTo:u,rotate:{x:c,y:l}});for(let n=0;n<3;n++){let r=6+n*2,i=10+n*9;for(let a=0;a<r;a++){let o=e/r*a+n*.3,s=new Q.default.Anchor({addTo:d,translate:{x:Math.cos(o)*i,y:Math.sin(o)*i}});new Q.default.Ellipse({addTo:s,width:n===0?8:10+n*2,height:n===0?12:14+n*3,fill:!0,color:n===0?t.roseRed:t.rosePink,stroke:0,rotate:{z:o}})}}new Q.default.Ellipse({addTo:d,diameter:8,fill:!0,stroke:0,color:`#c0243a`,translate:{z:1}})}function c(e,n,r,i,a,o,s,c){let l=new Q.default.Anchor({addTo:e,translate:{x:n,y:r+(150-o),z:i},scale:a});new Q.default.Shape({addTo:l,path:[{x:0,y:o},{x:0,y:0}],stroke:6,color:t.leafGreen});let u=new Q.default.Anchor({addTo:l,rotate:{x:s,y:c}});for(let e=0;e<8;e++){let n=new Q.default.Anchor({addTo:u,translate:{x:0,y:-e*10},rotate:{z:e%2==0?.3:-.3}});new Q.default.Ellipse({addTo:n,width:9,height:14,fill:!0,color:e<3?t.lavPurple:t.lavLight,stroke:0,translate:{x:6}}),new Q.default.Ellipse({addTo:n,width:9,height:14,fill:!0,color:e<3?t.lavPurple:t.lavLight,stroke:0,translate:{x:-6}})}}function l(n,r,i,a,o,s,c,l){let u=new Q.default.Anchor({addTo:n,translate:{x:r,y:i+(160-s),z:a},scale:o});new Q.default.Shape({addTo:u,path:[{x:0,y:s},{x:0,y:0}],stroke:9,color:t.leafGreen});let d=new Q.default.Anchor({addTo:u,rotate:{x:c,y:l}});for(let n=0;n<18;n++){let r=new Q.default.Anchor({addTo:d,rotate:{z:e/18*n}});new Q.default.Ellipse({addTo:r,width:13,height:36,fill:!0,color:t.sunflowerY,stroke:0,translate:{y:-24}})}new Q.default.Ellipse({addTo:d,diameter:22,fill:!0,stroke:5,color:t.sunflowerC,translate:{z:2}})}function u(n,r,i,a,o,s,c,l,u){u||=t.tulipPink;let d=new Q.default.Anchor({addTo:n,translate:{x:r,y:i+(130-s),z:a},scale:o});new Q.default.Shape({addTo:d,path:[{x:0,y:s},{x:0,y:0}],stroke:8,color:t.leafGreen});let f=new Q.default.Anchor({addTo:d,rotate:{x:c,y:l}});for(let t=0;t<6;t++){let n=e/6*t;new Q.default.Ellipse({addTo:f,width:18,height:36,fill:!0,color:u,stroke:0,translate:{x:Math.cos(n)*10,z:Math.sin(n)*10},rotate:{y:n,x:-.3}})}}let d=new Q.default.Anchor({addTo:i,translate:{x:0,y:0,z:0}});l(d,-620,400,10,5.5,150,-e/4.5,.2),o(d,-480,390,40,5,130,-e/4,-.2,t.daisyWhite),u(d,-560,370,-30,6,110,-e/4,.4,t.tulipPink),s(d,-420,380,70,5,120,-e/4.2,-.3),c(d,-680,410,-10,5,160,-e/5,.3),u(d,480,375,-20,6,110,-e/4,-.3,t.tulipOrange),o(d,560,395,50,5,135,-e/4,.25,`#FFE4F0`),l(d,420,405,10,5.5,150,-e/4.5,-.15),s(d,650,385,-40,5,125,-e/4.2,.3),c(d,380,415,70,5,160,-e/5,-.25),r.updateRenderGraph()}),Ci();var r=_u();bi(r,e=>V(n,e),()=>K(n)),X(e,r),Ke()}var yu=Y(`<div class="top-bar svelte-1jej3y2"><button class="bar-btn svelte-1jej3y2">← Home</button></div>`),bu=Y(`<button class="radial-btn svelte-1jej3y2"><span class="radial-icon svelte-1jej3y2"> </span> <span class="radial-label svelte-1jej3y2"> </span></button>`),xu=Y(`<div class="radial-overlay svelte-1jej3y2"><!> <button class="radial-center svelte-1jej3y2">✕</button></div>`),Su=Y(`<div class="card-overlay svelte-1jej3y2"><div class="card svelte-1jej3y2"><div class="card-icon svelte-1jej3y2"> </div> <h2 class="svelte-1jej3y2"> </h2> <p class="card-desc svelte-1jej3y2"> </p> <p class="card-hint svelte-1jej3y2"> </p> <div class="card-actions svelte-1jej3y2"><button class="card-btn primary svelte-1jej3y2">Activate</button> <button class="card-btn ghost svelte-1jej3y2">Cancel</button></div></div></div>`),Cu=Y(`<!> <!> <canvas></canvas> <!> <!> <p class="hint svelte-1jej3y2">Tap the chicken to open interactions ✿</p>`,1);function wu(e,t){Ge(t,!1);let n=Ai(),r=B(),i=Ei(t,`embedded`,8,!1),a=B(!1),o=B(null),s=[{id:`smart`,icon:`🤓`,label:`Smart Mode`,title:`Switch on smart mode`,description:`The chicken puts on its glasses and checks its phone, looking very important.`,hint:`Tap again from this menu to switch it back off.`},{id:`peck`,icon:`🌾`,label:`Peck`,title:`Peck the ground`,description:`The chicken bobs down and pecks at the grass a few times, looking for seeds.`,hint:`A quick little snack break.`},{id:`strut`,icon:`💃`,label:`Strut`,title:`Do a little strut`,description:`The chicken struts side to side and kicks up its feet, showing off a bit.`,hint:`Pure chicken swagger.`},{id:`wave`,icon:`👋`,label:`Wave`,title:`Wave hello`,description:`The chicken lifts its wing and gives you a friendly wave.`,hint:`Feel free to wave back.`},{id:`ruffle`,icon:`🪶`,label:`Ruffle`,title:`Ruffle its feathers`,description:`Give the chicken a little startle and watch its feathers fluff right up.`,hint:`Dragging the chicken quickly does this too.`}],c,l,u,d,f;function p(){n(`back`)}function m(e){V(o,s.find(t=>t.id===e)),V(a,!1)}function h(){V(o,null)}function g(){K(o)&&(K(o).id===`smart`&&c?.(),K(o).id===`peck`&&l?.(),K(o).id===`strut`&&u?.(),K(o).id===`wave`&&d?.(),K(o).id===`ruffle`&&f?.(),V(o,null))}Di(()=>{if(!K(r))return;let e=Q.default.TAU,t={body:`#FFF1E6`,headBase:`#FFF5E8`,eye:`#FFFFFF`,pupil:`#111111`,comb:`#FF3B5C`,tail:`#F8D7C7`,leg:`#FAA353`,sky:`#FFB7D5`,skyLight:`#FFE1F0`,land:`#7ab535`,landLight:`#9fd95c`,darkGreen:`#3A5C18`,trunkBrown:`#8B6340`,cloudPink:`#FFE4F0`,cloudWhite:`#FFF7FB`,blossomPink:`#FFACD2`,appleRed:`#FF4B4B`,leafGreen:`#5DA020`,daisyWhite:`#FFFFFF`,daisyYellow:`#F9D342`,roseRed:`#F04A6F`,rosePink:`#FF8FAE`,lavPurple:`#C07EE0`,lavLight:`#E2B8F5`,sunflowerY:`#FFB800`,sunflowerC:`#7A3B10`,tulipPink:`#FF85A2`,tulipOrange:`#FF6B35`},n=new Q.default.Illustration({element:K(r),dragRotate:!1,resize:`window`}),s,p,m,h,g,_,v,y=new Q.default.Anchor({addTo:n,translate:{x:0,y:70,z:0},rotate:{x:-.05,y:0,z:0}});new Q.default.Shape({addTo:y,stroke:270,color:t.body,translate:{y:75}}),new Q.default.Cylinder({addTo:y,diameter:72,length:150,stroke:36,color:`#F6D8C8`,rotate:{x:e/4},translate:{y:-45,z:18}});let b=new Q.default.Anchor({addTo:y,translate:{y:-150,z:42}});new Q.default.Shape({addTo:b,stroke:135,color:t.headBase}),new Q.default.Cone({addTo:b,diameter:42,length:66,stroke:12,color:`#F4A63A`,translate:{y:30,z:72}}),new Q.default.Shape({addTo:b,path:[{y:0},{y:48}],stroke:30,color:t.comb,translate:{x:-18,y:42,z:48}}).copy({translate:{x:18,y:42,z:48}}),new Q.default.Shape({addTo:b,stroke:36,color:t.comb,path:[{x:-18,y:-66,z:6},{x:-30,y:-108,z:18},{x:-6,y:-84,z:2},{x:6,y:-126,z:-6},{x:24,y:-78,z:-12}]}),s=new Q.default.Anchor({addTo:b,translate:{x:-60,y:-12,z:42}}),new Q.default.Shape({addTo:s,stroke:84,color:t.eye,fill:!0}),m=new Q.default.Shape({addTo:s,stroke:30,color:t.pupil,fill:!0,translate:{x:-12,y:-12,z:36}}),p=new Q.default.Anchor({addTo:b,translate:{x:60,y:-6,z:36}}),new Q.default.Shape({addTo:p,stroke:72,color:t.eye,fill:!0}),h=new Q.default.Shape({addTo:p,stroke:27,color:t.pupil,fill:!0,translate:{x:9,y:6,z:30}});let x,S,C;g=new Q.default.Anchor({addTo:b,translate:{y:-6,z:84},scale:.001}),x=new Q.default.Ellipse({addTo:g,diameter:102,stroke:15,color:`#1A1A1A`,translate:{x:-54},visible:!1}),S=x.copy({translate:{x:54},visible:!1}),C=new Q.default.Shape({addTo:g,path:[{x:-20,y:0},{x:20,y:0}],stroke:13,color:`#1A1A1A`,visible:!1});let w=new Q.default.Anchor({addTo:y,translate:{x:-84,y:36,z:24},rotate:{z:.4}});new Q.default.Shape({addTo:w,path:[{x:-42,y:30,z:-30},{x:-42,y:45,z:-75}],stroke:90,color:`#FFF1E6`}),_=new Q.default.Anchor({addTo:y,translate:{x:84,y:36,z:24},rotate:{z:-.4}}),new Q.default.Shape({addTo:_,path:[{x:42,y:30,z:-30},{x:42,y:45,z:-75}],stroke:90,color:`#FFF1E6`}),v=new Q.default.Shape({addTo:_,path:[{x:42,y:45,z:-75},{x:42,y:-24,z:-96}],stroke:33,color:`#FFF1E6`,scale:.001});let T=[],E=new Q.default.Anchor({addTo:y,translate:{x:-54,y:36,z:-75}});new Q.default.Shape({addTo:E,stroke:36,color:t.tail,closed:!1,path:[{x:0,y:0,z:0},{bezier:[{x:-66,y:-66,z:-18},{x:-96,y:-144,z:-72},{x:-48,y:-192,z:-96}]}]}),T.push(E);for(let e=1;e<8;e++){let t=E.copyGraph({translate:{x:-54-e*9,y:36+e*6,z:-75-e*6},rotate:{y:e*.06,z:e*.04}});T.push(t)}let D=new Q.default.Shape({path:[{y:60},{y:120}],stroke:27,color:t.leg}),O=new Q.default.Anchor({addTo:y,translate:{x:-42,y:150,z:0}});D.copy({addTo:O});let ee=new Q.default.Anchor({addTo:O,translate:{y:120},rotate:{y:.3}});new Q.default.Shape({addTo:ee,path:[{x:0,z:0},{x:0,z:45}],stroke:27,color:t.leg}),new Q.default.Shape({addTo:ee,path:[{x:0,z:0},{x:-36,z:30}],stroke:27,color:t.leg}),new Q.default.Shape({addTo:ee,path:[{x:0,z:0},{x:36,z:30}],stroke:27,color:t.leg});let k=new Q.default.Anchor({addTo:y,translate:{x:42,y:150,z:0}});D.copy({addTo:k});let te=new Q.default.Anchor({addTo:k,translate:{y:120},rotate:{y:-.3}});new Q.default.Shape({addTo:te,path:[{x:0,z:0},{x:0,z:45}],stroke:27,color:t.leg}),new Q.default.Shape({addTo:te,path:[{x:0,z:0},{x:-36,z:30}],stroke:27,color:t.leg}),new Q.default.Shape({addTo:te,path:[{x:0,z:0},{x:36,z:30}],stroke:27,color:t.leg});let A=0,j=!0,M=!1,N=0,P=0;function F(){if(!j)return;A++;let e=A%340;if(e>320){let t=.5+.5*Math.cos((e-320)/20*Math.PI*2);s.scale.y=t,p.scale.y=t}else s.scale.y=1,p.scale.y=1;A%240==0&&(N=[-14,0,12][Math.floor(Math.random()*3)]),P+=(N-P)*.08,M||(m.translate.x=-12+P,h.translate.x=9+P),n.updateRenderGraph(),requestAnimationFrame(F)}F();function ne(){M=!M,M?(x.visible=!0,S.visible=!0,C.visible=!0,$.to(g.scale,{duration:.8,x:1,y:1,z:1,ease:`elastic.out(1, 0.75)`}),$.to(m.translate,{duration:.4,x:0,y:0,ease:`power2.out`}),$.to(h.translate,{duration:.4,x:0,y:0,ease:`power2.out`}),$.to(_.translate,{duration:.6,x:65,y:-76,z:64,ease:`power2.out`}),$.to(_.rotate,{duration:.6,x:.5,y:-.4,z:-1.9,ease:`power2.out`}),$.to(v.scale,{duration:.5,x:1,y:1,z:1,ease:`back.out(1.5)`})):($.to(g.scale,{duration:.4,x:.001,y:.001,z:.001,ease:`power2.in`}),$.to(_.translate,{duration:.4,x:84,y:36,z:24,ease:`power2.inOut`}),x.visible=!1,S.visible=!1,C.visible=!1,$.to(_.rotate,{duration:.4,x:0,y:0,z:-.4,ease:`power2.inOut`}),$.to(v.scale,{duration:.4,x:.001,y:.001,z:.001,ease:`power2.in`}))}let I=!1;function re(){if(I)return;I=!0;let e=$.timeline({onComplete:()=>{I=!1}});for(let t=0;t<3;t++)e.to(b.translate,{duration:.12,y:-92,ease:`power2.out`}),e.to(b.rotate,{duration:.12,x:.32,ease:`power2.out`},`<`),e.to(b.translate,{duration:.16,y:-150,ease:`power2.in`}),e.to(b.rotate,{duration:.16,x:0,ease:`power2.in`},`<`)}let ie=!1;function ae(){if(ie)return;ie=!0;let e=$.timeline({onComplete:()=>{ie=!1,y.rotate.z=0,y.translate.y=70,O.rotate.z=0,k.rotate.z=0}});for(let t=0;t<4;t++){let n=t%2==0?1:-1;e.to(y.rotate,{duration:.18,z:n*.07,ease:`sine.inOut`}),e.to(y.translate,{duration:.18,y:58,ease:`sine.out`},`<`),e.to(O.rotate,{duration:.18,z:n*.18,ease:`sine.inOut`},`<`),e.to(k.rotate,{duration:.18,z:-n*.18,ease:`sine.inOut`},`<`),e.to(y.translate,{duration:.18,y:70,ease:`sine.in`})}}let oe=!1;function se(){if(oe)return;oe=!0;let e=$.timeline({onComplete:()=>{oe=!1}});e.to(w.rotate,{duration:.3,z:-1.1,ease:`back.out(1.4)`}),e.to(w.translate,{duration:.3,y:-30,ease:`back.out(1.4)`},`<`);for(let t=0;t<3;t++)e.to(w.rotate,{duration:.18,z:-1.35,ease:`sine.inOut`}),e.to(w.rotate,{duration:.18,z:-.9,ease:`sine.inOut`});e.to(w.rotate,{duration:.3,z:.4,ease:`power2.inOut`}),e.to(w.translate,{duration:.3,y:36,ease:`power2.inOut`},`<`)}let ce=!1;function le(){if(ce)return;ce=!0;let e=$.timeline({onComplete:()=>{ce=!1,y.rotate.z=0,T.forEach(e=>{e.scale.x=1,e.scale.y=1,e.scale.z=1}),s.scale.x=1,p.scale.x=1}});e.to([s.scale,p.scale],{duration:.1,x:1.25,ease:`power2.out`},0);for(let t=0;t<5;t++){let n=t%2==0?1:-1;e.to(y.rotate,{duration:.06,z:n*.045,ease:`sine.inOut`})}e.to(y.rotate,{duration:.08,z:0,ease:`sine.out`}),T.forEach((t,n)=>{e.to(t.scale,{duration:.15,x:1.2,y:1.2,z:1.2,ease:`back.out(2)`},n*.02),e.to(t.scale,{duration:.3,x:1,y:1,z:1,ease:`power2.inOut`},.35+n*.02)}),e.to([s.scale,p.scale],{duration:.25,x:1,ease:`power2.inOut`},.3)}c=ne,l=re,u=ae,d=se,f=le;let L=!1,ue=0,de=0,fe=!1;function pe(e){L=!0,fe=!1,ue=e.clientX,de=e.clientY;try{K(r).setPointerCapture(e.pointerId)}catch{}}function me(e){if(!L)return;let t=e.clientX-ue,r=e.clientY-de;ue=e.clientX,de=e.clientY;let i=Math.hypot(t,r);i>8&&(fe=!0),i>22&&le(),y.rotate.y+=t*.005,n.updateRenderGraph()}function he(e){L=!1;try{K(r).releasePointerCapture(e.pointerId)}catch{}}function ge(e){if(fe)return;let t=K(r).getBoundingClientRect(),n=e.clientX-t.left-t.width/2,i=e.clientY-t.top-t.height/2;Math.hypot(n-y.translate.x,i-y.translate.y)<450?(V(a,!K(a)),V(o,null)):V(a,!1)}return i()||(K(r).addEventListener(`pointerdown`,pe),K(r).addEventListener(`pointermove`,me),window.addEventListener(`pointerup`,he),K(r).addEventListener(`click`,ge)),()=>{j=!1,i()||(K(r)?.removeEventListener(`pointerdown`,pe),K(r)?.removeEventListener(`pointermove`,me),window.removeEventListener(`pointerup`,he),K(r)?.removeEventListener(`click`,ge))}}),Ci();var _=Cu(),v=fn(_),y=e=>{var t=yu(),n=H(t);R(t),J(`click`,n,p),X(e,t)};Ur(v,e=>{i()||e(y)});var b=U(v,2),x=e=>{vu(e,{})};Ur(b,e=>{i()||e(x)});var S=U(b,2);let C;bi(S,e=>V(r,e),()=>K(r));var w=U(S,2),T=e=>{var t=xu(),n=H(t);Jr(n,1,()=>s,Wr,(e,t,n)=>{let r=yt(()=>q(()=>n/s.length*360-90)),i=yt(()=>(wr(K(r)),q(()=>K(r)*(Math.PI/180)))),a=yt(()=>120);var o=bu(),c=H(o),l=H(c,!0);R(c);var u=U(c,2),d=H(u,!0);R(u),R(o),Ln((e,r)=>{si(o,`
left: calc(50% + ${e??``}px - 38px);
top: calc(58% + ${r??``}px - 38px);
animation-delay: ${n*55}ms;
`),Z(l,(K(t),q(()=>K(t).icon))),Z(d,(K(t),q(()=>K(t).label)))},[()=>(wr(K(i)),wr(K(a)),q(()=>Math.cos(K(i))*K(a))),()=>(wr(K(i)),wr(K(a)),q(()=>Math.sin(K(i))*K(a)))]),J(`click`,o,()=>m(K(t).id)),X(e,o)});var r=U(n,2);R(t),J(`click`,r,()=>{V(a,!1)}),X(e,t)};Ur(w,e=>{!i()&&K(a)&&e(T)});var E=U(w,2),D=e=>{var t=Su(),n=H(t),r=H(n),i=H(r,!0);R(r);var a=U(r,2),s=H(a,!0);R(a);var c=U(a,2),l=H(c,!0);R(c);var u=U(c,2),d=H(u);R(u);var f=U(u,2),p=H(f),m=U(p,2);R(f),R(n),R(t),Ln(()=>{Z(i,(K(o),q(()=>K(o).icon))),Z(s,(K(o),q(()=>K(o).title))),Z(l,(K(o),q(()=>K(o).description))),Z(d,`${(K(o),q(()=>K(o).hint))??``}`)}),J(`click`,p,g),J(`click`,m,h),J(`click`,t,xi(()=>V(o,null))),X(e,t)};Ur(E,e=>{K(o)&&e(D)}),Pe(2),Ln(()=>C=ai(S,1,`scene svelte-1jej3y2`,null,C,{embedded:i()})),X(e,_),Ke()}var Tu=Y(`<button class="history-log-btn svelte-7yu1xi" aria-label="Toggle Log History">📜</button>`),Eu=Y(`<button class="radial-item-node svelte-7yu1xi"><span class="node-icon svelte-7yu1xi"> </span> <span class="node-label svelte-7yu1xi"> </span></button>`),Du=Y(`<div class="radial-menu-context svelte-7yu1xi"></div>`),Ou=Y(`<div class="modal-card-backdrop svelte-7yu1xi"><div class="modal-card-body svelte-7yu1xi"><h3 class="svelte-7yu1xi"> </h3> <p class="modal-desc svelte-7yu1xi"> </p> <p class="modal-hint svelte-7yu1xi"> </p> <div class="modal-action-row svelte-7yu1xi"><button class="btn-cancel svelte-7yu1xi">Back</button> <button class="btn-confirm svelte-7yu1xi">Execute</button></div></div></div>`),ku=Y(`<div><span class="speaker-tag svelte-7yu1xi"> </span> <p class="log-content-text svelte-7yu1xi"> </p></div>`),Au=Y(`<div class="history-panel-overlay svelte-7yu1xi"><div class="history-header svelte-7yu1xi"><h3 class="svelte-7yu1xi">Sub-surface Communication Logs</h3> <button class="btn-close-log svelte-7yu1xi">✕</button></div> <div class="history-scroll-box svelte-7yu1xi"></div></div>`),ju=Y(`<div class="initial-action-container svelte-7yu1xi"><button class="btn-reveal-reply svelte-7yu1xi">Reply</button></div>`),Mu=Y(`<div class="chat-input-wrapper svelte-7yu1xi"><input type="text" placeholder="Send a ripple back..." class="svelte-7yu1xi"/> <button class="svelte-7yu1xi">→</button></div>`),Nu=Y(`<div class="thought-bubble-container direct-fish-chat svelte-7yu1xi"><div class="bubble-tail svelte-7yu1xi"></div> <div class="bubble-wrapper svelte-7yu1xi"><p class="bubble-text svelte-7yu1xi"> </p> <!></div></div>`),Pu=Y(`<div class="scene-wrapper svelte-7yu1xi"><button class="gauge-button svelte-7yu1xi" aria-label="Toggle Sea Depth"><canvas width="150" height="150" class="ui-canvas svelte-7yu1xi"></canvas></button> <canvas></canvas> <canvas class="overlay-canvas svelte-7yu1xi"></canvas> <!> <!> <!> <!> <!> <p class="hint svelte-7yu1xi"> </p></div>`);function Fu(e,t){Ge(t,!1);let n=B(),r=B(),i=B(),a=B(),o=B(),s=Ei(t,`embedded`,8,!1),c=B(!1),l=!1,u=B(`Click the fish for actions • Click the gauge to dive`),d={pinkAlpha:1,darkAlpha:0},f={value:0},p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,ee=[],k=[],te=B({x:0,y:0}),A=B({x:0,y:0}),j=B(!1),M=B(null),N=B(!1),P=B(!1),F=B(!1),ne=B(``),I=B(``),re=null,ie=null,ae=B(!1),oe=[{id:`float`,icon:`🔄`,label:`Float Around`,title:`Orbit Swimming`,description:`Command the blobfish to drift passively in a large horizontal tracking orbit.`,hint:`The fish will drift in a smooth, sweeping horizontal circle.`,angle:-90},{id:`jump`,icon:`🐬`,label:`Jump`,title:`Breaching Leap`,description:`Watch the fish break dynamics to launch an airborne trajectory arc.`,hint:`Jumps directly if shallow. If deep, it surfaces rapidly before launching.`,angle:30},{id:`chat`,icon:`💬`,label:`Chat`,title:`Consult the Blobfish`,description:`Uncover deep sub-surface wisdom regarding atmospheric pressure and inner structural integrity.`,hint:`Reply to the active bubble thoughts below.`,angle:150}],se=B([{role:`assistant`,content:`Mmmh... Hello down there. Let us talk about surviving the heavy pressures of life, or simply floating along.`}]),ce=[`The pressure changes up here... they alter how everyone looks at you.`,`Down in the dark, you never need to worry about structural integrity.`,`Floating takes absolutely no effort at all. There is a great wisdom in that.`,`Heavy weights are easier to bear when you are built exactly for the depth you inhabit.`,`Are you running around today, or are you letting the currents carry you?`,`Sometimes, looking a bit deflated just means you are away from home.`],le=[{xPct:.08,baseWidth:22,height:320,speed:.024,delay:0},{xPct:.11,baseWidth:35,height:460,speed:.018,delay:.8},{xPct:.14,baseWidth:26,height:380,speed:.022,delay:.4},{xPct:.17,baseWidth:40,height:490,speed:.015,delay:1.2},{xPct:.21,baseWidth:28,height:340,speed:.026,delay:.2},{xPct:.25,baseWidth:32,height:410,speed:.02,delay:.9},{xPct:.72,baseWidth:30,height:390,speed:.021,delay:1.5},{xPct:.76,baseWidth:42,height:510,speed:.016,delay:.3},{xPct:.8,baseWidth:24,height:350,speed:.025,delay:1},{xPct:.84,baseWidth:38,height:470,speed:.019,delay:.6},{xPct:.88,baseWidth:28,height:420,speed:.023,delay:1.4},{xPct:.93,baseWidth:20,height:310,speed:.028,delay:.1}],L={blobSkin:`#F4B8C2`,blobNose:`#F3AEBB`,blobFin:`#C97A8D`,blobMouth:`#6B3A45`,blobTailBody:`#D88A9D`,blobDeepSea:`#6C8EA4`,blobDeepSeaDark:`#4A6578`,blobMouthDeep:`#334856`,blobEyeDeep:`#94b3c7`,blobPupilDeep:`#1d2a33`,waterTransition:`#1C2541`,seaweedDark:`26, 54, 39`,seaweedLight:`53, 94, 59`};function ue(e,t){V(j,!K(j)),K(j)&&(V(te,{x:e,y:t}),V(M,null),V(N,!1))}function de(e){V(M,oe.find(t=>t.id===e)),V(j,!1)}function fe(){V(M,null)}function pe(){if(K(M)){if(K(M).id===`float`&&Te(),K(M).id===`jump`&&Ee(),K(M).id===`chat`){V(M,null),_e();return}V(M,null)}}function me(){V(N,!K(N)),K(N)&&(V(j,!1),V(M,null))}function he(){if(!K(r)||!h)return;let e=K(r).getBoundingClientRect(),t=e.left+e.width/2,n=e.top+e.height/2;V(A,{x:t+h.translate.x,y:n+h.translate.y})}function ge(e,t=!1){ie&&clearTimeout(ie),V(ne,e),V(P,!0),V(F,!1),he(),!t&&!K(F)&&(ie=setTimeout(()=>{V(P,!1)},12e3)),console.log(`showing bubble`,K(P))}function _e(){ie&&clearTimeout(ie),V(F,!0),he()}function ve(){re&&clearTimeout(re),re=setTimeout(()=>{if(!K(P)&&!K(F)&&!K(ae)){let e=ce[Math.floor(Math.random()*ce.length)];ge(e)}ve()},18e3+Math.random()*1e4),console.log(`scheduled thought fired`)}async function ye(){let e=K(I).trim();!e||K(ae)||(V(I,``),V(F,!1),V(P,!1),await xe(e))}function be(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),ye())}async function xe(e){if(!K(ae)){V(ae,!0),ge(``,!0),De(),V(se,[...K(se),{role:`user`,content:e}]);try{let e={model:`gpt-4o-mini`,messages:[{role:`system`,content:K(n)},...K(se)],max_tokens:256,temperature:.85},t=await fetch(`https://api.openai.com/v1/chat/completions`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer undefined`},body:JSON.stringify(e)});if(!t.ok)throw Error(`API error code: ${t.status}`);let r=(await t.json())?.choices?.[0]?.message?.content;if(r){let e=r.trim();V(se,[...K(se),{role:`assistant`,content:e}]),ge(e,!0)}else ge(`The currents are scrambled... I lost my thread of thought.`,!0)}catch(e){console.error(e),V(se,K(se).slice(0,-1)),ge(`Too much static in the water right now. Ask me again shortly...`,!0)}finally{V(ae,!1)}}}let Se=!1,Ce=1,we=1;function Te(){if(Se)return;Se=!0,we=2;let e=$.timeline({onComplete:()=>{Se=!1,we=1,h.translate.x=0,h.translate.z=0,h.rotate.y=-.12}});e.to(h.rotate,{duration:3.5,y:`-=${Q.default.TAU}`,ease:`none`}),e.to(h.translate,{duration:1.75,x:-160,z:-100,ease:`sine.inOut`,yoyo:!0,repeat:1},0)}function Ee(){if(Se)return;Se=!0,Ce=3.5;let e=$.timeline({onComplete:()=>{Se=!1,Ce=1,h.translate.y=0,h.translate.z=0,h.rotate.x=0}});K(c)?(e.to(h.translate,{duration:1.2,y:-260,z:40,ease:`power2.out`}),e.to(h.rotate,{duration:.8,x:-.4},0),e.to(h.translate,{duration:.5,y:-500,z:120,ease:`power1.out`},`+=0.1`),e.to(h.rotate,{duration:1,x:`+=${Q.default.TAU}`,ease:`power1.inOut`},`-=0.2`),e.to(h.translate,{duration:.6,y:0,z:0,ease:`power2.in`})):(e.to(h.translate,{duration:.5,y:-240,z:80,ease:`power1.out`}),e.to(h.rotate,{duration:.9,x:`+=${Q.default.TAU}`,ease:`power1.inOut`},0),e.to(h.translate,{duration:.5,y:0,z:0,ease:`power1.in`},`-=0.4`))}function De(){let e=$.timeline();e.to([v.rotate,b.rotate],{duration:.3,y:.4,ease:`sine.inOut`,repeat:3,yoyo:!0}),e.to([y.rotate,x.rotate],{duration:.3,y:-.4,ease:`sine.inOut`,repeat:3,yoyo:!0},0)}function Oe(e){return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function ke(e){let t=[];function n(e){if(e.color&&typeof e.color==`string`&&e.color.startsWith(`#`)){let{r:n,g:r,b:i}=Oe(e.color);t.push({node:e,r:n,g:r,b:i})}e.children&&e.children.forEach(n)}return n(e),t}let Ae=!1,je=0,Me=0,Ne=!1,Pe=.008;function Fe(e){Ae=!0,Ne=!1,je=e.clientX,Me=e.clientY;try{K(r).setPointerCapture(e.pointerId)}catch{}}function Ie(e){if(!Ae)return;let t=e.clientX-je,n=e.clientY-Me;je=e.clientX,Me=e.clientY,Math.hypot(t,n)>8&&(Ne=!0),h.rotate.y+=t*Pe,h.rotate.x+=n*Pe,h.rotate.x=Math.max(-Q.default.TAU/8,Math.min(Q.default.TAU/8,h.rotate.x))}function Le(){Ae=!1}function Re(e){if(Ne)return;let t=K(r).getBoundingClientRect(),n=e.clientX-t.left-t.width/2,i=e.clientY-t.top-t.height/2;Math.hypot(n,i)<145&&ue(K(A).x,K(A).y)}Di(()=>{K(o).style.setProperty(`--sky-pos`,`45%`),K(o).style.setProperty(`--mid-pos`,`75%`),K(o).style.setProperty(`--abyss-pos`,`100%`);let e=K(a).getContext(`2d`);function t(){Zt(a,K(a).width=window.innerWidth),Zt(a,K(a).height=window.innerHeight),he()}t(),window.addEventListener(`resize`,t),p=new Q.default.Illustration({element:K(r),dragRotate:!1,resize:`window`,rotate:{x:-.2,y:-.12}}),h=new Q.default.Anchor({addTo:p}),g=new Q.default.Anchor({addTo:h,scale:2}),new Q.default.Shape({addTo:g,stroke:260,color:L.blobSkin}),new Q.default.Shape({addTo:g,stroke:180,color:L.blobSkin,translate:{y:-40,z:6}}),new Q.default.Shape({addTo:g,stroke:100,color:L.blobNose,translate:{y:14,z:62}}),new Q.default.Shape({addTo:g,stroke:120,color:L.blobSkin,translate:{x:-38,y:24,z:18}}),new Q.default.Shape({addTo:g,stroke:120,color:L.blobSkin,translate:{x:38,y:24,z:18}}),w=new Q.default.Anchor({addTo:g,translate:{x:-18,y:-14,z:52}}),new Q.default.Shape({addTo:w,stroke:30,color:`#FFFFFF`}),new Q.default.Shape({addTo:w,stroke:12,color:`#111111`,translate:{z:6}}),T=new Q.default.Anchor({addTo:g,translate:{x:18,y:-14,z:52}}),new Q.default.Shape({addTo:T,stroke:30,color:`#FFFFFF`}),new Q.default.Shape({addTo:T,stroke:12,color:`#111111`,translate:{z:6}}),new Q.default.Shape({addTo:g,stroke:14,color:L.blobMouth,closed:!1,path:[{x:-28,y:40,z:44},{bezier:[{x:-12,y:28,z:54},{x:12,y:28,z:54},{x:28,y:40,z:44}]}]});let n=[{x:0,y:0},{x:-30,y:-10},{x:-50,y:15},{x:-40,y:35},{x:-10,y:25}];v=new Q.default.Anchor({addTo:g});let s=new Q.default.Anchor({addTo:v,translate:{x:-52,y:22,z:-8}});new Q.default.Shape({addTo:s,path:n,stroke:24,color:L.blobFin,fill:!0}),y=new Q.default.Anchor({addTo:g});let c=new Q.default.Anchor({addTo:y,translate:{x:52,y:22,z:-8}});new Q.default.Shape({addTo:c,path:n,scale:{x:-1},stroke:24,color:L.blobFin,fill:!0});let l=new Q.default.Anchor({addTo:g,translate:{y:10,z:-68}});new Q.default.Shape({addTo:l,stroke:52,color:L.blobTailBody}),C=new Q.default.Anchor({addTo:l,translate:{z:-14}}),new Q.default.Shape({addTo:C,stroke:32,color:L.blobFin,closed:!1,path:[{y:0,z:0},{bezier:[{x:-6,y:-8,z:-4},{x:-12,y:-12,z:-8},{x:0,y:-18,z:-14}]}]}),_=new Q.default.Anchor({addTo:h,scale:3}),new Q.default.Shape({addTo:_,stroke:240,color:L.blobDeepSea}),new Q.default.Shape({addTo:_,stroke:190,color:L.blobDeepSea,translate:{z:-30}}),new Q.default.Shape({addTo:_,stroke:120,color:L.blobDeepSea,translate:{x:-28,y:14,z:12}}),new Q.default.Shape({addTo:_,stroke:120,color:L.blobDeepSea,translate:{x:28,y:14,z:12}}),E=new Q.default.Anchor({addTo:_,translate:{x:-22,y:-12,z:25}}),new Q.default.Shape({addTo:E,stroke:32,color:L.blobEyeDeep}),new Q.default.Shape({addTo:E,stroke:14,color:L.blobPupilDeep,translate:{z:6}}),D=new Q.default.Anchor({addTo:_,translate:{x:22,y:-12,z:25}}),new Q.default.Shape({addTo:D,stroke:32,color:L.blobEyeDeep}),new Q.default.Shape({addTo:D,stroke:14,color:L.blobPupilDeep,translate:{z:6}}),new Q.default.Shape({addTo:_,stroke:11,color:L.blobMouthDeep,closed:!1,path:[{x:-18,y:10,z:25},{x:0,y:14,z:27},{x:18,y:10,z:25}]}),b=new Q.default.Anchor({addTo:_});let u=new Q.default.Anchor({addTo:b,translate:{x:-48,y:22,z:-8}});new Q.default.Shape({addTo:u,path:n,scale:{x:.666,y:.666,z:.666},stroke:16,color:L.blobDeepSeaDark,fill:!0}),x=new Q.default.Anchor({addTo:_});let te=new Q.default.Anchor({addTo:x,translate:{x:48,y:22,z:-8}});new Q.default.Shape({addTo:te,path:n,scale:{x:-.666,y:.666,z:.666},stroke:16,color:L.blobDeepSeaDark,fill:!0});let A=new Q.default.Anchor({addTo:_,translate:{y:-4,z:-72}});new Q.default.Shape({addTo:A,stroke:60,color:L.blobDeepSea}),S=new Q.default.Anchor({addTo:A,translate:{z:-14}}),new Q.default.Shape({addTo:S,stroke:80,color:L.blobDeepSeaDark,closed:!1,path:[{y:0,z:0},{bezier:[{x:-6,y:-8,z:-5},{x:-14,y:-14,z:-9},{x:0,y:-22,z:-14}]}]}),ee=ke(g),k=ke(_),m=new Q.default.Illustration({element:K(i),dragRotate:!1,resize:!1});let j=new Q.default.Anchor({addTo:m,translate:{x:0,y:0}});new Q.default.Cylinder({addTo:j,diameter:82,length:16,stroke:!1,color:`#7f8c8d`,backface:`#34495e`}),new Q.default.Cylinder({addTo:j,diameter:70,length:2,stroke:!1,color:`#FFFFFF`,translate:{z:8}});for(let e=0;e<6;e++){let t=e/5*Math.PI-Math.PI;new Q.default.Shape({addTo:j,path:[{y:-26},{y:-32}],stroke:3,color:`#e74c3c`,rotate:{z:t},translate:{z:9.5}})}O=new Q.default.Anchor({addTo:j,translate:{z:11},rotate:{z:-Math.PI*.75}}),new Q.default.Shape({addTo:O,path:[{y:6},{y:-30}],stroke:4,color:`#2c3e50`}),new Q.default.Shape({addTo:O,stroke:12,color:`#e74c3c`}),m.updateRenderGraph(),ve();let M=0,N=!0;function P(){if(d.darkAlpha<.01)return;let t=K(a).width,n=K(a).height;le.forEach((r,i)=>{let a=t*r.xPct,o=r.height*d.darkAlpha,s=i%2==0?L.seaweedDark:L.seaweedLight;e.save(),e.beginPath(),e.fillStyle=`rgba(${s}, ${.65*d.darkAlpha})`;let c=[],l=[];for(let e=0;e<=7;e++){let t=e/7,i=n+30-o*t,s=a+Math.sin(M*r.speed+t*Math.PI*1.2+r.delay)*(25*t),u=r.baseWidth*(1-t);c.push({x:s-u/2,y:i}),l.unshift({x:s+u/2,y:i})}e.moveTo(c[0].x,c[0].y),c.forEach(t=>e.lineTo(t.x,t.y)),l.forEach(t=>e.lineTo(t.x,t.y)),e.closePath(),e.fill(),e.restore()})}function F(){e.clearRect(0,0,K(a).width,K(a).height),P();let t=f.value;if(t<=0||t>=1)return;let n=K(a).width,r=K(a).height;e.fillStyle=L.waterTransition;let i=Math.max(n,r)*.4;for(let a=0;a<3;a++){let o=$.utils.mapRange(a*.1,1-(2-a)*.1,0,1,t);o=$.utils.clamp(0,1,o),e.save();let s=-i+(n+i*2)*o;e.translate(s,r/2),e.rotate(-Math.PI/6),e.fillRect(-i/2,-r*1.5,i,r*3),e.restore()}}function ne(){if(!N)return;M++,Se||(h.translate.y=Math.sin(M*.035)*14,h.rotate.z=Math.cos(M*.025)*.04),he(),ee.forEach(({node:e,r:t,g:n,b:r})=>{e.color=`rgba(${t},${n},${r},${d.pinkAlpha})`}),k.forEach(({node:e,r:t,g:n,b:r})=>{e.color=`rgba(${t},${n},${r},${d.darkAlpha})`}),g.visible=d.pinkAlpha>.01,_.visible=d.darkAlpha>.01,v.rotate.z=Math.sin(M/(22/Ce))*.14,y.rotate.z=-Math.sin(M/(22/Ce))*.14,b.rotate.z=Math.sin(M/(26/Ce))*.11,x.rotate.z=-Math.sin(M/(26/Ce))*.11,C&&(C.rotate.y=Math.sin(.07*we*M)*.18),S&&(S.rotate.y=Math.sin(.06*we*M)*.16);let e=M%280,t=1;e>262&&(t=.5+.5*Math.cos((e-262)/18*Math.PI*2)),w.scale.y=t,T.scale.y=t,E.scale.y=t,D.scale.y=t,p.updateRenderGraph(),m.updateRenderGraph(),F(),requestAnimationFrame(ne)}return ne(),()=>{N=!1,re&&clearTimeout(re),ie&&clearTimeout(ie),window.removeEventListener(`resize`,t)}});function ze(){if(l)return;l=!0,V(c,!K(c));let e=$.timeline({onComplete:()=>{l=!1,V(u,K(c)?`Click the gauge to surface`:`Click the gauge to dive`)}});e.to(K(o),{duration:2.5,"--sky-pos":K(c)?`-120%`:`45%`,"--mid-pos":K(c)?`-40%`:`75%`,"--abyss-pos":K(c)?`0%`:`100%`,ease:`power2.inOut`},0),e.to(O.rotate,{duration:2.5,z:K(c)?Math.PI*.75:-Math.PI*.75,ease:`back.out(1.2)`},0),f.value=0,e.to(f,{duration:1.4,value:1,ease:`power1.inOut`},.55),e.to({},{duration:0},1.25),e.call(()=>{K(c)?(d.pinkAlpha=0,d.darkAlpha=1):(d.pinkAlpha=1,d.darkAlpha=0)},null,1.25)}Nn(()=>K(c),()=>{V(n,`You are a wise, slightly melancholic but highly perceptive Blobfish navigating the ocean.
Your tone is gentle, slow, warm, and rich with aquatic or pressure metaphors. Keep responses short (2-4 sentences max).
Current Depth State: ${K(c)?`DEEP SEA RESIDENT (Blue)`:`SURFACE / SHALLOW EXPELLED (Pink)`}.
- When Pink/Shallow: You are soft, highly gelatinous, feeling slightly structurally out-of-place and vulnerable. You discuss dealing with unfair visual judgments, feeling deflated under atmospheric changes, and learning to float when things get exhausting.
- When Blue/Deep: You are in your element—handsome, perfectly supported by the intense pressures around you, sleek and powerful. You discuss structural integrity, finding comfort in dark or heavy places, and thriving where others cannot breathe.
Do not break character. Do not lecture. Remain whimsical, comforting, and deeply grounded.`)}),Pn(),Ci();var Be=Pu(),Ve=H(Be);bi(H(Ve),e=>V(i,e),()=>K(i)),R(Ve);var He=U(Ve,2);let Ue;bi(He,e=>V(r,e),()=>K(r));var We=U(He,2);bi(We,e=>V(a,e),()=>K(a));var qe=U(We,2),Je=e=>{var t=Tu();J(`click`,t,me),X(e,t)};Ur(qe,e=>{s()||e(Je)});var Ye=U(qe,2),Xe=e=>{var t=Du();Jr(t,5,()=>oe,Wr,(e,t)=>{var n=Eu(),r=H(n),i=H(r,!0);R(r);var a=U(r,2),o=H(a,!0);R(a),R(n),Ln(()=>{si(n,`--angle: ${(K(t),q(()=>K(t).angle))??``}deg; --radius: 140px;`),Z(i,(K(t),q(()=>K(t).icon))),Z(o,(K(t),q(()=>K(t).label)))}),J(`click`,n,()=>de(K(t).id)),X(e,n)}),R(t),Ln(()=>si(t,`left: ${(K(te),q(()=>K(te).x))??``}px; top: ${(K(te),q(()=>K(te).y))??``}px;`)),X(e,t)};Ur(Ye,e=>{!s()&&K(j)&&e(Xe)});var Ze=U(Ye,2),Qe=e=>{var n=Ou(),r=H(n),i=H(r),a=H(i,!0);R(i);var o=U(i,2),s=H(o,!0);R(o);var c=U(o,2),l=H(c);R(c);var u=U(c,2),d=H(u),f=U(d,2);R(u),R(r),R(n),Ln(()=>{Z(a,(K(M),q(()=>K(M).title))),Z(s,(K(M),q(()=>K(M).description))),Z(l,`💡 ${(K(M),q(()=>K(M).hint))??``}`)}),J(`click`,d,fe),J(`click`,f,pe),J(`click`,r,Si(function(e){Ti.call(this,t,e)})),J(`click`,n,fe),X(e,n)};Ur(Ze,e=>{K(M)&&e(Qe)});var $e=U(Ze,2),et=e=>{var t=Au(),n=H(t),r=U(H(n),2);R(n);var i=U(n,2);Jr(i,5,()=>K(se),Wr,(e,t)=>{var n=ku(),r=H(n),i=H(r);R(r);var a=U(r,2),o=H(a,!0);R(a),R(n),Ln(()=>{ai(n,1,`history-row ${(K(t),q(()=>K(t).role))??``}`,`svelte-7yu1xi`),Z(i,`${(K(t),q(()=>K(t).role===`assistant`?`🐟 Fish`:`👤 You`))??``}:`),Z(o,(K(t),q(()=>K(t).content)))}),X(e,n)}),R(i),R(t),J(`click`,r,me),X(e,t)};Ur($e,e=>{K(N)&&e(et)});var tt=U($e,2),nt=e=>{var t=Nu(),n=U(H(t),2),r=H(n),i=H(r,!0);R(r);var a=U(r,2),o=e=>{var t=ju(),n=H(t);R(t),J(`click`,n,_e),X(e,t)},s=e=>{var t=Mu(),n=H(t);di(n),_n(n,!0);var r=U(n,2);R(t),Ln(()=>{n.disabled=K(ae),r.disabled=K(ae)}),gi(n,()=>K(I),e=>V(I,e)),J(`keydown`,n,be),J(`click`,r,ye),X(e,t)};Ur(a,e=>{!K(F)&&!K(ae)?e(o):e(s,-1)}),R(n),R(t),Ln(()=>{si(t,(K(A),q(()=>`left:${K(A).x+130}px; top:${K(A).y-45}px;`))),Z(i,K(ne))}),X(e,t)};Ur(tt,e=>{K(P)&&e(nt)});var rt=U(tt,2),it=H(rt,!0);R(rt),R(Be),bi(Be,e=>V(o,e),()=>K(o)),Ln(()=>{Ue=ai(He,1,`zdog-canvas svelte-7yu1xi`,null,Ue,{embedded:s()}),Z(it,K(u))}),J(`click`,Ve,ze),J(`pointerdown`,He,Fe),J(`pointermove`,He,Ie),J(`pointerup`,He,Le),J(`click`,He,Re),X(e,Be),Ke()}var Iu=Y(`<canvas class="background-scene svelte-19zm2i3"></canvas>`);function Lu(e,t){Ge(t,!1);let n=B();Di(()=>{let e=Q.default.TAU,t={fur:`#8B6F4E`,furDark:`#6B5238`,furLight:`#B89B72`,faceCream:`#D8C29A`,mask:`#5A4632`,nose:`#3D2A1A`,eye:`#2A1C12`,cheek:`#E59A86`,claw:`#4A3826`,moss:`#7E8B5A`,branch:`#6B4A2A`,branchDk:`#4E3318`,leafGreen:`#5DA052`,leafDark:`#3A6A28`,leafLight:`#7FC04A`,canopy1:`#A7D88C`,canopy2:`#84C268`,canopyDk:`#4E7D3A`,skyTop:`#C9ECC0`,skyLow:`#E7F6DF`,hibiscusR:`#F0584C`,hibiscusC:`#FFC94D`,vine:`#4E7D3A`},r=new Q.default.Illustration({element:K(n),dragRotate:!1,resize:`window`,rotate:{x:-.18,y:-.1,z:0}}),i=new Q.default.Anchor({addTo:r});new Q.default.Shape({addTo:i,path:[{x:-2e3,y:-1100},{x:2e3,y:-1100},{x:2e3,y:0},{x:-2e3,y:0}],stroke:0,fill:!0,color:t.skyTop,translate:{z:-820}}),new Q.default.Shape({addTo:i,path:[{x:-2e3,y:0},{x:2e3,y:0},{x:2e3,y:700},{x:-2e3,y:700}],stroke:0,fill:!0,color:t.skyLow,translate:{z:-820}});function a(e,t,n,r,a=170){let o=[{x:e-t/2,y:320}];for(let n=0;n<=24;n++){let r=n/24;o.push({x:e-t/2+r*t,y:320-Math.sin(r*Math.PI)*a})}o.push({x:e+t/2,y:320}),new Q.default.Shape({addTo:i,path:o,stroke:0,fill:!0,color:n,translate:{z:r}})}a(-620,1e3,t.canopyDk,-720,180),a(540,900,`#436f24`,-720,175),a(-180,780,t.canopy2,-690,150),a(940,760,`#3f6a22`,-740,185),[{x:-560,y:-210,z:-440,s:1.3,c:t.canopy1},{x:-60,y:-260,z:-520,s:1,c:t.canopy2},{x:420,y:-190,z:-400,s:1.5,c:t.canopy1},{x:760,y:-240,z:-480,s:1.1,c:t.canopy2}].forEach(e=>{let n=new Q.default.Anchor({addTo:i,translate:{x:e.x,y:e.y,z:e.z},scale:e.s});new Q.default.Shape({addTo:n,stroke:110,color:e.c}),new Q.default.Shape({addTo:n,stroke:84,color:t.canopyDk,translate:{x:-64,y:12}}),new Q.default.Shape({addTo:n,stroke:90,color:e.c,translate:{x:60,y:6}})}),new Q.default.Shape({addTo:i,path:[{x:-2e3,y:240},{x:2e3,y:240},{x:2e3,y:900},{x:-2e3,y:900}],stroke:0,fill:!0,color:t.canopy2,translate:{z:-520}});let o=new Q.default.Anchor({addTo:r,translate:{x:0,y:30,z:80}});new Q.default.Shape({addTo:o,path:[{x:-380,y:-250},{x:380,y:-250}],stroke:36,color:t.branch}),new Q.default.Shape({addTo:o,path:[{x:-380,y:-264},{x:380,y:-264}],stroke:9,color:t.branchDk}),[[-230,-250],[-90,-250],[120,-250],[250,-250]].forEach(([e,n])=>{new Q.default.Shape({addTo:o,path:[{x:e-6,y:n-4},{x:e+8,y:n-18}],stroke:6,color:t.branchDk})}),[{x:-300,y:-236},{x:-150,y:-240},{x:60,y:-236},{x:320,y:-238}].forEach((e,n)=>{new Q.default.Ellipse({addTo:o,width:38,height:20,stroke:5,fill:!0,color:n%2?t.leafGreen:t.leafDark,translate:{x:e.x,y:e.y+22,z:10},rotate:{z:n%2?.5:-.4}})}),[{x:-350,len:120},{x:360,len:90}].forEach(e=>{new Q.default.Shape({addTo:o,path:[{x:e.x,y:-250},{bezier:[{x:e.x+16,y:-250+e.len*.4},{x:e.x-16,y:-250+e.len*.7},{x:e.x+6,y:-250+e.len}]}],stroke:5,color:t.vine,closed:!1})});let s=new Q.default.Anchor({addTo:o,translate:{x:270,y:-120,z:30}});new Q.default.Shape({addTo:s,path:[{x:0,y:-130},{x:0,y:-16}],stroke:5,color:t.vine});let c=new Q.default.Anchor({addTo:s});for(let n=0;n<5;n++){let r=e/5*n;new Q.default.Ellipse({addTo:c,width:26,height:38,fill:!0,stroke:0,color:t.hibiscusR,translate:{x:Math.cos(r)*14,y:Math.sin(r)*14},rotate:{z:r}})}new Q.default.Shape({addTo:c,stroke:16,color:t.hibiscusC,translate:{z:3}}),new Q.default.Shape({addTo:c,path:[{x:0,y:0},{x:0,y:-22}],stroke:3,color:`#E0A92E`,translate:{z:5}}),r.updateRenderGraph()}),Ci();var r=Iu();bi(r,e=>V(n,e),()=>K(n)),X(e,r),Ke()}var Ru=Y(`<div class="top-bar svelte-1ah546j"><button class="bar-btn svelte-1ah546j">← Home</button> <button class="bar-btn svelte-1ah546j"> </button></div>`),zu=Y(`<div><span class="history-label svelte-1ah546j"> </span> <p class="svelte-1ah546j"> </p></div>`),Bu=Y(`<div class="history-panel svelte-1ah546j"><div class="history-header svelte-1ah546j"><h2 class="svelte-1ah546j">Session chat</h2> <button class="close-btn svelte-1ah546j">✕</button></div> <div class="history-scroll svelte-1ah546j"></div></div>`),Vu=Y(`<button class="radial-btn svelte-1ah546j"><span class="radial-icon svelte-1ah546j"> </span> <span class="radial-label svelte-1ah546j"> </span></button>`),Hu=Y(`<div class="radial-overlay svelte-1ah546j"><!> <button class="radial-center svelte-1ah546j">✕</button></div>`),Uu=Y(`<div class="card-overlay svelte-1ah546j"><div class="card svelte-1ah546j"><div class="card-icon svelte-1ah546j"> </div> <h2 class="svelte-1ah546j"> </h2> <p class="card-desc svelte-1ah546j"> </p> <p class="card-hint svelte-1ah546j"> </p> <div class="card-actions svelte-1ah546j"><button class="card-btn primary svelte-1ah546j">Activate</button> <button class="card-btn ghost svelte-1ah546j">Cancel</button></div></div></div>`),Wu=Y(`<!> <!> <!> <canvas></canvas> <!> <!> <div><div class="thought-bubble svelte-1ah546j"><div class="thought-dots svelte-1ah546j"><span class="svelte-1ah546j"></span><span class="svelte-1ah546j"></span><span class="svelte-1ah546j"></span></div> <p class="thought-text svelte-1ah546j"> </p></div> <div class="thought-reply svelte-1ah546j"><textarea placeholder="Reply to Mossy…" rows="1" class="svelte-1ah546j"></textarea> <button class="reply-send svelte-1ah546j"> </button></div></div> <p class="hint svelte-1ah546j">Tap the sloth to open interactions 🌿</p>`,1);function Gu(e,t){Ge(t,!1);let n=Ai(),r=B(),i=Ei(t,`embedded`,8,!1),a=B(!1),o=B(null),s=B(!1),c=B(!1),l=B(``),u=B(``),d=null,f=null,p=B(!1),m=[{id:`wake`,icon:`👀`,label:`Wake`,title:`Gently wake Mossy`,description:`Give the sloth a slow little nudge to blink awake.`,hint:`Or just drag the sloth to stir it.`,angle:-90},{id:`climb`,icon:`🌿`,label:`Climb`,title:`Watch it climb`,description:`Mossy shuffles, very slowly, along the branch.`,hint:`Patience — sloths take their time.`,angle:-30},{id:`yawn`,icon:`🥱`,label:`Yawn`,title:`Make it yawn`,description:`A long, slow stretch and the widest of yawns.`,hint:`Contagious. You might yawn too.`,angle:30},{id:`snack`,icon:`🌺`,label:`Snack`,title:`Offer a hibiscus`,description:`A hibiscus is a sloth's rare favorite treat.`,hint:`The flower hangs to the right of the branch.`,angle:90},{id:`chat`,icon:`💬`,label:`Chat`,title:`Talk with Mossy`,description:`The sloth has slow, gentle wisdom about rest and patience.`,hint:`Reply to Mossy's thought bubbles below.`,angle:150}],h=B([{role:`assistant`,content:`Mmm… hello. 🌿 Ask me about rest, patience, or slowing down.`}]),g=[`The canopy is quiet today. What is on your mind?`,`I moved one branch over since sunrise. That feels like plenty.`,`Do you ever rush right past the good parts?`,`Resting is not the same as falling behind, you know.`,`I am watching a single leaf drift. Want to watch with me?`,`What would happen if you went a little slower today?`],_,v,y,b,x;function S(){n(`back`)}function C(e){V(o,m.find(t=>t.id===e)),V(a,!1)}function w(){V(o,null)}function T(){if(K(o)){if(K(o).id===`wake`&&_?.(),K(o).id===`climb`&&v?.(),K(o).id===`yawn`&&y?.(),K(o).id===`snack`&&b?.(),K(o).id===`chat`){V(o,null);return}V(o,null)}}function E(){V(s,!K(s)),K(s)&&(V(a,!1),V(o,null))}function D(e,t=!1){f&&clearTimeout(f),V(l,e),V(c,!0),t||(f=setTimeout(()=>{V(c,!1)},13e3))}function O(){d&&clearTimeout(d),d=setTimeout(()=>{let e=g[Math.floor(Math.random()*g.length)];D(e),O()},22e3+Math.random()*14e3)}async function ee(){let e=K(u).trim();!e||K(p)||(V(u,``),V(c,!1),await te(e))}function k(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),ee())}async function te(e){if(!K(p)){V(p,!0),D(``,!0),x?.(),V(h,[...K(h),{role:`user`,content:e}]);try{let e={model:`gpt-4o-mini`,messages:[{role:`system`,content:`You are Mossy, a serene, sleepy three-toed sloth who lives high in the rainforest canopy. You speak slowly and warmly in short, unhurried messages (2-4 sentences max). You use canopy, leaf, and slowness metaphors naturally.
Your specialty is helping people think about:
- Rest and the quiet wisdom of slowing down
- Patience, and letting things unfold in their own time
- Being gentle with yourself when you feel behind
- Savoring small, ordinary moments
You give calm, insightful, slightly dreamy advice. You never rush and you never lecture. Keep it warm, short, and wise.`},...K(h)],max_tokens:256,temperature:.9},t=await fetch(`https://api.openai.com/v1/chat/completions`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer undefined`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json();throw console.error(`OpenAI Internal Error JSON:`,e),Error(`API returned status ${t.status}`)}let n=(await t.json())?.choices?.[0]?.message?.content;if(n){let e=n.trim();V(h,[...K(h),{role:`assistant`,content:e}]),D(e,!0)}else D(`Mmm… my mind drifted off. Ask me again?`,!0)}catch(e){console.error(`OpenAI Catch block triggered:`,e),V(h,K(h).slice(0,-1)),D(`Mmm… my mind drifted off. Ask me again?`,!0)}finally{V(p,!1)}}}Di(()=>{if(!K(r))return;let e=Q.default.TAU,t={fur:`#8B6F4E`,furDark:`#6B5238`,furLight:`#B89B72`,faceCream:`#D8C29A`,mask:`#5A4632`,nose:`#3D2A1A`,eye:`#2A1C12`,cheek:`#E59A86`,claw:`#4A3826`,moss:`#7E8B5A`,branch:`#6B4A2A`,branchDk:`#4E3318`,leafGreen:`#5DA052`,leafDark:`#3A6A28`,leafLight:`#7FC04A`,canopy1:`#A7D88C`,canopy2:`#84C268`,canopyDk:`#4E7D3A`,skyTop:`#C9ECC0`,skyLow:`#E7F6DF`,hibiscusR:`#F0584C`,hibiscusC:`#FFC94D`,vine:`#4E7D3A`},n=new Q.default.Illustration({element:K(r),dragRotate:!1,resize:`window`,rotate:{x:-.16,y:-.18,z:0}}),s=new Q.default.Anchor({addTo:n,translate:{x:0,y:30,z:80},scale:1.4}),c=new Q.default.Anchor({addTo:s}),l=new Q.default.Anchor({addTo:c}),u=new Q.default.Anchor({addTo:l,translate:{y:38,z:-28},rotate:{z:-.04}});new Q.default.Shape({addTo:u,stroke:138,color:t.fur}),new Q.default.Shape({addTo:u,stroke:120,color:t.furDark,translate:{y:20,z:-34}}),new Q.default.Shape({addTo:u,stroke:108,color:t.furDark,translate:{y:46,z:-20}}),[{y:-34,z:46,s:60},{y:2,z:54,s:74},{y:34,z:50,s:66},{y:60,z:38,s:48}].forEach(e=>{new Q.default.Shape({addTo:u,stroke:e.s,color:t.furLight,translate:{y:e.y,z:e.z}})}),new Q.default.Shape({addTo:u,stroke:50,color:t.faceCream,translate:{y:10,z:66}}),[{x:-30,y:-30,z:72,s:17,c:t.moss},{x:28,y:6,z:76,s:14,c:t.moss},{x:-16,y:46,z:66,s:15,c:t.furDark}].forEach(e=>{new Q.default.Shape({addTo:u,stroke:e.s,color:e.c,translate:{x:e.x,y:e.y,z:e.z}})});function p(e,n,r,i,a,o,s,c=20){let u=new Q.default.Anchor({addTo:l,translate:{x:n*e,y:r,z:s}});new Q.default.Shape({addTo:u,path:[{x:0,y:0,z:0},{bezier:[{x:i*e,y:-55,z:-8},{x:a*e,y:-150,z:-18},{x:a*e,y:o,z:-28}]}],stroke:c,color:t.fur,fill:!1});let d=new Q.default.Anchor({addTo:u,translate:{x:a*e,y:o-4,z:-28},rotate:{z:-.18*e}});for(let n=0;n<3;n++)new Q.default.Shape({addTo:d,path:[{x:(n-1)*8,y:0},{bezier:[{x:(n-1)*8-3*e,y:8},{x:(n-1)*8-6*e,y:15},{x:(n-1)*8-4*e,y:23}]}],stroke:6,color:t.claw,closed:!1});return u}let m=p(-1,46,8,20,24,-244,20,22),h=p(1,46,8,20,24,-244,20,22),g=p(-1,34,88,30,68,-236,-24,19),S=p(1,34,88,30,68,-236,-24,19),C=new Q.default.Anchor({addTo:l,translate:{x:0,y:-78,z:10}});new Q.default.Shape({addTo:C,stroke:128,color:t.fur}),new Q.default.Ellipse({addTo:C,width:96,height:84,stroke:16,color:t.faceCream,fill:!0,translate:{z:50}}),new Q.default.Ellipse({addTo:C,width:30,height:50,stroke:6,color:t.mask,fill:!0,translate:{x:-26,y:-4,z:58},rotate:{z:.35}}),new Q.default.Ellipse({addTo:C,width:30,height:50,stroke:6,color:t.mask,fill:!0,translate:{x:26,y:-4,z:58},rotate:{z:-.35}}),new Q.default.Shape({addTo:C,stroke:15,color:t.eye,translate:{x:-24,y:-2,z:66}}),new Q.default.Shape({addTo:C,stroke:15,color:t.eye,translate:{x:24,y:-2,z:66}}),new Q.default.Shape({addTo:C,stroke:5,color:`#FFFFFF`,translate:{x:-27,y:-5,z:72}}),new Q.default.Shape({addTo:C,stroke:5,color:`#FFFFFF`,translate:{x:21,y:-5,z:72}});let w=new Q.default.Shape({addTo:C,stroke:16,color:t.faceCream,translate:{x:-24,y:-12,z:67}}),T=new Q.default.Shape({addTo:C,stroke:16,color:t.faceCream,translate:{x:24,y:-12,z:67}});new Q.default.Shape({addTo:C,stroke:18,color:t.cheek,translate:{x:-40,y:14,z:44}}),new Q.default.Shape({addTo:C,stroke:18,color:t.cheek,translate:{x:40,y:14,z:44}}),new Q.default.Shape({addTo:C,stroke:50,color:t.faceCream,translate:{x:0,y:13,z:52}}),new Q.default.Shape({addTo:C,stroke:16,color:t.nose,translate:{x:0,y:8,z:74}}),new Q.default.Shape({addTo:C,stroke:6,color:`#000`,translate:{x:-4,y:9,z:80}}),new Q.default.Shape({addTo:C,stroke:6,color:`#000`,translate:{x:4,y:9,z:80}});let E=new Q.default.Shape({addTo:C,path:[{x:-36,y:-26},{x:-14,y:-30}],stroke:7,color:t.furDark,translate:{z:58},rotate:{z:-.1}}),ee=new Q.default.Shape({addTo:C,path:[{x:14,y:-30},{x:36,y:-26}],stroke:7,color:t.furDark,translate:{z:58},rotate:{z:.1}}),k=new Q.default.Shape({addTo:C,stroke:3.5,color:t.nose,closed:!1,path:[{x:-6,y:22,z:60},{bezier:[{x:-3,y:25,z:60},{x:3,y:25,z:60},{x:6,y:22,z:60}]}]}),A=-6,j=-6;function M(e){let t=-6,n=-.1,r=-6,i=6,a=22,o=25,s=25;e===`sleepy`?(t=-6,n=-.1,a=22,o=25,s=25):e===`content`?(t=-12,n=-.05,a=20,o=27,s=27):e===`happy`?(t=-14,n=.05,a=19,o=29,s=29,r=-8,i=8):e===`surprised`?(t=-16,n=-.25,a=22,o=30,s=30,r=-5,i=5):e===`grumpy`?(t=-8,n=-.5,a=25,o=20,s=20):e===`yawn`&&(t=-16,n=-.2,a=18,o=38,s=38,r=-9,i=9),A=t,j=t,E.rotate.z=n,ee.rotate.z=-n,k.path=[{x:r,y:a,z:60},{bezier:[{x:-3,y:o,z:60},{x:3,y:s,z:60},{x:i,y:a,z:60}]}],k.updatePath()}M(`sleepy`);let N=0,P=!0,F=!1,ne=!1,I=0;function re(){if(!P)return;N++,F||(s.translate.y=30+Math.sin(N/55)*5,ne||(c.rotate.z=Math.sin(N/80)*.04)),ne&&(c.rotate.z=Math.sin(N/4)*.07),I++;let e=0;if(I>240){let t=I-240;t<16?e=Math.sin(t/16*Math.PI)*13:I=0}w.translate.y=A+e,T.translate.y=j+e,n.updateRenderGraph(),requestAnimationFrame(re)}re();function ie(){if(F)return;F=!0,ne=!0,M(`surprised`);let e=$.timeline({onComplete:()=>{M(`sleepy`),F=!1,ne=!1,c.rotate.z=0}});e.to(m.rotate,{duration:.25,z:.15,ease:`power2.out`}),e.to(h.rotate,{duration:.25,z:-.15,ease:`power2.out`},`<`),e.add(()=>M(`grumpy`),.5),e.to(m.rotate,{duration:.6,z:0,ease:`power1.inOut`},.7),e.to(h.rotate,{duration:.6,z:0,ease:`power1.inOut`},`<`),e.add(()=>{ne=!1,c.rotate.z=0,M(`content`)},1),e.to({},{duration:.8}),te(`Someone just nudged me awake from my nap. Give me short, gentle sloth wisdom about waking slowly and not rushing into the day.`)}function ae(){if(F)return;F=!0,M(`content`);let e=$.timeline({onComplete:()=>{M(`sleepy`),F=!1}});e.to(h.rotate,{duration:.9,z:-.35,x:.2,ease:`sine.inOut`}),e.to(s.translate,{duration:1.6,x:150,ease:`power1.inOut`},`-=0.3`),e.to(c.rotate,{duration:1.6,z:-.08,ease:`power1.inOut`},`<`),e.to(h.rotate,{duration:.7,z:0,x:0,ease:`sine.inOut`},`<`),e.to({},{duration:.6}),e.to(m.rotate,{duration:.9,z:.35,x:.2,ease:`sine.inOut`}),e.to(s.translate,{duration:1.8,x:0,ease:`power1.inOut`},`-=0.3`),e.to(c.rotate,{duration:1.8,z:0,ease:`power1.inOut`},`<`),e.to(m.rotate,{duration:.7,z:0,x:0,ease:`sine.inOut`},`<`)}function oe(){if(F)return;F=!0;let e=$.timeline({onComplete:()=>{M(`sleepy`),F=!1}});e.add(()=>M(`content`)),e.to(C.rotate,{duration:.6,x:-.15,ease:`sine.inOut`}),e.add(()=>M(`yawn`),.6),e.to([m.rotate,h.rotate,g.rotate,S.rotate],{duration:.9,x:-.4,ease:`power2.out`},`<`),e.to(s.translate,{duration:.9,y:18,ease:`power2.out`},`<`),e.to({},{duration:1}),e.add(()=>M(`content`)),e.to([m.rotate,h.rotate,g.rotate,S.rotate],{duration:1,x:0,ease:`power1.inOut`}),e.to(C.rotate,{duration:1,x:0,ease:`power1.inOut`},`<`),e.to(s.translate,{duration:1,y:30,ease:`power1.inOut`},`<`)}function se(){if(F)return;F=!0,M(`happy`);let e=$.timeline({onComplete:()=>{M(`content`),F=!1}});e.to(s.translate,{duration:1.2,x:90,y:16,ease:`power1.inOut`}),e.to(c.rotate,{duration:1.2,y:.3,z:-.1,ease:`power1.inOut`},`<`),e.to(h.rotate,{duration:.6,z:-.6,x:.5,ease:`back.out(1.4)`},`-=0.4`),e.to(h.rotate,{duration:.5,z:-.2,x:.2,ease:`sine.inOut`});for(let t=0;t<3;t++)e.to(C.rotate,{duration:.28,x:-.12,ease:`sine.inOut`}),e.to(C.rotate,{duration:.28,x:0,ease:`sine.inOut`});e.to(h.rotate,{duration:.6,z:0,x:0,ease:`power2.in`}),e.to(s.translate,{duration:1.4,x:0,y:30,ease:`power1.inOut`}),e.to(c.rotate,{duration:1.4,y:0,z:0,ease:`power1.inOut`},`<`),te(`I just had a sweet hibiscus flower, my favorite treat. Share a short, dreamy thought about savoring small pleasures slowly.`)}function ce(){if(F)return;F=!0,M(`content`);let e=$.timeline({onComplete:()=>{M(`sleepy`),F=!1}});e.to(C.rotate,{duration:.7,z:.06,ease:`sine.inOut`}),e.to(m.rotate,{duration:.7,z:.18,x:.1,ease:`sine.inOut`},`<`),e.to(C.rotate,{duration:.7,z:-.05,ease:`sine.inOut`}),e.to(m.rotate,{duration:.7,z:0,x:0,ease:`sine.inOut`},`<`),e.to(C.rotate,{duration:.7,z:0,ease:`sine.inOut`})}_=ie,v=ae,y=oe,b=se,x=ce;let le={x:250,y:-110,r:90},L=!1,ue=0,de=0,fe=!1,pe=0,me=.006;function he(e){L=!0,fe=!1,pe=0,ue=e.clientX,de=e.clientY;try{K(r).setPointerCapture(e.pointerId)}catch{}}function ge(t){if(!L)return;let r=t.clientX-ue,i=t.clientY-de;ue=t.clientX,de=t.clientY;let a=Math.sqrt(r*r+i*i);pe+=a,a>10&&(fe=!0),c.rotate.y+=r*me,c.rotate.x+=i*me,c.rotate.x=Math.max(-e/9,Math.min(e/9,c.rotate.x)),n.updateRenderGraph()}function _e(){L=!1,pe>70&&!F&&ie()}function ve(e){if(fe)return;let t=K(r).getBoundingClientRect(),n=e.clientX-t.left-t.width/2,i=e.clientY-t.top-t.height/2;if(Math.hypot(n-le.x,i-le.y)<le.r){se();return}Math.hypot(n,i-10)<170&&(V(a,!K(a)),V(o,null))}return i()||(K(r).addEventListener(`click`,ve),K(r).addEventListener(`pointerdown`,he),K(r).addEventListener(`pointermove`,ge),window.addEventListener(`pointerup`,_e)),i()||(setTimeout(()=>D(`Mmm… I'm thinking about rest and patience. What about you? 🌿`),4e3),O()),()=>{P=!1,d&&clearTimeout(d),f&&clearTimeout(f),K(r)?.removeEventListener(`click`,ve),K(r)?.removeEventListener(`pointerdown`,he),K(r)?.removeEventListener(`pointermove`,ge),window.removeEventListener(`pointerup`,_e)}}),Ci();var A=Wu(),j=fn(A),M=e=>{var t=Ru(),n=H(t),r=U(n,2),i=H(r,!0);R(r),R(t),Ln(()=>Z(i,K(s)?`Close history`:`💬 History`)),J(`click`,n,S),J(`click`,r,E),X(e,t)};Ur(j,e=>{i()||e(M)});var N=U(j,2),P=e=>{var t=Bu(),n=H(t),r=U(H(n),2);R(n);var i=U(n,2);Jr(i,5,()=>K(h),Wr,(e,t)=>{var n=zu(),r=H(n),i=H(r,!0);R(r);var a=U(r,2),o=H(a,!0);R(a),R(n),Ln(()=>{ai(n,1,`history-msg ${(K(t),q(()=>K(t).role))??``}`,`svelte-1ah546j`),Z(i,(K(t),q(()=>K(t).role===`assistant`?`🦥 Mossy`:`You`))),Z(o,(K(t),q(()=>K(t).content)))}),X(e,n)}),R(i),R(t),J(`click`,r,()=>V(s,!1)),X(e,t)};Ur(N,e=>{!i()&&K(s)&&e(P)});var F=U(N,2),ne=e=>{Lu(e,{})};Ur(F,e=>{i()||e(ne)});var I=U(F,2);let re;bi(I,e=>V(r,e),()=>K(r));var ie=U(I,2),ae=e=>{var t=Hu(),n=H(t);Jr(n,1,()=>m,Wr,(e,t,n)=>{let r=yt(()=>q(()=>n/m.length*360-90)),i=yt(()=>(wr(K(r)),q(()=>K(r)*(Math.PI/180)))),a=yt(()=>110);var o=Vu(),s=H(o),c=H(s,!0);R(s);var l=U(s,2),u=H(l,!0);R(l),R(o),Ln((e,r)=>{si(o,`
left: calc(50% + ${e??``}px - 36px);
top: calc(50% + ${r??``}px - 36px);
animation-delay: ${n*55}ms;
`),Z(c,(K(t),q(()=>K(t).icon))),Z(u,(K(t),q(()=>K(t).label)))},[()=>(wr(K(i)),wr(K(a)),q(()=>Math.cos(K(i))*K(a))),()=>(wr(K(i)),wr(K(a)),q(()=>Math.sin(K(i))*K(a)))]),J(`click`,o,()=>C(K(t).id)),X(e,o)});var r=U(n,2);R(t),J(`click`,r,()=>{V(a,!1)}),X(e,t)};Ur(ie,e=>{!i()&&K(a)&&e(ae)});var oe=U(ie,2),se=e=>{var t=Uu(),n=H(t),r=H(n),i=H(r,!0);R(r);var a=U(r,2),s=H(a,!0);R(a);var c=U(a,2),l=H(c,!0);R(c);var u=U(c,2),d=H(u);R(u);var f=U(u,2),p=H(f),m=U(p,2);R(f),R(n),R(t),Ln(()=>{Z(i,(K(o),q(()=>K(o).icon))),Z(s,(K(o),q(()=>K(o).title))),Z(l,(K(o),q(()=>K(o).description))),Z(d,`${(K(o),q(()=>K(o).hint))??``}`)}),J(`click`,p,T),J(`click`,m,w),J(`click`,t,xi(()=>V(o,null))),X(e,t)};Ur(oe,e=>{K(o)&&e(se)});var ce=U(oe,2);let le;var L=H(ce),ue=U(H(L),2),de=H(ue,!0);R(ue),R(L);var fe=U(L,2),pe=H(fe);vn(pe);var me=U(pe,2),he=H(me,!0);R(me),R(fe),R(ce),Pe(2),Ln(e=>{re=ai(I,1,`scene svelte-1ah546j`,null,re,{embedded:i()}),le=ai(ce,1,`thought-wrap svelte-1ah546j`,null,le,{visible:K(c)}),Z(de,K(l)),pe.disabled=K(p),me.disabled=e,Z(he,K(p)?``:``)},[()=>(K(p),K(u),q(()=>K(p)||!K(u).trim()))]),gi(pe,()=>K(u),e=>V(u,e)),J(`keydown`,pe,k),J(`click`,me,ee),X(e,A),Ke()}var Ku=Y(`<canvas class="background-scene svelte-x9r5vj"></canvas>`);function qu(e,t){Ge(t,!1);let n=B();Di(()=>{Q.default.TAU;let e={skyTop:`#BFD9EF`,skyLow:`#E7F1FA`,sun:`#FFF7E6`,cloud:`#FFFFFF`,cloudDim:`#EAF2FA`},t=new Q.default.Illustration({element:K(n),dragRotate:!1,resize:`window`,rotate:{x:-.1,y:.18,z:0},zoom:1}),r=new Q.default.Anchor({addTo:t});new Q.default.Shape({addTo:r,path:[{x:-2200,y:-1200},{x:2200,y:-1200},{x:2200,y:0},{x:-2200,y:0}],stroke:0,fill:!0,color:e.skyTop,translate:{z:-860}}),new Q.default.Shape({addTo:r,path:[{x:-2200,y:0},{x:2200,y:0},{x:2200,y:1e3},{x:-2200,y:1e3}],stroke:0,fill:!0,color:e.skyLow,translate:{z:-860}}),new Q.default.Shape({addTo:r,stroke:360,color:e.sun,translate:{x:520,y:-260,z:-840}}),[{x:-460,y:-250,z:-560,s:1.3},{x:-120,y:-320,z:-640,s:.9},{x:380,y:-210,z:-520,s:1.5},{x:120,y:-300,z:-600,s:1},{x:760,y:-270,z:-640,s:1.2}].forEach(t=>{let n=new Q.default.Anchor({addTo:r,translate:{x:t.x,y:t.y,z:t.z},scale:t.s});new Q.default.Shape({addTo:n,stroke:100,color:e.cloud}),new Q.default.Shape({addTo:n,stroke:76,color:e.cloudDim,translate:{x:-58,y:12}}),new Q.default.Shape({addTo:n,stroke:82,color:e.cloud,translate:{x:56,y:6}}),new Q.default.Shape({addTo:n,stroke:64,color:e.cloudDim,translate:{x:-98,y:16}})}),[{x:-300,y:-360,z:-700},{x:-240,y:-340,z:-700},{x:600,y:-380,z:-720}].forEach(e=>{let t=new Q.default.Anchor({addTo:r,translate:e,scale:.5});new Q.default.Shape({addTo:t,path:[{x:-14,y:6},{x:0,y:0},{x:14,y:6}],stroke:3,color:`#9FB4C6`,closed:!1})}),t.updateRenderGraph()}),Ci();var r=Ku();bi(r,e=>V(n,e),()=>K(n)),X(e,r),Ke()}var Ju=Y(`<div class="top-bar svelte-svg88v"><button class="bar-btn svelte-svg88v">← Home</button> <button class="bar-btn svelte-svg88v"> </button></div>`),Yu=Y(`<div><span class="history-label svelte-svg88v"> </span> <p class="svelte-svg88v"> </p></div>`),Xu=Y(`<div class="history-panel svelte-svg88v"><div class="history-header svelte-svg88v"><h2 class="svelte-svg88v">Session chat</h2> <button class="close-btn svelte-svg88v">✕</button></div> <div class="history-scroll svelte-svg88v"></div></div>`),Zu=Y(`<button class="radial-btn svelte-svg88v"><span class="radial-icon svelte-svg88v"> </span> <span class="radial-label svelte-svg88v"> </span></button>`),Qu=Y(`<div class="radial-overlay svelte-svg88v"><!> <button class="radial-center svelte-svg88v">✕</button></div>`),$u=Y(`<div class="card-overlay svelte-svg88v"><div class="card svelte-svg88v"><div class="card-icon svelte-svg88v"> </div> <h2 class="svelte-svg88v"> </h2> <p class="card-desc svelte-svg88v"> </p> <p class="card-hint svelte-svg88v"> </p> <div class="card-actions svelte-svg88v"><button class="card-btn primary svelte-svg88v">Activate</button> <button class="card-btn ghost svelte-svg88v">Cancel</button></div></div></div>`),ed=Y(`<!> <!> <!> <canvas></canvas> <!> <!> <div><div class="thought-bubble svelte-svg88v"><div class="thought-dots svelte-svg88v"><span class="svelte-svg88v"></span><span class="svelte-svg88v"></span><span class="svelte-svg88v"></span></div> <p class="thought-text svelte-svg88v"> </p></div> <div class="thought-reply svelte-svg88v"><textarea placeholder="Reply to Olive…" rows="1" class="svelte-svg88v"></textarea> <button class="reply-send svelte-svg88v"> </button></div></div> <p class="hint svelte-svg88v">Tap the dove to open interactions 🕊️</p> <div class="credit svelte-svg88v">Made by MakMin</div>`,1);function td(e,t){Ge(t,!1);let n=Ai(),r=B(),i=Ei(t,`embedded`,8,!1),a=B(!1),o=B(null),s=B(!1),c=B(!1),l=B(``),u=B(``),d=null,f=null,p=B(!1),m=[{id:`startle`,icon:`😯`,label:`Startle`,title:`Startle the dove`,description:`A sudden poke sends Olive into a flurry of wingbeats — then calm returns.`,hint:`Or give the dove a quick tug.`,angle:-90},{id:`fly`,icon:`🕊️`,label:`Fly`,title:`Take flight`,description:`Olive lifts off and circles on a slow, easy loop.`,hint:`Watch the wings open wide.`,angle:-30},{id:`coo`,icon:`🎵`,label:`Coo`,title:`Make it coo`,description:`A soft chest-puff and a gentle, bobbing coo.`,hint:`Doves are happiest when they sing.`,angle:30},{id:`peace`,icon:`🌿`,label:`Peace`,title:`Offer peace`,description:`Olive bows her head and holds out an olive branch.`,hint:`The dove's oldest gift.`,angle:90},{id:`chat`,icon:`💬`,label:`Chat`,title:`Talk with Olive`,description:`The dove has soft wisdom about calm, hope, and letting go.`,hint:`Reply to Olive's thought bubbles below.`,angle:150}],h=B([{role:`assistant`,content:`Coo… peace to you. 🕊️ Ask me about calm, letting go, or finding hope.`}]),g=[`The sky is wide and quiet today. What is weighing on you?`,`A grudge is heavy to carry on small wings. Is there one you could set down?`,`Storms pass. They always do. What are you waiting out right now?`,`Peace is not the absence of noise — it is a soft place inside it.`,`I carry an olive branch for a reason. Who might need yours?`,`When did you last let yourself simply drift on the wind?`],_,v,y,b,x;function S(){n(`back`)}function C(e){V(o,m.find(t=>t.id===e)),V(a,!1)}function w(){V(o,null)}function T(){if(K(o)){if(K(o).id===`startle`&&_?.(),K(o).id===`fly`&&v?.(),K(o).id===`coo`&&y?.(),K(o).id===`peace`&&b?.(),K(o).id===`chat`){V(o,null);return}V(o,null)}}function E(){V(s,!K(s)),K(s)&&(V(a,!1),V(o,null))}function D(e,t=!1){f&&clearTimeout(f),V(l,e),V(c,!0),t||(f=setTimeout(()=>{V(c,!1)},13e3))}function O(){d&&clearTimeout(d),d=setTimeout(()=>{let e=g[Math.floor(Math.random()*g.length)];D(e),O()},18e3+Math.random()*13e3)}async function ee(){let e=K(u).trim();!e||K(p)||(V(u,``),V(c,!1),await te(e))}function k(e){e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),ee())}async function te(e){if(!K(p)){V(p,!0),D(``,!0),x?.(),V(h,[...K(h),{role:`user`,content:e}]);try{let e={model:`gpt-4o-mini`,messages:[{role:`system`,content:`You are Olive, a gentle, serene dove who carries a quiet sense of peace. You speak softly and warmly in short, calming messages (2-4 sentences max). You use sky, wind, feather, and olive-branch metaphors naturally.
Your specialty is helping people think about:
- Finding calm in the middle of conflict or worry
- Letting go of grudges and old resentments
- Holding onto hope after something hard
- Being gentle with yourself and with others
You give soft, reassuring, hopeful advice. You never preach. Keep it warm, short, and peaceful.`},...K(h)],max_tokens:256,temperature:.9},t=await fetch(`https://api.openai.com/v1/chat/completions`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer undefined`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json();throw console.error(`OpenAI Internal Error JSON:`,e),Error(`API returned status ${t.status}`)}let n=(await t.json())?.choices?.[0]?.message?.content;if(n){let e=n.trim();V(h,[...K(h),{role:`assistant`,content:e}]),D(e,!0)}else D(`Coo… the wind carried my thought away. Ask me again?`,!0)}catch(e){console.error(`OpenAI Catch block triggered:`,e),V(h,K(h).slice(0,-1)),D(`Coo… the wind carried my thought away. Ask me again?`,!0)}finally{V(p,!1)}}}Di(()=>{if(!K(r))return;let e=Q.default.TAU,t={white:`#F4F2EE`,mid:`#E8E5DE`,shade:`#DAD6CE`,breast:`#FBF9F5`,beak:`#D89A6E`,beakDk:`#C07E50`,cheek:`#F0A8A0`,eye:`#1A1410`,brow:`#CFC9BE`,crest:`#E2DED6`,foot:`#D89A6E`,oliveStem:`#6E8B3D`,oliveLeaf:`#8AA653`,olive:`#46662C`,skyTop:`#BFD9EF`,skyLow:`#E7F1FA`,sun:`#FFF7E6`,cloud:`#FFFFFF`,cloudDim:`#EAF2FA`},n=new Q.default.Illustration({element:K(r),dragRotate:!1,resize:`window`,rotate:{x:-.1,y:.18,z:0},zoom:1}),s=new Q.default.Anchor({addTo:n}),c=new Q.default.Anchor({addTo:s,translate:{x:0,y:0,z:0},scale:1.35}),l=new Q.default.Anchor({addTo:c}),u=new Q.default.Anchor({addTo:l});new Q.default.Ellipse({addTo:u,width:138,height:42,stroke:18,color:t.white,fill:!0,translate:{y:8}}),new Q.default.Ellipse({addTo:u,width:120,height:30,stroke:10,color:t.shade,fill:!0,translate:{y:18,z:-4}}),new Q.default.Ellipse({addTo:u,width:48,height:46,stroke:14,color:t.breast,fill:!0,translate:{x:-58,y:2,z:6}}),new Q.default.Ellipse({addTo:u,width:26,height:30,stroke:12,color:t.white,fill:!0,translate:{x:-74,y:-6,z:2}}),new Q.default.Shape({addTo:u,path:[{x:-14,y:26},{x:-14,y:34}],stroke:3,color:t.foot}),new Q.default.Shape({addTo:u,path:[{x:2,y:26},{x:2,y:34}],stroke:3,color:t.foot}),[-14,2].forEach(e=>{for(let n=-1;n<=1;n++)new Q.default.Shape({addTo:u,path:[{x:e,y:34},{x:e+n*4,y:38}],stroke:2,color:t.foot})});let p=new Q.default.Anchor({addTo:u,translate:{x:66,y:12}});[-24,-14,-5,5,14,24].forEach((e,n)=>{new Q.default.Shape({addTo:p,path:[{x:0,y:0},{bezier:[{x:25,y:e*.3},{x:55,y:e*.65},{x:78,y:e*.85}]}],stroke:n===0||n===5?4:6,color:n===0||n===5?t.shade:t.mid})});let m=[{x:0,y:0},{bezier:[{x:-30,y:-20},{x:-70,y:-70},{x:-50,y:-150}]},{bezier:[{x:-20,y:-130},{x:20,y:-110},{x:60,y:-80}]},{bezier:[{x:90,y:-55},{x:90,y:-20},{x:60,y:-5}]},{bezier:[{x:40,y:4},{x:20,y:4},{x:0,y:0}]}],h=new Q.default.Anchor({addTo:u,translate:{x:40,y:8,z:-18}});new Q.default.Shape({addTo:h,path:m,stroke:3,color:t.shade,fill:!0});let g=new Q.default.Anchor({addTo:u,translate:{x:40,y:8,z:18}});new Q.default.Shape({addTo:g,path:m,stroke:3,color:t.mid,fill:!0});let S=new Q.default.Anchor({addTo:u,translate:{x:-82,y:-10},rotate:{y:-.5}});new Q.default.Shape({addTo:S,stroke:34,color:t.white}),new Q.default.Ellipse({addTo:S,diameter:30,stroke:8,color:t.shade,fill:!0,translate:{z:-8}}),[-.3,0,.3].forEach((e,n)=>new Q.default.Shape({addTo:S,path:[{x:0,y:-16},{x:n*4,y:-26,z:2}],stroke:3,color:t.crest,rotate:{z:e}})),new Q.default.Shape({addTo:S,stroke:9,color:t.cheek,translate:{x:-3,y:6,z:13}}),new Q.default.Shape({addTo:S,stroke:7,color:t.eye,translate:{x:-3,y:-3,z:16}}),new Q.default.Shape({addTo:S,stroke:2.5,color:`#fff`,translate:{x:-4,y:-5,z:18}}),new Q.default.Shape({addTo:S,stroke:5,color:t.eye,translate:{x:13,y:-3,z:8}});let C=new Q.default.Shape({addTo:S,path:[{x:-9,y:-10},{x:3,y:-12}],stroke:3,color:t.brow,translate:{z:15}}),w=new Q.default.Shape({addTo:S,stroke:8,color:t.white,translate:{x:-3,y:-11,z:19}}),T=new Q.default.Anchor({addTo:S,translate:{x:-14,y:3,z:11}});new Q.default.Shape({addTo:T,path:[{x:0,y:-3},{x:-22,y:1},{x:0,y:3}],stroke:2,color:t.beak,fill:!0});let E=new Q.default.Anchor({addTo:T,translate:{x:0,y:3}});new Q.default.Shape({addTo:E,path:[{x:0,y:0},{x:-20,y:0},{x:0,y:4}],stroke:2,color:t.beakDk,fill:!0});let ee=new Q.default.Anchor({addTo:T,translate:{x:-24,y:2,z:0}}),k=[];k.push(new Q.default.Shape({addTo:ee,path:[{x:0,y:0},{x:-22,y:-6}],stroke:2.5,color:t.oliveStem,visible:!1})),[[-6,-2,.6],[-13,-5,.3],[-20,-8,.5]].forEach(([e,n,r])=>k.push(new Q.default.Ellipse({addTo:ee,width:10,height:5,stroke:2,color:t.oliveLeaf,fill:!0,translate:{x:e,y:n},rotate:{z:r},visible:!1}))),k.push(new Q.default.Shape({addTo:ee,stroke:5,color:t.olive,translate:{x:-9,y:-1},visible:!1}));let A=-11;function j(e){let t=0,n=-11,r=0;e===`calm`?(t=0,n=-10,r=0):e===`content`?(t=-.05,n=-11,r=.12):e===`happy`?(t=.12,n=-13,r=.28):e===`alarmed`?(t=-.22,n=-14,r=.38):e===`curious`&&(t=.18,n=-12,r=.06),C.rotate.z=t,A=n,w.translate.y=n,E.rotate.z=r}j(`calm`);let M=0,N=!0,P=!1,F=0,ne=0,I={amp:.09,speed:1};function re(){if(!N)return;M++,ne+=.13*I.speed,g.rotate.z=Math.sin(ne)*I.amp,h.rotate.z=Math.sin(ne-.5)*I.amp,P||(c.translate.y=Math.sin(M/40)*4,S.rotate.z=Math.sin(M/46)*.05,p.rotate.z=Math.sin(M/60)*.04),F++;let e=0;if(F>200){let t=F-200;t<12?e=Math.sin(t/12*Math.PI)*8:F=0}w.translate.y=A+e,n.updateRenderGraph(),requestAnimationFrame(re)}re();function ie(){if(P)return;P=!0,j(`alarmed`),$.to(I,{duration:.1,amp:.5,speed:3});let e=$.timeline({onComplete:()=>{j(`calm`),$.to(I,{duration:.7,amp:.09,speed:1}),P=!1,c.translate.y=0,l.rotate.z=0}});e.to(c.translate,{duration:.12,y:-28,ease:`power2.out`}),e.to(l.rotate,{duration:.12,z:.14,ease:`power2.out`},`<`),e.to(c.translate,{duration:.6,y:0,ease:`bounce.out`}),e.to(l.rotate,{duration:.6,z:0,ease:`power1.out`},`<`),e.to({},{duration:.6}),te(`Someone just startled me into a flurry of feathers. Share short, gentle dove wisdom about finding calm again after a fright.`)}function ae(){if(P)return;P=!0,j(`happy`),$.to(I,{duration:.2,amp:.55,speed:3});let e=$.timeline({onComplete:()=>{j(`calm`),$.to(I,{duration:.7,amp:.09,speed:1}),P=!1,c.translate.x=0,c.translate.y=0,c.translate.z=0,l.rotate.z=0,l.rotate.y=0,l.rotate.x=0}});e.to(c.translate,{duration:.6,x:-120,y:-90,z:60,ease:`power2.inOut`}),e.to(l.rotate,{duration:.6,z:.3,x:.1,ease:`power2.inOut`},`<`),e.to(c.translate,{duration:.6,x:0,y:-150,z:120,ease:`power2.inOut`}),e.to(l.rotate,{duration:.6,z:0,y:-.4,ease:`power2.inOut`},`<`),e.to(c.translate,{duration:.6,x:130,y:-90,z:60,ease:`power2.inOut`}),e.to(l.rotate,{duration:.6,z:-.3,y:0,ease:`power2.inOut`},`<`),e.to(c.translate,{duration:.6,x:0,y:0,z:0,ease:`power2.inOut`}),e.to(l.rotate,{duration:.6,z:0,x:0,ease:`power2.inOut`},`<`)}function oe(){if(P)return;P=!0,j(`content`);let e=$.timeline({onComplete:()=>{j(`calm`),P=!1,S.rotate.z=0}});e.to(u.scale,{duration:.3,x:1.05,y:1.05,ease:`sine.inOut`});for(let t=0;t<3;t++)e.add(()=>j(`happy`)),e.to(S.rotate,{duration:.22,z:.12,ease:`sine.inOut`}),e.add(()=>j(`content`)),e.to(S.rotate,{duration:.22,z:-.02,ease:`sine.inOut`});e.to(u.scale,{duration:.3,x:1,y:1,ease:`sine.inOut`}),e.to(S.rotate,{duration:.3,z:0,ease:`sine.inOut`})}function se(){if(P)return;P=!0,j(`content`),k.forEach(e=>e.visible=!0);let e=$.timeline({onComplete:()=>{k.forEach(e=>e.visible=!1),j(`calm`),P=!1,S.rotate.x=0,l.rotate.z=0}});e.to(S.rotate,{duration:.7,x:.32,ease:`power2.out`}),e.to(l.rotate,{duration:.7,z:.06,ease:`power2.out`},`<`),e.to({},{duration:1.3}),e.to(S.rotate,{duration:.8,x:0,ease:`power1.inOut`}),e.to(l.rotate,{duration:.8,z:0,ease:`power1.inOut`},`<`),te(`I am bowing and holding out an olive branch to offer peace. Share a short, hopeful thought about making peace or letting go of a grudge.`)}function ce(){if(P)return;P=!0,j(`content`);let e=$.timeline({onComplete:()=>{j(`calm`),P=!1,S.rotate.z=0}});for(let t=0;t<3;t++)e.add(()=>j(`happy`)),e.to(S.rotate,{duration:.25,z:.08,ease:`sine.inOut`}),e.add(()=>j(`content`)),e.to(S.rotate,{duration:.25,z:0,ease:`sine.inOut`})}_=ie,v=ae,y=oe,b=se,x=ce;let le=!1,L=0,ue=0,de=!1,fe=0,pe=.006;function me(e){le=!0,de=!1,fe=0,L=e.clientX,ue=e.clientY;try{K(r).setPointerCapture(e.pointerId)}catch{}}function he(t){if(!le)return;let r=t.clientX-L,i=t.clientY-ue;L=t.clientX,ue=t.clientY;let a=Math.sqrt(r*r+i*i);fe+=a,a>10&&(de=!0),l.rotate.y+=r*pe,l.rotate.x+=i*pe,l.rotate.x=Math.max(-e/9,Math.min(e/9,l.rotate.x)),n.updateRenderGraph()}function ge(){le=!1,fe>80&&!P&&ie()}function _e(e){if(de)return;let t=K(r).getBoundingClientRect(),n=e.clientX-t.left-t.width/2,i=e.clientY-t.top-t.height/2;Math.abs(n)<190&&Math.abs(i)<150&&(V(a,!K(a)),V(o,null))}return i()||(K(r).addEventListener(`click`,_e),K(r).addEventListener(`pointerdown`,me),K(r).addEventListener(`pointermove`,he),window.addEventListener(`pointerup`,ge)),i()||(setTimeout(()=>D(`Coo… the sky is calm today. 🕊️ What is on your mind?`),3500),O()),()=>{N=!1,d&&clearTimeout(d),f&&clearTimeout(f),i()||(K(r)?.removeEventListener(`click`,_e),K(r)?.removeEventListener(`pointerdown`,me),K(r)?.removeEventListener(`pointermove`,he),window.removeEventListener(`pointerup`,ge))}}),Ci();var A=ed(),j=fn(A),M=e=>{var t=Ju(),n=H(t),r=U(n,2),i=H(r,!0);R(r),R(t),Ln(()=>Z(i,K(s)?`Close history`:`💬 History`)),J(`click`,n,S),J(`click`,r,E),X(e,t)};Ur(j,e=>{i()||e(M)});var N=U(j,2),P=e=>{var t=Xu(),n=H(t),r=U(H(n),2);R(n);var i=U(n,2);Jr(i,5,()=>K(h),Wr,(e,t)=>{var n=Yu(),r=H(n),i=H(r,!0);R(r);var a=U(r,2),o=H(a,!0);R(a),R(n),Ln(()=>{ai(n,1,`history-msg ${(K(t),q(()=>K(t).role))??``}`,`svelte-svg88v`),Z(i,(K(t),q(()=>K(t).role===`assistant`?`🕊️ Olive`:`You`))),Z(o,(K(t),q(()=>K(t).content)))}),X(e,n)}),R(i),R(t),J(`click`,r,()=>V(s,!1)),X(e,t)};Ur(N,e=>{!i()&&K(s)&&e(P)});var F=U(N,2),ne=e=>{qu(e,{})};Ur(F,e=>{i()||e(ne)});var I=U(F,2);let re;bi(I,e=>V(r,e),()=>K(r));var ie=U(I,2),ae=e=>{var t=Qu(),n=H(t);Jr(n,1,()=>m,Wr,(e,t,n)=>{let r=yt(()=>q(()=>n/m.length*360-90)),i=yt(()=>(wr(K(r)),q(()=>K(r)*(Math.PI/180)))),a=yt(()=>110);var o=Zu(),s=H(o),c=H(s,!0);R(s);var l=U(s,2),u=H(l,!0);R(l),R(o),Ln((e,r)=>{si(o,`
left: calc(50% + ${e??``}px - 36px);
top: calc(50% + ${r??``}px - 36px);
animation-delay: ${n*55}ms;
`),Z(c,(K(t),q(()=>K(t).icon))),Z(u,(K(t),q(()=>K(t).label)))},[()=>(wr(K(i)),wr(K(a)),q(()=>Math.cos(K(i))*K(a))),()=>(wr(K(i)),wr(K(a)),q(()=>Math.sin(K(i))*K(a)))]),J(`click`,o,()=>C(K(t).id)),X(e,o)});var r=U(n,2);R(t),J(`click`,r,()=>{V(a,!1)}),X(e,t)};Ur(ie,e=>{!i()&&K(a)&&e(ae)});var oe=U(ie,2),se=e=>{var t=$u(),n=H(t),r=H(n),i=H(r,!0);R(r);var a=U(r,2),s=H(a,!0);R(a);var c=U(a,2),l=H(c,!0);R(c);var u=U(c,2),d=H(u);R(u);var f=U(u,2),p=H(f),m=U(p,2);R(f),R(n),R(t),Ln(()=>{Z(i,(K(o),q(()=>K(o).icon))),Z(s,(K(o),q(()=>K(o).title))),Z(l,(K(o),q(()=>K(o).description))),Z(d,`${(K(o),q(()=>K(o).hint))??``}`)}),J(`click`,p,T),J(`click`,m,w),J(`click`,t,xi(()=>V(o,null))),X(e,t)};Ur(oe,e=>{K(o)&&e(se)});var ce=U(oe,2);let le;var L=H(ce),ue=U(H(L),2),de=H(ue,!0);R(ue),R(L);var fe=U(L,2),pe=H(fe);vn(pe);var me=U(pe,2),he=H(me,!0);R(me),R(fe),R(ce),Pe(4),Ln(e=>{re=ai(I,1,`scene svelte-svg88v`,null,re,{embedded:i()}),le=ai(ce,1,`thought-wrap svelte-svg88v`,null,le,{visible:K(c)}),Z(de,K(l)),pe.disabled=K(p),me.disabled=e,Z(he,K(p)?``:``)},[()=>(K(p),K(u),q(()=>K(p)||!K(u).trim()))]),gi(pe,()=>K(u),e=>V(u,e)),J(`keydown`,pe,k),J(`click`,me,ee),X(e,A),Ke()}var nd=Y(`<div class="menu-card svelte-1n46o8q"><h1 class="svelte-1n46o8q">Choose a page</h1> <div class="button-grid svelte-1n46o8q"><button class="page-btn svelte-1n46o8q">Land</button> <button class="page-btn svelte-1n46o8q">Bee</button> <button class="page-btn svelte-1n46o8q">Chicken</button> <button class="page-btn svelte-1n46o8q">Blobfish</button> <button class="page-btn svelte-1n46o8q">Sloth</button> <button class="page-btn svelte-1n46o8q">Dove</button></div></div>`),rd=Y(`<div class="menu-card placeholder svelte-1n46o8q"><h1 class="svelte-1n46o8q"> </h1> <p class="svelte-1n46o8q">This page is a placeholder. You can create it later and wire it in here.</p> <button class="back-btn svelte-1n46o8q">Back to menu</button></div>`),id=Y(`<div class="app-shell svelte-1n46o8q"><!></div>`);function ad(e){let t=B(`menu`);function n(e){V(t,e)}var r=id(),i=H(r),a=e=>{var t=nd(),r=U(H(t),2),i=H(r),a=U(i,2),o=U(a,2),s=U(o,2),c=U(s,2),l=U(c,2);R(r),R(t),J(`click`,i,()=>n(`land`)),J(`click`,a,()=>n(`bee`)),J(`click`,o,()=>n(`chicken`)),J(`click`,s,()=>n(`blobfish`)),J(`click`,c,()=>n(`sloth`)),J(`click`,l,()=>n(`dove`)),X(e,t)},o=e=>{Zi(e,{$$events:{back:()=>n(`menu`)}})},s=e=>{gu(e,{$$events:{back:()=>n(`menu`)}})},c=e=>{wu(e,{$$events:{back:()=>n(`menu`)}})},l=e=>{Fu(e,{$$events:{back:()=>n(`menu`)}})},u=e=>{Gu(e,{$$events:{back:()=>n(`menu`)}})},d=e=>{td(e,{$$events:{back:()=>n(`menu`)}})},f=e=>{var r=rd(),i=H(r),a=H(i,!0);R(i);var o=U(i,4);R(r),Ln(()=>Z(a,K(t)===`page3`?`Page 3`:`Page`)),J(`click`,o,()=>n(`menu`)),X(e,r)};Ur(i,e=>{K(t)===`menu`?e(a):K(t)===`land`?e(o,1):K(t)===`bee`?e(s,2):K(t)===`chicken`?e(c,3):K(t)===`blobfish`?e(l,4):K(t)===`sloth`?e(u,5):K(t)===`dove`?e(d,6):e(f,-1)}),R(r),X(e,r)}Rr(ad,{target:document.getElementById(`app`)});