playlight-sdk 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,282 +0,0 @@
1
- var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m,w,y,b,x,$,k,_,M,S,E,C,O,I,W,P,j,T,L,A,N,z,B,D,R,q,F,Y,G,H,V,K,U,X,Z,J,Q,tt,et,nt,rt,ot,it=Object.defineProperty,lt=t=>{throw TypeError(t)},st=(t,e,n)=>((t,e,n)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),at=(t,e,n)=>e.has(t)||lt("Cannot "+n),ct=(t,e,n)=>(at(t,e,"read from private field"),n?n.call(t):e.get(t)),ut=(t,e,n)=>e.has(t)?lt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),dt=(t,e,n,r)=>(at(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ft=(t,e,n)=>(at(t,e,"access private method"),n);const vt={exitIntent:{enabled:!0,immediate:!1},sidebar:{hasFrameworkRoot:"auto",forceVisible:!1}};function ht(t={}){return pt(vt,t)}function pt(t,e){const n={...t};return gt(t)&&gt(e)&&Object.keys(e).forEach(r=>{gt(e[r])?r in t?n[r]=pt(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}function gt(t){return t&&"object"==typeof t&&!Array.isArray(t)}var mt=Array.isArray,wt=Array.prototype.indexOf,yt=Array.from,bt=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,kt=Object.prototype,_t=Array.prototype,Mt=Object.getPrototypeOf,St=Object.isExtensible;function Et(t){return"function"==typeof t}const Ct=()=>{};function Ot(t){return t()}function It(t){for(var e=0;e<t.length;e++)t[e]()}function Wt(){var t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function Pt(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const n=[];for(const r of t)if(n.push(r),n.length===e)break;return n}const jt=16,Tt=1024,Lt=2048,At=4096,Nt=8192,zt=16384,Bt=32768,Dt=65536,Rt=1<<19,qt=256,Ft=1<<21,Yt=1<<23,Gt=Symbol("$state"),Ht=Symbol("legacy props"),Vt=Symbol(""),Kt=new class extends Error{constructor(){super(...arguments),st(this,"name","StaleReactionError"),st(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Ut(t){return t===this.v}function Xt(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function Zt(t){return!Xt(t,this.v)}function Jt(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let Qt=!1;const te=Symbol();let ee=null;function ne(t){ee=t}function re(t){return se().get(t)}function oe(t,e=!1,n){ee={p:ee,c:null,e:null,s:t,x:null,l:Qt&&!e?{s:null,u:null,$:[]}:null}}function ie(t){var e=ee,n=e.e;if(null!==n)for(var r of(e.e=null,n))Jn(r);return ee=e.p,{}}function le(){return!Qt||null!==ee&&null===ee.l}function se(t){return null===ee&&Jt(),ee.c??(ee.c=new Map(function(t){let e=t.p;for(;null!==e;){const t=e.c;if(null!==t)return t;e=e.p}return null}(ee)||void 0))}let ae=[];function ce(){var t=ae;ae=[],It(t)}function ue(t){if(0===ae.length&&!Ne){var e=ae;queueMicrotask(()=>{e===ae&&ce()})}ae.push(t)}function de(){for(;ae.length>0;)ce()}function fe(t){if("object"!=typeof t||null===t||Gt in t)return t;const e=Mt(t);if(e!==kt&&e!==_t)return t;var n=new Map,r=mt(t),o=on(0),i=Wn,l=t=>{if(Wn===i)return t();var e=yn,n=Wn;xn(null),Pn(i);var r=t();return xn(e),Pn(n),r};return r&&n.set("length",on(t.length)),new Proxy(t,{defineProperty(t,e,r){"value"in r&&!1!==r.configurable&&!1!==r.enumerable&&!1!==r.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var o=n.get(e);return void 0===o?o=l(()=>{var t=on(r.value);return n.set(e,t),t}):sn(o,r.value,!0),!0},deleteProperty(t,e){var r=n.get(e);if(void 0===r){if(e in t){const t=l(()=>on(te));n.set(e,t),un(o)}}else sn(r,te),un(o);return!0},get(e,r,o){var i;if(r===Gt)return t;var s=n.get(r),a=r in e;if(void 0!==s||a&&!(null==(i=xt(e,r))?void 0:i.writable)||(s=l(()=>on(fe(a?e[r]:te))),n.set(r,s)),void 0!==s){var c=Rn(s);return c===te?void 0:c}return Reflect.get(e,r,o)},getOwnPropertyDescriptor(t,e){var r=Reflect.getOwnPropertyDescriptor(t,e);if(r&&"value"in r){var o=n.get(e);o&&(r.value=Rn(o))}else if(void 0===r){var i=n.get(e),l=null==i?void 0:i.v;if(void 0!==i&&l!==te)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return r},has(t,e){var r;if(e===Gt)return!0;var o=n.get(e),i=void 0!==o&&o.v!==te||Reflect.has(t,e);return!((void 0!==o||null!==$n&&(!i||(null==(r=xt(t,e))?void 0:r.writable)))&&(void 0===o&&(o=l(()=>on(i?fe(t[e]):te)),n.set(e,o)),Rn(o)===te))&&i},set(t,e,i,s){var a,c=n.get(e),u=e in t;if(r&&"length"===e)for(var d=i;d<c.v;d+=1){var f=n.get(d+"");void 0!==f?sn(f,te):d in t&&(f=l(()=>on(te)),n.set(d+"",f))}void 0===c?u&&!(null==(a=xt(t,e))?void 0:a.writable)||(sn(c=l(()=>on(void 0)),fe(i)),n.set(e,c)):(u=c.v!==te,sn(c,l(()=>fe(i))));var v=Reflect.getOwnPropertyDescriptor(t,e);if((null==v?void 0:v.set)&&v.set.call(s,i),!u){if(r&&"string"==typeof e){var h=n.get("length"),p=Number(e);Number.isInteger(p)&&p>=h.v&&sn(h,p+1)}un(o)}return!0},ownKeys(t){Rn(o);var e=Reflect.ownKeys(t).filter(t=>{var e=n.get(t);return void 0===e||e.v!==te});for(var[r,i]of n)i.v===te||r in t||e.push(r);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function ve(t){try{if(null!==t&&"object"==typeof t&&Gt in t)return t[Gt]}catch{}return t}function he(t,e){return Object.is(ve(t),ve(e))}var pe,ge,me,we;function ye(t=""){return document.createTextNode(t)}function be(t){return me.call(t)}function xe(t){return we.call(t)}function $e(t,e){return be(t)}function ke(t,e=!1){var n=be(t);return n instanceof Comment&&""===n.data?xe(n):n}function _e(t,e=1,n=!1){let r=t;for(;e--;)r=xe(r);return r}const Me=new WeakMap;function Se(t){var e=$n;if(null===e)return yn.f|=Yt,t;if(0===(e.f&Bt)){if(!(128&e.f))throw!e.parent&&t instanceof Error&&Ce(t),t;e.b.error(t)}else Ee(t,e)}function Ee(t,e){for(;null!==e;){if(128&e.f)try{return void e.b.error(t)}catch(n){t=n}e=e.parent}throw t instanceof Error&&Ce(t),t}function Ce(t){const e=Me.get(t);e&&(bt(t,"message",{value:e.message}),bt(t,"stack",{value:e.stack}))}const Oe=new Set;let Ie=null,We=null,Pe=null,je=new Set,Te=[],Le=null,Ae=!1,Ne=!1;t=new WeakMap,e=new WeakMap,n=new WeakMap,r=new WeakMap,o=new WeakMap,i=new WeakMap,l=new WeakMap,s=new WeakSet,a=function(t,e){var n;t.f^=Tt;for(var r=t.first;null!==r;){var o=r.f,i=!!(96&o),l=i&&0!==(o&Tt)||0!==(o&Nt)||this.skipped_effects.has(r);if(!!(128&r.f)&&(null==(n=r.b)?void 0:n.is_pending())&&(e={parent:e,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&null!==r.fn){i?r.f^=Tt:4&o?e.effects.push(r):Ln(r)&&(0!==(r.f&jt)&&e.block_effects.push(r),Dn(r));var a=r.first;if(null!==a){r=a;continue}}var u=r.parent;for(r=r.next;null===r&&null!==u;)u===e.effect&&(ft(this,s,c).call(this,e.effects),ft(this,s,c).call(this,e.render_effects),ft(this,s,c).call(this,e.block_effects),e=e.parent),r=u.next,u=u.parent}},c=function(t){for(const e of t)(0!==(e.f&Lt)?ct(this,i):ct(this,l)).push(e),Gn(e,Tt)},u=function(){if(0===ct(this,r)){for(const t of ct(this,e))t();ct(this,e).clear()}0===ct(this,n)&&ft(this,s,d).call(this)},d=function(){var e,n;if(Oe.size>1){ct(this,t).clear();var r=Pe,i=!0,l={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const t of Oe){if(t===this){i=!1;continue}const n=[];for(const[e,o]of this.current){if(t.current.has(e)){if(!i||o===t.current.get(e))continue;t.current.set(e,o)}n.push(e)}if(0===n.length)continue;const r=[...t.current.keys()].filter(t=>!this.current.has(t));if(r.length>0){const o=new Set,i=new Map;for(const t of n)Fe(t,r,o,i);if(Te.length>0){Ie=t,t.apply();for(const n of Te)ft(e=t,s,a).call(e,n,l);Te=[],t.deactivate()}}}Ie=null,Pe=r}this.committed=!0,Oe.delete(this),null==(n=ct(this,o))||n.resolve()};let ze=class d{constructor(){ut(this,s),st(this,"committed",!1),st(this,"current",new Map),ut(this,t,new Map),ut(this,e,new Set),ut(this,n,0),ut(this,r,0),ut(this,o,null),ut(this,i,[]),ut(this,l,[]),st(this,"skipped_effects",new Set)}process(t){Te=[],We=null,this.apply();var e={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)ft(this,s,a).call(this,n,e);ft(this,s,u).call(this),ct(this,r)>0?(ft(this,s,c).call(this,e.effects),ft(this,s,c).call(this,e.render_effects),ft(this,s,c).call(this,e.block_effects)):(We=this,Ie=null,qe(e.render_effects),qe(e.effects),We=null),Pe=null}capture(e,n){ct(this,t).has(e)||ct(this,t).set(e,n),this.current.set(e,e.v),null==Pe||Pe.set(e,e.v)}activate(){Ie=this}deactivate(){Ie=null,Pe=null}flush(){if(Te.length>0){if(this.activate(),Be(),null!==Ie&&Ie!==this)return}else ft(this,s,u).call(this);this.deactivate();for(const t of je)if(je.delete(t),t(),null!==Ie)break}increment(t){dt(this,n,ct(this,n)+1),t&&dt(this,r,ct(this,r)+1)}decrement(t){dt(this,n,ct(this,n)-1),t&&dt(this,r,ct(this,r)-1);for(const e of ct(this,i))Gn(e,Lt),Ge(e);for(const e of ct(this,l))Gn(e,At),Ge(e);dt(this,i,[]),dt(this,l,[]),this.flush()}add_callback(t){ct(this,e).add(t)}settled(){return(ct(this,o)??dt(this,o,Wt())).promise}static ensure(){if(null===Ie){const t=Ie=new d;Oe.add(Ie),Ne||d.enqueue(()=>{Ie===t&&t.flush()})}return Ie}static enqueue(t){ue(t)}apply(){}};function Be(){var t=pn;Ae=!0;try{var e=0;for(gn(!0);Te.length>0;){var n=ze.ensure();e++>1e3&&De(),n.process(Te),nn.clear()}}finally{Ae=!1,gn(t),Le=null}}function De(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){Ee(t,Le)}}let Re=null;function qe(t){var e=t.length;if(0!==e){for(var n=0;n<e;){var r=t[n++];if(!(24576&r.f)&&Ln(r)&&(Re=new Set,Dn(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown&&null===r.ac?ar(r):r.fn=null),(null==Re?void 0:Re.size)>0)){nn.clear();for(const t of Re){if(24576&t.f)continue;const e=[t];let n=t.parent;for(;null!==n;)Re.has(n)&&(Re.delete(n),e.push(n)),n=n.parent;for(let t=e.length-1;t>=0;t--){const n=e[t];24576&n.f||Dn(n)}}Re.clear()}}Re=null}}function Fe(t,e,n,r){if(!n.has(t)&&(n.add(t),null!==t.reactions))for(const o of t.reactions){const t=o.f;2&t?Fe(o,e,n,r):4194320&t&&0===(t&Lt)&&Ye(o,e,r)&&(Gn(o,Lt),Ge(o))}}function Ye(t,e,n){const r=n.get(t);if(void 0!==r)return r;if(null!==t.deps)for(const o of t.deps){if(e.includes(o))return!0;if(2&o.f&&Ye(o,e,n))return n.set(o,!0),!0}return n.set(t,!1),!1}function Ge(t){for(var e=Le=t;null!==e.parent;){var n=(e=e.parent).f;if(Ae&&e===$n&&0!==(n&jt))return;if(96&n){if(0===(n&Tt))return;e.f^=Tt}}Te.push(e)}function He(t){let e,n=0,r=rn(0);return()=>{(function(){return null!==yn&&!bn})()&&(Rn(r),er(()=>(0===n&&(e=Fn(()=>t(()=>un(r)))),n+=1,()=>{ue(()=>{n-=1,0===n&&(null==e||e(),e=void 0,un(r))})})))}}class Ve{constructor(t,e,n){ut(this,O),st(this,"parent"),ut(this,f,!1),ut(this,v),ut(this,h,null),ut(this,p),ut(this,g),ut(this,m),ut(this,w,null),ut(this,y,null),ut(this,b,null),ut(this,x,null),ut(this,$,null),ut(this,k,0),ut(this,_,0),ut(this,M,!1),ut(this,S,null),ut(this,E,()=>{ct(this,S)&&an(ct(this,S),ct(this,k))}),ut(this,C,He(()=>(dt(this,S,rn(ct(this,k))),()=>{dt(this,S,null)}))),dt(this,v,t),dt(this,p,e),dt(this,g,n),this.parent=$n.b,dt(this,f,!!ct(this,p).pending),dt(this,m,rr(()=>{$n.b=this;var t=ft(this,O,I).call(this);try{dt(this,w,or(()=>n(t)))}catch(e){this.error(e)}return ct(this,_)>0?ft(this,O,P).call(this):dt(this,f,!1),()=>{var t;null==(t=ct(this,$))||t.remove()}},589952))}is_pending(){return ct(this,f)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!ct(this,p).pending}update_pending_count(t){ft(this,O,j).call(this,t),dt(this,k,ct(this,k)+t),je.add(ct(this,E))}get_effect_pending(){return ct(this,C).call(this),Rn(ct(this,S))}error(t){var e=ct(this,p).onerror;let n=ct(this,p).failed;if(ct(this,M)||!e&&!n)throw t;ct(this,w)&&(sr(ct(this,w)),dt(this,w,null)),ct(this,y)&&(sr(ct(this,y)),dt(this,y,null)),ct(this,b)&&(sr(ct(this,b)),dt(this,b,null));var r=!1,o=!1;const i=()=>{r?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,o&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),ze.ensure(),dt(this,k,0),null!==ct(this,b)&&cr(ct(this,b),()=>{dt(this,b,null)}),dt(this,f,this.has_pending_snippet()),dt(this,w,ft(this,O,W).call(this,()=>(dt(this,M,!1),or(()=>ct(this,g).call(this,ct(this,v)))))),ct(this,_)>0?ft(this,O,P).call(this):dt(this,f,!1))};var l=yn;try{xn(null),o=!0,null==e||e(t,i),o=!1}catch(s){Ee(s,ct(this,m)&&ct(this,m).parent)}finally{xn(l)}n&&ue(()=>{dt(this,b,ft(this,O,W).call(this,()=>{ze.ensure(),dt(this,M,!0);try{return or(()=>{n(ct(this,v),()=>t,()=>i)})}catch(s){return Ee(s,ct(this,m).parent),null}finally{dt(this,M,!1)}}))})}}function Ke(t,e,n){const r=le()?Xe:Je;if(0!==e.length){var o=Ie,i=$n,l=function(){var t=$n,e=yn,n=ee,r=Ie;return function(){kn(t),xn(e),ne(n),null==r||r.activate()}}();Promise.all(e.map(t=>function(t){let e=$n;null===e&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var n=e.b,r=void 0,o=rn(te),i=!yn,l=new Map;return Un(4718592,()=>{var e,s=Wt();r=s.promise;try{Promise.resolve(t()).then(s.resolve,s.reject).then(()=>{a===Ie&&a.committed&&a.deactivate(),Ue()})}catch(d){s.reject(d),Ue()}var a=Ie;if(i){var c=!n.is_pending();n.update_pending_count(1),a.increment(c),null==(e=l.get(a))||e.reject(Kt),l.delete(a),l.set(a,s)}const u=(t,e=void 0)=>{if(a.activate(),e)e!==Kt&&(o.f|=Yt,an(o,e));else{0!==(o.f&Yt)&&(o.f^=Yt),an(o,t);for(const[t,e]of l){if(l.delete(t),t===a)break;e.reject(Kt)}}i&&(n.update_pending_count(-1),a.decrement(c))};s.promise.then(u,t=>u(null,t||"unknown"))},!0),Xn(()=>{for(const t of l.values())t.reject(Kt)}),new Promise(t=>{!function e(n){function i(){n===r?t(o):e(r)}n.then(i,i)}(r)})}(t))).then(e=>{l();try{n([...t.map(r),...e])}catch(s){0===(i.f&zt)&&Ee(s,i)}null==o||o.deactivate(),Ue()}).catch(t=>{Ee(t,i)})}else n(t.map(r))}function Ue(){kn(null),xn(null),ne(null)}function Xe(t){var e=2050,n=null!==yn&&2&yn.f?yn:null;return null===$n||null!==n&&0!==(n.f&qt)?e|=qt:$n.f|=Rt,{ctx:ee,deps:null,effects:null,equals:Ut,f:e,fn:t,reactions:null,rv:0,v:te,wv:0,parent:n??$n,ac:null}}function Ze(t){const e=Xe(t);return Mn(e),e}function Je(t){const e=Xe(t);return e.equals=Zt,e}function Qe(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)sr(e[n])}}function tn(t){var e,n=$n;kn(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{t.f&=-32769,Qe(t),e=Nn(t)}finally{kn(n)}return e}function en(t){var e=tn(t);t.equals(e)||(t.v=e,t.wv=Tn()),mn||(null!==Pe?Pe.set(t,t.v):Gn(t,!jn&&0===(t.f&qt)||null===t.deps?Tt:At))}f=new WeakMap,v=new WeakMap,h=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,w=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,$=new WeakMap,k=new WeakMap,_=new WeakMap,M=new WeakMap,S=new WeakMap,E=new WeakMap,C=new WeakMap,O=new WeakSet,I=function(){var t=ct(this,v);return ct(this,f)&&(dt(this,$,ye()),ct(this,v).before(ct(this,$)),t=ct(this,$)),t},W=function(t){var e=$n,n=yn,r=ee;kn(ct(this,m)),xn(ct(this,m)),ne(ct(this,m).ctx);try{return t()}catch(o){return Se(o),null}finally{kn(e),xn(n),ne(r)}},P=function(){const t=ct(this,p).pending;null!==ct(this,w)&&(dt(this,x,document.createDocumentFragment()),ct(this,x).append(ct(this,$)),hr(ct(this,w),ct(this,x))),null===ct(this,y)&&dt(this,y,or(()=>t(ct(this,v))))},j=function(t){var e;this.has_pending_snippet()?(dt(this,_,ct(this,_)+t),0===ct(this,_)&&(dt(this,f,!1),ct(this,y)&&cr(ct(this,y),()=>{dt(this,y,null)}),ct(this,x)&&(ct(this,v).before(ct(this,x)),dt(this,x,null)))):this.parent&&ft(e=this.parent,O,j).call(e,t)};const nn=new Map;function rn(t,e){return{f:0,v:t,reactions:null,equals:Ut,rv:0,wv:0}}function on(t,e){const n=rn(t);return Mn(n),n}function ln(t,e=!1,n=!0){var r;const o=rn(t);return e||(o.equals=Zt),Qt&&n&&null!==ee&&null!==ee.l&&((r=ee.l).s??(r.s=[])).push(o),o}function sn(t,e,n=!1){return null!==yn&&(!bn||!!(131072&yn.f))&&le()&&4325394&yn.f&&!(null==_n?void 0:_n.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),an(t,n?fe(e):e)}function an(t,e){if(!t.equals(e)){var n=t.v;mn?nn.set(t,e):nn.set(t,n),t.v=e,ze.ensure().capture(t,n),2&t.f&&(0!==(t.f&Lt)&&tn(t),Gn(t,0===(t.f&qt)?Tt:At)),t.wv=Tn(),dn(t,Lt),!le()||null===$n||0===($n.f&Tt)||96&$n.f||(null===Cn?Cn=[t]:Cn.push(t))}return e}function cn(t,e=1){var n=Rn(t),r=1===e?n++:n--;return sn(t,n),r}function un(t){sn(t,t.v+1)}function dn(t,e){var n=t.reactions;if(null!==n)for(var r=le(),o=n.length,i=0;i<o;i++){var l=n[i],s=l.f;if(r||l!==$n){var a=0===(s&Lt);a&&Gn(l,e),2&s?!(32768&s)&&(l.f|=32768,dn(l,At)):a&&(0!==(s&jt)&&null!==Re&&Re.add(l),Ge(l))}}}function fn(t,e){if(e){const e=document.body;t.autofocus=!0,ue(()=>{document.activeElement===e&&t.focus()})}}let vn=!1;function hn(t){var e=yn,n=$n;xn(null),kn(null);try{return t()}finally{xn(e),kn(n)}}let pn=!1;function gn(t){pn=t}let mn=!1;function wn(t){mn=t}let yn=null,bn=!1;function xn(t){yn=t}let $n=null;function kn(t){$n=t}let _n=null;function Mn(t){null!==yn&&(null===_n?_n=[t]:_n.push(t))}let Sn=null,En=0,Cn=null,On=1,In=0,Wn=In;function Pn(t){Wn=t}let jn=!1;function Tn(){return++On}function Ln(t){var e,n=t.f;if(0!==(n&Lt))return!0;if(0!==(n&At)){var r=t.deps,o=0!==(n&qt);if(2&n&&(t.f&=-32769),null!==r){var i,l,s=!!(512&n),a=o&&null!==$n&&!jn,c=r.length;if((s||a)&&(null===$n||0===($n.f&zt))){var u=t,d=u.parent;for(i=0;i<c;i++)l=r[i],!s&&(null==(e=null==l?void 0:l.reactions)?void 0:e.includes(u))||(l.reactions??(l.reactions=[])).push(u);s&&(u.f^=512),a&&null!==d&&0===(d.f&qt)&&(u.f^=qt)}for(i=0;i<c;i++)if(Ln(l=r[i])&&en(l),l.wv>t.wv)return!0}o&&(null===$n||jn)||Gn(t,Tt)}return!1}function An(t,e,n=!0){var r=t.reactions;if(null!==r&&!(null==_n?void 0:_n.includes(t)))for(var o=0;o<r.length;o++){var i=r[o];2&i.f?An(i,e,!1):e===i&&(n?Gn(i,Lt):0!==(i.f&Tt)&&Gn(i,At),Ge(i))}}function Nn(t){var e,n=Sn,r=En,o=Cn,i=yn,l=jn,s=_n,a=ee,c=bn,u=Wn,d=t.f;Sn=null,En=0,Cn=null,jn=0!==(d&qt)&&(bn||!pn||null===yn),yn=96&d?null:t,_n=null,ne(t.ctx),bn=!1,Wn=++In,null!==t.ac&&(hn(()=>{t.ac.abort(Kt)}),t.ac=null);try{t.f|=Ft;var f=(0,t.fn)(),v=t.deps;if(null!==Sn){var h;if(Bn(t,En),null!==v&&En>0)for(v.length=En+Sn.length,h=0;h<Sn.length;h++)v[En+h]=Sn[h];else t.deps=v=Sn;if(!jn||2&d&&null!==t.reactions)for(h=En;h<v.length;h++)((e=v[h]).reactions??(e.reactions=[])).push(t)}else null!==v&&En<v.length&&(Bn(t,En),v.length=En);if(le()&&null!==Cn&&!bn&&null!==v&&!(6146&t.f))for(h=0;h<Cn.length;h++)An(Cn[h],t);return null!==i&&i!==t&&(In++,null!==Cn&&(null===o?o=Cn:o.push(...Cn))),0!==(t.f&Yt)&&(t.f^=Yt),f}catch(p){return Se(p)}finally{t.f^=Ft,Sn=n,En=r,Cn=o,yn=i,jn=l,_n=s,ne(a),bn=c,Wn=u}}function zn(t,e){let n=e.reactions;if(null!==n){var r=wt.call(n,t);if(-1!==r){var o=n.length-1;0===o?n=e.reactions=null:(n[r]=n[o],n.pop())}}null===n&&2&e.f&&(null===Sn||!Sn.includes(e))&&(Gn(e,At),768&e.f||(e.f^=512),Qe(e),Bn(e,0))}function Bn(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)zn(t,n[r])}function Dn(t){var e=t.f;if(0===(e&zt)){Gn(t,Tt);var n=$n,r=pn;$n=t,pn=!0;try{0!==(e&jt)?function(t){for(var e=t.first;null!==e;){var n=e.next;!(32&e.f)&&sr(e),e=n}}(t):lr(t),ir(t);var o=Nn(t);t.teardown="function"==typeof o?o:null,t.wv=On}finally{pn=r,$n=n}}}function Rn(t){var e=!!(2&t.f);if(null===yn||bn){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null!==r&&0===(r.f&qt)&&(n.f^=qt)}}else if((null===$n||0===($n.f&zt))&&!(null==_n?void 0:_n.includes(t))){var o=yn.deps;if(0!==(yn.f&Ft))t.rv<In&&(t.rv=In,null===Sn&&null!==o&&o[En]===t?En++:null===Sn?Sn=[t]:jn&&Sn.includes(t)||Sn.push(t));else{(yn.deps??(yn.deps=[])).push(t);var i=t.reactions;null===i?t.reactions=[yn]:i.includes(yn)||i.push(yn)}}if(mn){if(nn.has(t))return nn.get(t);if(e){var l=(n=t).v;return(0===(n.f&Tt)&&null!==n.reactions||qn(n))&&(l=tn(n)),nn.set(n,l),l}}else if(e){if(n=t,null==Pe?void 0:Pe.has(n))return Pe.get(n);Ln(n)&&en(n)}if(null==Pe?void 0:Pe.has(t))return Pe.get(t);if(0!==(t.f&Yt))throw t.v;return t.v}function qn(t){if(t.v===te)return!0;if(null===t.deps)return!1;for(const e of t.deps){if(nn.has(e))return!0;if(2&e.f&&qn(e))return!0}return!1}function Fn(t){var e=bn;try{return bn=!0,t()}finally{bn=e}}const Yn=-7169;function Gn(t,e){t.f=t.f&Yn|e}function Hn(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(Gt in t)Vn(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&Gt in n&&Vn(n)}}function Vn(t,e=new Set){if(!("object"!=typeof t||null===t||t instanceof EventTarget||e.has(t))){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{Vn(t[o],e)}catch(n){}const r=Mt(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=$t(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function Kn(t){null===$n&&null===yn&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==yn&&0!==(yn.f&qt)&&null===$n&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),mn&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Un(t,e,n,r=!0){var o=$n;null!==o&&0!==(o.f&Nt)&&(t|=Nt);var i,l,s,a={ctx:ee,deps:null,nodes_start:null,nodes_end:null,f:t|Lt,first:null,fn:e,last:null,next:null,parent:o,b:o&&o.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{Dn(a),a.f|=Bt}catch(d){throw sr(a),d}else null!==e&&Ge(a);if(r){var c=a;if(n&&null===c.deps&&null===c.teardown&&null===c.nodes_start&&c.first===c.last&&0===(c.f&Rt)&&(c=c.first,0!==(t&jt)&&0!==(t&Dt)&&null!==c&&(c.f|=Dt)),null!==c&&(c.parent=o,null!==o&&(i=c,null===(s=(l=o).last)?l.last=l.first=i:(s.next=i,i.prev=s,l.last=i)),null!==yn&&2&yn.f&&!(64&t))){var u=yn;(u.effects??(u.effects=[])).push(c)}}return a}function Xn(t){const e=Un(8,null,!1);return Gn(e,Tt),e.teardown=t,e}function Zn(t){Kn();var e=$n.f;if(yn||!(32&e)||0!==(e&Bt))return Jn(t);var n=ee;(n.e??(n.e=[])).push(t)}function Jn(t){return Un(1048580,t,!1)}function Qn(t){return Kn(),Un(1048584,t,!0)}function tr(t){return Un(4,t,!1)}function er(t,e=0){return Un(8|e,t,!0)}function nr(t,e=[],n=[]){Ke(e,n,e=>{Un(8,()=>t(...e.map(Rn)),!0)})}function rr(t,e=0){return Un(jt|e,t,!0)}function or(t,e=!0){return Un(524320,t,!0,e)}function ir(t){var e=t.teardown;if(null!==e){const t=mn,n=yn;wn(!0),xn(null);try{e.call(null)}finally{wn(t),xn(n)}}}function lr(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){const t=n.ac;null!==t&&hn(()=>{t.abort(Kt)});var r=n.next;64&n.f?n.parent=null:sr(n,e),n=r}}function sr(t,e=!0){var n=!1;(e||262144&t.f)&&null!==t.nodes_start&&null!==t.nodes_end&&(function(t,e){for(;null!==t;){var n=t===e?null:xe(t);t.remove(),t=n}}(t.nodes_start,t.nodes_end),n=!0),lr(t,e&&!n),Bn(t,0),Gn(t,zt);var r=t.transitions;if(null!==r)for(const i of r)i.stop();ir(t);var o=t.parent;null!==o&&null!==o.first&&ar(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function ar(t){var e=t.parent,n=t.prev,r=t.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==e&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function cr(t,e,n=!0){var r=[];dr(t,r,!0),ur(r,()=>{n&&sr(t),e&&e()})}function ur(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function dr(t,e,n){if(0===(t.f&Nt)){if(t.f^=Nt,null!==t.transitions)for(const r of t.transitions)(r.is_global||n)&&e.push(r);for(var r=t.first;null!==r;){var o=r.next;dr(r,e,!!(0!==(r.f&Dt)||32&r.f&&0!==(t.f&jt))&&n),r=o}}}function fr(t){vr(t,!0)}function vr(t,e){if(0!==(t.f&Nt)){t.f^=Nt,0===(t.f&Tt)&&(Gn(t,Lt),Ge(t));for(var n=t.first;null!==n;){var r=n.next;vr(n,!!(0!==(n.f&Dt)||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}function hr(t,e){for(var n=t.nodes_start,r=t.nodes_end;null!==n;){var o=n===r?null:xe(n);e.append(n),n=o}}function pr(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const gr=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function mr(t){return gr.includes(t)}const wr={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function yr(t){return t=t.toLowerCase(),wr[t]??t}const br=["touchstart","touchmove"];function xr(t){return br.includes(t)}const $r=new Set,kr=new Set;function _r(t,e,n,r={}){function o(t){if(r.capture||Or.call(e,t),!t.cancelBubble)return hn(()=>null==n?void 0:n.call(this,t))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?ue(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function Mr(t,e,n,r={}){var o=_r(e,t,n,r);return()=>{t.removeEventListener(e,o,r)}}function Sr(t,e,n,r,o){var i={capture:r,passive:o},l=_r(t,e,n,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Xn(()=>{e.removeEventListener(t,l,i)})}function Er(t){for(var e=0;e<t.length;e++)$r.add(t[e]);for(var n of kr)n(t)}let Cr=null;function Or(t){var e,n=this,r=n.ownerDocument,o=t.type,i=(null==(e=t.composedPath)?void 0:e.call(t))||[],l=i[0]||t.target;Cr=t;var s=0,a=Cr===t&&t.__root;if(a){var c=i.indexOf(a);if(-1!==c&&(n===document||n===window))return void(t.__root=n);var u=i.indexOf(n);if(-1===u)return;c<=u&&(s=c)}if((l=i[s]||t.target)!==n){bt(t,"currentTarget",{configurable:!0,get:()=>l||r});var d=yn,f=$n;xn(null),kn(null);try{for(var v,h=[];null!==l;){var p=l.assignedSlot||l.parentNode||l.host||null;try{var g=l["__"+o];if(null!=g&&(!l.disabled||t.target===l))if(mt(g)){var[m,...w]=g;m.apply(l,[t,...w])}else g.call(l,t)}catch(y){v?h.push(y):v=y}if(t.cancelBubble||p===n||null===p)break;l=p}if(v){for(let t of h)queueMicrotask(()=>{throw t});throw v}}finally{t.__root=n,delete t.currentTarget,xn(d),kn(f)}}}function Ir(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","\x3c!----\x3e"),e.content}function Wr(t,e){var n=$n;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function Pr(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Ir(i?t:"<!>"+t),r||(n=be(n)));var e=o||ge?document.importNode(n,!0):n.cloneNode(!0);return r?Wr(be(e),e.lastChild):Wr(e,e),e}}function jr(t,e){return function(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=be(Ir(o));r=be(t)}var e=r.cloneNode(!0);return Wr(e,e),e}}(t,0,"svg")}function Tr(t=""){var e=ye(t+"");return Wr(e,e),e}function Lr(){var t=document.createDocumentFragment(),e=document.createComment(""),n=ye();return t.append(e,n),Wr(e,n),t}function Ar(t,e){null!==t&&t.before(e)}let Nr=!0;function zr(t){Nr=t}function Br(t,e){var n=null==e?"":"object"==typeof e?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}function Dr(t,e){return function(t,{target:e,anchor:n,props:r={},events:o,context:i,intro:l=!0}){!function(){if(void 0===pe){pe=window,ge=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;me=xt(e,"firstChild").get,we=xt(e,"nextSibling").get,St(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),St(n)&&(n.__t=void 0)}}();var s=new Set,a=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!s.has(r)){s.add(r);var o=xr(r);e.addEventListener(r,Or,{passive:o});var i=Rr.get(r);void 0===i?(document.addEventListener(r,Or,{passive:o}),Rr.set(r,1)):Rr.set(r,i+1)}}};a(yt($r)),kr.add(a);var c=void 0,u=function(t){ze.ensure();const e=Un(524352,t,!0);return(t={})=>new Promise(n=>{t.outro?cr(e,()=>{sr(e),n(void 0)}):(sr(e),n(void 0))})}(()=>{var u,d=n??e.appendChild(ye());return u=e=>{i&&(oe({}),ee.c=i),o&&(r.$$events=o),Nr=l,c=t(e,r)||{},Nr=!0,i&&ie()},new Ve(d,{pending:()=>{}},u),()=>{var t;for(var r of s){e.removeEventListener(r,Or);var o=Rr.get(r);0===--o?(document.removeEventListener(r,Or),Rr.delete(r)):Rr.set(r,o)}kr.delete(a),d!==n&&(null==(t=d.parentNode)||t.removeChild(d))}});return qr.set(c,u),c}(t,e)}const Rr=new Map;let qr=new WeakMap;function Fr(t,e){const n=qr.get(t);return n?(qr.delete(t),n(e)):Promise.resolve()}class Yr{constructor(t,e=!0){st(this,"anchor"),ut(this,T,new Map),ut(this,L,new Map),ut(this,A,new Map),ut(this,N,!0),ut(this,z,()=>{var t=Ie;if(ct(this,T).has(t)){var e=ct(this,T).get(t),n=ct(this,L).get(e);if(n)fr(n);else{var r=ct(this,A).get(e);r&&(ct(this,L).set(e,r.effect),ct(this,A).delete(e),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[e,n]of ct(this,T)){if(ct(this,T).delete(e),e===t)break;const r=ct(this,A).get(n);r&&(sr(r.effect),ct(this,A).delete(n))}for(const[t,r]of ct(this,L)){if(t===e)continue;const o=()=>{if(Array.from(ct(this,T).values()).includes(t)){var e=document.createDocumentFragment();hr(r,e),e.append(ye()),ct(this,A).set(t,{effect:r,fragment:e})}else sr(r);ct(this,L).delete(t)};ct(this,N)||!n?cr(r,o,!1):o()}}}),this.anchor=t,dt(this,N,e)}ensure(t,e){var n=Ie;!e||ct(this,L).has(t)||ct(this,A).has(t)||ct(this,L).set(t,or(()=>e(this.anchor))),ct(this,T).set(n,t),ct(this,z).call(this)}}function Gr(t,e,n=!1){var r=new Yr(t);function o(t,e){r.ensure(t,e)}rr(()=>{var t=!1;e((e,n=!0)=>{t=!0,o(n,e)}),t||o(!1,null)},n?Dt:0)}T=new WeakMap,L=new WeakMap,A=new WeakMap,N=new WeakMap,z=new WeakMap;let Hr=null;function Vr(t){Hr=t}function Kr(t,e){return e}function Ur(t,e,n,r,o,i=null){var l=t,s={flags:e,items:new Map,first:null};!(4&e)||(l=t.appendChild(ye()));var a,c,u=null,d=!1,f=new Map,v=Je(()=>{var t=n();return mt(t)?t:null==t?[]:yt(t)});rr(()=>{c??(c=$n);var t=(a=Rn(v)).length;d&&0===t||(d=0===t,function(t,e,n,r,o,i,l,s,a){var c,u,d,f,v,h,p,g,m,w,y=!!(8&l),b=!!(3&l),x=e.length,$=n.items,k=n.first,_=null,M=[],S=[];if(y)for(w=0;w<x;w+=1)g=s(p=e[w],w),void 0!==(m=$.get(g))&&(null==(c=m.a)||c.measure(),(h??(h=new Set)).add(m));for(w=0;w<x;w+=1)if(g=s(p=e[w],w),void 0!==(m=$.get(g))){if(b&&Xr(m,p,w,l),0!==(m.e.f&Nt)&&(fr(m.e),y&&(null==(u=m.a)||u.unfix(),(h??(h=new Set)).delete(m))),m!==k){if(void 0!==v&&v.has(m)){if(M.length<S.length){var E,C=S[0];_=C.prev;var O=M[0],I=M[M.length-1];for(E=0;E<M.length;E+=1)Jr(M[E],C,o);for(E=0;E<S.length;E+=1)v.delete(S[E]);Qr(n,O.prev,I.next),Qr(n,_,O),Qr(n,I,C),k=C,_=I,w-=1,M=[],S=[]}else v.delete(m),Jr(m,k,o),Qr(n,m.prev,m.next),Qr(n,m,null===_?n.first:_.next),Qr(n,_,m),_=m;continue}for(M=[],S=[];null!==k&&k.k!==g;)0===(k.e.f&Nt)&&(v??(v=new Set)).add(k),S.push(k),k=k.next;if(null===k)continue;m=k}M.push(m),_=m,k=m.next}else{var W=r.get(g);if(void 0!==W){r.delete(g),$.set(g,W);var P=_?_.next:k;Qr(n,_,W),Qr(n,W,P),Jr(W,P,o),_=W}else _=Zr(k?k.e.nodes_start:o,n,_,null===_?n.first:_.next,p,g,w,i,l,a);$.set(g,_),M=[],S=[],k=_.next}if(null!==k||void 0!==v){for(var j=void 0===v?[]:yt(v);null!==k;)0===(k.e.f&Nt)&&j.push(k),k=k.next;var T=j.length;if(T>0){var L=4&l&&0===x?o:null;if(y){for(w=0;w<T;w+=1)null==(d=j[w].a)||d.measure();for(w=0;w<T;w+=1)null==(f=j[w].a)||f.fix()}!function(t,e,n){for(var r=t.items,o=[],i=e.length,l=0;l<i;l++)dr(e[l].e,o,!0);var s=i>0&&0===o.length&&null!==n;if(s){var a=n.parentNode;a.textContent="",a.append(n),r.clear(),Qr(t,e[0].prev,e[i-1].next)}ur(o,()=>{for(var n=0;n<i;n++){var o=e[n];s||(r.delete(o.k),Qr(t,o.prev,o.next)),sr(o.e,!s)}})}(n,j,L)}}for(var A of(y&&ue(()=>{var t;if(void 0!==h)for(m of h)null==(t=m.a)||t.apply()}),t.first=n.first&&n.first.e,t.last=_&&_.e,r.values()))sr(A.e);r.clear()}(c,a,s,f,l,o,e,r,n),null!==i&&(0===a.length?u?fr(u):u=or(()=>i(l)):null!==u&&cr(u,()=>{u=null})),Rn(v))})}function Xr(t,e,n,r){1&r&&an(t.v,e),2&r?an(t.i,n):t.i=n}function Zr(t,e,n,r,o,i,l,s,a,c,u){var d=Hr,f=1&a?16&a?rn(o):ln(o,!1,!1):o,v=2&a?rn(l):l,h={i:v,v:f,k:i,a:null,e:null,prev:n,next:r};Hr=h;try{return null===t&&document.createDocumentFragment().append(t=ye()),h.e=or(()=>s(t,f,v,c),!1),h.e.prev=n&&n.e,h.e.next=r&&r.e,null===n?u||(e.first=h):(n.next=h,n.e.next=h.e),null!==r&&(r.prev=h,r.e.prev=h.e),h}finally{Hr=d}}function Jr(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,o=e?e.e.nodes_start:n,i=t.e.nodes_start;null!==i&&i!==r;){var l=xe(i);o.before(i),i=l}}function Qr(t,e,n){null===e?t.first=n:(e.next=n,e.e.next=n&&n.e),null!==n&&(n.prev=e,n.e.prev=e&&e.e)}function to(t,e,n,r,o){var i,l=null==(i=e.$$slots)?void 0:i[n],s=!1;!0===l&&(l=e.children,s=!0),void 0===l||l(t,s?()=>r:r)}function eo(t,e,...n){var r=new Yr(t);rr(()=>{const t=e()??null;r.ensure(t,t&&(e=>t(e,...n)))},Dt)}function no(t,e,n){var r=new Yr(t);rr(()=>{var t=e()??null;r.ensure(t,t&&(e=>n(e,t)))},Dt)}function ro(t,e){var n,r=void 0;rr(()=>{r!==(r=e())&&(n&&(sr(n),n=null),r&&(n=or(()=>{tr(()=>r(t))})))})}function oo(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=oo(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function io(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=oo(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const lo=[..." \t\n\r\f \v\ufeff"];function so(t,e=!1){var n=e?" !important;":";",r="";for(var o in t){var i=t[o];null!=i&&""!==i&&(r+=" "+o+": "+i+n)}return r}function ao(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function co(t,e,n,r,o,i){var l=t.__className;if(l!==n||void 0===l){var s=function(t,e,n){var r=null==t?"":""+t;if(e&&(r=r?r+" "+e:e),n)for(var o in n)if(n[o])r=r?r+" "+o:o;else if(r.length)for(var i=o.length,l=0;(l=r.indexOf(o,l))>=0;){var s=l+i;0!==l&&!lo.includes(r[l-1])||s!==r.length&&!lo.includes(r[s])?l=s:r=(0===l?"":r.substring(0,l))+r.substring(s+1)}return""===r?null:r}(n,r,i);null==s?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s),t.__className=n}else if(i&&o!==i)for(var a in i){var c=!!i[a];null!=o&&c===!!o[a]||t.classList.toggle(a,c)}return i}function uo(t,e={},n,r){for(var o in n){var i=n[o];e[o]!==i&&(null==n[o]?t.style.removeProperty(o):t.style.setProperty(o,i,r))}}function fo(t,e,n,r){if(t.__style!==e){var o=function(t,e){if(e){var n,r,o="";if(Array.isArray(e)?(n=e[0],r=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,l=0,s=!1,a=[];n&&a.push(...Object.keys(n).map(ao)),r&&a.push(...Object.keys(r).map(ao));var c=0,u=-1;const e=t.length;for(var d=0;d<e;d++){var f=t[d];if(s?"/"===f&&"*"===t[d-1]&&(s=!1):i?i===f&&(i=!1):"/"===f&&"*"===t[d+1]?s=!0:'"'===f||"'"===f?i=f:"("===f?l++:")"===f&&l--,!s&&!1===i&&0===l)if(":"===f&&-1===u)u=d;else if(";"===f||d===e-1){if(-1!==u){var v=ao(t.substring(c,u).trim());a.includes(v)||(";"!==f&&d++,o+=" "+t.substring(c,d).trim()+";")}c=d+1,u=-1}}}return n&&(o+=so(n)),r&&(o+=so(r,!0)),""===(o=o.trim())?null:o}return null==t?null:String(t)}(e,r);null==o?t.removeAttribute("style"):t.style.cssText=o,t.__style=e}else r&&(Array.isArray(r)?(uo(t,null==n?void 0:n[0],r[0]),uo(t,null==n?void 0:n[1],r[1],"important")):uo(t,n,r));return r}function vo(t,e,n=!1){if(t.multiple){if(null==e)return;if(!mt(e))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var r of t.options)r.selected=e.includes(ho(r))}else{for(r of t.options)if(he(ho(r),e))return void(r.selected=!0);n&&void 0===e||(t.selectedIndex=-1)}}function ho(t){return"__value"in t?t.__value:t.value}const po=Symbol("class"),go=Symbol("style"),mo=Symbol("is custom element"),wo=Symbol("is html");function yo(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function bo(t,e,n,r){var o=$o(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[Vt]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&_o(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function xo(t,e,n=[],r=[],o,i=!1,l=!1){Ke(n,r,n=>{var r=void 0,s={},a="SELECT"===t.nodeName,c=!1;if(rr(()=>{var u=e(...n.map(Rn)),d=function(t,e,n,r){var o=$o(t),i=o[mo],l=!o[wo],s=e||{},a="OPTION"===t.tagName;for(var c in e)c in n||(n[c]=null);n.class?n.class=io(n.class):(r||n[po])&&(n.class=null),n[go]&&(n.style??(n.style=null));var u=_o(t);for(const g in n){let c=n[g];if(a&&"value"===g&&null==c)t.value=t.__value="",s[g]=c;else if("class"!==g)if("style"!==g){var d=s[g];if(c!==d||void 0===c&&t.hasAttribute(g)){s[g]=c;var f=g[0]+g[1];if("$$"!==f)if("on"===f){const e={},n="$$"+g;let r=g.slice(2);var v=mr(r);if(pr(r)&&(r=r.slice(0,-7),e.capture=!0),!v&&d){if(null!=c)continue;t.removeEventListener(r,s[n],e),s[n]=null}if(null!=c)if(v)t[`__${r}`]=c,Er([r]);else{let o=function(t){s[g].call(this,t)};s[n]=_r(r,t,o,e)}else v&&(t[`__${r}`]=void 0)}else if("style"===g)bo(t,g,c);else if("autofocus"===g)fn(t,Boolean(c));else if(i||"__value"!==g&&("value"!==g||null==c))if("selected"===g&&a)yo(t,c);else{var h=g;l||(h=yr(h));var p="defaultValue"===h||"defaultChecked"===h;if(null!=c||i||p)p||u.includes(h)&&(i||"string"!=typeof c)?(t[h]=c,h in o&&(o[h]=te)):"function"!=typeof c&&bo(t,h,c);else if(o[g]=null,"value"===h||"checked"===h){let n=t;const r=void 0===e;if("value"===h){let t=n.defaultValue;n.removeAttribute(h),n.defaultValue=t,n.value=n.__value=r?t:null}else{let t=n.defaultChecked;n.removeAttribute(h),n.defaultChecked=t,n.checked=!!r&&t}}else t.removeAttribute(g)}else t.value=t.__value=c}}else fo(t,c,null==e?void 0:e[go],n[go]),s[g]=c,s[go]=n[go];else co(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,c,r,null==e?void 0:e[po],n[po]),s[g]=c,s[po]=n[po]}return s}(t,r,u,o,i,l);c&&a&&"value"in u&&vo(t,u.value);for(let t of Object.getOwnPropertySymbols(s))u[t]||sr(s[t]);for(let e of Object.getOwnPropertySymbols(u)){var f=u[e];"@attach"!==e.description||r&&f===r[e]||(s[e]&&sr(s[e]),s[e]=or(()=>ro(t,()=>f))),d[e]=f}r=d}),a){var u=t;tr(()=>{var t,e;vo(u,r.value,!0),t=u,(e=new MutationObserver(()=>{vo(t,t.__value)})).observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Xn(()=>{e.disconnect()})})}c=!0})}function $o(t){return t.__attributes??(t.__attributes={[mo]:t.nodeName.includes("-"),[wo]:"http://www.w3.org/1999/xhtml"===t.namespaceURI})}var ko=new Map;function _o(t){var e,n=t.getAttribute("is")||t.nodeName,r=ko.get(n);if(r)return r;ko.set(n,r=[]);for(var o=t,i=Element.prototype;i!==o;){for(var l in e=$t(o))e[l].set&&r.push(l);o=Mt(o)}return r}const Mo={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function So(){const t=Mo.now();Mo.tasks.forEach(e=>{e.c(t)||(Mo.tasks.delete(e),e.f())}),0!==Mo.tasks.size&&Mo.tick(So)}function Eo(t,e){hn(()=>{t.dispatchEvent(new CustomEvent(e))})}function Co(t){if("float"===t)return"cssFloat";if("offset"===t)return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return 1===e.length?e[0]:e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function Oo(t){const e={},n=t.split(";");for(const r of n){const[t,n]=r.split(":");if(!t||void 0===n)break;e[Co(t.trim())]=n.trim()}return e}const Io=t=>t;function Wo(t,e,n,r){var o,i,l,s=!!(1&t),a=!!(2&t),c=!!(4&t),u=s&&a?"both":s?"in":"out",d=e.inert,f=e.style.overflow;function v(){return hn(()=>o??(o=n()(e,(null==r?void 0:r())??{},{direction:u})))}var h={is_global:c,in(){var t;if(e.inert=d,!s)return null==l||l.abort(),void(null==(t=null==l?void 0:l.reset)||t.call(l));a||null==i||i.abort(),Eo(e,"introstart"),i=Po(e,v(),l,1,()=>{Eo(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=f})},out(t){if(!a)return null==t||t(),void(o=void 0);e.inert=!0,Eo(e,"outrostart"),l=Po(e,v(),i,0,()=>{Eo(e,"outroend"),null==t||t()})},stop:()=>{null==i||i.abort(),null==l||l.abort()}},p=$n;if((p.transitions??(p.transitions=[])).push(h),s&&Nr){var g=c;if(!g){for(var m=p.parent;m&&0!==(m.f&Dt);)for(;(m=m.parent)&&0===(m.f&jt););g=!m||0!==(m.f&Bt)}g&&tr(()=>{Fn(()=>h.in())})}}function Po(t,e,n,r,o){var i=1===r;if(Et(e)){var l,s=!1;return ue(()=>{if(!s){var a=e({direction:i?"in":"out"});l=Po(t,a,n,r,o)}}),{abort:()=>{s=!0,null==l||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(null==n||n.deactivate(),!(null==e?void 0:e.duration))return o(),{abort:Ct,deactivate:Ct,reset:Ct,t:()=>r};const{delay:a=0,css:c,tick:u,easing:d=Io}=e;var f=[];if(i&&void 0===n&&(u&&u(0,1),c)){var v=Oo(c(0,1));f.push(v,v)}var h=()=>1-r,p=t.animate(f,{duration:a,fill:"forwards"});return p.onfinish=()=>{p.cancel();var i=(null==n?void 0:n.t())??1-r;null==n||n.abort();var l=r-i,s=e.duration*Math.abs(l),a=[];if(s>0){var f=!1;if(c)for(var v=Math.ceil(s/(1e3/60)),g=0;g<=v;g+=1){var m=i+l*d(g/v),w=Oo(c(m,1-m));a.push(w),f||(f="hidden"===w.overflow)}f&&(t.style.overflow="hidden"),h=()=>{var t=p.currentTime;return i+l*d(t/s)},u&&function(t){let e;0===Mo.tasks.size&&Mo.tick(So),new Promise(n=>{Mo.tasks.add(e={c:t,f:n})})}(()=>{if("running"!==p.playState)return!1;var t=h();return u(t,1-t),!0})}(p=t.animate(a,{duration:s,fill:"forwards"})).onfinish=()=>{h=()=>r,null==u||u(r,1-r),o()}},{abort:()=>{p&&(p.cancel(),p.effect=null,p.onfinish=Ct)},deactivate:()=>{o=Ct},reset:()=>{0===r&&(null==u||u(1,0))},t:()=>h()}}function jo(t){var e=t.type;return"number"===e||"range"===e}function To(t){return""===t?null:+t}const Lo=class{constructor(t){ut(this,q),ut(this,B,new WeakMap),ut(this,D),ut(this,R),dt(this,R,t)}observe(t,e){var n=ct(this,B).get(t)||new Set;return n.add(e),ct(this,B).set(t,n),ft(this,q,F).call(this).observe(t,ct(this,R)),()=>{var n=ct(this,B).get(t);n.delete(e),0===n.size&&(ct(this,B).delete(t),ct(this,D).unobserve(t))}}};B=new WeakMap,D=new WeakMap,R=new WeakMap,q=new WeakSet,F=function(){return ct(this,D)??dt(this,D,new ResizeObserver(t=>{for(var e of t)for(var n of(Lo.entries.set(e.target,e),ct(this,B).get(e.target)||[]))n(e)}))},st(Lo,"entries",new WeakMap);var Ao=new Lo({box:"border-box"});function No(t,e){return t===e||(null==t?void 0:t[Gt])===e}function zo(t={},e,n,r){return tr(()=>{var r,o;return er(()=>{r=o,o=[],Fn(()=>{t!==n(...o)&&(e(t,...o),r&&No(n(...r),t)&&e(null,...r))})}),()=>{ue(()=>{o&&No(n(...o),t)&&e(null,...o)})}}),t}function Bo(t=!1){const e=ee,n=e.l.u;if(!n)return;let r=()=>Hn(e.s);if(t){let t=0,n={};const o=Xe(()=>{let r=!1;const o=e.s;for(const t in o)o[t]!==n[t]&&(n[t]=o[t],r=!0);return r&&t++,t});r=()=>Rn(o)}n.b.length&&Qn(()=>{Do(e,r),It(n.b)}),Zn(()=>{const t=Fn(()=>n.m.map(Ot));return()=>{for(const e of t)"function"==typeof e&&e()}}),n.a.length&&Zn(()=>{Do(e,r),It(n.a)})}function Do(t,e){if(t.l.s)for(const n of t.l.s)Rn(n);e()}let Ro=!1,qo=Symbol();function Fo(t,e,n){const r=n[e]??(n[e]={store:null,source:ln(void 0),unsubscribe:Ct});if(r.store!==t&&!(qo in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=Ct;else{var o=!0;r.unsubscribe=Qo(t,t=>{o?r.source.v=t:sn(r.source,t)}),o=!1}return t&&qo in n?ni(t):Rn(r.source)}function Yo(t,e){return t.set(e),e}function Go(){const t={};return[t,function(){Xn(()=>{for(var e in t)t[e].unsubscribe();bt(t,qo,{enumerable:!1,value:!0})})}]}const Ho={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set:(t,e)=>!1,getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))},Vo={get(t,e){if(!t.exclude.includes(e))return Rn(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,n){if(!(e in t.special)){var r=$n;try{kn(t.parent_effect),t.special[e]=Zo({get[e](){return t.props[e]}},e,4)}finally{kn(r)}}return t.special[e](n),cn(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},deleteProperty:(t,e)=>(t.exclude.includes(e)||(t.exclude.push(e),cn(t.version)),!0),has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))};function Ko(t,e){return new Proxy({props:t,exclude:e,special:{},version:rn(0),parent_effect:$n},Vo)}const Uo={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(Et(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r)return r[e]}},set(t,e,n){let r=t.props.length;for(;r--;){let o=t.props[r];Et(o)&&(o=o());const i=xt(o,e);if(i&&i.set)return i.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(Et(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=xt(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===Gt||e===Ht)return!1;for(let n of t.props)if(Et(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props)if(Et(n)&&(n=n()),n){for(const t in n)e.includes(t)||e.push(t);for(const t of Object.getOwnPropertySymbols(n))e.includes(t)||e.push(t)}return e}};function Xo(...t){return new Proxy({props:t},Uo)}function Zo(t,e,n,r){var o,i,l,s=!Qt||!!(2&n),a=!!(8&n),c=!!(16&n),u=r,d=!0,f=()=>(d&&(d=!1,u=c?Fn(r):r),u);if(a){var v=Gt in t||Ht in t;i=(null==(o=xt(t,e))?void 0:o.set)??(v&&e in t?n=>t[e]=n:void 0)}var h,p=!1;if(a?[l,p]=function(t){var e=Ro;try{return Ro=!1,[t(),Ro]}finally{Ro=e}}(()=>t[e]):l=t[e],void 0===l&&void 0!==r&&(l=f(),i&&(s&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),i(l))),h=s?()=>{var n=t[e];return void 0===n?f():(d=!0,n)}:()=>{var n=t[e];return void 0!==n&&(u=void 0),void 0===n?u:n},s&&!(4&n))return h;if(i){var g=t.$$legacy;return function(t,e){return arguments.length>0?(s&&e&&!g&&!p||i(e?h():t),t):h()}}var m=!1,w=(1&n?Xe:Je)(()=>(m=!1,h()));a&&Rn(w);var y=$n;return function(t,e){if(arguments.length>0){const n=e?Rn(w):s&&a?fe(t):t;return sn(w,n),m=!0,void 0!==u&&(u=n),t}return mn&&m||0!==(y.f&zt)?w.v:Rn(w)}}function Jo(t){var e,n;null===ee&&Jt(),Qt&&null!==ee.l?(e=ee,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):Zn(()=>{const e=Fn(t);if("function"==typeof e)return e})}function Qo(t,e,n){if(null==t)return e(void 0),Ct;const r=Fn(()=>t.subscribe(e,n));return r.unsubscribe?()=>r.unsubscribe():r}const ti=[];function ei(t,e=Ct){let n=null;const r=new Set;function o(e){if(Xt(t,e)&&(t=e,n)){const e=!ti.length;for(const n of r)n[1](),ti.push(n,t);if(e){for(let t=0;t<ti.length;t+=2)ti[t][0](ti[t+1]);ti.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,s=Ct){const a=[l,s];return r.add(a),1===r.size&&(n=e(o,i)||Ct),l(t),()=>{r.delete(a),0===r.size&&n&&(n(),n=null)}}}}function ni(t){let e;return Qo(t,t=>e=t)(),e}"undefined"!=typeof window&&((Y=window.__svelte??(window.__svelte={})).v??(Y.v=new Set)).add("5");const ri=Array(12).fill(0);var oi=Pr('<div class="sonner-loading-bar"></div>'),ii=Pr('<div><div class="sonner-spinner"></div></div>');function li(...t){return t.filter(Boolean).join(" ")}const si="undefined"!=typeof document,ai="undefined"!=typeof window?window:void 0;new(V=class{constructor(t={}){ut(this,G),ut(this,H);const{window:e=ai,document:n=(null==e?void 0:e.document)}=t;void 0!==e&&(dt(this,G,n),dt(this,H,He(t=>{const n=Mr(e,"focusin",t),r=Mr(e,"focusout",t);return()=>{n(),r()}})))}get current(){var t;return null==(t=ct(this,H))||t.call(this),ct(this,G)?function(t){let e=t.activeElement;for(;null==e?void 0:e.shadowRoot;){const t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}(ct(this,G)):null}},G=new WeakMap,H=new WeakMap,V);const ci=new(X=class{constructor(t){ut(this,K),ut(this,U),dt(this,K,t),dt(this,U,Symbol(t))}get key(){return ct(this,U)}exists(){return t=ct(this,U),se().has(t);var t}get(){const t=re(ct(this,U));if(void 0===t)throw new Error(`Context "${ct(this,K)}" not found`);return t}getOr(t){const e=re(ct(this,U));return void 0===e?t:e}set(t){return e=ct(this,U),n=t,se().set(e,n),n;var e,n}},K=new WeakMap,U=new WeakMap,X)("<Toaster/>");let ui=0;const di=new(tt=class{constructor(){ut(this,Z,on(fe([]))),ut(this,J,on(fe([]))),ut(this,Q,t=>{const e=this.toasts.findIndex(e=>e.id===t);return-1===e?null:e}),st(this,"addToast",t=>{si&&this.toasts.unshift(t)}),st(this,"updateToast",({id:t,data:e,type:n,message:r})=>{const o=this.toasts.findIndex(e=>e.id===t),i=this.toasts[o];this.toasts[o]={...i,...e,id:t,title:r,type:n,updated:!0}}),st(this,"create",t=>{var e;const{message:n,...r}=t,o="number"==typeof(null==t?void 0:t.id)||t.id&&(null==(e=t.id)?void 0:e.length)>0?t.id:ui++,i=void 0===t.dismissable||t.dismissable,l=void 0===t.type?"default":t.type;return Fn(()=>{this.toasts.find(t=>t.id===o)?this.updateToast({id:o,data:t,type:l,message:n,dismissable:i}):this.addToast({...r,id:o,title:n,dismissable:i,type:l})}),o}),st(this,"dismiss",t=>(Fn(()=>{if(void 0===t)return void(this.toasts=this.toasts.map(t=>({...t,dismiss:!0})));const e=this.toasts.findIndex(e=>e.id===t);this.toasts[e]&&(this.toasts[e]={...this.toasts[e],dismiss:!0})}),t)),st(this,"remove",t=>{if(void 0===t)return void(this.toasts=[]);const e=ct(this,Q).call(this,t);return null!==e?(this.toasts.splice(e,1),t):void 0}),st(this,"message",(t,e)=>this.create({...e,type:"default",message:t})),st(this,"error",(t,e)=>this.create({...e,type:"error",message:t})),st(this,"success",(t,e)=>this.create({...e,type:"success",message:t})),st(this,"info",(t,e)=>this.create({...e,type:"info",message:t})),st(this,"warning",(t,e)=>this.create({...e,type:"warning",message:t})),st(this,"loading",(t,e)=>this.create({...e,type:"loading",message:t})),st(this,"promise",(t,e)=>{if(!e)return;let n;void 0!==e.loading&&(n=this.create({...e,promise:t,type:"loading",message:"string"==typeof e.loading?e.loading:e.loading()}));const r=t instanceof Promise?t:t();let o=void 0!==n;return r.then(t=>{if("object"==typeof t&&t&&"ok"in t&&"boolean"==typeof t.ok&&!t.ok){o=!1;const e=(r=t)&&"object"==typeof r&&"status"in r?`HTTP error! Status: ${r.status}`:`Error! ${r}`;this.create({id:n,type:"error",message:e})}else if(void 0!==e.success){o=!1;const r="function"==typeof e.success?e.success(t):e.success;this.create({id:n,type:"success",message:r})}var r}).catch(t=>{if(void 0!==e.error){o=!1;const r="function"==typeof e.error?e.error(t):e.error;this.create({id:n,type:"error",message:r})}}).finally(()=>{var t;o&&(this.dismiss(n),n=void 0),null==(t=e.finally)||t.call(e)}),n}),st(this,"custom",(t,e)=>{const n=(null==e?void 0:e.id)||ui++;return this.create({component:t,id:n,...e}),n}),st(this,"removeHeight",t=>{this.heights=this.heights.filter(e=>e.toastId!==t)}),st(this,"setHeight",t=>{const e=ct(this,Q).call(this,t.toastId);null!==e?this.heights[e]=t:this.heights.push(t)}),st(this,"reset",()=>{this.toasts=[],this.heights=[]})}get toasts(){return Rn(ct(this,Z))}set toasts(t){sn(ct(this,Z),t,!0)}get heights(){return Rn(ct(this,J))}set heights(t){sn(ct(this,J),t,!0)}},Z=new WeakMap,J=new WeakMap,Q=new WeakMap,tt);class fi{constructor(){ut(this,et,Ze(()=>di.toasts.filter(t=>!t.dismiss)))}get toasts(){return Rn(ct(this,et))}}et=new WeakMap;const vi=Object.assign(function(t,e){return di.create({message:t,...e})},{success:di.success,info:di.info,warning:di.warning,error:di.error,custom:di.custom,message:di.message,promise:di.promise,dismiss:di.dismiss,loading:di.loading,getActiveToasts:()=>di.toasts.filter(t=>!t.dismiss)});function hi(t){return void 0!==t.label}const pi={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function gi(t){return 1/(1.5+Math.abs(t)/20)}var mi=Pr("<div><!></div>"),wi=(t,e,n,r,o)=>{var i,l;!Rn(e)&&Rn(n)&&(r(),null==(l=(i=o.toast).onDismiss)||l.call(i,o.toast))},yi=Pr('<button data-close-button=""><!></button>'),bi=Pr('<div data-icon=""><!> <!></div>'),xi=Pr('<div data-description=""><!></div>'),$i=(t,e,n,r)=>{var o,i;hi(e.toast.cancel)&&Rn(n)&&(null==(i=null==(o=e.toast.cancel)?void 0:o.onClick)||i.call(o,t),r())},ki=Pr('<button data-button="" data-cancel=""> </button>'),_i=(t,e,n)=>{var r;hi(e.toast.action)&&(null==(r=e.toast.action)||r.onClick(t),t.defaultPrevented||n())},Mi=Pr('<button data-button=""> </button>'),Si=Pr('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Ei=Pr('<li data-sonner-toast=""><!> <!></li>');function Ci(t,e){oe(e,!0);let n=Zo(e,"cancelButtonStyle",3,""),r=Zo(e,"actionButtonStyle",3,""),o=Zo(e,"descriptionClass",3,""),i=Zo(e,"unstyled",3,!1),l=Zo(e,"defaultRichColors",3,!1);const s={...pi};let a=on(!1),c=on(!1),u=on(!1),d=on(!1),f=on(!1),v=on(0),h=on(0),p=e.toast.duration||e.duration||4e3,g=on(void 0),m=on(null),w=on(null);const y=Ze(()=>0===e.index),b=Ze(()=>e.index+1<=e.visibleToasts),x=Ze(()=>e.toast.type),$=Ze(()=>!1!==e.toast.dismissable),k=Ze(()=>e.toast.class||""),_=Ze(()=>e.toast.descriptionClass||""),M=Ze(()=>di.heights.findIndex(t=>t.toastId===e.toast.id)||0),S=Ze(()=>e.toast.closeButton??e.closeButton),E=Ze(()=>e.toast.duration??e.duration??4e3);let C=null;const O=Ze(()=>e.position.split("-")),I=Ze(()=>di.heights.reduce((t,e,n)=>n>=Rn(M)?t:t+e.height,0)),W=function(){let t=on(fe("undefined"!=typeof document&&document.hidden));return Zn(()=>Mr(document,"visibilitychange",()=>{sn(t,document.hidden,!0)})),{get current(){return Rn(t)}}}(),P=Ze(()=>e.toast.invert||e.invert),j=Ze(()=>"loading"===Rn(x)),T=Ze(()=>({...s,...e.classes})),L=Ze(()=>e.toast.title),A=Ze(()=>e.toast.description);let N=on(0),z=on(0);const B=Ze(()=>Math.round(14*Rn(M)+Rn(I)));function D(){sn(c,!0),sn(v,Rn(B),!0),di.removeHeight(e.toast.id),setTimeout(()=>{di.remove(e.toast.id)},200)}let R;Zn(()=>{let t;Rn(L),Rn(A),t=e.expanded||e.expandByDefault?1:1-.05*e.index;const n=Fn(()=>Rn(g));if(void 0===n)return;n.style.setProperty("height","auto");const r=n.offsetHeight,o=n.getBoundingClientRect().height,i=Math.round(o/t+Number.EPSILON&100)/100;let l;n.style.removeProperty("height"),l=Math.abs(i-r)<1?i:r,sn(h,l,!0),Fn(()=>{di.setHeight({toastId:e.toast.id,height:l})})});const q=Ze(()=>e.toast.promise&&"loading"===Rn(x)||e.toast.duration===Number.POSITIVE_INFINITY);function F(){sn(N,(new Date).getTime(),!0),R=setTimeout(()=>{var t,n;null==(n=(t=e.toast).onAutoClose)||n.call(t,e.toast),D()},p)}Zn(()=>{e.toast.updated&&(clearTimeout(R),p=Rn(E),F())}),Zn(()=>(Rn(q)||(e.expanded||e.interacting||W.current?function(){if(Rn(z)<Rn(N)){const t=(new Date).getTime()-Rn(N);p-=t}sn(z,(new Date).getTime(),!0)}():F()),()=>clearTimeout(R))),Jo(()=>{var t;sn(a,!0);const n=null==(t=Rn(g))?void 0:t.getBoundingClientRect().height;return sn(h,n,!0),di.setHeight({toastId:e.toast.id,height:n}),()=>{di.removeHeight(e.toast.id)}}),Zn(()=>{e.toast.delete&&Fn(()=>{var t,n;D(),null==(n=(t=e.toast).onDismiss)||n.call(t,e.toast)})});const Y=Ze(()=>e.toast.icon?e.toast.icon:"success"===Rn(x)?e.successIcon:"error"===Rn(x)?e.errorIcon:"warning"===Rn(x)?e.warningIcon:"info"===Rn(x)?e.infoIcon:"loading"===Rn(x)?e.loadingIcon:null);var G=Ei();let H;bo(G,"tabindex",0),G.__pointermove=t=>{var n,r,o;if(!C||!Rn($))return;if(((null==(n=window.getSelection())?void 0:n.toString().length)??-1)>0)return;const i=t.clientY-C.y,l=t.clientX-C.x,s=e.swipeDirections??function(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}(e.position);!Rn(m)&&(Math.abs(l)>1||Math.abs(i)>1)&&sn(m,Math.abs(l)>Math.abs(i)?"x":"y",!0);let a={x:0,y:0};if("y"===Rn(m)){if(s.includes("top")||s.includes("bottom"))if(s.includes("top")&&i<0||s.includes("bottom")&&i>0)a.y=i;else{const t=i*gi(i);a.y=Math.abs(t)<Math.abs(i)?t:i}}else if("x"===Rn(m)&&(s.includes("left")||s.includes("right")))if(s.includes("left")&&l<0||s.includes("right")&&l>0)a.x=l;else{const t=l*gi(l);a.x=Math.abs(t)<Math.abs(l)?t:l}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&sn(f,!0),null==(r=Rn(g))||r.style.setProperty("--swipe-amount-x",`${a.x}px`),null==(o=Rn(g))||o.style.setProperty("--swipe-amount-y",`${a.y}px`)},G.__pointerup=()=>{var t,n,r,o,i,l;if(Rn(d)||!Rn($))return;C=null;const s=Number((null==(t=Rn(g))?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),a=Number((null==(n=Rn(g))?void 0:n.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),c=(new Date).getTime()-0,h="x"===Rn(m)?s:a,p=Math.abs(h)/c;if(Math.abs(h)>=45||p>.11)return sn(v,Rn(B),!0),null==(o=(r=e.toast).onDismiss)||o.call(r,e.toast),"x"===Rn(m)?sn(w,s>0?"right":"left",!0):sn(w,a>0?"down":"up",!0),D(),void sn(d,!0);null==(i=Rn(g))||i.style.setProperty("--swipe-amount-x","0px"),null==(l=Rn(g))||l.style.setProperty("--swipe-amount-y","0px"),sn(f,!1),sn(u,!1),sn(m,null)},G.__pointerdown=t=>{if(Rn(j))return;sn(v,Rn(B),!0);const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(sn(u,!0),C={x:t.clientX,y:t.clientY})};var V=$e(G),K=t=>{var n=yi();n.__click=[wi,j,$,D,e],eo($e(n),()=>e.closeIcon??Ct),nr(t=>{bo(n,"aria-label",e.closeButtonAriaLabel),bo(n,"data-disabled",Rn(j)),co(n,1,t)},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.closeButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.closeButton))}]),Ar(t,n)};Gr(V,t=>{Rn(S)&&!e.toast.component&&"loading"!==Rn(x)&&null!==e.closeIcon&&t(K)});var U=_e(V,2),X=t=>{const n=Ze(()=>e.toast.component);var r=Lr();no(ke(r),()=>Rn(n),(t,n)=>{n(t,Xo(()=>e.toast.componentProps,{closeToast:D}))}),Ar(t,r)},Z=t=>{var i=Si(),l=ke(i),s=t=>{var n=bi(),r=$e(n),o=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();no(ke(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Ar(t,n)},i=t=>{(t=>{var n=Lr(),r=ke(n),o=t=>{var n=mi();eo($e(n),()=>e.loadingIcon),nr(t=>{co(n,1,t),bo(n,"data-visible","loading"===Rn(x))},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.loader,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.loader,"sonner-loader"))}]),Ar(t,n)},i=t=>{{let n=Ze(()=>{var t,n;return li(null==(t=Rn(T))?void 0:t.loader,null==(n=e.toast.classes)?void 0:n.loader)}),r=Ze(()=>"loading"===Rn(x));!function(t,e){oe(e,!0);var n=ii();Ur($e(n),23,()=>ri,(t,e)=>`spinner-bar-${e}`,(t,e)=>{Ar(t,oi())}),nr(t=>{co(n,1,t),bo(n,"data-visible",e.visible)},[()=>io(["sonner-loading-wrapper",e.class].filter(Boolean).join(" "))]),Ar(t,n),ie()}(t,{get class(){return Rn(n)},get visible(){return Rn(r)}})}};Gr(r,t=>{e.loadingIcon?t(o):t(i,!1)}),Ar(t,n)})(t)};Gr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Ar(t,n)};Gr(r,t=>{(e.toast.promise||"loading"===Rn(x))&&t(o)});var i=_e(r,2),l=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();no(ke(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.successIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.errorIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.warningIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.infoIcon??Ct),Ar(t,n)};Gr(r,t=>{"info"===Rn(x)&&t(o)},!0),Ar(t,n)};Gr(r,t=>{"warning"===Rn(x)?t(o):t(i,!1)},!0),Ar(t,n)};Gr(r,t=>{"error"===Rn(x)?t(o):t(i,!1)},!0),Ar(t,n)};Gr(r,t=>{"success"===Rn(x)?t(o):t(i,!1)},!0),Ar(t,n)};Gr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Ar(t,n)};Gr(i,t=>{"loading"!==e.toast.type&&t(l)}),nr(t=>co(n,1,t),[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.icon,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.icon))}]),Ar(t,n)};Gr(l,t=>{(Rn(x)||e.toast.icon||e.toast.promise)&&null!==e.toast.icon&&(null!==Rn(Y)||e.toast.icon)&&t(s)});var a=_e(l,2),c=$e(a),u=$e(c),d=t=>{var n=Lr(),r=ke(n),o=t=>{const n=Ze(()=>e.toast.title);var r=Lr();no(ke(r),()=>Rn(n),(t,n)=>{n(t,Xo(()=>e.toast.componentProps))}),Ar(t,r)},i=t=>{var n=Tr();nr(()=>Br(n,e.toast.title)),Ar(t,n)};Gr(r,t=>{"string"!=typeof e.toast.title?t(o):t(i,!1)}),Ar(t,n)};Gr(u,t=>{e.toast.title&&t(d)});var f=_e(c,2),v=t=>{var n=xi(),r=$e(n),i=t=>{const n=Ze(()=>e.toast.description);var r=Lr();no(ke(r),()=>Rn(n),(t,n)=>{n(t,Xo(()=>e.toast.componentProps))}),Ar(t,r)},l=t=>{var n=Tr();nr(()=>Br(n,e.toast.description)),Ar(t,n)};Gr(r,t=>{"string"!=typeof e.toast.description?t(i):t(l,!1)}),nr(t=>co(n,1,t),[()=>{var t,n;return io(li(o(),Rn(_),null==(t=Rn(T))?void 0:t.description,null==(n=e.toast.classes)?void 0:n.description))}]),Ar(t,n)};Gr(f,t=>{e.toast.description&&t(v)});var h=_e(a,2),p=t=>{var r=Lr(),o=ke(r),i=t=>{var n=Lr();no(ke(n),()=>e.toast.cancel,(t,e)=>{e(t,{})}),Ar(t,n)},l=t=>{var r=Lr(),o=ke(r),i=t=>{var r=ki();r.__click=[$i,e,$,D];var o=$e(r);nr(t=>{fo(r,e.toast.cancelButtonStyle??n()),co(r,1,t),Br(o,e.toast.cancel.label)},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.cancelButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.cancelButton))}]),Ar(t,r)};Gr(o,t=>{hi(e.toast.cancel)&&t(i)},!0),Ar(t,r)};Gr(o,t=>{"function"==typeof e.toast.cancel?t(i):t(l,!1)}),Ar(t,r)};Gr(h,t=>{e.toast.cancel&&t(p)});var g=_e(h,2),m=t=>{var n=Lr(),o=ke(n),i=t=>{var n=Lr();no(ke(n),()=>e.toast.action,(t,e)=>{e(t,{})}),Ar(t,n)},l=t=>{var n=Lr(),o=ke(n),i=t=>{var n=Mi();n.__click=[_i,e,D];var o=$e(n);nr(t=>{fo(n,e.toast.actionButtonStyle??r()),co(n,1,t),Br(o,e.toast.action.label)},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.actionButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.actionButton))}]),Ar(t,n)};Gr(o,t=>{hi(e.toast.action)&&t(i)},!0),Ar(t,n)};Gr(o,t=>{"function"==typeof e.toast.action?t(i):t(l,!1)}),Ar(t,n)};Gr(g,t=>{e.toast.action&&t(m)}),nr(t=>co(c,1,t),[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.title,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.title))}]),Ar(t,i)};Gr(U,t=>{e.toast.component?t(X):t(Z,!1)}),zo(G,t=>sn(g,t),()=>Rn(g)),nr((t,n,r,o)=>{co(G,1,t),bo(G,"data-rich-colors",e.toast.richColors??l()),bo(G,"data-styled",!(e.toast.component||e.toast.unstyled||i())),bo(G,"data-mounted",Rn(a)),bo(G,"data-promise",n),bo(G,"data-swiped",Rn(f)),bo(G,"data-removed",Rn(c)),bo(G,"data-visible",Rn(b)),bo(G,"data-y-position",Rn(O)[0]),bo(G,"data-x-position",Rn(O)[1]),bo(G,"data-index",e.index),bo(G,"data-front",Rn(y)),bo(G,"data-swiping",Rn(u)),bo(G,"data-dismissable",Rn($)),bo(G,"data-type",Rn(x)),bo(G,"data-invert",Rn(P)),bo(G,"data-swipe-out",Rn(d)),bo(G,"data-swipe-direction",Rn(w)),bo(G,"data-expanded",r),H=fo(G,`${e.style} ${e.toast.style}`,H,o)},[()=>{var t,n,r,o,i,l;return io(li(e.class,Rn(k),null==(t=Rn(T))?void 0:t.toast,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.toast,null==(o=Rn(T))?void 0:o[Rn(x)],null==(l=null==(i=e.toast)?void 0:i.classes)?void 0:l[Rn(x)]))},()=>Boolean(e.toast.promise),()=>Boolean(e.expanded||e.expandByDefault&&Rn(a)),()=>({"--index":e.index,"--toasts-before":e.index,"--z-index":di.toasts.length-e.index,"--offset":`${Rn(c)?Rn(v):Rn(B)}px`,"--initial-height":e.expandByDefault?"auto":`${Rn(h)}px`})]),Sr("dragend",G,()=>{sn(u,!1),sn(m,null),C=null}),Ar(t,G),ie()}Er(["pointermove","pointerup","pointerdown","click"]),Qt=!0;var Oi=jr('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),Ii=jr('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),Wi=jr('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>'),Pi=jr('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),ji=jr('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');const Ti="24px",Li="16px",Ai="dark",Ni="light";var zi=Pr("<ol></ol>"),Bi=Pr('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');const Di=new(ot=class{constructor(){ut(this,nt),this.baseUrl="https://api.playlight.dev/platform",this.cachedRequests=new Map,this.pendingCacheRequests=new Map}async request(t,e={}){const{deduplicate:n,...r}=e;if(n&&this.pendingCacheRequests.has(t))return this.pendingCacheRequests.get(t);const o=async()=>{try{const e=`${this.baseUrl}${t}`,n=await fetch(e,{...r,headers:{"Content-Type":"application/json",...r.headers}});if(!n.ok){let t;try{t=await n.json()}catch{}switch(n.status){case 429:return console.warn("Playlight request failed due to rate limiting."),null;case 404:return console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production."),null;default:throw new Error((null==t?void 0:t.error)||(null==t?void 0:t.message)||n.status)}}return await n.json()}catch(e){vi.error("Request failed: "+e.message),console.error("Playlight API request error:",e)}};if(n){const e=o().then(e=>(this.pendingCacheRequests.delete(t),e));return this.pendingCacheRequests.set(t,e),e}return o()}async getCategories(){const t="/categories";if(this.cachedRequests.has(t))return structuredClone(this.cachedRequests.get(t));const e=await this.request(t,{deduplicate:!0});return e&&this.cachedRequests.set(t,e),structuredClone(e)}async getSuggestions(t,e=1){let n="/suggestions";if(t&&(n+="/"+t),n+="?without="+ft(this,nt,rt).call(this),e&&(n+="&page="+e),this.cachedRequests.has(n))return structuredClone(this.cachedRequests.get(n));const r=await this.request(n,{deduplicate:!0});return r&&this.cachedRequests.set(n,r),structuredClone(r)}async getCurrentGameInfo(){const t="/game-by-domain/"+ft(this,nt,rt).call(this);if(this.cachedRequests.has(t))return structuredClone(this.cachedRequests.get(t));const e=await this.request(t,{deduplicate:!0});return e&&this.cachedRequests.set(t,e),structuredClone(e)}async trackOpen(){const t=ft(this,nt,rt).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=ft(this,nt,rt).call(this);await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:e,gameId:t})})}async toggleLike(t,e=!0){const n=e?"like":"unlike",r=await this.request(`/rating/${t}/${n}`,{method:"POST"});return(null==r?void 0:r.success)||!1}},nt=new WeakSet,rt=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t},ot),Ri=new Map;async function qi(t,...e){const n=Ri.get(t);if(n)for(const o of n)try{await o(...e)}catch(r){console.error(`Playlight ${t} callback error:`,r)}}const Fi=t=>t;function Yi(t){const e=t-1;return e*e*e+1}function Gi(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Hi(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Vi(t,{delay:e=0,duration:n=400,easing:r=Gi,amount:o=5,opacity:i=0}={}){const l=getComputedStyle(t),s=+l.opacity,a="none"===l.filter?"":l.filter,c=s*(1-i),[u,d]=Hi(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${s-c*e}; filter: ${a} blur(${e*u}${d});`}}function Ki(t,{delay:e=0,duration:n=400,easing:r=Fi}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:t=>"opacity: "+t*o}}function Ui(t,{delay:e=0,duration:n=400,easing:r=Yi,x:o=0,y:i=0,opacity:l=0}={}){const s=getComputedStyle(t),a=+s.opacity,c="none"===s.transform?"":s.transform,u=a*(1-l),[d,f]=Hi(o),[v,h]=Hi(i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*d}${f}, ${(1-t)*v}${h});\n\t\t\topacity: ${a-u*e}`}}function Xi(t,{delay:e=0,duration:n=400,easing:r=Yi,axis:o="y"}={}){const i=getComputedStyle(t),l=+i.opacity,s="y"===o?"height":"width",a=parseFloat(i[s]),c="y"===o?["top","bottom"]:["left","right"],u=c.map(t=>`${t[0].toUpperCase()}${t.slice(1)}`),d=parseFloat(i[`padding${u[0]}`]),f=parseFloat(i[`padding${u[1]}`]),v=parseFloat(i[`margin${u[0]}`]),h=parseFloat(i[`margin${u[1]}`]),p=parseFloat(i[`border${u[0]}Width`]),g=parseFloat(i[`border${u[1]}Width`]);return{delay:e,duration:n,easing:r,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*l};${s}: ${t*a}px;padding-${c[0]}: ${t*d}px;padding-${c[1]}: ${t*f}px;margin-${c[0]}: ${t*v}px;margin-${c[1]}: ${t*h}px;border-${c[0]}-width: ${t*p}px;border-${c[1]}-width: ${t*g}px;min-${s}: 0`}}function Zi(t,{delay:e=0,duration:n=400,easing:r=Yi,start:o=0,opacity:i=0}={}){const l=getComputedStyle(t),s=+l.opacity,a="none"===l.transform?"":l.transform,c=1-o,u=s*(1-i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${a} scale(${1-c*e});\n\t\t\topacity: ${s-u*e}\n\t\t`}}
2
- /**
3
- * @license lucide-svelte v0.476.0 - ISC
4
- *
5
- * ISC License
6
- *
7
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
8
- *
9
- * Permission to use, copy, modify, and/or distribute this software for any
10
- * purpose with or without fee is hereby granted, provided that the above
11
- * copyright notice and this permission notice appear in all copies.
12
- *
13
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20
- *
21
- */const Ji={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var Qi=jr("<svg><!><!></svg>");function tl(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=Ko(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);oe(e,!1);let o=Zo(e,"name",8,void 0),i=Zo(e,"color",8,"currentColor"),l=Zo(e,"size",8,24),s=Zo(e,"strokeWidth",8,2),a=Zo(e,"absoluteStrokeWidth",8,!1),c=Zo(e,"iconNode",24,()=>[]);Bo();var u=Qi();xo(u,(t,e)=>({...Ji,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e}),[()=>(Hn(a()),Hn(s()),Hn(l()),Fn(()=>a()?24*Number(s())/Number(l()):s())),()=>(Hn(o()),Hn(n),Fn(()=>((...t)=>t.filter((t,e,n)=>Boolean(t)&&n.indexOf(t)===e).join(" "))("lucide-icon","lucide",o()?`lucide-${o()}`:"",n.class)))]);var d=$e(u);Ur(d,1,c,Kr,(t,e)=>{var n,r,o,i,l,s,a=Ze(()=>Pt(Rn(e),2)),c=Lr();n=ke(c),r=()=>Rn(a)[0],o=(t,e)=>{xo(t,()=>({...Rn(a)[1]}))},i=null,l=Hr,s=new Yr(n,!1),rr(()=>{const t=r()||null;return null===t?(s.ensure(null,null),void zr(!0)):(s.ensure(t,e=>{var n=Hr;if(Vr(l),t){if(Wr(i=document.createElementNS("http://www.w3.org/2000/svg",t),i),o){var r=i.appendChild(ye());o(i,r)}$n.nodes_end=i,e.before(i)}Vr(n)}),zr(!0),()=>{t&&zr(!1)})},Dt),Xn(()=>{zr(!0)}),Ar(t,c)}),to(_e(d),e,"default",{}),Ar(t,u),ie()}function el(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];
22
- /**
23
- * @license lucide-svelte v0.476.0 - ISC
24
- *
25
- * ISC License
26
- *
27
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
28
- *
29
- * Permission to use, copy, modify, and/or distribute this software for any
30
- * purpose with or without fee is hereby granted, provided that the above
31
- * copyright notice and this permission notice appear in all copies.
32
- *
33
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
34
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
35
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
36
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
38
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
39
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
40
- *
41
- */tl(t,Xo({name:"loader-circle"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}function nl(t,e){if(!t||null==e)return console.error("Domain or Game ID are not provided!");Di.trackClick(e),window.open("https://"+t+"?utm_source=playlight","_blank","noopener")}const rl=(t,e=Ct,n=Ct)=>{var r=ol();let o;var i=$e(r),l=$e(i);nr(t=>{o=co(r,1,"bg-background absolute top-4 right-4 z-3 px-2 py-0.5 transition-opacity select-none",null,o,t),Br(l,n())},[()=>({"opacity-0":e()})]),Ar(t,r)};var ol=Pr('<div><p class="font-bold text-white uppercase"> </p></div>'),il=(t,e,n,r,o,i)=>{!Rn(e)||Rn(n)||r()?nl(i.game.domain,i.game.id):o()},ll=Pr('<video playsinline="" loop fetchpriority="low"></video>',2),sl=Pr('<div class="bg-background/25 text-muted-foreground flex items-center justify-center gap-1 border-t p-1 px-2 text-sm"><!> <p class="text-muted-foreground text-sm">Tap again to open</p></div>'),al=Pr('<div class="bg-background/75 absolute right-0 bottom-0 left-0 flex max-h-1/3 z-2 flex-col overflow-hidden text-white backdrop-blur-xl"><div class="h-full w-full overflow-y-auto p-3"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <!> <div></div></div>'),cl=Pr('<div class="prevent-image-select bg-background absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 animate-pulse rounded-full shadow-xl svelte-n3ft5o"></div> <img alt="game logo" fetchpriority="high"/>',1),ul=Pr('<div role="button" tabindex="0"><!> <!> <img alt="cover" fetchpriority="high"/> <!> <!></div>');function dl(t,e){oe(e,!0);const[n,r]=Go();let o,i=Zo(e,"compact",3,!1),l=Zo(e,"small",3,!1),s=on(!1),a=on(!1),c=on(!1),u=on(!1),d=on(!1),f=on(void 0),v=on(!1),h=on(void 0);function p(){Rn(s)||Rn(c)||function(t,e=1){try{const n=new Audio(t);n.volume=e,n.play()}catch(n){console.error("Error playing sound:",n)}}(Fo(Qs,"$projectUrl",n)+"/assets/sounds/hover-selection.ogg",.25),sn(s,!0),clearTimeout(o),o=setTimeout(()=>sn(a,!0),300),Rn(f)&&e.game.cover_video_url&&Rn(f).play().catch(t=>console.error("Video error:",t))}function g(){Rn(f)&&Rn(v)&&Rn(f).pause(),sn(s,!1),clearTimeout(o),sn(a,!1)}var m=ul();Sr("touchstart",pe,t=>{Rn(h)&&!Rn(h).contains(t.target)&&g()},void 0,!0),Sr("pointerdown",pe,t=>sn(c,"touch"===t.pointerType)),Sr("pointermove",pe,t=>sn(c,"touch"===t.pointerType)),m.__click=[il,c,a,l,p,e];var w=$e(m),y=t=>{rl(t,()=>Rn(s),()=>"Featured")},b=t=>{var n=Lr(),r=ke(n),o=t=>{rl(t,()=>Rn(s),()=>"New")};Gr(r,t=>{var n;(function(t){const e=new Date;return e.setDate(e.getDate()-7),new Date(t)>e})(null==(n=e.game)?void 0:n.created_at)&&t(o)},!0),Ar(t,n)};Gr(w,t=>{var n;(null==(n=e.game)?void 0:n.featured)?t(y):t(b,!1)});var x=_e(w,2),$=t=>{var n=ll();let r;n.muted=!0,zo(n,t=>sn(f,t),()=>Rn(f)),nr(t=>{bo(n,"src",e.game.cover_video_url),r=co(n,1,"absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 z-1",null,r,t)},[()=>({"opacity-100":Rn(s)&&Rn(v)&&e.game.cover_video_url})]),Sr("loadeddata",n,()=>{sn(v,!0)}),Ar(t,n)};Gr(x,t=>{e.game.cover_video_url&&t($)});var k=_e(x,2);let _;var M=_e(k,2),S=t=>{var n=al(),r=$e(n),o=$e(r),i=$e(o),l=$e(_e(o,2)),s=_e(r,2),a=t=>{var e=sl();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];
42
- /**
43
- * @license lucide-svelte v0.476.0 - ISC
44
- *
45
- * ISC License
46
- *
47
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
48
- *
49
- * Permission to use, copy, modify, and/or distribute this software for any
50
- * purpose with or without fee is hereby granted, provided that the above
51
- * copyright notice and this permission notice appear in all copies.
52
- *
53
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
54
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
55
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
56
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
57
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
58
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
59
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
60
- *
61
- */tl(t,Xo({name:"info"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e(e),{size:15}),Ar(t,e)};Gr(s,t=>{Rn(c)&&t(a)});var u=_e(s,2);nr(()=>{Br(i,e.game.name),Br(l,e.game.description||"No description."),co(u,1,`bg-background/75 pointer-events-none absolute right-0 mask-t-from-0% mask-t-to-100% ${Rn(c)?"bottom-7":"bottom-0"} left-0 h-8`)}),Wo(3,n,()=>Xi),Ar(t,n)};Gr(M,t=>{Rn(s)&&!l()&&t(S)});var E=_e(M,2),C=t=>{var n=cl(),r=_e(ke(n),2);let o;nr(t=>{bo(r,"src",e.game.logo_url),o=co(r,1,"prevent-image-select absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 overflow-hidden rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-n3ft5o",null,o,t)},[()=>({"opacity-100":Rn(d)})]),Sr("load",r,()=>{sn(d,!0)}),Ar(t,n)};Gr(E,t=>{l()||t(C)}),zo(m,t=>sn(h,t),()=>Rn(h)),nr(t=>{co(m,1,`highlight-border group relative flex aspect-[2/3] cursor-pointer flex-col shadow-xl transition hover:outline-2 ${Rn(u)?"":"animate-pulse"} ${l()?"h-42":i()?"h-62":"h-92"} ${l()?"bg-muted":"bg-background mt-5 mb-[calc(3dvh+1.5vw)]"}`,"svelte-n3ft5o"),bo(k,"src",e.game.cover_image_url),_=co(k,1,"prevent-image-select absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 transition svelte-n3ft5o",null,_,t)},[()=>({"opacity-100":Rn(u)&&(!Rn(s)||!Rn(v)||!e.game.cover_video_url)})]),Sr("mouseenter",m,p),Sr("mouseleave",m,g),Sr("load",k,()=>{sn(u,!0)}),Ar(t,m),ie(),r()}function fl(t){const e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}function vl(t){const e=1.70158;return--t*t*((e+1)*t+e)+1}function hl(t){const e=t-1;return e*e*e+1}function pl(t){return Math.sin(t*Math.PI/2)}function gl(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=hl}=r,s=getComputedStyle(t),a="none"===s.transform?"":s.transform,[c,u]=s.transformOrigin.split(" ").map(parseFloat);c/=t.clientWidth,u/=t.clientHeight;var d=function(t){if("currentCSSZoom"in t)return t.currentCSSZoom;for(var e=t,n=1;null!==e;)n*=+getComputedStyle(e).zoom,e=e.parentElement;return n}(t),f=t.clientWidth/n.width/d,v=t.clientHeight/n.height/d,h=e.left+e.width*c,p=e.top+e.height*u,g=n.left+n.width*c,m=n.top+n.height*u,w=(h-g)*f,y=(p-m)*v,b=e.width/n.width,x=e.height/n.height;return{delay:o,duration:"function"==typeof i?i(Math.sqrt(w*w+y*y)):i,easing:l,css:(t,e)=>`transform: ${a} translate(${e*w}px, ${e*y}px) scale(${t+e*b}, ${t+e*x});`}}Er(["click"]);var ml=(t,e,n)=>{sn(e,""),sn(n,!Rn(n))},wl=Pr('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),yl=Pr('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),bl=(t,e,n,r,o)=>{var i;e(n),sn(r,!1),null==(i=o.onCategoryChange)||i.call(o)},xl=Pr("<button> </button>"),$l=Pr('<div class="space-y-1 p-1"></div>'),kl=Pr('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"/></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'),_l=Pr('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl sm:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="max-w-[40vw] truncate text-2xl font-bold text-black sm:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');function Ml(t,e){oe(e,!0);let n,r=Zo(e,"categories",19,()=>[]),o=Zo(e,"selectedCategory",15),i=on(!1),l=Ze(()=>o()||(r().length>0?r()[0]:"...")),s=on(""),a=on(void 0),c=Ze(()=>Rn(s)?r().filter(t=>t.toLowerCase().includes(Rn(s).toLowerCase())):r());const u=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d=on(fe(u[0]));Jo(()=>{sn(d,u[Math.floor(Math.random()*(null==u?void 0:u.length))],!0)});var f=_l();Sr("click",pe,t=>{var e;!Rn(a)||(null==(e=Rn(a))?void 0:e.contains(t.target))||(null==n?void 0:n.contains(t.target))||sn(i,!1)});var v=$e(f),h=$e(v),p=$e(h),g=_e(h,2);g.__click=[ml,s,i];var m=$e(g),w=$e(m),y=_e(m,2);{let t=Ze(()=>Rn(i)?"rotate-180 transform":"");!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m6 9 6 6 6-6"}]];
62
- /**
63
- * @license lucide-svelte v0.476.0 - ISC
64
- *
65
- * ISC License
66
- *
67
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
68
- *
69
- * Permission to use, copy, modify, and/or distribute this software for any
70
- * purpose with or without fee is hereby granted, provided that the above
71
- * copyright notice and this permission notice appear in all copies.
72
- *
73
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
74
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
75
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
76
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
77
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
78
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
79
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
80
- *
81
- */tl(t,Xo({name:"chevron-down"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(y,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${Rn(t)??""} transition-transform duration-200`}})}zo(g,t=>n=t,()=>n);var b=_e(v,2),x=t=>{var n=kl(),l=$e(n),u=$e(l),d=$e(u);!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]];
82
- /**
83
- * @license lucide-svelte v0.476.0 - ISC
84
- *
85
- * ISC License
86
- *
87
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
88
- *
89
- * Permission to use, copy, modify, and/or distribute this software for any
90
- * purpose with or without fee is hereby granted, provided that the above
91
- * copyright notice and this permission notice appear in all copies.
92
- *
93
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
94
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
95
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
96
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
97
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
98
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
99
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
100
- *
101
- */tl(t,Xo({name:"search"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e(d),{size:18,strokeWidth:2.5,class:"text-muted-foreground"});var f=_e(d,2),v=$e(_e(l,2)),h=t=>{Ar(t,wl())},p=t=>{var n=Lr(),r=ke(n),l=t=>{Ar(t,yl())},s=t=>{var n=$l();Ur(n,28,()=>Rn(c),t=>t,(t,n)=>{var r=xl();r.__click=[bl,o,n,i,e];var l,s,a,c,u,d,f,v,h=$e(r);nr(()=>{co(r,1,`w-full cursor-pointer px-4 py-2 text-left transition-colors ${o()!=n?"hover:bg-muted-foreground/20":""} ${o()==n?"bg-white text-black":"text-white"}`),Br(h,n)}),l=r,s=()=>gl,a=()=>({duration:150}),v=null,(f=Hr).a??(f.a={element:l,measure(){c=this.element.getBoundingClientRect()},apply(){if(null==d||d.abort(),u=this.element.getBoundingClientRect(),c.left!==u.left||c.right!==u.right||c.top!==u.top||c.bottom!==u.bottom){const t=s()(this.element,{from:c,to:u},null==a?void 0:a());d=Po(this.element,t,void 0,1,()=>{null==d||d.abort(),d=void 0})}},fix(){if(!l.getAnimations().length){var{position:t,width:e,height:n}=getComputedStyle(l);if("absolute"!==t&&"fixed"!==t){var r=l.style;v={position:r.position,width:r.width,height:r.height,transform:r.transform},r.position="absolute",r.width=e,r.height=n;var o=l.getBoundingClientRect();if(c.left!==o.left||c.top!==o.top){var i=`translate(${c.left-o.left}px, ${c.top-o.top}px)`;r.transform=r.transform?`${r.transform} ${i}`:i}}}},unfix(){if(v){var t=l.style;t.position=v.position,t.width=v.width,t.height=v.height,t.transform=v.transform}}}),f.a.element=l,Ar(t,r)}),Ar(t,n)};Gr(r,t=>{0===Rn(c).length?t(l):t(s,!1)},!0),Ar(t,n)};Gr(v,t=>{0===r().length?t(h):t(p,!1)}),zo(n,t=>sn(a,t),()=>Rn(a)),function(t,e,n=e){var r=new WeakSet;(function(t,e,n,r=n){t.addEventListener(e,()=>hn(n));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),vn||(vn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)null==(e=n.__on_r)||e.call(n)})},{capture:!0}))})(t,"input",async o=>{var i=o?t.defaultValue:t.value;if(i=jo(t)?To(i):i,n(i),null!==Ie&&r.add(Ie),await async function(){await Promise.resolve(),function(){var t=Ne;Ne=!0;try{for(;;){if(de(),0===Te.length&&(null==Ie||Ie.flush(),0===Te.length))return void(Le=null);Be()}}finally{Ne=t}}()}(),i!==(i=e())){var l=t.selectionStart,s=t.selectionEnd,a=t.value.length;if(t.value=i??"",null!==s){var c=t.value.length;l===s&&s===a&&c>a?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=l,t.selectionEnd=Math.min(s,c))}}}),null==Fn(e)&&t.value&&(n(jo(t)?To(t.value):t.value),null!==Ie&&r.add(Ie)),er(()=>{var n=e();if(t===document.activeElement){var o=We??Ie;if(r.has(o))return}jo(t)&&n===To(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")})}(f,()=>Rn(s),t=>sn(s,t)),Wo(1,n,()=>Ki,()=>({duration:150,easing:pl})),Wo(2,n,()=>Ki,()=>({duration:200,easing:pl})),Ar(t,n)};Gr(b,t=>{Rn(i)&&t(x)}),nr(()=>{Br(p,Rn(d)),Br(w,Rn(l))}),Wo(3,f,()=>Zi,()=>({easing:fl,start:.95})),Ar(t,f),ie()}async function Sl(t,e,n,r){var o;(null==(o=e.currentGame)?void 0:o.id)&&(Yo(Us,!n()),Yo(Xs,r()+(n()?1:-1)),n()?localStorage.setItem(`playlight_${e.currentGame.id}_liked`,"true"):localStorage.removeItem(`playlight_${e.currentGame.id}_liked`),await Di.toggleLike(e.currentGame.id,n())||Yo(Xs,r()+(n()?-1:1)))}Er(["click"]);var El=Pr('<img alt="logo"/>'),Cl=Pr('<div class="bg-muted size-5"></div>'),Ol=Pr('<div class="flex flex-wrap gap-1 text-start"><div class="w-full"><p class="text-muted-foreground text-sm text-nowrap select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><!> <p> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>');function Il(t,e){oe(e,!0);const n=()=>Fo(Us,"$currentGameIsLiked",o),r=()=>Fo(Xs,"$currentGameLikeCount",o),[o,i]=Go();let l=on(!1);Zn(()=>{var t,n;null!=(null==(t=e.currentGame)?void 0:t.id)&&(Yo(Us,null!==localStorage.getItem(`playlight_${e.currentGame.id}_liked`)),Yo(Xs,(null==(n=e.currentGame)?void 0:n.likes)||0))});var s=Ol(),a=_e($e(s),2),c=$e(a),u=t=>{var n=El();let r;nr(t=>{var o;bo(n,"src",null==(o=e.currentGame)?void 0:o.logo_url),r=co(n,1,"bg-muted-foreground/50 size-5 text-[0px]! select-none",null,r,t)},[()=>({"animate-pulse":!Rn(l)})]),Sr("load",n,()=>{sn(l,!0)}),Ar(t,n)},d=t=>{Ar(t,Cl())};Gr(c,t=>{var n;(null==(n=e.currentGame)?void 0:n.logo_url)?t(u):t(d,!1)});var f=_e(c,2);let v;var h=$e(f),p=$e(_e(f,2)),g=$e(p),m=_e(p,2);m.__click=[Sl,e,n,r];var w=$e(m);{let t=Ze(()=>n()?"currentColor":"none");!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M7 10v12"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"}]];
102
- /**
103
- * @license lucide-svelte v0.476.0 - ISC
104
- *
105
- * ISC License
106
- *
107
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
108
- *
109
- * Permission to use, copy, modify, and/or distribute this software for any
110
- * purpose with or without fee is hereby granted, provided that the above
111
- * copyright notice and this permission notice appear in all copies.
112
- *
113
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
114
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
115
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
116
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
117
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
118
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
119
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
120
- *
121
- */tl(t,Xo({name:"thumbs-up"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(w,{size:18,strokeWidth:2.5,get fill(){return Rn(t)},style:"margin-top: -5px;"})}nr(t=>{var o;v=co(f,1,"max-w-35 truncate text-lg font-bold text-white",null,v,t),Br(h,(null==(o=e.currentGame)?void 0:o.name)||"Unavailable"),Br(g,r()),fo(m,`color: ${n()?"white !important":""};`),bo(m,"aria-label",n()?"Unlike game":"Like game")},[()=>{var t;return{"opacity-50":!(null==(t=e.currentGame)?void 0:t.name)}}]),Ar(t,s),ie(),i()}function Wl(t,e,n,r,o){sn(e,!1),sn(n,250),sn(r,0),o(250,t=>{sn(n,250*(1-t)),sn(r,t,!0)})}Er(["click"]);var Pl=Pr('<div class="bg-background/85 fixed bottom-4 left-4 z-2 touch-none border-1 p-4 shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><!></div>'),jl=Pr('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border px-4 py-1.5 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'),Tl=Pr("<!> <!>",1);function Ll(t,e){t.target===t.currentTarget&&"touch"!==t.pointerType&&Yo(Ks,!1)}Er(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend"]);var Al=Pr('<div class="-mx-10 mt-5 flex h-92 w-10 flex-col"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between"><div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div></div></div></div>'),Nl=(t,e)=>Yo(Ks,!1),zl=Pr('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Bl=Pr('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'),Dl=Pr("<!> <!>",1),Rl=Pr('<div class="flex h-30 items-center"><!></div>'),ql=Pr('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'),Fl=Pr('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 select-none max-sm:w-40"/> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-1so2hji"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');function Yl(t,e){oe(e,!0);const n=()=>Fo(Ks,"$discoveryOpen",r),[r,o]=Go();let i,l=on(!0),s=on(!1),a=on(void 0),c=on(fe([])),u=on(void 0),d=on(fe([])),f=on(1),v=on(!0),h=on(!1),p=on(void 0),g=on(void 0);async function m(){var t,e;sn(d,[],!0),sn(f,1),sn(v,!0),sn(h,!1),(null==(t=Rn(a))?void 0:t.featured_game)&&Rn(u)==(null==(e=Rn(a))?void 0:e.category)&&Rn(d).push({...Rn(a).featured_game,featured:!0}),await w()}async function w(){if(Rn(l)||Rn(s))return;1===Rn(f)?sn(l,!0):sn(s,!0);const t=Rn(h)?null:Rn(u),e=await Di.getSuggestions(t,Rn(f)),n=(null==e?void 0:e.games)||[],r=(null==e?void 0:e.pageSize)||15,o=n.filter(t=>!Rn(d).some(e=>e.id===t.id));sn(d,[...Rn(d),...o],!0),n.length<r?!Rn(h)&&Rn(u)?(sn(h,!0),sn(f,1)):sn(v,!1):sn(f,Rn(f)+1),sn(l,!1),sn(s,!1),Rn(v)&&Rn(p)&&Rn(p).getBoundingClientRect().bottom<=window.innerHeight+300&&w()}Jo(()=>(i=new IntersectionObserver(t=>{t[0].isIntersecting&&Rn(v)&&w()},{rootMargin:"300px",root:Rn(g)}),()=>null==i?void 0:i.disconnect())),Zn(()=>{Rn(p)&&i&&i.observe(Rn(p))}),Jo(async()=>{var t,e,n;await(async t=>{var e=Pt(t,2);sn(a,e[0],!0),sn(c,e[1],!0)})(await Promise.all([Di.getCurrentGameInfo(),Di.getCategories()])),sn(u,(null==(t=Rn(a))?void 0:t.category)||(null==(n=Rn(c))?void 0:n[(null==(e=Rn(c))?void 0:e.length)-1]),!0),sn(l,!1),await m()});var y=Fl();Sr("keydown",pe,t=>{"Escape"==t.key&&Yo(Ks,!1)}),y.__pointerup=[Ll,n];var b=$e(y),x=$e(b),$=$e(_e(x,2));$.__click=[Nl,n],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];
122
- /**
123
- * @license lucide-svelte v0.476.0 - ISC
124
- *
125
- * ISC License
126
- *
127
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
128
- *
129
- * Permission to use, copy, modify, and/or distribute this software for any
130
- * purpose with or without fee is hereby granted, provided that the above
131
- * copyright notice and this permission notice appear in all copies.
132
- *
133
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
134
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
135
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
136
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
137
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
138
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
139
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
140
- *
141
- */tl(t,Xo({name:"x"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e($),{size:24,strokeWidth:2.5});var k=_e(b,2);Ml($e(k),{get categories(){return Rn(c)},onCategoryChange:m,get selectedCategory(){return Rn(u)},set selectedCategory(t){sn(u,t,!0)}});var _=_e(k,2),M=t=>{!function(t,e){oe(e,!0);let n=on(!1),r=on(0),o=on(1),i=on(!1),l=0;function s(t,e){const n=Date.now();!function r(){const o=Math.min((Date.now()-n)/t,1);e(o),o<1&&requestAnimationFrame(r)}()}function a(t){sn(i,!0),l=t.type.includes("touch")?t.touches[0].clientY:t.clientY}function c(t){if(!Rn(i))return;const e=Math.max(0,(t.type.includes("touch")?t.touches[0].clientY:t.clientY)-l);sn(r,e,!0),sn(o,Math.max(0,1-e/150),!0),e>40&&function(){sn(i,!1);const t=Rn(r);s(250,e=>{sn(r,t+(250-t)*e),sn(o,Math.max(0,1-1.5*e),!0),1===e&&sn(n,!0)})}()}function u(){if(Rn(i)&&(sn(i,!1),Rn(r)<40)){const t=Rn(r);s(250,e=>{sn(r,t*(1-e)),sn(o,1)})}}Jo(()=>s(250,t=>sn(o,t,!0)));var d=Tl(),f=ke(d),v=t=>{var n=Pl();n.__mousedown=a,n.__mousemove=c,n.__mouseup=u,n.__touchstart=a,n.__touchmove=c,n.__touchend=u,Il($e(n),{get currentGame(){return e.currentGame}}),nr(()=>fo(n,`transform: translateY(${Rn(r)??""}px); opacity: ${Rn(o)??""}; cursor: grab;`)),Sr("mouseleave",n,u),Ar(t,n)};Gr(f,t=>{e.currentGame&&!Rn(n)&&t(v)});var h=_e(f,2),p=t=>{var e=jl(),i=$e(e);i.__mousedown=[Wl,n,r,o,s],i.__touchstart=[Wl,n,r,o,s],Wo(3,i,()=>Ui,()=>({delay:150,y:30})),Ar(t,e)};Gr(h,t=>{e.currentGame&&Rn(n)&&t(p)}),Ar(t,d),ie()}(t,{get currentGame(){return Rn(a)}})};Gr(_,t=>{Fo(Zs,"$sidebarEnabled",r)&&!Fo(Js,"$sidebarCollapsed",r)||t(M)});var S=_e(_,2);S.__pointerup=[Ll,n];var E=$e(S),C=t=>{var e=zl();el($e(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),Ar(t,e)},O=t=>{var e=Lr(),n=ke(e),r=t=>{Ar(t,Bl())},o=t=>{var e=ql(),n=$e(e);Ur(n,17,()=>Rn(d),Kr,(t,e,n)=>{const r=Ze(()=>Rn(d).findIndex(t=>t.category!==Rn(u)&&!t.featured));var o=Dl(),i=ke(o),l=t=>{Ar(t,Al())};Gr(i,t=>{n==Rn(r)&&t(l)}),dl(_e(i,2),{get game(){return Rn(e)}}),Ar(t,o)});var r=_e(n,2),o=$e(r),i=t=>{var e=Rl();el($e(e),{class:"animate-spin opacity-75",size:40,strokeWidth:2.5}),Ar(t,e)};Gr(o,t=>{Rn(s)&&t(i)}),zo(r,t=>sn(p,t),()=>Rn(p)),Ar(t,e)};Gr(n,t=>{0!==Rn(d).length||Rn(l)?t(o,!1):t(r)},!0),Ar(t,e)};Gr(E,t=>{Rn(l)&&0===Rn(d).length?t(C):t(O,!1)}),zo(S,t=>sn(g,t),()=>Rn(g));var I=_e(S,2);!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];
142
- /**
143
- * @license lucide-svelte v0.476.0 - ISC
144
- *
145
- * ISC License
146
- *
147
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
148
- *
149
- * Permission to use, copy, modify, and/or distribute this software for any
150
- * purpose with or without fee is hereby granted, provided that the above
151
- * copyright notice and this permission notice appear in all copies.
152
- *
153
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
154
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
155
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
156
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
157
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
158
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
159
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
160
- *
161
- */tl(t,Xo({name:"external-link"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(_e($e(I)),{size:14}),nr(()=>bo(x,"src",Fo(Qs,"$projectUrl",r)+"/assets/images/logo-white-small.png")),Wo(3,y,()=>Vi,()=>({duration:250})),Ar(t,y),ie(),o()}Er(["pointerup","click"]);var Gl=Pr("<button><!></button>");function Hl(t,e){let n=Zo(e,"disabled",3,!1),r=Zo(e,"variant",3,"primary");var o=Gl();o.__click=function(...t){var n;null==(n=e.onclick)||n.apply(this,t)},eo($e(o),()=>e.children??Ct),nr(()=>{o.disabled=n(),co(o,1,`${"primary"==r()?"outline-muted bg-white text-black hover:outline":"secondary"==r()?"bg-background hover:bg-muted outline-muted outline":"ghost"==r()?"hover:opacity-50":""} text-md inline-flex cursor-pointer items-center justify-center gap-2 ${"ghost"!==r()?"hover:bg-background px-3 py-2":""} font-bold text-nowrap uppercase transition hover:text-white ${n()?"pointer-events-none opacity-50":""} ${e.class??""}`)}),Ar(t,o)}async function Vl(t=10,e=!1){const[n,r]=await Promise.all([Di.getCategories(),Di.getCurrentGameInfo()]),o=(null==r?void 0:r.category)||(null==n?void 0:n[(null==n?void 0:n.length)-1]),i=await Di.getSuggestions(o,1);(null==i?void 0:i.pageSize)<t&&console.error("Threshold must be <= than page size to avoid always triggering a re-fetch!");let l=(null==i?void 0:i.games)||[];if(e&&(l=l.slice(0,Math.ceil(t/2))),l.length<t||e){const t=await Di.getSuggestions(null,1),e=((null==t?void 0:t.games)||[]).filter(t=>!l.some(e=>e.id===t.id));l=[...l,...e]}return l.slice(0,t)}Er(["click"]);var Kl=(t,e)=>{"touch"!==t.pointerType&&e()},Ul=Pr('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'),Xl=Pr('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"/></div>'),Zl=Pr('<div class="ml-3 flex items-center -space-x-2"></div>'),Jl=Pr("More games <!>",1),Ql=Pr('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'),ts=Pr("<!> <!>",1);Er(["pointerover"]);var es=Pr("<!> <!> <!>",1);function ns(t,e){oe(e,!1);const n=()=>Fo(Ks,"$discoveryOpen",o),r=()=>Fo(Hs,"$config",o),[o,i]=Go();Bo();var l=es(),s=ke(l),a=t=>{Yl(t,{})};Gr(s,t=>{n()&&t(a)});var c=_e(s,2);{let t=Je(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.enabled}),e=Je(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.immediate});!function(t,e){oe(e,!0);let n,r=Zo(e,"enabled",3,!0),o=Zo(e,"immediate",3,!1),i=on(void 0),l=on(void 0),s=on(fe([])),a=on(!1),c=on(void 0);function u(){setTimeout(async()=>{var t,r;n<Date.now()-50&&(clearTimeout(Rn(c)),sn(c,null),o()?(qi("exitIntent"),null==(t=e.onIntent)||t.call(e)):(qi("exitIntent"),sn(a,!0),(null==(r=Rn(s))?void 0:r.length)||sn(s,await Vl(3),!0)))},150)}let d=["The cure for boredom.","Ready for what’s next?","Why stop the fun now?","Games don’t play themselves.","A new adventure awaits.","There’s always time for one more."];var f=ts();Sr("mousemove",pe,function(t){var e,o;!r()||(null==(e=Rn(i))?void 0:e.contains(t.target))||(null==(o=Rn(l))?void 0:o.contains(t.target))||(!Rn(c)&&Rn(a)&&sn(c,setTimeout(()=>sn(a,!1),1500),!0),n=Date.now())});var v=ke(f),h=t=>{var e=Ul();e.__pointerover=[Kl,u],zo(e,t=>sn(i,t),()=>Rn(i)),Ar(t,e)};Gr(v,t=>{r()&&t(h)});var p=_e(v,2),g=t=>{var n=Ql(),r=$e(n),o=$e(r);Hl(_e(r,2),{class:"group",onclick:()=>{var t;null==(t=e.onIntent)||t.call(e),setTimeout(()=>sn(a,!1),150)},children:(t,e)=>{var n=Jl(),r=_e(ke(n)),o=t=>{var e=Zl();Ur(e,21,()=>Rn(s),Kr,(t,e,n)=>{var r=Xl();let o;var i=$e(r);nr(t=>{o=fo(r,"",o,t),bo(i,"src",Rn(e).logo_url)},[()=>({"z-index":Rn(s).length-n})]),Ar(t,r)}),Wo(3,e,()=>Xi,()=>({axis:"x",duration:150})),Ar(t,e)};Gr(r,t=>{var e;(null==(e=Rn(s))?void 0:e.length)>=3&&t(o)}),Ar(t,n)},$$slots:{default:!0}}),zo(n,t=>sn(l,t),()=>Rn(l)),nr(t=>Br(o,t),[()=>d[Math.floor(Math.random()*d.length)]]),Sr("mouseenter",n,()=>{clearTimeout(Rn(c)),sn(c,null)}),Wo(3,n,()=>Ui,()=>({y:-100,easing:vl,duration:500})),Ar(t,n)};Gr(p,t=>{Rn(a)&&t(g)}),Ar(t,f),ie()}(c,{get enabled(){return Rn(t)},get immediate(){return Rn(e)},onIntent:()=>{n()||Yo(Ks,!0)}})}var u=_e(c,2),d=t=>{!function(t,e){oe(e,!0);let n=Zo(e,"invert",3,!1),r=Zo(e,"position",3,"bottom-right"),o=Zo(e,"hotkey",19,()=>["altKey","KeyT"]),i=Zo(e,"expand",3,!1),l=Zo(e,"closeButton",3,!1),s=Zo(e,"offset",3,Ti),a=Zo(e,"mobileOffset",3,Li),c=Zo(e,"theme",3,"light"),u=Zo(e,"richColors",3,!1),d=Zo(e,"duration",3,4e3),f=Zo(e,"visibleToasts",3,3),v=Zo(e,"toastOptions",19,()=>({})),h=Zo(e,"dir",7,"auto"),p=Zo(e,"gap",3,14),g=Zo(e,"containerAriaLabel",3,"Notifications"),m=Zo(e,"closeButtonAriaLabel",3,"Close toast"),w=new Proxy({props:e,exclude:["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]},Ho);function y(){if("auto"!==h())return h();if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?(Fn(()=>h(t)),t):(Fn(()=>h(window.getComputedStyle(document.documentElement).direction??"ltr")),h())}const b=Ze(()=>Array.from(new Set([r(),...di.toasts.filter(t=>t.position).map(t=>t.position)].filter(Boolean))));let x=on(!1),$=on(!1),k=on(fe(function(t){return"system"!==t?t:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ai:Ni}(c()))),_=on(void 0),M=on(null),S=on(!1);const E=Ze(()=>o().join("+").replace(/Key/g,"").replace(/Digit/g,""));Zn(()=>{di.toasts.length<=1&&sn(x,!1)}),Zn(()=>{const t=di.toasts.filter(t=>t.dismiss&&!t.delete);if(t.length>0){const e=di.toasts.map(e=>t.find(t=>t.id===e.id)?{...e,delete:!0}:e);di.toasts=e}}),Zn(()=>()=>{Rn(_)&&Rn(M)&&(Rn(M).focus({preventScroll:!0}),sn(M,null),sn(S,!1))}),Jo(()=>(di.reset(),Mr(document,"keydown",t=>{var e,n;o().every(e=>t[e]||t.code===e)&&(sn(x,!0),null==(e=Rn(_))||e.focus()),"Escape"!==t.code||document.activeElement!==Rn(_)&&!(null==(n=Rn(_))?void 0:n.contains(document.activeElement))||sn(x,!1)}))),Zn(()=>{if("system"!==c()&&sn(k,c()),"undefined"!=typeof window){"system"===c()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?sn(k,Ai):sn(k,Ni));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{sn(k,t?Ai:Ni,!0)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}});const C=t=>{var n;null==(n=e.onblur)||n.call(e,t),Rn(S)&&!t.currentTarget.contains(t.relatedTarget)&&(sn(S,!1),Rn(M)&&(Rn(M).focus({preventScroll:!0}),sn(M,null)))},O=t=>{var n;null==(n=e.onfocus)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||Rn(S)||(sn(S,!0),sn(M,t.relatedTarget,!0))},I=t=>{var n;null==(n=e.onpointerdown)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||sn($,!0)},W=t=>{var n;null==(n=e.onmouseenter)||n.call(e,t),sn(x,!0)},P=t=>{var n;null==(n=e.onmouseleave)||n.call(e,t),Rn($)||sn(x,!1)},j=t=>{var n;null==(n=e.onmousemove)||n.call(e,t),sn(x,!0)},T=t=>{var n;null==(n=e.ondragend)||n.call(e,t),sn(x,!1)},L=t=>{var n;null==(n=e.onpointerup)||n.call(e,t),sn($,!1)};ci.set(new fi);var A=Bi();bo(A,"tabindex",-1);var N=$e(A),z=t=>{var r=Lr();Ur(ke(r),18,()=>Rn(b),t=>t,(t,r,o,c)=>{const h=Ze(()=>{const[t,e]=r.split("-");return{y:t,x:e}}),g=Ze(()=>function(t,e){const n={};return[t,e].forEach((t,e)=>{const r=1===e,o=r?"--mobile-offset":"--offset",i=r?Li:Ti;function l(t){["top","right","bottom","left"].forEach(e=>{n[`${o}-${e}`]="number"==typeof t?`${t}px`:t})}"number"==typeof t||"string"==typeof t?l(t):"object"==typeof t?["top","right","bottom","left"].forEach(e=>{const r=t[e];n[`${o}-${e}`]=void 0===r?i:"number"==typeof r?`${r}px`:r}):l(i)}),n}(s(),a()));var b=zi();xo(b,(t,n)=>({tabindex:-1,dir:t,class:e.class,"data-sonner-toaster":!0,"data-sonner-theme":Rn(k),"data-y-position":Rn(h).y,"data-x-position":Rn(h).x,style:e.style,onblur:C,onfocus:O,onmouseenter:W,onmousemove:j,onmouseleave:P,ondragend:T,onpointerdown:I,onpointerup:L,...w,[go]:n}),[y,()=>{var t;return{"--front-toast-height":`${null==(t=di.heights[0])?void 0:t.height}px`,"--width":"356px","--gap":`${p()}px`,"--offset-top":Rn(g)["--offset-top"],"--offset-right":Rn(g)["--offset-right"],"--offset-bottom":Rn(g)["--offset-bottom"],"--offset-left":Rn(g)["--offset-left"],"--mobile-offset-top":Rn(g)["--mobile-offset-top"],"--mobile-offset-right":Rn(g)["--mobile-offset-right"],"--mobile-offset-bottom":Rn(g)["--mobile-offset-bottom"],"--mobile-offset-left":Rn(g)["--mobile-offset-left"]}}],void 0,"svelte-nbs0zk"),Ur(b,23,()=>di.toasts.filter(t=>!t.position&&0===Rn(o)||t.position===r),t=>t.id,(t,o,s,a)=>{{const a=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.successIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Oi())};Gr(r,t=>{null!==e.successIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.successIcon?t(o):t(i,!1)}),Ar(t,n)},c=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.errorIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Ii())};Gr(r,t=>{null!==e.errorIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.errorIcon?t(o):t(i,!1)}),Ar(t,n)},h=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.warningIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Wi())};Gr(r,t=>{null!==e.warningIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.warningIcon?t(o):t(i,!1)}),Ar(t,n)},p=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.infoIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Pi())};Gr(r,t=>{null!==e.infoIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.infoIcon?t(o):t(i,!1)}),Ar(t,n)},g=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.closeIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,ji())};Gr(r,t=>{null!==e.closeIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.closeIcon?t(o):t(i,!1)}),Ar(t,n)};let w=Ze(()=>{var t;return(null==(t=v())?void 0:t.duration)??d()}),y=Ze(()=>{var t;return(null==(t=v())?void 0:t.class)??""}),b=Ze(()=>{var t;return(null==(t=v())?void 0:t.descriptionClass)||""}),k=Ze(()=>{var t;return(null==(t=v())?void 0:t.style)??""}),_=Ze(()=>v().classes||{}),M=Ze(()=>v().unstyled??!1),S=Ze(()=>{var t;return(null==(t=v())?void 0:t.cancelButtonStyle)??""}),E=Ze(()=>{var t;return(null==(t=v())?void 0:t.actionButtonStyle)??""}),C=Ze(()=>{var t;return(null==(t=v())?void 0:t.closeButtonAriaLabel)??m()});Ci(t,{get index(){return Rn(s)},get toast(){return Rn(o)},get defaultRichColors(){return u()},get duration(){return Rn(w)},get class(){return Rn(y)},get descriptionClass(){return Rn(b)},get invert(){return n()},get visibleToasts(){return f()},get closeButton(){return l()},get interacting(){return Rn($)},get position(){return r},get style(){return Rn(k)},get classes(){return Rn(_)},get unstyled(){return Rn(M)},get cancelButtonStyle(){return Rn(S)},get actionButtonStyle(){return Rn(E)},get closeButtonAriaLabel(){return Rn(C)},get expandByDefault(){return i()},get expanded(){return Rn(x)},get loadingIcon(){return e.loadingIcon},successIcon:a,errorIcon:c,warningIcon:h,infoIcon:p,closeIcon:g,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),zo(b,t=>sn(_,t),()=>Rn(_)),nr(()=>b.dir=b.dir),Ar(t,b)}),Ar(t,r)};Gr(N,t=>{di.toasts.length>0&&t(z)}),nr(()=>bo(A,"aria-label",`${g()??""} ${Rn(E)??""}`)),Ar(t,A),ie()}(t,{})};Gr(u,t=>{(n()||Fo(Zs,"$sidebarEnabled",o))&&t(d)}),Ar(t,l),ie(),i()}var rs=Pr('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><!></div>'),os=Pr('<div class="scroll-container grid grid-cols-2 gap-6 svelte-129hoe0"><div class="flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column flex flex-col gap-6 svelte-129hoe0"></div></div> <div class="mt-15 flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column-offset flex flex-col gap-6 svelte-129hoe0"></div></div></div>'),is=Pr('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><p class="text-muted-foreground svelte-129hoe0">Error – See console</p></div>'),ls=Pr("View all games <!>",1),ss=Pr("Random game <!>",1),as=(t,e)=>e(t.clientY),cs=(t,e)=>e(t.touches[0].clientY),us=Pr('<img alt="icon" class="pointer-events-none aspect-square w-8 svelte-129hoe0"/>'),ds=Pr('<div role="button" tabindex="0"><!> <!></div>'),fs=Pr('<div><img alt="logo" class="pointer-events-none mx-auto mt-4 -mb-1 w-50 select-none svelte-129hoe0"/> <div class="grow-1 overflow-hidden mask-y-from-90% mask-y-to-100% p-6 py-12 transition-opacity not-hover:opacity-75 svelte-129hoe0"><!></div> <div class="flex w-full flex-col items-center gap-4 px-4 svelte-129hoe0"><!> <!></div> <div class="w-full svelte-129hoe0"><div class="mt-auto border-y p-6 py-4 svelte-129hoe0"><!></div> <div class="flex justify-end p-0 svelte-129hoe0"><!></div></div></div> <!>',1);function vs(t,e){oe(e,!0);const n=()=>Fo(Js,"$sidebarCollapsed",i),r=()=>Fo(Qs,"$projectUrl",i),o=()=>Fo(Ks,"$discoveryOpen",i),[i,l]=Go();let s=on(!1),a=on(void 0),c=on(0),u=on(null),d=on(fe([])),f=Ze(()=>{var t;return(null==(t=Rn(d))?void 0:t.filter((t,e)=>e%2==0))||[]}),v=Ze(()=>{var t;return(null==(t=Rn(d))?void 0:t.filter((t,e)=>e%2==1))||[]});function h(){sessionStorage.setItem("playlightSidebarState",JSON.stringify({collapsed:n(),buttonY:Rn(m)}))}function p(){try{return JSON.parse(sessionStorage.getItem("playlightSidebarState")||"{}")}catch{}}Qn(()=>{var t;const e=document.documentElement.clientWidth<=768;Yo(Js,e||Boolean(null==(t=p())?void 0:t.collapsed))}),Jo(async()=>{var t;return sn(m,(null==(t=p())?void 0:t.buttonY)??Rn(m),!0),sn(s,!0),sn(d,await Vl(14,!0),!0),sn(a,await Di.getCurrentGameInfo(),!0),sn(s,!1),Mr(window,"touchmove",k,{passive:!1})});let g,m=on(100),w=on(!1),y=on(0),b=on(0),x=on(null);function $(t){sn(w,!0),sn(y,t,!0),sn(b,Rn(m),!0)}function k(t){Rn(w)&&(t.preventDefault(),_(t.touches[0].clientY))}function _(t){var e;if(!Rn(w))return;const n=t-Rn(y),r=Rn(b)+n,o=null==(e=Rn(x))?void 0:e.offsetHeight;sn(m,Math.max(0,Math.min(window.innerHeight-o,r)),!0),cancelAnimationFrame(g),g=requestAnimationFrame(h)}function M(t){if(t.preventDefault(),sn(c,Rn(c)-t.deltaY),Rn(u)){const t=Rn(u).offsetHeight/3;sn(c,(Rn(c)%t+t)%t)}}var S=fs();Sr("mousemove",pe,function(t){Rn(w)&&_(t.clientY)}),Sr("mouseup",pe,()=>sn(w,!1)),Sr("touchend",pe,()=>sn(w,!1)),Sr("resize",pe,()=>{document.documentElement.clientWidth<=768&&Yo(Js,!0)});var E=ke(S),C=$e(E),O=_e(C,2),I=$e(O),W=t=>{var e=rs();el($e(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Ar(t,e)},P=t=>{var e=Lr(),n=ke(e),r=t=>{var e=os(),n=$e(e),r=$e(n);let o;Ur(r,21,()=>[...Rn(f),...Rn(f),...Rn(f)],Kr,(t,e)=>{dl(t,{get game(){return Rn(e)},small:!0})}),zo(r,t=>sn(u,t),()=>Rn(u));var i=$e(_e(n,2));let l;Ur(i,21,()=>[...Rn(v),...Rn(v),...Rn(v)],Kr,(t,e)=>{dl(t,{get game(){return Rn(e)},small:!0})}),nr((t,e)=>{o=fo(r,"",o,t),l=fo(i,"",l,e)},[()=>({transform:`translateY(calc(-33.333% + ${Rn(c)??""}px))`}),()=>({transform:`translateY(calc(-33.333% + ${Rn(c)??""}px))`})]),Sr("wheel",e,M),Ar(t,e)},o=t=>{Ar(t,is())};Gr(n,t=>{var e;(null==(e=Rn(d))?void 0:e.length)?t(r):t(o,!1)},!0),Ar(t,e)};Gr(I,t=>{Rn(s)?t(W):t(P,!1)});var j=_e(O,2),T=$e(j);Hl(T,{class:"w-full",onclick:()=>Yo(Ks,!0),get disabled(){return o()},children:(t,e)=>{var n=ls();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["line",{x1:"6",x2:"10",y1:"11",y2:"11"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"}]];
162
- /**
163
- * @license lucide-svelte v0.476.0 - ISC
164
- *
165
- * ISC License
166
- *
167
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
168
- *
169
- * Permission to use, copy, modify, and/or distribute this software for any
170
- * purpose with or without fee is hereby granted, provided that the above
171
- * copyright notice and this permission notice appear in all copies.
172
- *
173
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
174
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
175
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
176
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
177
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
178
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
179
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
180
- *
181
- */tl(t,Xo({name:"gamepad-2"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(_e(ke(n)),{style:"margin-top: -1px;"}),Ar(t,n)},$$slots:{default:!0}}),Hl(_e(T,2),{class:"w-full",variant:"secondary",onclick:()=>{var t,e;const n=Math.floor(Math.random()*(null==(t=Rn(d))?void 0:t.length)),r=null==(e=Rn(d))?void 0:e[n];nl(null==r?void 0:r.domain,null==r?void 0:r.id)},children:(t,e)=>{var n=ss();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6"}],["path",{d:"M6 18h.01"}],["path",{d:"M10 14h.01"}],["path",{d:"M15 6h.01"}],["path",{d:"M18 9h.01"}]];
182
- /**
183
- * @license lucide-svelte v0.476.0 - ISC
184
- *
185
- * ISC License
186
- *
187
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
188
- *
189
- * Permission to use, copy, modify, and/or distribute this software for any
190
- * purpose with or without fee is hereby granted, provided that the above
191
- * copyright notice and this permission notice appear in all copies.
192
- *
193
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
194
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
195
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
196
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
197
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
198
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
199
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
200
- *
201
- */tl(t,Xo({name:"dices"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(_e(ke(n)),{style:"margin-top: -2px;"}),Ar(t,n)},$$slots:{default:!0}});var L=$e(_e(j,2));Il($e(L),{get currentGame(){return Rn(a)}}),Hl($e(_e(L,2)),{variant:"secondary",class:"text-muted-foreground border-l outline-none!",onclick:()=>{Yo(Js,!0),h()},children:(t,e)=>{!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m6 17 5-5-5-5"}],["path",{d:"m13 17 5-5-5-5"}]];
202
- /**
203
- * @license lucide-svelte v0.476.0 - ISC
204
- *
205
- * ISC License
206
- *
207
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
208
- *
209
- * Permission to use, copy, modify, and/or distribute this software for any
210
- * purpose with or without fee is hereby granted, provided that the above
211
- * copyright notice and this permission notice appear in all copies.
212
- *
213
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
214
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
215
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
216
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
217
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
218
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
219
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
220
- *
221
- */tl(t,Xo({name:"chevrons-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(t,{})},$$slots:{default:!0}});var A=_e(E,2),N=t=>{var e=ds();let n;e.__mousedown=[as,$],e.__touchstart=[cs,$];var o=$e(e);!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["circle",{cx:"9",cy:"12",r:"1"}],["circle",{cx:"9",cy:"5",r:"1"}],["circle",{cx:"9",cy:"19",r:"1"}],["circle",{cx:"15",cy:"12",r:"1"}],["circle",{cx:"15",cy:"5",r:"1"}],["circle",{cx:"15",cy:"19",r:"1"}]];
222
- /**
223
- * @license lucide-svelte v0.476.0 - ISC
224
- *
225
- * ISC License
226
- *
227
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
228
- *
229
- * Permission to use, copy, modify, and/or distribute this software for any
230
- * purpose with or without fee is hereby granted, provided that the above
231
- * copyright notice and this permission notice appear in all copies.
232
- *
233
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
234
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
235
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
236
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
237
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
238
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
239
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
240
- *
241
- */tl(t,Xo({name:"grip-vertical"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(o,{class:"text-muted-foreground aspect-square"}),Hl(_e(o,2),{variant:"ghost",onclick:()=>{document.documentElement.clientWidth>768?(Yo(Js,!1),h()):Yo(Ks,!0)},children:(t,e)=>{var n=us();nr(()=>bo(n,"src",r()+"/assets/images/icon-white-small.png")),Ar(t,n)},$$slots:{default:!0}}),zo(e,t=>sn(x,t),()=>Rn(x)),nr(t=>{co(e,1,"bg-background/85 fixed right-0 flex items-center gap-2 border p-2 shadow-xl backdrop-blur-xl "+(Rn(w)?"cursor-grabbing":"cursor-grab"),"svelte-129hoe0"),n=fo(e,"",n,t)},[()=>({top:Rn(m)+"px"})]),Wo(3,e,()=>Vi),Ar(t,e)};Gr(A,t=>{n()&&!o()&&t(N)}),nr(()=>{co(E,1,`relative z-1 ml-auto flex h-dvh overflow-y-auto ${n()?"w-0":"w-75 border-l"} bg-background flex-col items-center gap-8 text-white transition-[width] duration-150 ease-out`,"svelte-129hoe0"),bo(C,"src",r()+"/assets/images/logo-white-small.png")}),Ar(t,S),ie(),l()}Er(["mousedown","touchstart"]);let hs=null,ps=null,gs=!1,ms=null,ws=new Map,ys=null;function bs(t,e,n,r,o){const i=t.getAttribute("data-playlight-original-href");let l=i?function(t,e){try{const n=new URL(e,document.baseURI);return t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi,(t,e,r)=>!(r=r.trim())||/^(data:|https?:|\/\/|\/|#)/.test(r)?t:`url(${e}${new URL(r,n).href}${e})`)}catch{return t}}(e,i):e;l=xs(l,n,r,o),t.textContent=l,t.setAttribute("data-playlight-modified","true")}function xs(t,e,n,r){const o=e/(e+r),i=n+r;return t=(t=(t=(t=(t=(t=(t=(t=t.replace(/(\d+(?:\.\d+)?)(vw|svw|lvw|dvw)/gi,(e,n,r,i)=>{const l=t.substring(0,i),s=l.lastIndexOf("{"),a=l.lastIndexOf("}");if(s>a){const t=l.substring(a+1,s).trim();if(/^html[.\s,:[]/.test(t))return e}return`${(parseFloat(n)*o).toFixed(2)}${r}`})).replace(/\((min-width|max-width):\s*([\d.]+[a-z]+)\)/gi,(t,e,n)=>`(${e}: calc(${n} + ${r}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi,(t,e,n,o,i)=>`(calc(${e} + ${r}px) ${n} width ${o} calc(${i} + ${r}px))`)).replace(/\(width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi,(t,e,n)=>`(width ${e} calc(${n} + ${r}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\)/gi,(t,e,n)=>`(calc(${e} + ${r}px) ${n} width)`)).replace(/\(\s*orientation:\s*portrait\s*\)/gi,`(max-width: ${i}px)`)).replace(/\(\s*orientation:\s*landscape\s*\)/gi,`(min-width: ${i+1}px)`)).replace(/\bbody\s*\{([^}]*)\}/gi,(t,e)=>`.playlight-sdk-inner-wrapper {${e.replace(/\s*!important\s*/gi,"")}}`)}let $s,ks=null,_s=null,Ms=null,Ss=null,Es=null,Cs=null,Os=null,Is=null,Ws=null,Ps=null,js=new Map,Ts=null,Ls=null,As=null,Ns=!1,zs=!1,Bs=[],Ds=null,Rs=null,qs=null;function Fs(){try{const t=document.createElement("div");t.id="playlight-sdk-container",t.className="playlight-sdk playlight-sdk-container",document.body.appendChild(t);const e=Dr(ns,{target:t}),n=new MutationObserver(()=>{document.body.contains(t)||(clearTimeout(qs),qs=setTimeout(()=>{document.body.contains(t)||(console.warn("Re-mounting Playlight's main container as it was removed!"),n.disconnect(),Fr(e),Fs())},0))});n.observe(document.body,{childList:!0})}catch(t){console.error("Error during Playlight mount:",t)}}function Ys(){var t,e,n,r;if(!Ns)try{const o=document.body,i=document.documentElement,l=["DIV","MAIN","ARTICLE","SECTION","HEADER","FOOTER","NAV","ASIDE","FORM"],s=Array.from(o.children).filter(t=>{var e;return l.includes(t.tagName)&&!(null==(e=t.id)?void 0:e.includes("playlight"))&&t.children.length>0}),a=()=>{const t=document.createElement("div");return t.id="playlight-sdk-inner-wrapper",Array.from(o.children).filter(t=>{var e;return!["SCRIPT","STYLE"].includes(t.tagName)&&!(null==(e=t.id)?void 0:e.includes("playlight"))}).forEach(e=>t.appendChild(e)),o.appendChild(t),zs=!0,t};if(!1!==(null==(e=null==(t=ni(Hs))?void 0:t.sidebar)?void 0:e.hasFrameworkRoot)&&s.length>0)if(1===s.length)Ls=s[0],zs=!1;else if(!0===(null==(r=null==(n=ni(Hs))?void 0:n.sidebar)?void 0:r.hasFrameworkRoot)){const t=s.map(t=>t.querySelectorAll("*").length),e=Math.max(...t);Ls=s[t.indexOf(e)],zs=!1}Ls||(Ls=a()),i.classList.add("playlight-sdk-html"),o.classList.add("playlight-sdk-body"),Ls.classList.add("playlight-sdk-inner-wrapper"),function(t,e){try{ks=Object.getOwnPropertyDescriptor(window,"innerWidth"),Object.defineProperty(window,"innerWidth",{get:()=>t.clientWidth,configurable:!0}),Ms=Object.getOwnPropertyDescriptor(window,"scrollY")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollY"),Object.defineProperty(window,"scrollY",{get:()=>e.scrollTop,configurable:!0}),Ss=Object.getOwnPropertyDescriptor(window,"pageYOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageYOffset"),Object.defineProperty(window,"pageYOffset",{get:()=>e.scrollTop,configurable:!0}),Es=Object.getOwnPropertyDescriptor(window,"scrollX")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollX"),Object.defineProperty(window,"scrollX",{get:()=>e.scrollLeft,configurable:!0}),Cs=Object.getOwnPropertyDescriptor(window,"pageXOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageXOffset"),Object.defineProperty(window,"pageXOffset",{get:()=>e.scrollLeft,configurable:!0}),Os=window.scrollTo,Is=window.scroll,Ws=window.scrollBy,window.scrollTo=(...t)=>e.scrollTo(...t),window.scroll=(...t)=>e.scrollTo(...t),window.scrollBy=(...t)=>e.scrollBy(...t),Ps=()=>{window.dispatchEvent(new Event("scroll"))},e.addEventListener("scroll",Ps),_s=window.matchMedia,window.matchMedia=function(e){const n=()=>{const n=_s||window.matchMedia,r=t.clientWidth,o=document.documentElement.clientWidth-r,i=xs(e,r,window.innerHeight,o);return n.call(window,i)},r=n();js.has(e)||js.set(e,{listeners:new Set,lastMatches:r.matches});const o=js.get(e);return new Proxy(r,{get(t,r){if("media"===r)return e;if("matches"===r)return n().matches;if("addEventListener"===r)return(e,n,...r)=>{"change"===e?o.listeners.add(n):t.addEventListener(e,n,...r)};if("removeEventListener"===r)return(e,n,...r)=>{"change"===e?o.listeners.delete(n):t.removeEventListener(e,n,...r)};const i=t[r];return"function"==typeof i?i.bind(t):i}})},$s||($s=window.addEventListener("resize",()=>{for(const[t,{listeners:e,lastMatches:n}]of js.entries()){const r=window.matchMedia(t);if(r.matches!==n){js.get(t).lastMatches=r.matches;const n=new MediaQueryListEvent("change",{matches:r.matches,media:r.media});e.forEach(t=>t(n))}}}))}catch(n){console.warn("Could not polyfill window properties:",n)}}(o,Ls),function(t){const e=()=>{const e=t.clientWidth,n=document.documentElement.clientWidth-e;Array.from(document.styleSheets).forEach(t=>function(t,e,n,r){var o;const i=t.ownerNode;if(!(!i||t.href&&/playlight/i.test(t.href)))try{if(ws.has(i))bs(i,ws.get(i).originalCSS,e,n,r);else{if(!(null==(o=t.cssRules)?void 0:o.length))return;const l=Array.from(t.cssRules).map(t=>t.cssText).join("\n");if("LINK"===i.tagName){const t=document.createElement("style");t.setAttribute("data-playlight-original-href",i.href),ws.set(t,{originalCSS:l,originalElement:i}),i.replaceWith(t),bs(t,l,e,n,r)}else ws.set(i,{originalCSS:l,originalElement:null}),bs(i,l,e,n,r)}}catch(l){console.warn(`Playlight cannot process stylesheet ${t.href||"inline"} due to CORS restrictions.`)}}(t,e,window.innerHeight,n))},n=()=>{gs||(gs=!0,requestAnimationFrame(()=>{gs=!1,e()}))};hs=new ResizeObserver(()=>{const e=document.documentElement.clientWidth-t.clientWidth;ys!==e&&(ys=e,window.dispatchEvent(new Event("resize")),clearTimeout(ms),ms=setTimeout(n,50))}),hs.observe(t),ps=new MutationObserver(t=>{for(const e of t){for(const t of e.addedNodes)"STYLE"===t.nodeName?n():"LINK"===t.nodeName&&"stylesheet"===t.rel&&(t.sheet?n():t.addEventListener("load",n,{once:!0}));if("attributes"===e.type&&"LINK"===e.target.nodeName){const t=e.target;"stylesheet"===t.rel&&"rel"===e.attributeName&&(t.sheet?n():t.addEventListener("load",n,{once:!0}))}}}),ps.observe(document.head,{childList:!0,attributes:!0,attributeFilter:["rel"]}),e()}(o),Bs=Array.from(o.classList).filter(t=>!t.startsWith("playlight")),Bs.forEach(t=>{Ls.classList.add(t),o.classList.remove(t)});const c=window.getComputedStyle(Ls);"contents"===c.display&&Ls.style.setProperty("display","block","important"),"visible"===c.overflow&&Ls.style.setProperty("overflow","auto","important"),Ts=document.createElement("div"),Ts.className="playlight-sdk playlight-sdk-container-sidebar",i.appendChild(Ts),As=Dr(vs,{target:Ts}),Ds=new MutationObserver(()=>{const t=!document.documentElement.classList.contains("playlight-sdk-html"),e=!document.body.classList.contains("playlight-sdk-body"),n=Ls&&!document.body.contains(Ls),r=Ts&&!document.documentElement.contains(Ts);(t||e||n||r)&&(clearTimeout(Rs),Rs=setTimeout(()=>{console.warn("Re-mounting Playlight's sidebar container as it was removed!"),Gs(),Ys()},0))}),Ds.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),Ds.observe(document.body,{childList:!0}),Ns=!0}catch(o){console.error("Error during sidebar setup:",o)}}function Gs(){if(Ns)try{const t=document.body,e=document.documentElement;null==Ds||Ds.disconnect(),clearTimeout(Rs),As&&Fr(As),(null==Ts?void 0:Ts.parentNode)&&e.removeChild(Ts),zs?(Ls.parentNode===t&&Array.from(Ls.children).forEach(e=>{e.parentNode===Ls&&t.insertBefore(e,Ls)}),Ls.remove()):Ls.classList.remove("playlight-sdk-inner-wrapper"),e.classList.remove("playlight-sdk-html"),t.classList.remove("playlight-sdk-body"),Bs.forEach(e=>{t.classList.add(e),Ls.classList.remove(e)}),function(t){try{Object.defineProperty(window,"innerWidth",ks),Object.defineProperty(window,"scrollY",Ms),Object.defineProperty(window,"pageYOffset",Ss),Object.defineProperty(window,"scrollX",Es),Object.defineProperty(window,"pageXOffset",Cs),window.scrollTo=Os,window.scroll=Is,window.scrollBy=Ws,t.removeEventListener("scroll",Ps),window.matchMedia=_s,ks=null,Ms=null,Ss=null,Es=null,Cs=null,Os=null,Is=null,Ws=null,Ps=null,_s=null}catch(e){console.warn("Could not restore window polyfills:",e)}}(Ls),function(){null==hs||hs.disconnect(),window.dispatchEvent(new Event("resize")),null==ps||ps.disconnect(),clearTimeout(ms),hs=ps=ms=ys=null;for(const[t,{originalCSS:e,originalElement:n}]of ws.entries())n?t.replaceWith(n):(t.textContent=e,t.removeAttribute("data-playlight-modified"));ws.clear()}(),Ds=null,Rs=null,Ts=null,As=null,Ls=null,Bs=[],zs=!1,Ns=!1}catch(t){console.error("Error during sidebar removal:",t)}}const Hs=ei(null),Vs=ei(!1),Ks=ei(!1),Us=ei(!1),Xs=ei(0),Zs=ei(!1),Js=ei(!1),Qs=ei("https://sdk.playlight.dev");let ta;Ks.subscribe(t=>{try{t?(Di.trackOpen(),qi("discoveryOpen"),ta=document.body.style.overflow,document.body.style.setProperty("overflow","hidden","important")):(qi("discoveryClose"),document.body.style.overflow=ta)}catch(e){console.error("Error in discoveryOpen store subscription:",e)}}),Hs.subscribe(t=>{var e;(null==(e=null==t?void 0:t.sidebar)?void 0:e.forceVisible)||ni(Vs)?Zs.set(!0):Zs.set(!1)}),Vs.subscribe(t=>{t&&Zs.set(!0)}),Zs.subscribe(t=>{t?(Ys(),qi("sidebarEnable")):(Gs(),qi("sidebarDisable"))});var ea=Pr('<div class="flex h-62 w-full items-center justify-center"><!></div>'),na=Pr('<div class="snap-center px-2"><!></div>'),ra=Pr('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>',1),oa=(t,e,n)=>Rn(e).scrollBy({left:2*-Rn(n),behavior:"smooth"}),ia=Pr('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'),la=(t,e,n)=>Rn(e).scrollBy({left:2*Rn(n),behavior:"smooth"}),sa=Pr('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'),aa=Pr("<!> <!>",1),ca=Pr('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');function ua(t,e){oe(e,!0);const[n,r]=Go();let o=on(!0),i=on(fe([])),l=on(void 0),s=on(0),a=on(!1),c=on(!0),u=on("");function d(t,e){const n=Math.min(t/50,1),r=Math.min(e/50,1);sn(u,`mask-image: linear-gradient(\n\t\t\tto right,\n\t\t\trgba(0, 0, 0, ${1-.95*n}) 0%,\n\t\t\trgba(0, 0, 0, ${1-.674*n}) 2%,\n\t\t\trgba(0, 0, 0, ${1-.446*n}) 3.5%,\n\t\t\trgba(0, 0, 0, ${1-.26*n}) 5%,\n\t\t\trgba(0, 0, 0, ${1-.14*n}) 6.5%,\n\t\t\trgba(0, 0, 0, ${1-.046*n}) 8%,\n\t\t\tblack 9%,\n\t\t\tblack 91%,\n\t\t\trgba(0, 0, 0, ${.954*r+(1-r)}) 92%,\n\t\t\trgba(0, 0, 0, ${.86*r+(1-r)}) 93.5%,\n\t\t\trgba(0, 0, 0, ${.74*r+(1-r)}) 95%,\n\t\t\trgba(0, 0, 0, ${.554*r+(1-r)}) 96.5%,\n\t\t\trgba(0, 0, 0, ${.326*r+(1-r)}) 98%,\n\t\t\trgba(0, 0, 0, ${.05*r+(1-r)})\n\t\t)`)}Jo(async()=>{sn(o,!0),sn(i,await Vl(10,!0),!0),sn(o,!1),requestAnimationFrame(()=>{if(Rn(l)){const t=Rn(l).scrollWidth-Rn(l).clientWidth;d(Rn(l).scrollLeft,t-Rn(l).scrollLeft)}})});var f=ca(),v=$e(f),h=$e(v),p=t=>{var e=ea();el($e(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Ar(t,e)},g=t=>{var e=ra(),n=ke(e);Ur(n,17,()=>Rn(i),Kr,(t,e)=>{var n,r,o,i,l=na();dl($e(l),{get game(){return Rn(e)},compact:!0}),n=l,r="clientWidth",o=t=>sn(s,t),i=Ao.observe(n,()=>o(n[r])),tr(()=>(Fn(()=>o(n[r])),i)),Ar(t,l)});var r=_e(n,2);Hl(_e($e(r),2),{onclick:()=>Yo(Ks,!0),children:(t,e)=>{Ar(t,Tr("See all"))},$$slots:{default:!0}}),Ar(t,e)};Gr(h,t=>{Rn(o)?t(p):t(g,!1)}),zo(v,t=>sn(l,t),()=>Rn(l));var m=_e(v,2),w=t=>{var e=aa(),n=ke(e),r=t=>{var e=ia();e.__click=[oa,l,s],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m15 18-6-6 6-6"}]];
242
- /**
243
- * @license lucide-svelte v0.476.0 - ISC
244
- *
245
- * ISC License
246
- *
247
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
248
- *
249
- * Permission to use, copy, modify, and/or distribute this software for any
250
- * purpose with or without fee is hereby granted, provided that the above
251
- * copyright notice and this permission notice appear in all copies.
252
- *
253
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
254
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
255
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
256
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
257
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
258
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
259
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
260
- *
261
- */tl(t,Xo({name:"chevron-left"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e(e),{size:22,strokeWidth:2.75}),Wo(3,e,()=>Vi),Ar(t,e)};Gr(n,t=>{Rn(a)&&t(r)});var o=_e(n,2),i=t=>{var e=sa();e.__click=[la,l,s],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m9 18 6-6-6-6"}]];
262
- /**
263
- * @license lucide-svelte v0.476.0 - ISC
264
- *
265
- * ISC License
266
- *
267
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
268
- *
269
- * Permission to use, copy, modify, and/or distribute this software for any
270
- * purpose with or without fee is hereby granted, provided that the above
271
- * copyright notice and this permission notice appear in all copies.
272
- *
273
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
274
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
275
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
276
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
277
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
278
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
279
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
280
- *
281
- */tl(t,Xo({name:"chevron-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}($e(e),{size:22,strokeWidth:2.75}),Wo(3,e,()=>Vi),Ar(t,e)};Gr(o,t=>{Rn(c)&&t(i)}),Ar(t,e)};Gr(m,t=>{Rn(i).length>0&&t(w)}),nr(()=>fo(v,Rn(u))),Sr("scroll",v,t=>{const e=t.target;sn(a,e.scrollLeft>20),sn(c,e.scrollLeft<e.scrollWidth-e.clientWidth-20),d(e.scrollLeft,e.scrollWidth-e.clientWidth-e.scrollLeft)}),Ar(t,f),ie(),r()}function da(){try{const t=document.querySelectorAll(".playlight-widget-carousel");t.length>0&&t.forEach(t=>{t.dataset.playlightInitialized||(t.dataset.playlightInitialized="true",Dr(ua,{target:t}))})}catch(t){console.error("Error occurred initializing and mounting carousel widget:",t)}}Er(["click"]);const fa=new class{init(t={}){if("undefined"==typeof window)return console.error("Playlight cannot run on the server.");if(window.playlightInitialized)return console.warn("Playlight SDK is already initialized!");this.setConfig(t),Fs(),da(),function(){try{new MutationObserver(()=>{da()}).observe(document.body,{childList:!0,subtree:!0})}catch(t){console.error("Error occurred setting up widget observer:",t)}}();const e="true"===sessionStorage.getItem("fromPlaylight"),n="playlight"===new URLSearchParams(window.location.search).get("utm_source");n&&sessionStorage.setItem("fromPlaylight","true"),Vs.set(e||n),window.playlightInitialized=!0}setDiscovery(t=!0){Ks.set(t)}onEvent(t,e){if(!["discoveryOpen","discoveryClose","exitIntent","sidebarEnable","sidebarDisable"].includes(t))return console.warn(`Invalid event type "${t}!"`);Ri.has(t)||Ri.set(t,[]),Ri.get(t).push(e)}setConfig(t={}){Hs.set(ht(t))}};return"undefined"!=typeof window&&(window.playlightSDK=fa),fa}();
282
- //# sourceMappingURL=playlight-sdk.iife.js.map